Gaming I made a GBA save file converter

EuanF

Active Member
OP
Newcomer
Joined
Apr 14, 2021
Messages
33
Trophies
0
Age
49
XP
162
Country
Canada
I've been working on an online tool for converting save files for older game consoles: https://savefileconverter.com/

So far the main formats it does are GBA-centric: GameShark, Action Replay, and Retron 5 (which includes GBA but does other consoles too). It converts to and from these formats to a raw/emulator format, which can be loaded onto a real cart if you want. Or, if you're having trouble getting a particular save to load in an emulator, running it through the converter may put it into a format that it's able to load.

It also has links to help on loading saves to and from carts, and links to other online save file converters.

My next plan is to do GameShark SP saves for the GBA, and then start expanding those formats to other consoles (there's some minor differences from console to console for GameShark saves, for example).

It's all open source, and here's a link to the code: https://github.com/euan-forrester/save-file-converter . I hope that this project is also able to become a hub of information about the various save file formats (I've had to comb the web for info about each one and it hasn't always been easy to find): https://github.com/euan-forrester/save-file-converter/tree/main/frontend/src/save-formats

I'd love suggestions on what formats to do next, any bug reports you have, or a pull request if you've got something to add!

main-window.png
 

EuanF

Active Member
OP
Newcomer
Joined
Apr 14, 2021
Messages
33
Trophies
0
Age
49
XP
162
Country
Canada
Awesome, I'm glad you like it! Let me know if you have any suggestions!

Also I just added GameShark SP support for GBA saves
 
Last edited by EuanF,
  • Like
Reactions: BlazeMasterBM

EuanF

Active Member
OP
Newcomer
Joined
Apr 14, 2021
Messages
33
Trophies
0
Age
49
XP
162
Country
Canada
I just added a tool for troubleshooting saves: if you have a save that won't work, you can make a test save with the emulator or cartridge you're trying to use and the tool will compare it to the one that's not working and try to fix it. I think it's especially relevant to GBA saves, since I found lots of saves on the Internet that won't work in particular emulators because they're the wrong size. I also had a user whose Retron5 outputted a crazy save from a cartridge that he wanted to transfer over to an emulator but it wouldn't work.

I'd love feedback on this page: it's a bit tricky to try and handle every case, and I hope I made it easy to use. But I'd love to hear if it's actually confusing to use, or if you have a save that it can't fix.

Check it out here: https://savefileconverter.com/#/troubleshooting
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
33,887
Trophies
2
Website
trastindustries.com
XP
22,639
Country
United Kingdom
since I found lots of saves on the Internet that won't work in particular emulators because they're the wrong size

That would have been part of a suggestion I was to make to appeal to more around here -- the EZFlash 3 in 1, or indeed as it was open source as far as usage commands the various tools that managed it, would often default to the larger save file size*, and I think I few would attach a header or footer to try to note what it came with. While the 3 in 1 has waned somewhat in popularity in recent years as more dedicated efforts came back into fashion it never the less remains one of the main ways people try to do anything with GBA on the DS.
AR/Gameshark efforts were more that gamefaqs at one point had a strange policy that only things in that format rather than raw were tolerated (they claimed it was to avoid piracy as those were the only ways mortals would have access to such things, anything else would be the product of scary illegal emulators or flash carts). That said VBA (the emulator of choice for most) and I think no$gba as well (and if not 10 seconds with VBA nets you what you need) would import and export things in such a format so no great issue on that one.


*save file size is not really noted in the header, you have to search the ROM for it (or have a database, which some did) which is easier said than done even on a DS so as they were used one game at a time in most scenarios then it was easier to default to max size.
 

EuanF

Active Member
OP
Newcomer
Joined
Apr 14, 2021
Messages
33
Trophies
0
Age
49
XP
162
Country
Canada
Do you have any documentation on the EZ Flash format? Or else several examples of the same data but in EZ Flash and in raw formats? If I can figure out the format I can add it to the converter.

Thanks for the explanation of why gamefaqs has these formats -- I was curious. I've definitely chosen the formats I've added so far based on the files I can find around the Internet. Being able to convert a GameShark file, for example, lets me write it to a real cart so I've definitely found value there.
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
33,887
Trophies
2
Website
trastindustries.com
XP
22,639
Country
United Kingdom
It varies a bit -- as mentioned they open sourced the code to access it so you have a few choices of things. I was also content playing with my EZ4 and EZ2 during all this so did not get as far into the weeds as some.

The original EZ5/EZ5i code that the 3 in 1 was a companion for should be OK, even for those few betas that did multiROM support (was cancelled because pokemon's obscenely large file size* meant endless questions from pokefiends)
Rudolph's GBA exploader was probably the most popular management tool in the end ( https://wiki.gbatemp.net/wiki/3_in_1_Expansion_Pack_for_EZ-Flash_V#Third-Party has a few others, GBAldr from cory1942 being the other of note)
I believe the AK2i/akaio added a footer to note what serial the game save corresponded to.
Other flash carts that tried to do it in kernel (rather than kicking it to Rudolph's stuff) could do whatever the like but nothing is ringing a bell here as far as anything truly weird and wonderful. Some others would default to whatever the power of 2 size was for the file size compared (probably 256KB but don't quote me on that one) to other flash carts that would use the correct size.
Don't think anything did compression as far as flash carts or emulators for the GBA (DS was a different story).

*also a problem with older versions of VBA that only did a basic ASCII search for Flash, SRAM or EEPROM and did not read the sub type to know what beyond that and users then got to set the save size in the menu. VBA-m has long since changed this for something better.
 

EuanF

Active Member
OP
Newcomer
Joined
Apr 14, 2021
Messages
33
Trophies
0
Age
49
XP
162
Country
Canada
Rudolph's GBA exploader was probably the most popular management tool in the end ( https://wiki.gbatemp.net/wiki/3_in_1_Expansion_Pack_for_EZ-Flash_V#Third-Party has a few others, GBAldr from cory1942 being the other of note)
I believe the AK2i/akaio added a footer to note what serial the game save corresponded to.

Hm this is sounding super complex, not only to understand for myself but also to make a simple interface that someone else could understand. If there's multiple formats for a single device (and it sounds like there's multiple such devices), depending on which homebrew app you ran on it, I'm not sure how to make that into a simple interface that won't just have some sort of giant list that everyone else has to slog through.

Is it possible to export a raw save from these carts? If so, then maybe it's easiest to leave the onus on the owner of the cart to figure out how to do that, and then the tool can be used to convert that into whatever is needed.

--------------------- MERGED ---------------------------

I gotta say, that is very cool on your part. Thank you for this wonderful gift. ^_^

Thanks! It's been a fun project. I have a Mac, and most of the existing tools run on Windows and are super old, so they're a pain for me to use.

I originally wrote a command-line tool to do Retron 5 saves but when I came back to it a year or so later I couldn't remember the commands :). Then I realized I could write it all in Javascript and have it work in anyone's web browser and I've been slowly adding formats ever since!
 
  • Like
Reactions: hippy dave

Jayro

MediCat USB Dev
Developer
Joined
Jul 23, 2012
Messages
10,079
Trophies
3
Location
WA State
Website
ko-fi.com
XP
10,829
Country
United States
Thanks! It's been a fun project. I have a Mac, and most of the existing tools run on Windows and are super old, so they're a pain for me to use.

I originally wrote a command-line tool to do Retron 5 saves but when I came back to it a year or so later I couldn't remember the commands :). Then I realized I could write it all in Javascript and have it work in anyone's web browser and I've been slowly adding formats ever since!
Well I strongly encourage offline webapps like this, they're great for people with Macs, Linux, and Chromebooks. And I agree with you on that "old apps" front, it's sad that new apps or old app updates haven't come up lately. It hurts for sure.
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
33,887
Trophies
2
Website
trastindustries.com
XP
22,639
Country
United Kingdom
Hm this is sounding super complex, not only to understand for myself but also to make a simple interface that someone else could understand. If there's multiple formats for a single device (and it sounds like there's multiple such devices), depending on which homebrew app you ran on it, I'm not sure how to make that into a simple interface that won't just have some sort of giant list that everyone else has to slog through.

