Tang Nano 9k NES core written in System Verilog with nestang Dual Shock 2 Interface.
Implemented for a Tang Nano 9k taking ~6.5k LUTs, and can be modified to have bluetooth gamepads by using blueretro Project, if you want to do so, check out docs folder.
This part is optional, you will need an ESP32 with a Dualshock 2 blueretro firmware.
Check out the Project Constraint File, but if you won't build from source or do any modifications you can make this wiring:
Tang Nano 9k | ESP32 | Dualshock 2 Interface |
---|---|---|
25 | D33 | CLOCK |
26 | D32 | COMMAND |
27 | D19 | DATA |
28 | D34 | ATTENTION |
*I personally recommend adding some terminating resistors (from 50 to 120 ohms) in these wires to avoid reflections.
Just binary write the NES rom (in iNES format) into the microSD card in raw data.
If you flash using dd command in linux, make sure the entire binary will fit 512 bytes block by padding the remaining space with any data.
I recommend using a binary editor tool as ImHex or make a script to do that job.
You will need GoWin Official EDA, follow these steps:
- open the project gprj file
- make the top entity to be
NES_TN9
module - select
System Verilog 2007
to be the project synthesizer - run Synthesize, then Place and Route tools
- flash the
.fs
file