Skip to content

Proof-of-concept NES emulator for the ESP32

Notifications You must be signed in to change notification settings

iot-bus/iot-bus-nesemu

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP32-NESEMU, a Nintendo Entertainment System emulator for the ESP32

This is a forked version of ESP32-NESEMU so that it can be run without changes on an IoT-Bus Io plugged into an IoT-Bus Display.

This is a quick and dirty port of Nofrendo, a Nintendo Entertainment System emulator. Sound does work but not great quality, but can emulate a NES at close to full speed, albeit with some framedrop due to the way the display is driven.

Warning

This is a proof-of-concept and not an official application note. As such, this code is entirely unsupported by Espressif or oddWires.

nintendo.jpg

Compiling

This code is an esp-idf project. You will need esp-idf to compile it.

Display

To display the NES output, please plug an IoT-Bus Io into an IoT-Bus Display. Pins used are:

Pin GPIO
MISO 19
MOSI 23
CLK 18
CS 5
DC 27
RST NA
BCKL 33

Ground and 3V3 are also connected. EN is connected to TFT RESET.

(BCKL = backlight enable)

For now, the LCD is controlled using a SPI peripheral, fed using the 2nd CPU. This is less than ideal; feeding the SPI controller using DMA is better, but was left out due to this being a proof of concept.

Controller

To control the NES, connect a Playstation 1 or 2 controller as (colors may not be the same):

Pin GPIO
CLK 15 BLUE
DAT 14 LIGHT ORANGE
ATT 13 YELLOW
CMD 4 ORANGE

Also connect the power and ground lines. Most PS1/PS2 controllers work fine from a 3.3V power supply.

Sound

Connect a mini-speaker that has an integrated amplifier to pin 26 (DAC).

ROM

This NES emulator does not come with a ROM (game). Please supply your own and flash to address 0x00100000. You can use the flashrom.sh script as a template for doing so. You can download ROMs from multiple locations on the web.

Copyright

Code in this repository is Copyright (C) 2016 Espressif Systems, licensed under the Apache License 2.0 as described in the file LICENSE. Code in the components/nofrendo is Copyright (c) 1998-2000 Matthew Conte ([email protected]) and licensed under the GPLv2.

About

Proof-of-concept NES emulator for the ESP32

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 98.2%
  • C++ 1.6%
  • Other 0.2%