Doom comes to Raspberry Pi Pico

When I was seventeen years old, I went to work for IBM for a year. IBM’s pre-university employee (PUE) program was a marvel: run by Ian Nussey out of his Warwick Development Group (WDG – pronounced “wudge”), it took in roughly sixty students a year, and gave them a chance to do real work (God help you if you tried to use a PUE to make coffee or mind the photocopier) at a first-rate technology company. I was lucky enough to be offered one of a handful of roles in the WDG itself.

I arrived on my first day, in my brand-new suit, and found an office full of similarly attired engineers. But one chap in the corner was wearing jeans, a t-shirt, and a sky-blue baseball cap emblazoned with a “Start” button (blasphemy at the height of the OS/2 versus Windows war); and it became clear pretty fast that he could do this because he was one of the brightest people in a room of pretty bright people. His name was Graham Sanderson.

You came here for Doom on a Pico. We’ll get to that, promise

Graham and I have been friends ever since. Meeting him changed my life in a variety of ways: I stopped wearing suits; I quickly learned a lot about Intel assembly language, texture mapping, VGA unchained mode, and the DOS/4GW 32-bit DOS extender; he found me summer vacation work at his first startup in Austin; and many years later I was able to return the compliment by hiring him to run the software effort for what would become RP2040.

Graham’s had a busy year at work since we launched Raspberry Pi Pico in January last year, refining the Pico SDK. But he’s been busy in his spare time too, and now he’s released the fruits of that work: a port of the PC version of Doom to Raspberry Pi Pico. We’ve seen the much simpler Game Boy Advance version running on Pico in the past, but this is the real deal: it’s able to run the original PC WAD files, with the original audio, and as you can see from the video below, it even supports four-player network games over I2C. The executable, and a compressed version of the original shareware WAD, fit into Pico’s 2MB flash memory.

Graham has written up the development process in considerable detail here. Doom might seem like a frivolous application, but it demonstrates just how powerful RP2040 can be in the hands of an experienced user. It offers plenty of memory and integer compute performance; flexible I/O, used here to drive a VGA monitor and interface to a USB keyboard; and, critically, the ability to simultaneously drive every element of the chip hard without tripping over yourself.

With RP2040 now available in single-unit quantities for $1, and in volume from 70 cents, what will you find to do with it?


Vangelis Pappas avatar

Wow! Impressive story and result. I always loved texture mapping and the flexibility of it! More than nce I enjoyed experimenting with the effects of ‘scrolling’ textures. I guess that was the first step for dynamic lighting and later on shaders.

Jose Commins avatar

I have read Graham’s post – it is a fantastically detailed description which will inspire many to boost their abilities.
Projects like these highlight the practical uses of often dark corners of a system’s ability (e.g. the hardware interpolator, divide etc) and great feedback for SDK development.
Plus it’s badass!

solar3000 avatar

What! **bang head into wall** Next project is to play doom on a toaster. What? That was already done?

Al Stevens avatar

Astonishing that this has been achieved in only slightly more RAM than my BBC Master had … in 1989!

Steve Powers avatar

Not a ‘Pico’, but Dragon’s Lair on a ‘Zero’ is also quite impressive.

Tony Abbey avatar

Wow! Perhaps we can use the Pico or some custom boards with RP2040’s as the logic analysers we need at TNMOC for EDSAC, which you have seen, Eben. If the devices are powerful enough to play Doom, then presumably the device with its VGA interface could run sigrok/PulseView and drive a screen, so we wouldn’t need a laptop to analyse the signals?

Chris Meggs avatar

I hate and admire people like this in equal quantity. The reason for admiration must be obvious to any neophyte programmer; my hate boils up from my singular ability to get anything from inception to market place. Annoyingly, the choice of projects is undeniably not constrained by the capabilities of the hardware, it’s design or production. I believe that future successes will be awarded to solution architects – people who can envisage various combinations of components to achieve the seemingly impossible.

Alfie avatar

I have a pico and a pi and the pi is connected to my tv, using some clever wiring. I am able to play Minecraft pi edition in 2648 bit graphics. I am also able to use the tv like a laptop as it has DuckDuckGo and scratch 1,2,and 3.
I coded in to minecraft a whole other dimension, game physics and new items. Is it possible to play Minecraft 1.20 on the raspberry pi? P.S i am writing a biography of eben Upton

Comments are closed