diff --git a/include/debug_mode.h b/include/debug_mode.h index da9763a..39549c0 100644 --- a/include/debug_mode.h +++ b/include/debug_mode.h @@ -2,18 +2,18 @@ #define DEBUG_MODE_H #define DEBUG_MODE false -#define IGNORE_GAME_PAK false -#define IGNORE_LINK_CABLE false -#define IGNORE_MG_E4_FLAGS false -#define IGNORE_UNRECEIVED_PKMN false +#define IGNORE_GAME_PAK true +#define IGNORE_LINK_CABLE true +#define IGNORE_MG_E4_FLAGS true +#define IGNORE_UNRECEIVED_PKMN true #define FORCE_TUTORIAL false #define DONT_REMOVE_PKMN false #define SHOW_INVALID_PKMN false #define IGNORE_DEX_COMPLETION false -#define DEBUG_GAME SAPPHIRE_ID; +#define DEBUG_GAME EMERALD_ID #define DEBUG_VERS VERS_1_0 -#define DEBUG_LANG LANG_ENG +#define DEBUG_LANG LANG_JPN #define ENABLE_MATCH_PID true #define ENABLE_OLD_EVENT false diff --git a/include/gba_rom_values/base_gba_rom_struct.h b/include/gba_rom_values/base_gba_rom_struct.h index 4af0b62..34cfee9 100644 --- a/include/gba_rom_values/base_gba_rom_struct.h +++ b/include/gba_rom_values/base_gba_rom_struct.h @@ -23,7 +23,7 @@ #define TEXT_KANTO 0 #define TEXT_HOENN 1 -#define NUM_ROMS 11 +#define NUM_ROMS 48 struct ROM_DATA { @@ -34,22 +34,24 @@ struct ROM_DATA int language; int loc_copyMonToPC; - int loc_gSpecialVar_0x8000; - int loc_gSaveBlock1; // Only used in R/S int loc_getSetPokedexFlag; - int loc_gSaveDataBuffer; // The location of the saveDataBuffer int loc_readFlashSector; int loc_loadSaveSection30; // The location of the function that loads save section 30: CEReaderTool_LoadTrainerTower_r in FRLG, TryReadTrainerHill_Internal in Emerald int loc_m4aMPlayStop; - int loc_gMPlayInfo_BGM; - int loc_gMPlayInfo_SE2; int loc_MPlayStart; int loc_CreateFanfareTask; + int loc_voicegroup; + int loc_sPicTable_NPC; // sPicTable_OldWoman in FRLG + + int loc_gSaveBlock1; // Only used in R/S + int loc_gSaveDataBuffer; // The location of the saveDataBuffer + int loc_gSpecialVar_0x8000; + int loc_gMPlayInfo_BGM; + int loc_gMPlayInfo_SE2; int loc_sFanfareCounter; int loc_gPlttBufferFaded; int loc_gSprites; - int loc_voicegroup; - int loc_sPicTable_NPC; // sPicTable_OldWoman in FRLG + int offset_ramscript; // Ramscript offset as found within the SaveBlock1 struct in global.h int offset_flags; // Flag offset as found within the SaveBlock1 struct in global.h int offset_wondercard; diff --git a/include/gba_rom_values/eng_gba_rom_values.h b/include/gba_rom_values/eng_gba_rom_values.h index 6915110..bbd29ff 100644 --- a/include/gba_rom_values/eng_gba_rom_values.h +++ b/include/gba_rom_values/eng_gba_rom_values.h @@ -3,7 +3,7 @@ #include "gba_rom_values/base_gba_rom_struct.h" -const struct ROM_DATA test = {.is_valid = true}; +//const struct ROM_DATA test = {.is_valid = true}; const struct ROM_DATA ENG_RUBY_v0 = { .is_valid = true, @@ -13,23 +13,24 @@ const struct ROM_DATA ENG_RUBY_v0 = { .language = LANG_ENG, .loc_copyMonToPC = 0x0803D998, // Known as "SendMonToPC" - .loc_gSpecialVar_0x8000 = 0x0202E8C4, - .loc_gSaveBlock1 = 0x02025734, .loc_getSetPokedexFlag = 0x08090D90, - .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS .loc_readFlashSector = 0x08125BF8, // Known as "DoReadFlashWholeSection" in RS .loc_m4aMPlayStop = 0x081DE740, - .loc_gMPlayInfo_BGM = 0x03007380, - .loc_gMPlayInfo_SE2 = 0x03007400, .loc_MPlayStart = 0x081DE65C, .loc_CreateFanfareTask = 0x08074F48, - .loc_sFanfareCounter = 0x030006DA, - .loc_gPlttBufferFaded = 0x0202EEC8, - .loc_gSprites = 0x02020004, .loc_voicegroup = 0x084401E8, .loc_sPicTable_NPC = 0x0836E788, // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4, + .loc_gMPlayInfo_BGM = 0x03007380, + .loc_gMPlayInfo_SE2 = 0x03007400, + .loc_sFanfareCounter = 0x030006DA, + .loc_gPlttBufferFaded = 0x0202EEC8, + .loc_gSprites = 0x02020004, + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h .offset_script = 0x0810, @@ -62,23 +63,24 @@ const struct ROM_DATA ENG_SAPPHIRE_v0 = { .language = LANG_ENG, .loc_copyMonToPC = 0x0803D998, // Known as "SendMonToPC" - .loc_gSpecialVar_0x8000 = 0x0202E8C4, - .loc_gSaveBlock1 = 0x02025734, .loc_getSetPokedexFlag = 0x08090D90, - .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS .loc_readFlashSector = 0x08125BF8, // Known as "DoReadFlashWholeSection" in RS .loc_m4aMPlayStop = 0x081DE6D0, - .loc_gMPlayInfo_BGM = 0x03007380, - .loc_gMPlayInfo_SE2 = 0x03007400, .loc_MPlayStart = 0x081DE5EC, .loc_CreateFanfareTask = 0x08074F4C, - .loc_sFanfareCounter = 0x030006DA, - .loc_gPlttBufferFaded = 0x0202EEC8, - .loc_gSprites = 0x02020004, .loc_voicegroup = 0x08445644, .loc_sPicTable_NPC = 0x0836E718, // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4, + .loc_gMPlayInfo_BGM = 0x03007380, + .loc_gMPlayInfo_SE2 = 0x03007400, + .loc_sFanfareCounter = 0x030006DA, + .loc_gPlttBufferFaded = 0x0202EEC8, + .loc_gSprites = 0x02020004, + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h .offset_script = 0x0810, @@ -111,23 +113,24 @@ const struct ROM_DATA ENG_RUBY_v1 = { .language = LANG_ENG, .loc_copyMonToPC = 0x0803D998, // Known as "SendMonToPC" - .loc_gSpecialVar_0x8000 = 0x0202E8C4, - .loc_gSaveBlock1 = 0x02025734, .loc_getSetPokedexFlag = 0x08090DB0, - .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS .loc_readFlashSector = 0x08125C18, // Known as "DoReadFlashWholeSection" in RS .loc_m4aMPlayStop = 0x081DE758, - .loc_gMPlayInfo_BGM = 0x03007380, - .loc_gMPlayInfo_SE2 = 0x03007400, .loc_MPlayStart = 0x081DE674, .loc_CreateFanfareTask = 0x08074F68, - .loc_sFanfareCounter = 0x030006DA, - .loc_gPlttBufferFaded = 0x0202EEC8, - .loc_gSprites = 0x02020004, .loc_voicegroup = 0x084401FC, .loc_sPicTable_NPC = 0x0836E7A0, // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4, + .loc_gMPlayInfo_BGM = 0x03007380, + .loc_gMPlayInfo_SE2 = 0x03007400, + .loc_sFanfareCounter = 0x030006DA, + .loc_gPlttBufferFaded = 0x0202EEC8, + .loc_gSprites = 0x02020004, + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h .offset_script = 0x0810, @@ -160,23 +163,24 @@ const struct ROM_DATA ENG_SAPPHIRE_v1 = { .language = LANG_ENG, .loc_copyMonToPC = 0x0803D998, // Known as "SendMonToPC" - .loc_gSpecialVar_0x8000 = 0x0202E8C4, - .loc_gSaveBlock1 = 0x02025734, .loc_getSetPokedexFlag = 0x08090DB0, - .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS .loc_readFlashSector = 0x08125C18, // Known as "DoReadFlashWholeSection" in RS .loc_m4aMPlayStop = 0x081DE6E8, - .loc_gMPlayInfo_BGM = 0x03007380, - .loc_gMPlayInfo_SE2 = 0x03007400, .loc_MPlayStart = 0x081DE604, .loc_CreateFanfareTask = 0x08074F6C, - .loc_sFanfareCounter = 0x030006DA, - .loc_gPlttBufferFaded = 0x0202EEC8, - .loc_gSprites = 0x02020004, .loc_voicegroup = 0x0844025C, .loc_sPicTable_NPC = 0x0836E730, // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4, + .loc_gMPlayInfo_BGM = 0x03007380, + .loc_gMPlayInfo_SE2 = 0x03007400, + .loc_sFanfareCounter = 0x030006DA, + .loc_gPlttBufferFaded = 0x0202EEC8, + .loc_gSprites = 0x02020004, + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h .offset_script = 0x0810, @@ -209,23 +213,24 @@ const struct ROM_DATA ENG_RUBY_v2 = { .language = LANG_ENG, .loc_copyMonToPC = 0x0803D998, // Known as "SendMonToPC" - .loc_gSpecialVar_0x8000 = 0x0202E8C4, - .loc_gSaveBlock1 = 0x02025734, .loc_getSetPokedexFlag = 0x08090DB0, - .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS .loc_readFlashSector = 0x08125C18, // Known as "DoReadFlashWholeSection" in RS .loc_m4aMPlayStop = 0x081DE758, - .loc_gMPlayInfo_BGM = 0x03007380, - .loc_gMPlayInfo_SE2 = 0x03007400, .loc_MPlayStart = 0x081DE674, .loc_CreateFanfareTask = 0x08074F68, - .loc_sFanfareCounter = 0x030006DA, - .loc_gPlttBufferFaded = 0x0202EEC8, - .loc_gSprites = 0x02020004, .loc_voicegroup = 0x084401FC, .loc_sPicTable_NPC = 0x0836E7A0, // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4, + .loc_gMPlayInfo_BGM = 0x03007380, + .loc_gMPlayInfo_SE2 = 0x03007400, + .loc_sFanfareCounter = 0x030006DA, + .loc_gPlttBufferFaded = 0x0202EEC8, + .loc_gSprites = 0x02020004, + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h .offset_script = 0x0810, @@ -258,23 +263,24 @@ const struct ROM_DATA ENG_SAPPHIRE_v2 = { .language = LANG_ENG, .loc_copyMonToPC = 0x0803D998, // Known as "SendMonToPC" - .loc_gSpecialVar_0x8000 = 0x0202E8C4, - .loc_gSaveBlock1 = 0x02025734, .loc_getSetPokedexFlag = 0x08090DB0, - .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS .loc_readFlashSector = 0x08125C18, // Known as "DoReadFlashWholeSection" in RS .loc_m4aMPlayStop = 0x081DE6E8, - .loc_gMPlayInfo_BGM = 0x03007380, - .loc_gMPlayInfo_SE2 = 0x03007400, .loc_MPlayStart = 0x081DE604, .loc_CreateFanfareTask = 0x08074F6C, - .loc_sFanfareCounter = 0x030006DA, - .loc_gPlttBufferFaded = 0x0202EEC8, - .loc_gSprites = 0x02020004, .loc_voicegroup = 0x0844025C, .loc_sPicTable_NPC = 0x0836E730, // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4, + .loc_gMPlayInfo_BGM = 0x03007380, + .loc_gMPlayInfo_SE2 = 0x03007400, + .loc_sFanfareCounter = 0x030006DA, + .loc_gPlttBufferFaded = 0x0202EEC8, + .loc_gSprites = 0x02020004, + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h .offset_script = 0x0810, @@ -307,23 +313,24 @@ const struct ROM_DATA ENG_FIRERED_v0 = { .language = LANG_ENG, .loc_copyMonToPC = 0x08040B90, // Known as "SendMonToPC" - .loc_gSpecialVar_0x8000 = 0x020370B8, .loc_getSetPokedexFlag = 0x08088E74, - .loc_gSaveDataBuffer = 0x02039A38, // The location of the saveDataBuffer .loc_readFlashSector = 0x080DA190, .loc_loadSaveSection30 = 0x0815D7BC, // The location of the function that loads save section 30: CEReaderTool_LoadTrainerTower_r in FRLG, TryReadTrainerHill_Internal in Emerald .loc_m4aMPlayStop = 0x081DD93C, - .loc_gMPlayInfo_BGM = 0x03007300, - .loc_gMPlayInfo_SE2 = 0x03007380, .loc_MPlayStart = 0x081DD858, .loc_CreateFanfareTask = 0x08071CEC, - .loc_sFanfareCounter = 0x03000FC6, - .loc_gPlttBufferFaded = 0x020375F8, - .loc_gSprites = 0x0202063C, .loc_voicegroup = 0x08498878, .loc_sPicTable_NPC = 0x083A0AB8, // The following should be consistant across languages and revisions. + .loc_gSaveDataBuffer = 0x02039A38, // The location of the saveDataBuffer + .loc_gSpecialVar_0x8000 = 0x020370B8, + .loc_gMPlayInfo_BGM = 0x03007300, + .loc_gMPlayInfo_SE2 = 0x03007380, + .loc_sFanfareCounter = 0x03000FC6, + .loc_gPlttBufferFaded = 0x020375F8, + .loc_gSprites = 0x0202063C, + .offset_ramscript = 0x361C, // Ramscript offset as found within the SaveBlock1 struct in global.h .offset_flags = 0x0EE0, // Flag offset as found within the SaveBlock1 struct in global.h .offset_wondercard = 0x0460, @@ -359,23 +366,24 @@ const struct ROM_DATA ENG_LEAFGREEN_v0 = { .language = LANG_ENG, .loc_copyMonToPC = 0x08040B90, - .loc_gSpecialVar_0x8000 = 0x020370B8, .loc_getSetPokedexFlag = 0x08088E48, - .loc_gSaveDataBuffer = 0x02039A38, // The location of the saveDataBuffer .loc_readFlashSector = 0x080DA164, .loc_loadSaveSection30 = 0x0815D798, // The location of the function that loads save section 30: CEReaderTool_LoadTrainerTower_r in FRLG, TryReadTrainerHill_Internal in Emerald .loc_m4aMPlayStop = 0x081DD918, - .loc_gMPlayInfo_BGM = 0x03007300, - .loc_gMPlayInfo_SE2 = 0x03007380, .loc_MPlayStart = 0x081DD834, .loc_CreateFanfareTask = 0x08071CEC, - .loc_sFanfareCounter = 0x03000FC6, - .loc_gPlttBufferFaded = 0x020375F8, - .loc_gSprites = 0x0202063C, .loc_voicegroup = 0x08498154, .loc_sPicTable_NPC = 0x083A0A98, // The following should be consistant across languages and revisions. + .loc_gSaveDataBuffer = 0x02039A38, // The location of the saveDataBuffer + .loc_gSpecialVar_0x8000 = 0x020370B8, + .loc_gMPlayInfo_BGM = 0x03007300, + .loc_gMPlayInfo_SE2 = 0x03007380, + .loc_sFanfareCounter = 0x03000FC6, + .loc_gPlttBufferFaded = 0x020375F8, + .loc_gSprites = 0x0202063C, + .offset_ramscript = 0x361C, // Ramscript offset as found within the SaveBlock1 struct in global.h .offset_flags = 0x0EE0, // Flag offset as found within the SaveBlock1 struct in global.h .offset_wondercard = 0x0460, @@ -411,23 +419,24 @@ const struct ROM_DATA ENG_FIRERED_v1 = { .language = LANG_ENG, .loc_copyMonToPC = 0x08040BA4, - .loc_gSpecialVar_0x8000 = 0x020370B8, .loc_getSetPokedexFlag = 0x08088E88, - .loc_gSaveDataBuffer = 0x02039A38, // The location of the saveDataBuffer .loc_readFlashSector = 0x080DA1A4, .loc_loadSaveSection30 = 0x0815D834, // The location of the function that loads save section 30: CEReaderTool_LoadTrainerTower_r in FRLG, TryReadTrainerHill_Internal in Emerald .loc_m4aMPlayStop = 0x081DD9AC, - .loc_gMPlayInfo_BGM = 0x03007300, - .loc_gMPlayInfo_SE2 = 0x03007380, .loc_MPlayStart = 0x081DD8C8, .loc_CreateFanfareTask = 0x08071D00, - .loc_sFanfareCounter = 0x03000FC6, - .loc_gPlttBufferFaded = 0x020375F8, - .loc_gSprites = 0x0202063C, .loc_voicegroup = 0x084988D8, .loc_sPicTable_NPC = 0x083A0B28, // The following should be consistant across languages and revisions. + .loc_gSaveDataBuffer = 0x02039A38, // The location of the saveDataBuffer + .loc_gSpecialVar_0x8000 = 0x020370B8, + .loc_gMPlayInfo_BGM = 0x03007300, + .loc_gMPlayInfo_SE2 = 0x03007380, + .loc_sFanfareCounter = 0x03000FC6, + .loc_gPlttBufferFaded = 0x020375F8, + .loc_gSprites = 0x0202063C, + .offset_ramscript = 0x361C, // Ramscript offset as found within the SaveBlock1 struct in global.h .offset_flags = 0x0EE0, // Flag offset as found within the SaveBlock1 struct in global.h .offset_wondercard = 0x0460, @@ -463,23 +472,24 @@ const struct ROM_DATA ENG_LEAFGREEN_v1 = { .language = LANG_ENG, .loc_copyMonToPC = 0x08040BA4, - .loc_gSpecialVar_0x8000 = 0x020370B8, .loc_getSetPokedexFlag = 0x08088E5C, - .loc_gSaveDataBuffer = 0x02039A38, // The location of the saveDataBuffer .loc_readFlashSector = 0x080DA178, .loc_loadSaveSection30 = 0x0815D810, // The location of the function that loads save section 30: CEReaderTool_LoadTrainerTower_r in FRLG, TryReadTrainerHill_Internal in Emerald .loc_m4aMPlayStop = 0x081DD988, - .loc_gMPlayInfo_BGM = 0x03007300, - .loc_gMPlayInfo_SE2 = 0x03007380, .loc_MPlayStart = 0x081DD8A4, .loc_CreateFanfareTask = 0x08071D00, - .loc_sFanfareCounter = 0x03000FC6, - .loc_gPlttBufferFaded = 0x020375F8, - .loc_gSprites = 0x0202063C, .loc_voicegroup = 0x084981C4, .loc_sPicTable_NPC = 0x083A0B08, // The following should be consistant across languages and revisions. + .loc_gSaveDataBuffer = 0x02039A38, // The location of the saveDataBuffer + .loc_gSpecialVar_0x8000 = 0x020370B8, + .loc_gMPlayInfo_BGM = 0x03007300, + .loc_gMPlayInfo_SE2 = 0x03007380, + .loc_sFanfareCounter = 0x03000FC6, + .loc_gPlttBufferFaded = 0x020375F8, + .loc_gSprites = 0x0202063C, + .offset_ramscript = 0x361C, // Ramscript offset as found within the SaveBlock1 struct in global.h .offset_flags = 0x0EE0, // Flag offset as found within the SaveBlock1 struct in global.h .offset_wondercard = 0x0460, @@ -515,23 +525,24 @@ const struct ROM_DATA ENG_EMERALD_v0 = { .language = LANG_ENG, .loc_copyMonToPC = 0x0806B490, - .loc_gSpecialVar_0x8000 = 0x020375D8, .loc_getSetPokedexFlag = 0x080C0664, - .loc_gSaveDataBuffer = 0x0203ABBC, // The location of the saveDataBuffer .loc_readFlashSector = 0x0815314C, .loc_loadSaveSection30 = 0x081D3AD8, // The location of the function that loads save section 30: CEReaderTool_LoadTrainerTower_r in FRLG, TryReadTrainerHill_Internal in Emerald .loc_m4aMPlayStop = 0x082E0978, - .loc_gMPlayInfo_BGM = 0x03007420, - .loc_gMPlayInfo_SE2 = 0x03007630, .loc_MPlayStart = 0x082E0894, .loc_CreateFanfareTask = 0x080A3170, - .loc_sFanfareCounter = 0x03000F4E, - .loc_gPlttBufferFaded = 0x02037B14, - .loc_gSprites = 0x02020630, .loc_voicegroup = 0x08686A74, .loc_sPicTable_NPC = 0x08506404, // The following should be consistant across languages and revisions. + .loc_gSaveDataBuffer = 0x0203ABBC, // The location of the saveDataBuffer + .loc_gSpecialVar_0x8000 = 0x020375D8, + .loc_gMPlayInfo_BGM = 0x03007420, + .loc_gMPlayInfo_SE2 = 0x03007630, + .loc_sFanfareCounter = 0x03000F4E, + .loc_gPlttBufferFaded = 0x02037B14, + .loc_gSprites = 0x02020630, + .offset_ramscript = 0x3728, // Ramscript offset as found within the SaveBlock1 struct in global.h .offset_flags = 0x1270, // Flag offset as found within the SaveBlock1 struct in global.h .offset_wondercard = 0x056C, diff --git a/include/gba_rom_values/fre_gba_rom_values.h b/include/gba_rom_values/fre_gba_rom_values.h new file mode 100644 index 0000000..6b87421 --- /dev/null +++ b/include/gba_rom_values/fre_gba_rom_values.h @@ -0,0 +1,366 @@ +#ifndef ROM_VALUES_FRE_H +#define ROM_VALUES_FRE_H + +#include "gba_rom_values/base_gba_rom_struct.h" + +const struct ROM_DATA FRE_RUBY_v0 = { + .is_valid = true, + + .gamecode = RUBY_ID, + .version = VERS_1_0, + .language = LANG_FRE, + + .loc_copyMonToPC = 0x803db6c, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x809127c, + .loc_readFlashSector = 0x8126080, // Known as "DoReadFlashWholeSection" in RS + .loc_m4aMPlayStop = 0x81e6b38, + .loc_MPlayStart = 0x81e6a54, + .loc_CreateFanfareTask = 0x80753f8, + .loc_voicegroup = 0x84492c0, + .loc_sPicTable_NPC = 0x83753ec, + + // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4, + .loc_gMPlayInfo_BGM = 0x03007380 + 0x10, + .loc_gMPlayInfo_SE2 = 0x03007400 + 0x10, + .loc_sFanfareCounter = 0x030006DA, + .loc_gPlttBufferFaded = 0x0202EEC8, + .loc_gSprites = 0x02020004, + + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_script = 0x0810, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x4C, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x21, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 14, + .map_id = 11, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 8, + .def_map_id = 1, + .def_npc_id = 1, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, +}; +const struct ROM_DATA FRE_SAPPHIRE_v0 = { + .is_valid = true, + + .gamecode = SAPPHIRE_ID, + .version = VERS_1_0, + .language = LANG_FRE, + + .loc_copyMonToPC = 0x803db6c, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x809127c, + .loc_readFlashSector = 0x8126080, // Known as "DoReadFlashWholeSection" in RS + .loc_m4aMPlayStop = 0x81e6ac8, + .loc_MPlayStart = 0x81e69e4, + .loc_CreateFanfareTask = 0x80753fc, + .loc_voicegroup = 0x8448df0, + .loc_sPicTable_NPC = 0x837537c, + + // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4, + .loc_gMPlayInfo_BGM = 0x03007380 + 0x10, + .loc_gMPlayInfo_SE2 = 0x03007400 + 0x10, + .loc_sFanfareCounter = 0x030006DA, + .loc_gPlttBufferFaded = 0x0202EEC8, + .loc_gSprites = 0x02020004, + + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_script = 0x0810, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x4C, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x21, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 14, + .map_id = 11, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 8, + .def_map_id = 1, + .def_npc_id = 1, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, +}; +const struct ROM_DATA FRE_RUBY_v1 = { + .is_valid = true, + + .gamecode = RUBY_ID, + .version = VERS_1_1, + .language = LANG_FRE, + + .loc_copyMonToPC = 0x803db6c, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x809127c, + .loc_readFlashSector = 0x8126080, // Known as "DoReadFlashWholeSection" in RS + .loc_m4aMPlayStop = 0x81e6b38, + .loc_MPlayStart = 0x81e6a54, + .loc_CreateFanfareTask = 0x80753f8, + .loc_voicegroup = 0x84492c0, + .loc_sPicTable_NPC = 0x83753ec, + + // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4, + .loc_gMPlayInfo_BGM = 0x03007380 + 0x10, + .loc_gMPlayInfo_SE2 = 0x03007400 + 0x10, + .loc_sFanfareCounter = 0x030006DA, + .loc_gPlttBufferFaded = 0x0202EEC8, + .loc_gSprites = 0x02020004, + + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_script = 0x0810, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x4C, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x21, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 14, + .map_id = 11, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 8, + .def_map_id = 1, + .def_npc_id = 1, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, +}; +const struct ROM_DATA FRE_SAPPHIRE_v1 = { + .is_valid = true, + + .gamecode = SAPPHIRE_ID, + .version = VERS_1_1, + .language = LANG_FRE, + + .loc_copyMonToPC = 0x803db6c, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x809127c, + .loc_readFlashSector = 0x8126080, // Known as "DoReadFlashWholeSection" in RS + .loc_m4aMPlayStop = 0x81e6ac8, + .loc_MPlayStart = 0x81e69e4, + .loc_CreateFanfareTask = 0x80753fc, + .loc_voicegroup = 0x8448df0, + .loc_sPicTable_NPC = 0x837537c, + + // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4, + .loc_gMPlayInfo_BGM = 0x03007380 + 0x10, + .loc_gMPlayInfo_SE2 = 0x03007400 + 0x10, + .loc_sFanfareCounter = 0x030006DA, + .loc_gPlttBufferFaded = 0x0202EEC8, + .loc_gSprites = 0x02020004, + + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_script = 0x0810, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x4C, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x21, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 14, + .map_id = 11, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 8, + .def_map_id = 1, + .def_npc_id = 1, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, +}; +const struct ROM_DATA FRE_FIRERED_v0 = { + .is_valid = true, + + .gamecode = FIRERED_ID, + .version = VERS_1_0, + .language = LANG_FRE, + + .loc_copyMonToPC = 0x8040a68, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x8089018, + .loc_readFlashSector = 0x8104e1c, + .loc_loadSaveSection30 = 0x815d518, // The location of the function that loads save section 30: CEReaderTool_LoadTrainerTower_r in FRLG, TryReadTrainerHill_Internal in Emerald + .loc_m4aMPlayStop = 0x81dc110, + .loc_MPlayStart = 0x81dc02c, + .loc_CreateFanfareTask = 0x8071d10, + .loc_voicegroup = 0x848e940, + .loc_sPicTable_NPC = 0x839aea8, + + // The following should be consistant across languages and revisions. + .loc_gSaveDataBuffer = 0x02039A38, // The location of the saveDataBuffer + .loc_gSpecialVar_0x8000 = 0x020370B8, + .loc_gMPlayInfo_BGM = 0x03007300 - 0x110, + .loc_gMPlayInfo_SE2 = 0x03007380 - 0x110, + .loc_sFanfareCounter = 0x03000FC6, + .loc_gPlttBufferFaded = 0x020375F8, + .loc_gSprites = 0x0202063C, + + .offset_ramscript = 0x361C, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x0EE0, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_wondercard = 0x0460, + .offset_script = 0x079C, + .text_region = TEXT_KANTO, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x2C, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x39, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0xAF, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 31, + .map_id = 0, + .npc_id = 1, + .npc_palette = 3, + + .def_map_bank = 0xFF, + .def_map_id = 0xFF, + .def_npc_id = 0xFF, + + .old_map_bank = 30, + .old_map_id = 0, + .old_npc_id = 1, + + .loc_gSaveBlock1PTR = 0x03005008, // TODO: Only used for old script, can be removed later +}; +const struct ROM_DATA FRE_LEAFGREEN_v0 = { + .is_valid = true, + + .gamecode = LEAFGREEN_ID, + .version = VERS_1_0, + .language = LANG_FRE, + + .loc_copyMonToPC = 0x8040a68, + .loc_getSetPokedexFlag = 0x8088fec, + .loc_readFlashSector = 0x8104df4, + .loc_loadSaveSection30 = 0x815d4f4, // The location of the function that loads save section 30: CEReaderTool_LoadTrainerTower_r in FRLG, TryReadTrainerHill_Internal in Emerald + .loc_m4aMPlayStop = 0x81dc0ec, + .loc_MPlayStart = 0x81dc008, + .loc_CreateFanfareTask = 0x8071d10, + .loc_voicegroup = 0x848d668, + .loc_sPicTable_NPC = 0x839ae88, + + // The following should be consistant across languages and revisions. + .loc_gSaveDataBuffer = 0x02039A38, // The location of the saveDataBuffer + .loc_gSpecialVar_0x8000 = 0x020370B8, + .loc_gMPlayInfo_BGM = 0x03007300 - 0x110, + .loc_gMPlayInfo_SE2 = 0x03007380 - 0x110, + .loc_sFanfareCounter = 0x03000FC6, + .loc_gPlttBufferFaded = 0x020375F8, + .loc_gSprites = 0x0202063C, + + .offset_ramscript = 0x361C, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x0EE0, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_wondercard = 0x0460, + .offset_script = 0x079C, + .text_region = TEXT_KANTO, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x2C, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x39, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0xAF, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 31, + .map_id = 0, + .npc_id = 1, + .npc_palette = 3, + + .def_map_bank = 0xFF, + .def_map_id = 0xFF, + .def_npc_id = 0xFF, + + .old_map_bank = 30, + .old_map_id = 0, + .old_npc_id = 1, + + .loc_gSaveBlock1PTR = 0x03005008, // TODO: Only used for old script, can be removed later +}; +const struct ROM_DATA FRE_EMERALD_v0 = { + .is_valid = true, + + .gamecode = EMERALD_ID, + .version = VERS_1_0, + .language = LANG_FRE, + + .loc_copyMonToPC = 0x806b490, + .loc_getSetPokedexFlag = 0x80c0448, + .loc_readFlashSector = 0x8152e18, + .loc_loadSaveSection30 = 0x81d3744, // The location of the function that loads save section 30: CEReaderTool_LoadTrainerTower_r in FRLG, TryReadTrainerHill_Internal in Emerald + .loc_m4aMPlayStop = 0x82e994c, + .loc_MPlayStart = 0x82e9868, + .loc_CreateFanfareTask = 0x80a3184, + .loc_voicegroup = 0x868a990, + .loc_sPicTable_NPC = 0x850b2f0, + + // The following should be consistant across languages and revisions. + .loc_gSaveDataBuffer = 0x0203ABBC, // The location of the saveDataBuffer + .loc_gSpecialVar_0x8000 = 0x020375D8, + .loc_gMPlayInfo_BGM = 0x03007420, + .loc_gMPlayInfo_SE2 = 0x03007630, + .loc_sFanfareCounter = 0x03000F4E, + .loc_gPlttBufferFaded = 0x02037B14, + .loc_gSprites = 0x02020630, + + .offset_ramscript = 0x3728, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1270, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_wondercard = 0x056C, + .offset_script = 0x08A8, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x91, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x860 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x860 + 0x7B, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x20, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 15, + .map_id = 13, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 0xFF, + .def_map_id = 0xFF, + .def_npc_id = 0xFF, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, + + .loc_gSaveBlock1PTR = 0x03005D8C, // TODO: Only used for old script, can be removed later +}; + +#endif \ No newline at end of file diff --git a/include/gba_rom_values/ger_gba_rom_values.h b/include/gba_rom_values/ger_gba_rom_values.h new file mode 100644 index 0000000..c64b48f --- /dev/null +++ b/include/gba_rom_values/ger_gba_rom_values.h @@ -0,0 +1,366 @@ +#ifndef ROM_VALUES_GER_H +#define ROM_VALUES_GER_H + +#include "gba_rom_values/base_gba_rom_struct.h" + +const struct ROM_DATA GER_RUBY_v0 = { + .is_valid = true, + + .gamecode = RUBY_ID, + .version = VERS_1_0, + .language = LANG_GER, + + .loc_copyMonToPC = 0x803db6c, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x8091194, + .loc_readFlashSector = 0x8125f78, // Known as "DoReadFlashWholeSection" in RS + .loc_m4aMPlayStop = 0x81eb6ac, + .loc_MPlayStart = 0x81eb5c8, + .loc_CreateFanfareTask = 0x8075308, + .loc_voicegroup = 0x844e184, + .loc_sPicTable_NPC = 0x8379f70, + + // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4, + .loc_gMPlayInfo_BGM = 0x03007380 + 0x10, + .loc_gMPlayInfo_SE2 = 0x03007400 + 0x10, + .loc_sFanfareCounter = 0x030006DA, + .loc_gPlttBufferFaded = 0x0202EEC8, + .loc_gSprites = 0x02020004, + + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_script = 0x0810, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x4C, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x21, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 14, + .map_id = 11, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 8, + .def_map_id = 1, + .def_npc_id = 1, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, +}; +const struct ROM_DATA GER_SAPPHIRE_v0 = { + .is_valid = true, + + .gamecode = SAPPHIRE_ID, + .version = VERS_1_0, + .language = LANG_GER, + + .loc_copyMonToPC = 0x803db6c, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x8091194, + .loc_readFlashSector = 0x8125f78, // Known as "DoReadFlashWholeSection" in RS + .loc_m4aMPlayStop = 0x81eb640, + .loc_MPlayStart = 0x81eb55c, + .loc_CreateFanfareTask = 0x807530c, + .loc_voicegroup = 0x844e0f0, + .loc_sPicTable_NPC = 0x8379f04, + + // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4, + .loc_gMPlayInfo_BGM = 0x03007380 + 0x10, + .loc_gMPlayInfo_SE2 = 0x03007400 + 0x10, + .loc_sFanfareCounter = 0x030006DA, + .loc_gPlttBufferFaded = 0x0202EEC8, + .loc_gSprites = 0x02020004, + + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_script = 0x0810, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x4C, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x21, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 14, + .map_id = 11, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 8, + .def_map_id = 1, + .def_npc_id = 1, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, +}; +const struct ROM_DATA GER_RUBY_v1 = { + .is_valid = true, + + .gamecode = RUBY_ID, + .version = VERS_1_1, + .language = LANG_GER, + + .loc_copyMonToPC = 0x803db6c, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x8091194, + .loc_readFlashSector = 0x8125f78, // Known as "DoReadFlashWholeSection" in RS + .loc_m4aMPlayStop = 0x81eb6ac, + .loc_MPlayStart = 0x81eb5c8, + .loc_CreateFanfareTask = 0x8075308, + .loc_voicegroup = 0x844e184, + .loc_sPicTable_NPC = 0x8379f70, + + // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4, + .loc_gMPlayInfo_BGM = 0x03007380 + 0x10, + .loc_gMPlayInfo_SE2 = 0x03007400 + 0x10, + .loc_sFanfareCounter = 0x030006DA, + .loc_gPlttBufferFaded = 0x0202EEC8, + .loc_gSprites = 0x02020004, + + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_script = 0x0810, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x4C, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x21, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 14, + .map_id = 11, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 8, + .def_map_id = 1, + .def_npc_id = 1, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, +}; +const struct ROM_DATA GER_SAPPHIRE_v1 = { + .is_valid = true, + + .gamecode = SAPPHIRE_ID, + .version = VERS_1_1, + .language = LANG_GER, + + .loc_copyMonToPC = 0x803db6c, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x8091194, + .loc_readFlashSector = 0x8125f78, // Known as "DoReadFlashWholeSection" in RS + .loc_m4aMPlayStop = 0x81eb640, + .loc_MPlayStart = 0x81eb55c, + .loc_CreateFanfareTask = 0x807530c, + .loc_voicegroup = 0x844e0f0, + .loc_sPicTable_NPC = 0x8379f04, + + // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4, + .loc_gMPlayInfo_BGM = 0x03007380 + 0x10, + .loc_gMPlayInfo_SE2 = 0x03007400 + 0x10, + .loc_sFanfareCounter = 0x030006DA, + .loc_gPlttBufferFaded = 0x0202EEC8, + .loc_gSprites = 0x02020004, + + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_script = 0x0810, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x4C, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x21, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 14, + .map_id = 11, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 8, + .def_map_id = 1, + .def_npc_id = 1, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, +}; +const struct ROM_DATA GER_FIRERED_v0 = { + .is_valid = true, + + .gamecode = FIRERED_ID, + .version = VERS_1_0, + .language = LANG_GER, + + .loc_copyMonToPC = 0x8040a90, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x8088f58, + .loc_readFlashSector = 0x8104d5c, + .loc_loadSaveSection30 = 0x815d45c, // The location of the function that loads save section 30: CEReaderTool_LoadTrainerTower_r in FRLG, TryReadTrainerHill_Internal in Emerald + .loc_m4aMPlayStop = 0x81e1bd4, + .loc_MPlayStart = 0x81e1af0, + .loc_CreateFanfareTask = 0x8071c50, + .loc_voicegroup = 0x8496e9c, + .loc_sPicTable_NPC = 0x83a097c, + + // The following should be consistant across languages and revisions. + .loc_gSaveDataBuffer = 0x02039A38, // The location of the saveDataBuffer + .loc_gSpecialVar_0x8000 = 0x020370B8, + .loc_gMPlayInfo_BGM = 0x03007300 - 0x110, + .loc_gMPlayInfo_SE2 = 0x03007380 - 0x110, + .loc_sFanfareCounter = 0x03000FC6, + .loc_gPlttBufferFaded = 0x020375F8, + .loc_gSprites = 0x0202063C, + + .offset_ramscript = 0x361C, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x0EE0, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_wondercard = 0x0460, + .offset_script = 0x079C, + .text_region = TEXT_KANTO, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x2C, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x39, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0xAF, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 31, + .map_id = 0, + .npc_id = 1, + .npc_palette = 3, + + .def_map_bank = 0xFF, + .def_map_id = 0xFF, + .def_npc_id = 0xFF, + + .old_map_bank = 30, + .old_map_id = 0, + .old_npc_id = 1, + + .loc_gSaveBlock1PTR = 0x03005008, // TODO: Only used for old script, can be removed later +}; +const struct ROM_DATA GER_LEAFGREEN_v0 = { + .is_valid = true, + + .gamecode = LEAFGREEN_ID, + .version = VERS_1_0, + .language = LANG_GER, + + .loc_copyMonToPC = 0x8040a90, + .loc_getSetPokedexFlag = 0x8088f2c, + .loc_readFlashSector = 0x8104d34, + .loc_loadSaveSection30 = 0x815d438, // The location of the function that loads save section 30: CEReaderTool_LoadTrainerTower_r in FRLG, TryReadTrainerHill_Internal in Emerald + .loc_m4aMPlayStop = 0x81e1bb0, + .loc_MPlayStart = 0x81e1acc, + .loc_CreateFanfareTask = 0x8071c50, + .loc_voicegroup = 0x8496008, + .loc_sPicTable_NPC = 0x83a095c, + + // The following should be consistant across languages and revisions. + .loc_gSaveDataBuffer = 0x02039A38, // The location of the saveDataBuffer + .loc_gSpecialVar_0x8000 = 0x020370B8, + .loc_gMPlayInfo_BGM = 0x03007300 - 0x110, + .loc_gMPlayInfo_SE2 = 0x03007380 - 0x110, + .loc_sFanfareCounter = 0x03000FC6, + .loc_gPlttBufferFaded = 0x020375F8, + .loc_gSprites = 0x0202063C, + + .offset_ramscript = 0x361C, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x0EE0, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_wondercard = 0x0460, + .offset_script = 0x079C, + .text_region = TEXT_KANTO, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x2C, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x39, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0xAF, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 31, + .map_id = 0, + .npc_id = 1, + .npc_palette = 3, + + .def_map_bank = 0xFF, + .def_map_id = 0xFF, + .def_npc_id = 0xFF, + + .old_map_bank = 30, + .old_map_id = 0, + .old_npc_id = 1, + + .loc_gSaveBlock1PTR = 0x03005008, // TODO: Only used for old script, can be removed later +}; +const struct ROM_DATA GER_EMERALD_v0 = { + .is_valid = true, + + .gamecode = EMERALD_ID, + .version = VERS_1_0, + .language = LANG_GER, + + .loc_copyMonToPC = 0x806b494, + .loc_getSetPokedexFlag = 0x80c0430, + .loc_readFlashSector = 0x8152cf0, + .loc_loadSaveSection30 = 0x81d3640, // The location of the function that loads save section 30: CEReaderTool_LoadTrainerTower_r in FRLG, TryReadTrainerHill_Internal in Emerald + .loc_m4aMPlayStop = 0x82f66b8, + .loc_MPlayStart = 0x82f65d4, + .loc_CreateFanfareTask = 0x80a318c, + .loc_voicegroup = 0x8697c60, + .loc_sPicTable_NPC = 0x8518134, + + // The following should be consistant across languages and revisions. + .loc_gSaveDataBuffer = 0x0203ABBC, // The location of the saveDataBuffer + .loc_gSpecialVar_0x8000 = 0x020375D8, + .loc_gMPlayInfo_BGM = 0x03007420, + .loc_gMPlayInfo_SE2 = 0x03007630, + .loc_sFanfareCounter = 0x03000F4E, + .loc_gPlttBufferFaded = 0x02037B14, + .loc_gSprites = 0x02020630, + + .offset_ramscript = 0x3728, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1270, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_wondercard = 0x056C, + .offset_script = 0x08A8, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x91, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x860 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x860 + 0x7B, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x20, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 15, + .map_id = 13, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 0xFF, + .def_map_id = 0xFF, + .def_npc_id = 0xFF, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, + + .loc_gSaveBlock1PTR = 0x03005D8C, // TODO: Only used for old script, can be removed later +}; + +#endif \ No newline at end of file diff --git a/include/gba_rom_values/ita_gba_rom_values.h b/include/gba_rom_values/ita_gba_rom_values.h new file mode 100644 index 0000000..0f4fc4e --- /dev/null +++ b/include/gba_rom_values/ita_gba_rom_values.h @@ -0,0 +1,366 @@ +#ifndef ROM_VALUES_ITA_H +#define ROM_VALUES_ITA_H + +#include "gba_rom_values/base_gba_rom_struct.h" + +const struct ROM_DATA ITA_RUBY_v0 = { + .is_valid = true, + + .gamecode = RUBY_ID, + .version = VERS_1_0, + .language = LANG_ITA, + + .loc_copyMonToPC = 0x803db64, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x8091134, + .loc_readFlashSector = 0x8125f78, // Known as "DoReadFlashWholeSection" in RS + .loc_m4aMPlayStop = 0x81e03cc, + .loc_MPlayStart = 0x81e02e8, + .loc_CreateFanfareTask = 0x807531c, + .loc_voicegroup = 0x844256c, + .loc_sPicTable_NPC = 0x836ec78, + + // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4, + .loc_gMPlayInfo_BGM = 0x03007380 + 0x10, + .loc_gMPlayInfo_SE2 = 0x03007400 + 0x10, + .loc_sFanfareCounter = 0x030006DA, + .loc_gPlttBufferFaded = 0x0202EEC8, + .loc_gSprites = 0x02020004, + + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_script = 0x0810, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x4C, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x21, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 14, + .map_id = 11, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 8, + .def_map_id = 1, + .def_npc_id = 1, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, +}; +const struct ROM_DATA ITA_SAPPHIRE_v0 = { + .is_valid = true, + + .gamecode = SAPPHIRE_ID, + .version = VERS_1_0, + .language = LANG_ITA, + + .loc_copyMonToPC = 0x803db64, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x8091134, + .loc_readFlashSector = 0x8125f78, // Known as "DoReadFlashWholeSection" in RS + .loc_m4aMPlayStop = 0x81e035c, + .loc_MPlayStart = 0x81e0278, + .loc_CreateFanfareTask = 0x8075320, + .loc_voicegroup = 0x8442210, + .loc_sPicTable_NPC = 0x836ec08, + + // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4, + .loc_gMPlayInfo_BGM = 0x03007380 + 0x10, + .loc_gMPlayInfo_SE2 = 0x03007400 + 0x10, + .loc_sFanfareCounter = 0x030006DA, + .loc_gPlttBufferFaded = 0x0202EEC8, + .loc_gSprites = 0x02020004, + + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_script = 0x0810, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x4C, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x21, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 14, + .map_id = 11, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 8, + .def_map_id = 1, + .def_npc_id = 1, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, +}; +const struct ROM_DATA ITA_RUBY_v1 = { + .is_valid = true, + + .gamecode = RUBY_ID, + .version = VERS_1_1, + .language = LANG_ITA, + + .loc_copyMonToPC = 0x803db64, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x8091134, + .loc_readFlashSector = 0x8125f78, // Known as "DoReadFlashWholeSection" in RS + .loc_m4aMPlayStop = 0x81e03cc, + .loc_MPlayStart = 0x81e02e8, + .loc_CreateFanfareTask = 0x807531c, + .loc_voicegroup = 0x844256c, + .loc_sPicTable_NPC = 0x836ec78, + + // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4, + .loc_gMPlayInfo_BGM = 0x03007380 + 0x10, + .loc_gMPlayInfo_SE2 = 0x03007400 + 0x10, + .loc_sFanfareCounter = 0x030006DA, + .loc_gPlttBufferFaded = 0x0202EEC8, + .loc_gSprites = 0x02020004, + + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_script = 0x0810, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x4C, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x21, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 14, + .map_id = 11, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 8, + .def_map_id = 1, + .def_npc_id = 1, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, +}; +const struct ROM_DATA ITA_SAPPHIRE_v1 = { + .is_valid = true, + + .gamecode = SAPPHIRE_ID, + .version = VERS_1_1, + .language = LANG_ITA, + + .loc_copyMonToPC = 0x803db64, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x8091134, + .loc_readFlashSector = 0x8125f78, // Known as "DoReadFlashWholeSection" in RS + .loc_m4aMPlayStop = 0x81e035c, + .loc_MPlayStart = 0x81e0278, + .loc_CreateFanfareTask = 0x8075320, + .loc_voicegroup = 0x8442210, + .loc_sPicTable_NPC = 0x836ec08, + + // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4, + .loc_gMPlayInfo_BGM = 0x03007380 + 0x10, + .loc_gMPlayInfo_SE2 = 0x03007400 + 0x10, + .loc_sFanfareCounter = 0x030006DA, + .loc_gPlttBufferFaded = 0x0202EEC8, + .loc_gSprites = 0x02020004, + + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_script = 0x0810, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x4C, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x21, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 14, + .map_id = 11, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 8, + .def_map_id = 1, + .def_npc_id = 1, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, +}; +const struct ROM_DATA ITA_FIRERED_v0 = { + .is_valid = true, + + .gamecode = FIRERED_ID, + .version = VERS_1_0, + .language = LANG_ITA, + + .loc_copyMonToPC = 0x8040a7c, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x8088f44, + .loc_readFlashSector = 0x8104d5c, + .loc_loadSaveSection30 = 0x815d49c, // The location of the function that loads save section 30: CEReaderTool_LoadTrainerTower_r in FRLG, TryReadTrainerHill_Internal in Emerald + .loc_m4aMPlayStop = 0x81dada8, + .loc_MPlayStart = 0x81dacc4, + .loc_CreateFanfareTask = 0x8071c3c, + .loc_voicegroup = 0x848c2cc, + .loc_sPicTable_NPC = 0x8399b38, + + // The following should be consistant across languages and revisions. + .loc_gSaveDataBuffer = 0x02039A38, // The location of the saveDataBuffer + .loc_gSpecialVar_0x8000 = 0x020370B8, + .loc_gMPlayInfo_BGM = 0x03007300 - 0x110, + .loc_gMPlayInfo_SE2 = 0x03007380 - 0x110, + .loc_sFanfareCounter = 0x03000FC6, + .loc_gPlttBufferFaded = 0x020375F8, + .loc_gSprites = 0x0202063C, + + .offset_ramscript = 0x361C, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x0EE0, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_wondercard = 0x0460, + .offset_script = 0x079C, + .text_region = TEXT_KANTO, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x2C, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x39, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0xAF, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 31, + .map_id = 0, + .npc_id = 1, + .npc_palette = 3, + + .def_map_bank = 0xFF, + .def_map_id = 0xFF, + .def_npc_id = 0xFF, + + .old_map_bank = 30, + .old_map_id = 0, + .old_npc_id = 1, + + .loc_gSaveBlock1PTR = 0x03005008, // TODO: Only used for old script, can be removed later +}; +const struct ROM_DATA ITA_LEAFGREEN_v0 = { + .is_valid = true, + + .gamecode = LEAFGREEN_ID, + .version = VERS_1_0, + .language = LANG_ITA, + + .loc_copyMonToPC = 0x8040a7c, + .loc_getSetPokedexFlag = 0x8088f18, + .loc_readFlashSector = 0x8104d34, + .loc_loadSaveSection30 = 0x815d478, // The location of the function that loads save section 30: CEReaderTool_LoadTrainerTower_r in FRLG, TryReadTrainerHill_Internal in Emerald + .loc_m4aMPlayStop = 0x81dad84, + .loc_MPlayStart = 0x81daca0, + .loc_CreateFanfareTask = 0x8071c3c, + .loc_voicegroup = 0x848ba64, + .loc_sPicTable_NPC = 0x8399b18, + + // The following should be consistant across languages and revisions. + .loc_gSaveDataBuffer = 0x02039A38, // The location of the saveDataBuffer + .loc_gSpecialVar_0x8000 = 0x020370B8, + .loc_gMPlayInfo_BGM = 0x03007300 - 0x110, + .loc_gMPlayInfo_SE2 = 0x03007380 - 0x110, + .loc_sFanfareCounter = 0x03000FC6, + .loc_gPlttBufferFaded = 0x020375F8, + .loc_gSprites = 0x0202063C, + + .offset_ramscript = 0x361C, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x0EE0, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_wondercard = 0x0460, + .offset_script = 0x079C, + .text_region = TEXT_KANTO, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x2C, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x39, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0xAF, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 31, + .map_id = 0, + .npc_id = 1, + .npc_palette = 3, + + .def_map_bank = 0xFF, + .def_map_id = 0xFF, + .def_npc_id = 0xFF, + + .old_map_bank = 30, + .old_map_id = 0, + .old_npc_id = 1, + + .loc_gSaveBlock1PTR = 0x03005008, // TODO: Only used for old script, can be removed later +}; +const struct ROM_DATA ITA_EMERALD_v0 = { + .is_valid = true, + + .gamecode = EMERALD_ID, + .version = VERS_1_0, + .language = LANG_ITA, + + .loc_copyMonToPC = 0x806b494, + .loc_getSetPokedexFlag = 0x80c0428, + .loc_readFlashSector = 0x8152ce0, + .loc_loadSaveSection30 = 0x81d3620, // The location of the function that loads save section 30: CEReaderTool_LoadTrainerTower_r in FRLG, TryReadTrainerHill_Internal in Emerald + .loc_m4aMPlayStop = 0x82e1904, + .loc_MPlayStart = 0x82e1820, + .loc_CreateFanfareTask = 0x80a3184, + .loc_voicegroup = 0x8683088, + .loc_sPicTable_NPC = 0x8503148, + + // The following should be consistant across languages and revisions. + .loc_gSaveDataBuffer = 0x0203ABBC, // The location of the saveDataBuffer + .loc_gSpecialVar_0x8000 = 0x020375D8, + .loc_gMPlayInfo_BGM = 0x03007420, + .loc_gMPlayInfo_SE2 = 0x03007630, + .loc_sFanfareCounter = 0x03000F4E, + .loc_gPlttBufferFaded = 0x02037B14, + .loc_gSprites = 0x02020630, + + .offset_ramscript = 0x3728, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1270, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_wondercard = 0x056C, + .offset_script = 0x08A8, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x91, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x860 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x860 + 0x7B, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x20, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 15, + .map_id = 13, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 0xFF, + .def_map_id = 0xFF, + .def_npc_id = 0xFF, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, + + .loc_gSaveBlock1PTR = 0x03005D8C, // TODO: Only used for old script, can be removed later +}; + +#endif \ No newline at end of file diff --git a/include/gba_rom_values/jpn_gba_rom_values.h b/include/gba_rom_values/jpn_gba_rom_values.h new file mode 100644 index 0000000..66acf43 --- /dev/null +++ b/include/gba_rom_values/jpn_gba_rom_values.h @@ -0,0 +1,472 @@ +#ifndef ROM_VALUES_JPN_H +#define ROM_VALUES_JPN_H + +#include "gba_rom_values/base_gba_rom_struct.h" + +const struct ROM_DATA JPN_RUBY_v0 = { + .is_valid = true, + + .gamecode = RUBY_ID, + .version = VERS_1_0, + .language = LANG_JPN, + + .loc_copyMonToPC = 0x803ad14, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x808d884, + .loc_readFlashSector = 0x8120a34, // Known as "DoReadFlashWholeSection" in RS + .loc_m4aMPlayStop = 0x81af1d8, + .loc_MPlayStart = 0x81af0f4, + .loc_CreateFanfareTask = 0x8071f80, + .loc_voicegroup = 0x8402498, + .loc_sPicTable_NPC = 0x8346c28, + + // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734 - 0x2A0, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4 - 0x2AC, + .loc_gMPlayInfo_BGM = 0x03007380 - 0x120, + .loc_gMPlayInfo_SE2 = 0x03007400 - 0x120, + .loc_sFanfareCounter = 0x030006DA - 0x98, + .loc_gPlttBufferFaded = 0x0202EEC8 - 0x2E0, + .loc_gSprites = 0x02020004, + + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_script = 0x0810, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x4C, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x21, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 14, + .map_id = 11, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 8, + .def_map_id = 1, + .def_npc_id = 1, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, +}; +const struct ROM_DATA JPN_SAPPHIRE_v0 = { + .is_valid = true, + + .gamecode = SAPPHIRE_ID, + .version = VERS_1_0, + .language = LANG_JPN, + + .loc_copyMonToPC = 0x803ad14, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x808d884, + .loc_readFlashSector = 0x8120a34, // Known as "DoReadFlashWholeSection" in RS + .loc_m4aMPlayStop = 0x81af168, + .loc_MPlayStart = 0x81af084, + .loc_CreateFanfareTask = 0x8071f84, + .loc_voicegroup = 0x8402480, + .loc_sPicTable_NPC = 0x8346bb8, + + // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734 - 0x2A0, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4 - 0x2AC, + .loc_gMPlayInfo_BGM = 0x03007380 - 0x120, + .loc_gMPlayInfo_SE2 = 0x03007400 - 0x120, + .loc_sFanfareCounter = 0x030006DA - 0x98, + .loc_gPlttBufferFaded = 0x0202EEC8 - 0x2E0, + .loc_gSprites = 0x02020004, + + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_script = 0x0810, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x4C, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x21, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 14, + .map_id = 11, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 8, + .def_map_id = 1, + .def_npc_id = 1, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, +}; +const struct ROM_DATA JPN_RUBY_v1 = { + .is_valid = true, + + .gamecode = RUBY_ID, + .version = VERS_1_1, + .language = LANG_JPN, + + .loc_copyMonToPC = 0x803ad14, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x808d884, + .loc_readFlashSector = 0x8120a34, // Known as "DoReadFlashWholeSection" in RS + .loc_m4aMPlayStop = 0x81af1d8, + .loc_MPlayStart = 0x81af0f4, + .loc_CreateFanfareTask = 0x8071f80, + .loc_voicegroup = 0x8402498, + .loc_sPicTable_NPC = 0x8346c28, + + // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734 - 0x2A0, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4 - 0x2AC, + .loc_gMPlayInfo_BGM = 0x03007380 - 0x120, + .loc_gMPlayInfo_SE2 = 0x03007400 - 0x120, + .loc_sFanfareCounter = 0x030006DA - 0x98, + .loc_gPlttBufferFaded = 0x0202EEC8 - 0x2E0, + .loc_gSprites = 0x02020004, + + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_script = 0x0810, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x4C, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x21, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 14, + .map_id = 11, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 8, + .def_map_id = 1, + .def_npc_id = 1, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, +}; +const struct ROM_DATA JPN_SAPPHIRE_v1 = { + .is_valid = true, + + .gamecode = SAPPHIRE_ID, + .version = VERS_1_1, + .language = LANG_JPN, + + .loc_copyMonToPC = 0x803ad14, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x808d884, + .loc_readFlashSector = 0x8120a34, // Known as "DoReadFlashWholeSection" in RS + .loc_m4aMPlayStop = 0x81af168, + .loc_MPlayStart = 0x81af084, + .loc_CreateFanfareTask = 0x8071f84, + .loc_voicegroup = 0x8402480, + .loc_sPicTable_NPC = 0x8346bb8, + + // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734 - 0x2A0, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4 - 0x2AC, + .loc_gMPlayInfo_BGM = 0x03007380 - 0x120, + .loc_gMPlayInfo_SE2 = 0x03007400 - 0x120, + .loc_sFanfareCounter = 0x030006DA - 0x98, + .loc_gPlttBufferFaded = 0x0202EEC8 - 0x2E0, + .loc_gSprites = 0x02020004, + + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_script = 0x0810, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x4C, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x21, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 14, + .map_id = 11, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 8, + .def_map_id = 1, + .def_npc_id = 1, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, +}; +const struct ROM_DATA JPN_FIRERED_v0 = { + .is_valid = true, + + .gamecode = FIRERED_ID, + .version = VERS_1_0, + .language = LANG_JPN, + + .loc_copyMonToPC = 0x8040284, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x8088a50, + .loc_readFlashSector = 0x810586c, + .loc_loadSaveSection30 = 0x8160a4c, // The location of the function that loads save section 30: CEReaderTool_LoadTrainerTower_r in FRLG, TryReadTrainerHill_Internal in Emerald + .loc_m4aMPlayStop = 0x81c18f8, + .loc_MPlayStart = 0x81c1814, + .loc_CreateFanfareTask = 0x8071490, + .loc_voicegroup = 0x845d4b8, + .loc_sPicTable_NPC = 0x8364b40, + + // The following should be consistant across languages and revisions. + .loc_gSaveDataBuffer = 0x02039A38 - 0x88, // The location of the saveDataBuffer + .loc_gSpecialVar_0x8000 = 0x020370B8 - 0xCC, + .loc_gMPlayInfo_BGM = 0x03007300 + 0x50, + .loc_gMPlayInfo_SE2 = 0x03007380 + 0x50, + .loc_sFanfareCounter = 0x03000FC6, + .loc_gPlttBufferFaded = 0x020375F8 - 0xCC, + .loc_gSprites = 0x0202063C - 0x84, + + .offset_ramscript = 0x361C, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x0EE0, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_wondercard = 0x0460, + .offset_script = 0x079C, + .text_region = TEXT_KANTO, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x2C, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x39, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0xAF, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 31, + .map_id = 0, + .npc_id = 1, + .npc_palette = 3, + + .def_map_bank = 0xFF, + .def_map_id = 0xFF, + .def_npc_id = 0xFF, + + .old_map_bank = 30, + .old_map_id = 0, + .old_npc_id = 1, + + .loc_gSaveBlock1PTR = 0x03005008, // TODO: Only used for old script, can be removed later +}; +const struct ROM_DATA JPN_LEAFGREEN_v0 = { + .is_valid = true, + + .gamecode = LEAFGREEN_ID, + .version = VERS_1_0, + .language = LANG_JPN, + + .loc_copyMonToPC = 0x8040284, + .loc_getSetPokedexFlag = 0x8088a24, + .loc_readFlashSector = 0x8105844, + .loc_loadSaveSection30 = 0x8160a28, // The location of the function that loads save section 30: CEReaderTool_LoadTrainerTower_r in FRLG, TryReadTrainerHill_Internal in Emerald + .loc_m4aMPlayStop = 0x81c18d4, + .loc_MPlayStart = 0x81c17f0, + .loc_CreateFanfareTask = 0x8071490, + .loc_voicegroup = 0x845d2fc, + .loc_sPicTable_NPC = 0x8364b20, + + // The following should be consistant across languages and revisions. + .loc_gSaveDataBuffer = 0x02039A38 - 0x88, // The location of the saveDataBuffer + .loc_gSpecialVar_0x8000 = 0x020370B8 - 0xCC, + .loc_gMPlayInfo_BGM = 0x03007300 + 0x50, + .loc_gMPlayInfo_SE2 = 0x03007380 + 0x50, + .loc_sFanfareCounter = 0x03000FC6, + .loc_gPlttBufferFaded = 0x020375F8 - 0xCC, + .loc_gSprites = 0x0202063C - 0x84, + + .offset_ramscript = 0x361C, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x0EE0, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_wondercard = 0x0460, + .offset_script = 0x079C, + .text_region = TEXT_KANTO, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x2C, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x39, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0xAF, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 31, + .map_id = 0, + .npc_id = 1, + .npc_palette = 3, + + .def_map_bank = 0xFF, + .def_map_id = 0xFF, + .def_npc_id = 0xFF, + + .old_map_bank = 30, + .old_map_id = 0, + .old_npc_id = 1, + + .loc_gSaveBlock1PTR = 0x03005008, // TODO: Only used for old script, can be removed later +}; +const struct ROM_DATA JPN_FIRERED_v1 = { + .is_valid = true, + + .gamecode = FIRERED_ID, + .version = VERS_1_1, + .language = LANG_JPN, + + .loc_copyMonToPC = 0x80401f0, + .loc_getSetPokedexFlag = 0x80889e0, + .loc_readFlashSector = 0x8105870, + .loc_loadSaveSection30 = 0x81605c8, // The location of the function that loads save section 30: CEReaderTool_LoadTrainerTower_r in FRLG, TryReadTrainerHill_Internal in Emerald + .loc_m4aMPlayStop = 0x81c14b4, + .loc_MPlayStart = 0x81c13d0, + .loc_CreateFanfareTask = 0x8071408, + .loc_voicegroup = 0x8458cb4, + .loc_sPicTable_NPC = 0x8360320, + + // The following should be consistant across languages and revisions. + .loc_gSaveDataBuffer = 0x02039A38 - 0x88, // The location of the saveDataBuffer + .loc_gSpecialVar_0x8000 = 0x020370B8 - 0xCC, + .loc_gMPlayInfo_BGM = 0x03007300 - 0x50, + .loc_gMPlayInfo_SE2 = 0x03007380 - 0x50, + .loc_sFanfareCounter = 0x03000FC6, + .loc_gPlttBufferFaded = 0x020375F8 - 0xCC, + .loc_gSprites = 0x0202063C - 0x84, + + .offset_ramscript = 0x361C, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x0EE0, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_wondercard = 0x0460, + .offset_script = 0x079C, + .text_region = TEXT_KANTO, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x2C, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x39, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0xAF, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 31, + .map_id = 0, + .npc_id = 1, + .npc_palette = 3, + + .def_map_bank = 0xFF, + .def_map_id = 0xFF, + .def_npc_id = 0xFF, + + .old_map_bank = 30, + .old_map_id = 0, + .old_npc_id = 1, + + .loc_gSaveBlock1PTR = 0x03005008, // TODO: Only used for old script, can be removed later +}; +const struct ROM_DATA JPN_LEAFGREEN_v1 = { + .is_valid = true, + + .gamecode = LEAFGREEN_ID, + .version = VERS_1_1, + .language = LANG_JPN, + + .loc_copyMonToPC = 0x80401f0, + .loc_getSetPokedexFlag = 0x80889b4, + .loc_readFlashSector = 0x8105848, + .loc_loadSaveSection30 = 0x81605a4, // The location of the function that loads save section 30: CEReaderTool_LoadTrainerTower_r in FRLG, TryReadTrainerHill_Internal in Emerald + .loc_m4aMPlayStop = 0x81c1490, + .loc_MPlayStart = 0x81c13ac, + .loc_CreateFanfareTask = 0x8071408, + .loc_voicegroup = 0x8458af8, + .loc_sPicTable_NPC = 0x8360300, + + // The following should be consistant across languages and revisions. + .loc_gSaveDataBuffer = 0x02039A38 - 0x88, // The location of the saveDataBuffer + .loc_gSpecialVar_0x8000 = 0x020370B8 - 0xCC, + .loc_gMPlayInfo_BGM = 0x03007300 - 0x50, + .loc_gMPlayInfo_SE2 = 0x03007380 - 0x50, + .loc_sFanfareCounter = 0x03000FC6, + .loc_gPlttBufferFaded = 0x020375F8 - 0xCC, + .loc_gSprites = 0x0202063C - 0x84, + + .offset_ramscript = 0x361C, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x0EE0, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_wondercard = 0x0460, + .offset_script = 0x079C, + .text_region = TEXT_KANTO, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x2C, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x39, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0xAF, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 31, + .map_id = 0, + .npc_id = 1, + .npc_palette = 3, + + .def_map_bank = 0xFF, + .def_map_id = 0xFF, + .def_npc_id = 0xFF, + + .old_map_bank = 30, + .old_map_id = 0, + .old_npc_id = 1, + + .loc_gSaveBlock1PTR = 0x03005008, // TODO: Only used for old script, can be removed later +}; +const struct ROM_DATA JPN_EMERALD_v0 = { + .is_valid = true, + + .gamecode = EMERALD_ID, + .version = VERS_1_0, + .language = LANG_JPN, + + .loc_copyMonToPC = 0x806af58, + .loc_getSetPokedexFlag = 0x80bfbbc, + .loc_readFlashSector = 0x815309c, + .loc_loadSaveSection30 = 0x81d3158, // The location of the function that loads save section 30: CEReaderTool_LoadTrainerTower_r in FRLG, TryReadTrainerHill_Internal in Emerald + .loc_m4aMPlayStop = 0x828ef00, + .loc_MPlayStart = 0x828ee1c, + .loc_CreateFanfareTask = 0x80a2a38, + .loc_voicegroup = 0x860e594, + .loc_sPicTable_NPC = 0x84de858, + + // The following should be consistant across languages and revisions. + .loc_gSaveDataBuffer = 0x0203ABBC - 0x334, // The location of the saveDataBuffer + .loc_gSpecialVar_0x8000 = 0x020375D8 - 0x360, + .loc_gMPlayInfo_BGM = 0x03007420 + 0xB0, + .loc_gMPlayInfo_SE2 = 0x03007630 - 0xE0, + .loc_sFanfareCounter = 0x03000F4E, + .loc_gPlttBufferFaded = 0x02037B14 - 0x360, + .loc_gSprites = 0x02020630 - 0x84, + + .offset_ramscript = 0x3728, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1270, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_wondercard = 0x056C, + .offset_script = 0x08A8, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x91, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x860 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x860 + 0x7B, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x20, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 15, + .map_id = 13, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 0xFF, + .def_map_id = 0xFF, + .def_npc_id = 0xFF, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, + + .loc_gSaveBlock1PTR = 0x03005D8C, // TODO: Only used for old script, can be removed later +}; + +#endif \ No newline at end of file diff --git a/include/gba_rom_values/spa_gba_rom_values.h b/include/gba_rom_values/spa_gba_rom_values.h new file mode 100644 index 0000000..948541e --- /dev/null +++ b/include/gba_rom_values/spa_gba_rom_values.h @@ -0,0 +1,366 @@ +#ifndef ROM_VALUES_SPA_H +#define ROM_VALUES_SPA_H + +#include "gba_rom_values/base_gba_rom_struct.h" + +const struct ROM_DATA SPA_RUBY_v0 = { + .is_valid = true, + + .gamecode = RUBY_ID, + .version = VERS_1_0, + .language = LANG_SPA, + + .loc_copyMonToPC = 0x803db64, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x8091220, + .loc_readFlashSector = 0x8126078, // Known as "DoReadFlashWholeSection" in RS + .loc_m4aMPlayStop = 0x81e3450, + .loc_MPlayStart = 0x81e336c, + .loc_CreateFanfareTask = 0x8075404, + .loc_voicegroup = 0x8445680, + .loc_sPicTable_NPC = 0x8371d20, + + // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4, + .loc_gMPlayInfo_BGM = 0x03007380 + 0x10, + .loc_gMPlayInfo_SE2 = 0x03007400 + 0x10, + .loc_sFanfareCounter = 0x030006DA, + .loc_gPlttBufferFaded = 0x0202EEC8, + .loc_gSprites = 0x02020004, + + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_script = 0x0810, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x4C, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x21, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 14, + .map_id = 11, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 8, + .def_map_id = 1, + .def_npc_id = 1, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, +}; +const struct ROM_DATA SPA_SAPPHIRE_v0 = { + .is_valid = true, + + .gamecode = SAPPHIRE_ID, + .version = VERS_1_0, + .language = LANG_SPA, + + .loc_copyMonToPC = 0x803db64, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x8091220, + .loc_readFlashSector = 0x8126078, // Known as "DoReadFlashWholeSection" in RS + .loc_m4aMPlayStop = 0x81e33e0, + .loc_MPlayStart = 0x81e32fc, + .loc_CreateFanfareTask = 0x8075408, + .loc_voicegroup = 0x84453bc, + .loc_sPicTable_NPC = 0x8371cb0, + + // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4, + .loc_gMPlayInfo_BGM = 0x03007380 + 0x10, + .loc_gMPlayInfo_SE2 = 0x03007400 + 0x10, + .loc_sFanfareCounter = 0x030006DA, + .loc_gPlttBufferFaded = 0x0202EEC8, + .loc_gSprites = 0x02020004, + + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_script = 0x0810, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x4C, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x21, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 14, + .map_id = 11, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 8, + .def_map_id = 1, + .def_npc_id = 1, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, +}; +const struct ROM_DATA SPA_RUBY_v1 = { + .is_valid = true, + + .gamecode = RUBY_ID, + .version = VERS_1_1, + .language = LANG_SPA, + + .loc_copyMonToPC = 0x803db64, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x8091220, + .loc_readFlashSector = 0x8126078, // Known as "DoReadFlashWholeSection" in RS + .loc_m4aMPlayStop = 0x81e3450, + .loc_MPlayStart = 0x81e336c, + .loc_CreateFanfareTask = 0x8075404, + .loc_voicegroup = 0x8445680, + .loc_sPicTable_NPC = 0x8371d20, + + // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4, + .loc_gMPlayInfo_BGM = 0x03007380 + 0x10, + .loc_gMPlayInfo_SE2 = 0x03007400 + 0x10, + .loc_sFanfareCounter = 0x030006DA, + .loc_gPlttBufferFaded = 0x0202EEC8, + .loc_gSprites = 0x02020004, + + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_script = 0x0810, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x4C, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x21, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 14, + .map_id = 11, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 8, + .def_map_id = 1, + .def_npc_id = 1, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, +}; +const struct ROM_DATA SPA_SAPPHIRE_v1 = { + .is_valid = true, + + .gamecode = SAPPHIRE_ID, + .version = VERS_1_1, + .language = LANG_SPA, + + .loc_copyMonToPC = 0x803db64, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x8091220, + .loc_readFlashSector = 0x8126078, // Known as "DoReadFlashWholeSection" in RS + .loc_m4aMPlayStop = 0x81e33e0, + .loc_MPlayStart = 0x81e32fc, + .loc_CreateFanfareTask = 0x8075408, + .loc_voicegroup = 0x84453bc, + .loc_sPicTable_NPC = 0x8371cb0, + + // The following should be consistant across languages and revisions. + .loc_gSaveBlock1 = 0x02025734, + .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS + .loc_gSpecialVar_0x8000 = 0x0202E8C4, + .loc_gMPlayInfo_BGM = 0x03007380 + 0x10, + .loc_gMPlayInfo_SE2 = 0x03007400 + 0x10, + .loc_sFanfareCounter = 0x030006DA, + .loc_gPlttBufferFaded = 0x0202EEC8, + .loc_gSprites = 0x02020004, + + .offset_ramscript = 0x3690, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1220, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_script = 0x0810, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x4C, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x21, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 14, + .map_id = 11, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 8, + .def_map_id = 1, + .def_npc_id = 1, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, +}; +const struct ROM_DATA SPA_FIRERED_v0 = { + .is_valid = true, + + .gamecode = FIRERED_ID, + .version = VERS_1_0, + .language = LANG_SPA, + + .loc_copyMonToPC = 0x8040a7c, // Known as "SendMonToPC" + .loc_getSetPokedexFlag = 0x808902c, + .loc_readFlashSector = 0x8104e44, + .loc_loadSaveSection30 = 0x815d588, // The location of the function that loads save section 30: CEReaderTool_LoadTrainerTower_r in FRLG, TryReadTrainerHill_Internal in Emerald + .loc_m4aMPlayStop = 0x81dd470, + .loc_MPlayStart = 0x81dd38c, + .loc_CreateFanfareTask = 0x8071d24, + .loc_voicegroup = 0x848f174, + .loc_sPicTable_NPC = 0x839c220, + + // The following should be consistant across languages and revisions. + .loc_gSaveDataBuffer = 0x02039A38, // The location of the saveDataBuffer + .loc_gSpecialVar_0x8000 = 0x020370B8, + .loc_gMPlayInfo_BGM = 0x03007300 - 0x110, + .loc_gMPlayInfo_SE2 = 0x03007380 - 0x110, + .loc_sFanfareCounter = 0x03000FC6, + .loc_gPlttBufferFaded = 0x020375F8, + .loc_gSprites = 0x0202063C, + + .offset_ramscript = 0x361C, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x0EE0, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_wondercard = 0x0460, + .offset_script = 0x079C, + .text_region = TEXT_KANTO, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x2C, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x39, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0xAF, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 31, + .map_id = 0, + .npc_id = 1, + .npc_palette = 3, + + .def_map_bank = 0xFF, + .def_map_id = 0xFF, + .def_npc_id = 0xFF, + + .old_map_bank = 30, + .old_map_id = 0, + .old_npc_id = 1, + + .loc_gSaveBlock1PTR = 0x03005008, // TODO: Only used for old script, can be removed later +}; +const struct ROM_DATA SPA_LEAFGREEN_v0 = { + .is_valid = true, + + .gamecode = LEAFGREEN_ID, + .version = VERS_1_0, + .language = LANG_SPA, + + .loc_copyMonToPC = 0x8040a7c, + .loc_getSetPokedexFlag = 0x8089000, + .loc_readFlashSector = 0x8104e1c, + .loc_loadSaveSection30 = 0x815d564, // The location of the function that loads save section 30: CEReaderTool_LoadTrainerTower_r in FRLG, TryReadTrainerHill_Internal in Emerald + .loc_m4aMPlayStop = 0x81dd44c, + .loc_MPlayStart = 0x81dd368, + .loc_CreateFanfareTask = 0x8071d24, + .loc_voicegroup = 0x848e86c, + .loc_sPicTable_NPC = 0x839c200, + + // The following should be consistant across languages and revisions. + .loc_gSaveDataBuffer = 0x02039A38, // The location of the saveDataBuffer + .loc_gSpecialVar_0x8000 = 0x020370B8, + .loc_gMPlayInfo_BGM = 0x03007300 - 0x110, + .loc_gMPlayInfo_SE2 = 0x03007380 - 0x110, + .loc_sFanfareCounter = 0x03000FC6, + .loc_gPlttBufferFaded = 0x020375F8, + .loc_gSprites = 0x0202063C, + + .offset_ramscript = 0x361C, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x0EE0, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_wondercard = 0x0460, + .offset_script = 0x079C, + .text_region = TEXT_KANTO, + .special_DrawWholeMapView = 0x8E, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x800 + 0x2C, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x39, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0xAF, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 31, + .map_id = 0, + .npc_id = 1, + .npc_palette = 3, + + .def_map_bank = 0xFF, + .def_map_id = 0xFF, + .def_npc_id = 0xFF, + + .old_map_bank = 30, + .old_map_id = 0, + .old_npc_id = 1, + + .loc_gSaveBlock1PTR = 0x03005008, // TODO: Only used for old script, can be removed later +}; +const struct ROM_DATA SPA_EMERALD_v0 = { + .is_valid = true, + + .gamecode = EMERALD_ID, + .version = VERS_1_0, + .language = LANG_SPA, + + .loc_copyMonToPC = 0x806b490, + .loc_getSetPokedexFlag = 0x80c0428, + .loc_readFlashSector = 0x8152df0, + .loc_loadSaveSection30 = 0x81d3738, // The location of the function that loads save section 30: CEReaderTool_LoadTrainerTower_r in FRLG, TryReadTrainerHill_Internal in Emerald + .loc_m4aMPlayStop = 0x82e8104, + .loc_MPlayStart = 0x82e8020, + .loc_CreateFanfareTask = 0x80a3184, + .loc_voicegroup = 0x8689028, + .loc_sPicTable_NPC = 0x8509a60, + + // The following should be consistant across languages and revisions. + .loc_gSaveDataBuffer = 0x0203ABBC, // The location of the saveDataBuffer + .loc_gSpecialVar_0x8000 = 0x020375D8, + .loc_gMPlayInfo_BGM = 0x03007420, + .loc_gMPlayInfo_SE2 = 0x03007630, + .loc_sFanfareCounter = 0x03000F4E, + .loc_gPlttBufferFaded = 0x02037B14, + .loc_gSprites = 0x02020630, + + .offset_ramscript = 0x3728, // Ramscript offset as found within the SaveBlock1 struct in global.h + .offset_flags = 0x1270, // Flag offset as found within the SaveBlock1 struct in global.h + .offset_wondercard = 0x056C, + .offset_script = 0x08A8, + .text_region = TEXT_HOENN, + .special_DrawWholeMapView = 0x91, + + // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt + .e4_flag = 0x860 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x860 + 0x7B, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0x20, // The start of the unused flags and must have 31 open flags in a row + + .map_bank = 15, + .map_id = 13, + .npc_id = 1, + .npc_palette = 5, + + .def_map_bank = 0xFF, + .def_map_id = 0xFF, + .def_npc_id = 0xFF, + + .old_map_bank = 20, + .old_map_id = 2, + .old_npc_id = 1, + + .loc_gSaveBlock1PTR = 0x03005D8C, // TODO: Only used for old script, can be removed later +}; + +#endif \ No newline at end of file diff --git a/source/pokemon_party.cpp b/source/pokemon_party.cpp index 6622b8d..769da8f 100644 --- a/source/pokemon_party.cpp +++ b/source/pokemon_party.cpp @@ -22,7 +22,7 @@ byte gen1_debug_box_data[0x462] = { // Num of Pokemon 0x14, // Pokemon 1-20 - 0x02, 0x70, 0x70, 0x70, 0x71, 0x71, 0x70, 0x71, 0x7B, 0x71, 0x71, 0x7C, 0x71, 0x71, 0x71, 0x71, 0x24, 0x24, 0xA5, 0x15, 0xFF, + 0x02, 0x70, 0x70, 0x70, 0x71, 0x71, 0x70, 0x71, 0x7B, 0x71, 0x71, 0x7C, 0x71, 0x71, 0x71, 0x94, 0x24, 0x24, 0xA5, 0x15, 0xFF, // Pokemon list 0x02, 0x00, 0x11, 0x64, 0x00, 0x07, 0x03, 0xFF, 0x28, 0x51, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE6, 0xDE, 0x23, 0x28, 0x00, 0x00, 0x70, 0x00, 0x12, 0x04, 0x00, 0x07, 0x03, 0xFF, 0x28, 0x51, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xD8, 0x23, 0x28, 0x00, 0x00, @@ -39,7 +39,7 @@ byte gen1_debug_box_data[0x462] = { 0x71, 0x00, 0x12, 0x04, 0x00, 0x07, 0x03, 0x78, 0x6A, 0x00, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF6, 0x40, 0x1E, 0x00, 0x00, 0x00, 0x71, 0x00, 0x16, 0x06, 0x00, 0x07, 0x03, 0x78, 0x6A, 0x00, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xAA, 0x1E, 0x00, 0x00, 0x00, 0x71, 0x00, 0x12, 0x04, 0x00, 0x07, 0x03, 0x78, 0x6A, 0x00, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0xE9, 0x1E, 0x00, 0x00, 0x00, - 0x71, 0x00, 0x14, 0x05, 0x00, 0x07, 0x03, 0x78, 0x6A, 0x00, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFB, 0xEC, 0x1E, 0x00, 0x00, 0x00, + 0x94, 0x00, 0x14, 0x05, 0x00, 0x07, 0x03, 0x78, 0x6A, 0x00, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFB, 0xEC, 0x1E, 0x00, 0x00, 0x00, 0x24, 0x00, 0x12, 0x04, 0x00, 0x00, 0x02, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0xC2, 0x23, 0x00, 0x00, 0x00, 0x24, 0x00, 0x11, 0x04, 0x00, 0x00, 0x02, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x2A, 0x23, 0x00, 0x00, 0x00, 0xA5, 0x00, 0x0E, 0x03, 0x00, 0x00, 0x00, 0xFF, 0x21, 0x27, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xBE, 0x23, 0x1E, 0x00, 0x00, diff --git a/source/rom_data.cpp b/source/rom_data.cpp index 0aeedd0..435a3a9 100644 --- a/source/rom_data.cpp +++ b/source/rom_data.cpp @@ -3,6 +3,11 @@ #include "pokemon_party.h" #include "pokemon_data.h" #include "gba_rom_values/eng_gba_rom_values.h" +#include "gba_rom_values/jpn_gba_rom_values.h" +#include "gba_rom_values/fre_gba_rom_values.h" +#include "gba_rom_values/ger_gba_rom_values.h" +#include "gba_rom_values/ita_gba_rom_values.h" +#include "gba_rom_values/spa_gba_rom_values.h" extern rom_data curr_rom; @@ -21,6 +26,48 @@ bool rom_data::load_rom() &ENG_FIRERED_v1, &ENG_LEAFGREEN_v1, &ENG_EMERALD_v0, + + &JPN_RUBY_v0, + &JPN_SAPPHIRE_v0, + &JPN_RUBY_v1, + &JPN_SAPPHIRE_v1, + &JPN_FIRERED_v0, + &JPN_LEAFGREEN_v0, + &JPN_FIRERED_v1, + &JPN_LEAFGREEN_v1, + &JPN_EMERALD_v0, + + &FRE_RUBY_v0, + &FRE_SAPPHIRE_v0, + &FRE_RUBY_v1, + &FRE_SAPPHIRE_v1, + &FRE_FIRERED_v0, + &FRE_LEAFGREEN_v0, + &FRE_EMERALD_v0, + + &GER_RUBY_v0, + &GER_SAPPHIRE_v0, + &GER_RUBY_v1, + &GER_SAPPHIRE_v1, + &GER_FIRERED_v0, + &GER_LEAFGREEN_v0, + &GER_EMERALD_v0, + + &ITA_RUBY_v0, + &ITA_SAPPHIRE_v0, + &ITA_RUBY_v1, + &ITA_SAPPHIRE_v1, + &ITA_FIRERED_v0, + &ITA_LEAFGREEN_v0, + &ITA_EMERALD_v0, + + &SPA_RUBY_v0, + &SPA_SAPPHIRE_v0, + &SPA_RUBY_v1, + &SPA_SAPPHIRE_v1, + &SPA_FIRERED_v0, + &SPA_LEAFGREEN_v0, + &SPA_EMERALD_v0, }; if (IGNORE_GAME_PAK) @@ -42,7 +89,8 @@ bool rom_data::load_rom() { if (gamecode == list_of_roms[i]->gamecode && language == list_of_roms[i]->language && - version == list_of_roms[i]->version) + version == list_of_roms[i]->version && + list_of_roms[i]->is_valid) { fill_values(list_of_roms[i]); rom_loaded = true;