From d022642a3e84a445f6efdcdb52eda8b1f475f890 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Mon, 5 Oct 2026 11:06:00 +0000 Subject: [PATCH] refactor: name placeholder fields in browser, TVRC, NHTTP and keyboard utilities; reformat NHTTP stdlib (rx21) (worker a5a11fba) --- include/iplwww/www_browser.h | 16 +- include/iplwww/www_window.h | 10 +- include/keyboard/tiHwKeyboard.h | 10 +- include/keyboard/tiUtil.h | 2 +- include/scene/board/iplFocusObject.h | 6 +- include/system/TVRC.h | 4 +- include/system/iplTVRCManager.h | 20 +- libs/OperaWWW/include/revolution/www_types.h | 22 +- libs/RevoEX/include/private/nhttp.h | 38 +- libs/RevoEX/src/nhttp/NHTTP_control.c | 2 +- libs/RevoEX/src/nhttp/NHTTP_list.c | 2 +- libs/RevoEX/src/nhttp/NHTTP_request.c | 6 +- libs/RevoEX/src/nhttp/NHTTP_socket_RVL.c | 2 +- libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL.c | 301 +++++++++---- libs/RevoEX/src/nhttp/NHTTP_thread.c | 26 +- libs/RevoEX/src/nhttp/d_nhttp.c | 2 +- libs/RevoEX/src/nhttp/d_nhttp_common.c | 34 +- libs/RevoEX/src/nhttp/d_nhttp_private.c | 4 +- src/iplwww/www_browser.cpp | 54 +-- src/iplwww/www_trasition.cpp | 10 +- src/iplwww/www_wiisetting.cpp | 10 +- src/iplwww/www_window.cpp | 48 +-- src/keyboard/tiHwKeyboard.cpp | 24 +- src/keyboard/tiUtil.cpp | 40 +- src/scene/board/iplFocusObject.cpp | 22 +- src/system/TVRC.cpp | 14 +- src/system/iplTVRCManager.cpp | 60 +-- tools/decomp-assist/rx21.renames.md | 427 +++++++++++++++++++ 28 files changed, 888 insertions(+), 328 deletions(-) create mode 100644 tools/decomp-assist/rx21.renames.md diff --git a/include/iplwww/www_browser.h b/include/iplwww/www_browser.h index 3249490a..185c14da 100644 --- a/include/iplwww/www_browser.h +++ b/include/iplwww/www_browser.h @@ -142,10 +142,10 @@ namespace ext_ead { u32 eventType; // 0x00 u32 imeID; // 0x04 char* text; // 0x08 - u32 unk_0x0C; // 0x0c - u32 unk_0x10; // 0x10 - u32 unk_0x14; // 0x14 - u32 unk_0x18; // 0x18 + u32 creationDataA; // 0x0c + u32 creationDataB; // 0x10 + u32 creationDataC; // 0x14 + u32 creationDataD; // 0x18 u32 maxLength; // 0x1c ImeData& operator=(const ImeData&); @@ -177,7 +177,7 @@ namespace ext_ead { struct { u32 imeID; char* str; - u32 unk_0x0C; + u32 updateData; } updateIme; // ID 4 u32 raw[6]; } data; @@ -203,12 +203,12 @@ namespace ext_ead { void CreateImeData(ImeData* data, const WWWIMEData* wwwData); void DisposeImeData(ImeData* data); - void CommitIme(ImeData* data, const char* something); + void CommitIme(ImeData* data, const char* text); void CommitImeCmdPacket(const CmdPacket* data); void UpdateImeCmdPacket(const CmdPacket* data); - static void FlushCallback(WWWRect* rect, int unk); + static void FlushCallback(WWWRect* rect, int callbackData); u32* GetRaster() { return mpRaster; } WWWHandle* GetHandle() { return mpBrowserHandle; } @@ -222,7 +222,7 @@ namespace ext_ead { bool CheckThreadExit_(); void InitSurface_(); - void InitFonts_(const char* unk); + void InitFonts_(const char* fontDirectory); void SendKeyboardEvent_(u32 btnMask, u32 triggerFlag, u32 releaseFlag, WWWKeySym sym); WWWKeySym GetKeyboardSym_(u32 input); diff --git a/include/iplwww/www_window.h b/include/iplwww/www_window.h index 7c27b10c..a8df3887 100644 --- a/include/iplwww/www_window.h +++ b/include/iplwww/www_window.h @@ -23,7 +23,7 @@ namespace ext_ead { void SendNotifyEvent(WWWEvent event, WWWHandleEventData* dataHandle); void ExecuteEvent(); void UpdateTexture(); - void* GetTextureBuffer(int a, bool b, WWWRect** rectPtrOut); + void* GetTextureBuffer(int pageOffset, bool forUpdate, WWWRect** rectPtrOut); void SetWindowSize(int w, int h); WWWHandlewindow* GetHandleWindow() { return mpWwwWindow; }; @@ -55,10 +55,10 @@ namespace ext_ead { u32 mRenderingMode; // 0x2AC public: - int unk_0x2B0; // 0x2B0 - u32 unk_0x2B4[2]; // 0x2B4 - u32 unk_0x2BC; // 0x2BC - u32 unk_0x2C0; // 0x2C0 + int mDisplayPageIndex; // 0x2B0 + u32 mDisplayBufferIndices[2]; // 0x2B4 + u32 mUpdateBufferIndex; // 0x2BC + u32 mUpdatePageIndex; // 0x2C0 u8 mPageLoadStatus[6]; // 0x2C4 }; } // namespace www diff --git a/include/keyboard/tiHwKeyboard.h b/include/keyboard/tiHwKeyboard.h index 2e0029b8..e265d6b1 100644 --- a/include/keyboard/tiHwKeyboard.h +++ b/include/keyboard/tiHwKeyboard.h @@ -52,17 +52,17 @@ namespace textinput { const Manager *mgr() const { return mpManager; } Manager* mpManager; // 0x10 - u8 field_0x14; // 0x14 + u8 mbShiftTapPending; // 0x14 #ifdef TIINPUTFORM_IMPLEMENTATION u8 mbSingleQuoteClosing; u8 mbDoubleQuoteClosing; #else #ifdef TIHWKEYBOARD_IMPLEMENTATION - bool field_0x15; - bool field_0x16; + bool mbSingleQuoteClosing; + bool mbDoubleQuoteClosing; #else - u8 field_0x15; // 0x15 - u8 field_0x16; // 0x16 + u8 mbSingleQuoteClosing; // 0x15 + u8 mbDoubleQuoteClosing; // 0x16 #endif #endif }; diff --git a/include/keyboard/tiUtil.h b/include/keyboard/tiUtil.h index 69ee8d4e..d13f7ffd 100644 --- a/include/keyboard/tiUtil.h +++ b/include/keyboard/tiUtil.h @@ -34,7 +34,7 @@ namespace textinput { void replaceChar(char* dest, u32 destLen, const char* src, int replaceIdx, char newCh); bool isAlphabet(wchar_t ch); - f32 hermiteInterporation(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6); + f32 hermiteInterporation(f32 time, f32 startTime, f32 startValue, f32 startTangent, f32 endTime, f32 endValue, f32 endTangent); void getProjectionRect4x3(nw4r::ut::Rect* rect); void getProjectionRect16x9(nw4r::ut::Rect* rect); diff --git a/include/scene/board/iplFocusObject.h b/include/scene/board/iplFocusObject.h index 1982a7e3..715c487b 100644 --- a/include/scene/board/iplFocusObject.h +++ b/include/scene/board/iplFocusObject.h @@ -332,12 +332,12 @@ namespace ipl { scroller mScroller; // 0x58 picture mPicture; // 0xC8 - int unk_0xF8; - u8 unk_0xFC; + int mReservedWord; + u8 mReservedByte; EGG::Allocator mGUIAlloc; // 0x100 - wchar_t unk_0x114[6]; + wchar_t mUrlTerminators[6]; u8* mpCmpArcData; // 0x120 u8* mpArcData; // 0x124 diff --git a/include/system/TVRC.h b/include/system/TVRC.h index 03debca2..e613f978 100644 --- a/include/system/TVRC.h +++ b/include/system/TVRC.h @@ -40,8 +40,8 @@ enum { typedef struct tagSTVRCSettings { u32 magic; // 0x00 - u32 unk_0x04; - u32 unk_0x08; + u32 formatVersion; + u32 configurationValid; u32 modelMakerID; // 0x0C u32 modelType; // 0x10 u8 commandMap[TVRC_COMMAND_MAP_MAX]; // 0x14 diff --git a/include/system/iplTVRCManager.h b/include/system/iplTVRCManager.h index 8d302451..a055b712 100644 --- a/include/system/iplTVRCManager.h +++ b/include/system/iplTVRCManager.h @@ -55,27 +55,27 @@ namespace ipl { STATE_12, }; - u32 unk_0x04; + u32 mbDisabledTriggerEnabled; BOOL mbInitialized; // 0x08 nand::SharedFile* mpDBFile; // 0x0C BOOL mbResetting; // 0x10 s32 mCurrentCommand; // 0x14 - u32 unk_0x18; - u32 unk_0x1C; + u32 mRepeatCount; + u32 mbRepeatCommand; u32 mModelMakerID; // 0x20 u32 mModelType; // 0x24 BOOL mbPrepTVRC; // 0x28 void* mpDatabaseArc; // 0x2C - OSTime unk_0x30; - OSTime unk_0x38; - OSTime unk_0x40; - OSTime unk_0x48; + OSTime mCommandTransitionTime; + OSTime mMuteStartTime; + OSTime mSoundShutupTime; + OSTime mLastCommandTime; int mCmdMaps[TVRC_COMMAND_MAP_MAX]; // 0x50 u32 mState; // 0x70 - OSTick unk_0x74; + OSTick mDisabledTriggerTick; BOOL mbDisabled; // 0x78 - BOOL unk_0x7C; - u8 unk_0x80; + BOOL mbDisabledTriggerPending; + u8 mDisabledTriggerState; undefined unused_0x81[7]; }; } // namespace ipl diff --git a/libs/OperaWWW/include/revolution/www_types.h b/libs/OperaWWW/include/revolution/www_types.h index d24a49aa..0cf2183d 100644 --- a/libs/OperaWWW/include/revolution/www_types.h +++ b/libs/OperaWWW/include/revolution/www_types.h @@ -130,11 +130,11 @@ typedef struct WWWProtocolData { typedef struct WWWIMEData { u32 imeID; // 0x00 const char* text; // 0x04 - u32 unk_0x08; - u32 unk_0x0C; - u32 unk_0x10; - u32 unk_0x14; - u32 unk_0x18; + u32 creationDataA; + u32 creationDataB; + u32 creationDataC; + u32 creationDataD; + u32 creationDataE; u32 maxLength; // 0x1C } WWWIMEData; @@ -153,7 +153,7 @@ typedef union { typedef struct WWWJSPluginValue { s32 ty; - u8 unk_0x04[4]; + u8 reserved[4]; WWWJSPluginValueData data; } WWWJSPluginValue; @@ -171,12 +171,12 @@ typedef struct JSCallbackSet { typedef struct WWWJSCap { const char** name; - int unk_0x04; + int capabilityWord; JSGetterSetter getter; - void* unk_0x0C; - void* unk_0x10; - void* unk_0x14; - void* unk_0x18; + void* capabilityDataA; + void* capabilityDataB; + void* capabilityDataC; + void* capabilityDataD; JSAllowAccess allowAccess; } WWWJSCap; diff --git a/libs/RevoEX/include/private/nhttp.h b/libs/RevoEX/include/private/nhttp.h index a2a8937f..d5268b11 100644 --- a/libs/RevoEX/include/private/nhttp.h +++ b/libs/RevoEX/include/private/nhttp.h @@ -32,9 +32,9 @@ typedef s32 (*NHTTPConnectionCallback)(NHTTPConnectionInfo* connection, typedef struct NHTTPConnectionCallbackParam { void* value; - u32 _unk4; - u32 _unk8; - u32 _unkC; + u32 bufferAddressOrSize; + u32 sizeOrBodyOffset; + u32 postOffset; } NHTTPConnectionCallbackParam; typedef struct NHTTPPostSendArg @@ -59,7 +59,7 @@ typedef struct NHTTPHeader char* name; char* value; u32 length; - u32 _unk14; + u32 isBinary; } NHTTPHeader; typedef struct NHTTPReqQueue @@ -68,7 +68,7 @@ typedef struct NHTTPReqQueue struct NHTTPReqQueue* prev; s32 requestId; NHTTPRequestInfo* volatile request; - s32 _unk10; + s32 socket; } NHTTPReqQueue; typedef struct NHTTPListInfo @@ -137,7 +137,7 @@ struct NHTTPRequestInfo BOOL clientCertDefault; u32 verifyOption; NHTTPEncodingType encodingType; - void* _unkD4; + void* sslInitParam; u32 builtinRootCA; u32 builtinClientCert; char proxyServer[0x100]; @@ -147,7 +147,7 @@ struct NHTTPRequestInfo u32 recvBufferSize; const void* postBuffer; u32 postBufferSize; - void* _unk250; + void* postSendCallback; }; struct NHTTPConnectionInfo @@ -155,28 +155,28 @@ struct NHTTPConnectionInfo BOOL started; s32 state; s32 sslError; - u32 _unkC; + u32 completionPending; NHTTPRequestInfo* request; NHTTPResponseInfo* response; s32 requestId; NHTTPConnectionCallback callback; NHTTPConnectionInfo* next; - u32 _unk24; - u32 _unk28; + u32 postDataAddress; + u32 postDataSize; u32 virtualContentLength; NHTTPReqCallback requestCallback; - u32 _unk34; - u32 _unk38; - u32 _unk3C; + u32 reserved0; + u32 reserved1; + u32 reserved2; u8 recvBuf[0x8000]; u32 recvBufOffset; u32 recvBufDataLen; - u32 _unk8048; - u32 _unk804C; - u32 _unk8050; - u32 _unk8054; - u32 _unk8058; - u32 _unk805C; + u32 reserved3; + u32 reserved4; + u32 reserved5; + u32 reserved6; + u32 reserved7; + u32 reserved8; }; #endif // PRIVATE_NHTTP_H diff --git a/libs/RevoEX/src/nhttp/NHTTP_control.c b/libs/RevoEX/src/nhttp/NHTTP_control.c index adc5225f..a1efbe09 100644 --- a/libs/RevoEX/src/nhttp/NHTTP_control.c +++ b/libs/RevoEX/src/nhttp/NHTTP_control.c @@ -49,7 +49,7 @@ static BOOL addHdrList(NHTTPHeader** list, NHTTPBgnEndInfo* info, char* name, header->name = name; header->value = value; header->length = 0; - header->_unk14 = 0; + header->isBinary = 0; if (*list != NULL) { diff --git a/libs/RevoEX/src/nhttp/NHTTP_list.c b/libs/RevoEX/src/nhttp/NHTTP_list.c index 2a600916..27c6a3cb 100644 --- a/libs/RevoEX/src/nhttp/NHTTP_list.c +++ b/libs/RevoEX/src/nhttp/NHTTP_list.c @@ -37,7 +37,7 @@ s32 NHTTPi_setReqQueue(NHTTPListInfo* info, NHTTPRequestInfo* request) queue->requestId = info->nextRequestId++; queue->request = request; - queue->_unk10 = -1; + queue->socket = -1; requestId = queue->requestId; if (info->nextRequestId < 0) diff --git a/libs/RevoEX/src/nhttp/NHTTP_request.c b/libs/RevoEX/src/nhttp/NHTTP_request.c index 55dce86d..e5acce68 100644 --- a/libs/RevoEX/src/nhttp/NHTTP_request.c +++ b/libs/RevoEX/src/nhttp/NHTTP_request.c @@ -264,7 +264,7 @@ NHTTPRequestInfo* NHTTP_CreateRequest(NHTTPBgnEndInfo* bgnEndInfo_p, req_p->rootCASize = 0; req_p->clientCertDefault = FALSE; req_p->verifyOption = 0; - req_p->_unkD4 = NULL; + req_p->sslInitParam = NULL; req_p->response->param_p = param_p; req_p->proxyEnabled = FALSE; req_p->recvBufferSize = 0; @@ -446,7 +446,7 @@ BOOL NHTTP_CancelRequestAsync(void* sysInfo_p, s32 id) { reqCurrent_p->request->cancel = TRUE; NHTTPi_SocCancel(mutexInfo_p, reqCurrent_p->request, - reqCurrent_p->_unk10); + reqCurrent_p->socket); rc = TRUE; } } @@ -478,7 +478,7 @@ void NHTTPi_cancelAllRequests(void* sysInfo_p) { reqCurrent_p->request->cancel = TRUE; NHTTPi_SocCancel(mutexInfo_p, reqCurrent_p->request, - reqCurrent_p->_unk10); + reqCurrent_p->socket); } } diff --git a/libs/RevoEX/src/nhttp/NHTTP_socket_RVL.c b/libs/RevoEX/src/nhttp/NHTTP_socket_RVL.c index 31310a01..de1ab362 100644 --- a/libs/RevoEX/src/nhttp/NHTTP_socket_RVL.c +++ b/libs/RevoEX/src/nhttp/NHTTP_socket_RVL.c @@ -55,7 +55,7 @@ s32 NHTTPi_SocConnect(NHTTPBgnEndInfo* info, void* mutex, NHTTPRequestInfo* requ s32 NHTTPi_SocSSLConnect(NHTTPBgnEndInfo* info, void* mutex, NHTTPRequestInfo* request, s32 socket) { BOOL complete=FALSE; request->sslId=SSLNew(request->verifyOption,request->host); - if(info->sslInit && request->_unkD4) info->sslInit(request->sslId,request->_unkD4); + if(info->sslInit && request->sslInitParam) info->sslInit(request->sslId,request->sslInitParam); if(request->clientCertDefault==1) { if(SSLSetBuiltinClientCert(request->sslId,request->builtinClientCert)!=0) return -1005; } else if(request->clientCertData && request->privateKeyData) { diff --git a/libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL.c b/libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL.c index 2cf78b50..0df8254f 100644 --- a/libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL.c +++ b/libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL.c @@ -1,134 +1,249 @@ #include #include -void* NHTTPi_memcpy(void* destination, const void* source, u32 size) { return memcpy(destination,source,size); } -s32 NHTTPi_strlen(const char* string) { return strlen(string); } -s32 NHTTPi_strcmp(const char* left, const char* right) { return strcmp(left,right); } -void* NHTTPi_memclr(void* destination, u32 size) { return memset(destination,0,size); } +void* NHTTPi_memcpy(void* destination, const void* source, u32 size) +{ + return memcpy(destination, source, size); +} -static int LowerCase(int character) { +s32 NHTTPi_strlen(const char* string) +{ + return strlen(string); +} + +s32 NHTTPi_strcmp(const char* left, const char* right) +{ + return strcmp(left, right); +} + +void* NHTTPi_memclr(void* destination, u32 size) +{ + return memset(destination, 0, size); +} + +static int LowerCase(int character) +{ return ((character >= 'A') & (character <= 'Z')) ? character + 32 : character; } -s32 NHTTPi_strnicmp(const char* left, const char* right, s32 length) { - while(length>0) { - int a=*left++, b=*right++; - if(a==0 || b==0) { if(a==0 && b==0) { length=0; break; } } - b=LowerCase(b); - a=LowerCase(a); - if(a!=b) break; +s32 NHTTPi_strnicmp(const char* left, const char* right, s32 length) +{ + while (length > 0) + { + int a = *left++, b = *right++; + if (a == 0 || b == 0) + { + if (a == 0 && b == 0) + { + length = 0; + break; + } + } + b = LowerCase(b); + a = LowerCase(a); + if (a != b) + { + break; + } --length; } return length; } -static BOOL UrlPlain(int character) { - return (character>='0' && character<='9') || (character>='A' && character<='Z') || (character>='a' && character<='z') || character==' '; +static BOOL UrlPlain(int character) +{ + return (character >= '0' && character <= '9') + || (character >= 'A' && character <= 'Z') + || (character >= 'a' && character <= 'z') || character == ' '; } -s32 NHTTPi_getUrlEncodedSize(const char* string) { - int character=*string++; - s32 size=0; - while(character) { - if((character>='0' && character<='9') || (character>='A' && character<='Z') || (character>='a' && character<='z') || character==' ') ++size; - else size+=3; - character=*string++; +s32 NHTTPi_getUrlEncodedSize(const char* string) +{ + int character = *string++; + s32 size = 0; + while (character) + { + if ((character >= '0' && character <= '9') + || (character >= 'A' && character <= 'Z') + || (character >= 'a' && character <= 'z') || character == ' ') + { + ++size; + } + else + { + size += 3; + } + character = *string++; } return size; } -s32 NHTTPi_getUrlEncodedSize2(const char* string, s32 length) { - int character=*string++; - s32 size=0; - for(; length>0; --length) { - if((character>='0' && character<='9') || (character>='A' && character<='Z') || (character>='a' && character<='z') || character==' ') ++size; - else size+=3; - character=*string++; +s32 NHTTPi_getUrlEncodedSize2(const char* string, s32 length) +{ + int character = *string++; + s32 size = 0; + for (; length > 0; --length) + { + if ((character >= '0' && character <= '9') + || (character >= 'A' && character <= 'Z') + || (character >= 'a' && character <= 'z') || character == ' ') + { + ++size; + } + else + { + size += 3; + } + character = *string++; } return size; } -s32 NHTTPi_encodeUrlChar(char* destination, s8 character) { - if(character==' ') { destination[0]='+'; return 1; } - if((character>='0' && character<='9') || (character>='A' && character<='Z') || (character>='a' && character<='z')) { - destination[0]=character; return 1; - } else { - int high=(character>>4)&15; - int low=character&15; - destination[0]='%'; - destination[1]=high<10 ? high+'0' : high+'A'-10; - destination[2]=low<10 ? low+'0' : low+'A'-10; +s32 NHTTPi_encodeUrlChar(char* destination, s8 character) +{ + if (character == ' ') + { + destination[0] = '+'; + return 1; + } + if ((character >= '0' && character <= '9') + || (character >= 'A' && character <= 'Z') + || (character >= 'a' && character <= 'z')) + { + destination[0] = character; + return 1; + } + else + { + int high = (character >> 4) & 15; + int low = character & 15; + destination[0] = '%'; + destination[1] = high < 10 ? high + '0' : high + 'A' - 10; + destination[2] = low < 10 ? low + '0' : low + 'A' - 10; return 3; } } -s32 NHTTPi_strToHex(const char* string, s32 length) { +s32 NHTTPi_strToHex(const char* string, s32 length) +{ s32 value; BOOL started; - if(length>8) return -1; - if((length==8) & (*string>'7')) return -1; - value=0; started=FALSE; - for(; length>0; --length,++string) { + if (length > 8) + { + return -1; + } + if ((length == 8) & (*string > '7')) + { + return -1; + } + value = 0; + started = FALSE; + for (; length > 0; --length, ++string) + { u8 rawCharacter = *(const u8*)string; s8 character = LowerCase((s8)rawCharacter); - if(character>='0' && character<='9') { value=(value<<4)+character-'0'; started=TRUE; } - else if(character>='a' && character<='f') { value=(value<<4)+character-'a'+10; started=TRUE; } - else { - if(started && (character==' ' || character==0)) break; - if(!started && character==' ') continue; + if (character >= '0' && character <= '9') + { + value = (value << 4) + character - '0'; + started = TRUE; + } + else if (character >= 'a' && character <= 'f') + { + value = (value << 4) + character - 'a' + 10; + started = TRUE; + } + else + { + if (started && (character == ' ' || character == 0)) + { + break; + } + if (!started && character == ' ') + { + continue; + } return -1; } } return value; } -s32 NHTTPi_strToInt(const char* string, s32 length) { +s32 NHTTPi_strToInt(const char* string, s32 length) +{ s32 value; BOOL started; - if(length>10) return -1; - value=0; started=FALSE; - for(; length>0; --length,++string) { - s8 character=*string; + if (length > 10) + { + return -1; + } + value = 0; + started = FALSE; + for (; length > 0; --length, ++string) + { + s8 character = *string; s32 previous; - if(started && (character==' ' || character==0)) break; - if(!started && character==' ') continue; - if(character<'0' || character>'9') return -1; - previous=value; - value=value*10+character-'0'; - started=TRUE; - if(previous>value) return -1; + if (started && (character == ' ' || character == 0)) + { + break; + } + if (!started && character == ' ') + { + continue; + } + if (character < '0' || character > '9') + { + return -1; + } + previous = value; + value = value * 10 + character - '0'; + started = TRUE; + if (previous > value) + { + return -1; + } } return value; } -static inline u32 TakeDecimalDigit(u32* remaining, u32 scale) { +static inline u32 TakeDecimalDigit(u32* remaining, u32 scale) +{ u32 digit = *remaining / scale; *remaining -= digit * scale; return digit; } -s32 NHTTPi_intToStr(char* destination, u32 value) { - u32 scales[9]={1000000000,100000000,10000000,1000000,100000,10000,1000,100,10}; +s32 NHTTPi_intToStr(char* destination, u32 value) +{ + u32 scales[9] = {1000000000, 100000000, 10000000, 1000000, 100000, 10000, 1000, 100, 10}; int digit; BOOL started; s32 length; length = 0; started = FALSE; - for(digit=0; digit<9; ++digit) { - if(value>=scales[digit]) { - u32 quotient=TakeDecimalDigit(&value, scales[digit]); - started=TRUE; - destination[length++]=quotient+'0'; - } else if(started) { destination[length++]='0'; } + for (digit = 0; digit < 9; ++digit) + { + if (value >= scales[digit]) + { + u32 quotient = TakeDecimalDigit(&value, scales[digit]); + started = TRUE; + destination[length++] = quotient + '0'; + } + else if (started) + { + destination[length++] = '0'; + } } - destination[length]=value+'0'; - return length+1; + destination[length] = value + '0'; + return length + 1; } -s32 NHTTPi_compareToken(const char* left, const char* right) { +s32 NHTTPi_compareToken(const char* left, const char* right) +{ u32 rawLeft; - while (LowerCase((s8)(rawLeft = *(const u8*)left)) == LowerCase((s8)*(const u8*)right)) { - if ((s8)rawLeft == 0 || (s8)rawLeft == ' ') { + while (LowerCase((s8)(rawLeft = *(const u8*)left)) == LowerCase((s8)*(const u8*)right)) + { + if ((s8)rawLeft == 0 || (s8)rawLeft == ' ') + { return 0; } ++left; @@ -137,33 +252,47 @@ s32 NHTTPi_compareToken(const char* left, const char* right) { return -1; } -s32 NHTTPi_strtonum(const char* string, u32 length) { +s32 NHTTPi_strtonum(const char* string, u32 length) +{ int character; s32 value; int digits; digits = 0; value = 0; - for (; length != 0; --length, ++string) { + for (; length != 0; --length, ++string) + { u8 rawCharacter = *(const u8*)string; character = (s8)rawCharacter; - if (character == ' ') continue; - if ((character >= '0') & (character <= '9')) { + if (character == ' ') + { + continue; + } + if ((character >= '0') & (character <= '9')) + { value = value * 10 + character - '0'; ++digits; - if (digits > 9) return -1; + if (digits > 9) + { + return -1; + } } } - if (digits == 0) return -1; + if (digits == 0) + { + return -1; + } return value; } -s32 NHTTPi_Base64Encode(char* destination, const char* source) { +s32 NHTTPi_Base64Encode(char* destination, const char* source) +{ const char* table = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; char* output = destination; s32 length = strlen(source); s32 consumed = 0; - for (; consumed < length; consumed += 3) { + for (; consumed < length; consumed += 3) + { output[0] = table[source[0] >> 2]; output[1] = table[((source[0] & 3) << 4) + (source[1] >> 4)]; output[2] = table[((source[1] & 15) << 2) + (source[2] >> 6)]; @@ -171,8 +300,12 @@ s32 NHTTPi_Base64Encode(char* destination, const char* source) { source += 3; output += 4; } - if (consumed == length + 1) output[-1] = '='; - else if (consumed == length + 2) { + if (consumed == length + 1) + { + output[-1] = '='; + } + else if (consumed == length + 2) + { output[-2] = '='; output[-1] = '='; } diff --git a/libs/RevoEX/src/nhttp/NHTTP_thread.c b/libs/RevoEX/src/nhttp/NHTTP_thread.c index ee6558fb..64a6ee06 100644 --- a/libs/RevoEX/src/nhttp/NHTTP_thread.c +++ b/libs/RevoEX/src/nhttp/NHTTP_thread.c @@ -181,16 +181,16 @@ static BOOL NHTTPi_GetPostContentlength(void* mutex, NHTTPRequestInfo* request, s32 offset = 0; NHTTPConnectionInfo* connection = NHTTPi_Request2Connection(mutex, request); if (connection == NULL) return FALSE; - connection->_unk24 = 0; + connection->postDataAddress = 0; for (;;) { s32 size; const char* data; if (request->cancel) return FALSE; - connection->_unk28 = 0; + connection->postDataSize = 0; if (NHTTPi_PostSendCallback(mutex, connection, label, offset) < 0) return FALSE; - size = connection->_unk28; - data = (const char*)connection->_unk24; + size = connection->postDataSize; + data = (const char*)connection->postDataAddress; if (size == 0) break; if (data == NULL) return FALSE; offset += size; @@ -215,14 +215,14 @@ static s32 NHTTPi_SendPostData(void* mutex, NHTTPRequestInfo* request, char* buf s32 result; connection = NHTTPi_Request2Connection(mutex, request); if (connection == NULL) return 3; - connection->_unk24 = 0; + connection->postDataAddress = 0; for (;;) { if (request->cancel) return 3; - connection->_unk28 = 0; + connection->postDataSize = 0; if (NHTTPi_PostSendCallback(mutex, connection, label, offset) < 0) return 3; - size = connection->_unk28; - data = (const char*)connection->_unk24; + size = connection->postDataSize; + data = (const char*)connection->postDataAddress; if (size == 0) break; if (data == NULL) return 3; offset += size; @@ -470,7 +470,7 @@ static s32 NHTTPi_SendProcPostDataBinary(NHTTPThreadContext* context) { length += 22; length += NHTTPi_strlen(header->name) + 41; - if (header->_unk14 != 0) length += 75; + if (header->isBinary != 0) length += 75; length += 2; if (header->value == NULL) { @@ -508,7 +508,7 @@ static s32 NHTTPi_SendProcPostDataBinary(NHTTPThreadContext* context) if (result != 0) return result; result = NHTTPi_SendData(context, "\"\r\n", 3); if (result != 0) return result; - if (header->_unk14 != 0) + if (header->isBinary != 0) { result = NHTTPi_SendData(context, STR_POST_TYPE_BIN, 75); if (result != 0) return result; @@ -718,7 +718,7 @@ static BOOL NHTTPi_ThreadConnectProc(NHTTPThreadContext* context) return FALSE; } NHTTPi_lockReqList(mutex); - requests->reqQueue->_unk10 = info->socket; + requests->reqQueue->socket = info->socket; NHTTPi_unlockReqList(mutex); if (request->cancel) return FALSE; if (NHTTPi_SocConnect(info, mutex, request, info->socket, context->address, context->port) < 0) @@ -734,7 +734,7 @@ static BOOL NHTTPi_ThreadConnectProc(NHTTPThreadContext* context) else { NHTTPi_lockReqList(mutex); - requests->reqQueue->_unk10 = info->socket; + requests->reqQueue->socket = info->socket; NHTTPi_unlockReqList(mutex); } return TRUE; @@ -855,7 +855,7 @@ static s32 NHTTPi_ThreadSendProc(NHTTPThreadContext* context) binary = FALSE; for (header = request->postData; header != NULL; header = header->prev) { - if (header->_unk14 != 0) { binary = TRUE; break; } + if (header->isBinary != 0) { binary = TRUE; break; } if (header == request->postData->next) break; } } diff --git a/libs/RevoEX/src/nhttp/d_nhttp.c b/libs/RevoEX/src/nhttp/d_nhttp.c index 63620488..b5b09f73 100644 --- a/libs/RevoEX/src/nhttp/d_nhttp.c +++ b/libs/RevoEX/src/nhttp/d_nhttp.c @@ -95,7 +95,7 @@ static s32 NHTTPi_PostSendCallbackWrap(void* mutexInfo_p, NHTTPi_Connection2Request(mutexInfo_p, connection_p); if (req_p != NULL) { - NHTTPPostSend postSend = (NHTTPPostSend)req_p->_unk250; + NHTTPPostSend postSend = (NHTTPPostSend)req_p->postSendCallback; if (postSend != NULL) { NHTTPPostSendArg* postSendArg_p = arg_p; diff --git a/libs/RevoEX/src/nhttp/d_nhttp_common.c b/libs/RevoEX/src/nhttp/d_nhttp_common.c index ad97c610..20b28380 100644 --- a/libs/RevoEX/src/nhttp/d_nhttp_common.c +++ b/libs/RevoEX/src/nhttp/d_nhttp_common.c @@ -49,7 +49,7 @@ void NHTTPi_WaitForCompletion(NHTTPConnectionInfo* connection) res_p->initialized = TRUE; } OSLockMutex(&res_p->mutex); - while (connection->_unkC != 0) + while (connection->completionPending != 0) { OSWaitCond(&res_p->cond, &res_p->mutex); } @@ -67,7 +67,7 @@ void NHTTPi_NotifyCompletion(NHTTPConnectionInfo* connection) res_p->initialized = TRUE; } OSLockMutex(&res_p->mutex); - connection->_unkC = 0; + connection->completionPending = 0; OSSignalCond(&res_p->cond); OSUnlockMutex(&res_p->mutex); } @@ -237,18 +237,18 @@ s32 NHTTPi_PostSendCallback(void* mutexInfo, if (response != NULL && connection->callback != NULL) { param.value = value; - param._unk4 = connection->_unk24; - param._unk8 = connection->_unk28; - param._unkC = arg; + param.bufferAddressOrSize = connection->postDataAddress; + param.sizeOrBodyOffset = connection->postDataSize; + param.postOffset = arg; result = connection->callback(connection, 1, ¶m); - callbackArg8 = param._unk8; - callbackArg4 = param._unk4; + callbackArg8 = param.sizeOrBodyOffset; + callbackArg4 = param.bufferAddressOrSize; connection = NHTTPi_GetConnection(mutexInfo, connection); if (connection != NULL) { - connection->_unk24 = callbackArg4; - connection->_unk28 = callbackArg8; + connection->postDataAddress = callbackArg4; + connection->postDataSize = callbackArg8; } } } @@ -270,11 +270,11 @@ void NHTTPi_BufferFullCallback(void* mutexInfo, if (response != NULL && connection->callback != NULL) { param.value = response->recvBuf_p; - param._unk4 = response->recvBufLen; - param._unk8 = response->bodyLen; + param.bufferAddressOrSize = response->recvBufLen; + param.sizeOrBodyOffset = response->bodyLen; connection->callback(connection, 2, ¶m); - responseResult = param._unk8; - bufferSize = param._unk4; + responseResult = param.sizeOrBodyOffset; + bufferSize = param.bufferAddressOrSize; buffer = param.value; connection = NHTTPi_GetConnection(mutexInfo, connection); @@ -307,11 +307,11 @@ void NHTTPi_ReceivedCallback(void* mutexInfo, if (response != NULL && connection->callback != NULL) { param.value = response->recvBuf_p; - param._unk4 = response->recvBufLen; - param._unk8 = response->bodyLen; + param.bufferAddressOrSize = response->recvBufLen; + param.sizeOrBodyOffset = response->bodyLen; connection->callback(connection, 3, ¶m); - responseResult = param._unk8; - bufferSize = param._unk4; + responseResult = param.sizeOrBodyOffset; + bufferSize = param.bufferAddressOrSize; buffer = param.value; connection = NHTTPi_GetConnection(mutexInfo, connection); diff --git a/libs/RevoEX/src/nhttp/d_nhttp_private.c b/libs/RevoEX/src/nhttp/d_nhttp_private.c index b1e86030..40d26037 100644 --- a/libs/RevoEX/src/nhttp/d_nhttp_private.c +++ b/libs/RevoEX/src/nhttp/d_nhttp_private.c @@ -38,12 +38,12 @@ NHTTPConnectionInfo* NHTTPCreateConnection(const char* url, s32 method, void* bu connection->response=connection->request->response; connection->started=FALSE; connection->callback=callback; - connection->_unk24=0; connection->_unk28=0; + connection->postDataAddress=0; connection->postDataSize=0; connection->requestId=-1; NHTTPi_CommitConnectionList(mutex,connection); connection->state=15; connection->sslError=0; - connection->_unkC=1; + connection->completionPending=1; NHTTPi_SetVirtualContentLength(connection,0); connection->requestCallback=NULL; connection->recvBufOffset=0; connection->recvBufDataLen=0; diff --git a/src/iplwww/www_browser.cpp b/src/iplwww/www_browser.cpp index 2123174e..6d6c8e0e 100644 --- a/src/iplwww/www_browser.cpp +++ b/src/iplwww/www_browser.cpp @@ -388,7 +388,7 @@ namespace ext_ead { } int BrowserThread::ExecDpdEvent_(const CmdPacket& cmd) { - bool somethingClicked = 0; + bool clicked = 0; int x, y; x = cmd.data.controller.irX; @@ -397,7 +397,7 @@ namespace ext_ead { WWWSurfaceMouseEvt(MOUSE_CMD_MOVE, x, y, MOUSE_ATTRIB_POSITION, 0, 0); WWWSurfaceMouseEvt(MOUSE_CMD_TRIGGER, x, y, MOUSE_ATTRIB_BUTTON, 1, 0); WWWSurfaceMouseEvt(MOUSE_CMD_RELEASE, x, y, MOUSE_ATTRIB_BUTTON, 1, 0); - somethingClicked = 1; + clicked = 1; } else if (cmd.data.controller.btnRelease & ipl::controller::BTN_INTERACT) { WWWSurfaceMouseEvt(MOUSE_CMD_MOVE, x, y, MOUSE_ATTRIB_POSITION, 0, 0); WWWSurfaceMouseEvt(MOUSE_CMD_RELEASE, x, y, MOUSE_ATTRIB_BUTTON, 1, 0); @@ -416,7 +416,7 @@ namespace ext_ead { gDpdWaitFrm = 4; } - return somethingClicked; + return clicked; } void BrowserThread::ExecSpacialEvent_(const CmdPacket& cmd) { @@ -441,11 +441,11 @@ namespace ext_ead { CmdPacket cmd; while (mCmdPacketQueue.TryReceiveTypedMessage(&cmd)) { BrowserWindow* pBrowserWindow = (BrowserWindow*)mpBrowserWindows[0]; - bool something = false; + bool inputBlocked = false; if ((pBrowserWindow->mPageLoadStatus[2] != '\0') && (pBrowserWindow->mPageLoadStatus[3] != '\0')) { - something = true; + inputBlocked = true; } - if (something || pBrowserWindow->mPageLoadStatus[0] != '\0') { + if (inputBlocked || pBrowserWindow->mPageLoadStatus[0] != '\0') { continue; } @@ -486,21 +486,21 @@ namespace ext_ead { mCmdPacketQueue.SendTypedMessage(packet); } - void BrowserThread::InitFonts_(const char* unk) { + void BrowserThread::InitFonts_(const char* fontDirectory) { print::TickTimer tt; tt.reset(); WWWSurfaceAddFont("DirectUniversal"); tt.report("WWWSurfaceAddFont:font1"); } - void* BrowserThread::GetTextureBuffer(int val, WWWRect** rectPtrOut) { + void* BrowserThread::GetTextureBuffer(int pageOffset, WWWRect** rectPtrOut) { if (mpBrowserWindows[0] == NULL) { return NULL; } - return ((BrowserWindow*)mpBrowserWindows[0])->GetTextureBuffer(val, false, rectPtrOut); + return ((BrowserWindow*)mpBrowserWindows[0])->GetTextureBuffer(pageOffset, false, rectPtrOut); } - void BrowserThread::FlushCallback(WWWRect* rect, int unk) { + void BrowserThread::FlushCallback(WWWRect* rect, int callbackData) { BOOL level; BrowserWindow* pBrowserWindow; @@ -509,8 +509,8 @@ namespace ext_ead { level = OSDisableInterrupts(); if (pBrowserWindow->mPageLoadStatus[2] == '\0') { if (pBrowserWindow->mPageLoadStatus[4] == '\0') { - pBrowserWindow->unk_0x2C0 = pBrowserWindow->unk_0x2B0; - pBrowserWindow->unk_0x2BC = (int)(pBrowserWindow->unk_0x2B4[pBrowserWindow->unk_0x2B0] + 1) % 3; + pBrowserWindow->mUpdatePageIndex = pBrowserWindow->mDisplayPageIndex; + pBrowserWindow->mUpdateBufferIndex = (int)(pBrowserWindow->mDisplayBufferIndices[pBrowserWindow->mDisplayPageIndex] + 1) % 3; } pBrowserWindow->mPageLoadStatus[4] = 1; } @@ -552,10 +552,10 @@ namespace ext_ead { data->imeID = wwwData->imeID; data->eventType = 0; - data->unk_0x0C = wwwData->unk_0x08; - data->unk_0x10 = wwwData->unk_0x0C; - data->unk_0x14 = wwwData->unk_0x10; - data->unk_0x18 = wwwData->unk_0x14; + data->creationDataA = wwwData->creationDataA; + data->creationDataB = wwwData->creationDataB; + data->creationDataC = wwwData->creationDataC; + data->creationDataD = wwwData->creationDataD; data->maxLength = wwwData->maxLength; } @@ -563,14 +563,14 @@ namespace ext_ead { Heap::freeMem2(data->text); } - void BrowserThread::CommitIme(ImeData* data, const char* something) { - char* __dest; + void BrowserThread::CommitIme(ImeData* data, const char* text) { + char* textCopy; CmdPacket packet; - if (something != NULL) { - __dest = (char*)Heap::allocMem1(strlen(something) + 1, 4); - strcpy(__dest, something); - packet.data.commitIme.str = __dest; + if (text != NULL) { + textCopy = (char*)Heap::allocMem1(strlen(text) + 1, 4); + strcpy(textCopy, text); + packet.data.commitIme.str = textCopy; } else { packet.data.commitIme.str = NULL; } @@ -589,7 +589,7 @@ namespace ext_ead { } void BrowserThread::UpdateImeCmdPacket(const CmdPacket* packet) { - WWWUpdateIme(packet->data.updateIme.imeID, packet->data.updateIme.str, packet->data.updateIme.unk_0x0C); + WWWUpdateIme(packet->data.updateIme.imeID, packet->data.updateIme.str, packet->data.updateIme.updateData); if (packet->data.updateIme.str != NULL) { Heap::freeMem1(packet->data.updateIme.str); } @@ -605,10 +605,10 @@ namespace ext_ead { eventType = other.eventType; imeID = other.imeID; text = other.text; - unk_0x0C = other.unk_0x0C; - unk_0x10 = other.unk_0x10; - unk_0x14 = other.unk_0x14; - unk_0x18 = other.unk_0x18; + creationDataA = other.creationDataA; + creationDataB = other.creationDataB; + creationDataC = other.creationDataC; + creationDataD = other.creationDataD; maxLength = other.maxLength; return *this; } diff --git a/src/iplwww/www_trasition.cpp b/src/iplwww/www_trasition.cpp index bef46180..9d6a00cd 100644 --- a/src/iplwww/www_trasition.cpp +++ b/src/iplwww/www_trasition.cpp @@ -12,12 +12,12 @@ namespace www { void AddJsPlugin() { cap.name = globalNames; - cap.unk_0x04 = NULL; + cap.capabilityWord = NULL; cap.getter = &globalGetter_; - cap.unk_0x0C = NULL; - cap.unk_0x10 = NULL; - cap.unk_0x14 = NULL; - cap.unk_0x18 = NULL; + cap.capabilityDataA = NULL; + cap.capabilityDataB = NULL; + cap.capabilityDataC = NULL; + cap.capabilityDataD = NULL; cap.allowAccess = allow_access; WWWAddJSPlugin("wiiTrasition.dll", &cap, &opera_callbacks); ScrollState_ = SCROLL_RESET; diff --git a/src/iplwww/www_wiisetting.cpp b/src/iplwww/www_wiisetting.cpp index 6c9aa79b..893c102f 100644 --- a/src/iplwww/www_wiisetting.cpp +++ b/src/iplwww/www_wiisetting.cpp @@ -98,12 +98,12 @@ namespace www { void AddJsPlugin() { cap.name = globalNames; - cap.unk_0x04 = NULL; + cap.capabilityWord = NULL; cap.getter = &globalGetter_; - cap.unk_0x0C = NULL; - cap.unk_0x10 = NULL; - cap.unk_0x14 = NULL; - cap.unk_0x18 = NULL; + cap.capabilityDataA = NULL; + cap.capabilityDataB = NULL; + cap.capabilityDataC = NULL; + cap.capabilityDataD = NULL; cap.allowAccess = allow_access; WWWAddJSPlugin("wiiSetting.dll", &cap, &opera_callbacks); ext_ead::www::print::IPLWWWReport(ext_ead::www::print::WWW_DEBUG, "WWW_WiiSetting: AddJSPlugin()\n"); diff --git a/src/iplwww/www_window.cpp b/src/iplwww/www_window.cpp index 8e127573..47a07500 100644 --- a/src/iplwww/www_window.cpp +++ b/src/iplwww/www_window.cpp @@ -28,7 +28,7 @@ extern "C" char scWwwNoBrowserWin[] = "INFO: cannot create browser window\n"; namespace ext_ead { namespace www { BrowserWindow::BrowserWindow(BrowserThread* thread) : mpWwwWindow(NULL), mpBrowserThread(thread) { - unk_0x2B0 = 0; + mDisplayPageIndex = 0; mRenderingMode = 6; mPageLoadStatus[0] = 0; @@ -43,11 +43,11 @@ namespace ext_ead { for (j = 0; j < (int)ARRAY_LENGTH(mTexBufArr[0]); j++) { mTexBufArr[i][j] = NULL; } - unk_0x2B4[i] = NULL; + mDisplayBufferIndices[i] = NULL; } - unk_0x2BC = 0; - unk_0x2C0 = 0; + mUpdateBufferIndex = 0; + mUpdatePageIndex = 0; struct { int v0, v1; @@ -151,8 +151,8 @@ namespace ext_ead { switch (eventCode) { case WWW_EVT_URL_CHANGE: { if (mPageLoadStatus[2] == '\0') { - unk_0x2C0 = (unk_0x2B0 + 1) % 2; - unk_0x2BC = unk_0x2B4[unk_0x2C0]; + mUpdatePageIndex = (mDisplayPageIndex + 1) % 2; + mUpdateBufferIndex = mDisplayBufferIndices[mUpdatePageIndex]; } mPageLoadStatus[4] = 1; mPageLoadStatus[2] = 1; @@ -162,12 +162,12 @@ namespace ext_ead { case WWW_EVT_LOADING_START: { if (mPageLoadStatus[2] == '\0') { if (mPageLoadStatus[4] == '\0') { - unk_0x2C0 = unk_0x2B0; - unk_0x2BC = (int)(unk_0x2B4[unk_0x2B0] + 1) % 3; + mUpdatePageIndex = mDisplayPageIndex; + mUpdateBufferIndex = (int)(mDisplayBufferIndices[mDisplayPageIndex] + 1) % 3; } mPageLoadStatus[4] = 1; mPageLoadStatus[0] = 1; - print::IPLWWWReport(2, " LoadinStart: %d\n", unk_0x2B4[unk_0x2B0]); + print::IPLWWWReport(2, " LoadinStart: %d\n", mDisplayBufferIndices[mDisplayPageIndex]); } break; } @@ -273,8 +273,8 @@ namespace ext_ead { } mPageLoadStatus[4] = 0; - unk_0x2B0 = unk_0x2C0; - unk_0x2B4[unk_0x2C0] = unk_0x2BC; + mDisplayPageIndex = mUpdatePageIndex; + mDisplayBufferIndices[mUpdatePageIndex] = mUpdateBufferIndex; mPageLoadStatus[5] = 1; OSRestoreInterrupts(level); @@ -298,7 +298,7 @@ namespace ext_ead { return (r << 11) | (g << 5) | b; } - void BrowserWindow::ReportEventId_(int eventCode, void* somePtr) { + void BrowserWindow::ReportEventId_(int eventCode, void* eventData) { switch (eventCode) { case WWW_EVT_CURSOR_CHANGE: { print::IPLWWWReport(print::WWW_EVENT, "WWW_EVT_CURSOR_CHANGE\n"); @@ -369,7 +369,7 @@ namespace ext_ead { break; } case WWW_EVT_LINK_HOVER: { - print::IPLWWWReport(print::WWW_EVENT, "WWW_EVT_LINK_HOVER %p\n", somePtr); + print::IPLWWWReport(print::WWW_EVENT, "WWW_EVT_LINK_HOVER %p\n", eventData); break; } case WWW_EVT_UNKNOWN_PROTOCOL: { @@ -442,22 +442,22 @@ namespace ext_ead { } } - void* BrowserWindow::GetTextureBuffer(int a, bool b, WWWRect** rectPtrOut) { - u32 i; - u32 j; - if (!b && mPageLoadStatus[5] == 0) + void* BrowserWindow::GetTextureBuffer(int pageOffset, bool forUpdate, WWWRect** rectPtrOut) { + u32 pageIndex; + u32 bufferIndex; + if (!forUpdate && mPageLoadStatus[5] == 0) return NULL; - if (mPageLoadStatus[4] != 0 && b) { - i = unk_0x2C0; - j = unk_0x2BC; + if (mPageLoadStatus[4] != 0 && forUpdate) { + pageIndex = mUpdatePageIndex; + bufferIndex = mUpdateBufferIndex; } else { - i = (unk_0x2B0 + 2 - a) % 2; - j = unk_0x2B4[i]; + pageIndex = (mDisplayPageIndex + 2 - pageOffset) % 2; + bufferIndex = mDisplayBufferIndices[pageIndex]; } if (rectPtrOut != NULL) { - *rectPtrOut = &mTexDisplayRects[i][j]; + *rectPtrOut = &mTexDisplayRects[pageIndex][bufferIndex]; } - return mTexBufArr[i][j]; + return mTexBufArr[pageIndex][bufferIndex]; } void BrowserWindow::SetWindowSize(int w, int h) { diff --git a/src/keyboard/tiHwKeyboard.cpp b/src/keyboard/tiHwKeyboard.cpp index 33febab8..798b5c4d 100644 --- a/src/keyboard/tiHwKeyboard.cpp +++ b/src/keyboard/tiHwKeyboard.cpp @@ -12,7 +12,7 @@ namespace textinput { namespace keyboard { namespace hwkey { - HWKeyboard::HWKeyboard(Manager* manager) : mpManager(manager), field_0x14(0), field_0x15(0), field_0x16(0) { + HWKeyboard::HWKeyboard(Manager* manager) : mpManager(manager), mbShiftTapPending(0), mbSingleQuoteClosing(0), mbDoubleQuoteClosing(0) { } struct NavigationCommand { u32 command; u32 modifiers; }; @@ -31,8 +31,8 @@ extern const u8 controlKeys[]; u32 state = input::HKBManager::getInstance().GetModifierState(); input::HKBManager::getInstance().SetModifierState(state | 0x100, 0x700); - field_0x15 = 0; - field_0x16 = 0; + mbSingleQuoteClosing = 0; + mbDoubleQuoteClosing = 0; } void HWKeyboard::updateShift(input::HKBManager& hkbManager) { @@ -294,9 +294,9 @@ extern const u8 controlKeys[]; if (mgr()->getLanguage() == CN) { if (static_cast(character + (0x10000 - 0x201c)) <= 1) { - field_0x16 = !field_0x16; + mbDoubleQuoteClosing = !mbDoubleQuoteClosing; } else if (static_cast(character + (0x10000 - 0x2018)) <= 1) { - field_0x15 = !field_0x15; + mbSingleQuoteClosing = !mbSingleQuoteClosing; } } @@ -381,16 +381,16 @@ extern const u8 controlKeys[]; switch (key) { case 0xe5: case 0xe1: - field_0x14 = 1; + mbShiftTapPending = 1; return false; default: - field_0x14 = 0; + mbShiftTapPending = 0; currentKeySet = currentKeySet.GetNext(); break; } } - if (field_0x14 == 0) { + if (mbShiftTapPending == 0) { return false; } @@ -401,7 +401,7 @@ extern const u8 controlKeys[]; switch (key) { case 0xe5: case 0xe1: - field_0x14 = 0; + mbShiftTapPending = 0; if (mgr()->getToolBar()->isQwerty() && mgr()->getPCKeyboard()->hardwareLanguageKeyActive()) { sendCommand(0x2e, NULL); @@ -418,7 +418,7 @@ extern const u8 controlKeys[]; void HWKeyboard::updateInput(int chan, f32 x, f32 y, u32 trig, u32 hold, u32 release, void* data) { if (trig != 0) { - field_0x14 = 0; + mbShiftTapPending = 0; } } @@ -465,8 +465,8 @@ const u8 controlKeys[] = { case 0x2D: { return 0xFF0D; } case 0x5F: { return 0xFF3F; } case 0x5C: { return 0x3001; } - case 0x27: { if (field_0x15) { return 0x2019; } return 0x2018; } - case 0x22: { if (field_0x16) { return 0x201D; } return 0x201C; } + case 0x27: { if (mbSingleQuoteClosing) { return 0x2019; } return 0x2018; } + case 0x22: { if (mbDoubleQuoteClosing) { return 0x201D; } return 0x201C; } } } } diff --git a/src/keyboard/tiUtil.cpp b/src/keyboard/tiUtil.cpp index 269b32f9..ae2f79e5 100644 --- a/src/keyboard/tiUtil.cpp +++ b/src/keyboard/tiUtil.cpp @@ -236,29 +236,29 @@ namespace textinput { return ch; } - f32 hermiteInterporation(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6) { - f32 var_f26; - f32 var_f25; - f32 var_f27; - f32 var_f28; - f32 var_f29; - f32 var_f30; + f32 hermiteInterporation(f32 time, f32 startTime, f32 startValue, f32 startTangent, f32 endTime, f32 endValue, f32 endTangent) { + f32 timeOffset; + f32 normalizedTimeSquared; + f32 valueBlend; + f32 tangentBlend; + f32 intervalDelta; + f32 normalizedTime; f32 result; - var_f26 = arg0 - arg1; - var_f29 = arg4 - arg1; - var_f30 = var_f26 / var_f29; - var_f25 = var_f30 * var_f30; - result = var_f30 + var_f30; - var_f28 = var_f25 - var_f30; - var_f29 = arg2 - arg5; - var_f27 = (result * var_f28) - var_f25; - result = arg3 + (arg3 * var_f28); - var_f27 = arg2 + (var_f27 * var_f29); - result += arg6 * var_f28; - result = (var_f30 * arg3) - result; - result = var_f27 - (var_f26 * result); + timeOffset = time - startTime; + intervalDelta = endTime - startTime; + normalizedTime = timeOffset / intervalDelta; + normalizedTimeSquared = normalizedTime * normalizedTime; + result = normalizedTime + normalizedTime; + tangentBlend = normalizedTimeSquared - normalizedTime; + intervalDelta = startValue - endValue; + valueBlend = (result * tangentBlend) - normalizedTimeSquared; + result = startTangent + (startTangent * tangentBlend); + valueBlend = startValue + (valueBlend * intervalDelta); + result += endTangent * tangentBlend; + result = (normalizedTime * startTangent) - result; + result = valueBlend - (timeOffset * result); return result; } diff --git a/src/scene/board/iplFocusObject.cpp b/src/scene/board/iplFocusObject.cpp index 90aab339..db9c21fc 100644 --- a/src/scene/board/iplFocusObject.cpp +++ b/src/scene/board/iplFocusObject.cpp @@ -144,7 +144,7 @@ namespace ipl { focus_object::focus_object(nand::LayoutFile* layoutFile, nand::LayoutFile* balloonFile, BoardObject* boardObject) : mState(STATE_INIT_NORMAL), mNextState(STATE_NONE), mPrevState(STATE_NONE), mFinalResult(RESULT_NONE), mCurrentResult(RESULT_NONE), mpBoardObj(boardObject), mpLayout(NULL), mpGui(NULL), mpNigaoeBalloon(NULL), mpParsedText(NULL), mEvent(this), mButtonEvent(this), - mOptOutEvent(this), mScroller(), mPicture(), unk_0xF8(0), unk_0xFC(0), mGUIAlloc(System::getMem2App(), 4), mpCmpArcData(NULL), + mOptOutEvent(this), mScroller(), mPicture(), mReservedWord(0), mReservedByte(0), mGUIAlloc(System::getMem2App(), 4), mpCmpArcData(NULL), mpArcData(NULL), mArcLength(0), mbChanJump(false), mpChJpData(NULL), mpSoundData(NULL), mSoundSize(0), mbSoundPlaying(false), mURLProc(), mFadeAnim(), mNwc24ErrCountdown(0), mChanJumpCountdown(0), mbShowUArw(false), mbShowDArw(false), mbScaleUArw(false), mbScaleDArw(false), mbParentalSuccess(false) { @@ -156,12 +156,12 @@ namespace ipl { mbHoveredURL[i] = false; } - unk_0x114[0] = L' '; - unk_0x114[1] = L' '; - unk_0x114[2] = L'\n'; - unk_0x114[3] = L'\t'; - unk_0x114[4] = 0; - unk_0x114[5] = 0; + mUrlTerminators[0] = L' '; + mUrlTerminators[1] = L' '; + mUrlTerminators[2] = L'\n'; + mUrlTerminators[3] = L'\t'; + mUrlTerminators[4] = 0; + mUrlTerminators[5] = 0; make_layout(layoutFile); make_gui_mgr(); @@ -1196,7 +1196,7 @@ namespace ipl { const wchar_t* pURLStr = &inText[i]; // Parse the URL - unk_0x114[5] = 0; + mUrlTerminators[5] = 0; if (pURLStr != pStr) { check_paren(pURLStr[-1]); @@ -1225,8 +1225,8 @@ namespace ipl { BOOL focus_object::is_url_end_code(wchar_t ch) const { bool result = FALSE; - for (int i = 0; i < ARRAY_LENGTH(unk_0x114); i++) { - result |= ((unk_0x114[i] - ch) == 0); + for (int i = 0; i < ARRAY_LENGTH(mUrlTerminators); i++) { + result |= ((mUrlTerminators[i] - ch) == 0); } return result; } @@ -1278,7 +1278,7 @@ namespace ipl { for (int i = 0; i < ARRAY_LENGTH(patterns); i++) { if (ch == patterns[i][0]) { - unk_0x114[5] = patterns[i][1]; + mUrlTerminators[5] = patterns[i][1]; break; } } diff --git a/src/system/TVRC.cpp b/src/system/TVRC.cpp index 2cc330a1..c3821b51 100644 --- a/src/system/TVRC.cpp +++ b/src/system/TVRC.cpp @@ -74,14 +74,14 @@ namespace LibTVRC { typedef struct { u8 magic[4]; // 0x00 u32 fileSize; - char unk_0x08[4]; - f32 unk_0x0C; - f32 unk_0x10; - u32 unk_0x14; + char reserved[4]; + f32 carrierFrequencyKHz; + f32 onTimeRatio; + u32 unitTimeUs; struct { u32 offset; - u32 unk_0x04; - } unk_0x18[TVRC_COMMAND_MAP_MAX - 1 /*?*/]; + u32 repeatOffset; + } commands[TVRC_COMMAND_MAP_MAX - 1 /*?*/]; } _FileData; _FileData* _tvrcFile; undefined4 _Hz; @@ -215,7 +215,7 @@ BOOL TVRCIsActive() { BOOL TVRCIsValidCommand(int cmd) { BOOL result = FALSE; - if (cmd >= 0 && _isInitialized && _tvrcFile != NULL && _tvrcFile->unk_0x18[cmd].offset != 0) { + if (cmd >= 0 && _isInitialized && _tvrcFile != NULL && _tvrcFile->commands[cmd].offset != 0) { result = TRUE; } return result; diff --git a/src/system/iplTVRCManager.cpp b/src/system/iplTVRCManager.cpp index 53a0591e..9e7b5c63 100644 --- a/src/system/iplTVRCManager.cpp +++ b/src/system/iplTVRCManager.cpp @@ -28,10 +28,10 @@ namespace ipl { mModelMakerID = TVRC_MAKER_SHARP; mModelType = 2; - unk_0x30 = OSGetTime(); - unk_0x40 = OSGetTime(); - unk_0x48 = 0; - unk_0x04 = 0; + mCommandTransitionTime = OSGetTime(); + mSoundShutupTime = OSGetTime(); + mLastCommandTime = 0; + mbDisabledTriggerEnabled = 0; m_handle = this; @@ -45,7 +45,7 @@ namespace ipl { loadResources_(heap); mbDisabled = FALSE; - unk_0x7C = FALSE; + mbDisabledTriggerPending = FALSE; TVRCSetRepeatTimeout(3000); } @@ -85,8 +85,8 @@ namespace ipl { } if (result > 0 && settings != NULL && fileSize != 0) { - BOOL checkFile = settings->magic != TVRC_SETTINGS_MAGIC || settings->unk_0x04 < 1; - if (checkFile || settings->unk_0x08 == 0) { + BOOL checkFile = settings->magic != TVRC_SETTINGS_MAGIC || settings->formatVersion < 1; + if (checkFile || settings->configurationValid == 0) { goto fail; } @@ -177,7 +177,7 @@ namespace ipl { } else if (pressLeft) { trigger = TVRC_COMMAND_MAP_LEFT; } - unk_0x1C = 0; + mbRepeatCommand = 0; } else if (hold1 && mCurrentCommand == TVRC_COMMAND_MAP_POWER_OFF) { trigger = mCurrentCommand; } else if (hold2 && mCurrentCommand == TVRC_COMMAND_MAP_CHANGE_INPUT) { @@ -191,7 +191,7 @@ namespace ipl { } else if (holdLeft && mCurrentCommand == TVRC_COMMAND_MAP_LEFT) { trigger = mCurrentCommand; } else { - unk_0x1C = 0; + mbRepeatCommand = 0; } return trigger; } @@ -199,10 +199,10 @@ namespace ipl { BOOL TVRCManager::snd_shutup(BOOL stopDma) { if (stopDma) { snd::getSystem()->shutup(TRUE); - unk_0x40 = OSGetTime(); + mSoundShutupTime = OSGetTime(); return TRUE; } else { - OSTick ticks = OSTicksToMilliseconds(OSDiffTick(OSGetTime(), unk_0x40)); + OSTick ticks = OSTicksToMilliseconds(OSDiffTick(OSGetTime(), mSoundShutupTime)); BOOL result = ticks >= 3; if (result) { snd::getSystem()->shutup(FALSE); @@ -236,11 +236,11 @@ namespace ipl { s32 trigger = getTrigger(); - if (IS_DISABLED && trans_cmd(trigger) != TVRC_COMMAND_MAP_NONE && !unk_0x7C) { - if (unk_0x04 && HBM_DISABLED) { - unk_0x7C = TRUE; - unk_0x80 = 0; - unk_0x74 = OSGetTick(); + if (IS_DISABLED && trans_cmd(trigger) != TVRC_COMMAND_MAP_NONE && !mbDisabledTriggerPending) { + if (mbDisabledTriggerEnabled && HBM_DISABLED) { + mbDisabledTriggerPending = TRUE; + mDisabledTriggerState = 0; + mDisabledTriggerTick = OSGetTick(); } goto ret; } @@ -258,14 +258,14 @@ namespace ipl { } if (trans_cmd(trigger) != TVRC_COMMAND_MAP_NONE && !TVRCIsActive() && HBM_DISABLED) { mCurrentCommand = trigger; - unk_0x18 = 0; - unk_0x1C = 1; + mRepeatCount = 0; + mbRepeatCommand = 1; mState = STATE_2; - unk_0x48 = OSGetTime(); + mLastCommandTime = OSGetTime(); goto fallthrough; } - if (unk_0x48 != 0 && OSTicksToMilliseconds(OSDiffTick(OSGetTime(), unk_0x48)) >= 5000) { - unk_0x48 = 0; + if (mLastCommandTime != 0 && OSTicksToMilliseconds(OSDiffTick(OSGetTime(), mLastCommandTime)) >= 5000) { + mLastCommandTime = 0; } break; } @@ -273,7 +273,7 @@ namespace ipl { fallthrough: snd::getSystem()->muteOnBGM(10); System::getMasterController()->setForceInvalid(TRUE); - unk_0x38 = OSGetTime(); + mMuteStartTime = OSGetTime(); mState = STATE_3; break; } @@ -295,19 +295,19 @@ namespace ipl { if (IS_ENABLED && !TVRCIsActive()) { TVRCSendStartAsync(trans_cmd(mCurrentCommand)); } - unk_0x30 = OSGetTime(); + mCommandTransitionTime = OSGetTime(); mState = STATE_5; } break; } case STATE_5: { - if (mbResetting || !TVRCIsActive() || OSTicksToMilliseconds(OSDiffTick(OSGetTime(), unk_0x30)) >= 30) { - if (!mbResetting && unk_0x1C) { + if (mbResetting || !TVRCIsActive() || OSTicksToMilliseconds(OSDiffTick(OSGetTime(), mCommandTransitionTime)) >= 30) { + if (!mbResetting && mbRepeatCommand) { mState = STATE_4; - unk_0x18++; + mRepeatCount++; } else { TVRCSendStopAsync(); - unk_0x30 = OSGetTime(); + mCommandTransitionTime = OSGetTime(); mState = STATE_12; } } @@ -316,11 +316,11 @@ namespace ipl { case STATE_12: { if (!mbResetting && trans_cmd(trigger) != TVRC_COMMAND_MAP_NONE && !TVRCIsActive()) { mCurrentCommand = trigger; - unk_0x18 = 0; - unk_0x1C = 1; + mRepeatCount = 0; + mbRepeatCommand = 1; mState = STATE_2; snd_shutup(FALSE); - } else if (OSTicksToMilliseconds(OSDiffTick(OSGetTime(), unk_0x30)) >= 1000) { + } else if (OSTicksToMilliseconds(OSDiffTick(OSGetTime(), mCommandTransitionTime)) >= 1000) { snd::getSystem()->pauseOffBGM(); snd::getSystem()->muteOffBGM(180); snd_shutup(FALSE); diff --git a/tools/decomp-assist/rx21.renames.md b/tools/decomp-assist/rx21.renames.md new file mode 100644 index 00000000..272d21f0 --- /dev/null +++ b/tools/decomp-assist/rx21.renames.md @@ -0,0 +1,427 @@ +# rx21 rename log + +Baseline: `a02d711ef561721a901ce15e54e3d5f018645c41`. Branch: `agent/w1005/rx21`. + +The assigned readability round permits identifier renames and formatting only. Existing non-matching functions are preserved; no matching experiments or configuration changes were made. The three pre-existing `g2.*` logs are untouched. + +## Verification + +- Full, non-quick `gate.py` ran for all 18 source units in the table below: `GATE PASS`. +- Full 4.3U build passed. DOL SHA1: `26116613f624061ba99c8d1a299aaa6efa85670d`. +- Baseline regression count, new forbidden patterns, and readability warnings: all zero. +- Every one of the 1,027 report units has identical measures, function scores and section scores before and after. +- All 1,027 objects retain identical loaded sections, their relocations and their symbol values/sizes. 1,024 whole objects are byte-identical. +- Three objects change only debug metadata: `src/system/TVRC`, `src/system/iplNandSDWorker`, and `src/scene/channelEdit/iplNandSDCardManager`. Renamed fields propagate through debug type records; `.debug`, `.rela.debug`, and debug-related `.symtab` metadata differ. No source changes were made to the latter two units. +- `pool_diff.py` passed for every touched source unit against both its saved pre-edit object and the retail object. Object data-byte equality also verifies pool offsets. +- Token comparison found only the recorded identifier substitutions in 26 files. For `NHTTP_stdlib_RVL.c`, all 1,416 non-brace tokens remain identical and in the same order. Added braces enclose existing control-flow bodies; declarations and expressions are unchanged. +- Focused `ctxdiff.py` checks passed with zero differences for 13 affected functions. Three existing non-matching functions are recorded below. `ninja -C . build/43U/ok` also passed with no work remaining. +- The changed-path audit found zero edits to protected paths. Shared-name uses were searched across `src`, `libs`, and `include`. + +## Counts + +Counts are placeholder token occurrences, including declarations and uses, from the pattern below. Distinct spellings are also shown; equal spellings in separate records count once in that column. The pattern includes `_unk*` and `argN` as well as the task examples. + +```text +\b(?:_?unk(?:_0x[0-9A-Fa-f]+|[0-9A-Fa-f]+)?|field_0x[0-9A-Fa-f]+|var_\w+|value\d+|arg\d+)\b +``` + +| File | Occurrences before -> after | Distinct before -> after | +| --- | ---: | ---: | +| `include/iplwww/www_browser.h` | 8 -> 1 | 6 -> 1 | +| `include/iplwww/www_window.h` | 5 -> 1 | 5 -> 1 | +| `include/keyboard/tiHwKeyboard.h` | 5 -> 0 | 3 -> 0 | +| `include/keyboard/tiUtil.h` | 7 -> 0 | 7 -> 0 | +| `include/scene/board/iplFocusObject.h` | 3 -> 0 | 3 -> 0 | +| `include/system/TVRC.h` | 2 -> 0 | 2 -> 0 | +| `include/system/iplTVRCManager.h` | 10 -> 0 | 10 -> 0 | +| `libs/OperaWWW/include/revolution/www_types.h` | 11 -> 0 | 6 -> 0 | +| `libs/RevoEX/include/private/nhttp.h` | 19 -> 0 | 18 -> 0 | +| `libs/RevoEX/src/nhttp/NHTTP_control.c` | 1 -> 0 | 1 -> 0 | +| `libs/RevoEX/src/nhttp/NHTTP_list.c` | 1 -> 0 | 1 -> 0 | +| `libs/RevoEX/src/nhttp/NHTTP_request.c` | 3 -> 0 | 2 -> 0 | +| `libs/RevoEX/src/nhttp/NHTTP_socket_RVL.c` | 2 -> 0 | 1 -> 0 | +| `libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL.c` | 0 -> 0 | 0 -> 0 | +| `libs/RevoEX/src/nhttp/NHTTP_thread.c` | 13 -> 0 | 4 -> 0 | +| `libs/RevoEX/src/nhttp/d_nhttp.c` | 1 -> 0 | 1 -> 0 | +| `libs/RevoEX/src/nhttp/d_nhttp_common.c` | 21 -> 2 | 5 -> 2 | +| `libs/RevoEX/src/nhttp/d_nhttp_private.c` | 3 -> 0 | 3 -> 0 | +| `src/iplwww/www_browser.cpp` | 36 -> 12 | 12 -> 2 | +| `src/iplwww/www_trasition.cpp` | 5 -> 0 | 5 -> 0 | +| `src/iplwww/www_wiisetting.cpp` | 5 -> 0 | 5 -> 0 | +| `src/iplwww/www_window.cpp` | 53 -> 28 | 5 -> 1 | +| `src/keyboard/tiHwKeyboard.cpp` | 16 -> 0 | 3 -> 0 | +| `src/keyboard/tiUtil.cpp` | 49 -> 0 | 13 -> 0 | +| `src/scene/board/iplFocusObject.cpp` | 12 -> 0 | 3 -> 0 | +| `src/system/TVRC.cpp` | 7 -> 0 | 6 -> 0 | +| `src/system/iplTVRCManager.cpp` | 31 -> 0 | 11 -> 0 | + +Total placeholder occurrences in all changed code files: 329 -> 44. + +## Ownership exceptions and opaque roles + +- `BrowserWindow::unk_0x2C4` stays unchanged because `src/scene/setting/iplSetting.cpp` reads and writes element 3 in `update`. Proposed later name: `mWindowFlags`; the six-element array must remain intact. +- `ImeData::unk_0x00` stays unchanged because `src/scene/setting/iplSetting.cpp` tests it before handling the keyboard event. Proposed later name: `eventCode`. +- The `_unk24` and `_unk28` declarations left in `d_nhttp_common.c` belong to the unrelated, file-local `NHTTPStaticResource`. They are outside this assignment and are not references to the renamed connection fields. +- Opera creation payload words and optional capability slots have no interpreted consumers in this tree. `creationDataA` through `creationDataE`, `capabilityWord`, `capabilityDataA` through `capabilityDataD`, and `updateData` name their transport roles only. Geometry, input modes, callback types and flags are not inferred. An external API search supplied no useful additional evidence. +- `TVRCSettings::formatVersion` is inferred from the magic-adjacent minimum-version check. `configurationValid` names the nonzero acceptance marker; its full on-disk domain is unknown. +- The focus-object reserved scalars are initialized once and never read. The reserved arrays/words in the TVRC record, plugin-value record, and NHTTP connection record have no field accesses. They were neither inserted nor resized. + +## Rename evidence + +### browser + +| Rename | Evidence | Files | +| --- | --- | --- | +| `unk_0x2B0` -> `mDisplayPageIndex` | Selects the current page in the two-page texture array; published after TileBlit_. | `include/iplwww/www_window.h`, `src/iplwww/www_window.cpp`, `src/iplwww/www_browser.cpp` | +| `unk_0x2B4` -> `mDisplayBufferIndices` | Per-page displayed texture indices, updated after TileBlit_ and read by GetTextureBuffer. | `include/iplwww/www_window.h`, `src/iplwww/www_window.cpp`, `src/iplwww/www_browser.cpp` | +| `unk_0x2BC` -> `mUpdateBufferIndex` | Selects the next of three texture buffers for loading or flushing. | `include/iplwww/www_window.h`, `src/iplwww/www_window.cpp`, `src/iplwww/www_browser.cpp` | +| `unk_0x2C0` -> `mUpdatePageIndex` | Selects the destination page for a URL change or texture update. | `include/iplwww/www_window.h`, `src/iplwww/www_window.cpp`, `src/iplwww/www_browser.cpp` | +| `a` -> `pageOffset` | Subtracted from mDisplayPageIndex modulo two when selecting a displayed page. | `src/iplwww/www_window.cpp` | +| `b` -> `forUpdate` | Chooses the pending write buffer and bypasses the ready-texture check. | `src/iplwww/www_window.cpp` | +| `i` -> `pageIndex` | Indexes the first dimension of mTexBufArr and mTexDisplayRects. | `src/iplwww/www_window.cpp` | +| `j` -> `bufferIndex` | Indexes the second dimension of mTexBufArr and mTexDisplayRects. | `src/iplwww/www_window.cpp` | +| `a` -> `pageOffset` | Matches the named GetTextureBuffer argument in its definition. | `include/iplwww/www_window.h` | +| `b` -> `forUpdate` | Matches the named GetTextureBuffer argument in its definition. | `include/iplwww/www_window.h` | +| `somePtr` -> `eventData` | ReportEventId_ prints the notification data pointer for WWW_EVT_LINK_HOVER. | `src/iplwww/www_window.cpp` | +| `const char* unk` -> `const char* fontDirectory` | Run passes /operafonts/ to InitFonts_; this implementation uses a fixed font name. | `include/iplwww/www_browser.h`, `src/iplwww/www_browser.cpp` | +| `int unk` -> `int callbackData` | Extra integer argument of the registered surface flush callback, unused by the handler. | `include/iplwww/www_browser.h`, `src/iplwww/www_browser.cpp` | +| `something` -> `text` | CommitIme copies the supplied string into the command packet. | `include/iplwww/www_browser.h`, `src/iplwww/www_browser.cpp` | +| `__dest` -> `textCopy` | Owns the duplicated CommitIme string until its command packet frees it. | `src/iplwww/www_browser.cpp` | +| `somethingClicked` -> `clicked` | Set when BTN_INTERACT triggers the mouse click event sequence. | `src/iplwww/www_browser.cpp` | +| `something` -> `inputBlocked` | True while URL-change and page-transition flags jointly block UI event processing. | `src/iplwww/www_browser.cpp` | +| `val` -> `pageOffset` | Forwarded to BrowserWindow::GetTextureBuffer to select the displayed page. | `src/iplwww/www_browser.cpp` | +| `u32 unk_0x0C` -> `u32 updateData` | Forwarded unchanged as the third WWWUpdateIme argument; its value semantics are opaque. | `include/iplwww/www_browser.h` | +| `packet->data.updateIme.unk_0x0C` -> `packet->data.updateIme.updateData` | Forwarded unchanged as the third WWWUpdateIme argument; its value semantics are opaque. | `src/iplwww/www_browser.cpp` | +| `unk_0x0C` -> `creationDataA` | Opaque IME creation payload word A; CreateImeData and operator= preserve it without interpretation. | `include/iplwww/www_browser.h`, `src/iplwww/www_browser.cpp` | +| `data->unk_0x0C` -> `data->creationDataA` | Opaque IME creation payload word A; CreateImeData and operator= preserve it without interpretation. | `src/iplwww/www_browser.cpp` | +| `wwwData->unk_0x08` -> `wwwData->creationDataA` | Opaque IME creation payload word A; CreateImeData and operator= preserve it without interpretation. | `src/iplwww/www_browser.cpp` | +| `unk_0x08` -> `creationDataA` | Opaque IME creation payload word A; CreateImeData and operator= preserve it without interpretation. | `libs/OperaWWW/include/revolution/www_types.h` | +| `unk_0x10` -> `creationDataB` | Opaque IME creation payload word B; CreateImeData and operator= preserve it without interpretation. | `include/iplwww/www_browser.h`, `src/iplwww/www_browser.cpp` | +| `data->unk_0x10` -> `data->creationDataB` | Opaque IME creation payload word B; CreateImeData and operator= preserve it without interpretation. | `src/iplwww/www_browser.cpp` | +| `wwwData->unk_0x0C` -> `wwwData->creationDataB` | Opaque IME creation payload word B; CreateImeData and operator= preserve it without interpretation. | `src/iplwww/www_browser.cpp` | +| `unk_0x0C` -> `creationDataB` | Opaque IME creation payload word B; CreateImeData and operator= preserve it without interpretation. | `libs/OperaWWW/include/revolution/www_types.h` | +| `unk_0x14` -> `creationDataC` | Opaque IME creation payload word C; CreateImeData and operator= preserve it without interpretation. | `include/iplwww/www_browser.h`, `src/iplwww/www_browser.cpp` | +| `data->unk_0x14` -> `data->creationDataC` | Opaque IME creation payload word C; CreateImeData and operator= preserve it without interpretation. | `src/iplwww/www_browser.cpp` | +| `wwwData->unk_0x10` -> `wwwData->creationDataC` | Opaque IME creation payload word C; CreateImeData and operator= preserve it without interpretation. | `src/iplwww/www_browser.cpp` | +| `unk_0x10` -> `creationDataC` | Opaque IME creation payload word C; CreateImeData and operator= preserve it without interpretation. | `libs/OperaWWW/include/revolution/www_types.h` | +| `unk_0x18` -> `creationDataD` | Opaque IME creation payload word D; CreateImeData and operator= preserve it without interpretation. | `include/iplwww/www_browser.h`, `src/iplwww/www_browser.cpp` | +| `data->unk_0x18` -> `data->creationDataD` | Opaque IME creation payload word D; CreateImeData and operator= preserve it without interpretation. | `src/iplwww/www_browser.cpp` | +| `wwwData->unk_0x14` -> `wwwData->creationDataD` | Opaque IME creation payload word D; CreateImeData and operator= preserve it without interpretation. | `src/iplwww/www_browser.cpp` | +| `unk_0x14` -> `creationDataD` | Opaque IME creation payload word D; CreateImeData and operator= preserve it without interpretation. | `libs/OperaWWW/include/revolution/www_types.h` | +| `unk_0x18` -> `creationDataE` | Fifth opaque IME creation payload word; not consumed by the Wii wrapper. | `libs/OperaWWW/include/revolution/www_types.h` | +| `unk_0x04` -> `reserved` | Unaccessed four-byte gap before the double-aligned WWWJSPluginValueData union. | `libs/OperaWWW/include/revolution/www_types.h` | +| `unk_0x04` -> `capabilityWord` | Opaque capability slot set to NULL by both AddJsPlugin functions and passed to WWWAddJSPlugin; no callback or flag semantics inferred. | `libs/OperaWWW/include/revolution/www_types.h` | +| `cap.unk_0x04` -> `cap.capabilityWord` | Opaque capability slot set to NULL by both AddJsPlugin functions and passed to WWWAddJSPlugin; no callback or flag semantics inferred. | `src/iplwww/www_trasition.cpp`, `src/iplwww/www_wiisetting.cpp` | +| `unk_0x0C` -> `capabilityDataA` | Opaque capability slot set to NULL by both AddJsPlugin functions and passed to WWWAddJSPlugin; no callback or flag semantics inferred. | `libs/OperaWWW/include/revolution/www_types.h` | +| `cap.unk_0x0C` -> `cap.capabilityDataA` | Opaque capability slot set to NULL by both AddJsPlugin functions and passed to WWWAddJSPlugin; no callback or flag semantics inferred. | `src/iplwww/www_trasition.cpp`, `src/iplwww/www_wiisetting.cpp` | +| `unk_0x10` -> `capabilityDataB` | Opaque capability slot set to NULL by both AddJsPlugin functions and passed to WWWAddJSPlugin; no callback or flag semantics inferred. | `libs/OperaWWW/include/revolution/www_types.h` | +| `cap.unk_0x10` -> `cap.capabilityDataB` | Opaque capability slot set to NULL by both AddJsPlugin functions and passed to WWWAddJSPlugin; no callback or flag semantics inferred. | `src/iplwww/www_trasition.cpp`, `src/iplwww/www_wiisetting.cpp` | +| `unk_0x14` -> `capabilityDataC` | Opaque capability slot set to NULL by both AddJsPlugin functions and passed to WWWAddJSPlugin; no callback or flag semantics inferred. | `libs/OperaWWW/include/revolution/www_types.h` | +| `cap.unk_0x14` -> `cap.capabilityDataC` | Opaque capability slot set to NULL by both AddJsPlugin functions and passed to WWWAddJSPlugin; no callback or flag semantics inferred. | `src/iplwww/www_trasition.cpp`, `src/iplwww/www_wiisetting.cpp` | +| `unk_0x18` -> `capabilityDataD` | Opaque capability slot set to NULL by both AddJsPlugin functions and passed to WWWAddJSPlugin; no callback or flag semantics inferred. | `libs/OperaWWW/include/revolution/www_types.h` | +| `cap.unk_0x18` -> `cap.capabilityDataD` | Opaque capability slot set to NULL by both AddJsPlugin functions and passed to WWWAddJSPlugin; no callback or flag semantics inferred. | `src/iplwww/www_trasition.cpp`, `src/iplwww/www_wiisetting.cpp` | + +### tvrc file + +| Rename | Evidence | Files | +| --- | --- | --- | +| `unk_0x08` -> `reserved` | Four file-header bytes have no named or assembly accesses in TVRC.cpp. | `src/system/TVRC.cpp` | +| `unk_0x0C` -> `carrierFrequencyKHz` | TVRCSendStartAsync loads 0x0c, multiplies by 1000 and stores _Hz. | `src/system/TVRC.cpp` | +| `unk_0x10` -> `onTimeRatio` | TVRCSendStartAsync loads 0x10 into _onTimeRatio. | `src/system/TVRC.cpp` | +| `unk_0x14` -> `unitTimeUs` | TVRCSendStartAsync scales 0x14 by timer clock / 125000 then shifts by 3 to form _tickT. | `src/system/TVRC.cpp` | +| `unk_0x04` -> `repeatOffset` | Command entry +4 is loaded at 0x1c, tested for repeat code and added to the file base. | `src/system/TVRC.cpp` | +| `unk_0x18` -> `commands` | TVRCIsValidCommand indexes these command records; assembly uses offset and repeatOffset. | `src/system/TVRC.cpp` | + +### tvrc manager + +| Rename | Evidence | Files | +| --- | --- | --- | +| `unk_0x18` -> `mRepeatCount` | Reset on a new command and incremented when STATE_5 repeats STATE_4. | `src/system/iplTVRCManager.cpp`, `include/system/iplTVRCManager.h` | +| `unk_0x1C` -> `mbRepeatCommand` | Set when a command starts; cleared when its button is no longer held; gates the repeat transition. | `src/system/iplTVRCManager.cpp`, `include/system/iplTVRCManager.h` | +| `unk_0x30` -> `mCommandTransitionTime` | Timestamp at send start and stop; bounds the 30ms send phase and 1000ms recovery. | `src/system/iplTVRCManager.cpp`, `include/system/iplTVRCManager.h` | +| `unk_0x38` -> `mMuteStartTime` | Timestamp immediately after muteOnBGM and controller force-invalid in STATE_2. | `src/system/iplTVRCManager.cpp`, `include/system/iplTVRCManager.h` | +| `unk_0x40` -> `mSoundShutupTime` | Timestamp after shutup(TRUE); shutup(FALSE) waits at least 3ms against it. | `src/system/iplTVRCManager.cpp`, `include/system/iplTVRCManager.h` | +| `unk_0x48` -> `mLastCommandTime` | Timestamp when a command starts, cleared after 5000ms in STATE_1. | `src/system/iplTVRCManager.cpp`, `include/system/iplTVRCManager.h` | +| `unk_0x74` -> `mDisabledTriggerTick` | OSGetTick snapshot when the disabled-command trigger becomes pending. | `src/system/iplTVRCManager.cpp`, `include/system/iplTVRCManager.h` | +| `unk_0x7C` -> `mbDisabledTriggerPending` | Latch set when a mapped command is triggered while disabled; prevents retriggering. | `src/system/iplTVRCManager.cpp`, `include/system/iplTVRCManager.h` | +| `unk_0x80` -> `mDisabledTriggerState` | Reset to zero together with the disabled-trigger latch and timestamp; no further state semantics inferred. | `src/system/iplTVRCManager.cpp`, `include/system/iplTVRCManager.h` | +| `unk_0x04` -> `mbDisabledTriggerEnabled` | Gates the disabled-command trigger branch together with HBM_DISABLED. | `include/system/iplTVRCManager.h`, `src/system/iplTVRCManager.cpp` | +| `settings->unk_0x04` -> `settings->formatVersion` | Settings validation rejects values below 1 after checking magic; version role inferred from this check. | `src/system/iplTVRCManager.cpp` | +| `unk_0x04` -> `formatVersion` | Settings validation rejects values below 1 after checking magic; version role inferred from this check. | `include/system/TVRC.h` | +| `unk_0x08` -> `configurationValid` | Nonzero record marker required before loading maker, model and command map; exact on-disk enum unknown. | `src/system/iplTVRCManager.cpp`, `include/system/TVRC.h` | + +### nhttp + +| Rename | Evidence | Files | +| --- | --- | --- | +| `_unk14` -> `isBinary` | Controls Content-Type application/octet-stream and Content-Transfer-Encoding binary emission. | `libs/RevoEX/include/private/nhttp.h`, `libs/RevoEX/src/nhttp/NHTTP_thread.c`, `libs/RevoEX/src/nhttp/NHTTP_control.c` | +| `_unk10` -> `socket` | Copied from the active socket, initialized to -1, passed to NHTTPi_SocCancel. | `libs/RevoEX/include/private/nhttp.h`, `libs/RevoEX/src/nhttp/NHTTP_thread.c`, `libs/RevoEX/src/nhttp/NHTTP_request.c`, `libs/RevoEX/src/nhttp/NHTTP_list.c` | +| `_unkD4` -> `sslInitParam` | Passed as the context argument to info->sslInit with request->sslId. | `libs/RevoEX/include/private/nhttp.h`, `libs/RevoEX/src/nhttp/NHTTP_request.c`, `libs/RevoEX/src/nhttp/NHTTP_socket_RVL.c` | +| `_unk250` -> `postSendCallback` | Cast to NHTTPPostSend and invoked with label, buffer, size, offset and user parameter. | `libs/RevoEX/include/private/nhttp.h`, `libs/RevoEX/src/nhttp/d_nhttp.c` | +| `_unk24` -> `postDataAddress` | Post-send callback returns this buffer address, which is cast to const char* for transfer. | `libs/RevoEX/include/private/nhttp.h`, `libs/RevoEX/src/nhttp/NHTTP_thread.c`, `libs/RevoEX/src/nhttp/d_nhttp_private.c` | +| `_unk28` -> `postDataSize` | Post-send callback returns this byte count; zero ends post content traversal. | `libs/RevoEX/include/private/nhttp.h`, `libs/RevoEX/src/nhttp/NHTTP_thread.c`, `libs/RevoEX/src/nhttp/d_nhttp_private.c` | +| `connection->_unk24` -> `connection->postDataAddress` | Transfers the post-send callback buffer address and byte count to the connection. | `libs/RevoEX/src/nhttp/d_nhttp_common.c` | +| `connection->_unk28` -> `connection->postDataSize` | Transfers the post-send callback buffer address and byte count to the connection. | `libs/RevoEX/src/nhttp/d_nhttp_common.c` | +| `_unk4` -> `bufferAddressOrSize` | Post-send argument buffer address; body callback argument buffer size, matching the two event-specific record layouts. | `libs/RevoEX/include/private/nhttp.h`, `libs/RevoEX/src/nhttp/d_nhttp_common.c` | +| `_unk8` -> `sizeOrBodyOffset` | Post-send argument size; body callback argument offset/bodyLen, matching the two event-specific record layouts. | `libs/RevoEX/include/private/nhttp.h`, `libs/RevoEX/src/nhttp/d_nhttp_common.c` | +| `_unkC` -> `postOffset` | Fourth word of NHTTPPostSendArg; forwarded offset of the current POST chunk. | `libs/RevoEX/include/private/nhttp.h` | +| `_unkC` -> `completionPending` | NHTTPi_WaitForCompletion loops while nonzero; NHTTPi_NotifyCompletion clears it. | `libs/RevoEX/include/private/nhttp.h` | +| `param._unkC` -> `param.postOffset` | Fourth word of NHTTPPostSendArg; forwarded offset of the current POST chunk. | `libs/RevoEX/src/nhttp/d_nhttp_common.c` | +| `connection->_unkC` -> `connection->completionPending` | Set on creation, tested by completion wait, cleared before signaling completion. | `libs/RevoEX/src/nhttp/d_nhttp_common.c`, `libs/RevoEX/src/nhttp/d_nhttp_private.c` | +| `_unk34` -> `reserved0` | No field access in src, libs or include; retained as a separate reserved word with identical order and type. | `libs/RevoEX/include/private/nhttp.h` | +| `_unk38` -> `reserved1` | No field access in src, libs or include; retained as a separate reserved word with identical order and type. | `libs/RevoEX/include/private/nhttp.h` | +| `_unk3C` -> `reserved2` | No field access in src, libs or include; retained as a separate reserved word with identical order and type. | `libs/RevoEX/include/private/nhttp.h` | +| `_unk8048` -> `reserved3` | No field access in src, libs or include; retained as a separate reserved word with identical order and type. | `libs/RevoEX/include/private/nhttp.h` | +| `_unk804C` -> `reserved4` | No field access in src, libs or include; retained as a separate reserved word with identical order and type. | `libs/RevoEX/include/private/nhttp.h` | +| `_unk8050` -> `reserved5` | No field access in src, libs or include; retained as a separate reserved word with identical order and type. | `libs/RevoEX/include/private/nhttp.h` | +| `_unk8054` -> `reserved6` | No field access in src, libs or include; retained as a separate reserved word with identical order and type. | `libs/RevoEX/include/private/nhttp.h` | +| `_unk8058` -> `reserved7` | No field access in src, libs or include; retained as a separate reserved word with identical order and type. | `libs/RevoEX/include/private/nhttp.h` | +| `_unk805C` -> `reserved8` | No field access in src, libs or include; retained as a separate reserved word with identical order and type. | `libs/RevoEX/include/private/nhttp.h` | + +### keyboard util + +| Rename | Evidence | Files | +| --- | --- | --- | +| `arg0` -> `time` | Animation::getValue passes mfCurrentFrame in this position. | `src/keyboard/tiUtil.cpp`, `include/keyboard/tiUtil.h` | +| `arg1` -> `startTime` | Subtracted from time and endTime before normalizing the interpolation interval. | `src/keyboard/tiUtil.cpp`, `include/keyboard/tiUtil.h` | +| `arg2` -> `startValue` | Animation::getValue passes mfStartPoint; returned when normalizedTime is zero. | `src/keyboard/tiUtil.cpp`, `include/keyboard/tiUtil.h` | +| `arg3` -> `startTangent` | Its Hermite contribution is timeOffset * (1 - normalizedTime)^2. | `src/keyboard/tiUtil.cpp`, `include/keyboard/tiUtil.h` | +| `arg4` -> `endTime` | Animation::getValue passes mfAnimationTime; ends the normalization interval. | `src/keyboard/tiUtil.cpp`, `include/keyboard/tiUtil.h` | +| `arg5` -> `endValue` | Animation::getValue passes mfEndPoint; returned when normalizedTime is one. | `src/keyboard/tiUtil.cpp`, `include/keyboard/tiUtil.h` | +| `arg6` -> `endTangent` | Its Hermite contribution is timeOffset * normalizedTime * (normalizedTime - 1). | `src/keyboard/tiUtil.cpp`, `include/keyboard/tiUtil.h` | +| `var_f26` -> `timeOffset` | Stores time - startTime and scales the tangent contribution. | `src/keyboard/tiUtil.cpp` | +| `var_f25` -> `normalizedTimeSquared` | Stores normalizedTime multiplied by itself. | `src/keyboard/tiUtil.cpp` | +| `var_f27` -> `valueBlend` | Holds the endpoint blend polynomial, then the blended endpoint value. | `src/keyboard/tiUtil.cpp` | +| `var_f28` -> `tangentBlend` | Stores normalizedTimeSquared - normalizedTime for tangent weighting. | `src/keyboard/tiUtil.cpp` | +| `var_f29` -> `intervalDelta` | Reused for the time interval and then the start-to-end value difference. | `src/keyboard/tiUtil.cpp` | +| `var_f30` -> `normalizedTime` | Divides timeOffset by the time interval. | `src/keyboard/tiUtil.cpp` | + +### keyboard hw + +| Rename | Evidence | Files | +| --- | --- | --- | +| `field_0x14` -> `mbShiftTapPending` | Set by shift key presses 0xe1/0xe5, consumed on their release, cleared by other input. | `src/keyboard/tiHwKeyboard.cpp`, `include/keyboard/tiHwKeyboard.h` | +| `field_0x15` -> `mbSingleQuoteClosing` | Selects U+2019 versus U+2018; same member already named in TIINPUTFORM_IMPLEMENTATION. | `src/keyboard/tiHwKeyboard.cpp`, `include/keyboard/tiHwKeyboard.h` | +| `field_0x16` -> `mbDoubleQuoteClosing` | Selects U+201D versus U+201C; same member already named in TIINPUTFORM_IMPLEMENTATION. | `src/keyboard/tiHwKeyboard.cpp`, `include/keyboard/tiHwKeyboard.h` | + +### board focus + +| Rename | Evidence | Files | +| --- | --- | --- | +| `unk_0xF8` -> `mReservedWord` | Only initialized to zero by focus_object; no reads or other writes anywhere in src, libs, include. | `src/scene/board/iplFocusObject.cpp`, `include/scene/board/iplFocusObject.h` | +| `unk_0xFC` -> `mReservedByte` | Only initialized to zero by focus_object; no reads or other writes anywhere in src, libs, include. | `src/scene/board/iplFocusObject.cpp`, `include/scene/board/iplFocusObject.h` | +| `unk_0x114` -> `mUrlTerminators` | is_url_end_code compares these characters; check_paren appends the closing delimiter. | `src/scene/board/iplFocusObject.cpp`, `include/scene/board/iplFocusObject.h` | + +## Formatting + +`libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL.c` now uses the NHTTP brace style, spaces around operators, expanded control-flow bodies, and one statement per line. The comma-separated local declaration stays together to preserve declaration order. No identifiers, expressions, constants, declaration order or statement order changed. Its entire object is byte-identical to the saved baseline. + +## Unit measurements + +Both sides of each arrow are from fresh local builds, before edits and after the final clean gate. Exact means instruction-exact against the retail object. Code/data columns show objdiff matched bytes. + +| Unit | Instruction exact before -> after | Code bytes before -> after | Data bytes before -> after | Fuzzy percent before -> after | +| --- | ---: | ---: | ---: | ---: | +| `libs/RevoEX/src/nhttp/NHTTP_control` | 3/3 -> 3/3 | 420 -> 420 | 32 -> 32 | 100.00000 -> 100.00000 | +| `libs/RevoEX/src/nhttp/NHTTP_list` | 5/5 -> 5/5 | 592 -> 592 | 0 -> 0 | 100.00000 -> 100.00000 | +| `libs/RevoEX/src/nhttp/NHTTP_request` | 7/7 -> 7/7 | 2512 -> 2512 | 48 -> 48 | 100.00000 -> 100.00000 | +| `libs/RevoEX/src/nhttp/NHTTP_socket_RVL` | 10/10 -> 10/10 | 2140 -> 2140 | 0 -> 0 | 100.00000 -> 100.00000 | +| `libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL` | 12/14 -> 12/14 | 1864 -> 1864 | 112 -> 112 | 99.95730 -> 99.95730 | +| `libs/RevoEX/src/nhttp/NHTTP_thread` | 26/26 -> 26/26 | 11292 -> 11292 | 504 -> 504 | 100.00000 -> 100.00000 | +| `libs/RevoEX/src/nhttp/d_nhttp` | 22/22 -> 22/22 | 3180 -> 3180 | 720 -> 720 | 100.00000 -> 100.00000 | +| `libs/RevoEX/src/nhttp/d_nhttp_common` | 26/26 -> 26/26 | 2088 -> 2088 | 3368 -> 3368 | 100.00000 -> 100.00000 | +| `libs/RevoEX/src/nhttp/d_nhttp_private` | 7/7 -> 7/7 | 1320 -> 1320 | 0 -> 0 | 100.00000 -> 100.00000 | +| `src/iplwww/www_browser` | 33/33 -> 33/33 | 5768 -> 5768 | 1368 -> 1368 | 100.00000 -> 100.00000 | +| `src/iplwww/www_trasition` | 9/9 -> 9/9 | 912 -> 912 | 232 -> 232 | 100.00000 -> 100.00000 | +| `src/iplwww/www_wiisetting` | 20/21 -> 20/21 | 3740 -> 3740 | 3856 -> 3856 | 99.94495 -> 99.94495 | +| `src/iplwww/www_window` | 18/18 -> 18/18 | 3392 -> 3392 | 1264 -> 1264 | 100.00000 -> 100.00000 | +| `src/keyboard/tiHwKeyboard` | 10/10 -> 10/10 | 4596 -> 4596 | 504 -> 504 | 100.00000 -> 100.00000 | +| `src/keyboard/tiUtil` | 18/18 -> 18/18 | 3524 -> 3524 | 604 -> 604 | 100.00000 -> 100.00000 | +| `src/scene/board/iplFocusObject` | 89/89 -> 89/89 | 20332 -> 20332 | 2576 -> 2576 | 100.00000 -> 100.00000 | +| `src/system/TVRC` | 9/9 -> 9/9 | 2312 -> 2312 | 280 -> 280 | 100.00000 -> 100.00000 | +| `src/system/iplTVRCManager` | 13/13 -> 13/13 | 3484 -> 3484 | 120 -> 120 | 100.00000 -> 100.00000 | + +Touched-unit totals: instruction-exact 337 -> 337; matched code 73468 -> 73468 bytes; matched data 15588 -> 15588 bytes. + +## Existing non-matches + +- `NHTTPi_strnicmp`: 99.76471%, 51/51 instructions, two initialization instructions scheduled in the opposite order. Formatting leaves its entire object unchanged. +- `NHTTPi_compareToken`: 99.73333%, 45/45 instructions, two initialization instructions scheduled in the opposite order. Formatting leaves its entire object unchanged. +- `Getter___Q23www10wiisettingFP14WWWJSPluginObjPCcP16WWWJSPluginValue`: 99.86043%, 609/609 instructions, 14 register-allocation differences. Capability-member renames leave its entire object unchanged. + +## Attempts + +1. Saved a freshly built baseline report and all 1,027 source objects before edits. +2. Applied keyboard, focus-object and TVRC renames. Focused builds kept four objects identical; TVRC changed only debug names. +3. Applied NHTTP and browser renames, updating every owned shared-member use. Retained the two members consumed by Setting. +4. Reformatted only NHTTP_stdlib_RVL. Token and object comparisons passed. +5. Ran the full clean gate on 18 touched units, followed by whole-tree report/object comparisons, pool checks and focused instruction diffs. All required readability gates passed. + +## Full gate output + +```text +full build: ok +main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d +[libs/RevoEX/src/nhttp/NHTTP_control] pool: IDENTICAL +[libs/RevoEX/src/nhttp/NHTTP_control] objdiff: code 420/420 data 32/32 functions 3/3 fuzzy 100.0000 linked code 420 +[libs/RevoEX/src/nhttp/NHTTP_control] instruction-exact functions: 3/3 +[libs/RevoEX/src/nhttp/NHTTP_control] section .data size 32 match 100.0 +[libs/RevoEX/src/nhttp/NHTTP_control] section .text size 420 match 100.0 +[libs/RevoEX/src/nhttp/NHTTP_control] baseline: code 420/420 data 32 functions 3 fuzzy 100.0000 +[libs/RevoEX/src/nhttp/NHTTP_list] pool: IDENTICAL +[libs/RevoEX/src/nhttp/NHTTP_list] objdiff: code 592/592 data None/None functions 5/5 fuzzy 100.0000 linked code 592 +[libs/RevoEX/src/nhttp/NHTTP_list] instruction-exact functions: 5/5 +[libs/RevoEX/src/nhttp/NHTTP_list] section .text size 592 match 100.0 +[libs/RevoEX/src/nhttp/NHTTP_list] baseline: code 592/592 data None functions 5 fuzzy 100.0000 +[libs/RevoEX/src/nhttp/NHTTP_request] pool: IDENTICAL +[libs/RevoEX/src/nhttp/NHTTP_request] objdiff: code 2512/2512 data 48/48 functions 7/7 fuzzy 100.0000 linked code 2512 +[libs/RevoEX/src/nhttp/NHTTP_request] instruction-exact functions: 7/7 +[libs/RevoEX/src/nhttp/NHTTP_request] section .data size 16 match 100.0 +[libs/RevoEX/src/nhttp/NHTTP_request] section .rodata size 24 match 100.0 +[libs/RevoEX/src/nhttp/NHTTP_request] section .sdata size 8 match 100.0 +[libs/RevoEX/src/nhttp/NHTTP_request] section .text size 2512 match 100.0 +[libs/RevoEX/src/nhttp/NHTTP_request] baseline: code 2512/2512 data 48 functions 7 fuzzy 100.0000 +[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] pool: IDENTICAL +[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] objdiff: code 2140/2140 data None/None functions 10/10 fuzzy 100.0000 linked code 2140 +[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] instruction-exact functions: 10/10 +[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] section .text size 2140 match 100.0 +[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] baseline: code 2140/2140 data None functions 10 fuzzy 100.0000 +[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] pool: IDENTICAL +[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] objdiff: code 1864/2248 data 112/112 functions 12/14 fuzzy 99.9573 linked code 0 +[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] instruction-exact functions: 12/14 +[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] section .data size 72 match 100.0 +[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] section .rodata size 40 match 100.0 +[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] section .text size 2248 match 99.9573 +[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] below 100: NHTTPi_strnicmp 99.76471 +[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] below 100: NHTTPi_compareToken 99.73333 +[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] baseline: code 1864/2248 data 112 functions 12 fuzzy 99.9573 +[libs/RevoEX/src/nhttp/NHTTP_thread] pool: IDENTICAL +[libs/RevoEX/src/nhttp/NHTTP_thread] objdiff: code 11292/11292 data 504/504 functions 26/26 fuzzy 100.0000 linked code 11292 +[libs/RevoEX/src/nhttp/NHTTP_thread] instruction-exact functions: 26/26 +[libs/RevoEX/src/nhttp/NHTTP_thread] section .data size 200 match 100.0 +[libs/RevoEX/src/nhttp/NHTTP_thread] section .rodata size 216 match 100.0 +[libs/RevoEX/src/nhttp/NHTTP_thread] section .sdata size 88 match 100.0 +[libs/RevoEX/src/nhttp/NHTTP_thread] section .text size 11292 match 100.0 +[libs/RevoEX/src/nhttp/NHTTP_thread] baseline: code 11292/11292 data 504 functions 26 fuzzy 100.0000 +[libs/RevoEX/src/nhttp/d_nhttp] pool: IDENTICAL +[libs/RevoEX/src/nhttp/d_nhttp] objdiff: code 3180/3180 data 720/720 functions 22/22 fuzzy 100.0000 linked code 3180 +[libs/RevoEX/src/nhttp/d_nhttp] instruction-exact functions: 22/22 +[libs/RevoEX/src/nhttp/d_nhttp] section .data size 704 match 100.0 +[libs/RevoEX/src/nhttp/d_nhttp] section .sbss size 8 match 100.0 +[libs/RevoEX/src/nhttp/d_nhttp] section .sdata size 8 match 100.0 +[libs/RevoEX/src/nhttp/d_nhttp] section .text size 3180 match 100.0 +[libs/RevoEX/src/nhttp/d_nhttp] baseline: code 3180/3180 data 720 functions 22 fuzzy 100.0000 +[libs/RevoEX/src/nhttp/d_nhttp_common] pool: IDENTICAL +[libs/RevoEX/src/nhttp/d_nhttp_common] objdiff: code 2088/2088 data 3368/3368 functions 26/26 fuzzy 100.0000 linked code 2088 +[libs/RevoEX/src/nhttp/d_nhttp_common] instruction-exact functions: 26/26 +[libs/RevoEX/src/nhttp/d_nhttp_common] section .bss size 3296 match 100.0 +[libs/RevoEX/src/nhttp/d_nhttp_common] section .data size 64 match 100.0 +[libs/RevoEX/src/nhttp/d_nhttp_common] section .sbss size 8 match 100.0 +[libs/RevoEX/src/nhttp/d_nhttp_common] section .text size 2088 match 100.0 +[libs/RevoEX/src/nhttp/d_nhttp_common] baseline: code 2088/2088 data 3368 functions 26 fuzzy 100.0000 +[libs/RevoEX/src/nhttp/d_nhttp_private] pool: IDENTICAL +[libs/RevoEX/src/nhttp/d_nhttp_private] objdiff: code 1320/1320 data None/None functions 7/7 fuzzy 100.0000 linked code 1320 +[libs/RevoEX/src/nhttp/d_nhttp_private] instruction-exact functions: 7/7 +[libs/RevoEX/src/nhttp/d_nhttp_private] section .text size 1320 match 100.0 +[libs/RevoEX/src/nhttp/d_nhttp_private] baseline: code 1320/1320 data None functions 7 fuzzy 100.0000 +[src/iplwww/www_browser] pool: IDENTICAL +[src/iplwww/www_browser] objdiff: code 5768/5768 data 1368/1368 functions 33/33 fuzzy 100.0000 linked code 5768 +[src/iplwww/www_browser] instruction-exact functions: 33/33 +[src/iplwww/www_browser] section .bss size 24 match 100.0 +[src/iplwww/www_browser] section .data size 848 match 100.0 +[src/iplwww/www_browser] section .sbss size 456 match 100.0 +[src/iplwww/www_browser] section .sdata size 40 match 100.0 +[src/iplwww/www_browser] section .text size 5768 match 100.0 +[src/iplwww/www_browser] baseline: code 5768/5768 data 1368 functions 33 fuzzy 100.0000 +[src/iplwww/www_trasition] pool: IDENTICAL +[src/iplwww/www_trasition] objdiff: code 912/912 data 232/232 functions 9/9 fuzzy 100.0000 linked code 912 +[src/iplwww/www_trasition] instruction-exact functions: 9/9 +[src/iplwww/www_trasition] section .bss size 32 match 100.0 +[src/iplwww/www_trasition] section .data size 176 match 100.0 +[src/iplwww/www_trasition] section .sbss size 8 match 100.0 +[src/iplwww/www_trasition] section .sdata size 16 match 100.0 +[src/iplwww/www_trasition] section .text size 912 match 100.0 +[src/iplwww/www_trasition] baseline: code 912/912 data 232 functions 9 fuzzy 100.0000 +[src/iplwww/www_wiisetting] pool: IDENTICAL +[src/iplwww/www_wiisetting] objdiff: code 3740/6176 data 3856/3856 functions 20/21 fuzzy 99.9450 linked code 0 +[src/iplwww/www_wiisetting] instruction-exact functions: 20/21 +[src/iplwww/www_wiisetting] section .bss size 104 match 100.0 +[src/iplwww/www_wiisetting] section .data size 2576 match 100.0 +[src/iplwww/www_wiisetting] section .rodata size 792 match 100.0 +[src/iplwww/www_wiisetting] section .sbss size 32 match 100.0 +[src/iplwww/www_wiisetting] section .sdata size 320 match 100.0 +[src/iplwww/www_wiisetting] section .sdata2 size 32 match 100.0 +[src/iplwww/www_wiisetting] section .text size 6176 match 99.94495 +[src/iplwww/www_wiisetting] below 100: Getter___Q23www10wiisettingFP14WWWJSPluginObjPCcP16WWWJSPluginValue 99.86043 +[src/iplwww/www_wiisetting] baseline: code 3740/6176 data 3856 functions 20 fuzzy 99.9450 +[src/iplwww/www_window] pool: IDENTICAL +[src/iplwww/www_window] objdiff: code 3392/3392 data 1264/1264 functions 18/18 fuzzy 100.0000 linked code 3392 +[src/iplwww/www_window] instruction-exact functions: 18/18 +[src/iplwww/www_window] section .data size 1256 match 100.0 +[src/iplwww/www_window] section .sdata size 8 match 100.0 +[src/iplwww/www_window] section .text size 3392 match 100.0 +[src/iplwww/www_window] baseline: code 3392/3392 data 1264 functions 18 fuzzy 100.0000 +[src/keyboard/tiHwKeyboard] pool: IDENTICAL +[src/keyboard/tiHwKeyboard] objdiff: code 4596/4596 data 504/504 functions 10/10 fuzzy 100.0000 linked code 4596 +[src/keyboard/tiHwKeyboard] instruction-exact functions: 10/10 +[src/keyboard/tiHwKeyboard] section .bss size 16 match 100.0 +[src/keyboard/tiHwKeyboard] section .data size 288 match 100.0 +[src/keyboard/tiHwKeyboard] section .rodata size 176 match 100.0 +[src/keyboard/tiHwKeyboard] section .sdata size 8 match 100.0 +[src/keyboard/tiHwKeyboard] section .sdata2 size 16 match 100.0 +[src/keyboard/tiHwKeyboard] section .text size 4596 match 100.0 +[src/keyboard/tiHwKeyboard] baseline: code 4596/4596 data 504 functions 10 fuzzy 100.0000 +[src/keyboard/tiUtil] pool: IDENTICAL +[src/keyboard/tiUtil] objdiff: code 3524/3524 data 604/604 functions 18/18 fuzzy 100.0000 linked code 3524 +[src/keyboard/tiUtil] instruction-exact functions: 18/18 +[src/keyboard/tiUtil] section .ctors size 4 match 100.0 +[src/keyboard/tiUtil] section .data size 544 match 100.0 +[src/keyboard/tiUtil] section .sbss size 24 match 100.0 +[src/keyboard/tiUtil] section .sdata2 size 32 match 100.0 +[src/keyboard/tiUtil] section .text size 3524 match 100.0 +[src/keyboard/tiUtil] baseline: code 3524/3524 data 604 functions 18 fuzzy 100.0000 +[src/scene/board/iplFocusObject] pool: IDENTICAL +[src/scene/board/iplFocusObject] objdiff: code 20332/20332 data 2576/2576 functions 89/89 fuzzy 100.0000 linked code 20332 +[src/scene/board/iplFocusObject] instruction-exact functions: 89/89 +[src/scene/board/iplFocusObject] section .data size 2168 match 100.0 +[src/scene/board/iplFocusObject] section .rodata size 176 match 100.0 +[src/scene/board/iplFocusObject] section .sdata size 176 match 100.0 +[src/scene/board/iplFocusObject] section .sdata2 size 56 match 100.0 +[src/scene/board/iplFocusObject] section .text size 20332 match 100.0 +[src/scene/board/iplFocusObject] baseline: code 20332/20332 data 2576 functions 89 fuzzy 100.0000 +[src/system/TVRC] pool: IDENTICAL +[src/system/TVRC] objdiff: code 2312/2312 data 280/280 functions 9/9 fuzzy 100.0000 linked code 2312 +[src/system/TVRC] instruction-exact functions: 9/9 +[src/system/TVRC] section .bss size 96 match 100.0 +[src/system/TVRC] section .sbss size 120 match 100.0 +[src/system/TVRC] section .sdata size 32 match 100.0 +[src/system/TVRC] section .sdata2 size 32 match 100.0 +[src/system/TVRC] section .text size 2312 match 100.0 +[src/system/TVRC] baseline: code 2312/2312 data 280 functions 9 fuzzy 100.0000 +[src/system/iplTVRCManager] pool: IDENTICAL +[src/system/iplTVRCManager] objdiff: code 3484/3484 data 120/120 functions 13/13 fuzzy 100.0000 linked code 3484 +[src/system/iplTVRCManager] instruction-exact functions: 13/13 +[src/system/iplTVRCManager] section .data size 112 match 100.0 +[src/system/iplTVRCManager] section .sbss size 8 match 100.0 +[src/system/iplTVRCManager] section .text size 3484 match 100.0 +[src/system/iplTVRCManager] baseline: code 3484/3484 data 120 functions 13 fuzzy 100.0000 +regressions vs baseline: 0 +global matched_code_percent: 93.66808 -> 93.66808 +global fuzzy_match_percent: 99.79631 -> 99.79631 +global complete_code_percent: 79.26653 -> 79.26653 +global matched_data_percent: 99.99410 -> 99.99410 +forbidden patterns added (net, per file): 0 +readability warnings (net, per file; must be 0 in the final result): 0 +GATE PASS +``` + +## Commits + +- `5c6c7a842b8d79ce03389db32004a72012a66480` keyboard util +- `27081f9d7537216d5ab69f7d889b3650a6f91faf` keyboard hw +- `aef07a78fe4199b521dcf3281caca4b4f141bd52` board focus +- `44a0682cb389a327177d1a620354ae929583b76f` tvrc file +- `6805bfd6c2e83a4d9c144a60196a77e2425fc137` tvrc manager +- `7a8d70aa87d8117b90fa17e1d486e749ee59540e` browser +- `d99686541c70fa2a321a9708cf42aa5a4f00ac4b` nhttp +- `c59ff062da068dbfec66e7a468373457ed48aa70` nhttp format -- 2.49.1