Is it possible to export a raw save from these carts? If so, then maybe it's easiest to leave the onus on the owner of the cart to figure out how to do that, and then the tool can be used to convert that into whatever is needed.
The carts barely have any brains for themselves and it is all down the management program. Headers and footers are probably the big ones and most of those are IF size of file greater than [insert relevant power of 2 size] then copy [insert relevant power of 2 bytes] to new file ELSE display "are you sure this has a footer?". Headers much the same, though rarer, and you are still chopping off parts of a file.

There were a few existing tools to do things for the 3 in 1 as well you could probably fire it through a couple of times with made up files (the GBA has no format that otherwise encapsulates the save like some later systems/systems with memory cards) to see what happens to them as well.
 

EuanF

Active Member
OP
Newcomer
Joined
Apr 14, 2021
Messages
33
Trophies
0
Age
49
XP
162
Country
Canada
The carts barely have any brains for themselves and it is all down the management program.

Hm well I'll keep an eye on demand for this cart (it came up on Reddit as well) but my main focus with this tool is on decoding files that are available on the Internet, so people (and myself!) can play with levels or characters that are otherwise locked out.

So the next format I'm going to do will likely be Wii VC, because there's lots of those files on gamefaqs for the NES, SNES, N64, and maybe others too. And plus there's good documentation of the format available online.

I know the Wii U VC is a different format from Wii VC, but I'm hoping they're similar enough that I can add support for it easily too at the same time.
 

hippy dave

BBMB
Member
Joined
Apr 30, 2012
Messages
7,134
Trophies
1
XP
8,103
Country
United Kingdom
*save file size is not really noted in the header, you have to search the ROM for it (or have a database, which some did) which is easier said than done even on a DS so as they were used one game at a time in most scenarios then it was easier to default to max size.
Veering off-topic for the thread, and maybe a bit late in the day (although the GBA homebrew scene still has some worthwhile activity currently) but for homebrew roms, maybe some new standard could be defined for homebrew devs and emulators, where info is stored either in spare space in the header, or some other predefined location, giving info about the save type/size, and other potential settings like if rumble is used. (Besides the save thing, I've heard about homebrew code having to spoof the identity of a particular commercial game if they wanted emulators to activate tilt or rumble)
 
Last edited by hippy dave,
General chit-chat
Help Users
  • No one is chatting at the moment.
    Offline12345 @ Offline12345: Hot Wheels Unleashed v1.0.3TID: 0100AA60136D2000BID: 0695B4CD67E6B5C2