Open Wrsford opened 2 months ago
Hmm, this is not mGBA specific. Maybe a different name for this option would make sense? Something like "sharedRomAndSaveFolder". If you have a better name let me know.
There is also a small problem with this. EEPROM saves are not compatible between mGBA and oaf. If we share the same folder again switching between mGBA and oaf will corrupt savegames.
Is eeprom a raw blob or is there a header? Maybe flag those made by oaf?
It's raw but the byte order is different. Unfortunately the most common format is the byte swapped one. oaf uses the format that preserves byte order. See: https://gist.github.com/profi200/e06794d7561ed552c518b4b0b2f5f2f6#file-gbaeepromsavefix-c-L44
My proposed changes to deal with the issues you brought up are:
A longer term fix for the EEPROM would probably require writing both versions of the save and comparing them to see if one updated without the other, then syncing with the newer one. Currently, I don't have the familiarity with the codebase to know if that is possible or to be able to make that change, but I can look into it.
I'll get started, but let me know if you have any objections. Thanks!
Supersedes #177 This adds an advanced option (mgbaSaveCompat) to swap save and ROM .ini files to be in the same directory as the ROM. This allows a user to play on mGBA and seamlessly swap over to open_agb without moving saves around.
Neither mGBA nor open_agb allowed configuring save locations, so this would provide the only option for users wanting to be able to swap between them easily.