ROM-Reader for Super Nintendo / Super Famicom Game Cartridges

Yep that fixed it. Thank you very much. :slight_smile:

Never would have guessed that in a million years. Already build a second flasher following the design by Reiner Ziegler to confirm my custom build flashcart is working fine. Read through the 29F033 datasheet and the MBC5 reference again, couldn't find anything that made 0x2A8000 so special. That would have been a tough nut to crack :o

Yay, received the cart reader two days ago, and it works flawlessly :slight_smile:
Read rom and saved file of one of my carts, had to byteswap the save file but now it loads fine!

Will backup some more tomorrow.

erendorn:
Yay, received the cart reader two days ago, and it works flawlessly :slight_smile:
Read rom and saved file of one of my carts, had to byteswap the save file but now it loads fine!

Will backup some more tomorrow.

All done except "Turok Rage Wars", is this something I can solve?

Just added Turok - Rage Wars (Europe) (En,Fr,It) to the database (n64.txt file on sd card).

Got my reader today. Built it up and it seems to work fine. Only issue I am having is the sram for snes games is not working in emulators. I know that n64 needed byte swapped but does that need done for snes as well?

Actually I do not think it is even reading the sram correctly, sure it is writing it but in my tests I used ff6j to read a 24 hour save and wrote it to another ff6j cart and when testing the game out the save was at the begging of the game. Is there something special that I need to do in order to get sram reading/writing working in this case?

Syco54645:
Got my reader today. Built it up and it seems to work fine. Only issue I am having is the sram for snes games is not working in emulators. I know that n64 needed byte swapped but does that need done for snes as well?

Actually I do not think it is even reading the sram correctly, sure it is writing it but in my tests I used ff6j to read a 24 hour save and wrote it to another ff6j cart and when testing the game out the save was at the begging of the game. Is there something special that I need to do in order to get sram reading/writing working in this case?

There is no need for any byte swapping for SNES saves. At least to my knowledge.

Can you download this ff6j save and write it to your spare FF6J cart and test it in a Snes console?
It works for me.
If it also works for you then try to read the save back and compare it with an hex editor to the downloaded save to see if it was read back ok.
Finally with your spare FF6 cart try out the Snes sram test and see if it passes.

If it does not then the easiest explanation would be that there are slower Snes sram chips out there than the ones I tested and that I made reading the save too fast for some carts and need to add more delays.
Or there is a hardware error that prevents the cart select pin from going high like a short to GND.

Well it seems to have wrote just fine to the spare ff6j that I have, however upon reading the file back off I get a different md5sum. However it is the same in a hex editor. I then got excited and tested the file in an emulator and it works fine, as a last test i read my save from the ff6j that I am playing on and loading it up into an emulator and it works fine.
The only difference is I am now powering it from the arduino rather than the port on the cart reader but I had read that is not ideal. Was tired last night so did not think to try that out. Could that be the reason for the issues I was having?

Is the voltage jumper switched to 5V? Because you need 5V for Snes.
It's not bad to power it from the usb port on the Arduino, it's just for N64 you need 3.3V and that you can only get if you use the port on the back of the cartreader and switch the voltage to 3.3V

sanni:
Is the voltage jumper switched to 5V? Because you need 5V for Snes.
It's not bad to power it from the usb port on the Arduino, it's just for N64 you need 3.3V and that you can only get if you use the port on the back of the cartreader and switch the voltage to 3.3V

Oh this I did not know. I read the entire wiki but did not see mention of that.

In looking at the code I did not see where you defined the pins for the actual cart reading, granted I only looked at it briefly, was going to try my hand at adding some stuff. Is there a way to reconfigure the pins for reading carts on the fly or is must that stay static?

I'm directly addressing to the pins via the DDR, PIN and PORT registers. You can find an overview on how the pins are connected here: https://github.com/sanni/cartreader/blob/master/pinout.xls

Every module is using its own pin configuration defined in its setup_XX() function.
Example:

void setup_N64_Controller() {
  // Output a low signal
  PORTH &= ~(1 << 4);
  // Set Controller Data Pin(PH4) to Input
  DDRH &= ~(1 << 4);
}

Would be the same as this in a more traditional Arduino sketch

int dataPin = 7;

