Compare commits
1 Commits
setting-cl
...
agent/w100
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46d0dbb0a7 |
@@ -53,9 +53,9 @@ Progress
|
||||
<!-- progress:start -->
|
||||
| Decompiled | Matched | Linked | Data |
|
||||
|:---:|:---:|:---:|:---:|
|
||||
| 99.59% | 91.16% | 74.57% | 99.56% |
|
||||
| 99.59% | 90.94% | 73.73% | 99.37% |
|
||||
|
||||
units 964/1027 complete, functions 12378/12563 matched.
|
||||
units 961/1027 complete, functions 12369/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 -->
|
||||
|
||||
@@ -18106,7 +18106,7 @@ __vt__Q49textinput6extend4memo15AppearMemoState = .data:0x81667FA0; // type:obje
|
||||
__vt__Q49textinput6extend4memo13DispMemoState = .data:0x81667FF8; // type:object size:0x58
|
||||
__vt__Q49textinput6extend4memo5State = .data:0x81668050; // type:object size:0x58
|
||||
__vt__Q49textinput6extend4memo7Manager = .data:0x816680A8; // type:object size:0x140
|
||||
lbl_816681E8 = .data:0x816681E8; // type:object size:0x24
|
||||
lbl_816681E8 = .data:0x816681E8; // type:object size:0x28
|
||||
lbl_81668210 = .data:0x81668210; // type:object size:0x9 data:string
|
||||
lbl_8166821C = .data:0x8166821C; // type:object size:0x9 data:string
|
||||
lbl_81668228 = .data:0x81668228; // type:object size:0x9 data:string
|
||||
@@ -23275,7 +23275,7 @@ lbl_81698388 = .sdata:0x81698388; // type:object size:0x2 data:string
|
||||
lbl_8169838C = .sdata:0x8169838C; // type:object size:0x4 data:string
|
||||
lbl_81698390 = .sdata:0x81698390; // type:object size:0x1 data:byte
|
||||
lbl_81698391 = .sdata:0x81698391; // type:object size:0x1 data:byte
|
||||
lbl_81698394 = .sdata:0x81698394; // type:object size:0x4 data:string
|
||||
lbl_81698394 = .sdata:0x81698394; // type:object size:0x2 data:string
|
||||
lbl_81698398 = .sdata:0x81698398; // type:object size:0x2 data:string
|
||||
lbl_8169839C = .sdata:0x8169839C; // type:object size:0x4
|
||||
drvInitFunc = .sdata:0x816983A0; // type:object size:0x8 scope:local data:4byte
|
||||
|
||||
@@ -1299,7 +1299,7 @@ config.libs = [
|
||||
Object(Matching, "ut/ut_RomFont.cpp"),
|
||||
Object(Matching, "ut/ut_ResFontBase.cpp"),
|
||||
Object(Matching, "ut/ut_ResFont.cpp"),
|
||||
Object(Matching, "ut/ut_ArchiveFontBase.cpp"),
|
||||
Object(NonMatching, "ut/ut_ArchiveFontBase.cpp"),
|
||||
Object(Matching, "ut/ut_ArchiveFont.cpp"),
|
||||
Object(Matching, "ut/ut_CharWriter.cpp"),
|
||||
Object(Matching, "ut/ut_TextWriterBase.cpp"),
|
||||
@@ -1388,7 +1388,7 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
RVLSDKLib("vi", [
|
||||
Object(Matching, "vi/vi.c"),
|
||||
Object(NonMatching, "vi/vi.c"),
|
||||
Object(Matching, "vi/i2c.c"),
|
||||
Object(Matching, "vi/vi3in1.c"),
|
||||
]
|
||||
@@ -1970,7 +1970,7 @@ config.libs = [
|
||||
Object(Matching, "MSL_Common/time.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/wctype.c"),
|
||||
Object(Matching, "MSL_Common/wmem.c"),
|
||||
Object(Matching, "MSL_Common/wprintf.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(NonMatching, "MSL_Common/wprintf.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/wstring.c"),
|
||||
Object(Matching, "MSL_Common/wchar_io.c"),
|
||||
Object(Matching, "PPC_EABI/time.dolphin.c"),
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace gui {
|
||||
class Manager;
|
||||
class EventHandler;
|
||||
|
||||
#if defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE) || defined(IPL_SETTING_NOVTABLE)
|
||||
#if defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||
class __declspec(novtable) Interface {
|
||||
#else
|
||||
class Interface {
|
||||
@@ -34,14 +34,14 @@ namespace gui {
|
||||
virtual void draw(Mtx& mtx) {} // 0x14 (0x05)
|
||||
virtual void draw() {} // 0x18 (0x06)
|
||||
|
||||
#if defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE) || defined(IPL_SETTING_NOVTABLE)
|
||||
#if defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||
virtual ~Interface(); // 0x1C (0x07)
|
||||
#else
|
||||
virtual ~Interface() {} // 0x1C (0x07)
|
||||
#endif
|
||||
};
|
||||
|
||||
#if defined(IPL_GC_WINDOW_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE) || defined(IPL_SETTING_NOVTABLE)
|
||||
#if defined(IPL_GC_WINDOW_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||
class __declspec(novtable) EventHandler {
|
||||
#else
|
||||
class EventHandler {
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace ipl {
|
||||
mbDisableCon(bDisableCon) {}
|
||||
#endif
|
||||
|
||||
#if defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE) || defined(IPL_SETTING_NOVTABLE)
|
||||
#if defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||
virtual ~PaneManager();
|
||||
#else
|
||||
virtual ~PaneManager() {}
|
||||
|
||||
@@ -163,9 +163,6 @@ namespace ipl {
|
||||
void init(const f32& start, const f32& end, f32 maxFrame, f32 startTangent, f32 endTangent, int playback = ANIM_TYPE_FORWARD,
|
||||
f32 speed = 1.0f);
|
||||
|
||||
#ifdef IPL_SD_CHANNEL_TITLE_CPP
|
||||
f32 get() const;
|
||||
#else
|
||||
f32 get() const {
|
||||
f32 var_f27 = mFrame;
|
||||
f32 var_f28 = 1.0f / mMaxFrame;
|
||||
@@ -184,7 +181,6 @@ namespace ipl {
|
||||
|
||||
return r;
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
f32 mStart;
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace ipl {
|
||||
y = r.y;
|
||||
z = 0.0f;
|
||||
}
|
||||
#if defined(IPL_ADDRESS_EDIT_CPP) || defined(IPL_SD_CHANNEL_SELECT_CPP) || defined(IPL_GC_WINDOW_CPP) || defined(IPL_SD_CHANNEL_TITLE_CPP)
|
||||
#if defined(IPL_ADDRESS_EDIT_CPP) || defined(IPL_SD_CHANNEL_SELECT_CPP) || defined(IPL_GC_WINDOW_CPP)
|
||||
VEC3(f32 fx, f32 fy, f32 fz);
|
||||
#else
|
||||
VEC3(f32 fx, f32 fy, f32 fz) {
|
||||
|
||||
@@ -31,12 +31,8 @@ namespace ipl {
|
||||
|
||||
virtual void calc();
|
||||
|
||||
#ifdef IPL_SD_CHANNEL_TITLE_CPP
|
||||
virtual void initCalcNormal();
|
||||
#else
|
||||
virtual void initCalcNormal() {
|
||||
} // 0x4C
|
||||
#endif
|
||||
virtual void initCalcFadeout() {
|
||||
} // 0x50
|
||||
|
||||
@@ -53,12 +49,8 @@ namespace ipl {
|
||||
return FADER_SCN_NEXT;
|
||||
} // 0x60
|
||||
|
||||
#ifdef IPL_SD_CHANNEL_TITLE_CPP
|
||||
virtual void calcCommonAfter();
|
||||
#else
|
||||
virtual void calcCommonAfter() {
|
||||
} // 0x64
|
||||
#endif
|
||||
|
||||
int getSceneFadeState() {
|
||||
return mScnFadeState;
|
||||
|
||||
@@ -62,11 +62,7 @@ namespace ipl {
|
||||
virtual ~Base();
|
||||
|
||||
/** @brief If the scene is ready */
|
||||
#ifdef IPL_SD_CHANNEL_TITLE_CPP
|
||||
virtual BOOL isReady() const;
|
||||
#else
|
||||
virtual BOOL isReady() const { return FALSE; }
|
||||
#endif
|
||||
|
||||
/** @brief If the user can power off/reset the system */
|
||||
#ifdef IPL_SD_CHANNEL_TITLE_CPP
|
||||
@@ -77,11 +73,7 @@ namespace ipl {
|
||||
/** @brief The scene running code when powering off/resetting the system */
|
||||
virtual void startResetting() {}
|
||||
/** @brief If the scene has finished its powering off/resetting task */
|
||||
#ifdef IPL_SD_CHANNEL_TITLE_CPP
|
||||
virtual BOOL isResetProcessDone();
|
||||
#else
|
||||
virtual BOOL isResetProcessDone() { return TRUE; }
|
||||
#endif
|
||||
|
||||
/** @brief Prepare to create scene */
|
||||
virtual void prepare() {}
|
||||
@@ -94,17 +86,10 @@ namespace ipl {
|
||||
/** @brief Destroy the scene and clear from memory */
|
||||
virtual void destroy() {}
|
||||
|
||||
#ifdef IPL_SD_CHANNEL_TITLE_CPP
|
||||
virtual Base* getParent();
|
||||
virtual Base* getChild();
|
||||
virtual Base* getNext();
|
||||
virtual Base* getPrev();
|
||||
#else
|
||||
virtual Base* getParent() { return (Base*)mpParent; }
|
||||
virtual Base* getChild() { return (Base*)mpChild; }
|
||||
virtual Base* getNext() { return (Base*)mpNext; }
|
||||
virtual Base* getPrev() { return (Base*)mpPrev; }
|
||||
#endif
|
||||
|
||||
/** @brief Check if scene has been created.*/
|
||||
bool isSceneCreated() const { return (mScnState & SCN_STATE_CREATED); }
|
||||
|
||||
@@ -65,13 +65,8 @@ namespace ipl {
|
||||
/** @brief Writes the file contents. */
|
||||
virtual void write(); // 0x10
|
||||
|
||||
#ifdef IPL_SD_CHANNEL_TITLE_CPP
|
||||
virtual bool isFinished();
|
||||
virtual int checkData();
|
||||
#else
|
||||
virtual bool isFinished() { return mbDoneTask; } // 0x14
|
||||
virtual int checkData() { return mResult; } // 0x18
|
||||
#endif
|
||||
virtual bool isFatalError(); // 0x1C
|
||||
|
||||
u8* getBuffer() const { return mpBuffer; }
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace ipl {
|
||||
static BOOL IsLastTicketExpired(ESTitleId* titleId);
|
||||
static void DeleteExpiredFlagFile();
|
||||
|
||||
static s32 DeleteUnauthorizedData(EGG::Heap* heap);
|
||||
static void DeleteUnauthorizedData(EGG::Heap* heap);
|
||||
|
||||
static u32 CheckTmdCountryCode(ESTmdView* tmdView);
|
||||
static u32 CheckTmdParentalControl(ESTmdView* tmdView);
|
||||
|
||||
@@ -51,17 +51,12 @@ namespace ipl {
|
||||
mArg.mOrthoScale = scale;
|
||||
}
|
||||
|
||||
#ifdef IPL_SD_CHANNEL_TITLE_CPP
|
||||
static void setOrthoTrans(const math::VEC3& translate);
|
||||
static void setOrthoScale(const math::VEC2& scale);
|
||||
#else
|
||||
static void setOrthoTrans(const math::VEC3& translate) { mArg.mOrthoTrans = translate; }
|
||||
|
||||
static void setOrthoScale(const math::VEC2& scale) NO_INLINE {
|
||||
mArg.mOrthoScale.x = scale.x;
|
||||
mArg.mOrthoScale.y = scale.y;
|
||||
}
|
||||
#endif
|
||||
|
||||
private:
|
||||
static Arg mArg;
|
||||
|
||||
@@ -1120,28 +1120,32 @@ 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"";
|
||||
}
|
||||
|
||||
if (format.alternate_form) {
|
||||
num_chars = (unsigned char)*wcs_ptr++;
|
||||
wchar_t first = *wcs_ptr++;
|
||||
wideLength = (unsigned char)first;
|
||||
|
||||
if (format.precision_specified && num_chars > format.precision) {
|
||||
num_chars = format.precision;
|
||||
if (format.precision_specified && wideLength > format.precision) {
|
||||
wideLength = format.precision;
|
||||
}
|
||||
} else if (format.precision_specified) {
|
||||
num_chars = format.precision;
|
||||
wideLength = format.precision;
|
||||
|
||||
if ((string_end = wmemchr(wcs_ptr, 0, num_chars)) != 0) {
|
||||
num_chars = string_end - wcs_ptr;
|
||||
if ((string_end = wmemchr((wchar_t*)wcs_ptr, 0, wideLength)) != 0) {
|
||||
wideLength = string_end - wcs_ptr;
|
||||
}
|
||||
|
||||
} else {
|
||||
num_chars = wcslen(wcs_ptr);
|
||||
wideLength = wcslen(wcs_ptr);
|
||||
}
|
||||
|
||||
num_chars = wideLength;
|
||||
|
||||
buff_ptr = wcs_ptr;
|
||||
break;
|
||||
} else {
|
||||
@@ -1152,7 +1156,7 @@ static int __wpformatter(void* (*write_proc)(void*, const wchar_t*, size_t),
|
||||
}
|
||||
|
||||
if (format.alternate_form) {
|
||||
num_chars = (unsigned char)*buff_ptr;
|
||||
num_chars = (unsigned char)*(const wchar_t*)wcs_ptr;
|
||||
|
||||
if (format.precision_specified && num_chars > format.precision) {
|
||||
num_chars = format.precision;
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace nw4r {
|
||||
namespace ut {
|
||||
class Rect {
|
||||
public:
|
||||
#if defined(IPL_SOUND_RECT_OUT_OF_LINE) || defined(IPL_SD_CHANNEL_TITLE_CPP)
|
||||
#ifdef IPL_SOUND_RECT_OUT_OF_LINE
|
||||
Rect();
|
||||
#else
|
||||
Rect() : left(), top(), right(), bottom() {}
|
||||
@@ -20,7 +20,7 @@ namespace nw4r {
|
||||
Rect(f32 l, f32 t, f32 r, f32 b) : left(l), top(t), right(r), bottom(b) {}
|
||||
#endif
|
||||
|
||||
#if !defined(IPL_CONTROLLER_TRIVIAL_RECT_DTOR) && !defined(IPL_MEMORYCARD_BASE_CPP) && !defined(IPL_SD_CHANNEL_TITLE_CPP)
|
||||
#if !defined(IPL_CONTROLLER_TRIVIAL_RECT_DTOR) && !defined(IPL_MEMORYCARD_BASE_CPP)
|
||||
~Rect() {}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace nw4r {
|
||||
} // namespace detail
|
||||
|
||||
template <typename TDerived, typename TBase>
|
||||
#if defined(IPL_BOARD_OBJECT_EXTERNAL_DYNAMIC_CAST) || defined(IPL_MEMORYCARD_BASE_CPP) || defined(IPL_SD_CHANNEL_TITLE_CPP)
|
||||
#if defined(IPL_BOARD_OBJECT_EXTERNAL_DYNAMIC_CAST) || defined(IPL_MEMORYCARD_BASE_CPP)
|
||||
TDerived DynamicCast(TBase* pPtr);
|
||||
#else
|
||||
inline TDerived DynamicCast(TBase* pPtr) {
|
||||
|
||||
@@ -252,17 +252,14 @@ namespace nw4r {
|
||||
}
|
||||
|
||||
inline void updateSheetFlags(const void* glgrHdr, u32 groupIdx, u16* sheetOffsets, u32 flagsStep, const u32* sheetFlags) {
|
||||
const GlyphGroups* glgr = (const GlyphGroups*)((const u8*)glgrHdr + sizeof(BinaryBlockHeader));
|
||||
int sheetIndex;
|
||||
u32 groupBitOffset;
|
||||
u16* sheetOffset = sheetOffsets;
|
||||
groupBitOffset = groupIdx * flagsStep * 8;
|
||||
for (sheetIndex = 0; sheetIndex < glgr->sheetCount; sheetOffset++, sheetIndex++) {
|
||||
u32 groupBitIdx = sheetIndex + groupBitOffset;
|
||||
const GlyphGroups* glgr = (GlyphGroups*)((u8*)glgrHdr + sizeof(BinaryBlockHeader));
|
||||
for (int sheetI = 0; sheetI < glgr->sheetCount; sheetI++) {
|
||||
u32 groupBitIdx = sheetI + groupIdx * flagsStep * 8;
|
||||
|
||||
const u32* bitBlockPtr = sheetFlags + (groupBitIdx & ~0x1F) / 32;
|
||||
u32 bitBlock = *bitBlockPtr;
|
||||
u32 bitBlock = *(u32*)bitBlockPtr;
|
||||
if (((bitBlock << (groupBitIdx & 0x1F)) & 0x80000000) != 0) {
|
||||
*sheetOffset = 1;
|
||||
sheetOffsets[sheetI] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -271,16 +268,14 @@ namespace nw4r {
|
||||
const u32* bitBlocksPtr, u32 sheetFlagsSize) {
|
||||
HeaderedGlyphGroups* pGlgr = (HeaderedGlyphGroups*)glgrHdr;
|
||||
|
||||
int i;
|
||||
u16* sheetOffset;
|
||||
for (i = 0, sheetOffset = sheetOffsets; i < pGlgr->inner.sheetCount; sheetOffset++, i++) {
|
||||
*sheetOffset = 0;
|
||||
for (int i = 0; i < pGlgr->inner.sheetCount; i++) {
|
||||
sheetOffsets[i] = 0;
|
||||
}
|
||||
|
||||
for (int i = 0; i < pGlgr->inner.nameCount; i++) {
|
||||
const char* includedGroups = ctx->pIncludedGroups;
|
||||
u16 offset = pGlgr->inner.nameOffsets[i];
|
||||
char* name = (char*)(offset + (u32)hdr);
|
||||
char* name = (char*)((u8*)hdr + offset);
|
||||
if (*includedGroups != 0) {
|
||||
if (!ArchiveFontBase::IncludeName(includedGroups, name)) {
|
||||
continue;
|
||||
@@ -293,23 +288,21 @@ namespace nw4r {
|
||||
|
||||
inline void convertSheetOffsetBooleansToOffsets(const void* glgrHdr, u16* sheetOffsets) {
|
||||
HeaderedGlyphGroups* pGlgr = (HeaderedGlyphGroups*)glgrHdr;
|
||||
int i;
|
||||
u16 glyphIdxOffset = 0;
|
||||
u16* sheetOffset;
|
||||
for (i = 0, sheetOffset = sheetOffsets; i < pGlgr->inner.sheetCount; sheetOffset++, i++) {
|
||||
if (*sheetOffset == 1) {
|
||||
*sheetOffset = glyphIdxOffset;
|
||||
for (int i = 0; i < pGlgr->inner.sheetCount; i++) {
|
||||
if (sheetOffsets[i] == 1) {
|
||||
sheetOffsets[i] = glyphIdxOffset;
|
||||
} else {
|
||||
*sheetOffset = -1;
|
||||
sheetOffsets[i] = -1;
|
||||
glyphIdxOffset += pGlgr->inner.sheetGlyphCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline void copyFlagOffsets(ArchiveFontBase::ConstructContext* ctx, u16* sheetOffsetsScratch, u32 workSize, const u16* sheetOffsetsScratchEnd) {
|
||||
inline void copyFlagOffsets(ArchiveFontBase::ConstructContext* ctx, u16* sheetOffsetsScratch, u32 workSize, u32 scratchSize) {
|
||||
u8* sheetOffsets = ctx->pWorkCurr;
|
||||
ctx->pWorkCurr = sheetOffsets + workSize;
|
||||
memmove(sheetOffsets, sheetOffsetsScratch, (sheetOffsetsScratchEnd - sheetOffsetsScratch) * sizeof(u16));
|
||||
memmove(sheetOffsets, sheetOffsetsScratch, scratchSize);
|
||||
ctx->pSheetOffsets = (u16*)sheetOffsets;
|
||||
}
|
||||
|
||||
@@ -318,64 +311,31 @@ namespace nw4r {
|
||||
// *sheetOffsetsScratch = (u16*)ROUNDDOWN((u32)((u8*)fontData + remWorkSpace) - sheetOffsetsSize, 2);
|
||||
// return sheetOffsetsSize;
|
||||
// }
|
||||
class FontGlyphGroupsAcs {
|
||||
public:
|
||||
explicit FontGlyphGroupsAcs(const ArchiveFontBinaryLayout* font)
|
||||
: mFont(font), mGroups(&font->glgr) {}
|
||||
const GlyphGroups& GetGroups() const { return mGroups->inner; }
|
||||
void SetSheetFlags(u32 flagsStep, const u32* sheetFlags) {
|
||||
mFlagsStep = flagsStep;
|
||||
mSheetFlags = sheetFlags;
|
||||
}
|
||||
|
||||
u16 GetNumSheet() const { return mGroups->inner.sheetCount; }
|
||||
int GetGlyphsPerSheet() const { return mGroups->inner.sheetGlyphCount; }
|
||||
u16 GetNumSet() const { return mGroups->inner.nameCount; }
|
||||
const char* GetSetName(int groupIndex) const {
|
||||
const u16 nameOffset = mGroups->inner.nameOffsets[groupIndex];
|
||||
return (const char*)(nameOffset + (u32)mFont);
|
||||
}
|
||||
bool IsUseSheet(int groupIndex, int sheetIndex) const {
|
||||
const u32 groupBitIndex = sheetIndex + groupIndex * mFlagsStep * 8;
|
||||
const u32* bitBlock = mSheetFlags + (groupBitIndex & ~0x1F) / 32;
|
||||
return ((*bitBlock << (groupBitIndex & 0x1F)) & 0x80000000) != 0;
|
||||
}
|
||||
|
||||
private:
|
||||
const ArchiveFontBinaryLayout* mFont;
|
||||
const HeaderedGlyphGroups* mGroups;
|
||||
u32 mFlagsStep;
|
||||
const u32* mSheetFlags;
|
||||
};
|
||||
|
||||
ArchiveFontBase::ConstructState ArchiveFontBase::ConstructOpAnalyzeGLGR(ConstructContext* ctx, CachedStreamReader* reader) {
|
||||
const u32* flagsSheets;
|
||||
u32 sheetOffsetsSize;
|
||||
u32 flagsSheetsOff;
|
||||
u32 glgrInnerLen;
|
||||
const ArchiveFontBinaryLayout* font;
|
||||
u16 sheetGlyphCount;
|
||||
u32 countSheet;
|
||||
HeaderedGlyphGroups* pGlgr;
|
||||
const ArchiveFontBinaryLayout* font;
|
||||
u8* glgrEnd;
|
||||
|
||||
u32 expectedMaxSize;
|
||||
u32 dataBlockCount;
|
||||
u16* sheetOffsetsScratch;
|
||||
int groupIndex;
|
||||
|
||||
font = (ArchiveFontBinaryLayout*)ctx->pWorkCurr;
|
||||
|
||||
glgrInnerLen = ctx->mNextBlockHdr.size - sizeof(BinaryBlockHeader);
|
||||
|
||||
// Check for RFNA
|
||||
if (font->hdr.signature != SIGNATURE_FONT_ARCHIVE) {
|
||||
return CONSTRUCT_STATE_FATAL_ERR;
|
||||
}
|
||||
|
||||
// Check that there's enough data available, and the space to
|
||||
// put that data
|
||||
ENSURE_READER_HAS_SIZE(ctx, reader, glgrInnerLen);
|
||||
ENSURE_WORK_HAS_SIZE(ctx, glgrInnerLen);
|
||||
|
||||
expectedMaxSize = ctx->mNextBlockHdr.size + sizeof(BinaryFileHeader);
|
||||
|
||||
// Copy the glgr to work
|
||||
{
|
||||
pGlgr = (HeaderedGlyphGroups*)&font->glgr;
|
||||
glgrEnd = (u8*)pGlgr + (u32)ctx->mNextBlockHdr.size;
|
||||
@@ -388,45 +348,80 @@ namespace nw4r {
|
||||
return CONSTRUCT_STATE_FATAL_ERR;
|
||||
}
|
||||
|
||||
FontGlyphGroupsAcs gg(font);
|
||||
sheetGlyphCount = gg.GetGlyphsPerSheet();
|
||||
dataBlockCount = font->hdr.dataBlocks;
|
||||
countSheet = gg.GetNumSheet();
|
||||
const u32 stepSheetFlags = detail::CalcSizeFlagSet(countSheet);
|
||||
flagsSheetsOff = detail::CalcOffsetSheetFlags(gg.GetGroups().nameCount, countSheet, gg.GetGroups().smthCount_0x0a,
|
||||
gg.GetGroups().smthCount_0x0c);
|
||||
flagsSheets = (const u32*)((flagsSheetsOff & ~3) + (u32)font);
|
||||
gg.SetSheetFlags(stepSheetFlags, flagsSheets);
|
||||
// Before here is fine (other than regswaps)
|
||||
// u16 sheetGlyphCount = FORCE_REACCESS_2(font->glgr.inner.sheetGlyphCount, u16); // 0x1C
|
||||
// u16 dataBlockCount = FORCE_REACCESS_2(font->hdr.dataBlocks, u16); // 0x0E
|
||||
// FORCE_REACCESS_2(font->glgr.inner.sheetCount, u16);
|
||||
// return ConstructOpAnalyzeGLGRInner(ctx, font, pGlgr, glgrEnd);
|
||||
|
||||
sheetOffsetsSize = (RoundUp)(countSheet * sizeof(u16), 4);
|
||||
// u32 fontSizeToEndOfGlgr;
|
||||
|
||||
u16 countSheet;
|
||||
u16 sheetGlyphCount, dataBlockCount;
|
||||
|
||||
u32 stepSheetFlags;
|
||||
u32 flagsSheetsOff;
|
||||
const u32* flagsSheets;
|
||||
|
||||
u32 sheetOffsetsSize;
|
||||
u16* sheetOffsetsScratch;
|
||||
|
||||
u32 sheetOffsetsScratchSize;
|
||||
|
||||
sheetGlyphCount = font->glgr.inner.sheetGlyphCount; // 0x1C
|
||||
dataBlockCount = font->hdr.dataBlocks; // 0x0E
|
||||
// countName = font->glgr.inner.nameCount;
|
||||
countSheet = font->glgr.inner.sheetCount;
|
||||
// count0A = font->glgr.inner.smthCount_0x0a;
|
||||
// count0C = font->glgr.inner.smthCount_0x0c;
|
||||
stepSheetFlags = detail::CalcSizeFlagSet(countSheet);
|
||||
flagsSheetsOff = detail::CalcOffsetSheetFlags(font->glgr.inner.nameCount, countSheet, font->glgr.inner.smthCount_0x0a,
|
||||
font->glgr.inner.smthCount_0x0c);
|
||||
flagsSheets = (const u32*)font + (flagsSheetsOff >> 2);
|
||||
|
||||
sheetOffsetsSize = ROUNDUP(countSheet * sizeof(u16), 4);
|
||||
sheetOffsetsScratch = (u16*)ROUNDDOWN((u32)((u8*)font + ctx->remWorkSpace()) - sheetOffsetsSize, 2);
|
||||
|
||||
pGlgr = (HeaderedGlyphGroups*)&font->glgr;
|
||||
ENSURE_WORK_HAS_SIZE(ctx, glgrEnd - (u8*)font + sheetOffsetsSize);
|
||||
// if (ctx->pWorkEnd - workCurr < fontSizeToEndOfGlgr + sheetOffsetsSize) {
|
||||
// return CONSTRUCT_STATE_FATAL_ERR;
|
||||
// }
|
||||
|
||||
{
|
||||
u16* sheetOffset;
|
||||
int sheetIndex;
|
||||
for (sheetIndex = 0, sheetOffset = sheetOffsetsScratch; sheetIndex < gg.GetNumSheet(); sheetOffset++, sheetIndex++) {
|
||||
*sheetOffset = 0;
|
||||
}
|
||||
for (groupIndex = 0; groupIndex < gg.GetNumSet(); groupIndex++) {
|
||||
const char* includedGroups = ctx->pIncludedGroups;
|
||||
const char* name = gg.GetSetName(groupIndex);
|
||||
if (*includedGroups && !ArchiveFontBase::IncludeName(includedGroups, name)) {
|
||||
continue;
|
||||
}
|
||||
for (int sheetIndex = 0; sheetIndex < gg.GetNumSheet(); sheetIndex++) {
|
||||
if (gg.IsUseSheet(groupIndex, sheetIndex)) {
|
||||
sheetOffsetsScratch[sheetIndex] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Clear sheet offsets scratch
|
||||
// for (s32 i = 0; i < pGlgr->inner.sheetCount; i++) {
|
||||
// sheetOffsetsScratch[i] = 0;
|
||||
// }
|
||||
|
||||
// for (s32 i = 0; i < pGlgr->inner.nameCount; i++) {
|
||||
// // const char* includedGroups = ctx->pIncludedGroups;
|
||||
// u16 offset = pGlgr->inner.nameOffsets[i];
|
||||
// const char* name = (char*)((u8*)font + offset);
|
||||
// if (*ctx->pIncludedGroups != 0) {
|
||||
// if (!ArchiveFontBase::IncludeName(ctx->pIncludedGroups, name)) {
|
||||
// continue;
|
||||
// }
|
||||
// }
|
||||
|
||||
// updateSheetFlags(pGlgr, i, sheetOffsetsScratch, stepSheetFlags, flagsSheets);
|
||||
// }
|
||||
setSheetOffsetBooleans(ctx, pGlgr, font, sheetOffsetsScratch, flagsSheets, stepSheetFlags);
|
||||
|
||||
// u16 glyphIdxOffset = 0;
|
||||
// for (s32 i = 0; i < pGlgr->inner.sheetCount; i++) {
|
||||
// if (sheetOffsetsScratch[i] == 1) {
|
||||
// sheetOffsetsScratch[i] = glyphIdxOffset;
|
||||
// } else {
|
||||
// sheetOffsetsScratch[i] = -1;
|
||||
// glyphIdxOffset += pGlgr->inner.sheetGlyphCount;
|
||||
// }
|
||||
// }
|
||||
convertSheetOffsetBooleansToOffsets(pGlgr, sheetOffsetsScratch);
|
||||
|
||||
copyFlagOffsets(ctx, sheetOffsetsScratch, sheetOffsetsSize, sheetOffsetsScratch + (u16)countSheet);
|
||||
sheetOffsetsScratchSize = (u32)countSheet << 1;
|
||||
sheetOffsetsScratchSize += (sheetOffsetsScratchSize >> 31);
|
||||
sheetOffsetsScratchSize &= ~1;
|
||||
copyFlagOffsets(ctx, sheetOffsetsScratch, sheetOffsetsSize, sheetOffsetsScratchSize);
|
||||
|
||||
ctx->mSheetCount = countSheet;
|
||||
ctx->mGlyphsPerSheet = sheetGlyphCount;
|
||||
|
||||
@@ -15,11 +15,11 @@ static void readHuffmanLimit(const TMCHuffmanEntry* entries, TMCHuffmanEntry* li
|
||||
limit->symbol = entries->symbol;
|
||||
}
|
||||
|
||||
static inline s32 decodeLongHuffman(s32 bitCount, u32* huff_tbl, u8* symbols, TMCCJPEGDecWork* work, TMCHuffmanEntry* limit, TMCHuffmanEntry* decoded) {
|
||||
u16* entry;
|
||||
static inline s32 decodeLongHuffman(s32 bitCount, const TMCHuffmanEntry* table, const u8* symbols, TMCCJPEGDecWork* work, TMCHuffmanEntry* limit, TMCHuffmanEntry* decoded) {
|
||||
u32 bitData;
|
||||
u32 code;
|
||||
u32 length;
|
||||
const TMCHuffmanEntry* entry;
|
||||
|
||||
if (bitCount <= 17) {
|
||||
s32 result = TMCJPEGDEC_load_buff(work);
|
||||
@@ -28,16 +28,16 @@ static inline s32 decodeLongHuffman(s32 bitCount, u32* huff_tbl, u8* symbols, TM
|
||||
}
|
||||
}
|
||||
bitCount = work->bitCount;
|
||||
entry = (u16*)(huff_tbl + 9);
|
||||
bitData = work->bitBuf;
|
||||
length = 9;
|
||||
bitCount -= 9;
|
||||
code = (bitData >> bitCount) & 0x1FF;
|
||||
work->bitCount = bitCount;
|
||||
length = 9;
|
||||
entry = table + 9;
|
||||
goto read_entry;
|
||||
while (1) {
|
||||
length++;
|
||||
entry += 2;
|
||||
entry++;
|
||||
if (length > 16) {
|
||||
return TMCC_ERROR_OVERFLOW;
|
||||
}
|
||||
@@ -49,23 +49,21 @@ static inline s32 decodeLongHuffman(s32 bitCount, u32* huff_tbl, u8* symbols, TM
|
||||
code |= (bitData >> bitCount) & 1;
|
||||
read_entry:
|
||||
{
|
||||
limit->bitLength = entry[0];
|
||||
limit->symbol = entry[1];
|
||||
readHuffmanLimit(entry, limit);
|
||||
*decoded = *limit;
|
||||
if (code > (u32)decoded->bitLength) {
|
||||
continue;
|
||||
}
|
||||
{
|
||||
u32 relativeCode = code - limit->bitLength;
|
||||
u32 symbolIndex = relativeCode + limit->symbol;
|
||||
u32 relativeCode = code - entry->bitLength;
|
||||
u32 symbolIndex = relativeCode + entry->symbol;
|
||||
return symbols[symbolIndex & 0xFF];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline s32 decodeACHuffman(s32 bitCount, u32* huff_tbl, u8* symbols, TMCCJPEGDecWork* work, TMCHuffmanEntry* limit, TMCHuffmanEntry* decoded) {
|
||||
u16* entry;
|
||||
static inline s32 decodeACHuffman(s32 bitCount, const TMCHuffmanEntry* entry, const u8* symbols, TMCCJPEGDecWork* work, TMCHuffmanEntry* limit, TMCHuffmanEntry* decoded) {
|
||||
u32 bitData;
|
||||
u32 code;
|
||||
u32 length;
|
||||
@@ -77,16 +75,16 @@ static inline s32 decodeACHuffman(s32 bitCount, u32* huff_tbl, u8* symbols, TMCC
|
||||
}
|
||||
}
|
||||
bitCount = work->bitCount;
|
||||
entry = (u16*)(huff_tbl + 9);
|
||||
bitData = work->bitBuf;
|
||||
length = 9;
|
||||
bitCount -= 9;
|
||||
code = (bitData >> bitCount) & 0x1FF;
|
||||
work->bitCount = bitCount;
|
||||
length = 9;
|
||||
entry += 9;
|
||||
goto read_entry;
|
||||
while (1) {
|
||||
length++;
|
||||
entry += 2;
|
||||
entry++;
|
||||
if (length > 16) {
|
||||
return TMCC_ERROR_OVERFLOW;
|
||||
}
|
||||
@@ -98,22 +96,20 @@ static inline s32 decodeACHuffman(s32 bitCount, u32* huff_tbl, u8* symbols, TMCC
|
||||
code |= (bitData >> bitCount) & 1;
|
||||
read_entry:
|
||||
{
|
||||
limit->bitLength = entry[0];
|
||||
limit->symbol = entry[1];
|
||||
readHuffmanLimit(entry, limit);
|
||||
*decoded = *limit;
|
||||
if (code > (u32)decoded->bitLength) {
|
||||
continue;
|
||||
}
|
||||
{
|
||||
u32 relativeCode = code - limit->bitLength;
|
||||
u32 symbolIndex = relativeCode + limit->symbol;
|
||||
u32 relativeCode = code - entry->bitLength;
|
||||
u32 symbolIndex = relativeCode + entry->symbol;
|
||||
return symbols[symbolIndex & 0xFF];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_ptr, TMCCJPEGDecWork* work) {
|
||||
TMCHuffmanEntry dcEntry;
|
||||
TMCHuffmanEntry dcDecoded;
|
||||
@@ -121,7 +117,7 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
TMCHuffmanEntry acDecoded;
|
||||
TMCHuffmanEntry acLimit;
|
||||
u8* huff_sym;
|
||||
u16* ac_fast;
|
||||
const TMCHuffmanEntry* ac_fast;
|
||||
s32 idx;
|
||||
u32* huff_tbl;
|
||||
s32 bit_pos;
|
||||
@@ -134,13 +130,11 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
s32 t;
|
||||
s32 zz;
|
||||
s32 q;
|
||||
u16* dc_fast;
|
||||
const TMCHuffmanEntry* dc_fast;
|
||||
const u8* zztbl;
|
||||
s32* conv_row;
|
||||
|
||||
conv_row = (s32*)conv_row_ptr;
|
||||
bit_pos = work->bitCount;
|
||||
dc_fast = work->pDCFast;
|
||||
dc_fast = (const TMCHuffmanEntry*)work->pDCFast;
|
||||
|
||||
if (bit_pos <= 8) {
|
||||
r = TMCJPEGDEC_load_buff(work);
|
||||
@@ -152,7 +146,7 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
bit_pos = work->bitCount;
|
||||
bit_data = work->bitBuf;
|
||||
{
|
||||
dcEntry = readHuffmanEntry((const TMCHuffmanEntry*)dc_fast, (bit_data >> (bit_pos - 8)) & 0xFF);
|
||||
dcEntry = readHuffmanEntry(dc_fast, (bit_data >> (bit_pos - 8)) & 0xFF);
|
||||
r = dcEntry.bitLength;
|
||||
extra = dcEntry.symbol;
|
||||
}
|
||||
@@ -163,28 +157,30 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
} else {
|
||||
huff_sym = work->pDCHuffSym;
|
||||
huff_tbl = work->pDCHuffTbl;
|
||||
r = decodeLongHuffman(bit_pos, huff_tbl, huff_sym, work, &dcLimit, &dcDecoded);
|
||||
r = decodeLongHuffman(bit_pos, (const TMCHuffmanEntry*)huff_tbl, huff_sym, work, &dcLimit, &dcDecoded);
|
||||
if (r < 0) {
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
blk0 = conv_row[0];
|
||||
blk0 = ((s32*)conv_row_ptr)[0];
|
||||
if (r != 0) {
|
||||
if (work->bitCount <= r) {
|
||||
s32 load_ret;
|
||||
if (load_ret = TMCJPEGDEC_load_buff(work), load_ret < 0) {
|
||||
bit_pos = work->bitCount;
|
||||
if (bit_pos <= r) {
|
||||
s32 load_ret = TMCJPEGDEC_load_buff(work);
|
||||
if (load_ret < 0) {
|
||||
return load_ret;
|
||||
}
|
||||
}
|
||||
tmp = 1UL << r;
|
||||
bit_pos = work->bitCount - r;
|
||||
work->bitCount = bit_pos;
|
||||
bit_pos = work->bitCount;
|
||||
bit_data = work->bitBuf;
|
||||
tmp = 1 << r;
|
||||
extra = tmp - 1;
|
||||
bit_pos -= r;
|
||||
work->bitCount = bit_pos;
|
||||
extra = extra & (bit_data >> bit_pos);
|
||||
if (((s32)tmp >> 1) > extra) {
|
||||
extra -= (tmp - 1);
|
||||
extra -= tmp - 1;
|
||||
}
|
||||
dc_predict_row_ptr[0] += extra;
|
||||
}
|
||||
@@ -192,7 +188,7 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
*block = dc_predict_row_ptr[0] * blk0;
|
||||
|
||||
{
|
||||
ac_fast = work->pACFast;
|
||||
ac_fast = (const TMCHuffmanEntry*)work->pACFast;
|
||||
huff_tbl = work->pACHuffTbl;
|
||||
huff_sym = work->pACHuffSym;
|
||||
|
||||
@@ -210,7 +206,7 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
zztbl = TMCJPEGDEC_Zigzag_data;
|
||||
bit_data = work->bitBuf;
|
||||
t = bit_pos - 8;
|
||||
acEntry = readHuffmanEntry((const TMCHuffmanEntry*)ac_fast, (bit_data >> t) & 0xFF);
|
||||
acEntry = readHuffmanEntry(ac_fast, (bit_data >> t) & 0xFF);
|
||||
|
||||
do {
|
||||
s32 ac_thresh = acEntry.bitLength;
|
||||
@@ -221,7 +217,7 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
r = acEntry.symbol;
|
||||
} else {
|
||||
bit_pos = work->bitCount;
|
||||
r = decodeACHuffman(bit_pos, huff_tbl, huff_sym, work, &acLimit, &acDecoded);
|
||||
r = decodeACHuffman(bit_pos, (const TMCHuffmanEntry*)huff_tbl, huff_sym, work, &acLimit, &acDecoded);
|
||||
if (r < 0) {
|
||||
return r;
|
||||
}
|
||||
@@ -245,18 +241,19 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
return r;
|
||||
}
|
||||
}
|
||||
tmp = 1UL << t;
|
||||
bit_pos = work->bitCount - t;
|
||||
work->bitCount = bit_pos;
|
||||
bit_pos = work->bitCount;
|
||||
tmp = 1 << t;
|
||||
bit_data = work->bitBuf;
|
||||
extra = tmp - 1;
|
||||
extra = extra & (bit_data >> bit_pos);
|
||||
bit_pos -= t;
|
||||
work->bitCount = bit_pos;
|
||||
t = bit_pos - 8;
|
||||
q = conv_row[(u8)zz];
|
||||
acEntry = readHuffmanEntry((const TMCHuffmanEntry*)ac_fast, (bit_data >> t) & 0xFF);
|
||||
extra = extra & (bit_data >> bit_pos);
|
||||
q = ((s32*)conv_row_ptr)[(u8)zz];
|
||||
acEntry = readHuffmanEntry(ac_fast, (bit_data >> t) & 0xFF);
|
||||
|
||||
if (((s32)tmp >> 1) > extra) {
|
||||
extra -= (tmp - 1);
|
||||
extra -= tmp - 1;
|
||||
}
|
||||
|
||||
block[(u8)zz] = extra * q;
|
||||
@@ -277,7 +274,7 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
bit_pos = work->bitCount;
|
||||
t = bit_pos - 8;
|
||||
tmp = ((bit_data >> t) & 0xFF) << 2;
|
||||
acEntry = readHuffmanEntry((const TMCHuffmanEntry*)ac_fast, tmp >> 2);
|
||||
acEntry = readHuffmanEntry(ac_fast, tmp >> 2);
|
||||
|
||||
idx += 16;
|
||||
}
|
||||
|
||||
@@ -1068,7 +1068,7 @@ filterVowelCandidate:
|
||||
(((ZiAlphaWork*)workData)->requiredLength != parameters->elementCount)) &&
|
||||
(((((ZiAlphaWork*)workData)->prefixLength == '\0' ||
|
||||
(((ZiAlphaWork*)workData)->prefixLength + 1 >= parameters->elementCount)) && (dictionaryExact != 0)))
|
||||
))) && ((((currentVowelRestriction && (prefixCount == 0)) && (dictionaryKind != 0xb)) &&
|
||||
))) && ((((completionAllowed && (prefixCount == 0)) && (dictionaryKind != 0xb)) &&
|
||||
((((int)dictionaryIndex < (int)(unsigned int)((ZiAlphaWork*)workData)->dictionaryCount &&
|
||||
(((ZiAlphaOptions*)optionData)->lookupMode == '\0')) &&
|
||||
(((ZiAlphaWork*)workData)->dictionaries[language] == 0)))))) {
|
||||
@@ -1084,7 +1084,7 @@ filterVowelCandidate:
|
||||
goto retryDictionary;
|
||||
}
|
||||
}
|
||||
if ((((((dictionaryExact == 0) || (!currentVowelRestriction)) || (prefixCount != 0)) ||
|
||||
if ((((((dictionaryExact == 0) || (!completionAllowed)) || (prefixCount != 0)) ||
|
||||
((dictionaryKind == 0xb ||
|
||||
(dictionaryIndex >= ((ZiAlphaWork*)workData)->dictionaryCount)))) ||
|
||||
(elements == 0)) ||
|
||||
@@ -1367,7 +1367,7 @@ emitCandidate:
|
||||
}
|
||||
}
|
||||
retryDictionary:;
|
||||
} while (dictionaryIndex != 0);
|
||||
} while (dictionaryKind != 0);
|
||||
}
|
||||
finishDictionaryPass:;
|
||||
}
|
||||
@@ -1406,13 +1406,13 @@ finishDictionaryPass:;
|
||||
secondLanguagePass = ZI8_TRUE;
|
||||
languagePassCount = 0;
|
||||
language = parameters->subLanguage;
|
||||
completionAllowed = secondaryCompletionAllowed;
|
||||
currentVowelRestriction = secondaryVowelRestriction;
|
||||
dictionaryStatus[9] = 0;
|
||||
dictionaryStatus[5] = 0;
|
||||
dictionaryStatus[6] = 0;
|
||||
dictionaryStatus[7] = 0;
|
||||
dictionaryStatus[8] = 0;
|
||||
completionAllowed = secondaryCompletionAllowed;
|
||||
currentVowelRestriction = secondaryVowelRestriction;
|
||||
if (switchedLanguage) {
|
||||
secondLanguagePass = ZI8_FALSE;
|
||||
dictionaryStatus[1] = 0;
|
||||
@@ -1426,15 +1426,14 @@ finishDictionaryPass:;
|
||||
if (language == 0) {
|
||||
language = parameters->language;
|
||||
}
|
||||
completionAllowed = secondaryCompletionAllowed;
|
||||
currentVowelRestriction = secondaryVowelRestriction;
|
||||
if (language == parameters->language) {
|
||||
completionAllowed = primaryCompletionAllowed;
|
||||
currentVowelRestriction = primaryVowelRestriction;
|
||||
} else {
|
||||
completionAllowed = secondaryCompletionAllowed;
|
||||
currentVowelRestriction = secondaryVowelRestriction;
|
||||
}
|
||||
if ((((ZiAlphaOptions*)optionData)->lookupMode != '\0') || ((!completionAllowed && (!currentVowelRestriction)))) goto finishCandidates;
|
||||
if ((currentVowelRestriction) &&
|
||||
if ((((ZiAlphaOptions*)optionData)->lookupMode != '\0') || ((!currentVowelRestriction && (!completionAllowed)))) goto finishCandidates;
|
||||
if ((completionAllowed) &&
|
||||
((((((ZiAlphaWork*)workData)->suffixMode == '\0' && (2 < (int)elementCount)) &&
|
||||
(elements[elementCount - 2] == 0xeff1)) &&
|
||||
((int)((ZiAlphaWork*)workData)->prefixCount == elementCount - 2)))) {
|
||||
@@ -1445,65 +1444,66 @@ finishDictionaryPass:;
|
||||
prefixPrepared = ZI8_TRUE;
|
||||
goto preparePrefix;
|
||||
}
|
||||
if (currentVowelRestriction && ((ZiAlphaWork*)workData)->suffixMode != 0 &&
|
||||
((ZiAlphaWork*)workData)->suffixLocked == 0 && elementCount > 2 &&
|
||||
((elements[elementCount - 2] == 0xEFF1 &&
|
||||
((ZiAlphaWork*)workData)->suffixCount == elementCount - 2) ||
|
||||
(((ZiAlphaWork*)workData)->suffixCount == elementCount - 1 &&
|
||||
Zi8IsAlphaPunct(elements[elementCount - 1]) != 0))) {
|
||||
if (((ZiAlphaWork*)workData)->prefixEnabled >= 1 && elements[elementCount - 1] == 0xEFF1) {
|
||||
goto checkPrefixPunctuation;
|
||||
}
|
||||
if (!primaryMatched && !secondaryMatched) {
|
||||
((ZiAlphaWork*)workData)->suffixLocked = 1;
|
||||
((ZiAlphaWork*)workData)->suffixElementCount = parameters->elementCount - 1;
|
||||
if (prefixCount != 0) {
|
||||
if (!((((completionAllowed) && (((ZiAlphaWork*)workData)->suffixMode != '\0')) &&
|
||||
((((ZiAlphaWork*)workData)->suffixLocked == '\0' && (2 < (int)elementCount)))) &&
|
||||
(((elements[elementCount - 2] == 0xeff1 &&
|
||||
((int)((ZiAlphaWork*)workData)->suffixCount == elementCount - 2)) ||
|
||||
(((int)((ZiAlphaWork*)workData)->suffixCount == elementCount - 1 &&
|
||||
((Zi8IsAlphaPunct(elements[elementCount - 1])) != '\0'))))))) {
|
||||
tryAlternatePrefix:
|
||||
if ((prefixPrepared) && (1 < ((ZiAlphaWork*)workData)->alternatePrefixCount)) {
|
||||
if (language == parameters->language) {
|
||||
if (primaryMatched) {
|
||||
((ZiAlphaWork*)workData)->alternatePrefixCount = 0;
|
||||
}
|
||||
}
|
||||
else if (secondaryMatched) {
|
||||
((ZiAlphaWork*)workData)->alternatePrefixCount = 0;
|
||||
}
|
||||
if (((ZiAlphaWork*)workData)->alternatePrefixCount != '\0') {
|
||||
wordCursor -= prefixCount;
|
||||
elements -= prefixCount;
|
||||
elementCount = elementCount + prefixCount;
|
||||
wordCapacity = wordCapacity + prefixCount;
|
||||
prefixCount = 0;
|
||||
}
|
||||
goto preparePrefix;
|
||||
}
|
||||
}
|
||||
if ((prefixPrepared) && (1 < ((ZiAlphaWork*)workData)->alternatePrefixCount)) {
|
||||
if (language == parameters->language) {
|
||||
if (primaryMatched) {
|
||||
prefixPrepared = ZI8_FALSE;
|
||||
((ZiAlphaWork*)workData)->suffixMode = 0;
|
||||
((ZiAlphaWork*)workData)->suffixLocked = 0;
|
||||
((ZiAlphaWork*)workData)->suffixCount = 0;
|
||||
for (index = 0; index < (int)(unsigned int)((ZiAlphaWork*)workData)->alternatePrefixCount; index = index + 1) {
|
||||
((ZiAlphaWork*)workData)->prefix[index] =
|
||||
((ZiAlphaWork*)workData)->alternatePrefix[index];
|
||||
}
|
||||
((ZiAlphaWork*)workData)->prefixCount = (ziU8)index;
|
||||
if (((ZiAlphaWork*)workData)->language == parameters->language) {
|
||||
((ZiAlphaWork*)workData)->language = parameters->subLanguage;
|
||||
}
|
||||
else {
|
||||
((ZiAlphaWork*)workData)->language = parameters->language;
|
||||
}
|
||||
((ZiAlphaWork*)workData)->alternatePrefixCount = 0;
|
||||
}
|
||||
}
|
||||
else if (secondaryMatched) {
|
||||
((ZiAlphaWork*)workData)->alternatePrefixCount = 0;
|
||||
if ((((primaryMatched) && (secondaryMatched)) || (elementCount == 0)) ||
|
||||
(((language == parameters->language && (primaryMatched)) || ((language == parameters->subLanguage && (secondaryMatched))))))
|
||||
goto finishCandidates;
|
||||
if (completionAllowed) goto checkPrefixPunctuation;
|
||||
} else {
|
||||
if ((((ZiAlphaWork*)workData)->prefixEnabled == '\0') || (elements[elementCount - 1] != 0xeff1)) {
|
||||
if ((!primaryMatched) && (!secondaryMatched)) {
|
||||
((ZiAlphaWork*)workData)->suffixLocked = 1;
|
||||
((ZiAlphaWork*)workData)->suffixElementCount = parameters->elementCount - 1;
|
||||
if (prefixCount != 0) {
|
||||
wordCursor -= prefixCount;
|
||||
elements -= prefixCount;
|
||||
elementCount = elementCount + prefixCount;
|
||||
wordCapacity = wordCapacity + prefixCount;
|
||||
prefixCount = 0;
|
||||
}
|
||||
goto preparePrefix;
|
||||
}
|
||||
goto tryAlternatePrefix;
|
||||
}
|
||||
if (((ZiAlphaWork*)workData)->alternatePrefixCount != '\0') {
|
||||
wordCursor -= prefixCount;
|
||||
elements -= prefixCount;
|
||||
elementCount = elementCount + prefixCount;
|
||||
wordCapacity = wordCapacity + prefixCount;
|
||||
prefixCount = 0;
|
||||
prefixPrepared = ZI8_FALSE;
|
||||
((ZiAlphaWork*)workData)->suffixMode = 0;
|
||||
((ZiAlphaWork*)workData)->suffixLocked = 0;
|
||||
((ZiAlphaWork*)workData)->suffixCount = 0;
|
||||
for (index = 0; index < (int)(unsigned int)((ZiAlphaWork*)workData)->alternatePrefixCount; index = index + 1) {
|
||||
((ZiAlphaWork*)workData)->prefix[index] =
|
||||
((ZiAlphaWork*)workData)->alternatePrefix[index];
|
||||
}
|
||||
((ZiAlphaWork*)workData)->prefixCount = (ziU8)index;
|
||||
if (((ZiAlphaWork*)workData)->language == parameters->language) {
|
||||
((ZiAlphaWork*)workData)->language = parameters->subLanguage;
|
||||
}
|
||||
else {
|
||||
((ZiAlphaWork*)workData)->language = parameters->language;
|
||||
}
|
||||
((ZiAlphaWork*)workData)->alternatePrefixCount = 0;
|
||||
}
|
||||
}
|
||||
if ((((primaryMatched) && (secondaryMatched)) || (elementCount == 0)) ||
|
||||
(((language == parameters->language && (primaryMatched)) || ((language == parameters->subLanguage && (secondaryMatched))))))
|
||||
goto finishCandidates;
|
||||
if (currentVowelRestriction) {
|
||||
checkPrefixPunctuation:
|
||||
if ((1 < ((ZiAlphaWork*)workData)->prefixEnabled) &&
|
||||
(parameters->elements[parameters->elementCount - 1] != 0xEFF1))
|
||||
|
||||
@@ -353,41 +353,38 @@ static void reset_kpad(KPADInside* kpad) {
|
||||
}
|
||||
|
||||
void KPADGetProjectionPos(Vec2* dest, Vec2* src, const Rect* rect, f32 scale) {
|
||||
f32 aspect;
|
||||
f32 halfHeight;
|
||||
f32 half;
|
||||
f32 x;
|
||||
f32 height;
|
||||
height = rect->bottom - rect->top;
|
||||
half = 0.5f;
|
||||
halfHeight = height * half;
|
||||
x = src->x * halfHeight;
|
||||
aspect = 1.2f;
|
||||
x = aspect * x;
|
||||
dest->y = aspect * (src->y * halfHeight);
|
||||
dest->x = (f32)(x * (0.908 * scale));
|
||||
f64 scaled;
|
||||
f32 height = rect->bottom - rect->top;
|
||||
f32 halfHeight = height * 0.5f;
|
||||
f32 x = src->x * halfHeight;
|
||||
f32 y = src->y * halfHeight;
|
||||
x *= 1.2f;
|
||||
y *= 1.2f;
|
||||
scaled = 0.908 * scale;
|
||||
dest->y = y;
|
||||
dest->x = (f32)(x * scaled);
|
||||
}
|
||||
|
||||
void KPADSetSensorHeight(s32 chan, f32 sensorHeight) {
|
||||
KPADInside* kpad;
|
||||
f32 halfHeightSquared;
|
||||
f32 halfHeight;
|
||||
f32 barOffsetX;
|
||||
f32 barDiagonal;
|
||||
f32 halfWidthSquared;
|
||||
f32 halfWidth;
|
||||
f32 negativeSensorHeight;
|
||||
f32 zero;
|
||||
f32 barDiagonalSquared;
|
||||
f32 halfHeightSquared;
|
||||
halfWidth = 1.0f;
|
||||
kpad = chan + inside_kpads;
|
||||
kpad = &inside_kpads[chan];
|
||||
halfHeight = 0.75f;
|
||||
negativeSensorHeight = -sensorHeight;
|
||||
halfWidthSquared = halfWidth * halfWidth;
|
||||
halfHeightSquared = halfHeight * halfHeight;
|
||||
zero = 0.0f;
|
||||
kpad->sensorBarCenter.x = zero;
|
||||
kpad->sensorBarCenter.x = 0.0f;
|
||||
kpad->sensorBarCenter.y = negativeSensorHeight;
|
||||
barDiagonal = (f32)sqrt(halfWidthSquared + halfHeightSquared);
|
||||
barDiagonalSquared = halfWidthSquared + halfHeightSquared;
|
||||
barDiagonal = (f32)sqrt(barDiagonalSquared);
|
||||
barOffsetX = kpad->sensorBarCenter.x;
|
||||
if (barOffsetX < 0.0f) {
|
||||
halfWidth += barOffsetX;
|
||||
@@ -468,24 +465,29 @@ static void calc_button_repeat(KPADInside* kpad, u8 extension, s32 elapsed) {
|
||||
}
|
||||
|
||||
static void calc_acc_horizon(KPADInside* kpad) {
|
||||
f32 magnitude;
|
||||
f32 magnitude = (f32)sqrt(kpad->acceleration.x * kpad->acceleration.x + kpad->acceleration.y * kpad->acceleration.y);
|
||||
f32 normalizedX;
|
||||
f32 normalizedY;
|
||||
f32 targetY;
|
||||
f32 targetX;
|
||||
f32 productX;
|
||||
f32 oldX;
|
||||
f32 oldY;
|
||||
f32 blend;
|
||||
f32 projectedX;
|
||||
f32 smoothing;
|
||||
f32 deltaX;
|
||||
f32 nextX;
|
||||
f32 nextY;
|
||||
f32 normalized;
|
||||
f32 oldCircleY;
|
||||
f32 circleX;
|
||||
f32 oldCircleX;
|
||||
f32 unitY;
|
||||
f32 unitX;
|
||||
f32 oldCircleX;
|
||||
f32 oldCircleY;
|
||||
f32 unitY;
|
||||
f32 circleX;
|
||||
f32 deltaCircleX;
|
||||
f32 circleY;
|
||||
f32 deltaCircleY;
|
||||
magnitude = (f32)sqrt(kpad->acceleration.x * kpad->acceleration.x + kpad->acceleration.y * kpad->acceleration.y);
|
||||
if (magnitude == 0.0f || magnitude >= 2.0f) {
|
||||
return;
|
||||
}
|
||||
@@ -495,12 +497,17 @@ static void calc_acc_horizon(KPADInside* kpad) {
|
||||
if (magnitude > 1.0f) {
|
||||
magnitude = 2.0f - magnitude;
|
||||
}
|
||||
targetY = kpad->accelNormal.y;
|
||||
targetX = kpad->accelNormal.x;
|
||||
productX = targetX * normalizedX;
|
||||
oldX = kpad->horizonAxis.x;
|
||||
oldY = kpad->horizonAxis.y;
|
||||
blend = magnitude * kp_acc_horizon_pw;
|
||||
projectedX = kpad->accelNormal.x * normalizedX + kpad->accelNormal.y * normalizedY;
|
||||
magnitude *= blend;
|
||||
deltaX = magnitude * (projectedX - kpad->horizonAxis.x);
|
||||
nextX = kpad->horizonAxis.x + deltaX;
|
||||
nextY = kpad->horizonAxis.y + magnitude * (((kpad->accelNormal.y * normalizedX) - (kpad->accelNormal.x * normalizedY)) - kpad->horizonAxis.y);
|
||||
projectedX = productX + targetY * normalizedY;
|
||||
smoothing = magnitude * blend;
|
||||
deltaX = smoothing * (projectedX - oldX);
|
||||
nextX = oldX + deltaX;
|
||||
nextY = oldY + smoothing * (((targetY * normalizedX) - (targetX * normalizedY)) - oldY);
|
||||
normalized = (f32)sqrt(nextX * nextX + nextY * nextY);
|
||||
if (normalized != 0.0f) {
|
||||
unitX = nextX / normalized;
|
||||
@@ -781,18 +788,24 @@ nextObject:
|
||||
|
||||
static s8 select_1obj_first(KPADInside* kpad) {
|
||||
KPADDPDObject* object = kpad->dpdState.objects;
|
||||
f32 offsetX = kpad->horizonTangent.x * kpad->horizonAxis.x + kpad->horizonTangent.y * kpad->horizonAxis.y;
|
||||
f32 offsetY = kpad->horizonTangent.y * kpad->horizonAxis.x - kpad->horizonTangent.x * kpad->horizonAxis.y;
|
||||
offsetX *= kpad->dpdObjectScale;
|
||||
offsetY *= kpad->dpdObjectScale;
|
||||
KPADDPDObject* end = kpad->dpdState.candidates;
|
||||
f32 scale = kpad->dpdObjectScale;
|
||||
f32 productX = kpad->horizonTangent.x * kpad->horizonAxis.x;
|
||||
f32 productY = kpad->horizonTangent.y * kpad->horizonAxis.x;
|
||||
f32 offsetX = productX + kpad->horizonTangent.y * kpad->horizonAxis.y;
|
||||
f32 offsetY = productY - kpad->horizonTangent.x * kpad->horizonAxis.y;
|
||||
offsetX *= scale;
|
||||
offsetY *= scale;
|
||||
do {
|
||||
if ((s8)object->metadata.bytes.flags == 0) {
|
||||
f32 x = object->x;
|
||||
f32 y = object->y;
|
||||
Vec2 leftPosition;
|
||||
Vec2 rightPosition;
|
||||
leftPosition.x = object->x - offsetX;
|
||||
leftPosition.y = object->y - offsetY;
|
||||
rightPosition.x = object->x + offsetX;
|
||||
rightPosition.y = object->y + offsetY;
|
||||
leftPosition.x = x - offsetX;
|
||||
leftPosition.y = y - offsetY;
|
||||
rightPosition.x = x + offsetX;
|
||||
rightPosition.y = y + offsetY;
|
||||
if (leftPosition.x <= kpad->value4F4 || leftPosition.x >= kpad->value4FC || leftPosition.y <= kpad->value4F8 || leftPosition.y >= kpad->value500) {
|
||||
if (rightPosition.x > kpad->value4F4 && rightPosition.x < kpad->value4FC && rightPosition.y > kpad->value4F8 && rightPosition.y < kpad->value500) {
|
||||
kpad->dpdState.candidates[1] = *object;
|
||||
@@ -809,7 +822,7 @@ static s8 select_1obj_first(KPADInside* kpad) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
} while (++object < kpad->dpdState.candidates);
|
||||
} while (++object < end);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -580,7 +580,7 @@ void VIInit(void)
|
||||
u16 displayConfig;
|
||||
u32 __VIDVDStopFlag_Enable_old;
|
||||
s32 format;
|
||||
u16 value;
|
||||
u32 value;
|
||||
u32 tv;
|
||||
u32 bootromTv;
|
||||
|
||||
|
||||
@@ -197,9 +197,8 @@ void AESiEncryptBlock(AESContext* context, u32* output, const u32* input) {
|
||||
|
||||
void AESiDecryptBlock(AESContext* context, u32* output, const u32* input) {
|
||||
u32 rounds=context->rounds;
|
||||
u32* key=context->keys;
|
||||
u32* key=context->keys + rounds*4;
|
||||
u32 a,b,c,d;
|
||||
key += rounds*4;
|
||||
if (context->needsTransform) {
|
||||
u32 round;
|
||||
for (round=1; round<context->rounds; ++round) {
|
||||
|
||||
@@ -68,14 +68,8 @@ void NETMD5GetDigest(NETMD5Context* context, void* digest) {
|
||||
memset(context, 0, sizeof(*context));
|
||||
}
|
||||
|
||||
static inline u32 rotateSum(u32 state, const u32* word, u32 constant, int shift) {
|
||||
// Each rotation half reads its own byte-reversed message word.
|
||||
u32 right = __lwbrx((void*)word, 0);
|
||||
u32 left = __lwbrx((void*)word, 0);
|
||||
return ((state + (constant + left)) << shift) | ((constant + (state + right)) >> (32 - shift));
|
||||
}
|
||||
|
||||
#define STEP(a, b, c, d, f, word, n) ((a) = (b) + rotateSum((a) + (f), word, *constant, n))
|
||||
#define ROTATE(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
|
||||
#define STEP(a, b, c, d, f, word, n) ((a) += (f), (a) = (b) + ROTATE(__lwbrx(0, (int)(word)) + (*constant + (a)), n))
|
||||
|
||||
static void ProcessBlock(NETMD5Context* context) {
|
||||
static u32 constants[64] = {0xD76AA478, 0xE8C7B756, 0x242070DB, 0xC1BDCEEE, 0xF57C0FAF, 0x4787C62A, 0xA8304613, 0xFD469501, 0x698098D8, 0x8B44F7AF, 0xFFFF5BB1, 0x895CD7BE, 0x6B901122, 0xFD987193, 0xA679438E, 0x49B40821, 0xF61E2562, 0xC040B340, 0x265E5A51, 0xE9B6C7AA, 0xD62F105D, 0x02441453, 0xD8A1E681, 0xE7D3FBC8, 0x21E1CDE6, 0xC33707D6, 0xF4D50D87, 0x455A14ED, 0xA9E3E905, 0xFCEFA3F8, 0x676F02D9, 0x8D2A4C8A, 0xFFFA3942, 0x8771F681, 0x6D9D6122, 0xFDE5380C, 0xA4BEEA44, 0x4BDECFA9, 0xF6BB4B60, 0xBEBFBC70, 0x289B7EC6, 0xEAA127FA, 0xD4EF3085, 0x04881D05, 0xD9D4D039, 0xE6DB99E5, 0x1FA27CF8, 0xC4AC5665, 0xF4292244, 0x432AFF97, 0xAB9423A7, 0xFC93A039, 0x655B59C3, 0x8F0CCC92, 0xFFEFF47D, 0x85845DD1, 0x6FA87E4F, 0xFE2CE6E0, 0xA3014314, 0x4E0811A1, 0xF7537E82, 0xBD3AF235, 0x2AD7D2BB, 0xEB86D391};
|
||||
@@ -89,13 +83,13 @@ static void ProcessBlock(NETMD5Context* context) {
|
||||
block = context->buffer32;
|
||||
word = block;
|
||||
constant = constants;
|
||||
for (round = 0; round < 4; ++round) {
|
||||
STEP(a,b,c,d,(b & c) | (~b & d),word++,7); ++constant;
|
||||
STEP(d,a,b,c,(a & b) | (~a & c),word++,12); ++constant;
|
||||
STEP(c,d,a,b,(d & a) | (~d & b),word++,17); ++constant;
|
||||
STEP(b,c,d,a,(c & d) | (~c & a),word++,22); ++constant;
|
||||
}
|
||||
index = indices;
|
||||
for (round = 0; round < 4; ++round) {
|
||||
STEP(a,b,c,d,(b & c) | (~b & d),word,7); ++word; ++constant;
|
||||
STEP(d,a,b,c,(a & b) | (~a & c),word,12); ++word; ++constant;
|
||||
STEP(c,d,a,b,(d & a) | (~d & b),word,17); ++word; ++constant;
|
||||
STEP(b,c,d,a,(c & d) | (~c & a),word,22); ++word; ++constant;
|
||||
}
|
||||
for (round = 0; round < 4; ++round) {
|
||||
STEP(a,b,c,d,(b & d) | (c & ~d),block + *index,5); ++index; ++constant;
|
||||
STEP(d,a,b,c,(a & c) | (b & ~c),block + *index,9); ++index; ++constant;
|
||||
|
||||
@@ -548,7 +548,7 @@ NWC24Err NWC24DumpDlTask(NWC24DlTask* dlTask) {
|
||||
|
||||
NWC24Err NWC24IterateDlTask(NWC24DlId* dlIterateId, BOOL begin) {
|
||||
DlTaskListHeader* entriesHeader;
|
||||
const NWC24Work* work;
|
||||
NWC24Work* work;
|
||||
u16 taskId;
|
||||
u16 maxTaskCount;
|
||||
DlTaskListHeader* header;
|
||||
|
||||
@@ -7441,7 +7441,8 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
|
||||
}
|
||||
|
||||
if (leftOp == vmNull || rightOp == vmNull) {
|
||||
return CHANS_VM_ERR_RESULT_TYPE;
|
||||
result = CHANS_VM_ERR_RESULT_TYPE;
|
||||
break;
|
||||
}
|
||||
|
||||
result = opFunc(vm, convTypeIdx, &pVm->accumulator, leftOp, rightOp);
|
||||
@@ -7716,27 +7717,30 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
|
||||
CHANSVmObjHdr* pAcc;
|
||||
CHANSVmExecutionCtx* ctx;
|
||||
CHANSVmModule* dbg;
|
||||
CHANSVmErr loadResult;
|
||||
opSize = 3;
|
||||
operandBuf = VmGetOperand(vm, 1, 3);
|
||||
if (operandBuf == vmNull) {
|
||||
return CHANS_VM_ERR_CODE_RANGE;
|
||||
}
|
||||
pAcc = &pVm->accumulator;
|
||||
loadResult = CHANSVmDeleteObject(vm, pAcc);
|
||||
if (loadResult == CHANS_VM_OK) {
|
||||
result = CHANSVmDeleteObject(vm, pAcc);
|
||||
if (result == CHANS_VM_OK) {
|
||||
imm16Val = VM_READ_BE_U16(operandBuf, 0);
|
||||
ctx = pVm->pActiveCtx;
|
||||
dbg = ctx->pDbg;
|
||||
if (imm16Val >= dbg->stringCount || dbg->pStringTbl[imm16Val].pStringData == vmNull) {
|
||||
loadResult = CHANS_VM_ERR_LOAD_STRING_CONST;
|
||||
} else {
|
||||
pAcc->type = CHANS_VM_OBJ_TYPE_STRING;
|
||||
pAcc->hasData = vmTrue;
|
||||
pAcc->value.wstring_v = (vmWStringObjVal*)&ctx->pDbg->pStringTbl[imm16Val];
|
||||
if (imm16Val < dbg->stringCount) {
|
||||
if (dbg->pStringTbl[imm16Val].pStringData != vmNull) {
|
||||
goto load_str_ok;
|
||||
}
|
||||
}
|
||||
}
|
||||
result = loadResult;
|
||||
result = CHANS_VM_ERR_LOAD_STRING_CONST;
|
||||
break;
|
||||
|
||||
load_str_ok:
|
||||
pAcc->type = CHANS_VM_OBJ_TYPE_STRING;
|
||||
pAcc->hasData = vmTrue;
|
||||
pAcc->value.wstring_v = (vmWStringObjVal*)&ctx->pDbg->pStringTbl[imm16Val];
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -7881,7 +7885,8 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
|
||||
computedAddr += pVm->pActiveCtx->pc + 5;
|
||||
}
|
||||
if (computedAddr < 1 || computedAddr >= pVm->pActiveCtx->pDbg->codeSize) {
|
||||
return CHANS_VM_ERR_CODE_RANGE;
|
||||
result = CHANS_VM_ERR_CODE_RANGE;
|
||||
break;
|
||||
}
|
||||
pVm->pActiveCtx->pc = computedAddr;
|
||||
opSize = 0;
|
||||
@@ -7929,7 +7934,8 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
|
||||
computedAddr += pVm->pActiveCtx->pc + 4;
|
||||
}
|
||||
if (computedAddr < 1 || computedAddr >= pVm->pActiveCtx->pDbg->codeSize) {
|
||||
return CHANS_VM_ERR_CODE_RANGE;
|
||||
result = CHANS_VM_ERR_CODE_RANGE;
|
||||
break;
|
||||
}
|
||||
pVm->pActiveCtx->pc = computedAddr;
|
||||
opSize = 0;
|
||||
@@ -7954,13 +7960,11 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
|
||||
}
|
||||
|
||||
case CHANS_VM_OP_DELETE_INDIRECT: {
|
||||
CHANSVmObjHdr* accumulator = &pVm->accumulator;
|
||||
CHANSVmErr deleteResult = CHANS_VM_ERR_DELETE_INDIRECT;
|
||||
if (accumulator->type == CHANS_VM_TYPE_INDEX_REF) {
|
||||
foundObj = VmGetArrayElement(vm, accumulator, accumulator->value.data.len, vmFalse);
|
||||
deleteResult = VmDeleteCommon(vm, foundObj);
|
||||
result = CHANS_VM_ERR_DELETE_INDIRECT;
|
||||
if (pVm->accumulator.type == CHANS_VM_TYPE_INDEX_REF) {
|
||||
foundObj = VmGetArrayElement(vm, &pVm->accumulator, *((u32*)&pVm->accumulator.value + 1), vmFalse);
|
||||
result = VmDeleteCommon(vm, foundObj);
|
||||
}
|
||||
result = deleteResult;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -1179,10 +1179,10 @@ namespace ipl {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (mState) {
|
||||
case STATE_NORMAL:
|
||||
switch (mMode) {
|
||||
case 0:
|
||||
if (mState != STATE_NORMAL || mMode != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mpFriendCache->isThere(buttonNo + mPage * BTN_MAX)) {
|
||||
return;
|
||||
}
|
||||
@@ -1240,8 +1240,6 @@ namespace ipl {
|
||||
snd::getSystem()->startSEwithPos("WIPL_SE_CH_HOLD", mDrag.mPos.x);
|
||||
|
||||
mState = STATE_DRAG;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Address::start_drag_point_event(const char* paneName, controller::Interface* con) {
|
||||
@@ -1427,7 +1425,10 @@ namespace ipl {
|
||||
|
||||
if (con->downTrg(controller::BTN_INTERACT)) {
|
||||
Button* button = static_cast<Button*>(System::getScene(SCENE_BUTTON));
|
||||
if (mState == STATE_COVER_NORMAL || mState == STATE_NORMAL) {
|
||||
if (mState != STATE_COVER_NORMAL && mState != STATE_NORMAL) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (Button::cmpButtonName(paneName, Button::BTN_EXIT) == 0) {
|
||||
MailAddressSelect* mailAddrSel = static_cast<MailAddressSelect*>(System::getScene(SCENE_MAIL_ADDRESS_SELECT));
|
||||
button->animation(Button::IDANIM_SELECT_CALENDAR_EXIT);
|
||||
@@ -1476,7 +1477,7 @@ namespace ipl {
|
||||
snd::getSystem()->startSE("WIPL_SE_FL_PAGE_DEC");
|
||||
onPreviousPage();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
// fallthrough
|
||||
}
|
||||
@@ -1782,15 +1783,13 @@ namespace ipl {
|
||||
nw4r::math::VEC3 baseTrans = mpLayout->FindPaneByName("N_base_move")->GetTranslate();
|
||||
math::VEC2 pos = System::getControllerManager()->getController(mDrag.mChan)->getDpdProjectionPos();
|
||||
nw4r::lyt::TextBox* textBox = static_cast<nw4r::lyt::TextBox*>(mpLayout->FindPaneByName("T_name_move"));
|
||||
const u16* name = mpFriendCache->getInfo(mDrag.mButton + mDrag.mPage * BTN_MAX).attr.name;
|
||||
|
||||
f32 width = 0.0f;
|
||||
if (textBox != NULL) {
|
||||
const u16* name = mpFriendCache->getInfo(mDrag.mButton + mDrag.mPage * BTN_MAX).attr.name;
|
||||
if (name != NULL) {
|
||||
textBox->GetFont()->GetWidth();
|
||||
for (; *name != 0; name++) {
|
||||
width += textBox->GetFont()->GetCharWidth(*name);
|
||||
}
|
||||
if (textBox != NULL && name != NULL) {
|
||||
textBox->GetFont()->GetWidth();
|
||||
for (; *name != 0; name++) {
|
||||
width += textBox->GetFont()->GetCharWidth(*name);
|
||||
}
|
||||
}
|
||||
width += 0.01f;
|
||||
@@ -1947,10 +1946,11 @@ namespace ipl {
|
||||
}
|
||||
|
||||
void FriendListCache::update(u32 index, const wchar_t* name, u64 fdId) {
|
||||
mInfos[index].attr.fdId = fdId;
|
||||
memset(mInfos[index].attr.name, 0, sizeof(mInfos[index].attr.name));
|
||||
wcsncpy((wchar_t*)getInfo(index).attr.name, name, 10);
|
||||
System::getNwc24Manager()->updateFriendInfo(&getInfo(index), index);
|
||||
NWC24FriendInfo* info = &mInfos[index];
|
||||
info->attr.fdId = fdId;
|
||||
memset(info->attr.name, 0, sizeof(info->attr.name));
|
||||
wcsncpy((wchar_t*)info->attr.name, name, 10);
|
||||
System::getNwc24Manager()->updateFriendInfo(info, index);
|
||||
}
|
||||
|
||||
void FriendListCache::del(u32 index) {
|
||||
|
||||
@@ -521,8 +521,7 @@ void ipl::scene::AddressEdit::create() {
|
||||
set_textbox(textPane, friendText);
|
||||
textPane = (mpCodeLayout)
|
||||
->getNW4RLyt()->GetRootPane()->FindPaneByName("T_frnd_crd_00", true);
|
||||
friendText = mString.mDisplayText;
|
||||
set_textbox(textPane, friendText);
|
||||
set_textbox(textPane, mString.mDisplayText);
|
||||
mState = 0;
|
||||
break;
|
||||
}
|
||||
@@ -2780,7 +2779,7 @@ void ipl::scene::AddressEdit::set_err_msg(wchar_t* outErrMsg, u32 outErrMsgLen,
|
||||
swprintf(nwc24ErrStr, sizeof(nwc24ErrStr) / sizeof(wchar_t), L"%06d\n", errorCode);
|
||||
wcsncat(outErrMsg, nwc24ErrStr, outErrMsgLen - wcslen(outErrMsg));
|
||||
|
||||
u32 messageId;
|
||||
u32 messageId = MESG_ERROR_NWC24_SERVER;
|
||||
switch (nwc24Err) {
|
||||
case NWC24_ERR_NETWORK:
|
||||
messageId = MESG_ERROR_NWC24_NETWORK;
|
||||
@@ -2866,7 +2865,10 @@ void ipl::scene::AddressEdit::get_friendinfo() {
|
||||
memcpy(&ipl::scene::sFriendInfo, &mpFriendCache->getInfo(mSelectedFriend),
|
||||
sizeof(ipl::scene::sFriendInfo));
|
||||
mString.setName(reinterpret_cast<const wchar_t*>(ipl::scene::sFriendInfo.attr.name));
|
||||
set_textbox(mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true), mString.mName);
|
||||
const wchar_t* name = mString.mName;
|
||||
nw4r::lyt::Pane* namePane =
|
||||
mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true);
|
||||
set_textbox(namePane, name);
|
||||
|
||||
wchar_t wiiNo[0x100];
|
||||
wchar_t email[0x102];
|
||||
@@ -2879,7 +2881,10 @@ void ipl::scene::AddressEdit::get_friendinfo() {
|
||||
ipl::utility::CharacterCode::ANSIToUTF16(email, reinterpret_cast<const u8*>(&ipl::scene::sFriendInfo.addr), 0x102);
|
||||
mString.setEMail(email);
|
||||
}
|
||||
set_textbox(mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_frnd_crd_00", true), mString.mDisplayText);
|
||||
const wchar_t* displayText = mString.mDisplayText;
|
||||
nw4r::lyt::Pane* friendCodePane =
|
||||
mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_frnd_crd_00", true);
|
||||
set_textbox(friendCodePane, displayText);
|
||||
memcpy(&mCreateID, &ipl::scene::sFriendInfo.attr.fdId, sizeof(mCreateID));
|
||||
}
|
||||
|
||||
|
||||
@@ -237,7 +237,10 @@ bool MemoryCardManager::isIconValidate(u8 slot, s16 index) {
|
||||
|
||||
bool MemoryCardManager::isBannerEnable(u8 slot, s16 index) {
|
||||
CardIcons* icons = reinterpret_cast<CardIcons*>(memorycard::getIconStateArray());
|
||||
return icons[slot][mFile[slot][index].fileNo].bannerEnable != 0;
|
||||
u32 file = mFile[slot][index].fileNo;
|
||||
memorycard::IconState* icon = &icons[slot][file];
|
||||
u8 enabled = icon->bannerEnable;
|
||||
return enabled != 0;
|
||||
}
|
||||
|
||||
void MemoryCardManager::update_icon_anm() {
|
||||
|
||||
@@ -1341,11 +1341,13 @@ namespace ipl {
|
||||
wchar_t* titleName = System::getChannelManager()->getTitleName(
|
||||
page, channelIndex, 0);
|
||||
memcpy(titleNames + *titleCount * 0x2a, titleName, 0x2a);
|
||||
++*titleCount;
|
||||
u32 nextTitleCount = *titleCount + 1;
|
||||
*titleCount = nextTitleCount;
|
||||
|
||||
if (bytes >= secondUsage[0] && blocks >= secondUsage[1]) {
|
||||
return true;
|
||||
if (bytes < secondUsage[0] || blocks < secondUsage[1]) {
|
||||
continue;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,10 +3,6 @@
|
||||
#define IPL_SDMEMORY_DIALOG_STATE_ACCESSOR
|
||||
#define IPL_SDMEMORY_COMPLETION_PCT_ACCESSOR
|
||||
|
||||
#define IPL_CHANNEL_TITLE_NOVTABLE
|
||||
#include "math/iplInterporation.h"
|
||||
#undef IPL_CHANNEL_TITLE_NOVTABLE
|
||||
|
||||
#include "scene/sdChannelTitle/iplSDChannelTitle.h"
|
||||
#include "scene/sdChannelSelect/iplSDChannelSelect.h"
|
||||
#include "system/iplSystem.h"
|
||||
@@ -1558,5 +1554,15 @@ void SDChannelTitle::startResetting() {
|
||||
snd::getSystem()->resetAllSound();
|
||||
}
|
||||
|
||||
extern "C" void iplSDChannelTitle_onTitleButtonEvent(SDTitleButtonEventHandler* handler, u32 component,
|
||||
u32 event, const controller::Interface* controller) {
|
||||
handler->onEventDerived(component, event, controller);
|
||||
}
|
||||
|
||||
extern "C" void iplSDChannelTitle_onTitlePaneEvent(SDTitlePaneEventHandler* handler, u32 component,
|
||||
u32 event, const controller::Interface* controller) {
|
||||
handler->onEvent(component, event, const_cast<controller::Interface*>(controller));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -616,17 +616,6 @@ int AOSS_Init_old(AOSSInitInput* input)
|
||||
s_accessPointList = 0;
|
||||
}
|
||||
resultCode = 0xffffffff;
|
||||
} else if (state != 0) {
|
||||
input->status = 0xf;
|
||||
if (s_accessPointConfig) {
|
||||
AOSSi_Free(s_accessPointConfig);
|
||||
s_accessPointConfig = (int *)0x0;
|
||||
}
|
||||
if (s_accessPointList) {
|
||||
AOSSi_Free(s_accessPointList);
|
||||
s_accessPointList = 0;
|
||||
}
|
||||
resultCode = 0xffffffff;
|
||||
} else {
|
||||
s_accessPointConfig = (int *)AOSSi_Alloc(0x58);
|
||||
if (s_accessPointConfig == 0) {
|
||||
@@ -812,7 +801,7 @@ perform_request:
|
||||
if (s_socketStarted == 1) {
|
||||
s_socketStarted = 0;
|
||||
requestResult = SOCleanup();
|
||||
if (0 <= requestResult) goto request_socket_cleanup_complete;
|
||||
if (-1 < requestResult) goto request_socket_cleanup_complete;
|
||||
requestResult = -1;
|
||||
}
|
||||
else {
|
||||
@@ -885,7 +874,7 @@ request_socket_cleanup_complete:
|
||||
resultCode = 0xffffffff;
|
||||
goto finish_initialization;
|
||||
}
|
||||
if ((requestResult == 0) && ((u32)*s_accessPointConfig == 1u)) break;
|
||||
if ((requestResult == 0) && (*s_accessPointConfig == 1)) break;
|
||||
remainingWait = waitIntervals.limits.response;
|
||||
for (; remainingWait != 0; remainingWait -= initialSleep) {
|
||||
if (AOSSi_cancel_flag == 1) {
|
||||
@@ -1039,9 +1028,11 @@ request_socket_cleanup_complete:
|
||||
if (0 < requestResult) goto process_received_packet;
|
||||
receivedPackets = receivedPackets + 1;
|
||||
if (receivedPackets > attemptCount) {
|
||||
if (protocolState == 0) s_errorCode = 0xf;
|
||||
else if (protocolState == 1) s_errorCode = 0x10;
|
||||
else s_errorCode = 0x11;
|
||||
switch (protocolState) {
|
||||
case 0: s_errorCode = 0xf; break;
|
||||
case 1: s_errorCode = 0x10; break;
|
||||
default: s_errorCode = 0x11; break;
|
||||
}
|
||||
protocolResult = -1;
|
||||
goto close_protocol_socket;
|
||||
}
|
||||
@@ -1229,7 +1220,7 @@ wait_for_packet:
|
||||
resultCode = 0xffffffff;
|
||||
goto finish_initialization;
|
||||
}
|
||||
if ((state == 0) && ((u32)*s_accessPointConfig == 1u)) break;
|
||||
if ((state == 0) && (*s_accessPointConfig == 1)) break;
|
||||
remainingWait = waitIntervals.limits.response;
|
||||
for (; remainingWait != 0; remainingWait -= initialSleep) {
|
||||
if (AOSSi_cancel_flag == 1) {
|
||||
@@ -1308,9 +1299,11 @@ wait_for_packet:
|
||||
}
|
||||
protocolState = requestResult;
|
||||
if (receivedPackets > waitSettings.halfwords.high) {
|
||||
if (requestResult == 0) s_errorCode = 0xf;
|
||||
else if (requestResult == 1) s_errorCode = 0x10;
|
||||
else s_errorCode = 0x11;
|
||||
switch (requestResult) {
|
||||
case 0: s_errorCode = 0xf; break;
|
||||
case 1: s_errorCode = 0x10; break;
|
||||
default: s_errorCode = 0x11; break;
|
||||
}
|
||||
protocolResult = -1;
|
||||
goto close_protocol_socket;
|
||||
}
|
||||
@@ -1329,9 +1322,10 @@ wait_for_packet:
|
||||
resultCode = 0xffffffff;
|
||||
goto finish_initialization;
|
||||
}
|
||||
AOSSi_Sleep(retryDelay > 100 ? 100 : retryDelay);
|
||||
if (retryDelay <= 100) delayStep = retryDelay;
|
||||
else delayStep = 100;
|
||||
if (retryDelay > 100) AOSSi_Sleep(100);
|
||||
else AOSSi_Sleep(retryDelay);
|
||||
if (retryDelay > 100) delayStep = 100;
|
||||
else delayStep = retryDelay;
|
||||
}
|
||||
if (AOSSi_cancel_flag == 1) {
|
||||
input->status = 0xf;
|
||||
@@ -1356,7 +1350,7 @@ close_protocol_socket:
|
||||
if (s_socketStarted == 1) {
|
||||
s_socketStarted = 0;
|
||||
state = SOCleanup();
|
||||
if (0 <= state) goto protocol_socket_cleanup_complete;
|
||||
if (-1 < state) goto protocol_socket_cleanup_complete;
|
||||
state = -1;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -1547,7 +1547,6 @@ s32 ATERMRunConfigProtocol(void) {
|
||||
break;
|
||||
case 5:
|
||||
{
|
||||
s32 messageLength;
|
||||
u8 optionIds[7] = {6, 0, 1, 2, 3, 4, 5};
|
||||
AtermRequestOption8* shortOption = (AtermRequestOption8*)gAtermRequestOptions;
|
||||
AtermRequestOption16* longOption;
|
||||
@@ -1590,14 +1589,13 @@ s32 ATERMRunConfigProtocol(void) {
|
||||
longOption++;
|
||||
}
|
||||
optionEnd = (u8*)longOption;
|
||||
messageLength = ATERMBuildEncryptedMessage((u16*)gAtermConfigurationResult.packetBuffer, 2,
|
||||
gAtermMessageLength = ATERMBuildEncryptedMessage((u16*)gAtermConfigurationResult.packetBuffer, 2,
|
||||
(u16*)response->data, optionEnd - gAtermRequestOptions + 8, NULL);
|
||||
gAtermMessageLength = messageLength;
|
||||
sendAddress.length = 8;
|
||||
sendAddress.family = 2;
|
||||
sendAddress.address = 0xFFFFFFFF;
|
||||
sendAddress.port = SOHtoNs(0xE601);
|
||||
SOSendTo(socket, gAtermConfigurationResult.packetBuffer, messageLength, 0, &sendAddress);
|
||||
SOSendTo(socket, gAtermConfigurationResult.packetBuffer, gAtermMessageLength, 0, &sendAddress);
|
||||
lastSendTime = (u32)(OSGetTime() / (__mulhwu(reciprocal, OS_BUS_CLOCK >> 2) >> 6));
|
||||
gAtermProtocolState = 6;
|
||||
break;
|
||||
@@ -1658,10 +1656,6 @@ s32 ATERMRunConfigProtocol(void) {
|
||||
(__mulhwu(reciprocal, OS_BUS_CLOCK >> 2) >> 6));
|
||||
u32 index;
|
||||
u32 digestBytes;
|
||||
u32 state0;
|
||||
u32 state1;
|
||||
u32 state2;
|
||||
u32 state3;
|
||||
memcpy(response->authentication.challenge,
|
||||
optionValue, 8);
|
||||
digestContext.bitCountHigh = 0;
|
||||
@@ -1683,26 +1677,22 @@ s32 ATERMRunConfigProtocol(void) {
|
||||
ATERMMd5Update(&digestContext, gAtermDigestFill,
|
||||
digestBytes < 56 ? 56 - digestBytes : 120 - digestBytes);
|
||||
ATERMMd5Update(&digestContext, digestLength, sizeof(digestLength));
|
||||
state0 = digestContext.state[0];
|
||||
state1 = digestContext.state[1];
|
||||
state2 = digestContext.state[2];
|
||||
state3 = digestContext.state[3];
|
||||
response->authentication.digest[0] = state0;
|
||||
response->authentication.digest[1] = state0 >> 8;
|
||||
response->authentication.digest[2] = state0 >> 16;
|
||||
response->authentication.digest[3] = state0 >> 24;
|
||||
response->authentication.digest[4] = state1;
|
||||
response->authentication.digest[5] = state1 >> 8;
|
||||
response->authentication.digest[6] = state1 >> 16;
|
||||
response->authentication.digest[7] = state1 >> 24;
|
||||
response->authentication.digest[8] = state2;
|
||||
response->authentication.digest[9] = state2 >> 8;
|
||||
response->authentication.digest[10] = state2 >> 16;
|
||||
response->authentication.digest[11] = state2 >> 24;
|
||||
response->authentication.digest[12] = state3;
|
||||
response->authentication.digest[13] = state3 >> 8;
|
||||
response->authentication.digest[14] = state3 >> 16;
|
||||
response->authentication.digest[15] = state3 >> 24;
|
||||
response->authentication.digest[0] = digestContext.state[0];
|
||||
response->authentication.digest[1] = digestContext.state[0] >> 8;
|
||||
response->authentication.digest[2] = digestContext.state[0] >> 16;
|
||||
response->authentication.digest[3] = digestContext.state[0] >> 24;
|
||||
response->authentication.digest[4] = digestContext.state[1];
|
||||
response->authentication.digest[5] = digestContext.state[1] >> 8;
|
||||
response->authentication.digest[6] = digestContext.state[1] >> 16;
|
||||
response->authentication.digest[7] = digestContext.state[1] >> 24;
|
||||
response->authentication.digest[8] = digestContext.state[2];
|
||||
response->authentication.digest[9] = digestContext.state[2] >> 8;
|
||||
response->authentication.digest[10] = digestContext.state[2] >> 16;
|
||||
response->authentication.digest[11] = digestContext.state[2] >> 24;
|
||||
response->authentication.digest[12] = digestContext.state[3];
|
||||
response->authentication.digest[13] = digestContext.state[3] >> 8;
|
||||
response->authentication.digest[14] = digestContext.state[3] >> 16;
|
||||
response->authentication.digest[15] = digestContext.state[3] >> 24;
|
||||
{
|
||||
u8* contextByte = (u8*)&digestContext;
|
||||
for (index = 0; index < sizeof(digestContext); index++) {
|
||||
@@ -1730,7 +1720,6 @@ s32 ATERMRunConfigProtocol(void) {
|
||||
{
|
||||
AtermRequestOption16* option = (AtermRequestOption16*)response->authentication.decoded.options;
|
||||
AtermSocketAddress sendAddress;
|
||||
s32 messageLength;
|
||||
memset(response->data, 0, 8);
|
||||
memset(option, 0, 4);
|
||||
option->type = SOHtoNs(0x102);
|
||||
@@ -1739,14 +1728,13 @@ s32 ATERMRunConfigProtocol(void) {
|
||||
memcpy(option->value, response->authentication.digest, 8);
|
||||
gAtermReplyLength = (u8*)(option + 1) - response->data;
|
||||
response->authentication.decoded.length = gAtermReplyLength - 8;
|
||||
messageLength = ATERMBuildEncryptedMessage((u16*)gAtermConfigurationResult.packetBuffer, 4,
|
||||
gAtermMessageLength = ATERMBuildEncryptedMessage((u16*)gAtermConfigurationResult.packetBuffer, 4,
|
||||
(u16*)response->data, gAtermReplyLength, gAtermConfigurationResult.connectionPrefix);
|
||||
gAtermMessageLength = messageLength;
|
||||
sendAddress.length = 8;
|
||||
sendAddress.family = 2;
|
||||
sendAddress.address = 0xFFFFFFFF;
|
||||
sendAddress.port = SOHtoNs(0xE601);
|
||||
SOSendTo(socket, gAtermConfigurationResult.packetBuffer, messageLength, 0, &sendAddress);
|
||||
SOSendTo(socket, gAtermConfigurationResult.packetBuffer, gAtermMessageLength, 0, &sendAddress);
|
||||
lastSendTime = (u32)(OSGetTime() / (__mulhwu(reciprocal, OS_BUS_CLOCK >> 2) >> 6));
|
||||
memset(&gScanSettings, 0, 0x254);
|
||||
gAtermProtocolState = 8;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#define IPL_SETTING_NOVTABLE
|
||||
#define IPL_SETTING_RECT_OUT_OF_LINE
|
||||
#define IPL_SETTING_IMPLEMENTATION
|
||||
#include "scene/setting/iplSetting.h"
|
||||
@@ -1510,8 +1509,7 @@ namespace ipl {
|
||||
}
|
||||
|
||||
if (mpWiiSettingFlag->smthMsgData >= 2 && mpWiiSettingFlag->smthMsgData <= 7) {
|
||||
GXRenderModeObj renderMode;
|
||||
renderMode = *System::getRenderModeObj();
|
||||
GXRenderModeObj renderMode = *System::getRenderModeObj();
|
||||
u32 left;
|
||||
u32 top;
|
||||
u32 width;
|
||||
|
||||
@@ -1362,10 +1362,12 @@ s32 CArGBAOdh::cdj_d_initializeDecompressOdh(SArCDJ_OdhMaster* master, u8* workB
|
||||
}
|
||||
|
||||
s32 CArGBAOdh::cdj_d_decompressLoop(SArCDJ_OdhMaster* master, int srcSize, int workSize) {
|
||||
int blockStride;
|
||||
int workBufferSize = workSize;
|
||||
u8 xSampling;
|
||||
u8 coefficientIndex;
|
||||
u16 blockWidth;
|
||||
int blockRowStride;
|
||||
int planeOffset;
|
||||
u32 sourceLimit = srcSize;
|
||||
int statusOrOffset;
|
||||
@@ -1378,6 +1380,8 @@ s32 CArGBAOdh::cdj_d_decompressLoop(SArCDJ_OdhMaster* master, int srcSize, int w
|
||||
blockWidth = master->blocksWide;
|
||||
blockRowSize = (u32)blockWidth * 0x38;
|
||||
rowStride = (u32)blockWidth << 3;
|
||||
blockRowStride = blockRowSize * 2;
|
||||
blockStride = (u32)blockWidth << 4;
|
||||
do {
|
||||
xSampling = master->xSampling;
|
||||
if ((xSampling == 1U) && (master->ySampling == 1U)) {
|
||||
@@ -1408,9 +1412,9 @@ s32 CArGBAOdh::cdj_d_decompressLoop(SArCDJ_OdhMaster* master, int srcSize, int w
|
||||
coefficientIndex = odh_natural_order[naturalIndex];
|
||||
master->coefficients[coefficientIndex] = master->dcCoefficients[naturalIndex];
|
||||
}
|
||||
statusOrOffset = (u32)master->blockX * 8 +
|
||||
(u32)master->blocksWide * ((u32)master->blockY << 6) +
|
||||
(u32)master->blocksHigh * ((u32)master->blocksWide << 6);
|
||||
statusOrOffset = ((u32)master->blockY << 6) * (u32)master->blocksWide +
|
||||
((u32)master->blocksHigh * ((u32)master->blocksWide << 6) +
|
||||
(u32)master->blockX * 8);
|
||||
if (statusOrOffset + blockRowSize + 8 > workBufferSize) {
|
||||
statusOrOffset = -0x7ffffffa;
|
||||
goto finishBlock;
|
||||
@@ -1450,14 +1454,14 @@ s32 CArGBAOdh::cdj_d_decompressLoop(SArCDJ_OdhMaster* master, int srcSize, int w
|
||||
}
|
||||
planeOffset = (u32)master->blockX * 0x10 +
|
||||
(u32)master->blocksWide * ((u32)master->blockY << 6) * 2;
|
||||
requiredBlockEnd = planeOffset + (blockRowSize * 2) + 8;
|
||||
requiredBlockEnd = planeOffset + blockRowStride + 8;
|
||||
if (requiredBlockEnd > workBufferSize) {
|
||||
statusOrOffset = -0x7ffffffa;
|
||||
goto finishBlock;
|
||||
}
|
||||
idct_fast
|
||||
(range_limit,master->quantizationTables,master->coefficients,master->workBuffer + planeOffset
|
||||
, ((u32)blockWidth << 4));
|
||||
,blockStride);
|
||||
statusOrOffset = huffmanDecoder
|
||||
(master->dcCoefficients, &master->luminanceRequest, (u16**)hufftreePtr.tables, 0, sourceLimit);
|
||||
master->chrominanceRequest.bitstream = master->luminanceRequest.bitstream;
|
||||
@@ -1473,7 +1477,7 @@ s32 CArGBAOdh::cdj_d_decompressLoop(SArCDJ_OdhMaster* master, int srcSize, int w
|
||||
}
|
||||
idct_fast
|
||||
(range_limit,master->quantizationTables,master->coefficients,
|
||||
(u8*)((u32)planeOffset + (u32)master->workBuffer) + 8, ((u32)blockWidth << 4));
|
||||
planeOffset + master->workBuffer + 8,blockStride);
|
||||
statusOrOffset = huffmanDecoder
|
||||
(master->dcCoefficients, &master->chrominanceRequest, (u16**)(hufftreePtr.tables + 2), 1, sourceLimit);
|
||||
if (statusOrOffset != 0) return statusOrOffset;
|
||||
@@ -1539,7 +1543,7 @@ s32 CArGBAOdh::cdj_d_decompressLoop(SArCDJ_OdhMaster* master, int srcSize, int w
|
||||
coefficientIndex = odh_natural_order[naturalIndex];
|
||||
master->coefficients[coefficientIndex] = master->dcCoefficients[naturalIndex];
|
||||
}
|
||||
planeOffset += (u32)master->blocksWide << 6;
|
||||
planeOffset = planeOffset + (u32)master->blocksWide * 0x40;
|
||||
if (planeOffset + blockRowSize + 8 > workBufferSize) {
|
||||
statusOrOffset = -0x7ffffffa;
|
||||
goto finishBlock;
|
||||
@@ -1596,14 +1600,14 @@ s32 CArGBAOdh::cdj_d_decompressLoop(SArCDJ_OdhMaster* master, int srcSize, int w
|
||||
}
|
||||
planeOffset = (u32)master->blockX * 0x10 +
|
||||
(u32)master->blocksWide * ((u32)master->blockY << 6) * 4;
|
||||
requiredBlockEnd = planeOffset + (blockRowSize * 2) + 8;
|
||||
requiredBlockEnd = planeOffset + blockRowStride + 8;
|
||||
if (requiredBlockEnd > workBufferSize) {
|
||||
statusOrOffset = -0x7ffffffa;
|
||||
goto finishBlock;
|
||||
}
|
||||
idct_fast
|
||||
(range_limit,master->quantizationTables,master->coefficients,master->workBuffer + planeOffset
|
||||
, ((u32)blockWidth << 4));
|
||||
,blockStride);
|
||||
statusOrOffset = huffmanDecoder
|
||||
(master->dcCoefficients, &master->luminanceRequest, (u16**)hufftreePtr.tables, 0, sourceLimit);
|
||||
if (statusOrOffset != 0) return statusOrOffset;
|
||||
@@ -1614,13 +1618,13 @@ s32 CArGBAOdh::cdj_d_decompressLoop(SArCDJ_OdhMaster* master, int srcSize, int w
|
||||
}
|
||||
int nextOffset = planeOffset + 8;
|
||||
planeOffset = nextOffset;
|
||||
if (nextOffset + (blockRowSize * 2) + 8 > workBufferSize) {
|
||||
if (nextOffset + blockRowStride + 8 > workBufferSize) {
|
||||
statusOrOffset = -0x7ffffffa;
|
||||
goto finishBlock;
|
||||
}
|
||||
idct_fast
|
||||
(range_limit,master->quantizationTables,master->coefficients,master->workBuffer + nextOffset
|
||||
, ((u32)blockWidth << 4));
|
||||
,blockStride);
|
||||
statusOrOffset = huffmanDecoder
|
||||
(master->dcCoefficients, &master->luminanceRequest, (u16**)hufftreePtr.tables, 0, sourceLimit);
|
||||
if (statusOrOffset != 0) return statusOrOffset;
|
||||
@@ -1629,16 +1633,15 @@ s32 CArGBAOdh::cdj_d_decompressLoop(SArCDJ_OdhMaster* master, int srcSize, int w
|
||||
coefficientIndex = odh_natural_order[naturalIndex];
|
||||
master->coefficients[coefficientIndex] = master->dcCoefficients[naturalIndex];
|
||||
}
|
||||
// Store the updated plane in requiredBlockEnd so MWCC keeps it in r15.
|
||||
requiredBlockEnd = planeOffset + (u32)master->blocksWide * 0x80 + -8;
|
||||
planeOffset = requiredBlockEnd + (blockRowSize * 2) + 8;
|
||||
if (planeOffset > workBufferSize) {
|
||||
planeOffset = planeOffset + (u32)master->blocksWide * 0x80 + -8;
|
||||
requiredBlockEnd = planeOffset + blockRowStride + 8;
|
||||
if (requiredBlockEnd > workBufferSize) {
|
||||
statusOrOffset = -0x7ffffffa;
|
||||
goto finishBlock;
|
||||
}
|
||||
idct_fast
|
||||
(range_limit,master->quantizationTables,master->coefficients,master->workBuffer + requiredBlockEnd
|
||||
, ((u32)blockWidth << 4));
|
||||
(range_limit,master->quantizationTables,master->coefficients,master->workBuffer + planeOffset
|
||||
,blockStride);
|
||||
statusOrOffset = huffmanDecoder
|
||||
(master->dcCoefficients, &master->luminanceRequest, (u16**)hufftreePtr.tables, 0, sourceLimit);
|
||||
master->chrominanceRequest.bitstream = master->luminanceRequest.bitstream;
|
||||
@@ -1648,13 +1651,13 @@ s32 CArGBAOdh::cdj_d_decompressLoop(SArCDJ_OdhMaster* master, int srcSize, int w
|
||||
coefficientIndex = odh_natural_order[naturalIndex];
|
||||
master->coefficients[coefficientIndex] = master->dcCoefficients[naturalIndex];
|
||||
}
|
||||
if (planeOffset + 8 > workBufferSize) {
|
||||
if (requiredBlockEnd + 8 > workBufferSize) {
|
||||
statusOrOffset = -0x7ffffffa;
|
||||
goto finishBlock;
|
||||
}
|
||||
idct_fast
|
||||
(range_limit,master->quantizationTables,master->coefficients,
|
||||
(u8*)((u32)requiredBlockEnd + (u32)master->workBuffer) + 8, ((u32)blockWidth << 4));
|
||||
planeOffset + master->workBuffer + 8,blockStride);
|
||||
statusOrOffset = huffmanDecoder
|
||||
(master->dcCoefficients, &master->chrominanceRequest, (u16**)(hufftreePtr.tables + 2), 1, sourceLimit);
|
||||
if (statusOrOffset != 0) return statusOrOffset;
|
||||
@@ -1693,9 +1696,9 @@ s32 CArGBAOdh::cdj_d_decompressLoop(SArCDJ_OdhMaster* master, int srcSize, int w
|
||||
(range_limit,master->quantizationTables + 64,master->coefficients,master->workBuffer + statusOrOffset,
|
||||
rowStride);
|
||||
}
|
||||
int nextBlockX = master->blockX + 1;
|
||||
master->blockX = nextBlockX;
|
||||
if ((u16)nextBlockX == master->blocksWide) {
|
||||
blockX = master->blockX + 1;
|
||||
master->blockX = blockX;
|
||||
if (blockX == master->blocksWide) {
|
||||
master->blockX = 0;
|
||||
master->blockY = master->blockY + 1;
|
||||
}
|
||||
|
||||
@@ -884,180 +884,172 @@ namespace ipl {
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline void verifySavedataZD(EGG::Heap* heap, ESTitleId titleId, NANDFileInfo* fileInfo) {
|
||||
char path[NAND_MAX_PATH];
|
||||
s32 ret;
|
||||
u8* saveData = NULL;
|
||||
BOOL fileOpen = FALSE;
|
||||
BOOL deleteSaveData = FALSE;
|
||||
|
||||
sprintf(path, "/title/%08x/%08x/data/%s", (u32)((titleId & 0x00FFFFFFFFFFFFFFULL) >> 32), (u32)(titleId & 0x00FFFFFFFFFFFFFFULL), "zeldaTp.dat");
|
||||
if (!ESMisc::ChangeUid(titleId)) {
|
||||
OSReport("%s::%s: ChangeUid failed\n", __FILE__, __FUNCTION__);
|
||||
ESMisc::DeleteTitle(heap, titleId);
|
||||
} else {
|
||||
ret = NANDPrivateOpen(path, fileInfo, NAND_ACCESS_READ);
|
||||
if (ret == NAND_RESULT_NOEXISTS) {
|
||||
OSReport("%s::%s: Does not exist %s: %d\n", __FILE__, __FUNCTION__, path, ret);
|
||||
} else if (ret != NAND_RESULT_OK) {
|
||||
OSReport("%s::%s: Open save data file failed: %d\n", __FILE__, __FUNCTION__, ret);
|
||||
} else {
|
||||
fileOpen = TRUE;
|
||||
saveData = (u8*)heap->alloc(0x4000, -DEFAULT_ALIGN);
|
||||
if (saveData == NULL) {
|
||||
OSReport("%s::%s: Alloc failed: %d\n", __FILE__, __FUNCTION__, -2);
|
||||
} else {
|
||||
memset(saveData, 0, 0x4000);
|
||||
ret = NANDRead(fileInfo, saveData, 0x4000);
|
||||
if (ret < 0) {
|
||||
OSReport("%s::%s: Read file failed: %d\n", __FILE__, __FUNCTION__, ret);
|
||||
goto cleanup;
|
||||
} else if (ret != 0x4000) {
|
||||
OSReport("%s::%s: File size is not correct: %d\n", __FILE__, __FUNCTION__, ret);
|
||||
deleteSaveData = TRUE;
|
||||
} else {
|
||||
u32 offset = 8;
|
||||
u32 j = 0;
|
||||
BOOL valid = FALSE;
|
||||
while (j < 3) {
|
||||
u8* block = saveData + offset;
|
||||
if (!checkForNullTermination((char*)block + 0x4e, 8) ||
|
||||
!checkForNullTermination((char*)block + 0x58, 8) ||
|
||||
!checkForNullTermination((char*)block + 0x72, 8) ||
|
||||
!checkForNullTermination((char*)block + 0x8e, 8) ||
|
||||
!checkForNullTermination((char*)block + 0x1b4, 0x11) ||
|
||||
!checkForNullTermination((char*)block + 0x1c5, 0x11)) {
|
||||
goto verify_failed;
|
||||
}
|
||||
j++;
|
||||
offset += 0xa94;
|
||||
}
|
||||
|
||||
offset = 0x2008;
|
||||
j = 0;
|
||||
while (j < 3) {
|
||||
u8* block = saveData + offset;
|
||||
if (!checkForNullTermination((char*)block + 0x4e, 8) ||
|
||||
!checkForNullTermination((char*)block + 0x58, 8) ||
|
||||
!checkForNullTermination((char*)block + 0x72, 8) ||
|
||||
!checkForNullTermination((char*)block + 0x8e, 8) ||
|
||||
!checkForNullTermination((char*)block + 0x1b4, 0x11) ||
|
||||
!checkForNullTermination((char*)block + 0x1c5, 0x11)) {
|
||||
goto verify_failed;
|
||||
}
|
||||
j++;
|
||||
offset += 0xa94;
|
||||
}
|
||||
valid = TRUE;
|
||||
|
||||
verify_failed:
|
||||
|
||||
if (!valid) {
|
||||
OSReport("%s::%s: Verify failed for %016llx\n", __FILE__, __FUNCTION__,
|
||||
titleId);
|
||||
deleteSaveData = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
NANDClose(fileInfo);
|
||||
fileOpen = FALSE;
|
||||
if (deleteSaveData) {
|
||||
ESMisc::DeleteSavedata(titleId, heap);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cleanup:
|
||||
if (saveData != NULL) {
|
||||
heap->free(saveData);
|
||||
}
|
||||
if (fileOpen) {
|
||||
NANDClose(fileInfo);
|
||||
}
|
||||
ESMisc::ChangeUid(SYSMENU_TITLE_ID);
|
||||
}
|
||||
|
||||
static inline void DeleteTicketsForce(EGG::Heap* heap, ESTitleId titleId, u8* ticketViews, u32* ticketViewCount) {
|
||||
ESTicketView* ticketViewList = NULL;
|
||||
s32 ret;
|
||||
memset(ticketViews, 0, OSRoundUp32B(sizeof(ESTicketView)));
|
||||
ret = ES_GetTicketViews(titleId, NULL, ticketViewCount);
|
||||
if (ret != ES_ERR_OK) {
|
||||
OSReport("%s::%s: ES_GetTicketViews failed: %d for %016llx\n", __FILE__, __FUNCTION__, ret, titleId);
|
||||
} else if (*ticketViewCount != 0) {
|
||||
ticketViewList = (ESTicketView*)heap->alloc(*ticketViewCount * OSRoundUp32B(sizeof(ESTicketView)), -DEFAULT_ALIGN);
|
||||
ret = ES_GetTicketViews(titleId, ticketViewList, ticketViewCount);
|
||||
if (ret != ES_ERR_OK) {
|
||||
OSReport("%s::%s: ES_GetTicketViews failed: %d for %016llx\n", __FILE__, __FUNCTION__, ret, titleId);
|
||||
} else {
|
||||
for (u32 j = 0; j < *ticketViewCount; j++) {
|
||||
memcpy(ticketViews, (u8*)ticketViewList + j * sizeof(ESTicketView), sizeof(ESTicketView));
|
||||
ret = ES_DeleteTicket((ESTicketView*)ticketViews);
|
||||
if (ret != ES_ERR_OK) {
|
||||
OSReport("%s::%s: ES_DeleteTicket failed: %d for %016llx\n", __FILE__, __FUNCTION__, ret,
|
||||
((ESTicketView*)ticketViews)->ticketId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ticketViewList != NULL) {
|
||||
heap->free(ticketViewList);
|
||||
}
|
||||
}
|
||||
|
||||
static inline s32 InitSavedata(EGG::Heap* heap) {
|
||||
u8 ticketViews[OSRoundUp32B(sizeof(ESTicketView))] ALIGN32;
|
||||
NANDFileInfo fileInfo ALIGN32;
|
||||
u32 ticketViewCount;
|
||||
ESTitleId* titleIds = NULL;
|
||||
void ESMisc::DeleteUnauthorizedData(EGG::Heap* heap) {
|
||||
u32 titleCount = 0;
|
||||
ESTitleId* titleIds = NULL;
|
||||
char path[88];
|
||||
NANDFileInfo fileInfo ALIGN32;
|
||||
u8 ticketViews[0xe0] ALIGN32;
|
||||
u32 ticketViewCount;
|
||||
ESTicketView* ticketViewList;
|
||||
s32 ret = ES_ListTitlesOnCard(NULL, &titleCount);
|
||||
|
||||
if (ret != ES_ERR_OK) {
|
||||
OSReport("%s::%s: Failed to ES_ListTitlesOnCard1: %d\n", __FILE__, __FUNCTION__, ret);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
titleIds = (ESTitleId*)heap->alloc(OSRoundUp32B(titleCount * sizeof(ESTitleId)), -DEFAULT_ALIGN);
|
||||
if (ret == ES_ERR_OK) {
|
||||
titleIds = (ESTitleId*)heap->alloc(OSRoundUp32B(titleCount * sizeof(ESTitleId)), -DEFAULT_ALIGN);
|
||||
if (titleIds == NULL) {
|
||||
OSReport("%s::%s: Unable to allocate\n", __FILE__, __FUNCTION__);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret = ES_ListTitlesOnCard(titleIds, &titleCount);
|
||||
if (ret != ES_ERR_OK) {
|
||||
OSReport("%s::%s: Failed to ES_ListTitlesOnCard2: %d\n", __FILE__, __FUNCTION__, ret);
|
||||
goto cleanup;
|
||||
}
|
||||
OSReport("%s::%s: Unable to allocate\n", __FILE__, "InitSavedata");
|
||||
} else {
|
||||
ret = ES_ListTitlesOnCard(titleIds, &titleCount);
|
||||
if (ret == ES_ERR_OK) {
|
||||
|
||||
u32 titleIdOffset = 0;
|
||||
for (u32 i = 0; i < titleCount; i++) {
|
||||
if ((titleIds[i] & 0xFFFFFFFFFFFFFF00ULL) == 0x00010000525A4400ULL) {
|
||||
verifySavedataZD(heap, titleIds[i], &fileInfo);
|
||||
u32 titleIdHi = *(u32*)((u8*)titleIds + titleIdOffset);
|
||||
u32 titleIdLo = *(u32*)((u8*)titleIds + titleIdOffset + 4);
|
||||
|
||||
if ((titleIdLo & 0xffffff00) == 0x525a4400 && titleIdHi == 0x10000) {
|
||||
u8* saveData = NULL;
|
||||
BOOL fileOpen = FALSE;
|
||||
BOOL deleteSaveData = FALSE;
|
||||
|
||||
sprintf(path - 8, "/title/%08x/%08x/data/%s", titleIdHi & 0xffffff, titleIdLo, "zeldaTp.dat");
|
||||
if (!ChangeUid(((ESTitleId)titleIdHi << 32) | titleIdLo)) {
|
||||
OSReport("%s::%s: ChangeUid failed\n", __FILE__, "verifySavedataZD");
|
||||
DeleteTitle(heap, ((ESTitleId)titleIdHi << 32) | titleIdLo);
|
||||
} else {
|
||||
ret = NANDPrivateOpen(path - 8, (NANDFileInfo*)((u8*)&fileInfo - 0x20), NAND_ACCESS_READ);
|
||||
if (ret == NAND_RESULT_NOEXISTS) {
|
||||
OSReport("%s::%s: Does not exist %s: %d\n", __FILE__, "verifySavedataZD", path - 8, ret);
|
||||
} else if (ret != NAND_RESULT_OK) {
|
||||
OSReport("%s::%s: Open save data file failed: %d\n", __FILE__, "verifySavedataZD", ret);
|
||||
} else {
|
||||
fileOpen = TRUE;
|
||||
saveData = (u8*)heap->alloc(0x4000, -DEFAULT_ALIGN);
|
||||
if (saveData == NULL) {
|
||||
OSReport("%s::%s: Alloc failed: %d\n", __FILE__, "verifySavedataZD", -2);
|
||||
} else {
|
||||
memset(saveData, 0, 0x4000);
|
||||
ret = NANDRead((NANDFileInfo*)((u8*)&fileInfo - 0x20), saveData, 0x4000);
|
||||
if (ret < 0) {
|
||||
OSReport("%s::%s: Read file failed: %d\n", __FILE__, "verifySavedataZD", ret);
|
||||
} else if (ret != 0x4000) {
|
||||
OSReport("%s::%s: File size is not correct: %d\n", __FILE__, "verifySavedataZD", ret);
|
||||
deleteSaveData = TRUE;
|
||||
} else {
|
||||
u32 offset = 8;
|
||||
u32 j = 0;
|
||||
BOOL valid = FALSE;
|
||||
while (j < 3) {
|
||||
u8* block = saveData + offset;
|
||||
if (!checkForNullTermination((char*)block + 0x4e, 8) ||
|
||||
!checkForNullTermination((char*)block + 0x58, 8) ||
|
||||
!checkForNullTermination((char*)block + 0x72, 8) ||
|
||||
!checkForNullTermination((char*)block + 0x8e, 8) ||
|
||||
!checkForNullTermination((char*)block + 0x1b4, 0x11) ||
|
||||
!checkForNullTermination((char*)block + 0x1c5, 0x11)) {
|
||||
goto verify_failed;
|
||||
}
|
||||
j++;
|
||||
offset += 0xa94;
|
||||
}
|
||||
|
||||
offset = 0x2008;
|
||||
j = 0;
|
||||
while (j < 3) {
|
||||
u8* block = saveData + offset;
|
||||
if (!checkForNullTermination((char*)block + 0x4e, 8) ||
|
||||
!checkForNullTermination((char*)block + 0x58, 8) ||
|
||||
!checkForNullTermination((char*)block + 0x72, 8) ||
|
||||
!checkForNullTermination((char*)block + 0x8e, 8) ||
|
||||
!checkForNullTermination((char*)block + 0x1b4, 0x11) ||
|
||||
!checkForNullTermination((char*)block + 0x1c5, 0x11)) {
|
||||
goto verify_failed;
|
||||
}
|
||||
j++;
|
||||
offset += 0xa94;
|
||||
}
|
||||
valid = TRUE;
|
||||
|
||||
verify_failed:
|
||||
|
||||
if (!valid) {
|
||||
OSReport("%s::%s: Verify failed for %016llx\n", __FILE__, "verifySavedataZD",
|
||||
((ESTitleId)titleIdHi << 32) | titleIdLo);
|
||||
deleteSaveData = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
NANDClose((NANDFileInfo*)((u8*)&fileInfo - 0x20));
|
||||
fileOpen = FALSE;
|
||||
if (deleteSaveData) {
|
||||
DeleteSavedata(((ESTitleId)titleIdHi << 32) | titleIdLo, heap);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (saveData != NULL) {
|
||||
heap->free(saveData);
|
||||
}
|
||||
if (fileOpen) {
|
||||
NANDClose((NANDFileInfo*)((u8*)&fileInfo - 0x20));
|
||||
}
|
||||
ChangeUid(SYSMENU_TITLE_ID);
|
||||
continue;
|
||||
}
|
||||
switch (titleIds[i]) {
|
||||
case 0x0001000844495343ULL:
|
||||
case 0x000100014A4F4449ULL:
|
||||
case 0x0001000148415858ULL:
|
||||
case 0x0001000844564458ULL:
|
||||
case 0x000100084449534BULL:
|
||||
ES_DeleteTitle(titleIds[i]);
|
||||
DeleteTicketsForce(heap, titleIds[i], ticketViews, &ticketViewCount);
|
||||
break;
|
||||
if ((((ESTitleId)titleIdHi << 32) | titleIdLo) == 0x0001000844495343ULL ||
|
||||
((((ESTitleId)titleIdHi << 32) | titleIdLo) < 0x0001000844495343ULL &&
|
||||
((((ESTitleId)titleIdHi << 32) | titleIdLo) == 0x000100014a4f4449ULL ||
|
||||
((((ESTitleId)titleIdHi << 32) | titleIdLo) > 0x000100014a4f4449ULL &&
|
||||
(((ESTitleId)titleIdHi << 32) | titleIdLo) == 0x0001000148415858ULL))) ||
|
||||
((((ESTitleId)titleIdHi << 32) | titleIdLo) > 0x0001000844495343ULL &&
|
||||
((((ESTitleId)titleIdHi << 32) | titleIdLo) == 0x0001000844564458ULL ||
|
||||
((((ESTitleId)titleIdHi << 32) | titleIdLo) > 0x0001000844564458ULL &&
|
||||
(((ESTitleId)titleIdHi << 32) | titleIdLo) == 0x000100084449534bULL)))) {
|
||||
ESTitleId titleId = *(ESTitleId*)((u8*)titleIds + titleIdOffset);
|
||||
ES_DeleteTitle(titleId);
|
||||
|
||||
ticketViewList = NULL;
|
||||
memset(ticketViews, 0, sizeof(ticketViews));
|
||||
ret = ES_GetTicketViews(titleId, NULL, &ticketViewCount);
|
||||
if (ret != ES_ERR_OK) {
|
||||
OSReport("%s::%s: ES_GetTicketViews failed: %d for %016llx\n", __FILE__, "DeleteTicketsForce", ret, titleId);
|
||||
} else if (ticketViewCount != 0) {
|
||||
ticketViewList = (ESTicketView*)heap->alloc(ticketViewCount * 0xe0, -DEFAULT_ALIGN);
|
||||
ret = ES_GetTicketViews(titleId, ticketViewList, &ticketViewCount);
|
||||
if (ret != ES_ERR_OK) {
|
||||
OSReport("%s::%s: ES_GetTicketViews failed: %d for %016llx\n", __FILE__, "DeleteTicketsForce", ret, titleId);
|
||||
} else {
|
||||
for (u32 j = 0; j < ticketViewCount; j++) {
|
||||
memcpy(ticketViews, (u8*)ticketViewList + j * sizeof(ESTicketView), 0xd8);
|
||||
ret = ES_DeleteTicket((ESTicketView*)ticketViews);
|
||||
if (ret != ES_ERR_OK) {
|
||||
OSReport("%s::%s: ES_DeleteTicket failed: %d for %016llx\n", __FILE__, "DeleteTicketsForce", ret,
|
||||
((ESTicketView*)ticketViews)->ticketId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ticketViewList != NULL) {
|
||||
heap->free(ticketViewList);
|
||||
}
|
||||
}
|
||||
titleIdOffset += 8;
|
||||
}
|
||||
|
||||
} else {
|
||||
OSReport("%s::%s: Failed to ES_ListTitlesOnCard2: %d\n", __FILE__, "InitSavedata", ret);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
OSReport("%s::%s: Failed to ES_ListTitlesOnCard1: %d\n", __FILE__, "InitSavedata", ret);
|
||||
}
|
||||
|
||||
cleanup:
|
||||
if (titleIds != NULL) {
|
||||
heap->free(titleIds);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 ESMisc::DeleteUnauthorizedData(EGG::Heap* heap) {
|
||||
return InitSavedata(heap);
|
||||
return;
|
||||
}
|
||||
|
||||
BOOL checkForNullTermination(char* str, u32 len) {
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
# CHANSVm load-constant error preservation
|
||||
|
||||
Baseline: 449529d92405f8f7fda610660c7794914a81dfe6. Scope: CHANSVm.c only; no linking classifications or headers changed.
|
||||
|
||||
## Retained correction
|
||||
|
||||
LOAD_STRING_CONST must preserve a failure from CHANSVmDeleteObject. The original object tests the deletion return and branches directly to the local result merge when it is nonzero. The load-string error is selected only after deletion succeeds and the constant index is out of range or has no string payload. The prior C instead overwrote every deletion error with CHANS_VM_ERR_LOAD_STRING_CONST.
|
||||
|
||||
A native destructor that returns false is a concrete error-producing path through CHANSVmDeleteObject; this distinction is observable, not merely a compiler-scheduling preference.
|
||||
|
||||
The new local loadResult preserves that error, keeps constant validation and installation inside the successful-deletion block, and merges the result afterward. Target and rebuilt blocks have the same instruction count and control-flow destinations; remaining operand differences are registers. No strings, data layout, or generated jump-table destinations changed.
|
||||
|
||||
## Measurements
|
||||
|
||||
- All 233 target functions have compiled C implementations; this is not a claim that all are exact or independently behavior-proven.
|
||||
- Instruction-exact functions: 221/233 -> 221/233; every objdiff-exact function also passes ctxdiff.
|
||||
- Unit decompiled/fuzzy: 99.364426% -> 99.383840%.
|
||||
- Exact code: 37608/53564 bytes -> 37608/53564 bytes (70.211334%).
|
||||
- Exact data: 6904/6904 bytes -> 6904/6904 bytes (100%).
|
||||
- CHANSVmStep: 96.466080% -> 96.673584%; 1253/1253 instructions; ctxdiff differing positions 314 -> 297.
|
||||
- Per-function score regressions relative to the fresh baseline report: zero.
|
||||
- The unit remains NonMatching/unlinked; no link flags were changed.
|
||||
|
||||
## Attempts
|
||||
|
||||
1. Read previous round/wave logs and recent local trials; establish live baseline and run pool_diff first: 125 strings identical.
|
||||
2. Replace the load-string shared error/goto path with a typed local error result and successful-deletion-only constant validation. Retained: correct error behavior, higher fuzzy score, unchanged exact code/data.
|
||||
3. Separately tried consolidating GET_PROPERTY_NAME's local found flag and removing two unused array-index assignments. Rejected and restored completely: Step shrank to 1249 instructions and data dropped to 2232/6904. This unrelated trial is absent from the final source.
|
||||
|
||||
## Validation
|
||||
|
||||
- Full 43U build passed with the assigned wibo wrapper and WIBO_SJIS_MISSING_IMPORTS=1.
|
||||
- DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d.
|
||||
- pool_diff: 125/125 identical strings.
|
||||
- .data: 4672/4672 bytes identical; all 352 canonical relocations identical.
|
||||
- .rodata: 1432/1432 bytes identical; all 258 canonical relocations identical.
|
||||
- All 233 functions compared with ctxdiff/odiff: 221 exact; no falsely exact objdiff functions.
|
||||
- git diff --check passed.
|
||||
- Source-extracted host C harness passed six load-constant cases: missing operand; deletion failure with valid index; deletion failure with invalid index; invalid index after successful deletion; null payload; successful installation. The harness stubs surrounding VM dependencies and checks C behavior only; no Wii runtime execution is claimed.
|
||||
|
||||
Source is paused after this focused candidate for parent review. The remaining 12 functions are still non-exact.
|
||||
@@ -1,49 +0,0 @@
|
||||
# CHANSVm opcode error-path reconstruction
|
||||
|
||||
Baseline: 2f399716. This is a separate structural-reconstruction candidate; it preserves the preceding LOAD_STRING_CONST behavior fix. Only CHANSVm.c changed apart from this log. No headers, linking flags, remote branches, or original assets were changed.
|
||||
|
||||
## Retained changes and target evidence
|
||||
|
||||
- Failed binary-operand conversion returns CHANS_VM_ERR_RESULT_TYPE directly. Target Step relative +0x410 selects the error and +0x414 returns through +0x1364.
|
||||
- Invalid GET_PROPERTY_NAME and JUMP destinations return CHANS_VM_ERR_CODE_RANGE directly. Target error tails are +0xd90/+0xd94 and +0xefc/+0xf00, respectively, both ending at +0x1364.
|
||||
- DELETE_INDIRECT has a typed accumulator and a local deletion result, and reads the index through value.data.len rather than an offset-based u32 pointer cast. SET_INDEX elsewhere in the same function establishes this field as the index-reference index. The target holds the opcode-local result until the merge at +0xfb0, then assigns the common interpreter status. The rebuilt +0xf80 through +0xfb4 block is instruction-identical to the target.
|
||||
|
||||
These preserve existing C behavior. Unlike the preceding deletion-error fix, no new behavioral defect is claimed.
|
||||
|
||||
## Measurements
|
||||
|
||||
- Exact functions: 221/233 -> 221/233. Every previously exact function remains instruction-exact, not merely objdiff-exact.
|
||||
- Decompiled/fuzzy unit: 99.383840% -> 99.406320%.
|
||||
- CHANSVmStep: 96.673584% -> 96.913800%; 1253/1253 instructions; differing positions 297 -> 285.
|
||||
- Exact code: unchanged, 37608/53564 bytes (70.211334%).
|
||||
- Exact data: unchanged, 6904/6904 bytes (100%).
|
||||
- Per-function score regressions: zero.
|
||||
- Unit remains NonMatching/unlinked; twelve functions remain non-exact.
|
||||
|
||||
## Rejected investigations
|
||||
|
||||
All rejected source changes were restored, and no register forcing or declaration-order sweep was used.
|
||||
|
||||
- GET_PROPERTY_NAME output-state separation: a local found flag, initialized flag, shared index/output, and inline helper. These produced 1251-1253 instructions but moved generated data-table destinations; rejected.
|
||||
- Direct result-type-table accesses, an explicit zero-count normalization/pretested loop, and indexed operand-type enumeration: 1254-1257 instructions; generated data-table destinations moved; rejected.
|
||||
- Internal linkage for result-type or constant-header tables, individually and together, did not change those results; restored.
|
||||
- CASE strict-comparison result separation, case-local match state, byte-sized operand types, and indexed operand enumeration: improved some local structure but introduced an operand-type spill and 1254-1255 instructions; generated tables moved; rejected.
|
||||
- Direct exceptional returns alone: retained for combination, 96.697525%, data 100%.
|
||||
- Typed DELETE_INDIRECT and local result alone: retained for combination, 96.889860%, data 100%.
|
||||
- Combined direct returns and typed deletion result: accepted candidate, 96.913800%, data 100%.
|
||||
- A first combination script used an obsolete substring end offset and did not compile; restored, corrected, and rerun. No source from the malformed attempt remains.
|
||||
- Adding strict-comparison restructuring to the retained combination still produced 1254 instructions and data regression; rejected.
|
||||
|
||||
## Validation
|
||||
|
||||
- Full 43U build passed with the assigned wrapper and WIBO_SJIS_MISSING_IMPORTS=1.
|
||||
- DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d.
|
||||
- pool_diff: 125/125 strings identical.
|
||||
- .data: 4672/4672 raw bytes and 352/352 canonical relocations identical.
|
||||
- .rodata: 1432/1432 raw bytes and 258/258 canonical relocations identical.
|
||||
- All 233 target functions compared: 221 instruction-exact; zero falsely exact objdiff functions; zero per-function score regressions from 2f399716.
|
||||
- Narrow-string-reference audit: all 233 functions analyzed, 40 arguments checked, no candidates/errors/skips.
|
||||
- Source-extracted host C tests: four DELETE_INDIRECT cases passed (wrong type, successful deletion, deletion failure, and null element forwarding), including exact unsigned index forwarding. The six prior LOAD_STRING_CONST cases also passed unchanged. These stub surrounding VM dependencies and are not Wii runtime tests.
|
||||
- git diff --check passed.
|
||||
|
||||
The focused candidate is paused for independent parent review.
|
||||
@@ -1,78 +0,0 @@
|
||||
# AES key-schedule cursor reconstruction, 2026-10-02
|
||||
|
||||
Source baseline: `449529d9`. This separate candidate follows the frozen MD5
|
||||
commit `521056a9`; it changes only `libs/RevoEX/src/net/aes.c` and this log.
|
||||
43U only. No linking flags, configuration, tables, or public API edits.
|
||||
|
||||
## Target evidence and retained change
|
||||
|
||||
`AESiDecryptBlock` in `build/43U/obj/libs/RevoEX/src/net/aes.o` is 0x3EC bytes /
|
||||
251 instructions. Its entry first forms the key-schedule base at context+0x10
|
||||
(function-relative offset 0x18), extracts the last-round offset from the flags
|
||||
word (offset 0x24), and adds that offset to the already formed base (offset
|
||||
0x28). The baseline combined initializer produced 249 instructions. Explicitly
|
||||
initializing the typed key pointer to `context->keys` before advancing it by
|
||||
`rounds*4` recovers the target's two-stage pointer construction and body size.
|
||||
The retained change is two added source lines and one removed line. All AES
|
||||
round expressions, lazy inverse key transformation, tables and CBC chaining
|
||||
remain unchanged.
|
||||
|
||||
This is a structural matching improvement, not a newly implemented AES path.
|
||||
Both existing block algorithms were already present and pass the behavior tests.
|
||||
|
||||
## Explored and rejected alternatives
|
||||
|
||||
- Inlined single-word round helpers, byte-typed table lookups and table-rotation
|
||||
helpers changed scheduling but regressed encryption or added source complexity.
|
||||
- Staging four inverse-mix column outputs through a typed round helper improved
|
||||
decrypt similarity but required substantially more source and still did not
|
||||
match. Not retained.
|
||||
- Alternate inverse-key-transform local lifetimes and an inverse-key helper
|
||||
gave only small extra fuzzy movement, without new algorithm reconstruction.
|
||||
- Context-relative key indexing and row/word loop variants did not improve the
|
||||
minimal key-base candidate.
|
||||
- Moving next-state locals outside the round loop did not change codegen.
|
||||
- Reordering key-base declarations produced a negligible score change; the
|
||||
original natural declaration order was kept.
|
||||
- Two exploratory C89-incompatible mixed-declaration variants failed to compile
|
||||
and were immediately discarded. No failed source is retained.
|
||||
|
||||
## Verification
|
||||
|
||||
Before -> after:
|
||||
- AESiDecryptBlock: 249 -> 251 instructions against target 251;
|
||||
fuzzy 61.49004 -> 63.836655%. Final ctxdiff: 224 positional differences.
|
||||
- AESiEncryptBlock: unchanged, 158/158 instructions and 60.348103% fuzzy.
|
||||
- Unit fuzzy: 76.844475 -> 77.700584%.
|
||||
- Exact functions: 7/9 -> 7/9. Exact code: 1116/2752 bytes unchanged.
|
||||
- Data: objdiff 2800/2800, 100%, unchanged. Linked status unchanged.
|
||||
- All seven exact functions have ctxdiff diffs 0: NETAESCreateEx 108/108,
|
||||
NETAESCreate 2/2, NETAESDelete 1/1, NETAESEncrypt 46/46, NETAESDecrypt 46/46,
|
||||
NETiAESEncryptoBlock 39/39, NETiAESDecryptoBlock 37/37.
|
||||
- String pool: all four strings identical.
|
||||
- .rodata: 2592 identical bytes; .sdata2: 8 identical bytes. Source .data is
|
||||
197 bytes with the same prefix as the 200-byte target section; three target
|
||||
alignment bytes are an existing extent difference. No padding was added.
|
||||
- The full 1027-unit report has no regressions in exact functions/code/data or
|
||||
fuzzy score against the baseline report. Frozen MD5 metrics are unchanged.
|
||||
- Full 43U build passed with the configured wibo wrapper; build/43U/ok passed.
|
||||
DOL SHA1: `26116613f624061ba99c8d1a299aaa6efa85670d`.
|
||||
|
||||
Host validation: `python3 /tmp/crypto-remainder/validate_aes.py` compiles the
|
||||
production C unchanged with minimal types/OSReport shims. Input, key and IV
|
||||
words are represented with their PPC big-endian numeric values, so native host
|
||||
byte order does not change the algorithm. Known-answer tests cover AES-128,
|
||||
AES-192 and AES-256; seeded randomized CBC tests compare against cryptography's
|
||||
AES implementation for all three key sizes. Each tests separate/in-place
|
||||
buffers and single/incremental calls.
|
||||
|
||||
Result: all 2,406 production-source known-answer/randomized checks passed. The
|
||||
original baseline had independently passed the same coverage before changes.
|
||||
A separate saved helper experiment also passed but is not part of this commit.
|
||||
|
||||
Local evidence, not committed or uploaded: `/tmp/crypto-remainder/aes-final.ctx`,
|
||||
`aes-final.json`, `aes-full-build.log`, `aes-vectors.log`, `aes-decrypt.target`,
|
||||
and `validate_aes.py` plus its header shims. No retail assembly is included.
|
||||
|
||||
GATE: validated partial structural candidate; no regressions. Exact matching
|
||||
and linking remain open.
|
||||
@@ -1,89 +0,0 @@
|
||||
# eZiText remainder reconstruction, 2026-10-02
|
||||
|
||||
Base: `449529d9`; branch `agent/bittle/allhands-ezi-decompile`.
|
||||
Only 43U was configured, using `../toolchain/wibo-build/wibo` and
|
||||
`WIBO_SJIS_MISSING_IMPORTS=1 ../.venv/bin/ninja`. No linking flags, shared
|
||||
headers, remote refs, or upstream resources were changed.
|
||||
|
||||
## Baseline and first candidate: alpha engine
|
||||
|
||||
Fresh baseline report: `/tmp/ezi-baseline.json`.
|
||||
`zi8alpha`: 11/12 exact functions, 5880/21664 exact code bytes,
|
||||
516/564 exact data bytes; unit fuzzy 94.17892%.
|
||||
`Zi8AlphaGetCandidates`: 3946/3946 instructions, function fuzzy 92.01039%.
|
||||
These function and unit percentages are deliberately distinguished.
|
||||
|
||||
The scalar layout is four bytes lower in source than in the target because
|
||||
of the target's existing workspace snapshot at stack 0x20. No dummy alias,
|
||||
padding, or unused local was added to occupy that slot.
|
||||
|
||||
Six semantic corrections were established from definitions and uses, not
|
||||
from equal-looking raw offsets:
|
||||
|
||||
- The flag initialized at target stack 0x84 is the current vowel/punctuation
|
||||
restriction. At function +0x0798, the table-31 flag test for bit 4 clears
|
||||
target 0x84 and its primary-language snapshot at 0x8C. Source uses 0x80
|
||||
and 0x88 for those same definitions.
|
||||
- The different completion flag is at target 0x88. The table-31 bit-2 test
|
||||
at +0x07C8 clears target 0x88 and primary snapshot 0x90. Its source slots
|
||||
are 0x84 and 0x8C. Language-pass restoration confirms both identities.
|
||||
- Target reads of 0x84 at +0x2114, +0x2214, +0x32F4, +0x3384 and +0x3664
|
||||
gate punctuation retries, suffix activation, suffix locking and prefix
|
||||
punctuation. The source incorrectly read the completion flag in all five
|
||||
places. The candidate uses the traced current-restriction variable.
|
||||
- At +0x1430 the target loads the dictionary-order index from 0x64, uses it
|
||||
to select a byte dictionary kind, and stores that kind at 0x60. The retry
|
||||
condition at +0x3060 reads 0x64, also used by the following outer-loop
|
||||
increment. Source incorrectly tested dictionaryKind; it now tests
|
||||
dictionaryIndex. The safe existing early dictionaryIndex initialization
|
||||
was preserved.
|
||||
|
||||
The isolated six-line semantic patch is preserved at
|
||||
`/tmp/ezi-alpha-six-conditions.patch`. Alone it gives function 92.009125%,
|
||||
unit 94.17799%, with code/data/exact counts unchanged. This tiny fuzzy
|
||||
fluctuation does not invalidate the traced variable corrections.
|
||||
|
||||
The first handed-off candidate also restores the original address-order
|
||||
suffix-lock block before alternate-prefix fallback, restores positive branch
|
||||
conditions, and places each language's restriction snapshots at its actual
|
||||
control-flow position. No helper prototype change is included in this first
|
||||
candidate.
|
||||
|
||||
First-candidate fresh report: `/tmp/ezi-alpha-minimal.json`.
|
||||
`Zi8AlphaGetCandidates`: 94.47314%, 3946/3946 instructions.
|
||||
Unit fuzzy: 94.17892% -> 95.97323% (about 389 fewer weighted deficit bytes).
|
||||
Exact functions: 11/12 -> 11/12. Exact code: 5880 -> 5880 bytes.
|
||||
Exact data: 516 -> 516 bytes. All non-text section scores are unchanged.
|
||||
Both pools contain no strings and compare identical.
|
||||
|
||||
## Separate later research, not part of the first candidate
|
||||
|
||||
- Further emission/cursor/comparison/switch reconstruction reached function
|
||||
95.63913%, unit 96.82275%, 3950/3946 instructions. Existing exact functions
|
||||
remain exact, but extabindex accounting drops by 108 bytes. Preserved at
|
||||
`/tmp/ezi-alpha-deliver.c`; not included in the first candidate.
|
||||
- Matching PUD return declarations to zi8pud2.c's ziU32 definitions, with
|
||||
explicit caller byte narrowing, leaves alpha's score unchanged but moves
|
||||
one-key candidates 95.39716% -> 95.32416%. Its 5 exact functions and data
|
||||
1280/1388 remain unchanged. Held separately for ABI review.
|
||||
- Matching Chinese Zi8GetPCode to zi8match.c's ziU16 definition restores the
|
||||
two target halfword narrowings in paired-phonetic lookup. Together with the
|
||||
explicit PUD ABI correction: engine 96.27482% -> 96.492134%, unit
|
||||
96.65468% -> 96.848755%, 10678/10676 instructions, 5 exact unchanged.
|
||||
extabindex accounting drops 72 bytes. Held for section/relocation audit.
|
||||
- Splitting the Chinese component cursor/table chained assignment reproduces
|
||||
the target's intermediate reload but lowers the engine to 96.090294%;
|
||||
rejected and restored.
|
||||
- Replacing the spelling candidate-count assignment with postfix increment
|
||||
lowers spelling 99.555885% -> 96.8%; rejected and restored.
|
||||
|
||||
The larger scratch candidate's branch-destination audit found no mapped
|
||||
branch-target differences over 720 alpha, 351 one-key and 1594 Chinese
|
||||
branches. Helper-call counts are respectively 73/73, 71/71 and 168/168.
|
||||
This audit ignores register choices and accounts for the known stack shift;
|
||||
it is evidence of control-flow coverage, not a claim of exact matching.
|
||||
|
||||
First-candidate validation: full 43U build succeeds; DOL SHA1 is
|
||||
`26116613f624061ba99c8d1a299aaa6efa85670d`. Every one of the 11 baseline
|
||||
exact alpha functions has identical instruction counts and ctxdiff diffs 0.
|
||||
`git diff --check` succeeds. No new exact function or complete unit is claimed.
|
||||
@@ -1,62 +0,0 @@
|
||||
# MD5 unsigned arithmetic and cursor reconstruction, 2026-10-02
|
||||
|
||||
Separate follow-on to accepted MD5 commit `521056a9`. AES commit `2a537c14`
|
||||
and both prior logs are unchanged. Only 43U was configured or built.
|
||||
|
||||
## Target-grounded changes
|
||||
|
||||
The target ProcessBlock rotation halves retain independently grouped additions
|
||||
of the unsigned state, round constant and separately byte-reversed message
|
||||
words. Reassociating those three u32 operands inside the accepted helper brings
|
||||
the compiler's data-flow closer to the target while preserving modulo-2^32
|
||||
arithmetic. The first MD5 round consumes sequential message words; expressing
|
||||
that consumption with `word++` as the helper's pointer argument improves its
|
||||
schedule. STEP evaluates this pointer argument exactly once; the helper still
|
||||
uses that captured pointer for both byte-reversed reads. No evaluation-order
|
||||
ambiguity, extra read, undefined value, or new helper is introduced.
|
||||
|
||||
Experiments enumerated 144 valid addition operand/grouping combinations for
|
||||
the two halves. The best target-sized arithmetic expression reached 93.447716%
|
||||
ProcessBlock fuzzy. Five cursor/loop variants and eight independent cursor-
|
||||
consumption combinations then identified the minimal `word++` form, reaching
|
||||
94.30719%. A larger by-reference cursor helper reached 94.98366% but duplicated
|
||||
rotation code for a small gain and was rejected. Three explicit feed-forward
|
||||
variants did not improve the retained result. No declaration/register sweep,
|
||||
assembly, volatile qualifier, padding or linking change was used.
|
||||
|
||||
## Verification
|
||||
|
||||
Accepted MD5 -> this candidate:
|
||||
- ProcessBlock: 81.82026 -> 94.30719% fuzzy; 306/306 instructions unchanged.
|
||||
- Unit fuzzy: 87.80044 -> 96.179825%.
|
||||
- Exact functions 3/4 and exact code 600/1824 are unchanged.
|
||||
- Data 456/456 (100%) and linking status are unchanged.
|
||||
- NETMD5Init 16/16, NETMD5Update 60/60 and NETMD5GetDigest 74/74 still have
|
||||
ctxdiff diffs 0 and objdiff 100%.
|
||||
- ProcessBlock has 215 positional differences. An advisory comparison that
|
||||
ignores GPR names leaves five opcode/immediate-order differences: three
|
||||
sequential cursor offsets and two final state-load positions. This is not
|
||||
an exact match or a proof that every remaining difference is register-only.
|
||||
- Empty string pools remain identical. Constants/index tables and end-marker
|
||||
data are unchanged from the accepted candidate.
|
||||
- AES metrics and source are unchanged from commit 2a537c14.
|
||||
- Full 1027-unit report: zero exact-function/code/data/fuzzy regressions versus
|
||||
baseline449529d9; additionally both owned units preserve the immediately
|
||||
preceding candidate's exact/data scores and improve or preserve fuzzy scores.
|
||||
- Full 43U build and build/43U/ok passed. DOL SHA1:
|
||||
`26116613f624061ba99c8d1a299aaa6efa85670d`.
|
||||
|
||||
All 3,088 MD5 known-answer/random/chunking comparisons passed again against
|
||||
Python hashlib. Run `python3 /tmp/crypto-remainder/validate_md5.py`. The test
|
||||
compiles production C unchanged with PPC intrinsic shims, supplies RFC1321
|
||||
padding externally, and exercises ProcessBlock through NETMD5Update. The
|
||||
instruction-exact GetDigest platform-endian stores are not host-tested.
|
||||
|
||||
Local evidence (not committed/uploaded): `/tmp/crypto-remainder/` contains
|
||||
`md5.grouping-results.json`, `md5-grouping-final.json`,
|
||||
`md5-grouping-ProcessBlock.ctx`, `md5-grouping-vectors.log`, and
|
||||
`md5-grouping-full-build.log`. Original target evidence remains in the local
|
||||
split object and disassembly; no retail assembly is included in this commit.
|
||||
|
||||
GATE: validated partial structural candidate; no regressions. Exact matching
|
||||
and linking remain open.
|
||||
@@ -1,86 +0,0 @@
|
||||
# MD5 rotation-expression reconstruction, 2026-10-02
|
||||
|
||||
Baseline: `449529d9`, 43U only. Owned source: `libs/RevoEX/src/net/md5.c`.
|
||||
The current user priority permits validated structural/fuzzy improvements before
|
||||
exact matching and linking. This is a partial matching candidate, not an exact
|
||||
match or a linking change. AES experiments were saved outside the checkout and
|
||||
AES was restored to the baseline before this candidate was validated.
|
||||
|
||||
## Source evidence
|
||||
|
||||
- Ground truth: `build/43U/obj/libs/RevoEX/src/net/md5.o`, `ProcessBlock`.
|
||||
- The target is 0x4C8 bytes / 306 instructions, with a 0x20-byte stack frame.
|
||||
- Each of the sixteen unrolled MD5 steps contains two byte-reversed word loads.
|
||||
The first pair is at function-relative offsets 0x3C and 0x40. The right-shift
|
||||
half consumes the first value, and the left-shift half consumes the second.
|
||||
- The target retains four additions across the two rotation halves: the
|
||||
right-shift half adds the message word to (round constant + state), and the
|
||||
left-shift half adds the state to (message word + round constant). The state
|
||||
includes the round Boolean function. The first rotation uses right shift 25
|
||||
and left shift 7; the remaining shifts follow the existing MD5 round schedule.
|
||||
- The index-table address is first materialized after the first sixteen steps,
|
||||
rather than before the sequential-word round.
|
||||
- The inline helper expresses these real unsigned 32-bit operands and restores
|
||||
the target-sized body. It introduces no assembly, volatile qualifier,
|
||||
uninitialized value, fake storage, padding, or compiler-option change.
|
||||
- All four round algorithms, all 64 constants, all 48 indices, and all public
|
||||
API bodies are otherwise unchanged. The old ROTATE macro became unused and
|
||||
was removed.
|
||||
|
||||
## Attempts
|
||||
|
||||
1. Direct pointer-form byte-reversed loads and alternate ordinary arithmetic
|
||||
groupings: 274-294 instructions, at best near the starting score. Rejected.
|
||||
2. A typed inline endian-load wrapper: improved instruction similarity but
|
||||
retained 276 instructions and insufficient target operation boundaries.
|
||||
3. Rotation-expression helpers without independent load results: 288-290
|
||||
instructions, approximately 41-44% ProcessBlock fuzzy. Rejected.
|
||||
4. Explicitly named byte-reversed operands for the two rotation halves:
|
||||
306 instructions / 81.82026% fuzzy. Retained the target's first-read/right-
|
||||
shift ordering. Reversing those loads reached 82.0% but added two instructions
|
||||
and contradicted the target's operand ordering, so it was rejected.
|
||||
5. Sequential partial-sum statements and equivalent regroupings did not
|
||||
improve the retained structural form. No register-only declaration sweep.
|
||||
|
||||
## Validation
|
||||
|
||||
Command setup:
|
||||
`python3 configure.py --version 43U --wrapper ../toolchain/wibo-build/wibo`
|
||||
`WIBO_SJIS_MISSING_IMPORTS=1 ../.venv/bin/ninja`
|
||||
|
||||
- `pool_diff.py`: identical empty MD5 string pool, 0/0 strings.
|
||||
- `.data`: all 448 bytes identical. The source `.sdata` is the one-byte
|
||||
end marker (0x80); the target has the same byte followed by seven alignment
|
||||
zeros. This existing section-size difference is unchanged, and objdiff
|
||||
reports `.sdata` and unit data at 100%. No padding was added.
|
||||
- `NETMD5Init`: 16/16 instructions, ctxdiff diffs 0, objdiff 100%.
|
||||
- `NETMD5Update`: 60/60 instructions, ctxdiff diffs 0, objdiff 100%.
|
||||
- `NETMD5GetDigest`: 74/74 instructions, ctxdiff diffs 0, objdiff 100%.
|
||||
- `ProcessBlock`: 294 -> 306 instructions against target 306;
|
||||
43.290848 -> 81.82026% fuzzy. Final ctxdiff has 255 positional differences,
|
||||
primarily allocation, scheduling and remaining arithmetic grouping. Not exact.
|
||||
- MD5 unit: 61.945175 -> 87.80044% fuzzy; exact 3/4 -> 3/4;
|
||||
exact code 600/1824 unchanged; data 456/456 (100%) unchanged; unlinked unchanged.
|
||||
- Full 1027-unit report: no unit regressed in exact functions, exact code,
|
||||
exact data or fuzzy score versus the baseline report. Overall fuzzy moved
|
||||
99.588615 -> 99.60437%; exact code and linking did not change.
|
||||
- Full 43U build passed. `build/43U/ok` passed. DOL SHA1:
|
||||
`26116613f624061ba99c8d1a299aaa6efa85670d`.
|
||||
|
||||
Host algorithm validation: `/tmp/crypto-remainder/validate_md5.py` compiles the
|
||||
production source unchanged with host shims for PPC byte-reversed intrinsics.
|
||||
It verifies ProcessBlock through NETMD5Update with externally supplied RFC1321
|
||||
padding, comparing state words with Python hashlib. The host test deliberately
|
||||
does not exercise GetDigest's platform-specific big-endian length stores.
|
||||
|
||||
Result: 3,088 successful digest/chunking comparisons, covering the seven RFC1321
|
||||
example strings, one million `a` bytes, 1,500 seeded messages, lengths around
|
||||
55/56/63/64/65 and larger block boundaries, and fixed/random chunk sizes.
|
||||
Run: `python3 /tmp/crypto-remainder/validate_md5.py`.
|
||||
|
||||
Local evidence (not committed or uploaded): `/tmp/crypto-remainder/md5.target`,
|
||||
`md5-final.ctx`, `md5-final.json`, `baseline.json`, `full-build.log`, and the
|
||||
host test plus its header shim. Only source and this summary are committed.
|
||||
|
||||
GATE: partial decompilation candidate validated; no regressions; exact matching
|
||||
and linking remain open. No claim of all-100% completion.
|
||||
@@ -1,129 +0,0 @@
|
||||
# System remainder decompilation, 2026-10-02
|
||||
|
||||
Baseline: `449529d92405f8f7fda610660c7794914a81dfe6`.
|
||||
Branch: `agent/bittle/allhands-system-decompile`.
|
||||
Owned units: `src/utility/iplESMisc.cpp`, `src/scene/setting/AOSS.c`,
|
||||
`src/scene/setting/ATERM.c`. Parent additionally approved the single ESMisc
|
||||
return-type declaration change in `include/utility/iplESMisc.h`.
|
||||
|
||||
The current user priority is complete source reconstruction first, exact code
|
||||
matching second, linking last. This candidate is decompilation progress, not an
|
||||
exact match or a linking change. No configuration, symbol, split, or link flag
|
||||
was changed. AOSS and ATERM are unchanged.
|
||||
|
||||
## Initial audit
|
||||
|
||||
- Read AGENTS.md, CONTRIBUTING.md, local skill inventory, AOSS/ATERM attempt
|
||||
histories, and ESMisc rounds 9/11. The sole local skill is unrelated TypeSafe
|
||||
integration guidance.
|
||||
- Configured and built only 43U with the approved Wibo wrapper.
|
||||
- Before source work, pool_diff found ATERM 0/0 strings and AOSS 1/1 identical.
|
||||
ESMisc first diverged at string 83; both contained 114 strings.
|
||||
- ESMisc's 30 exact functions were preserved in earlier rounds, but a meaningful
|
||||
helper reconstruction had been discarded solely because it was not exact.
|
||||
Reconstructed it from the current C++ and target object, without importing an
|
||||
old experimental source or altering linker behavior.
|
||||
|
||||
## ESMisc reconstruction
|
||||
|
||||
Restored three ordinary inline boundaries named by the target's diagnostic
|
||||
literals: `verifySavedataZD`, `DeleteTicketsForce`, and `InitSavedata`.
|
||||
`ESMisc::DeleteUnauthorizedData` returns the initializer status.
|
||||
|
||||
Concrete correctness corrections:
|
||||
|
||||
1. Use a real NAND_MAX_PATH buffer and a real caller-owned, 32-byte-aligned
|
||||
NANDFileInfo. Removed the out-of-object `path - 8` and `fileInfo - 0x20`
|
||||
accesses. The caller also owns the aligned, rounded ticket-view scratch.
|
||||
2. Traverse `ESTitleId` values by typed array index, with one unconditional loop
|
||||
increment for every title. The old verifier branch continued without
|
||||
advancing its separate byte offset and could repeat the same title.
|
||||
3. Replace the handwritten nested 64-bit switch-lowering expression with the
|
||||
five actual title cases and the independently masked save-title predicate.
|
||||
4. Preserve the two ES_ListTitlesOnCard results independently of inlined file
|
||||
and ticket operation status. The public declaration now returns s32.
|
||||
5. A negative NANDRead result jumps to cleanup, which frees the save buffer
|
||||
before closing the still-open file. The old source took the success-path
|
||||
close before freeing it. Successful or invalid-size reads retain their
|
||||
close-before-delete/free path.
|
||||
6. Use sizeof(ESTicketView) for the 0xD8-byte copy and OSRoundUp32B for the 0xE0
|
||||
scratch/allocation extent, preserving the target's distinct sizes.
|
||||
|
||||
### ABI and control-flow evidence
|
||||
|
||||
Target function: address 0x813673E0, size 0x704 (449 instructions).
|
||||
At original object offsets 0x1D20 and 0x1D9C, the two enumeration return values
|
||||
are saved in r27. Calls through both verifier/ticket paths leave that saved
|
||||
value independent. At 0x23C0 it is copied to return register r3 after the
|
||||
optional title-list free. The prior void declaration discarded this ABI.
|
||||
|
||||
The only declaration is in include/utility/iplESMisc.h. The only call is
|
||||
src/system/iplSystem.cpp:680; it intentionally ignores the result. The symbol
|
||||
name is unchanged because the return type is not encoded in this member name.
|
||||
All 1027 compiled source objects were compared after a forced full rebuild;
|
||||
iplSystem and every unit except iplESMisc were byte/relocation unchanged.
|
||||
|
||||
The target's verifier branch joins the common increment at 0x238C (index +1,
|
||||
byte offset +8). Its negative-read path joins cleanup at 0x2104, whereas its
|
||||
successful close begins at 0x20E0. The reconstruction restores these distinct
|
||||
paths instead of compensating with stack offsets or register tricks.
|
||||
|
||||
### Measurements
|
||||
|
||||
| Unit / measure | Before | After |
|
||||
| --- | ---: | ---: |
|
||||
| ESMisc exact functions | 30/31 | 30/31 |
|
||||
| ESMisc exact code | 9404/11200 | 9404/11200 |
|
||||
| ESMisc fuzzy | 96.76036% | 99.33143% |
|
||||
| DeleteUnauthorizedData fuzzy | 79.797325% | 95.830734% |
|
||||
| Function instructions | 434/449 | 446/449 |
|
||||
| ESMisc matched data | 4416/4416 | 4416/4416 |
|
||||
| ATERM exact / fuzzy / data | 17/26; 96.624664%; 18584/18864 | unchanged |
|
||||
| AOSS exact / fuzzy / data | 16/21; 96.777916%; 3928/3928 | unchanged |
|
||||
| Whole-report fuzzy | 99.588615% | 99.598236% |
|
||||
|
||||
pool_diff now reports all 114 strings identical. The source .data is 4378
|
||||
bytes and exactly equals the original section's first 4378 bytes. The target
|
||||
section is 4384 bytes and ends in six zero alignment bytes. No synthetic
|
||||
padding was added. The objdiff data score remains 100%, and the literal audit
|
||||
checks 204 arguments in all 30 exact functions with zero candidates or errors.
|
||||
|
||||
The candidate remains non-exact. ctxdiff shows 446/449 instructions and
|
||||
remaining register allocation, -1 mask materialization, and scratch-pointer
|
||||
lifetime differences. No brute-force declaration/register search was run.
|
||||
|
||||
## Validation
|
||||
|
||||
Commands:
|
||||
|
||||
- python3 configure.py --version 43U --wrapper ../toolchain/wibo-build/wibo
|
||||
- Delete generated native `build/43U/src/**/*.o`, retaining a private baseline
|
||||
object snapshot for comparison.
|
||||
- WIBO_SJIS_MISSING_IMPORTS=1 ../.venv/bin/ninja all_source build/43U/report.json build/43U/ok
|
||||
- PYTHONPATH=../local-tools ../.venv/bin/python tools/decomp-assist/pool_diff.py
|
||||
- PYTHONPATH=../local-tools ../.venv/bin/python tools/decomp-assist/ctxdiff.py src/utility/iplESMisc DeleteUnauthorizedData__Q33ipl7utility6ESMiscFPQ23EGG4Heap
|
||||
- PYTHONPATH=../local-tools ../.venv/bin/python tools/decomp-assist/literal_reference_diff.py src/utility/iplESMisc
|
||||
- Compare every unit in the fresh report and all 1027 source objects' allocated
|
||||
bytes and normalized relocations against the baseline.
|
||||
- git diff --check
|
||||
|
||||
Full rebuild passed (1031 Ninja steps). DOL SHA1:
|
||||
`26116613f624061ba99c8d1a299aaa6efa85670d`.
|
||||
|
||||
Only the ESMisc report changed: its fuzzy and one function's fuzzy improved.
|
||||
No report metric regressed. Only ESMisc's allocated .text and .data changed:
|
||||
.text 11360 -> 11408 bytes (390 relocations on both sides), .data 4378 -> 4378
|
||||
bytes (zero relocations). Every other allocated section/object is unchanged.
|
||||
|
||||
A temporary host harness extracted the actual reconstructed helper bodies,
|
||||
substituted fake Wii/heap calls, and exercised 12 control-flow scenarios:
|
||||
first and second enumeration errors, title-list allocation failure, mixed
|
||||
Zelda/blocked/ordinary title traversal, negative read, short read, second-save
|
||||
verification failure, absent file, save-buffer allocation failure, ChangeUid
|
||||
failure, ticket enumeration failure, and zero-ticket handling. Tests ran with
|
||||
AddressSanitizer and UndefinedBehaviorSanitizer. LeakSanitizer is unavailable
|
||||
under the execution environment's ptrace, so only that component was disabled.
|
||||
The harness is supplemental behavioral validation, not a retail runtime test.
|
||||
|
||||
GATE: focused decompilation improvement; full 43U/DOL and no-regression checks
|
||||
pass; exact-matching gate remains incomplete at 30/31. No linking claimed.
|
||||
@@ -1,75 +0,0 @@
|
||||
# iqdec_b65_frv32 / TMCJPEGDEC_decode_iquant (worker1)
|
||||
|
||||
Worktree: `/workspace/worktrees/iqdec-b65-worker1`
|
||||
Branch: `agent/grok/decomp-worker-1/iqdec_b65`
|
||||
|
||||
## Scores
|
||||
|
||||
| State | Insns | Diffs | Notes |
|
||||
|---|---|---|---|
|
||||
| main baseline | 276/276 | **30** reg-only | entry/DC extract + AC coloring |
|
||||
| this PR (sibling semantics) | 276/276 | **13** reg-only | structural 0 |
|
||||
| target wall | 276/276 | 13 | AC huff/zztbl/zz permutation |
|
||||
|
||||
## Sibling semantics ported (from matching `decode_iquant_rc` C reference under `#else`)
|
||||
|
||||
- `u16*` fast indexing in `decodeLongHuffman` / `decodeACHuffman` (`entry = (u16*)(huff_tbl+9)`, `entry += 2`, `limit->bitLength = entry[0]`)
|
||||
- comma-op `load_buff`: `if (load_ret = TMCJPEGDEC_load_buff(work), load_ret < 0)`
|
||||
- early `s32* conv_row = (s32*)conv_row_ptr`
|
||||
- `1UL << r/t`, `extra -= (tmp - 1)` paren form
|
||||
- bitCount update before bitBuf read on DC/AC extract
|
||||
|
||||
These fixed the 17 non-AC diffs (30→13).
|
||||
|
||||
## Remaining wall (13 reg-only)
|
||||
|
||||
Permutation of 4 callee-saved across AC setup:
|
||||
|
||||
| Value | Ours | Target |
|
||||
|---|---|---|
|
||||
| `huff_tbl` (pACHuffTbl) | r29 | **r25** |
|
||||
| `huff_sym` (pACHuffSym) | r30 | **r24** |
|
||||
| `zztbl` | r24 | **r29** |
|
||||
| `zz` | r25 | **r30** |
|
||||
|
||||
Cascaded: `tmp-1` in r7 vs r6; `zz<<2` index in r6 vs r7.
|
||||
|
||||
Insns 0–114 (through `ac_fast` load) are byte-identical. Divergence starts at AC huff loads (115–116).
|
||||
|
||||
## Coloring levers tried (≥12) — none beat 13
|
||||
|
||||
1. Separate AC-block `ac_huff_tbl`/`ac_huff_sym` → 32 (DC shifted)
|
||||
2. DC-only block-local huff → 46 (prologue shifted)
|
||||
3. Fully scoped DC/AC huff (no top-level) → 32
|
||||
4. Early `zztbl` at function start → 138 (schedule)
|
||||
5. `zztbl` before huff (before memset) → 32 (schedule)
|
||||
6. Swap AC huff_tbl/huff_sym assign order → 13 (swapped wrong load order)
|
||||
7. Swap DC huff assign order → build fail / unrestored
|
||||
8. Decl reorder huff near zztbl → 17 (DC shifted)
|
||||
9. `u8 zz` → 36
|
||||
10. `u32 zz` → 13 (no change)
|
||||
11. Move `zz = zztbl[idx]` after `load_buff` → 100
|
||||
12. Eliminate `zz` temp (double `zztbl[idx]`) → 100
|
||||
13. Huff before `ac_fast` → 14
|
||||
14. Split `r` into `dc_r` + `r` → 13
|
||||
15. Null-kill `huff_*=0` before AC reassign → 13
|
||||
16. DC passes `work->pDCHuff*` directly → 30
|
||||
17. Sibling decl order + `ac_vl`/`ac_sym` → 96
|
||||
18. Scope DC HuffmanEntry temps → 33
|
||||
19. Dummy pad locals → 13
|
||||
20. Sibling `*(s32*)((u8*)block + zz*4)` store form → 13
|
||||
21. `zztbl` first in decl list → 36
|
||||
22. Coalesce huff_tbl via reassigning `dc_fast` → 36
|
||||
23. `u32 idx` → 33
|
||||
24. `s16 idx` → build fail
|
||||
25. `unsigned long tmp` → 30
|
||||
26. AC huff via `work->` at call only (no AC locals) → 120
|
||||
27. Nested temp copies into huff_* → 32
|
||||
28. `u8* zztbl` non-const → 13
|
||||
29. **declsearch** 80 evals on decls 118–139 → best still (0, 13)
|
||||
|
||||
Root cause: `huff_sym`/`huff_tbl` keep DC-path preferred colors (r29/…) when reassigned for AC; target recycles freed `r24` (dc_predict) / `r25` (dc `r`) for AC huff and pushes `zztbl`/`zz` high. Any split of DC/AC names reshuffles the already-matching DC body.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Need a shape that keeps DC 0–114 identical **and** births AC huff into r25/r24 (e.g. true live-range split / coalescing onto freed dc_predict/r without extra locals that raise pressure). Sibling `#else` C uses separate `ac_vl`/`ac_sym` and never shares DC huff locals — porting that cleanly without DC regen is the open problem.
|
||||
@@ -1,18 +0,0 @@
|
||||
# odh `cdj_d_decompressLoop` (worker-2) 2026-10-02
|
||||
|
||||
Claim was only `cdj_d_decompressLoop`. colorConv, huffmanDecoder, and LineConv11 were not modified in the committed diff.
|
||||
|
||||
## Result
|
||||
|
||||
`cdj_d_decompressLoop` **899/899, 0 diffs, byte-identical** (3596 bytes) to retail. Was 43, then 7.
|
||||
|
||||
## What matched
|
||||
|
||||
- Inlined `(blockRowSize * 2)` and `((u32)blockWidth << 4)` (init `slwi r18` / `slwi r17`).
|
||||
- `planeOffset += (u32)master->blocksWide << 6` coalesces the 1x2 update into `add r15, r15, r0`.
|
||||
- `int nextBlockX = master->blockX + 1` with `(u16)` compare (same shape as compressLoop).
|
||||
- Second 1x1 chroma sum written blockX term first.
|
||||
- idct destinations that need plane-first `add` use `(u8*)((u32)planeOffset + (u32)master->workBuffer) + 8`.
|
||||
- 2x2 tail stores the updated plane in `requiredBlockEnd` and the end pointer in `planeOffset`. That is what puts the plane in r15 and the end in r16 (`addi r15, r3, -8` / `add r16, r15, r18`). Assigning the plane back to `planeOffset` left those two callee-saves swapped (7 diffs). Splitting the `-8` let MWCC cancel it against the later `+8` and dropped to 897.
|
||||
|
||||
colorConv left at the 18 pairwise wall. Not in this diff.
|
||||
@@ -1,67 +0,0 @@
|
||||
# Data d16 attempts
|
||||
|
||||
HEAD and fetched origin/main are 6f49df32. Both owned units are unchanged on origin/main. Scope is data symbols only inside the two assigned split ranges; no source/code/configure/split changes.
|
||||
|
||||
Baseline: MyTiManager instruction-exact 91/91, code 20196/20196, data 148/1132; fa/pf_path instruction-exact 27/27, code 11872/11872, data 8/56. Pools identical, 7 and 0 strings. Initial pool commands with unit paths failed because this version of pool_diff accepts object paths; corrected commands passed before any mutation.
|
||||
|
||||
Fresh ELF audit: MyTiManager source .data now contains a genuine 36-byte weak Animation vtable at +0x3b0. Target +0x3b0..0x3d8 remains zero without outgoing relocations. Canonical retained Animation vtable is 0x8165D258, with seven real virtual slots. This improves the earlier evidence in data-d4, whose source ended at +0x3b0. The current source ends at +0x3d4; the last four target bytes are zero section alignment. Tail ownership will be tested only with this type/relocation evidence.
|
||||
|
||||
fa/pf_path: both .sdata byte arrays are identical for all 48 bytes. The target null literal at +4 is recorded as four bytes, compiler char[2] is two bytes. The target initializer at +40 is split into two single bytes, compiler emits one two-byte const array, used by lbz with addends 0 and 1. The final target space literal is recorded as two bytes, compiler emits a four-byte narrow char string with explicit trailing zero bytes. .sdata2 has two identical two-byte arrays similarly split into individual byte symbols; trailing two bytes are zero alignment. No initializer difference or non-exact function exists.
|
||||
|
||||
## pf_path literal extent proof
|
||||
|
||||
lbl_81698394 at unchanged .sdata:0x81698394 is char[4] literal `"\x20\0\0"`, not char[2]: PFPATH_CheckExtShortName loads it at .text+0x2b78 and +0x2bcc and passes it to PFSTR_StrNCmp; the compiled @2271 has size 4 and bytes 20000000 at the identical +0x2c offset. Extent 2 -> 4 recovers the complete real string including its explicit two zeros and implicit terminator. No address, section size, source object or total_data changes.
|
||||
|
||||
Minimal correction selected: other pf_path aliases and initializer sublabels already compare correctly through exact section bytes. Leave all names and other extents alone.
|
||||
|
||||
## MyTiManager tail extent proof
|
||||
|
||||
lbl_816681E8 at unchanged .data:0x816681E8 covers the discarded weak Animation vtable footprint, size 0x24 rather than 0x28: the compiler emits __vt__Q39textinput4util9Animation at identical .data+0x3b0 with two ABI header words and seven virtual slots, ending +0x3d4; include/keyboard/tiUtil.h declares exactly those seven methods, and the retained retail Animation vtable at 0x8165D258 also has size 0x24 and precisely the same seven relocation targets. Target createMemoInputForm .text+0x9de/+0x9fe and createLetterInputForm +0xb06/+0xb26 refer to the retained canonical table, while source equivalents refer to this weak copy; this demonstrates linker deduplication. The four unrelocated zero bytes at 0x8166820c..0x81668210 align the next unit to eight bytes and are not an eighth virtual method. Correct only the extent, keep the existing label, all addresses, all 984 section bytes and total_data 1132. No source vtable suppressed and no weak-pointer bytes fabricated.
|
||||
|
||||
The old log could not infer the tail when its source emitted no Animation table. The current source now supplies independent table-layout evidence. Every source tail relocation is an extra linker-discarded weak entry; no target relocation is removed or altered. The goal depends on correcting true object versus section-alignment ownership, not inventing a name for zero bytes.
|
||||
|
||||
## Iteration measurements
|
||||
|
||||
After pf_path extent correction, fresh objdiff report: matched_data 8 -> 56/56, .sdata and .sdata2 both 100%, code 11872/11872, functions 27/27. After MyTiManager correction, fresh objdiff report: matched_data 148 -> 1132/1132, all six non-text sections 100%, code 20196/20196, functions 91/91. Correct source-only Ninja targets subsequently report no work to do. Extracted object paths are outputs of SPLIT, not explicit Ninja targets; the two commands naming them reported unknown targets after the required split succeeded, and were corrected to source-only targets before final verification.
|
||||
|
||||
Objdiff v3.4.5 source inspection confirms diff_data_section uses the greatest owned-symbol endpoint, excluding physical section-end alignment, and accepts exact raw section bytes when every target relocation matches; extra source weak relocations do not veto this route. Both corrections describe actual object extents and preserve every physical section byte. Names need no correction for these units.
|
||||
|
||||
No open function exists in either unit: all 118 functions were exact before this data task. No compiler experiments, code changes, dummy objects, fake virtual slots, forced placement, symbol renames, configure changes, split changes, or remote mutations. The earlier broad requirement for new exact functions does not apply to these explicitly assigned already-code-100% units; preserve exact counts instead.
|
||||
|
||||
## Final clean gate and audit
|
||||
|
||||
Full non-quick two-unit gate rebuilt 43U from scratch and passed. Fresh post-build pool comparisons remain identical. All 91 MyTiManager and 27 pf_path functions were checked individually with ctxdiff.py: every one reports diffs 0 and identical instruction counts. Output is /tmp/data-d16.ctxdiff-all.txt.
|
||||
|
||||
Live progress and build/43U/report.json regenerated after the gate. Both units matched_data == unchanged total_data, code == unchanged total_code, and every section reports 100%. Source bodies and every symbol name/address/section are unchanged; an automated line-by-line config audit confirms exactly the two extent corrections proved above. No remaining non-exact functions or unresolved non-text sections.
|
||||
|
||||
```text
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[src/keyboard/MyTiManager] pool: IDENTICAL
|
||||
[src/keyboard/MyTiManager] objdiff: code 20196/20196 data 1132/1132 functions 91/91 fuzzy 100.0000 linked code 20196
|
||||
[src/keyboard/MyTiManager] instruction-exact functions: 91/91
|
||||
[src/keyboard/MyTiManager] section .bss size 72 match 100.0
|
||||
[src/keyboard/MyTiManager] section .ctors size 4 match 100.0
|
||||
[src/keyboard/MyTiManager] section .data size 984 match 100.0
|
||||
[src/keyboard/MyTiManager] section .sbss size 16 match 100.0
|
||||
[src/keyboard/MyTiManager] section .sdata size 24 match 100.0
|
||||
[src/keyboard/MyTiManager] section .sdata2 size 32 match 100.0
|
||||
[src/keyboard/MyTiManager] section .text size 20196 match 100.0
|
||||
[src/keyboard/MyTiManager] baseline: code 20196/20196 data 148 functions 91 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/fa/pf_path] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/pf_path] objdiff: code 11872/11872 data 56/56 functions 27/27 fuzzy 100.0000 linked code 11872
|
||||
[libs/RVL_SDK/src/fa/pf_path] instruction-exact functions: 27/27
|
||||
[libs/RVL_SDK/src/fa/pf_path] section .sdata size 48 match 100.0
|
||||
[libs/RVL_SDK/src/fa/pf_path] section .sdata2 size 8 match 100.0
|
||||
[libs/RVL_SDK/src/fa/pf_path] section .text size 11872 match 100.0
|
||||
[libs/RVL_SDK/src/fa/pf_path] baseline: code 11872/11872 data 8 functions 27 fuzzy 100.0000
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 90.94304 -> 90.94304
|
||||
global fuzzy_match_percent: 99.58742 -> 99.58742
|
||||
global complete_code_percent: 73.73083 -> 73.73083
|
||||
global matched_data_percent: 99.36639 -> 99.42271
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
note: config touched: config/43U/symbols.txt (orchestrator reviews every config/symbols change)
|
||||
GATE PASS
|
||||
```
|
||||
@@ -1746,557 +1746,3 @@ Final authority lines:
|
||||
[libs/RVL_SDK/src/kpad/KPAD] instruction-exact functions: 21/29
|
||||
GATE PASS
|
||||
```
|
||||
|
||||
# Round 9: MAX fresh branchf7b1b9b0
|
||||
Initial owned objects rebuilt and fresh objdiff baseline generated directly; pools identical101/57/0. Fresh counts SD122/129,Address90/94,KPAD21/29, data100% in all3. New near-miss hypotheses use accessor references to stored pointer cells and postincrement-return inline boundaries; prior rounds did not change the original objects.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv
|
||||
Fetch origin/main 6cb5ac9dedfbf99dc591e2cabc9d62d2c849a69d. 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,frame0x10; only heap/manager load order reversed. Target loads heap after flag store, then reloads manager. New accessor reference-return types describe read-only views of stored pointer cells; actual calls/field layout remain identical. Prior trials bound pointer values after loading them.
|
||||
- save-manager getter returns a const reference to the stored pointer: (2, 2) structural/positional; instructions 35/35; restored.
|
||||
- heap getter returns a const reference to the stored pointer: (2, 2) structural/positional; instructions 35/35; restored.
|
||||
- both argument getters return read-only references to their pointer cells: (2, 2) structural/positional; instructions 35/35; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main c7ceb3efe077dca7dd49508cf4e2bd1faab56b54. 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 or102/102,frame0x40; target preserves old count inr3 and computes increment inr0, blocking early threshold loading. New inline postincrement-return boundary and copy-plus-increment helper test this real result lifetime; no artificial uses or dummy objects.
|
||||
- pointer postincrement-result inline boundary after collecting a title: (2, 4) structural/positional; instructions 101/101; restored.
|
||||
- reference postincrement-result inline boundary after collecting a title: (2, 4) structural/positional; instructions 101/101; restored.
|
||||
- append postincrement-result inline boundary after collecting a title: (2, 4) structural/positional; instructions 101/101; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main c7ceb3efe077dca7dd49508cf4e2bd1faab56b54. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 102/102
|
||||
Remote source equals freshly built baseline; still open 97.833336%. Structural diagnosis: 101/101 or102/102,frame0x40; target preserves old count inr3 and computes increment inr0, blocking early threshold loading. New inline postincrement-return boundary and copy-plus-increment helper test this real result lifetime; no artificial uses or dummy objects.
|
||||
- pointer postincrement-result inline boundary after collecting a title: (2, 4) structural/positional; instructions 102/102; restored.
|
||||
- reference postincrement-result inline boundary after collecting a title: (2, 4) structural/positional; instructions 102/102; restored.
|
||||
- append postincrement-result inline boundary after collecting a title: (2, 4) structural/positional; instructions 102/102; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv
|
||||
Fetch origin/main 7216fd527fee4db057af192c416f9d2fbe0e547a. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 35/35
|
||||
Remote source equals freshly built baseline; still open 99.65714%. Structural diagnosis: Further structural lever: scalarized aggregate of the real heap/manager arguments, with read-only request/helper boundaries; target frame0x10 and35 instructions, only two argument loads inverted.
|
||||
- read-only real flush argument aggregate: (2, 2) structural/positional; instructions 35/35; restored.
|
||||
- mutable request fields assigned heap then manager: (2, 2) structural/positional; instructions 35/35; restored.
|
||||
- mutable request with manager initialized last via constructor: (2, 2) structural/positional; instructions 35/35; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv
|
||||
Fetch origin/main 7216fd527fee4db057af192c416f9d2fbe0e547a. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 38/38
|
||||
Remote source equals freshly built baseline; still open 99.42105%. Structural diagnosis: Structural diagnosis:38 instructions/frame0x10 equal; resolved wcsncpy source and destination LEAs inverted. No immediate store/reload pair or extent overlap; test scalarized copy request with source-first real fields before register-only work.
|
||||
- read-only name-copy argument aggregate: (11, 32) structural/positional; instructions 40/38; restored.
|
||||
- mutable name-copy source and destination field assignments: (2, 2) structural/positional; instructions 38/38; restored.
|
||||
- read-only name-copy request constructor: (2, 2) structural/positional; instructions 38/38; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv
|
||||
Fetch origin/main 2da1c58f2c1b14de0754929ddbc23394a011d7a5. 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 frame0x20; missing BS2-manager body reload, global/string base colors reversed. New lexical scopes for manager acquisition and an actual abort-state for-loop; no added data or volatile without proof.
|
||||
- poll using a switch and separate completed-state exit label: build failed i-ipl-workers\data- # d5\include\scene\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 # --------------------------------------------------------- # 258: } # Error: ^ # (10159) undefined label 'abortFinished' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
|
||||
- bind the update receiver as a read-only reference in the loop body: (4, 39) structural/positional; instructions 145/146; restored.
|
||||
- hold the observed abort state as a leading initialized for-loop variable: (7, 42) structural/positional; instructions 149/146; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main 02dbcc53bdf195d3b2aa22f56460ad2c2f913dd2. 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 frame0x60; title-ID inner scope changes index/add operand allocation; new pointer-to-row and explicit signed page offset views after hoisting the real ID, retaining safe typed entry access.
|
||||
- hoist the title and index through a pointer to the selected channel page: (2, 7) structural/positional; instructions 126/126; restored.
|
||||
- hoist the title and apply the row index before dereferencing its array: (2, 7) structural/positional; instructions 126/126; restored.
|
||||
- hoist the title and use an explicitly unsigned native channel index: (2, 7) structural/positional; instructions 126/126; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main ed2d5b30b46940f63b16670dd1f7b44b2ac06984. 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 frame0x80; four repeated counter/threshold schedules differ16. New count read-modify-write expression semantics and inline returning the original count; source paths and threshold signedness preserved.
|
||||
- use a named previous count in each completed title increment: (8, 16) structural/positional; instructions 361/361; restored.
|
||||
- sequence the postincrement result as a discarded comma-expression: (8, 16) structural/positional; instructions 361/361; restored.
|
||||
- put postincrement behind a helper returning the original count: (8, 16) structural/positional; instructions 361/361; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj
|
||||
Fetch origin/main 5a332eceba97b348917577a016edf49c8b2bd519. 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 frame0xe0; framebuffer-width/height conversions and projection/scissor lifetimes dominate68 differences; new real framebuffer-dimension and scissor-rectangle aggregate views before register-only tuning.
|
||||
- declare framebuffer width before height then initialize both from named dimension references: (23, 68) structural/positional; instructions 233/233; restored.
|
||||
- retain one named projection-width local shared by both scissor branches: (51, 195) structural/positional; instructions 230/233; restored.
|
||||
- represent the four actual computed scissor bounds as fields of a local rectangle: (192, 247) structural/positional; instructions 251/233; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv
|
||||
Fetch origin/main a8ab2099cdf66a22205c6faec73834eb7f771168. Initial assembly diagnosis: (4, 39) structural/positional differences; instructions 145/146
|
||||
Remote source equals freshly built baseline; still open 97.73972%. Structural diagnosis: Correct failed exit-label trial; elapsedTicks is the real statement after the poll. Failed compiler trial did not count toward the three successful variants.
|
||||
- switch-based poll with a defined abort-finished label before the elapsed tick computation: (9, 40) structural/positional; instructions 145/146; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv
|
||||
Fetch origin/main a8ab2099cdf66a22205c6faec73834eb7f771168. Initial assembly diagnosis: (10, 68) structural/positional differences; instructions 82/84
|
||||
Remote source equals freshly built baseline; still open 88.03571%. Structural diagnosis: 82/84 frame0x420; target keeps name/display addresses in one saved register across virtual pane lookups. New mutable input pointer/array/String views test MWCC rematerialization and alias assumptions without changing shared signatures.
|
||||
- keep both text inputs in mutable character pointers before the virtual lookups: (10, 68) structural/positional; instructions 82/84; restored.
|
||||
- bind actual mutable name and display arrays by their real extents: (10, 68) structural/positional; instructions 82/84; restored.
|
||||
- read both text arrays through a mutable String reference shared across pane calls: (10, 68) structural/positional; instructions 82/84; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv
|
||||
Fetch origin/main a8ab2099cdf66a22205c6faec73834eb7f771168. Initial assembly diagnosis: (19, 323) structural/positional differences; instructions 820/820
|
||||
Remote source equals freshly built baseline; still open 97.44634%. Structural diagnosis: 820/820 frame0x60; ordinary construction removes the doubled allocation guard but leaves two missing name/display LEAs. New mutable text input views paired with ordinary allocation preserve literal source order and avoid manual constructor calls.
|
||||
- ordinary balloon allocation with a mutable name pointer before animator restart: (23, 331) structural/positional; instructions 818/820; restored.
|
||||
- ordinary balloon allocation with mutable real name/display array references: (23, 331) structural/positional; instructions 818/820; restored.
|
||||
- ordinary balloon allocation and a mutable String receiver for both mode-zero text inputs: (23, 331) structural/positional; instructions 818/820; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err
|
||||
Fetch origin/main a8ab2099cdf66a22205c6faec73834eb7f771168. 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 frame0x60; target has undefined message ID for other errors, safe default cannot be removed. Try safe grouped valid errors with an explicit default and a truly initialized index object; unsupported input behavior remains defined.
|
||||
- assign the safe fallback explicitly inside every switch case including default: (6, 28) structural/positional; instructions 73/75; restored.
|
||||
- use an initialized message-selection aggregate holding the actual index: (1, 30) structural/positional; instructions 76/75; restored.
|
||||
- use a safe if/else selection testing the original supported error groups: (18, 47) structural/positional; instructions 65/75; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos
|
||||
Fetch origin/main fd775c34dcac2c7110d7729ebd0bd6e3ee7bba62. Initial assembly diagnosis: (0, 9) structural/positional differences; instructions 19/19
|
||||
Remote source equals freshly built baseline; still open 96.57895%. Structural diagnosis: Decoded19/19 leaf structure exact; target double scale usesf0 and half/aspectf4/f3. New actual scalar helper boundaries for correction, half-height, and complete coordinate projection; registers last.
|
||||
- put the double calibration product behind a scalar-return inline helper: (0, 10) structural/positional; instructions 19/19; restored.
|
||||
- put the half-height product behind a scalar-return inline helper: (0, 10) structural/positional; instructions 19/19; restored.
|
||||
- use a complete projection helper with a const coordinate input and precomputed height: (0, 10) structural/positional; instructions 19/19; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight
|
||||
Fetch origin/main fd775c34dcac2c7110d7729ebd0bd6e3ee7bba62. Initial assembly diagnosis: (0, 7) structural/positional differences; instructions 52/52
|
||||
Remote source equals freshly built baseline; still open 99.23077%. Structural diagnosis: Decoded52/52 frame0x30,7 colors; named-zero and squared-height order yield3 base-register colors. New sensor-center subobject view and channel-base lifetime forms keep actual indexed controller fields, without volatile or dummy state.
|
||||
- name the actual sensor-center subobject pointer after controller indexing: (0, 3) structural/positional; instructions 52/52; restored.
|
||||
- form the indexed controller pointer only after computing both real squared dimensions: (0, 3) structural/positional; instructions 52/52; restored.
|
||||
- assign the squared-height contribution into the diagonal temporary before adding width: (0, 8) structural/positional; instructions 52/52; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon
|
||||
Fetch origin/main fd775c34dcac2c7110d7729ebd0bd6e3ee7bba62. Initial assembly diagnosis: (2, 35) structural/positional differences; instructions 101/101
|
||||
Remote source equals freshly built baseline; still open 97.27723%. Structural diagnosis: Decoded101/101 frame0x30,35 pure floating-register colors. New in-place magnitude/normalization lifetimes and product subscopes before using declsearch on any surviving register-only candidate.
|
||||
- reuse magnitude as the blend weight instead of retaining a second smoothing scalar: (2, 35) structural/positional; instructions 101/101; restored.
|
||||
- normalize the interpolated horizon coordinates in place before updating the circle: (2, 37) structural/positional; instructions 101/101; restored.
|
||||
- scope the smoothing weight inside its actual interpolation block: (2, 35) structural/positional; instructions 101/101; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD read_kpad_acc
|
||||
Fetch origin/main fd775c34dcac2c7110d7729ebd0bd6e3ee7bba62. Initial assembly diagnosis: (16, 66) structural/positional differences; instructions 400/400
|
||||
Remote source equals freshly built baseline; still open 98.15%. Structural diagnosis: Decoded400/400 frame0x50,5 CFG differences; real smoothing/guard reconstruction narrows to cmpwi5 instead ofcmplwi5. New boolean switch and nested primary/fallback switch boundaries preserve the complete unsupported-format path.
|
||||
- switch on the unsigned equality predicate of the valid fallback format: (12, 197) structural/positional; instructions 403/400; restored.
|
||||
- nest the fallback single-case switch inside the primary format switch default: (2, 2) structural/positional; instructions 400/400; restored.
|
||||
- subtract the real fallback format before testing the zero switch case: (1, 1) structural/positional; instructions 400/400; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD select_1obj_first
|
||||
Fetch origin/main 842c850c10099d9937f1e02f8625a2f0a985abf9. Initial assembly diagnosis: (2, 26) structural/positional differences; instructions 109/109
|
||||
Remote source equals freshly built baseline; still open 98.348625%. Structural diagnosis: Decoded109/109 frame0x20; 26 float/base colors, direct candidate-end comparison reaches22. New real geometry operand/lifetime forms and shared output-candidate pointer before declaration search.
|
||||
- use scale-first products for the two actual horizon offsets after direct-end comparison: (2, 22) structural/positional; instructions 109/109; restored.
|
||||
- evaluate horizon dot-product axis operands first with direct candidate-end comparison: (4, 22) structural/positional; instructions 109/109; restored.
|
||||
- bind the two actual output candidate records through one local pointer: (2, 22) structural/positional; instructions 109/109; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable
|
||||
Fetch origin/main 842c850c10099d9937f1e02f8625a2f0a985abf9. Initial assembly diagnosis: (14, 45) structural/positional differences; instructions 250/250
|
||||
Remote source equals freshly built baseline; still open 94.82%. Structural diagnosis: Decoded250/250 frame0x20; filter magnitude register reuse and late geometry schedules differ. New explicit absolute-value branch, direction scalar components, and in-place distance filter weight; preserve FP precision and all writes.
|
||||
- assign filter magnitude using explicit sign branches rather than a conditional expression: (14, 45) structural/positional; instructions 250/250; restored.
|
||||
- reuse the filtered distance magnitude through its gain multiplication: (14, 43) structural/positional; instructions 250/250; restored.
|
||||
- name both actual direction components within the final geometric projection scope: (12, 40) structural/positional; instructions 250/250; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADRead
|
||||
Fetch origin/main 842c850c10099d9937f1e02f8625a2f0a985abf9. Initial assembly diagnosis: (11, 89) structural/positional differences; instructions 459/459
|
||||
Remote source equals freshly built baseline; still open 97.52723%. Structural diagnosis: Decoded459/459 frame0xc0; raw-copy endpoint grouping and gravity x/y signed halfword loads differ. New complete raw-copy inline boundary, typed three-factor gravity locals, and decrement loop form; no field type/width changes.
|
||||
- move the complete raw-ring copy into an inline operation returning its final sample index: (46, 250) structural/positional; instructions 459/459; restored.
|
||||
- use signed-int product temporaries for both complete gravity validation products: (7, 83) structural/positional; instructions 459/459; restored.
|
||||
- express the raw-ring copy as a for-loop with the decrement in its update clause: (19, 377) structural/positional; instructions 458/459; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADInit
|
||||
Fetch origin/main 842c850c10099d9937f1e02f8625a2f0a985abf9. Initial assembly diagnosis: (9, 81) structural/positional differences; instructions 185/185
|
||||
Remote source equals freshly built baseline; still open 96.51351%. Structural diagnosis: Decoded185/185 frame0x90; repeat-delay constant and saved float/matrix colors. New repeat initializer inline boundary, zero/one calibration scope, and real matrix reference pointer scope; arrays/stores unchanged.
|
||||
- initialize all six real repeat state fields through a complete inline operation: (9, 81) structural/positional; instructions 185/185; restored.
|
||||
- initialize zero before one while retaining the actual saved scalar locals: (9, 81) structural/positional; instructions 185/185; restored.
|
||||
- bind the initialized rotation matrix pointer inside the controller loop instead of retaining it outside: (9, 65) structural/positional; instructions 185/185; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon
|
||||
Fetch origin/main 6f6f63cb81bdb8298e0270364f6b94dae2b36a6c. Initial assembly diagnosis: (2, 35) structural/positional differences; instructions 101/101
|
||||
Remote source equals freshly built baseline; still open 97.27723%. Structural diagnosis: Register-only final search after this round three distinct successfully built lifetime/scope attempts. Reconstruct the best19-color seed from previous complete assignment order, then search the remaining swaps/moves with a substantially larger budget; decode paired loads and FP compares.
|
||||
- Reproduced best declaration seed, decoded (0, 19); every assignment and computation order unchanged.
|
||||
- Extended declsearch: declaration block: | f32 targetY; | f32 circleY; | f32 deltaX; | f32 oldX; | f32 projectedX; | f32 productX; | f32 targetX; | f32 oldY; | f32 smoothing; | f32 magnitude; | f32 normalizedX; | f32 normalizedY; | f32 nextX; | f32 nextY; | f32 normalized; | f32 circleX; | f32 deltaCircleX; | f32 deltaCircleY; | f32 oldCircleY; | f32 oldCircleX; | f32 unitY; | f32 unitX; | f32 blend; | start (0, 19) | improved (0, 17) | best (0, 17) after 852 builds; kept in source: | f32 targetY; | f32 circleY; | f32 deltaX; | f32 oldX; | f32 projectedX; | f32 productX; | f32 targetX; | f32 normalizedY; | f32 smoothing; | f32 magnitude; | f32 normalizedX; | f32 oldY; | f32 nextX; | f32 nextY; | f32 normalized; | f32 circleX; | f32 deltaCircleX; | f32 deltaCircleY; | f32 oldCircleY; | f32 oldCircleX; | f32 unitY; | f32 unitX; | f32 blend; |
|
||||
Nonexact extended-search candidate restored; raw authority (0, 17).
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos
|
||||
Fetch origin/main a9a3f36cf03be45e012ddbb0b86cc689755c89c0. Initial assembly diagnosis: (0, 9) structural/positional differences; instructions 19/19
|
||||
Remote source equals freshly built baseline; still open 96.57895%. Structural diagnosis: Register-only last after three new scalar/full projection helper attempts; no frame/CFG differences. Remove the independent named double result so its anonymous calibration temporary can coalesce, while naming only actual half/aspect factors. Search six real local declarations, preserving every assignment.
|
||||
- Anonymous double-calibration seed: decoded (0, 9).
|
||||
- Anonymous-calibration declsearch: declaration block: | f32 halfHeight; | f32 aspect; | f32 half; | f32 x; | f32 y; | f32 height; | start (0, 9) | improved (0, 5) | best (0, 5) after 36 builds; kept in source: | f32 aspect; | f32 halfHeight; | f32 half; | f32 x; | f32 y; | f32 height; |
|
||||
Nonexact projection search candidate restored; raw authority (0, 5).
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable
|
||||
Fetch origin/main a9a3f36cf03be45e012ddbb0b86cc689755c89c0. Initial assembly diagnosis: (14, 45) structural/positional differences; instructions 250/250
|
||||
Remote source equals freshly built baseline; still open 94.82%. Structural diagnosis: Further structural reconstruction of late geometry: target loads directionY/tangentY, negates directionY, then loads directionX/tangentX and multiplies in that order. Earlier direct const/scalar views retained12 differences; name the real dot/cross terms and test declaration/expression order.
|
||||
- declare the cross-product rotation before the dot-product rotation: (22, 47) structural/positional; instructions 250/250; restored.
|
||||
- name all four geometric input components in target operand-load order: (12, 41) structural/positional; instructions 250/250; restored.
|
||||
- name the real dot/cross product component values in target multiplication order: (14, 41) structural/positional; instructions 250/250; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight
|
||||
Fetch origin/main a9a3f36cf03be45e012ddbb0b86cc689755c89c0. Initial assembly diagnosis: (0, 7) structural/positional differences; instructions 52/52
|
||||
Remote source equals freshly built baseline; still open 99.23077%. Structural diagnosis: Remaining3 base-register colors after named-zero geometry reconstruction. New actual scalar-return scale helper takes only a read-only sensor-center input instead of the prior entire controller/height helper; this exposes a real inline/alias boundary.
|
||||
- scalar sensor-scale helper with const center input: (1, 13) structural/positional; instructions 52/52; restored.
|
||||
- scalar sensor-scale helper with mutable center input: (1, 13) structural/positional; instructions 52/52; restored.
|
||||
- scalar sensor-scale helper with separated offset inputs: (32, 58) structural/positional; instructions 59/52; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main a9a3f36cf03be45e012ddbb0b86cc689755c89c0. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 101/101
|
||||
Remote source equals freshly built baseline; still open 97.81188%. Structural diagnosis: Four schedule-only differences remain after the new old-count helper attempts. Test immutable formal pointer variables without altering pointee types or mangled public signature, then copy the real incremented count through memcpy as a memory-write boundary.
|
||||
- const only the count pointer formal: (2, 4) structural/positional; instructions 101/101; restored.
|
||||
- const every real pointer formal: (2, 4) structural/positional; instructions 101/101; restored.
|
||||
- write the actual incremented output count through the ordinary memory-copy primitive: (29, 53) structural/positional; instructions 105/101; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main a9a3f36cf03be45e012ddbb0b86cc689755c89c0. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 102/102
|
||||
Remote source equals freshly built baseline; still open 97.833336%. Structural diagnosis: Four schedule-only differences remain after the new old-count helper attempts. Test immutable formal pointer variables without altering pointee types or mangled public signature, then copy the real incremented count through memcpy as a memory-write boundary.
|
||||
- const only the count pointer formal: (2, 4) structural/positional; instructions 102/102; restored.
|
||||
- const every real pointer formal: (2, 4) structural/positional; instructions 102/102; restored.
|
||||
- write the actual incremented output count through the ordinary memory-copy primitive: (29, 52) structural/positional; instructions 106/102; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv
|
||||
Fetch origin/main a9a3f36cf03be45e012ddbb0b86cc689755c89c0. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 38/38
|
||||
Remote source equals freshly built baseline; still open 99.42105%. Structural diagnosis: Two source/destination LEA schedule differences; test genuine array-element/array-object addresses and a read-only getter returning the actual name array reference, no raw offsets or pinned objects.
|
||||
- pass explicit addresses of the real source and destination first elements: (2, 2) structural/positional; instructions 38/38; restored.
|
||||
- cast the address of the actual destination name-array object: (2, 2) structural/positional; instructions 38/38; restored.
|
||||
- read the actual source array through a const member getter returning its full array reference: (2, 2) structural/positional; instructions 38/38; restored.
|
||||
- Anonymous double projection best5 diagnosis: [(11, ('fmuls', 'f4, f1, f4'), ('fmuls', 'f1, f1, f4')), (12, ('fmuls', 'f1, f3, f2'), ('fmuls', 'f2, f3, f2')), (13, ('fmuls', 'f2, f3, f4'), ('fmuls', 'f1, f3, f1')), (14, ('fmul', 'f0, f1, f0'), ('fmul', 'f0, f2, f0')), (15, ('stfs', 'f2, 4(r3)'), ('stfs', 'f1, 4(r3)'))]. Temporary diagnosis source restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos
|
||||
Fetch origin/main a9a3f36cf03be45e012ddbb0b86cc689755c89c0. Initial assembly diagnosis: (0, 9) structural/positional differences; instructions 19/19
|
||||
Remote source equals freshly built baseline; still open 96.57895%. Structural diagnosis: Anonymous-double calibration and named coefficient search reaches5 differences, all in y-half-height/X/Y-aspect colors. New actual coordinate-result lifetime boundaries; target19 instructions with self-coalesced Xf2/Yf1 and no stack.
|
||||
- inline only the vertical coordinate product into its output assignment: (0, 0) structural/positional; instructions 19/19; candidate kept.
|
||||
|
||||
## Round9 exact KPAD projection candidate and gate
|
||||
KPADGetProjectionPos: removing the named double scale result lets the correction product coalesce in f0; named real half/aspect locals put those coefficients in f4/f3; inlining only the vertical coordinate expression into dest->y removes its competing local lifetime and fixes the last5 colors. Final19/19 instructions, ctxdiff0, exact-name objdiff100.0%; pool identical0 strings. The existing horizontal local preserves source.x before either output write, including dest/src aliasing. No new volatile, asm, symbol/extent change or data object.
|
||||
All-unit quick authority gate: full43U build passed; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d; all3 pools identical;0 regressions/forbidden/readability warnings. SD122/129 unchanged, Address90/94 unchanged, KPAD21->22/29; code6756->6832/13056, data8032/8032 unchanged.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight
|
||||
Fetch origin/main 8864436cde34e234c6853e021fe428b802033f4a. Initial assembly diagnosis: (0, 7) structural/positional differences; instructions 52/52
|
||||
Remote source equals freshly built baseline; still open 99.23077%. Structural diagnosis: Register-only last after >=3 distinct successfully built new structural/alias/scope variants. Use declsearch on real subobject/scan locals with all assignments preserved; decode PPC paired operations and FP comparisons before scoring.
|
||||
- New register-only seed decoded (0, 3).
|
||||
- Register-only last declsearch: declaration block: | Vec2* center; | KPADInside* kpad; | f32 halfHeightSquared; | f32 halfHeight; | f32 barOffsetX; | f32 barDiagonal; | f32 halfWidthSquared; | f32 halfWidth; | f32 negativeSensorHeight; | f32 barDiagonalSquared; | f32 zero; | start (0, 3) | best (0, 3) after 146 builds; source restored; best order was: | Vec2* center; | KPADInside* kpad; | f32 halfHeightSquared; | f32 halfHeight; | f32 barOffsetX; | f32 barDiagonal; | f32 halfWidthSquared; | f32 halfWidth; | f32 negativeSensorHeight; | f32 barDiagonalSquared; | f32 zero; |
|
||||
Nonexact declaration candidate restored; raw authority (0, 3).
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD select_1obj_first
|
||||
Fetch origin/main 8864436cde34e234c6853e021fe428b802033f4a. Initial assembly diagnosis: (2, 26) structural/positional differences; instructions 109/109
|
||||
Remote source equals freshly built baseline; still open 98.348625%. Structural diagnosis: Register-only last after >=3 distinct successfully built new structural/alias/scope variants. Use declsearch on real subobject/scan locals with all assignments preserved; decode PPC paired operations and FP comparisons before scoring.
|
||||
- New register-only seed decoded (0, 22).
|
||||
- Register-only last declsearch: declaration block: | KPADDPDObject* object; | f32 scale; | f32 productX; | f32 productY; | f32 offsetX; | f32 offsetY; | start (0, 22) | best (0, 22) after 36 builds; source restored; best order was: | KPADDPDObject* object; | f32 scale; | f32 productX; | f32 productY; | f32 offsetX; | f32 offsetY; |
|
||||
Nonexact declaration candidate restored; raw authority (2, 22).
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD select_1obj_first
|
||||
Fetch origin/main 6f49df32b3d1be83a41250c810670894ebe27efe. Initial assembly diagnosis: (2, 26) structural/positional differences; instructions 109/109
|
||||
Remote source equals freshly built baseline; still open 98.348625%. Structural diagnosis: Apply the newly proven projection lifetime lever to the scan: target scale is an anonymousf0 load and each input coordinate coalesces through its use. Test removal of named real scale/product/component temporaries with exact typed field accesses, no arithmetic reassociation.
|
||||
- inline the scale field into both real offset products: (2, 17) structural/positional; instructions 109/109; restored.
|
||||
- inline the dot/cross component products into the two real offset initializers: (4, 22) structural/positional; instructions 109/109; restored.
|
||||
- inline candidate input fields directly into both projected positions: (0, 13) structural/positional; instructions 109/109; restored.
|
||||
- combine anonymous scale and candidate coordinate inputs: (0, 8) structural/positional; instructions 109/109; restored.
|
||||
- combine anonymous product and candidate coordinate inputs: (2, 13) structural/positional; instructions 109/109; restored.
|
||||
- inline all scale/product/coordinate inputs: (0, 0) structural/positional; instructions 109/109; candidate kept.
|
||||
|
||||
## Round9 exact single-object scan candidate and gate
|
||||
select_1obj_first: after structural const/operand trials and declsearch, the projection lifetime finding led to removing named scale, dot/cross component and candidate x/y temporaries. Direct typed field expressions and direct candidate-array loop endpoint recover every target color. Final109/109 instructions/ctxdiff0, exact-name objdiff100.0%; projection remains19/19/ctxdiff0. No extra memory objects/volatile/asm or raw offset casts.
|
||||
All-unit quick authority gate GATE PASS: correct DOL hash; pools identical;0 regressions/forbidden/readability warnings. SD122/129 and Address90/94 unchanged. KPAD22->23/29; round baseline21->23, code6756->7268/13056 (+512), all data8032/8032 unchanged.
|
||||
Read-only origin dependency audit: KPAD dependencies and all owned function symbol definitions are unchanged from f7b1b9b0. Scene dependency changes only rename unrelated fields/getters at unchanged offsets or add IPL_CHANNEL_SELECT_CPP blocks (inactive in both owned scene TUs); owned source is unchanged remotely. No duplicated remote function match found. No symbols.txt changes made locally.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon
|
||||
Fetch origin/main 6f49df32b3d1be83a41250c810670894ebe27efe. Initial assembly diagnosis: (2, 35) structural/positional differences; instructions 101/101
|
||||
Remote source equals freshly built baseline; still open 97.27723%. Structural diagnosis: Apply two newly exact SDK lifetime reconstructions after the extended declaration search plateau17: remove real named field/product/interpolation temporaries so anonymous expressions can coalesce. Preserve the original floating multiplication/addition grouping, calls, guards and each object-field write.
|
||||
- read normal components directly in their real products: (2, 35) structural/positional; instructions 101/101; restored.
|
||||
- read the old horizon axis directly in its interpolation expressions: (2, 28) structural/positional; instructions 101/101; restored.
|
||||
- inline the actual first dot-product component: (2, 35) structural/positional; instructions 101/101; restored.
|
||||
- inline the blend and X-delta subexpressions: (2, 35) structural/positional; instructions 101/101; restored.
|
||||
- read the old circle components directly in their interpolated results: (2, 33) structural/positional; instructions 101/101; restored.
|
||||
- combine normal, axis and dot-product anonymous inputs: (0, 13) structural/positional; instructions 101/101; restored.
|
||||
- combine normal, axis, dot, blend and delta anonymous inputs: (0, 21) structural/positional; instructions 101/101; restored.
|
||||
- combine every actual field/product/interpolation input: (0, 19) structural/positional; instructions 101/101; restored.
|
||||
- write circle interpolation results directly before deriving their true residuals: (2, 35) structural/positional; instructions 101/101; restored.
|
||||
- combine all anonymous inputs with direct circle result stores: (0, 19) structural/positional; instructions 101/101; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon
|
||||
Fetch origin/main b33a493cec82cb6dbb068d07e1ad17c6d0204e32. Initial assembly diagnosis: (2, 35) structural/positional differences; instructions 101/101
|
||||
Remote source equals freshly built baseline; still open 97.27723%. Structural diagnosis: New anonymous normal/axis/product inputs lower35 to13 exact positional differences with zero decoded structural difference; revisit register-only last declsearch only on this improved readable source, preserving all initialized assignments and rounding.
|
||||
- Anonymous field/product declsearch: declaration block: | f32 magnitude; | f32 normalizedX; | f32 normalizedY; | f32 blend; | f32 projectedX; | f32 smoothing; | f32 deltaX; | f32 nextX; | f32 nextY; | f32 normalized; | f32 unitX; | f32 oldCircleX; | f32 oldCircleY; | f32 unitY; | f32 circleX; | f32 deltaCircleX; | f32 circleY; | f32 deltaCircleY; | start (0, 13) | improved (0, 11) | improved (0, 9) | improved (0, 3) | best (0, 3) after 650 builds; kept in source: | f32 magnitude; | f32 normalizedX; | f32 normalizedY; | f32 blend; | f32 projectedX; | f32 smoothing; | f32 deltaX; | f32 nextX; | f32 nextY; | f32 normalized; | f32 oldCircleY; | f32 circleX; | f32 oldCircleX; | f32 unitY; | f32 unitX; | f32 deltaCircleX; | f32 circleY; | f32 deltaCircleY; |
|
||||
Nonexact anonymous-field/product declaration candidate restored; raw authority (0, 3).
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADRead
|
||||
Fetch origin/main b33a493cec82cb6dbb068d07e1ad17c6d0204e32. Initial assembly diagnosis: (11, 89) structural/positional differences; instructions 459/459
|
||||
Remote source equals freshly built baseline; still open 97.52723%. Structural diagnosis: Raw-copy target computes the output cursor before loading the ring index, whereas prior pointer-first grouping retained index computation outside the cursor scope and enlarged the frame. New actual cursor/index scope ordering and fewer named count/index lifetimes preserve the complete copy and calibration logic.
|
||||
- compute the copy cursor first and the actual ring index inside its scope: (40, 282) structural/positional; instructions 459/459; restored.
|
||||
- combine cursor/index scope ordering with anonymous ring count loading: build failed 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 # ------------------------------------- # 1454: calc_button_repeat(kpad, device, ringCount); # Error: ^^^^^^^^^ # (10140) undefined identifier 'ringCount' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
|
||||
- reuse the actual later sample-count variable in the raw-copy loop: (40, 282) structural/positional; instructions 459/459; restored.
|
||||
- combine cursor/index scope with both anonymous and reused count values: build failed 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 # ------------------------------------- # 1453: calc_button_repeat(kpad, device, ringCount); # Error: ^^^^^^^^^ # (10140) undefined identifier 'ringCount' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable
|
||||
Fetch origin/main b33a493cec82cb6dbb068d07e1ad17c6d0204e32. Initial assembly diagnosis: (14, 45) structural/positional differences; instructions 250/250
|
||||
Remote source equals freshly built baseline; still open 94.82%. Structural diagnosis: Distance filter target multiplies its weight in place in f2 then produces distance delta in f1. Remove the named next-value local and use the stored true dist_vec field before its speed/position updates; test direct geometric expressions without changing operation grouping.
|
||||
- derive distance speed from the actual stored delta after an in-place gain product: (14, 43) structural/positional; instructions 250/250; restored.
|
||||
- combine anonymous stored distance delta with the explicit magnitude sign branch: (14, 43) structural/positional; instructions 250/250; restored.
|
||||
- combine anonymous distance delta with direction-first rotation products: (12, 38) structural/positional; instructions 250/250; restored.
|
||||
- Anonymous-field/product horizon best3 diagnosis: [(44, ('fmuls', 'f5, f8, f6'), ('fmuls', 'f8, f8, f6')), (47, ('fmuls', 'f2, f5, f2'), ('fmuls', 'f2, f8, f2')), (48, ('fmuls', 'f0, f5, f0'), ('fmuls', 'f0, f8, f0'))]. Temporary diagnosis source restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon
|
||||
Fetch origin/main e3457d11a22a9f0d8300daed615914fb230bea7d. Initial assembly diagnosis: (2, 35) structural/positional differences; instructions 101/101
|
||||
Remote source equals freshly built baseline; still open 97.27723%. Structural diagnosis: Remaining3 instructions in the anonymous-field/product best declaration candidate all identify the same structural temporary boundary: target overwrites magnitudef8 with magnitude*blend, source creates independent smoothingf5. Reuse the real magnitude as the interpolation weight after its normalization work is finished.
|
||||
- reuse magnitude in place for the true interpolation weight in the best3 real-local context: (0, 0) structural/positional; instructions 101/101; candidate kept.
|
||||
|
||||
## Round9 exact acceleration horizon candidate and gate
|
||||
calc_acc_horizon: anonymous normal/old-axis/first-product inputs reduce35 colors to13; declaration search reduces13->3. All three remaining instructions prove the same temporary difference: target overwrites magnitude f8 with magnitude*blend, while source creates smoothing f5. Reusing magnitude as its interpolation weight recovers101/101 instructions and ctxdiff0/exact-name objdiff100.0%. No arithmetic reassociation or changed object writes/calls/guards. Projection and single-object scan remain exact.
|
||||
All-unit quick gate GATE PASS, correct DOL hash, identical pools,0 regressions/forbidden/readability warnings. SDK23->24/29; round21->24, code6756->7672/13056 (+916), data8032/8032. SD122/129, Address90/94 and their code/data totals unchanged.
|
||||
KPADRead failed anonymous-ring-count trials diagnosed: ringCount also supplies the full batch elapsed count to calc_button_repeat after available is capped by caller count. It must retain the original batch count; replacing it with available would change behavior and was not done. Failed compilations do not count toward the three successful source attempts.
|
||||
|
||||
## Round9 final full clean gate and remaining-function audit
|
||||
Full non-quick gate across all3 units GATE PASS; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d; all pools identical;0 regressions/forbidden/readability warnings; every owned data section100%. No data symbol rename or extent correction needed/made. All open target function extents end before/equal the next symbol; no adjacent same-slot word/single/double stack store/reload pair justified new volatile. No byte16/byte8 mask mismatch justified widening.
|
||||
src/scene/sdChannelSelect/iplSDChannelSelect: exact 122 ->122/129; code 29412 ->29412/33828; data 2960 ->2960/2960.
|
||||
src/scene/address/iplAddressEdit: exact 90 ->90/94; code 23044 ->23044/27112; data 2560 ->2560/2560.
|
||||
libs/RVL_SDK/src/kpad/KPAD: exact 21 ->24/29; code 6756 ->7672/13056; data 8032 ->8032/8032.
|
||||
MAX round produced 3 new exact functions; 98 logged successfully built distinct source variants plus1720 declaration-search builds (failed builds excluded). All16 remaining functions have >=3 distinct successfully built source variants in this round. Every nonexact source/header trial was restored; only the newly exact SDK function bodies and this log differ from f7b1b9b0. Unsupported NWC24-error input contract remains unproved; initialized fallback retained.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv 97.73972%; 3 successful distinct source trials; 145/146 frame0x20; missing BS2-manager body reload; switch/for-loop polling and update-reference scopes leave gap.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.81188%; 6 successful distinct source trials; 101/101 frame0x40; counter add/store and first threshold load schedule differ4; postincrement-result helpers and const formal pointer variables unchanged; copied count adds4 instructions.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.833336%; 6 successful distinct source trials; 102/102 frame0x40; counter add/store and first threshold load schedule differ4; old-count helpers/const formals unchanged; copied count adds4 instructions.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.29365%; 3 successful distinct source trials; 126/126 frame0x60; entry indexing and counter/threshold lifetimes; title-ID hoist plus pointer-row/unsigned channel index views leave7; nonexact restored.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.55125%; 3 successful distinct source trials; 361/361 frame0x80; four repeated counter/threshold schedules differ16; named previous counts, comma postincrement and old-count-return helper unchanged.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv 99.65714%; 6 successful distinct source trials; 35/35 frame0x10; heap/manager argument loads reversed; pointer-cell getter const references and real flush-request aggregates all retain2.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj 93.4721%; 3 successful distinct source trials; 233/233 frame0xe0; framebuffer conversion and scissor/projection coordinate lifetimes; dimension references retain68, shared width230 instructions, bounds aggregate251.
|
||||
- src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv 97.44634%; 3 successful distinct source trials; 820/820 frame0x60; target keeps two text addresses across lookups and has one allocation guard; ordinary new with mutable pointer/array/String views remains818/820; restored.
|
||||
- src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv 88.03571%; 3 successful distinct source trials; 82/84 frame0x420; target saves both text pointers before virtual pane lookups; mutable pointer/array/String views still82/84; rematerialization gap remains.
|
||||
- src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv 99.42105%; 6 successful distinct source trials; 38/38 frame0x10; resolved wcsncpy source/destination LEAs reversed; mutable request fields/constructor, actual array addresses and const array-reference getter retain2.
|
||||
- src/scene/address/iplAddressEdit set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err 98.666664%; 3 successful distinct source trials; 76/75 frame0x60; target leaves message ID undefined on unsupported errors; initialized aggregate76, exhaustive safe switch73, grouped safe if65; safe fallback retained.
|
||||
- libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight 99.23077%; 6 successful distinct source trials; 52/52 frame0x30; named-zero and center-subobject view fixes floating colors but leaves3 array-base colors;146-build declsearch plateau3; const/mutable center scalar helpers13 differences.
|
||||
- libs/RVL_SDK/src/kpad/KPAD read_kpad_acc 98.15%; 3 successful distinct source trials; 400/400 frame0x50; smoothing/guard reconstruction reaches one cmpwi5 instead of targetcmplwi5; unsigned predicate switch403, nested switch2 differences, format-relative switch1; restored.
|
||||
- libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable 94.82%; 9 successful distinct source trials; 250/250 frame0x20; distance-weight and late rotation geometry load/product schedules; anonymous stored distance delta/direction-first products lower to38; no exact candidate.
|
||||
- libs/RVL_SDK/src/kpad/KPAD KPADRead 97.52723%; 5 successful distinct source trials; 459/459 frame0xc0; raw-copy cursor endpoint and ring-index/load schedules plus gravity x/y order; complete copy helper459 with250 differences, gravity product locals83, for-loop458; cursor/index scope459 instructions/282 differences; removing full batch count fails because repeat timing still uses it; nonexact restored.
|
||||
- libs/RVL_SDK/src/kpad/KPAD KPADInit 96.51351%; 3 successful distinct source trials; 185/185 frame0x90; delay constant/saved-float/matrix colors; repeat initializer and zero/one order unchanged81, matrix pointer loop scope improves65; restored.
|
||||
New exact names: KPADGetProjectionPos, calc_acc_horizon, select_1obj_first.
|
||||
Final full-gate authority lines:
|
||||
```
|
||||
[src/scene/sdChannelSelect/iplSDChannelSelect] instruction-exact functions: 122/129
|
||||
[src/scene/address/iplAddressEdit] instruction-exact functions: 90/94
|
||||
[libs/RVL_SDK/src/kpad/KPAD] instruction-exact functions: 24/29
|
||||
GATE PASS
|
||||
```
|
||||
Gate-passing source commits: 459cc944 (projection), 021a0466 (single-object scan), b7d4457c (acceleration horizon). Final clean build retains all3 exact matches and every previous exact function. Only libs/RVL_SDK/src/kpad/KPAD.c and this attempts log changed.
|
||||
|
||||
## Round10 MAX continuation baseline and acceptance gates
|
||||
Fresh source baseline d78210528f882407ff363d4a112114670a216ce3. Read AGENTS.md; no subagents or remote writes. Pools first: SDK identical0 strings, SD identical101, Address identical57. Source trials must preserve pool and prior exact functions; only instruction-exact plus exact-name objdiff100 candidates may be retained/committed after all-unit quick gate. Final clean all-unit gate and three successfully built distinct source attempts per remaining function required. Failed compilations excluded.
|
||||
libs/RVL_SDK/src/kpad/KPAD baseline {"fuzzy_match_percent": 98.81893, "total_code": "13056", "matched_code": "7672", "matched_code_percent": 58.762253, "total_data": "8032", "matched_data": "8032", "matched_data_percent": 100.0, "total_functions": 29, "matched_functions": 24, "matched_functions_percent": 82.75862, "total_units": 1}
|
||||
src/scene/sdChannelSelect/iplSDChannelSelect baseline {"fuzzy_match_percent": 99.582596, "total_code": "33828", "matched_code": "29412", "matched_code_percent": 86.945724, "total_data": "2960", "matched_data": "2960", "matched_data_percent": 100.0, "total_functions": 129, "matched_functions": 122, "matched_functions_percent": 94.57364, "total_units": 1}
|
||||
src/scene/address/iplAddressEdit baseline {"fuzzy_match_percent": 99.52479, "total_code": "27112", "matched_code": "23044", "matched_code_percent": 84.995575, "total_data": "2560", "matched_data": "2560", "matched_data_percent": 100.0, "total_functions": 94, "matched_functions": 90, "matched_functions_percent": 95.74468, "total_units": 1}
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. Initial assembly diagnosis: (0, 7) structural/positional differences; instructions 52/52
|
||||
Remote source equals freshly built baseline; still open 99.23077%. Structural diagnosis: Target/ours 52 instructions and frame0x30; width/height squared and zero local lifetime differ in four floating colors and array-base uses r4 instead of target r3 in three instructions. No branch or arithmetic difference. Build genuine shorter squared/negative-height lifetimes and readonly pointer definitions before register-only search; original target PSQ decoded and ctxdiff recorded.
|
||||
- compute the two real squared dimensions directly in the diagonal sum: (0, 3) structural/positional; instructions 52/52; restored.
|
||||
- negate sensor height directly in its real center-field store: (1, 14) structural/positional; instructions 52/52; restored.
|
||||
Trial harness diagonal-sum transform omitted its Python return; aborted before writing source, corrected, not counted as a source attempt. Remote dependency audit d7821052->26d7e1e0: only configure.py switches unrelated already-matched wprintf to Matching; owned source, headers and symbol definitions unchanged.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. Initial assembly diagnosis: (0, 7) structural/positional differences; instructions 52/52
|
||||
Remote source equals freshly built baseline; still open 99.23077%. Structural diagnosis: Target/ours 52 instructions and frame0x30; width/height squared and zero local lifetime differ in four floating colors and array-base uses r4 instead of target r3 in three instructions. No branch or arithmetic difference. Build genuine shorter squared/negative-height lifetimes and readonly pointer definitions before register-only search; original target PSQ decoded and ctxdiff recorded.
|
||||
- inline only the real diagonal sum into sqrt: (0, 0) structural/positional; instructions 52/52; candidate kept.
|
||||
|
||||
## Round10 exact sensor-height candidate and gate
|
||||
KPADSetSensorHeight: target has the diagonal sum as an anonymous sqrt input; named-zero/squared-height order plus removal of the real diagonal-sum local makes the array-base register reuse match as well. 52/52 instructions, frame0x30, ctxdiff0, exact-name objdiff100.0%; pool identical. All-unit quick gate GATE PASS, correct DOL SHA1,0 regressions/forbidden/readability warnings. SDK24->25/29; code7672->7880/13056; data8032/8032 unchanged. SD122/129 and Address90/94 unchanged. Only the exact SDK function and attempts log changed; no headers or data-symbol edits.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD read_kpad_acc
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. 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 frame0x50; smoothing magnitude/delta boundaries and split error/device guards reduce the old mismatch to a single final switch cmpwi5 versus target cmplwi5. Try unsigned relational guards and branch-to-accepted loop forms on that complete readable reconstruction, preserving all unsupported-format returns.
|
||||
- bound the valid fallback format with unsigned relational guards: (10, 195) structural/positional; instructions 401/400; restored.
|
||||
- dispatch each accepted format through a single-pass loop with two break arms: (10, 194) structural/positional; instructions 399/400; restored.
|
||||
- use a looping fallback switch whose accepted arm exits the loop: (15, 198) structural/positional; instructions 401/400; restored.
|
||||
- write the primary and fallback cases as exclusive unsigned bounds: (11, 200) structural/positional; instructions 402/400; restored.
|
||||
- handle the fallback format in a one-case switch followed by a primary-format guard: (13, 196) structural/positional; instructions 399/400; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. 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 frame0x20; target distance weight is updated in place and late geometry coalesces direction products through their sums. Test real Vec2 rotation/midpoint boundaries, anonymous rotation or midpoint values, and direct normal-component input lifetimes before declaration search. Retain original operation grouping and every object-field write.
|
||||
- hold the true dot/cross rotation in a Vec2 local: build failed 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 # ------------------------------------- # 963: f32 scaleX = 0.5f * (kpad->dpdState.candidates[0].x + kpad->dpdState.candidates[1].x); # Error: ^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
|
||||
- evaluate the actual Vec2 cross coordinate before its dot coordinate: build failed 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 # ------------------------------------- # 963: f32 scaleX = 0.5f * (kpad->dpdState.candidates[0].x + kpad->dpdState.candidates[1].x); # Error: ^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
|
||||
- inline midpoint x and y into both actual geometric products: (16, 39) structural/positional; instructions 250/250; restored.
|
||||
- inline the dot rotation expression into its actual geometric products: (19, 45) structural/positional; instructions 250/250; restored.
|
||||
- inline both dot and cross rotation expressions into their geometric products: (10, 23) structural/positional; instructions 250/250; restored.
|
||||
- inline all rotation and midpoint expressions: (12, 35) structural/positional; instructions 250/250; restored.
|
||||
- read normal components through a const subobject view: (12, 38) structural/positional; instructions 250/250; restored.
|
||||
- combine a readonly normal view with anonymous midpoint products: (16, 39) structural/positional; instructions 250/250; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADRead
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. 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 frame0xc0; copy cursor uses target statuses+available then decrement, source (available-1) scale before pointer-add. Ring count is read from an actual u8 field, never changed and still supplies repeat elapsed count; test safe byte/halfword local widths, real cursor lifetime sharing, and the full copy cursor endpoint before declaration search.
|
||||
- keep the actual full batch count in its byte-width local: (11, 89) structural/positional; instructions 459/459; restored.
|
||||
- keep the actual full batch count widened to a halfword local: (11, 89) structural/positional; instructions 459/459; restored.
|
||||
- preserve the nonnegative wrapping ring index as an unsigned local: (12, 89) structural/positional; instructions 459/459; restored.
|
||||
- use an end cursor and copy into the preceding real status slot: (75, 284) structural/positional; instructions 459/459; restored.
|
||||
- reuse the actual later output cursor for the initial raw-copy loop: (46, 276) structural/positional; instructions 459/459; restored.
|
||||
- combine a byte batch count with the real end-cursor copy: (75, 284) structural/positional; instructions 459/459; restored.
|
||||
- combine a halfword batch count and shared output cursor: (46, 276) structural/positional; instructions 459/459; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. Initial assembly diagnosis: (14, 45) structural/positional differences; instructions 250/250
|
||||
Remote source equals freshly built baseline; still open 94.82%. Structural diagnosis: Anonymous rotation inputs improve45 to23 raw differences with unchanged250 instructions. Distance target coalesces the original quotient f2 into its absolute interpolation weight: reuse the real value local after deriving dx, preserving its original zero-validity store. Test combined anonymous-rotation and actual weight reuse before registers.
|
||||
- reuse the distance quotient local for its actual absolute filtering weight: (14, 43) structural/positional; instructions 250/250; restored.
|
||||
- combine distance-value reuse with anonymous dot/cross rotation inputs: (10, 23) structural/positional; instructions 250/250; restored.
|
||||
- fix C89 leading declarations for a real Vec2 rotation local: build failed 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 # ------------------------------------- # 961: scaleX = 0.5f * (kpad->dpdState.candidates[0].x + kpad->dpdState.candidates[1].x); # Error: ^^^^^^ # (10140) undefined identifier 'scaleX' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
|
||||
- combine the real Vec2 rotation and distance weight reuse: build failed 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 # ------------------------------------- # 960: scaleX = 0.5f * (kpad->dpdState.candidates[0].x + kpad->dpdState.candidates[1].x); # Error: ^^^^^^ # (10140) undefined identifier 'scaleX' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
|
||||
- reuse distance weight and inline midpoint inputs as well: (12, 35) structural/positional; instructions 250/250; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADInit
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. 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 frame0x90; target keeps zero/one and controller/matrix values in different saved registers and computes the repeat-delay constant earlier. Negative-sine narrowing coalesces to target f0 versus named rotation result f2. Test anonymous true trig result stores, matrix lifetime/representation, and loop-local calibration temporaries before register search.
|
||||
- store each actual trig result directly into its matrix element: (13, 86) structural/positional; instructions 185/185; restored.
|
||||
- combine direct trig stores with a controller-loop matrix pointer scope: (13, 70) structural/positional; instructions 185/185; restored.
|
||||
- keep the actual width height and diagonal calibration locals inside their loop: (9, 81) structural/positional; instructions 185/185; restored.
|
||||
- view the real rotation matrix through the SDK Mtx element layout: build failed 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 # ------------------------------------- # 1530: initial_rotation_(*matrix)[0][0] = one; # Error: ^ # (10377) illegal operands 'int' [ 'int' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
|
||||
- combine local calibration and anonymous trig results: (13, 86) structural/positional; instructions 185/185; restored.
|
||||
- combine typed matrix elements and anonymous trig results: build failed 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 # ------------------------------------- # 1529: initial_rotation_(*matrix)[0][0] = one; # Error: ^ # (10377) illegal operands 'int' [ 'int' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. Initial assembly diagnosis: (14, 45) structural/positional differences; instructions 250/250
|
||||
Remote source equals freshly built baseline; still open 94.82%. Structural diagnosis: Anonymous rotation inputs improve45 to23 raw differences with unchanged250 instructions. Distance target coalesces the original quotient f2 into its absolute interpolation weight: reuse the real value local after deriving dx, preserving its original zero-validity store. Test combined anonymous-rotation and actual weight reuse before registers.
|
||||
- fix C89 leading declarations for a real Vec2 rotation local: (62, 136) structural/positional; instructions 252/250; restored.
|
||||
- combine the real Vec2 rotation and distance weight reuse: (62, 136) structural/positional; instructions 252/250; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADInit
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. Initial assembly diagnosis: (9, 81) structural/positional differences; instructions 185/185
|
||||
Remote source equals freshly built baseline; still open 96.51351%. Structural diagnosis: Trig and geometry structural trials preserve185 instructions but leave temporary rounding/register schedules. Target negative sine remains double until its actual field store. Test that real precision/lifetime boundary and the corrected exact SDK matrix layout before final declaration permutations. Failed C89/matrix harness transforms are excluded from successful trial counts.
|
||||
- retain negative sine at math-library precision until its real float matrix store: (9, 80) structural/positional; instructions 185/185; restored.
|
||||
- retain every true trig result at library precision until the float store: (9, 80) structural/positional; instructions 185/185; restored.
|
||||
- combine a double negative-sine result and controller-loop matrix scope: (9, 64) structural/positional; instructions 185/185; restored.
|
||||
- access actual matrix rows and columns through Mtx: (9, 81) structural/positional; instructions 185/185; restored.
|
||||
- combine library-precision sine and SDK typed matrix elements: (9, 80) structural/positional; instructions 185/185; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. Initial assembly diagnosis: (4, 39) structural/positional differences; instructions 145/146
|
||||
Remote source equals freshly built baseline; still open 97.73972%. Structural diagnosis: Target146 instructions/frame0x20 versus ours145; target reloads the BS2 manager in the polling body while ours reuses the condition pointer. Calls and literal pool already agree. Test actual polling pointer scope and loop exit boundaries before any register search; no unjustified volatile.
|
||||
- retain the actual polling manager as a for-loop condition value: (6, 21) structural/positional; instructions 148/146; restored.
|
||||
- use explicit polling and ready labels for the same loop condition: (9, 40) structural/positional; instructions 145/146; restored.
|
||||
- bind the actual polling state reference in the loop condition: (9, 40) structural/positional; instructions 145/146; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 101/101
|
||||
Remote source equals freshly built baseline; still open 97.81188%. Structural diagnosis: Target and source have identical101/102 instruction counts and frame0x40; the only four differences are counter add/store and first threshold load scheduling. New source lifetime tests qualify the actual title-name input, give its output address a real cursor local, and group the escaped page/channel outputs in their true stack order. No widening, volatile or alias-type violations.
|
||||
- use a const title-name input at the ordinary name-copy boundary: (2, 4) structural/positional; instructions 101/101; restored.
|
||||
- give the real title-name output address its own local lifetime: (2, 4) structural/positional; instructions 101/101; restored.
|
||||
- group the actual page and channel lookup outputs as a ChannelLocation: (16, 17) structural/positional; instructions 101/101; restored.
|
||||
- combine readonly name input and named output cursor: (2, 4) structural/positional; instructions 101/101; restored.
|
||||
- combine actual location outputs and readonly title-name input: (16, 17) structural/positional; instructions 101/101; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 102/102
|
||||
Remote source equals freshly built baseline; still open 97.833336%. Structural diagnosis: Target and source have identical101/102 instruction counts and frame0x40; the only four differences are counter add/store and first threshold load scheduling. New source lifetime tests qualify the actual title-name input, give its output address a real cursor local, and group the escaped page/channel outputs in their true stack order. No widening, volatile or alias-type violations.
|
||||
- use a const title-name input at the ordinary name-copy boundary: (2, 4) structural/positional; instructions 102/102; restored.
|
||||
- give the real title-name output address its own local lifetime: (2, 4) structural/positional; instructions 102/102; restored.
|
||||
- group the actual page and channel lookup outputs as a ChannelLocation: (16, 17) structural/positional; instructions 102/102; restored.
|
||||
- combine readonly name input and named output cursor: (2, 4) structural/positional; instructions 102/102; restored.
|
||||
- combine actual location outputs and readonly title-name input: (16, 17) structural/positional; instructions 102/102; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. 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 frame0x60; a real titleId hoist previously reduced22 to7 differences, with three channel-address operand differences and four postcopy counter/threshold schedules. New contiguous channel-row indexing order, real name input/output lifetimes, and title-state scope preserve the complete ordered scan.
|
||||
- use index-first subscripting of the actual typed channel row: (2, 7) structural/positional; instructions 126/126; restored.
|
||||
- use a readonly pointer to the complete channel row array: (2, 7) structural/positional; instructions 126/126; restored.
|
||||
- combine the hoisted title value with readonly collected-name input: (2, 7) structural/positional; instructions 126/126; restored.
|
||||
- combine index-first row addressing and a real name output cursor: (2, 7) structural/positional; instructions 126/126; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main 26d7e1e052a80ea55d0591a82653370965ad5bb2. 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 frame0x80; four identical counter/threshold schedules differ16 total. Test the same real name-input/output lifetime boundaries, and anonymous cache/lookup title values preserving every special-channel ordering branch.
|
||||
- make each actual special-channel collected-name input readonly: (8, 16) structural/positional; instructions 361/361; restored.
|
||||
- name each real special-channel name output cursor before memcpy: (8, 16) structural/positional; instructions 361/361; restored.
|
||||
- combine readonly collected-name inputs and named output cursors: (8, 16) structural/positional; instructions 361/361; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv
|
||||
Fetch origin/main 805e84045c82629c645e9ef1787c30d2bc33b5e7. 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 frame0x10; only heap r4 and save-manager r3 argument-load order differs. Test actual returned file/output-field lifetimes and readonly pointee reference getters scoped to this TU. Keep the flag setter before heap/manager loads, every following store/call unchanged, and no volatile.
|
||||
- name the actual returned asynchronous save file before its field store: (2, 2) structural/positional; instructions 35/35; restored.
|
||||
- bind the real asynchronous file output field by reference at the call: (2, 2) structural/positional; instructions 35/35; restored.
|
||||
- call through actual manager and heap object references at the flush boundary: (2, 2) structural/positional; instructions 35/35; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj
|
||||
Fetch origin/main 805e84045c82629c645e9ef1787c30d2bc33b5e7. 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 frame0xe0; target keeps projection width in saved f29, source retains widthScale there; framebuffer conversion scheduling and matrix temporary colors follow from those lifetimes. Test a projection-width local scoped only to the transformed branch, anonymous matrix bound quotients, and direct quotient use before register-only last.
|
||||
- keep a branch-local projection width distinct from final scissor width: (23, 68) structural/positional; instructions 233/233; restored.
|
||||
- combine branch-local projection width with direct horizontal quotient use: (36, 71) structural/positional; instructions 233/233; restored.
|
||||
- inline the actual top projection quotient into its matrix bound: (23, 67) structural/positional; instructions 233/233; restored.
|
||||
- inline all actual matrix bound quotients while retaining each final bound: (38, 71) structural/positional; instructions 233/233; restored.
|
||||
- combine anonymous matrix quotients and branch-local projection width: (38, 71) structural/positional; instructions 233/233; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv
|
||||
Fetch origin/main 805e84045c82629c645e9ef1787c30d2bc33b5e7. Initial assembly diagnosis: (19, 323) structural/positional differences; instructions 820/820
|
||||
Remote source equals freshly built baseline; still open 97.44634%. Structural diagnosis: 820/820 frame0x60; target has one balloon allocation guard and keeps both text input addresses across virtual pane lookups. Ordinary new recovers the real allocation boundary but leaves818/820 instructions. Test pointer-definition constness, a String pointer receiver reused across the real text reads, and an actual name/display input aggregate; keep literal token order.
|
||||
- combine ordinary balloon allocation and a const name-pointer definition: (23, 331) structural/positional; instructions 818/820; restored.
|
||||
- combine ordinary allocation and an actual String pointer used for both text inputs: (23, 331) structural/positional; instructions 818/820; restored.
|
||||
- combine ordinary allocation and a real pair of readonly name/display input addresses: (23, 331) structural/positional; instructions 818/820; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv
|
||||
Fetch origin/main 805e84045c82629c645e9ef1787c30d2bc33b5e7. Initial assembly diagnosis: (10, 68) structural/positional differences; instructions 82/84
|
||||
Remote source equals freshly built baseline; still open 88.03571%. Structural diagnosis: 82/84 frame0x420; target computes text LEAs before virtual lookups and retains them in r29, source rematerializes them afterwards. Test const pointer definitions and the real copied friend-info/String object view lifetimes; no extra buffers or dummy objects.
|
||||
- give both existing readonly text pointers const definitions: (10, 68) structural/positional; instructions 82/84; restored.
|
||||
- reuse a String pointer receiver for every real string operation: (10, 39) structural/positional; instructions 83/84; restored.
|
||||
- read the actual copied friend-info object through a named const reference: (14, 71) structural/positional; instructions 80/84; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv
|
||||
Fetch origin/main 805e84045c82629c645e9ef1787c30d2bc33b5e7. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 38/38
|
||||
Remote source equals freshly built baseline; still open 99.42105%. Structural diagnosis: 38/38 frame0x10; target builds readonly name-source r4 before global destination r3, source inverts those two LEAs. Source/destination fields and wcsncpy relocation are proven. Test a const String pointer receiver, actual typed name-array pointer, and a source-array reference with copy length derived from the true ten-character limit; no raw offsets or pinned data.
|
||||
- read the copy source through a const String pointer definition: (2, 2) structural/positional; instructions 38/38; restored.
|
||||
- read the source through a pointer to the actual complete name-array type: (2, 2) structural/positional; instructions 38/38; restored.
|
||||
- bind the actual source array and derive the existing ten-character copy limit: (2, 2) structural/positional; instructions 38/38; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err
|
||||
Fetch origin/main 805e84045c82629c645e9ef1787c30d2bc33b5e7. 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 frame0x60; the target message-ID register is undefined for unsupported errors. Retain the initialized server fallback. New readonly cache-object access, anonymous actual error-code formatting input, and a typed supported-message enum test legitimate source boundaries without uninitialized assumptions.
|
||||
- read the actual cache error through a typed readonly FriendListCache pointer: (1, 30) structural/positional; instructions 76/75; restored.
|
||||
- pass the actual cache error directly into its wide-format call: (1, 30) structural/positional; instructions 76/75; restored.
|
||||
- select initialized supported message values through a real enum local: (1, 30) structural/positional; instructions 76/75; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADInit
|
||||
Fetch origin/main 805e84045c82629c645e9ef1787c30d2bc33b5e7. Initial assembly diagnosis: (9, 81) structural/positional differences; instructions 185/185
|
||||
Remote source equals freshly built baseline; still open 96.51351%. Structural diagnosis: Register-only last after the logged structural/local-lifetime/operand trials. Search declaration permutations on the best newly tested readable context; keep every real initialized assignment, existing exact function and every field/call unchanged. Decode PSQ and FP comparisons; raw ctxdiff and objdiff remain authority.
|
||||
- Declaration-search context /tmp/fz16r10.init.more.2.c: (9, 64) structural/positional differences; instructions 185/185; initialized real repeated-delay value is40000, with all field writes retained.
|
||||
- KPADInit register-only last declsearch: declaration block: | KPADInside* kpad; | f32 distanceValue; | f32 sensorDistance; | f32 rotationElement; | f64 negativeSine; | f32 referenceWidth; | f32 referenceHeight; | f32 objectInterval; | f32 zero; | f32 degreesToRadians; | f32 one; | u32 i; | s32 chan; | BOOL enabled; | u16 repeatDelay; | start (6, 64) | improved (6, 53) | improved (6, 50) | best (6, 50) after 312 builds; kept in source: | f32 referenceHeight; | f32 objectInterval; | f32 sensorDistance; | f32 rotationElement; | f64 negativeSine; | f32 referenceWidth; | KPADInside* kpad; | f32 distanceValue; | f32 zero; | f32 degreesToRadians; | f32 one; | u32 i; | s32 chan; | BOOL enabled; | u16 repeatDelay; |
|
||||
Nonexact declaration candidate restored; (8, 50) structural/positional differences; instructions 185/185.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADRead
|
||||
Fetch origin/main 805e84045c82629c645e9ef1787c30d2bc33b5e7. Initial assembly diagnosis: (11, 89) structural/positional differences; instructions 459/459
|
||||
Remote source equals freshly built baseline; still open 97.52723%. Structural diagnosis: New target instruction84 moves available into the real decrement counter before the ring-count clear; prior endpoint tests assigned it after that clear. Extend the real counter lifetime first, then combine statuses+available endpoint and ring-index scope. Preserve the full repeat batch count; test gravity y/x operand order only after the copy structure.
|
||||
- initialize the actual raw-copy counter before clearing the batch field: (9, 86) structural/positional; instructions 459/459; restored.
|
||||
- combine early decrement-count initialization and a statuses-plus-available endpoint: (44, 283) structural/positional; instructions 459/459; restored.
|
||||
Read cursor-scope harness omitted the extracted constant defining the old index block; aborted before source write, corrected, not counted. Real early counter assignment improved89->86/459 before the field clear.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADRead
|
||||
Fetch origin/main 805e84045c82629c645e9ef1787c30d2bc33b5e7. Initial assembly diagnosis: (11, 89) structural/positional differences; instructions 459/459
|
||||
Remote source equals freshly built baseline; still open 97.52723%. Structural diagnosis: New target instruction84 moves available into the real decrement counter before the ring-count clear; prior endpoint tests assigned it after that clear. Extend the real counter lifetime first, then combine statuses+available endpoint and ring-index scope. Preserve the full repeat batch count; test gravity y/x operand order only after the copy structure.
|
||||
- combine early counter initialization and pointer-before-ring-index scope: (40, 282) structural/positional; instructions 459/459; restored.
|
||||
- give the real copy pointer a leading declaration with the early counter scope: (40, 282) structural/positional; instructions 459/459; restored.
|
||||
- combine early counter and ring-index scope with target gravity operand order: (36, 282) structural/positional; instructions 459/459; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD read_kpad_acc
|
||||
Fetch origin/main 805e84045c82629c645e9ef1787c30d2bc33b5e7. Initial assembly diagnosis: (16, 66) structural/positional differences; instructions 400/400
|
||||
Remote source equals freshly built baseline; still open 98.15%. Structural diagnosis: Further actual inline boundary: the 400-instruction target accepts either FS format through two unsigned equality checks and a shared negative exit. A boolean support predicate may retain that positive-branch graph; compare real unsigned scalar, const sample-pointer and byte-pointer helpers after the smoothing/guard reconstruction, before registers.
|
||||
- unsigned scalar format with explicit accepted returns: (15, 204) structural/positional; instructions 404/400; restored.
|
||||
- readonly sample pointer with accepted positive returns: (15, 204) structural/positional; instructions 404/400; restored.
|
||||
- readonly format-byte pointer with accepted positive returns: (15, 204) structural/positional; instructions 404/400; restored.
|
||||
- unsigned scalar short-circuit accepted predicate: (13, 197) structural/positional; instructions 403/400; restored.
|
||||
- unsigned scalar switch returning real format support: (20, 207) structural/positional; instructions 408/400; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable
|
||||
Fetch origin/main 805e84045c82629c645e9ef1787c30d2bc33b5e7. Initial assembly diagnosis: (14, 45) structural/positional differences; instructions 250/250
|
||||
Remote source equals freshly built baseline; still open 94.82%. Structural diagnosis: Best anonymous rotation inputs lower45->23/250 while preserving0x20 frame. Target negates directionY before later rotation products and coalesces midpoint-X into the projected-Y expression. Test those actual sign/input/intermediate lifetimes, plus readonly normal inputs, on the anonymous rotation context before declaration search.
|
||||
- give the real negative direction-Y input an independent lifetime before anonymous products: (13, 34) structural/positional; instructions 250/250; restored.
|
||||
- name normal-Y then normal-X only at the late positional projection: (24, 45) structural/positional; instructions 250/250; restored.
|
||||
- reuse the midpoint-X scalar for its actual projected-Y value after projected-X is computed: (12, 35) structural/positional; instructions 250/250; restored.
|
||||
- use a readonly normal subobject view with anonymous rotation inputs: (10, 23) structural/positional; instructions 250/250; restored.
|
||||
|
||||
## Round10 final full clean gate and remaining-function audit
|
||||
Full non-quick gate across all3 units GATE PASS; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d; all pools identical;0 regressions/forbidden/readability warnings; every owned data section100%. No data symbol rename or extent correction needed/made. All open target function extents end before/equal the next symbol; no adjacent same-slot word/single/double stack store/reload pair justified new volatile. No byte16/byte8 mask mismatch justified widening.
|
||||
libs/RVL_SDK/src/kpad/KPAD: exact 24 ->25/29; code 7672 ->7880/13056; data 8032 ->8032/8032.
|
||||
src/scene/sdChannelSelect/iplSDChannelSelect: exact 122 ->122/129; code 29412 ->29412/33828; data 2960 ->2960/2960.
|
||||
src/scene/address/iplAddressEdit: exact 90 ->90/94; code 23044 ->23044/27112; data 2560 ->2560/2560.
|
||||
MAX round produced 1 new exact function; 89 logged successfully built distinct source variants plus312 declaration-search builds (failed builds excluded). All15 remaining functions have >=3 distinct successfully built source variants in this round. Every nonexact source/header trial was restored; only the newly exact SDK function bodies and this log differ from d7821052. Unsupported NWC24-error input contract remains unproved; initialized fallback retained.
|
||||
- libs/RVL_SDK/src/kpad/KPAD read_kpad_acc 98.15%; 10 successful distinct source trials; 400/400 frame0x50; smoothing/guard reconstruction has only cmpwi5 versus cmplwi5; relational401, positive single-pass399, actual support-predicate helpers403-408; restored.
|
||||
- libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable 94.82%; 15 successful distinct source trials; 250/250 frame0x20; distance weight and rotation/product schedules; anonymous rotations reduce45->23, true rotation aggregate252, normal/sign/midpoint reuse do not close gap; restored.
|
||||
- libs/RVL_SDK/src/kpad/KPAD KPADRead 97.52723%; 12 successful distinct source trials; 459/459 frame0xc0; cursor endpoint/index/counter scope and gravity operand schedules; safe u8/u16 full batch counts unchanged89, early real counter reduces86, endpoint scopes frame0xd0/282; restored.
|
||||
- libs/RVL_SDK/src/kpad/KPAD KPADInit 96.51351%; 9 successful distinct source trials; 185/185 frame0x90; repeat constant/global base and saved FP/matrix colors; actual double sine and matrix scope64, 312-build declaration search50 with6 decoded structural differences; restored.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv 97.73972%; 3 successful distinct source trials; 145/146 frame0x20; polling condition pointer is reused instead of target body reload; pointer-for-loop148, labels/reference145; restored.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.81188%; 5 successful distinct source trials; 101/101 frame0x40; four counter/threshold schedules; const name/output cursor unchanged4, true location aggregate17; restored.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.833336%; 5 successful distinct source trials; 102/102 frame0x40; four counter/threshold schedules; const name/output cursor unchanged4, location aggregate17; restored.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.29365%; 4 successful distinct source trials; 126/126 frame0x60; entry-address operand order plus counter/threshold schedule; hoisted ID and new row-array/name views remain7; restored.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.55125%; 3 successful distinct source trials; 361/361 frame0x80; four repeated count/threshold schedules differ16; readonly name and real output-cursor lifetimes unchanged; restored.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv 99.65714%; 3 successful distinct source trials; 35/35 frame0x10; heap/manager argument load order differs2; real returned-file/output-field and manager/heap reference lifetimes unchanged; restored.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj 93.4721%; 5 successful distinct source trials; 233/233 frame0xe0; framebuffer conversion/projection-width/output lifetimes; branch-local projection width68, anonymous top quotient67, anonymous four quotients71; restored.
|
||||
- src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv 97.44634%; 3 successful distinct source trials; 820/820 frame0x60; target one allocation guard and retained two text addresses; ordinary new plus const-pointer/String-pointer/actual text-input pair still818/820; restored.
|
||||
- src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv 88.03571%; 3 successful distinct source trials; 82/84 frame0x420; text pointers rematerialize after virtual lookups; const definitions82, complete String pointer83/84, copied friend reference80; restored.
|
||||
- src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv 99.42105%; 3 successful distinct source trials; 38/38 frame0x10; wcsncpy source/destination LEAs reversed; const String pointer, full source-array pointer/reference keep2; restored.
|
||||
- src/scene/address/iplAddressEdit set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err 98.666664%; 3 successful distinct source trials; 76/75 frame0x60; target leaves message ID undefined for unsupported errors; const cache, anonymous error format input and supported enum still76; initialized fallback retained.
|
||||
New exact names: KPADSetSensorHeight.
|
||||
Final full-gate authority lines:
|
||||
```
|
||||
[libs/RVL_SDK/src/kpad/KPAD] instruction-exact functions: 25/29
|
||||
[src/scene/sdChannelSelect/iplSDChannelSelect] instruction-exact functions: 122/129
|
||||
[src/scene/address/iplAddressEdit] instruction-exact functions: 90/94
|
||||
GATE PASS
|
||||
```
|
||||
Final source-isolation/remote audit: origin/main 8a07484e8aea9bdb38db258f5a6eb16347197c86 has no owned source/header/symbol changes from d7821052. SDK source differs only inside newly exact KPADSetSensorHeight; scene sources, headers, symbol metadata and configure.py unchanged locally. Nonexact trials restored. Commit64bbfbba contains the exact height match and its quick all-unit gate; this final audit records the clean full gate and89 successfully built distinct source variants plus312 declaration builds.
|
||||
|
||||
@@ -1,300 +0,0 @@
|
||||
# pk2 max parked retry
|
||||
|
||||
Applied unslop and coah-voice writing passes to the required report. Worker scope is four assigned units, config data proofs, and this log. No orchestration.
|
||||
Start HEAD and origin/main: e3457d11. Clean working tree. Origin fetched under /tmp/wii-git.lock.
|
||||
Memory startup check: commands run successfully; historical bubblewrap failure is absent in this environment.
|
||||
|
||||
libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL: initial pool check: POOL IDENTICAL up to 1 (mine=1 base=1)
|
||||
libs/RevoEX/src/nwc24/NWC24Download: initial pool check: POOL IDENTICAL up to 3 (mine=3 base=3)
|
||||
libs/RVL_SDK/src/fa/driver/sd_drv: initial pool check: POOL IDENTICAL up to 46 (mine=46 base=46)
|
||||
libs/RVL_SDK/src/fa/pf_cache: initial pool check: POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
DATA AUDIT: all four assigned units already have 100% matched data in the live report; target/source data names, extents, and section scores agree. No config rename or extent change needed. pf_cache has no data sections.
|
||||
BEGIN NHTTPi_strnicmp: fetched origin/main=e3457d11a22a9f0d8300daed615914fb230bea7d; owned source differs from HEAD on remote=False; diagnosis metric=((2, 2), 51, 51)
|
||||
DIAGNOSIS NHTTPi_strnicmp: Same 0x10 frame, 51/51 instructions; only hoisted Z and zero constants exchange instruction order. No stack store/reload evidence supports volatile. Pointees already const. No extent overlap. Prior declaration permutations excluded.
|
||||
ATTEMPT NHTTPi_strnicmp: read-only scalar pointer helper makes character values immutable views; source dc64c9a66cda; objdiff=99.76471%; metric=((2, 2), 51, 51); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
ATTEMPT NHTTPi_strnicmp: conditional-expression helper instead of argument mutation; source 3dbaa1148791; objdiff=99.76471%; metric=((2, 2), 51, 51); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
ATTEMPT NHTTPi_strnicmp: strict uppercase bounds preserve ASCII interval with different comparison lowering; source 6b4412f9238d; objdiff=49.117645%; metric=((36, 50), 50, 51); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
BEGIN NHTTPi_compareToken: fetched origin/main=e3457d11a22a9f0d8300daed615914fb230bea7d; owned source differs from HEAD on remote=False; diagnosis metric=((24, 42), 44, 45)
|
||||
DIAGNOSIS NHTTPi_compareToken: Target has condition-entry loop with equality at bottom, right folding keeps shifted candidate then selects original on false; ours body-entry loop adds one branch and lacks that right selection. Target raw left byte survives in r31 for terminator check, same 0x10 frame.
|
||||
ATTEMPT NHTTPi_compareToken: condition-entry loop compares inlined folds directly; source 0e30c24d2a81; objdiff=94.62222%; metric=((7, 30), 44, 45); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
ATTEMPT NHTTPi_compareToken: fold helper takes read-only byte pointer and preserves raw input alias; source 4cc0b6297c87; objdiff=94.62222%; metric=((7, 30), 44, 45); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
ATTEMPT NHTTPi_compareToken: signed-byte read-only view with conditional fold in loop predicate; source 9466120301dc; objdiff=84.62222%; metric=((9, 44), 42, 45); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
BEGIN NHTTPi_Base64Encode: fetched origin/main=e3457d11a22a9f0d8300daed615914fb230bea7d; owned source differs from HEAD on remote=False; diagnosis metric=((71, 58), 119, 119)
|
||||
DIAGNOSIS NHTTPi_Base64Encode: 119/119 instructions, same 0x20 frame and triplet unrolling. Target signed padding compare; ours unsigned. Most differences are dependent byte loads, alphabet index fragments, and stores under char aliasing; target keeps source[1] in r10, source[2] in r7 and early first fragment live.
|
||||
ATTEMPT NHTTPi_Base64Encode: signed length and signed-byte input view tighten source alias type; source eb7a0c5a67ab; objdiff=62.42857%; metric=((69, 56), 119, 119); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
ATTEMPT NHTTPi_Base64Encode: signed-byte snapshots with explicit triplet and signed padding arithmetic; source e89377650b53; objdiff=62.781513%; metric=((47, 63), 119, 119); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
ATTEMPT NHTTPi_Base64Encode: read-only typed triplet passed to inline encoder; high fragment added before low; source cc15a48005fd; objdiff=64.35294%; metric=((43, 57), 119, 119); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
BEGIN NHTTPi_compareToken: fetched origin/main=e3457d11a22a9f0d8300daed615914fb230bea7d; owned source differs from HEAD on remote=False; diagnosis metric=((24, 42), 44, 45)
|
||||
ATTEMPT NHTTPi_compareToken: right immutable value fold and left mutating fold keep distinct inline lifetimes; source 470960bd5c07; objdiff=94.62222%; metric=((7, 30), 44, 45); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
ATTEMPT NHTTPi_compareToken: raw signed-byte terminator survives left fold; right const-value return helper; source f90da98d79f2; objdiff=69.28889%; metric=((6, 20), 45, 45); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
ATTEMPT NHTTPi_compareToken: raw unsigned left byte widens at the fold boundary and signed stop check; source cffa6f49daf0; objdiff=94.62222%; metric=((7, 30), 44, 45); unit code/data/functions=1388/112/11; pool=POOL IDENTICAL up to 1 (mine=1 base=1); regressions=[]; restored
|
||||
BEGIN NWC24InitDlTask: fetched origin/main=d78210528f882407ff363d4a112114670a216ce3; owned source differs from HEAD on remote=False; diagnosis metric=((0, 31), 144, 144)
|
||||
DIAGNOSIS NWC24InitDlTask: 0x60 frame and 144/144 instructions; structural score zero. Zero/home ID/header/title/group values cycle saved registers. No volatile store-reload proof. Headers and task permission views are read-only candidates; validate alias assumptions before register search.
|
||||
ATTEMPT NWC24InitDlTask: permission boundary receives const task and cached header explicitly; source ff1390188311; objdiff=98.854164%; metric=((0, 33), 144, 144); unit code/data/functions=8140/80/25; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
ATTEMPT NWC24InitDlTask: owner components use const parse views and read-only initial header; source dadcc1f11b6b; BUILD FAILED m int -fp hardware -Cpp_exceptions off -O4,p -inline auto -pragma "cats off" -pragma "warn_notinlined off" -maxerrors 1 -nosyspath -RTTI off -fp_contract on -str reuse -DSDK_IPL -D_REVOLUTION -DMEM_MANAGER_DIRECT -i include -i include/global -i libs/MetroTRK/include -i libs/Runtime/include -i libs/MSL/include -i libs/RVL_SDK/include -i libs/RevoEX/include -i libs/NW4R/include -i libs/RVLMiddleware/eZiText/include -i libs/RVLMiddleware/TMC_JPEG/include -i libs/RVLFaceLib/include -i libs/EGG/include -i libs/OperaWWW/include -ir libs/RVL_SDK/include/private/bte -i build/43U/include -DBUILD_VERSION=0 -DVERSION_43U -i libs/RVL_SDK/include/private/bte -DNDEBUG=1 -DTARGET_RVL -ipa file -fp_contract off -lang=c -MMD -c libs/RevoEX/src/nwc24/NWC24Download.c -o build/43U/src/libs/RevoEX/src/nwc24 && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RevoEX/src/nwc24/NWC24Download.d build/43U/src/libs/RevoEX/src/nwc24/NWC24Download.d
|
||||
### mwcceppc.exe Compiler:
|
||||
# File: libs\RevoEX\src\nwc24\NWC24Download.c
|
||||
# ----------------------------------------------
|
||||
# 268: const char* ownerHighText = homePath + 7;
|
||||
# Error: ^^^^^
|
||||
# (10141) expression syntax error
|
||||
# Too many errors printed, aborting program
|
||||
|
||||
User break, cancelled...
|
||||
ninja: build stopped: subcommand failed.
|
||||
|
||||
BEGIN NWC24UpdateDlTask: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((19, 250), 249, 253)
|
||||
DIAGNOSIS NWC24UpdateDlTask: Target frame 0x20, explicit r28..r31 saves; source 0x30, five-register save helper. Target group check keeps allowed boolean and groupId in different saved lifetimes; retry branch uses positive cached-work view and shifted bit first. No store/reload volatile evidence. Reducing helper live values is structural priority.
|
||||
ATTEMPT NWC24UpdateDlTask: read-only permission helper and nested group boolean control saved-value lifetime; source 63d243827abe; objdiff=98.695656%; metric=((5, 43), 253, 253); unit code/data/functions=8140/80/25; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
ATTEMPT NWC24UpdateDlTask: read-only cached-work retry helper and shifted retry mask operand first; source 3c443ac7ae56; objdiff=98.715416%; metric=((5, 43), 253, 253); unit code/data/functions=8140/80/25; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
ATTEMPT NWC24UpdateDlTask: caller-owned universal time object bounds access-time helper lifetime with const permissions; source 5d281c43af14; objdiff=97.885376%; metric=((11, 148), 251, 253); unit code/data/functions=8140/80/25; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
BEGIN NWC24InitDlTask: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((0, 31), 144, 144)
|
||||
DIAGNOSIS NWC24InitDlTask: 0x60 frame and 144/144 instructions; structural score zero. Zero/home ID/header/title/group values cycle saved registers. No volatile store-reload proof. Headers and task permission views are read-only candidates; validate alias assumptions before register search.
|
||||
ATTEMPT NWC24InitDlTask: permission boundary receives const task and cached header explicitly; source ff1390188311; objdiff=98.854164%; metric=((0, 33), 144, 144); unit code/data/functions=8140/80/25; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
ATTEMPT NWC24InitDlTask: owner components use const parse views and read-only initial header; source cd6db78c6535; objdiff=98.923615%; metric=((0, 31), 144, 144); unit code/data/functions=8140/80/25; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
ATTEMPT NWC24InitDlTask: post-initialization read-only task/header views localize final validation lifetime; source fe5fbec0434b; objdiff=98.854164%; metric=((0, 33), 144, 144); unit code/data/functions=8140/80/25; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
BEGIN NWC24IterateDlTask: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((0, 10), 79, 79)
|
||||
DIAGNOSIS NWC24IterateDlTask: Leaf 79/79 instructions, structural score zero. Only work and derived header registers r6/r7 exchange. Target and source extents equal. Use read-only work/header views and lookup boundary without declaration-order permutations.
|
||||
ATTEMPT NWC24IterateDlTask: const work pointer narrows iteration input alias view; source 487b19d2bdfc; objdiff=100.0%; metric=((0, 0), 79, 79); unit code/data/functions=8456/80/26; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; RETAINED exact, awaiting full gate
|
||||
BEGIN NWC24iCheckDlHeaderConsistency: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((2, 3), 212, 212)
|
||||
DIAGNOSIS NWC24iCheckDlHeaderConsistency: Same 0x2c0 frame, 212/212 instructions. Only task address creation moves after parameter copies. No forced stack spill or volatile evidence. Task object extent and neighbours equal; inspect read-only list view and helper boundaries instead of prior declaration permutations.
|
||||
ATTEMPT NWC24iCheckDlHeaderConsistency: header parameter and both cached header views are const; source f6279354e003; objdiff=98.77358%; metric=((2, 3), 212, 212); unit code/data/functions=8456/80/26; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
ATTEMPT NWC24iCheckDlHeaderConsistency: constant task pointer, repair flag, and read-only list bound preserve immutable input lifetimes; source 4a24bba4583f; objdiff=98.77358%; metric=((2, 3), 212, 212); unit code/data/functions=8456/80/26; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
ATTEMPT NWC24iCheckDlHeaderConsistency: repair read boundary takes task pointer and read-only identifier address; source 39cb60543b0b; objdiff=96.69811%; metric=((15, 170), 210, 212); unit code/data/functions=8456/80/26; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
CHECKPOINT NWC24IterateDlTask: const NWC24Work input view fixes r6/r7 alias allocation. Objdiff 100.0%, 79/79 instructions, ctxdiff diffs 0, code 8140 -> 8456, data 80/80 unchanged. Fresh quick full gate: GATE PASS, regressions 0, forbidden/readability 0, correct DOL SHA1. Final clean full gate still required.
|
||||
```
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] pool: IDENTICAL
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] objdiff: code 8456/12496 data 80/80 functions 26/30 fuzzy 99.1697 linked code 0
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] instruction-exact functions: 26/30
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] section .data size 56 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] section .sbss size 8 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] section .sdata size 16 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] section .text size 12496 match 99.169655
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] below 100: NWC24InitDlTask 98.923615
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] below 100: NWC24UpdateDlTask 95.00395
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] below 100: NWC24iCheckDlHeaderConsistency 98.77358
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] below 100: AddTaskInternal 97.7182
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] baseline: code 8140/12496 data 80 functions 25 fuzzy 99.1521
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 91.02223 -> 91.03278
|
||||
global fuzzy_match_percent: 99.58757 -> 99.58764
|
||||
global complete_code_percent: 73.73083 -> 73.73083
|
||||
global matched_data_percent: 99.42271 -> 99.42271
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
GATE PASS
|
||||
```
|
||||
BEGIN AddTaskInternal: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=True; diagnosis metric=((22, 323), 398, 401)
|
||||
DIAGNOSIS AddTaskInternal: Target/source frames 0x30; 398/401 instructions. URL helper branch lacks target explicit jump; target free-slot counter wider then narrowed when indexed, and retry helper null/non-null branch direction differs. Current template also carries one extra saved register in update inner lifetime. Inspect const validation/URL views and widened search bounds first.
|
||||
ATTEMPT AddTaskInternal: URL validation reads task and header through const views; source a9c8ec831220; objdiff=97.7182%; metric=((22, 323), 398, 401); unit code/data/functions=8456/80/26; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
ATTEMPT AddTaskInternal: free-slot loop uses wide counter and explicit 16-bit entry view with read-only URL validation; source 6ae43c6b3f02; objdiff=97.7182%; metric=((22, 323), 398, 401); unit code/data/functions=8456/80/26; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
ATTEMPT AddTaskInternal: free-slot status uses positive success branch; const URL task/header alias view; source 6eb9e944c574; objdiff=97.7182%; metric=((22, 323), 398, 401); unit code/data/functions=8456/80/26; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
BEGIN pfd_sddrv_init: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((18, 31), 144, 144)
|
||||
DIAGNOSIS pfd_sddrv_init: 144/144 instructions, same 0x20 frame. Target unsigned register null test and branchful identity return; source cmpwi and branchless return, compensated size. Device store precedes media load in target, and final disk store precedes flag load. No same-field immediate store/reload warrants volatile. Try const views and real init helper boundaries.
|
||||
ATTEMPT pfd_sddrv_init: const disk identity view and explicit mismatch return branch; source 905b3c7fadf5; objdiff=92.326385%; metric=((18, 31), 144, 144); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
|
||||
EXTENT AUDIT: all assigned open code symbol extents checked against sorted next symbols. No overlap; no function size edits authorized or needed.
|
||||
NHTTPi_strnicmp: start 0x81497ec4, size 0xcc, next NHTTPi_getUrlEncodedSize 0x81497f90, no extent overlap.
|
||||
NHTTPi_compareToken: start 0x81498454, size 0xb4, next NHTTPi_strtonum 0x81498508, no extent overlap.
|
||||
NHTTPi_Base64Encode: start 0x81498598, size 0x1dc, next NHTTPi_InitThreadInfo 0x81498774, no extent overlap.
|
||||
NWC24InitDlTask: start 0x814ae9b8, size 0x240, next NWC24SetDlId 0x814aebf8, no extent overlap.
|
||||
NWC24IterateDlTask: start 0x814af408, size 0x13c, next NWC24IterateDlTaskEx 0x814af544, no extent overlap.
|
||||
NWC24UpdateDlTask: start 0x814af788, size 0x3f4, next NWC24DeleteDlTask 0x814afb7c, no extent overlap.
|
||||
NWC24iCheckDlHeaderConsistency: start 0x814b0874, size 0x350, next NWC24iCreateDlTaskList 0x814b0bc4, no extent overlap.
|
||||
AddTaskInternal: start 0x814b1208, size 0x644, next DeleteDlTask 0x814b184c, no extent overlap.
|
||||
PFCACHE_DoWriteNumSectorAndFreeIfNeeded: start 0x815c9f54, size 0x3a4, next PFCACHE_DoFlushCache 0x815ca2f8, no extent overlap.
|
||||
pfd_sddrv_init: start 0x815ea638, size 0x240, next pfd_sddrv_mount 0x815ea878, no extent overlap.
|
||||
pfd_sddrv_finalize: start 0x815eab80, size 0xe4, next pfd_sddrv_get_disk_info 0x815eac64, no extent overlap.
|
||||
pfd_sddrv_get_total_sectors: start 0x815eb2a4, size 0x140, next pfd_sddrv_calc_mbr_bpb 0x815eb3e4, no extent overlap.
|
||||
pfd_sddrv_store_mbr_buf: start 0x815ebbb4, size 0x328, next pfd_sddrv_build_mbr_bpb 0x815ebedc, no extent overlap.
|
||||
pfd_sddrv_build_fat32_mbr_bpb: start 0x815eccc0, size 0x378, next pfd_sddrv_full_format 0x815ed038, no extent overlap.
|
||||
ATTEMPT pfd_sddrv_init: media presence follows device assignment through read-only info helper; source 3d1f9324ee5f; objdiff=92.326385%; metric=((18, 31), 144, 144); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
ATTEMPT pfd_sddrv_init: init completion helper owns disk assignment and flags in target store order; source c149ecc642dd; objdiff=92.326385%; metric=((18, 31), 144, 144); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
BEGIN pfd_sddrv_finalize: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((6, 4), 57, 57)
|
||||
DIAGNOSIS pfd_sddrv_finalize: Same 0x10 frame, 57/57 instructions. Four mismatches: final flag load target r3 versus r5, target masks/stores flags before media reset; ours hoists media reset ahead of mask. Record-level return helper can shorten final value lifetime. No proven volatile reload in target.
|
||||
ATTEMPT pfd_sddrv_finalize: completion helper returns success after clearing real record fields; source 0cf2049687eb; objdiff=92.63158%; metric=((6, 4), 57, 57); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
ATTEMPT pfd_sddrv_finalize: const flag field input view in record completion helper; source 5361f291b228; objdiff=92.63158%; metric=((6, 4), 57, 57); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
ATTEMPT pfd_sddrv_finalize: separate read-only record view and mutable record completion boundary; source fe2bf402a758; objdiff=92.63158%; metric=((6, 4), 57, 57); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
BEGIN pfd_sddrv_get_total_sectors: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((0, 6), 80, 80)
|
||||
DIAGNOSIS pfd_sddrv_get_total_sectors: 80/80 instructions and frame unchanged. Six mismatches in final 16-bit multiplier shift/product: target reuses selected exponent r3 and constant r0, source uses r0/r5. Need true narrow shift lifetime before register-only permutations; no reload/spill or extent proof for other levers.
|
||||
ATTEMPT pfd_sddrv_get_total_sectors: const exponent input at 16-bit block multiplier inline boundary; source cbcb2b194abc; objdiff=96.9875%; metric=((3, 10), 80, 80); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
ATTEMPT pfd_sddrv_get_total_sectors: reduce selected 16-bit exponent in place before multiplier shift; source ba2dc2fb501c; objdiff=99.5%; metric=((0, 6), 80, 80); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
ATTEMPT pfd_sddrv_get_total_sectors: sector count helper combines narrow factor and product with const exponent; source 21d00041dc62; objdiff=96.9875%; metric=((3, 10), 80, 80); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
BEGIN pfd_sddrv_store_mbr_buf: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((0, 9), 202, 202)
|
||||
DIAGNOSIS pfd_sddrv_store_mbr_buf: 202/202 instructions, frame identical. Only track-size product and partition start sector exchange r8/r9 within CHS arithmetic. Read-only formatting input and CHS helper boundaries can change alias assumptions; no volatile reload or symbol overlap.
|
||||
ATTEMPT pfd_sddrv_store_mbr_buf: const formatting input parameter isolates CHS reads from output sector stores; source 1a720184cd4f; objdiff=99.75247%; metric=((0, 9), 202, 202); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
ATTEMPT pfd_sddrv_store_mbr_buf: local read-only formatting view spans table lookup and CHS calculation; source 017e7858eba2; objdiff=99.75247%; metric=((0, 9), 202, 202); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
ATTEMPT pfd_sddrv_store_mbr_buf: track-size multiplication in read-only settings helper with const format parameter; source 73df2e161b68; objdiff=99.09406%; metric=((5, 146), 203, 202); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
BEGIN pfd_sddrv_build_fat32_mbr_bpb: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((24, 122), 230, 222)
|
||||
DIAGNOSIS pfd_sddrv_build_fat32_mbr_bpb: 230/222 instructions; same frame. Target reserved sector builder has no null-buffer failure because sole caller passes static 512-byte buffer. Ours inlining keeps null/error path. First block write argument load order also differs. Fix helper type/known object input before scheduling; no extent overlap.
|
||||
ATTEMPT pfd_sddrv_build_fat32_mbr_bpb: reserved sector helper takes real typed sector object instead of byte-pointer alias; source c29717b898f6; objdiff=94.74324%; metric=((26, 122), 230, 222); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
pfd_sddrv_build_fat32_mbr_bpb dead-check proof: private reserved-sector helper has one call site, always g_pfd_sddrv_buf[512], a defined object whose address is nonnull. Removing its unreachable null failure preserves every call and payload store; target inlined block likewise omits it.
|
||||
ATTEMPT pfd_sddrv_build_fat32_mbr_bpb: remove unreachable null guard from single-caller private reserved-sector builder; source 05e9e530517e; objdiff=97.20721%; metric=((18, 100), 216, 222); unit code/data/functions=8472/1016/20; pool=FIRST DIVERGENCE at index 41
|
||||
39 mine=0x850 base=0x850
|
||||
M 'ERR Failed to store BPB values to buf. pfd_sddrv_store_fat32_bpb_buf()'
|
||||
B 'ERR Failed to store BPB values to buf. pfd_sddrv_store_fat32_bpb_buf()'
|
||||
40 mine=0x898 base=0x898
|
||||
M 'ERR Failed to store FSInfo values to buf. pfd_sddrv_store_fat32_fsi_bu'
|
||||
B 'ERR Failed to store FSInfo values to buf. pfd_sddrv_store_fat32_fsi_bu'
|
||||
* 41 mine=0x8e4 base=0x8e4
|
||||
M 'ERROR Failed to SD Card Reset [ret = 0x%x]. pfd_sddrv_full_format()\n'
|
||||
B 'ERR Failed to store reserved for boot sector values to buf. '
|
||||
* 42 mine=0x930 base=0x924
|
||||
M 'ERR Failed to get total sectors. pfd_sddrv_get_total_sectors()\n'
|
||||
B 'pfd_sddrv_store_fat32_reserved_buf()\n'
|
||||
* 43 mine=0x970 base=0x94c
|
||||
M 'ERR Failed to build up and write MBR and BPB fields.\n'
|
||||
B 'ERROR Failed to SD Card Reset [ret = 0x%x]. pfd_sddrv_full_format()\n'
|
||||
|
||||
mine has 44 strings, base has 46; regressions=['main/libs/RVL_SDK/src/fa/driver/sd_drv matched_code', 'main/libs/RVL_SDK/src/fa/driver/sd_drv matched_data', 'main/libs/RVL_SDK/src/fa/driver/sd_drv matched_functions', 'main/libs/RVL_SDK/src/fa/driver/sd_drv pfd_sddrv_full_format']; restored
|
||||
ATTEMPT pfd_sddrv_build_fat32_mbr_bpb: reserved-sector helper owns its sole static destination object directly; source 79b89e963e83; objdiff=97.20721%; metric=((18, 100), 216, 222); unit code/data/functions=8472/1016/20; pool=FIRST DIVERGENCE at index 41
|
||||
39 mine=0x850 base=0x850
|
||||
M 'ERR Failed to store BPB values to buf. pfd_sddrv_store_fat32_bpb_buf()'
|
||||
B 'ERR Failed to store BPB values to buf. pfd_sddrv_store_fat32_bpb_buf()'
|
||||
40 mine=0x898 base=0x898
|
||||
M 'ERR Failed to store FSInfo values to buf. pfd_sddrv_store_fat32_fsi_bu'
|
||||
B 'ERR Failed to store FSInfo values to buf. pfd_sddrv_store_fat32_fsi_bu'
|
||||
* 41 mine=0x8e4 base=0x8e4
|
||||
M 'ERROR Failed to SD Card Reset [ret = 0x%x]. pfd_sddrv_full_format()\n'
|
||||
B 'ERR Failed to store reserved for boot sector values to buf. '
|
||||
* 42 mine=0x930 base=0x924
|
||||
M 'ERR Failed to get total sectors. pfd_sddrv_get_total_sectors()\n'
|
||||
B 'pfd_sddrv_store_fat32_reserved_buf()\n'
|
||||
* 43 mine=0x970 base=0x94c
|
||||
M 'ERR Failed to build up and write MBR and BPB fields.\n'
|
||||
B 'ERROR Failed to SD Card Reset [ret = 0x%x]. pfd_sddrv_full_format()\n'
|
||||
|
||||
mine has 44 strings, base has 46; regressions=['main/libs/RVL_SDK/src/fa/driver/sd_drv matched_code', 'main/libs/RVL_SDK/src/fa/driver/sd_drv matched_data', 'main/libs/RVL_SDK/src/fa/driver/sd_drv matched_functions', 'main/libs/RVL_SDK/src/fa/driver/sd_drv pfd_sddrv_full_format']; restored
|
||||
BEGIN PFCACHE_DoWriteNumSectorAndFreeIfNeeded: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((0, 4), 233, 233)
|
||||
DIAGNOSIS PFCACHE_DoWriteNumSectorAndFreeIfNeeded: 233/233 instructions and same frame. Four register operand differences only in right overlap block, page sector versus recomputed end occupy r4/r5 oppositely. Last-sector subtraction scheduled identically. Data/strings absent, no volatile store-reload evidence or extent overlap. Change read-only overlap input boundaries, no declaration permutations.
|
||||
ATTEMPT PFCACHE_DoWriteNumSectorAndFreeIfNeeded: overlap helper reads request end through const scalar pointer; source 606706d65afa; objdiff=99.8927%; metric=((0, 4), 233, 233); unit code/data/functions=6464/0/35; pool=POOL IDENTICAL up to 0 (mine=0 base=0); regressions=[]; restored
|
||||
ATTEMPT PFCACHE_DoWriteNumSectorAndFreeIfNeeded: overlap helper uses separate const page view for sector input; source d5f6e06ac285; objdiff=99.8927%; metric=((0, 4), 233, 233); unit code/data/functions=6464/0/35; pool=POOL IDENTICAL up to 0 (mine=0 base=0); regressions=[]; restored
|
||||
ATTEMPT PFCACHE_DoWriteNumSectorAndFreeIfNeeded: typed read-only request-end record across overlap update boundary; source 9a7956d662f5; objdiff=99.8927%; metric=((0, 4), 233, 233); unit code/data/functions=6464/0/35; pool=POOL IDENTICAL up to 0 (mine=0 base=0); regressions=[]; restored
|
||||
BEGIN NWC24iCheckDlHeaderConsistency: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=True; diagnosis metric=((2, 3), 212, 212)
|
||||
NWC24iCheckDlHeaderConsistency local type proof: DlTaskData ends with url[0xec], fileName[0x5c], optOut byte and 3 reserved bytes, total 0x200; matches opaque NWC24DlTask 0x200. Stack object replacement represents the same task, with no padding added or extent change.
|
||||
ATTEMPT NWC24iCheckDlHeaderConsistency: real structured task stack object cast at the opaque API boundary; source fcd54af0851f; objdiff=98.77358%; metric=((2, 3), 212, 212); unit code/data/functions=8456/80/26; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
ATTEMPT NWC24iCheckDlHeaderConsistency: structured task receives opaque view through typed inline boundary; source 301ca3eb1edc; objdiff=98.77358%; metric=((2, 3), 212, 212); unit code/data/functions=8456/80/26; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
ATTEMPT NWC24iCheckDlHeaderConsistency: typed task pointer stays structured until each opaque read/delete boundary; source 1bc6e69d54e9; objdiff=98.77358%; metric=((2, 3), 212, 212); unit code/data/functions=8456/80/26; pool=POOL IDENTICAL up to 3 (mine=3 base=3); regressions=[]; restored
|
||||
BEGIN PFCACHE_DoWriteNumSectorAndFreeIfNeeded: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((0, 4), 233, 233)
|
||||
ATTEMPT PFCACHE_DoWriteNumSectorAndFreeIfNeeded: request-end formal is reduced in place to overlap count after deriving last sector; source b10773207f13; objdiff=99.8927%; metric=((0, 4), 233, 233); unit code/data/functions=6464/0/35; pool=POOL IDENTICAL up to 0 (mine=0 base=0); regressions=[]; restored
|
||||
ATTEMPT PFCACHE_DoWriteNumSectorAndFreeIfNeeded: overlap count starts from end and subtracts page before computing last sector; source 85f5d01a2a49; objdiff=99.8927%; metric=((0, 4), 233, 233); unit code/data/functions=6464/0/35; pool=POOL IDENTICAL up to 0 (mine=0 base=0); regressions=[]; restored
|
||||
ATTEMPT PFCACHE_DoWriteNumSectorAndFreeIfNeeded: const source-sector lifetime retained for both overlap updates without separate overlap object; source f643ee71364a; objdiff=99.8927%; metric=((0, 4), 233, 233); unit code/data/functions=6464/0/35; pool=POOL IDENTICAL up to 0 (mine=0 base=0); regressions=[]; restored
|
||||
BEGIN pfd_sddrv_finalize: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((6, 4), 57, 57)
|
||||
PFD_SDDRV_INFO type trial proof: media_inserted/media_ejected are 32-bit truth values. Target init and callbacks write 0/1; lifecycle code tests against zero, and offsets remain 0x10/0x14. BOOL preserves width and layout and adds no volatile.
|
||||
ATTEMPT pfd_sddrv_finalize: media insertion field models target truth value as SDK BOOL; source b5214114691d; objdiff=92.63158%; metric=((6, 4), 57, 57); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
ATTEMPT pfd_sddrv_finalize: both lifecycle truth fields model SDK BOOL with unchanged offsets; source f4736e296197; objdiff=92.63158%; metric=((6, 4), 57, 57); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
ATTEMPT pfd_sddrv_finalize: signed word mask expression preserves only the initialized-bit clearing; source e483acc64c10; objdiff=92.63158%; metric=((6, 4), 57, 57); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
BEGIN pfd_sddrv_get_total_sectors: fetched origin/main=26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source differs from HEAD on remote=False; diagnosis metric=((0, 6), 80, 80)
|
||||
ATTEMPT pfd_sddrv_get_total_sectors: wide unsigned shift factor is narrowed at final sector multiplication; source eef542901c40; objdiff=99.5%; metric=((0, 5), 80, 80); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
ATTEMPT pfd_sddrv_get_total_sectors: signed arithmetic shift factor narrowed at product, exponent constrained to zero through two; source 7322e282bd0f; objdiff=99.5%; metric=((0, 5), 80, 80); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
ATTEMPT pfd_sddrv_get_total_sectors: factor uses explicit unsigned shift expression and single 16-bit conversion; source 8666142025c4; objdiff=96.9875%; metric=((3, 10), 80, 80); unit code/data/functions=8940/3592/21; pool=POOL IDENTICAL up to 46 (mine=46 base=46); regressions=[]; restored
|
||||
|
||||
## Final open-function audit before clean gate
|
||||
Every open symbol was checked after fresh origin fetch. Data and strings stayed identical; all failed variants restored. No declaration permutations used. All 13 open functions have at least three distinct source-level attempts with successful object builds.
|
||||
|
||||
OPEN NHTTPi_strnicmp: 99.76471%; 51/51 instructions; Z and zero initialization order exchanged, every later instruction identical; 3 distinct successful source attempts; all reverted.
|
||||
OPEN NHTTPi_compareToken: 54.622223%; 44/45 instructions; loop entry and right-fold conditional value lifetime differ; 6 distinct successful source attempts; all reverted.
|
||||
OPEN NHTTPi_Base64Encode: 60.285713%; 119/119 instructions; source byte/table lookup scheduling and signed padding comparisons differ; 3 distinct successful source attempts; all reverted.
|
||||
OPEN NWC24InitDlTask: 98.923615%; 144/144 instructions; saved registers for zeros, owner ID, header and permission lifetimes differ; 3 distinct successful source attempts; all reverted.
|
||||
OPEN NWC24UpdateDlTask: 95.00395%; 249/253 instructions; additional saved register/frame and permission/access/retry helper boundaries differ; 3 distinct successful source attempts; all reverted.
|
||||
OPEN NWC24iCheckDlHeaderConsistency: 98.77358%; 212/212 instructions; stack task address materialization scheduled after saved argument copies; 6 distinct successful source attempts; all reverted.
|
||||
OPEN AddTaskInternal: 97.7182%; 398/401 instructions; URL/free-slot/retry branch boundaries and saved register lifetimes differ; 3 distinct successful source attempts; all reverted.
|
||||
OPEN pfd_sddrv_init: 92.326385%; 144/144 instructions; null/identity branch lowering and device/media/flag store-load scheduling differ; 3 distinct successful source attempts; all reverted.
|
||||
OPEN pfd_sddrv_finalize: 92.63158%; 57/57 instructions; final flag-mask register and media-reset scheduling differ; 6 distinct successful source attempts; all reverted.
|
||||
OPEN pfd_sddrv_get_total_sectors: 99.5%; 80/80 instructions; six register differences in narrow multiplier shift and product; 6 distinct successful source attempts; all reverted.
|
||||
OPEN pfd_sddrv_store_mbr_buf: 99.75247%; 202/202 instructions; nine register differences for CHS track product and partition start; 3 distinct successful source attempts; all reverted.
|
||||
OPEN pfd_sddrv_build_fat32_mbr_bpb: 94.75225%; 230/222 instructions; reserved-sector inline null/error path and block-write arguments differ; 3 distinct successful source attempts; all reverted.
|
||||
OPEN PFCACHE_DoWriteNumSectorAndFreeIfNeeded: 99.8927%; 233/233 instructions; request end and page sector exchange r4/r5 in right-overlap arithmetic; 6 distinct successful source attempts; all reverted.
|
||||
|
||||
Source-quality audit: only accepted source change is const NWC24Work* in NWC24IterateDlTask. No comments, new asm, volatile, register keyword, label pins, dummy objects, function renames, symbol/config changes, shared headers, other units, link flags, or remote writes. Data totals remain 112/80/3592/0, all 100%. Local accepted source commit f9c79662.
|
||||
|
||||
## Final full clean gate over all four units
|
||||
|
||||
Command: python3 /mnt/drive2/projects/wii-ipl-workers/_restore0928-tools/gate.py libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL libs/RevoEX/src/nwc24/NWC24Download libs/RVL_SDK/src/fa/driver/sd_drv libs/RVL_SDK/src/fa/pf_cache
|
||||
|
||||
```text
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] pool: IDENTICAL
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] objdiff: code 1388/2248 data 112/112 functions 11/14 fuzzy 87.9359 linked code 0
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] instruction-exact functions: 11/14
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] section .data size 72 match 100.0
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] section .rodata size 40 match 100.0
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] section .text size 2248 match 87.93594
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] below 100: NHTTPi_strnicmp 99.76471
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] below 100: NHTTPi_compareToken 54.622223
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] below 100: NHTTPi_Base64Encode 60.285713
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] baseline: code 1388/2248 data 112 functions 11 fuzzy 87.9359
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] pool: IDENTICAL
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] objdiff: code 8456/12496 data 80/80 functions 26/30 fuzzy 99.1697 linked code 0
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] instruction-exact functions: 26/30
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] section .data size 56 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] section .sbss size 8 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] section .sdata size 16 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] section .text size 12496 match 99.169655
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] below 100: NWC24InitDlTask 98.923615
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] below 100: NWC24UpdateDlTask 95.00395
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] below 100: NWC24iCheckDlHeaderConsistency 98.77358
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] below 100: AddTaskInternal 97.7182
|
||||
[libs/RevoEX/src/nwc24/NWC24Download] baseline: code 8140/12496 data 80 functions 25 fuzzy 99.1521
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] objdiff: code 8940/11760 data 3592/3592 functions 21/26 fuzzy 99.0544 linked code 0
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] instruction-exact functions: 21/26
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] section .bss size 608 match 100.0
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] section .data size 2576 match 100.0
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] section .rodata size 368 match 100.0
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] section .sbss size 40 match 100.0
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] section .text size 11760 match 99.05442
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_init 92.326385
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_finalize 92.63158
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_get_total_sectors 99.5
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_store_mbr_buf 99.75247
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_build_fat32_mbr_bpb 94.75225
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] baseline: code 8940/11760 data 3592 functions 21 fuzzy 99.0544
|
||||
[libs/RVL_SDK/src/fa/pf_cache] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/pf_cache] objdiff: code 6464/7396 data None/None functions 35/36 fuzzy 99.9865 linked code 0
|
||||
[libs/RVL_SDK/src/fa/pf_cache] instruction-exact functions: 35/36
|
||||
[libs/RVL_SDK/src/fa/pf_cache] section .text size 7396 match 99.98648
|
||||
[libs/RVL_SDK/src/fa/pf_cache] below 100: PFCACHE_DoWriteNumSectorAndFreeIfNeeded 99.8927
|
||||
[libs/RVL_SDK/src/fa/pf_cache] baseline: code 6464/7396 data None functions 35 fuzzy 99.9865
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 91.02223 -> 91.03278
|
||||
global fuzzy_match_percent: 99.58757 -> 99.58764
|
||||
global complete_code_percent: 73.73083 -> 73.73083
|
||||
global matched_data_percent: 99.42271 -> 99.42271
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
GATE PASS
|
||||
```
|
||||
|
||||
Before -> after instruction-exact/code/data:
|
||||
NHTTP_stdlib_RVL: 11/14 -> 11/14; 1388/2248 -> 1388/2248; 112/112 -> 112/112.
|
||||
NWC24Download: 25/30 -> 26/30; 8140/12496 -> 8456/12496; 80/80 -> 80/80.
|
||||
sd_drv: 21/26 -> 21/26; 8940/11760 -> 8940/11760; 3592/3592 -> 3592/3592.
|
||||
pf_cache: 35/36 -> 35/36; 6464/7396 -> 6464/7396; 0/0 -> 0/0.
|
||||
|
||||
Only NWC24IterateDlTask gained exact bytes. Const work view is proven by objdiff 100%, 79/79 identical instructions, and the final clean gate. All other trials are reverted. Remaining functions and reasons are in the OPEN audit above. No uncertainty about measured gains; source-level causes for the parked compiler differences remain unresolved.
|
||||
|
||||
Official declsearch scoring only after structural/source trials. No permutations and no source mutations.
|
||||
NHTTPi_strnicmp: structural 2 exact 2.
|
||||
NHTTPi_compareToken: structural 24 exact 42.
|
||||
NHTTPi_Base64Encode: structural 71 exact 58.
|
||||
NWC24InitDlTask: structural 0 exact 31.
|
||||
NWC24UpdateDlTask: structural 19 exact 250.
|
||||
NWC24iCheckDlHeaderConsistency: structural 2 exact 3.
|
||||
AddTaskInternal: structural 20 exact 323.
|
||||
pfd_sddrv_init: structural 18 exact 31.
|
||||
pfd_sddrv_finalize: structural 6 exact 4.
|
||||
pfd_sddrv_get_total_sectors: structural 0 exact 6.
|
||||
pfd_sddrv_store_mbr_buf: structural 0 exact 9.
|
||||
pfd_sddrv_build_fat32_mbr_bpb: structural 24 exact 122.
|
||||
PFCACHE_DoWriteNumSectorAndFreeIfNeeded: structural 0 exact 4.
|
||||
|
||||
Accepted symbol final fresh ctxdiff:
|
||||
```text
|
||||
src 0x13c base 0x13c insns 79/79
|
||||
diffs 0: []
|
||||
```
|
||||
Final progress/report.json and build/43U/ok targets pass. The full clean gate remains GATE PASS. Source change and all non-text scores are unchanged after scoring.
|
||||
@@ -1,460 +0,0 @@
|
||||
|
||||
# prior1 MAX reference round
|
||||
|
||||
Scope: VIInit, Window::DrawFrame, SOGetSockName and owned data. No wprintf edits.
|
||||
Origin fetch succeeded; 26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source and symbols match HEAD/origin. Shell execution works; historical bubblewrap blocker does not apply.
|
||||
|
||||
BASELINE main/libs/RevoEX/src/so/SOBasic {'fuzzy_match_percent': 99.79452, 'total_code': '4088', 'matched_code': '3836', 'matched_code_percent': 93.83562, 'total_data': '144', 'matched_data': '144', 'matched_data_percent': 100.0, 'total_functions': 22, 'matched_functions': 21, 'matched_functions_percent': 95.454544, 'total_units': 1}
|
||||
Initial string pool IDENTICAL; data already 100% for every owned section. No symbol renames or extent changes needed.
|
||||
|
||||
BASELINE main/libs/NW4R/src/lyt/lyt_window {'fuzzy_match_percent': 99.75864, 'total_code': '11352', 'matched_code': '9848', 'matched_code_percent': 86.751236, 'total_data': '316', 'matched_data': '316', 'matched_data_percent': 100.0, 'total_functions': 21, 'matched_functions': 20, 'matched_functions_percent': 95.2381, 'total_units': 1}
|
||||
Initial string pool IDENTICAL; data already 100% for every owned section. No symbol renames or extent changes needed.
|
||||
|
||||
BASELINE main/libs/RVL_SDK/src/vi/vi {'fuzzy_match_percent': 99.97521, 'total_code': '11296', 'matched_code': '9944', 'matched_code_percent': 88.03116, 'total_data': '1944', 'matched_data': '1944', 'matched_data_percent': 100.0, 'total_functions': 30, 'matched_functions': 29, 'matched_functions_percent': 96.666664, 'total_units': 1}
|
||||
Initial string pool IDENTICAL; data already 100% for every owned section. No symbol renames or extent changes needed.
|
||||
|
||||
VIInit structural diagnosis: both frames 0x30; 338/338 instructions. Only 14 differences: clip active-height/top locals r29/r30/r31 rotate with shared framebuffer/PreCB/PostCB zero. No target spill/reload proof for new volatile. Reference changes declarations, explicit narrowing in AdjustPosition, and DVD-stop inline boundary; data 1944/1944.
|
||||
|
||||
VIInit | V1 reference removes unused format, DVD previous state block scoped | insns 338/338 structural/exact (0, 14) | objdiff 99.7929 | lost [] | data 1944/1944 | POOL IDENTICAL up to 7 (mine=7 base=7) | 63b67f44ab8a
|
||||
|
||||
199 M ('slwi', 'r29, r7, 1') B ('slwi', 'r30, r7, 1')
|
||||
201 M ('subf', 'r26, r6, r29') B ('subf', 'r26, r6, r30')
|
||||
222 M ('and', 'r30, r25, r10') B ('and', 'r31, r25, r10')
|
||||
225 M ('and', 'r29, r26, r12') B ('and', 'r30, r26, r12')
|
||||
227 M ('add', 'r7, r7, r30') B ('add', 'r7, r7, r31')
|
||||
235 M ('li', 'r31, 0') B ('li', 'r29, 0')
|
||||
238 M ('divw', 'r8, r29, r5') B ('divw', 'r8, r30, r5')
|
||||
248 M ('sth', 'r31, 0x16(r4)') B ('sth', 'r29, 0x16(r4)')
|
||||
250 M ('sth', 'r31, 0x18(r4)') B ('sth', 'r29, 0x18(r4)')
|
||||
255 M ('stw', 'r31, 0x20(r4)') B ('stw', 'r29, 0x20(r4)')
|
||||
260 M ('stb', 'r31, 0x3c(r4)') B ('stb', 'r29, 0x3c(r4)')
|
||||
262 M ('stw', 'r31, 0x44(r4)') B ('stw', 'r29, 0x44(r4)')
|
||||
274 M ('stw', 'r31, 0(0)') B ('stw', 'r29, 0(0)')
|
||||
275 M ('stw', 'r31, 0(0)') B ('stw', 'r29, 0(0)')
|
||||
|
||||
VIInit | V2 reference scalar declaration group and required volatile DVD read | insns 338/338 structural/exact (0, 14) | objdiff 99.7929 | lost [] | data 1944/1944 | POOL IDENTICAL up to 7 (mine=7 base=7) | b4b22213ff0c
|
||||
|
||||
199 M ('slwi', 'r29, r7, 1') B ('slwi', 'r30, r7, 1')
|
||||
201 M ('subf', 'r26, r6, r29') B ('subf', 'r26, r6, r30')
|
||||
222 M ('and', 'r30, r25, r10') B ('and', 'r31, r25, r10')
|
||||
225 M ('and', 'r29, r26, r12') B ('and', 'r30, r26, r12')
|
||||
227 M ('add', 'r7, r7, r30') B ('add', 'r7, r7, r31')
|
||||
235 M ('li', 'r31, 0') B ('li', 'r29, 0')
|
||||
238 M ('divw', 'r8, r29, r5') B ('divw', 'r8, r30, r5')
|
||||
248 M ('sth', 'r31, 0x16(r4)') B ('sth', 'r29, 0x16(r4)')
|
||||
250 M ('sth', 'r31, 0x18(r4)') B ('sth', 'r29, 0x18(r4)')
|
||||
255 M ('stw', 'r31, 0x20(r4)') B ('stw', 'r29, 0x20(r4)')
|
||||
260 M ('stb', 'r31, 0x3c(r4)') B ('stb', 'r29, 0x3c(r4)')
|
||||
262 M ('stw', 'r31, 0x44(r4)') B ('stw', 'r29, 0x44(r4)')
|
||||
274 M ('stw', 'r31, 0(0)') B ('stw', 'r29, 0(0)')
|
||||
275 M ('stw', 'r31, 0(0)') B ('stw', 'r29, 0(0)')
|
||||
|
||||
VIInit | V3 reference interrupt register value assignment order | insns 338/338 structural/exact (0, 0) | objdiff 100.0 | lost [] | data 1944/1944 | POOL IDENTICAL up to 7 (mine=7 base=7) | 4cf8217f30f5
|
||||
|
||||
|
||||
|
||||
VIInit | V4 reference clipping explicit u16 stores and grouped locals | insns 338/338 structural/exact (0, 14) | objdiff 99.7929 | lost [] | data 1944/1944 | POOL IDENTICAL up to 7 (mine=7 base=7) | 5e17b0aaa91d
|
||||
|
||||
199 M ('slwi', 'r29, r7, 1') B ('slwi', 'r30, r7, 1')
|
||||
201 M ('subf', 'r26, r6, r29') B ('subf', 'r26, r6, r30')
|
||||
222 M ('and', 'r30, r25, r10') B ('and', 'r31, r25, r10')
|
||||
225 M ('and', 'r29, r26, r12') B ('and', 'r30, r26, r12')
|
||||
227 M ('add', 'r7, r7, r30') B ('add', 'r7, r7, r31')
|
||||
235 M ('li', 'r31, 0') B ('li', 'r29, 0')
|
||||
238 M ('divw', 'r8, r29, r5') B ('divw', 'r8, r30, r5')
|
||||
248 M ('sth', 'r31, 0x16(r4)') B ('sth', 'r29, 0x16(r4)')
|
||||
250 M ('sth', 'r31, 0x18(r4)') B ('sth', 'r29, 0x18(r4)')
|
||||
255 M ('stw', 'r31, 0x20(r4)') B ('stw', 'r29, 0x20(r4)')
|
||||
260 M ('stb', 'r31, 0x3c(r4)') B ('stb', 'r29, 0x3c(r4)')
|
||||
262 M ('stw', 'r31, 0x44(r4)') B ('stw', 'r29, 0x44(r4)')
|
||||
274 M ('stw', 'r31, 0(0)') B ('stw', 'r29, 0(0)')
|
||||
275 M ('stw', 'r31, 0(0)') B ('stw', 'r29, 0(0)')
|
||||
|
||||
VIInit | V5 hardware register value uses its actual u16 width | insns 338/338 structural/exact (0, 0) | objdiff 100.0 | lost [] | data 1944/1944 | POOL IDENTICAL up to 7 (mine=7 base=7) | 91d73ae4ffad
|
||||
|
||||
|
||||
|
||||
V5 clean full gate before commit
|
||||
```
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RVL_SDK/src/vi/vi] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/vi/vi] objdiff: code 11296/11296 data 1944/1944 functions 30/30 fuzzy 100.0000 linked code 0
|
||||
[libs/RVL_SDK/src/vi/vi] instruction-exact functions: 30/30
|
||||
[libs/RVL_SDK/src/vi/vi] section .bss size 368 match 100.0
|
||||
[libs/RVL_SDK/src/vi/vi] section .data size 1368 match 100.0
|
||||
[libs/RVL_SDK/src/vi/vi] section .sbss size 176 match 100.0
|
||||
[libs/RVL_SDK/src/vi/vi] section .sdata size 32 match 100.0
|
||||
[libs/RVL_SDK/src/vi/vi] section .text size 11296 match 100.0
|
||||
[libs/RVL_SDK/src/vi/vi] baseline: code 9944/11296 data 1944 functions 29 fuzzy 99.9752
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 91.05281 -> 91.09795
|
||||
global fuzzy_match_percent: 99.58826 -> 99.58836
|
||||
global complete_code_percent: 73.73083 -> 74.01916
|
||||
global matched_data_percent: 99.42271 -> 99.42271
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
note: no baseline for merge-base 26d7e1e0; compared against nearest snapshotted ancestor d7821052 (1 commits back)
|
||||
GATE PASS
|
||||
```
|
||||
|
||||
VIInit accepted locally: value now u16, matching the VI hardware register width. Both masks preserve 16 bits. This changes only register coloring, resolves every 14 instruction difference, and retains all sections at 100%. Clean full gate PASS; ctxdiff 338/338 diffs 0; pool 7/7 identical; zero regressions and forbidden/readability patterns. No configure.py or symbols change.
|
||||
|
||||
DrawFrame origin pre-function fetch: 26d7e1e052a80ea55d0591a82653370965ad5bb2; owned source identical to origin. Target frame 0xe0, 376/376 instructions. All 119 differences are registers: persistent flip table r21 vs r31 shifts geometry and alpha. Static table, branches, helper operations, floating-point order, and stack offsets identical; reference lacks the target-proven texture-count guard and has mutable bool. No volatile spill/reload proof; all 316 data bytes matched. Extent 0x5e0 ends exactly at DrawFrame4.
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W1 reference mutable bUseVtxCol | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | e4d4a68bdadd
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W2 material setup result separate declaration and assignment | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 645a40fa68ea
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W3 texture dimensions separate declaration and assignment | insns 381/376 structural/exact (161, 358) | objdiff 80.97607 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 356336b28e11
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W4 coordinates passed via reference to the quad array | insns 381/376 structural/exact (96, 326) | objdiff 76.89096 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | b75bb1a0e722
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W5 alpha parameter const-qualified at definition | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | c852083af7e9
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W6 explicitly narrow texture unit argument in vertex format and dimension query | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 19a85be12cc2
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W7 texture index ix uses u8 | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 5cef145ed39c
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W7 texture index iy uses u8 | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 962c307d665a
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W7 texture index ix,iy uses u8 | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | fba15f864c06
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W7 texture index ix,iy uses u16 | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 9230751b3b92
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W7 texture index ix,iy uses u32 | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 01617eecae4e
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W7 texture index ix,iy uses unsigned long | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | aefd446c1d1d
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W8 reference plain struct declaration for TextureFlipInfo | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 127501278333
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W9 reference texture-flip type declared outside anonymous namespace | BUILD FAILED | a29d9ea4e268
|
||||
2/mwcceppc.exe -nodefaults -proc gekko -align powerpc -enum int -fp hardware -Cpp_exceptions off -O4,p -inline auto -pragma "cats off" -pragma "warn_notinlined off" -maxerrors 1 -nosyspath -RTTI off -fp_contract on -str reuse -DSDK_IPL -D_REVOLUTION -DMEM_MANAGER_DIRECT -i include -i include/global -i libs/MetroTRK/include -i libs/Runtime/include -i libs/MSL/include -i libs/RVL_SDK/include -i libs/RevoEX/include -i libs/NW4R/include -i libs/RVLMiddleware/eZiText/include -i libs/RVLMiddleware/TMC_JPEG/include -i libs/RVLFaceLib/include -i libs/EGG/include -i libs/OperaWWW/include -ir libs/RVL_SDK/include/private/bte -i build/43U/include -DBUILD_VERSION=0 -DVERSION_43U -i libs/RVL_SDK/include/private/bte -DNDEBUG=1 -DTARGET_RVL -ipa file -fp_contract off -Cpp_exceptions off -lang=c++ -MMD -c libs/NW4R/src/lyt/lyt_window.cpp -o build/43U/src/libs/NW4R/src/lyt && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/NW4R/src/lyt/lyt_window.d build/43U/src/libs/NW4R/src/lyt/lyt_window.d
|
||||
### mwcceppc.exe Compiler:
|
||||
# File: libs\NW4R\src\lyt\lyt_window.cpp
|
||||
# -----------------------------------------
|
||||
# 48: u8 coords[VERTEXCOLOR_MAX][FLIPINDEX_MAX]; // 0x00
|
||||
# Error: ^^^^^^^^^^^^^^^
|
||||
# (10140) undefined identifier 'VERTEXCOLOR_MAX'
|
||||
# Too many errors printed, aborting program
|
||||
|
||||
User break, cancelled...
|
||||
ninja: build stopped: subcommand failed.
|
||||
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W10 reference helper declarations before definitions | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | a4897278131e
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W9b reference global texture-flip struct with real array dimensions | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | c3ee228d2a7f
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W11 explicit inline boundary for GetTexutreFlipInfo | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 60/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | e833af53f19d
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W11 explicit inline boundary for GetLTTexCoord | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 383a08cfd390
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W11 explicit inline boundary for GetRTTexCoord | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 3d074b950c89
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W11 explicit inline boundary for GetLBTexCoord | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 7a08a15fb0f3
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W11 explicit inline boundary for GetRBTexCoord | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 0e6faa8f9403
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W12 geometry and texture-coordinate helpers explicit inline | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 60/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 1ccea4bdb91d
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W13 polygon size constructor explicitly initializes its dimensions | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | dadaf033b0f2
|
||||
|
||||
DrawFrame W14 final declaration-order search after structural/reference/type trials
|
||||
declaration block:
|
||||
const Size texSize = detail::GetTextureSize(frame.pMaterial, GX_TEXMAP0);
|
||||
const ut::Color vtxColors[VERTEXCOLOR_MAX];
|
||||
|
||||
detail::TexCoords texCds[1];
|
||||
|
||||
math::VEC2 polPt;
|
||||
Size polSize;
|
||||
start (0, 119)
|
||||
best (0, 119) after 52 builds; source restored; best order was:
|
||||
const Size texSize = detail::GetTextureSize(frame.pMaterial, GX_TEXMAP0);
|
||||
const ut::Color vtxColors[VERTEXCOLOR_MAX];
|
||||
|
||||
detail::TexCoords texCds[1];
|
||||
|
||||
math::VEC2 polPt;
|
||||
Size polSize;
|
||||
|
||||
|
||||
DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | W14 final declaration-order result | insns 376/376 structural/exact (0, 119) | objdiff 98.17819 | lost [] | data 316/316 | POOL IDENTICAL up to 1 (mine=1 base=1) | 3cc7e4df0b05
|
||||
|
||||
SOGetSockName origin pre-function fetch: 805e84045c82629c645e9ef1787c30d2bc33b5e7; owned source identical to origin. Pool 1/1 identical. Both frames 0x30,63/63 instructions; only first memcpy setup differs (ours destination/source/length, target source/length/destination). Neighbor extent starts at 0x814B34CC, exactly 0x814B33D0+0xFC; no overlap. All 144 target data bytes matched. Reference uses early goto conclude, address initializer, sizeof comparison, separate prepare assignment; wire request raw-offset expressions replaced by existing NameRequest field.
|
||||
|
||||
SOGetSockName | S1 reference statement order and conclude goto, with typed wire fields | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 33cc57840375
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S2 reference address initialization and separate prepare assignment | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | b5a1a7e874aa
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S3 first address copy uses an explicit const input view | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 53088c5d144f
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S4 const socket address view for validation and input, mutable output parameter | insns 63/63 structural/exact (2, 5) | objdiff 96.349205 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | c08e5df4c7de
|
||||
|
||||
5 M ('mr', 'r27, r4') B ('mr', 'r28, r3')
|
||||
6 M ('mr', 'r28, r3') B ('mr', 'r27, r4')
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S5 first copy views its header as const bytes | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 9e0bb74dd11a
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S6 typed copy helper with const source boundary | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 6a49cab5c214
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S7 allocation size declared u32 | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 68140082eff9
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S7 allocation size declared u16 | insns 63/63 structural/exact (3, 4) | objdiff 95.71429 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 404166a4490e
|
||||
|
||||
22 M ('rlwinm', 'r31, r0, 0, 0x10, 0x1a') B ('rlwinm', 'r31, r0, 0, 0, 0x1a')
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S7 allocation size declared size_t | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 73d720d3670d
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S8 first copy separately reads length as u8 | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | c847ce10914f
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S8 first copy separately reads length as u16 | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | becaa347c984
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S8 first copy separately reads length as u32 | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | a1d015de3910
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S8 first copy separately reads length as int | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | d235318a13b5
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S8 first copy separately reads length as size_t | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 43864ee20f80
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S9 reference command allocation is int pointer with typed address-field view | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | f42be4f4821b
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S10 reply buffer held as opaque IOCTL buffer with typed length view | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 39d08eea8df3
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S11 promote first copy length through unsigned halfword | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 8dae136f16d1
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S12 syscall result declared s16 | insns 63/63 structural/exact (8, 20) | objdiff 91.5873 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 2e50fd103218
|
||||
|
||||
10 M ('extsh.', 'r3, r3') B ('cmpwi', 'r3, 0')
|
||||
19 M ('b', '136') B ('b', '140')
|
||||
29 M ('b', '96') B ('b', '100')
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
43 M ('extsh.', 'r30, r3') B ('cmpwi', 'r3, 0')
|
||||
44 M ('blt', '20') B ('mr', 'r30, r3')
|
||||
45 M ('lbz', 'r5, 0(r28)') B ('blt', '20')
|
||||
46 M ('mr', 'r3, r27') B ('lbz', 'r5, 0(r28)')
|
||||
47 M ('mr', 'r4, r28') B ('mr', 'r3, r27')
|
||||
48 M ('bl', '0') B ('mr', 'r4, r28')
|
||||
49 M ('mr', 'r4, r29') B ('bl', '0')
|
||||
50 M ('mr', 'r5, r31') B ('mr', 'r4, r29')
|
||||
51 M ('li', 'r3, 0xc') B ('mr', 'r5, r31')
|
||||
52 M ('bl', '0') B ('li', 'r3, 0xc')
|
||||
53 M ('mr', 'r4, r30') B ('bl', '0')
|
||||
54 M ('li', 'r3, 0') B ('mr', 'r4, r30')
|
||||
55 M ('bl', '0') B ('li', 'r3, 0')
|
||||
56 M ('extsh', 'r3, r3') B ('bl', '0')
|
||||
|
||||
SOGetSockName | S12 syscall result declared long | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | b72c9cdddb5e
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S12 syscall result declared s32 | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 1ab005e08c72
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S13 reply initialized through memcpy destination return | insns 63/63 structural/exact (10, 20) | objdiff 89.12698 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 7693f4b6b84c
|
||||
|
||||
5 M ('mr', 'r29, r3') B ('mr', 'r28, r3')
|
||||
18 M ('li', 'r29, -0x1c') B ('li', 'r30, -0x1c')
|
||||
22 M ('rlwinm', 'r30, r0, 0, 0, 0x1a') B ('rlwinm', 'r31, r0, 0, 0, 0x1a')
|
||||
23 M ('mr', 'r4, r30') B ('mr', 'r4, r31')
|
||||
26 M ('mr', 'r28, r3') B ('mr', 'r29, r3')
|
||||
28 M ('li', 'r29, -0x31') B ('li', 'r30, -0x31')
|
||||
30 M ('stw', 'r29, 0(r3)') B ('stw', 'r28, 0(r3)')
|
||||
31 M ('mr', 'r4, r27') B ('addi', 'r28, r3, 0x20')
|
||||
32 M ('addi', 'r3, r3, 0x20') B ('mr', 'r4, r27')
|
||||
34 M ('bl', '0') B ('mr', 'r3, r28')
|
||||
35 M ('mr', 'r31, r3') B ('bl', '0')
|
||||
37 M ('lbz', 'r8, 0(r27)') B ('mr', 'r5, r29')
|
||||
38 M ('mr', 'r5, r28') B ('lbz', 'r8, 0(r27)')
|
||||
39 M ('mr', 'r7, r31') B ('mr', 'r7, r28')
|
||||
44 M ('mr', 'r29, r3') B ('mr', 'r30, r3')
|
||||
46 M ('lbz', 'r5, 0(r31)') B ('lbz', 'r5, 0(r28)')
|
||||
48 M ('mr', 'r4, r31') B ('mr', 'r4, r28')
|
||||
50 M ('mr', 'r4, r28') B ('mr', 'r4, r29')
|
||||
51 M ('mr', 'r5, r30') B ('mr', 'r5, r31')
|
||||
54 M ('mr', 'r4, r29') B ('mr', 'r4, r30')
|
||||
|
||||
SOGetSockName | S14 reply pointer obtained from the initial address-field copy | insns 63/63 structural/exact (10, 6) | objdiff 90.07937 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 59b28a410bde
|
||||
|
||||
31 M ('mr', 'r4, r27') B ('addi', 'r28, r3, 0x20')
|
||||
32 M ('addi', 'r3, r3, 0x20') B ('mr', 'r4, r27')
|
||||
34 M ('bl', '0') B ('mr', 'r3, r28')
|
||||
35 M ('mr', 'r28, r3') B ('bl', '0')
|
||||
37 M ('lbz', 'r8, 0(r27)') B ('mr', 'r5, r29')
|
||||
38 M ('mr', 'r5, r29') B ('lbz', 'r8, 0(r27)')
|
||||
|
||||
SOGetSockName | S15 socket command and read-only address initialized in one typed helper | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 53a9d11f1936
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
SOGetSockName | S16 source-first read-only request initializer returns the address buffer | insns 63/63 structural/exact (2, 19) | objdiff 95.39683 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 7a7c904069d2
|
||||
|
||||
5 M ('mr', 'r29, r3') B ('mr', 'r28, r3')
|
||||
18 M ('li', 'r29, -0x1c') B ('li', 'r30, -0x1c')
|
||||
22 M ('rlwinm', 'r30, r0, 0, 0, 0x1a') B ('rlwinm', 'r31, r0, 0, 0, 0x1a')
|
||||
23 M ('mr', 'r4, r30') B ('mr', 'r4, r31')
|
||||
26 M ('mr', 'r28, r3') B ('mr', 'r29, r3')
|
||||
28 M ('li', 'r29, -0x31') B ('li', 'r30, -0x31')
|
||||
30 M ('stw', 'r29, 0(r3)') B ('stw', 'r28, 0(r3)')
|
||||
31 M ('addi', 'r31, r3, 0x20') B ('addi', 'r28, r3, 0x20')
|
||||
32 M ('mr', 'r3, r31') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
37 M ('mr', 'r5, r28') B ('mr', 'r5, r29')
|
||||
39 M ('mr', 'r7, r31') B ('mr', 'r7, r28')
|
||||
44 M ('mr', 'r29, r3') B ('mr', 'r30, r3')
|
||||
46 M ('lbz', 'r5, 0(r31)') B ('lbz', 'r5, 0(r28)')
|
||||
48 M ('mr', 'r4, r31') B ('mr', 'r4, r28')
|
||||
50 M ('mr', 'r4, r28') B ('mr', 'r4, r29')
|
||||
51 M ('mr', 'r5, r30') B ('mr', 'r5, r31')
|
||||
54 M ('mr', 'r4, r29') B ('mr', 'r4, r30')
|
||||
|
||||
SOGetSockName S17 final declaration-order search after reference/copy-type/helper trials
|
||||
declaration block:
|
||||
int size;
|
||||
int result;
|
||||
s32 rm;
|
||||
NameRequest* request;
|
||||
SOSockAddr* reply;
|
||||
SOSockAddr* addr;
|
||||
start (2, 3)
|
||||
best (2, 3) after 36 builds; source restored; best order was:
|
||||
int size;
|
||||
int result;
|
||||
s32 rm;
|
||||
NameRequest* request;
|
||||
SOSockAddr* reply;
|
||||
SOSockAddr* addr;
|
||||
|
||||
|
||||
SOGetSockName | S17 final declaration-order result | insns 63/63 structural/exact (2, 3) | objdiff 96.666664 | lost [] | data 144/144 | POOL IDENTICAL up to 1 (mine=1 base=1) | 73d59f1449b9
|
||||
|
||||
32 M ('mr', 'r3, r28') B ('mr', 'r4, r27')
|
||||
33 M ('mr', 'r4, r27') B ('lbz', 'r5, 0(r27)')
|
||||
34 M ('lbz', 'r5, 0(r27)') B ('mr', 'r3, r28')
|
||||
|
||||
FINAL OPEN AUDIT | SOGetSockName | objdiff 96.666664% | 25 distinct successful source trials | all unsuccessful source restored
|
||||
FINAL OPEN AUDIT | DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc | objdiff 98.17819% | 23 distinct successful source trials | all unsuccessful source restored
|
||||
Retained source: VIInit hardware register value u16 only, local commit bfe67f5a. No other source/config/header changes. All owned data sections 100%; data symbol/extent corrections unnecessary. DrawFrame remains register-only at 376/376, 119 differences; SOGetSockName remains first-copy setup scheduling at 63/63, 3 differences.
|
||||
|
||||
Final full clean gate over all owned units
|
||||
```
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RVL_SDK/src/vi/vi] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/vi/vi] objdiff: code 11296/11296 data 1944/1944 functions 30/30 fuzzy 100.0000 linked code 0
|
||||
[libs/RVL_SDK/src/vi/vi] instruction-exact functions: 30/30
|
||||
[libs/RVL_SDK/src/vi/vi] section .bss size 368 match 100.0
|
||||
[libs/RVL_SDK/src/vi/vi] section .data size 1368 match 100.0
|
||||
[libs/RVL_SDK/src/vi/vi] section .sbss size 176 match 100.0
|
||||
[libs/RVL_SDK/src/vi/vi] section .sdata size 32 match 100.0
|
||||
[libs/RVL_SDK/src/vi/vi] section .text size 11296 match 100.0
|
||||
[libs/RVL_SDK/src/vi/vi] baseline: code 9944/11296 data 1944 functions 29 fuzzy 99.9752
|
||||
[libs/NW4R/src/lyt/lyt_window] pool: IDENTICAL
|
||||
[libs/NW4R/src/lyt/lyt_window] objdiff: code 9848/11352 data 316/316 functions 20/21 fuzzy 99.7586 linked code 0
|
||||
[libs/NW4R/src/lyt/lyt_window] instruction-exact functions: 20/21
|
||||
[libs/NW4R/src/lyt/lyt_window] section .ctors size 4 match 100.0
|
||||
[libs/NW4R/src/lyt/lyt_window] section .data size 256 match 100.0
|
||||
[libs/NW4R/src/lyt/lyt_window] section .sbss size 8 match 100.0
|
||||
[libs/NW4R/src/lyt/lyt_window] section .sdata2 size 48 match 100.0
|
||||
[libs/NW4R/src/lyt/lyt_window] section .text size 11352 match 99.75864
|
||||
[libs/NW4R/src/lyt/lyt_window] below 100: DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc 98.17819
|
||||
[libs/NW4R/src/lyt/lyt_window] baseline: code 9848/11352 data 316 functions 20 fuzzy 99.7586
|
||||
[libs/RevoEX/src/so/SOBasic] pool: IDENTICAL
|
||||
[libs/RevoEX/src/so/SOBasic] objdiff: code 3836/4088 data 144/144 functions 21/22 fuzzy 99.7945 linked code 0
|
||||
[libs/RevoEX/src/so/SOBasic] instruction-exact functions: 21/22
|
||||
[libs/RevoEX/src/so/SOBasic] section .bss size 40 match 100.0
|
||||
[libs/RevoEX/src/so/SOBasic] section .data size 88 match 100.0
|
||||
[libs/RevoEX/src/so/SOBasic] section .sbss size 8 match 100.0
|
||||
[libs/RevoEX/src/so/SOBasic] section .sdata size 8 match 100.0
|
||||
[libs/RevoEX/src/so/SOBasic] section .text size 4088 match 99.79452
|
||||
[libs/RevoEX/src/so/SOBasic] below 100: SOGetSockName 96.666664
|
||||
[libs/RevoEX/src/so/SOBasic] baseline: code 3836/4088 data 144 functions 21 fuzzy 99.7945
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 91.05281 -> 91.09795
|
||||
global fuzzy_match_percent: 99.58826 -> 99.58836
|
||||
global complete_code_percent: 74.01916 -> 74.01916
|
||||
global matched_data_percent: 99.42271 -> 99.42271
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
GATE PASS
|
||||
```
|
||||
|
||||
Post-gate checks: ninja -C . build/43U/ok progress build/43U/report.json PASS. DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. VIInit ctxdiff 338/338 diffs 0; SOGetSockName 63/63 diffs 3. Final pools identical: vi 7/7, window 1/1, SOBasic 1/1. Git diff --check PASS.
|
||||
Final owned metrics (exact functions, matched code bytes, matched data bytes): vi 29/30,9944/11296,1944/1944 -> 30/30,11296/11296,1944/1944; lyt_window 20/21,9848/11352,316/316 unchanged; SOBasic 21/22,3836/4088,144/144 unchanged.
|
||||
Final origin/main advanced to 805e84045c82629c645e9ef1787c30d2bc33b5e7 during other workers: the local scope diff against merge-base 26d7e1e0 contains only vi.c and this attempts log; no out-of-scope edits. Worker did not rebase, link, push or contact upstream.
|
||||
@@ -1,130 +0,0 @@
|
||||
# revisit leaf — second-pass evidence (agent/w1007/revisit @ origin/main 29fe1efa)
|
||||
|
||||
Scope: iplSDChannelTitle (99.98883), ut_ArchiveFontBase (98.52), lyt_window (99.76),
|
||||
iplMemoryCardManager (97.88). Post-#834 (linkgap emit gates + .data object names).
|
||||
|
||||
## iplSDChannelTitle — all gates landed
|
||||
|
||||
Per-TU `IPL_SD_CHANNEL_TITLE_CPP` declared-only gates applied to:
|
||||
RuntimeTypeInfo.h DynamicCast, iplMathTypes.h VEC3 3-arg ctor, GUIManager.h
|
||||
(EventHandler setManager/setLatestEventCtrlNo/getLatestEventCtrlNo,
|
||||
Component setTriggerTarget, PaneComponent setPane/getPane), iplGraphics.h
|
||||
setOrthoTrans/setOrthoScale, iplSceneBase.h isReady/isResetProcessDone/getParent/
|
||||
getChild/getNext/getPrev, iplFaderSceneBase.h initCalcNormal/calcCommonAfter,
|
||||
iplNand.h File::isFinished/checkData, iplInterporation.h HermiteIntp<f32>::get
|
||||
(nested under IPL_CHANNEL_TITLE_NOVTABLE spec), Rect.h 0-arg ctor
|
||||
(IPL_SOUND_RECT_OUT_OF_LINE gate), iplGuiManager.h ~PaneManager.
|
||||
Deleted 2 unreferenced extern "C" trampolines (onTitleButtonEvent/onTitlePaneEvent)
|
||||
orig lacks. Result: all data sections 100%; .text 99.98883.
|
||||
|
||||
### VERIFIED WALL — dtor emission policy (decl-immune)
|
||||
Residual .text gap = 2 unreferenced weak deleting-dtor bodies
|
||||
(~FaderSceneBase 88B + ~FrameController 64B) + ~5 dangling no-reloc UNDs
|
||||
(__vt__LangFile, __vt__SDButtonEventHandlerBase, __vt__FrameController,
|
||||
mArg/typeInfo syms — symtab noise, no relocs). Orig's TU had these dtors
|
||||
trivial/implicit: ~SDChannelTitle calls ~Base directly (28 insns), Rect
|
||||
temporaries carry no dtor calls, so correct forms are `virtual ~X() {}`
|
||||
inline or NO decl at all. Declaring them out-of-line adds real `bl` calls →
|
||||
fuzzy dropped 99.98883→99.55799. Implicit/non-virtual variants still emit the
|
||||
weak bodies AND slightly regress — front-end-level MWCC instantiation drag,
|
||||
no decl form eliminates it. Remaining fn wall: flushSaveBeforeExit 98.59 —
|
||||
&smArg materialization register choice (orig r3→scratch r4, mine r4/r5→recv-first);
|
||||
8+ source forms all shift the home, never to r3.
|
||||
|
||||
## ut_ArchiveFontBase — ConstructOpAnalyzeGLGR 92.09 (956B)
|
||||
|
||||
20 normalized diffs, insns 116-147 of 239 — issue-order inside the
|
||||
ready-set around the CalcOffsetSheetFlags/CalcSizeFlagSet scratch math.
|
||||
Orig hoists lhz 0x1c (sheetGlyphCount) / lhz 0x24 (sheetCount) / lhz 0xe
|
||||
(dataBlockCount) + lwz 0x4c(r20) into the marshal block.
|
||||
FAILED variants: decl-order swap of the three u16s (identical 20 diffs —
|
||||
scheduler ignores decl order); moving ctx->m* tail stores adjacent to the
|
||||
u16 loads (regressed 20→108, whole-web rotation). Conclusion: pure list-
|
||||
scheduling tie, same family as before.
|
||||
|
||||
## lyt_window — DrawFrame 98.18 (1504B)
|
||||
|
||||
376=376 insns. One callee-window permutation: orig numbers the static
|
||||
flipInfos[] array base early (r21, first materialized at insn 36) pushing
|
||||
arg webs to r27-r31; mine puts it deepest (r31), args r26-r30. Same web
|
||||
count (12 callee webs r20-r31 both), identical prologue/epilogue; only the
|
||||
allocator's numbering differs. Plus a repeated stfsx/fadds store-weave in
|
||||
the 4 DRAW_QUAD_FOR_FRAME_1 corner blocks.
|
||||
FAILED variants: scoping polPt/polSize inside the macro (385 insns,
|
||||
worse); moving texSize decl after polPt/polSize (372 insns, worse).
|
||||
NOTE: paired-single ops — capstone can't decode psq_*/ps_* insns, so
|
||||
ndiff.py/disasm_fn.py truncate at the first one; use raw-word diffs.
|
||||
|
||||
## iplMemoryCardManager — 8 sub-100 fns all decomposed
|
||||
|
||||
- isMoveEnable/isCopyEnable (99.83), update_file_array (99.72),
|
||||
getComment (98.94): 0 normalized diffs — pure regname webs.
|
||||
- isBannerEnable (92.31, 26 insns, 7 diffs) + getBlocks (92.0, 25 insns,
|
||||
6 diffs): single diff = `addi r11,r1,0x20` restgpr-setup placement —
|
||||
orig emits it at tail (after the full member-chain load), mine hoists
|
||||
to slot 11. Folded-return variant (`return icons[slot][mFile..]` no
|
||||
locals) emits identical code — scheduler-internal, decl-form insensitive.
|
||||
Folded form kept (same output, terser).
|
||||
- _create_icon (87.55) + create_banner (90.42): `(base+const)+var`
|
||||
member-chain regroup — orig computes (&mFileCell + memberOffs) +
|
||||
(slot*row + file*0x15C combined index) with `this+0x10EC`/`this+0x110C`
|
||||
bases cached in callee regs reused across both GX_TF branches, and
|
||||
rematerializes &cell.icon per call (`add r3,...` then `add r24,...`
|
||||
post-bl) while mine pins it; marshal order `li r4,0` before `mr r3`
|
||||
in orig. FAILED variants: `MCFileCell* cell = &mFileCell[slot][file]`
|
||||
(90 insns — MWCC folded the pointer, worse); `mFileCell[0] +
|
||||
slot*0x7F + file` flat-index (89 insns — aggressive CSE, worse).
|
||||
Same documented mcard2 wall.
|
||||
|
||||
All units stay NonMatching — no shims, no flips. Every residual is a
|
||||
verified allocator/scheduler/emission-policy tie with source-form evidence.
|
||||
|
||||
## Round 2 (post-#834 rebase @11c75ddb) — sdChannelTitle emit-parity probe
|
||||
|
||||
Investigated per orchestrator hint whether the 152B weak-dtor + dangling-UND
|
||||
residual was the same dedup-loss family as channelTitle's symbols.txt fix.
|
||||
VERDICT: NOT a naming issue and NOT a flip blocker.
|
||||
|
||||
- orig iplSDChannelTitle.o: ZERO weak FUNC syms. Mine emits 2 unreferenced
|
||||
weak deleting-dtor bodies: `__dt__FaderSceneBase` (88B @0x1f4) +
|
||||
`__dt__FrameController` (64B @0xb30), plus 3 zero-reloc UND vtable refs
|
||||
(`__vt__FrameController`, `__vt__SDButtonEventHandlerBase`, `__vt__LangFile`).
|
||||
- orig iplFaderSceneBase.o's own view: `~FaderSceneBase` is DECLARED-ONLY
|
||||
(its `__dt__` is UND there, defined in another TU).
|
||||
- Tried `__declspec(novtable)` on all 4 classes under
|
||||
IPL_SD_CHANNEL_TITLE_CPP: removed the 3 dangling `__vt__` UNDs (correct
|
||||
mechanism — orig stores only most-derived vt) but weak bodies persisted.
|
||||
- Tried implicit-trivial dtor (removing decl): `__dt__FrameController` emit
|
||||
STOPPED (64B gone), but `calc()` vtable slot shifted 0x0c→0x08 →
|
||||
calcFadein/calcFadeout single-word diffs (`lwz r12,0x0c(r12)` vs 0x08)
|
||||
→ REVERTED everything.
|
||||
- CRITICAL PROOF these bodies are harmless: main's iplChannelTitle.o
|
||||
(unit fuzzy 100.0 post-#834) emits the IDENTICAL `__dt__FaderSceneBase`
|
||||
88B + `__dt__FrameController` 64B weak bodies that orig's .o lacks.
|
||||
They are linker-stripped dead emission; objdiff fn-pairing ignores them.
|
||||
=> The 152B was never the blocker. Real residual = flushSaveBeforeExit
|
||||
98.59 only.
|
||||
|
||||
## flushSaveBeforeExit — 6-diff → 2-diff minimum
|
||||
|
||||
Window is the `sm` (System globals) base web: orig binds &sm to r3 and
|
||||
loads +0x94→r4 (store), +0x28→r4 (heap arg), +0x94→r3 (recv); mine binds
|
||||
r4 and marshals recv before arg. Variants:
|
||||
- saveHeap decl hoisted above getSDPrevPage store: 2 diffs (base→r5,
|
||||
+0x28 load moved early) — closer but not orig's order.
|
||||
- `flushAsync(System::getMem2App())` inline: same 2 diffs, base→r4.
|
||||
Residual = base-web home + marshal eval order — allocator tie.
|
||||
|
||||
## GLGR — ready-set issue-order re-probes
|
||||
|
||||
- def-move (sheetGlyphCount/dataBlockCount to tail): 20→99 diffs, REGRESSION.
|
||||
- `u32 remWorkSpace = ctx->remWorkSpace()` hoist: 20→25, REGRESSION.
|
||||
- stepSheetFlags after flagsSheetsOff (dependency-chain reorder): identical
|
||||
20 diffs — MWCC issue-order insensitive to stmt order here. Wall stands.
|
||||
|
||||
## DrawFrame / MCManager re-verified
|
||||
|
||||
DrawFrame 376=376: flipInfos base pinned r21(orig)/r31(mine) + stfsx weave
|
||||
— callee-numbering tie unchanged. create_banner/_create_icon: `(base+const)
|
||||
+var` regroup + recompute-vs-CSE (`add r3,r29,r25` remat per call in orig)
|
||||
— same documented wall.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,86 +0,0 @@
|
||||
# scene4 leaf — decode attempts & evidence
|
||||
|
||||
Branch `agent/w1008/scene4` off origin/main@e3457d11.
|
||||
Scope: iplAddress, iplAddressEdit, iplSDChannelSelect are the only sub-100 units in
|
||||
the scene/address + sdChannelSelect remainder (iplAddressAddSel, iplAddressInputName,
|
||||
iplAddressSelect, addressHelpers, addressInputHelpers, agreeSettings, agreeHttp,
|
||||
iplFaceSelect, iplNCDSetting all verified already 100% on main; no open PR claims).
|
||||
|
||||
## Decodes that landed (this leaf)
|
||||
|
||||
### Single-case `switch` produces the `b<eq> caseblock; b after` 2-branch guard
|
||||
`switch (x) { case C:` emits `cmp; beq caseblock; b exit` — MWCC keeps the
|
||||
dispatch's second `b` because the case-block is a separate labelled region.
|
||||
Equivalent `if`, `if||`, `if&&`, `goto`-goto, `if/else`-goto all get normalized
|
||||
to a single fused `beq`/`bne`. Used in:
|
||||
|
||||
- `Address::start_drag_event` (892B): outer `switch (mState) { case STATE_NORMAL:`
|
||||
+ inner `switch (mMode) { case 0:` reproduces orig's two nested 2-branch guards.
|
||||
Residual: 7 word diffs, pure regname — nigaoe web pinned r26 (orig) vs r29
|
||||
(mine), miiPane web r29 vs r26. Allocator home-order tie; decl-hoist of
|
||||
miiPane above the `if` was a no-op (web homes unchanged).
|
||||
- `Address::onEventDerived` (1080B): TRIG case falls through to ON_POINT
|
||||
(orig has NO `break`); the `mState == COVER_NORMAL || mState == NORMAL`
|
||||
guard folds to `beq`+`bne` inside the TRIG case. Residual: 81 word diffs,
|
||||
all regname — insn sequence identical.
|
||||
|
||||
### `addic.` fusion for `ptr = base + const` NULL-tested members
|
||||
`record->attr.name` tested `!= 0` fuses into `addic.` only when the pointer is
|
||||
materialized lazily at the compare — decl the local inside the `if`. Hoisted
|
||||
decls emit `addi`+`cmpwi`. (movePane_onDrag `name` web.)
|
||||
|
||||
## Walls re-verified (evidence)
|
||||
|
||||
### `Address::movePane_onDrag` 92.45 (620 orig vs 612 mine)
|
||||
- Orig emits `bne next; b exit` 2-branch guards for both `textBox != NULL` and
|
||||
`name != NULL` (the `b` skips to the shared `width += 0.01f` block).
|
||||
- This is switch-dispatch-shaped, but every legal polarity fails:
|
||||
`switch(ptr) { case NULL: break; default: body }` bool-materializes
|
||||
(`addic/subfe/cmpwi 1` — +3 insns); `switch (p != NULL) { case true:` also
|
||||
bool-materializes; `do { if (!x) break; } while (0)` folds to single `beq`.
|
||||
- Orig computes the record math (`lwz 0x70 / mulli 5 / lwz 0x274 / mulli 0x140`)
|
||||
before the textBox branch — scheduler interleave around the guard.
|
||||
- Residual also regname r27↔r29 (textBox web) + loop `name` web.
|
||||
|
||||
### `FriendListCache::update` 95.5 (160 orig vs 156 mine)
|
||||
Orig remats `mInfos + index*0x140` per use site (memset, wcsncpy,
|
||||
updateFriendInfo = 3 `mulli`+`add` pairs). Mine CSEs into callee r31.
|
||||
`getInfo(index)` vs `mInfos[index]` vs `(int)index` cast — all VN-identical,
|
||||
still CSE. Remat-vs-pin in the unusual remat-is-orig direction; no lever.
|
||||
|
||||
### `AddressEdit::create` 97.45 (3280B)
|
||||
Two distinct residuals:
|
||||
- Wholesale r30↔r31 web-order swap: orig pins string-table const web in r31
|
||||
and `boardFile` (getScene+0xd20) in r30; mine the reverse. Webs born in the
|
||||
same source order — allocator processing order tie.
|
||||
- `friendText` (this+0x2b4 / this+0x2cc) pin: orig materializes
|
||||
`addi r25, r29, 0x2b4` at decl point between `initFrame()` and `restart()`,
|
||||
reassigns `addi r25, r29, 0x2cc` mid-block — the reg+const web is pinned.
|
||||
Mine remats `addi r5, r29, 0x2b4` at each marshal. Variants tried: non-const
|
||||
`wchar_t*`, decl moved before `animator =` — both no-op. Same this+const
|
||||
pin family as get_friendinfo.
|
||||
|
||||
### `AddressEdit::get_friendinfo` 88.04 (336 orig vs 328 mine)
|
||||
Orig: this→r28, `this+0x2b4` (mName) pinned in r29 materialized before the
|
||||
FindPaneByName marshal — 2 extra insns vs mine's marshal-site remats, and one
|
||||
more callee web (savegpr_28 vs my _29 window differs). Same `this+const`
|
||||
pin-vs-remat wall as create's friendText.
|
||||
|
||||
### `AddressEdit::update_friendinfo` 99.42 (152B)
|
||||
Single 2-insn scheduling swap: `addi r4,r30,0x2b4` vs `addi r3,r31,8` order
|
||||
in the wcsncpy marshal.
|
||||
|
||||
### iplSDChannelSelect 99.58 — 7 fns
|
||||
- `create` 97.74: regname r29↔r30 swap + marshal interleaves around `bl`s
|
||||
(scheduler family); insn count equal.
|
||||
- `collectTitles*` ×4 (97.29–97.83): documented ties — callee-web rotations
|
||||
around the same ES_GetTitleCount/ES_GetTitles marshal blocks.
|
||||
- `flushSaveDataAndMountSD` 99.66 (140B): marshal order tie.
|
||||
- `setChannelScissor` 93.47 (932B): fp/scheduling family (DrawFrame-class).
|
||||
|
||||
## Notes
|
||||
- ndiff.py NORMALIZES register names — "diffs 0" can hide regname-only
|
||||
diffs. Always confirm with raw byte-compare of `.text` (readelf -sW for
|
||||
addr/size, -SW for file offset).
|
||||
- `objdiff-cli diff` is interactive-only (fails headless); use disasm_fn.py
|
||||
+ byte-compare.
|
||||
@@ -1,48 +0,0 @@
|
||||
# setting leaf — attempt log
|
||||
|
||||
## Decode landed this wave
|
||||
|
||||
### iplSetting::draw — struct-copy emission split (91.53 → 97.69, unit 99.29 → 99.70)
|
||||
`GXRenderModeObj renderMode = *System::getRenderModeObj();` emitted a memcpy-style
|
||||
word-copy loop (lwzu/stwu, ~8 insns). Orig emits a memberwise copy (lhz/sth for u16
|
||||
fields, lwz/stw for u32, lbz/stb for the u8 arrays — ~30 insns).
|
||||
Fix: split declaration from assignment:
|
||||
```
|
||||
GXRenderModeObj renderMode;
|
||||
renderMode = *System::getRenderModeObj();
|
||||
```
|
||||
Copy-INITIALIZATION of a C++ POD goes through MWCC's aggregate/memcpy path;
|
||||
copy-ASSIGNMENT expands memberwise. draw now 629 vs orig 632 insns.
|
||||
|
||||
### AOSS_Init_old (prior session, committed this wave)
|
||||
dead-but-emitted else arm (`else if (state != 0)` chained-beq form), `0 <= x`
|
||||
bound form, `(u32)*ptr == 1u` cast, two switch→if/else decodes, ternary-arg Sleep.
|
||||
|
||||
## Walls verified (ties, not structure)
|
||||
|
||||
### scanAP — `subi+cntlzw` bool-materialization family (3 sites)
|
||||
`if (!mpMainLayout->getAnim(i)->isPlaying())` — orig materializes the callee's
|
||||
bool (`addi r0,r3,-1; cntlzw; rlwinm. r0,r0,27,5,31; bne`), mine fuses to
|
||||
`cmpwi 1; beq`. Tried: bool local, named Animator* local, `== true`, `== false`,
|
||||
`!= 0` on the inline's return, `AnimState`-typed and `u32`-typed mState —
|
||||
MWCC folds every form to the direct compare. No out-of-line isPlaying exists on
|
||||
either side. Residual also includes 2-3 insns of lwz/addi scheduling ties.
|
||||
|
||||
### convertRevIP (98.70)
|
||||
Normalized-identical instruction stream (73=73 insns); fuzzy residual is a
|
||||
word-level register binding — regname family.
|
||||
|
||||
### draw residual (97.69, -3 insns)
|
||||
Two clusters: a `bne`/`beq+lbz+b` 3-insn branch-layout diff around the
|
||||
browserWindow guard (O56-62), and an int→f32 divide/store scheduling window
|
||||
(`srawi/stw/lfd/fsubs/fmr`, O275-293). The `beq '#F'` diffs in the normalized
|
||||
log are normalization artifacts (branch-target immediates), not real diffs.
|
||||
|
||||
### AOSS/AOSSSendHelloRequest
|
||||
Identical unrolled CRC x8 structure verified; residual is table-base pinning.
|
||||
### ATERM Md5Update
|
||||
Index-form kept (fuzzy 91.26 > pointer-walk 84.21 — fuzzy is positional).
|
||||
|
||||
## Owner ruling (PR #973)
|
||||
Dead objects that only pad a section are forbidden; unreferenced .sbss/.data
|
||||
gaps stay unowned unless a target relocation references the address.
|
||||
Reference in New Issue
Block a user