• 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?".
  • Forum moderator applications are now open! Click here for details.
  • 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: Pokémon Emerald Special and Special2 Commands (Fire Red As Well)

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
So I've come to the conclusion that the Emerald special table list isn't really well-documented other than the post below this one by my close friend Danny.

So since I'm more technical, as are most of my other friends, I've decided to open up this thread since we're hopping on the Emerald train anyway. Toot toot here we go:

Formatting Codes
-
Spoiler:


Format is special number, whether it requires "special" or "special2", and the Fire Red equivalent.
Spoiler:


It's super late right now, of course this isn't the end of the list. I'll be updating as I go.
 
Last edited:

Danny0317

Fluorite's back, brah
1,067
Posts
10
Years
  • Age 24
  • Seen Nov 19, 2023
As the thread title says, this thread is about the Emerald specials. The Emerald specials are much less documented than the ones in Fire Red so the purpose of this thread is to get more information on them.

I think the best way to go about some of these commands would be direct reverse engineering. Also, it should be noted that using special_2 some specials can return a value to a specified variable, which is also important to be documented. As such, here's some of my small contributions:

The special table in Emerald is 0x20E entries long, with each function being located in the table at 081DBA64.
If these offsets could be futher confirmed as to what they do, either by means of looking at every used special thus far or further research, that would be nice.

Here is a few lists of specials:

Spoiler:
NOTE: Gonna make all of that one list soon.

More specials discoveries. Quotes are used for a bit of the original script I took it from. I'll update this as I keep finding more

Spoiler:
 

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years
I think the best way to go about some of these commands would be direct reverse engineering. Also, it should be noted that using special_2 some specials can return a value to a specified variable, which is also important to be documented. As such, here's some of my small contributions:

The special table in Emerald is 0x20E entries long, with each function being located in the table at 081DBA64. Just underneath that table is the std table used by callstd. Just based on some initial decompiling, here's a list of specials that are confirmed to do absolutely nothing:
  • 0x23 Nothing (bx lr)
  • 0x4E - Puts byte 0x0 at 0203A030
  • 0x5A - Takes a halfword from 020375E4, doubles it, and adds it to the ram location 02039F00, then takes a halfword from the resulting RAM location and stores it at 020375DE
  • 0x65 - Loads a dword from 03005D8C (seems to be a saveblock), adds 0x2e51, then loads a byte from the resulting location and stores it to LASTRESULT.
  • 0x67 - Also loads more stuff from one of the saveblocks
  • 0x68 - More stuff from same saveblock
  • 0x75 - More stuff from same saveblock
  • 0x84 - More stuff from same saveblock, although this one seems to do a bit more with the data it's reading.
  • 0x92 - Stores value from saveblock at 020375DE
  • 0xA6 - Saveblock stuffs
  • 0xB3 - Saveblock stuff, returns only with special 2
  • 0xB7 - Loads byte at 0202433A and stores it to variable specified in special 2
  • 0xE5 - Something with vblank callback
  • 0xF4 - RAM stuffs
  • 0x115 - Absolutely nothing (bx lr)
  • 0x11B Nothing (bx lr)
  • 0x14B - Nothing (bx lr)
  • 0x157 - Stuff with trainer data
  • 0x173 - Stuff with that one saveblock
  • 0x17B - Stuff with that one saveblock
  • 0x17f - Ditto
  • 0x180 - Ditto
  • 0x182 - Ditto
  • 0x183 - Ditto
  • 0x18A - Ditto
  • 0x192-0x194 - Ditto
  • 0x1B4 - Loads byte from 030030FC and stores it to specified variable in special 2
  • 0x1BC - Stores 0x0 at 02039F2A
  • 0x1CC - Loads stuff from trainer saveblock to special 2 variable
  • 0x1F0 - Does stuff with trainer block data. Lots of or'ing.

If these offsets could be futher confirmed as to what they do, either by means of looking at every used special thus far or further research, that would be nice. Also, Dark Sneasel, do you think we could get these added into the main post to further complete things? Just so we have an idea of what specials need documenting is all.

