Compare commits

..

1 Commits

Author SHA1 Message Date
coah
5e283f768d ci: stop the separate README progress commit
Landings now write the README progress table inside their own commit,
so the progress job only rebuilds and publishes the numbers to the job
summary instead of pushing a second docs commit to main.
2026-10-02 15:51:07 +00:00
43 changed files with 234 additions and 12756 deletions

View File

@@ -53,9 +53,9 @@ Progress
<!-- progress:start -->
| Decompiled | Matched | Linked | Data |
|:---:|:---:|:---:|:---:|
| 99.58% | 90.72% | 71.01% | 99.37% |
| 99.55% | 90.33% | 69.37% | 99.37% |
units 955/1027 complete, functions 12359/12563 matched.
units 950/1027 complete, functions 12343/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

@@ -103,7 +103,7 @@ AtermThread = .bss:0x810C0958; // type:object size:0x318 scope:local align:32
Voices = .bss:0x810C0C80; // type:object size:0x1800 data:4byte
sZeroMem = .bss:0x810C2480; // type:object size:0x100 data:byte
s_player_thread_stack = .bss:0x810C2580; // type:object size:0x4000 scope:local
lbl_810C6580 = .bss:0x810C6580; // type:object size:0xC
lbl_810C6580 = .bss:0x810C6580; // type:object size:0x10
layoutGatherDestructorRecord = .bss:0x810C6590; // type:object size:0xC data:4byte
unInputedWCharColorDestructorRecord = .bss:0x810C659C; // type:object size:0xC data:4byte
charColorDestructorRecord = .bss:0x810C65A8; // type:object size:0xC data:4byte
@@ -8932,18 +8932,18 @@ TMCJPEGDEC_IdctBlock4x4_Col = .text:0x814EF810; // type:function size:0x224
TMCJPEGDEC_IdctBlock2x2_Col = .text:0x814EFA34; // type:function size:0x124
TMCJPEGDEC_IdctBlock1x1_Col = .text:0x814EFB58; // type:function size:0x44
TMCJPEGDEC_set_converterY8U8V8 = .text:0x814EFB9C; // type:function size:0x310
TMCJPEGDEC_converterYUV411toY8U8V8 = .text:0x814EFEAC; // type:function size:0x590 scope:local
TMCJPEGDEC_converterYUV411toY8U8V8edge = .text:0x814F043C; // type:function size:0x61C scope:local
TMCJPEGDEC_converterYUV422toY8U8V8 = .text:0x814F0A58; // type:function size:0x76C scope:local
TMCJPEGDEC_converterYUV422toY8U8V8edge = .text:0x814F11C4; // type:function size:0x61C scope:local
TMCJPEGDEC_converterYUV420toY8U8V8 = .text:0x814F17E0; // type:function size:0x768 scope:local
TMCJPEGDEC_converterYUV420toY8U8V8edge = .text:0x814F1F48; // type:function size:0x628 scope:local
TMCJPEGDEC_converterYUV211toY8U8V8 = .text:0x814F2570; // type:function size:0x5E0 scope:local
TMCJPEGDEC_converterYUV211toY8U8V8edge = .text:0x814F2B50; // type:function size:0x608 scope:local
TMCJPEGDEC_converterYUV444toY8U8V8 = .text:0x814F3158; // type:function size:0x18C scope:local
TMCJPEGDEC_converterYUV444toY8U8V8edge = .text:0x814F32E4; // type:function size:0x1C0 scope:local
TMCJPEGDEC_converterYUV400toY8U8V8 = .text:0x814F34A4; // type:function size:0x288 scope:local
TMCJPEGDEC_converterYUV400toY8U8V8edge = .text:0x814F372C; // type:function size:0x2BC scope:local
TMCJPEG_814EFEAC = .text:0x814EFEAC; // type:function size:0x590 scope:local
TMCJPEG_814F043C = .text:0x814F043C; // type:function size:0x61C scope:local
TMCJPEG_814F0A58 = .text:0x814F0A58; // type:function size:0x76C scope:local
TMCJPEG_814F11C4 = .text:0x814F11C4; // type:function size:0x61C scope:local
TMCJPEG_814F17E0 = .text:0x814F17E0; // type:function size:0x768 scope:local
TMCJPEG_814F1F48 = .text:0x814F1F48; // type:function size:0x628 scope:local
TMCJPEG_814F2570 = .text:0x814F2570; // type:function size:0x5E0 scope:local
TMCJPEG_814F2B50 = .text:0x814F2B50; // type:function size:0x608 scope:local
TMCJPEG_814F3158 = .text:0x814F3158; // type:function size:0x18C scope:local
TMCJPEG_814F32E4 = .text:0x814F32E4; // type:function size:0x1C0 scope:local
TMCJPEG_814F34A4 = .text:0x814F34A4; // type:function size:0x288 scope:local
TMCJPEG_814F372C = .text:0x814F372C; // type:function size:0x2BC scope:local
TMCJPEGDEC_set_converterRGB565 = .text:0x814F39E8; // type:function size:0x2A8
TMCJPEGDEC_converterYUV411toRGB565 = .text:0x814F3C90; // type:function size:0x364 scope:local
TMCJPEGDEC_converterYUV411toRGB565edge = .text:0x814F3FF4; // type:function size:0x1A8 scope:local
@@ -23829,7 +23829,7 @@ result$1126 = .sbss:0x81698E48; // type:object size:0x4 data:4byte
soState = .sbss:0x81698E50; // type:object size:0x1 scope:local data:byte
soError = .sbss:0x81698E54; // type:object size:0x4 scope:local data:4byte
soRegistered = .sbss:0x81698E58; // type:object size:0x4 scope:local data:4byte
soSocketRegistered = .sbss:0x81698E60; // type:object size:0x4 scope:local data:4byte
soSocketRegistered = .sbss:0x81698E60; // type:object size:0x8 scope:local data:4byte
sslRegistered = .sbss:0x81698E68; // type:object size:0x4 scope:local data:4byte
l_initialized = .sbss:0x81698E6C; // type:object size:0x4 scope:local data:4byte
VFipf_sys_set = .sbss:0x81698E70; // type:object size:0x4 scope:global data:4byte

View File