void setup(){
  // Output a low signal
 digitalWrite(dataPin, LOW); 
  // Set controller data pin to input
 pinMode(dataPin, INPUT);
}

This is an awesome project and I'd like to thank you for making it open source.

I'd really like to build myself one, but as an unexperienced user that only knows how to solder and has never used an arduino, I feel like the current desing is completely out of my possibilities.

I'm mostly interested in n64 cart dumping (basically savegames), so my question is, can the project theoretically be reduced to as simple as the arduino + the slot for the n64 carts and dump the file via usb cable to a computer?

I know that most likely some components would still need to go in between the arduino and the cart connector.

Also, would omiting rom dumping and only focusing onto save read/write reduce soldering/components?

Best regards

The N64 cartridge port is directly wired to the Arduino Mega, there are no components inbetween. You can check the pinout.xls on my github to see what connects to where. Just connect everything with wires.
The only other thing you need is a SD card. You could directly wire a micro sd adapter to the Arduino and use it as an sd slot.

Then you change the code like this:

// If you don't have an OLED screen change
// enable_OLED to 0 and enable_Serial to 1
#define enable_OLED 0
#define enable_Serial 1

And it will output to the Arduino Serial Monitor

Ofc you can also rewrite my project so it sends the data over the serial monitor too instead of saving it to the sd card.

Thank you for your quick response. If it is directly wired then I really can build one myself. The sd adapter is cheap enough, so I might just go for it, but seems it may be easy to send the read file over the monitor instead of writing to sd card.

The most expensive component seems to be the edge connector (unless I could find a broken n64 maybe...), but since this is not intended for a n64 replacement, would another edge connector just do the work?
I've seen 56 way connectors for 1/3 of the n64 one (and even lower prices) and I wonder if that would work just fine if I just cut a bigger one, just like people do for zx spectrum as you may see here: https://www.tindie.com/products/TRC/zx-spectrum-edge-connector/)

edit: just noticed the link in the wiki is for a 10 unit pack, but I can't find anywhere selling single units.

Yes it's super easy to send the save over to the serial monitor.
Just remove all the sd error code like this one for example

  //open file on sd card
  if (!myFile.open(fileName, O_RDWR | O_CREAT)) {
    print_Error(F("Can't open file on SD"), true);
  }

and replace all the "myFile.write" with "Serial.write".

Then you can just copy the save out of the serial monitor windows into a file using a hex editor.
I want to write a simple Windows GUI for the cart reader at some point too.

This connector also works if you make absolutly sure that you insert the cartridge centered. This is because the N64 slot has a 2mm pin spacing while all the other non-Nintendo slots have 2.54mm.
http://www.ebay.com/itm/5pc-Industrial-Card-Edge-Slot-Socket-Connector-25x2P-50P-2-54mm-0-1-3A-RoHS-/140888533934

You can always search at a real parts distributor like Digikey.com or Mouser.com to find the right connector.

Awesome work with this stuff sanni (and all others that contributed)!

I have a question with regards to the possibility of writing different chips to the SNES. You have support for the 29F032 and others, is it possible to add support for a 29GL064 (8Mbyte)? (datasheet here: http://www.cypress.com/file/202426/download)

That would enable people to write games larger than 4Mbyte for Exhirom, or even to write multicarts using that chip. If coding for the 29GL064 was supported, that could enable use of the 29GL032 (4Mbyte), or maybe even the 29GL256P (32Mbyte)?

That's a 3V part. Not a good idea to use it in a SNES.

There's only so much address space available before you need to add some type of microcontroller.

skaman:
That's a 3V part. Not a good idea to use it in a SNES.

There's only so much address space available before you need to add some type of microcontroller.

Someone could just use level shifters or resistor buffers to handle the voltage differences.

And I saw that there are N64 pirate carts that use the 29GL256 chips sold on Aliexpress right now. Would be pretty awesome to be able to dump and rewrite those.

sanni is looking into the N64 repro. I'll help after I get my repro cart if he hasn't figured it out by then.

Just uploaded the code for re-writing the N64 repros. It's still a little rough and slow. But I'm sure we will get it faster without much hassle. Especially after all that we have been through so far looks at SF Memory cart :slight_smile: