Compare commits

..

1 Commits

Author SHA1 Message Date
Devin AI
d065d5dcbb zprepare: savedNibbles init stores (Zi8PrepareMatch 96.32->96.74)
+ kbdzi.attempts.md: wall documentation for zi*/kbd* leaf

Co-Authored-By: wch <usernamecole7@gmail.com>
2026-10-02 18:30:22 +00:00
65 changed files with 548 additions and 4901 deletions

View File

@@ -53,9 +53,9 @@ Progress
<!-- progress:start -->
| Decompiled | Matched | Linked | Data |
|:---:|:---:|:---:|:---:|
| 99.59% | 90.81% | 71.43% | 99.37% |
| 99.58% | 90.74% | 71.01% | 99.37% |
units 956/1027 complete, functions 12365/12563 matched.
units 955/1027 complete, functions 12361/12563 matched.
decompiled = code with a C/C++ implementation (objdiff fuzzy), matched = byte-exact code, linked = code actually linked into the DOL, data = byte-exact data
<!-- progress:end -->

View File

@@ -11,8 +11,6 @@ splits: 'config/43U/splits.txt'
ldscript_template: 'config/ldscript_ipl2.lcf'
force_active:
- SOGetSockOpt
- SOSetInterfaceOpt
- fprintf
- leap_days
- __msl_time2tm

View File

@@ -87,8 +87,7 @@ m_allocator__Q23ipl5scene = .bss:0x810BD498; // type:object size:0x10
AOSSi_NcdIfConfig = .bss:0x810BD4A8; // type:object size:0x15E data:byte
AOSSi_NcdIpConfig = .bss:0x810BD608; // type:object size:0x7C4 data:4byte
sRakuAllocator = .bss:0x810BDDD0; // type:object size:0x10
sRakuStatus = .bss:0x810BDDE0; // type:object size:0xC data:4byte
sRakuConfiguration = .bss:0x810BDDEC; // type:object size:0xE8
sRakuStatus = .bss:0x810BDDE0; // type:object size:0xF4 data:4byte
sRakuMsgQueue = .bss:0x810BDED4; // type:object size:0x20
AOSS_810BDEF8 = .bss:0x810BDEF8; // type:object size:0x20 data:4byte
AOSS_810BDF18 = .bss:0x810BDF18; // type:object size:0x6A0
@@ -5159,7 +5158,7 @@ AOSSi_WLANConnect = .text:0x813FD72C; // type:function size:0x26C
AOSSi_Sleep = .text:0x813FD998; // type:function size:0x4
AOSSi_Status = .text:0x813FD99C; // type:function size:0x34
AOSS_SetCallback = .text:0x813FD9D0; // type:function size:0x34
syncRakuProgress__Q33ipl5scene14RakuRakuThreadFP12RakuProgress = .text:0x813FDA04; // type:function size:0x6C scope:local
syncRakuProgress__Q33ipl5scene14RakuRakuThreadFv = .text:0x813FDA04; // type:function size:0x6C scope:local
__ct__Q33ipl5scene14RakuRakuThreadFPQ23EGG4Heap = .text:0x813FDA70; // type:function size:0xD8
__dt__Q33ipl5scene14RakuRakuThreadFv = .text:0x813FDB48; // type:function size:0xA4
destroy__Q33ipl5scene14RakuRakuThreadFv = .text:0x813FDBEC; // type:function size:0xD8
@@ -16150,11 +16149,6 @@ lbl_8164EF14 = .data:0x8164EF14; // type:object size:0x34
__vt__Q33ipl5scene27CsChanTtlButtonEventHandler = .data:0x8164EF48; // type:object size:0x1C
__vt__Q33ipl5scene24ChannelTitleEventHandler = .data:0x8164EF64; // type:object size:0x18
__vt__Q33ipl5scene12ChannelTitle = .data:0x8164EF7C; // type:object size:0x68
lbl_8164EFE4 = .data:0x8164EFE4; // type:object size:0x5C
lbl_8164F040 = .data:0x8164F040; // type:object size:0x18
lbl_8164F058 = .data:0x8164F058; // type:object size:0x20
lbl_8164F078 = .data:0x8164F078; // type:object size:0x20
lbl_8164F098 = .data:0x8164F098; // type:object size:0x20
@10125 = .data:0x8164F0B8; // type:object size:0xD scope:local data:string
...data.0 = .data:0x8164F0B8; // type:label scope:local
@10126 = .data:0x8164F0C5; // type:object size:0xD scope:local data:string

View File

@@ -772,7 +772,7 @@ config.libs = [
]
),
IPLSection("channelTitle", [
Object(Matching, "scene/channelTitle/iplChannelTitle.cpp"),
Object(Equivalent, "scene/channelTitle/iplChannelTitle.cpp"),
]
),
IPLSection("faceSelect", [
@@ -877,7 +877,7 @@ config.libs = [
Object(Matching, "scene/setting/iplUSBAPThread.cpp"),
Object(Matching, "scene/setting/iplAOSSThread.cpp"),
Object(NonMatching, "scene/setting/AOSSLink.c"),
Object(Matching, "scene/setting/iplRakuRakuThread.cpp"),
Object(NonMatching, "scene/setting/iplRakuRakuThread.cpp"),
Object(NonMatching, "scene/setting/AOSS.c", extra_cflags=["-O4,p", "-inline off"]),
Object(NonMatching, "scene/setting/ATERM.c", extra_cflags=["-O4,p", "-inline off"]),
]
@@ -1098,7 +1098,7 @@ config.libs = [
Object(Matching, "so/SOCommon.c"),
Object(NonMatching, "so/SOBasic.c"),
Object(Matching, "so/SOInformation.c"),
Object(Matching, "so/SOOption.c"),
Object(NonMatching, "so/SOOption.c"),
]
),
RevoEXLib("ssl", [
@@ -1696,7 +1696,7 @@ config.libs = [
Object(Matching, "fa/pf_dir.c"),
Object(Matching, "fa/pf_entry.c"),
Object(Matching, "fa/pf_entry_iterator.c"),
Object(Matching, "fa/pf_fat.c"),
Object(NonMatching, "fa/pf_fat.c"),
Object(Matching, "fa/pf_fat12.c"),
Object(Matching, "fa/pf_fat16.c"),
Object(Matching, "fa/pf_fat32.c"),

View File

@@ -34,14 +34,14 @@ namespace gui {
virtual void draw(Mtx& mtx) {} // 0x14 (0x05)
virtual void draw() {} // 0x18 (0x06)
#if defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
#if defined(IPL_CHANNEL_TITLE_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
virtual ~Interface(); // 0x1C (0x07)
#else
virtual ~Interface() {} // 0x1C (0x07)
#endif
};
#if defined(IPL_GC_WINDOW_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
#if defined(IPL_CHANNEL_TITLE_NOVTABLE) || defined(IPL_GC_WINDOW_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
class __declspec(novtable) EventHandler {
#else
class EventHandler {

View File

@@ -24,7 +24,7 @@ namespace ipl {
mbDisableCon(bDisableCon) {}
#endif
#if defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
#if defined(IPL_CHANNEL_TITLE_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
virtual ~PaneManager();
#else
virtual ~PaneManager() {}

View File

@@ -18,11 +18,11 @@ namespace ipl {
class line_collision {
public:
line_collision() : mLeft(0.0f), mRight(0.0f), mY(0.0f) {}
line_collision() : unk_0x00(0.0f), unk_0x04(0.0f), unk_0x08(0.0f) {}
f32 mLeft;
f32 mRight;
f32 mY;
f32 unk_0x00;
f32 unk_0x04;
f32 unk_0x08;
nw4r::ut::Link mLinkList; // 0x0C
};
@@ -31,9 +31,9 @@ namespace ipl {
url_collision();
~url_collision();
int mTagNo;
wchar_t* mpStart;
wchar_t* mpEnd;
int unk_0x00;
wchar_t* unk_0x04;
wchar_t* unk_0x08;
nw4r::ut::Link mLinkList; // 0x0C
nw4r::ut::List mLineCollisions; // 0x14
};
@@ -53,19 +53,19 @@ namespace ipl {
void parse(nw4r::ut::PrintContext<wchar_t>* context);
BOOL is_focused() const;
void select(int tagNo);
void select(int unk);
int get_focused_tagno(int chan) const;
url_collision* get_selected_col();
void get_url(char* urlOut, u32 urlLen);
void setHitYOffset(f32 val) { mHitYOffset = val; }
void setMemoTranslateY(f32 val) { mMemoTranslateY = val; }
void setFocusEnabled(bool val) { mbFocusEnabled = val; }
void setUnk_0x40(f32 val) { unk_0x40 = val; }
void setUnk_0x44(f32 val) { unk_0x44 = val; }
void setUnk_0x53(bool val) { unk_0x53 = val; }
u8 getColorPass() const { return mbColorPass; }
void setColorPass(u8 val) { mbColorPass = val; }
u8 getUnk_0x50() const { return unk_0x50; }
void setUnk_0x50(u8 val) { unk_0x50 = val; }
private:
typedef struct {
@@ -75,14 +75,14 @@ namespace ipl {
con_data mConData[WPAD_MAX_CONTROLLERS]; // 0x00
nw4r::ut::List mUrlCollisions; // 0x34
f32 mHitYOffset;
f32 mMemoTranslateY;
int mCurTagNo;
int mSelectedTagNo;
u8 mbColorPass;
u8 mbInTag;
u8 mbHoverOffset;
u8 mbFocusEnabled;
f32 unk_0x40;
f32 unk_0x44;
int unk_0x48;
int unk_0x4C;
u8 unk_0x50;
u8 unk_0x51;
u8 unk_0x52;
u8 unk_0x53;
};
} // namespace scene
} // namespace ipl

View File

@@ -145,7 +145,7 @@ namespace ipl {
ANIM_MAX,
};
int mAnimWait;
int unk_0x54;
layout::Object* mpLayout; // 0x58
nand::LayoutFile* mpLayoutFile; // 0x5C

View File

@@ -62,17 +62,17 @@ namespace ipl {
void start_left_event(const char* paneName);
void start_trig_event(const char* paneName);
typedef struct CmdEntry {
typedef struct Unk {
int command; // 0x00
u32 msgID; // 0x04
} CmdEntry;
} Unk;
CmdEntry mCmdQueue[64];
Unk unk_0x64[64];
int mQueueCapacity;
int mQueueCount;
int mQueueRead;
int mQueueWrite;
int unk_0x264;
int unk_0x268;
int unk_0x26C;
int unk_0x270;
int mSettingArg; // 0x274

View File

@@ -89,10 +89,10 @@ namespace ipl {
int mIPLState; // 0x04
volatile BS2State mState; // 0x08
bool mbTickEnabled; // 0x0C
bool mbUpdateRequested; // 0x0D
bool mbAbortRequested; // 0x0E
bool mbRestartRequested; // 0x0F
bool unk_0x0C;
bool unk_0x0D;
bool unk_0x0E;
bool unk_0x0F;
bool mbIsDiagDisc; // 0x10
bool mbIncludesSeatTitles; // 0x11
u8* mpBannerBuffer; // 0x14

View File

@@ -33,7 +33,7 @@ namespace ipl {
u64 titleId; // 0x10
bool threadTerminated; // 0x18
bool unk_0x19;
bool mbHasNewMessage; // 0x1A
bool unk_0x1A;
EGG::ExpHeap* getHeap() { return heap; }
} CSData;

View File

@@ -60,9 +60,9 @@ namespace ipl {
int mMessageID; // 0x08
int mArg2;
int mArg3;
char mArg1[4];
int unk_0x0C;
int unk_0x10;
char unk_0x14[4];
u8* mpArcData; // 0x18
u32 mArcSize; // 0x1C

View File

@@ -145,13 +145,6 @@ namespace ipl {
mpCommonFile = commonFile;
mpLangFile = langFile;
}
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
virtual ~LangFile() {}
virtual void read() {}
virtual bool isFinished() { return false; }
virtual int checkData() { return 0; }
virtual bool isFatalError() { return false; }
#else
virtual ~LangFile(); // 0x08
virtual void read(); // 0x0C
@@ -159,7 +152,6 @@ namespace ipl {
virtual bool isFinished(); // 0x14
virtual int checkData(); // 0x18
virtual bool isFatalError(); // 0x1C
#endif
File* getCmnFile() const { return mpCommonFile; }
File* getLangFile() const { return mpLangFile; }
@@ -173,11 +165,7 @@ namespace ipl {
public:
LayoutFile(EGG::Heap* heap, const char* dirName, const char* fileName, ARCHandle* arc, bool bIsNandFile);
LayoutFile(File* commonFile, File* langFile = NULL) : LangFile(commonFile, langFile) {}
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
virtual ~LayoutFile() {} // 0x08
#else
virtual ~LayoutFile(); // 0x08
#endif
};
} // namespace nand
} // namespace ipl

View File

@@ -139,7 +139,7 @@ namespace ipl {
bool received() { return mbReviecedMsg; }
void prepNextReceive() { mbReviecedMsg = false; }
volatile bool isReceivingIdle() { return mbReceiving == false; }
volatile bool isUnk0xA31() { return unk_0xA31 == false; }
BOOL isAppDlEnableLock(u32 appId) {
utility::autoMutexLock lock(mAutoLock);
@@ -175,9 +175,9 @@ namespace ipl {
OSMutex mAutoLock; // 0xA18
bool mbReviecedMsg;
bool mbReceiving;
bool unk_0xA31;
bool mbReceivePaused; // 0xA32
bool mbNewTitleTblReady;
bool unk_0xA33;
static Arg smArg;

View File

@@ -314,7 +314,7 @@ namespace nw4r {
ArchiveFontBase::ConstructState ArchiveFontBase::ConstructOpAnalyzeGLGR(ConstructContext* ctx, CachedStreamReader* reader) {
u32 glgrInnerLen;
HeaderedGlyphGroups* pGlgr;
const ArchiveFontBinaryLayout* font;
ArchiveFontBinaryLayout* font;
u8* glgrEnd;
u32 expectedMaxSize;
@@ -337,7 +337,7 @@ namespace nw4r {
// Copy the glgr to work
{
pGlgr = (HeaderedGlyphGroups*)&font->glgr;
pGlgr = &font->glgr;
glgrEnd = (u8*)pGlgr + (u32)ctx->mNextBlockHdr.size;
memcpy(pGlgr, &ctx->mNextBlockHdr, sizeof(BinaryBlockHeader));
@@ -382,7 +382,7 @@ namespace nw4r {
sheetOffsetsSize = ROUNDUP(countSheet * sizeof(u16), 4);
sheetOffsetsScratch = (u16*)ROUNDDOWN((u32)((u8*)font + ctx->remWorkSpace()) - sheetOffsetsSize, 2);
pGlgr = (HeaderedGlyphGroups*)&font->glgr;
pGlgr = &font->glgr;
ENSURE_WORK_HAS_SIZE(ctx, glgrEnd - (u8*)font + sheetOffsetsSize);
// if (ctx->pWorkEnd - workCurr < fontSizeToEndOfGlgr + sheetOffsetsSize) {
// return CONSTRUCT_STATE_FATAL_ERR;

View File

@@ -63,7 +63,7 @@ typedef struct {
u8 mcuYRem; // 0x0F
u16 mcuYCount; // 0x10
u16 mcuXCount2; // 0x12
u32 mcuTotal; // 0x14
u32 unk_0x14;
u8 remX; // 0x18
u8 remY; // 0x19
u8 compCount; // 0x1A
@@ -142,7 +142,7 @@ struct TMCCJPEGDecWork_t {
u8 mcuYRem; // 0x17FF
u16 mcuYCount; // 0x1800
u16 mcuXCount2; // 0x1802
u32 mcuTotal; // 0x1804
u32 unk_0x1804;
u8 remX; // 0x1808
u8 remY; // 0x1809
u8 compCount; // 0x180A

View File

@@ -51,7 +51,7 @@ s32 TMCJPEGDEC_Setsize(TMCCJPEGDecWork* work) {
}
state->componentCount = work->componentCount;
state->result = work->mcuTotal;
state->result = work->unk_0x1804;
state->maxX = work->mcuYCount;
state->maxY = work->mcuXCount2;

View File

@@ -567,7 +567,7 @@ s32 TMCJPEGDEC_scan_varinit(TMCCJPEGDecWork* work) {
p->mcuYCount = p->mcuYCount + ((u8)remX != 0 ? 1 : 0);
p->mcuXCount2 = p->mcuXCount2 + ((u8)remY != 0 ? 1 : 0);
p->mcuTotal = (u32)p->mcuYCount * (u32)p->mcuXCount2;
p->unk_0x14 = (u32)p->mcuYCount * (u32)p->mcuXCount2;
for (idx = 0; idx < (s32)p->scanCompCount; idx++) {
u8 compId;
@@ -1929,7 +1929,7 @@ static s32 TMCJPEGDEC_parse_sof(TMCCJPEGDecWork* work) {
mcuCountY += yr;
frameInfo->mcuYCount = mcuCountX;
frameInfo->mcuXCount2 = mcuCountY;
work->mcuTotal = (u32)mcuCountX * (u32)mcuCountY;
work->unk_0x1804 = (u32)mcuCountX * (u32)mcuCountY;
}
compCount2 = frameInfo->compCount;

View File

@@ -205,7 +205,7 @@ typedef struct _ziUwdNode {
struct __zi8_work_data_s {
ziU8 unk_0x00;
ziU8 countOnly; // 0x01
ziU8 unk_0x01;
ziU8 unk_0x02[2];
ziLanguageEntry* langEntries; // 0x04
ziU8 unk_0x08;
@@ -219,7 +219,7 @@ struct __zi8_work_data_s {
ziU8 unk_0x17;
ziU8 subLanguage; // 0x18
ziU8 unk_0x19;
ziU16 separator; // 0x1A
ziU16 unk_0x1A;
ziU8 unk_0x1C[3];
ziU8 unk_0x1F;
ziU16 unk_0x20[0x40];
@@ -265,25 +265,25 @@ struct __zi8_work_data_s {
ziPtr unk_0x11FC;
ziPtr userKeys[0x83]; // 0x1200
ziU8 unk_0x140C[4];
ziU32 formats; // 0x1410
ziU32 unk_0x1410;
ziU8 unk_0x1414[4];
ziU8 formatCount;
ziU8 unk_0x1418;
ziU8 unk_0x1419;
ziU16 unk_0x141A;
ziU8 unk_0x141C;
ziU8 unk_0x141D;
ziU8 unk_0x141E;
ziU8 maxCnt; // 0x141F
ziU8 unk_0x141F;
ziU8 unk_0x1420[4];
zi8DawgCtx dawgCtx; // 0x1424
ziU8 unk_0x1760[4]; // 0x1760
ziU8* groupPtr; // 0x1764
ziU8* unk_0x1764; // 0x1764
ziU8 unk_0x1768;
ziU8 unk_0x1769[0x81];
ziU16 matchOffset; // 0x17EA
ziU16 unk_0x17EA;
ziU8 unk_0x17EC;
ziU8 unk_0x17ED[3];
ziU8* dawgGroup; // 0x17F0
ziU8* unk_0x17F0;
ziWChar unk_0x17F4[0x40]; // 0x17F4..0x1874
ziU16 unk_0x1874;
ziU8 unk_0x1876;

View File

@@ -18,7 +18,7 @@ static Zi8UInt Zi8SetFindCand(ziU8* foundCandidates, Zi8UInt ordinal, ziPtr work
}
ziWChar* ZiGetNextPhonetic(ziWChar* spelling, ziWChar* end ZI_NEED_WORK) {
while (*spelling && *spelling != ZI_WORK->separator && *spelling != 0xF360 && spelling < end) {
while (*spelling && *spelling != ZI_WORK->unk_0x1A && *spelling != 0xF360 && spelling < end) {
++spelling;
}
if (!*spelling || spelling == end) {
@@ -37,8 +37,8 @@ int ZiPartialMatch(ziWChar* spelling, ziWChar* spellingEnd,
if (spelling == spellingEnd || candidate == candidateEnd || !*spelling || !*candidate) {
return 1;
}
while (*spelling != ZI_WORK->separator && *spelling != 0xF360) {
if (*candidate == ZI_WORK->separator || *candidate == 0xF360) {
while (*spelling != ZI_WORK->unk_0x1A && *spelling != 0xF360) {
if (*candidate == ZI_WORK->unk_0x1A || *candidate == 0xF360) {
break;
}
if (*spelling != *candidate) {
@@ -2868,7 +2868,7 @@ ziU8 Zi8GetElementCount(ziWChar* elements, ziU8 elementCount, ziU8 charCount ZI_
ziU8 count;
ziWChar spacedElements[256];
struct { ziWChar separator; } savedState;
savedState.separator = ZI_WORK->separator;
savedState.separator = ZI_WORK->unk_0x1A;
if (elementCount <= 1 || !charCount) {
return elementCount;
}
@@ -2881,9 +2881,9 @@ ziU8 Zi8GetElementCount(ziWChar* elements, ziU8 elementCount, ziU8 charCount ZI_
if (spacedIndex == elementCount) {
return elementCount;
}
ZI_WORK->separator = 0xF360;
ZI_WORK->unk_0x1A = 0xF360;
Zi8ZHaddSpace(elements, elementCount, spacedElements, 256, __zi8_work_data);
ZI_WORK->separator = savedState.separator;
ZI_WORK->unk_0x1A = savedState.separator;
spacedIndex = elementIndex = count = 0;
while (charCount && elementIndex < elementCount) {
if (spacedElements[spacedIndex] == 0xF360) {

View File

@@ -136,7 +136,7 @@ descend:
records[context->cnt].node = ZiDAWGGetChild(records[context->cnt - 1].node);
if (records[context->cnt].node == (ziU8*)0) goto next_sibling;
context->cnt++;
if (ZI_WORK->maxCnt < context->cnt) ZI_WORK->maxCnt = context->cnt;
if (ZI_WORK->unk_0x141F < context->cnt) ZI_WORK->unk_0x141F = context->cnt;
goto update_current;
next_sibling:
while (context->cnt != 0) {
@@ -184,36 +184,36 @@ unsigned int Zi8MatchROMdata1(ziWChar *elements, ziU8 count, ziU8 language, ziWC
result = 0;
if (status == 0) {
ZI_WORK->groupPtr = (ziU8*)group;
if (ZI_WORK->groupPtr == 0) {
ZI_WORK->unk_0x1764 = (ziU8*)group;
if (ZI_WORK->unk_0x1764 == 0) {
if (Zi8GetTableSize(language & 0xff,0xb,ZI_WORK) != 0) {
ZI_WORK->groupPtr = (ziU8*)(tableAddress = Zi8GetTableAddress(language & 0xff,0xb,ZI_WORK));
ZI_WORK->unk_0x1764 = (ziU8*)(tableAddress = Zi8GetTableAddress(language & 0xff,0xb,ZI_WORK));
}
}
if (ZI_WORK->groupPtr != 0) {
for (; (*ZI_WORK->groupPtr != 0xff && ((groupIndex & 0xff) != 0));
if (ZI_WORK->unk_0x1764 != 0) {
for (; (*ZI_WORK->unk_0x1764 != 0xff && ((groupIndex & 0xff) != 0));
groupIndex = groupIndex - 1) {
while (*ZI_WORK->groupPtr != 0xff) {
ZI_WORK->groupPtr += 2;
while (*ZI_WORK->unk_0x1764 != 0xff) {
ZI_WORK->unk_0x1764 += 2;
}
ZI_WORK->groupPtr++;
ZI_WORK->unk_0x1764++;
}
}
}
if (ZI_WORK->groupPtr == 0) {
if (ZI_WORK->unk_0x1764 == 0) {
result = Zi8MatchROMdata0(elements,count,language & 0xff,output,capacity & 0xffff,
mode & 0xff,status & 0xff,0,1,acceptPrefix,0,&ZI_WORK->dawgCtx,
ZI_WORK->unk_0x1760,ZI_WORK);
}
else {
while (*ZI_WORK->groupPtr != 0xff) {
while (*ZI_WORK->unk_0x1764 != 0xff) {
result = Zi8MatchROMdata0(elements,count,language & 0xff,output,
capacity & 0xffff,mode & 0xff,status & 0xff,
*ZI_WORK->groupPtr,
ZI_WORK->groupPtr[1],acceptPrefix,0,
*ZI_WORK->unk_0x1764,
ZI_WORK->unk_0x1764[1],acceptPrefix,0,
&ZI_WORK->dawgCtx,ZI_WORK->unk_0x1760,ZI_WORK);
if ((result & 0xff) != 0) break;
ZI_WORK->groupPtr += 2;
ZI_WORK->unk_0x1764 += 2;
status = 0;
}
}
@@ -230,7 +230,7 @@ unsigned int Zi8MatchROMdata2(ziWChar* elements, ziU8 count, ziU8 language,
if (reservedMode != 0) return 0;
if (status == 0) {
ZI_WORK->unk_0x1768 = 0;
ZI_WORK->matchOffset = 0;
ZI_WORK->unk_0x17EA = 0;
if (group != 0 && *group == 0xc && language == 10 && ZI_WORK->unk_0x141C != 0) {
ZI_WORK->unk_0x141E = 0x10;
} else {
@@ -238,23 +238,23 @@ unsigned int Zi8MatchROMdata2(ziWChar* elements, ziU8 count, ziU8 language,
}
}
search_segment:
ZI_WORK->maxCnt = 1;
result = Zi8MatchROMdata1(elements + ZI_WORK->matchOffset,
count - ZI_WORK->matchOffset, language,
&ZI_WORK->unk_0x17F4[ZI_WORK->matchOffset], capacity,
ZI_WORK->unk_0x141F = 1;
result = Zi8MatchROMdata1(elements + ZI_WORK->unk_0x17EA,
count - ZI_WORK->unk_0x17EA, language,
&ZI_WORK->unk_0x17F4[ZI_WORK->unk_0x17EA], capacity,
mode, status, ZI_WORK->unk_0x1768, (char*)group,
acceptPrefix, ZI_WORK);
if ((ziU8)result != 0) {
for (index = (ziU8)(ZI_WORK->matchOffset + result); index != 0; index--) {
for (index = (ziU8)(ZI_WORK->unk_0x17EA + result); index != 0; index--) {
output[index - 1] = ZI_WORK->unk_0x17F4[index - 1];
}
result = (ziU8)(result + ZI_WORK->matchOffset);
result = (ziU8)(result + ZI_WORK->unk_0x17EA);
} else {
if (status != 0 || count == 1) goto finish_segments;
if (mode == 1 && ZI_WORK->unk_0x1768 == 0 &&
(ziU8)Zi8MatchROMdata1(elements + ZI_WORK->matchOffset,
count - ZI_WORK->matchOffset, language,
&ZI_WORK->unk_0x17F4[ZI_WORK->matchOffset], capacity,
(ziU8)Zi8MatchROMdata1(elements + ZI_WORK->unk_0x17EA,
count - ZI_WORK->unk_0x17EA, language,
&ZI_WORK->unk_0x17F4[ZI_WORK->unk_0x17EA], capacity,
0, status, ZI_WORK->unk_0x1768, (char*)group,
acceptPrefix, ZI_WORK) != 0) goto finish_segments;
if ((Zi8GetTableCount(language, 0x1f, ZI_WORK) & 4) == 0) {
@@ -262,20 +262,20 @@ search_segment:
if (elements[index] == 0xeff1) goto finish_segments;
}
}
if (ZI_WORK->maxCnt > capacity) goto finish_segments;
for (index = ZI_WORK->maxCnt; index != 0; index--) {
result = Zi8MatchROMdata1(elements + ZI_WORK->matchOffset, index, language,
&ZI_WORK->unk_0x17F4[ZI_WORK->matchOffset], capacity,
if (ZI_WORK->unk_0x141F > capacity) goto finish_segments;
for (index = ZI_WORK->unk_0x141F; index != 0; index--) {
result = Zi8MatchROMdata1(elements + ZI_WORK->unk_0x17EA, index, language,
&ZI_WORK->unk_0x17F4[ZI_WORK->unk_0x17EA], capacity,
1, 0, ZI_WORK->unk_0x1768, (char*)group,
acceptPrefix, ZI_WORK);
if ((ziU8)result != 0) {
ZI_WORK->matchOffset += (ziU8)result;
if (ZI_WORK->matchOffset == count) return 0;
ZI_WORK->unk_0x17EA += (ziU8)result;
if (ZI_WORK->unk_0x17EA == count) return 0;
ZI_WORK->unk_0x1768++;
status = 0;
ZI_WORK->unk_0x141E = 0;
if (ZI_WORK->dawgCtx.key == 0 && language == 10) {
for (index = 0; index < ZI_WORK->matchOffset; index++) {
for (index = 0; index < ZI_WORK->unk_0x17EA; index++) {
switch (ZI_WORK->unk_0x17F4[index]) {
case 0x61:
case 0x6f:
@@ -306,7 +306,7 @@ ziU32 Zi8MatchROMdata(ziWChar* elements, ziU8 count, ziU8 language,
} else {
if (status == 0) {
ZI_WORK->unk_0x17EC = 0;
ZI_WORK->dawgGroup = NextDawgGroup(0, language, ZI_WORK);
ZI_WORK->unk_0x17F0 = NextDawgGroup(0, language, ZI_WORK);
} else if (ZI_WORK->unk_0x17EC != 0) {
Zi8LogError(100, ZI_WORK);
goto finish_match;
@@ -316,30 +316,30 @@ ziU32 Zi8MatchROMdata(ziWChar* elements, ziU8 count, ziU8 language,
result = Zi8MatchROMdata2(elements, count, language, output, capacity,
mode, status, reservedMode, 0, acceptPrefix, ZI_WORK);
} else {
while (ZI_WORK->dawgGroup != 0) {
while (ZI_WORK->unk_0x17F0 != 0) {
result = Zi8MatchROMdata2(elements, count, language, output, capacity,
mode, status, reservedMode, ZI_WORK->dawgGroup,
mode, status, reservedMode, ZI_WORK->unk_0x17F0,
acceptPrefix, ZI_WORK);
if ((ziU8)result != 0) break;
status = 0;
if (count <= 1 && language == 0x36) break;
ZI_WORK->dawgGroup = NextDawgGroup(ZI_WORK->dawgGroup, language, ZI_WORK);
ZI_WORK->unk_0x17F0 = NextDawgGroup(ZI_WORK->unk_0x17F0, language, ZI_WORK);
}
}
if ((ziU8)result == 0 && status == 0 && mode == 1 && count == 1 && capacity >= 1) {
mode = 0;
ZI_WORK->unk_0x17EC = 1;
if (tableSize != 0) {
ZI_WORK->dawgGroup = NextDawgGroup(0, language, ZI_WORK);
while (ZI_WORK->dawgGroup != 0) {
ZI_WORK->unk_0x17F0 = NextDawgGroup(0, language, ZI_WORK);
while (ZI_WORK->unk_0x17F0 != 0) {
if ((ziU8)Zi8MatchROMdata2(elements, count, language, output, capacity,
mode, status, reservedMode, ZI_WORK->dawgGroup,
mode, status, reservedMode, ZI_WORK->unk_0x17F0,
acceptPrefix, ZI_WORK) != 0) {
*output = *elements;
result = 1;
break;
}
ZI_WORK->dawgGroup = NextDawgGroup(ZI_WORK->dawgGroup, language, ZI_WORK);
ZI_WORK->unk_0x17F0 = NextDawgGroup(ZI_WORK->unk_0x17F0, language, ZI_WORK);
}
} else {
if ((ziU8)Zi8MatchROMdata2(elements, count, language, output, capacity,

View File

@@ -50,11 +50,11 @@ ziBool Zi8ZHsetZYfuzzyPairs(ziFuzzyZYPairs pairs ZI_NEED_WORK) {
ziBool Zi8SetLatinSearchOrder(ziU8* searchArray, ziU8 searchSize ZI_NEED_WORK) {
if (searchArray == 0 || *searchArray == 0) {
ZI_WORK->formats = (ziU32)Zi8SOdefaultArray;
ZI_WORK->formatCount = 9;
ZI_WORK->unk_0x1410 = (ziU32)Zi8SOdefaultArray;
ZI_WORK->unk_0x1418 = 9;
} else {
ZI_WORK->formats = (ziU32)searchArray;
ZI_WORK->formatCount = searchSize;
ZI_WORK->unk_0x1410 = (ziU32)searchArray;
ZI_WORK->unk_0x1418 = searchSize;
}
return 1;
}
@@ -339,11 +339,11 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
if ((parameters->elementCount == 1) && (parameters->firstCandidate == 0)) {
switch (parameters->language) {
case 1:
if ((ZI_WORK->unk_0x00 == '\0') || (ZI_WORK->countOnly == options->countOnly)) {
if ((ZI_WORK->unk_0x00 == '\0') || (ZI_WORK->unk_0x01 == options->countOnly)) {
switch(ZI_WORK->unk_0x00) {
case '\0':
if (parameters->elements[0] == 0xEF04) {
ZI_WORK->countOnly = options->countOnly;
ZI_WORK->unk_0x01 = options->countOnly;
ZI_WORK->unk_0x00 = '\x01';
}
break;
@@ -400,11 +400,11 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
break;
case 0x11:
default:
if ((ZI_WORK->unk_0x00 == '\0') || (ZI_WORK->countOnly == options->countOnly)) {
if ((ZI_WORK->unk_0x00 == '\0') || (ZI_WORK->unk_0x01 == options->countOnly)) {
switch(ZI_WORK->unk_0x00) {
case '\0':
if (parameters->elements[0] == 0xEFF2) {
ZI_WORK->countOnly = options->countOnly;
ZI_WORK->unk_0x01 = options->countOnly;
ZI_WORK->unk_0x00 = '\x01';
}
break;

View File

@@ -21,7 +21,7 @@ ziU8 Zi8InitializeDynamic(ziLanguageEntry* langEntries ZI_NEED_WORK) {
ZI_WORK->unk_0x0A = 0xFF;
ZI_WORK->unk_0x10 = 0x64;
*(ziU16*)&ZI_WORK->unk_0x0C = 0xFFFF;
ZI_WORK->separator = 0x20;
ZI_WORK->unk_0x1A = 0x20;
ZI_WORK->unk_0x1C[2] = 0;
ZI_WORK->unk_0x1B30 = 0;
ZI_WORK->unk_0x1B3A = 0;

View File

@@ -68,7 +68,7 @@ ziU8 Zi8ZHaddSpace(ziWChar* src, ziU8 count, ziWChar* dst,
}
if (pdst[k - 1] != 0xF360 &&
(pdst[k - 1] < 0xF331 || pdst[k - 1] > 0xF335)) {
pdst[k++] = ZI_WORK->separator;
pdst[k++] = ZI_WORK->unk_0x1A;
}
psrc += i;
n -= i;

View File

@@ -45,8 +45,8 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
ziWChar* cursor;
ziU8* data;
ziU8 formats[8] = {1, 5, 0, 0, 0, 0, 0, 0};
ziU32 savedFormats = ZI_WORK->formats;
ziU8 savedCount = ZI_WORK->formatCount;
ziU32 savedFormats = ZI_WORK->unk_0x1410;
ziU8 savedCount = ZI_WORK->unk_0x1418;
ziSearchState search = {0};
Zi8LogError(100, __zi8_work_data);
if (word == 0 || *word == 0) {
@@ -73,22 +73,22 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
request.candidates = ordinals;
request.maxCandidates = 1;
request.firstCandidate = 0;
ZI_WORK->formats = (ziU32)formats;
ZI_WORK->unk_0x1410 = (ziU32)formats;
if (ZI_WORK->unk_0x1C[0] == 2) {
ZI_WORK->formatCount = 0;
if (ZI_WORK->unk_0x09 & 1) formats[ZI_WORK->formatCount++] = 1;
if (ZI_WORK->unk_0x09 & 4) formats[ZI_WORK->formatCount++] = 2;
if (ZI_WORK->unk_0x09 & 2) formats[ZI_WORK->formatCount++] = 3;
if (ZI_WORK->unk_0x09 & 8) formats[ZI_WORK->formatCount++] = 4;
if (ZI_WORK->unk_0x09 & 1) formats[ZI_WORK->formatCount++] = 5;
if (ZI_WORK->unk_0x09 & 4) formats[ZI_WORK->formatCount++] = 6;
if (ZI_WORK->unk_0x09 & 2) formats[ZI_WORK->formatCount++] = 7;
if (ZI_WORK->unk_0x09 & 8) formats[ZI_WORK->formatCount++] = 8;
} else if (ZI_WORK->unk_0x1C[0] != 0) ZI_WORK->formatCount = 2;
else ZI_WORK->formatCount = 1;
ZI_WORK->unk_0x1418 = 0;
if (ZI_WORK->unk_0x09 & 1) formats[ZI_WORK->unk_0x1418++] = 1;
if (ZI_WORK->unk_0x09 & 4) formats[ZI_WORK->unk_0x1418++] = 2;
if (ZI_WORK->unk_0x09 & 2) formats[ZI_WORK->unk_0x1418++] = 3;
if (ZI_WORK->unk_0x09 & 8) formats[ZI_WORK->unk_0x1418++] = 4;
if (ZI_WORK->unk_0x09 & 1) formats[ZI_WORK->unk_0x1418++] = 5;
if (ZI_WORK->unk_0x09 & 4) formats[ZI_WORK->unk_0x1418++] = 6;
if (ZI_WORK->unk_0x09 & 2) formats[ZI_WORK->unk_0x1418++] = 7;
if (ZI_WORK->unk_0x09 & 8) formats[ZI_WORK->unk_0x1418++] = 8;
} else if (ZI_WORK->unk_0x1C[0] != 0) ZI_WORK->unk_0x1418 = 2;
else ZI_WORK->unk_0x1418 = 1;
count = Zi8GetCandidatesOrCount(&request, &search, __zi8_work_data);
ZI_WORK->formats = savedFormats;
ZI_WORK->formatCount = savedCount;
ZI_WORK->unk_0x1410 = savedFormats;
ZI_WORK->unk_0x1418 = savedCount;
if (count != 0) return 1;
}
if (language != 1) {

View File

@@ -26,7 +26,6 @@ ziBool Zi8PrepareMatch(ziGetParam* request, ziMatchParam* match, ziU8 skipMode Z
ziU8 stroke;
ziU8 contextMask;
ziU8 mode;
ziU8 savedNibbles;
struct {
ziWChar* phoneticInput;
ziU8* phoneticTable;
@@ -39,10 +38,12 @@ ziBool Zi8PrepareMatch(ziGetParam* request, ziMatchParam* match, ziU8 skipMode Z
} buffers;
ziU8 nibbles;
ziU8 index;
ziU8 savedNibbles;
stroke = 0;
contextMask = 0x20;
Zi8Memset(match,0,0x1ee);
savedNibbles = 0;
nibbles = 0;
elementIndex = 0;
elementCount = request->elementCount;
@@ -61,6 +62,7 @@ ziBool Zi8PrepareMatch(ziGetParam* request, ziMatchParam* match, ziU8 skipMode Z
match->comp = element = request->elements[0];
if (Zi8IsComponent(element,__zi8_work_data) != 0) {
elementIndex++;
savedNibbles = 1;
buffers.component = (ziU8*)Zi8GetTableAddress(1,2,__zi8_work_data);
buffers.componentIndex = (ziU8*)Zi8GetTableAddress(1,6,__zi8_work_data);
buffers.componentIndex += (element - 0xef10) * 2;

View File

@@ -242,8 +242,8 @@ typedef struct WPADCB {
WPADCallback getInfoCB; // 0x988
u8 getInfoBusy; // 0x98C
u8 encStatus; // 0x98D
u8 continuous; // 0x98E
u8 unk_0x98D; // 0x98D
u8 unk_0x98E; // 0x98E
u8 unk_0x98F[0x9A0 - 0x990];
} WPADCB;
@@ -261,7 +261,7 @@ void WPADiExcludeButton(s32 chan);
void WPADiCopyOut(s32 chan);
BOOL WPADiSendSetPort(WPADCommandQueue* pQueue, u8 port, WPADCallback pCallback);
BOOL WPADiSendSetReportType(WPADCommandQueue* pQueue, s32 format, BOOL continuous, WPADCallback pCallback);
BOOL WPADiSendSetReportType(WPADCommandQueue* pQueue, s32 format, BOOL unk, WPADCallback pCallback);
BOOL WPADiSendEnableDPD(WPADCommandQueue* pQueue, BOOL enable, WPADCallback pCallback);
BOOL WPADiSendEnableSpeaker(WPADCommandQueue* pQueue, BOOL enable, WPADCallback pCallback);
BOOL WPADiSendGetContStat(WPADCommandQueue* pQueue, WPADInfo* pInfo, WPADCallback pCallback);

View File

@@ -24,7 +24,7 @@ typedef struct WPADMemBlock {
int unk_0x04; // 0x04
s16 unk_0x08; // 0x08
int unk_0x0C; // 0x0C
WPADCallback callback; // 0x10
WPADCallback unk_0x10; // 0x10
} WPADMemBlock;
typedef struct WPADGameInfo {

View File

@@ -484,7 +484,6 @@ static inline unsigned long __nupBase64EncodedSize(unsigned long length) {
}
static void __nupBase64Encode(u8* output, u8* input, unsigned long length) {
static char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
u8* end = input + length;
u32 value = 0;
u32 count = 0;
@@ -497,19 +496,26 @@ static void __nupBase64Encode(u8* output, u8* input, unsigned long length) {
if (count < 3) {
continue;
}
output[0] = alphabet[value >> 18 & 0x3f];
output[1] = alphabet[value >> 12 & 0x3f];
output[2] = alphabet[value >> 6 & 0x3f];
output[3] = alphabet[value & 0x3f];
u8 encodedSecond = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[value >> 12 & 0x3f];
u8 encodedFirst = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[value >> 18 & 0x3f];
output[0] = encodedFirst;
u8 encodedThird = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[value >> 6 & 0x3f];
output[1] = encodedSecond;
u8 encodedFourth = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[value & 0x3f];
output[2] = encodedThird;
output[3] = encodedFourth;
count = 0;
output += 4;
}
if (count == 2) {
value <<= 8;
output[0] = alphabet[value >> 18 & 0x3f];
output[1] = alphabet[value >> 12 & 0x3f];
output[2] = alphabet[value >> 6 & 0x3f];
u8 encodedSecond = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[value >> 12 & 0x3f];
u8 encodedFirst = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[value >> 18 & 0x3f];
output[0] = encodedFirst;
u8 encodedThird = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[value >> 6 & 0x3f];
output[1] = encodedSecond;
output[2] = encodedThird;
output[3] = fillByte;
return;
}
@@ -517,8 +523,10 @@ static void __nupBase64Encode(u8* output, u8* input, unsigned long length) {
return;
}
value <<= 16;
output[0] = alphabet[value >> 18 & 0x3f];
output[1] = alphabet[value >> 12 & 0x3f];
u8 encodedSecond = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[value >> 12 & 0x3f];
u8 encodedFirst = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[value >> 18 & 0x3f];
output[0] = encodedFirst;
output[1] = encodedSecond;
output[2] = fillByte;
output[3] = fillByte;
}

View File

@@ -1283,7 +1283,7 @@ static void __ClearControlBlock(s32 chan) {
p->sleeping = TRUE;
p->getInfoBusy = FALSE;
p->getInfoCB = NULL;
p->continuous = 0;
p->unk_0x98E = 0;
memset(&p->wpInfo, 0, sizeof(p->wpInfo));
memset(&p->wmReadDataBuf, 0, sizeof(p->wmReadDataBuf));
@@ -1315,7 +1315,7 @@ static void __ClearControlBlock(s32 chan) {
_wmb[chan].unk_0x04 = 0;
_wmb[chan].unk_0x08 = 0;
_wmb[chan].unk_0x0C = 0;
_wmb[chan].callback = NULL;
_wmb[chan].unk_0x10 = NULL;
_rumbleCnt[chan] = 0;
}
@@ -1551,7 +1551,7 @@ static void firmwareCheckCallback(s32 chan, s32 status) {
DEBUGPrint(" ==>this error means that the firmware is for NDEV %s\n", p->configIndex != 0 ? "2.0" : "2.1 or later");
WPADiSendSetReportType(&p->stdCmdQueue, WPAD_FMT_CORE_BTN, p->continuous, &abortConnCallback);
WPADiSendSetReportType(&p->stdCmdQueue, WPAD_FMT_CORE_BTN, p->unk_0x98E, &abortConnCallback);
WPADiSendDPDCSB(&p->stdCmdQueue, FALSE, &abortConnCallback);
WPADiSendSetPort(&p->stdCmdQueue, port, &abortConnCallback);
@@ -1626,7 +1626,7 @@ static void WPADiConnCallback(WUDDevInfo* devInfo, u8 open) {
p->status = WPAD_ERR_OK;
p->radioSensitivity = 100;
p->sleeping = FALSE;
p->encStatus = FALSE;
p->unk_0x98D = FALSE;
WPADiSendReadData(&p->stdCmdQueue, p->wmReadDataBuf, 1, WM_ADDR_MEM_1770, firmwareCheckCallback);
@@ -1643,8 +1643,8 @@ static void WPADiConnCallback(WUDDevInfo* devInfo, u8 open) {
if (p->cmdBlkCB != NULL) {
p->cmdBlkCB(chan, WPAD_ERR_NO_CONTROLLER);
} else if (_wmb[chan].callback != NULL) {
_wmb[chan].callback(chan, WPAD_ERR_NO_CONTROLLER);
} else if (_wmb[chan].unk_0x10 != NULL) {
_wmb[chan].unk_0x10(chan, WPAD_ERR_NO_CONTROLLER);
}
do {
@@ -1886,7 +1886,7 @@ s32 WPADSetDataFormat(s32 chan, u32 format) {
}
if (currFormat != format) {
if (!WPADiSendSetReportType(&p->stdCmdQueue, format, p->continuous, NULL)) {
if (!WPADiSendSetReportType(&p->stdCmdQueue, format, p->unk_0x98E, NULL)) {
status = WPAD_ERR_COMMUNICATION_ERROR;
} else {
enabled = OSDisableInterrupts();
@@ -2741,13 +2741,13 @@ BOOL WPADiSendSetPort(WPADCommandQueue* pQueue, u8 port, WPADCallback pCallback)
return success;
}
BOOL WPADiSendSetReportType(WPADCommandQueue* pQueue, s32 format, BOOL continuous, WPADCallback pCallback) {
BOOL WPADiSendSetReportType(WPADCommandQueue* pQueue, s32 format, BOOL unk, WPADCallback pCallback) {
BOOL success;
WPADCommand command;
command.reportID = RPTID_SET_DATA_REPORT_MODE;
command.dataLength = RPT12_SIZE;
command.dataBuf[RPT12_CONT_REPORT] = continuous ? 0 : 4; // Always continuous reporting
command.dataBuf[RPT12_CONT_REPORT] = unk ? 0 : 4; // Always continuous reporting
command.cmdCB = pCallback;
switch (format) {

View File

@@ -111,8 +111,8 @@ static void initExtension(s32 chan) {
WPADiClearQueue(&p_wpd->extCmdQueue);
WPADiSendSetReportType(&p_wpd->extCmdQueue, p_wpd->dataFormat,
p_wpd->continuous, abortInitExtension);
p_wpd->encStatus = 1;
p_wpd->unk_0x98E, abortInitExtension);
p_wpd->unk_0x98D = 1;
WPADiSendWriteDataCmd(&p_wpd->extCmdQueue, 0x55, 0x04a400f0,
abortInitExtension);
WPADiSendWriteDataCmd(&p_wpd->extCmdQueue, 0, 0x04a400fb,
@@ -127,7 +127,7 @@ static void abortInitExtension(s32 chan, s32 result) {
if (result != WPAD_ERR_NONE) {
WPADiClearQueue(&p_wpd->extCmdQueue);
p_wpd->encStatus = 0;
p_wpd->unk_0x98D = 0;
if (result == WPAD_ERR_NO_CONTROLLER) {
type = WPAD_DEV_NOT_FOUND;
}
@@ -142,7 +142,7 @@ static void abortInitExtension(s32 chan, s32 result) {
else {
DEBUGPrint("detaching extension during initialization.\n");
WPADiSendSetReportType(&p_wpd->extCmdQueue, p_wpd->dataFormat, p_wpd->continuous, NULL);
WPADiSendSetReportType(&p_wpd->extCmdQueue, p_wpd->dataFormat, p_wpd->unk_0x98E, NULL);
return;
}
p_wpd->devType = (u8)type;
@@ -509,7 +509,7 @@ static void getExtType(s32 chan, s32 result) {
}
} else {
if (isExtEncMain(_devType[chan])) {
p_wpd->encStatus = 2;
p_wpd->unk_0x98D = 2;
WPADiSendWriteDataCmd(cmdq, 0xAA, 0x4A400F0, abortInitExtension);
WPADiCreateKey(chan);
WPADiSendWriteData(cmdq, p_wpd->encryptionKey, 6, 0x4A40040, abortInitExtension);
@@ -517,7 +517,7 @@ static void getExtType(s32 chan, s32 result) {
WPADiSendWriteData(cmdq, p_wpd->encryptionKey + 12, 4, 0x4A4004C, abortInitExtension);
WPADiSendReadData(cmdq, p_wpd->wmReadDataBuf, 32, 0x4A40020, p_wpd->extensionCB);
} else {
p_wpd->encStatus = 3;
p_wpd->unk_0x98D = 3;
WPADiSendWriteDataCmd(cmdq, 0xAA, 0x4A400F0, abortInitExtension);
WPADiCreateKeyFor3rd(chan);
WPADiSendWriteData(cmdq, p_wpd->encryptionKey, 6, 0x4A40040, abortInitExtension);
@@ -651,7 +651,7 @@ void __a1_20_status_report(u8 chan, u8* data) {
p_wpd->devMode = 0;
WPADiClearQueue(&p_wpd->extCmdQueue);
WPADiSendSetReportType(&p_wpd->extCmdQueue, p_wpd->dataFormat, p_wpd->continuous, NULL);
WPADiSendSetReportType(&p_wpd->extCmdQueue, p_wpd->dataFormat, p_wpd->unk_0x98E, NULL);
if (attach) {
if (p_wpd->extensionCB) {
@@ -741,11 +741,11 @@ void __a1_21_user_data(u8 chan, u8* data) {
DEBUGPrint("length : %d\n", p_wpd->wmReadLength);
status = (p_wpd->wmReadHadError < 0) ? WPAD_ERR_TRANSFER : 0;
DEBUGPrint("i2c = %04x\n", i2c);
DEBUGPrint("enc = %d\n", p_wpd->encStatus);
DEBUGPrint("enc = %d\n", p_wpd->unk_0x98D);
if (i2c == 0x04a4) {
DEBUGPrint("Access to extension register.\n");
if (p_wpd->encStatus == 2 || p_wpd->encStatus == 3) {
if (p_wpd->unk_0x98D == 2 || p_wpd->unk_0x98D == 3) {
DEBUGPrint("Decode!!!!\n");
DEBUGPrint(" len = %d, addr = %04x\n", len, base);

View File

@@ -13,8 +13,8 @@ typedef struct _CDBCryptBuf {
u32 buffer32[0xFB00];
}; // 0x00
u32 size; // 0x3EC00
u32 offset; // 0x3EC04
u32 unk_0x3EC00;
u32 unk_0x3EC04;
BOOL allocated; // 0x3EC08
u8 unk_0x3EC0C[0x34];
} CDBCryptBuf;

View File

@@ -19,7 +19,7 @@ typedef struct _CDBRecordFile {
#else
u8 unk_0x00[0x1C - 0x00];
#endif
int allocFlag; // 0x1C
int unk_0x1C;
CDBAttr attr; // 0x20
CDBBridgeFile bridgeFile; // 0x42C
u8 unk_0x434[0x438 - 0x434];

View File

@@ -24,7 +24,7 @@ typedef struct NWC24MsgObjPrivate {
#ifdef NWC24_MSG_READ
u32 headerSize;
#elif defined(NWC24_MBOX_CTRL) || defined(NWC24_MSG_COMMIT)
u32 headerSize; // 0x10
u32 unk_0x10;
#else
u8 unk_0x10[0x4];
#endif
@@ -46,8 +46,8 @@ typedef struct NWC24MsgObjPrivate {
#endif
u32 date; // 0x28
u32 receivedDate; // 0x2C
NWC24Data fromData; // 0x30
NWC24Data toData; // 0x38
NWC24Data unk_0x30;
NWC24Data unk_0x38;
NWC24Data subject; // 0x40
NWC24Data text; // 0x48
NWC24Data unk_0x50;

View File

@@ -57,7 +57,7 @@ void CDBRecordInstanceInit(CDBRecordFile* recordFile, CDBRecord* record, int typ
OSLockMutex((OSMutex*)recordFile);
recordFile->used = 1;
OSUnlockMutex((OSMutex*)recordFile);
recordFile->allocFlag = type;
recordFile->unk_0x1C = type;
recordFile->database = record->unk_0x00;
CDBAttrInit(&recordFile->attr);
CDBRecordKeyCopy(&recordFile->key, &record->key);
@@ -164,7 +164,7 @@ CDBErr CDBRecordOpen_(CDBRecord* record) {
goto open_result_ready;
open_location_ok:
if (CDBFSSDIsMounted()) {
err = CDBRecordDecrypt(record, cryptBuf, 0x3EC00, &cryptBuf->size, NULL);
err = CDBRecordDecrypt(record, cryptBuf, 0x3EC00, &cryptBuf->unk_0x3EC00, NULL);
} else {
err = CDB_ERROR_SD_IS_NOT_MOUNTED;
}
@@ -174,7 +174,7 @@ CDBErr CDBRecordOpen_(CDBRecord* record) {
CDBCryptBufFree((CDBCryptBuf**)&record->cryptBuf);
return err;
}
cryptBuf->offset = sizeof(CDBAttrBuf);
cryptBuf->unk_0x3EC04 = sizeof(CDBAttrBuf);
}
return CDB_ERROR_OK;
}
@@ -223,7 +223,7 @@ CDBErr CDBRecordOpenReadOnly_(CDBRecord* record) {
goto result_ready;
location_ok:
if (CDBFSSDIsMounted()) {
result = CDBRecordDecrypt(record, cryptBuf, 0x3EC00, &cryptBuf->size, NULL);
result = CDBRecordDecrypt(record, cryptBuf, 0x3EC00, &cryptBuf->unk_0x3EC00, NULL);
} else {
result = CDB_ERROR_SD_IS_NOT_MOUNTED;
}
@@ -233,7 +233,7 @@ CDBErr CDBRecordOpenReadOnly_(CDBRecord* record) {
CDBCryptBufFree((CDBCryptBuf**)&record->cryptBuf);
return result;
}
cryptBuf->offset = sizeof(CDBAttrBuf);
cryptBuf->unk_0x3EC04 = sizeof(CDBAttrBuf);
}
return CDB_ERROR_OK;
}
@@ -310,7 +310,7 @@ CDBErr CDBRecordWrite_(CDBRecord* record, void* buffer, u32 size) {
CDBReportError("can't write data in the record; the record is closed\n");
return CDB_ERROR_27;
}
if ((recordFile->allocFlag & 2) == 0) {
if ((recordFile->unk_0x1C & 2) == 0) {
CDBReportError("can't write data in the record; the record is opened as READONLY\n");
return CDB_ERROR_27;
}
@@ -687,7 +687,7 @@ CDBErr CDBRecordEncrypt(CDBRecord* record, void* buffer, CDBRecordKey* key, u32
if ((s32)recordFile == 0) {
return CDB_ERROR_27;
}
if (recordFile->allocFlag == 1) {
if (recordFile->unk_0x1C == 1) {
return CDB_ERROR_26;
}
if ((s32)buffer == 0) {
@@ -699,7 +699,7 @@ CDBErr CDBRecordEncrypt(CDBRecord* record, void* buffer, CDBRecordKey* key, u32
tempFile = record->file;
if ((s32)tempFile == 0) {
result = CDB_ERROR_27;
} else if (tempFile->allocFlag == 1) {
} else if (tempFile->unk_0x1C == 1) {
result = CDB_ERROR_26;
} else {
CDBAttrSetWiiId(&tempFile->attr, CDBGetWiiId());
@@ -713,7 +713,7 @@ CDBErr CDBRecordEncrypt(CDBRecord* record, void* buffer, CDBRecordKey* key, u32
CDBErr result;
if ((s32)record->file == 0) {
result = CDB_ERROR_27;
} else if (((CDBRecordFile*)record->file)->allocFlag == 1) {
} else if (((CDBRecordFile*)record->file)->unk_0x1C == 1) {
result = CDB_ERROR_26;
} else {
CDBAttrInitIV(&((CDBRecordFile*)record->file)->attr);
@@ -727,7 +727,7 @@ CDBErr CDBRecordEncrypt(CDBRecord* record, void* buffer, CDBRecordKey* key, u32
CDBErr result;
if ((s32)record->file == 0) {
result = CDB_ERROR_27;
} else if (((CDBRecordFile*)record->file)->allocFlag == 1) {
} else if (((CDBRecordFile*)record->file)->unk_0x1C == 1) {
result = CDB_ERROR_26;
} else {
CDBAttrSetKeyStr(&((CDBRecordFile*)record->file)->attr, key);

View File

@@ -264,8 +264,8 @@ CDBErr CDBRecordFileReadData(CDBRecord* record, void* buffer, u32 size, u32* rea
CDBCryptBuf* cryptBuf = record->cryptBuf;
if (cryptBuf != NULL) {
u32 unk = cryptBuf->size - cryptBuf->offset;
if (cryptBuf->size < unk) {
u32 unk = cryptBuf->unk_0x3EC00 - cryptBuf->unk_0x3EC04;
if (cryptBuf->unk_0x3EC00 < unk) {
unk = 0;
}
@@ -274,8 +274,8 @@ CDBErr CDBRecordFileReadData(CDBRecord* record, void* buffer, u32 size, u32* rea
}
if (unk != 0) {
memcpy(buffer, (u8*)&cryptBuf->buffer[cryptBuf->offset], unk);
cryptBuf->offset += unk;
memcpy(buffer, (u8*)&cryptBuf->buffer[cryptBuf->unk_0x3EC04], unk);
cryptBuf->unk_0x3EC04 += unk;
}
if (readSize != NULL) {
@@ -300,16 +300,16 @@ CDBErr CDBRecordFileSeekData(CDBRecord* record, u32 offset, CDBSeek seek) {
if (cryptBuf != NULL) {
switch (seek) {
case CDB_SEEK_BEGIN: {
cryptBuf->offset = sizeof(CDBAttrBuf);
cryptBuf->offset += offset;
cryptBuf->unk_0x3EC04 = sizeof(CDBAttrBuf);
cryptBuf->unk_0x3EC04 += offset;
break;
}
case CDB_SEEK_END: {
cryptBuf->offset = (cryptBuf->size - 1) - offset;
cryptBuf->unk_0x3EC04 = (cryptBuf->unk_0x3EC00 - 1) - offset;
break;
}
case CDB_SEEK_CUR: {
cryptBuf->offset += offset;
cryptBuf->unk_0x3EC04 += offset;
break;
}
}
@@ -329,7 +329,7 @@ int CDBRecordFileTellData(CDBRecord* record) {
CDBCryptBuf* cryptBuf = record->cryptBuf;
if (cryptBuf != NULL) {
return cryptBuf->offset - sizeof(CDBAttrBuf);
return cryptBuf->unk_0x3EC04 - sizeof(CDBAttrBuf);
}
return CDBFTellData(&recordFile->bridgeFile, record->key.location);
}

View File

@@ -265,7 +265,7 @@ CDBErr CDBRecordFree(CDBRecord* record) {
OSLockMutex((OSMutex*)recordFile);
*(u32*)&recordFile->unk_0x00[0x18] = 0;
OSUnlockMutex((OSMutex*)recordFile);
recordFile->allocFlag = 0;
recordFile->unk_0x1C = 0;
record->file = NULL;
OSUnlockMutex(&s_mutex);
}

View File

@@ -23,7 +23,8 @@ static int ReadHeaderChar(const NHTTPResponseInfo* response, NHTTPi_HDRBUFLIST**
}
static int LowerCase(int character) {
return ((character >= 'A') & (character <= 'Z')) ? character + 32 : character;
if((character>='A') & (character<='Z')) character+=32;
return character;
}
s32 NHTTPi_findNextLineHdrRecvBuf(const NHTTPResponseInfo* response, s32 position, s32 limit, s32* colon, s32* newlineLength) {
@@ -75,17 +76,15 @@ s32 NHTTPi_skipSpaceHdrRecvBuf(const NHTTPResponseInfo* response, s32 position,
s32 NHTTPi_compareTokenN_HdrRecvBuf(const NHTTPResponseInfo* response, s32 position, s32 limit, const char* token, s8 delimiter) {
NHTTPi_HDRBUFLIST* block;
s32 offset;
int character;
if (position < limit) {
FindHeaderBlock(response, position, &block, &offset);
character = ReadHeaderChar(response, &block, &offset);
while (LowerCase((s8)character) == LowerCase(*token)) {
if (*token == 0 || *token == ' ' || *token == delimiter || position == limit - 1) return 0;
character = ReadHeaderChar(response, &block, &offset);
++position;
++token;
}
s8 character;
if(position>=limit) return -1;
FindHeaderBlock(response,position,&block,&offset);
character=ReadHeaderChar(response,&block,&offset);
while(LowerCase(character)==LowerCase(*token)) {
if(*token==0 || *token==' ' || *token==delimiter || position==limit-1) return 0;
character=ReadHeaderChar(response,&block,&offset);
++position;
++token;
}
return -1;
}

View File

@@ -783,7 +783,7 @@ static NWC24Err DuplicationCheck(MBCHeader* header, const NWC24MsgObjPrivate* ms
continue;
}
if (msg->unk_0x1C != 0 && entry->crc == msg->unk_0x1C && entry->type == msg->type && entry->length == msg->length &&
entry->flags == msg->headerSize && (s32)entry->date == (s32)msg->date) {
entry->flags == msg->unk_0x10 && (s32)entry->date == (s32)msg->date) {
duplicateId = entry->msgId;
duplicateOffset = offset;
continue;
@@ -947,8 +947,8 @@ static NWC24Err MountVFMBox(NWC24MBoxType type) {
}
static NWC24Err CopyMsgObjToMBCFmt(const NWC24MsgObjPrivate* msg, MBCEntry* entry) {
u32 field1 = ((u32)msg->fromData.ptr & 0xFFFFF) | (msg->fromData.size << 20);
u32 field2 = ((u32)msg->toData.ptr & 0xFFFFF) | (msg->toData.size << 20);
u32 field1 = ((u32)msg->unk_0x30.ptr & 0xFFFFF) | (msg->unk_0x30.size << 20);
u32 field2 = ((u32)msg->unk_0x38.ptr & 0xFFFFF) | (msg->unk_0x38.size << 20);
u32 field3 = ((u32)msg->subject.ptr & 0xFFFFF) | (msg->subject.size << 20);
u32 field4 = ((u32)msg->unk_0x50.ptr & 0xFFFFF) | (msg->unk_0x50.size << 20);
u32 field5 = ((u32)msg->unk_0x58.ptr & 0xFFFFF) | (msg->unk_0x58.size << 20);
@@ -956,7 +956,7 @@ static NWC24Err CopyMsgObjToMBCFmt(const NWC24MsgObjPrivate* msg, MBCEntry* entr
entry->type = msg->type;
entry->length = msg->length;
entry->appId = msg->appId;
entry->flags = msg->headerSize;
entry->flags = msg->unk_0x10;
entry->tag = msg->tag;
entry->ledPattern = msg->ledPattern;
entry->crc = msg->unk_0x1C;
@@ -1003,7 +1003,7 @@ static NWC24Err CopyMsgObjToPrvFmt(const MBCEntry* entry, NWC24MsgObjPrivate* ms
msg->type = entry->type;
msg->length = entry->length;
msg->appId = entry->appId;
msg->headerSize = entry->flags;
msg->unk_0x10 = entry->flags;
msg->tag = entry->tag;
msg->ledPattern = entry->ledPattern;
msg->unk_0x1C = entry->crc;
@@ -1019,10 +1019,10 @@ static NWC24Err CopyMsgObjToPrvFmt(const MBCEntry* entry, NWC24MsgObjPrivate* ms
msg->textSize = entry->textSize;
msg->dwcId = entry->dwcId;
msg->iconNew = entry->iconNew;
msg->fromData.ptr = (void*)offset1;
msg->fromData.size = size1;
msg->toData.ptr = (void*)offset2;
msg->toData.size = size2;
msg->unk_0x30.ptr = (void*)offset1;
msg->unk_0x30.size = size1;
msg->unk_0x38.ptr = (void*)offset2;
msg->unk_0x38.size = size2;
msg->subject.ptr = (void*)offset3;
msg->subject.size = size3;
msg->unk_0x50.ptr = (void*)offset4;

View File

@@ -330,7 +330,7 @@ static NWC24Err NWC24CommitMsgInternal(NWC24MsgObjPrivate* msg, NWC24MBoxType ty
}
CHECK_WRITE(WriteString(msg, buffer));
if (msg->type & 0x10000) {
msg->headerSize = msg->length;
msg->unk_0x10 = msg->length;
buffer = NWC24WorkP->stringWork;
Mail_memset(buffer, 0, 1024);
Mail_sprintf(buffer, "\r\n--%s", MultiPartDivider);
@@ -339,7 +339,7 @@ static NWC24Err NWC24CommitMsgInternal(NWC24MsgObjPrivate* msg, NWC24MBoxType ty
}
CHECK_WRITE(WriteContentTypeField(msg));
if (!(msg->type & 0x10000))
msg->headerSize = msg->length;
msg->unk_0x10 = msg->length;
text.ptr = (const void*)msg->length;
{ NWC24Err textResult = WritePlainText(msg);
err = textResult == NWC24_ERR_NULL ? NWC24_OK : textResult; }
@@ -577,7 +577,7 @@ static NWC24Err WriteFromField(NWC24MsgObjPrivate* msg) {
Mail_memset(buffer, 0, 1024);
Mail_strncat(buffer, "From: ", 1022);
address = buffer + 6;
msg->fromData.ptr = (const void*)(msg->length + 6);
msg->unk_0x30.ptr = (const void*)(msg->length + 6);
type = 1;
if (msg->type & 0x100000)
type = 2;
@@ -596,7 +596,7 @@ static NWC24Err WriteFromField(NWC24MsgObjPrivate* msg) {
err = NWC24FWrite(NWC24WorkP->stringWork, total, m_pFile);
if (err == NWC24_OK) {
msg->length += total;
msg->fromData.size = msg->length - (u32)msg->fromData.ptr - 2;
msg->unk_0x30.size = msg->length - (u32)msg->unk_0x30.ptr - 2;
}
}
return err;
@@ -612,7 +612,7 @@ static NWC24Err WriteToField(NWC24MsgObjPrivate* msg) {
cursor += 4;
index = 0;
total = 4;
msg->toData.ptr = (const void*)(msg->length + 4);
msg->unk_0x38.ptr = (const void*)(msg->length + 4);
remaining = 1018;
for (; index < msg->numTo; ++index) {
err = SynthesizeAddrStr(&msg->toAddrs[index], msg->type, cursor, remaining, &length);
@@ -641,7 +641,7 @@ static NWC24Err WriteToField(NWC24MsgObjPrivate* msg) {
err = NWC24FWrite(NWC24WorkP->stringWork, total + 2, m_pFile);
if (err == NWC24_OK) {
msg->length += total + 2;
msg->toData.size = msg->length - (u32)msg->toData.ptr - 2;
msg->unk_0x38.size = msg->length - (u32)msg->unk_0x38.ptr - 2;
}
}
return err;

View File

@@ -73,8 +73,8 @@ NWC24Err NWC24InitMsgObj(NWC24MsgObj* msg, NWC24MsgType type) {
msgObj->attachedType[i] = NWC24_TEXT_PLAIN;
}
NWC24Data_Init(&msgObj->fromData);
NWC24Data_Init(&msgObj->toData);
NWC24Data_Init(&msgObj->unk_0x30);
NWC24Data_Init(&msgObj->unk_0x38);
NWC24Data_Init(&msgObj->unk_0x50);
NWC24Data_Init(&msgObj->unk_0x58);
NWC24Data_Init(&msgObj->unk_0xD0);

View File

@@ -289,7 +289,7 @@ NWC24Err NWC24ReadMsgFromAddr(const NWC24MsgObj* msg, char* address, u32 capacit
default:
return result;
}
if (privateMsg->fromData.size == 0)
if (privateMsg->unk_0x30.size == 0)
return NWC24_ERR_NULL;
result = NWC24iMBoxOpenStoredMsg(type, privateMsg->msgId, &file);
switch (result) {
@@ -300,9 +300,9 @@ NWC24Err NWC24ReadMsgFromAddr(const NWC24MsgObj* msg, char* address, u32 capacit
}
result = NWC24FStreamInit(&stream, &file, 0, privateMsg->length, buffer, 1024);
if (result == NWC24_OK) {
result = NWC24FStreamSeek(&stream, (u32)privateMsg->fromData.ptr);
result = NWC24FStreamSeek(&stream, (u32)privateMsg->unk_0x30.ptr);
if (result == NWC24_OK)
result = NWC24iExtractAddrSpec(&stream, privateMsg->fromData.size, 0, address, capacity);
result = NWC24iExtractAddrSpec(&stream, privateMsg->unk_0x30.size, 0, address, capacity);
}
closeResult = NWC24iMBoxCloseMsg(&file);
if (result != NWC24_OK)

View File

@@ -930,13 +930,13 @@ namespace ipl {
math::VEC3 translate(mpLayout->FindPaneByName("N_Memo")->GetTranslate());
mURLProc.clear_prev_drawing();
mURLProc.setMemoTranslateY(translate.y);
mURLProc.setUnk_0x44(translate.y);
bool result = false;
if (mState == STATE_NORMAL && mScroller.is_busy() == FALSE) {
result = true;
}
mURLProc.setFocusEnabled(result);
mURLProc.setUnk_0x53(result);
if (translate.y < 500.0f) {
mpLayout->draw("N_Header");
@@ -983,8 +983,8 @@ namespace ipl {
mpLayout->draw("ReplyMask");
}
if (!mURLProc.getColorPass()) {
mURLProc.setColorPass(1);
if (!mURLProc.getUnk_0x50()) {
mURLProc.setUnk_0x50(1);
}
}
@@ -1512,7 +1512,7 @@ namespace ipl {
mURLProc.init();
if (mpBoardObj->mLetterType == BoardObject::TYPE_MEMO) {
mURLProc.setHitYOffset(8.0f);
mURLProc.setUnk_0x40(8.0f);
}
nw4r::lyt::Pane* pane = mpLayout->FindPaneByName("T_Letter");

View File

@@ -15,16 +15,16 @@ namespace ipl {
}
void UrlProcessor::init() {
mbHoverOffset = 0;
mbInTag = 0;
mbColorPass = 0;
mbFocusEnabled = 1;
unk_0x52 = 0;
unk_0x51 = 0;
unk_0x50 = 0;
unk_0x53 = 1;
mHitYOffset = 0.0f;
mMemoTranslateY = 0.0f;
unk_0x40 = 0.0f;
unk_0x44 = 0.0f;
mCurTagNo = 0;
mSelectedTagNo = -1;
unk_0x48 = 0;
unk_0x4C = -1;
for (int i = 0; i < WPAD_MAX_CONTROLLERS; i++) {
mConData[i].valid = false;
@@ -60,14 +60,14 @@ namespace ipl {
}
void UrlProcessor::clear_prev_drawing() {
mCurTagNo = 0;
mbHoverOffset = 0;
mbInTag = 0;
unk_0x48 = 0;
unk_0x52 = 0;
unk_0x51 = 0;
}
nw4r::ut::Operation UrlProcessor::Process(u16 code, nw4r::ut::PrintContext<wchar_t>* context) {
if (code == SEPERATOR || code == (u16)'\n') {
if (mbColorPass == 0) {
if (unk_0x50 == 0) {
make_collision(context, code);
} else if (code == SEPERATOR) {
parse(context);
@@ -78,42 +78,42 @@ namespace ipl {
void UrlProcessor::make_collision(nw4r::ut::PrintContext<wchar_t>* context, u16 code) {
if (code == SEPERATOR) {
if (mbInTag == 0) {
if (unk_0x51 == 0) {
url_collision* const url_col = new (System::getMem2App(), 4) url_collision();
line_collision* const line_col = new (System::getMem2App(), 4) line_collision();
url_col->mTagNo = mCurTagNo;
url_col->mpStart = (wchar_t*)context->str;
url_col->unk_0x00 = unk_0x48;
url_col->unk_0x04 = (wchar_t*)context->str;
line_col->mLeft = context->writer->GetCursorX();
line_col->unk_0x00 = context->writer->GetCursorX();
nw4r::ut::List_Append(&url_col->mLineCollisions, line_col);
nw4r::ut::List_Append(&mUrlCollisions, url_col);
mbInTag = 1;
unk_0x51 = 1;
} else {
void* url_col_raw = nw4r::ut::List_GetPrev(&mUrlCollisions, NULL);
void* line_col_raw = nw4r::ut::List_GetPrev(&((url_collision*)url_col_raw)->mLineCollisions, NULL);
url_collision* url_col = (url_collision*)url_col_raw;
line_collision* line_col = (line_collision*)line_col_raw;
line_col->mRight = context->writer->GetCursorX();
line_col->mY = context->writer->GetCursorY();
line_col->unk_0x04 = context->writer->GetCursorX();
line_col->unk_0x08 = context->writer->GetCursorY();
url_col->mpEnd = (wchar_t*)context->str;
url_col->unk_0x08 = (wchar_t*)context->str;
mbInTag = 0;
mCurTagNo++;
unk_0x51 = 0;
unk_0x48++;
}
} else {
if (mbInTag != 0) {
if (unk_0x51 != 0) {
url_collision* url_col = (url_collision*)nw4r::ut::List_GetPrev(&mUrlCollisions, NULL);
line_collision* line_col = (line_collision*)nw4r::ut::List_GetPrev(&url_col->mLineCollisions, NULL);
line_col->mRight = context->writer->GetCursorX();
line_col->mY = context->writer->GetCursorY();
line_col->unk_0x04 = context->writer->GetCursorX();
line_col->unk_0x08 = context->writer->GetCursorY();
line_col = new (System::getMem2App(), 4) line_collision();
line_col->mLeft = -208.0f;
line_col->unk_0x00 = -208.0f;
nw4r::ut::List_Append(&url_col->mLineCollisions, line_col);
}
@@ -122,41 +122,41 @@ namespace ipl {
void UrlProcessor::parse(nw4r::ut::PrintContext<wchar_t>* context) {
f32 curY = context->writer->GetCursorY();
if (mbInTag == 0) {
if (mSelectedTagNo == mCurTagNo) {
if (unk_0x51 == 0) {
if (unk_0x4C == unk_0x48) {
context->writer->SetTextColor(0xFFE664FF);
} else if (mbFocusEnabled != 0 && is_focused()) {
} else if (unk_0x53 != 0 && is_focused()) {
context->writer->SetCursorY(curY - 2.0f);
context->writer->SetTextColor(0xF06E28FF);
mbHoverOffset = 1;
unk_0x52 = 1;
} else {
context->writer->SetTextColor(0x34BEEDFF);
}
mbInTag = 1;
unk_0x51 = 1;
} else {
if (mbHoverOffset != 0) {
if (unk_0x52 != 0) {
context->writer->SetCursorY(2.0f + curY);
mbHoverOffset = 0;
unk_0x52 = 0;
}
context->writer->SetTextColor(0x646464FF);
mbInTag = 0;
mCurTagNo++;
unk_0x51 = 0;
unk_0x48++;
}
}
BOOL UrlProcessor::is_focused() const {
for (int i = 0; i < WPAD_MAX_CONTROLLERS; i++) {
if (mCurTagNo == get_focused_tagno(i)) {
if (unk_0x48 == get_focused_tagno(i)) {
return TRUE;
}
}
return FALSE;
}
void UrlProcessor::select(int tagNo) {
mSelectedTagNo = tagNo;
void UrlProcessor::select(int unk) {
unk_0x4C = unk;
}
int UrlProcessor::get_focused_tagno(int chan) const {
@@ -174,13 +174,13 @@ namespace ipl {
while (url_col = (url_collision*)nw4r::ut::List_GetNext(&mUrlCollisions, url_col), url_col != NULL) {
while (line_col = (line_collision*)nw4r::ut::List_GetNext(&url_col->mLineCollisions, line_col), line_col != NULL) {
f32 left = line_col->mLeft - var_f28;
f32 right = var_f28 + line_col->mRight;
f32 temp_f0 = ((mMemoTranslateY + mHitYOffset) - line_col->mY);
f32 left = line_col->unk_0x00 - var_f28;
f32 right = var_f28 + line_col->unk_0x04;
f32 temp_f0 = ((unk_0x44 + unk_0x40) - line_col->unk_0x08);
f32 top = (var_f29 + temp_f0) - var_f28;
f32 bottom = var_f28 + (var_f30 + temp_f0);
if (left <= var_f31 && var_f31 <= right && top <= -pos.y && -pos.y <= bottom) {
return url_col->mTagNo;
return url_col->unk_0x00;
}
}
}
@@ -194,7 +194,7 @@ namespace ipl {
url_collision* url_col = NULL;
while (got = (url_collision*)nw4r::ut::List_GetNext(&mUrlCollisions, got), got != NULL) {
if (got->mTagNo == mSelectedTagNo) {
if (got->unk_0x00 == unk_0x4C) {
url_col = got;
break;
}
@@ -210,10 +210,10 @@ namespace ipl {
int chIdx2 = 0;
int chIdx = 0;
u32 count = (u32)url_col->mpEnd - (u32)url_col->mpStart;
u32 count = (u32)url_col->unk_0x08 - (u32)url_col->unk_0x04;
count >>= 1;
for (u32 i = 0; i < count; i++) {
wchar_t wch = url_col->mpStart[i];
wchar_t wch = url_col->unk_0x04[i];
if (wch != SEPERATOR && chIdx2 < 0x200) {
url[chIdx2++] = wch;
}
@@ -226,9 +226,9 @@ namespace ipl {
}
UrlProcessor::url_collision::url_collision() {
mTagNo = 0;
mpStart = NULL;
mpEnd = NULL;
unk_0x00 = 0;
unk_0x04 = NULL;
unk_0x08 = NULL;
nw4r::ut::List_Init(&mLineCollisions, offsetof(line_collision, mLinkList));
}

View File

@@ -436,10 +436,10 @@ namespace ipl {
data.titleId = System::getChannelManager()->getTitleID(mChanPage, mChanIndex);
data.threadTerminated = mbModuleTerminated;
data.unk_0x19 = true;
data.mbHasNewMessage = true;
data.unk_0x1A = true;
if (!(System::getNwc24Manager() != NULL && System::getNwc24Manager()->isNewMessageThere(ES_TITLE_CODE(data.titleId)))) {
data.mbHasNewMessage = false;
data.unk_0x1A = false;
}
System::getCSManager()->setData(data);

View File

@@ -1901,59 +1901,64 @@ namespace ipl {
nw4r::ut::Rect projRect;
System::getProjectionRect(&projRect);
GXRenderModeObj* rMode = System::getRenderModeObj();
f32 scissorX;
f32 scissorY;
f32 scissorWidth;
f32 scissorHeight;
u16 fbWidth;
u16 efbHeight;
f32 var_f29;
f32 var_f30;
f32 var_f31;
f32 var_f1;
u16 var_r0;
u16 var_r3;
if (mState == STATE_NORMAL_FADE_ZOOM || mState == STATE_NORMAL_DONE_FADE_ZOOM || mState == STATE_NORMAL_RESTART) {
nw4r::math::MTX44 mtx;
f32 right = unk_0xD8.x + projRect.right / unk_0xE4.x;
f32 left = unk_0xD8.x + projRect.left / unk_0xE4.x;
f32 bottom = unk_0xD8.y - projRect.bottom / unk_0xE4.y;
f32 top = unk_0xD8.y - projRect.top / unk_0xE4.y;
f32 rightScale = projRect.right / unk_0xE4.x;
f32 leftScale = projRect.left / unk_0xE4.x;
f32 topScale = projRect.top / unk_0xE4.y;
f32 bottomScale = projRect.bottom / unk_0xE4.y;
f32 bottom = unk_0xD8.y - bottomScale;
f32 right = unk_0xD8.x + rightScale;
f32 left = unk_0xD8.x + leftScale;
f32 top = unk_0xD8.y - topScale;
MTXOrtho(mtx, top, bottom, left, right, -100.0f, 100.0f);
nw4r::math::VEC4 vec4_in(vec.x, vec.y, 0.0f, 1.0f);
nw4r::math::VEC4 vec4;
nw4r::math::VEC4Transform(&vec4, &mtx, &vec4_in);
fbWidth = rMode->fbWidth;
efbHeight = rMode->efbHeight;
f32 projectionWidth = projRect.GetWidth();
scissorX = ((1.0f + vec4.x) * fbWidth / 2) - ((mChanThumbOff_X * unk_0xE4.x) * (fbWidth / projectionWidth));
scissorY = (efbHeight - ((1.0f + vec4.y) * efbHeight / 2)) - (mChanThumbOff_Y * unk_0xE4.y);
scissorWidth = 2.0f * (mChanThumbOff_X * unk_0xE4.x) * (fbWidth / projectionWidth);
scissorHeight = 2.0f * (mChanThumbOff_Y * unk_0xE4.y);
var_r0 = rMode->fbWidth;
var_r3 = rMode->efbHeight;
var_f29 = projRect.GetWidth();
var_f30 = (var_r3 - ((1.0f + vec4.y) * var_r3 / 2)) - (mChanThumbOff_Y * unk_0xE4.y);
f32 temp_f7_2 = var_r0 / var_f29;
var_f31 = ((1.0f + vec4.x) * var_r0 / 2) - ((mChanThumbOff_X * unk_0xE4.x) * (temp_f7_2));
var_f29 = 2.0f * (mChanThumbOff_X * unk_0xE4.x) * (var_r0 / var_f29);
var_f1 = 2.0f * (mChanThumbOff_Y * unk_0xE4.y);
} else {
fbWidth = rMode->fbWidth;
efbHeight = rMode->efbHeight;
scissorX = ((f32)fbWidth / 2) + ((vec.x - mChanThumbOff_X) * (fbWidth / projRect.GetWidth()));
scissorY = (((f32)efbHeight / 2) - vec.y) - mChanThumbOff_Y;
scissorWidth = 2.0f * mChanThumbOff_X * (fbWidth / projRect.GetWidth());
scissorHeight = 2.0f * mChanThumbOff_Y;
var_r0 = rMode->fbWidth;
var_r3 = rMode->efbHeight;
var_f31 = ((f32)var_r0 / 2) + ((vec.x - mChanThumbOff_X) * (var_r0 / projRect.GetWidth()));
var_f30 = (((f32)var_r3 / 2) - vec.y) - mChanThumbOff_Y;
var_f29 = 2.0f * mChanThumbOff_X * (var_r0 / projRect.GetWidth());
var_f1 = 2.0f * mChanThumbOff_Y;
}
scissorX -= 1.0f;
scissorY -= 1.0f;
scissorWidth += 2.0f;
scissorHeight += 2.0f;
if (scissorX >= fbWidth || (scissorX + scissorWidth) <= 0.0f || scissorY >= efbHeight || (scissorY + scissorHeight) <= 0.0f) {
var_f31 -= 1.0f;
var_f30 -= 1.0f;
var_f29 += 2.0f;
var_f1 += 2.0f;
if (var_f31 >= var_r0 || (var_f31 + var_f29) <= 0.0f || var_f30 >= var_r3 || (var_f30 + var_f1) <= 0.0f) {
GXSetScissor(0, 0, 0, 0);
} else {
if (scissorX < 0.0f) {
scissorWidth += scissorX;
scissorX = 0.0f;
if (var_f31 < 0.0f) {
var_f29 += var_f31;
var_f31 = 0.0f;
}
if (scissorY < 0.0f) {
scissorHeight += scissorY;
scissorY = 0.0f;
if (var_f30 < 0.0f) {
var_f1 += var_f30;
var_f30 = 0.0f;
}
if ((scissorX + scissorWidth) > 1705.0f) {
scissorWidth -= (scissorX + scissorWidth) - 1705.0f;
if ((var_f31 + var_f29) > 1705.0f) {
var_f29 -= (var_f31 + var_f29) - 1705.0f;
}
if ((scissorY + scissorHeight) > 1705.0f) {
scissorHeight -= (scissorY + scissorHeight) - 1705.0f;
if ((var_f30 + var_f1) > 1705.0f) {
var_f1 -= (var_f30 + var_f1) - 1705.0f;
}
GXSetScissor(scissorX, scissorY, scissorWidth, scissorHeight);
GXSetScissor(var_f31, var_f30, var_f29, var_f1);
}
}

View File

@@ -20,7 +20,7 @@
#include <private/os.h>
#include <private/wpad.h>
#pragma dont_instantiate ipl::math::HermiteIntp<float>
#undef IPL_CHANNEL_TITLE_NOVTABLE
@@ -648,7 +648,7 @@ namespace ipl {
}
if (System::getFader()->getStatus() == EGG::Fader::PREPARE_IN && System::isReceiveScheduleStopped()) {
if (System::getNwc24Manager() && !System::getNwc24Manager()->isReceivingIdle()) {
if (System::getNwc24Manager() && !System::getNwc24Manager()->isUnk0xA31()) {
goto scn_continue;
}
@@ -1767,7 +1767,7 @@ namespace ipl {
data.threadTerminated = mbModuleTerminated;
if (System::getNwc24Manager() == NULL || !System::getNwc24Manager()->isNewMessageThere(ES_TITLE_CODE(data.titleId))) {
data.mbHasNewMessage = false;
data.unk_0x1A = false;
}
System::getCSManager()->setData(data);
if (!System::getCSManager()->init(mpModuleFile, mpModuleThread)) {

View File

@@ -25,16 +25,16 @@ typedef struct {
undefined4 result;
undefined4 errCode;
HTTPTestState httpTestState;
undefined4 natState;
undefined4 gsAvailable;
undefined4 natTimedOut;
undefined4 natFailed;
undefined4 unk_0x030;
undefined4 unk_0x034;
undefined4 unk_0x038;
undefined4 unk_0x03c;
OSTime detectStartTime;
NHTTPConnection httpConnection;
NHTTPRequest* httpRequest;
NHTTPResponse* httpResponse;
NCDProxyProfile proxy;
void* httpBuf;
void* unk_0x7f0;
NAT nat;
} StaticSession;
@@ -64,14 +64,14 @@ void IPLContestInitialize(void* heapBuf, NCDProxyProfile* proxy) {
g_session.result = 0xFF00;
g_session.errCode = 0;
g_session.httpTestState = HTTP_TEST_NOT_STARTED;
g_session.natState = 0;
g_session.unk_0x030 = 0;
g_session.detectStartTime = 0;
g_session.httpConnection = 0;
g_session.httpRequest = 0;
g_session.httpResponse = NULL;
g_session.gsAvailable = 0;
g_session.natTimedOut = 0;
g_session.natFailed = 1;
g_session.unk_0x034 = 0;
g_session.unk_0x038 = 0;
g_session.unk_0x03c = 1;
g_session.proxy = *proxy;
}
@@ -100,7 +100,7 @@ int IPLContestProcess() {
g_session.errCode = g_session.errCode != 0 ? g_session.errCode : -52200;
OSReport("[error] Failed to start up NHTTP.\n");
} else {
g_session.httpBuf = IPLContestAlloc(0x400);
g_session.unk_0x7f0 = IPLContestAlloc(0x400);
g_session.httpTestState = HTTP_TEST_STARTED;
OSReport("Starting HTTP conectting test.\n");
}
@@ -108,7 +108,7 @@ int IPLContestProcess() {
}
case HTTP_TEST_STARTED: {
g_session.httpRequest =
NHTTPCreateRequest("http://conntest.nintendowifi.net/", 0, g_session.httpBuf, 0x400, sNHTTPReqCallback, 0);
NHTTPCreateRequest("http://conntest.nintendowifi.net/", 0, g_session.unk_0x7f0, 0x400, sNHTTPReqCallback, 0);
if (g_session.httpRequest == 0) {
g_session.httpTestState = HTTP_TEST_RESPONSE_ERRORED;
g_session.result |= 4;
@@ -156,9 +156,9 @@ int IPLContestProcess() {
NHTTPDestroyResponse(g_session.httpResponse);
g_session.httpResponse = NULL;
}
if (g_session.httpBuf != NULL) {
IPLContestFree(g_session.httpBuf, 0);
g_session.httpBuf = NULL;
if (g_session.unk_0x7f0 != NULL) {
IPLContestFree(g_session.unk_0x7f0, 0);
g_session.unk_0x7f0 = NULL;
}
g_session.httpTestState = HTTP_TEST_DONE;
NHTTPCleanupAsync(sNHTTPCleanupCallback);
@@ -176,9 +176,9 @@ int IPLContestProcess() {
NHTTPDestroyResponse(g_session.httpResponse);
g_session.httpResponse = NULL;
}
if (g_session.httpBuf != NULL) {
IPLContestFree(g_session.httpBuf, 0);
g_session.httpBuf = NULL;
if (g_session.unk_0x7f0 != NULL) {
IPLContestFree(g_session.unk_0x7f0, 0);
g_session.unk_0x7f0 = NULL;
}
g_session.httpTestState = HTTP_TEST_DONE;
NHTTPCleanupAsync(sNHTTPCleanupCallback);
@@ -198,11 +198,11 @@ int IPLContestProcess() {
OSReport("Port mapping detectioning test has been skipped.\n");
} else
switch (g_session.natState) {
switch (g_session.unk_0x030) {
case 0: {
gsiMemoryCallbacksSet(IPLContestGSMalloc, IPLContestGSFree, IPLContestGSRealloc, IPLContestGSMemalign);
GSIStartAvailableCheckA("wiinat");
g_session.natState = 1;
g_session.unk_0x030 = 1;
OSReport("Starting GameSpy available check.\n");
break;
}
@@ -212,14 +212,14 @@ int IPLContestProcess() {
break;
}
case GSIACAvailable: {
g_session.gsAvailable = 1;
g_session.natState = 2;
g_session.unk_0x034 = 1;
g_session.unk_0x030 = 2;
OSReport("GameSpy server is currently available.\n");
break;
}
default: {
g_session.gsAvailable = 0;
g_session.natState = 5;
g_session.unk_0x034 = 0;
g_session.unk_0x030 = 5;
OSReport("GameSpy server is currently unavailable.\n");
break;
}
@@ -228,7 +228,7 @@ int IPLContestProcess() {
}
case 2: {
NNStartNatDetection(onNatDetectionDone);
g_session.natState = 3;
g_session.unk_0x030 = 3;
OSReport("Port mapping detectioning test has been started.\n");
g_session.detectStartTime = OSGetTime();
break;
@@ -238,8 +238,8 @@ int IPLContestProcess() {
if (OSGetTime() - g_session.detectStartTime < OSMillisecondsToTicks((OSTime)90000)) {
break;
}
g_session.natState = 5;
g_session.natTimedOut = 1;
g_session.unk_0x030 = 5;
g_session.unk_0x038 = 1;
OSReport("[error] NAT timeout.\n");
break;
}
@@ -289,10 +289,10 @@ int IPLGetNATSupportCode(int conntype) {
nat = g_session.nat;
if (g_session.gsAvailable != 0) {
if (g_session.natTimedOut != 0) {
if (g_session.unk_0x034 != 0) {
if (g_session.unk_0x038 != 0) {
code = 11180;
} else if (g_session.natFailed != 0) {
} else if (g_session.unk_0x03c != 0) {
code = 11170;
} else {
if (nat.mappingScheme == 0 && nat.mappings[2].publicPort == nat.mappings[1].publicPort * 2 - nat.mappings[0].publicPort) {
@@ -464,10 +464,10 @@ void sNHTTPCleanupCallback() {
void onNatDetectionDone(gsi_bool success, NAT nat) {
if (success) {
g_session.nat = nat;
g_session.natFailed = 0;
g_session.unk_0x03c = 0;
} else {
g_session.natFailed = 1;
g_session.unk_0x03c = 1;
}
g_session.natState = 4;
g_session.unk_0x030 = 4;
return;
}

View File

@@ -31,7 +31,7 @@ namespace ipl {
};
// clang-format on
SDButton::SDButton(EGG::Heap* heap) : Base(heap), mAnimWait(0) {
SDButton::SDButton(EGG::Heap* heap) : Base(heap), unk_0x54(0) {
setSceneParentFlags(SCN_PARENTFLAG_CALC | SCN_PARENTFLAG_DRAW);
for (int i = 0; i < 2; i++) {
@@ -114,10 +114,10 @@ namespace ipl {
}
void SDButton::calc() {
if (mAnimWait == 1) {
if (unk_0x54 == 1) {
if (!mpLayout->isPlaying(ANIM_HELP_BTN_ROLL_ON)) {
reset_gui();
mAnimWait = 0;
unk_0x54 = 0;
}
}
@@ -347,7 +347,7 @@ namespace ipl {
switch (animNo) {
case IDANIM_HELP_BTN_CLICK: {
anim = mpLayout->getAnim(ANIM_HELP_BTN_ROLL_ON);
mAnimWait = 1;
unk_0x54 = 1;
break;
}
case IDANIM_ARROW_RIGHT_CLICK: {

View File

@@ -353,7 +353,7 @@ FaderSceneCommand SDChannelTitle::calcFadeout() {
mWpadStopTick = OSGetTick();
}
if (System::getFader()->getStatus() == EGG::Fader::PREPARE_IN && System::isReceiveScheduleStopped() &&
(!System::getNwc24Manager() || System::getNwc24Manager()->isReceivingIdle())) {
(!System::getNwc24Manager() || System::getNwc24Manager()->isUnk0xA31())) {
OSReport("NWC24 Scheduler stopped.\n");
NandSDWorker* worker = mpChannelSelect->getWorker();
if (mNextScene == 17) {
@@ -1118,7 +1118,7 @@ extern "C" void iplSDChannelTitle_updateScriptLoad(SDChannelTitle* scene) {
data.titleId = scene->mTitleId;
data.threadTerminated = scene->mbScriptFailed;
if (!System::getNwc24Manager() || !System::getNwc24Manager()->isNewMessageThere(static_cast<u32>(data.titleId & 0xffffffffULL))) {
data.mbHasNewMessage = false;
data.unk_0x1A = false;
}
System::getCSManager()->setData(data);
if (!System::getCSManager()->init(scene->mpScriptFile, scene->mpRsoThread)) {

View File

@@ -30,10 +30,12 @@ namespace ipl {
namespace scene {
extern "C" MEMAllocator sRakuAllocator;
MEMAllocator sRakuAllocator;
extern "C" RakuProgress sRakuStatus;
RakuProgress sRakuStatus;
extern "C" RakuConfiguration sRakuConfiguration;
RakuConfiguration sRakuConfiguration;
struct RakuStatus {
RakuProgress progress;
RakuConfiguration configuration;
};
extern "C" RakuStatus sRakuStatus;
RakuStatus sRakuStatus;
extern "C" OSMessageQueue sRakuMsgQueue;
OSMessageQueue sRakuMsgQueue;
static u32 startTimeHigh = 0;
@@ -59,7 +61,8 @@ public:
virtual ~RakuRakuThread();
virtual void* Run();
virtual void unk_0x2C() = 0;
static void syncRakuProgress(RakuProgress* progress);
void syncRakuProgress();
static void progressCallback(RakuProgress* progress);
void destroy();
int start();
int getState();
@@ -76,15 +79,19 @@ private:
MEMHeapHandle mHeap;
};
void RakuRakuThread::syncRakuProgress(RakuProgress* progress) {
void RakuRakuThread::syncRakuProgress() {
BOOL interrupts = OSDisableInterrupts();
sRakuStatus = *progress;
sRakuStatus.progress = *(RakuProgress*)this;
OSTime time = OSGetTime();
startTimeHigh = time >> 32;
startTimeLow = time;
OSRestoreInterrupts(interrupts);
}
void RakuRakuThread::progressCallback(RakuProgress* progress) {
((RakuRakuThread*)progress)->syncRakuProgress();
}
RakuRakuThread::RakuRakuThread(EGG::Heap* heap) : utility::ut_thread() {
u32 version = ATERMi_ApConfigGetVersion();
if (((version >> 12) & 15) * 10 + ((version >> 8) & 15) != 1) {
@@ -141,14 +148,14 @@ int RakuRakuThread::start() {
mPriority = OSGetThreadPriority(OSGetCurrentThread()) - 1;
active = true;
mFinished = 0;
memset(&sRakuConfiguration, 0, sizeof(RakuConfiguration));
memset(&sRakuStatus, 0, sizeof(RakuProgress));
memset(&sRakuStatus.configuration, 0, sizeof(RakuConfiguration));
memset(&sRakuStatus.progress, 0, sizeof(RakuProgress));
SOLibraryConfig socketConfig;
socketConfig.alloc = RakuSocketAlloc;
socketConfig.free = RakuSocketFree;
SOInit(&socketConfig);
ATERMi_ApConfigStart(mPriority, 200,
syncRakuProgress,
progressCallback,
RakuAtermAlloc, RakuAtermFree, 4096);
if (!mRunning) {
mRunning = 1;
@@ -200,7 +207,7 @@ int RakuRakuThread::getState() {
return 0;
}
BOOL interrupts = OSDisableInterrupts();
switch (sRakuStatus.state) {
switch (sRakuStatus.progress.state) {
case 1: displayState = 1; break;
case 2: displayState = 2; break;
case 3: displayState = 2; break;
@@ -222,30 +229,6 @@ int RakuRakuThread::cancel() {
return OSSendMessage(&sRakuMsgQueue, (OSMessage)1, 0);
}
inline void copyRakuPrivacy(NCDApConfig* config, const RakuConfiguration* settings) {
if (settings->security == 1) {
config->privacy.mode = 1;
config->privacy.wep40.keyId = settings->keyId;
for (int index = 0; index < 4; ++index) {
memcpy(config->privacy.wep40.key[index], settings->wepKeys[index], 5);
}
} else if (settings->security == 2) {
config->privacy.mode = 2;
config->privacy.wep104.keyId = settings->keyId;
for (int index = 0; index < 4; ++index) {
memcpy(config->privacy.wep104.key[index], settings->wepKeys[index], 13);
}
} else if (settings->security == 4) {
config->privacy.mode = 4;
memcpy(config->privacy.tkip.key, settings->passphrase, 64);
config->privacy.tkip.keyLen = strlen(settings->passphrase);
} else if (settings->security == 5) {
config->privacy.mode = 6;
memcpy(config->privacy.aes.key, settings->passphrase, 64);
config->privacy.aes.keyLen = strlen(settings->passphrase);
}
}
int RakuRakuThread::finish(NCDApConfig* config, int* result) {
if (!active) {
if (result != NULL) {
@@ -253,29 +236,49 @@ int RakuRakuThread::finish(NCDApConfig* config, int* result) {
}
return 1;
}
s32 state = sRakuStatus.state;
if ((u32)(state - 6) <= 1) {
if (!mFinished) {
if (state == 6) {
ATERMi_ApConfigGetResult(&sRakuConfiguration);
printInfo();
}
OSSendMessage(&sRakuMsgQueue, (OSMessage)1, 0);
return 0;
}
SOFinish();
active = false;
destroy();
} else {
s32 state = sRakuStatus.progress.state;
if ((u32)(state - 6) > 1) {
return 0;
}
if (!mFinished) {
if (state == 6) {
ATERMi_ApConfigGetResult(&sRakuStatus.configuration);
printInfo();
}
OSSendMessage(&sRakuMsgQueue, (OSMessage)1, 0);
return 0;
}
SOFinish();
active = false;
destroy();
if (config != NULL) {
memcpy(config->ssid, sRakuConfiguration.ssid, 32);
config->ssidLength = strlen(sRakuConfiguration.ssid);
copyRakuPrivacy(config, &sRakuConfiguration);
RakuConfiguration* settings = &sRakuStatus.configuration;
memcpy(config->ssid, settings->ssid, 32);
config->ssidLength = strlen(settings->ssid);
if (settings->security == 1) {
config->privacy.mode = 1;
config->privacy.wep40.keyId = settings->keyId;
for (int index = 0; index < 4; ++index) {
memcpy(config->privacy.wep40.key[index], settings->wepKeys[index], 5);
}
} else if (settings->security == 2) {
config->privacy.mode = 2;
config->privacy.wep104.keyId = settings->keyId;
for (int index = 0; index < 4; ++index) {
memcpy(config->privacy.wep104.key[index], settings->wepKeys[index], 13);
}
} else if (settings->security == 4) {
config->privacy.mode = 4;
memcpy(config->privacy.tkip.key, settings->passphrase, 64);
config->privacy.tkip.keyLen = strlen(settings->passphrase);
} else if (settings->security == 5) {
config->privacy.mode = 6;
memcpy(config->privacy.aes.key, settings->passphrase, 64);
config->privacy.aes.keyLen = strlen(settings->passphrase);
}
}
if (result != NULL) {
*result = sRakuStatus.result;
*result = sRakuStatus.progress.result;
}
return 1;
}

View File

@@ -15,10 +15,10 @@ namespace ipl {
// clang-format on
SettingButton::SettingButton(EGG::Heap* heap, int arg) : FaderSceneBase(heap), ::gui::EventHandler() {
mQueueCapacity = 64;
mQueueCount = 0;
mQueueRead = 0;
mQueueWrite = 0;
unk_0x264 = 64;
unk_0x268 = 0;
unk_0x26C = 0;
unk_0x270 = 0;
mSettingArg = arg;
mpLayout = NULL;
mpLayoutFile = NULL;
@@ -81,9 +81,9 @@ namespace ipl {
FaderSceneCommand SettingButton::calcNormal() {
if (!mpLayout->getAnim(ANIM_ALPHA_IN)->isPlaying() && !mpLayout->getAnim(ANIM_ALPHA_OUT)->isPlaying() &&
!mpLayout->getAnim(ANIM_BTN_FLASH)->isPlaying() && mQueueCount != 0) {
CmdEntry entry = mCmdQueue[mQueueRead];
switch (entry.command) {
!mpLayout->getAnim(ANIM_BTN_FLASH)->isPlaying() && unk_0x268 != 0) {
Unk unk = unk_0x64[unk_0x26C];
switch (unk.command) {
case CMD_SHOW_BTN: {
showBtn();
break;
@@ -93,16 +93,16 @@ namespace ipl {
break;
}
case CMD_SET_TEXT: {
setText(entry.msgID);
setText(unk.msgID);
break;
}
}
if (mQueueCount != 0) {
if (++mQueueRead >= mQueueCapacity) {
mQueueRead = 0;
if (unk_0x268 != 0) {
if (++unk_0x26C >= unk_0x264) {
unk_0x26C = 0;
}
mQueueCount--;
unk_0x268--;
}
}
@@ -225,16 +225,16 @@ namespace ipl {
}
void SettingButton::reserve(int command, u32 msgId) {
if (mQueueCapacity != mQueueCount) {
int writeIdx = mQueueWrite;
mCmdQueue[writeIdx].command = command;
mCmdQueue[writeIdx].msgID = msgId;
mQueueWrite++;
if (unk_0x264 != unk_0x268) {
int unk = unk_0x270;
unk_0x64[unk].command = command;
unk_0x64[unk].msgID = msgId;
unk_0x270++;
if (mQueueWrite >= mQueueCapacity) {
mQueueWrite = 0;
if (unk_0x270 >= unk_0x264) {
unk_0x270 = 0;
}
mQueueCount++;
unk_0x268++;
}
}

View File

@@ -14,7 +14,7 @@
namespace ipl {
namespace bs2 {
Manager::Manager(EGG::Heap* pHeap)
: mIPLState(IPL_STATE_NO_DISK), mState(BS2_STT_NO_DISK), mbTickEnabled(true), mbUpdateRequested(false), mbAbortRequested(false), mbRestartRequested(false),
: mIPLState(IPL_STATE_NO_DISK), mState(BS2_STT_NO_DISK), unk_0x0C(true), unk_0x0D(false), unk_0x0E(false), unk_0x0F(false),
mbIsDiagDisc(false), mbIncludesSeatTitles(false), mbHasBanner(FALSE), mUnlockedState(BS2_STT_NO_DISK), mbStartUpdate(false),
mEntries(NULL), mEntrySize(1), mEntryOffset(0) {
mpBannerBuffer = new (pHeap, DEFAULT_ALIGN) u8[BS2_DEFAULT_BANNER_SIZE];
@@ -30,13 +30,13 @@ namespace ipl {
return mIPLState;
}
if (mbRestartRequested && !System::isNandFull()) {
if (unk_0x0F && !System::isNandFull()) {
BS2RestartStateMachine();
mbTickEnabled = true;
unk_0x0C = true;
mIPLState = IPL_STATE_NO_DISK;
mbRestartRequested = false;
} else if (mbTickEnabled) {
unk_0x0F = false;
} else if (unk_0x0C) {
BOOL old = OSDisableInterrupts();
mState = BS2Tick();
@@ -51,7 +51,7 @@ namespace ipl {
if (mbIsDiagDisc && System::isRsrcLoaded()) {
__WPADReconnect(TRUE);
mbTickEnabled = false;
unk_0x0C = false;
bootNewSystem();
}
}
@@ -65,7 +65,7 @@ namespace ipl {
}
void Manager::startUpdate() {
mbUpdateRequested = true;
unk_0x0D = true;
mbStartUpdate = true;
mPrevEntry = 0;
mPrevFound = 0;
@@ -88,11 +88,11 @@ namespace ipl {
}
void Manager::reserveRVLGame() {
mbTickEnabled = false;
unk_0x0C = false;
}
void Manager::reserveGCGame() {
mbTickEnabled = false;
unk_0x0C = false;
}
void Manager::startRVLGame() {
@@ -103,13 +103,13 @@ namespace ipl {
}
void Manager::abort() {
mbAbortRequested = true;
mbRestartRequested = false;
unk_0x0E = true;
unk_0x0F = false;
}
void Manager::restart() {
mbAbortRequested = false;
mbRestartRequested = true;
unk_0x0E = false;
unk_0x0F = true;
System::checkNandOverFlowFlagAsync();
}
@@ -195,7 +195,7 @@ namespace ipl {
break;
}
case BS2_STT_64: {
mbTickEnabled = false;
unk_0x0C = false;
mIPLState = IPL_STATE_8;
break;
}
@@ -216,25 +216,25 @@ namespace ipl {
}
void Manager::execTick(BS2State state) {
if (mbUpdateRequested) {
if (unk_0x0D) {
if (state == BS2_STT_UPDATE_DISK) {
BS2StartUpdate();
} else {
mbStartUpdate = false;
}
} else if (mbAbortRequested) {
} else if (unk_0x0E) {
if (state == BS2_STT_NO_DISK || state == BS2_STT_COVER_OPEN || state == BS2_STT_55 || state == BS2_STT_WRONG_DISK ||
state == BS2_STT_66 || state == BS2_STT_67 || state == BS2_STT_68 || state == BS2_STT_FATAL_ERROR ||
state == BS2_STT_UPDATE_FAILED || state == BS2_STT_DIRTY_DISK) {
mbTickEnabled = false;
unk_0x0C = false;
mIPLState = IPL_STATE_8;
} else {
BS2AbortStateMachine();
}
}
mbUpdateRequested = false;
mbAbortRequested = false;
unk_0x0D = false;
unk_0x0E = false;
}
void Manager::updateTick() {

View File

@@ -43,13 +43,13 @@ namespace ipl {
mMessageID = msgId;
// Debug related? (seems to be incomplete; unused)
mArg2 = arg2;
mArg3 = arg3;
unk_0x0C = arg2;
unk_0x10 = arg3;
if (arg1) {
strncpy(mArg1, arg1, sizeof(mArg1));
mArg1[sizeof(mArg1) - 1] = 0;
strncpy(unk_0x14, arg1, sizeof(unk_0x14));
unk_0x14[sizeof(unk_0x14) - 1] = 0;
} else {
memset(mArg1, 0, sizeof(mArg1));
memset(unk_0x14, 0, sizeof(unk_0x14));
}
curThread = OSGetCurrentThread();

View File

@@ -47,7 +47,7 @@ namespace ipl {
(((mLastError > NWC24_ERR_FILE_OPEN || mLastError < NWC24_ERR_FILE_OTHER) && mLastError != NWC24_ERR_NAND_CORRUPT) && \
(mLastError != NWC24_ERR_FILE_EXISTS && mLastError != NWC24_ERR_INTERNAL_VF && mLastError != NWC24_ERR_FILE_BROKEN))
Manager::Manager(EGG::Heap* heap) : mbReviecedMsg(false), mbReceiving(false), mbReceivePaused(false), mbNewTitleTblReady(false) {
Manager::Manager(EGG::Heap* heap) : mbReviecedMsg(false), unk_0xA31(false), mbReceivePaused(false), unk_0xA33(false) {
OSInitMutex(&mLock);
OSInitMutex(&mAutoLock);
@@ -526,7 +526,7 @@ namespace ipl {
return;
}
mbReceiving = true;
unk_0xA31 = true;
NWC24UserId myUserId;
getMyUserId(&myUserId);
@@ -910,8 +910,8 @@ namespace ipl {
close();
mbNewTitleTblReady = true;
mbReceiving = false;
unk_0xA33 = true;
unk_0xA31 = false;
}
void Manager::addDlTask() {
@@ -996,7 +996,7 @@ namespace ipl {
}
BOOL Manager::getNewTitleTbl(u32* titleTbl) const {
if (!mbNewTitleTblReady) {
if (!unk_0xA33) {
return FALSE;
}

View File

@@ -61,7 +61,7 @@ namespace ipl {
if (System::getPostmanManager()->IsUnknown() ||
(System::getSceneManager() != NULL && System::getScene(SCENE_ADDRESS) != NULL)) {
if (System::getNwc24Manager() != NULL && !System::isNandFull()) {
if (System::createdAfterAndLibMgr() && !System::getNwc24Manager()->isReceivingIdle()) {
if (System::createdAfterAndLibMgr() && !System::getNwc24Manager()->isUnk0xA31()) {
return;
}
}

View File

@@ -3939,924 +3939,3 @@ Zi8PrepareMatch 96.319145%: target component branch stores a local flag absent i
Changed files: libs/RevoEX/src/nwc24/NWC24MsgCommit.c; libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8.c; tools/decomp-assist/fz15.attempts.md. Exact source commits: 36ff398b and e4b0d291. Final log-only commit follows this audit.
Uncertainty: original source forms for converter shared-base preservation, keyboard allocator/LED loop behavior, and the zprepare component branch remain unresolved. No unsupported volatile declaration or dummy component flag added. zprepare data remains 8/68 because the unpaired compiler table points into nonexact code, with no legitimate stable source-name rename or extent correction.
# Xhigh continuation fz15h
Starting fresh branch agent/w1002/sol-fz15h-xhigh from 0d9b03878228a086954abc59b964164b0f7db5f2. Read AGENTS.md and unslop. Six units owned; NWC18/18 is landed and outside this round.
Initial pool libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8: POOL IDENTICAL up to 0 (mine=0 base=0)
Initial pool libs/RVL_SDK/src/kbd/kbd_lib: POOL IDENTICAL up to 0 (mine=0 base=0)
Initial pool libs/RVLMiddleware/eZiText/src/clib/zprepare: POOL IDENTICAL up to 0 (mine=0 base=0)
Initial pool libs/RVLMiddleware/eZiText/src/clib/zi8match: POOL IDENTICAL up to 0 (mine=0 base=0)
Initial pool src/keyboard/tiCellPhone: POOL IDENTICAL up to 76 (mine=76 base=76)
Initial pool libs/RVL_SDK/src/nup/nup: POOL IDENTICAL up to 28 (mine=28 base=28)
## fz15h TMCJPEGDEC_set_converterY8U8V8 diagnosis
Origin body unchanged after fetch. 195/196 instructions; structural/exact (41, 195); first differences [(1, ('stw', 'r31, 0xc(r1)'), ('addi', 'r4, r3, 0x1858')), (2, ('lbz', 'r0, 0x17fc(r3)'), ('stw', 'r31, 0xc(r1)')), (3, ('lwz', 'r4, 0x19e4(r3)'), ('lbz', 'r0, 0x17fc(r3)')), (4, ('cmpwi', 'r0, 3'), ('lwz', 'r5, 0x19e4(r3)')), (5, ('beq', '324'), ('cmpwi', 'r0, 3')), (6, ('bge', '28'), ('beq', '324'))].
src 0x30c base 0x310 insns 195/196
--- insert mine 1:1 base 1:2
B 1 addi r4, r3, 0x1858
--- replace mine 3:4 base 4:5
M 3 lwz r4, 0x19e4(r3)
B 4 lwz r5, 0x19e4(r3)
--- replace mine 18:19 base 19:108
M 18 addi r11, r3, 0x185c
B 19 addi r11, r4, 4
B 20 lis r31, 0
B 21 lis r12, 0
B 22 add r10, r11, r0
B 23 addi r7, r4, 0x104
B 24 add r9, r10, r0
B 25 addi r6, r4, 0x144
B 26 add r8, r9, r0
B 27 addi r31, r31, 0
B 28 addi r12, r12, 0
B 29 li r4, 0x20
B 30 li r0, 0
Remaining instruction differences omitted here; full target/source disassembly and ctxdiff saved under /tmp/fz15h-<symbol>*.
## fz15h kbdEventHandler diagnosis
Origin body unchanged after fetch. 186/186 instructions; structural/exact (0, 5); first differences [(35, ('lbz', 'r3, 2(r4)'), ('lbz', 'r5, 2(r4)')), (36, ('lis', 'r30, 0'), ('lis', 'r3, 0')), (38, ('addi', 'r0, r3, 0xff'), ('addi', 'r0, r5, 0xff')), (39, ('addi', 'r30, r30, 0'), ('addi', 'r3, r3, 0')), (42, ('add', 'r30, r30, r4'), ('add', 'r30, r3, r4'))].
src 0x2e8 base 0x2e8 insns 186/186
diffs 5: [35, 36, 38, 39, 42]
35 M lbz r3, 2(r4)
B lbz r5, 2(r4)
36 M lis r30, 0
B lis r3, 0
38 M addi r0, r3, 0xff
B addi r0, r5, 0xff
39 M addi r30, r30, 0
B addi r3, r3, 0
42 M add r30, r30, r4
B add r30, r3, r4
## fz15h kbdProcMod diagnosis
Origin body unchanged after fetch. 256/256 instructions; structural/exact (0, 4); first differences [(245, ('add', 'r5, r4, r31'), ('add', 'r4, r4, r31')), (246, ('lwz', 'r4, 0x220(r5)'), ('lwz', 'r5, 0x220(r4)')), (247, ('rlwimi', 'r0, r4, 0, 0x1a, 0x1f'), ('rlwimi', 'r0, r5, 0, 0x1a, 0x1f')), (248, ('stw', 'r0, 0x220(r5)'), ('stw', 'r0, 0x220(r4)'))].
src 0x400 base 0x400 insns 256/256
diffs 4: [245, 246, 247, 248]
245 M add r5, r4, r31
B add r4, r4, r31
246 M lwz r4, 0x220(r5)
B lwz r5, 0x220(r4)
247 M rlwimi r0, r4, 0, 0x1a, 0x1f
B rlwimi r0, r5, 0, 0x1a, 0x1f
248 M stw r0, 0x220(r5)
B stw r0, 0x220(r4)
## fz15h kbd_led_handler diagnosis
Origin body unchanged after fetch. 24/25 instructions; structural/exact (13, 21); first differences [(1, ('slwi', 'r8, r4, 3'), ('lis', 'r6, 0')), (2, ('addi', 'r5, r5, 0'), ('slwi', 'r0, r4, 3')), (3, ('lis', 'r7, 0'), ('li', 'r8, 0')), (4, ('lwzx', 'r0, r5, r8'), ('addi', 'r5, r5, 0')), (5, ('li', 'r6, 0'), ('slwi', 'r7, r4, 5')), (6, ('slwi', 'r4, r4, 5'), ('lwzx', 'r0, r5, r0'))].
src 0x60 base 0x64 insns 24/25
--- replace mine 1:2 base 1:4
M 1 slwi r8, r4, 3
B 1 lis r6, 0
B 2 slwi r0, r4, 3
B 3 li r8, 0
--- replace mine 3:10 base 5:10
M 3 lis r7, 0
M 4 lwzx r0, r5, r8
M 5 li r6, 0
M 6 slwi r4, r4, 5
M 7 addi r7, r7, 0
M 8 cmplw r0, r6
M 9 stwx r6, r7, r4
B 5 slwi r7, r4, 5
B 6 lwzx r0, r5, r0
B 7 addi r6, r6, 0
B 8 stwx r8, r6, r7
B 9 cmplw r0, r8
--- replace mine 12:13 base 12:15
Remaining instruction differences omitted here; full target/source disassembly and ctxdiff saved under /tmp/fz15h-<symbol>*.
## fz15h KBDSetLedsAsync diagnosis
Origin body unchanged after fetch. 80/81 instructions; structural/exact (14, 70); first differences [(7, ('mr', 'r26, r5'), ('mr', 'r26, r3')), (8, ('mr', 'r27, r6'), ('mr', 'r27, r5')), (10, ('addi', 'r31, r31, 0'), ('mr', 'r28, r6')), (11, ('bne', '12'), ('addi', 'r31, r31, 0')), (12, ('li', 'r3, 2'), ('bne', '12')), (13, ('b', '244'), ('li', 'r3, 2'))].
src 0x140 base 0x144 insns 80/81
--- replace mine 7:9 base 7:9
M 7 mr r26, r5
M 8 mr r27, r6
B 7 mr r26, r3
B 8 mr r27, r5
--- insert mine 10:10 base 10:11
B 10 mr r28, r6
--- replace mine 18:19 base 19:20
M 18 mulli r30, r3, 0x268
B 19 mulli r3, r3, 0x268
--- replace mine 20:21 base 21:22
M 20 add r3, r0, r30
B 21 add r3, r0, r3
--- replace mine 28:29 base 29:30
M 28 clrlwi r28, r4, 0x18
B 29 clrlwi r30, r4, 0x18
--- replace mine 31:32 base 32:33
M 31 addi r4, r31, 0x400
B 32 addi r6, r31, 0x400
Remaining instruction differences omitted here; full target/source disassembly and ctxdiff saved under /tmp/fz15h-<symbol>*.
## fz15h KBDSetLeds diagnosis
Origin body unchanged after fetch. 75/79 instructions; structural/exact (19, 75); first differences [(4, ('stw', 'r30, 0x18(r1)'), ('mr', 'r31, r3')), (5, ('stw', 'r29, 0x14(r1)'), ('stw', 'r30, 0x18(r1)')), (6, ('lwz', 'r0, 0(0)'), ('stw', 'r29, 0x14(r1)')), (7, ('cmpwi', 'r0, 0'), ('lwz', 'r0, 0(0)')), (8, ('bne', '12'), ('cmpwi', 'r0, 0')), (9, ('li', 'r3, 2'), ('bne', '12'))].
src 0x12c base 0x13c insns 75/79
--- insert mine 4:4 base 4:5
B 4 mr r31, r3
--- replace mine 10:11 base 11:12
M 10 b 232
B 11 b 244
--- replace mine 14:16 base 15:17
M 14 b 216
M 15 mulli r30, r3, 0x268
B 15 b 228
B 16 mulli r0, r3, 0x268
--- replace mine 18:19 base 19:20
M 18 add r3, r3, r30
B 19 add r3, r3, r0
--- replace mine 25:27 base 26:28
M 25 b 172
M 26 clrlwi r31, r4, 0x18
B 26 b 184
B 27 clrlwi r30, r4, 0x18
--- replace mine 28:29 base 29:30
Remaining instruction differences omitted here; full target/source disassembly and ctxdiff saved under /tmp/fz15h-<symbol>*.
## fz15h KBDSetModState diagnosis
Origin body unchanged after fetch. 42/42 instructions; structural/exact (0, 4); first differences [(30, ('add', 'r5, r5, r4'), ('add', 'r4, r5, r4')), (31, ('lwz', 'r4, 0x220(r5)'), ('lwz', 'r5, 0x220(r4)')), (32, ('rlwimi', 'r0, r4, 0, 0x1a, 0x1f'), ('rlwimi', 'r0, r5, 0, 0x1a, 0x1f')), (33, ('stw', 'r0, 0x220(r5)'), ('stw', 'r0, 0x220(r4)'))].
src 0xa8 base 0xa8 insns 42/42
diffs 4: [30, 31, 32, 33]
30 M add r5, r5, r4
B add r4, r5, r4
31 M lwz r4, 0x220(r5)
B lwz r5, 0x220(r4)
32 M rlwimi r0, r4, 0, 0x1a, 0x1f
B rlwimi r0, r5, 0, 0x1a, 0x1f
33 M stw r0, 0x220(r5)
B stw r0, 0x220(r4)
## fz15h Zi8PrepareMatch diagnosis
Origin body unchanged after fetch. 939/940 instructions; structural/exact (36, 889); first differences [(11, ('li', 'r3, 0x20'), ('li', 'r0, 0x20')), (12, ('stb', 'r3, 0xb(r1)'), ('stb', 'r0, 0xb(r1)')), (17, ('li', 'r28, 0'), ('li', 'r0, 0')), (18, ('li', 'r3, 0'), ('stb', 'r0, 0xf(r1)')), (19, ('stb', 'r3, 0xd(r1)'), ('li', 'r28, 0')), (20, ('lbz', 'r0, 0xc(r30)'), ('li', 'r3, 0'))].
src 0xeac base 0xeb0 insns 939/940
--- replace mine 11:13 base 11:13
M 11 li r3, 0x20
M 12 stb r3, 0xb(r1)
B 11 li r0, 0x20
B 12 stb r0, 0xb(r1)
--- insert mine 17:17 base 17:19
B 17 li r0, 0
B 18 stb r0, 0xf(r1)
--- replace mine 26:28 base 28:30
M 26 slwi r0, r0, 1
M 27 lhzx r0, r4, r0
B 28 slwi r3, r0, 1
B 29 lhzx r0, r4, r3
--- replace mine 30:33 base 32:35
M 30 lbz r3, 0xe(r1)
M 31 addi r0, r3, -1
M 32 stb r0, 0xe(r1)
B 32 lbz r4, 0xe(r1)
B 33 addi r3, r4, -1
Remaining instruction differences omitted here; full target/source disassembly and ctxdiff saved under /tmp/fz15h-<symbol>*.
## fz15h Zi8GetPyPhonetic diagnosis
Origin body unchanged after fetch. 718/718 instructions; structural/exact (0, 167); first differences [(7, ('mr', 'r25, r5'), ('mr', 'r26, r5')), (8, ('mr', 'r26, r6'), ('mr', 'r28, r6')), (9, ('mr', 'r31, r7'), ('mr', 'r25, r7')), (13, ('addi', 'r29, r1, 0x20'), ('addi', 'r30, r1, 0x20')), (19, ('stb', 'r0, 0(r31)'), ('stb', 'r0, 0(r25)')), (29, ('li', 'r28, 0'), ('li', 'r29, 0'))].
src 0xb38 base 0xb38 insns 718/718
diffs 167: [7, 8, 9, 13, 19, 29, 30, 32, 37, 42, 47, 58, 64, 71, 74, 83, 87, 93, 96, 97]
7 M mr r25, r5
B mr r26, r5
8 M mr r26, r6
B mr r28, r6
9 M mr r31, r7
B mr r25, r7
13 M addi r29, r1, 0x20
B addi r30, r1, 0x20
19 M stb r0, 0(r31)
B stb r0, 0(r25)
29 M li r28, 0
B li r29, 0
30 M stb r28, 0xf(r1)
B stb r29, 0xf(r1)
32 M clrlwi r4, r28, 0x18
B clrlwi r4, r29, 0x18
37 M clrlwi r3, r28, 0x18
B clrlwi r3, r29, 0x18
Remaining instruction differences omitted here; full target/source disassembly and ctxdiff saved under /tmp/fz15h-<symbol>*.
## fz15h Zi8GetPyFinal diagnosis
Origin body unchanged after fetch. 53/53 instructions; structural/exact (0, 8); first differences [(26, ('slwi', 'r6, r0, 3'), ('slwi', 'r7, r0, 3')), (27, ('lis', 'r7, 0'), ('lis', 'r6, 0')), (28, ('addi', 'r0, r7, 0'), ('addi', 'r0, r6, 0')), (29, ('add', 'r6, r0, r6'), ('add', 'r6, r0, r7')), (34, ('slwi', 'r6, r0, 3'), ('slwi', 'r7, r0, 3')), (35, ('lis', 'r7, 0'), ('lis', 'r6, 0'))].
src 0xd4 base 0xd4 insns 53/53
diffs 8: [26, 27, 28, 29, 34, 35, 36, 37]
26 M slwi r6, r0, 3
B slwi r7, r0, 3
27 M lis r7, 0
B lis r6, 0
28 M addi r0, r7, 0
B addi r0, r6, 0
29 M add r6, r0, r6
B add r6, r0, r7
34 M slwi r6, r0, 3
B slwi r7, r0, 3
35 M lis r7, 0
B lis r6, 0
36 M addi r0, r7, 0
B addi r0, r6, 0
37 M add r6, r0, r6
B add r6, r0, r7
## fz15h onKey__Q49textinput8keyboard13cellphonetype4BaseFUlPv diagnosis
Origin body unchanged after fetch. 682/682 instructions; structural/exact (0, 37); first differences [(13, ('lwz', 'r27, 0(r5)'), ('lwz', 'r26, 0(r5)')), (15, ('lbz', 'r28, 4(r5)'), ('lbz', 'r27, 4(r5)')), (19, ('mr', 'r4, r27'), ('mr', 'r4, r26')), (20, ('mulli', 'r22, r0, 0x18'), ('mulli', 'r19, r0, 0x18')), (21, ('add', 'r3, r20, r22'), ('add', 'r3, r20, r19')), (25, ('add', 'r3, r20, r22'), ('add', 'r3, r20, r19'))].
src 0xaa8 base 0xaa8 insns 682/682
diffs 37: [13, 15, 19, 20, 21, 25, 146, 148, 149, 150, 154, 160, 180, 377, 384, 386, 387, 391, 452, 454]
13 M lwz r27, 0(r5)
B lwz r26, 0(r5)
15 M lbz r28, 4(r5)
B lbz r27, 4(r5)
19 M mr r4, r27
B mr r4, r26
20 M mulli r22, r0, 0x18
B mulli r19, r0, 0x18
21 M add r3, r20, r22
B add r3, r20, r19
25 M add r3, r20, r22
B add r3, r20, r19
146 M lwz r18, 0(r3)
B lwz r21, 0(r3)
148 M mr r4, r27
B mr r4, r26
149 M mulli r21, r0, 0x34
B mulli r19, r0, 0x34
Remaining instruction differences omitted here; full target/source disassembly and ctxdiff saved under /tmp/fz15h-<symbol>*.
## fz15h create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator diagnosis
Origin body unchanged after fetch. 333/333 instructions; structural/exact (0, 7); first differences [(219, ('add', 'r16, r19, r0'), ('add', 'r18, r19, r0')), (220, ('lwz', 'r17, 0x14(r16)'), ('lwz', 'r17, 0x14(r18)')), (223, ('mulli', 'r18, r0, 0x44'), ('mulli', 'r16, r0, 0x44')), (228, ('add', 'r5, r31, r18'), ('add', 'r5, r31, r16')), (247, ('lwzx', 'r5, r31, r18'), ('lwzx', 'r5, r31, r16')), (249, ('lwz', 'r7, 0x14(r16)'), ('lwz', 'r7, 0x14(r18)'))].
src 0x534 base 0x534 insns 333/333
diffs 7: [219, 220, 223, 228, 247, 249, 255]
219 M add r16, r19, r0
B add r18, r19, r0
220 M lwz r17, 0x14(r16)
B lwz r17, 0x14(r18)
223 M mulli r18, r0, 0x44
B mulli r16, r0, 0x44
228 M add r5, r31, r18
B add r5, r31, r16
247 M lwzx r5, r31, r18
B lwzx r5, r31, r16
249 M lwz r7, 0x14(r16)
B lwz r7, 0x14(r18)
255 M lwzx r5, r31, r18
B lwzx r5, r31, r16
## fz15h init__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFv diagnosis
Origin body unchanged after fetch. 536/536 instructions; structural/exact (0, 155); first differences [(5, ('li', 'r29, 0'), ('li', 'r26, 0')), (7, ('stw', 'r29, 0x14(r3)'), ('stw', 'r26, 0x14(r3)')), (9, ('mr', 'r30, r3'), ('mr', 'r27, r3')), (10, ('stw', 'r29, 0x18(r3)'), ('stw', 'r26, 0x18(r3)')), (12, ('stw', 'r29, 0x24(r3)'), ('stw', 'r26, 0x24(r3)')), (13, ('stb', 'r29, 0x1c(r3)'), ('stb', 'r26, 0x1c(r3)'))].
src 0x860 base 0x860 insns 536/536
diffs 155: [5, 7, 9, 10, 12, 13, 14, 15, 18, 25, 29, 31, 32, 33, 34, 38, 39, 49, 50, 60]
5 M li r29, 0
B li r26, 0
7 M stw r29, 0x14(r3)
B stw r26, 0x14(r3)
9 M mr r30, r3
B mr r27, r3
10 M stw r29, 0x18(r3)
B stw r26, 0x18(r3)
12 M stw r29, 0x24(r3)
B stw r26, 0x24(r3)
13 M stb r29, 0x1c(r3)
B stb r26, 0x1c(r3)
14 M stb r29, 0x1e(r3)
B stb r26, 0x1e(r3)
15 M stb r29, 0x1d(r3)
B stb r26, 0x1d(r3)
18 M stb r29, 0x21(r3)
B stb r26, 0x21(r3)
Remaining instruction differences omitted here; full target/source disassembly and ctxdiff saved under /tmp/fz15h-<symbol>*.
## fz15h __nupParseServerInfo__FP14NUPContextInfoPcPcUx diagnosis
Origin body unchanged after fetch. 452/452 instructions; structural/exact (0, 148); first differences [(13, ('addi', 'r24, r28, 0x90'), ('addi', 'r25, r28, 0x90')), (14, ('addi', 'r25, r28, 0x9c'), ('addi', 'r22, r28, 0x9c')), (15, ('li', 'r27, 0'), ('li', 'r23, 0')), (18, ('mr', 'r4, r25'), ('mr', 'r4, r22')), (21, ('mr', 'r23, r3'), ('mr', 'r24, r3')), (23, ('mr', 'r4, r24'), ('mr', 'r4, r25'))].
src 0x710 base 0x710 insns 452/452
diffs 148: [13, 14, 15, 18, 21, 23, 26, 30, 32, 33, 34, 36, 41, 43, 44, 49, 52, 53, 56, 59]
13 M addi r24, r28, 0x90
B addi r25, r28, 0x90
14 M addi r25, r28, 0x9c
B addi r22, r28, 0x9c
15 M li r27, 0
B li r23, 0
18 M mr r4, r25
B mr r4, r22
21 M mr r23, r3
B mr r24, r3
23 M mr r4, r24
B mr r4, r25
26 M mr r22, r3
B mr r26, r3
30 M mr r3, r25
B mr r3, r22
32 M add r29, r23, r3
B add r24, r24, r3
Remaining instruction differences omitted here; full target/source disassembly and ctxdiff saved under /tmp/fz15h-<symbol>*.
## fz15h __nupBase64Encode__FPUcPUcUl diagnosis
Origin body unchanged after fetch. 63/63 instructions; structural/exact (9, 21); first differences [(5, ('li', 'r10, 0'), ('li', 'r7, 0')), (9, ('addi', 'r10, r10, 1'), ('addi', 'r7, r7, 1')), (11, ('cmplwi', 'r10, 3'), ('cmplwi', 'r7, 3')), (16, ('rlwinm', 'r5, r9, 0x14, 0x1a, 0x1f'), ('rlwinm', 'r0, r9, 0xe, 0x1a, 0x1f')), (17, ('rlwinm', 'r0, r9, 0xe, 0x1a, 0x1f'), ('rlwinm', 'r6, r9, 0x14, 0x1a, 0x1f')), (18, ('lbzx', 'r7, r8, r5'), ('lbzx', 'r7, r8, r0'))].
src 0xfc base 0xfc insns 63/63
diffs 21: [5, 9, 11, 16, 17, 18, 20, 21, 22, 23, 25, 31, 35, 38, 42, 44, 48, 52, 55, 58]
5 M li r10, 0
B li r7, 0
9 M addi r10, r10, 1
B addi r7, r7, 1
11 M cmplwi r10, 3
B cmplwi r7, 3
16 M rlwinm r5, r9, 0x14, 0x1a, 0x1f
B rlwinm r0, r9, 0xe, 0x1a, 0x1f
17 M rlwinm r0, r9, 0xe, 0x1a, 0x1f
B rlwinm r6, r9, 0x14, 0x1a, 0x1f
18 M lbzx r7, r8, r5
B lbzx r7, r8, r0
20 M lbzx r6, r8, r0
B clrlwi r0, r9, 0x1a
21 M clrlwi r0, r9, 0x1a
B lbzx r6, r8, r6
22 M li r10, 0
B stb r7, 0(r3)
Remaining instruction differences omitted here; full target/source disassembly and ctxdiff saved under /tmp/fz15h-<symbol>*.
## fz15h __nupGetBootVersion__FP14NUPContextInfoP14ESTitleVersion diagnosis
Origin body unchanged after fetch. 163/163 instructions; structural/exact (0, 17); first differences [(108, ('lwz', 'r9, 0x54(r30)'), ('lwz', 'r5, 0x54(r30)')), (110, ('cmplw', 'r9, r8'), ('cmplw', 'r5, r8')), (112, ('li', 'r10, 0'), ('li', 'r9, 0')), (114, ('cmpwi', 'r9, 0'), ('cmpwi', 'r5, 0')), (115, ('lwz', 'r3, 0x5c(r7)'), ('lwz', 'r10, 0x5c(r7)')), (122, ('li', 'r4, 0'), ('li', 'r3, 0'))].
src 0x28c base 0x28c insns 163/163
diffs 17: [108, 110, 112, 114, 115, 122, 123, 124, 125, 128, 130, 132, 134, 136, 141, 142, 144]
108 M lwz r9, 0x54(r30)
B lwz r5, 0x54(r30)
110 M cmplw r9, r8
B cmplw r5, r8
112 M li r10, 0
B li r9, 0
114 M cmpwi r9, 0
B cmpwi r5, 0
115 M lwz r3, 0x5c(r7)
B lwz r10, 0x5c(r7)
122 M li r4, 0
B li r3, 0
123 M li r5, 0
B li r4, 0
124 M mtctr r9
B mtctr r5
125 M cmplwi r9, 0
B cmplwi r5, 0
Remaining instruction differences omitted here; full target/source disassembly and ctxdiff saved under /tmp/fz15h-<symbol>*.
## fz15h __nupGetTitleSize__FP12NUPTitleInfo diagnosis
Origin body unchanged after fetch. 139/139 instructions; structural/exact (0, 22); first differences [(39, ('adde', 'r0, r5, r7'), ('adde', 'r5, r5, r7')), (40, ('addi', 'r5, r8, 5'), ('addi', 'r0, r8, 5')), (42, ('stw', 'r5, 0x20(r3)'), ('stw', 'r0, 0x20(r3)')), (43, ('adde', 'r0, r0, r7'), ('adde', 'r0, r5, r7')), (56, ('lwz', 'r30, 0x54(r3)'), ('lwz', 'r28, 0x54(r3)')), (57, ('add', 'r27, r12, r8'), ('add', 'r26, r12, r8'))].
src 0x22c base 0x22c insns 139/139
diffs 22: [39, 40, 42, 43, 56, 57, 58, 59, 61, 62, 67, 68, 69, 71, 74, 75, 78, 80, 90, 91]
39 M adde r0, r5, r7
B adde r5, r5, r7
40 M addi r5, r8, 5
B addi r0, r8, 5
42 M stw r5, 0x20(r3)
B stw r0, 0x20(r3)
43 M adde r0, r0, r7
B adde r0, r5, r7
56 M lwz r30, 0x54(r3)
B lwz r28, 0x54(r3)
57 M add r27, r12, r8
B add r26, r12, r8
58 M lwz r25, 0x5c(r27)
B lwz r25, 0x5c(r26)
59 M cmpwi r30, 0
B cmpwi r28, 0
61 M lwz r26, 0x58(r3)
B lwz r30, 0x58(r3)
Remaining instruction differences omitted here; full target/source disassembly and ctxdiff saved under /tmp/fz15h-<symbol>*.
Structural mapping TMCJPEGDEC_set_converterY8U8V8: frame 0x10. Missing instruction is shared convBuf base addi r4,work,0x1858 at index 1; compiler folds it into each case. Extents checked separately; no immediate reload proving volatile. Test switch helper boundary and logical converter metadata before register search.
## fz15h TMCJPEGDEC_set_converterY8U8V8 trials
Direct discriminator, promoted actual IDCT stride type, and complete selection helper boundary.
- TMCJPEGDEC_set_converterY8U8V8: direct: (41, 195) 195/196 instructions
- TMCJPEGDEC_set_converterY8U8V8: mode: (41, 195) 195/196 instructions
- TMCJPEGDEC_set_converterY8U8V8: helper: (99999, 99999) compile failed re_MCUtoY8U8V8.d ### mwcceppc.exe Compiler: # File: libs\RVLMiddleware\TMC_JPEG\src\texturecvtr\Texture_MCUtoY8U8V8.c # -------------------------------------------------------------------------- # 162: s32 selected = SelectPlanarConverter(work, buffer, componentCount); # Error: ^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
Structural mapping kbdEventHandler: frame 0x20, same 186 instructions. Index35 report status uses r3 rather than r5; table base uses r30 rather than r3. No branch or stack changes; preserve post-OSCancelAlarm report reread.
## fz15h kbdEventHandler trials
Input representation and classification expression ownership.
- kbdEventHandler: status local owns classification: (0, 5) 186/186 instructions first [(35, ('lbz', 'r3, 2(r4)'), ('lbz', 'r5, 2(r4)')), (36, ('lis', 'r30, 0'), ('lis', 'r3, 0')), (38, ('addi', 'r0, r3, 0xff'), ('addi', 'r0, r5, 0xff')), (39, ('addi', 'r30, r30, 0'), ('addi', 'r3, r3, 0')), (42, ('add', 'r30, r30, r4'), ('add', 'r30, r3, r4'))]
- kbdEventHandler: typed HID report owns first key and flags: (0, 5) 186/186 instructions first [(35, ('lbz', 'r3, 2(r4)'), ('lbz', 'r5, 2(r4)')), (36, ('lis', 'r30, 0'), ('lis', 'r3, 0')), (38, ('addi', 'r0, r3, 0xff'), ('addi', 'r0, r5, 0xff')), (39, ('addi', 'r30, r30, 0'), ('addi', 'r3, r3, 0')), (42, ('add', 'r30, r30, r4'), ('add', 'r30, r3, r4'))]
- kbdEventHandler: readonly report and direct channel lvalue: (0, 6) 186/186 instructions first [(35, ('lbz', 'r3, 2(r4)'), ('lbz', 'r5, 2(r4)')), (36, ('lis', 'r4, 0'), ('lis', 'r3, 0')), (37, ('mulli', 'r5, r31, 0x268'), ('mulli', 'r4, r31, 0x268')), (38, ('addi', 'r0, r3, 0xff'), ('addi', 'r0, r5, 0xff')), (39, ('addi', 'r4, r4, 0'), ('addi', 'r3, r3, 0')), (42, ('add', 'r30, r4, r5'), ('add', 'r30, r3, r4'))]
Structural mapping kbdProcMod: modifier update at 245 has address/old-state r4/r5 swap. Frame 0x20; exact instruction count and physical bit layout. Test unsigned word representation and a logical field grouping before declaration order.
## fz15h kbdProcMod trials
State word and bitfield object boundaries.
- kbdProcMod: int: (0, 4) 256/256 instructions first [(245, ('add', 'r5, r4, r31'), ('add', 'r4, r4, r31')), (246, ('lwz', 'r4, 0x220(r5)'), ('lwz', 'r5, 0x220(r4)')), (247, ('rlwimi', 'r0, r4, 0, 0x1a, 0x1f'), ('rlwimi', 'r0, r5, 0, 0x1a, 0x1f')), (248, ('stw', 'r0, 0x220(r5)'), ('stw', 'r0, 0x220(r4)'))]
- kbdProcMod: logical: (0, 4) 256/256 instructions first [(245, ('add', 'r5, r4, r31'), ('add', 'r4, r4, r31')), (246, ('lwz', 'r4, 0x220(r5)'), ('lwz', 'r5, 0x220(r4)')), (247, ('rlwimi', 'r0, r4, 0, 0x1a, 0x1f'), ('rlwimi', 'r0, r5, 0, 0x1a, 0x1f')), (248, ('stw', 'r0, 0x220(r5)'), ('stw', 'r0, 0x220(r4)'))]
- kbdProcMod: readonly: (0, 4) 256/256 instructions first [(245, ('add', 'r5, r4, r31'), ('add', 'r4, r4, r31')), (246, ('lwz', 'r4, 0x220(r5)'), ('lwz', 'r5, 0x220(r4)')), (247, ('rlwimi', 'r0, r4, 0, 0x1a, 0x1f'), ('rlwimi', 'r0, r5, 0, 0x1a, 0x1f')), (248, ('stw', 'r0, 0x220(r5)'), ('stw', 'r0, 0x220(r4)'))]
Structural mapping KBDSetModState: modifier update at 30 has address/old-state r4/r5 swap. Frame 0x10; exact instruction count and physical bit layout. Test unsigned word representation and a logical field grouping before declaration order.
## fz15h KBDSetModState trials
State word and bitfield object boundaries.
- KBDSetModState: int: (0, 4) 42/42 instructions first [(30, ('add', 'r5, r5, r4'), ('add', 'r4, r5, r4')), (31, ('lwz', 'r4, 0x220(r5)'), ('lwz', 'r5, 0x220(r4)')), (32, ('rlwimi', 'r0, r4, 0, 0x1a, 0x1f'), ('rlwimi', 'r0, r5, 0, 0x1a, 0x1f')), (33, ('stw', 'r0, 0x220(r5)'), ('stw', 'r0, 0x220(r4)'))]
- KBDSetModState: logical: (0, 4) 42/42 instructions first [(30, ('add', 'r5, r5, r4'), ('add', 'r4, r5, r4')), (31, ('lwz', 'r4, 0x220(r5)'), ('lwz', 'r5, 0x220(r4)')), (32, ('rlwimi', 'r0, r4, 0, 0x1a, 0x1f'), ('rlwimi', 'r0, r5, 0, 0x1a, 0x1f')), (33, ('stw', 'r0, 0x220(r5)'), ('stw', 'r0, 0x220(r4)'))]
- KBDSetModState: readonly: (0, 7) 42/42 instructions first [(26, ('mulli', 'r5, r30, 0x268'), ('mulli', 'r4, r30, 0x268')), (27, ('lis', 'r4, 0'), ('lis', 'r5, 0')), (29, ('addi', 'r4, r4, 0'), ('addi', 'r5, r5, 0')), (30, ('add', 'r5, r4, r5'), ('add', 'r4, r5, r4')), (31, ('lwz', 'r4, 0x220(r5)'), ('lwz', 'r5, 0x220(r4)')), (32, ('rlwimi', 'r0, r4, 0, 0x1a, 0x1f'), ('rlwimi', 'r0, r5, 0, 0x1a, 0x1f'))]
Structural mapping kbd_led_handler: no frame, source24/target25. Target separates the completion index from the reservation index and tests success positively, retains final blr after tail callback. No volatile proof; test result type and callback view without dummy branches.
## fz15h kbd_led_handler trials
Callback argument rematerialization with real result type and branch forms.
- kbd_led_handler: BOOL: (5, 9) 25/25 instructions first [(1, ('lis', 'r7, 0'), ('lis', 'r6, 0')), (3, ('li', 'r6, 0'), ('li', 'r8, 0')), (5, ('slwi', 'r8, r4, 5'), ('slwi', 'r7, r4, 5')), (7, ('addi', 'r7, r7, 0'), ('addi', 'r6, r6, 0')), (8, ('stwx', 'r6, r7, r8'), ('stwx', 'r8, r6, r7')), (9, ('cmplw', 'r0, r6'), ('cmplw', 'r0, r8'))]
- kbd_led_handler: pointer: (5, 9) 25/25 instructions first [(1, ('lis', 'r7, 0'), ('lis', 'r6, 0')), (3, ('li', 'r6, 0'), ('li', 'r8, 0')), (5, ('slwi', 'r8, r4, 5'), ('slwi', 'r7, r4, 5')), (7, ('addi', 'r7, r7, 0'), ('addi', 'r6, r6, 0')), (8, ('stwx', 'r6, r7, r8'), ('stwx', 'r8, r6, r7')), (9, ('cmplw', 'r0, r6'), ('cmplw', 'r0, r8'))]
- kbd_led_handler: if: (30, 23) 23/25 instructions
Structural mapping KBDSetLedsAsync: target has channel scalar live through OSDisableInterrupts and indexed unsigned slot/byte offset CTR loop; source retains channel-stride product and pointer induction. Frame0x20. Test slot record lvalue and readonly helper input.
## fz15h KBDSetLedsAsync trials
Typed slot reservation direct loop, const pointer helper, and scalar helper.
- KBDSetLedsAsync: loop: (19, 72) 79/81 instructions
- KBDSetLedsAsync: constptr: (20, 44) 81/81 instructions
- KBDSetLedsAsync: value: (19, 73) 79/81 instructions
Structural mapping KBDSetLeds: target has channel scalar live through OSDisableInterrupts and indexed unsigned slot/byte offset CTR loop; source retains channel-stride product and pointer induction. Frame0x20. Test slot record lvalue and readonly helper input.
## fz15h KBDSetLeds trials
Typed slot reservation direct loop, const pointer helper, and scalar helper.
- KBDSetLeds: loop: (19, 68) 78/79 instructions
- KBDSetLeds: constptr: (48, 75) 82/79 instructions
- KBDSetLeds: value: (19, 69) 78/79 instructions
Structural mapping Zi8PrepareMatch: frame0x70, source939/target940. First context-mask zero uses different scratch register; target later stores component flag absent in source. No dummy flag or unsupported volatility. Tables/element index source boundaries can affect opt-off frame ownership.
## fz15h Zi8PrepareMatch trials
Readonly tables, explicit index progression, direct classifier boolean.
- Zi8PrepareMatch: tables: (36, 897) 938/940 instructions
- Zi8PrepareMatch: index: (39, 891) 938/940 instructions
- Zi8PrepareMatch: boolean: (36, 889) 939/940 instructions
Structural mapping Zi8GetPyPhonetic: frame0x250; 718/718 instructions. All differences are register choices, beginning saved output pointers and converted-buffer address. No stack-local layout or branch changes. Test readonly input argument, helper-like conversion-buffer scope, and scalar initialization ownership before declsearch.
## fz15h Zi8GetPyPhonetic trials
Actual input const qualification, initializer boundary, buffer pointer initialization, paired-output chain.
- Zi8GetPyPhonetic: const: (6, 646) 720/718 instructions
- Zi8GetPyPhonetic: initialize: (3, 181) 718/718 instructions
- Zi8GetPyPhonetic: buffer: (0, 167) 718/718 instructions
- Zi8GetPyPhonetic: chain: (2, 635) 717/718 instructions
Structural mapping Zi8GetPyFinal: frame0x10, 53/53 instructions. Only the two matched-row output reads allocate row stride r6/table base r7 versus target r7/r6. The matching loop itself is exact. Test readonly phonetic input, ordinary typed row view, and output load boundary.
## fz15h Zi8GetPyFinal trials
Const phonetic input and table row/byte lvalue boundaries. Table contents and symbol names unchanged.
- Zi8GetPyFinal: const: (0, 8) 53/53 instructions first [(26, ('slwi', 'r6, r0, 3'), ('slwi', 'r7, r0, 3')), (27, ('lis', 'r7, 0'), ('lis', 'r6, 0')), (28, ('addi', 'r0, r7, 0'), ('addi', 'r0, r6, 0')), (29, ('add', 'r6, r0, r6'), ('add', 'r6, r0, r7')), (34, ('slwi', 'r6, r0, 3'), ('slwi', 'r7, r0, 3')), (35, ('lis', 'r7, 0'), ('lis', 'r6, 0'))]
Structural mapping TMCJPEGDEC_set_converterY8U8V8: frame 0x10. Missing instruction is shared convBuf base addi r4,work,0x1858 at index 1; compiler folds it into each case. Extents checked separately; no immediate reload proving volatile. Test switch helper boundary and logical converter metadata before register search.
## fz15h TMCJPEGDEC_set_converterY8U8V8 trials
Direct discriminator, promoted actual IDCT stride type, and complete selection helper boundary.
- TMCJPEGDEC_set_converterY8U8V8: helper: (45, 198) 199/196 instructions
Correction: Zi8GetPyFinal table-row generator initially matched a nested if call rather than its definition. It performed no source mutation for the failed row-view candidate; exclude that rejected generator. Function-boundary parser now explicitly rejects control statements. All other function boundaries verified against their definition bodies.
Structural mapping Zi8GetPyFinal: frame0x10, 53/53 instructions. Only the two matched-row output reads allocate row stride r6/table base r7 versus target r7/r6. The matching loop itself is exact. Test readonly phonetic input, ordinary typed row view, and output load boundary.
## fz15h Zi8GetPyFinal trials
Const phonetic input and table row/byte lvalue boundaries. Table contents and symbol names unchanged.
- Zi8GetPyFinal: const: (0, 8) 53/53 instructions first [(26, ('slwi', 'r6, r0, 3'), ('slwi', 'r7, r0, 3')), (27, ('lis', 'r7, 0'), ('lis', 'r6, 0')), (28, ('addi', 'r0, r7, 0'), ('addi', 'r0, r6, 0')), (29, ('add', 'r6, r0, r6'), ('add', 'r6, r0, r7')), (34, ('slwi', 'r6, r0, 3'), ('slwi', 'r7, r0, 3')), (35, ('lis', 'r7, 0'), ('lis', 'r6, 0'))]
- Zi8GetPyFinal: rowview: (24, 57) 58/53 instructions
- Zi8GetPyFinal: commute: (0, 8) 53/53 instructions first [(26, ('slwi', 'r6, r0, 3'), ('slwi', 'r7, r0, 3')), (27, ('lis', 'r7, 0'), ('lis', 'r6, 0')), (28, ('addi', 'r0, r7, 0'), ('addi', 'r0, r6, 0')), (29, ('add', 'r6, r0, r6'), ('add', 'r6, r0, r7')), (34, ('slwi', 'r6, r0, 3'), ('slwi', 'r7, r0, 3')), (35, ('lis', 'r7, 0'), ('lis', 'r6, 0'))]
- Zi8GetPyFinal: snapshot: (18, 62) 63/53 instructions
## fz15h Zi8GetPyFinal trials
Output row address lowering: equivalent byte dereference, row dereference, promoted index types and const table array view; no new layout or objects.
- Zi8GetPyFinal: deref: (0, 8) 53/53 instructions first [(26, ('slwi', 'r6, r0, 3'), ('slwi', 'r7, r0, 3')), (27, ('lis', 'r7, 0'), ('lis', 'r6, 0')), (28, ('addi', 'r0, r7, 0'), ('addi', 'r0, r6, 0')), (29, ('add', 'r6, r0, r6'), ('add', 'r6, r0, r7')), (34, ('slwi', 'r6, r0, 3'), ('slwi', 'r7, r0, 3')), (35, ('lis', 'r7, 0'), ('lis', 'r6, 0'))]
- Zi8GetPyFinal: rowderef: (0, 8) 53/53 instructions first [(26, ('slwi', 'r6, r0, 3'), ('slwi', 'r7, r0, 3')), (27, ('lis', 'r7, 0'), ('lis', 'r6, 0')), (28, ('addi', 'r0, r7, 0'), ('addi', 'r0, r6, 0')), (29, ('add', 'r6, r0, r6'), ('add', 'r6, r0, r7')), (34, ('slwi', 'r6, r0, 3'), ('slwi', 'r7, r0, 3')), (35, ('lis', 'r7, 0'), ('lis', 'r6, 0'))]
- Zi8GetPyFinal: u32: (0, 8) 53/53 instructions first [(26, ('slwi', 'r6, r0, 3'), ('slwi', 'r7, r0, 3')), (27, ('lis', 'r7, 0'), ('lis', 'r6, 0')), (28, ('addi', 'r0, r7, 0'), ('addi', 'r0, r6, 0')), (29, ('add', 'r6, r0, r6'), ('add', 'r6, r0, r7')), (34, ('slwi', 'r6, r0, 3'), ('slwi', 'r7, r0, 3')), (35, ('lis', 'r7, 0'), ('lis', 'r6, 0'))]
- Zi8GetPyFinal: u16: (5, 31) 55/53 instructions
- Zi8GetPyFinal: int: (0, 8) 53/53 instructions first [(26, ('slwi', 'r6, r0, 3'), ('slwi', 'r7, r0, 3')), (27, ('lis', 'r7, 0'), ('lis', 'r6, 0')), (28, ('addi', 'r0, r7, 0'), ('addi', 'r0, r6, 0')), (29, ('add', 'r6, r0, r6'), ('add', 'r6, r0, r7')), (34, ('slwi', 'r6, r0, 3'), ('slwi', 'r7, r0, 3')), (35, ('lis', 'r7, 0'), ('lis', 'r6, 0'))]
- Zi8GetPyFinal: baseview: (0, 8) 53/53 instructions first [(26, ('slwi', 'r6, r0, 3'), ('slwi', 'r7, r0, 3')), (27, ('lis', 'r7, 0'), ('lis', 'r6, 0')), (28, ('addi', 'r0, r7, 0'), ('addi', 'r0, r6, 0')), (29, ('add', 'r6, r0, r6'), ('add', 'r6, r0, r7')), (34, ('slwi', 'r6, r0, 3'), ('slwi', 'r7, r0, 3')), (35, ('lis', 'r7, 0'), ('lis', 'r6, 0'))]
Structural mapping Base::onKey: frame0x80,682/682 instructions. First difference is pane-name input pointer r27 versus r26 at13, then state r28 versus r27. Remaining differences are in inlined table search bases/offsets, with identical ConfirmInput field offsets. Input event is only read, so test const view, ordinary input snapshots and helper boundaries.
## fz15h onKey__Q49textinput8keyboard13cellphonetype4BaseFUlPv trials
Readonly event field view, shared event pointer, event value snapshot, ordinary command clearing.
- onKey__Q49textinput8keyboard13cellphonetype4BaseFUlPv: const: (0, 37) 682/682 instructions
- onKey__Q49textinput8keyboard13cellphonetype4BaseFUlPv: named: (0, 37) 682/682 instructions
- onKey__Q49textinput8keyboard13cellphonetype4BaseFUlPv: local: (48, 672) 685/682 instructions
- onKey__Q49textinput8keyboard13cellphonetype4BaseFUlPv: commands: (25, 327) 683/682 instructions
Structural mapping LayoutByNW4R::create: same0x60 frame,333 instructions. First219 is toggle table entry add using r16 rather than r18, and animation-file stride uses r18 rather than r16. Normal-key loop and calls exact. Test toggle readonly entry representation and loaded-key helper boundary.
## fz15h create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator trials
Toggle metadata pointer versus reference/value; use indexed key directly or define read at branch.
- create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator: pointer: (0, 7) 333/333 instructions first [(219, ('add', 'r16, r19, r0'), ('add', 'r18, r19, r0')), (220, ('lwz', 'r17, 0x14(r16)'), ('lwz', 'r17, 0x14(r18)')), (223, ('mulli', 'r18, r0, 0x44'), ('mulli', 'r16, r0, 0x44')), (228, ('add', 'r5, r31, r18'), ('add', 'r5, r31, r16')), (247, ('lwzx', 'r5, r31, r18'), ('lwzx', 'r5, r31, r16')), (249, ('lwz', 'r7, 0x14(r16)'), ('lwz', 'r7, 0x14(r18)'))]
- create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator: direct: (0, 12) 333/333 instructions first [(117, ('add', 'r18, r23, r0'), ('add', 'r17, r23, r0')), (118, ('lwz', 'r17, 0x14(r18)'), ('lwz', 'r18, 0x14(r17)')), (142, ('cmpwi', 'r17, 0'), ('cmpwi', 'r18, 0')), (147, ('lwz', 'r7, 0x14(r18)'), ('lwz', 'r7, 0x14(r17)')), (219, ('add', 'r17, r19, r0'), ('add', 'r18, r19, r0')), (220, ('lwz', 'r16, 0x14(r17)'), ('lwz', 'r17, 0x14(r18)'))]
- create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator: loadlate: (6, 113) 332/333 instructions
- create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator: snapshot: (19, 243) 344/333 instructions
Structural mapping LayoutByNW4R::init: same0x50 frame and536 instructions. First zero/this callee-saved allocation at5/9, reused across inline Base::init, animation/visible helpers; no branch or instruction-order differences. Scope the actual pane-name scratch and readonly layout metadata before final declarations.
## fz15h init__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFv trials
Unsigned loop index, scratch array lifetime, const layout view and toggle entry reference.
- init__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFv: u32loop: (1, 155) 536/536 instructions
- init__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFv: outerbuffer: (0, 155) 536/536 instructions
- init__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFv: keyview: (4, 405) 534/536 instructions
- init__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFv: rowref: (0, 155) 536/536 instructions
Structural mapping __nupParseServerInfo: frame0x50,452/452 instructions. First13/14 inline tag literal pointers and result zero use different callee-saved registers; most remaining differences track the same tag helper start/end/length temporaries. Test helper const input and expression boundaries; string tokens kept in original source order.
## fz15h __nupParseServerInfo__FP14NUPContextInfoPcPcUx trials
Readonly response parameter in helper, named strlen result and pointer difference, ABI-compatible result/count types, helper declarations last.
- __nupParseServerInfo__FP14NUPContextInfoPcPcUx: const: (0, 148) 452/452 instructions
- __nupParseServerInfo__FP14NUPContextInfoPcPcUx: direct: (0, 148) 452/452 instructions
- __nupParseServerInfo__FP14NUPContextInfoPcPcUx: ints: (0, 148) 452/452 instructions
- __nupParseServerInfo__FP14NUPContextInfoPcPcUx: helperlocals: (0, 148) 452/452 instructions
Structural mapping __nupBase64Encode: no frame,63/63 instructions. First count usesr10 insteadr7; source defines second output byte before first, target computes first index then second, with loads and stores interleaved. Test actual output expressions and byte accumulation, no string pool changes.
## fz15h __nupBase64Encode__FPUcPUcUl trials
Natural output stores, first-byte source order, readonly scan, nested accumulate expression, unsigned int word locals.
- __nupBase64Encode__FPUcPUcUl: direct: (8, 17) 63/63 instructions
- __nupBase64Encode__FPUcPUcUl: order: (9, 21) 63/63 instructions
- __nupBase64Encode__FPUcPUcUl: readonly: (8, 17) 63/63 instructions
- __nupBase64Encode__FPUcPUcUl: accumulate: (9, 23) 63/63 instructions
- __nupBase64Encode__FPUcPUcUl: int: (9, 21) 63/63 instructions
Structural mapping __nupGetBootVersion: frame0x20,163/163 instructions. First108 cached installed countr9 vsr5, content-loop indexr10 vsr9, inline content search saved IDr3 vsr10. Entire remaining mismatch lies in __nupHasInstalledContent inline boundary, no volatile reread evidence.
## fz15h __nupGetBootVersion__FP14NUPContextInfoP14ESTitleVersion trials
Readonly installed IDs, direct index lvalue in helper, C int loop/count and const title view.
- __nupGetBootVersion__FP14NUPContextInfoP14ESTitleVersion: helperconst: (0, 17) 163/163 instructions
- __nupGetBootVersion__FP14NUPContextInfoP14ESTitleVersion: helperexpr: (0, 17) 163/163 instructions
- __nupGetBootVersion__FP14NUPContextInfoP14ESTitleVersion: int: (0, 17) 163/163 instructions
- __nupGetBootVersion__FP14NUPContextInfoP14ESTitleVersion: view: (0, 17) 163/163 instructions
Structural mapping __nupGetTitleSize: frame0x30,139/139 instructions. First39 high-word sum ownsr0 ratherthanr5, progress incrementr5 ratherthanr0. After56 inline installed-content count/table stride/ID pointer trade registers. Test immutable content record and typed helper boundaries before declarations.
## fz15h __nupGetTitleSize__FP12NUPTitleInfo trials
Readonly content record/view, int index, direct ID indexed comparison helper, equivalent fixed storage total.
- __nupGetTitleSize__FP12NUPTitleInfo: const: (0, 22) 139/139 instructions
- __nupGetTitleSize__FP12NUPTitleInfo: snapshot: (99999, 99999) compile failed ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\nup\nup.cpp # ------------------------------------- # 927: ESCmdView* content = &view->contents[contentIndex]; # Error: ^ # (10209) illegal implicit conversion from 'const ESCmdView *' to # 'ESCmdView *' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
- __nupGetTitleSize__FP12NUPTitleInfo: index: (0, 22) 139/139 instructions
- __nupGetTitleSize__FP12NUPTitleInfo: helper: (0, 22) 139/139 instructions
- __nupGetTitleSize__FP12NUPTitleInfo: sum: (16, 113) 134/139 instructions
Structural mapping __nupBase64Encode: no frame,63/63 instructions. First count usesr10 insteadr7; source defines second output byte before first, target computes first index then second, with loads and stores interleaved. Test actual output expressions and byte accumulation, no string pool changes.
## fz15h __nupBase64Encode__FPUcPUcUl trials
Natural stores baseline has 8 structural/17 total differences. Test actual alphabet lookup boundary, full-triplet loop branch, accumulation tree and reset lifetime; no force placement.
- __nupBase64Encode__FPUcPUcUl: named: (18, 39) 59/63 instructions
- __nupBase64Encode__FPUcPUcUl: literalarray: (0, 0) 63/63 instructions first []
Exact candidate retained pending pool/objdiff/quick gate: __nupBase64Encode__FPUcPUcUl
- __nupBase64Encode__FPUcPUcUl: mutable static alphabet with real base64 lookup contents: (0, 0) 63/63 instructions. Const candidate pool diverged because compiler emitted alphabet in rodata; gate failed, no commit. Test ordinary mutable table in data, without section pragmas.
## fz15h base64 exact and data proof
An ordinary function-local static char alphabet[] initialized from the single base64 literal, plus direct output-byte assignments, removes temporary byte ownership and matches all63 instructions, ctxdiff diffs0. const alphabet[] was first tested and emitted rodata, failing data/pool gate; it was corrected to the ordinary mutable char array. Final28-string pool identical and all data1720/1720, sections/data totals unchanged. This is the actual encoding lookup table, without dummy bytes, packed strings, section pragmas or pinned addresses. No symbols/config rename needed. Quick gate GATE PASS, functions19->20, code7496->7748/10764, no regressions/forbidden/readability, DOL hash correct.
source data section sizes .rodata:86, .data:1592, .sdata:25, .sbss:4
target data section sizes .rodata:88, .data:1592, .sdata:32, .sbss:8
## fz15h create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator trials
Remaining table-entry vs animation-stride register swap. Test actual loaded-key call argument and independent declaration/assignment boundaries at the toggle loop, then final local order.
- create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator: loadedkey: (1, 11) 333/333 instructions first [(219, ('add', 'r3, r19, r0'), ('add', 'r18, r19, r0')), (220, ('lwz', 'r16, 0x14(r3)'), ('lwz', 'r17, 0x14(r18)')), (223, ('mulli', 'r18, r0, 0x44'), ('mulli', 'r16, r0, 0x44')), (228, ('add', 'r5, r31, r18'), ('add', 'r5, r31, r16')), (233, ('mr', 'r17, r3'), ('mr', 'r15, r3')), (239, ('mr', 'r4, r17'), ('mr', 'r4, r15'))]
- create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator: declfirst: (0, 8) 333/333 instructions first [(219, ('add', 'r17, r19, r0'), ('add', 'r18, r19, r0')), (220, ('lwz', 'r16, 0x14(r17)'), ('lwz', 'r17, 0x14(r18)')), (223, ('mulli', 'r18, r0, 0x44'), ('mulli', 'r16, r0, 0x44')), (228, ('add', 'r5, r31, r18'), ('add', 'r5, r31, r16')), (244, ('cmpwi', 'r16, 0'), ('cmpwi', 'r17, 0')), (247, ('lwzx', 'r5, r31, r18'), ('lwzx', 'r5, r31, r16'))]
## fz15h kbdEventHandler final declsearch
Structural trials complete; only registers remain. Search local declaration order last, restoring any non-exact result.
- create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator: ptrfirst: (0, 7) 333/333 instructions first [(219, ('add', 'r16, r19, r0'), ('add', 'r18, r19, r0')), (220, ('lwz', 'r17, 0x14(r16)'), ('lwz', 'r17, 0x14(r18)')), (223, ('mulli', 'r18, r0, 0x44'), ('mulli', 'r16, r0, 0x44')), (228, ('add', 'r5, r31, r18'), ('add', 'r5, r31, r16')), (247, ('lwzx', 'r5, r31, r18'), ('lwzx', 'r5, r31, r16')), (249, ('lwz', 'r7, 0x14(r16)'), ('lwz', 'r7, 0x14(r18)'))]
- create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator: ptrsecond: (0, 8) 333/333 instructions first [(219, ('add', 'r17, r19, r0'), ('add', 'r18, r19, r0')), (220, ('lwz', 'r16, 0x14(r17)'), ('lwz', 'r17, 0x14(r18)')), (223, ('mulli', 'r18, r0, 0x44'), ('mulli', 'r16, r0, 0x44')), (228, ('add', 'r5, r31, r18'), ('add', 'r5, r31, r16')), (244, ('cmpwi', 'r16, 0'), ('cmpwi', 'r17, 0')), (247, ('lwzx', 'r5, r31, r18'), ('lwzx', 'r5, r31, r16'))]
declaration block:
KBDChannel* data;
u8* bytes;
u8 status;
start (0, 5)
best (0, 5) after 6 builds; source restored; best order was:
KBDChannel* data;
u8* bytes;
u8 status;
## fz15h kbdProcMod final declsearch
Structural trials complete; only registers remain. Search local declaration order last, restoring any non-exact result.
- create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator: jtype: (0, 7) 333/333 instructions first [(219, ('add', 'r16, r19, r0'), ('add', 'r18, r19, r0')), (220, ('lwz', 'r17, 0x14(r16)'), ('lwz', 'r17, 0x14(r18)')), (223, ('mulli', 'r18, r0, 0x44'), ('mulli', 'r16, r0, 0x44')), (228, ('add', 'r5, r31, r18'), ('add', 'r5, r31, r16')), (247, ('lwzx', 'r5, r31, r18'), ('lwzx', 'r5, r31, r16')), (249, ('lwz', 'r7, 0x14(r16)'), ('lwz', 'r7, 0x14(r18)'))]
- create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator: scope: (0, 7) 333/333 instructions first [(219, ('add', 'r16, r19, r0'), ('add', 'r18, r19, r0')), (220, ('lwz', 'r17, 0x14(r16)'), ('lwz', 'r17, 0x14(r18)')), (223, ('mulli', 'r18, r0, 0x44'), ('mulli', 'r16, r0, 0x44')), (228, ('add', 'r5, r31, r18'), ('add', 'r5, r31, r16')), (247, ('lwzx', 'r5, r31, r18'), ('lwzx', 'r5, r31, r16')), (249, ('lwz', 'r7, 0x14(r16)'), ('lwz', 'r7, 0x14(r18)'))]
declaration block:
KBDChannel* data;
u32 modState;
s32 delta;
u8 flags;
start (0, 4)
best (0, 4) after 13 builds; source restored; best order was:
KBDChannel* data;
u32 modState;
s32 delta;
u8 flags;
## fz15h KBDSetModState final declsearch
Structural trials complete; only registers remain. Search local declaration order last, restoring any non-exact result.
declaration block:
BOOL interrupts;
KBDModifierState oldState;
KBDModifierState newState;
start (0, 4)
best (0, 4) after 6 builds; source restored; best order was:
BOOL interrupts;
KBDModifierState oldState;
KBDModifierState newState;
## fz15h Zi8GetPyPhonetic final declsearch
Structural trials complete; only registers remain. Search local declaration order last, restoring any non-exact result.
## fz15h owned data and function extent audit
JPEG owns no data. Keyboard5296/5296, zi8match728/728, tiCellPhone3860/3860 and nup1720/1720 already pair exactly; no name/extent corrections justified. zprepare has code-dependent table/extabindex gaps documented next.
target zprepare data relocations: 0->Zi8PrepareMatch+0x260, 4->Zi8PrepareMatch+0x1e4, 8->Zi8PrepareMatch+0x1f4, 12->Zi8PrepareMatch+0x204, 16->Zi8PrepareMatch+0x214, 20->Zi8PrepareMatch+0x224, 24->Zi8PrepareMatch+0x234, 28->Zi8PrepareMatch+0x244, 32->Zi8PrepareMatch+0x254, 36->Zi8PrepareMatch+0x260, 40->Zi8PrepareMatch+0x260, 44->Zi8PrepareMatch+0x204
source zprepare data relocations: 0->Zi8PrepareMatch+0x250, 4->Zi8PrepareMatch+0x1d4, 8->Zi8PrepareMatch+0x1e4, 12->Zi8PrepareMatch+0x1f4, 16->Zi8PrepareMatch+0x204, 20->Zi8PrepareMatch+0x214, 24->Zi8PrepareMatch+0x224, 28->Zi8PrepareMatch+0x234, 32->Zi8PrepareMatch+0x244, 36->Zi8PrepareMatch+0x250, 40->Zi8PrepareMatch+0x250, 44->Zi8PrepareMatch+0x1f4
Relocation proof: target jumptable_8166B3D0 is48bytes, twelve entries into Zi8PrepareMatch; source anonymous @230 has different code offsets. Gap is non-exact function layout, not a stable real source name. Extab8 exact, extabindex12 depends on function extent. No rename or size change permitted by this evidence.
onKey__Q49textinput8keyboard13cellphonetype4BaseFUlPv extent 0x81417274..0x81417d1c, next getInputMode__Q49textinput8keyboard13cellphonetype4BaseCFv 0x81417d1c, overlap 0.
create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator extent 0x814187b4..0x81418ce8, next init__Q49textinput8keyboard13cellphonetype16CellPhoneAnmPaneFv 0x81418ce8, overlap 0.
init__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFv extent 0x81418d4c..0x814195ac, next draw__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFv 0x814195ac, overlap 0.
Zi8GetPyPhonetic extent 0x8147dde8..0x8147e920, next Zi8GetPyFinal 0x8147e920, overlap 0.
Zi8GetPyFinal extent 0x8147e920..0x8147e9f4, next Zi8GetBpmfPhonetic 0x8147e9f4, overlap 0.
Zi8PrepareMatch extent 0x814850fc..0x81485fac, next CDBInit 0x81485fac, overlap 0.
TMCJPEGDEC_set_converterY8U8V8 extent 0x814efb9c..0x814efeac, next TMCJPEG_814EFEAC 0x814efeac, overlap 0.
__nupParseServerInfo__FP14NUPContextInfoPcPcUx extent 0x815efa30..0x815f0140, next __nupGetServerInfo__FPcPcUxPcPcUlPcUsUsUxUsPPc 0x815f0140, overlap 0.
__nupBase64Encode__FPUcPUcUl extent 0x815f04c0..0x815f05bc, next __nupGetAuditData__FP14NUPContextInfoPPc 0x815f05bc, overlap 0.
__nupGetBootVersion__FP14NUPContextInfoP14ESTitleVersion extent 0x815f0a40..0x815f0ccc, next __nupGetTicket__FP12NUPTitleInfoPc 0x815f0ccc, overlap 0.
__nupGetTitleSize__FP12NUPTitleInfo extent 0x815f1014..0x815f1240, next __nupGetContentFull__FP14NUPContextInfoP12NUPTitleInfoPcUl 0x815f1240, overlap 0.
kbdEventHandler extent 0x815f34d8..0x815f37c0, next kbdRepeatHandler 0x815f37c0, overlap 0.
kbdProcMod extent 0x815f3aa4..0x815f3ea4, next kbdSendKey 0x815f3ea4, overlap 0.
kbd_led_handler extent 0x815f3fb4..0x815f4018, next KBDSetLedsAsync 0x815f4018, overlap 0.
KBDSetLedsAsync extent 0x815f4018..0x815f415c, next KBDSetLeds 0x815f415c, overlap 0.
KBDSetLeds extent 0x815f415c..0x815f4298, next kbdInitMap 0x815f4298, overlap 0.
KBDSetModState extent 0x815f4664..0x815f470c, next KBDTranslateHidCode 0x815f470c, overlap 0.
declaration block:
ziU8 pyInitial;
ziU8 pyFinal;
ziU8 convertedCount;
ziU8 result;
ziBool partial;
ziBool alternateInitial;
ziU8 outputIndex;
ziU8 index;
ziU16 value;
ziWChar converted[256];
ziU8 pinyin[12];
ziWChar* current;
start (0, 167)
best (0, 167) after 120 builds; source restored; best order was:
ziU8 pyInitial;
ziU8 pyFinal;
ziU8 convertedCount;
ziU8 result;
ziBool partial;
ziBool alternateInitial;
ziU8 outputIndex;
ziU8 index;
ziU16 value;
ziWChar converted[256];
ziU8 pinyin[12];
ziWChar* current;
## fz15h Zi8GetPyFinal final declsearch
Structural trials complete; only registers remain. Search local declaration order last, restoring any non-exact result.
fewer than two leading declarations; pass --lines START END
## fz15h __nupParseServerInfo__FP14NUPContextInfoPcPcUx final declsearch
Structural trials complete; only registers remain. Search local declaration order last, restoring any non-exact result.
declaration block:
s32 result = 0;
char* start;
char* afterEnd;
char* cursor;
size_t valueLength;
size_t titleCount;
start (0, 148)
best (0, 148) after 36 builds; source restored; best order was:
s32 result = 0;
char* start;
char* afterEnd;
char* cursor;
size_t valueLength;
size_t titleCount;
## fz15h __nupGetBootVersion__FP14NUPContextInfoP14ESTitleVersion trials
Inline helper argument bindings resist const/local representation. Test true count/id/title input parameter order and field-count ownership in the existing helper or generic template; no public signature changes.
- __nupGetBootVersion__FP14NUPContextInfoP14ESTitleVersion: installed-content helper input order title,contentCount,contentId: (0, 17) 163/163 instructions
- __nupGetBootVersion__FP14NUPContextInfoP14ESTitleVersion: installed-content helper input order contentId,title,contentCount: (0, 17) 163/163 instructions
## fz15h onKey__Q49textinput8keyboard13cellphonetype4BaseFUlPv trials
Call input order and explicit readonly key/control entry local in real lookup helpers. They define the index/table stride virtual register lifetime seen in onKey; matched caller effects checked if a candidate appears.
- __nupGetBootVersion__FP14NUPContextInfoP14ESTitleVersion: installed-content helper input order contentId,contentCount,title: (0, 17) 163/163 instructions
- __nupGetBootVersion__FP14NUPContextInfoP14ESTitleVersion: installed-content helper input order contentCount,title,contentId: (0, 17) 163/163 instructions
- onKey__Q49textinput8keyboard13cellphonetype4BaseFUlPv: order: (0, 37) 682/682 instructions
- __nupGetBootVersion__FP14NUPContextInfoP14ESTitleVersion: installed-content helper input order contentCount,contentId,title: (0, 17) 163/163 instructions
- __nupGetBootVersion__FP14NUPContextInfoP14ESTitleVersion: installed count owned by generic helper: (11, 62) 164/163 instructions
- onKey__Q49textinput8keyboard13cellphonetype4BaseFUlPv: ptr: (9, 207) 682/682 instructions
- __nupGetBootVersion__FP14NUPContextInfoP14ESTitleVersion: installed count owned by word helper: (11, 61) 164/163 instructions
- __nupGetBootVersion__FP14NUPContextInfoP14ESTitleVersion: installed count owned by int helper: (11, 61) 164/163 instructions
- onKey__Q49textinput8keyboard13cellphonetype4BaseFUlPv: s8: (0, 37) 682/682 instructions
- onKey__Q49textinput8keyboard13cellphonetype4BaseFUlPv: ctrl: (3, 45) 682/682 instructions
## fz15h __nupGetTitleSize__FP12NUPTitleInfo trials
Map first high-word/result temporary to tmdSize rounding expression. Test equivalent masked 64-bit widening, complement masks, real readonly view, named alignment helper and SDK ROUNDUP macro. All roundups preserve unsigned wrap for the 32-bit field.
- __nupGetTitleSize__FP12NUPTitleInfo: wide: (46, 115) 140/139 instructions
- __nupGetTitleSize__FP12NUPTitleInfo: mask: (0, 22) 139/139 instructions
- __nupGetTitleSize__FP12NUPTitleInfo: snapshot: (34, 103) 138/139 instructions
## fz15h create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator trials
Toggle entry readonly reference helper separates the stride/header IR boundary, with scalar index, const index pointer, and const table input. No metadata objects or layout changed.
- __nupGetTitleSize__FP12NUPTitleInfo: helper: (0, 22) 139/139 instructions
- __nupGetTitleSize__FP12NUPTitleInfo: roundup: (0, 22) 139/139 instructions
- create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator: constarg: (0, 21) 333/333 instructions
- create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator: index: (0, 21) 333/333 instructions
- create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator: table: (0, 21) 333/333 instructions
## fz15h create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator trials
Toggle animation loop ownership via real while, postincrement, locally declared counter and phase-shared loop counters. The target table and stride lifetimes may reflect a shared loop local, analogous to the previous JPEG row match.
- create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator: while: (0, 7) 333/333 instructions first [(219, ('add', 'r16, r19, r0'), ('add', 'r18, r19, r0')), (220, ('lwz', 'r17, 0x14(r16)'), ('lwz', 'r17, 0x14(r18)')), (223, ('mulli', 'r18, r0, 0x44'), ('mulli', 'r16, r0, 0x44')), (228, ('add', 'r5, r31, r18'), ('add', 'r5, r31, r16')), (247, ('lwzx', 'r5, r31, r18'), ('lwzx', 'r5, r31, r16')), (249, ('lwz', 'r7, 0x14(r16)'), ('lwz', 'r7, 0x14(r18)'))]
- create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator: increment: (0, 7) 333/333 instructions first [(219, ('add', 'r16, r19, r0'), ('add', 'r18, r19, r0')), (220, ('lwz', 'r17, 0x14(r16)'), ('lwz', 'r17, 0x14(r18)')), (223, ('mulli', 'r18, r0, 0x44'), ('mulli', 'r16, r0, 0x44')), (228, ('add', 'r5, r31, r18'), ('add', 'r5, r31, r16')), (247, ('lwzx', 'r5, r31, r18'), ('lwzx', 'r5, r31, r16')), (249, ('lwz', 'r7, 0x14(r16)'), ('lwz', 'r7, 0x14(r18)'))]
- create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator: outerj: (0, 7) 333/333 instructions first [(219, ('add', 'r16, r19, r0'), ('add', 'r18, r19, r0')), (220, ('lwz', 'r17, 0x14(r16)'), ('lwz', 'r17, 0x14(r18)')), (223, ('mulli', 'r18, r0, 0x44'), ('mulli', 'r16, r0, 0x44')), (228, ('add', 'r5, r31, r18'), ('add', 'r5, r31, r16')), (247, ('lwzx', 'r5, r31, r18'), ('lwzx', 'r5, r31, r16')), (249, ('lwz', 'r7, 0x14(r16)'), ('lwz', 'r7, 0x14(r18)'))]
- create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator: sharedj: (0, 131) 333/333 instructions
- create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator: sharediter: (0, 36) 333/333 instructions
## fz15h create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator trials
Fixed metadata readonly definition may change alias assumptions at virtual animation calls. Every table contains the original entries; no addresses/extent/layout changes or volatility added. Check all data/functions with gate if exact.
- create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator: table: (0, 7) 333/333 instructions first [(219, ('add', 'r16, r19, r0'), ('add', 'r18, r19, r0')), (220, ('lwz', 'r17, 0x14(r16)'), ('lwz', 'r17, 0x14(r18)')), (223, ('mulli', 'r18, r0, 0x44'), ('mulli', 'r16, r0, 0x44')), (228, ('add', 'r5, r31, r18'), ('add', 'r5, r31, r16')), (247, ('lwzx', 'r5, r31, r18'), ('lwzx', 'r5, r31, r16')), (249, ('lwz', 'r7, 0x14(r16)'), ('lwz', 'r7, 0x14(r18)'))]
- create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator: both: (0, 7) 333/333 instructions first [(219, ('add', 'r16, r19, r0'), ('add', 'r18, r19, r0')), (220, ('lwz', 'r17, 0x14(r16)'), ('lwz', 'r17, 0x14(r18)')), (223, ('mulli', 'r18, r0, 0x44'), ('mulli', 'r16, r0, 0x44')), (228, ('add', 'r5, r31, r18'), ('add', 'r5, r31, r16')), (247, ('lwzx', 'r5, r31, r18'), ('lwzx', 'r5, r31, r16')), (249, ('lwz', 'r7, 0x14(r16)'), ('lwz', 'r7, 0x14(r18)'))]
- create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator: entry: (0, 7) 333/333 instructions first [(219, ('add', 'r16, r19, r0'), ('add', 'r18, r19, r0')), (220, ('lwz', 'r17, 0x14(r16)'), ('lwz', 'r17, 0x14(r18)')), (223, ('mulli', 'r18, r0, 0x44'), ('mulli', 'r16, r0, 0x44')), (228, ('add', 'r5, r31, r18'), ('add', 'r5, r31, r16')), (247, ('lwzx', 'r5, r31, r18'), ('lwzx', 'r5, r31, r16')), (249, ('lwz', 'r7, 0x14(r16)'), ('lwz', 'r7, 0x14(r18)'))]
- create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator: normal: (0, 7) 333/333 instructions first [(219, ('add', 'r16, r19, r0'), ('add', 'r18, r19, r0')), (220, ('lwz', 'r17, 0x14(r16)'), ('lwz', 'r17, 0x14(r18)')), (223, ('mulli', 'r18, r0, 0x44'), ('mulli', 'r16, r0, 0x44')), (228, ('add', 'r5, r31, r18'), ('add', 'r5, r31, r16')), (247, ('lwzx', 'r5, r31, r18'), ('lwzx', 'r5, r31, r16')), (249, ('lwz', 'r7, 0x14(r16)'), ('lwz', 'r7, 0x14(r18)'))]
## fz15h Zi8GetPyFinal final nested declsearch
Structural/helper/loop trials complete. Search actual declaration lines 719..720 last. Tool automatic scan can mistake an inline if call for a definition; explicit lines avoid that.
declaration block:
ziU8 index = 0;
ziU8 row;
start (0, 8)
best (0, 8) after 2 builds; source restored; best order was:
ziU8 index = 0;
ziU8 row;
## fz15h onKey__Q49textinput8keyboard13cellphonetype4BaseFUlPv final nested declsearch
Structural/helper/loop trials complete. Search actual declaration lines 224..225 last. Tool automatic scan can mistake an inline if call for a definition; explicit lines avoid that.
declaration block:
u8 state = static_cast<KeyEvent*>(data)->state;
s32 controlKey = findCellPhoneControlKey(paneName);
start (0, 37)
best (0, 37) after 2 builds; source restored; best order was:
u8 state = static_cast<KeyEvent*>(data)->state;
s32 controlKey = findCellPhoneControlKey(paneName);
## fz15h create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator final nested declsearch
Structural/helper/loop trials complete. Search actual declaration lines 609..610 last. Tool automatic scan can mistake an inline if call for a definition; explicit lines avoid that.
declaration block:
const char* animationKey;
const PaneNameToAnimationKey& paneName = csPaneNameNormalAnimationKey[i];
start (0, 7)
best (0, 7) after 2 builds; source restored; best order was:
const char* animationKey;
const PaneNameToAnimationKey& paneName = csPaneNameNormalAnimationKey[i];
## fz15h init__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFv final nested declsearch
Structural/helper/loop trials complete. Search actual declaration lines 679..681 last. Tool automatic scan can mistake an inline if call for a definition; explicit lines avoid that.
declaration block:
nw4r::lyt::TextBox* textPane = static_cast<nw4r::lyt::TextBox*>(getPane(textPaneName));
nw4r::lyt::Pane* buttonPane = getPane(paneName);
const KeySet* keySet = static_cast<const LanguageDependencyData*>(mpInputModeTable)->keySets[i];
start (0, 155)
best (0, 155) after 6 builds; source restored; best order was:
nw4r::lyt::TextBox* textPane = static_cast<nw4r::lyt::TextBox*>(getPane(textPaneName));
nw4r::lyt::Pane* buttonPane = getPane(paneName);
const KeySet* keySet = static_cast<const LanguageDependencyData*>(mpInputModeTable)->keySets[i];
## fz15h __nupGetBootVersion__FP14NUPContextInfoP14ESTitleVersion final nested declsearch
Structural/helper/loop trials complete. Search actual declaration lines 721..722 last. Tool automatic scan can mistake an inline if call for a definition; explicit lines avoid that.
declaration block:
s32 result;
ESTmdView* tmdView = 0;
start (0, 17)
best (0, 17) after 2 builds; source restored; best order was:
s32 result;
ESTmdView* tmdView = 0;
## fz15h __nupGetTitleSize__FP12NUPTitleInfo final nested declsearch
Structural/helper/loop trials complete. Search actual declaration lines 901..902 last. Tool automatic scan can mistake an inline if call for a definition; explicit lines avoid that.
declaration block:
s32 result = 0;
s32 contentIndex;
start (0, 22)
best (0, 22) after 2 builds; source restored; best order was:
s32 result = 0;
s32 contentIndex;
## fz15h pre-final completeness audit
Only new code retained is the exact nup base64 lookup table/output expression. All other owned source/header/config files restored. No renames, extent changes, inline assembly or unsupported volatility. Each remaining function has at least three distinct compiled current-round source attempts; compile failures and no-op rejected generators excluded.
TMCJPEGDEC_set_converterY8U8V8: 3 distinct compiled current-round source variants; remains open.
kbdEventHandler: 3 distinct compiled current-round source variants; remains open.
kbdProcMod: 3 distinct compiled current-round source variants; remains open.
kbd_led_handler: 3 distinct compiled current-round source variants; remains open.
KBDSetLedsAsync: 3 distinct compiled current-round source variants; remains open.
KBDSetLeds: 3 distinct compiled current-round source variants; remains open.
KBDSetModState: 3 distinct compiled current-round source variants; remains open.
Zi8PrepareMatch: 3 distinct compiled current-round source variants; remains open.
Zi8GetPyPhonetic: 4 distinct compiled current-round source variants; remains open.
Zi8GetPyFinal: 10 distinct compiled current-round source variants; remains open.
onKey__Q49textinput8keyboard13cellphonetype4BaseFUlPv: 8 distinct compiled current-round source variants; remains open.
create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator: 22 distinct compiled current-round source variants; remains open.
init__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFv: 4 distinct compiled current-round source variants; remains open.
__nupParseServerInfo__FP14NUPContextInfoPcPcUx: 4 distinct compiled current-round source variants; remains open.
__nupGetBootVersion__FP14NUPContextInfoP14ESTitleVersion: 12 distinct compiled current-round source variants; remains open.
__nupGetTitleSize__FP12NUPTitleInfo: 8 distinct compiled current-round source variants; remains open.
All six owned sources equal the last gated commit before the final clean gate. The prior JPEG/keyboard CR1 branch-normalizer artifact persists unchanged; instruction counts from the gate are reported separately from objdiff exact counts.
Frame values cross-checked against the disassembly: LayoutByNW4R::create0x60 and init0x50; corrected the preliminary frame labels above. Their respective instruction counts333/536 and operand-only mismatch diagnoses are unchanged.
## fz15h remaining structural uncertainties
Converter setup shared-buffer expression still folds to per-case addresses; not a symbol extent issue. Keyboard event/modifier mismatches remain same-count virtual register ownership despite const views/bitfield structure/local-order trials. LED reservation still caches stride rather than channel and its completion callback has a different success branch layout.
Zi8GetPyPhonetic saved arguments/conversion-buffer address and Zi8GetPyFinal output row-base/stride remain allocator choices at identical frames/instruction counts. Cellphone onKey/create/init have identical structure and stack sizes after input/table/scope/helper/loop attempts; missing source distinction is unresolved. Nup parser tag helper, installed-content lookup and title-size arithmetic still allocate intermediates differently.
The only retained new data object is the actual base64 alphabet, one ordinary string initializer. All65 declared bytes, including terminator, come from that literal; emitted compiler alignment was not forced. Exact data/pool verification already passed; no ownership/address/extent edits were made.
## fz15h final clean full gate
Final non-quick gate rebuilt43U from clean objects. All six pools identical; zero regressions, forbidden additions, or readability warnings. Retained base64 candidate independently rechecked after clean build:63/63 instructions, ctxdiff diffs0.
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] pool: IDENTICAL
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] objdiff: code 15164/15948 data None/None functions 12/13 fuzzy 99.6453 linked code 0
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] instruction-exact functions: 2/13
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] section .text size 15948 match 99.64535
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEGDEC_set_converterY8U8V8 92.78571
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] baseline: code 15164/15948 data None functions 12 fuzzy 99.6453
[libs/RVL_SDK/src/kbd/kbd_lib] pool: IDENTICAL
[libs/RVL_SDK/src/kbd/kbd_lib] objdiff: code 3088/5764 data 5296/5296 functions 15/21 fuzzy 97.7044 linked code 0
[libs/RVL_SDK/src/kbd/kbd_lib] instruction-exact functions: 14/21
[libs/RVL_SDK/src/kbd/kbd_lib] section .bss size 3968 match 100.0
[libs/RVL_SDK/src/kbd/kbd_lib] section .data size 1304 match 100.0
[libs/RVL_SDK/src/kbd/kbd_lib] section .sbss size 16 match 100.0
[libs/RVL_SDK/src/kbd/kbd_lib] section .sdata size 8 match 100.0
[libs/RVL_SDK/src/kbd/kbd_lib] section .text size 5764 match 97.70437
[libs/RVL_SDK/src/kbd/kbd_lib] below 100: kbdEventHandler 99.83871
[libs/RVL_SDK/src/kbd/kbd_lib] below 100: kbdProcMod 99.90234
[libs/RVL_SDK/src/kbd/kbd_lib] below 100: kbd_led_handler 64.12
[libs/RVL_SDK/src/kbd/kbd_lib] below 100: KBDSetLedsAsync 86.234566
[libs/RVL_SDK/src/kbd/kbd_lib] below 100: KBDSetLeds 84.6076
[libs/RVL_SDK/src/kbd/kbd_lib] below 100: KBDSetModState 99.40476
[libs/RVL_SDK/src/kbd/kbd_lib] baseline: code 3088/5764 data 5296 functions 15 fuzzy 97.7044
[libs/RVLMiddleware/eZiText/src/clib/zprepare] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zprepare] objdiff: code None/3760 data 8/68 functions 0/1 fuzzy 96.3191 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zprepare] instruction-exact functions: 0/1
[libs/RVLMiddleware/eZiText/src/clib/zprepare] section .data size 48 match None
[libs/RVLMiddleware/eZiText/src/clib/zprepare] section .text size 3760 match 96.319145
[libs/RVLMiddleware/eZiText/src/clib/zprepare] section extab size 8 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zprepare] section extabindex size 12 match 91.66667
[libs/RVLMiddleware/eZiText/src/clib/zprepare] below 100: Zi8PrepareMatch 96.319145
[libs/RVLMiddleware/eZiText/src/clib/zprepare] baseline: code None/3760 data 8 functions 0 fuzzy 96.3191
[libs/RVLMiddleware/eZiText/src/clib/zi8match] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zi8match] objdiff: code 5172/8256 data 728/728 functions 8/10 fuzzy 99.5300 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] instruction-exact functions: 8/10
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section .rodata size 528 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section .text size 8256 match 99.53004
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section extab size 80 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section extabindex size 120 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] below 100: Zi8GetPyPhonetic 98.704735
[libs/RVLMiddleware/eZiText/src/clib/zi8match] below 100: Zi8GetPyFinal 99.245285
[libs/RVLMiddleware/eZiText/src/clib/zi8match] baseline: code 5172/8256 data 728 functions 8 fuzzy 99.5300
[src/keyboard/tiCellPhone] pool: IDENTICAL
[src/keyboard/tiCellPhone] objdiff: code 12824/19028 data 3860/3860 functions 83/86 fuzzy 99.7793 linked code 0
[src/keyboard/tiCellPhone] instruction-exact functions: 83/86
[src/keyboard/tiCellPhone] section .ctors size 4 match 100.0
[src/keyboard/tiCellPhone] section .data size 2416 match 100.0
[src/keyboard/tiCellPhone] section .rodata size 1320 match 100.0
[src/keyboard/tiCellPhone] section .sdata size 112 match 100.0
[src/keyboard/tiCellPhone] section .sdata2 size 8 match 100.0
[src/keyboard/tiCellPhone] section .text size 19028 match 99.779274
[src/keyboard/tiCellPhone] below 100: onKey__Q49textinput8keyboard13cellphonetype4BaseFUlPv 99.67009
[src/keyboard/tiCellPhone] below 100: create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator 99.8949
[src/keyboard/tiCellPhone] below 100: init__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFv 98.52612
[src/keyboard/tiCellPhone] baseline: code 12824/19028 data 3860 functions 83 fuzzy 99.7793
[libs/RVL_SDK/src/nup/nup] pool: IDENTICAL
[libs/RVL_SDK/src/nup/nup] objdiff: code 7748/10764 data 1720/1720 functions 20/23 fuzzy 99.5968 linked code 0
[libs/RVL_SDK/src/nup/nup] instruction-exact functions: 20/23
[libs/RVL_SDK/src/nup/nup] section .data size 1592 match 100.0
[libs/RVL_SDK/src/nup/nup] section .rodata size 88 match 100.0
[libs/RVL_SDK/src/nup/nup] section .sbss size 8 match 100.0
[libs/RVL_SDK/src/nup/nup] section .sdata size 32 match 100.0
[libs/RVL_SDK/src/nup/nup] section .text size 10764 match 99.5968
[libs/RVL_SDK/src/nup/nup] below 100: __nupParseServerInfo__FP14NUPContextInfoPcPcUx 98.108406
[libs/RVL_SDK/src/nup/nup] below 100: __nupGetBootVersion__FP14NUPContextInfoP14ESTitleVersion 99.35583
[libs/RVL_SDK/src/nup/nup] below 100: __nupGetTitleSize__FP12NUPTitleInfo 99.100716
[libs/RVL_SDK/src/nup/nup] baseline: code 7496/10764 data 1720 functions 19 fuzzy 99.4612
regressions vs baseline: 0
global matched_code_percent: 90.55054 -> 90.55895
global fuzzy_match_percent: 99.57091 -> 99.57140
global complete_code_percent: 70.30611 -> 70.30611
global matched_data_percent: 99.36639 -> 99.36639
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
## fz15h final before -> after
Instruction-exact values below are the gate tool values. Objdiff function counts are separate because the unchanged JPEG/keyboard CR1 branch normalization artifact undercounts gate exact functions. Missing matched_code is0.
libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8: gate instruction-exact 2/13 -> 2/13; objdiff exact 12/13 -> 12/13; code 15164/15948 -> 15164/15948; data 0/0 -> 0/0.
Open: TMCJPEGDEC_set_converterY8U8V8 92.78571%; shared buffer address folds into case-specific additions; source195/target196 instructions; 3 distinct compiled source variants logged, plus declaration searches where applicable.
libs/RVL_SDK/src/kbd/kbd_lib: gate instruction-exact 14/21 -> 14/21; objdiff exact 15/21 -> 15/21; code 3088/5764 -> 3088/5764; data 5296/5296 -> 5296/5296.
Open: kbdEventHandler 99.83871%; same186 instructions; status and report-array base virtual registers differ; 3 distinct compiled source variants logged, plus declaration searches where applicable.
Open: kbdProcMod 99.90234%; same256 instructions; inlined modifier address/old-value operands swap r4/r5; 3 distinct compiled source variants logged, plus declaration searches where applicable.
Open: kbd_led_handler 64.12%; source24/target25 instructions; success branch and callback-index rematerialization differ; 3 distinct compiled source variants logged, plus declaration searches where applicable.
Open: KBDSetLedsAsync 86.234566%; source80/target81 instructions; channel versus cached record stride across interrupt calls; 3 distinct compiled source variants logged, plus declaration searches where applicable.
Open: KBDSetLeds 84.6076%; source75/target79 instructions; channel lifetime and reservation-loop stride differ; 3 distinct compiled source variants logged, plus declaration searches where applicable.
Open: KBDSetModState 99.40476%; same42 instructions; modifier address/old-value operands swap r4/r5; 3 distinct compiled source variants logged, plus declaration searches where applicable.
libs/RVLMiddleware/eZiText/src/clib/zprepare: gate instruction-exact 0/1 -> 0/1; objdiff exact 0/1 -> 0/1; code 0/3760 -> 0/3760; data 8/68 -> 8/68.
Open: Zi8PrepareMatch 96.319145%; source939/target940 instructions; component flag store and local/branch scheduling differ; 3 distinct compiled source variants logged, plus declaration searches where applicable.
libs/RVLMiddleware/eZiText/src/clib/zi8match: gate instruction-exact 8/10 -> 8/10; objdiff exact 8/10 -> 8/10; code 5172/8256 -> 5172/8256; data 728/728 -> 728/728.
Open: Zi8GetPyPhonetic 98.704735%; same718 instructions/frame0x250; saved pointers/conversion-buffer operands differ; 4 distinct compiled source variants logged, plus declaration searches where applicable.
Open: Zi8GetPyFinal 99.245285%; same53 instructions/frame0x10; eight output-row base/stride operand differences; 10 distinct compiled source variants logged, plus declaration searches where applicable.
src/keyboard/tiCellPhone: gate instruction-exact 83/86 -> 83/86; objdiff exact 83/86 -> 83/86; code 12824/19028 -> 12824/19028; data 3860/3860 -> 3860/3860.
Open: onKey__Q49textinput8keyboard13cellphonetype4BaseFUlPv 99.67009%; same682 instructions/frame0x80;37 key-state/table helper operand differences; 8 distinct compiled source variants logged, plus declaration searches where applicable.
Open: create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator 99.8949%; same333 instructions/frame0x60; seven toggle-entry/animation-stride operand differences; 22 distinct compiled source variants logged, plus declaration searches where applicable.
Open: init__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFv 98.52612%; same536 instructions/frame0x50;155 visibility/text-pane helper operand differences; 4 distinct compiled source variants logged, plus declaration searches where applicable.
libs/RVL_SDK/src/nup/nup: gate instruction-exact 19/23 -> 20/23; objdiff exact 19/23 -> 20/23; code 7496/10764 -> 7748/10764; data 1720/1720 -> 1720/1720.
Open: __nupParseServerInfo__FP14NUPContextInfoPcPcUx 98.108406%; same452 instructions/frame0x50;148 tag-helper pointer/length/result operand differences; 4 distinct compiled source variants logged, plus declaration searches where applicable.
Open: __nupGetBootVersion__FP14NUPContextInfoP14ESTitleVersion 99.35583%; same163 instructions/frame0x20;17 installed-content count/id/index operand differences; 12 distinct compiled source variants logged, plus declaration searches where applicable.
Open: __nupGetTitleSize__FP12NUPTitleInfo 99.100716%; same139 instructions/frame0x30;22 wide arithmetic and installed-content pointer/stride operand differences; 8 distinct compiled source variants logged, plus declaration searches where applicable.
## fz15h final changes and limitations
Code commit e3c6f50737979184d5b359286e710b8f56fdd853 changes only libs/RVL_SDK/src/nup/nup.cpp and this attempts log. Final verification/log commit adds only this attempts log. No headers/configuration/symbols modified.
One new exact function: __nupBase64Encode__FPUcPUcUl. Nup19/23 ->20/23, matched code7496 ->7748 bytes, data1720 unchanged. Other five units unchanged; all16 remaining functions have at least3 valid distinct source-level attempts in this round.
Remaining source distinctions are unresolved, as listed per function above. The JPEG/keyboard gate instruction-count discrepancy is a branch-normalizer artifact documented with raw instruction evidence earlier; no tools were modified. No complete-unit or terminal completion claim.

View File

@@ -0,0 +1,64 @@
# kbdzi leaf — attempt log (agent/w1007/kbdzi)
Scope: incomplete zi*/kbd* units (NOT ti*/MyTi* — linkgap owns those).
## Landed
### zprepare / Zi8PrepareMatch (96.32 -> 96.74, 940->941 insns = orig)
- Missing init decode: orig emits `stb 0xf(r1)=0` right after `Zi8Memset`
before `nibbles=0`(r28) / `elementIndex=0`(0xd) / `elementCount`(0xe).
`savedNibbles = 0` after the memset reproduces the store AND the exact
init-order emission; decl moved to end of locals. Slot lands 0x9 vs orig
0xf (frame packing — orig's stack u8 class has two more slots).
- `savedNibbles = 1` inside `if (Zi8IsComponent(element))` after
`elementIndex++` reproduces orig's `li r0,1; stb 0xf` dead store (the var
is rewritten at `savedNibbles = nibbles` later before its only read —
MWCC emits dead frame stores).
- Residual: jumptable addends still -0x8/+0x4 off (sub-100 code region),
callee-window regname ties elsewhere in the fn.
## Verified walls (normalized-diff / insn-level evidence)
### kbd_lib — dual-IV + callee-pin family (all 6 sub-100 fns)
- Orig loops in KBDSetLeds/KBDSetLedsAsync use base+byte-IV addressing:
`lwzx r0,r6,r4` (r6=kbdCmdBuf base lis'd once, r4=ofs +=0x20) plus a
separate `addi r29` index IV + `bdnz` ctr. Mine always fuses to a cursor
walk (`lwz 0(rN)`). Tried: while+`command++`, `u32 ofs`+`((u8*)buf)[ofs]`
(load AND store), `u8*` named base, `for`+index, `*(u32*)&kbdCmdBuf[i]`,
`(kbdCmdBuf + index)` — ALL fuse to cursor-walk. MWCC's parallel-IV split
appears to be an internal strength-reduction choice with no source lever
found (~8 forms).
- Orig pins `channel` in a callee reg (r31/r26) and recomputes
`mulli rX,channel,0x268` per `kbdData[channel]` use; mine pins the
product. Same callee-window binding family as prior leaves.
- kbd_led_handler: orig `bne->li7; li0; b; li7` (case arm fall-through).
`switch{case TRUE;default}` emits `beq;b;li0;b;li7` (+1 insn);
`switch{default;case TRUE}` emits `beq->li0;li7;b;li0` (inverted);
if/else + ternary fold to branchless `subfic` select (documented
banned-adjacent — select fold); `case FALSE` extra arm emits an extra
`bge` compare. `default`-first kept (64.12, best of the forms).
- KBDSetModState: instruction-identical except one dest-reg choice on the
element-address web (`add r4,r5,r4` vs `r5`) — allocator home, no lever.
### zi* units — all verified regname/scheduler ties
- Zi8MatchOEMdata (zoemdata), Zi8_81483264 (zkokeyp), zi8InternalGetZH
(zi8cgetc, 10677=10677 insns): instruction-identical, pure rNN<->rMM
web-home diffs.
- Zi8GetKOcandidates (zkokeyp): 670 vs 674 — 4 real nano-diffs:
(a) init-block const-reuse (orig reuses one `li r0,0` across two stores;
mine materializes `li r3,0`),
(b) `sth r3` raw-then-mask at use vs mask-then-store at 2 Zi8_8148302C
call sites (u16-field assign form),
(c) one extra `mr` in marshal.
- Zi8Get1KeyPressCandidates (zi81key): orig +10 insns, +8 clrlwi —
orig masks values at each USE (per-use clrlwi webs); mine shares masked
webs. Init-block scratch-reg rotation too.
- Zi8AlphaGetCandidates (zi8alpha): 3947=3947 insns, 218 diffs — branch
count shuffles (bge/bgt/ble reclassified) + regname; no structural gap.
### Data sections
- zi8alpha .data(48B), zi8cgetc .data(392B), zprepare .data(48B) at fuzzy 0:
all are jumptable_8166XXXX objects whose R_PPC_ADDR32 addends bind to the
code diffs above — they resolve when the fn matches, NOT carveable.
- Other units' matched_data gaps are extabindex-driven (fn layout), resolve
with code.

View File

@@ -1,89 +0,0 @@
# linkgap leaf — iplChannelTitle + eggAudioExpMgr
## iplChannelTitle — emission restored, 3144 is provably impossible
Orig .o `.data` = 0x950; last symbol ends 0x87c; bytes 0x87c-0x950 are zeros
in both the extraction .o and the DOL (verified at DOL file off 0x31F504).
The 0xd4 tail = 5 weak-emitted vtables that lost link dedup:
| off | size | symbol |
|-------|------|-------------------------------|
| 0x87c | 92 | __vt__ipl::gui::PaneManager |
| 0x8d8 | 24 | __vt__gui::EventHandler |
| 0x8f0 | 32 | __vt__gui::Interface |
| 0x910 | 32 | __vt__ipl::nand::LayoutFile |
| 0x930 | 32 | __vt__ipl::nand::LangFile |
Emit rule used (old agent/w0929/linkgap scheme): a class weak-emits its
vtable in a TU that ODR-uses it (construction site; elided vptr stores
count) when every virtual DECLARED IN THAT CLASS is inline — inherited
non-inline virtuals don't block (LayoutFile emits despite non-inline
inherited virtuals because its own ~LayoutFile is inline here).
Source mechanism, all real decls, no invented names:
- `#define IPL_CHANNEL_TITLE_NOVTABLE` at cpp top (undef after includes).
- GUIManager.h: ~Interface -> `~Interface(){}` for CT (gate); EventHandler
loses `__declspec(novtable)` for CT.
- iplGuiManager.h: ~PaneManager -> `~PaneManager(){}` for CT.
- iplNand.h: LangFile's five virtuals gated to inline dummies for CT;
~LayoutFile -> `~LayoutFile(){}` for CT.
- `#pragma dont_instantiate ipl::math::HermiteIntp<float>` keeps
HermiteIntp's vtable UND (orig also UNDs it).
Result: all 5 emit STB_WEAK at the exact orig offsets, .data=0x950, the
raw .data bytes are byte-identical to orig's (all-zero tail), and the
full DOL is byte-identical (sha1 26116613f624061ba99c8d1a299aaa6efa85670d)
with the unit flipped Matching.
### Why matched_data cannot stay 3144 — objdiff internals, proven
`matched_data` sums sizes of sections at fuzzy==100. `.data` fuzzy is
computed (objdiff-core diff/data.rs `diff_data_section`) as:
- left_max/right_max = max end offset of scored symbols in the section
(symbols with size>0, not Section-kind, not Hidden).
- Compare section bytes over 0..max (patience diff) AND pair relocations
in the same range; if every left reloc matches, score =
max(symbol-name-match%, byte-diff%). Otherwise symbol-name-match only.
- Symbol-name-match = sum(size*match%)/sum(size) over left symbols.
Any symbol'd object emitted at 0x87c+ therefore scores <100 regardless
of content, because orig's extraction .o has neither a symbol nor a
reloc there (dedup'd weak emits are invisible in the DOL, so the
extractor dropped them — rela.data max offset is 0x878). Measured:
- 0 emits (.data=0x87c): .data fuzzy 100.0 -> matched_data 3144
- 5 emits (.data=0x950): .data fuzzy 95.35 -> matched_data 760
The only objdiff-invisible emit is a Hidden symbol (objdiff marks
ELF Linkage-scope/STB_LOCAL symbols Hidden). But a local emit cannot
lose dedup, so its content (vtable pointers) would be written into the
DOL -> nonzero tail -> hash fails. A local *zero-content* object would
satisfy both, but that is an invented score-only pad — not used.
RESOLUTION: name orig's real tail objects in config/43U/symbols.txt.
The orig .o is rebuilt by `dtk dol split` from symbols.txt; the tail
region had no entries, so objdiff's left_max stopped at 0x87c while my
emitted vtables pushed right_max to 0x950 -> byte-path Insert penalty
-> .data 95.35 / matched_data 760. Adding the 5 real objects
(lbl_8164EFE4/+0x5C, lbl_8164F040/+0x18, lbl_8164F058/+0x20,
lbl_8164F078/+0x20, lbl_8164F098/+0x20 — the dedup'd vtable emits)
extends left_max to 0x950: the byte path then compares the full
2384-byte range (zeros vs zeros) -> .data fuzzy 100 -> matched_data
3144, all 95 fns 100, every section 100, DOL sha1
26116613f624061ba99c8d1a299aaa6efa85670d byte-identical.
Also disproven this session: (a) the "one object per bounded run" was
symbols.txt label granularity, not real .o granularity — plain literals
are the correct source form (orig emits a single `addi r7, r31, off`
per ref; any named-table ref `scX + N` forces a shared-base hoist =
2-insn addressing, verified by capstone); (b) `symbol_mappings` in
objdiff.json is ignored by objdiff-cli 3.4.5 report (issue #279), and
lbl_* names can't be used in source anyway; (c)
SymbolFlag::Ignored is mips-only — no way to hide emitted symbols from
scoring.
## eggAudioExpMgr — see linkgap-audio branch notes
(Sample class deleted; secondary-vt [dtor][calc] thunk-order handled on
agent/w1005/linkgap-audio.)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,46 +0,0 @@
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/scene/memoryCard/iplMemoryCardManager] pool: IDENTICAL
[src/scene/memoryCard/iplMemoryCardManager] objdiff: code 2572/5396 data None/None functions 18/26 fuzzy 97.8836 linked code 0
[src/scene/memoryCard/iplMemoryCardManager] instruction-exact functions: 18/26
[src/scene/memoryCard/iplMemoryCardManager] section .text size 5396 match 97.88362
[src/scene/memoryCard/iplMemoryCardManager] below 100: isMoveEnable__Q33ipl5scene17MemoryCardManagerFUcUlPl 99.830505
[src/scene/memoryCard/iplMemoryCardManager] below 100: isCopyEnable__Q33ipl5scene17MemoryCardManagerFUcUlPl 99.830505
[src/scene/memoryCard/iplMemoryCardManager] below 100: isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs 92.30769
[src/scene/memoryCard/iplMemoryCardManager] below 100: update_file_array__Q33ipl5scene17MemoryCardManagerFUc 99.72222
[src/scene/memoryCard/iplMemoryCardManager] below 100: _create_icon__Q33ipl5scene17MemoryCardManagerFUcsl 87.55
[src/scene/memoryCard/iplMemoryCardManager] below 100: getComment__Q33ipl5scene17MemoryCardManagerFUcsi 98.94309
[src/scene/memoryCard/iplMemoryCardManager] below 100: create_banner__Q33ipl5scene17MemoryCardManagerFUcs 90.42453
[src/scene/memoryCard/iplMemoryCardManager] below 100: getBlocks__Q33ipl5scene17MemoryCardManagerFUcs 92.0
[src/scene/memoryCard/iplMemoryCardManager] baseline: code 2572/5396 data None functions 18 fuzzy 97.8836
[src/scene/setting/iplRakuRakuThread] pool: IDENTICAL
[src/scene/setting/iplRakuRakuThread] objdiff: code 2168/2168 data 456/456 functions 14/14 fuzzy 100.0000 linked code 0
[src/scene/setting/iplRakuRakuThread] instruction-exact functions: 14/14
[src/scene/setting/iplRakuRakuThread] section .bss size 296 match 100.0
[src/scene/setting/iplRakuRakuThread] section .data size 136 match 100.0
[src/scene/setting/iplRakuRakuThread] section .sbss size 16 match 100.0
[src/scene/setting/iplRakuRakuThread] section .sdata size 8 match 100.0
[src/scene/setting/iplRakuRakuThread] section .text size 2168 match 100.0
[src/scene/setting/iplRakuRakuThread] baseline: code 1252/2168 data 456 functions 12 fuzzy 94.6900
[src/keyboard/tiCandidateBox] pool: IDENTICAL
[src/keyboard/tiCandidateBox] objdiff: code 19988/24000 data 4652/4652 functions 109/112 fuzzy 99.4395 linked code 0
[src/keyboard/tiCandidateBox] instruction-exact functions: 108/112
[src/keyboard/tiCandidateBox] section .ctors size 4 match 100.0
[src/keyboard/tiCandidateBox] section .data size 3488 match 100.0
[src/keyboard/tiCandidateBox] section .rodata size 1048 match 100.0
[src/keyboard/tiCandidateBox] section .sdata size 32 match 100.0
[src/keyboard/tiCandidateBox] section .sdata2 size 80 match 100.0
[src/keyboard/tiCandidateBox] section .text size 24000 match 99.4395
[src/keyboard/tiCandidateBox] below 100: create__Q39textinput12candidatebox12LayoutByNW4RFP12MEMAllocator 92.71023
[src/keyboard/tiCandidateBox] below 100: createAnmPane___Q39textinput12candidatebox12LayoutByNW4RFP12MEMAllocator 96.56481
[src/keyboard/tiCandidateBox] below 100: CalcPaneLocate___Q39textinput12candidatebox10UITextAreaFv 99.873566
[src/keyboard/tiCandidateBox] baseline: code 19988/24000 data 4652 functions 109 fuzzy 99.4395
regressions vs baseline: 0
global matched_code_percent: 90.71801 -> 90.74859
global fuzzy_match_percent: 99.57510 -> 99.57892
global complete_code_percent: 71.01273 -> 71.01273
global matched_data_percent: 99.36639 -> 99.36639
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
note: config touched: config/43U/symbols.txt (orchestrator reviews every config/symbols change)
GATE PASS

View File

@@ -1,21 +0,0 @@
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/scene/setting/iplRakuRakuThread] pool: IDENTICAL
[src/scene/setting/iplRakuRakuThread] objdiff: code 1636/2168 data 456/456 functions 13/14 fuzzy 97.7860 linked code 0
[src/scene/setting/iplRakuRakuThread] instruction-exact functions: 13/14
[src/scene/setting/iplRakuRakuThread] section .bss size 296 match 100.0
[src/scene/setting/iplRakuRakuThread] section .data size 136 match 100.0
[src/scene/setting/iplRakuRakuThread] section .sbss size 16 match 100.0
[src/scene/setting/iplRakuRakuThread] section .sdata size 8 match 100.0
[src/scene/setting/iplRakuRakuThread] section .text size 2168 match 97.78598
[src/scene/setting/iplRakuRakuThread] below 100: finish__Q33ipl5scene14RakuRakuThreadFP11NCDApConfigPi 90.97744
[src/scene/setting/iplRakuRakuThread] baseline: code 1252/2168 data 456 functions 12 fuzzy 94.6900
regressions vs baseline: 0
global matched_code_percent: 90.71801 -> 90.73083
global fuzzy_match_percent: 99.57510 -> 99.57732
global complete_code_percent: 71.01273 -> 71.01273
global matched_data_percent: 99.36639 -> 99.36639
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
note: config touched: config/43U/symbols.txt (orchestrator reviews every config/symbols change)
GATE PASS

View File

@@ -1,20 +0,0 @@
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/scene/setting/iplRakuRakuThread] pool: IDENTICAL
[src/scene/setting/iplRakuRakuThread] objdiff: code 2168/2168 data 456/456 functions 14/14 fuzzy 100.0000 linked code 0
[src/scene/setting/iplRakuRakuThread] instruction-exact functions: 14/14
[src/scene/setting/iplRakuRakuThread] section .bss size 296 match 100.0
[src/scene/setting/iplRakuRakuThread] section .data size 136 match 100.0
[src/scene/setting/iplRakuRakuThread] section .sbss size 16 match 100.0
[src/scene/setting/iplRakuRakuThread] section .sdata size 8 match 100.0
[src/scene/setting/iplRakuRakuThread] section .text size 2168 match 100.0
[src/scene/setting/iplRakuRakuThread] baseline: code 1252/2168 data 456 functions 12 fuzzy 94.6900
regressions vs baseline: 0
global matched_code_percent: 90.71801 -> 90.74859
global fuzzy_match_percent: 99.57510 -> 99.57892
global complete_code_percent: 71.01273 -> 71.01273
global matched_data_percent: 99.36639 -> 99.36639
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
note: config touched: config/43U/symbols.txt (orchestrator reviews every config/symbols change)
GATE PASS

View File

@@ -1,34 +0,0 @@
# rt8 HIGH report
Final full gate: GATE PASS. Full 43U build passed, DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d, zero regressions and zero forbidden/readability additions. Final gate output is rt8.high.final-gate.txt.
Before -> after:
- MemoryCardManager instruction-exact18->18, objdiff code2572->2572/5396, data absent.
- RakuRakuThread instruction-exact12->14, objdiff code1252->2168/2168, data456->456/456.
- tiCandidateBox gate instruction-exact108->108, objdiff exact109->109, code19988->19988/24000, data4652->4652/4652.
Remaining functions:
- isMoveEnable__Q33ipl5scene17MemoryCardManagerFUcUlPl | 99.830505% | two commuted address-add operands
- isCopyEnable__Q33ipl5scene17MemoryCardManagerFUcUlPl | 99.830505% | two commuted address-add operands
- isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs | 92.30769% | epilogue setup scheduled before flag load
- update_file_array__Q33ipl5scene17MemoryCardManagerFUc | 99.72222% | four command/address register substitutions
- _create_icon__Q33ipl5scene17MemoryCardManagerFUcsl | 87.55% | texture-base lifetimes, address operands and register allocation
- getComment__Q33ipl5scene17MemoryCardManagerFUcsi | 98.94309% | comment/trim pointer register allocation
- create_banner__Q33ipl5scene17MemoryCardManagerFUcs | 90.42453% | render address lifetimes and register allocation
- getBlocks__Q33ipl5scene17MemoryCardManagerFUcs | 92.0% | epilogue setup scheduled before size load
- create__Q39textinput12candidatebox12LayoutByNW4RFP12MEMAllocator | 92.71023% | inlined initialization loop and pane-name lifetimes
- createAnmPane___Q39textinput12candidatebox12LayoutByNW4RFP12MEMAllocator | 96.56481% | descriptor reloads and constructor register allocation
- CalcPaneLocate___Q39textinput12candidatebox10UITextAreaFv | 99.873566% | eleven forward-width f2/f3 substitutions
Matched this round:
- start__Q33ipl5scene14RakuRakuThreadFv: separate progress and configuration objects restore compiler BSS pooling,96/96 instructions,diffs0.
- finish__Q33ipl5scene14RakuRakuThreadFP11NCDApConfigPi: structured finish guard and typed inline privacy copy restore133/133 instructions,diffs0.
Data proof: previous F4-byte sRakuStatus bundled12-byte progress with adjacent232-byte configuration. Target callback copy/clear and result/clear API arguments prove separate C/E8 objects at unchanged810BDDE0/810BDDEC. Combined byte ownership and BSS section0x128 remain unchanged. Both functions and all data now match fully.
Commits: d408dadb,14b52bf2.
Retained implementation files: src/scene/setting/iplRakuRakuThread.cpp, config/43U/symbols.txt.
Verification files: rt8.attempts.md,rt8.high.raku13-gate.txt,rt8.high.raku14-gate.txt,rt8.high.final-gate.txt.
Measurement caveat: gate reports candidatebox108/112 while objdiff reports109/112. onGUIEvent raw1800bytes are identical; odiff treats a condition-register operand as a branch target and subtracts different function starts. Tools were not changed.
All remaining functions have at least three distinct compiled HIGH attempts recorded in rt8.attempts.md.