The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!
Research & Development programs in this forum are subject to moderator approval before they are displayed.


Reply
 
Thread Tools
  #1    
Old July 1st, 2010, 03:16 AM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
Gender: Male
Nature: Modest
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...

Code:
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!!
__________________
あなた は しきしゃ です
わたし は ばか です
Reply With Quote
  #2    
Old July 1st, 2010, 06:24 PM
Shiny Quagsire's Avatar
Shiny Quagsire
Being a Wizard
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 16
Gender: Male
Nature: Jolly
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.
__________________



Reply With Quote
  #3    
Old July 1st, 2010, 07:30 PM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
Gender: Male
Nature: Modest
Quote:
Originally Posted by shiny quagsire View Post
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.
__________________
あなた は しきしゃ です
わたし は ばか です
Reply With Quote
  #4    
Old July 1st, 2010, 07:32 PM
Full Metal's Avatar
Full Metal
C(++) Developer.
Community Supporter
 
Join Date: Jan 2008
Location: In my mind.
Age: 18
Gender: Male
Nature: Timid
Send a message via Windows Live Messenger to Full Metal
just one problem with that concept.
i believe, that is checking to see if it should use the national, or kanto pokedex.
__________________

★ full metal.

I like to push it,
and push it,
until my luck is over.
Reply With Quote
  #5    
Old July 1st, 2010, 07:34 PM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
Gender: Male
Nature: Modest
Quote:
Originally Posted by Full Metal View Post
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.
__________________
あなた は しきしゃ です
わたし は ばか です
Reply With Quote
  #6    
Old July 1st, 2010, 07:36 PM
Team Fail's Avatar
Team Fail
A Little Bit Of Sparkle
Community Supporter
 
Join Date: May 2009
Age: 19
Gender: Male
Nature: Brave
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.
__________________

Platinum Supporter Team Fail




"It is said that Charizard's fire burns hotter if it has experienced harsh battles."



Charizard

Reply With Quote
  #7    
Old July 1st, 2010, 08:04 PM
Xenesis's Avatar
Xenesis
Syogun Changer
 
Join Date: May 2006
Location: Australia
Nature: Sassy
Send a message via AIM to Xenesis Send a message via Windows Live Messenger to Xenesis
Quote:
Originally Posted by Darthatron View Post
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.
Reply With Quote
  #8    
Old July 1st, 2010, 08:04 PM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
Gender: Male
Nature: Modest
Quote:
Originally Posted by Team Fail View Post
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.

Quote:
Originally Posted by Xenesis View Post
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. :\
__________________
あなた は しきしゃ です
わたし は ばか です

Last edited by Darthatron; July 1st, 2010 at 08:05 PM. Reason: Your double post has been automatically merged.
Reply With Quote
  #9    
Old July 1st, 2010, 08:11 PM
Xenesis's Avatar
Xenesis
Syogun Changer
 
Join Date: May 2006
Location: Australia
Nature: Sassy
Send a message via AIM to Xenesis Send a message via Windows Live Messenger to Xenesis
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.
Reply With Quote
  #10    
Old July 1st, 2010, 08:23 PM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
Gender: Male
Nature: Modest
Quote:
Originally Posted by Xenesis View Post
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.
__________________
あなた は しきしゃ です
わたし は ばか です
Reply With Quote
  #11    
Old July 7th, 2010, 05:57 AM
Derlo's Avatar
Derlo
Braziliam Hacker!! De Mossoró
 
Join Date: Aug 2007
Send a message via Windows Live Messenger to Derlo
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.
__________________



Pokémon
Essence of Light

Comming Soon...
Reply With Quote
  #12    
Old July 24th, 2010, 09:04 AM
HackMew's Avatar
HackMew
Mewtwo Strikes Back
 
Join Date: Jun 2006
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.
__________________
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 01:54 AM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.