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.

Intel NUC 11 Extreme Kit NUC11BTMi9 Gaming Barebone System - Mini PC Core i9 11th Gen i9-11900KB Octa-core (8 Core)

Intel NUC 11 Extreme Kit NUC11BTMi9 Gaming Barebone System – Mini PC Core i9 11th Gen i9-11900KB Octa-core (8 Core)

DDR4 SDRAM compatible slot – Installs memory that reduces processor's idle time and enhances computer's performance

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

ELECFREAKS microbit Retro Makecode Arcade for STEM Education, Micro:bit Joystick Programming Learning Machine Supports Remote Control and Creat Games(Without Micro:bit)

ELECFREAKS microbit Retro Makecode Arcade for STEM Education, Micro:bit Joystick Programming Learning Machine Supports Remote Control and Creat Games(Without Micro:bit)

【Translucent acrylic】The microbit arcade has a transparent acrylic material with a circular arc design, which makes it feel…

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.

Cyclone 10 FPGA Development Board - CycloFlex

Cyclone 10 FPGA Development Board – CycloFlex

Altera 10CL016 FPGA with 16,000 Logic Elements. This FPGA Development Kit requires an external JTAG Programmer. The Cyclone…

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

Maximizing Savings With Energy-Efficient Heat Pump Tech

We are here to assist you in saving money while maintaining a…

Explore Top Energy-Saving Heat Pumps for Homes

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

Boosting Conservation Efforts: Advanced Heat Pump Technology

Picture a world where our homes are comfortable and energy-efficient, all while…

Saving 40% on Bills With Ideal HVAC Heat Pumps for Frigid Climates

Are you tired of high energy bills during freezing winters? Stop searching!…