EDIT: Clarification for a few things, 0xC0 is the daycare Pokemon special (ie for taking in/out pokemon) and 0xC7 is the battle records used in the upstairs in the Pokemon Center (it fills up more when you do link battles). 0xD3 is used for the Pokeblock feeders in the Safari Zone (I think),
 
51
Posts
9
Years
  • Age 38
  • Seen Dec 20, 2022
I'm glad to see more and more Emerald stuff :D At the moment I am busy working on figuring out all the flags, going through each map one by one. I will join this mission to figure out these specials soon but there is so much to do. I am on a mission to find the emerald equivalent to any useful fire red offsets, it's easy to do with a hex editor if you have the offsets from two different games to work with but ultimately I just need to finally get round to learning how to speak ASM, I think that's my next goal after flag hunting.

Thanks for doing this guys, it was a very pleasant surprise to come here and see this thread :)
 

U.Flame

Maker of Short Games
1,326
Posts
15
Years
I'm interested in the ones that have you battle the last seen Pokemon/trainer. Sounds like something I accidentally did in Sapphire a long time ago. If its the same, it's certainly interesting enough to warrent some cloning testing right? There're also other factors if I'm correct. Latia/os is the result if you watched the TV report about them.
 
36
Posts
9
Years
  • Age 31
  • Seen Jun 26, 2015
0x9 actually warps you back to the map you were in when you called 0x8, and at the same coordinates as you left it even, but yes without a reference it'll just do as Le pug says. (although I thought you were sent to coords 0,0 ((or maybe the centre of the map)) and not warp 0?)
 
Last edited:

Le pug

Creator of Pokémon: Discovery / Fat Kid
870
Posts
10
Years
0x9D-Cable car

Doesn't work. Also, space your image links from the hyphen so that we can easily click on them. And organize this list!!

0x90-Says "Badges"

This is wrong. It says whatever was just last said. Idk what text you looked at to get you badges but yeah just update that. Like if Bob said "hey" and you used this special it'd say "hey". It locks you into place however and special 0x1E or a release command doesn't free you.

0xD3-Opens this http://i.snag.gy/imkep.jpg its called a pokeblock yo
 
Last edited:

Danny0317

Fluorite's back, brah
1,067
Posts
10
Years
  • Age 24
  • Seen Nov 19, 2023
Some don't work unless you put waitstate after them. Pretty sure cable car was one of them. And thanks, I'll update the list.
 
Last edited:

Le pug

Creator of Pokémon: Discovery / Fat Kid
870
Posts
10
Years
Some don't work unless you put waitstate after them. Pretty sure cable car was one of them. And thanks, I'll update the list.

That wasn't the problem, but we discussed it on irc.
 
Last edited:
199
Posts
12
Years
  • Seen Jul 18, 2016
  • special 0x1CB 'Paying BP amount set in var
  • special 0x1C8 'Updating BP box that was brought up by special 0x1C7
Set the BP cost with setvar 0x8008 0xCOST and before the specials, put copyvar 0x8004 0x8008.
If I understand correctly, that loads the set value and the specials then remove and update current BP.

I know it was already noted in the first post, but you can use this with the above to make a "not enough BP" condition.
Code:
special2 0x4001 0x1CC
comparevars 0x4001 0x8008
if 0xCONDITION goto @
 
Last edited:

looneyman1

The Psycho Pokemon
1,459
Posts
10
Years
  • Age 37
  • Seen yesterday
Something we could use is a means to enable the emerald berry system to earlier 3rd gen games, especially with regard to the EV berries. It'd take a lot of hassle out of trying to EV train pokemon in a fire red hack since fire red is overwhelmingly overused but it lacks so many important features that make many parts of the game a lot easier. Might it be possible to find the line of code that enables EV berries then impliment that into a fire red ROM somehow? granted berries are ridiculously rare in FR/LG but if we can manage this at least we can then make a fire red hack that allows one to buy those berries at the Celadon Department Store or something
 
