Skip to content

dat-cli: preserve loader bindings and type fighter item slots - #3619

Merged
ribbanya merged 7 commits into
doldecomp:masterfrom
itsgrimetime:codex/dat-loader-root-bindings
Oct 4, 2026
Merged

ribbanya merged 7 commits into
doldecomp:masterfrom
itsgrimetime:codex/dat-loader-root-bindings

Conversation

@itsgrimetime

@itsgrimetime itsgrimetime commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Loader name tables lose their DAT_BIND context when expanded into archive roots. Preserve and evaluate those bindings so a root's DAT_IF conditions can select the correct layout. Keep the values in the compact types file, supply them to scalar/array walks even when the type comes from dat_symbols.txt, and include them in the sample dependency hash. Inner bindings shadow outer ones; root scopes remain independent.

Include the source changes that require this support: bind the fighter kind on the loader's name field, declare ftData_Item as a four-byte union of pointers, bind each item index, and select Samus's grapple accessory in slot 4. Update the required fighter callers to use its named views and count the grapple's four throw animations. The other special fighter-slot conditions remain TODOs. No new annotation or symbol-file syntax is introduced.

General Article attribute layout/caller fixes and their TODO documentation remain in #3600. Each PR builds and runs independently; neither requires the other to merge first.

Validation:

  • The standalone MWCC game build remains 100% matched and passes the original DOL checksum. Local commit checks pass.
  • All 26 Rust tests pass with this PR's own DWARF and extracted archives, including loader expansion/cache, scalar/array roots, symbol-supplied root types, shadowing, scope isolation, and the real Samus grapple walk.
  • The standalone Clang DAT pipeline matches 12,129/12,130 samples across 838 archives, including all 45 Samus samples. The sole mismatch remains Game & Watch's dyn_descs_0_x78F0. Generated Samus C declares the grapple as UNK_SAMUS_S1; the objdiff project is generated successfully.
  • Combining both PRs preserves every pre-split source and Rust file exactly. Original archives and generated output are excluded. Matrix typing/sampling remains a separate follow-up.

@ribbanya ribbanya left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you pull the changes in #3600 that depend on this PR, into this PR, and remove from #3600? That was the point of the split.

@ribbanya ribbanya added ai-assisted Utilizes a LLM to do the heavy lifting portability Improves non-matching builds labels Oct 3, 2026
@itsgrimetime itsgrimetime changed the title dat-cli: preserve loader bindings for root walks dat-cli: preserve loader bindings and type fighter item slots Oct 3, 2026
@itsgrimetime
itsgrimetime force-pushed the codex/dat-loader-root-bindings branch from 595f15d to ce6732e Compare October 3, 2026 21:13
@itsgrimetime
itsgrimetime requested a review from ribbanya October 3, 2026 23:30
@itsgrimetime

Copy link
Copy Markdown
Collaborator Author

Can you pull the changes in #3600 that depend on this PR, into this PR, and remove from #3600? That was the point of the split.

yep, moved those samus things/stuff that depends on this CLI change here and out of #3600

@ribbanya
ribbanya merged commit aae5d15 into doldecomp:master Oct 4, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted Utilizes a LLM to do the heavy lifting portability Improves non-matching builds

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants