kwsch / PKHeX

Pokémon Save File Editor
https://projectpokemon.org/pkhex/
Other
3.74k stars 701 forks source link

gen 2 vc save conversion issue. #1477

Closed NinFanBoyFTW closed 7 years ago

NinFanBoyFTW commented 7 years ago

Hi Im sure your already aware of this but just making sure. I know there are a few differences with the save files for pokemon gold and silver on vc as opposed to physical (or emulator) same as gen 1. So when I try to import my save file that I had on my computer into the vc release it says save data is corrupted. But the problem is when I make a new save in the vc games and then export that, edit it in pkhex and bring it back into my 3ds, it also says that the save is corrupted. I know that all of the gen 2 stuff right now is very early and in preliminary stages but I wasn't sure if you were going to be adding the thing in gen 1 where it asks you if this is physical release or vc. Im not sure if that also fixes the save type issue I am having but I just wanted to let you know. Thanks

kwsch commented 7 years ago

double check that the file sizes are the same; PKHeX supports multiple save sizes for gen 2. https://github.com/kwsch/PKHeX/blob/71b1134e44415514f0ca2c1b52a161ece213ca8b/PKHeX.Core/Saves/SaveUtil.cs#L32-L37

The VC is likely expecting the VC size, not any emulator's (larger) size; it'll also expect the same filenames and no extra files (ie no bak's).

works fine according to gbatemp: https://gbatemp.net/threads/pokemon-gold-and-silver-vc-cant-import-saves-from-vba.484775/

NinFanBoyFTW commented 7 years ago

Thanks. I had to remove the last 2 lines on the save file in my hex editor for it to work. Dont you think pkhex should do that for you if you import an emulator save file into pkhex and select "Yes: Virtual Console save". Couldnt pkhex check if those 2 lines of code are in the file after that and then remove them because I feel like it would save many people the hassle of wondering why its not working / forcing them to use a hex editor. Currently when I select virtual console save for these emulator saves, all it does is changes the legality settings. Also I am always able to import these edited vc saves into VBA with no trouble even after editing those last 2 lines of code so I dont think it is such a bad thing to do. Worst case scenario maybe the same way pkhex would check if those 2 lines are there when you select virtual console, when you click physical cartridge instead it would check if those 2 lines are there and if they are not (virtual console save) then pkhex would add them back.