The MCL86+ is an open source Intel 8088 emulator which uses a Teensy 4.1 microcontroller board and a small PCB which can be a drop-in replacement for the originalCPU in the original IBM Personal Computers and clones.

The 8086 emulation is written in simple C code and can be configured to run in clock accurate as well as in greatly accelerated modes. There is plenty of RAM and ROM to support multiple BIOS images, internal RAM, and optional peripherals. The MCL86’s 8086 Execution unit (EU) is abstracted from the Bus Interface Unit (BIU) which makes supporting different bus interfaces easy. In fact, the code was debugged using a command-line stub for the BIU so that I could run it on my laptop!

It can successfully run every version of DOS, various CPU speed tests, application and games which include Archon, Flight Simulator 2, JumpMan, and many others.

In cycle accurate mode it is able to run the 8088 MPH demo which is a demonstration of the correctness of the 8088 emulation as well as the local bus timing of the MCL86+

When running in accelerated mode we can achieve a significant performance boost!

When setting the number of clocks taken by ALU operations to zero and cycle accurate bus cycles we appear to get a nearly 1.5X speed improvement over the stock 8088. This leaves no gaps between 8088 bus cycles which would normally occur while the ALU operations are completing. This may be the theoretical maximum speed attainable when all instructions and data use motherboard resources that use the 8088’s bus interface. When we try using internal memory for RAM and ROM which are not sensitive to the 4.77Mhz clock this speed boost should increase dramatically.

To yield a greater level of acceleration on the MCL86+ I located the SuperSoft Diagnostic ROM and 256KB of RAM inside of the Teensy 4.1 micro controller so they will be accessed at closer to 800 Mhz instead of the bus cycle-accurate 4.77 Mhz. I also disabled cycle accuracy so that 8088 opcodes will also run at the speed of the microcontroller. There is quite a bit of acceleration which is a few times faster than the 4.77 Mhz 8088. The entire SuperSoft Diagnostics test runs in about 35 seconds!

I took a short video and posted it on YouTube:

Unfortunately it appears that Microsoft BASIC cannot handle this amount of acceleration. It boots to BASIC, however it will not accept keystrokes. I cannot boot anything from the disk drive either at this speed, and if I first boot from the disk and then enable acceleration, the data is not coherent between the motherboard’s memory and the memory in the MCL86+ due to the disk drive DMA. I may need something like an XT-IDE which doesn’t use DMA to guarantee that all memories are coherent. 

There are probably a number of software solutions which could address this. Perhaps being sensitive to certain interrupts and slowing down to cycle-accurate mode while they run would solve the BASIC and disk drive speed problems. Maintaining coherence between the internal and motherboard RAM could also potentially be solved by simply performing a “sync” after a disk access has occurred where the MCL86+ would just copy the RAM contents from the motherboard to the internal RAM, and then continue the program.

Oh well. Making an 8088 accelerator was not the design goal of this project. The challenge was to see if I could implement a 8088 software emulation running on a fast microcontroller and also support its bus interface while maintaining close to cycle accuracy. It is a more complicated project than the MCL65+ which emulates a 6502 and also supports the bus interface which was somewhat easier as the 6502 has a simpler instruction set, and the bus interface only runs at 1Mhz. The MCL86+ was quite a bit more challenging! It only took a few months to achieve the goal… so Yay! 

Trying another method of acceleration I updated the MCL86+ code with a new mode which mirrors 256KB of the IBM XT’s...

Read more »