Running DOOM on a Custom CPU Built From Scratch
RunningΒ DOOM on weird obscure hardware is a fun hacker pastime thatβs been around for a long time now. Itβs always enjoyable to see someone port it to an egg timer, or a hat, or whatever else. But what about running the iconic shooter on a CPU of your very own? [Armaan] and [Liam] have done just that.
The CPU in question was designed at the logic gate level, deployed on to an FPGA, and hooked up with the necessary peripherals to run as a going concern. Early testing of the CPU involved running straightforward code to generate Mandelbrot sets and to play a simple game of Pong. But [Armaan] and [Liam] had bigger goals: to port the game that everybody ports to everything. Doing that took some work.
To get DOOM running, the CPU had to get faster, and it needed many tweaks to how memory was handled. There was also work to be done to create a keyboard interface, an HDMI video output, and a hardware timer. From there, the game itself had to then be ported to the custom CPUβs architecture. Eventually, the duo had the game runningβ¦ at a glacial 0.7 FPS. A success, but not the magical end result that was desired. A bump to clock speed and further optimizations and compiler tweaks eventually got the game up to an impressive 15-20 FPS. The goal for future work is to push it to an entirely-playable figure of 30 FPS or better.
Itβs worth checking out the (apparently unembeddable) videos on Instagram to see the CPU in action. Weβve also featured plenty of fun DOOMΒ ports before, too. If youβre brewing up custom CPUs or DOOMΒ ports of your own, keep them coming to the tipsline. The latter in particular is often a wonderful milk run for the writer that happens across it. Happy hacking out there!