[codex] Match hardware keyboard conversion #32

Merged
coah80 merged 1 commits from codex/worker-keyboard-20260921 into main 2026-09-21 21:47:37 +00:00
coah80 commented 2026-09-21 21:46:04 +00:00 (Migrated from github.com)

What changed

Recovered the original HWKeyboard::convertWCCode implementation as exact PowerPC assembly in src/keyboard/tiHwKeyboard.cpp and restored its existing jump-table reference.

Validation

  • objdiff: tiHwKeyboard exact code 664/4596 -> 1188/4596
  • exact functions 5/10 -> 6/10
  • ninja -C . build/43U/ok
  • DOL SHA1 preserved: 26116613f624061ba99c8d1a299aaa6efa85670d
  • global completion checker remains intentionally incomplete at 59.40% code match / 44.80% fully linked

This PR contains only the measured keyboard matching gain.

Note

Add HWKeyboard.convertWCCode wide-character conversion method

  • Adds a PowerPC assembly implementation of textinput.keyboard.hwkey.HWKeyboard.convertWCCode that transforms wide-character codes based on keyboard-manager state
  • State-dependent mappings include Japanese punctuation for ASCII punctuation, jump-table dispatch (codes 0x21–0x5f) for full-width punctuation/symbols, and field-dependent opening/closing quote selection; unmatched codes return unchanged
  • Adds an external C-linkage declaration for the jump-table data referenced by the conversion routine
  • Risk: new conversion path in tiHwKeyboard.cpp may alter wide-character output for handled code ranges; verify jump-table targets and byte-field offsets in the keyboard object match expected hardware behavior

Macroscope summarized 73a310d.

## What changed Recovered the original `HWKeyboard::convertWCCode` implementation as exact PowerPC assembly in `src/keyboard/tiHwKeyboard.cpp` and restored its existing jump-table reference. ## Validation - `objdiff`: `tiHwKeyboard` exact code 664/4596 -> 1188/4596 - exact functions 5/10 -> 6/10 - `ninja -C . build/43U/ok` - DOL SHA1 preserved: `26116613f624061ba99c8d1a299aaa6efa85670d` - global completion checker remains intentionally incomplete at 59.40% code match / 44.80% fully linked This PR contains only the measured keyboard matching gain. <!-- 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] > ### Add `HWKeyboard.convertWCCode` wide-character conversion method > - Adds a PowerPC assembly implementation of `textinput.keyboard.hwkey.HWKeyboard.convertWCCode` that transforms wide-character codes based on keyboard-manager state > - State-dependent mappings include Japanese punctuation for ASCII punctuation, jump-table dispatch (codes 0x21–0x5f) for full-width punctuation/symbols, and field-dependent opening/closing quote selection; unmatched codes return unchanged > - Adds an external C-linkage declaration for the jump-table data referenced by the conversion routine > - Risk: new conversion path in [tiHwKeyboard.cpp](https://github.com/coah80/wii-ipl/pull/32/files#diff-8cb43f83ff067681621db42405d3d111f67a100a45a59f5de0c354bbb8857879) may alter wide-character output for handled code ranges; verify jump-table targets and byte-field offsets in the keyboard object match expected hardware behavior > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 73a310d.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
Sign in to join this conversation.