mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-10-02 16:00:27 -04:00
feat(phase-29 §8e): bank giant func_80159C84 (337) x1 — isolate + the FIRST pad=4 spec
- NON-CONTIGUOUS -> jr_isolate_all --only (new jr_80159C84 subseg, 2 region files); jtbl_carve func_jtbls: stale-location .s CONTENT fallback (ownership stays config-derived) — needed once a spliced fn is re-extracted (no fresh .s anywhere). - carve: jtbl_801D8AFC (7e, trimmed) + pad word + jtbl_801D8B1C (5e, trimmed) -> JTBL_PADS := 0,4 — the first reproduced ORIGINAL interior pad (the §8a 'handle then' address). - splice reconciles (§8d carried-layer-wins, all byte-neutral): draft scalar typedefs stripped; 3 draft decls dropped for carried (D_801891B8 void*, D_8018911C u8 addr-only, func_80149FB0 s32); 3 call-site casts + the §17a-1 fn-ptr cast for canonical-(void) func_80161208. - whole-binary gate [ OK ] sha1 d19c9580 == check.
This commit is contained in:
+2
-1
@@ -21,8 +21,9 @@ ov_SC01_077_ELF := $(ov_SC01_077_OUT).elf
|
||||
ov_SC01_077_MAPFILE := $(ov_SC01_077_OUT).map
|
||||
ov_SC01_077_LD_SCRIPT := $(ov_SC01_077_OUT).ld
|
||||
ov_SC01_077_SPLAT_YAML := config/splat.ov_SC01_077.yaml
|
||||
ov_SC01_077_JTBL_INTERLEAVE := --order tail.data.o,ov_SC01_077_jr_8012ACE0.o,tail2.data.o,ov_SC01_077_jr_801380E0.o,tail3.data.o,ov_SC01_077.o,tail4.data.o,ov_SC01_077_jr_8015444C.o,tail5.data.o,ov_SC01_077_jr_8015A3C8.o,tail6.data.o,ov_SC01_077_jr_8015AE2C.o,tail7.data.o,ov_SC01_077_jr_8016AB6C.o,tail8.data.o,ov_SC01_077_jr_801734BC.o,tail9.data.o,ov_SC01_077_jr_80178D40.o,tail10.data.o,ov_SC01_077_jr_8017A4AC.o,tail11.data.o,ov_SC01_077_jr_80182268.o,tail12.data.o,trailing.o # Phase-26 §8 jtbl-rodata carve
|
||||
ov_SC01_077_JTBL_INTERLEAVE := --order tail.data.o,ov_SC01_077_jr_8012ACE0.o,tail2.data.o,ov_SC01_077_jr_801380E0.o,tail3.data.o,ov_SC01_077.o,tail4.data.o,ov_SC01_077_jr_8015444C.o,tail5.data.o,ov_SC01_077_jr_80159C84.o,tail6.data.o,ov_SC01_077_jr_8015A3C8.o,tail7.data.o,ov_SC01_077_jr_8015AE2C.o,tail8.data.o,ov_SC01_077_jr_8016AB6C.o,tail9.data.o,ov_SC01_077_jr_801734BC.o,tail10.data.o,ov_SC01_077_jr_80178D40.o,tail11.data.o,ov_SC01_077_jr_8017A4AC.o,tail12.data.o,ov_SC01_077_jr_80182268.o,tail13.data.o,trailing.o # Phase-26 §8 jtbl-rodata carve
|
||||
build/src/ov_SC01_077/ov_SC01_077_jr_8012ACE0.o: JTBL_PADS := 0,0 # Phase-29 §8e jtbl pad spec (jtbl_carve.py)
|
||||
build/src/ov_SC01_077/ov_SC01_077_jr_80159C84.o: JTBL_PADS := 0,4 # Phase-29 §8e jtbl pad spec (jtbl_carve.py)
|
||||
ov_SC01_077_CHECK_SHA := config/check.ov_SC01_077.sha
|
||||
ov_SC01_077_SYMBOLS := config/symbols.ov_SC01_077.txt
|
||||
ov_SC01_077_SIG := .run/sig.ov_SC01_077.jsonl
|
||||
|
||||
@@ -68,6 +68,7 @@ segments:
|
||||
- [0x1CA44, c, ov_SC01_077_o0b] # -O0 WHALE func_80144B9C: vram 0x80144B9C..0x801457A4 (file 0x1CA44..0x1D64C)
|
||||
- [0x1d64c, c, ov_SC01_077_after]
|
||||
- [0x2c2f4, c, ov_SC01_077_jr_8015444C]
|
||||
- [0x31b2c, c, ov_SC01_077_jr_80159C84]
|
||||
- [0x32270, c, ov_SC01_077_jr_8015A3C8]
|
||||
- [0x32cd4, c, ov_SC01_077_jr_8015AE2C]
|
||||
- [0x42a14, c, ov_SC01_077_jr_8016AB6C]
|
||||
@@ -95,20 +96,22 @@ segments:
|
||||
- [0xb0774, data, tail4]
|
||||
- [0xb07dc, .rodata, ov_SC01_077_jr_8015444C] # Phase-26 §8 jtbl-rodata carve (jtbl_carve.py)
|
||||
- [0xb0848, data, tail5]
|
||||
- [0xb09a4, .rodata, ov_SC01_077_jr_80159C84] # Phase-26 §8 jtbl-rodata carve (jtbl_carve.py)
|
||||
- [0xb09d8, data, tail6]
|
||||
- [0xb09dc, .rodata, ov_SC01_077_jr_8015A3C8] # Phase-26 §8 jtbl-rodata carve (jtbl_carve.py)
|
||||
- [0xb09f8, data, tail6]
|
||||
- [0xb09f8, data, tail7]
|
||||
- [0xb09fc, .rodata, ov_SC01_077_jr_8015AE2C] # Phase-26 §8 jtbl-rodata carve (jtbl_carve.py)
|
||||
- [0xb0a18, data, tail7]
|
||||
- [0xb0a18, data, tail8]
|
||||
- [0xb0a70, .rodata, ov_SC01_077_jr_8016AB6C] # Phase-26 §8 jtbl-rodata carve (jtbl_carve.py)
|
||||
- [0xb0a90, data, tail8]
|
||||
- [0xb0a90, data, tail9]
|
||||
- [0xb0b10, .rodata, ov_SC01_077_jr_801734BC] # Phase-26 §8 jtbl-rodata carve (jtbl_carve.py)
|
||||
- [0xb0b24, data, tail9]
|
||||
- [0xb0b24, data, tail10]
|
||||
- [0xb0ccc, .rodata, ov_SC01_077_jr_80178D40] # Phase-26 §8 jtbl-rodata carve (jtbl_carve.py)
|
||||
- [0xb0e44, data, tail10]
|
||||
- [0xb0e44, data, tail11]
|
||||
- [0xb0ed4, .rodata, ov_SC01_077_jr_8017A4AC] # Phase-26 §8 jtbl-rodata carve (jtbl_carve.py)
|
||||
- [0xb0f60, data, tail11]
|
||||
- [0xb0f60, data, tail12]
|
||||
- [0xb1148, .rodata, ov_SC01_077_jr_80182268] # Phase-26 §8 jtbl-rodata carve (jtbl_carve.py)
|
||||
- [0xb1168, data, tail12]
|
||||
- [0xb1168, data, tail13]
|
||||
- [0xB29D4, bin, trailing] # final 3 bytes (EOF 0xB29D7 not word-aligned; spimdisasm drops
|
||||
# a trailing partial word and a <4-byte `data` carve emits nothing,
|
||||
# so use `bin` = raw .incbin, byte-exact). Word-aligned overlays omit this.
|
||||
|
||||
@@ -2344,68 +2344,3 @@ void func_80159BE4(s32 arg0)
|
||||
((void (*)(int))func_80172590)(arg0);
|
||||
((void (*)(int))func_80146CA0)(arg0);
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_8015444C", func_80159C84);
|
||||
|
||||
DEFINE_func_8015A1C8() /* dedup: shared engine-core @0x8015A1C8 (src/shared) */
|
||||
|
||||
DEFINE_func_8015A1FC() /* dedup: shared engine-core @0x8015A1FC (src/shared) */
|
||||
|
||||
DEFINE_func_8015A230() /* dedup: shared engine-core @0x8015A230 (src/shared) */
|
||||
|
||||
extern void (*D_80189308[])(void *);
|
||||
|
||||
void func_8015A264(void *a0)
|
||||
{
|
||||
D_80189308[*(u16 *)((s32)a0 + 0x2)](a0);
|
||||
}
|
||||
|
||||
DEFINE_func_8015A2A0() /* dedup: shared engine-core @0x8015A2A0 (src/shared) */
|
||||
|
||||
// @class: other
|
||||
// @stuck: none — MATCH (60 ins). switch() gives signed slti pivot; per-case duplicated call gives per-case a0 setup + nop jal delay
|
||||
|
||||
extern int D_8018912C;
|
||||
|
||||
extern void func_80146DB8(s32 *a0, s32 *a1);
|
||||
extern void func_80154150(s32 a0, s32 a1);
|
||||
extern void func_80154A74(s32 a0, s32 a1);
|
||||
extern void func_8014C010(s32 a0, s32 a1);
|
||||
extern void func_801553A8(s32 *a0);
|
||||
extern s32 func_80172608(u8 *a0);
|
||||
extern void func_80146CA0(void *a0);
|
||||
|
||||
void func_8015A2D8(s32 param_1)
|
||||
{
|
||||
unsigned char bVar1;
|
||||
|
||||
((void (*)(int, int *))func_80146DB8)(param_1, &D_8018912C);
|
||||
if ((*(unsigned int *)(param_1 + 0x44) & 0x200) != 0) {
|
||||
func_80154150(param_1, 10);
|
||||
func_80154A74(param_1, 0x1c);
|
||||
*(int *)(param_1 + 0x2c) = 0xfffc0000;
|
||||
goto LAB_8015a38c;
|
||||
}
|
||||
bVar1 = *(unsigned char *)(param_1 + 0xa9);
|
||||
switch (bVar1) {
|
||||
case 0x41:
|
||||
func_80154150(param_1, 7);
|
||||
break;
|
||||
case 0x53:
|
||||
case 0x73:
|
||||
func_80154150(param_1, 6);
|
||||
break;
|
||||
default:
|
||||
*(int *)(param_1 + 0x23c) = 0;
|
||||
goto LAB_8015a390;
|
||||
}
|
||||
func_80154A74(param_1, 0x21);
|
||||
LAB_8015a38c:
|
||||
*(int *)(param_1 + 0x23c) = 0;
|
||||
LAB_8015a390:
|
||||
func_8014C010(param_1, 2);
|
||||
((void (*)(int))func_801553A8)(param_1);
|
||||
((void (*)(int))func_80172608)(param_1);
|
||||
((void (*)(int))func_80146CA0)(param_1);
|
||||
return;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+17
-2
@@ -135,9 +135,24 @@ def func_subseg(ov, func):
|
||||
|
||||
|
||||
def func_jtbls(ov, func):
|
||||
"""(subseg, [jtbl_hex,...]) that `func` references (from its .s %hi(jtbl_...))."""
|
||||
"""(subseg, [jtbl_hex,...]) that `func` references (from its .s %hi(jtbl_...)).
|
||||
|
||||
The owning SUBSEG is config-derived (stale-proof, see func_subseg). The .s CONTENT lookup may
|
||||
fall back to a stale-location copy (Phase-29 §8e): once the fn is spliced as C and re-extracted
|
||||
(e.g. after a jr isolation), no fresh .s exists anywhere — but a stale one in a previous owner's
|
||||
dir still holds the correct jtbl refs (the fn's code, hence its %hi(jtbl_...) set, is
|
||||
address-stable regardless of which subseg owned it)."""
|
||||
sub = func_subseg(ov, func)
|
||||
s = open(os.path.join(REPO, "asm", ov, "nonmatchings", sub, f"{func}.s")).read()
|
||||
p = os.path.join(REPO, "asm", ov, "nonmatchings", sub, f"{func}.s")
|
||||
if not os.path.exists(p):
|
||||
stale = sorted(glob.glob(os.path.join(REPO, "asm", ov, "nonmatchings", "*", f"{func}.s")))
|
||||
if not stale:
|
||||
sys.exit(f"jtbl_carve: no .s for {func} anywhere under asm/{ov}/nonmatchings/ — "
|
||||
f"already spliced AND no stale copy; re-extract from the stub state first")
|
||||
p = stale[0]
|
||||
print(f"jtbl_carve: {func}.s not in config-derived subseg '{sub}' — using stale-location "
|
||||
f"{os.path.relpath(p, REPO)} for jtbl refs (content is address-stable)")
|
||||
s = open(p).read()
|
||||
return sub, sorted(set(re.findall(r"jtbl_([0-9A-Fa-f]{8})", s)))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user