0% found this document useful (0 votes)
230 views

ESP32 Arduino Based NES Console - Play Nintendo Games

The document describes how to build a homemade Nintendo Entertainment System (NES) console using an ESP32 microcontroller. It lists the necessary components, which include an ESP32 development board, TFT display, SD card reader, audio decoder, buttons, resistors, capacitor, and speaker. It provides wiring diagrams and links to purchase the components. It also provides a download link for the Arduino code used to run NES games from an SD card. Instructions are given for installing libraries, the ESP32 board in the Arduino IDE, and uploading the code to play games on the homemade console.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
230 views

ESP32 Arduino Based NES Console - Play Nintendo Games

The document describes how to build a homemade Nintendo Entertainment System (NES) console using an ESP32 microcontroller. It lists the necessary components, which include an ESP32 development board, TFT display, SD card reader, audio decoder, buttons, resistors, capacitor, and speaker. It provides wiring diagrams and links to purchase the components. It also provides a download link for the Arduino code used to run NES games from an SD card. Instructions are given for installing libraries, the ESP32 board in the Arduino IDE, and uploading the code to play games on the homemade console.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

21/9/23, 1:28 ESP32 Arduino based NES console - Play Nintendo games

Panel Cookies

 HOMEMADE NES CONSOLE 


 15/01/2023 |  VIEWS: 10149 |  ARDUINO (ENG_TUTORIALES_ARDUINO.PHP) |  BY: ELECTRONOOBS
