SRAM glitch: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
(→‎Variants: Added Pokémon cloning as a variant, and made a grammar correction.)
m (→‎Explanation: Updated the github permalinks.)
Line 52: Line 52:
==Explanation==
==Explanation==
When saving the game in Generation I, the game calls three functions, each only saving a part of it, and the parts are in fact overlapping:
When saving the game in Generation I, the game calls three functions, each only saving a part of it, and the parts are in fact overlapping:
* The first function<ref>[https://github.com/pret/pokered/blob/6ba3765c5932996f5da6417ae703794ff10bb1cb/engine/save.asm#L198 The first function for saving the game]</ref> saves everything, ''except the party data''.
* The first function<ref>[https://github.com/pret/pokered/blob/1dcaede8b5e41dbec9bf3f2b18c77d1b7d2de708/engine/menus/save.asm#L201 The first function for saving the game]</ref> saves everything, ''except the party data''.
* The second function<ref>[https://github.com/pret/pokered/blob/6ba3765c5932996f5da6417ae703794ff10bb1cb/engine/save.asm#L231 The second function for saving the game]</ref> only saves the current box data.
* The second function<ref>[https://github.com/pret/pokered/blob/1dcaede8b5e41dbec9bf3f2b18c77d1b7d2de708/engine/menus/save.asm#L234 The second function for saving the game]</ref> only saves the current box data.
* The third function<ref>[https://github.com/pret/pokered/blob/6ba3765c5932996f5da6417ae703794ff10bb1cb/engine/save.asm#L251 The third function for saving the game]</ref> saves the party data, the Pokédex data, and (in Yellow) Pikachu's happiness and mood.
* The third function<ref>[https://github.com/pret/pokered/blob/1dcaede8b5e41dbec9bf3f2b18c77d1b7d2de708/engine/menus/save.asm#L254 The third function for saving the game]</ref> saves the party data, the Pokédex data, and (in Yellow) Pikachu's happiness and mood.
Besides being used for a full save, the third function is also used after trading a Pokémon in the Cable Club. Presumably at least one of the first two functions is also intended to be used somewhere else, but they don't seem to be in the final game.
Besides being used for a full save, the third function is also used after trading a Pokémon in the Cable Club. Presumably at least one of the first two functions is also intended to be used somewhere else, but they don't seem to be in the final game.