< >
Hello, guest! Please log in or register.

The PokéCommunity

Go Back     The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources Tutorial Expanding the Pokédex into Emerald

Notices

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.

Reply Post Reply
 
Thread Tools
  #1    
Old April 26th, 2014 (10:39 PM). Edited February 28th, 2016 by Sky High.
Sky High's Avatar
Sky High Sky High is offline
I rebel.
 
Join Date: Feb 2014
Location: Shiganshina District, Wall Maria
Gender: Male
Nature: Adamant
Posts: 390
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:
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


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


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:

Code:
YY = (X / 8) + 1 X = divisible by 8. X < if not divisible by 8, round it off to the highest nearest number that is divisble by 8. Whereas, X is the number of Pokedex entries. YY 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.

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



Step 4: Dealing with Dex Entries
Spoiler:
Part 1: National Dex
  • 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.


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.


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.

Step 6A: Expanding Pokémon animations
Spoiler:
Part 1: Front Animations
  • 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:
Let’s be real here. No one is going to sprite 2 frames for the 300+ Pokémon that make up Generations IV, V, and VI. If you want to disable animations to behave just like Ruby and FireRed, this will make disabling the animations a part of this tutorial.

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)


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.


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.

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):
Code:
start = 0xBB6AC
end = 0xC5000
rom_path = "insert file path to GBA ROM here"
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!


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:
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
Here's the compiled version of the ASM routine:
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.



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


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).
Reply With Quote

Relevant Advertising!

  #2    
Old April 27th, 2014 (7:01 AM). Edited April 27th, 2014 by OronDF343.
OronDF343's Avatar
OronDF343 OronDF343 is offline
 
Join Date: Apr 2012
Location: Israel
Gender: Male
Nature: Lonely
Posts: 7
Great post! This is exactly what I needed, thanks!

Question:
Quote:
Originally Posted by Chaos Rush View Post
Put YY 30 at x843A8, where YY is the number of bytes between the sets of flags. YY is probably the same as XX, but it doesn't have to be.
Do you mean the space between the sets of flags, in bytes? or the offset of the second set reative to the first?
I tried both, see no diff yet...

EDIT:
If you say there should be 40 pointers, and Search/Replace finds 132, is this ok? Am I doing it wrong?
I noticed you copied the numbers of pointers from the other guide.

EDIT2:
After preforming steps 1&2, I can't open the dex in game, and it displays the wrong number of either seen or caught.
Reply With Quote
  #3    
Old April 27th, 2014 (9:33 AM).
HidoranBlaze's Avatar
HidoranBlaze HidoranBlaze is offline
 
Join Date: Apr 2013
Age: 19
Gender: Male
Posts: 252
Nice work Chaos!
I'll try to beta test this with 649 Pokemon. (cuz screw Kalos, I'm not inserting that many sprites)
Reply With Quote
  #4    
Old April 27th, 2014 (9:45 AM).
Chaos Rush's Avatar
Chaos Rush Chaos Rush is offline
im sexy and i know it
 
Join Date: May 2007
Location: Taylor Swift
Gender: Male
Nature: Adamant
Posts: 1,296
Quote:
Originally Posted by tURuI View Post
EDIT2:
After preforming steps 1&2, I can't open the dex in game, and it displays the wrong number of either seen or caught.
That's exactly what's supposed to happen when you've only done those steps. That's why I removed some of Doesnt's text saying "Test and it should work" because it doesn't at that point on Emerald. You have to do the whole thing.

My projects:
Untitled Pokémon fangame (pictured above) | Final Fantasy II NES retranslation | Mother 1/EarthBound Beginnings Color Restoration for GBA
Non-Pokémon hacks I support:
Sonic Classic Heroes
Sonic 3 Complete
Reply With Quote
  #5    
Old April 27th, 2014 (11:34 AM). Edited April 27th, 2014 by HidoranBlaze.
HidoranBlaze's Avatar
HidoranBlaze HidoranBlaze is offline
 
