FlagBrew / PKSM

Gen I to GenVIII save manager.
GNU General Public License v3.0
1.67k stars 173 forks source link

Not a Valid Save File - Emerald Save file will not Load #1432

Closed LordValgor closed 5 months ago

LordValgor commented 6 months ago

Describe the bug I am attempting to load and edit an Emerald sav file, but it returns the error "/savs/filename.sav is not a valid save file." and will not load the file.

To Reproduce Steps to reproduce the behavior:

  1. Dump the sav file using godmode from an r4 cart for DS
  2. Transfer the sav file to my 3ds
  3. Open PKSM and add the sav file
  4. Attempt to load the sav file
  5. Returns error

Expected behavior I expect the sav file to load and function normally within PKSM (so that I may edit/transfer mons).

Screenshots N/A

Information about your environment

Additional context I am doing this with a freshly exported sav file from a physical cart, however I have tested that the sav file can be loaded by an emulator.

steelmonkey commented 5 months ago

Hi I think I found a work around, so what might be happening is that when you save it on the emulator for the first time it makes the file too big. Standard Pokemon rom saves are 128KB, but mine was 129KB, and PKSM seems to not like that one kb while emulators don't seem to mind it.

The work around I found was to use this website make sure it's set to "MiSTer to Emulator/ Raw" add in your .sav under MiSTer, set it to "Gameboy Advance" ,then under "Emulator/Raw" you should see your save as a .srm file, under it set the size to 128kB and convert! After that hit the arrows in the middle of the screen and under "Emulator/Raw" drop in your .srm file choose "Gameboy Advance" hit that convert button again and you should have a 128KB save file that works with your emulators and PKSM.

I can't say how long this fix will work, or if after a few saves the 1KB will somehow return but for now it seems to work fine with me.

LordValgor commented 5 months ago

Hi I think I found a work around, so what might be happening is that when you save it on the emulator for the first time it makes the file too big. Standard Pokemon rom saves are 128KB, but mine was 129KB, and PKSM seems to not like that one kb while emulators don't seem to mind it.

The work around I found was to use this website make sure it's set to "MiSTer to Emulator/ Raw" add in your .sav under MiSTer, set it to "Gameboy Advance" ,then under "Emulator/Raw" you should see your save as a .srm file, under it set the size to 128kB and convert! After that hit the arrows in the middle of the screen and under "Emulator/Raw" drop in your .srm file choose "Gameboy Advance" hit that convert button again and you should have a 128KB save file that works with your emulators and PKSM.

I can't say how long this fix will work, or if after a few saves the 1KB will somehow return but for now it seems to work fine with me.

Thanks for the reply! Interestingly enough I just got this resolved last night.

Short story: It was the nds program I was using to export the sav file. GodMode9i.nds did not make a valid sav file. GBA Backup Tool worked as expected.

Going to mark this as resolved, but maybe the record of this will help someone else in the future with their physical cart sav export lol.