From 15d15f53b5c5ee095762f141167a0921ed9960be Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Sun, 30 May 2021 23:01:08 -0700 Subject: [PATCH 01/33] Moved symbols in unknown_001050 to header file. --- include/unknown_001050.h | 25 +++++++++++++++++++++++++ src/unknown_001050.c | 2 ++ undefined_syms.txt | 15 --------------- 3 files changed, 27 insertions(+), 15 deletions(-) create mode 100644 include/unknown_001050.h diff --git a/include/unknown_001050.h b/include/unknown_001050.h new file mode 100644 index 00000000..87af4f37 --- /dev/null +++ b/include/unknown_001050.h @@ -0,0 +1,25 @@ +#ifndef _UNKNOWN_001050_H_ +#define _UNKNOWN_001050_H_ + +#include "types.h" +#include "audio_internal.h" + +extern ALCSPlayer* gMusicPlayer; +extern ALCSPlayer* gSndFxPlayer; +extern u8 musicRelativeVolume; +extern u8 sfxRelativeVolume; +extern u8 D_800DC640; +extern u8 D_800DC644; +extern s32 D_800DC648; +extern s32 audioPrevCount; +extern f32 D_800DC650; +extern s32 musicVolumeSliderPercentage; +extern s32 D_800DC658; +extern u8 D_800DC65C; +extern u8 D_800DC660; +extern s32 D_800DC664; +extern s32 D_800DC668; +extern s32 D_800DC66C; +extern u8 D_800DC670; + +#endif \ No newline at end of file diff --git a/src/unknown_001050.c b/src/unknown_001050.c index af6dcb31..28246cc9 100644 --- a/src/unknown_001050.c +++ b/src/unknown_001050.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80000450 */ +#include "unknown_001050.h" + #include "types.h" #include "macros.h" diff --git a/undefined_syms.txt b/undefined_syms.txt index 0942d052..44c2d8b6 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -67,21 +67,6 @@ D_800D84C0 = 0x800D84C0; D_800D8590 = 0x800D8590; D_800D9790 = 0x800D9790; D_800DA970 = 0x800DA970; -gMusicPlayer = 0x800DC630; -gSndFxPlayer = 0x800DC634; -musicRelativeVolume = 0x800DC638; -sfxRelativeVolume = 0x800DC63C; -D_800DC640 = 0x800DC640; -D_800DC644 = 0x800DC644; -D_800DC648 = 0x800DC648; -audioPrevCount = 0x800DC64C; -D_800DC650 = 0x800DC650; -musicVolumeSliderPercentage = 0x800DC654; -D_800DC658 = 0x800DC658; -D_800DC65C = 0x800DC65C; -D_800DC660 = 0x800DC660; -D_800DC66C = 0x800DC66C; -D_800DC670 = 0x800DC670; D_800DC680 = 0x800DC680; D_800DC684 = 0x800DC684; D_800DC688 = 0x800DC688; From d962603b94d4170bbfec3e005ddee1850591005e Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Sun, 30 May 2021 23:24:41 -0700 Subject: [PATCH 02/33] Moved symbols in unknown_003260 to header file. --- include/unknown_003260.h | 48 ++++++++++++++++++++++++++++++++++++++++ src/unknown_003260.c | 22 ++---------------- undefined_syms.txt | 15 ------------- 3 files changed, 50 insertions(+), 35 deletions(-) create mode 100644 include/unknown_003260.h diff --git a/include/unknown_003260.h b/include/unknown_003260.h new file mode 100644 index 00000000..c322fff9 --- /dev/null +++ b/include/unknown_003260.h @@ -0,0 +1,48 @@ +#ifndef _UNKNOWN_003260_H_ +#define _UNKNOWN_003260_H_ + +#include "types.h" +#include "audio_internal.h" + +typedef struct unk800DC6BC_40 { + ALLink node; + u8 pad0C[0x38]; +} unk800DC6BC_40; //ALSoundState + +/* Unknown Size */ +typedef struct unk800DC6BC { + ALPlayer node; + ALEventQueue evtq; + ALEvent nextEvent; + ALSynth *drvr; + u32 unk3C; + unk800DC6BC_40 *unk40; + s32 unk44; + s32 unk48; + s32 frameTime; + ALMicroTime nextDelta; + ALMicroTime curTime; +} unk800DC6BC; //ALSndPlayer + +extern s32 D_800DC680; +extern s32 D_800DC684; +extern s32 D_800DC688; +extern s32 D_800DC68C; +extern s32 D_800DC690; +extern s32 D_800DC694; +extern s32 D_800DC698; +extern s32 D_800DC69C; +extern s32 D_800DC6A0; +extern s32 D_800DC6A4; +extern s32 D_800DC6A8; +extern s32 D_800DC6AC; + +extern s32 D_800DC6B0; +extern s32 D_800DC6B4; +extern unk800DC6BC_40* D_800DC6B8; +extern unk800DC6BC* gAlSndPlayer; + +extern s32 sfxVolumeSlider; +extern s32 D_800DC6C4; + +#endif \ No newline at end of file diff --git a/src/unknown_003260.c b/src/unknown_003260.c index dbfc6a6b..6d25f8c4 100644 --- a/src/unknown_003260.c +++ b/src/unknown_003260.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80002660 */ +#include "unknown_003260.h" + #include "types.h" #include "macros.h" #include "audio_internal.h" @@ -19,11 +21,6 @@ extern void func_80002A98(void*); extern u32 D_80003008; -typedef struct unk800DC6BC_40 { - ALLink node; - u8 pad0C[0x38]; -} unk800DC6BC_40; //ALSoundState - typedef union { ALEvent msg; @@ -35,21 +32,6 @@ typedef union { }ALSndpEvent; -/* Unknown Size */ -typedef struct unk800DC6BC { - ALPlayer node; - ALEventQueue evtq; - ALEvent nextEvent; - ALSynth *drvr; - u32 unk3C; - unk800DC6BC_40 *unk40; - s32 unk44; - s32 unk48; - s32 frameTime; - ALMicroTime nextDelta; - ALMicroTime curTime; -} unk800DC6BC; //ALSndPlayer - typedef struct unk80119240 { ALLink node; diff --git a/undefined_syms.txt b/undefined_syms.txt index 44c2d8b6..c4f1e363 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -67,21 +67,6 @@ D_800D84C0 = 0x800D84C0; D_800D8590 = 0x800D8590; D_800D9790 = 0x800D9790; D_800DA970 = 0x800DA970; -D_800DC680 = 0x800DC680; -D_800DC684 = 0x800DC684; -D_800DC688 = 0x800DC688; -D_800DC68C = 0x800DC68C; -D_800DC690 = 0x800DC690; -D_800DC694 = 0x800DC694; -D_800DC698 = 0x800DC698; -D_800DC69C = 0x800DC69C; -D_800DC6A0 = 0x800DC6A0; -D_800DC6B0 = 0x800DC6B0; -D_800DC6B4 = 0x800DC6B4; -D_800DC6B8 = 0x800DC6B8; -gAlSndPlayer = 0x800DC6BC; -sfxVolumeSlider = 0x800DC6C0; -D_800DC6C4 = 0x800DC6C4; D_800DC6D0 = 0x800DC6D0; D_800DC6D4 = 0x800DC6D4; D_800DC6D8 = 0x800DC6D8; From 9df03620a84dc48ef697af54b2d7566a2b491f1d Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Sun, 30 May 2021 23:37:09 -0700 Subject: [PATCH 03/33] Moved symbols in unknown_005740 to header file. --- include/unknown_005740.h | 12 ++++++++++++ src/unknown_005740.c | 2 ++ undefined_syms.txt | 4 ---- 3 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 include/unknown_005740.h diff --git a/include/unknown_005740.h b/include/unknown_005740.h new file mode 100644 index 00000000..98edf833 --- /dev/null +++ b/include/unknown_005740.h @@ -0,0 +1,12 @@ +#ifndef _UNKNOWN_005740_H_ +#define _UNKNOWN_005740_H_ + +#include "types.h" + +extern s8 D_800DC6D0; +extern s32 D_800DC6D4; +extern s32 D_800DC6D8; +extern s32 D_800DC6DC; +extern s32 D_800DC6E0; + +#endif \ No newline at end of file diff --git a/src/unknown_005740.c b/src/unknown_005740.c index 94aecce3..73da5f9d 100644 --- a/src/unknown_005740.c +++ b/src/unknown_005740.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80004B40 */ +#include "unknown_005740.h" + #include "types.h" #include "macros.h" diff --git a/undefined_syms.txt b/undefined_syms.txt index c4f1e363..7b07c24e 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -67,10 +67,6 @@ D_800D84C0 = 0x800D84C0; D_800D8590 = 0x800D8590; D_800D9790 = 0x800D9790; D_800DA970 = 0x800DA970; -D_800DC6D0 = 0x800DC6D0; -D_800DC6D4 = 0x800DC6D4; -D_800DC6D8 = 0x800DC6D8; -D_800DC6E0 = 0x800DC6E0; D_800DC6F0 = 0x800DC6F0; D_800DC6F8 = 0x800DC6F8; D_800DC700 = 0x800DC700; From 8ebeee699651bd1e657d5d9d93ed1f660e0e00cf Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Mon, 31 May 2021 15:55:39 -0700 Subject: [PATCH 04/33] Moved symbols in unknown_00BC20 to header file. --- include/unknown_00BC20.h | 65 ++++++++++++++++++++++++++++++++++++++++ src/unknown_00BC20.c | 12 ++------ undefined_syms.txt | 30 ------------------- 3 files changed, 67 insertions(+), 40 deletions(-) create mode 100644 include/unknown_00BC20.h diff --git a/include/unknown_00BC20.h b/include/unknown_00BC20.h new file mode 100644 index 00000000..8c450d30 --- /dev/null +++ b/include/unknown_00BC20.h @@ -0,0 +1,65 @@ +#ifndef _UNKNOWN_00BC20_H_ +#define _UNKNOWN_00BC20_H_ + +#include "types.h" + +/* Size: 0x8 bytes */ +typedef struct unknown800DC6F0 { + union { + s8 unk00; + s32 dummy_force_alignment; // Not sure of a better way to do this. + }; + u16 unk04; + u16 unk06; +} unknown800DC6F0; + +extern unknown800DC6F0 D_800DC6F0; +extern unknown800DC6F0 D_800DC6F8; + +extern s32 D_800DC700; +extern s32 D_800DC704; +extern s16 D_800DC708; +extern s32 D_800DC70C; +extern s16 D_800DC710; +extern s32 D_800DC714; +extern s32 D_800DC718; +extern s8 D_800DC71C; +extern s32 D_800DC720; +extern s16 D_800DC724; +extern s16 D_800DC728; +extern s16 D_800DC72C; +extern u8 D_800DC730; +extern s32 D_800DC734; +extern u8 D_800DC738; +extern s8 D_800DC73C; +extern s8 D_800DC740; +extern s8 D_800DC744; +extern s8 D_800DC748; +extern s32 D_800DC74C; +extern s32 D_800DC750; +extern s32 D_800DC754; +extern s32 D_800DC758; +extern s32 D_800DC75C; +extern s32 D_800DC760; +extern s32 D_800DC764; +extern s32 D_800DC768; + +extern f32 D_800DC76C[15]; + +extern u16 D_800DC7A8[8]; + +extern s16 D_800DC7B8[52]; + +extern s16 D_800DC820[16]; + +extern s8 D_800DC840[8]; + +extern s8 D_800DC848; +extern s32 D_800DC84C[3]; +extern s32 D_800DC858; +extern s32 D_800DC85C; + +extern u8 D_800DC860; +extern u16 D_800DC864; + +#endif \ No newline at end of file diff --git a/src/unknown_00BC20.c b/src/unknown_00BC20.c index 71c775ed..d447acfe 100644 --- a/src/unknown_00BC20.c +++ b/src/unknown_00BC20.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x8000B020 */ +#include "unknown_00BC20.h" + #include "types.h" #include "macros.h" #include "structs.h" @@ -9,16 +11,6 @@ /************ .data ************/ -/* Size: 0x8 bytes */ -typedef struct unknown800DC6F0 { - union { - s8 unk00; - s32 dummy_force_alignment; // Not sure of a better way to do this. - }; - u16 unk04; - u16 unk06; -} unknown800DC6F0; - unknown800DC6F0 D_800DC6F0 = { -128, 0x1E, 0x0F }; unknown800DC6F0 D_800DC6F8 = { 3, 0x1E, 0x0F }; diff --git a/undefined_syms.txt b/undefined_syms.txt index 7b07c24e..a2a11ac3 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -67,36 +67,6 @@ D_800D84C0 = 0x800D84C0; D_800D8590 = 0x800D8590; D_800D9790 = 0x800D9790; D_800DA970 = 0x800DA970; -D_800DC6F0 = 0x800DC6F0; -D_800DC6F8 = 0x800DC6F8; -D_800DC700 = 0x800DC700; -D_800DC708 = 0x800DC708; -D_800DC718 = 0x800DC718; -D_800DC71C = 0x800DC71C; -D_800DC720 = 0x800DC720; -D_800DC724 = 0x800DC724; -D_800DC728 = 0x800DC728; -D_800DC72C = 0x800DC72C; -D_800DC730 = 0x800DC730; -D_800DC734 = 0x800DC734; -D_800DC738 = 0x800DC738; -D_800DC73C = 0x800DC73C; -D_800DC740 = 0x800DC740; -D_800DC744 = 0x800DC744; -D_800DC748 = 0x800DC748; -D_800DC74C = 0x800DC74C; -D_800DC754 = 0x800DC754; -D_800DC75C = 0x800DC75C; -D_800DC760 = 0x800DC760; -D_800DC764 = 0x800DC764; -D_800DC768 = 0x800DC768; -D_800DC7A8 = 0x800DC7A8; -D_800DC7B8 = 0x800DC7B8; -D_800DC820 = 0x800DC820; -D_800DC840 = 0x800DC840; -D_800DC848 = 0x800DC848; -D_800DC858 = 0x800DC858; -D_800DC860 = 0x800DC860; D_800DC874 = 0x800DC874; D_800DC87C = 0x800DC87C; D_800DC884 = 0x800DC884; From 0bd2e10e3eb81dabe3bf72bb7610357b2f61e960 Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Tue, 1 Jun 2021 20:20:33 -0700 Subject: [PATCH 05/33] Moved symbols in unknown_0255E0 to header file. --- include/unknown_0255E0.h | 82 ++++++++++++++++++++++++++++++++++++++++ src/unknown_0255E0.c | 60 +---------------------------- undefined_syms.txt | 8 ---- 3 files changed, 84 insertions(+), 66 deletions(-) create mode 100644 include/unknown_0255E0.h diff --git a/include/unknown_0255E0.h b/include/unknown_0255E0.h new file mode 100644 index 00000000..21d9402c --- /dev/null +++ b/include/unknown_0255E0.h @@ -0,0 +1,82 @@ +#ifndef _UNKNOWN_0255E0_H_ +#define _UNKNOWN_0255E0_H_ + +#include "types.h" +#include "structs.h" + +/* Size: 0x8 bytes */ +typedef struct unknown800DC874 { + union { + s8 unk00; + s32 dummy_force_alignment; // Not sure of a better way to do this. + }; + u16 unk04; + s16 unk06; +} unknown800DC874; + +extern s32 D_800DC870; +extern unknown800DC874 D_800DC874; +extern unknown800DC874 D_800DC87C; + +extern f32 D_800DC884[10]; + +extern f32 D_800DC8AC[27]; + +typedef struct{ + u8 pad00[0x12]; + u16 unk12; + u16 unk14; +} unk800DC918_00_00; + +typedef struct{ + unk800DC918_00_00 *unk00; + u8 pad00[0x04]; +} unk800DC918_00; + +typedef struct{ + u8 unk00; + u8 pad01[0x05]; + u8 unk06; + u8 unk07; + u32 unk08; +} unk800DC918_04_0C; + +typedef struct{ + u8 pad00[0x0C]; + unk800DC918_04_0C* unk0C; + u8 pad0C[0x10]; + s16 unk20; + u8 pad22[0x09]; + s8 unk2B; + u8 pad2C[0x14]; + u8 unk40; + u8 pad41[0x3]; +} unk800DC918_04; + +typedef struct{ + s16 unk00; //sx + s16 unk02; //sy + s16 unk04; //sz + s16 unk06; //lx + s16 unk08; //ly + s16 unk0A; //lz +} unk800DC918_08; //bounding box + +typedef struct{ + unk800DC918_00 *unk00; + unk800DC918_04 *unk04; + unk800DC918_08 *unk08; + u8 pad0C[0x0E]; + s16 count; +} unk800DC918; + +extern unk800DC918* D_800DC918; +extern LevelHeader *D_800DC91C; + +extern s32 D_800DC920; +extern s32 D_800DC924; +extern s32 D_800DC928; + +extern s8 D_800DC92C[24]; + +#endif \ No newline at end of file diff --git a/src/unknown_0255E0.c b/src/unknown_0255E0.c index 20efb5c5..4a3a0808 100644 --- a/src/unknown_0255E0.c +++ b/src/unknown_0255E0.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x800249E0 */ +#include "unknown_0255E0.h" + #include "types.h" #include "macros.h" #include "structs.h" @@ -31,16 +33,6 @@ typedef struct unk80120AC0 { /************ .data ************/ -/* Size: 0x8 bytes */ -typedef struct unknown800DC874 { - union { - s8 unk00; - s32 dummy_force_alignment; // Not sure of a better way to do this. - }; - u16 unk04; - s16 unk06; -} unknown800DC874; - s32 D_800DC870 = 0; // Currently unknown, might be a different type. unknown800DC874 D_800DC874 = { -128, 40, -1 }; unknown800DC874 D_800DC87C = { -125, 70, -1 }; @@ -60,54 +52,6 @@ f32 D_800DC8AC[27] = { -130.0f, 60.0f, -68.0f }; -typedef struct{ - u8 pad00[0x12]; - u16 unk12; - u16 unk14; -} unk800DC918_00_00; - -typedef struct{ - unk800DC918_00_00 *unk00; - u8 pad00[0x04]; -} unk800DC918_00; - -typedef struct{ - u8 unk00; - u8 pad01[0x05]; - u8 unk06; - u8 unk07; - u32 unk08; -} unk800DC918_04_0C; - -typedef struct{ - u8 pad00[0x0C]; - unk800DC918_04_0C* unk0C; - u8 pad0C[0x10]; - s16 unk20; - u8 pad22[0x09]; - s8 unk2B; - u8 pad2C[0x14]; - u8 unk40; - u8 pad41[0x3]; -} unk800DC918_04; - -typedef struct{ - s16 unk00; //sx - s16 unk02; //sy - s16 unk04; //sz - s16 unk06; //lx - s16 unk08; //ly - s16 unk0A; //lz -} unk800DC918_08; //bounding box - -typedef struct{ - unk800DC918_00 *unk00; - unk800DC918_04 *unk04; - unk800DC918_08 *unk08; - u8 pad0C[0x0E]; - s16 count; -} unk800DC918; - unk800DC918* D_800DC918 = NULL; LevelHeader *D_800DC91C = NULL; diff --git a/undefined_syms.txt b/undefined_syms.txt index a2a11ac3..33dd0daa 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -67,14 +67,6 @@ D_800D84C0 = 0x800D84C0; D_800D8590 = 0x800D8590; D_800D9790 = 0x800D9790; D_800DA970 = 0x800DA970; -D_800DC874 = 0x800DC874; -D_800DC87C = 0x800DC87C; -D_800DC884 = 0x800DC884; -D_800DC8AC = 0x800DC8AC; -D_800DC918 = 0x800DC918; -D_800DC91C = 0x800DC91C; -D_800DC924 = 0x800DC924; -D_800DC92C = 0x800DC92C; D_800DC950 = 0x800DC950; D_800DC954 = 0x800DC954; D_800DC958 = 0x800DC958; From eef131a8c0c35ccf3e0c666b1f8b6aadca7eb44a Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Wed, 2 Jun 2021 18:25:18 -0700 Subject: [PATCH 06/33] Moved symbols in unknown_032760 to header file. --- include/unknown_032760.h | 32 ++++++++++++++++++++++++++++++++ src/unknown_032760.c | 10 ++++++---- undefined_syms.txt | 22 ---------------------- 3 files changed, 38 insertions(+), 26 deletions(-) create mode 100644 include/unknown_032760.h diff --git a/include/unknown_032760.h b/include/unknown_032760.h new file mode 100644 index 00000000..92e932d4 --- /dev/null +++ b/include/unknown_032760.h @@ -0,0 +1,32 @@ +#ifndef _UNKNOWN_032760_H_ +#define _UNKNOWN_032760_H_ + +#include "types.h" + +extern s32 D_800DC950; +extern s32 D_800DC954; +extern s32 D_800DC958; +extern s32 D_800DC95C; +extern s32 D_800DC960; +extern s32 D_800DC964; +extern s32 D_800DC968; +extern s32 D_800DC96C; + +// Unsure about the signed/unsigned with these arrays. +extern u16 D_800DC970[4]; +extern u16 D_800DC978[4]; +extern u16 D_800DC980[20]; +extern u16 D_800DC9A8[20]; +extern u16 D_800DC9D0[64]; +extern s8 D_800DCA50[8]; +extern u8 D_800DCA58[9]; +extern s8 D_800DCA64[9]; +extern s8 D_800DCA70[10]; +extern s32 D_800DCA7C[3]; +extern s32 D_800DCA88[3]; +extern s8 D_800DCA94[8]; +extern s8 D_800DCA9C[12]; +extern u16 D_800DCAA8[64]; +extern u16 D_800DCB28[20]; + +#endif \ No newline at end of file diff --git a/src/unknown_032760.c b/src/unknown_032760.c index 8b09eb9b..0d29386b 100644 --- a/src/unknown_032760.c +++ b/src/unknown_032760.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80031B60 */ +#include "unknown_032760.h" + #include "types.h" #include "macros.h" #include "structs.h" @@ -73,11 +75,11 @@ s32 D_800DCA7C[3] = { // Not sure about typing s32 D_800DCA88[3] = { // Not sure about typing 0, 0, 0 }; -s8 D_800DCA94[16] = { - 0x00, 0x00, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00 +s8 D_800DCA94[8] = { + 0x00, 0x00, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00 }; -s8 D_800DCA9C[4] = { +s8 D_800DCA9C[12] = { + 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; u16 D_800DCAA8[64] = { diff --git a/undefined_syms.txt b/undefined_syms.txt index 33dd0daa..038afb66 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -67,28 +67,6 @@ D_800D84C0 = 0x800D84C0; D_800D8590 = 0x800D8590; D_800D9790 = 0x800D9790; D_800DA970 = 0x800DA970; -D_800DC950 = 0x800DC950; -D_800DC954 = 0x800DC954; -D_800DC958 = 0x800DC958; -D_800DC95C = 0x800DC95C; -D_800DC960 = 0x800DC960; -D_800DC964 = 0x800DC964; -D_800DC968 = 0x800DC968; -D_800DC970 = 0x800DC970; -D_800DC978 = 0x800DC978; -D_800DC980 = 0x800DC980; -D_800DC9A8 = 0x800DC9A8; -D_800DC9D0 = 0x800DC9D0; -D_800DCA50 = 0x800DCA50; -D_800DCA58 = 0x800DCA58; -D_800DCA64 = 0x800DCA64; -D_800DCA70 = 0x800DCA70; -D_800DCA7C = 0x800DCA7C; -D_800DCA88 = 0x800DCA88; -D_800DCA94 = 0x800DCA94; -D_800DCA9C = 0x800DCA9C; -D_800DCAA8 = 0x800DCAA8; -D_800DCB28 = 0x800DCB28; D_800DCB50 = 0x800DCB50; D_800DCB54 = 0x800DCB54; D_800DCB98 = 0x800DCB98; From e4914e3cd35fbfa538b82b669f338e33f33fb5c5 Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Wed, 2 Jun 2021 18:44:09 -0700 Subject: [PATCH 07/33] Moved symbols in unknown_043920 to header file. --- include/unknown_043920.h | 46 ++++++++++++++++++++++++++++++++++++++++ src/unknown_043920.c | 32 +++++++++++----------------- undefined_syms.txt | 16 -------------- 3 files changed, 58 insertions(+), 36 deletions(-) create mode 100644 include/unknown_043920.h diff --git a/include/unknown_043920.h b/include/unknown_043920.h new file mode 100644 index 00000000..a6f5bc06 --- /dev/null +++ b/include/unknown_043920.h @@ -0,0 +1,46 @@ +#ifndef _UNKNOWN_043920_H_ +#define _UNKNOWN_043920_H_ + +#include "types.h" + +extern s32 D_800DCB50; +extern s16 D_800DCB54; +extern s32 D_800DCB58; +extern s32 D_800DCB5C; + +// Not sure if D_800DCB58 & D_800DCB5C are actually a part of this array. +extern f32 D_800DCB60[14]; + +extern s32 D_800DCB98; +extern f32 D_800DCB9C[19]; + +extern f32 D_800DCBE8[19]; + +// Unused? Not sure if this is actually an array or just some random data. +extern s32 D_800DCC34[19]; + +extern s32 D_800DCC80[19]; + +extern u16 D_800DCCCC[20]; + +// Used for some sort of bit mask +extern s32 D_800DCCF4[19]; + +// Used for some sort of bit mask +extern s32 D_800DCD40[20]; + +extern s8 D_800DCD90[15]; + +// Unused? +extern s8 D_800DCDA0[8]; + +extern s8 D_800DCDA8[8]; + +// Unused? +extern s16 D_800DCDB0[16]; + +extern s32 D_800DCDD0; + +extern s16 D_800DCDD4[4]; + +#endif \ No newline at end of file diff --git a/src/unknown_043920.c b/src/unknown_043920.c index 38febf2c..b14bacc3 100644 --- a/src/unknown_043920.c +++ b/src/unknown_043920.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80042D20 */ +#include "unknown_043920.h" + #include "types.h" #include "macros.h" #include "structs.h" @@ -51,36 +53,26 @@ s32 D_800DCC80[19] = { 0, 0, 0 }; -// Unused? -s16 D_800DCCB4[6] = { +u16 D_800DCCCC[20] = { 0x010C, 0x010B, 0x0009, 0x010C, - 0x010C, 0x010C -}; - -u16 D_800DCCCC[14] = { 0x010C, 0x010C, 0x010C, 0x010C, - 0x010C, 0x0005, 0x010C, 0x010C, + 0x010C, 0x010C, 0x010C, 0x0005, 0x010C, 0x010C, 0x010C, 0x010C, - 0x010C, 0x0000 -}; - -// Unused? Not sure if this is actually an array or just some random data. -s32 D_800DCCDC[2] = { - 1, 4 + 0x010C, 0x010C, 0x010C, 0x0000 }; // Used for some sort of bit mask s32 D_800DCCF4[19] = { - 16, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 0x100, 1, 1, 1, 1, - 1, 0, 4 + 1, 4, 16, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 0x100, 1, 1, + 1, 1, 1 }; // Used for some sort of bit mask -s32 D_800DCD40[18] = { - 16, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0x100, 0, 0, 0, 0, - 0, 0 +s32 D_800DCD40[20] = { + 0, 4, 16, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0x100, 0, 0, + 0, 0, 0, 0 }; s8 D_800DCD90[15] = { diff --git a/undefined_syms.txt b/undefined_syms.txt index 038afb66..06051613 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -67,22 +67,6 @@ D_800D84C0 = 0x800D84C0; D_800D8590 = 0x800D8590; D_800D9790 = 0x800D9790; D_800DA970 = 0x800DA970; -D_800DCB50 = 0x800DCB50; -D_800DCB54 = 0x800DCB54; -D_800DCB98 = 0x800DCB98; -D_800DCB9C = 0x800DCB9C; -D_800DCBE8 = 0x800DCBE8; -D_800DCC34 = 0x800DCC34; -D_800DCC80 = 0x800DCC80; -D_800DCCCC = 0x800DCCCC; -D_800DCCF4 = 0x800DCCF4; -D_800DCD40 = 0x800DCD40; -D_800DCD90 = 0x800DCD90; -D_800DCDA0 = 0x800DCDA0; -D_800DCDA8 = 0x800DCDA8; -D_800DCDB0 = 0x800DCDB0; -D_800DCDD0 = 0x800DCDD0; -D_800DCDD4 = 0x800DCDD4; D_800DCDE0 = 0x800DCDE0; D_800DCE00 = 0x800DCE00; D_800DCE20 = 0x800DCE20; From 78587fa44cab72393f727f63ecd75fe10208d384 Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Wed, 2 Jun 2021 19:04:55 -0700 Subject: [PATCH 08/33] Moved symbols in unknown_05CEF0 to header file. --- include/unknown_05CEF0.h | 8 ++++++++ src/unknown_05CEF0.c | 2 ++ undefined_syms.txt | 1 - 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 include/unknown_05CEF0.h diff --git a/include/unknown_05CEF0.h b/include/unknown_05CEF0.h new file mode 100644 index 00000000..5588c183 --- /dev/null +++ b/include/unknown_05CEF0.h @@ -0,0 +1,8 @@ +#ifndef _UNKNOWN_05CEF0_H_ +#define _UNKNOWN_05CEF0_H_ + +#include "types.h" + +extern s16 D_800DCDE0[16]; + +#endif \ No newline at end of file diff --git a/src/unknown_05CEF0.c b/src/unknown_05CEF0.c index d9f998b9..35d56ac7 100644 --- a/src/unknown_05CEF0.c +++ b/src/unknown_05CEF0.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x8005C2F0 */ +#include "unknown_05CEF0.h" + #include "types.h" #include "macros.h" diff --git a/undefined_syms.txt b/undefined_syms.txt index 06051613..b170f794 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -67,7 +67,6 @@ D_800D84C0 = 0x800D84C0; D_800D8590 = 0x800D8590; D_800D9790 = 0x800D9790; D_800DA970 = 0x800DA970; -D_800DCDE0 = 0x800DCDE0; D_800DCE00 = 0x800DCE00; D_800DCE20 = 0x800DCE20; D_800DCE40 = 0x800DCE40; From adb2e87ebe1b01a843349d3620d7b249779c4ff3 Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Wed, 2 Jun 2021 19:07:04 -0700 Subject: [PATCH 09/33] Moved symbols in unknown_05DCD0 to header file. --- include/unknown_05DCD0.h | 9 +++++++++ src/unknown_05DCD0.c | 2 ++ undefined_syms.txt | 2 -- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 include/unknown_05DCD0.h diff --git a/include/unknown_05DCD0.h b/include/unknown_05DCD0.h new file mode 100644 index 00000000..faa71f5f --- /dev/null +++ b/include/unknown_05DCD0.h @@ -0,0 +1,9 @@ +#ifndef _UNKNOWN_05DCD0_H_ +#define _UNKNOWN_05DCD0_H_ + +#include "types.h" + +extern s16 D_800DCE00[16]; +extern s16 D_800DCE20[16]; + +#endif \ No newline at end of file diff --git a/src/unknown_05DCD0.c b/src/unknown_05DCD0.c index 64c60118..8a9bc51d 100644 --- a/src/unknown_05DCD0.c +++ b/src/unknown_05DCD0.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x8005D0D0 */ +#include "unknown_05DCD0.h" + #include "types.h" #include "macros.h" diff --git a/undefined_syms.txt b/undefined_syms.txt index b170f794..f2499131 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -67,8 +67,6 @@ D_800D84C0 = 0x800D84C0; D_800D8590 = 0x800D8590; D_800D9790 = 0x800D9790; D_800DA970 = 0x800DA970; -D_800DCE00 = 0x800DCE00; -D_800DCE20 = 0x800DCE20; D_800DCE40 = 0x800DCE40; D_800DCE60 = 0x800DCE60; D_800DCE80 = 0x800DCE80; From c3df78cc8b438bdd2a740d2b287efa57408cb250 Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Wed, 2 Jun 2021 19:14:59 -0700 Subject: [PATCH 10/33] Moved symbols in unknown_05F0C0 to header file. --- include/unknown_05F0C0.h | 8 ++++++++ src/unknown_05F0C0.c | 2 ++ undefined_syms.txt | 1 - 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 include/unknown_05F0C0.h diff --git a/include/unknown_05F0C0.h b/include/unknown_05F0C0.h new file mode 100644 index 00000000..c1913d7c --- /dev/null +++ b/include/unknown_05F0C0.h @@ -0,0 +1,8 @@ +#ifndef _UNKNOWN_05F0C0_H_ +#define _UNKNOWN_05F0C0_H_ + +#include "types.h" + +extern s16 D_800DCE40[16]; + +#endif \ No newline at end of file diff --git a/src/unknown_05F0C0.c b/src/unknown_05F0C0.c index 09ce122c..65b25ea5 100644 --- a/src/unknown_05F0C0.c +++ b/src/unknown_05F0C0.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x8005E4C0 */ +#include "unknown_05F0C0.h" + #include "types.h" #include "macros.h" diff --git a/undefined_syms.txt b/undefined_syms.txt index f2499131..7e82b146 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -67,7 +67,6 @@ D_800D84C0 = 0x800D84C0; D_800D8590 = 0x800D8590; D_800D9790 = 0x800D9790; D_800DA970 = 0x800DA970; -D_800DCE40 = 0x800DCE40; D_800DCE60 = 0x800DCE60; D_800DCE80 = 0x800DCE80; D_800DCEA0 = 0x800DCEA0; From f87dcd5e36c4480a17a848f342c5965c7f722f74 Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Wed, 2 Jun 2021 19:35:49 -0700 Subject: [PATCH 11/33] Moved symbols in unknown_05F690 to header file. --- include/unknown_05F690.h | 11 +++++++++++ src/unknown_05F690.c | 2 ++ undefined_syms.txt | 4 ---- 3 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 include/unknown_05F690.h diff --git a/include/unknown_05F690.h b/include/unknown_05F690.h new file mode 100644 index 00000000..11ed8812 --- /dev/null +++ b/include/unknown_05F690.h @@ -0,0 +1,11 @@ +#ifndef _UNKNOWN_05F690_H_ +#define _UNKNOWN_05F690_H_ + +#include "types.h" + +extern s16 D_800DCE60[16]; +extern s16 D_800DCE80[16]; +extern s32 D_800DCEA0; +extern s32 D_800DCEA4; + +#endif \ No newline at end of file diff --git a/src/unknown_05F690.c b/src/unknown_05F690.c index 5d67e307..769937b4 100644 --- a/src/unknown_05F690.c +++ b/src/unknown_05F690.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x8005EA90 */ +#include "unknown_05F690.h" + #include "types.h" #include "macros.h" diff --git a/undefined_syms.txt b/undefined_syms.txt index 7e82b146..8c09c1f4 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -67,10 +67,6 @@ D_800D84C0 = 0x800D84C0; D_800D8590 = 0x800D8590; D_800D9790 = 0x800D9790; D_800DA970 = 0x800DA970; -D_800DCE60 = 0x800DCE60; -D_800DCE80 = 0x800DCE80; -D_800DCEA0 = 0x800DCEA0; -D_800DCEA4 = 0x800DCEA4; D_800DCEB0 = 0x800DCEB0; D_800DCEC0 = 0x800DCEC0; D_800DCF28 = 0x800DCF28; From 0194c289244c9d2a04bad055efaf14c2174b4019 Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Wed, 2 Jun 2021 19:37:48 -0700 Subject: [PATCH 12/33] Moved symbols in unknown_061D30 to header file. --- include/unknown_061D30.h | 4 ++++ src/unknown_061D30.c | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 include/unknown_061D30.h diff --git a/include/unknown_061D30.h b/include/unknown_061D30.h new file mode 100644 index 00000000..935df3f2 --- /dev/null +++ b/include/unknown_061D30.h @@ -0,0 +1,4 @@ +#ifndef _UNKNOWN_061D30_H_ +#define _UNKNOWN_061D30_H_ + +#endif \ No newline at end of file diff --git a/src/unknown_061D30.c b/src/unknown_061D30.c index 2268bc29..8005dfd7 100644 --- a/src/unknown_061D30.c +++ b/src/unknown_061D30.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80062290 */ +#include "unknown_061D30.h" + #include "types.h" #include "macros.h" From 87db863316760793a96740f96cc16b676690ec30 Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Wed, 2 Jun 2021 19:40:42 -0700 Subject: [PATCH 13/33] Moved symbols in unknown_064690 to header file. --- include/unknown_064690.h | 4 ++++ src/unknown_064690.c | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 include/unknown_064690.h diff --git a/include/unknown_064690.h b/include/unknown_064690.h new file mode 100644 index 00000000..0477abc7 --- /dev/null +++ b/include/unknown_064690.h @@ -0,0 +1,4 @@ +#ifndef _UNKNOWN_064690_H_ +#define _UNKNOWN_064690_H_ + +#endif \ No newline at end of file diff --git a/src/unknown_064690.c b/src/unknown_064690.c index f7fcb336..b5e3a0f9 100644 --- a/src/unknown_064690.c +++ b/src/unknown_064690.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80063A90 */ +#include "unknown_064690.h" + #include "types.h" #include "macros.h" From a50916e56ab3047d99c2d9509f4a31740575d667 Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Wed, 2 Jun 2021 19:42:48 -0700 Subject: [PATCH 14/33] Moved symbols in unknown_0646F0 to header file. --- include/unknown_0646F0.h | 4 ++++ src/unknown_0646F0.c | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 include/unknown_0646F0.h diff --git a/include/unknown_0646F0.h b/include/unknown_0646F0.h new file mode 100644 index 00000000..98b804d7 --- /dev/null +++ b/include/unknown_0646F0.h @@ -0,0 +1,4 @@ +#ifndef _UNKNOWN_0646F0_H_ +#define _UNKNOWN_0646F0_H_ + +#endif \ No newline at end of file diff --git a/src/unknown_0646F0.c b/src/unknown_0646F0.c index f3a41dc8..cc9fe5a1 100644 --- a/src/unknown_0646F0.c +++ b/src/unknown_0646F0.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80063AF0 */ +#include "unknown_0646F0.h" + #include "types.h" #include "macros.h" From ffadce021f9f254399038860dc13e7393a33ce50 Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Wed, 2 Jun 2021 19:44:28 -0700 Subject: [PATCH 15/33] Moved symbols in unknown_0647A0 to header file. --- include/unknown_0647A0.h | 4 ++++ src/unknown_0647A0.c | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 include/unknown_0647A0.h diff --git a/include/unknown_0647A0.h b/include/unknown_0647A0.h new file mode 100644 index 00000000..612b7f25 --- /dev/null +++ b/include/unknown_0647A0.h @@ -0,0 +1,4 @@ +#ifndef _UNKNOWN_0647A0_H_ +#define _UNKNOWN_0647A0_H_ + +#endif \ No newline at end of file diff --git a/src/unknown_0647A0.c b/src/unknown_0647A0.c index 6fc01d22..76c8aa95 100644 --- a/src/unknown_0647A0.c +++ b/src/unknown_0647A0.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80063BA0 */ +#include "unknown_0647A0.h" + #include "types.h" #include "macros.h" From e5fa7ef22bd0bc3482fdc977e1879e502a02dbc0 Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Wed, 2 Jun 2021 19:46:46 -0700 Subject: [PATCH 16/33] Moved symbols in unknown_064800 to header file. --- include/unknown_064800.h | 4 ++++ src/unknown_064800.c | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 include/unknown_064800.h diff --git a/include/unknown_064800.h b/include/unknown_064800.h new file mode 100644 index 00000000..96e628b1 --- /dev/null +++ b/include/unknown_064800.h @@ -0,0 +1,4 @@ +#ifndef _UNKNOWN_064800_H_ +#define _UNKNOWN_064800_H_ + +#endif \ No newline at end of file diff --git a/src/unknown_064800.c b/src/unknown_064800.c index 45a5a1ab..78a630af 100644 --- a/src/unknown_064800.c +++ b/src/unknown_064800.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80063C00 */ +#include "unknown_064800.h" + #include "types.h" #include "macros.h" #include "audio_internal.h" From 057b30a3eb742025f5f91f19fc1e1d5ec1ad18e7 Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Wed, 2 Jun 2021 19:49:43 -0700 Subject: [PATCH 17/33] Moved symbols in unknown_064830 to header file. --- include/unknown_064830.h | 29 +++++++++++++++++++++++++++++ src/unknown_064830.c | 2 ++ undefined_syms.txt | 7 ------- 3 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 include/unknown_064830.h diff --git a/include/unknown_064830.h b/include/unknown_064830.h new file mode 100644 index 00000000..8fc2ba1d --- /dev/null +++ b/include/unknown_064830.h @@ -0,0 +1,29 @@ +#ifndef _UNKNOWN_064830_H_ +#define _UNKNOWN_064830_H_ + +#include "types.h" + +extern s8 D_800DCEB0; +extern s32 D_800DCEB4; +extern s32 D_800DCEB8; +extern s32 D_800DCEBC; + +// TODO: Figure out what this actually is. +extern s32 D_800DCEC0[26]; + +// TODO: Figure out what this actually is. +extern s32 D_800DCF28[34]; + +// TODO: Figure out what this actually is. +extern s32 D_800DCFB0[10]; + +// TODO: Figure out what this actually is. +extern s32 D_800DCFD8[10]; + +// TODO: Figure out what this actually is. +extern s32 D_800DD000[10]; + +// TODO: Figure out what this actually is. +extern s32 D_800DD028[10]; + +#endif \ No newline at end of file diff --git a/src/unknown_064830.c b/src/unknown_064830.c index fe1d2ab4..1b73c0b6 100644 --- a/src/unknown_064830.c +++ b/src/unknown_064830.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80063C30 */ +#include "unknown_064830.h" + #include "types.h" #include "macros.h" #include "libultra_internal.h" diff --git a/undefined_syms.txt b/undefined_syms.txt index 8c09c1f4..1cfab9a0 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -67,13 +67,6 @@ D_800D84C0 = 0x800D84C0; D_800D8590 = 0x800D8590; D_800D9790 = 0x800D9790; D_800DA970 = 0x800DA970; -D_800DCEB0 = 0x800DCEB0; -D_800DCEC0 = 0x800DCEC0; -D_800DCF28 = 0x800DCF28; -D_800DCFB0 = 0x800DCFB0; -D_800DCFD8 = 0x800DCFD8; -D_800DD000 = 0x800DD000; -D_800DD028 = 0x800DD028; D_800DD050 = 0x800DD050; D_800DD060 = 0x800DD060; D_800DD064 = 0x800DD064; From 52c4f8f9bf8f2b75177e174738790738113d103c Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Wed, 2 Jun 2021 19:53:00 -0700 Subject: [PATCH 18/33] Moved symbols in unknown_065D30 to header file. --- include/unknown_065D30.h | 4 ++++ src/unknown_065D30.c | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 include/unknown_065D30.h diff --git a/include/unknown_065D30.h b/include/unknown_065D30.h new file mode 100644 index 00000000..727dccc7 --- /dev/null +++ b/include/unknown_065D30.h @@ -0,0 +1,4 @@ +#ifndef _UNKNOWN_065D30_H_ +#define _UNKNOWN_065D30_H_ + +#endif \ No newline at end of file diff --git a/src/unknown_065D30.c b/src/unknown_065D30.c index 7d56eca1..1dae06ef 100644 --- a/src/unknown_065D30.c +++ b/src/unknown_065D30.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80065130 */ +#include "unknown_065D30.h" + #include "types.h" #include "macros.h" From 6881de40eb0847c47e4411060f0d3eb22d004029 Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Wed, 2 Jun 2021 19:54:21 -0700 Subject: [PATCH 19/33] Moved symbols in unknown_066460 to header file. --- include/unknown_066460.h | 4 ++++ src/unknown_066460.c | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 include/unknown_066460.h diff --git a/include/unknown_066460.h b/include/unknown_066460.h new file mode 100644 index 00000000..582be8b7 --- /dev/null +++ b/include/unknown_066460.h @@ -0,0 +1,4 @@ +#ifndef _UNKNOWN_066460_H_ +#define _UNKNOWN_066460_H_ + +#endif \ No newline at end of file diff --git a/src/unknown_066460.c b/src/unknown_066460.c index 36791087..d072d9cf 100644 --- a/src/unknown_066460.c +++ b/src/unknown_066460.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80065860 */ +#include "unknown_066460.h" + #include "types.h" #include "macros.h" #include "audio_internal.h" From 6d7c002a7bc2f7ebe99eae5dbe21090f1c028635 Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Wed, 2 Jun 2021 19:55:38 -0700 Subject: [PATCH 20/33] Moved symbols in unknown_066500 to header file. --- include/unknown_066500.h | 4 ++++ src/unknown_066500.c | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 include/unknown_066500.h diff --git a/include/unknown_066500.h b/include/unknown_066500.h new file mode 100644 index 00000000..1110dd65 --- /dev/null +++ b/include/unknown_066500.h @@ -0,0 +1,4 @@ +#ifndef _UNKNOWN_066500_H_ +#define _UNKNOWN_066500_H_ + +#endif \ No newline at end of file diff --git a/src/unknown_066500.c b/src/unknown_066500.c index a604123d..b111b92a 100644 --- a/src/unknown_066500.c +++ b/src/unknown_066500.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80065900 */ +#include "unknown_066500.h" + #include "types.h" #include "macros.h" From e5ec8b90530336483f1096f5af50771a967d1553 Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Wed, 2 Jun 2021 19:58:17 -0700 Subject: [PATCH 21/33] Moved symbols in unknown_0667D0 to header file. --- include/unknown_0667D0.h | 8 ++++++++ src/unknown_0667D0.c | 2 ++ undefined_syms.txt | 1 - 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 include/unknown_0667D0.h diff --git a/include/unknown_0667D0.h b/include/unknown_0667D0.h new file mode 100644 index 00000000..0eb70020 --- /dev/null +++ b/include/unknown_0667D0.h @@ -0,0 +1,8 @@ +#ifndef _UNKNOWN_066500_H_ +#define _UNKNOWN_066500_H_ + +#include "types.h" + +extern s16 D_800DD050; + +#endif \ No newline at end of file diff --git a/src/unknown_0667D0.c b/src/unknown_0667D0.c index bc589714..8e745fa2 100644 --- a/src/unknown_0667D0.c +++ b/src/unknown_0667D0.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80065BD0 */ +#include "unknown_0667D0.h" + #include "types.h" #include "macros.h" diff --git a/undefined_syms.txt b/undefined_syms.txt index 1cfab9a0..a9c739c0 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -67,7 +67,6 @@ D_800D84C0 = 0x800D84C0; D_800D8590 = 0x800D8590; D_800D9790 = 0x800D9790; D_800DA970 = 0x800DA970; -D_800DD050 = 0x800DD050; D_800DD060 = 0x800DD060; D_800DD064 = 0x800DD064; D_800DD094 = 0x800DD094; From 38b906195ba90f245a712036410d6e12cab485fa Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Sat, 5 Jun 2021 19:13:22 -0700 Subject: [PATCH 22/33] Moved symbols in unknown_066AA0 to header file. --- .../unknown_066AA0/func_80068158.s | 5 +- .../unknown_066AA0/func_800682AC.s | 5 +- .../unknown_066AA0/func_8006C60C.s | 5 +- include/unknown_066AA0.h | 115 ++++++++++++++++++ src/unknown_066AA0.c | 19 +-- undefined_syms.txt | 46 ------- 6 files changed, 126 insertions(+), 69 deletions(-) create mode 100644 include/unknown_066AA0.h diff --git a/asm/non_matchings/unknown_066AA0/func_80068158.s b/asm/non_matchings/unknown_066AA0/func_80068158.s index 504b091c..c674bf82 100644 --- a/asm/non_matchings/unknown_066AA0/func_80068158.s +++ b/asm/non_matchings/unknown_066AA0/func_80068158.s @@ -25,14 +25,15 @@ glabel func_80068158 /* 068DAC 800681AC 00053023 */ negu $a2, $a1 .L800681B0: /* 068DB0 800681B0 8CE50000 */ lw $a1, ($a3) -/* 068DB4 800681B4 3C19800E */ lui $t9, %hi(D_800DD094) # $t9, 0x800e +# Accessing D_800DD064[*].unk30. +/* 068DB4 800681B4 3C19800E */ lui $t9, %hi(D_800DD064) # $t9, 0x800e /* 068DB8 800681B8 0005C080 */ sll $t8, $a1, 2 /* 068DBC 800681BC 0305C023 */ subu $t8, $t8, $a1 /* 068DC0 800681C0 0018C080 */ sll $t8, $t8, 2 /* 068DC4 800681C4 0305C021 */ addu $t8, $t8, $a1 /* 068DC8 800681C8 0018C080 */ sll $t8, $t8, 2 /* 068DCC 800681CC 0338C821 */ addu $t9, $t9, $t8 -/* 068DD0 800681D0 8F39D094 */ lw $t9, %lo(D_800DD094)($t9) +/* 068DD0 800681D0 8F39D094 */ lw $t9, -0x2f6c($t9) /* 068DD4 800681D4 3C0A800E */ lui $t2, %hi(D_800DD148) # $t2, 0x800e /* 068DD8 800681D8 332B0001 */ andi $t3, $t9, 1 /* 068DDC 800681DC 1560001A */ bnez $t3, .L80068248 diff --git a/asm/non_matchings/unknown_066AA0/func_800682AC.s b/asm/non_matchings/unknown_066AA0/func_800682AC.s index 40eb5197..1e8715c7 100644 --- a/asm/non_matchings/unknown_066AA0/func_800682AC.s +++ b/asm/non_matchings/unknown_066AA0/func_800682AC.s @@ -8,14 +8,15 @@ glabel func_800682AC /* 068EC4 800682C4 AFA40020 */ sw $a0, 0x20($sp) /* 068EC8 800682C8 3C0F8012 */ lui $t7, %hi(D_80120CE4) # $t7, 0x8012 /* 068ECC 800682CC 8DEF0CE4 */ lw $t7, %lo(D_80120CE4)($t7) -/* 068ED0 800682D0 3C19800E */ lui $t9, %hi(D_800DD094) # $t9, 0x800e +# Accessing D_800DD064[*].unk30. +/* 068ED0 800682D0 3C19800E */ lui $t9, %hi(D_800DD064) # $t9, 0x800e /* 068ED4 800682D4 000FC080 */ sll $t8, $t7, 2 /* 068ED8 800682D8 030FC023 */ subu $t8, $t8, $t7 /* 068EDC 800682DC 0018C080 */ sll $t8, $t8, 2 /* 068EE0 800682E0 030FC021 */ addu $t8, $t8, $t7 /* 068EE4 800682E4 0018C080 */ sll $t8, $t8, 2 /* 068EE8 800682E8 0338C821 */ addu $t9, $t9, $t8 -/* 068EEC 800682EC 8F39D094 */ lw $t9, %lo(D_800DD094)($t9) +/* 068EEC 800682EC 8F39D094 */ lw $t9, -0x2f6c($t9) /* 068EF0 800682F0 8FA40020 */ lw $a0, 0x20($sp) /* 068EF4 800682F4 332A0001 */ andi $t2, $t9, 1 /* 068EF8 800682F8 00024402 */ srl $t0, $v0, 0x10 diff --git a/asm/non_matchings/unknown_066AA0/func_8006C60C.s b/asm/non_matchings/unknown_066AA0/func_8006C60C.s index b64f9a41..80292d59 100644 --- a/asm/non_matchings/unknown_066AA0/func_8006C60C.s +++ b/asm/non_matchings/unknown_066AA0/func_8006C60C.s @@ -202,8 +202,9 @@ glabel func_8006C60C /* 06D504 8006C904 0C02DDF5 */ jal func_800B77D4 /* 06D508 8006C908 00000000 */ nop .L8006C90C: -/* 06D50C 8006C90C 3C04800E */ lui $a0, %hi(D_800DD407) # $a0, 0x800e -/* 06D510 8006C910 9084D407 */ lbu $a0, %lo(D_800DD407)($a0) +# Casting D_800DD404 to u8. +/* 06D50C 8006C90C 3C04800E */ lui $a0, %hi(D_800DD404) # $a0, 0x800e +/* 06D510 8006C910 9084D407 */ lbu $a0, -0x2bf9($a0) /* 06D514 8006C914 0C000340 */ jal func_80000D00 /* 06D518 8006C918 00000000 */ nop /* 06D51C 8006C91C 3C048012 */ lui $a0, %hi(D_801211F8) # $a0, 0x8012 diff --git a/include/unknown_066AA0.h b/include/unknown_066AA0.h new file mode 100644 index 00000000..ec589c12 --- /dev/null +++ b/include/unknown_066AA0.h @@ -0,0 +1,115 @@ +#ifndef _UNKNOWN_066AA0_H_ +#define _UNKNOWN_066AA0_H_ + +#include "types.h" + +extern s32 D_800DD060; + +/* Size: 0x34 bytes. */ +typedef struct unk800DD064 { + s32 unk0; + s32 unk4; + s32 unk8; + s32 unkC; + s32 unk10; + s32 unk14; + s32 unk18; + s32 unk1C; + s32 unk20; + s32 unk24; + s32 unk28; + s32 unk2C; + s32 unk30; +} unk800DD064; + +extern unk800DD064 D_800DD064[4]; + +// Not sure about the typing here +extern s16 D_800DD134[10]; + +// Not sure about the typing here +extern u16 D_800DD148[160]; + +extern f32 D_800DD288[6]; + +extern f32 D_800DD2A0[6]; + +extern f32 D_800DD2B8[5]; + +extern f32 D_800DD2CC[11]; + +extern u8 D_800DD2F8[8]; + +extern s32 D_800DD300; + +extern s16 D_800DD304; + +// Remove this when unknown_066AA0 is split. +extern s32 __FILE_BOUNDARY_PADDING[2]; + +/** File boundary! The following variables belong to the next file when unknown_066AA0 is split **/ + +extern s8 D_800DD310; +extern s8 D_800DD314; +extern s8 D_800DD318; +extern s32 D_800DD31C; +extern s32 D_800DD320; +extern s32 D_800DD324; +extern s16 D_800DD328; +extern s16 D_800DD32C; + +extern s8 D_800DD330; + +// Unused? Unsure on pointer type +extern s32 *D_800DD334[6]; + +// Unused? +extern char gBuildString[40]; + +extern s8 D_800DD374; +extern s32 D_800DD378; +extern s32 D_800DD37C; +extern s32 D_800DD380; +extern s32 D_800DD384; +extern s32 D_800DD388; +extern s8 D_800DD38C; +extern u8 D_800DD390; +extern s16 D_800DD394; +extern u8 D_800DD398; +extern s32 D_800DD39C; +extern s8 D_800DD3A0; +extern s32 D_800DD3A4; +extern s32 D_800DD3A8; +extern s32 D_800DD3AC; +extern s32 D_800DD3B0; +extern s32 D_800DD3B4; +extern s32 D_800DD3B8; +extern s32 D_800DD3BC; +extern s32 D_800DD3C0; +extern s32 D_800DD3C4; +extern s32 D_800DD3C8; +extern s32 D_800DD3CC; +extern s32 D_800DD3D0; +extern s32 D_800DD3D4; +extern s32 D_800DD3D8; +extern s32 D_800DD3DC; +extern s32 D_800DD3E0; +extern s32 D_800DD3E4; +extern s32 D_800DD3E8; +extern s32 D_800DD3EC; + +extern s8 D_800DD3F0; +extern s16 D_800DD3F4[8]; +extern s32 D_800DD404; +extern s32 D_800DD408; +extern s32 D_800DD40C; + +// Unused? Unsure on pointer type +extern s32 *D_800DD410[3]; + +// Not sure if this is an array or a struct. +extern s32 D_800DD41C[2]; + +extern s32 D_800DD424[2]; + +#endif \ No newline at end of file diff --git a/src/unknown_066AA0.c b/src/unknown_066AA0.c index b5de06be..ac068eed 100644 --- a/src/unknown_066AA0.c +++ b/src/unknown_066AA0.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80065EA0 */ +#include "unknown_066AA0.h" + #include "types.h" #include "macros.h" #include "structs.h" @@ -12,23 +14,6 @@ extern u32 osTvType; s32 D_800DD060 = 0; // Currently unknown, might be a different type. -/* Size: 0x34 bytes. */ -typedef struct unk800DD064 { - s32 unk0; - s32 unk4; - s32 unk8; - s32 unkC; - s32 unk10; - s32 unk14; - s32 unk18; - s32 unk1C; - s32 unk20; - s32 unk24; - s32 unk28; - s32 unk2C; - s32 unk30; -} unk800DD064; - unk800DD064 D_800DD064[4] = { { 0x00, 0x00, 0x140, 0xF0, diff --git a/undefined_syms.txt b/undefined_syms.txt index a9c739c0..e881049b 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -67,52 +67,6 @@ D_800D84C0 = 0x800D84C0; D_800D8590 = 0x800D8590; D_800D9790 = 0x800D9790; D_800DA970 = 0x800DA970; -D_800DD060 = 0x800DD060; -D_800DD064 = 0x800DD064; -D_800DD094 = 0x800DD094; -D_800DD134 = 0x800DD134; -D_800DD148 = 0x800DD148; -D_800DD288 = 0x800DD288; -D_800DD2A0 = 0x800DD2A0; -D_800DD2B8 = 0x800DD2B8; -D_800DD2CC = 0x800DD2CC; -D_800DD2F8 = 0x800DD2F8; -D_800DD300 = 0x800DD300; -D_800DD304 = 0x800DD304; -D_800DD310 = 0x800DD310; -D_800DD314 = 0x800DD314; -D_800DD318 = 0x800DD318; -D_800DD31C = 0x800DD31C; -D_800DD320 = 0x800DD320; -D_800DD324 = 0x800DD324; -D_800DD328 = 0x800DD328; -D_800DD32C = 0x800DD32C; -D_800DD330 = 0x800DD330; -D_800DD374 = 0x800DD374; -D_800DD37C = 0x800DD37C; -D_800DD380 = 0x800DD380; -D_800DD384 = 0x800DD384; -D_800DD38C = 0x800DD38C; -D_800DD390 = 0x800DD390; -D_800DD394 = 0x800DD394; -D_800DD398 = 0x800DD398; -D_800DD39C = 0x800DD39C; -D_800DD3A0 = 0x800DD3A0; -D_800DD3B0 = 0x800DD3B0; -D_800DD3BC = 0x800DD3BC; -D_800DD3C0 = 0x800DD3C0; -D_800DD3CC = 0x800DD3CC; -D_800DD3D0 = 0x800DD3D0; -D_800DD3DC = 0x800DD3DC; -D_800DD3E0 = 0x800DD3E0; -D_800DD3EC = 0x800DD3EC; -D_800DD3F0 = 0x800DD3F0; -D_800DD3F4 = 0x800DD3F4; -D_800DD404 = 0x800DD404; -D_800DD407 = 0x800DD407; -D_800DD408 = 0x800DD408; -D_800DD41C = 0x800DD41C; -D_800DD424 = 0x800DD424; D_800DD430 = 0x800DD430; D_800DD434 = 0x800DD434; D_800DD438 = 0x800DD438; From 05b30056be69d185e430eceeff12ec3fe90c01a9 Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Sat, 5 Jun 2021 19:17:36 -0700 Subject: [PATCH 23/33] Moved symbols in unknown_071730 to header file. --- include/unknown_071730.h | 4 ++++ src/unknown_071730.c | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 include/unknown_071730.h diff --git a/include/unknown_071730.h b/include/unknown_071730.h new file mode 100644 index 00000000..876ec5d4 --- /dev/null +++ b/include/unknown_071730.h @@ -0,0 +1,4 @@ +#ifndef _UNKNOWN_071730_H_ +#define _UNKNOWN_071730_H_ + +#endif \ No newline at end of file diff --git a/src/unknown_071730.c b/src/unknown_071730.c index 3e1952b5..201bc5f9 100644 --- a/src/unknown_071730.c +++ b/src/unknown_071730.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80070B30 */ +#include "unknown_071730.h" + #include "types.h" #include "macros.h" From 509df885e5f0c0fe39fca400a5a7ff4df3b3231d Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Sun, 6 Jun 2021 12:00:44 -0700 Subject: [PATCH 24/33] Moved symbols in unknown_072E50 to header file. --- include/unknown_072E50.h | 11 +++++++++++ src/unknown_072E50.c | 2 ++ undefined_syms.txt | 4 ---- 3 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 include/unknown_072E50.h diff --git a/include/unknown_072E50.h b/include/unknown_072E50.h new file mode 100644 index 00000000..d0115848 --- /dev/null +++ b/include/unknown_072E50.h @@ -0,0 +1,11 @@ +#ifndef _UNKNOWN_072E50_H_ +#define _UNKNOWN_072E50_H_ + +#include "types.h" + +extern s32 D_800DE440; +extern char D_800DE444[68]; +extern s32 D_800DE488; +extern s32 D_800DE48C; + +#endif diff --git a/src/unknown_072E50.c b/src/unknown_072E50.c index f6ad31ab..de6242bb 100644 --- a/src/unknown_072E50.c +++ b/src/unknown_072E50.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80072250 */ +#include "unknown_072E50.h" + #include "types.h" #include "macros.h" diff --git a/undefined_syms.txt b/undefined_syms.txt index e881049b..101e8371 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -72,10 +72,6 @@ D_800DD434 = 0x800DD434; D_800DD438 = 0x800DD438; D_800DD43C = 0x800DD43C; D_800DDC3E = 0x800DDC3E; -D_800DE440 = 0x800DE440; -D_800DE444 = 0x800DE444; -D_800DE488 = 0x800DE488; -D_800DE48C = 0x800DE48C; D_800DE490 = 0x800DE490; D_800DE4B0 = 0x800DE4B0; D_800DE4B4 = 0x800DE4B4; From 7f6504d2157b837209a8abb4a17cf11430106d9b Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Sun, 6 Jun 2021 12:02:37 -0700 Subject: [PATCH 25/33] Moved symbols in unknown_0777A0 to header file. --- include/unknown_0777A0.h | 4 ++++ src/unknown_0777A0.c | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 include/unknown_0777A0.h diff --git a/include/unknown_0777A0.h b/include/unknown_0777A0.h new file mode 100644 index 00000000..142c49f5 --- /dev/null +++ b/include/unknown_0777A0.h @@ -0,0 +1,4 @@ +#ifndef _UNKNOWN_0777A0_H_ +#define _UNKNOWN_0777A0_H_ + +#endif diff --git a/src/unknown_0777A0.c b/src/unknown_0777A0.c index 0f0372b2..d958a466 100644 --- a/src/unknown_0777A0.c +++ b/src/unknown_0777A0.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80076BA0 */ +#include "unknown_0777A0.h" + #include "types.h" #include "macros.h" From 388e847de2383e3d27b672f692f7c49517d37ac3 Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Sun, 6 Jun 2021 12:33:59 -0700 Subject: [PATCH 26/33] Moved symbols in unknown_077C50 to header file. --- include/unknown_077C50.h | 4 ++++ src/unknown_077C50.c | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 include/unknown_077C50.h diff --git a/include/unknown_077C50.h b/include/unknown_077C50.h new file mode 100644 index 00000000..1bde59c4 --- /dev/null +++ b/include/unknown_077C50.h @@ -0,0 +1,4 @@ +#ifndef _UNKNOWN_077C50_H_ +#define _UNKNOWN_077C50_H_ + +#endif diff --git a/src/unknown_077C50.c b/src/unknown_077C50.c index 50b56e17..4c400c0c 100644 --- a/src/unknown_077C50.c +++ b/src/unknown_077C50.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80077050 */ +#include "unknown_077C50.h" + #include "types.h" #include "macros.h" From 44aa03ab09e84a802a71ad1196aef5d0a8d9871b Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Sun, 6 Jun 2021 12:48:57 -0700 Subject: [PATCH 27/33] Moved symbols in unknown_078050 to header file. --- include/unknown_078050.h | 47 ++++++++++++++++++++++++++++++++++++++++ src/unknown_078050.c | 2 ++ undefined_syms.txt | 21 ------------------ 3 files changed, 49 insertions(+), 21 deletions(-) create mode 100644 include/unknown_078050.h diff --git a/include/unknown_078050.h b/include/unknown_078050.h new file mode 100644 index 00000000..f7849ae9 --- /dev/null +++ b/include/unknown_078050.h @@ -0,0 +1,47 @@ +#ifndef _UNKNOWN_078050_H_ +#define _UNKNOWN_078050_H_ + +#include "types.h" + +extern s16 D_800DE490[16]; + +extern u8 D_800DE4B0; +extern u8 D_800DE4B4; +extern u8 D_800DE4B8; +extern s32 D_800DE4BC; + +extern u32 D_800DE4C0; +extern u32 D_800DE4C4; +extern u32 D_800DE4C8; +extern s32 D_800DE4CC; + +extern u32 D_800DE4D0; +extern s32 D_800DE4D4; +extern s32 D_800DE4D8; +extern s32 D_800DE4DC; + +// Fast3D (F3DDKR) display list +extern u32 D_800DE4E0[]; + +// Fast3D (F3DDKR) display list +extern u32 D_800DE520[]; + +// Fast3D (F3DDKR) display list +extern u32 D_800DE598[]; + +// Fast3D (F3DDKR) display list +extern u32 D_800DE5E0[]; + +// Fast3D (F3DDKR) display list +extern u32 D_800DE628[]; + +// Fast3D (F3DDKR) display list +extern u32 D_800DE670[]; + +// Fast3D (F3DDKR) display list +extern u32 D_800DE6A8[]; + +// Fast3D (F3DDKR) display list +extern u32 D_800DE6E8[]; + +#endif diff --git a/src/unknown_078050.c b/src/unknown_078050.c index 7223f02f..5f11a911 100644 --- a/src/unknown_078050.c +++ b/src/unknown_078050.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80077450 */ +#include "unknown_078050.h" + #include "types.h" #include "macros.h" #include "libultra_internal.h" diff --git a/undefined_syms.txt b/undefined_syms.txt index 101e8371..21c0094b 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -72,27 +72,6 @@ D_800DD434 = 0x800DD434; D_800DD438 = 0x800DD438; D_800DD43C = 0x800DD43C; D_800DDC3E = 0x800DDC3E; -D_800DE490 = 0x800DE490; -D_800DE4B0 = 0x800DE4B0; -D_800DE4B4 = 0x800DE4B4; -D_800DE4B8 = 0x800DE4B8; -D_800DE4BC = 0x800DE4BC; -D_800DE4C0 = 0x800DE4C0; -D_800DE4C4 = 0x800DE4C4; -D_800DE4C8 = 0x800DE4C8; -D_800DE4CC = 0x800DE4CC; -D_800DE4D0 = 0x800DE4D0; -D_800DE4D4 = 0x800DE4D4; -D_800DE4D8 = 0x800DE4D8; -D_800DE4DC = 0x800DE4DC; -D_800DE4E0 = 0x800DE4E0; -D_800DE520 = 0x800DE520; -D_800DE598 = 0x800DE598; -D_800DE5E0 = 0x800DE5E0; -D_800DE628 = 0x800DE628; -D_800DE670 = 0x800DE670; -D_800DE6A8 = 0x800DE6A8; -D_800DE6E8 = 0x800DE6E8; D_800DE730 = 0x800DE730; D_800DE738 = 0x800DE738; D_800DE740 = 0x800DE740; From 5b0511b83e87b4b7507c5f8d7448d5aa070cfcbe Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Sun, 6 Jun 2021 13:02:05 -0700 Subject: [PATCH 28/33] Moved symbols in unknown_079F50 to header file. --- include/unknown_079F50.h | 23 +++++++++++++++++++++++ src/unknown_079F50.c | 2 ++ undefined_syms.txt | 11 ----------- 3 files changed, 25 insertions(+), 11 deletions(-) create mode 100644 include/unknown_079F50.h diff --git a/include/unknown_079F50.h b/include/unknown_079F50.h new file mode 100644 index 00000000..32ed2261 --- /dev/null +++ b/include/unknown_079F50.h @@ -0,0 +1,23 @@ +#ifndef _UNKNOWN_079F50_H_ +#define _UNKNOWN_079F50_H_ + +#include "types.h" + +// Unsure about if this is an array or struct. +extern s32 D_800DE730[]; +extern s32 D_800DE738[]; + +extern s32 D_800DE740; +extern s32 D_800DE744; +extern s32 D_800DE748; +extern s32 D_800DE74C; + +extern s32 D_800DE750; +extern u32 D_800DE754; +extern u32 D_800DE758; +extern s32 D_800DE75C; + +extern s32 D_800DE760; +extern s32 D_800DE764; + +#endif diff --git a/src/unknown_079F50.c b/src/unknown_079F50.c index 30663b6f..0a95f4c0 100644 --- a/src/unknown_079F50.c +++ b/src/unknown_079F50.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80079350 */ +#include "unknown_079F50.h" + #include "types.h" #include "macros.h" #include "libultra_internal.h" diff --git a/undefined_syms.txt b/undefined_syms.txt index 21c0094b..a23bb1cf 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -72,17 +72,6 @@ D_800DD434 = 0x800DD434; D_800DD438 = 0x800DD438; D_800DD43C = 0x800DD43C; D_800DDC3E = 0x800DDC3E; -D_800DE730 = 0x800DE730; -D_800DE738 = 0x800DE738; -D_800DE740 = 0x800DE740; -D_800DE744 = 0x800DE744; -D_800DE748 = 0x800DE748; -D_800DE74C = 0x800DE74C; -D_800DE750 = 0x800DE750; -D_800DE754 = 0x800DE754; -D_800DE758 = 0x800DE758; -D_800DE760 = 0x800DE760; -D_800DE764 = 0x800DE764; D_800DE770 = 0x800DE770; D_800DE77C = 0x800DE77C; D_800DE7BC = 0x800DE7BC; From 07d2eacb93490774c4e828fb66d691c541007bfa Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Sun, 6 Jun 2021 13:02:25 -0700 Subject: [PATCH 29/33] Moved symbols in unknown_07AF10 to header file. --- include/unknown_07AF10.h | 20 ++++++++++++++++++++ src/unknown_07AF10.c | 8 ++------ undefined_syms.txt | 3 --- 3 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 include/unknown_07AF10.h diff --git a/include/unknown_07AF10.h b/include/unknown_07AF10.h new file mode 100644 index 00000000..c1e3d929 --- /dev/null +++ b/include/unknown_07AF10.h @@ -0,0 +1,20 @@ +#ifndef _UNKNOWN_07AF10_H_ +#define _UNKNOWN_07AF10_H_ + +#include "types.h" + +extern s32 D_800DE770; +extern s32 D_800DE774; +extern s8 D_800DE778; + +/* Size: 0x08 bytes */ +typedef struct unk800DE77C { + /* 0x00 */ s32 unk0; + /* 0x04 */ s32 unk4; +} unk800DE77C; + +extern unk800DE77C D_800DE77C[8]; + +extern s32 D_800DE7BC; + +#endif diff --git a/src/unknown_07AF10.c b/src/unknown_07AF10.c index bf69b37b..5dad13af 100644 --- a/src/unknown_07AF10.c +++ b/src/unknown_07AF10.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x8007A310 */ +#include "unknown_07AF10.h" + #include "types.h" #include "macros.h" @@ -10,12 +12,6 @@ s32 D_800DE770 = 0; s32 D_800DE774 = 0; // Currently unknown, might be a different type. s8 D_800DE778 = 2; -/* Size: 0x08 bytes */ -typedef struct unk800DE77C { - /* 0x00 */ s32 unk0; - /* 0x04 */ s32 unk4; -} unk800DE77C; - extern unk800DE77C D_800DE77C[8] = { { 0x140, 0xF0 }, { 0x140, 0xF0 }, diff --git a/undefined_syms.txt b/undefined_syms.txt index a23bb1cf..33cd49aa 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -72,9 +72,6 @@ D_800DD434 = 0x800DD434; D_800DD438 = 0x800DD438; D_800DD43C = 0x800DD43C; D_800DDC3E = 0x800DDC3E; -D_800DE770 = 0x800DE770; -D_800DE77C = 0x800DE77C; -D_800DE7BC = 0x800DE7BC; D_800DE7C0 = 0x800DE7C0; D_800DE7C4 = 0x800DE7C4; D_800DE7C8 = 0x800DE7C8; From 91eeb11a10296024b488db1d4ffd83f3b863d962 Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Sun, 6 Jun 2021 13:14:57 -0700 Subject: [PATCH 30/33] Moved symbols in unknown_07B870 to header file. --- include/unknown_07B870.h | 51 ++++++++++++++++++++++++++++++++++++++++ src/unknown_07B870.c | 2 ++ undefined_syms.txt | 16 ------------- 3 files changed, 53 insertions(+), 16 deletions(-) create mode 100644 include/unknown_07B870.h diff --git a/include/unknown_07B870.h b/include/unknown_07B870.h new file mode 100644 index 00000000..cfb641ba --- /dev/null +++ b/include/unknown_07B870.h @@ -0,0 +1,51 @@ +#ifndef _UNKNOWN_07B870_H_ +#define _UNKNOWN_07B870_H_ + +#include "types.h" + +extern u32 D_800DE7C0; +extern s32 D_800DE7C4; + +// Fast3D (F3DDKR) display list +extern u32 D_800DE7C8[]; + +// Fast3D (F3DDKR) display list +extern u32 D_800DE848[]; + +// Fast3D (F3DDKR) display list +extern u32 D_800DE868[]; + +// Fast3D (F3DDKR) display list +extern u32 D_800DE8E8[]; + +// Fast3D (F3DDKR) display list +extern u32 D_800DECE8[]; + +// Fast3D (F3DDKR) display list +extern u32 D_800DEDE8[]; + +// Fast3D (F3DDKR) display list +extern u32 D_800DEEE8[]; + +// Fast3D (F3DDKR) display list +extern u32 D_800DEF28[]; + +// Fast3D (F3DDKR) display list +extern u32 D_800DF028[]; + +// Fast3D (F3DDKR) display list +extern u32 D_800DF0A8[]; + +// Fast3D (F3DDKR) display list +extern u32 D_800DF1A8[]; + +// Fast3D (F3DDKR) display list +extern u32 D_800DF3A8[]; + +// Fast3D (F3DDKR) display list +extern u32 D_800DF3D8[]; + +// Fast3D (F3DDKR) display list +extern u32 D_800DF410[]; + +#endif diff --git a/src/unknown_07B870.c b/src/unknown_07B870.c index 1a9c1428..4e077910 100644 --- a/src/unknown_07B870.c +++ b/src/unknown_07B870.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x8007AC70 */ +#include "unknown_07B870.h" + #include "types.h" #include "macros.h" diff --git a/undefined_syms.txt b/undefined_syms.txt index 33cd49aa..ac232ab6 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -72,22 +72,6 @@ D_800DD434 = 0x800DD434; D_800DD438 = 0x800DD438; D_800DD43C = 0x800DD43C; D_800DDC3E = 0x800DDC3E; -D_800DE7C0 = 0x800DE7C0; -D_800DE7C4 = 0x800DE7C4; -D_800DE7C8 = 0x800DE7C8; -D_800DE848 = 0x800DE848; -D_800DE868 = 0x800DE868; -D_800DE8E8 = 0x800DE8E8; -D_800DECE8 = 0x800DECE8; -D_800DEDE8 = 0x800DEDE8; -D_800DEEE8 = 0x800DEEE8; -D_800DEF28 = 0x800DEF28; -D_800DF028 = 0x800DF028; -D_800DF0A8 = 0x800DF0A8; -D_800DF1A8 = 0x800DF1A8; -D_800DF3A8 = 0x800DF3A8; -D_800DF3D8 = 0x800DF3D8; -D_800DF410 = 0x800DF410; D_800DF440 = 0x800DF440; D_800DF450 = 0x800DF450; D_800DF454 = 0x800DF454; From 29e889549eecfcdd097ed0d3b3dedf65190f54e9 Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Sun, 6 Jun 2021 13:15:19 -0700 Subject: [PATCH 31/33] Moved symbols in unknown_080240 to header file. --- include/unknown_080240.h | 9 +++++++++ src/unknown_080240.c | 2 ++ undefined_syms.txt | 1 - 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 include/unknown_080240.h diff --git a/include/unknown_080240.h b/include/unknown_080240.h new file mode 100644 index 00000000..a3e0cfe4 --- /dev/null +++ b/include/unknown_080240.h @@ -0,0 +1,9 @@ +#ifndef _UNKNOWN_080240_H_ +#define _UNKNOWN_080240_H_ + +#include "fast3d.h" + +// Fast3D (F3DDKR) display list +Gfx D_800DF440[]; + +#endif diff --git a/src/unknown_080240.c b/src/unknown_080240.c index c9262c71..7ff92067 100644 --- a/src/unknown_080240.c +++ b/src/unknown_080240.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x8007F640 */ +#include "unknown_080240.h" + #include "types.h" #include "macros.h" #include "fast3d.h" diff --git a/undefined_syms.txt b/undefined_syms.txt index ac232ab6..0e903027 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -72,7 +72,6 @@ D_800DD434 = 0x800DD434; D_800DD438 = 0x800DD438; D_800DD43C = 0x800DD43C; D_800DDC3E = 0x800DDC3E; -D_800DF440 = 0x800DF440; D_800DF450 = 0x800DF450; D_800DF454 = 0x800DF454; D_800DF458 = 0x800DF458; From d1edeb64f1aa8c77b3ea9c45d2eb154b1c066d22 Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Sun, 6 Jun 2021 15:32:51 -0700 Subject: [PATCH 32/33] Started moving symbols in unknown_080500 to header file. --- .../unknown_080500/MenuBootInit.s | 32 +- .../unknown_080500/MenuTitleScreenInit.s | 32 +- .../unknown_080500/MenuTitleScreenLoop.s | 5 +- .../unknown_080500/func_80094D28.s | 5 +- .../unknown_080500/func_80095728.s | 5 +- include/unknown_080500.h | 550 ++++++++++++++++++ src/unknown_080500.c | 89 +-- undefined_syms.txt | 65 --- 8 files changed, 599 insertions(+), 184 deletions(-) create mode 100644 include/unknown_080500.h diff --git a/asm/non_matchings/unknown_080500/MenuBootInit.s b/asm/non_matchings/unknown_080500/MenuBootInit.s index a73a3427..29032a69 100644 --- a/asm/non_matchings/unknown_080500/MenuBootInit.s +++ b/asm/non_matchings/unknown_080500/MenuBootInit.s @@ -15,31 +15,37 @@ glabel menu_boot_init /* 089128 80088528 85CEF7C4 */ lh $t6, %lo(D_800DF7C4)($t6) /* 08912C 8008852C 3C048012 */ lui $a0, %hi(D_80126550) # $a0, 0x8012 /* 089130 80088530 24846550 */ addiu $a0, %lo(D_80126550) # addiu $a0, $a0, 0x6550 -/* 089134 80088534 3C08800E */ lui $t0, %hi(D_800DF7C6) # $t0, 0x800e +# Accessing D_800DF7C4[1]. +/* 089134 80088534 3C08800E */ lui $t0, %hi(D_800DF7C4) # $t0, 0x800e /* 089138 80088538 000E7880 */ sll $t7, $t6, 2 -/* 08913C 8008853C 8508F7C6 */ lh $t0, %lo(D_800DF7C6)($t0) +/* 08913C 8008853C 8508F7C6 */ lh $t0, -0x83a($t0) /* 089140 80088540 008FC021 */ addu $t8, $a0, $t7 /* 089144 80088544 8F190000 */ lw $t9, ($t8) /* 089148 80088548 3C01800E */ lui $at, %hi(D_800DF7DC) # $at, 0x800e -/* 08914C 8008854C 3C0C800E */ lui $t4, %hi(D_800DF7C8) # $t4, 0x800e +# Accessing D_800DF7C4[2]. +/* 08914C 8008854C 3C0C800E */ lui $t4, %hi(D_800DF7C4) # $t4, 0x800e /* 089150 80088550 00084880 */ sll $t1, $t0, 2 -/* 089154 80088554 858CF7C8 */ lh $t4, %lo(D_800DF7C8)($t4) +/* 089154 80088554 858CF7C8 */ lh $t4, -0x838($t4) /* 089158 80088558 00895021 */ addu $t2, $a0, $t1 /* 08915C 8008855C AC39F7DC */ sw $t9, %lo(D_800DF7DC)($at) /* 089160 80088560 8D4B0000 */ lw $t3, ($t2) -/* 089164 80088564 3C01800E */ lui $at, %hi(D_800DF7EC) # $at, 0x800e +# Accessing D_800DF7DC[1] (instr 089170) and D_800DF7DC[2] (instr 089190). +/* 089164 80088564 3C01800E */ lui $at, %hi(D_800DF7DC) # $at, 0x800e /* 089168 80088568 000C6880 */ sll $t5, $t4, 2 /* 08916C 8008856C 008D7021 */ addu $t6, $a0, $t5 -/* 089170 80088570 AC2BF7E4 */ sw $t3, %lo(D_800DF7E4)($at) +/* 089170 80088570 AC2BF7E4 */ sw $t3, -0x81c($at) /* 089174 80088574 8DCF0000 */ lw $t7, ($t6) # The extra lui is here. -/* 089178 80088578 3C03800E */ lui $v1, %hi(D_800DF7F4) # $v1, 0x800e -/* 08917C 8008857C 3C02800E */ lui $v0, %hi(D_800DF7CA) # $v0, 0x800e -/* 089180 80088580 3C05800E */ lui $a1, %hi(D_800DF7DA) # $a1, 0x800e -/* 089184 80088584 24A5F7DA */ addiu $a1, %lo(D_800DF7DA) # addiu $a1, $a1, -0x826 -/* 089188 80088588 2442F7CA */ addiu $v0, %lo(D_800DF7CA) # addiu $v0, $v0, -0x836 -/* 08918C 8008858C 2463F7F4 */ addiu $v1, %lo(D_800DF7F4) # addiu $v1, $v1, -0x80c -/* 089190 80088590 AC2FF7EC */ sw $t7, %lo(D_800DF7EC)($at) +# Accessing D_800DF7DC[3]. +/* 089178 80088578 3C03800E */ lui $v1, %hi(D_800DF7DC) # $v1, 0x800e +# Accessing D_800DF7C4[3]. +/* 08917C 8008857C 3C02800E */ lui $v0, %hi(D_800DF7C4) # $v0, 0x800e +# Accessing D_800DF7C4[11]. +/* 089180 80088580 3C05800E */ lui $a1, %hi(D_800DF7C4) # $a1, 0x800e +/* 089184 80088584 24A5F7DA */ addiu $a1, $a1, -0x826 +/* 089188 80088588 2442F7CA */ addiu $v0, $v0, -0x836 +/* 08918C 8008858C 2463F7F4 */ addiu $v1, $v1, -0x80c +/* 089190 80088590 AC2FF7EC */ sw $t7, -0x814($at) .L80088594: /* 089194 80088594 84580000 */ lh $t8, ($v0) /* 089198 80088598 844A0002 */ lh $t2, 2($v0) diff --git a/asm/non_matchings/unknown_080500/MenuTitleScreenInit.s b/asm/non_matchings/unknown_080500/MenuTitleScreenInit.s index adef7ec6..9bd40d84 100644 --- a/asm/non_matchings/unknown_080500/MenuTitleScreenInit.s +++ b/asm/non_matchings/unknown_080500/MenuTitleScreenInit.s @@ -49,30 +49,36 @@ glabel MenuTitleScreenInit /* 0841F0 800835F0 8508F7C4 */ lh $t0, %lo(D_800DF7C4)($t0) /* 0841F4 800835F4 3C048012 */ lui $a0, %hi(D_80126550) # $a0, 0x8012 /* 0841F8 800835F8 24846550 */ addiu $a0, %lo(D_80126550) # addiu $a0, $a0, 0x6550 -/* 0841FC 800835FC 3C0C800E */ lui $t4, %hi(D_800DF7C6) # $t4, 0x800e +# Accessing D_800DF7C4[1]. +/* 0841FC 800835FC 3C0C800E */ lui $t4, %hi(D_800DF7C4) # $t4, 0x800e /* 084200 80083600 00084880 */ sll $t1, $t0, 2 -/* 084204 80083604 858CF7C6 */ lh $t4, %lo(D_800DF7C6)($t4) +/* 084204 80083604 858CF7C6 */ lh $t4, -0x83a($t4) /* 084208 80083608 00895021 */ addu $t2, $a0, $t1 /* 08420C 8008360C 8D4B0000 */ lw $t3, ($t2) /* 084210 80083610 3C01800E */ lui $at, %hi(D_800DF7DC) # $at, 0x800e -/* 084214 80083614 3C18800E */ lui $t8, %hi(D_800DF7C8) # $t8, 0x800e +# Accessing D_800DF7C4[2]. +/* 084214 80083614 3C18800E */ lui $t8, %hi(D_800DF7C4) # $t8, 0x800e /* 084218 80083618 000C6880 */ sll $t5, $t4, 2 -/* 08421C 8008361C 8718F7C8 */ lh $t8, %lo(D_800DF7C8)($t8) +/* 08421C 8008361C 8718F7C8 */ lh $t8, -0x838($t8) /* 084220 80083620 008D7021 */ addu $t6, $a0, $t5 /* 084224 80083624 AC2BF7DC */ sw $t3, %lo(D_800DF7DC)($at) /* 084228 80083628 8DCF0000 */ lw $t7, ($t6) -/* 08422C 8008362C 3C01800E */ lui $at, %hi(D_800DF7EC) # $at, 0x800e +# Accessing D_800DF7DC[1] (instr 084238) and D_800DF7DC[2] (instr 084258). +/* 08422C 8008362C 3C01800E */ lui $at, %hi(D_800DF7DC) # $at, 0x800e /* 084230 80083630 0018C880 */ sll $t9, $t8, 2 /* 084234 80083634 00994021 */ addu $t0, $a0, $t9 -/* 084238 80083638 AC2FF7E4 */ sw $t7, %lo(D_800DF7E4)($at) +/* 084238 80083638 AC2FF7E4 */ sw $t7, -0x81c($at) /* 08423C 8008363C 8D090000 */ lw $t1, ($t0) -/* 084240 80083640 3C03800E */ lui $v1, %hi(D_800DF7F4) # $v1, 0x800e -/* 084244 80083644 3C02800E */ lui $v0, %hi(D_800DF7CA) # $v0, 0x800e -/* 084248 80083648 3C05800E */ lui $a1, %hi(D_800DF7DA) # $a1, 0x800e -/* 08424C 8008364C 24A5F7DA */ addiu $a1, %lo(D_800DF7DA) # addiu $a1, $a1, -0x826 -/* 084250 80083650 2442F7CA */ addiu $v0, %lo(D_800DF7CA) # addiu $v0, $v0, -0x836 -/* 084254 80083654 2463F7F4 */ addiu $v1, %lo(D_800DF7F4) # addiu $v1, $v1, -0x80c -/* 084258 80083658 AC29F7EC */ sw $t1, %lo(D_800DF7EC)($at) +# Accessing D_800DF7DC[3]. +/* 084240 80083640 3C03800E */ lui $v1, %hi(D_800DF7DC) # $v1, 0x800e +# Accessing D_800DF7C4[3]. +/* 084244 80083644 3C02800E */ lui $v0, %hi(D_800DF7C4) # $v0, 0x800e +# Accessing D_800DF7C4[11]. +/* 084248 80083648 3C05800E */ lui $a1, %hi(D_800DF7C4) # $a1, 0x800e +/* 08424C 8008364C 24A5F7DA */ addiu $a1, $a1, -0x826 +/* 084250 80083650 2442F7CA */ addiu $v0, $v0, -0x836 +/* 084254 80083654 2463F7F4 */ addiu $v1, $v1, -0x80c +/* 084258 80083658 AC29F7EC */ sw $t1, -0x814($at) .L8008365C: /* 08425C 8008365C 844A0000 */ lh $t2, ($v0) /* 084260 80083660 844E0002 */ lh $t6, 2($v0) diff --git a/asm/non_matchings/unknown_080500/MenuTitleScreenLoop.s b/asm/non_matchings/unknown_080500/MenuTitleScreenLoop.s index 45cb9352..23adb315 100644 --- a/asm/non_matchings/unknown_080500/MenuTitleScreenLoop.s +++ b/asm/non_matchings/unknown_080500/MenuTitleScreenLoop.s @@ -321,7 +321,8 @@ glabel MenuTitleScreenLoop /* 084A94 80083E94 4606003C */ c.lt.s $f0, $f6 /* 084A98 80083E98 3C0F800E */ lui $t7, %hi(D_800DF760) # $t7, 0x800e /* 084A9C 80083E9C 45000016 */ bc1f .L80083EF8 -/* 084AA0 80083EA0 3C04800E */ lui $a0, %hi(D_800DF763) # $a0, 0x800e +# Casting D_800DF760 to u8 (see instr 084AF8). +/* 084AA0 80083EA0 3C04800E */ lui $a0, %hi(D_800DF760) # $a0, 0x800e /* 084AA4 80083EA4 8DEFF760 */ lw $t7, %lo(D_800DF760)($t7) /* 084AA8 80083EA8 44815000 */ mtc1 $at, $f10 /* 084AAC 80083EAC 448F2000 */ mtc1 $t7, $f4 @@ -344,7 +345,7 @@ glabel MenuTitleScreenLoop /* 084AF0 80083EF0 10000006 */ b .L80083F0C /* 084AF4 80083EF4 2463686C */ addiu $v1, %lo(D_8012686C) # addiu $v1, $v1, 0x686c .L80083EF8: -/* 084AF8 80083EF8 9084F763 */ lbu $a0, %lo(D_800DF763)($a0) +/* 084AF8 80083EF8 9084F763 */ lbu $a0, -0x89d($a0) /* 084AFC 80083EFC 0C000664 */ jal musicSetRelativeVolume /* 084B00 80083F00 00000000 */ nop /* 084B04 80083F04 3C038012 */ lui $v1, %hi(D_8012686C) # $v1, 0x8012 diff --git a/asm/non_matchings/unknown_080500/func_80094D28.s b/asm/non_matchings/unknown_080500/func_80094D28.s index 8b065120..384ee533 100644 --- a/asm/non_matchings/unknown_080500/func_80094D28.s +++ b/asm/non_matchings/unknown_080500/func_80094D28.s @@ -166,9 +166,10 @@ glabel func_80094D28 /* 095B84 80094F84 3C014000 */ li $at, 0x40000000 # 2.000000 /* 095B88 80094F88 46803220 */ cvt.s.w $f8, $f6 /* 095B8C 80094F8C 44813000 */ mtc1 $at, $f6 -/* 095B90 80094F90 3C01800E */ lui $at, %hi(D_800DF598) # $at, 0x800e +# Accessing D_800DF510[4].unk8. +/* 095B90 80094F90 3C01800E */ lui $at, %hi(D_800DF510) # $at, 0x800e /* 095B94 80094F94 E5880090 */ swc1 $f8, 0x90($t4) -/* 095B98 80094F98 C42AF598 */ lwc1 $f10, %lo(D_800DF598)($at) +/* 095B98 80094F98 C42AF598 */ lwc1 $f10, -0xa68($at) /* 095B9C 80094F9C 46043201 */ sub.s $f8, $f6, $f4 /* 095BA0 80094FA0 8C4D0000 */ lw $t5, ($v0) /* 095BA4 80094FA4 46085402 */ mul.s $f16, $f10, $f8 diff --git a/asm/non_matchings/unknown_080500/func_80095728.s b/asm/non_matchings/unknown_080500/func_80095728.s index 3e826b7b..87a25787 100644 --- a/asm/non_matchings/unknown_080500/func_80095728.s +++ b/asm/non_matchings/unknown_080500/func_80095728.s @@ -207,10 +207,11 @@ glabel func_80095728 /* 096620 80095A20 E584008C */ swc1 $f4, 0x8c($t4) /* 096624 80095A24 8C4D0000 */ lw $t5, ($v0) /* 096628 80095A28 44813000 */ mtc1 $at, $f6 -/* 09662C 80095A2C 3C01800E */ lui $at, %hi(D_800DF598) # $at, 0x800e +# Accessing D_800DF510[4].unk8. +/* 09662C 80095A2C 3C01800E */ lui $at, %hi(D_800DF510) # $at, 0x800e /* 096630 80095A30 E5A60090 */ swc1 $f6, 0x90($t5) /* 096634 80095A34 8C4E0000 */ lw $t6, ($v0) -/* 096638 80095A38 C428F598 */ lwc1 $f8, %lo(D_800DF598)($at) +/* 096638 80095A38 C428F598 */ lwc1 $f8, -0xa68($at) /* 09663C 80095A3C 00000000 */ nop /* 096640 80095A40 E5C80088 */ swc1 $f8, 0x88($t6) /* 096644 80095A44 8FAF002C */ lw $t7, 0x2c($sp) diff --git a/include/unknown_080500.h b/include/unknown_080500.h new file mode 100644 index 00000000..cc5df6d6 --- /dev/null +++ b/include/unknown_080500.h @@ -0,0 +1,550 @@ +#ifndef _UNKNOWN_080500_H_ +#define _UNKNOWN_080500_H_ + +#include "types.h" +#include "structs.h" + +extern s8 D_800DF450; +extern f32 D_800DF454; +extern s32 D_800DF458; +extern s32 D_800DF45C; +extern s32 D_800DF460; +extern s32 D_800DF464; +extern s32 D_800DF468; +extern s32 D_800DF46C; +extern s32 D_800DF470; +extern s32 D_800DF474; +extern s32 D_800DF478; +extern s32 D_800DF47C; +extern s32 D_800DF480; +extern s32 D_800DF484; +extern s32 D_800DF488; +extern s32 D_800DF48C; +extern s32 D_800DF490; +extern s32 gIsInAdventureTwo; +extern s32 D_800DF498; +extern s32 D_800DF49C; + +typedef struct unk800DF4A0 { + u8 pad0[0x5C]; + s32 unk5C; + s32 unk60; + u8 unk64[0xC]; + s32 unk70; + u8 pad74[0x1C]; + s32 unk90; + u8 pad94[0x30]; + s32 unkC4; + s32 unkC8; + s32 unkCC; + u8 padD0[0x48]; + s32 unk118; + u8 pad11C[0x100]; + s32 unk21C; + u8 pad220[0x8]; + s32 unk228[4]; + u8 pad238[0x24]; + s32 unk25C; + u8 pad260[0x78]; + s32 unk2D8; + s32 unk2DC; +} unk800DF4A0; + +extern unk800DF4A0* D_800DF4A0; + +extern u8 D_800DF4A4; +extern u8 D_800DF4A8; +extern u8 D_800DF4AC; + +extern s32 D_800DF4B0; +extern s32 D_800DF4B4; +extern s32 D_800DF4B8; +extern s32 D_800DF4BC; +extern s32 gIsInTwoPlayerAdventure; +extern s32 D_800DF4C4; +extern s32 D_800DF4C8; +extern s32 gSaveFileIndex; + +extern s32 D_800DF4D0; +extern s32 D_800DF4D4; +extern s8 D_800DF4D8; +extern s8 D_800DF4DC; +extern s8 D_800DF4E0; +extern s8 D_800DF4E4[4]; +extern s32 D_800DF4E8; +extern s8 D_800DF4EC; + +// Unused? +extern s32 D_800DF4F0[]; + +/* Size: 0x20 bytes */ +typedef struct unk800DF510 { + s16 unk0; + s16 unk2; + s16 unk4; + s16 unk6; + f32 unk8; + f32 unkC; + f32 unk10; + f32 unk14; + s16 unk18; + s8 unk1A; + s8 unk1B; + s8 unk1C; + s8 unk1D; + u8 pad1E[2]; +} unk800DF510; + +extern unk800DF510 D_800DF510[18]; + +extern s16 *D_800DF750[1]; +extern s16 D_800DF754; +extern s16 D_800DF758; +extern unk800DF510 *D_800DF75C; + +extern s32 D_800DF760; +extern s32 D_800DF764; +extern s32 D_800DF768; + +// Not sure about typing with these arrays. +extern s16 D_800DF76C[4]; +extern s16 D_800DF774[4]; +extern u16 D_800DF77C[12]; + +extern s32 D_800DF794; +extern s32 D_800DF798; +extern s32 D_800DF79C; + +extern s32 D_800DF7A0; +extern s32 D_800DF7A4; +extern s32 D_800DF7A8; +extern s32 D_800DF7AC; + +// Version text shown on the title screen? See 1:15 in https://www.youtube.com/watch?v=OHSCLcA74ao. +extern char gVersionDisplayText[20]; + +// Probably not unqiue to the boot menu. +typedef struct MenuBootDrawTexture { + u32* texture; // Pointer to texture to draw. TODO: Make structure for texture header. + s16 xOffset; // Offset from the center of the screen. + s16 yOffset; // Offset from the center of the screen. +} MenuBootDrawTexture; + +extern s16 D_800DF7C4[12]; + +MenuBootDrawTexture D_800DF7DC[12]; + +/* Size: 0x30 bytes */ +typedef struct unk800DF83C { + s32* unk0; // Pointer to something. + f32 unk4; + f32 unk8; + f32 unkC; + f32 unk10; + f32 unk14; + f32 unk18; + f32 unk1C; + f32 unk20; + f32 unk24; + f32 unk28; +} unk800DF83C; + +extern unk800DF83C D_800DF83C[10]; + +extern s32 D_800DF9F4; + +extern u16 D_800DF9F8[12]; + +extern char *D_800DFA10[7]; + +extern s16 D_800DFA2C[8]; + +typedef struct unk800DFA3C { + s16 unk0; + s16 unk2; + u8 unk4; + u8 unk5; + u8 unk6; + u8 unk7; + u8 unk8; + u8 unk9; + u8 unkA; + u8 unkB; + u32* unkC; +} unk800DFA3C; + +extern unk800DFA3C D_800DFA3C[8]; + +extern s32 D_800DFABC; + +extern s32 D_800DFAC0; +extern s32 D_800DFAC4; +extern s32 D_800DFAC8; + +// Unsure about typing here. +extern u16 D_800DFACC[8]; + +extern s32 D_800DFADC; +extern s32 D_800DFAE0; + + +// Unsure about typing with these arrays. +extern s32 D_800DFAE4[6]; +extern s32 D_800DFAFC[6]; +extern s32 D_800DFB14[6]; +extern s32 D_800DFB2C[5]; +extern s32 D_800DFB40[7]; +extern s32 D_800DFB5C[6]; +extern s32 D_800DFB74[6]; +extern s32 D_800DFB8C[6]; +extern s32 D_800DFBA4[6]; +extern s32 D_800DFBBC[8]; +extern s32 D_800DFBDC; + +// Unused? +extern s32* D_800DFBE0[10]; + +extern s32 D_800DFC08; +extern s32 D_800DFC0C; + +typedef struct unk800DFC10 { + u32 *unk0; + s16 unk4; + s16 unk6; + u32 *unk8; + s32 unkC; +} unk800DFC10; + +extern unk800DFC10 D_800DFC10; +extern unk800DFC10 D_800DFC20; +extern unk800DFC10 D_800DFC30; +extern unk800DFC10 D_800DFC40; +extern unk800DFC10 D_800DFC50; +extern unk800DFC10 D_800DFC60; + +// Unused? +extern u8 D_800DFC70[8]; + +extern s16 D_800DFC78[26]; + +extern s16 D_800DFCAC[4]; + +extern u16 D_800DFCB4[112]; + +extern s32 D_800DFD94; + +extern s32 gActiveMagicCodes; +extern s32 gUnlockedMagicCodes; + +extern s32 D_800DFDA0[5]; + +extern u8 D_800DFDB4[10][2]; + +extern s16 D_800DFDC8[2]; +extern s16 D_800DFDCC[2]; + +// Not sure what this is +extern s32 D_800DFDD0[28]; + +// Not sure what this is +extern s32 D_800DFE40[32]; + +// Not sure what this is +extern s32 D_800DFEC0[32]; + +// Not sure what this is +extern s32 D_800DFF40[36]; + +extern s32 D_800DFFD0; +extern s32 D_800DFFD4; + +MenuElement D_800DFFD8[14]; + +MenuElement D_800E0198[7]; + +MenuElement D_800E0278[9]; + +extern s16 D_800E0398[6]; + +extern s16 D_800E03A4[6]; + +extern u16 D_800E03B0[14]; + +extern u16 D_800E03CC[24]; + +extern u16 D_800E03FC[10]; + +extern s32 D_800E0410; +extern s32 D_800E0414; +extern s32 D_800E0418; + +extern unk800DFC10 D_800E041C; +extern unk800DFC10 D_800E042C; +extern unk800DFC10 D_800E043C; +extern unk800DFC10 D_800E044C; + +extern unk800DFC10 D_800E045C; +extern s32 D_800E046C[2]; +extern unk800DFC10 D_800E0474; +extern s32 D_800E0484[2]; +extern unk800DFC10 D_800E048C; +extern s32 D_800E049C[2]; +extern unk800DFC10 D_800E04A4; +extern s32 D_800E04B4[2]; +extern unk800DFC10 D_800E04BC; +extern s32 D_800E04CC[2]; +extern unk800DFC10 D_800E04D4; +extern unk800DFC10 D_800E04E4; +extern unk800DFC10 D_800E04F4; +extern unk800DFC10 D_800E0504; +extern unk800DFC10 D_800E0514; +extern unk800DFC10 D_800E0524; +extern unk800DFC10 D_800E0534; +extern unk800DFC10 D_800E0544; +extern unk800DFC10 D_800E0554; +extern unk800DFC10 D_800E0564; +extern unk800DFC10 D_800E0574; +extern unk800DFC10 D_800E0584; +extern unk800DFC10 D_800E0594; +extern unk800DFC10 D_800E05A4; +extern unk800DFC10 D_800E05B4; +extern unk800DFC10 D_800E05C4; + +// These are probably structs +extern s32 D_800E05D4[8]; +extern s32 D_800E05F4[8]; + +extern unk800DFC10 D_800E0614; + +extern unk800DFC10 *D_800E0624[9]; + +extern unk800DFC10 *D_800E0648[6]; + +extern unk800DFC10 *D_800E0660[6]; + +extern unk800DFC10 *D_800E0678[4]; + +extern u16 D_800E0688[20]; + +extern u16 D_800E06B0[10]; + +extern s16 D_800E06C4[8]; + +extern s16 D_800E06D4[8]; + +extern u16 D_800E06E4[14]; + +extern u16 D_800E0700[8]; + +extern s16 D_800E0710[16]; + +extern s16 D_800E0730[18]; +extern s16 D_800E0758[56]; + +extern s16 D_800E07C4[14]; + +extern s16 D_800E07E0[4]; + +extern s16 D_800E07E8[36]; + +extern s16 D_800E0830[8]; + +extern s16 D_800E0840[148]; + +extern s32 D_800E0968; +extern s32 D_800E096C; +extern s32 D_800E0970; +extern s32 D_800E0974; +extern u32* D_800E0978; +extern s32 D_800E097C; +extern s32 D_800E0980; +extern s32 D_800E0984; +extern s32 D_800E0988; +extern s32 D_800E098C; + +extern s16 D_800E0990[8]; + +extern s16 D_800E09A0[8]; + +// Not sure about typing with these. +extern s32 D_800E09B0[5]; +extern s32 D_800E09C4[5]; +extern s32 D_800E09D8[5]; +extern s32 D_800E09EC[3]; +extern s32 D_800E09F8[3]; +extern s32 D_800E0A04[3]; +extern s32 D_800E0A10; +extern s32 D_800E0A14[4]; + +extern s16 D_800E0A24[14]; + +extern s16 D_800E0A40[8]; + +extern unk800DFC10 D_800E0A50; +extern unk800DFC10 D_800E0A60; +extern unk800DFC10 D_800E0A70; +extern unk800DFC10 D_800E0A90; +extern unk800DFC10 D_800E0A80; +extern unk800DFC10 D_800E0AA0; +extern unk800DFC10 D_800E0AB0; +extern unk800DFC10 D_800E0AC0; +extern unk800DFC10 D_800E0AD0; +extern unk800DFC10 D_800E0AE0; + +extern unk800DFC10* D_800E0AF0[10]; + +extern s16 D_800E0B18[74]; + +extern char gFirstPlace[4]; +extern char gSecondPlace[4]; +extern char gThirdPlace[4]; +extern char gFourthPlace[4]; +extern char gFifthPlace[4]; +extern char gSixthPlace[4]; +extern char gSeventhPlace[4]; +extern char gEighthPlace[4]; + +extern char *D_800E0BCC[8]; + +MenuElement D_800E0BEC[8]; + +MenuElement D_800E0CEC[11]; + +MenuElement D_800E0E4C[9]; + +// Valid characters for name input. Must be u8, not char. +extern u8 D_800E0F6C[32]; + +extern s32 D_800E0F8C; +extern s32 D_800E0F90; +extern s32 D_800E0F94; +extern s32 D_800E0F98; +extern s32 D_800E0F9C; +extern s32 D_800E0FA0; +extern s32 D_800E0FA4; +extern char D_800E0FA8[4]; +extern s32 D_800E0FAC; +extern s32 D_800E0FB0; + +extern s16 D_800E0FB4[18]; + +extern s16 D_800E0FD8[6]; + +extern s32 D_800E0FE4; +extern s32 gTrophyRaceWorldId; +extern s32 D_800E0FEC; +extern s32 D_800E0FF0; + +// Unused? Not sure what this is. +extern u32 D_800E0FF4[4]; + +// Number of points to award in trophy race for each place? +extern s32 D_800E1004[8]; + +extern s16 D_800E1024[14]; + +extern s32 D_800E1040; +extern s16 D_800E1044; + +MenuElement D_800E1048[9][3]; + +extern s16 D_800E13A8[138]; + +extern s16* D_800E14BC[32]; + +// Not sure what these arrays are supposed to be +extern s32 D_800E153C[10]; +extern s32 D_800E1564[12]; +extern s32 D_800E1594[10]; +extern s32 D_800E15BC[12]; +extern s32 D_800E15EC[10]; +extern s32 D_800E1614[12]; +extern s32 D_800E1644[10]; +extern s32 D_800E166C[12]; +extern s32 D_800E169C[10]; +extern s32 D_800E16C4[12]; + +extern s32 *D_800E16F4[5]; + +extern s16 D_800E1708[34]; + +extern s16 D_800E174C[4]; + +extern s16 D_800E1754[10]; + +extern s16 D_800E1768[12]; + +// Fast3D (F3DDKR) display list +extern u32 D_800E1780[22]; + +extern s16 D_800E17D8[12]; + +extern s16 D_800E17F0[2]; + +extern s16 D_800E17F4[130]; + +extern u16 D_800E18F8; + +// Unused? +extern u16 D_800E18FC[30]; + +// Credits text look-up table +extern char *D_800E1938[87]; + +// Credits text look-up table (time trials time sheet) +extern char *D_800E1A94[20]; + +// Another credits text look-up table +extern char *D_800E1AE4[5]; + +extern s32 D_800E1AF8[21]; + +extern s32 D_800E1B4C; + +MenuElement D_800E1B50[9]; + +// Fast3D (F3DDKR) display list +extern u32 D_800E1C70[24]; + +extern s8 D_800E1CD0[32]; + +extern s8 D_800E1CF0[60]; + +extern u16 D_800E1D2C[40]; + +extern s16 D_800E1D7C[20]; + +extern s32 *D_800E1DA4[2]; + +extern s32 *D_800E1DAC[2]; + +extern s32 D_800E1DB4; +extern s32 D_800E1DB8; +extern s32 D_800E1DBC; + +extern s32 D_800E1DC0; +extern s32 D_800E1DC4; + +extern s16 D_800E1DC8[16]; + +extern s16 D_800E1DE8[4]; + +extern char D_800E1DF0[24]; + +extern s16 D_800E1E08[4]; + +extern s32 *D_800E1E10; + +extern s32 D_800E1E14; +extern s32 D_800E1E18; +extern s32 D_800E1E1C; + +extern s8 D_800E1E20[8]; + +extern s8 D_800E1E28; + +extern s16 D_800E1E2C[10]; + +extern s16 D_800E1E40[10]; + +#endif diff --git a/src/unknown_080500.c b/src/unknown_080500.c index 777ff80c..bbbc3b90 100644 --- a/src/unknown_080500.c +++ b/src/unknown_080500.c @@ -1,6 +1,8 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x8007F900 */ +#include "unknown_080500.h" + #include "types.h" #include "macros.h" #include "structs.h" @@ -63,31 +65,6 @@ s32 gIsInAdventureTwo = 0; s32 D_800DF498 = 0; s32 D_800DF49C = 0; // Currently unknown, might be a different type. -typedef struct unk800DF4A0 { - u8 pad0[0x5C]; - s32 unk5C; - s32 unk60; - u8 unk64[0xC]; - s32 unk70; - u8 pad74[0x1C]; - s32 unk90; - u8 pad94[0x30]; - s32 unkC4; - s32 unkC8; - s32 unkCC; - u8 padD0[0x48]; - s32 unk118; - u8 pad11C[0x100]; - s32 unk21C; - u8 pad220[0x8]; - s32 unk228[4]; - u8 pad238[0x24]; - s32 unk25C; - u8 pad260[0x78]; - s32 unk2D8; - s32 unk2DC; -} unk800DF4A0; - unk800DF4A0* D_800DF4A0 = NULL; u8 D_800DF4A4 = 0xFF; @@ -120,24 +97,6 @@ s32 D_800DF4F0[] = { 0x8000, 0x10, 0x400, 0x00 }; -/* Size: 0x20 bytes */ -typedef struct unk800DF510 { - s16 unk0; - s16 unk2; - s16 unk4; - s16 unk6; - f32 unk8; - f32 unkC; - f32 unk10; - f32 unk14; - s16 unk18; - s8 unk1A; - s8 unk1B; - s8 unk1C; - s8 unk1D; - u8 pad1E[2]; -} unk800DF510; - unk800DF510 D_800DF510[18] = { { 0, 0, 0, 0x00, 1.0f, 0.0f, 0.0f, -32.0f, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0x01, 1.0f, 0.0f, 0.0f, -32.0f, 0, 0, 0, 0, 0 }, @@ -193,13 +152,6 @@ s32 D_800DF7AC = 0; // Currently unknown, might be a different type. // Version text shown on the title screen? See 1:15 in https://www.youtube.com/watch?v=OHSCLcA74ao. char gVersionDisplayText[20] = "VERSION XXXXXXXX"; -// Probably not unqiue to the boot menu. -typedef struct MenuBootDrawTexture { - u32* texture; // Pointer to texture to draw. TODO: Make structure for texture header. - s16 xOffset; // Offset from the center of the screen. - s16 yOffset; // Offset from the center of the screen. -} MenuBootDrawTexture; - s16 D_800DF7C4[12] = { 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, @@ -221,21 +173,6 @@ MenuBootDrawTexture D_800DF7DC[12] = { { NULL, 0, 0 } }; -/* Size: 0x30 bytes */ -typedef struct unk800DF83C { - s32* unk0; // Pointer to something. - f32 unk4; - f32 unk8; - f32 unkC; - f32 unk10; - f32 unk14; - f32 unk18; - f32 unk1C; - f32 unk20; - f32 unk24; - f32 unk28; -} unk800DF83C; - unk800DF83C D_800DF83C[10] = { { (s32*)0x800E7CB0, 14.0f, 14.5f, 16.5f, 17.0f, -80.0f, 208.0f, 160.0f, 208.0f, 400.0f, 208.0f }, { (s32*)0x800E7CB8, 19.0f, 19.5f, 21.5f, 22.0f, -80.0f, 208.0f, 160.0f, 208.0f, 400.0f, 208.0f }, @@ -265,20 +202,6 @@ s16 D_800DFA2C[8] = { 0x3D, 0x3C, 0x3F, 0x3E, 0x44, -1, -1, 0 }; -typedef struct unk800DFA3C { - s16 unk0; - s16 unk2; - u8 unk4; - u8 unk5; - u8 unk6; - u8 unk7; - u8 unk8; - u8 unk9; - u8 unkA; - u8 unkB; - u32* unkC; -} unk800DFA3C; - unk800DFA3C D_800DFA3C[8] = { { 160, 80, 0xFF, 0xFF, 0xFF, 0, 0xFF, 0, 0, 12, NULL }, { 160, 104, 0xFF, 0xFF, 0xFF, 0, 0xFF, 0, 0, 12, NULL }, @@ -329,14 +252,6 @@ s32* D_800DFBE0[10] = { s32 D_800DFC08 = 0; // Currently unknown, might be a different type. s32 D_800DFC0C = 0xFFFF; // Currently unknown, might be a different type. -typedef struct unk800DFC10 { - u32 *unk0; - s16 unk4; - s16 unk6; - u32 *unk8; - s32 unkC; -} unk800DFC10; - unk800DFC10 D_800DFC10 = { NULL, 0, 0, NULL, 0 }; unk800DFC10 D_800DFC20 = { NULL, 0, 0, NULL, 0 }; unk800DFC10 D_800DFC30 = { NULL, 0, 0, NULL, 0 }; diff --git a/undefined_syms.txt b/undefined_syms.txt index 0e903027..237e087a 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -72,71 +72,6 @@ D_800DD434 = 0x800DD434; D_800DD438 = 0x800DD438; D_800DD43C = 0x800DD43C; D_800DDC3E = 0x800DDC3E; -D_800DF450 = 0x800DF450; -D_800DF454 = 0x800DF454; -D_800DF458 = 0x800DF458; -D_800DF45C = 0x800DF45C; -D_800DF460 = 0x800DF460; -D_800DF468 = 0x800DF468; -D_800DF46C = 0x800DF46C; -D_800DF470 = 0x800DF470; -D_800DF478 = 0x800DF478; -D_800DF47C = 0x800DF47C; -D_800DF480 = 0x800DF480; -D_800DF484 = 0x800DF484; -D_800DF488 = 0x800DF488; -gIsInAdventureTwo = 0x800DF494; -D_800DF498 = 0x800DF498; -D_800DF49C = 0x800DF49C; -D_800DF4A0 = 0x800DF4A0; -D_800DF4A4 = 0x800DF4A4; -D_800DF4A8 = 0x800DF4A8; -D_800DF4AC = 0x800DF4AC; -D_800DF4B0 = 0x800DF4B0; -D_800DF4B4 = 0x800DF4B4; -D_800DF4B8 = 0x800DF4B8; -D_800DF4BC = 0x800DF4BC; -gIsInTwoPlayerAdventure = 0x800DF4C0; -D_800DF4C4 = 0x800DF4C4; -D_800DF4C8 = 0x800DF4C8; -gSaveFileIndex = 0x800DF4CC; -D_800DF4D4 = 0x800DF4D4; -D_800DF4D8 = 0x800DF4D8; -D_800DF4DC = 0x800DF4DC; -D_800DF4E0 = 0x800DF4E0; -D_800DF4E4 = 0x800DF4E4; -D_800DF4E7 = 0x800DF4E7; -D_800DF4EC = 0x800DF4EC; -D_800DF510 = 0x800DF510; -D_800DF598 = 0x800DF598; -D_800DF750 = 0x800DF750; -D_800DF754 = 0x800DF754; -D_800DF758 = 0x800DF758; -D_800DF75C = 0x800DF75C; -D_800DF760 = 0x800DF760; -D_800DF763 = 0x800DF763; -D_800DF764 = 0x800DF764; -D_800DF76C = 0x800DF76C; -D_800DF774 = 0x800DF774; -D_800DF77C = 0x800DF77C; -D_800DF794 = 0x800DF794; -D_800DF798 = 0x800DF798; -D_800DF79C = 0x800DF79C; -D_800DF7A0 = 0x800DF7A0; -D_800DF7A4 = 0x800DF7A4; -D_800DF7C4 = 0x800DF7C4; -D_800DF7C6 = 0x800DF7C6; -D_800DF7C8 = 0x800DF7C8; -D_800DF7CA = 0x800DF7CA; -D_800DF7DA = 0x800DF7DA; -D_800DF7DC = 0x800DF7DC; -D_800DF7E4 = 0x800DF7E4; -D_800DF7EC = 0x800DF7EC; -D_800DF7F4 = 0x800DF7F4; -D_800DF83C = 0x800DF83C; -D_800DF9F4 = 0x800DF9F4; -D_800DF9F8 = 0x800DF9F8; -D_800DFA10 = 0x800DFA10; D_800DFA14 = 0x800DFA14; D_800DFA2C = 0x800DFA2C; D_800DFA38 = 0x800DFA38; From 8d46c31ba4b2ea6d244b455c8a92cb11d15998bf Mon Sep 17 00:00:00 2001 From: Antonio Castelli Date: Sun, 6 Jun 2021 15:51:44 -0700 Subject: [PATCH 33/33] Cleaned up hard-coded array/struct accessing in asm. --- .../unknown_066AA0/func_80068158.s | 5 ++- .../unknown_066AA0/func_800682AC.s | 5 ++- .../unknown_080500/MenuBootInit.s | 33 ++++++++----------- .../unknown_080500/MenuTitleScreenInit.s | 33 ++++++++----------- .../unknown_080500/func_8008DC7C.s | 5 ++- .../unknown_080500/func_80094D28.s | 5 ++- .../unknown_080500/func_80095728.s | 5 ++- 7 files changed, 38 insertions(+), 53 deletions(-) diff --git a/asm/non_matchings/unknown_066AA0/func_80068158.s b/asm/non_matchings/unknown_066AA0/func_80068158.s index c674bf82..592326a1 100644 --- a/asm/non_matchings/unknown_066AA0/func_80068158.s +++ b/asm/non_matchings/unknown_066AA0/func_80068158.s @@ -25,15 +25,14 @@ glabel func_80068158 /* 068DAC 800681AC 00053023 */ negu $a2, $a1 .L800681B0: /* 068DB0 800681B0 8CE50000 */ lw $a1, ($a3) -# Accessing D_800DD064[*].unk30. -/* 068DB4 800681B4 3C19800E */ lui $t9, %hi(D_800DD064) # $t9, 0x800e +/* 068DB4 800681B4 3C19800E */ lui $t9, %hi(D_800DD064+0x30) # $t9, 0x800e /* 068DB8 800681B8 0005C080 */ sll $t8, $a1, 2 /* 068DBC 800681BC 0305C023 */ subu $t8, $t8, $a1 /* 068DC0 800681C0 0018C080 */ sll $t8, $t8, 2 /* 068DC4 800681C4 0305C021 */ addu $t8, $t8, $a1 /* 068DC8 800681C8 0018C080 */ sll $t8, $t8, 2 /* 068DCC 800681CC 0338C821 */ addu $t9, $t9, $t8 -/* 068DD0 800681D0 8F39D094 */ lw $t9, -0x2f6c($t9) +/* 068DD0 800681D0 8F39D094 */ lw $t9, %lo(D_800DD064+0x30)($t9) /* 068DD4 800681D4 3C0A800E */ lui $t2, %hi(D_800DD148) # $t2, 0x800e /* 068DD8 800681D8 332B0001 */ andi $t3, $t9, 1 /* 068DDC 800681DC 1560001A */ bnez $t3, .L80068248 diff --git a/asm/non_matchings/unknown_066AA0/func_800682AC.s b/asm/non_matchings/unknown_066AA0/func_800682AC.s index 1e8715c7..ff85466f 100644 --- a/asm/non_matchings/unknown_066AA0/func_800682AC.s +++ b/asm/non_matchings/unknown_066AA0/func_800682AC.s @@ -8,15 +8,14 @@ glabel func_800682AC /* 068EC4 800682C4 AFA40020 */ sw $a0, 0x20($sp) /* 068EC8 800682C8 3C0F8012 */ lui $t7, %hi(D_80120CE4) # $t7, 0x8012 /* 068ECC 800682CC 8DEF0CE4 */ lw $t7, %lo(D_80120CE4)($t7) -# Accessing D_800DD064[*].unk30. -/* 068ED0 800682D0 3C19800E */ lui $t9, %hi(D_800DD064) # $t9, 0x800e +/* 068ED0 800682D0 3C19800E */ lui $t9, %hi(D_800DD064+0x30) # $t9, 0x800e /* 068ED4 800682D4 000FC080 */ sll $t8, $t7, 2 /* 068ED8 800682D8 030FC023 */ subu $t8, $t8, $t7 /* 068EDC 800682DC 0018C080 */ sll $t8, $t8, 2 /* 068EE0 800682E0 030FC021 */ addu $t8, $t8, $t7 /* 068EE4 800682E4 0018C080 */ sll $t8, $t8, 2 /* 068EE8 800682E8 0338C821 */ addu $t9, $t9, $t8 -/* 068EEC 800682EC 8F39D094 */ lw $t9, -0x2f6c($t9) +/* 068EEC 800682EC 8F39D094 */ lw $t9, %lo(D_800DD064+0x30)($t9) /* 068EF0 800682F0 8FA40020 */ lw $a0, 0x20($sp) /* 068EF4 800682F4 332A0001 */ andi $t2, $t9, 1 /* 068EF8 800682F8 00024402 */ srl $t0, $v0, 0x10 diff --git a/asm/non_matchings/unknown_080500/MenuBootInit.s b/asm/non_matchings/unknown_080500/MenuBootInit.s index 29032a69..5e5d3af9 100644 --- a/asm/non_matchings/unknown_080500/MenuBootInit.s +++ b/asm/non_matchings/unknown_080500/MenuBootInit.s @@ -15,37 +15,32 @@ glabel menu_boot_init /* 089128 80088528 85CEF7C4 */ lh $t6, %lo(D_800DF7C4)($t6) /* 08912C 8008852C 3C048012 */ lui $a0, %hi(D_80126550) # $a0, 0x8012 /* 089130 80088530 24846550 */ addiu $a0, %lo(D_80126550) # addiu $a0, $a0, 0x6550 -# Accessing D_800DF7C4[1]. -/* 089134 80088534 3C08800E */ lui $t0, %hi(D_800DF7C4) # $t0, 0x800e +/* 089134 80088534 3C08800E */ lui $t0, %hi(D_800DF7C4+2) # $t0, 0x800e /* 089138 80088538 000E7880 */ sll $t7, $t6, 2 -/* 08913C 8008853C 8508F7C6 */ lh $t0, -0x83a($t0) +/* 08913C 8008853C 8508F7C6 */ lh $t0, %lo(D_800DF7C4+2)($t0) /* 089140 80088540 008FC021 */ addu $t8, $a0, $t7 /* 089144 80088544 8F190000 */ lw $t9, ($t8) /* 089148 80088548 3C01800E */ lui $at, %hi(D_800DF7DC) # $at, 0x800e -# Accessing D_800DF7C4[2]. -/* 08914C 8008854C 3C0C800E */ lui $t4, %hi(D_800DF7C4) # $t4, 0x800e +/* 08914C 8008854C 3C0C800E */ lui $t4, %hi(D_800DF7C4+4) # $t4, 0x800e /* 089150 80088550 00084880 */ sll $t1, $t0, 2 -/* 089154 80088554 858CF7C8 */ lh $t4, -0x838($t4) +/* 089154 80088554 858CF7C8 */ lh $t4, %lo(D_800DF7C4+4)($t4) /* 089158 80088558 00895021 */ addu $t2, $a0, $t1 /* 08915C 8008855C AC39F7DC */ sw $t9, %lo(D_800DF7DC)($at) /* 089160 80088560 8D4B0000 */ lw $t3, ($t2) -# Accessing D_800DF7DC[1] (instr 089170) and D_800DF7DC[2] (instr 089190). -/* 089164 80088564 3C01800E */ lui $at, %hi(D_800DF7DC) # $at, 0x800e +# Accessing D_800DF7DC[1] and D_800DF7DC[2]. +/* 089164 80088564 3C01800E */ lui $at, %hi(D_800DF7DC+8) # $at, 0x800e /* 089168 80088568 000C6880 */ sll $t5, $t4, 2 /* 08916C 8008856C 008D7021 */ addu $t6, $a0, $t5 -/* 089170 80088570 AC2BF7E4 */ sw $t3, -0x81c($at) +/* 089170 80088570 AC2BF7E4 */ sw $t3, %lo(D_800DF7DC+8)($at) /* 089174 80088574 8DCF0000 */ lw $t7, ($t6) # The extra lui is here. -# Accessing D_800DF7DC[3]. -/* 089178 80088578 3C03800E */ lui $v1, %hi(D_800DF7DC) # $v1, 0x800e -# Accessing D_800DF7C4[3]. -/* 08917C 8008857C 3C02800E */ lui $v0, %hi(D_800DF7C4) # $v0, 0x800e -# Accessing D_800DF7C4[11]. -/* 089180 80088580 3C05800E */ lui $a1, %hi(D_800DF7C4) # $a1, 0x800e -/* 089184 80088584 24A5F7DA */ addiu $a1, $a1, -0x826 -/* 089188 80088588 2442F7CA */ addiu $v0, $v0, -0x836 -/* 08918C 8008858C 2463F7F4 */ addiu $v1, $v1, -0x80c -/* 089190 80088590 AC2FF7EC */ sw $t7, -0x814($at) +/* 089178 80088578 3C03800E */ lui $v1, %hi(D_800DF7DC+0x18) # $v1, 0x800e +/* 08917C 8008857C 3C02800E */ lui $v0, %hi(D_800DF7C4+6) # $v0, 0x800e +/* 089180 80088580 3C05800E */ lui $a1, %hi(D_800DF7C4+22) # $a1, 0x800e +/* 089184 80088584 24A5F7DA */ addiu $a1, %lo(D_800DF7C4+22) # addiu $a1, $a1, -0x826 +/* 089188 80088588 2442F7CA */ addiu $v0, %lo(D_800DF7C4+6) # addiu $v0, $v0, -0x836 +/* 08918C 8008858C 2463F7F4 */ addiu $v1, %lo(D_800DF7DC+0x18) # addiu $v1, $v1, -0x80c +/* 089190 80088590 AC2FF7EC */ sw $t7, %lo(D_800DF7DC+0x10)($at) .L80088594: /* 089194 80088594 84580000 */ lh $t8, ($v0) /* 089198 80088598 844A0002 */ lh $t2, 2($v0) diff --git a/asm/non_matchings/unknown_080500/MenuTitleScreenInit.s b/asm/non_matchings/unknown_080500/MenuTitleScreenInit.s index 9bd40d84..6bacda95 100644 --- a/asm/non_matchings/unknown_080500/MenuTitleScreenInit.s +++ b/asm/non_matchings/unknown_080500/MenuTitleScreenInit.s @@ -49,36 +49,31 @@ glabel MenuTitleScreenInit /* 0841F0 800835F0 8508F7C4 */ lh $t0, %lo(D_800DF7C4)($t0) /* 0841F4 800835F4 3C048012 */ lui $a0, %hi(D_80126550) # $a0, 0x8012 /* 0841F8 800835F8 24846550 */ addiu $a0, %lo(D_80126550) # addiu $a0, $a0, 0x6550 -# Accessing D_800DF7C4[1]. -/* 0841FC 800835FC 3C0C800E */ lui $t4, %hi(D_800DF7C4) # $t4, 0x800e +/* 0841FC 800835FC 3C0C800E */ lui $t4, %hi(D_800DF7C4+2) # $t4, 0x800e /* 084200 80083600 00084880 */ sll $t1, $t0, 2 -/* 084204 80083604 858CF7C6 */ lh $t4, -0x83a($t4) +/* 084204 80083604 858CF7C6 */ lh $t4, %lo(D_800DF7C4+2)($t4) /* 084208 80083608 00895021 */ addu $t2, $a0, $t1 /* 08420C 8008360C 8D4B0000 */ lw $t3, ($t2) /* 084210 80083610 3C01800E */ lui $at, %hi(D_800DF7DC) # $at, 0x800e -# Accessing D_800DF7C4[2]. -/* 084214 80083614 3C18800E */ lui $t8, %hi(D_800DF7C4) # $t8, 0x800e +/* 084214 80083614 3C18800E */ lui $t8, %hi(D_800DF7C4+4) # $t8, 0x800e /* 084218 80083618 000C6880 */ sll $t5, $t4, 2 -/* 08421C 8008361C 8718F7C8 */ lh $t8, -0x838($t8) +/* 08421C 8008361C 8718F7C8 */ lh $t8, %lo(D_800DF7C4+4)($t8) /* 084220 80083620 008D7021 */ addu $t6, $a0, $t5 /* 084224 80083624 AC2BF7DC */ sw $t3, %lo(D_800DF7DC)($at) /* 084228 80083628 8DCF0000 */ lw $t7, ($t6) -# Accessing D_800DF7DC[1] (instr 084238) and D_800DF7DC[2] (instr 084258). -/* 08422C 8008362C 3C01800E */ lui $at, %hi(D_800DF7DC) # $at, 0x800e +# Accessing D_800DF7DC[1] and D_800DF7DC[2]. +/* 08422C 8008362C 3C01800E */ lui $at, %hi(D_800DF7DC+8) # $at, 0x800e /* 084230 80083630 0018C880 */ sll $t9, $t8, 2 /* 084234 80083634 00994021 */ addu $t0, $a0, $t9 -/* 084238 80083638 AC2FF7E4 */ sw $t7, -0x81c($at) +/* 084238 80083638 AC2FF7E4 */ sw $t7, %lo(D_800DF7DC+8)($at) /* 08423C 8008363C 8D090000 */ lw $t1, ($t0) -# Accessing D_800DF7DC[3]. -/* 084240 80083640 3C03800E */ lui $v1, %hi(D_800DF7DC) # $v1, 0x800e -# Accessing D_800DF7C4[3]. -/* 084244 80083644 3C02800E */ lui $v0, %hi(D_800DF7C4) # $v0, 0x800e -# Accessing D_800DF7C4[11]. -/* 084248 80083648 3C05800E */ lui $a1, %hi(D_800DF7C4) # $a1, 0x800e -/* 08424C 8008364C 24A5F7DA */ addiu $a1, $a1, -0x826 -/* 084250 80083650 2442F7CA */ addiu $v0, $v0, -0x836 -/* 084254 80083654 2463F7F4 */ addiu $v1, $v1, -0x80c -/* 084258 80083658 AC29F7EC */ sw $t1, -0x814($at) +/* 084240 80083640 3C03800E */ lui $v1, %hi(D_800DF7DC+0x18) # $v1, 0x800e +/* 084244 80083644 3C02800E */ lui $v0, %hi(D_800DF7C4+6) # $v0, 0x800e +/* 084248 80083648 3C05800E */ lui $a1, %hi(D_800DF7C4+22) # $a1, 0x800e +/* 08424C 8008364C 24A5F7DA */ addiu $a1, %lo(D_800DF7C4+22) # addiu $a1, $a1, -0x826 +/* 084250 80083650 2442F7CA */ addiu $v0, %lo(D_800DF7C4+6) # addiu $v0, $v0, -0x836 +/* 084254 80083654 2463F7F4 */ addiu $v1, %lo(D_800DF7DC+0x18) # addiu $v1, $v1, -0x80c +/* 084258 80083658 AC29F7EC */ sw $t1, %lo(D_800DF7DC+0x10)($at) .L8008365C: /* 08425C 8008365C 844A0000 */ lh $t2, ($v0) /* 084260 80083660 844E0002 */ lh $t6, 2($v0) diff --git a/asm/non_matchings/unknown_080500/func_8008DC7C.s b/asm/non_matchings/unknown_080500/func_8008DC7C.s index 16aa02c3..d3330b66 100644 --- a/asm/non_matchings/unknown_080500/func_8008DC7C.s +++ b/asm/non_matchings/unknown_080500/func_8008DC7C.s @@ -41,13 +41,12 @@ glabel func_8008DC7C /* 08E910 8008DD10 3C068012 */ lui $a2, %hi(D_8012648C) # $a2, 0x8012 /* 08E914 8008DD14 24C6648C */ addiu $a2, %lo(D_8012648C) # addiu $a2, $a2, 0x648c /* 08E918 8008DD18 8CC90000 */ lw $t1, ($a2) -# This is accessing unk801264A0->unk1 -/* 08E91C 8008DD1C 3C0B8012 */ lui $t3, 0x8012 +/* 08E91C 8008DD1C 3C0B8012 */ lui $t3, %hi(D_801264A0+1) # $t3, 0x8012 /* 08E920 8008DD20 00095080 */ sll $t2, $t1, 2 /* 08E924 8008DD24 01495023 */ subu $t2, $t2, $t1 /* 08E928 8008DD28 000A5080 */ sll $t2, $t2, 2 /* 08E92C 8008DD2C 016A5821 */ addu $t3, $t3, $t2 -/* 08E930 8008DD30 916B64A1 */ lbu $t3, 0x64a1($t3) +/* 08E930 8008DD30 916B64A1 */ lbu $t3, %lo(D_801264A0+1)($t3) /* 08E934 8008DD34 00002825 */ move $a1, $zero /* 08E938 8008DD38 11600007 */ beqz $t3, .L8008DD58 /* 08E93C 8008DD3C 24040241 */ li $a0, 577 diff --git a/asm/non_matchings/unknown_080500/func_80094D28.s b/asm/non_matchings/unknown_080500/func_80094D28.s index 384ee533..69daeacc 100644 --- a/asm/non_matchings/unknown_080500/func_80094D28.s +++ b/asm/non_matchings/unknown_080500/func_80094D28.s @@ -166,10 +166,9 @@ glabel func_80094D28 /* 095B84 80094F84 3C014000 */ li $at, 0x40000000 # 2.000000 /* 095B88 80094F88 46803220 */ cvt.s.w $f8, $f6 /* 095B8C 80094F8C 44813000 */ mtc1 $at, $f6 -# Accessing D_800DF510[4].unk8. -/* 095B90 80094F90 3C01800E */ lui $at, %hi(D_800DF510) # $at, 0x800e +/* 095B90 80094F90 3C01800E */ lui $at, %hi(D_800DF510+4*0x20+8) # $at, 0x800e /* 095B94 80094F94 E5880090 */ swc1 $f8, 0x90($t4) -/* 095B98 80094F98 C42AF598 */ lwc1 $f10, -0xa68($at) +/* 095B98 80094F98 C42AF598 */ lwc1 $f10, %lo(D_800DF510+4*0x20+8)($at) /* 095B9C 80094F9C 46043201 */ sub.s $f8, $f6, $f4 /* 095BA0 80094FA0 8C4D0000 */ lw $t5, ($v0) /* 095BA4 80094FA4 46085402 */ mul.s $f16, $f10, $f8 diff --git a/asm/non_matchings/unknown_080500/func_80095728.s b/asm/non_matchings/unknown_080500/func_80095728.s index 87a25787..b75dff02 100644 --- a/asm/non_matchings/unknown_080500/func_80095728.s +++ b/asm/non_matchings/unknown_080500/func_80095728.s @@ -207,11 +207,10 @@ glabel func_80095728 /* 096620 80095A20 E584008C */ swc1 $f4, 0x8c($t4) /* 096624 80095A24 8C4D0000 */ lw $t5, ($v0) /* 096628 80095A28 44813000 */ mtc1 $at, $f6 -# Accessing D_800DF510[4].unk8. -/* 09662C 80095A2C 3C01800E */ lui $at, %hi(D_800DF510) # $at, 0x800e +/* 09662C 80095A2C 3C01800E */ lui $at, %hi(D_800DF510+4*0x20+8) # $at, 0x800e /* 096630 80095A30 E5A60090 */ swc1 $f6, 0x90($t5) /* 096634 80095A34 8C4E0000 */ lw $t6, ($v0) -/* 096638 80095A38 C428F598 */ lwc1 $f8, -0xa68($at) +/* 096638 80095A38 C428F598 */ lwc1 $f8, %lo(D_800DF510+4*0x20+8)($at) /* 09663C 80095A3C 00000000 */ nop /* 096640 80095A40 E5C80088 */ swc1 $f8, 0x88($t6) /* 096644 80095A44 8FAF002C */ lw $t7, 0x2c($sp)