ZZAZZ glitch: Difference between revisions

According to the ZZAZZ glitch page on glitch city labs these will also trigger it.
(According to the ZZAZZ glitch page on glitch city labs these will also trigger it.)
Line 1: Line 1:
[[File:ZZAZZ.png|200px|thumb|right|The player encounters one of several [[glitch Trainer]]s which can trigger the ZZAZZ glitch.]]
[[File:ZZAZZ.png|200px|thumb|right|The player encounters one of several [[glitch Trainer]]s which can trigger the ZZAZZ glitch.]]


The '''ZZAZZ glitch''' is a data-corrupting [[glitch]] found in the [[Generation I]] {{pkmn|games}}. It can be triggered by using the {{DL|Mew glitch|Ditto glitch}} with a {{stat|Special}} stat of 251, 252, 254 or 255. This makes the {{player}} encounter a [[glitch Trainer]] that in turn causes this glitch to occur.
The '''ZZAZZ glitch''' is a data-corrupting [[glitch]] found in the [[Generation I]] {{pkmn|games}} that occurs when the {{player}} encounter a certain [[glitch Trainer]]. 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, 251, 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.
76

edits