• Please review our updated Terms and Rules here

Drop-in 8088 CPU Emulator for the IBM PC - MCL86+

MicroCoreLabs

Experienced Member
Joined
Feb 12, 2016
Messages
131
I wanted to share my latest project, the MCL86+, which is a drop-in 8088 replacement board for the IBM PC/XT and clones.

It uses a Teensy 4.1 to run the 8088 emulation and a small and inexpensive PCB to perform the voltage shifting.

Early testing shows that it can boot multiple versions of DOS, run various applications and games, and pass a number of tests including the SuperSoft Diagnostic ROM.

It will be able to run as cycle accurate and accelerated modes. When running exclusively from internal RAM and ROM at the 800Mhz speed of the Teensy micro controller, it could provide quite a speed improvement on the stock 4.77Mhz!

I will post all of the source on GitHub shortly and I will be posting more updates on my Wordpress Blog: https://microcorelabs.wordpress.com


MCL86_Plus.JPG
 

MicroCoreLabs

Experienced Member
Joined
Feb 12, 2016
Messages
131
Thanks! No specific use case other than just having fun combining modern electronics with vintage computers in a challenging and unique way.

I could think of a few fun applications off the top of my head:
- The Teensy has a micro-SD socket, so in theory the MCL86+ could combine the functionality of the XT-IDE and a 8088 replacement which will be much faster than a V20 upgrade.
- Debugging as you mentioned... I have the SuperSoft and other diagnosis ROMs in my C code as well as a number of XT BIOSes so it is easy to try new ones as desired without burning EPROMs. Custom tests and programs can also be written in C which have full access to the motherboard's resources yet would be running on an 800Mhz processor.. Similar to this project: MCL65 Fast
- Acceleration would probably be the most interesting application. I am curious to see how fast the 8088 emulation runs on the Teensy's fast CPU and how it compares to other accelerators.
- Other experiments like running a 6502 or 68000 emulation to see what it would have been like running these CPUs on the IBM PC instead of the 8088! ( I have code for these as well)

As I mentioned, all of the project's source will be posted to GitHub and I will share some of these PCBs if anyone is interested. They cost me around $20 for five which included shipping. :)
 

Plasma

Veteran Member
Joined
Nov 7, 2005
Messages
1,464
Will you be selling these? I would be interested in buying one.

Have you done a benchmark in accelerated mode? I'm curious what the equivalent XT MHz would be.
 

MicroCoreLabs

Experienced Member
Joined
Feb 12, 2016
Messages
131
Will you be selling these?
Yes, just for cost+shipping. The boards are very inexpensive...

Have you done a benchmark in accelerated mode? I'm curious what the equivalent XT MHz would be.
No yet, but its on my to-do list.

There are a number of options for acceleration ranging from simply eliminating the clocks the the ALU takes and continue to have all instructions and data run from the motherboard's RAM/ROM at 4.77Mhz. Another option is to cache some or all of the instructions and data which allows the core to access them at the micro controller's 800Mhz. This would give the largest performance boost, but introduces complications with DMA which the floppy and hard drives use. If code were added to mirror or somehow load DMA'ed data from DRAM into the MCL86+'s internal memory this could work. The MCL86+ cannot snoop the DMA cycles, however it would "know" when and where DMA data was being sent, so it could grab this data once the DMA completes.

I also need to figure out a way to change the acceleration modes. Using a combination of keystrokes would be ideal, but I'm not sure this would work 100% of the time as some application may never poll the keyboard. Im open to suggestions on a way to accomplish this.
 

MicroCoreLabs

Experienced Member
Joined
Feb 12, 2016
Messages
131
Very preliminary results so far. This is just with setting the number of clocks taken by ALU operations to zero and being cycle accurate with the bus cycles. So there should be no gap between 8088 bus cycles waiting or an ALU operation to complete. Maybe this is the theoretical maximum speed attainable when all instructions and data use motherboard resources which use the 8088's bus interface. When internal memory, not sensitive to the 4.77Mhz clock, is used, this speed boost should increase dramatically.

Speed1.JPG
 

MicroCoreLabs

Experienced Member
Joined
Feb 12, 2016
Messages
131
Code and PCB project files are now on GitHub: MCL86+ on GitHub

I have a few boards I could share from the initial batch of five if anyone is interested in trying one!

The next step will be to see what kind of acceleration we can get out of this thing!

I will be limited on the RAM ranges I can mirror using the micro controller's memory due to the floppy disk controller DMA, so I will start with some BASIC programs...
 
Last edited:

Timo W.

Veteran Member
Joined
Nov 25, 2014
Messages
1,556
Location
Germany
Cool project. :)

I'd love to see this enhanced with 286 instructions and maybe L1 cache.
 

MicroCoreLabs

Experienced Member
Joined
Feb 12, 2016
Messages
131
Hi, how hard is it to change it to work as 8086? For IBM PS/2 Model 30 and Compaq Deskpro.
The code for the Execution Unit is the same for 8086 and 8088 and the Bus Interface Unit code is easy to change to support a 16-bit data-bus and a larger prefetch queue.
I think it would be a challenge to support the 16-bit data-bus on the Teensy 4.1 as I am currently using two 8-bit busses for data to gain speed. One as an input and the other as an output which is faster than having a bidirectional bus. I used a Teensy 4.1 because of the speed and the ability to use the Arduino IDE, however the MCL86+ code can be ported to any microcontroller, or even run on the command-line.
 

MicroCoreLabs

Experienced Member
Joined
Feb 12, 2016
Messages
131
I located the MCL86's 256KB of RAM and the SuperSoft Diagnostic ROM inside of the Teensy 4.1 micro controller so they are now running at 800Mhz rather than the bus cycle-accurate 4.77Mhz.

I took a short video and posted it on YouTube: MCL86+ 8088 Accelerator - Running SuperSoft Diagnostics

The acceleration appears to be tremendous... Im not sure how many times faster than the stock 4.77Mhz 8088 it is, but the SuperSoft Diagnostics run in about 35 seconds!

The bad news is that I can't run much of anything else! 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. Im sure there are also software solutions which could address this, but Im not aware of them.

I updated my blog with this information: MCL86+ 8088 Accelerator - Results
 

MicroCoreLabs

Experienced Member
Joined
Feb 12, 2016
Messages
131
Yes, this is the "Anonymous" BIOS. I did try this one which worked well. The trouble is the disk DMA which keeps me from caching the data that gets written to motherboard DRAM.

In any case, just removing the cycle accuracy the MCL86+ will yield about a 50% improvement over the stock 4.77Mhz 8088.
 

DragonCaesar

New Member
Joined
Dec 14, 2017
Messages
5
This is incredible! I've been curious when you'd tackle this one after seeing your work on the PCjr. Consider me very interested in a board
 
Top