(HTTPS://ELECTRONOOBS.IO/PROFILE/1)
SHARE (HTTPS://WWW.FACEBOOK.COM/SHARER/SHARER.PHP?
U=HTTPS%3A%2F%2FWWW.ELECTRONOOBS.COM%2FENG_ARDUINO_TUT181.PHP&SRC=SDKPREPARSE)

 PREVIOUS TUTORIAL (eng_arduino_tut180.php)

NEXT TUTORIAL  (eng_arduino_tut182.php)

Do you also want to make an old Nintendo console for less than 20 dollars? You could
play thousands of old NES games and get the same nostalgia I had when I’ve played
them once again. All we need are a few components, make some simple connections
for some buttons and other modules, download and then upload NES games to an SD
card, upload the Arduino code and play the games, and obviously, have some fun. I’ve
been testing this project for a long time because I wasn’t able to make the code work,
but I finally did it by trial and error. By the way, this project was made by a user called
Nathalis on GitHub (https://github.com/nathalislight/NCAT). A huge thank you to
Nathalis for his great work, and please consider checking his YouTube channel
(https://www.youtube.com/@nathaliscortex4125). Anyway, that being said, let’s see
what we need, how to adjust the code, how to get NES games for free and make a
crude homemade Nintendo console. So guys, let’s get started.

Support me on PayPal  (https://www.paypal.com/donate?hosted_button_id=6DNT4Z4GAHQ5J)

Support me on PATREON  (https://www.patreon.com/ELECTRONOOBS)

Content has been hidden because cookies are blocked. Allow cookies from: YouTube. Accept all Configure

https://electronoobs.com/eng_arduino_tut181.php 1/17
21/9/23, 1:28 ESP32 Arduino based NES console - Play Nintendo games

 Part 1 - What we need 


The main part running the code is an ESP32 microcontroller but to make it easier to
program and so on, we will use a development board with a USB connector. This costs
only 3 to 4 dollars on AliExpress. Next we need a TFT display and this costs around 3
dollars. I will use one based on the ST7789 IC. Next we need an SD card reader and
this costs around 2 dollars. It could be both the micro SD card or the normal SD card.
The pins are the same. Together with this we also need an empty SD card to put the
games on it. Then, for sounds we need this decoder based on the PCM5102 IC and I
bought this with 5 dollars. To this we can add some headphones. Or even better we can
solder a small amplifier with a speaker so you should also order one like this as well.
Finally, we need 8 push buttons, 8 10K resistors, a 100nF capacitor, wires and a
breadboard to make the connections on. And if you want you could also solder
everything on a prototyping PCB and make it more permanent. Remember that you
could get the design for such prototyping PCB
(https://electronoobs.io/shop/index.php/product/prototyping-pcb-gerbers-only/) from my
website and order it at PCBWAY. Ok so now we have everything we need so let’s
assemble it.

ESP32 Dev Board: LINK Aliexpress (https://s.click.aliexpress.com/e/_DDqB83N)

240x240 1.54" TFT display: LINK Aliexpress


(https://s.click.aliexpress.com/e/_Dd60Ord)

SD card module: LINK Aliexpress (https://s.click.aliexpress.com/e/_DkQw0vV)

Micro SD Card: LINK Aliexpress (https://s.click.aliexpress.com/e/_DFL36Kb)


Content has been hidden because cookies are blocked. Allow cookies from: YouTube. Accept all Configure

https://electronoobs.com/eng_arduino_tut181.php 2/17
21/9/23, 1:28 ESP32 Arduino based NES console - Play Nintendo games

PCM5102 Decoder: LINK Aliexpress (https://s.click.aliexpress.com/e/_DE4RRKP)

8 x Push buttons: LINK Aliexpress (https://s.click.aliexpress.com/e/_DCUAU4J)

8 x 10K Resistors: LINK Aliexpress (https://s.click.aliexpress.com/e/_DFVobiJ)

PAM AMplifier: LINK Aliexpress (https://s.click.aliexpress.com/e/_DBShaYP)

1W Speaker: LINK Aliexpress (https://s.click.aliexpress.com/e/_DkKJwzt)

Prototyping PCB: GERBERs Here


(https://electronoobs.io/shop/index.php/product/prototyping-pcb-gerbers-only/)

 Part 2 - Connections 
The original schematic was something that didn't work for me and it was very difficult to
follow where each connection goes. Finally, the connections that I’ve used are these
ones below. For some reason, If I use any other pin for the push buttons for example,
the code wont work. I don’t know why, but after weeks of trial and error and getting
frustrated, it finally worked. Also, if I remove the 100nF capacitor
Content has been hidden because cookies are blocked. Allow cookies from: YouTube. Accept all
between
Configure
ground and

https://electronoobs.com/eng_arduino_tut181.php 3/17
21/9/23, 1:28 ESP32 Arduino based NES console - Play Nintendo games

the CS pin, the screen would get crazy and even stop working. Another error I’ve
noticed is that sometimes, the start button does the same as the left button, I don’t
know why neither. Anyway, connect everything on the breadboard or on the PCB like in
this schematic. The MISO and MOSI pins for the display must be the ones I’ve used,
otherwise it won’t communicate with the SPI port. Next, let’s take a look at the code.

 Part 3 - Arduino CODE 


Downlaod the code from below. Extract the ZIP file, then open the NeeCat folder and
run the NesCat.ino If you scroll down in the code, you will see that first you need to
install 2 libraries for the display. You can download those from the provided links in
order to make sure that you will use the same I’ve used. Then, in Arduino IDE go to
sketch, include library, add .ZIP library and select one by one the downloaded libraries
in a ZIP format. Now the libraries are installed.

Then, if you don’t have them, you need to install the ESP32 boards. In the Arduino IDE
go to preferences. In the additional URLs you have to copy and paste the link from
Content has been hidden because cookies are blocked. Allow cookies from: YouTube. Accept all Configure

https://electronoobs.com/eng_arduino_tut181.php 4/17
21/9/23, 1:28 ESP32 Arduino based NES console - Play Nintendo games

below. Now go to tools, boards and select boards manager. Here search for ESP32.
Select these boards and click install, and as you can see in the tutorial video, I already
have them installed. And now if you go again to tools, boards, you will see that you now
have a bunch of ESP32 based boards. Select the ESP32 Dev Module board and make
sure you have my same configuration as you can see below. Click compile. If it
compiles, we upload it to the ESP32 board. Click upload and press the boot button, and
keep it pressed till you see the connecting message on the Arduino IDE. Then release
the button and the code will be uploaded. If you power on the console at this point you
will get the SD card fail message. That’s because we have no games inserted.

ESP32 Boards URL: https://raw.githubusercontent.com/espressif/arduino-esp


Copy text

Download NES Console Code  (images/Arduino/tut_181/NesCat-main.zip)

Download Adafruit_GFX Library  (eng_arduino_Adafruit_GFX.php)

Download Adafruit_ST7789 Library  (eng_arduino_ST7735.php)

Content has been hidden because cookies are blocked. Allow cookies from: YouTube. Accept all Configure

https://electronoobs.com/eng_arduino_tut181.php 5/17
21/9/23, 1:28 ESP32 Arduino based NES console - Play Nintendo games

Pin definition
//micro_SD_Card:
#define SOFTSD_MOSI_PIN 12
#define SOFTSD_MISO_PIN 13
#define SOFTSD_SCK_PIN 14
#define SD_CS_PIN 22

#define PIN_UP 2 //IO2


#define PIN_DOWN 15 //IO2
#define PIN_LEFT 39 //VN
#define PIN_RIGHT 34 //IO34
#define PIN_A 21 //IO21
#define PIN_B 26 //IO26
#define PIN_START 35 //IO36
#define PIN_SELECT 36 //VN

//LCD_ST7789:
#define TFT_CS -1 // define chip select pin
#define TFT_DC 5 // define data/command pin
#define TFT_RST 19
#define TFT_MOSI 23 // Data out (SDA) //better not change
#define TFT_SCLK 18 // Clock out (SCL) //better not change

//AUDIO_i2S:
#define I2S_BCK_IO 27 //BCK
#define I2S_WS_IO 32 //LCK
#define I2S_DO_IO 25 //DIN
#define I2S_DI_IO -1

Content has been hidden because cookies are blocked. Allow cookies from: YouTube. Accept all Configure

https://electronoobs.com/eng_arduino_tut181.php 6/17
21/9/23, 1:28 ESP32 Arduino based NES console - Play Nintendo games

 Part 4 - Add NES Games 


So go to this website (https://www.nesfiles.com (https://www.nesfiles.com/)) and search
for any game that you want. Once you find the one you want. click download the NES
file. Then insert the SD card into your PC and make sure it is empty. Create a new
folder and call it NES like this (with upercase). Copy all the NES files that you want
inside that folder. Now get the SD card and insert it into the card reader and restart the
ESP32. Now it works. Use the button to select a game and press start. And now, play
and enjoy. In my case I first select one of my favorites from my childhood called Battle
City. Then I also try the old school MARIO game and tetris. Contra is also one of the
best.

 Part 5 - Full Tutorial Video 

Content has been hidden because cookies are blocked. Allow cookies from: YouTube. Accept all Configure

https://electronoobs.com/eng_arduino_tut181.php 7/17
21/9/23, 1:28 ESP32 Arduino based NES console - Play Nintendo games

So guys, that's how you could make your own NES console and play any game that
you want. Obviously this would go better with a custom made PCB, some better push
buttons and also a 3D printed case, but that will probably be for a future update. By the
way, this project also has an AV video output so you could connect it to an old TV as
we had back in the day with the yellow connector. And again, a huge thank you to
Nathalis for sharing such a project with the community. His work is amazing and brings
me a lot of happy memories.

If my videos help you, consider supporting my work on my PATREON


(https://www.patreon.com/ELECTRONOOBS) or a donation on my PayPal
(https://www.paypal.me/Electronoobs). Thanks again and see you later guys.

Support me on PayPal  (https://www.paypal.com/donate?hosted_button_id=6DNT4Z4GAHQ5J)

Support me on PATREON  (https://www.patreon.com/ELECTRONOOBS)

 15/01/2023 |  VIEWS: 10149 |  ARDUINO (ENG_TUTORIALES_ARDUINO.PHP) |  BY: ELECTRONOOBS


(HTTPS://ELECTRONOOBS.IO/PROFILE/1)
SHARE (HTTPS://WWW.FACEBOOK.COM/SHARER/SHARER.PHP?
U=HTTPS%3A%2F%2FWWW.ELECTRONOOBS.COM%2FENG_ARDUINO_TUT181.PHP&SRC=SDKPREPARSE)

 PREVIOUS TUTORIAL (eng_arduino_tut180.php)

NEXT TUTORIAL  (eng_arduino_tut182.php)

Page 1/1

Content has been hidden because cookies are blocked. Allow cookies from: YouTube. Accept all Configure

https://electronoobs.com/eng_arduino_tut181.php 8/17
21/9/23, 1:28 ESP32 Arduino based NES console - Play Nintendo games

LAST TUTORIALS
RLC Transistor Tester PCB with Arduino

(eng_arduino_tut191.php)

Content has been hidden because cookies are blocked. Allow cookies from: YouTube. Accept all Configure

https://electronoobs.com/eng_arduino_tut181.php 9/17
21/9/23, 1:28 ESP32 Arduino based NES console - Play Nintendo games

ESP32 and Alexa Light control + PCB

(eng_arduino_tut189.php)

Dev Board - OLED control

(https://electronoobs.com/eng_arduino_tut188.php)

Content has been hidden because cookies are blocked. Allow cookies from: YouTube. Accept all Configure

https://electronoobs.com/eng_arduino_tut181.php 10/17
21/9/23, 1:28 ESP32 Arduino based NES console - Play Nintendo games

Homemade EGS002 Full SINE Inverter

(eng_circuitos_tut83.php)

433MHz Radio Light Switch Control - PCB

(eng_arduino_tut184.php)

Content has been hidden because cookies are blocked. Allow cookies from: YouTube. Accept all Configure

https://electronoobs.com/eng_arduino_tut181.php 11/17
21/9/23, 1:28 ESP32 Arduino based NES console - Play Nintendo games

ADVERTISERS

ADVERTISERS

Official Creality
Ender 3 Pro...
$219.99

Shop now

Content has been hidden because cookies are blocked. Allow cookies from: YouTube. Accept all Configure

https://electronoobs.com/eng_arduino_tut181.php 12/17
21/9/23, 1:28 ESP32 Arduino based NES console - Play Nintendo games

(https://www.pcbway.es/?from=electronoobs.com00)

Content has been hidden because cookies are blocked. Allow cookies from: YouTube. Accept all Configure

https://electronoobs.com/eng_arduino_tut181.php 13/17
21/9/23, 1:28 ESP32 Arduino based NES console - Play Nintendo games

(https://s.click.aliexpress.com/e/_9jqPR0?

bz=300*250)

Content has been hidden because cookies are blocked. Allow cookies from: YouTube. Accept all Configure

https://electronoobs.com/eng_arduino_tut181.php 14/17
21/9/23, 1:28 ESP32 Arduino based NES console - Play Nintendo games

(https://bit.ly/2ZNWgqy)

Content has been hidden because cookies are blocked. Allow cookies from: YouTube. Accept all Configure

https://electronoobs.com/eng_arduino_tut181.php 15/17
21/9/23, 1:28 ESP32 Arduino based NES console - Play Nintendo games

(https://s.click.aliexpress.com/e/_AF7EeE?

bz=500*500)

(https://bit.ly/2ZNWgqy)

TUTORIALS
Arduino (eng_tutoriales_arduino.php)
Circuits (eng_tutoriales_circuitos.php)
Robotics (eng_tutoriales_robotica.php)
Arduino Course
(https://electronoobs.io/shop/index.php/courses/curso-arduino-
desde-cero-nivel-1)
Blogs (blogs.php)

Content has been hidden because cookies are blocked. Allow cookies from: YouTube. Accept all Configure

https://electronoobs.com/eng_arduino_tut181.php 16/17
21/9/23, 1:28 ESP32 Arduino based NES console - Play Nintendo games

SUPPORT
Terms and Conditions (terms_and_conditions.php)
Privacy Policy (privacy_policy.php)
Contact me (eng_contacto_mobile.php)
Forum (https://electronoobs.io/forum)

ADVERTISERS
Donate (eng_donate.php)
Reviews (eng_reviews.php)
Advertising (eng_advertising.php)

ELECTRONOOBS Copyright ©2023, All rights reserved | Terms


and Conditions (terms_and_conditions.php) | Privacy Policy
(privacy_policy)

Content has been hidden because cookies are blocked. Allow cookies from: YouTube. Accept all Configure

https://electronoobs.com/eng_arduino_tut181.php 17/17

You might also like