Jump to content
Sign in to follow this  
mikelan98

answered [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).

Nrj5MVV.png

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).

cZNPWhr.png

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?

Share this post


Link to post
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 :/

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...