ZZAZZ glitch: Difference between revisions

Jump to navigation Jump to search
no edit summary
>Torchickens
>Torchickens
No edit summary
Line 15:
==Cause==
 
Whether or not a Trainer causes the ZZAZZ glitch or not is controlled by two things; firstly their Trainer class (controlled by byte D059 in Red/Blue or D058 in Yellow) and secondly their roster (controlled by byte D05D in Red/Blue or D05C in Yellow). For the effect to be noticeable the Trainer class may have to be a glitch Trainer, because glitch Trainers in Generation I typically have large base money payouts.
 
In Pokémon Red/Blue/Yellow, money is stored so that a hexadecimal value represents a decimal value, which is related to why the ZZAZZ glitch writes 99 (normally dec:153) to things.
 
Upon encountering a ZZAZZ glitch Trainer, its base money payout will be multiplied by the level of the last Pokémon and the result (the prize money) capped at "009999" will be stored at D079 (D078 in Yellow).
 
Despite the cap, the larger the 'potential' payout the greater corruption is caused. For ZZAZZ glitch causing glitch Trainers the potential payout is way over 9999; the payout cap.
 
Multiplication in the winning money calculation is implemented as a consecutive addition (like 3*4 is 3+3+3+3), but a glitch occurs when the money caps at 9999. Every time the game resets the payout back to 9999, the game moves the payout money pointer 3 bytes forward, so the game keeps writing hex:9999 to memory addresses located past the winning money bytes.
 
The more times that the money value in the current pointer caps at 00 99 99, the more bytes are corrupted.
 
The first byte in the series (XX 99 99) is never written to, meaning that some values stay the way they were. The extent of corruption depends on how many additions the game used. Bytes may not be kept at 99 if they change naturally in battle. An example is the address D083 (D082 in Yellow), which may be constantly changing before the player sends out their Pokémon so that the low HP noise is played.
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu