Compare commits

...

15 Commits

Author SHA1 Message Date
coah
095d1d857b cleanup(iplUtility): rename BScroller/Scroller unk fields
BScroller: unk_0x08/0x10 → mCurPos/mStartPos
Scroller: unk_0x3C/44/48/4C → mVelocity/mAnimFrom/mFriction/mAccel

Verified: iplUtility 100%/100%, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d
2026-10-02 14:56:48 -05:00
coah
8864436cde match(iplChannelObj 56/56) (near1c) (worker f210b2fc) (#946) 2026-10-02 14:56:25 -05:00
coah
a9a3f36cf0 usbkbd: rename USBKBDCmdLEDAsync unused gap to pad_0x08 (#945)
Padding between USBKBDCmdLED base and the async callback fields;
never accessed by name in Matching usb_kbd.
2026-10-02 14:51:48 -05:00
coah
ffeed96e49 cleanup(iplCSSavedata): rename sMountPath (#943)
unk_0x00 → sMountPath: optional NAND archive path used to VF-mount @CS.
Empty → load from NAND via sPath; set (two-arg ctor) → load_vf_ mounts
that path and opens sPath inside the volume.
2026-10-02 14:49:08 -05:00
coah
1216db0acb sc: rename SC_BT_DEV_INFO unused gaps to pad_* (#942)
unk_0x14 / unk_0x15 / unk_0x30 sit between devName and linkKey
(and after linkKey) with no named field readers in Matching units;
mark them as pads.
2026-10-02 14:48:42 -05:00
coah
85b993f48c cleanup(eZiText): rename work unk_0x1F to ignoreCase (#938)
When set, PUD/UWD/OEM matching tries Zi8ChangeCharCase and UWD
stores the folded form in the alt prefix buffer.
2026-10-02 14:47:52 -05:00
coah
a2a0460567 cleanup(AudioWavePlayer): rename mbFillInCallback (#937)
unk_0xB5 → mbFillInCallback: when true MakeWave runs in the wave-packet
callback; when false it runs from update(). Ctor defaults true.
2026-10-02 14:47:25 -05:00
coah
df0fa22203 cleanup(eZiText): rename zi8DawgCtx unk_0x338 to endNode (#936)
Walk stops when the current node equals endNode; cleared on reset.
2026-10-02 14:47:19 -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
23 changed files with 10351 additions and 121 deletions

View File

@@ -53,9 +53,9 @@ Progress
<!-- progress:start -->
| Decompiled | Matched | Linked | Data |
|:---:|:---:|:---:|:---:|
| 99.59% | 90.92% | 73.37% | 99.37% |
| 99.59% | 90.94% | 73.37% | 99.37% |
units 960/1027 complete, functions 12368/12563 matched.
units 960/1027 complete, functions 12369/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

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

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

@@ -32,8 +32,8 @@ namespace ipl {
void set_arw_param();
int mState; // 0x04
math::VEC2 unk_0x08;
math::VEC2 unk_0x10;
math::VEC2 mCurPos;
math::VEC2 mStartPos;
f32 mSpeed; // 0x18
f32 mSoundFreq; // 0x1C
};
@@ -55,7 +55,7 @@ namespace ipl {
void init() {
mState = 0;
mScroll = 0.0f;
unk_0x3C = 0.0f;
mVelocity = 0.0f;
mUpLimit = 0.0f;
mDownLimit = 0.0f;
}
@@ -92,11 +92,11 @@ namespace ipl {
int mState; // 0x30
f32 mDownLimit; // 0x34
f32 mUpLimit; // 0x38
f32 unk_0x3C;
f32 mVelocity;
f32 mScroll; // 0x40
f32 unk_0x44;
f32 unk_0x48;
f32 unk_0x4C;
f32 mAnimFrom;
f32 mFriction;
f32 mAccel;
};
} // namespace utility
} // namespace ipl

View File

@@ -195,7 +195,7 @@ typedef struct _zi8DawgCtx {
ziU8* table; // 0x10
ziU8* p14; // 0x14
zi8DawgRec recs[0x32]; // 0x18
ziU32 unk_0x338; // 0x338
ziU32 endNode; // 0x338
} zi8DawgCtx;
typedef struct _ziUwdNode {
@@ -212,16 +212,16 @@ 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 unk_0x1F;
ziU8 ignoreCase;
ziU16 unk_0x20[0x40];
ziU16 unk_0xA0[0x42];
ziU16* unk_0x124[1];
@@ -270,8 +270,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];

View File

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

View File

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

@@ -20,7 +20,7 @@ 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->koAltTables = 0;
@@ -47,7 +47,7 @@ ziU8 Zi8InitializeDynamic(ziLanguageEntry* langEntries ZI_NEED_WORK) {
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

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

View File

@@ -148,7 +148,7 @@ ziU8 Zi8MatchUWDdata(ziWChar* pattern, ziU8 length, ziWChar* currentWord, ziU16
folded = currentWord[position];
ZI_WORK->unk_0x141[previousOffset] = Zi8ConvertWC2UC(folded, language, __zi8_work_data);
ZI_WORK->unk_0x184[previousOffset] = 0;
if (ZI_WORK->unk_0x1F != 0) {
if (ZI_WORK->ignoreCase != 0) {
if (!Zi8ChangeCharCase(1, &folded, language, __zi8_work_data)) Zi8ChangeCharCase(0, &folded, language, __zi8_work_data);
ZI_WORK->unk_0x184[previousOffset] = Zi8ConvertWC2UC(folded, language, __zi8_work_data);
}
@@ -192,7 +192,7 @@ next:
if (pattern[position] != Zi8ConvertUC2Key(text[position], language, __zi8_work_data)) goto next;
} else {
folded = Zi8ConvertUC2WC(text[position], language, __zi8_work_data);
if (folded != pattern[position] && (!ZI_WORK->unk_0x1F || !Zi8ChangeCharCase(0, &folded, language, __zi8_work_data) || folded != pattern[position])) goto next;
if (folded != pattern[position] && (!ZI_WORK->ignoreCase || !Zi8ChangeCharCase(0, &folded, language, __zi8_work_data) || folded != pattern[position])) goto next;
}
}
if (ZI_WORK->unk_0x140 != 0) {

View File

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

View File

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

View File

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

View File

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

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

@@ -9,10 +9,10 @@ static struct {
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) {

View File

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

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

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

View File

@@ -674,7 +674,8 @@ namespace ipl {
if (foundLangGroup) {
nw4r::lyt::Group* group = layout->FindGroupByName(langGroup);
for (nw4r::lyt::PaneLinkList::Iterator it = group->GetPaneList().GetBeginIter(); it != group->GetPaneList().GetEndIter(); it++) {
nw4r::lyt::Group* const& groupView = group;
for (nw4r::lyt::PaneLinkList::Iterator it = groupView->GetPaneList().GetBeginIter(); it != groupView->GetPaneList().GetEndIter(); it++) {
it->mTarget->SetVisible(true);
}
} else {
@@ -685,7 +686,8 @@ namespace ipl {
}
if (strcmp(scModuleData.langGroupLookup[region][i], langCodeBuf[scLangLookup[region][i]]) == 0) {
nw4r::lyt::Group* group = layout->FindGroupByName(scModuleData.langGroupLookup[region][i]);
for (nw4r::lyt::PaneLinkList::Iterator it = group->GetPaneList().GetBeginIter(); it != group->GetPaneList().GetEndIter(); it++) {
nw4r::lyt::Group* const& groupView = group;
for (nw4r::lyt::PaneLinkList::Iterator it = groupView->GetPaneList().GetBeginIter(); it != groupView->GetPaneList().GetEndIter(); it++) {
it->mTarget->SetVisible(true);
}
break;

View File

@@ -141,10 +141,10 @@ namespace ipl {
void BScroller::init() {
mState = -1;
unk_0x08.x = 0.0f;
unk_0x08.y = 0.0f;
unk_0x10.x = 0.0f;
unk_0x10.y = 0.0f;
mCurPos.x = 0.0f;
mCurPos.y = 0.0f;
mStartPos.x = 0.0f;
mStartPos.y = 0.0f;
mSpeed = 0.0f;
mSoundFreq = 0.0f;
}
@@ -178,10 +178,10 @@ namespace ipl {
mState = chan;
unk_0x08.x = math::abs_clamp<float>(ctrl->getDpdPos().x, 1.f);
unk_0x08.y = math::abs_clamp<float>(ctrl->getDpdPos().y, 1.f);
mCurPos.x = math::abs_clamp<float>(ctrl->getDpdPos().x, 1.f);
mCurPos.y = math::abs_clamp<float>(ctrl->getDpdPos().y, 1.f);
unk_0x10 = unk_0x08;
mStartPos = mCurPos;
System::getPointer()->setState(mState, Pointer::STATE_SCROLL);
System::getPointer()->setScrollState(mState);
@@ -199,20 +199,20 @@ namespace ipl {
System::getPointer()->setScrollState(Pointer::NO_SCROLL);
init();
} else if (ctrl->isValidDpd()) {
unk_0x08.x = math::abs_clamp<float>(ctrl->getDpdPos().x, 1.f);
unk_0x08.y = math::abs_clamp<float>(ctrl->getDpdPos().y, 1.f);
mCurPos.x = math::abs_clamp<float>(ctrl->getDpdPos().x, 1.f);
mCurPos.y = math::abs_clamp<float>(ctrl->getDpdPos().y, 1.f);
mSpeed = _get();
set_arw_param();
} else {
if (math::abs<float>(unk_0x08.x) < math::abs<float>(unk_0x08.y)) {
if (math::abs<float>(mCurPos.x) < math::abs<float>(mCurPos.y)) {
f32 newVal;
if (unk_0x08.y < 0.0f) {
if (mCurPos.y < 0.0f) {
newVal = -1.0f;
} else {
newVal = 1.0f;
}
unk_0x08.y = newVal;
mCurPos.y = newVal;
mSpeed = _get();
set_arw_param();
}
@@ -234,7 +234,7 @@ namespace ipl {
}
f32 BScroller::_get() {
f32 diff = unk_0x08.y - unk_0x10.y;
f32 diff = mCurPos.y - mStartPos.y;
f32 result = 0.f;
if (diff < -0.01f) {
result = -10.0f * (diff * diff);
@@ -259,7 +259,7 @@ namespace ipl {
nw4r::ut::Rect rect;
System::getProjectionRect(&rect);
f32 arrowLen = math::abs<float>(unk_0x10.y - unk_0x08.y) * rect.GetHeight();
f32 arrowLen = math::abs<float>(mStartPos.y - mCurPos.y) * rect.GetHeight();
System::getPointer()->setArrowLength(arrowLen);
System::getPointer()->setCursorScrolling(math::abs<float>(mSpeed) > 0.0f);
@@ -291,11 +291,11 @@ namespace ipl {
mState = 0;
mDownLimit = 0.0f;
mUpLimit = 0.0f;
unk_0x3C = 0.0f;
mVelocity = 0.0f;
mScroll = 0.0f;
unk_0x44 = 0.0f;
unk_0x48 = 0.6f;
unk_0x4C = 1.5f;
mAnimFrom = 0.0f;
mFriction = 0.6f;
mAccel = 1.5f;
anim.init(0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0, 1.0f);
}
@@ -319,26 +319,26 @@ namespace ipl {
switch (mState) {
case Pointer::SCROLL_CON_UP: {
unk_0x3C = unk_0x3C * unk_0x48 - unk_0x4C;
if (unk_0x3C > 0.0f) {
unk_0x3C = 0.0f;
mVelocity = mVelocity * mFriction - mAccel;
if (mVelocity > 0.0f) {
mVelocity = 0.0f;
}
mScroll += unk_0x3C;
mScroll += mVelocity;
mState = Pointer::SCROLL;
break;
}
case Pointer::SCROLL_CON_DOWN: {
unk_0x3C = unk_0x3C * unk_0x48;
unk_0x3C += unk_0x4C;
if (unk_0x3C < 0.0f) {
unk_0x3C = 0.0f;
mVelocity = mVelocity * mFriction;
mVelocity += mAccel;
if (mVelocity < 0.0f) {
mVelocity = 0.0f;
}
mScroll += unk_0x3C;
mScroll += mVelocity;
mState = Pointer::SCROLL;
break;
}
case Pointer::SCROLL_BTN_UP: {
unk_0x44 = oldScroll;
mAnimFrom = oldScroll;
anim.init(0.0f, -300.0f, 20.0f, 0.0f, 0.0f, 0, 1.0f);
anim.initFrame();
anim.restart();
@@ -346,7 +346,7 @@ namespace ipl {
break;
}
case Pointer::SCROLL_BTN_DOWN: {
unk_0x44 = oldScroll;
mAnimFrom = oldScroll;
anim.init(0.0f, 300.0f, 20.0f, 0.0f, 0.0f, 0, 1.0f);
anim.initFrame();
anim.restart();
@@ -355,10 +355,10 @@ namespace ipl {
}
case Pointer::SCROLLING_BY_BTN: {
anim.calc();
mScroll = unk_0x44 + anim.get();
mScroll = mAnimFrom + anim.get();
if (!anim.isPlaying()) {
unk_0x3C = 0.0f;
mVelocity = 0.0f;
anim.initFrame();
anim.calc();
mState = Pointer::SCROLL;

File diff suppressed because it is too large Load Diff