HeadlinesBriefing favicon HeadlinesBriefing.com

Running Doom on a Custom CPU – Viral Success

Hacker News •
×

In a recent viral video, the author and partner Liam showcased Doom running on a custom CPU built from scratch. The 1993 id Software classic, renowned for the phrase “Doom can run on anything,” was ported to a logic‑gate CPU and deployed on an FPGA, drawing millions of views.\n\nThe team started with a simple pipelined design that handled Pong and Mandelbrot. Scaling to Doom required tackling two hard limits: memory and speed.

Doom’s shareware wad is 14 MB, while the FPGA’s BRAM offered less than one megabyte, and the CPU’s throughput lagged ancient.\n\nTo solve memory, the author integrated DDR3 and built a two‑way cache system. The Instruction Cache (ICache) and Data Cache (DCache) each hold 2,048 lines of four words, use a 10‑bit index routed from the word address, and track tags and status bits for validity and dirty state.\n\nThese changes allowed the CPU to fetch instructions, communicate with DDR3, and handle hazards via a Register Usage Map. After overcoming stalls and latency, the custom processor can now run full, published games in real time, proving that Doom truly can run on anything.