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.

DS Flash Equipment > Using SRAM of original GBA cartridges possible?

#47821 - Ilomoga - Wed Jul 13, 2005 10:20 pm

I haven't tried it yet, I wanted to ask here before doing it, but I don't think that it should be a problem:

Some homebrew games/apps/whatever use the SRAM of the flash cartridge (if you're using one), like for example Nibbles, snesDS or DS Paint.
Does it work with SRAM from original GBA games too? Many games use 64KB SRAM, so you could change the cartridge after the DS loaded everything and save to it.

Does that work or works saving only with flash carts?
_________________
The future of gaming is mobile Handheld Gaming.

#47831 - Dwedit - Wed Jul 13, 2005 11:49 pm

You can swap cartridges safely if the program doesn't read or execute bytes from the cartridge.
Commercial cartridges have 32 kilobytes of SRAM, not 64. Many cartridges use FLASH or EEPROM to save, not SRAM. For a list of what save type each cartridge contains, go to http://releases.pocketheaven.com
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#47935 - Ilomoga - Thu Jul 14, 2005 9:30 pm

Dwedit wrote:
You can swap cartridges safely if the program doesn't read or execute bytes from the cartridge.
Commercial cartridges have 32 kilobytes of SRAM, not 64. Many cartridges use FLASH or EEPROM to save, not SRAM. For a list of what save type each cartridge contains, go to http://releases.pocketheaven.com


Oh, my mistake. But some games use 64KB and not only 32 (for example Mario Kart Super Circuit with FLASH_V124 (512Kbit) ) or the Pok?mon games use 128KB

So it's not possible to use commercial for saves for apps like DS Paint, is it?
_________________
The future of gaming is mobile Handheld Gaming.

#47942 - phonymike - Fri Jul 15, 2005 1:33 am

if the cart uses SRAM and not EPROM or flash, then you can save data to the cart easilly. however it will destroy whatever save data is on the cartridge (erase your save file.)

#47946 - tepples - Fri Jul 15, 2005 2:06 am

The technique that phonymike describes, using the SRAM of an official Game Pak, is often called "SRAM cannibalism". And yes it can be made to work with homebrew Nintendo DS programs, provided that they're aware of the 32 KB SRAM on an official Game Pak, not the 64 KB SRAM that GBA flash cards have.

Why does it have to be SRAM and not flash? Games with 64 KB FLASH_* need different writing techniques (not just a bytecpy() to the SRAM area) that vary per manufacturer and thus aren't nearly as easy to use with SRAM cannibalism.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#47954 - Mighty Max - Fri Jul 15, 2005 8:54 am

Hmm just an thought about this cannibalism ...

Anyone tried to find an buffer overrun in a save file and probably the ability to run code that way? I know it is not much place for code, but it should be 'nuff to do a "Replace card now" and call to the other cards rom.

Might result in another passme method.

#47968 - Ethos - Fri Jul 15, 2005 1:08 pm

Note:

You will not be able to use that method with many Homebrew roms since many of us incorporate a check to make sure the cartridge is not a commercial one.
_________________
Ethos' Homepage (Demos/NDS 3D Tutorial)