• 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

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
The cmp r8, r0.

r0 has the limit in all four screenshots.

You keep beating me to the answer in each thread >.>

Anyway, the routines are right there, but they aren't actually "MOV r0, #0x19A" because 0x19A is over a byte. You wouldn't see that in the rom, you'd see an lsl operation that basically doubles a value to get 0x19A.
It'd look like:
MOV r0, #0xCD
LSL r0, r0, #1
 

~SAGE

Peruvian Rom Hacker
39
Posts
9
Years
I've just got some very quick offsets for Pokedex hacking.

I'm not sure whether it's already been posted, I don't think so, as I had to discover these on my own.

I've found 2 limiters for the Kantodex that are quite useful, which when combined with Jambo51's already posted offsets, can allow for the Kantodex to act as a national dex.

Even though Jambo already found the limiter for the Kantodex itself, it would still not display the correct seen/caught numbers as they were still limited to 150 as were the habitats.

By changing the number 96 at the offset: 104BF2
You can extend the limit to the seen/caught text. Eg. changing 96 to FA will allow for a max of 250 seen/caught Pokemon.

By changing the number 97 at the offset: 106828
You can extend the number of Pokemon that will be correctly featured in the habitat pages. Eg. changing 97 to FA will allow for the first 250 Pokemon in your pokedex to be displayed in the habitat pages before receiving the national dex.

This can be helpful as it stops people from having to give the national dex at the start of the game.

I'll just repost Jambo's limiters from his thread here

0x10352C - mov r1, #0x97
0x1035F6 - cmp r0, #0x96

Just change those 2 bytes at that offset to the number of Pokemon you want in.




I have a question
I had expanded the pokedex of my rom
but i can't reach to view the habitat's pages correctly

what i should to do?
 
788
Posts
17
Years
  • Age 29
  • Seen yesterday
Disable Trade Restrictions [EM]

Emerald has the same trade restrictions as FR.

  • You can't trade or be traded an egg (even of a Hoenn Pokemon)
  • You can't trade or be traded a Pokemon not in the Hoenn Dex (even from another RSE)
  • You can't trade with FRLG

All three of these are unlocked by enabling the National Dex. However, if you want to disable those restrictions without giving out the National Dex:

Code:
0x08009684: C0 46 01 20
0x0800968C: C0 46 01 20
0x08079138: C0 46 01 20
0x0807A62E: C0 46 01 20

Constant Base Power For Hidden Power [EM]

Just null out the relevant strh.

Code:
0x080544D0: C0 46

Just as in Fire Red, the move data table lists HP's base power as 0x01 (that's so the game displays hyphens for the power). To avoid excessively weak Hidden Powers, change its base power in an attack editor.
 
Last edited:

Telinc1

Weirdo Extraordinaire
168
Posts
10
Years
NOPing out the bl at 0x080BD614 (bl sub_8055F48) will disable the bicycle music (in layman terms, put C0 46 C0 46 at BD614).
A bl to the same location (sub_8055F48) also exists at 0x080CA650, which is part of sp157_activate_bike. I haven't tested nuking that, though.
 

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
I figured out something while I was importing music from PMD Red Rescue Team into Fire Red. I found that the music I inserted would be far too soft, but I didn't know how to make it louder.

I learned that the beginning of each track starts with "bc 00" and somewhere, not too far after that is "bd" followed by another byte. This byte is the instrument the track uses (If the track uses multiple instruments during its loop there will be multiple "bd"s). "Be" changes the "force", which is how intensely the instruments play. There are usually many of these per track as well, depending on the type of song.

"BC 00 BB 40 BD 18 C2 2C BF 5E BE 3B"

This is an example of what it might look like. For me I just changed the value after "be" to whichever value I wanted (usually 70-80 or 46-50 in hex). This technically isn't the true volume of the track, but it gave me the desired result.

I didn't look into what BC and BF meant or the rest of the structure, but it was something that I thought might be useful for somebody who is importing songs from other games and can't find a better way to change the "volume".

Sorry to burst your bubble, but this isn't really research and it's certainly not development. If you look in MPlayDef.s it'll show you each of the command names and they're all very suggestive of what they do except for the library ones (but you don't need to know those since.. they're libraries and not present in all games)
 
130
Posts
8
Years
  • Age 28
  • Seen Jun 14, 2023
For Emerald

The game displays the default sprite, icon and base stats for Deoxys



01 BC 00 47 at 0x8034C32 for the sprite.

C0 46 C0 46 C0 46 C0 46 at 0x8068A2C for the stats.

C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 at 0x80D3030 for the icon.

Not sure if I can ask this here, but can someone port this to Fire Red if it hasn't been done already? I would like Deoxys to be normal forme.
 

AkameTheBulbasaur

Akame Marukawa of Iyotono
409
Posts
10
Years
Not sure if I can ask this here, but can someone port this to Fire Red if it hasn't been done already? I would like Deoxys to be normal forme.

The base stats for Deoxys actually used by FireRed are at 0x25E086. You can edit them to be normal forme manually there.

The Front sprite is at 0xE3958C and the Back sprite is at 0xE39D70. They're both two frames, so if you want to edit the sprite you'll have to change both frames. Frame 1 is Normal Forme and Frame 2 is Attack Forme. So if you wanted Normal form you'd just have to change the second one to also be Normal Forme. If you wanted Defense or Speed Formes you'd have to change both frames to be those or it will just show up as Attack Forme by default. Deoxys is the only Pokemon that has two frames for their sprite by default in FireRed. If you change the sprite for one frame it won't really change it (or at the very least it won't if you only change the first one.)

The Normal Form icon is at 0xE3A388. Like the sprite, the Icon has twice as many frames as the rest (in this case four instead of two) although the game obviously only uses the last two frames. This is not too difficult to edit either. NSE will show you all four frames, and you can go from there. If you want other Formes you will need to edit all of the frames, same as the sprite.
 
Last edited:

BluRose

blu rass
811
Posts
9
Years
The base stats for Deoxys actually used by FireRed are at 0x25E086. You can edit them to be normal forme manually there.
Spoiler:
Code:
0x0825E086 (0x38 bytes; 0x1C x 2):
38 00 3E 00 44 00 4A 00 50 00 56 00 5C 00 61 00 
67 00 6D 00 73 00 78 00 7E 00 83 00 88 00 8E 00 
93 00 98 00 9D 00 A2 00 A7 00 AB 00 B0 00 B5 00 
B9 00 BD 00 C1 00 C5 00

Decimal conversion of the first 12 bytes:
56 00 62 00 68 00 74 00 80 00 86 00
To assume that there is a 00 byte in between each actual stat, the base stats shown are:
HP: 56
Attack: 62
Defense: 68
Speed: 74
Sp. Attack: 80
Sp. Defense: 86

Actual:
HP: 50
Attack: 180
Defense: 20
Speed: 150
Sp. Attack: 180
Sp. Defense: 20

Point being, you sure that the base stats are located at 0x0825E086?
Unless if I'm totally off in understanding this...?

EDIT: Sprites and Icons are correct, though <3
EDIT2: Normal Doexys' Base Stats are at 0x0825745C, but this doesn't matter.
"32 B4 14 96 B4 14" doesn't exist in the ROM, however... Does the ROM use multipliers to change the base stats...?
EDIT3: "32 00 B4 00 14 00 96 00 B4 00 14 00" exists in the ROM at 0x0825E026 with a pointer located at 0x08044704. I don't have IDA or anything to check it out, though, so...
 
Last edited:
130
Posts
8
Years
  • Age 28
  • Seen Jun 14, 2023
The base stats for Deoxys actually used by FireRed are at 0x25E086. You can edit them to be normal forme manually there.

The Front sprite is at 0xE3958C and the Back sprite is at 0xE39D70. They're both two frames, so if you want to edit the sprite you'll have to change both frames. Frame 1 is Normal Forme and Frame 2 is Attack Forme. So if you wanted Normal form you'd just have to change the second one to also be Normal Forme. If you wanted Defense or Speed Formes you'd have to change both frames to be those or it will just show up as Attack Forme by default. Deoxys is the only Pokemon that has two frames for their sprite by default in FireRed. If you change the sprite for one frame it won't really change it (or at the very least it won't if you only change the first one.)

The Normal Form icon is at 0xE3A388. Like the sprite, the Icon has twice as many frames as the rest (in this case four instead of two) although the game obviously only uses the last two frames. This is not too difficult to edit either. NSE will show you all four frames, and you can go from there. If you want other Formes you will need to edit all of the frames, same as the sprite.

So for the sprites, are they compressed or can I just put the normal forme over the attack forme and not have to worry about ruining code behind it?

Code:
0x0825E086 (0x38 bytes; 0x1C x 2):
38 00 3E 00 44 00 4A 00 50 00 56 00 5C 00 61 00 
67 00 6D 00 73 00 78 00 7E 00 83 00 88 00 8E 00 
93 00 98 00 9D 00 A2 00 A7 00 AB 00 B0 00 B5 00 
B9 00 BD 00 C1 00 C5 00

Decimal conversion of the first 12 bytes:
56 00 62 00 68 00 74 00 80 00 86 00
To assume that there is a 00 byte in between each actual stat, the base stats shown are:
HP: 56
Attack: 62
Defense: 68
Speed: 74
Sp. Attack: 80
Sp. Defense: 86

Actual:
HP: 50
Attack: 180
Defense: 20
Speed: 150
Sp. Attack: 180
Sp. Defense: 20

Point being, you sure that the base stats are located at 0x0825E086?
Unless if I'm totally off in understanding this...?

EDIT: Sprites and Icons are correct, though <3
EDIT2: Normal Doexys' Base Stats are at 0x0825745C, but this doesn't matter.
"32 B4 14 96 B4 14" doesn't exist in the ROM, however... Does the ROM use multipliers to change the base stats...?
EDIT3: "32 00 B4 00 14 00 96 00 B4 00 14 00" exists in the ROM at 0x0825E026 with a pointer located at 0x08044704. I don't have IDA or anything to check it out, though, so...

There's a lot of stuff here. I'm assuming that at 0x25e026 those are what you believe the stats to be? I'm going to check it out.
 

