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

Quick Research & Development Thread

Lance32497

LanceKoijer of Pokemon_Addicts
792
Posts
9
Years
Unsure if this has been done already, but whatever. If you want Pokémon to not show their Pokédex number as ??? on the summary screen before getting the National Pokédex, make the following changes:

0x6E272: 00 00 00 00
0x6E280: 00 00 00 00
0x1360F7: E0

This is for FireRed.

I have one problem though, Instead of showing the correct dex number, it only shows ?35
 
5,256
Posts
16
Years
To fix the broken sprite behaviour 0xC, which Advance Map labels as Face Down, you can put B5 FF 05 08 at x39fbf8, and the sprite behaviour will then actually make the sprite face down and not risk the game crashing etc. If you want to make it hide the NPC like it does in RSE, put F1 31 06 08 there instead.
 

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
Changing the second byte in the battle flags in Emerald (02022FEC) to 02 will activate the Wally AI. This means Wally can go against trainers..

I'm not posting this so it goes anywhere or develops further, I just thought it was funny
 
This is kinda useless to everyone, but I'm posting it so that I don't lose this info. This is all for FireRed.

When the player enters a battle, the player's backsprite slides in from the right and stops. To change the position from which the backsprite starts sliding (that is, the sprite's initial position as the screen fades in) change the byte at 0x0323C0. By default, it's F0. Higher than F0 will start the sprite further to the right (depending on how high you put the value, the player may wrap around to the other side of the screen). Lower than F0 will start the sprite further to the left. Regardless, the sprite will stop at the same position. If I can find how to edit this position, or other battle intro stuff, I'll edit this post.

EDIT: To disable the showing of map names when crossing to a new map regardless of the setting in AMap, write 00 00 00 00 to 0x055910. As an aside, the function knizz's idb labelled "show_new_mapname", located at 0x098110, is probably the key to getting unique graphics to show for each map name. Some of the function calls look promising (to my untrained eye) for messing with what bg is loaded. EDIT3: It appears that you still have to set A-Map to not show the name. Granted, in FireRed, the names showed even with that set for me, and nulling out that function call finally stopped them from popping down.

EDIT2: To disable the descriptions of items on the start menu (that little blue box that spans the bottom of the screen) regardless of your options settings, write 00 00 00 00 to 0x113034.
 
Last edited:
794
Posts
10
Years
Emerald Wally battle

Spoiler:
 
417
Posts
9
Years
  • Age 33
  • Seen Nov 20, 2016
I don't know if this has been posted before, but whatevs. It came to my attention today that the bag in FireRed crashes if a "main" pocket has more than 42 items (the normal max for regular items). I had always assumed the malloc was done based on a multiple of the numbers inputted at the routine beginning 0x08099E44, because the TM pocket works fine even with over 100 items, but apparently the berry/TM cases mean they run off of something different. Anyhow, to allow for sufficient malloc requests, change ".equ largest_pocket_size" to your new max and insert this:
Code:
.equ largest_pocket_size,	CHANGE THIS LINE
.equ largest_pocket_size_plus_one, largest_pocket_size + 1
.equ strings_size,	largest_pocket_size_plus_one * 19

.org 0x08002B9C
malloc:
	push {lr}
	mov r1, r0

