ROM-Reader for Super Nintendo / Super Famicom Game Cartridges

To clarify, by "GBA Submenu" do you mean the menu where it's asking you to choose between Gameboy, Gameboy Advance, or GB Memory?

Or do you mean after choosing GBA where it's asking you to read the rom, read the save, restore save, etc?

I tried leaving it at the GB/GBA/GB Memory menu for a bit and nothing happened.

But as soon as I enter the GBA menu and it displays information about the connected cartridge is when the save seems to get erased.

From what I can tell, this screen is the exact moment it seems to get erased, the save remains on the cart until before this screen, and as soon as I see this screen, even if I turn the reader off and don't press any button to go to the next screen, seems to be when the save is erased:

Could you please comment out this line and see if it still erases the save?

This time it should not list the name of the cartridge or any other info.

With that line commented out the information screen still appeared, just all the information in it was empty or listed as "unknown", the save was still erased as soon as that screen was displayed.

Okay, now also comment setROM_GBA(); out and try again, it will still display "unknown" but the question is will it still erase the save.

/******************************************
Setup
*****************************************/
void setup_GBA() {
//setROM_GBA();

// Print start page
//getCartInfo_GBA();
display_Clear();

With the setROM_GBA() line commented out the saves on the cart were no longer erased, although of course I could no longer dump the cart and save.

Ok, luckily setROM_GBA() is only a small function so finding the bug in there shouldn't be too hard. :slight_smile:

So as a first try I would just test if changing the order of the operations fixes the issue.
Could you please change it like so and try again, the stuff we changed in my previous posts needs to be reverted to stock again ofc:

void setROM_GBA() {
// Set Control Pins to Output CS_SRAM(PH0) CS_ROM(PH3) WR(PH5) RD(PH6)
// CLK is N/C and IRQ is conected to GND inside the cartridge
DDRH |= (1 << 0) | (1 << 3) | (1 << 5) | (1 << 6);
// Output a high signal on CS_SRAM(PH0) CS_ROM(PH3) WR(PH5) RD(PH6)
// At power-on all the control lines are high/disabled
PORTH |= (1 << 0) | (1 << 3) | (1 << 5) | (1 << 6);

// Set address/data pins to OUTPUT
// AD0-AD7
DDRF = 0xFF;
// AD8-AD15
DDRK = 0xFF;
// AD16-AD23
DDRC = 0xFF;

delay(500);
}

Swapping those two sets of operations doesn't seem to have had any effect, save is still erased.

I guess the only thing left to do would be to comment out one line at the time until the save doesn't get erased anymore.

Hmm, as someone who has little experience with Arduino, is that safe to do? Nothing in the setROM_GBA function would be setting voltages or anything like that which could damage the reader or the cart if I change it or comment it out?

Hi Sanni
Whenever I try to rewrite cartridges through the "HiROM repro" menu does not work, and I get errors in the "verifying" this only happens when the memory /OE is connected to the /CART. Connecting the /OE from memory to CPU_CLOCK during recording works normally.
Rewrite by the menu "LoROM repro" works normally even with the /OE connected to the /CART.
tested with cartridges with and without SRAM. cart reader v2.6
Any idea?
Thank you :slight_smile:

Cyber_Akuma:
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.

SputnikBR:
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);
}

sanni:
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 :slight_smile:
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!

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.

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.

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

sanni:
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?

No risk that I know of.

Here I have re-arranged the commands so that it's easier to go line by line

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);
}

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?

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.

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.

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?