Glitch Pokédex sorting: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
>Sherkel m (Under 100, good night) |
No edit summary |
||
Line 5: | Line 5: | ||
'''Glitch Pokédex sortings''' are invalid Pokédex listing sortings found in {{GSC}}. |
'''Glitch Pokédex sortings''' are invalid Pokédex listing sortings found in {{GSC}}. |
||
The 2nd generation of pokémon games allow the player to select three different modes to order pokémon within the pokédex. These modes include "New Pokédex mode", "Old Pokédex mode" and "A to Z mode". When a specific mode is selected, the game will save the value of the last selected mode in memory. |
|||
When the pokédex is selected from the start menu, the game uses a jumptable to select which sorting function should be used. By changing the value of the last selected mode, it's possible to index this jumptable out of bounds. Because of this, certain modes are able to [[arbitrary code execution|execute arbitrary code]], such as glitch mode 09's execution of $FA20 (Echo RAM for $DA20) in Crystal. |
|||
==Technical details== |
|||
When opened, the game will retrieve the last selected dex mode from wLastDexMode and use that to retrieve a pointer from Pokedex_OrderMonsByMode.Jumptable. |
|||
{| class="wikitable" |
|||
! Game !! Applicable language !! wLastDexMode !! Pokedex_OrderMonsByMode.Jumptable |
|||
|- |
|||
! rowspan="7" | Gold & Silver |
|||
| English || rowspan="5" | $D67E || $10:4BF0 |
|||
|- |
|||
| French || $10:4BF8 |
|||
|- |
|||
| German || $10:4BEA |
|||
|- |
|||
| Italian || $10:4C01 |
|||
|- |
|||
| Spanish || $10:4BF2 |
|||
|- |
|||
| Japanese || $D671 || $10:4ABC |
|||
|- |
|||
| Korean || $D731 || $10:4AF1 |
|||
|- |
|||
! rowspan="6" | Crystal |
|||
| English || rowspan="5" | $01:D959 || $10:4BF0 |
|||
|- |
|||
| French || $10:4BF8 |
|||
|- |
|||
| German || $10:4BE9 |
|||
|- |
|||
| Italian || $10:4C01 |
|||
|- |
|||
| Spanish|| $10:4BF4 |
|||
|- |
|||
| Japanese || $D94C || $10:4ABC |
|||
|} |
|||
==Accessing glitch Pokédex sortings== |
==Accessing glitch Pokédex sortings== |