Making progress with undefined_syms

This commit is contained in:
David Benepe
2021-06-06 14:26:03 -05:00
parent 0886355f10
commit 808c62ee29
7 changed files with 70 additions and 1514 deletions
@@ -25,14 +25,14 @@ 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
/* 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, %lo(D_800DD094)($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
@@ -8,14 +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)
/* 068ED0 800682D0 3C19800E */ lui $t9, %hi(D_800DD094) # $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, %lo(D_800DD094)($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
+7 -4
View File
@@ -64,13 +64,16 @@ 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] = {
0x0000, 0x0301, 0x0000, 0x0000,
0xFFFF, 0xFFFF, 0x0000, 0xFFFF,
+16 -24
View File
@@ -45,40 +45,32 @@ s32 D_800DCC34[19] = {
0, 0, 0
};
s32 D_800DCC80[19] = {
s32 D_800DCC80[13] = {
0, 26, 27, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0
0, 0, 0, 0, 0
};
// Unused?
s16 D_800DCCB4[6] = {
s16 D_800DCCB4[12] = {
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0
};
u16 D_800DCCCC[20] = {
0x010C, 0x010B, 0x0009, 0x010C,
0x010C, 0x010C
0x010C, 0x010C, 0x010C, 0x010C,
0x010C, 0x010C, 0x010C, 0x0005,
0x010C, 0x010C, 0x010C, 0x010C,
0x010C, 0x010C, 0x010C, 0x0000
};
u16 D_800DCCCC[14] = {
0x010C, 0x010C, 0x010C, 0x010C,
0x010C, 0x0005, 0x010C, 0x010C,
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
};
// 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,
s32 D_800DCD40[20] = {
0, 4, 16, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0x100, 0, 0, 0, 0,
0, 0
};
+2
View File
@@ -48,6 +48,8 @@ s8 D_800E3710[48] = {
OSDevMgr __osPiDevMgr = { 0, NULL, NULL, NULL, NULL, NULL, NULL };
s32 pad800E375C = 0; // File boundary?
u8* D_800E3760 = NULL;
u8* D_800E3764 = NULL;
u8* gzip_inflate_input = NULL;
+37
View File
@@ -0,0 +1,37 @@
import subprocess
import sys
syms = None
def main():
load_syms()
index = 0
while index < len(syms):
index = test_index(index)
print('Done!')
def load_syms():
global syms
with open('undefined_syms.txt', 'r') as inFile:
syms = inFile.read().split('\n')
def save_syms():
with open('undefined_syms.txt', 'w') as outFile:
outFile.write('\n'.join(syms))
def test_index(index):
val = syms.pop(index)
save_syms()
command = subprocess.run(['make', 'clean'], capture_output=True)
command = subprocess.run(['make', '-j12'], capture_output=True)
out = str(command.stdout)[-5:]
if out.startswith('OK'):
print(val + ' is NOT needed! Removing!')
return index
else:
print(val + ' is needed! Keeping!')
syms.insert(index, val)
save_syms()
return index + 1
main()
+4 -1482
View File
File diff suppressed because it is too large Load Diff