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.

Amazon

FPGA Intel 80386 CPU kit

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

Amazon

retro microprocessor development board

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.

Amazon

DOS compatible FPGA computer

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

386 microcode reconstruction hardware

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

Beat the Cold: High-Efficiency Heat Pumps Outperforming Rivals

Get ready, everyone! We’re going to explore the realm of high-efficiency heat…

Transform Your Home With Top Energy-Efficient Heat Pumps

Are you sick of paying huge energy bills and feeling uncomfortable at…

Elevate Your Eco-Build: Amp Up Heat Pump Efficiency

Are you prepared to elevate your eco-friendly construction project? We have exclusive…

Unveiling Heat Pump Efficiency Vs Traditional Heating

We’ve all heard about the energy-saving benefits of heat pumps, but how…