From 401d0c88e763fb890bc4ff7c189b79cc64d41169 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:26:58 -0500 Subject: [PATCH 1/3] cleanup(eZiText): rename work unk_0x12C to uwdPtrCount (#901) Count of ZH user-word ptr stack entries (distinct from uwdCount @ 0x1C7). --- libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h | 2 +- libs/RVLMiddleware/eZiText/src/clib/zi8ZHuwd.c | 6 +++--- libs/RVLMiddleware/eZiText/src/clib/zi8cgetc.c | 2 +- 3 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 16cb8859..b1bbe34a 100644 --- a/libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h +++ b/libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h @@ -226,7 +226,7 @@ struct __zi8_work_data_s { ziU16 unk_0xA0[0x42]; ziU16* unk_0x124[1]; ziU8* unk_0x128; - ziU8 unk_0x12C; + ziU8 uwdPtrCount; // 0x12C ziU8 unk_0x12D; ziU8 unk_0x12E; ziU8 unk_0x12F; diff --git a/libs/RVLMiddleware/eZiText/src/clib/zi8ZHuwd.c b/libs/RVLMiddleware/eZiText/src/clib/zi8ZHuwd.c index 3611b6fb..b4eadef0 100644 --- a/libs/RVLMiddleware/eZiText/src/clib/zi8ZHuwd.c +++ b/libs/RVLMiddleware/eZiText/src/clib/zi8ZHuwd.c @@ -2,14 +2,14 @@ #include 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; diff --git a/libs/RVLMiddleware/eZiText/src/clib/zi8cgetc.c b/libs/RVLMiddleware/eZiText/src/clib/zi8cgetc.c index 94ebb4d4..59287a5a 100644 --- a/libs/RVLMiddleware/eZiText/src/clib/zi8cgetc.c +++ b/libs/RVLMiddleware/eZiText/src/clib/zi8cgetc.c @@ -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; -- 2.49.1 From 826254531d6d889ccb6b9dee27a86f49344233b4 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:27:24 -0500 Subject: [PATCH 2/3] cleanup(NWC24FriendList): rename FLHeader unk_0x20 to pad_0x20 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 c7ceb3efe077dca7dd49508cf4e2bd1faab56b54 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:27:25 -0500 Subject: [PATCH 3/3] cleanup(WPAD): name FS/CL stick min/max calib fields (#903) DEBUGPrint labels X/Y max/min beside stick centers in calibration. --- .../include/private/wpad/WPADInternal.h | 24 +++++----- libs/RVL_SDK/src/wpad/WPADHIDParser.c | 48 +++++++++---------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/libs/RVL_SDK/include/private/wpad/WPADInternal.h b/libs/RVL_SDK/include/private/wpad/WPADInternal.h index 266f103d..13d7dee0 100644 --- a/libs/RVL_SDK/include/private/wpad/WPADInternal.h +++ b/libs/RVL_SDK/include/private/wpad/WPADInternal.h @@ -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 diff --git a/libs/RVL_SDK/src/wpad/WPADHIDParser.c b/libs/RVL_SDK/src/wpad/WPADHIDParser.c index cea48c48..61e23778 100644 --- a/libs/RVL_SDK/src/wpad/WPADHIDParser.c +++ b/libs/RVL_SDK/src/wpad/WPADHIDParser.c @@ -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; } -- 2.49.1