A complete independent bare-metal DOOM port for the ESP32-P4 microcontroller. Unlike other versions, this project is fully decoupled from official vendor BSP components, implementing its own lean hardware abstraction layer for maximum performance and control.
- Decoupled Architecture: Removed dependency on
esp32_p4_function_ev_board. All hardware drivers (I2C, I2S, SDMMC) are implemented natively inbsp_p4_eval.c. - SD Card WAD Loading: Full support for loading
.wadfiles from a MicroSD card. The system automatically searches both internal SPIFFS and the SD card. - PPA Hardware Scaling: Internal
320x200rendering upscaled to1024x600MIPI DSI display via the ESP32-P4's Pixel Processing Accelerator, freeing the CPU for game logic. - Micro-Mixer Audio: A dedicated 16-bit PCM Software Mixer broadcasting over I2S to the onboard ES8311 codec for high-fidelity SFX.
- USB HID Support: Direct plug-and-play support for standard USB keyboards.
- Project Structure: Cleaned and renamed entry point to
main.c. - Hardware Abstraction: Custom
bsp_p4_evalhandles:- I2C: Touch (GT911) and Audio Codec (ES8311) control.
- I2S: Standard Philips mode for audio data.
- SDMMC: High-speed 4-line SD card interface.
- Bilingual Cleanliness: Codebase refactored with all comments and logs standardized to English.
The engine features an automatic detection system for game files:
- With SD Card: The system prioritizes reading from the root of a FAT32 MicroSD card. It looks for base games in this order:
doom2.wad->doom.wad->doom1.wad.- Chiquito Mod: If the file
chiquito.wadis placed on the SD card alongside a base game, the engine will automatically load it as a PWAD (-file). This replaces the standard audio with the legendary sounds of Spanish comedian "Chiquito de la Calzada".
- Chiquito Mod: If the file
- Without SD Card: If no SD card is detected, the engine falls back to the internal SPIFFS memory, loading the default DOOM 1 Shareware (
doom1.wad).
The following features are currently missing from this port:
- Network (Multiplayer)
- Music
- ESP32-P4-Function-EV-Board (or custom P4 hardware with similar pinout).
- USB Keyboard (connected via USB-H port).
- WAD Location: Place your
.wadfiles on the SD card or flash them to thespiffspartition. - Compile and Flash:
idf.py build flash monitorDeveloped and optimized for the ESP32-P4 by Alejandro Villegas Alonso. If you are interested in embedded systems, ESP-IDF development, or want to discuss professional opportunities, feel free to connect!
- doomgeneric: The portable engine core by ozkl.
- id Software: The original legends of gaming.
- Espressif Systems: For the powerful P4 chip and IDF framework.
Licensed under GPLv2.