Join Date: Apr 2013
Age: 19
Gender: Male
Posts: 252
Quote:
Originally Posted by Chaos Rush View Post
Be aware that I did not cover these fundamental changes:
*TM compatibility
*Move Tutor compatibility
*Evolution table
*Cry table
*Footprint table
I’m not covering these simply because karatekid552 already has these offsets for his tool, and one o the main reasons why I’m documenting this is so that karatekid552 can add Emerald Pokédex expansion support.
The cry conversion table isn't actually listed in Karatekid's ini (thehoenncryauxtable section) for Emerald. But it wasn't that hard to find. It's at 0x31F61C for BPEE.

EDIT: Looks like Gamer2020 found it a long time ago. I guess I just wasted 2 minutes of my time then :p
Reply With Quote
  #6    
Old April 27th, 2014 (11:50 AM). Edited April 27th, 2014 by Chaos Rush.
Chaos Rush's Avatar
Chaos Rush Chaos Rush is offline
im sexy and i know it
 
Join Date: May 2007
Location: Taylor Swift
Gender: Male
Nature: Adamant
Posts: 1,296
Also make sure you guys back up your ROM before doing Step 9. 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.

My projects:
Untitled Pokémon fangame (pictured above) | Final Fantasy II NES retranslation | Mother 1/EarthBound Beginnings Color Restoration for GBA
Non-Pokémon hacks I support:
Sonic Classic Heroes
Sonic 3 Complete
Reply With Quote
  #7    
Old April 27th, 2014 (12:33 PM).
wael96 wael96 is offline
 
Join Date: Jul 2013
Location: Beijing,China
Gender: Male
Posts: 38
Thanks you for the work, a feature like expansion of pokedex is vey cool! BTW, how to find the RAM for the dex flags?
Reply With Quote
  #8    
Old April 27th, 2014 (12:35 PM). Edited April 27th, 2014 by Chaos Rush.
Chaos Rush's Avatar
Chaos Rush Chaos Rush is offline
im sexy and i know it
 
Join Date: May 2007
Location: Taylor Swift
Gender: Male
Nature: Adamant
Posts: 1,296
Quote:
Originally Posted by wael96 View Post
Thanks you for the work, a feature like expansion of pokedex is vey cool! BTW, how to find the RAM for the dex flags?
I used 0203D800 for the SEEN flags and 0203D860 for the CAUGHT flags.

I found a glitch: When viewing one of the search mode listings (A-Z, by type, smallest/largest, lightest/heaviest, color, etc.) and then going back to the main national listing, the list will appear blank. I'm 90% sure this can be fixed just by finding an lsl opcode that's related to it and adding +1 to it.
EDIT: To fix that, put 1B 01 at xBC42E. I have added it to the first post.

My projects:
Untitled Pokémon fangame (pictured above) | Final Fantasy II NES retranslation | Mother 1/EarthBound Beginnings Color Restoration for GBA
Non-Pokémon hacks I support:
Sonic Classic Heroes
Sonic 3 Complete
Reply With Quote
  #9    
Old April 27th, 2014 (1:47 PM).
Chaos_Darkrai's Avatar
Chaos_Darkrai Chaos_Darkrai is offline
 
Join Date: Apr 2012
Gender: Male
Posts: 284
WOW! Just wanted to say, INCREDIBLE job on this, Chaos Rush! One question I have, though... How will the battle frontier work with the extended pokemon? Just a question, that, honestly, I am quite curious about!
░░░░░███████ ]▄▄▄▄▄▄▄▄
▂▄▅█████████▅▄▃▂
Il███████████████████].
◥⊙▲⊙▲⊙▲⊙▲⊙▲⊙▲⊙◤..

If you're looking for a good time, or just want to chat, come over to Weloxux and I's channel at:
http://mibbit.com/?server=irc.mibbit...%23Dragons_Den

Reply With Quote
  #10    
Old April 27th, 2014 (2:07 PM).
SBird SBird is offline
 
