mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-26 21:36:06 -04:00
feat(phase-30 S48-0b): jtbl family func_80181CE4 — 1/1 blocked-binary siblings banked
This commit is contained in:
+1
-1
@@ -4979,7 +4979,7 @@ build/src/ov_SC03_107/ov_SC03_107_jr_80131340.o: JTBL_PADS := 0,0,4 # §8e pads
|
||||
build/src/ov_SC03_107/ov_SC03_107_jr_80135A4C.o: JTBL_PADS := 0,4 # §8e pads (jtbl_carve.py) tables=+0x0,+0x18
|
||||
build/src/ov_SC03_107/ov_SC03_107_jr_8013F350.o: JTBL_PADS := 0,0,4,0,4,0,4 # §8e pads (jtbl_carve.py) tables=+0x0,+0x20,+0x38,+0x58,+0x70,+0x90,+0xa8
|
||||
build/src/ov_SC03_107/ov_SC03_107_jr_80159C84.o: JTBL_PADS := 0,4 # §8e pads (jtbl_carve.py) tables=+0x0,+0x20
|
||||
build/src/ov_SC03_107/ov_SC03_107_jr_801789AC.o: JTBL_PADS := 0,0,0,4,4 # §8e pads (jtbl_carve.py) tables=+0x0,+0x18,+0x190,+0x220,+0x2b0
|
||||
build/src/ov_SC03_107/ov_SC03_107_jr_801789AC.o: JTBL_PADS := 0,0,0,4,4,0 # §8e pads (jtbl_carve.py) tables=+0x0,+0x18,+0x190,+0x220,+0x2b0,+0x2c4
|
||||
ov_SC03_107_CHECK_SHA := config/check.ov_SC03_107.sha
|
||||
ov_SC03_107_SYMBOLS := config/symbols.ov_SC03_107.txt
|
||||
ov_SC03_107_SIG := .run/sig.ov_SC03_107.jsonl
|
||||
|
||||
@@ -125,7 +125,7 @@ segments:
|
||||
- [0x71f80, .rodata, ov_SC03_107_jr_8015A3C8] # Phase-26 §8 jtbl-rodata carve (jtbl_carve.py)
|
||||
- [0x71f9c, data, tail10]
|
||||
- [0x72258, .rodata, ov_SC03_107_jr_801789AC] # Phase-26 §8 jtbl-rodata carve (jtbl_carve.py)
|
||||
- [0x7251c, data, tail11]
|
||||
- [0x72584, data, tail11]
|
||||
- [0x73BE4, bin, trailing] # final 3 bytes (EOF not 4-aligned; spimdisasm drops a partial word)
|
||||
- [0x73BE7] # EOF marker = the 0.4.dec byte length
|
||||
# @TRAILING@ (above) is replaced by tools/new_overlay.sh: for a non-4-aligned overlay it becomes
|
||||
|
||||
@@ -6455,7 +6455,312 @@ INCLUDE_ASM("asm/ov_SC03_107/nonmatchings/ov_SC03_107_jr_801789AC", func_8017ED6
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC03_107/nonmatchings/ov_SC03_107_jr_801789AC", func_8017EEA8);
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC03_107/nonmatchings/ov_SC03_107_jr_801789AC", func_8017EF3C);
|
||||
|
||||
|
||||
extern s32 func_8012C354(s32 a0, s32 a1);
|
||||
extern s32 func_8012C658(s32 arg0, s32 arg1, s32 arg2);
|
||||
extern void func_8012CAE4(void *a0);
|
||||
extern void func_8012A828(s32 a0, void *a1);
|
||||
extern void func_8012B1B4(s32 a0, s32 a1);
|
||||
extern void func_8012B23C(s32 a0);
|
||||
extern void func_8012C1B8(void);
|
||||
extern void func_8001CA1C(s32 a0, s32 a1);
|
||||
extern void func_800233CC(void *, unsigned short);
|
||||
extern s32 func_8004787C(s32 a0);
|
||||
extern s32 func_80047948(s32 a0);
|
||||
extern s32 rand(void);
|
||||
|
||||
|
||||
void func_8017EF3C(void *a0v)
|
||||
{
|
||||
|
||||
extern u8 D_801973F8[];
|
||||
extern u8 D_80198828[];
|
||||
extern u8 D_801974CC[];
|
||||
extern u8 D_80197498[];
|
||||
extern u8 D_8019BA48[];
|
||||
extern u8 D_8019742C[];
|
||||
extern u8 D_80197438[];
|
||||
extern u8 D_80197440[];
|
||||
extern u8 D_80197450[];
|
||||
extern u16 D_80197454;
|
||||
extern u8 D_80197458[];
|
||||
extern u8 D_80197464[];
|
||||
extern u8 D_8019746C[];
|
||||
extern u8 D_80197490[];
|
||||
extern u16 D_80197494;
|
||||
extern u8 D_8019747C[];
|
||||
extern u8 D_80197488[];
|
||||
extern u8 D_8019BA89;
|
||||
extern u8 D_8019BA8A;
|
||||
extern u8 D_8019BA8C;
|
||||
s32 e;
|
||||
s32 r;
|
||||
s32 o;
|
||||
s32 cc;
|
||||
s32 sv;
|
||||
u8 *p;
|
||||
u8 *q;
|
||||
|
||||
e = (s32)a0v;
|
||||
|
||||
switch (*(s16 *)(e + 0x70)) {
|
||||
case 0:
|
||||
if (func_8012C354(e, (s32)D_801973F8) == 0) {
|
||||
return;
|
||||
}
|
||||
*(u8 *)(e + 0xC0) = 1;
|
||||
*(s32 *)(e + 0xB4) = -1;
|
||||
*(s32 *)(e + 0xBC) = (s32)D_801974CC;
|
||||
func_8012A828(e, D_80198828);
|
||||
*(s16 *)(e + 0x2) = 1;
|
||||
*(s16 *)(e + 0x34) = 1;
|
||||
func_8012B23C(e);
|
||||
func_8012B1B4(e, (s32)D_80197498);
|
||||
*(s32 *)(e + 0xCC) = (s32)(D_8019BA48 + *(s16 *)(e + 0xFC) * 8);
|
||||
o = func_8012C658(0x1EA, 1, e);
|
||||
if (o != 0) {
|
||||
*(u16 *)(o + 0xFE) = *(u16 *)(e + 0x36);
|
||||
}
|
||||
return;
|
||||
|
||||
case 1:
|
||||
r = ((s32 (*)(void))func_8012C1B8)();
|
||||
*(s32 *)(e + 0x20) = r;
|
||||
if (r == 0) {
|
||||
func_8012CAE4((void *)e);
|
||||
return;
|
||||
}
|
||||
func_8001CA1C(r, (s32)D_8019742C);
|
||||
func_8012A828(e, D_80197438);
|
||||
*(s16 *)(e + 0x2) = 2;
|
||||
*(s16 *)(e + 0x5C) = 0x810;
|
||||
*(s32 *)(e + 0x58) = (s32)D_80197440 | 0x40000000 | 0x20000000;
|
||||
*(s32 *)(e + 0xD0) = (s32)D_80197450;
|
||||
*(u16 *)(e + 0xE) = *(u16 *)(e + 0xE) + D_80197454;
|
||||
cc = *(s32 *)(*(s32 *)(e + 0x64) + 0xCC);
|
||||
*(u16 *)(*(s32 *)(e + 0x20) + 0x2C) = *(u16 *)(*(s32 *)(e + 0x20) + 0x2C) | 0x80;
|
||||
*(s32 *)(*(s32 *)(e + 0x20) + 0x80) = cc;
|
||||
*(s32 *)(e + 0xCC) = cc;
|
||||
o = func_8012C658(0x1EA, 2, e);
|
||||
if (o != 0) {
|
||||
*(u16 *)(o + 0xFE) = *(u16 *)(e + 0x36);
|
||||
}
|
||||
return;
|
||||
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
r = ((s32 (*)(void))func_8012C1B8)();
|
||||
*(s32 *)(e + 0x20) = r;
|
||||
if (r == 0) {
|
||||
func_8012CAE4((void *)e);
|
||||
return;
|
||||
}
|
||||
func_8001CA1C(r, (s32)D_80197458);
|
||||
func_8012A828(e, D_80197464);
|
||||
*(s16 *)(e + 0x2) = 0xF;
|
||||
*(s16 *)(e + 0x5C) = 0x810;
|
||||
*(s32 *)(e + 0x58) = (s32)D_8019746C | 0x40000000 | 0x20000000;
|
||||
*(s32 *)(e + 0xD0) = (s32)D_80197490;
|
||||
*(u16 *)(e + 0xE) = *(u16 *)(e + 0xE) + D_80197494;
|
||||
return;
|
||||
|
||||
case 7:
|
||||
if (func_8012C354(e, (s32)D_801973F8) == 0) {
|
||||
return;
|
||||
}
|
||||
p = &D_8019BA89;
|
||||
q = p - 1;
|
||||
D_8019BA8A = 0xFF;
|
||||
*q = 0xFF;
|
||||
*p = 0;
|
||||
D_8019BA8A = 0;
|
||||
D_8019BA8C = 0;
|
||||
func_800233CC(q, 0x20);
|
||||
*(u8 *)(e + 0xC0) = 1;
|
||||
*(s32 *)(e + 0xB4) = -1;
|
||||
*(s32 *)(e + 0xBC) = (s32)D_801974CC;
|
||||
func_8012A828(e, D_80198828);
|
||||
*(s16 *)(e + 0x2) = 8;
|
||||
*(s16 *)(e + 0x34) = 0xB;
|
||||
func_8012B23C(e);
|
||||
sv = *(s16 *)(e + 0xFC);
|
||||
*(s16 *)(e + 0xFC) = 0;
|
||||
*(s32 *)(e + 0xCC) = (s32)(D_8019BA48 + sv * 8);
|
||||
o = func_8012C658(0x1EA, 8, e);
|
||||
if (o != 0) {
|
||||
*(u16 *)(o + 0xFE) = *(u16 *)(e + 0x36);
|
||||
}
|
||||
return;
|
||||
|
||||
case 8:
|
||||
r = ((s32 (*)(void))func_8012C1B8)();
|
||||
*(s32 *)(e + 0x20) = r;
|
||||
if (r == 0) {
|
||||
func_8012CAE4((void *)e);
|
||||
return;
|
||||
}
|
||||
func_8001CA1C(r, (s32)D_8019742C);
|
||||
func_8012A828(e, D_80197438);
|
||||
*(s16 *)(e + 0x2) = 2;
|
||||
*(s16 *)(e + 0x5C) = 0x810;
|
||||
*(s32 *)(e + 0x58) = (s32)D_80197440 | 0x40000000 | 0x20000000;
|
||||
*(s32 *)(e + 0xD0) = (s32)D_80197450;
|
||||
*(u16 *)(e + 0xE) = *(u16 *)(e + 0xE) + D_80197454;
|
||||
cc = *(s32 *)(*(s32 *)(e + 0x64) + 0xCC);
|
||||
*(u16 *)(*(s32 *)(e + 0x20) + 0x2C) = *(u16 *)(*(s32 *)(e + 0x20) + 0x2C) | 0x80;
|
||||
*(s32 *)(*(s32 *)(e + 0x20) + 0x80) = cc;
|
||||
*(s32 *)(e + 0xCC) = cc;
|
||||
o = func_8012C658(0x1EA, 9, e);
|
||||
if (o != 0) {
|
||||
*(u16 *)(o + 0xFE) = *(u16 *)(e + 0x36);
|
||||
}
|
||||
*(u16 *)(e + 0x106) = (rand() & 0x1F) + 0x20;
|
||||
*(u16 *)(e + 0x100) = (rand() & 0x1F) + 0x20;
|
||||
*(u16 *)(e + 0x102) = rand() & 0xFFF;
|
||||
*(u16 *)(e + 0x104) = rand() & 0xFFF;
|
||||
return;
|
||||
|
||||
case 9:
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
r = ((s32 (*)(void))func_8012C1B8)();
|
||||
*(s32 *)(e + 0x20) = r;
|
||||
if (r == 0) {
|
||||
func_8012CAE4((void *)e);
|
||||
return;
|
||||
}
|
||||
func_8001CA1C(r, (s32)D_80197458);
|
||||
func_8012A828(e, D_80197464);
|
||||
*(s16 *)(e + 0x2) = 0xF;
|
||||
*(s16 *)(e + 0x5C) = 0x810;
|
||||
*(s32 *)(e + 0x58) = (s32)D_8019746C | 0x40000000 | 0x20000000;
|
||||
*(s32 *)(e + 0xD0) = (s32)D_80197490;
|
||||
*(u16 *)(e + 0xE) = *(u16 *)(e + 0xE) + D_80197494;
|
||||
*(u16 *)(e + 0x106) = (rand() & 0x1F) + 0x20;
|
||||
*(u16 *)(e + 0x100) = (rand() & 0x1F) + 0x20;
|
||||
*(u16 *)(e + 0x102) = rand() & 0xFFF;
|
||||
*(u16 *)(e + 0x104) = rand() & 0xFFF;
|
||||
return;
|
||||
|
||||
case 14:
|
||||
r = ((s32 (*)(void))func_8012C1B8)();
|
||||
*(s32 *)(e + 0x20) = r;
|
||||
if (r == 0) {
|
||||
func_8012CAE4((void *)e);
|
||||
return;
|
||||
}
|
||||
func_8001CA1C(r, (s32)D_8019747C);
|
||||
func_8012A828(e, D_80197488);
|
||||
*(s16 *)(e + 0x2) = 0xC;
|
||||
*(u16 *)(*(s32 *)(e + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(e + 0x64) + 0x20) + 0x10);
|
||||
*(u16 *)(*(s32 *)(e + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(e + 0x64) + 0x20) + 0x12);
|
||||
*(s32 *)(e + 0x14) = func_8004787C(*(s16 *)(*(s32 *)(e + 0x20) + 0x10)) << 9;
|
||||
{
|
||||
s32 t1 = func_8004787C(*(s16 *)(*(s32 *)(e + 0x20) + 0x12));
|
||||
*(s32 *)(e + 0x10) = -((t1 * func_80047948(*(s16 *)(*(s32 *)(e + 0x20) + 0x10))) >> 3);
|
||||
}
|
||||
{
|
||||
s32 t2 = func_80047948(*(s16 *)(*(s32 *)(e + 0x20) + 0x12));
|
||||
*(s32 *)(e + 0x18) = -((t2 * func_80047948(*(s16 *)(*(s32 *)(e + 0x20) + 0x10))) >> 3);
|
||||
}
|
||||
*(s32 *)(e + 0x10) = (*(s32 *)(e + 0x10) * 2) / 3;
|
||||
*(s32 *)(e + 0x1C) = 0x12C;
|
||||
*(s32 *)(e + 0x14) = (*(s32 *)(e + 0x14) * 2) / 3;
|
||||
*(s32 *)(e + 0x18) = (*(s32 *)(e + 0x18) * 2) / 3;
|
||||
return;
|
||||
|
||||
case 15:
|
||||
if (func_8012C354(e, (s32)D_801973F8) == 0) {
|
||||
return;
|
||||
}
|
||||
*(u8 *)(e + 0xC0) = 1;
|
||||
*(s32 *)(e + 0xB4) = -1;
|
||||
*(s32 *)(e + 0xBC) = (s32)D_801974CC;
|
||||
func_8012A828(e, D_80198828);
|
||||
*(s16 *)(e + 0x2) = 0xD;
|
||||
*(s16 *)(e + 0x34) = 0xD;
|
||||
func_8012B23C(e);
|
||||
*(s32 *)(e + 0xCC) = (s32)(D_8019BA48 + *(s16 *)(e + 0xFC) * 8);
|
||||
o = func_8012C658(0x1EA, 0x11, e);
|
||||
if (o != 0) {
|
||||
*(u16 *)(o + 0xFE) = *(u16 *)(e + 0x36);
|
||||
*(s32 *)(e + 0x6C) = o;
|
||||
}
|
||||
*(s16 *)(e + 0xFC) = 0xA;
|
||||
return;
|
||||
|
||||
case 16:
|
||||
case 24:
|
||||
*(s16 *)(e + 0x2) = 0xE;
|
||||
*(s32 *)(e + 0x1C) = 6;
|
||||
return;
|
||||
|
||||
case 17:
|
||||
r = ((s32 (*)(void))func_8012C1B8)();
|
||||
*(s32 *)(e + 0x20) = r;
|
||||
if (r == 0) {
|
||||
func_8012CAE4((void *)e);
|
||||
return;
|
||||
}
|
||||
func_8001CA1C(r, (s32)D_8019742C);
|
||||
func_8012A828(e, D_80197438);
|
||||
*(s16 *)(e + 0x2) = 0x11;
|
||||
*(s16 *)(e + 0x5C) = 0x810;
|
||||
*(s32 *)(e + 0x58) = (s32)D_80197440 | 0x40000000 | 0x20000000;
|
||||
*(s32 *)(e + 0xD0) = (s32)D_80197450;
|
||||
*(u16 *)(e + 0xE) = *(u16 *)(e + 0xE) + D_80197454;
|
||||
cc = *(s32 *)(*(s32 *)(e + 0x64) + 0xCC);
|
||||
*(u16 *)(*(s32 *)(e + 0x20) + 0x2C) = *(u16 *)(*(s32 *)(e + 0x20) + 0x2C) | 0x80;
|
||||
*(s32 *)(*(s32 *)(e + 0x20) + 0x80) = cc;
|
||||
*(s32 *)(e + 0xCC) = cc;
|
||||
o = func_8012C658(0x1EA, 0x12, e);
|
||||
if (o != 0) {
|
||||
*(u16 *)(o + 0xFE) = *(u16 *)(e + 0x36);
|
||||
*(s32 *)(e + 0x6C) = o;
|
||||
}
|
||||
*(u16 *)(e + 0x106) = (rand() & 0x1F) + 0x20;
|
||||
*(u16 *)(e + 0x100) = (rand() & 0x1F) + 0x20;
|
||||
*(u16 *)(e + 0x102) = rand() & 0xFFF;
|
||||
*(u16 *)(e + 0x104) = rand() & 0xFFF;
|
||||
return;
|
||||
|
||||
case 18:
|
||||
case 19:
|
||||
case 20:
|
||||
case 21:
|
||||
case 22:
|
||||
r = ((s32 (*)(void))func_8012C1B8)();
|
||||
*(s32 *)(e + 0x20) = r;
|
||||
if (r == 0) {
|
||||
func_8012CAE4((void *)e);
|
||||
return;
|
||||
}
|
||||
func_8001CA1C(r, (s32)D_80197458);
|
||||
func_8012A828(e, D_80197464);
|
||||
*(s16 *)(e + 0x2) = 0x10;
|
||||
*(s16 *)(e + 0x5C) = 0x810;
|
||||
*(s32 *)(e + 0x58) = (s32)D_8019746C | 0x40000000 | 0x20000000;
|
||||
*(s32 *)(e + 0xD0) = (s32)D_80197490;
|
||||
*(u16 *)(e + 0xE) = *(u16 *)(e + 0xE) + D_80197494;
|
||||
*(u16 *)(e + 0x106) = (rand() & 0x1F) + 0x20;
|
||||
*(u16 *)(e + 0x100) = (rand() & 0x1F) + 0x20;
|
||||
*(u16 *)(e + 0x102) = rand() & 0xFFF;
|
||||
*(u16 *)(e + 0x104) = rand() & 0xFFF;
|
||||
return;
|
||||
|
||||
case 25:
|
||||
*(s16 *)(e + 0x2) = 0x13;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
extern s32 func_8004787C(s32 a0);
|
||||
extern s32 func_80047948(s32 a0);
|
||||
|
||||
Reference in New Issue
Block a user