mgba-emu / mgba

mGBA Game Boy Advance Emulator
https://mgba.io/
Mozilla Public License 2.0
5.38k stars 744 forks source link

Pokemon Red and Blue saves both became completely corrupted randomly #3176

Open TheCommandoChicken opened 1 month ago

TheCommandoChicken commented 1 month ago

I was playing Pokemon Red and Blue simultaneously with a friend and despite successfully resetting and loading both of our games multiple times, the save files seem to have become full of just $FF bytes while the emulator was closed. The last thing we did was trade Pokemon before closing the emulator and we were both able to reset and load into our save files just fine afterwards. Less than an hour later I tried to load the save and the emulator simply does not treat it as a saved game. This applies to both the Red and Blue saves, and across both the sa2 and sav files. Opening them in a save editor shows everything as $FF bytes.

endrift commented 1 month ago

Hmm, that shouldn't happen unless something else changes the size of the file to 0 bytes in the interim. Are you using a cloud service to automatically sync the saves?

TheCommandoChicken commented 1 month ago

I'm not. I did manage to recover the saves, but I'm not entirely sure how. I first tried manually loading the .sav files which didn't work with either of them, so I copied them to another folder and tried renaming the .sa2 files, which also didn't work for the Blue save but did work for the Red save. After doing a bunch of shenanigans which ultimately went nowhere I tried loading the original .sav files in Pokered save editor, and for whatever reason they now displayed the correct information and worked fine in the emulator. I genuinely have no idea what happened here because even if I were trying to load a Blue save with a Red ROM by mistake, I only did that after the emulator failed to load the save automatically.