A port of PrBoom (Doom engine) to the ESP32-WROVER module with external PSRAM. Play the classic DOOM on an ESP32 with either a direct SPI LCD display or stream video over WiFi.
- Dual Display Modes:
- SPI LCD: Direct output to ST7789V (240×280) or ILI9341 (320×240) displays
- WiFi Streaming: Stream video over HTTP SSE to a Python client
- Serial Keyboard Input: Low-latency input via serial port (115200 baud)
- Full DOOM Gameplay: Complete shareware DOOM experience
- PSRAM Support: Utilizes 8MB external PSRAM for game data
- ESP32-WROVER module (with 8MB PSRAM)
- USB cable for programming and serial input
- ST7789V 240×280 SPI TFT display (recommended), or
- ILI9341 320×240 SPI TFT display
| Display Pin | ESP32 Pin | Description |
|---|---|---|
| GND | GND | Ground |
| VCC | 3.3V | Power (3.3V) |
| SCL | GPIO 18 | SPI Clock |
| SDA | GPIO 23 | SPI MOSI |
| RES | GPIO 21 | Reset |
| DC | GPIO 22 | Data/Command |
| CS | GPIO 5 | Chip Select |
| BLK | 3.3V | Backlight |
- ESP-IDF v5.3+
- Python 3.8+ (for the player client)
- DOOM WAD file (shareware
DOOM1.WADincluded indata/)
git clone https://github.com/AmirhoseinMasoumi/ESP32-DOOM.git
cd ESP32-DOOMEdit sdkconfig.defaults or use idf.py menuconfig:
CONFIG_WIFI_SSID="YourWiFiName"
CONFIG_WIFI_PASSWORD="YourPassword"
Using PowerShell (Windows):
.\make.ps1 build
.\make.ps1 flashUsing Make (Linux/macOS):
make build
make flashUsing ESP-IDF directly:
idf.py build
idf.py -p COM3 flash.\upload_wad.ps1Or manually upload data/DOOM1.WAD to the ESP32's SPIFFS partition.
For LCD display (keys only):
pip install -r requirements.txt
python doom_player.py --keys-only --port COM3For WiFi streaming:
python doom_player.py --port COM3 --ip 192.168.1.xxx| Key | Action |
|---|---|
| ↑ / W | Move Forward |
| ↓ / S | Move Backward |
| ← / A | Turn Left |
| → / D | Turn Right |
| Ctrl | Fire |
| Space | Use/Open |
| Shift | Run |
| Alt | Strafe |
| Tab | Automap |
| Escape | Menu |
| Enter | Select |
| 1-7 | Weapon Select |
Edit prboom-esp32-compat/spi_lcd.c:
#define CONFIG_HW_LCD_TYPE 1 // 0=ILI9341 320x240, 1=ST7789V 240x280#define CONFIG_HW_LCD_MOSI_GPIO 23
#define CONFIG_HW_LCD_CLK_GPIO 18
#define CONFIG_HW_LCD_CS_GPIO 5
#define CONFIG_HW_LCD_DC_GPIO 22
#define CONFIG_HW_LCD_RESET_GPIO 21Default: 40MHz (stable). Can try up to 80MHz with good wiring:
.clock_speed_hz = 40000000,ESP32-DOOM/
├── prboom/ # PrBoom DOOM engine source
├── prboom-esp32-compat/ # ESP32 platform layer
│ ├── spi_lcd.c # SPI display driver
│ ├── doom_stream.c # Video streaming & serial input
│ └── ...
├── prboom-wad-tables/ # WAD data tables
├── main/ # ESP32 main component
├── data/ # WAD files
│ └── DOOM1.WAD # Shareware DOOM
├── doom_player.py # Python client (display + input)
├── make.ps1 # PowerShell build script
├── upload_wad.ps1 # WAD upload script
└── requirements.txt # Python dependencies
- Resolution: 320×200 (scaled to display)
- Frame Rate: ~6-10 FPS (limited by game engine, not display)
- Memory: Uses ~4MB PSRAM for game data
- Check wiring connections
- Verify
CONFIG_HW_LCD_TYPEmatches your display - Try reducing SPI clock to 26MHz
- Reduce SPI clock speed
- Check for loose connections
- Verify 3.3V power supply is stable
- Ensure serial port is correct (
--port COM3) - Check baud rate is 115200
- Close any other serial monitors
- Verify WiFi credentials in
sdkconfig - Check ESP32 IP address in serial output
- Ensure PC and ESP32 are on same network
- DOOM: id Software
- PrBoom: PrBoom team
- ESP32 Port: Based on esp32-doom by Espressif
This project is licensed under the GNU General Public License v2.0 - see the COPYING file for details.
DOOM® is a registered trademark of id Software LLC.