z386: An Open-Source 80386 Built Around Original Microcode
AIThis post was created with the assistance of artificial intelligence (AI).

TL;DR

z386 is an open-source FPGA implementation of the Intel 80386 CPU built around original microcode. It can run DOS, protected-mode programs, and classic games, offering insights into historic microarchitecture. Its development marks a significant step in hardware reconstruction and education.

The z386 project is an open-source FPGA implementation of the Intel 80386 CPU, built around the original microcode, capable of running DOS 6, DOS 7, and protected-mode applications like Doom.

Before you orderOffer from Amazon

Get hardware and tech essentials delivered free with Prime

  • Fast, free delivery on millions of items
  • Prime Video, Amazon Music and more included
  • Member-only deals all year
Start your free Prime trial Free trial for eligible customers · Cancel anytime
As an affiliate, we earn on qualifying purchases.

The project, led by an enthusiast known as reenigne, has reconstructed the 386 microarchitecture to the point where it can boot and run real software, including classic games and protected-mode programs. It uses a microcode ROM with 2,560 entries, matching the original design, and performs at speeds comparable to a 70MHz 386 or low-end 486.

The FPGA implementation includes key 386 units such as prefetch, decode, microcode sequencer, ALU, segmentation, protection, paging, and memory interface, mirroring the original architecture while incorporating FPGA-friendly optimizations. It is capable of running DOS and protected mode applications like DOS/4GW and DOS/32A, with benchmarks showing performance close to historical hardware.

Why It Matters

This project offers a rare, open-source reconstruction of the 386 microarchitecture, providing educational insights into microcode-driven CPU design and the evolution of x86 architecture. It also enables enthusiasts and researchers to study and experiment with authentic hardware behavior without proprietary restrictions, fostering deeper understanding of legacy systems.

Products Worth Considering

Ledger Nano X Crypto Hardware Wallet – Bluetooth (Black + Billfodl)

Ledger Nano X Crypto Hardware Wallet – Bluetooth (Black + Billfodl)

Apple MacBook Pro 16.2-inch with M5 Pro, 18-core CPU, 20-core GPU, 24GB Memory, 1TB SSD, Wi-Fi 7 – Space Black

Apple MacBook Pro 16.2-inch with M5 Pro, 18-core CPU, 20-core GPU, 24GB Memory, 1TB SSD, Wi-Fi 7 – Space Black

Apple MacBook Pro 14-inch with M5 Pro, 18-core CPU, 20-core GPU, 64GB RAM, 1TB SSD, Space Black

Apple MacBook Pro 14-inch with M5 Pro, 18-core CPU, 20-core GPU, 64GB RAM, 1TB SSD, Space Black

As an affiliate, we earn on qualifying purchases.

Background

The 80386 microcode was recently recovered and disassembled by researchers, enabling projects like z386 to recreate the chip’s functionality on FPGA. Previous efforts, such as z8086, demonstrated the feasibility of microcode-based CPU reconstruction, but the 386’s complexity posed a greater challenge due to its richer internal state, protection features, and denser micro-operations. The current development builds on this foundation, aiming for both educational value and practical software compatibility.

“Building z386 around original microcode allows us to understand and demonstrate the inner workings of the 386 in a way that emulators or RTL-based designs can’t match.”

— reenigne (project developer)

“The 80386 architecture is organized into multiple units that work together, including prefetch, decode, microcode sequencer, and memory management units.”

— Intel documentation (source reference)

What Remains Unclear

It is not yet clear how fully the z386 implementation can handle all edge cases of the original microcode, particularly under complex or rare instruction sequences. Performance metrics and stability over long-term use are still being evaluated, and the project is actively evolving.

What’s Next

Future steps include optimizing performance, expanding software compatibility, and refining microcode accuracy. Additional testing with a broader range of protected-mode applications and further microcode analysis are expected to follow.

Key Questions

Can z386 run modern x86 software?

No, z386 is designed to emulate the 80386 architecture and is primarily capable of running legacy DOS and protected-mode applications from the era.

How accurate is the microcode reconstruction?

The microcode has been reconstructed based on disassembly and analysis of recovered original ROMs, aiming for high fidelity to the original hardware, but some micro-operations may still be approximated.

Is z386 available for public use?

Yes, the project is open-source and available on repositories like GitHub, allowing enthusiasts and researchers to explore and contribute.

What hardware is needed to run z386?

An FPGA development board capable of supporting the design’s resource requirements (such as a Xilinx or Intel FPGA board) is needed; it does not run on general-purpose CPUs.

What are the main challenges in recreating the 386 microarchitecture?

The complexity of dense microcode, detailed protection and paging mechanisms, and the need for accurate timing and behavior modeling pose significant challenges.

Source: Hacker News

You May Also Like

Data-Hungry AI Models May Spark Nationwide Power Bottlenecks

More energy-intensive AI models threaten to overload our power grids, raising concerns about widespread shortages and infrastructure strain—discover how this challenge unfolds.

Apple greift nach China-Speicher. Europa hat nicht einmal diese Option.

Apple plant, Speicherchips vom chinesischen Hersteller CXMT zu beziehen, während Europa keine vergleichbaren Optionen hat. Die Folgen für die Speicher- und Chip-Industrie sind bedeutend.

In a Quiet Takeover, Coinbase Surpasses Most Traditional US Banks

On the cusp of a financial revolution, Coinbase’s rise raises questions about the future of banking and consumer trust in traditional institutions.