Go Down

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

sanni

Hmm, as someone who has little experience with Arduino, is that safe to do?
No worries, I'll try to reproduce the error, I got an old spare cart reader I can risk. But normally nothing bad should happen.


Any idea?
Can you make a picture of the repro? What flashrom does it use? If it's a 29F032 then it might the busyCheck29F032 function since I didn't add the SNES OE/Cart pin there.

void busyCheck29F032(byte c) {
  // Set data pins to input
  dataIn8();

  // Setting OE(PH1) OE_SNS(PH3) CE(PH6)LOW
  PORTH &= ~((1 << 1) | (1 << 3) | (1 << 6));
  // Setting WE(PH4) WE_SNES(PH5) HIGH
  PORTH |=  (1 << 4) | (1 << 5);

  //When the Embedded Program algorithm is complete, the device outputs the datum programmed to D7
  while ((PINC & 0x80) != (c & 0x80)) {}

  // Set data pins to output
  dataOut();

  // Setting OE(PH1) OE_SNS(PH3) HIGH
  PORTH |= (1 << 1) | (1 << 3);
}

SputnikBR

No worries, I'll try to reproduce the error, I got an old spare cart reader I can risk. But normally nothing bad should happen.


Can you make a picture of the repro? What flashrom does it use? If it's a 29F032 then it might the busyCheck29F032 function since I didn't add the SNES OE/Cart pin there.

void busyCheck29F032(byte c) {
  // Set data pins to input
  dataIn8();

  // Setting OE(PH1) OE_SNS(PH3) CE(PH6)LOW
  PORTH &= ~((1 << 1) | (1 << 3) | (1 << 6));
  // Setting WE(PH4) WE_SNES(PH5) HIGH
  PORTH |=  (1 << 4) | (1 << 5);

  //When the Embedded Program algorithm is complete, the device outputs the datum programmed to D7
  while ((PINC & 0x80) != (c & 0x80)) {}

  // Set data pins to output
  dataOut();

  // Setting OE(PH1) OE_SNS(PH3) HIGH
  PORTH |= (1 << 1) | (1 << 3);
}
Great! now works by replacing that part of the code :)
yes the memory is at 29f032. I figured it was something with the "OE_SNS (PH3)" tried to edit but without success haha
Thank you Sanni. your cartreader is with every addition getting better and better!

EnderIII

Hello Everyone,

I got my hands on two NP GB Memory cartridges recently, and they all seem to have been rewritten.  I'd like to reflash these myself, if possible.  It seems this reader/writer is the only way to do it.  I have two questions though.

The first is, does anyone know where I can get my hands on the menu file from the GB Memory?  I can't find it anywhere, and it seem to be required for Infinest's GB Memory Binary Maker.

Second, is there anywhere I can get my hands on this cart reader preassembled?  I recently moved abroad and no longer have the tools or space to assemble a project like this.

Thank you.

moldov

Hello Everyone,

I got my hands on two NP GB Memory cartridges recently, and they all seem to have been rewritten.  I'd like to reflash these myself, if possible.  It seems this reader/writer is the only way to do it.  I have two questions though.

The first is, does anyone know where I can get my hands on the menu file from the GB Memory?  I can't find it anywhere, and it seem to be required for Infinest's GB Memory Binary Maker.

Second, is there anywhere I can get my hands on this cart reader preassembled?  I recently moved abroad and no longer have the tools or space to assemble a project like this.

Thank you.
PM me, I will send You Menu file.

Sanni is selling partially assembled cartreaders.

I have 2 of them almost assembled. One is reserved.

I can sell You mine if You will wait 2-3 weeks until I get new LED screen for it (I received one but it's broken).
Also 3D printed frames is missing but I will figure out in few days how can I print them with less price.

Regards

Cyber_Akuma

No worries, I'll try to reproduce the error, I got an old spare cart reader I can risk. But normally nothing bad should happen.
I don't mind trying to help, I just don't have much experience with an Arduino yet or this code, so I was not sure if it was safe to randomly comment out sections of the setROM_GBA function or not.

I was planning to comment the entire thing out and uncomment one line at a time seeing if any one specific line caused it, or could that risk damage?

sanni

No risk that I know of.

Here I have re-arranged the commands so that it's easier to go line by line
Quote
void setROM_GBA() {
 // CS_SRAM(PH0)
 DDRH |= (1 << 0); PORTH |= (1 << 0);
 // CS_ROM(PH3)
 DDRH |= (1 << 3); PORTH |= (1 << 3);
 // WR(PH5)
 DDRH |= (1 << 5); PORTH |= (1 << 5);
 // RD(PH6)
 DDRH |= (1 << 6); PORTH |= (1 << 6);
 // AD0-AD7
 DDRF = 0xFF;
 // AD8-AD15
 DDRK = 0xFF;
 // AD16-AD23
 DDRC = 0xFF;
 // Wait
 delay(500);
}

RyoHazuki

I'm having trouble with the eprom programmer, when i blackcheck it, it says that it is empty, so i proceed to write the rom. While writting the rom it starts making a weird noise like static noise, after 3 minutes it starts verifying and then it gives me an error, i restart the cartreader and verify again, but still says that there was an error, and if i blankcheck it, it says the eprom is empty. I set both buttons to down position for writing, do i need to change them to the up position when Reading? This is how my adapter looks like.

Edit: Forgot to mention that i didn't solder the 22uf tantalum capacitor, probably they will arrive on monday. Can i damage something by not having that capacitor?

sanni

You should read out the eprom and check the file with a hex editor to see if it's really empty. If it is then you need to use a multimeter to check if the 6V pin gets 6V during programming and 5V during reading. And also that the O/P pin is getting 12V while programming.

That being said the 27C322 flash code is still very unreliable but it should at least program something even if it'S the wrong thing.

I get the weird noise too. Missing the 22uF tantalum will not do any harm.

RyoHazuki

I found the problem, there was a resistor in short. Now the O/P pin shows 12V on the multimeter. Flashed and verified the rom successfully on the first try.

dragynfyre

Hi Sanni,

I finally got around to building my cart reader. It was my first time doing any major soldering other than battery replacements so I'm pretty happy everything worked (except the OLED screen isn't turning on but serial monitor works fine for me)!

