Compare commits

..

1 Commits

Author SHA1 Message Date
coah
9b8d11475d cleanup(Controller): name Base/Classic status and pinch fields
- unk_0x08 → mDecideHoldCount (decide() when == 5)
- unk_0x1C → mbForceInvalid (setForceInvalid)
- unk_0x1D/1E → mbPinch/mbPrevPinch (A+B pinch state)
- unk_0x20 → mpStatus
- Classic unk_0x24/2C → mClassicCursor/mClassicCursorTimer

Also update ControllerManager ctor that touches Base fields.

Verified: Controller/ControllerManager 100%/100%, build/43U/ok,
DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d
2026-10-02 14:18:39 -05:00
67 changed files with 665 additions and 11203 deletions

View File

@@ -53,9 +53,9 @@ Progress
<!-- progress:start -->
| Decompiled | Matched | Linked | Data |
|:---:|:---:|:---:|:---:|
| 99.59% | 90.94% | 73.73% | 99.42% |
| 99.59% | 90.81% | 71.43% | 99.37% |
units 961/1027 complete, functions 12369/12563 matched.
units 956/1027 complete, functions 12365/12563 matched.
decompiled = code with a C/C++ implementation (objdiff fuzzy), matched = byte-exact code, linked = code actually linked into the DOL, data = byte-exact data
<!-- progress:end -->

View File

@@ -13904,15 +13904,10 @@ lbl_81610608 = .rodata:0x81610608; // type:object size:0x300
lbl_81610908 = .rodata:0x81610908; // type:object size:0x10
sCaptureSizes__Q23ipl5scene = .rodata:0x81610918; // type:object size:0x10
lbl_81610928 = .rodata:0x81610928; // type:object size:0x20 data:4byte
scAnmTable__Q23ipl5scene = .rodata:0x81610948; // type:object size:0xE8 scope:local
@17203 = .rodata:0x81610A30; // type:object size:0x1C scope:local
@17212 = .rodata:0x81610A4C; // type:object size:0x30 scope:local
@17223 = .rodata:0x81610A7C; // type:object size:0x28 scope:local
@17227 = .rodata:0x81610AA4; // type:object size:0x30 scope:local
@17254 = .rodata:0x81610AD4; // type:object size:0x1C scope:local
@18816 = .rodata:0x81610AF0; // type:object size:0x30 scope:local data:4byte
@18818 = .rodata:0x81610B20; // type:object size:0x60 scope:local data:4byte
@19272 = .rodata:0x81610B80; // type:object size:0x20 scope:local data:wstring
scAnmTable__Q23ipl5scene = .rodata:0x81610948; // type:object size:0x1A8 scope:local
lbl_81610AF0 = .rodata:0x81610AF0; // type:object size:0x30 data:4byte
lbl_81610B20 = .rodata:0x81610B20; // type:object size:0x60 data:4byte
lbl_81610B80 = .rodata:0x81610B80; // type:object size:0x20 data:wstring
scNumber__Q23ipl5scene = .rodata:0x81610BA0; // type:object size:0x14 scope:local data:2byte
scNumber2__Q23ipl5scene = .rodata:0x81610BB4; // type:object size:0x14 scope:local data:2byte
lbl_81610BC8 = .rodata:0x81610BC8; // type:object size:0x1000
@@ -17170,23 +17165,7 @@ sSettingAPPaneNames__Q23ipl5scene = .data:0x81656978; // type:object size:0x68 d
sSettingAPAnimations__Q23ipl5scene = .data:0x81656B6C; // type:object size:0x4C data:4byte
@25442 = .data:0x81656BB8; // type:object size:0xF scope:local data:string
@25443 = .data:0x81656BC7; // type:object size:0x1C scope:local data:string
@25501 = .data:0x81656BE3; // type:object size:0xF scope:local data:string
@25502 = .data:0x81656BF2; // type:object size:0x14 scope:local data:string
@25503 = .data:0x81656C06; // type:object size:0x18 scope:local data:string
@25505 = .data:0x81656C1E; // type:object size:0x1A scope:local data:string
@25506 = .data:0x81656C38; // type:object size:0x13 scope:local data:string
@25508 = .data:0x81656C4B; // type:object size:0x9 scope:local data:string
@25509 = .data:0x81656C54; // type:object size:0x12 scope:local data:string
@25510 = .data:0x81656C66; // type:object size:0xC scope:local data:string
@25616 = .data:0x81656C72; // type:object size:0xD scope:local data:string
@25618 = .data:0x81656C7F; // type:object size:0xF scope:local data:string
@25620 = .data:0x81656C8E; // type:object size:0x14 scope:local data:string
@25621 = .data:0x81656CA2; // type:object size:0x1A scope:local data:string
@25622 = .data:0x81656CBC; // type:object size:0x19 scope:local data:string
@25623 = .data:0x81656CD5; // type:object size:0xE scope:local data:string
@25624 = .data:0x81656CE3; // type:object size:0x13 scope:local data:string
@25625 = .data:0x81656CF6; // type:object size:0x18 scope:local data:string
@25628 = .data:0x81656D0E; // type:object size:0x19 scope:local data:string
@17193 = .data:0x81656D27; // type:object size:0xC scope:local data:string
@17194 = .data:0x81656D33; // type:object size:0x20 scope:local data:string
@17197 = .data:0x81656D53; // type:object size:0xD scope:local data:string
@@ -17200,32 +17179,10 @@ sSettingAPAnimations__Q23ipl5scene = .data:0x81656B6C; // type:object size:0x4C
@17250 = .data:0x81656DFA; // type:object size:0x11 scope:local data:string
@17251 = .data:0x81656E0B; // type:object size:0x9 scope:local data:string
@17252 = .data:0x81656E14; // type:object size:0xD scope:local data:string
@25720 = .data:0x81656E21; // type:object size:0x23 scope:local data:string
@25721 = .data:0x81656E44; // type:object size:0xD scope:local data:string
@25722 = .data:0x81656E51; // type:object size:0xD scope:local data:string
@25723 = .data:0x81656E5E; // type:object size:0xD scope:local data:string
@25724 = .data:0x81656E6B; // type:object size:0x25 scope:local data:string
@25726 = .data:0x81656E90; // type:object size:0x15 scope:local data:string
@25747 = .data:0x81656EA5; // type:object size:0x1B scope:local data:string
@25766 = .data:0x81656EC0; // type:object size:0x1D scope:local data:string
@25767 = .data:0x81656EDD; // type:object size:0x11 scope:local data:string
@25768 = .data:0x81656EEE; // type:object size:0x1D scope:local data:string
@26292 = .data:0x81656F0B; // type:object size:0xF scope:local data:string
@26293 = .data:0x81656F1A; // type:object size:0xD scope:local data:string
@26294 = .data:0x81656F27; // type:object size:0x11 scope:local data:string
@26295 = .data:0x81656F38; // type:object size:0x11 scope:local data:string
@26296 = .data:0x81656F49; // type:object size:0xA scope:local data:string
@26297 = .data:0x81656F53; // type:object size:0xD scope:local data:string
@26300 = .data:0x81656F60; // type:object size:0x1A0 scope:local
@26299 = .data:0x81657100; // type:object size:0x48 scope:local
@26346 = .data:0x81657148; // type:object size:0x26 scope:local data:string
@26347 = .data:0x8165716E; // type:object size:0xF scope:local data:string
@26348 = .data:0x8165717D; // type:object size:0xE scope:local data:string
@26349 = .data:0x8165718B; // type:object size:0xA scope:local data:string
@26350 = .data:0x81657195; // type:object size:0xB scope:local data:string
@26351 = .data:0x816571A0; // type:object size:0x16 scope:local data:string
@26353 = .data:0x816571B6; // type:object size:0x11 scope:local data:string
@26354 = .data:0x816571C7; // type:object size:0x16 scope:local data:string
@26502 = .data:0x816571DD; // type:object size:0xF scope:local data:string
@26534 = .data:0x816571EC; // type:object size:0x18 scope:local data:string
@26536 = .data:0x81657204; // type:object size:0x44 scope:local
@@ -17259,11 +17216,6 @@ sSettingAPAnimations__Q23ipl5scene = .data:0x81656B6C; // type:object size:0x4C
@28326 = .data:0x81657642; // type:object size:0x2A scope:local data:string
@28370 = .data:0x8165766C; // type:object size:0x10 scope:local data:string
@28383 = .data:0x8165767C; // type:object size:0x14 scope:local data:string
@28436 = .data:0x81657690; // type:object size:0x16 scope:local data:string
@28437 = .data:0x816576A6; // type:object size:0xF scope:local data:string
@28438 = .data:0x816576B5; // type:object size:0x13 scope:local data:string
@28439 = .data:0x816576C8; // type:object size:0x1A scope:local data:string
@28440 = .data:0x816576E2; // type:object size:0x1B scope:local data:string
@28442 = .data:0x81657700; // type:object size:0x84 scope:local
__vt__Q33ipl5scene7APEvent = .data:0x81657784; // type:object size:0x18
__vt__Q33ipl5scene7Setting = .data:0x8165779C; // type:object size:0x68
@@ -18106,7 +18058,7 @@ __vt__Q49textinput6extend4memo15AppearMemoState = .data:0x81667FA0; // type:obje
__vt__Q49textinput6extend4memo13DispMemoState = .data:0x81667FF8; // type:object size:0x58
__vt__Q49textinput6extend4memo5State = .data:0x81668050; // type:object size:0x58
__vt__Q49textinput6extend4memo7Manager = .data:0x816680A8; // type:object size:0x140
lbl_816681E8 = .data:0x816681E8; // type:object size:0x24
lbl_816681E8 = .data:0x816681E8; // type:object size:0x28
lbl_81668210 = .data:0x81668210; // type:object size:0x9 data:string
lbl_8166821C = .data:0x8166821C; // type:object size:0x9 data:string
lbl_81668228 = .data:0x81668228; // type:object size:0x9 data:string
@@ -22421,93 +22373,93 @@ lbl_81696FD0 = .sdata:0x81696FD0; // type:object size:0x6 data:wstring
lbl_81696FD6 = .sdata:0x81696FD6; // type:object size:0x4 data:wstring
lbl_81696FDA = .sdata:0x81696FDA; // type:object size:0x7 data:string
lbl_81696FE1 = .sdata:0x81696FE1; // type:object size:0x7 data:string
@16789 = .sdata:0x81696FE8; // type:object size:0x6 data:string
@16790 = .sdata:0x81696FEE; // type:object size:0x6 data:string
@16791 = .sdata:0x81696FF4; // type:object size:0x6 data:string
@16792 = .sdata:0x81696FFA; // type:object size:0x6 data:string
@16793 = .sdata:0x81697000; // type:object size:0x7 data:string
@16794 = .sdata:0x81697007; // type:object size:0x7 data:string
sSettingArrowNames__Q23ipl5scene = .sdata:0x81697010; // type:object size:0x8 data:4byte
@16795 = .sdata:0x81697018; // type:object size:0x8 data:string
@16796 = .sdata:0x81697020; // type:object size:0x8 data:string
@16797 = .sdata:0x81697028; // type:object size:0x8 data:string
@16798 = .sdata:0x81697030; // type:object size:0x8 data:string
@16799 = .sdata:0x81697038; // type:object size:0x8 data:string
@16800 = .sdata:0x81697040; // type:object size:0x8 data:string
@16801 = .sdata:0x81697048; // type:object size:0x6 data:string
@16802 = .sdata:0x8169704E; // type:object size:0x6 data:string
@16803 = .sdata:0x81697054; // type:object size:0x6 data:string
@16804 = .sdata:0x8169705A; // type:object size:0x6 data:string
@16805 = .sdata:0x81697060; // type:object size:0x6 data:string
@16806 = .sdata:0x81697066; // type:object size:0x6 data:string
@16809 = .sdata:0x8169706C; // type:object size:0x7 data:string
@16810 = .sdata:0x81697073; // type:object size:0x7 data:string
@16811 = .sdata:0x8169707A; // type:object size:0x8 data:string
@16812 = .sdata:0x81697082; // type:object size:0x7 data:string
@16813 = .sdata:0x81697089; // type:object size:0x6 data:string
@16814 = .sdata:0x8169708F; // type:object size:0x6 data:string
@16815 = .sdata:0x81697095; // type:object size:0x6 data:string
@16816 = .sdata:0x8169709B; // type:object size:0x6 data:string
@16817 = .sdata:0x816970A1; // type:object size:0x6 data:string
@16818 = .sdata:0x816970A7; // type:object size:0x6 data:string
@16819 = .sdata:0x816970AD; // type:object size:0x6 data:string
@16820 = .sdata:0x816970B3; // type:object size:0x6 data:string
@16827 = .sdata:0x816970B9; // type:object size:0x8 data:string
@16828 = .sdata:0x816970C1; // type:object size:0x8 data:string
@16829 = .sdata:0x816970C9; // type:object size:0x8 data:string
@16830 = .sdata:0x816970D1; // type:object size:0x8 data:string
@16831 = .sdata:0x816970D9; // type:object size:0x8 data:string
@16832 = .sdata:0x816970E1; // type:object size:0x8 data:string
@25504 = .sdata:0x816970E9; // type:object size:0x4 data:string
@25507 = .sdata:0x816970ED; // type:object size:0x4 data:string
@25617 = .sdata:0x816970F1; // type:object size:0x5 data:string
@25619 = .sdata:0x816970F6; // type:object size:0x4 data:string
@25626 = .sdata:0x816970FA; // type:object size:0x7 data:string
@25627 = .sdata:0x81697101; // type:object size:0x7 data:string
@17202 = .sdata:0x81697108; // type:object size:0x3 data:string
@17205 = .sdata:0x8169710B; // type:object size:0x6 data:string
@17206 = .sdata:0x81697111; // type:object size:0x7 data:string
@17207 = .sdata:0x81697118; // type:object size:0x6 data:string
@17208 = .sdata:0x8169711E; // type:object size:0x1
@17209 = .sdata:0x8169711F; // type:object size:0x6 data:string
@17210 = .sdata:0x81697125; // type:object size:0x6 data:string
@17211 = .sdata:0x8169712B; // type:object size:0x6 data:string
@17214 = .sdata:0x81697131; // type:object size:0x4 data:string
@17215 = .sdata:0x81697135; // type:object size:0x4 data:string
@17216 = .sdata:0x81697139; // type:object size:0x4 data:string
@17217 = .sdata:0x8169713D; // type:object size:0x4 data:string
@17218 = .sdata:0x81697141; // type:object size:0x4 data:string
@17219 = .sdata:0x81697145; // type:object size:0x4 data:string
@17220 = .sdata:0x81697149; // type:object size:0x4 data:string
@17221 = .sdata:0x8169714D; // type:object size:0x4 data:string
@17222 = .sdata:0x81697151; // type:object size:0x4 data:string
@17248 = .sdata:0x81697155; // type:object size:0x8 data:string
@17249 = .sdata:0x8169715D; // type:object size:0x6 data:string
@17253 = .sdata:0x81697163; // type:object size:0x7 data:string
@25725 = .sdata:0x8169716A; // type:object size:0x4 data:string
@26352 = .sdata:0x8169716E; // type:object size:0x5 data:string
@26503 = .sdata:0x81697173; // type:object size:0x7 data:string
@26504 = .sdata:0x8169717A; // type:object size:0x5 data:string
@26505 = .sdata:0x8169717F; // type:object size:0x5 data:string
@26506 = .sdata:0x81697184; // type:object size:0x5 data:string
@26625 = .sdata:0x8169718A; // type:object size:0x2
@26851 = .sdata:0x8169718C; // type:object size:0x3 data:string
@18811 = .sdata:0x8169718F; // type:object size:0x2 data:string
@18812 = .sdata:0x81697191; // type:object size:0x2 data:string
@18813 = .sdata:0x81697193; // type:object size:0x2 data:string
@18814 = .sdata:0x81697195; // type:object size:0x2 data:string
@18815 = .sdata:0x81697197; // type:object size:0x2 data:string
@27404 = .sdata:0x81697199; // type:object size:0x6 data:string
@27405 = .sdata:0x8169719F; // type:object size:0x6 data:string
@27406 = .sdata:0x816971A5; // type:object size:0x6 data:string
@27407 = .sdata:0x816971AB; // type:object size:0x6 data:string
@27556 = .sdata:0x816971B1; // type:object size:0x6 data:string
@27557 = .sdata:0x816971B7; // type:object size:0x6 data:string
@27558 = .sdata:0x816971BD; // type:object size:0x6 data:string
@27559 = .sdata:0x816971C3; // type:object size:0x6 data:string
@27560 = .sdata:0x816971C9; // type:object size:0x7 data:string
@27862 = .sdata:0x816971D0; // type:object size:0x3 data:string
@28152 = .sdata:0x816971D4; // type:object size:0x8 data:wstring
lbl_81696FE8 = .sdata:0x81696FE8; // type:object size:0x6 data:string
lbl_81696FEE = .sdata:0x81696FEE; // type:object size:0x6 data:string
lbl_81696FF4 = .sdata:0x81696FF4; // type:object size:0x6 data:string
lbl_81696FFA = .sdata:0x81696FFA; // type:object size:0x6 data:string
lbl_81697000 = .sdata:0x81697000; // type:object size:0x7 data:string
lbl_81697007 = .sdata:0x81697007; // type:object size:0x7 data:string
lbl_81697010 = .sdata:0x81697010; // type:object size:0x8 data:4byte
lbl_81697018 = .sdata:0x81697018; // type:object size:0x8 data:string
lbl_81697020 = .sdata:0x81697020; // type:object size:0x8 data:string
lbl_81697028 = .sdata:0x81697028; // type:object size:0x8 data:string
lbl_81697030 = .sdata:0x81697030; // type:object size:0x8 data:string
lbl_81697038 = .sdata:0x81697038; // type:object size:0x8 data:string
lbl_81697040 = .sdata:0x81697040; // type:object size:0x8 data:string
lbl_81697048 = .sdata:0x81697048; // type:object size:0x6 data:string
lbl_8169704E = .sdata:0x8169704E; // type:object size:0x6 data:string
lbl_81697054 = .sdata:0x81697054; // type:object size:0x6 data:string
lbl_8169705A = .sdata:0x8169705A; // type:object size:0x6 data:string
lbl_81697060 = .sdata:0x81697060; // type:object size:0x6 data:string
lbl_81697066 = .sdata:0x81697066; // type:object size:0x6 data:string
lbl_8169706C = .sdata:0x8169706C; // type:object size:0x7 data:string
lbl_81697073 = .sdata:0x81697073; // type:object size:0x7 data:string
lbl_8169707A = .sdata:0x8169707A; // type:object size:0x8 data:string
lbl_81697082 = .sdata:0x81697082; // type:object size:0x7 data:string
lbl_81697089 = .sdata:0x81697089; // type:object size:0x6 data:string
lbl_8169708F = .sdata:0x8169708F; // type:object size:0x6 data:string
lbl_81697095 = .sdata:0x81697095; // type:object size:0x6 data:string
lbl_8169709B = .sdata:0x8169709B; // type:object size:0x6 data:string
lbl_816970A1 = .sdata:0x816970A1; // type:object size:0x6 data:string
lbl_816970A7 = .sdata:0x816970A7; // type:object size:0x6 data:string
lbl_816970AD = .sdata:0x816970AD; // type:object size:0x6 data:string
lbl_816970B3 = .sdata:0x816970B3; // type:object size:0x6 data:string
lbl_816970B9 = .sdata:0x816970B9; // type:object size:0x8 data:string
lbl_816970C1 = .sdata:0x816970C1; // type:object size:0x8 data:string
lbl_816970C9 = .sdata:0x816970C9; // type:object size:0x8 data:string
lbl_816970D1 = .sdata:0x816970D1; // type:object size:0x8 data:string
lbl_816970D9 = .sdata:0x816970D9; // type:object size:0x8 data:string
lbl_816970E1 = .sdata:0x816970E1; // type:object size:0x8 data:string
lbl_816970E9 = .sdata:0x816970E9; // type:object size:0x4 data:string
lbl_816970ED = .sdata:0x816970ED; // type:object size:0x4 data:string
lbl_816970F1 = .sdata:0x816970F1; // type:object size:0x5 data:string
lbl_816970F6 = .sdata:0x816970F6; // type:object size:0x4 data:string
lbl_816970FA = .sdata:0x816970FA; // type:object size:0x7 data:string
lbl_81697101 = .sdata:0x81697101; // type:object size:0x7 data:string
lbl_81697108 = .sdata:0x81697108; // type:object size:0x3 data:string
lbl_8169710B = .sdata:0x8169710B; // type:object size:0x6 data:string
lbl_81697111 = .sdata:0x81697111; // type:object size:0x7 data:string
lbl_81697118 = .sdata:0x81697118; // type:object size:0x6 data:string
lbl_8169711E = .sdata:0x8169711E; // type:object size:0x1
lbl_8169711F = .sdata:0x8169711F; // type:object size:0x6 data:string
lbl_81697125 = .sdata:0x81697125; // type:object size:0x6 data:string
lbl_8169712B = .sdata:0x8169712B; // type:object size:0x6 data:string
lbl_81697131 = .sdata:0x81697131; // type:object size:0x4 data:string
lbl_81697135 = .sdata:0x81697135; // type:object size:0x4 data:string
lbl_81697139 = .sdata:0x81697139; // type:object size:0x4 data:string
lbl_8169713D = .sdata:0x8169713D; // type:object size:0x4 data:string
lbl_81697141 = .sdata:0x81697141; // type:object size:0x4 data:string
lbl_81697145 = .sdata:0x81697145; // type:object size:0x4 data:string
lbl_81697149 = .sdata:0x81697149; // type:object size:0x4 data:string
lbl_8169714D = .sdata:0x8169714D; // type:object size:0x4 data:string
lbl_81697151 = .sdata:0x81697151; // type:object size:0x4 data:string
lbl_81697155 = .sdata:0x81697155; // type:object size:0x8 data:string
lbl_8169715D = .sdata:0x8169715D; // type:object size:0x6 data:string
lbl_81697163 = .sdata:0x81697163; // type:object size:0x7 data:string
lbl_8169716A = .sdata:0x8169716A; // type:object size:0x4 data:string
lbl_8169716E = .sdata:0x8169716E; // type:object size:0x5 data:string
lbl_81697173 = .sdata:0x81697173; // type:object size:0x7 data:string
lbl_8169717A = .sdata:0x8169717A; // type:object size:0x5 data:string
lbl_8169717F = .sdata:0x8169717F; // type:object size:0x5 data:string
lbl_81697184 = .sdata:0x81697184; // type:object size:0x5 data:string
lbl_8169718A = .sdata:0x8169718A; // type:object size:0x2
lbl_8169718C = .sdata:0x8169718C; // type:object size:0x3 data:string
lbl_8169718F = .sdata:0x8169718F; // type:object size:0x2 data:string
lbl_81697191 = .sdata:0x81697191; // type:object size:0x2 data:string
lbl_81697193 = .sdata:0x81697193; // type:object size:0x2 data:string
lbl_81697195 = .sdata:0x81697195; // type:object size:0x2 data:string
lbl_81697197 = .sdata:0x81697197; // type:object size:0x2 data:string
lbl_81697199 = .sdata:0x81697199; // type:object size:0x6 data:string
lbl_8169719F = .sdata:0x8169719F; // type:object size:0x6 data:string
lbl_816971A5 = .sdata:0x816971A5; // type:object size:0x6 data:string
lbl_816971AB = .sdata:0x816971AB; // type:object size:0x6 data:string
lbl_816971B1 = .sdata:0x816971B1; // type:object size:0x6 data:string
lbl_816971B7 = .sdata:0x816971B7; // type:object size:0x6 data:string
lbl_816971BD = .sdata:0x816971BD; // type:object size:0x6 data:string
lbl_816971C3 = .sdata:0x816971C3; // type:object size:0x6 data:string
lbl_816971C9 = .sdata:0x816971C9; // type:object size:0x7 data:string
lbl_816971D0 = .sdata:0x816971D0; // type:object size:0x3 data:string
lbl_816971D4 = .sdata:0x816971D4; // type:object size:0x8 data:wstring
@12299 = .sdata:0x816971E0; // type:object size:0x5 scope:local data:string
@12302 = .sdata:0x816971E5; // type:object size:0x5 scope:local data:string
lbl_816971F0 = .sdata:0x816971F0; // type:object size:0x4 data:string
@@ -23275,7 +23227,7 @@ lbl_81698388 = .sdata:0x81698388; // type:object size:0x2 data:string
lbl_8169838C = .sdata:0x8169838C; // type:object size:0x4 data:string
lbl_81698390 = .sdata:0x81698390; // type:object size:0x1 data:byte
lbl_81698391 = .sdata:0x81698391; // type:object size:0x1 data:byte
lbl_81698394 = .sdata:0x81698394; // type:object size:0x4 data:string
lbl_81698394 = .sdata:0x81698394; // type:object size:0x2 data:string
lbl_81698398 = .sdata:0x81698398; // type:object size:0x2 data:string
lbl_8169839C = .sdata:0x8169839C; // type:object size:0x4
drvInitFunc = .sdata:0x816983A0; // type:object size:0x8 scope:local data:4byte

