diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-08-18 13:49:00 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-08-18 13:49:00 -0400 |
commit | 08dfb0aa80668b80c4a31bd064f5f2d729e5b7f6 (patch) | |
tree | b46baa9353c0919efaed4349d2207958fa0bfaf5 /gba/source/savestructs.h | |
parent | a19507262602fa31f9f14a9e4f4e03e375bca111 (diff) | |
download | gen3uploader-08dfb0aa80668b80c4a31bd064f5f2d729e5b7f6.tar.gz gen3uploader-08dfb0aa80668b80c4a31bd064f5f2d729e5b7f6.tar.bz2 gen3uploader-08dfb0aa80668b80c4a31bd064f5f2d729e5b7f6.zip |
Started working on serializing pokemon data
The GBA program now sends serialized data about the first pokemon in the player's party over to the Wii. This data doesn't yet include all of the information that we will eventually want. It does, however, not transfer any private data, specifically IVs, EVs, and the personality value. It does this by deriving the public information (stats, nature, gender, shiny) before sending the pokemon over. Because of this, lookup tables for things such as base stats were needed, and given that these are large tables, it was easier to use the tables already existent in the game's ROM. Thus, the addresses of the three lookup tables that are now used are necessary for each ROM that this tool supports. I derived the addresses for version 1 of English Pokemon LeafGreen by dumping my own copy and searching through it with a text editor. Thus, at the current time, that cartridge is the only one that is supported. I will supplement this soon with addresses for the other four gen 3 carts that I have, but that will still not provide a very large amount of coverage. I have not yet decided how to address this issue. There is one current bug with the serialized data: the Wii doesn't seem to see the original trainer ID. Will fix.
Diffstat (limited to 'gba/source/savestructs.h')
-rw-r--r-- | gba/source/savestructs.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gba/source/savestructs.h b/gba/source/savestructs.h index 2bf4d4d..fb8ef36 100644 --- a/gba/source/savestructs.h +++ b/gba/source/savestructs.h | |||
@@ -9,9 +9,7 @@ | |||
9 | 9 | ||
10 | // Most of the structures come from pokeruby, FR/LG changes come from my own research / the firered IDB on pokecommunity | 10 | // Most of the structures come from pokeruby, FR/LG changes come from my own research / the firered IDB on pokecommunity |
11 | 11 | ||
12 | #define POKEMON_NAME_LENGTH 10 | 12 | #include "pokemon.h" |
13 | #define OT_NAME_LENGTH 7 | ||
14 | #define TILE_SIZE_4BPP 32 | ||
15 | 13 | ||
16 | struct Coords16 | 14 | struct Coords16 |
17 | { | 15 | { |
@@ -495,6 +493,7 @@ struct BaseStats | |||
495 | /* 0x17 */ u8 ability2; | 493 | /* 0x17 */ u8 ability2; |
496 | /* 0x18 */ u8 safariZoneFleeRate; | 494 | /* 0x18 */ u8 safariZoneFleeRate; |
497 | /* 0x19 */ u8 bodyColor; | 495 | /* 0x19 */ u8 bodyColor; |
496 | u16 filler; | ||
498 | }; | 497 | }; |
499 | 498 | ||
500 | struct BattleMove | 499 | struct BattleMove |
@@ -790,4 +789,4 @@ struct Pokedex | |||
790 | /*0x0C*/ u32 unknown3; | 789 | /*0x0C*/ u32 unknown3; |
791 | /*0x10*/ u8 owned[52]; | 790 | /*0x10*/ u8 owned[52]; |
792 | /*0x44*/ u8 seen[52]; | 791 | /*0x44*/ u8 seen[52]; |
793 | }; \ No newline at end of file | 792 | }; |