From 039cd88528147da98251c3c10e39bf87ef7594fc Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:02:59 -0500 Subject: [PATCH 1/5] cleanup(iplNwc24Manager): name receiving / title-table flags unk_0xA31 -> mbReceiving unk_0xA33 -> mbNewTitleTblReady isUnk0xA31 -> isReceivingIdle (same == false semantics) Touched channelTitle / sdChannelTitle / iplResetHandler callers for the getter rename. Matching units 100% before/after; DOL sha1 unchanged. --- include/system/iplNwc24Manager.h | 6 +++--- src/scene/channelTitle/iplChannelTitle.cpp | 2 +- src/scene/sdChannelTitle/iplSDChannelTitle.cpp | 2 +- src/system/iplNwc24Manager.cpp | 10 +++++----- src/system/iplResetHandler.cpp | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/system/iplNwc24Manager.h b/include/system/iplNwc24Manager.h index 47340ec5..117442a4 100644 --- a/include/system/iplNwc24Manager.h +++ b/include/system/iplNwc24Manager.h @@ -139,7 +139,7 @@ namespace ipl { bool received() { return mbReviecedMsg; } void prepNextReceive() { mbReviecedMsg = false; } - volatile bool isUnk0xA31() { return unk_0xA31 == false; } + volatile bool isReceivingIdle() { return mbReceiving == false; } BOOL isAppDlEnableLock(u32 appId) { utility::autoMutexLock lock(mAutoLock); @@ -175,9 +175,9 @@ namespace ipl { OSMutex mAutoLock; // 0xA18 bool mbReviecedMsg; - bool unk_0xA31; + bool mbReceiving; bool mbReceivePaused; // 0xA32 - bool unk_0xA33; + bool mbNewTitleTblReady; static Arg smArg; diff --git a/src/scene/channelTitle/iplChannelTitle.cpp b/src/scene/channelTitle/iplChannelTitle.cpp index c8d7b4e3..2e9cb6e2 100644 --- a/src/scene/channelTitle/iplChannelTitle.cpp +++ b/src/scene/channelTitle/iplChannelTitle.cpp @@ -648,7 +648,7 @@ namespace ipl { } if (System::getFader()->getStatus() == EGG::Fader::PREPARE_IN && System::isReceiveScheduleStopped()) { - if (System::getNwc24Manager() && !System::getNwc24Manager()->isUnk0xA31()) { + if (System::getNwc24Manager() && !System::getNwc24Manager()->isReceivingIdle()) { goto scn_continue; } diff --git a/src/scene/sdChannelTitle/iplSDChannelTitle.cpp b/src/scene/sdChannelTitle/iplSDChannelTitle.cpp index a359ffaa..1c89bc11 100644 --- a/src/scene/sdChannelTitle/iplSDChannelTitle.cpp +++ b/src/scene/sdChannelTitle/iplSDChannelTitle.cpp @@ -353,7 +353,7 @@ FaderSceneCommand SDChannelTitle::calcFadeout() { mWpadStopTick = OSGetTick(); } if (System::getFader()->getStatus() == EGG::Fader::PREPARE_IN && System::isReceiveScheduleStopped() && - (!System::getNwc24Manager() || System::getNwc24Manager()->isUnk0xA31())) { + (!System::getNwc24Manager() || System::getNwc24Manager()->isReceivingIdle())) { OSReport("NWC24 Scheduler stopped.\n"); NandSDWorker* worker = mpChannelSelect->getWorker(); if (mNextScene == 17) { diff --git a/src/system/iplNwc24Manager.cpp b/src/system/iplNwc24Manager.cpp index 81f315be..8c4a94fc 100644 --- a/src/system/iplNwc24Manager.cpp +++ b/src/system/iplNwc24Manager.cpp @@ -47,7 +47,7 @@ namespace ipl { (((mLastError > NWC24_ERR_FILE_OPEN || mLastError < NWC24_ERR_FILE_OTHER) && mLastError != NWC24_ERR_NAND_CORRUPT) && \ (mLastError != NWC24_ERR_FILE_EXISTS && mLastError != NWC24_ERR_INTERNAL_VF && mLastError != NWC24_ERR_FILE_BROKEN)) - Manager::Manager(EGG::Heap* heap) : mbReviecedMsg(false), unk_0xA31(false), mbReceivePaused(false), unk_0xA33(false) { + Manager::Manager(EGG::Heap* heap) : mbReviecedMsg(false), mbReceiving(false), mbReceivePaused(false), mbNewTitleTblReady(false) { OSInitMutex(&mLock); OSInitMutex(&mAutoLock); @@ -526,7 +526,7 @@ namespace ipl { return; } - unk_0xA31 = true; + mbReceiving = true; NWC24UserId myUserId; getMyUserId(&myUserId); @@ -910,8 +910,8 @@ namespace ipl { close(); - unk_0xA33 = true; - unk_0xA31 = false; + mbNewTitleTblReady = true; + mbReceiving = false; } void Manager::addDlTask() { @@ -996,7 +996,7 @@ namespace ipl { } BOOL Manager::getNewTitleTbl(u32* titleTbl) const { - if (!unk_0xA33) { + if (!mbNewTitleTblReady) { return FALSE; } diff --git a/src/system/iplResetHandler.cpp b/src/system/iplResetHandler.cpp index 81954576..90d6920e 100644 --- a/src/system/iplResetHandler.cpp +++ b/src/system/iplResetHandler.cpp @@ -61,7 +61,7 @@ namespace ipl { if (System::getPostmanManager()->IsUnknown() || (System::getSceneManager() != NULL && System::getScene(SCENE_ADDRESS) != NULL)) { if (System::getNwc24Manager() != NULL && !System::isNandFull()) { - if (System::createdAfterAndLibMgr() && !System::getNwc24Manager()->isUnk0xA31()) { + if (System::createdAfterAndLibMgr() && !System::getNwc24Manager()->isReceivingIdle()) { return; } } -- 2.49.1 From 00013016dfa7ff04c1ad52fa36df35387fbad163 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:03:18 -0500 Subject: [PATCH 2/5] cleanup(iplBS2Manager): name tick/update/abort/restart flags (#857) unk_0x0C -> mbTickEnabled unk_0x0D -> mbUpdateRequested unk_0x0E -> mbAbortRequested unk_0x0F -> mbRestartRequested Matching 100% before/after; DOL sha1 unchanged. --- include/system/iplBS2Manager.h | 8 +++---- src/system/iplBS2Manager.cpp | 38 +++++++++++++++++----------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/include/system/iplBS2Manager.h b/include/system/iplBS2Manager.h index ada4bbe8..5292b035 100644 --- a/include/system/iplBS2Manager.h +++ b/include/system/iplBS2Manager.h @@ -89,10 +89,10 @@ namespace ipl { int mIPLState; // 0x04 volatile BS2State mState; // 0x08 - bool unk_0x0C; - bool unk_0x0D; - bool unk_0x0E; - bool unk_0x0F; + bool mbTickEnabled; // 0x0C + bool mbUpdateRequested; // 0x0D + bool mbAbortRequested; // 0x0E + bool mbRestartRequested; // 0x0F bool mbIsDiagDisc; // 0x10 bool mbIncludesSeatTitles; // 0x11 u8* mpBannerBuffer; // 0x14 diff --git a/src/system/iplBS2Manager.cpp b/src/system/iplBS2Manager.cpp index e8e42717..69f54d5c 100644 --- a/src/system/iplBS2Manager.cpp +++ b/src/system/iplBS2Manager.cpp @@ -14,7 +14,7 @@ namespace ipl { namespace bs2 { Manager::Manager(EGG::Heap* pHeap) - : mIPLState(IPL_STATE_NO_DISK), mState(BS2_STT_NO_DISK), unk_0x0C(true), unk_0x0D(false), unk_0x0E(false), unk_0x0F(false), + : mIPLState(IPL_STATE_NO_DISK), mState(BS2_STT_NO_DISK), mbTickEnabled(true), mbUpdateRequested(false), mbAbortRequested(false), mbRestartRequested(false), mbIsDiagDisc(false), mbIncludesSeatTitles(false), mbHasBanner(FALSE), mUnlockedState(BS2_STT_NO_DISK), mbStartUpdate(false), mEntries(NULL), mEntrySize(1), mEntryOffset(0) { mpBannerBuffer = new (pHeap, DEFAULT_ALIGN) u8[BS2_DEFAULT_BANNER_SIZE]; @@ -30,13 +30,13 @@ namespace ipl { return mIPLState; } - if (unk_0x0F && !System::isNandFull()) { + if (mbRestartRequested && !System::isNandFull()) { BS2RestartStateMachine(); - unk_0x0C = true; + mbTickEnabled = true; mIPLState = IPL_STATE_NO_DISK; - unk_0x0F = false; - } else if (unk_0x0C) { + mbRestartRequested = false; + } else if (mbTickEnabled) { BOOL old = OSDisableInterrupts(); mState = BS2Tick(); @@ -51,7 +51,7 @@ namespace ipl { if (mbIsDiagDisc && System::isRsrcLoaded()) { __WPADReconnect(TRUE); - unk_0x0C = false; + mbTickEnabled = false; bootNewSystem(); } } @@ -65,7 +65,7 @@ namespace ipl { } void Manager::startUpdate() { - unk_0x0D = true; + mbUpdateRequested = true; mbStartUpdate = true; mPrevEntry = 0; mPrevFound = 0; @@ -88,11 +88,11 @@ namespace ipl { } void Manager::reserveRVLGame() { - unk_0x0C = false; + mbTickEnabled = false; } void Manager::reserveGCGame() { - unk_0x0C = false; + mbTickEnabled = false; } void Manager::startRVLGame() { @@ -103,13 +103,13 @@ namespace ipl { } void Manager::abort() { - unk_0x0E = true; - unk_0x0F = false; + mbAbortRequested = true; + mbRestartRequested = false; } void Manager::restart() { - unk_0x0E = false; - unk_0x0F = true; + mbAbortRequested = false; + mbRestartRequested = true; System::checkNandOverFlowFlagAsync(); } @@ -195,7 +195,7 @@ namespace ipl { break; } case BS2_STT_64: { - unk_0x0C = false; + mbTickEnabled = false; mIPLState = IPL_STATE_8; break; } @@ -216,25 +216,25 @@ namespace ipl { } void Manager::execTick(BS2State state) { - if (unk_0x0D) { + if (mbUpdateRequested) { if (state == BS2_STT_UPDATE_DISK) { BS2StartUpdate(); } else { mbStartUpdate = false; } - } else if (unk_0x0E) { + } else if (mbAbortRequested) { if (state == BS2_STT_NO_DISK || state == BS2_STT_COVER_OPEN || state == BS2_STT_55 || state == BS2_STT_WRONG_DISK || state == BS2_STT_66 || state == BS2_STT_67 || state == BS2_STT_68 || state == BS2_STT_FATAL_ERROR || state == BS2_STT_UPDATE_FAILED || state == BS2_STT_DIRTY_DISK) { - unk_0x0C = false; + mbTickEnabled = false; mIPLState = IPL_STATE_8; } else { BS2AbortStateMachine(); } } - unk_0x0D = false; - unk_0x0E = false; + mbUpdateRequested = false; + mbAbortRequested = false; } void Manager::updateTick() { -- 2.49.1 From 99d6fe20a296fd5ba621df120be82879b860d427 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:03:44 -0500 Subject: [PATCH 3/5] cleanup(eZiText): rename work unk_0x1410 to formats (#858) Saved/restored as savedFormats; assigned from formats arrays. --- libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h | 2 +- libs/RVLMiddleware/eZiText/src/clib/zi8getc2.c | 4 ++-- libs/RVLMiddleware/eZiText/src/clib/ziswordw.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h b/libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h index 300ce3de..c1183293 100644 --- a/libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h +++ b/libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h @@ -265,7 +265,7 @@ struct __zi8_work_data_s { ziPtr unk_0x11FC; ziPtr userKeys[0x83]; // 0x1200 ziU8 unk_0x140C[4]; - ziU32 unk_0x1410; + ziU32 formats; // 0x1410 ziU8 unk_0x1414[4]; ziU8 unk_0x1418; ziU8 unk_0x1419; diff --git a/libs/RVLMiddleware/eZiText/src/clib/zi8getc2.c b/libs/RVLMiddleware/eZiText/src/clib/zi8getc2.c index 58b64a8f..39a33f61 100644 --- a/libs/RVLMiddleware/eZiText/src/clib/zi8getc2.c +++ b/libs/RVLMiddleware/eZiText/src/clib/zi8getc2.c @@ -50,10 +50,10 @@ ziBool Zi8ZHsetZYfuzzyPairs(ziFuzzyZYPairs pairs ZI_NEED_WORK) { ziBool Zi8SetLatinSearchOrder(ziU8* searchArray, ziU8 searchSize ZI_NEED_WORK) { if (searchArray == 0 || *searchArray == 0) { - ZI_WORK->unk_0x1410 = (ziU32)Zi8SOdefaultArray; + ZI_WORK->formats = (ziU32)Zi8SOdefaultArray; ZI_WORK->unk_0x1418 = 9; } else { - ZI_WORK->unk_0x1410 = (ziU32)searchArray; + ZI_WORK->formats = (ziU32)searchArray; ZI_WORK->unk_0x1418 = searchSize; } return 1; diff --git a/libs/RVLMiddleware/eZiText/src/clib/ziswordw.c b/libs/RVLMiddleware/eZiText/src/clib/ziswordw.c index 3b6eceff..487f3aae 100644 --- a/libs/RVLMiddleware/eZiText/src/clib/ziswordw.c +++ b/libs/RVLMiddleware/eZiText/src/clib/ziswordw.c @@ -45,7 +45,7 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) { ziWChar* cursor; ziU8* data; ziU8 formats[8] = {1, 5, 0, 0, 0, 0, 0, 0}; - ziU32 savedFormats = ZI_WORK->unk_0x1410; + ziU32 savedFormats = ZI_WORK->formats; ziU8 savedCount = ZI_WORK->unk_0x1418; ziSearchState search = {0}; Zi8LogError(100, __zi8_work_data); @@ -73,7 +73,7 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) { request.candidates = ordinals; request.maxCandidates = 1; request.firstCandidate = 0; - ZI_WORK->unk_0x1410 = (ziU32)formats; + ZI_WORK->formats = (ziU32)formats; if (ZI_WORK->unk_0x1C[0] == 2) { ZI_WORK->unk_0x1418 = 0; if (ZI_WORK->unk_0x09 & 1) formats[ZI_WORK->unk_0x1418++] = 1; @@ -87,7 +87,7 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) { } else if (ZI_WORK->unk_0x1C[0] != 0) ZI_WORK->unk_0x1418 = 2; else ZI_WORK->unk_0x1418 = 1; count = Zi8GetCandidatesOrCount(&request, &search, __zi8_work_data); - ZI_WORK->unk_0x1410 = savedFormats; + ZI_WORK->formats = savedFormats; ZI_WORK->unk_0x1418 = savedCount; if (count != 0) return 1; } -- 2.49.1 From 4e3ab6eae52d971d5508ec1b73657851fb0e521f Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:04:10 -0500 Subject: [PATCH 4/5] cleanup(jdec): rename MCU product fields to mcuTotal (#859) Frame unk_0x14 and work unk_0x1804 are mcuX*mcuY totals. --- libs/RVLMiddleware/TMC_JPEG/include/tmc_jpeg_internal.h | 4 ++-- libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec.c | 2 +- libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/RVLMiddleware/TMC_JPEG/include/tmc_jpeg_internal.h b/libs/RVLMiddleware/TMC_JPEG/include/tmc_jpeg_internal.h index 79f1b885..b8d4469d 100644 --- a/libs/RVLMiddleware/TMC_JPEG/include/tmc_jpeg_internal.h +++ b/libs/RVLMiddleware/TMC_JPEG/include/tmc_jpeg_internal.h @@ -63,7 +63,7 @@ typedef struct { u8 mcuYRem; // 0x0F u16 mcuYCount; // 0x10 u16 mcuXCount2; // 0x12 - u32 unk_0x14; + u32 mcuTotal; // 0x14 u8 remX; // 0x18 u8 remY; // 0x19 u8 compCount; // 0x1A @@ -142,7 +142,7 @@ struct TMCCJPEGDecWork_t { u8 mcuYRem; // 0x17FF u16 mcuYCount; // 0x1800 u16 mcuXCount2; // 0x1802 - u32 unk_0x1804; + u32 mcuTotal; // 0x1804 u8 remX; // 0x1808 u8 remY; // 0x1809 u8 compCount; // 0x180A diff --git a/libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec.c b/libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec.c index 39255d50..ba2f145c 100644 --- a/libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec.c +++ b/libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec.c @@ -51,7 +51,7 @@ s32 TMCJPEGDEC_Setsize(TMCCJPEGDecWork* work) { } state->componentCount = work->componentCount; - state->result = work->unk_0x1804; + state->result = work->mcuTotal; state->maxX = work->mcuYCount; state->maxY = work->mcuXCount2; diff --git a/libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main.c b/libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main.c index d4b09d88..03271645 100644 --- a/libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main.c +++ b/libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main.c @@ -567,7 +567,7 @@ s32 TMCJPEGDEC_scan_varinit(TMCCJPEGDecWork* work) { p->mcuYCount = p->mcuYCount + ((u8)remX != 0 ? 1 : 0); p->mcuXCount2 = p->mcuXCount2 + ((u8)remY != 0 ? 1 : 0); - p->unk_0x14 = (u32)p->mcuYCount * (u32)p->mcuXCount2; + p->mcuTotal = (u32)p->mcuYCount * (u32)p->mcuXCount2; for (idx = 0; idx < (s32)p->scanCompCount; idx++) { u8 compId; @@ -1929,7 +1929,7 @@ static s32 TMCJPEGDEC_parse_sof(TMCCJPEGDecWork* work) { mcuCountY += yr; frameInfo->mcuYCount = mcuCountX; frameInfo->mcuXCount2 = mcuCountY; - work->unk_0x1804 = (u32)mcuCountX * (u32)mcuCountY; + work->mcuTotal = (u32)mcuCountX * (u32)mcuCountY; } compCount2 = frameInfo->compCount; -- 2.49.1 From 09de907f0b48a1fa72d15d2892231b072d62958b Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:04:17 -0500 Subject: [PATCH 5/5] cleanup(eZiText): rename work unk_0x141F to maxCnt (#860) Tracks max context->cnt during DAWG match in Matching zi8dawg. --- libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h | 2 +- libs/RVLMiddleware/eZiText/src/clib/zi8dawg.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h b/libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h index c1183293..33546c24 100644 --- a/libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h +++ b/libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h @@ -273,7 +273,7 @@ struct __zi8_work_data_s { ziU8 unk_0x141C; ziU8 unk_0x141D; ziU8 unk_0x141E; - ziU8 unk_0x141F; + ziU8 maxCnt; // 0x141F ziU8 unk_0x1420[4]; zi8DawgCtx dawgCtx; // 0x1424 ziU8 unk_0x1760[4]; // 0x1760 diff --git a/libs/RVLMiddleware/eZiText/src/clib/zi8dawg.c b/libs/RVLMiddleware/eZiText/src/clib/zi8dawg.c index 7241ef16..71a0c81c 100644 --- a/libs/RVLMiddleware/eZiText/src/clib/zi8dawg.c +++ b/libs/RVLMiddleware/eZiText/src/clib/zi8dawg.c @@ -136,7 +136,7 @@ descend: records[context->cnt].node = ZiDAWGGetChild(records[context->cnt - 1].node); if (records[context->cnt].node == (ziU8*)0) goto next_sibling; context->cnt++; - if (ZI_WORK->unk_0x141F < context->cnt) ZI_WORK->unk_0x141F = context->cnt; + if (ZI_WORK->maxCnt < context->cnt) ZI_WORK->maxCnt = context->cnt; goto update_current; next_sibling: while (context->cnt != 0) { @@ -238,7 +238,7 @@ unsigned int Zi8MatchROMdata2(ziWChar* elements, ziU8 count, ziU8 language, } } search_segment: - ZI_WORK->unk_0x141F = 1; + ZI_WORK->maxCnt = 1; result = Zi8MatchROMdata1(elements + ZI_WORK->unk_0x17EA, count - ZI_WORK->unk_0x17EA, language, &ZI_WORK->unk_0x17F4[ZI_WORK->unk_0x17EA], capacity, @@ -262,8 +262,8 @@ search_segment: if (elements[index] == 0xeff1) goto finish_segments; } } - if (ZI_WORK->unk_0x141F > capacity) goto finish_segments; - for (index = ZI_WORK->unk_0x141F; index != 0; index--) { + if (ZI_WORK->maxCnt > capacity) goto finish_segments; + for (index = ZI_WORK->maxCnt; index != 0; index--) { result = Zi8MatchROMdata1(elements + ZI_WORK->unk_0x17EA, index, language, &ZI_WORK->unk_0x17F4[ZI_WORK->unk_0x17EA], capacity, 1, 0, ZI_WORK->unk_0x1768, (char*)group, -- 2.49.1