From f3501ee527cde332ceb735a54bb035f2065c95fd Mon Sep 17 00:00:00 2001 From: Drew T <50529377+Druthulu@users.noreply.github.com> Date: Tue, 25 Aug 2026 07:38:49 -0600 Subject: [PATCH] =?UTF-8?q?feat(decomp):=20main=20lane=20m23=20=E2=80=94?= =?UTF-8?q?=203=20banked?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. func_800111BC func_80028DBC func_800495EC --- src/800.c | 6 +++++- src/800b_3.c | 21 ++++++++++++++++++++- src/boot.c | 13 ++++++++++++- 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/src/800.c b/src/800.c index ac3336b79..51194343e 100644 --- a/src/800.c +++ b/src/800.c @@ -12664,7 +12664,11 @@ INCLUDE_ASM("asm/nonmatchings/800", func_80028D78); INCLUDE_ASM("asm/nonmatchings/800", func_80028D9C); -INCLUDE_ASM("asm/nonmatchings/800", func_80028DBC); +extern void func_80029124(s32, s32); + +void func_80028DBC(s32 a0) { + func_80029124(0xC, a0 & 0xFF); +} INCLUDE_ASM("asm/nonmatchings/800", func_80028DE0); diff --git a/src/800b_3.c b/src/800b_3.c index fde978efd..b348d7008 100644 --- a/src/800b_3.c +++ b/src/800b_3.c @@ -1,3 +1,22 @@ #include "common.h" -INCLUDE_ASM("asm/nonmatchings/800b_3", func_800495EC); + +/* func_800495EC -- handwritten GTE SXY-load entry (splat: Handwritten function). + * Three mtc2 stores of the incoming $a0-$a2 words into cop2 regs SXY0/SXY2/SXY1, + * then TWO bare nops and NO jr: control falls through into func_80049600 + * (nclip + mfc2 $v0,$24 + jr $ra) in the next object. Any C function definition + * would emit a jr $ra epilogue the target does not have, so the body is + * transcribed verbatim as a file-scope asm block (cookbook ยง265 lane 1; + * SetSZfifo3 form @ src/gsgap5.c:54). Decimal immediates only (maspsx). + * Recovered semantics: gte_ldsxy3(a0,a1,a2); gte_nclip(); return gte_stMAC0(); + * via the fallthrough. */ +__asm__(".text\n.align 2\n.globl func_800495EC\n.ent\tfunc_800495EC\n" + "func_800495EC:\n" + ".set\tnoreorder\n" + "mtc2 $4, $12\n" + "mtc2 $6, $14\n" + "mtc2 $5, $13\n" + "nop\n" + "nop\n" + ".set\treorder\n" + ".end\tfunc_800495EC\n"); diff --git a/src/boot.c b/src/boot.c index 805248091..4bcf1ede8 100644 --- a/src/boot.c +++ b/src/boot.c @@ -341,7 +341,18 @@ void DebugMenuHandler(void) { (void)iVar1; } -INCLUDE_ASM("asm/nonmatchings/boot", func_800111BC); +extern u8 D_800AF630[]; +extern void func_800CEE74(void); +extern void func_80011818(s32); + +void func_800111BC(void) { + register u8 *p = D_800AF630; + + func_800CEE74(); + if (*(u16 *)(p + 0xA3B6) != 0) { + func_80011818(0xA); + } +} INCLUDE_ASM("asm/nonmatchings/boot", func_80011220);