ZZAZZ glitch: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 3: Line 3:
The '''ZZAZZ glitch''' is a [[glitch]] found in the [[Generation I]] {{pkmn|games}}. It can be encountered 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 {{pkmn|Trainer}} that in turn allows this glitch to occur.
The '''ZZAZZ glitch''' is a [[glitch]] found in the [[Generation I]] {{pkmn|games}}. It can be encountered 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 {{pkmn|Trainer}} that in turn allows this glitch to occur.


This glitch is caused most directly by a buggy multiplication routine used to calculate the amount of money awarded at the end of the battle, though the conditions that trigger the bug do not occur with any normal Trainer. The multiplication routine attempts to ensure that the money value is capped at [[File:PokémonDollar.png|link=Pokémon Dollar]]9999. In the process, it moves a pointer forward, but never moves it back to its original place. This causes the function to write the value 0x99 (as money uses {{wp|binary-coded decimal}} rather than pure hexadecimal) to increasing memory addresses each time the calculated award would exceed [[File:PokémonDollar.png|link=Pokémon Dollar]]9999 after the first. For the Trainers that trigger the ZZAZZ glitch, this happens over two hundred times, destroying many important game variables.
This glitch is caused most directly by a buggy multiplication routine used to calculate the amount of money awarded at the end of the battle, though the conditions that trigger the bug do not occur with any normal Trainer. The multiplication routine attempts to ensure that the money value is capped at [[File:PokémonDollar.png|link=Pokémon Dollar]]9999. In the process, it moves a pointer forward, but never moves it back to its original place. This causes the function to write the value 0x99 (as money uses {{wp|binary-coded decimal}} rather than pure hexadecimal) to the first two out of every three bytes each time the calculated award would exceed [[File:PokémonDollar.png|link=Pokémon Dollar]]9999 after the first. For the Trainers that trigger the ZZAZZ glitch, this happens over two hundred times, destroying many important game variables.


This Trainer can be difficult to beat particularly due to the fact that the {{stat|Hit Points|HP}} bar of the first Pokémon is abnormally high, similar to the side-effects of using a {{m|Super Glitch}} move.
This Trainer can be difficult to beat particularly due to the fact that the {{stat|Hit Points|HP}} bar of the first Pokémon is abnormally high, similar to the side-effects of using a {{m|Super Glitch}} move.
52

edits