Thysbelon / gbaconv-web

The Libretro VBA save to standard sav converter gbaconv compiled to WebAssembly.
https://thysbelon.github.io/gbaconv-web/
9 stars 1 forks source link

Conversion Fails With mGBA Save Files With RTC Data Appended #9

Closed jackada7 closed 6 months ago

jackada7 commented 6 months ago

So I was transferring save files from 44VBA on my iphone to mGBA on my mac. It all worked perfectly first, but after I saved again in mGBA and tried to convert that new .sav file back to .4gs, 44VBA opened that file and told me that "The save file has been deleted". I even tried to convert that new .4gs file back to .sav, and now even mGBA is telling me that "The save file has been deleted". I have tested with several other save files, and it turns out that they all worked fine after several conversions, but if I just take a save file and save once on mGBA, the conversion just won't work.

I know this sounds a lot like a mGBA issue, but this is just so weird so I just wanna know if you can do anything with this.

Debug output if needed: home/web_user/savedata.sav 0 0 255 255 177 99 255 252 159 191 filename: /home/web_user/savedata.sav len: 131088 Detected save type: Unknown type Cannot infer save type ... Assuming a save type of SRAM. filename: home/web_user/savedata.srm

Thysbelon commented 6 months ago

Thank you for reporting this. I was able to recreate this issue instantly using Pokémon Emerald. After some research, I discovered that the cause of this is the fact that mGBA appends RTC data to the save files of games that use an RTC. I'll try to fix the webapp to handle these save files properly when I have the time.

Thysbelon commented 6 months ago

This should be fixed by commit 1409be2

jackada7 commented 6 months ago

Thank you so much for your help!

Thysbelon commented 6 months ago

You're welcome! 😊