• 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: Sierra's Miscellaneous Finds

Sierraffinity

Desperately trying to retire from ROM hacking
1,069
Posts
16
Years
As a ROM hacker, I've had to go and "customize" my ROM quite often to get it to do what I want. As a result, I've found many useful tidbits of information, and I've decided to compile them all into one useful thread. Some of these come from other people; if I forgot to credit you, please tell me!

Tile Molester Alternate "Fix"

Yeah, we've all come across this one. Tile Molester Alternate, the edited version of Tile Molester that can open Windows Palettes, cannot open a ROM more than once.

The reason is because when Tile Molester opens a ROM, it saves some settings, such as saved palettes, to an external file. This external file uses a Document Type Definition file called tmres.dtd. It saves properly; however, upon opening it, it needs the file and cannot find it in the folder, so it simply doesn't open the ROM right. This is simply because the Tile Molester hacker forgot to include that file in the download.

To fix this, open a Tile Molester download (non-Alternate), navigate to the 'resources' folder, and copy and paste the tmres.dtd from that folder into your Tile Molester Alternate's 'resources' folder.
Ta-da! Fixed.

Font Editing in FR/LG/E

The reason that practically no FireRed/LeafGreen/Emerald hack has custom font is because practically nobody has found it. When you do have it, it's simple enough to edit:

Fire Red

Open your preferred version of Tile Molester and navigate to 0x1F3100. It doesn't look like anything, am I right? Well, go to View>Codec and select 2BPP Linear, reverse-order. There's one copy of your font... but mirrored. At the moment, you'll just have to flip it when you edit it, I can't find another way to do so. :( Each color font uses a different copy of the font image... Strange, huh? The other images are at 0x1FF300 for black, 0x20F618 for blue, and 0x21F930 for red.

They also have separate font width tables. These are what determine how wide each letter in pixels is. The tables are at 0x1FB100 for other, 0x207300 for black, 0x217618 for blue, and 0x227930 for red.

Emerald

Editing the font for Emerald is much easier because it only has two font images and two font width tables. The images are at 0x6440E4 and 0x64C2E4, and the tables are at 0x64C0E4 and 0x6542E4, respectively.

Disabling the Gender-chosen Flight Positions for Littleroot Town (Emerald)

This one is easy. There's a check in the flying routine that checks if you're flying to Littleroot. If yes, it then goes to check your gender and assigns the appropriate flight spot. To disable the check for Littleroot Town and make it act like a normal flight place, open Emerald in a hex editor, go to 0x124E62, and replace "00 28 0E D0" with "00 00 00 00".

Hacking the "Wally Catches a Pokémon" Event (Emerald)

There are four specials in that event you should be aware of: special 0x28, special 0x12F, special 0xA0, and special 0x29. special 0x28 saves your first Pokémon into memory for retrieval later, special 0x12F overwrites your first Pokémon with a specified Pokémon, special 0xA0 is the actual battle, and special 0x29 overwrites your first Pokémon with the one saved in memory. Used in that order, and without any modifications to their ASM, you'll have a generic Wally catching tutorial.
To hack it, it depends on what you want to change.

Hacking the Pokémon

Get the hex ID of your Pokémon.
If the number is 0x100 or over, then instead of overwriting the first two bytes with your Pokémon's ID, replace them with "FF 21". Then, subtract 0xFF from your Pokémon ID and follow the next instructions.

Given Pokémon

In a hex editor, navigate to 0x139472. Replace the byte there with your Pokémon ID, unless it's over 0x100, in which case you would put 0xFF there instead. Then skip over the next byte (should be 21) and replace the bytes there with "XX 31", where XX is 00 (unless your Pokémon's ID is over 100, in which case subtract 0xFF from it and put it there).

Battling Pokémon

Do the same as above, except with 0xB0870 for your address.

Hacking the Pokémon's Levels

Get the hex value for what you want the levels to be. Levels cannot exceed 255 (0xFF).

Given Pokémon

In a hex editor, navigate to 0x139482. Replace the byte there with the hex version of what you want your Pokémon's level to be.

Battling Pokémon

Do the same as above, except with 0xB0874 for your address.

Hacking the Starting Position (FireRed)

0x54A04 is the starting map. 0x54A06 is the starting map's bank.
0x54A08 is the starting X position. 0x54A00 is the starting Y position.
Have fun.

Changing the Time FireRed Stays on the Title Screen

This one was discovered by colcolstyles; kudos to him!

The 32-bit value at 0x78C1C controls how many frames the game goes through before it resets itself. There are 59.737 frames in one second. Determine how long you want the title screen to stay before resetting using that formula. (Thanks to knizz for telling me!)

Removing the Flashback System

I'm sure many of you have had weird things happen with the flashback system in FireRed. For instance, with JPAN's overworld system hack, you would get the original sprite; another example would be when it would say strange things when you left a gym. Well, I have found a way to make it act as if you never did any flashback-worthy events.

To patch, navigate to address 0x110F54 and replace "00 28 0F D0" with "00 1C 0F E0". All this does is disable the check for flashback-worthy events, and simply loads the save like R/S/E.

"Porting" the Normal Bicycle from FRLG to Emerald

To make the Mach Bike have the Acro Bike's speed but not its special moves (essentially turning it into FRLG's bike), navigate to 0x1191C8 and replace 4C with 68. Simple!
If you want to make the bike have the bike bell sound when getting on, then navigate to 0xFD35E and overwrite the bytes there with "06 20 8E F7 AE FC 00 06 00 28 06 D1 0B 20 A6 F7 1A FA 00 00 00 00 00 00 00 00 02 20". Not as stupidly simple as the first part, but still easy enough to do.

Well, that's what I have. If you have anything to add, just reply and I'll be glad to add it in.
I hope this thread is a handy resource for anyone that needs it.
 
Last edited:

Sierraffinity

Desperately trying to retire from ROM hacking
1,069
Posts
16
Years
To do it the easier way, could as well just make the two flight locations of Littleroot have the same (X,Y) location where the hero lands on.
You could, but this saves you one more position.
Besides, 00 00 00 00 sounds like having a normal flying data for the map.
No, the 00 00 00 00 overwrites the special check for Littleroot. Without this check, it just loads from the flying position tables as normal.
Maybe you could make it so that you'd change the flying data of some other random map which has its own (for example Petalburg) to 00 28 0E D0.
That way, you could define two different flying locations for Petalburg City if you figured out how Littleroot locates its own two flying locations.
That's also a possibility, and it would be relatively easy to make for an ASM hacker if they just check what bytes I'm overwriting and modify them to, not nop, but another location.

But nice founds you've made :)
Thanks.

"In a hex editor, navigate to 0x139482. Replace the byte there with the hex version of what you want your Pokémon's level to be."

Doesn't make much sense, the byte in 0x139482 is originally 23.
If you didn't read, the sections for "Hacking the Pokémon" and "Hacking the Pokémon's Levels" are in the section for modifying Wally's catching tutorial in Emerald.
What's the "given pokemon" about?
It's the Pokémon that the tutorial uses for battling.
Also, doing this sounds like using a Gameshark code that just changes the byte in 0x139482.
It could be, but why would anybody ever want to temporarily change the battling Pokémon's level in Wally's catching tutorial? Makes no sense.
"0x540A04 is the starting map. 0x540A06 is the starting map's bank.
0x54A08 is the starting X position. 0x54a00 is the starting Y position."

"54a00" --> 54A0A ;)
Nope. Even though you might be inclined to think differently, it's in 0x54A00. Strange, I know.
Responses in bold.
miksy91, I think you just misunderstood most of the page, although it may be that I didn't make it clear enough.
 
Last edited:

miksy91

Dark Energy is back in action! ;)
1,480
Posts
15
Years
"If you didn't read, the sections for "Hacking the Pokémon" and "Hacking the Pokémon's Levels" are in the section for modifying Wally's catching tutorial in Emerald."

I skipped most of the thread and so didn't notice "Hacking the Pokemon's Levels" was only a subtitle. Besides, I picked up the Gameshark code thing by thinking that byte was supposed to change the pokemon appearing in your team in position 1 or something such as that...

If I cared (or hacked R/S/E for that matter), I would have read it through properly :D
 
Last edited:

knizz

192
Posts
16
Years
  • Seen Oct 28, 2020

Disabling the Gender-chosen Flight Positions for Littleroot Town

This one is easy. There's a check in the flying routine that checks if you're flying to Littleroot. If yes, it then goes to check your gender and assigns the appropriate flight spot. To disable the check for Littleroot Town and make it act like a normal flight place, open Emerald in a hex editor, go to 0x124E62, and replace "00 28 0E D0" with "00 00 00 00".
I see that there is a branch at this point. But the two ways aren't symmetrical at all. Do you know more about this? (This is for Firered. Right?)

Hacking the Starting Position (FireRed)

0x540A04 is the starting map. 0x540A06 is the starting map's bank.
0x54A08 is the starting X position. 0x54a00 is the starting Y position.
Have fun.
This helped me a lot. (But you have two typos)

Changing the Time FireRed Stays on the Title Screen

This one was discovered by colcolstyles; kudos to him!

The 32-bit value at 0x78C1C controls how many processor tics (?) the game goes through before it resets itself. Just mess around with the value until you get a desirable outcome.

Actually it's measured in frames. 59.737 frames = 1 second.
 

Sierraffinity

Desperately trying to retire from ROM hacking
1,069
Posts
16
Years
diegoisawesome said:
Disabling the Gender-chosen Flight Positions for Littleroot Town


This one is easy. There's a check in the flying routine that checks if you're flying to Littleroot. If yes, it then goes to check your gender and assigns the appropriate flight spot. To disable the check for Littleroot Town and make it act like a normal flight place, open Emerald in a hex editor, go to 0x124E62, and replace "00 28 0E D0" with "00 00 00 00".

I see that there is a branch at this point. But the two ways aren't symmetrical at all. Do you know more about this? (This is for Firered. Right?) Wrong. Littleroot Town is in R/S/E, and this is for Emerald. Also, even in Emerald, they're not symmetrical because one loads a value from a table, and the other loads the gender value and forces a byte, skipping the table reading.

diegoisawesome said:
Hacking the Starting Position (FireRed)


0x540A04 is the starting map. 0x540A06 is the starting map's bank.
0x54A08 is the starting X position. 0x54a00 is the starting Y position.
Have fun.

This helped me a lot. (But you have two typos) No, I don't. 0x54A04 and 0x54A06 are correct. Just wondering, what made you think that 0x540A04 and 0x540A06 would be right?
diegoisawesome said:
Changing the Time FireRed Stays on the Title Screen


This one was discovered by colcolstyles; kudos to him!

The 32-bit value at 0x78C1C controls how many processor tics (?) the game goes through before it resets itself. Just mess around with the value until you get a desirable outcome.

Actually it's measured in frames. 59.737 frames = 1 second. Thanks for that, I'll add it to the thread.
Replies in bold.
A lot of people seem to misunderstand this thread...
 

knizz

192
Posts
16
Years
  • Seen Oct 28, 2020
0x540A04 is the starting map. 0x540A06 is the starting map's bank.
0x54A08 is the starting X position. 0x54a00 is the starting Y position.
Have fun.

Map and bank have start with 0x540A. X and Y start with 0x54A. One of them must be wrong.
 

Gamer2020

Accept no Imitations!
1,062
Posts
15
Years

Hacking the "Wally Catches a Pokémon" Event (Emerald)

There are four specials in that event you should be aware of: special 0x28, special 0x12F, special 0xA0, and special 0x29. special 0x28 saves your (first?) Pokémon into memory for retrieval later, special 0x12F overwrites your first Pokémon with a specified Pokémon, special 0xA0 is the actual battle, and special 0x29 overwrites your (first?) Pokémon with the one(s?) saved in memory. Used in that order, and without any modifications to their ASM, you'll have a generic Wally catching tutorial.
To hack it, it depends on what you want to change.

Hacking the Pokémon

Get the hex ID of your Pokémon.
If the number is 0x100 or over, then instead of overwriting the last two bytes with "00 00", replace them with "FF 31". Then, subtract 0xFF from your Pokémon ID and follow the next instructions.

Given Pokémon

In a hex editor, navigate to 0x139472. Replace the byte there with your Pokémon ID. Then skip over the next byte (should be 21) and replace the bytes there with "00 00" unless you're following the above instructions.

Battling Pokémon

Do the same as above, except with 0xB0870 for your address.

Hacking the Pokémon's Levels

Get the hex value for what you want the levels to be. Levels cannot exceed 255 (0xFF).

Given Pokémon

In a hex editor, navigate to 0x139482. Replace the byte there with the hex version of what you want your Pokémon's level to be.

Battling Pokémon

Do the same as above, except with 0xB0874 for your address.

This was explained better in these posts by other people -_- (But you knew that.)

http://www.pokecommunity.com/showpost.php?p=6107690&postcount=9
http://www.pokecommunity.com/showpost.php?p=6107710&postcount=10

Also...

The reason that practically no FireRed/LeafGreen/Emerald hack has custom font is because nobody (but me) has found it.

You are not the only person to have found it.
 

Sierraffinity

Desperately trying to retire from ROM hacking
1,069
Posts
16
Years
This was explained better in these posts by other people -_- (But you knew that.)

http://www.pokecommunity.com/showpost.php?p=6107690&postcount=9
http://www.pokecommunity.com/showpost.php?p=6107710&postcount=10
Yeah, I knew that, but I couldn't find those posts when I went looking for them, so I tried explaining it the best way I could think of. I'll fix what I have above.

Also...

You are not the only person to have found it.

I admit, I just assumed that nobody else has found the font addresses because I don't see any FR/LG/E hacks that have custom font, unless they're made by me or are using my patch. In fact, it would be cool if you could point me to a FR/LG/E hack with different font, besides those stated above.
Responses in bold.
I'll get right on fixing up the post.
 
228
Posts
13
Years

Hacking the "Wally Catches a Pokémon" Event (Emerald)

There are four specials in that event you should be aware of: special 0x28, special 0x12F, special 0xA0, and special 0x29. special 0x28 saves your (first?) Pokémon into memory for retrieval later, special 0x12F overwrites your first Pokémon with a specified Pokémon, special 0xA0 is the actual battle, and special 0x29 overwrites your (first?) Pokémon with the one(s?) saved in memory. Used in that order, and without any modifications to their ASM, you'll have a generic Wally catching tutorial.
To hack it, it depends on what you want to change.

I can tell you that special 0x28 only saves the first Pokémon and special 0x28 overwrites your first Pokémon back. For example if you remove special 0x29, and you had a Torchic and a Voltorb, you would have a Zigzagoon and a Voltorb after the tutorial.
 

Sierraffinity

Desperately trying to retire from ROM hacking
1,069
Posts
16
Years
I can tell you that special 0x28 only saves the first Pokémon and special 0x28 overwrites your first Pokémon back. For example if you remove special 0x29, and you had a Torchic and a Voltorb, you would have a Zigzagoon and a Voltorb after the tutorial.
Awesome, thanks.
I was 99% sure that it was like that, but thanks for clearing it up for me.
 

TheDarkShark

Metal Headed Hacker
56
Posts
13
Years
*getting rid of dust on the thread*
I've been having problems with the font width header and aked Diego for help via VM. Just in case anyone else needs help with that, too:
Each entry in the Font width header is one byte long, giving the width of each letter in px. The order of the letters is similar to the ROM-internal character set, which can be found e.g. in table files used by the Thingy texteditor. That is (the most important ones only) :
Spoiler:
All numbers in Hex (obviously -.- ), just add them to the header's start offset.

Oh, and by the way: any updates, Diego?
 

Epsilon

Shiny Scizor
249
Posts
17
Years
Thanks for the font offsets! On that note, some parts of the game (like battling) use a tinier font. I found it at 001EA900 in Tile Molester, same settings.
 

Lunos

Random Uruguayan User
3,112
Posts
15
Years

"Porting" the Normal Bicycle from FRLG to Emerald

To make the Mach Bike have the Acro Bike's speed but not its special moves (essentially turning it into FRLG's bike), navigate to 0x1191C8 and replace 4C with 68. Simple!
If you want to make the bike have the bike bell sound when getting on, then navigate to 0xFD35E and overwrite the bytes there with "06 20 8E F7 AE FC 00 06 00 28 06 D1 0B 20 A6 F7 1A FA 00 00 00 00 00 00 00 00 02 20". Not as stupidly simple as the first part, but still easy enough to do.
I thought this is a relevant issue so I'm reviving this thread.
The FR Bike Port ruins the obstacles at Dewford Cave and Sky Pillar so be careful in case anyone's wanting to use it.
fOI5tpR.gif
 

Sotireon

Strong pokemon. Weak Pokemon.
14
Posts
10
Years
  • Age 33
  • NY
  • Seen Jan 18, 2024
*getting rid of dust on the thread*
I've been having problems with the font width header and aked Diego for help via VM. Just in case anyone else needs help with that, too:
Each entry in the Font width header is one byte long, giving the width of each letter in px. The order of the letters is similar to the ROM-internal character set, which can be found e.g. in table files used by the Thingy texteditor. That is (the most important ones only) :
Spoiler:
All numbers in Hex (obviously -.- ), just add them to the header's start offset.

Oh, and by the way: any updates, Diego?

Hey darkshark, I appreciate u elaborating on the font editing , especially the font width table. I'm so curious, what exactly am I changing when I go to the font width table in Tile Molester? Or should I be using a hex editor and going to the offset from there? With tile molestor, I exported FR font PNGs and slapped RBY font over it. Smh... Super thin though- cause RBY has massive font width- so I'm dying to widen letters by a few pixels to make it look perfect!

You mentioned this earlier """Each entry in the Font width header is one byte long, giving the width of each letter in px."""

Sounds profound, by px u mean hex im assuming, so how are these bytes slightly adjusted to widen all letters by like 2 or 3 pixels?
 
Back
Top