.org 0x081083F4
main:
	push {r4, lr}
	ldr r4, =(0x0203AD18)
	mov r0, #largest_pocket_size_plus_one
	lsl r0, r0, #0x3
	bl malloc
	str r0, [r4, #0x0]
	cmp r0, #0x0
	beq return
	ldr r0, =strings_size
	bl malloc
	str r0, [r4, #0x4]
	cmp r0, #0x0
	beq return
	mov r0, #0x1

return:
	pop {r4}
	pop {r1}
	bx r1
EDIT: I haven't done much testing. I've only thrown like 60 items into the general items pocket before I got bored & assumed this routine was the only problem.

Info on 0x08099E44: http://www.pokecommunity.com/showpost.php?p=9014911&postcount=2018
 
Last edited:
794
Posts
10
Years
Pokemon Emerald Trading Information:
0x08338ED0 is a table with info related to trading. Each entry is 0x3C bytes, used as such:
Spoiler:


There's also traded mail table. It starts at 0x08338FC0 and is 18 bytes long. Each entry is a halfword that's a word being displayed in Mail screen ending with 0x0000. Mail Index in the above struct is responsible for choosing correct entry in mails. FF is used when held item isn't a mail.
 
5,256
Posts
16
Years

C me

Creator of Pokemon League Of Legends
681
Posts
10
Years
  • Age 27
  • Seen Apr 9, 2021
The RAM byte which checks for the current maps type is found at:

FR:0x02036E13 (credits to FBI)
Em:0x0203732F

Useful for custom scripts to check if the player is underwater/underground/secret base etc
 

Epsilon

Shiny Scizor
249
Posts
17
Years
So I have been looking to make the various search categories (A to Z, Type, Lighest, Smallest) work for expanded Pokemon in Fire Red. This is what I found.

The 'lighest list' is from 4442f6 - 4449ef.
A to Z seems to be at 3e7d94, although it weirdly seems to skip some Pokemon.
Type is at 4448fe.
The Smallest list I can't find.

Now, taking the Lightest category, I found the pointer to it at 1037cc. Then at 1037D4 there's 81 01 (385, number of dex entries minus 1). Expanding and repointing the lighest table and changing the number at 1037D4 did seem to expand the list, but it only shows Gen III Pokemon in the slots I added.

So, with these findings, a smarter person than me might be able to figure out how to make the categories work for expanded Pokemon? I reckon there must be limiting bytes somewhere, just as with the National Dex list in the Pokedex Expanding tutorial.

Anyone? :)
 
457
Posts
10
Years
  • Age 28
  • Seen Apr 9, 2024
So, I've gotten sick of being asked for this, so I figured it might be a good idea to share it. It's so short and easy that it definitely doesn't warrant having its own thread, so putting it here seems like a good compromise.

Extending the Number of Direct Sound Tracks on 3rd Gen Pokémon Games

It's as easy as this:
  1. Search for the hex string "00 C5 94 00" in your ROM
  2. Replace said string with "00 CX 94 00" where X stands for the number of maximum DS tracks

Now, there are limits here. Fire Red and Emerald (presumably Leaf Green too) can support a maximum of 12 (0xC) tracks, so you can put 00 CC 94 00 for these ROMs, however, Ruby (presumably Sapphire too) are different. RS can only support a maximum of 7!

BPR - 12
BPG - 12
BPE - 12
AXV - 7
AXP - 7

Here are the offsets for each game for those who care (I don't have Sapphire and Leaf Green. Sorry! :/ But, will sure find them soon):

Ruby: 0x081DDECC (if not, destinjagold or any other Ruby hackers, correct me)
FireRed: 0x081DD0C8
Emerald: 0x082E0104

If you just want to go where to replace C5, go to one byte after it. ;)
 
Mods, just let me know if you want me to separate this post into multiple ones for easier archival in the first post.

This is not my research, but I stumbled upon it and thought that it would be useful for locating the Emerald equivalents, as well as tracking down where other Record Mixed data is stored in the save. This is all for Ruby and Sapphire.

Spoiler:


This wiki also has some interesting information on R/S/E's RTC chip, some of which we already have documented in various places, but some of the information is new to me, so it may be new to others as well. I'll leave links to what I've found:

First, a Glitch City Forum topic about the R/S Berry Glitch that sheds some light on how the RTC works internally.

Second, a page on Furlock's Forest Wiki which explains how the time is stored in the save, and why simply replacing your RTC battery will not restart time-based events. This link also includes a program that can be loaded up in a flashcart and used to modify the RTC of your retail R/S/E's internal time to whatever the user desires. The source for the program is included.

The wiki doesn't look maintained anymore, by the way, so someone may want to archive everything in the event that it's taken down.
 
Last edited:

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
The fanfare and waitfanfare commands in Pokémon Emerald (not sure about other games) work based on a table. The table is at 0x085248BC and works like this:
zSJxS.jpg


If you don't understand what's going on here, the table looks like this:
Z6q9N.jpg

First halfword is the song, second halfword is the length that waitfanfare waits (in ticks or frames, I don't know the term).

The limiter for this table is at 0x080A310C. Change 0x11 to the new amount of fanfares if you're expanding this table.

Fanfare playing works like this if you're interested:
KACDp.jpg

Basically it loops through the table and gets the first halfword each time, then checks if the song you're trying to play is in the table. If not, it just plays the first fanfare in the table (which by default, is the level-up theme)
 

Telinc1

Weirdo Extraordinaire
168
Posts
10
Years
I'm quite confused on how should I nop those bytes? Please enlighten me. Thanks :D
To clarify what GoGo said, basically type 8 00s (meaning, 16 0s) at that location. 00 actually corresponds to a THUMB instruction (pretty sure it's lsl r0,#0x0 or something like that) which shifts r0 zero bits to the left - practically nothing. You have to use this, as ARMv4 THUMB doesn't have a NOP instruction like 65816 ASM does (that's the ASM variant which the SNES uses).
 

Blah

Free supporter
1,924
Posts
11
Years
Actually the defined nop instruction in Thumb is mov r8, r8. Many other instructions raise something called flags.

The instruction lsl, for example, raises the Zero flag, Carry flag and Sign flag. In the case of lsl r0, r0, #0x0, you won't set the carry flag but the other two can be set. This kind of practice could create unexpected results, so it's much better to use mov r8, r8 instead. That's the bytes "C0 46 C0 46".
 
Back
Top