Compare commits

..

1 Commits

Author SHA1 Message Date
coah
59df857f7b decomp: recover AOSS initialization guards and request lifetimes 2026-10-02 19:12:50 -05:00
108 changed files with 649 additions and 14744 deletions

View File

@@ -879,7 +879,7 @@ config.libs = [
Object(NonMatching, "scene/setting/AOSSLink.c"),
Object(Matching, "scene/setting/iplRakuRakuThread.cpp"),
Object(NonMatching, "scene/setting/AOSS.c", extra_cflags=["-O4,p", "-inline off"]),
Object(NonMatching, "scene/setting/ATERM.c", extra_cflags=["-O4,p", "-inline on"]),
Object(NonMatching, "scene/setting/ATERM.c", extra_cflags=["-O4,p", "-inline off"]),
]
),
IPLSection("settingSelect", [
@@ -997,7 +997,7 @@ config.libs = [
Object(Matching, "clib/zi8is.c"),
Object(NonMatching, "clib/zi8match.c"),
Object(Matching, "clib/zi8misc.c"),
Object(Matching, "clib/zi8pud2.c"),
Object(NonMatching, "clib/zi8pud2.c"),
Object(Matching, "clib/Zi8punct.c"),
Object(Matching, "clib/zi8space.c"),
Object(NonMatching, "clib/zi8uwd.c"),
@@ -1081,9 +1081,9 @@ config.libs = [
Object(Matching, "nwc24/NWC24Parser.c"),
Object(Matching, "nwc24/NWC24MsgCommit.c"),
Object(Matching, "nwc24/NWC24MsgRead.c"),
Object(Matching, "nwc24/NWC24MsgSubject.c"),
Object(NonMatching, "nwc24/NWC24MsgSubject.c"),
Object(Matching, "nwc24/NWC24Schedule.c"),
Object(Matching, "nwc24/NWC24DateParser.c"),
Object(NonMatching, "nwc24/NWC24DateParser.c"),
Object(Matching, "nwc24/NWC24FriendList.c"),
Object(Matching, "nwc24/NWC24SecretFList.c"),
Object(Matching, "nwc24/NWC24UserId.c"),
@@ -1826,7 +1826,7 @@ config.libs = [
Object(Matching, "fa/pfs_unmount.c"),
Object(Matching, "fa/pf_stub_unicode.c"),
Object(Matching, "fa/api/FAAttach.c"),
Object(NonMatching, "fa/api/FAAttach.c"),
Object(Matching, "fa/api/FABuffering.c"),
Object(Matching, "fa/api/FACreate.c"),
Object(Matching, "fa/api/FACreatedir.c"),

View File

@@ -142,6 +142,9 @@ namespace textinput {
// TODO enum?
int getInputType() const;
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
void resetHoldingButton();
#endif
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
#if defined(MYTIMANAGER_IMPLEMENTATION) && defined(TI_CELLPHONE_IMPLEMENTATION)

View File

@@ -69,9 +69,6 @@
virtual bool updateInput(int chan, f32 x, f32 y, u32 trig, u32 hold, u32 release, void* data) override;
virtual bool updateInput(input::HKBManager& hkbManager) override;
#endif
#if defined(TI_CELLPHONE_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
void resetHoldingButton();
#endif
#ifdef TI_CELLPHONE_IMPLEMENTATION
virtual ~LayoutByNW4R();
virtual void create(MEMAllocator* allocator) override;
@@ -98,6 +95,7 @@
virtual void changeSpaceKeyTop(const PaneNameToCharCode* keys);
void setUpperCaseJP(bool enabled);
void setLangKeyActive(bool enabled);
void resetHoldingButton();
private:
bool mbLineFeedButton;

View File

@@ -563,23 +563,26 @@ static void TMCJPEGDEC_converterYUV420toRGB565(TMCCJPEGDecWork* work, s32 x, s32
}
static void TMCJPEGDEC_converterYUV420toRGB565edge(TMCCJPEGDecWork* work, s32 x, s32 y) {
s32 chromaSkip;
u16* output;
s32 yEnd;
s8 crValue;
s32 tileRow;
u8* texture;
u8* luminance;
s32 width;
s8* cb;
s8 crValue;
s32 width;
s8* cr;
s8 cbValue;
s32 column;
s32 xEnd;
s8 cbValue;
s32 yEnd;
s32 red;
s32 blue;
u32 tileWidth;
s32 height;
TMCCJPEGDecState* state;
s32 green;
s32 lumaSkip;
u32 tileWidth;
s32 chromaSkip;
s32 redOffset;
s32 greenOffset;
s32 blueOffset;
@@ -616,18 +619,16 @@ static void TMCJPEGDEC_converterYUV420toRGB565edge(TMCCJPEGDecWork* work, s32 x,
greenOffset = -(cbValue * 88 + crValue * 183) >> 8;
blueOffset = (cbValue * 454) >> 8;
}
{
s32 value = *luminance++;
s32 red = value + redOffset;
s32 blue = value + blueOffset;
s32 green = value + greenOffset;
if ((blue | red | green) >> 8) {
blue = blue > 255 ? 255 : blue < 0 ? 0 : blue;
green = green > 255 ? 255 : green < 0 ? 0 : green;
red = red > 255 ? 255 : red < 0 ? 0 : red;
}
output[(column & 3) + (((column >> 2) + tileRow) << 4)] = ((blue & 0xF8) >> 3) + ((red & 0xF8) << 8) + ((green & 0xFC) << 3);
blue = *luminance++;
red = blue + redOffset;
green = blue + greenOffset;
blue = blue + blueOffset;
if ((blue | red | green) >> 8) {
blue = blue > 255 ? 255 : blue < 0 ? 0 : blue;
green = green > 255 ? 255 : green < 0 ? 0 : green;
red = red > 255 ? 255 : red < 0 ? 0 : red;
}
output[(column & 3) + (((column >> 2) + tileRow) << 4)] = ((blue & 0xF8) >> 3) + ((red & 0xF8) << 8) + ((green & 0xFC) << 3);
}
luminance += lumaSkip;
if (y & 1) {
@@ -820,6 +821,9 @@ static void TMCJPEGDEC_converterYUV444toRGB565(TMCCJPEGDecWork* work, s32 x, s32
s32 cbValue;
s32 yEnd;
u32 tileWidth;
s32 green;
s32 blue;
s32 red;
s32 height;
luminance = work->convBuf + 4;
@@ -839,19 +843,17 @@ static void TMCJPEGDEC_converterYUV444toRGB565(TMCCJPEGDecWork* work, s32 x, s32
for (column = x; column < xEnd; column++) {
cbValue = (s8)*cb++;
crValue = (s8)*cr++;
{
s32 value = *luminance++;
s32 green = value + (-(cbValue * 88 + crValue * 183) >> 8);
s32 red = value + ((crValue * 359) >> 8);
s32 blue = value + ((cbValue * 454) >> 8);
if ((red | green | blue) >> 8) {
blue = blue > 255 ? 255 : blue < 0 ? 0 : blue;
green = green > 255 ? 255 : green < 0 ? 0 : green;
red = red > 255 ? 255 : red < 0 ? 0 : red;
}
output[(column & 3) + (((column >> 2) + tileRow) << 4)] =
((blue & 0xF8) >> 3) + (((red & 0xF8) << 8) + ((green & 0xFC) << 3));
red = *luminance++;
green = red + (-(cbValue * 88 + crValue * 183) >> 8);
blue = red + ((cbValue * 454) >> 8);
red = red + ((crValue * 359) >> 8);
if ((blue | green | red) >> 8) {
blue = blue > 255 ? 255 : blue < 0 ? 0 : blue;
green = green > 255 ? 255 : green < 0 ? 0 : green;
red = red > 255 ? 255 : red < 0 ? 0 : red;
}
output[(column & 3) + (((column >> 2) + tileRow) << 4)] =
((blue & 0xF8) >> 3) + (((red & 0xF8) << 8) + ((green & 0xFC) << 3));
}
luminance += rowSkip;
cb += rowSkip;

View File

@@ -517,9 +517,9 @@ static void TMCJPEGDEC_converterYUV422toRGBA8edge(TMCCJPEGDecWork* work, s32 x,
}
static void TMCJPEGDEC_converterYUV420toRGBA8(TMCCJPEGDecWork* work, s32 x, s32 y) {
s32 chromaSkip;
s8 crValue;
s32 tileRow;
s8 crValue;
s32 chromaSkip;
u8* luminance;
TMCCJPEGDecState* state;
u8* texture;
@@ -528,15 +528,15 @@ static void TMCJPEGDEC_converterYUV420toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
s32 green;
s32 blue;
s32 lumaSkip;
u8* cb;
u8* cr;
s32 yEnd;
s32 xEnd;
s32 value;
s32 column;
s32 xEnd;
s32 yEnd;
u8* cr;
s32 greenOffset;
s32 tileWidth;
s32 redOffset;
s32 greenOffset;
u8* cb;
u16* output;
s32 blueOffset;
s32 red;

View File

@@ -1,20 +1,5 @@
#include <zi8clib/zitypes.h>
typedef struct {
ziU8 countOnly;
ziU8 maxWordLength;
ziU8 lookupMode;
ziU8 suffixOnly;
ziU8 controls[8];
ziU32 maxCount;
ziU16 capacity;
ziU8 minWordLength;
ziU8 flags;
ziU16 candidateCapacity;
ziU8 checkOnly;
ziU8 reserved;
} ZiCandidateOptions;
const ziWChar Zi8PunctTable[40] = {
0xFF0C, 0x3002, 0x3001, 0xFF1A, 0xFF1F, 0xFF01, 0x3005, 0x2026,
0x2015, 0xFF1B, 0xFF0E, 0x30FB, 0x201C, 0x201D, 0xFF08, 0xFF09,
@@ -23,8 +8,8 @@ const ziWChar Zi8PunctTable[40] = {
0xFFE1, 0x20AC, 0x203B, 0xFF20, 0x0000,
};
ziU32 Zi8Punctuation(ziGetParam* param, ziPtr options ZI_NEED_WORK) {
ziS32 limit = ((ZiCandidateOptions*)options)->capacity - 1;
ziS32 Zi8Punctuation(ziGetParam* param ZI_NEED_WORK) {
ziS32 limit = ((ziU16*)__zi8_work_data)[8] - 1;
ziS32 count = 0;
ziU8 i = 0;
ziU16 fc = param->firstCandidate;
@@ -36,7 +21,7 @@ ziU32 Zi8Punctuation(ziGetParam* param, ziPtr options ZI_NEED_WORK) {
}
if (fc == 0) {
count++;
if (((ZiCandidateOptions*)options)->countOnly == 0) {
if (ZI_WORK->getcPhase == 0) {
param->candidates[i++] = Zi8PunctTable[j];
if ((param->context & 0x10) != 0) {
param->candidates[i++] = 0x20;
@@ -48,7 +33,7 @@ ziU32 Zi8Punctuation(ziGetParam* param, ziPtr options ZI_NEED_WORK) {
break;
}
} else {
if (count >= (ziS32)((ZiCandidateOptions*)options)->maxCount) {
if (count >= (ziS32)ZI_WORK->targetCount) {
return count;
}
}
@@ -57,7 +42,7 @@ ziU32 Zi8Punctuation(ziGetParam* param, ziPtr options ZI_NEED_WORK) {
}
j++;
}
if (((ZiCandidateOptions*)options)->countOnly == 0) {
if (ZI_WORK->getcPhase == 0) {
param->letters = count;
}
return count;

View File

@@ -23,7 +23,7 @@ typedef struct ziConversionTable {
} ziConversionTable;
const ziConversionTables Zi8CvrtTables = {0};
ziU16 Zi8GetTableCount(ziU8, ziU8 ZI_NEED_WORK);
ziU32 Zi8GetTableAddress(ziU8, ziU8 ZI_NEED_WORK);
ziPtr Zi8GetTableAddress(ziU8, ziU8 ZI_NEED_WORK);
ziWChar Zi8ConvertUC2UserKey(ziChar, ziU8 ZI_NEED_WORK);
ziWChar Zi8ConvertUC2WC(ziChar character, ziU8 language ZI_NEED_WORK) {
@@ -37,7 +37,7 @@ ziWChar Zi8ConvertUC2WC(ziChar character, ziU8 language ZI_NEED_WORK) {
return 0;
}
if (Zi8GetTableCount(language, 6, __zi8_work_data) != 0) {
table = (ziU8*)Zi8GetTableAddress(language, 6, __zi8_work_data);
table = Zi8GetTableAddress(language, 6, __zi8_work_data);
if (table == 0) {
Zi8LogError(0x6A4, __zi8_work_data);
return 0;
@@ -77,7 +77,7 @@ ziChar Zi8ConvertWC2UC(ziWChar character, ziU8 language ZI_NEED_WORK) {
return 0;
}
if (Zi8GetTableCount(language, 7, __zi8_work_data) != 0) {
table = (ziConversionTable*)Zi8GetTableAddress(language, 7, __zi8_work_data);
table = Zi8GetTableAddress(language, 7, __zi8_work_data);
if (table == 0) {
Zi8LogError(0x6AE, __zi8_work_data);
return 0;
@@ -137,7 +137,7 @@ ziWChar Zi8ConvertUC2Key(ziChar character, ziU8 language ZI_NEED_WORK) {
if (ZI_WORK->userKeys[language] != 0)
return Zi8ConvertUC2UserKey(character, language, __zi8_work_data);
if (Zi8GetTableCount(language, 8, __zi8_work_data) != 0) {
table = (ziConversionTable*)Zi8GetTableAddress(language, 8, __zi8_work_data);
table = Zi8GetTableAddress(language, 8, __zi8_work_data);
if (table == 0) {
Zi8LogError(0x6B8, __zi8_work_data);
return 0;

View File

@@ -15,6 +15,28 @@ typedef struct {
typedef struct { ziU8 keyLow; ziU8 keyHigh; ziU8 code; ziU8 flags; } Zi8AltSoundRecord;
typedef struct {
ziU8 language;
ziU8 getMode;
ziU8 subLanguage;
ziU8 context;
ziU8 getOptions;
ziWChar* elements;
ziU8 elementCount;
ziWChar* currentWord;
ziU8 wordCharCount;
ziWChar* candidates;
ziU8 maxCandidates;
ziU16 firstCandidate;
ziU8 wordCandidates;
ziU8 count;
ziU8 letters;
ziU8* scratch;
ziPtr workspace;
} Zi8OneKeyParam;
typedef struct {
ziU8 countOnly;
ziU8 maxSpellingLength;
@@ -181,15 +203,15 @@ const ziWChar zi8PYfinalSpelling[64][4] = {
const unsigned long long Zi8SOpinyinArray = 0x0303010705000000ULL;
extern ziU16 Zi8Ord2Ord(ziU16, ziPtr);
extern Zi8UInt Zi8Ord2Ord(ziU16, ziPtr);
extern ziU8 Zi8LangSupported(ziU8, ziPtr);
extern ziU16 Zi8GetTableCount(ziU8,ziU8,ziPtr);
extern ziU32 Zi8GetTableAddress(ziU8,ziU8,ziPtr);
extern void Zi8Memset(ziU8*,ziU32,ziS32);
extern ziU8 _Zi8GetCandidates(ziGetParam*,ziPtr);
extern void Zi8InitDupWordBuf(ziPtr);
extern ziU32 Zi8GetPInfo(ziU32,ziWChar *,ziU8,ziPtr);
extern ziU32 Zi8GetZInfo(ziU32,ziWChar *,ziU8,ziPtr);
extern Zi8UInt Zi8GetTableAddress(ziU8,ziU8,ziPtr);
extern void Zi8Memset();
extern int _Zi8GetCandidates();
extern void Zi8InitDupWordBuf();
extern ziU16 Zi8GetPInfo(ziU16,ziWChar *,ziU8,ziPtr);
extern ziU16 Zi8GetZInfo(ziU16,ziWChar *,ziU8,ziPtr);
extern ziBool Zi8IsDupWordW(ziWChar *,ziU8,ziPtr);
extern ziU8 Zi8GetFormatVersion(ziU8,ziPtr);
extern ziU16 Zi8Uni2Ord(ziWChar,ziPtr);
@@ -197,10 +219,10 @@ extern ziU16 Zi8GetPCode(ziU8 *,ziU8 *);
extern ziU8 Zi8MatchOEMdata(ziWChar *,ziU8,ziU8,ziWChar *,ziU16,ziU8,ziU8,ziPtr);
extern ziU8 Zi8MatchPUDdata(ziWChar *,ziU8,ziU8,ziWChar *,ziU16,ziU8,ziU8,ziPtr);
extern ziWChar Zi8Ord2Uni(ziU16,ziPtr);
extern ziU32 Zi8GetZHuwdPtr(ziU32*,ziU16*,ziPtr);
extern ziU8 Zi8GetPyPhonetic(ziWChar*,ziU8,ziU16*,ziU16*,ziU8*,ziU16*,ziU16*,ziPtr);
extern ziU8 Zi8GetBpmfPhonetic(ziWChar*,ziU8,ziU16*,ziU16*,ziU16*,ziU16*,ziPtr);
extern ziU8 _Zi8CheckCandidates(ziGetParam*,ziPtr);
extern Zi8UInt Zi8GetZHuwdPtr(ziU8 **,ziU16 *,ziPtr);
extern int Zi8GetPyPhonetic();
extern ziU8 Zi8GetBpmfPhonetic();
extern int _Zi8CheckCandidates();
Zi8UInt Zi8SpellingZY(ziU16 *output,Zi8UInt key,ziU8 includeTone)
{
@@ -440,15 +462,15 @@ BACKWARD_SEARCH:
goto BINARY_SEARCH;
}
}
static Zi8UInt Zi8SetFindCand(ziU8 *foundCandidates,ziU16 ordinal,ziPtr work)
static Zi8UInt Zi8SetFindCand(ziU8 *foundCandidates,Zi8UInt ordinal,ziPtr work)
{
Zi8UInt result;
ordinal = Zi8Ord2Ord(ordinal,work);
result = (ziU8)((1 << ((int)ordinal % 8)) &
foundCandidates[(int)ordinal / 8]);
foundCandidates[(int)ordinal / 8] |=
1 << ((int)ordinal % 8);
result = (ziU8)((1 << ((int)(ordinal & 0xffff) % 8)) &
foundCandidates[(int)(ordinal & 0xffff) / 8]);
foundCandidates[(int)(ordinal & 0xffff) / 8] |=
1 << ((int)(ordinal & 0xffff) % 8);
return result;
}
@@ -484,7 +506,7 @@ LAB_return_false:
return 0;
}
ziU32 Zi8Get1KeyPressSpelling(ziGetParam *params,Zi8OneKeyOptions *options,Zi8OneKeyWork *work)
Zi8UInt Zi8Get1KeyPressSpelling(Zi8OneKeyParam *params,Zi8OneKeyOptions *options,Zi8OneKeyWork *work)
{
ziU8 candidateCount;
ziBool exactLength;
@@ -509,18 +531,18 @@ ziU32 Zi8Get1KeyPressSpelling(ziGetParam *params,Zi8OneKeyOptions *options,Zi8On
ziU16 *output;
ziU8 *savedSearchOrder;
ziU16 spellingBuffer[8];
ziGetParam searchParams;
Zi8OneKeyParam searchParams;
candidateCount = 0;
totalCandidates = 0;
optionsMask = params->getOptions;
params->count = 0;
params->letters = 0;
params->completion = 0;
optionsMask = optionsMask & ~0x10;
optionsMask = optionsMask & ~0x20;
optionsMask = optionsMask & ~0x40;
if (options->maxSpellingLength == '\0') {
params->letters = 0;
params->count = 0;
Zi8LogError(100,work);
return 0;
}
@@ -798,7 +820,7 @@ ziU32 Zi8Get1KeyPressSpelling(ziGetParam *params,Zi8OneKeyOptions *options,Zi8On
savedSearchCount = work->searchOrderCount;
convertedInput = false;
savedSearchFlags = work->searchFlags;
Zi8Memset((ziU8*)&searchParams,0,0x2c);
Zi8Memset(&searchParams,0,0x2c);
searchParams.getMode = 0;
searchParams.subLanguage = 0x80;
searchParams.context = 1;
@@ -896,7 +918,7 @@ ziU32 Zi8Get1KeyPressSpelling(ziGetParam *params,Zi8OneKeyOptions *options,Zi8On
work->searchFlags = savedSearchFlags;
work->searchOrder = savedSearchOrder;
work->searchOrderCount = savedSearchCount;
params->letters = searchParams.letters;
params->count = searchParams.count;
work->spellingOnly = 0;
if (convertedInput) {
if (params->getMode == '\x03') {
@@ -915,7 +937,7 @@ ziU32 Zi8Get1KeyPressSpelling(ziGetParam *params,Zi8OneKeyOptions *options,Zi8On
}
}
if ((options->countOnly == '\0') && (params->getMode == '\x03')) {
for (tableIndex = 0; tableIndex < params->letters;) {
for (tableIndex = 0; tableIndex < params->count;) {
while (*output != 0) {
if (*output != 0x27) {
*output++ |= 0xf300;
@@ -1000,12 +1022,12 @@ nextSpelling:
}
}
finishSpelling:
params->letters = candidateCount;
params->count = candidateCount;
Zi8LogError(100,work);
return totalCandidates;
}
ziU32 Zi8Get1KeyPressCandidates(ziGetParam *params,Zi8OneKeyOptions *options,Zi8OneKeyWork *work)
int Zi8Get1KeyPressCandidates(Zi8OneKeyParam *params,Zi8OneKeyOptions *options,Zi8OneKeyWork *work)
{
ziU16 wordBuffer [64];
ziU16 spelling [8];
@@ -1024,7 +1046,7 @@ ziU32 Zi8Get1KeyPressCandidates(ziGetParam *params,Zi8OneKeyOptions *options,Zi8
ziU8 *phraseEntries;
ziU16 *currentWord;
ziU8 *entryCursor;
ziU32 userEntriesAddress;
ziU8 *userEntries;
int duplicateIndex;
ziU16 alternateCount;
ziU16 ordinalCount;
@@ -1126,8 +1148,8 @@ ziU32 Zi8Get1KeyPressCandidates(ziGetParam *params,Zi8OneKeyOptions *options,Zi8
}
languageMask = languageMask << 4;
remaining = params->firstCandidate;
params->count = 0;
params->letters = 0;
params->completion = 0;
inputLength = params->elementCount;
if (inputLength != 0) {
while (inputLength != 0) {
@@ -1249,7 +1271,7 @@ ziU32 Zi8Get1KeyPressCandidates(ziGetParam *params,Zi8OneKeyOptions *options,Zi8
tableCursor = Zi8GetTableCount(1,9,work);
}
if (8 < inputLimit) {
params->count = 0;
params->wordCandidates = 0;
goto finishCandidates;
}
for (index = 0; index < (int)(Zi8UInt)inputLimit; index++) {
@@ -1335,7 +1357,7 @@ ziU32 Zi8Get1KeyPressCandidates(ziGetParam *params,Zi8OneKeyOptions *options,Zi8
output[outputIndex++] = candidateCharacter;
}
if (candidateCount >= params->maxCandidates || outputIndex > outputLimit) {
params->count = candidateCount;
params->wordCandidates = candidateCount;
goto finishCandidates;
}
} else {
@@ -1404,7 +1426,7 @@ ziU32 Zi8Get1KeyPressCandidates(ziGetParam *params,Zi8OneKeyOptions *options,Zi8
output[outputIndex++] = candidateCharacter;
}
if (candidateCount >= params->maxCandidates || outputIndex > outputLimit) {
params->count = candidateCount;
params->wordCandidates = candidateCount;
goto finishCandidates;
}
} else {
@@ -1525,7 +1547,7 @@ ziU32 Zi8Get1KeyPressCandidates(ziGetParam *params,Zi8OneKeyOptions *options,Zi8
output[outputIndex++] = firstOrdinal;
}
if (candidateCount >= params->maxCandidates || outputIndex > outputLimit) {
params->count = candidateCount;
params->wordCandidates = candidateCount;
goto finishCandidates;
}
} else {
@@ -1546,7 +1568,7 @@ nextPhrase:
else {
finishPhrases:
if (params->wordCharCount != '\0') {
params->count = candidateCount;
params->wordCandidates = candidateCount;
}
}
if ((options->countOnly == '\0') && (tableCursor != 0)) {
@@ -1607,11 +1629,11 @@ nextSortedOrdinal:
;
}
}
if ((options->countOnly == '\0') && (ziU8)Zi8GetZHuwdPtr(&userEntriesAddress,&userCount,work) != 0)
if ((options->countOnly == '\0') && (ziU8)Zi8GetZHuwdPtr(&userEntries,&userCount,work) != 0)
{
for (phraseOrdinal = 0; phraseOrdinal < userCount;) {
if ((params->elementCount == '\0') || ((((ziU8*)userEntriesAddress)[1] & 0x80) != 0)) {
userOrdinal = (ziU16)(((ziU8*)userEntriesAddress)[1] & 0x7f) << 8 | (ziU16)((ziU8*)userEntriesAddress)[2];
if ((params->elementCount == '\0') || ((userEntries[1] & 0x80) != 0)) {
userOrdinal = (ziU16)(userEntries[1] & 0x7f) << 8 | (ziU16)userEntries[2];
phraseTable = syllableTable + (Zi8UInt)userOrdinal * 0xc;
if (((*phraseTable & languageMask) != 0) &&
((characterSetTable == 0 || ((characterSet & characterSetTable[(Zi8UInt)userOrdinal]) != 0)))) {
@@ -1655,7 +1677,7 @@ nextSortedOrdinal:
}
nextUserOrdinal:
phraseOrdinal++;
userEntriesAddress = userEntriesAddress + 3;
userEntries = userEntries + 3;
}
}
phraseTable = syllableTable;
@@ -1718,12 +1740,12 @@ finishCandidates:
if ((emitWords) && (outputIndex != 0)) {
output[outputIndex++] = 0;
}
params->letters = candidateCount;
params->count = candidateCount;
Zi8LogError(100,work);
return totalCandidates;
}
ziBool Zi8ZHCheckSpelling(ziWChar *input,ziWChar *spelling,ziU8 inputLength,ziPtr work)
Zi8UInt Zi8ZHCheckSpelling(ziU16 *input,ziU16 *spelling,Zi8UInt inputLength,char *work)
{
int index;
ziU8 result;
@@ -1738,11 +1760,11 @@ ziBool Zi8ZHCheckSpelling(ziWChar *input,ziWChar *spelling,ziU8 inputLength,ziPt
int syllableStart;
int syllableLength;
Zi8UInt tableOffset;
ziWChar candidateBuffer [16];
ziU16 phoneticCodes [16];
ziU16 phoneticMasks [16];
ziU8 candidateBuffer [32];
ziU8 phoneticCodes [32];
ziU8 phoneticMasks [32];
ziU16 convertedSpelling [64];
ziGetParam getParam;
Zi8OneKeyParam getParam;
ziU8 maskLow;
ziU8 codeLow;
ziU8 maskHigh;
@@ -1783,7 +1805,7 @@ ziBool Zi8ZHCheckSpelling(ziWChar *input,ziWChar *spelling,ziU8 inputLength,ziPt
}
index = 0;
syllableStart = index;
for (; index < (int)inputLength; index = index + 1) {
for (; index < (int)(inputLength & 0xff); index = index + 1) {
switch (spelling[index]) {
case 0xf331:
toneMask = 1;
@@ -1854,7 +1876,7 @@ nextInputCharacter:
}
else {
if ((input[index] == 0x27) || (input[index] == 0xf360)) {
if (index < (int)inputLength) {
if (index < (int)(inputLength & 0xff)) {
convertedSpelling[index] = input[index] = spelling[index];
}
else {
@@ -1896,7 +1918,7 @@ nextInputCharacter:
getParam.elementCount = (ziU8)index;
getParam.currentWord = 0;
getParam.wordCharCount = 0;
getParam.candidates = candidateBuffer;
getParam.candidates = (ziWChar *)candidateBuffer;
getParam.maxCandidates = 1;
getParam.firstCandidate = 0;
if ((ziU8)_Zi8CheckCandidates(&getParam,work) != 0) {

View File

@@ -160,7 +160,7 @@ extern const ziU8 zi8CangjieCodes[25];
extern const ziWChar ziPuncts[4];
extern const ziWChar ziTones[4];
const ziWChar zi8tones[4];
extern ziU32 Zi8GetZHuwdPtr(ziU32* entries, ziU16* count, ziPtr work);
extern ziU8 Zi8GetZHuwdPtr(ziU8** entries, ziU16* count, ziPtr work);
extern ziBool Zi8IsComponent(ziWChar character, ziPtr work);
extern ziBool Zi8IsCharacter(ziWChar character, ziPtr work);
extern ziU8 Zi8MatchOEMdata(ziWChar* currentWord, ziU8 length, ziU8 language,
@@ -199,7 +199,7 @@ static int zi8InternalGetZH(ziGetParam* request, ZiChineseOptions* options, ziPt
ziU8 matchMode;
int index;
ziWChar* currentWord;
ziU32 userEntriesAddress;
ziU8* userEntries;
ziU16 ordinalIndex;
ziU16 tableIndex;
ziU16 phraseOrdinal;
@@ -1754,10 +1754,10 @@ tone_candidates:
user_character_search:
if (((struct __zi8_work_data_s*)work)->uwdPtrCount && (getMode != 0 || !firstPhoneticPass) &&
!options->countOnly && (match.nCand <= 1 || (getMode != 1 && getMode != 2)) &&
(ziU8)Zi8GetZHuwdPtr(&userEntriesAddress, &userCount, work) && (getMode != 0 || match.nSeg <= 1)) {
Zi8GetZHuwdPtr(&userEntries, &userCount, work) && (getMode != 0 || match.nSeg <= 1)) {
userIndex = 0;
while (userIndex < userCount) {
candidateOrdinal = (ziU16)(((ziU8*)userEntriesAddress)[1] & 0x7F) << 8 | ((ziU8*)userEntriesAddress)[2];
candidateOrdinal = (ziU16)(userEntries[1] & 0x7F) << 8 | userEntries[2];
record = records + candidateOrdinal * 12;
if (!(record[0] & charset)) goto user_character_next;
character = ((ziU16)record[6] << 8) + record[7];
@@ -1792,7 +1792,7 @@ user_character_search:
(ziU8)Zi8SecMatchChar(record, componentTable, &match, 0, work)) candidateStatus = 1;
break;
case 1: case 2:
if (request->elementCount && !(((ziU8*)userEntriesAddress)[1] & 0x80)) candidateStatus = 0;
if (request->elementCount && !(userEntries[1] & 0x80)) candidateStatus = 0;
else {
candidateStatus = (match.first & (ziU16)Zi8GetPCode(phoneticTable, record)) == match.first2;
if (!candidateStatus && (record[0] & 0x80) && !requireFull &&
@@ -1827,7 +1827,7 @@ user_character_search:
}
user_character_next:
++userIndex;
userEntriesAddress += 3;
userEntries += 3;
}
}
if (!prefixLookup) goto phonetic_alt_continue;

View File

@@ -62,7 +62,7 @@ ziU8 Zi8InitializeDynamic(ziLanguageEntry* langEntries ZI_NEED_WORK) {
return 1;
}
ziU8 Zi8IsZicorpSignature(ziU16* p, ziU16 len ZI_NEED_WORK) {
ziU8 Zi8IsZicorpSignature(ziU16* p, ziU16 len) {
if ((ziU16)len > 6 && p[0] == 0x7A && p[1] == 0x69 && p[2] == 0x63 &&
p[3] == 0x6F && p[4] == 0x72 && p[5] == 0x70) {
return 1;

View File

@@ -506,7 +506,7 @@ pinyin_initial:
convertedCount = Zi8PinyinInitials[value];
if (convertedCount != 0) {
if (outputIndex == 0) {
*resultCount += 1;
*resultCount = *resultCount + 1;
}
result++;
initial[outputIndex] = 0x7E00;
@@ -526,7 +526,7 @@ pinyin_initial:
value = *current;
if (value != 0x68 && value != 0xF368) goto scan_final;
if (outputIndex == 0) {
*resultCount += 1;
*resultCount = *resultCount + 1;
}
final[outputIndex] += 0x200;
*bestInitial = initial[0];
@@ -567,7 +567,7 @@ scan_final:
value -= 0xF361;
if (value > 0x19) {
if (outputIndex == 0) {
*resultCount += 1;
*resultCount = *resultCount + 1;
}
goto finish_final;
}
@@ -577,7 +577,7 @@ scan_final:
pinyin[index] = (ziU8)value + 1;
if (Zi8GetPyFinal(pinyin, &pyInitial, &pyFinal) == 0) goto try_final_extension;
if (outputIndex == 0) {
*resultCount += 1;
*resultCount = *resultCount + 1;
}
current++;
index++;
@@ -592,7 +592,7 @@ try_final_extension:
pinyin[index + 1] = 0xFF;
if (Zi8GetPyFinal(pinyin, &pyInitial, &pyFinal) != 0) {
if (outputIndex == 0) {
*resultCount += 1;
*resultCount = *resultCount + 1;
}
pinyin[index + 1] = 0;
current++;
@@ -615,7 +615,7 @@ try_final_extension:
finish_final:
if ((index > 3) && (count != 0) && (((value = *current) == 0x27) || (value == 0xF360) || (value == 0x20))) {
if (outputIndex == 0) {
*resultCount += 1;
*resultCount = *resultCount + 1;
}
current++;
count--;
@@ -705,10 +705,11 @@ finish_final:
}
}
}
if (++outputIndex > 0xf) break;
outputIndex++;
if (outputIndex > 0xf) break;
}
if ((result > 1) && (text[*resultCount - 1] >= 0xF341) && (text[*resultCount - 1] <= 0xF35A)) {
*resultCount -= 1;
*resultCount = *resultCount - 1;
}
return result;
@@ -742,9 +743,9 @@ check_row:
return 0;
}
ziU8 Zi8GetBpmfPhonetic(ziWChar* text, ziU8 count, ziU16* initial, ziU16* final, ziU16* bestInitial, ziU16* bestFinal ZI_NEED_WORK) {
ziS32 Zi8GetBpmfPhonetic(ziWChar* text, ziU8 count, ziU16* initial, ziU16* final, ziU16* bestInitial, ziU16* bestFinal ZI_NEED_WORK) {
ziU16 value;
ziU8 resultCount = 0;
ziU32 resultCount = 0;
Zi8LogError(0x64, ZI_WORK);
if (count == 0) {

View File

@@ -17,7 +17,7 @@ typedef struct ziPudHeader {
ziU8 options[4];
ziPudSection sections[1];
} ziPudHeader;
ziU8 Zi8_8147FD7C(ziWChar*, ziU8, ziU8, ziWChar*, ziU16, ziU8, ziU8 ZI_NEED_WORK);
ziU32 Zi8_8147FD7C(ziWChar*, ziU8, ziU8, ziWChar*, ziU16, ziU8, ziU8 ZI_NEED_WORK);
ziU32 ZiIsPhoneticChar(ziWChar character) {
if ((character < 0xF305 || character > 0xF329) && (character < 0xF361 || character > 0xF37A)) return 0;
@@ -56,11 +56,8 @@ ziU8 ZADP_Zi8SetPDremoveOpt(ziU8 option, struct __zi8_work_data_s* __zi8_work_da
Zi8LogError(100, __zi8_work_data);
return previous;
}
ziU8 Zi8MatchPUDdata_ZHS(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar* output, ziU16 capacity, ziWChar* spelling, ziU16 spellingCapacity, ziU8 complete, ziU8 continuation ZI_NEED_WORK) {
struct {
int fallback;
ziPtr workspace;
} match;
ziU32 Zi8MatchPUDdata_ZHS(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar* output, ziU16 capacity, ziWChar* spelling, ziU16 spellingCapacity, ziU8 complete, ziU8 continuation ZI_NEED_WORK) {
int fallback = 0;
ziU8* bytePattern;
ziWChar folded;
ziPudSection* section;
@@ -71,8 +68,6 @@ ziU8 Zi8MatchPUDdata_ZHS(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar*
ziU32 entrySize;
ziPudHeader* table;
ziU8* byteOutput;
match.workspace = __zi8_work_data;
match.fallback = 0;
if (!(ZI_WORK->pudCount <= 16 && ZI_WORK->pudCount != 0 && ZI_WORK->pudTable[ZI_WORK->pudCount - 1] != 0)) {
Zi8LogError(0x4B0, __zi8_work_data);
return 0;
@@ -93,8 +88,8 @@ ziU8 Zi8MatchPUDdata_ZHS(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar*
Zi8LogError(0x4F6, __zi8_work_data);
return 0;
}
ZI_WORK->unk_0x314 = ((ziU16)section->count[0] << 8) + (ziU16)section->count[1];
ZI_WORK->unk_0x310 = (ziU32)table + (((ziU16)section->offset[0] << 8) + (ziU16)section->offset[1]);
ZI_WORK->unk_0x314 = section->count[0] * 0x100 + section->count[1];
ZI_WORK->unk_0x310 = (ziU32)table + section->offset[0] * 0x100 + section->offset[1];
ZI_WORK->unk_0x318 = 0;
}
for (;;) {
@@ -135,7 +130,7 @@ matchText:
}
}
matched:
if (match.fallback) {
if (fallback) {
ZI_WORK->unk_0x310 = 0;
ZI_WORK->unk_0x318 = 0;
ZI_WORK->unk_0x314 = 0;
@@ -169,7 +164,7 @@ matched:
}
if (length == 1 && complete != 0 && continuation == 0) {
complete = 0;
match.fallback = 1;
fallback = 1;
ZI_WORK->unk_0x318 = 0;
} else {
ZI_WORK->unk_0x310 = 0;
@@ -179,12 +174,12 @@ matched:
}
}
}
ziU8 Zi8MatchPUDdata(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar* output, ziU16 capacity, ziU8 complete, ziU8 continuation, struct __zi8_work_data_s* __zi8_work_data) {
ziU8 result;
ziU32 Zi8MatchPUDdata(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar* output, ziU16 capacity, ziU8 complete, ziU8 continuation, struct __zi8_work_data_s* __zi8_work_data) {
ziU32 result;
if (continuation == 0) __zi8_work_data->pudCount = 1;
for (;;) {
result = Zi8_8147FD7C(pattern, length, language, output, capacity, complete, continuation, __zi8_work_data);
if (result != 0) break;
if ((ziU8)result != 0) break;
if (++__zi8_work_data->pudCount <= 16) {
continuation = 0;
} else {
@@ -194,6 +189,6 @@ ziU8 Zi8MatchPUDdata(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar* outp
}
return result;
}
ziU8 Zi8_8147FD7C(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar* output, ziU16 capacity, ziU8 complete, ziU8 continuation ZI_NEED_WORK) {
ziU32 Zi8_8147FD7C(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar* output, ziU16 capacity, ziU8 complete, ziU8 continuation ZI_NEED_WORK) {
return Zi8MatchPUDdata_ZHS(pattern, length, language, output, capacity, 0, 0, complete, continuation, __zi8_work_data);
}

View File

@@ -1,13 +1,13 @@
#include <zi8clib/zitypes.h>
ziU16 Zi8GetVersion(ziPtr __zi8_work_data) {
ziU16 Zi8GetVersion() {
return 1802;
}
ziU16 Zi8GetBuildID(ziPtr __zi8_work_data) {
ziU16 Zi8GetBuildID() {
return 41;
}
ziU16 Zi8GetOEMID(ziPtr __zi8_work_data) {
ziU16 Zi8GetOEMID() {
return 249;
}

View File

@@ -11,15 +11,15 @@ typedef struct {
ziU8 characterLow;
} ZiKoreanKeyEntry;
ziU16 Zi8_8148302C(ziU16 key, ziU8* table ZI_NEED_WORK) {
ziU32 Zi8_8148302C(ziU16 key, ziU8* table ZI_NEED_WORK) {
ziU32 value;
ziU16 count;
ziU16 i;
ziU32 i;
count = Zi8GetTableCount(ZI8_LANG_KO, 9, ZI_WORK);
for (i = 0; i < count; i++) {
value = (ziU16)(((ziU16)table[(i << 3) + i + 7] << 8) |
table[(i << 3) + i + 8]);
for (i = 0; (ziU16)i < count; i++) {
value = (ziU16)(((ziU16)table[((i & 0xFFFF) << 3) + (i & 0xFFFF) + 7] << 8) |
table[((i & 0xFFFF) << 3) + (i & 0xFFFF) + 8]);
if (value == key) {
Zi8LogError(0x64, ZI_WORK);
return i;
@@ -313,8 +313,7 @@ ziU32 Zi8GetKOcandidates(ziGetParam* param, ZiKoreanCandidateOptions* options ZI
param->candidates[0] = 0;
}
Zi8LogError(100, ZI_WORK);
if (param->wordCharCount == 0) goto scan_key_table;
{
if (param->wordCharCount != 0) {
if (((search.keyIndex = Zi8_8148302C(param->currentWord[0], keyTable, ZI_WORK)) != 0xFFFF) &&
((((ZiKoreanKeyEntry*)(((search.keyIndex << 3) + search.keyIndex) + keyTable))->keyBytes[4] & 8) != 0)) {
search.wordOffset = ((ZiKoreanKeyEntry*)(((search.keyIndex << 3) + search.keyIndex) + keyTable))->childLow |
@@ -439,7 +438,6 @@ search_table:
param->count = search.candidateCount;
param->letters = search.candidateCount;
}
scan_key_table:
if (param->elementCount > 9) {
param->letters = 0;
return 0;

View File

@@ -280,8 +280,10 @@ savePhonetic:
}
if (buffers.phoneticInput[phoneticLength - 1] == 0xF360) {
match->nCand--;
bestInitial = initial = previousInitial;
bestFinal = final = previousFinal;
bestInitial = previousInitial;
bestFinal = previousFinal;
final = bestFinal;
initial = bestInitial;
goto savePhonetic;
}
if (match->nCand == 1) {

View File

@@ -6,6 +6,11 @@ typedef struct FA_NAND_ATTACH {
u32 size;
} FA_NAND_ATTACH;
typedef struct FA_ATTACH_REQUEST {
FADrvTbl* table;
u32 count;
} FA_ATTACH_REQUEST;
FADisk* gOpenDisk[26];
FAPartition* gOpenPartition[26];
typedef struct FA_DISK_INIT {
@@ -29,13 +34,13 @@ static struct {
} drvInitFunc = {diskInitTbl, 3};
extern s32 pdm_open_disk(FA_DISK_INIT* table, FADisk** disk);
extern s32 pdm_open_partition(FADisk* disk, u32 index, FAPartition** partition);
extern s32 pfstub_attach(FADrvTbl** drives, const void* nand_data);
extern s32 pfstub_attach(FA_ATTACH_REQUEST* request, FA_NAND_ATTACH* nand);
extern s32 pfd_sddrv_is_media_insert(void);
extern s32 pfd_mscdrv_is_media_insert(FADisk* disk);
extern s32 pfd_mscdrv_is_media_insert(void);
FAError FAAttach(u32 device, char* nand_path, u32 nand_size, FADrvTbl* table) {
FADisk* disk;
FADrvTbl* drives[2];
FA_ATTACH_REQUEST request;
FA_NAND_ATTACH nand;
s32 error;
s32 index;
@@ -60,16 +65,16 @@ FAError FAAttach(u32 device, char* nand_path, u32 nand_size, FADrvTbl* table) {
return -1;
}
}
drives[0] = table;
drives[1] = NULL;
request.table = table;
request.count = 0;
if (device == 2) {
memcpy(nand.path, nand_path, 78);
nand.size = nand_size;
}
if (device == 2) {
error = pfstub_attach(drives, &nand);
error = pfstub_attach(&request, &nand);
} else {
error = pfstub_attach(drives, NULL);
error = pfstub_attach(&request, NULL);
}
if (error != 0) {
return -1;
@@ -80,11 +85,11 @@ FAError FAAttach(u32 device, char* nand_path, u32 nand_size, FADrvTbl* table) {
gOpenPartition[index] = table->pPart;
if (device == 0) {
if (pfd_sddrv_is_media_insert()) {
drives[0]->stat |= 0x10;
request.table->stat |= 0x10;
}
} else if (device == 1) {
if (pfd_mscdrv_is_media_insert(disk)) {
drives[0]->stat |= 0x10;
if (pfd_mscdrv_is_media_insert()) {
request.table->stat |= 0x10;
}
}
} else {

View File

@@ -3,7 +3,7 @@
static FAEjectCallback g_detach_func;
static FAInsertCallback g_attach_func;
extern s32 uhf_msc_is_media_insert(FADisk* disk);
extern s32 uhf_msc_is_media_insert(void);
s32 pfd_mscdrv_registar_callback(FAInsertCallback insert, FAEjectCallback eject) {
g_attach_func = insert;
@@ -11,6 +11,6 @@ s32 pfd_mscdrv_registar_callback(FAInsertCallback insert, FAEjectCallback eject)
return 0;
}
s32 pfd_mscdrv_is_media_insert(FADisk* disk) {
return uhf_msc_is_media_insert(disk);
s32 pfd_mscdrv_is_media_insert(void) {
return uhf_msc_is_media_insert();
}

View File

@@ -318,58 +318,58 @@ s32 pfd_sddrv_init(FADisk* disk) {
}
if ((pfd_sddrv_flags(&g_pfd_sddrv_info) & 1) != 0) {
OSReport("INFO SD Card driver is already initialize. pfd_sddrv_init()\n");
if (disk != g_pfd_sddrv_info.disk) {
return -44;
if (disk == g_pfd_sddrv_info.disk) {
return 0;
}
return -44;
}
if ((g_pfd_sddrv_info.flags & 4) == 0) {
g_pfd_sddrv_info.bytes_per_sector = 0x200;
pf_memset(&g_pfd_sddev, 0, 0x28);
sd_result = ISD_InitCard();
if (sd_result != 0) {
OSReport("ERR:Failed to init SD Card Driver in pfd_sddrv_init()\n");
return -40;
}
g_pfd_sddrv_info.flags |= 4;
}
pf_memset(&g_pfd_sddev, 0, 0x28);
device = &g_pfd_sddev.device;
sd_result = ISD_MountCard(0, &device);
if (sd_result != 0) {
OSReport("ERR SD card can not mount [ret = 0x%x]. pfd_sddrv_init()\n", sd_result);
return -41;
}
sd_result = ISD_GetDeviceStatus(device, &status);
if (sd_result != 0) {
OSReport("ERR Failed to get sd card status. [ret = 0x%x]\n", sd_result);
return 21;
}
if ((status & 1) != 0) {
g_pfd_sddrv_info.media_inserted = 1;
}
g_pfd_sddrv_info.device = device;
if (g_pfd_sddrv_info.media_inserted != 0) {
g_event = 2;
sd_result = ISD_RegisterDeviceIntrHandler(device, (SDDevIntrCallback)pfd_st_removal_callback, &g_event);
if (sd_result != 0) {
OSReport("ERR:Failed to regist intr handler1 [ret = 0x%x] pfd_sddrv_init()\n", sd_result);
ISD_UnmountCard(device);
g_pfd_sddrv_info.device = 0;
return -42;
}
} else {
if ((g_pfd_sddrv_info.flags & 4) == 0) {
g_pfd_sddrv_info.bytes_per_sector = 0x200;
pf_memset(&g_pfd_sddev, 0, 0x28);
sd_result = ISD_InitCard();
if (sd_result != 0) {
OSReport("ERR:Failed to init SD Card Driver in pfd_sddrv_init()\n");
return -40;
}
g_pfd_sddrv_info.flags |= 4;
}
pf_memset(&g_pfd_sddev, 0, 0x28);
device = &g_pfd_sddev.device;
sd_result = ISD_MountCard(0, &device);
g_event = 1;
sd_result = ISD_RegisterDeviceIntrHandler(device, (SDDevIntrCallback)pfd_st_inter_callback, &g_event);
if (sd_result != 0) {
OSReport("ERR SD card can not mount [ret = 0x%x]. pfd_sddrv_init()\n", sd_result);
return -41;
OSReport("ERR:Failed to regist intr handler1 [ret = 0x%x] pfd_sddrv_init()\n", sd_result);
ISD_UnmountCard(device);
g_pfd_sddrv_info.device = 0;
return -42;
}
sd_result = ISD_GetDeviceStatus(device, &status);
if (sd_result != 0) {
OSReport("ERR Failed to get sd card status. [ret = 0x%x]\n", sd_result);
return 21;
}
if ((status & 1) != 0) {
g_pfd_sddrv_info.media_inserted = 1;
}
g_pfd_sddrv_info.device = device;
if (g_pfd_sddrv_info.media_inserted != 0) {
g_event = 2;
sd_result = ISD_RegisterDeviceIntrHandler(device, (SDDevIntrCallback)pfd_st_removal_callback, &g_event);
if (sd_result != 0) {
OSReport("ERR:Failed to regist intr handler1 [ret = 0x%x] pfd_sddrv_init()\n", sd_result);
ISD_UnmountCard(device);
g_pfd_sddrv_info.device = 0;
return -42;
}
} else {
g_event = 1;
sd_result = ISD_RegisterDeviceIntrHandler(device, (SDDevIntrCallback)pfd_st_inter_callback, &g_event);
if (sd_result != 0) {
OSReport("ERR:Failed to regist intr handler1 [ret = 0x%x] pfd_sddrv_init()\n", sd_result);
ISD_UnmountCard(device);
g_pfd_sddrv_info.device = 0;
return -42;
}
}
g_pfd_sddrv_info.disk = disk;
g_pfd_sddrv_info.flags |= 1;
}
g_pfd_sddrv_info.disk = disk;
g_pfd_sddrv_info.flags |= 1;
return 0;
}
@@ -1361,20 +1361,19 @@ s32 pfd_sddrv_store_fat32_bpb_buf(PFD_SDDRV_FORMAT_DATA* format_data, u8* sector
static s32 pfd_sddrv_store_fat32_reserved_buf(u8* sector_buffer) {
PFD_SDDRV_RESERVED_BOOT_SECTOR* reserved_boot_sector;
s32 result = -30;
if (sector_buffer != 0) {
pf_memset(sector_buffer, 0, 0x200);
reserved_boot_sector = (PFD_SDDRV_RESERVED_BOOT_SECTOR*)sector_buffer;
if (((u32)reserved_boot_sector->signature.bytes & 1) != 0) {
reserved_boot_sector->signature.bytes[0] = 0x55;
reserved_boot_sector->signature.bytes[1] = 0xaa;
} else {
reserved_boot_sector->signature.value = 0x55aa;
}
result = 0;
if (sector_buffer == 0) {
return -30;
}
return result;
pf_memset(sector_buffer, 0, 0x200);
reserved_boot_sector = (PFD_SDDRV_RESERVED_BOOT_SECTOR*)sector_buffer;
if (((u32)reserved_boot_sector->signature.bytes & 1) != 0) {
reserved_boot_sector->signature.bytes[0] = 0x55;
reserved_boot_sector->signature.bytes[1] = 0xaa;
} else {
reserved_boot_sector->signature.value = 0x55aa;
}
return 0;
}
s32 pfd_sddrv_build_fat32_mbr_bpb(u32 total_sectors) {

View File

@@ -1,8 +1,5 @@
#include <private/fa/pdm.h>
#include <revolution/types.h>
#define MBR_WORD(buf, offset) \
((pf_u32)(buf)[offset] + ((pf_u32)(buf)[(offset) + 1] << 8) + \
((pf_u32)(buf)[(offset) + 2] << 16) + ((pf_u32)(buf)[(offset) + 3] << 24))
static inline pf_u16 read_boot_u16(pf_u8* buf, pf_u32 offset) {
if ((pf_u32)&buf[offset] & 1) { return (buf[offset + 1] << 8) | buf[offset]; }
return PF_SWAP_16(*(pf_u16*)&buf[(offset + 1) & ~1]);
@@ -14,11 +11,11 @@ static inline pf_u32 read_partition_u32(const pf_u8* buf, pf_u32 offset) {
}
pf_s32 pdm_part_is_master_boot_sector(pf_u8* buf, pf_u32 total, pf_bool* p_is_mbr) {
pf_u32* p_start;
pf_u32* p_count;
pf_s16 index;
pf_u32 start[4];
pf_u32 count[4];
pf_u32* p_start;
pf_u32* p_count;
*p_is_mbr = 0;
if (buf[510] != 0x55 || buf[511] != 0xAA) { return 2; }
p_start = start;
@@ -78,20 +75,15 @@ pf_bool pdm_part_is_boot_sector(pf_u8* buf) {
return is_boot;
}
static inline pf_u32 read_relative_start_sector(pf_u32 base, const pf_u8* buf, pf_u32 offset) {
return base + (buf[offset] + ((unsigned int)buf[offset + 1] << 8) +
((unsigned int)buf[offset + 2] << 16) + ((unsigned int)buf[offset + 3] << 24));
}
pf_s32 pdm_part_get_start_sector(PDM_PARTITION* p_part) {
pf_u32 part_index = 0;
pf_u32 requested = p_part->part_id;
pf_u32 start[4];
pf_u32 count[4];
pf_u32 part_index = 0;
pf_u32 sector;
pf_u32 base;
pf_u16 index;
pf_u16 extended_index;
pf_u32 base;
pf_u32 sector;
pf_u32 length;
pf_bool is_mbr;
pf_u32 success;
@@ -103,14 +95,14 @@ pf_s32 pdm_part_get_start_sector(PDM_PARTITION* p_part) {
if (err != 0) { return err; }
pdm_part_is_master_boot_sector(buf, p_part->p_disk->disk_info.total_sectors, &is_mbr);
if (is_mbr) {
start[0] = MBR_WORD(buf, 454);
start[1] = MBR_WORD(buf, 470);
start[2] = MBR_WORD(buf, 486);
start[3] = MBR_WORD(buf, 502);
count[0] = MBR_WORD(buf, 458);
count[1] = MBR_WORD(buf, 474);
count[2] = MBR_WORD(buf, 490);
count[3] = MBR_WORD(buf, 506);
start[0] = read_partition_u32(buf, 454);
start[1] = read_partition_u32(buf, 470);
start[2] = read_partition_u32(buf, 486);
start[3] = read_partition_u32(buf, 502);
count[0] = read_partition_u32(buf, 458);
count[1] = read_partition_u32(buf, 474);
count[2] = read_partition_u32(buf, 490);
count[3] = read_partition_u32(buf, 506);
part_index = 0;
for (index = 0; index < 4; index++) {
sector = start[index];
@@ -124,15 +116,15 @@ pf_s32 pdm_part_get_start_sector(PDM_PARTITION* p_part) {
sector = base;
for (extended_index = 0; extended_index < 2; extended_index++) {
if (extended_index == 0) {
sector = read_relative_start_sector(sector, buf, 454);
length = MBR_WORD(buf, 458);
sector = sector + read_partition_u32(buf, 454);
length = read_partition_u32(buf, 458);
err = pdm_disk_physical_read(p_part->p_disk, buf, sector, 1, 512, &success);
if (err != 0) { return err; }
if (requested == part_index) { p_part->start_sector = sector; p_part->total_sector = length; return 0; }
part_index++;
} else {
sector = read_relative_start_sector(base, buf, 470);
length = MBR_WORD(buf, 474);
sector = base + read_partition_u32(buf, 470);
length = read_partition_u32(buf, 474);
if (sector == 0 || length == 0) { break; }
err = pdm_disk_physical_read(p_part->p_disk, buf, sector, 1, 512, &success);
if (err != 0) { return err; }

View File

@@ -1,12 +1,12 @@
#include <revolution/fa/pf_stub.h>
s32 pfstub_attach(FADrvTbl** drives, const void* nand_data) {
s32 pfstub_attach(FADrvTbl* drives, u32 mode) {
PF_STUB_MESSAGE message;
message.operation = 27;
message.object = drives;
message.callback = NULL;
message.data = nand_data;
message.data = (void*)mode;
if (pfstub_com_massage(&message) == -1) {
return -1;
}

View File

@@ -571,14 +571,8 @@ static inline f32 clamp_acc_value(f32 value, f32 limit) {
}
static inline void smooth_acc_value(KPADInside* kpad, f32 value, f32* result) {
f32 amount;
f32 delta;
delta = value - *result;
if (delta < 0.0f) {
amount = -delta;
} else {
amount = delta;
}
f32 delta = value - *result;
f32 amount = delta < 0.0f ? -delta : delta;
if (amount >= kpad->value9C) {
amount = 1.0f;
} else {
@@ -618,16 +612,12 @@ static void read_kpad_acc(KPADInside* kpad, KPADSample* status) {
kpad->status.acc_speed = (f32)sqrt(previous.z * previous.z + (previous.x * previous.x + previous.y * previous.y));
calc_acc_horizon(kpad);
calc_acc_vertical(kpad);
if (status->error == 0 && status->device == 1) {
if (status->dataFormat == 4) {
goto read_extension_acceleration;
}
if (status->dataFormat == 5) {
goto read_extension_acceleration;
}
if (status->error != 0 || status->device != 1) {
return;
}
if (status->dataFormat != 4 && status->dataFormat != 5) {
return;
}
return;
read_extension_acceleration:
{
Vec extensionPrevious;
raw.x = clamp_acc_value((f32)-(s32)status->extension.fs.accX * kpad->value4E8, kp_fs_acc_max);
@@ -949,20 +939,15 @@ static void calc_dpd_variable(KPADInside* kpad, s8 valid) {
f32 dx;
f32 next;
dx = value - kpad->status.dist;
if (dx < 0.0f) {
magnitude = -dx;
} else {
magnitude = dx;
}
magnitude = dx < 0.0f ? -dx : dx;
if (magnitude >= kpad->value94) {
magnitude = 1.0f;
} else {
magnitude /= kpad->value94;
magnitude = magnitude / kpad->value94;
magnitude *= magnitude;
magnitude *= magnitude;
}
magnitude *= kpad->value98;
next = magnitude * dx;
next = magnitude * kpad->value98 * dx;
kpad->status.dist_vec = next;
if (next < 0.0f) {
kpad->status.dist_speed = -next;
@@ -973,15 +958,12 @@ static void calc_dpd_variable(KPADInside* kpad, s8 valid) {
}
}
{
f32 midpointFactor = 0.5f;
f32 scaleX = midpointFactor * (kpad->dpdState.candidates[0].x + kpad->dpdState.candidates[1].x);
f32 scaleY = midpointFactor * (kpad->dpdState.candidates[0].y + kpad->dpdState.candidates[1].y);
f32 rotatedX = kpad->dpdObjectDirection.x * kpad->horizonTangent.x + kpad->dpdObjectDirection.y * kpad->horizonTangent.y;
f32 rotatedX = kpad->horizonTangent.x * kpad->dpdObjectDirection.x + kpad->horizonTangent.y * kpad->dpdObjectDirection.y;
f32 rotatedY = -kpad->dpdObjectDirection.y * kpad->horizonTangent.x + kpad->dpdObjectDirection.x * kpad->horizonTangent.y;
f32 transformedX = rotatedX * scaleX - rotatedY * scaleY;
f32 transformedY = rotatedY * scaleX + rotatedX * scaleY;
delta.x = kpad->sensorBarScale * (kpad->sensorBarCenter.x - transformedX);
delta.y = kpad->sensorBarScale * (kpad->sensorBarCenter.y - transformedY);
f32 scaleX = 0.5f * (kpad->dpdState.candidates[0].x + kpad->dpdState.candidates[1].x);
f32 scaleY = 0.5f * (kpad->dpdState.candidates[0].y + kpad->dpdState.candidates[1].y);
delta.x = kpad->sensorBarScale * (kpad->sensorBarCenter.x - (rotatedX * scaleX - rotatedY * scaleY));
delta.y = kpad->sensorBarScale * (kpad->sensorBarCenter.y - (rotatedY * scaleX + rotatedX * scaleY));
point.x = -kpad->accelNormal.y * delta.x + kpad->accelNormal.x * delta.y;
point.y = -kpad->accelNormal.x * delta.x - kpad->accelNormal.y * delta.y;
if (kpad->status.dpd_valid_fg == 0) {
@@ -1314,9 +1296,6 @@ static void read_kpad_stick(KPADInside* kpad, KPADSample* status) {
}
s32 KPADRead(s32 chan, KPADStatus* statuses, u32 count) {
u32 changed;
u16 heldButtons;
KPADStatus* output;
KPADInside* kpad = &inside_kpads[chan];
s32 probe;
BOOL interruptState;
@@ -1324,15 +1303,17 @@ s32 KPADRead(s32 chan, KPADStatus* statuses, u32 count) {
u32 ringCount;
s32 start;
s32 sampleIndex;
s32 remaining;
u32 remaining;
u32 remainingSamples;
u32 buttons;
u16 previousButtons;
u32 coreButtons;
u32 changed;
u32 extensionButtons;
u32 coreButtons;
u8 device;
KPADSample latestSample;
KPADSample* sample;
KPADStatus* output;
if (WPADGetStatus() != 3) {
return 0;
}
@@ -1366,19 +1347,19 @@ s32 KPADRead(s32 chan, KPADStatus* statuses, u32 count) {
if (available > count) {
available = count;
}
remaining = available;
kpad->ringCount = 0;
output = statuses + remaining;
start = kpad->ringIndex - available;
if (start < 0) {
start += 16;
}
--output;
{
KPADStatus* copyOutput;
sampleIndex = start;
remaining = available;
copyOutput = statuses + (available - 1);
while (--remaining != 0) {
output--;
*(KPADSample*)output = kpad->ringData[sampleIndex];
copyOutput--;
*(KPADSample*)copyOutput = kpad->ringData[sampleIndex];
sampleIndex++;
if (sampleIndex >= 16) {
sampleIndex = 0;
@@ -1391,7 +1372,7 @@ s32 KPADRead(s32 chan, KPADStatus* statuses, u32 count) {
WPADAccGravityUnit gravity = {1, 1, 1};
WPADAccGravityUnit extensionGravity = {1, 1, 1};
WPADGetAccGravityUnit(chan, WPAD_ACC_GRAVITY_UNIT_CORE, &gravity);
if (gravity.x * gravity.y * gravity.z != 0) {
if (gravity.z * gravity.x * gravity.y != 0) {
kpad->value4DC = 1.0f / gravity.x;
kpad->value4E0 = 1.0f / gravity.y;
kpad->value4E4 = 1.0f / gravity.z;
@@ -1401,7 +1382,7 @@ s32 KPADRead(s32 chan, KPADStatus* statuses, u32 count) {
kpad->value4E4 = 0.01f;
}
WPADGetAccGravityUnit(chan, WPAD_ACC_GRAVITY_UNIT_FS, &extensionGravity);
if (extensionGravity.x * extensionGravity.y * extensionGravity.z != 0) {
if (extensionGravity.z * extensionGravity.x * extensionGravity.y != 0) {
kpad->value4E8 = 1.0f / extensionGravity.x;
kpad->value4EC = 1.0f / extensionGravity.y;
kpad->value4F0 = 1.0f / extensionGravity.z;
@@ -1414,8 +1395,8 @@ s32 KPADRead(s32 chan, KPADStatus* statuses, u32 count) {
output = statuses + available;
--output;
device = 0xFD;
extensionButtons = 0xFFFF;
coreButtons = 0xFFFF;
extensionButtons = 0xFFFF;
buttons = 0xFFFF;
do {
output--;
@@ -1452,20 +1433,18 @@ s32 KPADRead(s32 chan, KPADStatus* statuses, u32 count) {
if (extensionButtons == 0xFFFF) {
extensionButtons = kpad->status.ex_status.cl.hold;
}
buttons = (buttons & 0x9FFF) | (coreButtons & 0x6000);
previousButtons = kpad->status.hold;
heldButtons = (buttons & 0x9FFF) | (coreButtons & 0x6000);
changed = heldButtons ^ previousButtons;
kpad->status.hold = heldButtons;
kpad->status.trig = changed & heldButtons;
changed = previousButtons ^ buttons;
kpad->status.hold = buttons;
kpad->status.trig = changed & buttons;
kpad->status.release = changed & previousButtons;
if (device == 2) {
u16 previousExtensionButtons;
previousExtensionButtons = kpad->status.ex_status.cl.hold;
extensionButtons = (u16)extensionButtons;
kpad->status.ex_status.cl.hold = extensionButtons;
changed = extensionButtons ^ previousExtensionButtons;
previousButtons = kpad->status.ex_status.cl.hold;
kpad->status.ex_status.cl.hold = (u16)extensionButtons;
changed = previousButtons ^ (u16)extensionButtons;
kpad->status.ex_status.cl.trig = changed & extensionButtons;
kpad->status.ex_status.cl.release = changed & previousExtensionButtons;
kpad->status.ex_status.cl.release = changed & previousButtons;
}
calc_button_repeat(kpad, device, ringCount);
remainingSamples = available;
@@ -1510,6 +1489,7 @@ void KPADInit(void) {
f32 zero;
f32 degreesToRadians;
f32 one;
f32* matrix;
u32 i;
s32 chan;
BOOL enabled;
@@ -1520,6 +1500,7 @@ void KPADInit(void) {
one = 1.0f;
zero = 0.0f;
degreesToRadians = 0.017453292f;
matrix = initial_rotation_matrix;
kpad = inside_kpads;
do {
kpad->dpdEnable = 1;
@@ -1547,9 +1528,9 @@ void KPADInit(void) {
}
referenceWidth = referenceWidth < referenceHeight ? referenceWidth : referenceHeight;
initial_rotation_matrix[0] = one;
initial_rotation_matrix[1] = zero;
initial_rotation_matrix[2] = zero;
initial_rotation_matrix[3] = zero;
matrix[1] = zero;
matrix[2] = zero;
matrix[3] = zero;
kpad->sensorBarScale = sensorDistance / referenceWidth;
kpad->value9C = zero;
kpad->value94 = zero;
@@ -1568,18 +1549,18 @@ void KPADInit(void) {
kpad->sensorHeightPending = 1;
kpad->sensorBarPosition = 1;
kpad->freeStyleAccelRotation = 0;
initial_rotation_matrix[4] = zero;
matrix[4] = zero;
rotationElement = (f32)cos(degreesToRadians * sensor_bar_angle_degrees);
initial_rotation_matrix[5] = rotationElement;
matrix[5] = rotationElement;
rotationElement = (f32)-sin(degreesToRadians * sensor_bar_angle_degrees);
initial_rotation_matrix[7] = zero;
initial_rotation_matrix[8] = zero;
initial_rotation_matrix[6] = rotationElement;
matrix[7] = zero;
matrix[8] = zero;
matrix[6] = rotationElement;
rotationElement = (f32)sin(degreesToRadians * sensor_bar_angle_degrees);
initial_rotation_matrix[9] = rotationElement;
matrix[9] = rotationElement;
rotationElement = (f32)cos(degreesToRadians * sensor_bar_angle_degrees);
initial_rotation_matrix[10] = rotationElement;
initial_rotation_matrix[11] = zero;
matrix[10] = rotationElement;
matrix[11] = zero;
{
i = 0;
do {

View File

@@ -8,11 +8,13 @@ void CDBCryptBufSysInit(CDBCryptBuf* cryptBuf) {
cryptBuf->allocated = FALSE;
}
CDBErr CDBCryptBufAllocate(CDBCryptBuf** cryptBuf) {
// Some weird crap is going on with these functions.
CDBErr CDBCryptBufAllocate(CDBCryptBuf* cryptBuf) {
CDBErr err = CDB_ERROR_OK;
if (s_cryptBuf->allocated == FALSE) {
*cryptBuf = &s_cryptBuf[err];
cryptBuf->buffer32[0] = (u32)&s_cryptBuf[err];
s_cryptBuf[err].allocated = TRUE;
return CDB_ERROR_OK;
} else {
@@ -21,12 +23,12 @@ CDBErr CDBCryptBufAllocate(CDBCryptBuf** cryptBuf) {
}
}
CDBErr CDBCryptBufFree(CDBCryptBuf** cryptBuf) {
CDBErr CDBCryptBufFree(CDBCryptBuf* cryptBuf) {
CDBErr err = CDB_ERROR_OK;
if (*cryptBuf == s_cryptBuf) {
if ((CDBCryptBuf*)*cryptBuf->buffer32 == s_cryptBuf) {
s_cryptBuf[err].allocated = FALSE;
*cryptBuf = NULL;
*cryptBuf->buffer32 = 0;
return CDB_ERROR_OK;
} else {
CDBReportError("failed to free crypt buffer\n");

View File

@@ -173,7 +173,7 @@ static const u32 AESiDecryptTable[] = {
#define DECRYPT(a,b,c,d) (((ROTATE(AESiDecryptTable[((b)>>16)&255],16) ^ AESiDecryptTable[(d)&255]) ^ ROTATE(AESiDecryptTable[(a)>>24],24)) ^ ROTATE(AESiDecryptTable[((c)>>8)&255],8))
#define SUBSTITUTE(table,a,b,c,d) ((((u32)table[(a)>>24]<<24) | table[(d)&255]) | (((u32)table[((b)>>16)&255]<<16) | ((u32)table[((c)>>8)&255]<<8)))
#define DECRYPT_FINAL(table,a,b,c,d,key) ((table[(d)&255] ^ ((u32)table[((c)>>8)&255]<<8)) ^ (((u32)table[((b)>>16)&255]<<16) ^ ((key) ^ ((u32)table[(a)>>24]<<24))))
#define SUBSTITUTE_XOR(table,a,b,c,d) (((((u32)table[(a)>>24]<<24) ^ table[(d)&255]) ^ ((u32)table[((c)>>8)&255]<<8)) ^ ((u32)table[((b)>>16)&255]<<16))
void AESiEncryptBlock(AESContext* context, u32* output, const u32* input) {
u32 rounds = context->rounds;
@@ -204,15 +204,16 @@ void AESiDecryptBlock(AESContext* context, u32* output, const u32* input) {
u32 round;
for (round=1; round<context->rounds; ++round) {
u32 word;
u32* keys=context->keys + round*4;
for (word=0; word<4; ++word) {
u32 value=context->keys[round*4 + word];
u32 value=keys[word];
u32 twice=DOUBLE_BYTES(value);
u32 four=DOUBLE_BYTES(twice);
u32 eight=DOUBLE_BYTES(four)^value;
u32 mixed=(ROTATE(eight,8) ^ (eight ^ four));
mixed=(ROTATE(mixed,8) ^ (mixed ^ twice));
mixed=(ROTATE(mixed,8) ^ (mixed ^ value));
context->keys[round*4 + word]=mixed;
keys[word]=mixed;
}
}
context->needsTransform=0;
@@ -227,10 +228,10 @@ void AESiDecryptBlock(AESContext* context, u32* output, const u32* input) {
a=nextA^key[0]; b=nextB^key[1]; c=nextC^key[2]; d=nextD^key[3];
key-=4;
}
output[0]=DECRYPT_FINAL(AESiInvSubShiftTable,a,d,c,b,key[0]);
output[1]=DECRYPT_FINAL(AESiInvSubShiftTable,b,a,d,c,key[1]);
output[2]=DECRYPT_FINAL(AESiInvSubShiftTable,c,b,a,d,key[2]);
output[3]=DECRYPT_FINAL(AESiInvSubShiftTable,d,c,b,a,key[3]);
output[0]=SUBSTITUTE_XOR(AESiInvSubShiftTable,a,d,c,b)^key[0];
output[1]=SUBSTITUTE_XOR(AESiInvSubShiftTable,b,a,d,c)^key[1];
output[2]=SUBSTITUTE_XOR(AESiInvSubShiftTable,c,b,a,d)^key[2];
output[3]=SUBSTITUTE_XOR(AESiInvSubShiftTable,d,c,b,a)^key[3];
}
BOOL NETAESCreateEx(AESContext* context, const void* key, u32 keyLength, const void* iv, const AESBlockMode* mode) {

View File

@@ -75,34 +75,25 @@ static inline u32 rotateSum(u32 state, const u32* word, u32 constant, int shift)
return ((state + (constant + left)) << shift) | ((constant + (state + right)) >> (32 - shift));
}
static inline u32 rotateNextSum(u32 state, u32** cursor, u32 constant, int shift) {
const u32* word = *cursor;
u32 right = __lwbrx((void*)word, 0);
u32 left = __lwbrx((void*)word, 0);
++*cursor;
return ((state + (constant + left)) << shift) | ((constant + (state + right)) >> (32 - shift));
}
#define STEP_NEXT(a, b, c, d, f, word, n) ((a) = (b) + rotateNextSum((a) + (f), &(word), *constant, n))
#define STEP(a, b, c, d, f, word, n) ((a) = (b) + rotateSum((a) + (f), word, *constant, 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};
static u32 indices[48] = {0x00000001, 0x00000006, 0x0000000B, 0x00000000, 0x00000005, 0x0000000A, 0x0000000F, 0x00000004, 0x00000009, 0x0000000E, 0x00000003, 0x00000008, 0x0000000D, 0x00000002, 0x00000007, 0x0000000C, 0x00000005, 0x00000008, 0x0000000B, 0x0000000E, 0x00000001, 0x00000004, 0x00000007, 0x0000000A, 0x0000000D, 0x00000000, 0x00000003, 0x00000006, 0x00000009, 0x0000000C, 0x0000000F, 0x00000002, 0x00000000, 0x00000007, 0x0000000E, 0x00000005, 0x0000000C, 0x00000003, 0x0000000A, 0x00000001, 0x00000008, 0x0000000F, 0x00000006, 0x0000000D, 0x00000004, 0x0000000B, 0x00000002, 0x00000009};
u32 a = context->a, b = context->b, c = context->c, d = context->d;
u32* index;
u32* block;
u32* constant;
int round;
u32* word;
u32* constant;
u32* index;
int round;
u32* block;
block = context->buffer32;
word = block;
constant = constants;
for (round = 0; round < 4; ++round) {
STEP_NEXT(a,b,c,d,(b & c) | (~b & d),word,7); ++constant;
STEP_NEXT(d,a,b,c,(a & b) | (~a & c),word,12); ++constant;
STEP_NEXT(c,d,a,b,(d & a) | (~d & b),word,17); ++constant;
STEP_NEXT(b,c,d,a,(c & d) | (~c & a),word,22); ++constant;
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) {

View File

@@ -126,8 +126,8 @@ s32 NHTTPi_intToStr(char* destination, u32 value) {
}
s32 NHTTPi_compareToken(const char* left, const char* right) {
u32 rawLeft;
while (LowerCase((s8)(rawLeft = *(const u8*)left)) == LowerCase((s8)*(const u8*)right)) {
u8 rawLeft;
while (LowerCase((s8)(rawLeft = *(const u8*)left)) == LowerCase(*right)) {
if ((s8)rawLeft == 0 || (s8)rawLeft == ' ') {
return 0;
}
@@ -158,24 +158,23 @@ s32 NHTTPi_strtonum(const char* string, u32 length) {
}
s32 NHTTPi_Base64Encode(char* destination, const char* source) {
const char* table = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
char* output = destination;
s32 length = strlen(source);
s32 consumed = 0;
for (; consumed < length; consumed += 3) {
output[0] = table[source[0] >> 2];
output[1] = table[((source[0] & 3) << 4) + (source[1] >> 4)];
output[2] = table[((source[1] & 15) << 2) + (source[2] >> 6)];
output[3] = table[source[2] & 63];
source += 3;
output += 4;
static char alphabet[]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
const char* table=alphabet;
char* output=destination;
s32 length=strlen(source);
s32 consumed=0;
for(; consumed<length; consumed+=3) {
s8 first = source[0];
s8 second = source[1];
s8 third = source[2];
output[0]=table[first>>2];
output[1]=table[(second>>4)+((first&3)<<4)];
output[2]=table[(third>>6)+((second&15)<<2)];
output[3]=table[third&63];
source+=3; output+=4;
}
if (consumed == length + 1) output[-1] = '=';
else if (consumed == length + 2) {
output[-2] = '=';
output[-1] = '=';
}
*output = 0;
if(consumed==length+1) output[-1]='=';
else if(consumed==length+2) { output[-2]='='; output[-1]='='; }
*output=0;
return strlen(destination);
}

View File

@@ -7,9 +7,8 @@ s32 ConvertDateToDays(u16 year, u8 month, u8 day);
void ConvertDaysToDate(u16* year, u8* month, u8* day, s32 days);
static inline BOOL IsLeapYear(u16 year) {
s32 calendarYear = year;
BOOL leap = FALSE;
if ((calendarYear % 4 == 0 && calendarYear % 100 != 0) || calendarYear % 400 == 0)
if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)
leap = TRUE;
return leap;
}
@@ -153,7 +152,7 @@ NWC24Err NWC24iIsValidDate(u16 year, u8 month, u8 day) {
s32 ConvertDateToDays(u16 year, u8 month, u8 day) {
s32 daysOfYear;
s32 yearOffset;
s32 totalDays;
s32 centuryLeapDays;
s32 commonLeapDays;
BOOL isLeapYear;
@@ -191,10 +190,11 @@ validDate:
}
yearOffset = year - 1900;
centuryLeapDays = (yearOffset + 299) / 400;
daysOfYear += yearOffset * 365;
totalDays = daysOfYear + (yearOffset + 299) / 400;
daysOfYear += centuryLeapDays;
commonLeapDays = (yearOffset - 1) / 4 - (yearOffset - 1) / 100;
return totalDays + commonLeapDays;
return daysOfYear + commonLeapDays;
}
void ConvertDaysToDate(u16* year, u8* month, u8* day, s32 days) {
@@ -231,7 +231,7 @@ void ConvertDaysToDate(u16* year, u8* month, u8* day, s32 days) {
const u8* parsedMonth = month;
previousDays = days;
currentMonth = *parsedMonth;
if (*parsedMonth == 2 && IsLeapYear(*year)) {
if (currentMonth == 2 && IsLeapYear(*year)) {
days -= 29;
} else {
days -= DAYS_OF_MONTH[currentMonth - 1];

View File

@@ -687,10 +687,10 @@ NWC24Err NWC24IterateDlTaskEx(NWC24DlIterateWork* dlIterateWork, NWC24DlId* dlIt
return NWC24_ERR_DONE;
}
static inline NWC24Err SetDlTaskAccessTime(const NWC24DlTask* dlTask, OSTime time) {
static inline NWC24Err SetDlTaskAccessTime(NWC24DlTask* dlTask, OSTime time) {
NWC24Work* work = NWC24WorkP;
DlTaskListHeader* header = work != NULL ? (DlTaskListHeader*)work->dlHead : NULL;
const DlTaskData* task = (const DlTaskData*)dlTask;
DlTaskData* task = (DlTaskData*)dlTask;
NWC24Err result;
u16 taskId;
if (task == NULL) { result = NWC24_ERR_INVALID_VALUE; }
@@ -706,39 +706,19 @@ static inline NWC24Err SetDlTaskAccessTime(const NWC24DlTask* dlTask, OSTime tim
return NWC24_OK;
}
static inline NWC24Err CheckDlTaskForRetry(const DlTaskData* task) {
DlTaskListHeader* header = NWC24WorkP == NULL ? NULL : (DlTaskListHeader*)NWC24WorkP->dlHead;
if (task == NULL) {
return NWC24_ERR_INVALID_VALUE;
}
if (header == NULL) {
return NWC24_ERR_LIB_NOT_OPENED;
}
if (task->id != 0xffff && task->id >= header->maxTaskCount) {
return NWC24_ERR_INVALID_VALUE;
}
static inline NWC24Err CheckDlTaskRetry(NWC24DlTask* dlTask, u8 retryCount) {
DlTaskData* task = (DlTaskData*)dlTask;
NWC24Err result = ValidateDlTask(dlTask, FALSE);
u32 retryMask;
if (result != NWC24_OK) { return result; }
if (task->retryEnabled == 0) { return NWC24_ERR_INVALID_OPERATION; }
retryMask = task->retryMask;
if (retryMask == 0) { return NWC24_ERR_FATAL; }
if (retryCount > 31) { return NWC24_ERR_INVALID_VALUE; }
if ((retryMask & (1 << retryCount)) == 0) { return NWC24_ERR_DISABLED; }
return NWC24_OK;
}
static inline NWC24Err CheckDlTaskRetry(const NWC24DlTask* dlTask, u8 retryCount) {
const DlTaskData* task = (const DlTaskData*)dlTask;
NWC24Err result;
result = CheckDlTaskForRetry(task);
if (result != NWC24_OK) {
return result;
}
if (task->retryEnabled == 0) {
return NWC24_ERR_INVALID_OPERATION;
}
if (task->retryMask == 0) {
return NWC24_ERR_FATAL;
}
if (retryCount > 31) {
return NWC24_ERR_INVALID_VALUE;
}
return ((1U << retryCount) & task->retryMask) == 0 ? NWC24_ERR_DISABLED : NWC24_OK;
}
static inline NWC24Err UpdateDlTaskAccessTime(const NWC24DlTask* dlTask) {
static inline NWC24Err UpdateDlTaskAccessTime(NWC24DlTask* dlTask) {
OSTime universalTime;
NWC24Err result = NWC24iGetUniversalTime(&universalTime);
if (result >= NWC24_OK) {
@@ -748,61 +728,24 @@ static inline NWC24Err UpdateDlTaskAccessTime(const NWC24DlTask* dlTask) {
return result;
}
static inline BOOL IsDlTaskWritableGroup(u32 groupId, u32 flags) {
BOOL allowed = FALSE;
if (flags & 0x40) {
if (groupId == NWC24GetGroupId()) {
allowed = TRUE;
}
}
return allowed;
}
static inline NWC24Err ValidateWritableDlTask(const NWC24DlTask* dlTask) {
const DlTaskData* task = (const DlTaskData*)dlTask;
DlTaskListHeader* header = GetCachedDlHeader();
if (task == NULL) {
return NWC24_ERR_INVALID_VALUE;
}
if (header == NULL) {
return NWC24_ERR_LIB_NOT_OPENED;
}
if (!NWC24IsMsgLibOpenedByTool() && !IsDlTaskOwner(task->appId)) {
BOOL allowed = IsDlTaskWritableGroup(task->groupId, task->flags);
if (!allowed) {
return NWC24_ERR_PROTECTED;
}
}
if (task->id != 0xffff && task->id >= header->maxTaskCount) {
return NWC24_ERR_INVALID_VALUE;
}
return NWC24_OK;
}
static inline NWC24Err ClearDlTaskError(NWC24DlTask* dlTask) {
DlTaskData* task = (DlTaskData*)dlTask;
NWC24Err result;
result = ValidateWritableDlTask(dlTask);
if (result != NWC24_OK) {
return result;
}
task->unknown_0x20 = 0;
task->unknown_0x1a = 0;
return NWC24_OK;
}
NWC24Err NWC24UpdateDlTask(NWC24DlTask* dlTask) {
DlTaskData* task = (DlTaskData*)dlTask;
DlTaskListHeader* header;
u16 taskId;
OSTime universalTime;
NWC24Err result;
result = ValidateWritableDlTask(dlTask);
result = ValidateDlTask(dlTask, TRUE);
if (result != NWC24_OK) { return result; }
taskId = task->id;
if (taskId == 0xffff || taskId >= GetCachedDlHeader()->maxTaskCount) { return NWC24_ERR_INVALID_VALUE; }
result = UpdateDlTaskAccessTime(dlTask);
if (result < NWC24_OK) { return result; }
ClearDlTaskError(dlTask);
result = ValidateDlTask(dlTask, TRUE);
if (result == NWC24_OK) {
task->unknown_0x20 = 0;
task->unknown_0x1a = 0;
}
if (task->retryEnabled == 1) {
while ((result = CheckDlTaskRetry(dlTask, task->retryCount)) == NWC24_ERR_DISABLED) {
task->retryCount = (task->retryCount + 1) & 0x1f;
@@ -1101,7 +1044,6 @@ closeList:
NWC24Err NWC24iCheckDlHeaderConsistency(DlTaskListHeader* header, BOOL repair) {
NWC24DlTask task;
NWC24DlTask* taskPointer = &task;
NWC24DlTask* readTask = &task;
NWC24DlId taskId;
NWC24Err result;
DlTaskListHeader* currentHeader;
@@ -1118,7 +1060,7 @@ NWC24Err NWC24iCheckDlHeaderConsistency(DlTaskListHeader* header, BOOL repair) {
if (currentHeader->entries[taskId].appId == 0) { result = NWC24_ERR_NOT_FOUND; }
}
if (result != NWC24_OK || !shouldRepair) { continue; }
result = ReadDlTaskInline(readTask, taskId);
result = ReadDlTaskInline(taskPointer, taskId);
if (result < NWC24_OK) {
if (ValidateDlTask(taskPointer, FALSE) == NWC24_OK) {
result = DeleteDlTask(taskPointer);
@@ -1285,44 +1227,32 @@ NWC24Err StoreDlTask(NWC24DlTask* dlTask) {
return closeResult;
}
static inline NWC24Err CheckDlUrl(const DlTaskData* task) {
const char* url = task->url;
static inline NWC24Err ValidateDlTaskUrl(NWC24DlTask* dlTask) {
DlTaskData* task = (DlTaskData*)dlTask;
DlTaskListHeader* header = GetCachedDlHeader();
NWC24Err result;
result = NWC24iCheckStringLength(url, 7, 0x100);
if (result < NWC24_OK) {
return result;
if (task->id >= header->maxTaskCount && task->id != 0xffff) { return NWC24_ERR_INVALID_VALUE; }
{
const char* url = task->url;
result = NWC24iCheckStringLength(url, 7, 0x100);
if (result >= NWC24_OK) {
if (strncmp(url, "http://", 7) != 0 && strncmp(url, "https://", 8) != 0) { result = NWC24_ERR_FORMAT; }
else { result = NWC24_OK; }
}
if (result < NWC24_OK) { return result; }
return NWC24_OK;
}
if (strncmp(url, "http://", 7) != 0 && strncmp(url, "https://", 8) != 0) {
return NWC24_ERR_FORMAT;
}
return NWC24_OK;
}
static inline DlTaskEntry* GetDlTaskEntryHeader(u16 taskId) {
return &GetCachedDlHeader()->entries[taskId];
}
static inline NWC24Err ValidateDlTaskUrl(const NWC24DlTask* dlTask) {
const DlTaskData* task = (const DlTaskData*)dlTask;
NWC24Err result;
if (task->id >= GetCachedDlHeader()->maxTaskCount && task->id != 0xffff) {
return NWC24_ERR_INVALID_VALUE;
}
result = CheckDlUrl(task);
if (result < NWC24_OK) {
return result;
}
return NWC24_OK;
}
static inline NWC24Err FindFreeDlTask(NWC24DlTask* dlTask, u32 taskCount, u32 maxTaskCount) {
static inline NWC24Err FindFreeDlTask(NWC24DlTask* dlTask, u16 taskCount, u16 maxTaskCount) {
DlTaskListHeader* header = GetCachedDlHeader();
NWC24DlId taskId;
if (dlTask == NULL || taskCount > maxTaskCount || taskCount >= header->maxTaskCount || maxTaskCount > header->maxTaskCount) {
return NWC24_ERR_INVALID_VALUE;
}
for (taskId = taskCount; taskId < maxTaskCount; taskId++) {
if (GetDlTaskEntryHeader(taskId)->appId == 0) {
header = GetCachedDlHeader();
if (header->entries[taskId].appId == 0) {
((DlTaskData*)dlTask)->id = taskId;
return NWC24_OK;
}
@@ -1330,10 +1260,24 @@ static inline NWC24Err FindFreeDlTask(NWC24DlTask* dlTask, u32 taskCount, u32 ma
return NWC24_ERR_FULL;
}
static inline NWC24Err RetryAndStoreDlTask(NWC24DlTask* dlTask) {
static inline NWC24Err UpdateDlTaskInline(NWC24DlTask* dlTask) {
DlTaskData* task = (DlTaskData*)dlTask;
DlTaskListHeader* header;
u16 taskId;
OSTime universalTime;
NWC24Err result;
result = ValidateDlTask(dlTask, TRUE);
if (result != NWC24_OK) { return result; }
taskId = task->id;
if (taskId == 0xffff || taskId >= GetCachedDlHeader()->maxTaskCount) { return NWC24_ERR_INVALID_VALUE; }
result = UpdateDlTaskAccessTime(dlTask);
if (result < NWC24_OK) { return result; }
result = ValidateDlTask(dlTask, TRUE);
if (result == NWC24_OK) {
task->unknown_0x20 = 0;
task->unknown_0x1a = 0;
}
if (task->retryEnabled == 1) {
while ((result = CheckDlTaskRetry(dlTask, task->retryCount)) == NWC24_ERR_DISABLED) {
task->retryCount = (task->retryCount + 1) & 0x1f;
@@ -1342,19 +1286,6 @@ static inline NWC24Err RetryAndStoreDlTask(NWC24DlTask* dlTask) {
}
return StoreDlTask(dlTask);
}
static inline NWC24Err UpdateDlTaskInline(NWC24DlTask* dlTask) {
DlTaskData* task = (DlTaskData*)dlTask;
NWC24Err result;
result = ValidateWritableDlTask(dlTask);
if (result != NWC24_OK) { return result; }
if (task->id == 0xffff || task->id >= GetCachedDlHeader()->maxTaskCount) { return NWC24_ERR_INVALID_VALUE; }
result = UpdateDlTaskAccessTime(dlTask);
if (result < NWC24_OK) { return result; }
ClearDlTaskError(dlTask);
return RetryAndStoreDlTask(dlTask);
}
NWC24Err AddTaskInternal(NWC24DlTask* dlTask, u16 taskCount, u16 maxTaskCount) {
DlTaskData* task = (DlTaskData*)dlTask;
NWC24Err result;

View File

@@ -73,28 +73,22 @@ NWC24Err NWC24ReadMsgSubjectPublic(const NWC24MsgObj* msg, u16* subject, u32* su
truncated = TRUE;
}
result = NWC24ReadMsgSubject(msg, (char*)work, subjectDataSize);
switch (result) {
case NWC24_OK:
break;
default:
if (result == NWC24_ERR_OVERFLOW) {
truncated = TRUE;
break;
}
return result;
if (result != NWC24_OK) {
if (result == NWC24_ERR_OVERFLOW) {
truncated = TRUE;
} else {
goto done;
}
}
charsetBuffer = NWC24WorkP->stringWork;
result =
NWC24DecodeMIMEHeaderFieldBody((u8*)charsetBuffer, 0x40, decodedData, decodedCapacity, &decodedSize, work, subjectDataSize);
switch (result) {
case NWC24_OK:
break;
default:
if (result == NWC24_ERR_OVERFLOW) {
truncated = TRUE;
break;
}
return result;
if (result != NWC24_OK) {
if (result == NWC24_ERR_OVERFLOW) {
truncated = TRUE;
} else {
goto done;
}
}
*subjectSize = originalSize;
result =
@@ -146,15 +140,11 @@ NWC24Err NWC24ReadMsgTextPublic(const NWC24MsgObj* msg, u16* text, u32* textSize
}
charsetBuffer = NWC24WorkP->stringWork + 0x20;
result = NWC24ReadMsgTextEx(msg, (char*)work, textDataSize, charsetBuffer, 0x40);
switch (result) {
case NWC24_OK:
break;
default:
if (result == NWC24_ERR_OVERFLOW) {
truncated = TRUE;
break;
}
return result;
if (result != NWC24_OK) {
if (result != NWC24_ERR_OVERFLOW) {
goto done;
}
truncated = TRUE;
}
*textSize = originalSize;
@@ -243,12 +233,11 @@ NWC24Err NWC24SetMsgSubjectAndTextPublic(NWC24MsgObj* msg, const u16* subject, u
NWC24MsgObjPrivate* privateMsg = (NWC24MsgObjPrivate*)msg;
NWC24Work* nwcWork;
u32 textSourceSize;
u32 textCapacity;
u32 textWorkSize;
BOOL is7Bit;
NWC24Charset charset;
u8* subjectWork;
u32 subjectWorkSize;
u8* subjectWork;
NWC24Err result;
if (((privateMsg->type & 0x100) == 0) || ((privateMsg->type & 0x200) != 0)) {
@@ -284,8 +273,7 @@ NWC24Err NWC24SetMsgSubjectAndTextPublic(NWC24MsgObj* msg, const u16* subject, u
if (NWC24ParseCharsetStr(&charset, nwcWork->stringWork) != NWC24_OK) {
charset = 0;
}
textCapacity = (workSize * textSize) / (textSize + subjectSize * 4);
textWorkSize = textCapacity;
textWorkSize = (workSize * textSize) / (textSize + subjectSize * 4);
subjectWorkSize = workSize - textWorkSize;
subjectWork = work + textWorkSize;
textSourceSize = textSize;

View File

@@ -488,7 +488,7 @@ BOOL BS2StartLoadingTitle(ESTitleId titleId, ESTicketView *pTicketView) {
return FALSE;
}
static void callback(u32 result) { LowReadResult = result; }
void callback(s32 result) { LowReadResult = result; }
ESError BS2ESGetTicketViews(IOSFd *descriptor, ESTitleId titleId, ESTicketView *views, u32 *count) {
struct {
@@ -725,7 +725,7 @@ void BS2StartGame() {
BS2Report("DVDLowInit done\n");
LowReadResult = 0;
DVDLowReadDiskID(&DiskID, callback);
DVDLowReadDiskID(&DiskID, (DVDLowCallback)callback);
while (LowReadResult == 0) {
}
@@ -739,7 +739,7 @@ void BS2StartGame() {
} else {
OSReport("\nDisk error(%d) has occurred", LowReadResult);
LowReadResult = 0;
DVDLowRequestError(callback);
DVDLowRequestError((DVDLowCallback)callback);
while (LowReadResult == 0) {
}
driveError = DVDLowGetImmBufferReg() & 0xFF000000;
@@ -769,10 +769,10 @@ disk_done:
if (PartitionParams.numTmdBytes != 0) {
DVDLowOpenPartitionWithTmdAndTicketView((u32)((DVDPartitionInfo *)GamePartition)->partition, &PartitionParams.ticketView,
PartitionParams.numTmdBytes, &PartitionParams.tmd, PartitionParams.numCertBytes,
PartitionParams.certificates, callback);
PartitionParams.certificates, (DVDLowCallback)callback);
} else {
DVDLowOpenPartition((u32)((DVDPartitionInfo *)GamePartition)->partition, NULL, 0, NULL, &PartitionParams.tmd,
callback);
(DVDLowCallback)callback);
}
while (LowReadResult == 0) {
}
@@ -790,7 +790,7 @@ disk_done:
} else {
OSReport("\nDisk error(%d) has occurred", LowReadResult);
LowReadResult = 0;
DVDLowRequestError(callback);
DVDLowRequestError((DVDLowCallback)callback);
while (LowReadResult == 0) {
}
driveError = DVDLowGetImmBufferReg() & 0xFF000000;
@@ -1357,10 +1357,9 @@ BS2State BS2Tick() {
(*(u32 *)0x800030d4) = 0;
DvdTransferred = 0;
DvdTransferLength = 0;
status = BS2NoDisk;
AudioBufferUnconfigured = 1;
CoverBlock.state = 0;
if (status != 0)
if (BS2NoDisk != 0)
State = BS2_STT_NO_DISK;
else if (BS2DriveReset != 0)
State = BS2_STT_2;

View File

@@ -77,8 +77,7 @@ void BS2UpdateInit(void* allocator) {
OSResumeThread(&Thread);
}
static inline u32 BS2SelectUpdateEntries(void) {
static void* UpdateThread(void* argument) {
BOOL missingFile;
u32 selectedCount;
u32 requiredBytes;
@@ -90,6 +89,7 @@ static inline u32 BS2SelectUpdateEntries(void) {
u32 selectedSeatCount;
BOOL regionValid;
u32 titleRegion;
s32 importResult;
struct {
u32 freeChannels;
u32 freeBlocks;
@@ -102,6 +102,9 @@ static inline u32 BS2SelectUpdateEntries(void) {
DVDFileInfo file;
} scratch;
BS2Report("Start update thread\n");
StartUpdate = 0;
CancelUpdate = 0;
missingFile = FALSE;
selectedCount = 0;
requiredBytes = 0;
@@ -159,12 +162,12 @@ product_region_checked:
if (!regionValid) {
BS2Report("Error: failed to check product region.");
selectedCount = 0;
goto selection_complete;
goto selection_done;
}
if (!SCGetProductAreaString(scratch.productArea, sizeof(scratch.productArea))) {
BS2Report("Error: failed to get product information.");
selectedCount = 0;
goto selection_complete;
goto selection_done;
}
strcpy(scratch.updatePath, "__update.inf");
strcat(scratch.updatePath, ".");
@@ -180,46 +183,46 @@ product_region_checked:
if (DVDConvertPathToEntrynum(scratch.updatePath) < 0) {
BS2Report("Error: update information file is not found.");
selectedCount = 0;
goto selection_complete;
goto selection_done;
}
break;
default:
BS2Report("Error: update information file is not found.");
selectedCount = 0;
goto selection_complete;
goto selection_done;
}
}
BS2Report("%s is found.\n", scratch.updatePath);
if (!DVDOpen(scratch.updatePath, &scratch.file)) {
BS2Report("Error: failed to open update information file.");
selectedCount = 0;
goto selection_complete;
goto selection_done;
}
if (DVDReadPrio(&scratch.file, &UpdateHeader0, sizeof(UpdateHeader0), 0, 2) < 0) {
BS2Report("Error: failed to read update information header.");
selectedCount = 0;
goto selection_complete;
goto selection_done;
}
if (UpdateHeader0.wadCount == 0) {
BS2Report("Error: no entry.");
selectedCount = 0;
goto selection_complete;
goto selection_done;
}
if (UpdateHeader0.wadCount > 32) {
BS2Report("Error: found too many entries.");
selectedCount = 0;
goto selection_complete;
goto selection_done;
}
UpdateHeader0.wadCount += UpdateHeader0.extraCount;
if (UpdateHeader0.wadCount > BS2_UPDATE_ENTRY_COUNT) {
BS2Report("Error: found too many extra entries.");
selectedCount = 0;
goto selection_complete;
goto selection_done;
}
if (DVDReadPrio(&scratch.file, UPDATE_DISC_ENTRIES, UpdateHeader0.wadCount * sizeof(BS2UpdateEntry), 32, 2) < 0) {
BS2Report("Error: failed to read update information.");
selectedCount = 0;
goto selection_complete;
goto selection_done;
}
{
BS2UpdateEntry *discEntries = UPDATE_DISC_ENTRIES;
@@ -242,7 +245,7 @@ product_region_checked:
BS2Report("Cannot get physical MEM2 size\n");
State = 5;
selectedCount = 0;
goto selection_complete;
goto selection_done;
}
if (DVDOpen(discEntries[index].path, &scratch.file) < 0) {
BS2Report("%s is not found\n", discEntries[index].path);
@@ -302,10 +305,8 @@ product_region_checked:
BS2Report("Error: found too many extra entries.");
goto seats_done;
}
seatEntries = UPDATE_DISC_ENTRIES;
seatEntries += UpdateHeader0.wadCount;
selectedSeats = EntriesToImport;
selectedSeats += selectedCount;
seatEntries = &UPDATE_DISC_ENTRIES[UpdateHeader0.wadCount];
selectedSeats = &EntriesToImport[selectedCount];
if (DVDReadPrio(&scratch.file, seatEntries, UpdateHeader1.wadCount * sizeof(BS2UpdateEntry), 32, 2) < 0) {
BS2Report("Error: failed to read update information.");
goto seats_done;
@@ -407,7 +408,7 @@ seats_done:
if (missingFile) {
State = 5;
selectedCount = 0;
goto selection_complete;
goto selection_done;
}
pEntries = EntriesToImport;
pFlags = Flags1;
@@ -423,17 +424,8 @@ seats_done:
}
}
}
selection_complete:
return selectedCount;
}
static void* UpdateThread(void* argument) {
u32 index;
s32 importResult;
BS2Report("Start update thread\n");
StartUpdate = 0;
CancelUpdate = 0;
EntriesCount = BS2SelectUpdateEntries();
selection_done:
EntriesCount = selectedCount;
if (EntriesCount == 0) {
State = 5;
StartUpdate = 0;
@@ -457,7 +449,7 @@ static void* UpdateThread(void* argument) {
UpdateProgress++;
continue;
}
if (((const BS2UpdateEntry *)discEntries)[UpdateProgress].type == 1) {
if (discEntries[UpdateProgress].type == 1) {
BS2Report("BS2WADImportDVD : ");
index = UpdateProgress;
if (strcmp(getSuffix(discEntries[index].path), "wad") == 0) {
@@ -510,8 +502,8 @@ static void* UpdateThread(void* argument) {
} else {
State = 3;
}
CurrentEntry = NULL;
UpdateProgress++;
CurrentEntry = NULL;
break;
}
} else if (CancelUpdate != 0) {

View File

@@ -19,10 +19,10 @@
typedef struct {
u64 work[0xD0 / sizeof(u64)];
} NETHMACContext;
extern const void* NETGetSHA1Interface(void);
extern void NETHMACInit(NETHMACContext* ctx, const void* interface, const void* key, u32 keyLen);
extern void NETHMACUpdate(NETHMACContext* ctx, const void* data, u32 len);
extern void NETHMACGetDigest(NETHMACContext* ctx, void* digest);
static const void* NETGetSHA1Interface(void);
static void NETHMACInit(NETHMACContext* ctx, const void* interface, const void* key, u32 keyLen);
static void NETHMACUpdate(NETHMACContext* ctx, const void* data, u32 len);
static void NETHMACGetDigest(NETHMACContext* ctx, void* digest);
extern char VmReportFormat[];
#define CHANSVmDebugLength 1024
@@ -54,6 +54,7 @@ const u64 VmMinusInf = 0xFFF0000000000000ULL;
#define VM_READ_BE_U16(b, o) ((u16)((b)[(o)] << 8 | (b)[(o) + 1]))
#define VM_READ_BE_U24(b, o) ((u32)((b)[(o)] << 16 | (b)[(o) + 1] << 8 | (b)[(o) + 2]))
#define VM_MAKE_U64(hi, lo) ((u64)(u32)(hi) << 32 | (u64)(lo))
#define VM_S64_FROM_U64(v) ((s64)(u32)((v) >> 32) << 32 | (u64)(u32)(v))
void CHANSVmDebugPrintf(const vmString format, ...) {
va_list args;
@@ -1413,7 +1414,7 @@ CHANSVmErr VmCmpGeq(CHANSVm* vm, CHANSVmObjType type, CHANSVmObjHdr* ret, CHANSV
return VmCmpLeq(vm, type, ret, right, left);
}
CHANSVmErr CHANSVmGetBoolean(vmBoolInt* ret, CHANSVmObjHdr* val) {
CHANSVmErr CHANSVmGetBoolean(CHANSVmObjHdr* ret, CHANSVmObjHdr* val) {
vmBoolInt result;
switch (val->type) {
case CHANS_VM_OBJ_TYPE_BLANK: {
@@ -1447,7 +1448,7 @@ CHANSVmErr CHANSVmGetBoolean(vmBoolInt* ret, CHANSVmObjHdr* val) {
}
}
if (ret != vmNull) {
*ret = result;
ret->value.bool_v = result;
}
return CHANS_VM_OK;
}
@@ -3069,22 +3070,20 @@ VmMethodDefine(String, Search) {
return VmStringObjectIndex(VmInst, VmParentObj, VmReturnObj, 1, 1);
}
static inline vmBoolInt VmReplaceStringContents(CHANSVm *VmInst, const CHANSVmObjHdr *VmParentObj, CHANSVmObjHdr *VmReturnObj) {
VmMethodDefine(String, Replace) {
CHANSVmObjHdr* arg0;
vmString replaceStr;
vmString searchStr;
vmString parentStr;
vmString newStr;
u32 dstBufLen;
u32 replaceLen;
u32 dstOffs;
CHANSVmObjHdr* arg1;
u32 searchLen;
u32 srcOffs;
vmString parentStr;
vmString searchStr;
vmString replaceStr;
u32 parentLen;
u32 srcOffs;
u32 dstOffs;
u32 searchLen;
u32 replaceLen;
u32 dstBufLen;
vmString newStr;
u32 segLen;
const vmStringObjVal *parentValue;
const vmStringObjVal *searchValue;
if (((CHANSVmPrivate*)VmInst)->pActiveCtx->argc < 2) {
goto return_input;
@@ -3099,12 +3098,10 @@ static inline vmBoolInt VmReplaceStringContents(CHANSVm *VmInst, const CHANSVmOb
goto return_input;
}
parentValue = VmParentObj->value.string_v;
searchValue = arg0->value.string_v;
parentLen = parentValue->len;
searchLen = searchValue->len;
parentStr = parentValue->spData;
searchStr = searchValue->spData;
parentLen = VmParentObj->value.string_v->len;
searchLen = arg0->value.string_v->len;
parentStr = VmParentObj->value.string_v->spData;
searchStr = arg0->value.string_v->spData;
replaceStr = arg1->value.string_v->spData;
replaceLen = arg1->value.string_v->len;
@@ -3172,16 +3169,12 @@ static inline vmBoolInt VmReplaceStringContents(CHANSVm *VmInst, const CHANSVmOb
return VmReturnObj->value.string_v->len == dstOffs ? vmTrue : vmFalse;
return_input:
return VmStringObjectDup(VmInst, VmReturnObj, (CHANSVmObjHdr *)VmParentObj) ? vmTrue : vmFalse;
return VmStringObjectDup(VmInst, VmReturnObj, VmParentObj) ? vmTrue : vmFalse;
error:
return 0;
}
VmMethodDefine(String, Replace) {
return VmReplaceStringContents(VmInst, VmParentObj, VmReturnObj);
}
VmMethodDefine(String, Splice) {
CHANSVmObjHdr* arg0;
CHANSVmObjHdr* arg1;
@@ -5140,7 +5133,7 @@ static vmBoolInt VmBlobPackCommon(CHANSVm* VmInst, CHANSVmObjHdr* VmParentObj, C
goto error;
}
argCount++;
totalSize += (s32)((u32)count + 1U) / 2;
totalSize += (count + 1) / 2;
break;
}
}
@@ -5430,7 +5423,7 @@ static vmBoolInt VmBlobPackCommon(CHANSVm* VmInst, CHANSVmObjHdr* VmParentObj, C
goto error;
}
bufSize = (s32)((u32)count + 1U) / 2;
bufSize = (count + 1) / 2;
if (!CHANSVmBlobHasSpace(parentBlob, bufSize)) {
goto error;
}
@@ -6936,7 +6929,7 @@ static u8* VmGetOperand(CHANSVm* vm, u32 num, u32 offset) {
}
static CHANSVmErr VmLoadImmInteger(CHANSVm* vm, CHANSVmObjHdr* obj, u8* buf, s32 count) {
u64 acc = 0;
s64 acc = 0;
u8* p = buf;
while (count != 0) {
@@ -6946,7 +6939,7 @@ static CHANSVmErr VmLoadImmInteger(CHANSVm* vm, CHANSVmObjHdr* obj, u8* buf, s32
count--;
}
return CHANSVmSetInteger(vm, obj, (vmInteger)acc);
return CHANSVmSetInteger(vm, obj, acc);
}
CHANSVmErr VmStore(CHANSVm* vm, CHANSVmObjHdr* dest, CHANSVmObjHdr* src) {
@@ -7241,7 +7234,7 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
CHANSVmErr result;
u32 newPos;
u32 isTypeMatch;
vmBoolInt shouldBranch;
u32 shouldBranch;
if (pVm->bSignalUpdated != vmFalse && pVm->bSignalBlocked == vmFalse) {
pVm->bSignalUpdated = vmFalse;
@@ -7630,8 +7623,8 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
case CHANS_VM_OP_LOG_NOT: {
CHANSVmObjHdr* pAcc = &pVm->accumulator;
vmBoolInt bResult;
CHANSVmErr booleanResult = CHANSVmGetBoolean(&bResult, pAcc);
u32 bResult;
CHANSVmErr booleanResult = CHANSVmGetBoolean((CHANSVmObjHdr*)&bResult, pAcc);
if (booleanResult == CHANS_VM_OK) {
s32 boolVal = bResult ? 0 : 1;
booleanResult = CHANSVmSetInteger(vm, pAcc, boolVal);
@@ -7788,7 +7781,8 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
cmpHigh = 0;
cmpLow = -2;
cmpVal = VM_MAKE_U64(cmpHigh, cmpLow);
if (tmp64 <= cmpVal) {
fullVal = VM_S64_FROM_U64(tmp64);
if ((u64)fullVal <= cmpVal) {
arrayIdx = (u32)tmp64;
goto set_index_ok;
}
@@ -8071,14 +8065,14 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
break;
}
case CHANS_VM_OP_BRANCH_FALSE: {
result = CHANSVmGetBoolean(&shouldBranch, &pVm->accumulator);
result = CHANSVmGetBoolean((CHANSVmObjHdr*)&shouldBranch, &pVm->accumulator);
if (result == CHANS_VM_OK) {
shouldBranch = !shouldBranch;
}
break;
}
case CHANS_VM_OP_BRANCH_TRUE: {
result = CHANSVmGetBoolean(&shouldBranch, &pVm->accumulator);
result = CHANSVmGetBoolean((CHANSVmObjHdr*)&shouldBranch, &pVm->accumulator);
break;
}
case CHANS_VM_OP_BRANCH_ALWAYS: {

View File

@@ -404,9 +404,7 @@ namespace textinput {
void LayoutByNW4R::createAnmPane_(MEMAllocator* allocator) {
CandidateTextAnmPane* pane;
u16 j;
u16 i;
for (i = 0; i < ARRAY_LENGTH(scCandidatePaneData.panes); i++) {
for (u16 i = 0; i < ARRAY_LENGTH(scCandidatePaneData.panes); i++) {
pane = NULL;
const PaneToAnimation& p = scCandidatePaneData.panes[i];
switch (p.type) {
@@ -435,18 +433,16 @@ namespace textinput {
nw4r::ut::List_Append(&mAnmPanes, pane);
const char* forceAddName = p.forceAddName;
u32 animationCount = p.count;
for (j = 0; j < animationCount; j++) {
const AnimationFile* const& animation = p.pAnims[j];
void* pResource = mpMultiArcResourceAccessor->GetResource(0, animation->fileName);
for (u16 j = 0; j < p.count; j++) {
const AnimationFile* animation = p.pAnims[j];
void* pResource = mpMultiArcResourceAccessor->GetResource(0, p.pAnims[j]->fileName);
AnimTransformPane* transform =
static_cast<AnimTransformPane*>(getLayout()->CreateAnimTransform(pResource, mpMultiArcResourceAccessor));
if (forceAddName == NULL) {
if (p.forceAddName == NULL) {
pane->addAnimation(allocator, animation->id, transform, false, true);
} else {
pane->forceAddAnimation(allocator, animation->id, transform, forceAddName, false, true);
pane->forceAddAnimation(allocator, animation->id, transform, p.forceAddName, false, true);
}
}
}
@@ -1086,7 +1082,7 @@ namespace textinput {
nw4r::lyt::TextBox* textPane = mpTextBoxPane[i]->getTextPane();
nw4r::lyt::Bounding* boundPane = mpBoundingPane[i]->getBoundPane();
nw4r::lyt::Size sz1 = textPane->GetSize();
textPane->SetString(scEmptyWChars);
textPane->SetString(L"");
textPane->SetVisible(false);
boundPane->SetSize(nw4r::lyt::Size(0.0f, sz1.height));
}
@@ -1687,9 +1683,9 @@ namespace textinput {
void UIOnOffButton::Create(nw4rmanager::Layout* layout) {
gui::PaneManager* mgr = layout->getPaneManager();
mpOnPictPane = mgr->searchPaneComponent(scP_OnBtn);
mpOnBoundPane = mgr->searchPaneComponent(scB_OnBtn);
mpOnAnmPane = static_cast<OnOffAnmPane*>(layout->searchAnmPane(scP_OnBtn));
mpOnPictPane = mgr->searchPaneComponent("P_OnBtn");
mpOnBoundPane = mgr->searchPaneComponent("B_OnBtn");
mpOnAnmPane = static_cast<OnOffAnmPane*>(layout->searchAnmPane("P_OnBtn"));
mpOffPictPane = mgr->searchPaneComponent(scCandidatePaneData.tail);
mpOffBoundPane = mgr->searchPaneComponent(scPaneNameTable);
mpOffAnmPane = static_cast<OnOffAnmPane*>(layout->searchAnmPane(scCandidatePaneData.tail));

View File

@@ -651,24 +651,6 @@ namespace textinput {
setLanguage(getLanguage());
}
static inline void initializeTogglePane(nw4rmanager::Layout& layout, void* const& inputModeTable,
int inputMode, const char* paneName) {
char textPaneName[17];
memset(textPaneName, 0, sizeof(textPaneName));
strncpy(textPaneName, paneName, strlen(paneName));
textPaneName[0] = 'T';
nw4r::lyt::TextBox* textPane = static_cast<nw4r::lyt::TextBox*>(layout.getPane(textPaneName));
nw4r::lyt::Pane* buttonPane = layout.getPane(paneName);
const KeySet* keySet = static_cast<const LanguageDependencyData*>(inputModeTable)->keySets[inputMode];
if (keySet == NULL) {
buttonPane->SetVisible(false);
} else {
buttonPane->SetVisible(true);
textPane->SetString(static_cast<const LanguageDependencyData*>(inputModeTable)->keySets[inputMode]->szKeySetName, 0);
}
}
void LayoutByNW4R::init() {
Base::init();
@@ -688,7 +670,21 @@ namespace textinput {
setVisible("W_ChngTag_03", true);
for (int i = 0; i < 4; ++i) {
initializeTogglePane(*this, mpInputModeTable, i, csPaneNameToggleAnimationKey[i].name);
const char* paneName = csPaneNameToggleAnimationKey[i].name;
char textPaneName[17];
memset(textPaneName, 0, sizeof(textPaneName));
strncpy(textPaneName, paneName, strlen(paneName));
textPaneName[0] = 'T';
nw4r::lyt::TextBox* textPane = static_cast<nw4r::lyt::TextBox*>(getPane(textPaneName));
nw4r::lyt::Pane* buttonPane = getPane(paneName);
const KeySet* keySet = static_cast<const LanguageDependencyData*>(mpInputModeTable)->keySets[i];
if (keySet == NULL) {
buttonPane->SetVisible(false);
} else {
buttonPane->SetVisible(true);
textPane->SetString(static_cast<const LanguageDependencyData*>(mpInputModeTable)->keySets[i]->szKeySetName, 0);
}
}
if (getLanguage() == JP) {

View File

@@ -1169,7 +1169,7 @@ void LayoutByNW4R::create(MEMAllocator* allocator, EditBuffer* editBuffer) {
setVisible("N_2line", true);
mpPaneManager->setAllComponentTriggerTarget(false);
mpPaneManager->setAllBoundingBoxComponentTriggerTarget(true);
nw4r::lyt::Pane* pane = mpLayout->GetRootPane()->FindPaneByName(static_cast<const LanguagePaneData*>(mpLanguageData)->textBox, true);
nw4r::lyt::Pane* pane = getPane(static_cast<const LanguagePaneData*>(mpLanguageData)->textBox);
if (!pane) pane = mpLayout->GetRootPane()->FindPaneByName(getLanguageTextPane() ? static_cast<const LanguagePaneData*>(mpLanguageData)->textBox : "T_2l_TextBox", true);
mpPaneManager->getPaneComponentByPane(pane)->setTriggerTarget(true);
for (u32 buttonIndex = 0; buttonIndex < 2; ++buttonIndex) {
@@ -1187,7 +1187,7 @@ void LayoutByNW4R::create(MEMAllocator* allocator, EditBuffer* editBuffer) {
const char* bindingName = button.bindingName;
count = button.count;
for (u16 animationIndex = 0; animationIndex < count; ++animationIndex) {
const InputFormAnimationFile* const& file = button.files[animationIndex];
const InputFormAnimationFile* file = button.files[animationIndex];
void* resource = mpMultiArcResourceAccessor->GetResource(0, file->fileName, NULL);
AnimTransformPane* transform = static_cast<AnimTransformPane*>(getLayout()->CreateAnimTransform(resource, mpMultiArcResourceAccessor));
if (!bindingName) animationPane->addAnimation(allocator, file->id, transform, false, true);
@@ -1254,13 +1254,6 @@ void LayoutByNW4R::calc() {
}
}
}
static inline const char* selectInputTextName(const nw4rmanager::Layout& layout, const void* const& languageData) {
if (layout.getPane(static_cast<const LanguagePaneData*>(languageData)->textBox)) {
return static_cast<const LanguagePaneData*>(languageData)->textBox;
}
return "T_2l_TextBox";
}
void LayoutByNW4R::setLanguage(Language language) {
Base::setLanguage(language);
if (language == CN) mpLanguageData = &csLanguageDependencyDataCHN__Q29textinput9inputform;
@@ -1271,12 +1264,12 @@ void LayoutByNW4R::setLanguage(Language language) {
else textName = static_cast<const LanguagePaneData*>(mpLanguageData)->textBox;
mpLayoutData = textName;
if (::strcmp(static_cast<const char*>(mpLayoutData), "T_2l_TextBox") != 0) setVisible("T_2l_TextBox", false);
nw4r::lyt::Pane* pane = mpLayout->GetRootPane()->FindPaneByName(selectInputTextName(*this, mpLanguageData), true);
nw4r::lyt::Pane* pane = mpLayout->GetRootPane()->FindPaneByName(getLanguageTextPane() ? static_cast<const LanguagePaneData*>(mpLanguageData)->textBox : "T_2l_TextBox", true);
static_cast<nw4r::lyt::TextBox*>(pane)->SetString(L"", 0);
const VisiblePanes* visibility = static_cast<const LanguagePaneData*>(mpLanguageData)->visibility;
for (u16 index = 0; index < visibility->visibleCount; ++index) setVisible(visibility->visibleNames[index], true);
for (u16 index = 0; index < visibility->hiddenCount; ++index) setVisible(visibility->hiddenNames[index], false);
pane = mpLayout->GetRootPane()->FindPaneByName(selectInputTextName(*this, mpLanguageData), true);
pane = mpLayout->GetRootPane()->FindPaneByName(getLanguageTextPane() ? static_cast<const LanguagePaneData*>(mpLanguageData)->textBox : "T_2l_TextBox", true);
mpPaneManager->getPaneComponentByPane(pane)->setTriggerTarget(true);
if (getPane("T_title_text")) {
nw4r::lyt::TextBox* title = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(getPane("T_title_text"));
@@ -3078,9 +3071,7 @@ bool Base::onCursor(CursorPos* cursor) {
f32 left = glyph.rect.left + GetCursorX();
f32 top = glyph.rect.top + GetCursorY();
f32 right = glyph.rect.right + GetCursorX();
f32 cursorY = GetCursorY();
f32 fontHeight = GetFontHeight();
f32 bottomEdge = fontHeight + cursorY;
f32 bottomEdge = GetCursorY() + GetFontHeight();
candidateBackground.a = muGlobalAlpha;
debug::drawBox_(left, top, right, bottomEdge, 0.0f, 1.0f, candidateBackground);
SetupGX();
@@ -3140,9 +3131,7 @@ bool Base::onCursor(CursorPos* cursor) {
f32 left = glyph.rect.left + GetCursorX();
f32 top = glyph.rect.top + GetCursorY();
f32 right = glyph.rect.right + GetCursorX();
f32 cursorY = GetCursorY();
f32 fontHeight = GetFontHeight();
f32 bottomEdge = fontHeight + cursorY;
f32 bottomEdge = GetCursorY() + GetFontHeight();
kanaBackground.a = muGlobalAlpha;
debug::drawBox_(left, top, right, bottomEdge, 0.0f, 1.0f, kanaBackground);
SetupGX();
@@ -3188,7 +3177,7 @@ u32 Base::calcCursorPos(f32 x, f32 y) {
info.character = *string;
calcRect(info);
lineBottom = lineTop + scale.y * (info.rect.bottom - info.rect.top);
f32 right = cursorX + scale.x * info.rect.GetWidth();
f32 right = cursorX + scale.x * (info.rect.right - info.rect.left);
if (doWordWrap(mpString->getWCString(), pos, cursorX)) {
if (localY >= lineTop && localY <= lineBottom) {
if (pos != 0) return pos - 1;
@@ -3197,14 +3186,14 @@ u32 Base::calcCursorPos(f32 x, f32 y) {
lineTop += scale.y * getLineHeight();
cursorX = getScale().x;
lineBottom = lineTop + scale.y * (info.rect.bottom - info.rect.top);
right = cursorX + scale.x * info.rect.GetWidth();
right = cursorX + scale.x * (info.rect.right - info.rect.left);
}
if (right >= scale.x * mRect.GetWidth()) {
if (right >= scale.x * (mRect.right - mRect.left)) {
if (localY >= lineTop && localY <= lineBottom) return pos;
lineTop += scale.y * getLineHeight();
cursorX = getScale().x;
lineBottom = lineTop + scale.y * (info.rect.bottom - info.rect.top);
right = cursorX + scale.x * info.rect.GetWidth();
right = cursorX + scale.x * (info.rect.right - info.rect.left);
}
if (x <= info.rect.left && localY >= lineTop && localY <= lineBottom) return pos;
if (*string == L'\n') {
@@ -3218,7 +3207,7 @@ u32 Base::calcCursorPos(f32 x, f32 y) {
if (cursorX + 0.5f * (right - cursorX) > x) return pos;
return pos + 1;
}
cursorX += scale.x * info.rect.GetWidth();
cursorX += scale.x * (info.rect.right - info.rect.left);
}
++string;
++pos;

View File

@@ -5,7 +5,7 @@
extern "C" {
u8 KPRLookAhead(KPRQueue*, wchar_t*, u32);
u8 KPRPutChar(KPRQueue*, wchar_t);
u32 KPRPutChar(KPRQueue*, wchar_t);
wchar_t KPRGetChar(KPRQueue*);
void KPRClearQueue(KPRQueue*);
void KPRInitQueue(KPRQueue*);
@@ -141,28 +141,6 @@ wchar_t StringBase::getLastWChar() {
return 0;
}
namespace {
class CharacterOutput {
public:
CharacterOutput(wchar_t* output) : mpOutput(output), mCount(0) {
mpOutput[0] = 0;
}
void append(wchar_t ch) {
mpOutput[mCount++] = ch;
}
u16 finish() {
mpOutput[mCount] = 0;
return mCount;
}
private:
wchar_t* mpOutput;
u32 mCount;
};
}
void Decolated::inputChar(wchar_t ch) {
if (ch != 0xfffe) {
wchar_t input[8];
@@ -195,9 +173,9 @@ void Decolated::inputChar(wchar_t ch) {
}
nonKana:
if (mTranslateMode == 3) {
CharacterOutput output(input);
output.append(ch);
count = output.finish();
input[0] = ch;
input[1] = 0;
count = 1;
mKanaStream.mOutput[0] = 0;
} else {
count = 1;

View File

@@ -1778,38 +1778,30 @@ namespace ipl {
}
}
static inline f32 GetDragNameWidth(nw4r::lyt::TextBox* textBox, const NWC24FriendInfo& info) {
f32 width = 0.0f;
if (textBox == NULL) {
return width;
}
const u16* name = info.attr.name;
if (name == NULL) {
return width;
}
textBox->GetFont()->GetWidth();
for (; *name != 0; ++name) {
width += textBox->GetFont()->GetCharWidth(*name);
}
return 0.01f + width;
}
void Address::movePane_onDrag() {
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->GetRootPane()->FindPaneByName("T_name_move", true));
nw4r::lyt::TextBox* textBox = static_cast<nw4r::lyt::TextBox*>(mpLayout->FindPaneByName("T_name_move"));
f32 width = GetDragNameWidth(textBox, mpFriendCache->getInfo(mDrag.mButton + mDrag.mPage * BTN_MAX));
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);
}
}
}
width += 0.01f;
nw4r::ut::Rect rect;
nw4r::ut::Rect rect4x3;
System::getProjectionRect(&rect);
System::getProjectionRect4x3(&rect4x3);
f32 rightEdge = baseTrans.x + width;
if (rightEdge < pos.x) {
rightEdge *= rect4x3.GetWidth() / rect.GetWidth();
mDragOffsetX = -rightEdge;
if (baseTrans.x + width < pos.x) {
mDragOffsetX = -((baseTrans.x + width) * (rect4x3.GetWidth() / rect.GetWidth()));
} else {
pos.x *= rect4x3.GetWidth() / rect.GetWidth();
mDragOffsetX = -pos.x;
@@ -1958,7 +1950,7 @@ namespace ipl {
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(&mInfos[static_cast<s32>(index)], index);
System::getNwc24Manager()->updateFriendInfo(&getInfo(index), index);
}
void FriendListCache::del(u32 index) {

View File

@@ -140,6 +140,7 @@ void ipl::scene::AddressEdit::reset_gui() {
}
extern "C" void* __nw__FUl(u32);
extern "C" BOOL RFLSearchOfficialData(const RFLCreateID*, u16*);
namespace ipl {
@@ -583,10 +584,15 @@ create_mode_done:
ipl::System::getKeyboard()->init();
f32 margin4x3 = 30.0f;
f32 margin16x9 = 120.0f;
mpBalloon = new ipl::scene::TextBalloon(getHeap(), mpBalloonFile, "arc",
"my_IplTopBalloon_a.brlyt", ipl::math::VEC3(0.0f, 0.0f, 0.0f), margin16x9, margin4x3);
ipl::scene::TextBalloon* balloon = reinterpret_cast<ipl::scene::TextBalloon*>(__nw__FUl(0x3c));
if (balloon != NULL) {
f32 balloonWidth = 30.0f;
f32 balloonHeight = 120.0f;
EGG::Heap* heap = getHeap();
ipl::math::VEC3 position(0.0f, 0.0f, 0.0f);
balloon = new (balloon) ipl::scene::TextBalloon(heap, mpBalloonFile, "arc", "my_IplTopBalloon_a.brlyt", position, balloonHeight, balloonWidth);
}
mpBalloon = balloon;
}
void ipl::scene::AddressEdit::stt_wait_decide_anm() {

View File

@@ -45,7 +45,7 @@ struct CardThreadState {
MEMAllocator sAllocator_;
static CardThreadState* sThread;
extern "C" void* cardThreadMain(void*);
extern "C" void* cardThreadMain();
static char sCardSlotName[3] = "AB";
FileInfo* getCardDirState() {
@@ -302,7 +302,7 @@ void initCardThread() {
OSInitMessageQueue(&sThread->responses, sThread->responseMessages, 0x10);
OSInitMessageQueue(&sThread->requests, sThread->requestMessages, 0x10);
OSCreateThread(&sThread->thread, cardThreadMain, 0,
OSCreateThread(&sThread->thread, (void* (*)(void*))cardThreadMain, 0,
sThread->stack + sizeof(sThread->stack), 0x8000, 0x11, 0);
OSResumeThread(&sThread->thread);
OSSendMessage(&sThread->requests, (OSMessage)10, 0);
@@ -408,7 +408,7 @@ static inline void sendValidityResponse(u32 command, u32 valid) {
OSSendMessage(&sThread->responses, (OSMessage)reply.value, 1);
}
extern "C" void* cardThreadMain(void*) {
extern "C" void* cardThreadMain() {
struct CardThreadLocals {
u8 compareName[6];
u32 message;
@@ -1004,29 +1004,27 @@ sectorSizeError:
sectorSizeDone:
;
{
s32 permissionResult = 0;
statusResult = __CARDGetStatusEx(slot, fileNo, &checkedStatus);
if (statusResult >= 0) {
switch (command) {
case 2:
if (checkedStatus.permission & 8) {
permissionResult = -10;
}
break;
case 3:
if (checkedStatus.permission & 0x10) {
permissionResult = -10;
}
break;
result = 0;
statusResult = __CARDGetStatusEx(slot, fileNo, &checkedStatus);
if (statusResult >= 0) {
switch (command) {
case 2:
if (checkedStatus.permission & 8) {
result = -10;
}
} else {
permissionResult = CARDGetResultCode(slot);
}
if (permissionResult < 0) {
reportCardThreadError(slot, command, permissionResult);
goto finish;
break;
case 3:
if (checkedStatus.permission & 0x10) {
result = -10;
}
break;
}
} else {
result = CARDGetResultCode(slot);
}
if (result < 0) {
reportCardThreadError(slot, command, result);
goto finish;
}
result = __CARDGetStatusEx(slot, fileNo, &createStatus);

View File

@@ -281,11 +281,7 @@ void MemoryCardManager::update_file_array(u8 slot) {
memorycard::CardState* states = memorycard::getCardSlotState();
states[slot].changed = 0;
sort_file_array(slot);
enum CardCommand {
NoCommand, Format, Copy, Move, Delete,
CopyComplete, MoveComplete, DeleteComplete, FormatComplete
};
CardCommand command = static_cast<CardCommand>(mLastCmd);
long command = mLastCmd;
if ((u32)(command - 1) <= 3) {
if (mLastResult == -0x15) {
mLastResult = memorycard::getCardLastCMDFCmdResult();

View File

@@ -1266,9 +1266,10 @@ namespace ipl {
memoPosition.x = translation.x;
memoPosition.y = translation.y;
memoPosition.z = translation.z;
f32 bodyY = memoPosition.y;
mpDialogLayout->FindPaneByName("header_header");
nw4r::lyt::Pane* bodyPane = mpDialogLayout->FindPaneByName("header_body");
f32 bodyY = memoPosition.y;
if (bodyY < 500.0f) {
mpDialogLayout->draw("header_header");
}
@@ -1281,11 +1282,11 @@ namespace ipl {
++child;
}
s32 lineCount = 0;
f32 messageOffset = 0.0f;
f32 bodyHeight = bodyPane->GetSize().height;
if (mNandTitleCount != 0) {
const wchar_t* messageForCount = System::getMessage(0xCB);
s32 lineCount = 0;
const wchar_t* newline = wcsstr(messageForCount, L"\n");
while (newline != NULL) {
++lineCount;

View File

@@ -1406,10 +1406,10 @@ namespace ipl {
getCurrentTitleUsage(&bytes, &blocks);
*titleCount = 0;
ESTitleId titleId;
for (int page = MAX_CHANNEL_PAGE - 1; page >= 0; --page) {
for (int order = 0; order < MAX_CHANNEL_INDEX; ++order) {
int channelIndex = channelOrder[order];
ESTitleId titleId;
const channel::SEntry& channelInfo =
System::getChannelManager()->mChannels[page][channelIndex];
if (channelInfo.loadedBnr) {
@@ -2710,19 +2710,23 @@ namespace ipl {
nw4r::ut::Rect projection;
System::getProjectionRect(&projection);
GXRenderModeObj* renderMode = System::getRenderModeObj();
f32 scissorX;
f32 scissorY;
f32 scissorWidth;
f32 scissorY;
f32 scissorX;
f32 scissorHeight;
u16 framebufferWidth;
u16 framebufferHeight;
if (mState == 7 || mState == 12 || mState == 14) {
nw4r::math::MTX44 matrix;
f32 right = mPosition.x + projection.right / mScale.x;
f32 left = mPosition.x + projection.left / mScale.x;
f32 bottom = mPosition.y - projection.bottom / mScale.y;
f32 top = mPosition.y - projection.top / mScale.y;
f32 rightScale = projection.right / mScale.x;
f32 leftScale = projection.left / mScale.x;
f32 bottomScale = projection.bottom / mScale.y;
f32 topScale = projection.top / mScale.y;
f32 bottom = mPosition.y - bottomScale;
f32 right = mPosition.x + rightScale;
f32 left = mPosition.x + leftScale;
f32 top = mPosition.y - topScale;
MTXOrtho(matrix, top, bottom, left, right, -100.0f, 100.0f);
nw4r::math::VEC4 input(position.x, position.y, 0.0f, 1.0f);
@@ -2730,13 +2734,14 @@ namespace ipl {
nw4r::math::VEC4Transform(&transformed, &matrix, &input);
framebufferWidth = renderMode->fbWidth;
framebufferHeight = renderMode->efbHeight;
const f32 projectionWidth = projection.GetWidth();
scissorX = ((1.0f + transformed.x) * framebufferWidth / 2) -
((mThumbOffsetX * mScale.x) * (framebufferWidth / projectionWidth));
scissorWidth = projection.GetWidth();
scissorY = (framebufferHeight - ((1.0f + transformed.y) * framebufferHeight / 2)) -
(mThumbOffsetY * mScale.y);
f32 widthScale = framebufferWidth / scissorWidth;
scissorX = ((1.0f + transformed.x) * framebufferWidth / 2) -
((mThumbOffsetX * mScale.x) * widthScale);
scissorWidth = 2.0f * (mThumbOffsetX * mScale.x) *
(framebufferWidth / projectionWidth);
(framebufferWidth / scissorWidth);
scissorHeight = 2.0f * (mThumbOffsetY * mScale.y);
} else {
framebufferWidth = renderMode->fbWidth;
@@ -3406,7 +3411,7 @@ namespace ipl {
case ::gui::EventHandler::ON_TRIG:
if (mpScene->mState == 1 && controller != NULL) {
BOOL writeProtected = mpScene->mpSDWorker->is_sd_write_protected();
if (controller->pinchTrg() && iplSDChannelObj_hasAppMeta(channel) &&
if (controller->pinchTrg() && SDChannelSelect::isChannelReady(channel) &&
!mpScene->mbSDCardBroken) {
if (!writeProtected) {
mpScene->startDrag(controller, mpScene->mCurrentPage, index);
@@ -3420,20 +3425,20 @@ namespace ipl {
break;
case ::gui::EventHandler::ON_DRAG:
if (mpScene->mState == 1 && controller != NULL && controller->decide() &&
iplSDChannelObj_hasAppMeta(channel)) {
SDChannelSelect::isChannelReady(channel)) {
mpScene->selectChannel(channel->getPage(), channel->getIndex());
TVRCManager::getHandle()->setEnable(FALSE);
}
break;
case ::gui::EventHandler::ON_POINT:
if (mpScene->mState == 1 && iplSDChannelObj_hasAppMeta(channel)) {
if (mpScene->mState == 1 && SDChannelSelect::isChannelReady(channel)) {
iplSDChannelObj_startAppear(channel, 0);
snd::getSystem()->startSE("WIPL_SE_CH_TARGETTING");
controller->rumble(1);
}
break;
case ::gui::EventHandler::ON_LEFT:
if (mpScene->mState == 1 && iplSDChannelObj_hasAppMeta(channel)) {
if (mpScene->mState == 1 && SDChannelSelect::isChannelReady(channel)) {
iplSDChannelObj_startDisappear(channel, 0);
}
break;

View File

@@ -167,11 +167,6 @@ typedef struct AOSSKeySchedule {
u32 length;
} AOSSKeySchedule;
typedef struct AOSSKeyMaterial {
u8 nonce[2];
u8 address[8];
} AOSSKeyMaterial;
typedef struct AOSSReceiveBuffer {
s32 socket;
u32 length;
@@ -262,7 +257,8 @@ static AOSSRuntimeState s_runtime;
static AOSSConfigData s_configData;
static u8 s_networkBuffer[0x280];
static struct {
AOSSKeyMaterial key;
u8 keyNonce[2];
u8 keyAddress[8];
u8 payload[0x5e];
} s_packetState;
static u32 s_crcTable[0x100];
@@ -288,9 +284,7 @@ extern int AOSSi_WLANGetBSSList(void** list);
extern int AOSSi_Status(int status);
extern int AOSSi_SetNCDIPAddr(u32 ipAddress, u32 netmask, u32 gateway, u32 dns1, u32 dns2);
extern int AOSSi_Sleep(u32 duration);
struct AOSSConnection;
struct AOSSConnectionStatus;
extern int AOSSi_WLANConnect(struct AOSSConnection* connection, struct AOSSConnectionStatus* status);
extern int AOSSi_WLANConnect(void);
extern int SOPoll(AOSSPollDescriptor* descriptors, int count, s32 timeoutHigh, s32 timeoutLow);
extern int SORecvFrom(int socket, void* buffer, int length, int flags, void* address);
extern int SOSendTo(int socket, const void* buffer, int length, int flags, const void* address);
@@ -1906,9 +1900,10 @@ int AOSSDecryptMessage(AOSSDecryptionMessage* message) {
s_errorCode = 2;
result = -1;
} else {
memcpy(s_packetState.key.nonce, &encrypted->keyNonce, sizeof(encrypted->keyNonce));
memcpy(s_packetState.key.address, s_accessPointName, sizeof(s_accessPointName));
AOSSInitKeySchedule(&schedule, (const u8*)&s_packetState.key, sizeof(s_packetState.key), dataLength);
memcpy(s_packetState.keyNonce, &encrypted->keyNonce, sizeof(encrypted->keyNonce));
memcpy(s_packetState.keyAddress, s_accessPointName, sizeof(s_accessPointName));
AOSSInitKeySchedule(&schedule, s_packetState.keyNonce,
sizeof(s_packetState.keyNonce) + sizeof(s_packetState.keyAddress), dataLength);
outputCursor = decryptedData;
inputCursor = encrypted->data;
@@ -2380,9 +2375,10 @@ int AOSSSendHelloRequest(void* packet, void* request, int socket) {
if (construction.schedule.bytes != 0) {
nonce = (u16)rand();
memcpy(&payload->encrypted.key.nonce, &nonce, 2);
memcpy(s_packetState.key.nonce, payload->encrypted.key.nonceBytes, 2);
memcpy(s_packetState.key.address, s_accessPointName, 8);
AOSSInitKeySchedule(&construction.schedule, (const u8*)&s_packetState.key, sizeof(s_packetState.key), 8);
memcpy(s_packetState.keyNonce, payload->encrypted.key.nonceBytes, 2);
memcpy(s_packetState.keyAddress, s_accessPointName, 8);
AOSSInitKeySchedule(&construction.schedule, s_packetState.keyNonce,
sizeof(s_packetState.keyNonce) + sizeof(s_packetState.keyAddress), 8);
for (index = 0; index < 8; index++) {
state = construction.schedule.bytes;
firstIndex = (construction.schedule.i + 1) % construction.schedule.length & 0xff;
@@ -2566,7 +2562,7 @@ int AOSSConnectAndAwaitHost(void* settings, void* config) {
s32 connectionAttempts = 0;
u32 ticksPerMillisecond;
if (AOSSi_WLANConnect(settings, config) != 0) {
if (AOSSi_WLANConnect() != 0) {
return -1;
}

View File

@@ -126,7 +126,7 @@ int AOSSi_EndLocal(void) {
return 0;
}
int AOSSi_WLANGetBSSList(void** output) {
int AOSSi_WLANGetBSSList(struct AOSSAccessPointList** output) {
int result = -1;
int startupRetries = 0;
WDScanParam scan ATTRIBUTE_ALIGN(32);

View File

@@ -542,7 +542,7 @@ s32 gAtermState;
void ATERMAlarmWakeQueue(OSAlarm* alarm, OSContext* context);
s32 ATERMRunConfigProtocol(void);
void ATERMMd5Update(AtermMd5Context* context, u8* input, u32 length);
void ATERMMd5Update(AtermMd5Context* context, void* input, u32 length);
extern u8 gAtermDigestFill[64];
extern u8* gAtermRequestOptions;
int ATERMAesKeyWrap(u16* destination, u16* source, u32 length, void* key, u32 keyLength);
@@ -1662,7 +1662,7 @@ s32 ATERMRunConfigProtocol(void) {
digestContext.state[1] = 0xEFCDAB89;
digestContext.state[2] = 0x98BADCFE;
digestContext.state[3] = 0x10325476;
ATERMMd5Update(&digestContext, (u8*)&authenticationTime, sizeof(authenticationTime));
ATERMMd5Update(&digestContext, &authenticationTime, sizeof(authenticationTime));
digestLength[0] = digestContext.bitCountLow;
digestLength[1] = digestContext.bitCountLow >> 8;
digestLength[2] = digestContext.bitCountLow >> 16;
@@ -2312,17 +2312,12 @@ void ATERMAesDecryptBlock(const u32* expandedKey, u32 rounds, const u8* input, u
void ATERMMd5Transform(u32 state[4], const u8 block[64]);
static inline void atermMd5Copy(void* output, const void* input, u32 length) {
u32 index;
for (index = 0; index < length; index++) {
((u8*)output)[index] = ((const u8*)input)[index];
}
}
void ATERMMd5Update(AtermMd5Context* context, u8* input, u32 length) {
void ATERMMd5Update(AtermMd5Context* context, void* input, u32 length) {
u8* data = (u8*)input;
u32 bufferIndex = (context->bitCountLow >> 3) & 0x3F;
u32 bytesToFill;
u32 copiedBytes;
u32 index;
context->bitCountLow += length << 3;
if (context->bitCountLow < (length << 3)) {
@@ -2331,16 +2326,20 @@ void ATERMMd5Update(AtermMd5Context* context, u8* input, u32 length) {
context->bitCountHigh += length >> 29;
bytesToFill = 64 - bufferIndex;
if (length >= bytesToFill) {
atermMd5Copy(&context->buffer8[bufferIndex], input, bytesToFill);
for (copiedBytes = 0; copiedBytes < bytesToFill; copiedBytes++) {
context->buffer8[bufferIndex + copiedBytes] = data[copiedBytes];
}
ATERMMd5Transform(context->state, context->buffer8);
for (copiedBytes = bytesToFill; copiedBytes + 63 < length; copiedBytes += 64) {
ATERMMd5Transform(context->state, input + copiedBytes);
ATERMMd5Transform(context->state, data + copiedBytes);
}
bufferIndex = 0;
} else {
copiedBytes = 0;
}
atermMd5Copy(&context->buffer8[bufferIndex], &input[copiedBytes], length - copiedBytes);
for (index = 0; index < length - copiedBytes; index++) {
context->buffer8[bufferIndex + index] = data[copiedBytes + index];
}
}
#define ATERM_MD5_STEP(A, B, C, D, WORD, CONSTANT, SHIFT, F) \

View File

@@ -2481,28 +2481,25 @@ namespace ipl {
void Setting::convertRevIP(u8* destination, const char* address) {
char ascii[20];
int index;
int componentStart;
int count = 0;
u32 value;
u8 character;
int index;
memset(ascii, 0, sizeof(ascii));
utility::CharacterCode::UTF8ToANSI(reinterpret_cast<u8*>(ascii), address);
index = 0;
componentStart = 0;
for (; index < 0x10; ++index) {
character = static_cast<u8>(ascii[index]);
int componentStart = 0;
u8* output = destination;
for (index = 0; index < 0x10; ++index) {
u8 character = static_cast<u8>(ascii[index]);
if (character == '.' || character == 0) {
if (character == 0) {
index = 0x10;
}
ascii[index] = 0;
value = atoi(ascii + componentStart);
u32 value = atoi(ascii + componentStart);
if (value > 0xff) {
value = 0xff;
}
if (count == 0) {
destination[count] = value;
*output = value;
} else {
destination[1] = destination[2];
destination[2] = destination[3];
@@ -2510,6 +2507,7 @@ namespace ipl {
}
componentStart = index + 1;
++count;
++output;
if (count == 3 && index != 0x10) {
value = atoi(ascii + componentStart);
if (value > 0xff) {
@@ -2706,7 +2704,6 @@ namespace ipl {
}
void Setting::scanAP() {
BOOL playing = FALSE;
switch (unk_0x78) {
case 1:
memset(&mAPScanList.count, 0, 0x800);
@@ -2755,8 +2752,7 @@ namespace ipl {
case 6: {
int animationIndex = unk_0x918;
unk_0xB9C = 1;
playing |= mpMainLayout->getAnim(animationIndex)->isPlaying();
if (!playing) {
if (!mpMainLayout->getAnim(animationIndex)->isPlaying()) {
unk_0x78 = 5;
setAPDraw();
if (unk_0x91C[0] != 0) {
@@ -2779,23 +2775,19 @@ namespace ipl {
}
break;
}
case 7: {
int animationIndex = unk_0x918;
case 7:
unk_0xB9C = 1;
playing |= mpMainLayout->getAnim(animationIndex)->isPlaying();
if (!playing) {
if (!mpMainLayout->getAnim(unk_0x918)->isPlaying()) {
updateScroll();
unk_0x78 = 6;
}
break;
}
case 8:
resetAP();
unk_0x91C[2] = 0;
break;
case 9:
playing |= mpMainLayout->getAnim(unk_0x918)->isPlaying();
if (!playing) {
if (!mpMainLayout->getAnim(unk_0x918)->isPlaying()) {
resetFuncMsgQ();
unk_0x78 = 1;
unk_0x918 = -1;

View File

@@ -211,13 +211,13 @@ namespace ipl {
systemDict = System::getZiDicData(i);
}
if (oemDict == NULL && System::getZiDicData(i) != NULL) {
oemDict = System::getZiOemDicData(oemIndex - EZTX_LANG_MAX);
oemDict = System::getZiDicData(oemIndex);
}
}
for (int i = 0, oemIndex = EZTX_LANG_MAX; i < EZTX_LANG_MAX; i++, oemIndex++) {
u8* usedSystemDict = System::getZiDicData(i);
u8* usedOemDict = System::getZiOemDicData(oemIndex - EZTX_LANG_MAX);
u8* usedOemDict = System::getZiDicData(oemIndex);
usedSystemDict = usedSystemDict != NULL ? usedSystemDict : systemDict;
if (usedOemDict == NULL) {

View File

@@ -466,21 +466,19 @@ static const u8 gArDeconvPlttTbl[3072] = {
0x00, 0xD5, 0x00, 0xD6, 0x00, 0xD8, 0x00, 0xDA, 0x00, 0xDC, 0x00, 0xDE, 0x00, 0xDF, 0x00, 0xE1
};
static const u16 gArDc_luminance_huffTable[] = {
0x0001, 0x8002, 0x0003, 0x0000, 0xC003, 0xC004, 0x8005, 0x0001,
0x0002, 0x0003, 0x0004, 0x0005, 0x8001, 0x0006, 0x8001, 0x0007,
0x8001, 0x0008, 0x8001, 0x0009, 0x8001, 0x000A, 0x8001, 0x000B,
static const u32 gArDc_luminance_huffTable[] = {
0x00018002, 0x00030000, 0xC003C004, 0x80050001, 0x00020003, 0x00040005,
0x80010006, 0x80010007, 0x80010008, 0x80010009, 0x8001000A, 0x8001000B,
};
static const u16 gArDc_chrominance_huffTable[] = {
0x0001, 0xC002, 0x8003, 0x0000, 0x0001, 0x0002, 0x8001, 0x0003,
0x8001, 0x0004, 0x8001, 0x0005, 0x8001, 0x0006, 0x8001, 0x0007,
0x8001, 0x0008, 0x8001, 0x0009, 0x8001, 0x000A, 0x8001, 0x000B,
static const u32 gArDc_chrominance_huffTable[] = {
0x0001C002, 0x80030000, 0x00010002, 0x80010003, 0x80010004, 0x80010005,
0x80010006, 0x80010007, 0x80010008, 0x80010009, 0x8001000A, 0x8001000B,
};
#pragma pack(1)
struct HufftreeData {
const u16* tables[4];
const u32* tables[4];
char messages[0x1BB];
};
#pragma pack()

View File

@@ -1,76 +0,0 @@
# BS2 low-level DVD completion callback contract
Base: `9c7d87ab008df7e35558321e3ca297a887d35c44`.
Leaf: `agent/bittle/bs2-dvd-callback-contract`, 43U only.
## Source evidence
`DVDLowCallback` is `void (*)(u32 intType)`. BS2Mach defined its completion
callback with a signed s32 parameter and cast it to the unsigned function
pointer type at five registration sites. DVDLowContext stores DVDLowCallback,
and the original exact doTransactionCallback dispatches through that type.
The callback simply publishes the received word to volatile u32 LowReadResult.
Use the unsigned parameter directly and remove the five casts.
The original callback symbol at 0x8137BA1C is local, while baseline source
emitted it globally. All references are private to BS2Mach.c. Restore static
linkage in a separate measured follow-on; no other function/global changes.
Original evidence was checked independently against the DOL:
- Five registration sites contain ten address-materialization relocations
resolving to callback 0x8137BA1C
- The callback stores the entire r3 word to LowReadResult 0x81698A54, then
returns; the actual SDA base is 0x8169E040
- Original dispatcher invocation is at 0x8154F8C8; doTransactionCallback
remains instruction-exact, 46/46 instructions
- All 123 direct calls in BS2StartGame and BS2StartGCGame agree with original
raw destinations; their request-buffer widths/offsets and ABI inputs agree
- Ordinary NAND completion has its separate signed-result/block contract
and is untouched
## Separately measured trials
1. Unsigned callback parameter and removal of five casts only. Entire MWCC
object byte-identical to baseline, SHA256
`b853f8e58ead247dd8d333f4a7413e56b9c9e92341ad1bf54034fdf2f2be93b6`.
Full report byte-identical across 1,027 units.
2. Add static linkage. Only callback's symbol binding changes, global to
local, matching the original. Every other symbol record and all 1,461
relocation sites/types/target identities/addends remain unchanged.
All five allocated sections retain identical contents, extents, flags
and alignment, including BSS/SBSS extents. Final object SHA256
`154cd050a7295a1178de648a2abacf311cc2b4c96548926eb6d77eedb177c2e4`.
Full report again byte-identical to baseline.
Whole-object identity is claimed only for trial 1; trial 2 changes metadata.
No matching/fuzzy percentage gain or change in boot behavior is claimed.
## Tests and gates
- Fresh baseline configured with `python3 configure.py --version 43U
--wrapper ../toolchain/wibo-build/wibo`; full source/report/DOL build passes
- Candidate object built separately for both trials; final full invocation
`WIBO_SJIS_MISSING_IMPORTS=1 ../.venv/bin/ninja all_source
build/43U/report.json build/43U/ok` passes
- Pool identical: 91/91 strings
- All 25 exact functions independently retain zero instruction differences;
callback remains 2/2 instructions at .text+0xA68, STB_LOCAL as original
- Unit unchanged: 25/29 exact functions, 5,112/16,980 matched code bytes,
155,504/158,528 matched data bytes, fuzzy 99.09658%
- Literal advisory: 28 functions, 97 arguments, no candidates or errors;
skips only BS2Tick because its extents differ
- DOL SHA1 `26116613f624061ba99c8d1a299aaa6efa85670d`
- `git diff --check` passes
Host compiler test extracts the baseline and final callback definitions with
fixed-width host equivalents. Direct assignment to DVDLowCallback fails for
the signed baseline under -Werror=incompatible-pointer-types and succeeds for
the final definition. The final callback preserves 200,007 tested words under
UBSan, including 0, 1, 2, 0x40, INT32_MAX, 0x80000000 and UINT32_MAX.
This is a compile-time function-type counterexample; GCC UBSan is not claimed
to detect the baseline's incompatible indirect call.
Private evidence: `/tmp/bs2-boot-contract/` and workspace-parent
`validation/bs2-boot-contract-20261003/`. Original binary/disassembly is not
committed. No shared header, volatility, Run body, state, or linking change.

View File

@@ -1,53 +0,0 @@
# CHANSVm boolean output contract
Base: `fc114afd44065fb99f9ff2fe2969f393a504fe03` (43U).
Leaf: `agent/bittle/chans-scalar-contracts`.
## Correction and evidence
`CHANSVmGetBoolean` writes an optional four-byte `vmBoolInt` result, but its
source formal described a `CHANSVmObjHdr*`. All three callers cast addresses
of scalar locals to that object pointer. The original helper's only output
write is a word store at `0x8144C664`. Its Step call destinations at
`0x81456B08`, `0x81457584`, and `0x814575B0` were verified directly in the
original DOL, as were 48 nonrelocated helper words and its direct callees.
The actual MWCC layout probe confirms object alignment/size 8/16 and scalar
alignment/size 4/4. Step's two conditional-branch callers pass sp+0x0C, which
has scalar alignment but not object alignment. Declaring a whole object at
that address is an incorrect source contract even though the generated
helper only performs one word store.
Use `vmBoolInt*` as the output formal, assign through `*ret`, make both
receiving locals `vmBoolInt`, and remove all three casts. No shared header
contains a declaration, and no header changed. A repository-wide source
search found exactly this definition and these three calls. A complete
original-object relocation scan found only those calls plus ten labels in
the helper's own switch table; no additional callback was found.
## Tests and gates
- Source-extracted baseline reproduces a UBSan misaligned-object access when
passed a four-byte-aligned, non-eight-byte-aligned scalar destination.
- Candidate passes 1,283 typed-output cases, corresponding null-output calls,
and surrounding-byte canaries. Coverage includes all 256 discriminator
values, signed integer boundaries, zero/nonzero string lengths, finite
floating values, signed zero, infinities, NaN, and error/no-write paths.
- This is a focused host helper harness with a modeled object layout and
`isnan` shim, not full VM or Wii runtime execution. Target layout was
independently checked with the configured MWCC compiler.
- Entire compiled object is byte-identical, including code, data, symbols
and relocations. SHA256:
`5bf3f4a0a404e2a574287c16de81d702a1402d9fca416455e84dc1df67c9eb76`.
- All 1,027 report units unchanged. Exact CHANS functions 222/233; exact code
38,136/53,564; data 6,904/6,904. GetBoolean remains 100%; Step 96.98723%.
- Pool: 125/125 identical. `git diff --check` passes.
- Full 43U `all_source`, report, and `ok` gates pass with the existing cached
tools selected through documented configure overrides. DOL SHA1:
`26116613f624061ba99c8d1a299aaa6efa85670d`.
Artifacts: `/tmp/chans-step-abi/`, including `test_boolean.py`, the MWCC
alignment probe, `check_boolean_original.py`, and build/test results.
No original binary or disassembly is committed.
GATE: coherent scalar-output source correction; no fuzzy/exact/data/link gain.

View File

@@ -1,79 +0,0 @@
# CHANSVm HMAC external declarations
Base: `20ba34a80f9d0a09c4a8fad51352f0dd97d84be0` (43U).
Leaf: `agent/bittle/chans-hmac-linkage`.
## Source evidence
The four HMAC/SHA1 helper declarations at the top of `CHANSVm.c` had
`static` linkage but no definitions in that translation unit. A fresh MWCC
compile emitted four warning 10532 diagnostics. The definitions in
`libs/RevoEX/src/net/sha1.c` and `hmac.c` have external linkage;
`CDBRecord.c` already declares these imports `extern`.
The original CHANS object imports all four as `STB_GLOBAL`, `SHN_UNDEF`.
The baseline source object instead imported them as `STB_LOCAL`,
`SHN_UNDEF`. Change only the four declaration storage classes to `extern`.
Do not change the context, parameter types, shared headers, or linking flags.
Independent original-DOL call decoding agrees with the extracted relocations:
| Caller | Call address | Destination | Import |
| --- | --- | --- | --- |
| VmBlobCalcHMAC | 0x81452720 | 0x81494144 | NETGetSHA1Interface |
| VmBlobCalcHMAC | 0x81452734 | 0x814944EC | NETHMACInit |
| VmBlobCalcHMAC | 0x81452744 | 0x81494728 | NETHMACUpdate |
| VmBlobCalcHMAC | 0x81452750 | 0x81494738 | NETHMACGetDigest |
| VmBlobCalcRangeHMAC | 0x814528F4 | 0x81494144 | NETGetSHA1Interface |
| VmBlobCalcRangeHMAC | 0x81452908 | 0x814944EC | NETHMACInit |
| VmBlobCalcRangeHMAC | 0x81452918 | 0x81494728 | NETHMACUpdate |
| VmBlobCalcRangeHMAC | 0x81452924 | 0x81494738 | NETHMACGetDigest |
The ABI contracts agree: Init takes context/interface/key/u32 length in
r3-r6, Update takes context/data/u32 length, and GetDigest takes
context/output. The interface helper returns its pointer in r3.
Original caller context addresses are sp+8 and sp+0x10. The exact HMAC
implementation uses the interface at 0x00-0x1B, key length at 0x1C,
96-byte digest state at 0x20, and 64-byte key at 0x80, totaling 0xC0.
The existing CHANS opaque context reserves 0xD0 with 8-byte alignment.
That storage is unchanged. Caller opaque types and callee named types
remain separate declarations; this change fixes linkage only, not complete
cross-translation-unit type compatibility.
## Validation
- Configured 43U with `../toolchain/wibo-build/wibo`; fresh baseline full
source/report/DOL build passed, followed by a forced owned-object rebuild.
- Baseline emitted exactly four warning 10532 diagnostics; candidate emitted
none. No other compiler warning appeared in the candidate object build.
- The four imports now have exactly the original symbol records, including
global undefined binding. Every other symbol record is unchanged.
- All six allocated sections retain identical contents, extents, alignment,
type and flags, including the NOBITS section's extent.
- All 2,010 relocation sites, types, symbol identities and addends are
unchanged. Comparison resolves symbol indexes because binding changes
can reorder the ELF symbol table.
- All 1,027 unit report records are unchanged. CHANS: fuzzy 99.4341%,
exact code 38,136/53,564 bytes, exact functions 222/233,
matched data 6,904/6,904 bytes.
- Independently compared all 222 exact functions against original
instruction streams, with zero differences.
- The two HMAC callers remain 64/64 and 119/119 instructions, diffs 0.
- Pool: identical 125/125 entries. Literal advisory: 233 functions,
40 arguments, no candidates, errors, or skips.
- Eight call destinations and 392 nonrelocated instruction words across
the two callers and four helpers agree with original DOL bytes.
- Final `WIBO_SJIS_MISSING_IMPORTS=1 ../.venv/bin/ninja all_source
build/43U/report.json build/43U/ok` passes; DOL SHA1 remains
`26116613f624061ba99c8d1a299aaa6efa85670d`. `git diff --check` passes.
Whole-object identity is intentionally not claimed: symbol bindings changed.
SHA256 before:
`f971cabf817dba7e5cb240df01e1e8f814bb0a973e357a594d031046a56e691b`.
SHA256 after:
`5bf3f4a0a404e2a574287c16de81d702a1402d9fca416455e84dc1df67c9eb76`.
Private reproducibility artifacts are under
`validation/chans-hmac-linkage-20261003/` in the workspace parent and
`/tmp/chans-hmac-linkage/`. No original binary or disassembly is committed.
This is a source declaration correction with no decompilation percentage gain.

View File

@@ -1,57 +0,0 @@
# CHANSVm immediate integer accumulation
Base: `a52b3390` on `agent/bittle/chans-scalar-contracts` (43U).
This isolated commit follows, but does not alter, the boolean-output correction.
## Correction
`VmLoadImmInteger` assembled bytes by repeatedly left-shifting a signed
64-bit accumulator. An eight-byte immediate beginning with 0x80 through
0xFF can overflow that signed shift on the final iteration. Use an unsigned
64-bit accumulator, then convert the final word to the existing signed
`vmInteger` argument of `CHANSVmSetInteger`.
The original helper at `0x81455D88` shifts and combines high/low 32-bit words
modulo 64 bits. It reads unsigned bytes in big-endian order. Short immediate
widths do not sign-extend: one-byte 0xFF is 255, not -1. The target tail call
preserves VM/object in r3/r4 and supplies high/low value words in r5/r6.
Step's two call sites supply counts 1, 2, 4, or 8 for immediate loads, and
1 for binary immediate operations. No negative-width caller was found.
Unsigned shifts are defined. The final out-of-range unsigned-to-signed
conversion is implementation-defined in C; configured MWCC probes verify
bit-preserving conversion for bit 63, all bits set, and dynamic input.
The dynamic conversion emits only a return instruction. Host GCC tests
independently verify the selected implementation's behavior. No universal
portable-C conversion claim is made.
## Verification
- Source-extracted baseline UBSan fails while assembling `80 00 00 00 00
00 00 00`. The candidate passes 315,813 cases: every combination of
0x00/0x7F/0x80/0xFF at widths 1/2/4/8, generated inputs, and zero width.
Tests check value bits, VM/object callback arguments, and propagated result.
- A bounded interpreter executes the original helper's 16 nonbranch-tail
instruction words, independently checked against the original DOL.
The tail branch destination is verified as `CHANSVmSetInteger`.
All 165,813 original-DOL cases agree with an independent big-endian
unsigned reference and with r3/r4/r5:r6 call contracts.
- These are focused host/helper-slice tests, not complete VM or Wii runtime
execution. Counts outside the observed 1/2/4/8 contract are not generally
validated; zero was checked as an additional no-read boundary.
- VmLoadImmInteger remains exact: 17/17 instructions, ctxdiff 0 differences.
- Entire CHANSVm.o remains byte-identical to both the preceding commit and
initial branch baseline, including code/data/symbols/relocations. SHA256:
`5bf3f4a0a404e2a574287c16de81d702a1402d9fca416455e84dc1df67c9eb76`.
- All 1,027 report units remain unchanged. All 222 exact functions were
independently compared with the original and have zero differences.
- Pool: 125/125. Literal advisory: 233 functions, 40 arguments, no
candidates/errors/skips. `git diff --check` passes.
- Full 43U `all_source`, report, and `ok` gate passes with existing cached
tooling. DOL SHA1: `26116613f624061ba99c8d1a299aaa6efa85670d`.
Artifacts: `/tmp/chans-step-abi/test_immediate.py`,
`check_immediate_original.py`, conversion probe, and build/test results.
No original binary or disassembly is committed.
GATE: source-width correctness correction; no fuzzy/exact/data/link gain.

View File

@@ -1,71 +0,0 @@
# CHANSVm string-index width correction
Baseline: `7b8dbf2c96aa9b4490df35932850c59886f76be3` in the prepared
`agent/bittle/chinese-code-width` leaf. Before editing, the owned CHANSVm source
was also identical to the available `origin/main` at `6619098e`. The earlier
Chinese investigation remains unchanged. Only CHANSVm.c and this log change.
## Correction
The SET_INDEX string path parsed into a `u64`, reconstructed that value through
`VM_S64_FROM_U64`, then cast it back to `u64` for the bound check. The macro's
signed 64-bit high-word left shift overflows when the parsed value has bit 63
set. For example, parsing "-1" reaches a signed shift of 4294967295 by 32.
Compare the original `u64` directly against the existing `0xFFFFFFFE` bound.
Remove the now-unused macro. The integer and floating paths are unchanged.
This removes undefined source behavior; it does not claim a change to the
current MWCC executable, a fuzzy gain, or a new exact function.
## Original evidence
- Original CHANSVmStep is at `0x81456354`, with extent `0x1394`.
- `0x814563B8` and `0x814563BC` establish the bound's high and low words as
zero and `0xFFFFFFFE`.
- The parsed-string check at `0x81456E90` through `0x81456EB4` reads the two
parsed words and performs an unsigned two-word comparison. Values greater
than the bound select the existing SET_INDEX error; accepted values forward
their low word as the index.
- These instruction words were checked directly against the original DOL,
independently of relocation matching. The DOL has the required SHA1 below.
- CHANSVmParseInt calls `strtoull` and stores its unsigned result. The local MSL
implementation (`strtoul.c`, lines 327–348) explicitly applies a negative sign
in unsigned width. Both helpers are already exact in the live report.
- Prior CHANSVm attempt logs were checked; the typed integer/float comparison
work did not address this signed reconstruction in the parsed-string path.
## Tests and measurements
- Baseline source-extracted UBSan harness fails on "-1" with signed left-shift
overflow. The candidate passes 300,028 parsed-value and unsigned-boundary
cases without a sanitizer error.
- Inputs include zero, `0xFFFFFFFE`, `0xFFFFFFFF`, `0x100000000`, signed-64
boundaries, maximum unsigned-64, negative decimal strings, parse failures,
and deterministic generated values. The unusual unsigned parsing of
"-18446744073709551615" to 1 remains accepted, matching the existing parser.
- A separate bounded interpreter executes the original DOL comparison slice
for 300,010 values, checking its error branch and accepted index against an
independent high-word/low-word bound reference. Every case passes.
- These are focused host/slice tests, not complete VM or Wii runtime tests.
The parser harness uses a UTF-16-to-ASCII shim and host `strtoull`; MSL's
negative-sign behavior was also checked in its local source.
- Entire compiled object, including all code, data and relocations, is
byte-identical before/after. SHA256:
`f971cabf817dba7e5cb240df01e1e8f814bb0a973e357a594d031046a56e691b`.
- Complete 1,027-unit report is unchanged. CHANSVmStep remains 96.98723%,
1,253/1,253 instructions. Unit fuzzy remains 99.4341%.
- Exact functions remain 222/233, each individually checked with ctxdiff:
zero differences. Exact code remains 38,136/53,564 bytes; data 6,904/6,904.
- Pool: 125/125 strings identical. Literal advisory: 233 functions, 40 arguments,
no candidates, skips or errors.
- Full 43U `all_source`, report and `ok` gates pass using the assigned wrapper
and WIBO_SJIS_MISSING_IMPORTS=1. `git diff --check` passes.
- DOL SHA1: `26116613f624061ba99c8d1a299aaa6efa85670d`.
Private local reproduction files are in `/tmp/chans-index-width/`, including
baseline/candidate sources and objects, test_width.py, check_original.py,
sanitizer output, original-address checks, pool/literal results and build logs.
No original binary or disassembly is committed. No header, metadata, compiler,
linking, other-region, remote, or register-allocation change was made.
GATE: source-width correctness fix; compiler output and all progress preserved.

View File

@@ -1,88 +0,0 @@
# CHANSVm packed-hex count rounding
Base: `a30b5cecb68f4549ef83565a567cc5dd7bd4c0de` (43U).
Leaf: `agent/bittle/chans-pack-union`.
## Retained source-width correction
The sizing and writing passes of `VmBlobPackCommon` both computed
`(count + 1) / 2` in signed 32-bit arithmetic for hexadecimal strings.
The existing parser accepts `H2147483647`, making the addition overflow.
Both sites now add in unsigned 32-bit width, convert the wrapped word to
`s32`, then perform the existing signed division.
This preserves the target's unusual boundary behavior. It does not change
`INT_MAX` into a positive rounded-up size. The original result is
`-1073741824`; the writing pass forwards its signed extension to the existing
`CHANSVmBlobHasSpace` check, which rejects negative sizes. All surrounding
count, size, allocation, and error checks are unchanged.
Unsigned addition is defined modulo 2^32. Converting an out-of-range `u32`
to `s32` is implementation-defined in C, not signed-overflow undefined
behavior. Separate MWCC probes confirm the configured 32-bit compiler's
bit-preserving conversion: `0x80000000` becomes `INT_MIN`, and `0xffffffff`
becomes -1. Its dynamic rounding probe emits the same add, arithmetic-shift,
and carry-add sequence as the original. The host GCC harness uses explicit
32-bit typedefs and independently confirms that conversion behavior.
This is not a claim of portable behavior for every possible C implementation.
## Original and prior-work evidence
- Original `VmBlobPackCommon`: address `0x81453670`, extent `0xA70`.
- Sizing-pass rounding: relative `+0x320` through `+0x330`.
- Writing-pass rounding and signed call argument: `+0x940` through `+0x954`.
- Those words agree directly with the original DOL, independently of the
extracted object's relocations.
- Earlier CHANS logs covered count validation, padding, parser locals,
declaration orders, loop structure, and source/getter types. No earlier
packed-hex `count + 1` wrap correction was found.
## Validation
- Source-extracted baseline arithmetic fails UBSan at `INT_MAX + 1`.
- Candidate passes 1,000,022 direct arithmetic inputs and 11 source-extracted
parser cases, including `H2147483647`, neighboring odd/even limits, zero,
ordinary counts, `H*` (-1), and the existing overflowing-digit rejection.
Star-derived string lengths include zero and the largest u32 byte lengths.
- Two bounded original-DOL instruction interpreters each pass 1,000,013
inputs against an independent widened-arithmetic reference, including
INT_MAX neighbors, negative boundaries, and generated nonnegative counts.
The second slice also verifies signed 64-bit argument extension.
- These are focused parser/arithmetic/slice tests, not complete VM or Wii
runtime tests. The parser is unchanged and is not generally proven free
from other arithmetic issues.
- Entire CHANSVm object is byte-identical before/after, including code,
data, symbols and relocations. SHA256:
`5bf3f4a0a404e2a574287c16de81d702a1402d9fca416455e84dc1df67c9eb76`.
- All 1,027 report units are unchanged. CHANS exact functions: 222/233;
exact code: 38,136/53,564; exact data: 6,904/6,904.
- All 222 objdiff-exact functions independently have identical original
instruction streams. PackCommon remains 97.949104%, 668/668 instructions;
CHANSVmStep remains 96.98723%, 1,253/1,253 instructions.
- Pool: 125/125 identical. Literal advisory: 233 functions, 40 arguments,
no candidates, errors, or skips. `git diff --check` passes.
- Final full 43U `all_source`, report, and `ok` gates pass. DOL SHA1:
`26116613f624061ba99c8d1a299aaa6efa85670d`.
- The initial final-build run stopped when an automatic BSTool refresh was
blocked. Its resume attempt found that the process had ended. The final
build used configure.py's supported explicit paths to the existing cached
compiler, binutils, DTK, objdiff, sjiswrap, and BSTool. No executable was
replaced and no download was needed. All 1,027 source objects were rebuilt.
- The final object and complete report remain identical to their fresh
baseline after that full rebuild.
GATE: source-width correctness correction; zero fuzzy, exact, data, or linking
metric changes. The unit remains NonMatching and no linking flags changed.
## Rejected separate scratch-buffer trial
Before the overflow change, one bounded trial replaced PackCommon's cast-based
scratch array with a union whose integer-width members were all used.
MWCC removed two scratch-clearing stores: 668 -> 666 instructions, fuzzy
97.949104% -> 97.500000%. The trial was fully restored; the restored whole
object was verified byte-identical before starting the overflow change.
No union change is retained, and no declaration or register sweep was run.
Reproduction artifacts are in `/tmp/chans-pack-rounding/` and
`/tmp/chans-pack-union/`. No original binary or disassembly is committed.

View File

@@ -1,79 +0,0 @@
# Address drag-width reconstruction, 2026-10-03 UTC
Base `e4a94492`, branch `agent/bittle/address-drag-reconstruction`, 43U only.
Only `src/scene/address/iplAddress.cpp` and this log changed. Headers, metadata,
linking flags, other worktrees and earlier attempt logs are untouched.
## Recovered behavior and source structure
The original movePane_onDrag null-text-box and null-name exits skip the 0.01f
text-width margin. The baseline incorrectly added that margin unconditionally.
This was visible in the original branch destinations and also documented in
older fz10 attempts, but the incomplete correction had not been retained.
The new typed inline GetDragNameWidth helper receives the text box and a reference
to the real friend record. It evaluates the record address before entering the
measurement path, checks the text box, then derives/checks the name address.
This recovers the target's two early-exit regions, delayed name-member address,
font calls, character-width loop, and successful-only margin. An empty but valid
name still receives the margin, as the target does. The existing unused GetWidth
call and per-character GetFont lookup remain present.
The text box lookup now spells out the root-pane FindPaneByName call already
used by layout::Object's wrapper. An explicit right-edge value preserves the
existing single-precision add, ratio multiply, and negation sequence; it does
not combine ratios, reassociate operations, or change the comparison. Together,
these source boundaries make the complete function instruction-exact.
## Attempts
- Read scene4, data-d7, sol-med and fz10 drag-width evidence before iterating.
- Moving only the margin to the measured branch improved 92.451614 -> 93.741936%.
The target's margin-first addition reached 93.80645%.
- Computing the typed friend-record reference before the guard reached 98.064514%.
- A nullable name-pointer helper reached 98.741936% but 156/155 instructions.
The friend-record-reference helper recovered 155/155 and 99.80645%.
- An explicit projected right-edge accumulator recovered the target FP register
lifetime and reached 99.870964%. Mutating the translation vector instead grew
the function and was rejected.
- Direct root-pane lookup resolved the last four receiver/literal register
operands, reaching 100.0%. No parameter or declaration sweep was used.
- No new assembly, use-site volatile, dummy storage, padding, uninitialized
values, compiler-option changes or linking experiments were introduced.
## Verification
Before -> after:
- movePane_onDrag: 92.451614 -> 100.0% objdiff; 153 -> 155 instructions against
target 155; ctxdiff diffs 0 across the whole 0x26C-byte function.
- Unit fuzzy: 99.69818 -> 99.89328%.
- Exact functions 97/101 -> 98/101; matched code 21236 -> 21856 / 23988 bytes.
- Data 1964/1964 (100%) and linked status unchanged.
- Fresh baseline/candidate object comparison: all 97 previously objdiff-exact
function streams are unchanged. Raw .data, .rodata, .sbss, .sdata, .sdata2 and
.ctors bytes/extents are unchanged.
- Pool: all 81 strings identical to target.
- Literal audit: 86 arguments checked across 100 functions, no candidates or
errors. FriendListCache::update is skipped for its pre-existing size mismatch.
- Full 1027-unit report has no exact-function/code/data/fuzzy regressions.
- Full 43U build and build/43U/ok passed. DOL SHA1 remains
`26116613f624061ba99c8d1a299aaa6efa85670d`.
Host behavior verification extracts the production helper and method bodies and
uses deterministic UI/controller/font stubs. With -fno-fast-math,
-ffp-contract=off and undefined-behavior/bounds sanitizers, all 200,000 geometry
cases agree bit-for-bit with an independent target-ordered FP reference. Coverage
includes 66,667 null-text-box cases, empty/nonempty UTF-16 names, page offsets,
varied projection widths, both clamp branches and comparison boundaries. Font
lookup/width/character-call counts are also checked. Embedded name arrays are
valid objects; invalid-record/null-name pointer execution and Wii runtime UI
behavior are not claimed.
Private evidence: `/tmp/address-drag-reconstruction/` contains baseline/final
reports and source objects, drag-final.ctx, pool/literal audits, full-build.log,
validate_drag.py and drag-tests.log, plus the rejected source experiments. No
retail assembly or binary is included in this commit.
GATE: movePane_onDrag exact, behavior correction verified, all prior exact/data
metrics preserved. Other unit remainders and linking remain open. Frozen for
independent parent validation.

View File

@@ -1,20 +0,0 @@
# AOSS WLAN connection argument contract
Base 9c7d87ab, 43U. This correction is separate from the key-material representation work.
AOSSConnectAndAwaitHost receives settings and config pointers but previously called AOSSi_WLANConnect through a false no-argument declaration. The actual callee takes a connection record and status output. In the original caller, incoming r3/r4 are forwarded untouched to the first call; the callee preserves r3/r4 and consumes both. The compiler happened to retain the same register contents despite the missing source arguments, hiding this defect behind exact generated code.
The local declaration now uses forward-declared struct AOSSConnection and struct AOSSConnectionStatus, matching the existing tags in AOSSLink.c. The wrapper explicitly passes settings and config. No shared header or AOSSLink.c edit. All three original outer callsites supply r3 = sp+0xb8 (settings) and r4 = s_accessPointConfig, matching the source caller expressions. No arguments are reordered or synthesized.
Validation:
- Configured/built 43U using the approved wibo wrapper and WIBO_SJIS_MISSING_IMPORTS=1
- AOSSConnectAndAwaitHost remains 60/60 instructions, ctxdiff zero
- Every code/data/relocation section, section header, and symbol record is byte-identical to baseline; only five compiler-generated anonymous local symbol spellings change in .strtab
- Full-project objdiff report unchanged: AOSS unit 97.71665% fuzzy, 16/21 exact, 6436 exact code bytes and 3928/3928 data bytes; no matching gain claimed
- Pool identical, 1/1 strings; literal audit checks 12 arguments across 19 functions, no candidates/errors; AOSS_Init_old and AOSSSendHelloRequest are skipped for their existing unequal sizes
- ASan/UBSan extracted-production wrapper harness passes 30,600 cases, asserting actual typed callee pointer identities, driver/startup failures, host readiness, cancellation, all retry boundaries and the original timeout behavior (cleanup and status clear, then return zero). No network calls occur; platform functions are controlled stubs
- LeakSanitizer disabled for ptrace restriction; address/undefined instrumentation enabled
- Full 43U build and ok gate pass; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d
- git diff --check passes
Private reproducible evidence: /tmp/aoss-key-call-contracts, with original caller/callee disassembly retained privately under /tmp/aoss-decrypt-audit.

View File

@@ -1,26 +0,0 @@
# AOSS contiguous key-material representation
Base candidate: 00b02c27 (the separate WLAN argument-contract correction). Original branch base: 9c7d87ab. 43U only.
## Evidence and focused change
The original decryptor copies two raw nonce bytes and eight access-point bytes into consecutive positions of s_packetState, then passes that base and length 10 to AOSSInitKeySchedule. The original hello sender builds the same key. The key-schedule helper actually indexes all ten bytes; its instruction stream and resolved calls match the source exactly.
Previously the caller passed keyNonce[2] with length sizeof(keyNonce)+sizeof(keyAddress), relying on indexing beyond the first array member. AOSSKeyMaterial now represents the complete key as named nonce[2] and address[8] members. s_packetState embeds this key object, followed by its unchanged payload[0x5e]. Each schedule call uses a const u8 byte view of the complete key object with sizeof(key), so the byte span belongs to the object being viewed.
Only the two nonce copies, two address copies, and two key-schedule calls in AOSSDecryptMessage/AOSSSendHelloRequest are updated. No other packet representation, algorithm, checksum, byte order, allocation, validation, state transition, header or protocol change. No added storage, alignment, padding or assembly.
## Layout and gates
- Key size 10, nonce offset 0, address offset 2, packet payload offset 10, packet-state size 104, natural byte alignment unchanged
- Entire compiled AOSS.o is byte-identical to 00b02c27, including all payloads, symbol spellings and relocations
- Full-project objdiff unchanged from branch baseline: unit 97.71665% fuzzy, 16/21 exact, 6436 exact code bytes, 3928/3928 data bytes; no matching gain claimed
- DecryptMessage remains 97.74143%, 321/321 instructions and the same 87 allocation/operand differences
- Pool identical, 1/1; literal-reference audit still checks 12 arguments in 19 functions without candidates/errors, with the same two unequal-size skips (AOSS_Init_old and AOSSSendHelloRequest)
- ASan/UBSan extracted-production harness passes 68,423 cases: all 65,536 nonce byte combinations with varied addresses against an independent schedule model; every valid payload length 0..0x5c0; checksum/allocation/manufacturer/control error paths; 1,024 hello sender encryption round trips. It asserts key layout/content, unchanged trailing payload, output copy/checksum order and allocation cleanup. The production decryptor, sender, key scheduling, CRC table and name check execute; manufacturer scrambling and transport are controlled stubs, with no network activity
- The separate 30,600-case WLAN pointer/host-wait validator is rerun and passes
- LeakSanitizer disabled for ptrace restriction; address and undefined-behavior instrumentation enabled
- Full 43U build and ok gate pass; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d
- git diff --check passes
Private reproducible validators, reports and build logs: /tmp/aoss-key-call-contracts. Original disassembly remains private in /tmp/aoss-decrypt-audit.

View File

@@ -1,28 +0,0 @@
# AOSS scan-result output-slot contract
Base: bf8ebfa3; 43U. One source line changed in AOSSLink.c.
## Evidence
Both actual callers are in AOSS.c. They declare AOSSi_WLANGetBSSList(void**) and pass &s_accessPointList, whose type is void*. The former definition instead accepted AOSSAccessPointList**, a different cross-translation-unit function type and an incompatible lvalue for publishing through that void* slot.
The definition now accepts void**. Internal list allocation, record types, parsing, callbacks, retries and ownership are unchanged. Assigning the typed internal list to *output now performs the ordinary C object-pointer-to-void* conversion. No AOSS.c/header or protocol change.
The read-only scan audit found no missing behavior: 227/227 instructions, 25 differences explained by real counter/descriptor register allocation plus independent constant/channel-store scheduling. Count and descriptor fields are unsigned halfwords; descriptor length scales by two. Scan capacity is 0x3200 bytes, output records are 84 bytes, and all 12 rate-mask entries fit the 16-byte rate array. Output remains published even if later cleanup/unlock failure changes the return value, as the target and callers require. No missing validation or unused-field initialization was invented.
Call-boundary verification pins actual ABI inputs, not just names or freely renamed registers: WD_Startup consumes flags in r3; WD_GetInfo the info pointer in r3; WD_Scan the scan pointer, buffer and length in r3/r4/r5; NCDUnlockWirelessDriver the saved positive driver ID in r3; the release callback receives 0/buffer/0 in r3/r4/r5. NCDLockWirelessDriver and WD_Cleanup genuinely take no caller arguments. Implementations were inspected, and all nine named AOSS/NCD/WD helper bodies additionally compare exactly with original instructions and resolved relocation destinations.
## Gates
- Baseline configured with the 43U wibo wrapper and built with WIBO_SJIS_MISSING_IMPORTS=1
- Entire AOSSLink.o is byte-identical before/after, including payload, symbols and relocations
- Full-project objdiff reports identical; no matching gain claimed
- Unit remains 99.007286% fuzzy, 12/14 exact functions, 668 exact code bytes, 2432/2432 data bytes
- GetBSSList remains 98.48018%, 227/227 instructions, same 25 differences
- Pool empty and identical; literal audit examines all 14 functions with no candidates/errors/skips (zero string arguments)
- ASan/UBSan host harness uses the extracted production scan/allocation/free functions and actual source structure declarations. Passes 18,825 scenarios: every 12-bit rate mask with all four mode-bit values, 200 variable-length descriptors exactly filling scan capacity, SSID width boundaries, callback/driver/allocation failures, retry limits, cancellation, partial-scan status, publication followed by cleanup/unlock failures, and actual void* output-slot canaries. Expected results and published fields are checked independently
- LeakSanitizer disabled for the execution environment's ptrace restriction; address and undefined-behavior instrumentation remain enabled
- Full build, build/43U/ok and git diff --check pass
- DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d
Private evidence and reproducible host validator: /tmp/aoss-scan-output-contract. Earlier original disassembly/call evidence remains private in /tmp/aoss-bss-audit.

View File

@@ -1,26 +0,0 @@
# CDB crypt-buffer ownership contract
Base: 20ba34a8, 43U. Focused source correction after the read-only CDBRecordEncrypt audit found only register-allocation differences in that function.
## Evidence and change
CDBRecord.c already declares CDBCryptBufAllocate and CDBCryptBufFree with CDBCryptBuf** parameters. Its callers supply the address of the record's crypt-buffer pointer slot. CDBCrypt.c instead declared CDBCryptBuf* and accessed buffer32[0] as a u32-encoded pointer, producing incompatible cross-translation-unit function types and describing the caller's pointer slot as an entire crypt-buffer object.
Both definitions now take CDBCryptBuf** and use direct typed pointer loads/stores. Allocation assigns the pool pointer; free compares the owned pointer and clears the slot to NULL. The existing pool-index expression, flag update order, diagnostics and failure behavior are retained. The obsolete placeholder comment is removed. No header, payload layout, pool extent, Encrypt implementation, or linking change.
## Validation
- Configure: `python3 configure.py --version 43U --wrapper ../toolchain/wibo-build/wibo`
- Build: `WIBO_SJIS_MISSING_IMPORTS=1 ../.venv/bin/ninja`
- Entire compiled CDBCrypt.o is byte-identical to the baseline, including all code/data, symbols and relocations
- CDBCryptBufAllocate: 36/36 instructions, ctxdiff zero
- CDBCryptBufFree: 33/33 instructions, ctxdiff zero
- Unit remains 100% fuzzy, 3/3 exact functions, 296/296 code bytes and 80/80 data bytes
- Full-project before/after objdiff reports are identical; no metric gain is claimed
- Pool identical: 2/2 strings; literal-reference audit: 2 arguments across all 3 functions, no candidates/errors/skips
- Host test compiles the production source with the actual CDBCryptBuf layout and minimal platform/error stubs. AddressSanitizer and UBSan pass 50,036 ownership transitions, including every combination of six representative allocation flags and null/owned/foreign pointer slots, 10,000 randomized state cases, and 10,000 allocate/reallocate/free/refree cycles. Checks cover pointer-slot canaries, complete payload preservation, allocation flag, return value and diagnostic count
- LeakSanitizer is disabled because it cannot run under this execution environment's ptrace; the harness makes no heap allocations. Address and undefined-behavior instrumentation remain enabled
- Full 43U build and build/43U/ok pass; DOL SHA1 is 26116613f624061ba99c8d1a299aaa6efa85670d
- git diff --check passes
Private reproducible evidence is in /tmp/cdb-buffer-ownership (baseline object, full reports, host validator and build log). Original objects/disassembly from the preceding read-only audit remain private under /tmp/cdb-record-encrypt-audit.

View File

@@ -1,55 +0,0 @@
# Bpmf consumed-count return contract, 2026-10-03
Base: 029dd7ea on the Chinese source-reconstruction leaf. Previous candidates
are unchanged. Owned source: zi8match.c / Zi8GetBpmfPhonetic only.
This is type-correctness reconstruction with zero percentage gain.
## Evidence and change
All three source callers declare Zi8GetBpmfPhonetic as returning ziU8:
zi81key.c, zi8space.c and zprepare.c. The definition instead returned ziS32
and used a ziU32 resultCount. Its result is the consumed Bopomofo character
count: the four sequential initial/medial/final/tone stages can increment it
at most four times, and all failure paths return zero. There is no negative
result or full-word quantity to communicate.
Changing only the return type to ziU8 introduced return narrowing and made
the previously exact function nonexact (98.64078%, exact count8 ->7). That
isolated trial was rejected. Recovering the counter's own byte type along
with the byte return restored the entire309-instruction exact function.
The retained two-line change therefore aligns all caller declarations and
the bounded consumed-count representation without explicit casts or masks.
No caller, shared header, parameter or control flow is changed.
## Other remaining-helper inspection
A fresh Zi8GetPyPhonetic audit found718/718 instructions. One fixed bijection
among its six differing callee-saved registers makes every instruction,
branch destination, call and relocation identical. It remains nonexact;
the register map is diagnostic only and was not encoded in source.
Zi8GetPyFinal remains53/53 instructions with eight differences in two table
row-address calculations. Each computes the same table +8*row address into
the same result register, uses identical byte-column offsets4 and5, and has
no live-out dependence on the differing temporary. No type/access/flow defect
was found in either nonexact helper, and no allocation sweep was performed.
## Validation
Baseline object: /tmp/ezi-pinyin-contract/baseline.o.
Fresh full report: /tmp/ezi-bpmf-byte-full-report.json.
Full build: /tmp/ezi-bpmf-byte-full-build.log.
Detailed checks: /tmp/ezi-bpmf-byte-verification.txt.
All1027 full-report unit measures are unchanged. zi8match remains99.53004%
fuzzy,8/10 exact functions,5172/8256 exact code and728/728 exact data.
All emitted .text/.rodata/extab/extabindex lengths, payload bytes and canonical
relocations are baseline-identical. No new exact function or percentage gain
is claimed. Each of the eight existing exact functions has ctxdiff diffs0
and identical instruction counts; Zi8GetBpmfPhonetic remains309/309.
Pool first: identical and empty. Full43U build passes with the approved
wrapper and WIBO_SJIS_MISSING_IMPORTS=1. DOL SHA1:
26116613f624061ba99c8d1a299aaa6efa85670d.
git diff --check passes. No remote, linking, shared-header, metadata, assembly,
volatile, artificial storage, forced-register or undefined-value change.

View File

@@ -1,75 +0,0 @@
# Chinese user-dictionary address contract, 2026-10-03
Base: `5dcbc437`; branch `agent/bittle/chinese-uwd-address-contract`.
Changed source: `libs/RVLMiddleware/eZiText/src/clib/zi8cgetc.c` only.
This is a type-correctness correction with no matching-percentage gain.
## Source and target evidence
The exact `Zi8GetZHuwdPtr` definition in `zi8ZHuwd.c` returns `ziU32` and
writes a native `ziU32` address through its first argument. It clears that
word on failure, or stores the selected dictionary address and adds its
eight-byte header on success. Its second output is a halfword entry count;
its third argument is the workspace. Both return paths produce zero or one.
The original objects contain exactly two executable references, from
`Zi8Get1KeyPressCandidates` and `zi8InternalGetZH`, plus the callee's own
exception-index reference. The accepted one-key source already uses the
definition's native address representation and explicitly narrows status.
The Chinese caller passes its stack word at 0x10C in r3, its halfword at
0x9A in r4, and the workspace in r5. After the call it explicitly narrows
the returned status to a byte. It loads the address word to decode bytes
at offsets one and two, checks a flag through the same address, and advances
that address by three for each entry. The address output does not escape
anywhere else.
The correction agrees with the real definition: the local extern returns
`ziU32` and takes `ziU32*`; `userEntriesAddress` has that native unsigned
word type. The three byte reads use explicit byte-pointer views, the loop
keeps its increment by three, and the status test has an explicit byte cast.
No additional local, helper, shared-header change, control-flow change or
unrelated prototype correction is included.
## Validation
Fresh baseline: `/tmp/ezi-chinese-uwd-baseline.json`.
Fresh final report: `/tmp/ezi-chinese-uwd-final.json`.
Full build: `/tmp/ezi-chinese-uwd-full-build.log`.
Detailed checks: `/tmp/ezi-chinese-uwd-verification.txt`.
All 1027 complete source objects are byte-identical to the fresh baseline,
including `zi8cgetc.o` and its symbol/relocation metadata. The entire decoded
1027-unit report is identical. Unit fuzzy remains 96.65468%; engine fuzzy
remains 96.27482%, with 10676/10676 instructions. Exact functions remain 5/8,
exact code 4168/47816 bytes, and matched data 144/536 bytes.
Pool checked first: identical and empty. All five exact functions retain
ctxdiff diffs zero: Zi8SetFindCand 50 instructions, ZiGetNextPhonetic 31,
ZiPartialMatch 51, Zi8NewMatchPhonetic 755, Zi8GetChineseCandidates 155.
The existing advisory flow audit still agrees on 168 ordered calls, 1594
mapped direct branches and all 98 generated switch destinations. This
normalization is diagnostic, not an exact-match claim for the engine.
Full 43U build passes with the approved wrapper and
`WIBO_SJIS_MISSING_IMPORTS=1`. DOL SHA1 remains
`26116613f624061ba99c8d1a299aaa6efa85670d`. `git diff --check` passes.
No return-width experiments, artificial storage, assembly, volatile use,
linking changes or remote operations were performed.
## Read-only remainder review
Both large engines were compared with current main before editing. Their
sources were unchanged. Chinese's remaining normalized instruction gaps
are return-copy placement, the already-tested component-cursor reload,
and the two previously parked paired-phonetic halfword conversions. Those
experiments were not repeated.
Alpha's early initialized dictionary index remains necessary in the
reconstructed source: highlighted-output capacity exits reach optional
dictionary-count finalization before the dictionary loop. The target's
unused workspace store supplies no demonstrated source lifetime. Previous
attempts already cover separate/direct exclusion results, dictionary-kind
switches, candidate-skip order, updated-count comparisons and prefix append
forms. This pass found no new supported alpha lifetime or control-flow
representation to trial, and left alpha unchanged.

View File

@@ -1,78 +0,0 @@
# Conversion table-address contract, 2026-10-03
Base: 20ba34a8. Owned source: zconvert.c only. This candidate corrects a
cross-unit declaration; it has no percentage gain.
## Definition-backed correction
zaddress.c defines Zi8GetTableAddress as returning ziU32. It forwards the
ziU32 result of Zi8GetTableData, whose address case explicitly converts the
computed dictionary pointer to an integer address. Its target wrapper
forwards the full register result without a byte or halfword narrowing.
zconvert.c instead declared the same function as returning ziPtr. Correct
that local declaration to ziU32 and explicitly convert the returned address
at the three existing table-pointer assignments: ziU8* for UC2WC, and
ziConversionTable* for WC2UC and UC2Key. These are the only four source-line
changes. No callee, shared header, lookup representation or control flow is
changed.
## Read-only UC2Key investigation
The original remaining function is 207 instructions / 828 bytes, with 18
register-operand differences. Exchanging the two diagnostic work/key register
names makes every instruction, branch destination, memory operand, call and
relocation annotation identical. The mapping is only used by the audit and
is not expressed in source.
The existing packed representation agrees with target accesses:
- Serialized header count is a big-endian byte pair at offsets 0 and 1.
- Serialized entries have an eight-byte stride. First/last/value are byte
pairs at offsets 0/2/6; the intervening flags pair is not read here.
- A ranged mapped-key result is another big-endian byte pair, reached via
header + 8 + entry value + 2 * (character - first).
- The native fallback range instead uses halfword first/last fields at 0/2
and a word pointer-or-character union at 4. A singleton explicitly keeps
the low byte of the word; mapped keys use native halfword loads.
- The native default object is exactly 32 zero bytes, with no target data
content or relocation supporting a different field layout.
The declared halfword result is also correct. The original reference scan
finds only three executable callers plus the function's exception-index
reference. PUD and UWD pass a byte character and narrow the return to a
halfword before comparing their halfword pattern. WC2Key forwards the result
without additional narrowing. The user-key helper definition likewise
returns a halfword, including the EFFx key range. GetTableCount's declaration
already agrees with its halfword-returning definition and target narrowing.
Prior fz2/fz21 attempts already cover const views, key widths, pointer/local
lifetimes, result initialization, expression grouping, and declaration order.
No new packed-width or control-flow defect was found. No allocation trial
was repeated.
## Verification
Fresh configure and baseline full build used 43U, the approved wibo wrapper,
and WIBO_SJIS_MISSING_IMPORTS=1. Pool checked first: identical and empty.
After the four-line correction, all 1,027 source objects are entirely
byte-identical to their baseline hashes, and the complete 1,027-unit report
is identical. The owned .text, .rodata, extab and extabindex payloads and
canonical relocations were additionally compared explicitly.
Unchanged unit: 99.83696% fuzzy, 3/4 exact functions, 1,380/2,208 exact code
bytes, and 112/112 exact data bytes. UC2Key remains 99.565216%.
All existing exact functions retain ctxdiff zero differences:
UC2WC 124 instructions; WC2UC 199; WC2Key 22.
Final full 43U build passes. DOL SHA1:
26116613f624061ba99c8d1a299aaa6efa85670d.
git diff --check passes. No assembly, artificial storage, volatile, metadata,
linking flags, shared-header edits, other-region builds or remote writes.
Private local verification artifacts:
- /tmp/ezi-conversion-baseline.json
- /tmp/ezi-conversion-final-report.json
- /tmp/ezi-conversion-final-build.log
- /tmp/ezi-conversion-verification.txt
- /tmp/ezi-conversion-caller-audit.txt

View File

@@ -1,51 +0,0 @@
# Korean empty-context flow recovery, 2026-10-03
Base: 1fa33882; branch agent/bittle/korean-candidate-reconstruction.
Owned source: zkokeyp.c / Zi8GetKOcandidates only.
## Target evidence
The first context-length test at target function+0x158 sends an empty current
word directly to+0x730, the input-length/key-table scan setup. The compiled
source instead sent this case to its+0x6C8, the prefix-search result copy and
candidate cleanup. That block corresponds to target+0x6BC, which is reached
only after a nonempty context lookup attempt or word-table search.
Added an explicit empty-context guard to a label immediately before the
existing input-length check. The nonempty prefix-search paths still enter
search_table and perform the original result/candidate cleanup. The change
recovers the target control-flow edge without moving any body or introducing
storage, helper calls, or artificial register constraints. The old edge did
not necessarily change visible output for initialized empty context; this
is a target-flow correction, not a claim of a newly demonstrated user bug.
## Validation
Fresh baseline: /tmp/ezi-korean-recon-baseline.json.
Fresh final report: /tmp/ezi-korean-flow-full-report.json.
Full build: /tmp/ezi-korean-flow-full-build.log.
Detailed gates: /tmp/ezi-korean-flow-verification.txt.
Zi8GetKOcandidates: 97.96712% ->97.97459%.
Unit fuzzy: 98.65385% ->98.65769%.
Exact functions remain1/7, exact code332/5200, matched data96/180.
All1027 units were checked: the unit fuzzy gain is the only changed measure,
with no code/data/function or fuzzy regressions. No new exact function claimed.
The source object differs from its preserved baseline at exactly one .text
payload byte, the corrected branch displacement. All section sizes and all
canonical relocation tuples remain unchanged. .data40, extab56 and
extabindex84 are byte-identical to baseline. The unit's existing exact
Zi8_81483118 remains83/83 instructions and ctxdiff diffs0, with its exact
10-entry generated switch table unchanged.
Pool first: identical and empty. Main still673/669 instructions; the known
extra zero materialization, two lookup-result narrowings and return-value
move remain. All92 mapped direct main branches now preserve their target
destinations; the17 ordered helper calls agree. The filter's43 direct branches
also agree. These are advisory correspondence checks, not an exactness claim.
Full43U build passes with the approved wrapper and WIBO_SJIS_MISSING_IMPORTS=1.
DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d.
git diff --check passes. No header, metadata, linking, remote, assembly,
volatile, dummy-storage or forced-register changes.

View File

@@ -1,76 +0,0 @@
# Korean lookup halfword contract, 2026-10-03
Parent: dea3851e; its empty-context correction is unchanged.
Owned source: zkokeyp.c / Zi8_8148302C and its two local callers.
## Recovered type boundary
The lookup traverses a table whose count is ziU16, comparing and addressing
records through a halfword index, and returns either that index or0xFFFF.
For countN<=65535, successful indexes are0..N-1. The loop exits atN; a
halfword index cannot wrap on any traversed iteration. There is no need for
a full-word index or return value in this contract.
Both callers store the result into the halfword search.keyIndex. The target
stores the returned register directly through the halfword store. The first
caller then narrows for its assignment-value comparison, while the second
reloads the halfword for comparison. The current full-word declaration made
MWCC emit an additional narrowing before both stores.
Recovered the helper's ziU16 return and ziU16 loop index together, then used
the typed index directly in the loop condition and nine-byte address
expressions. The old explicit masks were the reconstruction of those same
halfword promotions while the local had the wrong full-word type. They are
not stripped from a full-word value or replaced by register constraints.
The resulting helper body is byte-for-byte identical to its previous body,
including its59 instructions and resolved calls. This demonstrates that the
same lookup operations and return representation are preserved while its
callers recover the target halfword assignment boundary. Both source callers
are in this unit. A scan of all extracted target objects found the same two
text references and only the helper's own extabindex reference otherwise.
No shared declaration or header changes are needed.
## Separate trials
A native unsigned-int return alone and explicit caller-store casts were
codegen-neutral and were not retained. The coherent halfword index/return
pair is the sole selected candidate. No old Chinese ABI experiment or
arbitrary declaration/register sweep was repeated.
## Validation
Baseline: /tmp/ezi-korean-flow-full-report.json.
Fresh full report: /tmp/ezi-korean-lookup-full-report.json.
Full build: /tmp/ezi-korean-lookup-full-build.log.
Detailed gates: /tmp/ezi-korean-lookup-verification.txt.
Zi8GetKOcandidates: 97.97459% ->98.146484%.
Unit fuzzy: 98.65769% ->98.746155%.
Relative to initial1fa33882, unit98.65385% ->98.746155%.
Exact functions remain1/7, exact code332/5200, matched data96/180.
All1027 unit measures and all per-function fuzzy scores were checked: the
Korean unit/main-function gains are the only metric changes, with no
regressions. No new exact function or complete unit is claimed.
Every other function's disassembly is baseline-identical, including the
changed lookup helper. The existing exact packing helper remains83/83
instructions and ctxdiff diffs0. Main shrinks673 ->671 instructions versus
target669, from0xA84 to0xA7C versus target0xA74. Its0x60 frame is preserved.
The remaining normalized differences are one zero materialization and one
call-result move; no further width or flow difference is identified.
.data40 and extab56 retain identical payloads and canonical relocations.
The already-unmatched84-byte extabindex changes only its main-function size
byte at0x4F,0x84 ->0x7C; its score remains97.61904%, and exact-data accounting
is unchanged. No real data object or section extent was changed.
Pool first: identical and empty. All92 mapped main branches preserve their
corrected target destinations; all17 helper calls correspond. An associative,
register-value-aware advisory audit pairs all163 store/call/branch effects
without differences. These checks are not formal equivalence or exactness
claims. Full43U build passes with the approved wrapper and
WIBO_SJIS_MISSING_IMPORTS=1. DOL SHA1:
26116613f624061ba99c8d1a299aaa6efa85670d.
git diff --check passes. No linking, remote, header, assembly, volatile,
dummy-storage, undefined-value or forced-register change.

View File

@@ -1,96 +0,0 @@
# One-key call and parameter contracts, 2026-10-03
Base: 674722c1; branch agent/bittle/onekey-contract-reconstruction.
Owned source: zi81key.c only. This is source-type correctness work with no
percentage gain. No callee implementation or shared header was changed.
## Retained, definition-backed boundaries
- Replaced the private ziGetParam replica with the existing shared type.
The old replica's bytes at 0x20/0x21/0x22 were named
wordCandidates/count/letters. The established shared type names those
count/letters/completion. All accesses were renamed by their offsets;
no field was moved or read/written at a different address. The unused last
word retains the same target size. Dispatcher return declarations and the
two public candidate-count return types now agree on their byte/full-word
roles, respectively.
- Added the actual _Zi8GetCandidates and _Zi8CheckCandidates prototypes,
using ziGetParam pointers. Their explicit byte-result handling is preserved.
- Recovered Zi8Ord2Ord's actual ziU16 return together with the local duplicate
helper's ziU16 ordinal parameter. Ordinary typed uses replace the explicit
halfword masks of the former full-word local. Correcting only the external
return lost the exact helper; this coherent pair preserves all 50 of its
instructions and every caller instruction.
- Zi8GetPInfo and Zi8GetZInfo actually accept a ziU32 phonetic code and return
ziU32. Corrected their local declarations; the existing caller's explicit
byte result conversion remains.
- Added the actual Py/Bpmf phonetic prototypes. This exposed two scratch
arrays declared as 32 bytes despite receiving 16 halfword outputs. They
are now 16-element ziU16 arrays, preserving their 32-byte extents. The
candidate output buffer is likewise 16 ziWChars instead of 32 bytes plus
a cast. No new storage or alignment directive was added.
- Zi8GetZHuwdPtr writes a native ziU32 address through its first parameter.
Its local declaration and address-taken receiving variable now use that
actual type. Byte decoding uses an explicit view of userEntriesAddress;
address stepping remains three bytes. This removes the incompatible
pointer-to-pointer/integer-output contract without an extra temporary.
- Zi8GetTableAddress, Zi8Memset and Zi8InitDupWordBuf local declarations now
agree with their actual definitions. The parameter object is cleared
through the memset callee's byte view.
- Zi8ZHCheckSpelling now agrees with its caller in zi8alpha.c: byte Boolean
return, byte input count, and opaque workspace pointer. Its result was
already a byte; removing the input's redundant full-word masks preserves
the entire existing exact body.
The authoritative definitions are in zi8getc2.c, zi8misc.c, zi8cinfo.c,
zi8match.c and zi8ZHuwd.c. The public count-return declarations are in
zi8getc2.c; the spelling-check declaration is in zi8alpha.c. Only the owned
file was edited. The private option/work views remain in place; this is not
an attempt to consolidate every library type or repair every declaration.
## Isolated trials
- PInfo/ZInfo actual declaration pair: neutral
- Bare Py/Bpmf prototypes: compile error exposing byte-array/halfword-pointer
disagreement; fixed by correctly typed same-size output buffers
- Ord2Ord return only: duplicate helper 100 -> 98.8%; rejected
- Ord2Ord return plus typed ordinal: original exact helper restored, neutral
- Shared request type and offset-preserving field names: neutral
- Typed dispatcher prototypes with shared request type: neutral
- Phonetic and candidate halfword output buffers: neutral
- Native user-dictionary address contract: neutral
- Public return/input boundaries: neutral
- Final retained combined contracts: all code/data and metrics unchanged
Other coherent local spelling/alternate-phonetic parameter-width trials were
neutral and are not included without an external declaration disagreement.
The PUD return/caller-byte trial on the new baseline dropped unit fuzzy to
97.782295% and exact data 1280 -> 1232; it was rejected and is not included.
No blanket byte-cast, declaration-order or register-allocation sweep was used.
## Verification
Baseline report: /tmp/ezi-onekey-contract-baseline.json.
Baseline object: /tmp/ezi-onekey-contract/baseline.o.
Final report: /tmp/ezi-onekey-focused-full-report.json.
Full build: /tmp/ezi-onekey-focused-final-build.log.
Detailed gates: /tmp/ezi-onekey-focused-verification.txt.
All 1027 unit measures are unchanged. Unit fuzzy remains 98.23523%; main
candidate engine remains 96.41927%. Exact functions remain 5/9, exact code
3952/21460, and matched data 1280/1388. No new exact function or percentage
gain is claimed.
All owned emitted sections have baseline-identical lengths, payloads and
canonical relocations: .text 21496, .rodata 1152, .data 44, .sdata2 8,
extab 72 and extabindex 108. All nine functions have baseline-identical
disassembly, not only equivalent scores. Each of the five existing exact
functions still has ctxdiff diffs 0 and identical instruction counts:
Zi8IsMatch1Key 97, MatchAltSound1Key 341, Zi8SetFindCand 50,
ZiIsSupportedPhonetic 81, Zi8ZHCheckSpelling 419.
Pool first: identical and empty. Full 43U build passes with the approved
wrapper and WIBO_SJIS_MISSING_IMPORTS=1. DOL SHA1:
26116613f624061ba99c8d1a299aaa6efa85670d.
git diff --check passes. No linking, remote, metadata, new assembly, volatile
workaround, dummy storage, undefined value or forced-register change.

View File

@@ -1,51 +0,0 @@
# PUD byte-return producer contract, 2026-10-03
Base: a894ff5c; branch agent/bittle/pud-return-contract.
Owned source: zi8pud2.c only. The copied cache was refreshed by a configured
full 43U build before recording the baseline. No caller or header changed.
## Producer and caller evidence
Every Zi8MatchPUDdata_ZHS exit returns zero, one, or an explicitly byte-cast
copied count. Zi8_8147FD7C forwards that result directly. Zi8MatchPUDdata
receives it, tests its byte value, and returns it; it never consumes any
higher result bits. The target wrapper retains exactly this data flow.
All external callers use byte-return declarations: zi8alpha.c and zi81key.c
for Zi8MatchPUDdata, and zi8cgetc.c for Zi8MatchPUDdata_ZHS. The previously
attempted caller-side full-word corrections were therefore based on a
misreconstructed producer chain rather than a demonstrated wide result.
Recovered ziU8 returns for all three functions and their local forward
declaration, plus ziU8 for the wrapper result local. Its test now uses the
typed byte directly. The explicit cast of copied in the actual producer
remains. Changing the coherent chain preserves the complete compiled object;
no compensating caller masks, local aliases, storage or register constraints
are required.
## Validation
Baseline report: /tmp/ezi-pud-baseline.json.
Baseline object: /tmp/ezi-pud-return-contract/baseline.o.
Final report: /tmp/ezi-pud-return-full-report.json.
Full build: /tmp/ezi-pud-return-full-build.log.
Detailed gates: /tmp/ezi-pud-return-verification.txt.
The complete zi8pud2.o file is byte-identical to baseline, including symbol
strings. Every function's disassembly is unchanged. All 1027 full-report
unit measures are unchanged: unit fuzzy 98.88764%, ZHS 98.32204%, exact
functions 6/7, exact code 720/2136 and exact data 48/120. This is a contract
correction, not a percentage gain or a new exact function.
All six existing exact functions retain ctxdiff diffs 0 and identical counts:
ZiIsPhoneticChar 16, ZiGetZHWordSize 31, Zi8CopyZHSpelling 33,
ZADP_Zi8SetPDremoveOpt 21, Zi8MatchPUDdata 50, Zi8_8147FD7C 29.
The unmatched producer remains 349/354 instructions. Allocated section sizes,
payloads and canonical relocations are unchanged: .text 2116, extab 48,
extabindex 72.
Pool first: identical and empty. Full 43U build passes with the approved
wrapper and WIBO_SJIS_MISSING_IMPORTS=1. DOL SHA1:
26116613f624061ba99c8d1a299aaa6efa85670d.
git diff --check passes. No remote, linking, metadata, header, caller,
assembly, volatile, dummy-storage or undefined-value change.

View File

@@ -1,77 +0,0 @@
# PUD packed-header halfword decoding, 2026-10-03
Parent: a71dfa9c; its byte-return correction is unchanged.
Owned source: two expressions in zi8pud2.c / Zi8MatchPUDdata_ZHS.
## Recovered arithmetic and widths
The eight-byte PUD section record contains two-byte big-endian count and
offset fields. The target separately promotes each of their four component
bytes through a halfword boundary before shifting or adding. The source
previously expressed plain byte arithmetic and omitted those four target
conversions.
Restored explicit ziU16 promotions for count[0], count[1], offset[0] and
offset[1]. The offset is now decoded as one grouped big-endian value before
adding the table base. This reproduces the target's base/high/low load and
addition order, without a new local, helper, casted memory access or storage.
Bounded isolated trials, all retaining 6 exact functions and 48 exact data:
- Halfword promotions with the existing offset association:
ZHS 98.52542%, unit 99.02247%
- Conventional grouped high/low offset sum:
ZHS 99.717514%, unit 99.81274%; selected
- Grouped low/high offset sum:
ZHS 99.10452%, unit 99.406364%; rejected
- Grouped multiplication form:
ZHS 99.10452%, unit 99.406364%; rejected
All 65,536 possible packed values preserve the decoded count. Another
524,288 offset/base combinations, covering eight bases including 32-bit
wrap boundaries for every packed value, preserve the computed address.
These arithmetic tests supplement the target instruction correspondence.
## Remaining workspace snapshot
The target stores its incoming workspace pointer once into frame 0x24 at
function +0x3C. A width-aware access and address-provenance audit finds no
read, overlapping use, or address escape for that slot. The workspace stays
in its existing saved register. The only ordinary local whose address is
passed to a helper is the halfword at frame 0x0E. Save/restore addresses the
separate upper frame region. No source-visible distinct alias role was found.
That single dead store remains absent. No unused local, dummy assignment,
padding, volatile or forced spill was added to manufacture it.
## Validation
Fresh final report: /tmp/ezi-pud-packed-full-report.json.
Full build: /tmp/ezi-pud-packed-full-build.log.
Detailed gates: /tmp/ezi-pud-packed-verification.txt.
Snapshot audit: /tmp/ezi-pud-work-snapshot-audit.txt.
Zi8MatchPUDdata_ZHS: 98.32204% -> 99.717514%.
Unit fuzzy: 98.88764% -> 99.81274%, about 19.76 weighted bytes gained.
Exact functions remain 6/7, exact code 720/2136, exact data 48/120.
All 1027 units and their per-function fuzzy scores were checked with no
regressions; this unit/producer improvement is the only measure change.
Producer instructions: 349 -> 353 versus target 354.
Producer size: 0x574 -> 0x584 versus target 0x588; frame remains 0x60.
After accounting solely for the missing dead store and its four-byte branch
destination displacement, every remaining instruction is identical, including
registers, immediates, calls and memory operands. All 65 direct branches and
13 calls correspond. This is not an exact match: the missing instruction
and function extent are explicitly retained as unresolved.
All six existing exact functions retain ctxdiff diffs 0 and identical counts.
The 48-byte extab is baseline-identical. The already-unmatched 72-byte
extabindex changes only the producer extent byte at 0x2B, 0x74 -> 0x84;
canonical relocations and its 98.61111% score are unchanged. No real data
object, section extent or metadata declaration was changed.
Pool first: identical and empty. Full 43U build passes with the approved
wrapper and WIBO_SJIS_MISSING_IMPORTS=1. DOL SHA1:
26116613f624061ba99c8d1a299aaa6efa85670d.
git diff --check passes. No remote, linking, header, new assembly, volatile,
dummy-storage, undefined-value or forced-register changes.

View File

@@ -1,83 +0,0 @@
# Punctuation options receiver, 2026-10-03
Base: bf8ebfa3. Owned source: Zi8punct.c only. This is a source-contract
correction with unchanged generated code and no percentage gain.
## Actual call and receiver
All original-object references show exactly one executable caller,
Zi8GetCandidatesOrCount, plus the punctuation function's exception-index
reference. At that call the fixed ABI positions are:
- r3: the candidate request
- r4: the candidate options object
- r5: the workspace
The dispatcher preserves these three incoming pointers separately. Its
_GetCandidates/_CheckCandidates producers create the existing 24-byte
ZiCandidateOptions object, initialize capacity from the workspace, and pass
its address as the second argument. The dispatcher then writes maxCount
from the workspace before calling the punctuation helper.
The punctuation target reads a byte at options +0, a word at options +0x0C,
and a halfword at options +0x10. These are countOnly, maxCount and capacity.
It overwrites incoming r5 before reading it, so the third workspace formal
is present in the caller contract but unused by this implementation.
The reconstructed definition previously omitted that third formal and named
the second argument workspace. It consequently described options accesses
using unrelated workspace fields at coincidentally equal offsets.
## Minimal correction
Copy the existing private ZiCandidateOptions type verbatim from zi8getc2.c;
no shared header or producer is changed. Its complete layout is reused,
including its established fields, without introducing any object, extra
storage or invented padding. A fixed-target-width layout check confirms
size 24 and the three accessed offsets 0/0x0C/0x10.
The definition now takes request, opaque options and workspace, and accesses
the real options fields through the private view. Its ziU32 result agrees
with the sole caller's declaration. All locals, comparisons, loops, output
stores and branch directions remain unchanged. The unused workspace formal
recovers an argument already supplied by the target caller; it does not
manufacture state or instructions.
## Verification
Fresh configured 43U baseline and candidate full builds pass with the approved
wrapper and WIBO_SJIS_MISSING_IMPORTS=1. Pool first: identical and empty.
All allocated payloads and canonical relocations are baseline-identical:
.text 300, .rodata 80, extab 8 and extabindex 12 bytes. The only complete-object
difference is two anonymous symbol-number characters in nonallocated .strtab.
All other 1,026 source objects are byte-identical to baseline.
Zi8Punctuation stays 75/75 instructions with ctxdiff zero differences. Unit
code 300/300, data 100/100, and 1/1 exact functions remain 100%. The entire
1,027-unit objdiff report is unchanged. Full 43U DOL SHA1 remains
26116613f624061ba99c8d1a299aaa6efa85670d. git diff --check passes.
Private evidence: /tmp/ezi-options-punct-{report.json,build.log,verification.txt},
/tmp/ezi-options-baseline.json and /tmp/ezi-new-receiver-refs.txt.
No remote changes, other-region builds, assembly, linking flags, forced
registers, volatile, dummy assignments or shared-header edits.
## Broader read-only ABI audit
The original-object call inventory covered 20 remaining nonexact functions,
excluding the already resolved one-key/PUD/conversion work: 337 direct calls
and one OEM callback. A symbolic-expression comparison pins each value to
its actual ABI argument register and outgoing stack slot; it does not apply
a global argument-register permutation. After applying only the previously
proven alpha scalar-frame offset mapping, all 338 call argument expressions
agree. The callback's four arguments and stored callback target also agree.
No external tail branch was found; indirect non-call branches are switches.
A separate incoming-register/stack-use audit found no additional live
argument beyond a callee's reconstructed parameter list. These are diagnostic
checks, not a formal whole-program equivalence proof.
The declaration/definition scan identified the separate missing workspace
formal on Zi8IsZicorpSignature. Three exact version-query helpers also have
old-style empty definitions despite receiving an unused workspace in their
exact caller; those are outside this candidate. No allocation experiments
were performed.

View File

@@ -1,35 +0,0 @@
# Signature-check workspace formal, 2026-10-03
Parent: 8a0aa7ce; its punctuation-options correction is preserved unchanged.
Owned source: zi8initd.c / Zi8IsZicorpSignature only.
The local declaration in zi8alpha.c takes word, halfword length and workspace.
An original-object reference scan finds exactly one caller and no function
pointer or other address escape. The target AlphaGetCandidates call puts the
word in r3, narrows the length into r4, and moves its preserved workspace into
r5 immediately before calling Zi8IsZicorpSignature.
The callee's current definition omitted the third formal. Its target reads
only r3/r4; r5 never appears anywhere in its 48 instructions. It has no calls
or tail target. Add the existing ZI_NEED_WORK formal to align the definition
with the actual caller and its declaration. The argument is genuinely passed
but unused. No local, assignment, storage, volatility or forced spill is added.
The body and all other declarations remain unchanged.
Validation after this separate change:
- The complete zi8initd object is byte-identical to the fresh baseline
- Zi8IsZicorpSignature remains 48/48 instructions, ctxdiff zero differences
- Zi8InitializeDynamic remains 128/128 instructions, ctxdiff zero differences
- Unit code 704/704, data 20/20 and 2/2 exact functions remain 100%
- The complete 1,027-unit report is identical to baseline and the preceding
punctuation-only report; all source objects except punctuation's already
documented nonallocated symbol-name difference are byte-identical
- Owned allocated sections and canonical relocations are unchanged
- Pool is identical and empty; full configured 43U build passes
- DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d
- git diff --check passes
This is contract reconstruction only, with no percentage gain. No shared
header, caller, linking flag, assembly, other-region build or remote change.
Private evidence: /tmp/ezi-options-signature-{report.json,build.log,verification.txt}
and /tmp/ezi-new-receiver-refs.txt.

View File

@@ -1,41 +0,0 @@
# Version-query workspace formals, 2026-10-03
Base: 9c7d87ab. Owned source: zi8ver.c only. This is source-contract
reconstruction with no percentage gain.
The local declarations in zi8getc2.c already describe Zi8GetVersion,
Zi8GetOEMID and Zi8GetBuildID as taking one ziPtr workspace. The definitions
instead had old-style empty parameter lists. Add only the existing workspace
formal to those three definitions. Bodies, constants, return types, callers
and headers are unchanged.
A fresh scan of all original objects finds exactly four executable references:
Zi8GetEngineSignature calls GetVersion twice, GetOEMID once and GetBuildID
once. There are no other address references or function-pointer escapes.
That caller preserves its incoming second argument, workspace, in r28 and
moves it to the fixed first-argument register r3 immediately before each call.
The workspace register is not redefined between its incoming copy and the
final restore. No argument-register permutation is used for this check.
Each original callee consists of exactly two instructions: load its existing
constant into r3, then return. Thus each overwrites r3 before any read of its
incoming value. There is no helper or tail target. The formal is unused in
this implementation but is established by every declaration and target call;
it adds no local state, storage or assignment.
Fresh configure and baseline/final full 43U builds used the approved wrapper
and WIBO_SJIS_MISSING_IMPORTS=1. Pool first: identical and empty. The entire
owned object, all 1,027 source objects, and the complete 1,027-unit objdiff
report are byte-for-byte / structurally identical to baseline. All allocated
payloads and canonical relocations also match the original target.
Each helper remains 2/2 instructions with ctxdiff-equivalent zero differences.
Unit exact code remains 24/24 bytes and functions 3/3; there are no allocated
data bytes. Full build passes and DOL SHA1 remains
26116613f624061ba99c8d1a299aaa6efa85670d. git diff --check passes.
Private evidence: /tmp/ezi-version-baseline.json,
/tmp/ezi-version-final-report.json, /tmp/ezi-version-final-build.log and
/tmp/ezi-version-verification.txt. No linking, assembly, volatile, forced
registers, dummy assignments, shared-header edits, other-region builds or
remote writes.

View File

@@ -1,102 +0,0 @@
# Input-form source reconstruction, 2026-10-02/03 UTC
Base `cc812ad3`, branch `agent/bittle/input-form-reconstruction`, 43U only.
Only `src/keyboard/tiInputForm.cpp` and this log are changed. Existing attempt
logs, headers, metadata, compiler settings, linking flags and assembly bodies
are untouched.
## Retained changes and target evidence
### LayoutByNW4R::create
The first language text-pane lookup in the target loads the layout's root pane
and invokes FindPaneByName with the recursive flag. The old source instead
invoked the Layout virtual getPane slot. The retained source directly expresses
the root-pane lookup, recovering two missing instructions and the correct call
receiver path. The later const getLanguageTextPane fallback remains intact.
The animation loop in the target keeps the address of the selected files[] slot.
It loads the file for GetResource, then reloads that slot after the resource and
animation-transform calls to obtain the animation ID. The old source captured
the file pointer once. A const reference to the existing typed pointer slot now
expresses the target's lifetime and recovers the other two missing loads. No
new storage, qualifier forcing, table entry, or helper was introduced.
Together these changes restore the target's 356-instruction body. The fallback
name-selection block still schedules some receiver loads differently, and most
remaining differences concern register allocation. This is not an exact match.
### Base::calcCursorPos
The source now uses the already defined Rect::GetWidth accessor for glyph and
form widths. That existing accessor computes exactly right minus left. The
change preserves the arithmetic, hit-test inequalities, wrap/newline paths,
scroll handling, recursive fallback, and all helper calls. It recovers more of
the target's rectangle-expression boundaries at unchanged body size. Height
accessors and midpoint operand reversal did not improve the result and were not
retained. No new geometry abstraction or arithmetic reassociation was added.
## Attempts and rejected alternatives
- Read the previous sol-high-inputform and data-d4 logs. Revisited their concrete
root-query and file-slot defects under the user's current partial-decompilation
priority; did not repeat the historical declaration searches.
- Tested the two create corrections independently and together. Explicit fallback
selector locals produced the same code. Duplicating the root lookup in both
fallback branches grew the function to 363 instructions and was rejected.
- Tested small inline fallback-lookup wrappers; they added source complexity
without improving the retained result. A trial binding the derived layout
pointer to a base pointer reference did not compile and was restored.
- Existing width and height accessors and midpoint operand order were tested
independently. Only the width accessor change is retained.
- No artificial allocation sweep, new assembly, use-site volatile, dummy storage,
undefined input, padding, header edit, or linking experiment was used.
## Gates
Before -> after:
- calcCursorPos: 91.622696 -> 93.05215% fuzzy, 326/326 instructions unchanged;
final raw ctxdiff 50 differences (baseline 52, including existing relocation
aliases and floating-point scheduling/allocation differences).
- LayoutByNW4R::create: 95.02809 -> 96.40169% fuzzy, 352 -> 356 instructions against
target 356; final ctxdiff 155 differences.
- Unit fuzzy: 99.578094 -> 99.6535%.
- Existing objdiff-exact symbols: 218/221 unchanged; exact code 46980/50656 bytes;
matched data 3772/3772 (100%); linked status unchanged.
- Independently rebuilt the baseline and candidate objects. All 218 previously
objdiff-100 symbols have identical baseline/candidate instruction streams.
This preserves the pre-existing distinction between objdiff and raw ctxdiff
exactness rather than claiming every alias-normalized symbol has diffs 0.
- Baseline/candidate raw .data, .rodata, .bss, .sdata, .sbss, .sdata2 and .ctors
section bytes and extents are identical. All 20 pool strings match the target.
- Literal audit: 20 arguments checked, 221 functions analyzed, no candidates,
skips or errors. Target-sized create is now included in that audit.
- Full 1027-unit report: no exact-function, exact-code, data or fuzzy regressions.
- Full 43U build and build/43U/ok passed, again after rebuilding the baseline and
restoring the candidate. DOL SHA1:
`26116613f624061ba99c8d1a299aaa6efa85670d`.
## Focused behavior coverage and limits
A private host harness extracts the production baseline/candidate calcCursorPos
bodies without rewriting them, supplies the same Rect::GetWidth expression, and
uses deterministic font/scale/wrap stubs. Compiled with single-precision float,
-fno-fast-math and -ffp-contract=off, it checks returned positions, helper-call
traces and wrap counters across empty text, newlines, forced word wraps, width
wraps, boundary hits, scale, non-positive scroll and recursive fallback.
159,320 terminating cases agreed. Another 680 synthetic font/wrap states reached
the same 1,000-scale-call model budget with identical traces in both versions;
no termination claim is made for those states. The initial unrestricted harness
also reached its budget in the baseline, so this is equivalence coverage for the
accessor change, not proof of general termination or a newly diagnosed Wii bug.
The layout/resource creation path is validated by target call/load evidence and
the real 43U compile; no Wii UI/runtime execution is claimed.
Private local evidence: `/tmp/input-form-reconstruction/` contains baseline/final
reports and object copies, pool/literal audits, both final ctxdiffs, build logs,
validate_cursor.py and cursor-tests.log, plus rejected experiments. No retail
assembly or binary is committed or uploaded.
GATE: validated partial source/control/data-flow reconstruction; no regressions.
Exact matching and linking remain open. Candidate frozen for parent validation.

View File

@@ -1,238 +0,0 @@
# RGB565420 edge bounded declaration search
Base: `32be36cb4e57bdaf05af9bbccc0a4ff6a63cb1aa`; branch
`agent/bittle/jpeg-edge-declaration-search`; 43U only.
The function at entry exactly matched the merged pixel-lifetime candidate
from #1061. Its function-text SHA256 was
`b0117318407c1fb445baef7534c6f0d28908412e0e8c26bc113efc4ed956f57f`.
The contiguous leading block at source lines 566..585 contains twenty existing
uninitialized scalar/pointer declarations. Initialized pixel locals at 620..623
were excluded. Earlier tex1 coverage used the older function-wide RGB locals;
the #1061 evidence explicitly records no declaration search on its new body.
## Authorized search and stop
Ran the unchanged repository tool exactly once:
```sh
WIBO_SJIS_MISSING_IMPORTS=1 NINJA=../.venv/bin/ninja \
PYTHONPATH=../local-tools ../.venv/bin/python \
tools/decomp-assist/declsearch.py \
libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565 \
TMCJPEGDEC_converterYUV420toRGB565edge --lines 566 585 --max-evals 32
```
Structural/positional trajectory: `(4,65)` -> `(4,58)`.
The tool stopped at 32 distinct scored orders, then rebuilt its retained order.
This was the finite evaluation cap, not exhaustion of the final neighborhood.
There was no custom search, extra variant, helper edit, or initializer move.
The sole retained source change swaps the leading declarations of `column`
(s32) and `crValue` (s8). Both are genuinely used uninitialized scalar locals.
All expression tokens, initialization statements, scopes, helper bodies,
clamps, arithmetic, and pointer steps remain byte-for-byte unchanged.
There are no floating-point operations in this converter.
## Fresh official result
- Function fuzzy: 95.570175 -> 95.96491%
- Instruction count: 114/114; ctxdiff differences: 65 -> 58
- Unit fuzzy: 96.58538 -> 96.61449%
- Exact remains 7/13; matched code remains 2648/6184 bytes
- No allocated non-code sections; data remains 100%
- Global fuzzy: 99.71971 -> 99.71977%; all exact/link/data totals unchanged
- Full report: zero function/unit regressions; only this unit changes
- Only this function's bytes change; all twelve sibling bodies are identical
to the saved pre-search object
- All seven existing exact siblings remain objdiff 100% and ctxdiff zero
This is partial fuzzy progress, not an exact or linking result.
## Gates
Full 43U build and `ninja build/43U/ok`: PASS.
DOL SHA1: `26116613f624061ba99c8d1a299aaa6efa85670d`.
Pool before and after: identical, zero strings. `git diff --check`: PASS.
Literal audit: no candidates/errors; twelve functions analyzed, unchanged
setter skipped for unequal function sizes.
The unchanged prior pixel oracle passed 8,721 vectors / 26,163 object executions
against the candidate, original, and its saved pre-#1061 baseline: 808 edge-size
cases, 256 dimension-branch cases, 6,400 saturation cases, and 1,257 aligned
input/output overlaps wholly inside the actual conversion buffer. Every one of
114 instructions was exercised in each object. The interpreter checks every
non-stack byte, LR, stack pointer, and preserved GPRs. Valid rows exercise both
column parities; odd input x remains outside the existing asserted contract.
The prior oracle's bounded-input and interpreter limitations still apply;
this is not formal equivalence or Wii runtime validation.
## Unsearched neighborhood, read-only count
For twenty declarations, the retained order has:
- 190 distinct pair-swap neighbors
- 361 distinct remove/insert move neighbors
- 19 neighbors common to both sets
- 532 distinct neighbors in their union
The tool's deterministic enumeration reaches the sole improvement at evaluation
27: swapping zero-based positions 1 and 8. Five new final-order neighbors are
then scored before reaching 32. The initial order is also a final-order neighbor
(the inverse swap), giving 6 covered and 526 unscored final-order neighbors.
This count was reproduced without compiling any additional order. It is inferred
from the unchanged tool, its logged single improvement and final 32-build count.
A fresh official run lacks the prior cache and would repeat those six neighbors;
533 total evaluations can cover one fixed order plus its entire neighborhood if
no intervening improvement causes the tool to restart from another order.
No continuation run was performed.
## Evidence
`/tmp/jpeg-edge-declaration-search/` contains `search-output.txt`, baseline and
candidate reports, the saved pre-search object, `candidate.ctx`, `full-build.log`,
`verification.txt`, `audit-output.txt`, `audit-results.json`, and `neighborhood.json`.
The read-only `verify.py` asserts the source consists of exactly the two-line
swap and compares reports, allocated sections, and sibling object bytes.
The prior oracle remains `/tmp/jpeg-pixel-lifetime/audit.py`, unchanged.
No remote writes, link flags, shared headers, or tool changes.
## Separately authorized 533-evaluation continuation
The preceding 32-evaluation candidate was preserved on its own branch. A new
branch, `agent/bittle/jpeg-edge-order-finish`, starts at base `32be36cb` with that
candidate cherry-picked as `81df2b4e26f36c1b63a74840754ea720dc4f1c72`.
The 95.96491% baseline was rebuilt and freshly measured before proceeding.
Ran the unchanged official command above exactly once more, changing only
`--max-evals 32` to `--max-evals 533`. The same twenty leading uninitialized
declarations remained the complete writable search range. All source outside
that block was checked byte-for-byte against the entry source, and the block's
declaration multiset was unchanged. No initialized local, scope, expression,
helper, type, array, or evaluation-order edit occurred.
The structural/positional trajectory was:
```text
(4,58) -> (4,57) -> (4,56) -> (4,55) -> (4,52) -> (4,49)
-> (4,48) -> (4,44) -> (4,43) -> (4,39) -> (4,35)
```
The tool stopped after 533 distinct scored orders and rebuilt its retained
order. The evaluation cap stopped this run; a local fixed point was not reached.
There was no extra search or source variant afterward.
### Final measured result and repeated gates
- Function fuzzy: 95.96491 -> 97.850876%; compared with merged #1061: 95.570175%
- Unit fuzzy: 96.61449 -> 96.753555%; compared with merged #1061: 96.58538%
- 114/114 instructions; ctxdiff differences: 58 -> 35
- Global fuzzy on this branch: 99.71977 -> 99.72007%
- Exact remains 7/13; matched code 2648/6184 bytes; link/data totals unchanged
- Zero full-report function/unit regressions; only this unit changes
- Only the targeted function body changes; all twelve siblings remain
byte-identical to the saved 95.96491% entry object
- All seven exact siblings remain objdiff 100% and ctxdiff zero
- Empty allocated non-code sections and empty string pool unchanged
- Full 43U build, `ninja build/43U/ok`, and `git diff --check`: PASS
- DOL SHA1: `26116613f624061ba99c8d1a299aaa6efa85670d`
- Literal audit: no candidates/errors; twelve functions analyzed; unchanged
setter skipped for unequal size
- The unchanged prior oracle again passes all 8,721 vectors / 26,163 object
executions with complete 114-instruction coverage in all three objects
The same bounded-oracle limitations listed above apply. This is partial fuzzy
progress and does not add an exact function or change linking.
Final source SHA256:
`3b0ed19e076c09dfbcd841fc63b79e48ef0ae84703bd4148fdac56c8cfd2c6d3`.
### Final neighborhood coverage
The new final order again has 532 distinct one-swap/one-move neighbors. The
official tool restarts its neighborhood after an improvement; ten improvements
therefore moved the center during the finite run.
An exact final-neighbor coverage count is unavailable: the unchanged tool logs
score improvements and its final declaration order, but does not retain the
identity of each intermediate tested order. No identities were invented.
Read-only enumeration establishes these conservative bounds:
- The final order itself, the starting order, and the first tested swap are
three scored orders outside the final neighbor set
- The last improving parent is a scored final-order neighbor
- Between 1 and 530 of 532 final neighbors were scored in this continuation
- At least 2 final neighbors remain unscored; the neighborhood is not exhausted
These bounds concern the continuation, not a claim of cumulative coverage
across other runs. No further continuation was performed or implied.
### Continuation artifacts
`/tmp/jpeg-edge-order-finish/` contains the complete score trajectory, freshly
rebuilt baseline report/object/source, candidate report, `candidate.ctx`, full
build log, independent verification output, unchanged-oracle output/results,
and read-only neighborhood calculation results. Its `verify.py` checks that
only the leading-declaration order changes, then checks full reports, exact
siblings, all sibling bytes and allocated non-code sections.
The separately preserved 32-evaluation branch is unchanged. The final source
and this combined evidence log are ready for independent review as one PR.
No remote writes occurred.
## Final authorized fixed-point check
A final separate branch, `agent/bittle/jpeg-edge-order-fixedpoint`, preserves
the validated source on current main `a4d145c0` through cherry-picked commits
`8b2366be` and `a4f3d380`. The 97.850876% baseline was rebuilt and freshly
measured before the search. Its source is identical to the preceding frozen
candidate `7423b762`.
Ran the same unchanged official command once with `--max-evals 1200`, still
restricted to source lines 566..585 and the same twenty uninitialized
scalar/pointer declarations. No other source region was writable by this run.
Actual result:
```text
start (4, 35)
best (4, 35) after 533 builds; source restored
```
There were zero improvements. The run stopped at a local fixed point before
its 1200-evaluation cap. Its 533 scored orders comprise the baseline plus all
532 distinct pair-swap/remove-insert neighbors of that baseline. The center
never moved, so complete final-neighborhood coverage is established directly
from the unchanged deterministic tool and its count. No inferred intermediate
permutations are needed.
This is a fixed point under declsearch's structural/positional comparator.
Official objdiff fuzzy was measured at entry and exit, both 97.850876%; the
tool does not measure official fuzzy for each intermediate neighbor. No claim
of globally optimal fuzzy score or exhaustion of multi-step permutations is made.
No additional run followed the fixed point.
### Retained-source verification on current main
The complete source and whole RGB565 object are byte-identical to the freshly
rebuilt 97.850876% entry baseline. The complete 1027-unit report is identical
before and after the final full rebuild, with zero function/unit regressions.
- Function fuzzy remains 97.850876%; unit fuzzy remains 96.753555%
- 114/114 instructions, 35 ctxdiff differences; exact remains 7/13
- All seven exact siblings remain objdiff 100% and ctxdiff zero
- Allocated non-code sections remain empty; pool identical, zero strings
- Full 43U build, `ninja build/43U/ok`, and `git diff --check`: PASS
- DOL SHA1: `26116613f624061ba99c8d1a299aaa6efa85670d`
- Literal audit: no candidates/errors; twelve functions analyzed, unchanged
setter skipped for unequal size
- Unchanged pixel oracle: all 8,721 vectors / 26,163 object executions pass,
with full 114-instruction coverage and the previously documented limitations
- Current-base global fuzzy: 99.72187%; this neutral search changes no totals
Final evidence is in `/tmp/jpeg-edge-order-fixedpoint/`: baseline report,
object and source; full trajectory; candidate report; full build log; verification
output; pixel-oracle output/results; and exact neighborhood counts. Source SHA256
remains `3b0ed19e076c09dfbcd841fc63b79e48ef0ae84703bd4148fdac56c8cfd2c6d3`.
Only this evidence append is new in the final check; the best source is retained.
No remote writes, new variants, helper changes, or initialized-local edits.

View File

@@ -1,99 +0,0 @@
# RGB565420 edge pixel lifetime
Base: `57ccda3883537a308568c03924af2cebf2d8a789`, branch
`agent/bittle/jpeg-pixel-lifetime`, 43U only. One authorized source trial;
no additional variants, header/configuration changes, or remote writes.
## Source reconstruction
The existing exact RGB565444 sibling has a pixel-scoped independent luminance
value and pixel-scoped RGB locals. Apply that lifetime boundary to RGB565420
edge, retaining its current chroma sampling and every address/step expression.
Initialize red, blue, then green, matching original instructions 60..62 after
the luminance load at 58. The original overflow reduction at 63..64 is
blue/red/green; that existing source expression remains unchanged, as do clamps
and the RGB565 packing expression. No declaration-permutation search was used.
Chroma products are bounded signed integer arithmetic. For signed byte Cb/Cr,
red/green/blue offsets stay within [-180,178], [-135,135], and [-227,225]. Adding
an unsigned luminance byte cannot overflow s32. There are no floating-point
operations. Removing the blue variable's temporary ownership of luminance and
limiting RGB lifetimes to the pixel does not add or remove input reads or output
writes. The arithmetic order changes only among independent initialized scalars.
The historical tex1 log records a different sibling-template trial at
96.00877%, discarded for being nonexact. Its original source is unavailable;
this candidate is an independently measured reconstruction, not that artifact.
## Measured result
- `TMCJPEGDEC_converterYUV420toRGB565edge`: 94.692986 -> 95.570175%
- 114/114 instructions; ctxdiff differences 73 -> 65
- Unit fuzzy: 96.5207 -> 96.58538%
- Exact functions remain 7/13; matched code remains 2648/6184 bytes
- No allocated non-code sections in source or original; data remains 100%
- Global fuzzy: 99.71608 -> 99.7162%; all exact/link/data totals unchanged
- No function- or unit-level regressions across the full 1027-unit report
- Only this function's body differs from the saved baseline object; all twelve
sibling function bodies are byte-identical to baseline
- Seven existing exact functions remain objdiff 100% and ctxdiff zero
This is partial fuzzy progress, not an exact match or linking result.
## Validation
Pool checks before the trial and after the full build: identical, zero strings.
The full 43U build passed. `ninja build/43U/ok` passed with no work pending.
DOL SHA1: `26116613f624061ba99c8d1a299aaa6efa85670d`.
`git diff --check` passed. Literal-reference audit: no candidates/errors;
twelve functions analyzed, unchanged nonexact setter skipped for unequal size.
A focused independent scalar pixel model was compared with the compiled
candidate, original, and saved baseline through the existing bounded PPC
interpreter. All 8,721 vectors passed (26,163 object executions):
- 808 cases covering every valid edge width and height for scales 1/2/4/8,
both starting-row parities, and even-column residues 0/2 within a tile
- 256 cases covering both width/height selection branches, zero/full/partial
extents, row parity and column residues
- 6,400 saturation cases: all 256 luminance values crossed with all Cb/Cr
pairs from {-128,-1,0,1,127}
- 1,257 aligned input/output overlaps; every output byte stays inside the
actual 0x184-byte convBuf backing array and state remains separate
All 114 instructions in candidate, original, and baseline were exercised.
Every non-stack byte, including guards, was compared against the scalar model.
The interpreter also checked LR, stack pointer, and GPR14..GPR31 preservation.
Odd input x is excluded by the existing entry assertion; valid multi-pixel
rows exercise both odd/even column paths. Unsupported scales and invalid
pointers are not asserted valid API inputs. These are bounded interpreter
checks, not formal equivalence or Wii runtime validation. The existing integer
interpreter's limitations remain; no FPU, MMIO, exception or timing model is used.
## Reproduction artifacts
Local evidence directory: `/tmp/jpeg-pixel-lifetime/`.
- `baseline-report.json`, `baseline-rgb.o`: saved before source edits
- `candidate-report.json`, `candidate.ctx`: focused candidate measurements
- `full-build.log`: full build output
- `audit.py`, `audit-results.json`, `audit-output.txt`: independent pixel model
and targeted differential evidence
The test script reads the current candidate object, current original object,
and saved baseline object. It does not write repository source or original
binary bytes. Re-run from this worktree:
```sh
PYTHONPATH=../local-tools ../.venv/bin/python /tmp/jpeg-pixel-lifetime/audit.py
```
Build configuration uses cached approved tools:
```sh
../.venv/bin/python configure.py --version 43U \
--wrapper ../toolchain/wibo-build/wibo --compilers build/compilers \
--dtk build/tools/dtk --objdiff build/tools/objdiff-cli \
--sjiswrap build/tools/sjiswrap.exe
WIBO_SJIS_MISSING_IMPORTS=1 ../.venv/bin/ninja
build/tools/objdiff-cli report generate -p . -o build/43U/report.json -f json
```

View File

@@ -1,70 +0,0 @@
# Keyboard dictionary accessor contract, 2026-10-03 UTC
Base `1fa33882`, branch `agent/bittle/keyboard-manager-reconstruction`.
Only two calls in `src/system/iplKeyboard.cpp` and this log are changed. 43U only;
no header, metadata, compiler-setting, assembly, linking or data edits.
## Source defect and retained correction
Manager::create's two dictionary loops use an OEM index in the range 10..19.
They passed that index to System::getZiDicData(int), which is currently defined
as `smArg.mZiDicData.sys[i]`. The sys subarray has ten elements. Thus the source
expressed the OEM reads beyond that subarray's bounds, despite landing at the
intended adjacent OEM bytes on the target compiler.
The retained calls use the already existing System::getZiOemDicData accessor,
passing the OEM-relative index `oemIndex - EZTX_LANG_MAX` (0..9). This accessor
indexes the actual ten-element oem subarray. The target loads from the combined
system/OEM table base plus four times the absolute OEM index; the corrected
accessor computes the same addresses through the proper object member.
No shared accessor or data layout is changed. The existing system-dictionary
presence check governing fallback selection is preserved, as the target proves.
This is a source-correctness improvement, not a new exact match or a matching-
percentage gain. The entire generated source .text section remains byte-identical.
## Other investigations
- Read the prior fz1 and data-d1 construction/index/memo-copy attempts.
- The existing zero-argument twenty-entry dictionary accessor also preserved
the baseline score. The dedicated OEM accessor was preferred for its explicit
index domain and object-member contract.
- Using the system index directly for OEM lookup or changing to an independent
zero-based OEM counter changed induction lowering and reduced similarity;
those forms were not retained.
- Explicit allocation followed by placement construction was tried for the arc
link, resource accessor and allocator. It did not improve output, so those
larger changes and the extra include were discarded.
- No declaration/register sweep, artificial storage, volatile cast, padding,
assembly, header change or linking experiment was used.
## Verification
Baseline -> candidate:
- Manager::create: 94.00944 -> 94.00944%, 318/318 instructions unchanged.
- Unit fuzzy: 98.73506 -> 98.73506%.
- Exact functions 31/32, exact code 4752/6024, data 1184/1184 (100%), and linked
status unchanged. Exact matching of create remains open.
- Fresh baseline and candidate object builds: all 32 reported function instruction
streams are identical. Entire source .text (6240 bytes), .data (1161 bytes),
.sdata (6 bytes) and .sdata2 (8 bytes) are byte-identical.
- Pool: all 28 strings identical to target.
- Literal audit: 25 arguments, 32 functions, no candidates, skips or errors.
- Full 1027-unit report has no exact-function/code/data/fuzzy regressions.
- Full 43U build and build/43U/ok passed. DOL SHA1:
`26116613f624061ba99c8d1a299aaa6efa85670d`.
A host harness extracts the actual production dictionary loops and uses bounded
system/OEM accessor stubs. Compiled with undefined-behavior/bounds sanitizers,
it passes all 1,048,576 combinations of ten system and ten OEM availability bits.
The independent reference checks the target's fallback-selection rule, every
result pointer, the preserved language IDs and both final table sentinels.
No Wii resource-loading or UI runtime execution is claimed.
Private evidence: `/tmp/keyboard-manager-reconstruction/` contains baseline/final
reports and object copies, pool/literal audits, full-build.log, source experiments,
validate_dictionaries.py and dictionary-tests.log. No retail assembly or binary
is included in this commit.
GATE: source accessor bounds corrected with byte-identical generated code and
no matching/data regressions. Frozen for parent validation; no completion claim.

View File

@@ -1,82 +0,0 @@
# MD5 sequential word consumption, 2026-10-03
Base: `fc114afd`. Source scope: `libs/RevoEX/src/net/md5.c` only. This is a
validated partial reconstruction under the user's decompiled-first priority,
not an exact match or linking change. Prior accepted source and logs remain.
## Selected source form
The first sixteen MD5 steps consume the existing sixteen-word context block
sequentially. Each step reads the selected word twice with the byte-reversed
intrinsic, then advances its local cursor by one word. The original performs
those paired loads before each four-byte cursor increment. `rotateNextSum`
expresses that consumption through the actual cursor's address, and is used
only by the four first-round step sites. The cursor begins at `buffer32`, ends
one-past its sixteen words and never escapes. No additional state is stored.
The other three rounds select nonsequential words through the existing index
table and therefore retain the non-consuming `rotateSum` helper. Both helpers
use the same unsigned arithmetic and paired endian loads. The small duplicated
rotation expression supports these two different pointer contracts; duplication
is not itself a reason for the gain. There are no new helper families, XOR
regroupings, arbitrary ordering hints, volatile qualifiers or register forcing.
This exact source form was previously measured at 94.98366% in the grouping
work, but rejected because it duplicated the small rotation body for a partial
gain. Fresh review selected it under the current acceptance priority. Only this
archived form was compiled; no new variant sweep was performed.
## Pinned contracts and scoped instruction audit
Original ProcessBlock consumes only incoming r3. State occupies context bytes
0..15, the untouched u64 byte count 16..23, and the owned block 24..87.
The exact Update API copies each complete block there; exact GetDigest builds
its final block there. ProcessBlock has no calls, external buffer, callback or
count dependency. No missing input or width defect was found.
Both compiled streams have four CTR=4 loops and reduce to the same independent
64-step MD5 recurrence in a private symbolic PPC instruction model. Arbitrary
initial state words and arbitrary message words are retained symbolically;
normalization uses only unsigned addition/XOR identities, commutative Boolean
operations and the observed split-rotation identity. Both streams execute
1,107 instructions, 128 paired little-endian message loads, 64 constant loads
and 48 index loads. The selected addresses match all four MD5 word schedules.
All 64 constants and 48 indices match their standard formulas. The only object
writes are the four final state words, at offsets 0,4,8,12. This scoped model
is additional evidence, not a general compiler-equivalence proof.
## Fresh gates
- ProcessBlock: 94.30719 -> 94.98366% fuzzy, 306/306 instructions.
Positional ctxdiff differences decrease 215 -> 212; it is still nonexact.
- Unit: 96.179825 -> 96.63377%; exact functions 3/4 and exact code 600/1824
unchanged. Data remains 456/456 (100%), with no linking change.
- All three public APIs remain byte-identical to baseline and instruction-exact
against original: Init 16/16, Update 60/60, GetDigest 74/74, diffs 0.
- All 448 .data bytes are unchanged and identical to original. The .sdata byte
remains 0x80; the existing source size 1 / target size 8 alignment difference
is unchanged. No padding or section changes were introduced.
- Empty pools identical. Literal-reference audit analyzes all four functions,
with zero candidates/errors and no string arguments to check.
- Full 1,027-unit before/after report: only MD5 changes; no exact function,
exact code, data or fuzzy regression. Post-build final report equals the
candidate report.
- 3,088 production-C digest/chunking comparisons against hashlib pass, including
standard vectors, one million `a` bytes, 1,500 seeded messages and block/final
padding boundaries. Padding is supplied externally; host testing does not
exercise GetDigest's PPC-endian length stores.
- 20,000 direct production ProcessBlock checks against an independent scalar
compression recurrence pass with ASan/UBSan. Arbitrary initial states and
blocks cover unsigned overflow; count, input block and surrounding canaries
stay unchanged. Leak detection is disabled because it is unsupported under
this environment's ptrace; address and undefined-behavior checks are enabled.
- Full 43U build and build/43U/ok pass. DOL SHA1 remains
`26116613f624061ba99c8d1a299aaa6efa85670d`.
Private evidence: `/tmp/md5-cursor-revalidation/` contains the reports, source
snapshots, instruction audit, host tests, sanitizer output, pool/literal/ctxdiff
results and build logs. Read-only preselection audit is preserved separately in
`/tmp/md5-processblock-audit/`. No original assembly or binary is committed.
GATE: passing partial instruction-structure gain, frozen for independent review;
exact matching and linking remain open.

View File

@@ -1,104 +0,0 @@
# MD5 bounded declaration-order continuation, 2026-10-03
Base: `b7a06e9d`, after the accepted sequential cursor helper from `55ff13a2`.
Only `libs/RevoEX/src/net/md5.c` and this log change. The parent authorized one
bounded official declaration search after confirming this source had not been
searched. No remote operation, extra search or custom variant was performed.
## Authorized range and run
Original lines 93..97 contain only five existing uninitialized declarations:
word, constant, index, round, block. The initialized state words on line 92,
static arrays, all assignments, expressions, scopes and both helpers stay
byte-for-byte unchanged. These independent scalar/pointer declarations have
no initialization side effects; every value is still assigned before use.
The earlier four-leaves-r11 search used different rotation code and a larger
block containing initialized state declarations. The accepted grouping and
cursor-helper attempts explicitly did not search this exact source.
After a fresh 43U baseline build and pool check, ran exactly once:
WIBO_SJIS_MISSING_IMPORTS=1 NINJA=../.venv/bin/ninja \
PYTHONPATH=../local-tools ../.venv/bin/python -u \
tools/decomp-assist/declsearch.py libs/RevoEX/src/net/md5 ProcessBlock \
--version 43U --lines 93 97 --max-evals 23
The official structural/positional score trajectory was:
(5,212) -> (5,209) -> (5,202) -> (5,197).
The selected order is index, block, constant, round, word.
The run stopped at its 23-unique-evaluation bound, not a proven local fixed
point. The final order has 22 distinct swap/move neighbors, and the original
order is outside that neighborhood. Covering the final order, its entire
neighborhood and the already-tested original would require at least 24
unique evaluations. A later separately authorized finite continuation could
therefore be useful; none was run here. The tool's final rebuild is additional
to its 23 evaluations. This is not an exhaustive search of all 120 orders.
## Fresh retention gates
- ProcessBlock: 94.98366 -> 95.55556% fuzzy, 306/306 instructions. Positional
ctxdiff decreases 212 -> 197; the official structural score remains 5.
- Unit: 96.63377 -> 97.01755%. Exact functions 3/4, code 600/1824 and data
456/456 remain unchanged. This is a partial matching gain; linking is unchanged.
- NETMD5Init 16/16, NETMD5Update 60/60 and NETMD5GetDigest 74/74 remain literally
instruction-exact against original and unchanged from baseline.
- .data 448 bytes and the existing .sdata byte/extent are unchanged. Empty
pools identical. Literal advisory analyzes all four functions without
candidates, skips or errors; there are no string arguments to check.
- Full 1,027-unit reports show only MD5 improved, with no fuzzy, exact-function,
exact-code or data regression. The final report equals the candidate report.
- A fresh symbolic PPC instruction audit reduces the compiled candidate and
original to the same unsigned 64-step MD5 recurrence, with identical selected
addresses for 128 LE message loads, 64 constants and 48 indices. Only the four
state words are written; count and block remain untouched.
- Production C passes 3,088 known-answer/seeded digest and chunking checks.
RFC1321 padding is supplied externally; GetDigest's platform-endian stores
remain instruction-exact and outside little-endian host test coverage.
- Production ProcessBlock passes 20,000 arbitrary-state/block comparisons with
ASan/UBSan, preserving count, input block and canaries. Leak detection is
disabled for ptrace; address and undefined-behavior instrumentation is enabled.
- Full 43U build and build/43U/ok pass. DOL SHA1 remains
`26116613f624061ba99c8d1a299aaa6efa85670d`. git diff --check passes.
Private evidence: `/tmp/md5-declaration-order/` contains the exact search log,
source/object snapshots, reports, symbolic/host/sanitizer checks, pool/ctxdiff/
literal output and build logs. The read-only eligibility screen is separately
preserved in `/tmp/md5-declaration-screen/`. Original assembly/objects stay private.
GATE: passing bounded five-declaration-only partial gain, frozen for independent
review. No initializer, expression, statement, type, scope or helper changed.
## Finite continuation: local fixed point
Prepared base `32be36cb` plus cherry-picked source candidate `31dffe1b`.
Fresh configure/build verified ProcessBlock 95.55556% before the continuation.
The parent authorized exactly one further official run over the same five
uninitialized declarations, with --lines 93 97 --max-evals 120. No source type,
initializer, assignment, expression, scope or helper was changed.
The run started and finished at (5,197), without any intermediate improvement.
It stopped after 23 unique evaluations: the selected order and all 22 distinct
swap/move neighbors. This is a local fixed point of the official tool's scoring
and neighborhood, not the 120-evaluation cap or an exhaustive global optimum.
No additional run is authorized or planned.
The tool restored its initial source byte-for-byte. The complete rebuilt MD5
object and full 1,027-unit before/after/final reports are also byte-identical.
ProcessBlock remains 95.55556%, 306/306 instructions, 197 positional differences;
unit 97.01755%, exact APIs 3/4, code 600/1824 and data 456/456 are preserved.
Pool remains identical and all three public APIs remain instruction-exact.
Fresh full 43U build and build/43U/ok pass, with DOL SHA1 unchanged at
`26116613f624061ba99c8d1a299aaa6efa85670d`.
No semantic harness was rerun for the neutral continuation: both the entire
source and compiled object are identical to its already-validated baseline.
The earlier symbolic, 3,088-vector and 20,000-sanitizer gates therefore remain
applicable without claiming new test runs. This continuation changes only this
log; the source candidate from `31dffe1b` is preserved for consolidated review.
Private continuation evidence: `/tmp/md5-order-finish/`, including search.log,
source/object baseline, identical reports, pool/ctxdiff results and full gates.
GATE: neutral finite continuation closed at local fixed point; prior source gain
preserved, no further declaration search performed.

View File

@@ -1,75 +0,0 @@
# NHTTP token byte-role recovery, 2026-10-03
Base: `81ba2799`. One authorized two-line trial in
`libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL.c`. No other function, shared helper,
header, compiler setting or linking configuration was changed.
## Source roles and historical evidence
NHTTPi_compareToken retains the raw left byte across its folded comparison,
then signs that raw value again for the matched NUL/space termination test.
The target loads the right byte and folds its signed value first, then loads
the left byte into a separate zero-extended word before signing/folding it.
The raw left word remains separate from both folded comparison results.
Use u32 for that actual zero-extended raw-left value, and express the right
input through the same explicit u8-load/s8-conversion boundary as the left.
No extra local, helper, load, dummy use or register-forcing construct is added.
The shared LowerCase helper and literal termination tests are unchanged.
This is data-representation reconstruction, not a changed byte-domain contract.
The perm2 attempt log had measured 99.51111% for the word-lived raw left byte
and 99.73333% with the right raw-byte conversion, but discarded both solely
because they were nonexact. Those old temporary sources are unavailable here;
the minimal form was independently reconstructed from current source and
original instructions. Only that one two-line form was compiled this round.
## Byte, ordering and termination proof
- All 256 byte values were checked against the target's actual carry-based
signed comparisons. Only ASCII A..Z gain 32; bytes 128..255 remain signed
negative values for comparison, preserving equality with the same raw byte.
- A private interpreter executes the original 45-instruction function on all
65,536 byte pairs plus five multi-byte/high-bit/termination cases. Return
values and ordered byte-read traces agree with the proposed semantics.
- The compiled candidate differs from original only at two initial li
instructions: zero and 'Z' are initialized in the opposite order. They write
distinct registers before either value is used and do not change condition
state. After commuting those two independent instructions, all 45 match
literally, including right-before-left loads, both signed conversions,
folded comparisons, pointer advances and the saved raw-byte stop test.
- A matched NUL or literal space returns 0; every mismatch returns -1. Other
whitespace bytes are ordinary token data. The comparison still happens
before termination, and no new dereference or store is introduced.
## Fresh gates
- NHTTPi_compareToken: 98.844444 -> 99.73333%, 45/45 instructions, two residual
constant-scheduling differences. This is not an exact match.
- Unit: 99.88612 -> 99.9573%; exact functions 12/14 and code 1864/2248 preserved;
data 112/112 preserved. Linking unchanged.
- All 13 unrelated functions' instruction streams and resolved relocations are
identical to baseline, including the 12 exact functions. Every allocated data
byte and section extent is unchanged. Pool 1/1 identical.
- Literal-reference advisory: all 14 functions analyzed, no candidates, skips
or errors; this function has no string arguments at external calls.
- Full 1,027-unit reports show only compareToken improved, with no fuzzy,
exact-function, exact-code or data regression. Post-build final report equals
the candidate report.
- Production C: 75,536 exhaustive byte-pair and seeded token comparisons pass
against an independent ASCII-fold/literal-termination reference for both
baseline and candidate.
- ASan/UBSan: 95,504 byte-pair, seeded token, aliased and overlapping-input
comparisons pass; all input bytes remain unchanged. The harness extracts
actual production function/helper bodies and uses signed-char host settings.
Leak detection is disabled for ptrace; address/UB instrumentation is enabled.
- Full 43U build and build/43U/ok pass. DOL SHA1 remains
`26116613f624061ba99c8d1a299aaa6efa85670d`. git diff --check passes.
Private evidence: `/tmp/nhttp-token-byte-roles/` contains source/object snapshots,
reports, host/sanitizer harnesses and results, pool/literal/ctxdiff and build logs.
The prior read-only byte proof and proposed diff are preserved separately in
`/tmp/nhttp-token-recovery-screen/`. Original assembly and objects remain private.
GATE: passing two-line partial recovery, frozen for independent review.
No additional constant-order or register trial was attempted.

View File

@@ -1,89 +0,0 @@
# NWC24 writable-task validation recovery, 2026-10-03
Base: `57ccda38`. One bounded source trial in
`libs/RevoEX/src/nwc24/NWC24Download.c`; 43U only. This is a partial
instruction-structure gain, not an exact match, behavior fix or linking change.
## Recovery screening and source rationale
Older exact-only attempts had restored valid partials: pk2 records a task-view
permission helper at 98.695656%; structural round12 records more extensive
permission/access/retry forms up to 99.48617%. Their temporary source artifacts
are absent in this workspace. This candidate was reconstructed from current
source and original instructions, not copied from an unavailable best snapshot.
Only the smallest writable validation operation was tried; no retry helper,
AddTaskInternal, compareToken or ATERM variant was mixed into it.
The new private `ValidateWritableDlTask(const NWC24DlTask*)` returns the same
NWC24Err as the existing validator with write=TRUE. It reads the actual task
view and snapshots its cached header. In the owner-mismatch fallback, it reads
flags and the u16 group ID into operation-local values, initializes a real
permission result false, and makes it true only when bit 0x40 permits the group
query and the IDs match. These values belong to that validation operation;
none is dummy state, an optimization barrier or artificial spill.
Only NWC24UpdateDlTask's two existing writable validation calls use this helper.
The shared validator and all other callers stay unchanged. The second call
reacquires the current header and repeats tool/owner/group permission checks
after the time update. Its failure deliberately suppresses only the two reset
stores, rather than returning early; the original retry/store behavior remains.
No object is allocated, freed or written by the new helper. No pointer escapes,
public type changes, flags, assembly, padding or forced register use is added.
## Original call/data-flow checks
- Target and candidate place all nine direct calls at identical instruction
indices: tool/app/group queries, universal-time query, signed divide helper,
repeated tool/app/group queries, final StoreDlTask.
- Tool query precedes owner query, and group query occurs only after both fail
and flags bit 0x40 is set. The three query callees consume no incoming argument;
their actual implementations read process/library metadata.
- Both group IDs are loaded before NWC24GetGroupId and compared as u16 after
the call. Flags are u32; the permission result is BOOL. The task/header are
read-only, and the cached header lifetime survives the query sequence.
- Null task/header return -3/-9 before metadata queries. Permission failure is
-7. The 0xFFFF sentinel and u16 maximum-count checks retain their ordering.
- The time-output pointer remains the same eight-byte stack slot; __div2i still
receives the high/low time words and signed divisor 60. StoreDlTask receives
the original task pointer. No file/resource cleanup is owned by this helper.
- Current unsigned retry-mask semantics, retry loop, time helper, ID rechecks
and second-failure behavior are unchanged.
## Fresh measurements and validation
- NWC24UpdateDlTask: 95.00395 -> 98.695656%; source 249 -> 253 instructions,
target 253. Frame 0x30 -> target 0x20. Positional ctxdiff 250 -> 43 differences.
- Unit: 99.252884 -> 99.55186%; exact functions 27/30 and exact code 9304/12496
preserved; data 80/80 preserved. No linking changes.
- Every other one of the 29 functions has identical instructions and resolved
relocations versus the baseline, including all 27 exact functions.
- Every allocated data byte and section extent is unchanged. Existing source/
target alignment extents (.data 49/56 and .sbss 4/8) are unchanged; .sdata 16/16.
- Pool 3/3 identical. Literal advisory: 29 functions, 5 arguments, no candidates
or errors; unchanged AddTaskInternal is skipped because its size differs
from original. It remains 97.7182% and was not edited.
- Full 1,027-unit reports show only UpdateDlTask improved and no exact-function,
code, data or fuzzy regressions. Final post-build report equals candidate.
- ASan/UBSan: 262,144 exhaustive u16 group/flag cases, mutating the task group
during the group query to verify captured-value semantics. Seven directed
cases check nulls, sentinel/range behavior, tool/owner short-circuiting and
successful/failed second-validation stores.
- ASan/UBSan: 60,000 baseline/candidate Update scenarios compare return values,
task/header bytes, selected work pointer and ordered external call traces.
They cover metadata-query/time/store statuses, ID boundaries, group/owner
mismatches, retry counts/masks including bit 31, signed times, and controlled
task/header/work mutations at query boundaries. Actual production helper
bodies are extracted unchanged; metadata/time/store I/O is stubbed. No network
or file operation is performed. Leak detection is disabled for ptrace;
address and undefined-behavior instrumentation remain enabled.
- Full 43U build and build/43U/ok pass. DOL SHA1:
`26116613f624061ba99c8d1a299aaa6efa85670d`.
- git diff --check passes.
Private evidence: `/tmp/nwc24-write-permission/` contains baseline/candidate
sources and objects, reports, disassembly audit, host test generator/harness,
pool/ctxdiff/literal results and build logs. The preceding read-only screen is
in `/tmp/network-partial-recovery-screen/`. No retail assembly/binary is committed.
GATE: single justified partial recovery passes; frozen for independent review.
Historical 99.48617% is not claimed. Exact matching and linking remain open.

View File

@@ -1,79 +0,0 @@
# ODH Huffman node-type reconstruction, 2026-10-03 UTC
Base `a894ff5c`, branch `agent/bittle/odh-huffman-node-types`, 43U only.
Changed only the two tree declarations/initializers and their local pointer
record in `src/system/odh.cpp`, plus this log. No headers, public signatures,
metadata, linking flags, forced alignment or padding changed.
## Evidence and source correction
The decoder reads its tree entries and leaf categories with zero-extending
16-bit loads. Edges use the low 14 bits as relative halfword indices, while the
top two bits indicate terminal left/right branches. Leaves hold categories0..11.
The earlier source represented each pair of entries as one packed const u32 and
then accessed it through u16 pointers. HufftreeData likewise described the trees
as const u32 pointers, although every decoder use expects halfword entries.
Both tables are now explicit const u16 arrays, each with 24 actual entries.
HufftreeData::tables holds const u16 pointers. This removes the mismatched u32
object/u16 access representation, rather than changing the Huffman algorithm.
Every original word was split into its high and low halfwords in the target's
big-endian order; no value, tree edge or byte was added, removed or reordered.
The decoder's existing u16** parameter, its exact mangled public symbol, the C
ODH entry points and every caller are unchanged. The existing caller casts retain
the established ABI; no decoder writes a tree entry. Component0 uses the luma
value tree, components1/2 the chroma value tree, and all use the existing luma
prefix tree for zero-run categories. Request initialization starts at byte16,
bit offset0; successful decoding commits normalized offsets0..7.
## Read-only decoder audit
Prior sol-low, sol-high and fz10 attempts were reviewed. The existing decoder is
306/306 instructions with register allocation differences. Four-byte lookahead,
big-endian word assembly, unsigned bit-buffer operations, predictor selection,
DC/AC sign reconstruction, zero-run writes, EOB, success-only cursor/bit-count
commit, and error-path partial coefficient/predictor writes agree with target.
No additional algorithmic or stream-boundary behavior was invented.
Malformed overlong zero runs can exceed a nominal64-coefficient block in both
the source and original target; changing that behavior is outside this focused
type correction. Arbitrary table contents or invalid request states are likewise
not claimed to have acquired validation.
## Verification
- Each tree remains exactly48 bytes. Fresh source bytes, old packed-u32 bytes,
and original split-object payloads agree byte-for-byte.
- Exhaustive tree-path validation: all512 nine-bit luma prefixes and all2048
eleven-bit chroma prefixes agree with independent canonical Huffman codes,
including each valid leaf and the depth-limit invalid path.
- Fresh baseline/candidate builds: all28 reported function instruction streams
are unchanged. Entire .text14964, .data459, .rodata5856 and .sdata2 40 bytes
are identical, with the same section alignments. Defined function/object
symbol names, bindings, types and sizes are unchanged.
- Decoder remains95.57189%,306/306; unit remains99.55462%; exact26/28 and code
12876/14684; data6360/6360 (100%) and linking unchanged. No matching gain claimed.
- Pool: all10 strings identical to target.
- Literal audit:14 arguments across28 functions, no candidates, skips or errors.
- Full1027-unit report: zero exact-function/code/data/fuzzy regressions.
- Full43U build and build/43U/ok passed. DOL SHA1:
`26116613f624061ba99c8d1a299aaa6efa85670d`.
A host harness compiles the actual production decoder body and the new u16 table
initializers with fixed-width types and strict aliasing enabled. It passes24000
cases against an independent canonical-code bit reader:6657 successes and17343
truncation/malformed-code failures. Coverage includes components0/1/2, starting
bit offsets0..7, positive/negative DC and AC values, zero runs, EOB, full blocks,
4-byte-lookahead boundaries, invalid tree codes and run signs, output canaries,
predictors and request-state commit. Malformed overlong zero runs are excluded;
whole-image/Wii runtime execution is not claimed.
Private evidence: `/tmp/odh-node-types/` contains baseline/final reports and
source objects, tree-proof.log, pool/literal audits, full-build.log,
validate_decoder.py and decoder-tests.log. The earlier read-only decoder audit
is in `/tmp/odh-decoder-audit/`. No retail assembly or binary is committed or
uploaded.
GATE: real halfword node types reconstructed, ABI and all compiled bytes/metrics
preserved, tree and decoder behavior verified. Frozen for parent validation.

View File

@@ -1,990 +0,0 @@
# big1 max round
43U only. Worker scope: src/BS2/BS2Mach, src/scene/setting/AOSS, src/BS2/BS2Update, src/channelScript/CHANSVm
HEAD bdd15186a7a7ead832da3fc5e2688bf0552a4b4f
origin/main bdd15186a7a7ead832da3fc5e2688bf0552a4b4f
## src/BS2/BS2Mach
Initial instruction-exact 24/29. Objdiff {"fuzzy_match_percent": 98.159485, "total_code": "16980", "matched_code": "4940", "matched_code_percent": 29.093052, "total_data": "158528", "matched_data": "155504", "matched_data_percent": 98.092445, "total_functions": 29, "matched_functions": 24, "matched_functions_percent": 82.75862, "total_units": 1}
POOL IDENTICAL up to 91 (mine=91 base=91)
Open Run 16.744186%; 172 bytes.
Open BS2StartGame 98.72774%; 1572 bytes.
Open BS2StartGCGame 99.5614%; 912 bytes.
Open CheckBS2CommandStatus 99.50739%; 1624 bytes.
Open BS2Tick 98.230415%; 7760 bytes.
## src/scene/setting/AOSS
Initial instruction-exact 15/21. Objdiff {"fuzzy_match_percent": 96.777916, "total_code": "16192", "matched_code": "6436", "matched_code_percent": 39.748024, "total_data": "3928", "matched_data": "3928", "matched_data_percent": 100.0, "total_functions": 21, "matched_functions": 16, "matched_functions_percent": 76.190475, "total_units": 1}
POOL IDENTICAL up to 1 (mine=1 base=1)
Open AOSS_Init_old 93.78725%; 6336 bytes.
Open AOSSDecryptMessage 97.74143%; 1284 bytes.
Open AOSSApplyAuthOptions 98.77193%; 456 bytes.
Open AOSSSendHelloRequest 92.190475%; 1092 bytes.
Open AOSSXorBufferWithKey 98.605446%; 588 bytes.
## src/BS2/BS2Update
Initial instruction-exact 9/10. Objdiff {"fuzzy_match_percent": 94.23001, "total_code": "4052", "matched_code": "400", "matched_code_percent": 9.871669, "total_data": "10488", "matched_data": "10488", "matched_data_percent": 100.0, "total_functions": 10, "matched_functions": 9, "matched_functions_percent": 90.0, "total_units": 1}
POOL IDENTICAL up to 55 (mine=55 base=55)
Open UpdateThread 93.59803%; 3652 bytes.
## src/channelScript/CHANSVm
Initial instruction-exact 221/233. Objdiff {"fuzzy_match_percent": 99.364426, "total_code": "53564", "matched_code": "37608", "matched_code_percent": 70.211334, "total_data": "6904", "matched_data": "6904", "matched_data_percent": 100.0, "total_functions": 233, "matched_functions": 221, "matched_functions_percent": 94.849785, "total_units": 1}
POOL IDENTICAL up to 125 (mine=125 base=125)
Open CHANSVmConvertToFloatFromStr 97.59036%; 332 bytes.
Open VmDateDtor 94.96703%; 364 bytes.
Open VmStringReplace 97.878784%; 528 bytes.
Open VmStringSplit 98.04054%; 888 bytes.
Open CHANSVmFormatString 99.84919%; 1724 bytes.
Open VmBlobGetHexString 98.71951%; 328 bytes.
Open VmBlobPackCommon 97.949104%; 2672 bytes.
Open VmBlobUnpack 98.452614%; 2068 bytes.
Open VmWinEmuWrite 99.62687%; 268 bytes.
Open CHANSVmAddExe 99.625984%; 1016 bytes.
Open CHANSVmLinkModules 98.677246%; 756 bytes.
Open CHANSVmStep 96.46608%; 5012 bytes.
## src/BS2/BS2Mach::BS2Tick
Remote bdd15186, owned source UNCHANGED, local objdiff 98.230415%.
- ATTEMPT BS2Tick: reset progress pointer before partition stores through a dedicated inline initializer; source feebdf09ee6c; 98.230415%; instructions 1934/1940; structural/operand (136, 1665); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: read boot console code and write device code through distinct typed helpers; source 0da822d85d78; 98.230415%; instructions 1934/1940; structural/operand (136, 1665); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: compute game partition offset before the cached versus DVD path; source 24a6f27be2be; BUILD FAILED /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 -W nomissingreturn -ipa file -gccinc -fp_contract off -O4,s -enc SJIS -lang=c -MMD -c src/BS2/BS2Mach.c -o build/43U/src/src/BS2 && "/usr/bin/python3" tools/transform_dep.py build/43U/src/src/BS2/BS2Mach.d build/43U/src/src/BS2/BS2Mach.d ### mwcceppc.exe Compiler: # File: src\BS2\BS2Mach.c # -------------------------- # 1165: case 0x26: { # Error: ^^^^ # (10169) illegal use of keyword # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- ATTEMPT BS2Tick: compute game partition offset before both cached and DVD branches; source 679382637c01; 98.4732%; instructions 1934/1940; structural/operand (131, 1665); exact 24; data 155504; regress []; RETAINED.
- ATTEMPT BS2Tick: read-only disc header and separate read-only disc title view; source 1257019edfae; 98.48866%; instructions 1935/1940; structural/operand (132, 1703); exact 24; data 155504; regress []; RETAINED.
- ATTEMPT BS2Tick: calculate banner alignment by removing the actual address remainder; source ab0b8724bcda; 98.6768%; instructions 1936/1940; structural/operand (119, 1702); exact 24; data 155504; regress []; RETAINED.
- ATTEMPT BS2Tick: carry both IOS words in one native version value before storing low then high; source 52473c630592; 98.6665%; instructions 1936/1940; structural/operand (119, 1702); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: store IOS low word before reading and storing IOS high word; source a57c902cb098; 98.423195%; instructions 1936/1940; structural/operand (121, 1702); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: encode title-prefix dispatch as the original D R S T switch cases; source 330c30a0c312; 98.59175%; instructions 1937/1940; structural/operand (110, 1699); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: use native loader output locals ordered length address offset; source 7814326d92a8; 98.66392%; instructions 1936/1940; structural/operand (147, 1702); exact 24; data 155504; regress []; restored.
## src/scene/setting/AOSS::AOSS_Init_old
Remote 786a2dd3, owned source UNCHANGED, local objdiff 93.78725%.
Structural audit: instructions 1575/1584, structural/operand (1141, 1524).
Data audit: AOSS, BS2Update and CHANSVm already have 100% named/data measures. BS2Mach .bss/.sbss/.sdata are 100%; .data is pooled literals plus four jump tables with relocation targets in nonexact functions. No unmatched real named object or unjustified extent correction identified.
Checkpoint: four-unit quick GATE PASS, full 43U build ok, DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d, regressions 0, forbidden additions 0, readability warnings 0. BS2Tick 98.230415 -> 98.6768%; 1934 -> 1936 of 1940 instructions; no new exact function yet. Evidence /tmp/big1.gate-first.txt.
- ATTEMPT AOSS_Init_old: model the two independent default wait halfwords as named constant objects; source d1fefb8e620a; 93.67803%; instructions 1574/1584; structural/operand (1130, 1300); exact 15; data 3920; regress []; restored.
- ATTEMPT AOSS_Init_old: independent default arrays retain the target halfword loads; source d2b427a6baff; 93.88952%; instructions 1574/1584; structural/operand (1128, 1297); exact 15; data 3920; regress []; restored.
- ATTEMPT AOSS_Init_old: derive transaction record after random generation from the same byte cursor; source 5c8b5ebeec65; 93.68813%; instructions 1573/1584; structural/operand (1138, 1523); exact 15; data 3928; regress []; restored.
- ATTEMPT AOSS_Init_old: place send and receive address lifetimes in their target stack declaration order; source d643ade7e48d; 93.79419%; instructions 1575/1584; structural/operand (195, 1524); exact 15; data 3928; regress []; RETAINED.
- ATTEMPT AOSS_Init_old: use zero-first timeout branch sequence instead of a three-way switch; source 65a027183cc1; 94.179924%; instructions 1573/1584; structural/operand (185, 1519); exact 15; data 3928; regress []; RETAINED.
- ATTEMPT AOSS_Init_old: use matching zero-first timeout sequence after state dispatch; source e264e471f42f; 94.420456%; instructions 1571/1584; structural/operand (165, 1516); exact 15; data 3928; regress []; RETAINED.
- ATTEMPT AOSS_Init_old: read connection-state word with the target unsigned comparison; source bacde7f2d0bc; 94.31881%; instructions 1571/1584; structural/operand (163, 1516); exact 15; data 3928; regress []; restored.
- ATTEMPT AOSS_Init_old: share retry sleep call after choosing the bounded duration; source 02df5a9ef693; 94.48674%; instructions 1570/1584; structural/operand (154, 1510); exact 15; data 3928; regress []; RETAINED.
Target AOSS_Init_old reads r14 at 0xa20 before any assignment to r14 in the function. Existing initialized initializationResult retains defined source behavior; recreating an uninitialized value is forbidden and was not attempted.
## src/BS2/BS2Update::UpdateThread
Remote bf6bc87f, owned source UNCHANGED, local objdiff 93.59803%.
Structural audit: instructions 904/913, structural/operand (97, 745).
EntriesCount volatile proof: target UpdateThread 0xc2c stw r17,EntriesCount; 0xc30 lwz r0,EntriesCount, immediately rereads the stored global with no intervening instruction. Change is local to this static definition; other units cannot observe its definition qualifier.
- ATTEMPT UpdateThread: declare asynchronously published entry count volatile at its definition; source c23cf5584600; 93.90471%; instructions 905/913; structural/operand (94, 747); exact 9; data 10488; regress []; RETAINED.
- ATTEMPT UpdateThread: use an immutable view when validating input update entries; source cf860c856a75; BUILD FAILED /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 -W nomissingreturn -ipa file -gccinc -fp_contract off -O4,s -enc SJIS -lang=c -MMD -c src/BS2/BS2Update.c -o build/43U/src/src/BS2 && "/usr/bin/python3" tools/transform_dep.py build/43U/src/src/BS2/BS2Update.d build/43U/src/src/BS2/BS2Update.d ### mwcceppc.exe Compiler: # File: src\BS2\BS2Update.c # ---------------------------- # 255: discEntries[index].size = scratch.file.length; # Error: ^ # (10179) illegal assignment to constant # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- ATTEMPT UpdateThread: form the selected seat pointer after reading the seat file; source 23c61edba9da; 93.76999%; instructions 905/913; structural/operand (98, 748); exact 9; data 10488; regress []; restored.
- ATTEMPT UpdateThread: use a read-only disc entry view during the import loop; source 51b4d2f7f9ec; BUILD FAILED /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 -W nomissingreturn -ipa file -gccinc -fp_contract off -O4,s -enc SJIS -lang=c -MMD -c src/BS2/BS2Update.c -o build/43U/src/src/BS2 && "/usr/bin/python3" tools/transform_dep.py build/43U/src/src/BS2/BS2Update.d build/43U/src/src/BS2/BS2Update.d ### mwcceppc.exe Compiler: # File: src\BS2\BS2Update.c # ---------------------------- # 447: CurrentEntry = &discEntries[UpdateProgress]; # Error: ^ # (10209) illegal implicit conversion from 'const struct BS2UpdateEntry *' # to # 'struct BS2UpdateEntry *' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- ATTEMPT UpdateThread: read-only import view with mutable entry publication through the real table; source b2940a9daf08; 93.77875%; instructions 905/913; structural/operand (95, 747); exact 9; data 10488; regress []; restored.
- ATTEMPT UpdateThread: recompute import failure title from the real table instead of the cached view; source 3c5af61789ff; 93.56955%; instructions 905/913; structural/operand (96, 747); exact 9; data 10488; regress []; restored.
- ATTEMPT UpdateThread: start the capacity totals before selected count to reflect target live ranges; source a94c0c8c97ec; 93.89923%; instructions 905/913; structural/operand (94, 748); exact 9; data 10488; regress []; restored.
## src/channelScript/CHANSVm::CHANSVmConvertToFloatFromStr
Remote bf6bc87f, owned source UNCHANGED, local objdiff 97.59036%.
Structural audit: instructions 83/83, structural/operand (2, 2).
- ATTEMPT CHANSVmConvertToFloatFromStr: parse floating strings through a const input-object view; source 08f3842e7fed; 97.59036%; instructions 83/83; structural/operand (2, 2); exact 221; data 6904; regress []; restored.
## src/channelScript/CHANSVm::CHANSVmStep
Remote bf6bc87f, owned source UNCHANGED, local objdiff 96.46608%.
Structural audit: instructions 1253/1253, structural/operand (65, 313).
disasm_fn.py stops at the first unsupported paired-single save. Both required dumps were run; /tmp/big1.step.{target,ours}.full.asm supplements them with per-instruction decoding and relocation names. Target uses explicit zero-count branch and a pretested countdown loop; source uses arithmetic normalization and posttested loop. Frames both 0xf0; operand scratch at 0x60.
- ATTEMPT CHANSVmStep: normalize the requested instruction count with the target explicit branch; source b4399d1d991c; 96.86832%; instructions 1254/1253; structural/operand (60, 1229); exact 221; data 2232; regress []; restored.
- ATTEMPT CHANSVmStep: use the target pretested instruction countdown loop; source 85374133139a; 96.09896%; instructions 1258/1253; structural/operand (86, 1242); exact 221; data 2232; regress []; restored.
- ATTEMPT CHANSVmStep: access opcode result types directly instead of keeping a live table pointer; source f4b87f4270c2; 96.322426%; instructions 1254/1253; structural/operand (83, 1094); exact 221; data 2232; regress []; restored.
Discarded pretested-loop trial above used a mismatched tail substitution; it is excluded from distinct valid coverage. Following trials decrement inside the loop and preserve the target exit semantics.
- ATTEMPT CHANSVmStep: complete pretested countdown with one decrement after each interpreted instruction; source bbe417f69a7a; 96.26656%; instructions 1254/1253; structural/operand (65, 1237); exact 221; data 2232; regress []; restored.
- ATTEMPT CHANSVmStep: combine native zero-count normalization and complete pretested countdown; source fc94f5ea0968; 96.8332%; instructions 1255/1253; structural/operand (60, 1229); exact 221; data 2232; regress []; restored.
- ATTEMPT CHANSVmStep: keep copies indexed through their named scratch fields at inline boundaries; source b7504e908356; BUILD FAILED e -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 -W nomissingreturn -ipa file -gccinc -fp_contract off -O4,s -enc SJIS -lang=c -MMD -c src/channelScript/CHANSVm.c -o build/43U/src/src/channelScript && "/usr/bin/python3" tools/transform_dep.py build/43U/src/src/channelScript/CHANSVm.d build/43U/src/src/channelScript/CHANSVm.d ### mwcceppc.exe Compiler: # File: src\channelScript\CHANSVm.c # ------------------------------------ # 7761: int typeByte = &scratch.copies[0]->type; # Error: ^^ # (10499) a pointer/array type was expected for this operation instead of # 'struct CHANSVmObjHdr' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
## src/BS2/BS2Mach::BS2StartGCGame
Remote bf6bc87f, owned source DIFFERS: inspect remote before experimenting, local objdiff 99.5614%.
## src/BS2/BS2Mach::BS2StartGCGame
Remote bf6bc87f, owned source UNCHANGED, local objdiff 99.5614%.
Structural audit: instructions 228/228, structural/operand (2, 7).
- ATTEMPT BS2StartGCGame: poll existing volatile DVD command state directly as the target does; source 037ee4dd017f; 97.82895%; instructions 228/228; structural/operand (4, 9); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2StartGCGame: put timer frequency first in the native 64-bit clock product; source 62468e7959ef; 99.429825%; instructions 228/228; structural/operand (2, 11); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2StartGCGame: combine direct volatile cover polling with frequency-first clock multiplication; source 600487df3cf1; 97.697365%; instructions 228/228; structural/operand (4, 13); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2StartGCGame: use a const command-block view for cover polling and native clock product; source f70c0636b462; 97.697365%; instructions 228/228; structural/operand (4, 13); exact 24; data 155504; regress []; restored.
## src/BS2/BS2Mach::CheckBS2CommandStatus
Remote 27abfe81, owned source UNCHANGED, local objdiff 99.50739%.
Structural audit: instructions 406/406, structural/operand (2, 2).
- ATTEMPT CheckBS2CommandStatus: publish cache-command flag before computing the partition byte count; source ec11f8913900; 99.48276%; instructions 406/406; structural/operand (2, 4); exact 24; data 155504; regress []; restored.
- ATTEMPT CheckBS2CommandStatus: read partition count from an immutable TOC view; source 9deaa5878d9b; 99.50739%; instructions 406/406; structural/operand (2, 2); exact 24; data 155504; regress []; restored.
- ATTEMPT CheckBS2CommandStatus: read the partition count before publishing cache completion then round its bytes; source fee8dd9e67a9; 99.445816%; instructions 406/406; structural/operand (2, 7); exact 24; data 155504; regress []; restored.
## src/BS2/BS2Mach::Run
Remote 1f0eb50f, owned source UNCHANGED, local objdiff 16.744186%.
Structural audit: instructions 11/43, structural/operand (40, 42).
- ATTEMPT Run: guard the cache loop then use its native posttested block countdown; source 2d3f1492b5af; 11.976745%; instructions 11/43; structural/operand (42, 43); exact 24; data 155504; regress []; restored.
- ATTEMPT Run: use an indexed counted cache-block traversal; source 7e48cf01d356; 16.744186%; instructions 11/43; structural/operand (40, 42); exact 24; data 155504; regress []; restored.
- ATTEMPT Run: keep the entry callback typed separately from cache traversal; source 68ead673d9b4; 16.744186%; instructions 11/43; structural/operand (40, 42); exact 24; data 155504; regress []; restored.
Run remains an ABI trampoline: the target zeroes r2-r31 and r1, sets LR to entryPoint, and returns directly into it. Ordinary C preserves the ABI; new assembly and uninitialized values are forbidden. All three cache-loop/callback forms restored.
## src/BS2/BS2Mach::BS2StartGame
Remote 1f0eb50f, owned source UNCHANGED, local objdiff 98.72774%.
Structural audit: instructions 393/393, structural/operand (4, 10).
- ATTEMPT BS2StartGame: use the SDK-declared volatile PI register through a typed register pointer; source 0f002cb4ee53; 98.72774%; instructions 393/393; structural/operand (4, 10); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2StartGame: put the precomputed DI enable mask before the loaded register value; source 66df856a1c6c; 98.71501%; instructions 393/393; structural/operand (4, 10); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2StartGame: poll the cover block through an immutable command view; source 449060454a23; 98.72774%; instructions 393/393; structural/operand (4, 10); exact 24; data 155504; regress []; restored.
## src/scene/setting/AOSS::AOSSDecryptMessage
Remote 1f0eb50f, owned source UNCHANGED, local objdiff 97.74143%.
Structural audit: instructions 321/321, structural/operand (2, 89).
## src/channelScript/CHANSVm::CHANSVmConvertToFloatFromStr
Remote e9114959, owned source UNCHANGED, local objdiff 97.59036%.
Structural audit: instructions 83/83, structural/operand (2, 2).
- ATTEMPT CHANSVmConvertToFloatFromStr: initialize the parse end pointer at its local declaration; source 6799748b27b4; 97.59036%; instructions 83/83; structural/operand (2, 2); exact 221; data 6904; regress []; restored.
- ATTEMPT CHANSVmConvertToFloatFromStr: read the object type directly at the parse branch boundary; source 76ea6ee2c272; 95.180725%; instructions 83/83; structural/operand (2, 3); exact 221; data 6904; regress []; restored.
- ATTEMPT CHANSVmConvertToFloatFromStr: widen the local type tag to its natural comparison width; source 9429a50f549b; 97.59036%; instructions 83/83; structural/operand (2, 2); exact 221; data 6904; regress []; restored.
## src/scene/setting/AOSS::AOSSDecryptMessage
Remote e9114959, owned source UNCHANGED, local objdiff 97.74143%.
Structural audit: instructions 321/321, structural/operand (2, 89).
- ATTEMPT AOSSDecryptMessage: derive cipher state after calculating the next stream index; source 57165f16c767; 97.74143%; instructions 321/321; structural/operand (2, 89); exact 15; data 3928; regress []; restored.
- ATTEMPT AOSSDecryptMessage: place the keystream byte before the input byte in XOR expression; source 0caf30a1b22e; 97.74143%; instructions 321/321; structural/operand (2, 89); exact 15; data 3928; regress []; restored.
- ATTEMPT AOSSDecryptMessage: use an immutable input message view while retaining the writable output payload; source 0366d2d5dc6b; 97.74143%; instructions 321/321; structural/operand (2, 89); exact 15; data 3928; regress []; restored.
## src/scene/setting/AOSS::AOSSApplyAuthOptions
Remote e9114959, owned source UNCHANGED, local objdiff 98.77193%.
Structural audit: instructions 114/114, structural/operand (0, 22).
- ATTEMPT AOSSApplyAuthOptions: reuse the response record cursor for the nested option traversal; source f32e89b5aae4; 96.18421%; instructions 114/114; structural/operand (2, 38); exact 15; data 3928; regress []; restored.
- ATTEMPT AOSSApplyAuthOptions: initialize accumulated flags immediately after validation and before record search; source 199c114043b3; 96.97369%; instructions 114/114; structural/operand (3, 26); exact 15; data 3928; regress []; restored.
- ATTEMPT AOSSApplyAuthOptions: use the input length itself as the mutable traversal length; source 23c89be53628; 98.20175%; instructions 114/114; structural/operand (0, 32); exact 15; data 3928; regress []; restored.
## src/scene/setting/AOSS::AOSSSendHelloRequest
Remote e9114959, owned source UNCHANGED, local objdiff 92.190475%.
Structural audit: instructions 271/273, structural/operand (33, 254).
- ATTEMPT AOSSSendHelloRequest: compute the hello-record checksum with one complete byte traversal; source 62cfc775fc13; 87.02198%; instructions 270/273; structural/operand (43, 266); exact 15; data 3928; regress []; restored.
- ATTEMPT AOSSSendHelloRequest: read request records through a const payload view; source b65700d357f7; 92.190475%; instructions 271/273; structural/operand (33, 254); exact 15; data 3928; regress []; restored.
- ATTEMPT AOSSSendHelloRequest: derive cipher state after advancing the schedule index; source ef030a5a74e4; 92.190475%; instructions 271/273; structural/operand (33, 254); exact 15; data 3928; regress []; restored.
## src/scene/setting/AOSS::AOSSXorBufferWithKey
Remote e9114959, owned source UNCHANGED, local objdiff 98.605446%.
Structural audit: instructions 147/147, structural/operand (2, 36).
- ATTEMPT AOSSXorBufferWithKey: form each XOR byte with the key mask as its first operand; source af3b0a3e996c; 97.993195%; instructions 147/147; structural/operand (2, 46); exact 15; data 3928; regress []; restored.
- ATTEMPT AOSSXorBufferWithKey: keep the byte XOR in an unsigned word before storing the byte; source 5788be6f728c; 98.605446%; instructions 147/147; structural/operand (2, 36); exact 15; data 3928; regress []; restored.
- ATTEMPT AOSSXorBufferWithKey: update packet bytes with a direct compound XOR; source 7fa4dbc9d5a9; 98.23129%; instructions 147/147; structural/operand (2, 46); exact 15; data 3928; regress []; restored.
## src/channelScript/CHANSVm::CHANSVmFormatString
Remote e9114959, owned source UNCHANGED, local objdiff 99.84919%.
Structural audit: instructions 431/431, structural/operand (0, 13).
- ATTEMPT CHANSVmFormatString: read the converted source object through a const object view; source 22c45d4d7f1a; 99.84919%; instructions 431/431; structural/operand (0, 13); exact 221; data 6904; regress []; restored.
- ATTEMPT CHANSVmFormatString: scope the converted string object with the string-format branch; source d00bd2acb89a; 99.84919%; instructions 431/431; structural/operand (0, 13); exact 221; data 6904; regress []; restored.
- ATTEMPT CHANSVmFormatString: load the source string length before incrementing the format argument cursor; source e47a93d20ac4; 99.19489%; instructions 433/431; structural/operand (29, 132); exact 220; data 2232; regress ['VmBlobFill']; restored.
## src/channelScript/CHANSVm::VmDateDtor
Remote e9114959, owned source UNCHANGED, local objdiff 94.96703%.
Structural audit: instructions 91/91, structural/operand (5, 7).
- ATTEMPT VmDateDtor: read fields directly from the calendar local after the calendar helper returns; source 43d213e09f16; 89.14286%; instructions 90/91; structural/operand (11, 85); exact 220; data 6904; regress ['VmBlobFill']; restored.
- ATTEMPT VmDateDtor: read calendar name tables through const pointer-entry views; source 650a83106ab7; 91.62637%; instructions 91/91; structural/operand (30, 63); exact 221; data 6904; regress []; restored.
- ATTEMPT VmDateDtor: isolate calendar formatting in a typed inline read-only calendar helper; source cb719e233153; 80.14286%; instructions 98/91; structural/operand (33, 84); exact 220; data 6904; regress ['VmBlobFill']; restored.
## src/channelScript/CHANSVm::VmStringReplace
Remote e9114959, owned source UNCHANGED, local objdiff 97.878784%.
Structural audit: instructions 132/132, structural/operand (0, 40).
- ATTEMPT VmStringReplace: load search payload length before the parent payload length; source fe576a4d2273; 97.992424%; instructions 132/132; structural/operand (0, 40); exact 221; data 6904; regress []; RETAINED.
- ATTEMPT VmStringReplace: declare input byte views inside the validated argument payload region; source ff6e49dfad3a; BUILD FAILED /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 -W nomissingreturn -ipa file -gccinc -fp_contract off -O4,s -enc SJIS -lang=c -MMD -c src/channelScript/CHANSVm.c -o build/43U/src/src/channelScript && "/usr/bin/python3" tools/transform_dep.py build/43U/src/src/channelScript/CHANSVm.d build/43U/src/src/channelScript/CHANSVm.d ### mwcceppc.exe Compiler: # File: src\channelScript\CHANSVm.c # ------------------------------------ # 3100: const char* parentStr = VmParentObj->value.string_v->spData; # Error: ^^^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- ATTEMPT VmStringReplace: initialize input and output cursors in traversal order; source 45cfca463149; 97.954544%; instructions 132/132; structural/operand (0, 41); exact 221; data 6904; regress []; restored.
## src/channelScript/CHANSVm::VmStringSplit
Remote e9114959, owned source UNCHANGED, local objdiff 98.04054%.
Structural audit: instructions 222/222, structural/operand (0, 66).
- ATTEMPT VmStringSplit: keep the delimiter argument as a const object view after conversion; source 42c5506b1761; BUILD FAILED VL_SDK/include/private/bte -i build/43U/include -DBUILD_VERSION=0 -DVERSION_43U -i libs/RVL_SDK/include/private/bte -DNDEBUG=1 -DTARGET_RVL -W nomissingreturn -ipa file -gccinc -fp_contract off -O4,s -enc SJIS -lang=c -MMD -c src/channelScript/CHANSVm.c -o build/43U/src/src/channelScript && "/usr/bin/python3" tools/transform_dep.py build/43U/src/src/channelScript/CHANSVm.d build/43U/src/src/channelScript/CHANSVm.d ### mwcceppc.exe Compiler: # File: src\channelScript\CHANSVm.c # ------------------------------------ # 3258: CHANSVmConvertObjectType(VmInst, CHANS_VM_OBJ_TYPE_STRING, arg0); # Error: ^ # (10209) illegal implicit conversion from 'const struct CHANSVmObjHdr *' to # 'struct CHANSVmObjHdr *' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- ATTEMPT VmStringSplit: load source and delimiter lengths before their byte views; source 3ef334cea05b; 97.96397%; instructions 222/222; structural/operand (2, 76); exact 221; data 6904; regress []; restored.
- ATTEMPT VmStringSplit: normalize zero-delimiter element traversal as a counted for loop; source 72b421800c7b; 97.96397%; instructions 222/222; structural/operand (2, 68); exact 221; data 6904; regress []; restored.
## src/channelScript/CHANSVm::VmBlobGetHexString
Remote e9114959, owned source UNCHANGED, local objdiff 98.71951%.
Structural audit: instructions 82/82, structural/operand (0, 14).
- ATTEMPT VmBlobGetHexString: read hexadecimal source bytes and digit characters through const views; source f11f1776011f; 98.71951%; instructions 82/82; structural/operand (0, 14); exact 221; data 6904; regress []; restored.
- ATTEMPT VmBlobGetHexString: use one advancing destination cursor for both hexadecimal characters; source e83f180ba7cb; 88.53658%; instructions 77/82; structural/operand (14, 40); exact 221; data 6904; regress []; restored.
- ATTEMPT VmBlobGetHexString: load each input byte once before selecting both hexadecimal digits; source 3876a1dc4063; 92.36585%; instructions 81/82; structural/operand (11, 36); exact 221; data 6904; regress []; restored.
## src/channelScript/CHANSVm::VmStringReplace
Remote e9114959, owned source UNCHANGED, local objdiff 97.992424%.
Structural audit: instructions 132/132, structural/operand (0, 40).
- ATTEMPT VmStringReplace: keep parent, search, and replacement byte buffers as const input views; source 2eff216b221b; 97.992424%; instructions 132/132; structural/operand (0, 40); exact 221; data 6904; regress []; restored.
## src/channelScript/CHANSVm::VmStringSplit
Remote e9114959, owned source UNCHANGED, local objdiff 98.04054%.
Structural audit: instructions 222/222, structural/operand (0, 66).
- ATTEMPT VmStringSplit: keep source and delimiter bytes as const input views; source f3a96f95b2fa; 98.04054%; instructions 222/222; structural/operand (0, 66); exact 221; data 6904; regress []; restored.
## src/channelScript/CHANSVm::CHANSVmFormatString
Remote 45aaeb16, owned source UNCHANGED, local objdiff 99.84919%.
Structural audit: instructions 431/431, structural/operand (0, 13).
- ATTEMPT CHANSVmFormatString: separate the temporary string object lifetime from the formatted byte length; source 47f052bd0f87; 99.84919%; instructions 431/431; structural/operand (0, 13); exact 221; data 6904; regress []; restored.
## src/channelScript/CHANSVm::VmBlobPackCommon
Remote 45aaeb16, owned source UNCHANGED, local objdiff 97.949104%.
Structural audit: instructions 668/668, structural/operand (0, 244).
- ATTEMPT VmBlobPackCommon: read source blob descriptors through const pointers; source 285844da5341; 97.949104%; instructions 668/668; structural/operand (0, 244); exact 221; data 6904; regress []; restored.
- ATTEMPT VmBlobPackCommon: load the high integer word before the low word in integer packing; source da34f1b29bad; 97.949104%; instructions 668/668; structural/operand (0, 244); exact 221; data 6904; regress []; restored.
- ATTEMPT VmBlobPackCommon: initialize format traversal before argument traversal in packing; source b5ddd715f33b; 97.949104%; instructions 668/668; structural/operand (0, 244); exact 221; data 6904; regress []; restored.
## src/channelScript/CHANSVm::VmBlobUnpack
Remote 45aaeb16, owned source UNCHANGED, local objdiff 98.452614%.
Structural audit: instructions 517/517, structural/operand (0, 141).
- ATTEMPT VmBlobUnpack: read the unpack format through a const wide-character view; source ceb7d96fa71c; 98.452614%; instructions 517/517; structural/operand (0, 141); exact 221; data 6904; regress []; restored.
- ATTEMPT VmBlobUnpack: initialize decoded-buffer words in their memory order; source 2b671815931d; 98.448746%; instructions 517/517; structural/operand (2, 143); exact 221; data 6904; regress []; restored.
- ATTEMPT VmBlobUnpack: initialize format traversal before result-element traversal in unpacking; source ea2dbd1d2bba; 98.44294%; instructions 517/517; structural/operand (0, 142); exact 221; data 6904; regress []; restored.
## src/channelScript/CHANSVm::VmWinEmuWrite
Remote 45aaeb16, owned source UNCHANGED, local objdiff 99.62687%.
Structural audit: instructions 67/67, structural/operand (0, 5).
- ATTEMPT VmWinEmuWrite: read the converted document string through a const object view; source fbab2e4baed3; 99.62687%; instructions 67/67; structural/operand (0, 5); exact 221; data 6904; regress []; restored.
- ATTEMPT VmWinEmuWrite: calculate string extent before initializing its byte cursor; source c1191ce56414; 99.62687%; instructions 67/67; structural/operand (0, 5); exact 221; data 6904; regress []; restored.
- ATTEMPT VmWinEmuWrite: use a counted block traversal for document encoding; source c2c25edecf0a; 99.62687%; instructions 67/67; structural/operand (0, 5); exact 221; data 6904; regress []; restored.
## src/channelScript/CHANSVm::CHANSVmAddExe
Remote 45aaeb16, owned source UNCHANGED, local objdiff 99.625984%.
Structural audit: instructions 254/254, structural/operand (0, 16).
- ATTEMPT CHANSVmAddExe: retain the executable-type argument as an explicit scalar; source e81b2f9afb42; 99.625984%; instructions 254/254; structural/operand (0, 16); exact 221; data 6904; regress []; restored.
- ATTEMPT CHANSVmAddExe: read module-header validation fields through a const descriptor view; source 4b55dbb9eea2; 99.625984%; instructions 254/254; structural/operand (0, 16); exact 221; data 6904; regress []; restored.
- ATTEMPT CHANSVmAddExe: derive the executable payload through its typed module member; source 2dd735c854a6; 98.19292%; instructions 254/254; structural/operand (7, 26); exact 221; data 6904; regress []; restored.
## src/channelScript/CHANSVm::CHANSVmLinkModules
Remote 45aaeb16, owned source UNCHANGED, local objdiff 98.677246%.
Structural audit: instructions 189/189, structural/operand (0, 43).
- ATTEMPT CHANSVmLinkModules: read dispatch table entries through a const table view; source 99fcdb1d7c09; 98.677246%; instructions 189/189; structural/operand (0, 43); exact 221; data 6904; regress []; restored.
- ATTEMPT CHANSVmLinkModules: keep each copied dispatch descriptor const within the name-resolution pass; source 4a3167bdf8c3; 98.677246%; instructions 189/189; structural/operand (0, 43); exact 221; data 6904; regress []; restored.
- ATTEMPT CHANSVmLinkModules: separate module traversal from the two scoped name-resolution iterators; source 4c8d4dcbf81f; 98.677246%; instructions 189/189; structural/operand (0, 43); exact 221; data 6904; regress []; restored.
DECLSEARCH AOSSApplyAuthOptions: source-level structure and const/lifetime trials exhausted; run declaration-order search, maximum 300 evaluations.
DECLSEARCH AOSSApplyAuthOptions: | regress [].
DECLSEARCH AOSSApplyAuthOptions: restored due to failure or exact-function regression.
DECLSEARCH AOSSDecryptMessage: source-level structure and const/lifetime trials exhausted; run declaration-order search, maximum 300 evaluations.
DECLSEARCH AOSSDecryptMessage: | regress [].
DECLSEARCH AOSSDecryptMessage: restored due to failure or exact-function regression.
DECLSEARCH AOSSXorBufferWithKey: source-level structure and const/lifetime trials exhausted; run declaration-order search, maximum 300 evaluations.
DECLSEARCH AOSSXorBufferWithKey: | regress [].
DECLSEARCH AOSSXorBufferWithKey: restored due to failure or exact-function regression.
DECLSEARCH AOSSApplyAuthOptions: source-level structure and const/lifetime trials exhausted; run declaration-order search, maximum 300 evaluations.
DECLSEARCH CHANSVmFormatString: source-level structure and const/lifetime trials exhausted; run declaration-order search, maximum 300 evaluations.
DECLSEARCH AOSSApplyAuthOptions: declaration block: | u32 flags = 0; | const AOSSReplyOption* responseRecord; | AOSSConfigRecord* configRecord; | AOSSStoredConfig* wep40Config; | AOSSStoredConfig* wep104Config; | AOSSStoredConfig* tkipConfig; | AOSSStoredConfig* aesConfig; | u8* networkSettings; | const AOSSReplyOption* option; | u32 length; | s32 remainingLength = responseLength; | int result; | start (0, 22) | best (0, 22) after 177 builds; source restored; best order was: | u32 flags = 0; | const AOSSReplyOption* responseRecord; | AOSSConfigRecord* configRecord; | AOSSStoredConfig* wep40Config; | AOSSStoredConfig* wep104Config; | AOSSStoredConfig* tkipConfig; | AOSSStoredConfig* aesConfig; | u8* networkSettings; | const AOSSReplyOption* option; | u32 length; | s32 remainingLength = responseLength; | int result; | | regress [].
DECLSEARCH AOSSDecryptMessage: source-level structure and const/lifetime trials exhausted; run declaration-order search, maximum 300 evaluations.
Coverage exclusions: CHANSVmStep source 85374133139a had the wrong countdown tail and is excluded; CHANSVmAddExe source using header = mod->module reads a pointer member instead of deriving the adjacent payload and is excluded. Failed compilations never count as successful source attempts.
Data proof: target BS2Mach .data contains seven pooled literal ranges at offsets 0, 0x22, 0x3c, 0x428, 0x452, 0x648, 0x669 and four relocated switch tables at 0x3f4, 0x590, 0xa4c, 0xaa8. Their table destinations belong to nonexact command/tick code. No named source object can justify a target symbol rename or extent correction; no config address/extent edits made.
DECLSEARCH AOSSDecryptMessage: declaration block: | u32 checksum; | u8 manufacturerAddress[8]; | AOSSKeySchedule schedule; | AOSSEncryptedPayload* encrypted = &message->payload.encrypted; | u8* decryptedData; | u32 controlFlags; | u32 dataLength; | u32 i; | s32 crcIndex; | u32 firstIndex; | u32 secondIndex; | u32 firstValue; | u32 secondValue; | u32 stateIndex; | u32 crc; | const u8* inputCursor; | u8* state; | u8* outputCursor; | int result; | start (0, 87) | best (0, 87) after 300 builds; source restored; best order was: | u32 checksum; | u8 manufacturerAddress[8]; | AOSSKeySchedule schedule; | AOSSEncryptedPayload* encrypted = &message->payload.encrypted; | u8* decryptedData; | u32 controlFlags; | u32 dataLength; | u32 i; | s32 crcIndex; | u32 firstIndex; | u32 secondIndex; | u32 firstValue; | u32 secondValue; | u32 stateIndex; | u32 crc; | const u8* inputCursor; | u8* state; | u8* outputCursor; | int result; | | regress [].
DECLSEARCH AOSSXorBufferWithKey: source-level structure and const/lifetime trials exhausted; run declaration-order search, maximum 300 evaluations.
DECLSEARCH AOSSXorBufferWithKey: declaration block: | u8* temporaryHalf; | s32 halfLength = length / 2; | u8* packetHalf; | s32 round; | u8* keyMask; | u8* temporary; | s32 keyIndex; | s32 index; | int result = -1; | u8* packetBytes; | start (0, 34) | best (0, 34) after 118 builds; source restored; best order was: | u8* temporaryHalf; | s32 halfLength = length / 2; | u8* packetHalf; | s32 round; | u8* keyMask; | u8* temporary; | s32 keyIndex; | s32 index; | int result = -1; | u8* packetBytes; | | regress [].
DECLSEARCH CHANSVmFormatString: declaration block: | u8* fmtBuf; | wchar_t wideFmt[32]; | u32 halfMaxSize; | BOOL flag; | CHANSVmObjHdr* tempObj; | u32 argIdxCounter; | u32 totalLen; | u8* str; | u32 strLen; | u32 strPos; | u32 segStart; | u32 fmtBufPos; | u8* tmpBuf; | u32 maxSize; | u8* outputBuf; | u32 outputPos; | u32 maxLitLen; | u32 litLen; | u32 isEscaped; | CHANSVmObjHdr* cv; | CHANSVmPrivate* pVm; | CHANSVmObjHdr* argObj; | start (0, 13) | best (0, 13) after 300 builds; source restored; best order was: | u8* fmtBuf; | wchar_t wideFmt[32]; | u32 halfMaxSize; | BOOL flag; | CHANSVmObjHdr* tempObj; | u32 argIdxCounter; | u32 totalLen; | u8* str; | u32 strLen; | u32 strPos; | u32 segStart; | u32 fmtBufPos; | u8* tmpBuf; | u32 maxSize; | u8* outputBuf; | u32 outputPos; | u32 maxLitLen; | u32 litLen; | u32 isEscaped; | CHANSVmObjHdr* cv; | CHANSVmPrivate* pVm; | CHANSVmObjHdr* argObj; | | regress [].
DECLSEARCH VmWinEmuWrite: source-level structure and const/lifetime trials exhausted; run declaration-order search, maximum 300 evaluations.
## src/BS2/BS2Mach::BS2Tick
Remote 29fe1efa, owned source UNCHANGED, local objdiff 98.6768%.
Structural audit: instructions 1936/1940, structural/operand (119, 1702).
Device-code access proof: private/os.h defines vu16 __OSDeviceCode with ADDRESS(OS_BASE_CACHED | OS_ADDR_DEVICE_CODE), 0x800030e6. Target case 5 uses an independent lis for each write; use the existing SDK object instead of a nonvolatile raw pointer.
DECLSEARCH VmWinEmuWrite: declaration block: | CHANSVmObjHdr* strObj; | u32 offset; | u32 totalLength; | u8 buf[VM_STRING_SIZE]; | s32 outLen; | s32 inLen; | s32 result; | u32 remaining; | start (0, 5) | best (0, 5) after 71 builds; source restored; best order was: | CHANSVmObjHdr* strObj; | u32 offset; | u32 totalLength; | u8 buf[VM_STRING_SIZE]; | s32 outLen; | s32 inLen; | s32 result; | u32 remaining; | | regress [].
- ATTEMPT BS2Tick: write the device code through its SDK-declared volatile low-memory object; source 91b01c705232; 98.6768%; instructions 1936/1940; structural/operand (119, 1702); exact 24; data 155504; regress []; restored.
DECLSEARCH CHANSVmAddExe: source-level structure and const/lifetime trials exhausted; run declaration-order search, maximum 300 evaluations.
- ATTEMPT BS2Tick: make title-prefix fallthrough and unrestricted-prefix branches explicit; source f576609ce6f4; 98.6768%; instructions 1936/1940; structural/operand (119, 1702); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: put the existing-partition transition before the missing-partition exit; source 24a8cfb915ec; 98.59278%; instructions 1937/1940; structural/operand (113, 1699); exact 24; data 155504; regress []; restored.
DECLSEARCH CHANSVmAddExe: declaration block: | CHANSVmPrivate* pVm = (CHANSVmPrivate*)vm; | ModuleHeader* mod; | CHANSVmModule* header; | u32 maxEnd; | u32 size; | u32 cnt; | u32 ofs; | start (0, 16) | best (0, 16) after 52 builds; source restored; best order was: | CHANSVmPrivate* pVm = (CHANSVmPrivate*)vm; | ModuleHeader* mod; | CHANSVmModule* header; | u32 maxEnd; | u32 size; | u32 cnt; | u32 ofs; | | regress [].
DECLSEARCH CHANSVmLinkModules: source-level structure and const/lifetime trials exhausted; run declaration-order search, maximum 300 evaluations.
DECLSEARCH CHANSVmLinkModules: declaration block: | CHANSVmPrivate* pVm = (CHANSVmPrivate*)vm; | CHANSVmModule* module; | u32 modIdx; | u32 i; | start (0, 43) | best (0, 43) after 13 builds; source restored; best order was: | CHANSVmPrivate* pVm = (CHANSVmPrivate*)vm; | CHANSVmModule* module; | u32 modIdx; | u32 i; | | regress [].
## src/channelScript/CHANSVm::CHANSVmAddExe
Remote 29fe1efa, owned source UNCHANGED, local objdiff 99.625984%.
Structural audit: instructions 254/254, structural/operand (0, 16).
- ATTEMPT CHANSVmAddExe: derive the adjacent payload before module validation without reading its fields early; source 4101ec2d810b; 98.31102%; instructions 254/254; structural/operand (28, 60); exact 221; data 6904; regress []; restored.
## src/BS2/BS2Mach::CheckBS2CommandStatus
Remote 29fe1efa, owned source UNCHANGED, local objdiff 99.50739%.
Structural audit: instructions 406/406, structural/operand (2, 2).
- ATTEMPT CheckBS2CommandStatus: calculate partition cache extent through a const TOC inline helper; source 6fc3d898a116; 98.81527%; instructions 406/406; structural/operand (4, 12); exact 24; data 155504; regress []; restored.
## src/channelScript/CHANSVm::CHANSVmConvertToFloatFromStr
Remote 29fe1efa, owned source UNCHANGED, local objdiff 97.59036%.
Structural audit: instructions 83/83, structural/operand (2, 2).
- ATTEMPT CHANSVmConvertToFloatFromStr: load the parse type after initializing the addressable end pointer; source 993ebfb33b38; 95.180725%; instructions 83/83; structural/operand (2, 3); exact 221; data 6904; regress []; restored.
- ATTEMPT CHANSVmConvertToFloatFromStr: save the string-type predicate before end-pointer initialization; source 2de2182cafda; 94.93976%; instructions 85/83; structural/operand (5, 74); exact 220; data 6904; regress ['VmBlobFill']; restored.
AOSSParseNetworkSettings is already 100.0% in objdiff and 0 structural/0 operand differences with declsearch disassembly. ctxdiff/gate odiff normalization reports five CR1 branch false differences: the first operand is cr1, not the branch destination, and the -56 difference equals the function start-offset shift. Per the already-matched-function rule it was not retuned. Acceptance tool left unchanged; its reported instruction-exact count remains 15/21.
Checkpoint: final retained AOSS_Init_old, UpdateThread and VmStringReplace improvements pass the four-unit quick gate. Full 43U build succeeds; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d; zero regressions, forbidden additions and readability warnings. All instruction-exact/code/data counts remain unchanged. Evidence /tmp/big1.gate-second.txt.
## Final clean-build gate and coverage
Full non-quick gate: four owned units, GATE PASS. Full 43U build ok; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d; pools IDENTICAL; regressions 0; forbidden additions 0; readability warnings 0. Raw gate evidence follows.
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/BS2/BS2Mach] pool: IDENTICAL
[src/BS2/BS2Mach] objdiff: code 4940/16980 data 155504/158528 functions 24/29 fuzzy 98.3635 linked code 0
[src/BS2/BS2Mach] instruction-exact functions: 24/29
[src/BS2/BS2Mach] section .bss size 155232 match 100.0
[src/BS2/BS2Mach] section .data size 3024 match None
[src/BS2/BS2Mach] section .sbss size 240 match 100.0
[src/BS2/BS2Mach] section .sdata size 32 match 100.0
[src/BS2/BS2Mach] section .text size 16980 match 98.36349
[src/BS2/BS2Mach] below 100: Run 16.744186
[src/BS2/BS2Mach] below 100: BS2StartGame 98.72774
[src/BS2/BS2Mach] below 100: BS2StartGCGame 99.5614
[src/BS2/BS2Mach] below 100: CheckBS2CommandStatus 99.50739
[src/BS2/BS2Mach] below 100: BS2Tick 98.6768
[src/BS2/BS2Mach] baseline: code 4940/16980 data 155504 functions 24 fuzzy 98.1595
[src/scene/setting/AOSS] pool: IDENTICAL
[src/scene/setting/AOSS] objdiff: code 6436/16192 data 3928/3928 functions 16/21 fuzzy 97.0516 linked code 0
[src/scene/setting/AOSS] instruction-exact functions: 15/21
[src/scene/setting/AOSS] section .bss size 3496 match 100.0
[src/scene/setting/AOSS] section .data size 368 match 100.0
[src/scene/setting/AOSS] section .sbss size 32 match 100.0
[src/scene/setting/AOSS] section .sdata size 24 match 100.0
[src/scene/setting/AOSS] section .sdata2 size 8 match 100.0
[src/scene/setting/AOSS] section .text size 16192 match 97.05163
[src/scene/setting/AOSS] below 100: AOSS_Init_old 94.48674
[src/scene/setting/AOSS] below 100: AOSSDecryptMessage 97.74143
[src/scene/setting/AOSS] below 100: AOSSApplyAuthOptions 98.77193
[src/scene/setting/AOSS] below 100: AOSSSendHelloRequest 92.190475
[src/scene/setting/AOSS] below 100: AOSSXorBufferWithKey 98.605446
[src/scene/setting/AOSS] baseline: code 6436/16192 data 3928 functions 16 fuzzy 96.7779
[src/BS2/BS2Update] pool: IDENTICAL
[src/BS2/BS2Update] objdiff: code 400/4052 data 10488/10488 functions 9/10 fuzzy 94.5064 linked code 0
[src/BS2/BS2Update] instruction-exact functions: 9/10
[src/BS2/BS2Update] section .bss size 9056 match 100.0
[src/BS2/BS2Update] section .data size 1328 match 100.0
[src/BS2/BS2Update] section .sbss size 80 match 100.0
[src/BS2/BS2Update] section .sdata size 24 match 100.0
[src/BS2/BS2Update] section .text size 4052 match 94.50642
[src/BS2/BS2Update] below 100: UpdateThread 93.90471
[src/BS2/BS2Update] baseline: code 400/4052 data 10488 functions 9 fuzzy 94.2300
[src/channelScript/CHANSVm] pool: IDENTICAL
[src/channelScript/CHANSVm] objdiff: code 37608/53564 data 6904/6904 functions 221/233 fuzzy 99.3655 linked code 0
[src/channelScript/CHANSVm] instruction-exact functions: 221/233
[src/channelScript/CHANSVm] section .data size 4672 match 100.0
[src/channelScript/CHANSVm] section .rodata size 1432 match 100.0
[src/channelScript/CHANSVm] section .sbss size 16 match 100.0
[src/channelScript/CHANSVm] section .sdata size 600 match 100.0
[src/channelScript/CHANSVm] section .sdata2 size 184 match 100.0
[src/channelScript/CHANSVm] section .text size 53564 match 99.36555
[src/channelScript/CHANSVm] below 100: CHANSVmConvertToFloatFromStr 97.59036
[src/channelScript/CHANSVm] below 100: VmDateDtor 94.96703
[src/channelScript/CHANSVm] below 100: VmStringReplace 97.992424
[src/channelScript/CHANSVm] below 100: VmStringSplit 98.04054
[src/channelScript/CHANSVm] below 100: CHANSVmFormatString 99.84919
[src/channelScript/CHANSVm] below 100: VmBlobGetHexString 98.71951
[src/channelScript/CHANSVm] below 100: VmBlobPackCommon 97.949104
[src/channelScript/CHANSVm] below 100: VmBlobUnpack 98.452614
[src/channelScript/CHANSVm] below 100: VmWinEmuWrite 99.62687
[src/channelScript/CHANSVm] below 100: CHANSVmAddExe 99.625984
[src/channelScript/CHANSVm] below 100: CHANSVmLinkModules 98.677246
[src/channelScript/CHANSVm] below 100: CHANSVmStep 96.46608
[src/channelScript/CHANSVm] baseline: code 37608/53564 data 6904 functions 221 fuzzy 99.3644
regressions vs baseline: 0
global matched_code_percent: 90.71801 -> 90.71801
global fuzzy_match_percent: 99.57510 -> 99.57810
global complete_code_percent: 71.01273 -> 71.01273
global matched_data_percent: 99.36639 -> 99.36639
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
review note: src/BS2/BS2Update.c: volatile object declaration (orchestrator checks the target really re-reads it) (+1 net), e.g. static volatile u32 EntriesCount = 0;
GATE PASS
```
Remaining source functions (every listed function has at least three distinct successful semantic trials; failed or invalid experiments excluded):
src/BS2/BS2Mach: instruction-exact 24; code 4940 -> 4940 / 16980; data 155504 -> 155504 / 158528.
- Run 16.744186%; 11/43 instructions, structure/operands (40, 42); 3 successful distinct source attempts; ABI register clearing and stack/LR handoff require an assembly trampoline; new assembly is forbidden.
- BS2StartGame 98.72774%; 393/393 instructions, structure/operands (4, 10); 3 successful distinct source attempts; instruction scheduling or control-flow shape differs.
- BS2StartGCGame 99.5614%; 228/228 instructions, structure/operands (2, 7); 4 successful distinct source attempts; instruction scheduling or control-flow shape differs.
- CheckBS2CommandStatus 99.50739%; 406/406 instructions, structure/operands (2, 2); 4 successful distinct source attempts; instruction scheduling or control-flow shape differs.
- BS2Tick 98.6768%; 1936/1940 instructions, structure/operands (119, 1702); 12 successful distinct source attempts; four instructions short; low-memory base loads, branch shape and scheduling differ.
src/scene/setting/AOSS: instruction-exact 15; code 6436 -> 6436 / 16192; data 3928 -> 3928 / 3928.
- AOSS_Init_old 94.48674%; 1570/1584 instructions, structure/operands (154, 1510); 8 successful distinct source attempts; stack/branch/control-flow differences remain; target r14 read before assignment is unresolved and uninitialized C is forbidden.
- AOSSDecryptMessage 97.74143%; 321/321 instructions, structure/operands (0, 87); 3 successful distinct source attempts; register allocation and commutative operand selection; declaration/lifetime/const views did not make it exact.
- AOSSApplyAuthOptions 98.77193%; 114/114 instructions, structure/operands (0, 22); 3 successful distinct source attempts; register allocation and commutative operand selection; declaration/lifetime/const views did not make it exact.
- AOSSSendHelloRequest 92.190475%; 271/273 instructions, structure/operands (33, 254); 3 successful distinct source attempts; two instructions short; global-base grouping, checksum unrolling and cipher lifetimes differ.
- AOSSXorBufferWithKey 98.605446%; 147/147 instructions, structure/operands (0, 34); 3 successful distinct source attempts; register allocation and commutative operand selection; declaration/lifetime/const views did not make it exact.
src/BS2/BS2Update: instruction-exact 9; code 400 -> 400 / 4052; data 10488 -> 10488 / 10488.
- UpdateThread 93.90471%; 905/913 instructions, structure/operands (94, 747); 5 successful distinct source attempts; eight instructions short; loop and local lifetimes remain different after the proven volatile reload fix.
src/channelScript/CHANSVm: instruction-exact 221; code 37608 -> 37608 / 53564; data 6904 -> 6904 / 6904.
- CHANSVmConvertToFloatFromStr 97.59036%; 83/83 instructions, structure/operands (2, 2); 6 successful distinct source attempts; instruction scheduling or control-flow shape differs.
- VmDateDtor 94.96703%; 91/91 instructions, structure/operands (5, 7); 3 successful distinct source attempts; instruction scheduling or control-flow shape differs.
- VmStringReplace 97.992424%; 132/132 instructions, structure/operands (0, 40); 3 successful distinct source attempts; register allocation and commutative operand selection; declaration/lifetime/const views did not make it exact.
- VmStringSplit 98.04054%; 222/222 instructions, structure/operands (0, 66); 3 successful distinct source attempts; register allocation and commutative operand selection; declaration/lifetime/const views did not make it exact.
- CHANSVmFormatString 99.84919%; 431/431 instructions, structure/operands (0, 13); 4 successful distinct source attempts; register allocation and commutative operand selection; declaration/lifetime/const views did not make it exact.
- VmBlobGetHexString 98.71951%; 82/82 instructions, structure/operands (0, 14); 3 successful distinct source attempts; register allocation and commutative operand selection; declaration/lifetime/const views did not make it exact.
- VmBlobPackCommon 97.949104%; 668/668 instructions, structure/operands (0, 244); 3 successful distinct source attempts; register allocation and commutative operand selection; declaration/lifetime/const views did not make it exact.
- VmBlobUnpack 98.452614%; 517/517 instructions, structure/operands (0, 141); 3 successful distinct source attempts; register allocation and commutative operand selection; declaration/lifetime/const views did not make it exact.
- VmWinEmuWrite 99.62687%; 67/67 instructions, structure/operands (0, 5); 3 successful distinct source attempts; register allocation and commutative operand selection; declaration/lifetime/const views did not make it exact.
- CHANSVmAddExe 99.625984%; 254/254 instructions, structure/operands (0, 16); 3 successful distinct source attempts; register allocation and commutative operand selection; declaration/lifetime/const views did not make it exact.
- CHANSVmLinkModules 98.677246%; 189/189 instructions, structure/operands (0, 43); 3 successful distinct source attempts; register allocation and commutative operand selection; declaration/lifetime/const views did not make it exact.
- CHANSVmStep 96.46608%; 1253/1253 instructions, structure/operands (65, 313); 4 successful distinct source attempts; opcode branch/local layout differs; pretested loop attempts lowered the data measure and were restored.
No exact-function gain in this round. Retained fuzzy improvements: BS2Tick 98.230415 -> 98.6768; AOSS_Init_old 93.78725 -> 94.48674; UpdateThread 93.59803 -> 93.90471; VmStringReplace 97.878784 -> 97.992424. Unit code/data match counts did not change. No configure/symbol extent edits, no new assembly, no push/PR or other worktree operations. All edits remain in the four owned C files and this log. The pre-existing fz18.attempts.md was preserved.
# MAX continuation from 84867e93
Priority: BS2Tick, AOSS_Init_old, UpdateThread, VmStringReplace. No exact claims without gate evidence; structural blocks before declaration search.
src/BS2/BS2Mach continuation pool: POOL IDENTICAL up to 91 (mine=91 base=91)
src/scene/setting/AOSS continuation pool: POOL IDENTICAL up to 1 (mine=1 base=1)
src/BS2/BS2Update continuation pool: POOL IDENTICAL up to 55 (mine=55 base=55)
src/channelScript/CHANSVm continuation pool: POOL IDENTICAL up to 125 (mine=125 base=125)
## src/BS2/BS2Mach::BS2Tick
Remote 29fe1efa, owned source UNCHANGED, local objdiff 98.6768%.
Structural audit: instructions 1936/1940, structural/operand (119, 1702).
Block audit MAX: frame 0x70 matches. First differences at instructions38-53 are progress/partition/cover stores and constant scheduling; no immediate reload proves additional volatility. Case5 is missing two independent low-memory base loads; case9 disc-title base is hoisted ahead of magic test; case0xb streaming load is scheduled after state store. Later two missing unconditional branches and loader output field-load order remain.
- ATTEMPT BS2Tick: initialize progress through the freshly assigned progress pointer rather than a second absolute lvalue; source 869aad1e235f; 98.6768%; instructions 1936/1940; structural/operand (119, 1702); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: initialize transfer flag before partition reset and cover state after disk-presence snapshot; source 47b9d7e2def3; 98.6299%; instructions 1936/1940; structural/operand (117, 1704); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: create the disc-title read-only view only inside the Revolution magic branch; source b0d211abd366; 98.66392%; instructions 1936/1940; structural/operand (114, 1702); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: load the streaming decision before clearing the audio-buffer state; source 145217e14adc; 98.671646%; instructions 1936/1940; structural/operand (119, 1702); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: view the console hardware word as the existing OSBootInfo consoleType field; source ab02c01748ef; BUILD FAILED ibs/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 -W nomissingreturn -ipa file -gccinc -fp_contract off -O4,s -enc SJIS -lang=c -MMD -c src/BS2/BS2Mach.c -o build/43U/src/src/BS2 && "/usr/bin/python3" tools/transform_dep.py build/43U/src/src/BS2/BS2Mach.d build/43U/src/src/BS2/BS2Mach.d ### mwcceppc.exe Compiler: # File: src\BS2\BS2Mach.c # -------------------------- # 1392: if ((((const OSBootInfo *)0x80000000)->consoleType & 0xf0000000) == 0) # Error: ^ # (10115) ')' expected # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- ATTEMPT BS2Tick: reset partition progress and cover through typed writable helper parameters; source 951fea4f79f5; 98.6768%; instructions 1936/1940; structural/operand (119, 1702); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: put title-prefix acceptance and region dispatch in one read-only title helper; source 6da0db03d000; 98.6768%; instructions 1936/1940; structural/operand (119, 1702); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: use the SDK console structure and SDK device-code object for both hardware accesses; source b5e249de0a3e; 98.6768%; instructions 1936/1940; structural/operand (119, 1702); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: make the GameCube streaming header an immutable view; source e5b308c14018; 98.6768%; instructions 1936/1940; structural/operand (119, 1702); exact 24; data 155504; regress []; restored.
## src/scene/setting/AOSS::AOSS_Init_old
Remote 2d9e3ee1, owned source UNCHANGED, local objdiff 94.48674%.
Structural audit: instructions 1570/1584, structural/operand (154, 1510).
- ATTEMPT BS2Tick: express title-prefix acceptance as the two explicit accepting exits; source 9d5ea2e488cf; 98.547424%; instructions 1937/1940; structural/operand (115, 1699); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: publish the loader address before the loader length as in the target load order; source 715eaa5af0d3; 98.67783%; instructions 1936/1940; structural/operand (117, 1700); exact 24; data 155504; regress []; RETAINED.
- ATTEMPT BS2Tick: keep the initial progress address in its native pointer local until the reset store; source a35e1c93cd04; 98.67783%; instructions 1936/1940; structural/operand (117, 1700); exact 24; data 155504; regress []; restored.
MAX block audit: frame/local offsets match. Target has an additional second zero-result test at0x6f0 and a full cleanup return before allocation at0x734; current if/else collapsed that block. Target manufacturer-length branch has explicit branch-around-copy. Three connect loops use a second status test before the config flag. Poll timeout shows duplicate division and an explicit 64-bit zero carry; remaining stack stores precede clock read in a different order. SDK cleanup calls target compare <0, source writes -1<result.
- ATTEMPT AOSS_Init_old: restore the target second zero-result guard and independent cleanup before access-point allocation; source 9e90b4a698a7; 95.48232%; instructions 1587/1584; structural/operand (138, 1461); exact 15; data 3928; regress []; RETAINED.
- ATTEMPT AOSS_Init_old: use the transaction record field directly for rand and host-to-network conversion; source 7914992ed878; 95.655304%; instructions 1584/1584; structural/operand (130, 918); exact 16; data 3928; regress []; RETAINED.
- ATTEMPT AOSS_Init_old: compare socket cleanup results directly against zero; source 546cd099ab1e; 95.65909%; instructions 1584/1584; structural/operand (128, 918); exact 16; data 3928; regress []; RETAINED.
- ATTEMPT AOSS_Init_old: keep the final reconnect decrement in its explicit bounded-sleep branch form; source 338ebdc5a2ab; 95.91161%; instructions 1584/1584; structural/operand (123, 915); exact 16; data 3928; regress []; RETAINED.
Checkpoint cbd9898a: BS2Tick target loader output loads address then length; publication order changed accordingly. Quick Mach gate PASS, regression0, pools identical. 1936/1940 remains, objdiff98.6768 ->98.67783. No new hardware volatile declarations or helpers retained.
Retained setup guard proof: target0x6a0 compares NCD result once, branches0x6f0 on zero, then immediately branches0x734 on the same zero flag. Both intervening error paths free config/list and return-1. Source now preserves both guards and cleanup blocks; no dummy object or new call. Request field loads remove three extra instructions, yielding1584/1584. Raw gate16/21 includes already-objdiff100 ParseNetworkSettings now at its target offset; this is not a newly matched source function.
- ATTEMPT AOSS_Init_old: give the send dispatch its own result lifetime ending before polling; source bf3e41e05d18; 95.91161%; instructions 1584/1584; structural/operand (123, 915); exact 16; data 3928; regress []; restored.
- ATTEMPT AOSS_Init_old: use unsigned host-state comparisons in both reconnect loops; source 23352e349173; 95.809975%; instructions 1584/1584; structural/operand (121, 914); exact 16; data 3928; regress []; restored.
- ATTEMPT AOSS_Init_old: use a direct nonnegative test for the final socket cleanup; source cb4fece669a6; 95.915405%; instructions 1584/1584; structural/operand (121, 913); exact 16; data 3928; regress []; RETAINED.
- ATTEMPT AOSS_Init_old: assign the message opcode before the reserved byte to keep their distinct values live; source 1467c2b23c1d; 95.9173%; instructions 1584/1584; structural/operand (125, 913); exact 16; data 3928; regress []; RETAINED.
- ATTEMPT AOSS_Init_old: widen the microsecond product before the tick right shift and carry addition; source 8bb2dd51b2bd; 95.9173%; instructions 1584/1584; structural/operand (125, 913); exact 16; data 3928; regress []; restored.
## src/BS2/BS2Update::UpdateThread
Remote 7851b2b2, owned source UNCHANGED, local objdiff 93.90471%.
Structural audit: instructions 905/913, structural/operand (94, 747).
MAX block audit UpdateThread: target913/source905, frame0xf0 matches. Four missing instructions are State=5 stores eliminated before final selected-count test; source has those writes, suggesting a selection-helper boundary. Seat-pointer arithmetic uses addis instead of target lis/add twice. Target reloads selected entry type between zero/type-one tests. Error logging derives base anew. Capacity/local declaration order is secondary to these differences.
- ATTEMPT UpdateThread: separate entry selection into its typed inline return boundary before the worker import loop; source b3c58dd43faa; 93.95947%; instructions 905/913; structural/operand (94, 747); exact 9; data 10488; regress []; RETAINED.
- ATTEMPT UpdateThread: read the type-one discriminator through the published current entry; source a4fc190f5b59; BUILD FAILED EBUG=1 -DTARGET_RVL -W nomissingreturn -ipa file -gccinc -fp_contract off -O4,s -enc SJIS -lang=c -MMD -c src/BS2/BS2Update.c -o build/43U/src/src/BS2 && "/usr/bin/python3" tools/transform_dep.py build/43U/src/src/BS2/BS2Update.d build/43U/src/src/BS2/BS2Update.d Traceback (most recent call last): File "/mnt/drive2/projects/wii-ipl-workers/w0929-fix-board/tools/transform_dep.py", line 84, in <module> main() File "/mnt/drive2/projects/wii-ipl-workers/w0929-fix-board/tools/transform_dep.py", line 77, in main output = import_d_file(args.d_file) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mnt/drive2/projects/wii-ipl-workers/w0929-fix-board/tools/transform_dep.py", line 31, in import_d_file with open(in_file) as file: ^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'build/43U/src/src/BS2/BS2Update.d' ninja: build stopped: subcommand failed. ; restored.
- ATTEMPT UpdateThread: clear current-entry pointer before publishing completion progress; source d04823cb1529; 93.97043%; instructions 905/913; structural/operand (94, 747); exact 9; data 10488; regress []; RETAINED.
- ATTEMPT UpdateThread: recheck the published current-entry type after the zero-type branch; source 3cacd17bf8b9; 93.948524%; instructions 906/913; structural/operand (94, 747); exact 9; data 10488; regress []; restored.
- ATTEMPT UpdateThread: give the worker import loop a const entry view after selecting writable entries; source 2c210a0ec798; 93.83899%; instructions 905/913; structural/operand (95, 747); exact 9; data 10488; regress []; restored.
- ATTEMPT UpdateThread: derive the two seat-array cursors as separate base and entry-count steps; source bd0e352d40b9; 94.278206%; instructions 906/913; structural/operand (83, 746); exact 9; data 10488; regress []; RETAINED.
- ATTEMPT UpdateThread: reset cancellation before start while the selection helper initializes its counters; source 6800170e5598; 94.278206%; instructions 906/913; structural/operand (83, 746); exact 9; data 10488; regress []; restored.
## src/channelScript/CHANSVm::VmStringReplace
Remote 63f4c7ae, owned source UNCHANGED, local objdiff 97.992424%.
Structural audit: instructions 132/132, structural/operand (0, 40).
Checkpoint: continued AOSS setup now95.9173%, target-length1584insns; UpdateThread typed selection boundary and explicit seat cursors94.278206%,906/913insns. Four-unit quick gate PASS, regression0, forbidden0, readability0. Artifact /tmp/big1.max.checkpoint1.txt. All unit matched code/data bytes unchanged; AOSS raw instruction-exact16 is the known CR1-normalization artifact disappearing, not a new objdiff-exact source function.
MAX structural audit VmStringReplace:132/132 instructions, frame0x40, branch topology and operand-independent sequence match. Remaining40 operand changes are VM/return/argument and payload/cursor register assignments. C89-correct payload const/lifetime trials precede first declaration search on the current source.
- ATTEMPT VmStringReplace: cache the three actual payloads in const typed views declared at function entry; source d1c16fee5c88; 97.992424%; instructions 132/132; structural/operand (0, 45); exact 221; data 6904; regress []; restored.
- ATTEMPT VmStringReplace: end the converted-object lifetimes after capturing their payload fields; source f95c78ffa31b; 97.992424%; instructions 132/132; structural/operand (0, 40); exact 221; data 6904; regress []; restored.
- ATTEMPT VmStringReplace: limit the tail-segment length to the trailing-copy block; source 6dae86b9c20d; 97.992424%; instructions 132/132; structural/operand (0, 40); exact 221; data 6904; regress []; restored.
- ATTEMPT VmStringReplace: express the source and destination offset advances as assignments to their old values; source b87ac8404da8; 97.992424%; instructions 132/132; structural/operand (0, 40); exact 221; data 6904; regress []; restored.
DECLSEARCH VmStringReplace: source-level structure and const/lifetime trials exhausted; run declaration-order search, maximum 300 evaluations.
Continuation data audit: AOSS .sdata2 bytes ffffffff00000000, sh_align8. Init relocations at0x24c/0x254 address target halfwords at+0/+2; real source s_defaultOptions currently size8 at+0 and both relocs use its base. This is a structural load-boundary difference despite already100% unit data. No metadata rename/extent is justified unless a candidate emits same bytes and independent real objects at+0/+2. Mach remaining3024 bytes are pooled literals and four jump tables, whose code relocation targets are still nonexact; all three other units already have100% data. No config edit made.
- ATTEMPT AOSS_Init_old: audit real independent halfword default objects and their emitted offsets before any symbol rename; source 03ab1c03df1a; 96.28156%; instructions 1583/1584; structural/operand (112, 963); exact 15; data 3920; regress ['AOSSParseNetworkSettings']; restored.
Independent defaults data audit: emitted .sdata2 ffff0000ffff, objects [('', 0, 0), ('s_defaultConnection', 0, 2), ('s_defaultResponse', 4, 2)]. Any unequal byte order or offset prevents a name-only correction; addresses are not to be moved.
- ATTEMPT AOSS_Init_old: put the network-settings copy and overlong-manufacturer exit in a typed inline builder; source 87329728c23c; 94.3952%; instructions 1563/1584; structural/operand (145, 1526); exact 15; data 3928; regress ['AOSSParseNetworkSettings']; restored.
- ATTEMPT AOSS_Init_old: derive the request record after rand has produced the transaction value; source 71aa914f1bb8; 95.96149%; instructions 1584/1584; structural/operand (124, 912); exact 16; data 3928; regress []; RETAINED.
- ATTEMPT AOSS_Init_old: compute the subnet broadcast bound before the next-host candidate; source b5ef29f88a8e; 96.09154%; instructions 1584/1584; structural/operand (121, 911); exact 16; data 3928; regress []; RETAINED.
- ATTEMPT BS2Tick: snapshot disk presence before the volatile cover-state reset in the initialization block; source 3592347b5692; 98.77062%; instructions 1936/1940; structural/operand (115, 1701); exact 24; data 155504; regress []; RETAINED.
- ATTEMPT BS2Tick: combine both target conditional transition shapes rather than score either jump shift in isolation; source 31a2e79d4f84; 98.66289%; instructions 1938/1940; structural/operand (43, 1704); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: use one const boot-disc view across the magic and audio-buffer cases with title view scoped to the magic branch; source 6dc24f2d9e8a; BUILD FAILED 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 -W nomissingreturn -ipa file -gccinc -fp_contract off -O4,s -enc SJIS -lang=c -MMD -c src/BS2/BS2Mach.c -o build/43U/src/src/BS2 && "/usr/bin/python3" tools/transform_dep.py build/43U/src/src/BS2/BS2Mach.d build/43U/src/src/BS2/BS2Mach.d ### mwcceppc.exe Compiler: # File: src\BS2\BS2Mach.c # -------------------------- # 1458: u32 audioBufferSize; # Error: ^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
Independent-default name audit is negative: two real u16[1] objects compile at source offsets0 and4, bytesffff0000ffff, size6; target halfwords are at0 and2 in8 bytes. This is not a name-only gap. No rename or extent correction retained. Source arrays restored. Prior AOSS trials that list ParseNetworkSettings as a regression reflect the previously established odiff CR1 rebasing artifact, not changed code.
- ATTEMPT BS2Tick: hold the two proven target branch shapes for follow-up block alignment rather than register-score selection; source 31a2e79d4f84; 98.66289%; instructions 1938/1940; structural/operand (43, 1704); exact 24; data 155504; regress []; RETAINED.
- ATTEMPT BS2Tick: write the device code from read-only boot and drive-info inputs across a single typed inline boundary; source ac4fac6065fb; 98.66289%; instructions 1938/1940; structural/operand (43, 1704); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: give both disc cases one read-only boot view with C89 declaration order and branch-scoped title view; source 9020631e669d; 99.013916%; instructions 1938/1940; structural/operand (38, 1704); exact 24; data 155504; regress []; RETAINED.
DECLSEARCH VmStringReplace: declaration block: | CHANSVmObjHdr* arg0; | CHANSVmObjHdr* arg1; | vmString parentStr; | vmString searchStr; | vmString replaceStr; | u32 parentLen; | u32 srcOffs; | u32 dstOffs; | u32 searchLen; | u32 replaceLen; | u32 dstBufLen; | vmString newStr; | u32 segLen; | start (0, 40) | improved (0, 39) | improved (0, 37) | improved (0, 35) | improved (0, 34) | improved (0, 28) | best (0, 28) after 285 builds; kept in source: | vmString replaceStr; | vmString searchStr; | vmString parentStr; | u32 parentLen; | u32 srcOffs; | u32 searchLen; | CHANSVmObjHdr* arg0; | u32 dstOffs; | CHANSVmObjHdr* arg1; | u32 replaceLen; | u32 dstBufLen; | vmString newStr; | u32 segLen; | | regress [].
DECLSEARCH VmStringReplace: retained declaration order pending full gate; instruction-exact 221 -> 221.
- ATTEMPT AOSS_Init_old: initialize the actual wait-interval aggregate locally instead of loading an artificial four-element default array; source 44412852d753; 96.36048%; instructions 1583/1584; structural/operand (108, 964); exact 16; data 3920; regress []; restored.
- ATTEMPT AOSS_Init_old: use the timer conversion with native unsigned-wide seconds and microseconds products; source 63db745418c9; 95.97096%; instructions 1586/1584; structural/operand (138, 1238); exact 16; data 3928; regress []; restored.
- ATTEMPT AOSS_Init_old: derive the microsecond remainder from a second quotient after setting the poll event; source 7ce9eece1186; 96.09154%; instructions 1584/1584; structural/operand (121, 911); exact 16; data 3928; regress []; restored.
VmStringReplace declaration-order search:285 builds, 40 ->28 operand differences, structural0. Candidate objdiff 98.82576%, code 37608, data 6904; pending gate.
VmStringReplace def-use audit after declaration search: target loads parent payload then search payload and parentLen before searchLen. Current source loads search payload then parent; register-blind structure0 obscures this semantic operand-order divergence. Restore parent-first field capture before more register tuning.
- ATTEMPT VmStringReplace: load parent length before search length on the improved declaration order; source 62caace862eb; 98.82576%; instructions 132/132; structural/operand (0, 28); exact 221; data 6904; regress []; restored.
- ATTEMPT VmStringReplace: cache the parent-first immutable payloads before accessing the two lengths; source e9e0f446b0f7; 98.82576%; instructions 132/132; structural/operand (0, 28); exact 221; data 6904; regress []; restored.
- ATTEMPT VmStringReplace: carry the actual private VM view through argument and return-object calls; source 1b161afe60d4; 98.82576%; instructions 132/132; structural/operand (0, 28); exact 221; data 6904; regress []; restored.
- ATTEMPT VmStringReplace: use one converted-object definition for each argument with direct nested calls; source b68869ff4e67; 98.82576%; instructions 132/132; structural/operand (0, 28); exact 221; data 6904; regress []; restored.
- ATTEMPT BS2Tick: snapshot all loader outputs before publishing length then address then offset; source 96d0e4f4997b; 99.01134%; instructions 1938/1940; structural/operand (38, 1705); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: reset progress from the partition-reset expression through the typed progress pointer; source 87d17635de34; 99.013405%; instructions 1938/1940; structural/operand (41, 1704); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: dispatch the console class as a switch with independent SDK device-code branches; source 3e77d38da8c3; 99.03144%; instructions 1939/1940; structural/operand (39, 1696); exact 24; data 155504; regress []; RETAINED.
- ATTEMPT BS2Tick: snapshot the read-only streaming decision before clearing configuration state on the aligned branch layout; source 0b72694d4151; 98.97165%; instructions 1940/1940; structural/operand (33, 191); exact 24; data 155504; regress []; restored.
- ATTEMPT VmStringReplace: make both fully converted argument objects read-only views for all subsequent field loads; source aae0575dc38c; 98.82576%; instructions 132/132; structural/operand (0, 28); exact 221; data 6904; regress []; restored.
- ATTEMPT VmStringReplace: give the two-pass byte replacement a typed inline helper with read-only buffer inputs; source a4681b7b245b; 93.67424%; instructions 132/132; structural/operand (12, 74); exact 221; data 6904; regress []; restored.
- ATTEMPT VmStringReplace: capture each input string as its actual pointer-and-length pair; source b49d643b4456; 97.27273%; instructions 132/132; structural/operand (0, 52); exact 221; data 6904; regress []; restored.
## src/BS2/BS2Mach::BS2Tick
Remote f05f7bbc, owned source UNCHANGED, local objdiff 99.03144%.
Structural audit: instructions 1939/1940, structural/operand (39, 1696).
- ATTEMPT BS2Tick: capture the native streaming byte before resetting audio configuration without boolean normalization; source 62e2b885dae7; 99.02629%; instructions 1939/1940; structural/operand (39, 1696); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: write both SDK device-code branches through a typed inline setter with ordinary if topology; source 4ff71a4e24c2; 99.013916%; instructions 1938/1940; structural/operand (38, 1704); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: capture only the loader address before publishing the volatile length and address; source 664260dcee6e; 99.03918%; instructions 1939/1940; structural/operand (39, 1696); exact 24; data 155504; regress []; RETAINED.
- ATTEMPT BS2Tick: use an immutable disc pointer definition in the audio case and a separate magic-check view; source fe5540942653; 98.81753%; instructions 1939/1940; structural/operand (42, 1696); exact 24; data 155504; regress []; restored.
## src/scene/setting/AOSS::AOSS_Init_old
Remote a8ab2099, owned source UNCHANGED, local objdiff 96.09154%.
Structural audit: instructions 1584/1584, structural/operand (121, 911).
- ATTEMPT BS2Tick: sequence the reset writes with their dependent status tests as native comma expressions; source 416d5f589a87; 99.03918%; instructions 1939/1940; structural/operand (39, 1696); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: publish the typed read-only data TOC view before loading its count for reporting; source e24edf585527; 99.106186%; instructions 1939/1940; structural/operand (35, 1696); exact 24; data 155504; regress []; RETAINED.
- ATTEMPT BS2Tick: keep the real partition reset and proven volatile region read across a typed inline boundary; source 035cc9f94dbe; 99.106186%; instructions 1939/1940; structural/operand (35, 1696); exact 24; data 155504; regress []; restored.
Checkpoint3: Mach quick GATE PASS, target DOL SHA1, regressions0, forbidden0, readability0. BS2Tick99.013916 ->99.106186: SDK console-class branch, native loader-address capture, and read-only data-TOC publication. /tmp/big1.max.checkpoint3.txt. No exact count or matched-byte increase.
- ATTEMPT AOSS_Init_old: dispatch the bounded manufacturer copy as its actual zero-or-one case rather than a skip branch; source 7c3457cb28bc; 95.741165%; instructions 1591/1584; structural/operand (127, 1548); exact 16; data 3928; regress []; restored.
Connect topology proof: target0x7f8 bne810 followed immediately by0x7fc bne8fc with the same cmpwi0 flags; reconnect repeats at0xd50/0xd54 and final-connect block. Testing the nested result guard restores the missing second condition without adding any data or undefined value.
- ATTEMPT AOSS_Init_old: restore both result guards before the configuration flag in all three connect tests; source 5284e701f1db; 96.32513%; instructions 1587/1584; structural/operand (116, 1515); exact 16; data 3928; regress []; RETAINED.
- ATTEMPT AOSS_Init_old: capture the actual request-array byte base before entering the three-record initialization loop; source 14b53b87c5be; 96.268936%; instructions 1586/1584; structural/operand (117, 1395); exact 16; data 3928; regress []; restored.
## src/BS2/BS2Update::UpdateThread
Remote 6b95233f, owned source UNCHANGED, local objdiff 94.278206%.
Structural audit: instructions 906/913, structural/operand (83, 746).
- ATTEMPT UpdateThread: define the typed selection helper after its call so file IPA supplies the inline boundary; source c01fc560098e; 94.278206%; instructions 906/913; structural/operand (83, 746); exact 9; data 10488; regress []; restored.
- ATTEMPT UpdateThread: recheck the type-one case through the published entry on the explicit-seat-cursor layout; source 00b744a3eed3; 94.381165%; instructions 907/913; structural/operand (83, 745); exact 9; data 10488; regress []; RETAINED.
- ATTEMPT AOSS_Init_old: return the protocol send result directly from a typed inline handshake dispatch; source d48ef9b99a91; BUILD FAILED s/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 -W nomissingreturn -ipa file -gccinc -fp_contract off -O4,s -enc SJIS -lang=c -O4,p -inline off -MMD -c src/scene/setting/AOSS.c -o build/43U/src/src/scene/setting && "/usr/bin/python3" tools/transform_dep.py build/43U/src/src/scene/setting/AOSS.d build/43U/src/src/scene/setting/AOSS.d ### mwcceppc.exe Compiler: # File: src\scene\setting\AOSS.c # --------------------------------- # 419: memcpy(messageIdentity,requestRecords->records[2],8); # Error: ^ # (10209) illegal implicit conversion from 'struct AOSSRequestRecord' to # 'const void *' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- ATTEMPT AOSS_Init_old: preserve the positive manufacturer-length branch followed by the common IP-setup continuation; source 453d818162df; 96.32513%; instructions 1587/1584; structural/operand (116, 1515); exact 16; data 3928; regress []; restored.
- ATTEMPT AOSS_Init_old: use native pointer-zero tests for both reconnect allocations; source 43454fbe3646; 96.49558%; instructions 1587/1584; structural/operand (114, 1515); exact 16; data 3928; regress []; RETAINED.
- ATTEMPT UpdateThread: give the import discriminator an explicit zero-type dispatch before the published type-one test; source b98142b126ed; 94.46988%; instructions 908/913; structural/operand (85, 746); exact 9; data 10488; regress []; RETAINED.
- ATTEMPT UpdateThread: load each import-error title through a const table-and-index inline helper; source 05215033703a; 94.282585%; instructions 908/913; structural/operand (87, 746); exact 9; data 10488; regress []; restored.
- ATTEMPT UpdateThread: pass the selection status output through the typed inline boundary before publishing the count; source de6d3c74a49b; 94.46988%; instructions 908/913; structural/operand (85, 746); exact 9; data 10488; regress []; restored.
- ATTEMPT AOSS_Init_old: correct the typed send-dispatch helper with the actual address of the third request record; source 8048fbbe5b03; 90.522095%; instructions 1487/1584; structural/operand (198, 1493); exact 16; data 3928; regress []; restored.
Checkpoint4: AOSS/Update quick GATE PASS, all pools identical, target DOL SHA1, regressions0, forbidden0, readability0. AOSS nested connection-result conditions match the three target double-bne blocks, pointer-null test restores cmpwi; Init96.09154 ->96.49558. Update rechecks published CurrentEntry and explicitly dispatches zero-type,94.278206 ->94.46988. No matched-byte or objdiff-exact gain. /tmp/big1.max.checkpoint4.txt.
## src/channelScript/CHANSVm::VmStringReplace
Remote a2a04605, owned source UNCHANGED, local objdiff 98.82576%.
Structural audit: instructions 132/132, structural/operand (0, 28).
DECLSEARCH BS2Tick: block-by-block structural work complete through loader/TOC publication; search native secondary locals after the target stack aggregate (1289-1300), max300.
- ATTEMPT VmStringReplace: carry the complete method through an inline helper with a formal const parent-object input; source a61f20789f6a; 96.666664%; instructions 132/132; structural/operand (0, 64); exact 221; data 6904; regress []; restored.
- ATTEMPT VmStringReplace: use the actual const byte-buffer types for all three replacement inputs; source 2aafce1f83f8; 98.82576%; instructions 132/132; structural/operand (0, 28); exact 221; data 6904; regress []; restored.
- ATTEMPT VmStringReplace: scope immutable converted-object pointer definitions to the input-capture block; source 487c8a8f31af; 98.82576%; instructions 132/132; structural/operand (0, 28); exact 221; data 6904; regress []; restored.
## src/BS2/BS2Mach::CheckBS2CommandStatus
Remote ffeed96e, owned source UNCHANGED, local objdiff 99.50739%.
Structural audit: instructions 406/406, structural/operand (2, 2).
DECLSEARCH BS2Tick: declaration block: | DVDFileInfo bannerFile; | u32 discRegion; | s32 status; | u64 currentTime; | BOOL regionMatches; | char productRegion; | u32 iosHigh; | char *ticketByte; | u32 entryCount; | u32 readInterruptsEnabled; | u32 readAddress; | const DVDGameTOC *dataToc; | start (35, 1696) | best (35, 1696) after 177 builds; source restored; best order was: | DVDFileInfo bannerFile; | u32 discRegion; | s32 status; | u64 currentTime; | BOOL regionMatches; | char productRegion; | u32 iosHigh; | char *ticketByte; | u32 entryCount; | u32 readInterruptsEnabled; | u32 readAddress; | const DVDGameTOC *dataToc; | ; 99.106186%; regress[]; RETAINED.
DECLSEARCH BS2Tick: block-by-block structural work complete through loader/TOC publication; search leading register locals before the target stack aggregate (1279-1283), max80.
DECLSEARCH BS2Tick: declaration block: | u32 interruptsEnabled = OSDisableInterrupts(); | u32 titleCode; | const DVDDiskID *bootDisc; | s32 titlePrefix; | u8 titleCharacters[4]; | start (35, 1696) | best (35, 1696) after 23 builds; source restored; best order was: | u32 interruptsEnabled = OSDisableInterrupts(); | u32 titleCode; | const DVDDiskID *bootDisc; | s32 titlePrefix; | u8 titleCharacters[4]; | ; 99.106186%; regress[]; RETAINED.
## src/channelScript/CHANSVm::CHANSVmConvertToFloatFromStr
Remote ffeed96e, owned source UNCHANGED, local objdiff 97.59036%.
Structural audit: instructions 83/83, structural/operand (2, 2).
- ATTEMPT CHANSVmConvertToFloatFromStr: define the parse end pointer before the input type initializer at the inline helper entry; source 6e14bf12ffd3; 95.180725%; instructions 83/83; structural/operand (2, 3); exact 221; data 6904; regress []; restored.
- ATTEMPT CHANSVmConvertToFloatFromStr: declare the parse helper input as a formal pointer to const rather than casting a local view; source ebf2e0ddb903; 97.59036%; instructions 83/83; structural/operand (2, 2); exact 221; data 6904; regress []; restored.
- ATTEMPT CHANSVmConvertToFloatFromStr: give the parse output its immutable formal pointer definition; source e94e39411c2d; 97.59036%; instructions 83/83; structural/operand (2, 2); exact 221; data 6904; regress []; restored.
Additional volatile audit: target request record stores at0x9a4 and0x9b4 have clrlwi16 between the first store and SOHtoNs, not an immediate memory reload. No transactionId qualifier change is supported; no new volatile field was added.
- ATTEMPT CheckBS2CommandStatus: declare the actual data TOC global as a pointer to its read-only input object; source 50723bf52f25; 99.50739%; instructions 406/406; structural/operand (2, 2); exact 24; data 155504; regress []; restored.
- ATTEMPT CheckBS2CommandStatus: declare the zero-or-one cache completion flag as its native BOOL type; source c874ab91a1d3; 99.50739%; instructions 406/406; structural/operand (2, 2); exact 24; data 155504; regress []; restored.
- ATTEMPT CheckBS2CommandStatus: compute the cache partition extent with its explicit 32-bit unsigned size operand; source 30e7aec0e44c; 99.50739%; instructions 406/406; structural/operand (2, 2); exact 24; data 155504; regress []; restored.
## src/BS2/BS2Mach::BS2StartGCGame
Remote a9a3f36c, owned source UNCHANGED, local objdiff 99.5614%.
Structural audit: instructions 228/228, structural/operand (2, 7).
- ATTEMPT BS2StartGCGame: define one immutable cover-block address outside the volatile status polling loop; source 83b6e72ca5e4; 97.82895%; instructions 228/228; structural/operand (4, 9); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2StartGCGame: poll cover status through a formal read-only command-block helper and precomputed address; source f0679e8dbefd; 97.82895%; instructions 228/228; structural/operand (4, 9); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2StartGCGame: keep the cover address before the explicit target polling label; source 20cf15703f86; 97.82895%; instructions 228/228; structural/operand (4, 9); exact 24; data 155504; regress []; restored.
Definition-level volatile candidate proof (Mach): target BS2DVDCallback0x114 stw State then0x118 lwz State, repeated at0x14c/0x150,0x19c/0x1a0,0x1c0/0x1c4. This supports auditing State at its definition; retain only if all prior exact functions remain exact.
- ATTEMPT BS2Tick: qualify the state object at its definition using four proven target store/reload pairs; source 832e7c9e8ddd; 98.93299%; instructions 1939/1940; structural/operand (39, 1698); exact 17; data 155504; regress ['BS2AbortStateMachine', 'BS2DVDCallback', 'BS2GetLockedTitles', 'BS2IsTitleAvailable', 'BS2NANDCallback', 'BS2StartLoadingTitle', 'CheckDVDCommandStatus']; restored.
## src/channelScript/CHANSVm::CHANSVmStep
Remote 8864436c, owned source UNCHANGED, local objdiff 96.46608%.
Structural audit: instructions 1253/1253, structural/operand (65, 313).
Definition-level volatile candidate proof (Step): target default inversion path0xc528 stw r29,0x18(r1), immediately0xc52c lwz r0,0x18(r1); this is the high half of the bit-not converted integer at stack18. Candidate qualifies only that actual local, never casts a use to volatile. Required disasm_fn dumps stop at paired-single saves; per-instruction target dump proves the pair.
- ATTEMPT CHANSVmStep: qualify the target-proven inversion local and its parser output pointer at their definitions; source 95db9aea7828; 96.46608%; instructions 1253/1253; structural/operand (65, 313); exact 221; data 6904; regress []; restored.
- ATTEMPT CHANSVmStep: keep the target-proven inversion local volatile while parsing through a distinct native unsigned output; source b4ecc8559b01; 96.01596%; instructions 1258/1253; structural/operand (156, 901); exact 221; data 2232; regress []; restored.
- ATTEMPT CHANSVmStep: give the signed float-conversion and bit-not local its native signed integer type; source ce1352fc7fea; 96.46608%; instructions 1253/1253; structural/operand (65, 313); exact 221; data 6904; regress []; restored.
## MAX continuation final audit
Every remaining function has at least three distinct successful semantic source trials, excluding all failed compilations, invalid Step countdown source85374133139a and incorrect AddExe payload source2dd735c854a6. Coverage regenerated from current report; 23 open functions. Additional declaration searches: VmStringReplace285 builds kept40->28 operand differences; BS2Tick177+23 builds found no improvement. New proven volatile candidates (Mach State and Step inversion local) were tested and restored; only the earlier target-proven EntriesCount qualifier remains.
Current continued-round fuzzy: BS2Tick98.6768 ->99.106186; AOSS_Init_old94.48674 ->96.49558; UpdateThread93.90471 ->94.46988; VmStringReplace97.992424 ->98.82576. Exact counts and matched code/data bytes unchanged. AOSS raw gate count is again15/21: sourceInit has three excess instructions, exposing the known CR1 branch-normalization offset artifact in already-objdiff100 ParseNetworkSettings. The transient16 count was never treated as a new source match.
Source review: only four owned C files and this attempts log changed. No shared header, config address/extent, generated report, compiler flags, assembly, pinned labels, volatile casts, register declarations, dummy data, other worktree or remote writes. All unsuccessful trials restored. Pre-existing untracked fz18.attempts.md left untouched. Running final full non-quick gate over all four units.
## MAX final full gate and remaining-function coverage
Full non-quick four-unit gate PASS. Raw clean-build evidence:
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/BS2/BS2Mach] pool: IDENTICAL
[src/BS2/BS2Mach] objdiff: code 4940/16980 data 155504/158528 functions 24/29 fuzzy 98.5597 linked code 0
[src/BS2/BS2Mach] instruction-exact functions: 24/29
[src/BS2/BS2Mach] section .bss size 155232 match 100.0
[src/BS2/BS2Mach] section .data size 3024 match None
[src/BS2/BS2Mach] section .sbss size 240 match 100.0
[src/BS2/BS2Mach] section .sdata size 32 match 100.0
[src/BS2/BS2Mach] section .text size 16980 match 98.559715
[src/BS2/BS2Mach] below 100: Run 16.744186
[src/BS2/BS2Mach] below 100: BS2StartGame 98.72774
[src/BS2/BS2Mach] below 100: BS2StartGCGame 99.5614
[src/BS2/BS2Mach] below 100: CheckBS2CommandStatus 99.50739
[src/BS2/BS2Mach] below 100: BS2Tick 99.106186
[src/BS2/BS2Mach] baseline: code 4940/16980 data 155504 functions 24 fuzzy 98.1595
[src/scene/setting/AOSS] pool: IDENTICAL
[src/scene/setting/AOSS] objdiff: code 6436/16192 data 3928/3928 functions 16/21 fuzzy 97.8377 linked code 0
[src/scene/setting/AOSS] instruction-exact functions: 15/21
[src/scene/setting/AOSS] section .bss size 3496 match 100.0
[src/scene/setting/AOSS] section .data size 368 match 100.0
[src/scene/setting/AOSS] section .sbss size 32 match 100.0
[src/scene/setting/AOSS] section .sdata size 24 match 100.0
[src/scene/setting/AOSS] section .sdata2 size 8 match 100.0
[src/scene/setting/AOSS] section .text size 16192 match 97.8377
[src/scene/setting/AOSS] below 100: AOSS_Init_old 96.49558
[src/scene/setting/AOSS] below 100: AOSSDecryptMessage 97.74143
[src/scene/setting/AOSS] below 100: AOSSApplyAuthOptions 98.77193
[src/scene/setting/AOSS] below 100: AOSSSendHelloRequest 92.190475
[src/scene/setting/AOSS] below 100: AOSSXorBufferWithKey 98.605446
[src/scene/setting/AOSS] baseline: code 6436/16192 data 3928 functions 16 fuzzy 96.7779
[src/BS2/BS2Update] pool: IDENTICAL
[src/BS2/BS2Update] objdiff: code 400/4052 data 10488/10488 functions 9/10 fuzzy 95.0158 linked code 0
[src/BS2/BS2Update] instruction-exact functions: 9/10
[src/BS2/BS2Update] section .bss size 9056 match 100.0
[src/BS2/BS2Update] section .data size 1328 match 100.0
[src/BS2/BS2Update] section .sbss size 80 match 100.0
[src/BS2/BS2Update] section .sdata size 24 match 100.0
[src/BS2/BS2Update] section .text size 4052 match 95.01579
[src/BS2/BS2Update] below 100: UpdateThread 94.46988
[src/BS2/BS2Update] baseline: code 400/4052 data 10488 functions 9 fuzzy 94.2300
[src/channelScript/CHANSVm] pool: IDENTICAL
[src/channelScript/CHANSVm] objdiff: code 37608/53564 data 6904/6904 functions 221/233 fuzzy 99.3738 linked code 0
[src/channelScript/CHANSVm] instruction-exact functions: 221/233
[src/channelScript/CHANSVm] section .data size 4672 match 100.0
[src/channelScript/CHANSVm] section .rodata size 1432 match 100.0
[src/channelScript/CHANSVm] section .sbss size 16 match 100.0
[src/channelScript/CHANSVm] section .sdata size 600 match 100.0
[src/channelScript/CHANSVm] section .sdata2 size 184 match 100.0
[src/channelScript/CHANSVm] section .text size 53564 match 99.37376
[src/channelScript/CHANSVm] below 100: CHANSVmConvertToFloatFromStr 97.59036
[src/channelScript/CHANSVm] below 100: VmDateDtor 94.96703
[src/channelScript/CHANSVm] below 100: VmStringReplace 98.82576
[src/channelScript/CHANSVm] below 100: VmStringSplit 98.04054
[src/channelScript/CHANSVm] below 100: CHANSVmFormatString 99.84919
[src/channelScript/CHANSVm] below 100: VmBlobGetHexString 98.71951
[src/channelScript/CHANSVm] below 100: VmBlobPackCommon 97.949104
[src/channelScript/CHANSVm] below 100: VmBlobUnpack 98.452614
[src/channelScript/CHANSVm] below 100: VmWinEmuWrite 99.62687
[src/channelScript/CHANSVm] below 100: CHANSVmAddExe 99.625984
[src/channelScript/CHANSVm] below 100: CHANSVmLinkModules 98.677246
[src/channelScript/CHANSVm] below 100: CHANSVmStep 96.46608
[src/channelScript/CHANSVm] baseline: code 37608/53564 data 6904 functions 221 fuzzy 99.3644
regressions vs baseline: 0
global matched_code_percent: 90.71801 -> 90.71801
global fuzzy_match_percent: 99.57510 -> 99.58431
global complete_code_percent: 71.01273 -> 71.01273
global matched_data_percent: 99.36639 -> 99.36639
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
review note: src/BS2/BS2Update.c: volatile object declaration (orchestrator checks the target really re-reads it) (+1 net), e.g. static volatile u32 EntriesCount = 0;
GATE PASS
```
src/BS2/BS2Mach: exact-name objdiff functions 24/29; code 4940 -> 4940 / 16980; data 155504 -> 155504 / 158528.
- Run 16.744186%; 11/43 instructions, structure/operands (40, 42); 3 distinct successful source trials; ABI register clearing and stack/LR handoff need an assembly trampoline; new assembly is forbidden.
- BS2StartGame 98.72774%; 393/393 instructions, structure/operands (4, 10); 3 distinct successful source trials; initial low-memory publication scheduling and commutative integer/FP operand order remain.
- BS2StartGCGame 99.5614%; 228/228 instructions, structure/operands (2, 7); 7 distinct successful source trials; target inlines and hoists cover-state polling; correcting that boundary changes initial scheduling and clock-product operand order.
- CheckBS2CommandStatus 99.50739%; 406/406 instructions, structure/operands (2, 2); 7 distinct successful source trials; only the adjacent cache-completion store and partition-count shift are swapped; const input, flag type and unsigned-width trials did not change them.
- BS2Tick 99.106186%; 1939/1940 instructions, structure/operands (35, 1696); 39 distinct successful source trials; two device-base materializations missing, one extra console switch jump; remaining global load/store scheduling and register choices differ.
src/scene/setting/AOSS: exact-name objdiff functions 16/21; code 6436 -> 6436 / 16192; data 3928 -> 3928 / 3928.
- AOSS_Init_old 96.49558%; 1587/1584 instructions, structure/operands (114, 1515); 30 distinct successful source trials; manufacturer/connect/send/poll boundaries and constant hoisting differ; target r14 is read before assignment, while source keeps a defined initialization result.
- AOSSDecryptMessage 97.74143%; 321/321 instructions, structure/operands (0, 87); 3 distinct successful source trials; register allocation and commutative operand selection; const/lifetime trials and 300 declaration evaluations did not improve.
- AOSSApplyAuthOptions 98.77193%; 114/114 instructions, structure/operands (0, 22); 3 distinct successful source trials; register allocation and commutative operand selection; const/lifetime trials and 177 declaration evaluations did not improve.
- AOSSSendHelloRequest 92.190475%; 271/273 instructions, structure/operands (33, 254); 3 distinct successful source trials; two instructions short; global-base grouping, checksum unrolling and cipher lifetimes differ.
- AOSSXorBufferWithKey 98.605446%; 147/147 instructions, structure/operands (0, 34); 3 distinct successful source trials; register allocation and commutative operand selection; 118 declaration evaluations did not improve.
src/BS2/BS2Update: exact-name objdiff functions 9/10; code 400 -> 400 / 4052; data 10488 -> 10488 / 10488.
- UpdateThread 94.46988%; 908/913 instructions, structure/operands (85, 746); 16 distinct successful source trials; selection error State stores are eliminated, logging bases reused; indexed type reload and zero-case dispatch differ. Frame remains0xf0.
src/channelScript/CHANSVm: exact-name objdiff functions 221/233; code 37608 -> 37608 / 53564; data 6904 -> 6904 / 6904.
- CHANSVmConvertToFloatFromStr 97.59036%; 83/83 instructions, structure/operands (2, 2); 9 distinct successful source trials; only the adjacent end-pointer stack store and string-tag compare are swapped; formal const input and definition-order trials did not fix scheduling.
- VmDateDtor 94.96703%; 91/91 instructions, structure/operands (5, 7); 3 distinct successful source trials; argument setup and call/return scheduling differ.
- VmStringReplace 98.82576%; 132/132 instructions, structure/operands (0, 28); 17 distinct successful source trials; parent/search payload metadata load order and register allocation; frame/count/topology match. 285 declaration evaluations reduced40->28 operand differences.
- VmStringSplit 98.04054%; 222/222 instructions, structure/operands (0, 66); 3 distinct successful source trials; register allocation and operand selection after matching frame/count/topology.
- CHANSVmFormatString 99.84919%; 431/431 instructions, structure/operands (0, 13); 4 distinct successful source trials; register allocation; 300 declaration evaluations did not improve.
- VmBlobGetHexString 98.71951%; 82/82 instructions, structure/operands (0, 14); 3 distinct successful source trials; register allocation and byte-result temporary lifetime.
- VmBlobPackCommon 97.949104%; 668/668 instructions, structure/operands (0, 244); 3 distinct successful source trials; register allocation and commutative operand selection; loop/local/const trials did not fix.
- VmBlobUnpack 98.452614%; 517/517 instructions, structure/operands (0, 141); 3 distinct successful source trials; register allocation and commutative operand selection; loop/local/const trials did not fix.
- VmWinEmuWrite 99.62687%; 67/67 instructions, structure/operands (0, 5); 3 distinct successful source trials; register allocation; 71 declaration evaluations did not improve.
- CHANSVmAddExe 99.625984%; 254/254 instructions, structure/operands (0, 16); 3 distinct successful source trials; register allocation; 52 declaration evaluations did not improve. Incorrect payload-member trial excluded.
- CHANSVmLinkModules 98.677246%; 189/189 instructions, structure/operands (0, 43); 3 distinct successful source trials; register allocation; 13 declaration evaluations did not improve.
- CHANSVmStep 96.46608%; 1253/1253 instructions, structure/operands (65, 313); 7 distinct successful source trials; opcode countdown/branch/local layout differs; target-proven volatile inversion-local trials were identical or regressed. Invalid countdown trial excluded.
Final interpretation: zero new exact functions and unchanged matched code/data bytes. Continued-round gains are fuzzy, recorded above and committed only after GATE PASS. Raw instruction counts remain Mach24/29, AOSS15/21, Update9/10, Vm221/233. AOSSParseNetworkSettings is still exact in objdiff/proper disassembly; raw count15 reflects the existing CR1-normalization offset artifact. Data audit found no eligible name/extent correction. AOSS r14 read-before-assignment remains uncertain; no uninitialized source was introduced.
Changed files: src/BS2/BS2Mach.c, src/scene/setting/AOSS.c, src/BS2/BS2Update.c, src/channelScript/CHANSVm.c, tools/decomp-assist/big1.attempts.md. Continued source checkpoints: cbd9898a,746ce740,f4721a92,2e016fe1,2738dcf4,c4f1e876. Final log-only validation commit follows; no source change after the final full gate.
# MAX continuation 2 at 6778cff9
Continuation priorities: BS2Tick, AOSS_Init_old, UpdateThread, VmStringReplace; preserve existing exact functions and full data. Fresh baseline saved in /tmp/big1.max2-before.json.
Initial pools: BS2Mach 91/91, AOSS 1/1, BS2Update 55/55, CHANSVm 125/125, all identical.
## src/BS2/BS2Mach::BS2Tick
Remote e3457d11, owned source UNCHANGED, local objdiff 99.106186%.
Structural audit: instructions 1939/1940, structural/operand (35, 1696).
MAX2 block audit: first divergence remains case-0 materialization/store order (38-53); case-5 uses an extra switch branch and lacks two low-memory LIS instructions. Target frame and all stack locals remain matched. No new global qualifier proof exists except State, already audited; use typed source boundaries before register search.
- ATTEMPT BS2Tick: return the disk-presence snapshot from the typed reset helper after the actual volatile cover write; source 8b1dd7868930; 99.106186%; instructions 1939/1940; structural/operand (35, 1696); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: separate read-only console-class lookup from the two SDK device-code stores; source ca0be2a204de; 99.08866%; instructions 1938/1940; structural/operand (34, 1706); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: keep the next-state store at each real device-code branch exit rather than after switch dispatch; source d241bbcb5d28; 98.91083%; instructions 1940/1940; structural/operand (22, 78); exact 24; data 158528; regress []; restored.
- ATTEMPT BS2Tick: hold target-aligned duplicated next-state branch exits for block audit; restores full jump-table data pairing; source d241bbcb5d28; 98.91083%; instructions 1940/1940; structural/operand (22, 78); exact 24; data 158528; regress []; RETAINED.
## src/scene/setting/AOSS::AOSS_Init_old
Remote 26d7e1e0, owned source UNCHANGED, local objdiff 96.49558%.
Structural audit: instructions 1587/1584, structural/operand (114, 1515).
- ATTEMPT BS2Tick: give the audio reset a formal const disc input and actual mutable flag output across an inline boundary; source 51706ca013a6; 98.91083%; instructions 1940/1940; structural/operand (22, 78); exact 24; data 158528; regress []; restored.
- ATTEMPT BS2Tick: read the signed native console-class word before the device branches; source 3dd5f3192552; 98.91083%; instructions 1940/1940; structural/operand (22, 78); exact 24; data 158528; regress []; restored.
- ATTEMPT BS2Tick: keep device publication and next-state publication in one typed inline writer at both exits; source 96cba28ffab6; 98.91083%; instructions 1940/1940; structural/operand (22, 78); exact 24; data 158528; regress []; restored.
MAX2 AOSS audit: first genuine missing instruction is the manufacturer-copy branch-around; default constants still have a section-base load (data already exact). At dispatch compare0x135c target defers protocolState publication to0x1818; source publishes before branch, producing an extra MR and a different backedge. The changed non-2 state must still resume immediately, while unchanged state performs the retry wait; preserve that behavior.
- ATTEMPT AOSS_Init_old: express the bounded manufacturer copy as the single-iteration pretested block seen in target; source d0e4d1c40623; 96.33207%; instructions 1589/1584; structural/operand (118, 1553); exact 16; data 3928; regress []; restored.
- ATTEMPT AOSS_Init_old: defer changed protocol-state publication to its real common resume label after the reconnect path; source ddefbc8ec565; 96.59344%; instructions 1586/1584; structural/operand (110, 1516); exact 16; data 3928; regress []; RETAINED.
- ATTEMPT AOSS_Init_old: keep all immutable initialization input fields behind one const view while status writes use the output object; source 7ba2671cb31d; BUILD FAILED 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 -W nomissingreturn -ipa file -gccinc -fp_contract off -O4,s -enc SJIS -lang=c -O4,p -inline off -MMD -c src/scene/setting/AOSS.c -o build/43U/src/src/scene/setting && "/usr/bin/python3" tools/transform_dep.py build/43U/src/src/scene/setting/AOSS.d build/43U/src/src/scene/setting/AOSS.d ### mwcceppc.exe Compiler: # File: src\scene\setting\AOSS.c # --------------------------------- # 473: s_runtime.config = readInput->ssid; # Error: ^ # (10209) illegal implicit conversion from 'const unsigned char[256]' to # 'void *' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- ATTEMPT AOSS_Init_old: read only the scalar options and request identity through the const input view; retain mutable buffers on the output view; source 6a0e00ed01c3; 96.59344%; instructions 1586/1584; structural/operand (110, 1516); exact 16; data 3928; regress []; restored.
MAX2 device-branch hold rejected for promotion: data158528/158528 is caused by matching downstream label offsets, but source has duplicate State8 stores where target has one; fuzzy98.91083 falls below99.106186. Restore shared-store baseline and pursue actual control/materialization differences, rather than retain incidental alignment.
MAX2 checkpoint: AOSS quick GATE PASS (/tmp/big1.max2.gate-aoss1.txt), full build/DOL SHA1 exact, regressions0, forbidden0, readability0. Delayed protocol publication removes one extra MR: Init96.49558 ->96.59344,1587 ->1586 instructions; existing instruction-exact count unchanged. Mach incidental-alignment hold is restored.
## src/BS2/BS2Update::UpdateThread
Remote 26d7e1e0, owned source UNCHANGED, local objdiff 94.46988%.
Structural audit: instructions 908/913, structural/operand (85, 746).
MAX2 Update audit: first divergence is selection/start-reset scheduling. Frame0xf0 and scratch offsets match. Four State5 instructions are optimized away across the inline selection boundary; no immediate State store/reload or SDK qualifier proof authorizes volatility. The import zero-type switch has one extra jump; target reloads the indexed type again for case1. Test actual const access boundaries and natural if shape before register allocation.
- ATTEMPT UpdateThread: use the natural zero-type exit followed by an independent read-only indexed type view; source 1cd852a33e72; 94.70427%; instructions 907/913; structural/operand (82, 745); exact 9; data 10488; regress []; RETAINED.
- ATTEMPT UpdateThread: keep the second discriminator at a const table-and-index inline boundary after the natural zero-type exit; source 0aac9ab02e4d; 94.70427%; instructions 907/913; structural/operand (82, 745); exact 9; data 10488; regress []; restored.
- ATTEMPT UpdateThread: use a read-only view for the complete import phase after the natural zero-type exit; source 7abc6f85a058; 94.480835%; instructions 906/913; structural/operand (84, 746); exact 9; data 10488; regress []; restored.
## src/channelScript/CHANSVm::VmStringReplace
Remote 26d7e1e0, owned source UNCHANGED, local objdiff 98.82576%.
Structural audit: instructions 132/132, structural/operand (0, 28).
- ATTEMPT UpdateThread: derive import fields directly from the actual fixed entry table instead of retaining a mutable cursor; source 53077a1455ef; 92.79737%; instructions 906/913; structural/operand (98, 746); exact 9; data 10488; regress []; restored.
MAX2 checkpoint: Update quick GATE PASS, full build and target DOL SHA1, regressions0/forbidden0/readability0. Natural zero-type exit plus separate const indexed test:94.46988 ->94.70427,908 ->907/913 instructions, structure85 ->82, same9 exact and10488 data. No State qualifier introduced.
MAX2 Replace block audit: frame0x40,132 instructions and both replacement passes exactly shaped. Target parent-payload metadata loads precede search; source reverses them. Target VM/result use r27/r28, three buffers r31/r30/r29; source VM/result r30/r31 and buffers r26/r27/r28. Try formal/local ownership and const input boundaries, then declaration-order search on changed graphs only.
- ATTEMPT VmStringReplace: give execution, parent and result views actual local definitions separate from incoming parameters; source 2d0015e17a39; 98.82576%; instructions 132/132; structural/operand (0, 28); exact 221; data 6904; regress []; restored.
- ATTEMPT VmStringReplace: carry the VM and destination as the two fields of the execution view used by conversion and allocation; source 78eda6b2bebf; 98.82576%; instructions 132/132; structural/operand (0, 28); exact 221; data 6904; regress []; restored.
- ATTEMPT VmStringReplace: keep the actual parent metadata reads behind an independently declared const object view; source c8737f3f6078; 98.82576%; instructions 132/132; structural/operand (0, 28); exact 221; data 6904; regress []; restored.
- ATTEMPT VmStringReplace: give the three native byte strings their read-only char pointer definitions without payload intermediates; source 0faf43351030; 98.82576%; instructions 132/132; structural/operand (0, 28); exact 221; data 6904; regress []; restored.
- ATTEMPT VmStringReplace: read the UTF16 payload through its actual wide-string union view while retaining byte offsets for copies; source 932669fa8ba1; 98.82576%; instructions 132/132; structural/operand (0, 28); exact 221; data 6904; regress []; restored.
- ATTEMPT VmStringReplace: read parent-first string metadata through const formal object parameters in small inline accessors; source b5aa06d9aebe; 98.068184%; instructions 132/132; structural/operand (0, 38); exact 221; data 6904; regress []; restored.
- ATTEMPT VmStringReplace: define immutable parent-first payload metadata at the start of the validated replacement block; source a557f3f0ea3d; 97.083336%; instructions 132/132; structural/operand (0, 54); exact 221; data 6904; regress []; restored.
- ATTEMPT VmStringReplace: hold const-formal metadata accessors for declaration-order search on the new read-only graph; source b5aa06d9aebe; 98.068184%; instructions 132/132; structural/operand (0, 38); exact 221; data 6904; regress []; RETAINED.
MAX2 DECLSEARCH Replace const-accessor graph: frame/count/branches already exact; maximum400 declaration evaluations after the metadata-boundary trials.
MAX2 DECLSEARCH const-accessor result: declaration block: | vmString replaceStr; | vmString searchStr; | vmString parentStr; | u32 parentLen; | u32 srcOffs; | u32 searchLen; | CHANSVmObjHdr* arg0; | u32 dstOffs; | CHANSVmObjHdr* arg1; | u32 replaceLen; | u32 dstBufLen; | vmString newStr; | u32 segLen; | start (0, 38) | improved (0, 36) | improved (0, 33) | improved (0, 31) | best (0, 31) after 326 builds; kept in source: | u32 searchLen; | vmString searchStr; | u32 parentLen; | u32 srcOffs; | vmString replaceStr; | CHANSVmObjHdr* arg0; | u32 dstOffs; | CHANSVmObjHdr* arg1; | u32 replaceLen; | u32 dstBufLen; | vmString parentStr; | vmString newStr; | u32 segLen; | .
MAX2 DECLSEARCH accessor graph final (0, 31), fuzzy98.75; restored original28-operand state.
- ATTEMPT VmStringReplace: hold the complete formal-const parent helper for declaration search after its frame and control flow passed; source a61f20789f6a; 96.666664%; instructions 132/132; structural/operand (0, 64); exact 221; data 6904; regress []; RETAINED.
MAX2 DECLSEARCH Replace formal-const parent helper: matched frame/count/branch topology, maximum400 evaluations of the real helper locals, wrapper signature unchanged.
MAX2 DECLSEARCH parent-helper result: declaration block: | vmString replaceStr; | vmString searchStr; | vmString parentStr; | u32 parentLen; | u32 srcOffs; | u32 searchLen; | CHANSVmObjHdr* arg0; | u32 dstOffs; | CHANSVmObjHdr* arg1; | u32 replaceLen; | u32 dstBufLen; | vmString newStr; | u32 segLen; | start (0, 64) | improved (0, 62) | improved (0, 61) | improved (0, 38) | improved (0, 37) | improved (0, 32) | improved (0, 23) | improved (0, 21) | improved (0, 16) | improved (0, 6) | best (0, 6) after 400 builds; kept in source: | CHANSVmObjHdr* arg0; | vmString replaceStr; | vmString searchStr; | vmString parentStr; | vmString newStr; | u32 dstBufLen; | u32 replaceLen; | u32 dstOffs; | CHANSVmObjHdr* arg1; | u32 searchLen; | u32 srcOffs; | u32 parentLen; | u32 segLen; | .
MAX2 DECLSEARCH parent-helper final (0, 6), fuzzy99.77273; retained pending gate.
MAX2 native type audit: AudioBufferUnconfigured, LoadingTitle, PartitionOpen and RestartRequested are only assigned0/1; use real BOOL definitions as an alternative alias/type graph. DvdProgress is only cleared or tested as a signed word. No volatile qualification or dummy store is involved.
- ATTEMPT BS2Tick: declare the audio configuration flag with its actual BOOL value domain; source a8faa86d122a; 99.106186%; instructions 1939/1940; structural/operand (35, 1696); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: declare restart, partition and title-loading state flags with their native BOOL type; source 6edf878867ab; 99.106186%; instructions 1939/1940; structural/operand (35, 1696); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: give the cleared and signed-tested progress word its signed native pointer type; source c6561d62de5e; 99.106186%; instructions 1939/1940; structural/operand (35, 1696); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: carry system-clock instants in the SDK OSTime type used by all signed deadline comparisons; source 1e679def56c9; 99.106186%; instructions 1939/1940; structural/operand (35, 1696); exact 24; data 155504; regress []; restored.
## src/channelScript/CHANSVm::VmStringReplace
Remote 2d3bc63c, owned source UNCHANGED, local objdiff 99.77273%.
Structural audit: instructions 132/132, structural/operand (0, 6).
MAX2 Replace final six operands: formal-const parent helper now matches every register assignment and control-flow instruction; only parent/search metadata load ordering differs. Re-test source order on this new graph before another declaration search.
- ATTEMPT VmStringReplace: read parent length before search length on the matched const-parent helper graph; source 746260e487a0; 99.77273%; instructions 132/132; structural/operand (0, 6); exact 221; data 6904; regress []; restored.
- ATTEMPT VmStringReplace: read complete parent metadata before the search payload on the const-parent graph; source 909649390f5a; 99.77273%; instructions 132/132; structural/operand (0, 6); exact 221; data 6904; regress []; restored.
- ATTEMPT VmStringReplace: retain actual const parent and search payload views before extracting their lengths and buffers; source a53b6dcac429; 100.0%; instructions 132/132; structural/operand (0, 0); exact 222; data 6904; regress []; RETAINED.
MAX2 EXACT VmStringReplace: formal-const parent helper plus explicit const payload views resolves both inline-boundary register allocation and metadata scheduling. objdiff100.0,132/132 instructions,ctxdiff0,pool125/125 identical; unit222/233 raw exact,38136/53564 matched code,6904/6904 data. All-unit quick gate /tmp/big1.max2.gate-replace1.txt: GATE PASS, full43U build/targetDOL SHA1, regression0/forbidden0/readability0. Public method symbol and VM callback signature remain unchanged.
## src/scene/setting/AOSS::AOSS_Init_old
Remote 449529d9, owned source UNCHANGED, local objdiff 96.59344%.
Structural audit: instructions 1586/1584, structural/operand (110, 1516).
MAX2 AOSS continuation: first copy guard is target BLE-copy then unconditional skip; source BGT-skip. Scalar const locals did not change aliasing; test actual switch shape and formal const scalar-input boundary, with writable ssid/status supplied separately.
- ATTEMPT AOSS_Init_old: use the boolean manufacturer-copy dispatch with one genuine copy case and a default exit; source 314d0c31b90b; 96.11301%; instructions 1593/1584; structural/operand (116, 1561); exact 16; data 3928; regress []; restored.
- ATTEMPT AOSS_Init_old: supply initialization scalars through a formal const input while the real status and ssid output use their writable view; source 8ba94f246fff; BUILD FAILED 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 -W nomissingreturn -ipa file -gccinc -fp_contract off -O4,s -enc SJIS -lang=c -O4,p -inline off -MMD -c src/scene/setting/AOSS.c -o build/43U/src/src/scene/setting && "/usr/bin/python3" tools/transform_dep.py build/43U/src/src/scene/setting/AOSS.d build/43U/src/src/scene/setting/AOSS.d ### mwcceppc.exe Compiler: # File: src\scene\setting\AOSS.c # --------------------------------- # 1404: protocolResult = AOSSValidateInitConfig(input); # Error: ^ # (10209) illegal implicit conversion from 'const struct AOSSInitInput *' to # 'struct AOSSInitInput *' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- ATTEMPT AOSS_Init_old: retain the immutable authentication request record across its identity-copy boundary; source 45d38dad82d3; 96.58586%; instructions 1586/1584; structural/operand (112, 1516); exact 16; data 3928; regress []; restored.
- ATTEMPT AOSS_Init_old: dispatch all supported native manufacturer lengths directly, avoiding boolean materialization; source 896c92d95c18; 96.486115%; instructions 1589/1584; structural/operand (112, 1539); exact 16; data 3928; regress []; restored.
- ATTEMPT AOSS_Init_old: read the existing default halfwords through their native wait-settings union rather than array element addressing; source 674300c90fc5; 96.59344%; instructions 1586/1584; structural/operand (110, 1516); exact 16; data 3928; regress []; restored.
## src/channelScript/CHANSVm::CHANSVmConvertToFloatFromStr
Remote 449529d9, owned source UNCHANGED, local objdiff 97.59036%.
Structural audit: instructions 83/83, structural/operand (2, 2).
MAX2 Float audit:83/83 instructions,frame0x70,end pointer8 and text buffer12 match; only initial type comparison and end-pointer zero store are swapped. No immediate store/reload proves volatility. Test caller return shape and real parse scratch aggregate before register search.
- ATTEMPT CHANSVmConvertToFloatFromStr: return failed parses directly while the allocated result has one immutable local definition; source 0a880fd10234; 95.481926%; instructions 84/83; structural/operand (6, 12); exact 221; data 6904; regress ['VmBlobFill']; restored.
- ATTEMPT CHANSVmConvertToFloatFromStr: keep the end pointer and converted text in the native parser scratch record; source aeebfa0fe322; 97.59036%; instructions 83/83; structural/operand (2, 2); exact 222; data 6904; regress []; restored.
- ATTEMPT CHANSVmConvertToFloatFromStr: carry the complete string conversion through a formal const input boundary while preserving the public callback signature; source 9e89a701c621; 97.59036%; instructions 83/83; structural/operand (2, 2); exact 222; data 6904; regress []; restored.
## src/BS2/BS2Update::UpdateThread
Remote 449529d9, owned source UNCHANGED, local objdiff 94.70427%.
Structural audit: instructions 907/913, structural/operand (82, 745).
MAX2 Update continuation: early State5 stores are removed across the count-return boundary, even though final volatile EntriesCount store/reload matches. Test genuine selection output parameters; no State volatility is proven.
- ATTEMPT UpdateThread: write the actual selection phase through a typed output parameter across the selection boundary; source 636b9e8d9fe3; 94.70427%; instructions 907/913; structural/operand (82, 745); exact 9; data 10488; regress []; restored.
- ATTEMPT UpdateThread: publish the selected count through its proven volatile destination at the selection boundary before the worker tests it; source b13425bc38d9; 94.70427%; instructions 907/913; structural/operand (82, 745); exact 9; data 10488; regress []; restored.
- ATTEMPT UpdateThread: return directly from the two actual selection failures that target publishes before leaving selection; source 3da6da199fa1; 94.70427%; instructions 907/913; structural/operand (82, 745); exact 9; data 10488; regress []; restored.
## src/scene/setting/AOSS::AOSSSendHelloRequest
Remote 449529d9, owned source UNCHANGED, local objdiff 92.190475%.
Structural audit: instructions 271/273, structural/operand (33, 254).
MAX2 Hello audit:frame/count271/273 and checksum/cipher traversal retain structural differences; packet request is read-only for its entire lifetime, but only a const local view was tested previously. Test the formal read-only contract without changing writable payload/schedule.
- ATTEMPT AOSSSendHelloRequest: declare the whole hello-request input formally const and keep the writable response separate; source 1d377c6e2603; 92.190475%; instructions 271/273; structural/operand (33, 254); exact 16; data 3928; regress []; restored.
## src/scene/setting/AOSS::AOSSXorBufferWithKey
Remote 449529d9, owned source UNCHANGED, local objdiff 98.605446%.
Structural audit: instructions 147/147, structural/operand (0, 34).
MAX2 XOR audit:147/147 instructions,frame0x40 and register-blind structure0; surviving34 operands allocate packet/key/temp counters differently. The key is read-only throughout; test its formal const contract before further declaration-order work.
- ATTEMPT AOSSXorBufferWithKey: declare the actual encryption key as a formal read-only byte-string input; source 527206155ae8; 95.17007%; instructions 146/147; structural/operand (12, 108); exact 16; data 3928; regress []; restored.
## src/BS2/BS2Mach::BS2Tick
Remote 449529d9, owned source UNCHANGED, local objdiff 99.106186%.
Structural audit: instructions 1939/1940, structural/operand (35, 1696).
MAX2 Tick final structural trials: the current source is one instruction short; case5 has an extra switch jump and reuses the low-memory base. Target audio loads the streaming byte before publishing the clear flag. Test actual constant lifetimes and native branch publication, retaining no duplicated state store merely for table alignment.
- ATTEMPT BS2Tick: define the actual initialization audio-state value before resetting partition progress; source 83b5d8bd66f5; 99.0366%; instructions 1939/1940; structural/operand (35, 1709); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: publish audio configuration state at both actual streaming-configuration paths after reading the immutable header; source d872644b8b0b; 98.89742%; instructions 1941/1940; structural/operand (48, 1701); exact 24; data 155504; regress []; restored.
- ATTEMPT BS2Tick: compute the native drive device code before publishing it once through the SDK hardware object; source d43d983f8935; 98.957214%; instructions 1938/1940; structural/operand (37, 1703); exact 24; data 155504; regress []; restored.
## MAX2 final coverage before clean full gate
src/BS2/BS2Mach: objdiff exact functions 24 -> 24 / 29; code 4940 -> 4940 / 16980; data 155504 -> 155504 / 158528.
- COVERED Run 16.744186%; valid distinct source attempts 3.
- COVERED BS2StartGame 98.72774%; valid distinct source attempts 3.
- COVERED BS2StartGCGame 99.5614%; valid distinct source attempts 7.
- COVERED CheckBS2CommandStatus 99.50739%; valid distinct source attempts 7.
- COVERED BS2Tick 99.106186%; valid distinct source attempts 52.
src/scene/setting/AOSS: objdiff exact functions 16 -> 16 / 21; code 6436 -> 6436 / 16192; data 3928 -> 3928 / 3928.
- COVERED AOSS_Init_old 96.59344%; valid distinct source attempts 37.
- COVERED AOSSDecryptMessage 97.74143%; valid distinct source attempts 3.
- COVERED AOSSApplyAuthOptions 98.77193%; valid distinct source attempts 3.
- COVERED AOSSSendHelloRequest 92.190475%; valid distinct source attempts 4.
- COVERED AOSSXorBufferWithKey 98.605446%; valid distinct source attempts 4.
src/BS2/BS2Update: objdiff exact functions 9 -> 9 / 10; code 400 -> 400 / 4052; data 10488 -> 10488 / 10488.
- COVERED UpdateThread 94.70427%; valid distinct source attempts 23.
src/channelScript/CHANSVm: objdiff exact functions 221 -> 222 / 233; code 37608 -> 38136 / 53564; data 6904 -> 6904 / 6904.
- COVERED CHANSVmConvertToFloatFromStr 97.59036%; valid distinct source attempts 12.
- COVERED VmDateDtor 94.96703%; valid distinct source attempts 3.
- COVERED VmStringSplit 98.04054%; valid distinct source attempts 3.
- COVERED CHANSVmFormatString 99.84919%; valid distinct source attempts 4.
- COVERED VmBlobGetHexString 98.71951%; valid distinct source attempts 3.
- COVERED VmBlobPackCommon 97.949104%; valid distinct source attempts 3.
- COVERED VmBlobUnpack 98.452614%; valid distinct source attempts 3.
- COVERED VmWinEmuWrite 99.62687%; valid distinct source attempts 3.
- COVERED CHANSVmAddExe 99.625984%; valid distinct source attempts 3.
- COVERED CHANSVmLinkModules 98.677246%; valid distinct source attempts 3.
- COVERED CHANSVmStep 96.46608%; valid distinct source attempts 7.
All22 remaining functions have3+ distinct successful source-level attempts; failed compilations and invalid prior Step/AddExe substitutions excluded. VmStringReplace is now instruction-exact; untouched open functions retain earlier validated attempts. No source changes remain uncommitted.
Final remote audit 449529d9: owned source paths unchanged from merge base; no duplicate remote match.
## MAX2 final clean full gate and handoff
Full non-quick gate over all four owned units. Raw evidence:
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/BS2/BS2Mach] pool: IDENTICAL
[src/BS2/BS2Mach] objdiff: code 4940/16980 data 155504/158528 functions 24/29 fuzzy 98.5597 linked code 0
[src/BS2/BS2Mach] instruction-exact functions: 24/29
[src/BS2/BS2Mach] section .bss size 155232 match 100.0
[src/BS2/BS2Mach] section .data size 3024 match None
[src/BS2/BS2Mach] section .sbss size 240 match 100.0
[src/BS2/BS2Mach] section .sdata size 32 match 100.0
[src/BS2/BS2Mach] section .text size 16980 match 98.559715
[src/BS2/BS2Mach] below 100: Run 16.744186
[src/BS2/BS2Mach] below 100: BS2StartGame 98.72774
[src/BS2/BS2Mach] below 100: BS2StartGCGame 99.5614
[src/BS2/BS2Mach] below 100: CheckBS2CommandStatus 99.50739
[src/BS2/BS2Mach] below 100: BS2Tick 99.106186
[src/BS2/BS2Mach] baseline: code 4940/16980 data 155504 functions 24 fuzzy 98.1595
[src/scene/setting/AOSS] pool: IDENTICAL
[src/scene/setting/AOSS] objdiff: code 6436/16192 data 3928/3928 functions 16/21 fuzzy 97.8760 linked code 0
[src/scene/setting/AOSS] instruction-exact functions: 15/21
[src/scene/setting/AOSS] section .bss size 3496 match 100.0
[src/scene/setting/AOSS] section .data size 368 match 100.0
[src/scene/setting/AOSS] section .sbss size 32 match 100.0
[src/scene/setting/AOSS] section .sdata size 24 match 100.0
[src/scene/setting/AOSS] section .sdata2 size 8 match 100.0
[src/scene/setting/AOSS] section .text size 16192 match 97.87599
[src/scene/setting/AOSS] below 100: AOSS_Init_old 96.59344
[src/scene/setting/AOSS] below 100: AOSSDecryptMessage 97.74143
[src/scene/setting/AOSS] below 100: AOSSApplyAuthOptions 98.77193
[src/scene/setting/AOSS] below 100: AOSSSendHelloRequest 92.190475
[src/scene/setting/AOSS] below 100: AOSSXorBufferWithKey 98.605446
[src/scene/setting/AOSS] baseline: code 6436/16192 data 3928 functions 16 fuzzy 96.7779
[src/BS2/BS2Update] pool: IDENTICAL
[src/BS2/BS2Update] objdiff: code 400/4052 data 10488/10488 functions 9/10 fuzzy 95.2271 linked code 0
[src/BS2/BS2Update] instruction-exact functions: 9/10
[src/BS2/BS2Update] section .bss size 9056 match 100.0
[src/BS2/BS2Update] section .data size 1328 match 100.0
[src/BS2/BS2Update] section .sbss size 80 match 100.0
[src/BS2/BS2Update] section .sdata size 24 match 100.0
[src/BS2/BS2Update] section .text size 4052 match 95.22705
[src/BS2/BS2Update] below 100: UpdateThread 94.70427
[src/BS2/BS2Update] baseline: code 400/4052 data 10488 functions 9 fuzzy 94.2300
[src/channelScript/CHANSVm] pool: IDENTICAL
[src/channelScript/CHANSVm] objdiff: code 38136/53564 data 6904/6904 functions 222/233 fuzzy 99.3853 linked code 0
[src/channelScript/CHANSVm] instruction-exact functions: 222/233
[src/channelScript/CHANSVm] section .data size 4672 match 100.0
[src/channelScript/CHANSVm] section .rodata size 1432 match 100.0
[src/channelScript/CHANSVm] section .sbss size 16 match 100.0
[src/channelScript/CHANSVm] section .sdata size 600 match 100.0
[src/channelScript/CHANSVm] section .sdata2 size 184 match 100.0
[src/channelScript/CHANSVm] section .text size 53564 match 99.38533
[src/channelScript/CHANSVm] below 100: CHANSVmConvertToFloatFromStr 97.59036
[src/channelScript/CHANSVm] below 100: VmDateDtor 94.96703
[src/channelScript/CHANSVm] below 100: VmStringSplit 98.04054
[src/channelScript/CHANSVm] below 100: CHANSVmFormatString 99.84919
[src/channelScript/CHANSVm] below 100: VmBlobGetHexString 98.71951
[src/channelScript/CHANSVm] below 100: VmBlobPackCommon 97.949104
[src/channelScript/CHANSVm] below 100: VmBlobUnpack 98.452614
[src/channelScript/CHANSVm] below 100: VmWinEmuWrite 99.62687
[src/channelScript/CHANSVm] below 100: CHANSVmAddExe 99.625984
[src/channelScript/CHANSVm] below 100: CHANSVmLinkModules 98.677246
[src/channelScript/CHANSVm] below 100: CHANSVmStep 96.46608
[src/channelScript/CHANSVm] baseline: code 37608/53564 data 6904 functions 221 fuzzy 99.3644
regressions vs baseline: 0
global matched_code_percent: 90.71801 -> 90.73564
global fuzzy_match_percent: 99.57510 -> 99.58501
global complete_code_percent: 71.01273 -> 71.01273
global matched_data_percent: 99.36639 -> 99.36639
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
review note: src/BS2/BS2Update.c: volatile object declaration (orchestrator checks the target really re-reads it) (+1 net), e.g. static volatile u32 EntriesCount = 0;
GATE PASS
```
src/BS2/BS2Mach: objdiff exact functions 24 -> 24 / 29; code 4940 -> 4940 / 16980; data 155504 -> 155504 / 158528.
- Run 16.744186%; 11/43 instructions, structure/operands (40, 42); 3 distinct successful source trials; ABI register clearing and stack/LR handoff need an assembly trampoline; new assembly is forbidden.
- BS2StartGame 98.72774%; 393/393 instructions, structure/operands (4, 10); 3 distinct successful source trials; initial low-memory publication scheduling and commutative integer/FP operand order remain.
- BS2StartGCGame 99.5614%; 228/228 instructions, structure/operands (2, 7); 7 distinct successful source trials; target inlines and hoists cover-state polling; correcting that boundary changes initial scheduling and clock-product operand order.
- CheckBS2CommandStatus 99.50739%; 406/406 instructions, structure/operands (2, 2); 7 distinct successful source trials; only the adjacent cache-completion store and partition-count shift are swapped; const input, flag type and unsigned-width trials did not change them.
- BS2Tick 99.106186%; 1939/1940 instructions, structure/operands (35, 1696); 52 distinct successful source trials; two device-base materializations missing, one extra console switch jump; remaining global load/store scheduling and register choices differ.
src/scene/setting/AOSS: objdiff exact functions 16 -> 16 / 21; code 6436 -> 6436 / 16192; data 3928 -> 3928 / 3928.
- AOSS_Init_old 96.59344%; 1586/1584 instructions, structure/operands (110, 1516); 37 distinct successful source trials; default-halfword base, manufacturer skip branch, send-result/poll temporaries and scheduling differ. Protocol-state resume publication now matches. Target r14 read-before-definition remains uncertain; no uninitialized source introduced.
- AOSSDecryptMessage 97.74143%; 321/321 instructions, structure/operands (0, 87); 3 distinct successful source trials; register allocation and commutative operand selection; const/lifetime trials and 300 declaration evaluations did not improve.
- AOSSApplyAuthOptions 98.77193%; 114/114 instructions, structure/operands (0, 22); 3 distinct successful source trials; register allocation and commutative operand selection; const/lifetime trials and 177 declaration evaluations did not improve.
- AOSSSendHelloRequest 92.190475%; 271/273 instructions, structure/operands (33, 254); 4 distinct successful source trials; two instructions short; global-base grouping, checksum unrolling and cipher lifetimes differ. Formal const request did not change the discrepancy.
- AOSSXorBufferWithKey 98.605446%; 147/147 instructions, structure/operands (0, 34); 4 distinct successful source trials; register allocation and commutative operand selection; const-key formal removes a real target mask store and regresses, so mutable-key baseline retained.
src/BS2/BS2Update: objdiff exact functions 9 -> 9 / 10; code 400 -> 400 / 4052; data 10488 -> 10488 / 10488.
- UpdateThread 94.70427%; 907/913 instructions, structure/operands (82, 745); 23 distinct successful source trials; six instructions short: two early selection State5 stores are optimized away and error logging reuses a table base; selection output/return boundary trials unchanged. Frame0xf0 and native zero-type exit/indexed const test now closer.
src/channelScript/CHANSVm: objdiff exact functions 221 -> 222 / 233; code 37608 -> 38136 / 53564; data 6904 -> 6904 / 6904.
- CHANSVmConvertToFloatFromStr 97.59036%; 83/83 instructions, structure/operands (2, 2); 12 distinct successful source trials; only adjacent end-pointer zero store and string-tag compare differ. Formal const whole-conversion boundary and real scratch-record trials unchanged; direct-return trial regresses and was restored.
- VmDateDtor 94.96703%; 91/91 instructions, structure/operands (5, 7); 3 distinct successful source trials; argument setup and call/return scheduling differ.
- VmStringSplit 98.04054%; 222/222 instructions, structure/operands (0, 66); 3 distinct successful source trials; register allocation and operand selection after matching frame/count/topology.
- CHANSVmFormatString 99.84919%; 431/431 instructions, structure/operands (0, 13); 4 distinct successful source trials; register allocation; 300 declaration evaluations did not improve.
- VmBlobGetHexString 98.71951%; 82/82 instructions, structure/operands (0, 14); 3 distinct successful source trials; register allocation and byte-result temporary lifetime.
- VmBlobPackCommon 97.949104%; 668/668 instructions, structure/operands (0, 244); 3 distinct successful source trials; register allocation and commutative operand selection; loop/local/const trials did not fix.
- VmBlobUnpack 98.452614%; 517/517 instructions, structure/operands (0, 141); 3 distinct successful source trials; register allocation and commutative operand selection; loop/local/const trials did not fix.
- VmWinEmuWrite 99.62687%; 67/67 instructions, structure/operands (0, 5); 3 distinct successful source trials; register allocation; 71 declaration evaluations did not improve.
- CHANSVmAddExe 99.625984%; 254/254 instructions, structure/operands (0, 16); 3 distinct successful source trials; register allocation; 52 declaration evaluations did not improve. Incorrect payload-member trial excluded.
- CHANSVmLinkModules 98.677246%; 189/189 instructions, structure/operands (0, 43); 3 distinct successful source trials; register allocation; 13 declaration evaluations did not improve.
- CHANSVmStep 96.46608%; 1253/1253 instructions, structure/operands (65, 313); 7 distinct successful source trials; opcode countdown/branch/local layout differs; target-proven volatile inversion-local trials were identical or regressed. Invalid countdown trial excluded.
VmStringReplace after the clean build: objdiff100.0,132/132 identical instructions,ctxdiff0. Natural formal const parent view plus const payload views and real local declaration order; public symbol/callback preserved. Code +528 bytes; no data metadata correction needed.
This round from6778cff9: instruction-exact counts Mach24 ->24/29, AOSS15 ->15/21, Update9 ->9/10, Vm221 ->222/233. Objdiff AOSS16/21 already includes ParseNetworkSettings; raw15 is the unchanged previously audited CR1-normalization offset artifact, not a loss or new match. Aggregate objdiff code49384 ->49912/90788; data176824 ->176824/179848.
Big-function scores this round: BS2Tick99.106186 ->99.106186; AOSS_Init_old96.49558 ->96.59344; UpdateThread94.46988 ->94.70427; VmStringReplace98.82576 ->100.0. Other open functions retain their measured baselines.
Final data ownership audit: pools identical for all four units; AOSS/Update/Vm data100. Mach literals have identical bytes/offsets, while unresolved .data differences are jump-table relocations inside nonexact code and extracted trailing alignment. No eligible name-only object or proven extent correction found; no symbol/address/section total changed. Weak/inline duplicate objects left alone.
Uncertainty: AOSS target tests saved r14 at0xa20 before any definition in this function. Defined source initialization remains; reproducing undefined input is forbidden. Complete-unit100% not claimed. All22 residual functions have3+ valid trials, with failed compilations/invalid prior substitutions excluded.
Source checkpoint commits this round:85515018 (AOSS),c924d33e (Update),df894b4e (exact Replace). Changed paths:src/scene/setting/AOSS.c,src/BS2/BS2Update.c,src/channelScript/CHANSVm.c,tools/decomp-assist/big1.attempts.md. Final log-only commit follows; no source change after full gate. Untracked fz18.attempts.md pre-existed and is untouched.

View File

@@ -1,77 +0,0 @@
# BS2Tick disk-presence read lifetime, 2026-10-03
Base: `84d0c74f0ae814354a805907299bb7ff79243ece`, 43U only.
The only source change is in `src/BS2/BS2Mach.c`, case 0 of `BS2Tick`.
## Source evidence
The original function begins at `0x8137D3B8`. Its case-zero initialization
reads `BS2NoDisk` at `+0xC8`, stores `AudioBufferUnconfigured` at `+0xCC`,
compares the captured disk flag at `+0xD0`, and clears `CoverBlock.state` at
`+0xD4`. The baseline clears the cover state before reading the disk flag.
The extracted object's relocations and all 29 instructions in this
initialization slice agree with the original linked DOL.
Capture `BS2NoDisk` in the existing `s32 status` before the audio and cover
resets, then test that captured value. `BS2NoDisk` is already declared
`vBOOL`; `CoverBlock.state` is already volatile in this translation unit.
Their distinct addresses are `0x816989E4` and `0x8108BF6C`. No qualifier,
storage, callback, initialization, or shared-header change is needed.
The assigned status is genuinely consumed by the zero/nonzero branch.
Case 0 always exits the switch, so it cannot carry this value into another
case. All later status consumers have their own preceding assignment;
the declaration and all their statements are unchanged. The function enters
with interrupts disabled. This reconstructs the target's access order; it
does not claim an observed runtime failure or asynchronous pointer replacement.
Historical lead: `big1.attempts.md:509` records the same disk-presence
snapshot within an earlier compound candidate, with a partial improvement
from 98.67783% to 98.77062% and no exact/code/data regression. That compound
was not present in this baseline. Its larger 99.106186% score includes other
changes and is not attributed to this isolated edit. No prior source artifact
was imported; the target instructions independently support this change.
## Single measured trial
| Measure | Baseline | Candidate |
| --- | ---: | ---: |
| BS2Tick fuzzy | 98.639175% | 98.73196% |
| BS2Tick instructions / original | 1937 / 1940 | 1937 / 1940 |
| Unit fuzzy | 99.09658% | 99.138985% |
| Exact functions | 25 / 29 | 25 / 29 |
| Matched code bytes | 5112 / 16980 | 5112 / 16980 |
| Matched data bytes | 155504 / 158528 | 155504 / 158528 |
The compiler changes eleven instructions, all between function offsets
`+0x9C` and `+0xD4`. Three relocation positions move inside the slice;
all 1461 relocation identities, their count, and every relocation elsewhere
are preserved. All text outside BS2Tick and every allocated nontext byte
remain identical. Each of the 25 exact functions remains instruction-exact.
All other 1026 unit reports are unchanged.
## Validation
- A bounded interpreter executes the actual baseline, candidate, and original
initialization slices for 10036 flag combinations, including signed/unsigned
boundaries, both zero/nonzero classes, and deterministic 32-bit samples.
It reaches every one of the 29 instructions in each slice. Final memory
and next-state choices agree; candidate disk/audio/cover/state access order
agrees with the original. A wrong signed test is detected.
- The predicate is exactly word equality to zero, so its two equivalence
classes cover the full 32-bit flag domain; this is not a claim of exhaustive
execution of all 2^64 input pairs or the complete Wii runtime.
- All 201 original direct-call targets agree with raw DOL addresses. Candidate
and baseline call sites and destinations are unchanged, including callbacks.
- `pool_diff.py`: 91/91 identical strings.
- Literal audit: 97 arguments across 28 functions, no candidates/errors;
BS2Tick remains the existing unequal-extent skip.
- Full `all_source`, fresh report, and `build/43U/ok` pass.
- DOL SHA1: `26116613f624061ba99c8d1a299aaa6efa85670d`.
- `git diff --check` passes. No linking/configuration or assembly changes.
Private local validation: `validation/bs2-presence-lifetime-20261003/check.py`
and `check.json` under the shared workspace. Baseline/candidate objects,
reports, and build/pool/literal/ctxdiff logs are retained in
`/tmp/bs2-presence-lifetime/`. Original binary/instruction material is not
included in this commit.

View File

@@ -1,103 +0,0 @@
# Direct-call destination advisory
`call_target_diff.py` checks the callees of functions reported as objdiff100.
A 100% instruction score can still conceal a different relocation target. This
tool compares resolved destination addresses with branches decoded independently
from the original 43U DOL. It does not change source, build outputs, configuration,
CI, or the completion policy.
Requires Python and pyelftools, as do the neighboring ELF tools. Run from the
repository root after preparing the normal 43U objects and report:
```sh
python tools/decomp-assist/call_target_diff.py --output /tmp/call-targets.json
python tools/decomp-assist/call_target_diff.py src/scene/setting/iplSetting
python tools/decomp-assist/call_target_diff.py UNIT --function EXACT_SYMBOL
python -m unittest discover -s tools/decomp-assist -p test_call_target_diff.py
```
With no unit arguments, it scans the report. Unit names omit the `main/` prefix
and `.o` suffix. `--function` requires exactly one unit and still requires that
function to be reported100. JSON goes to stdout unless `--output` is supplied.
The output path cannot overwrite an input.
`--root` selects another prepared repository. `--report` and `--dol` override
input paths; otherwise they are `ROOT/build/43U/report.json` and
`ROOT/orig/43U/00000008.app`. Relative overrides are relative to the current
working directory. The DOL must match the known 43U SHA1 by default; `--dol-sha1`
accepts an explicitly verified alternative hash, including authored test inputs.
The configuration remains 43U.
## What it checks
Only exact-name functions with equal source/reference extents and
`fuzzy_match_percent == 100` are compared. Missing/ambiguous functions and
unequal extents are reported as skips. Direct unconditional PPC `bl` instructions
are decoded whether they have explicit `R_PPC_REL24`/`R_PPC_ADDR24` relocations or
already contain resolved branch displacements. Signed relative and absolute
encodings are supported.
Section-relative relocation targets and raw local branches resolve through
actual function extents. Aliases sharing one function start are retained;
overlapping distinct function starts remain unresolved. A matching reference
symbol or an unambiguous configured address maps the source callee into the
original address space. The original DOL supplies the reference call destination,
and reference-object disagreement is an input error. Symbol spelling alone is
not accepted as proof that two distinct callees are equivalent.
Rows classify:
- `different_destination`: source resolves to a different original address
- `unresolved_destination`: source has no unique original-address mapping
- `same_address_alias`: different names resolve to the same original address
- `call_shape_difference`: only one object has a direct call at that offset
Rows are candidates for inspection, not automatic bug reports. Different
constructor addresses can have identical bodies; a generated assignment or
anonymous wrapper can implement the same operation under another name. Optional
`alias_hint` evidence identifies identical original leaf bodies or a local
relocation-free body identical to the original callee. Hints require compatible
extents, equal bytes, and conservative branch checks; they do not suppress rows
or establish general semantic equivalence. Helpers containing relocations may
remain unresolved even when manual review can establish equivalence. No symbol
name, constructor prefix, or wrapper prefix is silently excluded.
An unresolved symbol is not necessarily a missing implementation: it may be a
renamed helper, external symbol, or ambiguous map entry. Check source definitions,
linker aliases, receiver types, and the actual callee before proposing a fix.
## Provenance and exits
JSON includes both observed Git heads, the original-DOL SHA1, and SHA-256 hashes
of the exact report, symbol/split maps, object files, tool, and shared ELF helper
read by the scan. Inputs are fingerprinted again at the end. A changed head or
input produces an error rather than a clean result. No binary or assembly bytes
are written into the report.
These fingerprints identify what was inspected. They do not prove that cached
objects were rebuilt from the stated source commit or that the report is fresh.
For a serious candidate, preserve its inputs and independently rebuild/verify
that specific commit before changing source.
Exit statuses are advisory:
- 0: no review rows, skips, or input errors in the selected scope
- 1: rows or skipped functions require review
- 2: invalid, missing, inconsistent, or changing input
An empty or entirely nonexact selection can check zero calls. Always inspect the
counts. A clean result does not establish completion, whole-program equivalence,
or correct callee bodies. Indirect calls, tail calls, conditional branch-and-link,
nonexact callers, and unequal extents are outside this pass. Runtime behavior,
callback effects, and floating-point evaluation order still require focused
review.
## Tests
Tests build small ELF32/PPC objects and DOL containers from authored instruction
words and metadata in temporary directories. They cover an incorrect relocation
destination despite identical instruction bytes, raw local branches, shifted
function locations, interior targets, address/constructor/wrapper aliases,
undefined destinations, malformed references, original-DOL disagreement,
selection skips, input changes, and JSON exit behavior. No original executable
bytes or assembly are embedded in the tool, documentation, or tests.

View File

@@ -1,383 +0,0 @@
"""Advisory direct-call destination audit for objdiff100, equal-size functions.
Run from the repository root: python tools/decomp-assist/call_target_diff.py [unit ...]
Checks REL24/ADDR24 relocations and raw PPC direct BL against the original DOL.
Exit 0: no review rows or skips; 1: review needed; 2: invalid/changing input.
This is not a completion gate or a proof of callee behavior. See call_target_diff.md.
"""
import argparse
from collections import Counter, defaultdict
from dataclasses import dataclass
import hashlib
import io
import json
from pathlib import Path
import re
import struct
import subprocess
import sys
from elftools.common.exceptions import ELFError
from elftools.elf.elffile import ELFFile
import jump_table_diff as elf
DOL_SHA1 = "26116613f624061ba99c8d1a299aaa6efa85670d"
def signed(value, bits):
return value - (1 << bits) if value & (1 << (bits - 1)) else value
def branch_target(word, address):
"""Return a PPC I-form direct BL destination, or None for other instructions."""
if word >> 26 != 18 or not word & 1:
return None
displacement = signed(word & 0x03FFFFFC, 26)
return (displacement if word & 2 else address + displacement) & 0xFFFFFFFF
class Inputs:
"""Fingerprint exact bytes read; detect changes before presenting a result."""
def __init__(self):
self.hashes = {}
def read(self, path):
path = Path(path)
raw = path.read_bytes()
digest = hashlib.sha256(raw).hexdigest()
previous = self.hashes.setdefault(str(path), digest)
if previous != digest:
raise ValueError("input changed while reading: " + str(path))
return raw
def changed(self):
return [path for path, digest in self.hashes.items()
if not Path(path).is_file()
or hashlib.sha256(Path(path).read_bytes()).hexdigest() != digest]
@dataclass
class CallObject:
info: elf.ObjectInfo
data: dict
def function(self, name):
symbol = self.info.symbol(name)
if symbol.kind != "STT_FUNC" or symbol.value % 4 or symbol.size % 4:
raise ValueError("expected an aligned function: " + name)
return symbol
def location(self, section, offset, mechanism):
functions = [s for s in self.info.symbols if s.section == section
and s.kind == "STT_FUNC" and s.value <= offset < s.value + s.size]
# Multiple names at one start are aliases; overlapping starts are ambiguous.
starts = {s.value for s in functions}
start = next(iter(starts)) if len(starts) == 1 else None
names = sorted({s.name for s in functions}) if start is not None else []
return {"mechanism": mechanism, "names": names,
"addend": offset - start if start is not None else 0,
"section": self.info.sections[section][0], "offset": offset}
def call(self, function, offset):
at = function.value + offset
word = int.from_bytes(self.data[function.section][at:at + 4], "big")
raw_target = branch_target(word, at)
if raw_target is None:
return None
relocation = self.info.relocs(function.section).get(at)
if relocation is not None:
expected = 2 if word & 2 else 10 # R_PPC_ADDR24 / R_PPC_REL24
if relocation.kind != expected:
raise ValueError("direct BL has an unsupported relocation kind")
location = self.info.location(relocation)
if location is not None:
section, value = location
if section not in self.data or value % 4 or not 0 <= value < len(self.data[section]):
raise ValueError("call relocation is outside an allocated section")
return self.location(section, value, "relocation")
symbol = self.info.symbols[relocation.symbol]
return {"mechanism": "relocation", "names": [symbol.name],
"addend": relocation.addend}
if word & 2:
return {"mechanism": "raw_absolute", "names": [], "addend": 0,
"address": raw_target}
return self.location(function.section, raw_target, "raw_relative")
def read_object(path, inputs):
raw = inputs.read(path)
info = elf.read_object(path)
inputs.read(path) # Shared ELF helper reads the path; reject a concurrent change.
parsed = ELFFile(io.BytesIO(raw))
data = {i: section.data() for i, section in enumerate(parsed.iter_sections())
if section["sh_type"] == "SHT_PROGBITS" and section["sh_flags"] & 2}
return CallObject(info, data)
class Dol:
def __init__(self, raw, expected_sha1):
self.sha1 = hashlib.sha1(raw).hexdigest()
if self.sha1 != expected_sha1:
raise ValueError("original DOL SHA1 does not match --dol-sha1")
if len(raw) < 256:
raise ValueError("truncated DOL header")
self.raw = raw
header = struct.unpack(">64I", raw[:256])
self.spans = []
for index in range(18):
offset, address, size = header[index], header[18 + index], header[36 + index]
if size:
if offset < 256 or offset + size > len(raw) or address + size > 0x100000000:
raise ValueError("DOL section is outside its file/address space")
if any(max(address, a) < min(address + size, a + n) for a, n, _ in self.spans):
raise ValueError("overlapping DOL address sections")
self.spans.append((address, size, offset))
def read(self, address, size):
matches = [self.raw[offset + address - start:offset + address - start + size]
for start, length, offset in self.spans
if start <= address and address + size <= start + length]
if size <= 0 or len(matches) != 1:
raise ValueError("address is not in one DOL section: 0x%X" % address)
return matches[0]
def call(self, address):
return branch_target(int.from_bytes(self.read(address, 4), "big"), address)
def read_maps(symbol_text, split_text):
names, sizes, splits = defaultdict(set), defaultdict(set), {}
for line in symbol_text.splitlines():
match = re.match(r"(.*?) = (\S+):0x([0-9a-fA-F]+);(.*)", line)
if not match or not re.search(r"type:(function|label)\b", match[4]):
continue
address = int(match[3], 16)
names[match[1]].add(address)
size = re.search(r"size:(0x[0-9a-fA-F]+|\d+)\b", match[4])
if "type:function" in match[4] and size:
sizes[address].add(int(size[1], 0))
unit = None
for line in split_text.splitlines():
if line and not line[0].isspace() and line.endswith(":") and line != "Sections:":
unit = line[:-1]
splits[unit] = {}
match = re.match(r"\s+(\S+)\s+start:0x([0-9a-fA-F]+)", line)
if match and unit:
splits[unit][match[1]] = int(match[2], 16)
return names, sizes, splits
def addresses(destination, reference, bases, names):
if destination is None:
return set()
if "address" in destination:
return {destination["address"]}
result = set()
for name in destination["names"]:
local = [s for s in reference.info.symbols if s.name == name
and s.kind == "STT_FUNC" and isinstance(s.section, int)]
if local:
for symbol in local:
section = reference.info.sections[symbol.section][0]
if section in bases:
result.add(bases[section] + symbol.value + destination["addend"])
elif len(names.get(name, ())) == 1:
result.update(address + destination["addend"] for address in names[name])
return result
def position_independent_leaf(raw):
"""Conservative filter for body-alias hints, never an equivalence proof."""
for offset in range(0, len(raw), 4):
word = int.from_bytes(raw[offset:offset + 4], "big")
op = word >> 26
branch_op = (word >> 1) & 1023
if op == 19 and branch_op in (16, 528) and (word & 1 or branch_op == 528):
return False # Indirect call or tail transfer.
if op in (16, 18):
displacement = signed(word & (0x03FFFFFC if op == 18 else 0xFFFC),
26 if op == 18 else 16)
if word & 3 or not 0 <= offset + displacement < len(raw):
return False # Link/absolute branches or transfers outside the body.
return bool(raw) and len(raw) % 4 == 0
def alias_hint(source, destination, source_addresses, target_address, dol, sizes):
if destination is None or target_address is None or len(sizes.get(target_address, ())) != 1:
return None
size = next(iter(sizes[target_address]))
target_body = dol.read(target_address, size)
if not position_independent_leaf(target_body):
return None
# Different known addresses can share a retail body (e.g. folded constructors).
if len(source_addresses) == 1:
address = next(iter(source_addresses))
if sizes.get(address) == {size} and dol.read(address, size) == target_body:
return "identical_original_leaf_bodies; current callee implementation not proved"
# Renamed local helpers need no guessed symbol pairing or name allowlist.
for name in destination["names"]:
try:
function = source.function(name)
except ValueError:
continue
if destination["addend"] or function.size != size:
continue
relocations = source.info.relocs(function.section)
if any(function.value <= at < function.value + size for at in relocations):
continue
body = source.data[function.section][function.value:function.value + size]
if body == target_body:
return "identical_relocation_free_local_body; alias requires review"
return None
def compare_function(source, reference, name, bases, names, sizes, dol):
src, ref = source.function(name), reference.function(name)
if src.size != ref.size:
raise ValueError("function extents differ")
section = reference.info.sections[ref.section][0]
if section not in bases:
raise ValueError("no original section base for " + section)
caller = bases[section] + ref.value
counts, rows = Counter(), []
for offset in range(0, ref.size, 4):
left, right = source.call(src, offset), reference.call(ref, offset)
expected = dol.call(caller + offset)
if left is None and right is None and expected is None:
continue
counts["calls"] += 1
for prefix, destination in (("source_", left), ("reference_", right)):
if destination:
counts[prefix + destination["mechanism"]] += 1
actual = addresses(left, reference, bases, names)
target = addresses(right, reference, bases, names)
if right and right.get("section") in bases:
target = {bases[right["section"]] + right["offset"]}
if bool(right) != (expected is not None) or (target and target != {expected}):
raise ValueError("reference ELF/DOL disagreement at +0x%X" % offset)
if left and right and expected is not None and actual == {expected}:
counts["same_destination"] += 1
if set(left["names"]) == set(right["names"]):
continue
classification = "same_address_alias"
elif not left or not right:
classification = "call_shape_difference"
elif len(actual) != 1:
classification = "unresolved_destination"
else:
classification = "different_destination"
hint = alias_hint(source, left, actual, expected, dol, sizes)
rows.append({"function": name, "offset": offset, "caller_address": caller,
"classification": classification, "source": left, "reference": right,
"source_addresses": sorted(actual), "reference_addresses": sorted(target),
"dol_destination": expected, "alias_hint": hint})
counts[classification] += 1
return counts, rows
def git_head(root):
result = subprocess.run(["git", "-C", str(root), "rev-parse", "HEAD"],
capture_output=True, text=True)
return result.stdout.strip() if result.returncode == 0 else None
def audit(root, report_path, dol_path, expected_sha1, units=(), function=None):
inputs = Inputs()
inputs.read(Path(__file__))
inputs.read(Path(elf.__file__))
before = git_head(root)
report = json.loads(inputs.read(report_path))
names, sizes, splits = read_maps(
inputs.read(root / "config/43U/symbols.txt").decode(),
inputs.read(root / "config/43U/splits.txt").decode())
dol = Dol(inputs.read(dol_path), expected_sha1)
counts, rows, skipped, errors = Counter(), [], [], []
selected = set(units)
found = set()
for unit in report["units"]:
key = unit["name"].removeprefix("main/")
if selected and key not in selected:
continue
found.add(key)
functions = [f for f in unit.get("functions", [])
if f.get("fuzzy_match_percent") == 100
and (function is None or function == f["name"])]
if not functions:
if function:
skipped.append({"unit": key, "function": function,
"reason": "function absent or not objdiff100"})
continue
try:
source = read_object(root / "build/43U/src" / (key + ".o"), inputs)
reference = read_object(root / "build/43U/obj" / (key + ".o"), inputs)
except (OSError, ValueError, ELFError) as error:
errors.append({"unit": key, "reason": str(error)})
continue
bases = splits.get(unit.get("metadata", {}).get("source_path"), {})
counts["units"] += 1
for entry in functions:
try:
src, ref = source.function(entry["name"]), reference.function(entry["name"])
if src.size != ref.size:
raise ValueError("function extents differ")
except ValueError as error:
skipped.append({"unit": key, "function": entry["name"], "reason": str(error)})
continue
try:
measured, result = compare_function(source, reference, entry["name"],
bases, names, sizes, dol)
except (ValueError, KeyError) as error:
errors.append({"unit": key, "function": entry["name"], "reason": str(error)})
continue
counts.update(measured)
counts["functions"] += 1
rows.extend(dict(row, unit=key) for row in result)
for missing in sorted(selected - found):
errors.append({"unit": missing, "reason": "unit absent from report"})
after = git_head(root)
changed = inputs.changed()
if before != after or changed:
errors.append({"reason": "inputs changed during audit", "paths": changed})
result = {"advisory": True, "counts": dict(counts), "rows": rows,
"skipped_functions": skipped, "errors": errors,
"provenance": {"head_before": before, "head_after": after,
"dol_sha1": dol.sha1, "sha256": inputs.hashes},
"limits": "Direct BL, objdiff100 and equal extents only. Alias hints require review; "
"no callee-behavior, build-freshness or completion proof."}
return result, 2 if errors else 1 if rows or skipped else 0
def main(argv=None):
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("units", nargs="*")
parser.add_argument("--root", type=Path, default=Path("."))
parser.add_argument("--report", type=Path, help="default: ROOT/build/43U/report.json")
parser.add_argument("--dol", type=Path, help="default: ROOT/orig/43U/00000008.app")
parser.add_argument("--dol-sha1", default=DOL_SHA1)
parser.add_argument("--function", help="one exact-name objdiff100 function; requires one unit")
parser.add_argument("--output", type=Path, help="write JSON here instead of stdout")
args = parser.parse_args(argv)
if args.function and len(args.units) != 1:
parser.error("--function requires exactly one unit")
try:
result, status = audit(args.root, args.report or args.root / "build/43U/report.json",
args.dol or args.root / "orig/43U/00000008.app",
args.dol_sha1, args.units, args.function)
output = json.dumps(result, indent=2) + "\n"
if args.output:
if args.output.resolve() in {Path(p).resolve() for p in result["provenance"]["sha256"]}:
raise ValueError("output must not overwrite an audit input")
args.output.write_text(output)
else:
print(output, end="")
return status
except (OSError, ValueError, KeyError, ELFError) as error:
print("ERROR: " + str(error), file=sys.stderr)
return 2
if __name__ == "__main__":
sys.exit(main())

View File

@@ -1,69 +0,0 @@
# Card move/copy permission result lifetime
Base: `57ccda3883537a308568c03924af2cebf2d8a789`.
Owned source: `src/scene/cardSequence/iplCardSequence.cpp` only.
## Retained reconstruction
Give the permission-check stage of `runCardMoveOrCopy` its own initialized
`permissionResult`, scoped around the existing status query, command permission
checks and error gate. The later transfer result remains separate. There is no
copy back, added operation, dummy local or initializer-order search.
Original `runCardMoveOrCopy` begins at `0x813D3D14`. Its permission stage
`+0xC8..+0x148` initializes r16 to zero at `+0xD4`, sets -10 for denied copy/move
permissions, or takes `CARDGetResultCode` after a failed status query. The error
report consumes that value at `+0x140/+0x144`, and failure branches to the final
return. Success reaches a new status query at `+0x158`; the old permission value
is dead, and r16 is reused for `createSize` at `+0x170`.
The current source previously reused `result` across the permission and transfer
stages. Narrowing the permission result follows the original lifetime without
changing control or output ownership: failed permission goes to `finish`, whose
only operation is return; successful permission is followed by a new assignment
to `result` from `__CARDGetStatusEx`. No cleanup path reads the scoped value.
This recovers a natural partial previously restored under exact-only acceptance.
`gk3.attempts.md` lines 108/240 recorded 185 -> 176 instruction differences,
identical pool and no exact regressions, but no isolated fuzzy score. The older
`iplCardSequence.attempts.md` also restored this result scope for its focused
exact-function diff. The fresh score below was measured directly.
## Results
- `runCardMoveOrCopy`: 97.8125% -> 97.88651%
- Instructions: unchanged 608/608; ctxdiff differences: 185 -> 176
- Unit fuzzy: 97.20097% -> 97.219246%
- Exact functions: unchanged 27/30; matched code: unchanged 4168/9852 bytes
- All 27 exact functions individually checked: zero ctxdiff differences
- Matched data: unchanged 1496/1496 bytes
- All allocated non-text bytes, sizes and alignments unchanged
- Every other unit's complete report unchanged; no function regression across
the 1027-unit report
- Pool: 43/43 identical before and after
- Literal audit: 45 arguments across 29 functions; no candidates/errors. The
unchanged unequal-extent icon loader is the only skip
- Full 43U all_source/report/DOL gates: pass
- DOL SHA1: `26116613f624061ba99c8d1a299aaa6efa85670d`
- `git diff --check`: pass
## Focused original-machine validation
A bounded integer-PPC interpreter executes the actual baseline, candidate and
original instruction prefixes. It models the CARD calls and records fixed-ABI
arguments and error reports through either permission failure return or the next
status query beginning transfer. No arbitrary register renaming is assumed.
All 17,328 cases agree, including both slots, file numbers 0/63/126, all 256
permission bytes, copy/move/other command values and signed boundaries, negative
status results, and negative/nonnegative `CARDGetResultCode` results. In
particular, the retail continuation when that latter result is nonnegative is
preserved. Outcomes: 12,912 transfer entries and 4,416 early returns. Each version
covers 79 prefix instructions, and early returns preserve SP and nonvolatile
GPRs. An in-memory wrong-permission-mask mutation is detected.
The whole original function's 513 nonrelocated instruction words and all 79
call destinations agree with raw DOL bytes. Baseline, candidate and original
retain the same ordered call identities. This is bounded permission-stage
proof, not a full copy/move or Wii runtime test. The function remains nonexact;
no linking or full decompilation claim is made.

View File

@@ -1,74 +0,0 @@
# Card thread entry contract
Base: `be7ded2fdc4ebba0b87695a132905e38e7f984df`.
Owned source: `src/scene/cardSequence/iplCardSequence.cpp` only.
## Retained source correction
Give `cardThreadMain` its unused `void*` entry parameter in both its declaration
and definition, and remove the function-pointer cast at `OSCreateThread`.
The unnamed parameter follows the existing unused-parameter style in this unit.
The function body and registration arguments are unchanged.
`OSCreateThread` declares its entry as `void* (*)(void*)`. The previous C++
`void* cardThreadMain()` declaration describes a different function type;
its explicit cast hid that mismatch. A C++98 direct-binding compile check rejects
the previous declaration and accepts the corrected declaration. This is a source
interface correction. No runtime sanitizer diagnosis or fuzzy improvement is
claimed: the SDK launches the entry by restoring a machine context.
## Original-machine contract
- The original `initCardThread` is at `0x813D2660`, 668 bytes. Its call to
`OSCreateThread` at `0x813D28B0` passes entry `0x813D2C8C` in r4 and null in r5.
- Original `OSCreateThread` at `0x81534548` preserves the parameter from r5 in
r26, calls `OSInitContext` at `+0x88`, then stores r26 at context `+0x0C`
(`gpr[3]`) at `+0xA4`.
- Original `OSInitContext` at `0x8152E18C` stores entry r4 at context `+0x198`
(`srr0`). `OSLoadContext` at `0x8152E028` restores r3 from context `+0x0C`
at `+0xD0`, immediately before its `rfi`.
- Original `cardThreadMain` is 1204 bytes. The entry prologue calls
`_savegpr_19` at `+0x10`; that helper only stores r19 through r31 and returns.
The body overwrites r3 from `sThread` at `+0x14` before consuming it.
The extra formal is genuinely unused, with no dummy read or receiver.
- The existing null return in r3 remains unchanged. `OSCreateThread` sets the
saved LR to `OSExitThread`, whose original entry preserves returned r3.
- Both original and source retain the existing global C symbol binding. There
is no linkage or callback-address change.
A read-only original-object/DOL audit checked six entry/caller/SDK functions:
656 nonrelocated instruction words and 73 direct calls agree with the original
DOL. The registration's raw address construction was independently decoded;
the evidence does not rely only on objdiff relocation matching.
## Measurements and gates
The baseline and candidate were both explicitly rebuilt with the same 43U
configuration and compiler. No header, build setting, or other source changed.
- `cardThreadMain`: unchanged 97.9402%, 301/301 instructions
- Unit: unchanged 97.20097%, 27/30 exact functions, 4168/9852 matched code bytes
- All 27 exact functions: individually checked, zero instruction differences
- Matched data: unchanged 1496/1496 bytes
- All five allocated sections: byte-identical, including extents and attributes
- All 522 relocation records and all symbol-table records: byte-identical
- The only ELF section difference is `.strtab`: 46 compiler-generated anonymous
`@number` labels are renumbered; each retains its section, value, size and binding
- Full 1027-unit report: byte-identical to baseline
- String pool: 43/43 identical, checked before and after
- Literal-reference check: 45 arguments across 29 functions; no candidates or
errors. The unchanged unequal-extent `loadCardFileIcons` is the only skip
- Full 43U `all_source`, report and DOL gates: pass
- DOL SHA1: `26116613f624061ba99c8d1a299aaa6efa85670d`
- `git diff --check`: pass
Object SHA256 values:
- Baseline: `071b634c812dca8dc853fb57562509e1de1c927d8619aba34f34694ec0e3bf93`
- Candidate: `5bbe85c6a9d2e7aa8559f9b75024cb841bcb76a4273ad9e4dbe8fae23ec6963b`
The prior CardSequence attempts, card-icon reconstruction record, scene-call
contract audit, and current report were inspected first. Earlier trials covered
message packing, local lifetimes, icon parsing and copy/move branches; they did
not correct this callback declaration. No prior register-allocation trial was
repeated. This correction leaves the nonexact scene routines unresolved.

View File

@@ -1,671 +0,0 @@
# gk1 iplSetting max round
Owned unit: src/scene/setting/iplSetting. Data naming and extents first; convertRevIP then scanAP.
Baseline HEAD 20ba34a80f9d0a09c4a8fad51352f0dd97d84be0; fetched origin/main 20ba34a80f9d0a09c4a8fad51352f0dd97d84be0.
Initial worktree has an unrelated untracked perm4.attempts.md; left untouched.
Prior-art index has no iplSetting, scanAP or convertRevIP entry.
Baseline report measures {"fuzzy_match_percent": 99.85767, "total_code": "37884", "matched_code": "36504", "matched_code_percent": 96.35731, "total_data": "5696", "matched_data": "1680", "matched_data_percent": 29.49438, "total_functions": 112, "matched_functions": 110, "matched_functions_percent": 98.21429, "total_units": 1}.
## Data audit
POOL IDENTICAL, 108/108 strings, identical offsets. No missing string or table literals.
All named objects already pair: scAnmTable, sSettingAPButtonNames, sSettingArrowNames, sSettingAPTextNames, sSettingAPNumberNames, sSettingAPPaneNames, sSettingAPAnimations, m_AOSSConfig, m_RakuConfig, mem1Buffer_, mem2Buffer_, browserScrollDirection, scNumber, scNumber2, APEvent/Setting vtables. Each has identical symbol extent and section-relative address in both ELFs. No permitted lbl-to-real-name rename remains.
.data raw nonrelocated bytes are identical, 4016/4016. The only relocation differences are the scanAP switch table at .data+0xc7c, target @27409/source @27430, size 0x28. Its entries at 0xc7c/0xc98/0xc9c/0xca0 point into scanAP at target offsets 1068/872/940/956 vs source 1044/864/924/940. Therefore the 4016-byte data gap is caused by scanAP code offsets, not missing data or names. No symbols changed.
.rodata is byte-identical; renamed compiler-generated @188xx references point to identical version-suffix literals. .sdata and .sdata2 have only final 4-byte unowned alignment absent in the source ELF. Weak extra vtables are ignored.
## Function baseline
Fetched origin/main before inspecting functions; its iplSetting.cpp and header are identical to HEAD. Current report has convertRevIP 98.69863 and scanAP 95.39338; no newer exact match exists in origin/main.
convertRevIP has 73/73 instructions and a 0x40 frame. Structural instruction shapes agree; 16 register/allocation and initialization-order differences remain.
scanAP has 266/272 instructions and a 0x10 frame. Three isPlaying negations are branch-folded in ours, while target materializes the bool with addi/cntlzw/rlwinm. Cases 7 and 9 also differ in load/store scheduling. Fix structure before allocation.
convertRevIP attempt 1: leading-local declaration order search, after confirming identical structural instruction shapes.
declaration block:
char ascii[20];
int count = 0;
int index;
start (0, 16)
best (0, 16) after 6 builds; source restored; best order was:
char ascii[20];
int count = 0;
int index;
convertRevIP | output-before-component-start | {"insns": [73, 73], "structural": 0, "diffs": 16, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | index-initialized-before-component | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | leading-component-declaration | {"insns": [73, 73], "structural": 0, "diffs": 16, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | leading-output-declaration | {"insns": [73, 73], "structural": 0, "diffs": 16, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | count-after-conversion | {"insns": [73, 73], "structural": 2, "diffs": 21, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | restore-best | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
Named data object pairing proof, all extents retained:
- scAnmTable__Q23ipl5scene .rodata+0x0 size 0xe8; common code users create__Q33ipl5scene7SettingFv; pointers none.
- scNumber__Q23ipl5scene .rodata+0x258 size 0x14; common code users none; pointers none.
- scNumber2__Q23ipl5scene .rodata+0x26c size 0x14; common code users none; pointers none.
- m_AOSSConfig__Q23ipl5scene .bss+0x0 size 0x158; common code users AOSSProcess__Q33ipl5scene7SettingFv; pointers none.
- m_RakuConfig__Q23ipl5scene .bss+0x158 size 0x70; common code users RakuProcess__Q33ipl5scene7SettingFv; pointers none.
- sSettingAPButtonNames__Q23ipl5scene .data+0x0 size 0x10; common code users get_ap_no__Q33ipl5scene7SettingFPCc; pointers @16789, @16790, @16791, @16792.
- sSettingAPTextNames__Q23ipl5scene .data+0x10 size 0x18; common code users setAPDraw__Q33ipl5scene7SettingFv; pointers @16795, @16796, @16797, @16798, @16799.
- sSettingAPNumberNames__Q23ipl5scene .data+0x28 size 0x18; common code users initScroll__Q33ipl5scene7SettingFv; pointers @16801, @16802, @16803, @16804, @16805.
- sSettingAPPaneNames__Q23ipl5scene .data+0x90 size 0x68; common code users none; pointers @16807, @16808, @16809, @16810, @16811.
- sSettingAPAnimations__Q23ipl5scene .data+0x284 size 0x4c; common code users none; pointers @16833, @16834, @16835, @16836, @16837.
- __vt__Q33ipl5scene7APEvent .data+0xe9c size 0x18; common code users create__Q33ipl5scene7SettingFv; pointers onEvent__Q33ipl5scene7APEventFUlUlPv, setManager__Q23gui12EventHandlerFPQ23gui7Manager, setLatestEventCtrlNo__Q23gui12EventHandlerFi, getLatestEventCtrlNo__Q23gui12EventHandlerFv.
- __vt__Q33ipl5scene7Setting .data+0xeb4 size 0x68; common code users __ct__Q33ipl5scene7SettingFPQ23EGG4Heapi, __dt__Q33ipl5scene7SettingFv; pointers __dt__Q33ipl5scene7SettingFv, getParent__Q33ipl5scene4BaseFv, getChild__Q33ipl5scene4BaseFv, getNext__Q33ipl5scene4BaseFv, getPrev__Q33ipl5scene4BaseFv.
- sSettingArrowNames__Q23ipl5scene .sdata+0x28 size 0x8; common code users create__Q33ipl5scene7SettingFv, get_arw_no__Q33ipl5scene7SettingFPCc, initScroll__Q33ipl5scene7SettingFv; pointers @16793, @16794.
- mem1Buffer___Q33ipl5scene7Setting .sbss+0x0 size 0x4; common code users __dt__Q33ipl5scene7SettingFv, createBrowser__Q33ipl5scene7SettingFv; pointers none.
- mem2Buffer___Q33ipl5scene7Setting .sbss+0x4 size 0x4; common code users __dt__Q33ipl5scene7SettingFv, createBrowser__Q33ipl5scene7SettingFv; pointers none.
- browserScrollDirection__Q23ipl5scene .sbss+0x8 size 0x4; common code users draw__Q33ipl5scene7SettingFv; pointers none.
Before scanAP experiments, fetched origin/main again; owned source equals initial source: True.
scanAP | isPlaying-equals-false | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | isPlaying-equals-FALSE | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | isPlaying-not-true | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | isPlaying-materialized-int | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | isPlaying-materialized-bool | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | restore-best-scan | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | leading-counter-and-pointer-declarations | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | loop-index-declared-at-initialization | {"insns": [73, 73], "structural": 0, "diffs": 20, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | unsigned-parsed-count | {"insns": [73, 73], "structural": 1, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | byte-conversion-buffer | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | signed-char-conversion-buffer | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | count-before-output-advance | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | output-advance-before-count | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | parse-value-declared-before-loop | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | loop-char-declared-before-loop | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | restore-best-convert-round2 | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | scoped-playing-BOOL | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | scoped-playing-ternary-bool | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | scoped-playing-ternary-BOOL | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | scoped-playing-explicit-result | {"insns": [266, 272], "structural": 54, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | scoped-playing-explicit-BOOL | {"insns": [266, 272], "structural": 54, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | scoped-playing-early-return | {"insns": [266, 272], "structural": 54, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | scoped-playing-reverse-compare | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | scoped-playing-negated-difference | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | restore-best-scoped-playing | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | static-inline-playing-helper | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | static-BOOL-playing-helper | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | static-bool-complete-helper | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | restore-best-free-helper | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP tested existing Object::isPlaying(int) const as a unit-scoped inline definition. All List_GetNth relocations in both objects use const List*; this does not distinguish the original inline accessor. That existing method remained an out-of-line call and gave 257/272 instructions, so restored its original declaration.
scanAP | inline-existing-const-Object-isPlaying | {"insns": [257, 272], "structural": 36, "diffs": 165, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | int-return-compare-one | {"insns": [275, 272], "structural": 56, "diffs": 158, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | int-return-compare-TRUE | {"insns": [275, 272], "structural": 56, "diffs": 158, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | int-return-less-than-one | {"insns": [275, 272], "structural": 56, "diffs": 158, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | int-return-complement-low-bit | {"insns": [278, 272], "structural": 59, "diffs": 163, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | int-return-xor-true | {"insns": [278, 272], "structural": 59, "diffs": 163, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | bool-return-compare-one | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | bool-return-complement-low-bit | {"insns": [278, 272], "structural": 59, "diffs": 163, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | restore-best-predicate-combinations | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | inline-clamp-component-helper | {"insns": [67, 73], "structural": 11, "diffs": 50, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | inline-shift-component-helper | {"insns": [69, 73], "structural": 18, "diffs": 50, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | inline-clamp-and-shift-helpers | {"insns": [63, 73], "structural": 23, "diffs": 51, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | clamp-using-min-ternary | {"insns": [75, 73], "structural": 11, "diffs": 52, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | decimal-value-signed-view | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | restore-best-component-helpers | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | playing-explicit-inline-in-class | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | playing-outside-class-inline | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | playing-outside-class-BOOL | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | playing-byte-return | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | restore-best-inline-boundaries | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | wide-playing-low-bit-is-zero | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | wide-playing-bit-inverted | {"insns": [275, 272], "structural": 56, "diffs": 158, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | wide-playing-unsigned-zero | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | wide-playing-bool-cast | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | wide-playing-equal-boolean-false | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | wide-playing-zero-ternary | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | bool-playing-integer-local-return | {"insns": [266, 272], "structural": 54, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | bool-playing-bool-cast-after-int | {"insns": [266, 272], "structural": 54, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | restore-best-playing-shapes | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | readonly-output-parameter | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | readonly-address-parameter | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | array-output-parameter | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | array-address-parameter | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | output-cursor-before-memset | {"insns": [73, 73], "structural": 2, "diffs": 19, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | output-cursor-before-count | {"insns": [73, 73], "structural": 2, "diffs": 26, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | output-cursor-before-buffer | {"insns": [73, 73], "structural": 2, "diffs": 26, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | scan-counters-at-function-entry | {"insns": [73, 73], "structural": 4, "diffs": 35, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | component-start-at-function-entry | {"insns": [73, 73], "structural": 2, "diffs": 35, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | conversion-address-local-view | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | loop-count-negative-form | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | next-output-pointer-assignment | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | read-only-existing-address-view | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | restore-best-lifetimes | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | cursor-advanced-with-first-store | {"insns": [73, 73], "structural": 3, "diffs": 22, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | count-postincrement-in-first-test | {"insns": [73, 73], "structural": 4, "diffs": 22, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | count-incremented-in-both-branches | {"insns": [74, 73], "structural": 10, "diffs": 49, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | cursor-incremented-in-both-branches | {"insns": [74, 73], "structural": 8, "diffs": 49, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | index-and-component-joint-init | {"insns": [73, 73], "structural": 0, "diffs": 16, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | loop-index-and-start-joint-init | {"insns": [73, 73], "structural": 0, "diffs": 16, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | parse-array-index-address | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | write-byte-by-cursor-subscript | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | loop-with-explicit-bottom-step | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | typed-zero-byte | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | ascii-buffer-initialized-at-definition | {"insns": [75, 73], "structural": 12, "diffs": 69, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | restore-best-flow | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | bool-playing-nonpositive | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | bool-playing-less-than-TRUE | {"insns": [275, 272], "structural": 56, "diffs": 158, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | bool-playing-byte-mask-zero | {"insns": [272, 272], "structural": 9, "diffs": 12, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | bool-playing-full-mask-zero | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | bool-playing-left-shift-zero | {"insns": [272, 272], "structural": 9, "diffs": 12, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | bool-playing-unsigned-mask-zero | {"insns": [272, 272], "structural": 9, "diffs": 12, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | bool-playing-boolean-cast-false | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | bool-playing-zero-first-comparison | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | bool-playing-negative-zero-comparison | {"insns": [272, 272], "structural": 12, "diffs": 15, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | bool-playing-test-double-negation | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | bool-playing-mask-TRUE-zero | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | bool-playing-zero-conditional | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | BOOL-playing-nonpositive | {"insns": [272, 272], "structural": 9, "diffs": 12, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | BOOL-playing-less-than-TRUE | {"insns": [275, 272], "structural": 56, "diffs": 158, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | BOOL-playing-byte-mask-zero | {"insns": [272, 272], "structural": 9, "diffs": 12, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | BOOL-playing-full-mask-zero | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | BOOL-playing-left-shift-zero | {"insns": [272, 272], "structural": 9, "diffs": 12, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | BOOL-playing-unsigned-mask-zero | {"insns": [272, 272], "structural": 9, "diffs": 12, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | BOOL-playing-boolean-cast-false | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | BOOL-playing-zero-first-comparison | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | BOOL-playing-negative-zero-comparison | {"insns": [272, 272], "structural": 12, "diffs": 15, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | BOOL-playing-test-double-negation | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | BOOL-playing-mask-TRUE-zero | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | BOOL-playing-zero-conditional | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | restore-best-expression-search | {"insns": [272, 272], "structural": 9, "diffs": 12, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | late-bool-playing-helper | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | late-BOOL-playing-helper | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | late-FrameController-playing-definition | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | restore-best-late-helpers | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | inspect-wide-playing-nonpositive | {"insns": [272, 272], "structural": 9, "diffs": 12, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | explicit-buffer-pointer-before-output-all | {"insns": [71, 73], "structural": 9, "diffs": 56, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | explicit-buffer-pointer-before-output-read-only | {"insns": [71, 73], "structural": 9, "diffs": 56, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | explicit-buffer-pointer-before-output-decimal-only | {"insns": [71, 73], "structural": 9, "diffs": 56, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | explicit-buffer-pointer-before-output-scan-only | {"insns": [73, 73], "structural": 0, "diffs": 20, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | explicit-buffer-pointer-after-output-all | {"insns": [71, 73], "structural": 9, "diffs": 56, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | explicit-buffer-pointer-after-output-read-only | {"insns": [71, 73], "structural": 9, "diffs": 56, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | explicit-buffer-pointer-after-output-decimal-only | {"insns": [71, 73], "structural": 9, "diffs": 56, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | explicit-buffer-pointer-after-output-scan-only | {"insns": [73, 73], "structural": 0, "diffs": 20, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | explicit-buffer-pointer-after-index-all | {"insns": [71, 73], "structural": 9, "diffs": 56, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | explicit-buffer-pointer-after-index-read-only | {"insns": [71, 73], "structural": 9, "diffs": 56, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | explicit-buffer-pointer-after-index-decimal-only | {"insns": [71, 73], "structural": 9, "diffs": 56, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | explicit-buffer-pointer-after-index-scan-only | {"insns": [73, 73], "structural": 0, "diffs": 20, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | explicit-buffer-pointer-before-memset-all | {"insns": [71, 73], "structural": 12, "diffs": 63, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | explicit-buffer-pointer-before-memset-read-only | {"insns": [71, 73], "structural": 12, "diffs": 63, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | explicit-buffer-pointer-before-memset-decimal-only | {"insns": [71, 73], "structural": 12, "diffs": 63, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | explicit-buffer-pointer-before-memset-scan-only | {"insns": [73, 73], "structural": 5, "diffs": 27, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | restore-best-explicit-buffer-pointer | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | int-local-playing <= 0 | {"insns": [272, 272], "structural": 9, "diffs": 12, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | int-local-playing == 0 | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | int-local-!playing | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | int-accumulate-|= | {"insns": [272, 272], "structural": 6, "diffs": 9, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | int-accumulate-+= | {"insns": [272, 272], "structural": 6, "diffs": 9, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | BOOL-local-playing <= 0 | {"insns": [272, 272], "structural": 9, "diffs": 12, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | BOOL-local-playing == 0 | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | BOOL-local-!playing | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | BOOL-accumulate-|= | {"insns": [272, 272], "structural": 6, "diffs": 9, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | BOOL-accumulate-+= | {"insns": [272, 272], "structural": 6, "diffs": 9, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | bool-local-playing <= 0 | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | bool-local-playing == 0 | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | bool-local-!playing | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | bool-accumulate-|= | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | bool-accumulate-+= | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | restore-best-local-status | {"insns": [272, 272], "structural": 6, "diffs": 9, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | bool-status-switch-zero | {"insns": [275, 272], "structural": 54, "diffs": 157, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | bool-status-switch-one | {"insns": [275, 272], "structural": 56, "diffs": 158, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | BOOL-status-switch-zero | {"insns": [275, 272], "structural": 54, "diffs": 157, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | BOOL-status-switch-one | {"insns": [275, 272], "structural": 56, "diffs": 158, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | restore-best-status-switch | {"insns": [266, 272], "structural": 53, "diffs": 160, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | capture-index-in-both-remaining-cases | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | capture-index-only-in-case7 | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | restore-best-state-scheduling | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-unsigned-index | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-narrow-index-local | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-explicit-index-narrowing | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-unsigned-argument-view | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-readonly-index-local | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-animator-local | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-readonly-animator-local | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-layout-local-after-index | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-playing-declaration-before-index | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | restore-best-case9-scheduling | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-index-const-reference | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-index-reference | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-index-const-pointer | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-const-setting-view | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-layout-reference | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | restore-best-readonly-case9-views | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | lookup-index-first-case9 | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | lookup-index-first-all-cases | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | lookup-layout-first-case9 | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | lookup-layout-first-all-cases | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | restore-best-inline-lookup | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-sdk-index | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-sdk-playing | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-sdk-index-and-playing | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-initialized-playing-after-index | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | common-playing-mask | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-add-result | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-zero-integer-initializer | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-condition-equals-FALSE | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | restore-best-case9-final-forms | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | sdk-count-int-index-int-start-s32 | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | sdk-count-int-index-s32-start-int | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | sdk-count-int-index-s32-start-s32 | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | sdk-count-s32-index-int-start-int | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | sdk-count-s32-index-int-start-s32 | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | sdk-count-s32-index-s32-start-int | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | sdk-count-s32-index-s32-start-s32 | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | moving-output-parameter | {"insns": [73, 73], "structural": 0, "diffs": 24, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | moving-parameter-with-base-before-calls | {"insns": [73, 73], "structural": 2, "diffs": 29, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | reuse-address-parameter-for-converted-text | {"insns": [71, 73], "structural": 9, "diffs": 56, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | unsigned-int-value-type | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | restore-best-parameter-role-types | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-readonly-layout-query | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-readonly-layout-first | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | case9-const-reference-layout-query | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | restore-best-const-layout-lookup | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | leading-all-parser-locals | {"insns": [73, 73], "structural": 0, "diffs": 14, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
## Structural result
Integer animation status accumulation preserves the target addi/cntlzw/rlwinm normalization without masks, shifts, volatile, assembly, or unused values. Capturing the animation index before the busy flag store in state 7 restores its target loads. scanAP reaches 272/272 instructions, leaving only the four load/scheduling differences in state 9; all scanAP switch-table relocations now have the correct offsets, making all 5696/5696 data bytes match. The accumulator representation is inferred from the compilation experiment.
convertRevIP initialization order reduces the register-only diff from 16 to 14 while preserving 73/73 instructions and the 0x40 frame. Neither function is claimed exact yet.
Both target extents meet their next function exactly: convertRevIP 0x813f5e1c+0x124=adjustSecA 0x813f5f40; scanAP 0x813f6858+0x440=initScroll 0x813f6c98. No extents changed.
convertRevIP | full-local declaration permutation search |
declaration block:
char ascii[20];
int count = 0;
int index;
int componentStart;
u8* output;
u32 value;
u8 character;
start (0, 14)
improved (0, 8)
best (0, 8) after 60 builds; kept in source:
char ascii[20];
u8* output;
int index;
int componentStart;
int count = 0;
u32 value;
u8 character;
convertRevIP | all-parser-declaration-search-result | {"insns": [73, 73], "structural": 0, "diffs": 8, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | restore-best-after-all-declarations | {"insns": [73, 73], "structural": 0, "diffs": 8, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | sdk-field-unk_0x918-s32 | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | sdk-field-unk_0x918-u32 | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | sdk-field-unk_0xB9C-s32 | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | sdk-field-unk_0xB9C-u32 | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | restore-best-field-types | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | existing-character-clears-delimiter | {"insns": [73, 73], "structural": 0, "diffs": 8, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | character-assignment-clears-delimiter | {"insns": [73, 73], "structural": 0, "diffs": 8, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | existing-parsed-value-clears-delimiter | {"insns": [73, 73], "structural": 0, "diffs": 8, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | typed-null-literal | {"insns": [73, 73], "structural": 0, "diffs": 8, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | byte-null-cast | {"insns": [73, 73], "structural": 0, "diffs": 8, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | character-local-loop-scope | {"insns": [73, 73], "structural": 0, "diffs": 8, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | decimal-value-local-delimiter-scope | {"insns": [73, 73], "structural": 0, "diffs": 8, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | named-null-terminator-before-output | {"insns": [73, 73], "structural": 0, "diffs": 8, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | named-null-terminator-after-index | {"insns": [73, 73], "structural": 0, "diffs": 8, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | named-null-terminator-before-loop | {"insns": [73, 73], "structural": 0, "diffs": 8, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | restore-best-null-character-lifetimes | {"insns": [73, 73], "structural": 0, "diffs": 8, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | first-component-indexed-by-count | {"insns": [73, 73], "structural": 0, "diffs": 0, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
convertRevIP | restore-best-count-derived-cursor | {"insns": [73, 73], "structural": 0, "diffs": 0, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | single-integer-animation-status | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | scoped-getAnim-index-u16 | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | scoped-getAnim-index-unsigned int | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | scoped-getAnim-index-u32 | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | scoped-getAnim-index-s32 | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
scanAP | restore-best-lookup-argument-type | {"insns": [272, 272], "structural": 3, "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)"}
## Exact convertRevIP
The target output cursor is a compiler-generated induction variable, not an explicit source pointer. Using destination[count] for the first-component store lets MWCC perform its own strength reduction. Combined with the logged local order and index-before-componentStart initialization, this gives 73/73 instructions, ctxdiff diffs 0, objdiff 100.0%, matched code 36504 -> 36796, exact functions 110 -> 111. The store is equivalent because this branch executes only when count == 0. No manual cursor, assembly, uninitialized read, symbol change, or artificial data is used.
scanAP uses one BOOL status initialized FALSE and ORs the current animation query in states 6/7/9; state 7 captures the animation index before setting the busy flag. Every data section matches 100%; state 9 still has four load/operand scheduling differences. All experimental shared-header edits were restored.
## Plateau audit
{'convertRevIP': 83, 'scanAP': 123} distinct compiled source trials, plus 6-build initial and 60-build full declaration searches. Only scanAP remains open; more than three distinct successful trials are logged. Its remaining four differences are the state-9 animation-index/layout-pointer load order and the two subsequent argument instructions. None change switch destinations. No hard-case function is left untried.
## Quick gate before commit
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/scene/setting/iplSetting] pool: IDENTICAL
[src/scene/setting/iplSetting] objdiff: code 36796/37884 data 5696/5696 functions 111/112 fuzzy 99.9771 linked code 0
[src/scene/setting/iplSetting] instruction-exact functions: 110/112
[src/scene/setting/iplSetting] section .bss size 456 match 100.0
[src/scene/setting/iplSetting] section .data size 4016 match 100.0
[src/scene/setting/iplSetting] section .rodata size 640 match 100.0
[src/scene/setting/iplSetting] section .sbss size 16 match 100.0
[src/scene/setting/iplSetting] section .sdata size 504 match 100.0
[src/scene/setting/iplSetting] section .sdata2 size 64 match 100.0
[src/scene/setting/iplSetting] section .text size 37884 match 99.97709
[src/scene/setting/iplSetting] below 100: scanAP__Q33ipl5scene7SettingFv 99.20221
[src/scene/setting/iplSetting] baseline: code 36504/37884 data 1680 functions 110 fuzzy 99.8577
regressions vs baseline: 0
global matched_code_percent: 91.53532 -> 91.54507
global fuzzy_match_percent: 99.69871 -> 99.70022
global complete_code_percent: 74.74593 -> 74.74593
global matched_data_percent: 99.55890 -> 99.77803
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
## Instruction-exact baseline clarification
Independently rebuilt the initial source in this same worktree, then restored and rebuilt the committed candidate. The baseline has 109/112 raw instruction-exact functions, despite objdiff reporting 110/112. Candidate has 110/112 raw instruction-exact functions and 111/112 in objdiff. The pre-existing discrepancy is not introduced by this diff. Baseline raw nonexact list: convertRevIP__Q33ipl5scene7SettingFPUcPCc, scanAP__Q33ipl5scene7SettingFv, setUpdate_NoUpdateDialog___Q33ipl5scene7SettingFv.
The pre-existing raw-count discrepancy is a gate-tool normalization bug: odiff.dis treats operand 0 of blt cr1 as an immediate branch target. That operand is the CR register, while operand 1 is the target. Therefore source/target section offsets enter the comparison. setUpdate_NoUpdateDialog_ has identical 120-byte instruction bytes and correct last-operand normalization gives structural 0, exact 0; objdiff is correctly 100%. Gate still prints 110/112 after versus 109/112 before; actual instruction matches are 111/112 after and 110/112 before. No gate or helper was edited.
## Final clean full gate
Command: python3 /mnt/drive2/projects/wii-ipl-workers/_restore0928-tools/gate.py src/scene/setting/iplSetting (no --quick). Exit status 0.
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/scene/setting/iplSetting] pool: IDENTICAL
[src/scene/setting/iplSetting] objdiff: code 36796/37884 data 5696/5696 functions 111/112 fuzzy 99.9771 linked code 0
[src/scene/setting/iplSetting] instruction-exact functions: 110/112
[src/scene/setting/iplSetting] section .bss size 456 match 100.0
[src/scene/setting/iplSetting] section .data size 4016 match 100.0
[src/scene/setting/iplSetting] section .rodata size 640 match 100.0
[src/scene/setting/iplSetting] section .sbss size 16 match 100.0
[src/scene/setting/iplSetting] section .sdata size 504 match 100.0
[src/scene/setting/iplSetting] section .sdata2 size 64 match 100.0
[src/scene/setting/iplSetting] section .text size 37884 match 99.97709
[src/scene/setting/iplSetting] below 100: scanAP__Q33ipl5scene7SettingFv 99.20221
[src/scene/setting/iplSetting] baseline: code 36504/37884 data 1680 functions 110 fuzzy 99.8577
regressions vs baseline: 0
global matched_code_percent: 91.53532 -> 91.54507
global fuzzy_match_percent: 99.69871 -> 99.70022
global complete_code_percent: 74.74593 -> 74.74593
global matched_data_percent: 99.55890 -> 99.77803
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
After the full gate, regenerated the live report. pool_diff: IDENTICAL, 108/108. convertRevIP: objdiff 100.0%, ctxdiff diffs 0, instructions 73/73. scanAP: objdiff 99.20221%, ctxdiff diffs 4, instructions 272/272. All owned data sections are 100%. No literal is missing, and no symbol rename or extent adjustment was required. The only open function is scanAP; its 123 distinct compiled trials and declaration searches exceed the three-attempt handoff requirement.
## Host-restart recovery 2026-10-03T03:50:28.907285+00:00
Preserved commits 349be634 and f4797373 and unrelated untracked perm4.attempts.md. No tracked uncommitted source edits remained. Fetched fork origin under /tmp/wii-git.lock; origin/main is a791e598a154e105d9ca81087d8d5912e222636a. Owned source and headers have no changes in the new origin/main commits. No rebase or branch changes.
Fresh object build: no work to do. Corrected pool_diff argument from unit path to explicit source/target object paths: POOL IDENTICAL, 108/108. convertRevIP: 73/73 instructions, diffs 0. scanAP: 272/272 instructions, diffs 4 at 239-242, only state-9 lookup loads/argument ordering. Previous 123 scanAP trials retained and not repeated.
One initial skill announcement was emitted before reading silent_mode_first, as required by the session skill instructions. Subsequent worker communication is tool calls only.
scanAP | recovery-common-int-animation-index | {"insns": [272, 272], "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)", "ctxdiff": "src 0x440 base 0x440 insns 272/272\ndiffs 4: [239, 240, 241, 242]\n 239 M lwz r3, 0xc4(r3)\n B lwz r0, 0x918(r3)\n 240 M lwz r0, 0x918(r31)\n B lwz r3, 0xc4(r3)\n 241 M addi r3, r3, 0x28c\n B clrlwi r4, r0, 0x10\n 242 M clrlwi r4, r0, 0x10\n B addi r3, r3, 0x28c"}
scanAP | recovery-common-u16-animation-index | {"insns": [272, 272], "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)", "ctxdiff": "src 0x440 base 0x440 insns 272/272\ndiffs 4: [239, 240, 241, 242]\n 239 M lwz r3, 0xc4(r3)\n B lwz r0, 0x918(r3)\n 240 M lwz r0, 0x918(r31)\n B lwz r3, 0xc4(r3)\n 241 M addi r3, r3, 0x28c\n B clrlwi r4, r0, 0x10\n 242 M clrlwi r4, r0, 0x10\n B addi r3, r3, 0x28c"}
scanAP | recovery-common-animator-result | {"insns": [272, 272], "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)", "ctxdiff": "src 0x440 base 0x440 insns 272/272\ndiffs 4: [239, 240, 241, 242]\n 239 M lwz r3, 0xc4(r3)\n B lwz r0, 0x918(r3)\n 240 M lwz r0, 0x918(r31)\n B lwz r3, 0xc4(r3)\n 241 M addi r3, r3, 0x28c\n B clrlwi r4, r0, 0x10\n 242 M clrlwi r4, r0, 0x10\n B addi r3, r3, 0x28c"}
scanAP | recovery-final-preserved-source | {"insns": [272, 272], "diffs": 4, "pool": "POOL IDENTICAL up to 108 (mine=108 base=108)", "ctxdiff": "src 0x440 base 0x440 insns 272/272\ndiffs 4: [239, 240, 241, 242]\n 239 M lwz r3, 0xc4(r3)\n B lwz r0, 0x918(r3)\n 240 M lwz r0, 0x918(r31)\n B lwz r3, 0xc4(r3)\n 241 M addi r3, r3, 0x28c\n B clrlwi r4, r0, 0x10\n 242 M clrlwi r4, r0, 0x10\n B addi r3, r3, 0x28c"}
## Recovery final clean full gate 2026-10-03T03:54:55.458102+00:00
Three new common-local scanAP trials were compiled: int animation index, u16 animation index, and Animator result pointer. All stayed 272/272 instructions with the same four differences and identical 108-string pools. Restored the prior gate-passing committed source byte for byte. No previous source trial was repeated.
Command: python3 /mnt/drive2/projects/wii-ipl-workers/_restore0928-tools/gate.py src/scene/setting/iplSetting, without --quick. Exit status 0.
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/scene/setting/iplSetting] pool: IDENTICAL
[src/scene/setting/iplSetting] objdiff: code 36796/37884 data 5696/5696 functions 111/112 fuzzy 99.9771 linked code 0
[src/scene/setting/iplSetting] instruction-exact functions: 110/112
[src/scene/setting/iplSetting] section .bss size 456 match 100.0
[src/scene/setting/iplSetting] section .data size 4016 match 100.0
[src/scene/setting/iplSetting] section .rodata size 640 match 100.0
[src/scene/setting/iplSetting] section .sbss size 16 match 100.0
[src/scene/setting/iplSetting] section .sdata size 504 match 100.0
[src/scene/setting/iplSetting] section .sdata2 size 64 match 100.0
[src/scene/setting/iplSetting] section .text size 37884 match 99.97709
[src/scene/setting/iplSetting] below 100: scanAP__Q33ipl5scene7SettingFv 99.20221
[src/scene/setting/iplSetting] baseline: code 36504/37884 data 1680 functions 110 fuzzy 99.8577
regressions vs baseline: 0
global matched_code_percent: 91.53532 -> 91.54507
global fuzzy_match_percent: 99.69871 -> 99.70022
global complete_code_percent: 74.74593 -> 74.74593
global matched_data_percent: 99.55890 -> 99.77803
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
Regenerated build/43U/report.json with ninja progress build/43U/report.json. Open functions: scanAP__Q33ipl5scene7SettingFv, 99.20221%, four differences at instructions 239-242. All 126 distinct source-level scanAP trials are logged, exceeding the three-attempt plateau handoff contract. convertRevIP is still 100.0%, 73/73 instructions, diffs 0. Data stays 5696/5696 and all six owned data sections are 100%.
Fresh raw-byte verification of the existing gate discrepancy: setUpdate_NoUpdateDialog___Q33ipl5scene7SettingFv source and target instruction bytes are identical, 120 bytes, SHA1 1d64ee400d91a5c2583db97e3334c3805da18006. Live objdiff correctly gives it 100.0%. Gate still reports 110/112 raw instruction-exact functions; actual exact count is 111/112. Earlier independently measured raw baseline 109/112 -> candidate 110/112 is preserved; corrected actual count is 110/112 -> 111/112. No helper or gate edits.

View File

@@ -1,244 +0,0 @@
# gk3 MAX structural and sibling-idiom round
2026-10-03T02:41:57.184346+00:00
HEAD 20ba34a80f9d0a09c4a8fad51352f0dd97d84be0; origin/main 20ba34a80f9d0a09c4a8fad51352f0dd97d84be0.
Owned sources: src/scene/address/iplAddress.cpp, src/scene/address/iplAddressEdit.cpp, src/scene/cardSequence/iplCardSequence.cpp; config/43U/symbols.txt only if proven metadata correction is needed. Matching only; no configure.py or linking changes.
Acceptance: pool preserved, exact-name objdiff and instruction-exact gains, no regressions/forbidden or readability patterns, full non-quick gate across all three units, correct DOL SHA1; commit every passing improvement. All remaining functions require three distinct source-level attempts with matched sibling references first.
Baseline objdiff exact functions/code/data: Address 98/101, 21856/23988, 1964/1964; AddressEdit 91/94, 23344/27112, 2560/2560; CardSequence 27/30, 4168/9852, 1496/1496. All assigned data already 100%; no missing-name or extent correction indicated. Reference index has no entries for the assigned units. All three pools identical.
## Address::start_drag_event
Fresh origin fetch: assigned source unchanged. Target and ours both 223 instructions/frame 0x40, only seven icon/pane register differences. Matched sibling AddressEdit::nigaoe_create_callback_edit uses a named Pane and a texture accessor; Address::MiiObj::create_callback uses a typed MiiObj receiver and getIconTexture. Using those idioms before declaration search; reference index has no hit. No overlap in symbol extent.
- start_drag_event__Q33ipl5scene7AddressFPCcPCQ33ipl10controller9Interface | read-only nigaoe pointer for const texture/image accessors: 223/223 instructions; structural/exact (0, 7); pool identical; exact regressions []; reverted.
- start_drag_event__Q33ipl5scene7AddressFPCcPCQ33ipl10controller9Interface | typed MiiObj reference shared by texture access and reset: 223/223 instructions; structural/exact (4, 50); pool identical; exact regressions []; reverted.
- start_drag_event__Q33ipl5scene7AddressFPCcPCQ33ipl10controller9Interface | explicit root pane lookup used by exact movePane_onDrag: 223/223 instructions; structural/exact (0, 7); pool identical; exact regressions []; reverted.
- start_drag_event__Q33ipl5scene7AddressFPCcPCQ33ipl10controller9Interface | named const texture reference following matched callback accessor idiom: 223/223 instructions; structural/exact (0, 7); pool identical; exact regressions []; reverted.
- start_drag_event__Q33ipl5scene7AddressFPCcPCQ33ipl10controller9Interface | named image pointer for memcpy using matched pointer-local idiom: 223/223 instructions; structural/exact (0, 7); pool identical; exact regressions []; reverted.
- start_drag_event__Q33ipl5scene7AddressFPCcPCQ33ipl10controller9Interface | pane lookup through named layout reference: 223/223 instructions; structural/exact (0, 7); pool identical; exact regressions []; reverted.
- start_drag_event__Q33ipl5scene7AddressFPCcPCQ33ipl10controller9Interface | named root pane boundary mirroring exact scene construction: 223/223 instructions; structural/exact (0, 7); pool identical; exact regressions []; reverted.
- start_drag_event__Q33ipl5scene7AddressFPCcPCQ33ipl10controller9Interface | named material receiver mirroring matched MiiObj callback: 223/223 instructions; structural/exact (0, 7); pool identical; exact regressions []; reverted.
- start_drag_event__Q33ipl5scene7AddressFPCcPCQ33ipl10controller9Interface | explicit root with const texture reference boundary: 223/223 instructions; structural/exact (0, 7); pool identical; exact regressions []; reverted.
- start_drag_event__Q33ipl5scene7AddressFPCcPCQ33ipl10controller9Interface | single-use inline texture installation with const object reference: BUILD FAILED, reverted. ive2\projects\wii-ipl-workers\data- # d4\src\scene\address\iplAddress.cpp:6) ### mwcceppc.exe Compiler: # File: src\scene\address\iplAddress.cpp # ----------------------------------------- # 1174: nw4r::lyt::Pane* miiPane = address.mpLayout->FindPaneByName("mii_move"); # Error: ^^ # (10412) illegal access from 'ipl::scene::Address' to protected/private # member 'ipl::scene::Address::mpLayout' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
## Address::onEventDerived
Fetched origin; source unchanged there. Both 270 instructions, frame 0x30; remaining differences are saved register assignments. Matched sibling AddressAddSel::onEventDerived and MailAddressSelect::onEventDerived split PaneComponent from name lookup; matched AddressEdit::onEventDerived also names manager and pane. Branch structure and string order already correct; no extent overlap/reference-index hit.
- onEventDerived__Q33ipl5scene7AddressFUlUlPCQ33ipl10controller9Interface | matched sibling PaneComponent local boundary: 270/270 instructions; structural/exact (0, 81); pool identical; exact regressions []; reverted.
- onEventDerived__Q33ipl5scene7AddressFUlUlPCQ33ipl10controller9Interface | matched AddressEdit manager/component/pane lookup boundaries: 270/270 instructions; structural/exact (0, 81); pool identical; exact regressions []; reverted.
- onEventDerived__Q33ipl5scene7AddressFUlUlPCQ33ipl10controller9Interface | named animator reuse and initFrame/restart used by exact AddressEdit states: 270/270 instructions; structural/exact (0, 81); pool identical; exact regressions []; reverted.
Address::onEventDerived register-only last: official declsearch --score-only structural 0 exact 81. No independent leading declaration block to permute safely. Restored baseline after three sibling-based attempts.
## FriendListCache::update
Fresh origin fetch; source unchanged. Target 40 instructions/0x20 frame, ours 39/0x20. Target recomputes mInfos[index] after wcsncpy; ours retains a record pointer in r31. Exact sibling FriendListCache::add recalculates direct mInfos[index] for writeFriendInfo after memcpy. No pool/data issue or extent overlap/reference-index hit.
- update__Q33ipl5scene15FriendListCacheFUlPCwUx | direct member-array access matching exact FriendListCache::add: 38/40 instructions; structural/exact (7, 33); pool identical; exact regressions []; reverted.
- update__Q33ipl5scene15FriendListCacheFUlPCwUx | read-only cache view for name and update-info accessors: 39/40 instructions; structural/exact (2, 11); pool identical; exact regressions []; reverted.
- update__Q33ipl5scene15FriendListCacheFUlPCwUx | named manager followed by const record accessor as in cache init: 39/40 instructions; structural/exact (2, 11); pool identical; exact regressions []; reverted.
- update__Q33ipl5scene15FriendListCacheFUlPCwUx | const accessor for name but direct member address for update, matching add: 39/40 instructions; structural/exact (4, 19); pool identical; exact regressions []; reverted.
- update__Q33ipl5scene15FriendListCacheFUlPCwUx | direct writable name with const accessor only for final update: 39/40 instructions; structural/exact (10, 32); pool identical; exact regressions []; reverted.
- update__Q33ipl5scene15FriendListCacheFUlPCwUx | explicit signed friend index in final member lookup: 40/40 instructions; structural/exact (0, 0); pool identical; exact regressions []; retained for gate.
## AddressEdit::create
Fresh origin fetch, source unchanged. Target 820 instructions versus ours 818, frame 0x50. Constant text-pool base and board file use swapped saved registers; tail has argument-load order and two lost conditional margin loads because source creates margin locals before new. Exact sibling Address::create and AddressAddSel::create use getSceneHeap and natural constructor arguments; exact AddressEdit::stt_wait_decide_anm names animator/text receivers. TextBalloon construction idiom from siblings will be compared. No pool/extent/reference-index issue.
- create__Q33ipl5scene11AddressEditFv | literal margins in new constructor, matching target conditional argument evaluation: 808/820 instructions; structural/exact (37, 803); pool identical; exact regressions []; reverted.
- create__Q33ipl5scene11AddressEditFv | literal margins plus direct getSceneHeap used by exact sibling create: 808/820 instructions; structural/exact (37, 803); pool identical; exact regressions []; reverted.
- create__Q33ipl5scene11AddressEditFv | named board receiver before layout file accessor, sibling scene idiom: 808/820 instructions; structural/exact (37, 803); pool identical; exact regressions []; reverted.
FriendListCache::update exact result: final signed native mInfos subscript prevents MWCC retaining the earlier const accessor result across wcsncpy, matching the target repeated 0x140 multiply. Uses the same member array as exact add, with signed indexing consistent with getInfo(int). 40/40 instructions, ctxdiff diffs 0. Quick three-unit gate PASS, zero regressions/forbidden/readability warnings; data remains exact.
Baseline instruction-exact counts freshly measured: Address 97/101, AddressEdit 91/94, CardSequence 27/30. Address objdiff count is 98, one existing objdiff-exact stream is not instruction-exact.
AddressEdit::create note correction: frame is 0x60, not 0x50; direct literal margins dropped saved floats and grew the structural mismatch. Exact SDButton::create confirms the direct-literal idiom but our target retains saved margins across the position constructor.
Full non-quick three-unit gate 1: GATE PASS; DOL 26116613f624061ba99c8d1a299aaa6efa85670d; zero regressions/forbidden/readability warnings; Address code 22016/23988, objdiff 99/101, instruction-exact 98/101, data 1964/1964. Other owned units unchanged. Gate log /tmp/gk3.gate2.log.
The baseline objdiff/instruction count discrepancy is AddressEvent::onEvent: odiff interprets the first condition-register operand of two beq instructions as a branch immediate, yielding source-offset-dependent false instruction differences. Objdiff remains 100%; no source change warranted.
- create__Q33ipl5scene11AddressEditFv | TextBalloon default margin arguments before VEC3 evaluation: 808/820 instructions; structural/exact (37, 803); pool identical; exact regressions []; reverted.
- create__Q33ipl5scene11AddressEditFv | default margin constructor plus exact sibling getSceneHeap spelling: 808/820 instructions; structural/exact (37, 803); pool identical; exact regressions []; reverted.
- create__Q33ipl5scene11AddressEditFv | default margins with heap-before-manager creation arguments as target loads: 808/820 instructions; structural/exact (37, 803); pool identical; exact regressions []; reverted.
## AddressEdit::get_friendinfo
Fresh origin fetch; assigned source unchanged. Target 84/ours 82 instructions, both frame 0x420. Target holds name/display-text member addresses across FindPaneByName virtual calls, ours computes them after. Matched local idiom is AddressEdit::create mode 0 and exact stt_add_name_fadein/stt_wait_decide_anm, which bind text and Pane before set_textbox. Matching add_friendinfo also binds typed source/destination. No pool/extent/reference-index issue.
- get_friendinfo__Q33ipl5scene11AddressEditFv | name/display pointer lifetimes across pane lookup matching scene text idiom: 82/84 instructions; structural/exact (10, 68); pool identical; exact regressions []; reverted.
- get_friendinfo__Q33ipl5scene11AddressEditFv | typed record-copy input and destination boundaries with named text pointers: 82/84 instructions; structural/exact (10, 68); pool identical; exact regressions []; reverted.
- get_friendinfo__Q33ipl5scene11AddressEditFv | named friend index and cache before copy, keeping text accessor lifetimes: 82/84 instructions; structural/exact (10, 68); pool identical; exact regressions []; reverted.
## AddressEdit::update_friendinfo
Fresh origin fetch, assigned source unchanged. 38/38 instructions and 0x10 frame, only wcsncpy source/destination address instruction order differs. Exact add_friendinfo creates const name and writable storedName locals in that order. Porting that source-evaluation idiom; no pool/data/extent/reference-index issue.
- update_friendinfo__Q33ipl5scene11AddressEditFv | named source and destination matching exact add_friendinfo: 38/38 instructions; structural/exact (2, 2); pool identical; exact regressions []; reverted.
- update_friendinfo__Q33ipl5scene11AddressEditFv | read-only String view for source alias and load ordering: 38/38 instructions; structural/exact (2, 2); pool identical; exact regressions []; reverted.
- update_friendinfo__Q33ipl5scene11AddressEditFv | typed global friend-info reference plus const name pointer: 38/38 instructions; structural/exact (2, 2); pool identical; exact regressions []; reverted.
Accessor-boundary reconstruction: trying guarded read-only String getName/getDisplayText helpers, matching existing getDispCodeLong and Address::getInfo getter style. Header guard affects only AddressEdit CPP. Pure member-address temporaries alone were sunk after virtual calls; inline accessor return lifetimes may recover the two target saved addresses.
- get_friendinfo__Q33ipl5scene11AddressEditFv | const inline String accessor return across pane lookup: 82/84 instructions; structural/exact (10, 68); pool identical; exact regressions []; reverted.
- get_friendinfo__Q33ipl5scene11AddressEditFv | mutable inline String receiver with const returned text: 82/84 instructions; structural/exact (10, 68); pool identical; exact regressions []; reverted.
- update_friendinfo__Q33ipl5scene11AddressEditFv | const inline name getter in wcsncpy argument, matching accessor evaluation idiom: 38/38 instructions; structural/exact (2, 2); pool identical; exact regressions []; reverted.
- update_friendinfo__Q33ipl5scene11AddressEditFv | explicit first element address for stored UTF16 name: 38/38 instructions; structural/exact (2, 2); pool identical; exact regressions []; reverted.
- update_friendinfo__Q33ipl5scene11AddressEditFv | explicit source first element address in wcsncpy: 38/38 instructions; structural/exact (2, 2); pool identical; exact regressions []; reverted.
- update_friendinfo__Q33ipl5scene11AddressEditFv | ordinary wide pointer cast spelling as in matching FriendListCache update: 38/38 instructions; structural/exact (2, 2); pool identical; exact regressions []; reverted.
## cardThreadMain
Fresh origin fetch; owned source unchanged. Target/ours 301 instructions, frame 0x130. Structural mismatch is validity response packing order plus many register assignments. Exact matched siblings probeCard and sendCardSlotState use OSMessage, typed slot/command extraction, queue locals and a union packet; clearAllCardFileEntries uses a signed do/while index. Matched index checked: all are 100. No pool/data/extent/reference-index issue.
- cardThreadMain | native OSMessage receive/storage matching exact probeCard: 301/301 instructions; structural/exact (2, 78); pool identical; exact regressions []; reverted.
- cardThreadMain | queue local before union field assembly matching exact sendCardSlotState: 301/301 instructions; structural/exact (2, 78); pool identical; exact regressions []; reverted.
- cardThreadMain | signed do/while mounted-file scan following exact clearAllCardFileEntries: 301/301 instructions; structural/exact (2, 78); pool identical; exact regressions []; reverted.
- cardThreadMain | union packet-return helper evaluated in message argument, exact sendCardSlotState idiom: 301/301 instructions; structural/exact (2, 78); pool identical; exact regressions []; reverted.
- cardThreadMain | const by-value packet parameters for read-only response view: 301/301 instructions; structural/exact (2, 78); pool identical; exact regressions []; reverted.
- cardThreadMain | explicit low-byte command mask before validity bitfield insertion: 301/301 instructions; structural/exact (2, 78); pool identical; exact regressions []; reverted.
## loadCardFileIcons
Fresh origin fetch; source unchanged. Target 512 instructions/frame 0x60, ours 508/frame 0x60. Structural differences include image/comment error joins, signed icon-array indexing and saved-register allocation. Exact matched refreshCardSlotInfo uses native u32 sector-size locals, checkCardFileDuplicate uses typed CARDDir and signed file loops, clearAllCardFileEntries uses signed do/while. Matched MemoryCardManager icon_set uses a const IconState* read-only view. Target keeps the previous palette byte count for reserved format 3; first-format-3 appears to read an unspecified incoming register. No uninitialized C local will be introduced. All 1496 data bytes exact; pool/extent/reference-index checks clean.
- loadCardFileIcons | const CARDDir input matching read-only icon metadata view: 505/512 instructions; structural/exact (103, 431); pool identical; exact regressions []; reverted.
- loadCardFileIcons | native unsigned sector size outputs matching exact refreshCardSlotInfo: 508/512 instructions; structural/exact (66, 436); pool identical; exact regressions []; reverted.
- loadCardFileIcons | signed do/while animation speed scan matching clearAllCardFileEntries: 509/512 instructions; structural/exact (71, 423); pool identical; exact regressions []; reverted.
## runCardMoveOrCopy
Fresh origin fetch; owned source unchanged. 608/608 instructions, frame 0x1E0. Structural diffs are permission/metadata error joins and scheduling; most of 185 instruction differences are saved-register assignments. Closest exact sibling checkCardFileDuplicate uses scoped native result/status values and signed do/while scan; handleCardMountResult uses helper error returns; sendCardSlotState packs explicit byte masks. Applying helper and typed-local idioms before declaration search. No pool/data/extent/reference-index issue.
loadCardFileIcons sibling-reference correction: MemoryCardManager::_create_icon uses a mutable typed IconState*, not a const pointer; the const CARDDir experiment tests the proven read-only-input lever. The exact typed return view is getIconComment.
- runCardMoveOrCopy | inline common-sector helper with reference outputs and exact sibling error returns: 608/608 instructions; structural/exact (12, 185); pool identical; exact regressions []; reverted.
- runCardMoveOrCopy | scoped permission result matching exact status-helper local lifetime: 608/608 instructions; structural/exact (12, 176); pool identical; exact regressions []; reverted.
- runCardMoveOrCopy | explicit block count guard following exact sibling native loop locals: 609/608 instructions; structural/exact (24, 498); pool identical; exact regressions []; reverted.
- get_friendinfo__Q33ipl5scene11AddressEditFv | explicit signed friend index for const cache getter: 82/84 instructions; structural/exact (10, 68); pool identical; exact regressions []; reverted.
- get_friendinfo__Q33ipl5scene11AddressEditFv | const reference receiver for initial friend cache read: 82/84 instructions; structural/exact (10, 68); pool identical; exact regressions []; reverted.
- get_friendinfo__Q33ipl5scene11AddressEditFv | unsigned getter index view guarded to the owning AddressEdit translation unit: 82/84 instructions; structural/exact (10, 68); pool identical; exact regressions []; reverted.
- create__Q33ipl5scene11AddressEditFv | const margin locals matching read-only constructor settings: 808/820 instructions; structural/exact (37, 803); pool identical; exact regressions []; reverted.
- create__Q33ipl5scene11AddressEditFv | double literal conversion in direct constructor defaults: 808/820 instructions; structural/exact (37, 803); pool identical; exact regressions []; reverted.
- create__Q33ipl5scene11AddressEditFv | const reference margin locals retaining setting view through vector constructor: 818/820 instructions; structural/exact (23, 331); pool identical; exact regressions []; reverted.
- update_friendinfo__Q33ipl5scene11AddressEditFv | real inline UTF16 name-copy helper with const String input: 38/38 instructions; structural/exact (2, 2); pool identical; exact regressions []; reverted.
- update_friendinfo__Q33ipl5scene11AddressEditFv | mutable String helper receiver with const wcsncpy input: 38/38 instructions; structural/exact (2, 2); pool identical; exact regressions []; reverted.
- update_friendinfo__Q33ipl5scene11AddressEditFv | inline name accessor/copy boundary retaining the original clear call: 38/38 instructions; structural/exact (2, 2); pool identical; exact regressions []; reverted.
- get_friendinfo__Q33ipl5scene11AddressEditFv | layout FindPaneByName wrapper used by exact Address text methods: 82/84 instructions; structural/exact (10, 68); pool identical; exact regressions []; reverted.
- get_friendinfo__Q33ipl5scene11AddressEditFv | direct layout root accessor boundary before virtual lookup: 82/84 instructions; structural/exact (10, 68); pool identical; exact regressions []; reverted.
- get_friendinfo__Q33ipl5scene11AddressEditFv | named read-only text plus layout wrapper boundary: 82/84 instructions; structural/exact (10, 68); pool identical; exact regressions []; reverted.
Address::start_drag_event member-helper attempt: correct the earlier free-helper access error with a private real inline member guarded to IPL_ADDRESS_MATCHING. This ports the matched MiiObj::create_callback texture-installation boundary without changing another translation unit.
- start_drag_event__Q33ipl5scene7AddressFPCcPCQ33ipl10controller9Interface | real inline Address member for const icon installation: 224/223 instructions; structural/exact (8, 109); pool DIVERGES; exact regressions []; reverted.
- start_drag_event__Q33ipl5scene7AddressFPCcPCQ33ipl10controller9Interface | read-only pointer parameter for inline member texture installation: 224/223 instructions; structural/exact (8, 109); pool DIVERGES; exact regressions []; reverted.
- start_drag_event__Q33ipl5scene7AddressFPCcPCQ33ipl10controller9Interface | inline const icon member with matched callback root-pane lookup: 224/223 instructions; structural/exact (8, 109); pool DIVERGES; exact regressions []; reverted.
- loadCardFileIcons | explicit image result join matching target helper success/error returns: 507/512 instructions; structural/exact (65, 431); pool identical; exact regressions []; reverted.
- loadCardFileIcons | named image status before joined success/error path: 507/512 instructions; structural/exact (65, 431); pool identical; exact regressions []; reverted.
- loadCardFileIcons | separate comment base lifetime matching target inlined read regions: 507/512 instructions; structural/exact (65, 431); pool identical; exact regressions []; reverted.
- start_drag_event__Q33ipl5scene7AddressFPCcPCQ33ipl10controller9Interface | typed picture receiver for texture installation, matching NW4R picture role: 223/223 instructions; structural/exact (0, 7); pool identical; exact regressions []; reverted.
- start_drag_event__Q33ipl5scene7AddressFPCcPCQ33ipl10controller9Interface | typed picture with read-only icon object accessor: 223/223 instructions; structural/exact (0, 7); pool identical; exact regressions []; reverted.
- start_drag_event__Q33ipl5scene7AddressFPCcPCQ33ipl10controller9Interface | pane reference receiver for matched callback texture idiom: 223/223 instructions; structural/exact (0, 7); pool identical; exact regressions []; reverted.
Register allocation last: update_friendinfo official declsearch over two independent name-pointer initializers after the clear, following three structural/sibling attempts. declaration block: | const wchar_t* name = mString.mName; | wchar_t* storedName = reinterpret_cast<wchar_t*>(ipl::scene::sFriendInfo.attr.name); | start (2, 2) | best (2, 2) after 2 builds; source restored; best order was: | const wchar_t* name = mString.mName; | wchar_t* storedName = reinterpret_cast<wchar_t*>(ipl::scene::sFriendInfo.attr.name); |
- update_friendinfo__Q33ipl5scene11AddressEditFv | official declsearch final name argument scheduling check: 38/38 instructions; structural/exact (2, 2); pool identical; exact regressions []; reverted.
- start_drag_event__Q33ipl5scene7AddressFPCcPCQ33ipl10controller9Interface | explicit unsigned valid MiiObj index, matching stored friend-index view: 223/223 instructions; structural/exact (0, 7); pool identical; exact regressions []; reverted.
- start_drag_event__Q33ipl5scene7AddressFPCcPCQ33ipl10controller9Interface | unsigned MiiObj indexing with exact callback root lookup: 223/223 instructions; structural/exact (0, 7); pool identical; exact regressions []; reverted.
- start_drag_event__Q33ipl5scene7AddressFPCcPCQ33ipl10controller9Interface | native unsigned friend-index local for both icon access and reset: 223/223 instructions; structural/exact (0, 7); pool identical; exact regressions []; reverted.
Register allocation last for cardThreadMain: after six structural/sibling/helper attempts, official declsearch over its independent scalar locals, max 120 evaluations. The packet insertion scheduling is the only remaining normalized structure difference; no added storage or undefined values.
declaration block: | BOOL brokenFile; | BOOL exitThread = FALSE; | u32 validState = TRUE; | u32 command; | s16 fileNo; | u8 slot; | s32 result; | s32 file; | u32 listingFile; | s32 outerSlot; | s32 freeFile; | s32 freeBlocks; | start (2, 78) | improved (2, 73) | improved (2, 58) | improved (2, 54) | improved (2, 50) | improved (2, 41) | improved (2, 39) | best (2, 39) after 120 builds; kept in source: | s32 freeBlocks; | s32 outerSlot; | s32 freeFile; | u32 command; | u32 validState = TRUE; | u8 slot; | s32 result; | s32 file; | BOOL brokenFile; | BOOL exitThread = FALSE; | u32 listingFile; | s16 fileNo; |
- cardThreadMain | final official scalar-declaration search check: 301/301 instructions; structural/exact (2, 39); pool identical; exact regressions []; reverted.
Decoder discrepancy confirmed from raw ELF bytes: AddressEvent::onEvent instruction 32 is 418601ec and instruction 37 is 41860020 in both baseline and target. Capstone yields beq cr1, immediate; odiff incorrectly reads operand 0 (the condition-register identifier 13) instead of the last immediate. The gate instruction-exact count excludes this existing byte-identical function. Gate scripts remain untouched.
Card thread last-register continuation: first declsearch improved 78 -> 39 instruction differences, preserving 301 instructions and every exact function/pool. It was restored while preparing a bounded continuation from that real scalar order. Continue official search for 240 evaluations; source trials have already covered native packet, helper, and loop idioms.
declaration block: | s32 freeBlocks; | s32 outerSlot; | s32 freeFile; | u32 command; | u32 validState = TRUE; | u8 slot; | s32 result; | s32 file; | BOOL brokenFile; | BOOL exitThread = FALSE; | u32 listingFile; | s16 fileNo; | start (2, 39) | improved (2, 35) | best (2, 35) after 240 builds; kept in source: | s16 fileNo; | s32 freeBlocks; | s32 outerSlot; | s32 freeFile; | u32 command; | u32 validState = TRUE; | u8 slot; | s32 result; | s32 file; | BOOL brokenFile; | BOOL exitThread = FALSE; | u32 listingFile; |
- cardThreadMain | continued official scalar allocation search: 301/301 instructions; structural/exact (2, 35); pool identical; exact regressions []; reverted.
Card thread final structural packing trials start from the real scalar order found by declsearch. Test exact sibling byte-mask and typed wire-field idioms; preserve initialized packet storage and command bits. Nonexact results are restored.
- cardThreadMain | explicit masked validity byte merge matching exact sendCardSlotState masks: 301/301 instructions; structural/exact (2, 34); pool identical; exact regressions []; reverted.
- cardThreadMain | byte-typed validity parameter matching packed response field: 301/301 instructions; structural/exact (2, 35); pool identical; exact regressions []; reverted.
- cardThreadMain | aggregate initialized response union with named native message result: 301/301 instructions; structural/exact (2, 35); pool identical; exact regressions []; reverted.
- cardThreadMain | byte-field native packet matching exact response wire layout: 302/301 instructions; structural/exact (45, 263); pool identical; exact regressions []; reverted.
## Final completeness audit
Fresh origin/main 885cdfeee63a4b681bb5242e198dd7220834eb43. Owned sources/headers unchanged since the starting main.
- start_drag_event__Q33ipl5scene7AddressFPCcPCQ33ipl10controller9Interface: 18 compiled distinct source/helper/type/loop trials before final gate.
- onEventDerived__Q33ipl5scene7AddressFUlUlPCQ33ipl10controller9Interface: 3 compiled distinct source/helper/type/loop trials before final gate.
- update__Q33ipl5scene15FriendListCacheFUlPCwUx: 6 compiled distinct source/helper/type/loop trials before final gate.
- create__Q33ipl5scene11AddressEditFv: 9 compiled distinct source/helper/type/loop trials before final gate.
- get_friendinfo__Q33ipl5scene11AddressEditFv: 11 compiled distinct source/helper/type/loop trials before final gate.
- update_friendinfo__Q33ipl5scene11AddressEditFv: 10 compiled distinct source/helper/type/loop trials before final gate.
- cardThreadMain: 10 compiled distinct source/helper/type/loop trials before final gate.
- loadCardFileIcons: 6 compiled distinct source/helper/type/loop trials before final gate.
- runCardMoveOrCopy: 3 compiled distinct source/helper/type/loop trials before final gate.
All experimental header and nonexact source changes restored. Retained code: only the gate-passing signed FriendListCache member subscript. Owned pools/data require no symbol rename or extent correction. Final non-quick three-unit gate follows.
## Final full gate and open-function audit
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/scene/address/iplAddress] pool: IDENTICAL
[src/scene/address/iplAddress] objdiff: code 22016/23988 data 1964/1964 functions 99/101 fuzzy 99.9233 linked code 0
[src/scene/address/iplAddress] instruction-exact functions: 98/101
[src/scene/address/iplAddress] section .ctors size 4 match 100.0
[src/scene/address/iplAddress] section .data size 1880 match 100.0
[src/scene/address/iplAddress] section .rodata size 24 match 100.0
[src/scene/address/iplAddress] section .sbss size 8 match 100.0
[src/scene/address/iplAddress] section .sdata size 16 match 100.0
[src/scene/address/iplAddress] section .sdata2 size 32 match 100.0
[src/scene/address/iplAddress] section .text size 23988 match 99.923294
[src/scene/address/iplAddress] below 100: start_drag_event__Q33ipl5scene7AddressFPCcPCQ33ipl10controller9Interface 99.84305
[src/scene/address/iplAddress] below 100: onEventDerived__Q33ipl5scene7AddressFUlUlPCQ33ipl10controller9Interface 98.42593
[src/scene/address/iplAddress] baseline: code 21856/23988 data 1964 functions 98 fuzzy 99.8933
[src/scene/address/iplAddressEdit] pool: IDENTICAL
[src/scene/address/iplAddressEdit] objdiff: code 23344/27112 data 2560/2560 functions 91/94 fuzzy 99.5528 linked code 0
[src/scene/address/iplAddressEdit] instruction-exact functions: 91/94
[src/scene/address/iplAddressEdit] section .bss size 320 match 100.0
[src/scene/address/iplAddressEdit] section .data size 2152 match 100.0
[src/scene/address/iplAddressEdit] section .rodata size 40 match 100.0
[src/scene/address/iplAddressEdit] section .sdata size 24 match 100.0
[src/scene/address/iplAddressEdit] section .sdata2 size 24 match 100.0
[src/scene/address/iplAddressEdit] section .text size 27112 match 99.55282
[src/scene/address/iplAddressEdit] below 100: create__Q33ipl5scene11AddressEditFv 97.5561
[src/scene/address/iplAddressEdit] below 100: get_friendinfo__Q33ipl5scene11AddressEditFv 88.03571
[src/scene/address/iplAddressEdit] below 100: update_friendinfo__Q33ipl5scene11AddressEditFv 99.42105
[src/scene/address/iplAddressEdit] baseline: code 23344/27112 data 2560 functions 91 fuzzy 99.5528
[src/scene/cardSequence/iplCardSequence] pool: IDENTICAL
[src/scene/cardSequence/iplCardSequence] objdiff: code 4168/9852 data 1496/1496 functions 27/30 fuzzy 97.2010 linked code 0
[src/scene/cardSequence/iplCardSequence] instruction-exact functions: 27/30
[src/scene/cardSequence/iplCardSequence] section .bss size 16 match 100.0
[src/scene/cardSequence/iplCardSequence] section .data size 1464 match 100.0
[src/scene/cardSequence/iplCardSequence] section .sbss size 8 match 100.0
[src/scene/cardSequence/iplCardSequence] section .sdata size 8 match 100.0
[src/scene/cardSequence/iplCardSequence] section .text size 9852 match 97.20097
[src/scene/cardSequence/iplCardSequence] below 100: cardThreadMain 97.9402
[src/scene/cardSequence/iplCardSequence] below 100: loadCardFileIcons 90.34375
[src/scene/cardSequence/iplCardSequence] below 100: runCardMoveOrCopy 97.8125
[src/scene/cardSequence/iplCardSequence] baseline: code 4168/9852 data 1496 functions 27 fuzzy 97.2010
regressions vs baseline: 0
global matched_code_percent: 91.53532 -> 91.54067
global fuzzy_match_percent: 99.69871 -> 99.69896
global complete_code_percent: 74.74593 -> 74.74593
global matched_data_percent: 99.55890 -> 99.55890
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
Fresh objdiff report regenerated after the full clean build. build/43U/ok up to date; FriendListCache::update objdiff 100.0, ctxdiff 40/40 instructions and diffs 0. All three owned pools identical and all owned data sections 100.0.
- src/scene/address/iplAddress: objdiff exact functions 98/101 -> 99/101; matched code bytes 21856 -> 22016/23988; data bytes 1964 -> 1964/1964.
- OPEN start_drag_event__Q33ipl5scene7AddressFPCcPCQ33ipl10controller9Interface: 99.84305%; 18 distinct compiled source attempts. 223/223 instructions, seven saved icon/pane register differences; sibling accessor/root/picture trials unchanged.
- OPEN onEventDerived__Q33ipl5scene7AddressFUlUlPCQ33ipl10controller9Interface: 98.42593%; 3 distinct compiled source attempts. 270/270 instructions, normalized structure exact; 81 saved-register differences after sibling lookup/animator boundaries.
- src/scene/address/iplAddressEdit: objdiff exact functions 91/94 -> 91/94; matched code bytes 23344 -> 23344/27112; data bytes 2560 -> 2560/2560.
- OPEN create__Q33ipl5scene11AddressEditFv: 97.5561%; 9 distinct compiled source attempts. 818/820 instructions; conditional margin loads, saved pool/file registers, argument scheduling; literal/default/const margins did not recover target.
- OPEN get_friendinfo__Q33ipl5scene11AddressEditFv: 88.03571%; 11 distinct compiled source attempts. 82/84 instructions; target preserves text addresses across virtual pane lookup, ours rematerializes them; accessor/helper/const-view trials unchanged.
- OPEN update_friendinfo__Q33ipl5scene11AddressEditFv: 99.42105%; 10 distinct compiled source attempts. 38/38 instructions; wcsncpy source/destination address setup order swapped; typed const views/accessors/name-copy helper and final declsearch unchanged.
- src/scene/cardSequence/iplCardSequence: objdiff exact functions 27/30 -> 27/30; matched code bytes 4168 -> 4168/9852; data bytes 1496 -> 1496/1496.
- OPEN cardThreadMain: 97.9402%; 10 distinct compiled source attempts. 301/301 instructions; validity-byte merge scheduling and saved-register lifetimes; 360 official declaration evaluations reduced a reverted candidate to 35 differences, byte-mask variant 34 but no exact gain.
- OPEN loadCardFileIcons: 90.34375%; 6 distinct compiled source attempts. 508/512 instructions; image/comment error joins, indexing and palette lifetime for reserved format 3. No undefined-value reconstruction introduced.
- OPEN runCardMoveOrCopy: 97.8125%; 3 distinct compiled source attempts. 608/608 instructions; permission/metadata joins and saved-register allocation. Scoped result variant reduced 185 to 176 differences but was restored.
Instruction-exact gate counts before -> after: Address 97/101 -> 98/101; AddressEdit 91/94 -> 91/94; CardSequence 27/30 -> 27/30. AddressEvent::onEvent remains objdiff 100.0 and byte-identical; the existing condition-register branch decoder discrepancy explains the one-count difference.
Only code delta: signed direct member indexing in FriendListCache::update, committed as fd527e4a. No other CPP/header/config edit retained. No upstream writes, pushes, PRs, workers or linking changes.
Unresolved source inference: loadCardFileIcons reserved initial palette format 3; target appears to carry an incoming register, so no uninitialized local was substituted. All reverted helper/register candidates remain documented above.

View File

@@ -1,87 +0,0 @@
# NWC24Download source and retry-mask audit, 2026-10-03
Baseline: 1fa33882. Read AGENTS, CONTRIBUTING, NWC24Download, pk2, fz10,
and structural round 10/12 attempt records. PR #954 is already present.
Only libs/RevoEX/src/nwc24/NWC24Download.c changes, plus this evidence file.
## Retained correction
CheckDlTaskRetry accepts retry counts 0 through 31 and reads a u32 mask.
The reconstructed `1 << retryCount` has undefined signed-left-shift behavior
at count 31. Use `1U << retryCount` to express the target's 32-bit mask.
The target checks the upper bound before shifting; that order stays intact.
The full compiled object is byte-identical to the baseline, SHA256:
85cc303983a219bdb34b3765ecc3a352fade4238e1ce911a7cba8078e3e9b42a
This is a source-definedness correction, not a fuzzy or exact-match gain.
## Semantic coverage and remaining differences
- NWC24InitDlTask: all 144 instructions have the same operations, constants,
branch destinations and relocation targets after register normalization.
Home-path parsing, identifier halves, byte/halfword task stores, default
intervals, content filename, and permission-result propagation agree.
- NWC24iCheckDlHeaderConsistency: 212/212 instructions; its only differences
are scheduling three entry instructions. Repair dispatch, signed subtask
halfword test, read/delete contracts and error branches agree.
- NWC24UpdateDlTask: reviewed both permission checks, time retrieval and signed
64-bit division by 60, task/header validation, reset stores, retry error
constants, mask handling and StoreDlTask arguments. The target's repeated
work/header reads and retry-field accesses are present. Remaining shape
differences concern saved lifetimes/frame and equivalent retry branches.
- AddTaskInternal: reviewed URL validation, update path, free-slot bounds and
16-byte entry addressing, task-ID halfword stores, purge error propagation,
and repeated lookup/update control flow. No omitted call, wrong field
offset, or different error constant was found.
- The task record is 0x200 bytes; retry count/enabled/mask offsets are
0x24/0x25/0x28. The list has a 0x80-byte prefix and 120 0x10-byte entries,
matching its 0x800-byte read/write contract.
## Rejected investigations
All are restored; none is part of the retained source diff.
- Widening AddTaskInternal/FindFreeDlTask bounds to u32 while retaining the
halfword loop cursor: Add 97.7182% -> 97.14464%.
- Reusing the existing CheckDlUrlString helper in ValidateDlTaskUrl:
Add 97.7182% -> 96.38404%. The shared helper did not recover the original
inlined error boundary.
- Shared group permission helper taking a const task and an explicit nested
boolean: Update 95.00395% -> 98.81423%, Init -> 99.02778%, but five exact
sibling functions regressed and Add fell to 97.58105%. No special-purpose
update-only copy was introduced to isolate allocation effects.
- Wide bounds with a wide search cursor initially narrowed to NWC24DlId:
Add -> 98.0424%. This did not establish the original bounds contract or
recover the complete loop form, so the existing types were preserved.
Prior logs already contain stronger but discarded Update helper-boundary
scores, including 99.48617%. Those are historical results, not new gains.
No register/declaration sweep, qualifier trick, dummy storage, new assembly,
header change, or linking change was used.
## Verification
- Configured only 43U with ../toolchain/wibo-build/wibo
- WIBO_SJIS_MISSING_IMPORTS=1 ../.venv/bin/ninja all_source build/43U/report.json build/43U/ok
- Complete object and complete project report identical to the fresh baseline
- All 26 exact functions compared with relocation-aware ctxdiff: zero differences
- Pool: identical, 3/3 strings
- Literal audit: 4 arguments, 26 functions, no skips/candidates/errors
- Exact code 8456/12496, exact functions 26/30, data 80/80 and fuzzy 99.169655%, unchanged
- DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d
- git diff --check passes
A native C11 harness extracts the actual helper, task layout and error enum,
with a validation-result stub. GCC -O2 -Wall -Wextra -Werror and UBSan checks
270336 combinations: every u8 count, 66 zero/all/one-hot/complement masks,
four enabled values and four validation outcomes. It uses an independent
right-shift predicate as its expected mask result. All retained-helper cases
and layout assertions pass. The otherwise identical baseline harness fails
at count 31: signed left shift cannot be represented in int.
Local harness: /tmp/nwc24-retry-mask-test.c (executable without .c).
Baseline reproducer: /tmp/nwc24-retry-mask-baseline-test.c.
These test the local retry predicate, not filesystem or network integration.
GATE: byte preservation, exact-function/data preservation, complete-report
nonregression, pool, literals, native UBSan and full 43U/DOL checks pass.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,312 +0,0 @@
# perm8 C permuter lane
Baseline: `255f3e05305939d73df73fcf9c4cd9044be9fa91`. Worktree: `sol-high`, branch `agent/w1002/sol-perm8-max`.
All three units had identical pools before source experiments. Only Wii Menu 4.3U was built. Compile scripts use the GC/3.0a5.2 MWCC command and flags from `ninja -t commands`, including `-O4,p`, `-ipa file`, `-fp_contract off`, and `-lang=c`; dependency-file generation is omitted for temporary objects. Original extracted objects supply the targets. The scorer selects the exact function name and includes stack differences. The aligned partition buffer remains aligned to 32 bytes in the preprocessed context.
Per-function contexts and compile scripts are under `/tmp/perm-<function>`. Compiler dependencies are in `/tmp/perm8-venv`. Searches used at most two permutation jobs in this lane: one job per concurrent function, then two jobs for the final partition search after the other searches finished. Each stalled search was stopped after about 45 minutes without a better score. Searches stopped earlier when a readable exact reconstruction was found or when a better readable seed replaced the old seed.
## Exact source changes
- `NWC24ReadMsgSubjectPublic`: baseline 100/104 instructions. At offsets 0xa0..0xb8 and 0xe0..0xf8, the target compares status with 0 and -8. The four missing instructions are unconditional switch exits, including unreachable default exits; there are no additional length-check comparisons. A single success-case switch whose default marks overflow and breaks, then returns other errors directly, produces 104/104 instructions and zero differences.
- `NWC24ReadMsgTextPublic`: the same status dispatch at 0xa8..0xc0 needs two unconditional exits. The same readable switch/default/early-return form produces 70/70 instructions and zero differences.
- `NWC24SetMsgSubjectAndTextPublic`: the score-40 permutation suggested staging the computed text capacity. The readable reconstruction stores that value in `textCapacity`, copies it to the mutable `textWorkSize`, and declares `subjectWork` before `subjectWorkSize`. This produces 190/190 instructions and zero differences. No unused pointer assignment, identity inline wrapper, or multiplication noise from the generated candidate remains.
Reader changes were committed as `1bb68c6f`. Their clean full gate reported 11/12 exact functions, code 4592/5352, data 232/232, identical pools, zero regressions, zero forbidden patterns/readability warnings, and the correct DOL SHA1.
The setter was committed as `30744387`. Its clean full gate reported 12/12 exact functions, code 5352/5352, data 232/232, every owned section at 100%, identical pools, zero regressions, zero forbidden patterns/readability warnings, and the correct DOL SHA1.
## Reader source attempts
Both reader functions were tried with at least these distinct changes:
1. Explicit OK/OVERFLOW/default switches: correct instruction counts, but 10 subject differences and five text differences from range dispatch.
2. A success/default switch with an overflow `if` ending in `break`: still 100/104 and 68/70 instructions because the exits disappeared.
3. Nested overflow switches and reordered case labels: no exact result; extra dispatch tests or missing exits remained.
4. Explicit rejected error cases: 110/104 and 73/70 instructions; discarded.
5. Early `return result` for rejected statuses instead of `goto done`: both functions became exact. Existing buffer bounds and truncation behavior are preserved.
## NWC24SetMsgSubjectAndTextPublic attempts
1. Split the text-capacity ratio into numerator and division statements; reorder size and work-pointer setup; retain a charset-name pointer: still non-exact.
2. Use meaningful text/subject charset temporaries and separate encoding variables: 65 register differences, or shorter non-matching instruction streams; discarded.
3. Name the text buffer separately: 65 differences; discarded.
4. Reconstruct the staged text capacity with a real `textCapacity` variable: eight remaining differences, solely swapping `subjectWork` and `subjectWorkSize` registers.
5. Reorder those two declarations while retaining the capacity staging: zero differences and 100% exact-name objdiff. No helper or redundant temporary was needed.
Generated score-150 candidates assigned to unused charset temporaries; discarded. Score-300 output read `subjectWorkSize` before initialization; discarded. Score-125 output added a pointer-to-pointer alias of `work`; discarded. The useful score-40 capacity hint was translated into the minimal readable source above.
## ConvertDateToDays attempts
1. Compute annual days before the century quotient, or decrement the year offset later: 16 differences remained.
2. Split common-leap quotients and try a single total expression: 16-18 differences.
3. Enumerate natural groupings of annual, century, and ordinary leap days, with real scalar temporaries: best six differences, at instructions 98..103. This seed keeps 113/113 instructions but changes scheduling and registers in the final arithmetic.
4. Put the century and ordinary leap calculations in readable inline helpers, and vary their source expressions: best still six differences.
5. Permute both the original and refined seeds: no exact result. The original source was restored; no fuzzy-only change is retained.
## ConvertDaysToDate attempts
1. Initialize the month at its declaration or use a word-sized month: 26 differences.
2. Invert the monthly leap branch: 12 differences. Nest the February check: 107/103 instructions; discarded.
3. Initialize the saved day count at its declaration, change the leap-result scalar type, or qualify the month alias: six differences remained.
4. Reorder the monthly declarations: six differences remained at 55, 57, 60, 83, 84, and 88, swapping the month byte and leap flag between r0 and r12.
5. Permute the complete function, then restrict randomization to the monthly loop: no improvement over score 30. Original source restored.
## pdm_part_is_master_boot_sector attempts
1. Grouped little-endian inline helpers, separate even/odd groups, byte locals, and sequential accumulators: no exact result.
2. Enumerate direct little-endian macro expression trees: the best readable seed has 84/84 instructions and 33 differences. It removes the two extra baseline instructions but still differs in allocation and scheduling.
3. Cache each real start-sector input byte before or after clearing the destination, using byte and word temporaries: 33-35 differences; discarded.
4. Run whole-function randomization: best score 820, with no exact candidate. A valid score-820 hint caches buffer byte 456; readable reconstructions did not match.
The tied score-820 candidate using `(454 & 0xFF) + 3` reads byte 201 instead of byte 457. It is semantically wrong and was rejected. Earlier score-950 candidates combined the two cursor pointers into an array; those were also discarded. Original source is retained.
## pdm_part_get_start_sector attempts
1. Grouped endian inline helpers, word macros, byte locals, pointer views, and expression-tree permutations: the best initial readable seed had 45 differences with 276/276 instructions.
2. Reconstruct the valid permutation declaration-order hint: 39 differences. Permute the four real loop-variable declarations: best eleven differences, all in the two extended-entry byte decoding blocks, at 175..181, 208..209, and 213..214.
3. Relative-sector helpers, explicit grouping of base and decoded word, and named even/odd byte groups: 26-38 differences, or no exact build; discarded.
4. Meaningful byte-array views of the partition start/count fields: eleven differences remained.
5. Cache actual offset bytes with byte/word scalar types at different declaration positions: 11-41 differences. Every value was initialized and actually used; no exact result.
6. Run a second search from the eleven-difference seed, restricted to the two byte-decoding blocks, with two jobs. Generated score-107 and score-85 hints introduced unused pointer/scalar assignments. The natural byte-view and cached-byte reconstructions did not match and are not retained.
Before starting each function, origin was fetched under `/tmp/wii-git.lock` and checked for existing exact work. Origin's partition source changed during the run in `230c3af2`, adding a typed endian helper. Compiling that updated source separately proved both requested functions remained non-exact (86/84 instructions for the master-sector function, 276/276 and 147 positional differences for the start-sector function). The start-sector search was resumed after a fresh fetch; the source was unchanged at that second check. No remote changes, branch operations, or rebases were performed in this worktree.
## Search measurements and final gate
The final measurements and the final clean gate are appended after every search exits. Permuter scores are search penalties, not objdiff percentages. Only readable source with exact-name objdiff 100% and zero instruction differences counts as a result.
| Function | Permutations | Best score | Result |
| --- | ---: | ---: | --- |
| NWC24ReadMsgSubjectPublic | 1455 | 400 | Exact structural source rewrite; search stopped |
| NWC24ReadMsgTextPublic | 4496 | 200 | Exact structural source rewrite after stalled search |
| NWC24SetMsgSubjectAndTextPublic | 2498 | 40 | Readable reconstruction reached exact match; search stopped |
| ConvertDateToDays | 1336 + 3721 | 355 then 235 | No exact result |
| ConvertDaysToDate | 1826 + 1814 | 30 in both phases | No exact result |
| pdm_part_is_master_boot_sector | 4950 | 820 | No exact result |
| pdm_part_get_start_sector | 2317 + 15888 | 418 then 85 | No readable exact result |
The final partition phase ran 4133 seconds with two jobs, ending after about 45 minutes without a lower score. The score-85 candidate still requires an unused byte assignment. Forty-eight readable cached-byte variants and the entry-view variants failed exact comparison. The best readable partition seed stayed eleven differences and was not retained. Every search exited, with no permutation process left running. Full raw source-attempt details are preserved in `/tmp/perm8-raw-attempts.md`; all generated inputs and candidates remain outside the repository.
| Unit | Instruction-exact functions before -> after | Exact code bytes before -> after | Exact data bytes before -> after |
| --- | --- | --- | --- |
| NWC24MsgSubject | 9/12 -> 12/12 | 3896/5352 -> 5352/5352 | 232/232 -> 232/232 |
| NWC24DateParser | 6/8 -> 6/8 | 1508/2372 -> 1508/2372 | 40/40 -> 40/40 |
| pdm_partition | 18/20 -> 18/20 | 2276/3716 -> 2276/3716 | No data sections |
Final open-function audit:
- `ConvertDateToDays`: 96.92921%; 73 logged source attempts in the raw record, with at least three distinct readable changes documented above.
- `ConvertDaysToDate`: 99.70874%; 42 logged source attempts in the raw record, with at least three distinct readable changes documented above.
- `pdm_part_is_master_boot_sector`: 86.5%; 36 logged source attempts in the raw record, with at least three distinct readable changes documented above.
- `pdm_part_get_start_sector`: 82.56159%; 87 logged source attempts in the raw record, with at least three distinct readable changes documented above.
The final full gate uses a clean 4.3U rebuild and all three assigned units. Source remained unchanged after it; only this attempt record was consolidated. No configure.py linking flags, shared headers, symbols, retail assembly, or other units changed. Remaining compiler choices are unresolved; no fuzzy-only source is retained.
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RevoEX/src/nwc24/NWC24MsgSubject] pool: IDENTICAL
[libs/RevoEX/src/nwc24/NWC24MsgSubject] objdiff: code 5352/5352 data 232/232 functions 12/12 fuzzy 100.0000 linked code 0
[libs/RevoEX/src/nwc24/NWC24MsgSubject] instruction-exact functions: 12/12
[libs/RevoEX/src/nwc24/NWC24MsgSubject] section .data size 184 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgSubject] section .sdata size 48 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgSubject] section .text size 5352 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgSubject] baseline: code 3896/5352 data 232 functions 9 fuzzy 99.3012
[libs/RevoEX/src/nwc24/NWC24DateParser] pool: IDENTICAL
[libs/RevoEX/src/nwc24/NWC24DateParser] objdiff: code 1508/2372 data 40/40 functions 6/8 fuzzy 99.3642 linked code 0
[libs/RevoEX/src/nwc24/NWC24DateParser] instruction-exact functions: 6/8
[libs/RevoEX/src/nwc24/NWC24DateParser] section .rodata size 40 match 100.0
[libs/RevoEX/src/nwc24/NWC24DateParser] section .text size 2372 match 99.36425
[libs/RevoEX/src/nwc24/NWC24DateParser] below 100: ConvertDateToDays 96.92921
[libs/RevoEX/src/nwc24/NWC24DateParser] below 100: ConvertDaysToDate 99.70874
[libs/RevoEX/src/nwc24/NWC24DateParser] baseline: code 1508/2372 data 40 functions 6 fuzzy 99.3642
[libs/RVL_SDK/src/fa/pdm_partition] pool: IDENTICAL
[libs/RVL_SDK/src/fa/pdm_partition] objdiff: code 2276/3716 data None/None functions 18/20 fuzzy 93.5985 linked code 0
[libs/RVL_SDK/src/fa/pdm_partition] instruction-exact functions: 18/20
[libs/RVL_SDK/src/fa/pdm_partition] section .text size 3716 match 93.598495
[libs/RVL_SDK/src/fa/pdm_partition] below 100: pdm_part_is_master_boot_sector 86.5
[libs/RVL_SDK/src/fa/pdm_partition] below 100: pdm_part_get_start_sector 82.56159
[libs/RVL_SDK/src/fa/pdm_partition] baseline: code 2276/3716 data None functions 18 fuzzy 93.5985
regressions vs baseline: 0
global matched_code_percent: 91.16326 -> 91.21187
global fuzzy_match_percent: 99.60110 -> 99.60236
global complete_code_percent: 74.56724 -> 74.56724
global matched_data_percent: 99.55890 -> 99.55890
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
## Continuation 2026-10-03
Started at `b9bda11d` on `agent/w1002/sol-perm8b-max`. The subject/text setter was already merged and 12/12 exact, so it was skipped after a fresh origin check. Each open function was checked against freshly fetched `origin/main` before its search. All three units had identical pools before experiments.
Compile scripts and targets were refreshed in the existing `/tmp/perm-<function>` directories. Flags match this worktree's `ninja -t commands`; only temporary dependency-file generation is omitted. Contexts contain the requested C function and its real dependencies, with the partition buffer's 32-byte alignment preserved. Stack and branch-target differences are scored. This lane used at most two permutation jobs. Dummy, padding, mask-noise, self-assignment, and external-type mutation passes are disabled; every generated hint still receives semantic and readability review.
### Exact calendar conversion
The monthly-loop score-16 hint initially matched with a pointer alias of `days`; that generated form was rejected. The readable reconstruction needs a signed `calendarYear` temporary in the real leap-year helper and a direct `*parsedMonth` February test. The cached month remains the month-table index. No pointer alias, unused variable, artificial helper, assembly, volatile cast, or register keyword is retained.
`ConvertDaysToDate` is 100.0% by exact-name objdiff and 103/103 instructions with zero ctxdiff differences. The six previously exact DateParser functions remain exact. The focused source change and its first clean full gate were committed as `1cc1ddd4`; evidence is `/tmp/perm8r-month-full-gate.log`.
### Readable attempts for remaining functions
- `ConvertDateToDays`: tried partial Gregorian quotient expressions and equivalent year inputs; separate annual/century/ordinary-leap accumulations with meaningful scalar temporaries; live-variable declaration orders; natural 32-bit scalar types and dependency-correct const scopes. Best readable seed: 113/113 instructions, six scheduling/register differences. The whole-function phase was narrowed to the arithmetic tail, then stopped after 45 minutes without improvement. No non-exact source is retained.
- `pdm_part_is_master_boot_sector`: tried little-endian inline helpers and expression trees; independent cursor/index declarations, initialization and increment order; byte-promotion types and real even/odd accumulators; meaningful offset staging. Best readable seed: 84/84 instructions, 23 differences, improving the prior 33-difference seed. Score 795 overwrites the real sector bound and is rejected. Score 660 introduces unrelated staged constants; its natural reconstructions remain non-exact. The resumed seed stalled for 45 minutes and was stopped. Original source is retained.
- `pdm_part_get_start_sector`: tried typed MBR record fields; separately accumulated even/odd relative-sector bytes with block/function scopes; real entry-byte views and cached bytes; inline byte loops and sequential/pair decoders. Best readable seed: 276/276 instructions, eleven differences. Scores 213 and 114 contain dead scalar/pointer assignments. Natural byte-cache and pointer-view reconstructions remain non-exact. The search was stopped after about 45 minutes with no readable improvement. Original source is retained.
One temporary const-scope experiment moved a declaration before its dependency was initialized. It was rejected, excluded from valid readable attempts, and rerun with dependency-correct declarations. No such source was applied or committed.
Each remaining function has at least three distinct readable source attempts documented above. Full raw records are preserved at `/tmp/perm8r-final-raw-attempts.md`; trial sources, compiler output and instruction diffs remain under `/tmp/perm8-resume-trials`. Permutation inputs and outputs remain outside the repository.
### Resumed search measurements
Permuter scores are search penalties, not objdiff percentages. Current continuation phases are listed separately from the earlier round above.
| Function | Iterations | Best score | Seconds | Result |
| --- | ---: | ---: | ---: | --- |
| pdm_part_is_master_boot_sector | 2224 | 795 | 921 | Reseeded from a better readable form; unsafe hint rejected |
| ConvertDaysToDate | 4078 | 16 | 1571 | Readable exact reconstruction committed |
| ConvertDateToDays | 1107 | 252 | 573 | Reseeded to focus on arithmetic tail |
| pdm_part_is_master_boot_sector | 6239 | 660 | 2756 | Stopped after 45 minutes without improvement |
| ConvertDateToDays | 6425 | 252 | 2715 | Stopped after 45 minutes without improvement |
| pdm_part_get_start_sector | 5594 | 114 | 2714 | Dead-variable hints rejected; no readable improvement |
The first two phases were reattached to their existing processes after restarting the supervisor; their exit codes are unavailable, while their elapsed time, iteration count and scores were preserved. Remaining owned phases exited normally. All searches stopped; the directories are ready to resume.
### Final full gate
| Unit | Instruction-exact before -> after | Exact code bytes before -> after | Exact data bytes before -> after |
| --- | --- | --- | --- |
| NWC24MsgSubject | 12/12 -> 12/12 | 5352/5352 -> 5352/5352 | 232/232 -> 232/232 |
| NWC24DateParser | 6/8 -> 7/8 | 1508/2372 -> 1920/2372 | 40/40 -> 40/40 |
| pdm_partition | 18/20 -> 18/20 | 2276/3716 -> 2276/3716 | No data sections |
The final gate is a clean, non-quick rebuild of all three assigned units. Pools are identical, the DOL SHA1 is correct, and regression, forbidden-pattern and readability counts are zero. Source stayed unchanged afterward. No configure.py linking flags, shared headers, symbols, retail assembly or other units changed. The unrelated untracked pk4/pk6 records remain untouched.
Remaining open functions: `ConvertDateToDays` 96.92921% (113/113, arithmetic scheduling/register allocation); `pdm_part_is_master_boot_sector` 86.5% (86/84 in retained source, byte assembly and registers); `pdm_part_get_start_sector` 84.51811% (276/276, byte-assembly scheduling/registers). All non-exact experimental source was discarded.
Gate evidence: `/tmp/perm8r-final-full-gate.log`.
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RevoEX/src/nwc24/NWC24MsgSubject] pool: IDENTICAL
[libs/RevoEX/src/nwc24/NWC24MsgSubject] objdiff: code 5352/5352 data 232/232 functions 12/12 fuzzy 100.0000 linked code 0
[libs/RevoEX/src/nwc24/NWC24MsgSubject] instruction-exact functions: 12/12
[libs/RevoEX/src/nwc24/NWC24MsgSubject] section .data size 184 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgSubject] section .sdata size 48 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgSubject] section .text size 5352 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgSubject] baseline: code 5352/5352 data 232 functions 12 fuzzy 100.0000
[libs/RevoEX/src/nwc24/NWC24DateParser] pool: IDENTICAL
[libs/RevoEX/src/nwc24/NWC24DateParser] objdiff: code 1920/2372 data 40/40 functions 7/8 fuzzy 99.4148 linked code 0
[libs/RevoEX/src/nwc24/NWC24DateParser] instruction-exact functions: 7/8
[libs/RevoEX/src/nwc24/NWC24DateParser] section .rodata size 40 match 100.0
[libs/RevoEX/src/nwc24/NWC24DateParser] section .text size 2372 match 99.41484
[libs/RevoEX/src/nwc24/NWC24DateParser] below 100: ConvertDateToDays 96.92921
[libs/RevoEX/src/nwc24/NWC24DateParser] baseline: code 1508/2372 data 40 functions 6 fuzzy 99.3642
[libs/RVL_SDK/src/fa/pdm_partition] pool: IDENTICAL
[libs/RVL_SDK/src/fa/pdm_partition] objdiff: code 2276/3716 data None/None functions 18/20 fuzzy 94.1798 linked code 0
[libs/RVL_SDK/src/fa/pdm_partition] instruction-exact functions: 18/20
[libs/RVL_SDK/src/fa/pdm_partition] section .text size 3716 match 94.17976
[libs/RVL_SDK/src/fa/pdm_partition] below 100: pdm_part_is_master_boot_sector 86.5
[libs/RVL_SDK/src/fa/pdm_partition] below 100: pdm_part_get_start_sector 84.51811
[libs/RVL_SDK/src/fa/pdm_partition] baseline: code 2276/3716 data None functions 18 fuzzy 94.1798
regressions vs baseline: 0
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
## perm8c restart continuation 2026-10-03
Initial status: `agent/w1002/sol-perm8c-max`, HEAD `7654dc33e1f98d0fcf7c8361acc522ec02068b57`; no tracked diff and no commits ahead of origin/main. Unrelated pk4/pk6 untracked logs are untouched. ConvertDaysToDate was already merged in #1033 and remains exact; it is skipped. Source in all assigned units is identical to the freshly fetched origin/main. Existing /tmp search outputs and readable seeds were retained; no old supervisor or permuter process was alive. Previous failed variants were read before selecting new combined experiments.
Fresh object builds needed no work. pool_diff.py reports identical pools for all three units. Baseline exact counts: NWC24MsgSubject 12/12, NWC24DateParser 7/8, pdm_partition 18/20. The three open functions remain non-exact. Raw new trials will be recorded in `/tmp/perm8c-raw-attempts.jsonl`; compile flags come directly from this worktree ninja commands, with only temporary dependency generation omitted.
- ConvertDateToDays checked origin/main a791e598 before experiments; instruction score 16.
- ConvertDateToDays new continuation classes: in-place annual accumulation with direct common-leap returns, signed quotient expression types, and a real signed calendar-year copy combined with the refined tail. 147 new compiled forms; best instruction penalty 6.
- pdm_part_is_master_boot_sector checked origin/main a791e598 before experiments; instruction score 2082.
- Temporary master batch stopped after source generation dropped a required offset declaration from an old saved hint. Those compile failures are excluded from valid attempts. Rebuilt the seed from the retained direct-expression permuter input and added replacement assertions. No repository source was affected. Initial date search setup also stopped before launch because the system Python lacks toml; use the existing permuter virtualenv.
- pdm_part_is_master_boot_sector checked origin/main 333eea81 before experiments; instruction score 2082.
- ConvertDateToDays new search reseeded from the minimal three-scalar annual-return form. Randomization now joins day-of-year accumulation with the Gregorian tail, instead of replaying the earlier tail-only plateau. Inline-wrapper mutations are disabled. Score is measured with stack and branch-target differences.
- ConvertDateToDays perm8c best score 252 after 5 seconds.
- Additional calendar continuation tried range-valid u16 year offsets with signed prior-year arithmetic, real signed counter lifetimes, and an elapsed-calendar-days helper with a live day-of-year argument. 39 forms; best instruction penalty 6.
- Checkpoint: {"ConvertDateToDays": 176, "pdm_part_is_master_boot_sector": 3986} valid temporary object comparisons. Calendar best remains 113/113 with six scheduling/register differences. The combined master extent batch has not improved the prior 84/84, 23-difference seed. Source remains unchanged in the worktree; active searches compile only under /tmp.
- Stopped the combined master declaration/decoder batch after 4134 valid comparisons with no improvement over 23 differences. Additional array ordering permutations recycle the same code generation; move to the distinct typed-field and signed-extent staging experiments. Failed scaffold compiles are excluded from this count.
- Master-sector new continuation classes additionally tried signed low-byte extent staging with real decoded start/count scalars, and typed byte fields for the on-disk MBR entries, including addition/multiplication decoders. 112 forms; best instruction penalty 23.
- pdm_part_get_start_sector checked origin/main 74dcb16a before experiments; instruction score 147.
- Start-sector multiplication decoder improved the readable seed from eleven to nine positional differences, keeping 276/276 instructions. Pause the broader five-operand tree batch to test shift/multiply hybrids around this concrete hint. The nine-difference source remains only in /tmp.
- Start-sector hybrid relative-byte decoder branch 1 complete; best instruction penalty 4, branch exact True.
- Readable exact candidate for pdm_part_get_start_sector: /tmp/perm8c-trials/pdm_part_get_start_sector-hybrid-relative-byte-decoder-2-shift-int-shift-int-shift-int-linear-5ab787fc.c.
- Readable exact candidate for pdm_part_get_start_sector: /tmp/perm8c-trials/pdm_part_get_start_sector-exact-reconstruction-formatted-direct-word-reading-ccae1132.c.
- Readable exact candidate for pdm_part_get_start_sector: /tmp/perm8c-trials/pdm_part_get_start_sector-exact-reconstruction-relative-start-return-long-3c43d9aa.c.
- Readable exact candidate for pdm_part_get_start_sector: /tmp/perm8c-trials/pdm_part_get_start_sector-exact-reconstruction-macro-return-int-663cd65f.c.
- Calendar shared-predicate continuation replaced one or both duplicated leap tests with the existing private helper, including signed scalar types and an early-return predicate. 9 forms; best instruction penalty 6. No unrelated helper changes retained.
- pdm_part_get_start_sector checked origin/main fdd68ddd before experiments; instruction score 147.
- Exact start-sector reconstruction: use unsigned int byte arithmetic for the relative LBA offset, with the real base sector included in read_relative_start_sector. This differs from SDK pf_u32, which is unsigned long, only in compiler expression typing. All shifts operate on initialized real buffer bytes and unsigned 32-bit values. The relative-start helper is a meaningful operation, not an identity wrapper. The bulk MBR-word macro remains unsigned long and is formatted over three lines. Reordered the existing real loop declarations as suggested by the earlier eleven-difference seed. Temporary object comparison is 276/276 with zero differences; copied the readable form to the owned source for object/objdiff/full-gate verification.
- Start-sector exact-name objdiff is 100.0%; the worktree object has 276/276 instructions and ctxdiff reports diffs 0. Full non-quick three-unit gate is GATE PASS: pdm_partition 18/20 -> 19/20, matched code 2276/3716 -> 3380/3716; pools identical, all regression/style/forbidden counts zero, DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. DateParser stays 7/8 and MsgSubject stays 12/12. Evidence: `/tmp/perm8c-getstart-full-gate.log`.
- The broad base-inclusive start-sector tree batch was superseded by the concrete nine-difference multiplication hint and the shift/type hybrid reconstruction. No dead assignment, pointer alias, identity helper, mask noise or unused value appears in the retained source.
- pdm_part_is_master_boot_sector checked origin/main be7ded2f before experiments; instruction score 2082.
- Master-sector continuation after the relative-sector win: native unsigned-int byte operands, meaningful accumulation into the zero-initialized start value, direct byte grouping shapes and cursor/summand order. 481 forms; best instruction penalty 23.
- Calendar numerator promotions after the native-int sector result: real signed-int annual/century/common-leap numerators in mixed long/int sums, with direct return or named common-leap counts. 112 new forms; best instruction penalty 6.
- Master-sector also reused the proven relative-start decoder for absolute MBR starts with base zero or the already zero-initialized destination, keeping the count decoder separate. 24 forms; best instruction penalty 23.
### perm8c source-attempt audit
- ConvertDateToDays: distinct new classes covered annual accumulation/direct common-leap returns; signed quotient and numerator typing; valid-width calendar-year lifetimes; real Gregorian-day helper arguments; and reuse of the existing leap-year predicate. 297 valid temporary object comparisons, best 113/113 with six differences. Every new source experiment stayed in /tmp. Original source is retained.
- pdm_part_is_master_boot_sector: distinct new classes covered combined real cursor/array declarations and endian grouping; signed low-byte decoded extent staging; typed on-disk byte fields; native unsigned-int decoding and initialization/accumulation; and reuse of the relative reader for an absolute start. 4752 valid comparisons, best 84/84 with 23 differences. The retained function remains unchanged. No further master permuter restart was warranted after these forms failed to improve the readable seed.
- pdm_part_get_start_sector: signed low-byte staging, multiplication-based decoding, base-inclusive expression trees and shift/type hybrids were tried. 705 valid comparisons. Native unsigned-int offset arithmetic removed the final eleven differences. The minimal readable relative-start helper also stays 276/276 with zero differences; a decoder that returns only the unsigned-int word did not remain exact and was discarded.
- Commit `8bf45d51a2bfc4d153d3b50e43a7aad25a9d583b` preserves the independently rebuilt, objdiff-100% start-sector result and its clean full gate. The unused pk4/pk6 attempt records are untouched. Remaining compiler choices are unresolved; no non-exact experimental source is retained.
- Completed perm8c search: {"function": "ConvertDateToDays", "best": 252, "elapsed": 2708, "iterations": 6698, "returncode": 0, "reason": "45 minutes without score improvement", "log": "/tmp/perm8c-search-ConvertDateToDays.log", "running": false}.
### perm8c permutation phase complete
- ConvertDateToDays new joined day-of-year/tail permutation phase ended normally after 2708 seconds and 6698 iterations. Best search penalty 252, no score improvement for about 45 minutes. No readable exact result. Stack and branch-target differences were included; one permutation job ran. The earlier master/start-sector plateaus were not replayed because the new manual forms and the already exact start-sector reconstruction supplied the useful results.
- All owned searches have exited. Inputs, candidates, raw valid-trial counts and search logs remain under /tmp. The only source change retained is the objdiff-100% start-sector reconstruction. Final validation below is another non-quick three-unit build after every search stopped.
### perm8c final full gate
| Unit | Instruction-exact before -> after | Matched code bytes before -> after | Matched data bytes before -> after |
| --- | --- | --- | --- |
| NWC24MsgSubject | 12/12 -> 12/12 | 5352/5352 -> 5352/5352 | 232/232 -> 232/232 |
| NWC24DateParser | 7/8 -> 7/8 | 1920/2372 -> 1920/2372 | 40/40 -> 40/40 |
| pdm_partition | 18/20 -> 19/20 | 2276/3716 -> 3380/3716 | No data sections |
Exact-name pdm_part_get_start_sector is 100.0%, 276/276 instructions, diffs 0 after the final clean build. ConvertDateToDays stays open at 96.92921%, 113/113 with 16 retained-source differences; best readable temporary seed has six. pdm_part_is_master_boot_sector stays open at 86.5%, 86/84; best temporary seed has 84/84 with 23 differences. Both open functions have more than three distinct valid source-attempt classes above. No untracked pk4/pk6 file, shared header, symbol, configure flag, retail assembly or other translation unit changed.
Final full gate evidence: `/tmp/perm8c-final-full-gate.log`. Final instruction diffs are `/tmp/perm8c-final-<function>.ctxdiff`. Raw temporary comparisons are `/tmp/perm8c-raw-attempts.jsonl`. All owned searches stopped before this non-quick gate.
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RevoEX/src/nwc24/NWC24MsgSubject] pool: IDENTICAL
[libs/RevoEX/src/nwc24/NWC24MsgSubject] objdiff: code 5352/5352 data 232/232 functions 12/12 fuzzy 100.0000 linked code 5352
[libs/RevoEX/src/nwc24/NWC24MsgSubject] instruction-exact functions: 12/12
[libs/RevoEX/src/nwc24/NWC24MsgSubject] section .data size 184 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgSubject] section .sdata size 48 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgSubject] section .text size 5352 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgSubject] baseline: code 5352/5352 data 232 functions 12 fuzzy 100.0000
[libs/RevoEX/src/nwc24/NWC24DateParser] pool: IDENTICAL
[libs/RevoEX/src/nwc24/NWC24DateParser] objdiff: code 1920/2372 data 40/40 functions 7/8 fuzzy 99.4148 linked code 0
[libs/RevoEX/src/nwc24/NWC24DateParser] instruction-exact functions: 7/8
[libs/RevoEX/src/nwc24/NWC24DateParser] section .rodata size 40 match 100.0
[libs/RevoEX/src/nwc24/NWC24DateParser] section .text size 2372 match 99.41484
[libs/RevoEX/src/nwc24/NWC24DateParser] below 100: ConvertDateToDays 96.92921
[libs/RevoEX/src/nwc24/NWC24DateParser] baseline: code 1920/2372 data 40 functions 7 fuzzy 99.4148
[libs/RVL_SDK/src/fa/pdm_partition] pool: IDENTICAL
[libs/RVL_SDK/src/fa/pdm_partition] objdiff: code 3380/3716 data None/None functions 19/20 fuzzy 98.7793 linked code 0
[libs/RVL_SDK/src/fa/pdm_partition] instruction-exact functions: 19/20
[libs/RVL_SDK/src/fa/pdm_partition] section .text size 3716 match 98.779335
[libs/RVL_SDK/src/fa/pdm_partition] below 100: pdm_part_is_master_boot_sector 86.5
[libs/RVL_SDK/src/fa/pdm_partition] baseline: code 2276/3716 data None functions 18 fuzzy 94.1798
regressions vs baseline: 0
global matched_code_percent: 91.56577 -> 91.60263
global fuzzy_match_percent: 99.69885 -> 99.70456
global complete_code_percent: 74.74593 -> 74.74593
global matched_data_percent: 99.55890 -> 99.55890
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```

View File

@@ -1,78 +0,0 @@
# perm8d ultra continuation
Worktree sol-high, branch agent/w1003/sol-perm8d-ultra, initial HEAD 98d8a522. Initial full quick gate passes. DateParser 7/8 instruction-exact, code 1920/2372, data 40/40. Partition 19/20 instruction-exact, code 3380/3716, no data. Both pools are identical. Unrelated untracked pk4/pk6 logs are untouched.
Read perm8, NWC24DateParser, relevant fz7 and sol-high-four attempts, effort-policy, and prior orch progress history before trials. The prior-art index has no reference for either open function. Origin was fetched under the shared git lock; both functions remain non-exact on origin/main 409ef82d.
ConvertDateToDays target CFG: validate year/month; February Gregorian leap predicate and leap-day bound; ordinary day bound; month-prefix/day addition; March-or-later leap-day adjustment; signed year offset; annual and Gregorian quotient accumulation; return. No calls, frame, or immediate stack-store/reload. The first 92 instructions match; the final arithmetic differs in quotient scheduling and scalar allocation. No volatile is justified. DateParser .rodata is already 40/40 and both table objects are paired correctly.
pdm_part_is_master_boot_sector target CFG: clear output; validate 55/AA signature; four-entry decode loop with start/count nonzero test and first-entry output update; four-entry extent-bound loop; early return 2 or success 0. No calls. Target frame 0x30 saves r30/r31; current 0x40 also saves r29. Byte-pair arithmetic should combine high/low even and odd byte groups. Both original arrays occupy 16 bytes; start is at stack 0x18 and count at 0x08. First loop uses start/count/index r6/r7/r8; second loop reverses the cursor allocation. Partition owns only .text, so no data rename or extent change applies.
All experimental files are in /tmp/perm8d and compiled with this worktree's exact ninja flags, omitting only dependency generation. Raw instruction comparisons are /tmp/perm8d/trials.jsonl. No source experiment will be kept without exact matching and a passing full gate.
- Master attempt 1: direct array indexing in one or both loops, or fresh second-loop cursor lifetimes, combined with the existing helper, MBR_WORD and explicit byte-pair decoding. Valid comparisons 25; best penalty 24.
- Master attempt 2: a meaningful destination-writing MBR decoder, using direct, summed or bytewise accumulation, mutable/const byte views and native int/SDK long arithmetic. Tested both pointer and indexed traversals. Valid comparisons 224; best penalty 24.
- Date attempt 1: reuse the actual annual/century subtotal or prior-year offset as the final accumulator, including a real in-place decrement and separately staged century numerator. Signed long/native int result lifetimes and final operand order were varied. Valid comparisons 309; best penalty 1.
- Exact temporary candidate ConvertDateToDays /tmp/perm8d/ConvertDateToDays-a28442585b5f.c.
- ConvertDateToDays exact reconstruction: accumulate ordinary annual days first, form the real day-plus-century subtotal in centuryLeapDays, then return that subtotal plus the common-leap correction. No new locals or helpers. Correct subtotal operand order removes the last instruction difference. 113/113 instructions, zero differences in the temporary full unit.
- Exact temporary candidate ConvertDateToDays /tmp/perm8d/ConvertDateToDays-7ac42db86e86.c.
- Readable retained local name is totalDays, since it contains the day-of-year, ordinary-year days and century correction. The rename preserves the zero-difference result. Fresh origin check still has the original open function.
## Calendar acceptance
ConvertDateToDays worktree build is 113/113 instructions with ctxdiff diffs 0, exact-name objdiff 100.0%. The first clean full two-unit gate is GATE PASS, DateParser 7/8 -> 8/8, code 1920/2372 -> 2372/2372, data 40/40 unchanged. Every owned DateParser section is 100%. Pools identical, regressions 0, forbidden patterns 0, readability warnings 0. Full build passes, DOL SHA1 is 26116613f624061ba99c8d1a299aaa6efa85670d. Evidence /tmp/perm8d/date-full-gate.log. The focused source diff changes only the final arithmetic accumulator and its meaningful local name; no helper, unused local, symbol, header or link flag changes.
- Master attempt 3: direct shift/multiply hybrids for each actual little-endian byte, with unsigned native-int and SDK-long promotion, even/odd pair trees and a separate indexed second loop. Valid comparisons 768; best penalty 20.
- Master attempt 4: actual MBR byte views using const-qualified input pointers, with declaration/loop scopes, signed or unsigned low-byte promotion and separate second-loop traversal lifetimes. Valid comparisons 81; best penalty 20.
- Master attempt 6: cache one actual start/count input byte using byte, halfword or unsigned-word scalar types, before/after the initial clear and at function/loop scope. Every cache is initialized and used. Valid comparisons 128; best penalty 19.
- Master attempt 5: the start and length fields use independent little-endian trees and promotions, preserving the improved traversal while testing direct assignment versus meaningful accumulation into the cleared start. Valid comparisons 1022; best penalty 19.
- Master attempt 8: real named even/odd endian sums, separate high-byte staging or all four decoded byte contributions. Tested direct/native word arithmetic, clear placement and independent count decoding. Valid comparisons 168; best penalty 19.
## Partition continuation
The input, traversal and byte-pair work produced temporary 84/84-instruction forms with 19 positional differences, improved from the previous readable 23-difference seed. These differences still include byte-load scheduling and sum grouping inside the decoder. No fuzzy-only partition change is retained. All target calls, branch exits, stack frame, output behavior and array extents were reviewed before tuning; the target does not justify a volatile declaration.
- Master attempt 7: cache meaningful pairs or full sets of MBR input bytes in target load order and other dependency-safe orders, with byte/word scalar types and function/loop scopes. Every cached input is used in its original field. Valid comparisons 960; best penalty 19.
- Master attempt 9: swap the real even/odd limb operands independently in both decoded fields and test meaningful shift/multiply byte forms. Valid comparisons 752; best penalty 19.
## Final open-function audit
- ConvertDateToDays is exact in the retained source. 313 valid temporary comparisons this round. No other DateParser function or data regressed.
- pdm_part_is_master_boot_sector remains open at retained objdiff 86.5%, 86/84 instructions. 4128 valid temporary comparisons this round, covering nine distinct source-level classes below. Best temporary form is 84/84 with 19 instruction differences; byte-load scheduling and sum/register choices remain unresolved. All partition source experiments were discarded.
- array-access: 24 valid comparisons, best penalty 24.
- destination-inline-decoder: 224 valid comparisons, best penalty 24.
- direct-shift-multiply-hybrid: 768 valid comparisons, best penalty 20.
- read-only-entry-view: 81 valid comparisons, best penalty 20.
- independent-MBR-start-count-expressions: 1022 valid comparisons, best penalty 19.
- cache-real-field-byte-: 128 valid comparisons, best penalty 19.
- cache-real-field-byte-set: 960 valid comparisons, best penalty 19.
- semantic-byte-pairs: 168 valid comparisons, best penalty 21.
- independent-even-odd-operand-orders: 752 valid comparisons, best penalty 19.
- All temporary compiles succeeded. No own trial/search process remains active. No symbols, shared headers, configure flags, other units, upstream or other worktrees were changed. The latest fetched origin a3e3725c still has both functions open.
- Communication audit: one initial commentary before the worker prompt was read; no further conversational text during matching.
## Final full gate
Clean non-quick two-unit gate after every experiment stopped. ConvertDateToDays is exact-name objdiff 100.0% and ctxdiff 113/113, diffs 0. All eight DateParser functions and all 40 data bytes are exact. Partition source remains unchanged. Exact objdiff JSON is /tmp/perm8d/final-report.json. The auxiliary JSON assertion initially compared string byte counts with integers; normalizing with int confirms the same gate measurements.
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RevoEX/src/nwc24/NWC24DateParser] pool: IDENTICAL
[libs/RevoEX/src/nwc24/NWC24DateParser] objdiff: code 2372/2372 data 40/40 functions 8/8 fuzzy 100.0000 linked code 0
[libs/RevoEX/src/nwc24/NWC24DateParser] instruction-exact functions: 8/8
[libs/RevoEX/src/nwc24/NWC24DateParser] section .rodata size 40 match 100.0
[libs/RevoEX/src/nwc24/NWC24DateParser] section .text size 2372 match 100.0
[libs/RevoEX/src/nwc24/NWC24DateParser] baseline: code 1920/2372 data 40 functions 7 fuzzy 99.4148
[libs/RVL_SDK/src/fa/pdm_partition] pool: IDENTICAL
[libs/RVL_SDK/src/fa/pdm_partition] objdiff: code 3380/3716 data None/None functions 19/20 fuzzy 98.7793 linked code 0
[libs/RVL_SDK/src/fa/pdm_partition] instruction-exact functions: 19/20
[libs/RVL_SDK/src/fa/pdm_partition] section .text size 3716 match 98.779335
[libs/RVL_SDK/src/fa/pdm_partition] below 100: pdm_part_is_master_boot_sector 86.5
[libs/RVL_SDK/src/fa/pdm_partition] baseline: code 3380/3716 data None functions 19 fuzzy 98.7793
regressions vs baseline: 0
global matched_code_percent: 91.81992 -> 91.83501
global fuzzy_match_percent: 99.71336 -> 99.71384
global complete_code_percent: 74.76262 -> 74.76262
global matched_data_percent: 99.77803 -> 99.77803
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```

View File

@@ -1,190 +0,0 @@
# RGBA420 final-expression declaration search
Base: `a4d145c010bc8a8d3198e68baff458a161899c96`, branch
`agent/bittle/rgba420-final-expression`, 43U only. One authorized invocation of
the repository's unchanged `declsearch.py`; no restart or other source trial.
## Exact source context and prior coverage
Function: `TMCJPEGDEC_converterYUV420toRGBA8`, in
`libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8.c`.
Only lines 520..543 were eligible: 24 contiguous, used, uninitialized scalar or
pointer declarations. No initializer, expression, statement, scope, helper,
type, or compilation flag changed. This is a final-expression-context search,
not a new lifetime reconstruction.
The last earlier official search is recorded in `fz20.attempts.md:951..1028`:
250 evaluations ending at `(16,97)`, fuzzy `89.33987%`. Its retained body is in
`c7896c380230bd05f4f8c011166e96451c9eabfb`. The two overflow tests were subsequently
changed from `(blue | green | red)` to `(red | green | blue)`, bringing fuzzy to
`89.40523%` (`fz20.attempts.md:1702..1710`, committed in `786a2dd3`). An exact
function-text comparison proves these are the only body differences from that
earlier search-end source. No logged official search of the final expression
context was found. Every current expression, including those tests, is preserved.
SHA256 values (function text includes the definition and final newline):
- Earlier search-end function:
`dff1079f008083bd675f82b5833db53fd6f1371598dffe54e11eb047313aa581`
- Current baseline function:
`8c197113de5254c7d06af3d418d32af4a5888b5c8f3a93e0c4ea3e206d09b1b3`
- Current baseline entire source:
`8ccd215e42081ccec87718048c2e40495fdfe213c642b3f0e65d6bfc2571c8d6`
- Unchanged baseline declaration block:
`a49ed85463bb956f9473a91acc7cfbee94e7c7916ac97dea737112a19ca8cc18`
- Retained candidate function:
`19c5fa9f0f72f32af94d32bafaed408ba7c733502f7a739304b5ad2a27f745d7`
- Retained candidate entire source:
`b1518ffb17443d16f5cf62616c4356c8a6884ebefbeb9eaf3cca2011512e3514`
## Single bounded run
Verified the baseline hashes and all 24 declarations, reconfigured 43U with the
existing wibo wrapper and cached tool paths, rebuilt the object, and saved the
baseline source/object/report before running:
```sh
WIBO_SJIS_MISSING_IMPORTS=1 NINJA=../.venv/bin/ninja \
PYTHONPATH=../local-tools ../.venv/bin/python -u \
tools/decomp-assist/declsearch.py \
libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8 \
TMCJPEGDEC_converterYUV420toRGBA8 --lines 520 543 --max-evals 783
```
The budget equals 782 unique single-swap/single-move neighbors plus baseline.
The official tool hill-climbs after improvement, so this budget is not a claim
that any full later neighborhood was exhausted.
- Actual evaluations: 783
- Trajectory: `(16,97) -> (16,96) -> (16,91) -> (16,90) -> (16,84)`
- Stop reason: configured evaluation cap; no restart
- Official function fuzzy: `89.40523% -> 90.254906%`
- Instructions: `153/153`; ctxdiff differences `97 -> 84`
- Unit fuzzy: `90.32323% -> 90.40206%`
- Exact functions: `2/13 -> 2/13`; matched code `660/6596 -> 660/6596`
- Global fuzzy: `99.721504% -> 99.72167%`
- All exact, linked, and data measures unchanged
The gain is partial decompilation progress, not an exact match or linking gain.
Retention is based on official objdiff, not the internal search score alone.
## Source, object, and build gates
A source comparison proves lines outside 520..543 are byte-identical and the
permitted block is exactly a permutation of its baseline lines. There are no
initializers, VLAs, unused/dummy variables, new register/volatile qualifiers,
assembly, or helper changes. All assignments and reads remain unchanged.
All twelve other function bodies are byte-identical to baseline. The two exact
YUV400 functions remain raw-byte identical to their originals, with exact-name
objdiff 100% and ctxdiff zero differences (76/76 and 89/89 instructions).
Source, original, and baseline objects have no allocated non-code sections.
Pool checks before search and after the full build are identical, zero strings.
The regenerated complete 1027-unit report has no function- or unit-level
regressions; the only changed function is YUV420. `git diff --check` passes.
The all-functions literal audit analyzed twelve functions with zero candidates
or errors; the unchanged setter was skipped for unequal sizes.
Full 43U `ninja` build passed, followed by `ninja build/43U/ok` with no work
pending. DOL SHA1: `26116613f624061ba99c8d1a299aaa6efa85670d`.
## Pixel and alias validation
The repository's `jpeg_differential_audit.py` passed all 9,456 paired cases.
A separate scalar RGBA420 model also passed 7,265 vectors against candidate,
original, and saved baseline objects: 21,795 object executions.
- 384 supported-scale/tiled-origin MCU cases with constant and random samples
- 64 additional row-parity and column-residue machine-level cases
- 6,400 saturation cases: all 256 luminance bytes crossed with Cb/Cr pairs
from `{-128,-1,0,1,127}`
- 417 halfword-aligned input/output overlap vectors, with every output store
contained in the actual 0x184-byte conversion buffer and state kept separate
All 153 instructions in each of the three function objects were exercised.
Every non-stack byte, including guards, matched the independent model; the
interpreter also checked GPR14..GPR31, stack pointer, and LR restoration.
Additional odd-row/column-residue and overlap cases are machine-level checks,
not claims about permitted public JPEG API inputs. These bounded interpreter
tests are not formal equivalence proofs or Wii runtime validation.
## Reproduction artifacts
All local artifacts are in `build/43U/rgba420-final-expression/`:
`baseline.c`, `baseline.o`, `baseline-report.json`, `search.log`,
`candidate-report.json`, `candidate.ctx`, `final-report.json`,
`full-build.log`, `differential.log`, `audit.py`, `audit-output.txt`,
`audit-results.json`, and `literals-all.log`.
The focused audit reads the current candidate/original and saved baseline:
```sh
PYTHONPATH=../local-tools ../.venv/bin/python \
build/43U/rgba420-final-expression/audit.py
```
No remote writes were made. The only retained source change is the authorized
declaration order in this function.
## Separately authorized finite continuation
Latest-main base: `84d0c74f`; the validated source/log change was cherry-picked
as `62fc8b19` on `agent/bittle/rgba420-local-fixedpoint`. Before this continuation,
the source SHA256 was verified as
`b1518ffb17443d16f5cf62616c4356c8a6884ebefbeb9eaf3cca2011512e3514`,
the same 24 uninitialized declarations were rechecked, and a fresh object/report
reproduced `90.254906%` with internal score `(16,84)`.
The earlier 783-evaluation run had stopped at its cap after improvements. It
did not establish exhaustion of the resulting final neighborhood; its log did
not record per-neighborhood candidate coverage. One further unchanged official
invocation was explicitly authorized, with no restart:
```sh
WIBO_SJIS_MISSING_IMPORTS=1 NINJA=../.venv/bin/ninja \
PYTHONPATH=../local-tools ../.venv/bin/python -u \
tools/decomp-assist/declsearch.py \
libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8 \
TMCJPEGDEC_converterYUV420toRGBA8 --lines 520 543 --max-evals 1600
```
- Actual evaluations: 783, including the baseline
- Trajectory: `(16,84)`, no improving step
- Stop reason: natural local fixed point, before the 1,600-evaluation cap
- Coverage established: baseline plus all 782 unique immediate single-swap or
single-move declaration neighbors, with none improving the tool's score
- The tool restored the prior validated order and rebuilt the object
- Function and unit fuzzy remain `90.254906%` and `90.40206%`
- This continuation introduced no further source change
The local fixed point is relative to the official tool's structural/exact
lexicographic score and its immediate neighborhood. It does not exhaust all
24! orders, combined moves, plateau paths, different source forms, or the
official fuzzy objective independently. There were two separately authorized
YUV420 runs totaling 1,566 evaluations; cross-run duplicate orders were not
logged, so that total must not be described as unique orders.
### Latest-main restoration and consolidated validation
After the continuation, both the source and entire object were byte-identical
to the rebuilt 90.254906% baseline. The full 43U build and `build/43U/ok` passed
again; DOL SHA1 remained
`26116613f624061ba99c8d1a299aaa6efa85670d`. A report regenerated after that full
build is identical across all 1,027 units to the continuation baseline report.
Both exact siblings remain raw-byte exact; pool remains identical and empty;
`git diff --check` passes. Final ctxdiff is 153/153 instructions, 84 differences.
The 9,456-case repository differential audit was rerun and passed. The same
independent pixel/alias model was rerun against the final candidate, original,
and this continuation's rebuilt baseline: 7,265 vectors, 21,795 object
executions, 417 overlap vectors, all 153 instructions covered in each object,
all checks passed. The earlier interpreter and API-scope limitations still apply.
Continuation evidence is in `build/43U/rgba420-local-fixedpoint/`, including
`baseline.c`, `baseline.o`, `baseline-report.json`, `search.log`, `final.ctx`,
`final-report.json`, `full-build.log`, `differential.log`, `audit.py`,
`audit-output.txt`, and `audit-results.json`.
The consolidated source gain remains `89.40523% -> 90.254906%`; exact/link/data
counts remain unchanged by the RGBA420 work. No additional search was run and
no remote writes were made.

View File

@@ -1,60 +0,0 @@
# SD channel-order title declaration
Base: `e3095dfb979ded66d2b6a71228563066c5445f5a`.
Owned source: `src/scene/sdChannelSelect/iplSDChannelSelect.cpp` only.
## One retained declaration move
Move the existing uninitialized `ESTitleId titleId` declaration from the inner
order loop to immediately before the outer page loop. All assignments, reads,
conditions, calls and side effects stay at their original source positions.
No variable, initializer, cast, guard or operation is added.
This deliberately broadens the lexical lifetime of a genuinely used trivial
scalar. It is not a same-block declaration permutation or a behavior fix.
`ESTitleId` is `u64`, with no constructor or destructor. On every iteration,
the loaded-banner branch assigns the complete title type/code pair and the
unloaded branch assigns zero before either the exclusion checks or NAND-table
comparison can read it. The address never escapes. The previous iteration's
value cannot reach a use, and the scalar is not used outside the traversal.
Removing only its declaration from both versions leaves identical source text.
There is no newly observable lifetime effect.
The original function starts at `0x813DD3D8`, size 504 bytes. The candidate now
has the exact original assignment/exclusion sequence at offsets `+0x78..+0xAC`:
loaded entries overwrite both title words, unloaded entries zero both words,
then the first title tests occur. The original's 117 nonrelocated words and all
five direct calls were independently verified against the DOL. Candidate calls
at those same sites resolve to the same original destinations.
The prior lead is recorded in `fz16.attempts.md` lines 1570-1576 and repeated at
1795-1800 and 2176-2182: 126/126 instructions, 22 -> 7 positional differences,
restored while still nonexact. No prior isolated fuzzy score was recorded.
This run tested only the documented declaration location, not a new search or
an alternative within-loop ordering. The repository's `declsearch.py` was used
in `--score-only` mode before and after.
## Fresh results
- `collectTitlesByChannelOrder`: 97.29365% -> 98.007935%
- Instructions: unchanged 126/126; ctxdiff differences: 22 -> 7
- `declsearch.py --score-only`: structural/exact 2/22 -> 2/7
- Unit fuzzy: 99.76244% -> 99.77309%
- Exact functions: unchanged 123/129; matched code: unchanged 30344/33828 bytes
- Matched data: unchanged 2960/2960 bytes
- Every text byte outside the target function is identical to baseline
- All allocated non-text bytes, sizes and alignment are identical to baseline
- All 1561 relocation records are byte-identical
- The other 1026 unit reports are unchanged; no function regresses
- Pool: 101/101 identical before and after
- Literal audit: 73 arguments across 128 functions, no candidates/errors;
the unchanged unequal-extent `create` function is the only skip
- Full 43U all_source/report/DOL gates pass
- DOL SHA1: `26116613f624061ba99c8d1a299aaa6efa85670d`
- `git diff --check`: pass
The remaining seven differences are three channel-address register/operand
choices and four post-copy count/threshold scheduling instructions. They were
not modified or compensated for. This is a partial source-order gain, not an
exact-function or linking claim. Shared headers and all other source remain
unchanged.

View File

@@ -1,57 +0,0 @@
# SD initialization partial recovery
Base: `d170fbb8`, Wii Menu 4.3U only. Unit remains NonMatching; no linking,
configuration, header, symbol, or data edits.
The round-4 log recorded a natural initialized/uninitialized branch form at
93.125%, but discarded it because its 141 instructions did not equal the
144-instruction target. Recover that strictly improving partial under the
current fuzzy-first acceptance rule.
## Trials
1. Keep the already-initialized report first. Return -44 only for another disk;
put new initialization in the `else` arm and share the final success return.
`pfd_sddrv_init`: 92.326385 -> 93.125%, 141/144 instructions. Retained.
2. Historical explicit status-result form: set the real return status to zero,
assign -44 for another disk, then return it. 92.94444%, 142/144 instructions.
Reverted in favor of trial 1. No wider source search was performed.
The target at 0x815EA638 uses a conditional disk-identity branch. The baseline
compiler instead emits a branchless subtraction/NOR selector. The retained
ordinary control flow recovers the conditional comparison. It still shares the
success exit, whereas the target contains a separate success load/branch. The
initial null comparison and existing state-store scheduling differences also
remain. This is a partial improvement, not an exact match.
## Behavior review
The null-disk return is unchanged. An initialized driver still reports its
state, succeeds only for the registered disk, and returns -44 for a different
disk. Only an uninitialized driver reaches initialization. Every call, field
write, error return, and callback selection in that path is unchanged and in
the same source order. No local, initializer, or artificial operation was added.
A host-compiled differential oracle extracts the actual baseline and candidate
function bodies and supplies deterministic SDK stubs. All 279,936 combinations
pass: 16 flag values, three insertion values, null/same/different input and
registered disks, four device-status bit patterns, all 81 combinations of
zero/negative/positive results from the four fallible SDK operations, and two
mounted-device identities. It compares return status, the complete driver
record, device storage, event value, and ordered external-call trace. This
checks source behavior, not hardware execution or instruction matching.
## Final gates
- Full `all_source progress build/43U/report.json build/43U/ok` build passes.
- DOL SHA1: `26116613f624061ba99c8d1a299aaa6efa85670d`.
- String pool: all 46 payloads and offsets identical to the target.
- All 25 other function instruction streams unchanged from the fresh base.
- Unit: 22/26 exact functions and 9260/11760 exact code bytes, unchanged.
- Unit data: 3592/3592 matched bytes, unchanged.
- Unit fuzzy: 99.10204 -> 99.14116%.
- Global fuzzy: 99.724495 -> 99.72465%; exact, data, and linked totals unchanged.
- Whole-report regressions: zero; only this unit's fuzzy score changes.
- All 1027 allocated-object comparisons: only this unit's `.text` changes;
every non-code section and relocation stream is unchanged.
- Eight workflow-guard tests pass; `git diff --check` passes.

View File

@@ -1,70 +0,0 @@
# SD channel event predicate correction, 2026-10-03
Separate follow-on to eac8c5d6 (scissor reconstruction), on baseline b9407106.
Only four call sites in SDChannelSelectEventHandler::onEvent change.
No headers, metadata, other source units, constructor aliases or linking change.
## Original binary evidence
Independently parsed the DOL section table in orig/43U/00000008.app, verified
SHA1 26116613f624061ba99c8d1a299aaa6efa85670d, and decoded the signed relative
branch displacement at each call. No symbol-name or objdiff assumption was
used to select the destinations.
onEvent begins at 0x813E28B4. Its calls at offsets 0x124, 0x1DC, 0x218 and
0x270 (addresses 0x813E29D8, 0x813E2A90, 0x813E2ACC, 0x813E2B24) all branch
to 0x813E3330. The raw callee reads the channel word at offset 0x84 and
returns true for values zero or three. The extracted object relocations
independently name iplSDChannelObj_hasAppMeta at all four calls, and its
source reads mStateFlags with those same tests.
The old source instead calls isChannelReady, whose original address is
0x813DF1E4. That raw callee reads offset 0x14 and returns true only for three.
Its source tests mState == 3. These are distinct fields and predicates, not
interchangeable aliases. Restore hasAppMeta for trigger, drag, point and
leave event dispatch. Keep every existing event/state/controller/card guard.
For the separately observed constructor-name mismatches, raw original bodies
at 0x81362A5C and 0x81374884 are byte-identical. No constructor change is made
merely to alter names. Existing vtable placement/binding differences also
remain outside this patch.
## Measurement and verification
- onEvent was reported 100% before this correction and remains 100%; no
progress credit is claimed for the semantic repair
- Relocation-aware ctxdiff improves four differences -> zero, 168/168 instructions
- Compared to eac8c5d6, only the four call relocations change; every other
function's normalized instructions/relocations remain identical
- All allocated section bytes, including raw .text, remain identical to
eac8c5d6; this is why relocation targets must be checked separately
- The complete project report is identical to the scissor candidate
- Unit remains 122/129 reported-exact, code 29412/33828, data 2960/2960,
fuzzy 99.749435%; setChannelScissor remains 99.5279%
- Full 43U all_source/report/ok build passes
- Pool identical, 101/101; literal audit 73 arguments across 122 functions,
no skips/candidates/errors
- DOL SHA1 remains 26116613f624061ba99c8d1a299aaa6efa85670d
- git diff --check passes
## Distinguishing tests
The native C++ harness extracts the old/new handler bodies and supplies
local event/controller/scene mocks. The two predicates use the independently
verified field tests. GCC -O2 -Wall -Wextra -Werror (excluding the preexisting
unused label warning), with UBSan enabled, passes 198 cases.
Six channel-state values, eight state-flag values and all four events give
192 combinations, including 64 cases where the old predicate dispatched
differently. State 0 with flags 0 is accepted by the original predicate;
state 3 with flags 2 is rejected. Six additional checks preserve the scene,
broken-card and write-protection guards. These are focused handler tests,
not a UI or console integration test.
Local tools: /tmp/sdselection-dol-audit.py and
/tmp/sdselection-event-test.cpp (executable without .cpp).
No original binary or disassembly is committed.
GATE: raw-DOL/relocation destination agreement, exact corrected function,
complete-report and other-function preservation, pool/literals/data,
focused event tests, full 43U build and DOL checks pass.

View File

@@ -1,66 +0,0 @@
# SD channel scissor reconstruction, 2026-10-03
Baseline b9407106. Read AGENTS and the prior SD selection, fz16, scene4,
data-d5, and structural-round attempt records. Only the owned SD selection
source and this evidence file change; no header or linking changes.
## Retained expression reconstruction
- Express each orthographic bound directly from position and the projection
quotient, rather than keeping four extra quotient temporaries.
- Keep the input projection width distinct from the output scissor width.
- Calculate transformed X before Y and use the width quotient directly,
removing the one-use widthScale temporary.
These ordinary expressions also occur in the sibling ChannelSelect routine.
The arithmetic grouping is preserved. The original framebuffer conversion,
projection and transformed-bound sequence is recovered; no register sweep or
allocation directive was used.
setChannelScissor: 93.4721% -> 99.14163% with separated projection width and
X/Y calculations, then -> 99.5279% with direct orthographic bounds.
233/233 instructions throughout. Fifteen register substitutions remain,
primarily exchanging the X and width values. Unit fuzzy:
99.582596% -> 99.749435%. Exact code stays 29412/33828, functions 122/129,
and data 2960/2960. All other functions and all other units are unchanged.
collectTitlesBySpecialChannels remains unchanged. The 361/361-instruction
comparison has four repeated count-store/threshold-load schedules, 16 total
instruction differences. Lookup arguments, special-title constants, reverse
NAND and cache traversal, 42-byte names, 64-bit title writes, usage additions,
and threshold exits agree. No new qualifier or forced alias barrier was used.
## Verification
- Configured 43U with ../toolchain/wibo-build/wibo
- Full all_source/report/ok build passes
- Pool identical, 101/101 strings
- Literal audit: 73 arguments in 122 reported-exact functions, no skips/errors
- Every reported-exact function is instruction/relocation-identical to the
baseline; 117 also have zero ctxdiff against the original
- Five preexisting reported-exact functions have relocation differences:
constructor and createBaseLayout vtable offsets/binding, draw and
getChannelPanePosition VEC3 constructor family, and four onEvent predicate
calls. The predicate calls test different fields and were reported to the
parent immediately for a separate correction; no claim that all 122
functions are semantically exact is made
- Every allocated non-code section is byte-identical to the baseline
- Complete report comparison: only setChannelScissor improves; no regression
- DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d
- git diff --check passes
The native C++ harness uses the extracted before/after function bodies with
local matrix/render-mode shims and captured GX calls. With floating-point
contraction disabled and UBSan/float-cast checks enabled, 250000 finite cases
pass, including all three transformed states, ordinary states, framebuffer
boundaries up to the existing 1705 clip cap, and 219852 fully clipped cases.
All orthographic bounds are bit-identical and all four GX arguments agree.
This checks the local equations and clipping, not the Wii rendering pipeline.
An initial out-of-domain test with 65535-wide framebuffers reproduced an
existing negative-to-unsigned clipping conversion; that domain is excluded
from the equivalence test, not changed in production.
Local harness: /tmp/sdselection-scissor-test.cpp, executable without .cpp.
GATE: full build, DOL, pool, literal, data/exact preservation, report
nonregression and focused numeric tests pass. Known preexisting relocation
false positives are recorded above and require separate review.

View File

@@ -1,80 +0,0 @@
# SD transfer-title local lifetimes
Base: `fc114afd44065fb99f9ff2fe2969f393a504fe03`.
Owned source: `src/scene/sdChannelMemory/iplSDMemory.cpp`.
Only two existing local declarations move; no new objects or operations.
## Target evidence and retained source
`drawTransferTitles` starts at original DOL address `0x813EEFB8`, size 1804.
The original acquires memo Y into f31 at function `+0x90`, then writes the same
value into its local vector snapshot at `+0xA4`. Two subsequent pane lookups at
`+0xB4` and `+0xD4` leave that scalar live in f31. The previous source initialized
`bodyY` from the vector after those calls, causing an additional stack reload.
Initialize `bodyY` immediately after capturing the vector components instead.
This reconstructs the scalar lifetime, not changed callback behavior. Both
versions read the pane's translation before the later pane lookups. The private
`memoPosition` snapshot is never passed to a callee or otherwise exposed, so
those calls cannot legitimately mutate it. Capturing a reference to the live
pane or rereading `translation.y` after callbacks would have a different alias
contract; neither is introduced here.
The original initializes its newline count at `+0x180`, immediately after the
message fetch at `+0x17C`. Limit `lineCount` to that actual message-count stage,
inside the existing nonempty NAND-title branch and after obtaining the message.
Its uses, loop condition, arithmetic, and initialization value are unchanged.
No duplicate entry guard or extra separator local is added.
A raw original-object/DOL audit checked 387 nonrelocated words and all 38 direct
calls. The 50 ordered direct/indirect call sites remain the same in baseline,
candidate and original. All 24 floating arithmetic/comparison instructions are
identical between baseline and candidate. Pane/title fields, alpha propagation,
title-ID comparisons, native row counts and existing clipping expressions are
unchanged.
## Separate measurements
| Variant | Function fuzzy | Instructions / target |
| --- | ---: | ---: |
| Baseline | 92.7694% | 439/451 |
| Memo scalar captured with its snapshot | 93.02439% | 438/451 |
| Newline count initialized at message-count stage | 93.21286% | 439/451 |
| Both retained | 93.456764% | 438/451 |
These are source-grounded partial gains. The shorter extent removes an extra
reload; it does not mean a target operation was deleted. Remaining color-copy
and loop-entry differences are untouched. The function is still nonexact.
Earlier fz7 attempts retained a narrower count lifetime before later color
experiments caused the whole function to be restored. The already-fetched
external `07a3c7b3` also described the early memo scalar acquisition, but its
broader changes add dead color-copy storage and duplicate loop guards. Those
parts, and its register/frame experiments, were not imported or repeated.
## Final gates
- Unit fuzzy: 99.20353% -> 99.26294%
- Exact functions: preserved 64/66; matched code: preserved 14812/20872 bytes
- Matched data: preserved 3344/3344 bytes
- All allocated non-text bytes identical: `.data` 3144, `.sdata` 152,
`.sdata2` 48 bytes, including sizes and alignment
- Complete reports for the other 1026 units unchanged; no function regresses
- All 64 objdiff-exact functions are instruction-identical to their baseline
- 57 of those have literal zero ctxdiff differences against original. Seven
retain 12 pre-existing call-name differences for TitleRange assignment and
SDChannelSelect collection/notice declarations. The original branch addresses
were checked directly against the DOL; the local TitleRange copy helper is
instruction-identical to the original five-instruction callee. This candidate
does not resolve or change those existing external declaration/linking names
- Pool: 90/90 identical before and after
- Literal advisory: 157 arguments across 65 functions; no candidates/errors.
The unequal-extent draw routine is the only skip
- Full 43U all_source/report/DOL build passes
- DOL SHA1: `26116613f624061ba99c8d1a299aaa6efa85670d`
- `git diff --check`: pass
No runtime rendering or complete floating-domain proof is claimed. Verification
combines the unchanged source semantics, instruction-level preservation and
original-machine evidence. No shared headers, color storage, linking flags,
volatile qualifiers, assembly or unrelated functions changed.

View File

@@ -1,316 +0,0 @@
"""Authored synthetic PPC/ELF/DOL fixtures only; no original executable bytes."""
import contextlib
import hashlib
import io
import json
from pathlib import Path
import struct
import tempfile
import unittest
from unittest.mock import patch
import call_target_diff as tool
BASE = 0x80001000
BLR = 0x4E800020
LI_ONE = 0x38600001
LI_TWO = 0x38600002
def put_word(data, offset, word):
data[offset:offset + 4] = word.to_bytes(4, "big")
def bl(address, destination, absolute=False):
displacement = destination if absolute else destination - address
return 0x48000001 | (displacement & 0x03FFFFFC) | (2 if absolute else 0)
def make_elf(text, symbols, relocations):
"""Minimal ELF32 big-endian PowerPC relocatable, built from authored fields."""
strings = bytearray(b"\0")
symbol_data = bytearray(16)
for name, value, size, section, kind in symbols:
name_offset = len(strings)
strings.extend(name.encode() + b"\0")
symbol_data.extend(struct.pack(">IIIBBH", name_offset, value, size,
0x10 | kind, 0, section))
relocation_data = b"".join(struct.pack(">IIi", offset, index << 8 | kind, addend)
for offset, index, kind, addend in relocations)
section_names = b"\0.text\0.symtab\0.strtab\0.rela.text\0.shstrtab\0"
entries = [("", 0, 0, b"", 0, 0, 0),
(".text", 1, 6, bytes(text), 0, 0, 0),
(".symtab", 2, 0, bytes(symbol_data), 3, 1, 16),
(".strtab", 3, 0, bytes(strings), 0, 0, 0),
(".rela.text", 4, 0, relocation_data, 2, 1, 12),
(".shstrtab", 3, 0, section_names, 0, 0, 0)]
raw = bytearray(52)
headers = []
for name, kind, flags, data, link, info, item_size in entries:
while len(raw) % 4:
raw.append(0)
offset = len(raw) if data else 0
raw.extend(data)
headers.append(struct.pack(">10I", section_names.index(name.encode() + b"\0"),
kind, flags, 0, offset, len(data), link, info,
4 if name else 0, item_size))
while len(raw) % 4:
raw.append(0)
section_offset = len(raw)
raw.extend(b"".join(headers))
ident = b"\x7fELF\x01\x02\x01" + bytes(9)
raw[:52] = ident + struct.pack(">HHIIIIIHHHHHH", 1, 20, 1, 0, 0,
section_offset, 0, 52, 0, 0, 40, 6, 5)
return bytes(raw)
def make_dol(text):
header = [0] * 64
header[0], header[18], header[36] = 256, BASE, len(text)
return struct.pack(">64I", *header) + bytes(text)
def fixture(root, source_call="B", source_raw=False, reference_raw=False,
source_start=0x20, alias_body=False, renamed=False, score=100, size=8):
text = bytearray(0x80)
for offset, value in [(0, LI_ONE), (4, BLR), (8, LI_ONE if alias_body else LI_TWO),
(12, BLR), (0x24, BLR)]:
put_word(text, offset, value)
reference_text = bytearray(text)
put_word(reference_text, 0x20, bl(0x20, 8) if reference_raw else bl(0, 0))
source_text = bytearray(text)
put_word(source_text, source_start + 4, BLR)
destination = 0 if source_call == "A" else 8
put_word(source_text, source_start,
bl(source_start, destination) if source_raw else bl(0, 0))
symbols = [("A", 0, 8, 1, 2), ("B", 8, 8, 1, 2), ("caller", 0x20, 8, 1, 2)]
source_symbols = [("renamed" if renamed and n == source_call else n,
source_start if n == "caller" else v,
size if n == "caller" else length, sec, kind)
for n, v, length, sec, kind in symbols]
source_relocs = [] if source_raw else [(source_start, 1 if source_call == "A" else 2, 10, 0)]
reference_relocs = [] if reference_raw else [(0x20, 2, 10, 0)]
source = root / "build/43U/src/toy.o"
reference = root / "build/43U/obj/toy.o"
for path, data in [(source, make_elf(source_text, source_symbols, source_relocs)),
(reference, make_elf(reference_text, symbols, reference_relocs))]:
path.parent.mkdir(parents=True, exist_ok=True)
path.write_bytes(data)
put_word(text, 0x20, bl(BASE + 0x20, BASE + 8))
dol = root / "original.dol"
dol.write_bytes(make_dol(text))
report = {"units": [{"name": "main/toy", "functions": [
{"name": "caller", "fuzzy_match_percent": score}],
"metadata": {"source_path": "toy.c"}}]}
report_path = root / "build/43U/report.json"
report_path.write_text(json.dumps(report))
config = root / "config/43U"
config.mkdir(parents=True, exist_ok=True)
(config / "symbols.txt").write_text(
"A = .text:0x80001000; // type:function size:0x8\n"
"B = .text:0x80001008; // type:function size:0x8\n"
"caller = .text:0x80001020; // type:function size:0x8\n")
(config / "splits.txt").write_text("toy.c:\n\t.text start:0x80001000 end:0x80001080\n")
return report_path, dol, hashlib.sha1(dol.read_bytes()).hexdigest()
class CallTargetTests(unittest.TestCase):
def setUp(self):
self.temp = tempfile.TemporaryDirectory()
self.addCleanup(self.temp.cleanup)
self.root = Path(self.temp.name)
def run_fixture(self, **options):
report, dol, sha = fixture(self.root, **options)
return tool.audit(self.root, report, dol, sha)
def test_relocated_destination_matches_original_dol(self):
result, status = self.run_fixture()
self.assertEqual(status, 0)
self.assertEqual(result["counts"]["same_destination"], 1)
self.assertIn(str(self.root / "build/43U/src/toy.o"), result["provenance"]["sha256"])
def test_wrong_callee_detected_despite_identical_relocated_call_bytes(self):
result, status = self.run_fixture(source_call="A")
self.assertEqual(status, 1)
row = result["rows"][0]
self.assertEqual(row["classification"], "different_destination")
self.assertEqual(row["source_addresses"], [BASE])
self.assertEqual(row["dol_destination"], BASE + 8)
self.assertIsNone(row["alias_hint"])
def test_raw_local_calls_with_shifted_source_function(self):
result, status = self.run_fixture(source_raw=True, reference_raw=True, source_start=0x40)
self.assertEqual(status, 0)
self.assertEqual(result["counts"]["source_raw_relative"], 1)
self.assertEqual(result["counts"]["reference_raw_relative"], 1)
def rewrite_source(self, symbols, relocations):
text = bytearray(0x80)
for offset, word in [(0, LI_ONE), (4, BLR), (8, LI_TWO),
(12, BLR), (0x20, bl(0, 0)), (0x24, BLR)]:
put_word(text, offset, word)
(self.root / "build/43U/src/toy.o").write_bytes(make_elf(text, symbols, relocations))
def test_section_symbol_relocation_resolves_actual_function_start(self):
report, dol, sha = fixture(self.root)
self.rewrite_source([("A", 0, 8, 1, 2), ("B", 8, 8, 1, 2),
("caller", 0x20, 8, 1, 2), ("", 0, 0, 1, 3)],
[(0x20, 4, 10, 8)])
result, status = tool.audit(self.root, report, dol, sha)
self.assertEqual(status, 0)
self.assertEqual(result["counts"]["same_destination"], 1)
def test_same_address_alias_is_visible_without_claiming_a_bug(self):
report, dol, sha = fixture(self.root)
self.rewrite_source([("A", 0, 8, 1, 2), ("alias", 0, 0, 0, 2),
("caller", 0x20, 8, 1, 2)], [(0x20, 2, 10, 0)])
with (self.root / "config/43U/symbols.txt").open("a") as stream:
stream.write("alias = .text:0x80001008; // type:function size:0x8\n")
result, status = tool.audit(self.root, report, dol, sha)
self.assertEqual(status, 1)
self.assertEqual(result["rows"][0]["classification"], "same_address_alias")
def test_unknown_external_symbol_is_unresolved_not_guessed(self):
report, dol, sha = fixture(self.root)
self.rewrite_source([("A", 0, 8, 1, 2), ("unknown", 0, 0, 0, 2),
("caller", 0x20, 8, 1, 2)], [(0x20, 2, 10, 0)])
result, status = tool.audit(self.root, report, dol, sha)
self.assertEqual(status, 1)
self.assertEqual(result["rows"][0]["classification"], "unresolved_destination")
self.assertEqual(result["rows"][0]["source_addresses"], [])
def test_wrong_relocation_kind_or_symbol_is_an_input_error(self):
for index, kind in [(2, 1), (99, 10)]:
with self.subTest(index=index, kind=kind):
report, dol, sha = fixture(self.root)
self.rewrite_source([("A", 0, 8, 1, 2), ("B", 8, 8, 1, 2),
("caller", 0x20, 8, 1, 2)], [(0x20, index, kind, 0)])
result, status = tool.audit(self.root, report, dol, sha)
self.assertEqual(status, 2)
self.assertTrue(result["errors"])
def test_wrong_raw_local_callee_detected(self):
result, status = self.run_fixture(source_call="A", source_raw=True)
self.assertEqual(status, 1)
self.assertEqual(result["rows"][0]["source"]["names"], ["A"])
def test_decoder_signed_absolute_and_non_call_cases(self):
self.assertEqual(tool.branch_target(bl(0x20, 0), 0x20), 0)
self.assertEqual(tool.branch_target(bl(0x20, 0x40), 0x20), 0x40)
self.assertEqual(tool.branch_target(bl(0, 8, True), 0x100), 8)
self.assertEqual(tool.branch_target(bl(0, -4, True), 0), 0xFFFFFFFC)
self.assertIsNone(tool.branch_target(0x48000010, 0)) # tail branch
self.assertIsNone(tool.branch_target(0x4E800421, 0)) # indirect bctrl
def test_raw_interior_destination_retains_addend(self):
report, dol, sha = fixture(self.root, source_raw=True)
obj = tool.read_object(self.root / "build/43U/src/toy.o", tool.Inputs())
data = bytearray(obj.data[1])
put_word(data, 0x20, bl(0x20, 12))
obj.data[1] = bytes(data)
destination = obj.call(obj.function("caller"), 0)
self.assertEqual((destination["names"], destination["addend"]), (["B"], 4))
def test_renamed_relocation_free_wrapper_is_retained_for_review(self):
result, status = self.run_fixture(renamed=True)
self.assertEqual(status, 1)
self.assertEqual(result["rows"][0]["classification"], "unresolved_destination")
self.assertIn("identical_relocation_free_local_body", result["rows"][0]["alias_hint"])
def test_identical_original_bodies_do_not_silently_suppress_names(self):
result, status = self.run_fixture(source_call="A", alias_body=True)
self.assertEqual(status, 1)
self.assertEqual(result["rows"][0]["classification"], "different_destination")
self.assertIn("identical_original_leaf_bodies", result["rows"][0]["alias_hint"])
def test_nonexact_function_is_not_audited(self):
result, status = self.run_fixture(score=99.9)
self.assertEqual(status, 0)
self.assertEqual(result["counts"].get("calls", 0), 0)
def test_unequal_extents_are_explicitly_skipped(self):
result, status = self.run_fixture(size=4)
self.assertEqual(status, 1)
self.assertIn("extents differ", result["skipped_functions"][0]["reason"])
def test_missing_requested_function_or_unit_is_explicit(self):
report, dol, sha = fixture(self.root)
result, status = tool.audit(self.root, report, dol, sha, ["toy"], "missing")
self.assertEqual(status, 1)
self.assertTrue(result["skipped_functions"])
result, status = tool.audit(self.root, report, dol, sha, ["missing"])
self.assertEqual(status, 2)
self.assertTrue(result["errors"])
def test_reference_dol_disagreement_is_an_input_error(self):
report, dol, sha = fixture(self.root)
raw = bytearray(dol.read_bytes())
put_word(raw, 256 + 0x20, bl(BASE + 0x20, BASE))
dol.write_bytes(raw)
result, status = tool.audit(self.root, report, dol, hashlib.sha1(raw).hexdigest())
self.assertEqual(status, 2)
self.assertIn("ELF/DOL disagreement", result["errors"][0]["reason"])
def test_call_only_in_original_dol_is_not_missed(self):
report, dol, sha = fixture(self.root)
raw = bytearray(dol.read_bytes())
put_word(raw, 256 + 0x24, bl(BASE + 0x24, BASE))
dol.write_bytes(raw)
result, status = tool.audit(self.root, report, dol, hashlib.sha1(raw).hexdigest())
self.assertEqual(status, 2)
self.assertIn("ELF/DOL disagreement at +0x4", result["errors"][0]["reason"])
def test_removed_source_call_is_a_shape_candidate(self):
report, dol, sha = fixture(self.root)
source = self.root / "build/43U/src/toy.o"
text = bytearray(0x80)
put_word(text, 0x20, LI_ONE)
put_word(text, 0x24, BLR)
source.write_bytes(make_elf(text, [("caller", 0x20, 8, 1, 2)], []))
result, status = tool.audit(self.root, report, dol, sha)
self.assertEqual(status, 1)
self.assertEqual(result["rows"][0]["classification"], "call_shape_difference")
def test_dol_integrity_and_bounds_validation(self):
raw = make_dol(bytes(8))
with self.assertRaisesRegex(ValueError, "SHA1"):
tool.Dol(raw, "0" * 40)
with self.assertRaisesRegex(ValueError, "truncated"):
tool.Dol(b"", hashlib.sha1(b"").hexdigest())
image = tool.Dol(raw, hashlib.sha1(raw).hexdigest())
with self.assertRaisesRegex(ValueError, "not in one DOL section"):
image.read(BASE + 8, 4)
def test_no_body_alias_hint_for_position_dependent_code(self):
self.assertFalse(tool.position_independent_leaf(bl(0, 0x100).to_bytes(4, "big")))
self.assertFalse(tool.position_independent_leaf(bl(0, 0).to_bytes(4, "big")))
def test_changed_input_and_head_are_reported(self):
path = self.root / "input"
path.write_bytes(b"first")
inputs = tool.Inputs()
inputs.read(path)
path.write_bytes(b"second")
self.assertEqual(inputs.changed(), [str(path)])
with self.assertRaisesRegex(ValueError, "changed while reading"):
inputs.read(path)
report, dol, sha = fixture(self.root)
with patch.object(tool, "git_head", side_effect=["before", "after"]):
result, status = tool.audit(self.root, report, dol, sha)
self.assertEqual(status, 2)
self.assertEqual(result["errors"][-1]["reason"], "inputs changed during audit")
def test_cli_json_exit_status_and_input_overwrite_protection(self):
report, dol, sha = fixture(self.root)
output = self.root / "results.json"
args = ["--root", str(self.root), "--dol", str(dol), "--dol-sha1", sha]
self.assertEqual(tool.main(args + ["--output", str(output)]), 0)
self.assertTrue(json.loads(output.read_text())["advisory"])
with contextlib.redirect_stderr(io.StringIO()):
self.assertEqual(tool.main(args + ["--output", str(report)]), 2)
self.assertIn("units", json.loads(report.read_text()))
if __name__ == "__main__":
unittest.main()

View File

@@ -1,634 +0,0 @@
# tex1 ultra attempts
43U worker branch agent/w1003/sol-tex1-ultra, initial HEAD 333eea81.
Owned units Texture_MCUtoRGBA8, Texture_MCUtoRGB565, Texture_MCUtoY8U8V8.
Read tex1.md, local AGENTS.md, unslop, prior texture attempts and both orch/perm9-progress and orch/fz20-progress diffs. No subworkers, linking, pushes or branch operations.
Initial full-build quick gate PASS, SHA1 26116613f624061ba99c8d1a299aaa6efa85670d, regressions 0.
RGBA8 objdiff/instruction-exact 2/13, code 660/6596, data 0/0.
RGB565 objdiff/instruction-exact 6/13, code 2284/6184, data 0/0.
Y8U8V8 objdiff 12/13, gate instruction-exact 2/13, code 15164/15948, data 0/0.
All pools empty and identical, confirmed with pool_diff.py using both object paths. No data symbols or extents to rename.
Reference index has no entries for these converters. Target function extents are contiguous.
Prior rejected levers excluded: state const, reversing green operands/clamps, parameter and declaration permutations alone, array-address and aggregate buffer representations.
Sibling comparison: setup functions share all switch cases and folding mismatch; planar luma loop uses indexed reads then bulk pointer advance; exact RGB565 211/edge uses explicit Y, RGB offsets, y as row counter and direct halfword indexing. RGBA8 still has in-place alpha/channel packing with different temporary lifetimes.
## TMCJPEGDEC_converterYUV444toRGB565
Origin fetch check: still baseline/open. Reference index absent. Baseline (98.71429, (6, 13), 91, 91)
- blue owns luminance with green then red then blue conversion: (98.68132, (4, 14), 91, 91); source dee765adf974.
- blue owns luminance and green packed last: (97.96703, (0, 28), 91, 91); source 62d408e571f9.
- blue owns luminance and independent RGB565 packed fields: (95.87912, (0, 43), 91, 91); source 47307eca52e3.
## TMCJPEGDEC_converterYUV411toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (82.6033, (36, 153), 242, 242)
## TMCJPEGDEC_set_converterRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (93.91765, (36, 169), 169, 170)
Diagnosis: target keeps buffer base at entry and indirect row additions; compiled base folds in every switch case. No extent overlap. Sibling case layouts identical.
- conversion buffer as IDCT header words and byte row outputs: (93.91765, (36, 169), 169, 170); source f611dbdc1e12.
- row selection by widened MCU mode index: (84.511765, (52, 170), 181, 170); source beb08f66ec42.
- common first luminance row and MCU mode shared across switch: compiler failed, not counted. exturecvtr/Texture_MCUtoRGBA8.d build/43U/src/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8.d ### mwcceppc.exe Compiler: # File: libs\RVLMiddleware\TMC_JPEG\src\texturecvtr\Texture_MCUtoRGBA8.c # ------------------------------------------------------------------------- # 26: u8* firstRow = buffer + 4; # Error: ^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
## TMCJPEGDEC_set_converterRGB565
Origin fetch check: still baseline/open. Reference index absent. Baseline (93.91765, (36, 169), 169, 170)
Diagnosis: target keeps buffer base at entry and indirect row additions; compiled base folds in every switch case. No extent overlap. Sibling case layouts identical.
- conversion buffer as IDCT header words and byte row outputs: (93.91765, (36, 169), 169, 170); source 39bb72d28eff.
- row selection by widened MCU mode index: (84.511765, (52, 170), 181, 170); source 2aea4f08a875.
- common first luminance row and MCU mode shared across switch: compiler failed, not counted. recvtr/Texture_MCUtoRGB565.d build/43U/src/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565.d ### mwcceppc.exe Compiler: # File: libs\RVLMiddleware\TMC_JPEG\src\texturecvtr\Texture_MCUtoRGB565.c # -------------------------------------------------------------------------- # 26: u8* firstRow = buffer + 4; # Error: ^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
## TMCJPEGDEC_set_converterY8U8V8
Origin fetch check: still baseline/open. Reference index absent. Baseline (92.78571, (41, 195), 195, 196)
Diagnosis: target keeps buffer base at entry and indirect row additions; compiled base folds in every switch case. No extent overlap. Sibling case layouts identical.
- conversion buffer as IDCT header words and byte row outputs: (92.78571, (41, 195), 195, 196); source a866de64530c.
- row selection by widened MCU mode index: (84.755104, (57, 196), 207, 196); source 6ff79da16e0f.
- common first luminance row and MCU mode shared across switch: compiler failed, not counted. recvtr/Texture_MCUtoY8U8V8.d build/43U/src/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8.d ### mwcceppc.exe Compiler: # File: libs\RVLMiddleware\TMC_JPEG\src\texturecvtr\Texture_MCUtoY8U8V8.c # -------------------------------------------------------------------------- # 26: u8* firstRow = buffer + 4; # Error: ^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
## TMCJPEGDEC_set_converterRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (93.91765, (36, 169), 169, 170)
Diagnosis: target keeps buffer base at entry and indirect row additions; compiled base folds in every switch case. No extent overlap. Sibling case layouts identical.
- common first luminance row and MCU mode shared across switch: (81.05882, (75, 168), 161, 170); source 830b58c26106.
## TMCJPEGDEC_set_converterRGB565
Origin fetch check: still baseline/open. Reference index absent. Baseline (93.91765, (36, 169), 169, 170)
Diagnosis: target keeps buffer base at entry and indirect row additions; compiled base folds in every switch case. No extent overlap. Sibling case layouts identical.
- common first luminance row and MCU mode shared across switch: (81.05882, (75, 168), 161, 170); source d471374f3880.
## TMCJPEGDEC_set_converterY8U8V8
Origin fetch check: still baseline/open. Reference index absent. Baseline (92.78571, (41, 195), 195, 196)
Diagnosis: target keeps buffer base at entry and indirect row additions; compiled base folds in every switch case. No extent overlap. Sibling case layouts identical.
- common first luminance row and MCU mode shared across switch: (81.63265, (80, 194), 187, 196); source 527c11005199.
## TMCJPEGDEC_converterYUV411toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (82.6033, (36, 153), 242, 242)
Sibling source copied locally from RGB565 corresponding MCU, replacing only format stride/stores. Target/ours full disassembly captured; target frame/count checked before trials.
- corresponding RGB565 MCU loop and channel idioms: (74.82231, (68, 228), 230, 242); source e11cc71a0f3d.
- RGB565 sibling with named alphaRed and greenBlue packing: (74.82231, (68, 228), 230, 242); source 8a8f1e737bbf.
- RGB565 sibling with planar indexed luminance loads and bulk advance: (74.19835, (72, 228), 230, 242); source 9c2024664005.
## TMCJPEGDEC_converterYUV411toRGBA8edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (93.88393, (4, 56), 112, 112)
Sibling source copied locally from RGB565 corresponding MCU, replacing only format stride/stores. Target/ours full disassembly captured; target frame/count checked before trials.
- corresponding RGB565 MCU loop and channel idioms: (86.1875, (16, 91), 109, 112); source 9f297155d661.
- RGB565 sibling with named alphaRed and greenBlue packing: (86.1875, (16, 91), 109, 112); source 0272936bff38.
- RGB565 sibling with planar indexed luminance loads and bulk advance: (83.22321, (18, 100), 109, 112); source 931744d73e49.
## TMCJPEGDEC_converterYUV422toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (87.72298, (10, 84), 148, 148)
Sibling source copied locally from RGB565 corresponding MCU, replacing only format stride/stores. Target/ours full disassembly captured; target frame/count checked before trials.
- corresponding RGB565 MCU loop and channel idioms: (82.695946, (40, 132), 142, 148); source 4c34b62e01fc.
- RGB565 sibling with named alphaRed and greenBlue packing: (82.695946, (40, 132), 142, 148); source c8cac5147cb0.
- RGB565 sibling with planar indexed luminance loads and bulk advance: (80.702705, (42, 132), 142, 148); source 1c209495e0b3.
## TMCJPEGDEC_converterYUV422toRGBA8edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (90.08849, (6, 68), 113, 113)
Sibling source copied locally from RGB565 corresponding MCU, replacing only format stride/stores. Target/ours full disassembly captured; target frame/count checked before trials.
- corresponding RGB565 MCU loop and channel idioms: (88.38938, (14, 81), 110, 113); source 6b3938bc9e73.
- RGB565 sibling with named alphaRed and greenBlue packing: (88.38938, (14, 81), 110, 113); source d8ed2545db44.
- RGB565 sibling with planar indexed luminance loads and bulk advance: (86.57522, (16, 90), 110, 113); source 7da76429384d.
## TMCJPEGDEC_converterYUV420toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (89.40523, (16, 97), 153, 153)
Sibling source copied locally from RGB565 corresponding MCU, replacing only format stride/stores. Target/ours full disassembly captured; target frame/count checked before trials.
- corresponding RGB565 MCU loop and channel idioms: (81.22876, (40, 140), 147, 153); source 949ed7e811fc.
- RGB565 sibling with named alphaRed and greenBlue packing: (81.22876, (40, 140), 147, 153); source 987245235ef3.
- RGB565 sibling with planar indexed luminance loads and bulk advance: (78.75817, (40, 140), 147, 153); source 1f2027accd7c.
## TMCJPEGDEC_converterYUV420toRGBA8edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (87.458336, (12, 77), 120, 120)
Sibling source copied locally from RGB565 corresponding MCU, replacing only format stride/stores. Target/ours full disassembly captured; target frame/count checked before trials.
- corresponding RGB565 MCU loop and channel idioms: (79.84167, (25, 103), 117, 120); source ad063f2b63d1.
- RGB565 sibling with named alphaRed and greenBlue packing: (79.84167, (25, 103), 117, 120); source bae6e6f2f698.
- RGB565 sibling with planar indexed luminance loads and bulk advance: (78.25833, (27, 110), 117, 120); source a3c834981011.
## TMCJPEGDEC_converterYUV211toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (91.15385, (6, 49), 104, 104)
Sibling source copied locally from RGB565 corresponding MCU, replacing only format stride/stores. Target/ours full disassembly captured; target frame/count checked before trials.
- corresponding RGB565 MCU loop and channel idioms: (86.25961, (19, 80), 101, 104); source 01fd64c61048.
- RGB565 sibling with named alphaRed and greenBlue packing: (86.25961, (19, 80), 101, 104); source 3185656dbf32.
- RGB565 sibling with planar indexed luminance loads and bulk advance: (83.71154, (29, 91), 101, 104); source cecf1e5e4806.
## TMCJPEGDEC_converterYUV211toRGBA8edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (92.0, (6, 49), 115, 115)
Sibling source copied locally from RGB565 corresponding MCU, replacing only format stride/stores. Target/ours full disassembly captured; target frame/count checked before trials.
- corresponding RGB565 MCU loop and channel idioms: (87.834785, (16, 93), 112, 115); source fa85e7a7f7a5.
- RGB565 sibling with named alphaRed and greenBlue packing: (87.834785, (16, 93), 112, 115); source 47a7f27e6e04.
- RGB565 sibling with planar indexed luminance loads and bulk advance: (85.48695, (29, 105), 112, 115); source 01fbb9341df9.
## TMCJPEGDEC_converterYUV444toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (90.670105, (6, 46), 97, 97)
Sibling source copied locally from RGB565 corresponding MCU, replacing only format stride/stores. Target/ours full disassembly captured; target frame/count checked before trials.
- corresponding RGB565 MCU loop and channel idioms: (84.03093, (20, 85), 94, 97); source df769da06ad0.
- RGB565 sibling with named alphaRed and greenBlue packing: (84.03093, (20, 85), 94, 97); source 11130d95a6a6.
- RGB565 sibling with planar indexed luminance loads and bulk advance: (82.74227, (28, 92), 94, 97); source 4dc6c09cae71.
## TMCJPEGDEC_converterYUV444toRGBA8edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (88.90909, (8, 61), 110, 110)
Sibling source copied locally from RGB565 corresponding MCU, replacing only format stride/stores. Target/ours full disassembly captured; target frame/count checked before trials.
- corresponding RGB565 MCU loop and channel idioms: (87.57273, (14, 88), 107, 110); source 845653ff473d.
- RGB565 sibling with named alphaRed and greenBlue packing: (87.57273, (14, 88), 107, 110); source cba034dbba20.
- RGB565 sibling with planar indexed luminance loads and bulk advance: (85.84545, (16, 97), 107, 110); source 82b253c18fa3.
## TMCJPEGDEC_converterYUV411toRGB565
Origin fetch check: still baseline/open. Reference index absent. Baseline (90.599075, (21, 144), 217, 217)
Structural diagnosis: same target instruction counts/frame; sibling exact RGB565 211 and 422edge use distinct luminance local with RGB offset expressions, planar reads then advances pointer. Compare helpers and packing association before declarations.
- planar sibling indexed luminance with bulk MCU advance: (89.622116, (25, 158), 217, 217); source 759f79465b12.
- exact 211 sibling distinct luminance and widened signed chroma values: compiler failed, not counted. src/texturecvtr/Texture_MCUtoRGB565.d build/43U/src/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565.d ### mwcceppc.exe Compiler: # File: libs\RVLMiddleware\TMC_JPEG\src\texturecvtr\Texture_MCUtoRGB565.c # -------------------------------------------------------------------------- # 190: u8 value; # Error: ^ # (10333) object 'value' redefined # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
- named RGB565 channel fields and target green outer sum: (90.599075, (21, 144), 217, 217); source b0ea4e85dab7.
## TMCJPEGDEC_converterYUV411toRGB565edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (95.37736, (4, 62), 106, 106)
Structural diagnosis: same target instruction counts/frame; sibling exact RGB565 211 and 422edge use distinct luminance local with RGB offset expressions, planar reads then advances pointer. Compare helpers and packing association before declarations.
- planar sibling indexed luminance with bulk MCU advance: (93.58491, (6, 77), 106, 106); source 58f9dd9f5bb7.
- exact 211 sibling distinct luminance and widened signed chroma values: compiler failed, not counted. recvtr/Texture_MCUtoRGB565.d ### mwcceppc.exe Compiler: # File: libs\RVLMiddleware\TMC_JPEG\src\texturecvtr\Texture_MCUtoRGB565.c # -------------------------------------------------------------------------- # 265: s8* cb = &work->convBuf[260]; # Error: ^ # (10209) illegal implicit conversion from 'unsigned char *' to # 'signed char *' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
- named RGB565 channel fields and target green outer sum: (95.37736, (4, 62), 106, 106); source 9cc3cbb5146f.
## TMCJPEGDEC_converterYUV422toRGB565
Origin fetch check: still baseline/open. Reference index absent. Baseline (96.69118, (0, 58), 136, 136)
Structural diagnosis: same target instruction counts/frame; sibling exact RGB565 211 and 422edge use distinct luminance local with RGB offset expressions, planar reads then advances pointer. Compare helpers and packing association before declarations.
- planar sibling indexed luminance with bulk MCU advance: (91.36029, (2, 115), 136, 136); source 59931bc1f3ee.
- exact 211 sibling distinct luminance and widened signed chroma values: (96.43382, (0, 64), 136, 136); source 1f90a3b2b728.
- named RGB565 channel fields and target green outer sum: (90.661766, (16, 82), 136, 136); source 1e7b737a5d58.
## TMCJPEGDEC_converterYUV420toRGB565
Origin fetch check: still baseline/open. Reference index absent. Baseline (94.60993, (6, 86), 141, 141)
Structural diagnosis: same target instruction counts/frame; sibling exact RGB565 211 and 422edge use distinct luminance local with RGB offset expressions, planar reads then advances pointer. Compare helpers and packing association before declarations.
- planar sibling indexed luminance with bulk MCU advance: (91.489365, (8, 114), 141, 141); source 659a09cbe59b.
- exact 211 sibling distinct luminance and widened signed chroma values: unchanged, not counted.
- named RGB565 channel fields and target green outer sum: (94.60993, (6, 86), 141, 141); source 8b9be03502e9.
## TMCJPEGDEC_converterYUV420toRGB565edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (94.692986, (4, 73), 114, 114)
Structural diagnosis: same target instruction counts/frame; sibling exact RGB565 211 and 422edge use distinct luminance local with RGB offset expressions, planar reads then advances pointer. Compare helpers and packing association before declarations.
- planar sibling indexed luminance with bulk MCU advance: (92.54386, (6, 86), 114, 114); source e812bde84ff7.
- exact 211 sibling distinct luminance and widened signed chroma values: (94.429825, (4, 79), 114, 114); source 480723140fd8.
- named RGB565 channel fields and target green outer sum: (94.692986, (4, 73), 114, 114); source bcca9db05a61.
## TMCJPEGDEC_converterYUV411toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (82.6033, (36, 153), 242, 242)
Corrected sibling converter expressions: preserve column within tile before doubling tile-column stride. Initial generator shifted whole column expression and is rejected, not counted. Sibling source copied locally from RGB565 corresponding MCU, replacing only format stride/stores. Target/ours full disassembly captured; target frame/count checked before trials.
- corresponding RGB565 MCU loop and channel idioms: (76.55785, (45, 192), 242, 242); source b3e3f26fe337.
- RGB565 sibling with named alphaRed and greenBlue packing: (76.55785, (45, 192), 242, 242); source caae455fb853.
- RGB565 sibling with planar indexed luminance loads and bulk advance: (75.40496, (46, 201), 242, 242); source 2155c589741e.
## TMCJPEGDEC_converterYUV411toRGBA8edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (93.88393, (4, 56), 112, 112)
Corrected sibling converter expressions: preserve column within tile before doubling tile-column stride. Initial generator shifted whole column expression and is rejected, not counted. Sibling source copied locally from RGB565 corresponding MCU, replacing only format stride/stores. Target/ours full disassembly captured; target frame/count checked before trials.
- corresponding RGB565 MCU loop and channel idioms: (85.42857, (15, 83), 112, 112); source db389f1e1e92.
- RGB565 sibling with named alphaRed and greenBlue packing: (85.42857, (15, 83), 112, 112); source 2b13c0f59cbc.
- RGB565 sibling with planar indexed luminance loads and bulk advance: (85.16071, (17, 91), 112, 112); source b21a9b64d9b9.
## TMCJPEGDEC_converterYUV422toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (87.72298, (10, 84), 148, 148)
Corrected sibling converter expressions: preserve column within tile before doubling tile-column stride. Initial generator shifted whole column expression and is rejected, not counted. Sibling source copied locally from RGB565 corresponding MCU, replacing only format stride/stores. Target/ours full disassembly captured; target frame/count checked before trials.
- corresponding RGB565 MCU loop and channel idioms: (85.39189, (10, 109), 148, 148); source ee302f6040e8.
- RGB565 sibling with named alphaRed and greenBlue packing: (85.39189, (10, 109), 148, 148); source 85971d67dad2.
- RGB565 sibling with planar indexed luminance loads and bulk advance: (85.46622, (12, 120), 148, 148); source 6c9682c52127.
## TMCJPEGDEC_converterYUV422toRGBA8edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (90.08849, (6, 68), 113, 113)
Corrected sibling converter expressions: preserve column within tile before doubling tile-column stride. Initial generator shifted whole column expression and is rejected, not counted. Sibling source copied locally from RGB565 corresponding MCU, replacing only format stride/stores. Target/ours full disassembly captured; target frame/count checked before trials.
- corresponding RGB565 MCU loop and channel idioms: (89.24779, (12, 65), 113, 113); source efe793e99615.
- RGB565 sibling with named alphaRed and greenBlue packing: (89.24779, (12, 65), 113, 113); source de6ce0cb1e85.
- RGB565 sibling with planar indexed luminance loads and bulk advance: (86.185844, (15, 73), 113, 113); source 18113e98dc08.
## TMCJPEGDEC_converterYUV420toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (89.40523, (16, 97), 153, 153)
Corrected sibling converter expressions: preserve column within tile before doubling tile-column stride. Initial generator shifted whole column expression and is rejected, not counted. Sibling source copied locally from RGB565 corresponding MCU, replacing only format stride/stores. Target/ours full disassembly captured; target frame/count checked before trials.
- corresponding RGB565 MCU loop and channel idioms: (85.052284, (22, 118), 153, 153); source 94b9768b1c48.
- RGB565 sibling with named alphaRed and greenBlue packing: (85.052284, (22, 118), 153, 153); source b62f01c0625d.
- RGB565 sibling with planar indexed luminance loads and bulk advance: (82.60131, (19, 123), 153, 153); source 55e106087217.
## TMCJPEGDEC_converterYUV420toRGBA8edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (87.458336, (12, 77), 120, 120)
Corrected sibling converter expressions: preserve column within tile before doubling tile-column stride. Initial generator shifted whole column expression and is rejected, not counted. Sibling source copied locally from RGB565 corresponding MCU, replacing only format stride/stores. Target/ours full disassembly captured; target frame/count checked before trials.
- corresponding RGB565 MCU loop and channel idioms: (88.933334, (13, 79), 120, 120); source 6e1de769e774.
- RGB565 sibling with named alphaRed and greenBlue packing: (88.933334, (13, 79), 120, 120); source 880bdda5a207.
- RGB565 sibling with planar indexed luminance loads and bulk advance: (86.14167, (15, 91), 120, 120); source 3491e392cb78.
## TMCJPEGDEC_converterYUV211toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (91.15385, (6, 49), 104, 104)
Corrected sibling converter expressions: preserve column within tile before doubling tile-column stride. Initial generator shifted whole column expression and is rejected, not counted. Sibling source copied locally from RGB565 corresponding MCU, replacing only format stride/stores. Target/ours full disassembly captured; target frame/count checked before trials.
- corresponding RGB565 MCU loop and channel idioms: (84.63461, (14, 78), 104, 104); source c50f5313796f.
- RGB565 sibling with named alphaRed and greenBlue packing: (84.63461, (14, 78), 104, 104); source b4b4d299b403.
- RGB565 sibling with planar indexed luminance loads and bulk advance: (85.65385, (18, 87), 104, 104); source fab9e531bf31.
## TMCJPEGDEC_converterYUV211toRGBA8edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (92.0, (6, 49), 115, 115)
Corrected sibling converter expressions: preserve column within tile before doubling tile-column stride. Initial generator shifted whole column expression and is rejected, not counted. Sibling source copied locally from RGB565 corresponding MCU, replacing only format stride/stores. Target/ours full disassembly captured; target frame/count checked before trials.
- corresponding RGB565 MCU loop and channel idioms: (89.478264, (12, 64), 115, 115); source 46db31c436af.
- RGB565 sibling with named alphaRed and greenBlue packing: (89.478264, (12, 64), 115, 115); source f8bafa30bcd8.
- RGB565 sibling with planar indexed luminance loads and bulk advance: (86.46957, (15, 72), 115, 115); source 99fc20046713.
## TMCJPEGDEC_converterYUV444toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (90.670105, (6, 46), 97, 97)
Corrected sibling converter expressions: preserve column within tile before doubling tile-column stride. Initial generator shifted whole column expression and is rejected, not counted. Sibling source copied locally from RGB565 corresponding MCU, replacing only format stride/stores. Target/ours full disassembly captured; target frame/count checked before trials.
- corresponding RGB565 MCU loop and channel idioms: (85.06186, (16, 61), 97, 97); source f16f0334a945.
- RGB565 sibling with named alphaRed and greenBlue packing: (85.06186, (16, 61), 97, 97); source 6e33b3221c26.
- RGB565 sibling with planar indexed luminance loads and bulk advance: (83.18557, (22, 70), 97, 97); source 0e8544494bfe.
## TMCJPEGDEC_converterYUV444toRGBA8edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (88.90909, (8, 61), 110, 110)
Corrected sibling converter expressions: preserve column within tile before doubling tile-column stride. Initial generator shifted whole column expression and is rejected, not counted. Sibling source copied locally from RGB565 corresponding MCU, replacing only format stride/stores. Target/ours full disassembly captured; target frame/count checked before trials.
- corresponding RGB565 MCU loop and channel idioms: (89.13636, (12, 61), 110, 110); source 638a028f02ef.
- RGB565 sibling with named alphaRed and greenBlue packing: (89.13636, (12, 61), 110, 110); source 970dd847e40a.
- RGB565 sibling with planar indexed luminance loads and bulk advance: (85.990906, (15, 69), 110, 110); source 1b1049be75ce.
RGB565 444 target color calculation and packing structure now identical with blue sample ownership and green outer sum. Declaration search follows structural trials, limited to this candidate.
RGB565 444 declsearch 400 builds, best structural/exact (0,28), no gain; restored original 98.71429% source.
## TMCJPEGDEC_converterYUV411toRGB565
Origin fetch check: still baseline/open. Reference index absent. Baseline (90.599075, (21, 144), 217, 217)
Structural diagnosis: same target instruction counts/frame; sibling exact RGB565 211 and 422edge use distinct luminance local with RGB offset expressions, planar reads then advances pointer. Compare helpers and packing association before declarations.
- exact 211 sibling distinct luminance and widened signed chroma values: unchanged, not counted.
## TMCJPEGDEC_converterYUV411toRGB565edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (95.37736, (4, 62), 106, 106)
Structural diagnosis: same target instruction counts/frame; sibling exact RGB565 211 and 422edge use distinct luminance local with RGB offset expressions, planar reads then advances pointer. Compare helpers and packing association before declarations.
- exact 211 sibling distinct luminance and widened signed chroma values: (95.09434, (4, 68), 106, 106); source 082e8fcbd8f1.
## TMCJPEGDEC_converterYUV422toRGB565
Origin fetch check: still baseline/open. Reference index absent. Baseline (96.69118, (0, 58), 136, 136)
Structural diagnosis: same target instruction counts/frame; sibling exact RGB565 211 and 422edge use distinct luminance local with RGB offset expressions, planar reads then advances pointer. Compare helpers and packing association before declarations.
- exact 211 sibling distinct luminance and widened signed chroma values: (96.43382, (0, 64), 136, 136); source 1f90a3b2b728.
## TMCJPEGDEC_converterYUV420toRGB565
Origin fetch check: still baseline/open. Reference index absent. Baseline (94.60993, (6, 86), 141, 141)
Structural diagnosis: same target instruction counts/frame; sibling exact RGB565 211 and 422edge use distinct luminance local with RGB offset expressions, planar reads then advances pointer. Compare helpers and packing association before declarations.
- exact 211 sibling distinct luminance and widened signed chroma values: unchanged, not counted.
## TMCJPEGDEC_converterYUV420toRGB565edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (94.692986, (4, 73), 114, 114)
Structural diagnosis: same target instruction counts/frame; sibling exact RGB565 211 and 422edge use distinct luminance local with RGB offset expressions, planar reads then advances pointer. Compare helpers and packing association before declarations.
- exact 211 sibling distinct luminance and widened signed chroma values: (94.429825, (4, 79), 114, 114); source 480723140fd8.
## TMCJPEGDEC_converterYUV444toRGB565
Origin fetch check: still baseline/open. Reference index absent. Baseline (98.71429, (6, 13), 91, 91)
- inline YCbCr pixel helper with target sample evaluation order: (87.95605, (8, 70), 91, 91); source 78d531ed643c.
- inline pixel helper using unsigned luminance argument: (87.18681, (8, 71), 91, 91); source 78d531ed643c.
- inline pixel helper scoped channel declarations in calculation order: (93.2967, (0, 70), 91, 91); source 78d531ed643c.
## TMCJPEGDEC_converterYUV411toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (82.6033, (36, 153), 242, 242)
After sibling comparison, isolate RGBA8 packing boundary: target narrows channels before stores, creates a shared tile-column index then red tile and green/blue tile at +16 halfwords. Baseline preserves loop and arithmetic; no register search until this structural pass.
- explicit byte channel narrowing before AR and GB stores: unchanged, not counted.
- single texel index shared by AR and GB output tiles: (74.859505, (62, 212), 228, 242); source 1d4ee5677a33.
- byte locals describe clamped color channels at packing boundary: unchanged, not counted.
## TMCJPEGDEC_converterYUV411toRGBA8edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (93.88393, (4, 56), 112, 112)
After sibling comparison, isolate RGBA8 packing boundary: target narrows channels before stores, creates a shared tile-column index then red tile and green/blue tile at +16 halfwords. Baseline preserves loop and arithmetic; no register search until this structural pass.
- explicit byte channel narrowing before AR and GB stores: unchanged, not counted.
- single texel index shared by AR and GB output tiles: (90.85714, (14, 66), 109, 112); source 700d8e20b078.
- byte locals describe clamped color channels at packing boundary: unchanged, not counted.
## TMCJPEGDEC_converterYUV422toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (87.72298, (10, 84), 148, 148)
After sibling comparison, isolate RGBA8 packing boundary: target narrows channels before stores, creates a shared tile-column index then red tile and green/blue tile at +16 halfwords. Baseline preserves loop and arithmetic; no register search until this structural pass.
- explicit byte channel narrowing before AR and GB stores: (83.13513, (21, 116), 148, 148); source 5d39db82d45f.
- single texel index shared by AR and GB output tiles: (82.98649, (30, 123), 141, 148); source f61f83500766.
- byte locals describe clamped color channels at packing boundary: (87.72298, (10, 84), 148, 148); source 4b718a31079c.
## TMCJPEGDEC_converterYUV422toRGBA8edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (90.08849, (6, 68), 113, 113)
After sibling comparison, isolate RGBA8 packing boundary: target narrows channels before stores, creates a shared tile-column index then red tile and green/blue tile at +16 halfwords. Baseline preserves loop and arithmetic; no register search until this structural pass.
- explicit byte channel narrowing before AR and GB stores: (85.76991, (19, 72), 113, 113); source 4efce886d1f9.
- single texel index shared by AR and GB output tiles: (86.57522, (16, 79), 110, 113); source f79a94abeebf.
- byte locals describe clamped color channels at packing boundary: (90.08849, (6, 68), 113, 113); source 1614f2d29c37.
## TMCJPEGDEC_converterYUV420toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (89.40523, (16, 97), 153, 153)
After sibling comparison, isolate RGBA8 packing boundary: target narrows channels before stores, creates a shared tile-column index then red tile and green/blue tile at +16 halfwords. Baseline preserves loop and arithmetic; no register search until this structural pass.
- explicit byte channel narrowing before AR and GB stores: (84.13725, (25, 124), 153, 153); source 81a4905b87d6.
- single texel index shared by AR and GB output tiles: (82.888885, (30, 137), 146, 153); source 98d05c4408d5.
- byte locals describe clamped color channels at packing boundary: (89.40523, (16, 97), 153, 153); source dd466b834738.
## TMCJPEGDEC_converterYUV420toRGBA8edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (87.458336, (12, 77), 120, 120)
After sibling comparison, isolate RGBA8 packing boundary: target narrows channels before stores, creates a shared tile-column index then red tile and green/blue tile at +16 halfwords. Baseline preserves loop and arithmetic; no register search until this structural pass.
- explicit byte channel narrowing before AR and GB stores: (84.75, (19, 88), 120, 120); source 69e34a093227.
- single texel index shared by AR and GB output tiles: (82.0, (35, 99), 116, 120); source 51fab74e5b1c.
- byte locals describe clamped color channels at packing boundary: (87.458336, (12, 77), 120, 120); source d0df449ea505.
## TMCJPEGDEC_converterYUV211toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (91.15385, (6, 49), 104, 104)
After sibling comparison, isolate RGBA8 packing boundary: target narrows channels before stores, creates a shared tile-column index then red tile and green/blue tile at +16 halfwords. Baseline preserves loop and arithmetic; no register search until this structural pass.
- explicit byte channel narrowing before AR and GB stores: (84.84615, (15, 62), 104, 104); source 9b792deb6ace.
- single texel index shared by AR and GB output tiles: (82.89423, (19, 94), 101, 104); source a2b37cb779e7.
- byte locals describe clamped color channels at packing boundary: (91.15385, (6, 49), 104, 104); source 8f7646c953ed.
## TMCJPEGDEC_converterYUV211toRGBA8edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (92.0, (6, 49), 115, 115)
After sibling comparison, isolate RGBA8 packing boundary: target narrows channels before stores, creates a shared tile-column index then red tile and green/blue tile at +16 halfwords. Baseline preserves loop and arithmetic; no register search until this structural pass.
- explicit byte channel narrowing before AR and GB stores: (86.90435, (15, 59), 115, 115); source ff343c912284.
- single texel index shared by AR and GB output tiles: (84.4, (19, 99), 112, 115); source 4613f3801cc1.
- byte locals describe clamped color channels at packing boundary: (92.0, (6, 49), 115, 115); source bb20cb61a8d9.
## TMCJPEGDEC_converterYUV444toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (90.670105, (6, 46), 97, 97)
After sibling comparison, isolate RGBA8 packing boundary: target narrows channels before stores, creates a shared tile-column index then red tile and green/blue tile at +16 halfwords. Baseline preserves loop and arithmetic; no register search until this structural pass.
- explicit byte channel narrowing before AR and GB stores: (83.90722, (15, 59), 97, 97); source af0bd9f770d6.
- single texel index shared by AR and GB output tiles: (82.453606, (17, 86), 94, 97); source 14d0d2d769b1.
- byte locals describe clamped color channels at packing boundary: (90.670105, (6, 46), 97, 97); source 8d03b701fa55.
## TMCJPEGDEC_converterYUV444toRGBA8edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (88.90909, (8, 61), 110, 110)
After sibling comparison, isolate RGBA8 packing boundary: target narrows channels before stores, creates a shared tile-column index then red tile and green/blue tile at +16 halfwords. Baseline preserves loop and arithmetic; no register search until this structural pass.
- explicit byte channel narrowing before AR and GB stores: unchanged, not counted.
- single texel index shared by AR and GB output tiles: (81.84545, (24, 81), 107, 110); source 3b6c22ac223f.
- byte locals describe clamped color channels at packing boundary: unchanged, not counted.
## TMCJPEGDEC_converterYUV411toRGB565
Origin fetch check: still baseline/open. Reference index absent. Baseline (90.599075, (21, 144), 217, 217)
New boundary trial: declaration initialization and local scope, after sibling/control/data checks. C declaration permutations alone were inert, so change real input and row lifetimes.
- contiguous initialized MCU input and output metadata locals: (88.67742, (23, 160), 217, 217); source f79f51a4ce95.
- row output and tile coordinates declared at row scope: (89.308754, (21, 162), 217, 217); source 8094ec3a3d62.
- pixel luminance and channels initialized within pixel scope: (87.622116, (25, 162), 217, 217); source ee7d356404d5.
## TMCJPEGDEC_converterYUV411toRGB565edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (95.37736, (4, 62), 106, 106)
New boundary trial: declaration initialization and local scope, after sibling/control/data checks. C declaration permutations alone were inert, so change real input and row lifetimes.
- contiguous initialized MCU input and output metadata locals: unchanged, not counted.
- row output and tile coordinates declared at row scope: unchanged, not counted.
- pixel luminance and channels initialized within pixel scope: unchanged, not counted.
## TMCJPEGDEC_converterYUV422toRGB565
Origin fetch check: still baseline/open. Reference index absent. Baseline (96.69118, (0, 58), 136, 136)
New boundary trial: declaration initialization and local scope, after sibling/control/data checks. C declaration permutations alone were inert, so change real input and row lifetimes.
- contiguous initialized MCU input and output metadata locals: (92.81618, (2, 97), 136, 136); source 0108228d0330.
- row output and tile coordinates declared at row scope: (94.632355, (0, 91), 136, 136); source 54d1ae867262.
- pixel luminance and channels initialized within pixel scope: (91.58088, (4, 91), 136, 136); source 3e51610873ed.
## TMCJPEGDEC_converterYUV420toRGB565
Origin fetch check: still baseline/open. Reference index absent. Baseline (94.60993, (6, 86), 141, 141)
New boundary trial: declaration initialization and local scope, after sibling/control/data checks. C declaration permutations alone were inert, so change real input and row lifetimes.
- contiguous initialized MCU input and output metadata locals: (90.22695, (11, 107), 141, 141); source 883b29568db2.
- row output and tile coordinates declared at row scope: compiler failed, not counted. d/43U/src/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565.d ### mwcceppc.exe Compiler: # File: libs\RVLMiddleware\TMC_JPEG\src\texturecvtr\Texture_MCUtoRGB565.c # -------------------------------------------------------------------------- # 511: tileRow = (y >> 2) * tileWidth; # Error: ^^^^^^^ # (10140) undefined identifier 'tileRow' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
- pixel luminance and channels initialized within pixel scope: (92.3688, (8, 96), 141, 141); source 8122b6b24890.
## TMCJPEGDEC_converterYUV420toRGB565edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (94.692986, (4, 73), 114, 114)
New boundary trial: declaration initialization and local scope, after sibling/control/data checks. C declaration permutations alone were inert, so change real input and row lifetimes.
- contiguous initialized MCU input and output metadata locals: (85.26316, (10, 77), 114, 114); source 1fb0df3df095.
- row output and tile coordinates declared at row scope: (88.02631, (10, 86), 114, 114); source a66f40019d30.
- pixel luminance and channels initialized within pixel scope: (95.70175, (4, 64), 114, 114); source 7a3306693cd2.
## TMCJPEGDEC_converterYUV444toRGB565
Origin fetch check: still baseline/open. Reference index absent. Baseline (98.71429, (6, 13), 91, 91)
New boundary trial: declaration initialization and local scope, after sibling/control/data checks. C declaration permutations alone were inert, so change real input and row lifetimes.
- contiguous initialized MCU input and output metadata locals: (94.86813, (6, 59), 91, 91); source 11fc37395d18.
- row output and tile coordinates declared at row scope: (92.39561, (8, 60), 91, 91); source 3196ca9de943.
- pixel luminance and channels initialized within pixel scope: (99.31868, (2, 10), 91, 91); source 3045865f1926.
## TMCJPEGDEC_converterYUV411toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (82.6033, (36, 153), 242, 242)
New boundary trial: declaration initialization and local scope, after sibling/control/data checks. C declaration permutations alone were inert, so change real input and row lifetimes.
- contiguous initialized MCU input and output metadata locals: (77.89256, (45, 180), 242, 242); source 883bfb6758ad.
- row output and tile coordinates declared at row scope: compiler failed, not counted. c/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8.d ### mwcceppc.exe Compiler: # File: libs\RVLMiddleware\TMC_JPEG\src\texturecvtr\Texture_MCUtoRGBA8.c # ------------------------------------------------------------------------- # 207: output = (u16*)(texture + ((row & 3) << 3)); # Error: ^^^^^^ # (10140) undefined identifier 'output' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
- pixel luminance and channels initialized within pixel scope: (72.3843, (57, 202), 242, 242); source 25a8dbb7f0f8.
## TMCJPEGDEC_converterYUV411toRGBA8edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (93.88393, (4, 56), 112, 112)
New boundary trial: declaration initialization and local scope, after sibling/control/data checks. C declaration permutations alone were inert, so change real input and row lifetimes.
- contiguous initialized MCU input and output metadata locals: (88.65179, (6, 72), 112, 112); source 542e62aab9cb.
- row output and tile coordinates declared at row scope: (90.3125, (6, 72), 112, 112); source 6013ff48fe5f.
- pixel luminance and channels initialized within pixel scope: (93.88393, (4, 56), 112, 112); source 858d0df9f817.
## TMCJPEGDEC_converterYUV422toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (87.72298, (10, 84), 148, 148)
New boundary trial: declaration initialization and local scope, after sibling/control/data checks. C declaration permutations alone were inert, so change real input and row lifetimes.
- contiguous initialized MCU input and output metadata locals: (82.0, (14, 119), 148, 148); source 7b10cf17dc41.
- row output and tile coordinates declared at row scope: (84.64865, (10, 118), 148, 148); source 9370f14f81e6.
- pixel luminance and channels initialized within pixel scope: (87.72298, (10, 84), 148, 148); source ce0b4ae259e7.
## TMCJPEGDEC_converterYUV422toRGBA8edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (90.08849, (6, 68), 113, 113)
New boundary trial: declaration initialization and local scope, after sibling/control/data checks. C declaration permutations alone were inert, so change real input and row lifetimes.
- contiguous initialized MCU input and output metadata locals: (83.31858, (8, 78), 113, 113); source bf97302c5ede.
- row output and tile coordinates declared at row scope: (87.78761, (6, 86), 113, 113); source 1eebb0779fd8.
- pixel luminance and channels initialized within pixel scope: (87.831856, (12, 84), 113, 113); source 4142970d76b7.
## TMCJPEGDEC_converterYUV420toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (89.40523, (16, 97), 153, 153)
New boundary trial: declaration initialization and local scope, after sibling/control/data checks. C declaration permutations alone were inert, so change real input and row lifetimes.
- contiguous initialized MCU input and output metadata locals: (86.61438, (18, 114), 153, 153); source b41795663576.
- row output and tile coordinates declared at row scope: compiler failed, not counted. src/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8.d ### mwcceppc.exe Compiler: # File: libs\RVLMiddleware\TMC_JPEG\src\texturecvtr\Texture_MCUtoRGBA8.c # ------------------------------------------------------------------------- # 557: output = (u16*)(texture + ((y & 3) << 3)); # Error: ^^^^^^ # (10140) undefined identifier 'output' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
- pixel luminance and channels initialized within pixel scope: compiler failed, not counted. rc/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8.d ### mwcceppc.exe Compiler: # File: libs\RVLMiddleware\TMC_JPEG\src\texturecvtr\Texture_MCUtoRGBA8.c # ------------------------------------------------------------------------- # 570: s32 red = value + redOffset; # Error: ^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
## TMCJPEGDEC_converterYUV420toRGBA8edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (87.458336, (12, 77), 120, 120)
New boundary trial: declaration initialization and local scope, after sibling/control/data checks. C declaration permutations alone were inert, so change real input and row lifetimes.
- contiguous initialized MCU input and output metadata locals: unchanged, not counted.
- row output and tile coordinates declared at row scope: unchanged, not counted.
- pixel luminance and channels initialized within pixel scope: unchanged, not counted.
## TMCJPEGDEC_converterYUV211toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (91.15385, (6, 49), 104, 104)
New boundary trial: declaration initialization and local scope, after sibling/control/data checks. C declaration permutations alone were inert, so change real input and row lifetimes.
- contiguous initialized MCU input and output metadata locals: (82.51923, (14, 82), 104, 104); source 3f910c53f315.
- row output and tile coordinates declared at row scope: compiler failed, not counted. uild/43U/src/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8.d ### mwcceppc.exe Compiler: # File: libs\RVLMiddleware\TMC_JPEG\src\texturecvtr\Texture_MCUtoRGBA8.c # ------------------------------------------------------------------------- # 725: tileRow = (y >> 2) * tileWidth; # Error: ^^^^^^^ # (10140) undefined identifier 'tileRow' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
- pixel luminance and channels initialized within pixel scope: (86.57692, (18, 61), 104, 104); source 12ac89e32c75.
## TMCJPEGDEC_converterYUV211toRGBA8edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (92.0, (6, 49), 115, 115)
New boundary trial: declaration initialization and local scope, after sibling/control/data checks. C declaration permutations alone were inert, so change real input and row lifetimes.
- contiguous initialized MCU input and output metadata locals: (84.26087, (8, 75), 115, 115); source d5a88f2a245b.
- row output and tile coordinates declared at row scope: compiler failed, not counted. uild/43U/src/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8.d ### mwcceppc.exe Compiler: # File: libs\RVLMiddleware\TMC_JPEG\src\texturecvtr\Texture_MCUtoRGBA8.c # ------------------------------------------------------------------------- # 815: tileRow = (y >> 2) * tileWidth; # Error: ^^^^^^^ # (10140) undefined identifier 'tileRow' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
- pixel luminance and channels initialized within pixel scope: (85.73044, (18, 84), 115, 115); source e7fb76871cc6.
## TMCJPEGDEC_converterYUV444toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (90.670105, (6, 46), 97, 97)
New boundary trial: declaration initialization and local scope, after sibling/control/data checks. C declaration permutations alone were inert, so change real input and row lifetimes.
- contiguous initialized MCU input and output metadata locals: (80.71134, (13, 72), 97, 97); source ed3807019cda.
- row output and tile coordinates declared at row scope: (84.68041, (10, 78), 97, 97); source dd9e76e4b64f.
- pixel luminance and channels initialized within pixel scope: (85.78351, (16, 56), 97, 97); source b53542b95323.
## TMCJPEGDEC_converterYUV444toRGBA8edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (88.90909, (8, 61), 110, 110)
New boundary trial: declaration initialization and local scope, after sibling/control/data checks. C declaration permutations alone were inert, so change real input and row lifetimes.
- contiguous initialized MCU input and output metadata locals: (84.09091, (10, 74), 110, 110); source 29cfdedf2713.
- row output and tile coordinates declared at row scope: (86.954544, (8, 83), 110, 110); source 0a5681923d7f.
- pixel luminance and channels initialized within pixel scope: (87.045456, (14, 74), 110, 110); source d9011c3a4ed8.
RGB565444 scoped pixel reached 99.31868%, 91/91 instructions, 10 differences. Remaining two multiply order choices and luminance destination ownership. Test original-looking scoped pixel channel definitions.
- scoped blue luminance then green and red channels: (98.68132, (4, 14), 91, 91); source 4dc60099342c.
- scoped independent value then RGB channels: (99.89011, (0, 1), 91, 91); source dc25faf87b2b.
- scoped blue with target channel overflow operands: (98.62637, (4, 15), 91, 91); source e14fc84dc985.
Scoped independent luminance reaches 99.89011%; target structural score 0 and one operand difference. Candidate restored for focused final operand diagnosis.
- scoped independent luminance and blue red green overflow test: (99.83517, (0, 2), 91, 91); source 07b24558fb06.
- scoped independent color range check red | green | blue: (100.0, (0, 0), 91, 91); source 2eacd0560691.
Exact candidate retained for independent gate; no commit yet.
## Accepted exact RGB565444
TMCJPEGDEC_converterYUV444toRGB565 98.71429% -> 100.0%, 91/91 instructions, ctxdiff diffs 0. Full clean all-three-unit gate PASS; unchanged DOL target SHA1, regressions/forbidden/readability 0. Code 2284 -> 2648/6184; instruction-exact 6 -> 7/13. Retained pixel scope, distinct luminance, green then red then blue expressions and red/green/blue overflow operands.
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] pool: IDENTICAL
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] objdiff: code 660/6596 data None/None functions 2/13 fuzzy 90.3232 linked code 0
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] instruction-exact functions: 2/13
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] section .text size 6596 match 90.32323
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] below 100: TMCJPEGDEC_set_converterRGBA8 93.91765
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] below 100: TMCJPEGDEC_converterYUV411toRGBA8 82.6033
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] below 100: TMCJPEGDEC_converterYUV411toRGBA8edge 93.88393
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] below 100: TMCJPEGDEC_converterYUV422toRGBA8 87.72298
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] below 100: TMCJPEGDEC_converterYUV422toRGBA8edge 90.08849
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] below 100: TMCJPEGDEC_converterYUV420toRGBA8 89.40523
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] below 100: TMCJPEGDEC_converterYUV420toRGBA8edge 87.458336
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] below 100: TMCJPEGDEC_converterYUV211toRGBA8 91.15385
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] below 100: TMCJPEGDEC_converterYUV211toRGBA8edge 92.0
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] below 100: TMCJPEGDEC_converterYUV444toRGBA8 90.670105
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] below 100: TMCJPEGDEC_converterYUV444toRGBA8edge 88.90909
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] baseline: code 660/6596 data None functions 2 fuzzy 90.3232
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] pool: IDENTICAL
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] objdiff: code 2648/6184 data None/None functions 7/13 fuzzy 96.5207 linked code 0
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] instruction-exact functions: 7/13
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] section .text size 6184 match 96.5207
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] below 100: TMCJPEGDEC_set_converterRGB565 93.91765
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] below 100: TMCJPEGDEC_converterYUV411toRGB565 90.599075
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] below 100: TMCJPEGDEC_converterYUV411toRGB565edge 95.37736
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] below 100: TMCJPEGDEC_converterYUV422toRGB565 96.69118
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] below 100: TMCJPEGDEC_converterYUV420toRGB565 94.60993
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] below 100: TMCJPEGDEC_converterYUV420toRGB565edge 94.692986
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] baseline: code 2284/6184 data None functions 6 fuzzy 96.4450
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] pool: IDENTICAL
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] objdiff: code 15164/15948 data None/None functions 12/13 fuzzy 99.6453 linked code 0
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] instruction-exact functions: 2/13
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] section .text size 15948 match 99.64535
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEGDEC_set_converterY8U8V8 92.78571
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] baseline: code 15164/15948 data None functions 12 fuzzy 99.6453
regressions vs baseline: 0
global matched_code_percent: 91.58086 -> 91.59302
global fuzzy_match_percent: 99.70061 -> 99.70077
global complete_code_percent: 74.74593 -> 74.74593
global matched_data_percent: 99.77803 -> 99.77803
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
## TMCJPEGDEC_converterYUV444toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (90.670105, (6, 46), 97, 97)
New exact donor: RGB565444 now byte and instruction exact. Port its scoped luminance and channel idioms to RGBA8 before further work.
- new exact RGB565444 pixel scope port: (85.47423, (16, 58), 97, 97); source 9b59c76c33d8.
- new exact RGB565444 scope with named RGBA8 packing: (85.47423, (16, 58), 97, 97); source a5a3c27db79e.
- new exact RGB565444 scope with planar indexed samples: (83.69072, (18, 69), 97, 97); source 5d22fa74b85d.
## TMCJPEGDEC_converterYUV411toRGB565
Origin fetch check: still baseline/open. Reference index absent. Baseline (90.599075, (21, 144), 217, 217)
Exact RGB565444 donor pixel shape: independent initialized luminance, scoped green/red/blue temporaries, shared chroma outside pixel, red/green/blue range test. Apply to this MCU while keeping its proven row/column/pointer stepping.
- exact RGB565444 independent scoped pixel template: (87.9447, (25, 161), 217, 217); source 54bc1eb238f5.
- exact RGB565444 scoped template with byte luminance input: (84.4424, (42, 162), 217, 217); source a49f70599e1a.
## TMCJPEGDEC_converterYUV411toRGB565edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (95.37736, (4, 62), 106, 106)
Exact RGB565444 donor pixel shape: independent initialized luminance, scoped green/red/blue temporaries, shared chroma outside pixel, red/green/blue range test. Apply to this MCU while keeping its proven row/column/pointer stepping.
- exact RGB565444 independent scoped pixel template: (95.28302, (4, 63), 106, 106); source 707515bac55b.
- exact RGB565444 scoped template with byte luminance input: (95.28302, (4, 63), 106, 106); source d4798ff95c45.
## TMCJPEGDEC_converterYUV422toRGB565
Origin fetch check: still baseline/open. Reference index absent. Baseline (96.69118, (0, 58), 136, 136)
Exact RGB565444 donor pixel shape: independent initialized luminance, scoped green/red/blue temporaries, shared chroma outside pixel, red/green/blue range test. Apply to this MCU while keeping its proven row/column/pointer stepping.
- exact RGB565444 independent scoped pixel template: (89.44853, (6, 99), 136, 136); source caf68980868d.
- exact RGB565444 scoped template with byte luminance input: (91.10294, (4, 92), 136, 136); source 74d37039aca8.
## TMCJPEGDEC_converterYUV420toRGB565
Origin fetch check: still baseline/open. Reference index absent. Baseline (94.60993, (6, 86), 141, 141)
Exact RGB565444 donor pixel shape: independent initialized luminance, scoped green/red/blue temporaries, shared chroma outside pixel, red/green/blue range test. Apply to this MCU while keeping its proven row/column/pointer stepping.
- exact RGB565444 independent scoped pixel template: (92.049644, (8, 103), 141, 141); source 1c733f91fe02.
- exact RGB565444 scoped template with byte luminance input: (90.38298, (10, 103), 141, 141); source f228da2a14ef.
## TMCJPEGDEC_converterYUV420toRGB565edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (94.692986, (4, 73), 114, 114)
Exact RGB565444 donor pixel shape: independent initialized luminance, scoped green/red/blue temporaries, shared chroma outside pixel, red/green/blue range test. Apply to this MCU while keeping its proven row/column/pointer stepping.
- exact RGB565444 independent scoped pixel template: (96.00877, (4, 61), 114, 114); source 5fd30949ab98.
- exact RGB565444 scoped template with byte luminance input: (96.00877, (4, 61), 114, 114); source daeeb99a8bc4.
## TMCJPEGDEC_converterYUV411toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (82.6033, (36, 153), 242, 242)
Exact RGB565444 donor pixel shape: independent initialized luminance, scoped green/red/blue temporaries, shared chroma outside pixel, red/green/blue range test. Apply to this MCU while keeping its proven row/column/pointer stepping.
## TMCJPEGDEC_converterYUV411toRGBA8
Origin fetch check: still baseline/open. Reference index absent. Baseline (82.6033, (36, 153), 242, 242)
Exact RGB565444 donor pixel shape: independent initialized luminance, scoped green/red/blue temporaries, shared chroma outside pixel, red/green/blue range test. Apply to this MCU while keeping its proven row/column/pointer stepping.
- exact RGB565444 independent scoped pixel template: (73.74793, (47, 202), 242, 242); source 5c4c86f88c2f.
- exact RGB565444 scoped template with byte luminance input: (72.3843, (57, 202), 242, 242); source 0ec3cc0701f8.
## TMCJPEGDEC_converterYUV411toRGBA8edge
Origin fetch check: still baseline/open. Reference index absent. Baseline (93.88393, (4, 56), 112, 112)
Exact RGB565444 donor pixel shape: independent initialized luminance, scoped green/red/blue temporaries, shared chroma outside pixel, red/green/blue range test. Apply to this MCU while keeping its proven row/column/pointer stepping.
## Final ownership and completeness audit
No new fuzzy-only source changes retained. Only the new exact RGB565444 pixel scope remains. All failed or non-exact candidates restored. No headers, symbol extents, linking flags, force-active data, or other translation units changed.
Initial RGBA8 sibling generator wrongly grouped the within-tile column into the left shift. Those initial trials are rejected and excluded from completeness; the corrected generator preserved the column remainder. Compiler failures and unchanged variants are excluded. No generator failures affected the retained source.
RGBA8: objdiff exact 2 -> 2/13; code 660 -> 660/6596; data 0 -> 0/0.
Open TMCJPEGDEC_set_converterRGBA8 93.91765%; instructions 169/170; structural/exact differences (36, 169); 3 distinct valid source variants; shared conversion-buffer base folds into case addresses; dimension/store scheduling.
Open TMCJPEGDEC_converterYUV411toRGBA8 82.6033%; instructions 242/242; structural/exact differences (36, 153); 8 distinct valid source variants; channel/output scheduling and live temporary ownership.
Open TMCJPEGDEC_converterYUV411toRGBA8edge 93.88393%; instructions 112/112; structural/exact differences (4, 56); 7 distinct valid source variants; channel/output scheduling and live temporary ownership.
Open TMCJPEGDEC_converterYUV422toRGBA8 87.72298%; instructions 148/148; structural/exact differences (10, 84); 9 distinct valid source variants; channel/output scheduling and live temporary ownership.
Open TMCJPEGDEC_converterYUV422toRGBA8edge 90.08849%; instructions 113/113; structural/exact differences (6, 68); 9 distinct valid source variants; channel/output scheduling and live temporary ownership.
Open TMCJPEGDEC_converterYUV420toRGBA8 89.40523%; instructions 153/153; structural/exact differences (16, 97); 7 distinct valid source variants; channel/output scheduling and live temporary ownership.
Open TMCJPEGDEC_converterYUV420toRGBA8edge 87.458336%; instructions 120/120; structural/exact differences (12, 77); 6 distinct valid source variants; channel/output scheduling and live temporary ownership.
Open TMCJPEGDEC_converterYUV211toRGBA8 91.15385%; instructions 104/104; structural/exact differences (6, 49); 8 distinct valid source variants; channel/output scheduling and live temporary ownership.
Open TMCJPEGDEC_converterYUV211toRGBA8edge 92.0%; instructions 115/115; structural/exact differences (6, 49); 8 distinct valid source variants; channel/output scheduling and live temporary ownership.
Open TMCJPEGDEC_converterYUV444toRGBA8 90.670105%; instructions 97/97; structural/exact differences (6, 46); 12 distinct valid source variants; channel/output scheduling and live temporary ownership.
Open TMCJPEGDEC_converterYUV444toRGBA8edge 88.90909%; instructions 110/110; structural/exact differences (8, 61); 12 distinct valid source variants; channel/output scheduling and live temporary ownership.
RGB565: objdiff exact 6 -> 7/13; code 2284 -> 2648/6184; data 0 -> 0/0.
Open TMCJPEGDEC_set_converterRGB565 93.91765%; instructions 169/170; structural/exact differences (36, 169); 3 distinct valid source variants; shared conversion-buffer base folds into case addresses; dimension/store scheduling.
Open TMCJPEGDEC_converterYUV411toRGB565 90.599075%; instructions 217/217; structural/exact differences (21, 144); 7 distinct valid source variants; channel/output scheduling and live temporary ownership.
Open TMCJPEGDEC_converterYUV411toRGB565edge 95.37736%; instructions 106/106; structural/exact differences (4, 62); 5 distinct valid source variants; channel/output scheduling and live temporary ownership.
Open TMCJPEGDEC_converterYUV422toRGB565 96.69118%; instructions 136/136; structural/exact differences (0, 58); 8 distinct valid source variants; register allocation only.
Open TMCJPEGDEC_converterYUV420toRGB565 94.60993%; instructions 141/141; structural/exact differences (6, 86); 6 distinct valid source variants; channel/output scheduling and live temporary ownership.
Open TMCJPEGDEC_converterYUV420toRGB565edge 94.692986%; instructions 114/114; structural/exact differences (4, 73); 8 distinct valid source variants; channel/output scheduling and live temporary ownership.
Y8U8V8: objdiff exact 12 -> 12/13; code 15164 -> 15164/15948; data 0 -> 0/0.
Open TMCJPEGDEC_set_converterY8U8V8 92.78571%; instructions 195/196; structural/exact differences (41, 195); 3 distinct valid source variants; shared conversion-buffer base folds into case addresses; dimension/store scheduling.
Y8U8V8 gate discrepancy independently verified: all twelve converter functions have byte-identical entire function bodies in source and original objects, totalling 15164 bytes. gate.py prints instruction-exact 2/13 because odiff.dis mistakes the explicit condition-register operand for the target of conditional branches. No gate/tool changes made. Objdiff 12/13 is correct; setup remains non-exact.
All owned target extents checked: no overlap, no allocated data beyond text, no possible data rename/extent fix. All eighteen remaining functions have at least three distinct valid compiled source attempts this run. Source patch reviewed: scoped initialized value and channel calculations, no new comments or prohibited patterns.
Gate instruction-count evidence TMCJPEG_814EFEAC: raw function bytes identical; offsets 0x30c / 0x310; odiff first differences [(161, ('bge', -1411), ('bge', -1415)), (169, ('bgt', -1443), ('bgt', -1447))].
## Final full clean gate
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] pool: IDENTICAL
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] objdiff: code 660/6596 data None/None functions 2/13 fuzzy 90.3232 linked code 0
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] instruction-exact functions: 2/13
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] section .text size 6596 match 90.32323
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] below 100: TMCJPEGDEC_set_converterRGBA8 93.91765
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] below 100: TMCJPEGDEC_converterYUV411toRGBA8 82.6033
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] below 100: TMCJPEGDEC_converterYUV411toRGBA8edge 93.88393
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] below 100: TMCJPEGDEC_converterYUV422toRGBA8 87.72298
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] below 100: TMCJPEGDEC_converterYUV422toRGBA8edge 90.08849
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] below 100: TMCJPEGDEC_converterYUV420toRGBA8 89.40523
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] below 100: TMCJPEGDEC_converterYUV420toRGBA8edge 87.458336
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] below 100: TMCJPEGDEC_converterYUV211toRGBA8 91.15385
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] below 100: TMCJPEGDEC_converterYUV211toRGBA8edge 92.0
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] below 100: TMCJPEGDEC_converterYUV444toRGBA8 90.670105
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] below 100: TMCJPEGDEC_converterYUV444toRGBA8edge 88.90909
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] baseline: code 660/6596 data None functions 2 fuzzy 90.3232
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] pool: IDENTICAL
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] objdiff: code 2648/6184 data None/None functions 7/13 fuzzy 96.5207 linked code 0
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] instruction-exact functions: 7/13
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] section .text size 6184 match 96.5207
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] below 100: TMCJPEGDEC_set_converterRGB565 93.91765
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] below 100: TMCJPEGDEC_converterYUV411toRGB565 90.599075
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] below 100: TMCJPEGDEC_converterYUV411toRGB565edge 95.37736
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] below 100: TMCJPEGDEC_converterYUV422toRGB565 96.69118
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] below 100: TMCJPEGDEC_converterYUV420toRGB565 94.60993
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] below 100: TMCJPEGDEC_converterYUV420toRGB565edge 94.692986
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] baseline: code 2284/6184 data None functions 6 fuzzy 96.4450
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] pool: IDENTICAL
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] objdiff: code 15164/15948 data None/None functions 12/13 fuzzy 99.6453 linked code 0
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] instruction-exact functions: 2/13
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] section .text size 15948 match 99.64535
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEGDEC_set_converterY8U8V8 92.78571
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] baseline: code 15164/15948 data None functions 12 fuzzy 99.6453
regressions vs baseline: 0
global matched_code_percent: 91.58086 -> 91.59302
global fuzzy_match_percent: 99.70061 -> 99.70077
global complete_code_percent: 74.74593 -> 74.74593
global matched_data_percent: 99.77803 -> 99.77803
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS

View File

@@ -1,415 +0,0 @@
# ult15 single-function structural matching
Branch agent/w1003/sol-ult15-ultra; base 57ccda3883537a308568c03924af2cebf2d8a789.
All four initial pools identical. Existing untracked ult8b.attempts.md left untouched.
## ATERMRunConfigProtocol target CFG and calls
Target 951/source958 instructions, frame0x180. Earlier ult1/fz20/data-d3 trials read; no reference-index entry. Addresses below are target object offsets.
0x170c Initialize protocol state1, response/packet/session views, socket0/result-5/retries0/failure0.
0x1778 Initialize alarm/message queue, wait500ms, dispatch state0..10.
0x17e4 Initialize alarm/message queue, wait500ms, dispatch state0..10.
0x180c case1 DiscoverAccessPoints; failure exits loop; progress state3 with deadline time; advance2.
0x1814 case1 DiscoverAccessPoints; failure exits loop; progress state3 with deadline time; advance2.
0x1834 case1 DiscoverAccessPoints; failure exits loop; progress state3 with deadline time; advance2.
0x183c case1 DiscoverAccessPoints; failure exits loop; progress state3 with deadline time; advance2.
0x1868 case1 DiscoverAccessPoints; failure exits loop; progress state3 with deadline time; advance2.
0x1888 case2 StartNetworkStack; failure exits loop; extend deadline to now+10000; advance3.
0x1898 case2 StartNetworkStack; failure exits loop; extend deadline to now+10000; advance3.
0x18a0 case2 StartNetworkStack; failure exits loop; extend deadline to now+10000; advance3.
0x18d0 case2 StartNetworkStack; failure exits loop; extend deadline to now+10000; advance3.
0x18f8 case2 StartNetworkStack; failure exits loop; extend deadline to now+10000; advance3.
0x1904 case3 create UDP socket; initialize sockaddr and bind; failure-2 or advance4.
0x1920 case3 create UDP socket; initialize sockaddr and bind; failure-2 or advance4.
0x192c case3 create UDP socket; initialize sockaddr and bind; failure-2 or advance4.
0x1970 case3 create UDP socket; initialize sockaddr and bind; failure-2 or advance4.
0x197c case3 create UDP socket; initialize sockaddr and bind; failure-2 or advance4.
0x1988 case4 deadline close/-3; build association request; receive/parse packet; progress4 and advance5.
0x19b4 case4 deadline close/-3; build association request; receive/parse packet; progress4 and advance5.
0x19c8 case4 deadline close/-3; build association request; receive/parse packet; progress4 and advance5.
0x19f8 case4 deadline close/-3; build association request; receive/parse packet; progress4 and advance5.
0x1a0c case4 deadline close/-3; build association request; receive/parse packet; progress4 and advance5.
0x1a58 case4 deadline close/-3; build association request; receive/parse packet; progress4 and advance5.
0x1a60 case4 deadline close/-3; build association request; receive/parse packet; progress4 and advance5.
0x1a8c case4 deadline close/-3; build association request; receive/parse packet; progress4 and advance5.
0x1aa8 case5 construct request options in order, send broadcast encrypted type2; set lastSendTime and advance6.
0x1b94 case5 construct request options in order, send broadcast encrypted type2; set lastSendTime and advance6.
0x1be0 case5 construct request options in order, send broadcast encrypted type2; set lastSendTime and advance6.
0x1c3c case5 construct request options in order, send broadcast encrypted type2; set lastSendTime and advance6.
0x1c8c case5 construct request options in order, send broadcast encrypted type2; set lastSendTime and advance6.
0x1d18 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1d44 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1d58 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1d78 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1dac case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1dbc case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1dc0 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1dd8 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1e20 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1e30 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1e40 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1e5c case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1e60 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1e68 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1e70 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1e7c case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1e84 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1e8c case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1ea8 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1eb4 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1ebc case6 read option length and first option type/length, preserve type across SONtoHs; require type0x101.
0x1ed8 case6 read option length and first option type/length, preserve type across SONtoHs; require type0x101.
0x1ee0 case6 read option length and first option type/length, preserve type across SONtoHs; require type0x101.
0x1efc case6 read option length and first option type/length, preserve type across SONtoHs; require type0x101.
0x1f08 case6 copy challenge, MD5 init/update(time), encode bit count, MD5 padding and count updates.
0x1fe0 case6 copy challenge, MD5 init/update(time), encode bit count, MD5 padding and count updates.
0x1fe4 case6 copy challenge, MD5 init/update(time), encode bit count, MD5 padding and count updates.
0x2084 case6 encode4 digest words to session key+8; clear88-byte digest context by byte loop.
0x20ac case6 advance7/progress5, disable deadline, reset retries, callback.
0x20ec case6 timeout after2000ms returns state5.
0x2118 case6 timeout after2000ms returns state5.
0x2124 case7 build0x102 response with digest8, send type4, timestamp and clear scan settings; advance8.
0x2220 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2240 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2274 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2284 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2288 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x22a0 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x22e8 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x22f8 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2308 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2324 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2328 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2330 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2338 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2344 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x234c case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2354 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2370 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x237c case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2388 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2398 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x23c4 case8 after1000ms increment retries; ten closes/-2, otherwise state7.
0x23f0 case8 after1000ms increment retries; ten closes/-2, otherwise state7.
0x23fc case8 after1000ms increment retries; ten closes/-2, otherwise state7.
0x2410 case8 after1000ms increment retries; ten closes/-2, otherwise state7.
0x241c case9 build mode option0x301, send type6 or bypass send if link status!=5; timestamp and state10.
0x24b0 case9 build mode option0x301, send type6 or bypass send if link status!=5; timestamp and state10.
0x24e0 case9 build mode option0x301, send type6 or bypass send if link status!=5; timestamp and state10.
0x2548 case10 after1000ms ten retries apply scan security and exit; otherwise state9.
0x2574 case10 after1000ms ten retries apply scan security and exit; otherwise state9.
0x2580 case10 after1000ms ten retries apply scan security and exit; otherwise state9.
0x2590 case10 after1000ms ten retries apply scan security and exit; otherwise state9.
0x2598 Loop if !failed&&!cancel.
0x25a0 Loop if !failed&&!cancel.
0x25ac Close nonzero socket, cancellation overrides result-8; restore and return.
0x25b4 Close nonzero socket, cancellation overrides result-8; restore and return.
0x25bc Close nonzero socket, cancellation overrides result-8; restore and return.
0x25c8 Close nonzero socket, cancellation overrides result-8; restore and return.
0x25cc Close nonzero socket, cancellation overrides result-8; restore and return.
Target calls in order: _savegpr_14, OSInitMessageQueue, OSCreateAlarm, OSSetAlarmTag, OSSetAlarm, OSReceiveMessage, ATERMDiscoverAccessPoints, OSGetTime, __div2i, ATERMStartNetworkStack, OSGetTime, __div2i, OSGetTime, __div2i, SOSocket, memset, SOHtoNs, SOBind, OSGetTime, __div2i, SOClose, ATERMBuildAssociationRequest, SORecvFrom, ATERMParsePacket, OSGetTime, __div2i, OSGetTime, __div2i, SOHtoNs, memset, SOHtoNs, SOHtoNs, memset, memcpy, memset, SOHtoNs, SOHtoNs, memset, memcpy, memset, SOHtoNs, SOHtoNs, memset, memcpy, memset, SOHtoNs, SOHtoNs, memset, memcpy, memset, SOHtoNs, SOHtoNs, memset, memcpy, ATERMBuildEncryptedMessage, SOHtoNs, SOSendTo, OSGetTime, __div2i, OSGetTime, __div2i, SOClose, SORecvFrom, SONtoHs, SONtoHs, SONtoHs, ATERMAesKeyUnwrap, memcpy, SONtoHs, SONtoHs, SONtoHs, OSGetTime, __div2i, memcpy, ATERMMd5Update, ATERMMd5Update, ATERMMd5Update, OSGetTime, __div2i, memset, memset, SOHtoNs, SOHtoNs, memset, memcpy, ATERMBuildEncryptedMessage, SOHtoNs, SOSendTo, OSGetTime, __div2i, memset, SORecvFrom, SONtoHs, SONtoHs, SONtoHs, ATERMAesKeyUnwrap, memcpy, ATERMParseAssociationResponse, OSGetTime, __div2i, SOClose, memset, memset, SOHtoNs, SOHtoNs, memset, memcpy, ATERMBuildEncryptedMessage, NCDGetLinkStatus, OSGetTime, __div2i, SOHtoNs, SOSendTo, OSGetTime, __div2i, OSGetTime, __div2i, ATERMApplyScanSecuritySettings, SOClose, _restgpr_14
## ATERMRunConfigProtocol target CFG and calls
Target 951/source958 instructions, frame0x180. Earlier ult1/fz20/data-d3 trials read; no reference-index entry. Addresses below are target object offsets.
0x170c Initialize protocol state1, response/packet/session views, socket0/result-5/retries0/failure0.
0x1778 Initialize alarm/message queue, wait500ms, dispatch state0..10.
0x17e4 Initialize alarm/message queue, wait500ms, dispatch state0..10.
0x180c case1 DiscoverAccessPoints; failure exits loop; progress state3 with deadline time; advance2.
0x1814 case1 DiscoverAccessPoints; failure exits loop; progress state3 with deadline time; advance2.
0x1834 case1 DiscoverAccessPoints; failure exits loop; progress state3 with deadline time; advance2.
0x183c case1 DiscoverAccessPoints; failure exits loop; progress state3 with deadline time; advance2.
0x1868 case1 DiscoverAccessPoints; failure exits loop; progress state3 with deadline time; advance2.
0x1888 case2 StartNetworkStack; failure exits loop; extend deadline to now+10000; advance3.
0x1898 case2 StartNetworkStack; failure exits loop; extend deadline to now+10000; advance3.
0x18a0 case2 StartNetworkStack; failure exits loop; extend deadline to now+10000; advance3.
0x18d0 case2 StartNetworkStack; failure exits loop; extend deadline to now+10000; advance3.
0x18f8 case2 StartNetworkStack; failure exits loop; extend deadline to now+10000; advance3.
0x1904 case3 create UDP socket; initialize sockaddr and bind; failure-2 or advance4.
0x1920 case3 create UDP socket; initialize sockaddr and bind; failure-2 or advance4.
0x192c case3 create UDP socket; initialize sockaddr and bind; failure-2 or advance4.
0x1970 case3 create UDP socket; initialize sockaddr and bind; failure-2 or advance4.
0x197c case3 create UDP socket; initialize sockaddr and bind; failure-2 or advance4.
0x1988 case4 deadline close/-3; build association request; receive/parse packet; progress4 and advance5.
0x19b4 case4 deadline close/-3; build association request; receive/parse packet; progress4 and advance5.
0x19c8 case4 deadline close/-3; build association request; receive/parse packet; progress4 and advance5.
0x19f8 case4 deadline close/-3; build association request; receive/parse packet; progress4 and advance5.
0x1a0c case4 deadline close/-3; build association request; receive/parse packet; progress4 and advance5.
0x1a58 case4 deadline close/-3; build association request; receive/parse packet; progress4 and advance5.
0x1a60 case4 deadline close/-3; build association request; receive/parse packet; progress4 and advance5.
0x1a8c case4 deadline close/-3; build association request; receive/parse packet; progress4 and advance5.
0x1aa8 case5 construct request options in order, send broadcast encrypted type2; set lastSendTime and advance6.
0x1b94 case5 construct request options in order, send broadcast encrypted type2; set lastSendTime and advance6.
0x1be0 case5 construct request options in order, send broadcast encrypted type2; set lastSendTime and advance6.
0x1c3c case5 construct request options in order, send broadcast encrypted type2; set lastSendTime and advance6.
0x1c8c case5 construct request options in order, send broadcast encrypted type2; set lastSendTime and advance6.
0x1d18 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1d44 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1d58 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1d78 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1dac case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1dbc case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1dc0 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1dd8 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1e20 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1e30 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1e40 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1e5c case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1e60 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1e68 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1e70 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1e7c case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1e84 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1e8c case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1ea8 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1eb4 case6 deadline close/-4; receive, sequence3 and length, byte checksum; unwrap or copy payload; zero length leaves authentication.
0x1ebc case6 read option length and first option type/length, preserve type across SONtoHs; require type0x101.
0x1ed8 case6 read option length and first option type/length, preserve type across SONtoHs; require type0x101.
0x1ee0 case6 read option length and first option type/length, preserve type across SONtoHs; require type0x101.
0x1efc case6 read option length and first option type/length, preserve type across SONtoHs; require type0x101.
0x1f08 case6 copy challenge, MD5 init/update(time), encode bit count, MD5 padding and count updates.
0x1fe0 case6 copy challenge, MD5 init/update(time), encode bit count, MD5 padding and count updates.
0x1fe4 case6 copy challenge, MD5 init/update(time), encode bit count, MD5 padding and count updates.
0x2084 case6 encode4 digest words to session key+8; clear88-byte digest context by byte loop.
0x20ac case6 advance7/progress5, disable deadline, reset retries, callback.
0x20ec case6 timeout after2000ms returns state5.
0x2118 case6 timeout after2000ms returns state5.
0x2124 case7 build0x102 response with digest8, send type4, timestamp and clear scan settings; advance8.
0x2220 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2240 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2274 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2284 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2288 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x22a0 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x22e8 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x22f8 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2308 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2324 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2328 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2330 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2338 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2344 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x234c case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2354 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2370 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x237c case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2388 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x2398 case8 receive sequence5/checksum; unwrap session-key payload or copy; parse association; state9 and ssid-based mode.
0x23c4 case8 after1000ms increment retries; ten closes/-2, otherwise state7.
0x23f0 case8 after1000ms increment retries; ten closes/-2, otherwise state7.
0x23fc case8 after1000ms increment retries; ten closes/-2, otherwise state7.
0x2410 case8 after1000ms increment retries; ten closes/-2, otherwise state7.
0x241c case9 build mode option0x301, send type6 or bypass send if link status!=5; timestamp and state10.
0x24b0 case9 build mode option0x301, send type6 or bypass send if link status!=5; timestamp and state10.
0x24e0 case9 build mode option0x301, send type6 or bypass send if link status!=5; timestamp and state10.
0x2548 case10 after1000ms ten retries apply scan security and exit; otherwise state9.
0x2574 case10 after1000ms ten retries apply scan security and exit; otherwise state9.
0x2580 case10 after1000ms ten retries apply scan security and exit; otherwise state9.
0x2590 case10 after1000ms ten retries apply scan security and exit; otherwise state9.
0x2598 Loop if !failed&&!cancel.
0x25a0 Loop if !failed&&!cancel.
0x25ac Close nonzero socket, cancellation overrides result-8; restore and return.
0x25b4 Close nonzero socket, cancellation overrides result-8; restore and return.
0x25bc Close nonzero socket, cancellation overrides result-8; restore and return.
0x25c8 Close nonzero socket, cancellation overrides result-8; restore and return.
0x25cc Close nonzero socket, cancellation overrides result-8; restore and return.
Target calls in order: _savegpr_14, OSInitMessageQueue, OSCreateAlarm, OSSetAlarmTag, OSSetAlarm, OSReceiveMessage, ATERMDiscoverAccessPoints, OSGetTime, __div2i, ATERMStartNetworkStack, OSGetTime, __div2i, OSGetTime, __div2i, SOSocket, memset, SOHtoNs, SOBind, OSGetTime, __div2i, SOClose, ATERMBuildAssociationRequest, SORecvFrom, ATERMParsePacket, OSGetTime, __div2i, OSGetTime, __div2i, SOHtoNs, memset, SOHtoNs, SOHtoNs, memset, memcpy, memset, SOHtoNs, SOHtoNs, memset, memcpy, memset, SOHtoNs, SOHtoNs, memset, memcpy, memset, SOHtoNs, SOHtoNs, memset, memcpy, memset, SOHtoNs, SOHtoNs, memset, memcpy, ATERMBuildEncryptedMessage, SOHtoNs, SOSendTo, OSGetTime, __div2i, OSGetTime, __div2i, SOClose, SORecvFrom, SONtoHs, SONtoHs, SONtoHs, ATERMAesKeyUnwrap, memcpy, SONtoHs, SONtoHs, SONtoHs, OSGetTime, __div2i, memcpy, ATERMMd5Update, ATERMMd5Update, ATERMMd5Update, OSGetTime, __div2i, memset, memset, SOHtoNs, SOHtoNs, memset, memcpy, ATERMBuildEncryptedMessage, SOHtoNs, SOSendTo, OSGetTime, __div2i, memset, SORecvFrom, SONtoHs, SONtoHs, SONtoHs, ATERMAesKeyUnwrap, memcpy, ATERMParseAssociationResponse, OSGetTime, __div2i, SOClose, memset, memset, SOHtoNs, SOHtoNs, memset, memcpy, ATERMBuildEncryptedMessage, NCDGetLinkStatus, OSGetTime, __div2i, SOHtoNs, SOSendTo, OSGetTime, __div2i, OSGetTime, __div2i, ATERMApplyScanSecuritySettings, SOClose, _restgpr_14
ATTEMPT ATERMRunConfigProtocol | initialize response and session views after state1 | {"percent": 88.19559, "insns": [958, 951], "structural": 215, "diffs": 928, "pool": 0, "regress": [], "hash": "511fa936cdec"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT ATERMRunConfigProtocol | defined option type gates authentication after state-first views | {"percent": 88.07571, "insns": [955, 951], "structural": 205, "diffs": 935, "pool": 0, "regress": [], "hash": "b2c633616cbb"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT ATERMRunConfigProtocol | const response object view with session initialization after state1 | {"percent": 88.19559, "insns": [958, 951], "structural": 215, "diffs": 928, "pool": 0, "regress": [], "hash": "8cd30b63a572"} | POOL IDENTICAL up to 0 (mine=0 base=0)
## ATERMMd5Update target blocks
0x3910 countLow += length<<3 and carry to high; bufferIndex=countLow_old>>3&63.
0x3960 high += length>>29; fillLength=64-bufferIndex; length<fillLength ->0x3a6c.
0x397c..0x3a38 inline bytecopy, independent destination/source/length locals, eight-byte unroll then byte remainder. Target destination is &context->buffer8[bufferIndex] as a formal copy view, not context+indexed field stores.
0x3a38 transform context buffer;0x3a48 full input blocks;0x3a58 test offset+63<length;0x3a64 reset bufferIndex0;0x3a6c copiedBytes0 for partial input.
0x3a70..0x3b30 inline bytecopy remainder to context buffer, same eight-byte+remainder loops;0x3b30 restore/return. Calls ATERMMd5Transform(buffer), ATERMMd5Transform(input+copiedBytes). Local NETMD5Update uses memcpy with a different context byte-count API; its memcpy call boundaries do not reproduce this routine. Prior ult1/fz20 pointer-induction/macro/static-inline attempts read.
ATTEMPT ATERMMd5Update | RFC copy views with independent indices and const source | {"percent": 72.84722, "insns": [138, 144], "structural": 38, "diffs": 129, "pool": 0, "regress": [], "hash": "8411f4692343"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT ATERMMd5Update | opaque RFC copy formals cast only at indexed access | {"percent": 83.47222, "insns": [142, 144], "structural": 23, "diffs": 129, "pool": 0, "regress": [], "hash": "7db429d82edf"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT ATERMMd5Update | copy pointers bounded by destination end | {"percent": 66.80556, "insns": [124, 144], "structural": 56, "diffs": 136, "pool": 0, "regress": [], "hash": "6ef07a3886f1"} | POOL IDENTICAL up to 0 (mine=0 base=0)
## Card texture target CFG
_create_icon frame0x30,100/100insns. 0xf54 fetch dir and validate slot/file;0xf94 NULL;0xf9c fetch icons, preserve separate slot0x1fc0 and file0x40 strides;0xfc4 RGB path form row icon member and file0x15c stride, init texture then recompute address/load;0x1020 test CI;0x1028 CI init, reload icon palette offset through original icons array, form row palette member before file stride, init/loadTLUT then recompute texture address/load;0x10c0 unsupported NULL;0x10c8 return selectedtexture;0x10cc restore. Calls getCardDirState,getIconStateArray,GXInitTexObj/GXLoadTexObj or GXInitTexObjCI/GXInitTlutObj/GXLoadTlut/GXLoadTexObj.
create_banner frame0x40,106/106insns. 0x12d0 fetch dirs/icons, resolve logical index to actual file;0x132c validity check uses file column before slot row, independently reconstruct rendering icon at0x1350;0x1348 NULL;0x1364 RGB init/load with separately held texture rowbase/file stride;0x13b4 CI guard;0x13bc CI init, reload paletteoffset using original icons array, palette init/load and texture load;0x1444 recompute returned banner address;0x1460 restore. No strings or data sections. Earlier ult3/partial-oct2d/partial-oct2f/card logs exclude cached complete cell pointer, cached row pointer and same typed-address accessor trials.
ATTEMPT _create_icon__Q33ipl5scene17MemoryCardManagerFUcsl | const directory and icon metadata views at GX boundaries | {"percent": 87.55, "insns": [100, 100], "structural": 16, "diffs": 37, "pool": 0, "regress": [], "hash": "9b42af64c201"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT _create_icon__Q33ipl5scene17MemoryCardManagerFUcsl | render metadata as mutable typed reference | {"percent": 87.55, "insns": [100, 100], "structural": 16, "diffs": 37, "pool": 0, "regress": [], "hash": "1d91ba26ea93"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT _create_icon__Q33ipl5scene17MemoryCardManagerFUcsl | linear icon records using actual slot stride and typed field access | {"percent": 83.89, "insns": [97, 100], "structural": 25, "diffs": 79, "pool": 0, "regress": [], "hash": "44d98c9cfa18"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT _create_icon__Q33ipl5scene17MemoryCardManagerFUcsl | typed member pointer accessor for texture and palette | {"percent": 83.75, "insns": [99, 100], "structural": 20, "diffs": 62, "pool": 0, "regress": [], "hash": "734552180bf8"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT create_banner__Q33ipl5scene17MemoryCardManagerFUcs | const directory and icon metadata views at GX boundaries | {"percent": 90.42453, "insns": [106, 106], "structural": 15, "diffs": 70, "pool": 0, "regress": [], "hash": "0535043cad90"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT create_banner__Q33ipl5scene17MemoryCardManagerFUcs | render metadata as mutable typed reference | {"percent": 90.42453, "insns": [106, 106], "structural": 15, "diffs": 70, "pool": 0, "regress": [], "hash": "ed6af8d05486"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT create_banner__Q33ipl5scene17MemoryCardManagerFUcs | linear icon records using actual slot stride and typed field access | {"percent": 84.66038, "insns": [103, 106], "structural": 23, "diffs": 96, "pool": 0, "regress": [], "hash": "9bc6859408b7"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT create_banner__Q33ipl5scene17MemoryCardManagerFUcs | typed member pointer accessor for texture and palette | {"percent": 84.57547, "insns": [105, 106], "structural": 22, "diffs": 87, "pool": 0, "regress": [], "hash": "3924c36bc132"} | POOL IDENTICAL up to 0 (mine=0 base=0)
## setElementBuffer target blocks
0x12e4 initialize pooled BSS base, this and count0;0x1308 clear elements0x1fe;0x1318 clear second candidate region0x1fe;0x1328 bind elements and candidates, loop guard.
0x1334 store loaded candidate, getPredictLanguage virtual0x104;0x1358 language1 tests digits0x30..0x39;0x136c add0xf300;0x137c test lowercase then uppercase;0x139c reload and add0xf300;0x13ac increment count;0x13b0 narrowcount16, read candidate, require nonzero/count<255;0x13cc restore and returncount. Frame0x20,65/65. Exact loop CFG/calls agree; target one pooled BSS base while current separately constructs ElementBuffer/CandidatesBuffer symbols. All7680data bytes already exact. No legitimate alias outside array bounds introduced. Prior tiZi/fz7/structural/ult2 view/index/declaration trials read.
ATTEMPT setElementBuffer__Q39textinput8tistring6WithZiFv | bounded array references for both element and candidate views | {"percent": 88.66154, "insns": [65, 65], "structural": 7, "diffs": 21, "pool": 0, "regress": [], "hash": "ae9552f34c59"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT setElementBuffer__Q39textinput8tistring6WithZiFv | candidate-first for loop with explicit capacity exit | {"percent": 80.95385, "insns": [65, 65], "structural": 12, "diffs": 50, "pool": 0, "regress": [], "hash": "ae1178d23992"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT setElementBuffer__Q39textinput8tistring6WithZiFv | explicit digit rejection then separate lowercase and uppercase conversion | {"percent": 67.87692, "insns": [69, 65], "structural": 26, "diffs": 58, "pool": 0, "regress": [], "hash": "4c9904d449ce"} | POOL IDENTICAL up to 0 (mine=0 base=0)
## Decolated inputChar target blocks
0x6cc sentinel0xfffe exits;0x6f8 initialize five output chars;0x710 translation1/2 selects Kana, otherwise0x7cc.
0x720 reset Kana output and test newline;0x73c LookAhead;0x754 flush queue0xffff;0x770 lowercase+PutChar;0x78c count/char-copy;0x798 GetChar;0x7ac byte-narrow count test;0x7b8 lookahead output.
0x7cc mode3 or direct;0x7d4 original inline literal converter clears output, retains newline comparison, indexed append count0->1 and terminator then clears preview;0x80c direct literal;0x818 setCandidate0;0x830 getSelected;0x85c insert when selected start=end then cursor+=count;0x890 replace selection and cursor=start+count;0x8c4 copy start to end;0x8cc restore. Frame0x30,target136/current125. Target dead newline comparison has no branch; prior fz3 R5..R11 builders/newline-reset aliases failed. New trials test dispatch structure and meaningful shared literal-copy boundaries, never a no-op newline argument.
ATTEMPT inputChar__Q39textinput8tistring9DecolatedFw | bounded single-character conversion with counted output loop | {"percent": 90.757355, "insns": [126, 136], "structural": 17, "diffs": 73, "pool": 0, "regress": [], "hash": "f7321d864f40"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT inputChar__Q39textinput8tistring9DecolatedFw | structured mode switch preserving Kana and literal converter paths | {"percent": 86.64706, "insns": [129, 136], "structural": 24, "diffs": 126, "pool": 0, "regress": [], "hash": "ced7330165ae"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT inputChar__Q39textinput8tistring9DecolatedFw | terminated literal pair copied as bounded UTF16 sequence | {"percent": 90.132355, "insns": [125, 136], "structural": 18, "diffs": 73, "pool": 0, "regress": [], "hash": "069a4900344f"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT ATERMRunConfigProtocol | decoded reply view plus actual session challenge and digest fields | {"percent": 85.872765, "insns": [968, 951], "structural": 268, "diffs": 944, "pool": 0, "regress": [], "hash": "752ce99014b1"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT ATERMRunConfigProtocol | configuration struct pointer owns reply and packet field views | {"percent": 88.19559, "insns": [958, 951], "structural": 215, "diffs": 928, "pool": 0, "regress": [], "hash": "03a9e0281617"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT ATERMRunConfigProtocol | byte reply storage with typed decoding only at packet boundaries | {"percent": 87.1346, "insns": [965, 951], "structural": 249, "diffs": 944, "pool": 0, "regress": [], "hash": "cc914ad7a7b9"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT _create_icon__Q33ipl5scene17MemoryCardManagerFUcsl | bounded icon row reference before frame format selection | {"percent": 87.55, "insns": [100, 100], "structural": 16, "diffs": 37, "pool": 0, "regress": [], "hash": "359dcec94cc8"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT _create_icon__Q33ipl5scene17MemoryCardManagerFUcsl | return each format texture through its post-initialization local | {"percent": 82.75, "insns": [101, 100], "structural": 23, "diffs": 69, "pool": 0, "regress": [], "hash": "63b2d32d4235"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT _create_icon__Q33ipl5scene17MemoryCardManagerFUcsl | writable destination manager reference separated from icon metadata | {"percent": 87.55, "insns": [100, 100], "structural": 16, "diffs": 37, "pool": 0, "regress": [], "hash": "7b24a74470f4"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT create_banner__Q33ipl5scene17MemoryCardManagerFUcs | bounded icon row reference before frame format selection | {"percent": 90.42453, "insns": [106, 106], "structural": 15, "diffs": 70, "pool": 0, "regress": [], "hash": "0c9b67da5e48"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT create_banner__Q33ipl5scene17MemoryCardManagerFUcs | return each format texture through its post-initialization local | {"percent": 79.99056, "insns": [110, 106], "structural": 30, "diffs": 96, "pool": 0, "regress": [], "hash": "ffdf0a10fa73"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT create_banner__Q33ipl5scene17MemoryCardManagerFUcs | writable destination manager reference separated from icon metadata | {"percent": 90.42453, "insns": [106, 106], "structural": 15, "diffs": 70, "pool": 0, "regress": [], "hash": "80e89eb4b927"} | POOL IDENTICAL up to 0 (mine=0 base=0)
## ATERM explicit inline-boundary audit
Build flags end with -inline off, which explains earlier helper-call results. Test only this unit configuration with explicit/auto inlining and the ordinary RFC-shaped byte copy helper; every other unit flag stays unchanged. A change can survive only if all other function scores and code/data measures do not drop.
ATTEMPT ATERMMd5Update | ordinary byte copy helper with inline on | {"percent": 90.43056, "insns": [140, 144], "structural": 33, "diffs": 122, "pool": 0, "regress": [], "hash": "faaf1e4c49c4"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT ATERMMd5Update | ordinary byte copy helper with inline auto | {"percent": 90.43056, "insns": [140, 144], "structural": 33, "diffs": 122, "pool": 0, "regress": [], "hash": "faaf1e4c49c4"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT ATERMMd5Update | ordinary byte copy helper with inline smart | {"percent": 90.43056, "insns": [140, 144], "structural": 33, "diffs": 122, "pool": 0, "regress": [], "hash": "faaf1e4c49c4"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT ATERMMd5Update | mutable byte input RFC prototype under explicit inline | {"percent": 91.68056, "insns": [139, 144], "structural": 32, "diffs": 115, "pool": 0, "regress": [], "hash": "25c72e25014e"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT ATERMMd5Update | opaque void copy prototype with indexed byte views under explicit inline | {"percent": 97.84722, "insns": [144, 144], "structural": 2, "diffs": 19, "pool": 0, "regress": [], "hash": "5172686bc07f"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT ATERMMd5Update | opaque copy prototype with mutable input under explicit inline | {"percent": 97.84722, "insns": [144, 144], "structural": 2, "diffs": 19, "pool": 0, "regress": [], "hash": "9f8629f26ad5"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT ATERMMd5Update | opaque void copy prototype with typed local views under explicit inline | {"percent": 72.56944, "insns": [138, 144], "structural": 38, "diffs": 127, "pool": 0, "regress": [], "hash": "e97c4116d2f4"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT ATERMMd5Update | byte copy source formal precedes destination under explicit inline | {"percent": 90.43056, "insns": [140, 144], "structural": 33, "diffs": 122, "pool": 0, "regress": [], "hash": "0cc678ab6cdb"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT ATERMMd5Update | opaque copy source formal precedes destination under explicit inline | {"percent": 97.84722, "insns": [144, 144], "structural": 2, "diffs": 19, "pool": 0, "regress": [], "hash": "7e12456ee6d0"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT ATERMMd5Update | actual u8* input formal and opaque inline copy | {"percent": 100.0, "insns": [144, 144], "structural": 0, "diffs": 0, "pool": 0, "regress": [], "hash": "a0a1a0da6371"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT ATERMMd5Update | actual const u8* input formal and opaque inline copy | {"percent": 95.701385, "insns": [144, 144], "structural": 16, "diffs": 43, "pool": 0, "regress": [], "hash": "41b5e6eddc0e"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT ATERMMd5Update | actual const void* input formal and opaque inline copy | {"percent": 93.548615, "insns": [144, 144], "structural": 18, "diffs": 61, "pool": 0, "regress": [], "hash": "7e12f77bfc92"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT ATERMMd5Update | actual u8* input formal and opaque inline copy | {"percent": 100.0, "insns": [144, 144], "structural": 0, "diffs": 0, "pool": 0, "regress": [], "hash": "a0a1a0da6371"} | POOL IDENTICAL up to 0 (mine=0 base=0)
RETAIN exact ATERMMd5Update. 144/144 instructions, objdiff100 and diffs0. RFC byte copy uses opaque formals and mutable u8 input formal; explicit inlining required. No other function score dropped. All other trial sources restored before handoff.
ATTEMPT _create_icon__Q33ipl5scene17MemoryCardManagerFUcsl | single GX object field array decay icon | {"percent": 87.55, "insns": [100, 100], "structural": 16, "diffs": 37, "pool": 0, "regress": [], "hash": "7fc379d6b1ff"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT _create_icon__Q33ipl5scene17MemoryCardManagerFUcsl | single GX object field array decay iconTlut | {"percent": 87.55, "insns": [100, 100], "structural": 16, "diffs": 37, "pool": 0, "regress": [], "hash": "242481a3e099"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT _create_icon__Q33ipl5scene17MemoryCardManagerFUcsl | single GX object field array decay icon,iconTlut | {"percent": 87.55, "insns": [100, 100], "structural": 16, "diffs": 37, "pool": 0, "regress": [], "hash": "dfffb5b7be9a"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT create_banner__Q33ipl5scene17MemoryCardManagerFUcs | single GX object field array decay banner | {"percent": 90.42453, "insns": [106, 106], "structural": 15, "diffs": 70, "pool": 0, "regress": [], "hash": "1fdfd74c6c6e"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT create_banner__Q33ipl5scene17MemoryCardManagerFUcs | single GX object field array decay bannerTlut | {"percent": 90.42453, "insns": [106, 106], "structural": 15, "diffs": 70, "pool": 0, "regress": [], "hash": "ec1eb10c3292"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT create_banner__Q33ipl5scene17MemoryCardManagerFUcs | single GX object field array decay banner,bannerTlut | {"percent": 90.42453, "insns": [106, 106], "structural": 15, "diffs": 70, "pool": 0, "regress": [], "hash": "8b67d38fcbcf"} | POOL IDENTICAL up to 0 (mine=0 base=0)
ATTEMPT ATERMMd5Update | readable readonly copy helper and removal of obsolete local | {"percent": 100.0, "insns": [144, 144], "structural": 0, "diffs": 0, "pool": 0, "regress": [], "hash": "404e45ea9e55"} | POOL IDENTICAL up to 0 (mine=0 base=0)
## Data ownership audit
MemoryCardManager has no target data objects; tiString all288/288, tiZiString all7680/7680 exact. ATERM .bss8160,.rodata10280,.sbss80,.sdata56,.sdata2=8 all100%; .data280 remains92.14286%, eleven switch-table relocations into open RunConfigProtocol. All generated-table names already paired, and no extent/name correction is supported. No symbols.txt edits.
AUDIT ATERMRunConfigProtocol | 88.19559% | 6 distinct successfully built source attempts.
AUDIT ATERMMd5Update | 100.0% | 14 distinct successfully built source attempts.
AUDIT _create_icon__Q33ipl5scene17MemoryCardManagerFUcsl | 87.55% | 10 distinct successfully built source attempts.
AUDIT create_banner__Q33ipl5scene17MemoryCardManagerFUcs | 90.42453% | 10 distinct successfully built source attempts.
AUDIT inputChar__Q39textinput8tistring9DecolatedFw | 90.132355% | 3 distinct successfully built source attempts.
AUDIT setElementBuffer__Q39textinput8tistring6WithZiFv | 90.33846% | 3 distinct successfully built source attempts.
All rejected source/header/config trials restored. Retained only exact MD5 helper/signature and ATERM inline flag. Original untracked ult8b log untouched. No other unit function score dropped from current baseline.
Independent original-source object compiled into /tmp with original -inline off flags: instruction-exact 16 -> 17; new ['ATERMMd5Update']; lost []. Worktree source and final build unmodified.
## Final full non-quick gate
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/scene/setting/ATERM] pool: IDENTICAL
[src/scene/setting/ATERM] objdiff: code 11036/19204 data 18584/18864 functions 18/26 fuzzy 97.0367 linked code 0
[src/scene/setting/ATERM] instruction-exact functions: 17/26
[src/scene/setting/ATERM] section .bss size 8160 match 100.0
[src/scene/setting/ATERM] section .data size 280 match 92.14286
[src/scene/setting/ATERM] section .rodata size 10280 match 100.0
[src/scene/setting/ATERM] section .sbss size 80 match 100.0
[src/scene/setting/ATERM] section .sdata size 56 match 100.0
[src/scene/setting/ATERM] section .sdata2 size 8 match 100.0
[src/scene/setting/ATERM] section .text size 19204 match 97.03666
[src/scene/setting/ATERM] below 100: ATERMStartNetworkStack 97.91558
[src/scene/setting/ATERM] below 100: ATERMDiscoverAccessPoints 95.304184
[src/scene/setting/ATERM] below 100: ATERMBuildEncryptedMessage 99.791664
[src/scene/setting/ATERM] below 100: ATERMBuildAssociationRequest 93.44361
[src/scene/setting/ATERM] below 100: ATERMParseAssociationResponse 99.56204
[src/scene/setting/ATERM] below 100: ATERMRunConfigProtocol 88.19559
[src/scene/setting/ATERM] below 100: ATERMi_AutoConfigThread 94.75
[src/scene/setting/ATERM] below 100: ATERMAesExpandEncryptKey 98.94403
[src/scene/setting/ATERM] baseline: code 10460/19204 data 18584 functions 17 fuzzy 96.7746
[src/scene/memoryCard/iplMemoryCardManager] pool: IDENTICAL
[src/scene/memoryCard/iplMemoryCardManager] objdiff: code 2572/5396 data None/None functions 18/26 fuzzy 97.8836 linked code 0
[src/scene/memoryCard/iplMemoryCardManager] instruction-exact functions: 18/26
[src/scene/memoryCard/iplMemoryCardManager] section .text size 5396 match 97.88362
[src/scene/memoryCard/iplMemoryCardManager] below 100: isMoveEnable__Q33ipl5scene17MemoryCardManagerFUcUlPl 99.830505
[src/scene/memoryCard/iplMemoryCardManager] below 100: isCopyEnable__Q33ipl5scene17MemoryCardManagerFUcUlPl 99.830505
[src/scene/memoryCard/iplMemoryCardManager] below 100: isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs 92.30769
[src/scene/memoryCard/iplMemoryCardManager] below 100: update_file_array__Q33ipl5scene17MemoryCardManagerFUc 99.72222
[src/scene/memoryCard/iplMemoryCardManager] below 100: _create_icon__Q33ipl5scene17MemoryCardManagerFUcsl 87.55
[src/scene/memoryCard/iplMemoryCardManager] below 100: getComment__Q33ipl5scene17MemoryCardManagerFUcsi 98.94309
[src/scene/memoryCard/iplMemoryCardManager] below 100: create_banner__Q33ipl5scene17MemoryCardManagerFUcs 90.42453
[src/scene/memoryCard/iplMemoryCardManager] below 100: getBlocks__Q33ipl5scene17MemoryCardManagerFUcs 92.0
[src/scene/memoryCard/iplMemoryCardManager] baseline: code 2572/5396 data None functions 18 fuzzy 97.8836
[src/keyboard/tiString] pool: IDENTICAL
[src/keyboard/tiString] objdiff: code 4632/5176 data 288/288 functions 41/42 fuzzy 98.9629 linked code 0
[src/keyboard/tiString] instruction-exact functions: 41/42
[src/keyboard/tiString] section .data size 288 match 100.0
[src/keyboard/tiString] section .text size 5176 match 98.962906
[src/keyboard/tiString] below 100: inputChar__Q39textinput8tistring9DecolatedFw 90.132355
[src/keyboard/tiString] baseline: code 4632/5176 data 288 functions 41 fuzzy 98.9629
[src/keyboard/tiZiString] pool: IDENTICAL
[src/keyboard/tiZiString] objdiff: code 3136/5504 data 7680/7680 functions 26/29 fuzzy 98.2645 linked code 0
[src/keyboard/tiZiString] instruction-exact functions: 26/29
[src/keyboard/tiZiString] section .bss size 7296 match 100.0
[src/keyboard/tiZiString] section .data size 328 match 100.0
[src/keyboard/tiZiString] section .rodata size 56 match 100.0
[src/keyboard/tiZiString] section .text size 5504 match 98.264534
[src/keyboard/tiZiString] below 100: clearCandidates__Q39textinput8tistring6WithZiFv 93.28395
[src/keyboard/tiZiString] below 100: update__Q39textinput8tistring6WithZiFv 97.273544
[src/keyboard/tiZiString] below 100: setElementBuffer__Q39textinput8tistring6WithZiFv 90.33846
[src/keyboard/tiZiString] baseline: code 3136/5504 data 7680 functions 26 fuzzy 98.2645
regressions vs baseline: 0
global matched_code_percent: 91.93089 -> 91.95013
global fuzzy_match_percent: 99.71608 -> 99.71777
global complete_code_percent: 74.84181 -> 74.84181
global matched_data_percent: 99.77803 -> 99.77803
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
note: config touched: configure.py (orchestrator reviews every config/symbols change)
GATE PASS
```
Source review: only ATERMMd5Update byte-copy helper/signature, its RunConfigProtocol byte-view call, and the ATERM inline setting are retained. No other source/header/symbol edit remains. Exact MD5 objdiff100,144/144,diffs0; parent verification still required.

Some files were not shown because too many files have changed in this diff Show More