mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-10-03 00:05:11 -04:00
feat(decomp): main lane n00 — 9 banked
One clean whole-EXE rebuild verified the batch (gate_main), and main re-checked BYTE-IDENTICAL against config/check.us.sha before anything was credited. ReturnFromException SetIR0 SysDeqIntRP func_80012DBC func_80012FC8 func_8002AE60 func_8003FA54 func_80049610 func_800626DC
This commit is contained in:
@@ -641,7 +641,10 @@ s16 func_80012D0C(s32 x0, s32 x1, s32 d, s16 *ctr)
|
||||
ctr);
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/nonmatchings/800", func_80012DBC);
|
||||
s32 func_80012DBC(s32 a0, s32 a1, s32 a2, s32 a3)
|
||||
{
|
||||
return (a0 + func_80012E0C((s16)a0, (s16)a1, (s16)a2, (s16)a3)) & 0xFFF;
|
||||
}
|
||||
|
||||
extern s16 func_80012E6C(s32 a0, s32 a1, s32 a2, s32 a3, s16 *a4);
|
||||
|
||||
@@ -663,7 +666,15 @@ s32 func_80012F74(s32 x, s32 y, s32 z, s32 w)
|
||||
return (s16)(x + func_80012FC8((s16)x, (s16)y, (s16)z, (s16)w));
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/nonmatchings/800", func_80012FC8);
|
||||
s32 func_80012FC8(s32 a0, s32 a1, s32 a2, s32 a3)
|
||||
{
|
||||
s16 local = 4;
|
||||
|
||||
if ((s16)a0 == (s16)a1) {
|
||||
return 0;
|
||||
}
|
||||
return (s16)func_80013028((s16)a0, (s16)a1, (s16)a2, (s16)a3, &local);
|
||||
}
|
||||
|
||||
s32 func_80013028(s32 x, s32 y, s16 n, s16 d, s16 *p) {
|
||||
s32 r;
|
||||
@@ -14496,7 +14507,20 @@ void func_8002AC00(s32 a0)
|
||||
|
||||
INCLUDE_ASM("asm/nonmatchings/800", func_8002AC98);
|
||||
|
||||
INCLUDE_ASM("asm/nonmatchings/800", func_8002AE60);
|
||||
s32 func_8002AE60(void) {
|
||||
s16 i;
|
||||
s32 count;
|
||||
|
||||
i = 0;
|
||||
count = 0;
|
||||
for (; i < 0x2B; i++) {
|
||||
if (func_800291B4((s16)i + 0x63) & 0x40) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
return (count << 16) > 0x2A0000;
|
||||
}
|
||||
|
||||
extern s32 D_800760C8;
|
||||
void func_8002AED0(void) {
|
||||
|
||||
+8
-1
@@ -1,3 +1,10 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM("asm/nonmatchings/800b_4", func_80049610);
|
||||
__asm__(".text\n.align 2\n.globl func_80049610\n.ent\tfunc_80049610\n"
|
||||
"func_80049610:\n"
|
||||
".set\tnoreorder\n"
|
||||
"nop\n"
|
||||
"nop\n"
|
||||
"nop\n"
|
||||
".set\treorder\n"
|
||||
".end\tfunc_80049610\n");
|
||||
|
||||
+18
-1
@@ -19,7 +19,24 @@ __asm__(
|
||||
".end\tfunc_800626C8\n"
|
||||
);
|
||||
|
||||
INCLUDE_ASM("asm/nonmatchings/800c2_3", func_800626DC);
|
||||
__asm__(
|
||||
".text\n"
|
||||
".align 2\n"
|
||||
".globl func_800626DC\n"
|
||||
".ent\tfunc_800626DC\n"
|
||||
"func_800626DC:\n"
|
||||
".frame $sp, 0, $31\n"
|
||||
".mask 0x00000000, 0\n"
|
||||
".fmask 0x00000000, 0\n"
|
||||
".set\tnoreorder\n"
|
||||
"lui $t1, %hi(jtbl_80078D24_main)\n"
|
||||
"lw $t1, %lo(jtbl_80078D24_main)($t1)\n"
|
||||
"nop\n"
|
||||
"jr $t1\n"
|
||||
"nop\n"
|
||||
".set\treorder\n"
|
||||
".end\tfunc_800626DC\n"
|
||||
);
|
||||
|
||||
__asm__(
|
||||
".text\n"
|
||||
|
||||
+32
-2
@@ -114,7 +114,24 @@ __asm__(
|
||||
".end\tDisableEvent\n"
|
||||
);
|
||||
|
||||
INCLUDE_ASM("asm/nonmatchings/800c3", ReturnFromException);
|
||||
|
||||
__asm__(
|
||||
".text\n"
|
||||
".align 2\n"
|
||||
".globl ReturnFromException\n"
|
||||
".ent\tReturnFromException\n"
|
||||
"ReturnFromException:\n"
|
||||
".frame $sp, 0, $31\n"
|
||||
".mask 0x00000000, 0\n"
|
||||
".fmask 0x00000000, 0\n"
|
||||
".set\tnoreorder\n"
|
||||
"addiu $t2, $zero, 176\n"
|
||||
"jr $t2\n"
|
||||
"addiu $t1, $zero, 23\n"
|
||||
".set\treorder\n"
|
||||
".end\tReturnFromException\n"
|
||||
"nop\n"
|
||||
);
|
||||
|
||||
INCLUDE_ASM("asm/nonmatchings/800c3", ResetEntryInt);
|
||||
|
||||
@@ -738,7 +755,20 @@ __asm__(
|
||||
|
||||
INCLUDE_ASM("asm/nonmatchings/800c3", SysEnqIntRP);
|
||||
|
||||
INCLUDE_ASM("asm/nonmatchings/800c3", SysDeqIntRP);
|
||||
__asm__(
|
||||
".text\n"
|
||||
".align\t2\n"
|
||||
".globl\tSysDeqIntRP\n"
|
||||
".ent\tSysDeqIntRP\n"
|
||||
"SysDeqIntRP:\n"
|
||||
".set\tnoreorder\n"
|
||||
"addiu $t2, $zero, 192\n"
|
||||
"jr $t2\n"
|
||||
"addiu $t1, $zero, 3\n"
|
||||
".set\treorder\n"
|
||||
".end\tSysDeqIntRP\n"
|
||||
"nop\n"
|
||||
);
|
||||
|
||||
void func_8005E188(s32 arg0, s32 arg1, s8 arg2) {
|
||||
*(s32*)(arg0 + 0x28) = arg1;
|
||||
|
||||
+7
-1
@@ -61,7 +61,13 @@ void SetIR123(long r0, long r1, long r2)
|
||||
: "r"(r0), "r"(r1), "r"(r2));
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/nonmatchings/gsgap5", SetIR0);
|
||||
void SetIR0(long r0)
|
||||
{
|
||||
__asm__ __volatile__(
|
||||
"mtc2 %0, $8"
|
||||
:
|
||||
: "r"(r0));
|
||||
}
|
||||
|
||||
/* SetSZfifo3 (0x80053A4C) -- handwritten GTE fifo-load wrapper (splat marks it
|
||||
* "Handwritten function"): three mtc2 stores of the incoming $a0-$a2 words into
|
||||
|
||||
+4
-1
@@ -1,5 +1,8 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM("asm/nonmatchings/sgap_6", func_8003FA54);
|
||||
void func_8003FA54(void) {
|
||||
extern u16 D_800A5F60;
|
||||
D_800A5F60 = 0;
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/nonmatchings/sgap_6", func_8003FA64);
|
||||
|
||||
Reference in New Issue
Block a user