Compare commits

...

34 Commits

Author SHA1 Message Date
coah
1a40c8586f eZiText: rename work unk_0x1C to formatMode
ziswordw uses byte 0 to choose how many word formats to try
(0 -> 1, nonzero -> 2, 2 -> expand from formatFlags). Split the
mis-sized [3] array into formatMode + pads; the OOB [3] write maps
to neighboring unk_0x1F.
2026-10-02 14:46:40 -05:00
coah
11c75ddb62 cleanup(eZiText): rename work unk_0x17 to zhPudMinPrefix (#935)
Init to 5; Chinese PUD entries whose first payload byte is below this
are skipped.
2026-10-02 14:45:11 -05:00
coah
15b9f71a6e cleanup(eZiText): rename work unk_0x0C to targetCount (#933)
Init to 0xFFFF; Zi8Punctuation count-mode stops when count >= targetCount.
2026-10-02 14:45:06 -05:00
coah
0a7baea67a cleanup(eZiText): align ziSwParam with ZiCandidateOptions (#932)
zi8getSW receives ZiCandidateOptions* as ziPtr; rename the local
view fields to match (keep ziS32 maxCount for signed compares).
2026-10-02 14:44:40 -05:00
coah
6f6f63cb81 cleanup(puh_ker_tsk): rename unused manager tail fields to pads (#931)
The four u32s after entries[] are never read or written.
2026-10-02 14:44:14 -05:00
coah
4a046a17ab cleanup(AxAdpcmPlayer): rename VoiceInfo update sync flag (#930)
unk_0x0C / getUnk_0x0C / setUnk_0x0C → mUpdateFlag / getUpdateFlag / setUpdateFlag

Cross-thread voice sync: main sets 1, calc() promotes to 2, audio callback clears to 0.
2026-10-02 14:43:48 -05:00
coah
842c850c10 cleanup(eZiText): rename dawg flags forceAltGraph/advanceGroup (#928)
unk_0x141C gates FI+group 0xC alternate graphTableId; unk_0x141D
controls whether NextDawgGroup skips the first group.
2026-10-02 14:42:42 -05:00
coah
6b95233f01 cleanup(uusb_ppc): name outstanding counters and intrEndpoint2 (#927)
at_0x38/48 track in-flight bulk/intr USB reads (cap 5); at_0x13 sits
with the other endpoint bytes and is only cleared.
2026-10-02 14:42:16 -05:00
coah
2dba9bd13b cleanup(hcisu_h2): name tHCISU_H2_CB receive/open fields (#926)
From init/receive_msg: p_rx_msg, bytes_left, buf_size, pkt_type,
len_hi, rx_state, open_state, task_id, mbox.
2026-10-02 14:41:49 -05:00
coah
fd775c34dc link(iplChannelSelect: native weak vtable / Hermite emission) (link1) (worker bf02f407) (#934) 2026-10-02 14:39:44 -05:00
coah
a8ab2099cd cleanup(puh_ker_msg): name messages companion and unused pad (#924)
Entry +4 is the OSMessage* array slot beside queue (OSInitMessageQueue
layout); manager +0x14 is never referenced.
2026-10-02 14:37:35 -05:00
coah
96db1eac04 match(iplSetting 109/112) (#923)
* match(iplSetting 107/112): initKeyboard + data symbol pairing

initKeyboard: drop zero-inits on rowLimit/stringLimit, decl order for
callee-saved regs, KeyboardSetting field store order (IPL_SETTING layout),
Zi dictionary temps evaluated system-then-oem for arg regs.

symbols.txt: shrink scAnmTable to 0xE8 and name absorbed rodata literals;
add missing .data @string literals in unlabeled gaps; rename .sdata lbl_*
to matching @ names so .data relocs pair (.data fuzzy 71%→97%).

* match(iplSetting 108/112): createBrowser

Separate case 7 from default in the direct-page switch so MWCC
emits the target cmpwi/8 shape; default leaves the path unset.
createBrowser 98.85 → 100. DOL SHA1 unchanged.

* match(iplSetting 109/112): calcKeyboard

Drop formText=NULL inits (target has no early zeros) and split
asterisks[index++]=* into store then index++ for loop shape.
calcKeyboard 98.0 → 100. createBrowser still 100. DOL unchanged.
2026-10-02 14:37:30 -05:00
coah
5a332eceba cleanup(iplChannelSelect): rename ortho translate/scale fields (#922)
unk_0xD8 -> mOrthoTrans; unk_0xE4 -> mOrthoScale (setOrthoTransAndScale).
Byte-identical.
2026-10-02 14:37:03 -05:00
coah
ed2d5b30b4 cleanup(eZiText): align ziGetParam count/completion with EZTX (#921)
Rename unk_0x20 → count and count → completion so ziGetParam matches
EZTXGetParam under TIZISTRING_IMPLEMENTATION (same offsets; cast in eztx.c).
2026-10-02 14:36:35 -05:00
coah
02dbcc53bd cleanup(usb): name USBCommandBlock isoArg and pads (#920)
unkIsoArg is the second arg to USBIsoCallback; unk_0x10/0x38 are
unused gaps before clean[] and the path/msg union.
2026-10-02 14:36:28 -05:00
coah
2da1c58f2c cleanup(NWC24MsgObj): rename trailing unk_0xF4/F8/FC to pad (#919)
Never read or written; sit after iconNew at end of NWC24MsgObjPrivate.
2026-10-02 14:36:01 -05:00
coah
1c8ada226a cleanup(NWC24FriendList): rename FLHeader unk_0x20 to pad_0x20 (#918)
Unused 7×u32 gap between confirmedBits and listFlags; never read or
written by name (only whole-header memset/IO). Matching unit stays OK.
2026-10-02 14:35:34 -05:00
coah
f05f7bbcf7 cleanup(eZiText): rename work unk_0x12E to uwdPrioritySort (#917)
When set, UWD insert stops at first lower-priority candidate.
2026-10-02 14:35:08 -05:00
coah
f508371ca0 cleanup(eZiText): rename work unk_0x00 to getcPhase (#916)
Multi-pass getc state (0..9 / tab) shared by Zi8punct and zi8getc2.
2026-10-02 14:34:22 -05:00
coah
7216fd527f cleanup(eZiText): rename work unk_0x130/138 to uwdDicts/uwdDictCount (#914)
User-word dictionary ptr stack + depth (mirrors pudTable/pudCount).
2026-10-02 14:33:56 -05:00
coah
26e90aa988 cleanup(eZiText): rename work unk_0x1B30 to koAltTables (#913)
Korean path selects alternate hangul tables when non-zero.
2026-10-02 14:33:31 -05:00
coah
e059ea0632 cleanup(puh_ker_tsk): rename entry unk_0x00/04 to thread/stack (#912)
OSThread* used with OSSetThreadPriority; following buffer is task stack.
2026-10-02 14:33:04 -05:00
coah
e6f54e254d cleanup(usb_kbd): rename async mem unk_0x09 to reserved (#911)
HID boot-keyboard reserved byte between modifiers and keycodes.
2026-10-02 14:32:37 -05:00
coah
299a6ca724 cleanup(puh_ker_sem): name semaphore manager fields (#910)
initCount/flags from create args; usedCount active slots; lockSem manager lock.
2026-10-02 14:30:27 -05:00
coah
77439a3268 cleanup(iplChannelManager): name mbDiskChannelReady (#908)
unk_0x1B81 -> mbDiskChannelReady
isUnk_0x1B81 -> isDiskChannelReady
setUnk_0x1B81 -> setDiskChannelReady

Set when BS2 enters RVL_GAME and disk banner info is applied; cleared when
disk banner data is consumed or channel UI dismisses it.

Touched channelSelect / channelTitle callers.

Matching 100% before/after; DOL sha1 unchanged.
2026-10-02 14:29:40 -05:00
coah
f65fac3351 cleanup(WPAD): rename CB unk_0x910 to suppressDisconnect (#907)
When set, comm-timeout path skips WPADiDisconnect and reports TRANSFER.
2026-10-02 14:29:12 -05:00
coah
c7ceb3efe0 cleanup(WPAD): name FS/CL stick min/max calib fields (#903)
DEBUGPrint labels X/Y max/min beside stick centers in calibration.
2026-10-02 14:27:25 -05:00
coah
401d0c88e7 cleanup(eZiText): rename work unk_0x12C to uwdPtrCount (#901)
Count of ZH user-word ptr stack entries (distinct from uwdCount @ 0x1C7).
2026-10-02 14:26:58 -05:00
coah
6cb5ac9ded cleanup(eZiText): name unicode map range fields in work (#900)
Zi8Uni2Ptr OEM remap table + two char ranges + subLanguage gate.
2026-10-02 14:26:31 -05:00
coah
8870c4aa75 cleanup(NWC24FriendList): rename FLHeader unk_0x3C to listFlags (#898)
Written by SetListFlag (OR of flag bits on add).
2026-10-02 14:25:44 -05:00
coah
402687106b cleanup(NWC24FriendList): rename Get/SetUnkFlag helpers (#897)
GetUnkFlag/SetUnkFlag → GetConfirmedBit/SetConfirmedBit;
SetUnkFlag2 → SetListFlag (writes FLHeader unk_0x3C).
2026-10-02 14:25:17 -05:00
coah
2080aeb0cf cleanup(NWC24FriendList): rename FLHeader unk_0x10 to confirmedBits (#896)
Per-friend bitfield; GetUnkFlag==1 sets NWC24_FRIENDSTATUS_CONFIRMED.
2026-10-02 14:24:50 -05:00
coah
1f3d89772e cleanup(iplChannelScriptManager): name CSData mbHasNewMessage (#895)
unk_0x1A -> mbHasNewMessage

Set true when starting channel script, cleared when the title has no new
NWC24 message (isNewMessageThere).

Touched channelSelect / channelTitle / sdChannelTitle writers.

Matching 100% before/after; DOL sha1 unchanged.
2026-10-02 14:24:22 -05:00
coah
f429cd07cc cleanup(CDBRecord): rename unk_0x00 to database (#894)
Held as CDBDatabase*; copied to recordFile->database.
2026-10-02 14:23:55 -05:00
48 changed files with 618 additions and 485 deletions

View File

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

View File

@@ -13904,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
@@ -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

View File

@@ -766,7 +766,7 @@ 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"),
]

View File

@@ -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
};

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

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

View File

@@ -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; }

View File

@@ -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 {
@@ -204,7 +204,7 @@ 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
@@ -212,26 +212,28 @@ struct __zi8_work_data_s {
ziU8 unk_0x09;
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 formatMode; // 0x1C
ziU8 pad_0x1D; // 0x1D
ziU8 pad_0x1E; // 0x1E
ziU8 unk_0x1F;
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;
@@ -270,8 +272,8 @@ struct __zi8_work_data_s {
ziU8 formatCount;
ziU8 unk_0x1419;
ziU16 capacity; // 0x141A
ziU8 unk_0x141C;
ziU8 unk_0x141D;
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];
@@ -309,12 +311,12 @@ 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;
@@ -328,7 +330,7 @@ struct __zi8_work_data_s {
ziU32 msb : 1;
} bits;
} unk_0x1B2C;
ziU8 unk_0x1B30;
ziU8 koAltTables; // 0x1B30
ziU8 unk_0x1B31;
ziU16 unk_0x1B32;
ziU16 unk_0x1B34;

View File

@@ -21,7 +21,7 @@ ziS32 Zi8Punctuation(ziGetParam* param ZI_NEED_WORK) {
}
if (fc == 0) {
count++;
if (ZI_WORK->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;

View File

@@ -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;

View File

@@ -425,8 +425,8 @@ static int zi8InternalGetZH(ziGetParam* request, ZiChineseOptions* options, ziPt
charset <<= 4;
skipCount = request->firstCandidate;
request->letters = 0;
request->completion = 0;
request->count = 0;
request->unk_0x20 = 0;
if (getMode != 7 && getMode != 10 && getMode != 8 && getMode != 9) {
Zi8PrepareMatch(request, &match, 0, work);
} else {
@@ -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;

View File

@@ -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,7 +231,7 @@ unsigned int Zi8MatchROMdata2(ziWChar* elements, ziU8 count, ziU8 language,
if (status == 0) {
ZI_WORK->unk_0x1768 = 0;
ZI_WORK->matchOffset = 0;
if (group != 0 && *group == 0xc && language == 10 && ZI_WORK->unk_0x141C != 0) {
if (group != 0 && *group == 0xc && language == 10 && ZI_WORK->forceAltGraph != 0) {
ZI_WORK->graphTableId = 0x10;
} else {
ZI_WORK->graphTableId = 0;

View File

@@ -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;

View File

@@ -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,17 +477,17 @@ 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;
@@ -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)) {

View File

@@ -20,10 +20,10 @@ ziU8 Zi8InitializeDynamic(ziLanguageEntry* langEntries ZI_NEED_WORK) {
ZI_WORK->unk_0x09 = 1;
ZI_WORK->maxWordLength = 0xFF;
ZI_WORK->unk_0x10 = 0x64;
*(ziU16*)&ZI_WORK->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->pad_0x1E = 0;
ZI_WORK->koAltTables = 0;
ZI_WORK->unk_0x1B3A = 0;
ZI_WORK->unk_0x1B36 = 0;
ZI_WORK->unk_0x1B32 = 0;
@@ -43,11 +43,11 @@ 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_0x1F = 0;
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->pyFuzzy.bits.msb = 1;
ZI_WORK->unk_0x1B2C.bits.msb = 1;

View File

@@ -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]) {

View File

@@ -102,7 +102,7 @@ ziU32 Zi8MatchPUDdata_ZHS(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar*
wordSize = *word++;
entrySize = wordSize;
if (language == 1) {
if (ZI_WORK->unk_0x17 > *word) goto next;
if (ZI_WORK->zhPudMinPrefix > *word) goto next;
wordSize--;
entrySize--;
word++;

View File

@@ -41,7 +41,7 @@ ziBool Zi8_81480224(ziUserWord* word ZI_NEED_WORK) {
current = ZI_WORK->uwdList;
while (current != 0) {
candidate = (ziUserWord*)current->word;
if (ZI_WORK->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;

View File

@@ -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 {

View File

@@ -74,7 +74,7 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
request.maxCandidates = 1;
request.firstCandidate = 0;
ZI_WORK->formats = (ziU32)formats;
if (ZI_WORK->unk_0x1C[0] == 2) {
if (ZI_WORK->formatMode == 2) {
ZI_WORK->formatCount = 0;
if (ZI_WORK->unk_0x09 & 1) formats[ZI_WORK->formatCount++] = 1;
if (ZI_WORK->unk_0x09 & 4) formats[ZI_WORK->formatCount++] = 2;
@@ -84,7 +84,7 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
if (ZI_WORK->unk_0x09 & 4) formats[ZI_WORK->formatCount++] = 6;
if (ZI_WORK->unk_0x09 & 2) formats[ZI_WORK->formatCount++] = 7;
if (ZI_WORK->unk_0x09 & 8) formats[ZI_WORK->formatCount++] = 8;
} else if (ZI_WORK->unk_0x1C[0] != 0) ZI_WORK->formatCount = 2;
} else if (ZI_WORK->formatMode != 0) ZI_WORK->formatCount = 2;
else ZI_WORK->formatCount = 1;
count = Zi8GetCandidatesOrCount(&request, &search, __zi8_work_data);
ZI_WORK->formats = savedFormats;

View File

@@ -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) {

View File

@@ -239,7 +239,7 @@ ziBool Zi8PrepareMatch(ziGetParam* request, ziMatchParam* match, ziU8 skipMode Z
}
if ((request->getMode == '\x01') || (request->getMode == '\f')) {
match->nCand = Zi8GetPyPhonetic(request->elements,elementCount,match->phon,match->phon2,
&request->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;

View File

@@ -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();

View File

@@ -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
@@ -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

View File

@@ -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;
}

View File

@@ -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();
}

View File

@@ -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);

View File

@@ -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) {

View File

@@ -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();

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -190,7 +190,7 @@ static s32 WPADiSendData(s32 chan, WPADCommand command) {
if (status == WPAD_ERR_COMMUNICATION_ERROR) {
if ((s32)OSTicksToSeconds(__OSGetSystemTime() - p->lastReportSendTime) > 1 && _sleepTime != 0) {
if (!p->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;
@@ -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);
}

View File

@@ -393,48 +393,48 @@ static void getExtConfig(s32 chan, s32 result) {
p_wpd->extConfig.u.fs.accX1g = (s16)((u16)(((u16)(p_buf[index + 4]) << 2) & 0xFFFC) | (u16)(((u16)(p_buf[index + 7]) >> 4) & 3));
p_wpd->extConfig.u.fs.accY1g = (s16)((u16)(((u16)(p_buf[index + 5]) << 2) & 0xFFFC) | (u16)(((u16)(p_buf[index + 7]) >> 2) & 3));
p_wpd->extConfig.u.fs.accZ1g = (s16)((u16)(((u16)(p_buf[index + 6]) << 2) & 0xFFFC) | (u16)(((u16)(p_buf[index + 7])) & 3));
p_wpd->extConfig.u.fs.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;
}

View File

@@ -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;

View File

@@ -79,9 +79,9 @@ typedef struct NWC24MsgObjPrivate {
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

View File

@@ -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

View File

@@ -58,7 +58,7 @@ void CDBRecordInstanceInit(CDBRecordFile* recordFile, CDBRecord* record, int typ
recordFile->used = 1;
OSUnlockMutex((OSMutex*)recordFile);
recordFile->allocFlag = type;
recordFile->database = record->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);

View File

@@ -27,7 +27,7 @@ static NWC24Err GetCachedFLHeader(NWC24FLHeader** header);
static ChkHostNameError CheckHostName(const char* hostName, u32 hostNameLength);
static inline NWC24Err CheckFriendInfo(const NWC24FriendInfo* friendInfo);
static u32 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) {

View File

@@ -53,7 +53,7 @@ void AudioFrameCallback() {
for (i = 0; i < AX_VOICE_MAX; i++) {
VoiceInfo* currVoice = &Voices[i];
if (currVoice->getAXVPB() == NULL && currVoice->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);
}
}
}

View File

@@ -436,10 +436,10 @@ namespace ipl {
data.titleId = System::getChannelManager()->getTitleID(mChanPage, mChanIndex);
data.threadTerminated = mbModuleTerminated;
data.unk_0x19 = true;
data.unk_0x1A = true;
data.mbHasNewMessage = true;
if (!(System::getNwc24Manager() != NULL && System::getNwc24Manager()->isNewMessageThere(ES_TITLE_CODE(data.titleId)))) {
data.unk_0x1A = false;
data.mbHasNewMessage = false;
}
System::getCSManager()->setData(data);

View File

@@ -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 {

View File

@@ -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;
}
@@ -1767,7 +1767,7 @@ namespace ipl {
data.threadTerminated = mbModuleTerminated;
if (System::getNwc24Manager() == NULL || !System::getNwc24Manager()->isNewMessageThere(ES_TITLE_CODE(data.titleId))) {
data.unk_0x1A = false;
data.mbHasNewMessage = false;
}
System::getCSManager()->setData(data);
if (!System::getCSManager()->init(mpModuleFile, mpModuleThread)) {
@@ -2064,7 +2064,7 @@ namespace ipl {
break;
}
case DISK_STATE_WII_DISK_IDLE: {
if (BS2State != bs2::IPL_STATE_RVL_GAME || System::getChannelManager()->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);

View File

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

View File

@@ -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;

View File

@@ -91,7 +91,7 @@ namespace ipl {
extern "C" const u32 scLangLookup__Q23ipl7channel[][16];
Manager::Manager(EGG::Heap* heap)
: mpHeap(heap), mState(INIT), mbCanRefresh(0), 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;

View 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.