decomp(ATERM): align case-eight checksum initialization #1101

Merged
coah80 merged 1 commits from agent/bittle/aterm-case8-init-order into main 2026-10-03 12:38:41 +00:00
coah80 commented 2026-10-03 12:38:09 +00:00 (Migrated from github.com)

One case-eight-only initialization trial

Move only the existing private checksum = 0 declaration before the two SONtoHs initializers in case8. Accepted case6 and every other source byte, argument/read order, scope, type, helper and configuration remain fixed.

  • RunConfigProtocol: 89.57834% → 89.77287%
  • Unit: 97.31056% → 97.34909%
  • Instructions remain 958 versus original951
  • Exact functions18/26, code11036/19204, data18584/18864 and linking unchanged

Case8 has its own original-code evidence: checksum zero precedes both conversions, and later additions/comparison establish the value's role. This is not an automatic mirror of case6. Actual original/current SONtoHs is pinned to5463043e4e800020, a register-only halfword identity. No packet/global observation moves; only a nonescaping private constant initializer changes position.

Independent parent gates

Rebased and freshly rebuilt on343d53bbb5b36d67f3e24b990f79c1e19333bb3f. Tested treebe522d8194454707952313013c083e8cc170fab8.

  • All1,027 unit/function reports checked: no regressions, only RunConfigProtocol improves
  • Case6, sibling functions, allocated non-code sections/extents and outside-header relocations unchanged
  • Only26 instruction differences: reordered header724–732, followed by exact r16/r17 value-role renaming through804
    -64 sampled header combinations preserve packet reads, conversion arguments and private sequence-store observations
  • Post-region CFG traversal checks differing saved-register values are overwritten before caller reads; all123 calls preserve order/identity
  • Pool identical; literal audit24 functions/6 arguments, no errors. Existing unequal-size skips: DiscoverAccessPoints and RunConfigProtocol
  • Full default build/progress,43U/ok, main/leaf/diff checks pass
  • DOL SHA1:26116613f624061ba99c8d1a299aaa6efa85670d

Bounded sampled-header/CFG audits are not a general symbolic proof or protocol-runtime execution. Evidence: tools/decomp-assist/aterm-case8-checksum-initialization.attempts.md. No original binaries/disassembly uploaded. Draft for human review; no merge or auto-merge requested.

Note

Move case-8 checksum initialization to precede sequence/length conversions in ATERMRunConfigProtocol

In ATERM.c, the case-8 local checksum initialization now runs immediately after the packet declaration, before the sequence and payload-length conversions. Adds aterm-case8-checksum-initialization.attempts.md, a trial record for a Wii Menu 4.3U declaration-order attempt that scored fuzzily closer but did not reach an exact match.

Macroscope summarized 733647b.

## One case-eight-only initialization trial Move only the existing private checksum = 0 declaration before the two SONtoHs initializers in case8. Accepted case6 and every other source byte, argument/read order, scope, type, helper and configuration remain fixed. - RunConfigProtocol: 89.57834% → 89.77287% - Unit: 97.31056% → 97.34909% - Instructions remain 958 versus original951 - Exact functions18/26, code11036/19204, data18584/18864 and linking unchanged Case8 has its own original-code evidence: checksum zero precedes both conversions, and later additions/comparison establish the value's role. This is not an automatic mirror of case6. Actual original/current SONtoHs is pinned to5463043e4e800020, a register-only halfword identity. No packet/global observation moves; only a nonescaping private constant initializer changes position. ## Independent parent gates Rebased and freshly rebuilt on343d53bbb5b36d67f3e24b990f79c1e19333bb3f. Tested treebe522d8194454707952313013c083e8cc170fab8. - All1,027 unit/function reports checked: no regressions, only RunConfigProtocol improves - Case6, sibling functions, allocated non-code sections/extents and outside-header relocations unchanged - Only26 instruction differences: reordered header724–732, followed by exact r16/r17 value-role renaming through804 -64 sampled header combinations preserve packet reads, conversion arguments and private sequence-store observations - Post-region CFG traversal checks differing saved-register values are overwritten before caller reads; all123 calls preserve order/identity - Pool identical; literal audit24 functions/6 arguments, no errors. Existing unequal-size skips: DiscoverAccessPoints and RunConfigProtocol - Full default build/progress,43U/ok, main/leaf/diff checks pass - DOL SHA1:26116613f624061ba99c8d1a299aaa6efa85670d Bounded sampled-header/CFG audits are not a general symbolic proof or protocol-runtime execution. Evidence: tools/decomp-assist/aterm-case8-checksum-initialization.attempts.md. No original binaries/disassembly uploaded. Draft for human review; no merge or auto-merge requested. <!-- Macroscope's pull request summary starts here --> <!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. --> <!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. --> > [!NOTE] > ### Move case-8 checksum initialization to precede sequence/length conversions in `ATERMRunConfigProtocol` > In [ATERM.c](https://github.com/coah80/wii-ipl/pull/1101/files#diff-e67bb234e10edec28359a3022bc49117cf56df7cd361cea3415fc9a54636e50d), the case-8 local checksum initialization now runs immediately after the packet declaration, before the sequence and payload-length conversions. Adds [aterm-case8-checksum-initialization.attempts.md](https://github.com/coah80/wii-ipl/pull/1101/files#diff-d1d318cb1897402ed4bb51181923d15eb8cde6e03dd68e2564208910c02ae4ea), a trial record for a Wii Menu 4.3U declaration-order attempt that scored fuzzily closer but did not reach an exact match. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 733647b.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 12:38:39 +00:00 (Migrated from github.com)

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.
Sign in to join this conversation.