diff options
author | Kaz <kazbloxmc@gmail.com> | 2020-06-08 21:40:08 -0400 |
---|---|---|
committer | Kaz <kazbloxmc@gmail.com> | 2020-06-08 21:40:08 -0400 |
commit | 7f94272bfa5ebdfd4edbb41210b8644273ad8783 (patch) | |
tree | 46c04e582c7638bba48190326915def4776a603e | |
parent | dfe734f4359062a5ac51cb500cd90c66261785ca (diff) |
Actually fix everything.
-rw-r--r-- | data/btl_attrs.s | 3 | ||||
-rw-r--r-- | data/debug_mystery_event_scripts.s | 46 | ||||
-rw-r--r-- | include/start_menu.h | 13 | ||||
-rw-r--r-- | src/libs/agb_flash_mx.c | 2 |
4 files changed, 37 insertions, 27 deletions
diff --git a/data/btl_attrs.s b/data/btl_attrs.s index 0ae866ae0..d154a6901 100644 --- a/data/btl_attrs.s +++ b/data/btl_attrs.s @@ -103,10 +103,11 @@ gUnknown_Debug_821F5AC:: .byte 0x09, 0x14, 0x00, 0x00, 0x14, 0x00, 0x14, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x00, 0x14, 0x14, 0x00, 0x0b, 0x00, 0x02, 0x00, 0x02, 0x02, 0x00, 0x00, 0x0c, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00 .byte 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x0e, 0x14, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.ifdef ENGLISH Str_821F624:: @ 0x821F624 -.if ENGLISH .string "ーーーーーーーー$" .else @ GERMAN +Str_821F624:: @ 0x821F624 .string "ーーーーーーーーーーーー$" .endif @ GERMAN diff --git a/data/debug_mystery_event_scripts.s b/data/debug_mystery_event_scripts.s index d8fda63e6..96d639870 100644 --- a/data/debug_mystery_event_scripts.s +++ b/data/debug_mystery_event_scripts.s @@ -17,20 +17,20 @@ .section .rodata -.if ENGLISH +.ifdef ENGLISH .set unkConstant, 2 .else @ GERMAN .set unkConstant, 4 .endif @ GERMAN -.if SAPPHIRE - .set unkConstant2, 0x100 +.ifdef SAPPHIRE + .set versionMask, 0x100 .else @ RUBY - .set unkConstant2, 0x80 + .set versionMask, 0x80 .endif @ RUBY gUnknown_Debug_845DAE1:: - me_checkcompat gUnknown_Debug_845DAE1, unkConstant, unkConstant, 0x4, unkConstant2 + me_checkcompat gUnknown_Debug_845DAE1, unkConstant, unkConstant, 0x4, versionMask me_crc 0x0, _0845DAFF, _0845DAFFEnd _0845DAFF: me_initramscript MAP_PETALBURG_CITY_GYM, 0x1, _845DB56, _845DB56End @@ -38,7 +38,7 @@ _0845DAFF: me_runscript _0845DD0D me_end -.if ENGLISH +.ifdef ENGLISH _0845DB16: .string "Go see your father at the GYM in\n" .string "PETALBURG.$" @@ -82,7 +82,7 @@ _0845DBB5: release end -.if ENGLISH +.ifdef ENGLISH _0845DBBE: .string "DAD: {PLAYER}! Good to see you!\n" .string "There's a letter here for you, {PLAYER}.$" @@ -144,7 +144,7 @@ _0845DD5B: setmysteryeventstatus 0x3 end -.if ENGLISH +.ifdef ENGLISH _0845DD63: .string "This EVENT may be played only once.$" _0845DD95: @@ -162,7 +162,7 @@ _0845DAFFEnd: gUnknown_Debug_845DAE1End:: gUnknown_Debug_845DDB2:: - me_checkcompat gUnknown_Debug_845DDB2, unkConstant, unkConstant, 0x4, unkConstant2 + me_checkcompat gUnknown_Debug_845DDB2, unkConstant, unkConstant, 0x4, versionMask me_checksum 0x0, _0845DDD0, _0845DDD0End _0845DDD0: me_setenigmaberry gUnknown_Debug_845DDD6 @@ -175,7 +175,7 @@ _0845DDD0End: gUnknown_Debug_845DDB2End:: gUnknown_Debug_845E306:: - me_checkcompat gUnknown_Debug_845E306, unkConstant, unkConstant, 0x4, unkConstant2 + me_checkcompat gUnknown_Debug_845E306, unkConstant, unkConstant, 0x4, versionMask me_runscript _0845E329 me_setmsg 0x2, _0845E34F me_setmsg 0x3, _0845E387 @@ -194,7 +194,7 @@ _0845E34C: setmysteryeventstatus 0x3 end -.if ENGLISH +.ifdef ENGLISH _0845E34F: .string "A POKéMON was added to the\n" .string "player's party.$" @@ -214,7 +214,7 @@ _0845E387: .endif @ GERMAN gUnknown_Debug_845E3E0:: - me_checkcompat gUnknown_Debug_845E3E0, unkConstant, unkConstant, 0x4, unkConstant2 + me_checkcompat gUnknown_Debug_845E3E0, unkConstant, unkConstant, 0x4, versionMask me_crc 0x0, _0845E3FE, _0845E3FEEnd _0845E3FE: me_giveribbon 0x0, 0x1 @@ -224,7 +224,7 @@ _0845E3FEEnd: gUnknown_Debug_845E3E0End:: gUnknown_Debug_845E402:: - me_checkcompat gUnknown_Debug_845E402, unkConstant, unkConstant, 0x4, unkConstant2 + me_checkcompat gUnknown_Debug_845E402, unkConstant, unkConstant, 0x4, versionMask me_crc 0x0, _0845E420, _0845E420End _0845E420: me_givenationaldex @@ -234,7 +234,7 @@ _0845E420End: gUnknown_Debug_845E402End:: gUnknown_Debug_845E422:: - me_checkcompat gUnknown_Debug_845E422, unkConstant, unkConstant, 0x4, unkConstant2 + me_checkcompat gUnknown_Debug_845E422, unkConstant, unkConstant, 0x4, versionMask me_crc 0x0, _0845E440, _0845E440End _0845E440: me_addrareword 0x1 @@ -244,7 +244,7 @@ _0845E440End: gUnknown_Debug_845E422End:: gUnknown_Debug_845E443:: - me_checkcompat gUnknown_Debug_845E443, unkConstant, unkConstant, 0x4, unkConstant2 + me_checkcompat gUnknown_Debug_845E443, unkConstant, unkConstant, 0x4, versionMask me_crc 0x0, _0845E461, _0845E461End _0845E461: me_givepokemon gUnknown_Debug_845E467 @@ -260,7 +260,7 @@ _0845E461End: gUnknown_Debug_845E443End:: gUnknown_Debug_845E4EF:: - me_checkcompat gUnknown_Debug_845E4EF, unkConstant, unkConstant, 0x4, unkConstant2 + me_checkcompat gUnknown_Debug_845E4EF, unkConstant, unkConstant, 0x4, versionMask me_addtrainer gUnknown_Debug_845E506 me_end @@ -269,13 +269,13 @@ gUnknown_Debug_845E506:: gUnknown_Debug_845E4EFEnd:: gUnknown_Debug_845E606:: - me_checkcompat gUnknown_Debug_845E606, unkConstant, unkConstant, 0x4, unkConstant2 + me_checkcompat gUnknown_Debug_845E606, unkConstant, unkConstant, 0x4, versionMask me_enableresetrtc me_end gUnknown_Debug_845E606End:: gUnknown_Debug_845E619:: - me_checkcompat gUnknown_Debug_845E619, unkConstant, unkConstant, 0x4, unkConstant2 + me_checkcompat gUnknown_Debug_845E619, unkConstant, unkConstant, 0x4, versionMask me_checksum 0x0, _0845E637, _0845E637End _0845E637: me_initramscript MAP_PETALBURG_CITY_GYM, 0x1, _0845E683, _0845E683End @@ -283,7 +283,7 @@ _0845E637: me_setstatus 0x2 me_end -.if ENGLISH +.ifdef ENGLISH _0845E64C: .string "Go see your dad at the\n" .string "PETALBURG GYM.$" @@ -314,7 +314,7 @@ _0845E683: _0845E6BF: gotoram -.if ENGLISH +.ifdef ENGLISH _0845E6C0: .string "DAD: Hi, {PLAYER}!\p" .string "I just received a rare BERRY.\n" @@ -333,7 +333,7 @@ _0845E683End: gUnknown_Debug_845E619End:: gUnknown_Debug_845E712:: - me_checkcompat gUnknown_Debug_845E712, unkConstant, unkConstant, 0x4, unkConstant2 + me_checkcompat gUnknown_Debug_845E712, unkConstant, unkConstant, 0x4, versionMask me_crc 0x0, _0845E730, _0845E730End _0845E730: me_runscript _0845E736 @@ -354,7 +354,7 @@ _0845E755: setmysteryeventstatus 0x3 end -.if ENGLISH +.ifdef ENGLISH _0845E75D: .string "{STR_VAR_1} was received!$" _0845E771: @@ -373,7 +373,7 @@ _0845E730End: gUnknown_Debug_845E712End:: gUnknown_Debug_845E797:: - me_checkcompat gUnknown_Debug_845E797, unkConstant, unkConstant, 0x4, unkConstant2 + me_checkcompat gUnknown_Debug_845E797, unkConstant, unkConstant, 0x4, versionMask me_crc 0x0, gUnknown_Debug_845E7B5, gUnknown_Debug_845E7B5End gUnknown_Debug_845E7B5:: me_setrecordmixinggift 0x1, 0x3, ITEM_POTION diff --git a/include/start_menu.h b/include/start_menu.h index b035eb211..3f69604f1 100644 --- a/include/start_menu.h +++ b/include/start_menu.h @@ -13,11 +13,20 @@ void debug_sub_8075DB4(struct BattleTowerEReaderTrainer *ereaderTrainer, const u bool8 debug_sub_8075C30(void); #if DEBUG -extern u8 gUnknown_Debug_03004BD0; + +#if (ENGLISH && REVISION == 0) +#define TYPE u8 +#else +#define TYPE u32 +#endif + +extern TYPE gUnknown_Debug_03004BD0; // TODO: see if this is in rev1+ #if (ENGLISH && REVISION == 0) -extern u8 gUnknown_Debug_Murakawa2; +extern TYPE gUnknown_Debug_Murakawa2; #endif + +#undef TYPE #endif // DEBUG #endif // GUARD_START_MENU_H diff --git a/src/libs/agb_flash_mx.c b/src/libs/agb_flash_mx.c index b4f710f36..5e2b0bce1 100644 --- a/src/libs/agb_flash_mx.c +++ b/src/libs/agb_flash_mx.c @@ -26,7 +26,7 @@ const struct FlashSetupInfo MX29L010 = 0 // appears to be unused }, { 3, 1 }, // wait state setup data -#if defined(GERMAN) && defined(SAPPHIRE) +#if (GERMAN && SAPPHIRE && !DEBUG) // OK, why !DEBUG? { { 0xBF, 0xD4 } } // ID #else { { 0xC2, 0x09 } } // ID |