252
Posts
10
Years
  • Age 27
  • Seen Jul 6, 2019
Something we could use is a means to enable the emerald berry system to earlier 3rd gen games, especially with regard to the EV berries. It'd take a lot of hassle out of trying to EV train pokemon in a fire red hack since fire red is overwhelmingly overused but it lacks so many important features that make many parts of the game a lot easier. Might it be possible to find the line of code that enables EV berries then impliment that into a fire red ROM somehow? granted berries are ridiculously rare in FR/LG but if we can manage this at least we can then make a fire red hack that allows one to buy those berries at the Celadon Department Store or something
First of all, why are you asking this here? Second, why don't you go find out how to do it yourself. Since almost everyone here is hacking Emerald, I doubt they'd help you there. And if rare berries are an issue, just sell them in a market in your hack? Way better than waiting for the berries to grow, imo.
 

looneyman1

The Psycho Pokemon
1,459
Posts
10
Years
  • Age 37
  • Seen yesterday
First of all, why are you asking this here? Second, why don't you go find out how to do it yourself. Since almost everyone here is hacking Emerald, I doubt they'd help you there. And if rare berries are an issue, just sell them in a market in your hack? Way better than waiting for the berries to grow, imo.

No need to be rude you know, and I'm asking this here because it's a matter of trying to figure out how to implement a later mechanic to an earlier game. It shouldn't be that big a stretch to the 4th gen phys/special split used in a number of 3rd gen hacks. Even with emerald starting to become more popular it still remains that FR is the preferred platform at the moment, and I only asked because If I knew how to do it I'd implement it myself afterward, do you get it now?????? I shouldn't have had to explain my reasons, it's pretty damn obvious.
 
252
Posts
10
Years
  • Age 27
  • Seen Jul 6, 2019
No need to be rude you know, and I'm asking this here because it's a matter of trying to figure out how to implement a later mechanic to an earlier game. It shouldn't be that big a stretch to the 4th gen phys/special split used in a number of 3rd gen hacks. Even with emerald starting to become more popular it still remains that FR is the preferred platform at the moment, and I only asked because If I knew how to do it I'd implement it myself afterward, do you get it now?????? I shouldn't have had to explain my reasons, it's pretty damn obvious.
Then ask your questions in a different thread. This is a thread to figure out the specials in Emerald. This isn't a thread to ask "how can I implement this feature in Firered?" Make a thread for the berry system in FR if it doesn't already exist, do a bit of research yourself, and if you can't figure things out, then ask. If you're asking questions about FR on a thread where most of the researchers hack EM, let's be real, you're not going to get much help. I'm sorry if I'm sounding harsh, but again, you were going off topic, and there's rules for this forum.
Also, my question still stands, why not just have a mart that sells EV berries in your hack? That's totally doable with scripting, and doesn't require a single ounce of ASM at all. I get why you want berry growing; it's a mechanic that's existed for years. But nobody really likes berry growing. They just want the product.
If you want to keep talking with me about this, VM me, since I don't want to go off-topic here.
 
Last edited:

LCCoolJ95

Limited Capacity
638
Posts
14
Years
Is there a special that checks to see what Pokémon you have in your party in order to battle a Legendary Pokémon? Like for example, having the three Regis in order to fight Regigigas. In a ROM hack in the Sideshow Showcase, Pokémon Kanto Black has that feature using the special 0x17C. What's the Emerald equivalent?
 

Danny0317

Fluorite's back, brah
1,067
Posts
10
Years
  • Age 24
  • Seen Nov 19, 2023
Is there a special that checks to see what Pokémon you have in your party in order to battle a Legendary Pokémon? Like for example, having the three Regis in order to fight Regigigas. In a ROM hack in the Sideshow Showcase, Pokémon Kanto Black has that feature using the special 0x17C. What's the Emerald equivalent?

There's not one that I know of, BUT I do know that Itari (if that's still his name) made an ASM routine to check for pokemon in your party, it's in the quick research thread.
 
