z386: An Open-Source 80386 Built Around Original Microcode

TL;DR

z386 is an open-source FPGA implementation of the Intel 80386 CPU built around the original microcode. It is capable of running DOS 6 and 7, protected-mode applications, and classic games like Doom. This project advances hardware reconstruction and educational understanding of the 386 architecture.

The z386 project has successfully built an open-source FPGA-based 80386 CPU that runs real software, including DOS and protected-mode programs, using the original microcode. This achievement marks a significant step in hardware reconstruction and educational projects related to classic microprocessors.

z386 is an FPGA implementation of the Intel 80386 processor, designed to emulate the original microcode and architecture. It now can boot DOS 6 and DOS 7, execute protected-mode applications like DOS/4GW, and run classic games such as Doom and Cannon Fodder. The project is based on recovered 386 microcode, shared by researchers, and aims to recreate the processor’s internal structures, including its microcode ROM, instruction fetch, decode, and execution units. The design maintains many original features, such as the paging TLB, segmentation, and protection logic, while employing FPGA-friendly optimizations like DSP blocks and small caches. The current FPGA build operates at around 85 MHz, providing performance comparable to a 70 MHz 386 or a low-end 486, with benchmarks showing it can handle typical tasks and games effectively.

Why It Matters

This development matters because it offers a tangible, hardware-based recreation of a historically significant microprocessor, providing educational insights into microarchitecture and microcode. It also demonstrates the feasibility of reconstructing complex CPUs from microcode dumps, which has implications for hardware preservation, retrocomputing, and understanding legacy systems.

Terasic Technologies P0496, DE10-Nano Dev Kit - Single Board Computer Development Board with DE10-Nano Board, Power Supply, USB Cable, Linux, ARM CPU, LPDDR4 RAM, USB Connectivity

Terasic Technologies P0496, DE10-Nano Dev Kit – Single Board Computer Development Board with DE10-Nano Board, Power Supply, USB Cable, Linux, ARM CPU, LPDDR4 RAM, USB Connectivity

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background

The project builds on prior work reconstructing the 8086 and on recent releases of 80386 microcode disassemblies. The original 386 microcode was recovered and shared among researchers, enabling projects like z386 to interpret and implement it in FPGA. Historically, the 386 introduced protected mode, paging, and multitasking, making it a cornerstone of modern PC architecture. Recreating it in hardware from microcode enhances understanding and preserves this architecture for educational and experimental purposes.

“z386 now boots DOS and runs protected-mode software, demonstrating that microcode-based reconstruction is feasible.”

— Project developer

“Recovering and implementing the original 386 microcode in FPGA allows us to explore its architecture in unprecedented detail.”

— Researcher involved in microcode disassembly

W65C265SXB - WDC Xxcelr8r Engineering Development System- Board Featuring The W65C265S 8/16-bit Microcomputer

W65C265SXB – WDC Xxcelr8r Engineering Development System- Board Featuring The W65C265S 8/16-bit Microcomputer

8/16-bit 65816 based Microcomputer (3.6864 MHz) on board with Twin Tone Generators, Timers, 4x UART, IO, Parallel Interface…

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What Remains Unclear

It remains unclear how fully the z386 implementation replicates all aspects of the original hardware, including timing, power management, and detailed hardware quirks. The microcode reconstruction, while functional, may not cover every edge case or hardware nuance present in original chips. Additionally, long-term stability and performance under diverse workloads are still being evaluated.

Fipsy V2 FPGA Development Board | Bread Board Compatible | 1280 LUTs, 269MHz, 64kbit Memory, SPI/I2C Programming | MachXO2 Logic Device

Fipsy V2 FPGA Development Board | Bread Board Compatible | 1280 LUTs, 269MHz, 64kbit Memory, SPI/I2C Programming | MachXO2 Logic Device

LEARNING PLATFORM: Fipsy is designed for makers and learners! Ideal for FPGA education with progressive projects from basic…

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What’s Next

Next steps include refining the microcode implementation, expanding software compatibility, and optimizing performance. Further testing on complex protected-mode applications and games will help validate the hardware’s fidelity. The project team may also release detailed documentation and source code for broader community engagement and educational use.

Amazon

Intel 80386 microcode reconstruction

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

What is z386?

z386 is an open-source FPGA-based implementation of the Intel 80386 CPU, built around recovered original microcode, capable of running DOS and protected-mode software.

Why is reconstructing the 386 microcode important?

Recovering and implementing the 386 microcode allows for detailed hardware understanding, preservation of legacy architectures, and educational exploration of microarchitecture design.

Can z386 run modern software?

No, z386 is designed to run classic DOS and protected-mode applications, not modern operating systems or software requiring advanced hardware features.

What are the main technical challenges?

Recreating the complex microcode, ensuring accurate timing, and faithfully implementing hardware features like paging, protection, and segmentation are key challenges in the project.

What does this mean for hardware preservation?

It demonstrates that microcoded CPUs can be reconstructed in hardware from microcode dumps, aiding in hardware preservation, education, and understanding of legacy systems.

Source: Hacker News

You May Also Like

Defining Heat Pump Efficiency: Electricity Bill Impacts

We’ve all experienced the pain of expensive electricity bills, especially when it’s…

Top Energy-Efficient Heat Pumps for Homes 2022

Are you fed up with expensive energy bills and ineffective heating systems?…

Boosting Heat Pump Efficiency: Essential Tactics

Liberate your heat pump’s true potential! In our quest for optimal efficiency,…