From 945241d45eb302775eaa656a73e21072081a4f57 Mon Sep 17 00:00:00 2001 From: red031000 Date: Wed, 21 Oct 2020 18:36:06 +0100 Subject: arm9 pxi_fifo --- include/nitro/PXI_fifo_shared.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/nitro/PXI_fifo_shared.h b/include/nitro/PXI_fifo_shared.h index 2698e89d..297625a1 100644 --- a/include/nitro/PXI_fifo_shared.h +++ b/include/nitro/PXI_fifo_shared.h @@ -13,6 +13,12 @@ #ifndef POKEDIAMOND_PXI_FIFO_SHARED_H #define POKEDIAMOND_PXI_FIFO_SHARED_H +typedef enum +{ + PXI_PROC_ARM9 = 0, + PXI_PROC_ARM7 = 1 +} PXIProc; + typedef enum { PXI_FIFO_TAG_EX = 0, // Extension format PXI_FIFO_TAG_USER_0, // for application programmer, use it in free -- cgit v1.2.3 From 87a52afbb4b9a2cb8c29bde3078e9800198df084 Mon Sep 17 00:00:00 2001 From: red031000 Date: Sun, 1 Nov 2020 21:53:36 +0000 Subject: decompile MOD59_Init --- include/main.h | 2 +- include/overlay_manager.h | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 include/overlay_manager.h (limited to 'include') diff --git a/include/main.h b/include/main.h index 499861a8..d40e22f9 100644 --- a/include/main.h +++ b/include/main.h @@ -22,7 +22,7 @@ struct UnkStruct_02006234 u32 unk14; int * unk18; void * unk1C; - u32 unk20; + struct SaveBlock2 * unk20; u32 unk24; }; diff --git a/include/overlay_manager.h b/include/overlay_manager.h new file mode 100644 index 00000000..c189ed3c --- /dev/null +++ b/include/overlay_manager.h @@ -0,0 +1,14 @@ +#ifndef POKEDIAMOND_OVERLAY_MANAGER_H +#define POKEDIAMOND_OVERLAY_MANAGER_H + +#include "nitro/types.h" + +struct UnkStruct_02006234 * OverlayManager_new(struct Unk21DBE18 * ovly_mgr, int * a1, u32 heap_id); +void OverlayManager_delete(struct UnkStruct_02006234 * a0); +void * OverlayManager_CreateAndGetData(struct UnkStruct_02006234 * a0, u32 size, u32 heap_id); +void * OverlayManager_GetData(struct UnkStruct_02006234 * a0); +void OverlayManager_FreeData(struct UnkStruct_02006234 * a0); +int * OverlayManager_GetField18(struct UnkStruct_02006234 * a0); +BOOL OverlayManager_Run(struct UnkStruct_02006234 * a0); + +#endif //POKEDIAMOND_OVERLAY_MANAGER_H -- cgit v1.2.3 From 697c2313123690ebb4af45629cbc337d19941d04 Mon Sep 17 00:00:00 2001 From: red031000 Date: Mon, 9 Nov 2020 19:49:19 +0000 Subject: start decompiling mod21_02254854 --- include/unk_0200CA44.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/unk_0200CA44.h b/include/unk_0200CA44.h index 27d58c5c..3a3be022 100644 --- a/include/unk_0200CA44.h +++ b/include/unk_0200CA44.h @@ -1,10 +1,10 @@ #ifndef POKEDIAMOND_UNK_0200CA44_H #define POKEDIAMOND_UNK_0200CA44_H -void FUN_0200CA44(void (*r0)(void *, void *), void * r1, void * r2); -void FUN_0200CA60(void (*r0)(void *, void *), void * r1, void * r2); -void FUN_0200CA7C(void (*r0)(void *, void *), void * r1, void * r2); -void FUN_0200CA98(void (*r0)(void *, void *), void * r1, void * r2); +BOOL FUN_0200CA44(void (*r0)(void *, void *), void * r1, void * r2); +BOOL FUN_0200CA60(void (*r0)(void *, void *), void * r1, void * r2); +BOOL FUN_0200CA7C(void (*r0)(void *, void *), void * r1, void * r2); +BOOL FUN_0200CA98(void (*r0)(void *, void *), void * r1, void * r2); void FUN_0200CAB4(s32 unk1); #endif //POKEDIAMOND_UNK_0200CA44_H -- cgit v1.2.3 From bc3be40047d1b9ec45e7b355dff2280e7c5faa0a Mon Sep 17 00:00:00 2001 From: red031000 Date: Sat, 14 Nov 2020 00:07:14 +0000 Subject: more mod 21 --- include/unk_0200CA44.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/unk_0200CA44.h b/include/unk_0200CA44.h index 3a3be022..2e479ab8 100644 --- a/include/unk_0200CA44.h +++ b/include/unk_0200CA44.h @@ -1,10 +1,10 @@ #ifndef POKEDIAMOND_UNK_0200CA44_H #define POKEDIAMOND_UNK_0200CA44_H -BOOL FUN_0200CA44(void (*r0)(void *, void *), void * r1, void * r2); -BOOL FUN_0200CA60(void (*r0)(void *, void *), void * r1, void * r2); -BOOL FUN_0200CA7C(void (*r0)(void *, void *), void * r1, void * r2); -BOOL FUN_0200CA98(void (*r0)(void *, void *), void * r1, void * r2); +BOOL FUN_0200CA44(void (*r0)(u32, void *), void * r1, void * r2); +BOOL FUN_0200CA60(void (*r0)(u32, void *), void * r1, void * r2); +BOOL FUN_0200CA7C(void (*r0)(u32, void *), void * r1, void * r2); +BOOL FUN_0200CA98(void (*r0)(u32, void *), void * r1, void * r2); void FUN_0200CAB4(s32 unk1); #endif //POKEDIAMOND_UNK_0200CA44_H -- cgit v1.2.3 From 22c9ea3a992c48fc5c8926902cbde48861195f10 Mon Sep 17 00:00:00 2001 From: tgsm Date: Fri, 18 Dec 2020 13:42:23 -0500 Subject: decompile Options --- include/options.h | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/options.h b/include/options.h index 5f7a3d3f..0f8c89ae 100644 --- a/include/options.h +++ b/include/options.h @@ -2,14 +2,30 @@ #define POKEDIAMOND_OPTIONS_H struct Options { - u16 unk0_0:4; - u16 unk0_4:2; - u16 unk0_6:1; - u16 unk0_7:1; - u16 unk0_8:2; - u16 unk0_A:5; + u16 textSpeed:4; + u16 soundMethod:2; + u16 battleStyle:1; + u16 battleScene:1; + u16 buttonMode:2; + u16 frame:5; }; +struct Options * Options_new(u32 heap_id); +void Options_copy(struct Options * src, struct Options * dest); void Options_init(struct Options * options); +void Options_SetButtonModeOnMain(struct SaveBlock2 * sav2, u32 buttonMode); +u16 Options_GetTextSpeed(struct Options * options); +void Options_SetTextSpeed(struct Options * options, u16 textSpeed); +u32 Options_GetTextFrameDelay(struct Options * options); +u16 Options_GetSoundMethod(struct Options * options); +void Options_SetSoundMethod(struct Options * options, u16 soundMethod); +u16 Options_GetBattleScene(struct Options * options); +void Options_SetBattleScene(struct Options * options, u16 battleScene); +u16 Options_GetBattleStyle(struct Options * options); +void Options_SetBattleStyle(struct Options * options, u16 battleStyle); +u16 Options_GetButtonMode(struct Options * options); +void Options_SetButtonMode(struct Options * options, u16 buttonMode); +u16 Options_GetFrame(struct Options * options); +void Options_SetFrame(struct Options * options, u16 frame); #endif //POKEDIAMOND_OPTIONS_H -- cgit v1.2.3 From 67c105b921816cdeced156d7a832dbbb336be828 Mon Sep 17 00:00:00 2001 From: tgsm Date: Wed, 23 Dec 2020 15:45:29 -0500 Subject: options: add a missing SaveBlock2 forward-declaration Fixes compiler warnings. Also adds a missing forward-declaration to OverlayManager. --- include/options.h | 2 ++ include/overlay_manager.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'include') diff --git a/include/options.h b/include/options.h index 0f8c89ae..fbddbffc 100644 --- a/include/options.h +++ b/include/options.h @@ -1,6 +1,8 @@ #ifndef POKEDIAMOND_OPTIONS_H #define POKEDIAMOND_OPTIONS_H +struct SaveBlock2; + struct Options { u16 textSpeed:4; u16 soundMethod:2; diff --git a/include/overlay_manager.h b/include/overlay_manager.h index c189ed3c..193bc7e8 100644 --- a/include/overlay_manager.h +++ b/include/overlay_manager.h @@ -3,6 +3,8 @@ #include "nitro/types.h" +struct Unk21DBE18; + struct UnkStruct_02006234 * OverlayManager_new(struct Unk21DBE18 * ovly_mgr, int * a1, u32 heap_id); void OverlayManager_delete(struct UnkStruct_02006234 * a0); void * OverlayManager_CreateAndGetData(struct UnkStruct_02006234 * a0, u32 size, u32 heap_id); -- cgit v1.2.3 From a37fd3dff5df3a93ac7d756d1e16d411a0299dc9 Mon Sep 17 00:00:00 2001 From: tgsm Date: Thu, 14 Jan 2021 18:22:00 -0500 Subject: decompile unk_0202C144 --- include/unk_02029FB0.h | 9 +++++++++ include/unk_0202C144.h | 3 +++ 2 files changed, 12 insertions(+) create mode 100644 include/unk_02029FB0.h (limited to 'include') diff --git a/include/unk_02029FB0.h b/include/unk_02029FB0.h new file mode 100644 index 00000000..545a6d3a --- /dev/null +++ b/include/unk_02029FB0.h @@ -0,0 +1,9 @@ +#ifndef POKEDIAMOND_UNK_02029FB0_H +#define POKEDIAMOND_UNK_02029FB0_H + +struct UnkStruct_02029FB0 +{ + u8 unk[0x14C]; +}; + +#endif diff --git a/include/unk_0202C144.h b/include/unk_0202C144.h index 31d3942c..95ca3be4 100644 --- a/include/unk_0202C144.h +++ b/include/unk_0202C144.h @@ -1,6 +1,9 @@ #ifndef POKEDIAMOND_UNK_0202C144_H #define POKEDIAMOND_UNK_0202C144_H +#include "save_block_2.h" +#include "pokemon.h" + void FUN_0202C144(struct SaveBlock2 * sav2, struct Pokemon * mon); #endif //POKEDIAMOND_UNK_0202C144_H -- cgit v1.2.3 From a2c689698a8b16cc72615bd020f938ebe104b87e Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Fri, 5 Feb 2021 02:00:25 -0500 Subject: port over and implement asm processor for NONMATCHINGS. thanks hondew! --- include/macros.inc | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 include/macros.inc (limited to 'include') diff --git a/include/macros.inc b/include/macros.inc new file mode 100644 index 00000000..eb060422 --- /dev/null +++ b/include/macros.inc @@ -0,0 +1,5 @@ +.macro glabel label + .global \label + .thumb + \label: +.endm -- cgit v1.2.3