mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-10-07 17:31:49 -04:00
3.3 KiB
3.3 KiB
T3.c5 — rung S loop fix, NO-FIELD census, header additions (blocked)
Step 1: plan/apply agreement (done)
- Cause (diag
.run/t3c5/diag.py): in each of the 6 looping files the only unfinished drawn bodies had a latestKEPTrow labelledt3c4_rejudgewith no CANONICAL/LOCAL base (s_judgedfalse) →s_finishedfalse → file drawn; but an earlier judged row (t3_S1/S15/S20) at the same nhash sat inledger_indexdone →work_file_Sskipped every body →rows 0. - Fix
tools/restruct.pys_finished(tu, fns, latest, done=frozenset()): a body is finished when("S", tu, fn, current nhash) in doneOR the old latest-row rule;plan_Spasses itsdone(apply already passes the redraw-lifteddone). Agreement by construction: a drawn file always has a body apply does not skip. s_site_rows: every site row carries its base's type (per_basetype bybclass:base; was edit sites only).s_macro_rows: macro site rows take the type from the row'sbases[].- Check
.run/t3c5/diag2.py: plan_S drawable 75 → 69 (file-finished 1631); drawn files with nothing to process 0; ov files drawn 0 (the 69 are T4's md_/main/shared).
Step 2: NO-FIELD census (.run/t3c5/nofield.py → .run/t3c5/nofield.json)
- ov latest rung-S rows: 2455 RESIDUAL(NO-FIELD) sites, 92 groups (type, off, width, sign); type from the row's bases[].
- ALL 92 groups are on two types:
Unkstruct_80126B58andUnkstruct_800B5CB8, both insideinclude/struct_types.hhead_types:begin/end (generated). - IN-LEAF 1955 sites / 70 groups: the site lies inside an existing leaf (e.g.
unk14s32 of 800B5CB8 429 sites,unk10of 80126B58 310) — not addable under the rule (would need a union / split; deferred by the 3.38 decision). - GAP-PAD 500 sites / 22 groups, all
Unkstruct_80126B58, all inside pad arrays: offsets 0x78 4s(11) 0x7C 2u(5) 0x82 2u(8) 0x84 2s(19)/2u(3) 0x86 2u(6) 0x90 4s(1) 0x94 4s(11) 0x98 2s(3)/2u(2) 0xC8 1u(4) 0xC9 1u(4) 0xDA 1u(390) 0xE8 4s(12)/4u(1) 0xEC 2s(1) 0xEE 2s(1) 0xFF 1u(4) 0x108 2s(4)/2u(6) 0x10A 2s(2)/2u(2).
Wall: the brief's path for in-region types is destructive
head_types.py --header .run/t3c5/head.h(scratch) against the current.run/P37/census/struct_map.json(02:27 today; counts only remaining raw sites: 18324 sites vs 107580 the region was built from) rewrites 157 diff lines of the region and CHANGES existing fields (800B5CB8:u16 unk0→u8 unk0+u8 unk1,s32 unk14→s16 unk14+s16 unk16,u16 unkC→s16 unkC, …). 141260 MEMBER sites (check-ledger) are spelled against the current fields → regeneration would break src/byte identity. Not run on the real header.- Hand-editing the region is forbidden (generated). No header edit made; no apply/R22 run.
- Options for the expert: (a) head_types.py additive mode: keep the current region's fields, add only map/ledger candidates in pads (needs the pinned map or a ledger-fed candidate list); (b) move the two head types out of the generated region (declare hand-maintained) then edit pads in one batch; (c) accept the 500 sites as residual.
Commands
restruct.py --selftest→ 93/93 OK (struct_layout 9/9)restruct.py --audit-types→ 0 violations (1018 definitions)restruct.py --check-ledger→ 141260 MEMBER sites, 0 violationsmake kit-corpus→ corpus materialised;make tools-health→ OK (exit 0)