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

Research: FireRed Pokédex Hacking

Darthatron

巨大なトロール。
1,152
Posts
18
Years
Code:
08104BF2                 CMP     R0, #0x96
I believe this is what "counts" the seen Pokemon for the RegionalDex.

Full routine:
Spoiler:
 
150
Posts
15
Years
Hmmm... one more thing i noticed while trying to extend the regional dex is that the pokemon's numbers dont show up on the summary screen (shows up as ???). Not that much of a big thing, but it would be a little more neater.... if someone had a fix?
 

Jambo51

Glory To Arstotzka
736
Posts
14
Years
  • Seen Jan 28, 2018
Hmmm... one more thing i noticed while trying to extend the regional dex is that the pokemon's numbers dont show up on the summary screen (shows up as ???). Not that much of a big thing, but it would be a little more neater.... if someone had a fix?

Buddy, I had to completely rewrite the Pokédex for it to support regional dexes. It simply is not designed to support a regional dex. The Kanto dex in FR is literally the national dex but cut to only be 151 long.

I built a brand new routine for it to support the Regional Dex, but it's combined with a lot of small changes in other places to make it all work.

Even then, I still have at least one thing which I've overlooked at this stage which will need fixed, so it's not finished.
 
Last edited:
150
Posts
15
Years
Buddy, I had to completely rewrite the Pokédex for it to support regional dexes. It simply is not designed to support a regional dex. The Kanto dex in FR is literally the national dex but cut to only be 151 long.

I built a brand new routine for it to support the National Dex, but it's combined with a lot of small changes in other places to make it all work.

Even then, I still have at least one thing which I've overlooked at this stage which will need fixed, so it's not finished.

ah no... i was just trying to extend the kanto dex... kinda like "faking" a regional dex, not an actual regional dex like in GSC :P... I figured there must be a check for the national dex when the data was being displayed on the summary screen, but I was having trouble finding the routine that does this to check....

Your work is impressive, to say the least, and I wasn't trying to take away from it... but in my hack, i figured around 180 pokemon would be enough, so i wanted to remove the national dex completely and only leave the Kanto Dex, so i figured it would only be a couple of checks that needed bypassing. But what u've found so far are the main things, so its fine. :D
 

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
There's a Malloc (Memory Allocation) in the lead up to the Pokédex routine. If you don't hack this to have the correct length of memory, the ROM will simply crash when it attempts to load the NATIONAL dex (The Kanto Dex is loaded separately, but uses the same Malloc as the National Dex).

The Pokédex's Malloc is specifically designed to support a maximum of 386 Pokémon, and you need to raise that limit to 411 to support the Unown remnants. (Among other complicated things too!).

The length of the malloc is determined at 0x1025EC, with a mov r0, #0xC1.

The safest way (and the way I did it personally) was to insert a small routine at this location which branches off to a custom routine.
This is the routine I would have used if I simply wanted the Unown Remnants to be included:

Code:
.text
.align 2
.thumb
.thumb_func
.global dexmemorylengthen
main:
 ldr r0, length
 bl there
 ldr r1, return
 bx r1
there: ldr r1, there2
 bx r1
.align
length: .word 0x00000CD8
return: .word 0x081025F5
there2: .word 0x08002B9D

To insert this routine, navigate to 0x1025EC, and change the code there to:

Code:
00 48 00 47 XX XX XX 08

Where the XXXXXX08 stands for your pointer to the routine plus 1 for thumb.

This should help, as everything else is more obvious, and this is the one thing which is truly quite well hidden.

EDIT: I should have said that the "length" is the number of Pokémon in your Pokédex multiplied by 8. So for an unexpanded Pokédex it would be:
(0x182 * 0x8) = 0xC10
For including the Unown remnants, it would be:
(0x19B * 0x8) = 0xCD8
For having 649 Pokémon, it would be:
(0x289 * 0x8) = 0x1448.

So what youre saying is if I put f68 (1ed *8) I can get 493 pokemon just like that after repointing the tables? The game doesnt freeze when i insert the asm, so it must have worked, but theres no way of making sure, because theres no way for me to record the last pokemon to the pokedex, and so i cant see the last pokemon (arceus) in the pokedex.
 
Last edited:
534
Posts
11
Years
  • Age 26
  • Seen Jul 24, 2023
Hey guys! Can everything Jambo51 provided decrease the number of Pokemon in the Pokedex? For example, I only want 256 Pokemon in my Pokedex but still after catching that 256 Pokemon, I can still get the 100% completion of the Pokedex.
 

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
Well I succeeded in getting 494 pokemon, but everything after Chimecho comes up as the 10 ?s but everything else works. how can i fix the ?????????? glitch?
 

ShyRayq

Unprofessional Unprofessional
1,856
Posts
16
Years
  • Seen Apr 2, 2024
Well I succeeded in getting 494 pokemon, but everything after Chimecho comes up as the 10 ?s but everything else works. how can i fix the ?????????? glitch?

