decomp(sd): recover scissor projection expressions #1011

Merged
coah80 merged 1 commits from agent/bittle/sd-scissor-projection into main 2026-10-03 01:08:42 +00:00
coah80 commented 2026-10-03 01:07:26 +00:00 (Migrated from github.com)

Source reconstruction

Express the four orthographic bounds directly, keep projection width separate from output scissor width, remove one-use quotient temporaries, and compute X before Y in the target order. No clamping policy, projection formula or event predicate changes.

Independent verification

  • setChannelScissor: 93.4721% → 99.5279%; 233/233 instructions; 15 register substitutions remain
  • Unit fuzzy: 99.582596% → 99.749435%; 122/129 reported-exact functions, code 29412/33828 and data 2960/2960 preserved
  • All 1027 objects compared: only SDChannelSelect .text changes; non-text bytes and normalized relocations unchanged; no report regressions
  • Parent reran 250,000 bounded numeric comparisons: output scissors and matrix bounds agree bitwise, including 219,852 fully clipped cases
  • Tests use finite bounded geometry and model projection helpers, not Wii graphics hardware or arbitrary exceptional FP inputs
  • Pool 101/101, literal/worktree/diff checks and full 43U all_source/report/progress/DOL pass

Partial reconstruction only. No register forcing, new assembly, headers, metadata or linking change. The separately reported event-predicate correction is not included in this leaf.

Parent baseline: 7d6057adf6
Tested tree: df3c4d0cfe
DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d

No merge performed or requested by this author.

Note

Recover scissor projection expressions in SDChannelSelect::setChannelScissor

Replaces intermediate projection-scale temporaries with direct orthographic-bound expressions in ipl::scene::SDChannelSelect::setChannelScissor. The projection width is cached in a const local and used for both the X scissor and scissor width calculations.

  • Adds an evidence and verification record for the reconstruction, covering instruction matching, numeric-equivalence testing, and known preexisting relocation differences, in sd-selection-scissor-20261003.md
  • Behavioral Change: code in iplSDChannelSelect.cpp is functionally equivalent; only intermediate variables are removed

Macroscope summarized ce074d3.

## Source reconstruction Express the four orthographic bounds directly, keep projection width separate from output scissor width, remove one-use quotient temporaries, and compute X before Y in the target order. No clamping policy, projection formula or event predicate changes. ## Independent verification - setChannelScissor: 93.4721% → 99.5279%; 233/233 instructions; 15 register substitutions remain - Unit fuzzy: 99.582596% → 99.749435%; 122/129 reported-exact functions, code 29412/33828 and data 2960/2960 preserved - All 1027 objects compared: only SDChannelSelect .text changes; non-text bytes and normalized relocations unchanged; no report regressions - Parent reran 250,000 bounded numeric comparisons: output scissors and matrix bounds agree bitwise, including 219,852 fully clipped cases - Tests use finite bounded geometry and model projection helpers, not Wii graphics hardware or arbitrary exceptional FP inputs - Pool 101/101, literal/worktree/diff checks and full 43U all_source/report/progress/DOL pass Partial reconstruction only. No register forcing, new assembly, headers, metadata or linking change. The separately reported event-predicate correction is not included in this leaf. Parent baseline: 7d6057adf62fab8b0d39c545af8fc7a05f524ac9 Tested tree: df3c4d0cfe43a48d4ed652efe2bb8a52e60195fd DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d No merge performed or requested by this author. <!-- 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] > ### Recover scissor projection expressions in `SDChannelSelect::setChannelScissor` > Replaces intermediate projection-scale temporaries with direct orthographic-bound expressions in `ipl::scene::SDChannelSelect::setChannelScissor`. The projection width is cached in a const local and used for both the X scissor and scissor width calculations. > > - Adds an evidence and verification record for the reconstruction, covering instruction matching, numeric-equivalence testing, and known preexisting relocation differences, in [sd-selection-scissor-20261003.md](https://github.com/coah80/wii-ipl/pull/1011/files#diff-b65ff837fb6b37a9200aab96e25c6a3840f17eb0f0cea82f65434f36ead588c6) > - Behavioral Change: code in [iplSDChannelSelect.cpp](https://github.com/coah80/wii-ipl/pull/1011/files#diff-e53501e65bee666a9170934feea187bf6eca90a50d75b60f63ea84bc4af67569) is functionally equivalent; only intermediate variables are removed > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized ce074d3.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 01:08:40 +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.