Main Content

Create your handheld gaming console using an Arduino Nano ESP32 and play Doom on the go.

Doom is a classic first-person shooter game developed and published by id Software in 1993. The game is set in a futuristic sci-fi world, where the player takes the role of a space marine who must fight his way through hordes of demons from Hell. Doom is regarded as one of the most influential and popular games ever, spawning numerous sequels, spin-offs, and adaptations. Many gamers who grew up in the 1990s feel nostalgic about playing DOOM when they were younger.

Doom was primarily developed in the C programming language, with a few components written in assembly language. The developers used NeXT computers running the NeXTSTEP operating system. The game’s level and graphical data were stored separately from the engine in WAD files, which stands for “Where’s All the Data?”. This enabled easy modification of the design without altering the engine code.

The original DOOM game required at least 4MB of RAM and 20MB of disk space, which are much larger than the typical microcontroller specifications. To port the game, some compression and optimization techniques are needed to fit the game data and code into the microcontroller’s flash memory and RAM and some modifications and adaptations are needed to make the game engine run on a different platform and architecture, such as an ESP32 or RP2040 chip. However, these changes may introduce some errors or differences in the game’s behavior and performance, which may affect the gameplay experience.

Lately, there have been several efforts to make the game compatible with low-powered microcontrollers. For our project, we’ve opted to use Retro-Go, an open-source firmware that allows retro games to be played on ESP32-based MCUs. While this firmware doesn’t support Arduino Nano ESP32 directly, its flexibility and configurability make it possible to be ported to other ESP32-based MCUs.

Hardware Selection
The main objective of this project is to demonstrate the feasibility and performance of running DOOM on a microcontroller with limited resources and capabilities. In this project, we have ported the classic DOOM game on an Arduino Nano ESP32 and used an Adafruit 2.8” TFT display shield, an M5Stack Joystick unit, and Seeed Grove Dual buttons to make it a handheld gaming console.”

Link to article