- 457
- Posts
- 11
- Years
- Seen Mar 1, 2025
For those who want a better expansion without any bugs, see this post and use this instead. All of what's left here will be a heap of information on how expansion works and is done.
This post though gave me cancer.
This post though gave me cancer.
I would like to share a little bit wisdom to all:
"PLEASE CREDIT SBIRD. DO NOT CREDIT ME ALONE, YOU MUST CREDIT SBIRD AS WELL. I have noticed numerous hacks that only credit me for the expansion and that's very unfair to SBird, as he was the one who did it first. YOU MUST CREDIT SBIRD." -Chaos Rush
It is because SBird is the real mastermind and first person who achieved the expansion on Emerald however, thus on a German ROM. SBird was so kind to post his notes for documentation and guiding everyone, making it possible on any language Emerald ROM. Then, Chaos Rush is the guy who made it working into an English Emerald ROM. Chaos Rush formely handled this thread. I took over for the continuity and adding some improvements while he's away. To be fair on crediting, include SBird as well. Alright! Let's make the expansion into Emerald. This tutorial was formerly copied word-by-word from DoesntKnowHowToPlay's FireRed Pokédex expansion tutorial. Now, I've cleared and cleaned some. If not, feel to judge. Alright, let's begin:
Prerequisites
List of tools needed:
- An Emerald ROM (preferably the English/US one)
- Any GameBoy Advance emulator (I'm using VBA-M)
- Any Hex Editor (I'm using HxD)
- Any calculator that can use hexadecimal (Calculator for Windows users and you should be in programmer mode)
- Free Space Finder (optional, just for looking free spaces)
- Advanced knowledge on Hex Editing (I won't be teaching you how to use a hex editor, or how to repoint things. If you're qualified to do this, odds are all you really need is the offsets, which is pretty much all this post is.)
Decide the number of new Pokemon
Before to get started, you need to think and decide of the new total number of Pokemon with the new ones which you will add later. The current number of slots are 440 (this includes the index 0 at the very beginning). So, you will have to pick a number which is more than 440. The answer can be really higher than 440. Here's a quick help for you to decide which new total number of Pokemon you want to use:
Spoiler:
The first thing you should plan is how much the new slots you should put for new Pokemon. Think of all possible Pokemon you will add, and also all possible forms, formes, and megas you will add too (to be realistic, forms are handled by changing slots with one another. Face it! That's maybe the only way to accommodate forms/mega in GBA). Again, the current slots as 440. At this point, you might come with four possible listings: 493, 649, 721, and custom.
Gen IV Style
You planned to have 493 Pokemon as of Generation IV (the total viewed in the Pokedex listing). Here's a planned list for those who will use the Gen IV style:
440 - Current vanilla slots
107 - Gen IV Single Formed Pokemon
032 - Forms and Formes (total for only until Gen IV Pokemon)
048 - Mega Evolutions (total for only until Gen IV Pokemon)
627 - Total number of every single formed Pokemon
Noted that I have included the Fairy-type Arceus in the Forms and Formes listing. I only cared is about the number of Pokemon, not the other mechanics of generations.
Gen V Style
You planned to have 493 Pokemon as of Generation V (the total viewed in the Pokedex listing). Here's a planned list for those who will use the Gen V style:
440 - Current vanilla slots
107 - Gen IV Single Formed Pokemon
156 - Gen V Single Formed Pokemon
051 - Forms and Formes (total for only until Gen V Pokemon)
049 - Mega Evolutions (total for only until Gen V Pokemon)
803 - Total number of every single formed Pokemon until Gen V
Gen VI Style
You planned to have 721 Pokemon as of Generation VI (the total viewed in the Pokedex listing). Here's a planned list for those who will use the Gen VI style:
440 - Current vanilla slots
107 - Gen IV Single Formed Pokemon
156 - Gen V Single Formed Pokemon
072 - Gen VI Single Formed Pokemon
055 - Forms and Formes (total as of Gen VI)
050 - Mega Evolutions (total as of Gen VI)
880 - Total number of every single formed Pokemon
Those are the quick list for you. If you care want to add extra slots, just also add the number of extra slots you want to add in case you might want to have gender forms and improving Deoxys' formes.
To conclude this part, here's a giant list of every forms, formes, and megas as reference:
Now, good luck for the rest.
Gen IV Style
You planned to have 493 Pokemon as of Generation IV (the total viewed in the Pokedex listing). Here's a planned list for those who will use the Gen IV style:
440 - Current vanilla slots
107 - Gen IV Single Formed Pokemon
032 - Forms and Formes (total for only until Gen IV Pokemon)
048 - Mega Evolutions (total for only until Gen IV Pokemon)
627 - Total number of every single formed Pokemon
Noted that I have included the Fairy-type Arceus in the Forms and Formes listing. I only cared is about the number of Pokemon, not the other mechanics of generations.
Gen V Style
You planned to have 493 Pokemon as of Generation V (the total viewed in the Pokedex listing). Here's a planned list for those who will use the Gen V style:
440 - Current vanilla slots
107 - Gen IV Single Formed Pokemon
156 - Gen V Single Formed Pokemon
051 - Forms and Formes (total for only until Gen V Pokemon)
049 - Mega Evolutions (total for only until Gen V Pokemon)
803 - Total number of every single formed Pokemon until Gen V
Gen VI Style
You planned to have 721 Pokemon as of Generation VI (the total viewed in the Pokedex listing). Here's a planned list for those who will use the Gen VI style:
440 - Current vanilla slots
107 - Gen IV Single Formed Pokemon
156 - Gen V Single Formed Pokemon
072 - Gen VI Single Formed Pokemon
055 - Forms and Formes (total as of Gen VI)
050 - Mega Evolutions (total as of Gen VI)
880 - Total number of every single formed Pokemon
Those are the quick list for you. If you care want to add extra slots, just also add the number of extra slots you want to add in case you might want to have gender forms and improving Deoxys' formes.
To conclude this part, here's a giant list of every forms, formes, and megas as reference:
Spoiler:
Burmy Sand
Burmy Trash
Wormadam Sand
Wormadam Trash
Cherrim Sunlight
Shellos East
Gastrodon East
Rotom Mow
Rotom Oven
Rotom Wash
Rotom Frost
Rotom Fan
Giratina Origin
Shaymin Sky
Arceus Fight
Arceus Flying
Arceus Poison
Arceus Ground
Arceus Rock
Arceus Bug
Arceus Ghost
Arceus Steel
Arceus ???
Arceus Fire
Arceus Water
Arceus Grass
Arceus Electric
Arceus Psychic
Arceus Ice
Arceus Dragon
Arceus Dark
Arceus Fairy
Basculin Blue
Darmanitan Zen
Deerling Summer
Deerling Autumn
Deerling Winter
Sawsbuck Summer
Sawsbuck Autumn
Sawsbuck Winter
Tornadus Therian
Thundurus Therian
Landorus Therian
Kyurem Black
Kyurem White
Keldeo Resolute
Meleotta Pirouette
Genesect Fire
Genesect Water
Genesect Electric
Genesect Ice
Aegislash Shield
Pumpkaboo Size 2
Pumpkaboo Size 3
Pumpkaboo Size 4
Gourgeist Size 2
Gourgeist Size 3
Gourgeist Size 4
Hoopa Unbound
Mega Venusaur
Mega Charizard X
Mega Charizard Y
Mega Blastoise
Mega Alakazam
Mega Gengar
Mega Kengaskhan
Mega Pinsir
Mega Gyarados
Mega Aerodactyl
Mega Mewtwo X
Mega Mewtwo Y
Mega Ampharos
Mega Scizor
Mega Heracross
Mega Houndoom
Mega Tyranitar
Mega Blaziken
Mega Gardevoir
Mega Mawile
Mega Aggron
Mega Medicham
Mega Manectric
Mega Banette
Mega Absol
Mega Garchomp
Mega Lucario
Mega Abomasnow
Mega Beedrill
Mega Pidgeot
Mega Slowbro
Mega Steelix
Mega Sceptile
Mega Swampert
Mega Sableye
Mega Sharpedo
Mega Camerupt
Mega Altaria
Mega Glalie
Mega Salamence
Mega Metagross
Mega Latias
Mega Latios
Primal Kyogre
Primal Groudon
Mega Rayquaza
Mega Lopunny
Mega Gallade
Mega Audino
Mega Diancie
Burmy Trash
Wormadam Sand
Wormadam Trash
Cherrim Sunlight
Shellos East
Gastrodon East
Rotom Mow
Rotom Oven
Rotom Wash
Rotom Frost
Rotom Fan
Giratina Origin
Shaymin Sky
Arceus Fight
Arceus Flying
Arceus Poison
Arceus Ground
Arceus Rock
Arceus Bug
Arceus Ghost
Arceus Steel
Arceus ???
Arceus Fire
Arceus Water
Arceus Grass
Arceus Electric
Arceus Psychic
Arceus Ice
Arceus Dragon
Arceus Dark
Arceus Fairy
Basculin Blue
Darmanitan Zen
Deerling Summer
Deerling Autumn
Deerling Winter
Sawsbuck Summer
Sawsbuck Autumn
Sawsbuck Winter
Tornadus Therian
Thundurus Therian
Landorus Therian
Kyurem Black
Kyurem White
Keldeo Resolute
Meleotta Pirouette
Genesect Fire
Genesect Water
Genesect Electric
Genesect Ice
Aegislash Shield
Pumpkaboo Size 2
Pumpkaboo Size 3
Pumpkaboo Size 4
Gourgeist Size 2
Gourgeist Size 3
Gourgeist Size 4
Hoopa Unbound
Mega Venusaur
Mega Charizard X
Mega Charizard Y
Mega Blastoise
Mega Alakazam
Mega Gengar
Mega Kengaskhan
Mega Pinsir
Mega Gyarados
Mega Aerodactyl
Mega Mewtwo X
Mega Mewtwo Y
Mega Ampharos
Mega Scizor
Mega Heracross
Mega Houndoom
Mega Tyranitar
Mega Blaziken
Mega Gardevoir
Mega Mawile
Mega Aggron
Mega Medicham
Mega Manectric
Mega Banette
Mega Absol
Mega Garchomp
Mega Lucario
Mega Abomasnow
Mega Beedrill
Mega Pidgeot
Mega Slowbro
Mega Steelix
Mega Sceptile
Mega Swampert
Mega Sableye
Mega Sharpedo
Mega Camerupt
Mega Altaria
Mega Glalie
Mega Salamence
Mega Metagross
Mega Latias
Mega Latios
Primal Kyogre
Primal Groudon
Mega Rayquaza
Mega Lopunny
Mega Gallade
Mega Audino
Mega Diancie
Now, good luck for the rest.
Keep in mind that in the rest of tutorial will be Hex numbers. Advice on typing hex numbers on filters, do not type the "0x08". So, let's move on! Before to go any further, USE AT YOUR OWN RISK!!!
The Expansion
Step 1: Installing the Save Block Hack
Spoiler:
The first obstacle to expanding the Pokedex is the need for flags to store what new Pokemon the player has seen/caught. To do this, we need free memory.
First things first. Put this routine into free space. It is JPAN's Save Block Hack, albeit modified so that it works on hardware:
Make sure you insert it at a 4-byte aligned offset (ending with 0, 4, 8, or C). As some of you know, JPAN never released a hardware-compatible save fix for Emerald, but diegoisawesome fixed it up for his Emerald hack, CrystalDust. Because I had trouble doing it on my own, I will be completely honest: I ripped this routine straight from CrystalDust as it was the only way I got things working properly. I hope you don't mind me doing this, diegoisawesome.
Next we need to make some byte changes to get the routine working.
At 0x5CDC00 is the offset of the save size table. Paste this over the bytes there:
Again, this was taken from CrystalDust, as it was the only way I could get everything working. So credit to diegoisawesome for this as well.
First things first. Put this routine into free space. It is JPAN's Save Block Hack, albeit modified so that it works on hardware:
Code:
21 68 FF 23 1B 01 5B 18 98 88 00 28 09 D0 04 28
0A D0 0D 28 0C D0 0D 2D 1C DD 01 20 08 BC 98 46
F0 BD C4 21 08 4A 06 E0 8E 21 89 00 07 4A 02 E0
BA 21 09 01 06 4A 04 3B 18 68 10 60 04 3A 04 39
00 29 F8 D1 E7 E7 C0 46 C0 D8 03 02 F8 DA 03 02
98 E6 03 02 00 48 00 47 2D 2E 15 08 FF FF FF FF
FF 27 3F 01 CF 19 F8 80 BE 88 00 2E 08 D0 04 2E
09 D0 0D 2E 0B D0 00 00 00 48 00 47 53 28 15 08
C4 23 08 4A 06 E0 8E 23 9B 00 07 4A 02 E0 BA 23
1B 01 06 4A 04 3F 10 68 38 60 04 3A 04 3B 00 2B
F8 D1 E9 E7 C0 D8 03 02 F8 DA 03 02 98 E6 03 02
Next we need to make some byte changes to get the routine working.
- At 0x152E98,put 00 48 00 47 XX XX XX 08. For XX XX XX 08, it's the offset you put the save block routine +0x1.
- At 0x15284E, put 38 47.
- At 0x15288C, put YY YY YY 08. For YY YY YY 08, it's the offset you put the save block routine +0x61.
- At 0x0D9CC6, put 38 47.
- At 0x0D9D04, put YY YY YY 08.
- At 0x0DA284, put 00 48 00 47 XX XX XX 08.
At 0x5CDC00 is the offset of the save size table. Paste this over the bytes there:
Code:
00 00 2C 0F 00 00 F0 0F F0 0F F0 0F E0 1F F0 0F
D0 2F B8 0D 00 00 F0 0F F0 0F F0 0F E0 1F F0 0F
D0 2F F0 0F C0 3F F0 0F B0 4F F0 0F A0 5F F0 0F
90 6F F0 0F 80 7F 50 04
Step 2: Get free RAM for the dex flags
Spoiler:
Now, before doing anything else, you should decide how many Pokédex entries and how many Pokémon you want. These don't have to be the same- it's entirely possible to map multiple Pokémon to a single dex entry, or have unmapped Pokémon- vanilla does just this with the limbo slots between Celebi and Treecko. Consider the limbo slots and Unown sprite slots- while slots 252-275 are actually quite safe to use, slots 412-439 store the sprites for eggs and every Unown form bar A. As such, if you use Unown, you will probably want to leave those alone.
Once you've decided, figure out how many bits it will take to encode the number of dex entries. The solution for the answer is:
Using this, pick two locations in the RAM freed by JPAN/diegoisawesome's hack to be where Seen and Caught flags will go. Note that later steps will be easier if you put them next to each other.
In all honesty the only area I'm 100% sure of is safe to use for the new dex flags is 0x0203D800 so, we are going to use that area. If 0x0203D800 is the area for seen flags, then the area for caught flags is at 0x0203D8YY. Whereas, YY is the answer you got earlier.
Make these byte changes:
C06EC: 00 D8 03 02 (point to new seen flags)
C06AC: 00 00
C06AE: 00 00
This makes the game read using the new Seen flags.
C0744: YY D8 03 02 (point to new caught flags, YY is the answer you got earlier)
C06FE: 00 00
C0700: 00 00
C0702: 00 00
C0710: 15 E0
This makes the game read using the new Caught flags.
C0720: 0D E0
This makes both of the above bypass redundant SEEN flags.
C07C8: 00 D8 03 02 (point to new seen flags)
C079E: 00 00
C07A0: 00 00
C07AC: 1C E0
This makes the game write to the new Seen flags.
C07F0: YY D8 03 02 (point to new caught flags, YY is the answer you got earlier)
C07DA: 00 00
C07DC: 00 00
This makes the game write to the new Caught flags.
We also need to make the game clear these flags properly when the player selects New Game at the main menu. We can do this with the following edits:
843BC: 00 D8 03 02 (point to new seen flags)
8439A: 20 1C 00 00
843A0: YY 22 (YY is the answer you got earlier)
843A6: 20 1C
843A8: YY 30 (YY is the answer you got earlier. This maybe the number of bytes between the sets of flags. This is probably the same as the answer, but it doesn't have to be)
843AC: YY 22 (YY is the answer you got earlier)
Alternatively, instead of these byte changes, you can instead make an OW script that clears the dex with writebytetooffset, and make sure it runs before the player gets the Pokédex. Your choice.
Once you've decided, figure out how many bits it will take to encode the number of dex entries. The solution for the answer is:
Code:
[CENTER][B][SIZE="5"]YY = (X / 8) + 1[/SIZE][/B]
[SIZE="2"][B]X[/B] = divisible by 8.
[B]X[/B] < if not divisible by 8, round it off to the highest nearest number that is divisble by 8.[/SIZE]
[SIZE="2"]Whereas, [B]X[/B] is the number of Pokedex entries. [B]YY[/B] is the answer.
YY must be converted to hexadecimal if not.
Example: You want to have 721 Pokedex Entries. But, 721 isn't divisible by 8.
Try to find the highest nearest number of it. That would be 728.
Then, divide 728 by 8 and you'll get 91. Add 1 to it so, you'll get 92.
That's your answer for YY and make sure it is in hexadecimal so, that makes it 0x5C.
I'm not sure this is how it works but this is how that way I imagined it. Correct me if not.[/SIZE][/CENTER]
Using this, pick two locations in the RAM freed by JPAN/diegoisawesome's hack to be where Seen and Caught flags will go. Note that later steps will be easier if you put them next to each other.
In all honesty the only area I'm 100% sure of is safe to use for the new dex flags is 0x0203D800 so, we are going to use that area. If 0x0203D800 is the area for seen flags, then the area for caught flags is at 0x0203D8YY. Whereas, YY is the answer you got earlier.
Make these byte changes:
C06EC: 00 D8 03 02 (point to new seen flags)
C06AC: 00 00
C06AE: 00 00
This makes the game read using the new Seen flags.
C0744: YY D8 03 02 (point to new caught flags, YY is the answer you got earlier)
C06FE: 00 00
C0700: 00 00
C0702: 00 00
C0710: 15 E0
This makes the game read using the new Caught flags.
C0720: 0D E0
This makes both of the above bypass redundant SEEN flags.
C07C8: 00 D8 03 02 (point to new seen flags)
C079E: 00 00
C07A0: 00 00
C07AC: 1C E0
This makes the game write to the new Seen flags.
C07F0: YY D8 03 02 (point to new caught flags, YY is the answer you got earlier)
C07DA: 00 00
C07DC: 00 00
This makes the game write to the new Caught flags.
We also need to make the game clear these flags properly when the player selects New Game at the main menu. We can do this with the following edits:
843BC: 00 D8 03 02 (point to new seen flags)
8439A: 20 1C 00 00
843A0: YY 22 (YY is the answer you got earlier)
843A6: 20 1C
843A8: YY 30 (YY is the answer you got earlier. This maybe the number of bytes between the sets of flags. This is probably the same as the answer, but it doesn't have to be)
843AC: YY 22 (YY is the answer you got earlier)
Alternatively, instead of these byte changes, you can instead make an OW script that clears the dex with writebytetooffset, and make sure it runs before the player gets the Pokédex. Your choice.
Step 3: Repoint Everything
Spoiler:
Part 1: Pokemon Names
Part 2: Pokemon Base Stats
Part 3: Pokemon Moveset
Part 4: Front Sprites
Part 5: Back Sprites
Part 6: Normal Palette
Part 7: Shiny Palette
Part 8: Player Y
Part 9: Enemy Y
Part 10: Altitude
Part 11: Icons
Part 12: Icon Palette Control
Part 13: TM Compatibility
Part 14: Tutor Compatibility
Part 15: Evolutions
Part 16: Footprints
Part 17: Cry Table
Part 18: Cry Table 2 (used for moves like Growl/Roar)
Part 19: Auxillary Cry Table
An explanation on how the Cry tables work, especially the Auxillary Cry table:
- The current Pokemon Names table is at 0x083185C8.
- The Pokemon Names table has 11 bytes (0xB bytes) each Pokemon (if changing the limit is possible, just change the multiplier).
- Go to a free space to create a new Pokemon Names table.
- Create a new Pokemon Names table there. Multiply your desired new slots of Pokémon by 11 (0xB).
- Select blocks and the type the length with the number of the result. Then fill the selection with "AC AC AC AC AC AC AC AC AC AC FF". There you go! You got your new table.
- Navigate to 0x083185C8 to the Pokemon Names table.
- Select and copy 4532 bytes (0x11B4 bytes) of data.
- Paste it to where your new Pokemon Names table starts.
- Repoint all references of the Pokemon Names table to the new table. Replace all C8 85 31 08 to the pointer of your new table. Also check if it have done 132 occurences.
- If you want to erase the old data to have new spaces, navigate back to 0x083185C8 to the Pokemon Names table. Select 4532 bytes (0x11B4 bytes) of data. Then, fill it with "FF".
- At 0x0806B944, place 00 00 00 00 00 00 (that's six 00s). This will cause the repointed name table to actually get used.
Part 2: Pokemon Base Stats
- The current Pokemon Base Stats table is at 0x083203CC.
- The Pokemon Base Stats table has 28 bytes (0x1C bytes) each Pokemon.
- Go to a free space to create a new Pokemon Base Stats table.
- Create a new Pokemon Base Stats table there. Multiply your desired new slots of Pokémon by 28 (0x1C).
- Select blocks and the type the length with the number of the result. Then fill the selection with "00". There you go! You got your new table.
- Navigate to 0x083203CC to the Pokemon Base Stats table.
- Select and copy 11536 bytes (0x2D10 bytes) of data.
- Paste it to where your new Pokemon Base Stats table starts.
- Repoint all references of the Pokemon Base Stats table to the new table. Replace all CC 03 32 08 to the pointer of your new table. Also check if it have done 74 occurences.
- If you want to erase the old data to have new spaces, navigate back to 0x083203CC to the Pokemon Base Stats table. Select 11536 bytes (0x2D10 bytes) of data. Then, fill it with "FF".
- To read the Egg Hatching Time data, it is the Base Stats table plus 17 (0x11) bytes. So, that is 0x083203DD. Replace all DD 03 32 08 to the pointer of your new table for making the Egg Hatching Time read the new table. Also check if it have done 2 occurences.
- To read the Held Item data, it is the Base Stats table plus 12 (0xC) bytes. So, that is 0x083203D8. Replace all D8 03 32 08 to the pointer of your new table for making the Held Item read the new table. Also check if it have done 1 occurence (pointer is at 0x0806EB7C)
- Another one to read the Held Item data, it is the Base Stats table plus 14 (0xE) bytes. So, that is 0x083203DA. Replace all DA 03 32 08 to the pointer of your new table for making the Held Item read the new table. Also check if it have done 2 occurences (pointers are at 0x0806EB28 and 0x0806EBA0).
Part 3: Pokemon Moveset
- The current Pokemon Moveset table is at 0x0832937C.
- The Pokemon Moveset table has 4 bytes each Pokemon (a table of pointers).
- Go to a free space to create a new Pokemon Moveset table.
- Create a new Pokemon Moveset table there. Multiply your desired new slots of Pokémon by 4.
- Select blocks and the type the length with the number of the result. Then fill the selection with "DC 30 32 08". There you go! You got your new table.
- Navigate to 0x0832937C to the Pokemon Moveset table.
- Select and copy 1648 bytes (0x670 bytes) of data.
- Paste it to where your new Pokemon Moveset table starts.
- Repoint all references of the Pokemon Moveset table to the new table. Replace all 7C 93 32 08 to the pointer of your new table. Also check if it have done 8 occurences.
- If you want to erase the old data to have new spaces, navigate back to 0x0832937C to the Pokemon Moveset table. Select 1648 bytes (0x670 bytes) of data. Then, fill it with "FF".
Part 4: Front Sprites
- The current Front Sprites table is at 0x0830A18C.
- The Front Sprites table has 8 bytes each Pokemon (a table of pointers with filler bytes). Noted that PGE lists this offset as "PokemonAnimations", and lists the unused single-frame R/S front sprite table as "PokemonFrontSprites". Don't get these mixed up, as the single-frame R/S front sprite table is never used in-game.
- Go to a free space to create a new Front Sprites table.
- Create a new Front Sprites table there. Multiply your desired new slots of Pokémon by 8.
- Select blocks and the type the length with the number of the result (mine is 8640 in decimal or 0x21C0 hexadecimal). Then fill the selection with "00 00 B0 08 00 08 00 00". There you go! You got your new table.
- Navigate to 0x0830A18C to the Front Sprites table.
- Select and copy 3520 bytes (0xDC0 bytes) of data.
- Paste it to where your new Front Sprites table starts.
- Repoint all references of the Front Sprites table to the new table. Replace all 8C A1 30 08 to the pointer of your new table. Also check if it have done 42 occurences.
- If you want to erase the old data to have new spaces, navigate back to 0x0830A18C to the Front Sprites table. Select 3520 bytes (0xDC0 bytes) of data. Then, fill it with "FF".
Part 5: Back Sprites
- The current Back Sprites table is at 0x083028B8.
- The Back Sprites table has 8 bytes each Pokemon (a table of pointers with filler bytes).
- Go to a free space to create a new Back Sprites table.
- Create a new Back Sprites table there. Multiply your desired new slots of Pokémon by 8.
- Select blocks and the type the length with the number of the result (mine is 8640 in decimal or 0x21C0 hexadecimal). Then fill the selection with "98 09 C0 08 00 08 00 00". There you go! You got your new table.
- Navigate to 0x083028B8 to the Back Sprites table.
- Select and copy 3520 bytes (0xDC0 bytes) of data.
- Paste it to where your new Back Sprites table starts.
- Repoint all references of the Back Sprites table to the new table. Replace all B8 28 30 08 to the pointer of your new table. Also check if it have done 15 occurences.
- If you want to erase the old data to have new spaces, navigate back to 0x083028B8 to the Back Sprites table. Select 3520 bytes (0xDC0 bytes) of data. Then, fill it with "FF".
- At 0x080346D6, put 07 E0.
- At 0x08034AC2, put 07 E0. These will break the limiters from preventing sprites for showing up,
Part 6: Normal Palette
- The current Normal Palette table is at 0x08303678.
- The Normal Palette table has 8 bytes each Pokemon (a table of pointers with filler bytes). Noted that the filler bytes are important in this, see the animation explanation on step .
- Go to a free space to create a new Normal Palette table.
- Create a new Normal Palette table there. Multiply your desired new slots of Pokémon by 8.
- Select blocks and the type the length with the number of the result (mine is 8640 in decimal or 0x21C0 hexadecimal). Then fill the selection with "E0 0B C0 08 00 00 00 00". There you go! You got your new table.
- Navigate to 0x08303678 to the Normal Palette table.
- Select and copy 3520 bytes (0xDC0 bytes) of data.
- Paste it to where your new Normal Palette table starts.
- Repoint all references of the Normal Palette table to the new table. Replace all 78 36 30 08 to the pointer of your new table. Also check if it have done 5 occurences.
- If you want to erase the old data to have new spaces, navigate back to 0x08303678 to the Normal Palette table. Select 3520 bytes (0xDC0 bytes) of data. Then, fill it with "FF".
Part 7: Shiny Palette
- The current Shiny Palette table is at 0x08304438.
- The Shiny Palette table has 8 bytes each Pokemon (a table of pointers with filler bytes). Noted that the filler bytes are important in this, see the animation explanation on step .
- Go to a free space to create a new Shiny Palette table.
- Create a new Shiny Palette table there. Multiply your desired new slots of Pokémon by 8.
- Select blocks and the type the length with the number of the result. Then fill the selection with "F8 0B C0 08 F4 01 00 00". There you go! You got your new table.
- Navigate to 0x08304438 to the Shiny Palette table.
- Select and copy 3520 bytes (0xDC0 bytes) of data.
- Paste it to where your new Shiny Palette table starts.
- Repoint all references of the Shiny Palette table to the new table. Replace all 38 44 30 08 to the pointer of your new table. Also check if it have done 3 occurences.
- If you want to erase the old data to have new spaces, navigate back to 0x08304438 to the Shiny Palette table. Select 3520 bytes (0xDC0 bytes) of data. Then, fill it with "FF".
- At 0x0806E750, put 04 E0. This break the limiter on the palette table.
Part 8: Player Y
- The current Player Y table is at 0x083021D8.
- The Player Y table has 4 bytes each Pokemon.
- Go to a free space to create a new Player Y table.
- Create a new Player Y table there. Multiply your desired new slots of Pokémon by 8.
- Select blocks and the type the length with the number of the result. Then fill the selection with "88 00 00 00". There you go! You got your new table.
- Navigate to 0x083021D8 to the Player Y table.
- Select and copy 1760 bytes (0x6E0 bytes) of data.
- Paste it to where your new Player Y table starts.
- Repoint all references of the Player Y table to the new table. Replace all D8 21 30 08 to the pointer of your new table. Also check if it have done 11 occurences.
- If you want to erase the old data to have new spaces, navigate back to 0x083021D8 to the Player Y table. Select 1760 bytes (0x6E0 bytes) of data. Then, fill it with "FF".
Part 9: Enemy Y
- The current Enemy Y table is at 0x08300D38.
- The Enemy Y table has 4 bytes each Pokemon.
- Go to a free space to create a new Enemy Y table.
- Create a new Enemy Y table there. Multiply your desired new slots of Pokémon by 8.
- Select blocks and the type the length with the number of the result. Then fill the selection with "88 00 00 00". There you go! You got your new table.
- Navigate to 0x08300D38 to the Enemy Y table.
- Select and copy 1760 bytes (0x6E0 bytes) of data.
- Paste it to where your new Enemy Y table starts.
- Repoint all references of the Enemy Y table to the new table. Replace all 38 0D 30 08 to the pointer of your new table. Also check if it have done 15 occurences.
- If you want to erase the old data to have new spaces, navigate back to 0x08300D38 to the Enemy Y table. Select 1760 bytes (0x6E0 bytes) of data. Then, fill it with "FF".
Part 10: Altitude
- The current Altitude table is at 0x08305DCC.
- The Altitude table has 1 byte each Pokemon.
- Go to a free space to create a new Altitude table.
- Create a new Altitude table there. Multiply your desired new slots of Pokémon by 1.
- Select blocks and the type the length with the number of the result. Then fill the selection with "00". There you go! You got your new table.
- Navigate to 0x08305DCC to the Altitude table.
- Select and copy 440 bytes (0x1B8 bytes) of data.
- Paste it to where your new Altitude table starts.
- Repoint all references of the Altitude table to the new table. Replace all CC 5D 30 08 to the pointer of your new table. Also check if it have done 4 occurences.
- If you want to erase the old data to have new spaces, navigate back to 0x08305DCC to the Altitude table. Select 440 bytes (0x1B8 bytes) of data. Then, fill it with "FF".
- At 0x080A5F82, put 03 E0.
- At 0x080A5EB6, put 03 E0. These break limiters, allowing these tables to be read.
Part 11: Icons
- The current Icons table is at 0x0857BCA8.
- The Icons table has 4 bytes each Pokemon.
- Go to a free space to create a new Icons table.
- Create a new Icons table there. Multiply your desired new slots of Pokémon by 4.
- Select blocks and the type the length with the number of the result. Then fill the selection with "A0 FF C2 08". There you go! You got your new table.
- Navigate to 0x0857BCA8 to the Icons table.
- Select and copy 1760 bytes (0x6E0 bytes) of data.
- Paste it to where your new Icons table starts.
- Repoint all references of the Icons table to the new table. Replace all A8 BC 57 08 to the pointer of your new table. Also check if it have done 2 occurences.
- If you want to erase the old data to have new spaces, navigate back to 0x0857BCA8 to the Icons table. Select 1760 bytes (0x6E0 bytes) of data. Then, fill it with "FF".
Part 12: Icon Palette Control
- The current Icon Palette Control table is at 0x0857C388.
- The Icon Palette Control table has 1 byte each Pokemon. This one controls on which one of the three sets of palette that the icon sprite should use.
- Go to a free space to create a new Icon Palette Control table.
- Create a new Icon Palette Control table there. Multiply your desired new slots of Pokémon by 1.
- Select blocks and the type the length with the number of the result. Then fill the selection with "00". There you go! You got your new table.
- Navigate to 0x0857C388 to the Icon Palette Control table.
- Select and copy 440 bytes (0x1B8 bytes) of data.
- Paste it to where your new Icon Palette Control table starts.
- Repoint all references of the Icon Palette Control table to the new table. Replace all 88 C3 57 08 to the pointer of your new table. Also check if it have done 12 occurences.
- If you want to erase the old data to have new spaces, navigate back to 0x0857C388 to the Icon Palette Control table. Select 440 bytes (0x1B8 bytes) of data. Then, fill it with "FF".
- At 0x080D2E3A, put 01 E0.
- At 0x080D2D20, put 00 00 00 00. This should fix the icon palettes.
Part 13: TM Compatibility
- The current TM Compatibility table is at 0x0831E898.
- The TM Compatibility table has 8 bytes each Pokemon.
- Go to a free space to create a new TM Compatibility table.
- Create a new TM Compatibility table there. Multiply your desired new slots of Pokémon by 8.
- Select blocks and the type the length with the number of the result. Then fill the selection with "00". There you go! You got your new table.
- Navigate to 0x0831E898 to the TM Compatibility table.
- Select and copy 3296 bytes (0xCE0 bytes) of data.
- Paste it to where your new TM Compatibility table starts.
- Repoint all references of the TM Compatibility table to the new table. Replace all 98 E8 31 08 to the pointer of your new table. Also check if it have done 4 occurences.
- If you want to erase the old data to have new spaces, navigate back to 0x0831E898 to the TM Compatibility table. Select 3296 bytes (0xCE0 bytes) of data. Then, fill it with "FF".
Part 14: Tutor Compatibility
- The current Tutor Compatibility table is at 0x08615048.
- The Tutor Compatibility table has 4 bytes each Pokemon.
- Go to a free space to create a new Tutor Compatibility table.
- Create a new Tutor Compatibility table there. Multiply your desired new slots of Pokémon by 4.
- Select blocks and the type the length with the number of the result. Then fill the selection with "00". There you go! You got your new table.
- Navigate to 0x08615048 to the Tutor Compatibility table.
- Select and copy 1648 bytes (0x670 bytes) of data.
- Paste it to where your new Tutor Compatibility table starts.
- Repoint all references of the Tutor Compatibility table to the new table. Replace all 48 50 61 08 to the pointer of your new table. Also check if it have done 1 occurence. The only pointer is at 0x081B2390.
- If you want to erase the old data to have new spaces, navigate back to 0x08615048 to the Tutor Compatibility table. Select 1648 bytes (0x670 bytes) of data. Then, fill it with "FF".
Part 15: Evolutions
- The current Evolutions table is at 0x0832531C.
- The Evolutions table has 40 bytes (0x28 bytes) each Pokemon if you are having 5 evolutions per Pokemon. If you have 8, that would be 64 bytes (0x40 bytes). Since the default is 5, let's use 5.
- Go to a free space to create a new Evolutions table.
- Create a new Evolutions table there. Multiply your desired new slots of Pokémon by 40 (0x28). If you already had the evolutions by 8, multiply instead to 64 (0x40).
- Select blocks and the type the length with the number of the result. Then fill the selection with "00". There you go! You got your new table.
- Navigate to 0x0832531C to the Evolutions table.
- Select and copy 16480 bytes (0x4060 bytes) of data.
- Paste it to where your new Evolutions table starts.
- Repoint all references of the Evolutions table to the new table. Replace all 1C 53 32 08 to the pointer of your new table. Also check if it have done 6 occurences.
- If you want to erase the old data to have new spaces, navigate back to 0x0832531C to the Evolutions table. Select 16480 bytes (0x4060 bytes) of data. Then, fill it with "FF".
Part 16: Footprints
- The current Footprints table is at 0x0856E694.
- The Footprints table has 4 bytes each Pokemon. This is a table of pointers.
- Go to a free space to create a new Footprints table.
- Create a new Footprints table there. Multiply your desired new slots of Pokémon by 4.
- Select blocks and the type the length with the number of the result. Then fill the selection with "A0 03 C3 08", or "F0 74 C3 08" if you want every footprint to be empty. There you go! You got your new table.
- Navigate to 0x0856E694 to the Footprints table.
- Select and copy 1652 bytes (0x674 bytes) of data.
- Paste it to where your new Footprints table starts.
- Repoint all references of the Footprints table to the new table. Replace all 94 E6 56 08 to the pointer of your new table. Also check if it have done 1 occurence.
- If you want to erase the old data to have new spaces, navigate back to 0x0856E694 to the Footprints table. Select 1652 bytes (0x674 bytes) of data. Then, fill it with "FF".
Part 17: Cry Table
- The first Cry Table is at 0x0869DCF4. This controls the normal cries like sent out in battle, summary, or the cry in Pokedex.
- The first Cry Table has 12 bytes (0xC bytes) each Pokemon.
- Go to a free space to create a new first Cry Table table.
- Create a new first Cry Table there. Multiply your desired new slots of Pokémon by 12 (0xC).
- Select blocks and the type the length with the number of the result. Then fill the selection with "20 3C 00 00 04 67 74 08 FF 00 FF 00". There you go! You got your new table.
- Navigate to 0x0869DCF4 to the first Cry Table.
- Select and copy 4656 bytes (0x1230 bytes) of data.
- Paste it to where your new first Cry Table starts.
- Repoint all references of the first Cry Table to the new table. Replace all F4 DC 69 08 to the pointer of your new table. Also check if it have done 1 occurrence (the only pointer is at 0x080A35EC)
- If you want to erase the old data to have new spaces, navigate back to 0x0869DCF4 to the first Cry Table. Select 4656 bytes (0x1230 bytes) of data. Then, fill it with "FF".
Part 18: Cry Table 2 (used for moves like Growl/Roar)
- The second Cry Table is at 0x0869EF24. This controls for moves like Growl and Roar.
- The second Cry Table table has 12 bytes (0xC bytes) each Pokemon.
- Go to a free space to create a new second Cry Table.
- Create a new second Cry Table there. Multiply your desired new slots of Pokémon by 12 (0xC).
- Select blocks and the type the length with the number of the result. Then fill the selection with "30 3C 00 00 04 67 74 08 FF 00 FF 00". There you go! You got your new table.
- Navigate to 0x0869EF24 to the second Cry Table.
- Select and copy 4656 bytes (0x1230 bytes) of data.
- Paste it to where your new second Cry Table starts.
- Repoint all references of the second Cry Table table to the new table. Replace all 24 EF 69 08 to the pointer of your new table. Also check if it have done 1 occurrence (the only pointer is at 0x080A35DC)
- If you want to erase the old data to have new spaces, navigate back to 0x0869EF24 to the second Cry Table. Select 4656 bytes (0x1230 bytes) of data. Then, fill it with "FF".
Part 19: Auxillary Cry Table
- The current Auxillary Cry table is at 0x0831F61C. This controls for moves like Growl and Roar.
- The Auxillary Cry table has 2 bytes each Pokemon.
- Go to a free space to create a new Auxillary Cry table.
- Create a new Auxillary Cry table there. Multiply your desired new slots of Pokémon by 2.
- Select blocks and the type the length with the number of the result. Then fill the selection with "00 00". There you go! You got your new table.
- Navigate to 0x0831F61C to the Auxillary Cry table.
- Select and copy 270 bytes (0x10E bytes) of data.
- Paste it to where your new Auxillary Cry table starts.
- Repoint all references of the Auxillary Cry table to the new table. Replace all 1C F6 31 08 to the pointer of your new table. Also check if it have done 1 occurrence (the only pointer is at 0x0806D534)
- If you want to erase the old data to have new spaces, navigate back to 0x0831F61C to the Auxillary Cry table. Select 270 bytes (0x10E bytes) of data. Then, fill it with "FF".
An explanation on how the Cry tables work, especially the Auxillary Cry table:
Spoiler:
There are actually two cry tables: the first one is for the summary, sent-out-in-battle, and the cry tab in the Pokedex; the second is for moves like Growl, Roar, and other sound-based moves that plays the cry. Noted that the actual slot 0 isn't here.
The both tables have this format each slot:
XX 3C 00 00 YY YY YY 08 FF 00 FF 00
XX is which format of audio should play, if it is compressed, uncompressed, or sound-based moves. From what I have seen:
00: uncompressed, just normal
20: compressed, importing something like this isn't available at this moment
30: uncompressed, mostly used for the second table
I just don't know what these really are but apparently, someone would have understood it better.
YY YY YY 08 is the offset of the cry, inserted cry. A tutorial out there provides you a guide to insert cries:
For the new cries you will be inserting for new slots, it will be 4656 (0x1230) bytes away from the start of the table or at new added slots 388 (0x184) and higher. For XX-s, use 00 for the first table, and use 30 for the second table.
The Auxillary Cry table starts at the 277th slot which is Treecko and right after the limbo slots between Celebi and Treecko. The alignment of this table depends on the actual Pokemon slots starting from slot 277 (Treecko). If you set a 2-byte digit in a slot of the Auxillary Cry Table, it will read a certain slot back at the actual Cry tables. Example: If you have placed 0x0110 "11 01" at Treecko's slot at the Auxillary Cry Table, then it will read the 273rd (0x110th) slot at the actual Cry tables. For expanded Pokemon, most likely, you will start out for the 440th slot which is at the 164th slot of the Auxillary Cry table (146 (0xA3) * 2 = 326 (0x146) bytes away from the start of the table). Most likely, you would place 0x0184 "84 01" at that slot because again, the new slots of Cry tables are at the 389th slot of the Cry tables.
The both tables have this format each slot:
XX 3C 00 00 YY YY YY 08 FF 00 FF 00
XX is which format of audio should play, if it is compressed, uncompressed, or sound-based moves. From what I have seen:
00: uncompressed, just normal
20: compressed, importing something like this isn't available at this moment
30: uncompressed, mostly used for the second table
I just don't know what these really are but apparently, someone would have understood it better.
YY YY YY 08 is the offset of the cry, inserted cry. A tutorial out there provides you a guide to insert cries:
For the new cries you will be inserting for new slots, it will be 4656 (0x1230) bytes away from the start of the table or at new added slots 388 (0x184) and higher. For XX-s, use 00 for the first table, and use 30 for the second table.
The Auxillary Cry table starts at the 277th slot which is Treecko and right after the limbo slots between Celebi and Treecko. The alignment of this table depends on the actual Pokemon slots starting from slot 277 (Treecko). If you set a 2-byte digit in a slot of the Auxillary Cry Table, it will read a certain slot back at the actual Cry tables. Example: If you have placed 0x0110 "11 01" at Treecko's slot at the Auxillary Cry Table, then it will read the 273rd (0x110th) slot at the actual Cry tables. For expanded Pokemon, most likely, you will start out for the 440th slot which is at the 164th slot of the Auxillary Cry table (146 (0xA3) * 2 = 326 (0x146) bytes away from the start of the table). Most likely, you would place 0x0184 "84 01" at that slot because again, the new slots of Cry tables are at the 389th slot of the Cry tables.
Step 4: Dealing with Dex Entries
Spoiler:
Part 1: National Dex
This is how the National Dex table works:
Part 2: Hoenn Dex (Pokedex)
This is how the Hoenn Dex (Pokedex) table works:
Part 3: Hoenn Dex (Summary)
This is how the Hoenn Dex (Summary) table works:
Part 4: Pokedex Entries
Now there's a whole bunch of other things we need to do to get the dex working. We'll get to that later.
- The current National Dex table is at 0x0831DC82.
- The National Dex table has 2 bytes each Pokemon.
- Go to a free space to create a new National Dex table.
- Create a new National Dex table there. Multiply your desired new slots of Pokémon by 2.
- Select blocks and the type the length with the number of the result. Then fill the selection with "E7 03" or "00". There you go! You got your new table.
- Navigate to 0x0831DC82 to the National Dex table.
- Select and copy 822 bytes (0x336 bytes) of data.
- Paste it to where your new National Dex table starts.
- Repoint all references of the National Dex table to the new table. Replace all 82 DC 31 08 to the pointer of your new table. Also check if it have done 2 occurences.
- If you want to erase the old data to have new spaces, navigate back to 0x0831DC82 to the National Dex table. Select 822 bytes (0x336 bytes) of data. Then, fill it with "FF".
This is how the National Dex table works:
Spoiler:
The National Pokedex Table's slots depends on the number of slots of your Pokemon. Noted that this list doesn't include the slot 0 so, everytime you will look for a slot, it will be minus 1 then multiply by 2 (example: Luxray is at slot number 458 so, its National Pokedex slot is at on the 458th 2-byte slot of the table (that means 457 * 2 bytes from the start of the table)). Then, if you want to put Luxray at number 405 on the Pokedex listing, put 95 01 there.
Part 2: Hoenn Dex (Pokedex)
- The current Hoenn Dex (Pokedex) table is at 0x0831DFB8.
- The Hoenn Dex (Pokedex) table has 2 bytes each Pokemon.
- Go to a free space to create a new Hoenn Dex (Pokedex) table.
- Create a new Hoenn Dex (Pokedex) table there. Multiply your desired new slots of Pokémon by 2.
- Select blocks and the type the length with the number of the result. Then fill the selection with "E7 03" or "00". There you go! You got your new table.
- Navigate to 0x0831DFB8 to the Hoenn Dex (Pokedex) table.
- Select and copy 822 bytes (0x336 bytes) of data.
- Paste it to where your new Hoenn Dex (Pokedex) table starts.
- Repoint all references of the Hoenn Dex (Pokedex) table to the new table. Replace all B8 DF 31 08 to the pointer of your new table. Also check if it have done 2 occurences.
- If you want to erase the old data to have new spaces, navigate back to 0x0831DFB8 to the Hoenn Dex (Pokedex) table. Select 822 bytes (0x336 bytes) of data. Then, fill it with "FF".
This is how the Hoenn Dex (Pokedex) table works:
Spoiler:
The first Hoenn Pokedex Table (which is at 0x0831DFB8) controls the list of the regional Pokedex (Hoenn Dex mode). Unlike the National Pokedex Table which the order controls slot by slot, this one is ordered number by number (that means slot 1 and slot 2 are numbers 001 and 002 respectively in the dex number). The digit you will be putting on slots is the Pokedex number of the Pokemon (not the slot number this time). For example: you want to have Turtwig to be in regional Pokedex number 001. Only you need to do is to have its National Pokedex number which is 387 to be placed on the first slot so, put 83 01 on the first slot.
Another example: You want to have Giratina this time on 210. If its National Pokedex number is 487, then at slot 210 which is at 209 * 2 bytes from the start of the table, put E7 01 there.
Another example: You want to have Giratina this time on 210. If its National Pokedex number is 487, then at slot 210 which is at 209 * 2 bytes from the start of the table, put E7 01 there.
Part 3: Hoenn Dex (Summary)
- The current Hoenn Dex (Summary) table is at 0x0831D94C.
- The Hoenn Dex (Summary) table has 2 bytes each Pokemon.
- Go to a free space to create a new Hoenn Dex (Summary) table.
- Create a new Hoenn Dex (Summary) table there. Multiply your desired new slots of Pokémon by 2.
- Select blocks and the type the length with the number of the result. Then fill the selection with "E7 03" or "00". There you go! You got your new table.
- Navigate to 0x0831D94C to the Hoenn Dex (Summary) table.
- Select and copy 822 bytes (0x336 bytes) of data.
- Paste it to where your new Hoenn Dex (Summary) table starts.
- Repoint all references of the Hoenn Dex (Summary) table to the new table. Replace all 4C D9 31 08 to the pointer of your new table. Also check if it have done 2 occurences.
- If you want to erase the old data to have new spaces, navigate back to 0x0831D94C to the Hoenn Dex (Summary) table. Select 822 bytes (0x336 bytes) of data. Then, fill it with "FF".
This is how the Hoenn Dex (Summary) table works:
Spoiler:
The second Hoenn Pokedex Table (which is at 0x0831D94C) controls the list of the regional Pokedex number to be displayed on Pokemon's summary prior obtaining the National Dex. This time, it is controlled slot by slot, minus 1 because the slot 0 is also never included here. To look for its slot, minus 1 then multiply by 2. For example: You want to have Giratina's regional number is 210 and its data is at slot 540. Look for the slot 540 in the table which is 539 * 2 from the start of the table then put D2 00 there (0x00D2 is 210 in hex).
Part 4: Pokedex Entries
- The current Pokedex Entries table is at 0x0856B5B0.
- The Pokedex Entries table has 32 (0x20) bytes each Pokemon. The table is aligned in the actual Pokedex order.
- Go to a free space to create a new Pokedex Entries table.
- Create a new Pokedex Entries table there. Multiply your desired new slots of Pokémon by 32 (0x20).
- Select blocks and the type the length with the number of the result. Then fill the selection with "CF E2 DF E2 E3 EB E2 FF 00 00 00 00 00 00 00 00 0D D3 55 08 00 00 00 01 00 00 00 01 00 00 00 00". There you go! You got your new table.
- Navigate to 0x0856B5B0 to the Pokedex Entries table.
- Select and copy 12384 bytes (0x3060 bytes) of data.
- Paste it to where your new Pokedex Entries table starts.
- Repoint all references of the Pokedex Entries table to the new table. Replace all B0 B5 56 08 to the pointer of your new table. Also check if it have done 8 occurences.
- If you want to erase the old data to have new spaces, navigate back to 0x0856B5B0 to the Pokedex Entries table. Select 12384 bytes (0x3060 bytes) of data. Then, fill it with "FF".
Now there's a whole bunch of other things we need to do to get the dex working. We'll get to that later.
Step 5: Explanation of how Pokémon animations work in Emerald
Spoiler:
As you all know, in Pokémon Emerald, every Pokémon has a two-frame animation that displays went sent out in-battle, and in the SUMMARY screen. Let me first explain how the table works.
First of all, each Pokémon has two frames in their animation (except Unown, Spinda, Castform, and Deoxys). Each Pokémon is also assigned an animation number, which is handled separately from how its frames are displayed. There is a table controlling how it switches between frames, and there is another table controlling how it animates (rotation/scaling, etc.).
Starting at 0x08309AAC and ending at 0x0830A18B is a table. This table is 4 bytes per mon. Each entry in the table is a pointer to part of another table, which starts at 0x08308CBC. At 0x08308CBC is ANOTHER table, this time its 8 bytes per mon (2 pointers per mon). I'm not 100% on how exactly it works, but these pointers point to the code that determines how the frames are switched during its animation.
As for the actual movement part of the animation, it is handled by a table at 0x083299EC, for the ront sprites. The table is one byte per mon. There is another table at 0x0860A8C8. This table is also one byte per mon. Both use the same set of animations, however, the indexes that reference the animations are used differently in the back sprite animation table.
First of all, each Pokémon has two frames in their animation (except Unown, Spinda, Castform, and Deoxys). Each Pokémon is also assigned an animation number, which is handled separately from how its frames are displayed. There is a table controlling how it switches between frames, and there is another table controlling how it animates (rotation/scaling, etc.).
Starting at 0x08309AAC and ending at 0x0830A18B is a table. This table is 4 bytes per mon. Each entry in the table is a pointer to part of another table, which starts at 0x08308CBC. At 0x08308CBC is ANOTHER table, this time its 8 bytes per mon (2 pointers per mon). I'm not 100% on how exactly it works, but these pointers point to the code that determines how the frames are switched during its animation.
As for the actual movement part of the animation, it is handled by a table at 0x083299EC, for the ront sprites. The table is one byte per mon. There is another table at 0x0860A8C8. This table is also one byte per mon. Both use the same set of animations, however, the indexes that reference the animations are used differently in the back sprite animation table.
A Choice Point!
At the point, you have read on how the animations work, right? Now, decide: you will disable it or not? It is up to you. Continue at Step 6A if you want to maintain the animations. Or, continue at Step 6B if you want to disable the animations. Either way, after these, you will continue at Step 7.
At the point, you have read on how the animations work, right? Now, decide: you will disable it or not? It is up to you. Continue at Step 6A if you want to maintain the animations. Or, continue at Step 6B if you want to disable the animations. Either way, after these, you will continue at Step 7.
Step 6A: Expanding Pokémon animations
Spoiler:
Part 1: Front Animations
Part 2: Back Animations
Part 3: Frame Switching
Part 4: Animation Timing
- The current Front Animations table is at 0x083299EC.
- The Front Animations table has 1 byte each Pokemon
- Go to a free space to create a new Front Animations table.
- Create a new Front Animations table there. Multiply your desired new slots of Pokémon by 1.
- Select blocks and the type the length with the number of the result. Then fill the selection with "00". There you go! You got your new table.
- Navigate to 0x083299EC to the Front Animations table.
- Select and copy 440 bytes (0x1B8 bytes) of data.
- Paste it to where your new Front Animations table starts.
- Repoint all references of the Front Animations table to the new table. Replace all EC 99 32 08 to the pointer of your new table. Also check if it have done 4 occurences.
- If you want to erase the old data to have new spaces, navigate Front to 0x083299EC to the Front Animations table. Select 440 bytes (0x1B8 bytes) of data. Then, fill it with "FF".
Part 2: Back Animations
- The current Back Animations table is at 0x0860A8C8.
- The Back Animations table has 1 byte each Pokemon
- Go to a free space to create a new Back Animations table.
- Create a new Back Animations table there. Multiply your desired new slots of Pokémon by 1.
- Select blocks and the type the length with the number of the result. Then fill the selection with "00". There you go! You got your new table.
- Navigate to 0x0860A8C8 to the Back Animations table.
- Select and copy 440 bytes (0x1B8 bytes) of data.
- Paste it to where your new Back Animations table starts.
- Repoint all references of the Back Animations table to the new table. Replace all C8 A8 60 08 to the pointer of your new table. Also check if it have done 1 occurence.
- If you want to erase the old data to have new spaces, navigate back to 0x0860A8C8 to the Back Animations table. Select 440 bytes (0x1B8 bytes) of data. Then, fill it with "FF".
Part 3: Frame Switching
- The current Frame Switching table is at 0x08309AAC.
- The Frame Switching table has 4 byte each Pokemon. This is a table of pointers.
- Go to a free space to create a new Frame Switching table.
- Create a new Frame Switching table there. Multiply your desired new slots of Pokémon by 4.
- Select blocks and the type the length with the number of the result. Then fill the selection with "BC 8C 30 08". There you go! You got your new table.
- Navigate to 0x08309AAC to the Frame Switching table.
- Select and copy 1760 bytes (0x6E0 bytes) of data.
- Paste it to where your new Frame Switching table starts.
- Repoint all references of the Frame Switching table to the new table. Replace all AC 9A 30 08 to the pointer of your new table. Also check if it have done 5 occurences.
- If you want to erase the old data to have new spaces, navigate Front to 0x08309AAC to the Frame Switching table. Select 1760 bytes (0x6E0 bytes) of data. Then, fill it with "FF".
- Back at Normal Palette table, after every pointer, place "XX XX". XX XX is a digit ranging 0x0000 until 0x01B7. This also depends on how the frames switch during animation. You may not need to do this now. You may do this later when you will set animation indexes to Pokemon.
- Back at Shiny Palette table, after every pointer, place "XX XX". XX XX is a digit ranging 0x01F4 until 0x03AB. This also depends on how the frames switch during animation for Shiny Pokemon. You may do this later when you will set animation indexes to Pokemon.
Part 4: Animation Timing
- The current Animation Timing table is at 0x08329B87.
- The Animation Timing table has 1 byte each Pokemon.
- Go to a free space to create a new Animation Timing table.
- Create a new Animation Timing table there. Multiply your desired new slots of Pokémon by 1.
- Select blocks and the type the length with the number of the result. Then fill the selection with "00". There you go! You got your new table.
- Navigate to 0x08329B87 to the Animation Timing table.
- Select and copy 412 bytes (0x1B8 bytes) of data.
- Paste it to where your new Animation Timing table starts.
- Repoint all references of the Animation Timing table to the new table. Replace all 87 9B 32 08 to the pointer of your new table. Also check if it have done 2 occurences.
- If you want to erase the old data to have new spaces, navigate Front to 0x08329B87 to the Animation Timing table. Select 412 bytes (0x1B8 bytes) of data. Then, fill it with "FF".
- At 0x08034BFE, put 07 E0. This breaks the limiter for animating sprites.
- At 0x080A5FEE, put 03 E0. This breaks another limiter .
Step 6B: Disabling Pokémon animations
Spoiler:
18080C: 10 B5 02 48 E0 61 10 BC 01 BC 00 47 15 07 18 08 (this will overwrite animation #00 with a blank animation)
Starting at 0x083299EC and ending at 0x08329B87 is the front sprite animation table. Create a table at any free space available which size is your new number of slots (example: you have 880 slots so, you need to highlight 880 (0x370) bytes). Then, fill the selection with 00. Repoint all references of this table to the new table. Replace all EC 99 32 08 to the pointer of your new table. In case you want to delete old data, highlight 0x083299EC until 0x08329B87, and fill it with FF.
308CC0: 38 F5 2F 08
Starting at 0x08309AAC and ending at 0x0830A11B is the frame control table. Create a table at any free space available which size is your new number of slots times 4 (example: you have 880 slots so, you need to highlight 880 * 4 (0x370 * 4) = 3520 (0xDC0) bytes). Then, fill the selection with BC 8C 30 08. Repoint all references of this table to the new table. Replace all AC 9A 30 08 to the pointer of your new table. In case you want to delete old data, highlight 0x08309AAC until 0x0830A11B, and fill it with FF.
6EE38: 00 00
6ECC4: 01 28
Starting at 0x0860A8C8 and ending at 0x0860AA63 is the back sprite animation table. Create a table at any free space available which size is your new number of slots (example: you have 880 slots so, you need to highlight 880 (0x370) bytes). Then, fill the selection with 00. Repoint all references of this table to the new table. Replace all C8 A8 60 08 to the pointer of your new table. In case you want to delete old data, highlight 0x0860A8C8 until 0x0860AA63, and fill it with FF.
Starting at 0x0860ACE4 and ending at 0x0860AD2E is the index list of animations that back sprites may use. Change every byte here to 00. I think it should work fine if you just change the first two bytes, but it won't hurt to just make it all 00. You do not have to repoint this, as this table is not related to how many Pokémon there are.
Test. The Pokémon sprites should not animate, and should behave exactly as they do in Ruby/Sapphire and FireRed/LeafGreen.
Step 7: Dex-related byte changes
Spoiler:
Make the following byte changes:
C06FC: 11 48
C06AA: 10 48
C06BE: 3E E0
C07D8: 05 49
C079C: 0A 49
BB6AC: 00 20
6D42C: 00 00 (dex limiter)
If you have more than 510 Pokémon:
BC91A: 5D 21 C9 00
If you have less than 510 Pokémon:
BC91A: XX (XX = dex length / 2)
C06FC: 11 48
C06AA: 10 48
C06BE: 3E E0
C07D8: 05 49
C079C: 0A 49
BB6AC: 00 20
6D42C: 00 00 (dex limiter)
If you have more than 510 Pokémon:
BC91A: 5D 21 C9 00
If you have less than 510 Pokémon:
BC91A: XX (XX = dex length / 2)
Step 8: Changing lsl operations to make scrolling and other things work properly
Spoiler:
If you don't want to do this part, download the patch on the attachment below. It is a patch that will make Steps 8, 9, and 10 to be done easily. If you patched, then go immediately to Step 11. And make sure you back-up your ROM before using the patch for fail safe. But, I more recommend to do this manually instead of patching.
BB42C: 12 01
BD87C: 09 01
BD54C: 12 01
BD4B0: 09 01
BD5B8: 2D 01
BD082: 12 01
BD57E: 1B 01
BCF9E: 09 01
BCFBA: 09 01
BCFDC: 1B 01
BCFFE: 12 01
BD01A: 12 01
BB456: 12 01
BD3B8: 12 01
BD826: 09 01
BD844: 1B 01
BD02A: 12 01
BD044: 09 01
BD05E: 09 01
BBD8C: 12 01
BBDBA: 1B 01
BC42E: 1B 01
BB8CA: 09 01
BBABE: 12 01
BBBA8: 24 01
BBBD4: 12 01
BBF96: 09 01
BC140: 09 01
BC288: 1B 01
BC2B4: 12 01
BE892: 09 01
BC4CE: 1B 01
C1808: 12 01
C23F2: 1B 01
Note at this point the Pokédex should freeze the game upon opening, as there are still some things we need to take care of.
BB42C: 12 01
BD87C: 09 01
BD54C: 12 01
BD4B0: 09 01
BD5B8: 2D 01
BD082: 12 01
BD57E: 1B 01
BCF9E: 09 01
BCFBA: 09 01
BCFDC: 1B 01
BCFFE: 12 01
BD01A: 12 01
BB456: 12 01
BD3B8: 12 01
BD826: 09 01
BD844: 1B 01
BD02A: 12 01
BD044: 09 01
BD05E: 09 01
BBD8C: 12 01
BBDBA: 1B 01
BC42E: 1B 01
BB8CA: 09 01
BBABE: 12 01
BBBA8: 24 01
BBBD4: 12 01
BBF96: 09 01
BC140: 09 01
BC288: 1B 01
BC2B4: 12 01
BE892: 09 01
BC4CE: 1B 01
C1808: 12 01
C23F2: 1B 01
Note at this point the Pokédex should freeze the game upon opening, as there are still some things we need to take care of.
Back-up Point!
Also make sure you guys back up your ROM before doing the following steps. The very nature of how Step 9 is handled is almost sure to overwite a couple bytes or so that aren't actually constants. Eventually I plan on optimizing it so that we only overwrite bytes that are confirmed to be necessary. I mean, the current implementation of it works but the whole game hasn't been tested thoroughly, so we don't know for sure yet if this will overwrite something that's not actually related to the Pokédex routines. That is why I say use this at your own risk. The reason why I posted this tutorial at this stage is because the more people test this out, the faster we can find any problems that occur.
Also make sure you guys back up your ROM before doing the following steps. The very nature of how Step 9 is handled is almost sure to overwite a couple bytes or so that aren't actually constants. Eventually I plan on optimizing it so that we only overwrite bytes that are confirmed to be necessary. I mean, the current implementation of it works but the whole game hasn't been tested thoroughly, so we don't know for sure yet if this will overwrite something that's not actually related to the Pokédex routines. That is why I say use this at your own risk. The reason why I posted this tutorial at this stage is because the more people test this out, the faster we can find any problems that occur.
Step 9: Massive byte changes to make scrolling and other things work properly
Spoiler:
If you don't want to do this part, download the patch on the attachment below. It is a patch that will make Steps 8, 9, and 10 to be done easily. If you patched, then go immediately to Step 11. And make sure you back-up your ROM before using the patch for fail safe. But, I more recommend to do this manually instead of patching.
Open up your Emerald ROM in a hex editor with a Search & Replace function.
Go to offset 0x08000000. Using the search & replace function:
Search: 81 01 00 00
Replace: E7 02 00 00
Do this for the first 29 occurances in the ROM.
Now go back to offset 0x08000000.
Search: 9B 01 00 00
Replace: 0D 03 00 00
Do the for the first 10 occurances in the ROM.
Now we are going to replace well over 100 constants.
Go to offset 0x080BB6AC. Starting at 0x080BB6AC but ending before 0x080C5000:
Search: 06 00 00
Replace: 0D 00 00.
Make sure you stop replacing around the C5000 mark! Alternatively for that last part, you could just use this Python script instead (credit to karatekid552):
Open up your Emerald ROM in a hex editor with a Search & Replace function.
Go to offset 0x08000000. Using the search & replace function:
Search: 81 01 00 00
Replace: E7 02 00 00
Do this for the first 29 occurances in the ROM.
Now go back to offset 0x08000000.
Search: 9B 01 00 00
Replace: 0D 03 00 00
Do the for the first 10 occurances in the ROM.
Now we are going to replace well over 100 constants.
Go to offset 0x080BB6AC. Starting at 0x080BB6AC but ending before 0x080C5000:
Search: 06 00 00
Replace: 0D 00 00.
Make sure you stop replacing around the C5000 mark! Alternatively for that last part, you could just use this Python script instead (credit to karatekid552):
Code:
start = 0xBB6AC
end = 0xC5000
rom_path = "[B]insert file path to GBA ROM here[/B]"
search = "\x06\x00\x00"
replace = "\x0D\x00\x00"
with open(rom_path, "r+b") as rom:
rom.seek(start)
read = rom.read(end-start)
write = ""
start_search = 0
while True:
find = read.find(search, start_search)
if find == -1:
write += read[start_search:]
break
else:
write += read[start_search:find]+replace
start_search = (3+find)
print start_search, "|", find
rom.seek(start)
rom.write(write)
Step 10: Fix Castform, other glitches, and misc necessary byte changes
Spoiler:
If you don't want to do this part, download the patch on the attachment below. It is a patch that will make Steps 8, 9, and 10 to be done easily. If you patched, then go immediately to Step 11. And make sure you back-up your ROM before using the patch for fail safe. But, I more recommend to do this manually instead of patching.
The massive byte changes we did in Step 9 also corrupts Castform's weather forms, so we need to go back and fix those. Simply make these byte changes:
42730: 81 01
5DF10: 81 01
6F100: 81 01
A5EA4: 81 01
B1C30: 81 01 (this fixes the encounter music number 8 because 0x181 is the music number of the swimmer theme)
A35A2: 01 1C 11 E0
34A16: 07 E0
And now we're good to go!
The massive byte changes we did in Step 9 also corrupts Castform's weather forms, so we need to go back and fix those. Simply make these byte changes:
42730: 81 01
5DF10: 81 01
6F100: 81 01
A5EA4: 81 01
B1C30: 81 01 (this fixes the encounter music number 8 because 0x181 is the music number of the swimmer theme)
A35A2: 01 1C 11 E0
34A16: 07 E0
And now we're good to go!
Step 11: Fix this one glitch
Spoiler:
This one deals with a glitch where Ivysaur would appear where Luxray (I think) was supposed to be in the dex. Had something to do with some missing RAM calculation offset. To fix that, insert this routine into free space:
Here's the compiled version of the ASM routine:
Next, make these byte changes:
BBD94: 0E 4A
BBDD0: 9C 0F 00 02
C1808: 12 01
C1814: 00 48 00 47 XX XX XX 08 (XX XX XX is the offset of above routine +1)
Code:
.text
.align 2
.thumb
.thumb_func
.global positionfix
main:
push {r0-r3}
ldr r0, .FirstCheck
ldrb r0, [r0]
mov r1, #0xFF
cmp r0, r1 /*compares .FirstCheck value to FF. If not, you're outside*/
bne Outside
b Inside
Inside:
ldr r0, .Counter1Inside
ldrb r0, [r0]
ldr r1, .Counter2Inside
ldrb r1, [r1]
cmp r0, r1
bne next1
b End
next1:
mov r2, #0x0
ldr r3, .FinalPosInside
strh r2, [r3]
b End
Outside:
ldr r0, .Counter1Outside
ldrb r0, [r0]
ldr r1, .Counter2Outside
ldrb r1, [r1]
cmp r0, r1
bne next2
b End
next2:
mov r2, #0x0
ldr r3, .FinalPosOutside
strh r2, [r3]
b End
End:
pop {r0-r3}
ldr r0, .NextRoutine
str r0, [r6]
pop {r4-r7}
pop {r0}
bx r0
.align
.FirstCheck: .word 0x02000D1C
.Counter1Inside: .word 0x02000F9E
.Counter2Inside: .word 0x02000FA0
.FinalPosInside: .word 0x02000F9A
.Counter1Outside: .word 0x02000D22
.Counter2Outside: .word 0x02000D24
.FinalPosOutside: .word 0x02000D1E
.NextRoutine: .word 0x080C1D39
Code:
0F B4 11 48 00 78 FF 21 88 42 0B D1 FF E7 0F 48
00 78 0F 49 09 78 88 42 00 D1 0E E0 00 22 0D 4B
1A 80 0A E0 0C 48 00 78 0C 49 09 78 88 42 00 D1
03 E0 00 22 0A 4B 1A 80 FF E7 0F BC 09 48 30 60
F0 BC 01 BC 00 47 C0 46 1C 0D 00 02 9E 0F 00 02
A0 0F 00 02 9A 0F 00 02 22 0D 00 02 24 0D 00 02
1E 0D 00 02 39 1D 0C 08
Next, make these byte changes:
BBD94: 0E 4A
BBDD0: 9C 0F 00 02
C1808: 12 01
C1814: 00 48 00 47 XX XX XX 08 (XX XX XX is the offset of above routine +1)
Now test. If you did everything correctly, you should have a fully working Pokédex expansion on your Emerald ROM.
![[PokeCommunity.com] Expanding the Pokédex into Emerald [PokeCommunity.com] Expanding the Pokédex into Emerald](https://i.imgur.com/phHNWhE.png)
![[PokeCommunity.com] Expanding the Pokédex into Emerald [PokeCommunity.com] Expanding the Pokédex into Emerald](https://i.imgur.com/HhEzlEc.png)
And, here a video tutorial made by LCCoolJ95 just in case you might want a visual aid on how anyone should be doing this:
This tutorial was just to get everything necessary for the Pokédex alone to work. The offsets for the tables that need to be expanded are listed here:
Spoiler:
Species Names = 3185C8
Front Sprite Table = 30A18C
Back Sprite Table = 3028B8
Front Palette Table = 303678
Shiny Palette Table = 304438
Base Stats = 3203CC
Moveset Pointers = 32937C
National Dex Order = 31DC82
Pokédex Data = 56B5B0
TM Compatibility = 31E898
Evolution Table = 32531C
Icon Sprite Table = 57BCA8
Icon Palette Table = 57C388
Main Cry Table = 69DCF4
Auxillary Cry Table = 31F61C
Footprint Table = 56E694
Move Tutor Compatib. = 615048
Animation Table = 3299EC
Frame Control Table = 309AAC
Back Animation Table = 60A8C8
EnemyY Table = 300D38
PlayerY Table = 3021D8
Enemy Altitude Table = 305DCC
Front Sprite Table = 30A18C
Back Sprite Table = 3028B8
Front Palette Table = 303678
Shiny Palette Table = 304438
Base Stats = 3203CC
Moveset Pointers = 32937C
National Dex Order = 31DC82
Pokédex Data = 56B5B0
TM Compatibility = 31E898
Evolution Table = 32531C
Icon Sprite Table = 57BCA8
Icon Palette Table = 57C388
Main Cry Table = 69DCF4
Auxillary Cry Table = 31F61C
Footprint Table = 56E694
Move Tutor Compatib. = 615048
Animation Table = 3299EC
Frame Control Table = 309AAC
Back Animation Table = 60A8C8
EnemyY Table = 300D38
PlayerY Table = 3021D8
Enemy Altitude Table = 305DCC
Also one difference from FireRed is that there is no limiter to how high the Seen/Caught total is on the Save menu and on the Trainer Card.
Also some of my limiters for the altitude stuff may be wrong. If it is, and if there are any other problems, please report it. As I said earlier, use this at your own risk, as all this was discovered recently and there may be issues we don't know about yet.
I would like to give a huuuuuuuuge thanks to SBird, who did it on a German Emerald ROM first. Without him, none of this would be possible. What I did was find the corresponding English ROM offsets, but as expected that didn't work out perfectly, as there was a few operation codes I had to find on my own. Nonetheless, his advice helped a lot and pointed me in the right direction, so again, SBird deserves huuuuuuuuuuuge credit for this.
Also let me say this again, USE AT YOUR OWN RISK!!! I say this because during Step 8, there might be a few operation codes that I missed, and I alone can't test this out thoroughly. Karatekid552, if you're reading this, and if you're going to implement it into G3HS, I recommend you do it as a beta test type of thing. The main reason being, I only went up to 493 when I did this, so I don't know of any problems that may arise if one were to expand to 649 or 721.
(I believe 744 is the max that you can have in the Pokédex in Emerald, as it was the highest number that the Seen/Caught flags would register)
Credits:
- SBird: for documenting it and just being awesome. For every credit you will make, you should add this guy on the credits. He is the real mastermind.
- Chaos Rush: The former owner of this thread. He made almost everything to make the expansion working in an English Emerald ROM. I took over for the continuity and adding some improvements while he's away. The "fix this one glitch" ASM routine, and fixing Castform back.
- diegoisawesome: I ripped the save block routine and the save table data from CrystalDust. Sorry :)
- Doesn'tKnowHowToPlay: There was an inaccuracy in one of SBird's notes and so I applied byte changes similarly to his FireRed implementation of it and got everything working. That and parts of this tutorial are copied word for word from his for the sake of continuity.
- shinyquagsire: for documenting how Emerald animations work.
- karatekid552: for his awesome G3HS tool, as well as for his Python script and just being an awesome dude.
- LCCoolJ95: Finding the limiter for sprites during evolution, and for his wonderful video tutorial.
- Artemis64: For giving his guide on how to expand the animations rather than disabling it.
- Purple Orange: The Held Items fix to make it read the new base stat table to avoid expanded Pokemon from keep holding "????????" item when caught or received.
EDIT (2016/01/07): I've updated the patch that will make steps 8, 9, and 10 to be done. And, also make sure you backed-up your ROM before patching for failing purposes. But, I more recommend to do this manually instead of patching.
And now, Generation VII (and including Magearna) is now around. It will be yet to be revealed on how much Pokemon will add on. However, the current expansion only supports in a maximum number of 744. I've read notes of SBird and one of his notes says that it can be expanded to more than 744. I'll try and do some testing soon to make sure if still can go further. The bad news right now is the availability of PC Boxes/Storage in Gen III games (no idea how to expand it more but it will cause troublesome).
Attachments
Last edited: