Arduboy-on-a-NES-cartridge

#1

So, what I have gone and done here is basically create a potential Arduboy-on-a-NES-cartridge.

A basic NES cartridge just has two ROM chips - one for the program (PRG), and one for the character / tile data (CHR).

I have designed a shield for the Arduino Mega 2560 that substitutes two dual-port RAM chips in place of these ROM chips, and a breakout board to connect the necessary signals to the NES cartridge port.

The 2560 accesses the CHR-RAM chip via its built-in XMEM (eXternal MEMory) interface, which means that taking the Arduboy’s screen buffer and translating it into tiles to be displayed on the NES is just a matter of shifting data around in RAM from the 2560’s perspective.

On the NES side, I have written some code that simply displays these tiles on screen, and also reads input from the NES joypad and stores the button states into an unused byte of CHR-RAM for the 2560 to access like so:

uint8_t Arduboy2Core::buttonsState()
{
    tileptr = reinterpret_cast<uint8_t *>(0x6000); // check controller input
    return *tileptr;
}

The tiles are being continually updated by the 2560 from the Arduboy screen buffer, all the NES has to do is display them.

The NES program code is stored in PROGMEM and uploaded to the PRG-RAM chip on start-up. PRG doesn’t have to be dual-port RAM though, it could just be an EEPROM. But this certainly made testing easier!

Sound is just a single Arduino pin going through a resistor into a pin on the NES cartridge port that is commonly used for feeding in external audio (EXP6). Theoretically though, you could send sound parameters into the NES using unused CHR-RAM space and then write code on the NES side to have these parameters control the NES audio channels…

Of course you could also forget the Arduboy screen buffer entirely and write new Arduino libraries to use the ‘traditional’ tile system of the NES.

There is definitely more information to be explained here, and I am happy to answer questions, but for now I am just really excited to actually have a proof-of-concept that I can share!

Can’t wait to play Arduventure on this thing!! :slight_smile:

20 Likes

VGA1306 plus NES Controller
Super Arduboy
Arduino Gameboy Cartridge?
Arduino Gameboy Cartridge?
Is it possible to put a Arduboy game on another Arduino?
Screen mirroring on a clone, and outputting to a TV via the TVOut library
Arduventure - 12th TEAM a.r.g. game
(Boti Kis) #2

Oh my, this is one of the most amazing things i have ever seen here. well done!

3 Likes

#3

Cool Arduino shield :+1: It’s awesome to seen Arduboy on a NES. This gives me the idea for an OLED to Arduino TV out emulator.

4 Likes

(Pharap) #4

I suddenly wish I owned a NES.

1 Like

(Erwin) #5

So awesome! imagine Arduventure as a nes catridge xDD

1 Like

(Kevin) #7

What is this, no, really? Stop.

@uXe we have to show this off at an event some time!!! WOW!

4 Likes

(Celine) #8

Yay! You got featured on Hackaday @uXe ! https://hackaday.com/2017/11/20/dual-port-ram-nes-cartridge/

5 Likes

#9

If you were to make this into a cartridge you can insert into the NES, this would be a programmable cartridge.

0 Likes

#10

Oh wow! This is nothing short of amazing! The NES is my favorite console by far!

0 Likes