gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Hardware > Various ways to access GBC carts; will they work?

#76307 - HyperHacker - Mon Mar 20, 2006 12:20 pm

I was hoping to build a GBC flash cart, but apparently I don't have the resources (read: any sort of wire that's spaced properly to solder to a cart connector), so I'm moving to plan B. I have a GB Mega Memory Card, which is a passthrough device that backs up game saves; you put the cartridge in it, and put it in the GBC. I figure if I can dump its ROM, I can figure out how to write to it, and replace its firmware with a small program of my own.

Of course, to dump the ROM or upload a new one, I need some way to read/write the cart. I don't have any spare Game Boys around that I can rip connectors out of, so I figure my best chance is to get my own code running on something else that can read and write the cart. I've come up with a number of ideas, but I'm not sure if any will work. Can anyone tell me if I should try any of these?

1) Make a GBA multiboot cable, and have a GBA ROM read the cart. Probably easiest (as I can code for DS, so I imagine I could learn GBA pretty quick), but can a GBA multiboot app access the GBC cart, or will it just switch into GBC mode as soon as I put it in?
[edit] I realized I could load multiboot apps off my GBAMP, so I fiddled with that a bit. They all don't seem to mind the cart being removed, but don't like a GBC cart being inserted. (PocketNES blanks out, Goomba blanks out and plays the GBC boot sound O_o and Tetanus on Drugs freezes with a lot of weird sounds.) GBATek mentions a Game Pak Interrupt that triggers when removing the cartridge, wonder if that might be the cause?

2) Use my N64. I have a Gameshark Pro, which can link to a PC to transfer things in and out of RAM, so I could upload a program into some game's memory. (There's a GB emulator that does this.) I also have the GB Transfer Pak, which lets N64 games access GBC carts. Only thing is I have very little N64 coding experience. (I made some simple ASM hacks for various games, like an item select hack for Mario Kart, that's about it.) Is there any documentation on how to use the Transfer Pak, or would I be wasting my time?

3) Use my SNES. I know that GBC games running on SuperGB can upload and run SNES code. Maybe if I had a program running on the SNES, I could stick the SGB in and read the cart there? SNES carts are much bigger, so I could probably build a flash cart for it. But to do this I would have to load my program into RAM, then swap the flash cart for the SGB. Can this be done, or would it go blooie as soon as I pull the cart out?

4) Use my Gamecube. Upload some code via PSO exploit, and access the cart through GB Player. Thing is I'm not sure if GCN apps can access the cart, and I'd want to be 100% sure before I spend the money on PSO and a BBA.
[edit] Another idea; maybe if I had some simple GBC code running on the GBA, it could talk to the GCN via controller port link? I can upload GBC code into games' memory via memory editor on Codebreaker (a cheat device), but it's tedious since I have to write every byte in by hand... not a good way to do it!

Any feedback would be appreciated. :-)

#76378 - Dwedit - Tue Mar 21, 2006 4:10 am

Or get a Flash2Advance and GB Bridge...
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#76380 - HyperHacker - Tue Mar 21, 2006 5:02 am

Those cost money though. Notice how I put the Gamecube option last because I'd have to buy the game/adapter?

#76381 - tepples - Tue Mar 21, 2006 5:21 am

Apart from voltage issues...

The GBA cart bus is seek/read with a 24-bit address and a 16-bit data stream. The GBC cart bus is traditional non-multiplexed address/data bus. GBA carts with SRAM or flash save implement the GBA cart bus for ROM and the GBC cart bus for SRAM or flash. But the chip enable pin for the GBC cart bus in GBA mode has moved:

Pin 5 on GBA cart: GBA chip select
Pin 5 on GBC cart: GBC chip select
Pin 30 on GBA cart: GBC chip select
Pin 30 on GBC cart: Reset!

Useful resources:
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#76446 - HyperHacker - Tue Mar 21, 2006 7:32 pm

All of these are GBC-compatible, though. The GBA switches everything to GBC mode when you put the cart in, pushing the switch. I figured if something were running from RAM at that time it might be able to read the cartridge.

Hmm... if I could get it to just freeze up entirely when a GBC cart is inserted, I bet I could still do something. Codebreaker can patch a few bytes of ROM. I could write a small program into RAM in GBA mode, then have it just completely freeze up, swap with a GBC cart, and power off/on really fast. Once it's running in GBC mode, the CB could patch the ROM to jump to that part of RAM.

Of course this depends on 3 factors - I'd have to know what part of GBA RAM maps to what part of GBC RAM, make sure it doesn't crash (and potentially corrupt memory) when swapping carts, and make sure CB itself won't clear memory when starting up. (I know the GBC bootROM doesn't.) Anyone know anything about this?

Also, none of the commercial carts on that GBC page seem to be available, and there's no way I could build the others. (If I could find a properly-spaced 32-wire ribbon cable, I could potentially build my own, but I don't seem to have such a cable.