View File

@@ -766,9 +766,9 @@ config.libs = [
]
),
IPLSection("channelSelect", [
Object(Matching, "scene/channelSelect/iplChannelSelect.cpp"),
Object(Equivalent, "scene/channelSelect/iplChannelSelect.cpp"),
Object(Matching, "scene/channelSelect/iplClock.cpp"),
Object(Matching, "scene/channelSelect/iplChannelObj.cpp"),
Object(Equivalent, "scene/channelSelect/iplChannelObj.cpp"),
]
),
IPLSection("channelTitle", [

View File

@@ -43,7 +43,7 @@ private:
bool mIsPlaying; // 0xB2
bool mIsSetBuf; // 0xB3
bool mThreadRunning; // 0xB4
bool mbFillInCallback; // 0xB5
bool unk_0xB5; // 0xB5
WaveFileAiff mAiff; // 0xB8
WaveFileWav mWav; // 0xE8

View File

@@ -16,12 +16,12 @@ public:
AXVPB* getAXVPB() { return mpVPB; }
u32 getState() { return mState; }
u32 getUnk_0x08() { return unk_0x08; }
int getUpdateFlag() { return mUpdateFlag; }
int getUnk_0x0C() { return unk_0x0C; }
void setAXVPB(AXVPB* newVal) { mpVPB = newVal; }
void setState(u32 newVal) { mState = newVal; }
void setUnk_0x08(u32 newVal) { unk_0x08 = newVal; }
void setUpdateFlag(u32 newVal) { mUpdateFlag = newVal; }
void setUnk_0x0C(u32 newVal) { unk_0x0C = newVal; }
AXPBMIX* getMix() { return &mMix; }
@@ -31,7 +31,7 @@ private:
AXVPB* mpVPB; // 0x00
u32 mState; // 0x04
u32 unk_0x08; // 0x08
int mUpdateFlag; // 0x0c
int unk_0x0C; // 0x0c
AXPBMIX mMix; // 0x10
};

View File

@@ -266,32 +266,6 @@ namespace ipl {
};
#endif
#ifdef IPL_CHANNEL_SELECT_CPP
template <>
class HermiteIntp<f32> : public utility::FrameController {
public:
HermiteIntp() {}
virtual ~HermiteIntp() {}
void init(const f32& start, const f32& end, f32 maxFrame, f32 startTangent,
f32 endTangent, int playback = ANIM_TYPE_FORWARD, f32 speed = 1.0f) {
mStart = start;
mEnd = end;
utility::FrameController::init(playback, maxFrame, 0.0f, speed);
mStartTangent = startTangent;
mEndTangent = endTangent;
}
inline f32 get() const;
protected:
f32 mStart;
f32 mEnd;
f32 mStartTangent;
f32 mEndTangent;
};
#endif
#ifdef IPL_SD_CHANNEL_SELECT_CPP
} // namespace math
} // namespace ipl

View File

