Improve CandidateBox create left-scroll address captures (93.67614 → 94.59091%) #1130

Merged
coah80 merged 1 commits from agent/bittle/candidatebox-left-captures into main 2026-10-03 18:08:21 +00:00
coah80 commented 2026-10-03 18:06:31 +00:00 (Migrated from github.com)

Change

Capture the two existing fixed-array left-scroll name addresses immediately before UIButton::Create. No call/lookup order, mutable content read, constructor, or other production statement changes.

Measured result and real costs

  • create fuzzy 93.67614 → 94.59091%; unit 99.56567 → 99.61933%
  • 109/112 exact functions, code 19988/24000, data 4652/4652 and linking unchanged
  • Source grows 1408/352 → 1416/354 bytes/instructions (target1408/352); frame grows0x20 →0x30. This is a fuzzy improvement, not an exact match; the extra16 stack bytes are a resource cost.

Independent parent verification

Rebased and fully rebuilt on b0abd185; tested tree8216868fbd230fc69c806247d8b283ac15ef0682. Full default43U build and explicit ok pass; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. All1027 objects compared: only CandidateBox differs; all other1026 complete unit records identical. No function, exact, data or link regressions. All109 exact symbol disassemblies independently identical. Global fuzzy99.73394 →99.73437.

Read and independently reran the committed exhaustive verifier: all23 changed existing instructions plus two address insertions accounted; per-definition allocator/window register lifetimes, six prologue/epilogue stack references, actual original Runtime save/restore25 helpers, complete337-symbol bijection and752 relocations checked. All allocated nontext bytes unchanged. Raw .rela.data DOES change (40bytes) due to symbol-index reordering; all referents proved identical. .comment/.strtab changes are exhaustively reconstructed, not ignored.

Pool57strings pass. Literal advisory111functions/27arguments passes; create is skipped for unequal size, so its name/call argument evidence is supplied separately by the instruction/address proof. No hardware, stack-exhaustion or arbitrary callback stack-introspection equivalence claimed.

Full measured provenance, limitations and reproduction in tools/decomp-assist/tiCandidateBox-left-names-20261003.md. Original binaries/evidence remain local. Draft for review; no merge or auto-merge requested.

Note

Fix left-scroll pane names in textinput::candidatebox.LayoutByNW4R Create calls

  • Replaces the direct left-scroll Create arguments in LayoutByNW4R with two paneNames offsets: +68 for the visible left-scroll pane and +48 for the bounding pane, swapped into the correct argument order. The right-scroll call is unchanged.
  • Adds a verification script that checks object hashes, symbols, relocations, sections, and the exact text splice against the expected baseline and candidate objects. It exits on the first failed assertion and can emit JSON evidence.
  • Adds an engineering report documenting the pane-name offsets, measurements (93.67614 → 94.59091%), and verification steps.
  • Behavioral Change: left-scroll Create in tiCandidateBox.cpp now receives the visible pane name first and the bounding pane name second; check the +48/+68 offsets against the frozen paneNames array.

Macroscope summarized 798b08a.

## Change Capture the two existing fixed-array left-scroll name addresses immediately before UIButton::Create. No call/lookup order, mutable content read, constructor, or other production statement changes. ## Measured result and real costs - create fuzzy 93.67614 → 94.59091%; unit 99.56567 → 99.61933% - 109/112 exact functions, code 19988/24000, data 4652/4652 and linking unchanged - Source grows 1408/352 → 1416/354 bytes/instructions (target1408/352); frame grows0x20 →0x30. This is a fuzzy improvement, not an exact match; the extra16 stack bytes are a resource cost. ## Independent parent verification Rebased and fully rebuilt on b0abd185; tested tree8216868fbd230fc69c806247d8b283ac15ef0682. Full default43U build and explicit ok pass; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. All1027 objects compared: only CandidateBox differs; all other1026 complete unit records identical. No function, exact, data or link regressions. All109 exact symbol disassemblies independently identical. Global fuzzy99.73394 →99.73437. Read and independently reran the committed exhaustive verifier: all23 changed existing instructions plus two address insertions accounted; per-definition allocator/window register lifetimes, six prologue/epilogue stack references, actual original Runtime save/restore25 helpers, complete337-symbol bijection and752 relocations checked. All allocated nontext bytes unchanged. Raw .rela.data DOES change (40bytes) due to symbol-index reordering; all referents proved identical. .comment/.strtab changes are exhaustively reconstructed, not ignored. Pool57strings pass. Literal advisory111functions/27arguments passes; create is skipped for unequal size, so its name/call argument evidence is supplied separately by the instruction/address proof. No hardware, stack-exhaustion or arbitrary callback stack-introspection equivalence claimed. Full measured provenance, limitations and reproduction in tools/decomp-assist/tiCandidateBox-left-names-20261003.md. Original binaries/evidence remain 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] > ### Fix left-scroll pane names in `textinput::candidatebox.LayoutByNW4R` Create calls > - Replaces the direct left-scroll `Create` arguments in `LayoutByNW4R` with two `paneNames` offsets: +68 for the visible left-scroll pane and +48 for the bounding pane, swapped into the correct argument order. The right-scroll call is unchanged. > - Adds a verification script that checks object hashes, symbols, relocations, sections, and the exact text splice against the expected baseline and candidate objects. It exits on the first failed assertion and can emit JSON evidence. > - Adds an engineering report documenting the pane-name offsets, measurements (93.67614 → 94.59091%), and verification steps. > - Behavioral Change: left-scroll `Create` in [tiCandidateBox.cpp](https://github.com/coah80/wii-ipl/pull/1130/files#diff-d09edda016b1f8deb10d254572fee84552970820d3f9770998fa3b2b445ee047) now receives the visible pane name first and the bounding pane name second; check the +48/+68 offsets against the frozen `paneNames` array. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 798b08a.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 18:08:19 +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.