3,044
Posts
9
Years
Is there a special that checks to see what Pokémon you have in your party in order to battle a Legendary Pokémon? Like for example, having the three Regis in order to fight Regigigas. In a ROM hack in the Sideshow Showcase, Pokémon Kanto Black has that feature using the special 0x17C. What's the Emerald equivalent?

To add on to what Dark Sneasel said, here's the said link.
(And itari is now known as Hopeless Masquerade).
 

Year7Class1

Land Snail
25
Posts
8
Years
What about the giving nickname thingy? I already search for i think 1 hour searching for that. When I use 9E (R/S) It only show a clock. -.-
 
457
Posts
10
Years
  • Age 28
  • Seen Mar 17, 2024
Can you also list the specials which are empty, unused, or useless? I'm personally translating out JPAN's FireRed Hacked Engine's specials to Emerald. I got two specials translated but I dunno which special I will use for that so that is why I'm asking empty slots (noted that I knew where the table is).

I think the best way to go about some of these commands would be direct reverse engineering. Also, it should be noted that using special_2 some specials can return a value to a specified variable, which is also important to be documented. As such, here's some of my small contributions:

The special table in Emerald is 0x20E entries long, with each function being located in the table at 081DBA64. Just underneath that table is the std table used by callstd. Just based on some initial decompiling, here's a list of specials that are confirmed to do absolutely nothing:
  • 0x23 Nothing (bx lr)
  • 0x4E - Puts byte 0x0 at 0203A030
  • 0x5A - Takes a halfword from 020375E4, doubles it, and adds it to the ram location 02039F00, then takes a halfword from the resulting RAM location and stores it at 020375DE
  • 0x65 - Loads a dword from 03005D8C (seems to be a saveblock), adds 0x2e51, then loads a byte from the resulting location and stores it to LASTRESULT.
  • 0x67 - Also loads more stuff from one of the saveblocks
  • 0x68 - More stuff from same saveblock
  • 0x75 - More stuff from same saveblock
  • 0x84 - More stuff from same saveblock, although this one seems to do a bit more with the data it's reading.
  • 0x92 - Stores value from saveblock at 020375DE
  • 0xA6 - Saveblock stuffs
  • 0xB3 - Saveblock stuff, returns only with special 2
  • 0xB7 - Loads byte at 0202433A and stores it to variable specified in special 2
  • 0xE5 - Something with vblank callback
  • 0xF4 - RAM stuffs
  • 0x115 - Absolutely nothing (bx lr)
  • 0x11B Nothing (bx lr)
  • 0x14B - Nothing (bx lr)
  • 0x157 - Stuff with trainer data
  • 0x173 - Stuff with that one saveblock
  • 0x17B - Stuff with that one saveblock
  • 0x17f - Ditto
  • 0x180 - Ditto
  • 0x182 - Ditto
  • 0x183 - Ditto
  • 0x18A - Ditto
  • 0x192-0x194 - Ditto
  • 0x1B4 - Loads byte from 030030FC and stores it to specified variable in special 2
  • 0x1BC - Stores 0x0 at 02039F2A
  • 0x1CC - Loads stuff from trainer saveblock to special 2 variable
  • 0x1F0 - Does stuff with trainer block data. Lots of or'ing.

If these offsets could be futher confirmed as to what they do, either by means of looking at every used special thus far or further research, that would be nice. Also, Dark Sneasel, do you think we could get these added into the main post to further complete things? Just so we have an idea of what specials need documenting is all.

EDIT: Clarification for a few things, 0xC0 is the daycare Pokemon special (ie for taking in/out pokemon) and 0xC7 is the battle records used in the upstairs in the Pokemon Center (it fills up more when you do link battles). 0xD3 is used for the Pokeblock feeders in the Safari Zone (I think),

Thanks! I can now finally test my personal translations. XD

EDIT: Can be the special table expandable? Will it be having limiter stuff?
 
Last edited:
Back
Top