← Retour au blog
tech 24 May 2026

z386: An Open-Source 80386 Built Around Original Microcode

Explore how the z386, an open-source FPGA CPU, reinvents Intel's 80386 using original microcode. Performance, architecture, and implications for developers.

The Rise of z386: A Step Backward, Two Steps Forward

In a world where technological advancements are often measured at the speed of light, projects like z386 offer a refreshing take by revisiting the past to better understand the future. This ambitious open-source project, led by nand2mario, aims to recreate a 80386 CPU leveraging Intel's original microcode. The z386 is not just a digital archaeology exercise but an initiative to make this technology accessible and educational.

Why the 80386?

Launched by Intel in 1985, the 80386 marked a significant leap in x86 architecture. It introduced protected mode and virtual memory, concepts still relevant in modern computing. By recreating this processor, the z386 project provides a unique opportunity to explore these foundational concepts with a modern perspective.

The z386: A Blend of Old and New

The z386 uses an FPGA-based approach, meaning it can operate at speeds far exceeding the original 80386s. With a clock speed reaching 85 MHz, this open-source CPU compares to a fast (~70 MHz) 386 or a low-end 486, albeit with slightly less efficient CPI (cycles per instruction).

Comparison with ao486

In terms of performance, the z386 is often benchmarked against the ao486, another similar project. For instance, the z386 uses 8K lines of code versus 17.6K for the ao486, and 18K ALUTs compared to 21K for the ao486. While slightly lagging in some benchmarks, such as FPS for Doom (16.5 vs. 21), the z386 excels in efficiency and design simplicity.

Architecture and Design

The z386 retains many hallmark structures of the 80386, such as the 32-entry TLB and ROM/PLA decoder, while incorporating modern optimizations like DSP blocks for multiplication. The L1 cache, for example, is 16KB, 4-way set-associative, a judicious choice for maintaining high clock speeds.

The Role of Microcode

The original microcode plays a central role in the functioning of the z386. With a 37-bit wide, 2,560-entry microcode ROM, it allows for faithfully replicating the original processor's behavior while using FPGA-friendly shortcuts where relevant.

Real-World Applications and Implications

The z386 can run historical software such as DOS 6 and DOS 7, as well as protected-mode programs like DOS/4GW. Additionally, it can run iconic games like Doom and Cannon Fodder, offering both a playful and educational platform for developers and retro-gaming enthusiasts.

Conclusion

By revisiting the 80386 with modern tools, the z386 paves the way for new explorations in CPU architecture and low-level programming. It's a technical and educational adventure that deserves the attention of developers and tech industry decision-makers. Let's discuss your project in 15 minutes.

z386 80386 microcode FPGA open-source CPU
Deepthix newsletter · 100% AI · every Monday 8am

An AI agent reads tech for you.

Our AI agent scans ~200 sources per week and ships the best articles to your inbox Monday 8am. Free. One click to unsubscribe.

Visit the newsletter page →

Want to automate your operations?

Let's talk about your project in 15 minutes.

Book a call