• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Development: I'm Fixin' It: The Pokédex Glitch

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
    • Seen Oct 26, 2011

    Brief Intro

    The Pokédex Glitch is a glitch exclusive to FireRed and LeafGreen US v1.0. The species names present are cut off, most specifically those species names made up of more than one word with a space in between. This causes Pokémon like Squirtle to be listed as "Tiny Pokémon" rather than "Tiny Turtle Pokémon." This was addressed in later releases of the games.

    Description

    Here's a part of the routine disassembled from FireRed US v1.0:

    Code:
    [div="font-family:consolas, courier new,monospace"]0810583a  7828 ldrb r0, [r5, #0x0]
    0810583c  2800 cmp r0, #0x0
    0810583e  d01b beq $08105878
    08105840  4669 mov r1, sp
    08105842  1909 add r1, r1, r4
    08105844  3108 add r1, #0x8
    08105846  1928 add r0, r5, r4
    08105848  7800 ldrb r0, [r0, #0x0]
    0810584a  7008 strb r0, [r1, #0x0]
    0810584c  1c60 add r0, r4, #0x1
    0810584e  0600 lsl r0, r0, #0x18
    08105850  0e04 lsr r4, r0, #0x18
    08105852  1928 add r0, r5, r4
    08105854  7800 ldrb r0, [r0, #0x0]
    08105856  2800 cmp r0, #0x0
    08105858  d00e beq $08105878[/div]

    The very first byte of the species name is loaded. If this byte is 0x0, no name will be loaded because the routine would treat that as an empty string.
    Going on with the routine, there are some other instructions, but we just need to focus on the second cmp. There, the current name byte is checked to see if the end of the string was reached yet.
    A blank space (0x0) is confused for the terminating byte (0xFF), basically. Now, changing the cmp instructions a little:

    Code:
    [div="font-family:consolas, courier new,monospace"]0810583a  7828 ldrb r0, [r5, #0x0]
    0810583c  28ff cmp r0, #0xff
    0810583e  d01b beq $08105878
    08105840  4669 mov r1, sp
    08105842  1909 add r1, r1, r4
    08105844  3108 add r1, #0x8
    08105846  1928 add r0, r5, r4
    08105848  7800 ldrb r0, [r0, #0x0]
    0810584a  7008 strb r0, [r1, #0x0]
    0810584c  1c60 add r0, r4, #0x1
    0810584e  0600 lsl r0, r0, #0x18
    08105850  0e04 lsr r4, r0, #0x18
    08105852  1928 add r0, r5, r4
    08105854  7800 ldrb r0, [r0, #0x0]
    08105856  28ff cmp r0, #0xff
    08105858  d00e beq $08105878[/div]

    Fixing it is so easy it's not even fair; just replace 00 with FF.

    The Offsets


    • FireRed US v1.0

      Code:
      [div="font-family:consolas,courier new,monospace"]0x10583C
      0x105856[/div]
    • LeafGreen US v1.0

      Code:
      [div="font-family:consolas,courier new,monospace"]0x105814
      0x10582E[/div]

    This research document is Copyright © 2010 by HackMew.
    You are not allowed to copy, modify or distribute it without permission.
     

    HackMew

    Mewtwo Strikes Back
    1,314
    Posts
    17
    Years
    • Seen Oct 26, 2011
    What else will they make :D
    Good job!

    I wonder what other differences between v1.0 and v1.1 are.

    Thank you. And I wonder too. AFAIK, there are not many differences at all. Except the said glitch, and the presents screen, I wouldn't really know.
    Comparing the ROMs is not a solution because all the data got shifted, making all offsets and pointers different.
     

    NarutoActor

    The rocks cry out to me
    1,974
    Posts
    15
    Years
  • Nice Nintendo should hire you. XD I never herd of these glitches; They never happened to me. What other glitches are there in FireRed?
     

    HackMew

    Mewtwo Strikes Back
    1,314
    Posts
    17
    Years
    • Seen Oct 26, 2011
    Nice Nintendo should hire you. XD I never herd of these glitches; They never happened to me. What other glitches are there in FireRed?

    There are quite some glitches, but don't worry: I'll fix all of them, one by one xD


    Great job HackMew! I was suffering from this glitch, so thanks for fixing it. ^^

    You're welcome.
     

    FlameShocker

    C++/ASM Programmer
    64
    Posts
    15
    Years
  • Since the thread revival limit does not apply here.... I noticed this way back in '04 when I got FireRed (I still have that cartridge, and the Wireless Adapter that came with it). At the time, I thought that they were going to stick with not having the full species name thing in future games. I also didn't know that they fixed it in later versions of Fire Red.
     
    416
    Posts
    11
    Years
    • Seen Feb 10, 2024
    this same technique can be done in a Hex editor (jump to those 2 offsets and make them FF)
     
    Last edited:
    Back
    Top