World’s Fastest Commodore PET using the MCL65+ 6502 drop-in emulator

I recently acquired and restored a Commodore PET 4016, so I thought it might be fun to try replacing the CPU with an MCL65+ 6502 drop-in replacement board to see how it performs. I also was interested to see how much faster the PET can operate when running in some acceleration modes!

My PET 4016, which normally contains 16 KB of DRAM, was upgraded to 32 KB by a previous user. This motherboard had holes drilled in the second DRAM bank by Commodore to keep users from upgrading their 4016 machines to 32 KB in and to force them to buy a PET 4032. This user simple hand-soldered the drilled out connections and upgraded it anyway!

As soon as I installed the MCL65+ it was able to booting the PET and I was able to run a small BASIC program. It had no trouble replacing the 6502 in the computer.

This is the MCL65+ installed in the computer’s CPU socket – replacing the 6502.

The next step was to test a theory that I had – I wondered if a .PRG program file could be loaded and run directly from the PET’s memory without needing a disk drive. This turned out to be the case!

The first two bytes of a .PRG binary file contains the memory address to locate the program and the rest of the file is simple the stream of binary data for the program. I simple converted the .PRG files to a string of hex data, placed it in an array in the MCL65+ code, and loaded it when the user presses a key.

Once the program was loaded I just needed to type RUN in BASIC and the program started up!

Being able to replace the 6502 and run programs directly from the internal memory was interesting, but I though it would be even more amusing to try some acceleration modes of the MCL65+ to see how fast we can run a Commodore PET.

Here is a video demonstration of me running a few programs and diagnostics using a few acceleration modes:


The MCL65+ uses a Teensy 4.1 which contains 1 MB of memory so it can easily emulate all of the PET’s ROM and RAM. With just a few line of code it can emulate different PET ROM images and diagnostic ROMs, support different sizes of system memory, and can mirror these memories in a cycle accurate or accelerated manners.

The video shows the computer running three acceleration modes. Mode-1, Mode-2, and Mode-3.

Mode-1 is cycle accurate where the MCL65+ runs just like a stock 6502 and is cycle accurate for both reads and writes. Mode-2 is cycle accurate on writes but accelerated on reads. Mode-3 is accelerated on both reads and writes. The accelerated modes store all of the computer’s RAM and ROM inside of the MCL65+ internal memory and run it at the maximum speed of the Teensy which is 900 MHz and clock accuracy is not observed.

I believe this machine is now the World’s Fastest Commodore PET!

World’s Fastest Commodore PET using the MCL65+ 6502 drop-in emulator

MCLV20_Max – A Software-defined NEC V20 CPU And More

The MCLV20_Max is a Teensy 4.1-based software-defined drop-in CPU replacement for the Intel 8088 used in vintage IBM XT’s. It has enhancements built upon the MCL86+ project and uses the same PCB.

It emulates the full Intel 8088 instruction set as well as the additional 80188 and V20 opcodes. It also mimics the behavior of the V20 with its treatment of flags, shift-counts, and the ability to restart multiple prefixes upon exit of an interrupt. Below is the Anonymous BIOS which recognizes the MCLV20_Max as a V20 CPU.

In addition to the CPU emulation, some of the features of the XTMax project are integrated into the MCLV20_Max which include 4 MB of Expanded RAM and MicroSD hard drive support. Below are the drivers being loaded that configure the 4 MB of Expanded RAM and enumerate the MicroSD as drive D:

Two acceleration modes are provided. Acceleration mode 1 simply removes opcode clock cycle accuracy so that one opcode is executed for each clock. This can provide for as much as 100% speed improvement over the stock 4.77 Mhz 8088.

Acceleration mode 2 provides the maximum acceleration which can be from 5 to 10X faster than the 8088. It does this by first copying all 640 KB of the motherboard RAM plus the ROM into the Teensy’s internal memory which runs at 800 Mhz+. From then on all CPU accesses to instruction and data are handled using this fast mirror RAM with only CPU accesses to motherboard peripherals and video RAM using the CPU’s local bus. The resulting speed is faster than a 10 Mhz 80286 and approaching that of a 80386.

The MCLV20_Max also has enough internal memory to host any BIOS or diagnostic ROM.

Using a modified LoTech EMM 3.2 driver, MCLV20_Max can provide 4 MB of Expanded RAM which can be used as a fast RAMDISK and like the XTMax project, the MCLV20_Max can also provide access to a MicroSD card which is formatted as FAT16 and can be freely used by any other computer including Windows, Mac, Linux, and Chromebook.

I made a few video demonstrations of the MCLV20_Max and posted to YouTube:

All of the source code and PCB files are open source and posted on GitHub:

https://github.com/MicroCoreLabs/Projects/tree/master/MCLV20_Max

MCLV20_Max – A Software-defined NEC V20 CPU And More

XTMax – 8-bit Software-Defined ISA card using Teensy 4.1

XTMax is a software-defined 8-bit ISA card which uses a Teesny 4.1 microcontroller board that provides the functionality of THREE vintage ISA cards. It can expand “conventional” motherboard RAM up to 640 KB, adds up to 16 MB of Expanded RAM, supports 320 KB of UMB RAM, and provides bootable hard-drive access using a MicroSD card. A small PCB is used to allow nearly all of the ISA bus signals to attach to the Teensy 4.1.

A similar project to this is the PicoMem which is also a software-defined ISA expansion card, however the Teensy 4.1 used on the XTMax is nearly 3X faster than the Raspberry Pi Pico so does not share some of its limitations.

The first feature of XTMax is that it can expand the motherboard’s conventional (motherboard) ram up to 640 KB without limitation and with zero wait states. XTMax also has no limitation on the ability to support DMA to and from the computer’s floppy or spinning hard disks as PicoMem does.

XTMax can currently support 16 MB of Expanded RAM and 320 KB of UMB using a updated drivers.

XTmax also allows a MicroSD card to be accessed as a hard drive which is similar to the functionality of an XT-IDE card. By default it will be the boot device if there is no hard drive present.

All design files are open souce and posted to GitHub:

https://github.com/MicroCoreLabs/Projects/tree/master/XTMax

Here is the PCB developed using KiCAD:

And here is the actual board with a Teensy 4.1 attached:

Here is XTMax installed in a very early IBM 5150 rev-A which has 64 KB installed on the motherboard.

It shows that 4 MB of Expanded RAM was added and that the MicroSD card is accessible as the C: drive. The older IBM PC’s did not display the total amount of conventional memory, but in this application below the memory is expanded to the maximum of 640 KB.

It is worth noting that the first BIOS version of the IBM PC did not support extension ROMs and therefore do not support hard disks, so XTMax is currently the only way to have a hard disk equivalent on these machines!

Here is the total memory on this early PC as reported by Norton Utilities:

Here is a screen capture of the XTMax providing 16 MB of Expanded RAM and loads the UMB driver plus configures a 15 MB RAMDISK!

I posted a video on YouTube of the XTMax in action:

XTMax – 8-bit Software-Defined ISA card using Teensy 4.1