mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-10-04 00:20:10 -04:00
T5.1.c5: log
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
# T5.1.c5 — fold c3b's 16 excluded tier-1 classes; SDK names (partial: tier-1 at 1 row; SDK groups not started)
|
||||
|
||||
## Tool change (tools/lift_types.py)
|
||||
- `--fold-canon a,b`: named names are their class's canon (else meaning+uses). fold_plan(..., pick).
|
||||
- attrs refusal skipped when the --fold-canon def carries the attribute (aliases inherit it; R22 judges).
|
||||
|
||||
## Method (per class): hand-conform defs+accesses until the tool accepts, then `--fold --fold-class … [--fold-canon]`; cc1 sweep `.run/P38/fold/cc1all.py` (54 s, 0 errors baseline); R22; census.
|
||||
Scratch: `.run/P38/c5/{dump.py,dump2.py,conform1.py,alias_fold.py,attr_split.tsv}`.
|
||||
|
||||
## Commits (each R22 green 217/217, 218/218)
|
||||
- ead6a3f0e 10 classes: Vec (Elem/Entry8018F07C/Key12 members → unk*, flag → unkA; TrailEntry by tool respell; VecA tag), Pose (St80180ACC a[]/b[] → x..c), Face2 (FaceF4 v1/v2/v3 → n1/v1/n2), F1ccRec (canon members pad,flg,unk16[0x24],flg3A[8],tail; S54 p->flg → flg3A), B (Mtx40 m.q0/q1 → `*(Blk16X *)&m.w[0]/[4]`), Src_80167540 (Mat_800CB658 = alias of Mat_80167540: 2 names of tier-2 class b85caab442ac:opaque folded early), Slot_80165140 (Slot fns' `*(B4 *)` cast → `*(B4_80165140 *)`; B4 then dead → --fold-dead), A801593E4 (S126B58_inner deleted, `w->unk20->unk12` → `w->p20->field12` ×134, Ent_80186E9C `mtx + 0x34` → `(u8 *)arg0->p20 + 0x34`), Entry16 (S8Blob moved above Blk16A1; Row .r/.g/.b → a.raw[0..2]; loc.b[k] → a.raw/b.raw), Prim_8017FA2C (Prim_80183FE0* `u8 c[4][4]` → `Cv_8017FA2C c[4]`, c[k][j] → c[k].r/g/b/cd).
|
||||
- 1c842e256 MATRIX-shaped class f3431cdc6e53 (39 defs, explicit `s16 pad`) → `typedef MATRIX …` (SDK; no `.pad` access existed); MB `mb.m` → `mb.m[0]`, x/y/z → t[0..2]; MtxBuf class (ecf7a9335817) folded; V4 class → canon V (aligned(2), natural align 2 anyway).
|
||||
- f7fde90cc2 H16 class 31ae27c7fcb4: RD16 macro bodies `->v` → `->h` (8 files), md_MAIN_003 OTIDX `fr.v` → `fr.h`, ov_SC07_002 bp->f → bp->h by hand (cc1 line numbers there are off by ~146: tool could not locate).
|
||||
- 85b377a61 attr classes split into packed/natural subgroups (scratch tsv .run/P38/c5/attr_split.tsv, two passes with disjoint respell members): a2e73 nat → E4, pk → packed_word; 0aaa nat → DRM, pk → BlockData.
|
||||
|
||||
## R22 evidence: attr classes cannot reach one name without a layout (alignment) change
|
||||
- a2e73cdb49a3 all → packed_word (`--fold-canon packed_word`): check-all 70 passed, 148 failed of 218 (.run/logs/c5r22tA.log; first FAIL resident, ov_SC05_000, ov_SC01_000). Reverted.
|
||||
- 0aaa0c2b3635 all → BlockData: check-all 216/218, FAIL ov_SC02_005 (Pair8/E8 users), main (800.c `((DRM *)poly)->code0` stores) (.run/logs/c5r22tB.log). Reverted.
|
||||
- The census lhash ignores packed/aligned(1); the fix is in type_census (attrs in the layout hash) — out of my scope (constraint).
|
||||
|
||||
## State (census on 85b377a61)
|
||||
- dup_classes=62; tier-1 rows: 1 (`0aaa0c2b3635 BlockData,DRM`); outside_canon=0 dead=0 variants=0 pad_names=0 twins_stale=0 controls=4/4; parse_error_decls=1106 (start value).
|
||||
- a2e73 row no longer tier 1 after the subgroup fold (E4 vs packed_word) — NOT investigated (where it went: check dup_gating tier 2).
|
||||
- restruct --audit-types 0 violations; type_census --selftest 31/31 OK.
|
||||
|
||||
## Next steps (exact)
|
||||
1. `awk -F'\t' '$5 ~ /packed_word|E4/' .run/P38/census/dup_gating.tsv` — find the a2e73 row's tier now; decide with the expert whether the 2 attr rows (BlockData/DRM, E4/packed_word) are reported as blocked (evidence above) or the census learns attrs.
|
||||
2. SDK groups (not started): `lift_types.py --fold .run/P38/census/dup_gating.tsv --fold-sdk` dry-run to list groups; POLY_FT4/G3/G4 need the pad_names invariant question (SDK pad1..pad3) resolved by the expert (type_census is off-limits); RECT (Rect), CVECTOR (Col4_8017F8BC + CVEC/Cv_* aliases): rename needs member-name evidence (Col4 r,g,b,cd = SDK CVECTOR names ✓); VECTOR 12-byte leave.
|
||||
3. R22 + census after each SDK batch; commit.
|
||||
|
||||
## Gotchas
|
||||
- generalizable: ambiguous respell (same member name, two offsets) inside ONE class is solved by hand-conforming the small-use defs first; across classes by passes with disjoint member sets (c3b).
|
||||
- generalizable: a folded class can need a member-type twin folded first — 2 names of a tier-2 class via a one-line alias (Mat_800CB658) rather than the whole class.
|
||||
- harness: cc1 error line numbers in ov_SC07_002_jr_8017C8D0.c are ~146 lines off the source; the tool's per-line respell misses them.
|
||||
- harness: `sed -i` on a >20k file is denied by the read guard hook; edit via a Python script.
|
||||
Reference in New Issue
Block a user