77
edits
Iliekmudkips (talk | contribs) |
Iliekmudkips (talk | contribs) (Locations in the saved file clearly don't correspond directly to locations in "RAM"... Hell, 0x03004360 is like 48 megs in!) |
||
Line 1: | Line 1: | ||
Pokémon in the games Ruby, Sapphire, FireRed, LeafGreen, and Emerald are all stored the same way in a 100-byte structure. | Pokémon in the games Ruby, Sapphire, FireRed, LeafGreen, and Emerald are all stored the same way in a 100-byte structure. | ||
=Notes= | =Notes= | ||
Line 19: | Line 18: | ||
| Font || byte || 18 | | Font || byte || 18 | ||
|- | |- | ||
| Sanity byte || byte || 19 | | Sanity byte? || byte || 19 | ||
|- | |- | ||
| OT name || 7 bytes || 20 | | OT name || 7 bytes || 20 | ||
Line 56: | Line 55: | ||
==OT ID== | ==OT ID== | ||
The Original Trainer's ID Number. Part of the XOR encryption key for the data section, also used in shiny determination and the lottery. | The Original Trainer's ID Number. Part of the XOR encryption key for the data section, also used in shiny determination and the lottery. | ||
==Nickname== | ==Nickname== | ||
Line 75: | Line 74: | ||
==Checksum== | ==Checksum== | ||
The checksum is of the 48-byte data section in the structure. It is computed by simply adding all the unencrypted values one word at a time. If this value does not match the real checksum, the Pokémon is interpreted as a [[Bad egg]]. | The checksum is of the 48-byte data section in the structure. It is computed by simply adding all the unencrypted values one word at a time. If this value does not match the real checksum, the Pokémon is interpreted as a [[Bad egg]]. | ||
==Padding== | ==Padding== | ||
Line 96: | Line 93: | ||
* Ruby: 0x03004360 | * Ruby: 0x03004360 | ||
* Sapphire: 0x03004360 | * Sapphire: 0x03004360 | ||
* Emerald: 0x02024190 (0x020244EC for US games | * Emerald: 0x02024190 (0x020244EC for US games??) | ||
* FireRed: 0x02024284 | * FireRed: 0x02024284 | ||
* LeafGreen: 0x020241e4 | * LeafGreen: 0x020241e4 | ||
Line 107: | Line 104: | ||
It also applies to stats and level, which are recalculated based on Experience.<br> | It also applies to stats and level, which are recalculated based on Experience.<br> | ||
Thus, there are also 33600 (14*30*80) bytes stored somewhere else in the GBA's RAM to save data on Pokémon in the PC. | Thus, there are also 33600 (14*30*80) bytes stored somewhere else in the GBA's RAM to save data on Pokémon in the PC. | ||
When the VBA's saved state (including memory contents) are ungzip'ed into a 740,000+ byte file and viewed, the 14 boxes of 420 Pokémon are stored in the general region of $038000 $040000. | |||
[[Category:Structures]] | [[Category:Structures]] | ||
[[Category:Game mechanics]] | [[Category:Game mechanics]] |
edits