@@ -927,7 +927,7 @@ config.libs = [
Object(Matching, "keyboard/tiPkData.cpp", extra_cflags=["-O4,p"], shift_jis=False),
Object(Matching, "keyboard/tiLanguageIndependentData.cpp", extra_cflags=["-O4,p"], shift_jis=False),
Object(Matching, "keyboard/tiTextInputBase.cpp", extra_cflags=["-O4,p"]),
Object(Matching, "keyboard/MyTiManager.cpp", extra_cflags=["-O4,p"]),
Object(NonMatching, "keyboard/MyTiManager.cpp", extra_cflags=["-O4,p"]),
Object(Matching, "keyboard/MyTiInputForm.cpp", extra_cflags=["-O4,p"]),
Object(Matching, "keyboard/MyTiLetterForm.cpp", extra_cflags=["-O4,p"]),
Object(Matching, "keyboard/MyTiBg.cpp", extra_cflags=["-O4,p"]),
@@ -1005,7 +1005,7 @@ config.libs = [
Object(Matching, "clib/zi8ZHuwd.c"),
Object(NonMatching, "clib/zidawg1.c"),
Object(Matching, "clib/zikorean.c"),
Object(Matching, "clib/ziswordw.c"),
Object(NonMatching, "clib/ziswordw.c"),
Object(NonMatching, "clib/zkokeyp.c"),
Object(Matching, "clib/zierror.c"),
Object(NonMatching, "clib/zmtkey.c"),
@@ -1075,11 +1075,11 @@ config.libs = [
Object(Matching, "nwc24/NWC24Utils.c"),
Object(Matching, "nwc24/NWC24Manage.c"),
Object(Matching, "nwc24/NWC24MsgObj.c"),
Object(Matching, "nwc24/NWC24MBoxCtrl.c"),
Object(NonMatching, "nwc24/NWC24MBoxCtrl.c"),
Object(Matching, "nwc24/NWC24Mime.c"),
Object(Matching, "nwc24/NWC24Stream.c"),
Object(Matching, "nwc24/NWC24Parser.c"),
Object(Matching, "nwc24/NWC24MsgCommit.c"),
Object(NonMatching, "nwc24/NWC24MsgCommit.c"),
Object(Matching, "nwc24/NWC24MsgRead.c"),
Object(NonMatching, "nwc24/NWC24MsgSubject.c"),
Object(Matching, "nwc24/NWC24Schedule.c"),
@@ -1695,7 +1695,7 @@ config.libs = [
Object(Matching, "fa/pf_cluster.c"),
Object(Matching, "fa/pf_dir.c"),
Object(Matching, "fa/pf_entry.c"),
Object(Matching, "fa/pf_entry_iterator.c"),
Object(NonMatching, "fa/pf_entry_iterator.c"),
Object(NonMatching, "fa/pf_fat.c"),
Object(Matching, "fa/pf_fat12.c"),
Object(Matching, "fa/pf_fat16.c"),

View File

@@ -55,7 +55,7 @@ namespace textinput {
public:
Animation() : mfAnimationTime(0.0f), mbInAnimation(false), mbSE(false), mpAnimObserver(NULL) {}
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(MYTIMANAGER_IMPLEMENTATION)
#ifdef TIINPUTFORM_IMPLEMENTATION
virtual void startAnm(f32 start, f32 end, f32 duration, AnimObserver* observer, void* data);
#else
virtual void startAnm(AnimObserver*, f32, f32, f32, void*);

View File

@@ -38,19 +38,6 @@ namespace EGG {
virtual void calc(); // 0x30
#ifdef EGG_AUDIO_EXPMGR_NO_INLINE_VIRTUALS
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, u32 id); // 0x34
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, unsigned int id); // 0x38
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, const char* pName); // 0x3C
virtual bool prepareSound(nw4r::snd::SoundHandle* pHandle, u32 id); // 0x44
virtual bool prepareSound(nw4r::snd::SoundHandle* pHandle, unsigned int id); // 0x44
virtual bool prepareSound(nw4r::snd::SoundHandle* pHandle, const char* pName); // 0x48
virtual bool holdSound(nw4r::snd::SoundHandle* pHandle, u32 id); // 0x50
virtual bool holdSound(nw4r::snd::SoundHandle* pHandle, unsigned int id); // 0x50
virtual bool holdSound(nw4r::snd::SoundHandle* pHandle, const char* pName); // 0x58
#else
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, u32 id) { return mSoundArchivePlayer.StartSound(pHandle, id); } // 0x34
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, unsigned int id) { return mSoundArchivePlayer.StartSound(pHandle, id); } // 0x38
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, const char* pName) NO_INLINE {
@@ -79,7 +66,6 @@ namespace EGG {
u32 id = changeNameToId(pName);
return mSoundArchivePlayer.HoldSound(pHandle, id);
} // 0x58
#endif
u32 changeNameToId(const char* pName) { return mpArchive->ConvertLabelStringToSoundId(pName); }
const char* changeIdToName(u32 id) { return mpArchive->GetSoundLabelString(id); }

View File

@@ -19,10 +19,6 @@ namespace EGG {
~SoundHeapMgr() { destroySoundHeap(); }
#ifdef EGG_AUDIO_EXPMGR_NO_INLINE_VIRTUALS
virtual bool loadState(s32 id); // 0x08
virtual s32 getCurrentLevel(); // 0x0C
#else
virtual bool loadState(s32 id) {
#ifdef IPL_SOUND_MATCHING
if (id > 0 && mHeap.GetCurrentLevel() >= id) {
@@ -39,7 +35,6 @@ namespace EGG {
} // 0x08
virtual s32 getCurrentLevel() { return mHeap.GetCurrentLevel(); } // 0x0C
#endif
s32 saveState() { return mHeap.SaveState(); }

View File

@@ -1,5 +1,3 @@
#define EGG_AUDIO_EXPMGR_NO_INLINE_VIRTUALS
#include <egg/core.h>
namespace EGG {

View File

@@ -1120,7 +1120,6 @@ static int __wpformatter(void* (*write_proc)(void*, const wchar_t*, size_t),
case 's':
if (format.argument_options == wchar_argument) {
wchar_t* wcs_ptr = va_arg(args, wchar_t*);
int wideLength;
if (wcs_ptr == NULL) {
wcs_ptr = L"";
@@ -1128,24 +1127,22 @@ static int __wpformatter(void* (*write_proc)(void*, const wchar_t*, size_t),
if (format.alternate_form) {
wchar_t first = *wcs_ptr++;
wideLength = (unsigned char)first;
num_chars = (unsigned char)first;
if (format.precision_specified && wideLength > format.precision) {
wideLength = format.precision;
if (format.precision_specified && num_chars > format.precision) {
num_chars = format.precision;
}
} else if (format.precision_specified) {
wideLength = format.precision;
num_chars = format.precision;
if ((string_end = wmemchr((wchar_t*)wcs_ptr, 0, wideLength)) != 0) {
wideLength = string_end - wcs_ptr;
if ((string_end = wmemchr((wchar_t*)wcs_ptr, 0, num_chars)) != 0) {
num_chars = string_end - wcs_ptr;
}
} else {
wideLength = wcslen(wcs_ptr);
num_chars = wcslen(wcs_ptr);
}
num_chars = wideLength;
buff_ptr = wcs_ptr;
break;
} else {

View File

@@ -19,13 +19,8 @@ namespace nw4r {
template <typename T>
class AutoLock : private NonCopyable {
public:
#ifdef EGG_AUDIO_EXPMGR_NO_INLINE_VIRTUALS
explicit AutoLock(T& rLockObj);
~AutoLock();
#else
explicit AutoLock(T& rLockObj) : mLockObj(rLockObj) { Lock(rLockObj); }
~AutoLock() { Unlock(mLockObj); }
#endif
private:
T& mLockObj; // 0x00

View File

@@ -16,7 +16,7 @@ static u16 readU16(const u8* p, u16 byteOrder) {
}
static u16 readExifU16(const u8* data, u16 byteOrder) {
u16 value = data[0] | data[1] << 8;
u32 value = data[0] | data[1] << 8;
if (byteOrder == 0x4949) {
return (u16)value;
}
@@ -246,9 +246,9 @@ static s32 TMCJPEGDEC_exif_parse(const u8* data, u32 size, TMCCJPEGDecExifData*
u32 ifdOffset;
const u8* entries;
u16 remaining;
u16 index;
s32 entriesSize;
u16 count;
s32 entriesSize;
u16 index;
pInfo->thumbnailData = (u8*)data;
pInfo->dataEnd = (u8*)data + size;
pInfo->nextIfdOffset = 0;
@@ -339,16 +339,18 @@ static s32 TMCJPEGDEC_exif_parse(const u8* data, u32 size, TMCCJPEGDecExifData*
}
static void TMCJPEGDEC_IFD0_tag_parse(TMCCJPEGDecExifData* pInfo, u16 byteOrder, const u8* entry) {
s32 tag;
u32 type;
u16 tag;
u16 type;
tag = readU16(entry, byteOrder);
type = readU16(entry + 2, byteOrder);
switch (tag) {
case 0x0103:
case 0x0111: {
return;
case 0x0111:
case 0x0201:
case 0x0202: {
break;
}
case 0x0112: {
pInfo->orientation = readU16(entry + 8, byteOrder);
@@ -484,11 +486,6 @@ static void TMCJPEGDEC_IFD0_tag_parse(TMCCJPEGDecExifData* pInfo, u16 byteOrder,
}
return;
}
case 0x0201:
case 0x0202:
default: {
break;
}
}
}
@@ -496,12 +493,17 @@ static void TMCJPEGDEC_IFD1_tag_parse(TMCCJPEGDecExifData* pInfo, u16 byteOrder,
s32 tag = readU16(entry, byteOrder);
switch (tag) {
case 0x0102: {
case 0x0132:
case 0x0111:
case 0x0112:
case 0x012D:
case 0x0213:
case 0x8769:
case 0x9000:
case 0x9101:
case 0xA003: {
break;
}
case 0x0111: {
return;
}
case 0x011A: {
u32 offset;
const u8* p;
@@ -546,19 +548,10 @@ static void TMCJPEGDEC_IFD1_tag_parse(TMCCJPEGDecExifData* pInfo, u16 byteOrder,
pInfo->yResDenIfd1 = readU32(p, byteOrder);
return;
}
case 0x0112: {
break;
}
case 0x0128: {
pInfo->resUnitIfd1 = readU16(entry + 8, byteOrder);
return;
}
case 0x012D: {
break;
}
case 0x0132: {
break;
}
case 0x0103: {
pInfo->compressionIfd1 = readU16(entry + 8, byteOrder);
return;
@@ -571,24 +564,6 @@ static void TMCJPEGDEC_IFD1_tag_parse(TMCCJPEGDecExifData* pInfo, u16 byteOrder,
pInfo->thumbnailLength = readU32(entry + 8, byteOrder);
return;
}
case 0x0213: {
break;
}
case 0x8769: {
break;
}
case 0x9000: {
break;
}
case 0x9101: {
break;
}
case 0xA003: {
break;
}
default: {
break;
}
}
}

View File

@@ -1,18 +1,18 @@
#define TMC_JPEG_PLANAR_OUTPUT
#include <tmc_jpeg_internal.h>
static void TMCJPEGDEC_converterYUV411toY8U8V8(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEGDEC_converterYUV411toY8U8V8edge(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEGDEC_converterYUV422toY8U8V8(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEGDEC_converterYUV422toY8U8V8edge(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEGDEC_converterYUV420toY8U8V8(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEGDEC_converterYUV420toY8U8V8edge(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEGDEC_converterYUV211toY8U8V8(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEGDEC_converterYUV211toY8U8V8edge(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEGDEC_converterYUV444toY8U8V8(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEGDEC_converterYUV444toY8U8V8edge(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEGDEC_converterYUV400toY8U8V8(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEGDEC_converterYUV400toY8U8V8edge(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEG_814EFEAC(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEG_814F043C(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEG_814F0A58(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEG_814F11C4(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEG_814F17E0(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEG_814F1F48(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEG_814F2570(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEG_814F2B50(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEG_814F3158(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEG_814F32E4(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEG_814F34A4(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEG_814F372C(TMCCJPEGDecWork*, s32, s32);
s32 TMCJPEGDEC_set_converterY8U8V8(TMCCJPEGDecWork* work) {
u8* buffer;
@@ -35,8 +35,8 @@ s32 TMCJPEGDEC_set_converterY8U8V8(TMCCJPEGDecWork* work) {
mode = work->idctMode;
firstRow = buffer + 4;
work->pConverterFunc = TMCJPEGDEC_converterYUV411toY8U8V8;
work->pConverterFuncEdge = TMCJPEGDEC_converterYUV411toY8U8V8edge;
work->pConverterFunc = TMCJPEG_814EFEAC;
work->pConverterFuncEdge = TMCJPEG_814F043C;
secondRow = firstRow + mode;
thirdRow = secondRow + mode;
fourthRow = thirdRow + mode;
@@ -61,8 +61,8 @@ s32 TMCJPEGDEC_set_converterY8U8V8(TMCCJPEGDecWork* work) {
mode = work->idctMode;
firstRow = buffer + 4;
work->pConverterFunc = TMCJPEGDEC_converterYUV422toY8U8V8;
work->pConverterFuncEdge = TMCJPEGDEC_converterYUV422toY8U8V8edge;
work->pConverterFunc = TMCJPEG_814F0A58;
work->pConverterFuncEdge = TMCJPEG_814F11C4;
secondRow = firstRow + mode;
cbBlock = buffer + 132;
crBlock = buffer + 196;
@@ -85,8 +85,8 @@ s32 TMCJPEGDEC_set_converterY8U8V8(TMCCJPEGDecWork* work) {
mode = work->idctMode;
firstRow = buffer + 4;
work->pConverterFunc = TMCJPEGDEC_converterYUV420toY8U8V8;
work->pConverterFuncEdge = TMCJPEGDEC_converterYUV420toY8U8V8edge;
work->pConverterFunc = TMCJPEG_814F17E0;
work->pConverterFuncEdge = TMCJPEG_814F1F48;
secondRow = firstRow + mode;
thirdRow = firstRow + mode * 16;
fourthRow = thirdRow + mode;
@@ -111,8 +111,8 @@ s32 TMCJPEGDEC_set_converterY8U8V8(TMCCJPEGDecWork* work) {
mode = work->idctMode;
firstRow = buffer + 4;
work->pConverterFunc = TMCJPEGDEC_converterYUV211toY8U8V8;
work->pConverterFuncEdge = TMCJPEGDEC_converterYUV211toY8U8V8edge;
work->pConverterFunc = TMCJPEG_814F2570;
work->pConverterFuncEdge = TMCJPEG_814F2B50;
secondRow = firstRow + mode * 8;
cbBlock = buffer + 132;
crBlock = buffer + 196;
@@ -127,8 +127,8 @@ s32 TMCJPEGDEC_set_converterY8U8V8(TMCCJPEGDecWork* work) {
case 4: {
TMCConverterFunc* converter;
TMCConverterFunc* edgeConverter;
converter = TMCJPEGDEC_converterYUV444toY8U8V8;
edgeConverter = TMCJPEGDEC_converterYUV444toY8U8V8edge;
converter = TMCJPEG_814F3158;
edgeConverter = TMCJPEG_814F32E4;
work->pConvRowPtrs[0] = buffer + 4;
work->pConvRowPtrs[5] = buffer + 0x44;
work->pConvRowPtrs[6] = buffer + 0x84;
@@ -141,8 +141,8 @@ s32 TMCJPEGDEC_set_converterY8U8V8(TMCCJPEGDecWork* work) {
case 5: {
TMCConverterFunc* converter;
TMCConverterFunc* edgeConverter;
converter = TMCJPEGDEC_converterYUV400toY8U8V8;
edgeConverter = TMCJPEGDEC_converterYUV400toY8U8V8edge;
converter = TMCJPEG_814F34A4;
edgeConverter = TMCJPEG_814F372C;
work->pConvRowPtrs[0] = buffer + 4;
work->pConverterFunc = converter;
work->pConverterFuncEdge = edgeConverter;
@@ -168,7 +168,7 @@ s32 TMCJPEGDEC_set_converterY8U8V8(TMCCJPEGDecWork* work) {
return 0;
}
static void TMCJPEGDEC_converterYUV411toY8U8V8(TMCCJPEGDecWork* work, s32 x, s32 y) {
static void TMCJPEG_814EFEAC(TMCCJPEGDecWork* work, s32 x, s32 y) {
s32 rowSkip;
u8* output;
u32 tileRow;
@@ -232,7 +232,7 @@ static void TMCJPEGDEC_converterYUV411toY8U8V8(TMCCJPEGDecWork* work, s32 x, s32
}
}
static void TMCJPEGDEC_converterYUV411toY8U8V8edge(TMCCJPEGDecWork* work, s32 x, s32 y) {
static void TMCJPEG_814F043C(TMCCJPEGDecWork* work, s32 x, s32 y) {
TMCCJPEGDecState* state;
u8* lumaTexture;
u8* luminance;
@@ -298,7 +298,7 @@ static void TMCJPEGDEC_converterYUV411toY8U8V8edge(TMCCJPEGDecWork* work, s32 x,
}
}
static void TMCJPEGDEC_converterYUV422toY8U8V8(TMCCJPEGDecWork* work, s32 x, s32 y) {
static void TMCJPEG_814F0A58(TMCCJPEGDecWork* work, s32 x, s32 y) {
s32 chromaYEnd;
u8* lumaTexture;
u8* luminance;
@@ -357,7 +357,7 @@ static void TMCJPEGDEC_converterYUV422toY8U8V8(TMCCJPEGDecWork* work, s32 x, s32
}
}
static void TMCJPEGDEC_converterYUV422toY8U8V8edge(TMCCJPEGDecWork* work, s32 x, s32 y) {
static void TMCJPEG_814F11C4(TMCCJPEGDecWork* work, s32 x, s32 y) {
TMCCJPEGDecState* state;
u8* lumaTexture;
u8* luminance;
@@ -423,7 +423,7 @@ static void TMCJPEGDEC_converterYUV422toY8U8V8edge(TMCCJPEGDecWork* work, s32 x,
}
}
static void TMCJPEGDEC_converterYUV420toY8U8V8(TMCCJPEGDecWork* work, s32 x, s32 y) {
static void TMCJPEG_814F17E0(TMCCJPEGDecWork* work, s32 x, s32 y) {
s32 chromaYEnd;
u8* lumaTexture;
s32 height;
@@ -479,7 +479,7 @@ static void TMCJPEGDEC_converterYUV420toY8U8V8(TMCCJPEGDecWork* work, s32 x, s32
}
}
static void TMCJPEGDEC_converterYUV420toY8U8V8edge(TMCCJPEGDecWork* work, s32 x, s32 y) {
static void TMCJPEG_814F1F48(TMCCJPEGDecWork* work, s32 x, s32 y) {
TMCCJPEGDecState* state;
u8* lumaTexture;
u8* luminance;
@@ -546,7 +546,7 @@ static void TMCJPEGDEC_converterYUV420toY8U8V8edge(TMCCJPEGDecWork* work, s32 x,
}
}
static void TMCJPEGDEC_converterYUV211toY8U8V8(TMCCJPEGDecWork* work, s32 x, s32 y) {
static void TMCJPEG_814F2570(TMCCJPEGDecWork* work, s32 x, s32 y) {
u8* lumaTexture;
TMCCJPEGDecState* state;
u8* luminance;
@@ -602,7 +602,7 @@ static void TMCJPEGDEC_converterYUV211toY8U8V8(TMCCJPEGDecWork* work, s32 x, s32
}
}
static void TMCJPEGDEC_converterYUV211toY8U8V8edge(TMCCJPEGDecWork* work, s32 x, s32 y) {
static void TMCJPEG_814F2B50(TMCCJPEGDecWork* work, s32 x, s32 y) {
u32 chromaTileWidth;
TMCCJPEGDecState* state;
u8* lumaTexture;
@@ -667,7 +667,7 @@ static void TMCJPEGDEC_converterYUV211toY8U8V8edge(TMCCJPEGDecWork* work, s32 x,
}
}
static void TMCJPEGDEC_converterYUV444toY8U8V8(TMCCJPEGDecWork* work, s32 x, s32 y) {
static void TMCJPEG_814F3158(TMCCJPEGDecWork* work, s32 x, s32 y) {
s32 rowSkip;
u8* output;
s32 height;
@@ -722,7 +722,7 @@ static void TMCJPEGDEC_converterYUV444toY8U8V8(TMCCJPEGDecWork* work, s32 x, s32
}
}
static void TMCJPEGDEC_converterYUV444toY8U8V8edge(TMCCJPEGDecWork* work, s32 x, s32 y) {
static void TMCJPEG_814F32E4(TMCCJPEGDecWork* work, s32 x, s32 y) {
s32 rowSkip;
u8* output;
s32 height;
@@ -785,7 +785,7 @@ static void TMCJPEGDEC_converterYUV444toY8U8V8edge(TMCCJPEGDecWork* work, s32 x,
}
}
static void TMCJPEGDEC_converterYUV400toY8U8V8(TMCCJPEGDecWork* work, s32 x, s32 y) {
static void TMCJPEG_814F34A4(TMCCJPEGDecWork* work, s32 x, s32 y) {
s32 height;
u8* lumaTexture;
u8* luminance;
@@ -821,7 +821,7 @@ static void TMCJPEGDEC_converterYUV400toY8U8V8(TMCCJPEGDecWork* work, s32 x, s32
}
}
static void TMCJPEGDEC_converterYUV400toY8U8V8edge(TMCCJPEGDecWork* work, s32 x, s32 y) {
static void TMCJPEG_814F372C(TMCCJPEGDecWork* work, s32 x, s32 y) {
s32 height;
u8* lumaTexture;
u8* luminance;

View File

@@ -753,7 +753,8 @@ static int zi8InternalGetZH(ziGetParam* request, ZiChineseOptions* options, ziPt
if (!componentTable) {
componentCount = Zi8GetTableCount(1, 7, work);
componentOrdinals = (ziU8*)Zi8GetTableAddress(1, 7, work);
componentTable = componentCursor = (ziU8*)Zi8GetTableAddress(1, 2, work);
componentCursor = (ziU8*)Zi8GetTableAddress(1, 2, work);
componentTable = componentCursor;
componentCursor += 8;
--componentCount;
componentIndex = componentCount;

View File

@@ -41,7 +41,7 @@ ziBool Zi8_81480224(ziUserWord* word ZI_NEED_WORK) {
current = ZI_WORK->uwdList;
while (current != 0) {
candidate = (ziUserWord*)current->word;
if (ZI_WORK->unk_0x12E == 1 && candidate->priority < word->priority) break;
if (ZI_WORK->unk_0x12E == 1 && word->priority > candidate->priority) break;
if (candidate->length == length) {
position = 0;
while (position < length) {

View File

@@ -41,13 +41,6 @@ ziU32 ZiDAWGGetChild(ziU32 node) {
return node;
}
typedef struct ziDawgLongOffset {
ziU8 flags;
ziU8 middle;
ziU8 low;
} ziDawgLongOffset;
typedef char ziDawgLongOffsetSizeCheck[(sizeof(ziDawgLongOffset) == 3) ? 1 : -1];
ziU8* ZiDAWGGetSibling(ziU8* cursor) {
ziS32 depth;
ziU8* node;
@@ -77,14 +70,14 @@ ziU8* ZiDAWGGetSibling(ziU8* cursor) {
}
if ((*cursor & 0x80) != 0) {
node += (((const ziDawgLongOffset*)cursor)->flags & 0x7f) * 0x10000 +
(((ziU32)(ziU16)cursor[1] << 8) +
((const ziDawgLongOffset*)cursor)->low) + 0x8000;
node += (*cursor & 0x7f) * 0x10000 +
(((ziU32)cursor[1] << 8) + (ziU32)cursor[2]) + 0x8000;
} else {
node = cursor[1] + (node + (ziU16)*cursor * 0x100);
}
return node;
} else {
cursor = node;
do {
header = nodeHeaderTable[cursor[0] >> 4];
if ((cursor[0] & 0xf) == 0xf) {

View File

@@ -25,12 +25,6 @@ ziU8 Zi8GetFormatVersion(ziU8 ZI_NEED_WORK);
ziPtr Zi8GetTableAddress(ziU8, ziU8 ZI_NEED_WORK);
ziU16 Zi8Uni2Ord(ziWChar ZI_NEED_WORK);
typedef struct ziEncodedOrdinal {
ziU8 low;
ziU8 high;
} ziEncodedOrdinal;
typedef char ziEncodedOrdinalSizeCheck[(sizeof(ziEncodedOrdinal) == 2) ? 1 : -1];
ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
ziChineseEntry* table = 0;
ziU8* baseData = 0;
@@ -140,10 +134,10 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
countLeft = count;
cursor = ordinals;
while (countLeft > 0) {
value = ((ziU32)(ziU16)data[1] << 8) |
((const ziEncodedOrdinal*)data)->low;
value = (data[1] << 8) | data[0];
data += 2;
if (value != *++cursor) break;
cursor++;
if (value != *cursor) break;
countLeft--;
if (value & 0x8000) break;
}

View File

@@ -30,7 +30,8 @@ ziU8 Zi8MatchOEMdata(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar* word
index = ZI_WORK->oemIdx;
if ((ziS32)index >= ZI_WORK->oemLen) goto failed;
if (ZI_WORK->oemMatch == 0) goto failed;
if ((ziS32)length >= (ziS32)--capacity) {
capacity--;
if ((ziS32)length >= (ziS32)capacity) {
failed:
return 0;
}

View File

@@ -550,15 +550,7 @@ pf_s32 PFCACHE_DoWriteSector(PF_VOLUME* p_vol, PF_CACHE_PAGE** pp_head, const pf
#pragma dont_inline reset
static inline pf_u32 PFCACHE_RecordPageEndOverlap(PF_CACHE_PAGE* p_page, pf_u32 end_sector, pf_u32* p_num_success, pf_u32* p_num_rest_sector) {
pf_u32 last_sector = end_sector - 1;
pf_u32 num_overlap = end_sector - p_page->sector;
*p_num_success += num_overlap;
*p_num_rest_sector -= num_overlap;
p_page->stat |= 2;
return last_sector;
}
#pragma dont_inline on
pf_s32 PFCACHE_DoWriteNumSectorAndFreeIfNeeded(PF_VOLUME* p_vol, PF_CACHE_PAGE** pp_head, const pf_u8* p_buf, pf_u32 sector,
pf_u32 num_sector, pf_u32* p_num_success) {
PF_CACHE_PAGE* p_page = PF_NULL;
@@ -617,9 +609,11 @@ pf_s32 PFCACHE_DoWriteNumSectorAndFreeIfNeeded(PF_VOLUME* p_vol, PF_CACHE_PAGE**
(p_page->sector + p_page->size) >= (sector + num_sector)) {
pf_memcpy(p_page->buffer, (pf_u8*)&p_buf[(p_page->sector - sector) << p_vol->bpb.log2_bytes_per_sector],
(sector + num_sector - p_page->sector) << p_vol->bpb.log2_bytes_per_sector);
num_overlap = num_sector;
num_overlap += sector;
last_sector = PFCACHE_RecordPageEndOverlap(p_page, num_overlap, p_num_success, &num_rest_sector);
num_overlap = p_page->size - ((p_page->sector + p_page->size) - (num_sector + sector));
last_sector = p_page->sector + num_overlap - 1;
*p_num_success += num_overlap;
num_rest_sector -= num_overlap;
p_page->stat |= 2;
p_ebuf = &p_page->buffer[(last_sector - p_page->sector) << p_vol->bpb.log2_bytes_per_sector];
p_page->p_mod_sbuf = p_page->buffer;
if (p_page->p_mod_ebuf == NULL || p_page->p_mod_ebuf < p_ebuf) {

View File

@@ -511,8 +511,8 @@ pf_s32 PFENT_ITER_FindCluster(PF_DIR_ENT* p_ent, pf_u32 cluster, pf_bool* p_is_f
iter.ffd.cluster_link.buffer = PF_NULL;
iter.log2_entries_per_sector = p_ent->p_vol->bpb.log2_bytes_per_sector - 5;
iter.file_sector_index = sector_index;
iter.offset_mask = (1U << iter.log2_entries_per_sector) - 1;
entries_per_sector = 1U << iter.log2_entries_per_sector;
entries_per_sector = 1 << iter.log2_entries_per_sector;
iter.offset_mask = entries_per_sector - 1;
iter.p_vol = p_ent->p_vol;
iter.sector = p_ent->entry_sector;
iter.offset = p_ent->entry_offset;

View File

@@ -1458,19 +1458,6 @@ s32 PFFAT_CountFreeClusters(PF_VOLUME* volume, u32* numFreeClusters)
return 0;
}
static inline s32 PFFAT_ClearEntryWithBuf(PF_VOLUME* volume, u32 cluster, PF_CACHE_PAGE* page) {
switch (volume->bpb.fat_type) {
case FAT_12:
return PFFAT12_WriteFATEntryWithBuf(volume, (u16)cluster, 0, page);
case FAT_16:
return PFFAT16_WriteFATEntryWithBuf(volume, cluster, 0, page);
case FAT_32:
return PFFAT32_WriteFATEntryWithBuf(volume, cluster, 0, page);
default:
return 15;
}
}
s32 PFFAT_FreeChain(PFFAT_FFD* file, u32 startCluster, u32 chainIndex,
u32 size)
{
@@ -1536,9 +1523,9 @@ s32 PFFAT_FreeChain(PFFAT_FFD* file, u32 startCluster, u32 chainIndex,
}
if (nextCluster == 0) {
s32 firstFlushError;
u32 fatSector;
PF_CACHE_PAGE* flushPage;
u16 fatIndex;
const PF_CACHE_PAGE* flushPage;
u32 fatSector;
firstFlushError = 0;
flushPage = page;
@@ -1559,20 +1546,34 @@ s32 PFFAT_FreeChain(PFFAT_FFD* file, u32 startCluster, u32 chainIndex,
PFCACHE_FreeDataPage(volume, page);
return 0;
}
{
s32 writeError;
if (chainIndex != -1) {
writeError = PFFAT_WriteClusterWithBuf(file, startCluster, chainIndex,
0, 1, page);
chainIndex++;
} else {
writeError = PFFAT_ClearEntryWithBuf(volume, startCluster, page);
}
if (writeError != 0) {
PFCACHE_FreeDataPage(volume, page);
return writeError;
if (chainIndex != -1) {
error = PFFAT_WriteClusterWithBuf(file, startCluster, chainIndex,
0, 1, page);
chainIndex++;
} else {
currentPage = page;
switch (volume->bpb.fat_type) {
case FAT_12:
error = PFFAT12_WriteFATEntryWithBuf(
volume, (u16)startCluster, 0, currentPage);
break;
case FAT_16:
error = PFFAT16_WriteFATEntryWithBuf(volume, startCluster, 0,
currentPage);
break;
case FAT_32:
error = PFFAT32_WriteFATEntryWithBuf(volume, startCluster, 0,
currentPage);
break;
default:
error = 15;
break;
}
}
if (error != 0) {
PFCACHE_FreeDataPage(volume, page);
return error;
}
if (size != 0 && fileSize != 0) {
if (fileSize <= clusterSize) {
fileSize = 0;
@@ -1589,7 +1590,7 @@ s32 PFFAT_FreeChain(PFFAT_FFD* file, u32 startCluster, u32 chainIndex,
s32 firstFlushError;
u32 fatSector;
u16 fatIndex;
const PF_CACHE_PAGE* flushPage;
PF_CACHE_PAGE* flushPage;
firstFlushError = 0;
flushPage = page;

View File

@@ -120,11 +120,10 @@ NWC24Err NWC24iMinutesToOSCalendarTime(OSCalendarTime* calendar, s32 minutes) {
NWC24Err NWC24iDateToOSCalendarTime(OSCalendarTime* calendar, const NWC24Date* date) {
BOOL isLeapYear;
s32 days;
const u16 year = date->year;
isLeapYear = 0;
calendar->year = year;
calendar->year = date->year;
calendar->mon = date->month - 1;
calendar->mday = date->day;
calendar->hour = date->hour;
@@ -133,7 +132,7 @@ NWC24Err NWC24iDateToOSCalendarTime(OSCalendarTime* calendar, const NWC24Date* d
calendar->msec = 0;
calendar->usec = 0;
calendar->yday = date->day + DAYS_OF_YEAR[date->month - 1] - 1;
if (((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)) {
if (((date->year % 4 == 0 && date->year % 100 != 0) || date->year % 400 == 0)) {
isLeapYear = 1;
}
if (isLeapYear && date->month > 2) {
@@ -228,9 +227,8 @@ void ConvertDaysToDate(u16* year, u8* month, u8* day, s32 days) {
for (;;) {
s32 previousDays;
u8 currentMonth;
const u8* parsedMonth = month;
previousDays = days;
currentMonth = *parsedMonth;
currentMonth = *month;
if (currentMonth == 2 && IsLeapYear(*year)) {
days -= 29;
} else {

View File

@@ -64,7 +64,7 @@ static NWC24Err ClearMBCEntry(MBCHeader* header, NWC24File* file, u32 offset);
static NWC24Err MountVFMBox(NWC24MBoxType type);
static NWC24Err CopyMsgObjToMBCFmt(const NWC24MsgObjPrivate* msg, MBCEntry* entry);
static NWC24Err CopyMsgObjToPrvFmt(const MBCEntry* entry, NWC24MsgObjPrivate* msg) NO_INLINE;
BOOL NWC24iIsMsgObjReadable(MBCEntry* entry) NO_INLINE;
BOOL NWC24iIsMsgObjReadable(const MBCEntry* entry) NO_INLINE;
NWC24Err NWC24CreateVF(const char* path, u32 size);
static inline NWC24Err MakeCtrlPath(char* path, NWC24MBoxType type) {
@@ -221,7 +221,7 @@ NWC24Err NWC24GetMsgObj(NWC24MsgObj* msg, NWC24MBoxType type, u32 id) {
return result;
}
BOOL NWC24iIsMsgObjReadable(MBCEntry* entry) {
BOOL NWC24iIsMsgObjReadable(const MBCEntry* entry) {
if (!(entry->type & 0x200000))
return FALSE;
if (entry->type & 0xFE000000)

View File

@@ -430,17 +430,14 @@ static NWC24Err CheckMsgObject(const NWC24MsgObjPrivate* msg) {
return NWC24_OK;
}
static inline u32 Base64StorageSize(const u32* byteCount) {
return (*byteCount * 4 + 2) / 3 + *byteCount / 57 * 2 + 4;
}
static NWC24Err CheckMsgBoxSpace(const NWC24MsgObjPrivate* msg, NWC24MBoxType type) {
u32 total = 0;
u32 textSize = 0;
s32 index;
NWC24Err err;
for (index = 0; index < msg->numAttached; ++index) {
total += Base64StorageSize(&msg->attachedSize[index]);
u32 size = msg->attachedSize[index];
total += (size * 4 + 2) / 3 + size / 57 * 2 + 4;
}
switch (msg->encoding) {
case NWC24_ENC_7BIT:
@@ -769,14 +766,19 @@ static NWC24Err WriteMIMEAttachHeader(NWC24MsgObjPrivate* msg, u32 index) {
char* buffer;
const char* mime;
const char* suffix;
int mimeLength;
s32 typeLength, encodingLength, dispositionLength, mimeLength;
s32 first, second, third, total;
NWC24Err err;
Mail_memset(NWC24WorkP->stringWork, 0, 1024);
buffer = NWC24WorkP->stringWork;
mime = NWC24GetMIMETypeStr(msg->attachedType[index]);
suffix = NWC24iGetMIMETypeSuffix(msg->attachedType[index]);
mimeLength = (Mail_strlen(ContentTypeA) + Mail_strlen(ContentTxEncA)) + Mail_strlen(ContentDispA) + Mail_strlen(mime) + 4;
encodingLength = Mail_strlen(ContentTxEncA);
typeLength = Mail_strlen(ContentTypeA);
dispositionLength = Mail_strlen(ContentDispA);
typeLength += encodingLength;
mimeLength = Mail_strlen(mime);
mimeLength = (dispositionLength + typeLength) + mimeLength + 4;
if (mimeLength >= 1024)
return NWC24_ERR_NOMEM;
first = Mail_sprintf(buffer, (char*)ContentTypeA, mime, (char)('a' + index), msg->msgId, suffix);

View File

@@ -817,7 +817,6 @@ done:
NWC24Err NWC24iSetMsgSubjectBase64(NWC24MsgObj* msg, const u16* subject, u32 subjectSize, NWC24EncodingRegion region, u16 alternative, u8* work,
u32 workSize, NWC24Charset charset, char* charsetName) {
const u8* encodedInput = work;
u8* second;
u32 secondSize;
u32 workHalf;
@@ -845,7 +844,7 @@ NWC24Err NWC24iSetMsgSubjectBase64(NWC24MsgObj* msg, const u16* subject, u32 sub
default: goto done;
}
}
result = NWC24EncodeWord(second, secondSize, &outputLength, charsetName, 0x40, 'B', (u8*)encodedInput, workHalf - 1);
result = NWC24EncodeWord(second, secondSize, &outputLength, charsetName, 0x40, 'B', work, workHalf - 1);
switch (result) { case NWC24_OK: break; default: goto done; }
{
sourceOffset = subjectLength;
@@ -873,7 +872,7 @@ NWC24Err NWC24iSetMsgSubjectBase64(NWC24MsgObj* msg, const u16* subject, u32 sub
default: goto done;
}
}
result = NWC24EncodeWord(second + total, secondSize - total, &outputLength, charsetName, 0x40, 'B', (u8*)encodedInput, workHalf - 1);
result = NWC24EncodeWord(second + total, secondSize - total, &outputLength, charsetName, 0x40, 'B', work, workHalf - 1);
switch (result) { case NWC24_OK: break; default: goto done; }
sourceOffset += subjectLength;
total = total + outputLength - 1;

View File

@@ -138,9 +138,9 @@ int SOGetSockName(int socket, void* address) {
int size;
int result;
s32 rm;
NameRequest* request;
SOSockAddr* reply;
SOSockAddr* addr;
SOSockAddr* reply;
NameRequest* request;
addr=address;
if((result=SOiPrepare(NULL,&rm))==0) {
if(!addr || addr->len>8 || addr->len<8) result=-28;

View File

@@ -101,7 +101,7 @@ int SOGetInterfaceOpt(void* interface, int level, int option, void* value, int*
int size;
int result;
InterfaceOption* request;
const InterfaceCommand* command;
InterfaceCommand* command;
int* returnedLength;
u8* reply;
if ((result=SOiPrepareTempRm(NULL,&rm,&temporary))==0) {
@@ -112,7 +112,7 @@ int SOGetInterfaceOpt(void* interface, int level, int option, void* value, int*
if(!request) result=-49;
else {
command=&request->command;
request->command.level=level; request->command.option=option;
command->level=level; command->option=option;
returnedLength=&((InterfaceLength*)(command + 1))->length;
reply=(u8*)((InterfaceLength*)returnedLength + 1);
*returnedLength=OptionLength(length);

View File

@@ -64,7 +64,6 @@ public:
class AppearMemoState : public State {
public:
AppearMemoState() : mTime(0.0f) {}
virtual ~AppearMemoState();
Manager::StateType getStateType();
void create();
void init();
@@ -1230,8 +1229,6 @@ Manager::StateType EditMemoState::getStateType() {
inline State::~State() {}
AppearMemoState::~AppearMemoState() {}
Manager::StateType AppearMemoState::getStateType() {
return Manager::ST_Appearing;
}
@@ -1245,48 +1242,3 @@ Manager::StateType DispMemoState::getStateType() {
}
}
}
inline void textinput::util::Animation::startAnm(f32 start, f32 end, f32 duration, AnimObserver* observer, void* data) {
mfStartPoint = start;
mfEndPoint = end;
mfAnimationTime = duration;
mfCurrentFrame = 0.0f;
mbInAnimation = true;
mpAnimObserver = observer;
mpData = data;
mbSE = false;
if (observer) observer->onAnmEvent(AnimObserver::AE_0, data);
}
inline void textinput::util::Animation::calc() {
if (mbInAnimation) {
if (mfCurrentFrame < mfAnimationTime) {
mfCurrentFrame = 1.0f + mfCurrentFrame;
} else {
if (mbInAnimation && mpAnimObserver) {
mpAnimObserver->onAnmEvent(AnimObserver::AE_1, mpData);
}
mbInAnimation = false;
}
}
}
inline f32 textinput::util::Animation::getValue() {
return hermiteInterporation(mfCurrentFrame, 0.0f, mfStartPoint, 0.0f, mfAnimationTime, mfEndPoint, 0.0f);
}
inline bool textinput::util::Animation::isActive() {
return mbInAnimation;
}
inline void textinput::util::Animation::setSEFlag(bool flag) {
mbSE = flag;
}
inline bool textinput::util::Animation::isSEFlag() {
return mbSE;
}
inline void textinput::util::Animation::stop() {
mbInAnimation = false;
}

View File

@@ -223,7 +223,7 @@ void LayoutByNW4R::create(MEMAllocator* allocator) {
const char* forceName;
u32 animationCount;
u32 paneIndex = 0;
for (; paneIndex < 25; ++paneIndex) {
do {
AnmPane* pane = NULL;
const PaneAnimation& paneInfo = csPaneToAnimationInSign[paneIndex & 0xFFFF];
switch (paneInfo.type) {
@@ -260,7 +260,8 @@ void LayoutByNW4R::create(MEMAllocator* allocator) {
}
++animationIndex;
}
}
++paneIndex;
} while (paneIndex < 25);
init();
}

View File

@@ -111,13 +111,12 @@ void WithZi::init() {
void WithZi::clearCandidates() {
if (mbDictionaryOpen != 0) {
u16* const candidates = CandidatesBuffer;
mInputLength = 0;
mCandidateCount = 0;
memset(ElementBuffer, 0, 0x1fe);
memset(candidates, 0, 0x200);
memset(candidates + 0x100, 0, 0x1fe);
memset(candidates + 0x200, 0, 0x200);
memset(CandidatesBuffer, 0, 0x200);
memset(CandidatesBuffer + 0x100, 0, 0x1fe);
memset(CandidatesBuffer + 0x200, 0, 0x200);
memset(CandidatedWord, 0, 0x1400);
memset(&mSearch, 0, sizeof(mSearch) + sizeof(mSearchState));
mSearch.language = getPredictLanguage();
@@ -126,7 +125,7 @@ void WithZi::clearCandidates() {
mSearch.context = 1;
mSearch.getOptions = 0x81;
mSearch.elements = reinterpret_cast<wchar_t*>(ElementBuffer);
mSearch.candidates = reinterpret_cast<wchar_t*>(&candidates[0x200]);
mSearch.candidates = reinterpret_cast<wchar_t*>(&CandidatesBuffer[0x200]);
mSearch.maxCandidates = 0x28;
mSearch.elementCount = 0;
mSearch.firstCandidate = 0;
@@ -511,14 +510,12 @@ scanDone:
}
u32 WithZi::setElementBuffer() {
u16* elements;
u16* candidates;
u16 inputCharacter;
u32 count = 0;
memset(ElementBuffer, 0, 0x1fe);
memset(&CandidatesBuffer[0x100], 0, 0x1fe);
elements = ElementBuffer;
candidates = CandidatesBuffer;
u16* elements = ElementBuffer;
u16* candidates = CandidatesBuffer;
u16 inputCharacter;
while ((inputCharacter = candidates[static_cast<u16>(count)]) != 0 && static_cast<u16>(count) < 0xff) {
u16 index = count;
elements[index] = inputCharacter;

View File

@@ -1557,15 +1557,6 @@ namespace ipl {
}
}
static inline math::VEC2 scaledPageOffset(const math::VEC2& source, f32 factor) {
const f32 vertical = source.y * factor;
const f32 horizontal = source.x * factor;
math::VEC2 scaled;
scaled.y = vertical;
scaled.x = horizontal;
return scaled;
}
void Address::onPreviousPage() {
switch (mState) {
case STATE_NORMAL:
@@ -1595,7 +1586,10 @@ namespace ipl {
mPage = PAGE_MAX - 1;
mNextPageNum = 0;
mbCover = false;
add_translate(mpLayout->FindPaneByName("N_note_base"), scaledPageOffset(sPageOffset, PAGE_MAX));
math::VEC2 offset;
offset.y = sPageOffset.y * PAGE_MAX;
offset.x = sPageOffset.x * PAGE_MAX;
add_translate(mpLayout->FindPaneByName("N_note_base"), offset);
mpLayout->getAnim(4)->setAnmType(0);
mpLayout->getAnim(4)->play();
set_page_text("T_nmbr_b", mPage + 1);

View File

@@ -638,7 +638,7 @@ namespace ipl {
void ChannelObj::setLangPane(const layout::Object* layout) {
int lang = System::getLanguage();
const char* langGroup = scLangGroups[lang];
char langCodeBuf[10][4] = {""};
char langCodeBuf[40] = "";
bool foundLangGroup = false;
@@ -648,7 +648,7 @@ namespace ipl {
} else {
bool isNonRsoGroup = true;
for (int i = 0; i < channel::MAX_ANIMS; i++) {
char name[8];
char name[6];
sprintf(name, "Rso%d", i);
if (strncmp(it->GetName(), name, 5) == 0) {
isNonRsoGroup = false;
@@ -663,8 +663,8 @@ namespace ipl {
for (int i = 0; i < 10; i++) {
if (strncmp(it->GetName(), scLangGroups[i], 3) == 0) {
memcpy(langCodeBuf[i], it->GetName(), 3);
langCodeBuf[i][3] = 0;
memcpy(&langCodeBuf[i], it->GetName(), 3);
langCodeBuf[i + 3] = 0;
break;
}
}
@@ -680,15 +680,16 @@ namespace ipl {
} else {
s32 region = System::getRegion();
for (int i = 0; i < channel::MAX_ANIMS; i++) {
if (scModuleData.langGroupLookup[region][i] == NULL) {
break;
}
if (strcmp(scModuleData.langGroupLookup[region][i], langCodeBuf[scLangLookup[region][i]]) == 0) {
nw4r::lyt::Group* group = layout->FindGroupByName(scModuleData.langGroupLookup[region][i]);
for (nw4r::lyt::PaneLinkList::Iterator it = group->GetPaneList().GetBeginIter(); it != group->GetPaneList().GetEndIter(); it++) {
it->mTarget->SetVisible(true);
char* groupName = (char*)scModuleData.langGroupLookup[region][i];
if (groupName != NULL) {
if (strcmp(groupName, &langCodeBuf[scLangLookup[region][i]]) == 0) {
nw4r::lyt::Group* group = layout->FindGroupByName(groupName);
for (nw4r::lyt::PaneLinkList::Iterator it = group->GetPaneList().GetBeginIter(); it != group->GetPaneList().GetEndIter();
it++) {
it->mTarget->SetVisible(true);
}
}
break;
}
}
}

View File

@@ -69,13 +69,6 @@ namespace ipl {
SDMemory::~SDMemory() {}
void SDMemory::create(EGG::Heap* heap, nand::LayoutFile* layoutFile, SDChannelSelect* channelSelect) {
s32 cachedTitleCount;
const savedata::Manager* saveData;
nw4r::lyt::TextBox* textBox;
layout::Animator* scrollAnimator;
ControlPaneEventHandler* controlEvent;
TitlePaneEventHandler* titleEvent;
DialogPaneEventHandler* dialogEvent;
mpSDChannelSelect = channelSelect;
mpMainLayout = new layout::Object(heap, layoutFile, "arc", "mn_DialogWindow_ChChange_a.brlyt");
@@ -96,7 +89,7 @@ namespace ipl {
mpMainLayout->getAnim(5)->initAnmFrame();
mpMainLayout->getAnim(8)->initAnmFrame();
textBox = static_cast<nw4r::lyt::TextBox*>(mpMainLayout->FindPaneByName("T_Dialog_00"));
nw4r::lyt::TextBox* textBox = static_cast<nw4r::lyt::TextBox*>(mpMainLayout->FindPaneByName("T_Dialog_00"));
textBox->SetString(System::getMessage(0xB0));
textBox = static_cast<nw4r::lyt::TextBox*>(mpMainLayout->FindPaneByName("TextBox_05"));
textBox->SetString(System::getMessage(0xBB));
@@ -150,8 +143,8 @@ namespace ipl {
textBox = static_cast<nw4r::lyt::TextBox*>(mpTitleLayout->FindPaneByName("TextBox_07"));
textBox->SetString(System::getMessage(0xBA));
saveData = System::getSaveData();
cachedTitleCount = 0;
const savedata::Manager* saveData = System::getSaveData();
s32 cachedTitleCount = 0;
for (s32 i = 0; i < 48; ++i) {
if (saveData->getTitleCacheEntry(i) == 0) {
break;
@@ -160,12 +153,10 @@ namespace ipl {
}
if (cachedTitleCount >= 5) {
mpTitleLayout->FindPaneByName("N_Btn_3")->SetVisible(false);
nw4r::lyt::Pane* expandedButton = mpTitleLayout->FindPaneByName("N_Btn_4");
expandedButton->SetVisible(true);
mpTitleLayout->FindPaneByName("N_Btn_4")->SetVisible(true);
mDisplayMode = 4;
} else {
nw4r::lyt::Pane* compactButton = mpTitleLayout->FindPaneByName("N_Btn_3");
compactButton->SetVisible(true);
mpTitleLayout->FindPaneByName("N_Btn_3")->SetVisible(true);
mpTitleLayout->FindPaneByName("N_Btn_4")->SetVisible(false);
mDisplayMode = 3;
}
@@ -204,7 +195,7 @@ namespace ipl {
mpDialogLayout->getAnim(11)->initAnmFrame();
mpDialogLayout->getAnim(8)->initAnmFrame();
mpDialogLayout->getAnim(18)->initAnmFrame();
scrollAnimator = mpDialogLayout->getAnim(18);
layout::Animator* scrollAnimator = mpDialogLayout->getAnim(18);
scrollAnimator->initFrame();
scrollAnimator->restart();
@@ -219,7 +210,7 @@ namespace ipl {
mpDialogLayout->finishBinding();
mpProgressLayout->getAnim(0)->initAnmFrame();
controlEvent = new ControlPaneEventHandler(this);
ControlPaneEventHandler* controlEvent = new ControlPaneEventHandler(this);
mpPaneManagers[0] = new gui::PaneManager(controlEvent, mpMainLayout->getDrawInfo(), NULL, NULL);
mpPaneManagers[0]->setupScene(mpMainLayout);
mpPaneManagers[0]->setAllComponentTriggerTarget(false);
@@ -227,7 +218,7 @@ namespace ipl {
mpPaneManagers[0]->setTriggerTarget(mpMainLayout->FindPaneByName(sControlPaneNames[i]), true);
}
titleEvent = new TitlePaneEventHandler(this);
TitlePaneEventHandler* titleEvent = new TitlePaneEventHandler(this);
mpPaneManagers[1] = new gui::PaneManager(titleEvent, mpTitleLayout->getDrawInfo(), NULL, NULL);
mpPaneManagers[1]->setupScene(mpTitleLayout);
mpPaneManagers[1]->setAllComponentTriggerTarget(false);
@@ -242,7 +233,7 @@ namespace ipl {
}
}
dialogEvent = new DialogPaneEventHandler(this);
DialogPaneEventHandler* dialogEvent = new DialogPaneEventHandler(this);
mpPaneManagers[2] = new gui::PaneManager(dialogEvent, mpDialogLayout->getDrawInfo(), NULL, NULL);
mpPaneManagers[2]->setupScene(mpDialogLayout);
mpPaneManagers[2]->setAllComponentTriggerTarget(false);

View File

@@ -729,11 +729,8 @@ namespace ipl {
return;
}
switch (OSGetTime() - mOperationStartTime < OS_TIMER_CLOCK) {
default:
if (OSGetTime() - mOperationStartTime < OS_TIMER_CLOCK) {
return;
case false:
break;
}
setDialogMessage(1, 0);
int result = mpSDWorker->get_async_result();
@@ -784,15 +781,11 @@ namespace ipl {
enqueueLoadNotice();
}
} else {
u32 titleId;
u32 titleIndex;
int channelIndex;
int channelCount;
channelCount = 0;
channelIndex = 0;
titleIndex = 0;
int channelCount = 0;
int channelIndex = 0;
u32 titleIndex = 0;
for (; titleIndex < mSDTitleCount; ++titleIndex) {
titleId = mpSDTitleInfo[titleIndex].titleId;
u32 titleId = mpSDTitleInfo[titleIndex].titleId;
if (titleId != 0x48415A41) {
++channelCount;
mpChannelTitleIds[channelIndex++] = titleId;
@@ -3465,11 +3458,7 @@ namespace ipl {
break;
}
switch (event) {
default: return;
case 0: break;
}
{
if (event == 0) {
if (mpScene->mState == 1) {
if (System::getFader()->getStatus() == EGG::Fader::PREPARE_OUT) {
if (con != NULL) {
@@ -3515,6 +3504,8 @@ namespace ipl {
}
}
}
} else {
return;
}
}

View File

@@ -34,7 +34,7 @@ struct AOSSAccessPoint {
u8 bssid[6];
u16 capabilities;
u32 rateCount;
u8 rates[16];
u8 rates[12];
u32 beaconPeriod;
u32 mode;
};
@@ -84,7 +84,7 @@ void* AOSSi_Alloc(u32 size) {
}
void AOSSi_Free(void* block) {
if (releaseMemory) {
if (releaseMemory != NULL) {
releaseMemory(0, block, 0);
}
}
@@ -129,15 +129,15 @@ int AOSSi_EndLocal(void) {
int AOSSi_WLANGetBSSList(struct AOSSAccessPointList** output) {
int result = -1;
int startupRetries = 0;
WDScanParam scan ATTRIBUTE_ALIGN(32);
WD_Info info ATTRIBUTE_ALIGN(32);
int scanRetries = 0;
int cleanupRetries = 0;
int unlockRetries = 0;
int driver;
u8* buffer;
int cleanupRetries = 0;
int scanRetries = 0;
WD_Info info ATTRIBUTE_ALIGN(32);
WDScanParam scan;
u8 macAddress[6];
if (!allocateMemory || !releaseMemory) {
if (allocateMemory == NULL || releaseMemory == NULL) {
return -1;
}
driver = NCDLockWirelessDriver();
@@ -157,7 +157,7 @@ startup:
memcpy(macAddress, info.MAC, 6);
}
buffer = AOSSi_Alloc(0x3200);
if (buffer) {
if (buffer != NULL) {
memset(buffer, 0, 0x3200);
scan.channelBit = info.enableChannel;
scan.maxChannelTime = 40;
@@ -178,37 +178,37 @@ startup:
count = *(u16*)buffer;
if (count != 0) {
list = AOSSi_Alloc(sizeof(*list) + (count - 1) * sizeof(struct AOSSAccessPoint));
if (!list) {
if (list == NULL) {
result = -1;
break;
}
list->count = count;
descriptor = (WDBssDesc*)&buffer[2];
for (index = 0; index < count; ++index) {
struct AOSSAccessPoint* accessPoint = &list->accessPoints[index];
int rate;
int rateCount;
list->accessPoints[index].ssidLength = descriptor->ssidLength;
memcpy(list->accessPoints[index].ssid, descriptor->ssid, 32);
list->accessPoints[index].channel = descriptor->channel;
memcpy(list->accessPoints[index].bssid, descriptor->bssid, 6);
rateCount = 0;
int rateCount = 0;
accessPoint->ssidLength = descriptor->ssidLength;
memcpy(accessPoint->ssid, descriptor->ssid, 32);
accessPoint->channel = descriptor->channel;
memcpy(accessPoint->bssid, descriptor->bssid, 6);
for (rate = 0; rate < 12; ++rate) {
if (descriptor->rateSet.support & supportedRates[rate].mask) {
list->accessPoints[index].rates[rateCount] = supportedRates[rate].value;
accessPoint->rates[rateCount] = supportedRates[rate].value;
if (descriptor->rateSet.basic & supportedRates[rate].mask) {
list->accessPoints[index].rates[rateCount] |= 128;
accessPoint->rates[rateCount] |= 128;
}
++rateCount;
}
}
list->accessPoints[index].rateCount = rateCount;
list->accessPoints[index].beaconPeriod = descriptor->beaconPeriod;
accessPoint->rateCount = rateCount;
accessPoint->beaconPeriod = descriptor->beaconPeriod;
if ((descriptor->capabilities & 3) == 1) {
list->accessPoints[index].mode = 1;
accessPoint->mode = 1;
} else if ((descriptor->capabilities & 3) == 2) {
list->accessPoints[index].mode = 2;
accessPoint->mode = 2;
} else {
list->accessPoints[index].mode = 0;
accessPoint->mode = 0;
}
descriptor = (WDBssDesc*)((u16*)descriptor + descriptor->length);
}
@@ -222,7 +222,7 @@ startup:
}
if (++scanRetries > 10) {
list = AOSSi_Alloc(sizeof(*list));
if (!list) {
if (list == NULL) {
result = -1;
break;
}
@@ -236,29 +236,31 @@ startup:
AOSSi_Free(buffer);
}
cleanup:
while (WD_Cleanup() != 0) {
if (WD_Cleanup() != 0) {
if (cleanupRetries > 10) {
result = -1;
goto unlock;
}
++cleanupRetries;
AOSSi_SleepMs(10);
goto cleanup;
}
unlock:
while (NCDUnlockWirelessDriver(driver) != 0) {
if (NCDUnlockWirelessDriver(driver) != 0) {
if (unlockRetries > 10) {
result = -1;
break;
return -1;
}
++unlockRetries;
AOSSi_SleepMs(10);
goto unlock;
}
return result;
}
int AOSSi_WLANConnect(struct AOSSConnection* connection, struct AOSSConnectionStatus* status) {
int retries = 0;
int result;
int result = 0;
WD_Info info ATTRIBUTE_ALIGN(32);
NCDIfConfig* interfaceConfig = &AOSSi_NcdIfConfig;
NCDIpConfig* ipConfig;
@@ -286,7 +288,6 @@ int AOSSi_WLANConnect(struct AOSSConnection* connection, struct AOSSConnectionSt
}
interfaceConfig->netif.wireless.config.manual.ssidLength = (u8)connection->ssidLength;
memcpy(interfaceConfig->netif.wireless.config.manual.ssid, connection->ssid, connection->ssidLength);
result = 0;
ipConfig = &AOSSi_NcdIpConfig;
memset(ipConfig, 0, sizeof(*ipConfig));
ipConfig->adjust.maxTransferUnit = 1300;
@@ -320,14 +321,13 @@ int AOSSi_WLANConnect(struct AOSSConnection* connection, struct AOSSConnectionSt
}
}
if (result == 0) {
u32 ssidLength;
status->connected = 1;
if (WD_GetInfo(&info) == 0) {
status->channel = info.channel;
}
ssidLength = interfaceConfig->netif.wireless.config.manual.ssidLength;
status->ssidLength = ssidLength;
memcpy(status->ssid, interfaceConfig->netif.wireless.config.manual.ssid, ssidLength);
status->ssidLength = interfaceConfig->netif.wireless.config.manual.ssidLength;
memcpy(status->ssid, interfaceConfig->netif.wireless.config.manual.ssid,
interfaceConfig->netif.wireless.config.manual.ssidLength);
} else {
status->connected = 0;
}

View File

@@ -914,8 +914,7 @@ void CArGBAOdh::cdj_c_setQuantizationTable(SArCDJ_OdhMaster* master, u32 quality
for (i = 0; i < 64; i++) {
temp = ((const u16*)gArAANScales)[i];
temp *= quantization[table * 64 + i];
temp = 0x4000000 / temp;
master->quantizationTables[table * 64 + i] = temp;
master->quantizationTables[table * 64 + i] = 0x4000000 / temp;
}
}
}
@@ -1194,9 +1193,8 @@ s32 CArGBAOdh::huffmanCoder(u16* coefficientInput, SArCDJ_HuffmanRequest* reques
}
}
code = request->dcTable[bitCount];
magnitude = (difference & ((1 << bitCount) - 1)) | ((code & 0xFFFFFF) << bitCount);
code = (s32)code >> 24;
if (EmitBit(magnitude, code + bitCount, request) == ODH_ERROR_80000004) {
if (EmitBit(((code & 0xFFFFFF) << bitCount) | (difference & ((1 << bitCount) - 1)), ((s32)code >> 24) + bitCount,
request) == ODH_ERROR_80000004) {
return ODH_ERROR_80000004;
}
@@ -1225,9 +1223,8 @@ s32 CArGBAOdh::huffmanCoder(u16* coefficientInput, SArCDJ_HuffmanRequest* reques
}
}
code = request->acTable[bitCount];
magnitude = (runLength & ((1 << bitCount) - 1)) | ((code & 0xFFFFFF) << bitCount);
code = (s32)code >> 24;
if (EmitBit(magnitude, code + bitCount, request) == ODH_ERROR_80000004) {
if (EmitBit(((code & 0xFFFFFF) << bitCount) | (runLength & ((1 << bitCount) - 1)), ((s32)code >> 24) + bitCount,
request) == ODH_ERROR_80000004) {
return ODH_ERROR_80000004;
}
@@ -1246,9 +1243,8 @@ s32 CArGBAOdh::huffmanCoder(u16* coefficientInput, SArCDJ_HuffmanRequest* reques
}
}
code = request->dcTable[bitCount];
magnitude = (value & ((1 << bitCount) - 1)) | ((code & 0xFFFFFF) << bitCount);
code = (s32)code >> 24;
if (EmitBit(magnitude, code + bitCount, request) == ODH_ERROR_80000004) {
if (EmitBit(((code & 0xFFFFFF) << bitCount) | (value & ((1 << bitCount) - 1)), ((s32)code >> 24) + bitCount,
request) == ODH_ERROR_80000004) {
return ODH_ERROR_80000004;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -3170,772 +3170,3 @@ CheckMsgBoxSpace 85.57399%: unrolled base64 size arithmetic dependency schedule;
WriteMIMEAttachHeader 99.61957%: type/disposition measurement coloring and sum coalescing; 5 operands differ.
Zi8PrepareMatch 96.319145%: original component-presence dead stores plus unoptimized expression scheduling; 939/940 instructions.
Uncertainty: the gate reports fewer instruction-exact functions than raw-byte equality in JPEG because of CR1 normalization. Keyboard's existing 14 instruction-exact versus 15 objdiff exact count is unchanged. No data symbol evidence supports a rename/extent change in these four units.
# Xhigh continuation fz15f
Fresh branch agent/w1002/sol-fz15f-xhigh at 1b942565. Prior five JPEG matches landed. AGENTS.md and unslop read; all four pools identical. Re-examine remaining structures before register search, preserve prior exact functions.
libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8 baseline {'fuzzy_match_percent': 99.527466, 'total_code': '15948', 'matched_code': '13264', 'matched_code_percent': 83.1703, 'matched_data_percent': 100.0, 'total_functions': 13, 'matched_functions': 11, 'matched_functions_percent': 84.61539, 'complete_data_percent': 100.0, 'total_units': 1}
Origin open TMCJPEGDEC_set_converterY8U8V8: 92.78571%, body unchanged
Origin open TMCJPEG_814F0A58: 99.01053%, body unchanged
libs/RVL_SDK/src/kbd/kbd_lib baseline {'fuzzy_match_percent': 97.70437, 'total_code': '5764', 'matched_code': '3088', 'matched_code_percent': 53.573906, 'total_data': '5296', 'matched_data': '5296', 'matched_data_percent': 100.0, 'total_functions': 21, 'matched_functions': 15, 'matched_functions_percent': 71.42857, 'total_units': 1}
Origin open kbdEventHandler: 99.83871%, body unchanged
Origin open kbdProcMod: 99.90234%, body unchanged
Origin open kbd_led_handler: 64.12%, body unchanged
Origin open KBDSetLedsAsync: 86.234566%, body unchanged
Origin open KBDSetLeds: 84.6076%, body unchanged
Origin open KBDSetModState: 99.40476%, body unchanged
libs/RevoEX/src/nwc24/NWC24MsgCommit baseline {'fuzzy_match_percent': 98.47539, 'total_code': '8532', 'matched_code': '7272', 'matched_code_percent': 85.23207, 'total_data': '904', 'matched_data': '904', 'matched_data_percent': 100.0, 'total_functions': 18, 'matched_functions': 16, 'matched_functions_percent': 88.88889, 'total_units': 1}
Origin open CheckMsgBoxSpace: 85.57399%, body unchanged
Origin open WriteMIMEAttachHeader: 99.61957%, body unchanged
libs/RVLMiddleware/eZiText/src/clib/zprepare baseline {'fuzzy_match_percent': 96.319145, 'total_code': '3760', 'total_data': '68', 'matched_data': '8', 'matched_data_percent': 11.764706, 'total_functions': 1, 'total_units': 1}
Origin open Zi8PrepareMatch: 96.319145%, body unchanged
## fz15f TMCJPEGDEC_set_converterY8U8V8 structure
Frame 0x10, 195/196 instructions. First missing target instruction 1 computes convBuf base into r4, source folds its immediate into per-case work member addresses. No adjacent stack store/reload evidence for volatile. Extent ends at next function 814EFEAC, no overlap. Test aliased row ownership and buffer layout helper boundaries.
## Xhigh TMCJPEGDEC_set_converterY8U8V8: fz15f row and array alias structure
- TMCJPEGDEC_set_converterY8U8V8: baseline: structural/exact (41, 195) instructions 195/196
- TMCJPEGDEC_set_converterY8U8V8: row pointer array view aliases the configured outputs: structural/exact (41, 195) instructions 195/196
- TMCJPEGDEC_set_converterY8U8V8: buffer byte offsets passed through planar row helper: structural/exact (41, 195) instructions 195/196
- TMCJPEGDEC_set_converterY8U8V8: complete converter buffer viewed as array object: structural/exact (41, 195) instructions 195/196
## fz15f TMCJPEG_814F0A58 structure
Frame 0x60, 475/475 instructions. First real difference 266 is chroma tile-width/column pair, removed by shared tileWidth and xEnd lifetime in prior round. Remaining first real difference 274 computes chroma row stride into r10 versus target r6. Source has an explicit chromaRowSkip and Cr recomputes the stride; target consumes the width register for padding. Remove that explicit temporary before more register search. No volatile reload evidence.
## Xhigh TMCJPEG_814F0A58: fz15f implicit stride and independent dimension lifetimes
- TMCJPEG_814F0A58: baseline: structural/exact (0, 77) instructions 475/475
- TMCJPEG_814F0A58: implicit padding expression, shared tile width and bound: structural/exact (2, 2) instructions 475/475
- TMCJPEG_814F0A58: implicit padding expression with original phase locals: structural/exact (2, 20) instructions 475/475
- TMCJPEG_814F0A58: independent chroma sample width with shared tile and bound: structural/exact (2, 2) instructions 475/475
- TMCJPEG_814F0A58: sample row traversal through inline helper: structural/exact (2, 2) instructions 475/475
## fz15f TMCJPEG_814F0A58 two-instruction schedule
Removing explicit chromaRowSkip, while sharing tileWidth/xEnd, resolves all register differences. Remaining real instructions 274/275 exchange subfic r6,r6,8 and rlwinm r0,r26,0,0,0, the latter compiler-generated signed-bound check. Score (2,2), 475/475; four additional ctxdiff differences are known CR1 normalization artifacts. Test source stride scope, definition qualifier and loop initialization before further register work.
## Xhigh TMCJPEG_814F0A58: fz15f stride definition and loop boundary
- TMCJPEG_814F0A58: baseline: structural/exact (2, 2) instructions 475/475
- TMCJPEG_814F0A58: stride definition const: structural/exact (21, 220) instructions 475/475
- TMCJPEG_814F0A58: stride definition scoped: structural/exact (21, 220) instructions 475/475
- TMCJPEG_814F0A58: stride definition init: structural/exact (21, 140) instructions 475/475
- TMCJPEG_814F0A58: stride definition consume: structural/exact (21, 126) instructions 475/475
- TMCJPEG_814F0A58: stride definition aggregate: structural/exact (6, 12) instructions 475/475
- TMCJPEG_814F0A58: chroma outer while loop with implicit padding: structural/exact (2, 2) instructions 475/475
- TMCJPEG_814F0A58: chroma inner loop increments in store expression: structural/exact (2, 2) instructions 475/475
## Xhigh TMCJPEG_814F0A58: fz15f shared source-plane stride and arithmetic trees
- TMCJPEG_814F0A58: baseline: structural/exact (2, 2) instructions 475/475
- TMCJPEG_814F0A58: row stride ownership phases: structural/exact (29, 225) instructions 475/475
- TMCJPEG_814F0A58: row stride ownership row: structural/exact (21, 125) instructions 475/475
- TMCJPEG_814F0A58: row stride ownership negative: structural/exact (2, 2) instructions 475/475
- TMCJPEG_814F0A58: row stride ownership ptrfirst: structural/exact (7, 201) instructions 476/475
- TMCJPEG_814F0A58: row stride ownership namedcb: structural/exact (2, 2) instructions 475/475
- TMCJPEG_814F0A58: row stride ownership unsigned: structural/exact (2, 2) instructions 475/475
## Xhigh TMCJPEG_814F0A58: fz15f loop postexpression and dependency schedule
- TMCJPEG_814F0A58: baseline: structural/exact (2, 2) instructions 475/475
- TMCJPEG_814F0A58: row input advances in outer loop postexpression: structural/exact (2, 2) instructions 475/475
- TMCJPEG_814F0A58: chroma tile metadata before sample dimensions: structural/exact (2, 2) instructions 475/475
## fz15f KBDSetModState and kbdProcMod structure
Setter frame 0x10, 42/42 instructions; inlined caller frame 0x20, 256/256 instructions. First differing setter instruction 30 and caller 245 forms state field address into r5 versus target r4, then word value occupies opposite register. No adjacent store/reload pairs in any of the six open keyboard functions; volatile lever unsupported except SDK LED fields. Test field-pointer ownership and actual modifier union field layout.
- TMCJPEG_814F0A58: vertical bound before horizontal bound in chroma preheader: structural/exact (2, 2) instructions 475/475
## Xhigh KBDSetModState: fz15f field pointer and union object ownership
- KBDSetModState: baseline: structural/exact (0, 4) instructions 42/42
- TMCJPEG_814F0A58: independent input pointer advances reverse source order: structural/exact (2, 4) instructions 475/475
- KBDSetModState: named pointer to modifier field owns load/store address: structural/exact (0, 7) instructions 42/42
- KBDSetModState: state field load/store in inline lock updater: structural/exact (0, 4) instructions 42/42
- KBDSetModState: modifier union is the channel field type: structural/exact (13, 24) instructions 44/42
## Xhigh kbdProcMod: fz15f field pointer and union object ownership
- kbdProcMod: baseline: structural/exact (0, 4) instructions 256/256
- kbdProcMod: named pointer to modifier field owns load/store address: structural/exact (15, 47) instructions 253/256
- kbdProcMod: state field load/store in inline lock updater: structural/exact (0, 4) instructions 256/256
- kbdProcMod: modifier union is the channel field type: structural/exact (56, 86) instructions 255/256
Corrected union-field trial to read the channel physical bitfield directly rather than assigning a partial local word. The discarded partial-word version was never promoted; no undefined value is retained or used in the corrected trial.
## Xhigh KBDSetModState: fz15f initialized bitfield ownership
- KBDSetModState: baseline: structural/exact (0, 4) instructions 42/42
- KBDSetModState: typed channel modifier field with direct physical read: structural/exact (0, 7) instructions 42/42
## Xhigh kbdProcMod: fz15f initialized bitfield ownership
- kbdProcMod: baseline: structural/exact (0, 4) instructions 256/256
- kbdProcMod: typed channel modifier field with direct physical read: structural/exact (15, 47) instructions 253/256
## fz15f kbdEventHandler structure
Frame 0x20, 186/186 instructions. First difference 35 loads report error code into r3 versus target r5; source then owns channel table base in r30 versus target r3 before computing result r30. All subsequent instructions identical. No store/reload volatile evidence. Test report error switch and partial handler inline boundary.
## Xhigh kbdEventHandler: fz15f error report discrimination and helper boundary
- kbdEventHandler: baseline: structural/exact (0, 5) instructions 186/186
- kbdEventHandler: error statuses use direct switch discrimination: structural/exact (8, 153) instructions 187/186
- kbdEventHandler: error statuses use biased switch discrimination: structural/exact (6, 151) instructions 189/186
- kbdEventHandler: error classification and flags handled in inline helper: structural/exact (8, 132) instructions 190/186
## fz15f Zi8PrepareMatch structure
Target frame 0x70, 939/940 instructions. First instruction difference 11 initializes contextMask in r3 versus target r0. Target dead component-presence stores to 0xf have no read; no dummy field added. Definition-volatility evidence: elementCount byte target 0x88 stb r3,0xe then 0x8c lbz r0,0xe; componentIndex pointer 0x15c stw r3,0x38 then 0x160 lwz r5,0x38, repeated at 0x178/0x17c; component pointer 0x1b4 stw r3,0x3c then 0x1b8 lwz r3,0x3c. Test only those proven fields and readable table-entry type.
## Xhigh Zi8PrepareMatch: fz15f proven volatile definitions and index entry structure
- Zi8PrepareMatch: baseline: structural/exact (36, 889) instructions 939/940
- Zi8PrepareMatch: elementCount definition volatile for adjacent target reload: structural/exact (38, 806) instructions 942/940
- Zi8PrepareMatch: component pointer field definitions volatile for adjacent target reloads: structural/exact (36, 889) instructions 939/940
- Zi8PrepareMatch: component index table represented by low/high byte entry: structural/exact (36, 889) instructions 939/940
- Zi8PrepareMatch: component element prefix count uses explicit subtraction: structural/exact (38, 909) instructions 939/940
## fz15f LED command ownership
Target async/sync reserve loop uses u32 index, CTR=12, a byte-offset register incremented 0x20 and lwzx/stwx on command device words. Current sync code uses a record pointer; async uses an existing raw byte cast. Test a readable union of twelve 32-byte command slots and 96 words, preserving object size/address and using words only for device reservation/release. SDK type version is authorized by USBKBDCmdLEDAsync layout and vu32 base.device/vu8 base.ledBits declarations. Callback target is 25 instructions versus source 24 and recomputes callback offset after result selection.
## Xhigh kbd_led_handler: fz15f command buffer layout and device view
- kbd_led_handler: baseline: structural/exact (13, 21) instructions 24/25
- kbd_led_handler: typed command word reservation view: structural/exact (13, 21) instructions 24/25
- kbd_led_handler: SDK command slots with word reservation view: structural/exact (13, 21) instructions 24/25
- kbd_led_handler: word view and true-first result switch: structural/exact (10, 18) instructions 25/25
## Xhigh KBDSetLedsAsync: fz15f command buffer layout and device view
- KBDSetLedsAsync: baseline: structural/exact (14, 70) instructions 80/81
- KBDSetLedsAsync: typed command word reservation view: structural/exact (18, 53) instructions 81/81
- KBDSetLedsAsync: SDK command slots with word reservation view: structural/exact (18, 53) instructions 81/81
- KBDSetLedsAsync: readonly channel view with word reservation loop: structural/exact (19, 74) instructions 77/81
## Xhigh KBDSetLeds: fz15f command buffer layout and device view
- KBDSetLeds: baseline: structural/exact (19, 75) instructions 75/79
- KBDSetLeds: typed command word reservation view: structural/exact (21, 76) instructions 80/79
- KBDSetLeds: SDK command slots with word reservation view: structural/exact (21, 76) instructions 80/79
- KBDSetLeds: readonly channel view with word reservation loop: structural/exact (27, 74) instructions 74/79
## fz15f CheckMsgBoxSpace structure
Frame 0x30, 223/223 instructions; first differing attachment load uses r26 instead of target r25. Eight-iteration unroll combines base64 rounding and line widths in different order, 67 structural differences. Input already const; test readonly size-pointer helper boundary and explicit encoded/line temporary dependencies.
## Xhigh CheckMsgBoxSpace: fz15f readonly helper input and arithmetic dependency
## Xhigh TMCJPEG_814F0A58: fz15f existing sample width lifetime becomes padding
- CheckMsgBoxSpace: baseline: structural/exact (67, 73) instructions 223/223
- CheckMsgBoxSpace: readonly size pointer owns base64 helper loads: structural/exact (0, 0) instructions 223/223
- TMCJPEG_814F0A58: baseline: structural/exact (2, 2) instructions 475/475
- TMCJPEG_814F0A58: reuse sample width as padding after tile metadata: structural/exact (21, 126) instructions 475/475
- TMCJPEG_814F0A58: reuse sample width as padding after bounds: structural/exact (21, 126) instructions 475/475
- TMCJPEG_814F0A58: reuse sample width as padding before bound expansion: structural/exact (32, 206) instructions 476/475
- TMCJPEG_814F0A58: inline padding computation before loop: structural/exact (21, 126) instructions 475/475
- TMCJPEG_814F0A58: equal chroma height owns row padding: structural/exact (2, 2) instructions 475/475
## fz15f CheckMsgBoxSpace exact
The readonly `const u32*` Base64StorageSize inline boundary preserves repeated input loads in the original expression instead of binding a scalar first. This changes the unrolled size/load dependency graph to the target: ctxdiff 223/223, diffs 0; pool 9/9 identical; objdiff 100.0. NWC quick gate PASS, exact 16 -> 17, code 7272 -> 8164/8532, data 904 unchanged, regressions/forbidden/readability 0. Shared headers unchanged; all other NWC exact functions preserved. Commit only this exact function and the attempts log; JPEG near scheduling candidate remains experimental.
## fz15f WriteMIMEAttachHeader structure
Frame 0x30, 92/92 instructions, five register-only differences at 25,28,30,32,33. Type-prefix length occupies r29 instead of target r30, disposition r30 instead of r29, prefix sum coalesces encoding r28 instead of target type r30; final mime sum operands reverse. Target stores no measurement locals, so no volatility proof. Test measured-length aggregate helper boundary and subtotal value ownership.
## Xhigh WriteMIMEAttachHeader: fz15f header measurement object and capacity subtotal lifetime
- WriteMIMEAttachHeader: baseline: structural/exact (0, 5) instructions 92/92
- WriteMIMEAttachHeader: capacity subtotal owned by final total local: structural/exact (2, 5) instructions 92/92
## Xhigh TMCJPEG_814F0A58: fz15f readonly sample alias view and inline boundaries
- WriteMIMEAttachHeader: capacity subtotal owned by first written length local: structural/exact (2, 5) instructions 92/92
- WriteMIMEAttachHeader: unsigned type-prefix length with signed capacity: structural/exact (0, 5) instructions 92/92
- TMCJPEG_814F0A58: baseline: structural/exact (2, 2) instructions 475/475
- WriteMIMEAttachHeader: unsigned transfer-prefix length with signed capacity: structural/exact (0, 5) instructions 92/92
- TMCJPEG_814F0A58: readonly decoder state view: structural/exact (2, 2) instructions 475/475
- WriteMIMEAttachHeader: encoding length owns concatenated prefix sum: structural/exact (0, 5) instructions 92/92
- TMCJPEG_814F0A58: readonly source sample pointers: structural/exact (21, 32) instructions 475/475
- WriteMIMEAttachHeader: measurement aggregate fields in caller: structural/exact (0, 5) instructions 92/92
- WriteMIMEAttachHeader: measurement aggregate owned by inline readonly-mime helper: structural/exact (0, 4) instructions 92/92
- TMCJPEG_814F0A58: unsigned sample width with signed stored bounds: structural/exact (2, 2) instructions 475/475
- TMCJPEG_814F0A58: unsigned sample height with signed stored bounds: structural/exact (2, 2) instructions 475/475
- TMCJPEG_814F0A58: sample bounds through inline end helper: structural/exact (2, 2) instructions 475/475
- TMCJPEG_814F0A58: chroma tiled address owned by inline helper: structural/exact (2, 2) instructions 475/475
## Xhigh WriteMIMEAttachHeader: fz15f readonly prefix and length pointer helper boundaries
- WriteMIMEAttachHeader: baseline: structural/exact (0, 5) instructions 92/92
- WriteMIMEAttachHeader: readonly prefix pointer helper for all three strlen inputs: structural/exact (0, 9) instructions 92/92
- WriteMIMEAttachHeader: readonly prefix pointer helper for type input: structural/exact (0, 9) instructions 92/92
- WriteMIMEAttachHeader: readonly prefix pointer helper for encoding input: structural/exact (0, 5) instructions 92/92
- WriteMIMEAttachHeader: readonly prefix pointer helper for disposition input: structural/exact (0, 5) instructions 92/92
- WriteMIMEAttachHeader: readonly length pointers own combined capacity arithmetic: structural/exact (2, 6) instructions 92/92
## Xhigh TMCJPEG_814F0A58: fz15f phase state coalescing and bound operand ordering
- TMCJPEG_814F0A58: baseline: structural/exact (2, 2) instructions 475/475
- TMCJPEG_814F0A58: padding owned by existing height local: structural/exact (21, 140) instructions 475/475
- TMCJPEG_814F0A58: padding owned by existing row local: structural/exact (21, 125) instructions 475/475
- TMCJPEG_814F0A58: padding owned by existing yEnd local: structural/exact (21, 133) instructions 475/475
- TMCJPEG_814F0A58: source padding shared between planes: structural/exact (29, 271) instructions 475/475
- TMCJPEG_814F0A58: chroma row bounds and padding paired structure: structural/exact (6, 12) instructions 475/475
- TMCJPEG_814F0A58: pointer row advances are for-loop postexpressions: structural/exact (2, 2) instructions 475/475
- TMCJPEG_814F0A58: commuted sample bound operands: structural/exact (2, 5) instructions 475/475
## Xhigh WriteMIMEAttachHeader: fz15f readonly metadata and prefix measurement boundaries
- WriteMIMEAttachHeader: baseline: structural/exact (0, 5) instructions 92/92
- WriteMIMEAttachHeader: readonly message input view with mutable output length: structural/exact (0, 5) instructions 92/92
- readonly attachment type array view: structural/exact (99999, 99999)bin/python3" tools/transform_dep.py build/43U/src/libs/RevoEX/src/nwc24/NWC24MsgCommit.d build/43U/src/libs/RevoEX/src/nwc24/NWC24MsgCommit.d ### mwcceppc.exe Compiler: # File: libs\RevoEX\src\nwc24\NWC24MsgCommit.c # ----------------------------------------------- # 775: const u32* attachedTypes = msg->attachedType; # Error: ^ # (10209) illegal implicit conversion from 'NWC24MIMEType[2]' to # 'const unsigned long *' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
- WriteMIMEAttachHeader: output length owned by named field pointer: structural/exact (0, 5) instructions 92/92
- WriteMIMEAttachHeader: signed attachment subscript input: structural/exact (0, 5) instructions 92/92
- WriteMIMEAttachHeader: inline helper owns combined type prefix length: structural/exact (2, 74) instructions 91/92
- WriteMIMEAttachHeader: inline helper writes measured prefix lengths: structural/exact (2, 5) instructions 92/92
## Xhigh TMCJPEG_814F0A58: fz15f phase geometry structure field ownership
- TMCJPEG_814F0A58: baseline: structural/exact (2, 2) instructions 475/475
- TMCJPEG_814F0A58: chroma row padding precedes end in record: structural/exact (6, 12) instructions 475/475
- TMCJPEG_814F0A58: chroma row bounds expressed as two-element array: structural/exact (6, 12) instructions 475/475
- TMCJPEG_814F0A58: width and column bound share record across phases: structural/exact (8, 167) instructions 475/475
- TMCJPEG_814F0A58: height and row bound share record across phases: structural/exact (8, 150) instructions 475/475
## Xhigh TMCJPEG_814F0A58: fz15f padding expression and const width pointer ownership
- TMCJPEG_814F0A58: baseline: structural/exact (2, 2) instructions 475/475
- TMCJPEG_814F0A58: row padding expression division: structural/exact (42, 469) instructions 476/475
- TMCJPEG_814F0A58: row padding expression bound: structural/exact (2, 2) instructions 475/475
- TMCJPEG_814F0A58: row padding expression negate: structural/exact (25, 220) instructions 475/475
- TMCJPEG_814F0A58: row padding expression postscope: structural/exact (2, 2) instructions 475/475
- TMCJPEG_814F0A58: both source pointer advances owned by row helper: structural/exact (2, 2) instructions 475/475
- TMCJPEG_814F0A58: row helper reads sample width through const pointer: structural/exact (7, 201) instructions 476/475
## Xhigh WriteMIMEAttachHeader: fz15f measurement scope and operand ownership finish
- WriteMIMEAttachHeader: baseline: structural/exact (0, 5) instructions 92/92
- WriteMIMEAttachHeader: correct enum attachment type readonly view: structural/exact (0, 5) instructions 92/92
- WriteMIMEAttachHeader: length measurements have independent initializer scope: structural/exact (0, 5) instructions 92/92
- WriteMIMEAttachHeader: prefix type and combined length share union value: structural/exact (0, 5) instructions 92/92
- WriteMIMEAttachHeader: commuted concatenated prefix operands: structural/exact (0, 5) instructions 92/92
## Xhigh TMCJPEG_814F0A58: fz15f remaining phase bound lifetimes
- TMCJPEG_814F0A58: baseline: structural/exact (2, 2) instructions 475/475
- TMCJPEG_814F0A58: vertical bound local shared across luma and chroma: structural/exact (2, 2) instructions 475/475
- TMCJPEG_814F0A58: readonly chroma start coordinate in phase scope: structural/exact (23, 227) instructions 475/475
- TMCJPEG_814F0A58: completed luma row owns chroma start coordinate: structural/exact (23, 137) instructions 475/475
- TMCJPEG_814F0A58: sample bounds use unsigned intermediate addition: structural/exact (2, 2) instructions 475/475
## fz15f WriteMIMEAttachHeader register-only final search
Structural readonly/aggregate/helper trials leave four or five operand differences; only now run declsearch on split declarations, including written-length lifetimes. Compiler-failing wrong attachment enum pointer excluded from valid trial count and corrected above.
```
declaration block:
char* buffer;
const char* mime;
const char* suffix;
s32 typeLength;
s32 encodingLength;
s32 dispositionLength;
s32 mimeLength;
s32 first;
s32 second;
s32 third;
s32 total;
NWC24Err err;
start (0, 5)
best (0, 5) after 80 builds; source restored; best order was:
char* buffer;
const char* mime;
const char* suffix;
s32 typeLength;
s32 encodingLength;
s32 dispositionLength;
s32 mimeLength;
s32 first;
s32 second;
s32 third;
s32 total;
NWC24Err err;
```
## Xhigh kbd_led_handler: fz15f per-slot command array layout
- kbd_led_handler: baseline: structural/exact (13, 21) instructions 24/25
- kbd_led_handler: SDK command and device words share per-slot union: structural/exact (13, 21) instructions 24/25
- kbd_led_handler: command slots use native-size word arrays: structural/exact (13, 21) instructions 24/25
- kbd_led_handler: word array command layout with true-first completion switch: structural/exact (10, 18) instructions 25/25
## Xhigh KBDSetLedsAsync: fz15f per-slot command array layout
- KBDSetLedsAsync: baseline: structural/exact (14, 70) instructions 80/81
- KBDSetLedsAsync: SDK command and device words share per-slot union: structural/exact (19, 72) instructions 79/81
- KBDSetLedsAsync: command slots use native-size word arrays: structural/exact (19, 72) instructions 79/81
- KBDSetLedsAsync: word array command layout with true-first completion switch: structural/exact (19, 72) instructions 79/81
## Xhigh KBDSetLeds: fz15f per-slot command array layout
- KBDSetLeds: baseline: structural/exact (19, 75) instructions 75/79
- KBDSetLeds: SDK command and device words share per-slot union: structural/exact (19, 75) instructions 75/79
- KBDSetLeds: command slots use native-size word arrays: structural/exact (19, 68) instructions 78/79
- KBDSetLeds: word array command layout with true-first completion switch: structural/exact (19, 68) instructions 78/79
## Xhigh WriteMIMEAttachHeader: fz15f final aggregate field order register search
- WriteMIMEAttachHeader: baseline: structural/exact (0, 5) instructions 92/92
- WriteMIMEAttachHeader: measurement fields type,encoding,disposition inline helper: structural/exact (0, 4) instructions 92/92
## Xhigh KBDSetModState: fz15f readonly state versus fixed output pointer boundary
- WriteMIMEAttachHeader: measurement fields type,disposition,encoding inline helper: structural/exact (0, 4) instructions 92/92
- KBDSetModState: baseline: structural/exact (0, 4) instructions 42/42
- WriteMIMEAttachHeader: measurement fields encoding,type,disposition inline helper: structural/exact (0, 4) instructions 92/92
- KBDSetModState: physical state readonly input pointer: structural/exact (0, 7) instructions 42/42
- WriteMIMEAttachHeader: measurement fields encoding,disposition,type inline helper: structural/exact (0, 4) instructions 92/92
- KBDSetModState: channel readonly view within interrupt critical section: structural/exact (0, 7) instructions 42/42
- KBDSetModState: fixed mutable state pointer declared before disabling interrupts: structural/exact (5, 38) instructions 41/42
- WriteMIMEAttachHeader: measurement fields disposition,type,encoding inline helper: structural/exact (0, 4) instructions 92/92
- KBDSetModState: logical locks replace field in initialized prior union: structural/exact (1, 7) instructions 42/42
- WriteMIMEAttachHeader: measurement fields disposition,encoding,type inline helper: structural/exact (0, 4) instructions 92/92
- WriteMIMEAttachHeader: measurement fields type,encoding,disposition caller: structural/exact (0, 5) instructions 92/92
## Xhigh kbdProcMod: fz15f readonly state versus fixed output pointer boundary
- kbdProcMod: baseline: structural/exact (0, 4) instructions 256/256
- WriteMIMEAttachHeader: measurement fields type,disposition,encoding caller: structural/exact (0, 5) instructions 92/92
- kbdProcMod: physical state readonly input pointer: structural/exact (10, 250) instructions 258/256
- WriteMIMEAttachHeader: measurement fields encoding,type,disposition caller: structural/exact (0, 5) instructions 92/92
- kbdProcMod: channel readonly view within interrupt critical section: structural/exact (0, 4) instructions 256/256
- kbdProcMod: fixed mutable state pointer declared before disabling interrupts: structural/exact (15, 47) instructions 253/256
- WriteMIMEAttachHeader: measurement fields encoding,disposition,type caller: structural/exact (0, 5) instructions 92/92
- kbdProcMod: logical locks replace field in initialized prior union: structural/exact (1, 3) instructions 256/256
- WriteMIMEAttachHeader: measurement fields disposition,type,encoding caller: structural/exact (0, 5) instructions 92/92
- WriteMIMEAttachHeader: measurement fields disposition,encoding,type caller: structural/exact (0, 5) instructions 92/92
## fz15f owned data and extents audit
JPEG has no owned data sections; NWC 904/904 and keyboard 5296/5296 data bytes already pair exactly. No symbol rename or extent change justified there.
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: all twelve entries in target jumptable_8166B3D0 (48 bytes) point inside nonmatching Zi8PrepareMatch; source @230 is the corresponding compiler-generated switch table with different code offsets. This is a code-layout gap; @230 is not a stable real source object name, so no rename. Extab 8 bytes exact, extabindex 12 differs by nonmatching function extent; no data-type size correction.
Zi8PrepareMatch extent 0x814850fc..0x81485fac, next CDBInit 0x81485fac, overlap 0.
CheckMsgBoxSpace extent 0x814a731c..0x814a7698, next SynthesizeAddrStr 0x814a7698, overlap 0.
WriteMIMEAttachHeader extent 0x814a8064..0x814a81d4, next WriteContentTypeField 0x814a81d4, overlap 0.
TMCJPEGDEC_set_converterY8U8V8 extent 0x814efb9c..0x814efeac, next TMCJPEG_814EFEAC 0x814efeac, overlap 0.
TMCJPEG_814F0A58 extent 0x814f0a58..0x814f11c4, next TMCJPEG_814F11C4 0x814f11c4, 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.
## fz15f JPEG scheduling plateau
The best readable 0A58 trial resolves all register differences and leaves only subfic/high-bit-mask scheduling at 274/275, 475/475 instructions; all layout, alias, loop and helper variations measured above failed exact equality. Declaration search exhausted 65 builds. Restore the starting unmatched function; preserve all eleven landed exact functions. No fuzzy-only JPEG edit retained.
## fz15f remaining-function completeness audit
Independent object experiments appended entries concurrently; each measured entry is now labeled with its function using its unique target instruction count. Compiler-failing variants and the discarded partially initialized modifier union are excluded. Every remaining function has at least three distinct compiled source-level attempts this round; prior-round attempts are additional evidence.
TMCJPEGDEC_set_converterY8U8V8: 3 distinct compiled source-level trials; remains open.
TMCJPEG_814F0A58: 53 distinct compiled source-level trials; remains open.
kbdEventHandler: 3 distinct compiled source-level trials; remains open.
kbdProcMod: 7 distinct compiled source-level trials; remains open.
kbd_led_handler: 6 distinct compiled source-level trials; remains open.
KBDSetLedsAsync: 6 distinct compiled source-level trials; remains open.
KBDSetLeds: 6 distinct compiled source-level trials; remains open.
KBDSetModState: 7 distinct compiled source-level trials; remains open.
WriteMIMEAttachHeader: 33 distinct compiled source-level trials; remains open.
Zi8PrepareMatch: 4 distinct compiled source-level trials; remains open.
## fz15f final full clean gate
```
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 13264/15948 data None/None functions 11/13 fuzzy 99.5275 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.527466
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEGDEC_set_converterY8U8V8 92.78571
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F0A58 99.01053
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] baseline: code 13264/15948 data None functions 11 fuzzy 99.5275
[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/RevoEX/src/nwc24/NWC24MsgCommit] pool: IDENTICAL
[libs/RevoEX/src/nwc24/NWC24MsgCommit] objdiff: code 8164/8532 data 904/904 functions 17/18 fuzzy 99.9836 linked code 0
[libs/RevoEX/src/nwc24/NWC24MsgCommit] instruction-exact functions: 17/18
[libs/RevoEX/src/nwc24/NWC24MsgCommit] section .bss size 64 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgCommit] section .data size 680 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgCommit] section .sbss size 8 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgCommit] section .sdata size 152 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgCommit] section .text size 8532 match 99.98359
[libs/RevoEX/src/nwc24/NWC24MsgCommit] below 100: WriteMIMEAttachHeader 99.61957
[libs/RevoEX/src/nwc24/NWC24MsgCommit] baseline: code 7272/8532 data 904 functions 16 fuzzy 98.4754
[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
regressions vs baseline: 0
global matched_code_percent: 90.30241 -> 90.33218
global fuzzy_match_percent: 99.54864 -> 99.55293
global complete_code_percent: 69.30851 -> 69.30851
global matched_data_percent: 99.36508 -> 99.36508
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
Before -> after objdiff exact functions: JPEG 11/13 -> 11/13; keyboard 15/21 -> 15/21; NWC 16/18 -> 17/18; zprepare 0/1 -> 0/1.
Before -> after gate instruction-exact functions: JPEG 2/13 -> 2/13; keyboard 14/21 -> 14/21; NWC 16/18 -> 17/18; zprepare 0/1 -> 0/1.
Before -> after exact code bytes: JPEG 13264 -> 13264/15948; keyboard 3088 -> 3088/5764; NWC 7272 -> 8164/8532; zprepare 0 -> 0/3760. Exact data bytes unchanged: JPEG none; keyboard 5296/5296; NWC 904/904; zprepare 8/68.
Fresh clean rebuild raw JPEG symbol-byte equality confirms eleven exact functions: TMCJPEG_814EFEAC, TMCJPEG_814F043C, TMCJPEG_814F11C4, TMCJPEG_814F17E0, TMCJPEG_814F1F48, TMCJPEG_814F2570, TMCJPEG_814F2B50, TMCJPEG_814F3158, TMCJPEG_814F32E4, TMCJPEG_814F34A4, TMCJPEG_814F372C. Gate retains known CR1 branch normalization false positives when object function offsets differ due to setup size gap. No tool changes. Keyboard existing 14 instruction-exact versus 15 objdiff exact discrepancy remains unchanged.
New CheckMsgBoxSpace clean rebuild: ctxdiff 223/223, diffs 0; pool 9/9 identical; objdiff 100.0. Only NWC source helper and this attempts log are retained; no header, symbols, data, configure or other translation-unit change.
## fz15f final remaining functions
TMCJPEGDEC_set_converterY8U8V8 92.78571%: shared convBuf base folded per case, 195/196 instructions, and integer schedule.
TMCJPEG_814F0A58 99.01053%: chroma state register allocation; best rejected trial only two independent preheader instructions swap.
kbdEventHandler 99.83871%: error byte versus channel base allocation, five operand differences.
kbdProcMod 99.90234%: inlined modifier address versus old value r4/r5 allocation, four operands.
kbd_led_handler 64.12%: completion branch form and callback address recomputation, 24/25 instructions.
KBDSetLedsAsync 86.234566%: reservation-loop address/index ownership and result branch, 80/81 instructions.
KBDSetLeds 84.6076%: reservation-loop record pointer versus indexed device word, 75/79 instructions.
KBDSetModState 99.40476%: modifier address versus old value r4/r5 allocation, four operands.
WriteMIMEAttachHeader 99.61957%: type versus disposition lengths and sum result coalescing, five operands.
Zi8PrepareMatch 96.319145%: local stack/code layout and component-presence stores without semantic reads, 939/940 instructions.
Uncertainty: original source construct responsible for the JPEG two-instruction schedule and zprepare dead component flag is unresolved. No unsupported volatility or dummy field retained. Current-round exact source commit: 7ea5a033.
# Xhigh continuation fz15g
Fresh branch agent/w1002/sol-fz15g-xhigh from bc303bc36e5ea826ef9da39d6e9c9ed9c79e4ba9. All four owned files identical to origin/main after fetch. All four pools identical before code tuning. Start exact counts NWC 17/18, JPEG 11/13, keyboard 15/21, zprepare 0/1. Previous helper match retained unchanged.
## fz15g WriteMIMEAttachHeader diagnosis
Origin body unchanged; current structural/exact (0, 5), 92/92 instructions. Frame 0x30, five differences at 25/28/30/32/33 map to measured prefix lengths. Library Mail_strlen returns int, while current locals use long typedef s32. No store/reload volatility proof. Test library result types and direct call-expression boundary before register search.
- WriteMIMEAttachHeader: strlen result locals use int return type: structural/exact (0, 5) instructions 92/92 first [(25, ('mr', 'r29, r3'), ('mr', 'r30, r3')), (28, ('mr', 'r30, r3'), ('mr', 'r29, r3')), (30, ('add', 'r28, r29, r28'), ('add', 'r30, r30, r28')), (32, ('add', 'r0, r3, r30'), ('add', 'r0, r29, r30'))]
- WriteMIMEAttachHeader: formatted byte counts use int return type: structural/exact (0, 5) instructions 92/92 first [(25, ('mr', 'r29, r3'), ('mr', 'r30, r3')), (28, ('mr', 'r30, r3'), ('mr', 'r29, r3')), (30, ('add', 'r28, r29, r28'), ('add', 'r30, r30, r28')), (32, ('add', 'r0, r3, r30'), ('add', 'r0, r29, r30'))]
- WriteMIMEAttachHeader: all library return values use int locals: structural/exact (0, 5) instructions 92/92 first [(25, ('mr', 'r29, r3'), ('mr', 'r30, r3')), (28, ('mr', 'r30, r3'), ('mr', 'r29, r3')), (30, ('add', 'r28, r29, r28'), ('add', 'r30, r30, r28')), (32, ('add', 'r0, r3, r30'), ('add', 'r0, r29, r30'))]
- WriteMIMEAttachHeader: nested library-call capacity tree 0: structural/exact (0, 0) instructions 92/92 first []
## fz15g TMCJPEGDEC_set_converterY8U8V8 diagnosis
Origin body unchanged; current structural/exact (41, 195), 195/196 instructions. Frame 0x10, 195/196 instructions; target early shared convBuf base r4 is folded into individual work addresses. Extent ends at immediate neighbour; no volatility proof. Test typed sample-block ownership, int dimensions and dimension helper boundary.
- TMCJPEGDEC_set_converterY8U8V8: decoder dimensions read through separate const view: structural/exact (41, 195) instructions 195/196
- TMCJPEGDEC_set_converterY8U8V8: component and dimensions use C int locals: structural/exact (41, 195) instructions 195/196
- TMCJPEGDEC_set_converterY8U8V8: texture dimensions owned by inline state helper: structural/exact (41, 195) instructions 195/196
- TMCJPEGDEC_set_converterY8U8V8: conversion sample buffer represented as typed block: structural/exact (41, 195) instructions 195/196
## fz15g WriteMIMEAttachHeader exact
The nested strlen call expression preserves the original evaluation boundary. MWCC evaluates the right operand of the first addition, ContentTxEncA, before ContentTypeA; the expression result now owns the target r30 length sum instead of the scalar encoding local. All five operand differences disappear: 92/92 instructions, ctxdiff diffs 0, identical 9-string pool. Quick full-build gate confirms NWC 18/18 functions, code 8532/8532, data 904/904, all sections 100, no regressions/forbidden/readability. Keep NonMatching classification for this phase as instructed.
## fz15g TMCJPEGDEC_set_converterY8U8V8 Address arithmetic uses a typed sample-word base, preserving all real buffer offsets and object layout. No loads through reinterpreted word types.
## fz15g kbdEventHandler diagnosis
Origin body unchanged; current structural/exact (0, 5), 186/186 instructions. Frame 0x20, 186/186 instructions. First differing instruction 35 loads report error into r3 versus r5 and then table base r30 versus r3. All later instructions identical; no adjacent stack reload evidence. Test report signedness, explicit enum and readonly pointer view.
- TMCJPEGDEC_set_converterY8U8V8: converter buffer viewed as 32-bit sample words: structural/exact (41, 195) instructions 195/196
- kbdEventHandler: read report as const char data with unsigned modifier view: structural/exact (22, 106) instructions 192/186
- TMCJPEGDEC_set_converterY8U8V8: converter buffer viewed as signed 32-bit sample words: structural/exact (41, 195) instructions 195/196
- kbdEventHandler: unsigned error status and signed channel index snapshot: structural/exact (0, 6) instructions 186/186 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'))]
- kbdEventHandler: report uses readonly void-to-byte input view: structural/exact (0, 5) instructions 186/186 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'))]
- TMCJPEGDEC_set_converterY8U8V8: converter buffer viewed as 16-bit sample pairs: structural/exact (41, 195) instructions 195/196
- kbdEventHandler: report status has explicit HID error enum type: structural/exact (0, 6) instructions 186/186 first [(35, ('lbz', 'r4, 2(r4)'), ('lbz', 'r5, 2(r4)')), (36, ('lis', 'r30, 0'), ('lis', 'r3, 0')), (37, ('mulli', 'r3, r31, 0x268'), ('mulli', 'r4, r31, 0x268')), (38, ('addi', 'r0, r4, 0xff'), ('addi', 'r0, r5, 0xff'))]
The first const-char report trial changed signed key comparisons and is excluded from the valid attempt count. Re-run with unsigned casts on every report-byte read to preserve HID values 0x80..0xff. No trial was retained.
## fz15g kbdEventHandler Correct unsigned HID key comparisons in report representation trial.
- kbdEventHandler: const char report view with every byte explicitly unsigned: structural/exact (0, 5) instructions 186/186 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'))]
## fz15g kbdProcMod diagnosis
Origin body unchanged; current structural/exact (0, 4), 256/256 instructions. Frame 0x20, identical instruction counts. Address/result r4/r5 differ in physical field update. Test modifier union word type and real reserved/lock bit layout; no volatility proof.
- kbdProcMod: modifier union uses unsigned int storage and bitfields: structural/exact (0, 4) instructions 256/256 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 modifier bits split from reserved high bits: structural/exact (0, 4) instructions 256/256 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: modifier union scalar follows unsigned int word type: structural/exact (0, 4) instructions 256/256 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: modifier union scalar uses signed word representation: structural/exact (0, 4) instructions 256/256 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)'))]
## fz15g TMCJPEG_814F0A58 diagnosis
Origin body unchanged; current structural/exact (0, 77), 475/475 instructions. Frame 0x60, 475/475 instructions. Earlier implicit chroma padding and phase-shared tileWidth/xEnd resolves all registers but leaves subfic r6 and generated bound-mask rlwinm exchanged. Test readonly count helper and expression result ownership, not declaration permutations.
- kbdProcMod: physical modifier read owned by readonly union helper: structural/exact (0, 4) instructions 256/256 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)'))]
## fz15g KBDSetModState diagnosis
Origin body unchanged; current structural/exact (0, 4), 42/42 instructions. Frame 0x10, identical instruction counts. Address/result r4/r5 differ in physical field update. Test modifier union word type and real reserved/lock bit layout; no volatility proof.
- TMCJPEG_814F0A58: readonly decoder helper owns chroma sample count: structural/exact (34, 283) instructions 474/475
- TMCJPEG_814F0A58: readonly scale factor byte helper owns sample count: structural/exact (34, 283) instructions 474/475
- KBDSetModState: modifier union uses unsigned int storage and bitfields: structural/exact (0, 4) instructions 42/42 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 modifier bits split from reserved high bits: structural/exact (0, 4) instructions 42/42 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)'))]
- TMCJPEG_814F0A58: chroma width and height initialize from shared helper value: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- KBDSetModState: modifier union scalar follows unsigned int word type: structural/exact (0, 4) instructions 42/42 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: modifier union scalar uses signed word representation: structural/exact (0, 4) instructions 42/42 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)'))]
- TMCJPEG_814F0A58: phase-shared variables use C int arithmetic: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- KBDSetModState: physical modifier read owned by readonly union helper: structural/exact (0, 4) instructions 42/42 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)'))]
- TMCJPEG_814F0A58: phase-shared tile width uses unsigned int arithmetic: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
## fz15g kbd_led_handler diagnosis
Origin body unchanged; current structural/exact (13, 21), 24/25 instructions. Frame absent, 24/25 instructions. Target reads callback before device release, branches success-first and rematerializes callback index after result selection, then has a final blr. Test index lifetime and positive guard/helper boundaries.
- kbd_led_handler: success-first switch with callback index cast at each use: structural/exact (10, 18) instructions 25/25
- kbd_led_handler: success-first switch with signed int callback index: structural/exact (10, 18) instructions 25/25
- kbd_led_handler: callback completion enclosed by positive presence branch: structural/exact (10, 18) instructions 25/25
- kbd_led_handler: ordinary null callback guard with success-first switch: structural/exact (10, 18) instructions 25/25
- kbd_led_handler: original callback argument owns final callback lookup: structural/exact (2, 20) instructions 26/25
## fz15g TMCJPEG_814F0A58 Limit expression/readonly helper change to chroma so exact luma phase is unchanged. Test shared assignment value, nested vertical bound and real factor snapshot.
- kbd_led_handler: callback address snapshot before command release: structural/exact (10, 18) instructions 25/25
- kbd_led_handler: inline completion helper uses readonly callback argument: structural/exact (9, 19) instructions 26/25
- TMCJPEG_814F0A58: chroma count expression chained: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- TMCJPEG_814F0A58: chroma count expression directbounds: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- TMCJPEG_814F0A58: chroma count expression scale: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- TMCJPEG_814F0A58: chroma count expression scoped: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- TMCJPEG_814F0A58: chroma count expression helper: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- TMCJPEG_814F0A58: chroma count expression ptrhelper: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
## fz15g kbd_led_handler Original-argument tail lookup improved structural distance to two, with 26/25 instructions. Test integer conversion type and distinct completion index scope without casts on memory accesses.
- kbd_led_handler: callback tail index representation unsignedint: structural/exact (2, 20) instructions 26/25
- kbd_led_handler: callback tail index representation signedint: structural/exact (2, 20) instructions 26/25
- kbd_led_handler: callback tail index representation ulong: structural/exact (2, 20) instructions 26/25
- kbd_led_handler: callback tail index representation constvoid: structural/exact (2, 20) instructions 26/25
- kbd_led_handler: callback tail index representation earlyint: structural/exact (2, 20) instructions 26/25
- kbd_led_handler: callback tail index representation scopedidx: structural/exact (2, 20) instructions 26/25
Best callback tail candidate disassembly pairs:
```
0 ('lis', 'r5, 0') | ('lis', 'r5, 0')
1 ('lis', 'r7, 0') | ('lis', 'r6, 0')
2 ('slwi', 'r0, r4, 3') | ('slwi', 'r0, r4, 3')
3 ('li', 'r6, 0') | ('li', 'r8, 0')
4 ('addi', 'r5, r5, 0') | ('addi', 'r5, r5, 0')
5 ('slwi', 'r8, r4, 5') | ('slwi', 'r7, r4, 5')
6 ('lwzx', 'r0, r5, r0') | ('lwzx', 'r0, r5, r0')
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')
10 ('beqlr', '') | ('beqlr', '')
11 ('cmpwi', 'r3, 1') | ('cmpwi', 'r3, 1')
12 ('beq', '8') | ('bne', '12')
13 ('b', '12') | ('li', 'r3, 0')
14 ('li', 'r3, 0') | ('b', '8')
15 ('b', '8') | ('li', 'r3, 7')
16 ('li', 'r3, 7') | ('lis', 'r5, 0')
17 ('lis', 'r5, 0') | ('slwi', 'r0, r4, 3')
18 ('slwi', 'r0, r4, 3') | ('addi', 'r5, r5, 0')
19 ('addi', 'r5, r5, 0') | ('lwzx', 'r12, r5, r0')
20 ('lwzx', 'r12, r5, r0') | ('add', 'r4, r5, r0')
21 ('add', 'r4, r5, r0') | ('lwz', 'r4, 4(r4)')
22 ('lwz', 'r4, 4(r4)') | ('mtctr', 'r12')
23 ('mtctr', 'r12') | ('bctr', '')
24 ('bctr', '') | ('blr', '')
25 ('blr', '') | None
```
## fz15g Zi8PrepareMatch diagnosis
Origin body unchanged; current structural/exact (36, 889), 939/940 instructions. Target frame 0x70, source 939 versus target 940 instructions. First context-mask init register differs, and target stores component presence at byte 0xf without later reads. Existing -opt off explains stack reloads, so no unsupported volatile/dummy flag added. Test readonly table/request views and scalar expression boundary.
- Zi8PrepareMatch: all lookup table fields are readonly byte pointers: structural/exact (36, 897) instructions 938/940
- Zi8PrepareMatch: read fields use const input while request count remains writable: structural/exact (43, 692) instructions 944/940
- Zi8PrepareMatch: context mask stored as char with explicit unsigned view: structural/exact (37, 834) instructions 940/940
- Zi8PrepareMatch: element index advance separated from halfword fetch: structural/exact (44, 889) instructions 939/940
- Zi8PrepareMatch: component classifier uses direct boolean branch: structural/exact (36, 889) instructions 939/940
## fz15g KBDSetLedsAsync diagnosis
Origin body unchanged; current structural/exact (14, 70), 80/81 instructions. Target frame 0x20. Reservation loop uses unsigned ordinal and byte offset/CTR; source caches channel multiplication across interrupts and uses 80/81 instructions. Test readonly input helper boundary and typed slot loop, preserving all command record layout.
- KBDSetLedsAsync: slot helper rereads channel through const scalar pointer: structural/exact (20, 44) instructions 81/81
- KBDSetLedsAsync: slot helper receives channel scalar value: structural/exact (19, 73) instructions 79/81
- KBDSetLedsAsync: slot helper receives readonly channel object: structural/exact (19, 73) instructions 79/81
- KBDSetLedsAsync: unsigned indexed slot loop uses record device fields: structural/exact (19, 72) instructions 79/81
## fz15g KBDSetLeds diagnosis
Origin body unchanged; current structural/exact (19, 75), 75/79 instructions. Target frame 0x20. Reservation loop uses unsigned ordinal and byte offset/CTR; source caches channel multiplication across interrupts and uses 75/79 instructions. Test readonly input helper boundary and typed slot loop, preserving all command record layout.
- KBDSetLeds: slot helper rereads channel through const scalar pointer: structural/exact (48, 75) instructions 82/79
- KBDSetLeds: slot helper receives channel scalar value: structural/exact (19, 69) instructions 78/79
- KBDSetLeds: slot helper receives readonly channel object: structural/exact (19, 69) instructions 78/79
- KBDSetLeds: unsigned indexed slot loop uses record device fields: structural/exact (19, 68) instructions 78/79
## fz15g kbd_led_handler Combine target true-first if with original-argument index rematerialization. Previous isolated switch contains one extra unconditional branch; if should remove it while preserving final blr.
- kbd_led_handler: true-first if plus original-argument completion base: structural/exact (30, 23) instructions 23/25
- kbd_led_handler: true-first if plus original-argument completion null: structural/exact (30, 23) instructions 23/25
- kbd_led_handler: true-first if plus original-argument completion zero: structural/exact (30, 23) instructions 23/25
- kbd_led_handler: true-first if plus original-argument completion constzero: structural/exact (30, 23) instructions 23/25
## fz15g TMCJPEG_814F0A58 Test actual chroma sample signedness, source increment expression and pointer-add operand order at fixed chroma preheader dependency graph.
- kbd_led_handler: true-first if plus original-argument completion callint: structural/exact (30, 23) instructions 23/25
- kbd_led_handler: true-first if plus original-argument completion sdk: structural/exact (30, 23) instructions 23/25
- TMCJPEG_814F0A58: chroma output pointer initialization nestedstore: structural/exact (101, 408) instructions 473/475
- TMCJPEG_814F0A58: chroma output pointer initialization signedsample: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- TMCJPEG_814F0A58: chroma output pointer initialization paddingneg: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- TMCJPEG_814F0A58: chroma output pointer initialization pointeradd: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
## fz15g TMCJPEG_814F0A58 Test signed-loop unroller boundary and explicit body/iterator forms at the two-instruction preheader plateau.
- TMCJPEG_814F0A58: chroma loop shape while: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- TMCJPEG_814F0A58: chroma loop shape do: structural/exact (204, 413) instructions 305/475
## fz15g kbd_led_handler Test callback BOOL result ownership and parameter mutation versus separate unsigned result; preserve original argument for final callback index.
- TMCJPEG_814F0A58: chroma loop shape commute: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- kbd_led_handler: completion result lifetime parameter: structural/exact (30, 23) instructions 23/25
- kbd_led_handler: completion result lifetime ternary: structural/exact (30, 23) instructions 23/25
- TMCJPEG_814F0A58: chroma loop shape ystepfirst: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- kbd_led_handler: completion result lifetime BOOL: structural/exact (5, 9) instructions 25/25 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'))]
- kbd_led_handler: completion result lifetime switchsame: structural/exact (5, 9) instructions 25/25 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'))]
- TMCJPEG_814F0A58: chroma loop shape finishcount: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- kbd_led_handler: completion result lifetime returnhelper: structural/exact (30, 23) instructions 23/25
## fz15g kbd_led_handler BOOL return representation removed the extra switch branch. Combine it with target positive-case layout, then vary command-address/zero ownership.
- kbd_led_handler: callback BOOL result and positive switch base: structural/exact (2, 20) instructions 26/25
- kbd_led_handler: callback BOOL result and positive switch null: structural/exact (9, 19) instructions 26/25
- kbd_led_handler: callback BOOL result and positive switch cmdptr: structural/exact (2, 20) instructions 26/25
- kbd_led_handler: callback BOOL result and positive switch earlyptr: structural/exact (2, 20) instructions 26/25
- kbd_led_handler: callback BOOL result and positive switch zero: structural/exact (9, 19) instructions 26/25
- kbd_led_handler: callback BOOL result and positive switch reloadguard: structural/exact (2, 20) instructions 26/25
- kbd_led_handler: callback BOOL result and positive switch signedidx: structural/exact (2, 20) instructions 26/25
- kbd_led_handler: callback BOOL result and positive switch param: structural/exact (2, 20) instructions 26/25
## fz15g kbd_led_handler The target retains final blr after tail call. Test a real shared exit and positive callback guard with direct if result selection.
- kbd_led_handler: callback single exit shape goto: structural/exact (30, 23) instructions 23/25
- kbd_led_handler: callback single exit shape positive: structural/exact (30, 23) instructions 23/25
- kbd_led_handler: callback single exit shape positiveNULL: structural/exact (30, 23) instructions 23/25
- kbd_led_handler: callback single exit shape dupcall: structural/exact (33, 23) instructions 26/25
## fz15g TMCJPEG_814F0A58 Reverse which source plane owns named row padding, and use the C int type rather than long. This distinguishes width use lifetime from explicit padding definition.
- TMCJPEG_814F0A58: named row padding int in cr plane: structural/exact (0, 62) instructions 475/475
- TMCJPEG_814F0A58: named row padding unsigned int in cr plane: structural/exact (0, 62) instructions 475/475
- TMCJPEG_814F0A58: named row padding s32 in cr plane: structural/exact (0, 62) instructions 475/475
- TMCJPEG_814F0A58: named row padding int in both plane: structural/exact (21, 220) instructions 475/475
- TMCJPEG_814F0A58: named row padding unsigned int in both plane: structural/exact (21, 220) instructions 475/475
- TMCJPEG_814F0A58: named row padding s32 in both plane: structural/exact (21, 220) instructions 475/475
## fz15g owned data and extents audit
JPEG has no owned data sections; NWC 904/904 and keyboard 5296/5296 data bytes already pair exactly. No symbol rename or extent change justified there.
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: all twelve entries in target jumptable_8166B3D0 (48 bytes) point inside nonmatching Zi8PrepareMatch; source @230 is the corresponding compiler-generated switch table with different code offsets. This is a code-layout gap; @230 is not a stable real source object name, so no rename. Extab 8 bytes exact, extabindex 12 differs by nonmatching function extent; no data-type size correction.
Zi8PrepareMatch extent 0x814850fc..0x81485fac, next CDBInit 0x81485fac, overlap 0.
CheckMsgBoxSpace extent 0x814a731c..0x814a7698, next SynthesizeAddrStr 0x814a7698, overlap 0.
WriteMIMEAttachHeader extent 0x814a8064..0x814a81d4, next WriteContentTypeField 0x814a81d4, overlap 0.
TMCJPEGDEC_set_converterY8U8V8 extent 0x814efb9c..0x814efeac, next TMCJPEG_814EFEAC 0x814efeac, overlap 0.
TMCJPEG_814F0A58 extent 0x814f0a58..0x814f11c4, next TMCJPEG_814F11C4 0x814f11c4, 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.
## fz15g TMCJPEG_814F0A58 Continue already diagnosed chroma preheader. Retire dimension locals after bound formation, reuse them for real source padding, or use the prior row induction local; no dummy values.
- TMCJPEG_814F0A58: chroma dimension lifetime widthpadding: structural/exact (21, 126) instructions 475/475
- TMCJPEG_814F0A58: chroma dimension lifetime heightpadding: structural/exact (21, 126) instructions 475/475
- TMCJPEG_814F0A58: chroma dimension lifetime reusebound: structural/exact (21, 140) instructions 475/475
- TMCJPEG_814F0A58: chroma dimension lifetime rowvariable: structural/exact (0, 0) instructions 475/475 first []
## fz15g TMCJPEG_814F0A58 exact candidate
Reusing the existing row induction variable for the chroma loop, rather than incrementing the incoming y parameter, resolves the last two preheader scheduling instructions after sharing xEnd/tileWidth and expressing source padding directly. Both loops use row=original y; y is not used after the chroma loop, so output semantics are unchanged. Raw source/target symbol bytes identical, 1900 bytes and 475/475 instructions; branch-correct declsearch score (0,0). ctxdiff still emits four false CR1-branch differences because its normalizer uses operand zero rather than the branch target, and the converter-setup function remains four bytes shorter. Existing tool bug also affects eleven pre-existing exact converters; no tool or symbol edits.
The queued last-stage keyboard declaration check was cancelled before modifying source: shared git-fetch lock was occupied by another worker fetch for several minutes. Those functions already received their required origin fetch/check and distinct structural trials earlier this round.
JPEG candidate quick full-build gate: GATE PASS, objdiff 12/13 functions and code 15164/15948 (before 11/13, 13264/15948), no regressions/forbidden/readability warnings, DOL hash correct. Gate instruction-exact remains 2/13 solely because of the unchanged CR1 normalizer issue documented above; raw bytes prove the new converter exact. NWC remains 18/18 and 8532/8532 with 904/904 data.
## fz15g kbdEventHandler final declaration search
Continue the function already fetched/diagnosed this round; its body still equals the fetched origin snapshot. Structural trials exhausted; test actual declaration block last.
Declaration-search output for kbdEventHandler:
```
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;
```
## fz15g kbdProcMod final declaration search
Continue the function already fetched/diagnosed this round; its body still equals the fetched origin snapshot. Structural trials exhausted; test actual declaration block last.
Declaration-search output for kbdProcMod:
```
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;
```
## fz15g KBDSetModState final declaration search
Continue the function already fetched/diagnosed this round; its body still equals the fetched origin snapshot. Structural trials exhausted; test actual declaration block last.
Declaration-search output for KBDSetModState:
```
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;
```
## fz15g TMCJPEGDEC_set_converterY8U8V8 Continue previously fetched and diagnosed converter setup. Test byte-buffer address ownership as integer SDK address arithmetic and readonly buffer view; every base remains the real convBuf member, without pinned labels or numeric work offsets.
- TMCJPEGDEC_set_converterY8U8V8: shared conversion address representation address: structural/exact (41, 195) instructions 195/196
- TMCJPEGDEC_set_converterY8U8V8: shared conversion address representation pointeraddress: structural/exact (41, 195) instructions 195/196
- TMCJPEGDEC_set_converterY8U8V8: shared conversion address representation constaddress: structural/exact (41, 195) instructions 195/196
## fz15g pre-final completeness audit
Only two source changes retained: exact WriteMIMEAttachHeader and TMCJPEG_814F0A58. All other source trials restored; no header/config/symbol changes. Every remaining function has at least three distinct valid compiled source trials this round. Count excludes the unsigned-HID bug in the first const-char trial and excludes compile failures.
Zi8PrepareMatch: 5 distinct valid current-round compiled source trials; remains open.
TMCJPEGDEC_set_converterY8U8V8: 10 distinct valid current-round compiled source trials; remains open.
kbdEventHandler: 4 distinct valid current-round compiled source trials; remains open.
kbdProcMod: 5 distinct valid current-round compiled source trials; remains open.
kbd_led_handler: 36 distinct valid current-round compiled source trials; remains open.
KBDSetLedsAsync: 4 distinct valid current-round compiled source trials; remains open.
KBDSetLeds: 4 distinct valid current-round compiled source trials; remains open.
KBDSetModState: 5 distinct valid current-round compiled source trials; remains open.
Gate keyboard count 14/21 versus objdiff 15/21 is also a normalization artifact: KBDResetChannel raw symbol bytes are identical; odiff misnormalizes CR1 bne/beq at 5/26 from instruction address, yielding 24-byte false differences because earlier unmatched LED functions differ in length. Correct last-operand branch normalization scores (0,0). No tool changes.
Commits so far: 36ff398b NWC header measurement expression; e4b0d291 JPEG row induction. Remote main advanced while other workers fetched; this branch remains on its authorized starting base, without rebase or unrelated changes.
## fz15g final full clean gate
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RevoEX/src/nwc24/NWC24MsgCommit] pool: IDENTICAL
[libs/RevoEX/src/nwc24/NWC24MsgCommit] objdiff: code 8532/8532 data 904/904 functions 18/18 fuzzy 100.0000 linked code 0
[libs/RevoEX/src/nwc24/NWC24MsgCommit] instruction-exact functions: 18/18
[libs/RevoEX/src/nwc24/NWC24MsgCommit] section .bss size 64 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgCommit] section .data size 680 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgCommit] section .sbss size 8 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgCommit] section .sdata size 152 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgCommit] section .text size 8532 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgCommit] baseline: code 8164/8532 data 904 functions 17 fuzzy 99.9836
[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 13264/15948 data None functions 11 fuzzy 99.5275
[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
regressions vs baseline: 0
global matched_code_percent: 90.43582 -> 90.51154
global fuzzy_match_percent: 99.56486 -> 99.56554
global complete_code_percent: 70.30611 -> 70.30611
global matched_data_percent: 99.36596 -> 99.36596
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
## fz15g final per-unit before -> after
main/libs/RevoEX/src/nwc24/NWC24MsgCommit: objdiff exact functions 17 -> 18/18, code bytes 8164 -> 8532/8532, data bytes 904 -> 904/904.
main/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8: objdiff exact functions 11 -> 12/13, code bytes 13264 -> 15164/15948, data bytes 0 -> 0/0.
main/libs/RVL_SDK/src/kbd/kbd_lib: objdiff exact functions 15 -> 15/21, code bytes 3088 -> 3088/5764, data bytes 5296 -> 5296/5296.
main/libs/RVLMiddleware/eZiText/src/clib/zprepare: objdiff exact functions 0 -> 0/1, code bytes 0 -> 0/3760, data bytes 8 -> 8/68.
Gate instruction-exact counts NWC 17 -> 18, JPEG 2 -> 2, keyboard 14 -> 14, zprepare 0 -> 0. Branch-correct instruction equality and objdiff confirm JPEG 11 -> 12 and keyboard 15 -> 15; raw-byte proof and the existing CR1 normalizer artifact are documented above.
## fz15g final open functions and attempt audit
TMCJPEGDEC_set_converterY8U8V8 92.78571%: shared convBuf address folded into case addresses, 195/196 instructions; dimension scheduling also differs; 10 distinct valid compiled current-round source trials.
kbdEventHandler 99.83871%: initial report status uses r3 and table base r30 instead of r5 and r3; five operand differences, 186/186 instructions; 4 distinct valid compiled current-round source trials.
kbdProcMod 99.90234%: inlined modifier setter address and old-state value swap r4/r5; four operands, 256/256 instructions; 5 distinct valid compiled current-round source trials.
kbd_led_handler 64.12%: callback-index rematerialization and success/default branch shape; retained source 24/25 instructions, best rejected BOOL trial 25/25 with nine differences; 36 distinct valid compiled current-round source trials.
KBDSetLedsAsync 86.234566%: channel-stride cached across interrupt calls and slot-loop address/ordinal form; retained source 80/81 instructions; 4 distinct valid compiled current-round source trials.
KBDSetLeds 84.6076%: channel-stride caching and command-slot loop pointer form; retained source 75/79 instructions; 4 distinct valid compiled current-round source trials.
KBDSetModState 99.40476%: modifier address and prior word swap r4/r5; four operand differences, 42/42 instructions; 5 distinct valid compiled current-round source trials.
Zi8PrepareMatch 96.319145%: target component branch stores a local flag absent in source, plus local/branch scheduling; retained source 939/940 instructions, switch relocations remain code-dependent; 5 distinct valid compiled current-round source trials.
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.

View File

@@ -1245,504 +1245,3 @@ Immediate matching stack store/reload pairs in remaining targets: []. No definit
- libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable 94.82%; 3 successfully built distinct source trials; smoothing/projected geometry floating scheduling,250/250.
- libs/RVL_SDK/src/kpad/KPAD KPADRead 97.52723%; 3 successfully built distinct source trials; sample loop/polling temporaries and branch scheduling,459/459.
- libs/RVL_SDK/src/kpad/KPAD KPADInit 96.51351%; 3 successfully built distinct source trials; controller/ring initialization and floating scheduling,185/185.
# Round 4: fresh origin/main after KPAD reset and continuation landed
Initial all-unit quick gate PASS. Pools checked explicitly first: address57/57, SD101/101, KPAD0/0. All owned data100%; no rename or extent edit needed. Current round uses new combinations of lifetime/alias boundaries and inline temporaries, rather than replaying prior variants.
## src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv
Fetch origin/main adcd8ca586dc4ad15c62df304e560a7c974f1c12. Initial assembly diagnosis: (19, 323) structural/positional differences; instructions 820/820
Remote source equals tested HEAD; still open 97.44634%. Structural diagnosis: 820/820; frame/branch shape agrees, layout/event lifetime and floating/register scheduling remain. Probe heap and owner const views before allocation tuning.
- name immutable scene heap once for all layout allocations: (24, 793) structural/positional; instructions 821/820; restored.
- construct GUI handler objects through named parent view: (19, 323) structural/positional; instructions 820/820; restored.
- read completed code layout through const object view for label setup: build failed ^ # (10184) return value expected ### mwcceppc.exe Compiler: # 317: } # Warning: ^ # (10184) return value expected ### mwcceppc.exe Compiler: # 438: nw4r::lyt::Pane* textPane = codeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_crd_btn_00", true); # Error: ^ # (10248) function call '[const ipl::layout::Object].getNW4RLyt()' does not # match # 'ipl::layout::Object::getNW4RLyt()' (non-static) # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
## src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv
Fetch origin/main adcd8ca586dc4ad15c62df304e560a7c974f1c12. Initial assembly diagnosis: (10, 68) structural/positional differences; instructions 82/84
Remote source equals tested HEAD; still open 88.03571%. Structural diagnosis: 82/84; identical stack buffer extent, name/display pointer addresses should remain live across pane lookup; cache-copy source/destination order differs.
- combine mutable String and friend-record references: (20, 45) structural/positional; instructions 81/84; restored.
- combine String view with reusable pane/text temporaries: (10, 39) structural/positional; instructions 83/84; restored.
- name cached friend source and destination before copy: (10, 68) structural/positional; instructions 82/84; restored.
## src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv
Fetch origin/main adcd8ca586dc4ad15c62df304e560a7c974f1c12. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 38/38
Remote source equals tested HEAD; still open 99.42105%. Structural diagnosis: 38/38; sole two differences exchange memcpy source and destination addi order, not register-only. Test typed inputs and narrower local boundaries.
- source create-id pointer declared after name-copy call: (2, 2) structural/positional; instructions 38/38; restored.
- mutable string view and const create-id view combined: (2, 2) structural/positional; instructions 38/38; restored.
- initialize friend-id destination pointer at memcpy boundary: (2, 2) structural/positional; instructions 38/38; restored.
## src/scene/address/iplAddressEdit set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err
Fetch origin/main adcd8ca586dc4ad15c62df304e560a7c974f1c12. Initial assembly diagnosis: (1, 30) structural/positional differences; instructions 76/75
Remote source equals tested HEAD; still open 98.666664%. Structural diagnosis: 76/75; extra initialized default retained for unrecognized error; target leaves value unspecified. No uninitialized-value trial allowed; check safe selection boundary and local scope.
- safe default initialized at error-message buffer declaration: (2, 45) structural/positional; instructions 77/75; restored.
- switch collapsed to initialized default with network override: (12, 29) structural/positional; instructions 67/75; restored.
- message pointer is immutable after exhaustive safe error selection: (1, 30) structural/positional; instructions 76/75; restored.
# Round 4: fresh origin/main after KPAD reset and continuation landed
Initial all-unit quick gate PASS. Pools checked explicitly first: address57/57, SD101/101, KPAD0/0. All owned data100%; no rename or extent edit needed. Current round uses new combinations of lifetime/alias boundaries and inline temporaries, rather than replaying prior variants.
## src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv
Fetch origin/main 68c4c9aeac0b0f28264f43f7c301ab20d873fb12. Initial assembly diagnosis: (4, 39) structural/positional differences; instructions 145/146
Remote source equals tested HEAD; still open 97.73972%. Structural diagnosis: 145/146; earlier duration diagnosis was incomplete. Actual missing instruction is BS2-manager reload at loop-body entry; target has independent global and string bases, source reuses condition pointer. Frame matches; test loop boundaries first.
- explicit endless loop with state-eight exit: (9, 40) structural/positional; instructions 145/146; restored.
- name BS2 polling manager at each condition evaluation: build failed ne\iplSceneManager.h:14 # Z:\mnt\drive2\projects\wii-ipl-workers\data-d5\include\iplSceneUI.h:11 # Z:\mnt\drive2\projects\wii-ipl-workers\data- # d5\src\scene\sdChannelSelect\iplSDChannelSelect.cpp:6) ### mwcceppc.exe Compiler: # File: src\scene\sdChannelSelect\iplSDChannelSelect.cpp # --------------------------------------------------------- # 243: BS2Manager* manager; # Error: ^^^^^^^^^^ # (10140) undefined identifier 'BS2Manager' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- goto polling loop separates state query and update blocks: (4, 39) structural/positional; instructions 145/146; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv
Fetch origin/main 68c4c9aeac0b0f28264f43f7c301ab20d873fb12. Initial assembly diagnosis: (4, 143) structural/positional differences; instructions 170/171
Remote source equals tested HEAD; still open 99.15205%. Structural diagnosis: 170/171; branch form requires second success beq8 plus b failure; compaction count r8 vsr6. Direct switch with scope/default termination and counter order are distinct structural levers.
- switch with natural final default fallthrough: (8, 143) structural/positional; instructions 172/171; restored.
- switch default before explicit success arms: (58, 107) structural/positional; instructions 171/171; restored.
- reverse error compaction count declaration lifetimes: (4, 142) structural/positional; instructions 170/171; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
Fetch origin/main 68c4c9aeac0b0f28264f43f7c301ab20d873fb12. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 101/101
Remote source equals tested HEAD; still open 97.81188%. Structural diagnosis: equal instruction counts; only threshold load/count store scheduling plus loop register lifetimes. Real output-buffer/operand views change alias scope without volatile casts.
- postincrement count before checking usage: (2, 4) structural/positional; instructions 101/101; restored.
- threshold-first source comparison operand order: (6, 9) structural/positional; instructions 101/101; restored.
- name output array views independently of count pointer: (2, 4) structural/positional; instructions 101/101; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
Fetch origin/main 68c4c9aeac0b0f28264f43f7c301ab20d873fb12. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 102/102
Remote source equals tested HEAD; still open 97.833336%. Structural diagnosis: equal instruction counts; only threshold load/count store scheduling plus loop register lifetimes. Real output-buffer/operand views change alias scope without volatile casts.
- postincrement count before checking usage: (2, 4) structural/positional; instructions 102/102; restored.
- threshold-first source comparison operand order: (6, 9) structural/positional; instructions 102/102; restored.
- name output array views independently of count pointer: (2, 4) structural/positional; instructions 102/102; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
Fetch origin/main 68c4c9aeac0b0f28264f43f7c301ab20d873fb12. Initial assembly diagnosis: (2, 22) structural/positional differences; instructions 126/126
Remote source equals tested HEAD; still open 97.29365%. Structural diagnosis: equal instruction counts; only threshold load/count store scheduling plus loop register lifetimes. Real output-buffer/operand views change alias scope without volatile casts.
- postincrement count before checking usage: (2, 22) structural/positional; instructions 126/126; restored.
- threshold-first source comparison operand order: (6, 27) structural/positional; instructions 126/126; restored.
- name output array views independently of count pointer: (2, 22) structural/positional; instructions 126/126; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
Fetch origin/main c7896c380230bd05f4f8c011166e96451c9eabfb. Initial assembly diagnosis: (8, 16) structural/positional differences; instructions 361/361
Remote source equals tested HEAD; still open 97.55125%. Structural diagnosis: equal instruction counts; only threshold load/count store scheduling plus loop register lifetimes. Real output-buffer/operand views change alias scope without volatile casts.
- postincrement count before checking usage: (8, 16) structural/positional; instructions 361/361; restored.
- threshold-first source comparison operand order: (24, 36) structural/positional; instructions 361/361; restored.
- name output array views independently of count pointer: (8, 16) structural/positional; instructions 361/361; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv
Fetch origin/main c7896c380230bd05f4f8c011166e96451c9eabfb. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 35/35
Remote source equals tested HEAD; still open 99.65714%. Structural diagnosis: 35/35; target loads heap before manager; source loads manager first. Ref/pointer object input boundary may affect allocator/alias assumptions.
- save manager reference view after heap pointer definition: (2, 2) structural/positional; instructions 35/35; restored.
- save manager reference before heap definition: (2, 2) structural/positional; instructions 35/35; restored.
- heap reference view evaluated at flush boundary: (2, 2) structural/positional; instructions 35/35; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect calcCommon__Q33ipl5scene15SDChannelSelectFv
Fetch origin/main 2119935c1dd8033630087deb598defc52f48d619. Initial assembly diagnosis: (0, 0) structural/positional differences; instructions 108/108
Baseline-report correction: build/43U/report.json was stale despite a fresh gate, because gate generates a temporary report. Regenerated exact-name baseline directly with objdiff-cli before resuming SD work; current live gate remains90/94,117/129,21/29. No matched functions edited.
# Round 4: fresh origin/main after KPAD reset and continuation landed
Initial all-unit quick gate PASS. Pools checked explicitly first: address57/57, SD101/101, KPAD0/0. All owned data100%; no rename or extent edit needed. Current round uses new combinations of lifetime/alias boundaries and inline temporaries, rather than replaying prior variants.
## src/scene/sdChannelSelect/iplSDChannelSelect calcCommon__Q33ipl5scene15SDChannelSelectFv
Fetch origin/main 2119935c1dd8033630087deb598defc52f48d619. Initial assembly diagnosis: (0, 0) structural/positional differences; instructions 108/108
Fresh-build baseline correction: SD calcCommon, initializeNormalPage and selectChannel are ALREADY exact on origin/main. Header commit bac1e542 changed SDButton setter declaration to one argument before this round. Initial quick gate used stale compiled SD object; building the owned SD object updated those matches. Skip all3; do not count inherited improvements. Live baseline is SD120/129.
## src/scene/sdChannelSelect/iplSDChannelSelect setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj
Fetch origin/main ecee6f01e4ea2ca8f49a69d6259e21a60000ce7e. Initial assembly diagnosis: (23, 68) structural/positional differences; instructions 233/233
Remote source equals tested HEAD; still open 93.4721%. Structural diagnosis: 233/233; target matrix input/scissor float scheduling differs. Constructor boundaries and geometry input/declaration order first.
- separate uninitialized transformed input from vector constructor: (27, 72) structural/positional; instructions 233/233; restored.
- swap framebuffer scalar declaration order: (23, 76) structural/positional; instructions 233/233; restored.
- source scale division uses immutable scale vector reference: (59, 220) structural/positional; instructions 239/233; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect onEventDerived__Q43ipl5scene32@unnamed@iplSDChannelSelect_cpp@33SDChannelSelectButtonEventHandlerFUlUlPCQ33ipl10controller9Interface
Fetch origin/main ecee6f01e4ea2ca8f49a69d6259e21a60000ce7e. Initial assembly diagnosis: (3, 109) structural/positional differences; instructions 143/144
Remote source equals tested HEAD; still open 99.236115%. Structural diagnosis: 144/144; target branch target/event guard and scene/controller lifetimes differ. Read-only component/immutable scene-pointer input boundaries tested before registers.
- normal event dispatch uses named immutable boolean: (3, 109) structural/positional; instructions 143/144; restored.
- input component viewed as const during name lookup: build failed 5\src\scene\sdChannelSelect\iplSDChannelSelect.cpp:6) ### mwcceppc.exe Compiler: # File: src\scene\sdChannelSelect\iplSDChannelSelect.cpp # --------------------------------------------------------- # 3447: const char* paneName = component->getPane()->GetName(); # Error: ^ # (10248) function call '[const ipl::gui::PaneComponent].getPane()' does not # match # 'gui::PaneComponent::getPane()' (non-static) # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- normal-event owner stored in const pointer binding: (28, 128) structural/positional; instructions 137/144; restored.
## src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (19, 323) structural/positional differences; instructions 820/820
Remote source equals tested HEAD; still open 97.44634%. Structural diagnosis: correct constness: NW4R layout getter requires mutable object; bind pointer const instead without changing layout.
- immutable layout-pointer binding instead of const-pointee view: (52, 596) structural/positional; instructions 812/820; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (4, 39) structural/positional differences; instructions 145/146
Remote source equals tested HEAD; still open 97.73972%. Structural diagnosis: correct manager type bs2::Manager; target has separate body/condition pointer loads.
- name correctly typed BS2 polling manager at condition boundary: (4, 39) structural/positional; instructions 145/146; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect onEventDerived__Q43ipl5scene32@unnamed@iplSDChannelSelect_cpp@33SDChannelSelectButtonEventHandlerFUlUlPCQ33ipl10controller9Interface
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (3, 109) structural/positional differences; instructions 143/144
Remote source equals tested HEAD; still open 99.236115%. Structural diagnosis: Fresh setter header resolved prior register differences. Now only143/144, targetbeq8+b end versus ours bne end. Apply faithful switch dispatch boundary.
- switch event with explicit default return before normal block: (0, 0) structural/positional; instructions 144/144; candidate kept.
## libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (0, 9) structural/positional differences; instructions 19/19
Remote source equals tested HEAD; still open 96.57895%. Structural diagnosis: 19/19; target double calibration and half-height coefficients reuse their input registers; prior named scalar input fixed reset. Test true coefficient lifetimes/operand order, same frame.
- name double calibration value then multiply scale in place: (0, 13) structural/positional; instructions 19/19; restored.
- reuse half-height coefficient variable as height product: build failed e/private/bte -DNDEBUG=1 -DTARGET_RVL -ipa file -fp_contract off -lang=c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 360: f32 x = src->x * halfHeight; # Error: ^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- name all calibration coefficients with original literal order: (0, 13) structural/positional; instructions 19/19; restored.
## libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (0, 7) structural/positional differences; instructions 52/52
Remote source equals tested HEAD; still open 99.23077%. Structural diagnosis: 52/52; base-array pointer r4 versus targetr3, squared-height/zero floating registers. No stack reread evidence. Test typed array input and local declaration boundary.
- unsigned immutable array index before controller lookup: (0, 7) structural/positional; instructions 52/52; restored.
- const array-base pointer binding before index addition: (0, 7) structural/positional; instructions 52/52; restored.
- reuse zero input and squared-height declaration before pointer: (0, 9) structural/positional; instructions 52/52; restored.
## libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (2, 35) structural/positional differences; instructions 101/101
Remote source equals tested HEAD; still open 97.27723%. Structural diagnosis: 101/101; squared magnitude and target/circle weights float SSA lifetimes differ. All state outputs retained, same loop/frame.
- name acceleration X/Y squared components before square-root: (2, 35) structural/positional; instructions 101/101; restored.
- immutable normal vector value loaded before target-component assignments: (29, 89) structural/positional; instructions 105/101; restored.
- name circle interpolation weight at declaration boundary: (12, 67) structural/positional; instructions 100/101; restored.
## libs/RVL_SDK/src/kpad/KPAD read_kpad_acc
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (16, 66) structural/positional differences; instructions 400/400
Remote source equals tested HEAD; still open 98.15%. Structural diagnosis: 400/400; clamp/smooth helper limits and vector-copy lifetimes cause float/register scheduling differences. Probe helper input ownership and temporary scope.
- name core acceleration clamp limit before axis updates: (32, 96) structural/positional; instructions 400/400; restored.
- extension previous vector declared with top-level previous vectors: (16, 66) structural/positional; instructions 400/400; restored.
- switch sample formats listed by high formats before low formats: (16, 66) structural/positional; instructions 400/400; restored.
## libs/RVL_SDK/src/kpad/KPAD select_1obj_first
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (2, 26) structural/positional differences; instructions 109/109
Remote source equals tested HEAD; still open 98.348625%. Structural diagnosis: 109/109; target geometry coefficient lifetimes and vector store scheduling differ. Coefficient-first multiplication proved exact for continuation; test here too.
- name horizontal and vertical tangent-normal product inputs: (2, 26) structural/positional; instructions 109/109; restored.
- distance coefficient first in geometry offset multiplication: (2, 26) structural/positional; instructions 109/109; restored.
- declare candidate geometry output vectors before object coordinates: (13, 33) structural/positional; instructions 109/109; restored.
## libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (14, 45) structural/positional differences; instructions 250/250
Remote source equals tested HEAD; still open 94.82%. Structural diagnosis: 250/250; filter weights and projected vector temporaries drive FP scheduling. Test limit lifetimes and vector ordering.
- dist filter named limit before magnitude normalization: (14, 46) structural/positional; instructions 250/250; restored.
- pos filter normalized delta stored through two separate scalar temporaries: (14, 45) structural/positional; instructions 250/250; restored.
- place delta vector declaration before point vector: (40, 71) structural/positional; instructions 250/250; restored.
## libs/RVL_SDK/src/kpad/KPAD KPADRead
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (11, 89) structural/positional differences; instructions 459/459
Remote source equals tested HEAD; still open 97.52723%. Structural diagnosis: 459/459; polling state and sample loop/register lifetimes differ. No uninitialized output introduced, preserve sampling semantics.
- available counter assignment after pointer declarations: (11, 89) structural/positional; instructions 459/459; restored.
- immutable core buttons mask when forming button state: (11, 89) structural/positional; instructions 459/459; restored.
- live sample and output pointer declarations precede saved sample: (11, 89) structural/positional; instructions 459/459; restored.
## libs/RVL_SDK/src/kpad/KPAD KPADInit
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (9, 81) structural/positional differences; instructions 185/185
Remote source equals tested HEAD; still open 96.51351%. Structural diagnosis: 185/185; many controller/rotation initialization register ties. Named diagonal/calibration scalar lifetimes worked for reset; retain ordinary storage and loops.
- reference diagonal squared components named inside loop: (9, 83) structural/positional; instructions 185/185; restored.
- sensor conversion distance declared separately from reusable center offset: (9, 81) structural/positional; instructions 185/185; restored.
- controller ring initialization uses named data-array pointer: (11, 82) structural/positional; instructions 185/185; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (4, 143) structural/positional differences; instructions 170/171
Remote source equals tested HEAD; still open 99.15205%. Structural diagnosis: Same branch lever just matched handler. Test explicit success destinations before default failure, preserving shared postprocessing.
- separate explicit success jumps to common title-list block: (4, 143) structural/positional; instructions 170/171; restored.
## libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (0, 9) structural/positional differences; instructions 19/19
Remote source equals tested HEAD; still open 96.57895%. Structural diagnosis: Correct C declaration scope. Keep half-height coefficient variable live through its multiply, as target does.
- reuse half coefficient after all leading scalar declarations: (0, 10) structural/positional; instructions 19/19; restored.
## libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (2, 35) structural/positional differences; instructions 101/101
Remote source equals tested HEAD; still open 97.27723%. Structural diagnosis: Target overwrites initial magnitude float register with smoothing weight; source separate temporary may prevent coalescing. This scalar is dead before smoothing assignment.
- reuse acceleration magnitude as interpolation scale after normalization: (2, 35) structural/positional; instructions 101/101; restored.
Round4 exact candidate: button-handler onEventDerived144/144, ctxdiff0 and exact-name objdiff100. Explicit switch guard for event0 emits targetbeq8+b end. Fresh baselineSD120/129 ->121/129, code28152 ->28728. All-unit quick gatePASS, DOLcorrect, poolsidentical,0 regressions/patterns/style. Existing3 setter matches inherited from origin/main are excluded from claimed gain.
## libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (0, 7) structural/positional differences; instructions 52/52
Remote source equals tested HEAD; still open 99.23077%. Structural diagnosis: Remaining diff is7 pure registers; prior namedzero+declaration placement reduced4 floating differences, leaving only base-pointer coloring. Try definition-level scalar const, never volatility.
- immutable channel parameter at function definition: (0, 7) structural/positional; instructions 52/52; restored.
- immutable height parameter at function definition: (0, 7) structural/positional; instructions 52/52; restored.
- both sensor-height scalar inputs immutable: (0, 7) structural/positional; instructions 52/52; restored.
- Last register search with real named zero and squared-height declarations: declaration block: | KPADInside* kpad; | f32 halfHeightSquared; | f32 zero; | f32 halfHeight; | f32 barOffsetX; | f32 barDiagonal; | f32 halfWidthSquared; | f32 halfWidth; | f32 negativeSensorHeight; | f32 barDiagonalSquared; | start (0, 9) | improved (0, 7) | improved (0, 3) | best (0, 3) after 70 builds; kept in source: | KPADInside* kpad; | f32 barDiagonalSquared; | f32 halfHeightSquared; | f32 halfHeight; | f32 barOffsetX; | f32 barDiagonal; | f32 halfWidthSquared; | f32 halfWidth; | f32 negativeSensorHeight; | f32 zero; |
## libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (0, 9) structural/positional differences; instructions 19/19
Remote source equals tested HEAD; still open 96.57895%. Structural diagnosis: Same19/19 leaf structure. Final register-only search names the double literal separately from its scale product, as the target reuses that register. Previous round had only an anonymous double constant.
- Last register search with named double calibration input: declaration block: | f64 correction; | f64 scaled; | f32 height; | f32 half; | f32 halfHeight; | f32 aspect; | f32 x; | f32 y; | start (0, 13) | improved (0, 12) | best (0, 12) after 75 builds; kept in source: | f32 aspect; | f64 scaled; | f32 height; | f32 half; | f32 halfHeight; | f64 correction; | f32 x; | f32 y; |
## Round4 final full clean gate and remaining-function audit
Full non-quick gate over all3 units PASS; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d; all pools identical;0 regressions,0 forbidden additions,0 readability warnings. Owned data100%, no symbol name/extent edits. Remaining function ELF extents end before/equal next symbol. Stack adjacent store/reload proof pairs []; no definition-level volatile justified.
src/scene/address/iplAddressEdit: fresh exact 90 ->90/94; code 23044 ->23044/27112; data 2560 ->2560/2560.
src/scene/sdChannelSelect/iplSDChannelSelect: fresh exact 120 ->121/129; code 28152 ->28728/33828; data 2960 ->2960/2960.
libs/RVL_SDK/src/kpad/KPAD: fresh exact 21 ->21/29; code 6756 ->6756/13056; data 8032 ->8032/8032.
SD prompt baseline117 was stale; fresh origin/main compiled baseline120 includes3 setter matches inherited from bac1e542, excluded from worker gain. Worker gain is handler only120 ->121. Retained source diff only switch/event guard. Uncertainty remains on unsupported NWC24 error defaults; safe initialization retained instead of reproducing unspecified target values. All20 remaining functions have at least3 successful distinct source trials in this round, failed builds excluded.
- src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv 97.44634%; 3 successful distinct source trials; layout construction lifetime/register scheduling; same820 instructions.
- src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv 88.03571%; 3 successful distinct source trials; text-array addresses folded until after pane lookup; target retains pointers across lookup,82/84.
- src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv 99.42105%; 3 successful distinct source trials; memcpy source/destination address evaluation order,38/38.
- src/scene/address/iplAddressEdit set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err 98.666664%; 3 successful distinct source trials; extra safe default initialization; target appears to leave messageId undefined for unhandled error,76/75.
- src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv 97.73972%; 3 successful distinct source trials; BS2 polling body omits separate manager reload,145/146; loop/inline getter boundaries remain.
- src/scene/sdChannelSelect/iplSDChannelSelect handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv 99.15205%; 4 successful distinct source trials; beq-plus-branch dispatch and compaction count coloring,170/171.
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.81188%; 3 successful distinct source trials; threshold load hoisted before count store,101/101.
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.833336%; 3 successful distinct source trials; threshold load hoisted before count store,102/102.
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.29365%; 3 successful distinct source trials; threshold/count schedule plus loop coloring,126/126.
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.55125%; 3 successful distinct source trials; four repeated threshold/count schedules,361/361.
- src/scene/sdChannelSelect/iplSDChannelSelect flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv 99.65714%; 3 successful distinct source trials; save manager/heap argument load order,35/35.
- src/scene/sdChannelSelect/iplSDChannelSelect setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj 93.4721%; 3 successful distinct source trials; matrix/scissor floating operand scheduling and temporaries,233/233.
- libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos 96.57895%; 3 successful distinct source trials; floating calibration coefficient registers and multiply operands,19/19; named double calibration search best12 differences restored.
- libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight 99.23077%; 6 successful distinct source trials; base-array register r4 versusr3 plus zero/squared-height float registers,52/52; scalar const inputs unchanged, declaration search best3 restored.
- libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon 97.27723%; 4 successful distinct source trials; magnitude/interpolation and circle float-register lifetimes,101/101; scalar reuse did not change coloring.
- libs/RVL_SDK/src/kpad/KPAD read_kpad_acc 98.15%; 3 successful distinct source trials; clamp/smoothing inline boundaries and floating scheduling,400/400.
- libs/RVL_SDK/src/kpad/KPAD select_1obj_first 98.348625%; 3 successful distinct source trials; geometry floating lifetimes and paired stores,109/109.
- libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable 94.82%; 3 successful distinct source trials; smoothing/projected geometry floating scheduling,250/250.
- libs/RVL_SDK/src/kpad/KPAD KPADRead 97.52723%; 3 successful distinct source trials; sample loop/polling temporaries and branch scheduling,459/459.
- libs/RVL_SDK/src/kpad/KPAD KPADInit 96.51351%; 3 successful distinct source trials; controller/ring initialization and floating scheduling,185/185.
Final authority lines:
```
[src/scene/address/iplAddressEdit] instruction-exact functions: 90/94
[src/scene/sdChannelSelect/iplSDChannelSelect] instruction-exact functions: 121/129
[libs/RVL_SDK/src/kpad/KPAD] instruction-exact functions: 21/29
GATE PASS
```
# Round 6: HIGH, fresh structural investigation
Fresh baseline after building all owned objects; pools address57/57, SD101/101, KPAD0/0 identical. Data already100% in all three; no unmatched data-name gap to rename. Prior medium source trials were restored, so this round checks different local types, scopes, inline helper boundaries and operand lifetimes.
## src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv
Fetch origin/main 5518cb16fda3091c727d974aacf477a2cf89b74a. Initial assembly diagnosis: (19, 323) structural/positional differences; instructions 820/820
Remote source equals freshly built baseline; still open 97.44634%. Structural diagnosis: 820 instructions and identical frame; literal-base/boardFile saved-register inversion dominates. Inspect structural differences before hoisting declarations: constructor inline boundaries, vector initialization and switch dispatch.
- ordinary TextBalloon allocation with separately declared position: (49, 803) structural/positional; instructions 804/820; restored.
- retain event objects through EventHandler base views: (19, 323) structural/positional; instructions 820/820; restored.
- keep animation variable local to each mode arm: (19, 323) structural/positional; instructions 820/820; restored.
- ordinary balloon new with a constructor argument vector temporary: (37, 803) structural/positional; instructions 808/820; candidate kept.
- ordinary balloon new with named margin locals before allocation: (23, 331) structural/positional; instructions 818/820; restored.
- mutable text-buffer views through mode initialization: (19, 323) structural/positional; instructions 820/820; restored.
## src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv
Fetch origin/main 5518cb16fda3091c727d974aacf477a2cf89b74a. Initial assembly diagnosis: (10, 68) structural/positional differences; instructions 82/84
Remote source equals freshly built baseline; still open 88.03571%. Structural diagnosis: Frame0x440 versus target0x450 follows missing two held text addresses; locals are actual arrays. Inspect memcpy argument alias class and UTF16 helper lifetime before declaration coloring.
Frame diagnosis correction from disasm_fn: target frame is0x420, source also0x420;0x148/0x150 are code extents, not frame sizes. No extent overlap.
- explicit first-element addresses for both text buffers: (10, 68) structural/positional; instructions 82/84; restored.
- retain complete text array pointers before pane calls: (10, 68) structural/positional; instructions 82/84; restored.
- use mutable views of copied friend and string fields: (10, 39) structural/positional; instructions 83/84; restored.
## src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv
Fetch origin/main 5518cb16fda3091c727d974aacf477a2cf89b74a. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 38/38
Remote source equals freshly built baseline; still open 99.42105%. Structural diagnosis: Same frame and38 instructions; source/destination addi ordering at memcpy is the only difference. Check typed memcpy argument views before declaration search.
Corrected prior-round diagnosis: relocation-resolved disasm proves the differing argument pair is wcsncpy(name), not memcpy(CreateID). Prior memcpy-only trials did not touch this mismatch.
- name copy reads through a const String view: (2, 2) structural/positional; instructions 38/38; restored.
- evaluate named source text before destination text: (2, 2) structural/positional; instructions 38/38; restored.
- typed destination wchar array rather than source array decay: (2, 2) structural/positional; instructions 38/38; restored.
## src/scene/address/iplAddressEdit set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err
Fetch origin/main 5518cb16fda3091c727d974aacf477a2cf89b74a. Initial assembly diagnosis: (1, 30) structural/positional differences; instructions 76/75
Remote source equals freshly built baseline; still open 98.666664%. Structural diagnosis: 76/75 instructions, extra safe default message initialization. Retain defined behavior for unsupported NWC24 errors. Test exhaustive known-error branch layout without undefined/uninitialized state.
- normalize unrecognized errors to the existing server fallback before dispatch: (8, 37) structural/positional; instructions 83/75; restored.
- initialize the safe fallback in the explicit default branch: (4, 22) structural/positional; instructions 77/75; restored.
- compute the supported network fallback directly with a boolean choice: (18, 47) structural/positional; instructions 65/75; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv
Fetch origin/main 5518cb16fda3091c727d974aacf477a2cf89b74a. Initial assembly diagnosis: (4, 39) structural/positional differences; instructions 145/146
Remote source equals freshly built baseline; still open 97.73972%. Structural diagnosis: 145/146; identical0x20 frame, target keeps BS2 global reload at loop entry. Compare basic block placement rather than tick arithmetic; all heap construction instructions align.
- poll using equality-first completion and a continue arm: (9, 40) structural/positional; instructions 145/146; restored.
- inline polling-state helper returning manager readiness: (4, 39) structural/positional; instructions 145/146; restored.
- inline update helper separates manager argument from polling getter: (4, 39) structural/positional; instructions 145/146; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv
Fetch origin/main 5518cb16fda3091c727d974aacf477a2cf89b74a. Initial assembly diagnosis: (4, 143) structural/positional differences; instructions 170/171
Remote source equals freshly built baseline; still open 99.15205%. Structural diagnosis: 170/171, beq-plus-unconditional-branch result dispatch and error-compaction register order. Build branch arms from parsed brace boundaries, retaining common refresh in place.
Corrected prior-round diagnosis: relocation-resolved target confirms the extra beq8/unconditional-return branch is the OSGetTime delay gate, not async-result dispatch. Result tests already match.
- switch the elapsed-time boolean into the normal continuation: (0, 6) structural/positional; instructions 171/171; candidate kept.
- declare scanned title before compaction counters: (0, 6) structural/positional; instructions 171/171; candidate kept.
- compaction count uses the same unsigned type as title count: (1, 6) structural/positional; instructions 171/171; restored.
- signed SDK count keeps native comparison width: (0, 6) structural/positional; instructions 171/171; restored.
- write compacted title before advancing accepted count: (0, 6) structural/positional; instructions 171/171; restored.
- separate destination-index advancement from the title store: (0, 6) structural/positional; instructions 171/171; restored.
- Register-only declaration search on compaction title/count/index block: declaration block: | u32 titleId; | int channelCount = 0; | int channelIndex = 0; | u32 titleIndex = 0; | start (0, 6) | improved (0, 4) | best (0, 4) after 16 builds; kept in source: | u32 titleId; | u32 titleIndex = 0; | int channelIndex = 0; | int channelCount = 0; |
- separate compaction declarations from zero assignments in target order: (0, 0) structural/positional; instructions 171/171; candidate kept.
Exact handleSDTitleListResult: corrected the time-gate dispatch, then separated compaction declarations from assignments. Register search found the type/index/count order; preserving count/index/title zero assignments removed all6 differences. ctxdiff171/171 diffs0; exact-name objdiff100; all-unit quick gatePASS, data100%, pools identical,0 regressions/forbidden/readability. SD121 ->122; code28728 ->29412.
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
Fetch origin/main 5518cb16fda3091c727d974aacf477a2cf89b74a. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 101/101
After local exact commit160e985a, remote duplicate checks compare origin/main source against original round baseline0c06b01c, not modified HEAD. origin/main5518cb16 has no owned-unit diff.
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
Fetch origin/main 5518cb16fda3091c727d974aacf477a2cf89b74a. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 101/101
Remote source equals freshly built baseline; still open 97.81188%. Structural diagnosis: 101/101 and same frame; compare count-store versus requirement load ordering, then native signed arithmetic and legal signed counterpart views.
- native signed intermediate for bounded accepted-title count: (2, 4) structural/positional; instructions 101/101; restored.
- count uses a legal signed counterpart view for alias analysis: (2, 4) structural/positional; instructions 101/101; restored.
- inline usage predicate with scalar input values: (24, 40) structural/positional; instructions 104/101; restored.
- inline accepted-count update isolates the store boundary: (2, 4) structural/positional; instructions 101/101; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
Fetch origin/main 5518cb16fda3091c727d974aacf477a2cf89b74a. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 102/102
Remote source equals freshly built baseline; still open 97.833336%. Structural diagnosis: 102/102. Same post-memcpy count/threshold scheduling as forward scan, confirmed by instruction diff; compare native intermediate type, inline store helper and a fixed-size requirement view.
- native signed next-count local in reverse scan: (2, 4) structural/positional; instructions 102/102; restored.
- inline count update using an output reference: (2, 4) structural/positional; instructions 102/102; restored.
- two-element readonly usage view in reverse scan: (2, 4) structural/positional; instructions 102/102; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
Fetch origin/main bc303bc36e5ea826ef9da39d6e9c9ed9c79e4ba9. Initial assembly diagnosis: (2, 22) structural/positional differences; instructions 126/126
Remote source equals freshly built baseline; still open 97.29365%. Structural diagnosis: 126/126; u64 titleId allocated after page/order counters causes saved-register inversion; count/store scheduling also differs. Hoist the real title ID separately before trying declaration coloring.
- declare loaded title ID before traversal counters: (2, 7) structural/positional; instructions 126/126; restored.
- explicit page-row view when looking up the channel entry: (2, 22) structural/positional; instructions 126/126; restored.
- native signed next-count local in page-ordered scan: (2, 22) structural/positional; instructions 126/126; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
Fetch origin/main bc303bc36e5ea826ef9da39d6e9c9ed9c79e4ba9. Initial assembly diagnosis: (8, 16) structural/positional differences; instructions 361/361
Remote source equals freshly built baseline; still open 97.55125%. Structural diagnosis: 361/361, four repeated count/store/threshold windows; no string or data difference. Test real intermediate width and mutable/aggregate read views, then reject any non-exact result.
- native next-count locals for all special-channel append sites: (8, 16) structural/positional; instructions 361/361; restored.
- fixed-size readonly second-usage view for special title scans: (8, 16) structural/positional; instructions 361/361; restored.
- inline output-reference increments at special-channel boundaries: (8, 16) structural/positional; instructions 361/361; restored.
Expanded volatility proof audit includes adjacent stfs/lfs and stfd/lfd, as well as stw/lwz; same-address store/reload pairs []. No unjustified volatile added.
## src/scene/sdChannelSelect/iplSDChannelSelect flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv
Fetch origin/main 9077ef8c7a1ab5bf7605f439ed621214b97999e3. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 35/35
Remote source equals freshly built baseline; still open 99.65714%. Structural diagnosis: 35/35. Target obtains Mem2App before SaveData receiver; compare readonly receiver helper and combined heap-before-flag lifetimes, no pointer-global mutation or volatility.
- readonly save-manager input at inline flush boundary: (2, 2) structural/positional; instructions 35/35; restored.
- heap declaration precedes the flag update with assignment at flush: (2, 2) structural/positional; instructions 35/35; restored.
- application heap retained across the animation initialization: (15, 29) structural/positional; instructions 36/35; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj
Fetch origin/main 2050ad7616acfcb7752e5a6da8b7f44f22c6cafd. Initial assembly diagnosis: (23, 68) structural/positional differences; instructions 233/233
Remote source equals freshly built baseline; still open 93.4721%. Structural diagnosis: 233/233; matrix-call inputs are register differences, but framebuffer width/height conversion order and widthScale lifetime change scheduling. Target keeps projection width in f29, ours keeps its quotient there; remove quotient local first.
- use the projection quotient directly in horizontal scissor arithmetic: (36, 71) structural/positional; instructions 233/233; restored.
- compute framebuffer horizontal conversion before vertical arithmetic: (29, 64) structural/positional; instructions 233/233; restored.
- keep framebuffer dimensions in unsigned arithmetic-width locals: (23, 68) structural/positional; instructions 233/233; restored.
## libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos
Fetch origin/main 2050ad7616acfcb7752e5a6da8b7f44f22c6cafd. Initial assembly diagnosis: (0, 9) structural/positional differences; instructions 19/19
Remote source equals freshly built baseline; still open 96.57895%. Structural diagnosis: Leaf19/19, no frame/branches. Target coalesces double correction in f0 and uses coefficient-first aspect multiplication. Combine those operand choices before declaration coloring.
- coefficient-first aspect and inline double correction product: (0, 10) structural/positional; instructions 19/19; restored.
- reuse each calibration coefficient in its own product local: build failed e/private/bte -DNDEBUG=1 -DTARGET_RVL -ipa file -fp_contract off -lang=c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 360: f32 x = src->x * halfHeight; # Error: ^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- separate declarations then reuse calibrated scalar products: (0, 14) structural/positional; instructions 19/19; candidate kept.
- give the shared aspect coefficient its own scalar lifetime: (0, 13) structural/positional; instructions 19/19; candidate kept.
- Register-only last, reused-coefficient declaration search: declaration block: | f64 scaled; | f32 height; | f32 halfHeight; | f32 x; | f32 y; | f32 aspect; | start (0, 13) | improved (0, 11) | best (0, 11) after 40 builds; kept in source: | f32 aspect; | f32 height; | f32 halfHeight; | f32 x; | f32 y; | f64 scaled; |
## libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight
Fetch origin/main 2050ad7616acfcb7752e5a6da8b7f44f22c6cafd. Initial assembly diagnosis: (0, 7) structural/positional differences; instructions 52/52
Remote source equals freshly built baseline; still open 99.23077%. Structural diagnosis: 52/52,0 normalized differences. Base literal r4/r3 and zero/squared-height register coloring remain. Separate base and channel adjustment and compare min branch before declaration search.
- initialize base state then apply the channel index: (4, 9) structural/positional; instructions 52/52; restored.
- state address initialized in the leading declaration block: (0, 7) structural/positional; instructions 52/52; restored.
- select the limiting extent with an explicit comparison arm: (2, 9) structural/positional; instructions 52/52; restored.
- native int channel formal with a translation-unit-only declaration guard: (0, 7) structural/positional; instructions 52/52; restored.
## libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon
Fetch origin/main 2050ad7616acfcb7752e5a6da8b7f44f22c6cafd. Initial assembly diagnosis: (2, 35) structural/positional differences; instructions 101/101
Remote source equals freshly built baseline; still open 97.27723%. Structural diagnosis: 101/101; raw .long floating compares inflate normalized score, but geometry math and branch targets align. Replace pairs of flattened scalar locals by meaningful Vec2 intermediates, preserving operation order.
- group normalized acceleration components in a Vec2 local: (28, 91) structural/positional; instructions 105/101; restored.
- group the smoothed horizon candidate in a Vec2 local: (23, 77) structural/positional; instructions 97/101; restored.
- group normalized output axis components in a Vec2 local: (23, 78) structural/positional; instructions 103/101; restored.
## libs/RVL_SDK/src/kpad/KPAD read_kpad_acc
Fetch origin/main 2050ad7616acfcb7752e5a6da8b7f44f22c6cafd. Initial assembly diagnosis: (16, 66) structural/positional differences; instructions 400/400
Remote source equals freshly built baseline; still open 98.15%. Structural diagnosis: 400/400; clamp/smoothing inline helper boundaries determine FP temporaries. Test parameter order and a scalar-only smoothing helper, rather than merely reordering caller vector declarations.
Structural correction before helpers: ctxdiff also shows two opposite error/device/format branch forms at206..212; isolate these before FP temporary experiments.
- separate error/device guards and switch the two extension formats: (15, 63) structural/positional; instructions 400/400; candidate kept.
- keep each accepted format as a distinct switch break arm: (15, 63) structural/positional; instructions 400/400; candidate kept.
- switch the accepted-format boolean with default return first: (22, 230) structural/positional; instructions 404/400; candidate kept.
- single-format switch only when the primary format is absent: (12, 60) structural/positional; instructions 400/400; candidate kept.
- reuse the smoothing magnitude local through its absolute-value branch: (63, 302) structural/positional; instructions 394/400; restored.
- declare smoothing magnitude before signed delta then assign in original order: (7, 25) structural/positional; instructions 400/400; kept.
- assign smoothing magnitude directly in both sign branches: (1, 1) structural/positional; instructions 400/400; kept.
- preserve unsigned comparison in the fallback format switch: (1, 1) structural/positional; instructions 400/400; restored.
- boolean fallback-format dispatch keeps the comparison unsigned: (12, 197) structural/positional; instructions 403/400; restored.
- two explicit accepted-format branches share the extension block: (10, 194) structural/positional; instructions 399/400; restored.
- unsigned SDK-format case constant in the fallback switch: (1, 1) structural/positional; instructions 400/400; restored.
- byte-relative fallback-format switch: (10, 198) structural/positional; instructions 401/400; restored.
- accept either extension format through a single-pass block: (10, 194) structural/positional; instructions 399/400; restored.
- place extension acceleration in the positive accepted-format branch: (12, 197) structural/positional; instructions 399/400; restored.
- explicit unsupported-format else returns from extension branch: (12, 197) structural/positional; instructions 399/400; restored.
- native unsigned switch discriminant for the byte format: (1, 1) structural/positional; instructions 400/400; restored.
read_kpad_acc best partial400/400 differs only instruction210: cmpwi r0,5 versus target cmplwi r0,5. All60 original FP differences removed by declaring magnitude before delta and explicit sign branches; separate error/device guards plus nested format switch fixed branch form. Unsigned casts, case constant, positive-if/else and single-pass accepted-format alternatives did not remove the final comparator difference. Exact-only policy: restored partial source; reproducible candidate saved /tmp/fz16r6.readacc.near.c, not committed.
## libs/RVL_SDK/src/kpad/KPAD select_1obj_first
Fetch origin/main c1183780c2b53e044f91775b29b580d306e4423e. Initial assembly diagnosis: (2, 26) structural/positional differences; instructions 109/109
Remote source equals freshly built baseline; still open 98.348625%. Structural diagnosis: 109/109, source/target branch and frame align; register/operand differences reside in geometry scalar setup and paired candidate coordinates. Compare a reused tangent basis and scalar candidate variables before declaration search.
- separate all seven geometry and traversal declarations from assignments: (2, 26) structural/positional; instructions 109/109; candidate kept.
- declare candidate vectors before loading their scalar center coordinates: (2, 26) structural/positional; instructions 109/109; candidate kept.
- treat the candidate-array boundary as a readonly object pointer: (2, 26) structural/positional; instructions 109/109; restored.
- Register-only last, separated traversal/candidate block search: declaration block: | KPADDPDObject* object; | KPADDPDObject* end; | f32 scale; | f32 productX; | f32 productY; | f32 offsetX; | f32 offsetY; | start (2, 26) | best (2, 26) after 52 builds; source restored; best order was: | KPADDPDObject* object; | KPADDPDObject* end; | f32 scale; | f32 productX; | f32 productY; | f32 offsetX; | f32 offsetY; |
- Register-only last, separated traversal/candidate block search: declaration block: | Vec2 leftPosition; | Vec2 rightPosition; | f32 x; | f32 y; | start (2, 26) | improved (2, 24) | best (2, 24) after 16 builds; kept in source: | Vec2 leftPosition; | f32 y; | f32 x; | Vec2 rightPosition; |
Verified frame/extent audit (authoritative corrections to any earlier guessed frame):
create__Q33ipl5scene11AddressEditFv: extent 0x414..0x10e4 <= next 0x10e4; source/target first instruction (('stwu', 'r1, -0x60(r1)'), ('stwu', 'r1, -0x60(r1)'))
get_friendinfo__Q33ipl5scene11AddressEditFv: extent 0x5604..0x5754 <= next 0x5754; source/target first instruction (('stwu', 'r1, -0x420(r1)'), ('stwu', 'r1, -0x420(r1)'))
update_friendinfo__Q33ipl5scene11AddressEditFv: extent 0x5798..0x5830 <= next 0x5830; source/target first instruction (('stwu', 'r1, -0x10(r1)'), ('stwu', 'r1, -0x10(r1)'))
set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err: extent 0x6690..0x67bc <= next 0x67bc; source/target first instruction (('stwu', 'r1, -0x60(r1)'), ('stwu', 'r1, -0x60(r1)'))
create__Q33ipl5scene15SDChannelSelectFv: extent 0x478..0x6c0 <= next 0x6c0; source/target first instruction (('stwu', 'r1, -0x20(r1)'), ('stwu', 'r1, -0x20(r1)'))
handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv: extent 0x14d8..0x1784 <= next 0x1784; source/target first instruction (('stwu', 'r1, -0x30(r1)'), ('stwu', 'r1, -0x30(r1)'))
collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl: extent 0x25a4..0x2738 <= next 0x2738; source/target first instruction (('stwu', 'r1, -0x40(r1)'), ('stwu', 'r1, -0x40(r1)'))
collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl: extent 0x2738..0x28d0 <= next 0x28d0; source/target first instruction (('stwu', 'r1, -0x40(r1)'), ('stwu', 'r1, -0x40(r1)'))
collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl: extent 0x28d0..0x2ac8 <= next 0x2ac8; source/target first instruction (('stwu', 'r1, -0x60(r1)'), ('stwu', 'r1, -0x60(r1)'))
collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl: extent 0x2ac8..0x306c <= next 0x306c; source/target first instruction (('stwu', 'r1, -0x80(r1)'), ('stwu', 'r1, -0x80(r1)'))
flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv: extent 0x31d0..0x325c <= next 0x325c; source/target first instruction (('stwu', 'r1, -0x10(r1)'), ('stwu', 'r1, -0x10(r1)'))
setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj: extent 0x5d40..0x60e4 <= next 0x60e4; source/target first instruction (('stwu', 'r1, -0xe0(r1)'), ('stwu', 'r1, -0xe0(r1)'))
KPADGetProjectionPos: extent 0x430..0x47c <= next 0x47c; source/target first instruction (('lfs', 'f3, 0xc(r5)'), ('lfs', 'f3, 0xc(r5)'))
KPADSetSensorHeight: extent 0x47c..0x54c <= next 0x54c; source/target first instruction (('stwu', 'r1, -0x30(r1)'), ('stwu', 'r1, -0x30(r1)'))
calc_acc_horizon: extent 0x6e0..0x874 <= next 0x874; source/target first instruction (('stwu', 'r1, -0x30(r1)'), ('stwu', 'r1, -0x30(r1)'))
read_kpad_acc: extent 0x998..0xfd8 <= next 0xfd8; source/target first instruction (('stwu', 'r1, -0x50(r1)'), ('stwu', 'r1, -0x50(r1)'))
select_1obj_first: extent 0x13e8..0x159c <= next 0x159c; source/target first instruction (('stwu', 'r1, -0x20(r1)'), ('stwu', 'r1, -0x20(r1)'))
calc_dpd_variable: extent 0x1710..0x1af8 <= next 0x1af8; source/target first instruction (('stwu', 'r1, -0x20(r1)'), ('stwu', 'r1, -0x20(r1)'))
KPADRead: extent 0x2514..0x2c40 <= next 0x2c40; source/target first instruction (('stwu', 'r1, -0xc0(r1)'), ('stwu', 'r1, -0xc0(r1)'))
KPADInit: extent 0x2c40..0x2f24 <= next 0x2f24; source/target first instruction (('stwu', 'r1, -0x90(r1)'), ('stwu', 'r1, -0x90(r1)'))
## libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable
Fetch origin/main c1183780c2b53e044f91775b29b580d306e4423e. Initial assembly diagnosis: (14, 45) structural/positional differences; instructions 250/250
Remote source equals freshly built baseline; still open 94.82%. Structural diagnosis: 250/250; target rotation multiplies direction components first, while ours uses tangent first; a distance-filter ternary also introduces a transient f1. Apply the explicit sign-branch lever established on read_kpad_acc before register search.
- direction-first horizontal rotation products in positional projection: (12, 40) structural/positional; instructions 250/250; candidate kept.
- distance-filter sign branches assign its magnitude local directly: (12, 40) structural/positional; instructions 250/250; candidate kept.
- separate positional rotation/average declarations from assignments: (17, 41) structural/positional; instructions 250/250; candidate kept.
- Register search after operand/sign-branch trials, block f32 magnitude;: declaration block: | f32 magnitude; | f32 dx; | f32 next; | start (17, 41) | best (17, 41) after 6 builds; source restored; best order was: | f32 magnitude; | f32 dx; | f32 next; |
- Register search after operand/sign-branch trials, block f32 rotatedY;: declaration block: | f32 rotatedY; | f32 rotatedX; | f32 scaleX; | f32 scaleY; | start (17, 41) | improved (12, 40) | best (12, 40) after 13 builds; kept in source: | f32 rotatedX; | f32 rotatedY; | f32 scaleX; | f32 scaleY; |
Extended PPC diagnostic decodes unsupported floating compares and paired-single save/load instructions in /tmp only; no source/target bytes or repository tools changed. It separates register differences from real load/branch scheduling:
KPADGetProjectionPos decoded structure/register score (0, 9)
KPADSetSensorHeight decoded structure/register score (0, 7)
calc_acc_horizon decoded structure/register score (0, 35)
read_kpad_acc decoded structure/register score (5, 66)
select_1obj_first decoded structure/register score (0, 26)
calc_dpd_variable decoded structure/register score (13, 45)
KPADRead decoded structure/register score (11, 89)
KPADInit decoded structure/register score (6, 81)
## libs/RVL_SDK/src/kpad/KPAD KPADRead
Fetch origin/main ff90063ef9623d776c62711aeb89c7a225f7a3b5. Initial assembly diagnosis: (11, 89) structural/positional differences; instructions 459/459
Remote source equals freshly built baseline; still open 97.52723%. Structural diagnosis: 459/459,0xc0 frame. Target copyOutput computes available*0x84 then subtracts0x84; ours computes (available-1)*0x84. Correct pointer-expression grouping and computation placement before register search.
- form the output endpoint before subtracting one status: (46, 284) structural/positional; instructions 459/459; candidate kept.
- initialize the output endpoint then decrement as a separate pointer operation: (46, 284) structural/positional; instructions 459/459; candidate kept.
- copy older samples using a one-past cursor and the previous status slot: (75, 284) structural/positional; instructions 459/459; candidate kept.
- prepare count and output endpoint before calculating the ring start: (40, 282) structural/positional; instructions 459/459; candidate kept.
- signed available count matches the public signed return value: (11, 89) structural/positional; instructions 459/459; candidate kept.
- signed count endpoint followed by status-pointer subtraction: (46, 284) structural/positional; instructions 459/459; restored.
KPADRead structural trials: pointer-first endpoint forms computed available*0x84 as desired but increased source frame0xc0 ->0xd0 and shifted callee-save coloring; hoisting endpoint/count and using signed available did not cure it. Original0xc0 frame/459 instructions restored; register-only search deferred because cursor scheduling remains structural.
## libs/RVL_SDK/src/kpad/KPAD KPADInit
Fetch origin/main 0d9b03878228a086954abc59b964164b0f7db5f2. Initial assembly diagnosis: (9, 81) structural/positional differences; instructions 185/185
Remote source equals freshly built baseline; still open 96.51351%. Structural diagnosis: 185/185,0x90 frame; target constructs the40000 repeat delay earlier than ours, plus saved FP coloring. Name the real default delay, then compare matrix base and squared-diagonal temporaries before declaration search.
- name and initialize the default repeat delay before controller setup: (9, 81) structural/positional; instructions 185/185; candidate kept.
- initialize the first matrix element through the shared matrix pointer: (31, 110) structural/positional; instructions 185/185; restored.
- name the sensor-diagonal square before the square-root boundary: (9, 81) structural/positional; instructions 185/185; candidate kept.
- Register-only last on sixteen real scalar/pointer declarations with decoded PPC comparisons: declaration block: | KPADInside* kpad; | f32 distanceValue; | f32 sensorDistance; | f32 diagonalSquared; | f32 rotationElement; | f32 referenceWidth; | f32 referenceHeight; | f32 objectInterval; | f32 zero; | f32 degreesToRadians; | f32 one; | f32* matrix; | u32 i; | s32 chan; | BOOL enabled; | u16 repeatDelay; | start (6, 81) | improved (6, 70) | improved (6, 66) | improved (6, 62) | improved (6, 54) | improved (6, 51) | best (6, 51) after 388 builds; kept in source: | f32 referenceHeight; | f32 objectInterval; | f32 sensorDistance; | f32 diagonalSquared; | f32 rotationElement; | f32 referenceWidth; | KPADInside* kpad; | f32 distanceValue; | f32 zero; | f32 degreesToRadians; | f32 one; | u32 i; | f32* matrix; | s32 chan; | BOOL enabled; | u16 repeatDelay; |
- share the named unit value with sensitivity initialization: (8, 51) structural/positional; instructions 185/185; candidate kept.
KPADInit declaration search improved81 ->51 differences after388 builds, but early repeat-constant/global-base scheduling remained6 decoded structural differences. Sharing a named unit scalar with sensitivity initialization did not improve it. Partial source restored; source/target retain0x90 frame and185 instructions.
Pre-full-gate completeness audit: freshly regenerated report lists19 remaining non-matching functions; every one has >=3 successfully built distinct source trials in this HIGH round; failed build excluded.86 successful function trials and531 declaration-search builds logged; all non-exact candidates restored.
## Round6 final full clean gate and remaining-function audit
Full non-quick gate over all3 units PASS; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d; all pools identical;0 regressions,0 forbidden additions,0 readability warnings. Owned data100%, no symbol name/extent edits. Remaining function ELF extents end before/equal next symbol. Stack adjacent store/reload proof pairs []; no definition-level volatile justified.
src/scene/address/iplAddressEdit: fresh exact 90 ->90/94; code 23044 ->23044/27112; data 2560 ->2560/2560.
src/scene/sdChannelSelect/iplSDChannelSelect: fresh exact 121 ->122/129; code 28728 ->29412/33828; data 2960 ->2960/2960.
libs/RVL_SDK/src/kpad/KPAD: fresh exact 21 ->21/29; code 6756 ->6756/13056; data 8032 ->8032/8032.
One exact SD title-result match committed160e985a this round. All unaccepted source/header experiments restored; the exact SD time-gate/compaction change and attempts log retained. None of the remaining functions is claimed complete. Every remaining function has at least3 successfully built distinct source trials this HIGH round, failed builds excluded. Uncertainty remains on unsupported NWC24 error defaults and compiler register/load scheduling; safe message initialization retained. All per-function fetches used the shared git lock; remote owned source equals fresh baseline0c06b01c throughout. Extents/data names untouched; no duplicate owned remote match.
- src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv 97.44634%; 6 successful distinct source trials; balloon construction null-guard/temporary boundary and retained name-pointer lifetimes; same820 instructions.
- src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv 88.03571%; 3 successful distinct source trials; text-array addresses folded until after pane lookup; target retains pointers across lookup,82/84.
- src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv 99.42105%; 3 successful distinct source trials; wcsncpy name-source versus destination address evaluation order,38/38; prior memcpy diagnosis corrected by resolved relocation.
- src/scene/address/iplAddressEdit set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err 98.666664%; 3 successful distinct source trials; extra safe default initialization; target appears to leave messageId undefined for unhandled error,76/75.
- src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv 97.73972%; 3 successful distinct source trials; BS2 polling body omits separate manager reload,145/146; loop/inline getter boundaries remain.
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.81188%; 4 successful distinct source trials; threshold load hoisted before count store,101/101.
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.833336%; 3 successful distinct source trials; threshold load hoisted before count store,102/102.
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.29365%; 3 successful distinct source trials; threshold/count schedule plus loop coloring,126/126.
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.55125%; 3 successful distinct source trials; four repeated threshold/count schedules,361/361.
- src/scene/sdChannelSelect/iplSDChannelSelect flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv 99.65714%; 3 successful distinct source trials; save manager/heap argument load order,35/35.
- src/scene/sdChannelSelect/iplSDChannelSelect setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj 93.4721%; 3 successful distinct source trials; matrix/scissor floating operand scheduling and temporaries,233/233.
- libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos 96.57895%; 3 successful distinct source trials; floating coefficient registers and multiply operands,19/19; reused-coefficient declaration search best11 differences versus original9; all partial variants restored.
- libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight 99.23077%; 4 successful distinct source trials; base-array register r4 versusr3 plus zero/squared-height float registers,52/52; native int index views unchanged.
- libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon 97.27723%; 3 successful distinct source trials; magnitude/interpolation and circle float-register lifetimes,101/101; Vec2 grouping produced97/103/105 instructions versus target101 and was restored; original35 FP differences remain.
- libs/RVL_SDK/src/kpad/KPAD read_kpad_acc 98.15%; 16 successful distinct source trials; original branch/FP-helper differences remain; best structural/helper reconstruction400/400 had only cmpwi versus cmplwi at fallback-format comparison, restored pending exactness.
- libs/RVL_SDK/src/kpad/KPAD select_1obj_first 98.348625%; 3 successful distinct source trials; geometry floating lifetimes and paired stores,109/109; separated declaration search best24 versus original26 differences, restored.
- libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable 94.82%; 3 successful distinct source trials; smoothing/projected geometry floating scheduling,250/250; direction-first operand variation best40 versus original45 differences, restored.
- libs/RVL_SDK/src/kpad/KPAD KPADRead 97.52723%; 6 successful distinct source trials; sample loop/polling temporaries and branch scheduling,459/459.
- libs/RVL_SDK/src/kpad/KPAD KPADInit 96.51351%; 4 successful distinct source trials; controller/ring initialization and floating scheduling,185/185; sixteen-local search best51 versus original81 differences after388 builds, restored.
Final authority lines:
```
[src/scene/address/iplAddressEdit] instruction-exact functions: 90/94
[src/scene/sdChannelSelect/iplSDChannelSelect] instruction-exact functions: 122/129
[libs/RVL_SDK/src/kpad/KPAD] instruction-exact functions: 21/29
GATE PASS
```

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -1,99 +0,0 @@
# linkgap-audio: eggAudioExpMgr — Equivalent-but-unlinkable analysis
Branch: agent/w1005/linkgap-audio. Unit stays **Equivalent**.
## Status
Per-symbol match is complete: all 8 .text fns + the 0x78 vtable match orig
(fuzzy 100.0 code+data, every fn individually 100). The .o emit set now
matches orig's exactly (see gates below).
**Remaining linker-visible diff: secondary-vt thunk emit order.**
- orig `.text` tail: `[@52@__dt__SimpleAudioMgrWithFx @+1fc][@52@calc__SimpleAudioMgr @+204]`
- mine: `[@52@calc @+1fc][@52@__dt__ @+204]` (swapped)
Both thunks are byte-identical bodies, so objdiff fn-level fuzzy is 100 for
each — but the .o's symbol order carries into the linked DOL, so flipping
Matching fails the DOL hash. This is the *only* blocker.
## Emit-set gates (kept)
`EGG_AUDIO_EXPMGR_NO_INLINE_VIRTUALS` is defined at the top of
eggAudioExpMgr.cpp and gates these headers (TU-local: other TUs are
unaffected since the macro is only defined in this .cpp):
- `libs/EGG/include/egg/core/eggAudioArcPlayerMgr.h` — 9 ArcPlayer virtuals
(openArchive/openDvd/openNand/setupMemory/close/loadGroup/startSound/
prepareSound/holdSound families) -> non-inline decls for this TU.
- `libs/EGG/include/egg/core/eggAudioHeapMgr.h` — SoundHeapMgr
`loadState`/`getCurrentLevel` -> decls.
- `libs/NW4R/include/nw4r/ut/Lock.h` — `detail::AutoLock<OSMutex>` ct/dt ->
decls.
Without the gates MWCC weak-emits 10 extra inline fns (ArcPlayer
hold/prepare/startSound x9 + NonCopyable/AutoLock/SoundHeap helpers) that
orig's .o does not contain. With gates the emit set is byte-for-byte orig:
same 8 .text syms at the same offsets/sizes + `__vt__` at .data+0x0/0x78.
Residual cosmetic diff (does not affect the link): orig's
`__ct__AudioFxMgrArg` and `SaveState` are STB_GLOBAL; mine STB_WEAK.
Both dedup/resolve identically at link.
## Thunk-order mechanism (decoded)
Surveyed every orig .o with >=2 `@N@` adjustor thunks; my compiler
reproduces orig's order in ALL of them (iplSound, iplGCWindow,
iplMemoryCard, MyTiBg, tiCellPhone, iplBoard, ...) EXCEPT this unit.
Best-fit model for orig's ordering: thunks emit in the order the
*overriding virtuals are declared in the most-derived class*, with
thunks for inherited overrides emitted after the class's own declared
virtuals:
- SimpleAudioMgrWithFx declares `[~dtor, initialize]` -> own dtor thunk
first, then the inherited `SimpleAudioMgr::calc` thunk -> [dt][calc] = orig
- ipl::snd::System declares `calc` before `~System` -> [calc][dt] = orig
- iplMemoryCard `[onTrig,onLeft,onPoint,~dt]` -> that order = orig
(NOT .text def order, which is [onPoint,onLeft,onTrig])
- tiCellPhone `[~dt,updateInput,calc,draw,init]` = orig
My build instead emits thunks in *reverse secondary-vt slot order*
(the .rela.data stream is written backward — observable on every unit;
extraction .os sort relocs so orig's real write order is unknowable).
The two orders coincide for every surveyed unit except this one — it is
the only unit where a derived-declared dtor and an ancestor-declared
override (`SimpleAudioMgr::calc`, declared in the base) disagree.
## What flips it (and why it was vetoed)
Adding ANY second polymorphic class whose vt is built in this TU and
*shares* the secondary base flips the pair to orig's [dt][calc]:
verified with `class Sample : public SimpleAudioMgrWithFx` (emit
`[dt_WithFx][calc][dt_Sample]` — the parent's set comes out in forward
slot order once WithFx's vt is built as a parent). An unrelated
polymorphic class (no shared base) does NOT flip it; a declared-but-
never-defined derived class does NOT flip it (vt never built).
Mechanistically: orig's TU very likely caused WithFx's vt to be built
*as a parent* (a second derived class whose vt anchored elsewhere —
e.g. EGG's real `ipl::snd::System`-style class compiled in another TU
is the only known retail derivee), which emits the parent's thunks in
forward slot order. Any such class is invented here -> owner veto
(not in retail symbols). Orig's .o emits exactly one vtable, so no
second polymorphic class was ODR-emitted in the real TU either — the
trigger lived in code we cannot see (or is a compiler-version artifact).
## Tried and rejected (all still [calc][dt])
- dtor declared after `initialize` in the class decl
- dtor DEFINITION moved before/after ctor in the .cpp
- unrelated polymorphic class (no shared secondary base)
- derived class declared but never defined (no vt build)
## What would close it
A legitimate source construct that causes a second vt-build sharing
the ArcPlayer secondary vtable in this TU, or a linker-level symbol
ordering mechanism (none exists: symbols.txt is label-only, linker lays
out .text in .o symbol order). Until then: Equivalent.

View File

@@ -644,105 +644,3 @@ forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
## IFD1 switch lowering — decoded model (verified)
Orig tree: root cmpwi 0x132; left {11a};{111};{103};{128};{11c-edge};{12d}; right cmpw 0x8769;{202};{201};{213};{9101};{9000};{a004-edge}.
- Node count = case labels; adjacent shared-fall-through labels merge into ONE counted node
but emit as a range-check (upper-edge `cmpwi <last+1>; bgelr`).
- `case X: ;` (empty body, == else arm) counts as a node but emits NOTHING (folded into
parent's range branch) — orig's {111} emits `beqlr;bgelr` covering the folded {112}.
- {a000,a001,a002,a003} shared empty labels = one range-node -> emits `cmpw 0xa004; bgelr`
(orig's edge form). GNU `case a...b:` ranges compile but count differently — don't use.
- Split pivot = index floor(n/2) over sorted node list (n includes merged ranges as 1).
- Orig set: 14 real labels {103,111,11a,11b,128,12d,132,201,202,213,8769,9000,9101,a003}
+ folded {112} + range {a000..a003} -> 12 nodes + else -> root {132}.
- Residual (~6 insns): dead-blr cluster count, {103} leaf `bltlr` vs `blr`,
body regalloc (r6 vs r8 homes in readU32-assemble bounds-checks).
## Session findings (if-else/switch emission, unroll)
- MWCC if-else vs switch on if-tag dispatch: `if (tag == X) return;` emits
`cmpwi; beqlr` (folded conditional return, no body). `case X: return;` in a
switch emits the same leaf PLUS a dead `blr` body per case (+1 insn each).
- MWCC switch case-source-order controls body emission ORDER (not tree shape):
orig's IFD1 bodies appear as {11a,11b,128,103,201,202} — reordering cases to
that sequence matched orig's body layout (fuzzy 87.5 -> 95.9).
- `case X: ;` empty arms fall into the next arm / switch-exit; adjacent empty
labels merge into ONE range-node ({a000-a003} -> `cmpw 0xa004; bgelr`).
Converting all return-arms to `;` over-merged the left tree (lost 3 folds).
- `case X: break;` emits `beq -> epilogue`, not the beqlr fold — kills the leaf.
- Large constants (>0x7fff): orig materializes `lis r6,1` + `addi r0,r6,-N`
and merges `==`/`>=` compares into `cmpw; beqlr; bge`. MWCC prefers `cmplwi`
for `==` regardless of u16/s16 decl or (u16) casts — prevents the merge.
- MWCC loop unroll: single `for (; iter > 0; iter--)` under an `if (iter > 0)`
guard produces orig's native x2 unroll (`rlwinm.` halve + `mtctr` pairs +
`andi.`/`mtctr`/`bdnz` remainder) — replaces hand-written pairs+do-while.
`if (r > 0)` (pre-shift var) gives `cmpwi r5` + `srwi` (orig's form) but the
inner for-guard re-tests -> double branch. `for(inner=r;inner>0;inner-=8)`
gives one `cmpwi r` guard but folds `done=iter<<3` to `rlwinm` on pre-shift.
## Phase 4 findings (Y8U8V8 chroma dual-path)
- MWCC unroll emits `if (span > 8) { ×8 mtctr body + scalar tail } else { scalar }` for
`for (x = lo; x < hi; x++)` where span = hi-lo. Both paths RE-derive the row setup
(`(y>>2)*stride`, `out + ((y&3)<<3)`) inside each branch — MWCC remats per-path
instead of keeping the values live across the guard.
- LEVER: writing row-setup as INLINE expressions in the store
(`out0[((y & 3) << 3) + off + xo]`, `off = ((x>>3) + (y>>2)*stride) << 5`) stops
MWCC from hoisting them into named temps — reproduces orig's per-path recompute.
Applied to luma + chroma loops: unit gap 126 -> 70.
- EXCEPTION: 420's `x_pos += 2` luma loop wants NAMED locals (hoisted) — inline
collapsed it 467->335; kept named-locals there. MWCC's remat choice is per-fn.
- The `lis -0x8000; addi -2; cmpw; bgt; li flag,1; cmpwi; beq` chains are MWCC's
signed-wrap safety proofs for `end-8` bounds in the unrolled fast path — generated
internally, NOT source-visible logic. Count varies with MWCC's analysis depth.
- Explicit `if (span>8){...}else{...}` in source BALLOONS (MWCC adds its own guard
on top of the manual split) — the dual-path must come from MWCC's unroller.
- `x_pos != x_end` bound (not `<`) is what produces orig's count on 444/444e —
`<` collapses unrolling entirely (99->260). Orig emits `bge` though; counts equal.
- set_converter: orig keeps ONE callee reg (ob) for the whole fn; deferring `st`
load / dropping `cc` made no difference — residual +5 is frame-size regalloc.
## exif_parse switch-emission decodes (wave-2 session)
MWCC switch-tree emission model, verified end-to-end on TMCJPEGDEC_IFD0/IFD1_tag_parse:
- Balanced BST over sorted case values; pivot = element[floor(n/2)] per subtree.
- `break`-bodies at subtree edges FOLD into the parent compare's bound (bgelr/bltlr);
a `break` NOT adjacent to same-target cases counts as a node and emits its own compare.
- `return`-bodies are distinct nodes emitting `cmpwi X;beqlr`.
- KEY: `case 0x0111:return` + `case 0x0112:break` emits `cmpwi 0x111;beqlr;bgelr` exactly
(break-child folds into parent's gt-bound).
- `default:` presence changes tree balance/pivots.
- Case-body emission order = SOURCE case order, not sorted order. Orig's IFD1 source has
`case 0x0103` written AFTER `case 0x0132` (its body lands late at ~0x1270). Reordering
source to match cut IFD1 normalized diffs to ~3 lines.
- Merged `case A: case B:` group shares one body AND still emits one compare per value.
Landings this session (all verified, no shims):
- IFD0: `s32 tag; u32 type;` + `tag/type = readU16()` — the u32 type makes MWCC hoist the
u16 mask (`clrlwi`) to right after the root `cmpwi 0x201`, matching orig's phi-join
placement, while keeping `cmplwi` unsigned compares (s32 flips them to cmpwi - wrong).
- IFD0: `case 0x0103:`+`case 0x0111:` merged return-group kills one dead blr body.
- IFD0: `case 0x0201/0x0202` grouped adjacent with `default:` at switch end keeps root
pivot 0x201 AND folds their shared body - insn count now 482 = orig 482.
- IFD0: `case 0x0102` REMOVED (default covers it) - with it present, {0x102} became a
lt-edge child emitting `bgelr`; without it MWCC emits plain `blr`. Orig has `bltlr`.
- IFD1: body-order decode (0x0103 after 0x0132) + `case 0x0111:return`/`0x0112:break`
fold + `case 0x0103` real body + noop cases 0x012D/0x0132/0x0213/0x8769/0x9000/0x9101/
0xA003 as breaks + `default:` -> only 2 normalized diff lines remain.
Remaining verified ties (documented walls, all source variants failed):
- bltlr-vs-bgelr/bound-side at folded lt-edge children (~15 forms: break/return/group/
default-placement/removal - MWCC picks a fixed emission side).
- Leaf bound-form vs equality: orig `cmpw 0xA004;bgelr` for {0xA003}-leaf (bound at
max+1); every source form emits `cmpw 0xA003;beqlr` + dead blr (IFD1, 2 lines).
- stb-interleave: orig serializes lbz;stb per byte through ONE reg in the 4-byte
version-string copies (exifVer/flashVer/flashPixVer); mine batches lbz x4;stb x4.
u8*/s8* pointer locals, `*q++` walking pointer, for-loop, memcpy all fail to
serialize (MWCC hoists). Scheduling artifact of differing webs.
- 1 dead `blr` body remains in IFD0 after the merged-group fix (unfolded noop body);
regname webs (tag r7-vs-r8, offset r6-vs-r8) are allocator-internal.
Scores after: IFD0 94.25->higher (482=482 insns), IFD1 98.76, exif_parse 99.43.
Texture converter fns re-verified as pure regname webs (instruction multiset identical
in converterYUV411toRGBA8 - 243=243 insns, all diffs are reg homes).