D09B sprite animation glitches

From Glitch City Wiki
This article is incomplete. Please feel free to add any missing information about the subject. It is missing: More detail such as specific banks, and the purpose of 3873.

The D09B sprite animation glitches are glitches in Pokémon Red, Blue, and Yellow involving memory address D09B (wTownMapSpriteBlinkingEnabled/wPartyMenuAnimMonEnabled/wUnusedD09B) (D09A in Yellow).

This address is normally responsible for animating the 'nest' sprites in a Pokédex area (value 0x01), is also set to 0x01 on the Town Map/Fly menus, and is set to 0x40 on the party menu; enabling the animated OAM sprites. It is usually reset to 0x00 after closing those menus, opening the Start menu, or entering a Trainer battle, however glitches will occur if the value remains at a value other than 0x00 via another glitch.

Text boxes

Having D09B to a non-00 value before interacting with a text box can cause unusual behavior such as glitch text boxes appearing on repeat, or freezes occurring after the end of a page.

This is due to the following code at 3873:

ld a, (D09B)
and a
jr z,387C
call 56C6
(...)

When D09B is a non-00 value, the z flag will not be set, so the game will proceed to execute 56C6 (it appears this is intended to be 1C:56C6 MonNestIconEnd or 1C:56C6 TownMapSpriteBlinkingAnimation). However, in this case 56C6 will be executed at a different bank depending on the location, resulting in garbage data.

Non-overworld locations

The same routine is run for the "Wild (x) appeared!" in a wild battle; in this case at bank 22:56C6 and may always result in a freeze. Pokédex entries similarly attempt to run 2B:56C6, resulting in an invalid opcode at 589B (or freeze if the invalid opcodes are skipped over). However, (unless the value is locked) enabling it before a Pokédex entry from the Pokédex requires setting D09B when the cursor is pointing to "DATA", as opening the sub-menu resets the value back to 00 otherwise.

In Pokémon Yellow

In Pokémon Yellow the glitch appears to be no longer as volatile, instead causing OAM sprites/party menu sprites to momentarily 'blink' on the screen if D09A is locked, or sub-tiles to momentarily appear if D09A was previously changed but reverted by the game. In battle, the Poké Balls HUD may disappear and be replaced with a sub-tile.

Credits

This article or section is a stub. You can help Glitch City Wiki by expanding it.