From 6bf93186c22de68cdc3a380cbdd46e7c649f9274 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Mon, 5 Jul 2021 07:13:36 -0500 Subject: [PATCH] Decompiled 8 functions in controller_pak --- .../func_800722E8.s} | 25 +- .../func_80072348.s | 0 .../func_80072424.s | 0 .../func_80072578.s | 0 .../func_80072718.s | 8 +- .../func_80072C54.s | 0 .../func_80072E28.s | 0 .../func_8007306C.s | 0 .../func_800732E8.s | 0 .../func_80073588.s | 0 .../func_800738A4.s | 0 .../func_80073C5C.s | 0 .../func_80073E1C.s | 0 .../func_80074018.s | 0 .../func_80074204.s | 0 .../func_8007431C.s | 0 .../func_800744DC.s | 0 .../func_800745D0.s | 0 .../func_800746F0.s | 0 .../func_8007480C.s | 0 .../func_80074874.s | 0 .../func_8007497C.s | 0 .../func_80074A4C.s | 0 .../func_80074B1C.s | 0 .../func_80074B34.s | 6 +- .../func_80074EB8.s | 0 .../func_80075000.s | 0 .../func_800753D8.s | 0 .../func_800756D4.s | 0 .../func_800758DC.s | 8 +- .../func_80075B18.s | 4 +- .../func_80075E60.s | 6 +- .../func_800762C8.s | 6 +- .../func_80076388.s | 6 +- .../func_800764E8.s | 4 +- .../func_800766D4.s | 10 +- .../func_80076924.s | 6 +- .../func_8007698C.s | 8 +- .../func_80076A38.s | 4 +- .../load_asset_section_from_rom.s | 0 .../unknown_072E50/func_80072250.s | 22 - .../unknown_072E50/func_80073F5C.s | 51 -- .../unknown_072E50/func_80074148.s | 51 -- .../unknown_072E50/func_80074AA8.s | 31 -- .../unknown_072E50/func_80075D38.s | 41 -- .../unknown_072E50/func_80075DC4.s | 45 -- .../unknown_072E50/func_80076194.s | 86 ---- .../unknown_072E50/func_80076610.s | 57 --- .../{func_800CEEE0.s => __osPfsGetNextPage.s} | 2 +- .../{func_800CEFDC.s => osPfsReadWriteFile.s} | 6 +- .../{func_800D0580.s => osPfsFileState.s} | 2 +- lib/src/unknown_0CF330.c | 4 +- lib/src/unknown_0D1180.c | 2 +- src/controller_pak.c | 467 ++++++++++++++++++ src/{unknown_072E50.h => controller_pak.h} | 2 +- src/unknown_072E50.c | 176 ------- src/unknown_0777A0.c | 2 +- 57 files changed, 516 insertions(+), 632 deletions(-) rename asm/non_matchings/{unknown_072E50/func_80072298.s => controller_pak/func_800722E8.s} (52%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_80072348.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_80072424.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_80072578.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_80072718.s (98%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_80072C54.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_80072E28.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_8007306C.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_800732E8.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_80073588.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_800738A4.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_80073C5C.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_80073E1C.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_80074018.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_80074204.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_8007431C.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_800744DC.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_800745D0.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_800746F0.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_8007480C.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_80074874.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_8007497C.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_80074A4C.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_80074B1C.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_80074B34.s (98%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_80074EB8.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_80075000.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_800753D8.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_800756D4.s (100%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_800758DC.s (95%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_80075B18.s (97%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_80075E60.s (97%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_800762C8.s (91%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_80076388.s (95%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_800764E8.s (96%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_800766D4.s (95%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_80076924.s (85%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_8007698C.s (88%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/func_80076A38.s (93%) rename asm/non_matchings/{unknown_072E50 => controller_pak}/load_asset_section_from_rom.s (100%) delete mode 100644 asm/non_matchings/unknown_072E50/func_80072250.s delete mode 100644 asm/non_matchings/unknown_072E50/func_80073F5C.s delete mode 100644 asm/non_matchings/unknown_072E50/func_80074148.s delete mode 100644 asm/non_matchings/unknown_072E50/func_80074AA8.s delete mode 100644 asm/non_matchings/unknown_072E50/func_80075D38.s delete mode 100644 asm/non_matchings/unknown_072E50/func_80075DC4.s delete mode 100644 asm/non_matchings/unknown_072E50/func_80076194.s delete mode 100644 asm/non_matchings/unknown_072E50/func_80076610.s rename lib/asm/non_matchings/unknown_0CF330/{func_800CEEE0.s => __osPfsGetNextPage.s} (99%) rename lib/asm/non_matchings/unknown_0CF330/{func_800CEFDC.s => osPfsReadWriteFile.s} (98%) rename lib/asm/non_matchings/unknown_0D1180/{func_800D0580.s => osPfsFileState.s} (99%) create mode 100644 src/controller_pak.c rename src/{unknown_072E50.h => controller_pak.h} (83%) delete mode 100644 src/unknown_072E50.c diff --git a/asm/non_matchings/unknown_072E50/func_80072298.s b/asm/non_matchings/controller_pak/func_800722E8.s similarity index 52% rename from asm/non_matchings/unknown_072E50/func_80072298.s rename to asm/non_matchings/controller_pak/func_800722E8.s index 3f9ee6fe..a0f5cee2 100644 --- a/asm/non_matchings/unknown_072E50/func_80072298.s +++ b/asm/non_matchings/controller_pak/func_800722E8.s @@ -1,27 +1,4 @@ -glabel func_80072298 -/* 072E98 80072298 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 072E9C 8007229C 308E00FF */ andi $t6, $a0, 0xff -/* 072EA0 800722A0 3C018012 */ lui $at, %hi(D_801241E4) # $at, 0x8012 -/* 072EA4 800722A4 AFBF0014 */ sw $ra, 0x14($sp) -/* 072EA8 800722A8 AFA40018 */ sw $a0, 0x18($sp) -/* 072EAC 800722AC 11C00008 */ beqz $t6, .L800722D0 -/* 072EB0 800722B0 A02E41E4 */ sb $t6, %lo(D_801241E4)($at) -/* 072EB4 800722B4 240F0079 */ li $t7, 121 -/* 072EB8 800722B8 3C018012 */ lui $at, %hi(D_801241E8) # $at, 0x8012 -/* 072EBC 800722BC AC2F41E8 */ sw $t7, %lo(D_801241E8)($at) -/* 072EC0 800722C0 3C018012 */ lui $at, %hi(D_801241E6) # $at, 0x8012 -/* 072EC4 800722C4 2418000F */ li $t8, 15 -/* 072EC8 800722C8 10000003 */ b .L800722D8 -/* 072ECC 800722CC A03841E6 */ sb $t8, %lo(D_801241E6)($at) -.L800722D0: -/* 072ED0 800722D0 0C01C9C2 */ jal func_80072708 -/* 072ED4 800722D4 00000000 */ nop -.L800722D8: -/* 072ED8 800722D8 8FBF0014 */ lw $ra, 0x14($sp) -/* 072EDC 800722DC 27BD0018 */ addiu $sp, $sp, 0x18 -/* 072EE0 800722E0 03E00008 */ jr $ra -/* 072EE4 800722E4 00000000 */ nop - +glabel func_800722E8 /* 072EE8 800722E8 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 072EEC 800722EC 00047400 */ sll $t6, $a0, 0x10 /* 072EF0 800722F0 000E7C03 */ sra $t7, $t6, 0x10 diff --git a/asm/non_matchings/unknown_072E50/func_80072348.s b/asm/non_matchings/controller_pak/func_80072348.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_80072348.s rename to asm/non_matchings/controller_pak/func_80072348.s diff --git a/asm/non_matchings/unknown_072E50/func_80072424.s b/asm/non_matchings/controller_pak/func_80072424.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_80072424.s rename to asm/non_matchings/controller_pak/func_80072424.s diff --git a/asm/non_matchings/unknown_072E50/func_80072578.s b/asm/non_matchings/controller_pak/func_80072578.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_80072578.s rename to asm/non_matchings/controller_pak/func_80072578.s diff --git a/asm/non_matchings/unknown_072E50/func_80072718.s b/asm/non_matchings/controller_pak/func_80072718.s similarity index 98% rename from asm/non_matchings/unknown_072E50/func_80072718.s rename to asm/non_matchings/controller_pak/func_80072718.s index 9c920bc7..6213d43a 100644 --- a/asm/non_matchings/unknown_072E50/func_80072718.s +++ b/asm/non_matchings/controller_pak/func_80072718.s @@ -44,10 +44,10 @@ glabel func_80072718 /* 0733A0 800727A0 8C844010 */ lw $a0, %lo(D_80124010)($a0) /* 0733A4 800727A4 0C0334A4 */ jal osPfsIsPlug /* 0733A8 800727A8 27A5006D */ addiu $a1, $sp, 0x6d -/* 0733AC 800727AC 3C168012 */ lui $s6, %hi(D_80124018) # $s6, 0x8012 +/* 0733AC 800727AC 3C168012 */ lui $s6, %hi(pfs) # $s6, 0x8012 /* 0733B0 800727B0 3C148012 */ lui $s4, %hi(D_801241E7) # $s4, 0x8012 /* 0733B4 800727B4 269441E7 */ addiu $s4, %lo(D_801241E7) # addiu $s4, $s4, 0x41e7 -/* 0733B8 800727B8 26D64018 */ addiu $s6, %lo(D_80124018) # addiu $s6, $s6, 0x4018 +/* 0733B8 800727B8 26D64018 */ addiu $s6, %lo(pfs) # addiu $s6, $s6, 0x4018 /* 0733BC 800727BC 00009825 */ move $s3, $zero /* 0733C0 800727C0 24030001 */ li $v1, 1 /* 0733C4 800727C4 24170068 */ li $s7, 104 @@ -106,9 +106,9 @@ glabel func_80072718 /* 073488 80072888 910841E5 */ lbu $t0, %lo(D_801241E5)($t0) /* 07348C 8007288C 3C04800E */ lui $a0, %hi(D_800DE48C) # $a0, 0x800e /* 073490 80072890 3C148012 */ lui $s4, %hi(D_801241E7) # $s4, 0x8012 -/* 073494 80072894 3C168012 */ lui $s6, %hi(D_80124018) # $s6, 0x8012 +/* 073494 80072894 3C168012 */ lui $s6, %hi(pfs) # $s6, 0x8012 /* 073498 80072898 8C84E48C */ lw $a0, %lo(D_800DE48C)($a0) -/* 07349C 8007289C 26D64018 */ addiu $s6, %lo(D_80124018) # addiu $s6, $s6, 0x4018 +/* 07349C 8007289C 26D64018 */ addiu $s6, %lo(pfs) # addiu $s6, $s6, 0x4018 /* 0734A0 800728A0 269441E7 */ addiu $s4, %lo(D_801241E7) # addiu $s4, $s4, 0x41e7 /* 0734A4 800728A4 15000003 */ bnez $t0, .L800728B4 /* 0734A8 800728A8 24170068 */ li $s7, 104 diff --git a/asm/non_matchings/unknown_072E50/func_80072C54.s b/asm/non_matchings/controller_pak/func_80072C54.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_80072C54.s rename to asm/non_matchings/controller_pak/func_80072C54.s diff --git a/asm/non_matchings/unknown_072E50/func_80072E28.s b/asm/non_matchings/controller_pak/func_80072E28.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_80072E28.s rename to asm/non_matchings/controller_pak/func_80072E28.s diff --git a/asm/non_matchings/unknown_072E50/func_8007306C.s b/asm/non_matchings/controller_pak/func_8007306C.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_8007306C.s rename to asm/non_matchings/controller_pak/func_8007306C.s diff --git a/asm/non_matchings/unknown_072E50/func_800732E8.s b/asm/non_matchings/controller_pak/func_800732E8.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_800732E8.s rename to asm/non_matchings/controller_pak/func_800732E8.s diff --git a/asm/non_matchings/unknown_072E50/func_80073588.s b/asm/non_matchings/controller_pak/func_80073588.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_80073588.s rename to asm/non_matchings/controller_pak/func_80073588.s diff --git a/asm/non_matchings/unknown_072E50/func_800738A4.s b/asm/non_matchings/controller_pak/func_800738A4.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_800738A4.s rename to asm/non_matchings/controller_pak/func_800738A4.s diff --git a/asm/non_matchings/unknown_072E50/func_80073C5C.s b/asm/non_matchings/controller_pak/func_80073C5C.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_80073C5C.s rename to asm/non_matchings/controller_pak/func_80073C5C.s diff --git a/asm/non_matchings/unknown_072E50/func_80073E1C.s b/asm/non_matchings/controller_pak/func_80073E1C.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_80073E1C.s rename to asm/non_matchings/controller_pak/func_80073E1C.s diff --git a/asm/non_matchings/unknown_072E50/func_80074018.s b/asm/non_matchings/controller_pak/func_80074018.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_80074018.s rename to asm/non_matchings/controller_pak/func_80074018.s diff --git a/asm/non_matchings/unknown_072E50/func_80074204.s b/asm/non_matchings/controller_pak/func_80074204.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_80074204.s rename to asm/non_matchings/controller_pak/func_80074204.s diff --git a/asm/non_matchings/unknown_072E50/func_8007431C.s b/asm/non_matchings/controller_pak/func_8007431C.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_8007431C.s rename to asm/non_matchings/controller_pak/func_8007431C.s diff --git a/asm/non_matchings/unknown_072E50/func_800744DC.s b/asm/non_matchings/controller_pak/func_800744DC.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_800744DC.s rename to asm/non_matchings/controller_pak/func_800744DC.s diff --git a/asm/non_matchings/unknown_072E50/func_800745D0.s b/asm/non_matchings/controller_pak/func_800745D0.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_800745D0.s rename to asm/non_matchings/controller_pak/func_800745D0.s diff --git a/asm/non_matchings/unknown_072E50/func_800746F0.s b/asm/non_matchings/controller_pak/func_800746F0.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_800746F0.s rename to asm/non_matchings/controller_pak/func_800746F0.s diff --git a/asm/non_matchings/unknown_072E50/func_8007480C.s b/asm/non_matchings/controller_pak/func_8007480C.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_8007480C.s rename to asm/non_matchings/controller_pak/func_8007480C.s diff --git a/asm/non_matchings/unknown_072E50/func_80074874.s b/asm/non_matchings/controller_pak/func_80074874.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_80074874.s rename to asm/non_matchings/controller_pak/func_80074874.s diff --git a/asm/non_matchings/unknown_072E50/func_8007497C.s b/asm/non_matchings/controller_pak/func_8007497C.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_8007497C.s rename to asm/non_matchings/controller_pak/func_8007497C.s diff --git a/asm/non_matchings/unknown_072E50/func_80074A4C.s b/asm/non_matchings/controller_pak/func_80074A4C.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_80074A4C.s rename to asm/non_matchings/controller_pak/func_80074A4C.s diff --git a/asm/non_matchings/unknown_072E50/func_80074B1C.s b/asm/non_matchings/controller_pak/func_80074B1C.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_80074B1C.s rename to asm/non_matchings/controller_pak/func_80074B1C.s diff --git a/asm/non_matchings/unknown_072E50/func_80074B34.s b/asm/non_matchings/controller_pak/func_80074B34.s similarity index 98% rename from asm/non_matchings/unknown_072E50/func_80074B34.s rename to asm/non_matchings/controller_pak/func_80074B34.s index 66d52347..2a21a5f0 100644 --- a/asm/non_matchings/unknown_072E50/func_80074B34.s +++ b/asm/non_matchings/controller_pak/func_80074B34.s @@ -36,13 +36,13 @@ glabel func_80074B34 /* 0757B4 80074BB4 0C01C327 */ jal allocate_from_main_pool_safe /* 0757B8 80074BB8 240500FF */ li $a1, 255 /* 0757BC 80074BBC 8FB90058 */ lw $t9, 0x58($sp) -/* 0757C0 80074BC0 3C0B8012 */ lui $t3, %hi(D_80124018) # $t3, 0x8012 +/* 0757C0 80074BC0 3C0B8012 */ lui $t3, %hi(pfs) # $t3, 0x8012 /* 0757C4 80074BC4 00195080 */ sll $t2, $t9, 2 /* 0757C8 80074BC8 01595023 */ subu $t2, $t2, $t9 /* 0757CC 80074BCC 000A5080 */ sll $t2, $t2, 2 /* 0757D0 80074BD0 01595021 */ addu $t2, $t2, $t9 /* 0757D4 80074BD4 000A50C0 */ sll $t2, $t2, 3 -/* 0757D8 80074BD8 256B4018 */ addiu $t3, %lo(D_80124018) # addiu $t3, $t3, 0x4018 +/* 0757D8 80074BD8 256B4018 */ addiu $t3, %lo(pfs) # addiu $t3, $t3, 0x4018 /* 0757DC 80074BDC 014B6021 */ addu $t4, $t2, $t3 /* 0757E0 80074BE0 AFA20050 */ sw $v0, 0x50($sp) /* 0757E4 80074BE4 AFAC0030 */ sw $t4, 0x30($sp) @@ -157,7 +157,7 @@ glabel func_80074B34 /* 075968 80074D68 AFA20050 */ sw $v0, 0x50($sp) /* 07596C 80074D6C 00003025 */ move $a2, $zero /* 075970 80074D70 AFA20014 */ sw $v0, 0x14($sp) -/* 075974 80074D74 0C033BF7 */ jal func_800CEFDC +/* 075974 80074D74 0C033BF7 */ jal osPfsReadWriteFile /* 075978 80074D78 AFB80010 */ sw $t8, 0x10($sp) /* 07597C 80074D7C 14400020 */ bnez $v0, .L80074E00 /* 075980 80074D80 24070009 */ li $a3, 9 diff --git a/asm/non_matchings/unknown_072E50/func_80074EB8.s b/asm/non_matchings/controller_pak/func_80074EB8.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_80074EB8.s rename to asm/non_matchings/controller_pak/func_80074EB8.s diff --git a/asm/non_matchings/unknown_072E50/func_80075000.s b/asm/non_matchings/controller_pak/func_80075000.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_80075000.s rename to asm/non_matchings/controller_pak/func_80075000.s diff --git a/asm/non_matchings/unknown_072E50/func_800753D8.s b/asm/non_matchings/controller_pak/func_800753D8.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_800753D8.s rename to asm/non_matchings/controller_pak/func_800753D8.s diff --git a/asm/non_matchings/unknown_072E50/func_800756D4.s b/asm/non_matchings/controller_pak/func_800756D4.s similarity index 100% rename from asm/non_matchings/unknown_072E50/func_800756D4.s rename to asm/non_matchings/controller_pak/func_800756D4.s diff --git a/asm/non_matchings/unknown_072E50/func_800758DC.s b/asm/non_matchings/controller_pak/func_800758DC.s similarity index 95% rename from asm/non_matchings/unknown_072E50/func_800758DC.s rename to asm/non_matchings/controller_pak/func_800758DC.s index e7022d91..650ff0d4 100644 --- a/asm/non_matchings/unknown_072E50/func_800758DC.s +++ b/asm/non_matchings/controller_pak/func_800758DC.s @@ -18,8 +18,8 @@ glabel func_800758DC /* 07651C 8007591C 01F57823 */ subu $t7, $t7, $s5 /* 076520 80075920 000F7880 */ sll $t7, $t7, 2 /* 076524 80075924 01F57821 */ addu $t7, $t7, $s5 -/* 076528 80075928 3C188012 */ lui $t8, %hi(D_80124018) # $t8, 0x8012 -/* 07652C 8007592C 27184018 */ addiu $t8, %lo(D_80124018) # addiu $t8, $t8, 0x4018 +/* 076528 80075928 3C188012 */ lui $t8, %hi(pfs) # $t8, 0x8012 +/* 07652C 8007592C 27184018 */ addiu $t8, %lo(pfs) # addiu $t8, $t8, 0x4018 /* 076530 80075930 000F78C0 */ sll $t7, $t7, 3 /* 076534 80075934 01F82821 */ addu $a1, $t7, $t8 /* 076538 80075938 0C01C837 */ jal func_800720DC @@ -36,8 +36,8 @@ glabel func_800758DC /* 07655C 8007595C 0019C880 */ sll $t9, $t9, 2 /* 076560 80075960 8E090008 */ lw $t1, 8($s0) /* 076564 80075964 0335C821 */ addu $t9, $t9, $s5 -/* 076568 80075968 3C088012 */ lui $t0, %hi(D_80124018) # $t0, 0x8012 -/* 07656C 8007596C 25084018 */ addiu $t0, %lo(D_80124018) # addiu $t0, $t0, 0x4018 +/* 076568 80075968 3C088012 */ lui $t0, %hi(pfs) # $t0, 0x8012 +/* 07656C 8007596C 25084018 */ addiu $t0, %lo(pfs) # addiu $t0, $t0, 0x4018 /* 076570 80075970 0019C8C0 */ sll $t9, $t9, 3 /* 076574 80075974 00008825 */ move $s1, $zero /* 076578 80075978 1120000E */ beqz $t1, .L800759B4 diff --git a/asm/non_matchings/unknown_072E50/func_80075B18.s b/asm/non_matchings/controller_pak/func_80075B18.s similarity index 97% rename from asm/non_matchings/unknown_072E50/func_80075B18.s rename to asm/non_matchings/controller_pak/func_80075B18.s index dcad1204..792219a4 100644 --- a/asm/non_matchings/unknown_072E50/func_80075B18.s +++ b/asm/non_matchings/controller_pak/func_80075B18.s @@ -61,8 +61,8 @@ glabel func_80075B18 /* 076800 80075C00 01906023 */ subu $t4, $t4, $s0 /* 076804 80075C04 000C6080 */ sll $t4, $t4, 2 /* 076808 80075C08 01906021 */ addu $t4, $t4, $s0 -/* 07680C 80075C0C 3C0D8012 */ lui $t5, %hi(D_80124018) # $t5, 0x8012 -/* 076810 80075C10 25AD4018 */ addiu $t5, %lo(D_80124018) # addiu $t5, $t5, 0x4018 +/* 07680C 80075C0C 3C0D8012 */ lui $t5, %hi(pfs) # $t5, 0x8012 +/* 076810 80075C10 25AD4018 */ addiu $t5, %lo(pfs) # addiu $t5, $t5, 0x4018 /* 076814 80075C14 000C60C0 */ sll $t4, $t4, 3 /* 076818 80075C18 018D9021 */ addu $s2, $t4, $t5 /* 07681C 80075C1C 8E840000 */ lw $a0, ($s4) diff --git a/asm/non_matchings/unknown_072E50/func_80075E60.s b/asm/non_matchings/controller_pak/func_80075E60.s similarity index 97% rename from asm/non_matchings/unknown_072E50/func_80075E60.s rename to asm/non_matchings/controller_pak/func_80075E60.s index c6115f3f..dd75b207 100644 --- a/asm/non_matchings/unknown_072E50/func_80075E60.s +++ b/asm/non_matchings/controller_pak/func_80075E60.s @@ -26,8 +26,8 @@ glabel func_80075E60 /* 076ABC 80075EBC 01F77823 */ subu $t7, $t7, $s7 /* 076AC0 80075EC0 000F7880 */ sll $t7, $t7, 2 /* 076AC4 80075EC4 01F77821 */ addu $t7, $t7, $s7 -/* 076AC8 80075EC8 3C188012 */ lui $t8, %hi(D_80124018) # $t8, 0x8012 -/* 076ACC 80075ECC 27184018 */ addiu $t8, %lo(D_80124018) # addiu $t8, $t8, 0x4018 +/* 076AC8 80075EC8 3C188012 */ lui $t8, %hi(pfs) # $t8, 0x8012 +/* 076ACC 80075ECC 27184018 */ addiu $t8, %lo(pfs) # addiu $t8, $t8, 0x4018 /* 076AD0 80075ED0 000F78C0 */ sll $t7, $t7, 3 /* 076AD4 80075ED4 01F82021 */ addu $a0, $t7, $t8 /* 076AD8 80075ED8 AFA40054 */ sw $a0, 0x54($sp) @@ -142,7 +142,7 @@ glabel func_80075E60 /* 076C68 80076068 8FA40054 */ lw $a0, 0x54($sp) .L8007606C: /* 076C6C 8007606C 02602825 */ move $a1, $s3 -/* 076C70 80076070 0C034160 */ jal func_800D0580 +/* 076C70 80076070 0C034160 */ jal osPfsFileState /* 076C74 80076074 27A60070 */ addiu $a2, $sp, 0x70 /* 076C78 80076078 24010005 */ li $at, 5 /* 076C7C 8007607C 14410004 */ bne $v0, $at, .L80076090 diff --git a/asm/non_matchings/unknown_072E50/func_800762C8.s b/asm/non_matchings/controller_pak/func_800762C8.s similarity index 91% rename from asm/non_matchings/unknown_072E50/func_800762C8.s rename to asm/non_matchings/controller_pak/func_800762C8.s index ba2fc2a5..55a0dc39 100644 --- a/asm/non_matchings/unknown_072E50/func_800762C8.s +++ b/asm/non_matchings/controller_pak/func_800762C8.s @@ -18,16 +18,16 @@ glabel func_800762C8 /* 076F04 80076304 0310C023 */ subu $t8, $t8, $s0 /* 076F08 80076308 0018C080 */ sll $t8, $t8, 2 /* 076F0C 8007630C 0310C021 */ addu $t8, $t8, $s0 -/* 076F10 80076310 3C198012 */ lui $t9, %hi(D_80124018) # $t9, 0x8012 +/* 076F10 80076310 3C198012 */ lui $t9, %hi(pfs) # $t9, 0x8012 /* 076F14 80076314 00108F80 */ sll $s1, $s0, 0x1e -/* 076F18 80076318 27394018 */ addiu $t9, %lo(D_80124018) # addiu $t9, $t9, 0x4018 +/* 076F18 80076318 27394018 */ addiu $t9, %lo(pfs) # addiu $t9, $t9, 0x4018 /* 076F1C 8007631C 0018C0C0 */ sll $t8, $t8, 3 /* 076F20 80076320 362F0009 */ ori $t7, $s1, 9 /* 076F24 80076324 03192021 */ addu $a0, $t8, $t9 /* 076F28 80076328 8FA50054 */ lw $a1, 0x54($sp) /* 076F2C 8007632C 01E08825 */ move $s1, $t7 /* 076F30 80076330 AFA40028 */ sw $a0, 0x28($sp) -/* 076F34 80076334 0C034160 */ jal func_800D0580 +/* 076F34 80076334 0C034160 */ jal osPfsFileState /* 076F38 80076338 27A60030 */ addiu $a2, $sp, 0x30 /* 076F3C 8007633C 8FA40028 */ lw $a0, 0x28($sp) /* 076F40 80076340 14400009 */ bnez $v0, .L80076368 diff --git a/asm/non_matchings/unknown_072E50/func_80076388.s b/asm/non_matchings/controller_pak/func_80076388.s similarity index 95% rename from asm/non_matchings/unknown_072E50/func_80076388.s rename to asm/non_matchings/controller_pak/func_80076388.s index c8f57bf2..08702309 100644 --- a/asm/non_matchings/unknown_072E50/func_80076388.s +++ b/asm/non_matchings/controller_pak/func_80076388.s @@ -19,12 +19,12 @@ glabel func_80076388 /* 076FC8 800763C8 01F07823 */ subu $t7, $t7, $s0 /* 076FCC 800763CC 000F7880 */ sll $t7, $t7, 2 /* 076FD0 800763D0 01F07821 */ addu $t7, $t7, $s0 -/* 076FD4 800763D4 3C188012 */ lui $t8, %hi(D_80124018) # $t8, 0x8012 -/* 076FD8 800763D8 27184018 */ addiu $t8, %lo(D_80124018) # addiu $t8, $t8, 0x4018 +/* 076FD4 800763D4 3C188012 */ lui $t8, %hi(pfs) # $t8, 0x8012 +/* 076FD8 800763D8 27184018 */ addiu $t8, %lo(pfs) # addiu $t8, $t8, 0x4018 /* 076FDC 800763DC 000F78C0 */ sll $t7, $t7, 3 /* 076FE0 800763E0 8FA50074 */ lw $a1, 0x74($sp) /* 076FE4 800763E4 01F82021 */ addu $a0, $t7, $t8 -/* 076FE8 800763E8 0C034160 */ jal func_800D0580 +/* 076FE8 800763E8 0C034160 */ jal osPfsFileState /* 076FEC 800763EC 27A60034 */ addiu $a2, $sp, 0x34 /* 076FF0 800763F0 10400008 */ beqz $v0, .L80076414 /* 076FF4 800763F4 8FA40034 */ lw $a0, 0x34($sp) diff --git a/asm/non_matchings/unknown_072E50/func_800764E8.s b/asm/non_matchings/controller_pak/func_800764E8.s similarity index 96% rename from asm/non_matchings/unknown_072E50/func_800764E8.s rename to asm/non_matchings/controller_pak/func_800764E8.s index 60d935d0..73a5d361 100644 --- a/asm/non_matchings/unknown_072E50/func_800764E8.s +++ b/asm/non_matchings/controller_pak/func_800764E8.s @@ -17,7 +17,7 @@ glabel func_800764E8 /* 077124 80076524 00000000 */ nop /* 077128 80076528 24010003 */ li $at, 3 /* 07712C 8007652C 14410004 */ bne $v0, $at, .L80076540 -/* 077130 80076530 3C198012 */ lui $t9, %hi(D_80124018) # $t9, 0x8012 +/* 077130 80076530 3C198012 */ lui $t9, %hi(pfs) # $t9, 0x8012 /* 077134 80076534 3C064E44 */ lui $a2, (0x4E44594A >> 16) # lui $a2, 0x4e44 /* 077138 80076538 10000009 */ b .L80076560 /* 07713C 8007653C 34C6594A */ ori $a2, (0x4E44594A & 0xFFFF) # ori $a2, $a2, 0x594a @@ -38,7 +38,7 @@ glabel func_800764E8 /* 077170 80076570 0018C080 */ sll $t8, $t8, 2 /* 077174 80076574 030FC021 */ addu $t8, $t8, $t7 /* 077178 80076578 0018C0C0 */ sll $t8, $t8, 3 -/* 07717C 8007657C 27394018 */ addiu $t9, %lo(D_80124018) # addiu $t9, $t9, 0x4018 +/* 07717C 8007657C 27394018 */ addiu $t9, %lo(pfs) # addiu $t9, $t9, 0x4018 /* 077180 80076580 27A8002C */ addiu $t0, $sp, 0x2c /* 077184 80076584 AFA80010 */ sw $t0, 0x10($sp) /* 077188 80076588 03192021 */ addu $a0, $t8, $t9 diff --git a/asm/non_matchings/unknown_072E50/func_800766D4.s b/asm/non_matchings/controller_pak/func_800766D4.s similarity index 95% rename from asm/non_matchings/unknown_072E50/func_800766D4.s rename to asm/non_matchings/controller_pak/func_800766D4.s index abd8d9db..e9022116 100644 --- a/asm/non_matchings/unknown_072E50/func_800766D4.s +++ b/asm/non_matchings/controller_pak/func_800766D4.s @@ -75,7 +75,7 @@ glabel func_800766D4 /* 0773E0 800767E0 8FA9005C */ lw $t1, 0x5c($sp) /* 0773E4 800767E4 2401FFFF */ li $at, -1 /* 0773E8 800767E8 11210003 */ beq $t1, $at, .L800767F8 -/* 0773EC 800767EC 3C0C8012 */ lui $t4, %hi(D_80124018) # $t4, 0x8012 +/* 0773EC 800767EC 3C0C8012 */ lui $t4, %hi(pfs) # $t4, 0x8012 /* 0773F0 800767F0 1000001D */ b .L80076868 /* 0773F4 800767F4 24030009 */ li $v1, 9 .L800767F8: @@ -86,7 +86,7 @@ glabel func_800766D4 /* 077408 80076808 000B5880 */ sll $t3, $t3, 2 /* 07740C 8007680C 016A5821 */ addu $t3, $t3, $t2 /* 077410 80076810 000B58C0 */ sll $t3, $t3, 3 -/* 077414 80076814 258C4018 */ addiu $t4, %lo(D_80124018) # addiu $t4, $t4, 0x4018 +/* 077414 80076814 258C4018 */ addiu $t4, %lo(pfs) # addiu $t4, $t4, 0x4018 /* 077418 80076818 8FA6002C */ lw $a2, 0x2c($sp) /* 07741C 8007681C 27AD003C */ addiu $t5, $sp, 0x3c /* 077420 80076820 27AF0034 */ addiu $t7, $sp, 0x34 @@ -111,7 +111,7 @@ glabel func_800766D4 /* 077464 80076864 24030004 */ li $v1, 4 .L80076868: /* 077468 80076868 14600025 */ bnez $v1, .L80076900 -/* 07746C 8007686C 3C088012 */ lui $t0, %hi(D_80124018) # $t0, 0x8012 +/* 07746C 8007686C 3C088012 */ lui $t0, %hi(pfs) # $t0, 0x8012 /* 077470 80076870 8FB80058 */ lw $t8, 0x58($sp) /* 077474 80076874 8FA90030 */ lw $t1, 0x30($sp) /* 077478 80076878 0018C880 */ sll $t9, $t8, 2 @@ -120,13 +120,13 @@ glabel func_800766D4 /* 077484 80076884 8FAA0068 */ lw $t2, 0x68($sp) /* 077488 80076888 0338C821 */ addu $t9, $t9, $t8 /* 07748C 8007688C 0019C8C0 */ sll $t9, $t9, 3 -/* 077490 80076890 25084018 */ addiu $t0, %lo(D_80124018) # addiu $t0, $t0, 0x4018 +/* 077490 80076890 25084018 */ addiu $t0, %lo(pfs) # addiu $t0, $t0, 0x4018 /* 077494 80076894 8FA50034 */ lw $a1, 0x34($sp) /* 077498 80076898 03282021 */ addu $a0, $t9, $t0 /* 07749C 8007689C 24060001 */ li $a2, 1 /* 0774A0 800768A0 00003825 */ move $a3, $zero /* 0774A4 800768A4 AFA90010 */ sw $t1, 0x10($sp) -/* 0774A8 800768A8 0C033BF7 */ jal func_800CEFDC +/* 0774A8 800768A8 0C033BF7 */ jal osPfsReadWriteFile /* 0774AC 800768AC AFAA0014 */ sw $t2, 0x14($sp) /* 0774B0 800768B0 14400003 */ bnez $v0, .L800768C0 /* 0774B4 800768B4 24010001 */ li $at, 1 diff --git a/asm/non_matchings/unknown_072E50/func_80076924.s b/asm/non_matchings/controller_pak/func_80076924.s similarity index 85% rename from asm/non_matchings/unknown_072E50/func_80076924.s rename to asm/non_matchings/controller_pak/func_80076924.s index b1002f51..61bfc9f5 100644 --- a/asm/non_matchings/unknown_072E50/func_80076924.s +++ b/asm/non_matchings/controller_pak/func_80076924.s @@ -6,12 +6,12 @@ glabel func_80076924 /* 077534 80076934 AFBF0014 */ sw $ra, 0x14($sp) /* 077538 80076938 AFA60040 */ sw $a2, 0x40($sp) /* 07753C 8007693C 01E47821 */ addu $t7, $t7, $a0 -/* 077540 80076940 3C188012 */ lui $t8, %hi(D_80124018) # $t8, 0x8012 +/* 077540 80076940 3C188012 */ lui $t8, %hi(pfs) # $t8, 0x8012 /* 077544 80076944 ACC00000 */ sw $zero, ($a2) -/* 077548 80076948 27184018 */ addiu $t8, %lo(D_80124018) # addiu $t8, $t8, 0x4018 +/* 077548 80076948 27184018 */ addiu $t8, %lo(pfs) # addiu $t8, $t8, 0x4018 /* 07754C 8007694C 000F78C0 */ sll $t7, $t7, 3 /* 077550 80076950 01F82021 */ addu $a0, $t7, $t8 -/* 077554 80076954 0C034160 */ jal func_800D0580 +/* 077554 80076954 0C034160 */ jal osPfsFileState /* 077558 80076958 27A60018 */ addiu $a2, $sp, 0x18 /* 07755C 8007695C 14400007 */ bnez $v0, .L8007697C /* 077560 80076960 24020009 */ li $v0, 9 diff --git a/asm/non_matchings/unknown_072E50/func_8007698C.s b/asm/non_matchings/controller_pak/func_8007698C.s similarity index 88% rename from asm/non_matchings/unknown_072E50/func_8007698C.s rename to asm/non_matchings/controller_pak/func_8007698C.s index b83952d5..000cc36f 100644 --- a/asm/non_matchings/unknown_072E50/func_8007698C.s +++ b/asm/non_matchings/controller_pak/func_8007698C.s @@ -5,9 +5,9 @@ glabel func_8007698C /* 077598 80076998 00000000 */ nop /* 07759C 8007699C 10C00012 */ beqz $a2, .L800769E8 /* 0775A0 800769A0 2408002D */ li $t0, 45 -/* 0775A4 800769A4 3C07800E */ lui $a3, %hi(D_800DE444) # $a3, 0x800e -/* 0775A8 800769A8 24E7E444 */ addiu $a3, %lo(D_800DE444) # addiu $a3, $a3, -0x1bbc -/* 0775AC 800769AC 28410042 */ slti $at, $v0, 0x42 +/* 0775A4 800769A4 3C07800E */ lui $a3, %hi(gN64FontCodes) # $a3, 0x800e +/* 0775A8 800769A8 24E7E444 */ addiu $a3, %lo(gN64FontCodes) # addiu $a3, $a3, -0x1bbc +/* 0775AC 800769AC 28410042 */ slti $at, $v0, 66 .L800769B0: /* 0775B0 800769B0 10200005 */ beqz $at, .L800769C8 /* 0775B4 800769B4 00E27021 */ addu $t6, $a3, $v0 @@ -24,7 +24,7 @@ glabel func_8007698C /* 0775D8 800769D8 10400003 */ beqz $v0, .L800769E8 /* 0775DC 800769DC 24C6FFFF */ addiu $a2, $a2, -1 /* 0775E0 800769E0 14C0FFF3 */ bnez $a2, .L800769B0 -/* 0775E4 800769E4 28410042 */ slti $at, $v0, 0x42 +/* 0775E4 800769E4 28410042 */ slti $at, $v0, 66 .L800769E8: /* 0775E8 800769E8 10C00010 */ beqz $a2, .L80076A2C /* 0775EC 800769EC 30C40003 */ andi $a0, $a2, 3 diff --git a/asm/non_matchings/unknown_072E50/func_80076A38.s b/asm/non_matchings/controller_pak/func_80076A38.s similarity index 93% rename from asm/non_matchings/unknown_072E50/func_80076A38.s rename to asm/non_matchings/controller_pak/func_80076A38.s index bde84a1d..f08e05d9 100644 --- a/asm/non_matchings/unknown_072E50/func_80076A38.s +++ b/asm/non_matchings/controller_pak/func_80076A38.s @@ -7,9 +7,9 @@ glabel func_80076A38 /* 07764C 80076A4C 24090041 */ li $t1, 65 .L80076A50: /* 077650 80076A50 A0A00000 */ sb $zero, ($a1) -/* 077654 80076A54 3C08800E */ lui $t0, %hi(D_800DE444) # $t0, 0x800e +/* 077654 80076A54 3C08800E */ lui $t0, %hi(gN64FontCodes) # $t0, 0x800e /* 077658 80076A58 90870000 */ lbu $a3, ($a0) -/* 07765C 80076A5C 2508E444 */ addiu $t0, %lo(D_800DE444) # addiu $t0, $t0, -0x1bbc +/* 07765C 80076A5C 2508E444 */ addiu $t0, %lo(gN64FontCodes) # addiu $t0, $t0, -0x1bbc /* 077660 80076A60 00001025 */ move $v0, $zero .L80076A64: /* 077664 80076A64 910F0000 */ lbu $t7, ($t0) diff --git a/asm/non_matchings/unknown_072E50/load_asset_section_from_rom.s b/asm/non_matchings/controller_pak/load_asset_section_from_rom.s similarity index 100% rename from asm/non_matchings/unknown_072E50/load_asset_section_from_rom.s rename to asm/non_matchings/controller_pak/load_asset_section_from_rom.s diff --git a/asm/non_matchings/unknown_072E50/func_80072250.s b/asm/non_matchings/unknown_072E50/func_80072250.s deleted file mode 100644 index d87b923e..00000000 --- a/asm/non_matchings/unknown_072E50/func_80072250.s +++ /dev/null @@ -1,22 +0,0 @@ -glabel func_80072250 -/* 072E50 80072250 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 072E54 80072254 10800004 */ beqz $a0, .L80072268 -/* 072E58 80072258 AFBF0014 */ sw $ra, 0x14($sp) -/* 072E5C 8007225C 24010001 */ li $at, 1 -/* 072E60 80072260 14810007 */ bne $a0, $at, .L80072280 -/* 072E64 80072264 00000000 */ nop -.L80072268: -/* 072E68 80072268 0C003856 */ jal func_8000E158 -/* 072E6C 8007226C AFA40018 */ sw $a0, 0x18($sp) -/* 072E70 80072270 8FA40018 */ lw $a0, 0x18($sp) -/* 072E74 80072274 10400002 */ beqz $v0, .L80072280 -/* 072E78 80072278 240E0001 */ li $t6, 1 -/* 072E7C 8007227C 01C42023 */ subu $a0, $t6, $a0 -.L80072280: -/* 072E80 80072280 0C01A93E */ jal func_8006A4F8 -/* 072E84 80072284 00000000 */ nop -/* 072E88 80072288 8FBF0014 */ lw $ra, 0x14($sp) -/* 072E8C 8007228C 27BD0018 */ addiu $sp, $sp, 0x18 -/* 072E90 80072290 03E00008 */ jr $ra -/* 072E94 80072294 00000000 */ nop - diff --git a/asm/non_matchings/unknown_072E50/func_80073F5C.s b/asm/non_matchings/unknown_072E50/func_80073F5C.s deleted file mode 100644 index 774759b8..00000000 --- a/asm/non_matchings/unknown_072E50/func_80073F5C.s +++ /dev/null @@ -1,51 +0,0 @@ -glabel func_80073F5C -/* 074B5C 80073F5C 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 074B60 80073F60 AFBF001C */ sw $ra, 0x1c($sp) -/* 074B64 80073F64 AFA40038 */ sw $a0, 0x38($sp) -/* 074B68 80073F68 0C01CF13 */ jal func_80073C4C -/* 074B6C 80073F6C AFA5003C */ sw $a1, 0x3c($sp) -/* 074B70 80073F70 AFA20024 */ sw $v0, 0x24($sp) -/* 074B74 80073F74 00402025 */ move $a0, $v0 -/* 074B78 80073F78 0C01C327 */ jal allocate_from_main_pool_safe -/* 074B7C 80073F7C 2405FFFF */ li $a1, -1 -/* 074B80 80073F80 3C0E4741 */ lui $t6, (0x47414D44 >> 16) # lui $t6, 0x4741 -/* 074B84 80073F84 AFA2002C */ sw $v0, 0x2c($sp) -/* 074B88 80073F88 35CE4D44 */ ori $t6, (0x47414D44 & 0xFFFF) # ori $t6, $t6, 0x4d44 -/* 074B8C 80073F8C AC4E0000 */ sw $t6, ($v0) -/* 074B90 80073F90 8FA4003C */ lw $a0, 0x3c($sp) -/* 074B94 80073F94 0C01CCBA */ jal func_800732E8 -/* 074B98 80073F98 24450004 */ addiu $a1, $v0, 4 -/* 074B9C 80073F9C 8FA40038 */ lw $a0, 0x38($sp) -/* 074BA0 80073FA0 24050003 */ li $a1, 3 -/* 074BA4 80073FA4 0C01CF17 */ jal func_80073C5C -/* 074BA8 80073FA8 27A60030 */ addiu $a2, $sp, 0x30 -/* 074BAC 80073FAC 1440000C */ bnez $v0, .L80073FE0 -/* 074BB0 80073FB0 00401825 */ move $v1, $v0 -/* 074BB4 80073FB4 8FAF002C */ lw $t7, 0x2c($sp) -/* 074BB8 80073FB8 8FB80024 */ lw $t8, 0x24($sp) -/* 074BBC 80073FBC 8FA40038 */ lw $a0, 0x38($sp) -/* 074BC0 80073FC0 3C06800E */ lui $a2, %hi(D_800E7680) # $a2, 0x800e -/* 074BC4 80073FC4 24C67680 */ addiu $a2, %lo(D_800E7680) # addiu $a2, $a2, 0x7680 -/* 074BC8 80073FC8 2405FFFF */ li $a1, -1 -/* 074BCC 80073FCC 27A70030 */ addiu $a3, $sp, 0x30 -/* 074BD0 80073FD0 AFAF0010 */ sw $t7, 0x10($sp) -/* 074BD4 80073FD4 0C01D9B5 */ jal func_800766D4 -/* 074BD8 80073FD8 AFB80014 */ sw $t8, 0x14($sp) -/* 074BDC 80073FDC 00401825 */ move $v1, $v0 -.L80073FE0: -/* 074BE0 80073FE0 8FA4002C */ lw $a0, 0x2c($sp) -/* 074BE4 80073FE4 0C01C450 */ jal free_from_memory_pool -/* 074BE8 80073FE8 AFA30028 */ sw $v1, 0x28($sp) -/* 074BEC 80073FEC 8FA30028 */ lw $v1, 0x28($sp) -/* 074BF0 80073FF0 8FBF001C */ lw $ra, 0x1c($sp) -/* 074BF4 80073FF4 10600006 */ beqz $v1, .L80074010 -/* 074BF8 80073FF8 00601025 */ move $v0, $v1 -/* 074BFC 80073FFC 8FB90038 */ lw $t9, 0x38($sp) -/* 074C00 80074000 00000000 */ nop -/* 074C04 80074004 00194780 */ sll $t0, $t9, 0x1e -/* 074C08 80074008 00681825 */ or $v1, $v1, $t0 -/* 074C0C 8007400C 00601025 */ move $v0, $v1 -.L80074010: -/* 074C10 80074010 03E00008 */ jr $ra -/* 074C14 80074014 27BD0038 */ addiu $sp, $sp, 0x38 - diff --git a/asm/non_matchings/unknown_072E50/func_80074148.s b/asm/non_matchings/unknown_072E50/func_80074148.s deleted file mode 100644 index 39b57d85..00000000 --- a/asm/non_matchings/unknown_072E50/func_80074148.s +++ /dev/null @@ -1,51 +0,0 @@ -glabel func_80074148 -/* 074D48 80074148 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 074D4C 8007414C AFBF001C */ sw $ra, 0x1c($sp) -/* 074D50 80074150 AFA40038 */ sw $a0, 0x38($sp) -/* 074D54 80074154 0C01CF15 */ jal func_80073C54 -/* 074D58 80074158 AFA5003C */ sw $a1, 0x3c($sp) -/* 074D5C 8007415C AFA2002C */ sw $v0, 0x2c($sp) -/* 074D60 80074160 00402025 */ move $a0, $v0 -/* 074D64 80074164 0C01C327 */ jal allocate_from_main_pool_safe -/* 074D68 80074168 2405FFFF */ li $a1, -1 -/* 074D6C 8007416C 3C0E5449 */ lui $t6, (0x54494D44 >> 16) # lui $t6, 0x5449 -/* 074D70 80074170 AFA20034 */ sw $v0, 0x34($sp) -/* 074D74 80074174 35CE4D44 */ ori $t6, (0x54494D44 & 0xFFFF) # ori $t6, $t6, 0x4d44 -/* 074D78 80074178 AC4E0000 */ sw $t6, ($v0) -/* 074D7C 8007417C 8FA4003C */ lw $a0, 0x3c($sp) -/* 074D80 80074180 0C01CE29 */ jal func_800738A4 -/* 074D84 80074184 24450004 */ addiu $a1, $v0, 4 -/* 074D88 80074188 8FA40038 */ lw $a0, 0x38($sp) -/* 074D8C 8007418C 24050004 */ li $a1, 4 -/* 074D90 80074190 0C01CF17 */ jal func_80073C5C -/* 074D94 80074194 27A60024 */ addiu $a2, $sp, 0x24 -/* 074D98 80074198 1440000C */ bnez $v0, .L800741CC -/* 074D9C 8007419C 00401825 */ move $v1, $v0 -/* 074DA0 800741A0 8FAF0034 */ lw $t7, 0x34($sp) -/* 074DA4 800741A4 8FB8002C */ lw $t8, 0x2c($sp) -/* 074DA8 800741A8 8FA40038 */ lw $a0, 0x38($sp) -/* 074DAC 800741AC 3C06800E */ lui $a2, %hi(D_800E76A0) # $a2, 0x800e -/* 074DB0 800741B0 24C676A0 */ addiu $a2, %lo(D_800E76A0) # addiu $a2, $a2, 0x76a0 -/* 074DB4 800741B4 2405FFFF */ li $a1, -1 -/* 074DB8 800741B8 27A70024 */ addiu $a3, $sp, 0x24 -/* 074DBC 800741BC AFAF0010 */ sw $t7, 0x10($sp) -/* 074DC0 800741C0 0C01D9B5 */ jal func_800766D4 -/* 074DC4 800741C4 AFB80014 */ sw $t8, 0x14($sp) -/* 074DC8 800741C8 00401825 */ move $v1, $v0 -.L800741CC: -/* 074DCC 800741CC 8FA40034 */ lw $a0, 0x34($sp) -/* 074DD0 800741D0 0C01C450 */ jal free_from_memory_pool -/* 074DD4 800741D4 AFA30030 */ sw $v1, 0x30($sp) -/* 074DD8 800741D8 8FA30030 */ lw $v1, 0x30($sp) -/* 074DDC 800741DC 8FBF001C */ lw $ra, 0x1c($sp) -/* 074DE0 800741E0 10600006 */ beqz $v1, .L800741FC -/* 074DE4 800741E4 00601025 */ move $v0, $v1 -/* 074DE8 800741E8 8FB90038 */ lw $t9, 0x38($sp) -/* 074DEC 800741EC 00000000 */ nop -/* 074DF0 800741F0 00194780 */ sll $t0, $t9, 0x1e -/* 074DF4 800741F4 00681825 */ or $v1, $v1, $t0 -/* 074DF8 800741F8 00601025 */ move $v0, $v1 -.L800741FC: -/* 074DFC 800741FC 03E00008 */ jr $ra -/* 074E00 80074200 27BD0038 */ addiu $sp, $sp, 0x38 - diff --git a/asm/non_matchings/unknown_072E50/func_80074AA8.s b/asm/non_matchings/unknown_072E50/func_80074AA8.s deleted file mode 100644 index a390057b..00000000 --- a/asm/non_matchings/unknown_072E50/func_80074AA8.s +++ /dev/null @@ -1,31 +0,0 @@ -glabel func_80074AA8 -/* 0756A8 80074AA8 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 0756AC 80074AAC AFBF001C */ sw $ra, 0x1c($sp) -/* 0756B0 80074AB0 AFB00018 */ sw $s0, 0x18($sp) -/* 0756B4 80074AB4 AFA50024 */ sw $a1, 0x24($sp) -/* 0756B8 80074AB8 AFA60028 */ sw $a2, 0x28($sp) -/* 0756BC 80074ABC AFA7002C */ sw $a3, 0x2c($sp) -/* 0756C0 80074AC0 A4800000 */ sh $zero, ($a0) -/* 0756C4 80074AC4 87B80026 */ lh $t8, 0x26($sp) -/* 0756C8 80074AC8 00077400 */ sll $t6, $a3, 0x10 -/* 0756CC 80074ACC A0800003 */ sb $zero, 3($a0) -/* 0756D0 80074AD0 A0980002 */ sb $t8, 2($a0) -/* 0756D4 80074AD4 87B9002A */ lh $t9, 0x2a($sp) -/* 0756D8 80074AD8 000E7C03 */ sra $t7, $t6, 0x10 -/* 0756DC 80074ADC 00808025 */ move $s0, $a0 -/* 0756E0 80074AE0 A48F0006 */ sh $t7, 6($a0) -/* 0756E4 80074AE4 000F3080 */ sll $a2, $t7, 2 -/* 0756E8 80074AE8 A4990004 */ sh $t9, 4($a0) -/* 0756EC 80074AEC 8FA40030 */ lw $a0, 0x30($sp) -/* 0756F0 80074AF0 00CF3023 */ subu $a2, $a2, $t7 -/* 0756F4 80074AF4 00063080 */ sll $a2, $a2, 2 -/* 0756F8 80074AF8 0C032768 */ jal bcopy -/* 0756FC 80074AFC 26050008 */ addiu $a1, $s0, 8 -/* 075700 80074B00 0C01D293 */ jal func_80074A4C -/* 075704 80074B04 02002025 */ move $a0, $s0 -/* 075708 80074B08 A6020000 */ sh $v0, ($s0) -/* 07570C 80074B0C 8FBF001C */ lw $ra, 0x1c($sp) -/* 075710 80074B10 8FB00018 */ lw $s0, 0x18($sp) -/* 075714 80074B14 03E00008 */ jr $ra -/* 075718 80074B18 27BD0020 */ addiu $sp, $sp, 0x20 - diff --git a/asm/non_matchings/unknown_072E50/func_80075D38.s b/asm/non_matchings/unknown_072E50/func_80075D38.s deleted file mode 100644 index 72c4c06d..00000000 --- a/asm/non_matchings/unknown_072E50/func_80075D38.s +++ /dev/null @@ -1,41 +0,0 @@ -glabel func_80075D38 -/* 076938 80075D38 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 07693C 80075D3C AFBF0014 */ sw $ra, 0x14($sp) -/* 076940 80075D40 0C01D637 */ jal func_800758DC -/* 076944 80075D44 AFA40020 */ sw $a0, 0x20($sp) -/* 076948 80075D48 10400003 */ beqz $v0, .L80075D58 -/* 07694C 80075D4C 24010002 */ li $at, 2 -/* 076950 80075D50 14410015 */ bne $v0, $at, .L80075DA8 -/* 076954 80075D54 00001825 */ move $v1, $zero -.L80075D58: -/* 076958 80075D58 8FAE0020 */ lw $t6, 0x20($sp) -/* 07695C 80075D5C 3C188012 */ lui $t8, %hi(D_80124018) # $t8, 0x8012 -/* 076960 80075D60 000E7880 */ sll $t7, $t6, 2 -/* 076964 80075D64 01EE7823 */ subu $t7, $t7, $t6 -/* 076968 80075D68 000F7880 */ sll $t7, $t7, 2 -/* 07696C 80075D6C 01EE7821 */ addu $t7, $t7, $t6 -/* 076970 80075D70 000F78C0 */ sll $t7, $t7, 3 -/* 076974 80075D74 27184018 */ addiu $t8, %lo(D_80124018) # addiu $t8, $t8, 0x4018 -/* 076978 80075D78 0C033D4C */ jal func_800CF530 -/* 07697C 80075D7C 01F82021 */ addu $a0, $t7, $t8 -/* 076980 80075D80 14400003 */ bnez $v0, .L80075D90 -/* 076984 80075D84 24010002 */ li $at, 2 -/* 076988 80075D88 10000007 */ b .L80075DA8 -/* 07698C 80075D8C 00001825 */ move $v1, $zero -.L80075D90: -/* 076990 80075D90 14410003 */ bne $v0, $at, .L80075DA0 -/* 076994 80075D94 00000000 */ nop -/* 076998 80075D98 10000003 */ b .L80075DA8 -/* 07699C 80075D9C 24030005 */ li $v1, 5 -.L80075DA0: -/* 0769A0 80075DA0 10000001 */ b .L80075DA8 -/* 0769A4 80075DA4 24030002 */ li $v1, 2 -.L80075DA8: -/* 0769A8 80075DA8 8FA40020 */ lw $a0, 0x20($sp) -/* 0769AC 80075DAC 0C01D6BB */ jal func_80075AEC -/* 0769B0 80075DB0 AFA3001C */ sw $v1, 0x1c($sp) -/* 0769B4 80075DB4 8FBF0014 */ lw $ra, 0x14($sp) -/* 0769B8 80075DB8 8FA2001C */ lw $v0, 0x1c($sp) -/* 0769BC 80075DBC 03E00008 */ jr $ra -/* 0769C0 80075DC0 27BD0020 */ addiu $sp, $sp, 0x20 - diff --git a/asm/non_matchings/unknown_072E50/func_80075DC4.s b/asm/non_matchings/unknown_072E50/func_80075DC4.s deleted file mode 100644 index 49fb1dc2..00000000 --- a/asm/non_matchings/unknown_072E50/func_80075DC4.s +++ /dev/null @@ -1,45 +0,0 @@ -glabel func_80075DC4 -/* 0769C4 80075DC4 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 0769C8 80075DC8 AFBF0014 */ sw $ra, 0x14($sp) -/* 0769CC 80075DCC 0C01D637 */ jal func_800758DC -/* 0769D0 80075DD0 AFA40020 */ sw $a0, 0x20($sp) -/* 0769D4 80075DD4 10400005 */ beqz $v0, .L80075DEC -/* 0769D8 80075DD8 24010002 */ li $at, 2 -/* 0769DC 80075DDC 10410003 */ beq $v0, $at, .L80075DEC -/* 0769E0 80075DE0 24010003 */ li $at, 3 -/* 0769E4 80075DE4 14410017 */ bne $v0, $at, .L80075E44 -/* 0769E8 80075DE8 00001825 */ move $v1, $zero -.L80075DEC: -/* 0769EC 80075DEC 8FA60020 */ lw $a2, 0x20($sp) -/* 0769F0 80075DF0 3C0F8012 */ lui $t7, %hi(D_80124018) # $t7, 0x8012 -/* 0769F4 80075DF4 00067080 */ sll $t6, $a2, 2 -/* 0769F8 80075DF8 01C67023 */ subu $t6, $t6, $a2 -/* 0769FC 80075DFC 000E7080 */ sll $t6, $t6, 2 -/* 076A00 80075E00 3C058012 */ lui $a1, %hi(D_80124010) # $a1, 0x8012 -/* 076A04 80075E04 01C67021 */ addu $t6, $t6, $a2 -/* 076A08 80075E08 000E70C0 */ sll $t6, $t6, 3 -/* 076A0C 80075E0C 8CA54010 */ lw $a1, %lo(D_80124010)($a1) -/* 076A10 80075E10 25EF4018 */ addiu $t7, %lo(D_80124018) # addiu $t7, $t7, 0x4018 -/* 076A14 80075E14 0C033FE4 */ jal func_800CFF90 -/* 076A18 80075E18 01CF2021 */ addu $a0, $t6, $t7 -/* 076A1C 80075E1C 14400003 */ bnez $v0, .L80075E2C -/* 076A20 80075E20 24010002 */ li $at, 2 -/* 076A24 80075E24 10000007 */ b .L80075E44 -/* 076A28 80075E28 00001825 */ move $v1, $zero -.L80075E2C: -/* 076A2C 80075E2C 14410003 */ bne $v0, $at, .L80075E3C -/* 076A30 80075E30 00000000 */ nop -/* 076A34 80075E34 10000003 */ b .L80075E44 -/* 076A38 80075E38 24030005 */ li $v1, 5 -.L80075E3C: -/* 076A3C 80075E3C 10000001 */ b .L80075E44 -/* 076A40 80075E40 24030002 */ li $v1, 2 -.L80075E44: -/* 076A44 80075E44 8FA40020 */ lw $a0, 0x20($sp) -/* 076A48 80075E48 0C01D6BB */ jal func_80075AEC -/* 076A4C 80075E4C AFA3001C */ sw $v1, 0x1c($sp) -/* 076A50 80075E50 8FBF0014 */ lw $ra, 0x14($sp) -/* 076A54 80075E54 8FA2001C */ lw $v0, 0x1c($sp) -/* 076A58 80075E58 03E00008 */ jr $ra -/* 076A5C 80075E5C 27BD0020 */ addiu $sp, $sp, 0x20 - diff --git a/asm/non_matchings/unknown_072E50/func_80076194.s b/asm/non_matchings/unknown_072E50/func_80076194.s deleted file mode 100644 index 36f5e12d..00000000 --- a/asm/non_matchings/unknown_072E50/func_80076194.s +++ /dev/null @@ -1,86 +0,0 @@ -glabel func_80076194 -/* 076D94 80076194 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 076D98 80076198 AFBF001C */ sw $ra, 0x1c($sp) -/* 076D9C 8007619C AFB00018 */ sw $s0, 0x18($sp) -/* 076DA0 800761A0 00808025 */ move $s0, $a0 -/* 076DA4 800761A4 AFA50034 */ sw $a1, 0x34($sp) -/* 076DA8 800761A8 0C01D637 */ jal func_800758DC -/* 076DAC 800761AC AFA60038 */ sw $a2, 0x38($sp) -/* 076DB0 800761B0 1440003A */ bnez $v0, .L8007629C -/* 076DB4 800761B4 00401825 */ move $v1, $v0 -/* 076DB8 800761B8 8FAE0034 */ lw $t6, 0x34($sp) -/* 076DBC 800761BC 00107880 */ sll $t7, $s0, 2 -/* 076DC0 800761C0 11C00015 */ beqz $t6, .L80076218 -/* 076DC4 800761C4 01F07823 */ subu $t7, $t7, $s0 -/* 076DC8 800761C8 000F7880 */ sll $t7, $t7, 2 -/* 076DCC 800761CC 01F07821 */ addu $t7, $t7, $s0 -/* 076DD0 800761D0 3C188012 */ lui $t8, %hi(D_80124018) # $t8, 0x8012 -/* 076DD4 800761D4 27184018 */ addiu $t8, %lo(D_80124018) # addiu $t8, $t8, 0x4018 -/* 076DD8 800761D8 000F78C0 */ sll $t7, $t7, 3 -/* 076DDC 800761DC 01F82021 */ addu $a0, $t7, $t8 -/* 076DE0 800761E0 0C033CF8 */ jal osPfsFreeBlocks -/* 076DE4 800761E4 27A50028 */ addiu $a1, $sp, 0x28 -/* 076DE8 800761E8 10400007 */ beqz $v0, .L80076208 -/* 076DEC 800761EC 00401825 */ move $v1, $v0 -/* 076DF0 800761F0 0C01D6BB */ jal func_80075AEC -/* 076DF4 800761F4 02002025 */ move $a0, $s0 -/* 076DF8 800761F8 00101780 */ sll $v0, $s0, 0x1e -/* 076DFC 800761FC 34590009 */ ori $t9, $v0, 9 -/* 076E00 80076200 1000002D */ b .L800762B8 -/* 076E04 80076204 03201025 */ move $v0, $t9 -.L80076208: -/* 076E08 80076208 8FA80028 */ lw $t0, 0x28($sp) -/* 076E0C 8007620C 8FA90034 */ lw $t1, 0x34($sp) -/* 076E10 80076210 00000000 */ nop -/* 076E14 80076214 AD280000 */ sw $t0, ($t1) -.L80076218: -/* 076E18 80076218 8FAA0038 */ lw $t2, 0x38($sp) -/* 076E1C 8007621C 00105880 */ sll $t3, $s0, 2 -/* 076E20 80076220 11400020 */ beqz $t2, .L800762A4 -/* 076E24 80076224 01705823 */ subu $t3, $t3, $s0 -/* 076E28 80076228 000B5880 */ sll $t3, $t3, 2 -/* 076E2C 8007622C 01705821 */ addu $t3, $t3, $s0 -/* 076E30 80076230 3C0C8012 */ lui $t4, %hi(D_80124018) # $t4, 0x8012 -/* 076E34 80076234 258C4018 */ addiu $t4, %lo(D_80124018) # addiu $t4, $t4, 0x4018 -/* 076E38 80076238 000B58C0 */ sll $t3, $t3, 3 -/* 076E3C 8007623C 016C2021 */ addu $a0, $t3, $t4 -/* 076E40 80076240 27A50024 */ addiu $a1, $sp, 0x24 -/* 076E44 80076244 0C0340E4 */ jal func_800D0390 -/* 076E48 80076248 27A60020 */ addiu $a2, $sp, 0x20 -/* 076E4C 8007624C 10400007 */ beqz $v0, .L8007626C -/* 076E50 80076250 00401825 */ move $v1, $v0 -/* 076E54 80076254 0C01D6BB */ jal func_80075AEC -/* 076E58 80076258 02002025 */ move $a0, $s0 -/* 076E5C 8007625C 00101780 */ sll $v0, $s0, 0x1e -/* 076E60 80076260 344D0009 */ ori $t5, $v0, 9 -/* 076E64 80076264 10000014 */ b .L800762B8 -/* 076E68 80076268 01A01025 */ move $v0, $t5 -.L8007626C: -/* 076E6C 8007626C 8FAE0020 */ lw $t6, 0x20($sp) -/* 076E70 80076270 8FB80020 */ lw $t8, 0x20($sp) -/* 076E74 80076274 29C10010 */ slti $at, $t6, 0x10 -/* 076E78 80076278 14200004 */ bnez $at, .L8007628C -/* 076E7C 8007627C 24190010 */ li $t9, 16 -/* 076E80 80076280 8FAF0038 */ lw $t7, 0x38($sp) -/* 076E84 80076284 10000007 */ b .L800762A4 -/* 076E88 80076288 ADE00000 */ sw $zero, ($t7) -.L8007628C: -/* 076E8C 8007628C 8FA90038 */ lw $t1, 0x38($sp) -/* 076E90 80076290 03384023 */ subu $t0, $t9, $t8 -/* 076E94 80076294 10000003 */ b .L800762A4 -/* 076E98 80076298 AD280000 */ sw $t0, ($t1) -.L8007629C: -/* 076E9C 8007629C 00105780 */ sll $t2, $s0, 0x1e -/* 076EA0 800762A0 004A1825 */ or $v1, $v0, $t2 -.L800762A4: -/* 076EA4 800762A4 02002025 */ move $a0, $s0 -/* 076EA8 800762A8 0C01D6BB */ jal func_80075AEC -/* 076EAC 800762AC AFA3002C */ sw $v1, 0x2c($sp) -/* 076EB0 800762B0 8FA2002C */ lw $v0, 0x2c($sp) -/* 076EB4 800762B4 00000000 */ nop -.L800762B8: -/* 076EB8 800762B8 8FBF001C */ lw $ra, 0x1c($sp) -/* 076EBC 800762BC 8FB00018 */ lw $s0, 0x18($sp) -/* 076EC0 800762C0 03E00008 */ jr $ra -/* 076EC4 800762C4 27BD0030 */ addiu $sp, $sp, 0x30 - diff --git a/asm/non_matchings/unknown_072E50/func_80076610.s b/asm/non_matchings/unknown_072E50/func_80076610.s deleted file mode 100644 index 3a53e4bb..00000000 --- a/asm/non_matchings/unknown_072E50/func_80076610.s +++ /dev/null @@ -1,57 +0,0 @@ -glabel func_80076610 -/* 077210 80076610 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 077214 80076614 00047880 */ sll $t7, $a0, 2 -/* 077218 80076618 01E47823 */ subu $t7, $t7, $a0 -/* 07721C 8007661C AFA60028 */ sw $a2, 0x28($sp) -/* 077220 80076620 AFA7002C */ sw $a3, 0x2c($sp) -/* 077224 80076624 000F7880 */ sll $t7, $t7, 2 -/* 077228 80076628 8FB9002C */ lw $t9, 0x2c($sp) -/* 07722C 8007662C 8FA80028 */ lw $t0, 0x28($sp) -/* 077230 80076630 01E47821 */ addu $t7, $t7, $a0 -/* 077234 80076634 3C188012 */ lui $t8, %hi(D_80124018) # $t8, 0x8012 -/* 077238 80076638 AFBF001C */ sw $ra, 0x1c($sp) -/* 07723C 8007663C AFA40020 */ sw $a0, 0x20($sp) -/* 077240 80076640 27184018 */ addiu $t8, %lo(D_80124018) # addiu $t8, $t8, 0x4018 -/* 077244 80076644 000F78C0 */ sll $t7, $t7, 3 -/* 077248 80076648 01F82021 */ addu $a0, $t7, $t8 -/* 07724C 8007664C 00003825 */ move $a3, $zero -/* 077250 80076650 00003025 */ move $a2, $zero -/* 077254 80076654 AFB90010 */ sw $t9, 0x10($sp) -/* 077258 80076658 0C033BF7 */ jal func_800CEFDC -/* 07725C 8007665C AFA80014 */ sw $t0, 0x14($sp) -/* 077260 80076660 8FBF001C */ lw $ra, 0x1c($sp) -/* 077264 80076664 14400003 */ bnez $v0, .L80076674 -/* 077268 80076668 24010001 */ li $at, 1 -/* 07726C 8007666C 10000017 */ b .L800766CC -/* 077270 80076670 00001025 */ move $v0, $zero -.L80076674: -/* 077274 80076674 10410003 */ beq $v0, $at, .L80076684 -/* 077278 80076678 2401000B */ li $at, 11 -/* 07727C 8007667C 14410004 */ bne $v0, $at, .L80076690 -/* 077280 80076680 24010003 */ li $at, 3 -.L80076684: -/* 077284 80076684 10000011 */ b .L800766CC -/* 077288 80076688 24020001 */ li $v0, 1 -/* 07728C 8007668C 24010003 */ li $at, 3 -.L80076690: -/* 077290 80076690 14410004 */ bne $v0, $at, .L800766A4 -/* 077294 80076694 2401000A */ li $at, 10 -/* 077298 80076698 1000000C */ b .L800766CC -/* 07729C 8007669C 24020002 */ li $v0, 2 -/* 0772A0 800766A0 2401000A */ li $at, 10 -.L800766A4: -/* 0772A4 800766A4 14410004 */ bne $v0, $at, .L800766B8 -/* 0772A8 800766A8 24010005 */ li $at, 5 -/* 0772AC 800766AC 10000007 */ b .L800766CC -/* 0772B0 800766B0 24020003 */ li $v0, 3 -/* 0772B4 800766B4 24010005 */ li $at, 5 -.L800766B8: -/* 0772B8 800766B8 14410004 */ bne $v0, $at, .L800766CC -/* 0772BC 800766BC 24020009 */ li $v0, 9 -/* 0772C0 800766C0 10000002 */ b .L800766CC -/* 0772C4 800766C4 24020005 */ li $v0, 5 -/* 0772C8 800766C8 24020009 */ li $v0, 9 -.L800766CC: -/* 0772CC 800766CC 03E00008 */ jr $ra -/* 0772D0 800766D0 27BD0020 */ addiu $sp, $sp, 0x20 - diff --git a/lib/asm/non_matchings/unknown_0CF330/func_800CEEE0.s b/lib/asm/non_matchings/unknown_0CF330/__osPfsGetNextPage.s similarity index 99% rename from lib/asm/non_matchings/unknown_0CF330/func_800CEEE0.s rename to lib/asm/non_matchings/unknown_0CF330/__osPfsGetNextPage.s index 7a99dee7..4b9c74b8 100644 --- a/lib/asm/non_matchings/unknown_0CF330/func_800CEEE0.s +++ b/lib/asm/non_matchings/unknown_0CF330/__osPfsGetNextPage.s @@ -1,4 +1,4 @@ -glabel func_800CEEE0 +glabel __osPfsGetNextPage /* 0CFAE0 800CEEE0 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 0CFAE4 800CEEE4 AFA50024 */ sw $a1, 0x24($sp) /* 0CFAE8 800CEEE8 AFA7002C */ sw $a3, 0x2c($sp) diff --git a/lib/asm/non_matchings/unknown_0CF330/func_800CEFDC.s b/lib/asm/non_matchings/unknown_0CF330/osPfsReadWriteFile.s similarity index 98% rename from lib/asm/non_matchings/unknown_0CF330/func_800CEFDC.s rename to lib/asm/non_matchings/unknown_0CF330/osPfsReadWriteFile.s index 703821b8..8057a431 100644 --- a/lib/asm/non_matchings/unknown_0CF330/func_800CEFDC.s +++ b/lib/asm/non_matchings/unknown_0CF330/osPfsReadWriteFile.s @@ -1,4 +1,4 @@ -glabel func_800CEFDC +glabel osPfsReadWriteFile /* 0CFBDC 800CEFDC 27BDFEA8 */ addiu $sp, $sp, -0x158 /* 0CFBE0 800CEFE0 AFA40158 */ sw $a0, 0x158($sp) /* 0CFBE4 800CEFE4 8FAF0158 */ lw $t7, 0x158($sp) @@ -138,7 +138,7 @@ glabel func_800CEFDC /* 0CFDBC 800CF1BC 8FA40158 */ lw $a0, 0x158($sp) /* 0CFDC0 800CF1C0 27A50023 */ addiu $a1, $sp, 0x23 /* 0CFDC4 800CF1C4 27A60034 */ addiu $a2, $sp, 0x34 -/* 0CFDC8 800CF1C8 0C033BB8 */ jal func_800CEEE0 +/* 0CFDC8 800CF1C8 0C033BB8 */ jal __osPfsGetNextPage /* 0CFDCC 800CF1CC 27A70030 */ addiu $a3, $sp, 0x30 /* 0CFDD0 800CF1D0 AFA20154 */ sw $v0, 0x154($sp) /* 0CFDD4 800CF1D4 8FAE0154 */ lw $t6, 0x154($sp) @@ -173,7 +173,7 @@ glabel func_800CEFDC /* 0CFE38 800CF238 8FA40158 */ lw $a0, 0x158($sp) /* 0CFE3C 800CF23C 27A50023 */ addiu $a1, $sp, 0x23 /* 0CFE40 800CF240 27A60034 */ addiu $a2, $sp, 0x34 -/* 0CFE44 800CF244 0C033BB8 */ jal func_800CEEE0 +/* 0CFE44 800CF244 0C033BB8 */ jal __osPfsGetNextPage /* 0CFE48 800CF248 27A70030 */ addiu $a3, $sp, 0x30 /* 0CFE4C 800CF24C AFA20154 */ sw $v0, 0x154($sp) /* 0CFE50 800CF250 8FB80154 */ lw $t8, 0x154($sp) diff --git a/lib/asm/non_matchings/unknown_0D1180/func_800D0580.s b/lib/asm/non_matchings/unknown_0D1180/osPfsFileState.s similarity index 99% rename from lib/asm/non_matchings/unknown_0D1180/func_800D0580.s rename to lib/asm/non_matchings/unknown_0D1180/osPfsFileState.s index 66b99dcd..77254a68 100644 --- a/lib/asm/non_matchings/unknown_0D1180/func_800D0580.s +++ b/lib/asm/non_matchings/unknown_0D1180/osPfsFileState.s @@ -1,4 +1,4 @@ -glabel func_800D0580 +glabel osPfsFileState /* 0D1180 800D0580 27BDFEB0 */ addiu $sp, $sp, -0x150 /* 0D1184 800D0584 AFA40150 */ sw $a0, 0x150($sp) /* 0D1188 800D0588 8FAF0150 */ lw $t7, 0x150($sp) diff --git a/lib/src/unknown_0CF330.c b/lib/src/unknown_0CF330.c index 1a0d97db..190a0f6e 100644 --- a/lib/src/unknown_0CF330.c +++ b/lib/src/unknown_0CF330.c @@ -15,5 +15,5 @@ GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ll_mul.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ull_divremi.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/func_800CED20.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__osPfsGetStatus.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/func_800CEEE0.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/func_800CEFDC.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__osPfsGetNextPage.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/osPfsReadWriteFile.s") diff --git a/lib/src/unknown_0D1180.c b/lib/src/unknown_0D1180.c index ce7a3ca3..0593c57f 100644 --- a/lib/src/unknown_0D1180.c +++ b/lib/src/unknown_0D1180.c @@ -4,7 +4,7 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D1180/func_800D0580.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0D1180/osPfsFileState.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D1180/func_800D0870.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D1180/func_800D0B50.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D1180/func_800D0D88.s") diff --git a/src/controller_pak.c b/src/controller_pak.c new file mode 100644 index 00000000..5f7ae848 --- /dev/null +++ b/src/controller_pak.c @@ -0,0 +1,467 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x80072250 */ + +#include "controller_pak.h" +#include "memory.h" +#include "PR/pfs.h" +#include "PR/os_cont.h" + +#include "types.h" +#include "macros.h" + +/************ .data ************/ + +s32 D_800DE440 = 0; + +u8 gN64FontCodes[68] = "\0 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!\"#'*+,-./:=?@"; + +s32 D_800DE488 = 0; // Currently unknown, might be a different type. +s32 D_800DE48C = 0; + +/*******************************/ + +/************ .rodata ************/ + +const char D_800E7590[] = "Region = %d loc = %x size = %x\t"; +const char D_800E75B4[] = "FREE"; +const char D_800E75BC[] = "ALLOCATED"; +const char D_800E75C8[] = "ALLOCATED,FIXED"; +const char D_800E75D8[] = "\n"; +const char D_800E75DC[] = "\n"; +const char D_800E75E0[] = "Region number = %d\t"; +const char D_800E75F4[] = "maxSlots = %d\t"; +const char D_800E7604[] = "slotsUsed = %d\t"; +const char D_800E7614[] = "loc = %x\t"; +const char D_800E7620[] = "size = %x\n"; +const char D_800E762C[] = "\n"; + +const char D_800E7630[] = "DKRACING-ADV"; +const char D_800E7640[] = "DKRACING-ADV"; +const char D_800E7650[] = "DKRACING-TIMES"; +const char D_800E7660[] = "DKRACING-TIMES"; +const char D_800E7670[] = "DKRACING-ADV"; +const char D_800E7680[] = "DKRACING-ADV"; +const char D_800E7690[] = "DKRACING-TIMES"; +const char D_800E76A0[] = "DKRACING-TIMES"; + +const char D_800E76B0[] = "WARNING : No Eprom\n"; +const char D_800E76C4[] = "WARNING : No Eprom\n"; +const char D_800E76D8[] = "WARNING : No Eprom\n"; +const char D_800E76EC[] = "WARNING : No Eprom\n"; +const char D_800E7700[] = "WARNING : No Eprom\n"; +const char D_800E7714[] = "WARNING : No Eprom\n"; +const char D_800E7728[] = "WARNING : No Eprom\n"; + +const char D_800E773C[] = "DKRACING-GHOSTS"; // Used in func_80074B34 +const u8 D_800E774C[4] = { 0, 0, 0, 0 }; // Used in func_80074B34, but I'm confused to what this is for. +const char D_800E7750[] = "warning: corrupt ghost\n"; + +/*********************************/ + +/************ .bss ************/ + +s32 D_80124010; +s32 D_80124014; + +OSPfs pfs[MAXCONTROLLERS]; + +s32 D_801241B8[10]; +s32 D_801241E0; +u8 D_801241E4; +u8 D_801241E5; +u8 D_801241E6; +u8 D_801241E7; +s32 D_801241E8; +s32 D_801241EC; +s32 D_801241F0; +s32 D_801241F4; + +/*******************************/ + +u8 func_8006A4F8(arg0); + +u8 func_80072250(s32 arg0) { + if ((arg0 == 0 || arg0 == 1) && func_8000E158()) { + arg0 = 1 - arg0; + } + return func_8006A4F8(arg0); +} + +void func_80072708(void); +void func_80072298(u8 arg0) { + D_801241E4 = arg0; + if (arg0 != 0) { + D_801241E8 = 0x79; + D_801241E6 = 0xF; + return; + } + func_80072708(); +} + +#ifdef NON_MATCHING +// Unused. Has regalloc issues. +s32 func_800722E8(s16 arg0) { + if (arg0 < 0 || arg0 >= 4) { + return 0; + } + return D_801241E5 & ((1 << func_80072250(arg0)) & 0xFF); +} +#else +GLOBAL_ASM("asm/non_matchings/controller_pak/func_800722E8.s") +#endif + +GLOBAL_ASM("asm/non_matchings/controller_pak/func_80072348.s") +GLOBAL_ASM("asm/non_matchings/controller_pak/func_80072424.s") +GLOBAL_ASM("asm/non_matchings/controller_pak/func_80072578.s") + +void func_80072708(void) { + D_800DE48C = 3; +} + +GLOBAL_ASM("asm/non_matchings/controller_pak/func_80072718.s") +GLOBAL_ASM("asm/non_matchings/controller_pak/func_80072C54.s") +GLOBAL_ASM("asm/non_matchings/controller_pak/func_80072E28.s") +GLOBAL_ASM("asm/non_matchings/controller_pak/func_8007306C.s") +GLOBAL_ASM("asm/non_matchings/controller_pak/func_800732E8.s") +GLOBAL_ASM("asm/non_matchings/controller_pak/func_80073588.s") +GLOBAL_ASM("asm/non_matchings/controller_pak/func_800738A4.s") + +s32 func_80073C4C(void) { + return 256; +} + +s32 func_80073C54(void) { + return 512; +} + +GLOBAL_ASM("asm/non_matchings/controller_pak/func_80073C5C.s") +GLOBAL_ASM("asm/non_matchings/controller_pak/func_80073E1C.s") + +s32 func_80073F5C(s32 arg0, s32 arg1) { + s32 temp_v0; + s32 sp30; + u8 *sp2C; + s32 phi_v1; + s32 sp24; + + sp24 = func_80073C4C(); // 256 bytes + sp2C = allocate_from_main_pool_safe(sp24, COLOR_TAG_WHITE); + *((s32*)sp2C) = 0x47414D44; // GAMD + func_800732E8(arg1, sp2C + 4); + phi_v1 = func_80073C5C(arg0, 3, &sp30); + if (phi_v1 == 0) { + phi_v1 = func_800766D4(arg0, -1, &D_800E7680, &sp30, sp2C, sp24); + } + free_from_memory_pool(sp2C); + if (phi_v1 != 0) { + phi_v1 |= (arg0 << 0x1E); + } + return phi_v1; +} + +GLOBAL_ASM("asm/non_matchings/controller_pak/func_80074018.s") + +s32 func_80074148(s32 arg0, s32 arg1) { + u8 *sp2C; + s32 phi_v1; + s32 sp24; + s32 temp_v0; + s32 sp30; + + sp24 = func_80073C54(); // 512 bytes + sp2C = allocate_from_main_pool_safe(sp24, COLOR_TAG_WHITE); + *((s32*)sp2C) = 0x54494D44; // TIMD + func_800738A4(arg1, sp2C + 4); + phi_v1 = func_80073C5C(arg0, 4, &sp30); + if (phi_v1 == 0) { + phi_v1 = func_800766D4(arg0, -1, &D_800E76A0, &sp30, sp2C, sp24); + } + free_from_memory_pool(sp2C); + if (phi_v1 != 0) { + phi_v1 |= (arg0 << 0x1E); + } + return phi_v1; +} + +GLOBAL_ASM("asm/non_matchings/controller_pak/func_80074204.s") +GLOBAL_ASM("asm/non_matchings/controller_pak/func_8007431C.s") +GLOBAL_ASM("asm/non_matchings/controller_pak/func_800744DC.s") +GLOBAL_ASM("asm/non_matchings/controller_pak/func_800745D0.s") +GLOBAL_ASM("asm/non_matchings/controller_pak/func_800746F0.s") + +GLOBAL_ASM("asm/non_matchings/controller_pak/func_8007480C.s") + +GLOBAL_ASM("asm/non_matchings/controller_pak/func_80074874.s") + +#ifdef NON_MATCHING +s64 func_8007480C(u64 arg0); +// regalloc issues +s32 func_8007497C(u64 *arg0) { + if (osEepromProbe(func_8006A100()) == 0) { + return -1; + } + *arg0 <<= 8; + *arg0 >>= 8; + *arg0 |= (s64)((s32)func_8007480C(*arg0)) << 56; + if (func_8006EAC0() == 0) { + osEepromWrite(func_8006A100(), 0xF, (u8*)arg0); + } + return 1; +} +#else +GLOBAL_ASM("asm/non_matchings/controller_pak/func_8007497C.s") +#endif + + +// Ghost data follows directly after the header +/* Size: 8 bytes */ +typedef struct GhostHeader { + s16 checksum; + s8 unk2; + s8 unk3; + s16 unk4; + s16 numberFrames; +} GhostHeader; + +/* Size: 12 bytes */ +typedef struct GhostDataFrame { + u8 pad0[12]; +} GhostDataFrame; + +#ifdef NON_MATCHING +// regalloc issues +s32 func_80074A4C(GhostHeader *ghostHeader) { + s16 i; + s16 len; + s16 sum; + s32 temp; + + sum = 0; + len = (ghostHeader->numberFrames * sizeof(GhostDataFrame)) + sizeof(GhostHeader); + for(i = sizeof(GhostHeader); i < len; i++) { + sum += ((u8*)ghostHeader)[i]; + } + return sum; +} +#else +GLOBAL_ASM("asm/non_matchings/controller_pak/func_80074A4C.s") +#endif + +void func_80074AA8(GhostHeader *ghostHeader, s16 arg1, s16 arg2, s16 numberFrames, u8 *dest) { + ghostHeader->checksum = 0; + ghostHeader->unk2 = arg1; + ghostHeader->unk3 = 0; + ghostHeader->unk4 = arg2; + ghostHeader->numberFrames = numberFrames; + bcopy(dest, (u8*)ghostHeader + 8, numberFrames * sizeof(GhostDataFrame)); + ghostHeader->checksum = func_80074A4C(ghostHeader); +} + +#ifdef NON_MATCHING +s32 func_80074B1C(void) { + return (0x1100 * 6) + 0x100; // -O2 optimizes this down to "return 0x6700;". +} +#else +GLOBAL_ASM("asm/non_matchings/controller_pak/func_80074B1C.s") +#endif + +GLOBAL_ASM("asm/non_matchings/controller_pak/func_80074B34.s") + +GLOBAL_ASM("asm/non_matchings/controller_pak/func_80074EB8.s") +GLOBAL_ASM("asm/non_matchings/controller_pak/func_80075000.s") +GLOBAL_ASM("asm/non_matchings/controller_pak/func_800753D8.s") +GLOBAL_ASM("asm/non_matchings/controller_pak/func_800756D4.s") +GLOBAL_ASM("asm/non_matchings/controller_pak/func_800758DC.s") + +s32 func_80075AEC(s32 controllerIndex) { + func_800CCFE0(D_80124010); + return 0; +} + +GLOBAL_ASM("asm/non_matchings/controller_pak/func_80075B18.s") + +s32 func_80075D38(s32 controllerIndex) { + s32 phi_v1; + s32 temp_v0 = func_800758DC(); + if (temp_v0 == 0 || temp_v0 == 2) { + temp_v0 = func_800CF530(&pfs[controllerIndex]); + if (temp_v0 == 0) { + phi_v1 = 0; + } else if (temp_v0 == 2) { + phi_v1 = 5; + } else { + phi_v1 = 2; + } + } else { + phi_v1 = 0; + } + func_80075AEC(controllerIndex); + return phi_v1; +} + +s32 func_80075DC4(s32 controllerIndex) { + s32 phi_v1; + s32 temp_v0 = func_800758DC(); + if (temp_v0 == 0 || temp_v0 == 2 || temp_v0 == 3) { + temp_v0 = func_800CFF90(&pfs[controllerIndex], D_80124010, controllerIndex); + if (temp_v0 == 0) { + phi_v1 = 0; + } else if (temp_v0 == 2) { + phi_v1 = 5; + } else { + phi_v1 = 2; + } + } else { + phi_v1 = 0; + } + func_80075AEC(controllerIndex); + return phi_v1; +} + +GLOBAL_ASM("asm/non_matchings/controller_pak/func_80075E60.s") + +void func_80076164(void) { + if (D_800DE440 != 0) { + free_from_memory_pool(D_800DE440); + } + D_800DE440 = 0; +} + +s32 func_80076194(s32 controllerIndex, s32 *arg1, s32 *arg2) { + s32 phi_v1; + s32 sp28; + s32 sp24; + s32 sp20; + + phi_v1 = func_800758DC(); + if (phi_v1 == 0) { + if (arg1 != NULL) { + phi_v1 = osPfsFreeBlocks(&pfs[controllerIndex], &sp28); + if (phi_v1 != 0) { + func_80075AEC(controllerIndex); + return (controllerIndex << 0x1E) | 9; + } + *arg1 = sp28; + } + if (arg2 != NULL) { + phi_v1 = func_800D0390(&pfs[controllerIndex], &sp24, &sp20); + if (phi_v1 != 0) { + func_80075AEC(controllerIndex); + return (controllerIndex << 0x1E) | 9; + } + if (sp20 >= 0x10) { + *arg2 = 0; + } else { + *arg2 = 0x10 - sp20; + } + } + } else { + phi_v1 |= controllerIndex << 0x1E; + } + func_80075AEC(controllerIndex); + return phi_v1; +} + +#ifdef NON_MATCHING +// regalloc & stack issues +s32 func_800762C8(s32 controllerIndex, s32 arg1) { + s16 sp3E; + s16 sp3A; + s32 sp30; + s32 sp34; + u16 sp38; + s32 temp_v0; + void *temp_a0; + + temp_v0 = func_800758DC(); + if (temp_v0 != 0) { + func_80075AEC(controllerIndex); + return (controllerIndex << 0x1E) | temp_v0; + } + temp_v0 = controllerIndex << 0x1E; + temp_a0 = &pfs[controllerIndex]; + temp_v0 |= 9; + if (osPfsFileState(temp_a0, arg1, &sp30) == 0) { + if (func_800D0870(temp_a0, sp38, sp34, &sp3E, &sp3A) == 0) { + temp_v0 = 0; + } + } + func_80075AEC(controllerIndex); + return temp_v0; +} + +#else +GLOBAL_ASM("asm/non_matchings/controller_pak/func_800762C8.s") +#endif + +GLOBAL_ASM("asm/non_matchings/controller_pak/func_80076388.s") +GLOBAL_ASM("asm/non_matchings/controller_pak/func_800764E8.s") + +s32 func_80076610(s32 controllerIndex, s32 arg1, u8 *data, s32 dataLength) { + s32 temp_v0 = osPfsReadWriteFile(&pfs[controllerIndex], arg1, 0, 0, dataLength, data); + if (temp_v0 == 0) { + return 0; + } + if ((temp_v0 == 1) || (temp_v0 == 0xB)) { + return 1; + } + if (temp_v0 == 3) { + return 2; + } + if (temp_v0 == 0xA) { + return 3; + } + if (temp_v0 == 5) { + return 5; + } + return 9; +} + +GLOBAL_ASM("asm/non_matchings/controller_pak/func_800766D4.s") + +#ifdef NON_MATCHING +// Stack issues +s32 func_80076924(s32 controllerIndex, s32 arg1, s32 *arg2) { + s32 sp18; + + *arg2 = 0; + if (!osPfsFileState(&pfs[controllerIndex], arg1, &sp18)) { + *arg2 = sp18; + return 0; + } + return 9; +} + +#else +GLOBAL_ASM("asm/non_matchings/controller_pak/func_80076924.s") +#endif + +GLOBAL_ASM("asm/non_matchings/controller_pak/func_8007698C.s") +GLOBAL_ASM("asm/non_matchings/controller_pak/func_80076A38.s") + +s32 func_80076AF4(s32 controllerIndex, s32 arg1) { + s32* temp; + s32 pad; + s32 ret; + + ret = 6; + temp = allocate_from_main_pool_safe(0x100, COLOR_TAG_BLACK); + if (func_80076610(controllerIndex, arg1, temp, 0x100) == 0) { + switch(*temp) { + case 0x47414D44: // GAMD, Game Data? + ret = 3; + break; + case 0x54494D44: // TIMD, Time Data? + ret = 4; + break; + case 0x47485353: // GHSS, Ghosts? + ret = 5; + break; + default: + ret = 6; + break; + } + } + free_from_memory_pool(temp); + return ret; +} diff --git a/src/unknown_072E50.h b/src/controller_pak.h similarity index 83% rename from src/unknown_072E50.h rename to src/controller_pak.h index d0115848..0a342587 100644 --- a/src/unknown_072E50.h +++ b/src/controller_pak.h @@ -4,7 +4,7 @@ #include "types.h" extern s32 D_800DE440; -extern char D_800DE444[68]; +extern u8 gN64FontCodes[68]; extern s32 D_800DE488; extern s32 D_800DE48C; diff --git a/src/unknown_072E50.c b/src/unknown_072E50.c deleted file mode 100644 index b97ccc61..00000000 --- a/src/unknown_072E50.c +++ /dev/null @@ -1,176 +0,0 @@ -/* The comment below is needed for this file to be picked up by generate_ld */ -/* RAM_POS: 0x80072250 */ - -#include "unknown_072E50.h" -#include "memory.h" - -#include "types.h" -#include "macros.h" - -/************ .data ************/ - -s32 D_800DE440 = 0; -char D_800DE444[68] = "\0 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!\"#'*+,-./:=?@"; -s32 D_800DE488 = 0; // Currently unknown, might be a different type. -s32 D_800DE48C = 0; - -/*******************************/ - -/************ .rodata ************/ - -const char D_800E7590[] = "Region = %d loc = %x size = %x\t"; -const char D_800E75B4[] = "FREE"; -const char D_800E75BC[] = "ALLOCATED"; -const char D_800E75C8[] = "ALLOCATED,FIXED"; -const char D_800E75D8[] = "\n"; -const char D_800E75DC[] = "\n"; -const char D_800E75E0[] = "Region number = %d\t"; -const char D_800E75F4[] = "maxSlots = %d\t"; -const char D_800E7604[] = "slotsUsed = %d\t"; -const char D_800E7614[] = "loc = %x\t"; -const char D_800E7620[] = "size = %x\n"; -const char D_800E762C[] = "\n"; - -const char D_800E7630[] = "DKRACING-ADV"; -const char D_800E7640[] = "DKRACING-ADV"; -const char D_800E7650[] = "DKRACING-TIMES"; -const char D_800E7660[] = "DKRACING-TIMES"; -const char D_800E7670[] = "DKRACING-ADV"; -const char D_800E7680[] = "DKRACING-ADV"; -const char D_800E7690[] = "DKRACING-TIMES"; -const char D_800E76A0[] = "DKRACING-TIMES"; - -const char D_800E76B0[] = "WARNING : No Eprom\n"; -const char D_800E76C4[] = "WARNING : No Eprom\n"; -const char D_800E76D8[] = "WARNING : No Eprom\n"; -const char D_800E76EC[] = "WARNING : No Eprom\n"; -const char D_800E7700[] = "WARNING : No Eprom\n"; -const char D_800E7714[] = "WARNING : No Eprom\n"; -const char D_800E7728[] = "WARNING : No Eprom\n"; - -const char D_800E773C[] = "DKRACING-GHOSTS"; // Used in func_80074B34 -const u8 D_800E774C[4] = { 0, 0, 0, 0 }; // Used in func_80074B34, but I'm confused to what this is for. -const char D_800E7750[] = "warning: corrupt ghost\n"; - -/*********************************/ - -/************ .bss ************/ - -s32 D_80124010; -s32 D_80124014; -s32 D_80124018[104]; -s32 D_801241B8[10]; -s32 D_801241E0; -s8 D_801241E4; -s8 D_801241E5; -s8 D_801241E6; -s8 D_801241E7; -s32 D_801241E8; -s32 D_801241EC; -s32 D_801241F0; -s32 D_801241F4; - -/*******************************/ - -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80072250.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80072298.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80072348.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80072424.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80072578.s") - -void func_80072708(void) { - D_800DE48C = 3; -} - -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80072718.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80072C54.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80072E28.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_8007306C.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_800732E8.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80073588.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_800738A4.s") - -s32 func_80073C4C(void) { - return 0x100; -} - -s32 func_80073C54(void) { - return 0x200; -} - -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80073C5C.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80073E1C.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80073F5C.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80074018.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80074148.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80074204.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_8007431C.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_800744DC.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_800745D0.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_800746F0.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_8007480C.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80074874.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_8007497C.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80074A4C.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80074AA8.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80074B1C.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80074B34.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80074EB8.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80075000.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_800753D8.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_800756D4.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_800758DC.s") - -s32 func_80075AEC(s32 arg0) { - func_800CCFE0(D_80124010); - return 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80075B18.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80075D38.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80075DC4.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80075E60.s") - -void func_80076164(void) { - if (D_800DE440 != 0) { - free_from_memory_pool(D_800DE440); - } - D_800DE440 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80076194.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_800762C8.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80076388.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_800764E8.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80076610.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_800766D4.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80076924.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_8007698C.s") -GLOBAL_ASM("asm/non_matchings/unknown_072E50/func_80076A38.s") - -s32 func_80076AF4(s32 arg0, s32 arg1) { - s32* temp; - s32 pad; - s32 ret; - - ret = 6; - temp = allocate_from_main_pool_safe(0x100, COLOR_TAG_BLACK); - if (func_80076610(arg0, arg1, temp, 0x100) == 0) { - switch(*temp) { - case 0x47414D44: // GAMD - ret = 3; - break; - case 0x54494D44: // TIMD - ret = 4; - break; - case 0x47485353: // GHSS - ret = 5; - break; - default: - ret = 6; - break; - } - } - free_from_memory_pool(temp); - return ret; -} diff --git a/src/unknown_0777A0.c b/src/unknown_0777A0.c index 893be5c0..f52db102 100644 --- a/src/unknown_0777A0.c +++ b/src/unknown_0777A0.c @@ -100,7 +100,7 @@ u8 *func_80076CF0(u32 assetIndex, s32 arg1) { return temp_v0_3; } #else -GLOBAL_ASM("asm/non_matchings/unknown_072E50/load_asset_section_from_rom.s") +GLOBAL_ASM("asm/non_matchings/controller_pak/load_asset_section_from_rom.s") #endif /**