Universal-Team / pkmn-chest

A Pokémon Bank for the 3rd through 5th generation Pokémon games for the Nintendo DS(i).
https://universal-team.net/projects/pkmn-chest
GNU General Public License v3.0
221 stars 10 forks source link

[Bug Report] Pokemon Emerald save from mGBA will not load #85

Open flanter21 opened 9 months ago

flanter21 commented 9 months ago

Describe the bug mGBA appends several bytes to the end of the Pokemon Emerald save, probably for the RTC (as I could not replicate this issue with LeafGreen which does not have a ).

To Reproduce Steps to reproduce the behavior:

  1. Copy save file last modified/created by mGBA to SD card.
  2. Open save file in pkmn-chest
  3. See error

Expected behavior Save file will load as normal.

Screenshots If applicable, add screenshots to help explain your problem.

Console (please complete the following information):

Additional context Save file will run just fine in mGBA and GBArunner2. Also works in pkhex. Will also work in pkmn-chest after removing the added bytes at the end of the file (after the string of FF FF FF FF...).

Pinkietron commented 8 months ago

mGBA appends the rtc to the end of the save file as you stated. This makes the file larger than most save managers are expecting, so it won't load. To fix that, open the save in a hex editor on your computer, delete the last line, and then save it. In mGBA settings you can also disable RTC for games so this does not continue to happen.

endrift commented 1 week ago

To fix it, pkmn-chest could also add support for the footer.