Go Down

Topic: ROM-Reader for Super Nintendo / Super Famicom Game Cartridges (Read 211718 times) previous topic - next topic

sanni

I tried to figure out the pinout of a Nintendo Power cart, maybe you find it useful. There might be still some errors left in the schematics though.

Gargamel13

Nice work, sanni!

I'll have to post a complete version of my reader code.  The reader code should support all of the enhanced chip carts.  I was hoping to include full support for the Nintendo Power (SF Memory Cassette) carts but the NP carts are finicky (even more than the SA-1 carts).  If I can't manage to get the NP cart working 100%, then I'll post a version with everything but the NP code. 

The biggest problem I'm having with the NP carts is I cannot consistently get the cart to switch to a single game.  Switching to a single game is important as that is the only way to see and dump the SRAM.  Once the cart becomes a game, then the processor will map the savegame to the normal SRAM location.  I've written all of the code even added a menu for the multi-game but the timing on getting the cart to switch is hit-or-miss.  I've dumped all of my NP carts but it takes multiple tries to get each game done.

I also have to do more testing as I recently got a NP cart with a combination of LoROM and HiROM games and I want to confirm the mapping for the HiROM game.  It appears that the HiROM game is mapped like a LoROM game including the SRAM.  I'll have to do more testing to be sure.
Will it include the saving and writing of SRAM (your completed work)?  Thanks for your efforts!

skaman

Dumping the SRAM on the NP cart is definitely possible.  I've dumped all the savegames off of my NP carts.

For a single game NP cart, then the SRAM should be visible.

For a multi-game NP cart, you need to enter the command sequence to set the cart to a game then the corresponding savegame becomes accessible in the SRAM.

I haven't tried to write the SRAM yet.  I'll have to give it a try sometime.

I'm waiting on a bunch of NP carts to arrive from Japan to do more testing on.


AngryHelder

Anyway you could release the code you have up to now and maybe give us an update when you got the NP carts all figured out? I'd love to build me one of these with your code and maybe even make a custom PCB for this project.

skaman

Here's the code with support for the Enhanced chip carts for sanni's cart reader:
http://www.mediafire.com/download/e76feeya77rb3q7/Cart_ROM_READER_SNES_ENHANCED.zip

I've included the SDFat library with long filename support and the Si5351 library for the Adafruit Clock Generator.  If this is your first build, then you'll also need the other libraries that sanni included (LCD, RGB, DigitalIO).

A few notes on the hardware modifications:

The Adafruit Clock Generator is needed for SPC7110 and SA-1 carts.  The clock generator uses CLK0 to generate the 21.477272MHz master clock signal that is connected to Pin 1 of the cart connector.  CLK2 outputs the 3.072MHz CIC clock signal which is wired to the CIC clk in on the snesCIC/SuperCIC chip.

