Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mGBA is suddenly refusing to load .sav files for certain games until a fresh save is created #2473

Open
DrunkRichtofen opened this issue Mar 12, 2022 · 9 comments
Labels
blocked:needs info Not enough information to be fully investigated

Comments

@DrunkRichtofen
Copy link

I don't know why this has begun to happen, but for some reason, certain games that have .sav files for ingame saves don't seem to recognize that there is a saved game present. In these cases, starting a new game and saving again fixes the issue, though that means losing the previous save. At one point, I decided to move an old save to another folder, then start a fresh save to test whether or not the save function in general was broken. After confirming that I could load my new save, I shut off mGBA and moved the old save back and replaced the new save. They both had the same file name and extention, but once the old save was back, the emulator/game acted as if there was no save data.

There's no pattern or consistancy to which .sav files are no apparently unreadable, including how old the files are. Some .sav files were created on the same day, but oine will work while another doesn't. On one game that also has a save state, I am able to load the save state and the game successfully saves, but the save is still not read and the game acts as though there isn't one. Only when I start a new save does it start reading the file properly. Are some of the .sav files simply corrupt now, or is this an issue with mGBA itself?

@endrift
Copy link
Member

endrift commented Mar 12, 2022

What version of mGBA are you using, what OS, what type of game (GB or GBA or both), and does this still occur if you don't load any states before attempting to save?

@endrift endrift added the blocked:needs info Not enough information to be fully investigated label Mar 12, 2022
@DrunkRichtofen
Copy link
Author

I'm using mGBA version 0.9.3 on Windows 10. This issue is spread across GB and GBA games, while some other GB/GBA games are without issue. E.g: Pokemon Blue and Pokemon Firered cannot load a save until I start a new game, while Pokemon Red and Pokemon Ruby are just fine. Yes, this issue occurs before and after loading save states. Most of the games that have this issue are ones that don't have save states.

@DrunkRichtofen
Copy link
Author

I've further tested to see if I can find a fix/workaround for this issue. With all affected games, starting a fresh save allows me to load like normal, but attempting to load a previous save is impossible, unless I do so with a save state. Loading a save state and then saving ingame, however, leaves the issue unresolved. I attempted to temporarily move the already existing .sav file, and then move it back after testing to see if it will save and load a new game, but the old .sav file is still not loadable while the new one is fine.

There are some that have stopped working without explaination that were created/used within a week of save files that still work. Asuming the file itself may be the issue, I once again moved the old .sav file and allowed an new file to be created, then saved a new game to see if it could be loaded. After confirming that it could, I then loaded a previously created save state and saved the game. The game saved successfully, but it still only allowed me to load the brand new save, not the one saved through the save state.

There is no pattern, and before they already stopped working, no files were moved/edited from the day they were created.

@kenjinsama
Copy link

Is there any news ? I can confirm the issue. I do not know how but if I switch from a game to another, It happens some time.

@mathturtle
Copy link

mathturtle commented Oct 7, 2022

I can also confirm the issue. I'm using mGBA 0.8.3 on Windows 10 (because I got tired of redoing my settings every update) but I've tested 0.9.3 and confirmed the bug still exists there.

What I did (playing pokemon ruby):
played through the game saving and loading normally, worked fine
tried to open the save file in a save file editor, found it was incompatible
copied the save file to a backup folder
opened mGBA, made a save state of the game
deleted the save file and tried forcing mGBA to use the 128k format (1M flash)
played through the game enough to save making a new save
confirmed that worked with the save editor program
tried loading my save state... ummm it is gone?
tried to restore my settings and copied the backup save file back to its place
now the bug happens and the emulator doesn't recognize that it has a save file present, it will only let me start a new game

@tylerqr
Copy link

tylerqr commented Nov 29, 2022

I'm able to reproduce this same thing with mgba on Mac OS, with Pokemon fireRed. It seems totally random. Quitting mgba and loading it again sometimes will load my save file, and then suddenly instead of loading the existing .sav file it creates a .sa2 file at the moment the rom is loaded and acts like there never was an existing save file, though the original .sav file is still right there. I've tried editing the new .sa2 file to something like .sa223434 and editing the original .sav to be .sa2 and I think it worked once, but can't reproduce it again. I've tried renaming the file extension .sa2 to .sav and visa versa, still no dice. Very frustrating issue.

Save states are also disappearing.

@preston7363
Copy link

I'm having the same problem too. I clocked in many hours in Pokemon LeafGreen and caught a few legendaries. I saved the game and turned off my computer. The next day, I accidentally loaded up the wrong save file, taking me back to the starter pokemon selection. I tried to load the other save file but it wouldn't load. Please someone find a solution.

@endrift
Copy link
Member

endrift commented Aug 21, 2024

That sounds entirely unrelated to the issue here. Please join the discord or forums if you want support anyway, as that doesn't really sound like a bug.

@preston7363
Copy link

No no, you've got a misunderstanding. mGBA isn't loading a save file and it just takes me to the beginning of the game where all the controls are explained and where you make a fresh save. The only saves that work are the ones that are made at the beginning of the game.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked:needs info Not enough information to be fully investigated
Projects
None yet
Development

No branches or pull requests

6 participants