Skip to content

Add actor profile reconstruction pilot - #2127

Merged
andrewboudreau merged 3 commits into
mainfrom
tools/profile-reconstruction-pilot
Sep 1, 2026
Merged

Add actor profile reconstruction pilot#2127
andrewboudreau merged 3 commits into
mainfrom
tools/profile-reconstruction-pilot

Conversation

@andrewboudreau

@andrewboudreau andrewboudreau commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add an evidence-only extractor and fixed 20-entry actor/process profile dataset
  • export the complete registry as 391 logical IDs and 401 valid overlay-local candidate rows in TSV and JSON
  • document class-initializer, profile-global, TU-filename, macro-pattern, field-layout, and lifecycle findings
  • add dry-run rename maps with explicit collision and overlay-ambiguity refusals
  • wire focused regression tests into the tooling test suite

No source, symbol map, delinks, or production profile rename is applied.

Main findings

  • 14 sampled actor descriptors use the 0x1c SpawnInfo layout; 6 scene/process descriptors use a separate 0x08 layout
  • all 391 registry entries have a valid descriptor interpretation whose +0x04 halfword equals the registry index; the SM64DS base constructor also uses that same halfword as behavior/execute order
  • +0x06 supplies render/draw order; the actor extension directly supplies actor flags, clip-volume Y offset, clip radius, clip distance, and far distance
  • a distinct group-flags descriptor field is not yet located and remains explicitly unresolved
  • SM64DS exposes the same four do/pre/post lifecycle triplets as NSMBW: InitResources/create, CleanupResources/doDelete, Behavior/execute, and Render/draw are high-confidence role correspondences, not proven shared spellings
  • 19/20 sampled factories have an ordinary construction-wrapper shape
  • the complete candidate inventory has 42 colliding Class_classInit proposals among 314 distinct class-based spellings, so classInit is not a safe universal rename rule
  • all 391 ROM profile IDs are unique, making g_profile_ROM_ID structurally consistent, subject to overlay-context checks
  • TU stems are useful lineage candidates, but alphabetical ordering is not generally predictive and multi-stem TUs remain unresolved
  • repeated layout and factory patterns support a macro-like architecture without recovering exact SM64DS macro syntax

Validation

  • python tools/profile_reconstruction.py --check --no-refresh
  • full explicit tooling suite: 535 tests passed, 3 skipped
  • deterministic generated outputs
  • documentation reference checks: no new dead or broken links
  • port_refcheck: 405 references resolved
  • pre-push: 97/97 translation units compiled

@tangos-validator

tangos-validator Bot commented Sep 1, 2026

Copy link
Copy Markdown

✅ PR validation — Passed

noverify: no source/build-data changes in this PR

Each changed src/*.c|*.cpp is compiled and its relocated bytes compared to the binary data on a private build box. Passing requires every changed file to reproduce the ROM byte-for-byte with correct relocation targets — this catches WRONG-DEST relocations and non-reproducing near-misses that ledger-scoped linkcheck skips.

@andrewboudreau
andrewboudreau marked this pull request as ready for review September 1, 2026 13:51
@andrewboudreau
andrewboudreau merged commit 3d4377d into main Sep 1, 2026
7 checks passed
@andrewboudreau
andrewboudreau deleted the tools/profile-reconstruction-pilot branch September 1, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant