NES Dual Port RAM Interface
NES memory replacement that allows live modification of RAM at runtime.
Written in AVR C/assembly.
I've been writing a game recently and was looking for a way to live debug on real hardware. The original solution was to fire variable information out the second controller port to serial every NMI but I decided to to take a shot at a new PCB for the console I've been dreaming about for a while.
Blades of Steel Scoreboard
Contra Relay on Fire
Live Hex Editor
The board routes the left port of the dual port RAM (Cypress CY7C136) to the DIP footprint on the NES and the right port to an AVR (ATMEGA164), this allows me to read and write any location at runtime without bus conflicts. Control is provided through the UART and two additional pins are soldered directly to the 2A03 to control /NMI and /RESET. I took a console and desoldered the 2KB RAM and replaced it with a socket. I'd like to permanently solder this in now that they work but having them removable for debugging was a huge help. AVR control code was written mainly in C with some assembly sprinkled across for the memory control portions.
The AVR sits and wait for serial commands and can perform several functions including:
- Read / write of any memory location
- Quick dump of an entire 256-byte page
- Freezing of memory addresses (rewriting a single value constantly in the busy loop)
- Single frame stepping by controlling the NMI
- Remote reset of console
- Applying auto increment to tables to a single variable (fun for sine waves on x/y positions!)