From 18e060cd532fbe5678d08dd1a1386ae0763f6fc1 Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 31 May 2017 10:12:55 -0400 Subject: Start to decompile use_pokeblock.s --- include/pokenav.h | 31 +++++++++++++++++++++++++++++++ include/use_pokeblock.h | 8 ++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/pokenav.h create mode 100644 include/use_pokeblock.h (limited to 'include') diff --git a/include/pokenav.h b/include/pokenav.h new file mode 100644 index 000000000..df7d73b75 --- /dev/null +++ b/include/pokenav.h @@ -0,0 +1,31 @@ +// +// Created by Scott Norton on 5/31/17. +// + +#ifndef POKERUBY_POKENAV_H +#define POKERUBY_POKENAV_H + +struct UnkPokenavStruct_Sub { + /*0x0*/ u16 unk0; + /*0x2*/ u8 filler2[6]; +}; + +struct UnkPokenavStruct_Sub1 { + /*0x0*/ u32 unk0; + /*0x1*/ u32 unk4; + /*0x2*/ u32 unk8; +}; + +struct UnkPokenavStruct { + /*0x0000*/ u8 filler0000[0xCEE8]; + /*0xCEE8*/ struct UnkPokenavStruct_Sub unkCEE8[78]; + /*0xD158*/ u16 unkD158; + /*0xd15a*/ u8 fillerD15A[8]; + /*0xd162*/ u8 unkD162[2]; + /*0xd164*/ struct UnkPokenavStruct_Sub1 unkD164; +}; + +extern struct UnkPokenavStruct *gUnknown_083DFEC4; + + +#endif //POKERUBY_POKENAV_H diff --git a/include/use_pokeblock.h b/include/use_pokeblock.h new file mode 100644 index 000000000..ca999e0ed --- /dev/null +++ b/include/use_pokeblock.h @@ -0,0 +1,8 @@ +// +// Created by Scott Norton on 5/31/17. +// + +#ifndef POKERUBY_USE_POKEBLOCK_H +#define POKERUBY_USE_POKEBLOCK_H + +#endif //POKERUBY_USE_POKEBLOCK_H -- cgit v1.2.3 From 508d11da9b1503a8b40f0f34a2c2242d1ef73c7d Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 31 May 2017 10:55:51 -0400 Subject: Continue decompilation of use_pokeblock.s --- include/pokenav.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/pokenav.h b/include/pokenav.h index df7d73b75..2a8060191 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -11,9 +11,13 @@ struct UnkPokenavStruct_Sub { }; struct UnkPokenavStruct_Sub1 { - /*0x0*/ u32 unk0; - /*0x1*/ u32 unk4; - /*0x2*/ u32 unk8; + /*0x00*/ void (*unk0)(void); + /*0x04*/ void *unk4; + /*0x08*/ void *unk8; + /*0x0C*/ u8 fillerC[0x44]; + /*0x50*/ u8 unk50; + /*0x51*/ u8 unk51[5]; + /*0x56*/ u8 unk56; }; struct UnkPokenavStruct { @@ -27,5 +31,6 @@ struct UnkPokenavStruct { extern struct UnkPokenavStruct *gUnknown_083DFEC4; +void sub_80F5CDC(u8); #endif //POKERUBY_POKENAV_H -- cgit v1.2.3 From e3025532d0d9ce7ad3f4581dac145f97d77905a1 Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 31 May 2017 13:07:23 -0400 Subject: Some more decompilation (giant function nonmatching, need help fixing pokenav struct?) --- include/main.h | 2 +- include/pokenav.h | 45 ++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 43 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/main.h b/include/main.h index e0cb09370..ff9bb89c7 100644 --- a/include/main.h +++ b/include/main.h @@ -46,8 +46,8 @@ struct Main extern u8 gLinkTransferringData; extern struct Main gMain; extern bool8 gSoftResetDisabled; -extern bool8 gLinkVSyncDisabled; +extern bool8 gLinkVSyncDisabled; extern const u8 gGameVersion; extern const u8 gGameLanguage; diff --git a/include/pokenav.h b/include/pokenav.h index 2a8060191..f32611161 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -16,21 +16,60 @@ struct UnkPokenavStruct_Sub1 { /*0x08*/ void *unk8; /*0x0C*/ u8 fillerC[0x44]; /*0x50*/ u8 unk50; - /*0x51*/ u8 unk51[5]; + /*0x51*/ u8 unk51[4]; + /*0x56*/ u8 unk55; /*0x56*/ u8 unk56; }; +struct UnkPokenavStruct_Sub2 { + /*0x00*/ u8 filler_00[0x26]; + /*0x26*/ u16 unk26; +}; + struct UnkPokenavStruct { - /*0x0000*/ u8 filler0000[0xCEE8]; + /*0x0000*/ u8 filler0000[0x30c]; + /*0x0000*/ u16 unk030C; + /*0x0000*/ u8 filler030E[0x6a9e]; + /*0x6DAC*/ u8 unk6DAC; + /*0x6DAD*/ u8 filler6DAD[0x8fd]; + /*0x6DAD*/ u8 unk76AA; + /*0x6DAD*/ u8 filler76AB[0x10bd]; + /*0x6DAD*/ struct UnkPokenavStruct_Sub2 *unk8768; + /*0x6DAD*/ u8 filler876C[0x74]; + /*0x6DAD*/ void *unk87E0; + /*0x6DAD*/ u8 filler87E4[0x44]; + /*0x6DAD*/ u8 unk8828; + /*0x6DAD*/ u8 filler8829[0x7c7]; + /*0x6DAD*/ u8 unk8ff0; + /*0x6DAD*/ u8 filler8ff1[0x13]; + /*0x6DAD*/ u8 unk9004; + /*0x6DAD*/ u8 filler9005[0x33f]; + /*0x6DAD*/ u8 unk9344; + /*0x6DAD*/ u8 filler9345[0x3ba3]; /*0xCEE8*/ struct UnkPokenavStruct_Sub unkCEE8[78]; /*0xD158*/ u16 unkD158; - /*0xd15a*/ u8 fillerD15A[8]; + /*0xd15a*/ u8 fillerD15A[6]; + /*0xd162*/ u16 unkD160; /*0xd162*/ u8 unkD162[2]; /*0xd164*/ struct UnkPokenavStruct_Sub1 unkD164; }; extern struct UnkPokenavStruct *gUnknown_083DFEC4; +bool8 sub_80F170C(void); +bool8 sub_80F1778(void); +void sub_80F1934(void); +void sub_80F2C80(u8); +void sub_80F2688(void); +bool8 sub_80F26BC(void); +bool8 sub_80F2CBC(u8); +void sub_80F2E18(u8); +void sub_80F33A8(void); +void sub_80F4BD0(void); +void sub_80F556C(void *); +void sub_80F567C(void *, void *); +void sub_80F5B38(void); +bool8 sub_80F5B50(void); void sub_80F5CDC(u8); #endif //POKERUBY_POKENAV_H -- cgit v1.2.3 From 39efcb2a6d169fba0ff33f1bd25e2947b74881a0 Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 31 May 2017 13:37:37 -0400 Subject: sub_81365C8 --- include/pokenav.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/pokenav.h b/include/pokenav.h index f32611161..4c9ec43eb 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -65,6 +65,8 @@ bool8 sub_80F26BC(void); bool8 sub_80F2CBC(u8); void sub_80F2E18(u8); void sub_80F33A8(void); +void sub_80F3C94(void); +void sub_80F3D00(void); void sub_80F4BD0(void); void sub_80F556C(void *); void sub_80F567C(void *, void *); -- cgit v1.2.3 From 7bb9c048b717dcc911383580603009665b479575 Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 28 Jun 2017 17:53:44 -0400 Subject: Matching sub_8136294 --- include/pokenav.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/pokenav.h b/include/pokenav.h index 6fc492a29..ebe8ba59d 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -8,8 +8,8 @@ struct UnkPokenavStruct_Sub { struct UnkPokenavStruct_Sub1 { /*0x00*/ void (*unk0)(void); - /*0x04*/ void *unk4; - /*0x08*/ void *unk8; + /*0x04*/ MainCallback callback; + /*0x08*/ struct Pokeblock *pokeblock; /*0x0C*/ u8 fillerC[0x44]; /*0x50*/ u8 unk50; /*0x51*/ u8 unk51[4]; @@ -50,7 +50,7 @@ struct UnkPokenavStruct { /*0xd164*/ struct UnkPokenavStruct_Sub1 unkD164; }; -extern struct UnkPokenavStruct *gUnknown_083DFEC4; +extern struct UnkPokenavStruct *const gUnknown_083DFEC4; bool8 sub_80F170C(void); bool8 sub_80F1778(void); -- cgit v1.2.3 From 7caa3fd85bcb243cf5f63b2cf58185dc1eb9217c Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 28 Jun 2017 18:20:16 -0400 Subject: sub_8136638 --- include/pokenav.h | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) (limited to 'include') diff --git a/include/pokenav.h b/include/pokenav.h index ebe8ba59d..5fffc91fb 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -28,26 +28,29 @@ struct UnkPokenavStruct { /*0x0000*/ u8 filler030E[0x6a9e]; /*0x6DAC*/ u8 unk6DAC; /*0x6DAD*/ u8 filler6DAD[0x8fd]; - /*0x6DAD*/ u8 unk76AA; - /*0x6DAD*/ u8 filler76AB[0x10bd]; - /*0x6DAD*/ struct UnkPokenavStruct_Sub2 *unk8768; - /*0x6DAD*/ u8 filler876C[0x74]; - /*0x6DAD*/ void *unk87E0; - /*0x6DAD*/ u8 filler87E4[0x44]; - /*0x6DAD*/ u8 unk8828; - /*0x6DAD*/ u8 filler8829[0x7c7]; - /*0x6DAD*/ u8 unk8ff0; - /*0x6DAD*/ u8 filler8ff1[0x13]; - /*0x6DAD*/ u8 unk9004; - /*0x6DAD*/ u8 filler9005[0x33f]; - /*0x6DAD*/ u8 unk9344; - /*0x6DAD*/ u8 filler9345[0x3ba3]; + /*0x76AA*/ u8 unk76AA; + /*0x76AB*/ u8 filler76AB[0x10bd]; + /*0x8768*/ struct UnkPokenavStruct_Sub2 *unk8768; + /*0x876C*/ u8 filler876C[0x6e]; + /*0x87DA*/ s16 unk87DA; + /*0x87DC*/ s16 unk87DC; + /*0x87DE*/ s16 unk87DE; + /*0x87E0*/ void *unk87E0; + /*0x87E4*/ u8 filler87E4[0x44]; + /*0x8828*/ u8 unk8828; + /*0x8829*/ u8 filler8829[0x7c7]; + /*0x8ff0*/ u8 unk8ff0; + /*0x8ff1*/ u8 filler8ff1[0x13]; + /*0x9004*/ u8 unk9004; + /*0x9005*/ u8 filler9005[0x33f]; + /*0x9344*/ u8 unk9344; + /*0x9345*/ u8 filler9345[0x3ba3]; /*0xCEE8*/ struct UnkPokenavStruct_Sub unkCEE8[78]; /*0xD158*/ u16 unkD158; - /*0xd15a*/ u8 fillerD15A[6]; - /*0xd162*/ u16 unkD160; - /*0xd162*/ u8 unkD162[2]; - /*0xd164*/ struct UnkPokenavStruct_Sub1 unkD164; + /*0xD15A*/ u8 fillerD15A[6]; + /*0xD162*/ u16 unkD160; + /*0xD162*/ u8 unkD162[2]; + /*0xD164*/ struct UnkPokenavStruct_Sub1 unkD164; }; extern struct UnkPokenavStruct *const gUnknown_083DFEC4; @@ -70,5 +73,8 @@ void sub_80F5B38(void); bool8 sub_80F5B50(void); void sub_80F5CDC(u8); void sub_80EBA5C(void); +void sub_80F5060(bool8); +void move_anim_execute(void); +bool8 gpu_sync_bg_show(void); #endif // GUARD_POKENAV_H -- cgit v1.2.3 From c44f9abfbb661d1721f03244eac99062df86d85d Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 28 Jun 2017 18:29:30 -0400 Subject: sub_8136808 --- include/pokeblock_feed.h | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 include/pokeblock_feed.h (limited to 'include') diff --git a/include/pokeblock_feed.h b/include/pokeblock_feed.h new file mode 100644 index 000000000..65d0d1dc9 --- /dev/null +++ b/include/pokeblock_feed.h @@ -0,0 +1,10 @@ +// +// Created by Scott Norton on 6/28/17. +// + +#ifndef POKERUBY_POKEBLOCK_FEED_H +#define POKERUBY_POKEBLOCK_FEED_H + +void sub_8147ADC(void); + +#endif //POKERUBY_POKEBLOCK_FEED_H -- cgit v1.2.3 From 5c8320f9e1f8735272e2b8239fbba3b2b6eb69c4 Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 28 Jun 2017 19:09:19 -0400 Subject: sub_81369CC --- include/pokenav.h | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) mode change 100644 => 100755 include/pokenav.h (limited to 'include') diff --git a/include/pokenav.h b/include/pokenav.h old mode 100644 new mode 100755 index 5fffc91fb..a35bd3117 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -10,11 +10,17 @@ struct UnkPokenavStruct_Sub1 { /*0x00*/ void (*unk0)(void); /*0x04*/ MainCallback callback; /*0x08*/ struct Pokeblock *pokeblock; - /*0x0C*/ u8 fillerC[0x44]; + /*0x0C*/ struct Pokemon *pokemon; + /*0x10*/ u8 fillerC[0x40]; /*0x50*/ u8 unk50; - /*0x51*/ u8 unk51[4]; - /*0x56*/ u8 unk55; + /*0x51*/ u8 unk51; + /*0x52*/ u8 unk52; + /*0x53*/ u8 unk53; + /*0x54*/ u8 unk54; + /*0x55*/ u8 unk55; /*0x56*/ u8 unk56; + /*0x57*/ u8 fil57[5]; + /*0x5c*/ u8 unk5c[1]; }; struct UnkPokenavStruct_Sub2 { @@ -22,6 +28,11 @@ struct UnkPokenavStruct_Sub2 { /*0x26*/ u16 unk26; }; +struct UnkUsePokeblockSub { + /*0*/ u8 fil0[2]; + /*2*/ u8 partyIdx:5; +}; + struct UnkPokenavStruct { /*0x0000*/ u8 filler0000[0x30c]; /*0x0000*/ u16 unk030C; @@ -38,11 +49,15 @@ struct UnkPokenavStruct { /*0x87E0*/ void *unk87E0; /*0x87E4*/ u8 filler87E4[0x44]; /*0x8828*/ u8 unk8828; - /*0x8829*/ u8 filler8829[0x7c7]; + /*0x8829*/ u8 filler8829[0x113]; + /*0x893C*/ struct UnkUsePokeblockSub unk893c[0x1ab]; + /*0x8fe8*/ u8 fil8fe8[1]; + /*0x8fe9*/ s8 unk8fe9; + /*0x8fea*/ u8 fil8fea[6]; /*0x8ff0*/ u8 unk8ff0; /*0x8ff1*/ u8 filler8ff1[0x13]; - /*0x9004*/ u8 unk9004; - /*0x9005*/ u8 filler9005[0x33f]; + /*0x9004*/ u8 unk9004[3][20]; + /*0x9040*/ u8 unk9040[0x304]; /*0x9344*/ u8 unk9344; /*0x9345*/ u8 filler9345[0x3ba3]; /*0xCEE8*/ struct UnkPokenavStruct_Sub unkCEE8[78]; @@ -76,5 +91,8 @@ void sub_80EBA5C(void); void sub_80F5060(bool8); void move_anim_execute(void); bool8 gpu_sync_bg_show(void); +void sub_80F5550(void *, void *); +bool8 sub_80F555C(void); +void sub_80F7224(u8); #endif // GUARD_POKENAV_H -- cgit v1.2.3 From 66f219dba7d19cc5561cd12fb81b4add8eb888e0 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 28 Jun 2017 21:53:45 -0400 Subject: through sub_8136C40 --- include/pokenav.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/pokenav.h b/include/pokenav.h index a35bd3117..87ba4d42c 100755 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -11,7 +11,7 @@ struct UnkPokenavStruct_Sub1 { /*0x04*/ MainCallback callback; /*0x08*/ struct Pokeblock *pokeblock; /*0x0C*/ struct Pokemon *pokemon; - /*0x10*/ u8 fillerC[0x40]; + /*0x10*/ u8 stringBuffer[0x40]; /*0x50*/ u8 unk50; /*0x51*/ u8 unk51; /*0x52*/ u8 unk52; @@ -94,5 +94,6 @@ bool8 gpu_sync_bg_show(void); void sub_80F5550(void *, void *); bool8 sub_80F555C(void); void sub_80F7224(u8); +void sub_80F5BDC(void); #endif // GUARD_POKENAV_H -- cgit v1.2.3 From 062f0b5bd9fe3e804ca9e2b4f6b2bae89f94ab61 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 29 Jun 2017 08:34:48 -0400 Subject: sub_8136C6C --- include/pokenav.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/pokenav.h b/include/pokenav.h index 87ba4d42c..87079600d 100755 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -21,6 +21,8 @@ struct UnkPokenavStruct_Sub1 { /*0x56*/ u8 unk56; /*0x57*/ u8 fil57[5]; /*0x5c*/ u8 unk5c[1]; + /*0x5d*/ u8 fil5d[4]; + /*0x61*/ u8 unk61[5]; }; struct UnkPokenavStruct_Sub2 { -- cgit v1.2.3 From eefb510a3c442d6997a6a681e919046a775766be Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 29 Jun 2017 21:19:45 -0400 Subject: Nonmatching sub_8136DC0 --- include/use_pokeblock.h | 2 ++ 1 file changed, 2 insertions(+) mode change 100644 => 100755 include/use_pokeblock.h (limited to 'include') diff --git a/include/use_pokeblock.h b/include/use_pokeblock.h old mode 100644 new mode 100755 index f34857cf1..779ba27d1 --- a/include/use_pokeblock.h +++ b/include/use_pokeblock.h @@ -5,6 +5,8 @@ #ifndef POKERUBY_USE_POKEBLOCK_H #define POKERUBY_USE_POKEBLOCK_H +extern void *gUnknown_02030400; + void sub_8136130(struct Pokeblock *, MainCallback); #endif //POKERUBY_USE_POKEBLOCK_H -- cgit v1.2.3 From 1bb72454b44307b772660e54318598f0cea274cc Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 29 Jun 2017 21:39:25 -0400 Subject: sub_8136E40 --- include/pokenav.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/pokenav.h b/include/pokenav.h index 87079600d..97634955a 100755 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -23,6 +23,7 @@ struct UnkPokenavStruct_Sub1 { /*0x5c*/ u8 unk5c[1]; /*0x5d*/ u8 fil5d[4]; /*0x61*/ u8 unk61[5]; + /*0x66*/ s16 unk66[5]; }; struct UnkPokenavStruct_Sub2 { -- cgit v1.2.3 From eb9df8bc6699093ef8f3c9ccb985bec9809910c7 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 29 Jun 2017 21:48:53 -0400 Subject: sub_8136EF0 --- include/pokenav.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/pokenav.h b/include/pokenav.h index 97634955a..70cc4135f 100755 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -19,9 +19,8 @@ struct UnkPokenavStruct_Sub1 { /*0x54*/ u8 unk54; /*0x55*/ u8 unk55; /*0x56*/ u8 unk56; - /*0x57*/ u8 fil57[5]; - /*0x5c*/ u8 unk5c[1]; - /*0x5d*/ u8 fil5d[4]; + /*0x57*/ u8 unk57[5]; + /*0x5c*/ u8 unk5c[5]; /*0x61*/ u8 unk61[5]; /*0x66*/ s16 unk66[5]; }; -- cgit v1.2.3 From fe40c6053622e89dbc0f9e26493946fa098765fb Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 29 Jun 2017 22:06:27 -0400 Subject: sub_8136F74 --- include/pokemon.h | 1 + include/use_pokeblock.h | 1 + 2 files changed, 2 insertions(+) mode change 100644 => 100755 include/pokemon.h (limited to 'include') diff --git a/include/pokemon.h b/include/pokemon.h old mode 100644 new mode 100755 index be8e4e56d..6fbdb18d3 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -511,5 +511,6 @@ void sub_8040B8C(void); void SetWildMonHeldItem(void); u8 *sub_8040D08(); bool32 sub_8040D3C(u16 species, u8 *name, u8 language); +s8 sub_8040A54(struct Pokemon *, u8); #endif // GUARD_POKEMON_H diff --git a/include/use_pokeblock.h b/include/use_pokeblock.h index 779ba27d1..978476d89 100755 --- a/include/use_pokeblock.h +++ b/include/use_pokeblock.h @@ -6,6 +6,7 @@ #define POKERUBY_USE_POKEBLOCK_H extern void *gUnknown_02030400; +extern s16 gUnknown_02039312; void sub_8136130(struct Pokeblock *, MainCallback); -- cgit v1.2.3