GlitchDexJP/Y:217 (v1.0): Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
Line 47: Line 47:
Specifically, the memory address 0xD0E3 is loaded, decremented and used as an offset for the <code>PokedexOrder</code> table at 10:682D. The offset will depend on the index number of the Pokémon minus one; in this case 0xD8. As (10):682D+D8=6905, this is the pointer for ▼たネ゙ゃヂ's Pokédex number (or offset 0x42905).
Specifically, the memory address 0xD0E3 is loaded, decremented and used as an offset for the <code>PokedexOrder</code> table at 10:682D. The offset will depend on the index number of the Pokémon minus one; in this case 0xD8. As (10):682D+D8=6905, this is the pointer for ▼たネ゙ゃヂ's Pokédex number (or offset 0x42905).


It is extrapolated beyond the valid end of the table, and lands in the middle of <code>EmotionBubble</code> code for a <code>call 1622</code> instruction, responsible for adding the correct emotion bubble graphics and the assigning the number of tiles to replace in VRAM. Specifically, the 0x22 (dec:34) is what defines the Pokédex number (family). In v1.1 and later, the location of this routine was changed; hence the relevant instruction at 10:6904 became <code>call 1628</code> with again the 0x28 (dec:40) at 10:6905 defining the family.
It is extrapolated beyond the valid end of the table, and lands in the middle of <code>EmotionBubble</code> code for a <code>call 1622</code> instruction, responsible for adding the correct emotion bubble graphics (e.g. from a Trainer's "!" bubble) and the assigning the number of tiles to replace in VRAM. Specifically, the 0x22 (dec:34) is what defines the Pokédex number (family). In v1.1 and later, the location of this routine was changed; hence the relevant instruction at 10:6904 became <code>call 1628</code> with again the 0x28 (dec:40) at 10:6905 defining the family.


Additional side effects are due to how glitch Pokémon families and the [https://iimarckus.org/i/missing-number/ base stats data structure] works, such as the sprite pointer being retrieved for Nidoking (Wigglytuff in v1.1) but not the sprite bank.
Additional side effects are due to how glitch Pokémon families and the [https://iimarckus.org/i/missing-number/ base stats data structure] works, such as the sprite pointer being retrieved for Nidoking (Wigglytuff in v1.1) but not the sprite bank.