The snesCIC/SuperCIC has the CIC host reset and CIC lock reset connected to Arduino pins 6 & 7, respectively (although I haven't implemented any code for the CIC host reset in this version).  The remaining CIC connections are wired to the appropriate pins on the cart connector.

As of right now, the snesCIC/SuperCIC is only really necessary for SA-1 carts.  There's a possibility that the Nintendo Power (SF Memory Cassette) carts need the CIC but my best results with my current NP code is without the CIC (and clock).

One last item, some of these enhanced chip carts are extremely sensitive to how the power is supplied.  If a cart is not being recognized, then check your power supply and/or try a different connection.

I forgot to specify that we use the snesCIC/SuperCIC LOCK code.
snesCIC resync lock:  https://github.com/mrehkopf/sd2snes/blob/develop/cic/snescic-lock-resync.asm
snesCIC resync lock (HEX):  https://github.com/mrehkopf/sd2snes/blob/develop/cic/snescic-lock-resync.hex
SuperCIC lock:  https://github.com/mrehkopf/sd2snes/blob/develop/cic/supercic/supercic-lock.asm

Please post any improvements made to the code.

Good luck!

skaman

Pictures of the snesCIC/SuperCIC.  Sorry for the dust!


sanni

I've made a pcb for it, since I didn't want to rewire my old build for adding the full lenght slot. It should arrive in 2 weeks time. Well worth the saved time compared to wiring everything per hand.



If you have a closer look you will notice that I changed all the pins around. This is so that the address and data lines are grouped together on one port which will in theory give an insane speed boost since you can just do:

Code: [Select]

PORTC = myData;


instead of:

Code: [Select]

void writeData(byte myData) {

  if ( (myData & 1) == 1 ) digitalWrite(d0Pin, 1); else digitalWrite(d0Pin, 0);
  if ( (myData & 2) == 2 ) digitalWrite(d1Pin, 1); else digitalWrite(d1Pin, 0);
  if ( (myData & 4) == 4 ) digitalWrite(d2Pin, 1); else digitalWrite(d2Pin, 0);
  if ( (myData & 8) == 8 ) digitalWrite(d3Pin, 1); else digitalWrite(d3Pin, 0);
  if ( (myData & 16) == 16 ) digitalWrite(d4Pin, 1); else digitalWrite(d4Pin, 0);
  if ( (myData & 32) == 32 ) digitalWrite(d5Pin, 1); else digitalWrite(d5Pin, 0);
  if ( (myData & 64) == 64 ) digitalWrite(d6Pin, 1); else digitalWrite(d6Pin, 0);
  if ( (myData & 128) == 128 ) digitalWrite(d7Pin, 1); else digitalWrite(d7Pin, 0);
}

skaman

Hi sanni,

Nice PCB.  I might need one!  I recently pulled a cart connector from a broken Retron 3 and it has the proper pin spacing.

One thing on the clock generator location, the USB connector on the Arduino is close to the pins for the clock generator on my current adapter.  I put a layer of kapton tape over the USB connector to prevent a short (just in case).  I also have some plastic spacers sandwiched in between the adapter and Arduino but it might be really close if you fully seat the adapter onto the Arduino.

Thanks!

sanni

I'll send you one, no problem.  :)

I tried to stay away from the USB socket but it still might conflict with the 6pin ISP header depending on the used Arduino board, but nothing a little tape or desoldering iron couldn't fix.



The manufacturer already emailed me an image of the order, I like the color.



As you can see I used the remaining board space for a little break-out board, just plug it into the cart slot and you got access to all the important pins to mess around with, e.g. when you want to use the arduino to program a 29F032 flashrom.

I just hope I didn't mess up and the board actually works  :smiley-roll-sweat:

AngryHelder

I'll take one of those bad boys if you're selling them, if you don't mind could you post your schematic? I also notice 2 SNESCIC in the images above, I can see one is the Pic16F30 but what is the smaller one used? Also which of the CIC codes is the one to use fr the project?

Sanni maybe you could add a Voltage Regulator or something else required so the Cart is powered correctly as it seems to be an issue for some games or rather the USB ports lack of power.

Are you guys using the MEGA 2560 R3 Board or something else? I'm about to buy all the parts needed but this is the only thing I'm unsure of. Thanks.

skaman

sanni's adapter interfaces with the Arduino MEGA 2560 R3.

As for the CIC, snesCIC Lock uses PIC12F629 and SuperCIC Lock uses PIC16F630.  You can use either one.  I've had better success with the snesCIC using the resync code that was linked to.  I've tested both on my adapter as I built the boards to be interchangeable.  sanni's new PCB is setup for the 12F629.

Good luck!




sanni

The Arduino Mega does have a 5V 1A power supply onboard that takes a 9-12V barrel plug type power supply. If you have both USB and the 9V-12V external power supply plugged in the Arduino will automaticly use the external supply for power instead the USB.

There are 3 different versions of the Arduino Mega 2560 that have different chips for USB communication:
- the old official design with a FTDI chip
- the new official design with an ATMEGA16U2
- and an unofficial chinese redesign with a CH340

The unofficial chinese redesign is the cheapest but since you can also get a clone following the official design for about ~$10 (like ebay #360790082588) I would just buy that instead. Especially since all shields and cases are designed with the official design in mind.

As soon as I have received the pcbs and can confirm that I didn't mess up, I'll post the Eagle files.


AngryHelder

Awesome! Thanks guys for the responses and looking forward to the eagle files as well. One last question on parts: What socket are you guys using or recommend (besides stripping it from an SNES or Retron)? I have found the ones mentioned by another user in this thread:

62pin= http://www.ebay.com/itm/131137330390
46pin= http://www.ebay.com/itm/131416146382

and from his comments they seem to work. Wondering what are your recommendations and what is the pitch of the SNES pins? I might try alibaba to see if there is some distributor with the official specs (once I know them).

sanni

Official ones are 2.5mm pin pitch. I have one from a Retrode and a short one from a HoneyBee Super Game Converter. Both also have the correct 2.5mm.

skaman

Any of the commonly available connectors with 0.1" (2.54mm) spacing will be off.  For the center 46 pins, it doesn't matter too much.  Once you get to the ends of the full length connector, the spacing will be noticeably off. 

The Wonderco (Centronic) 46 pin connector listed on eBay will work but the spacing will be off.  My adapter uses the 46 pin connector and I cut an extra connector to add the end section.  I tried to shift the end section more into alignment when attaching it to the adapter.

The SNES Game Genie has a proper spaced 46 pin connector.  The Retron 3 has a proper spaced full length connector.  The later SNES consoles have thru-hole cart connectors - they're the ones with the black plastic mounting tabs on the end.

Good luck!

Go Up