From 91cfb6a564f73f02eb57792f8a0f4aa82e1867d1 Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Tue, 16 Jan 2018 22:25:35 -0600 Subject: add debug ifdefs --- include/cable_club.h | 3 +++ include/clock.h | 1 + include/constants/decorations.h | 2 ++ include/debug.h | 1 + include/overworld.h | 2 ++ 5 files changed, 9 insertions(+) (limited to 'include') diff --git a/include/cable_club.h b/include/cable_club.h index a2fe46b30..2f509c9fc 100644 --- a/include/cable_club.h +++ b/include/cable_club.h @@ -20,5 +20,8 @@ void sub_8083B90(void); void sub_8083BDC(void); bool32 sub_8083BF4(u8 linkPlayerIndex); void sub_8083C50(u8 taskId); +#if DEBUG +void debug_sub_808B838(u8); +#endif #endif // GUARD_CABLE_CLUB_H diff --git a/include/clock.h b/include/clock.h index 4e6560c91..5772145d3 100644 --- a/include/clock.h +++ b/include/clock.h @@ -3,6 +3,7 @@ // TODO: time of day and seconds in a day defines +void InitTimeBasedEvents(void); void DoTimeBasedEvents(void); #endif diff --git a/include/constants/decorations.h b/include/constants/decorations.h index 2e3558721..c361ccdf1 100644 --- a/include/constants/decorations.h +++ b/include/constants/decorations.h @@ -123,4 +123,6 @@ #define DECOR_REGICE_DOLL 119 #define DECOR_REGISTEEL_DOLL 120 +#define DECOR_COUNT 121 + #endif // GUARD_CONSTANTS_DECORATIONS_H diff --git a/include/debug.h b/include/debug.h index f3ad8c401..8f9e84c24 100644 --- a/include/debug.h +++ b/include/debug.h @@ -3,5 +3,6 @@ // matsuda_debug_menu void sub_80AAF30(void); +void unref_sub_80AB084(const u8 *text); #endif // GUARD_DEBUG_H diff --git a/include/overworld.h b/include/overworld.h index 0954f1b63..50089593f 100644 --- a/include/overworld.h +++ b/include/overworld.h @@ -235,4 +235,6 @@ void CreateLinkPlayerSprite(u8); void SpriteCB_LinkPlayer(struct Sprite *); void sub_805465C(void); +void CB2_InitTestMenu(void); + #endif // GUARD_ROM4_H -- cgit v1.2.3 From 8835353325d9c7eba7664bde5d5a2d4c40c4376d Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Wed, 17 Jan 2018 18:24:33 -0600 Subject: resolve more undefined references --- include/strings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/strings.h b/include/strings.h index fe9cfc6ba..91c5c5344 100644 --- a/include/strings.h +++ b/include/strings.h @@ -164,7 +164,7 @@ extern const u8 gOtherText_None[]; extern const u8 gOtherText_ThreeQuestions2[]; -extern const u8 gOtherText_FiveQuestionsAndSlash[]; +extern const u8 gOtherText_FiveQuestions[]; extern const u8 gOtherText_OneDash[]; extern const u8 gOtherText_TwoDashes[]; -- cgit v1.2.3 From 1685a7977a652f35998a717395407d625878e20e Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Mon, 22 Jan 2018 21:42:14 -0600 Subject: dump some debug baseroms --- include/pokeblock.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/pokeblock.h b/include/pokeblock.h index 6720653a0..cda598f6c 100644 --- a/include/pokeblock.h +++ b/include/pokeblock.h @@ -3,12 +3,20 @@ enum { - PBLOCK_CLR_BLACK, - PBLOCK_CLR_RED, + PBLOCK_CLR_RED = 1, PBLOCK_CLR_BLUE, PBLOCK_CLR_PINK, PBLOCK_CLR_GREEN, - PBLOCK_CLR_YELLOW + PBLOCK_CLR_YELLOW, + PBLOCK_CLR_PURPLE, + PBLOCK_CLR_INDIGO, + PBLOCK_CLR_BROWN, + PBLOCK_CLR_LITEBLUE, + PBLOCK_CLR_OLIVE, + PBLOCK_CLR_GRAY, + PBLOCK_CLR_BLACK, + PBLOCK_CLR_WHITE, + PBLOCK_CLR_GOLD, }; enum -- cgit v1.2.3 From 1e6cb59a0cd0dff15f749a5274bee17ca994c178 Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Tue, 23 Jan 2018 20:43:28 -0600 Subject: start decompiling start_menu_debug.c --- include/battle.h | 2 ++ include/debug.h | 6 ++++++ include/link.h | 1 + include/mystery_event_menu.h | 1 + include/reset_rtc_screen.h | 1 + include/trade.h | 1 + 6 files changed, 12 insertions(+) (limited to 'include') diff --git a/include/battle.h b/include/battle.h index d3cbd24f5..544e65b80 100644 --- a/include/battle.h +++ b/include/battle.h @@ -763,6 +763,8 @@ void sub_8012324(void); void SwapTurnOrder(u8, u8); u8 GetWhoStrikesFirst(u8, u8, u8); +void debug_sub_8010800(void); + // asm/battle_3.o u8 CheckMoveLimitations(u8 bank, u8 unusableMoves, u8 check); u8 UpdateTurnCounters(void); diff --git a/include/debug.h b/include/debug.h index 3c1a2b0a5..713b21ec5 100644 --- a/include/debug.h +++ b/include/debug.h @@ -5,4 +5,10 @@ void sub_80AAF30(void); void Crash(const u8 *text); +// tomomichi_debug_menu +void debug_nullsub_66(void); + +// sound_check_menu +void CB2_StartSoundCheckMenu(void); + #endif // GUARD_DEBUG_H diff --git a/include/link.h b/include/link.h index 367add625..21bb0b780 100644 --- a/include/link.h +++ b/include/link.h @@ -194,5 +194,6 @@ u32 LinkMain1(u8 *, u16 *, u16[CMD_LENGTH][MAX_LINK_PLAYERS]); void LinkVSync(void); void Timer3Intr(void); void SerialCB(void); +void LinkTestScreen(void); #endif // GUARD_LINK_H diff --git a/include/mystery_event_menu.h b/include/mystery_event_menu.h index 8801789d9..c1f5fbb8f 100644 --- a/include/mystery_event_menu.h +++ b/include/mystery_event_menu.h @@ -2,5 +2,6 @@ #define GUARD_MYSTERY_EVENT_MENU_H void CB2_InitMysteryEventMenu(void); +void debug_sub_815D15C(void); #endif // GUARD_MYSTERY_EVENT_MENU_H diff --git a/include/reset_rtc_screen.h b/include/reset_rtc_screen.h index 5807dec99..2de95534a 100644 --- a/include/reset_rtc_screen.h +++ b/include/reset_rtc_screen.h @@ -2,5 +2,6 @@ #define GUARD_RESET_RTC_SCREEN_H void CB2_InitResetRtcScreen(void); +void debug_sub_806F8F8(void); #endif // GUARD_RESET_RTC_SCREEN_H diff --git a/include/trade.h b/include/trade.h index 46f58a802..d6dee0bd9 100644 --- a/include/trade.h +++ b/include/trade.h @@ -51,6 +51,7 @@ extern const u32 gUnknown_0820CA98[]; extern const u16 gUnknown_0820F798[]; void sub_8047CD8(void); +void sub_804B790(void); void sub_804E174(void); extern const u8 gOtherText_MaleSymbol3[2]; extern const u8 gOtherText_FemaleSymbol3[2]; -- cgit v1.2.3 From 6437a2acd5b662db779352c24f34116852a1c605 Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Tue, 23 Jan 2018 21:44:01 -0600 Subject: decompile kagaya_debug_menu.c --- include/region_map.h | 1 + include/slot_machine.h | 1 + include/trainer_card.h | 2 ++ 3 files changed, 4 insertions(+) (limited to 'include') diff --git a/include/region_map.h b/include/region_map.h index 254307052..e7a357fe2 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -68,5 +68,6 @@ void CreateRegionMapPlayerIcon(u16, u16); const u8 *GetMapSectionName(u8 *dest, u16 mapSectionId, u16 length); const u8 *CopyMapName(u8 *dest, u16 b); const u8 *CopyLocationName(u8 *dest, u16 b); +void CB2_InitFlyRegionMap(void); #endif // GUARD_REGION_MAP_H diff --git a/include/slot_machine.h b/include/slot_machine.h index f886d9239..7759ca1b2 100644 --- a/include/slot_machine.h +++ b/include/slot_machine.h @@ -75,5 +75,6 @@ struct SlotMachineEwramStruct { void PlaySlotMachine(u8 arg0, MainCallback cb); void sub_8104DA4(void); u8 sub_8105BB4(u8 templateIdx, u8 cbAndCoordsIdx, s16 a2); +void debug_sub_811609C(u8, void (*)(void)); #endif // GUARD_SLOT_MACHINE_H diff --git a/include/trainer_card.h b/include/trainer_card.h index 7ea1d9fc0..28cabbd09 100644 --- a/include/trainer_card.h +++ b/include/trainer_card.h @@ -32,6 +32,8 @@ void TrainerCard_ShowPlayerCard(void (*)(void)); void TrainerCard_ShowLinkCard(u8, void (*)(void)); void TrainerCard_GenerateCardForPlayer(struct TrainerCard *); u8 sub_80934C4(u8 id); +void debug_sub_80A0710(void (*)(void)); +void debug_sub_80A073C(void (*)(void)); extern struct TrainerCard gTrainerCards[4]; -- cgit v1.2.3 From dbcf1ce9cb124e303e6bed3fecede7a72b8000f2 Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Wed, 24 Jan 2018 00:58:38 -0600 Subject: integrate some debug differences --- include/link.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/link.h b/include/link.h index 21bb0b780..ecebb586a 100644 --- a/include/link.h +++ b/include/link.h @@ -195,5 +195,6 @@ void LinkVSync(void); void Timer3Intr(void); void SerialCB(void); void LinkTestScreen(void); +void debug_sub_8008264(u32 value, int left, int top, int r3, int sp0); #endif // GUARD_LINK_H -- cgit v1.2.3 From d125e9b461204d0f80ae25d35a1569613ee3aa6e Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Wed, 24 Jan 2018 01:35:05 -0600 Subject: integrate debug Blender_PrintBlendingResults --- include/link.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/link.h b/include/link.h index ecebb586a..f3e918bc6 100644 --- a/include/link.h +++ b/include/link.h @@ -196,5 +196,6 @@ void Timer3Intr(void); void SerialCB(void); void LinkTestScreen(void); void debug_sub_8008264(u32 value, int left, int top, int r3, int sp0); +u32 sub_8007E40(void); #endif // GUARD_LINK_H -- cgit v1.2.3 From 8cce68537704adb0d1d34a96fa977675ad1a0340 Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Wed, 24 Jan 2018 20:11:06 -0600 Subject: integrate debug functions in field_control_avatar.c --- include/debug.h | 3 +++ include/field_control_avatar.h | 1 + include/field_fadetransition.h | 1 + 3 files changed, 5 insertions(+) (limited to 'include') diff --git a/include/debug.h b/include/debug.h index 713b21ec5..2136dbfb8 100644 --- a/include/debug.h +++ b/include/debug.h @@ -1,6 +1,9 @@ #ifndef GUARD_DEBUG_H #define GUARD_DEBUG_H +// start_menu_debug +void DebugMenu_8077048(void); + // matsuda_debug_menu void sub_80AAF30(void); void Crash(const u8 *text); diff --git a/include/field_control_avatar.h b/include/field_control_avatar.h index 2d5693e40..49e9f23e3 100644 --- a/include/field_control_avatar.h +++ b/include/field_control_avatar.h @@ -36,5 +36,6 @@ bool8 sub_8068870(u16 a); bool8 sub_8068894(void); bool8 sub_8068A64(struct MapPosition *, u16); u8 sub_8068F18(void); +bool8 dive_warp(struct MapPosition *position, u16 b); #endif diff --git a/include/field_fadetransition.h b/include/field_fadetransition.h index 4377367f7..cd0cb6eab 100644 --- a/include/field_fadetransition.h +++ b/include/field_fadetransition.h @@ -27,5 +27,6 @@ void sub_8080F48(void); void sub_8080F58(void); void sub_8080F68(void); void sub_8080F9C(void); +void debug_sub_80888D8(void); #endif // GUARD_FIELD_FADETRANSITION_H -- cgit v1.2.3 From 4c1e0b8b303320a173203b8ab94c2a695555ace3 Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Thu, 25 Jan 2018 00:07:15 -0600 Subject: integrate debug functions in mail.c and decompile some debug code --- include/constants/items.h | 2 ++ include/easy_chat.h | 1 + 2 files changed, 3 insertions(+) (limited to 'include') diff --git a/include/constants/items.h b/include/constants/items.h index 9b88db1da..6f54e6ee4 100644 --- a/include/constants/items.h +++ b/include/constants/items.h @@ -401,4 +401,6 @@ // Check if the item is one that can be used on a Pokemon. #define IS_POKEMON_ITEM(item) ((item) >= ITEM_POTION && (item) <= ITEM_0B2) +#define IS_ITEM_MAIL(item) ((item) >= ITEM_ORANGE_MAIL && (item) <= ITEM_RETRO_MAIL) + #endif // GUARD_CONSTANTS_ITEMS_H diff --git a/include/easy_chat.h b/include/easy_chat.h index 58750fa92..b86b166aa 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -117,6 +117,7 @@ struct Shared1000 // const pointer to shared1000. easy_chat might be two separate files. extern struct Shared1000 *const gEasyChatStruct; +void sub_80E60D8(void); void sub_80E62A0(u8 arg0, u16 *arg1, void (*arg2)(void), u8 arg3); u16 sub_80EB72C(u16 group); void sub_80EB6FC(u16 *, u16); -- cgit v1.2.3 From cb9aec12785894d727583d13b0152c6d32948553 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Mon, 29 Jan 2018 15:08:10 -0600 Subject: integrate debug code in pokenav_before.c --- include/link.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/link.h b/include/link.h index e8dfc333a..6a7212645 100644 --- a/include/link.h +++ b/include/link.h @@ -195,6 +195,7 @@ void LinkVSync(void); void Timer3Intr(void); void SerialCB(void); void LinkTestScreen(void); +void debug_sub_8008218(u16 *buffer, void *arg1, u16 (*arg2)[], u32 arg3); void debug_sub_8008264(u32 value, int left, int top, int r3, int sp0); u32 sub_8007E40(void); -- cgit v1.2.3 From c410df510012f7a6ccfc342b398cd5d407fb0bf6 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Wed, 31 Jan 2018 18:33:01 -0800 Subject: Start decompiling psychic.s --- include/battle_anim.h | 1 + include/rom_8077ABC.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/battle_anim.h b/include/battle_anim.h index a94e6d13c..fd1becf39 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -63,5 +63,6 @@ void sub_80763FC(u16 a, u16 *b, u32 c, u8 d); s16 CalculatePanIncrement(s16 sourcePan, s16 targetPan, s16 incrementPan); s16 sub_8077104(s16 newPan, int oldPan); void DestroyAnimSoundTask(u8 taskId); +void sub_8076464(u8 a); #endif diff --git a/include/rom_8077ABC.h b/include/rom_8077ABC.h index 81a11ba04..756c5fa03 100644 --- a/include/rom_8077ABC.h +++ b/include/rom_8077ABC.h @@ -85,7 +85,7 @@ void sub_8078174(struct Sprite *sprite); void sub_80793C4(struct Sprite *sprite); void sub_807A3FC(u8 slot, u8 a2, s16 *a3, s16 *a4); u8 sub_8079ED4(u8 slot); -int sub_807A100(u8 slot, u8 a2); +s16 sub_807A100(u8 slot, u8 a2); u16 sub_80790F0(s16 a, s16 b); void sub_8078FDC(struct Sprite *sprite, bool8 a2, s16 xScale, s16 yScale, u16 rotation); void sub_807867C(struct Sprite *sprite, s16 a2); -- cgit v1.2.3 From 513d85e2df9cdb288df6345107130c4bd144148d Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Thu, 1 Feb 2018 12:20:37 -0800 Subject: Finish decompiling psychic.s --- include/rom_8077ABC.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/rom_8077ABC.h b/include/rom_8077ABC.h index 756c5fa03..f7b75fb04 100644 --- a/include/rom_8077ABC.h +++ b/include/rom_8077ABC.h @@ -105,5 +105,6 @@ void oamt_add_pos2_onto_pos1(struct Sprite *sprite); void sub_8078BD4(struct Sprite *sprite); void sub_807941C(struct Sprite *sprite); void sub_80789D4(bool8 a1); +void sub_8079AB8(u8 sprite, u8 sprite2); #endif // GUARD_ROM_8077ABC_H -- cgit v1.2.3 From 338d2b0b1897899a6fa787f8baa4cf392f81b718 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sun, 4 Feb 2018 12:34:18 -0800 Subject: Finish decompiling dark.s except one function --- include/rom_8077ABC.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/rom_8077ABC.h b/include/rom_8077ABC.h index f7b75fb04..ff737135b 100644 --- a/include/rom_8077ABC.h +++ b/include/rom_8077ABC.h @@ -106,5 +106,6 @@ void sub_8078BD4(struct Sprite *sprite); void sub_807941C(struct Sprite *sprite); void sub_80789D4(bool8 a1); void sub_8079AB8(u8 sprite, u8 sprite2); +u8 sub_807A4A0(int bank, u8 sprite, int species); #endif // GUARD_ROM_8077ABC_H -- cgit v1.2.3