3 Commits

Author SHA1 Message Date
Drew T 1431b523a4 feat(phase-17): T4+T5 — actor struct recovered (comprehension) but byte-neutral for matching
- recovered the engine actor/player struct cold via PCSX-Redux (R10/R11): base 0x80078E00,
  ~154 fields over 0x24C bytes, 32 pointer fields; HP/BP/gold/day/hour/position/BP-drain all
  live-verified and anchored to the Phase-3 player state + the walk diff. -> docs/actor-struct.md
- tools/ram_probe.py: PCSX-Redux RAM capture/diff/read/ptr-scan workhorse for field-typing
- FINDING (the matching verdict): feeding the struct to m2c as --context is BYTE-NEUTRAL.
  m2c adopts it (arg0->f_X) but structural-miss sample scores 0 better / 10 same / 2 worse vs
  m2c-alone (full code+RAM pointer set). The misses are 50-98% mismatched = m2c decompiler
  limits, not missing types. T4 fn-ptr context unblocks compilation but functions stay structural.
- conclusion: rich context (struct/type recovery) is a comprehension / decomp.me win, NOT a
  byte-match lever -> Phase-16 wall re-confirmed from the type angle. struct-core-pivot.md updated.
- emulator field-naming pass deferred (comprehension, off the matching path); NEXT: T6 permuter
  validation on the 146 genuine near-misses, then T7 go/no-go.
2026-06-19 13:03:14 -06:00
Drew T edb0360d30 feat(phase-17): T1 wall taxonomy — census the 957 residuals, size every avenue (skip T2)
- tools/wall_taxonomy.py: full-census classifier (m2c --valid-syntax -> match_one ->
  sig_unify + full-overlay-TU cc1) labels every unmatched ov_SC01_077 stub by blocker
  class; reproducible (~22s, --jobs 16); read-only (throwaway _wt_*.c, auto-removed)
- docs/wall-taxonomy.md: ranked taxonomy + per-lever aggregation + sequencing recommendation
  (957 residuals, 99.2% carry an actionable label)
- findings (byte-gate-validated, R14: SIG_FIXABLE_KR = exactly the 4/4 gate-passing set):
  - T4+T5 rich context (struct/jump-table/fn-ptr-table types) = 67% reach, incl. all 30 jtbl giants
  - T6 permuter = 146 candidates (101 <=4-mismatch near-certain)
  - T3 sig_unify = 48 gate-proven immediate wins
  - loose-typing WALL = 99 (10%); non-faithful defer = 16
  - T2 DATA-symbol byte-array header = 0 functions -> SKIP (the cookbook §14c-c lever is empty)
- recommended resequence: T3 -> T4+T5 (built together) -> T6 ; drop T2 (pending Drew's P5d nod)
- struct-core-pivot.md: Phase-17 quantification note; CURRENT_PHASE.md: T1 done + resequence
- all binaries byte-identical (T1 read-only; ov_SC01_077 d19c9580 clean rebuild)
2026-06-19 11:31:41 -06:00
Drew T 9062f0fcc0 docs(phase-16): PIVOT — m2c+permuter won't crack the loose-typed core; new plan + harness fixes
- docs/struct-core-pivot.md: findings + decision + new research directions. Root cause = the
  original engine is LOOSELY TYPED (K&R; same fn called with int/ptr, arg/no-arg across sites),
  so no single canonical signature exists -> m2c guesses inconsistently, permuter can't fix
  semantics, byte-gate (correctly) rejects. Yields ~3%, not the crack. New plan: emulator-recover
  the actor struct/types -> Ghidra global type propagation -> Ghidra-C -> permuter+gate.
- harness bug-fixes (REAL, kept): p16_permute output-0-only match (killed the false '42%'),
  base.c keeps callee externs, winner_to_draft line-strip; sig_unify canonicalizes m2c's
  no-extern prototypes; gen_engine_decls.py (documents why a global canonical header breaks
  loose-typed matches).
- a few byte-gated leaf matches banked in ov_SC01_077.c.
2026-06-19 10:05:58 -06:00