Jump to content

[HGSS|ASM] Repointing the Pokédex table in RAM

Recommended Posts

Hi everyone! Last week I managed to insert new Pokémon in HeartGold, but I have still to fix some things, like the Pokédex and the following overworlds. I've also managed to make the game to register the new Pokémon in the Pokédex (the game didn't allow to register Pokémon beyond the 493).


There is a region in the RAM (around the address 022C0AB0) where there is a table of the registered Pokémon in the Pokédex. The first part is a list of the viewed/catched Pokémon, the second one, the proper table (4 bytes for each entry of the Pokédex). Format is PP PP TT 00, where PP PP is the index number of the Pokémon (2 bytes) and TT is the type of register of the Pokémon (00 = none, 01 = only seen, 02 = catched).


But I have a problem, because if I see any Pokémon beyond Arceus, the table overruns other stuff in the RAM, making the game crash. The best solution is repointing the table (maybe to some free space from the Overlay 18 region), but there is also another problem. The table is stored in a different offset in the RAM every time I start the game. How could I find "something" to repoint the table to other region of the RAM?

Link to comment
Share on other sites

Can you find the location in the ROM where this table is stored/loaded from and modify that for persistent adds?

After working hard and setting thousands of breakpoints, I managed to find the instructions which write the table (in random offset). They are in Overlay 18, and in RAM are located in 0x21F7EA0 (writes first table) and 0x21F8556 (writes second table). I'll see what I can do :/

Link to comment
Share on other sites

I finally managed to repoint the second table, now the only thing I have to do is find the instruction which reads the table and shows the Pokémon in the Dex, but I think that this will be even hardest :(

EDIT: Nevermind, I've been very lucky and I have found in stack an offset where I've found the rest of the instructions. HGSS with 721 Pokémon soon (?)

Edited by mikelan98
Link to comment
Share on other sites

  • 3 months later...
  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...