ZZAZZ glitch: Difference between revisions

no edit summary
No edit summary
No edit summary
 
Line 4: Line 4:


==Overview==
==Overview==
In [[Pokémon Red and Blue]] it can be triggered by using the {{DL|Mew glitch|Ditto glitch}} with a {{stat|Special}} stat of 248, {{Tt|251|May require 0102EFC0 and 0102F0C0 because this glitch trainer Special stat ID may have an invalid sprite which can cause an endless trade screen loop.}}, 252, 254 or 255 and without altering the {{stat|Attack}} stat. In [[Pokémon Yellow]] the stats of 249, 250 or 253 will also cause the glitch in addition to the above.
In [[Pokémon Red and Blue]] (as well as the original Japanese versions) it can be triggered by using the {{DL|Mew glitch|Ditto glitch}} with a {{stat|Special}} stat of 248, {{Tt|251|May require 0102EFC0 and 0102F0C0 because this glitch trainer Special stat ID may have an invalid sprite which can cause an endless trade screen loop.}}, 252, 254 or 255 and without altering the {{stat|Attack}} stat. In [[Pokémon Yellow]] the stats of 249, 250 or 253 will also cause the glitch in addition to the above.


The glitch is directly caused by a multiplication routine used to calculate the amount of [[money]] awarded at the end of the battle. As money in Generation I is stored as {{wp|binary-coded decimal}}, the game must perform several arithmetic functions in order to load the proper value into memory; as part of this loading, the game attempts to ensure that the money value is capped at {{PDollar}}9999. However, since the glitch Trainers encountered have an invalid money value unlike normal {{pkmn|Trainer}}s, the arithmetic functions fail to behave as expected, corrupting a pointer<ref>http://forums.glitchcity.info/index.php/topic,36.msg194415.html#msg194415</ref> and causing the byte 0x99 to be written to the first two out of every three bytes for each time the calculated award would exceed {{PDollar}}9999 after the first. For the Trainers that trigger the ZZAZZ glitch, this happens over two hundred times, destroying many important game variables.
The glitch is directly caused by a multiplication routine used to calculate the amount of [[money]] awarded at the end of the battle. As money in Generation I is stored as {{wp|binary-coded decimal}}, the game must perform several arithmetic functions in order to load the proper value into memory; as part of this loading, the game attempts to ensure that the money value is capped at {{PDollar}}9999. However, since the glitch Trainers encountered have an invalid money value unlike normal {{pkmn|Trainer}}s, the arithmetic functions fail to behave as expected, corrupting a pointer<ref>http://forums.glitchcity.info/index.php/topic,36.msg194415.html#msg194415</ref> and causing the byte 0x99 to be written to the first two out of every three bytes for each time the calculated award would exceed {{PDollar}}9999 after the first. For the Trainers that trigger the ZZAZZ glitch, this happens over two hundred times, destroying many important game variables.
Line 12: Line 12:
Although the player's name has been corrupted, the [[Original Trainer|OT]] values of the party Pokémon have not, causing them to be treated as [[outsider Pokémon]]. Combined with the fact that most of them are level 153, they will always disobey the player (as not even the {{badge|Earth}} is programmed to make Pokémon over level 100 obey), unless the player's name stays the same after the glitch (with a name of ZZ or ZZ<any character>ZZ).
Although the player's name has been corrupted, the [[Original Trainer|OT]] values of the party Pokémon have not, causing them to be treated as [[outsider Pokémon]]. Combined with the fact that most of them are level 153, they will always disobey the player (as not even the {{badge|Earth}} is programmed to make Pokémon over level 100 obey), unless the player's name stays the same after the glitch (with a name of ZZ or ZZ<any character>ZZ).


If the player attempts to battle a regular Trainer after triggering the glitch, that Trainer will become a glitch Trainer with the player's sprite. Their name will either be the player's original name, their ZZAZZ-glitched name, or sometimes a different glitched name, and their party will again consist mainly of several [['M (FF)]] or [[Q ◣]]. Attempting to battle this Trainer will not outright cause the game to crash, although attempting to view the player's party still will. Using items will not end the battle this time. The Trainer is almost impossible to defeat, as the player's Pokémon will not obey (and/or will [[faint]] themselves with Explosion, causing the party menu to appear and crash the game), and at least one of the Trainer's level 153 Pokémon has an extremely large amount of HP.
If the player attempts to battle a regular Trainer after triggering the glitch, that Trainer will become a glitch Trainer with the player's sprite. Their name will either be the player's original name, their ZZAZZ-glitched name, or sometimes a different glitched name, and their party will again consist mainly of several [['M (FF)]] or [[Q ◣]]. Attempting to battle this Trainer will not outright cause the game to freeze, although attempting to view the player's party still will. Using items will not end the battle this time. The Trainer is almost impossible to defeat, as the player's Pokémon will not obey (and/or will [[faint]] themselves with Explosion, causing the party menu to appear and freeze the game with the exception of if the player has two or five Pokémon), and at least one of the Trainer's level 153 Pokémon has an extremely large amount of HP.


Less immediately noticeable effects of the widespread corruption include changes to in-game interfaces such as the [[menu]]. If a player attempts to [[save]] the game, glitch options may be displayed that could possibly cause the game to crash. This is due to the corruption of memory address D12C (D12B in Yellow) to an invalid value, which controls which two options (such as Yes/No or Heal/Cancel) appear when the player is provided a choice, along with the size of the menu.
Less immediately noticeable effects of the widespread corruption include changes to in-game interfaces such as the [[menu]]. If a player attempts to [[save]] the game, glitch options may be displayed that could possibly cause the game to crash. This is due to the corruption of memory address D12C (D12B in Yellow) to an invalid value, which controls which two options (such as Yes/No or Heal/Cancel) appear when the player is provided a choice, along with the size of the menu.