Hardware29.03.2022

We played Doom on a R70 Raspberry Pi Pico with only 2MB of storage

MyBroadband successfully played Doom ported to a Raspberry Pi Pico using guidelines provided by Graham Sanderson, also known as Kilograham.

The Raspberry Pi Pico is a microcontroller with a dual-core ARM Cortex-M0+ processor, 264KB of RAM, and 2MB of flash storage. The device costs R69.90 in South Africa.

With only 2MB of storage, most people assume using the Raspberry Pi Pico for gaming is impossible. They are wrong.

Graham managed to recompress the shareware version of Doom and everything needed to make it run on the Pico into the 2MB of storage. There is even space left to save games.

Doom is a first-person shooter game developed in 1993 and is famous for being unofficially ported to many unexpected devices.

The final Raspberry Pi Pico product includes a USB input library for a keyboard by running the Pico as a USB host.

It outputs video directly to VGA through a resistor network digital to analogue converter. You can also hook up sound through an I2S connection.

Setting up the project requires hardware work, either by soldering or utilising a breadboard. You also need to do some software configuration.

Two files need to be flashed to the Pico, both available from Graham’s GitHub:

  • doom_tiny_usb.uf2 – The main program allowing the Pico to run Doom, including drivers
  • doom1.whx – The compressed version of the shareware Doom game

The uf2 file is easily flashed to the Pico by copying it to the microcontroller in BOOTSEL mode from a PC.

The whx game file needs to be flashed to a specific point in the flash storage on the Pico, depending on the version of the uf2 file.

It can be done with Picotool, which needs to be built by the user.

On the hardware side, you need:

  • A DAC to convert the digital colour outputs to a suitable analogue value in the VGA standard
  • Two resistors on the sync wires
  • A USB OTG adapter to plug in a keyboard
  • A 5V power supply

The 5V power supply can power the Pico and USB devices when connected to the ground and VBUS on the Pico.

We used 1KΩ and 8.2KΩ resistors on their own, in series and in parallel to get values close to those in the official Raspberry Pi documentation to get a VGA output.

The schematic for the VGA output is shown in the picture below.

We wired the RGB, sync and ground lines into a 15-pin D-SUB connector so that we can easily plug it into a monitor.

We also used an active VGA to HDMI converter to play on HDMI screens in the office.

We initially did not get video output and noticed that we had an incorrect ground connection that shorted out lines when plugged into a monitor.

After fixing this, we were greeted with the Doom demo playing on the screen and were able to jump straight into the game after connecting a USB keyboard.

We were surprised to find that a wireless Microsoft keyboard also works, as the documentation says that wireless input devices may cause issues.

We were even able to play on the 75-inch television in the Broad Media training room.

While we did not implement the I2S audio or the multiplayer over I2C, these options are available should you wish to set up a cheap 4-person multiplayer Doom station.

Graham also has a detailed blog post about the project available here.


Now read: I built a Wi-Fi handshake grabber using a Raspberry Pi Zero — with scary results

Show comments

Latest news

More news

Trending news

Sign up to the MyBroadband newsletter