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 > GBA Flash Cart Bankswitching

#81577 - HyperHacker - Sun Apr 30, 2006 5:11 am

Where can I find info on how to switch banks on GBA flash carts? I want to be able to do it in my app, though I don't have a cart to test with. All I can find is how to write to the flash.

[edit] I found info for the EZFlash III, but that's it. Also is there a way to tell which type of flash cart is inserted and how many ROM/SRAM banks it has?

#81591 - tepples - Sun Apr 30, 2006 1:33 pm

This page should help. It's written for the DS, so addresses in the 0x0A000000 range should be changed to the 0x0E000000 range if your code will be running in GBA mode.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#81616 - Dwedit - Sun Apr 30, 2006 5:04 pm

Look at the source code to pogoshell, it might help.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#81618 - HyperHacker - Sun Apr 30, 2006 5:24 pm

tepples wrote:
This page should help. It's written for the DS, so addresses in the 0x0A000000 range should be changed to the 0x0E000000 range if your code will be running in GBA mode.

That's what I was looking at, but it doesn't appear to have much information about bank switching.

#81620 - tepples - Sun Apr 30, 2006 5:32 pm

For Visoly, search within that page for "VisolySetFlashBaseAddress".
For XG and NeoFlash, look for "Flash offset register".
For EZ-Flash III, look for "SetRomPage".

Which carts were you planning on supporting?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#81677 - HyperHacker - Mon May 01, 2006 3:08 am

Ah, I thought those were for writing. I'd just pass ROM addresses to those?
I hope to support as many carts as possible.