Overall it was a great experience. I got the whole thing built for under $60 CAD including shipping (N64 cartridge support only and I was able to 3D print the parts at the library for $1).

A couple nitpicks though:

1) The SD card spacer is a bit weird. The one in the combined .stl file doesn't look exactly like the one in the video tutorial and the LED was loose in there. I had to wrap the top and bottom in tape to get the LED to stay in space. Also the standalone spacer .stl file has a different design the combined .stl file. Was there a change in this design?

2) It was wasn't very clear why you needed to desolder the pin header on the OLED screen since it seems like you put it back on later in the tutorial. Based on what I tell you just flipped the long and short side of the pins around?

3) The two wires that need to be soldered at the end aren't listed in the needed parts list. I understand most people would have spare ones lying around but I had to cannabilize an unused PC fan connector to finish my build. I think those wires should be listed in the parts list so someone doesn't get to the end and find out they're missing the last thing to complete the build.

4) The SMD buttons should be noted that they're only required if using the OLED screen. In case someone wants to save as much money as possible with just using the serial monitor.

5) Why two different screw sizes for screwing in the 3D printed parts?

sanni

1) The SD spacer in the video was made out of laser-cut acrylic, it's a leftover from an earlier design, where the backplate was out of acrylic since I didn't have a 3D printer yet.
The one in the combined .stl is meant to be printed in coloured ABS/PLA and the one in the standalone .stl is meant to be printed in transparent ABS/PLA. Therefore they have different designs.

2) You could probably also solder the OLED to the Cart Reader without flipping the pins first. I haven't tried that. But yes all that the desoldering archives is to make the pins longer on the side that faces the Cart Reader PCB.

3+4) Changed the parts lists accordingly.

5) In the beginning, everything was M2 but I didn't like the look of the M2x15 female spacers in the front so I changed them to M3.




sanni

I thought about how the next hardware version could look like but I can't think of a design that I really like.
First I got rid of all the modules and put everything on a single PCB.
But halfway through populating the PCB in Sketchup I got bored, way too many components. This would be a nightmare to solder.



So next I added an Arduino Mega 2560 Pro, a mSD and a clock generator module and also added the OLED back since I now had some free space on the PCB. Much easier soldering job but there is something I don't like about this design either.



The goal should be to make it as cheap and easy to build as possible.


Cyber_Akuma

Sorry that it took me a while to get back to you about this:

No risk that I know of.

Here I have re-arranged the commands so that it's easier to go line by line
Huh, well this is weird. I copy-pasted that re-arranged code, and was going to comment all of it out and one-by-one uncomment each line to see which one causes it.

But just as a baseline test, I uploaded it to the cart reader as-is without anything commented out yet just to make sure I get the same behavior as the original arrangement of the code.

.... and I didn't.

This time, it actually didn't erase the save from the cart, even though I had not commented any of the lines in that post out. I tried doing both a save and rom dump of all 4 SRAM GBA games I have (even though only two of them were erasing), and none of them erased their saves. I did a CRC-check of both the saves and roms from the earlier dumps and they matched as well. One had the latest save be different, but I think I actually had played it a bit so that's understandable.

Seems that somehow re-arranging the order of instructions in setROM_GBA in the order you write in post #743 makes it work correctly... I have no idea how or why though.


I notice that this redesign has five cartridge ports now, is support for another system being added? If it was mentioned before in the thread I must have missed it. I recall there were people contributing to TG16 support via an adapter, I admit I am not too familiar with the TG16 but that doesn't look like a TG16 card port.

sanni

I don't know exactly why this fixed it but I updated the code on github anyway. :)
The added slot on the design idea I posted is a NES slot but ofc there is no code written for it.

I worked on the design idea a little more, now it has two build options: with or without a backplate.

First build option that should be cheaper.


Second build option with the modules mounted on the underside and thus requiring a backplate.


And the backside of the second build option.


Also by using those longer male pin headers to connect the Mega 2560 Pro you can make an expansion port where you can plug in daughter boards like this one that breaks-out all the pins to two 40pin IDE connectors for prototyping.


MostroVeneno

#749
Feb 22, 2019, 04:45 am Last Edit: Feb 22, 2019, 12:20 pm by MostroVeneno
Hi,

I was wondering how to write a rom to the satellaview 8m cart through bsx.
The rom must be .sfc? I get invalid file response.
Please any info will be helpful. Thanks

Go Up