Are you sure you renamed all the new Pokemon? Or maybe you didn't repoint and expand the Pokedex data table. Or maybe you remove all the limiters. Just some things to consider
 

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
I renamed them all. The fact that the game doesnt freeze is a sign that it CAN support them, just only the names arent appearing. I repointed every table and it all works except names after chimecho. I did expand it since if you try a wildbattle on fire red with unexpanded it freezes. Mine doesnt.

You mentioned limiters, which are the limiters?
 

ShyRayq

Unprofessional Unprofessional
1,856
Posts
16
Years
  • Seen Apr 2, 2024
I renamed them all. The fact that the game doesnt freeze is a sign that it CAN support them, just only the names arent appearing. I repointed every table and it all works except names after chimecho. I did expand it since if you try a wildbattle on fire red with unexpanded it freezes. Mine doesnt.

You mentioned limiters, which are the limiters?

Okay, these are the limiters.
Replace the 2 bytes at these addresses with the number of pokemon IN HEX (reversed)
0x431F4
0x43240
0x4328C
0x459EC
0x7464C
0x7471C
0x7477C
0xCB160
0xCB16C
0x1037D4
0x103870
0x104C28

Replace the 2 bytes at these addresses with the number of pokemon -1 IN HEX (reversed)
0x88EA4
0x103920

That should be enough, but if it still doesn't work, I have a bunch of other limiters that do other things. But if it works, thats great.
 

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
Okay, these are the limiters.
Replace the 2 bytes at these addresses with the number of pokemon IN HEX (reversed)
0x431F4
0x43240
0x4328C
0x459EC
0x7464C
0x7471C
0x7477C
0xCB160
0xCB16C
0x1037D4
0x103870
0x104C28

Replace the 2 bytes at these addresses with the number of pokemon -1 IN HEX (reversed)
0x88EA4
0x103920

That should be enough, but if it still doesn't work, I have a bunch of other limiters that do other things. But if it works, thats great.


What i didnt post yesterday was that i made a trainer battle where a guy has darkrai. Darkrai is in the 491 SLOT but it comes up as 412 burmy. Theres like 70 412s and they arent seen yet but ill fix it.


EDIT: Now the numbers from 412-490 are gone. It goes
409 ------
410 ------
411 ------
491 Burmy

Why does this happen??? I think there are more limiters you should say.
 
Last edited:
534
Posts
11
Years
  • Age 26
  • Seen Jul 24, 2023
Hey dudes, how do I make the maximum number of pokemon in the pokedex just 200? I want to decrease the number of pokemon for my hack. How do I limit the pokedex to 200 entries and still get the "pokedex complete!" certificate?
 

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
Possible, but not easy. Find the limiters (from an early post on pg6 or from dragoon's post)
and decrease them to how many you want.
This is only a suggestion though...
if it doesnt work, compile the asm routine on pg6
 
1
Posts
11
Years
  • Seen Jul 6, 2014
Well first off I apologize if this is in the wrong section, and for needing to ask...
Evolutions work without National Dex:
Spoiler:

At the risk of sounding terrible can someone explain this to me? I'll admit I'm not the best scripter though just changing a couple bytes I can do that though when I opened XSE to 0xCE91A I got

'-----------------------
#org 0xCE91A
fadescreen 0x28
copyscriptbanks 0xDD 0x11
comparefarbytetofarbyte 0x22018128 0x4807836A
bufferpcitem 0x78 0x88
warp4 0x18 0xC0 0x0 0x4450 0x8302
nop1



Which is already looking wrong to me... Though I did change the 0x22018128 to 0x000014E0 which would always compile to 0x800014E0 and would break the game when an evolution happened... So I changed that back and tried then I changed the 0x4807836A to 0x000014E0 which also kept going to 0x800014E0 which when I tried to evolve The animation did happen correctly the Natu became a Xatu though it still said Natu stopped evolving and left me with Natu...
So yeah.. Im out of ideas... any help would be appreciated..
 

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
Dude, bytes as in open it in a hex editor and change the bytes...
You cant script everything unless otherwise specified to open in a script editor, but you need to know the difference
 
5,256
Posts
16
Years
Hm, for some reason my ROM crashes when I evolve my Mudkip and haven't unlocked the National Dex, even though I changed the bytes as listed in the OP. Has anyone else encountered this?

edit: For clarity, the evolution animation works perfectly, but then, after "Congratulations, your Mudkip evolved into Marshtomp!" appears and the red arrow is drawn on screen, the screen freezes and after a few seconds the game restarts. If I stop the evolution from happening midway then nothing freezes and it works as normal. This is FireRed of course and I'm using VBA.

edit 2: Hm, once I cancel the evolution and then level up Mudkip to 17, the evolution sequence works perfectly - this is true in two different maps. I'm testing a separate Hoenn Pokémon now.

edit 3: Weird, it only seems to apply to Mudkip. :/
 
Last edited:

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
maybe it's because it's trying to learn mud shot as soon as it evolves... that could be the problem.
 
510
Posts
11
Years
  • Seen Apr 14, 2024
Is there a way to change the values of Height and Width to metric units? Is there any limitation in space?
 
Back
Top