PDA

View Full Version : Research: Expanding the FR Pokedex...


Darthatron
July 1st, 2010, 03:16 AM
So I've spent the past 2 hours searching for routine that limits the pokedex in FireRed to 151 pokemon, to little avail. I did find one part of the routine that is part of what limits the dex, but still it doesn't work the way I had hoped. :\

From what I've gathered the byte at 0x08106828 is part of the limiter...

08106828 2897 cmp r0,97h ;Compare r0 to 151
0810682A D901 bls 8106830h ;If =< then branch to 0x08106830
0810682C 2000 mov r0,0h ;Else, r0 = 0x0

So... Yeah... Can any of the better ASM Hackers give me a hand? Pretty please?

And HackMew, if you read this, I know you can help. ;)

THANKS!!

Shiny Quagsire
July 1st, 2010, 06:24 PM
I'm no asm hacker, but I know 97 is 151 in demical form. Maybe if you changed that, you could get a bigger number.

Darthatron
July 1st, 2010, 07:30 PM
I'm no asm hacker, but I know 97 is 151 in demical form. Maybe if you changed that, you could get a bigger number.

Yeah, I know that, but my problem is that it only partly works - stopping only some data from showing up, etc.

Full Metal
July 1st, 2010, 07:32 PM
just one problem with that concept.
i believe, that is checking to see if it should use the national, or kanto pokedex.

Darthatron
July 1st, 2010, 07:34 PM
just one problem with that concept.
i believe, that is checking to see if it should use the national, or kanto pokedex.
Nope, that's checked somewhere else and only happens if the special has been used.

Team Fail
July 1st, 2010, 07:36 PM
Wouldn't it make much more sense to disable the Kanto Pokedex and expand the National Pokedex? All you would need to do is ASM out the option to open the Kanto Dex, and in the game, use the flag to enable the Pokedex, followed by the flag for enabling the National Dex. I'm no ASM hacker, neither do I have knowledge in that area, but it would be a touch easier that way. That's my two cents anyways, I don't know if it would help any.

Xenesis
July 1st, 2010, 08:04 PM
Yeah, I know that, but my problem is that it only partly works - stopping only some data from showing up, etc.

What that probably means that each of the routines used to generate pokedex screens likely have their own checks. If editing one thing only fixes some of the data, then quite simply you'll have to do some more digging.

Darthatron
July 1st, 2010, 08:04 PM
Wouldn't it make much more sense to disable the Kanto Pokedex and expand the National Pokedex? All you would need to do is ASM out the option to open the Kanto Dex, and in the game, use the flag to enable the Pokedex, followed by the flag for enabling the National Dex. I'm no ASM hacker, neither do I have knowledge in that area, but it would be a touch easier that way. That's my two cents anyways, I don't know if it would help any.
Not really. This method involves changing a few bytes, the way you've suggested required writing a completely new routine to go around the Kanto-dex.

What that probably means that each of the routines used to generate pokedex screens likely have their own checks. If editing one thing only fixes some of the data, then quite simply you'll have to do some more digging.
Yes, but I can't seem to locate the other checks. :\

Xenesis
July 1st, 2010, 08:11 PM
One of the techniques that I've found is really helpful in locating routines that display information is setting breakpoints on writes to the VRAM.

The code will usually use BIOS functions (swi 0xX) to uncompress or write text to the VRAM areas, which usually have their own subroutines (bl #0x08abcde) as they're general code.

It's then a matter of just following the link register returns (usually bx lr/bx r0/bx r1) until you find some code that's just after the code run to save to VRAM...usually you'll find some sort of comparison code, index gatherer or something.

It'd be easier with No$GBA if you have that, but you should still be able to use VBA-SDL-H if my memory serves.

Darthatron
July 1st, 2010, 08:23 PM
One of the techniques that I've found is really helpful in locating routines that display information is setting breakpoints on writes to the VRAM.

The code will usually use BIOS functions (swi 0xX) to uncompress or write text to the VRAM areas, which usually have their own subroutines (bl #0x08abcde) as they're general code.

It's then a matter of just following the link register returns (usually bx lr/bx r0/bx r1) until you find some code that's just after the code run to save to VRAM...usually you'll find some sort of comparison code, index gatherer or something.

It'd be easier with No$GBA if you have that, but you should still be able to use VBA-SDL-H if my memory serves.
Yeah, I use No$GBA.

The method I currently used was just a check if the address the Pokedex data is stored at was ever called and then just looking for checks around there. It's really not very efficient. Thanks for the tip. :)

Derlo
July 7th, 2010, 05:57 AM
I think I found the routine that reads the amount of Pokemon, it starts at offset 08043200.

And near the end of the routine, you will find the value 019B.
which corresponds to the total of pokemon you have in the game.
386 Pokemon
025 empty slots
total of 411 (Hex: 019b) Pokémon.

Another routine(08043298) that I found (I think) that loads data from the Pokes or the number corresponding to it. That's because this routine reads the same table in order of Dex.
And when we change the offset table, the numbering goes crazy and the data is not shown.

I do not know if this will be useful. But is there that want to test.
Bye.

HackMew
July 24th, 2010, 09:04 AM
Is it only me or the title is kinda misleading? At first, I thought you mean to expand the total amount of the Pokémon data. But it's not the case, actually. Well, I hacked this already a while ago, but I've lost the offsets (duh). I'll research it again and I'll let you know. By the way: there are many places where the limit is set. Sadly, due to optimization, the limiting value is always embedded into the routine, so all of them need to be edited for the thing to work properly. Last time I did it, I put the maximum amount up to Celebi. Be advised that the first 151 entries are taken directly for the National Dex.