From 6f96235605056c329007ffcb1b843187f8c87b73 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Thu, 1 Oct 2026 17:09:30 -0500 Subject: [PATCH 1/3] cleanup(tiGUIManager): name sdata2 zero/half/line-color constants (#506) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit lbl_81694EE8 → scGuiZeroF, lbl_81694EF0 → scGuiHalfF, lbl_81694EEC..F → scGuiLineColorR/G/B/A. --- config/43U/symbols.txt | 12 +++++----- src/keyboard/tiGUIManager.cpp | 42 +++++++++++++++++------------------ 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/config/43U/symbols.txt b/config/43U/symbols.txt index eb40aab5..3affba7f 100644 --- a/config/43U/symbols.txt +++ b/config/43U/symbols.txt @@ -20710,12 +20710,12 @@ lbl_81694ECC = .sdata2:0x81694ECC; // type:object size:0x4 align:4 data:float @880 = .sdata2:0x81694ED4; // type:object size:0x4 scope:local align:4 data:float @885 = .sdata2:0x81694ED8; // type:object size:0x4 scope:local align:4 data:float @888 = .sdata2:0x81694EE0; // type:object size:0x8 scope:local align:8 data:double -lbl_81694EE8 = .sdata2:0x81694EE8; // type:object size:0x4 align:4 data:float -lbl_81694EEC = .sdata2:0x81694EEC; // type:object size:0x1 data:byte -lbl_81694EED = .sdata2:0x81694EED; // type:object size:0x1 data:byte -lbl_81694EEE = .sdata2:0x81694EEE; // type:object size:0x1 data:byte -lbl_81694EEF = .sdata2:0x81694EEF; // type:object size:0x1 data:byte -lbl_81694EF0 = .sdata2:0x81694EF0; // type:object size:0x4 align:4 data:float +scGuiZeroF = .sdata2:0x81694EE8; // type:object size:0x4 align:4 data:float +scGuiLineColorR = .sdata2:0x81694EEC; // type:object size:0x1 data:byte +scGuiLineColorG = .sdata2:0x81694EED; // type:object size:0x1 data:byte +scGuiLineColorB = .sdata2:0x81694EEE; // type:object size:0x1 data:byte +scGuiLineColorA = .sdata2:0x81694EEF; // type:object size:0x1 data:byte +scGuiHalfF = .sdata2:0x81694EF0; // type:object size:0x4 align:4 data:float lbl_81694EF8 = .sdata2:0x81694EF8; // type:object size:0x8 data:4byte lbl_81694F00 = .sdata2:0x81694F00; // type:object size:0x4 data:4byte lbl_81694F08 = .sdata2:0x81694F08; // type:object size:0x8 align:8 data:double diff --git a/src/keyboard/tiGUIManager.cpp b/src/keyboard/tiGUIManager.cpp index 326e11b0..ba132571 100644 --- a/src/keyboard/tiGUIManager.cpp +++ b/src/keyboard/tiGUIManager.cpp @@ -8,7 +8,7 @@ namespace textinput { namespace gui { extern "C" void drawLine___Q29textinput3guiFfffffUcR8_GXColor(); - extern "C" const f32 lbl_81694EE8; + extern "C" const f32 scGuiZeroF; void drawLine_(f32 x0, f32 y0, f32 x1, f32 y1, f32 z, u8 width, GXColor& color) { GXClearVtxDesc(); @@ -31,7 +31,7 @@ namespace textinput { GXSetBlendMode(GX_BM_NONE, GX_BL_ZERO, GX_BL_ZERO, GX_LO_NOOP); Mtx mtx; - MTXTrans(mtx, lbl_81694EE8, lbl_81694EE8, lbl_81694EE8); + MTXTrans(mtx, scGuiZeroF, scGuiZeroF, scGuiZeroF); GXLoadPosMtxImm(mtx, 0); GXSetLineWidth(width, GX_TO_ZERO); @@ -334,7 +334,7 @@ namespace textinput { MTXInverse(mpPane->GetGlobalMtx(), globalMtx); nw4r::math::VEC3 pos; - MTXMultVec(globalMtx, nw4r::math::VEC3(x, y, lbl_81694EE8), pos); + MTXMultVec(globalMtx, nw4r::math::VEC3(x, y, scGuiZeroF), pos); nw4r::ut::Rect rect = mpPane->GetPaneRect(*drawInfo); @@ -348,12 +348,12 @@ namespace textinput { #pragma push #pragma section sconst_type ".sdata2" - extern "C" const f32 lbl_81694EE8 = 0.0f; - extern "C" const u8 lbl_81694EEC = 0xFF; - extern "C" const u8 lbl_81694EED = 0x00; - extern "C" const u8 lbl_81694EEE = 0x00; - extern "C" const u8 lbl_81694EEF = 0xFF; - extern "C" const f32 lbl_81694EF0 = 0.5f; + extern "C" const f32 scGuiZeroF = 0.0f; + extern "C" const u8 scGuiLineColorR = 0xFF; + extern "C" const u8 scGuiLineColorG = 0x00; + extern "C" const u8 scGuiLineColorB = 0x00; + extern "C" const u8 scGuiLineColorA = 0xFF; + extern "C" const f32 scGuiHalfF = 0.5f; #pragma pop extern "C" asm void draw__Q39textinput3gui13PaneComponentFv() { @@ -376,15 +376,15 @@ namespace textinput { beq pane_component_draw_done lwz r5, 0x9c(r31) mr r3, r31 - lbz r7, lbl_81694EEC + lbz r7, scGuiLineColorR li r4, 0 lfs f1, 0x4c(r5) lfs f0, 0x50(r5) lfs f31, 0x90(r5) lfs f30, 0xa0(r5) - lbz r6, lbl_81694EED - lbz r5, lbl_81694EEE - lbz r0, lbl_81694EEF + lbz r6, scGuiLineColorG + lbz r5, scGuiLineColorB + lbz r0, scGuiLineColorA stb r7, 8(r1) stb r6, 9(r1) stb r5, 0xa(r1) @@ -402,13 +402,13 @@ namespace textinput { stb r3, 8(r1) stb r0, 0xa(r1) pane_component_draw_lines: - lfs f1, lbl_81694EF0 + lfs f1, scGuiHalfF addi r4, r1, 8 lfs f0, 0x14(r1) li r3, 8 lfs f2, 0x10(r1) fmuls f0, f0, f1 - lfs f5, lbl_81694EE8 + lfs f5, scGuiZeroF fmuls f3, f2, f1 fsubs f2, f30, f0 fsubs f1, f31, f3 @@ -417,24 +417,24 @@ namespace textinput { bl drawLine___Q29textinput3guiFfffffUcR8_GXColor lfs f1, 0x10(r1) addi r4, r1, 8 - lfs f2, lbl_81694EF0 + lfs f2, scGuiHalfF li r3, 8 lfs f0, 0x14(r1) fmuls f1, f1, f2 - lfs f5, lbl_81694EE8 + lfs f5, scGuiZeroF fmuls f0, f0, f2 fadds f1, f31, f1 fsubs f2, f30, f0 fadds f4, f30, f0 fmr f3, f1 bl drawLine___Q29textinput3guiFfffffUcR8_GXColor - lfs f1, lbl_81694EF0 + lfs f1, scGuiHalfF addi r4, r1, 8 lfs f0, 0x14(r1) li r3, 8 lfs f2, 0x10(r1) fmuls f0, f0, f1 - lfs f5, lbl_81694EE8 + lfs f5, scGuiZeroF fmuls f3, f2, f1 fadds f2, f30, f0 fadds f1, f31, f3 @@ -443,11 +443,11 @@ namespace textinput { bl drawLine___Q29textinput3guiFfffffUcR8_GXColor lfs f1, 0x10(r1) addi r4, r1, 8 - lfs f2, lbl_81694EF0 + lfs f2, scGuiHalfF li r3, 8 lfs f0, 0x14(r1) fmuls f1, f1, f2 - lfs f5, lbl_81694EE8 + lfs f5, scGuiZeroF fmuls f0, f0, f2 fsubs f1, f31, f1 fadds f2, f30, f0 -- 2.49.1 From 6339928c87d859a8ef4b22abffa710ba92118951 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Thu, 1 Oct 2026 17:09:41 -0500 Subject: [PATCH 2/3] cleanup(tiHwKeyboard): name EU/non-EU country map tables Rename Matching-only setLanguage country lookup tables and symbols.txt entries. --- config/43U/symbols.txt | 4 ++-- src/keyboard/tiHwKeyboard.cpp | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/43U/symbols.txt b/config/43U/symbols.txt index eb40aab5..195ec40b 100644 --- a/config/43U/symbols.txt +++ b/config/43U/symbols.txt @@ -13986,8 +13986,8 @@ lbl_81616AE4 = .rodata:0x81616AE4; // type:object size:0x30 lbl_81616B14 = .rodata:0x81616B14; // type:object size:0x74 lbl_81616B88 = .rodata:0x81616B88; // type:object size:0x40 lbl_81616BC8 = .rodata:0x81616BC8; // type:object size:0x10 data:4byte -lbl_81616BD8 = .rodata:0x81616BD8; // type:object size:0xC -lbl_81616BE4 = .rodata:0x81616BE4; // type:object size:0xC +scCountryMap_EU = .rodata:0x81616BD8; // type:object size:0xC +scCountryMap_NonEU = .rodata:0x81616BE4; // type:object size:0xC lbl_81616BF0 = .rodata:0x81616BF0; // type:object size:0x88 CHANSVmConstStringObjectUndefined = .rodata:0x81616C78; // type:object size:0x10 lbl_81616C88 = .rodata:0x81616C88; // type:object size:0x10 diff --git a/src/keyboard/tiHwKeyboard.cpp b/src/keyboard/tiHwKeyboard.cpp index 71b37e1e..20d49d3f 100644 --- a/src/keyboard/tiHwKeyboard.cpp +++ b/src/keyboard/tiHwKeyboard.cpp @@ -526,8 +526,8 @@ extern const u8 controlKeys[]; return false; } -extern "C" const u8 lbl_81616BD8[] = {0x0f, 0x21, 0x20, 0x08, 0x09, 0x0e, 0x19, 0x00, 0x21, 0x21, 0x00, 0x00}; -extern "C" const u8 lbl_81616BE4[] = {0x0f, 0x21, 0x20, 0x04, 0x09, 0x0e, 0x11, 0x00, 0x21, 0x21, 0x00, 0x00}; +extern "C" const u8 scCountryMap_EU[] = {0x0f, 0x21, 0x20, 0x08, 0x09, 0x0e, 0x19, 0x00, 0x21, 0x21, 0x00, 0x00}; +extern "C" const u8 scCountryMap_NonEU[] = {0x0f, 0x21, 0x20, 0x04, 0x09, 0x0e, 0x11, 0x00, 0x21, 0x21, 0x00, 0x00}; const u8 controlKeys[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x01, 0x0a, 0x03, @@ -640,16 +640,16 @@ const u8 controlKeys[] = { nofralloc cmpwi r4, 2 bne setLanguage_L1 - lis r4, lbl_81616BD8@ha + lis r4, scCountryMap_EU@ha lis r3, sInstance__Q39textinput5input10HKBManager@ha - addi r4, r4, lbl_81616BD8@l + addi r4, r4, scCountryMap_EU@l lbzx r4, r4, r5 addi r3, r3, sInstance__Q39textinput5input10HKBManager@l b SetCountry__Q39textinput5input10HKBManagerFUc setLanguage_L1: - lis r4, lbl_81616BE4@ha + lis r4, scCountryMap_NonEU@ha lis r3, sInstance__Q39textinput5input10HKBManager@ha - addi r4, r4, lbl_81616BE4@l + addi r4, r4, scCountryMap_NonEU@l lbzx r4, r4, r5 addi r3, r3, sInstance__Q39textinput5input10HKBManager@l b SetCountry__Q39textinput5input10HKBManagerFUc -- 2.49.1 From 2cb6c2dfae70d6da6fada4dd367826b064c5f436 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 1 Oct 2026 22:09:42 +0000 Subject: [PATCH 3/3] docs: update progress [skip ci] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4fc2701b..e20a1667 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Progress | Decompiled | Matched | Linked | Data | |:---:|:---:|:---:|:---:| -| 99.37% | 87.69% | 61.93% | 91.28% | +| 99.37% | 87.69% | 61.93% | 91.37% | units 917/1027 complete, functions 12211/12563 matched. -- 2.49.1