Pokémon No. 152
Pokémon No. 152 is an accessible 152nd Pokédex entry in Pokémon Red, Green, Blue, and Yellow. The 152nd Pokémon varies between different languages and localizations of the games.
It can be registered as a selectable Pokémon in the Pokédex without having to access the expanded Pokédex (which allows access to Pokémon 153 through to 255).
The 152nd Pokémon can be registered in the Pokédex using the SRAM glitch to obtain 255 Pokémon, if the first Pokémon is swapped with the tenth.
If the game is hacked to create a Pokémon with the Pokédex number 152, or the player obtains the glitch Pokémon アノ ﾞ from Pokémon Blue (Japanese) (which has the Pokédex number 152), it can be captured to register a selectable 152nd entry in the Pokédex; however the Rhydon trap still applies.
The 152nd Pokémon can also be registered with the GameShark codes 01FF09D3 and 01FF1CD3 (or 01FF08D3, 01FF1BD3 in Yellow); where the first code registers the 152nd Pokémon as owned, and the second code registers the 152nd Pokémon as seen.
Why it exists?
For storing seen and owned Pokémon in the Pokédex, the developers decided to use 19 addresses (bytes) for "seen" Pokémon (found at D30A-D31C in English Red/Blue) and 19 addresses for "owned" (found at D2F7-D309 in English Red/Blue) Pokémon.
Each bit registers one Pokémon in the Pokédex. The fact that there are 8 bits in a byte means that the Pokédex is able to scroll down to Pokémon 152 (19×8); if bit 0x7 (the eighth bit with bit 0x0 counting as the first) in D31C and/or D309 is set.
The developers decided not to prevent the user from being able to scroll down to Pokémon 152.
The Pokédex numbers for all Pokémon are stored in a contiguous table,
PokedexOrder. This table is used for both converting internal IDs to Pokédex numbers, and vice versa. In all versions listed below except Japanese Blue, the number 152 (0x98) does not appear in the first 256 entries of this table, so there is no Pokémon, glitch or not, with "real" Pokédex number 152. However, the way converting Pokédex numbers to internal IDs works, the game will keep looking for the Pokédex number past the 256th entry, and the byte 0x98 is eventually found in the ROM, if not by sheer coincidence (e.g. as the low bytes of an address), then by virtue of it being the high bytes of the address
vBGMap0, $9800 in the VRAM.
The location of the first 0x98 byte found determines the species of the "Pokémon No. 152". For example, on English Red, the address of the function
Trade_DrawOpenEndOfLinkCable happens to be $10:5298, and a (small-endian) pointer to that function is at $10:5163, meaning that the value of $10:5163 is 0x98 (and the value of $10:5164 is 0x52). This is the "320th entry" of the
PokedexOrder table, which means that the "Pokémon No. 152" on English Red is the Pokémon with internal ID 64, Farfetch'd, even though its "real" Pokédex number is 83, which is the 64th entry of the
Glitch Pokédex ratings
When 152 Pokémon are counted in Professor Oak's Pokédex evaluation, through Professor Oak's PC, talking to him in his laboratory, or being inducted into the Hall of Fame the player is able to obtain a glitch Pokédex rating.
The results vary by game and localization. In some versions, the rating can freeze the game.
Notably in English Red, viewing the glitched Pokédex rating repeatedly can corrupt data including stored PC Pokémon, game time, wild Pokémon on the current map and send the player to another map after the rating has finished and menus are closed.
This is a method of obtaining an unterminated name glitch Pokémon.
- The function to convert Pokédex numbers to internal IDs
- The pointer to the function
Trade_DrawOpenEndOfLinkCable; note that the macro invocations
tradefunc Trade_DrawOpenEndOfLinkCableappearing before this point represent the index of the function pointer in this table, instead of a direct pointer to the function.