Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.

Non-Core Game Glitch Discussion

Corrupting pokemon ranger save file - Page 1

Corrupting pokemon ranger save file

Posted by: forsyz
Date: 2020-02-24 05:40:02
I wonder if its possible to get another manaphy by turning off the game while saving. The game seems to act like there is no save file if it is corrupted i tested this by injecting a corrupted file and all i got was new game. I can't seem to get the timing down as when i turn it off its either before it actually saves or after it saves.

Re: Corrupting pokemon ranger save file

Posted by: Torchickens
Date: 2020-02-24 13:34:12

I wonder if its possible to get another manaphy by turning off the game while saving. The game seems to act like there is no save file if it is corrupted i tested this by injecting a corrupted file and all i got was new game. I can't seem to get the timing down as when i turn it off its either before it actually saves or after it saves.


Good question and thread. :) The only thing I have to add is it may happen with certain Nintendo DS games (e.g. note these are non-Pokémon; the video games Densetsu no Stafy 4 and The Legendary Starfy) where a Nintendo DS game will state the save file is corrupted and explicitly state that the game will delete it.

Other games load backup data if they can (like Diamond/Pearl/Platinum and GBA Ruby/Sapphire/Emerald before it). I don't know what happens if both the original and backup data is corrupted though; maybe Diamond/Pearl/Platinum delete those too (though a fast way to find out could be with an emulator). (Off-topic while it probably wouldn't work, on this note, I wonder if anything could happen if you use Pal Park and the save file is corrupted? Has anyone tried this yet.)

Closer on topic as this is about Ranger, unfortunately I know virtually nothing about the Ranger engine and glitches on a technical basis sorry. Perhaps the save file would have to be checksummed; and the save file is corrupted, but the corrupted save may still be loaded into memory somewhere (i.e. stored in the SRAM/physically on the save but you just can't attempt to load it normally)

For Emerald, as well as early as Generation I/and likely II, other IV games, backup data may still be there - just inaccessible. From III and up, there are two save files; the current save file and the backup, so when you corrupt the current one DPPHGSS loads the backup. For other games with one save file that count here; the save file technically is still there, but the game doesn't let the continue options appear and/or show indication that a save file exists. This is done by checking the checksum of a save; e.g. a calculation may be done on the save file to create a value, which is compared to the stored checksum value on the save (so it could go something like (very basic example this doesn't actually happen): add all the bytes on the save together, divide by 4. Check if the value at this offset is 05 as it should be if a successful save was made. and so on)

For Ranger then, we'd first have to find the means of finding how the save file validation is done. I did a quick search and it seems someone raised it on Project Pokémon, but for a different game in the Pokémon Ranger series. Apparently the original game may have an encrypted save file, while other Ranger games don't have encryption or at least the same sort of it. https://projectpokemon.org/home/forums/topic/45846-pokemon-ranger-save-file-encryption/