Improve CandidateBox create right-scroll captures (94.59091 → 95.99148%) #1132

Merged
coah80 merged 1 commits from agent/bittle/candidatebox-right-captures into main 2026-10-03 18:37:34 +00:00
coah80 commented 2026-10-03 18:36:55 +00:00 (Migrated from github.com)

Change

Capture the two existing fixed-array right-scroll name addresses before the unchanged Create call. No character snapshot, mutable pointer capture, changed helper or call-order change.

Current result and costs

Independently rebased and full-built on 5af01fa8, retaining external #1131 geometry match.

  • create94.59091 →95.99148%; unit99.6285 →99.71067%; global99.73445 →99.735115%
  • Exact110/112, matched code21728/24000, data4652/4652 and linking preserved
  • Size1416/354 →1424/356 bytes/instructions. Frame remains0x30; target1408/352 and frame0x20. Extra8 code bytes are disclosed, not an exact match.

Independent parent checks

Tested tree4bc47574686541ac02187532e5ca1f518f9e9fcd. Full default43U build and explicit ok pass; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. All1027 whole objects compared, only CandidateBox changes; every other1026 complete unit record identical, no function/exact/data/link regressions. All110 exact functions independently instruction-identical, including newly matched CalcPaneLocate_.

Read/re-ran exhaustive current-base proof: two inserted address calculations and five changed existing instructions; all CFG continuations, calls, argument values and nonoverlapping left/right/window lifetimes accounted. Stack references/save-restore range unchanged. Original DOL confirms actual names and target address calculations.

All337 symbols/752 relocations checked:59 private object names advance2,129 later function positions and333 text relocation offsets advance8. Every allocated nontext byte and raw nontext relocation remains identical. Current string-table75 changed bytes fully reconstructed; historical70-byte result kept separately, not reused. All other metadata changes exactly accounted.

Pool57strings pass. Literal advisory111functions/27arguments clean; create skipped for unequal sizes, explicitly covered separately by complete instruction/argument proof. No hardware or stack-exhaustion claim. Historical and current-base proof/log files included; originals and raw binary evidence stay local.

Draft for review. No merge or auto-merge requested.

Note

Improve right-scroll pane-name captures in tiCandidateBox.cpp (94.59091 → 95.99148%)

  • Replaces the inline right-scroll pane and bound-name pointer expressions at the Create call in LayoutByNW4R with two local const char* variables in tiCandidateBox.cpp. Selected offsets and surrounding initialization are unchanged, and match rates rise from 94.59091% to 95.99148%.
  • Adds two verification reports documenting the right-name capture and 5af01fa8 baseline compatibility: right-names report and 5af compatibility report.
  • Adds standalone verifier scripts verify_tiCandidateBox_right_names.py and verify_tiCandidateBox_right_names_5af.py. Each checks artifact hashes, ELF structure, inserted/replaced instructions, branches, register lifetimes, stack references, and pane-name arrays against the target object and original DOL.
  • Behavioral Change: two four-byte instructions are inserted at LayoutByNW4R, shifting subsequent instruction and relocation offsets; the verifiers map baseline offsets to candidate offsets across both insertions.

Macroscope summarized 4dd2dd0.

## Change Capture the two existing fixed-array right-scroll name addresses before the unchanged Create call. No character snapshot, mutable pointer capture, changed helper or call-order change. ## Current result and costs Independently rebased and full-built on 5af01fa8, retaining external #1131 geometry match. - create94.59091 →95.99148%; unit99.6285 →99.71067%; global99.73445 →99.735115% - Exact110/112, matched code21728/24000, data4652/4652 and linking preserved - Size1416/354 →1424/356 bytes/instructions. Frame remains0x30; target1408/352 and frame0x20. Extra8 code bytes are disclosed, not an exact match. ## Independent parent checks Tested tree4bc47574686541ac02187532e5ca1f518f9e9fcd. Full default43U build and explicit ok pass; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. All1027 whole objects compared, only CandidateBox changes; every other1026 complete unit record identical, no function/exact/data/link regressions. All110 exact functions independently instruction-identical, including newly matched CalcPaneLocate_. Read/re-ran exhaustive current-base proof: two inserted address calculations and five changed existing instructions; all CFG continuations, calls, argument values and nonoverlapping left/right/window lifetimes accounted. Stack references/save-restore range unchanged. Original DOL confirms actual names and target address calculations. All337 symbols/752 relocations checked:59 private object names advance2,129 later function positions and333 text relocation offsets advance8. Every allocated nontext byte and raw nontext relocation remains identical. Current string-table75 changed bytes fully reconstructed; historical70-byte result kept separately, not reused. All other metadata changes exactly accounted. Pool57strings pass. Literal advisory111functions/27arguments clean; create skipped for unequal sizes, explicitly covered separately by complete instruction/argument proof. No hardware or stack-exhaustion claim. Historical and current-base proof/log files included; originals and raw binary evidence stay local. Draft for 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] > ### Improve right-scroll pane-name captures in `tiCandidateBox.cpp` (94.59091 → 95.99148%) > - Replaces the inline right-scroll pane and bound-name pointer expressions at the `Create` call in `LayoutByNW4R` with two local `const char*` variables in [tiCandidateBox.cpp](https://github.com/coah80/wii-ipl/pull/1132/files#diff-d09edda016b1f8deb10d254572fee84552970820d3f9770998fa3b2b445ee047). Selected offsets and surrounding initialization are unchanged, and match rates rise from 94.59091% to 95.99148%. > - Adds two verification reports documenting the right-name capture and 5af01fa8 baseline compatibility: [right-names report](https://github.com/coah80/wii-ipl/pull/1132/files#diff-fafba37360b1a5ffc6089e76701a50caa81634a6d498ddb28e3e8dddcb45cd7e) and [5af compatibility report](https://github.com/coah80/wii-ipl/pull/1132/files#diff-3a5daf435f734a7e69aff8db4ce68c718a853b66ef83cc81cad2fd233a5ab010). > - Adds standalone verifier scripts [verify_tiCandidateBox_right_names.py](https://github.com/coah80/wii-ipl/pull/1132/files#diff-980e2f507eb2694f5f4bd3543818d4fcc8b846925451a202fda3a21a0ed427c3) and [verify_tiCandidateBox_right_names_5af.py](https://github.com/coah80/wii-ipl/pull/1132/files#diff-27887a7a8cc524c47651a2b7e7043fb63caef76437c29ef9c70c8f0505148811). Each checks artifact hashes, ELF structure, inserted/replaced instructions, branches, register lifetimes, stack references, and pane-name arrays against the target object and original DOL. > - Behavioral Change: two four-byte instructions are inserted at `LayoutByNW4R`, shifting subsequent instruction and relocation offsets; the verifiers map baseline offsets to candidate offsets across both insertions. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 4dd2dd0.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 18:37:32 +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.