Compare commits
60 Commits
cleanup/ip
...
agent/w092
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
948b8785f7 | ||
|
|
449529d924 | ||
|
|
8a07484e8a | ||
|
|
2d3bc63c09 | ||
|
|
3efb9d8676 | ||
|
|
805e84045c | ||
|
|
26d7e1e052 | ||
|
|
d78210528f | ||
|
|
e3457d11a2 | ||
|
|
b33a493cec | ||
|
|
6f49df32b3 | ||
|
|
8864436cde | ||
|
|
a9a3f36cf0 | ||
|
|
ffeed96e49 | ||
|
|
1216db0acb | ||
|
|
85b993f48c | ||
|
|
a2a0460567 | ||
|
|
df0fa22203 | ||
|
|
11c75ddb62 | ||
|
|
15b9f71a6e | ||
|
|
0a7baea67a | ||
|
|
6f6f63cb81 | ||
|
|
4a046a17ab | ||
|
|
842c850c10 | ||
|
|
6b95233f01 | ||
|
|
2dba9bd13b | ||
|
|
fd775c34dc | ||
|
|
a8ab2099cd | ||
|
|
96db1eac04 | ||
|
|
5a332eceba | ||
|
|
ed2d5b30b4 | ||
|
|
02dbcc53bd | ||
|
|
2da1c58f2c | ||
|
|
1c8ada226a | ||
|
|
f05f7bbcf7 | ||
|
|
f508371ca0 | ||
|
|
7216fd527f | ||
|
|
26e90aa988 | ||
|
|
e059ea0632 | ||
|
|
e6f54e254d | ||
|
|
299a6ca724 | ||
|
|
77439a3268 | ||
|
|
f65fac3351 | ||
|
|
c7ceb3efe0 | ||
|
|
401d0c88e7 | ||
|
|
6cb5ac9ded | ||
|
|
8870c4aa75 | ||
|
|
402687106b | ||
|
|
2080aeb0cf | ||
|
|
1f3d89772e | ||
|
|
f429cd07cc | ||
|
|
f7b1b9b09b | ||
|
|
fcbc0c56b7 | ||
|
|
ab8bece04e | ||
|
|
0059de422f | ||
|
|
413c779180 | ||
|
|
f9ecefa6a2 | ||
|
|
320700d49b | ||
|
|
c52153e9f7 | ||
|
|
899438ff02 |
@@ -53,9 +53,9 @@ Progress
|
||||
<!-- progress:start -->
|
||||
| Decompiled | Matched | Linked | Data |
|
||||
|:---:|:---:|:---:|:---:|
|
||||
| 99.59% | 90.81% | 71.43% | 99.37% |
|
||||
| 99.59% | 91.15% | 74.40% | 99.42% |
|
||||
|
||||
units 956/1027 complete, functions 12365/12563 matched.
|
||||
units 963/1027 complete, functions 12377/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 -->
|
||||
|
||||
@@ -13904,10 +13904,15 @@ 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: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
|
||||
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
|
||||
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
|
||||
@@ -17165,7 +17170,23 @@ 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
|
||||
@@ -17179,10 +17200,32 @@ 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
|
||||
@@ -17216,6 +17259,11 @@ 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
|
||||
@@ -18058,7 +18106,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:0x28
|
||||
lbl_816681E8 = .data:0x816681E8; // type:object size:0x24
|
||||
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
|
||||
@@ -22373,93 +22421,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
|
||||
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
|
||||
@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
|
||||
@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
|
||||
@@ -23227,7 +23275,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:0x2 data:string
|
||||
lbl_81698394 = .sdata:0x81698394; // type:object size:0x4 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
|
||||
|
||||
@@ -766,9 +766,9 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
IPLSection("channelSelect", [
|
||||
Object(Equivalent, "scene/channelSelect/iplChannelSelect.cpp"),
|
||||
Object(Matching, "scene/channelSelect/iplChannelSelect.cpp"),
|
||||
Object(Matching, "scene/channelSelect/iplClock.cpp"),
|
||||
Object(Equivalent, "scene/channelSelect/iplChannelObj.cpp"),
|
||||
Object(Matching, "scene/channelSelect/iplChannelObj.cpp"),
|
||||
]
|
||||
),
|
||||
IPLSection("channelTitle", [
|
||||
@@ -1388,7 +1388,7 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
RVLSDKLib("vi", [
|
||||
Object(NonMatching, "vi/vi.c"),
|
||||
Object(Matching, "vi/vi.c"),
|
||||
Object(Matching, "vi/i2c.c"),
|
||||
Object(Matching, "vi/vi3in1.c"),
|
||||
]
|
||||
@@ -1970,7 +1970,7 @@ config.libs = [
|
||||
Object(Matching, "MSL_Common/time.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/wctype.c"),
|
||||
Object(Matching, "MSL_Common/wmem.c"),
|
||||
Object(NonMatching, "MSL_Common/wprintf.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/wprintf.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/wstring.c"),
|
||||
Object(Matching, "MSL_Common/wchar_io.c"),
|
||||
Object(Matching, "PPC_EABI/time.dolphin.c"),
|
||||
|
||||
@@ -43,7 +43,7 @@ private:
|
||||
bool mIsPlaying; // 0xB2
|
||||
bool mIsSetBuf; // 0xB3
|
||||
bool mThreadRunning; // 0xB4
|
||||
bool unk_0xB5; // 0xB5
|
||||
bool mbFillInCallback; // 0xB5
|
||||
|
||||
WaveFileAiff mAiff; // 0xB8
|
||||
WaveFileWav mWav; // 0xE8
|
||||
|
||||
@@ -16,12 +16,12 @@ public:
|
||||
AXVPB* getAXVPB() { return mpVPB; }
|
||||
u32 getState() { return mState; }
|
||||
u32 getUnk_0x08() { return unk_0x08; }
|
||||
int getUnk_0x0C() { return unk_0x0C; }
|
||||
int getUpdateFlag() { return mUpdateFlag; }
|
||||
|
||||
void setAXVPB(AXVPB* newVal) { mpVPB = newVal; }
|
||||
void setState(u32 newVal) { mState = newVal; }
|
||||
void setUnk_0x08(u32 newVal) { unk_0x08 = newVal; }
|
||||
void setUnk_0x0C(u32 newVal) { unk_0x0C = newVal; }
|
||||
void setUpdateFlag(u32 newVal) { mUpdateFlag = newVal; }
|
||||
|
||||
AXPBMIX* getMix() { return &mMix; }
|
||||
|
||||
@@ -31,7 +31,7 @@ private:
|
||||
AXVPB* mpVPB; // 0x00
|
||||
u32 mState; // 0x04
|
||||
u32 unk_0x08; // 0x08
|
||||
int unk_0x0C; // 0x0c
|
||||
int mUpdateFlag; // 0x0c
|
||||
AXPBMIX mMix; // 0x10
|
||||
};
|
||||
|
||||
|
||||
@@ -266,6 +266,32 @@ 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
|
||||
|
||||
@@ -259,8 +259,8 @@ namespace ipl {
|
||||
|
||||
f32 mChanThumbOff_X; // 0xD0
|
||||
f32 mChanThumbOff_Y; // 0xD4
|
||||
math::VEC3 unk_0xD8;
|
||||
math::VEC2 unk_0xE4;
|
||||
math::VEC3 mOrthoTrans;
|
||||
math::VEC2 mOrthoScale;
|
||||
f32 mScaleAdjust; // 0xEC
|
||||
|
||||
int mDiskState; // 0xF0
|
||||
|
||||
@@ -185,8 +185,8 @@ namespace ipl {
|
||||
gui::PaneManager* mpGui; // 0x74
|
||||
|
||||
BOOL mbHovered[BTN_MAX]; // 0x78
|
||||
u32 unk_0x90;
|
||||
u32 unk_0x94;
|
||||
u32 mPendingSceneId;
|
||||
u32 mExitSeqStep;
|
||||
|
||||
static const char* smButtonName[BTN_MAX];
|
||||
};
|
||||
|
||||
@@ -365,8 +365,8 @@ namespace ipl {
|
||||
int getChJumpChanPage() { return mChJumpPage; }
|
||||
int getChJumpChanIndex() { return mChJumpIndex; }
|
||||
|
||||
void setUnk_0x1B81(bool flag) { unk_0x1B81 = flag; }
|
||||
bool isUnk_0x1B81() { return unk_0x1B81; }
|
||||
void setDiskChannelReady(bool flag) { mbDiskChannelReady = flag; }
|
||||
bool isDiskChannelReady() { return mbDiskChannelReady; }
|
||||
|
||||
void resetChJumpLoad() { mbLoadedChJump = false; }
|
||||
bool hasLoadedChJump() { return mbLoadedChJump; }
|
||||
@@ -399,7 +399,7 @@ namespace ipl {
|
||||
|
||||
int mBS2State; // 0x1B7C
|
||||
bool mbCanRefresh; // 0x1B80
|
||||
bool unk_0x1B81;
|
||||
bool mbDiskChannelReady;
|
||||
|
||||
u8* mpDiskIconBuf; // 0x1B84
|
||||
u8* mpDiskBannerBuf; // 0x1B88
|
||||
|
||||
@@ -118,26 +118,26 @@ namespace ipl {
|
||||
public:
|
||||
Base(int chan, KPADStatus& status) {
|
||||
mButton = 0;
|
||||
unk_0x08 = 0;
|
||||
mDecideHoldCount = 0;
|
||||
mLastRumbleTime = 0;
|
||||
mRumbleType = -1;
|
||||
mChan = chan;
|
||||
mType = 2;
|
||||
unk_0x1C = 0;
|
||||
mbForceInvalid = 0;
|
||||
KPADEnableDPD(chan);
|
||||
unk_0x1D = 0;
|
||||
unk_0x1E = 0;
|
||||
unk_0x20 = &status;
|
||||
mbPinching = 0;
|
||||
mbWasPinching = 0;
|
||||
mpKpadStatus = &status;
|
||||
}
|
||||
|
||||
Base(int chan, int type, KPADStatus& status) {
|
||||
mButton = 0;
|
||||
unk_0x08 = 0;
|
||||
mDecideHoldCount = 0;
|
||||
mLastRumbleTime = 0;
|
||||
mRumbleType = -1;
|
||||
mChan = chan;
|
||||
mType = type;
|
||||
unk_0x1C = 0;
|
||||
mbForceInvalid = 0;
|
||||
KPADEnableDPD(chan);
|
||||
}
|
||||
|
||||
@@ -152,15 +152,15 @@ namespace ipl {
|
||||
|
||||
protected:
|
||||
u8 mButton;
|
||||
u32 unk_0x08;
|
||||
u32 mDecideHoldCount;
|
||||
OSTick mLastRumbleTime;
|
||||
s32 mRumbleType;
|
||||
u32 mChan;
|
||||
u32 mType;
|
||||
u8 unk_0x1C;
|
||||
u8 unk_0x1D;
|
||||
u8 unk_0x1E;
|
||||
KPADStatus* unk_0x20;
|
||||
u8 mbForceInvalid;
|
||||
u8 mbPinching;
|
||||
u8 mbWasPinching;
|
||||
KPADStatus* mpKpadStatus;
|
||||
};
|
||||
|
||||
class Revolution : public Base {
|
||||
@@ -206,8 +206,8 @@ namespace ipl {
|
||||
virtual BOOL isValidDpdClassic() const;
|
||||
|
||||
private:
|
||||
math::VEC2 unk_0x24;
|
||||
int unk_0x2C;
|
||||
math::VEC2 mClassicCursorPos;
|
||||
int mClassicCursorTimer;
|
||||
};
|
||||
|
||||
class Master : public Interface {
|
||||
@@ -264,18 +264,18 @@ namespace ipl {
|
||||
public:
|
||||
Base(int chan, KPADStatus& arg1) {
|
||||
mButton = 0;
|
||||
unk_0x08 = 0;
|
||||
mDecideHoldCount = 0;
|
||||
mLastRumbleTime = 0;
|
||||
mRumbleType = -1;
|
||||
mChan = chan;
|
||||
mType = 2;
|
||||
unk_0x1C = 0;
|
||||
mbForceInvalid = 0;
|
||||
|
||||
KPADEnableDPD(chan);
|
||||
|
||||
unk_0x1D = 0;
|
||||
unk_0x1E = 0;
|
||||
unk_0x20 = &arg1;
|
||||
mbPinching = 0;
|
||||
mbWasPinching = 0;
|
||||
mpKpadStatus = &arg1;
|
||||
}
|
||||
|
||||
virtual ~Base(); // 0x08
|
||||
@@ -326,15 +326,15 @@ namespace ipl {
|
||||
|
||||
// protected:
|
||||
u8 mButton; // 0x4
|
||||
u32 unk_0x08; // 0x8
|
||||
u32 mDecideHoldCount; // 0x8
|
||||
OSTick mLastRumbleTime; // 0xC
|
||||
s32 mRumbleType; // 0x10
|
||||
u32 mChan; // 0x14
|
||||
u32 mType; // 0x18
|
||||
u8 unk_0x1C;
|
||||
u8 unk_0x1D; // 0x1D
|
||||
u8 unk_0x1E; // 0x1E
|
||||
KPADStatus* unk_0x20; // 0x20
|
||||
u8 mbForceInvalid;
|
||||
u8 mbPinching; // 0x1D
|
||||
u8 mbWasPinching; // 0x1E
|
||||
KPADStatus* mpKpadStatus; // 0x20
|
||||
};
|
||||
|
||||
class Interface : public Base {
|
||||
@@ -446,8 +446,8 @@ namespace ipl {
|
||||
virtual BOOL isValidDpdClassic() const; // 0x8C
|
||||
|
||||
private:
|
||||
math::VEC2 unk_0x24;
|
||||
int unk_0x2C;
|
||||
math::VEC2 mClassicCursorPos;
|
||||
int mClassicCursorTimer;
|
||||
};
|
||||
|
||||
class Manager {
|
||||
|
||||
@@ -27,7 +27,11 @@ 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; }
|
||||
|
||||
@@ -1120,32 +1120,28 @@ 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) {
|
||||
wchar_t first = *wcs_ptr++;
|
||||
wideLength = (unsigned char)first;
|
||||
num_chars = (unsigned char)*wcs_ptr++;
|
||||
|
||||
if (format.precision_specified && wideLength > format.precision) {
|
||||
wideLength = format.precision;
|
||||
if (format.precision_specified && num_chars > format.precision) {
|
||||
num_chars = format.precision;
|
||||
}
|
||||
} else if (format.precision_specified) {
|
||||
wideLength = format.precision;
|
||||
num_chars = format.precision;
|
||||
|
||||
if ((string_end = wmemchr((wchar_t*)wcs_ptr, 0, wideLength)) != 0) {
|
||||
wideLength = string_end - wcs_ptr;
|
||||
if ((string_end = wmemchr(wcs_ptr, 0, num_chars)) != 0) {
|
||||
num_chars = string_end - wcs_ptr;
|
||||
}
|
||||
|
||||
} else {
|
||||
wideLength = wcslen(wcs_ptr);
|
||||
num_chars = wcslen(wcs_ptr);
|
||||
}
|
||||
|
||||
num_chars = wideLength;
|
||||
|
||||
buff_ptr = wcs_ptr;
|
||||
break;
|
||||
} else {
|
||||
@@ -1156,7 +1152,7 @@ static int __wpformatter(void* (*write_proc)(void*, const wchar_t*, size_t),
|
||||
}
|
||||
|
||||
if (format.alternate_form) {
|
||||
num_chars = (unsigned char)*(const wchar_t*)wcs_ptr;
|
||||
num_chars = (unsigned char)*buff_ptr;
|
||||
|
||||
if (format.precision_specified && num_chars > format.precision) {
|
||||
num_chars = format.precision;
|
||||
|
||||
@@ -252,14 +252,17 @@ namespace nw4r {
|
||||
}
|
||||
|
||||
inline void updateSheetFlags(const void* glgrHdr, u32 groupIdx, u16* sheetOffsets, u32 flagsStep, const u32* sheetFlags) {
|
||||
const GlyphGroups* glgr = (GlyphGroups*)((u8*)glgrHdr + sizeof(BinaryBlockHeader));
|
||||
for (int sheetI = 0; sheetI < glgr->sheetCount; sheetI++) {
|
||||
u32 groupBitIdx = sheetI + groupIdx * flagsStep * 8;
|
||||
|
||||
const GlyphGroups* glgr = (const GlyphGroups*)((const u8*)glgrHdr + sizeof(BinaryBlockHeader));
|
||||
int sheetIndex;
|
||||
u32 groupBitOffset;
|
||||
u16* sheetOffset = sheetOffsets;
|
||||
groupBitOffset = groupIdx * flagsStep * 8;
|
||||
for (sheetIndex = 0; sheetIndex < glgr->sheetCount; sheetOffset++, sheetIndex++) {
|
||||
u32 groupBitIdx = sheetIndex + groupBitOffset;
|
||||
const u32* bitBlockPtr = sheetFlags + (groupBitIdx & ~0x1F) / 32;
|
||||
u32 bitBlock = *(u32*)bitBlockPtr;
|
||||
u32 bitBlock = *bitBlockPtr;
|
||||
if (((bitBlock << (groupBitIdx & 0x1F)) & 0x80000000) != 0) {
|
||||
sheetOffsets[sheetI] = 1;
|
||||
*sheetOffset = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -268,14 +271,16 @@ namespace nw4r {
|
||||
const u32* bitBlocksPtr, u32 sheetFlagsSize) {
|
||||
HeaderedGlyphGroups* pGlgr = (HeaderedGlyphGroups*)glgrHdr;
|
||||
|
||||
for (int i = 0; i < pGlgr->inner.sheetCount; i++) {
|
||||
sheetOffsets[i] = 0;
|
||||
int i;
|
||||
u16* sheetOffset;
|
||||
for (i = 0, sheetOffset = sheetOffsets; i < pGlgr->inner.sheetCount; sheetOffset++, i++) {
|
||||
*sheetOffset = 0;
|
||||
}
|
||||
|
||||
for (int i = 0; i < pGlgr->inner.nameCount; i++) {
|
||||
const char* includedGroups = ctx->pIncludedGroups;
|
||||
u16 offset = pGlgr->inner.nameOffsets[i];
|
||||
char* name = (char*)((u8*)hdr + offset);
|
||||
char* name = (char*)(offset + (u32)hdr);
|
||||
if (*includedGroups != 0) {
|
||||
if (!ArchiveFontBase::IncludeName(includedGroups, name)) {
|
||||
continue;
|
||||
@@ -288,21 +293,23 @@ namespace nw4r {
|
||||
|
||||
inline void convertSheetOffsetBooleansToOffsets(const void* glgrHdr, u16* sheetOffsets) {
|
||||
HeaderedGlyphGroups* pGlgr = (HeaderedGlyphGroups*)glgrHdr;
|
||||
int i;
|
||||
u16 glyphIdxOffset = 0;
|
||||
for (int i = 0; i < pGlgr->inner.sheetCount; i++) {
|
||||
if (sheetOffsets[i] == 1) {
|
||||
sheetOffsets[i] = glyphIdxOffset;
|
||||
u16* sheetOffset;
|
||||
for (i = 0, sheetOffset = sheetOffsets; i < pGlgr->inner.sheetCount; sheetOffset++, i++) {
|
||||
if (*sheetOffset == 1) {
|
||||
*sheetOffset = glyphIdxOffset;
|
||||
} else {
|
||||
sheetOffsets[i] = -1;
|
||||
*sheetOffset = -1;
|
||||
glyphIdxOffset += pGlgr->inner.sheetGlyphCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline void copyFlagOffsets(ArchiveFontBase::ConstructContext* ctx, u16* sheetOffsetsScratch, u32 workSize, u32 scratchSize) {
|
||||
inline void copyFlagOffsets(ArchiveFontBase::ConstructContext* ctx, u16* sheetOffsetsScratch, u32 workSize, const u16* sheetOffsetsScratchEnd) {
|
||||
u8* sheetOffsets = ctx->pWorkCurr;
|
||||
ctx->pWorkCurr = sheetOffsets + workSize;
|
||||
memmove(sheetOffsets, sheetOffsetsScratch, scratchSize);
|
||||
memmove(sheetOffsets, sheetOffsetsScratch, (sheetOffsetsScratchEnd - sheetOffsetsScratch) * sizeof(u16));
|
||||
ctx->pSheetOffsets = (u16*)sheetOffsets;
|
||||
}
|
||||
|
||||
@@ -311,31 +318,64 @@ namespace nw4r {
|
||||
// *sheetOffsetsScratch = (u16*)ROUNDDOWN((u32)((u8*)fontData + remWorkSpace) - sheetOffsetsSize, 2);
|
||||
// return sheetOffsetsSize;
|
||||
// }
|
||||
ArchiveFontBase::ConstructState ArchiveFontBase::ConstructOpAnalyzeGLGR(ConstructContext* ctx, CachedStreamReader* reader) {
|
||||
u32 glgrInnerLen;
|
||||
HeaderedGlyphGroups* pGlgr;
|
||||
const ArchiveFontBinaryLayout* font;
|
||||
u8* glgrEnd;
|
||||
class FontGlyphGroupsAcs {
|
||||
public:
|
||||
explicit FontGlyphGroupsAcs(const ArchiveFontBinaryLayout* font)
|
||||
: mFont(font), mGroups(&font->glgr) {}
|
||||
const GlyphGroups& GetGroups() const { return mGroups->inner; }
|
||||
void SetSheetFlags(u32 flagsStep, const u32* sheetFlags) {
|
||||
mFlagsStep = flagsStep;
|
||||
mSheetFlags = sheetFlags;
|
||||
}
|
||||
|
||||
u16 GetNumSheet() const { return mGroups->inner.sheetCount; }
|
||||
int GetGlyphsPerSheet() const { return mGroups->inner.sheetGlyphCount; }
|
||||
u16 GetNumSet() const { return mGroups->inner.nameCount; }
|
||||
const char* GetSetName(int groupIndex) const {
|
||||
const u16 nameOffset = mGroups->inner.nameOffsets[groupIndex];
|
||||
return (const char*)(nameOffset + (u32)mFont);
|
||||
}
|
||||
bool IsUseSheet(int groupIndex, int sheetIndex) const {
|
||||
const u32 groupBitIndex = sheetIndex + groupIndex * mFlagsStep * 8;
|
||||
const u32* bitBlock = mSheetFlags + (groupBitIndex & ~0x1F) / 32;
|
||||
return ((*bitBlock << (groupBitIndex & 0x1F)) & 0x80000000) != 0;
|
||||
}
|
||||
|
||||
private:
|
||||
const ArchiveFontBinaryLayout* mFont;
|
||||
const HeaderedGlyphGroups* mGroups;
|
||||
u32 mFlagsStep;
|
||||
const u32* mSheetFlags;
|
||||
};
|
||||
|
||||
ArchiveFontBase::ConstructState ArchiveFontBase::ConstructOpAnalyzeGLGR(ConstructContext* ctx, CachedStreamReader* reader) {
|
||||
const u32* flagsSheets;
|
||||
u32 sheetOffsetsSize;
|
||||
u32 flagsSheetsOff;
|
||||
u32 glgrInnerLen;
|
||||
const ArchiveFontBinaryLayout* font;
|
||||
u16 sheetGlyphCount;
|
||||
u32 countSheet;
|
||||
HeaderedGlyphGroups* pGlgr;
|
||||
u8* glgrEnd;
|
||||
u32 expectedMaxSize;
|
||||
u32 dataBlockCount;
|
||||
u16* sheetOffsetsScratch;
|
||||
int groupIndex;
|
||||
|
||||
font = (ArchiveFontBinaryLayout*)ctx->pWorkCurr;
|
||||
|
||||
glgrInnerLen = ctx->mNextBlockHdr.size - sizeof(BinaryBlockHeader);
|
||||
|
||||
// Check for RFNA
|
||||
if (font->hdr.signature != SIGNATURE_FONT_ARCHIVE) {
|
||||
return CONSTRUCT_STATE_FATAL_ERR;
|
||||
}
|
||||
|
||||
// Check that there's enough data available, and the space to
|
||||
// put that data
|
||||
ENSURE_READER_HAS_SIZE(ctx, reader, glgrInnerLen);
|
||||
ENSURE_WORK_HAS_SIZE(ctx, glgrInnerLen);
|
||||
|
||||
expectedMaxSize = ctx->mNextBlockHdr.size + sizeof(BinaryFileHeader);
|
||||
|
||||
// Copy the glgr to work
|
||||
{
|
||||
pGlgr = (HeaderedGlyphGroups*)&font->glgr;
|
||||
glgrEnd = (u8*)pGlgr + (u32)ctx->mNextBlockHdr.size;
|
||||
@@ -348,80 +388,45 @@ namespace nw4r {
|
||||
return CONSTRUCT_STATE_FATAL_ERR;
|
||||
}
|
||||
|
||||
// Before here is fine (other than regswaps)
|
||||
// u16 sheetGlyphCount = FORCE_REACCESS_2(font->glgr.inner.sheetGlyphCount, u16); // 0x1C
|
||||
// u16 dataBlockCount = FORCE_REACCESS_2(font->hdr.dataBlocks, u16); // 0x0E
|
||||
// FORCE_REACCESS_2(font->glgr.inner.sheetCount, u16);
|
||||
// return ConstructOpAnalyzeGLGRInner(ctx, font, pGlgr, glgrEnd);
|
||||
FontGlyphGroupsAcs gg(font);
|
||||
sheetGlyphCount = gg.GetGlyphsPerSheet();
|
||||
dataBlockCount = font->hdr.dataBlocks;
|
||||
countSheet = gg.GetNumSheet();
|
||||
const u32 stepSheetFlags = detail::CalcSizeFlagSet(countSheet);
|
||||
flagsSheetsOff = detail::CalcOffsetSheetFlags(gg.GetGroups().nameCount, countSheet, gg.GetGroups().smthCount_0x0a,
|
||||
gg.GetGroups().smthCount_0x0c);
|
||||
flagsSheets = (const u32*)((flagsSheetsOff & ~3) + (u32)font);
|
||||
gg.SetSheetFlags(stepSheetFlags, flagsSheets);
|
||||
|
||||
// u32 fontSizeToEndOfGlgr;
|
||||
|
||||
u16 countSheet;
|
||||
u16 sheetGlyphCount, dataBlockCount;
|
||||
|
||||
u32 stepSheetFlags;
|
||||
u32 flagsSheetsOff;
|
||||
const u32* flagsSheets;
|
||||
|
||||
u32 sheetOffsetsSize;
|
||||
u16* sheetOffsetsScratch;
|
||||
|
||||
u32 sheetOffsetsScratchSize;
|
||||
|
||||
sheetGlyphCount = font->glgr.inner.sheetGlyphCount; // 0x1C
|
||||
dataBlockCount = font->hdr.dataBlocks; // 0x0E
|
||||
// countName = font->glgr.inner.nameCount;
|
||||
countSheet = font->glgr.inner.sheetCount;
|
||||
// count0A = font->glgr.inner.smthCount_0x0a;
|
||||
// count0C = font->glgr.inner.smthCount_0x0c;
|
||||
stepSheetFlags = detail::CalcSizeFlagSet(countSheet);
|
||||
flagsSheetsOff = detail::CalcOffsetSheetFlags(font->glgr.inner.nameCount, countSheet, font->glgr.inner.smthCount_0x0a,
|
||||
font->glgr.inner.smthCount_0x0c);
|
||||
flagsSheets = (const u32*)font + (flagsSheetsOff >> 2);
|
||||
|
||||
sheetOffsetsSize = ROUNDUP(countSheet * sizeof(u16), 4);
|
||||
sheetOffsetsSize = (RoundUp)(countSheet * sizeof(u16), 4);
|
||||
sheetOffsetsScratch = (u16*)ROUNDDOWN((u32)((u8*)font + ctx->remWorkSpace()) - sheetOffsetsSize, 2);
|
||||
|
||||
pGlgr = (HeaderedGlyphGroups*)&font->glgr;
|
||||
ENSURE_WORK_HAS_SIZE(ctx, glgrEnd - (u8*)font + sheetOffsetsSize);
|
||||
// if (ctx->pWorkEnd - workCurr < fontSizeToEndOfGlgr + sheetOffsetsSize) {
|
||||
// return CONSTRUCT_STATE_FATAL_ERR;
|
||||
// }
|
||||
|
||||
// Clear sheet offsets scratch
|
||||
// for (s32 i = 0; i < pGlgr->inner.sheetCount; i++) {
|
||||
// sheetOffsetsScratch[i] = 0;
|
||||
// }
|
||||
{
|
||||
u16* sheetOffset;
|
||||
int sheetIndex;
|
||||
for (sheetIndex = 0, sheetOffset = sheetOffsetsScratch; sheetIndex < gg.GetNumSheet(); sheetOffset++, sheetIndex++) {
|
||||
*sheetOffset = 0;
|
||||
}
|
||||
for (groupIndex = 0; groupIndex < gg.GetNumSet(); groupIndex++) {
|
||||
const char* includedGroups = ctx->pIncludedGroups;
|
||||
const char* name = gg.GetSetName(groupIndex);
|
||||
if (*includedGroups && !ArchiveFontBase::IncludeName(includedGroups, name)) {
|
||||
continue;
|
||||
}
|
||||
for (int sheetIndex = 0; sheetIndex < gg.GetNumSheet(); sheetIndex++) {
|
||||
if (gg.IsUseSheet(groupIndex, sheetIndex)) {
|
||||
sheetOffsetsScratch[sheetIndex] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// for (s32 i = 0; i < pGlgr->inner.nameCount; i++) {
|
||||
// // const char* includedGroups = ctx->pIncludedGroups;
|
||||
// u16 offset = pGlgr->inner.nameOffsets[i];
|
||||
// const char* name = (char*)((u8*)font + offset);
|
||||
// if (*ctx->pIncludedGroups != 0) {
|
||||
// if (!ArchiveFontBase::IncludeName(ctx->pIncludedGroups, name)) {
|
||||
// continue;
|
||||
// }
|
||||
// }
|
||||
|
||||
// updateSheetFlags(pGlgr, i, sheetOffsetsScratch, stepSheetFlags, flagsSheets);
|
||||
// }
|
||||
setSheetOffsetBooleans(ctx, pGlgr, font, sheetOffsetsScratch, flagsSheets, stepSheetFlags);
|
||||
|
||||
// u16 glyphIdxOffset = 0;
|
||||
// for (s32 i = 0; i < pGlgr->inner.sheetCount; i++) {
|
||||
// if (sheetOffsetsScratch[i] == 1) {
|
||||
// sheetOffsetsScratch[i] = glyphIdxOffset;
|
||||
// } else {
|
||||
// sheetOffsetsScratch[i] = -1;
|
||||
// glyphIdxOffset += pGlgr->inner.sheetGlyphCount;
|
||||
// }
|
||||
// }
|
||||
convertSheetOffsetBooleansToOffsets(pGlgr, sheetOffsetsScratch);
|
||||
|
||||
sheetOffsetsScratchSize = (u32)countSheet << 1;
|
||||
sheetOffsetsScratchSize += (sheetOffsetsScratchSize >> 31);
|
||||
sheetOffsetsScratchSize &= ~1;
|
||||
copyFlagOffsets(ctx, sheetOffsetsScratch, sheetOffsetsSize, sheetOffsetsScratchSize);
|
||||
copyFlagOffsets(ctx, sheetOffsetsScratch, sheetOffsetsSize, sheetOffsetsScratch + (u16)countSheet);
|
||||
|
||||
ctx->mSheetCount = countSheet;
|
||||
ctx->mGlyphsPerSheet = sheetGlyphCount;
|
||||
|
||||
@@ -15,55 +15,8 @@ static void readHuffmanLimit(const TMCHuffmanEntry* entries, TMCHuffmanEntry* li
|
||||
limit->symbol = entries->symbol;
|
||||
}
|
||||
|
||||
static inline s32 decodeLongHuffman(s32 bitCount, const TMCHuffmanEntry* table, const u8* symbols, TMCCJPEGDecWork* work, TMCHuffmanEntry* limit, TMCHuffmanEntry* decoded) {
|
||||
u32 bitData;
|
||||
u32 code;
|
||||
u32 length;
|
||||
const TMCHuffmanEntry* entry;
|
||||
|
||||
if (bitCount <= 17) {
|
||||
s32 result = TMCJPEGDEC_load_buff(work);
|
||||
if (result < 0) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
bitCount = work->bitCount;
|
||||
bitData = work->bitBuf;
|
||||
bitCount -= 9;
|
||||
code = (bitData >> bitCount) & 0x1FF;
|
||||
work->bitCount = bitCount;
|
||||
length = 9;
|
||||
entry = table + 9;
|
||||
goto read_entry;
|
||||
while (1) {
|
||||
length++;
|
||||
entry++;
|
||||
if (length > 16) {
|
||||
return TMCC_ERROR_OVERFLOW;
|
||||
}
|
||||
bitCount = work->bitCount;
|
||||
code <<= 1;
|
||||
bitData = work->bitBuf;
|
||||
bitCount--;
|
||||
work->bitCount = bitCount;
|
||||
code |= (bitData >> bitCount) & 1;
|
||||
read_entry:
|
||||
{
|
||||
readHuffmanLimit(entry, limit);
|
||||
*decoded = *limit;
|
||||
if (code > (u32)decoded->bitLength) {
|
||||
continue;
|
||||
}
|
||||
{
|
||||
u32 relativeCode = code - entry->bitLength;
|
||||
u32 symbolIndex = relativeCode + entry->symbol;
|
||||
return symbols[symbolIndex & 0xFF];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline s32 decodeACHuffman(s32 bitCount, const TMCHuffmanEntry* entry, const u8* symbols, TMCCJPEGDecWork* work, TMCHuffmanEntry* limit, TMCHuffmanEntry* decoded) {
|
||||
static inline s32 decodeLongHuffman(s32 bitCount, u32* huff_tbl, u8* symbols, TMCCJPEGDecWork* work, TMCHuffmanEntry* limit, TMCHuffmanEntry* decoded) {
|
||||
u16* entry;
|
||||
u32 bitData;
|
||||
u32 code;
|
||||
u32 length;
|
||||
@@ -75,16 +28,16 @@ static inline s32 decodeACHuffman(s32 bitCount, const TMCHuffmanEntry* entry, co
|
||||
}
|
||||
}
|
||||
bitCount = work->bitCount;
|
||||
entry = (u16*)(huff_tbl + 9);
|
||||
bitData = work->bitBuf;
|
||||
length = 9;
|
||||
bitCount -= 9;
|
||||
code = (bitData >> bitCount) & 0x1FF;
|
||||
work->bitCount = bitCount;
|
||||
length = 9;
|
||||
entry += 9;
|
||||
goto read_entry;
|
||||
while (1) {
|
||||
length++;
|
||||
entry++;
|
||||
entry += 2;
|
||||
if (length > 16) {
|
||||
return TMCC_ERROR_OVERFLOW;
|
||||
}
|
||||
@@ -96,20 +49,71 @@ static inline s32 decodeACHuffman(s32 bitCount, const TMCHuffmanEntry* entry, co
|
||||
code |= (bitData >> bitCount) & 1;
|
||||
read_entry:
|
||||
{
|
||||
readHuffmanLimit(entry, limit);
|
||||
limit->bitLength = entry[0];
|
||||
limit->symbol = entry[1];
|
||||
*decoded = *limit;
|
||||
if (code > (u32)decoded->bitLength) {
|
||||
continue;
|
||||
}
|
||||
{
|
||||
u32 relativeCode = code - entry->bitLength;
|
||||
u32 symbolIndex = relativeCode + entry->symbol;
|
||||
u32 relativeCode = code - limit->bitLength;
|
||||
u32 symbolIndex = relativeCode + limit->symbol;
|
||||
return symbols[symbolIndex & 0xFF];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline s32 decodeACHuffman(s32 bitCount, u32* huff_tbl, u8* symbols, TMCCJPEGDecWork* work, TMCHuffmanEntry* limit, TMCHuffmanEntry* decoded) {
|
||||
u16* entry;
|
||||
u32 bitData;
|
||||
u32 code;
|
||||
u32 length;
|
||||
|
||||
if (bitCount <= 17) {
|
||||
s32 result = TMCJPEGDEC_load_buff(work);
|
||||
if (result < 0) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
bitCount = work->bitCount;
|
||||
entry = (u16*)(huff_tbl + 9);
|
||||
bitData = work->bitBuf;
|
||||
length = 9;
|
||||
bitCount -= 9;
|
||||
code = (bitData >> bitCount) & 0x1FF;
|
||||
work->bitCount = bitCount;
|
||||
goto read_entry;
|
||||
while (1) {
|
||||
length++;
|
||||
entry += 2;
|
||||
if (length > 16) {
|
||||
return TMCC_ERROR_OVERFLOW;
|
||||
}
|
||||
bitCount = work->bitCount;
|
||||
code <<= 1;
|
||||
bitData = work->bitBuf;
|
||||
bitCount--;
|
||||
work->bitCount = bitCount;
|
||||
code |= (bitData >> bitCount) & 1;
|
||||
read_entry:
|
||||
{
|
||||
limit->bitLength = entry[0];
|
||||
limit->symbol = entry[1];
|
||||
*decoded = *limit;
|
||||
if (code > (u32)decoded->bitLength) {
|
||||
continue;
|
||||
}
|
||||
{
|
||||
u32 relativeCode = code - limit->bitLength;
|
||||
u32 symbolIndex = relativeCode + limit->symbol;
|
||||
return symbols[symbolIndex & 0xFF];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_ptr, TMCCJPEGDecWork* work) {
|
||||
TMCHuffmanEntry dcEntry;
|
||||
TMCHuffmanEntry dcDecoded;
|
||||
@@ -117,7 +121,7 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
TMCHuffmanEntry acDecoded;
|
||||
TMCHuffmanEntry acLimit;
|
||||
u8* huff_sym;
|
||||
const TMCHuffmanEntry* ac_fast;
|
||||
u16* ac_fast;
|
||||
s32 idx;
|
||||
u32* huff_tbl;
|
||||
s32 bit_pos;
|
||||
@@ -130,11 +134,13 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
s32 t;
|
||||
s32 zz;
|
||||
s32 q;
|
||||
const TMCHuffmanEntry* dc_fast;
|
||||
u16* dc_fast;
|
||||
const u8* zztbl;
|
||||
s32* conv_row;
|
||||
|
||||
conv_row = (s32*)conv_row_ptr;
|
||||
bit_pos = work->bitCount;
|
||||
dc_fast = (const TMCHuffmanEntry*)work->pDCFast;
|
||||
dc_fast = work->pDCFast;
|
||||
|
||||
if (bit_pos <= 8) {
|
||||
r = TMCJPEGDEC_load_buff(work);
|
||||
@@ -146,7 +152,7 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
bit_pos = work->bitCount;
|
||||
bit_data = work->bitBuf;
|
||||
{
|
||||
dcEntry = readHuffmanEntry(dc_fast, (bit_data >> (bit_pos - 8)) & 0xFF);
|
||||
dcEntry = readHuffmanEntry((const TMCHuffmanEntry*)dc_fast, (bit_data >> (bit_pos - 8)) & 0xFF);
|
||||
r = dcEntry.bitLength;
|
||||
extra = dcEntry.symbol;
|
||||
}
|
||||
@@ -157,30 +163,28 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
} else {
|
||||
huff_sym = work->pDCHuffSym;
|
||||
huff_tbl = work->pDCHuffTbl;
|
||||
r = decodeLongHuffman(bit_pos, (const TMCHuffmanEntry*)huff_tbl, huff_sym, work, &dcLimit, &dcDecoded);
|
||||
r = decodeLongHuffman(bit_pos, huff_tbl, huff_sym, work, &dcLimit, &dcDecoded);
|
||||
if (r < 0) {
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
blk0 = ((s32*)conv_row_ptr)[0];
|
||||
blk0 = conv_row[0];
|
||||
if (r != 0) {
|
||||
bit_pos = work->bitCount;
|
||||
if (bit_pos <= r) {
|
||||
s32 load_ret = TMCJPEGDEC_load_buff(work);
|
||||
if (load_ret < 0) {
|
||||
if (work->bitCount <= r) {
|
||||
s32 load_ret;
|
||||
if (load_ret = TMCJPEGDEC_load_buff(work), load_ret < 0) {
|
||||
return load_ret;
|
||||
}
|
||||
}
|
||||
bit_pos = work->bitCount;
|
||||
bit_data = work->bitBuf;
|
||||
tmp = 1 << r;
|
||||
extra = tmp - 1;
|
||||
bit_pos -= r;
|
||||
tmp = 1UL << r;
|
||||
bit_pos = work->bitCount - r;
|
||||
work->bitCount = bit_pos;
|
||||
bit_data = work->bitBuf;
|
||||
extra = tmp - 1;
|
||||
extra = extra & (bit_data >> bit_pos);
|
||||
if (((s32)tmp >> 1) > extra) {
|
||||
extra -= tmp - 1;
|
||||
extra -= (tmp - 1);
|
||||
}
|
||||
dc_predict_row_ptr[0] += extra;
|
||||
}
|
||||
@@ -188,7 +192,7 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
*block = dc_predict_row_ptr[0] * blk0;
|
||||
|
||||
{
|
||||
ac_fast = (const TMCHuffmanEntry*)work->pACFast;
|
||||
ac_fast = work->pACFast;
|
||||
huff_tbl = work->pACHuffTbl;
|
||||
huff_sym = work->pACHuffSym;
|
||||
|
||||
@@ -206,7 +210,7 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
zztbl = TMCJPEGDEC_Zigzag_data;
|
||||
bit_data = work->bitBuf;
|
||||
t = bit_pos - 8;
|
||||
acEntry = readHuffmanEntry(ac_fast, (bit_data >> t) & 0xFF);
|
||||
acEntry = readHuffmanEntry((const TMCHuffmanEntry*)ac_fast, (bit_data >> t) & 0xFF);
|
||||
|
||||
do {
|
||||
s32 ac_thresh = acEntry.bitLength;
|
||||
@@ -217,7 +221,7 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
r = acEntry.symbol;
|
||||
} else {
|
||||
bit_pos = work->bitCount;
|
||||
r = decodeACHuffman(bit_pos, (const TMCHuffmanEntry*)huff_tbl, huff_sym, work, &acLimit, &acDecoded);
|
||||
r = decodeACHuffman(bit_pos, huff_tbl, huff_sym, work, &acLimit, &acDecoded);
|
||||
if (r < 0) {
|
||||
return r;
|
||||
}
|
||||
@@ -241,19 +245,18 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
return r;
|
||||
}
|
||||
}
|
||||
bit_pos = work->bitCount;
|
||||
tmp = 1 << t;
|
||||
tmp = 1UL << t;
|
||||
bit_pos = work->bitCount - t;
|
||||
work->bitCount = bit_pos;
|
||||
bit_data = work->bitBuf;
|
||||
extra = tmp - 1;
|
||||
bit_pos -= t;
|
||||
work->bitCount = bit_pos;
|
||||
t = bit_pos - 8;
|
||||
extra = extra & (bit_data >> bit_pos);
|
||||
q = ((s32*)conv_row_ptr)[(u8)zz];
|
||||
acEntry = readHuffmanEntry(ac_fast, (bit_data >> t) & 0xFF);
|
||||
t = bit_pos - 8;
|
||||
q = conv_row[(u8)zz];
|
||||
acEntry = readHuffmanEntry((const TMCHuffmanEntry*)ac_fast, (bit_data >> t) & 0xFF);
|
||||
|
||||
if (((s32)tmp >> 1) > extra) {
|
||||
extra -= tmp - 1;
|
||||
extra -= (tmp - 1);
|
||||
}
|
||||
|
||||
block[(u8)zz] = extra * q;
|
||||
@@ -274,7 +277,7 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
bit_pos = work->bitCount;
|
||||
t = bit_pos - 8;
|
||||
tmp = ((bit_data >> t) & 0xFF) << 2;
|
||||
acEntry = readHuffmanEntry(ac_fast, tmp >> 2);
|
||||
acEntry = readHuffmanEntry((const TMCHuffmanEntry*)ac_fast, tmp >> 2);
|
||||
|
||||
idx += 16;
|
||||
}
|
||||
|
||||
@@ -163,12 +163,12 @@ typedef struct _ziGetParam {
|
||||
ziWChar* candidates; // 0x18
|
||||
ziU8 maxCandidates; // 0x1C
|
||||
ziWChar firstCandidate; // 0x1E
|
||||
ziU8 unk_0x20; // 0x20
|
||||
ziU8 count; // 0x20 (EZTXGetParam.count)
|
||||
|
||||
ziU8 letters; // 0x21
|
||||
ziU8 count; // 0x22
|
||||
ziU8* scratch; // 0x24
|
||||
ziU32 unk_0x28; // 0x28
|
||||
ziU8 letters; // 0x21
|
||||
ziU8 completion; // 0x22 (EZTXGetParam.completion)
|
||||
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 unk_0x338; // 0x338
|
||||
ziU32 endNode; // 0x338
|
||||
} zi8DawgCtx;
|
||||
|
||||
typedef struct _ziUwdNode {
|
||||
@@ -204,34 +204,34 @@ typedef struct _ziUwdNode {
|
||||
} ziUwdNode;
|
||||
|
||||
struct __zi8_work_data_s {
|
||||
ziU8 unk_0x00;
|
||||
ziU8 getcPhase; // 0x00
|
||||
ziU8 countOnly; // 0x01
|
||||
ziU8 unk_0x02[2];
|
||||
ziLanguageEntry* langEntries; // 0x04
|
||||
ziU8 unk_0x08;
|
||||
ziU8 unk_0x09;
|
||||
ziU8 unk_0x0A;
|
||||
ziU8 maxWordLength;
|
||||
ziU8 unk_0x0B;
|
||||
ziU32 unk_0x0C;
|
||||
ziU32 targetCount; // 0x0C
|
||||
ziU32 unk_0x10;
|
||||
ziU16 unk_0x14;
|
||||
ziU8 cangjieEnabled; // 0x16
|
||||
ziU8 unk_0x17;
|
||||
ziU8 zhPudMinPrefix;
|
||||
ziU8 subLanguage; // 0x18
|
||||
ziU8 unk_0x19;
|
||||
ziU16 separator; // 0x1A
|
||||
ziU8 unk_0x1C[3];
|
||||
ziU8 unk_0x1F;
|
||||
ziU8 ignoreCase;
|
||||
ziU16 unk_0x20[0x40];
|
||||
ziU16 unk_0xA0[0x42];
|
||||
ziU16* unk_0x124[1];
|
||||
ziU8* unk_0x128;
|
||||
ziU8 unk_0x12C;
|
||||
ziU8 uwdPtrCount; // 0x12C
|
||||
ziU8 unk_0x12D;
|
||||
ziU8 unk_0x12E;
|
||||
ziU8 uwdPrioritySort; // 0x12E
|
||||
ziU8 unk_0x12F;
|
||||
ziPtr unk_0x130[2];
|
||||
ziU8 unk_0x138;
|
||||
ziPtr uwdDicts[2]; // 0x130
|
||||
ziU8 uwdDictCount; // 0x138
|
||||
ziU8 unk_0x139[3];
|
||||
ziU32 unk_0x13C;
|
||||
ziU8 unk_0x140;
|
||||
@@ -269,10 +269,10 @@ struct __zi8_work_data_s {
|
||||
ziU8 unk_0x1414[4];
|
||||
ziU8 formatCount;
|
||||
ziU8 unk_0x1419;
|
||||
ziU16 unk_0x141A;
|
||||
ziU8 unk_0x141C;
|
||||
ziU8 unk_0x141D;
|
||||
ziU8 unk_0x141E;
|
||||
ziU16 capacity; // 0x141A
|
||||
ziU8 forceAltGraph; // 0x141C (lang FI + group 0xC -> graphTableId 0x10)
|
||||
ziU8 advanceGroup; // 0x141D (nonzero: skip first dawg group)
|
||||
ziU8 graphTableId; // 0x141E
|
||||
ziU8 maxCnt; // 0x141F
|
||||
ziU8 unk_0x1420[4];
|
||||
zi8DawgCtx dawgCtx; // 0x1424
|
||||
@@ -309,26 +309,26 @@ struct __zi8_work_data_s {
|
||||
ziWChar unk_0x1A92[0x41];
|
||||
ziU8 unk_0x1B14;
|
||||
ziU8 unk_0x1B15[3];
|
||||
ziU16* unk_0x1B18;
|
||||
ziU16 unk_0x1B1C;
|
||||
ziU16 unk_0x1B1E;
|
||||
ziU16 unk_0x1B20;
|
||||
ziU16 unk_0x1B22;
|
||||
ziU8 unk_0x1B24;
|
||||
ziU16* unicodeMap; // 0x1B18
|
||||
ziU16 unicodeRange1Min; // 0x1B1C
|
||||
ziU16 unicodeRange1Max; // 0x1B1E
|
||||
ziU16 unicodeRange2Min; // 0x1B20
|
||||
ziU16 unicodeRange2Max; // 0x1B22
|
||||
ziU8 unicodeMapSubLang; // 0x1B24
|
||||
ziU8 unk_0x1B25[3];
|
||||
union {
|
||||
ziU32 word;
|
||||
struct {
|
||||
ziU32 msb : 1;
|
||||
} bits;
|
||||
} unk_0x1B28;
|
||||
} pyFuzzy; // 0x1B28
|
||||
union {
|
||||
ziU32 word;
|
||||
struct {
|
||||
ziU32 msb : 1;
|
||||
} bits;
|
||||
} unk_0x1B2C;
|
||||
ziU8 unk_0x1B30;
|
||||
ziU8 koAltTables; // 0x1B30
|
||||
ziU8 unk_0x1B31;
|
||||
ziU16 unk_0x1B32;
|
||||
ziU16 unk_0x1B34;
|
||||
|
||||
@@ -21,7 +21,7 @@ ziS32 Zi8Punctuation(ziGetParam* param ZI_NEED_WORK) {
|
||||
}
|
||||
if (fc == 0) {
|
||||
count++;
|
||||
if (ZI_WORK->unk_0x00 == 0) {
|
||||
if (ZI_WORK->getcPhase == 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->unk_0x0C) {
|
||||
if (count >= (ziS32)ZI_WORK->targetCount) {
|
||||
return count;
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,7 @@ ziS32 Zi8Punctuation(ziGetParam* param ZI_NEED_WORK) {
|
||||
}
|
||||
j++;
|
||||
}
|
||||
if (ZI_WORK->unk_0x00 == 0) {
|
||||
if (ZI_WORK->getcPhase == 0) {
|
||||
param->letters = count;
|
||||
}
|
||||
return count;
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
#include <zi8clib/zitypes.h>
|
||||
|
||||
ziU32 Zi8GetZHuwdPtr(ziU32* arg0, ziU16* arg1 ZI_NEED_WORK) {
|
||||
if (ZI_WORK->unk_0x12C == 0) {
|
||||
if (ZI_WORK->uwdPtrCount == 0) {
|
||||
*arg0 = 0;
|
||||
*arg1 = 0;
|
||||
Zi8LogError(0x1A5, ZI_WORK);
|
||||
return 0;
|
||||
} else {
|
||||
*arg1 = ZI_WORK->unk_0x124[ZI_WORK->unk_0x12C - 1][1] / 3;
|
||||
*arg0 = (ziU32)ZI_WORK->unk_0x124[ZI_WORK->unk_0x12C - 1];
|
||||
*arg1 = ZI_WORK->unk_0x124[ZI_WORK->uwdPtrCount - 1][1] / 3;
|
||||
*arg0 = (ziU32)ZI_WORK->unk_0x124[ZI_WORK->uwdPtrCount - 1];
|
||||
*arg0 += 8;
|
||||
Zi8LogError(0x64, ZI_WORK);
|
||||
return 1;
|
||||
|
||||
@@ -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)->unk_0x1B28.word)->cANDch) ordinalIndex = 0xFDFF;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->cANDch) ordinalIndex = 0xFDFF;
|
||||
break;
|
||||
case 26: case 27:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->sANDsh) ordinalIndex = 0xFDFF;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->sANDsh) ordinalIndex = 0xFDFF;
|
||||
break;
|
||||
case 28: case 29:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->zANDzh) ordinalIndex = 0xFDFF;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->zANDzh) ordinalIndex = 0xFDFF;
|
||||
break;
|
||||
case 56: case 59:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->fANDh) ordinalIndex = 0xF9FF;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->fANDh) ordinalIndex = 0xF9FF;
|
||||
break;
|
||||
case 38:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->nANDl) ordinalIndex = 0xE5FF;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->nANDl) ordinalIndex = 0xE5FF;
|
||||
break;
|
||||
case 43:
|
||||
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;
|
||||
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;
|
||||
break;
|
||||
case 44:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->lANDr) ordinalIndex = 0xF1FF;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.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)->unk_0x1B28.word)->anANDang) ordinalIndex = 0xFFF7;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->anANDang) ordinalIndex = 0xFFF7;
|
||||
break;
|
||||
case 0x180:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->enANDeng) ordinalIndex = 0xFFF7;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->enANDeng) ordinalIndex = 0xFFF7;
|
||||
break;
|
||||
case 0x60:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->inANDing) ordinalIndex = 0xFFF7;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->inANDing) ordinalIndex = 0xFFF7;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
@@ -720,7 +720,7 @@ static int zi8InternalGetZH(ziGetParam* request, ZiChineseOptions* options, ziPt
|
||||
return 0;
|
||||
}
|
||||
emitWords = 1;
|
||||
if (request->count) request->count = request->elementCount;
|
||||
if (request->completion) request->completion = 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->unk_0x20 = emittedCount;
|
||||
request->count = emittedCount;
|
||||
goto engine_finish;
|
||||
}
|
||||
} else output[emittedCount++] = character;
|
||||
if (emittedCount >= request->maxCandidates) {
|
||||
request->letters = emittedCount;
|
||||
request->unk_0x20 = emittedCount;
|
||||
request->count = emittedCount;
|
||||
goto engine_finish;
|
||||
}
|
||||
}
|
||||
@@ -981,7 +981,7 @@ pud_candidate:
|
||||
++rangeIndex;
|
||||
}
|
||||
if (rangeIndex == request->elementCount) {
|
||||
if (!(request->context & 0x10)) request->count = request->elementCount;
|
||||
if (!(request->context & 0x10)) request->completion = request->elementCount;
|
||||
candidateStatus = 1;
|
||||
character = currentSpelling[wordLength];
|
||||
candidateOrdinal = 0xFFFF;
|
||||
@@ -1108,13 +1108,13 @@ pud_charset:
|
||||
output[outputIndex++] = ' ';
|
||||
if (outputIndex > outputLimit) {
|
||||
request->letters = emittedCount;
|
||||
request->unk_0x20 = emittedCount;
|
||||
request->count = emittedCount;
|
||||
goto engine_finish;
|
||||
}
|
||||
} else output[emittedCount++] = character;
|
||||
if (emittedCount >= request->maxCandidates) {
|
||||
request->letters = emittedCount;
|
||||
request->unk_0x20 = emittedCount;
|
||||
request->count = emittedCount;
|
||||
goto engine_finish;
|
||||
}
|
||||
}
|
||||
@@ -1302,13 +1302,13 @@ context_word_lookup:
|
||||
output[outputIndex++] = ' ';
|
||||
if (outputIndex > outputLimit) {
|
||||
request->letters = emittedCount;
|
||||
request->unk_0x20 = emittedCount;
|
||||
request->count = emittedCount;
|
||||
goto engine_finish;
|
||||
}
|
||||
} else output[emittedCount++] = previousOrdinal;
|
||||
if (emittedCount >= request->maxCandidates) {
|
||||
request->letters = emittedCount;
|
||||
request->unk_0x20 = emittedCount;
|
||||
request->count = emittedCount;
|
||||
goto engine_finish;
|
||||
}
|
||||
}
|
||||
@@ -1321,7 +1321,7 @@ context_phrase_next:
|
||||
}
|
||||
}
|
||||
context_results_done:
|
||||
if (request->wordCharCount) request->unk_0x20 = emittedCount;
|
||||
if (request->wordCharCount) request->count = 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)->unk_0x12C && (getMode != 0 || !firstPhoneticPass) &&
|
||||
if (((struct __zi8_work_data_s*)work)->uwdPtrCount && (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->unk_0x20 = emittedCount + 1;
|
||||
if (filteringMode == 4) request->count = emittedCount + 1;
|
||||
if (emitWords) {
|
||||
++emittedCount;
|
||||
outputIndex += rangeCount;
|
||||
|
||||
@@ -32,17 +32,17 @@ 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->unk_0x338) goto finish_graph;
|
||||
if (records[context->cnt - 1].node == (ziU8*)context->endNode) goto finish_graph;
|
||||
for (index = 0; index < count; index++) {
|
||||
if (records[index].key != elements[index] &&
|
||||
(ziU16)records[index].attr != elements[index]) goto finish_graph;
|
||||
}
|
||||
if (mode == 1) acceptPrefix = 0;
|
||||
} else {
|
||||
if (ZI_WORK->unk_0x141E != 0 && graphTable == 0xc &&
|
||||
Zi8GetTableSize(language, ZI_WORK->unk_0x141E, ZI_WORK) != 0) {
|
||||
graphData = (ziU8*)Zi8GetTableAddress(language, ZI_WORK->unk_0x141E, ZI_WORK);
|
||||
keyTable = ZI_WORK->unk_0x141E + 1;
|
||||
if (ZI_WORK->graphTableId != 0 && graphTable == 0xc &&
|
||||
Zi8GetTableSize(language, ZI_WORK->graphTableId, ZI_WORK) != 0) {
|
||||
graphData = (ziU8*)Zi8GetTableAddress(language, ZI_WORK->graphTableId, ZI_WORK);
|
||||
keyTable = ZI_WORK->graphTableId + 1;
|
||||
} else {
|
||||
if (Zi8GetTableSize(language, graphTable, ZI_WORK) == 0) {
|
||||
Zi8LogError(0x961, ZI_WORK);
|
||||
@@ -82,7 +82,7 @@ check_keys:
|
||||
records[0].node = ZiDAWGGetGraphInfo(context, keyData, (ziS16*)keys);
|
||||
} else {
|
||||
records[0].node = ZiDAWGGetGraph(context);
|
||||
context->unk_0x338 = 0;
|
||||
context->endNode = 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->unk_0x338) {
|
||||
while (searching && context->cnt != 0 && current->node != (ziU8*)context->endNode) {
|
||||
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->unk_0x141D == 0) {
|
||||
if (ZI_WORK->advanceGroup == 0) {
|
||||
return group;
|
||||
}
|
||||
}
|
||||
@@ -231,10 +231,10 @@ 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->unk_0x141C != 0) {
|
||||
ZI_WORK->unk_0x141E = 0x10;
|
||||
if (group != 0 && *group == 0xc && language == 10 && ZI_WORK->forceAltGraph != 0) {
|
||||
ZI_WORK->graphTableId = 0x10;
|
||||
} else {
|
||||
ZI_WORK->unk_0x141E = 0;
|
||||
ZI_WORK->graphTableId = 0;
|
||||
}
|
||||
}
|
||||
search_segment:
|
||||
@@ -273,14 +273,14 @@ search_segment:
|
||||
if (ZI_WORK->matchOffset == count) return 0;
|
||||
ZI_WORK->unk_0x1768++;
|
||||
status = 0;
|
||||
ZI_WORK->unk_0x141E = 0;
|
||||
ZI_WORK->graphTableId = 0;
|
||||
if (ZI_WORK->dawgCtx.key == 0 && language == 10) {
|
||||
for (index = 0; index < ZI_WORK->matchOffset; index++) {
|
||||
switch (ZI_WORK->unk_0x17F4[index]) {
|
||||
case 0x61:
|
||||
case 0x6f:
|
||||
case 0x75:
|
||||
ZI_WORK->unk_0x141E = 0x10;
|
||||
ZI_WORK->graphTableId = 0x10;
|
||||
goto search_segment;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,11 +8,15 @@ 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 flag;
|
||||
ziU8 unk_0x01[0xB];
|
||||
ziS32 count;
|
||||
ziU16 cap;
|
||||
ziU8 unk_0x12[2];
|
||||
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
|
||||
} ziSwParam;
|
||||
|
||||
ziU32 Zi8GetSyllablesCandidates(ziGetParam* param, ziSwParam* sw ZI_NEED_WORK) {
|
||||
@@ -54,16 +58,16 @@ ziU32 Zi8GetSyllablesCandidates(ziGetParam* param, ziSwParam* sw ZI_NEED_WORK) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (sw->flag != 0 || (param->getOptions & 0xFD) != 0x81) {
|
||||
if (sw->countOnly != 0 || (param->getOptions & 0xFD) != 0x81) {
|
||||
out = buf;
|
||||
rem = 0x40;
|
||||
} else {
|
||||
out = (ziWChar*)param->candidates;
|
||||
rem = sw->cap - 1;
|
||||
rem = sw->capacity - 1;
|
||||
}
|
||||
if ((param->getOptions & 0xFD) == 0x80) {
|
||||
u28 = (ziU8*)param->candidates;
|
||||
rem = sw->cap - 1;
|
||||
rem = sw->capacity - 1;
|
||||
}
|
||||
|
||||
if (rem <= param->elementCount) {
|
||||
@@ -94,8 +98,8 @@ ziU32 Zi8GetSyllablesCandidates(ziGetParam* param, ziSwParam* sw ZI_NEED_WORK) {
|
||||
firstCand--;
|
||||
goto L5dc;
|
||||
}
|
||||
if (sw->flag != 0) {
|
||||
if (++count >= sw->count) goto end;
|
||||
if (sw->countOnly != 0) {
|
||||
if (++count >= sw->maxCount) goto end;
|
||||
goto L5dc;
|
||||
}
|
||||
|
||||
@@ -147,8 +151,8 @@ L464b:
|
||||
firstCand--;
|
||||
goto L560;
|
||||
}
|
||||
if (sw->flag != 0) {
|
||||
if (++count >= sw->count) goto end;
|
||||
if (sw->countOnly != 0) {
|
||||
if (++count >= sw->maxCount) goto end;
|
||||
goto L560;
|
||||
}
|
||||
if (u28 != 0) {
|
||||
@@ -202,7 +206,7 @@ dec:
|
||||
goto L560;
|
||||
|
||||
end:
|
||||
if (sw->flag != 0) {
|
||||
if (sw->countOnly != 0) {
|
||||
param->letters = 0;
|
||||
} else {
|
||||
param->letters = (ziU8)count;
|
||||
|
||||
@@ -32,9 +32,9 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
|
||||
|
||||
ziBool Zi8ZHsetPYfuzzyPairs(ziFuzzyPYPairs pairs ZI_NEED_WORK) {
|
||||
if (pairs.ziDefault) {
|
||||
ZI_WORK->unk_0x1B28.word = *(const ziU32*)&Zi8PYdefaultFuzzyPairs;
|
||||
ZI_WORK->pyFuzzy.word = *(const ziU32*)&Zi8PYdefaultFuzzyPairs;
|
||||
} else {
|
||||
ZI_WORK->unk_0x1B28.word = *(ziU32*)&pairs;
|
||||
ZI_WORK->pyFuzzy.word = *(ziU32*)&pairs;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@@ -158,7 +158,7 @@ static ziBool Zi8AlphaSignature(ziGetParam* parameters, ziBool countOnly ZI_NEED
|
||||
length = length - parameters->firstCandidate;
|
||||
if (countOnly != 0) {
|
||||
parameters->letters = length;
|
||||
ZI_WORK->unk_0x0A = 0xff;
|
||||
ZI_WORK->maxWordLength = 0xff;
|
||||
return 1;
|
||||
}
|
||||
if (parameters->maxCandidates < length) length = parameters->maxCandidates;
|
||||
@@ -175,7 +175,7 @@ static ziBool Zi8AlphaSignature(ziGetParam* parameters, ziBool countOnly ZI_NEED
|
||||
current = signatures.first;
|
||||
length = signatures.length;
|
||||
}
|
||||
if (length > ZI_WORK->unk_0x0A) length = ZI_WORK->unk_0x0A;
|
||||
if (length > ZI_WORK->maxWordLength) length = ZI_WORK->maxWordLength;
|
||||
if ((parameters->elementCount < ZI_WORK->unk_0x140C[0] ||
|
||||
(parameters->getOptions & 0x7e) == 2) && length > parameters->elementCount) {
|
||||
length = parameters->elementCount;
|
||||
@@ -185,7 +185,7 @@ static ziBool Zi8AlphaSignature(ziGetParam* parameters, ziBool countOnly ZI_NEED
|
||||
if (parameters->letters == 2) {
|
||||
current = signatures.second;
|
||||
length = secondLength;
|
||||
if (length > ZI_WORK->unk_0x0A) length = ZI_WORK->unk_0x0A;
|
||||
if (length > ZI_WORK->maxWordLength) length = ZI_WORK->maxWordLength;
|
||||
if ((parameters->elementCount < ZI_WORK->unk_0x140C[0] ||
|
||||
(parameters->getOptions & 0x7e) == 2) && length > parameters->elementCount) {
|
||||
length = parameters->elementCount;
|
||||
@@ -194,7 +194,7 @@ static ziBool Zi8AlphaSignature(ziGetParam* parameters, ziBool countOnly ZI_NEED
|
||||
*output++ = 0;
|
||||
}
|
||||
*output++ = 0;
|
||||
ZI_WORK->unk_0x0A = 0xff;
|
||||
ZI_WORK->maxWordLength = 0xff;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ static ziBool Zi8ZhSignature(ziGetParam* parameters, ziBool countOnly ZI_NEED_WO
|
||||
length = length - parameters->firstCandidate;
|
||||
if (countOnly != 0) {
|
||||
parameters->letters = length;
|
||||
ZI_WORK->unk_0x0A = 0xff;
|
||||
ZI_WORK->maxWordLength = 0xff;
|
||||
return 1;
|
||||
}
|
||||
if (parameters->maxCandidates < length) length = parameters->maxCandidates;
|
||||
@@ -279,13 +279,13 @@ static ziBool Zi8ZhSignature(ziGetParam* parameters, ziBool countOnly ZI_NEED_WO
|
||||
|
||||
ziU8 _Zi8GetCandidates(ziGetParam* parameters ZI_NEED_WORK) {
|
||||
ZiCandidateOptions options = {0};
|
||||
options.capacity = ZI_WORK->unk_0x141A;
|
||||
options.capacity = ZI_WORK->capacity;
|
||||
return Zi8GetCandidatesOrCount(parameters, &options, ZI_WORK);
|
||||
}
|
||||
|
||||
ziU8 _Zi8CheckCandidates(ziGetParam* parameters ZI_NEED_WORK) {
|
||||
ZiCandidateOptions options = {0};
|
||||
options.capacity = ZI_WORK->unk_0x141A;
|
||||
options.capacity = ZI_WORK->capacity;
|
||||
options.flags = 1;
|
||||
return Zi8GetCandidatesOrCount(parameters, &options, ZI_WORK);
|
||||
}
|
||||
@@ -324,7 +324,7 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
|
||||
saved.savedCandidates = 0;
|
||||
saved.restoreCandidates = 0;
|
||||
if (options->lookupMode == '\0') {
|
||||
if (((ZI_WORK->unk_0x00 == '\t') && (parameters->elementCount != 0)) &&
|
||||
if (((ZI_WORK->getcPhase == '\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->unk_0x00 == '\0') || (ZI_WORK->countOnly == options->countOnly)) {
|
||||
switch(ZI_WORK->unk_0x00) {
|
||||
if ((ZI_WORK->getcPhase == '\0') || (ZI_WORK->countOnly == options->countOnly)) {
|
||||
switch(ZI_WORK->getcPhase) {
|
||||
case '\0':
|
||||
if (parameters->elements[0] == 0xEF04) {
|
||||
ZI_WORK->countOnly = options->countOnly;
|
||||
ZI_WORK->unk_0x00 = '\x01';
|
||||
ZI_WORK->getcPhase = '\x01';
|
||||
}
|
||||
break;
|
||||
case '\x02':
|
||||
case '\x04':
|
||||
case '\x06':
|
||||
if (parameters->elements[0] == 0xEF04) {
|
||||
++ZI_WORK->unk_0x00;
|
||||
++ZI_WORK->getcPhase;
|
||||
}
|
||||
else {
|
||||
ZI_WORK->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\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->unk_0x00;
|
||||
++ZI_WORK->getcPhase;
|
||||
}
|
||||
else {
|
||||
ZI_WORK->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\0';
|
||||
}
|
||||
break;
|
||||
case '\b':
|
||||
case '\t':
|
||||
if ((parameters->elements[0] == 0xEF04) &&
|
||||
((ziU8)Zi8ZhSignature(parameters,options->countOnly,ZI_WORK) != 0)) {
|
||||
ZI_WORK->unk_0x00 = '\t';
|
||||
ZI_WORK->getcPhase = '\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->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\0';
|
||||
}
|
||||
if ((ZI_WORK->unk_0x00 == '\0') && (parameters->elements[0] == 0xEF04)) {
|
||||
ZI_WORK->unk_0x00 = '\x01';
|
||||
if ((ZI_WORK->getcPhase == '\0') && (parameters->elements[0] == 0xEF04)) {
|
||||
ZI_WORK->getcPhase = '\x01';
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -400,75 +400,75 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
|
||||
break;
|
||||
case 0x11:
|
||||
default:
|
||||
if ((ZI_WORK->unk_0x00 == '\0') || (ZI_WORK->countOnly == options->countOnly)) {
|
||||
switch(ZI_WORK->unk_0x00) {
|
||||
if ((ZI_WORK->getcPhase == '\0') || (ZI_WORK->countOnly == options->countOnly)) {
|
||||
switch(ZI_WORK->getcPhase) {
|
||||
case '\0':
|
||||
if (parameters->elements[0] == 0xEFF2) {
|
||||
ZI_WORK->countOnly = options->countOnly;
|
||||
ZI_WORK->unk_0x00 = '\x01';
|
||||
ZI_WORK->getcPhase = '\x01';
|
||||
}
|
||||
break;
|
||||
case '\x01':
|
||||
if (parameters->elements[0] == 0xEFF3) {
|
||||
ZI_WORK->unk_0x00 = '\x02';
|
||||
ZI_WORK->getcPhase = '\x02';
|
||||
}
|
||||
else {
|
||||
ZI_WORK->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\0';
|
||||
}
|
||||
break;
|
||||
case '\x02':
|
||||
if (parameters->elements[0] == 0xEFF5) {
|
||||
ZI_WORK->unk_0x00 = '\x03';
|
||||
ZI_WORK->getcPhase = '\x03';
|
||||
}
|
||||
else {
|
||||
ZI_WORK->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\0';
|
||||
}
|
||||
break;
|
||||
case '\x03':
|
||||
if (parameters->elements[0] == 0xEFF7) {
|
||||
ZI_WORK->unk_0x00 = '\x04';
|
||||
ZI_WORK->getcPhase = '\x04';
|
||||
}
|
||||
else {
|
||||
ZI_WORK->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\0';
|
||||
}
|
||||
break;
|
||||
case '\x04':
|
||||
if (parameters->elements[0] == 0xEFF8) {
|
||||
ZI_WORK->unk_0x00 = '\x05';
|
||||
ZI_WORK->getcPhase = '\x05';
|
||||
}
|
||||
else {
|
||||
ZI_WORK->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\0';
|
||||
}
|
||||
break;
|
||||
case '\x05':
|
||||
if (parameters->elements[0] == 0xEFF9) {
|
||||
ZI_WORK->unk_0x00 = '\x06';
|
||||
ZI_WORK->getcPhase = '\x06';
|
||||
}
|
||||
else {
|
||||
ZI_WORK->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\0';
|
||||
}
|
||||
break;
|
||||
case '\x06':
|
||||
if (parameters->elements[0] == 0xEFF2) {
|
||||
ZI_WORK->unk_0x00 = '\a';
|
||||
ZI_WORK->getcPhase = '\a';
|
||||
}
|
||||
else {
|
||||
ZI_WORK->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\0';
|
||||
}
|
||||
break;
|
||||
case '\a':
|
||||
if (parameters->elements[0] == 0xEFF5) {
|
||||
ZI_WORK->unk_0x00 = '\b';
|
||||
ZI_WORK->getcPhase = '\b';
|
||||
}
|
||||
else {
|
||||
ZI_WORK->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\0';
|
||||
}
|
||||
break;
|
||||
case '\b':
|
||||
case '\t':
|
||||
if ((parameters->elements[0] == 0xEFF8) &&
|
||||
((ziU8)Zi8AlphaSignature(parameters,options->countOnly,ZI_WORK) != 0)) {
|
||||
ZI_WORK->unk_0x00 = '\t';
|
||||
ZI_WORK->getcPhase = '\t';
|
||||
candidateCount = (unsigned int)parameters->letters;
|
||||
if (options->countOnly != '\0') {
|
||||
parameters->letters = 0;
|
||||
@@ -477,24 +477,24 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
|
||||
return candidateCount;
|
||||
}
|
||||
default:
|
||||
ZI_WORK->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\0';
|
||||
}
|
||||
if ((ZI_WORK->unk_0x00 == '\0') && (parameters->elements[0] == 0xEFF2)) {
|
||||
ZI_WORK->unk_0x00 = '\x01';
|
||||
if ((ZI_WORK->getcPhase == '\0') && (parameters->elements[0] == 0xEFF2)) {
|
||||
ZI_WORK->getcPhase = '\x01';
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (1 < parameters->elementCount) {
|
||||
ZI_WORK->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\0';
|
||||
}
|
||||
}
|
||||
ZI_WORK->subLanguage = parameters->subLanguage;
|
||||
ZI_WORK->cangjieEnabled = Zi8GetFormatVersion(1,ZI_WORK) & 2;
|
||||
options->maxCount = ZI_WORK->unk_0x10;
|
||||
options->maxWordLength = ZI_WORK->unk_0x0A;
|
||||
ZI_WORK->unk_0x0A = -1;
|
||||
options->maxWordLength = ZI_WORK->maxWordLength;
|
||||
ZI_WORK->maxWordLength = -1;
|
||||
if ((ziU8)Zi8LangSupported(parameters->language,ZI_WORK) == 0) {
|
||||
Zi8LogError(0x163,ZI_WORK);
|
||||
return 0;
|
||||
@@ -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->count = parameters->unk_0x20 = 0;
|
||||
parameters->letters = parameters->completion = parameters->count = 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->count = 1;
|
||||
parameters->completion = 1;
|
||||
}
|
||||
}
|
||||
else if ((parameters->language == 1) && (parameters->getMode == 0xf)) {
|
||||
@@ -711,6 +711,6 @@ void Zi8Memcpy(ziU8* destination, ziU8* source, ziS32 count) {
|
||||
}
|
||||
|
||||
ziBool Zi8SetMaxWordLength(ziU8 length ZI_NEED_WORK) {
|
||||
ZI_WORK->unk_0x0A = length;
|
||||
ZI_WORK->maxWordLength = length;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -18,12 +18,12 @@ ziU8 Zi8InitializeDynamic(ziLanguageEntry* langEntries ZI_NEED_WORK) {
|
||||
Zi8Memset(__zi8_work_data, 0, 0x1B44);
|
||||
ZI_WORK->unk_0x08 = 1;
|
||||
ZI_WORK->unk_0x09 = 1;
|
||||
ZI_WORK->unk_0x0A = 0xFF;
|
||||
ZI_WORK->maxWordLength = 0xFF;
|
||||
ZI_WORK->unk_0x10 = 0x64;
|
||||
*(ziU16*)&ZI_WORK->unk_0x0C = 0xFFFF;
|
||||
*(ziU16*)&ZI_WORK->targetCount = 0xFFFF;
|
||||
ZI_WORK->separator = 0x20;
|
||||
ZI_WORK->unk_0x1C[2] = 0;
|
||||
ZI_WORK->unk_0x1B30 = 0;
|
||||
ZI_WORK->koAltTables = 0;
|
||||
ZI_WORK->unk_0x1B3A = 0;
|
||||
ZI_WORK->unk_0x1B36 = 0;
|
||||
ZI_WORK->unk_0x1B32 = 0;
|
||||
@@ -44,17 +44,17 @@ ziU8 Zi8InitializeDynamic(ziLanguageEntry* langEntries ZI_NEED_WORK) {
|
||||
ZI_WORK->unk_0x1874 = 0x2D;
|
||||
ZI_WORK->language = 0;
|
||||
ZI_WORK->unk_0x1C[3] = 0;
|
||||
ZI_WORK->unk_0x141A = 0x100;
|
||||
ZI_WORK->capacity = 0x100;
|
||||
Zi8SetLatinSearchOrder(0, 0, ZI_WORK);
|
||||
ZADP_Zi8SetPDremoveOpt(1, ZI_WORK);
|
||||
ZI_WORK->unk_0x17 = 5;
|
||||
ZI_WORK->zhPudMinPrefix = 5;
|
||||
ZI_WORK->cangjieEnabled = Zi8GetFormatVersion(1, ZI_WORK) & 2;
|
||||
ZI_WORK->unk_0x1B28.bits.msb = 1;
|
||||
ZI_WORK->pyFuzzy.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->unk_0x1B28.word;
|
||||
pyFuzzy = ZI_WORK->pyFuzzy.word;
|
||||
ppyFuzzy = &pyFuzzy;
|
||||
Zi8ZHsetPYfuzzyPairs(ppyFuzzy, ZI_WORK);
|
||||
Zi8SetParentalControls(2, ZI_WORK);
|
||||
|
||||
@@ -65,19 +65,19 @@ ziU16 Zi8Uni2Ptr(ziU16 ch, ziE12* buf ZI_NEED_WORK) {
|
||||
}
|
||||
}
|
||||
e = (ziU8*)table;
|
||||
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);
|
||||
if (WORKP->unicodeMap != ZI8_NULL && WORKP->unicodeMapSubLang == WORKP->subLanguage) {
|
||||
if ((ziU16)ch >= WORKP->unicodeRange1Min && (ziU16)ch <= WORKP->unicodeRange1Max) {
|
||||
i = (ziU16)(ch - WORKP->unicodeRange1Min);
|
||||
goto map;
|
||||
}
|
||||
if ((ziU16)ch >= WORKP->unk_0x1B20 && (ziU16)ch <= WORKP->unk_0x1B22) {
|
||||
i = (ziU16)(WORKP->unk_0x1B1E + (ch - WORKP->unk_0x1B20) -
|
||||
WORKP->unk_0x1B1C + 1);
|
||||
if ((ziU16)ch >= WORKP->unicodeRange2Min && (ziU16)ch <= WORKP->unicodeRange2Max) {
|
||||
i = (ziU16)(WORKP->unicodeRange1Max + (ch - WORKP->unicodeRange2Min) -
|
||||
WORKP->unicodeRange1Min + 1);
|
||||
goto map;
|
||||
}
|
||||
return 0xFFFF;
|
||||
map:
|
||||
i = WORKP->unk_0x1B18[i];
|
||||
i = WORKP->unicodeMap[i];
|
||||
if (i != 0xFFFF) {
|
||||
e = (ziU8*)table + i * 0xC;
|
||||
if (hi == e[6] && lo == e[7]) {
|
||||
|
||||
@@ -102,7 +102,7 @@ ziU32 Zi8MatchPUDdata_ZHS(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar*
|
||||
wordSize = *word++;
|
||||
entrySize = wordSize;
|
||||
if (language == 1) {
|
||||
if (ZI_WORK->unk_0x17 > *word) goto next;
|
||||
if (ZI_WORK->zhPudMinPrefix > *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->unk_0x1F || !Zi8ChangeCharCase(0, &folded, language, __zi8_work_data) || folded != pattern[index])) goto next;
|
||||
if (folded != pattern[index] && (!ZI_WORK->ignoreCase || !Zi8ChangeCharCase(0, &folded, language, __zi8_work_data) || folded != pattern[index])) goto next;
|
||||
}
|
||||
}
|
||||
matched:
|
||||
|
||||
@@ -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->unk_0x12E == 1 && candidate->priority < word->priority) break;
|
||||
if (ZI_WORK->uwdPrioritySort == 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->unk_0x138 <= 2 && ZI_WORK->unk_0x138 != 0 && ZI_WORK->unk_0x130[ZI_WORK->unk_0x138 - 1] != 0)) {
|
||||
if (!(ZI_WORK->uwdDictCount <= 2 && ZI_WORK->uwdDictCount != 0 && ZI_WORK->uwdDicts[ZI_WORK->uwdDictCount - 1] != 0)) {
|
||||
Zi8ReplaceLastError(0x19C, __zi8_work_data);
|
||||
return 0;
|
||||
}
|
||||
dictionary = ZI_WORK->unk_0x130[ZI_WORK->unk_0x138 - 1];
|
||||
dictionary = ZI_WORK->uwdDicts[ZI_WORK->uwdDictCount - 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->unk_0x1F != 0) {
|
||||
if (ZI_WORK->ignoreCase != 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->unk_0x1F || !Zi8ChangeCharCase(0, &folded, language, __zi8_work_data) || folded != pattern[position])) goto next;
|
||||
if (folded != pattern[position] && (!ZI_WORK->ignoreCase || !Zi8ChangeCharCase(0, &folded, language, __zi8_work_data) || folded != pattern[position])) goto next;
|
||||
}
|
||||
}
|
||||
if (ZI_WORK->unk_0x140 != 0) {
|
||||
|
||||
@@ -199,10 +199,10 @@ checkEntry:
|
||||
}
|
||||
|
||||
result = graph + (ziU32)entry[4] * 0x10000 + (((ziU16)entry[5] << 8) + entry[6]);
|
||||
((zi8DawgCtx*)context)->unk_0x338 =
|
||||
((zi8DawgCtx*)context)->endNode =
|
||||
graph + (ziU32)entry[7] * 0x10000 + (((ziU16)entry[8] << 8) + entry[9]);
|
||||
if (((zi8DawgCtx*)context)->unk_0x338 == graph) {
|
||||
((zi8DawgCtx*)context)->unk_0x338 = 0;
|
||||
if (((zi8DawgCtx*)context)->endNode == graph) {
|
||||
((zi8DawgCtx*)context)->endNode = 0;
|
||||
}
|
||||
|
||||
if ((((ziU16)entry[0] << 8) + entry[1]) == 0) {
|
||||
|
||||
@@ -52,7 +52,7 @@ ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument,
|
||||
result = 0;
|
||||
state.characterIndex = 0xFF;
|
||||
state.currentCandidate = params->firstCandidate;
|
||||
params->letters = params->count = params->unk_0x20 = 0;
|
||||
params->letters = params->completion = params->count = 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)->unk_0x1B30 == 1)) {
|
||||
if ((((struct __zi8_work_data_s*)workData)->koAltTables == 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)->unk_0x1B30 == 0)) {
|
||||
if ((state.tableCount6 != 0) && (((struct __zi8_work_data_s*)workData)->koAltTables == 0)) {
|
||||
params->candidates[(ziU8)result] += state.inputIndex * state.tableCount3;
|
||||
}
|
||||
result++;
|
||||
}
|
||||
if (currentCharacter == 0) {
|
||||
params->count = state.matched + 1;
|
||||
params->completion = state.matched + 1;
|
||||
}
|
||||
currentCharacter += state.matched;
|
||||
} else {
|
||||
@@ -199,14 +199,14 @@ ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument,
|
||||
state.currentCandidate--;
|
||||
}
|
||||
if (currentCharacter == 0) {
|
||||
params->count = 1;
|
||||
params->completion = 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->count = 1;
|
||||
params->completion = 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->count = 1;
|
||||
params->completion = 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)->unk_0x1B30 == 0) {
|
||||
if (((struct __zi8_work_data_s*)workData)->koAltTables == 0) {
|
||||
table = (ziU8*)Zi8GetTableAddress(ZI8_LANG_KO, 3, workData);
|
||||
tableCount = Zi8GetTableCount(ZI8_LANG_KO, 3, workData);
|
||||
} else {
|
||||
|
||||
@@ -309,7 +309,7 @@ ziU32 Zi8GetKOcandidates(ziGetParam* param, ZiKoreanCandidateOptions* options ZI
|
||||
}
|
||||
if (options->countOnly == 0) {
|
||||
param->letters = 0;
|
||||
param->unk_0x20 = 0;
|
||||
param->count = 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->unk_0x20;
|
||||
++param->count;
|
||||
if (++param->letters >= param->maxCandidates) {
|
||||
return param->letters;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
param->candidates[search.candidateCount++] = search.character;
|
||||
++param->unk_0x20;
|
||||
++param->count;
|
||||
if (++param->letters >= param->maxCandidates) {
|
||||
Zi8_814834AC(param, &search.remainingCandidates, &search.candidateCount, &search.inserted, ZI_WORK);
|
||||
param->unk_0x20 = search.candidateCount;
|
||||
param->count = 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->unk_0x20 = 0;
|
||||
param->count = 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->unk_0x20;
|
||||
++param->count;
|
||||
if (++param->letters < param->maxCandidates) {
|
||||
goto skip_word;
|
||||
}
|
||||
Zi8_814834AC(param, &search.remainingCandidates, &search.candidateCount, &search.inserted, ZI_WORK);
|
||||
param->unk_0x20 = search.candidateCount;
|
||||
param->count = 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->unk_0x20 = 0;
|
||||
param->count = 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->unk_0x20 = search.candidateCount;
|
||||
param->count = search.candidateCount;
|
||||
param->letters = search.candidateCount;
|
||||
}
|
||||
if (param->elementCount > 9) {
|
||||
|
||||
@@ -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->unk_0x1F || language == 1) break;
|
||||
if (!ZI_WORK->ignoreCase || language == 1) break;
|
||||
folded = pattern[position];
|
||||
if (!Zi8ChangeCharCase(1, &folded, language, __zi8_work_data) || folded != word[position]) break;
|
||||
}
|
||||
|
||||
@@ -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->count,&match->first,&match->first2,__zi8_work_data);
|
||||
&request->completion,&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->count = request->elementCount;
|
||||
request->completion = 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->count = phoneticLength - 1;
|
||||
request->completion = phoneticLength - 1;
|
||||
}
|
||||
buffers.phoneticInput = buffers.phoneticInput + phoneticLength - 1;
|
||||
phoneticLength = 0;
|
||||
@@ -306,7 +306,7 @@ savePhonetic:
|
||||
}
|
||||
}
|
||||
if (((request->context & contextMask) != 0) &&
|
||||
((1 < match->nCand || (request->count != elementCount)))) {
|
||||
((1 < match->nCand || (request->completion != elementCount)))) {
|
||||
match->phon[0] = 0xFFFF;
|
||||
match->phon2[0] = 0xFFFF;
|
||||
match->nCand = 0;
|
||||
|
||||
@@ -152,10 +152,10 @@ u32 __SCGetConfBufSize();
|
||||
|
||||
typedef struct SC_BT_DEV_INFO {
|
||||
u8 devName[20]; // 0x00
|
||||
u8 unk_0x14;
|
||||
u8 unk_0x15[0xB];
|
||||
u8 pad_0x14; // 0x14
|
||||
u8 pad_0x15[0xB]; // 0x15
|
||||
LINK_KEY linkKey; // 0x20
|
||||
u8 unk_0x30[0x10];
|
||||
u8 pad_0x30[0x10]; // 0x30
|
||||
} SC_BT_DEV_INFO;
|
||||
|
||||
typedef struct SCBtDeviceInfo {
|
||||
|
||||
@@ -10,7 +10,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void (*USBCallback)(IOSError result, void* arg);
|
||||
typedef void (*USBIsoCallback)(IOSError err, void* unkIsoArg, void* cbArg);
|
||||
typedef void (*USBIsoCallback)(IOSError err, void* isoArg, void* cbArg);
|
||||
|
||||
IOSError IUSB_OpenLib();
|
||||
IOSError IUSB_CloseLib();
|
||||
|
||||
@@ -133,11 +133,11 @@ typedef struct WPADExtConfig {
|
||||
union {
|
||||
struct WPADFSConfig {
|
||||
s16 stickXCenter; // 0x00
|
||||
s16 unk_0x02; // 0x02
|
||||
s16 unk_0x04; // 0x04
|
||||
s16 stickXMin; // 0x02
|
||||
s16 stickXMax; // 0x04
|
||||
s16 stickYCenter; // 0x06
|
||||
s16 unk_0x08; // 0x08
|
||||
s16 unk_0x0A; // 0x0A
|
||||
s16 stickYMin; // 0x08
|
||||
s16 stickYMax; // 0x0A
|
||||
|
||||
s16 accX0g; // 0x0C
|
||||
s16 accY0g; // 0x0E
|
||||
@@ -150,18 +150,18 @@ typedef struct WPADExtConfig {
|
||||
|
||||
struct WPADCLConfig {
|
||||
s16 lStickXCenter; // 0x00
|
||||
s16 unk_0x02; // 0x02
|
||||
s16 unk_0x04; // 0x04
|
||||
s16 lStickXMin; // 0x02
|
||||
s16 lStickXMax; // 0x04
|
||||
s16 lStickYCenter; // 0x06
|
||||
s16 unk_0x08; // 0x08
|
||||
s16 unk_0x0A; // 0x0A
|
||||
s16 lStickYMin; // 0x08
|
||||
s16 lStickYMax; // 0x0A
|
||||
|
||||
s16 rStickXCenter; // 0x0C
|
||||
s16 unk_0x0E; // 0x0E
|
||||
s16 unk_0x10; // 0x10
|
||||
s16 rStickXMin; // 0x0E
|
||||
s16 rStickXMax; // 0x10
|
||||
s16 rStickYCenter; // 0x12
|
||||
s16 unk_0x14; // 0x14
|
||||
s16 unk_0x16; // 0x16
|
||||
s16 rStickYMin; // 0x14
|
||||
s16 rStickYMax; // 0x16
|
||||
|
||||
u8 triggerLZero; // 0x18
|
||||
u8 triggerRZero; // 0x19
|
||||
@@ -171,7 +171,7 @@ typedef struct WPADExtConfig {
|
||||
|
||||
typedef struct WPADCB {
|
||||
WPADGameInfo gameInfo; // 0x00
|
||||
s32 unk_0x38[2];
|
||||
s32 gameInfoStatus[2]; // 0x38
|
||||
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 unk_0x910;
|
||||
u8 suppressDisconnect; // 0x910
|
||||
u8 calibrated; // 0x911
|
||||
u16 comboHeld; // 0x912
|
||||
u8 encryptionKey[16]; // 0x914
|
||||
|
||||
@@ -26,7 +26,7 @@ typedef struct USBKBDCmdLED {
|
||||
|
||||
typedef struct USBKBDCmdLEDAsync {
|
||||
USBKBDCmdLED base; // 0x00
|
||||
u8 unk_0x08[0x10];
|
||||
u8 pad_0x08[0x10]; // 0x08
|
||||
USBKBDCmdLEDCallback cb; // 0x18
|
||||
void* cbArg; // 0x1C
|
||||
} USBKBDCmdLEDAsync;
|
||||
|
||||
@@ -66,16 +66,16 @@
|
||||
|
||||
typedef struct
|
||||
{
|
||||
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
|
||||
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
|
||||
char pad4_[1]; // 0x1d
|
||||
UINT8 at_0x1e; // 0x1e
|
||||
UINT8 at_0x1f; // 0x1f
|
||||
UINT8 at_0x20; // 0x20
|
||||
UINT8 open_state; // 0x1e
|
||||
UINT8 task_id; // 0x1f
|
||||
UINT8 mbox; // 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->at_0x1e != 2)
|
||||
if (p_cb->open_state != 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->at_0x1a[pipe])
|
||||
switch (p_cb->rx_state[pipe])
|
||||
{
|
||||
case 0:
|
||||
if (r27 == 1)
|
||||
{
|
||||
p_cb->at_0x00[pipe] = GKI_getpoolbuf(GKI_POOL_ID_2);
|
||||
p_cb->at_0x14[pipe] = 4;
|
||||
p_cb->p_rx_msg[pipe] = GKI_getpoolbuf(GKI_POOL_ID_2);
|
||||
p_cb->pkt_type[pipe] = 4;
|
||||
}
|
||||
else if (r27 == 2)
|
||||
{
|
||||
p_cb->at_0x00[pipe] = GKI_getpoolbuf(GKI_POOL_ID_3);
|
||||
p_cb->at_0x14[pipe] = 2;
|
||||
p_cb->p_rx_msg[pipe] = GKI_getpoolbuf(GKI_POOL_ID_3);
|
||||
p_cb->pkt_type[pipe] = 2;
|
||||
}
|
||||
else if (r27 == 3)
|
||||
{
|
||||
p_cb->at_0x00[pipe] = GKI_getpoolbuf(GKI_POOL_ID_1);
|
||||
p_cb->at_0x14[pipe] = 3;
|
||||
p_cb->p_rx_msg[pipe] = GKI_getpoolbuf(GKI_POOL_ID_1);
|
||||
p_cb->pkt_type[pipe] = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (p_cb->at_0x00[pipe])
|
||||
if (p_cb->p_rx_msg[pipe])
|
||||
{
|
||||
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;
|
||||
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;
|
||||
}
|
||||
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->at_0x1a[pipe] = 2;
|
||||
p_cb->rx_state[pipe] = 2;
|
||||
}
|
||||
|
||||
p_cb->at_0x0c[pipe] =
|
||||
hcisu_preamble_table[p_cb->at_0x14[pipe] - 1];
|
||||
p_cb->bytes_left[pipe] =
|
||||
hcisu_preamble_table[p_cb->pkt_type[pipe] - 1];
|
||||
|
||||
/* fallthrough */
|
||||
|
||||
case 1:
|
||||
*((UINT8 *)(p_cb->at_0x00[pipe] + 1)
|
||||
+ p_cb->at_0x00[pipe]->len++) = byte;
|
||||
*((UINT8 *)(p_cb->p_rx_msg[pipe] + 1)
|
||||
+ p_cb->p_rx_msg[pipe]->len++) = byte;
|
||||
|
||||
--p_cb->at_0x0c[pipe];
|
||||
--p_cb->bytes_left[pipe];
|
||||
|
||||
if (p_cb->at_0x0c[pipe] == 0)
|
||||
if (p_cb->bytes_left[pipe] == 0)
|
||||
{
|
||||
msg_len = byte;
|
||||
|
||||
if (p_cb->at_0x14[pipe] == 2)
|
||||
if (p_cb->pkt_type[pipe] == 2)
|
||||
{
|
||||
msg_len = (msg_len << 8) + p_cb->at_0x17[pipe];
|
||||
msg_len = (msg_len << 8) + p_cb->len_hi[pipe];
|
||||
|
||||
if ((p_cb->at_0x00[pipe] =
|
||||
if ((p_cb->p_rx_msg[pipe] =
|
||||
(HC_BT_HDR *)l2cap_link_chk_pkt_start(
|
||||
(BT_HDR *)p_cb->at_0x00[pipe]))
|
||||
(BT_HDR *)p_cb->p_rx_msg[pipe]))
|
||||
== 0)
|
||||
{
|
||||
p_cb->at_0x0c[pipe] = msg_len;
|
||||
p_cb->bytes_left[pipe] = msg_len;
|
||||
|
||||
if (msg_len == 0)
|
||||
p_cb->at_0x1a[pipe] = 0;
|
||||
p_cb->rx_state[pipe] = 0;
|
||||
else
|
||||
p_cb->at_0x1a[pipe] = 4;
|
||||
p_cb->rx_state[pipe] = 4;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
p_cb->at_0x0c[pipe] = msg_len;
|
||||
p_cb->bytes_left[pipe] = msg_len;
|
||||
|
||||
if (sizeof(HC_BT_HDR)
|
||||
+ hcisu_preamble_table[p_cb->at_0x14[pipe] - 1]
|
||||
+ hcisu_preamble_table[p_cb->pkt_type[pipe] - 1]
|
||||
+ msg_len
|
||||
> GKI_get_buf_size(p_cb->at_0x00[pipe]))
|
||||
> GKI_get_buf_size(p_cb->p_rx_msg[pipe]))
|
||||
{
|
||||
GKI_freebuf(p_cb->at_0x00[pipe]);
|
||||
p_cb->at_0x00[pipe] = NULL;
|
||||
p_cb->at_0x1a[pipe] = 4;
|
||||
GKI_freebuf(p_cb->p_rx_msg[pipe]);
|
||||
p_cb->p_rx_msg[pipe] = NULL;
|
||||
p_cb->rx_state[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->at_0x1a[pipe] = 3;
|
||||
p_cb->rx_state[pipe] = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
msg_received = TRUE;
|
||||
p_cb->at_0x1a[pipe] = 0;
|
||||
p_cb->rx_state[pipe] = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
p_cb->at_0x17[pipe] = byte;
|
||||
p_cb->len_hi[pipe] = byte;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
--p_cb->at_0x0c[pipe];
|
||||
--p_cb->bytes_left[pipe];
|
||||
|
||||
if (p_cb->at_0x0c[pipe] == 0)
|
||||
if (p_cb->bytes_left[pipe] == 0)
|
||||
{
|
||||
msg_len = byte;
|
||||
|
||||
if (p_cb->at_0x14[pipe] == 2)
|
||||
msg_len = (msg_len << 8) + p_cb->at_0x17[pipe];
|
||||
if (p_cb->pkt_type[pipe] == 2)
|
||||
msg_len = (msg_len << 8) + p_cb->len_hi[pipe];
|
||||
|
||||
p_cb->at_0x0c[pipe] = msg_len;
|
||||
p_cb->at_0x1a[pipe] = 4;
|
||||
p_cb->bytes_left[pipe] = msg_len;
|
||||
p_cb->rx_state[pipe] = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
p_cb->at_0x17[pipe] = byte;
|
||||
p_cb->len_hi[pipe] = byte;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
*((UINT8 *)(p_cb->at_0x00[pipe] + 1)
|
||||
+ p_cb->at_0x00[pipe]->len++) = byte;
|
||||
*((UINT8 *)(p_cb->p_rx_msg[pipe] + 1)
|
||||
+ p_cb->p_rx_msg[pipe]->len++) = byte;
|
||||
|
||||
--p_cb->at_0x0c[pipe];
|
||||
--p_cb->bytes_left[pipe];
|
||||
|
||||
len = UUSB_Read(pipe + 1,
|
||||
(UINT8 *)(p_cb->at_0x00[pipe] + 1)
|
||||
+ p_cb->at_0x00[pipe]->len,
|
||||
p_cb->at_0x0c[pipe]);
|
||||
(UINT8 *)(p_cb->p_rx_msg[pipe] + 1)
|
||||
+ p_cb->p_rx_msg[pipe]->len,
|
||||
p_cb->bytes_left[pipe]);
|
||||
|
||||
p_cb->at_0x00[pipe]->len += len;
|
||||
p_cb->at_0x0c[pipe] -= len;
|
||||
p_cb->p_rx_msg[pipe]->len += len;
|
||||
p_cb->bytes_left[pipe] -= len;
|
||||
bytes_read += len;
|
||||
|
||||
if (p_cb->at_0x0c[pipe] == 0)
|
||||
if (p_cb->bytes_left[pipe] == 0)
|
||||
{
|
||||
if (p_cb->at_0x14[pipe] == 2
|
||||
if (p_cb->pkt_type[pipe] == 2
|
||||
&& l2cap_link_chk_pkt_end() == 0)
|
||||
{
|
||||
p_cb->at_0x1a[pipe] = 0;
|
||||
p_cb->rx_state[pipe] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
msg_received = TRUE;
|
||||
p_cb->at_0x1a[pipe] = 0;
|
||||
p_cb->rx_state[pipe] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 4:
|
||||
--p_cb->at_0x0c[pipe];
|
||||
--p_cb->bytes_left[pipe];
|
||||
|
||||
if (p_cb->at_0x0c[pipe] == 0)
|
||||
p_cb->at_0x1a[pipe] = 0;
|
||||
if (p_cb->bytes_left[pipe] == 0)
|
||||
p_cb->rx_state[pipe] = 0;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (msg_received)
|
||||
{
|
||||
GKI_send_msg(hcisu_h2_cb.at_0x1f, 0, p_cb->at_0x00[pipe]);
|
||||
p_cb->at_0x00[pipe] = NULL;
|
||||
GKI_send_msg(hcisu_h2_cb.task_id, 0, p_cb->p_rx_msg[pipe]);
|
||||
p_cb->p_rx_msg[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.at_0x1f, 0, p_msg);
|
||||
GKI_send_msg(hcisu_h2_cb.task_id, 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.at_0x1e = 0;
|
||||
hcisu_h2_cb.open_state = 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.rx_state[0] = 0;
|
||||
hcisu_h2_cb.rx_state[1] = 0;
|
||||
hcisu_h2_cb.rx_state[2] = 0;
|
||||
|
||||
hcisu_h2_cb.at_0x1f = taskId;
|
||||
hcisu_h2_cb.at_0x20 = mbox;
|
||||
hcisu_h2_cb.at_0x12 = bufSize;
|
||||
hcisu_h2_cb.task_id = taskId;
|
||||
hcisu_h2_cb.mbox = mbox;
|
||||
hcisu_h2_cb.buf_size = 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.at_0x1f;
|
||||
uusb.at_0x08 = hcisu_h2_cb.task_id;
|
||||
|
||||
hcisu_h2_cb.at_0x1e = 2;
|
||||
hcisu_h2_cb.open_state = 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.at_0x1e = 0;
|
||||
hcisu_h2_cb.open_state = 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.at_0x12, &hcisu_h2_cb);
|
||||
len - sizeof(HC_BT_HDR) - hcisu_h2_cb.buf_size, &hcisu_h2_cb);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ typedef struct
|
||||
u8 bulkEndpoint1;
|
||||
u8 bulkEndpoint2;
|
||||
u8 intrEndpoint1;
|
||||
char at_0x13; // intrEndpoint2?
|
||||
u8 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 at_0x38;
|
||||
UINT8 bulk_outstanding;
|
||||
BUFFER_Q intr_buffer_q;
|
||||
UINT8 at_0x48;
|
||||
UINT8 intr_outstanding;
|
||||
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.at_0x13 = 0;
|
||||
usb.intrEndpoint2 = 0;
|
||||
|
||||
usb.fd = 0;
|
||||
|
||||
@@ -363,12 +363,12 @@ static void uusb_WriteCtrlDataCB(long result, void *p_data)
|
||||
|
||||
GKI_disable();
|
||||
|
||||
--usb.at_0x48;
|
||||
--usb.intr_outstanding;
|
||||
|
||||
GKI_enable();
|
||||
}
|
||||
|
||||
if (usb.at_0x48 >= 5)
|
||||
if (usb.intr_outstanding >= 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.at_0x48;
|
||||
++usb.intr_outstanding;
|
||||
|
||||
GKI_enable();
|
||||
}
|
||||
@@ -411,12 +411,12 @@ static void uusb_WriteBulkDataCB(long result, void *p_data)
|
||||
|
||||
GKI_disable();
|
||||
|
||||
--usb.at_0x38;
|
||||
--usb.bulk_outstanding;
|
||||
|
||||
GKI_enable();
|
||||
}
|
||||
|
||||
if (usb.at_0x38 >= 5)
|
||||
if (usb.bulk_outstanding >= 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.at_0x38;
|
||||
++usb.bulk_outstanding;
|
||||
|
||||
GKI_enable();
|
||||
}
|
||||
@@ -504,7 +504,7 @@ void UUSB_Register(tUUSB *uusb)
|
||||
usb.bulkEndpoint1 = 0;
|
||||
usb.bulkEndpoint2 = 0;
|
||||
usb.intrEndpoint1 = 0;
|
||||
usb.at_0x13 = 0;
|
||||
usb.intrEndpoint2 = 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.at_0x13 = 0;
|
||||
usb.intrEndpoint2 = 0;
|
||||
|
||||
GKI_init_q(&usb.bulk_buffer_q);
|
||||
usb.at_0x38 = 0;
|
||||
usb.bulk_outstanding = 0;
|
||||
|
||||
GKI_init_q(&usb.intr_buffer_q);
|
||||
usb.at_0x48 = 0;
|
||||
usb.intr_outstanding = 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.at_0x48 < 5 && usb.intr_buffer_q.count == 0)
|
||||
if (usb.intr_outstanding < 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.at_0x48;
|
||||
++usb.intr_outstanding;
|
||||
|
||||
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.at_0x38 < 5 && usb.bulk_buffer_q.count == 0)
|
||||
if (usb.bulk_outstanding < 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.at_0x38;
|
||||
++usb.bulk_outstanding;
|
||||
|
||||
GKI_enable();
|
||||
}
|
||||
|
||||
@@ -353,38 +353,41 @@ static void reset_kpad(KPADInside* kpad) {
|
||||
}
|
||||
|
||||
void KPADGetProjectionPos(Vec2* dest, Vec2* src, const Rect* rect, f32 scale) {
|
||||
f64 scaled;
|
||||
f32 height = rect->bottom - rect->top;
|
||||
f32 halfHeight = height * 0.5f;
|
||||
f32 x = src->x * halfHeight;
|
||||
f32 y = src->y * halfHeight;
|
||||
x *= 1.2f;
|
||||
y *= 1.2f;
|
||||
scaled = 0.908 * scale;
|
||||
dest->y = y;
|
||||
dest->x = (f32)(x * scaled);
|
||||
f32 aspect;
|
||||
f32 halfHeight;
|
||||
f32 half;
|
||||
f32 x;
|
||||
f32 height;
|
||||
height = rect->bottom - rect->top;
|
||||
half = 0.5f;
|
||||
halfHeight = height * half;
|
||||
x = src->x * halfHeight;
|
||||
aspect = 1.2f;
|
||||
x = aspect * x;
|
||||
dest->y = aspect * (src->y * halfHeight);
|
||||
dest->x = (f32)(x * (0.908 * scale));
|
||||
}
|
||||
|
||||
void KPADSetSensorHeight(s32 chan, f32 sensorHeight) {
|
||||
KPADInside* kpad;
|
||||
f32 halfHeightSquared;
|
||||
f32 halfHeight;
|
||||
f32 barOffsetX;
|
||||
f32 barDiagonal;
|
||||
f32 halfWidthSquared;
|
||||
f32 halfWidth;
|
||||
f32 negativeSensorHeight;
|
||||
f32 barDiagonalSquared;
|
||||
f32 halfHeightSquared;
|
||||
f32 zero;
|
||||
halfWidth = 1.0f;
|
||||
kpad = &inside_kpads[chan];
|
||||
kpad = chan + inside_kpads;
|
||||
halfHeight = 0.75f;
|
||||
negativeSensorHeight = -sensorHeight;
|
||||
halfWidthSquared = halfWidth * halfWidth;
|
||||
halfHeightSquared = halfHeight * halfHeight;
|
||||
kpad->sensorBarCenter.x = 0.0f;
|
||||
zero = 0.0f;
|
||||
kpad->sensorBarCenter.x = zero;
|
||||
kpad->sensorBarCenter.y = negativeSensorHeight;
|
||||
barDiagonalSquared = halfWidthSquared + halfHeightSquared;
|
||||
barDiagonal = (f32)sqrt(barDiagonalSquared);
|
||||
barDiagonal = (f32)sqrt(halfWidthSquared + halfHeightSquared);
|
||||
barOffsetX = kpad->sensorBarCenter.x;
|
||||
if (barOffsetX < 0.0f) {
|
||||
halfWidth += barOffsetX;
|
||||
@@ -465,29 +468,24 @@ static void calc_button_repeat(KPADInside* kpad, u8 extension, s32 elapsed) {
|
||||
}
|
||||
|
||||
static void calc_acc_horizon(KPADInside* kpad) {
|
||||
f32 magnitude = (f32)sqrt(kpad->acceleration.x * kpad->acceleration.x + kpad->acceleration.y * kpad->acceleration.y);
|
||||
f32 magnitude;
|
||||
f32 normalizedX;
|
||||
f32 normalizedY;
|
||||
f32 targetY;
|
||||
f32 targetX;
|
||||
f32 productX;
|
||||
f32 oldX;
|
||||
f32 oldY;
|
||||
f32 blend;
|
||||
f32 projectedX;
|
||||
f32 smoothing;
|
||||
f32 deltaX;
|
||||
f32 nextX;
|
||||
f32 nextY;
|
||||
f32 normalized;
|
||||
f32 unitX;
|
||||
f32 oldCircleX;
|
||||
f32 oldCircleY;
|
||||
f32 unitY;
|
||||
f32 circleX;
|
||||
f32 oldCircleX;
|
||||
f32 unitY;
|
||||
f32 unitX;
|
||||
f32 deltaCircleX;
|
||||
f32 circleY;
|
||||
f32 deltaCircleY;
|
||||
magnitude = (f32)sqrt(kpad->acceleration.x * kpad->acceleration.x + kpad->acceleration.y * kpad->acceleration.y);
|
||||
if (magnitude == 0.0f || magnitude >= 2.0f) {
|
||||
return;
|
||||
}
|
||||
@@ -497,17 +495,12 @@ static void calc_acc_horizon(KPADInside* kpad) {
|
||||
if (magnitude > 1.0f) {
|
||||
magnitude = 2.0f - magnitude;
|
||||
}
|
||||
targetY = kpad->accelNormal.y;
|
||||
targetX = kpad->accelNormal.x;
|
||||
productX = targetX * normalizedX;
|
||||
oldX = kpad->horizonAxis.x;
|
||||
oldY = kpad->horizonAxis.y;
|
||||
blend = magnitude * kp_acc_horizon_pw;
|
||||
projectedX = productX + targetY * normalizedY;
|
||||
smoothing = magnitude * blend;
|
||||
deltaX = smoothing * (projectedX - oldX);
|
||||
nextX = oldX + deltaX;
|
||||
nextY = oldY + smoothing * (((targetY * normalizedX) - (targetX * normalizedY)) - oldY);
|
||||
projectedX = kpad->accelNormal.x * normalizedX + kpad->accelNormal.y * normalizedY;
|
||||
magnitude *= blend;
|
||||
deltaX = magnitude * (projectedX - kpad->horizonAxis.x);
|
||||
nextX = kpad->horizonAxis.x + deltaX;
|
||||
nextY = kpad->horizonAxis.y + magnitude * (((kpad->accelNormal.y * normalizedX) - (kpad->accelNormal.x * normalizedY)) - kpad->horizonAxis.y);
|
||||
normalized = (f32)sqrt(nextX * nextX + nextY * nextY);
|
||||
if (normalized != 0.0f) {
|
||||
unitX = nextX / normalized;
|
||||
@@ -788,24 +781,18 @@ nextObject:
|
||||
|
||||
static s8 select_1obj_first(KPADInside* kpad) {
|
||||
KPADDPDObject* object = kpad->dpdState.objects;
|
||||
KPADDPDObject* end = kpad->dpdState.candidates;
|
||||
f32 scale = kpad->dpdObjectScale;
|
||||
f32 productX = kpad->horizonTangent.x * kpad->horizonAxis.x;
|
||||
f32 productY = kpad->horizonTangent.y * kpad->horizonAxis.x;
|
||||
f32 offsetX = productX + kpad->horizonTangent.y * kpad->horizonAxis.y;
|
||||
f32 offsetY = productY - kpad->horizonTangent.x * kpad->horizonAxis.y;
|
||||
offsetX *= scale;
|
||||
offsetY *= scale;
|
||||
f32 offsetX = kpad->horizonTangent.x * kpad->horizonAxis.x + kpad->horizonTangent.y * kpad->horizonAxis.y;
|
||||
f32 offsetY = kpad->horizonTangent.y * kpad->horizonAxis.x - kpad->horizonTangent.x * kpad->horizonAxis.y;
|
||||
offsetX *= kpad->dpdObjectScale;
|
||||
offsetY *= kpad->dpdObjectScale;
|
||||
do {
|
||||
if ((s8)object->metadata.bytes.flags == 0) {
|
||||
f32 x = object->x;
|
||||
f32 y = object->y;
|
||||
Vec2 leftPosition;
|
||||
Vec2 rightPosition;
|
||||
leftPosition.x = x - offsetX;
|
||||
leftPosition.y = y - offsetY;
|
||||
rightPosition.x = x + offsetX;
|
||||
rightPosition.y = y + offsetY;
|
||||
leftPosition.x = object->x - offsetX;
|
||||
leftPosition.y = object->y - offsetY;
|
||||
rightPosition.x = object->x + offsetX;
|
||||
rightPosition.y = object->y + offsetY;
|
||||
if (leftPosition.x <= kpad->value4F4 || leftPosition.x >= kpad->value4FC || leftPosition.y <= kpad->value4F8 || leftPosition.y >= kpad->value500) {
|
||||
if (rightPosition.x > kpad->value4F4 && rightPosition.x < kpad->value4FC && rightPosition.y > kpad->value4F8 && rightPosition.y < kpad->value500) {
|
||||
kpad->dpdState.candidates[1] = *object;
|
||||
@@ -822,7 +809,7 @@ static s8 select_1obj_first(KPADInside* kpad) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
} while (++object < end);
|
||||
} while (++object < kpad->dpdState.candidates);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,13 +41,13 @@ typedef struct USBCommandBlock {
|
||||
USBCallback callback; // 0x00
|
||||
USBIsoCallback isoCallback; // 0x04
|
||||
void* callbackArg; // 0x08
|
||||
void* unkIsoArg; // 0x0C
|
||||
void* isoArg; // 0x0C
|
||||
|
||||
char unk_0x10[0x4];
|
||||
char pad_0x10[0x4];
|
||||
|
||||
void* clean[USB_NCLEAN_MAX]; // 0x14
|
||||
u32 nclean; // 0x34
|
||||
char unk_0x38[0x40 - 0x38];
|
||||
char pad_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->unkIsoArg, block->callbackArg);
|
||||
block->isoCallback(result, block->isoArg, block->callbackArg);
|
||||
}
|
||||
|
||||
IOSFree(block);
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
static struct {
|
||||
struct {
|
||||
OSMessageQueue* queue; // 0x00
|
||||
void* unk_0x04;
|
||||
void* messages; // 0x04 (OSMessage* array for OSInitMessageQueue)
|
||||
} entries[MAX_PUH_SEM]; // 0x00
|
||||
void* unk_0x14;
|
||||
void* pad_0x14; // unused
|
||||
} st_uhs_ker_msg_mng;
|
||||
|
||||
s32 uhf_ker_send_message(int index, void* message) {
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
static struct {
|
||||
struct {
|
||||
OSSemaphore* sem; // 0x00
|
||||
u32 unk_0x04;
|
||||
u32 unk_0x08;
|
||||
u32 initCount;
|
||||
u32 flags;
|
||||
} entries[MAX_PUH_SEM]; // 0x00
|
||||
u32 unk_0x90;
|
||||
OSSemaphore* unk_0x94;
|
||||
u8 unk_0x98[0x0C];
|
||||
u32 usedCount;
|
||||
OSSemaphore* lockSem;
|
||||
u8 pad[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.unk_0x94 == 0) {
|
||||
if (st_uhs_ker_sem_status != 1 || st_uhs_ker_sem_mng.lockSem == 0) {
|
||||
return -1;
|
||||
} else {
|
||||
OSWaitSemaphore(st_uhs_ker_sem_mng.unk_0x94);
|
||||
OSWaitSemaphore(st_uhs_ker_sem_mng.lockSem);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void uhf_ker_sem_inline_1() {
|
||||
if (st_uhs_ker_sem_status == 1 && st_uhs_ker_sem_mng.unk_0x94 != 0) {
|
||||
OSSignalSemaphore(st_uhs_ker_sem_mng.unk_0x94);
|
||||
if (st_uhs_ker_sem_status == 1 && st_uhs_ker_sem_mng.lockSem != 0) {
|
||||
OSSignalSemaphore(st_uhs_ker_sem_mng.lockSem);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ s32 uhf_ker_create_sem(u32 initCount, int flags) {
|
||||
return -5;
|
||||
}
|
||||
|
||||
if (st_uhs_ker_sem_mng.unk_0x90 == 12) {
|
||||
if (st_uhs_ker_sem_mng.usedCount == 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].unk_0x04 = initCount;
|
||||
st_uhs_ker_sem_mng.entries[i].unk_0x08 = flags;
|
||||
st_uhs_ker_sem_mng.unk_0x90++;
|
||||
st_uhs_ker_sem_mng.entries[i].initCount = initCount;
|
||||
st_uhs_ker_sem_mng.entries[i].flags = flags;
|
||||
st_uhs_ker_sem_mng.usedCount++;
|
||||
|
||||
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].unk_0x04 = 0;
|
||||
st_uhs_ker_sem_mng.entries[sem - 1].unk_0x08 = 0;
|
||||
st_uhs_ker_sem_mng.unk_0x90--;
|
||||
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--;
|
||||
|
||||
uhf_ker_sem_inline_1();
|
||||
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
static struct {
|
||||
struct {
|
||||
OSThread* unk_0x00;
|
||||
u8 unk_0x04[0x33C];
|
||||
OSThread* thread; // 0x00
|
||||
u8 stack[0x33C]; // 0x04
|
||||
} entries[MAX_PUH_TSK]; // 0x00
|
||||
u32 unk_0x680;
|
||||
u32 unk_0x684;
|
||||
u32 unk_0x688;
|
||||
u32 unk_0x68C;
|
||||
u32 pad_0x680;
|
||||
u32 pad_0x684;
|
||||
u32 pad_0x688;
|
||||
u32 pad_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].unk_0x00 == NULL) {
|
||||
if (st_uhs_ker_tsk_mng.entries[tsk - 1].thread == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return OSSetThreadPriority(st_uhs_ker_tsk_mng.entries[tsk - 1].unk_0x00, priority) ? 0 : -20;
|
||||
return OSSetThreadPriority(st_uhs_ker_tsk_mng.entries[tsk - 1].thread, priority) ? 0 : -20;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ typedef struct _usbKbdAsyncMem {
|
||||
u32 state; // 0x00
|
||||
void* kbd; // 0x04
|
||||
char modifiers; // 0x08
|
||||
u8 unk_0x09;
|
||||
u8 reserved; // 0x09
|
||||
u8 keys[6]; // 0x0A
|
||||
} usbKbdAsyncMem;
|
||||
|
||||
|
||||
@@ -580,7 +580,7 @@ void VIInit(void)
|
||||
u16 displayConfig;
|
||||
u32 __VIDVDStopFlag_Enable_old;
|
||||
s32 format;
|
||||
u32 value;
|
||||
u16 value;
|
||||
u32 tv;
|
||||
u32 bootromTv;
|
||||
|
||||
|
||||
@@ -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->unk_0x910) {
|
||||
if (!p->suppressDisconnect) {
|
||||
p->lastReportSendTime = __OSGetSystemTime();
|
||||
WPADiDisconnect(chan, FALSE);
|
||||
} else {
|
||||
@@ -1263,7 +1263,7 @@ static void __ClearControlBlock(s32 chan) {
|
||||
|
||||
p->lastControllerDataUpdate = __OSGetSystemTime();
|
||||
p->lastReportSendTime = __OSGetSystemTime();
|
||||
p->unk_0x910 = 0;
|
||||
p->suppressDisconnect = 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->unk_0x38[0] = -1;
|
||||
p->unk_0x38[1] = -1;
|
||||
p->gameInfoStatus[0] = -1;
|
||||
p->gameInfoStatus[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->unk_0x910 = 1;
|
||||
p->suppressDisconnect = 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->unk_0x910 = 0;
|
||||
p->suppressDisconnect = 0;
|
||||
|
||||
OSRestoreInterrupts(enabled);
|
||||
}
|
||||
|
||||
@@ -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.unk_0x04 = (s8)p_buf[index + 8];
|
||||
p_wpd->extConfig.u.fs.unk_0x02 = (s8)p_buf[index + 9];
|
||||
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.stickXCenter = (s8)p_buf[index + 10];
|
||||
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.stickYMax = (s8)p_buf[index + 11];
|
||||
p_wpd->extConfig.u.fs.stickYMin = (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.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);
|
||||
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);
|
||||
}
|
||||
break;
|
||||
|
||||
case WPAD_DEV_CLASSIC:
|
||||
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.lStickXMax = (s8)p_buf[index + 0];
|
||||
p_wpd->extConfig.u.cl.lStickXMin = (s8)p_buf[index + 1];
|
||||
p_wpd->extConfig.u.cl.lStickXCenter = (s8)p_buf[index + 2];
|
||||
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.lStickYMax = (s8)p_buf[index + 3];
|
||||
p_wpd->extConfig.u.cl.lStickYMin = (s8)p_buf[index + 4];
|
||||
p_wpd->extConfig.u.cl.lStickYCenter = (s8)p_buf[index + 5];
|
||||
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.rStickXMax = (s8)p_buf[index + 6];
|
||||
p_wpd->extConfig.u.cl.rStickXMin = (s8)p_buf[index + 7];
|
||||
p_wpd->extConfig.u.cl.rStickXCenter = (s8)p_buf[index + 8];
|
||||
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.rStickYMax = (s8)p_buf[index + 9];
|
||||
p_wpd->extConfig.u.cl.rStickYMin = (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.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("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("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->unk_0x38[index] = WPAD_ERR_NONE;
|
||||
p_wpd->gameInfoStatus[index] = WPAD_ERR_NONE;
|
||||
} else {
|
||||
p_wpd->unk_0x38[index] = WPAD_ERR_INVALID;
|
||||
p_wpd->gameInfoStatus[index] = WPAD_ERR_INVALID;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,9 +17,9 @@ typedef struct NWC24FLHeader {
|
||||
u32 version; // 0x04
|
||||
u32 infoCount; // 0x08
|
||||
u32 registeredCount; // 0x0C
|
||||
u32 unk_0x10[4];
|
||||
u32 unk_0x20[7];
|
||||
u32 unk_0x3C;
|
||||
u32 confirmedBits[4]; // 0x10
|
||||
u32 pad_0x20[7]; // unused
|
||||
u32 listFlags; // 0x3C
|
||||
NWC24UserId friendIds[NWC24_FRIEND_INFO_MAX]; // 0x40
|
||||
} NWC24FLHeader;
|
||||
|
||||
|
||||
@@ -73,15 +73,15 @@ typedef struct NWC24MsgObjPrivate {
|
||||
};
|
||||
u32 raw;
|
||||
} msgBoardFlags; // 0xCC
|
||||
NWC24Data unk_0xD0;
|
||||
NWC24Data extraData; // 0xD0
|
||||
NWC24Data faceData; // 0xD8
|
||||
NWC24Data altName; // 0xE0
|
||||
u32 textSize; // 0xE4
|
||||
u32 dwcId; // 0xEC
|
||||
u32 iconNew; // 0xF0
|
||||
u32 unk_0xF4;
|
||||
u32 unk_0xF8;
|
||||
u32 unk_0xFC;
|
||||
u32 pad_0xF4;
|
||||
u32 pad_0xF8;
|
||||
u32 pad_0xFC;
|
||||
} NWC24MsgObjPrivate;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -26,9 +26,9 @@ extern struct NWC24Work {
|
||||
|
||||
u8 configData[1024]; // 0x1300
|
||||
|
||||
u8 unk_0x1700[128]; // 0x1700
|
||||
u8 unk_0x1780[128]; // 0x1780
|
||||
u8 unk_0x1800[256]; // 0x1800
|
||||
u8 sendMbcHeader[128]; // 0x1700
|
||||
u8 recvMbcHeader[128]; // 0x1780
|
||||
u8 mbcEntry[256]; // 0x1800
|
||||
u8 base64Work[256]; // 0x1900
|
||||
u8 unk_0x1A00[4096]; // 0x1A00
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ typedef struct _CDBRecordKey {
|
||||
} CDBRecordKey;
|
||||
|
||||
typedef struct _CDBRecord {
|
||||
u32 unk_0x00;
|
||||
u32 database; // 0x00
|
||||
void* cryptBuf; // 0x04
|
||||
CDBRecordKey key; // 0x08
|
||||
void* file; // 0x38
|
||||
|
||||
@@ -58,7 +58,7 @@ void CDBRecordInstanceInit(CDBRecordFile* recordFile, CDBRecord* record, int typ
|
||||
recordFile->used = 1;
|
||||
OSUnlockMutex((OSMutex*)recordFile);
|
||||
recordFile->allocFlag = type;
|
||||
recordFile->database = record->unk_0x00;
|
||||
recordFile->database = record->database;
|
||||
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->unk_0x00 = (u32)database;
|
||||
record->database = (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->unk_0x00 = (u32)database;
|
||||
record->database = (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->unk_0x00;
|
||||
database = (CDBDatabase*)record->database;
|
||||
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->unk_0x00;
|
||||
database = (CDBDatabase*)record->database;
|
||||
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->unk_0x00)->instance)->openFlags & 2) == 0) {
|
||||
if ((((CDBRecordDatabaseState*)((CDBDatabase*)record->database)->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.unk_0x00 = record->unk_0x00;
|
||||
localRecord.database = record->database;
|
||||
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->unk_0x00 = localRecord.unk_0x00;
|
||||
record->database = localRecord.database;
|
||||
record->file = localRecord.file;
|
||||
record->cryptBuf = localRecord.cryptBuf;
|
||||
CDBRecordKeyCopy(&recordFile->key, &localRecord.key);
|
||||
|
||||
@@ -548,7 +548,7 @@ NWC24Err NWC24DumpDlTask(NWC24DlTask* dlTask) {
|
||||
|
||||
NWC24Err NWC24IterateDlTask(NWC24DlId* dlIterateId, BOOL begin) {
|
||||
DlTaskListHeader* entriesHeader;
|
||||
NWC24Work* work;
|
||||
const NWC24Work* work;
|
||||
u16 taskId;
|
||||
u16 maxTaskCount;
|
||||
DlTaskListHeader* header;
|
||||
|
||||
@@ -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 GetUnkFlag(u32 index) {
|
||||
static u32 GetConfirmedBit(u32 index) {
|
||||
NWC24Err result;
|
||||
NWC24FLHeader* header;
|
||||
u32 data;
|
||||
@@ -37,11 +37,11 @@ static u32 GetUnkFlag(u32 index) {
|
||||
return result;
|
||||
}
|
||||
|
||||
data = header->unk_0x10[index >> 5] >> (index & 0x1f) & 1;
|
||||
data = header->confirmedBits[index >> 5] >> (index & 0x1f) & 1;
|
||||
return (NWC24Err)data;
|
||||
}
|
||||
|
||||
static NWC24Err SetUnkFlag(u32 index, int flag) {
|
||||
static NWC24Err SetConfirmedBit(u32 index, int flag) {
|
||||
NWC24Err result;
|
||||
NWC24FLHeader* header;
|
||||
|
||||
@@ -50,11 +50,11 @@ static NWC24Err SetUnkFlag(u32 index, int flag) {
|
||||
return result;
|
||||
}
|
||||
|
||||
header->unk_0x10[index >> 5] = ~(1 << (index & 0x1f)) & header->unk_0x10[index >> 5] | flag << (index & 0x1f);
|
||||
header->confirmedBits[index >> 5] = ~(1 << (index & 0x1f)) & header->confirmedBits[index >> 5] | flag << (index & 0x1f);
|
||||
return NWC24_OK;
|
||||
}
|
||||
|
||||
static NWC24Err SetUnkFlag2(int flag) {
|
||||
static NWC24Err SetListFlag(int flag) {
|
||||
NWC24Err result;
|
||||
NWC24FLHeader* header;
|
||||
|
||||
@@ -63,7 +63,7 @@ static NWC24Err SetUnkFlag2(int flag) {
|
||||
return result;
|
||||
}
|
||||
|
||||
header->unk_0x3C |= flag;
|
||||
header->listFlags |= 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 = GetUnkFlag(index);
|
||||
result = GetConfirmedBit(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;
|
||||
}
|
||||
|
||||
SetUnkFlag2(1);
|
||||
SetListFlag(1);
|
||||
|
||||
result = SetUnkFlag(index, 0);
|
||||
result = SetConfirmedBit(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 = SetUnkFlag(index, 0);
|
||||
result = SetConfirmedBit(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 friendUnkFlag1;
|
||||
int friendUnkFlag2;
|
||||
int confirmedBit1;
|
||||
int confirmedBit2;
|
||||
|
||||
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
|
||||
friendUnkFlag1 = GetUnkFlag(index1);
|
||||
friendUnkFlag2 = GetUnkFlag(index2);
|
||||
SetUnkFlag(index1, friendUnkFlag2);
|
||||
SetUnkFlag(index2, friendUnkFlag1);
|
||||
confirmedBit1 = GetConfirmedBit(index1);
|
||||
confirmedBit2 = GetConfirmedBit(index2);
|
||||
SetConfirmedBit(index1, confirmedBit2);
|
||||
SetConfirmedBit(index2, confirmedBit1);
|
||||
|
||||
// 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->unk_0x10[0] = 0;
|
||||
header->unk_0x10[1] = 0;
|
||||
header->unk_0x10[2] = 0;
|
||||
header->unk_0x10[3] = 0;
|
||||
header->confirmedBits[0] = 0;
|
||||
header->confirmedBits[1] = 0;
|
||||
header->confirmedBits[2] = 0;
|
||||
header->confirmedBits[3] = 0;
|
||||
|
||||
result = NWC24FOpen(&file, FLFilePath, NWC24_OPEN_WRITE);
|
||||
if (result != NWC24_OK) {
|
||||
|
||||
@@ -170,7 +170,7 @@ NWC24Err NWC24GetMsgObj(NWC24MsgObj* msg, NWC24MBoxType type, u32 id) {
|
||||
u32 count = 0;
|
||||
if (!NWC24IsMsgLibOpened() && !NWC24IsMsgLibOpenedByTool())
|
||||
return NWC24_ERR_LIB_NOT_OPENED;
|
||||
entry = (MBCEntry*)NWC24WorkP->unk_0x1800;
|
||||
entry = (MBCEntry*)NWC24WorkP->mbcEntry;
|
||||
memset(entry, 0, sizeof(*entry));
|
||||
if (id == 0)
|
||||
return NWC24_ERR_HIDDEN;
|
||||
@@ -251,7 +251,7 @@ NWC24Err NWC24GetMsgIdList(NWC24MBoxType type, u32* ids, u32 maxLength) {
|
||||
MBCEntry* entry;
|
||||
if (!NWC24IsMsgLibOpened() && !NWC24IsMsgLibOpenedByTool())
|
||||
return NWC24_ERR_LIB_NOT_OPENED;
|
||||
entry = (MBCEntry*)NWC24WorkP->unk_0x1800;
|
||||
entry = (MBCEntry*)NWC24WorkP->mbcEntry;
|
||||
err = GetCachedMBCHeader(type, &header);
|
||||
if (err != NWC24_OK)
|
||||
return err;
|
||||
@@ -307,11 +307,11 @@ NWC24Err NWC24iOpenMBox(void) {
|
||||
NWC24File recvFile, sendFile;
|
||||
char* path = NWC24WorkP->pathWork;
|
||||
NWC24Err err;
|
||||
Mail_memset(NWC24WorkP->unk_0x1700, 0, 128);
|
||||
Mail_memset(NWC24WorkP->sendMbcHeader, 0, 128);
|
||||
err = GetCachedMBCHeader(NWC24_MBOX_TYPE_SEND, &header);
|
||||
if (err != NWC24_OK)
|
||||
return err;
|
||||
Mail_memset(NWC24WorkP->unk_0x1780, 0, 128);
|
||||
Mail_memset(NWC24WorkP->recvMbcHeader, 0, 128);
|
||||
err = GetCachedMBCHeader(NWC24_MBOX_TYPE_RECV, &header);
|
||||
if (err != NWC24_OK)
|
||||
return err;
|
||||
@@ -340,11 +340,11 @@ NWC24Err NWC24iInitMBox(void) {
|
||||
NWC24File recvFile, sendFile;
|
||||
NWC24Err recvResult, sendResult, err, sendStatus;
|
||||
char* path = NWC24WorkP->pathWork;
|
||||
Mail_memset(NWC24WorkP->unk_0x1700, 0, 128);
|
||||
Mail_memset(NWC24WorkP->sendMbcHeader, 0, 128);
|
||||
sendResult = CreateCtrlFile(NWC24_MBOX_TYPE_SEND, FALSE);
|
||||
if (sendResult < 0)
|
||||
return sendResult;
|
||||
Mail_memset(NWC24WorkP->unk_0x1780, 0, 128);
|
||||
Mail_memset(NWC24WorkP->recvMbcHeader, 0, 128);
|
||||
recvResult = CreateCtrlFile(NWC24_MBOX_TYPE_RECV, FALSE);
|
||||
if (recvResult < 0)
|
||||
return recvResult;
|
||||
@@ -616,11 +616,11 @@ static NWC24Err CreateCtrlFile(NWC24MBoxType type, BOOL force) {
|
||||
err = MakeCtrlPath(path, type);
|
||||
if (err != NWC24_OK)
|
||||
return err;
|
||||
entry = (MBCEntry*)NWC24WorkP->unk_0x1800;
|
||||
entry = (MBCEntry*)NWC24WorkP->mbcEntry;
|
||||
if (type == NWC24_MBOX_TYPE_SEND)
|
||||
header = (MBCHeader*)NWC24WorkP->unk_0x1700;
|
||||
header = (MBCHeader*)NWC24WorkP->sendMbcHeader;
|
||||
else if (type == NWC24_MBOX_TYPE_RECV)
|
||||
header = (MBCHeader*)NWC24WorkP->unk_0x1780;
|
||||
header = (MBCHeader*)NWC24WorkP->recvMbcHeader;
|
||||
else
|
||||
return NWC24_ERR_INVALID_VALUE;
|
||||
result = err;
|
||||
@@ -676,7 +676,7 @@ static NWC24Err DeleteMsg(NWC24MBoxType type, u32 id, BOOL protect) {
|
||||
NWC24Err err, deleteResult, closeResult;
|
||||
if (!NWC24IsMsgLibOpened() && !NWC24IsMsgLibOpenedByTool())
|
||||
return NWC24_ERR_LIB_NOT_OPENED;
|
||||
entry = (MBCEntry*)NWC24WorkP->unk_0x1800;
|
||||
entry = (MBCEntry*)NWC24WorkP->mbcEntry;
|
||||
err = GetCachedMBCHeader(type, &header);
|
||||
if (err != NWC24_OK)
|
||||
return err;
|
||||
@@ -754,7 +754,7 @@ static NWC24Err DuplicationCheck(MBCHeader* header, const NWC24MsgObjPrivate* ms
|
||||
NWC24Err clearResult, deleteResult;
|
||||
if (type == NWC24_MBOX_TYPE_SEND)
|
||||
return NWC24_OK;
|
||||
entry = (MBCEntry*)NWC24WorkP->unk_0x1800;
|
||||
entry = (MBCEntry*)NWC24WorkP->mbcEntry;
|
||||
for (offset = 128; offset < header->fileSize; offset += 128) {
|
||||
if (count >= header->numMessages)
|
||||
break;
|
||||
@@ -809,9 +809,9 @@ static NWC24Err GetCachedMBCHeader(NWC24MBoxType type, MBCHeader** header) {
|
||||
char* path;
|
||||
NWC24Err err = NWC24_OK, closeResult;
|
||||
if (type == NWC24_MBOX_TYPE_SEND)
|
||||
*header = (MBCHeader*)NWC24WorkP->unk_0x1700;
|
||||
*header = (MBCHeader*)NWC24WorkP->sendMbcHeader;
|
||||
else if (type == NWC24_MBOX_TYPE_RECV)
|
||||
*header = (MBCHeader*)NWC24WorkP->unk_0x1780;
|
||||
*header = (MBCHeader*)NWC24WorkP->recvMbcHeader;
|
||||
else {
|
||||
*header = NULL;
|
||||
return NWC24_ERR_INVALID_VALUE;
|
||||
@@ -874,7 +874,7 @@ static NWC24Err InitMBCHeader(MBCHeader* header, NWC24MBoxType type) {
|
||||
|
||||
static NWC24Err AddMBCEntry(MBCHeader* header, const NWC24MsgObjPrivate* msg, NWC24File* file) {
|
||||
u32 offset = header->freeOffset;
|
||||
MBCEntry* entry = (MBCEntry*)NWC24WorkP->unk_0x1800;
|
||||
MBCEntry* entry = (MBCEntry*)NWC24WorkP->mbcEntry;
|
||||
u32 next;
|
||||
NWC24Err err;
|
||||
if (offset == 0)
|
||||
@@ -906,7 +906,7 @@ static NWC24Err AddMBCEntry(MBCHeader* header, const NWC24MsgObjPrivate* msg, NW
|
||||
}
|
||||
|
||||
static NWC24Err ClearMBCEntry(MBCHeader* header, NWC24File* file, u32 offset) {
|
||||
MBCEntry* entry = (MBCEntry*)NWC24WorkP->unk_0x1800;
|
||||
MBCEntry* entry = (MBCEntry*)NWC24WorkP->mbcEntry;
|
||||
NWC24Err err = NWC24FSeek(file, offset, NWC24_SEEK_BEG);
|
||||
if (err != NWC24_OK)
|
||||
return err;
|
||||
|
||||
@@ -243,11 +243,11 @@ static inline NWC24Err WriteMBDelayField(NWC24MsgObjPrivate* msg) {
|
||||
|
||||
static inline NWC24Err WriteExtraFields(NWC24MsgObjPrivate* msg) {
|
||||
NWC24Err err;
|
||||
if (msg->unk_0xD0.size == 0)
|
||||
if (msg->extraData.size == 0)
|
||||
return NWC24_OK;
|
||||
err = NWC24FWrite(msg->unk_0xD0.ptr, msg->unk_0xD0.size, m_pFile);
|
||||
err = NWC24FWrite(msg->extraData.ptr, msg->extraData.size, m_pFile);
|
||||
if (err == NWC24_OK)
|
||||
msg->length += msg->unk_0xD0.size;
|
||||
msg->length += msg->extraData.size;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ NWC24Err NWC24InitMsgObj(NWC24MsgObj* msg, NWC24MsgType type) {
|
||||
NWC24Data_Init(&msgObj->toData);
|
||||
NWC24Data_Init(&msgObj->unk_0x50);
|
||||
NWC24Data_Init(&msgObj->unk_0x58);
|
||||
NWC24Data_Init(&msgObj->unk_0xD0);
|
||||
NWC24Data_Init(&msgObj->extraData);
|
||||
NWC24Data_Init(&msgObj->faceData);
|
||||
NWC24Data_Init(&msgObj->altName);
|
||||
|
||||
|
||||
@@ -64,13 +64,13 @@ void SimpleWavePlayer::wavePacketCallback(WavePacketCallbackStatus status, WaveP
|
||||
return;
|
||||
}
|
||||
|
||||
if (self->unk_0xB5) {
|
||||
if (self->mbFillInCallback) {
|
||||
MakeWave(player, packet, self);
|
||||
}
|
||||
}
|
||||
|
||||
SimpleWavePlayer::SimpleWavePlayer() : mSetupParam(1, nw4r::snd::SAMPLE_FORMAT_PCM_S16, 32000, 1.0f, 1) {
|
||||
unk_0xB5 = true;
|
||||
mbFillInCallback = true;
|
||||
unk_0xB0 = false;
|
||||
mIsSetData = false;
|
||||
mIsPlaying = false;
|
||||
@@ -196,7 +196,7 @@ void SimpleWavePlayer::stop() {
|
||||
|
||||
void SimpleWavePlayer::update() {
|
||||
if (mIsPlaying) {
|
||||
if (!unk_0xB5) {
|
||||
if (!mbFillInCallback) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (mWavePackets[i].GetAppendFlag()) {
|
||||
continue;
|
||||
|
||||
@@ -53,7 +53,7 @@ void AudioFrameCallback() {
|
||||
|
||||
for (i = 0; i < AX_VOICE_MAX; i++) {
|
||||
VoiceInfo* currVoice = &Voices[i];
|
||||
if (currVoice->getAXVPB() == NULL && currVoice->getUnk_0x0C() != 2) {
|
||||
if (currVoice->getAXVPB() == NULL && currVoice->getUpdateFlag() != 2) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ void AudioFrameCallback() {
|
||||
currVoice->setState(0);
|
||||
currVoice->setUnk_0x08(0);
|
||||
}
|
||||
currVoice->setUnk_0x0C(0);
|
||||
currVoice->setUpdateFlag(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].setUnk_0x0C(1);
|
||||
Voices[axVoiceBuf[i]->index].setUpdateFlag(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]->setUnk_0x0C(1);
|
||||
mpVoices[i]->setUpdateFlag(1);
|
||||
a = true;
|
||||
}
|
||||
return a;
|
||||
@@ -416,7 +416,7 @@ void AxAdpcmSimplePlayer::stop(AxAdpcmHandle* handle) {
|
||||
}
|
||||
|
||||
handle->getVoice(i)->setState(7);
|
||||
handle->getVoice(i)->setUnk_0x0C(1);
|
||||
handle->getVoice(i)->setUpdateFlag(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].getUnk_0x0C() == 1) {
|
||||
Voices[i].setUnk_0x0C(2);
|
||||
if (Voices[i].getUpdateFlag() == 1) {
|
||||
Voices[i].setUpdateFlag(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace ipl {
|
||||
namespace cs {
|
||||
namespace savedata {
|
||||
struct data {
|
||||
char unk_0x00[MAX_PATH_LENGTH + sizeof(wchar_t)]; // 0x00
|
||||
char sMountPath[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->unk_0x00[0] == 0) {
|
||||
if (data->sMountPath[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->unk_0x00[0] == '\0') {
|
||||
if (data->sMountPath[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->unk_0x00, temp, MAX_PATH_LENGTH, arg0);
|
||||
util::utf16_to_ascii(data->sMountPath, temp, MAX_PATH_LENGTH, arg0);
|
||||
memset(temp, 0, sizeof(temp));
|
||||
util::utf16_to_ascii(data->sPath, temp, MAX_PATH_LENGTH, arg1);
|
||||
} else {
|
||||
|
||||
@@ -674,7 +674,8 @@ namespace ipl {
|
||||
|
||||
if (foundLangGroup) {
|
||||
nw4r::lyt::Group* group = layout->FindGroupByName(langGroup);
|
||||
for (nw4r::lyt::PaneLinkList::Iterator it = group->GetPaneList().GetBeginIter(); it != group->GetPaneList().GetEndIter(); it++) {
|
||||
nw4r::lyt::Group* const& groupView = group;
|
||||
for (nw4r::lyt::PaneLinkList::Iterator it = groupView->GetPaneList().GetBeginIter(); it != groupView->GetPaneList().GetEndIter(); it++) {
|
||||
it->mTarget->SetVisible(true);
|
||||
}
|
||||
} else {
|
||||
@@ -685,7 +686,8 @@ namespace ipl {
|
||||
}
|
||||
if (strcmp(scModuleData.langGroupLookup[region][i], langCodeBuf[scLangLookup[region][i]]) == 0) {
|
||||
nw4r::lyt::Group* group = layout->FindGroupByName(scModuleData.langGroupLookup[region][i]);
|
||||
for (nw4r::lyt::PaneLinkList::Iterator it = group->GetPaneList().GetBeginIter(); it != group->GetPaneList().GetEndIter(); it++) {
|
||||
nw4r::lyt::Group* const& groupView = group;
|
||||
for (nw4r::lyt::PaneLinkList::Iterator it = groupView->GetPaneList().GetBeginIter(); it != groupView->GetPaneList().GetEndIter(); it++) {
|
||||
it->mTarget->SetVisible(true);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#define IPL_CHANNEL_SELECT_CPP
|
||||
|
||||
#include <decomp/ide.h>
|
||||
#include "iplSceneUI.h"
|
||||
|
||||
@@ -43,8 +45,7 @@ namespace ipl {
|
||||
return r;
|
||||
}
|
||||
|
||||
template <>
|
||||
f32 HermiteIntp<f32>::get() const {
|
||||
inline 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))))) -
|
||||
@@ -329,8 +330,8 @@ namespace ipl {
|
||||
|
||||
setSceneParentFlags(SCN_PARENTFLAG_DRAW | SCN_PARENTFLAG_CALC);
|
||||
|
||||
unk_0xD8 = math::VEC3(0.0f, 0.0f, 0.0f);
|
||||
unk_0xE4 = math::VEC2(1.0f, 1.0f);
|
||||
mOrthoTrans = math::VEC3(0.0f, 0.0f, 0.0f);
|
||||
mOrthoScale = math::VEC2(1.0f, 1.0f);
|
||||
|
||||
nw4r::ut::Rect proj4x3;
|
||||
System::getProjectionRect4x3(&proj4x3);
|
||||
@@ -647,7 +648,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(unk_0xD8, unk_0xE4);
|
||||
utility::Graphics::setOrthoTransAndScale(mOrthoTrans, mOrthoScale);
|
||||
}
|
||||
utility::Graphics::setOrtho();
|
||||
|
||||
@@ -1844,7 +1845,7 @@ namespace ipl {
|
||||
initChanZoomParam(myVec, 1);
|
||||
setChanZoomOrtho();
|
||||
|
||||
if (System::getChannelManager()->isUnk_0x1B81()) {
|
||||
if (System::getChannelManager()->isDiskChannelReady()) {
|
||||
if (System::getBS2Manager()->getIPLState() == bs2::IPL_STATE_RVL_GAME ||
|
||||
System::getBS2Manager()->getIPLState() == bs2::IPL_STATE_DISK_UPDATE) {
|
||||
if (mspDiskID != NULL) {
|
||||
@@ -1856,7 +1857,7 @@ namespace ipl {
|
||||
|
||||
if (strncmp(diskID, mspDiskID, 4) == 0) {
|
||||
if (strncmp(diskMaker, mspDiskMaker, 2) == 0) {
|
||||
System::getChannelManager()->setUnk_0x1B81(false);
|
||||
System::getChannelManager()->setDiskChannelReady(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1909,10 +1910,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 = 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;
|
||||
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;
|
||||
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;
|
||||
@@ -1920,10 +1921,10 @@ namespace ipl {
|
||||
fbWidth = rMode->fbWidth;
|
||||
efbHeight = rMode->efbHeight;
|
||||
f32 projectionWidth = projRect.GetWidth();
|
||||
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);
|
||||
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);
|
||||
} else {
|
||||
fbWidth = rMode->fbWidth;
|
||||
efbHeight = rMode->efbHeight;
|
||||
@@ -2002,8 +2003,8 @@ namespace ipl {
|
||||
nw4r::ut::Rect projRect;
|
||||
System::getProjectionRect(&projRect);
|
||||
|
||||
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));
|
||||
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));
|
||||
}
|
||||
|
||||
int ChannelSelect::isInChannelPaneNames(const char* name) const {
|
||||
|
||||
@@ -467,7 +467,7 @@ namespace ipl {
|
||||
mpDiskBnrLayout->calc();
|
||||
} else {
|
||||
calcModuleChannel();
|
||||
System::getChannelManager()->setUnk_0x1B81(false);
|
||||
System::getChannelManager()->setDiskChannelReady(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()->isUnk_0x1B81())) {
|
||||
(System::getBS2Manager()->getIPLState() != bs2::IPL_STATE_RVL_GAME || System::getChannelManager()->isDiskChannelReady())) {
|
||||
mParentalState = PARENTAL_STATE_FAILED;
|
||||
}
|
||||
|
||||
@@ -2064,7 +2064,7 @@ namespace ipl {
|
||||
break;
|
||||
}
|
||||
case DISK_STATE_WII_DISK_IDLE: {
|
||||
if (BS2State != bs2::IPL_STATE_RVL_GAME || System::getChannelManager()->isUnk_0x1B81()) {
|
||||
if (BS2State != bs2::IPL_STATE_RVL_GAME || System::getChannelManager()->isDiskChannelReady()) {
|
||||
mDiskState = DISK_STATE_EJECT;
|
||||
mpDiskBnrAnims[DISK_ANIM_GRP_ALL][DISK_ANIM_DISK_EJECT]->play();
|
||||
mpDiskBnrLayout->GetRootPane()->SetVisible(true);
|
||||
|
||||
@@ -462,7 +462,6 @@ namespace ipl {
|
||||
directPagePath = "index03.html";
|
||||
break;
|
||||
case 7:
|
||||
default:
|
||||
directPagePath = "index01.html";
|
||||
break;
|
||||
}
|
||||
@@ -1606,10 +1605,10 @@ namespace ipl {
|
||||
OSReport("initKeyboard formId:%d\n", mpWiiSettingData->data[0x11]);
|
||||
memset(unk_0x938, 0, sizeof(unk_0x938));
|
||||
|
||||
int invalidInput = 0;
|
||||
int stringLimit;
|
||||
keyboard::Manager::KeyboardType keyboardType = keyboard::Manager::LETTER;
|
||||
int rowLimit = 0;
|
||||
int stringLimit = 0;
|
||||
int rowLimit;
|
||||
int invalidInput = 0;
|
||||
int productArea = static_cast<s8>(SCGetProductArea());
|
||||
|
||||
switch (mpWiiSettingData->data[0x11]) {
|
||||
@@ -1711,14 +1710,16 @@ namespace ipl {
|
||||
}
|
||||
|
||||
if (productArea == 11) {
|
||||
System::getKeyboard()->memoFrm()->setZiDictionary(System::getKeyboard()->getZiOemDic(), System::getKeyboard()->getZiSystemDic());
|
||||
void* systemDic = System::getKeyboard()->getZiSystemDic();
|
||||
void* oemDic = System::getKeyboard()->getZiOemDic();
|
||||
System::getKeyboard()->memoFrm()->setZiDictionary(oemDic, systemDic);
|
||||
}
|
||||
|
||||
keyboard::Manager::KeyboardSetting setting;
|
||||
setting.type = keyboardType;
|
||||
setting.rowLimit = rowLimit;
|
||||
setting.wcString = reinterpret_cast<const wchar_t*>(unk_0x938);
|
||||
setting.stringLimit = stringLimit;
|
||||
setting.rowLimit = rowLimit;
|
||||
setting.type = keyboardType;
|
||||
System::getKeyboard()->start(0, setting);
|
||||
|
||||
if (invalidInput != 0) {
|
||||
@@ -1738,7 +1739,6 @@ namespace ipl {
|
||||
if (mKeyboardState.pressOK) {
|
||||
onTextInputOK();
|
||||
u8 formId = mpWiiSettingData->data[0x11];
|
||||
formText = NULL;
|
||||
switch (formId) {
|
||||
case 1:
|
||||
formText = mpStringBuffer->nickname;
|
||||
@@ -1809,7 +1809,8 @@ namespace ipl {
|
||||
memcpy(mpStringBuffer->asterisks, mpStringBuffer->securityKey, sizeof(mpStringBuffer->securityKey));
|
||||
mpStringBuffer->asterisks[0x41] = 0;
|
||||
while (mpStringBuffer->asterisks[index] != 0) {
|
||||
mpStringBuffer->asterisks[index++] = '*';
|
||||
mpStringBuffer->asterisks[index] = '*';
|
||||
index++;
|
||||
}
|
||||
if (index > 0x20) {
|
||||
mpStringBuffer->asterisks[0x20] = '\n';
|
||||
@@ -1821,7 +1822,6 @@ namespace ipl {
|
||||
}
|
||||
} else {
|
||||
u8 formId = mpWiiSettingData->data[0x11];
|
||||
formText = NULL;
|
||||
switch (formId) {
|
||||
case 1:
|
||||
formText = mpStringBuffer->nickname;
|
||||
|
||||
@@ -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), unk_0x90(0), unk_0x94(0) {
|
||||
mpLayout(NULL), mpLayoutFile(NULL), mpGui(NULL), mPendingSceneId(0), mExitSeqStep(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 (unk_0x90 != 0) {
|
||||
if (mPendingSceneId != 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 (unk_0x90 != 0) {
|
||||
if (mPendingSceneId != 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();
|
||||
unk_0x90 = 4;
|
||||
mPendingSceneId = SCENE_BOARD;
|
||||
|
||||
reserveAllSceneDestruction(SCENE_BOARD, NULL);
|
||||
|
||||
@@ -369,8 +369,8 @@ namespace ipl {
|
||||
int backAnim = -1;
|
||||
int inAnim = -1;
|
||||
|
||||
switch (unk_0x90) {
|
||||
case 13: {
|
||||
switch (mPendingSceneId) {
|
||||
case SCENE_MEMORY: {
|
||||
#ifndef KOREAN_BUILD
|
||||
backAnim = ANIM_WII_SAVE_DATA_BACK;
|
||||
inAnim = ANIM_GC_SAVE_DATA_IN;
|
||||
@@ -380,12 +380,12 @@ namespace ipl {
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
case 14: {
|
||||
case SCENE_MEMORY_CARD: {
|
||||
backAnim = ANIM_GC_SAVE_DATA_BACK;
|
||||
inAnim = ANIM_WII_SAVE_DATA_IN;
|
||||
break;
|
||||
}
|
||||
case 12: {
|
||||
case SCENE_CHANNEL_EDIT: {
|
||||
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 (unk_0x90) {
|
||||
case 12: {
|
||||
switch (mPendingSceneId) {
|
||||
case SCENE_CHANNEL_EDIT: {
|
||||
static_cast<SettingButton*>(System::getScene(SCENE_SETTING_BUTTON))->showWii();
|
||||
CHANGE_STATE(STATE_2ND_NORMAL);
|
||||
break;
|
||||
}
|
||||
case 13:
|
||||
case 14: {
|
||||
case SCENE_MEMORY:
|
||||
case SCENE_MEMORY_CARD: {
|
||||
static_cast<SettingButton*>(System::getScene(SCENE_SETTING_BUTTON))->showWii();
|
||||
#ifndef KOREAN_BUILD
|
||||
CHANGE_STATE(STATE_3RD_NORMAL);
|
||||
@@ -422,7 +422,7 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
unk_0x90 = 0;
|
||||
mPendingSceneId = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -587,7 +587,7 @@ namespace ipl {
|
||||
break;
|
||||
}
|
||||
case BTN_SETTING: {
|
||||
unk_0x90 = 18;
|
||||
mPendingSceneId = SCENE_SETTING;
|
||||
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
|
||||
unk_0x90 = 13;
|
||||
mPendingSceneId = SCENE_MEMORY;
|
||||
#endif
|
||||
flashAnim = ANIM_SAVE_DATA_FLASH;
|
||||
outAnim = ANIM_CHANNEL_OUT;
|
||||
@@ -611,7 +611,7 @@ namespace ipl {
|
||||
break;
|
||||
}
|
||||
case BTN_CHANNEL: {
|
||||
unk_0x90 = 12;
|
||||
mPendingSceneId = SCENE_CHANNEL_EDIT;
|
||||
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: {
|
||||
unk_0x90 = 13;
|
||||
mPendingSceneId = SCENE_MEMORY;
|
||||
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: {
|
||||
unk_0x90 = 14;
|
||||
mPendingSceneId = SCENE_MEMORY_CARD;
|
||||
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 (unk_0x94) {
|
||||
switch (mExitSeqStep) {
|
||||
case 0: {
|
||||
prepare_exit_abort();
|
||||
break;
|
||||
@@ -720,13 +720,13 @@ namespace ipl {
|
||||
|
||||
System::getBS2Manager()->abort();
|
||||
System::stopReceiveSchedule();
|
||||
unk_0x94 = 1;
|
||||
mExitSeqStep = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void SettingSelect::wait_decide_se() {
|
||||
if (!snd::getSystem()->isSEActive("WIPL_SE_DECIDE")) {
|
||||
unk_0x94 = 2;
|
||||
mExitSeqStep = 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -734,7 +734,7 @@ namespace ipl {
|
||||
__WPADReconnect(TRUE);
|
||||
snd::getSystem()->stopAllSound(20);
|
||||
System::getFader()->fadeOut();
|
||||
unk_0x94 = 3;
|
||||
mExitSeqStep = 3;
|
||||
}
|
||||
|
||||
void SettingSelect::finish_exit_reboot() {
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace ipl {
|
||||
extern "C" const u32 scLangLookup__Q23ipl7channel[][16];
|
||||
|
||||
Manager::Manager(EGG::Heap* heap)
|
||||
: mpHeap(heap), mState(INIT), mbCanRefresh(0), unk_0x1B81(false), mbSetDiskBannerInfo(false), mPrevNandResult(NAND_RESULT_OK),
|
||||
: mpHeap(heap), mState(INIT), mbCanRefresh(0), mbDiskChannelReady(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);
|
||||
unk_0x1B81 = true;
|
||||
mbDiskChannelReady = true;
|
||||
} else if (state != bs2::IPL_STATE_RVL_GAME && state != mBS2State) {
|
||||
setDiskBannerInfo(true);
|
||||
}
|
||||
@@ -1076,7 +1076,7 @@ namespace ipl {
|
||||
ARCFileInfo readFile;
|
||||
|
||||
if (unk) {
|
||||
unk_0x1B81 = false;
|
||||
mbDiskChannelReady = false;
|
||||
}
|
||||
|
||||
int diskPage, diskIndex;
|
||||
|
||||
@@ -46,17 +46,17 @@ namespace ipl {
|
||||
}
|
||||
if (mButton != 0) {
|
||||
if (down(BTN_INTERACT)) {
|
||||
unk_0x08++;
|
||||
mDecideHoldCount++;
|
||||
} else {
|
||||
unk_0x08 = 0;
|
||||
mDecideHoldCount = 0;
|
||||
mButton = 0;
|
||||
}
|
||||
} else {
|
||||
unk_0x08 = 0;
|
||||
mDecideHoldCount = 0;
|
||||
}
|
||||
} else {
|
||||
mButton = 0;
|
||||
unk_0x08 = 0;
|
||||
mDecideHoldCount = 0;
|
||||
}
|
||||
|
||||
switch (mRumbleType) {
|
||||
@@ -109,7 +109,7 @@ namespace ipl {
|
||||
return NULL;
|
||||
}
|
||||
int ipl::controller::Base::decide() const {
|
||||
return unk_0x08 == 5;
|
||||
return mDecideHoldCount == 5;
|
||||
}
|
||||
int ipl::controller::Base::rumble(int type) {
|
||||
int ret = FALSE;
|
||||
@@ -130,44 +130,44 @@ namespace ipl {
|
||||
}
|
||||
void ipl::controller::Revolution::read() {
|
||||
if (!isValidDpd()) {
|
||||
unk_0x20->pos.y = 1.0f / 0.0f;
|
||||
unk_0x20->pos.x = 1.0f / 0.0f;
|
||||
unk_0x20->speed = 0.0f;
|
||||
unk_0x20->vec.y = 0.0f;
|
||||
unk_0x20->vec.x = 0.0f;
|
||||
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;
|
||||
}
|
||||
|
||||
unk_0x1E = unk_0x1D;
|
||||
mbWasPinching = mbPinching;
|
||||
if (isValidBtn()) {
|
||||
if (unk_0x1E == 0) {
|
||||
if (mbWasPinching == 0) {
|
||||
if (down(0x800) && down(0x400)) {
|
||||
unk_0x1D = 1;
|
||||
mbPinching = 1;
|
||||
}
|
||||
} else if (!down(0x800) || !down(0x400)) {
|
||||
unk_0x1D = 0;
|
||||
mbPinching = 0;
|
||||
}
|
||||
} else {
|
||||
unk_0x1D = 0;
|
||||
mbPinching = 0;
|
||||
}
|
||||
|
||||
Base::read();
|
||||
}
|
||||
bool ipl::controller::Revolution::isValidDpd() const {
|
||||
if (unk_0x1C != 0) {
|
||||
if (mbForceInvalid != 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (unk_0x20->wpad_err == 0 || unk_0x20->wpad_err == -7) && unk_0x20->dpd_valid_fg != 0;
|
||||
return (mpKpadStatus->wpad_err == 0 || mpKpadStatus->wpad_err == -7) && mpKpadStatus->dpd_valid_fg != 0;
|
||||
}
|
||||
bool ipl::controller::Revolution::isValidBtn() const {
|
||||
u8 val = unk_0x20->wpad_err;
|
||||
u8 val = mpKpadStatus->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 (unk_0x20->hold & (mButton & 0xFFFF)) {
|
||||
if (mpKpadStatus->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 = {unk_0x20->pos.x, unk_0x20->pos.y};
|
||||
Vec2 src = {mpKpadStatus->pos.x, mpKpadStatus->pos.y};
|
||||
nw4r::ut::Rect nw4r_rect; // constructor shouldn't be inlined
|
||||
Rect kpad_rect;
|
||||
|
||||
@@ -216,9 +216,9 @@ namespace ipl {
|
||||
y = fy;
|
||||
}
|
||||
ipl::controller::Classic::Classic(int arg0, KPADStatus& arg1) : Revolution(arg0, arg1) {
|
||||
unk_0x24.x = 0.01f;
|
||||
unk_0x24.y = 0.01f;
|
||||
unk_0x2C = 0;
|
||||
mClassicCursorPos.x = 0.01f;
|
||||
mClassicCursorPos.y = 0.01f;
|
||||
mClassicCursorTimer = 0;
|
||||
}
|
||||
ipl::controller::Base::~Base() {
|
||||
}
|
||||
@@ -230,32 +230,32 @@ namespace ipl {
|
||||
}
|
||||
void ipl::controller::Classic::read() {
|
||||
if (!Revolution::isValidDpd()) {
|
||||
math::VEC2 lstick(unk_0x20->ex_status.cl.lstick.x, unk_0x20->ex_status.cl.lstick.y);
|
||||
math::VEC2 lstick(mpKpadStatus->ex_status.cl.lstick.x, mpKpadStatus->ex_status.cl.lstick.y);
|
||||
|
||||
if (lstick.x * lstick.x + lstick.y * lstick.y > 0.0036f) {
|
||||
unk_0x24.x = math::abs_clamp(unk_0x24.x + unk_0x20->ex_status.cl.lstick.x * 0.05f, 1.8f);
|
||||
unk_0x24.y = math::abs_clamp(unk_0x24.y - unk_0x20->ex_status.cl.lstick.y * 0.05f, 1.2f);
|
||||
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);
|
||||
}
|
||||
|
||||
math::VEC2 rstick = math::VEC2(unk_0x20->ex_status.cl.rstick.x, unk_0x20->ex_status.cl.rstick.y);
|
||||
math::VEC2 rstick = math::VEC2(mpKpadStatus->ex_status.cl.rstick.x, mpKpadStatus->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) {
|
||||
unk_0x2C = 180;
|
||||
mClassicCursorTimer = 180;
|
||||
}
|
||||
|
||||
if (--unk_0x2C < 0) {
|
||||
unk_0x2C = 0;
|
||||
if (--mClassicCursorTimer < 0) {
|
||||
mClassicCursorTimer = 0;
|
||||
}
|
||||
} else {
|
||||
unk_0x24.y = 0.01f;
|
||||
unk_0x24.x = 0.01f;
|
||||
unk_0x2C = 0;
|
||||
mClassicCursorPos.y = 0.01f;
|
||||
mClassicCursorPos.x = 0.01f;
|
||||
mClassicCursorTimer = 0;
|
||||
}
|
||||
|
||||
Revolution::read();
|
||||
}
|
||||
int ipl::controller::Classic::getClassicHoldFlag() const {
|
||||
return unk_0x20->ex_status.cl.hold;
|
||||
return mpKpadStatus->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(unk_0x20->horizon.x, unk_0x20->horizon.y);
|
||||
ret.set(mpKpadStatus->horizon.x, mpKpadStatus->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(unk_0x20->pos.x, unk_0x20->pos.y);
|
||||
} else if (unk_0x2C != 0) {
|
||||
ret = unk_0x24;
|
||||
ret.set(mpKpadStatus->pos.x, mpKpadStatus->pos.y);
|
||||
} else if (mClassicCursorTimer != 0) {
|
||||
ret = mClassicCursorPos;
|
||||
} 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(unk_0x20->pos.x, unk_0x20->pos.y);
|
||||
} else if (unk_0x2C != 0) {
|
||||
ret = unk_0x24;
|
||||
ret.set(mpKpadStatus->pos.x, mpKpadStatus->pos.y);
|
||||
} else if (mClassicCursorTimer != 0) {
|
||||
ret = mClassicCursorPos;
|
||||
} else {
|
||||
ret.set(1.0f / 0.0f, 1.0f / 0.0f);
|
||||
}
|
||||
@@ -454,7 +454,7 @@ void ipl::controller::Master::setForceInvalid(bool flag) {
|
||||
return -1;
|
||||
}
|
||||
void ipl::controller::Base::setForceInvalid(bool flag) {
|
||||
unk_0x1C = flag;
|
||||
mbForceInvalid = flag;
|
||||
}
|
||||
int ipl::controller::Base::getType() const {
|
||||
return mType;
|
||||
@@ -463,65 +463,65 @@ void ipl::controller::Master::setForceInvalid(bool flag) {
|
||||
return mChan;
|
||||
}
|
||||
KPADStatus* ipl::controller::Revolution::getKPADStatus() const {
|
||||
return unk_0x20;
|
||||
return mpKpadStatus;
|
||||
}
|
||||
f32 ipl::controller::Revolution::getDpdDistance() const {
|
||||
return unk_0x20->dist;
|
||||
return mpKpadStatus->dist;
|
||||
}
|
||||
int ipl::controller::Revolution::getReleaseFlag() const {
|
||||
return unk_0x20->release;
|
||||
return mpKpadStatus->release;
|
||||
}
|
||||
int ipl::controller::Revolution::getTrigFlag() const {
|
||||
return unk_0x20->trig;
|
||||
return mpKpadStatus->trig;
|
||||
}
|
||||
int ipl::controller::Revolution::getHoldFlag() const {
|
||||
return unk_0x20->hold;
|
||||
return mpKpadStatus->hold;
|
||||
}
|
||||
int ipl::controller::Revolution::pinchOffTrg() const {
|
||||
int ret = 0;
|
||||
if (isValidBtn() && unk_0x1D == 0 && unk_0x1E != 0) {
|
||||
if (isValidBtn() && mbPinching == 0 && mbWasPinching != 0) {
|
||||
ret = 1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
int ipl::controller::Revolution::pinch() const {
|
||||
int ret = 0;
|
||||
if (isValidBtn() && unk_0x1D != 0) {
|
||||
if (isValidBtn() && mbPinching != 0) {
|
||||
ret = 1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
int ipl::controller::Revolution::pinchTrg() const {
|
||||
int ret = 0;
|
||||
if (isValidBtn() && unk_0x1D != 0 && unk_0x1E == 0) {
|
||||
if (isValidBtn() && mbPinching != 0 && mbWasPinching == 0) {
|
||||
ret = 1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
bool ipl::controller::Revolution::repeat(u32 button) const {
|
||||
return down(button) && (unk_0x20->hold & 0x80000000) != 0;
|
||||
return down(button) && (mpKpadStatus->hold & 0x80000000) != 0;
|
||||
}
|
||||
BOOL ipl::controller::Classic::isValidDpdClassic() const {
|
||||
return unk_0x2C != 0;
|
||||
return mClassicCursorTimer != 0;
|
||||
}
|
||||
bool ipl::controller::Classic::isValidDpd() const {
|
||||
if (unk_0x1C != 0) {
|
||||
if (mbForceInvalid != 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (Revolution::isValidDpd() != 0) || (unk_0x2C != 0);
|
||||
return (Revolution::isValidDpd() != 0) || (mClassicCursorTimer != 0);
|
||||
}
|
||||
int ipl::controller::Classic::getClassicReleaseFlag() const {
|
||||
return unk_0x20->ex_status.cl.release;
|
||||
return mpKpadStatus->ex_status.cl.release;
|
||||
}
|
||||
int ipl::controller::Classic::getClassicTrigFlag() const {
|
||||
return unk_0x20->ex_status.cl.trig;
|
||||
return mpKpadStatus->ex_status.cl.trig;
|
||||
}
|
||||
bool ipl::controller::Classic::upTrg(u32 button) const {
|
||||
bool ret = false;
|
||||
if (isValidBtn()) {
|
||||
bool pressed = true;
|
||||
KPADStatus* status = unk_0x20;
|
||||
KPADStatus* status = mpKpadStatus;
|
||||
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 = unk_0x20;
|
||||
KPADStatus* status = mpKpadStatus;
|
||||
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 ((unk_0x20->hold & (button & 0xFFFF)) == 0) {
|
||||
if ((unk_0x20->ex_status.cl.hold & (button >> 16)) == 0) {
|
||||
if ((mpKpadStatus->hold & (button & 0xFFFF)) == 0) {
|
||||
if ((mpKpadStatus->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(unk_0x20->horizon.x, unk_0x20->horizon.y);
|
||||
return math::VEC2(mpKpadStatus->horizon.x, mpKpadStatus->horizon.y);
|
||||
}
|
||||
ipl::math::VEC2 ipl::controller::Revolution::getDpdPos() const {
|
||||
return math::VEC2(unk_0x20->pos.x, unk_0x20->pos.y);
|
||||
return math::VEC2(mpKpadStatus->pos.x, mpKpadStatus->pos.y);
|
||||
}
|
||||
bool ipl::controller::Revolution::upTrg(u32 button) const {
|
||||
bool ret = false;
|
||||
if (isValidBtn()) {
|
||||
if (unk_0x20->release & (button & 0xFFFF)) {
|
||||
if (mpKpadStatus->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 (unk_0x20->trig & (button & 0xFFFF)) {
|
||||
if (mpKpadStatus->trig & (button & 0xFFFF)) {
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,9 +152,9 @@ namespace ipl {
|
||||
}
|
||||
|
||||
Revolution::Revolution(int chan, int type, KPADStatus& status) : Base(chan, type, status) {
|
||||
unk_0x1D = 0;
|
||||
unk_0x1E = 0;
|
||||
unk_0x20 = &status;
|
||||
mbPinching = 0;
|
||||
mbWasPinching = 0;
|
||||
mpKpadStatus = &status;
|
||||
}
|
||||
|
||||
Interface* Manager::getMasterController() {
|
||||
|
||||
75
tools/decomp-assist/attempts/iqdec-b65-worker1.md
Normal file
75
tools/decomp-assist/attempts/iqdec-b65-worker1.md
Normal file
@@ -0,0 +1,75 @@
|
||||
# iqdec_b65_frv32 / TMCJPEGDEC_decode_iquant (worker1)
|
||||
|
||||
Worktree: `/workspace/worktrees/iqdec-b65-worker1`
|
||||
Branch: `agent/grok/decomp-worker-1/iqdec_b65`
|
||||
|
||||
## Scores
|
||||
|
||||
| State | Insns | Diffs | Notes |
|
||||
|---|---|---|---|
|
||||
| main baseline | 276/276 | **30** reg-only | entry/DC extract + AC coloring |
|
||||
| this PR (sibling semantics) | 276/276 | **13** reg-only | structural 0 |
|
||||
| target wall | 276/276 | 13 | AC huff/zztbl/zz permutation |
|
||||
|
||||
## Sibling semantics ported (from matching `decode_iquant_rc` C reference under `#else`)
|
||||
|
||||
- `u16*` fast indexing in `decodeLongHuffman` / `decodeACHuffman` (`entry = (u16*)(huff_tbl+9)`, `entry += 2`, `limit->bitLength = entry[0]`)
|
||||
- comma-op `load_buff`: `if (load_ret = TMCJPEGDEC_load_buff(work), load_ret < 0)`
|
||||
- early `s32* conv_row = (s32*)conv_row_ptr`
|
||||
- `1UL << r/t`, `extra -= (tmp - 1)` paren form
|
||||
- bitCount update before bitBuf read on DC/AC extract
|
||||
|
||||
These fixed the 17 non-AC diffs (30→13).
|
||||
|
||||
## Remaining wall (13 reg-only)
|
||||
|
||||
Permutation of 4 callee-saved across AC setup:
|
||||
|
||||
| Value | Ours | Target |
|
||||
|---|---|---|
|
||||
| `huff_tbl` (pACHuffTbl) | r29 | **r25** |
|
||||
| `huff_sym` (pACHuffSym) | r30 | **r24** |
|
||||
| `zztbl` | r24 | **r29** |
|
||||
| `zz` | r25 | **r30** |
|
||||
|
||||
Cascaded: `tmp-1` in r7 vs r6; `zz<<2` index in r6 vs r7.
|
||||
|
||||
Insns 0–114 (through `ac_fast` load) are byte-identical. Divergence starts at AC huff loads (115–116).
|
||||
|
||||
## Coloring levers tried (≥12) — none beat 13
|
||||
|
||||
1. Separate AC-block `ac_huff_tbl`/`ac_huff_sym` → 32 (DC shifted)
|
||||
2. DC-only block-local huff → 46 (prologue shifted)
|
||||
3. Fully scoped DC/AC huff (no top-level) → 32
|
||||
4. Early `zztbl` at function start → 138 (schedule)
|
||||
5. `zztbl` before huff (before memset) → 32 (schedule)
|
||||
6. Swap AC huff_tbl/huff_sym assign order → 13 (swapped wrong load order)
|
||||
7. Swap DC huff assign order → build fail / unrestored
|
||||
8. Decl reorder huff near zztbl → 17 (DC shifted)
|
||||
9. `u8 zz` → 36
|
||||
10. `u32 zz` → 13 (no change)
|
||||
11. Move `zz = zztbl[idx]` after `load_buff` → 100
|
||||
12. Eliminate `zz` temp (double `zztbl[idx]`) → 100
|
||||
13. Huff before `ac_fast` → 14
|
||||
14. Split `r` into `dc_r` + `r` → 13
|
||||
15. Null-kill `huff_*=0` before AC reassign → 13
|
||||
16. DC passes `work->pDCHuff*` directly → 30
|
||||
17. Sibling decl order + `ac_vl`/`ac_sym` → 96
|
||||
18. Scope DC HuffmanEntry temps → 33
|
||||
19. Dummy pad locals → 13
|
||||
20. Sibling `*(s32*)((u8*)block + zz*4)` store form → 13
|
||||
21. `zztbl` first in decl list → 36
|
||||
22. Coalesce huff_tbl via reassigning `dc_fast` → 36
|
||||
23. `u32 idx` → 33
|
||||
24. `s16 idx` → build fail
|
||||
25. `unsigned long tmp` → 30
|
||||
26. AC huff via `work->` at call only (no AC locals) → 120
|
||||
27. Nested temp copies into huff_* → 32
|
||||
28. `u8* zztbl` non-const → 13
|
||||
29. **declsearch** 80 evals on decls 118–139 → best still (0, 13)
|
||||
|
||||
Root cause: `huff_sym`/`huff_tbl` keep DC-path preferred colors (r29/…) when reassigned for AC; target recycles freed `r24` (dc_predict) / `r25` (dc `r`) for AC huff and pushes `zztbl`/`zz` high. Any split of DC/AC names reshuffles the already-matching DC body.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Need a shape that keeps DC 0–114 identical **and** births AC huff into r25/r24 (e.g. true live-range split / coalescing onto freed dc_predict/r without extra locals that raise pressure). Sibling `#else` C uses separate `ac_vl`/`ac_sym` and never shares DC huff locals — porting that cleanly without DC regen is the open problem.
|
||||
67
tools/decomp-assist/data-d16.attempts.md
Normal file
67
tools/decomp-assist/data-d16.attempts.md
Normal file
@@ -0,0 +1,67 @@
|
||||
# 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
|
||||
```
|
||||
@@ -1746,3 +1746,557 @@ Final authority lines:
|
||||
[libs/RVL_SDK/src/kpad/KPAD] instruction-exact functions: 21/29
|
||||
GATE PASS
|
||||
```
|
||||
|
||||
# Round 9: MAX fresh branchf7b1b9b0
|
||||
Initial owned objects rebuilt and fresh objdiff baseline generated directly; pools identical101/57/0. Fresh counts SD122/129,Address90/94,KPAD21/29, data100% in all3. New near-miss hypotheses use accessor references to stored pointer cells and postincrement-return inline boundaries; prior rounds did not change the original objects.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv
|
||||
Fetch origin/main 6cb5ac9dedfbf99dc591e2cabc9d62d2c849a69d. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 35/35
|
||||
Remote source equals freshly built baseline; still open 99.65714%. Structural diagnosis: 35/35,frame0x10; only heap/manager load order reversed. Target loads heap after flag store, then reloads manager. New accessor reference-return types describe read-only views of stored pointer cells; actual calls/field layout remain identical. Prior trials bound pointer values after loading them.
|
||||
- save-manager getter returns a const reference to the stored pointer: (2, 2) structural/positional; instructions 35/35; restored.
|
||||
- heap getter returns a const reference to the stored pointer: (2, 2) structural/positional; instructions 35/35; restored.
|
||||
- both argument getters return read-only references to their pointer cells: (2, 2) structural/positional; instructions 35/35; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main c7ceb3efe077dca7dd49508cf4e2bd1faab56b54. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 101/101
|
||||
Remote source equals freshly built baseline; still open 97.81188%. Structural diagnosis: 101/101 or102/102,frame0x40; target preserves old count inr3 and computes increment inr0, blocking early threshold loading. New inline postincrement-return boundary and copy-plus-increment helper test this real result lifetime; no artificial uses or dummy objects.
|
||||
- pointer postincrement-result inline boundary after collecting a title: (2, 4) structural/positional; instructions 101/101; restored.
|
||||
- reference postincrement-result inline boundary after collecting a title: (2, 4) structural/positional; instructions 101/101; restored.
|
||||
- append postincrement-result inline boundary after collecting a title: (2, 4) structural/positional; instructions 101/101; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main c7ceb3efe077dca7dd49508cf4e2bd1faab56b54. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 102/102
|
||||
Remote source equals freshly built baseline; still open 97.833336%. Structural diagnosis: 101/101 or102/102,frame0x40; target preserves old count inr3 and computes increment inr0, blocking early threshold loading. New inline postincrement-return boundary and copy-plus-increment helper test this real result lifetime; no artificial uses or dummy objects.
|
||||
- pointer postincrement-result inline boundary after collecting a title: (2, 4) structural/positional; instructions 102/102; restored.
|
||||
- reference postincrement-result inline boundary after collecting a title: (2, 4) structural/positional; instructions 102/102; restored.
|
||||
- append postincrement-result inline boundary after collecting a title: (2, 4) structural/positional; instructions 102/102; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv
|
||||
Fetch origin/main 7216fd527fee4db057af192c416f9d2fbe0e547a. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 35/35
|
||||
Remote source equals freshly built baseline; still open 99.65714%. Structural diagnosis: Further structural lever: scalarized aggregate of the real heap/manager arguments, with read-only request/helper boundaries; target frame0x10 and35 instructions, only two argument loads inverted.
|
||||
- read-only real flush argument aggregate: (2, 2) structural/positional; instructions 35/35; restored.
|
||||
- mutable request fields assigned heap then manager: (2, 2) structural/positional; instructions 35/35; restored.
|
||||
- mutable request with manager initialized last via constructor: (2, 2) structural/positional; instructions 35/35; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv
|
||||
Fetch origin/main 7216fd527fee4db057af192c416f9d2fbe0e547a. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 38/38
|
||||
Remote source equals freshly built baseline; still open 99.42105%. Structural diagnosis: Structural diagnosis:38 instructions/frame0x10 equal; resolved wcsncpy source and destination LEAs inverted. No immediate store/reload pair or extent overlap; test scalarized copy request with source-first real fields before register-only work.
|
||||
- read-only name-copy argument aggregate: (11, 32) structural/positional; instructions 40/38; restored.
|
||||
- mutable name-copy source and destination field assignments: (2, 2) structural/positional; instructions 38/38; restored.
|
||||
- read-only name-copy request constructor: (2, 2) structural/positional; instructions 38/38; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv
|
||||
Fetch origin/main 2da1c58f2c1b14de0754929ddbc23394a011d7a5. Initial assembly diagnosis: (4, 39) structural/positional differences; instructions 145/146
|
||||
Remote source equals freshly built baseline; still open 97.73972%. Structural diagnosis: 145/146 frame0x20; missing BS2-manager body reload, global/string base colors reversed. New lexical scopes for manager acquisition and an actual abort-state for-loop; no added data or volatile without proof.
|
||||
- poll using a switch and separate completed-state exit label: build failed i-ipl-workers\data- # d5\include\scene\iplSceneManager.h:14 # Z:\mnt\drive2\projects\wii-ipl-workers\data-d5\include\iplSceneUI.h:11 # Z:\mnt\drive2\projects\wii-ipl-workers\data- # d5\src\scene\sdChannelSelect\iplSDChannelSelect.cpp:6) ### mwcceppc.exe Compiler: # File: src\scene\sdChannelSelect\iplSDChannelSelect.cpp # --------------------------------------------------------- # 258: } # Error: ^ # (10159) undefined label 'abortFinished' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
|
||||
- bind the update receiver as a read-only reference in the loop body: (4, 39) structural/positional; instructions 145/146; restored.
|
||||
- hold the observed abort state as a leading initialized for-loop variable: (7, 42) structural/positional; instructions 149/146; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main 02dbcc53bdf195d3b2aa22f56460ad2c2f913dd2. Initial assembly diagnosis: (2, 22) structural/positional differences; instructions 126/126
|
||||
Remote source equals freshly built baseline; still open 97.29365%. Structural diagnosis: 126/126 frame0x60; title-ID inner scope changes index/add operand allocation; new pointer-to-row and explicit signed page offset views after hoisting the real ID, retaining safe typed entry access.
|
||||
- hoist the title and index through a pointer to the selected channel page: (2, 7) structural/positional; instructions 126/126; restored.
|
||||
- hoist the title and apply the row index before dereferencing its array: (2, 7) structural/positional; instructions 126/126; restored.
|
||||
- hoist the title and use an explicitly unsigned native channel index: (2, 7) structural/positional; instructions 126/126; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main ed2d5b30b46940f63b16670dd1f7b44b2ac06984. Initial assembly diagnosis: (8, 16) structural/positional differences; instructions 361/361
|
||||
Remote source equals freshly built baseline; still open 97.55125%. Structural diagnosis: 361/361 frame0x80; four repeated counter/threshold schedules differ16. New count read-modify-write expression semantics and inline returning the original count; source paths and threshold signedness preserved.
|
||||
- use a named previous count in each completed title increment: (8, 16) structural/positional; instructions 361/361; restored.
|
||||
- sequence the postincrement result as a discarded comma-expression: (8, 16) structural/positional; instructions 361/361; restored.
|
||||
- put postincrement behind a helper returning the original count: (8, 16) structural/positional; instructions 361/361; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj
|
||||
Fetch origin/main 5a332eceba97b348917577a016edf49c8b2bd519. Initial assembly diagnosis: (23, 68) structural/positional differences; instructions 233/233
|
||||
Remote source equals freshly built baseline; still open 93.4721%. Structural diagnosis: 233/233 frame0xe0; framebuffer-width/height conversions and projection/scissor lifetimes dominate68 differences; new real framebuffer-dimension and scissor-rectangle aggregate views before register-only tuning.
|
||||
- declare framebuffer width before height then initialize both from named dimension references: (23, 68) structural/positional; instructions 233/233; restored.
|
||||
- retain one named projection-width local shared by both scissor branches: (51, 195) structural/positional; instructions 230/233; restored.
|
||||
- represent the four actual computed scissor bounds as fields of a local rectangle: (192, 247) structural/positional; instructions 251/233; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv
|
||||
Fetch origin/main a8ab2099cdf66a22205c6faec73834eb7f771168. Initial assembly diagnosis: (4, 39) structural/positional differences; instructions 145/146
|
||||
Remote source equals freshly built baseline; still open 97.73972%. Structural diagnosis: Correct failed exit-label trial; elapsedTicks is the real statement after the poll. Failed compiler trial did not count toward the three successful variants.
|
||||
- switch-based poll with a defined abort-finished label before the elapsed tick computation: (9, 40) structural/positional; instructions 145/146; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv
|
||||
Fetch origin/main a8ab2099cdf66a22205c6faec73834eb7f771168. Initial assembly diagnosis: (10, 68) structural/positional differences; instructions 82/84
|
||||
Remote source equals freshly built baseline; still open 88.03571%. Structural diagnosis: 82/84 frame0x420; target keeps name/display addresses in one saved register across virtual pane lookups. New mutable input pointer/array/String views test MWCC rematerialization and alias assumptions without changing shared signatures.
|
||||
- keep both text inputs in mutable character pointers before the virtual lookups: (10, 68) structural/positional; instructions 82/84; restored.
|
||||
- bind actual mutable name and display arrays by their real extents: (10, 68) structural/positional; instructions 82/84; restored.
|
||||
- read both text arrays through a mutable String reference shared across pane calls: (10, 68) structural/positional; instructions 82/84; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv
|
||||
Fetch origin/main a8ab2099cdf66a22205c6faec73834eb7f771168. Initial assembly diagnosis: (19, 323) structural/positional differences; instructions 820/820
|
||||
Remote source equals freshly built baseline; still open 97.44634%. Structural diagnosis: 820/820 frame0x60; ordinary construction removes the doubled allocation guard but leaves two missing name/display LEAs. New mutable text input views paired with ordinary allocation preserve literal source order and avoid manual constructor calls.
|
||||
- ordinary balloon allocation with a mutable name pointer before animator restart: (23, 331) structural/positional; instructions 818/820; restored.
|
||||
- ordinary balloon allocation with mutable real name/display array references: (23, 331) structural/positional; instructions 818/820; restored.
|
||||
- ordinary balloon allocation and a mutable String receiver for both mode-zero text inputs: (23, 331) structural/positional; instructions 818/820; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err
|
||||
Fetch origin/main a8ab2099cdf66a22205c6faec73834eb7f771168. Initial assembly diagnosis: (1, 30) structural/positional differences; instructions 76/75
|
||||
Remote source equals freshly built baseline; still open 98.666664%. Structural diagnosis: 76/75 frame0x60; target has undefined message ID for other errors, safe default cannot be removed. Try safe grouped valid errors with an explicit default and a truly initialized index object; unsupported input behavior remains defined.
|
||||
- assign the safe fallback explicitly inside every switch case including default: (6, 28) structural/positional; instructions 73/75; restored.
|
||||
- use an initialized message-selection aggregate holding the actual index: (1, 30) structural/positional; instructions 76/75; restored.
|
||||
- use a safe if/else selection testing the original supported error groups: (18, 47) structural/positional; instructions 65/75; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos
|
||||
Fetch origin/main fd775c34dcac2c7110d7729ebd0bd6e3ee7bba62. Initial assembly diagnosis: (0, 9) structural/positional differences; instructions 19/19
|
||||
Remote source equals freshly built baseline; still open 96.57895%. Structural diagnosis: Decoded19/19 leaf structure exact; target double scale usesf0 and half/aspectf4/f3. New actual scalar helper boundaries for correction, half-height, and complete coordinate projection; registers last.
|
||||
- put the double calibration product behind a scalar-return inline helper: (0, 10) structural/positional; instructions 19/19; restored.
|
||||
- put the half-height product behind a scalar-return inline helper: (0, 10) structural/positional; instructions 19/19; restored.
|
||||
- use a complete projection helper with a const coordinate input and precomputed height: (0, 10) structural/positional; instructions 19/19; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight
|
||||
Fetch origin/main fd775c34dcac2c7110d7729ebd0bd6e3ee7bba62. Initial assembly diagnosis: (0, 7) structural/positional differences; instructions 52/52
|
||||
Remote source equals freshly built baseline; still open 99.23077%. Structural diagnosis: Decoded52/52 frame0x30,7 colors; named-zero and squared-height order yield3 base-register colors. New sensor-center subobject view and channel-base lifetime forms keep actual indexed controller fields, without volatile or dummy state.
|
||||
- name the actual sensor-center subobject pointer after controller indexing: (0, 3) structural/positional; instructions 52/52; restored.
|
||||
- form the indexed controller pointer only after computing both real squared dimensions: (0, 3) structural/positional; instructions 52/52; restored.
|
||||
- assign the squared-height contribution into the diagonal temporary before adding width: (0, 8) structural/positional; instructions 52/52; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon
|
||||
Fetch origin/main fd775c34dcac2c7110d7729ebd0bd6e3ee7bba62. Initial assembly diagnosis: (2, 35) structural/positional differences; instructions 101/101
|
||||
Remote source equals freshly built baseline; still open 97.27723%. Structural diagnosis: Decoded101/101 frame0x30,35 pure floating-register colors. New in-place magnitude/normalization lifetimes and product subscopes before using declsearch on any surviving register-only candidate.
|
||||
- reuse magnitude as the blend weight instead of retaining a second smoothing scalar: (2, 35) structural/positional; instructions 101/101; restored.
|
||||
- normalize the interpolated horizon coordinates in place before updating the circle: (2, 37) structural/positional; instructions 101/101; restored.
|
||||
- scope the smoothing weight inside its actual interpolation block: (2, 35) structural/positional; instructions 101/101; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD read_kpad_acc
|
||||
Fetch origin/main fd775c34dcac2c7110d7729ebd0bd6e3ee7bba62. Initial assembly diagnosis: (16, 66) structural/positional differences; instructions 400/400
|
||||
Remote source equals freshly built baseline; still open 98.15%. Structural diagnosis: Decoded400/400 frame0x50,5 CFG differences; real smoothing/guard reconstruction narrows to cmpwi5 instead ofcmplwi5. New boolean switch and nested primary/fallback switch boundaries preserve the complete unsupported-format path.
|
||||
- switch on the unsigned equality predicate of the valid fallback format: (12, 197) structural/positional; instructions 403/400; restored.
|
||||
- nest the fallback single-case switch inside the primary format switch default: (2, 2) structural/positional; instructions 400/400; restored.
|
||||
- subtract the real fallback format before testing the zero switch case: (1, 1) structural/positional; instructions 400/400; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD select_1obj_first
|
||||
Fetch origin/main 842c850c10099d9937f1e02f8625a2f0a985abf9. Initial assembly diagnosis: (2, 26) structural/positional differences; instructions 109/109
|
||||
Remote source equals freshly built baseline; still open 98.348625%. Structural diagnosis: Decoded109/109 frame0x20; 26 float/base colors, direct candidate-end comparison reaches22. New real geometry operand/lifetime forms and shared output-candidate pointer before declaration search.
|
||||
- use scale-first products for the two actual horizon offsets after direct-end comparison: (2, 22) structural/positional; instructions 109/109; restored.
|
||||
- evaluate horizon dot-product axis operands first with direct candidate-end comparison: (4, 22) structural/positional; instructions 109/109; restored.
|
||||
- bind the two actual output candidate records through one local pointer: (2, 22) structural/positional; instructions 109/109; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable
|
||||
Fetch origin/main 842c850c10099d9937f1e02f8625a2f0a985abf9. Initial assembly diagnosis: (14, 45) structural/positional differences; instructions 250/250
|
||||
Remote source equals freshly built baseline; still open 94.82%. Structural diagnosis: Decoded250/250 frame0x20; filter magnitude register reuse and late geometry schedules differ. New explicit absolute-value branch, direction scalar components, and in-place distance filter weight; preserve FP precision and all writes.
|
||||
- assign filter magnitude using explicit sign branches rather than a conditional expression: (14, 45) structural/positional; instructions 250/250; restored.
|
||||
- reuse the filtered distance magnitude through its gain multiplication: (14, 43) structural/positional; instructions 250/250; restored.
|
||||
- name both actual direction components within the final geometric projection scope: (12, 40) structural/positional; instructions 250/250; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADRead
|
||||
Fetch origin/main 842c850c10099d9937f1e02f8625a2f0a985abf9. Initial assembly diagnosis: (11, 89) structural/positional differences; instructions 459/459
|
||||
Remote source equals freshly built baseline; still open 97.52723%. Structural diagnosis: Decoded459/459 frame0xc0; raw-copy endpoint grouping and gravity x/y signed halfword loads differ. New complete raw-copy inline boundary, typed three-factor gravity locals, and decrement loop form; no field type/width changes.
|
||||
- move the complete raw-ring copy into an inline operation returning its final sample index: (46, 250) structural/positional; instructions 459/459; restored.
|
||||
- use signed-int product temporaries for both complete gravity validation products: (7, 83) structural/positional; instructions 459/459; restored.
|
||||
- express the raw-ring copy as a for-loop with the decrement in its update clause: (19, 377) structural/positional; instructions 458/459; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADInit
|
||||
Fetch origin/main 842c850c10099d9937f1e02f8625a2f0a985abf9. Initial assembly diagnosis: (9, 81) structural/positional differences; instructions 185/185
|
||||
Remote source equals freshly built baseline; still open 96.51351%. Structural diagnosis: Decoded185/185 frame0x90; repeat-delay constant and saved float/matrix colors. New repeat initializer inline boundary, zero/one calibration scope, and real matrix reference pointer scope; arrays/stores unchanged.
|
||||
- initialize all six real repeat state fields through a complete inline operation: (9, 81) structural/positional; instructions 185/185; restored.
|
||||
- initialize zero before one while retaining the actual saved scalar locals: (9, 81) structural/positional; instructions 185/185; restored.
|
||||
- bind the initialized rotation matrix pointer inside the controller loop instead of retaining it outside: (9, 65) structural/positional; instructions 185/185; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon
|
||||
Fetch origin/main 6f6f63cb81bdb8298e0270364f6b94dae2b36a6c. Initial assembly diagnosis: (2, 35) structural/positional differences; instructions 101/101
|
||||
Remote source equals freshly built baseline; still open 97.27723%. Structural diagnosis: Register-only final search after this round three distinct successfully built lifetime/scope attempts. Reconstruct the best19-color seed from previous complete assignment order, then search the remaining swaps/moves with a substantially larger budget; decode paired loads and FP compares.
|
||||
- Reproduced best declaration seed, decoded (0, 19); every assignment and computation order unchanged.
|
||||
- Extended declsearch: declaration block: | f32 targetY; | f32 circleY; | f32 deltaX; | f32 oldX; | f32 projectedX; | f32 productX; | f32 targetX; | f32 oldY; | f32 smoothing; | f32 magnitude; | f32 normalizedX; | f32 normalizedY; | f32 nextX; | f32 nextY; | f32 normalized; | f32 circleX; | f32 deltaCircleX; | f32 deltaCircleY; | f32 oldCircleY; | f32 oldCircleX; | f32 unitY; | f32 unitX; | f32 blend; | start (0, 19) | improved (0, 17) | best (0, 17) after 852 builds; kept in source: | f32 targetY; | f32 circleY; | f32 deltaX; | f32 oldX; | f32 projectedX; | f32 productX; | f32 targetX; | f32 normalizedY; | f32 smoothing; | f32 magnitude; | f32 normalizedX; | f32 oldY; | f32 nextX; | f32 nextY; | f32 normalized; | f32 circleX; | f32 deltaCircleX; | f32 deltaCircleY; | f32 oldCircleY; | f32 oldCircleX; | f32 unitY; | f32 unitX; | f32 blend; |
|
||||
Nonexact extended-search candidate restored; raw authority (0, 17).
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos
|
||||
Fetch origin/main a9a3f36cf03be45e012ddbb0b86cc689755c89c0. Initial assembly diagnosis: (0, 9) structural/positional differences; instructions 19/19
|
||||
Remote source equals freshly built baseline; still open 96.57895%. Structural diagnosis: Register-only last after three new scalar/full projection helper attempts; no frame/CFG differences. Remove the independent named double result so its anonymous calibration temporary can coalesce, while naming only actual half/aspect factors. Search six real local declarations, preserving every assignment.
|
||||
- Anonymous double-calibration seed: decoded (0, 9).
|
||||
- Anonymous-calibration declsearch: declaration block: | f32 halfHeight; | f32 aspect; | f32 half; | f32 x; | f32 y; | f32 height; | start (0, 9) | improved (0, 5) | best (0, 5) after 36 builds; kept in source: | f32 aspect; | f32 halfHeight; | f32 half; | f32 x; | f32 y; | f32 height; |
|
||||
Nonexact projection search candidate restored; raw authority (0, 5).
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable
|
||||
Fetch origin/main a9a3f36cf03be45e012ddbb0b86cc689755c89c0. Initial assembly diagnosis: (14, 45) structural/positional differences; instructions 250/250
|
||||
Remote source equals freshly built baseline; still open 94.82%. Structural diagnosis: Further structural reconstruction of late geometry: target loads directionY/tangentY, negates directionY, then loads directionX/tangentX and multiplies in that order. Earlier direct const/scalar views retained12 differences; name the real dot/cross terms and test declaration/expression order.
|
||||
- declare the cross-product rotation before the dot-product rotation: (22, 47) structural/positional; instructions 250/250; restored.
|
||||
- name all four geometric input components in target operand-load order: (12, 41) structural/positional; instructions 250/250; restored.
|
||||
- name the real dot/cross product component values in target multiplication order: (14, 41) structural/positional; instructions 250/250; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight
|
||||
Fetch origin/main a9a3f36cf03be45e012ddbb0b86cc689755c89c0. Initial assembly diagnosis: (0, 7) structural/positional differences; instructions 52/52
|
||||
Remote source equals freshly built baseline; still open 99.23077%. Structural diagnosis: Remaining3 base-register colors after named-zero geometry reconstruction. New actual scalar-return scale helper takes only a read-only sensor-center input instead of the prior entire controller/height helper; this exposes a real inline/alias boundary.
|
||||
- scalar sensor-scale helper with const center input: (1, 13) structural/positional; instructions 52/52; restored.
|
||||
- scalar sensor-scale helper with mutable center input: (1, 13) structural/positional; instructions 52/52; restored.
|
||||
- scalar sensor-scale helper with separated offset inputs: (32, 58) structural/positional; instructions 59/52; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main a9a3f36cf03be45e012ddbb0b86cc689755c89c0. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 101/101
|
||||
Remote source equals freshly built baseline; still open 97.81188%. Structural diagnosis: Four schedule-only differences remain after the new old-count helper attempts. Test immutable formal pointer variables without altering pointee types or mangled public signature, then copy the real incremented count through memcpy as a memory-write boundary.
|
||||
- const only the count pointer formal: (2, 4) structural/positional; instructions 101/101; restored.
|
||||
- const every real pointer formal: (2, 4) structural/positional; instructions 101/101; restored.
|
||||
- write the actual incremented output count through the ordinary memory-copy primitive: (29, 53) structural/positional; instructions 105/101; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main a9a3f36cf03be45e012ddbb0b86cc689755c89c0. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 102/102
|
||||
Remote source equals freshly built baseline; still open 97.833336%. Structural diagnosis: Four schedule-only differences remain after the new old-count helper attempts. Test immutable formal pointer variables without altering pointee types or mangled public signature, then copy the real incremented count through memcpy as a memory-write boundary.
|
||||
- const only the count pointer formal: (2, 4) structural/positional; instructions 102/102; restored.
|
||||
- const every real pointer formal: (2, 4) structural/positional; instructions 102/102; restored.
|
||||
- write the actual incremented output count through the ordinary memory-copy primitive: (29, 52) structural/positional; instructions 106/102; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv
|
||||
Fetch origin/main a9a3f36cf03be45e012ddbb0b86cc689755c89c0. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 38/38
|
||||
Remote source equals freshly built baseline; still open 99.42105%. Structural diagnosis: Two source/destination LEA schedule differences; test genuine array-element/array-object addresses and a read-only getter returning the actual name array reference, no raw offsets or pinned objects.
|
||||
- pass explicit addresses of the real source and destination first elements: (2, 2) structural/positional; instructions 38/38; restored.
|
||||
- cast the address of the actual destination name-array object: (2, 2) structural/positional; instructions 38/38; restored.
|
||||
- read the actual source array through a const member getter returning its full array reference: (2, 2) structural/positional; instructions 38/38; restored.
|
||||
- Anonymous double projection best5 diagnosis: [(11, ('fmuls', 'f4, f1, f4'), ('fmuls', 'f1, f1, f4')), (12, ('fmuls', 'f1, f3, f2'), ('fmuls', 'f2, f3, f2')), (13, ('fmuls', 'f2, f3, f4'), ('fmuls', 'f1, f3, f1')), (14, ('fmul', 'f0, f1, f0'), ('fmul', 'f0, f2, f0')), (15, ('stfs', 'f2, 4(r3)'), ('stfs', 'f1, 4(r3)'))]. Temporary diagnosis source restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos
|
||||
Fetch origin/main a9a3f36cf03be45e012ddbb0b86cc689755c89c0. Initial assembly diagnosis: (0, 9) structural/positional differences; instructions 19/19
|
||||
Remote source equals freshly built baseline; still open 96.57895%. Structural diagnosis: Anonymous-double calibration and named coefficient search reaches5 differences, all in y-half-height/X/Y-aspect colors. New actual coordinate-result lifetime boundaries; target19 instructions with self-coalesced Xf2/Yf1 and no stack.
|
||||
- inline only the vertical coordinate product into its output assignment: (0, 0) structural/positional; instructions 19/19; candidate kept.
|
||||
|
||||
## Round9 exact KPAD projection candidate and gate
|
||||
KPADGetProjectionPos: removing the named double scale result lets the correction product coalesce in f0; named real half/aspect locals put those coefficients in f4/f3; inlining only the vertical coordinate expression into dest->y removes its competing local lifetime and fixes the last5 colors. Final19/19 instructions, ctxdiff0, exact-name objdiff100.0%; pool identical0 strings. The existing horizontal local preserves source.x before either output write, including dest/src aliasing. No new volatile, asm, symbol/extent change or data object.
|
||||
All-unit quick authority gate: full43U build passed; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d; all3 pools identical;0 regressions/forbidden/readability warnings. SD122/129 unchanged, Address90/94 unchanged, KPAD21->22/29; code6756->6832/13056, data8032/8032 unchanged.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight
|
||||
Fetch origin/main 8864436cde34e234c6853e021fe428b802033f4a. Initial assembly diagnosis: (0, 7) structural/positional differences; instructions 52/52
|
||||
Remote source equals freshly built baseline; still open 99.23077%. Structural diagnosis: Register-only last after >=3 distinct successfully built new structural/alias/scope variants. Use declsearch on real subobject/scan locals with all assignments preserved; decode PPC paired operations and FP comparisons before scoring.
|
||||
- New register-only seed decoded (0, 3).
|
||||
- Register-only last declsearch: declaration block: | Vec2* center; | KPADInside* kpad; | f32 halfHeightSquared; | f32 halfHeight; | f32 barOffsetX; | f32 barDiagonal; | f32 halfWidthSquared; | f32 halfWidth; | f32 negativeSensorHeight; | f32 barDiagonalSquared; | f32 zero; | start (0, 3) | best (0, 3) after 146 builds; source restored; best order was: | Vec2* center; | KPADInside* kpad; | f32 halfHeightSquared; | f32 halfHeight; | f32 barOffsetX; | f32 barDiagonal; | f32 halfWidthSquared; | f32 halfWidth; | f32 negativeSensorHeight; | f32 barDiagonalSquared; | f32 zero; |
|
||||
Nonexact declaration candidate restored; raw authority (0, 3).
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD select_1obj_first
|
||||
Fetch origin/main 8864436cde34e234c6853e021fe428b802033f4a. Initial assembly diagnosis: (2, 26) structural/positional differences; instructions 109/109
|
||||
Remote source equals freshly built baseline; still open 98.348625%. Structural diagnosis: Register-only last after >=3 distinct successfully built new structural/alias/scope variants. Use declsearch on real subobject/scan locals with all assignments preserved; decode PPC paired operations and FP comparisons before scoring.
|
||||
- New register-only seed decoded (0, 22).
|
||||
- Register-only last declsearch: declaration block: | KPADDPDObject* object; | f32 scale; | f32 productX; | f32 productY; | f32 offsetX; | f32 offsetY; | start (0, 22) | best (0, 22) after 36 builds; source restored; best order was: | KPADDPDObject* object; | f32 scale; | f32 productX; | f32 productY; | f32 offsetX; | f32 offsetY; |
|
||||
Nonexact declaration candidate restored; raw authority (2, 22).
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD select_1obj_first
|
||||
Fetch origin/main 6f49df32b3d1be83a41250c810670894ebe27efe. Initial assembly diagnosis: (2, 26) structural/positional differences; instructions 109/109
|
||||
Remote source equals freshly built baseline; still open 98.348625%. Structural diagnosis: Apply the newly proven projection lifetime lever to the scan: target scale is an anonymousf0 load and each input coordinate coalesces through its use. Test removal of named real scale/product/component temporaries with exact typed field accesses, no arithmetic reassociation.
|
||||
- inline the scale field into both real offset products: (2, 17) structural/positional; instructions 109/109; restored.
|
||||
- inline the dot/cross component products into the two real offset initializers: (4, 22) structural/positional; instructions 109/109; restored.
|
||||
- inline candidate input fields directly into both projected positions: (0, 13) structural/positional; instructions 109/109; restored.
|
||||
- combine anonymous scale and candidate coordinate inputs: (0, 8) structural/positional; instructions 109/109; restored.
|
||||
- combine anonymous product and candidate coordinate inputs: (2, 13) structural/positional; instructions 109/109; restored.
|
||||
- inline all scale/product/coordinate inputs: (0, 0) structural/positional; instructions 109/109; candidate kept.
|
||||
|
||||
## Round9 exact single-object scan candidate and gate
|
||||
select_1obj_first: after structural const/operand trials and declsearch, the projection lifetime finding led to removing named scale, dot/cross component and candidate x/y temporaries. Direct typed field expressions and direct candidate-array loop endpoint recover every target color. Final109/109 instructions/ctxdiff0, exact-name objdiff100.0%; projection remains19/19/ctxdiff0. No extra memory objects/volatile/asm or raw offset casts.
|
||||
All-unit quick authority gate GATE PASS: correct DOL hash; pools identical;0 regressions/forbidden/readability warnings. SD122/129 and Address90/94 unchanged. KPAD22->23/29; round baseline21->23, code6756->7268/13056 (+512), all data8032/8032 unchanged.
|
||||
Read-only origin dependency audit: KPAD dependencies and all owned function symbol definitions are unchanged from f7b1b9b0. Scene dependency changes only rename unrelated fields/getters at unchanged offsets or add IPL_CHANNEL_SELECT_CPP blocks (inactive in both owned scene TUs); owned source is unchanged remotely. No duplicated remote function match found. No symbols.txt changes made locally.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon
|
||||
Fetch origin/main 6f49df32b3d1be83a41250c810670894ebe27efe. Initial assembly diagnosis: (2, 35) structural/positional differences; instructions 101/101
|
||||
Remote source equals freshly built baseline; still open 97.27723%. Structural diagnosis: Apply two newly exact SDK lifetime reconstructions after the extended declaration search plateau17: remove real named field/product/interpolation temporaries so anonymous expressions can coalesce. Preserve the original floating multiplication/addition grouping, calls, guards and each object-field write.
|
||||
- read normal components directly in their real products: (2, 35) structural/positional; instructions 101/101; restored.
|
||||
- read the old horizon axis directly in its interpolation expressions: (2, 28) structural/positional; instructions 101/101; restored.
|
||||
- inline the actual first dot-product component: (2, 35) structural/positional; instructions 101/101; restored.
|
||||
- inline the blend and X-delta subexpressions: (2, 35) structural/positional; instructions 101/101; restored.
|
||||
- read the old circle components directly in their interpolated results: (2, 33) structural/positional; instructions 101/101; restored.
|
||||
- combine normal, axis and dot-product anonymous inputs: (0, 13) structural/positional; instructions 101/101; restored.
|
||||
- combine normal, axis, dot, blend and delta anonymous inputs: (0, 21) structural/positional; instructions 101/101; restored.
|
||||
- combine every actual field/product/interpolation input: (0, 19) structural/positional; instructions 101/101; restored.
|
||||
- write circle interpolation results directly before deriving their true residuals: (2, 35) structural/positional; instructions 101/101; restored.
|
||||
- combine all anonymous inputs with direct circle result stores: (0, 19) structural/positional; instructions 101/101; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon
|
||||
Fetch origin/main b33a493cec82cb6dbb068d07e1ad17c6d0204e32. Initial assembly diagnosis: (2, 35) structural/positional differences; instructions 101/101
|
||||
Remote source equals freshly built baseline; still open 97.27723%. Structural diagnosis: New anonymous normal/axis/product inputs lower35 to13 exact positional differences with zero decoded structural difference; revisit register-only last declsearch only on this improved readable source, preserving all initialized assignments and rounding.
|
||||
- Anonymous field/product declsearch: declaration block: | f32 magnitude; | f32 normalizedX; | f32 normalizedY; | f32 blend; | f32 projectedX; | f32 smoothing; | f32 deltaX; | f32 nextX; | f32 nextY; | f32 normalized; | f32 unitX; | f32 oldCircleX; | f32 oldCircleY; | f32 unitY; | f32 circleX; | f32 deltaCircleX; | f32 circleY; | f32 deltaCircleY; | start (0, 13) | improved (0, 11) | improved (0, 9) | improved (0, 3) | best (0, 3) after 650 builds; kept in source: | f32 magnitude; | f32 normalizedX; | f32 normalizedY; | f32 blend; | f32 projectedX; | f32 smoothing; | f32 deltaX; | f32 nextX; | f32 nextY; | f32 normalized; | f32 oldCircleY; | f32 circleX; | f32 oldCircleX; | f32 unitY; | f32 unitX; | f32 deltaCircleX; | f32 circleY; | f32 deltaCircleY; |
|
||||
Nonexact anonymous-field/product declaration candidate restored; raw authority (0, 3).
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADRead
|
||||
Fetch origin/main b33a493cec82cb6dbb068d07e1ad17c6d0204e32. Initial assembly diagnosis: (11, 89) structural/positional differences; instructions 459/459
|
||||
Remote source equals freshly built baseline; still open 97.52723%. Structural diagnosis: Raw-copy target computes the output cursor before loading the ring index, whereas prior pointer-first grouping retained index computation outside the cursor scope and enlarged the frame. New actual cursor/index scope ordering and fewer named count/index lifetimes preserve the complete copy and calibration logic.
|
||||
- compute the copy cursor first and the actual ring index inside its scope: (40, 282) structural/positional; instructions 459/459; restored.
|
||||
- combine cursor/index scope ordering with anonymous ring count loading: build failed libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 1454: calc_button_repeat(kpad, device, ringCount); # Error: ^^^^^^^^^ # (10140) undefined identifier 'ringCount' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
|
||||
- reuse the actual later sample-count variable in the raw-copy loop: (40, 282) structural/positional; instructions 459/459; restored.
|
||||
- combine cursor/index scope with both anonymous and reused count values: build failed libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 1453: calc_button_repeat(kpad, device, ringCount); # Error: ^^^^^^^^^ # (10140) undefined identifier 'ringCount' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable
|
||||
Fetch origin/main b33a493cec82cb6dbb068d07e1ad17c6d0204e32. Initial assembly diagnosis: (14, 45) structural/positional differences; instructions 250/250
|
||||
Remote source equals freshly built baseline; still open 94.82%. Structural diagnosis: Distance filter target multiplies its weight in place in f2 then produces distance delta in f1. Remove the named next-value local and use the stored true dist_vec field before its speed/position updates; test direct geometric expressions without changing operation grouping.
|
||||
- derive distance speed from the actual stored delta after an in-place gain product: (14, 43) structural/positional; instructions 250/250; restored.
|
||||
- combine anonymous stored distance delta with the explicit magnitude sign branch: (14, 43) structural/positional; instructions 250/250; restored.
|
||||
- combine anonymous distance delta with direction-first rotation products: (12, 38) structural/positional; instructions 250/250; restored.
|
||||
- Anonymous-field/product horizon best3 diagnosis: [(44, ('fmuls', 'f5, f8, f6'), ('fmuls', 'f8, f8, f6')), (47, ('fmuls', 'f2, f5, f2'), ('fmuls', 'f2, f8, f2')), (48, ('fmuls', 'f0, f5, f0'), ('fmuls', 'f0, f8, f0'))]. Temporary diagnosis source restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon
|
||||
Fetch origin/main e3457d11a22a9f0d8300daed615914fb230bea7d. Initial assembly diagnosis: (2, 35) structural/positional differences; instructions 101/101
|
||||
Remote source equals freshly built baseline; still open 97.27723%. Structural diagnosis: Remaining3 instructions in the anonymous-field/product best declaration candidate all identify the same structural temporary boundary: target overwrites magnitudef8 with magnitude*blend, source creates independent smoothingf5. Reuse the real magnitude as the interpolation weight after its normalization work is finished.
|
||||
- reuse magnitude in place for the true interpolation weight in the best3 real-local context: (0, 0) structural/positional; instructions 101/101; candidate kept.
|
||||
|
||||
## Round9 exact acceleration horizon candidate and gate
|
||||
calc_acc_horizon: anonymous normal/old-axis/first-product inputs reduce35 colors to13; declaration search reduces13->3. All three remaining instructions prove the same temporary difference: target overwrites magnitude f8 with magnitude*blend, while source creates smoothing f5. Reusing magnitude as its interpolation weight recovers101/101 instructions and ctxdiff0/exact-name objdiff100.0%. No arithmetic reassociation or changed object writes/calls/guards. Projection and single-object scan remain exact.
|
||||
All-unit quick gate GATE PASS, correct DOL hash, identical pools,0 regressions/forbidden/readability warnings. SDK23->24/29; round21->24, code6756->7672/13056 (+916), data8032/8032. SD122/129, Address90/94 and their code/data totals unchanged.
|
||||
KPADRead failed anonymous-ring-count trials diagnosed: ringCount also supplies the full batch elapsed count to calc_button_repeat after available is capped by caller count. It must retain the original batch count; replacing it with available would change behavior and was not done. Failed compilations do not count toward the three successful source attempts.
|
||||
|
||||
## Round9 final full clean gate and remaining-function audit
|
||||
Full non-quick gate across all3 units GATE PASS; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d; all pools identical;0 regressions/forbidden/readability warnings; every owned data section100%. No data symbol rename or extent correction needed/made. All open target function extents end before/equal the next symbol; no adjacent same-slot word/single/double stack store/reload pair justified new volatile. No byte16/byte8 mask mismatch justified widening.
|
||||
src/scene/sdChannelSelect/iplSDChannelSelect: exact 122 ->122/129; code 29412 ->29412/33828; data 2960 ->2960/2960.
|
||||
src/scene/address/iplAddressEdit: exact 90 ->90/94; code 23044 ->23044/27112; data 2560 ->2560/2560.
|
||||
libs/RVL_SDK/src/kpad/KPAD: exact 21 ->24/29; code 6756 ->7672/13056; data 8032 ->8032/8032.
|
||||
MAX round produced 3 new exact functions; 98 logged successfully built distinct source variants plus1720 declaration-search builds (failed builds excluded). All16 remaining functions have >=3 distinct successfully built source variants in this round. Every nonexact source/header trial was restored; only the newly exact SDK function bodies and this log differ from f7b1b9b0. Unsupported NWC24-error input contract remains unproved; initialized fallback retained.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv 97.73972%; 3 successful distinct source trials; 145/146 frame0x20; missing BS2-manager body reload; switch/for-loop polling and update-reference scopes leave gap.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.81188%; 6 successful distinct source trials; 101/101 frame0x40; counter add/store and first threshold load schedule differ4; postincrement-result helpers and const formal pointer variables unchanged; copied count adds4 instructions.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.833336%; 6 successful distinct source trials; 102/102 frame0x40; counter add/store and first threshold load schedule differ4; old-count helpers/const formals unchanged; copied count adds4 instructions.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.29365%; 3 successful distinct source trials; 126/126 frame0x60; entry indexing and counter/threshold lifetimes; title-ID hoist plus pointer-row/unsigned channel index views leave7; nonexact restored.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.55125%; 3 successful distinct source trials; 361/361 frame0x80; four repeated counter/threshold schedules differ16; named previous counts, comma postincrement and old-count-return helper unchanged.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv 99.65714%; 6 successful distinct source trials; 35/35 frame0x10; heap/manager argument loads reversed; pointer-cell getter const references and real flush-request aggregates all retain2.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj 93.4721%; 3 successful distinct source trials; 233/233 frame0xe0; framebuffer conversion and scissor/projection coordinate lifetimes; dimension references retain68, shared width230 instructions, bounds aggregate251.
|
||||
- src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv 97.44634%; 3 successful distinct source trials; 820/820 frame0x60; target keeps two text addresses across lookups and has one allocation guard; ordinary new with mutable pointer/array/String views remains818/820; restored.
|
||||
- src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv 88.03571%; 3 successful distinct source trials; 82/84 frame0x420; target saves both text pointers before virtual pane lookups; mutable pointer/array/String views still82/84; rematerialization gap remains.
|
||||
- src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv 99.42105%; 6 successful distinct source trials; 38/38 frame0x10; resolved wcsncpy source/destination LEAs reversed; mutable request fields/constructor, actual array addresses and const array-reference getter retain2.
|
||||
- src/scene/address/iplAddressEdit set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err 98.666664%; 3 successful distinct source trials; 76/75 frame0x60; target leaves message ID undefined on unsupported errors; initialized aggregate76, exhaustive safe switch73, grouped safe if65; safe fallback retained.
|
||||
- libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight 99.23077%; 6 successful distinct source trials; 52/52 frame0x30; named-zero and center-subobject view fixes floating colors but leaves3 array-base colors;146-build declsearch plateau3; const/mutable center scalar helpers13 differences.
|
||||
- libs/RVL_SDK/src/kpad/KPAD read_kpad_acc 98.15%; 3 successful distinct source trials; 400/400 frame0x50; smoothing/guard reconstruction reaches one cmpwi5 instead of targetcmplwi5; unsigned predicate switch403, nested switch2 differences, format-relative switch1; restored.
|
||||
- libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable 94.82%; 9 successful distinct source trials; 250/250 frame0x20; distance-weight and late rotation geometry load/product schedules; anonymous stored distance delta/direction-first products lower to38; no exact candidate.
|
||||
- libs/RVL_SDK/src/kpad/KPAD KPADRead 97.52723%; 5 successful distinct source trials; 459/459 frame0xc0; raw-copy cursor endpoint and ring-index/load schedules plus gravity x/y order; complete copy helper459 with250 differences, gravity product locals83, for-loop458; cursor/index scope459 instructions/282 differences; removing full batch count fails because repeat timing still uses it; nonexact restored.
|
||||
- libs/RVL_SDK/src/kpad/KPAD KPADInit 96.51351%; 3 successful distinct source trials; 185/185 frame0x90; delay constant/saved-float/matrix colors; repeat initializer and zero/one order unchanged81, matrix pointer loop scope improves65; restored.
|
||||
New exact names: KPADGetProjectionPos, calc_acc_horizon, select_1obj_first.
|
||||
Final full-gate authority lines:
|
||||
```
|
||||
[src/scene/sdChannelSelect/iplSDChannelSelect] instruction-exact functions: 122/129
|
||||
[src/scene/address/iplAddressEdit] instruction-exact functions: 90/94
|
||||
[libs/RVL_SDK/src/kpad/KPAD] instruction-exact functions: 24/29
|
||||
GATE PASS
|
||||
```
|
||||
Gate-passing source commits: 459cc944 (projection), 021a0466 (single-object scan), b7d4457c (acceleration horizon). Final clean build retains all3 exact matches and every previous exact function. Only libs/RVL_SDK/src/kpad/KPAD.c and this attempts log changed.
|
||||
|
||||
## Round10 MAX continuation baseline and acceptance gates
|
||||
Fresh source baseline d78210528f882407ff363d4a112114670a216ce3. Read AGENTS.md; no subagents or remote writes. Pools first: SDK identical0 strings, SD identical101, Address identical57. Source trials must preserve pool and prior exact functions; only instruction-exact plus exact-name objdiff100 candidates may be retained/committed after all-unit quick gate. Final clean all-unit gate and three successfully built distinct source attempts per remaining function required. Failed compilations excluded.
|
||||
libs/RVL_SDK/src/kpad/KPAD baseline {"fuzzy_match_percent": 98.81893, "total_code": "13056", "matched_code": "7672", "matched_code_percent": 58.762253, "total_data": "8032", "matched_data": "8032", "matched_data_percent": 100.0, "total_functions": 29, "matched_functions": 24, "matched_functions_percent": 82.75862, "total_units": 1}
|
||||
src/scene/sdChannelSelect/iplSDChannelSelect baseline {"fuzzy_match_percent": 99.582596, "total_code": "33828", "matched_code": "29412", "matched_code_percent": 86.945724, "total_data": "2960", "matched_data": "2960", "matched_data_percent": 100.0, "total_functions": 129, "matched_functions": 122, "matched_functions_percent": 94.57364, "total_units": 1}
|
||||
src/scene/address/iplAddressEdit baseline {"fuzzy_match_percent": 99.52479, "total_code": "27112", "matched_code": "23044", "matched_code_percent": 84.995575, "total_data": "2560", "matched_data": "2560", "matched_data_percent": 100.0, "total_functions": 94, "matched_functions": 90, "matched_functions_percent": 95.74468, "total_units": 1}
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. Initial assembly diagnosis: (0, 7) structural/positional differences; instructions 52/52
|
||||
Remote source equals freshly built baseline; still open 99.23077%. Structural diagnosis: Target/ours 52 instructions and frame0x30; width/height squared and zero local lifetime differ in four floating colors and array-base uses r4 instead of target r3 in three instructions. No branch or arithmetic difference. Build genuine shorter squared/negative-height lifetimes and readonly pointer definitions before register-only search; original target PSQ decoded and ctxdiff recorded.
|
||||
- compute the two real squared dimensions directly in the diagonal sum: (0, 3) structural/positional; instructions 52/52; restored.
|
||||
- negate sensor height directly in its real center-field store: (1, 14) structural/positional; instructions 52/52; restored.
|
||||
Trial harness diagonal-sum transform omitted its Python return; aborted before writing source, corrected, not counted as a source attempt. Remote dependency audit d7821052->26d7e1e0: only configure.py switches unrelated already-matched wprintf to Matching; owned source, headers and symbol definitions unchanged.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. Initial assembly diagnosis: (0, 7) structural/positional differences; instructions 52/52
|
||||
Remote source equals freshly built baseline; still open 99.23077%. Structural diagnosis: Target/ours 52 instructions and frame0x30; width/height squared and zero local lifetime differ in four floating colors and array-base uses r4 instead of target r3 in three instructions. No branch or arithmetic difference. Build genuine shorter squared/negative-height lifetimes and readonly pointer definitions before register-only search; original target PSQ decoded and ctxdiff recorded.
|
||||
- inline only the real diagonal sum into sqrt: (0, 0) structural/positional; instructions 52/52; candidate kept.
|
||||
|
||||
## Round10 exact sensor-height candidate and gate
|
||||
KPADSetSensorHeight: target has the diagonal sum as an anonymous sqrt input; named-zero/squared-height order plus removal of the real diagonal-sum local makes the array-base register reuse match as well. 52/52 instructions, frame0x30, ctxdiff0, exact-name objdiff100.0%; pool identical. All-unit quick gate GATE PASS, correct DOL SHA1,0 regressions/forbidden/readability warnings. SDK24->25/29; code7672->7880/13056; data8032/8032 unchanged. SD122/129 and Address90/94 unchanged. Only the exact SDK function and attempts log changed; no headers or data-symbol edits.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD read_kpad_acc
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. Initial assembly diagnosis: (16, 66) structural/positional differences; instructions 400/400
|
||||
Remote source equals freshly built baseline; still open 98.15%. Structural diagnosis: 400/400 frame0x50; smoothing magnitude/delta boundaries and split error/device guards reduce the old mismatch to a single final switch cmpwi5 versus target cmplwi5. Try unsigned relational guards and branch-to-accepted loop forms on that complete readable reconstruction, preserving all unsupported-format returns.
|
||||
- bound the valid fallback format with unsigned relational guards: (10, 195) structural/positional; instructions 401/400; restored.
|
||||
- dispatch each accepted format through a single-pass loop with two break arms: (10, 194) structural/positional; instructions 399/400; restored.
|
||||
- use a looping fallback switch whose accepted arm exits the loop: (15, 198) structural/positional; instructions 401/400; restored.
|
||||
- write the primary and fallback cases as exclusive unsigned bounds: (11, 200) structural/positional; instructions 402/400; restored.
|
||||
- handle the fallback format in a one-case switch followed by a primary-format guard: (13, 196) structural/positional; instructions 399/400; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. Initial assembly diagnosis: (14, 45) structural/positional differences; instructions 250/250
|
||||
Remote source equals freshly built baseline; still open 94.82%. Structural diagnosis: 250/250 frame0x20; target distance weight is updated in place and late geometry coalesces direction products through their sums. Test real Vec2 rotation/midpoint boundaries, anonymous rotation or midpoint values, and direct normal-component input lifetimes before declaration search. Retain original operation grouping and every object-field write.
|
||||
- hold the true dot/cross rotation in a Vec2 local: build failed lang=c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 963: f32 scaleX = 0.5f * (kpad->dpdState.candidates[0].x + kpad->dpdState.candidates[1].x); # Error: ^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
|
||||
- evaluate the actual Vec2 cross coordinate before its dot coordinate: build failed lang=c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 963: f32 scaleX = 0.5f * (kpad->dpdState.candidates[0].x + kpad->dpdState.candidates[1].x); # Error: ^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
|
||||
- inline midpoint x and y into both actual geometric products: (16, 39) structural/positional; instructions 250/250; restored.
|
||||
- inline the dot rotation expression into its actual geometric products: (19, 45) structural/positional; instructions 250/250; restored.
|
||||
- inline both dot and cross rotation expressions into their geometric products: (10, 23) structural/positional; instructions 250/250; restored.
|
||||
- inline all rotation and midpoint expressions: (12, 35) structural/positional; instructions 250/250; restored.
|
||||
- read normal components through a const subobject view: (12, 38) structural/positional; instructions 250/250; restored.
|
||||
- combine a readonly normal view with anonymous midpoint products: (16, 39) structural/positional; instructions 250/250; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADRead
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. Initial assembly diagnosis: (11, 89) structural/positional differences; instructions 459/459
|
||||
Remote source equals freshly built baseline; still open 97.52723%. Structural diagnosis: 459/459 frame0xc0; copy cursor uses target statuses+available then decrement, source (available-1) scale before pointer-add. Ring count is read from an actual u8 field, never changed and still supplies repeat elapsed count; test safe byte/halfword local widths, real cursor lifetime sharing, and the full copy cursor endpoint before declaration search.
|
||||
- keep the actual full batch count in its byte-width local: (11, 89) structural/positional; instructions 459/459; restored.
|
||||
- keep the actual full batch count widened to a halfword local: (11, 89) structural/positional; instructions 459/459; restored.
|
||||
- preserve the nonnegative wrapping ring index as an unsigned local: (12, 89) structural/positional; instructions 459/459; restored.
|
||||
- use an end cursor and copy into the preceding real status slot: (75, 284) structural/positional; instructions 459/459; restored.
|
||||
- reuse the actual later output cursor for the initial raw-copy loop: (46, 276) structural/positional; instructions 459/459; restored.
|
||||
- combine a byte batch count with the real end-cursor copy: (75, 284) structural/positional; instructions 459/459; restored.
|
||||
- combine a halfword batch count and shared output cursor: (46, 276) structural/positional; instructions 459/459; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. Initial assembly diagnosis: (14, 45) structural/positional differences; instructions 250/250
|
||||
Remote source equals freshly built baseline; still open 94.82%. Structural diagnosis: Anonymous rotation inputs improve45 to23 raw differences with unchanged250 instructions. Distance target coalesces the original quotient f2 into its absolute interpolation weight: reuse the real value local after deriving dx, preserving its original zero-validity store. Test combined anonymous-rotation and actual weight reuse before registers.
|
||||
- reuse the distance quotient local for its actual absolute filtering weight: (14, 43) structural/positional; instructions 250/250; restored.
|
||||
- combine distance-value reuse with anonymous dot/cross rotation inputs: (10, 23) structural/positional; instructions 250/250; restored.
|
||||
- fix C89 leading declarations for a real Vec2 rotation local: build failed c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 961: scaleX = 0.5f * (kpad->dpdState.candidates[0].x + kpad->dpdState.candidates[1].x); # Error: ^^^^^^ # (10140) undefined identifier 'scaleX' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
|
||||
- combine the real Vec2 rotation and distance weight reuse: build failed c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 960: scaleX = 0.5f * (kpad->dpdState.candidates[0].x + kpad->dpdState.candidates[1].x); # Error: ^^^^^^ # (10140) undefined identifier 'scaleX' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
|
||||
- reuse distance weight and inline midpoint inputs as well: (12, 35) structural/positional; instructions 250/250; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADInit
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. Initial assembly diagnosis: (9, 81) structural/positional differences; instructions 185/185
|
||||
Remote source equals freshly built baseline; still open 96.51351%. Structural diagnosis: 185/185 frame0x90; target keeps zero/one and controller/matrix values in different saved registers and computes the repeat-delay constant earlier. Negative-sine narrowing coalesces to target f0 versus named rotation result f2. Test anonymous true trig result stores, matrix lifetime/representation, and loop-local calibration temporaries before register search.
|
||||
- store each actual trig result directly into its matrix element: (13, 86) structural/positional; instructions 185/185; restored.
|
||||
- combine direct trig stores with a controller-loop matrix pointer scope: (13, 70) structural/positional; instructions 185/185; restored.
|
||||
- keep the actual width height and diagonal calibration locals inside their loop: (9, 81) structural/positional; instructions 185/185; restored.
|
||||
- view the real rotation matrix through the SDK Mtx element layout: build failed contract off -lang=c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 1530: initial_rotation_(*matrix)[0][0] = one; # Error: ^ # (10377) illegal operands 'int' [ 'int' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
|
||||
- combine local calibration and anonymous trig results: (13, 86) structural/positional; instructions 185/185; restored.
|
||||
- combine typed matrix elements and anonymous trig results: build failed contract off -lang=c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 1529: initial_rotation_(*matrix)[0][0] = one; # Error: ^ # (10377) illegal operands 'int' [ 'int' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. Initial assembly diagnosis: (14, 45) structural/positional differences; instructions 250/250
|
||||
Remote source equals freshly built baseline; still open 94.82%. Structural diagnosis: Anonymous rotation inputs improve45 to23 raw differences with unchanged250 instructions. Distance target coalesces the original quotient f2 into its absolute interpolation weight: reuse the real value local after deriving dx, preserving its original zero-validity store. Test combined anonymous-rotation and actual weight reuse before registers.
|
||||
- fix C89 leading declarations for a real Vec2 rotation local: (62, 136) structural/positional; instructions 252/250; restored.
|
||||
- combine the real Vec2 rotation and distance weight reuse: (62, 136) structural/positional; instructions 252/250; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADInit
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. Initial assembly diagnosis: (9, 81) structural/positional differences; instructions 185/185
|
||||
Remote source equals freshly built baseline; still open 96.51351%. Structural diagnosis: Trig and geometry structural trials preserve185 instructions but leave temporary rounding/register schedules. Target negative sine remains double until its actual field store. Test that real precision/lifetime boundary and the corrected exact SDK matrix layout before final declaration permutations. Failed C89/matrix harness transforms are excluded from successful trial counts.
|
||||
- retain negative sine at math-library precision until its real float matrix store: (9, 80) structural/positional; instructions 185/185; restored.
|
||||
- retain every true trig result at library precision until the float store: (9, 80) structural/positional; instructions 185/185; restored.
|
||||
- combine a double negative-sine result and controller-loop matrix scope: (9, 64) structural/positional; instructions 185/185; restored.
|
||||
- access actual matrix rows and columns through Mtx: (9, 81) structural/positional; instructions 185/185; restored.
|
||||
- combine library-precision sine and SDK typed matrix elements: (9, 80) structural/positional; instructions 185/185; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. Initial assembly diagnosis: (4, 39) structural/positional differences; instructions 145/146
|
||||
Remote source equals freshly built baseline; still open 97.73972%. Structural diagnosis: Target146 instructions/frame0x20 versus ours145; target reloads the BS2 manager in the polling body while ours reuses the condition pointer. Calls and literal pool already agree. Test actual polling pointer scope and loop exit boundaries before any register search; no unjustified volatile.
|
||||
- retain the actual polling manager as a for-loop condition value: (6, 21) structural/positional; instructions 148/146; restored.
|
||||
- use explicit polling and ready labels for the same loop condition: (9, 40) structural/positional; instructions 145/146; restored.
|
||||
- bind the actual polling state reference in the loop condition: (9, 40) structural/positional; instructions 145/146; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 101/101
|
||||
Remote source equals freshly built baseline; still open 97.81188%. Structural diagnosis: Target and source have identical101/102 instruction counts and frame0x40; the only four differences are counter add/store and first threshold load scheduling. New source lifetime tests qualify the actual title-name input, give its output address a real cursor local, and group the escaped page/channel outputs in their true stack order. No widening, volatile or alias-type violations.
|
||||
- use a const title-name input at the ordinary name-copy boundary: (2, 4) structural/positional; instructions 101/101; restored.
|
||||
- give the real title-name output address its own local lifetime: (2, 4) structural/positional; instructions 101/101; restored.
|
||||
- group the actual page and channel lookup outputs as a ChannelLocation: (16, 17) structural/positional; instructions 101/101; restored.
|
||||
- combine readonly name input and named output cursor: (2, 4) structural/positional; instructions 101/101; restored.
|
||||
- combine actual location outputs and readonly title-name input: (16, 17) structural/positional; instructions 101/101; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 102/102
|
||||
Remote source equals freshly built baseline; still open 97.833336%. Structural diagnosis: Target and source have identical101/102 instruction counts and frame0x40; the only four differences are counter add/store and first threshold load scheduling. New source lifetime tests qualify the actual title-name input, give its output address a real cursor local, and group the escaped page/channel outputs in their true stack order. No widening, volatile or alias-type violations.
|
||||
- use a const title-name input at the ordinary name-copy boundary: (2, 4) structural/positional; instructions 102/102; restored.
|
||||
- give the real title-name output address its own local lifetime: (2, 4) structural/positional; instructions 102/102; restored.
|
||||
- group the actual page and channel lookup outputs as a ChannelLocation: (16, 17) structural/positional; instructions 102/102; restored.
|
||||
- combine readonly name input and named output cursor: (2, 4) structural/positional; instructions 102/102; restored.
|
||||
- combine actual location outputs and readonly title-name input: (16, 17) structural/positional; instructions 102/102; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. Initial assembly diagnosis: (2, 22) structural/positional differences; instructions 126/126
|
||||
Remote source equals freshly built baseline; still open 97.29365%. Structural diagnosis: 126/126 frame0x60; a real titleId hoist previously reduced22 to7 differences, with three channel-address operand differences and four postcopy counter/threshold schedules. New contiguous channel-row indexing order, real name input/output lifetimes, and title-state scope preserve the complete ordered scan.
|
||||
- use index-first subscripting of the actual typed channel row: (2, 7) structural/positional; instructions 126/126; restored.
|
||||
- use a readonly pointer to the complete channel row array: (2, 7) structural/positional; instructions 126/126; restored.
|
||||
- combine the hoisted title value with readonly collected-name input: (2, 7) structural/positional; instructions 126/126; restored.
|
||||
- combine index-first row addressing and a real name output cursor: (2, 7) structural/positional; instructions 126/126; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. Initial assembly diagnosis: (8, 16) structural/positional differences; instructions 361/361
|
||||
Remote source equals freshly built baseline; still open 97.55125%. Structural diagnosis: 361/361 frame0x80; four identical counter/threshold schedules differ16 total. Test the same real name-input/output lifetime boundaries, and anonymous cache/lookup title values preserving every special-channel ordering branch.
|
||||
- make each actual special-channel collected-name input readonly: (8, 16) structural/positional; instructions 361/361; restored.
|
||||
- name each real special-channel name output cursor before memcpy: (8, 16) structural/positional; instructions 361/361; restored.
|
||||
- combine readonly collected-name inputs and named output cursors: (8, 16) structural/positional; instructions 361/361; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv
|
||||
Fetch origin/main 805e84045c82629c645e9ef1787c30d2bc33b5e7. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 35/35
|
||||
Remote source equals freshly built baseline; still open 99.65714%. Structural diagnosis: 35/35 frame0x10; only heap r4 and save-manager r3 argument-load order differs. Test actual returned file/output-field lifetimes and readonly pointee reference getters scoped to this TU. Keep the flag setter before heap/manager loads, every following store/call unchanged, and no volatile.
|
||||
- name the actual returned asynchronous save file before its field store: (2, 2) structural/positional; instructions 35/35; restored.
|
||||
- bind the real asynchronous file output field by reference at the call: (2, 2) structural/positional; instructions 35/35; restored.
|
||||
- call through actual manager and heap object references at the flush boundary: (2, 2) structural/positional; instructions 35/35; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj
|
||||
Fetch origin/main 805e84045c82629c645e9ef1787c30d2bc33b5e7. Initial assembly diagnosis: (23, 68) structural/positional differences; instructions 233/233
|
||||
Remote source equals freshly built baseline; still open 93.4721%. Structural diagnosis: 233/233 frame0xe0; target keeps projection width in saved f29, source retains widthScale there; framebuffer conversion scheduling and matrix temporary colors follow from those lifetimes. Test a projection-width local scoped only to the transformed branch, anonymous matrix bound quotients, and direct quotient use before register-only last.
|
||||
- keep a branch-local projection width distinct from final scissor width: (23, 68) structural/positional; instructions 233/233; restored.
|
||||
- combine branch-local projection width with direct horizontal quotient use: (36, 71) structural/positional; instructions 233/233; restored.
|
||||
- inline the actual top projection quotient into its matrix bound: (23, 67) structural/positional; instructions 233/233; restored.
|
||||
- inline all actual matrix bound quotients while retaining each final bound: (38, 71) structural/positional; instructions 233/233; restored.
|
||||
- combine anonymous matrix quotients and branch-local projection width: (38, 71) structural/positional; instructions 233/233; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv
|
||||
Fetch origin/main 805e84045c82629c645e9ef1787c30d2bc33b5e7. Initial assembly diagnosis: (19, 323) structural/positional differences; instructions 820/820
|
||||
Remote source equals freshly built baseline; still open 97.44634%. Structural diagnosis: 820/820 frame0x60; target has one balloon allocation guard and keeps both text input addresses across virtual pane lookups. Ordinary new recovers the real allocation boundary but leaves818/820 instructions. Test pointer-definition constness, a String pointer receiver reused across the real text reads, and an actual name/display input aggregate; keep literal token order.
|
||||
- combine ordinary balloon allocation and a const name-pointer definition: (23, 331) structural/positional; instructions 818/820; restored.
|
||||
- combine ordinary allocation and an actual String pointer used for both text inputs: (23, 331) structural/positional; instructions 818/820; restored.
|
||||
- combine ordinary allocation and a real pair of readonly name/display input addresses: (23, 331) structural/positional; instructions 818/820; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv
|
||||
Fetch origin/main 805e84045c82629c645e9ef1787c30d2bc33b5e7. Initial assembly diagnosis: (10, 68) structural/positional differences; instructions 82/84
|
||||
Remote source equals freshly built baseline; still open 88.03571%. Structural diagnosis: 82/84 frame0x420; target computes text LEAs before virtual lookups and retains them in r29, source rematerializes them afterwards. Test const pointer definitions and the real copied friend-info/String object view lifetimes; no extra buffers or dummy objects.
|
||||
- give both existing readonly text pointers const definitions: (10, 68) structural/positional; instructions 82/84; restored.
|
||||
- reuse a String pointer receiver for every real string operation: (10, 39) structural/positional; instructions 83/84; restored.
|
||||
- read the actual copied friend-info object through a named const reference: (14, 71) structural/positional; instructions 80/84; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv
|
||||
Fetch origin/main 805e84045c82629c645e9ef1787c30d2bc33b5e7. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 38/38
|
||||
Remote source equals freshly built baseline; still open 99.42105%. Structural diagnosis: 38/38 frame0x10; target builds readonly name-source r4 before global destination r3, source inverts those two LEAs. Source/destination fields and wcsncpy relocation are proven. Test a const String pointer receiver, actual typed name-array pointer, and a source-array reference with copy length derived from the true ten-character limit; no raw offsets or pinned data.
|
||||
- read the copy source through a const String pointer definition: (2, 2) structural/positional; instructions 38/38; restored.
|
||||
- read the source through a pointer to the actual complete name-array type: (2, 2) structural/positional; instructions 38/38; restored.
|
||||
- bind the actual source array and derive the existing ten-character copy limit: (2, 2) structural/positional; instructions 38/38; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err
|
||||
Fetch origin/main 805e84045c82629c645e9ef1787c30d2bc33b5e7. Initial assembly diagnosis: (1, 30) structural/positional differences; instructions 76/75
|
||||
Remote source equals freshly built baseline; still open 98.666664%. Structural diagnosis: 76/75 frame0x60; the target message-ID register is undefined for unsupported errors. Retain the initialized server fallback. New readonly cache-object access, anonymous actual error-code formatting input, and a typed supported-message enum test legitimate source boundaries without uninitialized assumptions.
|
||||
- read the actual cache error through a typed readonly FriendListCache pointer: (1, 30) structural/positional; instructions 76/75; restored.
|
||||
- pass the actual cache error directly into its wide-format call: (1, 30) structural/positional; instructions 76/75; restored.
|
||||
- select initialized supported message values through a real enum local: (1, 30) structural/positional; instructions 76/75; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADInit
|
||||
Fetch origin/main 805e84045c82629c645e9ef1787c30d2bc33b5e7. Initial assembly diagnosis: (9, 81) structural/positional differences; instructions 185/185
|
||||
Remote source equals freshly built baseline; still open 96.51351%. Structural diagnosis: Register-only last after the logged structural/local-lifetime/operand trials. Search declaration permutations on the best newly tested readable context; keep every real initialized assignment, existing exact function and every field/call unchanged. Decode PSQ and FP comparisons; raw ctxdiff and objdiff remain authority.
|
||||
- Declaration-search context /tmp/fz16r10.init.more.2.c: (9, 64) structural/positional differences; instructions 185/185; initialized real repeated-delay value is40000, with all field writes retained.
|
||||
- KPADInit register-only last declsearch: declaration block: | KPADInside* kpad; | f32 distanceValue; | f32 sensorDistance; | f32 rotationElement; | f64 negativeSine; | f32 referenceWidth; | f32 referenceHeight; | f32 objectInterval; | f32 zero; | f32 degreesToRadians; | f32 one; | u32 i; | s32 chan; | BOOL enabled; | u16 repeatDelay; | start (6, 64) | improved (6, 53) | improved (6, 50) | best (6, 50) after 312 builds; kept in source: | f32 referenceHeight; | f32 objectInterval; | f32 sensorDistance; | f32 rotationElement; | f64 negativeSine; | f32 referenceWidth; | KPADInside* kpad; | f32 distanceValue; | f32 zero; | f32 degreesToRadians; | f32 one; | u32 i; | s32 chan; | BOOL enabled; | u16 repeatDelay; |
|
||||
Nonexact declaration candidate restored; (8, 50) structural/positional differences; instructions 185/185.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADRead
|
||||
Fetch origin/main 805e84045c82629c645e9ef1787c30d2bc33b5e7. Initial assembly diagnosis: (11, 89) structural/positional differences; instructions 459/459
|
||||
Remote source equals freshly built baseline; still open 97.52723%. Structural diagnosis: New target instruction84 moves available into the real decrement counter before the ring-count clear; prior endpoint tests assigned it after that clear. Extend the real counter lifetime first, then combine statuses+available endpoint and ring-index scope. Preserve the full repeat batch count; test gravity y/x operand order only after the copy structure.
|
||||
- initialize the actual raw-copy counter before clearing the batch field: (9, 86) structural/positional; instructions 459/459; restored.
|
||||
- combine early decrement-count initialization and a statuses-plus-available endpoint: (44, 283) structural/positional; instructions 459/459; restored.
|
||||
Read cursor-scope harness omitted the extracted constant defining the old index block; aborted before source write, corrected, not counted. Real early counter assignment improved89->86/459 before the field clear.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADRead
|
||||
Fetch origin/main 805e84045c82629c645e9ef1787c30d2bc33b5e7. Initial assembly diagnosis: (11, 89) structural/positional differences; instructions 459/459
|
||||
Remote source equals freshly built baseline; still open 97.52723%. Structural diagnosis: New target instruction84 moves available into the real decrement counter before the ring-count clear; prior endpoint tests assigned it after that clear. Extend the real counter lifetime first, then combine statuses+available endpoint and ring-index scope. Preserve the full repeat batch count; test gravity y/x operand order only after the copy structure.
|
||||
- combine early counter initialization and pointer-before-ring-index scope: (40, 282) structural/positional; instructions 459/459; restored.
|
||||
- give the real copy pointer a leading declaration with the early counter scope: (40, 282) structural/positional; instructions 459/459; restored.
|
||||
- combine early counter and ring-index scope with target gravity operand order: (36, 282) structural/positional; instructions 459/459; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD read_kpad_acc
|
||||
Fetch origin/main 805e84045c82629c645e9ef1787c30d2bc33b5e7. Initial assembly diagnosis: (16, 66) structural/positional differences; instructions 400/400
|
||||
Remote source equals freshly built baseline; still open 98.15%. Structural diagnosis: Further actual inline boundary: the 400-instruction target accepts either FS format through two unsigned equality checks and a shared negative exit. A boolean support predicate may retain that positive-branch graph; compare real unsigned scalar, const sample-pointer and byte-pointer helpers after the smoothing/guard reconstruction, before registers.
|
||||
- unsigned scalar format with explicit accepted returns: (15, 204) structural/positional; instructions 404/400; restored.
|
||||
- readonly sample pointer with accepted positive returns: (15, 204) structural/positional; instructions 404/400; restored.
|
||||
- readonly format-byte pointer with accepted positive returns: (15, 204) structural/positional; instructions 404/400; restored.
|
||||
- unsigned scalar short-circuit accepted predicate: (13, 197) structural/positional; instructions 403/400; restored.
|
||||
- unsigned scalar switch returning real format support: (20, 207) structural/positional; instructions 408/400; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable
|
||||
Fetch origin/main 805e84045c82629c645e9ef1787c30d2bc33b5e7. Initial assembly diagnosis: (14, 45) structural/positional differences; instructions 250/250
|
||||
Remote source equals freshly built baseline; still open 94.82%. Structural diagnosis: Best anonymous rotation inputs lower45->23/250 while preserving0x20 frame. Target negates directionY before later rotation products and coalesces midpoint-X into the projected-Y expression. Test those actual sign/input/intermediate lifetimes, plus readonly normal inputs, on the anonymous rotation context before declaration search.
|
||||
- give the real negative direction-Y input an independent lifetime before anonymous products: (13, 34) structural/positional; instructions 250/250; restored.
|
||||
- name normal-Y then normal-X only at the late positional projection: (24, 45) structural/positional; instructions 250/250; restored.
|
||||
- reuse the midpoint-X scalar for its actual projected-Y value after projected-X is computed: (12, 35) structural/positional; instructions 250/250; restored.
|
||||
- use a readonly normal subobject view with anonymous rotation inputs: (10, 23) structural/positional; instructions 250/250; restored.
|
||||
|
||||
## Round10 final full clean gate and remaining-function audit
|
||||
Full non-quick gate across all3 units GATE PASS; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d; all pools identical;0 regressions/forbidden/readability warnings; every owned data section100%. No data symbol rename or extent correction needed/made. All open target function extents end before/equal the next symbol; no adjacent same-slot word/single/double stack store/reload pair justified new volatile. No byte16/byte8 mask mismatch justified widening.
|
||||
libs/RVL_SDK/src/kpad/KPAD: exact 24 ->25/29; code 7672 ->7880/13056; data 8032 ->8032/8032.
|
||||
src/scene/sdChannelSelect/iplSDChannelSelect: exact 122 ->122/129; code 29412 ->29412/33828; data 2960 ->2960/2960.
|
||||
src/scene/address/iplAddressEdit: exact 90 ->90/94; code 23044 ->23044/27112; data 2560 ->2560/2560.
|
||||
MAX round produced 1 new exact function; 89 logged successfully built distinct source variants plus312 declaration-search builds (failed builds excluded). All15 remaining functions have >=3 distinct successfully built source variants in this round. Every nonexact source/header trial was restored; only the newly exact SDK function bodies and this log differ from d7821052. Unsupported NWC24-error input contract remains unproved; initialized fallback retained.
|
||||
- libs/RVL_SDK/src/kpad/KPAD read_kpad_acc 98.15%; 10 successful distinct source trials; 400/400 frame0x50; smoothing/guard reconstruction has only cmpwi5 versus cmplwi5; relational401, positive single-pass399, actual support-predicate helpers403-408; restored.
|
||||
- libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable 94.82%; 15 successful distinct source trials; 250/250 frame0x20; distance weight and rotation/product schedules; anonymous rotations reduce45->23, true rotation aggregate252, normal/sign/midpoint reuse do not close gap; restored.
|
||||
- libs/RVL_SDK/src/kpad/KPAD KPADRead 97.52723%; 12 successful distinct source trials; 459/459 frame0xc0; cursor endpoint/index/counter scope and gravity operand schedules; safe u8/u16 full batch counts unchanged89, early real counter reduces86, endpoint scopes frame0xd0/282; restored.
|
||||
- libs/RVL_SDK/src/kpad/KPAD KPADInit 96.51351%; 9 successful distinct source trials; 185/185 frame0x90; repeat constant/global base and saved FP/matrix colors; actual double sine and matrix scope64, 312-build declaration search50 with6 decoded structural differences; restored.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv 97.73972%; 3 successful distinct source trials; 145/146 frame0x20; polling condition pointer is reused instead of target body reload; pointer-for-loop148, labels/reference145; restored.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.81188%; 5 successful distinct source trials; 101/101 frame0x40; four counter/threshold schedules; const name/output cursor unchanged4, true location aggregate17; restored.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.833336%; 5 successful distinct source trials; 102/102 frame0x40; four counter/threshold schedules; const name/output cursor unchanged4, location aggregate17; restored.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.29365%; 4 successful distinct source trials; 126/126 frame0x60; entry-address operand order plus counter/threshold schedule; hoisted ID and new row-array/name views remain7; restored.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.55125%; 3 successful distinct source trials; 361/361 frame0x80; four repeated count/threshold schedules differ16; readonly name and real output-cursor lifetimes unchanged; restored.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv 99.65714%; 3 successful distinct source trials; 35/35 frame0x10; heap/manager argument load order differs2; real returned-file/output-field and manager/heap reference lifetimes unchanged; restored.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj 93.4721%; 5 successful distinct source trials; 233/233 frame0xe0; framebuffer conversion/projection-width/output lifetimes; branch-local projection width68, anonymous top quotient67, anonymous four quotients71; restored.
|
||||
- src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv 97.44634%; 3 successful distinct source trials; 820/820 frame0x60; target one allocation guard and retained two text addresses; ordinary new plus const-pointer/String-pointer/actual text-input pair still818/820; restored.
|
||||
- src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv 88.03571%; 3 successful distinct source trials; 82/84 frame0x420; text pointers rematerialize after virtual lookups; const definitions82, complete String pointer83/84, copied friend reference80; restored.
|
||||
- src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv 99.42105%; 3 successful distinct source trials; 38/38 frame0x10; wcsncpy source/destination LEAs reversed; const String pointer, full source-array pointer/reference keep2; restored.
|
||||
- src/scene/address/iplAddressEdit set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err 98.666664%; 3 successful distinct source trials; 76/75 frame0x60; target leaves message ID undefined for unsupported errors; const cache, anonymous error format input and supported enum still76; initialized fallback retained.
|
||||
New exact names: KPADSetSensorHeight.
|
||||
Final full-gate authority lines:
|
||||
```
|
||||
[libs/RVL_SDK/src/kpad/KPAD] instruction-exact functions: 25/29
|
||||
[src/scene/sdChannelSelect/iplSDChannelSelect] instruction-exact functions: 122/129
|
||||
[src/scene/address/iplAddressEdit] instruction-exact functions: 90/94
|
||||
GATE PASS
|
||||
```
|
||||
Final source-isolation/remote audit: origin/main 8a07484e8aea9bdb38db258f5a6eb16347197c86 has no owned source/header/symbol changes from d7821052. SDK source differs only inside newly exact KPADSetSensorHeight; scene sources, headers, symbol metadata and configure.py unchanged locally. Nonexact trials restored. Commit64bbfbba contains the exact height match and its quick all-unit gate; this final audit records the clean full gate and89 successfully built distinct source variants plus312 declaration builds.
|
||||
|
||||
48
tools/decomp-assist/link1.attempts.md
Normal file
48
tools/decomp-assist/link1.attempts.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# 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.
|
||||
39
tools/decomp-assist/link3.attempts.md
Normal file
39
tools/decomp-assist/link3.attempts.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# 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.
|
||||
10224
tools/decomp-assist/near1.attempts.md
Normal file
10224
tools/decomp-assist/near1.attempts.md
Normal file
File diff suppressed because it is too large
Load Diff
300
tools/decomp-assist/pk2.attempts.md
Normal file
300
tools/decomp-assist/pk2.attempts.md
Normal file
@@ -0,0 +1,300 @@
|
||||
# pk2 max parked retry
|
||||
|
||||
Applied unslop and coah-voice writing passes to the required report. Worker scope is four assigned units, config data proofs, and this log. No orchestration.
|
||||
Start HEAD and origin/main: e3457d11. Clean working tree. Origin fetched under /tmp/wii-git.lock.
|
||||
Memory startup check: commands run successfully; historical bubblewrap failure is absent in this environment.
|
||||
|
||||
libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL: initial pool check: POOL IDENTICAL up to 1 (mine=1 base=1)
|
||||
libs/RevoEX/src/nwc24/NWC24Download: initial pool check: POOL IDENTICAL up to 3 (mine=3 base=3)
|
||||
libs/RVL_SDK/src/fa/driver/sd_drv: initial pool check: POOL IDENTICAL up to 46 (mine=46 base=46)
|
||||
libs/RVL_SDK/src/fa/pf_cache: initial pool check: POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
DATA AUDIT: all four assigned units already have 100% matched data in the live report; target/source data names, extents, and section scores agree. No config rename or extent change needed. pf_cache has no data sections.
|
||||
BEGIN NHTTPi_strnicmp: fetched origin/main=e3457d11a22a9f0d8300daed615914fb230bea7d; owned source differs from HEAD on remote=False; diagnosis metric=((2, 2), 51, 51)
|
||||
DIAGNOSIS NHTTPi_strnicmp: Same 0x10 frame, 51/51 instructions; only hoisted Z and zero constants exchange instruction order. No stack store/reload evidence supports volatile. Pointees already const. No extent overlap. Prior declaration permutations excluded.
|
||||
ATTEMPT NHTTPi_strnicmp: read-only scalar pointer helper makes character values immutable views; source dc64c9a66cda; objdiff=99.76471%; metric=((2, 2), 51, 51); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
ATTEMPT NHTTPi_strnicmp: conditional-expression helper instead of argument mutation; source 3dbaa1148791; objdiff=99.76471%; metric=((2, 2), 51, 51); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
ATTEMPT NHTTPi_strnicmp: strict uppercase bounds preserve ASCII interval with different comparison lowering; source 6b4412f9238d; objdiff=49.117645%; metric=((36, 50), 50, 51); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
BEGIN NHTTPi_compareToken: fetched origin/main=e3457d11a22a9f0d8300daed615914fb230bea7d; owned source differs from HEAD on remote=False; diagnosis metric=((24, 42), 44, 45)
|
||||
DIAGNOSIS NHTTPi_compareToken: Target has condition-entry loop with equality at bottom, right folding keeps shifted candidate then selects original on false; ours body-entry loop adds one branch and lacks that right selection. Target raw left byte survives in r31 for terminator check, same 0x10 frame.
|
||||
ATTEMPT NHTTPi_compareToken: condition-entry loop compares inlined folds directly; source 0e30c24d2a81; objdiff=94.62222%; metric=((7, 30), 44, 45); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
ATTEMPT NHTTPi_compareToken: fold helper takes read-only byte pointer and preserves raw input alias; source 4cc0b6297c87; objdiff=94.62222%; metric=((7, 30), 44, 45); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
ATTEMPT NHTTPi_compareToken: signed-byte read-only view with conditional fold in loop predicate; source 9466120301dc; objdiff=84.62222%; metric=((9, 44), 42, 45); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
BEGIN NHTTPi_Base64Encode: fetched origin/main=e3457d11a22a9f0d8300daed615914fb230bea7d; owned source differs from HEAD on remote=False; diagnosis metric=((71, 58), 119, 119)
|
||||
DIAGNOSIS NHTTPi_Base64Encode: 119/119 instructions, same 0x20 frame and triplet unrolling. Target signed padding compare; ours unsigned. Most differences are dependent byte loads, alphabet index fragments, and stores under char aliasing; target keeps source[1] in r10, source[2] in r7 and early first fragment live.
|
||||
ATTEMPT NHTTPi_Base64Encode: signed length and signed-byte input view tighten source alias type; source eb7a0c5a67ab; objdiff=62.42857%; metric=((69, 56), 119, 119); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
ATTEMPT NHTTPi_Base64Encode: signed-byte snapshots with explicit triplet and signed padding arithmetic; source e89377650b53; objdiff=62.781513%; metric=((47, 63), 119, 119); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
ATTEMPT NHTTPi_Base64Encode: read-only typed triplet passed to inline encoder; high fragment added before low; source cc15a48005fd; objdiff=64.35294%; metric=((43, 57), 119, 119); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
BEGIN NHTTPi_compareToken: fetched origin/main=e3457d11a22a9f0d8300daed615914fb230bea7d; owned source differs from HEAD on remote=False; diagnosis metric=((24, 42), 44, 45)
|
||||
ATTEMPT NHTTPi_compareToken: right immutable value fold and left mutating fold keep distinct inline lifetimes; source 470960bd5c07; objdiff=94.62222%; metric=((7, 30), 44, 45); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
ATTEMPT NHTTPi_compareToken: raw signed-byte terminator survives left fold; right const-value return helper; source f90da98d79f2; objdiff=69.28889%; metric=((6, 20), 45, 45); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
ATTEMPT NHTTPi_compareToken: raw unsigned left byte widens at the fold boundary and signed stop check; source cffa6f49daf0; objdiff=94.62222%; metric=((7, 30), 44, 45); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
BEGIN NWC24InitDlTask: fetched origin/main=d78210528f882407ff363d4a112114670a216ce3; owned source differs from HEAD on remote=False; diagnosis metric=((0, 31), 144, 144)
|
||||
DIAGNOSIS NWC24InitDlTask: 0x60 frame and 144/144 instructions; structural score zero. Zero/home ID/header/title/group values cycle saved registers. No volatile store-reload proof. Headers and task permission views are read-only candidates; validate alias assumptions before register search.
|
||||
ATTEMPT NWC24InitDlTask: permission boundary receives const task and cached header explicitly; source ff1390188311; objdiff=98.854164%; metric=((0, 33), 144, 144); unit code/data/functions=8140/80/25; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
ATTEMPT NWC24InitDlTask: owner components use const parse views and read-only initial header; source dadcc1f11b6b; BUILD FAILED m int -fp hardware -Cpp_exceptions off -O4,p -inline auto -pragma "cats off" -pragma "warn_notinlined off" -maxerrors 1 -nosyspath -RTTI off -fp_contract on -str reuse -DSDK_IPL -D_REVOLUTION -DMEM_MANAGER_DIRECT -i include -i include/global -i libs/MetroTRK/include -i libs/Runtime/include -i libs/MSL/include -i libs/RVL_SDK/include -i libs/RevoEX/include -i libs/NW4R/include -i libs/RVLMiddleware/eZiText/include -i libs/RVLMiddleware/TMC_JPEG/include -i libs/RVLFaceLib/include -i libs/EGG/include -i libs/OperaWWW/include -ir libs/RVL_SDK/include/private/bte -i build/43U/include -DBUILD_VERSION=0 -DVERSION_43U -i libs/RVL_SDK/include/private/bte -DNDEBUG=1 -DTARGET_RVL -ipa file -fp_contract off -lang=c -MMD -c libs/RevoEX/src/nwc24/NWC24Download.c -o build/43U/src/libs/RevoEX/src/nwc24 && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RevoEX/src/nwc24/NWC24Download.d build/43U/src/libs/RevoEX/src/nwc24/NWC24Download.d
|
||||
### mwcceppc.exe Compiler:
|
||||
# File: libs\RevoEX\src\nwc24\NWC24Download.c
|
||||
# ----------------------------------------------
|
||||
# 268: const char* ownerHighText = homePath + 7;
|
||||
# Error: ^^^^^
|
||||
# (10141) expression syntax error
|
||||
# Too many errors printed, aborting program
|
||||
|
||||
User break, cancelled...
|
||||
ninja: build stopped: subcommand failed.
|
||||
|
||||
BEGIN NWC24UpdateDlTask: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((19, 250), 249, 253)
|
||||
DIAGNOSIS NWC24UpdateDlTask: Target frame 0x20, explicit r28..r31 saves; source 0x30, five-register save helper. Target group check keeps allowed boolean and groupId in different saved lifetimes; retry branch uses positive cached-work view and shifted bit first. No store/reload volatile evidence. Reducing helper live values is structural priority.
|
||||
ATTEMPT NWC24UpdateDlTask: read-only permission helper and nested group boolean control saved-value lifetime; source 63d243827abe; objdiff=98.695656%; metric=((5, 43), 253, 253); unit code/data/functions=8140/80/25; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
ATTEMPT NWC24UpdateDlTask: read-only cached-work retry helper and shifted retry mask operand first; source 3c443ac7ae56; objdiff=98.715416%; metric=((5, 43), 253, 253); unit code/data/functions=8140/80/25; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
ATTEMPT NWC24UpdateDlTask: caller-owned universal time object bounds access-time helper lifetime with const permissions; source 5d281c43af14; objdiff=97.885376%; metric=((11, 148), 251, 253); unit code/data/functions=8140/80/25; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
BEGIN NWC24InitDlTask: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((0, 31), 144, 144)
|
||||
DIAGNOSIS NWC24InitDlTask: 0x60 frame and 144/144 instructions; structural score zero. Zero/home ID/header/title/group values cycle saved registers. No volatile store-reload proof. Headers and task permission views are read-only candidates; validate alias assumptions before register search.
|
||||
ATTEMPT NWC24InitDlTask: permission boundary receives const task and cached header explicitly; source ff1390188311; objdiff=98.854164%; metric=((0, 33), 144, 144); unit code/data/functions=8140/80/25; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
ATTEMPT NWC24InitDlTask: owner components use const parse views and read-only initial header; source cd6db78c6535; objdiff=98.923615%; metric=((0, 31), 144, 144); unit code/data/functions=8140/80/25; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
ATTEMPT NWC24InitDlTask: post-initialization read-only task/header views localize final validation lifetime; source fe5fbec0434b; objdiff=98.854164%; metric=((0, 33), 144, 144); unit code/data/functions=8140/80/25; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
BEGIN NWC24IterateDlTask: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((0, 10), 79, 79)
|
||||
DIAGNOSIS NWC24IterateDlTask: Leaf 79/79 instructions, structural score zero. Only work and derived header registers r6/r7 exchange. Target and source extents equal. Use read-only work/header views and lookup boundary without declaration-order permutations.
|
||||
ATTEMPT NWC24IterateDlTask: const work pointer narrows iteration input alias view; source 487b19d2bdfc; objdiff=100.0%; metric=((0, 0), 79, 79); unit code/data/functions=8456/80/26; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; RETAINED exact, awaiting full gate
|
||||
BEGIN NWC24iCheckDlHeaderConsistency: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((2, 3), 212, 212)
|
||||
DIAGNOSIS NWC24iCheckDlHeaderConsistency: Same 0x2c0 frame, 212/212 instructions. Only task address creation moves after parameter copies. No forced stack spill or volatile evidence. Task object extent and neighbours equal; inspect read-only list view and helper boundaries instead of prior declaration permutations.
|
||||
ATTEMPT NWC24iCheckDlHeaderConsistency: header parameter and both cached header views are const; source f6279354e003; objdiff=98.77358%; metric=((2, 3), 212, 212); unit code/data/functions=8456/80/26; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
ATTEMPT NWC24iCheckDlHeaderConsistency: constant task pointer, repair flag, and read-only list bound preserve immutable input lifetimes; source 4a24bba4583f; objdiff=98.77358%; metric=((2, 3), 212, 212); unit code/data/functions=8456/80/26; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
ATTEMPT NWC24iCheckDlHeaderConsistency: repair read boundary takes task pointer and read-only identifier address; source 39cb60543b0b; objdiff=96.69811%; metric=((15, 170), 210, 212); unit code/data/functions=8456/80/26; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
CHECKPOINT NWC24IterateDlTask: const NWC24Work input view fixes r6/r7 alias allocation. Objdiff 100.0%, 79/79 instructions, ctxdiff diffs 0, code 8140 -> 8456, data 80/80 unchanged. Fresh quick full gate: GATE PASS, regressions 0, forbidden/readability 0, correct DOL SHA1. Final clean full gate still required.
|
||||
```
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] pool: IDENTICAL
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] objdiff: code 8456/12496 data 80/80 functions 26/30 fuzzy 99.1697 linked code 0
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] instruction-exact functions: 26/30
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] section .data size 56 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] section .sbss size 8 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] section .sdata size 16 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] section .text size 12496 match 99.169655
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] below 100: NWC24InitDlTask 98.923615
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] below 100: NWC24UpdateDlTask 95.00395
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] below 100: NWC24iCheckDlHeaderConsistency 98.77358
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] below 100: AddTaskInternal 97.7182
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] baseline: code 8140/12496 data 80 functions 25 fuzzy 99.1521
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 91.02223 -> 91.03278
|
||||
global fuzzy_match_percent: 99.58757 -> 99.58764
|
||||
global complete_code_percent: 73.73083 -> 73.73083
|
||||
global matched_data_percent: 99.42271 -> 99.42271
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
GATE PASS
|
||||
```
|
||||
BEGIN AddTaskInternal: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=True; diagnosis metric=((22, 323), 398, 401)
|
||||
DIAGNOSIS AddTaskInternal: Target/source frames 0x30; 398/401 instructions. URL helper branch lacks target explicit jump; target free-slot counter wider then narrowed when indexed, and retry helper null/non-null branch direction differs. Current template also carries one extra saved register in update inner lifetime. Inspect const validation/URL views and widened search bounds first.
|
||||
ATTEMPT AddTaskInternal: URL validation reads task and header through const views; source a9c8ec831220; objdiff=97.7182%; metric=((22, 323), 398, 401); unit code/data/functions=8456/80/26; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
ATTEMPT AddTaskInternal: free-slot loop uses wide counter and explicit 16-bit entry view with read-only URL validation; source 6ae43c6b3f02; objdiff=97.7182%; metric=((22, 323), 398, 401); unit code/data/functions=8456/80/26; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
ATTEMPT AddTaskInternal: free-slot status uses positive success branch; const URL task/header alias view; source 6eb9e944c574; objdiff=97.7182%; metric=((22, 323), 398, 401); unit code/data/functions=8456/80/26; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
BEGIN pfd_sddrv_init: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((18, 31), 144, 144)
|
||||
DIAGNOSIS pfd_sddrv_init: 144/144 instructions, same 0x20 frame. Target unsigned register null test and branchful identity return; source cmpwi and branchless return, compensated size. Device store precedes media load in target, and final disk store precedes flag load. No same-field immediate store/reload warrants volatile. Try const views and real init helper boundaries.
|
||||
ATTEMPT pfd_sddrv_init: const disk identity view and explicit mismatch return branch; source 905b3c7fadf5; objdiff=92.326385%; metric=((18, 31), 144, 144); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
|
||||
EXTENT AUDIT: all assigned open code symbol extents checked against sorted next symbols. No overlap; no function size edits authorized or needed.
|
||||
NHTTPi_strnicmp: start 0x81497ec4, size 0xcc, next NHTTPi_getUrlEncodedSize 0x81497f90, no extent overlap.
|
||||
NHTTPi_compareToken: start 0x81498454, size 0xb4, next NHTTPi_strtonum 0x81498508, no extent overlap.
|
||||
NHTTPi_Base64Encode: start 0x81498598, size 0x1dc, next NHTTPi_InitThreadInfo 0x81498774, no extent overlap.
|
||||
NWC24InitDlTask: start 0x814ae9b8, size 0x240, next NWC24SetDlId 0x814aebf8, no extent overlap.
|
||||
NWC24IterateDlTask: start 0x814af408, size 0x13c, next NWC24IterateDlTaskEx 0x814af544, no extent overlap.
|
||||
NWC24UpdateDlTask: start 0x814af788, size 0x3f4, next NWC24DeleteDlTask 0x814afb7c, no extent overlap.
|
||||
NWC24iCheckDlHeaderConsistency: start 0x814b0874, size 0x350, next NWC24iCreateDlTaskList 0x814b0bc4, no extent overlap.
|
||||
AddTaskInternal: start 0x814b1208, size 0x644, next DeleteDlTask 0x814b184c, no extent overlap.
|
||||
PFCACHE_DoWriteNumSectorAndFreeIfNeeded: start 0x815c9f54, size 0x3a4, next PFCACHE_DoFlushCache 0x815ca2f8, no extent overlap.
|
||||
pfd_sddrv_init: start 0x815ea638, size 0x240, next pfd_sddrv_mount 0x815ea878, no extent overlap.
|
||||
pfd_sddrv_finalize: start 0x815eab80, size 0xe4, next pfd_sddrv_get_disk_info 0x815eac64, no extent overlap.
|
||||
pfd_sddrv_get_total_sectors: start 0x815eb2a4, size 0x140, next pfd_sddrv_calc_mbr_bpb 0x815eb3e4, no extent overlap.
|
||||
pfd_sddrv_store_mbr_buf: start 0x815ebbb4, size 0x328, next pfd_sddrv_build_mbr_bpb 0x815ebedc, no extent overlap.
|
||||
pfd_sddrv_build_fat32_mbr_bpb: start 0x815eccc0, size 0x378, next pfd_sddrv_full_format 0x815ed038, no extent overlap.
|
||||
ATTEMPT pfd_sddrv_init: media presence follows device assignment through read-only info helper; source 3d1f9324ee5f; objdiff=92.326385%; metric=((18, 31), 144, 144); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
ATTEMPT pfd_sddrv_init: init completion helper owns disk assignment and flags in target store order; source c149ecc642dd; objdiff=92.326385%; metric=((18, 31), 144, 144); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
BEGIN pfd_sddrv_finalize: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((6, 4), 57, 57)
|
||||
DIAGNOSIS pfd_sddrv_finalize: Same 0x10 frame, 57/57 instructions. Four mismatches: final flag load target r3 versus r5, target masks/stores flags before media reset; ours hoists media reset ahead of mask. Record-level return helper can shorten final value lifetime. No proven volatile reload in target.
|
||||
ATTEMPT pfd_sddrv_finalize: completion helper returns success after clearing real record fields; source 0cf2049687eb; objdiff=92.63158%; metric=((6, 4), 57, 57); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
ATTEMPT pfd_sddrv_finalize: const flag field input view in record completion helper; source 5361f291b228; objdiff=92.63158%; metric=((6, 4), 57, 57); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
ATTEMPT pfd_sddrv_finalize: separate read-only record view and mutable record completion boundary; source fe2bf402a758; objdiff=92.63158%; metric=((6, 4), 57, 57); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
BEGIN pfd_sddrv_get_total_sectors: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((0, 6), 80, 80)
|
||||
DIAGNOSIS pfd_sddrv_get_total_sectors: 80/80 instructions and frame unchanged. Six mismatches in final 16-bit multiplier shift/product: target reuses selected exponent r3 and constant r0, source uses r0/r5. Need true narrow shift lifetime before register-only permutations; no reload/spill or extent proof for other levers.
|
||||
ATTEMPT pfd_sddrv_get_total_sectors: const exponent input at 16-bit block multiplier inline boundary; source cbcb2b194abc; objdiff=96.9875%; metric=((3, 10), 80, 80); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
ATTEMPT pfd_sddrv_get_total_sectors: reduce selected 16-bit exponent in place before multiplier shift; source ba2dc2fb501c; objdiff=99.5%; metric=((0, 6), 80, 80); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
ATTEMPT pfd_sddrv_get_total_sectors: sector count helper combines narrow factor and product with const exponent; source 21d00041dc62; objdiff=96.9875%; metric=((3, 10), 80, 80); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
BEGIN pfd_sddrv_store_mbr_buf: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((0, 9), 202, 202)
|
||||
DIAGNOSIS pfd_sddrv_store_mbr_buf: 202/202 instructions, frame identical. Only track-size product and partition start sector exchange r8/r9 within CHS arithmetic. Read-only formatting input and CHS helper boundaries can change alias assumptions; no volatile reload or symbol overlap.
|
||||
ATTEMPT pfd_sddrv_store_mbr_buf: const formatting input parameter isolates CHS reads from output sector stores; source 1a720184cd4f; objdiff=99.75247%; metric=((0, 9), 202, 202); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
ATTEMPT pfd_sddrv_store_mbr_buf: local read-only formatting view spans table lookup and CHS calculation; source 017e7858eba2; objdiff=99.75247%; metric=((0, 9), 202, 202); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
ATTEMPT pfd_sddrv_store_mbr_buf: track-size multiplication in read-only settings helper with const format parameter; source 73df2e161b68; objdiff=99.09406%; metric=((5, 146), 203, 202); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
BEGIN pfd_sddrv_build_fat32_mbr_bpb: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((24, 122), 230, 222)
|
||||
DIAGNOSIS pfd_sddrv_build_fat32_mbr_bpb: 230/222 instructions; same frame. Target reserved sector builder has no null-buffer failure because sole caller passes static 512-byte buffer. Ours inlining keeps null/error path. First block write argument load order also differs. Fix helper type/known object input before scheduling; no extent overlap.
|
||||
ATTEMPT pfd_sddrv_build_fat32_mbr_bpb: reserved sector helper takes real typed sector object instead of byte-pointer alias; source c29717b898f6; objdiff=94.74324%; metric=((26, 122), 230, 222); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
pfd_sddrv_build_fat32_mbr_bpb dead-check proof: private reserved-sector helper has one call site, always g_pfd_sddrv_buf[512], a defined object whose address is nonnull. Removing its unreachable null failure preserves every call and payload store; target inlined block likewise omits it.
|
||||
ATTEMPT pfd_sddrv_build_fat32_mbr_bpb: remove unreachable null guard from single-caller private reserved-sector builder; source 05e9e530517e; objdiff=97.20721%; metric=((18, 100), 216, 222); unit code/data/functions=8472/1016/20; pool=FIRST DIVERGENCE at index 41
|
||||
39 mine=0x850 base=0x850
|
||||
M 'ERR Failed to store BPB values to buf. pfd_sddrv_store_fat32_bpb_buf()'
|
||||
B 'ERR Failed to store BPB values to buf. pfd_sddrv_store_fat32_bpb_buf()'
|
||||
40 mine=0x898 base=0x898
|
||||
M 'ERR Failed to store FSInfo values to buf. pfd_sddrv_store_fat32_fsi_bu'
|
||||
B 'ERR Failed to store FSInfo values to buf. pfd_sddrv_store_fat32_fsi_bu'
|
||||
* 41 mine=0x8e4 base=0x8e4
|
||||
M 'ERROR Failed to SD Card Reset [ret = 0x%x]. pfd_sddrv_full_format()\n'
|
||||
B 'ERR Failed to store reserved for boot sector values to buf. '
|
||||
* 42 mine=0x930 base=0x924
|
||||
M 'ERR Failed to get total sectors. pfd_sddrv_get_total_sectors()\n'
|
||||
B 'pfd_sddrv_store_fat32_reserved_buf()\n'
|
||||
* 43 mine=0x970 base=0x94c
|
||||
M 'ERR Failed to build up and write MBR and BPB fields.\n'
|
||||
B 'ERROR Failed to SD Card Reset [ret = 0x%x]. pfd_sddrv_full_format()\n'
|
||||
|
||||
mine has 44 strings, base has 46; regressions=['main/libs/RVL_SDK/src/fa/driver/sd_drv matched_code', 'main/libs/RVL_SDK/src/fa/driver/sd_drv matched_data', 'main/libs/RVL_SDK/src/fa/driver/sd_drv matched_functions', 'main/libs/RVL_SDK/src/fa/driver/sd_drv pfd_sddrv_full_format']; restored
|
||||
ATTEMPT pfd_sddrv_build_fat32_mbr_bpb: reserved-sector helper owns its sole static destination object directly; source 79b89e963e83; objdiff=97.20721%; metric=((18, 100), 216, 222); unit code/data/functions=8472/1016/20; pool=FIRST DIVERGENCE at index 41
|
||||
39 mine=0x850 base=0x850
|
||||
M 'ERR Failed to store BPB values to buf. pfd_sddrv_store_fat32_bpb_buf()'
|
||||
B 'ERR Failed to store BPB values to buf. pfd_sddrv_store_fat32_bpb_buf()'
|
||||
40 mine=0x898 base=0x898
|
||||
M 'ERR Failed to store FSInfo values to buf. pfd_sddrv_store_fat32_fsi_bu'
|
||||
B 'ERR Failed to store FSInfo values to buf. pfd_sddrv_store_fat32_fsi_bu'
|
||||
* 41 mine=0x8e4 base=0x8e4
|
||||
M 'ERROR Failed to SD Card Reset [ret = 0x%x]. pfd_sddrv_full_format()\n'
|
||||
B 'ERR Failed to store reserved for boot sector values to buf. '
|
||||
* 42 mine=0x930 base=0x924
|
||||
M 'ERR Failed to get total sectors. pfd_sddrv_get_total_sectors()\n'
|
||||
B 'pfd_sddrv_store_fat32_reserved_buf()\n'
|
||||
* 43 mine=0x970 base=0x94c
|
||||
M 'ERR Failed to build up and write MBR and BPB fields.\n'
|
||||
B 'ERROR Failed to SD Card Reset [ret = 0x%x]. pfd_sddrv_full_format()\n'
|
||||
|
||||
mine has 44 strings, base has 46; regressions=['main/libs/RVL_SDK/src/fa/driver/sd_drv matched_code', 'main/libs/RVL_SDK/src/fa/driver/sd_drv matched_data', 'main/libs/RVL_SDK/src/fa/driver/sd_drv matched_functions', 'main/libs/RVL_SDK/src/fa/driver/sd_drv pfd_sddrv_full_format']; restored
|
||||
BEGIN PFCACHE_DoWriteNumSectorAndFreeIfNeeded: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((0, 4), 233, 233)
|
||||
DIAGNOSIS PFCACHE_DoWriteNumSectorAndFreeIfNeeded: 233/233 instructions and same frame. Four register operand differences only in right overlap block, page sector versus recomputed end occupy r4/r5 oppositely. Last-sector subtraction scheduled identically. Data/strings absent, no volatile store-reload evidence or extent overlap. Change read-only overlap input boundaries, no declaration permutations.
|
||||
ATTEMPT PFCACHE_DoWriteNumSectorAndFreeIfNeeded: overlap helper reads request end through const scalar pointer; source 606706d65afa; objdiff=99.8927%; metric=((0, 4), 233, 233); unit code/data/functions=6464/0/35; pool=POOL IDENTICAL up to 0 (mine=0 base=0); regressions=[]; restored
|
||||
ATTEMPT PFCACHE_DoWriteNumSectorAndFreeIfNeeded: overlap helper uses separate const page view for sector input; source d5f6e06ac285; objdiff=99.8927%; metric=((0, 4), 233, 233); unit code/data/functions=6464/0/35; pool=POOL IDENTICAL up to 0 (mine=0 base=0); regressions=[]; restored
|
||||
ATTEMPT PFCACHE_DoWriteNumSectorAndFreeIfNeeded: typed read-only request-end record across overlap update boundary; source 9a7956d662f5; objdiff=99.8927%; metric=((0, 4), 233, 233); unit code/data/functions=6464/0/35; pool=POOL IDENTICAL up to 0 (mine=0 base=0); regressions=[]; restored
|
||||
BEGIN NWC24iCheckDlHeaderConsistency: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=True; diagnosis metric=((2, 3), 212, 212)
|
||||
NWC24iCheckDlHeaderConsistency local type proof: DlTaskData ends with url[0xec], fileName[0x5c], optOut byte and 3 reserved bytes, total 0x200; matches opaque NWC24DlTask 0x200. Stack object replacement represents the same task, with no padding added or extent change.
|
||||
ATTEMPT NWC24iCheckDlHeaderConsistency: real structured task stack object cast at the opaque API boundary; source fcd54af0851f; objdiff=98.77358%; metric=((2, 3), 212, 212); unit code/data/functions=8456/80/26; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
ATTEMPT NWC24iCheckDlHeaderConsistency: structured task receives opaque view through typed inline boundary; source 301ca3eb1edc; objdiff=98.77358%; metric=((2, 3), 212, 212); unit code/data/functions=8456/80/26; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
ATTEMPT NWC24iCheckDlHeaderConsistency: typed task pointer stays structured until each opaque read/delete boundary; source 1bc6e69d54e9; objdiff=98.77358%; metric=((2, 3), 212, 212); unit code/data/functions=8456/80/26; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
BEGIN PFCACHE_DoWriteNumSectorAndFreeIfNeeded: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((0, 4), 233, 233)
|
||||
ATTEMPT PFCACHE_DoWriteNumSectorAndFreeIfNeeded: request-end formal is reduced in place to overlap count after deriving last sector; source b10773207f13; objdiff=99.8927%; metric=((0, 4), 233, 233); unit code/data/functions=6464/0/35; pool=POOL IDENTICAL up to 0 (mine=0 base=0); regressions=[]; restored
|
||||
ATTEMPT PFCACHE_DoWriteNumSectorAndFreeIfNeeded: overlap count starts from end and subtracts page before computing last sector; source 85f5d01a2a49; objdiff=99.8927%; metric=((0, 4), 233, 233); unit code/data/functions=6464/0/35; pool=POOL IDENTICAL up to 0 (mine=0 base=0); regressions=[]; restored
|
||||
ATTEMPT PFCACHE_DoWriteNumSectorAndFreeIfNeeded: const source-sector lifetime retained for both overlap updates without separate overlap object; source f643ee71364a; objdiff=99.8927%; metric=((0, 4), 233, 233); unit code/data/functions=6464/0/35; pool=POOL IDENTICAL up to 0 (mine=0 base=0); regressions=[]; restored
|
||||
BEGIN pfd_sddrv_finalize: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((6, 4), 57, 57)
|
||||
PFD_SDDRV_INFO type trial proof: media_inserted/media_ejected are 32-bit truth values. Target init and callbacks write 0/1; lifecycle code tests against zero, and offsets remain 0x10/0x14. BOOL preserves width and layout and adds no volatile.
|
||||
ATTEMPT pfd_sddrv_finalize: media insertion field models target truth value as SDK BOOL; source b5214114691d; objdiff=92.63158%; metric=((6, 4), 57, 57); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
ATTEMPT pfd_sddrv_finalize: both lifecycle truth fields model SDK BOOL with unchanged offsets; source f4736e296197; objdiff=92.63158%; metric=((6, 4), 57, 57); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
ATTEMPT pfd_sddrv_finalize: signed word mask expression preserves only the initialized-bit clearing; source e483acc64c10; objdiff=92.63158%; metric=((6, 4), 57, 57); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
BEGIN pfd_sddrv_get_total_sectors: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((0, 6), 80, 80)
|
||||
ATTEMPT pfd_sddrv_get_total_sectors: wide unsigned shift factor is narrowed at final sector multiplication; source eef542901c40; objdiff=99.5%; metric=((0, 5), 80, 80); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
ATTEMPT pfd_sddrv_get_total_sectors: signed arithmetic shift factor narrowed at product, exponent constrained to zero through two; source 7322e282bd0f; objdiff=99.5%; metric=((0, 5), 80, 80); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
ATTEMPT pfd_sddrv_get_total_sectors: factor uses explicit unsigned shift expression and single 16-bit conversion; source 8666142025c4; objdiff=96.9875%; metric=((3, 10), 80, 80); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
|
||||
## Final open-function audit before clean gate
|
||||
Every open symbol was checked after fresh origin fetch. Data and strings stayed identical; all failed variants restored. No declaration permutations used. All 13 open functions have at least three distinct source-level attempts with successful object builds.
|
||||
|
||||
OPEN NHTTPi_strnicmp: 99.76471%; 51/51 instructions; Z and zero initialization order exchanged, every later instruction identical; 3 distinct successful source attempts; all reverted.
|
||||
OPEN NHTTPi_compareToken: 54.622223%; 44/45 instructions; loop entry and right-fold conditional value lifetime differ; 6 distinct successful source attempts; all reverted.
|
||||
OPEN NHTTPi_Base64Encode: 60.285713%; 119/119 instructions; source byte/table lookup scheduling and signed padding comparisons differ; 3 distinct successful source attempts; all reverted.
|
||||
OPEN NWC24InitDlTask: 98.923615%; 144/144 instructions; saved registers for zeros, owner ID, header and permission lifetimes differ; 3 distinct successful source attempts; all reverted.
|
||||
OPEN NWC24UpdateDlTask: 95.00395%; 249/253 instructions; additional saved register/frame and permission/access/retry helper boundaries differ; 3 distinct successful source attempts; all reverted.
|
||||
OPEN NWC24iCheckDlHeaderConsistency: 98.77358%; 212/212 instructions; stack task address materialization scheduled after saved argument copies; 6 distinct successful source attempts; all reverted.
|
||||
OPEN AddTaskInternal: 97.7182%; 398/401 instructions; URL/free-slot/retry branch boundaries and saved register lifetimes differ; 3 distinct successful source attempts; all reverted.
|
||||
OPEN pfd_sddrv_init: 92.326385%; 144/144 instructions; null/identity branch lowering and device/media/flag store-load scheduling differ; 3 distinct successful source attempts; all reverted.
|
||||
OPEN pfd_sddrv_finalize: 92.63158%; 57/57 instructions; final flag-mask register and media-reset scheduling differ; 6 distinct successful source attempts; all reverted.
|
||||
OPEN pfd_sddrv_get_total_sectors: 99.5%; 80/80 instructions; six register differences in narrow multiplier shift and product; 6 distinct successful source attempts; all reverted.
|
||||
OPEN pfd_sddrv_store_mbr_buf: 99.75247%; 202/202 instructions; nine register differences for CHS track product and partition start; 3 distinct successful source attempts; all reverted.
|
||||
OPEN pfd_sddrv_build_fat32_mbr_bpb: 94.75225%; 230/222 instructions; reserved-sector inline null/error path and block-write arguments differ; 3 distinct successful source attempts; all reverted.
|
||||
OPEN PFCACHE_DoWriteNumSectorAndFreeIfNeeded: 99.8927%; 233/233 instructions; request end and page sector exchange r4/r5 in right-overlap arithmetic; 6 distinct successful source attempts; all reverted.
|
||||
|
||||
Source-quality audit: only accepted source change is const NWC24Work* in NWC24IterateDlTask. No comments, new asm, volatile, register keyword, label pins, dummy objects, function renames, symbol/config changes, shared headers, other units, link flags, or remote writes. Data totals remain 112/80/3592/0, all 100%. Local accepted source commit f9c79662.
|
||||
|
||||
## Final full clean gate over all four units
|
||||
|
||||
Command: python3 /mnt/drive2/projects/wii-ipl-workers/_restore0928-tools/gate.py libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL libs/RevoEX/src/nwc24/NWC24Download libs/RVL_SDK/src/fa/driver/sd_drv libs/RVL_SDK/src/fa/pf_cache
|
||||
|
||||
```text
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] pool: IDENTICAL
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] objdiff: code 1388/2248 data 112/112 functions 11/14 fuzzy 87.9359 linked code 0
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] instruction-exact functions: 11/14
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] section .data size 72 match 100.0
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] section .rodata size 40 match 100.0
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] section .text size 2248 match 87.93594
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] below 100: NHTTPi_strnicmp 99.76471
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] below 100: NHTTPi_compareToken 54.622223
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] below 100: NHTTPi_Base64Encode 60.285713
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] baseline: code 1388/2248 data 112 functions 11 fuzzy 87.9359
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] pool: IDENTICAL
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] objdiff: code 8456/12496 data 80/80 functions 26/30 fuzzy 99.1697 linked code 0
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] instruction-exact functions: 26/30
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] section .data size 56 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] section .sbss size 8 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] section .sdata size 16 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] section .text size 12496 match 99.169655
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] below 100: NWC24InitDlTask 98.923615
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] below 100: NWC24UpdateDlTask 95.00395
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] below 100: NWC24iCheckDlHeaderConsistency 98.77358
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] below 100: AddTaskInternal 97.7182
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] baseline: code 8140/12496 data 80 functions 25 fuzzy 99.1521
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] objdiff: code 8940/11760 data 3592/3592 functions 21/26 fuzzy 99.0544 linked code 0
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] instruction-exact functions: 21/26
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] section .bss size 608 match 100.0
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] section .data size 2576 match 100.0
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] section .rodata size 368 match 100.0
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] section .sbss size 40 match 100.0
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] section .text size 11760 match 99.05442
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_init 92.326385
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_finalize 92.63158
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_get_total_sectors 99.5
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_store_mbr_buf 99.75247
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_build_fat32_mbr_bpb 94.75225
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] baseline: code 8940/11760 data 3592 functions 21 fuzzy 99.0544
|
||||
[libs/RVL_SDK/src/fa/pf_cache] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/pf_cache] objdiff: code 6464/7396 data None/None functions 35/36 fuzzy 99.9865 linked code 0
|
||||
[libs/RVL_SDK/src/fa/pf_cache] instruction-exact functions: 35/36
|
||||
[libs/RVL_SDK/src/fa/pf_cache] section .text size 7396 match 99.98648
|
||||
[libs/RVL_SDK/src/fa/pf_cache] below 100: PFCACHE_DoWriteNumSectorAndFreeIfNeeded 99.8927
|
||||
[libs/RVL_SDK/src/fa/pf_cache] baseline: code 6464/7396 data None functions 35 fuzzy 99.9865
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 91.02223 -> 91.03278
|
||||
global fuzzy_match_percent: 99.58757 -> 99.58764
|
||||
global complete_code_percent: 73.73083 -> 73.73083
|
||||
global matched_data_percent: 99.42271 -> 99.42271
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
GATE PASS
|
||||
```
|
||||
|
||||
Before -> after instruction-exact/code/data:
|
||||
NHTTP_stdlib_RVL: 11/14 -> 11/14; 1388/2248 -> 1388/2248; 112/112 -> 112/112.
|
||||
NWC24Download: 25/30 -> 26/30; 8140/12496 -> 8456/12496; 80/80 -> 80/80.
|
||||
sd_drv: 21/26 -> 21/26; 8940/11760 -> 8940/11760; 3592/3592 -> 3592/3592.
|
||||
pf_cache: 35/36 -> 35/36; 6464/7396 -> 6464/7396; 0/0 -> 0/0.
|
||||
|
||||
Only NWC24IterateDlTask gained exact bytes. Const work view is proven by objdiff 100%, 79/79 identical instructions, and the final clean gate. All other trials are reverted. Remaining functions and reasons are in the OPEN audit above. No uncertainty about measured gains; source-level causes for the parked compiler differences remain unresolved.
|
||||
|
||||
Official declsearch scoring only after structural/source trials. No permutations and no source mutations.
|
||||
NHTTPi_strnicmp: structural 2 exact 2.
|
||||
NHTTPi_compareToken: structural 24 exact 42.
|
||||
NHTTPi_Base64Encode: structural 71 exact 58.
|
||||
NWC24InitDlTask: structural 0 exact 31.
|
||||
NWC24UpdateDlTask: structural 19 exact 250.
|
||||
NWC24iCheckDlHeaderConsistency: structural 2 exact 3.
|
||||
AddTaskInternal: structural 20 exact 323.
|
||||
pfd_sddrv_init: structural 18 exact 31.
|
||||
pfd_sddrv_finalize: structural 6 exact 4.
|
||||
pfd_sddrv_get_total_sectors: structural 0 exact 6.
|
||||
pfd_sddrv_store_mbr_buf: structural 0 exact 9.
|
||||
pfd_sddrv_build_fat32_mbr_bpb: structural 24 exact 122.
|
||||
PFCACHE_DoWriteNumSectorAndFreeIfNeeded: structural 0 exact 4.
|
||||
|
||||
Accepted symbol final fresh ctxdiff:
|
||||
```text
|
||||
src 0x13c base 0x13c insns 79/79
|
||||
diffs 0: []
|
||||
```
|
||||
Final progress/report.json and build/43U/ok targets pass. The full clean gate remains GATE PASS. Source change and all non-text scores are unchanged after scoring.
|
||||
460
tools/decomp-assist/prior1.attempts.md
Normal file
460
tools/decomp-assist/prior1.attempts.md
Normal file
@@ -0,0 +1,460 @@
|
||||
|
||||
# prior1 MAX reference round
|
||||
|
||||
Scope: VIInit, Window::DrawFrame, SOGetSockName and owned data. No wprintf edits.
|
||||
Origin fetch succeeded; 26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source and symbols match HEAD/origin. Shell execution works; historical bubblewrap blocker does not apply.
|
||||
|
||||
BASELINE main/libs/RevoEX/src/so/SOBasic {'fuzzy_match_percent': 99.79452, 'total_code': '4088', 'matched_code': '3836', 'matched_code_percent': 93.83562, 'total_data': '144', 'matched_data': '144', 'matched_data_percent': 100.0, 'total_functions': 22, 'matched_functions': 21, 'matched_functions_percent': 95.454544, 'total_units': 1}
|
||||
Initial string pool IDENTICAL; data already 100% for every owned section. No symbol renames or extent changes needed.
|
||||
|
||||
BASELINE main/libs/NW4R/src/lyt/lyt_window {'fuzzy_match_percent': 99.75864, 'total_code': '11352', 'matched_code': '9848', 'matched_code_percent': 86.751236, 'total_data': '316', 'matched_data': '316', 'matched_data_percent': 100.0, 'total_functions': 21, 'matched_functions': 20, 'matched_functions_percent': 95.2381, 'total_units': 1}
|
||||
Initial string pool IDENTICAL; data already 100% for every owned section. No symbol renames or extent changes needed.
|
||||
|
||||
BASELINE main/libs/RVL_SDK/src/vi/vi {'fuzzy_match_percent': 99.97521, 'total_code': '11296', 'matched_code': '9944', 'matched_code_percent': 88.03116, 'total_data': '1944', 'matched_data': '1944', 'matched_data_percent': 100.0, 'total_functions': 30, 'matched_functions': 29, 'matched_functions_percent': 96.666664, 'total_units': 1}
|
||||
Initial string pool IDENTICAL; data already 100% for every owned section. No symbol renames or extent changes needed.
|
||||
|
||||
VIInit structural diagnosis: both frames 0x30; 338/338 instructions. Only 14 differences: clip active-height/top locals r29/r30/r31 rotate with shared framebuffer/PreCB/PostCB zero. No target spill/reload proof for new volatile. Reference changes declarations, explicit narrowing in AdjustPosition, and DVD-stop inline boundary; data 1944/1944.
|
||||
|
||||
VIInit | V1 reference removes unused format, DVD previous state block scoped | insns 338/338 structural/exact (0, 14) | objdiff 99.7929 | lost [] | data 1944/1944 | POOL IDENTICAL up to 7 (mine=7 base=7) | 63b67f44ab8a
|
||||
|
||||
199 M ('slwi', 'r29, r7, 1') B ('slwi', 'r30, r7, 1')
|
||||
201 M ('subf', 'r26, r6, r29') B ('subf', 'r26, r6, r30')
|
||||
222 M ('and', 'r30, r25, r10') B ('and', 'r31, r25, r10')
|
||||
225 M ('and', 'r29, r26, r12') B ('and', 'r30, r26, r12')
|
||||
227 M ('add', 'r7, r7, r30') B ('add', 'r7, r7, r31')
|
||||
235 M ('li', 'r31, 0') B ('li', 'r29, 0')
|
||||
238 M ('divw', 'r8, r29, r5') B ('divw', 'r8, r30, r5')
|
||||
248 M ('sth', 'r31, 0x16(r4)') B ('sth', 'r29, 0x16(r4)')
|
||||
250 M ('sth', 'r31, 0x18(r4)') B ('sth', 'r29, 0x18(r4)')
|
||||
255 M ('stw', 'r31, 0x20(r4)') B ('stw', 'r29, 0x20(r4)')
|
||||
260 M ('stb', 'r31, 0x3c(r4)') B ('stb', 'r29, 0x3c(r4)')
|
||||
262 M ('stw', 'r31, 0x44(r4)') B ('stw', 'r29, 0x44(r4)')
|
||||
274 M ('stw', 'r31, 0(0)') B ('stw', 'r29, 0(0)')
|
||||
275 M ('stw', 'r31, 0(0)') B ('stw', 'r29, 0(0)')
|
||||
|
||||
VIInit | V2 reference scalar declaration group and required volatile DVD read | insns 338/338 structural/exact (0, 14) | objdiff 99.7929 | lost [] | data 1944/1944 | POOL IDENTICAL up to 7 (mine=7 base=7) | b4b22213ff0c
|
||||
|
||||
199 M ('slwi', 'r29, r7, 1') B ('slwi', 'r30, r7, 1')
|
||||
201 M ('subf', 'r26, r6, r29') B ('subf', 'r26, r6, r30')
|
||||
222 M ('and', 'r30, r25, r10') B ('and', 'r31, r25, r10')
|
||||
225 M ('and', 'r29, r26, r12') B ('and', 'r30, r26, r12')
|
||||
227 M ('add', 'r7, r7, r30') B ('add', 'r7, r7, r31')
|
||||
235 M ('li', 'r31, 0') B ('li', 'r29, 0')
|
||||
238 M ('divw', 'r8, r29, r5') B ('divw', 'r8, r30, r5')
|
||||
248 M ('sth', 'r31, 0x16(r4)') B ('sth', 'r29, 0x16(r4)')
|
||||
250 M ('sth', 'r31, 0x18(r4)') B ('sth', 'r29, 0x18(r4)')
|
||||
255 M ('stw', 'r31, 0x20(r4)') B ('stw', 'r29, 0x20(r4)')
|
||||
260 M ('stb', 'r31, 0x3c(r4)') B ('stb', 'r29, 0x3c(r4)')
|
||||
262 M ('stw', 'r31, 0x44(r4)') B ('stw', 'r29, 0x44(r4)')
|
||||
274 M ('stw', 'r31, 0(0)') B ('stw', 'r29, 0(0)')
|
||||
275 M ('stw', 'r31, 0(0)') B ('stw', 'r29, 0(0)')
|
||||
|
||||
VIInit | V3 reference interrupt register value assignment order | insns 338/338 structural/exact (0, 0) | objdiff 100.0 | lost [] | data 1944/1944 | POOL IDENTICAL up to 7 (mine=7 base=7) | 4cf8217f30f5
|
||||
|
||||
|
||||
|
||||
VIInit | V4 reference clipping explicit u16 stores and grouped locals | insns 338/338 structural/exact (0, 14) | objdiff 99.7929 | lost [] | data 1944/1944 | POOL IDENTICAL up to 7 (mine=7 base=7) | 5e17b0aaa91d
|
||||
|
||||
199 M ('slwi', 'r29, r7, 1') B ('slwi', 'r30, r7, 1')
|
||||
201 M ('subf', 'r26, r6, r29') B ('subf', 'r26, r6, r30')
|
||||
222 M ('and', 'r30, r25, r10') B ('and', 'r31, r25, r10')
|
||||
225 M ('and', 'r29, r26, r12') B ('and', 'r30, r26, r12')
|
||||
227 M ('add', 'r7, r7, r30') B ('add', 'r7, r7, r31')
|
||||
235 M ('li', 'r31, 0') B ('li', 'r29, 0')
|
||||
238 M ('divw', 'r8, r29, r5') B ('divw', 'r8, r30, r5')
|
||||
248 M ('sth', 'r31, 0x16(r4)') B ('sth', 'r29, 0x16(r4)')
|
||||
250 M ('sth', 'r31, 0x18(r4)') B ('sth', 'r29, 0x18(r4)')
|
||||
255 M ('stw', 'r31, 0x20(r4)') B ('stw', 'r29, 0x20(r4)')
|
||||
260 M ('stb', 'r31, 0x3c(r4)') B ('stb', 'r29, 0x3c(r4)')
|
||||
262 M ('stw', 'r31, 0x44(r4)') B ('stw', 'r29, 0x44(r4)')
|
||||
274 M ('stw', 'r31, 0(0)') B ('stw', 'r29, 0(0)')
|
||||
275 M ('stw', 'r31, 0(0)') B ('stw', 'r29, 0(0)')
|
||||
|
||||
VIInit | V5 hardware register value uses its actual u16 width | insns 338/338 structural/exact (0, 0) | objdiff 100.0 | lost [] | data 1944/1944 | POOL IDENTICAL up to 7 (mine=7 base=7) | 91d73ae4ffad
|
||||
|
||||
|
||||
|
||||
V5 clean full gate before commit
|
||||
```
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RVL_SDK/src/vi/vi] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/vi/vi] objdiff: code 11296/11296 data 1944/1944 functions 30/30 fuzzy 100.0000 linked code 0
|
||||
[libs/RVL_SDK/src/vi/vi] instruction-exact functions: 30/30
|
||||
[libs/RVL_SDK/src/vi/vi] section .bss size 368 match 100.0
|
||||
[libs/RVL_SDK/src/vi/vi] section .data size 1368 match 100.0
|
||||
[libs/RVL_SDK/src/vi/vi] section .sbss size 176 match 100.0
|
||||
[libs/RVL_SDK/src/vi/vi] section .sdata size 32 match 100.0
|
||||
[libs/RVL_SDK/src/vi/vi] section .text size 11296 match 100.0
|
||||
[libs/RVL_SDK/src/vi/vi] baseline: code 9944/11296 data 1944 functions 29 fuzzy 99.9752
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 91.05281 -> 91.09795
|
||||
global fuzzy_match_percent: 99.58826 -> 99.58836
|
||||
global complete_code_percent: 73.73083 -> 74.01916
|
||||
global matched_data_percent: 99.42271 -> 99.42271
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
note: no baseline for merge-base 26d7e1e0; compared against nearest snapshotted ancestor d7821052 (1 commits back)
|
||||
GATE PASS
|
||||
```
|
||||
|
||||
VIInit accepted locally: value now u16, matching the VI hardware register width. Both masks preserve 16 bits. This changes only register coloring, resolves every 14 instruction difference, and retains all sections at 100%. Clean full gate PASS; ctxdiff 338/338 diffs 0; pool 7/7 identical; zero regressions and forbidden/readability patterns. No configure.py or symbols change.
|
||||
|
||||
DrawFrame origin pre-function fetch: 26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source identical to origin. Target frame 0xe0, 376/376 instructions. All 119 differences are registers: persistent flip table r21 vs r31 shifts geometry and alpha. Static table, branches, helper operations, floating-point order, and stack offsets identical; reference lacks the target-proven texture-count guard and has mutable bool. No volatile spill/reload proof; all 316 data bytes matched. Extent 0x5e0 ends exactly at DrawFrame4.
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W1 reference mutable bUseVtxCol | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | e4d4a68bdadd
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W2 material setup result separate declaration and assignment | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 645a40fa68ea
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W3 texture dimensions separate declaration and assignment | insns 381/376 structural/exact (161, 358) | objdiff 80.97607 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 356336b28e11
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W4 coordinates passed via reference to the quad array | insns 381/376 structural/exact (96, 326) | objdiff 76.89096 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | b75bb1a0e722
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W5 alpha parameter const-qualified at definition | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | c852083af7e9
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W6 explicitly narrow texture unit argument in vertex format and dimension query | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 19a85be12cc2
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W7 texture index ix uses u8 | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 5cef145ed39c
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W7 texture index iy uses u8 | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 962c307d665a
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W7 texture index ix,iy uses u8 | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | fba15f864c06
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W7 texture index ix,iy uses u16 | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 9230751b3b92
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W7 texture index ix,iy uses u32 | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 01617eecae4e
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W7 texture index ix,iy uses unsigned long | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | aefd446c1d1d
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W8 reference plain struct declaration for TextureFlipInfo | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 127501278333
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W9 reference texture-flip type declared outside anonymous namespace | BUILD FAILED | a29d9ea4e268
|
||||
2/mwcceppc.exe -nodefaults -proc gekko -align powerpc -enum int -fp hardware -Cpp_exceptions off -O4,p -inline auto -pragma "cats off" -pragma "warn_notinlined off" -maxerrors 1 -nosyspath -RTTI off -fp_contract on -str reuse -DSDK_IPL -D_REVOLUTION -DMEM_MANAGER_DIRECT -i include -i include/global -i libs/MetroTRK/include -i libs/Runtime/include -i libs/MSL/include -i libs/RVL_SDK/include -i libs/RevoEX/include -i libs/NW4R/include -i libs/RVLMiddleware/eZiText/include -i libs/RVLMiddleware/TMC_JPEG/include -i libs/RVLFaceLib/include -i libs/EGG/include -i libs/OperaWWW/include -ir libs/RVL_SDK/include/private/bte -i build/43U/include -DBUILD_VERSION=0 -DVERSION_43U -i libs/RVL_SDK/include/private/bte -DNDEBUG=1 -DTARGET_RVL -ipa file -fp_contract off -Cpp_exceptions off -lang=c++ -MMD -c libs/NW4R/src/lyt/lyt_window.cpp -o build/43U/src/libs/NW4R/src/lyt && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/NW4R/src/lyt/lyt_window.d build/43U/src/libs/NW4R/src/lyt/lyt_window.d
|
||||
### mwcceppc.exe Compiler:
|
||||
# File: libs\NW4R\src\lyt\lyt_window.cpp
|
||||
# -----------------------------------------
|
||||
# 48: u8 coords[VERTEXCOLOR_MAX][FLIPINDEX_MAX]; // 0x00
|
||||
# Error: ^^^^^^^^^^^^^^^
|
||||
# (10140) undefined identifier 'VERTEXCOLOR_MAX'
|
||||
# Too many errors printed, aborting program
|
||||
|
||||
User break, cancelled...
|
||||
ninja: build stopped: subcommand failed.
|
||||
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W10 reference helper declarations before definitions | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | a4897278131e
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W9b reference global texture-flip struct with real array dimensions | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | c3ee228d2a7f
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W11 explicit inline boundary for GetTexutreFlipInfo | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 60/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | e833af53f19d
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W11 explicit inline boundary for GetLTTexCoord | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 383a08cfd390
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W11 explicit inline boundary for GetRTTexCoord | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 3d074b950c89
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W11 explicit inline boundary for GetLBTexCoord | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 7a08a15fb0f3
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W11 explicit inline boundary for GetRBTexCoord | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 0e6faa8f9403
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W12 geometry and texture-coordinate helpers explicit inline | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 60/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 1ccea4bdb91d
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W13 polygon size constructor explicitly initializes its dimensions | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | dadaf033b0f2
|
||||
|
||||
DrawFrame W14 final declaration-order search after structural/reference/type trials
|
||||
declaration block:
|
||||
const Size texSize = detail::GetTextureSize(frame.pMaterial, GX_TEXMAP0);
|
||||
const ut::Color vtxColors[VERTEXCOLOR_MAX];
|
||||
|
||||
detail::TexCoords texCds[1];
|
||||
|
||||
math::VEC2 polPt;
|
||||
Size polSize;
|
||||
start (0, 119)
|
||||
best (0, 119) after 52 builds; source restored; best order was:
|
||||
const Size texSize = detail::GetTextureSize(frame.pMaterial, GX_TEXMAP0);
|
||||
const ut::Color vtxColors[VERTEXCOLOR_MAX];
|
||||
|
||||
detail::TexCoords texCds[1];
|
||||
|
||||
math::VEC2 polPt;
|
||||
Size polSize;
|
||||
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W14 final declaration-order result | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 3cc7e4df0b05
|
||||
|
||||
SOGetSockName origin pre-function fetch: 805e84045c82629c645e9ef1787c30d2bc33b5e7; owned source identical to origin. Pool 1/1 identical. Both frames 0x30,63/63 instructions; only first memcpy setup differs (ours destination/source/length, target source/length/destination). Neighbor extent starts at 0x814B34CC, exactly 0x814B33D0+0xFC; no overlap. All 144 target data bytes matched. Reference uses early goto conclude, address initializer, sizeof comparison, separate prepare assignment; wire request raw-offset expressions replaced by existing NameRequest field.
|
||||
|
||||
SOGetSockName | S1 reference statement order and conclude goto, with typed wire fields | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 33cc57840375
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S2 reference address initialization and separate prepare assignment | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | b5a1a7e874aa
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S3 first address copy uses an explicit const input view | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 53088c5d144f
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S4 const socket address view for validation and input, mutable output parameter | insns 63/63 structural/exact (2, 5) | objdiff 96.349205 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | c08e5df4c7de
|
||||
|
||||
5 M ('mr', 'r27, r4') B ('mr', 'r28, r3')
|
||||
6 M ('mr', 'r28, r3') B ('mr', 'r27, r4')
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S5 first copy views its header as const bytes | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 9e0bb74dd11a
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S6 typed copy helper with const source boundary | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 6a49cab5c214
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S7 allocation size declared u32 | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 68140082eff9
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S7 allocation size declared u16 | insns 63/63 structural/exact (3, 4) | objdiff 95.71429 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 404166a4490e
|
||||
|
||||
22 M ('rlwinm', 'r31, r0, 0, 0x10, 0x1a') B ('rlwinm', 'r31, r0, 0, 0, 0x1a')
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S7 allocation size declared size_t | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 73d720d3670d
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S8 first copy separately reads length as u8 | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | c847ce10914f
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S8 first copy separately reads length as u16 | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | becaa347c984
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S8 first copy separately reads length as u32 | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | a1d015de3910
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S8 first copy separately reads length as int | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | d235318a13b5
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S8 first copy separately reads length as size_t | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 43864ee20f80
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S9 reference command allocation is int pointer with typed address-field view | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | f42be4f4821b
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S10 reply buffer held as opaque IOCTL buffer with typed length view | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 39d08eea8df3
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S11 promote first copy length through unsigned halfword | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 8dae136f16d1
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S12 syscall result declared s16 | insns 63/63 structural/exact (8, 20) | objdiff 91.5873 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 2e50fd103218
|
||||
|
||||
10 M ('extsh.', 'r3, r3') B ('cmpwi', 'r3, 0')
|
||||
19 M ('b', '136') B ('b', '140')
|
||||
29 M ('b', '96') B ('b', '100')
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
43 M ('extsh.', 'r30, r3') B ('cmpwi', 'r3, 0')
|
||||
44 M ('blt', '20') B ('mr', 'r30, r3')
|
||||
45 M ('lbz', 'r5, 0(r28)') B ('blt', '20')
|
||||
46 M ('mr', 'r3, r27') B ('lbz', 'r5, 0(r28)')
|
||||
47 M ('mr', 'r4, r28') B ('mr', 'r3, r27')
|
||||
48 M ('bl', '0') B ('mr', 'r4, r28')
|
||||
49 M ('mr', 'r4, r29') B ('bl', '0')
|
||||
50 M ('mr', 'r5, r31') B ('mr', 'r4, r29')
|
||||
51 M ('li', 'r3, 0xc') B ('mr', 'r5, r31')
|
||||
52 M ('bl', '0') B ('li', 'r3, 0xc')
|
||||
53 M ('mr', 'r4, r30') B ('bl', '0')
|
||||
54 M ('li', 'r3, 0') B ('mr', 'r4, r30')
|
||||
55 M ('bl', '0') B ('li', 'r3, 0')
|
||||
56 M ('extsh', 'r3, r3') B ('bl', '0')
|
||||
|
||||
SOGetSockName | S12 syscall result declared long | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | b72c9cdddb5e
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S12 syscall result declared s32 | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 1ab005e08c72
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S13 reply initialized through memcpy destination return | insns 63/63 structural/exact (10, 20) | objdiff 89.12698 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 7693f4b6b84c
|
||||
|
||||
5 M ('mr', 'r29, r3') B ('mr', 'r28, r3')
|
||||
18 M ('li', 'r29, -0x1c') B ('li', 'r30, -0x1c')
|
||||
22 M ('rlwinm', 'r30, r0, 0, 0, 0x1a') B ('rlwinm', 'r31, r0, 0, 0, 0x1a')
|
||||
23 M ('mr', 'r4, r30') B ('mr', 'r4, r31')
|
||||
26 M ('mr', 'r28, r3') B ('mr', 'r29, r3')
|
||||
28 M ('li', 'r29, -0x31') B ('li', 'r30, -0x31')
|
||||
30 M ('stw', 'r29, 0(r3)') B ('stw', 'r28, 0(r3)')
|
||||
31 M ('mr', 'r4, r27') B ('addi', 'r28, r3, 0x20')
|
||||
32 M ('addi', 'r3, r3, 0x20') B ('mr', 'r4, r27')
|
||||
34 M ('bl', '0') B ('mr', 'r3, r28')
|
||||
35 M ('mr', 'r31, r3') B ('bl', '0')
|
||||
37 M ('lbz', 'r8, 0(r27)') B ('mr', 'r5, r29')
|
||||
38 M ('mr', 'r5, r28') B ('lbz', 'r8, 0(r27)')
|
||||
39 M ('mr', 'r7, r31') B ('mr', 'r7, r28')
|
||||
44 M ('mr', 'r29, r3') B ('mr', 'r30, r3')
|
||||
46 M ('lbz', 'r5, 0(r31)') B ('lbz', 'r5, 0(r28)')
|
||||
48 M ('mr', 'r4, r31') B ('mr', 'r4, r28')
|
||||
50 M ('mr', 'r4, r28') B ('mr', 'r4, r29')
|
||||
51 M ('mr', 'r5, r30') B ('mr', 'r5, r31')
|
||||
54 M ('mr', 'r4, r29') B ('mr', 'r4, r30')
|
||||
|
||||
SOGetSockName | S14 reply pointer obtained from the initial address-field copy | insns 63/63 structural/exact (10, 6) | objdiff 90.07937 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 59b28a410bde
|
||||
|
||||
31 M ('mr', 'r4, r27') B ('addi', 'r28, r3, 0x20')
|
||||
32 M ('addi', 'r3, r3, 0x20') B ('mr', 'r4, r27')
|
||||
34 M ('bl', '0') B ('mr', 'r3, r28')
|
||||
35 M ('mr', 'r28, r3') B ('bl', '0')
|
||||
37 M ('lbz', 'r8, 0(r27)') B ('mr', 'r5, r29')
|
||||
38 M ('mr', 'r5, r29') B ('lbz', 'r8, 0(r27)')
|
||||
|
||||
SOGetSockName | S15 socket command and read-only address initialized in one typed helper | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 53a9d11f1936
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S16 source-first read-only request initializer returns the address buffer | insns 63/63 structural/exact (2, 19) | objdiff 95.39683 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 7a7c904069d2
|
||||
|
||||
5 M ('mr', 'r29, r3') B ('mr', 'r28, r3')
|
||||
18 M ('li', 'r29, -0x1c') B ('li', 'r30, -0x1c')
|
||||
22 M ('rlwinm', 'r30, r0, 0, 0, 0x1a') B ('rlwinm', 'r31, r0, 0, 0, 0x1a')
|
||||
23 M ('mr', 'r4, r30') B ('mr', 'r4, r31')
|
||||
26 M ('mr', 'r28, r3') B ('mr', 'r29, r3')
|
||||
28 M ('li', 'r29, -0x31') B ('li', 'r30, -0x31')
|
||||
30 M ('stw', 'r29, 0(r3)') B ('stw', 'r28, 0(r3)')
|
||||
31 M ('addi', 'r31, r3, 0x20') B ('addi', 'r28, r3, 0x20')
|
||||
32 M ('mr', 'r3, r31') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
37 M ('mr', 'r5, r28') B ('mr', 'r5, r29')
|
||||
39 M ('mr', 'r7, r31') B ('mr', 'r7, r28')
|
||||
44 M ('mr', 'r29, r3') B ('mr', 'r30, r3')
|
||||
46 M ('lbz', 'r5, 0(r31)') B ('lbz', 'r5, 0(r28)')
|
||||
48 M ('mr', 'r4, r31') B ('mr', 'r4, r28')
|
||||
50 M ('mr', 'r4, r28') B ('mr', 'r4, r29')
|
||||
51 M ('mr', 'r5, r30') B ('mr', 'r5, r31')
|
||||
54 M ('mr', 'r4, r29') B ('mr', 'r4, r30')
|
||||
|
||||
SOGetSockName S17 final declaration-order search after reference/copy-type/helper trials
|
||||
declaration block:
|
||||
int size;
|
||||
int result;
|
||||
s32 rm;
|
||||
NameRequest* request;
|
||||
SOSockAddr* reply;
|
||||
SOSockAddr* addr;
|
||||
start (2, 3)
|
||||
best (2, 3) after 36 builds; source restored; best order was:
|
||||
int size;
|
||||
int result;
|
||||
s32 rm;
|
||||
NameRequest* request;
|
||||
SOSockAddr* reply;
|
||||
SOSockAddr* addr;
|
||||
|
||||
|
||||
SOGetSockName | S17 final declaration-order result | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 73d59f1449b9
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
FINAL OPEN AUDIT | SOGetSockName | objdiff 96.666664% | 25 distinct successful source trials | all unsuccessful source restored
|
||||
FINAL OPEN AUDIT | DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | objdiff 98.17819% | 23 distinct successful source trials | all unsuccessful source restored
|
||||
Retained source: VIInit hardware register value u16 only, local commit bfe67f5a. No other source/config/header changes. All owned data sections 100%; data symbol/extent corrections unnecessary. DrawFrame remains register-only at 376/376, 119 differences; SOGetSockName remains first-copy setup scheduling at 63/63, 3 differences.
|
||||
|
||||
Final full clean gate over all owned units
|
||||
```
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RVL_SDK/src/vi/vi] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/vi/vi] objdiff: code 11296/11296 data 1944/1944 functions 30/30 fuzzy 100.0000 linked code 0
|
||||
[libs/RVL_SDK/src/vi/vi] instruction-exact functions: 30/30
|
||||
[libs/RVL_SDK/src/vi/vi] section .bss size 368 match 100.0
|
||||
[libs/RVL_SDK/src/vi/vi] section .data size 1368 match 100.0
|
||||
[libs/RVL_SDK/src/vi/vi] section .sbss size 176 match 100.0
|
||||
[libs/RVL_SDK/src/vi/vi] section .sdata size 32 match 100.0
|
||||
[libs/RVL_SDK/src/vi/vi] section .text size 11296 match 100.0
|
||||
[libs/RVL_SDK/src/vi/vi] baseline: code 9944/11296 data 1944 functions 29 fuzzy 99.9752
|
||||
[libs/NW4R/src/lyt/lyt_window] pool: IDENTICAL
|
||||
[libs/NW4R/src/lyt/lyt_window] objdiff: code 9848/11352 data 316/316 functions 20/21 fuzzy 99.7586 linked code 0
|
||||
[libs/NW4R/src/lyt/lyt_window] instruction-exact functions: 20/21
|
||||
[libs/NW4R/src/lyt/lyt_window] section .ctors size 4 match 100.0
|
||||
[libs/NW4R/src/lyt/lyt_window] section .data size 256 match 100.0
|
||||
[libs/NW4R/src/lyt/lyt_window] section .sbss size 8 match 100.0
|
||||
[libs/NW4R/src/lyt/lyt_window] section .sdata2 size 48 match 100.0
|
||||
[libs/NW4R/src/lyt/lyt_window] section .text size 11352 match 99.75864
|
||||
[libs/NW4R/src/lyt/lyt_window] below 100: DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc 98.17819
|
||||
[libs/NW4R/src/lyt/lyt_window] baseline: code 9848/11352 data 316 functions 20 fuzzy 99.7586
|
||||
[libs/RevoEX/src/so/SOBasic] pool: IDENTICAL
|
||||
[libs/RevoEX/src/so/SOBasic] objdiff: code 3836/4088 data 144/144 functions 21/22 fuzzy 99.7945 linked code 0
|
||||
[libs/RevoEX/src/so/SOBasic] instruction-exact functions: 21/22
|
||||
[libs/RevoEX/src/so/SOBasic] section .bss size 40 match 100.0
|
||||
[libs/RevoEX/src/so/SOBasic] section .data size 88 match 100.0
|
||||
[libs/RevoEX/src/so/SOBasic] section .sbss size 8 match 100.0
|
||||
[libs/RevoEX/src/so/SOBasic] section .sdata size 8 match 100.0
|
||||
[libs/RevoEX/src/so/SOBasic] section .text size 4088 match 99.79452
|
||||
[libs/RevoEX/src/so/SOBasic] below 100: SOGetSockName 96.666664
|
||||
[libs/RevoEX/src/so/SOBasic] baseline: code 3836/4088 data 144 functions 21 fuzzy 99.7945
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 91.05281 -> 91.09795
|
||||
global fuzzy_match_percent: 99.58826 -> 99.58836
|
||||
global complete_code_percent: 74.01916 -> 74.01916
|
||||
global matched_data_percent: 99.42271 -> 99.42271
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
GATE PASS
|
||||
```
|
||||
|
||||
Post-gate checks: ninja -C . build/43U/ok progress build/43U/report.json PASS. DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. VIInit ctxdiff 338/338 diffs 0; SOGetSockName 63/63 diffs 3. Final pools identical: vi 7/7, window 1/1, SOBasic 1/1. Git diff --check PASS.
|
||||
Final owned metrics (exact functions, matched code bytes, matched data bytes): vi 29/30,9944/11296,1944/1944 -> 30/30,11296/11296,1944/1944; lyt_window 20/21,9848/11352,316/316 unchanged; SOBasic 21/22,3836/4088,144/144 unchanged.
|
||||
Final origin/main advanced to 805e84045c82629c645e9ef1787c30d2bc33b5e7 during other workers: the local scope diff against merge-base 26d7e1e0 contains only vi.c and this attempts log; no out-of-scope edits. Worker did not rebase, link, push or contact upstream.
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user