ZZAZZ
A trainer that was never meant to exist. Its battle floods your wallet to the maximum, scrambles the screen, and can quietly ruin your save, all from a class number the game never finished.
Every trainer in the game belongs to a class, a number that says who they are and what they carry. The real classes stop at Lance, number forty-seven. Reach a battle whose roster is empty, or whose class number lands past the end of that list, and the game builds a trainer out of whatever memory sits there. One of the most infamous is ZZAZZ, a trainer whose name is a smear of the same letter and whose battle starts by setting your money to its absolute maximum, then keeps writing over memory it does not own. It is the game reading past the edge of itself, wearing the costume of a Trainer.
Where the trainers run out
Every trainer has a class number, and the game keeps a list of them, forty-seven in all. Turn the dial and watch the list end: number 47 is Lance, the last real class, and everything past him is a glitch trainer the game was never designed to build. ZZAZZ lives out there.
The money overflow
The first thing ZZAZZ does is make you rich, and it is entirely by accident. Your money is not stored as an ordinary number. It lives in exactly three bytes, written in a format called BCD, where each half of a byte holds one decimal digit. Three bytes, six digits, so the most money the game can ever hold is 999,999. As it corrupts memory, ZZAZZ stamps the byte $99 across everything it touches, and those three money bytes are in the way. Each $99 is just the digits nine and nine. Stamp all three and watch the wallet max out.
What triggers it
So how do you ever meet a trainer the game never wrote? It comes down to a single byte the battle engine reads to decide who you are fighting. That byte does not know the difference between a Pokemon, a real trainer, and a number that should never have been there. Walk the byte from a normal encounter out to where ZZAZZ lives.
The real trigger: an empty roster
The dial and the byte tell you where glitch trainers live, but not the exact thing that sets ZZAZZ off. TheZZAZZGlitch mapped all 14,336 trainer rosters in the game, and the trigger turns out to be simpler and stranger than a bad class number: ZZAZZ fires whenever the game loads a trainer roster that holds no Pokemon at all. A normal roster is a short list of species and levels. An empty one has nothing to send out, and the game reaching for that nothing is what floods your money and corrupts your save. Flip through a few real rosters, then the empty one.
The corruption
Maxing your money is only the first thing ZZAZZ does. Its signature is that it takes the byte $99, the one that made your wallet read 999999, and keeps writing it, over a long unbroken run of memory. It does not aim. It just paints, and a lot of what it paints over is the stuff your game is built from. Let it write, and watch it march through a slice of your save one line at a time.
Can you survive it
ZZAZZ has a fearsome reputation as a save killer, and it earns half of it. Here is the part that reputation leaves out: everything it wrecks, the maxed money, the scrambled team, the wall of $99, lives in the game's working memory, the temporary scratch the console forgets the instant you power off. The cartridge save is a separate chip, and ZZAZZ only reaches it if you hand it over. Pick what you do next and see whether you walk away.
The TMTRAINER family
ZZAZZ is not one trainer, it is a whole clan. The 47 real classes have names in a list; every class number past them just keeps reading, and prints whatever it finds as a name. Slide across the classes and watch the names run out, turn to garbled tiles, and then, past a certain point, get accidentally labelled as TMs, which is where the nickname TMTRAINER comes from.
The same trick, one table over
Once you see how ZZAZZ works, you start seeing it everywhere. Every glitch on this shelf is the same move: the game keeps a list, you ask for something past the end of it, and it reads on anyway into memory that was never meant to be that kind of thing. ZZAZZ does it to the trainer list. Its relatives do it to other tables, and one of them turns the whole idea into a tool.
Does it still work
ZZAZZ is not patched out of anything, because it was never a feature to remove; it is a consequence of how the game was built, and that game still ships in every form it always did. What changes from one platform to the next is not whether ZZAZZ happens, but whether you can take it back. Pick where you are playing.
From the ROM
Everything on this page rests on three small facts, and all three are right there in the game's own source. There is no ZZAZZ routine to find, only these edges, and the empty space just past them.
; constants/trainer_constants.asm - the real trainer classes trainer_const CHANNELER ; $2D (45) trainer_const AGATHA ; $2E (46) trainer_const LANCE ; $2F (47) <- the last one ever defined ; nothing past here. classes $30 and up have no trainer. ; constants/battle_constants.asm - how a battle reads its opponent DEF OPP_ID_OFFSET EQU 200 ; an opponent byte >= 200 is a trainer of class (byte - 200) ; ram/wram.asm - why the money maxes at 999999 wPlayerMoney:: ds 3 ; three bytes, BCD. $99 $99 $99 reads as 999999.
Line them up and ZZAZZ writes itself: a class past the forty-seven that exist, reached through an empty roster, with a battle that stamps the byte $99 over three BCD money bytes and keeps going. No secret code, just the places the game stops describing itself.
ZZAZZ was never programmed. It is the shape of the empty space just past the last trainer the game bothered to name.
Go deeper: Super Glitch | arbitrary code execution | Mew under the truck | browse the Glitchhouse.