The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Script Firered Special 0x20 0x21 (https://www.pokecommunity.com/showthread.php?t=465072)

Andrea Mizutani January 27th, 2022 11:10 AM

Firered Special 0x20 0x21
 
Hello, I have been editing a hackrom, and I wanted to test the link battles and link trades, but I have noticed that it is somewhat unstable, the connection is established but, sometimes at a random moment the connection drops out of nowhere. If I remember correctly the special 0x20 and 0x21 correspond to the Battles and Trades function, but I don't know what offsets the rom is in and I would like to know where it is to check if changes were made without realizing it. I know the Special Table starts at 15FD60, but I don't know where it ends.

Does anyone know the offset of the special 0x20 and 0x21? Or where does the Special table end?

Additionally, I am also interested in knowing what function the other specials fulfill in Fire Red. Thanks in advance.

Anon822 January 28th, 2022 4:37 AM

Quote:

Originally Posted by Andrea Mizutani (Post 10462850)
Does anyone know the offset of the special 0x20 and 0x21? Or where does the Special table end?

Each special is a 4 byte function pointer. Thus the pointer for special 0x20 starts 4*0x20 = 0x80 bytes after the start of the table.

Quote:

Originally Posted by Andrea Mizutani (Post 10462850)
Additionally, I am also interested in knowing what function the other specials fulfill in Fire Red. Thanks in advance.

You can find a list of specials with descriptive names here.
For example if we want to find the name for special 0x20: The special definitions start at line 11 in the file, 0x20 in decimal is 32, the definition for special 0x20 is on line 11+32=43:
Code:

def_special EnterColosseumPlayerSpot


You can then search for the function name to find the code for it if you want to see what it does.

Andrea Mizutani January 31st, 2022 6:58 AM

Quote:

Originally Posted by Anon822 (Post 10463147)
Each special is a 4 byte function pointer. Thus the pointer for special 0x20 starts 4*0x20 = 0x80 bytes after the start of the table.


You can find a list of specials with descriptive names here.
For example if we want to find the name for special 0x20: The special definitions start at line 11 in the file, 0x20 in decimal is 32, the definition for special 0x20 is on line 11+32=43:
Code:

def_special EnterColosseumPlayerSpot


You can then search for the function name to find the code for it if you want to see what it does.

Oh cool, that was a very accurate answer, thank you very much for that and your time.


All times are GMT -8. The time now is 9:20 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 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 - 2016 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.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.