Correct candidate pane-name table record boundaries #742

Merged
coah80 merged 1 commits from agent/bittle/candidate-pane-names into main 2026-10-02 05:57:57 +00:00
coah80 commented 2026-10-02 05:55:33 +00:00 (Migrated from github.com)

Real data error hidden by exact instruction scores

The existing 132-byte scPaneNameTable packs eight fixed-width NUL-filled pane-name records. Each initializer chunk was one byte short, so later names started too early. Code using the original record offsets consequently looked up truncated names such as c_scrl_Left and scrl_Rght instead of P_prdc_scrl_Left and P_prdc_scrl_Rght.

Correct the eight record boundaries inside the existing object. Its address, 132-byte extent, alignment, characters, and total 31 zero bytes are unchanged. This redistributes existing zero-fill to the correct records; it does not add a padding object, grow a table, introduce unused strings, or change any section directive.

Original-byte and consumer evidence

  • Original record offsets: 0, 12, 24, 36, 48, 68, 88, 108.
  • Old source record offsets: 0, 11, 22, 33, 44, 63, 82, 101.
  • The creation and texture-lookup code explicitly consumes the original offsets, and the original assembly confirms them.
  • Data-flow inspection found six wrong pane-name arguments in three already-exact-scored functions: onOnOffButton, startTurnOn, and onEvent. Their code remained instruction-exact because the faulty contents were in the table, not its references.
  • After correction, all 132 table bytes equal the original. A wider direct/derived string-argument audit checks 6,198 values and reports no remaining candidate mismatches in this checkout.

Verification on 12960310

  • Full 43U all_source/progress/report/DOL passes after rebase; all 3,867,904 DOL bytes equal the original. SHA1 26116613f624061ba99c8d1a299aaa6efa85670d.
  • All 1,027 source objects audited: only tiCandidateBox .data bytes change. Its size remains 3,452 bytes; all 315 relocation entries, all code bytes, and every other object are unchanged.
  • Unit instruction-aware result remains 109/112 exact; every progress measure is unchanged. No new code/data score or native-linking gain is claimed.
  • String pool 57/57 identical; workflow 7/7, pool 8/8, jump-table 27/27 tests pass; diff/worktree checks pass.

Existing whole-unit gaps remain: three functions, the .data tail-size discrepancy, and trailing weak GUI EventHandler relocations. Those were not filled or treated as faulty data. No new pragmas, alignment attributes, casts, or assembly are introduced.

One source file, eight initializer-line corrections. Tested/published tree 3911f5f1fb. Review only; no assistant merge.

Note

Fix NUL padding in candidate pane-name table scPaneNameTable

Fixes the record boundaries in the scPaneNameTable initializer in tiCandidateBox.cpp. Each pane and animation name now uses the intended fixed-width NUL padding. Visible names are unchanged. Behavioral Change: byte offsets and total table layout in the exported scPaneNameTable data change.

Macroscope summarized e36edc1.

## Real data error hidden by exact instruction scores The existing 132-byte scPaneNameTable packs eight fixed-width NUL-filled pane-name records. Each initializer chunk was one byte short, so later names started too early. Code using the original record offsets consequently looked up truncated names such as `c_scrl_Left` and `scrl_Rght` instead of `P_prdc_scrl_Left` and `P_prdc_scrl_Rght`. Correct the eight record boundaries inside the existing object. Its address, 132-byte extent, alignment, characters, and total 31 zero bytes are unchanged. This redistributes existing zero-fill to the correct records; it does not add a padding object, grow a table, introduce unused strings, or change any section directive. ## Original-byte and consumer evidence - Original record offsets: 0, 12, 24, 36, 48, 68, 88, 108. - Old source record offsets: 0, 11, 22, 33, 44, 63, 82, 101. - The creation and texture-lookup code explicitly consumes the original offsets, and the original assembly confirms them. - Data-flow inspection found six wrong pane-name arguments in three already-exact-scored functions: onOnOffButton, startTurnOn, and onEvent. Their code remained instruction-exact because the faulty contents were in the table, not its references. - After correction, all 132 table bytes equal the original. A wider direct/derived string-argument audit checks 6,198 values and reports no remaining candidate mismatches in this checkout. ## Verification on 12960310 - Full 43U all_source/progress/report/DOL passes after rebase; all 3,867,904 DOL bytes equal the original. SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. - All 1,027 source objects audited: only tiCandidateBox .data bytes change. Its size remains 3,452 bytes; all 315 relocation entries, all code bytes, and every other object are unchanged. - Unit instruction-aware result remains 109/112 exact; every progress measure is unchanged. No new code/data score or native-linking gain is claimed. - String pool 57/57 identical; workflow 7/7, pool 8/8, jump-table 27/27 tests pass; diff/worktree checks pass. Existing whole-unit gaps remain: three functions, the .data tail-size discrepancy, and trailing weak GUI EventHandler relocations. Those were not filled or treated as faulty data. No new pragmas, alignment attributes, casts, or assembly are introduced. One source file, eight initializer-line corrections. Tested/published tree 3911f5f1fb68bca784c9cc04589bef75eb594b4a. Review only; no assistant merge. <!-- 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] > ### Fix NUL padding in candidate pane-name table `scPaneNameTable` > Fixes the record boundaries in the `scPaneNameTable` initializer in [tiCandidateBox.cpp](https://github.com/coah80/wii-ipl/pull/742/files#diff-d09edda016b1f8deb10d254572fee84552970820d3f9770998fa3b2b445ee047). Each pane and animation name now uses the intended fixed-width NUL padding. Visible names are unchanged. Behavioral Change: byte offsets and total table layout in the exported `scPaneNameTable` data change. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized e36edc1.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-02 05:57:55 +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.