Skip to content

dat: report and raise byte coverage, type unused data by address in dat_symbols.txt - #3630

Merged
ribbanya merged 1 commit into
doldecomp:masterfrom
ribbanya:pr/dat-coverage
Oct 5, 2026
Merged

ribbanya merged 1 commit into
doldecomp:masterfrom
ribbanya:pr/dat-coverage

Conversation

@ribbanya

@ribbanya ribbanya commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Archive byte coverage (matching samples and inferred data) goes from 86.98% to 99.80%, and complete units from 106 to 345 of 838. Sample matches are unchanged apart from the two known mismatches.

Tooling:

  • samples report prints the archive bytes covered, and --missing lists the data the base doesn't infer by the field that reaches it.
  • dat_symbols.txt lines are name = dat:address; like symbols.txt, with the dat in the section's place. * for the address matches a public symbol by name, as before; an address gives a C alias for data no public symbol names. Type and count are separate attributes mirroring the annotations: type:T, count:N and extent (instead of count:* and T[N]).
  • DAT_SCRIPT takes a table (fighters) or a length expression in _command (itCommandLength, items); the generic commands 0-9 (Command_Execute) are shared by every script. Scripts' extents count as typed data.
  • hsd.rs keeps archive tables in file order, as the game reads them, and refuses malformed archives.
  • Clippy comes from the flake.

Types:

  • HSD_VtxDescList::vertex is an HSD_VertexArray blob; palettes are stored rounded up to 16 entries; collision vertices, lines and joints are counted; the particle banks run as far as the data does; item state scripts are scripts; FtPartsDesc.vis_table rows are FtPartsVisLookup*; HSD_AObjDesc.obj_id is any descriptor; every effect archive's table is an EffectDataTable.

Unused data: only names, and the pointers from them, reach archive data, so data nothing points to is export leftovers. About 3,800 aliases type the joint, animation and material animation trees among it whose every part is well-formed (PlFe's and TyMcCmDs's unused models among them), with no new walk gaps or sample mismatches.

🤖 Generated with Claude Code

Dat coverage

Explained relocations: 99.21% of 1773047 (99.53% of those reachable)

Typed publics: 99.55% of 12060

Family Archives Publics Typed Relocations Explained Gap Trailing Unreferenced Reachable
Db 1/1 1 100.00% 854 100.00% 0 0 0 100.00%
Ef 36/36 36 100.00% 16693 99.50% 0 0 83 100.00%
Gm 46/47 97 98.97% 30755 98.87% 283 65 0 98.87%
Gr 71/71 4260 98.99% 216551 97.50% 1348 820 3250 98.98%
If 7/7 18 100.00% 7184 99.93% 0 5 0 99.93%
Ir 6/6 126 100.00% 4656 99.87% 0 6 0 99.87%
It 1/1 1 100.00% 43705 97.87% 2 331 598 99.23%
Lb 6/6 12 91.67% 186 7.53% 2 170 0 7.53%
Mn 5/5 350 98.29% 33176 99.92% 2 24 0 99.92%
Nt 4/4 4 100.00% 908 98.90% 0 10 0 98.90%
Pd 1/1 1 100.00% 1 100.00% 0 0 0 100.00%
Pl 6485/6485 6623 100.00% 1306218 99.52% 532 4737 982 99.60%
Sd 15/15 15 100.00% 7332 100.00% 0 0 0 100.00%
Sm 1/1 1 100.00% 4198 100.00% 0 0 0 100.00%
Tm 0/1 3 0.00% 0 100.00% 0 0 0 100.00%
Ty 352/352 492 100.00% 95067 99.25% 9 21 687 99.97%
Vi 11/11 20 100.00% 5563 99.77% 0 13 0 99.77%
Total 7048/7050 12060 99.55% 1773047 99.21% 2178 6202 5600 99.53%

…at_symbols.txt

Archive byte coverage (matching samples and inferred data) goes from 86.98%
to 99.80%, and complete units from 106 to 345 of 838. Sample matches are
unchanged apart from the two known mismatches.

Tooling:
- `samples report` prints the archive bytes covered, and `--missing` lists
  the data the base doesn't infer by the field that reaches it.
- dat_symbols.txt lines are `name = dat:address;` like symbols.txt, with the
  dat in the section's place. `*` for the address matches a public symbol
  by name, as before; an address gives a C alias for data no public symbol
  names. Type and count are separate attributes mirroring the annotations:
  `type:T`, `count:N` and `extent` (instead of `count:*` and `T[N]`).
- `DAT_SCRIPT` takes a table (fighters) or a length expression in
  `_command` (`itCommandLength`, items); the generic commands 0-9
  (`Command_Execute`) are shared by every script. Scripts' extents count
  as typed data.
- hsd.rs keeps archive tables in file order, as the game reads them, and
  refuses malformed archives.
- Clippy comes from the flake.

Types:
- `HSD_VtxDescList::vertex` is an `HSD_VertexArray` blob; palettes are
  stored rounded up to 16 entries; collision vertices, lines and joints are
  counted; the particle banks run as far as the data does; item state
  scripts are scripts; `FtPartsDesc.vis_table` rows are
  `FtPartsVisLookup*`; `HSD_AObjDesc.obj_id` is any descriptor; every
  effect archive's table is an `EffectDataTable`.

Unused data: only names, and the pointers from them, reach archive data,
so data nothing points to is export leftovers. About 3,800 aliases type
the joint, animation and material animation trees among it whose every
part is well-formed (PlFe's and TyMcCmDs's unused models among them),
with no new walk gaps or sample mismatches.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ribbanya ribbanya added tooling ai-assisted Utilizes a LLM to do the heavy lifting portability Improves non-matching builds labels Oct 5, 2026
@ribbanya
ribbanya marked this pull request as ready for review October 5, 2026 04:32
@ribbanya
ribbanya merged commit 12556da into doldecomp:master Oct 5, 2026
10 checks passed
@ribbanya
ribbanya deleted the pr/dat-coverage branch October 5, 2026 04:33
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 tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant