diff --git a/src/keyboard/tiPcKeyboard.cpp b/src/keyboard/tiPcKeyboard.cpp index 80596aa9..6eb7b2e7 100644 --- a/src/keyboard/tiPcKeyboard.cpp +++ b/src/keyboard/tiPcKeyboard.cpp @@ -1610,7 +1610,7 @@ namespace textinput { } void Base::setTranslateMode(TranslateMode mode) { - u32 keyMode = mode; + u32 keyMode; switch (mode) { case TM_Direct: keyMode = 0; diff --git a/tools/decomp-assist/iplSetting.attempts.md b/tools/decomp-assist/iplSetting.attempts.md new file mode 100644 index 00000000..f39aa6f1 --- /dev/null +++ b/tools/decomp-assist/iplSetting.attempts.md @@ -0,0 +1,14 @@ + +## scanAP (w1010 revisit) — inlined-bool materialization wall +Orig inlines `Animator::isPlaying()` (`mState == 1` at +0x14) 3x but always as a +MATERIALIZED bool: `lwz rX,0x14; addi r0,rX,-1; cntlzw r0,r0; rlwinm. r0,r0,27,5,31; bne`. +Ours fuses to `lwz r0,0x14; cmpwi r0,1; beq` — 6 insns shorter overall (272 vs 266). +Tried and rejected (MWCC normalizes/folds all of them): + - `isPlaying() == false` at the call site + - `bool playing = anim->isPlaying(); if (!playing)` named local (fuses; eggColorFader's + fadeOut materializes only because `success` is also RETURNED — a second value-use) + - `int isPlaying()` return type — still fuses + - `return !(mState != ANIM_STATE_PLAY)` in the header — still fuses +Conclusion: orig's bool crosses a real value-boundary (2nd use, or a different inlined +shape we haven't identified). Same family as the fused-compare fossil in CHANSVm. +Also tried: convertRevIP untouched (98.7, 292B). diff --git a/tools/decomp-assist/tiString.attempts.md b/tools/decomp-assist/tiString.attempts.md index 78c8b7f5..1d309036 100644 --- a/tools/decomp-assist/tiString.attempts.md +++ b/tools/decomp-assist/tiString.attempts.md @@ -15,3 +15,16 @@ Initial reconstruction uses the sibling tiString and tiUtil headers, real member ## character predicates The sibling util declarations return bool, while target callers normalize an integer result. Guarded u32 declarations preserve every other translation unit and make all three predicates 16/16 with zero differences. + +## inputChar (w1010 orchestrator probe) — indexed-store + dead-compare fossil +Orig mode==3 block (this->0x24==3) emits: `sth r6,0x10` (input[0]=0, r6=0 reused as +value), `cmplwi r4,0xa` (DEAD compare — no branch consumes it), then indexed stores +`slwi r0,r6,1; sthx r4,buf,r0; addi r6,1; slwi r0,r6,1; clrlwi r29,r6,0x10; sthx r5,buf,r0` += input[i]=ch; i++; input[i]=0 with the index kept SYMBOLIC despite li i,0. +Ours: direct-offset `sth r4,0x10; li r29,1; sth r5,0x12` (125 vs 136 insns). +Tried: `input[i]=ch; i++; input[i]=0; count=i` — MWCC constant-folds i to 0, +re-emits direct offsets. Index must be runtime-opaque in orig (loop bound from a +call result, or a non-foldable form). Dead `cmplwi r4,0xa` matches the documented +dead-compare-fossil family (both-branch merge). Also: count lands in r29 via +clrlwi (u16) — count is i. +Unresolved: what source produces symbolic-index stores + dead compare.