@@ -259,8 +259,8 @@ namespace ipl {
f32 mChanThumbOff_X; // 0xD0
f32 mChanThumbOff_Y; // 0xD4
math::VEC3 mOrthoTrans;
math::VEC2 mOrthoScale;
math::VEC3 unk_0xD8;
math::VEC2 unk_0xE4;
f32 mScaleAdjust; // 0xEC
int mDiskState; // 0xF0

View File

@@ -185,8 +185,8 @@ namespace ipl {
gui::PaneManager* mpGui; // 0x74
BOOL mbHovered[BTN_MAX]; // 0x78
u32 mPendingSceneId;
u32 mExitSeqStep;
u32 unk_0x90;
u32 unk_0x94;
static const char* smButtonName[BTN_MAX];
};

View File

@@ -365,8 +365,8 @@ namespace ipl {
int getChJumpChanPage() { return mChJumpPage; }
int getChJumpChanIndex() { return mChJumpIndex; }
void setDiskChannelReady(bool flag) { mbDiskChannelReady = flag; }
bool isDiskChannelReady() { return mbDiskChannelReady; }
void setUnk_0x1B81(bool flag) { unk_0x1B81 = flag; }
bool isUnk_0x1B81() { return unk_0x1B81; }
void resetChJumpLoad() { mbLoadedChJump = false; }
bool hasLoadedChJump() { return mbLoadedChJump; }
@@ -399,7 +399,7 @@ namespace ipl {
int mBS2State; // 0x1B7C
bool mbCanRefresh; // 0x1B80
bool mbDiskChannelReady;
bool unk_0x1B81;
u8* mpDiskIconBuf; // 0x1B84
u8* mpDiskBannerBuf; // 0x1B88

View File

@@ -33,7 +33,7 @@ namespace ipl {
u64 titleId; // 0x10
bool threadTerminated; // 0x18
bool unk_0x19;
bool mbHasNewMessage; // 0x1A
bool unk_0x1A;
EGG::ExpHeap* getHeap() { return heap; }
} CSData;

View File

@@ -125,9 +125,9 @@ namespace ipl {
mType = 2;
mbForceInvalid = 0;
KPADEnableDPD(chan);
mbPinching = 0;
mbWasPinching = 0;
mpKpadStatus = &status;
mbPinch = 0;
mbPrevPinch = 0;
mpStatus = &status;
}
Base(int chan, int type, KPADStatus& status) {
@@ -158,9 +158,9 @@ namespace ipl {
u32 mChan;
u32 mType;
u8 mbForceInvalid;
u8 mbPinching;
u8 mbWasPinching;
KPADStatus* mpKpadStatus;
u8 mbPinch;
u8 mbPrevPinch;
KPADStatus* mpStatus;
};
class Revolution : public Base {
@@ -206,7 +206,7 @@ namespace ipl {
virtual BOOL isValidDpdClassic() const;
private:
math::VEC2 mClassicCursorPos;
math::VEC2 mClassicCursor;
int mClassicCursorTimer;
};
@@ -273,9 +273,9 @@ namespace ipl {
KPADEnableDPD(chan);
mbPinching = 0;
mbWasPinching = 0;
mpKpadStatus = &arg1;
mbPinch = 0;
mbPrevPinch = 0;
mpStatus = &arg1;
}
virtual ~Base(); // 0x08
@@ -332,9 +332,9 @@ namespace ipl {
u32 mChan; // 0x14
u32 mType; // 0x18
u8 mbForceInvalid;
u8 mbPinching; // 0x1D
u8 mbWasPinching; // 0x1E
KPADStatus* mpKpadStatus; // 0x20
u8 mbPinch; // 0x1D
u8 mbPrevPinch; // 0x1E
KPADStatus* mpStatus; // 0x20
};
class Interface : public Base {
@@ -446,7 +446,7 @@ namespace ipl {
virtual BOOL isValidDpdClassic() const; // 0x8C
private:
math::VEC2 mClassicCursorPos;
math::VEC2 mClassicCursor;
int mClassicCursorTimer;
};

View File

@@ -27,11 +27,7 @@ namespace ipl {
void init(int type, f32 maxFrame, f32 minFrame, f32 speed = 1.0f);
void initFrame();
#ifdef IPL_CHANNEL_SELECT_CPP
virtual inline void calc();
#else
virtual void calc(); // 0x0C
#endif
void setMaxFrame(f32 value) { mMaxFrame = value; }
f32 getMaxFrame() const { return mMaxFrame; }

View File

@@ -1120,28 +1120,32 @@ static int __wpformatter(void* (*write_proc)(void*, const wchar_t*, size_t),
case 's':
if (format.argument_options == wchar_argument) {
wchar_t* wcs_ptr = va_arg(args, wchar_t*);
int wideLength;
if (wcs_ptr == NULL) {
wcs_ptr = L"";
}
if (format.alternate_form) {
num_chars = (unsigned char)*wcs_ptr++;
wchar_t first = *wcs_ptr++;
wideLength = (unsigned char)first;
if (format.precision_specified && num_chars > format.precision) {
num_chars = format.precision;
if (format.precision_specified && wideLength > format.precision) {
wideLength = format.precision;
}
} else if (format.precision_specified) {
num_chars = format.precision;
wideLength = format.precision;
if ((string_end = wmemchr(wcs_ptr, 0, num_chars)) != 0) {
num_chars = string_end - wcs_ptr;
if ((string_end = wmemchr((wchar_t*)wcs_ptr, 0, wideLength)) != 0) {
wideLength = string_end - wcs_ptr;
}
} else {
num_chars = wcslen(wcs_ptr);
wideLength = wcslen(wcs_ptr);
}
num_chars = wideLength;
buff_ptr = wcs_ptr;
break;
} else {
@@ -1152,7 +1156,7 @@ static int __wpformatter(void* (*write_proc)(void*, const wchar_t*, size_t),
}
if (format.alternate_form) {
num_chars = (unsigned char)*buff_ptr;
num_chars = (unsigned char)*(const wchar_t*)wcs_ptr;
if (format.precision_specified && num_chars > format.precision) {
num_chars = format.precision;

View File

@@ -163,12 +163,12 @@ typedef struct _ziGetParam {
ziWChar* candidates; // 0x18
ziU8 maxCandidates; // 0x1C
ziWChar firstCandidate; // 0x1E
ziU8 count; // 0x20 (EZTXGetParam.count)
ziU8 unk_0x20; // 0x20
ziU8 letters; // 0x21
ziU8 completion; // 0x22 (EZTXGetParam.completion)
ziU8* scratch; // 0x24
ziU32 unk_0x28; // 0x28
ziU8 letters; // 0x21
ziU8 count; // 0x22
ziU8* scratch; // 0x24
ziU32 unk_0x28; // 0x28
} ziGetParam;
typedef struct _ziLanguageEntry {
@@ -195,7 +195,7 @@ typedef struct _zi8DawgCtx {
ziU8* table; // 0x10
ziU8* p14; // 0x14
zi8DawgRec recs[0x32]; // 0x18
ziU32 endNode; // 0x338
ziU32 unk_0x338; // 0x338
} zi8DawgCtx;
typedef struct _ziUwdNode {
@@ -204,7 +204,7 @@ typedef struct _ziUwdNode {
} ziUwdNode;
struct __zi8_work_data_s {
ziU8 getcPhase; // 0x00
ziU8 unk_0x00;
ziU8 countOnly; // 0x01
ziU8 unk_0x02[2];
ziLanguageEntry* langEntries; // 0x04
@@ -212,26 +212,26 @@ struct __zi8_work_data_s {
ziU8 unk_0x09;
ziU8 maxWordLength;
ziU8 unk_0x0B;
ziU32 targetCount; // 0x0C
ziU32 unk_0x0C;
ziU32 unk_0x10;
ziU16 unk_0x14;
ziU8 cangjieEnabled; // 0x16
ziU8 zhPudMinPrefix;
ziU8 unk_0x17;
ziU8 subLanguage; // 0x18
ziU8 unk_0x19;
ziU16 separator; // 0x1A
ziU8 unk_0x1C[3];
ziU8 ignoreCase;
ziU8 unk_0x1F;
ziU16 unk_0x20[0x40];
ziU16 unk_0xA0[0x42];
ziU16* unk_0x124[1];
ziU8* unk_0x128;
ziU8 uwdPtrCount; // 0x12C
ziU8 unk_0x12C;
ziU8 unk_0x12D;
ziU8 uwdPrioritySort; // 0x12E
ziU8 unk_0x12E;
ziU8 unk_0x12F;
ziPtr uwdDicts[2]; // 0x130
ziU8 uwdDictCount; // 0x138
ziPtr unk_0x130[2];
ziU8 unk_0x138;
ziU8 unk_0x139[3];
ziU32 unk_0x13C;
ziU8 unk_0x140;
@@ -270,8 +270,8 @@ struct __zi8_work_data_s {
ziU8 formatCount;
ziU8 unk_0x1419;
ziU16 capacity; // 0x141A
ziU8 forceAltGraph; // 0x141C (lang FI + group 0xC -> graphTableId 0x10)
ziU8 advanceGroup; // 0x141D (nonzero: skip first dawg group)
ziU8 unk_0x141C;
ziU8 unk_0x141D;
ziU8 graphTableId; // 0x141E
ziU8 maxCnt; // 0x141F
ziU8 unk_0x1420[4];
@@ -309,26 +309,26 @@ struct __zi8_work_data_s {
ziWChar unk_0x1A92[0x41];
ziU8 unk_0x1B14;
ziU8 unk_0x1B15[3];
ziU16* unicodeMap; // 0x1B18
ziU16 unicodeRange1Min; // 0x1B1C
ziU16 unicodeRange1Max; // 0x1B1E
ziU16 unicodeRange2Min; // 0x1B20
ziU16 unicodeRange2Max; // 0x1B22
ziU8 unicodeMapSubLang; // 0x1B24
ziU16* unk_0x1B18;
ziU16 unk_0x1B1C;
ziU16 unk_0x1B1E;
ziU16 unk_0x1B20;
ziU16 unk_0x1B22;
ziU8 unk_0x1B24;
ziU8 unk_0x1B25[3];
union {
ziU32 word;
struct {
ziU32 msb : 1;
} bits;
} pyFuzzy; // 0x1B28
} unk_0x1B28;
union {
ziU32 word;
struct {
ziU32 msb : 1;
} bits;
} unk_0x1B2C;
ziU8 koAltTables; // 0x1B30
ziU8 unk_0x1B30;
ziU8 unk_0x1B31;
ziU16 unk_0x1B32;
ziU16 unk_0x1B34;

View File

@@ -21,7 +21,7 @@ ziS32 Zi8Punctuation(ziGetParam* param ZI_NEED_WORK) {
}
if (fc == 0) {
count++;
if (ZI_WORK->getcPhase == 0) {
if (ZI_WORK->unk_0x00 == 0) {
param->candidates[i++] = Zi8PunctTable[j];
if ((param->context & 0x10) != 0) {
param->candidates[i++] = 0x20;
@@ -33,7 +33,7 @@ ziS32 Zi8Punctuation(ziGetParam* param ZI_NEED_WORK) {
break;
}
} else {
if (count >= (ziS32)ZI_WORK->targetCount) {
if (count >= (ziS32)ZI_WORK->unk_0x0C) {
return count;
}
}
@@ -42,7 +42,7 @@ ziS32 Zi8Punctuation(ziGetParam* param ZI_NEED_WORK) {
}
j++;
}
if (ZI_WORK->getcPhase == 0) {
if (ZI_WORK->unk_0x00 == 0) {
param->letters = count;
}
return count;

View File

@@ -2,14 +2,14 @@
#include <zi8clib/zitypes.h>
ziU32 Zi8GetZHuwdPtr(ziU32* arg0, ziU16* arg1 ZI_NEED_WORK) {
if (ZI_WORK->uwdPtrCount == 0) {
if (ZI_WORK->unk_0x12C == 0) {
*arg0 = 0;
*arg1 = 0;
Zi8LogError(0x1A5, ZI_WORK);
return 0;
} else {
*arg1 = ZI_WORK->unk_0x124[ZI_WORK->uwdPtrCount - 1][1] / 3;
*arg0 = (ziU32)ZI_WORK->unk_0x124[ZI_WORK->uwdPtrCount - 1];
*arg1 = ZI_WORK->unk_0x124[ZI_WORK->unk_0x12C - 1][1] / 3;
*arg0 = (ziU32)ZI_WORK->unk_0x124[ZI_WORK->unk_0x12C - 1];
*arg0 += 8;
Zi8LogError(0x64, ZI_WORK);
return 1;

View File

@@ -425,8 +425,8 @@ static int zi8InternalGetZH(ziGetParam* request, ZiChineseOptions* options, ziPt
charset <<= 4;
skipCount = request->firstCandidate;
request->letters = 0;
request->completion = 0;
request->count = 0;
request->unk_0x20 = 0;
if (getMode != 7 && getMode != 10 && getMode != 8 && getMode != 9) {
Zi8PrepareMatch(request, &match, 0, work);
} else {
@@ -577,27 +577,27 @@ static int zi8InternalGetZH(ziGetParam* request, ZiChineseOptions* options, ziPt
if (getMode == 1) {
switch ((int)match.phon2[index] >> 9) {
case 24: case 25:
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->cANDch) ordinalIndex = 0xFDFF;
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->cANDch) ordinalIndex = 0xFDFF;
break;
case 26: case 27:
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->sANDsh) ordinalIndex = 0xFDFF;
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->sANDsh) ordinalIndex = 0xFDFF;
break;
case 28: case 29:
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->zANDzh) ordinalIndex = 0xFDFF;
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->zANDzh) ordinalIndex = 0xFDFF;
break;
case 56: case 59:
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->fANDh) ordinalIndex = 0xF9FF;
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->fANDh) ordinalIndex = 0xF9FF;
break;
case 38:
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->nANDl) ordinalIndex = 0xE5FF;
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->nANDl) ordinalIndex = 0xE5FF;
break;
case 43:
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->nANDl && ((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->lANDr) ordinalIndex = 0xE1FF;
else if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->lANDr) ordinalIndex = 0xF1FF;
else if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->nANDl) ordinalIndex = 0xE5FF;
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->nANDl && ((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->lANDr) ordinalIndex = 0xE1FF;
else if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->lANDr) ordinalIndex = 0xF1FF;
else if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->nANDl) ordinalIndex = 0xE5FF;
break;
case 44:
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->lANDr) ordinalIndex = 0xF1FF;
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->lANDr) ordinalIndex = 0xF1FF;
break;
}
} else {
@@ -650,13 +650,13 @@ static int zi8InternalGetZH(ziGetParam* request, ZiChineseOptions* options, ziPt
if (getMode == 1) {
switch (match.phon2[index] & 0x1F0) {
case 0x10: case 0x80: case 0x100:
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->anANDang) ordinalIndex = 0xFFF7;
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->anANDang) ordinalIndex = 0xFFF7;
break;
case 0x180:
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->enANDeng) ordinalIndex = 0xFFF7;
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->enANDeng) ordinalIndex = 0xFFF7;
break;
case 0x60:
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->inANDing) ordinalIndex = 0xFFF7;
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->inANDing) ordinalIndex = 0xFFF7;
break;
}
} else {
@@ -720,7 +720,7 @@ static int zi8InternalGetZH(ziGetParam* request, ZiChineseOptions* options, ziPt
return 0;
}
emitWords = 1;
if (request->completion) request->completion = request->elementCount;
if (request->count) request->count = request->elementCount;
}
if (!options->candidateMode) Zi8InitDupWordBuf(work);
records = (ziU8*)Zi8GetTableAddress(1, 0, work);
@@ -930,13 +930,13 @@ engine_search:
output[outputIndex++] = ' ';
if (outputIndex > outputLimit) {
request->letters = emittedCount;
request->count = emittedCount;
request->unk_0x20 = emittedCount;
goto engine_finish;
}
} else output[emittedCount++] = character;
if (emittedCount >= request->maxCandidates) {
request->letters = emittedCount;
request->count = emittedCount;
request->unk_0x20 = emittedCount;
goto engine_finish;
}
}
@@ -981,7 +981,7 @@ pud_candidate:
++rangeIndex;
}
if (rangeIndex == request->elementCount) {
if (!(request->context & 0x10)) request->completion = request->elementCount;
if (!(request->context & 0x10)) request->count = request->elementCount;
candidateStatus = 1;
character = currentSpelling[wordLength];
candidateOrdinal = 0xFFFF;
@@ -1108,13 +1108,13 @@ pud_charset:
output[outputIndex++] = ' ';
if (outputIndex > outputLimit) {
request->letters = emittedCount;
request->count = emittedCount;
request->unk_0x20 = emittedCount;
goto engine_finish;
}
} else output[emittedCount++] = character;
if (emittedCount >= request->maxCandidates) {
request->letters = emittedCount;
request->count = emittedCount;
request->unk_0x20 = emittedCount;
goto engine_finish;
}
}
@@ -1302,13 +1302,13 @@ context_word_lookup:
output[outputIndex++] = ' ';
if (outputIndex > outputLimit) {
request->letters = emittedCount;
request->count = emittedCount;
request->unk_0x20 = emittedCount;
goto engine_finish;
}
} else output[emittedCount++] = previousOrdinal;
if (emittedCount >= request->maxCandidates) {
request->letters = emittedCount;
request->count = emittedCount;
request->unk_0x20 = emittedCount;
goto engine_finish;
}
}
@@ -1321,7 +1321,7 @@ context_phrase_next:
}
}
context_results_done:
if (request->wordCharCount) request->count = emittedCount;
if (request->wordCharCount) request->unk_0x20 = emittedCount;
if (getOptions == 5) goto engine_finish;
if ((wordLength && (getMode == 1 || getMode == 2) && match.nCand > 1) ||
(wordLength && getMode == 0 && match.nSeg > 1)) {
@@ -1752,7 +1752,7 @@ tone_candidates:
}
}
user_character_search:
if (((struct __zi8_work_data_s*)work)->uwdPtrCount && (getMode != 0 || !firstPhoneticPass) &&
if (((struct __zi8_work_data_s*)work)->unk_0x12C && (getMode != 0 || !firstPhoneticPass) &&
!options->countOnly && (match.nCand <= 1 || (getMode != 1 && getMode != 2)) &&
Zi8GetZHuwdPtr(&userEntries, &userCount, work) && (getMode != 0 || match.nSeg <= 1)) {
userIndex = 0;
@@ -2572,7 +2572,7 @@ filtered_accept:
if (totalResults >= options->maxResults) goto engine_finish;
} else if (!options->countOnly) {
if (++((ZiChineseWork*)work)->duplicateIndex >= 64) ((ZiChineseWork*)work)->duplicateIndex = 0;
if (filteringMode == 4) request->count = emittedCount + 1;
if (filteringMode == 4) request->unk_0x20 = emittedCount + 1;
if (emitWords) {
++emittedCount;
outputIndex += rangeCount;

View File

@@ -32,7 +32,7 @@ ziU32 Zi8MatchROMdata0(ziWChar* elements, ziU8 count, ziU8 language,
if (language != context->lang || graphTable != context->key) records[0].key = 0;
if (count == 1 && mode != 0 && graphTable == 0xe) goto finish_graph;
if (status != 0) {
if (records[context->cnt - 1].node == (ziU8*)context->endNode) goto finish_graph;
if (records[context->cnt - 1].node == (ziU8*)context->unk_0x338) goto finish_graph;
for (index = 0; index < count; index++) {
if (records[index].key != elements[index] &&
(ziU16)records[index].attr != elements[index]) goto finish_graph;
@@ -82,7 +82,7 @@ check_keys:
records[0].node = ZiDAWGGetGraphInfo(context, keyData, (ziS16*)keys);
} else {
records[0].node = ZiDAWGGetGraph(context);
context->endNode = 0;
context->unk_0x338 = 0;
context->p14 = 0;
}
records[0].key = 0;
@@ -98,7 +98,7 @@ check_keys:
}
searching = 1;
current = &records[context->cnt - 1];
while (searching && context->cnt != 0 && current->node != (ziU8*)context->endNode) {
while (searching && context->cnt != 0 && current->node != (ziU8*)context->unk_0x338) {
if (capacity < context->cnt) goto finish_graph;
current->attr = ZiDAWGgetCHARattribute(context, current->node, ZI_WORK);
if (context->cnt <= count) {
@@ -159,7 +159,7 @@ ziU8* NextDawgGroup(ziU8* group, ziU8 language, ziPtr __zi8_work_data)
Zi8LogError(0x962,ZI_WORK);
return 0;
}
if (ZI_WORK->advanceGroup == 0) {
if (ZI_WORK->unk_0x141D == 0) {
return group;
}
}
@@ -231,7 +231,7 @@ unsigned int Zi8MatchROMdata2(ziWChar* elements, ziU8 count, ziU8 language,
if (status == 0) {
ZI_WORK->unk_0x1768 = 0;
ZI_WORK->matchOffset = 0;
if (group != 0 && *group == 0xc && language == 10 && ZI_WORK->forceAltGraph != 0) {
if (group != 0 && *group == 0xc && language == 10 && ZI_WORK->unk_0x141C != 0) {
ZI_WORK->graphTableId = 0x10;
} else {
ZI_WORK->graphTableId = 0;

View File

@@ -8,15 +8,11 @@ extern ziU8 Zi8SyllablesROMdata(ziWChar* keys, ziU8 count, ziU8 lang, ziWChar* o
ziU16 a, ziU8 b, ziU8* cntOut, ziU8 c ZI_NEED_WORK);
typedef struct _ziSwParam {
ziU8 countOnly; // 0x00 - same layout as ZiCandidateOptions
ziU8 maxWordLength; // 0x01
ziU8 lookupMode; // 0x02
ziU8 suffixOnly; // 0x03
ziU8 controls[8]; // 0x04
ziS32 maxCount; // 0x0C - signed view of ZiCandidateOptions.maxCount
ziU16 capacity; // 0x10
ziU8 minWordLength; // 0x12
ziU8 flags; // 0x13
ziU8 flag;
ziU8 unk_0x01[0xB];
ziS32 count;
ziU16 cap;
ziU8 unk_0x12[2];
} ziSwParam;
ziU32 Zi8GetSyllablesCandidates(ziGetParam* param, ziSwParam* sw ZI_NEED_WORK) {
@@ -58,16 +54,16 @@ ziU32 Zi8GetSyllablesCandidates(ziGetParam* param, ziSwParam* sw ZI_NEED_WORK) {
goto end;
}
if (sw->countOnly != 0 || (param->getOptions & 0xFD) != 0x81) {
if (sw->flag != 0 || (param->getOptions & 0xFD) != 0x81) {
out = buf;
rem = 0x40;
} else {
out = (ziWChar*)param->candidates;
rem = sw->capacity - 1;
rem = sw->cap - 1;
}
if ((param->getOptions & 0xFD) == 0x80) {
u28 = (ziU8*)param->candidates;
rem = sw->capacity - 1;
rem = sw->cap - 1;
}
if (rem <= param->elementCount) {
@@ -98,8 +94,8 @@ ziU32 Zi8GetSyllablesCandidates(ziGetParam* param, ziSwParam* sw ZI_NEED_WORK) {
firstCand--;
goto L5dc;
}
if (sw->countOnly != 0) {
if (++count >= sw->maxCount) goto end;
if (sw->flag != 0) {
if (++count >= sw->count) goto end;
goto L5dc;
}
@@ -151,8 +147,8 @@ L464b:
firstCand--;
goto L560;
}
if (sw->countOnly != 0) {
if (++count >= sw->maxCount) goto end;
if (sw->flag != 0) {
if (++count >= sw->count) goto end;
goto L560;
}
if (u28 != 0) {
@@ -206,7 +202,7 @@ dec:
goto L560;
end:
if (sw->countOnly != 0) {
if (sw->flag != 0) {
param->letters = 0;
} else {
param->letters = (ziU8)count;

View File

@@ -32,9 +32,9 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
ziBool Zi8ZHsetPYfuzzyPairs(ziFuzzyPYPairs pairs ZI_NEED_WORK) {
if (pairs.ziDefault) {
ZI_WORK->pyFuzzy.word = *(const ziU32*)&Zi8PYdefaultFuzzyPairs;
ZI_WORK->unk_0x1B28.word = *(const ziU32*)&Zi8PYdefaultFuzzyPairs;
} else {
ZI_WORK->pyFuzzy.word = *(ziU32*)&pairs;
ZI_WORK->unk_0x1B28.word = *(ziU32*)&pairs;
}
return 1;
}
@@ -324,7 +324,7 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
saved.savedCandidates = 0;
saved.restoreCandidates = 0;
if (options->lookupMode == '\0') {
if (((ZI_WORK->getcPhase == '\t') && (parameters->elementCount != 0)) &&
if (((ZI_WORK->unk_0x00 == '\t') && (parameters->elementCount != 0)) &&
(((parameters->elements[parameters->elementCount - 1] == 0xEFF8 &&
((ziU8)Zi8AlphaSignature(parameters,options->countOnly,ZI_WORK) != 0)) ||
((parameters->elements[parameters->elementCount - 1] == 0xEF04 &&
@@ -339,22 +339,22 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
if ((parameters->elementCount == 1) && (parameters->firstCandidate == 0)) {
switch (parameters->language) {
case 1:
if ((ZI_WORK->getcPhase == '\0') || (ZI_WORK->countOnly == options->countOnly)) {
switch(ZI_WORK->getcPhase) {
if ((ZI_WORK->unk_0x00 == '\0') || (ZI_WORK->countOnly == options->countOnly)) {
switch(ZI_WORK->unk_0x00) {
case '\0':
if (parameters->elements[0] == 0xEF04) {
ZI_WORK->countOnly = options->countOnly;
ZI_WORK->getcPhase = '\x01';
ZI_WORK->unk_0x00 = '\x01';
}
break;
case '\x02':
case '\x04':
case '\x06':
if (parameters->elements[0] == 0xEF04) {
++ZI_WORK->getcPhase;
++ZI_WORK->unk_0x00;
}
else {
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
break;
case '\x01':
@@ -362,17 +362,17 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
case '\x05':
case '\a':
if (parameters->elements[0] == 0xEF01) {
++ZI_WORK->getcPhase;
++ZI_WORK->unk_0x00;
}
else {
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
break;
case '\b':
case '\t':
if ((parameters->elements[0] == 0xEF04) &&
((ziU8)Zi8ZhSignature(parameters,options->countOnly,ZI_WORK) != 0)) {
ZI_WORK->getcPhase = '\t';
ZI_WORK->unk_0x00 = '\t';
candidateCount = (unsigned int)parameters->letters;
if (options->countOnly != '\0') {
parameters->letters = 0;
@@ -381,10 +381,10 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
return candidateCount;
}
default:
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
if ((ZI_WORK->getcPhase == '\0') && (parameters->elements[0] == 0xEF04)) {
ZI_WORK->getcPhase = '\x01';
if ((ZI_WORK->unk_0x00 == '\0') && (parameters->elements[0] == 0xEF04)) {
ZI_WORK->unk_0x00 = '\x01';
}
}
break;
@@ -400,75 +400,75 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
break;
case 0x11:
default:
if ((ZI_WORK->getcPhase == '\0') || (ZI_WORK->countOnly == options->countOnly)) {
switch(ZI_WORK->getcPhase) {
if ((ZI_WORK->unk_0x00 == '\0') || (ZI_WORK->countOnly == options->countOnly)) {
switch(ZI_WORK->unk_0x00) {
case '\0':
if (parameters->elements[0] == 0xEFF2) {
ZI_WORK->countOnly = options->countOnly;
ZI_WORK->getcPhase = '\x01';
ZI_WORK->unk_0x00 = '\x01';
}
break;
case '\x01':
if (parameters->elements[0] == 0xEFF3) {
ZI_WORK->getcPhase = '\x02';
ZI_WORK->unk_0x00 = '\x02';
}
else {
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
break;
case '\x02':
if (parameters->elements[0] == 0xEFF5) {
ZI_WORK->getcPhase = '\x03';
ZI_WORK->unk_0x00 = '\x03';
}
else {
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
break;
case '\x03':
if (parameters->elements[0] == 0xEFF7) {
ZI_WORK->getcPhase = '\x04';
ZI_WORK->unk_0x00 = '\x04';
}
else {
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
break;
case '\x04':
if (parameters->elements[0] == 0xEFF8) {
ZI_WORK->getcPhase = '\x05';
ZI_WORK->unk_0x00 = '\x05';
}
else {
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
break;
case '\x05':
if (parameters->elements[0] == 0xEFF9) {
ZI_WORK->getcPhase = '\x06';
ZI_WORK->unk_0x00 = '\x06';
}
else {
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
break;
case '\x06':
if (parameters->elements[0] == 0xEFF2) {
ZI_WORK->getcPhase = '\a';
ZI_WORK->unk_0x00 = '\a';
}
else {
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
break;
case '\a':
if (parameters->elements[0] == 0xEFF5) {
ZI_WORK->getcPhase = '\b';
ZI_WORK->unk_0x00 = '\b';
}
else {
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
break;
case '\b':
case '\t':
if ((parameters->elements[0] == 0xEFF8) &&
((ziU8)Zi8AlphaSignature(parameters,options->countOnly,ZI_WORK) != 0)) {
ZI_WORK->getcPhase = '\t';
ZI_WORK->unk_0x00 = '\t';
candidateCount = (unsigned int)parameters->letters;
if (options->countOnly != '\0') {
parameters->letters = 0;
@@ -477,17 +477,17 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
return candidateCount;
}
default:
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
if ((ZI_WORK->getcPhase == '\0') && (parameters->elements[0] == 0xEFF2)) {
ZI_WORK->getcPhase = '\x01';
if ((ZI_WORK->unk_0x00 == '\0') && (parameters->elements[0] == 0xEFF2)) {
ZI_WORK->unk_0x00 = '\x01';
}
}
break;
}
}
else if (1 < parameters->elementCount) {
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
}
ZI_WORK->subLanguage = parameters->subLanguage;
@@ -521,7 +521,7 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
((ziU8)Zi8IsCharacter(parameters->elements[0],ZI_WORK) != 0)))) {
saved.convertedElementCount = Zi8GetCharInfo(parameters->elements[0],characterInfo,0x10,1,ZI_WORK);
if (saved.convertedElementCount == 0) {
parameters->letters = parameters->completion = parameters->count = 0;
parameters->letters = parameters->count = parameters->unk_0x20 = 0;
candidateCount = 0;
error = 900;
}
@@ -540,7 +540,7 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
parameters->elements = saved.savedElements;
parameters->elementCount = saved.savedElementCount;
parameters->getMode = saved.savedGetMode;
parameters->completion = 1;
parameters->count = 1;
}
}
else if ((parameters->language == 1) && (parameters->getMode == 0xf)) {

View File

@@ -20,10 +20,10 @@ ziU8 Zi8InitializeDynamic(ziLanguageEntry* langEntries ZI_NEED_WORK) {
ZI_WORK->unk_0x09 = 1;
ZI_WORK->maxWordLength = 0xFF;
ZI_WORK->unk_0x10 = 0x64;
*(ziU16*)&ZI_WORK->targetCount = 0xFFFF;
*(ziU16*)&ZI_WORK->unk_0x0C = 0xFFFF;
ZI_WORK->separator = 0x20;
ZI_WORK->unk_0x1C[2] = 0;
ZI_WORK->koAltTables = 0;
ZI_WORK->unk_0x1B30 = 0;
ZI_WORK->unk_0x1B3A = 0;
ZI_WORK->unk_0x1B36 = 0;
ZI_WORK->unk_0x1B32 = 0;
@@ -47,14 +47,14 @@ ziU8 Zi8InitializeDynamic(ziLanguageEntry* langEntries ZI_NEED_WORK) {
ZI_WORK->capacity = 0x100;
Zi8SetLatinSearchOrder(0, 0, ZI_WORK);
ZADP_Zi8SetPDremoveOpt(1, ZI_WORK);
ZI_WORK->zhPudMinPrefix = 5;
ZI_WORK->unk_0x17 = 5;
ZI_WORK->cangjieEnabled = Zi8GetFormatVersion(1, ZI_WORK) & 2;
ZI_WORK->pyFuzzy.bits.msb = 1;
ZI_WORK->unk_0x1B28.bits.msb = 1;
ZI_WORK->unk_0x1B2C.bits.msb = 1;
zyFuzzy = ZI_WORK->unk_0x1B2C.word;
pzyFuzzy = &zyFuzzy;
Zi8ZHsetZYfuzzyPairs(pzyFuzzy, ZI_WORK);
pyFuzzy = ZI_WORK->pyFuzzy.word;
pyFuzzy = ZI_WORK->unk_0x1B28.word;
ppyFuzzy = &pyFuzzy;
Zi8ZHsetPYfuzzyPairs(ppyFuzzy, ZI_WORK);
Zi8SetParentalControls(2, ZI_WORK);

View File

@@ -65,19 +65,19 @@ ziU16 Zi8Uni2Ptr(ziU16 ch, ziE12* buf ZI_NEED_WORK) {
}
}
e = (ziU8*)table;
if (WORKP->unicodeMap != ZI8_NULL && WORKP->unicodeMapSubLang == WORKP->subLanguage) {
if ((ziU16)ch >= WORKP->unicodeRange1Min && (ziU16)ch <= WORKP->unicodeRange1Max) {
i = (ziU16)(ch - WORKP->unicodeRange1Min);
if (WORKP->unk_0x1B18 != ZI8_NULL && WORKP->unk_0x1B24 == WORKP->subLanguage) {
if ((ziU16)ch >= WORKP->unk_0x1B1C && (ziU16)ch <= WORKP->unk_0x1B1E) {
i = (ziU16)(ch - WORKP->unk_0x1B1C);
goto map;
}
if ((ziU16)ch >= WORKP->unicodeRange2Min && (ziU16)ch <= WORKP->unicodeRange2Max) {
i = (ziU16)(WORKP->unicodeRange1Max + (ch - WORKP->unicodeRange2Min) -
WORKP->unicodeRange1Min + 1);
if ((ziU16)ch >= WORKP->unk_0x1B20 && (ziU16)ch <= WORKP->unk_0x1B22) {
i = (ziU16)(WORKP->unk_0x1B1E + (ch - WORKP->unk_0x1B20) -
WORKP->unk_0x1B1C + 1);
goto map;
}
return 0xFFFF;
map:
i = WORKP->unicodeMap[i];
i = WORKP->unk_0x1B18[i];
if (i != 0xFFFF) {
e = (ziU8*)table + i * 0xC;
if (hi == e[6] && lo == e[7]) {

View File

@@ -102,7 +102,7 @@ ziU32 Zi8MatchPUDdata_ZHS(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar*
wordSize = *word++;
entrySize = wordSize;
if (language == 1) {
if (ZI_WORK->zhPudMinPrefix > *word) goto next;
if (ZI_WORK->unk_0x17 > *word) goto next;
wordSize--;
entrySize--;
word++;
@@ -126,7 +126,7 @@ matchText:
if (pattern[index] != Zi8ConvertUC2Key(word[index], language, __zi8_work_data)) goto next;
} else {
folded = Zi8ConvertUC2WC(word[index], language, __zi8_work_data);
if (folded != pattern[index] && (!ZI_WORK->ignoreCase || !Zi8ChangeCharCase(0, &folded, language, __zi8_work_data) || folded != pattern[index])) goto next;
if (folded != pattern[index] && (!ZI_WORK->unk_0x1F || !Zi8ChangeCharCase(0, &folded, language, __zi8_work_data) || folded != pattern[index])) goto next;
}
}
matched:

View File

@@ -41,7 +41,7 @@ ziBool Zi8_81480224(ziUserWord* word ZI_NEED_WORK) {
current = ZI_WORK->uwdList;
while (current != 0) {
candidate = (ziUserWord*)current->word;
if (ZI_WORK->uwdPrioritySort == 1 && candidate->priority < word->priority) break;
if (ZI_WORK->unk_0x12E == 1 && candidate->priority < word->priority) break;
if (candidate->length == length) {
position = 0;
while (position < length) {
@@ -105,11 +105,11 @@ ziU8 Zi8MatchUWDdata(ziWChar* pattern, ziU8 length, ziWChar* currentWord, ziU16
int position;
int prefixLength;
Zi8LogError(100, __zi8_work_data);
if (!(ZI_WORK->uwdDictCount <= 2 && ZI_WORK->uwdDictCount != 0 && ZI_WORK->uwdDicts[ZI_WORK->uwdDictCount - 1] != 0)) {
if (!(ZI_WORK->unk_0x138 <= 2 && ZI_WORK->unk_0x138 != 0 && ZI_WORK->unk_0x130[ZI_WORK->unk_0x138 - 1] != 0)) {
Zi8ReplaceLastError(0x19C, __zi8_work_data);
return 0;
}
dictionary = ZI_WORK->uwdDicts[ZI_WORK->uwdDictCount - 1];
dictionary = ZI_WORK->unk_0x130[ZI_WORK->unk_0x138 - 1];
if (continuation != 0) {
text = (ziU8*)Zi8_814803F4(__zi8_work_data);
entryLength = 0;
@@ -148,7 +148,7 @@ ziU8 Zi8MatchUWDdata(ziWChar* pattern, ziU8 length, ziWChar* currentWord, ziU16
folded = currentWord[position];
ZI_WORK->unk_0x141[previousOffset] = Zi8ConvertWC2UC(folded, language, __zi8_work_data);
ZI_WORK->unk_0x184[previousOffset] = 0;
if (ZI_WORK->ignoreCase != 0) {
if (ZI_WORK->unk_0x1F != 0) {
if (!Zi8ChangeCharCase(1, &folded, language, __zi8_work_data)) Zi8ChangeCharCase(0, &folded, language, __zi8_work_data);
ZI_WORK->unk_0x184[previousOffset] = Zi8ConvertWC2UC(folded, language, __zi8_work_data);
}
@@ -192,7 +192,7 @@ next:
if (pattern[position] != Zi8ConvertUC2Key(text[position], language, __zi8_work_data)) goto next;
} else {
folded = Zi8ConvertUC2WC(text[position], language, __zi8_work_data);
if (folded != pattern[position] && (!ZI_WORK->ignoreCase || !Zi8ChangeCharCase(0, &folded, language, __zi8_work_data) || folded != pattern[position])) goto next;
if (folded != pattern[position] && (!ZI_WORK->unk_0x1F || !Zi8ChangeCharCase(0, &folded, language, __zi8_work_data) || folded != pattern[position])) goto next;
}
}
if (ZI_WORK->unk_0x140 != 0) {

View File

@@ -199,10 +199,10 @@ checkEntry:
}
result = graph + (ziU32)entry[4] * 0x10000 + (((ziU16)entry[5] << 8) + entry[6]);
((zi8DawgCtx*)context)->endNode =
((zi8DawgCtx*)context)->unk_0x338 =
graph + (ziU32)entry[7] * 0x10000 + (((ziU16)entry[8] << 8) + entry[9]);
if (((zi8DawgCtx*)context)->endNode == graph) {
((zi8DawgCtx*)context)->endNode = 0;
if (((zi8DawgCtx*)context)->unk_0x338 == graph) {
((zi8DawgCtx*)context)->unk_0x338 = 0;
}
if ((((ziU16)entry[0] << 8) + entry[1]) == 0) {

View File

@@ -52,7 +52,7 @@ ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument,
result = 0;
state.characterIndex = 0xFF;
state.currentCandidate = params->firstCandidate;
params->letters = params->completion = params->count = 0;
params->letters = params->count = params->unk_0x20 = 0;
if ((argument != 0) && (*argument != 0)) {
Zi8LogError(0x7D0, workData);
return 0;
@@ -104,7 +104,7 @@ ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument,
state.characterIndex,
(state.elementIndex - currentCharacter) - 1,
workData);
if ((((struct __zi8_work_data_s*)workData)->koAltTables == 1)) {
if ((((struct __zi8_work_data_s*)workData)->unk_0x1B30 == 1)) {
switch (state.characterIndex) {
case 1:
selectedTable = (ziU8*)Zi8GetTableAddress(ZI8_LANG_KO, 0x1E, workData);
@@ -179,13 +179,13 @@ ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument,
} else {
params->candidates[(ziU8)result] =
((ziU16)selectedTable[state.nextIndex * 2] << 8) | (selectedTable + state.nextIndex * 2)[1];
if ((state.tableCount6 != 0) && (((struct __zi8_work_data_s*)workData)->koAltTables == 0)) {
if ((state.tableCount6 != 0) && (((struct __zi8_work_data_s*)workData)->unk_0x1B30 == 0)) {
params->candidates[(ziU8)result] += state.inputIndex * state.tableCount3;
}
result++;
}
if (currentCharacter == 0) {
params->completion = state.matched + 1;
params->count = state.matched + 1;
}
currentCharacter += state.matched;
} else {
@@ -199,14 +199,14 @@ ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument,
state.currentCandidate--;
}
if (currentCharacter == 0) {
params->completion = 1;
params->count = 1;
}
} else {
for (state.index = 0; state.index < state.tableCount31; state.index++) {
if ((state.table31[(state.index * 3)] == buffer[currentCharacter]) &&
((state.table31 + state.index * 3)[1] == buffer[currentCharacter + 1])) {
if (currentCharacter == 0) {
params->completion = 1;
params->count = 1;
}
params->candidates[(ziU8)result] =
state.tableCount0 + (state.table31 + state.index * 3)[2];
@@ -218,7 +218,7 @@ ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument,
if (state.index == state.tableCount31) {
if ((params->candidates[(ziU8)result] = buffer[currentCharacter]) < 0xFF) {
if (currentCharacter == 0) {
params->completion = 1;
params->count = 1;
}
params->candidates[(ziU8)result] += state.tableCount0;
result++;
@@ -249,7 +249,7 @@ ziU8 Zi8MatchKoreanSequence(ziU16* resultIndex, ziU16* input, ziU8 type, ziU16 c
firstCharacter = input[0];
mappedCharacter = 0xFF;
if (((struct __zi8_work_data_s*)workData)->koAltTables == 0) {
if (((struct __zi8_work_data_s*)workData)->unk_0x1B30 == 0) {
table = (ziU8*)Zi8GetTableAddress(ZI8_LANG_KO, 3, workData);
tableCount = Zi8GetTableCount(ZI8_LANG_KO, 3, workData);
} else {

View File

@@ -309,7 +309,7 @@ ziU32 Zi8GetKOcandidates(ziGetParam* param, ZiKoreanCandidateOptions* options ZI
}
if (options->countOnly == 0) {
param->letters = 0;
param->count = 0;
param->unk_0x20 = 0;
param->candidates[0] = 0;
}
Zi8LogError(100, ZI_WORK);
@@ -365,22 +365,22 @@ match_word:
return options->maxCount;
}
param->candidates[search.candidateCount++] = search.character;
++param->count;
++param->unk_0x20;
if (++param->letters >= param->maxCandidates) {
return param->letters;
}
}
} else {
param->candidates[search.candidateCount++] = search.character;
++param->count;
++param->unk_0x20;
if (++param->letters >= param->maxCandidates) {
Zi8_814834AC(param, &search.remainingCandidates, &search.candidateCount, &search.inserted, ZI_WORK);
param->count = search.candidateCount;
param->unk_0x20 = search.candidateCount;
param->letters = search.candidateCount;
if (search.candidateCount < param->maxCandidates) goto skip_word;
if (options->countOnly != 0) {
if ((search.prefixCount += search.candidateCount) >= (ziS32)options->maxCount) return options->maxCount;
param->count = 0;
param->unk_0x20 = 0;
param->letters = 0;
search.candidateCount = 0;
} else {
@@ -395,17 +395,17 @@ match_word:
if ((search.candidateIndex == search.candidateCount) &&
(Zi8_814833F0(param, search.character, ZI_WORK) == 0)) {
param->candidates[search.candidateCount++] = search.character;
++param->count;
++param->unk_0x20;
if (++param->letters < param->maxCandidates) {
goto skip_word;
}
Zi8_814834AC(param, &search.remainingCandidates, &search.candidateCount, &search.inserted, ZI_WORK);
param->count = search.candidateCount;
param->unk_0x20 = search.candidateCount;
param->letters = search.candidateCount;
if (search.candidateCount < param->maxCandidates) goto skip_word;
if (options->countOnly != 0) {
if ((search.prefixCount += search.candidateCount) >= (ziS32)options->maxCount) return options->maxCount;
param->count = 0;
param->unk_0x20 = 0;
param->letters = 0;
search.candidateCount = 0;
} else {
@@ -435,7 +435,7 @@ search_table:
if ((search.prefixCount += search.candidateCount) >= (ziS32)options->maxCount) return options->maxCount;
search.resultCount = search.prefixCount;
}
param->count = search.candidateCount;
param->unk_0x20 = search.candidateCount;
param->letters = search.candidateCount;
}
if (param->elementCount > 9) {

View File

@@ -45,7 +45,7 @@ posEntry:
if (pattern[position] == Zi8ConvertWC2Key(word[position], language, __zi8_work_data)) continue;
break;
} else if (word[position] != pattern[position]) {
if (!ZI_WORK->ignoreCase || language == 1) break;
if (!ZI_WORK->unk_0x1F || language == 1) break;
folded = pattern[position];
if (!Zi8ChangeCharCase(1, &folded, language, __zi8_work_data) || folded != word[position]) break;
}

View File

@@ -239,7 +239,7 @@ ziBool Zi8PrepareMatch(ziGetParam* request, ziMatchParam* match, ziU8 skipMode Z
}
if ((request->getMode == '\x01') || (request->getMode == '\f')) {
match->nCand = Zi8GetPyPhonetic(request->elements,elementCount,match->phon,match->phon2,
&request->completion,&match->first,&match->first2,__zi8_work_data);
&request->count,&match->first,&match->first2,__zi8_work_data);
}
else {
initial = 0;
@@ -250,7 +250,7 @@ ziBool Zi8PrepareMatch(ziGetParam* request, ziMatchParam* match, ziU8 skipMode Z
previousFinal = 0;
buffers.phoneticInput = request->elements;
match->nCand = 0;
request->completion = request->elementCount;
request->count = request->elementCount;
phoneticLength = 1;
for (index = 0; index < elementCount; index++) {
stroke = Zi8GetBpmfPhonetic(buffers.phoneticInput,phoneticLength,&initial,&final,&bestInitial,&bestFinal,
@@ -287,7 +287,7 @@ savePhonetic:
goto savePhonetic;
}
if (match->nCand == 1) {
request->completion = phoneticLength - 1;
request->count = phoneticLength - 1;
}
buffers.phoneticInput = buffers.phoneticInput + phoneticLength - 1;
phoneticLength = 0;
@@ -306,7 +306,7 @@ savePhonetic:
}
}
if (((request->context & contextMask) != 0) &&
((1 < match->nCand || (request->completion != elementCount)))) {
((1 < match->nCand || (request->count != elementCount)))) {
match->phon[0] = 0xFFFF;
match->phon2[0] = 0xFFFF;
match->nCand = 0;

View File

@@ -152,10 +152,10 @@ u32 __SCGetConfBufSize();
typedef struct SC_BT_DEV_INFO {
u8 devName[20]; // 0x00
u8 pad_0x14; // 0x14
u8 pad_0x15[0xB]; // 0x15
u8 unk_0x14;
u8 unk_0x15[0xB];
LINK_KEY linkKey; // 0x20
u8 pad_0x30[0x10]; // 0x30
u8 unk_0x30[0x10];
} SC_BT_DEV_INFO;
typedef struct SCBtDeviceInfo {

View File

@@ -10,7 +10,7 @@ extern "C" {
#endif
typedef void (*USBCallback)(IOSError result, void* arg);
typedef void (*USBIsoCallback)(IOSError err, void* isoArg, void* cbArg);
typedef void (*USBIsoCallback)(IOSError err, void* unkIsoArg, void* cbArg);
IOSError IUSB_OpenLib();
IOSError IUSB_CloseLib();

View File

@@ -133,11 +133,11 @@ typedef struct WPADExtConfig {
union {
struct WPADFSConfig {
s16 stickXCenter; // 0x00
s16 stickXMin; // 0x02
s16 stickXMax; // 0x04
s16 unk_0x02; // 0x02
s16 unk_0x04; // 0x04
s16 stickYCenter; // 0x06
s16 stickYMin; // 0x08
s16 stickYMax; // 0x0A
s16 unk_0x08; // 0x08
s16 unk_0x0A; // 0x0A
s16 accX0g; // 0x0C
s16 accY0g; // 0x0E
@@ -150,18 +150,18 @@ typedef struct WPADExtConfig {
struct WPADCLConfig {
s16 lStickXCenter; // 0x00
s16 lStickXMin; // 0x02
s16 lStickXMax; // 0x04
s16 unk_0x02; // 0x02
s16 unk_0x04; // 0x04
s16 lStickYCenter; // 0x06
s16 lStickYMin; // 0x08
s16 lStickYMax; // 0x0A
s16 unk_0x08; // 0x08
s16 unk_0x0A; // 0x0A
s16 rStickXCenter; // 0x0C
s16 rStickXMin; // 0x0E
s16 rStickXMax; // 0x10
s16 unk_0x0E; // 0x0E
s16 unk_0x10; // 0x10
s16 rStickYCenter; // 0x12
s16 rStickYMin; // 0x14
s16 rStickYMax; // 0x16
s16 unk_0x14; // 0x14
s16 unk_0x16; // 0x16
u8 triggerLZero; // 0x18
u8 triggerRZero; // 0x19
@@ -171,7 +171,7 @@ typedef struct WPADExtConfig {
typedef struct WPADCB {
WPADGameInfo gameInfo; // 0x00
s32 gameInfoStatus[2]; // 0x38
s32 unk_0x38[2];
u8 rxBufMain[RX_BUFFER_SIZE]; // 0x40
u8 rxBufs[2][RX_BUFFER_SIZE]; // 0xA0
WPADCommandQueue stdCmdQueue; // 0x160
@@ -223,7 +223,7 @@ typedef struct WPADCB {
u16 filterDiffExt; // 0x900
u16 filterSameExt; // 0x902
s64 lastReportSendTime; // 0x908
u8 suppressDisconnect; // 0x910
u8 unk_0x910;
u8 calibrated; // 0x911
u16 comboHeld; // 0x912
u8 encryptionKey[16]; // 0x914

View File

@@ -26,7 +26,7 @@ typedef struct USBKBDCmdLED {
typedef struct USBKBDCmdLEDAsync {
USBKBDCmdLED base; // 0x00
u8 pad_0x08[0x10]; // 0x08
u8 unk_0x08[0x10];
USBKBDCmdLEDCallback cb; // 0x18
void* cbArg; // 0x1C
} USBKBDCmdLEDAsync;

View File

@@ -66,16 +66,16 @@
typedef struct
{
HC_BT_HDR *p_rx_msg[3]; // 0x00
UINT16 bytes_left[3]; // 0x0c
UINT16 buf_size; // 0x12
UINT8 pkt_type[3]; // 0x14
UINT8 len_hi[3]; // 0x17
UINT8 rx_state[3]; // 0x1a
HC_BT_HDR *at_0x00[3]; // 0x00
UINT16 at_0x0c[3]; // 0x0c
UINT16 at_0x12; // 0x12
UINT8 at_0x14[3]; // 0x14
UINT8 at_0x17[3]; // 0x17
UINT8 at_0x1a[3]; // 0x1a
char pad4_[1]; // 0x1d
UINT8 open_state; // 0x1e
UINT8 task_id; // 0x1f
UINT8 mbox; // 0x20
UINT8 at_0x1e; // 0x1e
UINT8 at_0x1f; // 0x1f
UINT8 at_0x20; // 0x20
char pad5_[2]; // 0x21
/* 1 byte padding */
} tHCISU_H2_CB; // size 0x24
@@ -135,7 +135,7 @@ UINT16 hcisu_h2_receive_msg(UINT16 pipe, tHCISU_H2_CB *p_cb)
UINT8 msg_received;
UINT16 r27;
if (p_cb->open_state != 2)
if (p_cb->at_0x1e != 2)
return 0;
r27 = pipe + 1;
@@ -148,36 +148,36 @@ UINT16 hcisu_h2_receive_msg(UINT16 pipe, tHCISU_H2_CB *p_cb)
++bytes_read;
msg_received = FALSE;
switch (p_cb->rx_state[pipe])
switch (p_cb->at_0x1a[pipe])
{
case 0:
if (r27 == 1)
{
p_cb->p_rx_msg[pipe] = GKI_getpoolbuf(GKI_POOL_ID_2);
p_cb->pkt_type[pipe] = 4;
p_cb->at_0x00[pipe] = GKI_getpoolbuf(GKI_POOL_ID_2);
p_cb->at_0x14[pipe] = 4;
}
else if (r27 == 2)
{
p_cb->p_rx_msg[pipe] = GKI_getpoolbuf(GKI_POOL_ID_3);
p_cb->pkt_type[pipe] = 2;
p_cb->at_0x00[pipe] = GKI_getpoolbuf(GKI_POOL_ID_3);
p_cb->at_0x14[pipe] = 2;
}
else if (r27 == 3)
{
p_cb->p_rx_msg[pipe] = GKI_getpoolbuf(GKI_POOL_ID_1);
p_cb->pkt_type[pipe] = 3;
p_cb->at_0x00[pipe] = GKI_getpoolbuf(GKI_POOL_ID_1);
p_cb->at_0x14[pipe] = 3;
}
else
{
break;
}
if (p_cb->p_rx_msg[pipe])
if (p_cb->at_0x00[pipe])
{
p_cb->p_rx_msg[pipe]->len = 0;
p_cb->p_rx_msg[pipe]->event =
hcisu_msg_evt_table[p_cb->pkt_type[pipe] - 1];
p_cb->p_rx_msg[pipe]->offset = 0;
p_cb->rx_state[pipe] = 1;
p_cb->at_0x00[pipe]->len = 0;
p_cb->at_0x00[pipe]->event =
hcisu_msg_evt_table[p_cb->at_0x14[pipe] - 1];
p_cb->at_0x00[pipe]->offset = 0;
p_cb->at_0x1a[pipe] = 1;
}
else
{
@@ -185,54 +185,54 @@ UINT16 hcisu_h2_receive_msg(UINT16 pipe, tHCISU_H2_CB *p_cb)
"HCIS: Unable to allocate buffer for incoming HCI "
"message.");
p_cb->rx_state[pipe] = 2;
p_cb->at_0x1a[pipe] = 2;
}
p_cb->bytes_left[pipe] =
hcisu_preamble_table[p_cb->pkt_type[pipe] - 1];
p_cb->at_0x0c[pipe] =
hcisu_preamble_table[p_cb->at_0x14[pipe] - 1];
/* fallthrough */
case 1:
*((UINT8 *)(p_cb->p_rx_msg[pipe] + 1)
+ p_cb->p_rx_msg[pipe]->len++) = byte;
*((UINT8 *)(p_cb->at_0x00[pipe] + 1)
+ p_cb->at_0x00[pipe]->len++) = byte;
--p_cb->bytes_left[pipe];
--p_cb->at_0x0c[pipe];
if (p_cb->bytes_left[pipe] == 0)
if (p_cb->at_0x0c[pipe] == 0)
{
msg_len = byte;
if (p_cb->pkt_type[pipe] == 2)
if (p_cb->at_0x14[pipe] == 2)
{
msg_len = (msg_len << 8) + p_cb->len_hi[pipe];
msg_len = (msg_len << 8) + p_cb->at_0x17[pipe];
if ((p_cb->p_rx_msg[pipe] =
if ((p_cb->at_0x00[pipe] =
(HC_BT_HDR *)l2cap_link_chk_pkt_start(
(BT_HDR *)p_cb->p_rx_msg[pipe]))
(BT_HDR *)p_cb->at_0x00[pipe]))
== 0)
{
p_cb->bytes_left[pipe] = msg_len;
p_cb->at_0x0c[pipe] = msg_len;
if (msg_len == 0)
p_cb->rx_state[pipe] = 0;
p_cb->at_0x1a[pipe] = 0;
else
p_cb->rx_state[pipe] = 4;
p_cb->at_0x1a[pipe] = 4;
break;
}
}
p_cb->bytes_left[pipe] = msg_len;
p_cb->at_0x0c[pipe] = msg_len;
if (sizeof(HC_BT_HDR)
+ hcisu_preamble_table[p_cb->pkt_type[pipe] - 1]
+ hcisu_preamble_table[p_cb->at_0x14[pipe] - 1]
+ msg_len
> GKI_get_buf_size(p_cb->p_rx_msg[pipe]))
> GKI_get_buf_size(p_cb->at_0x00[pipe]))
{
GKI_freebuf(p_cb->p_rx_msg[pipe]);
p_cb->p_rx_msg[pipe] = NULL;
p_cb->rx_state[pipe] = 4;
GKI_freebuf(p_cb->at_0x00[pipe]);
p_cb->at_0x00[pipe] = NULL;
p_cb->at_0x1a[pipe] = 4;
BT_TRACE(HCI, ERROR,
"HCIS: Invalid length for incoming HCI message.");
@@ -242,85 +242,85 @@ UINT16 hcisu_h2_receive_msg(UINT16 pipe, tHCISU_H2_CB *p_cb)
if (msg_len != 0)
{
p_cb->rx_state[pipe] = 3;
p_cb->at_0x1a[pipe] = 3;
}
else
{
msg_received = TRUE;
p_cb->rx_state[pipe] = 0;
p_cb->at_0x1a[pipe] = 0;
}
}
else
{
p_cb->len_hi[pipe] = byte;
p_cb->at_0x17[pipe] = byte;
}
break;
case 2:
--p_cb->bytes_left[pipe];
--p_cb->at_0x0c[pipe];
if (p_cb->bytes_left[pipe] == 0)
if (p_cb->at_0x0c[pipe] == 0)
{
msg_len = byte;
if (p_cb->pkt_type[pipe] == 2)
msg_len = (msg_len << 8) + p_cb->len_hi[pipe];
if (p_cb->at_0x14[pipe] == 2)
msg_len = (msg_len << 8) + p_cb->at_0x17[pipe];
p_cb->bytes_left[pipe] = msg_len;
p_cb->rx_state[pipe] = 4;
p_cb->at_0x0c[pipe] = msg_len;
p_cb->at_0x1a[pipe] = 4;
}
else
{
p_cb->len_hi[pipe] = byte;
p_cb->at_0x17[pipe] = byte;
}
break;
case 3:
*((UINT8 *)(p_cb->p_rx_msg[pipe] + 1)
+ p_cb->p_rx_msg[pipe]->len++) = byte;
*((UINT8 *)(p_cb->at_0x00[pipe] + 1)
+ p_cb->at_0x00[pipe]->len++) = byte;
--p_cb->bytes_left[pipe];
--p_cb->at_0x0c[pipe];
len = UUSB_Read(pipe + 1,
(UINT8 *)(p_cb->p_rx_msg[pipe] + 1)
+ p_cb->p_rx_msg[pipe]->len,
p_cb->bytes_left[pipe]);
(UINT8 *)(p_cb->at_0x00[pipe] + 1)
+ p_cb->at_0x00[pipe]->len,
p_cb->at_0x0c[pipe]);
p_cb->p_rx_msg[pipe]->len += len;
p_cb->bytes_left[pipe] -= len;
p_cb->at_0x00[pipe]->len += len;
p_cb->at_0x0c[pipe] -= len;
bytes_read += len;
if (p_cb->bytes_left[pipe] == 0)
if (p_cb->at_0x0c[pipe] == 0)
{
if (p_cb->pkt_type[pipe] == 2
if (p_cb->at_0x14[pipe] == 2
&& l2cap_link_chk_pkt_end() == 0)
{
p_cb->rx_state[pipe] = 0;
p_cb->at_0x1a[pipe] = 0;
}
else
{
msg_received = TRUE;
p_cb->rx_state[pipe] = 0;
p_cb->at_0x1a[pipe] = 0;
}
}
break;
case 4:
--p_cb->bytes_left[pipe];
--p_cb->at_0x0c[pipe];
if (p_cb->bytes_left[pipe] == 0)
p_cb->rx_state[pipe] = 0;
if (p_cb->at_0x0c[pipe] == 0)
p_cb->at_0x1a[pipe] = 0;
break;
}
if (msg_received)
{
GKI_send_msg(hcisu_h2_cb.task_id, 0, p_cb->p_rx_msg[pipe]);
p_cb->p_rx_msg[pipe] = NULL;
GKI_send_msg(hcisu_h2_cb.at_0x1f, 0, p_cb->at_0x00[pipe]);
p_cb->at_0x00[pipe] = NULL;
}
}
@@ -382,7 +382,7 @@ void hcisu_h2_send_msg_now(tHCISU_H2_CB *cb, HC_BT_HDR *p_msg)
{
p_msg->event = MSG_HC_TO_STACK_L2C_SEG_XMIT;
GKI_send_msg(hcisu_h2_cb.task_id, 0, p_msg);
GKI_send_msg(hcisu_h2_cb.at_0x1f, 0, p_msg);
return;
}
@@ -405,15 +405,15 @@ void hcisu_h2_send_msg(tHCISU_H2_CB *p_cb, HC_BT_HDR *p_msg)
void hcisu_h2_init(UINT8 taskId, UINT8 mbox, UINT16 bufSize)
{
hcisu_h2_cb.open_state = 0;
hcisu_h2_cb.at_0x1e = 0;
hcisu_h2_cb.rx_state[0] = 0;
hcisu_h2_cb.rx_state[1] = 0;
hcisu_h2_cb.rx_state[2] = 0;
hcisu_h2_cb.at_0x1a[0] = 0;
hcisu_h2_cb.at_0x1a[1] = 0;
hcisu_h2_cb.at_0x1a[2] = 0;
hcisu_h2_cb.task_id = taskId;
hcisu_h2_cb.mbox = mbox;
hcisu_h2_cb.buf_size = bufSize;
hcisu_h2_cb.at_0x1f = taskId;
hcisu_h2_cb.at_0x20 = mbox;
hcisu_h2_cb.at_0x12 = bufSize;
}
BOOLEAN hcisu_h2_open(tHCI_CFG *_p_cfg)
@@ -424,9 +424,9 @@ BOOLEAN hcisu_h2_open(tHCI_CFG *_p_cfg)
uusb.at_0x0b = 0;
uusb.at_0x04 = p_cfg->at_0x00;
uusb.at_0x06 = p_cfg->at_0x02;
uusb.at_0x08 = hcisu_h2_cb.task_id;
uusb.at_0x08 = hcisu_h2_cb.at_0x1f;
hcisu_h2_cb.open_state = 2;
hcisu_h2_cb.at_0x1e = 2;
UUSB_Register(&uusb);
UUSB_Open(&uusb, &hcisu_h2_usb_cback);
@@ -436,7 +436,7 @@ BOOLEAN hcisu_h2_open(tHCI_CFG *_p_cfg)
void hcisu_h2_close(void)
{
hcisu_h2_cb.open_state = 0;
hcisu_h2_cb.at_0x1e = 0;
UUSB_Close();
UUSB_Unregister();
@@ -454,7 +454,7 @@ int hcisu_h2_handle_event(UINT16 len)
UINT16 bytes_read;
bytes_read = hcisu_h2_receive_msg(
len - sizeof(HC_BT_HDR) - hcisu_h2_cb.buf_size, &hcisu_h2_cb);
len - sizeof(HC_BT_HDR) - hcisu_h2_cb.at_0x12, &hcisu_h2_cb);
return 0;
}

View File

@@ -33,7 +33,7 @@ typedef struct
u8 bulkEndpoint1;
u8 bulkEndpoint2;
u8 intrEndpoint1;
u8 intrEndpoint2;
char at_0x13; // intrEndpoint2?
int vid;
int pid;
UINT8 cmd_buffer_pool;
@@ -46,9 +46,9 @@ typedef struct
char pad4_[1];
UINT8 reading_intr_data;
BUFFER_Q bulk_buffer_q;
UINT8 bulk_outstanding;
UINT8 at_0x38;
BUFFER_Q intr_buffer_q;
UINT8 intr_outstanding;
UINT8 at_0x48;
char pad8_[3];
} tUUSB_CB;
@@ -158,7 +158,7 @@ static void uusb_CloseDeviceCB(long result, void *p_data)
usb.bulkEndpoint1 = 0;
usb.bulkEndpoint2 = 0;
usb.intrEndpoint1 = 0;
usb.intrEndpoint2 = 0;
usb.at_0x13 = 0;
usb.fd = 0;
@@ -363,12 +363,12 @@ static void uusb_WriteCtrlDataCB(long result, void *p_data)
GKI_disable();
--usb.intr_outstanding;
--usb.at_0x48;
GKI_enable();
}
if (usb.intr_outstanding >= 5)
if (usb.at_0x48 >= 5)
return;
if (usb.intr_buffer_q.count == 0)
@@ -389,7 +389,7 @@ static void uusb_WriteCtrlDataCB(long result, void *p_data)
{
GKI_disable();
++usb.intr_outstanding;
++usb.at_0x48;
GKI_enable();
}
@@ -411,12 +411,12 @@ static void uusb_WriteBulkDataCB(long result, void *p_data)
GKI_disable();
--usb.bulk_outstanding;
--usb.at_0x38;
GKI_enable();
}
if (usb.bulk_outstanding >= 5)
if (usb.at_0x38 >= 5)
return;
if (usb.bulk_buffer_q.count == 0)
@@ -436,7 +436,7 @@ static void uusb_WriteBulkDataCB(long result, void *p_data)
{
GKI_disable();
++usb.bulk_outstanding;
++usb.at_0x38;
GKI_enable();
}
@@ -504,7 +504,7 @@ void UUSB_Register(tUUSB *uusb)
usb.bulkEndpoint1 = 0;
usb.bulkEndpoint2 = 0;
usb.intrEndpoint1 = 0;
usb.intrEndpoint2 = 0;
usb.at_0x13 = 0;
if (uusb_get_devId(usb.vid, usb.pid) < 0)
return;
@@ -512,13 +512,13 @@ void UUSB_Register(tUUSB *uusb)
usb.bulkEndpoint1 = 2;
usb.bulkEndpoint2 = 130;
usb.intrEndpoint1 = 129;
usb.intrEndpoint2 = 0;
usb.at_0x13 = 0;
GKI_init_q(&usb.bulk_buffer_q);
usb.bulk_outstanding = 0;
usb.at_0x38 = 0;
GKI_init_q(&usb.intr_buffer_q);
usb.intr_outstanding = 0;
usb.at_0x48 = 0;
usb.cmd_buffer_pool = GKI_create_pool(660, 45, 1, NULL);
usb.acl_buffer_pool = GKI_create_pool(1800, 30, 1, NULL);
@@ -607,7 +607,7 @@ UINT16 UUSB_Write(UINT8 pipe, void *p_data, UINT16 len, void *unused)
memcpy(p_buffer, p_data, len);
if (usb.intr_outstanding < 5 && usb.intr_buffer_q.count == 0)
if (usb.at_0x48 < 5 && usb.intr_buffer_q.count == 0)
{
ret = IUSB_WriteCtrlMsgAsync(usb.fd, 0x20, 0, 0, 0, len, p_buffer,
uusb_WriteCtrlDataCB, p_buf);
@@ -634,7 +634,7 @@ UINT16 UUSB_Write(UINT8 pipe, void *p_data, UINT16 len, void *unused)
{
GKI_disable();
++usb.intr_outstanding;
++usb.at_0x48;
GKI_enable();
}
@@ -658,7 +658,7 @@ UINT16 UUSB_Write(UINT8 pipe, void *p_data, UINT16 len, void *unused)
if (len > 190)
UUSBDBG(" woah ! thats pretty Big ! :%d", len);
if (usb.bulk_outstanding < 5 && usb.bulk_buffer_q.count == 0)
if (usb.at_0x38 < 5 && usb.bulk_buffer_q.count == 0)
{
ret = IUSB_WriteBlkMsgAsync(usb.fd, usb.bulkEndpoint1, len,
p_buffer, uusb_WriteBulkDataCB, p_buf);
@@ -685,7 +685,7 @@ UINT16 UUSB_Write(UINT8 pipe, void *p_data, UINT16 len, void *unused)
{
GKI_disable();
++usb.bulk_outstanding;
++usb.at_0x38;
GKI_enable();
}

View File

@@ -41,13 +41,13 @@ typedef struct USBCommandBlock {
USBCallback callback; // 0x00
USBIsoCallback isoCallback; // 0x04
void* callbackArg; // 0x08
void* isoArg; // 0x0C
void* unkIsoArg; // 0x0C
char pad_0x10[0x4];
char unk_0x10[0x4];
void* clean[USB_NCLEAN_MAX]; // 0x14
u32 nclean; // 0x34
char pad_0x38[0x40 - 0x38];
char unk_0x38[0x40 - 0x38];
union {
char path[FS_MAX_PATH];
USBMsg msg;
@@ -174,7 +174,7 @@ static s32 _intrBlkCtrlIsoCb(s32 result, void* arg) {
block->callback(result, block->callbackArg);
} else if (block->isoCallback != NULL) {
USB_LOG("calling iso callback\n");
block->isoCallback(result, block->isoArg, block->callbackArg);
block->isoCallback(result, block->unkIsoArg, block->callbackArg);
}
IOSFree(block);

View File

@@ -7,9 +7,9 @@
static struct {
struct {
OSMessageQueue* queue; // 0x00
void* messages; // 0x04 (OSMessage* array for OSInitMessageQueue)
void* unk_0x04;
} entries[MAX_PUH_SEM]; // 0x00
void* pad_0x14; // unused
void* unk_0x14;
} st_uhs_ker_msg_mng;
s32 uhf_ker_send_message(int index, void* message) {

View File

@@ -7,12 +7,12 @@
static struct {
struct {
OSSemaphore* sem; // 0x00
u32 initCount;
u32 flags;
u32 unk_0x04;
u32 unk_0x08;
} entries[MAX_PUH_SEM]; // 0x00
u32 usedCount;
OSSemaphore* lockSem;
u8 pad[0x0C];
u32 unk_0x90;
OSSemaphore* unk_0x94;
u8 unk_0x98[0x0C];
} st_uhs_ker_sem_mng;
static OSSemaphore st_uhf_ker_sem[MAX_PUH_SEM];
@@ -20,17 +20,17 @@ static OSSemaphore st_uhf_ker_sem[MAX_PUH_SEM];
static s32 st_uhs_ker_sem_status;
static int uhf_ker_sem_inline_0() {
if (st_uhs_ker_sem_status != 1 || st_uhs_ker_sem_mng.lockSem == 0) {
if (st_uhs_ker_sem_status != 1 || st_uhs_ker_sem_mng.unk_0x94 == 0) {
return -1;
} else {
OSWaitSemaphore(st_uhs_ker_sem_mng.lockSem);
OSWaitSemaphore(st_uhs_ker_sem_mng.unk_0x94);
return 0;
}
}
static void uhf_ker_sem_inline_1() {
if (st_uhs_ker_sem_status == 1 && st_uhs_ker_sem_mng.lockSem != 0) {
OSSignalSemaphore(st_uhs_ker_sem_mng.lockSem);
if (st_uhs_ker_sem_status == 1 && st_uhs_ker_sem_mng.unk_0x94 != 0) {
OSSignalSemaphore(st_uhs_ker_sem_mng.unk_0x94);
}
}
@@ -48,7 +48,7 @@ s32 uhf_ker_create_sem(u32 initCount, int flags) {
return -5;
}
if (st_uhs_ker_sem_mng.usedCount == 12) {
if (st_uhs_ker_sem_mng.unk_0x90 == 12) {
uhf_ker_sem_inline_1();
return -24;
}
@@ -65,9 +65,9 @@ s32 uhf_ker_create_sem(u32 initCount, int flags) {
}
st_uhs_ker_sem_mng.entries[i].sem = sem;
st_uhs_ker_sem_mng.entries[i].initCount = initCount;
st_uhs_ker_sem_mng.entries[i].flags = flags;
st_uhs_ker_sem_mng.usedCount++;
st_uhs_ker_sem_mng.entries[i].unk_0x04 = initCount;
st_uhs_ker_sem_mng.entries[i].unk_0x08 = flags;
st_uhs_ker_sem_mng.unk_0x90++;
uhf_ker_sem_inline_1();
@@ -97,9 +97,9 @@ s32 uhf_ker_delete_sem(int sem) {
}
st_uhs_ker_sem_mng.entries[sem - 1].sem = NULL;
st_uhs_ker_sem_mng.entries[sem - 1].initCount = 0;
st_uhs_ker_sem_mng.entries[sem - 1].flags = 0;
st_uhs_ker_sem_mng.usedCount--;
st_uhs_ker_sem_mng.entries[sem - 1].unk_0x04 = 0;
st_uhs_ker_sem_mng.entries[sem - 1].unk_0x08 = 0;
st_uhs_ker_sem_mng.unk_0x90--;
uhf_ker_sem_inline_1();

View File

@@ -6,13 +6,13 @@
static struct {
struct {
OSThread* thread; // 0x00
u8 stack[0x33C]; // 0x04
OSThread* unk_0x00;
u8 unk_0x04[0x33C];
} entries[MAX_PUH_TSK]; // 0x00
u32 pad_0x680;
u32 pad_0x684;
u32 pad_0x688;
u32 pad_0x68C;
u32 unk_0x680;
u32 unk_0x684;
u32 unk_0x688;
u32 unk_0x68C;
} st_uhs_ker_tsk_mng;
s32 uhf_ker_set_priority(int tsk, int priority) {
@@ -24,9 +24,9 @@ s32 uhf_ker_set_priority(int tsk, int priority) {
return -5;
}
if (st_uhs_ker_tsk_mng.entries[tsk - 1].thread == NULL) {
if (st_uhs_ker_tsk_mng.entries[tsk - 1].unk_0x00 == NULL) {
return -1;
}
return OSSetThreadPriority(st_uhs_ker_tsk_mng.entries[tsk - 1].thread, priority) ? 0 : -20;
return OSSetThreadPriority(st_uhs_ker_tsk_mng.entries[tsk - 1].unk_0x00, priority) ? 0 : -20;
}

View File

@@ -20,7 +20,7 @@ typedef struct _usbKbdAsyncMem {
u32 state; // 0x00
void* kbd; // 0x04
char modifiers; // 0x08
u8 reserved; // 0x09
u8 unk_0x09;
u8 keys[6]; // 0x0A
} usbKbdAsyncMem;

View File

@@ -190,7 +190,7 @@ static s32 WPADiSendData(s32 chan, WPADCommand command) {
if (status == WPAD_ERR_COMMUNICATION_ERROR) {
if ((s32)OSTicksToSeconds(__OSGetSystemTime() - p->lastReportSendTime) > 1 && _sleepTime != 0) {
if (!p->suppressDisconnect) {
if (!p->unk_0x910) {
p->lastReportSendTime = __OSGetSystemTime();
WPADiDisconnect(chan, FALSE);
} else {
@@ -1263,7 +1263,7 @@ static void __ClearControlBlock(s32 chan) {
p->lastControllerDataUpdate = __OSGetSystemTime();
p->lastReportSendTime = __OSGetSystemTime();
p->suppressDisconnect = 0;
p->unk_0x910 = 0;
p->unk_0x8C9 = 0;
p->unk_0x8C4 = 0;
p->wmReadDataPtr = NULL;
@@ -1298,8 +1298,8 @@ static void __ClearControlBlock(s32 chan) {
memset(&p->decryptXorTable, 0, sizeof(p->decryptXorTable));
memset(&p->gameInfo, 0, sizeof(WPADGameInfo));
p->gameInfoStatus[0] = -1;
p->gameInfoStatus[1] = -1;
p->unk_0x38[0] = -1;
p->unk_0x38[1] = -1;
p->stdCmdQueue.buffer = p->stdCmdQueueList;
p->stdCmdQueue.capacity = ARRAY_LENGTH(p->stdCmdQueueList);
@@ -2692,7 +2692,7 @@ static void __SendData(s32 chan, WPADCommand command) {
u32 time;
memcpy(&time, command.dataBuf, sizeof(u32));
p->lastReportSendTime = __OSGetSystemTime() + time;
p->suppressDisconnect = 1;
p->unk_0x910 = 1;
return;
}
default: {
@@ -2704,7 +2704,7 @@ static void __SendData(s32 chan, WPADCommand command) {
p->cmdBlkCB = command.cmdCB;
p->lastReportID = reportID;
p->lastReportSendTime = __OSGetSystemTime() + OSSecondsToTicks(2);
p->suppressDisconnect = 0;
p->unk_0x910 = 0;
OSRestoreInterrupts(enabled);
}

View File

@@ -393,48 +393,48 @@ static void getExtConfig(s32 chan, s32 result) {
p_wpd->extConfig.u.fs.accX1g = (s16)((u16)(((u16)(p_buf[index + 4]) << 2) & 0xFFFC) | (u16)(((u16)(p_buf[index + 7]) >> 4) & 3));
p_wpd->extConfig.u.fs.accY1g = (s16)((u16)(((u16)(p_buf[index + 5]) << 2) & 0xFFFC) | (u16)(((u16)(p_buf[index + 7]) >> 2) & 3));
p_wpd->extConfig.u.fs.accZ1g = (s16)((u16)(((u16)(p_buf[index + 6]) << 2) & 0xFFFC) | (u16)(((u16)(p_buf[index + 7])) & 3));
p_wpd->extConfig.u.fs.stickXMax = (s8)p_buf[index + 8];
p_wpd->extConfig.u.fs.stickXMin = (s8)p_buf[index + 9];
p_wpd->extConfig.u.fs.unk_0x04 = (s8)p_buf[index + 8];
p_wpd->extConfig.u.fs.unk_0x02 = (s8)p_buf[index + 9];
p_wpd->extConfig.u.fs.stickXCenter = (s8)p_buf[index + 10];
p_wpd->extConfig.u.fs.stickYMax = (s8)p_buf[index + 11];
p_wpd->extConfig.u.fs.stickYMin = (s8)p_buf[index + 12];
p_wpd->extConfig.u.fs.unk_0x0A = (s8)p_buf[index + 11];
p_wpd->extConfig.u.fs.unk_0x08 = (s8)p_buf[index + 12];
p_wpd->extConfig.u.fs.stickYCenter = (s8)p_buf[index + 13];
DEBUGPrint("0G: fsaccX = %d, fsaccY = %d, fsaccZ = %d\n", p_wpd->extConfig.u.fs.accX0g, p_wpd->extConfig.u.fs.accY0g,
p_wpd->extConfig.u.fs.accZ0g);
DEBUGPrint("1G: fsaccX = %d, fsaccY = %d, fsaccZ = %d\n", p_wpd->extConfig.u.fs.accX1g, p_wpd->extConfig.u.fs.accY1g,
p_wpd->extConfig.u.fs.accZ1g);
DEBUGPrint("FS: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.fs.stickXCenter, p_wpd->extConfig.u.fs.stickXMax,
p_wpd->extConfig.u.fs.stickXMin);
DEBUGPrint("FS: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.fs.stickYCenter, p_wpd->extConfig.u.fs.stickYMax,
p_wpd->extConfig.u.fs.stickYMin);
DEBUGPrint("FS: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.fs.stickXCenter, p_wpd->extConfig.u.fs.unk_0x04,
p_wpd->extConfig.u.fs.unk_0x02);
DEBUGPrint("FS: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.fs.stickYCenter, p_wpd->extConfig.u.fs.unk_0x0A,
p_wpd->extConfig.u.fs.unk_0x08);
}
break;
case WPAD_DEV_CLASSIC:
p_wpd->extConfig.u.cl.lStickXMax = (s8)p_buf[index + 0];
p_wpd->extConfig.u.cl.lStickXMin = (s8)p_buf[index + 1];
p_wpd->extConfig.u.cl.unk_0x04 = (s8)p_buf[index + 0];
p_wpd->extConfig.u.cl.unk_0x02 = (s8)p_buf[index + 1];
p_wpd->extConfig.u.cl.lStickXCenter = (s8)p_buf[index + 2];
p_wpd->extConfig.u.cl.lStickYMax = (s8)p_buf[index + 3];
p_wpd->extConfig.u.cl.lStickYMin = (s8)p_buf[index + 4];
p_wpd->extConfig.u.cl.unk_0x0A = (s8)p_buf[index + 3];
p_wpd->extConfig.u.cl.unk_0x08 = (s8)p_buf[index + 4];
p_wpd->extConfig.u.cl.lStickYCenter = (s8)p_buf[index + 5];
p_wpd->extConfig.u.cl.rStickXMax = (s8)p_buf[index + 6];
p_wpd->extConfig.u.cl.rStickXMin = (s8)p_buf[index + 7];
p_wpd->extConfig.u.cl.unk_0x10 = (s8)p_buf[index + 6];
p_wpd->extConfig.u.cl.unk_0x0E = (s8)p_buf[index + 7];
p_wpd->extConfig.u.cl.rStickXCenter = (s8)p_buf[index + 8];
p_wpd->extConfig.u.cl.rStickYMax = (s8)p_buf[index + 9];
p_wpd->extConfig.u.cl.rStickYMin = (s8)p_buf[index + 10];
p_wpd->extConfig.u.cl.unk_0x16 = (s8)p_buf[index + 9];
p_wpd->extConfig.u.cl.unk_0x14 = (s8)p_buf[index + 10];
p_wpd->extConfig.u.cl.rStickYCenter = (s8)p_buf[index + 11];
p_wpd->extConfig.u.cl.triggerLZero = p_buf[index + 12];
p_wpd->extConfig.u.cl.triggerRZero = p_buf[index + 13];
DEBUGPrint("CL: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.cl.lStickXCenter, p_wpd->extConfig.u.cl.lStickXMax,
p_wpd->extConfig.u.cl.lStickXMin);
DEBUGPrint("CL: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.cl.lStickYCenter, p_wpd->extConfig.u.cl.lStickYMax,
p_wpd->extConfig.u.cl.lStickYMin);
DEBUGPrint("CR: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.cl.rStickXCenter, p_wpd->extConfig.u.cl.rStickXMax,
p_wpd->extConfig.u.cl.rStickXMin);
DEBUGPrint("CR: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.cl.rStickYCenter, p_wpd->extConfig.u.cl.rStickYMax,
p_wpd->extConfig.u.cl.rStickYMin);
DEBUGPrint("CL: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.cl.lStickXCenter, p_wpd->extConfig.u.cl.unk_0x04,
p_wpd->extConfig.u.cl.unk_0x02);
DEBUGPrint("CL: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.cl.lStickYCenter, p_wpd->extConfig.u.cl.unk_0x0A,
p_wpd->extConfig.u.cl.unk_0x08);
DEBUGPrint("CR: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.cl.rStickXCenter, p_wpd->extConfig.u.cl.unk_0x10,
p_wpd->extConfig.u.cl.unk_0x0E);
DEBUGPrint("CR: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.cl.rStickYCenter, p_wpd->extConfig.u.cl.unk_0x16,
p_wpd->extConfig.u.cl.unk_0x14);
DEBUGPrint("LR: L = %d, R = %d\n", p_wpd->extConfig.u.cl.triggerLZero, p_wpd->extConfig.u.cl.triggerRZero);
break;
}
@@ -547,9 +547,9 @@ static void getGameInfo(s32 chan, s32 result, u8 index) {
if (p_info->checksum == sum) {
memcpy(&p_wpd->gameInfo, p_buf, sizeof(WPADMEMGameInfo));
p_wpd->gameInfoStatus[index] = WPAD_ERR_NONE;
p_wpd->unk_0x38[index] = WPAD_ERR_NONE;
} else {
p_wpd->gameInfoStatus[index] = WPAD_ERR_INVALID;
p_wpd->unk_0x38[index] = WPAD_ERR_INVALID;
}
}
}

View File

@@ -17,9 +17,9 @@ typedef struct NWC24FLHeader {
u32 version; // 0x04
u32 infoCount; // 0x08
u32 registeredCount; // 0x0C
u32 confirmedBits[4]; // 0x10
u32 pad_0x20[7]; // unused
u32 listFlags; // 0x3C
u32 unk_0x10[4];
u32 unk_0x20[7];
u32 unk_0x3C;
NWC24UserId friendIds[NWC24_FRIEND_INFO_MAX]; // 0x40
} NWC24FLHeader;

View File

@@ -79,9 +79,9 @@ typedef struct NWC24MsgObjPrivate {
u32 textSize; // 0xE4
u32 dwcId; // 0xEC
u32 iconNew; // 0xF0
u32 pad_0xF4;
u32 pad_0xF8;
u32 pad_0xFC;
u32 unk_0xF4;
u32 unk_0xF8;
u32 unk_0xFC;
} NWC24MsgObjPrivate;
#ifdef __cplusplus

View File

@@ -62,7 +62,7 @@ typedef struct _CDBRecordKey {
} CDBRecordKey;
typedef struct _CDBRecord {
u32 database; // 0x00
u32 unk_0x00;
void* cryptBuf; // 0x04
CDBRecordKey key; // 0x08
void* file; // 0x38

View File

@@ -58,7 +58,7 @@ void CDBRecordInstanceInit(CDBRecordFile* recordFile, CDBRecord* record, int typ
recordFile->used = 1;
OSUnlockMutex((OSMutex*)recordFile);
recordFile->allocFlag = type;
recordFile->database = record->database;
recordFile->database = record->unk_0x00;
CDBAttrInit(&recordFile->attr);
CDBRecordKeyCopy(&recordFile->key, &record->key);
}
@@ -73,7 +73,7 @@ BOOL CDBRecordInstanceIsUsed(CDBRecordFile* recordFile) {
void CDBRecordInitDescriptor(CDBRecord* record, CDBDatabase* database, CDBRecordKey* key) {
CDBLock();
record->database = (u32)database;
record->unk_0x00 = (u32)database;
CDBRecordKeyCopy(&record->key, key);
record->cryptBuf = NULL;
record->file = NULL;
@@ -95,7 +95,7 @@ CDBErr CDBRecordCreateAtOnce(CDBRecord* record, CDBDatabase* database, const cha
CDBRecordKeyInit(&key, epoch, gameCode, makerCode, 0, fileType, CDB_FS_LOCATION_NAND);
CDBLock();
record->database = (u32)database;
record->unk_0x00 = (u32)database;
CDBRecordKeyCopy(&record->key, &key);
record->cryptBuf = NULL;
record->file = NULL;
@@ -128,7 +128,7 @@ CDBErr CDBRecordOpen_(CDBRecord* record) {
CDBDatabase* database;
CDBRecordDatabaseState* instance;
database = (CDBDatabase*)record->database;
database = (CDBDatabase*)record->unk_0x00;
instance = database->instance;
record->cryptBuf = NULL;
if (instance == NULL) {
@@ -292,7 +292,7 @@ CDBErr CDBRecordWrite_(CDBRecord* record, void* buffer, u32 size) {
CDBErr result;
CDBRecordDatabaseState* instance;
database = (CDBDatabase*)record->database;
database = (CDBDatabase*)record->unk_0x00;
instance = database->instance;
recordFile = record->file;
if (record->key.location == CDB_FS_LOCATION_SD) {
@@ -508,7 +508,7 @@ CDBErr CDBRecordUpdateModifiedDate(CDBRecord* record) {
ticks = OSGetTime();
modifiedDate = ticks / (OS_BUS_CLOCK / 4);
recordFile = record->file;
if ((((CDBRecordDatabaseState*)((CDBDatabase*)record->database)->instance)->openFlags & 2) == 0) {
if ((((CDBRecordDatabaseState*)((CDBDatabase*)record->unk_0x00)->instance)->openFlags & 2) == 0) {
CDBReportError("can't set modified time of the record; the database is opened as READONLY\n");
return CDB_ERROR_26;
}
@@ -570,7 +570,7 @@ CDBErr CDBRecordBackupToSD_(CDBRecord* record) {
CDBRecordKeyCopy(&localRecord.key, &record->key);
localRecord.file = NULL;
localRecord.key.location = CDB_FS_LOCATION_SD;
localRecord.database = record->database;
localRecord.unk_0x00 = record->unk_0x00;
err = CDBRecordFileCreateBlank(&localRecord);
if (err != CDB_ERROR_OK) {
CDBLock();
@@ -614,7 +614,7 @@ CDBErr CDBRecordBackupToSD_(CDBRecord* record) {
CDBLock();
recordFile = localRecord.file;
CDBRecordKeyCopy(&record->key, &localRecord.key);
record->database = localRecord.database;
record->unk_0x00 = localRecord.unk_0x00;
record->file = localRecord.file;
record->cryptBuf = localRecord.cryptBuf;
CDBRecordKeyCopy(&recordFile->key, &localRecord.key);

View File

@@ -27,7 +27,7 @@ static NWC24Err GetCachedFLHeader(NWC24FLHeader** header);
static ChkHostNameError CheckHostName(const char* hostName, u32 hostNameLength);
static inline NWC24Err CheckFriendInfo(const NWC24FriendInfo* friendInfo);
static u32 GetConfirmedBit(u32 index) {
static u32 GetUnkFlag(u32 index) {
NWC24Err result;
NWC24FLHeader* header;
u32 data;
@@ -37,11 +37,11 @@ static u32 GetConfirmedBit(u32 index) {
return result;
}
data = header->confirmedBits[index >> 5] >> (index & 0x1f) & 1;
data = header->unk_0x10[index >> 5] >> (index & 0x1f) & 1;
return (NWC24Err)data;
}
static NWC24Err SetConfirmedBit(u32 index, int flag) {
static NWC24Err SetUnkFlag(u32 index, int flag) {
NWC24Err result;
NWC24FLHeader* header;
@@ -50,11 +50,11 @@ static NWC24Err SetConfirmedBit(u32 index, int flag) {
return result;
}
header->confirmedBits[index >> 5] = ~(1 << (index & 0x1f)) & header->confirmedBits[index >> 5] | flag << (index & 0x1f);
header->unk_0x10[index >> 5] = ~(1 << (index & 0x1f)) & header->unk_0x10[index >> 5] | flag << (index & 0x1f);
return NWC24_OK;
}
static NWC24Err SetListFlag(int flag) {
static NWC24Err SetUnkFlag2(int flag) {
NWC24Err result;
NWC24FLHeader* header;
@@ -63,7 +63,7 @@ static NWC24Err SetListFlag(int flag) {
return result;
}
header->listFlags |= flag;
header->unk_0x3C |= flag;
return NWC24_OK;
}
@@ -101,7 +101,7 @@ NWC24Err NWC24ReadFriendInfo(NWC24FriendInfo* info, u32 index) {
Mail_memset(&info->addr.mailAddr[sizeof(NWC24UserId)], 0, sizeof(NWC24UserMailAddr) - sizeof(NWC24UserId));
}
result = GetConfirmedBit(index);
result = GetUnkFlag(index);
if (result == 1) {
info->attr.status = NWC24_FRIENDSTATUS_CONFIRMED;
}
@@ -189,9 +189,9 @@ NWC24Err NWC24WriteFriendInfo(const NWC24FriendInfo* friendInfo, u32 index) {
tmpFriendAddr = (NWC24FriendAddr*)&friendInfo->addr;
}
SetListFlag(1);
SetUnkFlag2(1);
result = SetConfirmedBit(index, 0);
result = SetUnkFlag(index, 0);
if (result != NWC24_OK) {
return result;
}
@@ -347,7 +347,7 @@ NWC24Err NWC24DeleteFriendInfo(u32 index) {
if (resultWrite == NWC24_OK) {
header->friendIds[index] = 0;
header->registeredCount--;
result = SetConfirmedBit(index, 0);
result = SetUnkFlag(index, 0);
if (result == NWC24_OK) {
NWC24FSeek(&file, 0, NWC24_SEEK_BEG);
resultWrite = NWC24FWrite(header, sizeof(NWC24FLHeader), &file);
@@ -374,8 +374,8 @@ NWC24Err NWC24SwapFriendInfos(u32 index1, u32 index2) {
u32 fileOffset1;
u32 fileOffset2;
int confirmedBit1;
int confirmedBit2;
int friendUnkFlag1;
int friendUnkFlag2;
if (!NWC24IsMsgLibOpened() && !NWC24IsMsgLibOpenedByTool()) {
return NWC24_ERR_LIB_NOT_OPENED;
@@ -429,10 +429,10 @@ NWC24Err NWC24SwapFriendInfos(u32 index1, u32 index2) {
header->friendIds[index2] = tmp;
// Swap some flag
confirmedBit1 = GetConfirmedBit(index1);
confirmedBit2 = GetConfirmedBit(index2);
SetConfirmedBit(index1, confirmedBit2);
SetConfirmedBit(index2, confirmedBit1);
friendUnkFlag1 = GetUnkFlag(index1);
friendUnkFlag2 = GetUnkFlag(index2);
SetUnkFlag(index1, friendUnkFlag2);
SetUnkFlag(index2, friendUnkFlag1);
// Write new header
NWC24FSeek(&file, 0, NWC24_SEEK_BEG);
@@ -629,10 +629,10 @@ NWC24Err NWC24iCreateFriendList() {
header->version = FRIEND_LIST_VERSION;
header->infoCount = NWC24_FRIEND_INFO_MAX;
header->registeredCount = 0;
header->confirmedBits[0] = 0;
header->confirmedBits[1] = 0;
header->confirmedBits[2] = 0;
header->confirmedBits[3] = 0;
header->unk_0x10[0] = 0;
header->unk_0x10[1] = 0;
header->unk_0x10[2] = 0;
header->unk_0x10[3] = 0;
result = NWC24FOpen(&file, FLFilePath, NWC24_OPEN_WRITE);
if (result != NWC24_OK) {

View File

@@ -64,13 +64,13 @@ void SimpleWavePlayer::wavePacketCallback(WavePacketCallbackStatus status, WaveP
return;
}
if (self->mbFillInCallback) {
if (self->unk_0xB5) {
MakeWave(player, packet, self);
}
}
SimpleWavePlayer::SimpleWavePlayer() : mSetupParam(1, nw4r::snd::SAMPLE_FORMAT_PCM_S16, 32000, 1.0f, 1) {
mbFillInCallback = true;
unk_0xB5 = true;
unk_0xB0 = false;
mIsSetData = false;
mIsPlaying = false;
@@ -196,7 +196,7 @@ void SimpleWavePlayer::stop() {
void SimpleWavePlayer::update() {
if (mIsPlaying) {
if (!mbFillInCallback) {
if (!unk_0xB5) {
for (int i = 0; i < 3; i++) {
if (mWavePackets[i].GetAppendFlag()) {
continue;

View File

@@ -53,7 +53,7 @@ void AudioFrameCallback() {
for (i = 0; i < AX_VOICE_MAX; i++) {
VoiceInfo* currVoice = &Voices[i];
if (currVoice->getAXVPB() == NULL && currVoice->getUpdateFlag() != 2) {
if (currVoice->getAXVPB() == NULL && currVoice->getUnk_0x0C() != 2) {
continue;
}
@@ -108,7 +108,7 @@ void AudioFrameCallback() {
currVoice->setState(0);
currVoice->setUnk_0x08(0);
}
currVoice->setUpdateFlag(0);
currVoice->setUnk_0x0C(0);
}
return;
}
@@ -370,7 +370,7 @@ clean_up:
}
Voices[axVoiceBuf[i]->index].setAXVPB(axVoiceBuf[i]);
Voices[axVoiceBuf[i]->index].setState(1);
Voices[axVoiceBuf[i]->index].setUpdateFlag(1);
Voices[axVoiceBuf[i]->index].setUnk_0x0C(1);
}
if (handle != NULL) {
for (u32 i = 0; i < chanCount; i++) {
@@ -397,7 +397,7 @@ bool AxAdpcmHandle::setVolume(f32 newVolume) {
mix.vR = newVolume * mpVoices[i]->getMix()->vR;
AXSetVoiceMix(mpVoices[i]->getAXVPB(), &mix);
mpVoices[i]->setUpdateFlag(1);
mpVoices[i]->setUnk_0x0C(1);
a = true;
}
return a;
@@ -416,7 +416,7 @@ void AxAdpcmSimplePlayer::stop(AxAdpcmHandle* handle) {
}
handle->getVoice(i)->setState(7);
handle->getVoice(i)->setUpdateFlag(1);
handle->getVoice(i)->setUnk_0x0C(1);
if (handle->getVoice(i)->getUnk_0x08() != 0) {
handle->getVoice(i)->setUnk_0x08(0);
}
@@ -440,8 +440,8 @@ void AxAdpcmSimplePlayer::setVolume(AxAdpcmHandle* handle, f32 volume) {
void AxAdpcmSimplePlayer::calc() {
for (int i = 0; i < AX_VOICE_MAX; i++) {
if (Voices[i].getUpdateFlag() == 1) {
Voices[i].setUpdateFlag(2);
if (Voices[i].getUnk_0x0C() == 1) {
Voices[i].setUnk_0x0C(2);
}
}
}

View File

@@ -16,7 +16,7 @@ namespace ipl {
namespace cs {
namespace savedata {
struct data {
char sMountPath[MAX_PATH_LENGTH + sizeof(wchar_t)]; // 0x00
char unk_0x00[MAX_PATH_LENGTH + sizeof(wchar_t)]; // 0x00
char sPath[MAX_PATH_LENGTH + sizeof(wchar_t)]; // 0x42
u8 flag; // 0x84
u8* pData; // 0x88
@@ -67,7 +67,7 @@ namespace ipl {
data* data = static_cast<savedata::data*>(*hdr->value.ptr_v);
if (data->pData == NULL && data->size == 0) {
if (data->sMountPath[0] == 0) {
if (data->unk_0x00[0] == 0) {
error = load_nand_(vm, data, heap, offset, size, 0x20);
} else {
error = load_vf_(vm, data, heap, offset, size, 0x20);
@@ -127,7 +127,7 @@ namespace ipl {
}
}
if (data->sMountPath[0] == '\0') {
if (data->unk_0x00[0] == '\0') {
error = load_nand_(vm, data, csHeap, 0, size, -0x20);
} else {
error = load_vf_(vm, data, csHeap, 0, size, -0x20);
@@ -591,7 +591,7 @@ namespace ipl {
memset(data, 0, sizeof(savedata::data));
memset(temp, 0, sizeof(temp));
if (arg1 != NULL) {
util::utf16_to_ascii(data->sMountPath, temp, MAX_PATH_LENGTH, arg0);
util::utf16_to_ascii(data->unk_0x00, temp, MAX_PATH_LENGTH, arg0);
memset(temp, 0, sizeof(temp));
util::utf16_to_ascii(data->sPath, temp, MAX_PATH_LENGTH, arg1);
} else {

View File

@@ -1179,10 +1179,10 @@ namespace ipl {
return;
}
switch (mState) {
case STATE_NORMAL:
switch (mMode) {
case 0:
if (mState != STATE_NORMAL || mMode != 0) {
return;
}
if (!mpFriendCache->isThere(buttonNo + mPage * BTN_MAX)) {
return;
}
@@ -1240,8 +1240,6 @@ namespace ipl {
snd::getSystem()->startSEwithPos("WIPL_SE_CH_HOLD", mDrag.mPos.x);
mState = STATE_DRAG;
}
}
}
void Address::start_drag_point_event(const char* paneName, controller::Interface* con) {
@@ -1427,7 +1425,10 @@ namespace ipl {
if (con->downTrg(controller::BTN_INTERACT)) {
Button* button = static_cast<Button*>(System::getScene(SCENE_BUTTON));
if (mState == STATE_COVER_NORMAL || mState == STATE_NORMAL) {
if (mState != STATE_COVER_NORMAL && mState != STATE_NORMAL) {
break;
}
if (Button::cmpButtonName(paneName, Button::BTN_EXIT) == 0) {
MailAddressSelect* mailAddrSel = static_cast<MailAddressSelect*>(System::getScene(SCENE_MAIL_ADDRESS_SELECT));
button->animation(Button::IDANIM_SELECT_CALENDAR_EXIT);
@@ -1476,7 +1477,7 @@ namespace ipl {
snd::getSystem()->startSE("WIPL_SE_FL_PAGE_DEC");
onPreviousPage();
}
}
break;
}
// fallthrough
}
@@ -1782,15 +1783,13 @@ namespace ipl {
nw4r::math::VEC3 baseTrans = mpLayout->FindPaneByName("N_base_move")->GetTranslate();
math::VEC2 pos = System::getControllerManager()->getController(mDrag.mChan)->getDpdProjectionPos();
nw4r::lyt::TextBox* textBox = static_cast<nw4r::lyt::TextBox*>(mpLayout->FindPaneByName("T_name_move"));
const u16* name = mpFriendCache->getInfo(mDrag.mButton + mDrag.mPage * BTN_MAX).attr.name;
f32 width = 0.0f;
if (textBox != NULL) {
const u16* name = mpFriendCache->getInfo(mDrag.mButton + mDrag.mPage * BTN_MAX).attr.name;
if (name != NULL) {
textBox->GetFont()->GetWidth();
for (; *name != 0; name++) {
width += textBox->GetFont()->GetCharWidth(*name);
}
if (textBox != NULL && name != NULL) {
textBox->GetFont()->GetWidth();
for (; *name != 0; name++) {
width += textBox->GetFont()->GetCharWidth(*name);
}
}
width += 0.01f;
@@ -1947,10 +1946,11 @@ namespace ipl {
}
void FriendListCache::update(u32 index, const wchar_t* name, u64 fdId) {
mInfos[index].attr.fdId = fdId;
memset(mInfos[index].attr.name, 0, sizeof(mInfos[index].attr.name));
wcsncpy((wchar_t*)getInfo(index).attr.name, name, 10);
System::getNwc24Manager()->updateFriendInfo(&getInfo(index), index);
NWC24FriendInfo* info = &mInfos[index];
info->attr.fdId = fdId;
memset(info->attr.name, 0, sizeof(info->attr.name));
wcsncpy((wchar_t*)info->attr.name, name, 10);
System::getNwc24Manager()->updateFriendInfo(info, index);
}
void FriendListCache::del(u32 index) {

View File

@@ -521,8 +521,7 @@ void ipl::scene::AddressEdit::create() {
set_textbox(textPane, friendText);
textPane = (mpCodeLayout)
->getNW4RLyt()->GetRootPane()->FindPaneByName("T_frnd_crd_00", true);
friendText = mString.mDisplayText;
set_textbox(textPane, friendText);
set_textbox(textPane, mString.mDisplayText);
mState = 0;
break;
}
@@ -2780,7 +2779,7 @@ void ipl::scene::AddressEdit::set_err_msg(wchar_t* outErrMsg, u32 outErrMsgLen,
swprintf(nwc24ErrStr, sizeof(nwc24ErrStr) / sizeof(wchar_t), L"%06d\n", errorCode);
wcsncat(outErrMsg, nwc24ErrStr, outErrMsgLen - wcslen(outErrMsg));
u32 messageId;
u32 messageId = MESG_ERROR_NWC24_SERVER;
switch (nwc24Err) {
case NWC24_ERR_NETWORK:
messageId = MESG_ERROR_NWC24_NETWORK;
@@ -2866,7 +2865,10 @@ void ipl::scene::AddressEdit::get_friendinfo() {
memcpy(&ipl::scene::sFriendInfo, &mpFriendCache->getInfo(mSelectedFriend),
sizeof(ipl::scene::sFriendInfo));
mString.setName(reinterpret_cast<const wchar_t*>(ipl::scene::sFriendInfo.attr.name));
set_textbox(mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true), mString.mName);
const wchar_t* name = mString.mName;
nw4r::lyt::Pane* namePane =
mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true);
set_textbox(namePane, name);
wchar_t wiiNo[0x100];
wchar_t email[0x102];
@@ -2879,7 +2881,10 @@ void ipl::scene::AddressEdit::get_friendinfo() {
ipl::utility::CharacterCode::ANSIToUTF16(email, reinterpret_cast<const u8*>(&ipl::scene::sFriendInfo.addr), 0x102);
mString.setEMail(email);
}
set_textbox(mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_frnd_crd_00", true), mString.mDisplayText);
const wchar_t* displayText = mString.mDisplayText;
nw4r::lyt::Pane* friendCodePane =
mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_frnd_crd_00", true);
set_textbox(friendCodePane, displayText);
memcpy(&mCreateID, &ipl::scene::sFriendInfo.attr.fdId, sizeof(mCreateID));
}

View File

@@ -436,10 +436,10 @@ namespace ipl {
data.titleId = System::getChannelManager()->getTitleID(mChanPage, mChanIndex);
data.threadTerminated = mbModuleTerminated;
data.unk_0x19 = true;
data.mbHasNewMessage = true;
data.unk_0x1A = true;
if (!(System::getNwc24Manager() != NULL && System::getNwc24Manager()->isNewMessageThere(ES_TITLE_CODE(data.titleId)))) {
data.mbHasNewMessage = false;
data.unk_0x1A = false;
}
System::getCSManager()->setData(data);
@@ -674,8 +674,7 @@ namespace ipl {
if (foundLangGroup) {
nw4r::lyt::Group* group = layout->FindGroupByName(langGroup);
nw4r::lyt::Group* const& groupView = group;
for (nw4r::lyt::PaneLinkList::Iterator it = groupView->GetPaneList().GetBeginIter(); it != groupView->GetPaneList().GetEndIter(); it++) {
for (nw4r::lyt::PaneLinkList::Iterator it = group->GetPaneList().GetBeginIter(); it != group->GetPaneList().GetEndIter(); it++) {
it->mTarget->SetVisible(true);
}
} else {
@@ -686,8 +685,7 @@ namespace ipl {
}
if (strcmp(scModuleData.langGroupLookup[region][i], langCodeBuf[scLangLookup[region][i]]) == 0) {
nw4r::lyt::Group* group = layout->FindGroupByName(scModuleData.langGroupLookup[region][i]);
nw4r::lyt::Group* const& groupView = group;
for (nw4r::lyt::PaneLinkList::Iterator it = groupView->GetPaneList().GetBeginIter(); it != groupView->GetPaneList().GetEndIter(); it++) {
for (nw4r::lyt::PaneLinkList::Iterator it = group->GetPaneList().GetBeginIter(); it != group->GetPaneList().GetEndIter(); it++) {
it->mTarget->SetVisible(true);
}
break;

View File

@@ -1,5 +1,3 @@
#define IPL_CHANNEL_SELECT_CPP
#include <decomp/ide.h>
#include "iplSceneUI.h"
@@ -45,7 +43,8 @@ namespace ipl {
return r;
}
inline f32 HermiteIntp<f32>::get() const {
template <>
f32 HermiteIntp<f32>::get() const {
f32 var_f27 = mFrame;
f32 var_f28 = 1.0f / mMaxFrame;
f32 r = (mStart * (1.0f + ((var_f28 * (var_f28 * (var_f28 * (var_f27 * (2.0f * var_f27 * var_f27))))) -
@@ -330,8 +329,8 @@ namespace ipl {
setSceneParentFlags(SCN_PARENTFLAG_DRAW | SCN_PARENTFLAG_CALC);
mOrthoTrans = math::VEC3(0.0f, 0.0f, 0.0f);
mOrthoScale = math::VEC2(1.0f, 1.0f);
unk_0xD8 = math::VEC3(0.0f, 0.0f, 0.0f);
unk_0xE4 = math::VEC2(1.0f, 1.0f);
nw4r::ut::Rect proj4x3;
System::getProjectionRect4x3(&proj4x3);
@@ -648,7 +647,7 @@ namespace ipl {
void ChannelSelect::draw() {
if (mState != STATE_INACTIVE && System::getSceneManager()->onDrawLayer(scene::DRAW_LAYER_DEFAULT)) {
if (mState == STATE_NORMAL_FADE_ZOOM || mState == STATE_NORMAL_DONE_FADE_ZOOM || mState == STATE_NORMAL_RESTART) {
utility::Graphics::setOrthoTransAndScale(mOrthoTrans, mOrthoScale);
utility::Graphics::setOrthoTransAndScale(unk_0xD8, unk_0xE4);
}
utility::Graphics::setOrtho();
@@ -1845,7 +1844,7 @@ namespace ipl {
initChanZoomParam(myVec, 1);
setChanZoomOrtho();
if (System::getChannelManager()->isDiskChannelReady()) {
if (System::getChannelManager()->isUnk_0x1B81()) {
if (System::getBS2Manager()->getIPLState() == bs2::IPL_STATE_RVL_GAME ||
System::getBS2Manager()->getIPLState() == bs2::IPL_STATE_DISK_UPDATE) {
if (mspDiskID != NULL) {
@@ -1857,7 +1856,7 @@ namespace ipl {
if (strncmp(diskID, mspDiskID, 4) == 0) {
if (strncmp(diskMaker, mspDiskMaker, 2) == 0) {
System::getChannelManager()->setDiskChannelReady(false);
System::getChannelManager()->setUnk_0x1B81(false);
}
}
}
@@ -1910,10 +1909,10 @@ namespace ipl {
u16 efbHeight;
if (mState == STATE_NORMAL_FADE_ZOOM || mState == STATE_NORMAL_DONE_FADE_ZOOM || mState == STATE_NORMAL_RESTART) {
nw4r::math::MTX44 mtx;
f32 right = mOrthoTrans.x + projRect.right / mOrthoScale.x;
f32 left = mOrthoTrans.x + projRect.left / mOrthoScale.x;
f32 bottom = mOrthoTrans.y - projRect.bottom / mOrthoScale.y;
f32 top = mOrthoTrans.y - projRect.top / mOrthoScale.y;
f32 right = unk_0xD8.x + projRect.right / unk_0xE4.x;
f32 left = unk_0xD8.x + projRect.left / unk_0xE4.x;
f32 bottom = unk_0xD8.y - projRect.bottom / unk_0xE4.y;
f32 top = unk_0xD8.y - projRect.top / unk_0xE4.y;
MTXOrtho(mtx, top, bottom, left, right, -100.0f, 100.0f);
nw4r::math::VEC4 vec4_in(vec.x, vec.y, 0.0f, 1.0f);
nw4r::math::VEC4 vec4;
@@ -1921,10 +1920,10 @@ namespace ipl {
fbWidth = rMode->fbWidth;
efbHeight = rMode->efbHeight;
f32 projectionWidth = projRect.GetWidth();
scissorX = ((1.0f + vec4.x) * fbWidth / 2) - ((mChanThumbOff_X * mOrthoScale.x) * (fbWidth / projectionWidth));
scissorY = (efbHeight - ((1.0f + vec4.y) * efbHeight / 2)) - (mChanThumbOff_Y * mOrthoScale.y);
scissorWidth = 2.0f * (mChanThumbOff_X * mOrthoScale.x) * (fbWidth / projectionWidth);
scissorHeight = 2.0f * (mChanThumbOff_Y * mOrthoScale.y);
scissorX = ((1.0f + vec4.x) * fbWidth / 2) - ((mChanThumbOff_X * unk_0xE4.x) * (fbWidth / projectionWidth));
scissorY = (efbHeight - ((1.0f + vec4.y) * efbHeight / 2)) - (mChanThumbOff_Y * unk_0xE4.y);
scissorWidth = 2.0f * (mChanThumbOff_X * unk_0xE4.x) * (fbWidth / projectionWidth);
scissorHeight = 2.0f * (mChanThumbOff_Y * unk_0xE4.y);
} else {
fbWidth = rMode->fbWidth;
efbHeight = rMode->efbHeight;
@@ -2003,8 +2002,8 @@ namespace ipl {
nw4r::ut::Rect projRect;
System::getProjectionRect(&projRect);
mOrthoTrans = math::VEC3((frames[0].x + frames[1].x) / 2, (frames[0].y + frames[2].y) / 2, 0.0f);
mOrthoScale = math::VEC2(projRect.GetWidth() / (frames[1].x - frames[0].x), projRect.GetHeight() / (frames[0].y - frames[2].y));
unk_0xD8 = math::VEC3((frames[0].x + frames[1].x) / 2, (frames[0].y + frames[2].y) / 2, 0.0f);
unk_0xE4 = math::VEC2(projRect.GetWidth() / (frames[1].x - frames[0].x), projRect.GetHeight() / (frames[0].y - frames[2].y));
}
int ChannelSelect::isInChannelPaneNames(const char* name) const {

View File

@@ -467,7 +467,7 @@ namespace ipl {
mpDiskBnrLayout->calc();
} else {
calcModuleChannel();
System::getChannelManager()->setDiskChannelReady(false);
System::getChannelManager()->setUnk_0x1B81(false);
}
if ((mState == STATE_NORMAL || mState == STATE_WAIT_TMD || mState == STATE_PREPARE_BOOT || mState == STATE_BOOT_SCENE) && !unk_0x90 &&
@@ -1220,7 +1220,7 @@ namespace ipl {
#pragma ppc_iro_level 0
void ChannelTitle::calcNormalParentalDialog() {
if (mChanSceneID == SCENE_DISK_CHANNEL &&
(System::getBS2Manager()->getIPLState() != bs2::IPL_STATE_RVL_GAME || System::getChannelManager()->isDiskChannelReady())) {
(System::getBS2Manager()->getIPLState() != bs2::IPL_STATE_RVL_GAME || System::getChannelManager()->isUnk_0x1B81())) {
mParentalState = PARENTAL_STATE_FAILED;
}
@@ -1767,7 +1767,7 @@ namespace ipl {
data.threadTerminated = mbModuleTerminated;
if (System::getNwc24Manager() == NULL || !System::getNwc24Manager()->isNewMessageThere(ES_TITLE_CODE(data.titleId))) {
data.mbHasNewMessage = false;
data.unk_0x1A = false;
}
System::getCSManager()->setData(data);
if (!System::getCSManager()->init(mpModuleFile, mpModuleThread)) {
@@ -2064,7 +2064,7 @@ namespace ipl {
break;
}
case DISK_STATE_WII_DISK_IDLE: {
if (BS2State != bs2::IPL_STATE_RVL_GAME || System::getChannelManager()->isDiskChannelReady()) {
if (BS2State != bs2::IPL_STATE_RVL_GAME || System::getChannelManager()->isUnk_0x1B81()) {
mDiskState = DISK_STATE_EJECT;
mpDiskBnrAnims[DISK_ANIM_GRP_ALL][DISK_ANIM_DISK_EJECT]->play();
mpDiskBnrLayout->GetRootPane()->SetVisible(true);

View File

@@ -1341,11 +1341,13 @@ namespace ipl {
wchar_t* titleName = System::getChannelManager()->getTitleName(
page, channelIndex, 0);
memcpy(titleNames + *titleCount * 0x2a, titleName, 0x2a);
++*titleCount;
u32 nextTitleCount = *titleCount + 1;
*titleCount = nextTitleCount;
if (bytes >= secondUsage[0] && blocks >= secondUsage[1]) {
return true;
if (bytes < secondUsage[0] || blocks < secondUsage[1]) {
continue;
}
return true;
}
}
}

View File

@@ -1118,7 +1118,7 @@ extern "C" void iplSDChannelTitle_updateScriptLoad(SDChannelTitle* scene) {
data.titleId = scene->mTitleId;
data.threadTerminated = scene->mbScriptFailed;
if (!System::getNwc24Manager() || !System::getNwc24Manager()->isNewMessageThere(static_cast<u32>(data.titleId & 0xffffffffULL))) {
data.mbHasNewMessage = false;
data.unk_0x1A = false;
}
System::getCSManager()->setData(data);
if (!System::getCSManager()->init(scene->mpScriptFile, scene->mpRsoThread)) {

View File

@@ -462,6 +462,7 @@ namespace ipl {
directPagePath = "index03.html";
break;
case 7:
default:
directPagePath = "index01.html";
break;
}
@@ -1605,10 +1606,10 @@ namespace ipl {
OSReport("initKeyboard formId:%d\n", mpWiiSettingData->data[0x11]);
memset(unk_0x938, 0, sizeof(unk_0x938));
int stringLimit;
keyboard::Manager::KeyboardType keyboardType = keyboard::Manager::LETTER;
int rowLimit;
int invalidInput = 0;
keyboard::Manager::KeyboardType keyboardType = keyboard::Manager::LETTER;
int rowLimit = 0;
int stringLimit = 0;
int productArea = static_cast<s8>(SCGetProductArea());
switch (mpWiiSettingData->data[0x11]) {
@@ -1710,16 +1711,14 @@ namespace ipl {
}
if (productArea == 11) {
void* systemDic = System::getKeyboard()->getZiSystemDic();
void* oemDic = System::getKeyboard()->getZiOemDic();
System::getKeyboard()->memoFrm()->setZiDictionary(oemDic, systemDic);
System::getKeyboard()->memoFrm()->setZiDictionary(System::getKeyboard()->getZiOemDic(), System::getKeyboard()->getZiSystemDic());
}
keyboard::Manager::KeyboardSetting setting;
setting.rowLimit = rowLimit;
setting.type = keyboardType;
setting.wcString = reinterpret_cast<const wchar_t*>(unk_0x938);
setting.stringLimit = stringLimit;
setting.type = keyboardType;
setting.rowLimit = rowLimit;
System::getKeyboard()->start(0, setting);
if (invalidInput != 0) {
@@ -1739,6 +1738,7 @@ namespace ipl {
if (mKeyboardState.pressOK) {
onTextInputOK();
u8 formId = mpWiiSettingData->data[0x11];
formText = NULL;
switch (formId) {
case 1:
formText = mpStringBuffer->nickname;
@@ -1809,8 +1809,7 @@ namespace ipl {
memcpy(mpStringBuffer->asterisks, mpStringBuffer->securityKey, sizeof(mpStringBuffer->securityKey));
mpStringBuffer->asterisks[0x41] = 0;
while (mpStringBuffer->asterisks[index] != 0) {
mpStringBuffer->asterisks[index] = '*';
index++;
mpStringBuffer->asterisks[index++] = '*';
}
if (index > 0x20) {
mpStringBuffer->asterisks[0x20] = '\n';
@@ -1822,6 +1821,7 @@ namespace ipl {
}
} else {
u8 formId = mpWiiSettingData->data[0x11];
formText = NULL;
switch (formId) {
case 1:
formText = mpStringBuffer->nickname;

View File

@@ -30,7 +30,7 @@ namespace ipl {
SettingSelect::SettingSelect(EGG::Heap* heap, int arg)
: Base(heap), ::gui::EventHandler(), mState(STATE_WAIT_BUTTON_FADE_IN), mPrevState(STATE_WAIT_BUTTON_FADE_IN), mSettingArg(arg),
mpLayout(NULL), mpLayoutFile(NULL), mpGui(NULL), mPendingSceneId(0), mExitSeqStep(0) {
mpLayout(NULL), mpLayoutFile(NULL), mpGui(NULL), unk_0x90(0), unk_0x94(0) {
setSceneParentFlags(SCN_PARENTFLAG_CALC | SCN_PARENTFLAG_DRAW);
}
@@ -222,7 +222,7 @@ namespace ipl {
void SettingSelect::stt_1st_fadeout() {
if (is_stopped_all_anm()) {
if (mPendingSceneId != 0) {
if (unk_0x90 != 0) {
System::getFader()->fadeOut();
CHANGE_STATE(STATE_WAIT_BLACK_OUT);
} else {
@@ -247,7 +247,7 @@ namespace ipl {
void SettingSelect::stt_2nd_fadeout() {
if (is_stopped_all_anm()) {
if (mPendingSceneId != 0) {
if (unk_0x90 != 0) {
CHANGE_STATE(STATE_WAIT_CHILD);
reset_gui();
} else {
@@ -309,7 +309,7 @@ namespace ipl {
case STATE_1ST_NORMAL: {
System::getChannelManager()->refreshAsync();
System::getFader()->fadeOut();
mPendingSceneId = SCENE_BOARD;
unk_0x90 = 4;
reserveAllSceneDestruction(SCENE_BOARD, NULL);
@@ -369,8 +369,8 @@ namespace ipl {
int backAnim = -1;
int inAnim = -1;
switch (mPendingSceneId) {
case SCENE_MEMORY: {
switch (unk_0x90) {
case 13: {
#ifndef KOREAN_BUILD
backAnim = ANIM_WII_SAVE_DATA_BACK;
inAnim = ANIM_GC_SAVE_DATA_IN;
@@ -380,12 +380,12 @@ namespace ipl {
#endif
break;
}
case SCENE_MEMORY_CARD: {
case 14: {
backAnim = ANIM_GC_SAVE_DATA_BACK;
inAnim = ANIM_WII_SAVE_DATA_IN;
break;
}
case SCENE_CHANNEL_EDIT: {
case 12: {
backAnim = ANIM_CHANNEL_BACK;
inAnim = ANIM_SAVE_DATA_IN;
if (mSettingArg == SettingSelectArg::ARG_START_SAVE_DATA) {
@@ -404,14 +404,14 @@ namespace ipl {
void SettingSelect::stt_wait_child_anm() {
if (is_stopped_all_anm()) {
switch (mPendingSceneId) {
case SCENE_CHANNEL_EDIT: {
switch (unk_0x90) {
case 12: {
static_cast<SettingButton*>(System::getScene(SCENE_SETTING_BUTTON))->showWii();
CHANGE_STATE(STATE_2ND_NORMAL);
break;
}
case SCENE_MEMORY:
case SCENE_MEMORY_CARD: {
case 13:
case 14: {
static_cast<SettingButton*>(System::getScene(SCENE_SETTING_BUTTON))->showWii();
#ifndef KOREAN_BUILD
CHANGE_STATE(STATE_3RD_NORMAL);
@@ -422,7 +422,7 @@ namespace ipl {
}
}
mPendingSceneId = 0;
unk_0x90 = 0;
}
}
@@ -587,7 +587,7 @@ namespace ipl {
break;
}
case BTN_SETTING: {
mPendingSceneId = SCENE_SETTING;
unk_0x90 = 18;
flashAnim = ANIM_SETTING_FLASH;
outAnim = ANIM_DATA_MANAGE_OUT;
reserveAllSceneDestruction(SCENE_SETTING, (void*)Setting::ARG_NORMAL_PAGE);
@@ -596,7 +596,7 @@ namespace ipl {
}
case BTN_SAVEDATA: {
#ifdef KOREAN_BUILD
mPendingSceneId = SCENE_MEMORY;
unk_0x90 = 13;
#endif
flashAnim = ANIM_SAVE_DATA_FLASH;
outAnim = ANIM_CHANNEL_OUT;
@@ -611,7 +611,7 @@ namespace ipl {
break;
}
case BTN_CHANNEL: {
mPendingSceneId = SCENE_CHANNEL_EDIT;
unk_0x90 = 12;
flashAnim = ANIM_CHANNEL_FLASH;
outAnim = ANIM_SAVE_DATA_OUT;
createChildScene(SCENE_CHANNEL_EDIT, this, NULL);
@@ -623,7 +623,7 @@ namespace ipl {
break;
}
case BTN_WII_SAVE: {
mPendingSceneId = SCENE_MEMORY;
unk_0x90 = 13;
flashAnim = ANIM_WII_SAVE_DATA_FLASH;
outAnim = ANIM_GC_SAVE_DATA_OUT;
createChildScene(SCENE_MEMORY, this, NULL);
@@ -632,7 +632,7 @@ namespace ipl {
break;
}
case BTN_GC_SAVE: {
mPendingSceneId = SCENE_MEMORY_CARD;
unk_0x90 = 14;
flashAnim = ANIM_GC_SAVE_DATA_FLASH;
outAnim = ANIM_WII_SAVE_DATA_OUT;
createChildScene(SCENE_MEMORY_CARD, this, NULL);
@@ -689,7 +689,7 @@ namespace ipl {
}
void SettingSelect::calc_exit_sequence() {
switch (mExitSeqStep) {
switch (unk_0x94) {
case 0: {
prepare_exit_abort();
break;
@@ -720,13 +720,13 @@ namespace ipl {
System::getBS2Manager()->abort();
System::stopReceiveSchedule();
mExitSeqStep = 1;
unk_0x94 = 1;
}
}
void SettingSelect::wait_decide_se() {
if (!snd::getSystem()->isSEActive("WIPL_SE_DECIDE")) {
mExitSeqStep = 2;
unk_0x94 = 2;
}
}
@@ -734,7 +734,7 @@ namespace ipl {
__WPADReconnect(TRUE);
snd::getSystem()->stopAllSound(20);
System::getFader()->fadeOut();
mExitSeqStep = 3;
unk_0x94 = 3;
}
void SettingSelect::finish_exit_reboot() {

View File

@@ -91,7 +91,7 @@ namespace ipl {
extern "C" const u32 scLangLookup__Q23ipl7channel[][16];
Manager::Manager(EGG::Heap* heap)
: mpHeap(heap), mState(INIT), mbCanRefresh(0), mbDiskChannelReady(false), mbSetDiskBannerInfo(false), mPrevNandResult(NAND_RESULT_OK),
: mpHeap(heap), mState(INIT), mbCanRefresh(0), unk_0x1B81(false), mbSetDiskBannerInfo(false), mPrevNandResult(NAND_RESULT_OK),
mbLoadedChJump(false) {
mpLockedMsgFile = NULL;
@@ -951,7 +951,7 @@ namespace ipl {
int state = System::getBS2Manager()->getIPLState();
if (state == bs2::IPL_STATE_RVL_GAME && mBS2State != bs2::IPL_STATE_RVL_GAME) {
mbSetDiskBannerInfo = setDiskBannerInfo(false);
mbDiskChannelReady = true;
unk_0x1B81 = true;
} else if (state != bs2::IPL_STATE_RVL_GAME && state != mBS2State) {
setDiskBannerInfo(true);
}
@@ -1076,7 +1076,7 @@ namespace ipl {
ARCFileInfo readFile;
if (unk) {
mbDiskChannelReady = false;
unk_0x1B81 = false;
}
int diskPage, diskIndex;

View File

@@ -130,24 +130,24 @@ namespace ipl {
}
void ipl::controller::Revolution::read() {
if (!isValidDpd()) {
mpKpadStatus->pos.y = 1.0f / 0.0f;
mpKpadStatus->pos.x = 1.0f / 0.0f;
mpKpadStatus->speed = 0.0f;
mpKpadStatus->vec.y = 0.0f;
mpKpadStatus->vec.x = 0.0f;
mpStatus->pos.y = 1.0f / 0.0f;
mpStatus->pos.x = 1.0f / 0.0f;
mpStatus->speed = 0.0f;
mpStatus->vec.y = 0.0f;
mpStatus->vec.x = 0.0f;
}
mbWasPinching = mbPinching;
mbPrevPinch = mbPinch;
if (isValidBtn()) {
if (mbWasPinching == 0) {
if (mbPrevPinch == 0) {
if (down(0x800) && down(0x400)) {
mbPinching = 1;
mbPinch = 1;
}
} else if (!down(0x800) || !down(0x400)) {
mbPinching = 0;
mbPinch = 0;
}
} else {
mbPinching = 0;
mbPinch = 0;
}
Base::read();
@@ -157,17 +157,17 @@ namespace ipl {
return false;
}
return (mpKpadStatus->wpad_err == 0 || mpKpadStatus->wpad_err == -7) && mpKpadStatus->dpd_valid_fg != 0;
return (mpStatus->wpad_err == 0 || mpStatus->wpad_err == -7) && mpStatus->dpd_valid_fg != 0;
}
bool ipl::controller::Revolution::isValidBtn() const {
u8 val = mpKpadStatus->wpad_err;
u8 val = mpStatus->wpad_err;
return (u8)(val + 7) <= 7 && ((1 << (val + 7)) & 0xA1) != 0;
}
bool ipl::controller::Revolution::down(u32 mButton) const {
bool ret = false;
if (isValidBtn()) {
if (mpKpadStatus->hold & (mButton & 0xFFFF)) {
if (mpStatus->hold & (mButton & 0xFFFF)) {
ret = true;
}
}
@@ -177,7 +177,7 @@ namespace ipl {
ipl::math::VEC2 ipl::controller::Revolution::getDpdProjectionPos() const {
math::VEC2 ret;
Vec2 dest;
Vec2 src = {mpKpadStatus->pos.x, mpKpadStatus->pos.y};
Vec2 src = {mpStatus->pos.x, mpStatus->pos.y};
nw4r::ut::Rect nw4r_rect; // constructor shouldn't be inlined
Rect kpad_rect;
@@ -216,8 +216,8 @@ namespace ipl {
y = fy;
}
ipl::controller::Classic::Classic(int arg0, KPADStatus& arg1) : Revolution(arg0, arg1) {
mClassicCursorPos.x = 0.01f;
mClassicCursorPos.y = 0.01f;
mClassicCursor.x = 0.01f;
mClassicCursor.y = 0.01f;
mClassicCursorTimer = 0;
}
ipl::controller::Base::~Base() {
@@ -230,14 +230,14 @@ namespace ipl {
}
void ipl::controller::Classic::read() {
if (!Revolution::isValidDpd()) {
math::VEC2 lstick(mpKpadStatus->ex_status.cl.lstick.x, mpKpadStatus->ex_status.cl.lstick.y);
math::VEC2 lstick(mpStatus->ex_status.cl.lstick.x, mpStatus->ex_status.cl.lstick.y);
if (lstick.x * lstick.x + lstick.y * lstick.y > 0.0036f) {
mClassicCursorPos.x = math::abs_clamp(mClassicCursorPos.x + mpKpadStatus->ex_status.cl.lstick.x * 0.05f, 1.8f);
mClassicCursorPos.y = math::abs_clamp(mClassicCursorPos.y - mpKpadStatus->ex_status.cl.lstick.y * 0.05f, 1.2f);
mClassicCursor.x = math::abs_clamp(mClassicCursor.x + mpStatus->ex_status.cl.lstick.x * 0.05f, 1.8f);
mClassicCursor.y = math::abs_clamp(mClassicCursor.y - mpStatus->ex_status.cl.lstick.y * 0.05f, 1.2f);
}
math::VEC2 rstick = math::VEC2(mpKpadStatus->ex_status.cl.rstick.x, mpKpadStatus->ex_status.cl.rstick.y);
math::VEC2 rstick = math::VEC2(mpStatus->ex_status.cl.rstick.x, mpStatus->ex_status.cl.rstick.y);
if (getClassicHoldFlag() != 0 || lstick.x * lstick.x + lstick.y * lstick.y > 0.0036f ||
rstick.x * rstick.x + rstick.y * rstick.y > 0.0036f) {
mClassicCursorTimer = 180;
@@ -247,15 +247,15 @@ namespace ipl {
mClassicCursorTimer = 0;
}
} else {
mClassicCursorPos.y = 0.01f;
mClassicCursorPos.x = 0.01f;
mClassicCursor.y = 0.01f;
mClassicCursor.x = 0.01f;
mClassicCursorTimer = 0;
}
Revolution::read();
}
int ipl::controller::Classic::getClassicHoldFlag() const {
return mpKpadStatus->ex_status.cl.hold;
return mpStatus->ex_status.cl.hold;
}
template <>
f32 ipl::math::abs_clamp<f32>(const f32& x, const f32& y) {
@@ -270,7 +270,7 @@ namespace ipl {
ipl::math::VEC2 ipl::controller::Classic::getHorizon() const {
math::VEC2 ret;
if (Revolution::isValidDpd()) {
ret.set(mpKpadStatus->horizon.x, mpKpadStatus->horizon.y);
ret.set(mpStatus->horizon.x, mpStatus->horizon.y);
} else {
ret.x = 1.0f;
ret.y = -0.2679492f;
@@ -280,9 +280,9 @@ namespace ipl {
ipl::math::VEC2 ipl::controller::Classic::getDpdPos() const {
math::VEC2 ret;
if (Revolution::isValidDpd()) {
ret.set(mpKpadStatus->pos.x, mpKpadStatus->pos.y);
ret.set(mpStatus->pos.x, mpStatus->pos.y);
} else if (mClassicCursorTimer != 0) {
ret = mClassicCursorPos;
ret = mClassicCursor;
} else {
ret.x = (1.0f / 0.0f);
ret.y = (1.0f / 0.0f);
@@ -296,9 +296,9 @@ namespace ipl {
ipl::math::VEC2 ipl::controller::Classic::getDpdProjectionPos() const {
math::VEC2 ret;
if (Revolution::isValidDpd()) {
ret.set(mpKpadStatus->pos.x, mpKpadStatus->pos.y);
ret.set(mpStatus->pos.x, mpStatus->pos.y);
} else if (mClassicCursorTimer != 0) {
ret = mClassicCursorPos;
ret = mClassicCursor;
} else {
ret.set(1.0f / 0.0f, 1.0f / 0.0f);
}
@@ -463,43 +463,43 @@ void ipl::controller::Master::setForceInvalid(bool flag) {
return mChan;
}
KPADStatus* ipl::controller::Revolution::getKPADStatus() const {
return mpKpadStatus;
return mpStatus;
}
f32 ipl::controller::Revolution::getDpdDistance() const {
return mpKpadStatus->dist;
return mpStatus->dist;
}
int ipl::controller::Revolution::getReleaseFlag() const {
return mpKpadStatus->release;
return mpStatus->release;
}
int ipl::controller::Revolution::getTrigFlag() const {
return mpKpadStatus->trig;
return mpStatus->trig;
}
int ipl::controller::Revolution::getHoldFlag() const {
return mpKpadStatus->hold;
return mpStatus->hold;
}
int ipl::controller::Revolution::pinchOffTrg() const {
int ret = 0;
if (isValidBtn() && mbPinching == 0 && mbWasPinching != 0) {
if (isValidBtn() && mbPinch == 0 && mbPrevPinch != 0) {
ret = 1;
}
return ret;
}
int ipl::controller::Revolution::pinch() const {
int ret = 0;
if (isValidBtn() && mbPinching != 0) {
if (isValidBtn() && mbPinch != 0) {
ret = 1;
}
return ret;
}
int ipl::controller::Revolution::pinchTrg() const {
int ret = 0;
if (isValidBtn() && mbPinching != 0 && mbWasPinching == 0) {
if (isValidBtn() && mbPinch != 0 && mbPrevPinch == 0) {
ret = 1;
}
return ret;
}
bool ipl::controller::Revolution::repeat(u32 button) const {
return down(button) && (mpKpadStatus->hold & 0x80000000) != 0;
return down(button) && (mpStatus->hold & 0x80000000) != 0;
}
BOOL ipl::controller::Classic::isValidDpdClassic() const {
return mClassicCursorTimer != 0;
@@ -512,16 +512,16 @@ void ipl::controller::Master::setForceInvalid(bool flag) {
return (Revolution::isValidDpd() != 0) || (mClassicCursorTimer != 0);
}
int ipl::controller::Classic::getClassicReleaseFlag() const {
return mpKpadStatus->ex_status.cl.release;
return mpStatus->ex_status.cl.release;
}
int ipl::controller::Classic::getClassicTrigFlag() const {
return mpKpadStatus->ex_status.cl.trig;
return mpStatus->ex_status.cl.trig;
}
bool ipl::controller::Classic::upTrg(u32 button) const {
bool ret = false;
if (isValidBtn()) {
bool pressed = true;
KPADStatus* status = mpKpadStatus;
KPADStatus* status = mpStatus;
if ((status->release & (button & 0xFFFF)) == 0) {
if ((status->ex_status.cl.release & (button >> 16)) == 0) {
pressed = false;
@@ -537,7 +537,7 @@ void ipl::controller::Master::setForceInvalid(bool flag) {
bool ret = false;
if (isValidBtn()) {
bool pressed = true;
KPADStatus* status = mpKpadStatus;
KPADStatus* status = mpStatus;
if ((status->trig & (button & 0xFFFF)) == 0) {
if ((status->ex_status.cl.trig & (button >> 16)) == 0) {
pressed = false;
@@ -553,8 +553,8 @@ void ipl::controller::Master::setForceInvalid(bool flag) {
bool ret = false;
if (isValidBtn()) {
bool pressed = true;
if ((mpKpadStatus->hold & (button & 0xFFFF)) == 0) {
if ((mpKpadStatus->ex_status.cl.hold & (button >> 16)) == 0) {
if ((mpStatus->hold & (button & 0xFFFF)) == 0) {
if ((mpStatus->ex_status.cl.hold & (button >> 16)) == 0) {
pressed = false;
}
}
@@ -565,15 +565,15 @@ void ipl::controller::Master::setForceInvalid(bool flag) {
return ret;
}
ipl::math::VEC2 ipl::controller::Revolution::getHorizon() const {
return math::VEC2(mpKpadStatus->horizon.x, mpKpadStatus->horizon.y);
return math::VEC2(mpStatus->horizon.x, mpStatus->horizon.y);
}
ipl::math::VEC2 ipl::controller::Revolution::getDpdPos() const {
return math::VEC2(mpKpadStatus->pos.x, mpKpadStatus->pos.y);
return math::VEC2(mpStatus->pos.x, mpStatus->pos.y);
}
bool ipl::controller::Revolution::upTrg(u32 button) const {
bool ret = false;
if (isValidBtn()) {
if (mpKpadStatus->release & (button & 0xFFFF)) {
if (mpStatus->release & (button & 0xFFFF)) {
ret = true;
}
}
@@ -582,7 +582,7 @@ void ipl::controller::Master::setForceInvalid(bool flag) {
bool ipl::controller::Revolution::downTrg(u32 button) const {
bool ret = false;
if (isValidBtn()) {
if (mpKpadStatus->trig & (button & 0xFFFF)) {
if (mpStatus->trig & (button & 0xFFFF)) {
ret = true;
}
}

View File

@@ -152,9 +152,9 @@ namespace ipl {
}
Revolution::Revolution(int chan, int type, KPADStatus& status) : Base(chan, type, status) {
mbPinching = 0;
mbWasPinching = 0;
mpKpadStatus = &status;
mbPinch = 0;
mbPrevPinch = 0;
mpStatus = &status;
}
Interface* Manager::getMasterController() {

View File

@@ -1,67 +0,0 @@
# Data d16 attempts
HEAD and fetched origin/main are 6f49df32. Both owned units are unchanged on origin/main. Scope is data symbols only inside the two assigned split ranges; no source/code/configure/split changes.
Baseline: MyTiManager instruction-exact 91/91, code 20196/20196, data 148/1132; fa/pf_path instruction-exact 27/27, code 11872/11872, data 8/56. Pools identical, 7 and 0 strings. Initial pool commands with unit paths failed because this version of pool_diff accepts object paths; corrected commands passed before any mutation.
Fresh ELF audit: MyTiManager source .data now contains a genuine 36-byte weak Animation vtable at +0x3b0. Target +0x3b0..0x3d8 remains zero without outgoing relocations. Canonical retained Animation vtable is 0x8165D258, with seven real virtual slots. This improves the earlier evidence in data-d4, whose source ended at +0x3b0. The current source ends at +0x3d4; the last four target bytes are zero section alignment. Tail ownership will be tested only with this type/relocation evidence.
fa/pf_path: both .sdata byte arrays are identical for all 48 bytes. The target null literal at +4 is recorded as four bytes, compiler char[2] is two bytes. The target initializer at +40 is split into two single bytes, compiler emits one two-byte const array, used by lbz with addends 0 and 1. The final target space literal is recorded as two bytes, compiler emits a four-byte narrow char string with explicit trailing zero bytes. .sdata2 has two identical two-byte arrays similarly split into individual byte symbols; trailing two bytes are zero alignment. No initializer difference or non-exact function exists.
## pf_path literal extent proof
lbl_81698394 at unchanged .sdata:0x81698394 is char[4] literal `"\x20\0\0"`, not char[2]: PFPATH_CheckExtShortName loads it at .text+0x2b78 and +0x2bcc and passes it to PFSTR_StrNCmp; the compiled @2271 has size 4 and bytes 20000000 at the identical +0x2c offset. Extent 2 -> 4 recovers the complete real string including its explicit two zeros and implicit terminator. No address, section size, source object or total_data changes.
Minimal correction selected: other pf_path aliases and initializer sublabels already compare correctly through exact section bytes. Leave all names and other extents alone.
## MyTiManager tail extent proof
lbl_816681E8 at unchanged .data:0x816681E8 covers the discarded weak Animation vtable footprint, size 0x24 rather than 0x28: the compiler emits __vt__Q39textinput4util9Animation at identical .data+0x3b0 with two ABI header words and seven virtual slots, ending +0x3d4; include/keyboard/tiUtil.h declares exactly those seven methods, and the retained retail Animation vtable at 0x8165D258 also has size 0x24 and precisely the same seven relocation targets. Target createMemoInputForm .text+0x9de/+0x9fe and createLetterInputForm +0xb06/+0xb26 refer to the retained canonical table, while source equivalents refer to this weak copy; this demonstrates linker deduplication. The four unrelocated zero bytes at 0x8166820c..0x81668210 align the next unit to eight bytes and are not an eighth virtual method. Correct only the extent, keep the existing label, all addresses, all 984 section bytes and total_data 1132. No source vtable suppressed and no weak-pointer bytes fabricated.
The old log could not infer the tail when its source emitted no Animation table. The current source now supplies independent table-layout evidence. Every source tail relocation is an extra linker-discarded weak entry; no target relocation is removed or altered. The goal depends on correcting true object versus section-alignment ownership, not inventing a name for zero bytes.
## Iteration measurements
After pf_path extent correction, fresh objdiff report: matched_data 8 -> 56/56, .sdata and .sdata2 both 100%, code 11872/11872, functions 27/27. After MyTiManager correction, fresh objdiff report: matched_data 148 -> 1132/1132, all six non-text sections 100%, code 20196/20196, functions 91/91. Correct source-only Ninja targets subsequently report no work to do. Extracted object paths are outputs of SPLIT, not explicit Ninja targets; the two commands naming them reported unknown targets after the required split succeeded, and were corrected to source-only targets before final verification.
Objdiff v3.4.5 source inspection confirms diff_data_section uses the greatest owned-symbol endpoint, excluding physical section-end alignment, and accepts exact raw section bytes when every target relocation matches; extra source weak relocations do not veto this route. Both corrections describe actual object extents and preserve every physical section byte. Names need no correction for these units.
No open function exists in either unit: all 118 functions were exact before this data task. No compiler experiments, code changes, dummy objects, fake virtual slots, forced placement, symbol renames, configure changes, split changes, or remote mutations. The earlier broad requirement for new exact functions does not apply to these explicitly assigned already-code-100% units; preserve exact counts instead.
## Final clean gate and audit
Full non-quick two-unit gate rebuilt 43U from scratch and passed. Fresh post-build pool comparisons remain identical. All 91 MyTiManager and 27 pf_path functions were checked individually with ctxdiff.py: every one reports diffs 0 and identical instruction counts. Output is /tmp/data-d16.ctxdiff-all.txt.
Live progress and build/43U/report.json regenerated after the gate. Both units matched_data == unchanged total_data, code == unchanged total_code, and every section reports 100%. Source bodies and every symbol name/address/section are unchanged; an automated line-by-line config audit confirms exactly the two extent corrections proved above. No remaining non-exact functions or unresolved non-text sections.
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/keyboard/MyTiManager] pool: IDENTICAL
[src/keyboard/MyTiManager] objdiff: code 20196/20196 data 1132/1132 functions 91/91 fuzzy 100.0000 linked code 20196
[src/keyboard/MyTiManager] instruction-exact functions: 91/91
[src/keyboard/MyTiManager] section .bss size 72 match 100.0
[src/keyboard/MyTiManager] section .ctors size 4 match 100.0
[src/keyboard/MyTiManager] section .data size 984 match 100.0
[src/keyboard/MyTiManager] section .sbss size 16 match 100.0
[src/keyboard/MyTiManager] section .sdata size 24 match 100.0
[src/keyboard/MyTiManager] section .sdata2 size 32 match 100.0
[src/keyboard/MyTiManager] section .text size 20196 match 100.0
[src/keyboard/MyTiManager] baseline: code 20196/20196 data 148 functions 91 fuzzy 100.0000
[libs/RVL_SDK/src/fa/pf_path] pool: IDENTICAL
[libs/RVL_SDK/src/fa/pf_path] objdiff: code 11872/11872 data 56/56 functions 27/27 fuzzy 100.0000 linked code 11872
[libs/RVL_SDK/src/fa/pf_path] instruction-exact functions: 27/27
[libs/RVL_SDK/src/fa/pf_path] section .sdata size 48 match 100.0
[libs/RVL_SDK/src/fa/pf_path] section .sdata2 size 8 match 100.0
[libs/RVL_SDK/src/fa/pf_path] section .text size 11872 match 100.0
[libs/RVL_SDK/src/fa/pf_path] baseline: code 11872/11872 data 8 functions 27 fuzzy 100.0000
regressions vs baseline: 0
global matched_code_percent: 90.94304 -> 90.94304
global fuzzy_match_percent: 99.58742 -> 99.58742
global complete_code_percent: 73.73083 -> 73.73083
global matched_data_percent: 99.36639 -> 99.42271
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
note: config touched: config/43U/symbols.txt (orchestrator reviews every config/symbols change)
GATE PASS
```

View File

@@ -1,48 +0,0 @@
# ChannelSelect native linking
Baseline: HEAD f7b1b9b0, Equivalent, DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. Unit code 25668/25668, data 2336/2336, functions 102/102. Existing untracked fresh1.attempts.md left alone.
1. Set only ChannelSelect to Matching to locate the first linked-byte divergence.
Matching SHA1 f045a95026c3ca34039d0d9064fad33832ce581a. First DOL mismatch at file 0x5ba, address 0x8133009a in __start; relocation points to data shifted by 0x40. nm and ELF comparison show the first text layout change at createChannelThumbnails, as recorded in the exact symbol table below. Extra weak Interporation<float> destructor is 0x40 bytes, plus its vtable; neither exists in the target symbols. .text grows 0x40. Pool identical, 98 strings.
/tmp/link1.baseline.elf: createChannelThumbnails__Q33ipl5scene13ChannelSelectFv 0x813abcc4 size 0x5c.
/tmp/link1.matching.main.elf: createChannelThumbnails__Q33ipl5scene13ChannelSelectFv 0x813abd04 size 0x5c.
/tmp/link1.matching.main.elf: __dt__Q33ipl4math16Interporation<f>Fv 0x813abcc4 size 0x40.
2. Model the scalar Hermite specialization as a direct FrameController subclass, with its destructor declared out of line, matching the existing scalar specialization used by ChannelTitle and the target ownership at 0x81363c10. Scope the new specialization to IPL_CHANNEL_SELECT_CPP. Preserve inline init and get calculations. This avoids instantiating a nonexistent Interporation<float> destructor or vtable.
Result: all 102 functions and data still 100%; other unit reports unchanged. DOL SHA1 acdfd504572753800958ecd275825fdc19bb92c1. Text now correct but .data is 32 bytes short: scalar table and base table reservations were removed. Real data/vtable pointers up through ChannelSelect table still identical.
3. Keep the original Hermite primary template and specialize only scalar Interporation as a novtable base, retaining its real start/end fields and methods. The target inlined constructor stores only the derived vtable; the extra base destructor had no target owner. Test whether suppressing base vtable use lets the linker discard this extra destructor while retaining ordinary compiler-emitted data reservations.
Result: SHA1 f7cdb8937b2638367aa0479f20a880cd063d06bb. Removing the scalar base vtable use strips the 64-byte extra destructor, but removes a 16-byte data reservation; createDiskLayout remains instruction exact.
4. Restore a direct scalar Hermite specialization, now with an inline empty destructor as in the target scalar destructor. Declare FrameController::calc inline only in this TU to test normal weak base-vtable emission. This preserves the ordinary scalar and FrameController vtables without defining or retaining any fake object. Target scalar construction only sets the derived table, destructor is empty; the target data has 32 bytes of discarded weak tables after the ChannelSelect vtable and before the GUI table reservations.
Result: DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d with ChannelSelect Matching. Scalar and FrameController weak tables are compiler-emitted and deduplicated against their existing earlier owners; no Interporation<float> symbol remains. All 102 objdiff functions exact, code 25668/25668, data 2336/2336. Every other unit report is byte-for-byte equal as JSON to the initial live baseline. pool_diff identical, 98 strings; createDiskLayout 168/168 instructions, diffs 0; VEC3 Hermite destructor 16/16 instructions, diffs 0.
Validation: running the full clean gate, full build/43U/ok, and independent checks of all 102 function instruction streams. Inline FrameController declaration keeps the implementation in its existing owning TU and requests normal weak-vtable emission here. No forced sections, data padding, new assembly, label aliases, or force-active changes.
Final clean gate output:
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/scene/channelSelect/iplChannelSelect] pool: IDENTICAL
[src/scene/channelSelect/iplChannelSelect] objdiff: code 25668/25668 data 2336/2336 functions 102/102 fuzzy 100.0000 linked code 25668
[src/scene/channelSelect/iplChannelSelect] instruction-exact functions: 102/102
[src/scene/channelSelect/iplChannelSelect] section .data size 2144 match 100.0
[src/scene/channelSelect/iplChannelSelect] section .rodata size 16 match 100.0
[src/scene/channelSelect/iplChannelSelect] section .sbss size 8 match 100.0
[src/scene/channelSelect/iplChannelSelect] section .sdata size 80 match 100.0
[src/scene/channelSelect/iplChannelSelect] section .sdata2 size 88 match 100.0
[src/scene/channelSelect/iplChannelSelect] section .text size 25668 match 100.0
[src/scene/channelSelect/iplChannelSelect] baseline: code 25668/25668 data 2336 functions 102 fuzzy 100.0000
regressions vs baseline: 0
global matched_code_percent: 90.80962 -> 90.80962
global fuzzy_match_percent: 99.58569 -> 99.58569
global complete_code_percent: 72.50912 -> 73.36610
global matched_data_percent: 99.36639 -> 99.36639
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
note: config touched: configure.py (orchestrator reviews every config/symbols change)
GATE PASS
```
Explicit ninja build/43U/ok passes. Regenerated live report: all other unit records unchanged from the initial snapshot. All 102 ctxdiff.py runs report identical instruction counts and diffs 0; no open function remains. DOL bytes identical to orig/43U/00000008.app, SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. Functions 102/102 -> 102/102, code 25668/25668 -> 25668/25668, data 2336/2336 -> 2336/2336, linked code 0 -> 25668.

View File

@@ -1,39 +0,0 @@
# ChannelObj native linking
Baseline HEAD 8864436c, Equivalent; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d.
Read PR #934 native weak emission fix. Baseline report and ELF saved under /tmp/link3.*.
1. Set only ChannelObj to Matching and measure the first linked divergence.
Result: Matching immediately produces DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. Entire DOL is byte-identical to orig/43U/00000008.app; there is no first differing byte or shifted target symbol to investigate. Pool identical, 20/20 strings. No source/header emission changes required after the near1c landing.
2. Run the final clean gate, explicit build/43U/ok, all 56 ctxdiff checks, and compare every other unit with the initial report.
Final clean gate passes; explicit ninja build/43U/ok passes. Objdiff code 10924/10924, data 2216/2216, functions 56/56; linked code 10924 and linked data 2216, both 100%. All 1026 other unit records are identical to the initial live report.
Instruction-check caveat: gate and ctxdiff report 55/56 because odiff.dis reads operands[0].imm for a conditional branch. In calcCursorAnim, branches at instruction indices 11, 21 and 22 use cr1, so operand zero is a register, not the branch target. Source function starts at object offset 0x1e08, original at 0x1cf8. The checker subtracts those different offsets from the register number 13. Actual instructions are identical: 41860014, 41860010, 40840014. Entire 240-byte calcCursorAnim bodies have SHA1 35d649cf56bd349a345a7f3da15fc3d80ac8c508 in both objects. A separate Capstone comparison using PPC_OP_IMM for branch targets verifies all 56/56 instruction streams. No repository or external verification tool was edited.
Final clean gate output:
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/scene/channelSelect/iplChannelObj] pool: IDENTICAL
[src/scene/channelSelect/iplChannelObj] objdiff: code 10924/10924 data 2216/2216 functions 56/56 fuzzy 100.0000 linked code 10924
[src/scene/channelSelect/iplChannelObj] instruction-exact functions: 55/56
[src/scene/channelSelect/iplChannelObj] section .data size 1240 match 100.0
[src/scene/channelSelect/iplChannelObj] section .rodata size 784 match 100.0
[src/scene/channelSelect/iplChannelObj] section .sdata size 120 match 100.0
[src/scene/channelSelect/iplChannelObj] section .sdata2 size 72 match 100.0
[src/scene/channelSelect/iplChannelObj] section .text size 10924 match 100.0
[src/scene/channelSelect/iplChannelObj] baseline: code 10924/10924 data 2216 functions 56 fuzzy 100.0000
regressions vs baseline: 0
global matched_code_percent: 90.94304 -> 90.94304
global fuzzy_match_percent: 99.58742 -> 99.58742
global complete_code_percent: 73.36610 -> 73.73083
global matched_data_percent: 99.36639 -> 99.36639
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
note: config touched: configure.py (orchestrator reviews every config/symbols change)
GATE PASS
```
No remaining non-matching function or data section. No source/header changes; configure.py switches this exact native object from Equivalent to Matching. Full DOL bytes equal the original, SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. Before and after: objdiff 56/56 functions, code 10924/10924, data 2216/2216; linked code 0 -> 10924 and linked data 0 -> 2216. Gate instruction count 55/56 before and after, corrected branch-operand count 56/56.

File diff suppressed because it is too large Load Diff

View File

@@ -1,86 +0,0 @@
# scene4 leaf — decode attempts & evidence
Branch `agent/w1008/scene4` off origin/main@e3457d11.
Scope: iplAddress, iplAddressEdit, iplSDChannelSelect are the only sub-100 units in
the scene/address + sdChannelSelect remainder (iplAddressAddSel, iplAddressInputName,
iplAddressSelect, addressHelpers, addressInputHelpers, agreeSettings, agreeHttp,
iplFaceSelect, iplNCDSetting all verified already 100% on main; no open PR claims).
## Decodes that landed (this leaf)
### Single-case `switch` produces the `b<eq> caseblock; b after` 2-branch guard
`switch (x) { case C:` emits `cmp; beq caseblock; b exit` — MWCC keeps the
dispatch's second `b` because the case-block is a separate labelled region.
Equivalent `if`, `if||`, `if&&`, `goto`-goto, `if/else`-goto all get normalized
to a single fused `beq`/`bne`. Used in:
- `Address::start_drag_event` (892B): outer `switch (mState) { case STATE_NORMAL:`
+ inner `switch (mMode) { case 0:` reproduces orig's two nested 2-branch guards.
Residual: 7 word diffs, pure regname — nigaoe web pinned r26 (orig) vs r29
(mine), miiPane web r29 vs r26. Allocator home-order tie; decl-hoist of
miiPane above the `if` was a no-op (web homes unchanged).
- `Address::onEventDerived` (1080B): TRIG case falls through to ON_POINT
(orig has NO `break`); the `mState == COVER_NORMAL || mState == NORMAL`
guard folds to `beq`+`bne` inside the TRIG case. Residual: 81 word diffs,
all regname — insn sequence identical.
### `addic.` fusion for `ptr = base + const` NULL-tested members
`record->attr.name` tested `!= 0` fuses into `addic.` only when the pointer is
materialized lazily at the compare — decl the local inside the `if`. Hoisted
decls emit `addi`+`cmpwi`. (movePane_onDrag `name` web.)
## Walls re-verified (evidence)
### `Address::movePane_onDrag` 92.45 (620 orig vs 612 mine)
- Orig emits `bne next; b exit` 2-branch guards for both `textBox != NULL` and
`name != NULL` (the `b` skips to the shared `width += 0.01f` block).
- This is switch-dispatch-shaped, but every legal polarity fails:
`switch(ptr) { case NULL: break; default: body }` bool-materializes
(`addic/subfe/cmpwi 1` — +3 insns); `switch (p != NULL) { case true:` also
bool-materializes; `do { if (!x) break; } while (0)` folds to single `beq`.
- Orig computes the record math (`lwz 0x70 / mulli 5 / lwz 0x274 / mulli 0x140`)
before the textBox branch — scheduler interleave around the guard.
- Residual also regname r27↔r29 (textBox web) + loop `name` web.
### `FriendListCache::update` 95.5 (160 orig vs 156 mine)
Orig remats `mInfos + index*0x140` per use site (memset, wcsncpy,
updateFriendInfo = 3 `mulli`+`add` pairs). Mine CSEs into callee r31.
`getInfo(index)` vs `mInfos[index]` vs `(int)index` cast — all VN-identical,
still CSE. Remat-vs-pin in the unusual remat-is-orig direction; no lever.
### `AddressEdit::create` 97.45 (3280B)
Two distinct residuals:
- Wholesale r30↔r31 web-order swap: orig pins string-table const web in r31
and `boardFile` (getScene+0xd20) in r30; mine the reverse. Webs born in the
same source order — allocator processing order tie.
- `friendText` (this+0x2b4 / this+0x2cc) pin: orig materializes
`addi r25, r29, 0x2b4` at decl point between `initFrame()` and `restart()`,
reassigns `addi r25, r29, 0x2cc` mid-block — the reg+const web is pinned.
Mine remats `addi r5, r29, 0x2b4` at each marshal. Variants tried: non-const
`wchar_t*`, decl moved before `animator =` — both no-op. Same this+const
pin family as get_friendinfo.
### `AddressEdit::get_friendinfo` 88.04 (336 orig vs 328 mine)
Orig: this→r28, `this+0x2b4` (mName) pinned in r29 materialized before the
FindPaneByName marshal — 2 extra insns vs mine's marshal-site remats, and one
more callee web (savegpr_28 vs my _29 window differs). Same `this+const`
pin-vs-remat wall as create's friendText.
### `AddressEdit::update_friendinfo` 99.42 (152B)
Single 2-insn scheduling swap: `addi r4,r30,0x2b4` vs `addi r3,r31,8` order
in the wcsncpy marshal.
### iplSDChannelSelect 99.58 — 7 fns
- `create` 97.74: regname r29↔r30 swap + marshal interleaves around `bl`s
(scheduler family); insn count equal.
- `collectTitles*` ×4 (97.29–97.83): documented ties — callee-web rotations
around the same ES_GetTitleCount/ES_GetTitles marshal blocks.
- `flushSaveDataAndMountSD` 99.66 (140B): marshal order tie.
- `setChannelScissor` 93.47 (932B): fp/scheduling family (DrawFrame-class).
## Notes
- ndiff.py NORMALIZES register names — "diffs 0" can hide regname-only
diffs. Always confirm with raw byte-compare of `.text` (readelf -sW for
addr/size, -SW for file offset).
- `objdiff-cli diff` is interactive-only (fails headless); use disasm_fn.py
+ byte-compare.