From f05f7bbcf7b69573bdf7196a4c88b851e252b514 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:35:08 -0500 Subject: [PATCH 1/6] cleanup(eZiText): rename work unk_0x12E to uwdPrioritySort (#917) When set, UWD insert stops at first lower-priority candidate. --- libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h | 2 +- libs/RVLMiddleware/eZiText/src/clib/zi8uwd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h b/libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h index bf56e953..144ea06e 100644 --- a/libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h +++ b/libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h @@ -228,7 +228,7 @@ struct __zi8_work_data_s { ziU8* unk_0x128; ziU8 uwdPtrCount; // 0x12C ziU8 unk_0x12D; - ziU8 unk_0x12E; + ziU8 uwdPrioritySort; // 0x12E ziU8 unk_0x12F; ziPtr uwdDicts[2]; // 0x130 ziU8 uwdDictCount; // 0x138 diff --git a/libs/RVLMiddleware/eZiText/src/clib/zi8uwd.c b/libs/RVLMiddleware/eZiText/src/clib/zi8uwd.c index 525c2a8c..3e7eea93 100644 --- a/libs/RVLMiddleware/eZiText/src/clib/zi8uwd.c +++ b/libs/RVLMiddleware/eZiText/src/clib/zi8uwd.c @@ -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) { -- 2.49.1 From 1c8ada226a7391ab528df127cf15c4a662dac75c Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:35:34 -0500 Subject: [PATCH 2/6] cleanup(NWC24FriendList): rename FLHeader unk_0x20 to pad_0x20 (#918) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unused 7×u32 gap between confirmedBits and listFlags; never read or written by name (only whole-header memset/IO). Matching unit stays OK. --- libs/RevoEX/include/private/nwc24/NWC24FriendList.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/RevoEX/include/private/nwc24/NWC24FriendList.h b/libs/RevoEX/include/private/nwc24/NWC24FriendList.h index e80cd57c..0a4cf3f7 100644 --- a/libs/RevoEX/include/private/nwc24/NWC24FriendList.h +++ b/libs/RevoEX/include/private/nwc24/NWC24FriendList.h @@ -18,7 +18,7 @@ typedef struct NWC24FLHeader { u32 infoCount; // 0x08 u32 registeredCount; // 0x0C u32 confirmedBits[4]; // 0x10 - u32 unk_0x20[7]; + u32 pad_0x20[7]; // unused u32 listFlags; // 0x3C NWC24UserId friendIds[NWC24_FRIEND_INFO_MAX]; // 0x40 } NWC24FLHeader; -- 2.49.1 From 2da1c58f2c1b14de0754929ddbc23394a011d7a5 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:36:01 -0500 Subject: [PATCH 3/6] cleanup(NWC24MsgObj): rename trailing unk_0xF4/F8/FC to pad (#919) Never read or written; sit after iconNew at end of NWC24MsgObjPrivate. --- libs/RevoEX/include/private/nwc24/NWC24MsgObj.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/RevoEX/include/private/nwc24/NWC24MsgObj.h b/libs/RevoEX/include/private/nwc24/NWC24MsgObj.h index dc0f521d..65ed6407 100644 --- a/libs/RevoEX/include/private/nwc24/NWC24MsgObj.h +++ b/libs/RevoEX/include/private/nwc24/NWC24MsgObj.h @@ -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 -- 2.49.1 From 02dbcc53bdf195d3b2aa22f56460ad2c2f913dd2 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:36:28 -0500 Subject: [PATCH 4/6] 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. --- libs/RVL_SDK/include/private/usb.h | 2 +- libs/RVL_SDK/src/usb/usb.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/RVL_SDK/include/private/usb.h b/libs/RVL_SDK/include/private/usb.h index 1d6f0eb8..18d32395 100644 --- a/libs/RVL_SDK/include/private/usb.h +++ b/libs/RVL_SDK/include/private/usb.h @@ -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(); diff --git a/libs/RVL_SDK/src/usb/usb.c b/libs/RVL_SDK/src/usb/usb.c index c1137473..849adb21 100644 --- a/libs/RVL_SDK/src/usb/usb.c +++ b/libs/RVL_SDK/src/usb/usb.c @@ -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); -- 2.49.1 From 463aa6b048ffe720da8ffc17aea47c13d430013f Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:36:32 -0500 Subject: [PATCH 5/6] cleanup(puh_ker_tsk): rename unused manager tail fields to pads The four u32s after entries[] are never read or written. --- libs/RVL_SDK/src/usbcmn/puh_ker_tsk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/RVL_SDK/src/usbcmn/puh_ker_tsk.c b/libs/RVL_SDK/src/usbcmn/puh_ker_tsk.c index 5cbc5933..10f44815 100644 --- a/libs/RVL_SDK/src/usbcmn/puh_ker_tsk.c +++ b/libs/RVL_SDK/src/usbcmn/puh_ker_tsk.c @@ -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) { -- 2.49.1 From ed2d5b30b46940f63b16670dd1f7b44b2ac06984 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:36:35 -0500 Subject: [PATCH 6/6] cleanup(eZiText): align ziGetParam count/completion with EZTX (#921) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename unk_0x20 → count and count → completion so ziGetParam matches EZTXGetParam under TIZISTRING_IMPLEMENTATION (same offsets; cast in eztx.c). --- .../eZiText/include/zi8clib/zitypes.h | 10 ++++----- .../RVLMiddleware/eZiText/src/clib/zi8cgetc.c | 22 +++++++++---------- .../RVLMiddleware/eZiText/src/clib/zi8getc2.c | 4 ++-- .../RVLMiddleware/eZiText/src/clib/zikorean.c | 10 ++++----- libs/RVLMiddleware/eZiText/src/clib/zkokeyp.c | 18 +++++++-------- .../RVLMiddleware/eZiText/src/clib/zprepare.c | 8 +++---- 6 files changed, 36 insertions(+), 36 deletions(-) diff --git a/libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h b/libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h index 144ea06e..ce724428 100644 --- a/libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h +++ b/libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h @@ -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 { diff --git a/libs/RVLMiddleware/eZiText/src/clib/zi8cgetc.c b/libs/RVLMiddleware/eZiText/src/clib/zi8cgetc.c index 59287a5a..942d2c67 100644 --- a/libs/RVLMiddleware/eZiText/src/clib/zi8cgetc.c +++ b/libs/RVLMiddleware/eZiText/src/clib/zi8cgetc.c @@ -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)) { @@ -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; diff --git a/libs/RVLMiddleware/eZiText/src/clib/zi8getc2.c b/libs/RVLMiddleware/eZiText/src/clib/zi8getc2.c index 324b6e1e..e3cb4597 100644 --- a/libs/RVLMiddleware/eZiText/src/clib/zi8getc2.c +++ b/libs/RVLMiddleware/eZiText/src/clib/zi8getc2.c @@ -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)) { diff --git a/libs/RVLMiddleware/eZiText/src/clib/zikorean.c b/libs/RVLMiddleware/eZiText/src/clib/zikorean.c index e038d8a3..a4ba8593 100644 --- a/libs/RVLMiddleware/eZiText/src/clib/zikorean.c +++ b/libs/RVLMiddleware/eZiText/src/clib/zikorean.c @@ -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; @@ -185,7 +185,7 @@ ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument, 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++; diff --git a/libs/RVLMiddleware/eZiText/src/clib/zkokeyp.c b/libs/RVLMiddleware/eZiText/src/clib/zkokeyp.c index a32e4ec8..8706f9cd 100644 --- a/libs/RVLMiddleware/eZiText/src/clib/zkokeyp.c +++ b/libs/RVLMiddleware/eZiText/src/clib/zkokeyp.c @@ -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) { diff --git a/libs/RVLMiddleware/eZiText/src/clib/zprepare.c b/libs/RVLMiddleware/eZiText/src/clib/zprepare.c index 64dff2b7..f337ec92 100644 --- a/libs/RVLMiddleware/eZiText/src/clib/zprepare.c +++ b/libs/RVLMiddleware/eZiText/src/clib/zprepare.c @@ -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; -- 2.49.1