The current URL is datacrystal.tcrf.net.
Pokémon 3rd Generation: Difference between revisions
No edit summary |
No edit summary |
||
Line 258: | Line 258: | ||
Border size is only in FireRed/LeafGreen. In R/S/E it is missing and borders are always 2x2 squares. | Border size is only in FireRed/LeafGreen. In R/S/E it is missing and borders are always 2x2 squares. | ||
Map data is quite straightforward: each 16-bit entry encodes the tile number and attribute. The trick is that there are only 64 attributes and 512 tiles, so the 16-bit entry is split up | Map data is quite straightforward: each 16-bit entry encodes the tile number and attribute. The trick is that there are only 64 attributes and 512 tiles, so the 16-bit entry is split up 6:10 instead of 8:8 for Ruby, Fire Red, and additionally Emerald. The border data is the same format and includes data although it may or may not be used by the game. | ||
Connection data is stored in the following format: | |||
{| style="border: #88a 1px solid; background: #fff; margin: auto; border-collapse: collapse;" cellspacing=1 cellpadding=3 border=1 | |||
|- style="background: #ccf;" | |||
! Data type | |||
! Description | |||
! Example | |||
|- | |||
| Long | |||
| Number of Connections | |||
| 0x2 | |||
|- | |||
| Long | |||
| Pointer to Connection Data | |||
| 0x0835276C | |||
|} | |||
The actual connection data is formatted in sequence in this format for each connection: | |||
{| style="border: #88a 1px solid; background: #fff; margin: auto; border-collapse: collapse;" cellspacing=1 cellpadding=3 border=1 | |||
|- style="background: #ccf;" | |||
! Data type | |||
! Description | |||
! Example | |||
|- | |||
| Long | |||
| Connection Type | |||
| 0x2 | |||
|- | |||
| Long | |||
| Offset (In reference to connecting map) | |||
| 0x0 | |||
|- | |||
| Byte | |||
| Map Bank | |||
| 0x3 | |||
|- | |||
| Byte | |||
| Map Number | |||
| 0x14 | |||
|- | |||
| Word | |||
| Filler | |||
| 0x0000 | |||
|} | |||
Connection types are either 0x0 for '''no connection''', 0x1 for '''Down''', 0x2 for '''Up''', 0x3 for '''Left''', 0x4 for '''Right''', 0x5 for '''Dive''', or 0x6 for '''Emerge'''. Dive and Emerge connecitons are valid in Fire Red but do not work without custom ASM for the proper tiles. | |||
[[Category: GBA games]] | [[Category: GBA games]] |
Revision as of 23:24, 4 December 2013
This is an incorrectly used {{subpage}} template.
The content is on this page needs to be moved, organized, and/or standardized.
See the Talk Page for discussion. |
The third generation Pokémon games are comprised of Ruby, Sapphire, Emerald, FireRed and LeafGreen. Since all five share a common set of data structures with only some offsets and minor details in difference, it seems more effective to consider them one single "game" and note the differences where applicable.
Notable ROM data offsets
Description | Fire Red | Ruby | Notes | ||||
---|---|---|---|---|---|---|---|
Battle sprites | $2350AC | $1E8354 | Pointer tables are in system order. | ||||
Monster heights | $235E6C | Unknown | N/A | ||||
Battle back sprites | $23654C | $1E97F4 | Pointer tables are in system order. | ||||
Battle sprite palettes | $23730C | $1EA5b4 | N/A | ||||
Battle sprite shiny palettes | $2380CC | $1EB374 | N/A | ||||
Trainer sprites | $23957C | $1EC53C | Offset is a pointer table. | ||||
Trainer palettes | $239A1C | $1EC7D4 | N/A | ||||
Trainer Class names | $23E558 | $1F0208 | N/A | ||||
Trainer data | $23EAF1 | $1F0525 | N/A | ||||
Pokémon Species names | $245EE0 | $1F7184 | Names are listed in system order. | ||||
Move names | $247094 | $1F8320 | N/A | ||||
Ability names | $24FC4D | $1FA26D | |||||
Move data | $250C04 | $1FB12C | Data is stored in the same order as the move names. | ||||
TM allowance sets | $252BC8 | $1FD0F0 | N/A | ||||
Pokémon base stats | $254784 | $1FEC30 | Stats are listed in system order. | ||||
Move sets | $257496 | $20192A | N/A | ||||
Evolution chains | $25977C | $203B90 | N/A | ||||
Pokémon Party/box sprites | $3D37A0 | $3BBD20 |
Offset points to a pointer table. Data is in system order. | ||||
Party icon palette | $3D3740 | $E966D8 | N/A | ||||
Party icon palette LUT | $3D3E80 | $3BC400 | Simple byte array | ||||
Item data | $3DB028 | $3C5580 | N/A | ||||
TM-to-Move table | $45A5A4 | $376504 | Maps TM numbers to moves | ||||
Pokédex data | $44E850 | $3B1874 | Pokédex data is in National Dex order. | ||||
Footprints | $43FAB0 | $3B4EE4 | Offset points to a pointer table | ||||
Contest data | N/A | $3C9408 | N/A | ||||
Cries | $48C914 | $452590 | M4A Voice Group-style pointer list. In system order? |
Following the Pokémon image pointers, you may notice that each species has all its image data in one chunk.
More information on the data structures can be found at Bulbapedia: Category:Structures
Images
Trainer and monster images are LZ77-compressed 64 by 64 pixels, 16 colors. Trainers' back-facing images are much taller and (in FireRed/LeafGreen) uncompressed. Monster front images in Emerald are 128 pixels tall to allow animation. In all games, certain monsters always have nonstandard heights (i.e. Castform). Alternate colors (aka shiny) are usually represented by the back-facing images since it makes an intuitive kind of sense.
Maps
Maps are split among banks, each bank roughly being one location. For example, there is a bank with all the cities and routes and several banks with each city's interiors. Generally, a map can be defined by a Doom-like "bank X, map Y" scheme. In FireRed, the bank pointer list is at $3526A8. Following one of the pointers found there yields that bank's map pointer list, which can be followed to a given map's header. Here is the map header format, including example data from Pallet Town (B3M0, 0x350618):
Data type | Description | Example |
---|---|---|
Pointer | Map data | 0x082DD4C0 |
Pointer | Event data | 0x083B4E50 |
Pointer | Map scripts | 0x0816545A |
Pointer | Connections | 0x0835276C |
Short | Music index | 0x012C (Pallet Town) |
Short | Map pointer index? | 0x004E |
Byte | Label index | 0x58 ("Pallet Town") |
Byte | Something with Flash? | 0x00 |
Byte | Weather | 0x02 |
Byte | Type | 0x01 |
Short | ??? | 0x0601 |
Byte | Show label on entry | 0 |
Byte | Battle type? | 0 |
The map layout data is another header:
Data type | Description | Example |
---|---|---|
Long | Width in tiles | 24 |
Long | Height in tiles | 20 |
Pointer | Border | 0x082DD0F8 |
Pointer | Actual map data | 0x082D1D00 |
Pointer | Global tileset | 0x082D4A94 (outside) |
Pointer | Local tileset | 0x082D4AAC |
Byte | Border width | 2 |
Byte | Border height | 2 |
Border size is only in FireRed/LeafGreen. In R/S/E it is missing and borders are always 2x2 squares.
Map data is quite straightforward: each 16-bit entry encodes the tile number and attribute. The trick is that there are only 64 attributes and 512 tiles, so the 16-bit entry is split up 6:10 instead of 8:8 for Ruby, Fire Red, and additionally Emerald. The border data is the same format and includes data although it may or may not be used by the game.
Connection data is stored in the following format:
Data type | Description | Example |
---|---|---|
Long | Number of Connections | 0x2 |
Long | Pointer to Connection Data | 0x0835276C |
The actual connection data is formatted in sequence in this format for each connection:
Data type | Description | Example |
---|---|---|
Long | Connection Type | 0x2 |
Long | Offset (In reference to connecting map) | 0x0 |
Byte | Map Bank | 0x3 |
Byte | Map Number | 0x14 |
Word | Filler | 0x0000 |
Connection types are either 0x0 for no connection, 0x1 for Down, 0x2 for Up, 0x3 for Left, 0x4 for Right, 0x5 for Dive, or 0x6 for Emerge. Dive and Emerge connecitons are valid in Fire Red but do not work without custom ASM for the proper tiles.