How to Build a Performant Handheld NES on the ESP32 for Less Than $15

by ShimManaloto in Circuits > Gadgets

409 Views, 0 Favorites, 0 Comments

How to Build a Performant Handheld NES on the ESP32 for Less Than $15

How I Made a Handheld NES on a $1 CPU

Ever wanted a handheld NES you could carry in your pocket? This guide will walk you through building one using the Anemoia-ESP32— an open-source NES emulator that runs on the ESP32. No programming experience required.


Anemoia-ESP32 is a rewrite and port of the Anemoia Nintendo Entertainment System (NES) emulator running directly on the ESP32. It is written in C++ and is designed to bring classic NES games to the ESP32. This project focuses on performance, being able to run the emulator at native speeds (~60FPS) with frame skip and with full audio emulation and save states implemented.


Full Project & Source Code

All schematics, PCB files, CAD files, and source code are fully open-source and available on the Anemoia-ESP32 GitHub repository.

Supplies

Anemoia-ESP32 requires a dual-core ESP32 with a minimum of 1 MB flash memory and NO PSRAM IS REQUIRED.


- ESP32

- e.g. ESP32-DevKitC or ESP32-WROOM-32

- A 320x240 SPI TFT screen (no touch needed)

- Either an ST7789-based screen as depicted, or

- an ILI9341-based screen with 320x240 pixels

- Audio Amplifier

- e.g. a PAM8403 or PAM8302

- Speaker

- MicroSD card module

- 8 Tactile push buttons, or

- Supported Controller

- NES controller

- SNES controller

- PS1 controller

- PS2 controller



All parts can be found on AliExpress. These are the recommended parts to use for this project.

These are affiliate links. Buying through them helps support me at no extra cost to you. Thank you for your support.


- ESP32

- 240x320 ST7789 Display

- PAM8403 Amplifier Module

- MicroSD Card Module

- TP4056 Charging Module

- S09 Buck Converter

- SS12F17 Slide Switch

- 12×12×7.3mm Tactile Push Buttons

- 40mm Speaker


You'll also need a LiPo battery, a MicroSD card, and a USB-C cable for flashing.

Assemble the Hardware

Connect all the components together following the pin setup in the Anemoia-ESP32 GitHub repository. The build is straightforward — you're mostly just connecting modules together. No complex soldering required.


TFT Display

MOSI → GPIO23

MISO → N/A

SCLK → GPIO18

CS → GPIO4

DC → GPIO2

RST → EN


MicroSD Card Module

MOSI → GPIO13

MISO → GPIO12

SCLK → GPIO14

CS → GND


Audio Amplifier

Input → GPIO25


Buttons

A → GPIO19 & GND

B → GPIO26 & GND

Left → GPIO32 & GND

Right → GPIO33 & GND

Up → GPIO15 & GND

Down → GPIO5 & GND

Start → GPIO27 & GND

Select → GPIO16 (RX2) & GND


Prepare Your MicroSD Card

format.png
  1. Format your MicroSD card to FAT32
  2. Place your .nes ROM files in the root of the MicroSD card
  3. Insert the MicroSD card into the MicroSD card module


Checking Game Compatibility

To check if a specific game is supported, visit the Compatibility section in the Anemoia-ESP32 GitHub repository.

Flash the Firmware

Screenshot (1944).png

This is the easiest part. No software installation or compiling needed.

  1. Open Chrome, Edge, or Opera on your computer (Firefox is not supported)
  2. Visit the Anemoia-ESP32 Web Flasher
  3. Connect your ESP32 to your computer via USB
  4. Click Flash and select your ESP32's COM port
  5. Wait for the flash to complete

That's it. The firmware is now on your device.


For those who want to compile manually or modify the code. Full instructions are in the How to Build and Upload section of the GitHub repository.

Power on and Play

Screenshot (1943).png

Power on the handheld and you'll be greeted with a file select menu showing all the ROMs on your MicroSD card. Select a game and start playing.

To access the pause menu at any time, press Start + Select simultaneously.