#178286 - JoeWawaw - Sat Nov 29, 2014 7:35 pm
Hi,
Recently, I made a Gameboy advance SRAM dumper with Arduino (a microntroller):
The 16-bit address is latched in with shift registers, then I strobe the ~RD pin and read the data
I now have a text file containing the values directly dumped from a GBA cartridge
My main goal was to be able to load them onto an emulator, but it seems as though emulators only accept save files dumped by action replay/other dumpers, which have their own format for save files, that differ from raw save images like the one i have
So here i am, after hours of making the circuit, with a save file that can't be loaded
I was hoping someone in this forum (if people still visit it) could tell me which emulators allow reading raw save files, or even an encoder for those commercial dumpers, or really any way of loading this file I have.
Thanks!
#178287 - Dwedit - Sat Nov 29, 2014 10:34 pm
Emulators accept only raw binary files containing what is actually in memory. There's nothing strange or proprietary about that file format, that's the kind of file I would expect to see, and emulators would expect to see as well.
I have no idea what would have possessed you to make a text file instead. A text file is not a raw save file at all. Unless you misspoke, and meant a binary file.
I really have no idea how the multiplexed cartridge bus actually works, since I stay on the software side.
I once made a save dumper where you used a GBA Movie Player (flash cartridge with CompactFlash card), then swapped cartridges with the system running to read the save off the game cartridge, then put the GBA Movie Player back in to write the save file to the disk.
There's also other save dumpers where you use a GBA to Parallel Port cable, and it sends a program to the GBA, then downloads the save game.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
#178288 - JoeWawaw - Sat Nov 29, 2014 10:52 pm
I used Arduino to output the values in hex, then using hexedit i copied those hex numbers and saved the file as a .sav, so technically its a binary file (it's a 64kB file)
If i wanted to try loading the save to an emulator, how would i do so, and which emulator?
For SRAM reading, there is no multiplexing, 16 address lines with 8 data lines = 64kB of SRAM data
#178289 - Dwedit - Sat Nov 29, 2014 11:10 pm
Save types on the GBA:
SRAM (32KB, mirrored to fill 64K)
Flash (64KB, reads just like SRAM, but not written the same way)
Bigger Flash (bankswitched)
EEPROM (both 512 byte and 8KB versions, not read like SRAM at all)
Flash Cartridge's SRAM (256K in 64K banks)
Usually, for an emulator, you just put it into the directory it's expecting to find it, with the same filename as the GBA file, but with a .SAV extension instead, and it loads it when it sees it.
One thing you can do is look at an emulator's save file to see it resembles the dumped save files. If they look similar, then you can tell they're probably being dumped correctly.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
Last edited by Dwedit on Sat Nov 29, 2014 11:13 pm; edited 1 time in total
#178290 - JoeWawaw - Sat Nov 29, 2014 11:12 pm
I also had the idea of comparing save files, but i can only find game shark/action replay ones
Also, when i play a game on the emulator and save the game, the file is a .sav, would that be a good candidate for comparing?
What type of save file would the one i extracted be from the list you gave?
I'm not a pro in GBA hardware (you can probably tell :p)
Last edited by JoeWawaw on Sat Nov 29, 2014 11:14 pm; edited 1 time in total
#178291 - Dwedit - Sat Nov 29, 2014 11:14 pm
The .SAV files are the contents of SRAM, those are exactly what you are looking for.
By the way, which game are you extracting the save file from? (yes, it matters... It might not use SRAM or Flash).
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
#178292 - JoeWawaw - Sun Nov 30, 2014 4:29 am
Hey, it worked! i managed to make pokemon red rescue team's save load onto VBA. By comparing it to a .sav made by VBA, i realised the .sav file was 128kB, while i had only dumped 64kB. I also saw that the data after 0xFFFF was just filled with 0xFF, so i added 64kB of 0xFF to my dump, and then it worked. I dont know whether this might make the game crash later on, but at the moment it seems stable
time to move on to pokemon sapphire... although from opening both cartridges, ive found out they use different methods for storing: sapphire has an internal battery, but i think it uses that for its RTC