Join Date: Aug 2009
Gender: Male
Posts: 76
The reason why this only supports up to 744 Pokémon is actually this:

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 x000000.
Search: 9B 01 00 00
Replace: 0D 03 00 00

I guess if you fiddle around with the numbers you should be able to add even more if you are crazy like that. The reason I chose 744 is because I ran into issues with higher numbers at first, but I guess those came from another set of global vars and would be easy to fix anyways. Keep in mind though if you really want to go further in terms of how many entries to place in the dex you also want to allocate more RAM via the malloc operation AND spare some space for the global variables, because neighter me nor chaos rush did calculate exactly how many places there are if you just add 0x700 or shift the bytes one more(which basically means a multiply of two so 0x600 becomes 0xC00)

So thats that, the first one controls how many entries are displayed by the way: 0x02E7 = 743(d), that makes 744 if you count entry zero.

~SBird
Reply With Quote
  #11    
Old April 27th, 2014 (4:40 PM).
Chaos Rush's Avatar
Chaos Rush Chaos Rush is offline
im sexy and i know it
 
Join Date: May 2007
Location: Taylor Swift
Gender: Male
Nature: Adamant
Posts: 1,296
Here are some offsets that may or may not be necessary (this would be part of Step 8 should it be confirmed that it's necessary):
080BB3BA: 12 01
080BB5AE: 1B 01
080BC42E: 1B 01 <--- fixes Search-related stuff
080BC4CE: 1B 01
080BF3BE: 1B 01
080BF59E: 1B 01
080BFB80: 09 01
080C17C6: 12 01
080C23F2: 1B 01

My projects:
Untitled Pokémon fangame (pictured above) | Final Fantasy II NES retranslation | Mother 1/EarthBound Beginnings Color Restoration for GBA
Non-Pokémon hacks I support:
Sonic Classic Heroes
Sonic 3 Complete
Reply With Quote
  #12    
Old April 27th, 2014 (7:16 PM). Edited April 27th, 2014 by Chaos Rush.
Chaos Rush's Avatar
Chaos Rush Chaos Rush is offline
im sexy and i know it
 
Join Date: May 2007
Location: Taylor Swift
Gender: Male
Nature: Adamant
Posts: 1,296
I found and squashed another bug. The bug was that if you press START in the main Pokédex screen to make that small blue menu slide from the bottom (the one that says "BACK TO LIST/LIST TOP/LIST BOTTOM/CLOSE POKéDEX"), then Pokédex slot #405 (Luxray) would be overwritten with the last menu choice you had in that blue menu (basically it would show either Missingno, Bulbasaur, Ivysaur, or Venusaur where Luxray is supposed to be if you bring up the small blue menu by pressing START). This was because the RAM location of that menu variable conflicted with that of Luxray's slot on the Pokédex RAM. This is fixed by doing the following byte changes:
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
Again, added to the first post as well.

EDIT: Found and squashed yet ANOTHER bug. Make these byte changes in order to get the category listings to load correctly when highlighting "SHIFT" in the mode change menu:
BC4CE: 1B 01
C1808: 12 01
C23F2: 1B 01

EDIT: There is one last bug that I'm trying to squish. What happens is that the Pokédex doesn't remember the position you were at when you press SELECT to bring up the mode change menu, instead it will always bring you back to Bulbasaur (or Treecko if you're in Hoenn dex mode). The position you were at is held at 02000D1E (0200061E in a vanilla Emerald ROM). It should only be overwriting that offset with 0000 if you are switching between National and Hoenn, but for some reason it is always overwriting it with 0000 whether you switch or not. I don't know what's causing this, and I've tried looking into it but with little success. If someone can help me with this, I'd be very grateful, as this is the last final bug to squish before we have a seemingly perfect Pokédex expansion.

My projects:
Untitled Pokémon fangame (pictured above) | Final Fantasy II NES retranslation | Mother 1/EarthBound Beginnings Color Restoration for GBA
Non-Pokémon hacks I support:
Sonic Classic Heroes
Sonic 3 Complete
Reply With Quote
  #13    
Old April 27th, 2014 (10:54 PM).
wael96 wael96 is offline
 
Join Date: Jul 2013
Location: Beijing,China
Gender: Male
Posts: 38
I am now facing the question which showed as pink color text... may you help me?

Put a pointer to whichever set of flags comes first at x843BC.(Does this mean" if I use the 0x0203D800, then I should type 00D80302 at 0x843BC?)
Put 20 1C 00 00 at x8439A.
Put XX 22 at x843A0, where XX is the number of bytes taken by your dex flags.[COLOR="rgb(255, 0, 255)"](sorry that I don't understand about the value "XX" Does this mean "number of dex entries- the answer is (number of dex entries)/8, rounded up." )[/COLOR]
Put 20 1C at x843A6.
Put YY 30 at x843A8, where YY is the number of bytes between the sets of flags. YY is probably the same as XX, but it doesn't have to be.
Put XX 22 at x843AC, where XX is the number of bytes taken by your dex flags.

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.
Reply With Quote
  #14    
Old April 27th, 2014 (11:10 PM).
Sniper's Avatar
Sniper Sniper is offline
ふゆかい
 
Join Date: Nov 2013
Location: Philippines
Gender: Male
Nature: Quiet
Posts: 1,448
Omg. This really awesome omg omg! :D I can finally put more x3


Reply With Quote
  #15    
Old April 27th, 2014 (11:24 PM). Edited April 28th, 2014 by OronDF343.
OronDF343's Avatar
OronDF343 OronDF343 is offline
 
Join Date: Apr 2012
Location: Israel
Gender: Male
Nature: Lonely
Posts: 7
Quote:
Originally Posted by Chaos Rush View Post
Starting at x309AAC and ending at x30A11B is a table. This table is 4 bytes per mon.
Are you sure this table ends at x30A11B? I found exactly 28 more pointers right after it, which means that they could be for slots 412-439 which are the alternate formes. The same could be true for the sprite animation tables. (It's not the same for the animation tables most likely)

EDIT1+2: Found Hoenn Dex Order. It's at x31DFB8. There are 2 pointers to it. It is 0x194 bytes long, just like the length of the Hoenn dex.
EDIT3: Heres what I found from analyzing the data: There are 411 entries in the Hoenn dex table, each one has the National dex ID of the pokemon that appears in that slot in the Hoenn Dex. My guess is that there is a limiter and/or a global variable somewhere. Another thing: I'm not sure if it has one more entry for Missingno or not (probably not)
tl;dr: The table is 0x336 bytes long, 2 bytes per entry, 411 entries total.
Reply With Quote
  #16    
Old April 28th, 2014 (12:56 PM).
Dragonflye's Avatar
Dragonflye Dragonflye is offline
 
Join Date: Dec 2009
Gender: Male
Posts: 77
Thanks for the deleting the 2nd Frame Tut. It work, but tURuI has right, the end Offsets are not correkt.



Reply With Quote
  #17    
Old April 28th, 2014 (1:30 PM). Edited April 28th, 2014 by Chaos Rush.
Chaos Rush's Avatar
Chaos Rush Chaos Rush is offline
im sexy and i know it
 
Join Date: May 2007
Location: Taylor Swift
Gender: Male
Nature: Adamant
Posts: 1,296
Quote:
Originally Posted by tURuI View Post
Are you sure this table ends at x30A11B? I found exactly 28 more pointers right after it, which means that they could be for slots 412-439 which are the alternate formes. The same could be true for the sprite animation tables. (It's not the same for the animation tables most likely)

EDIT1+2: Found Hoenn Dex Order. It's at x31DFB8. There are 2 pointers to it. It is 0x194 bytes long, just like the length of the Hoenn dex.
EDIT3: Heres what I found from analyzing the data: There are 411 entries in the Hoenn dex table, each one has the National dex ID of the pokemon that appears in that slot in the Hoenn Dex. My guess is that there is a limiter and/or a global variable somewhere. Another thing: I'm not sure if it has one more entry for Missingno or not (probably not)
tl;dr: The table is 0x336 bytes long, 2 bytes per entry, 411 entries total.
There are actually two Hoenn Dex tables, one at 0x31DFB8 that controls how the order that they appear in the Pokédex, and then there's another table at 0x31D94C that controls the Pokédex number that appears in the Summary screen when you haven't yet obtained the National Dex. But yeah, the former is the "main" one.

And yes, I fixed the frame table ending offsets, thanks for pointing that out

I am working on fixing the bug where the dex doesn't remember what position you were at when you press SELECT to bring up the mode change menu. Once that's done, then I can say that the Pokédex alone is perfect and will post offsets for all the other easier stuff so that karatekid can add it to his tool

EDIT: I have literally spent hours trying to fix that one final glitch to no avail (the dex doesn't remember your position when changing modes by pressing SELECT, thus always resetting to Bulbasaur/Treecko). Here is what I've found on it so far:
Branch to routine below: 080BBD4E
Routine that handles this: 080BBD7C
RAM offset of dex slot in SBird's expansion method: 02000D1E
RAM offset of dex slot in vanilla Emerald: 0200061E

If anyone can help me look into this, it would be greatly appreciated, as I've already worked out all the other bugs earlier. This is really the only thing that needs to be solved until we can call it a perfect Pokédex expansion.

My projects:
Untitled Pokémon fangame (pictured above) | Final Fantasy II NES retranslation | Mother 1/EarthBound Beginnings Color Restoration for GBA
Non-Pokémon hacks I support:
Sonic Classic Heroes
Sonic 3 Complete
Reply With Quote
  #18    
Old April 30th, 2014 (1:22 AM).
SBird SBird is offline
 
Join Date: Aug 2009
Gender: Male
Posts: 76
Something I figured out, I would apreciate confirmation of the english hackers, is: Castform(And its ability) seem to bug when using the expanded pokemon tables etc. I don't know if this is a general bug, which also exists if you do this for FR or if its emerald only. However the sprites, palettes etc. get messed up. Until now I only experienced this for castform(I thinks its the only pokémon of its kind, having a transformation ability)

~SBird
Reply With Quote
  #19    
Old April 30th, 2014 (9:44 PM).
Deokishisu's Avatar
Deokishisu Deokishisu is offline
Mr. Magius
 
Join Date: Feb 2006
Location: If I'm online, it's a safe bet I'm at a computer.
Gender: Male
Nature: Relaxed
Posts: 669
Quote:
Originally Posted by SBird View Post
Something I figured out, I would apreciate confirmation of the english hackers, is: Castform(And its ability) seem to bug when using the expanded pokemon tables etc. I don't know if this is a general bug, which also exists if you do this for FR or if its emerald only. However the sprites, palettes etc. get messed up. Until now I only experienced this for castform(I thinks its the only pokémon of its kind, having a transformation ability)

~SBird
Could it have something to do with disabling the animations? Castform's sprite has more than one frame. Perhaps locking out all the second frames is the issue? If so, then Deoxys would also not work correctly.
Reply With Quote
  #20    
Old May 1st, 2014 (9:48 AM). Edited May 1st, 2014 by SBird.
SBird SBird is offline
 
Join Date: Aug 2009
Gender: Male
Posts: 76
Quote:
Originally Posted by Deokishisu View Post
Could it have something to do with disabling the animations? Castform's sprite has more than one frame. Perhaps locking out all the second frames is the issue? If so, then Deoxys would also not work correctly.
Hrn, that does not seem to be it. The animations are there but the ability does not work. It does not load the correct sprite / palette and it also does not change the type. I am almost certain it has something to do with the pokedex, but I can't figure out what the heck it is.

So a warning to everyone(unless something confirms that this is not an issue bound to the pokédex): Castform will be bugged due to the expansion.

~SBird

Edit: The bug exists due to the fact that castform(id 0x181) and the maximum amount of pokémon in the dex(0x181) interfer. To solve the issue you have to check in the search / replace process which 0x81010000 really refer to the pokédex. I'm sorry to have made that error in the first place, but that is also the reason castform does not work anymore
Reply With Quote
  #21    
Old May 1st, 2014 (3:02 PM).
LCCoolJ95's Avatar
LCCoolJ95 LCCoolJ95 is offline
Limited Capacity
 
Join Date: May 2009
Location: The World That Never Was
Age: 21
Gender: Male
Nature: Naive
Posts: 325
Quote:
Originally Posted by SBird View Post
Castform will be due to the expansion.
A Pokémon that I rarely use...I'm okay with this.

I hope that the glitch CR stated above is fixed soon. Hopefully by tomorrow, since my birthday is tomorrow :3
"The greatest obstacle in life is Yourself. Overcome it, and you will achieve the greatest accomplishment of all." -Art Beins, 1982

Pokémon Emerald 650 (Resource Patch): http://www.pokecommunity.com/showthread.php?t=346694
Pokémon Theta Emerald: http://www.pokecommunity.com/showthread.php?t=349258
Reply With Quote
  #22    
Old May 1st, 2014 (9:56 PM).
Deokishisu's Avatar
Deokishisu Deokishisu is offline
Mr. Magius
 
Join Date: Feb 2006
Location: If I'm online, it's a safe bet I'm at a computer.
Gender: Male
Nature: Relaxed
Posts: 669
Quote:
Originally Posted by LCCoolJ95 View Post
A Pokémon that I rarely use...I'm okay with this.

I hope that the glitch CR stated above is fixed soon. Hopefully by tomorrow, since my birthday is tomorrow :3
It's probably better to have a system that doesn't break random Pokemon. Who knows? Castform might not be the only one unaffected. And, is it Castform, or is it the Forecast ability? More testing is needed to make sure there aren't random buggy Pokemon elsewhere, while someone narrows down what's eatin' Castform.

I won't be able to do even moderate hacking before the end of this month, but I'll see if I can test out other unique Pokemon. Kecleon might be another culprit, if it's Castform's type changing being the problem.
Reply With Quote
  #23    
Old May 2nd, 2014 (12:38 PM).
SBird SBird is offline
 
Join Date: Aug 2009
Gender: Male
Posts: 76
I already posted a fix and an explenation why it is castform that is affected, so yeah, it is castform, and non other, at least for this issue, since this is not essentially tested nobody can say what other kinds of issues will occur.

~SBird
Reply With Quote
  #24    
Old May 2nd, 2014 (5:01 PM).
Chaos Rush's Avatar
Chaos Rush Chaos Rush is offline
im sexy and i know it
 
Join Date: May 2007
Location: Taylor Swift
Gender: Male
Nature: Adamant
Posts: 1,296
Whenever I have time this weekend or next weekend, I'll try and find the offset for the Castform ID that got changed. It shouldn't be that hard to fix, since it's only one out of 29 offsets.

My projects:
Untitled Pokémon fangame (pictured above) | Final Fantasy II NES retranslation | Mother 1/EarthBound Beginnings Color Restoration for GBA
Non-Pokémon hacks I support:
Sonic Classic Heroes
Sonic 3 Complete
Reply With Quote
  #25    
Old May 2nd, 2014 (7:35 PM).
HidoranBlaze's Avatar
HidoranBlaze HidoranBlaze is offline
 
Join Date: Apr 2013
Age: 19
Gender: Male
Posts: 252
So I experimented with the 29 offsets using an unmodified rom, and at the 5th occurrence, changing the offset there prevented the transformation from working. I think that might be related to the issue with Castform. I haven't completely expanded the pokedex yet, so I can't test it, but that might be the issue on hand.
Reply With Quote
Reply Post Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


  All times are GMT -8. The time now is 9:20 PM.


Contact Us Archive Privacy Statement Terms of Service Top