Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

107 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ•น๏ธ RetroESP32-P4

Fifteen game consoles and native PC-era shooters โ€” on a single ESP32-P4 microcontroller.

No GPU. No Linux. Bare-metal RISC-V.

RetroESP32-P4 handheld running the NES browser


RetroESP32-P4 is an open-source retro-gaming and application platform built on the ESP32-P4 โ€” a dual-core RISC-V microcontroller with no dedicated GPU. Grown out of a revival of the original RetroESP32, it brings a modern touchscreen launcher, HDMI output, 15 emulators, and native apps that execute from PSRAM โ€” including full Doom and Quake.

The headline: SNES, Genesis/Mega Drive and the mighty NeoGeo all run at 60 FPS.


โœจ Highlights

  • ๐ŸŽฎ 15 emulators โ€” NES through NeoGeo, all with save/load states
  • โšก 60 FPS on the 16-bit heavyweights (SNES, Genesis, NeoGeo)
  • ๐Ÿงฉ Native apps from PSRAM โ€” Doom, Quake, Duke Nukem 3D, OpenTyrian
  • ๐Ÿ–ฅ๏ธ Two builds from one firmware โ€” 4.3โ€ณ touchscreen handheld or HDMI console
  • ๐ŸŽ›๏ธ Any USB gamepad โ€” auto-detected and auto-mapped on first use
  • ๐Ÿ’พ Save states on every core, some accessible in-game
  • ๐Ÿ“ฆ Everything included โ€” firmware, source, SD files, apps, PCB, schematic, and case STLs

๐ŸŽฎ Supported Emulators

Family Systems
Nintendo NES ยท Game Boy ยท Game Boy Color ยท SNES โญ
Sega Master System ยท Game Gear ยท Genesis / Mega Drive โญ
Atari 2600 ยท 800XL / 5200 ยท 7800 ยท Lynx
Arcade & more NeoGeo โญ ยท PC Engine ยท ColecoVision ยท Sinclair ZX

โญ = hand-tuned to hold 60 FPS on the P4.

Atari 2600 and 800XL/5200 support paddle controllers for Breakout, Kaboom! and the like in console (HDMI) mode.

โšก Performance

  • Most systems run at 60 FPS with no frame-skip.
  • SNES / Genesis โ€” locked 60 FPS via a real-time frame pacer (a handful of rendered frames may drop under heavy load; game logic and audio stay at full speed, so play feels perfectly smooth).
  • NeoGeo โ€” 60 FPS, fully operational, fed by a sprite cache with batched bank prefetch.

๐Ÿ’พ Save States

All emulators support Save / Load states โ€” several directly from the in-game menu.


๐ŸŽ›๏ธ Controllers

Plug in any USB controller and automatic button mapping starts on first use.

USB controllers โ€” SNES-style and PS3-style

On the HDMI build, SNES and Genesis map Menu and Volume to L2/R2, so a PS3-style pad works best. Inexpensive clones are widely available.


๐Ÿ–ฅ๏ธ Supported Hardware

1. Guition ESP32-P4 4.3โ€ณ LCD โ€” the handheld

A single 480ร—800 touchscreen module becomes a full handheld (the one pictured up top, in a 3D-printed shell). Available on AliExpress or from Guition.

Guition ESP32-P4 4.3-inch display module

2. HDMI Version โ€” the console

Drive a TV by pairing the Guition ESP32-P4 board with an Olimex LT8912 MIPI-DSI-to-HDMI bridge.

Guition ESP32-P4 development board

Olimex LT8912 MIPI-to-HDMI bridge

โš ๏ธ Use the correct DSI flat cable โ€” a mismatched ribbon will not work. Buy it from Olimex: FPC-15-1.0-150.

FPC-15 flat cable


๐Ÿงฉ Native Apps from PSRAM

Beyond emulators, RetroESP32-P4 runs native applications. A compact app format (PAPP) loads binaries off the SD card, memory-maps them into PSRAM, and executes them in place through a shared, versioned service ABI โ€” so you can add apps without reflashing firmware.

Included:

  • Doom
  • Quake
  • Duke Nukem 3D
  • OpenTyrian
  • Example demo template (build your own)

๐Ÿš€ Getting Started

  1. Format an SD card to FAT32.
  2. Copy the contents of /SDCARD onto it.
  3. Flash the firmware to address 0 using the web esptool:
    • RetroESP32_P4_v1.bin โ€” handheld / LCD build
    • RetroESP32_P4_HDMI_v1.bin โ€” HDMI build
  4. Insert the SD card.
  5. Connect a USB controller (or use the built-in console frame).
  6. NeoGeo only: run the included Python script once to generate the sprite-cache files (script is in the SD-card folder).
  7. Power on, pick a system, and play. ๐ŸŽ‰

๐Ÿง  Under the Hood

  • One image per emulator โ€” each core is its own OTA flash partition; the launcher switches the active partition and reboots straight into the game, so every emulator gets the whole chip.
  • PPA hardware scaler โ€” with no GPU, the P4's on-chip 2D Pixel-Processing Accelerator handles rotation, scaling and format conversion.
  • Execute-in-place apps โ€” the PAPP loader maps SD-card binaries into PSRAM and calls them through a service vtable.
  • Dual-core scheduling โ€” hot paths pinned to internal SRAM/IRAM; the second core carries audio and display so game logic keeps pace.

Silicon: ESP32-P4 ยท dual-core RISC-V @ 360 MHz ยท 32 MB PSRAM ยท 16 MB flash.


๐Ÿ“ฆ Repository Contents


๐Ÿ”ง Roadmap

  • More emulators
  • Better performance
  • More native apps
  • Improved UI
  • Wi-Fi features
  • BLE controllers

๐Ÿ™Œ Contributing

This is only Version 1. Suggestions, testing results, and pull requests are all welcome. If you build one, share a photo!


๐Ÿ“œ Credits

Based on the original RetroESP32 project, revived and modernized for the ESP32-P4. With thanks to:

  • The original RetroESP32 authors
  • The creator of the ESP32-based Atari 800 emulator
  • The SNES and Genesis core authors
  • The author of the NeoGeo (gngeo) Linux port

๐Ÿ“„ License

MIT License.

โญ Support

If you like this project:

  • โญ Star the repo
  • ๐Ÿด Fork it
  • ๐Ÿง‘โ€๐Ÿ’ป Contribute

RetroESP32-P4 isn't just another emulator project โ€” it's a demonstration of how far a modern microcontroller can go when it's optimized correctly.

About

The beloved RetroESP32 ported to the new P4

Resources

Stars

26 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages