diff --git a/include/structs.h b/include/structs.h index 778f2957be..48c59fa502 100644 --- a/include/structs.h +++ b/include/structs.h @@ -93,6 +93,12 @@ typedef struct s800E03A0_s { /* 000 */ u8 pad[32]; } s800E03A0; +// This struct is huge! Global context? +typedef struct s800F4F54_s { + /* 00000 */ u8 pad[92152]; + /* 92152 */ u8 unk92152; +} s800F4F54; + // TODO everything past here should be placed in an appropiate libultra header typedef long Mtx_t[4][4]; diff --git a/include/variables.h b/include/variables.h index 1fd0b7e46c..5540fe8c8b 100644 --- a/include/variables.h +++ b/include/variables.h @@ -346,9 +346,9 @@ //extern UNK_TYPE D_00ABFC00; //extern UNK_TYPE D_00AC0000; //extern UNK_TYPE D_00AC0480; -//extern UNK_TYPE D_00AC4000; +extern UNK_TYPE D_00AC4000; //extern UNK_TYPE D_00ACA000; -//extern UNK_TYPE D_00ACC000; +extern UNK_TYPE D_00ACC000; //extern UNK_TYPE D_00AD1000; //extern UNK_TYPE D_00B3B000; extern UNK_TYPE D_00B3C000; // D_00B3C000 @@ -2400,7 +2400,7 @@ extern s800E03A0 D_801B9F20; // D_801B9F20 //extern UNK_TYPE D_801BDB00; //extern UNK_TYPE D_801BDB08; //extern UNK_TYPE D_801BDB18; -//extern UNK_TYPE D_801BDB30; +extern u8 D_801BDB30[]; //extern UNK_TYPE D_801BDB90; //extern UNK_TYPE D_801BDB94; //extern UNK_TYPE D_801BDB98; diff --git a/src/code/code_0x800F4F40.c.ignore b/src/code/code_0x800F4F40.c.ignore new file mode 100644 index 0000000000..65830b4df4 --- /dev/null +++ b/src/code/code_0x800F4F40.c.ignore @@ -0,0 +1,33 @@ +#include +#include + +void func_800F4F40(UNK_TYPE a0, UNK_TYPE a1, UNK_TYPE a2) { + +} + +void func_800F4F54(s800F4F54* a0, u8 a1, UNK_TYPE a2) { + u32 arg0 = (u32)a0 + a0->unk92152 * (15 * 1024) + a2 + 19056; + u32 arg1 = ((a1 * 128) - 4096) + (u32)&D_00ACC000; + func_80080C90(arg0, arg1, 128); +} + +void func_800F4FC0(UNK_TYPE a0, u16 a1) { + func_80080C90(a0 + 30720, (a1 * 128 + 20480) + (u32)&D_00AC4000, 128); +} + +void func_800F5004(UNK_TYPE a0) { + u8* s0 = D_801BDB30; + u32 s1 = a0 + 30848; + u32 v1; + + while (1) { + v1 = (*s0)*128; + if (*s0 == 0) { + v1 = 0; + } + func_80080C90(s1, v1 + (u32)&D_00AC4000, 128); + s1 += 128; + if (*s0 == 140) break; + s0++; + } +} diff --git a/variables.py b/variables.py index 2b55b3651d..23b2cc83a1 100644 --- a/variables.py +++ b/variables.py @@ -1,4 +1,6 @@ known_vars = { + 0x00AC4000:("","UNK_TYPE",False), # this seems low + 0x00ACC000:("","UNK_TYPE",False), # this seems low 0x00B3C000:("","UNK_TYPE",False), # this seems low 0x00C7A4E0:("","UNK_TYPE",False), # this seems low 0x80000300:("osTvType","UNK_TYPE",False), # this seems low, but maybe it's set on boot? @@ -106,6 +108,7 @@ known_vars = { 0x801AEFD0:("","s800BF9A0_s",False), 0x801B4610:("","UNK_TYPE",False), 0x801B9F20:("","s800E03A0",False), # actually an array of size 23? + 0x801BDB30:("","u8",True), 0x801DCBB0:("","UNK_TYPE",False), 0x801DCBC4:("","UNK_TYPE",False), 0x801DCBE4:("","UNK_TYPE",False), @@ -114,11 +117,11 @@ known_vars = { 0x801ED930:("","UNK_TYPE",False), 0x801ED940:("","UNK_TYPE",False), 0x80208EA0:("","UNK_TYPE",False), - + # En_Test 0x808637D0:("","f32",False) } - + # these are extra variables needed for one reason or another, they should probably be deleted if possible extra_vars = ( ("D_800980D0_","UNK_PTR"), # needed to match?