BluRose

blu rass
811
Posts
9
Years
So for the sprites, are they compressed or can I just put the normal forme over the attack forme and not have to worry about ruining code behind it?

There's a lot of stuff here. I'm assuming that at 0x25e026 those are what you believe the stats to be? I'm going to check it out.
it's basically like a normal sprite
you should be able to just paste normal forme onto attack forme without any repercussions

that's what i'm thinking, yes, but i have no way to check without going through a lot of hassle that i literally can't do right now lol~

EDIT: found time to do it, and yes, 0x0825E026 is the location of the stats (at least it seems so based off of knizz's idb), as 0x08044708-0x080447A4 is the routine for updating deoxys' stats and uses the data loaded at 0x08044704~
 
Last edited:
130
Posts
8
Years
  • Age 28
  • Seen Jun 14, 2023
it's basically like a normal sprite
you should be able to just paste normal forme onto attack forme without any repercussions

that's what i'm thinking, yes, but i have no way to check without going through a lot of hassle that i literally can't do right now lol~

EDIT: found time to do it, and yes, 0x0825E026 is the location of the stats (at least it seems so based off of knizz's idb), as 0x08044708-0x080447A4 is the routine for updating deoxys' stats and uses the data loaded at 0x08044704~

Ok. One more question. Is it possible to "remove" the part of the code to not have a need to do what I'm going to be doing?
 

BluRose

blu rass
811
Posts
9
Years
Ok. One more question. Is it possible to "remove" the part of the code to not have a need to do what I'm going to be doing?
it's definitely possible! i just have barely an idea on how to do it; i don't know where the game states for it to change into the attack forme. if we just nop every reference to the stat update, then we thoeoretically don't (???????) have to do the easiest part of the attack forme changing: changing the attack forme's stats. we won't care about that, though, and we'll instead just try to cause no stat change to be made at all.

so we'll use emerald's idb and kleenexfeu's byte changes in emerald as a ref for a moment.

um, try 01 BC 00 47 at 0x0800EDAE. this theoretically causes no sprite change to be made...
also try C0 46 C0 46 C0 46 C0 46 at 0x08044690. this theoretically causes no stat change to be made...
lastly, try C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 at 0x08097038. this theoretically causes no icon change to be made...

if this works, please report back <3
 
130
Posts
8
Years
  • Age 28
  • Seen Jun 14, 2023
it's definitely possible! i just have barely an idea on how to do it; i don't know where the game states for it to change into the attack forme. if we just nop every reference to the stat update, then we thoeoretically don't (???????) have to do the easiest part of the attack forme changing: changing the attack forme's stats. we won't care about that, though, and we'll instead just try to cause no stat change to be made at all.

so we'll use emerald's idb and kleenexfeu's byte changes in emerald as a ref for a moment.

um, try 01 BC 00 47 at 0x0800EDAE. this theoretically causes no sprite change to be made...
also try C0 46 C0 46 C0 46 C0 46 at 0x08044690. this theoretically causes no stat change to be made...
lastly, try C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 at 0x08097038. this theoretically causes no icon change to be made...

if this works, please report back <3

I'm sorry to say this... but..........

IT TOTALLY WORKS. Great job! Not only did Deoxys look Normal, his minisprite was Normal, and his back sprite was Normal, his stats are Normal too. :D
 

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
Still can't seem to download it. I keep getting a 404 error. Any idea why? I absolutely refuse to use A-Map 1.95.

Fixed again.
Also, you wouldn't be able to edit expanded Pokémon with 1.95 in the first place, so it wasn't an option ;)
 

Derlo

Tired....
135
Posts
16
Years
I spotted a routine shortly after checking for DEOXYS and MEW obedience, I think it's related with badge obedience checks before attack, but could not confirm if this is it. It's in: 0801D438.
And anyone knows how to increase pokemon chance disobey without proper badge?

EDIT: Answering to myself!
I don't know if everyone has the same problem, but the FR ROM that I'm using doesn't check the badges to control the obedience of the POKEMON according to the level that it is. The MON's just obeys, in any level and with no badges.
So, I removed the part that checks MEW/Deoxys and the part where the routine reads a memory bank of the RAM... and works perfectly.

So, to fix this, just fill with zeros (00's) from offset 0801d45a to 0801d484.

Making this, when you MON's level are above of limit obedience of your last badge, it will be starting to disobey. And the chance to disobey will increase, automatically, with the amount of levels above the badge limit.
This also will cause the MEW / Deoxys obey smoothly.
 
Last edited:

Mr.Pkmn

Ordinary ASM Magician
53
Posts
15
Years
  • Seen Nov 17, 2023
In Gen 3, Protect/Detect/Endure are bugged. The game is supposed to read the probability from a table which has only 4 entries, thus reading garbage data after the 4th consecutive protect.

To get the correct behavior (like gen 5+, no cap) replace the bytes at 0x26FB6 with this (FR):
Code:
01 7A 14 88 CC 40 1D F0 84 FF 21 1C

If you ever manage to get off 16 consecutive protects, it will fail the next one because of precision .
 
Back
Top