Compare commits

..

1 Commits

Author SHA1 Message Date
coah
d0694d7374 Link matched USB mass-storage block routines 2026-10-02 05:33:56 -05:00
47 changed files with 570 additions and 20428 deletions

View File

@@ -2,8 +2,6 @@ name: README progress
# runs on the self-hosted runner on cole's server so it doesn't use hosted minutes.
# only push/schedule/manual triggers, never pull_request, so fork PRs can't reach this machine.
# README progress is written inside each landing commit by the orchestrator, so this job never commits;
# it only rebuilds and publishes the current numbers to the job summary.
on:
push:
branches: [main]
@@ -17,7 +15,7 @@ concurrency:
cancel-in-progress: true
permissions:
contents: read
contents: write
jobs:
progress:
@@ -50,8 +48,15 @@ jobs:
- name: Report
run: build/tools/objdiff-cli report generate -p . -o build/43U/report.json -f json
- name: Summary
- name: Update README
run: python3 tools/update_readme_progress.py build/43U/report.json README.md "$GITHUB_SHA"
- name: Commit
run: |
python3 tools/update_readme_progress.py build/43U/report.json README.md "$GITHUB_SHA"
sed -n '/progress:start/,/progress:end/p' README.md >> "$GITHUB_STEP_SUMMARY"
git checkout -- README.md
if git diff --quiet README.md; then exit 0; fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add README.md
git commit -m "docs: update progress [skip ci]"
git pull --rebase origin main || { git rebase --abort; echo "main moved, next run will update"; exit 0; }
git push origin HEAD:main

View File

@@ -53,9 +53,9 @@ Progress
<!-- progress:start -->
| Decompiled | Matched | Linked | Data |
|:---:|:---:|:---:|:---:|
| 99.55% | 90.33% | 69.37% | 99.37% |
| 99.52% | 89.21% | 67.01% | 99.37% |
units 950/1027 complete, functions 12343/12563 matched.
units 943/1027 complete, functions 12305/12563 matched.
decompiled = code with a C/C++ implementation (objdiff fuzzy), matched = byte-exact code, linked = code actually linked into the DOL, data = byte-exact data
<!-- progress:end -->

View File

@@ -44,7 +44,7 @@ UpdateDiskID = .bss:0x810ADF60; // type:object size:0x20 align:32 data:4byte
TicketViewsBuf = .bss:0x810ADF80; // type:object size:0x3600 scope:local align:32
Flags0 = .bss:0x810B1580; // type:object size:0x800 scope:local
Flags1 = .bss:0x810B1D80; // type:object size:0x800 scope:local
Thread = .bss:0x810B2580; // type:object size:0x318 scope:local
Thread = .bss:0x810B2580; // type:object size:0x1318 scope:local
UpdateHeader0 = .bss:0x810B38A0; // type:object size:0x20 scope:local
UpdateHeader1 = .bss:0x810B38C0; // type:object size:0x20 scope:local
viewsBuf = .bss:0x810B38E0; // type:object size:0x3600 scope:local
@@ -4576,9 +4576,9 @@ enqueueNotice__Q33ipl5scene15SDChannelSelectFUlUlUl = .text:0x813DB254; // type:
enqueueLoadNotice__Q33ipl5scene15SDChannelSelectFv = .text:0x813DB308; // type:function size:0x5C
enqueuePageNotice__Q33ipl5scene15SDChannelSelectFv = .text:0x813DB364; // type:function size:0x5C
enqueueResultNotice__Q33ipl5scene15SDChannelSelectFUl = .text:0x813DB3C0; // type:function size:0x5C
enqueueChannelNotice__Q33ipl5scene15SDChannelSelectFUxUl = .text:0x813DB41C; // type:function size:0x5C
enqueueChannelNotice__Q33ipl5scene15SDChannelSelectFUlUlUlUl = .text:0x813DB41C; // type:function size:0x5C
enqueueMoveNotice__Q33ipl5scene15SDChannelSelectFUlUlUl = .text:0x813DB478; // type:function size:0x5C
enqueueStateNotice__Q33ipl5scene15SDChannelSelectFUxUl = .text:0x813DB4D4; // type:function size:0x5C
enqueueStateNotice__Q33ipl5scene15SDChannelSelectFUlUlUlUl = .text:0x813DB4D4; // type:function size:0x5C
enqueueErrorNotice__Q33ipl5scene15SDChannelSelectFUlUl = .text:0x813DB530; // type:function size:0x5C
enqueueCommandNotice__Q33ipl5scene15SDChannelSelectFUlUlUl = .text:0x813DB58C; // type:function size:0x60
enqueueDeleteNotice__Q33ipl5scene15SDChannelSelectFUlUlUl = .text:0x813DB5EC; // type:function size:0x60
@@ -4814,7 +4814,7 @@ reset_gui__Q33ipl5scene8SDButtonFv = .text:0x813E9BC0; // type:function size:0x1
startPointEvent__Q33ipl5scene8SDButtonFPCcPQ33ipl10controller9Interface = .text:0x813E9D08; // type:function size:0x258
startLeftEvent__Q33ipl5scene8SDButtonFPCc = .text:0x813E9F60; // type:function size:0x220
isActive__Q33ipl5scene8SDButtonCFv = .text:0x813EA180; // type:function size:0xC
setEventHandler__Q33ipl5scene8SDButtonFPQ23gui12EventHandler = .text:0x813EA18C; // type:function size:0x14
setEventHandler__Q33ipl5scene8SDButtonFPQ23gui12EventHandlerPQ23gui12EventHandler = .text:0x813EA18C; // type:function size:0x14
setText__Q33ipl5scene8SDButtonFPCcPCw = .text:0x813EA1A0; // type:function size:0xB4
animation__Q33ipl5scene8SDButtonFi = .text:0x813EA254; // type:function size:0x1C4
initArrowAppearance__Q33ipl5scene8SDButtonFib = .text:0x813EA418; // type:function size:0xD0

View File

@@ -742,7 +742,7 @@ config.libs = [
Object(Matching, "scene/board/iplBoardObject.cpp"),
Object(Matching, "scene/board/iplBoardSD.cpp"),
Object(Matching, "scene/board/iplUrlProcessor.cpp"),
Object(Matching, "scene/board/iplFocusObject.cpp"),
Object(Equivalent, "scene/board/iplFocusObject.cpp"),
]
),
IPLSection("button", [
@@ -989,7 +989,7 @@ config.libs = [
Object(NonMatching, "clib/zi8cgetc.c"),
Object(Matching, "clib/zi8cinfo.c"),
Object(Matching, "clib/zi8copy.c"),
Object(Matching, "clib/zi8dawg.c"),
Object(NonMatching, "clib/zi8dawg.c"),
Object(Matching, "clib/zi8getc.c"),
Object(NonMatching, "clib/zi8getc2.c"),
Object(Matching, "clib/zi8getSW.c"),
@@ -1080,7 +1080,7 @@ config.libs = [
Object(Matching, "nwc24/NWC24Stream.c"),
Object(Matching, "nwc24/NWC24Parser.c"),
Object(NonMatching, "nwc24/NWC24MsgCommit.c"),
Object(Matching, "nwc24/NWC24MsgRead.c"),
Object(NonMatching, "nwc24/NWC24MsgRead.c"),
Object(NonMatching, "nwc24/NWC24MsgSubject.c"),
Object(Matching, "nwc24/NWC24Schedule.c"),
Object(NonMatching, "nwc24/NWC24DateParser.c"),
@@ -1212,7 +1212,7 @@ config.libs = [
Object(NonMatching, "exif/exif_parse.c"),
Object(Matching, "reschange/iqdec_resolution_change_a3.c"),
Object(Matching, "reschange/idct_resolution_change_var.c"),
Object(NonMatching, "reschange/idct_resolution_change_var.c"),
Object(NonMatching, "texturecvtr/Texture_MCUtoY8U8V8.c"),
Object(NonMatching, "texturecvtr/Texture_MCUtoRGB565.c"),
@@ -1693,7 +1693,7 @@ config.libs = [
Object(NonMatching, "fa/pdm_partition.c"),
Object(NonMatching, "fa/pf_cache.c"),
Object(Matching, "fa/pf_cluster.c"),
Object(Matching, "fa/pf_dir.c"),
Object(NonMatching, "fa/pf_dir.c"),
Object(Matching, "fa/pf_entry.c"),
Object(NonMatching, "fa/pf_entry_iterator.c"),
Object(NonMatching, "fa/pf_fat.c"),
@@ -1704,7 +1704,7 @@ config.libs = [
Object(Matching, "fa/pf_file.c"),
Object(Matching, "fa/pf_path.c"),
Object(Matching, "fa/pf_sector.c"),
Object(Matching, "fa/pf_volume.c"),
Object(NonMatching, "fa/pf_volume.c"),
Object(Matching, "fa/pf_volume_apiadd.c"),
Object(Matching, "fa/pf_cp932.c"),
Object(Matching, "fa/pf_api_util.c"),

View File

@@ -143,11 +143,7 @@ namespace ipl {
#else
VEC3 operator-(const VEC3& rhs) const { return VEC3(x - rhs.x, y - rhs.y, z - rhs.z); }
#endif
#ifdef IPL_FOCUS_OBJECT_CPP
VEC3 operator*(f32 val) const;
#else
VEC3 operator*(f32 val) const { return VEC3(x * val, y * val, z * val); }
#endif
VEC3 operator*(f64 val) const {
nw4r::math::VEC3 vecOut;
VEC3Scale(&vecOut, this, (f32)val);

View File

@@ -53,7 +53,24 @@ namespace ipl {
mBScroller.init();
}
BOOL calc(bool canScroll);
BOOL calc(bool canScroll) __attribute__((never_inline)) /*for now*/ {
BOOL result = FALSE;
if (canScroll) {
if (mBScroller.calc()) {
result = TRUE;
}
}
mScroller.calc();
f32 movable = mScroller.movable_pos(mBScroller.getSpeed());
mScroller.addScroll(movable);
mBScroller.addSoundFreq(movable);
return result;
}
BOOL is_busy() const {
BOOL result = TRUE;

View File

@@ -102,7 +102,12 @@ namespace ipl {
static const char* getButtonName(int button) { return smButtonName[button]; }
#endif
void setEventHandler(::gui::EventHandler * event);
#ifdef IPL_SD_CHANNEL_SELECT_CPP
void setEventHandler(::gui::EventHandler * event,
::gui::EventHandler * optOutEvent = NULL);
#else
void setEventHandler(::gui::EventHandler * event, ::gui::EventHandler * optOutEvent);
#endif
void setText(const char* paneName, u32 msgId);
void setText(const char* paneName, const wchar_t* text);

View File

@@ -203,9 +203,9 @@ namespace ipl {
bool enqueueLoadNotice();
bool enqueuePageNotice();
bool enqueueResultNotice(u32 result);
bool enqueueChannelNotice(u64 titleId, u32 value);
bool enqueueChannelNotice(u32 controller, u32 page, u32 index, u32 value);
bool enqueueMoveNotice(u32 controller, u32 page, u32 index);
bool enqueueStateNotice(u64 titleId, u32 state);
bool enqueueStateNotice(u32 controller, u32 page, u32 index, u32 state);
bool enqueueErrorNotice(u32 page, u32 index);
bool enqueueCommandNotice(u32 page, u32 index, u32 command);
bool enqueueDeleteNotice(u32 controller, u32 page, u32 index);

View File

@@ -368,20 +368,20 @@ namespace nw4r {
u32 sheetOffsetsScratchSize;
sheetGlyphCount = font->glgr.inner.sheetGlyphCount; // 0x1C
dataBlockCount = font->hdr.dataBlocks; // 0x0E
sheetGlyphCount = font->glgr.inner.sheetGlyphCount; // 0x1C
// countName = font->glgr.inner.nameCount;
countSheet = font->glgr.inner.sheetCount;
// count0A = font->glgr.inner.smthCount_0x0a;
// count0C = font->glgr.inner.smthCount_0x0c;
sheetOffsetsSize = ROUNDUP(countSheet * sizeof(u16), 4);
sheetOffsetsScratch = (u16*)ROUNDDOWN((u32)((u8*)font + ctx->remWorkSpace()) - sheetOffsetsSize, 2);
stepSheetFlags = detail::CalcSizeFlagSet(countSheet);
flagsSheetsOff = detail::CalcOffsetSheetFlags(font->glgr.inner.nameCount, countSheet, font->glgr.inner.smthCount_0x0a,
font->glgr.inner.smthCount_0x0c);
flagsSheets = (const u32*)font + (flagsSheetsOff >> 2);
sheetOffsetsSize = ROUNDUP(countSheet * sizeof(u16), 4);
sheetOffsetsScratch = (u16*)ROUNDDOWN((u32)((u8*)font + ctx->remWorkSpace()) - sheetOffsetsSize, 2);
pGlgr = &font->glgr;
ENSURE_WORK_HAS_SIZE(ctx, glgrEnd - (u8*)font + sheetOffsetsSize);
// if (ctx->pWorkEnd - workCurr < fontSizeToEndOfGlgr + sheetOffsetsSize) {

View File

@@ -15,13 +15,9 @@ static s8 clampS8(s32 v) {
void TMCJPEGDEC_IdctBlock4x4(s32* block, u8* conv_row_ptr, u16 pitch, s32 zigzag) {
s32 bd;
s32 d;
s32 c;
s32 a;
s32 cd;
s32 oddrot;
s32 evsum;
s32 rot;
s32 d;
s32 b;
s32* sp;
@@ -30,41 +26,57 @@ void TMCJPEGDEC_IdctBlock4x4(s32* block, u8* conv_row_ptr, u16 pitch, s32 zigzag
s32 tmp[64];
s32 i;
s32 evsum, rot, oddrot, cd;
sp = block + 24;
dp = tmp + 24;
for (i = 0; i < 4; i++) {
s32 a, b, c, d;
s32 odddiff, bd, evsum, cd, rot, oddrot;
a = sp[0];
b = sp[1];
c = sp[2];
d = sp[3];
odddiff = b - d;
for (i = 0; i < 2; i++) {
a = sp[0]; // 0x0
b = sp[1]; // 0x4
c = sp[2]; // 0x8
d = sp[3]; // 0xc
bd = b + d;
evsum = a + c;
cd = a - c;
rot = (odddiff * 0xB5) >> 8;
oddrot = rot + bd;
dp[0] = evsum + oddrot;
dp[1] = cd + rot;
dp[2] = cd - rot;
oddrot = (0xB5 * (sp[1] - sp[3]) >> 8) + bd;
rot = (0xB5 * (sp[1] - sp[3])) >> 8;
dp[1] = (a - c) + rot;
dp[2] = (a - c) - rot;
dp[3] = evsum - oddrot;
sp -= 8;
dp -= 8;
dp[0] = evsum + oddrot;
b = sp[-7]; // -0x1c
d = sp[-5]; // -0x14
bd = b + d;
rot = ((b - d) * 0xB5) >> 8;
oddrot = rot + bd;
a = sp[-8]; // -0x20
c = sp[-6]; // -0x18
dp[-8] = (a + c) + oddrot;
dp[-7] = (a - c) + rot;
dp[-6] = (a - c) - rot;
dp[-5] = (a + c) - oddrot;
sp -= 16;
dp -= 16;
}
{
u32 idx = 3;
sp = tmp + 3;
for (i = 0; i < 4; i++) {
u8* bp = conv_row_ptr + idx;
a = tmp[idx] + 0x40000;
b = tmp[idx + 8];
d = tmp[idx + 24];
c = tmp[idx + 16];
a = sp[0] + 0x40000;
b = sp[8];
d = sp[24];
c = sp[16];
evsum = a + c;
cd = a - c;
@@ -78,6 +90,7 @@ void TMCJPEGDEC_IdctBlock4x4(s32* block, u8* conv_row_ptr, u16 pitch, s32 zigzag
bp[pitch * 2] = clampU8((cd - rot) >> 11);
bp[pitch * 4 - pitch] = clampU8((evsum - oddrot) >> 11);
sp--;
idx -= 1;
}
}
@@ -118,37 +131,41 @@ void TMCJPEGDEC_IdctBlock4x4_Col(s32* sp, u8* conv_row_ptr, u16 pitch, s32 zigza
s32 a, b, c, d;
s32 evsum, evdiff, oddsum, odddiff, rot, oddrot;
for (i = 0; i < 4; i++) {
a = src[0];
b = src[1];
c = src[2];
d = src[3];
odddiff = b - d;
oddsum = b + d;
evsum = a + c;
evdiff = a - c;
rot = (odddiff * 0xB5) >> 8;
oddrot = rot + oddsum;
dst[0] = evsum + oddrot;
dst[1] = evdiff + rot;
dst[2] = evdiff - rot;
dst[3] = evsum - oddrot;
src -= 8;
dst -= 8;
for (i = 0; i < 2; i++) {
s32 a0 = src[0], b0 = src[1], c0 = src[2], d0 = src[3];
s32 a1 = src[-8], b1 = src[-7], c1 = src[-6], d1 = src[-5];
s32 odddiff0 = b0 - d0;
s32 oddsum0 = b0 + d0;
s32 evsum0 = a0 + c0;
s32 evdiff0 = a0 - c0;
s32 rot0 = (odddiff0 * 0xB5) >> 8;
s32 odddiff1 = b1 - d1;
s32 oddsum1 = b1 + d1;
s32 evsum1 = a1 + c1;
s32 evdiff1 = a1 - c1;
s32 rot1 = (odddiff1 * 0xB5) >> 8;
s32 oddrot0 = oddsum0 + rot0;
s32 oddrot1 = oddsum1 + rot1;
dst[0] = evsum0 + oddrot0;
dst[1] = evdiff0 + rot0;
dst[2] = evdiff0 - rot0;
dst[3] = evsum0 - oddrot0;
dst[-8] = evsum1 + oddrot1;
dst[-7] = evdiff1 + rot1;
dst[-6] = evdiff1 - rot1;
dst[-5] = evsum1 - oddrot1;
src -= 16;
dst -= 16;
}
src = tmp + 3;
for (i = 3; i >= 0; i--) {
s32 evdiff;
s32 a;
s32 c;
s32 b;
s32 evsum;
s32 d;
s32 oddsum;
s32 odddiff;
s32 rot;
s32 oddrot;
u8* out = conv_row_ptr + i;
a = src[0];
b = src[8];
@@ -156,7 +173,7 @@ void TMCJPEGDEC_IdctBlock4x4_Col(s32* sp, u8* conv_row_ptr, u16 pitch, s32 zigza
d = src[24];
odddiff = b - d;
oddsum = d + b;
oddsum = b + d;
evsum = a + c;
evdiff = a - c;
rot = odddiff * 0xB5 >> 8;

View File

@@ -166,23 +166,23 @@ s32 TMCJPEGDEC_set_converterRGBA8(TMCCJPEGDecWork* work) {
}
static void TMCJPEGDEC_converterYUV411toRGBA8(TMCCJPEGDecWork* work, s32 x, s32 y) {
s32 red;
s8 crValue;
u8* luminance;
u8* cb;
u8* cr;
TMCCJPEGDecState* state;
u8* texture;
s32 height;
s32 column;
s32 yEnd;
s32 xEnd;
s32 green;
s32 yEnd;
s32 column;
s32 tileWidth;
s32 blueOffset;
u16* output;
s32 tileRow;
s32 lumaSkip;
s8 crValue;
s32 red;
s32 chromaSkip;
s32 width;
s32 cbValue;
@@ -216,7 +216,7 @@ static void TMCJPEGDEC_converterYUV411toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
cbValue = (s8)*cb++;
crValue = (s8)*cr++;
redOffset = (crValue * 359) >> 8;
greenOffset = -(crValue * 183 + cbValue * 88) >> 8;
greenOffset = -(cbValue * 88 + crValue * 183) >> 8;
blueOffset = (cbValue * 454) >> 8;
}
{
@@ -285,20 +285,20 @@ static void TMCJPEGDEC_converterYUV411toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
}
static void TMCJPEGDEC_converterYUV411toRGBA8edge(TMCCJPEGDecWork* work, s32 x, s32 y) {
s32 chromaSkip;
s32 tileRow;
s32 xEnd;
u8* texture;
TMCCJPEGDecState* state;
s32 column;
u8* luminance;
u8* cb;
u8* cr;
TMCCJPEGDecState* state;
s32 tileWidth;
u8* texture;
s32 width;
s32 height;
u8* cr;
s32 column;
s32 lumaSkip;
s32 xEnd;
s32 yEnd;
s32 tileWidth;
s32 lumaSkip;
s32 chromaSkip;
s32 tileRow;
u16* output;
s32 cbValue;
s8 crValue;
@@ -366,11 +366,11 @@ static void TMCJPEGDEC_converterYUV411toRGBA8edge(TMCCJPEGDecWork* work, s32 x,
static void TMCJPEGDEC_converterYUV422toRGBA8(TMCCJPEGDecWork* work, s32 x, s32 y) {
s32 chromaSkip;
s32 lumaSkip;
s32 blue;
s32 cbValue;
s32 tileWidth;
TMCCJPEGDecState* state;
u16* output;
s32 xEnd;
u8* texture;
s32 width;
s32 height;
@@ -379,7 +379,7 @@ static void TMCJPEGDEC_converterYUV422toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
s32 red;
u8* cr;
s32 column;
s32 xEnd;
u16* output;
s32 yEnd;
s32 redOffset;
s32 tileRow;
@@ -387,7 +387,7 @@ static void TMCJPEGDEC_converterYUV422toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
s32 blueOffset;
s32 value;
s32 green;
s32 blue;
s32 lumaSkip;
s32 crValue;
luminance = work->convBuf + 4;
@@ -415,7 +415,7 @@ static void TMCJPEGDEC_converterYUV422toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
green = value + greenOffset;
red = value + redOffset;
blue = value + blueOffset;
if ((blue | green | red) >> 8) {
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;
@@ -426,7 +426,7 @@ static void TMCJPEGDEC_converterYUV422toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
green = value + greenOffset;
red = value + redOffset;
blue = value + blueOffset;
if ((blue | green | red) >> 8) {
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;
@@ -441,21 +441,21 @@ static void TMCJPEGDEC_converterYUV422toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
}
static void TMCJPEGDEC_converterYUV422toRGBA8edge(TMCCJPEGDecWork* work, s32 x, s32 y) {
s32 blue;
u16* output;
s32 xEnd;
s32 column;
u8* luminance;
u8* cb;
u8* cr;
TMCCJPEGDecState* state;
s32 tileWidth;
u8* luminance;
u8* texture;
s32 width;
s32 height;
u8* cb;
u8* texture;
s32 column;
s32 chromaSkip;
s32 xEnd;
s32 yEnd;
s32 lumaSkip;
s32 chromaSkip;
s32 tileRow;
u16* output;
s32 cbValue;
s32 crValue;
s32 redOffset;
@@ -463,7 +463,7 @@ static void TMCJPEGDEC_converterYUV422toRGBA8edge(TMCCJPEGDecWork* work, s32 x,
s32 blueOffset;
s32 value;
s32 red;
s32 lumaSkip;
s32 blue;
s32 green;
luminance = work->convBuf + 4;
@@ -502,7 +502,7 @@ static void TMCJPEGDEC_converterYUV422toRGBA8edge(TMCCJPEGDecWork* work, s32 x,
red = value + redOffset;
blue = value + blueOffset;
green = value + greenOffset;
if ((blue | green | red) >> 8) {
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;
@@ -517,19 +517,19 @@ static void TMCJPEGDEC_converterYUV422toRGBA8edge(TMCCJPEGDecWork* work, s32 x,
}
static void TMCJPEGDEC_converterYUV420toRGBA8(TMCCJPEGDecWork* work, s32 x, s32 y) {
s32 tileRow;
s32 blue;
s8 crValue;
s32 chromaSkip;
u8* luminance;
TMCCJPEGDecState* state;
u8* texture;
s32 xEnd;
s32 width;
s32 height;
s32 green;
s32 blue;
s32 blueOffset;
u8* texture;
s32 lumaSkip;
s32 yEnd;
s32 xEnd;
s32 tileRow;
s32 value;
s32 column;
u8* cr;
@@ -538,7 +538,7 @@ static void TMCJPEGDEC_converterYUV420toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
s32 redOffset;
u8* cb;
u16* output;
s32 blueOffset;
s32 green;
s32 red;
s32 cbValue;
@@ -620,11 +620,11 @@ static void TMCJPEGDEC_converterYUV420toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
static void TMCJPEGDEC_converterYUV420toRGBA8edge(TMCCJPEGDecWork* work, s32 x, s32 y) {
u8* luminance = work->convBuf + 4;
u8* cb = work->convBuf + 260;
s32 width;
u8* cr = work->convBuf + 324;
TMCCJPEGDecState* state = work->pState;
s32 tileWidth = (state->convWidth >> 2) << 1;
u8* texture = state->pTexBuffer;
u8* cr = work->convBuf + 324;
s32 width;
s32 height;
if (state->dataSizeX == (u32)x) {
width = state->stepXExt;
@@ -686,7 +686,7 @@ static void TMCJPEGDEC_converterYUV420toRGBA8edge(TMCCJPEGDecWork* work, s32 x,
static void TMCJPEGDEC_converterYUV211toRGBA8(TMCCJPEGDecWork* work, s32 x, s32 y) {
u16* output;
s32 tileRow;
s32 column;
s32 redOffset;
TMCCJPEGDecState* state;
s32 lumaSkip;
@@ -695,7 +695,7 @@ static void TMCJPEGDEC_converterYUV211toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
u8* cb;
u8* cr;
s32 height;
s32 column;
s32 tileRow;
s32 chromaSkip;
s32 width;
s32 xEnd;
@@ -742,7 +742,7 @@ static void TMCJPEGDEC_converterYUV211toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
green = value + greenOffset;
red = value + redOffset;
blue = value + blueOffset;
if ((blue | green | red) >> 8) {
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;
@@ -770,7 +770,7 @@ static void TMCJPEGDEC_converterYUV211toRGBA8edge(TMCCJPEGDecWork* work, s32 x,
u16* output;
s32 lumaSkip;
s32 blue;
u8* texture;
s32 tileRow;
u8* luminance;
u8* cb;
u8* cr;
@@ -783,7 +783,7 @@ static void TMCJPEGDEC_converterYUV211toRGBA8edge(TMCCJPEGDecWork* work, s32 x,
s32 greenOffset;
s32 yEnd;
s32 cbValue;
s32 tileRow;
u8* texture;
s32 blueOffset;
s32 red;
s8 crValue;
@@ -831,7 +831,7 @@ static void TMCJPEGDEC_converterYUV211toRGBA8edge(TMCCJPEGDecWork* work, s32 x,
green = value + greenOffset;
red = value + redOffset;
blue = value + blueOffset;
if ((blue | green | red) >> 8) {
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;
@@ -856,9 +856,9 @@ static void TMCJPEGDEC_converterYUV211toRGBA8edge(TMCCJPEGDecWork* work, s32 x,
static void TMCJPEGDEC_converterYUV444toRGBA8(TMCCJPEGDecWork* work, s32 x, s32 y) {
u16* output;
s32 tileWidth;
s32 tileRow;
s32 rowSkip;
u8* texture;
s32 xEnd;
u8* luminance;
u8* cb;
u8* cr;
@@ -867,9 +867,9 @@ static void TMCJPEGDEC_converterYUV444toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
s32 height;
s32 width;
s32 column;
s32 xEnd;
s32 rowSkip;
s32 yEnd;
s32 tileWidth;
u8* texture;
s32 row;
s32 red;
s32 cbValue;
@@ -896,10 +896,10 @@ static void TMCJPEGDEC_converterYUV444toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
cbValue = (s8)*cb++;
crValue = (s8)*cr++;
value = *luminance++;
green = value + (-(crValue * 183 + cbValue * 88) >> 8);
green = value + (-(cbValue * 88 + crValue * 183) >> 8);
red = value + ((crValue * 359) >> 8);
blue = value + ((cbValue * 454) >> 8);
if ((blue | green | red) >> 8) {
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;

View File

@@ -171,7 +171,9 @@ s32 TMCJPEGDEC_set_converterY8U8V8(TMCCJPEGDecWork* work) {
static void TMCJPEG_814EFEAC(TMCCJPEGDecWork* work, s32 x, s32 y) {
s32 rowSkip;
u8* output;
s32 chromaXEnd;
u32 tileRow;
u32 chromaTileWidth;
s32 chromaYEnd;
u8* lumaTexture;
TMCCJPEGDecState* state;
@@ -214,17 +216,17 @@ static void TMCJPEG_814EFEAC(TMCCJPEGDecWork* work, s32 x, s32 y) {
}
luminance += rowSkip;
}
tileWidth = state->chromaWidth >> 3;
chromaTileWidth = state->chromaWidth >> 3;
x = (u32)x >> 2;
width = 8 / state->scaleFactor;
height = 8 / state->scaleFactor;
xEnd = x + width;
chromaXEnd = x + width;
chromaYEnd = y + height;
for (; y < chromaYEnd; y++) {
for (column = x; column < xEnd; column += 1) {
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * tileWidth) << 5)] = *cb + 128;
for (column = x; column < chromaXEnd; column += 1) {
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cb + 128;
cb++;
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * tileWidth) << 5)] = *cr + 128;
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cr + 128;
cr++;
}
cb += 8 - width;
@@ -233,6 +235,7 @@ static void TMCJPEG_814EFEAC(TMCCJPEGDecWork* work, s32 x, s32 y) {
}
static void TMCJPEG_814F043C(TMCCJPEGDecWork* work, s32 x, s32 y) {
u32 chromaTileWidth;
TMCCJPEGDecState* state;
u8* lumaTexture;
u8* luminance;
@@ -247,9 +250,9 @@ static void TMCJPEG_814F043C(TMCCJPEGDecWork* work, s32 x, s32 y) {
u8* output;
u8* cb;
u8* cr;
s32 width;
s32 tileOffset;
s32 xEnd;
s32 tileOffset;
s32 width;
u32 tileWidth;
luminance = work->convBuf + 4;
@@ -284,13 +287,13 @@ static void TMCJPEG_814F043C(TMCCJPEGDecWork* work, s32 x, s32 y) {
x = (u32)x >> 2;
width = (width + 3) >> 2;
xEnd = x + width;
tileWidth = state->chromaWidth >> 3;
chromaTileWidth = state->chromaWidth >> 3;
chromaEnd = y + height;
for (; y < chromaEnd; y++) {
for (column = x; column < xEnd; column += 1) {
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * tileWidth) << 5)] = *cb + 128;
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cb + 128;
cb++;
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * tileWidth) << 5)] = *cr + 128;
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cr + 128;
cr++;
}
cb += 8 - width;
@@ -358,6 +361,7 @@ static void TMCJPEG_814F0A58(TMCCJPEGDecWork* work, s32 x, s32 y) {
}
static void TMCJPEG_814F11C4(TMCCJPEGDecWork* work, s32 x, s32 y) {
u32 chromaTileWidth;
TMCCJPEGDecState* state;
u8* lumaTexture;
u8* luminance;
@@ -372,9 +376,9 @@ static void TMCJPEG_814F11C4(TMCCJPEGDecWork* work, s32 x, s32 y) {
u8* output;
u8* cb;
u8* cr;
s32 width;
s32 tileOffset;
s32 xEnd;
s32 tileOffset;
s32 width;
u32 tileWidth;
luminance = work->convBuf + 4;
@@ -409,13 +413,13 @@ static void TMCJPEG_814F11C4(TMCCJPEGDecWork* work, s32 x, s32 y) {
x = (u32)x >> 1;
width = (width + 1) >> 1;
xEnd = x + width;
tileWidth = state->chromaWidth >> 3;
chromaTileWidth = state->chromaWidth >> 3;
chromaEnd = y + height;
for (; y < chromaEnd; y++) {
for (column = x; column < xEnd; column += 1) {
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * tileWidth) << 5)] = *cb + 128;
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cb + 128;
cb++;
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * tileWidth) << 5)] = *cr + 128;
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cr + 128;
cr++;
}
cb += 8 - width;
@@ -424,21 +428,23 @@ static void TMCJPEG_814F11C4(TMCCJPEGDecWork* work, s32 x, s32 y) {
}
static void TMCJPEG_814F17E0(TMCCJPEGDecWork* work, s32 x, s32 y) {
s32 chromaYEnd;
u8* lumaTexture;
s32 height;
u8* luminance;
s32 chromaYEnd;
s32 column;
u8* lumaTexture;
s32 chromaXEnd;
u8* luminance;
u32 chromaTileWidth;
u8* cbTexture;
s32 row;
s32 width;
u8* crTexture;
s32 xEnd;
u32 tileWidth;
u8* cb;
TMCCJPEGDecState* state;
s32 yEnd;
s32 width;
s32 xEnd;
u8* cr;
u32 tileWidth;
s32 row;
row = y;
luminance = work->convBuf + 4;
@@ -464,14 +470,14 @@ static void TMCJPEG_814F17E0(TMCCJPEGDecWork* work, s32 x, s32 y) {
y = (u32)y >> 1;
width = 8 / state->scaleFactor;
height = 8 / state->scaleFactor;
xEnd = x + width;
chromaXEnd = x + width;
chromaYEnd = y + height;
tileWidth = state->chromaWidth >> 3;
chromaTileWidth = state->chromaWidth >> 3;
for (; y < chromaYEnd; y++) {
for (column = x; column < xEnd; column += 1) {
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * tileWidth) << 5)] = *cb + 128;
for (column = x; column < chromaXEnd; column += 1) {
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cb + 128;
cb++;
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * tileWidth) << 5)] = *cr + 128;
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cr + 128;
cr++;
}
cb += 8 - width;
@@ -480,6 +486,7 @@ static void TMCJPEG_814F17E0(TMCCJPEGDecWork* work, s32 x, s32 y) {
}
static void TMCJPEG_814F1F48(TMCCJPEGDecWork* work, s32 x, s32 y) {
u32 chromaTileWidth;
TMCCJPEGDecState* state;
u8* lumaTexture;
u8* luminance;
@@ -490,13 +497,13 @@ static void TMCJPEG_814F1F48(TMCCJPEGDecWork* work, s32 x, s32 y) {
u8* crTexture;
u32 tileRow;
s32 height;
s32 width;
s32 yEnd;
u8* output;
u8* cb;
u8* cr;
s32 xEnd;
s32 tileOffset;
s32 yEnd;
s32 width;
u32 tileWidth;
luminance = work->convBuf + 4;
@@ -532,13 +539,13 @@ static void TMCJPEG_814F1F48(TMCCJPEGDecWork* work, s32 x, s32 y) {
x = (u32)x >> 1;
width = (width + 1) >> 1;
xEnd = x + width;
tileWidth = state->chromaWidth >> 3;
chromaTileWidth = state->chromaWidth >> 3;
chromaEnd = y + ((height + 1) >> 1);
for (; y < chromaEnd; y++) {
for (column = x; column < xEnd; column += 1) {
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * tileWidth) << 5)] = *cb + 128;
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cb + 128;
cb++;
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * tileWidth) << 5)] = *cr + 128;
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cr + 128;
cr++;
}
cb += 8 - width;
@@ -547,8 +554,9 @@ static void TMCJPEG_814F1F48(TMCCJPEGDecWork* work, s32 x, s32 y) {
}
static void TMCJPEG_814F2570(TMCCJPEGDecWork* work, s32 x, s32 y) {
u8* lumaTexture;
u32 chromaTileWidth;
TMCCJPEGDecState* state;
u8* lumaTexture;
u8* luminance;
s32 column;
s32 row;
@@ -588,13 +596,13 @@ static void TMCJPEG_814F2570(TMCCJPEGDecWork* work, s32 x, s32 y) {
luminance += 8 - width;
}
y = (u32)y >> 1;
tileWidth = state->chromaWidth >> 3;
chromaTileWidth = state->chromaWidth >> 3;
chromaEnd = y + 8 / state->scaleFactor;
for (; y < chromaEnd; y++) {
for (column = x; column < xEnd; column += 1) {
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * tileWidth) << 5)] = *cb + 128;
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cb + 128;
cb++;
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * tileWidth) << 5)] = *cr + 128;
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cr + 128;
cr++;
}
cb += 8 - width;

View File

@@ -796,11 +796,11 @@ Zi8UInt Zi8Get1KeyPressSpelling(Zi8OneKeyParam *params,Zi8OneKeyOptions *options
if (remaining != 0) {
remaining--;
} else {
totalCandidates = totalCandidates + 1;
totalCandidates++;
if (options->countOnly == '\0') {
*output++ = spellingBuffer[spellingIndex];
*output++ = 0;
candidateCount = candidateCount + 1;
candidateCount++;
}
else if ((int)totalCandidates >= options->maxCount) goto finishSpelling;
if (candidateCount >= params->maxCandidates) goto finishSpelling;
@@ -1001,10 +1001,10 @@ Zi8UInt Zi8Get1KeyPressSpelling(Zi8OneKeyParam *params,Zi8OneKeyOptions *options
}
if (Zi8IsDupWordW(output,(ziU8)phoneticIndex,work) == 0) {
if (remaining == 0) {
totalCandidates = totalCandidates + 1;
totalCandidates++;
if (options->countOnly == 0) {
output += phoneticIndex + 1;
candidateCount = candidateCount + 1;
candidateCount++;
} else if ((int)totalCandidates >= options->maxCount) goto finishSpelling;
if (candidateCount >= params->maxCandidates) goto finishSpelling;
} else {

View File

@@ -187,7 +187,8 @@ unsigned int Zi8MatchROMdata1(ziWChar *elements, ziU8 count, ziU8 language, ziWC
ZI_WORK->unk_0x1764 = (ziU8*)group;
if (ZI_WORK->unk_0x1764 == 0) {
if (Zi8GetTableSize(language & 0xff,0xb,ZI_WORK) != 0) {
ZI_WORK->unk_0x1764 = (ziU8*)(tableAddress = Zi8GetTableAddress(language & 0xff,0xb,ZI_WORK));
tableAddress = Zi8GetTableAddress(language & 0xff,0xb,ZI_WORK);
ZI_WORK->unk_0x1764 = (ziU8*)tableAddress;
}
}
if (ZI_WORK->unk_0x1764 != 0) {

View File

@@ -140,7 +140,8 @@ matched:
}
if (language == 1) {
byteOutput = (ziU8*)output;
for (index = copied = 0; index < (ziS32)wordSize && copied < capacity; copied++) {
index = 0;
for (copied = 0; index < (ziS32)wordSize && copied < capacity; copied++) {
byteOutput[index] = word[index];
index++;
byteOutput[index] = word[index];

View File

@@ -15,11 +15,11 @@ void Zi8Memset(ziPtr, ziU32, ziU32);
ziBool Zi8_81480224(ziUserWord* word ZI_NEED_WORK) {
ziU8 length;
ziU8 position;
ziUwdNode* previous;
ziUwdNode* current;
ziUwdNode* added;
ziUserWord* candidate;
ziU8 position;
if (ZI_WORK->uwdCount >= 32) {
Zi8LogError(0x19D, __zi8_work_data);
return 0;
@@ -56,7 +56,8 @@ ziBool Zi8_81480224(ziUserWord* word ZI_NEED_WORK) {
previous = current;
current = current->next;
}
added = &ZI_WORK->uwdNodes[ZI_WORK->uwdCount++];
length = ZI_WORK->uwdCount++;
added = &ZI_WORK->uwdNodes[length];
if (previous == 0) {
ZI_WORK->uwdList = added;
added->next = current;
@@ -88,18 +89,17 @@ void Zi8_8148047C(ziPtr __zi8_work_data) {
ziU8 Zi8MatchUWDdata(ziWChar* pattern, ziU8 length, ziWChar* currentWord, ziU16 currentLength, ziU8 language, ziWChar* output, ziU16 capacity, ziU8 complete, ziU8 continuation ZI_NEED_WORK) {
ziUserDictionary* dictionary;
ziU8* cursor;
ziU8* begin;
int fallback = 0;
ziU8* boundary;
ziU8* end;
ziUserWord* previous;
int firstSegment;
ziU32 size;
int headerSize;
int entryLength;
int entryLanguage;
volatile int entryLength;
int previousOffset;
int visited = 0;
int fallback = 0;
ziU8* begin;
ziWChar folded;
ziU8* text;
int position;
@@ -144,7 +144,7 @@ ziU8 Zi8MatchUWDdata(ziWChar* pattern, ziU8 length, ziWChar* currentWord, ziU16
ZI_WORK->unk_0x141[1] = language;
ZI_WORK->unk_0x141[2] = prefixLength;
previousOffset = 4;
while (prefixLength > 0) {
for (; prefixLength > 0; prefixLength--, position++) {
folded = currentWord[position];
ZI_WORK->unk_0x141[previousOffset] = Zi8ConvertWC2UC(folded, language, __zi8_work_data);
ZI_WORK->unk_0x184[previousOffset] = 0;
@@ -156,14 +156,12 @@ ziU8 Zi8MatchUWDdata(ziWChar* pattern, ziU8 length, ziWChar* currentWord, ziU16
ZI_WORK->unk_0x140 = 0;
break;
}
prefixLength--;
position++;
}
}
}
if (ZI_WORK->unk_0x140 == 0 && length == 0) return 0;
rescan:
cursor = begin = dictionary->entries + dictionary->current;
begin = cursor = dictionary->entries + dictionary->current;
boundary = (ziU8*)dictionary + dictionary->boundary + 7;
end = (ziU8*)dictionary + dictionary->end + 7;
if (begin < boundary) firstSegment = 1;
@@ -172,7 +170,8 @@ rescan:
size = *cursor;
if ((ziS32)ZI_WORK->unk_0x13C > visited++ || (((ziUserWord*)cursor)->size & 0xC0) != 0) {
next:
if ((cursor += size) > end) {
cursor += size;
if (cursor > end) {
if (firstSegment) break;
firstSegment = 1;
size = cursor - end - 1;
@@ -180,9 +179,8 @@ next:
}
} else {
previous = (ziUserWord*)(cursor + size);
if ((ziU8*)previous > end) previous = (ziUserWord*)(dictionary->entries + (cursor - end - 1));
text = cursor;
headerSize = *text++;
if ((ziU8*)previous > end) previous = (ziUserWord*)(cursor + ((ziU8*)dictionary - end) + 7);
text = &((ziUserWord*)cursor)->language;
entryLanguage = *text++;
entryLength = *text++;
text++;

View File

@@ -22,10 +22,10 @@ ziU32 ZiDAWGGetChild(ziU32 node) {
node += offset;
if (((ziU32)header & 2) != 0) {
if ((*(ziU8*)node & 0x80) != 0) {
offset = ((*(ziU8*)node & 0x7f) << 16) +
((((ziU32)*((ziU8*)node + 1) & 0xffff) << 8) + *((ziU8*)node + 2)) + 0x8000;
offset = (*(ziU8*)node & 0x7f) * 0x10000 + ((ziU32)*((ziU8*)node + 1) & 0xffff) * 0x100 + *((ziU8*)node + 2) + 0x8000;
} else {
offset = (((ziU32)*(ziU8*)node & 0xffff) << 8) + (ziU32)*((ziU8*)node + 1);
offset = ((ziU32)*(ziU8*)node & 0xffff) * 0x100;
offset += (ziU32)*((ziU8*)node + 1);
}
} else if (((ziU32)header & 8) != 0) {
if ((*(ziU8*)node & 0x80) != 0) {
@@ -70,8 +70,8 @@ ziU8* ZiDAWGGetSibling(ziU8* cursor) {
}
if ((*cursor & 0x80) != 0) {
node += (*cursor & 0x7f) * 0x10000 +
(((ziU32)cursor[1] << 8) + (ziU32)cursor[2]) + 0x8000;
node += (*cursor & 0x7f) * 0x10000 + (ziU32)cursor[1] * 0x100 +
(ziU32)cursor[2] + 0x8000;
} else {
node = cursor[1] + (node + (ziU16)*cursor * 0x100);
}

View File

@@ -72,11 +72,7 @@ struct DVDCommandBlock {
DVDCommandBlock* prev; // 0x04
u32 command; // 0x08
#ifdef BS2_MACH_VOLATILE_DVD_STATE
volatile s32 state;
#else
s32 state; // 0x0C
#endif
u32 offset; // 0x10
u32 length; // 0x14

View File

@@ -140,19 +140,15 @@ extern pf_s32 PFVOL_CheckCurrentDir(PF_VOLUME* volume, pf_u32 start_cluster);
extern pf_s32 PFENT_RemoveEntry(PF_DIR_ENT* entry, PF_ENT_ITER* iter);
extern pf_s32 PFFAT_FreeChain(PFDIR_FFD* ffd, pf_u32 start_cluster, pf_u32 chain_index, pf_u32 size);
static inline PF_CUR_DIR* current_directories(PFDIR_VOLUME_DIRS* state) {
return state->current_dirs;
}
static inline pf_u32 current_directory_is_open(PF_VOLUME* volume, const PF_DIR_ENT* entry) {
static inline pf_u32 current_directory_is_open(PF_VOLUME* volume, pf_u32 cluster) {
pf_u32 index;
for (index = 0; index < 4; index++) {
if (volume == pf_vol_set.volume_state.volumes[index].p_vol) {
PFDIR_VOLUME_DIRS* state = (PFDIR_VOLUME_DIRS*)pf_vol_set.volume_state.volumes[index].p_vol;
PF_CUR_DIR* directory = current_directories(state);
if (pf_vol_set.volume_state.volumes[index].p_vol == volume) {
PFDIR_VOLUME_DIRS* state = (PFDIR_VOLUME_DIRS*)volume;
PF_CUR_DIR* directory = state->current_dirs;
pf_u32 slot;
for (slot = 0; slot < 4; slot++, directory++) {
if ((directory->stat & 1) != 0 && directory->directory.start_cluster == entry->start_cluster) { return 1; }
if ((directory->stat & 1) != 0 && directory->directory.start_cluster == cluster) { return 1; }
}
}
}
@@ -385,7 +381,7 @@ pf_s32 PFDIR_p_readdir(PFDIR_DIR* dir, PFDIR_READ_RESULT* result) {
return 0;
}
extern pf_s32 PFENT_findEntry(PFDIR_FFD*, PF_DIR_ENT*, pf_u32, PFDIR_STR*, pf_u32, pf_u32);
extern pf_s32 PFENT_findEntry(PFDIR_FFD*, PF_DIR_ENT*, pf_u32, PFDIR_STR*, pf_u8, pf_u32*, pf_u32*);
extern pf_s32 PFFAT_GetSectorSpecified(PFDIR_FFD*, pf_u32, pf_u32, pf_u32*);
extern pf_s32 PFPATH_transformInUnicode(pf_u16*, const pf_s8*);
extern void PFPATH_SetSearchPattern(pf_s8*, pf_u16*, PFDIR_STR*);
@@ -412,9 +408,17 @@ extern void PFPATH_AdjustExtShortName(pf_s8* name, pf_u32 position);
extern pf_s32 PFCACHE_AllocateDataPage(PF_VOLUME* volume, pf_u32 sector, PF_CACHE_PAGE** page, pf_u32* size);
extern void PFCACHE_FreeDataPage(PF_VOLUME* volume, PF_CACHE_PAGE* page);
static inline void set_dot_entry(pf_u8* buffer) {
pf_u32 index;
buffer[0] = '.';
for (index = 1; index < 11; index++) { buffer[index] = ' '; }
buffer[1] = ' ';
buffer[2] = ' ';
buffer[3] = ' ';
buffer[4] = ' ';
buffer[5] = ' ';
buffer[6] = ' ';
buffer[7] = ' ';
buffer[8] = ' ';
buffer[9] = ' ';
buffer[10] = ' ';
}
static inline void set_dot_dot_entry(pf_u8* buffer) {
@@ -449,7 +453,7 @@ extern pf_s32 PFENT_ITER_GetEntryOfPattern(PF_ENT_ITER* iter, PF_DIR_ENT* entry,
extern pf_s32 PFENT_ITER_FindEntry(PF_ENT_ITER* iter, PF_DIR_ENT* entry, PFDIR_STR* pattern,
pf_u8 attributes, pf_u32 start, pf_u32* found);
extern pf_s32 PFENT_findEntry(PFDIR_FFD* ffd, PF_DIR_ENT* entry, pf_u32 start, PFDIR_STR* pattern,
pf_u32 required_attributes, pf_u32 forbidden_attributes);
pf_u8 attributes, pf_u32* logical_position, pf_u32* entry_position);
extern pf_u32 PFSTR_GetCodeMode(PFDIR_STR* path);
extern const pf_s8* PFSTR_GetStrPos(PFDIR_STR* path, pf_u32 target);
extern pf_s32 PFPATH_SplitPathPattern(PF_STR* path, PFDIR_STR* directory, PFDIR_STR* pattern);
@@ -463,16 +467,6 @@ extern pf_s32 PFFILE_FsexecOpenFile(PF_DIR_ENT* entry, PF_ENT_ITER* iter, pf_u32
extern pf_s32 PFPATH_cmpName(const pf_s8* short_name, PFDIR_STR* pattern, pf_u32 short_search);
extern pf_s32 PFPATH_cmpNameUni(const pf_u16* name, PFDIR_STR* pattern);
pf_s32 PFDIR_p_mkdir(PF_VOLUME* volume, PF_STR* path, pf_u32 option, PF_DTA* data) {
pf_u32 index;
pf_u32* next_sector;
pf_u16 filename_length;
pf_u16 original_offset;
pf_u8 checksum;
pf_u8 lfn_count = 0;
pf_u32 cluster;
pf_u32 lfn_index;
pf_u32 entry_sector;
pf_s32 error;
PF_DIR_ENT parent_entry;
PF_DIR_ENT entry;
pf_s8 normalized_name[512];
@@ -486,9 +480,19 @@ pf_s32 PFDIR_p_mkdir(PF_VOLUME* volume, PF_STR* path, pf_u32 option, PF_DTA* dat
pf_u32 found;
pf_u32 page_size;
PF_CACHE_PAGE* page;
pf_u8 lfn_count = 0;
pf_u32 sector = 0;
pf_u32 written;
pf_u32 position;
pf_u32 entry_sector;
pf_u16 filename_length;
pf_u16 original_offset;
pf_u8 checksum;
pf_u32 cluster;
pf_u32 index;
pf_u32 lfn_index;
pf_u32* next_sector;
pf_s32 error;
error = PFPATH_SplitPath((PFDIR_STR*)path, &directory, &filename);
if (error != 0) { return error; }
@@ -866,15 +870,12 @@ pf_s32 PFDIR_p_rename(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
pf_u32 found;
pf_u16 time;
pf_u8 deleted_marker[1] = {0xE5};
pf_s32 filename_length;
pf_u32* next_sector;
pf_s32 allocation_error = 0;
pf_u32 sector;
pf_u16 saved_initial_char = 0;
pf_u32 sector;
pf_u32* next_sector;
pf_s32 filename_length;
pf_s32 parse_error;
const pf_s8* filename;
pf_u32 remaining_lfns;
pf_u32 lfn_index;
pf_s32 allocation_error = 0;
pf_s32 error;
pf_u32 index;
PF_DIR_ENT* update_entry;
@@ -910,11 +911,11 @@ pf_s32 PFDIR_p_rename(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
}
PFSTR_SetLocalStr(&destination_name, (pf_u32)normalized_name);
if (PFSTR_GetCodeMode(&destination_name) == 1) {
filename = PFSTR_GetStrPos(&destination_name, 1);
const pf_s8* filename = PFSTR_GetStrPos(&destination_name, 1);
error = pf_strcmp(PFSTR_GetStrPos(&directory, 1), filename);
} else {
filename = PFSTR_GetStrPos(&destination_name, 1);
error = pf_w_strcmp((const pf_u16*)PFSTR_GetStrPos(&directory, 1), (const pf_u16*)filename);
const pf_u16* filename = (const pf_u16*)PFSTR_GetStrPos(&destination_name, 1);
error = pf_w_strcmp((const pf_u16*)PFSTR_GetStrPos(&directory, 1), filename);
}
if (error != 0) {
error = PFENT_ITER_GetEntryOfPath(&destination_iter, &destination_entry,
@@ -924,24 +925,23 @@ pf_s32 PFDIR_p_rename(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
}
destination_entry.start_cluster = source_parent.start_cluster;
PFFAT_InitFFD(&destination_iter.ffd, &destination_hint, volume, &destination_entry.start_cluster);
error = PFENT_findEntry(&destination_iter.ffd, &destination_entry, 0, &destination_name, 0x7F, 0);
error = PFENT_findEntry(&destination_iter.ffd, &destination_entry, 0, &destination_name, 0x7F, 0, 0);
if (error == 0) { return 8; }
if (error != 0 && error != 3) { return error; }
if ((source_entry.attr & 0x10) == 0) {
if (PFFILE_IsOpened(&source_entry) != 0) { return 0x13; }
} else {
if (directory_is_open(&source_entry) != 0) { return 0x13; }
if (current_directory_is_open(source_entry.p_vol, &source_entry) != 0) { return 0x1C; }
if (current_directory_is_open(source_entry.p_vol, source_entry.start_cluster) != 0) { return 0x1C; }
if (PFSTR_StrNCmp(&source_name, (const pf_s8*)"..", 1, 0, 2) == 0) { return 0x1C; }
if (PFSTR_StrNCmp(&source_name, (const pf_s8*)".", 1, 0, 1) == 0) { return 0x1C; }
{
pf_u32 directory_sector;
PFDIR_SFD* file = ((PFDIR_VOLUME_DIRS*)volume)->sfds;
directory_sector = volume->bpb.first_data_sector +
pf_u32 directory_sector = volume->bpb.first_data_sector +
((source_entry.start_cluster - 2) << volume->bpb.log2_sectors_per_cluster);
for (index = 0; index < 5; index++, file++) {
if ((file->stat & 1) != 0 && (file->stat & 2) != 0) {
if (volume == file->dir_entry.p_vol && directory_sector == file->dir_entry.entry_sector) { return 0x13; }
if (file->dir_entry.p_vol == volume && file->dir_entry.entry_sector == directory_sector) { return 0x13; }
found = 0;
error = PFENT_ITER_FindCluster(&file->dir_entry, source_entry.start_cluster, &found);
if (error != 0) { return error; }
@@ -961,13 +961,12 @@ pf_s32 PFDIR_p_rename(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
destination_entry.num_entry_LFNs = 0;
PFENT_getcurrentDateTimeForEnt(&destination_entry.access_date, &time);
error = PFENT_updateEntry(&destination_entry, 1);
if (error != 0) { return error; }
goto return_allocation_error;
goto finish_rename;
}
if (source_entry.num_entry_LFNs != 0 && (source_entry.small_letter_flag & 0x18) == 0) {
saved_initial_char = source_entry.long_name[0];
source_entry.long_name[0] = 0;
for (lfn_index = 1; lfn_index <= source_entry.num_entry_LFNs; lfn_index++) {
for (index = 1; index <= source_entry.num_entry_LFNs; index++) {
error = PFENT_ITER_Retreat(&source_iter, 0);
if (error != 0) { return error; }
error = PFSEC_WriteData(volume, deleted_marker, source_iter.sector,
@@ -1005,7 +1004,7 @@ pf_s32 PFDIR_p_rename(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
if (allocation_error != 0) {
if (source_entry.num_entry_LFNs != 0 && (source_entry.small_letter_flag & 0x18) == 0) {
source_entry.long_name[0] = saved_initial_char;
source_entry.entry_offset -= ((pf_u32)source_entry.num_entry_LFNs << 5) & (0xffU << 5);
source_entry.entry_offset -= (pf_u16)(source_entry.num_entry_LFNs * 32);
}
update_entry = &source_entry;
} else {
@@ -1014,13 +1013,13 @@ pf_s32 PFDIR_p_rename(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
PFENT_getcurrentDateTimeForEnt(&destination_entry.access_date, &time);
update_entry = &destination_entry;
}
remaining_lfns = update_entry->num_entry_LFNs;
if (remaining_lfns != 0 && (update_entry->small_letter_flag & 0x18) == 0) {
index = update_entry->num_entry_LFNs;
if (index != 0 && (update_entry->small_letter_flag & 0x18) == 0) {
sector = update_entry->entry_sector;
next_sector = previous_chain;
while (remaining_lfns >= 1) {
PFENT_storeLFNEntryFieldsToBuf(entry_buffer, update_entry, remaining_lfns,
update_entry->check_sum, remaining_lfns == update_entry->num_entry_LFNs);
while (index >= 1) {
PFENT_storeLFNEntryFieldsToBuf(entry_buffer, update_entry, index,
update_entry->check_sum, index == update_entry->num_entry_LFNs);
error = PFSEC_WriteData(volume, entry_buffer, sector, update_entry->entry_offset, 32, &written, 0);
if (error != 0) { return error; }
if (written != 32) { return 0x11; }
@@ -1029,13 +1028,13 @@ pf_s32 PFDIR_p_rename(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
update_entry->entry_offset = 0;
sector = *next_sector++;
}
remaining_lfns--;
index--;
}
update_entry->entry_sector = sector;
}
error = PFENT_updateEntry(update_entry, 1);
if (error != 0) { return error; }
return_allocation_error:
finish_rename:
if (error != 0) { allocation_error = error; }
return allocation_error;
}
pf_s32 PFDIR_p_move(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
@@ -1058,16 +1057,15 @@ pf_s32 PFDIR_p_move(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
pf_u32 found;
pf_u16 time;
pf_u8 deleted_marker[1] = {0xE5};
pf_s32 filename_length;
pf_u32* next_sector;
pf_u32 parent_cluster;
pf_u16 saved_initial_char = 0;
pf_u32 sector;
pf_u32* next_sector;
pf_s32 filename_length;
pf_s32 parse_error;
pf_s32 allocation_error;
pf_s32 error;
pf_u16 saved_initial_char = 0;
pf_u32 lfn_index;
pf_u32 index;
pf_u32 lfn_index;
PF_DIR_ENT* update_entry;
error = PFENT_ITER_GetEntryOfPath(&source_iter, &source_entry, volume, (PFDIR_STR*)old_path, 0);
@@ -1085,7 +1083,7 @@ pf_s32 PFDIR_p_move(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
if (error != 0) { return error; }
destination_entry.start_cluster = destination_parent.start_cluster;
PFFAT_InitFFD(&destination_iter.ffd, &destination_hint, volume, &destination_entry.start_cluster);
error = PFENT_findEntry(&destination_iter.ffd, &destination_entry, 0, &destination_name, 0x7F, 0);
error = PFENT_findEntry(&destination_iter.ffd, &destination_entry, 0, &destination_name, 0x7F, 0, 0);
if (error == 0) {
if (destination_entry.entry_sector == source_entry.entry_sector &&
destination_entry.entry_offset == source_entry.entry_offset) { return 0; }
@@ -1096,19 +1094,18 @@ pf_s32 PFDIR_p_move(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
if (PFFILE_IsOpened(&source_entry) != 0) { return 0x13; }
} else {
if (directory_is_open(&source_entry) != 0) { return 0x13; }
if (current_directory_is_open(source_entry.p_vol, &source_entry) != 0) { return 0x1C; }
if (current_directory_is_open(source_entry.p_vol, source_entry.start_cluster) != 0) { return 0x1C; }
error = PFPATH_SplitPath((PFDIR_STR*)old_path, &directory, &source_name);
if (error != 0) { return error; }
if (PFSTR_StrNCmp(&source_name, (const pf_s8*)"..", 1, 0, 2) == 0) { return 10; }
if (PFSTR_StrNCmp(&source_name, (const pf_s8*)".", 1, 0, 1) == 0) { return 10; }
{
pf_u32 directory_sector;
PFDIR_SFD* file = ((PFDIR_VOLUME_DIRS*)volume)->sfds;
directory_sector = volume->bpb.first_data_sector +
pf_u32 directory_sector = volume->bpb.first_data_sector +
((source_entry.start_cluster - 2) << volume->bpb.log2_sectors_per_cluster);
for (index = 0; index < 5; index++, file++) {
if ((file->stat & 1) != 0 && (file->stat & 2) != 0) {
if (volume == file->dir_entry.p_vol && directory_sector == file->dir_entry.entry_sector) { return 0x13; }
if (file->dir_entry.p_vol == volume && file->dir_entry.entry_sector == directory_sector) { return 0x13; }
found = 0;
error = PFENT_ITER_FindCluster(&file->dir_entry, source_entry.start_cluster, &found);
if (error != 0) { return error; }
@@ -1118,11 +1115,12 @@ pf_s32 PFDIR_p_move(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
}
destination_entry.start_cluster = destination_parent.start_cluster;
for (;;) {
pf_u32 parent_cluster;
if (destination_entry.start_cluster == 1 || destination_entry.start_cluster == 0) { break; }
PFFAT_InitFFD(&destination_iter.ffd, &destination_hint, volume, &destination_entry.start_cluster);
PFSTR_InitStr(&parent_name, (const pf_s8*)"..", 1);
PFSTR_SetLocalStr(&parent_name, 0);
error = PFENT_findEntry(&destination_iter.ffd, &destination_entry, 0, &parent_name, 0x7F, 0);
error = PFENT_findEntry(&destination_iter.ffd, &destination_entry, 0, &parent_name, 0x7F, 0, 0);
if (error != 0) { return error; }
parent_cluster = destination_entry.start_cluster;
if (parent_cluster == 1 || parent_cluster == 0) { break; }
@@ -1142,10 +1140,9 @@ pf_s32 PFDIR_p_move(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
parse_error = PFPATH_parseShortName(destination_entry.short_name, &destination_name);
if (destination_entry.short_name[0] == 0) { return 2; }
if (source_entry.num_entry_LFNs != 0 && (source_entry.small_letter_flag & 0x18) == 0) {
pf_u32 entry_index;
saved_initial_char = source_entry.long_name[0];
source_entry.long_name[0] = 0;
for (entry_index = 1; entry_index <= source_entry.num_entry_LFNs; entry_index++) {
for (index = 1; index <= source_entry.num_entry_LFNs; index++) {
error = PFENT_ITER_Retreat(&source_iter, 0);
if (error != 0) { return error; }
error = PFSEC_WriteData(volume, deleted_marker, source_iter.sector,
@@ -1183,7 +1180,7 @@ pf_s32 PFDIR_p_move(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
if (allocation_error != 0) {
if (source_entry.num_entry_LFNs != 0 && (source_entry.small_letter_flag & 0x18) == 0) {
source_entry.long_name[0] = saved_initial_char;
source_entry.entry_offset -= ((pf_u32)source_entry.num_entry_LFNs << 5) & (0xffU << 5);
source_entry.entry_offset -= (source_entry.num_entry_LFNs & 0xff) * 32;
}
update_entry = &source_entry;
} else {
@@ -1195,7 +1192,7 @@ pf_s32 PFDIR_p_move(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
PFFAT_InitFFD(&source_iter.ffd, &source_hint, volume, &source_entry.start_cluster);
PFSTR_InitStr(&parent_name, (const pf_s8*)"..", 1);
PFSTR_SetLocalStr(&parent_name, 0);
error = PFENT_findEntry(&source_iter.ffd, &source_entry, 0, &parent_name, 0x7F, 0);
error = PFENT_findEntry(&source_iter.ffd, &source_entry, 0, &parent_name, 0x7F, 0, 0);
if (error != 0) { return error; }
if (destination_parent.start_cluster == 1 || destination_parent.start_cluster == 0 ||
(destination_parent.start_cluster == 2 && volume->bpb.fat_type == FAT_32)) {
@@ -1233,164 +1230,6 @@ pf_s32 PFDIR_p_move(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
return allocation_error;
}
pf_s32 PFDIR_p_fsnext(PF_DTA* data) {
PFDIR_FFD ffd;
PFDIR_FAT_HINT hint;
PF_DIR_ENT entry;
PFDIR_STR pattern;
pf_u32 logical_position = 0;
pf_u32 entry_position = 0;
pf_u32 code_mode;
pf_s32 index = 0;
pf_s32 error;
if ((data->status & 1) == 1) {
code_mode = 1;
error = PFSTR_InitStr(&pattern, data->reg_exp, code_mode);
} else {
code_mode = 2;
error = PFSTR_InitStr(&pattern, (const pf_s8*)((PF_DTAW*)data)->reg_expW, code_mode);
}
if (error != 0) {
return error;
}
PFSTR_SetLocalStr(&pattern, (pf_u32)data->reg_exp);
while (entry_position < 999999) {
if (data->parent_pos >= 999999) { return 10; }
entry.start_cluster = data->parent_start_cluster;
PFFAT_InitFFD(&ffd, &hint, data->p_vol, &entry.start_cluster);
error = PFENT_findEntryPos(&ffd, &entry, data->parent_pos, &pattern, data->attr, 0,
&logical_position, &entry_position);
if (error != 0) { return error; }
data->parent_pos = entry_position + 1;
if (entry_position == 999999) { return 3; }
else { break; }
}
pf_strcpy(data->FileName, entry.short_name);
if ((data->status & 2) == 2) {
PFPATH_transformInUnicode(((PF_DTAW*)data)->FileNameW, data->FileName);
}
if (entry.long_name[0] != 0) {
if ((pf_vol_set.setting & 2) == 2) {
pf_vol_set.setting &= 0xFFFFFFFC;
pf_vol_set.setting |= 1;
PFPATH_transformFromUnicodeToNormal(data->LongName, entry.long_name);
pf_vol_set.setting &= 0xFFFFFFFC;
pf_vol_set.setting |= 2;
} else {
PFPATH_transformFromUnicodeToNormal(data->LongName, entry.long_name);
}
if ((data->status & 2) == 2) {
pf_w_strcpy(((PF_DTAW*)data)->LongNameW, entry.long_name);
}
} else {
data->LongName[0] = 0;
if ((data->status & 2) == 2) {
((PF_DTAW*)data)->LongNameW[0] = 0;
}
}
if (((PFDIR_VOLUME_DIRS*)data->p_vol)->num_opened_files != 0) {
for (index = 0; index < 5; index++) {
if ((((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].stat & 1) != 0 && (((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].stat & 2) != 0 &&
entry.p_vol == ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.p_vol &&
((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.entry_sector == entry.entry_sector &&
((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.entry_offset == entry.entry_offset) {
data->FileSize = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.file_size;
data->Time = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.modify_time;
data->Date = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.modify_date;
data->Attribute = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.attr;
data->num_entry_LFNs = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.num_entry_LFNs;
data->ordinal = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.ordinal;
data->check_sum = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.check_sum;
break;
}
}
}
if (((PFDIR_VOLUME_DIRS*)data->p_vol)->num_opened_files == 0 || index == 5) {
data->FileSize = entry.file_size;
data->Time = entry.modify_time;
data->Date = entry.modify_date;
data->Attribute = entry.attr;
data->num_entry_LFNs = entry.num_entry_LFNs;
data->ordinal = entry.ordinal;
data->check_sum = entry.check_sum;
}
return 0;
}
pf_s32 PFDIR_p_fsfirst(PF_VOLUME* volume, PF_STR* path, pf_u8 attributes, PF_DTA* data) {
PFDIR_STR directory;
PFDIR_STR pattern;
PF_DIR_ENT entry;
PF_ENT_ITER iter;
pf_s32 error;
error = PFPATH_SplitPathPattern(path, &directory, &pattern);
if (error != 0) {
return error;
}
error = PFENT_ITER_GetEntryOfPattern(&iter, &entry, volume, &directory);
if (error != 0) {
return error;
}
if ((entry.attr & 0x10) == 0) {
return 0x14;
}
data->parent_start_cluster = entry.start_cluster;
data->parent_pos = 0;
data->p_vol = entry.p_vol;
data->attr = attributes;
data->status = 0;
if (PFSTR_GetCodeMode(&pattern) == 1) {
PFPATH_SetSearchPattern(data->reg_exp, 0, &pattern);
data->status |= 1;
} else {
PFPATH_SetSearchPattern(data->reg_exp, ((PF_DTAW*)data)->reg_expW, &pattern);
data->status |= 2;
}
return PFDIR_p_fsnext(data);
}
pf_s32 PFDIR_p_fsexec_chmod(PF_DTA* data, PF_DIR_ENT* entry, pf_u32 mode, pf_u32 attributes) {
PFDIR_VOLUME_DIRS* volume_dirs = (PFDIR_VOLUME_DIRS*)entry->p_vol;
pf_u16 date;
pf_u16 time;
pf_u8 create_time_ms;
pf_s32 index = 0;
pf_s32 error;
if ((attributes & 0x40) != 0) {
attributes = (pf_u8)(attributes & ~0x40);
}
if ((entry->attr & 0x10) != 0) {
if ((attributes & 4) != 0) {
return 10;
}
if (directory_is_open(entry) != 0) { return 0x13; }
entry->attr = attributes | 0x10;
} else {
if ((attributes & 0x10) != 0) {
return 10;
}
if (PFFILE_IsOpened(entry) != 0) {
return 0x13;
}
entry->attr = attributes;
}
PFENT_getcurrentDateTimeForEnt(&entry->access_date, &time);
error = PFENT_updateEntry(entry, 0);
if (error != 0) {
return error;
}
if ((mode & 0x80000000) == 0) {
data->Attribute = entry->attr;
}
error = PFCACHE_FlushDataCacheSpecific(entry->p_vol, 0);
if (error != 0) { return error; }
return 0;
}
pf_s32 PFDIR_p_fsexec_remove(PF_DTA* data, PF_DIR_ENT* entry, PF_ENT_ITER* iter) {
PFDIR_VOLUME_DIRS* volume_dirs = (PFDIR_VOLUME_DIRS*)entry->p_vol;
PFDIR_FAT_HINT hint;
@@ -1444,6 +1283,47 @@ pf_s32 PFDIR_p_fsexec_remove(PF_DTA* data, PF_DIR_ENT* entry, PF_ENT_ITER* iter)
return release_directory_chain(&iter->ffd, start_cluster, chain_size);
}
pf_s32 PFDIR_p_fsexec_chmod(PF_DTA* data, PF_DIR_ENT* entry, pf_u32 mode, pf_u32 attributes) {
PFDIR_VOLUME_DIRS* volume_dirs = (PFDIR_VOLUME_DIRS*)entry->p_vol;
pf_u16 date;
pf_u16 time;
pf_u8 create_time_ms;
pf_s32 index = 0;
pf_s32 error;
if ((attributes & 0x40) != 0) {
attributes = (pf_u8)(attributes & ~0x40);
}
if ((entry->attr & 0x10) != 0) {
if ((attributes & 4) != 0) {
return 10;
}
if (directory_is_open(entry) != 0) { return 0x13; }
entry->attr = attributes | 0x10;
} else {
if ((attributes & 0x10) != 0) {
return 10;
}
if (PFFILE_IsOpened(entry) != 0) {
return 0x13;
}
entry->attr = attributes;
}
PFENT_getcurrentDateTimeForEnt(&entry->access_date, &time);
error = PFENT_updateEntry(entry, 0);
if (error != 0) {
return error;
}
if ((mode & 0x80000000) == 0) {
data->Attribute = entry->attr;
}
error = PFCACHE_FlushDataCacheSpecific(entry->p_vol, 0);
if (error != 0) { return error; }
return 0;
}
pf_s32 PFDIR_p_fsexec_fopen(PF_DTA* data, PF_DIR_ENT* entry, PF_ENT_ITER* iter, pf_u32 flags,
pf_u32 mode) {
pf_s8 long_name[13];
@@ -2030,3 +1910,121 @@ void PFDIR_chdmod(PF_STR* path, pf_u8 attributes) {
}
volume_dirs->cache.signature = 0;
}
pf_s32 PFDIR_p_fsnext(PF_DTA* data) {
PFDIR_FFD ffd;
PFDIR_FAT_HINT hint;
PF_DIR_ENT entry;
PFDIR_STR pattern;
pf_u32 logical_position = 0;
pf_u32 entry_position = 0;
pf_u32 code_mode;
pf_s32 index = 0;
pf_s32 error;
if ((data->status & 1) == 1) {
code_mode = 1;
error = PFSTR_InitStr(&pattern, data->reg_exp, code_mode);
} else {
code_mode = 2;
error = PFSTR_InitStr(&pattern, (const pf_s8*)((PF_DTAW*)data)->reg_expW, code_mode);
}
if (error != 0) {
return error;
}
PFSTR_SetLocalStr(&pattern, (pf_u32)data->reg_exp);
while (entry_position < 999999) {
if (data->parent_pos >= 999999) { return 10; }
entry.start_cluster = data->parent_start_cluster;
PFFAT_InitFFD(&ffd, &hint, data->p_vol, &entry.start_cluster);
error = PFENT_findEntryPos(&ffd, &entry, data->parent_pos, &pattern, data->attr, 0,
&logical_position, &entry_position);
if (error != 0) { return error; }
data->parent_pos = entry_position + 1;
if (entry_position == 999999) { return 3; }
else { break; }
}
pf_strcpy(data->FileName, entry.short_name);
if ((data->status & 2) == 2) {
PFPATH_transformInUnicode(((PF_DTAW*)data)->FileNameW, data->FileName);
}
if (entry.long_name[0] != 0) {
if ((pf_vol_set.setting & 2) == 2) {
pf_vol_set.setting &= 0xFFFFFFFC;
pf_vol_set.setting |= 1;
PFPATH_transformFromUnicodeToNormal(data->LongName, entry.long_name);
pf_vol_set.setting &= 0xFFFFFFFC;
pf_vol_set.setting |= 2;
} else {
PFPATH_transformFromUnicodeToNormal(data->LongName, entry.long_name);
}
if ((data->status & 2) == 2) {
pf_w_strcpy(((PF_DTAW*)data)->LongNameW, entry.long_name);
}
} else {
data->LongName[0] = 0;
if ((data->status & 2) == 2) {
((PF_DTAW*)data)->LongNameW[0] = 0;
}
}
if (((PFDIR_VOLUME_DIRS*)data->p_vol)->num_opened_files != 0) {
for (index = 0; index < 5; index++) {
if ((((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].stat & 1) != 0 && (((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].stat & 2) != 0 &&
entry.p_vol == ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.p_vol &&
((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.entry_sector == entry.entry_sector &&
((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.entry_offset == entry.entry_offset) {
data->FileSize = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.file_size;
data->Time = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.modify_time;
data->Date = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.modify_date;
data->Attribute = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.attr;
data->num_entry_LFNs = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.num_entry_LFNs;
data->ordinal = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.ordinal;
data->check_sum = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.check_sum;
break;
}
}
}
if (((PFDIR_VOLUME_DIRS*)data->p_vol)->num_opened_files == 0 || index == 5) {
data->FileSize = entry.file_size;
data->Time = entry.modify_time;
data->Date = entry.modify_date;
data->Attribute = entry.attr;
data->num_entry_LFNs = entry.num_entry_LFNs;
data->ordinal = entry.ordinal;
data->check_sum = entry.check_sum;
}
return 0;
}
pf_s32 PFDIR_p_fsfirst(PF_VOLUME* volume, PF_STR* path, pf_u8 attributes, PF_DTA* data) {
PFDIR_STR directory;
PFDIR_STR pattern;
PF_DIR_ENT entry;
PF_ENT_ITER iter;
pf_s32 error;
error = PFPATH_SplitPathPattern(path, &directory, &pattern);
if (error != 0) {
return error;
}
error = PFENT_ITER_GetEntryOfPattern(&iter, &entry, volume, &directory);
if (error != 0) {
return error;
}
if ((entry.attr & 0x10) == 0) {
return 0x14;
}
data->parent_start_cluster = entry.start_cluster;
data->parent_pos = 0;
data->p_vol = entry.p_vol;
data->attr = attributes;
data->status = 0;
if (PFSTR_GetCodeMode(&pattern) == 1) {
PFPATH_SetSearchPattern(data->reg_exp, 0, &pattern);
data->status |= 1;
} else {
PFPATH_SetSearchPattern(data->reg_exp, ((PF_DTAW*)data)->reg_expW, &pattern);
data->status |= 2;
}
return PFDIR_p_fsnext(data);
}

View File

@@ -1105,13 +1105,7 @@ s32 PFVOL_attach(PFVOL_DRIVER* driver, s32 notify_command, void* callback_data)
pf_vol_set.num_attached_drives++;
if (PFDRV_IsInserted(volume) != 0) {
driver->stat |= 0x10;
error = clear_mount(volume);
if (error != 0) {
pf_vol_set.last_error = error;
volume->last_error = error;
return 0;
}
driver->stat |= 2;
attach_mount(volume, driver);
}
return 0;
}
@@ -1475,21 +1469,17 @@ s32 PFVOL_setcode(PFVOL_CHARCODE* code_set) {
return copy_codeset(code_set);
}
static inline u32 ContextStatus(const PFVOL_CONTEXT* context) {
return context->stat & 1;
}
s32 PFVOL_regctx(void) {
u32 context_index;
s32 free_context_index;
s32 context_id;
s32 free_context_index;
u32 context_index;
s32 error;
error = PFSYS_GetCurrentContextID(&context_id);
if (error != 0) { pf_vol_set.last_error = 26; return 26; }
free_context_index = 0;
for (context_index = 1; context_index < 4; context_index++) {
u32 stat;
stat = ContextStatus(&pf_vol_set.context[context_index - 1]);
stat = pf_vol_set.context[context_index - 1].stat & 1;
if (stat != 0 && pf_vol_set.context[context_index - 1].context_id == context_id) { break; }
if (stat == 0 && free_context_index == 0) { free_context_index = context_index; }
}

View File

@@ -562,13 +562,11 @@ static inline u32 kbdChannelFlags(u32 channel) {
}
static void kbd_led_handler(BOOL success, void* callbackArg) {
const KBDLEDCallbackData* callback;
u32 index;
u32 err;
index = (u32)callbackArg;
callback = &kbdLCBuf[index];
kbdCmdBuf[index].device = 0;
if (callback->callbackAddress == (USBKBDCmdLEDCallback)(u32)kbdCmdBuf[index].device) {
if (kbdLCBuf[index].callbackAddress == (USBKBDCmdLEDCallback)(u32)kbdCmdBuf[index].device) {
return;
}
switch (success) {

View File

@@ -276,15 +276,14 @@ static inline f32 object_interval_distance(f32 interval) {
const f32 sensorIntervalConversion = 0.383864f;
static void reset_kpad(KPADInside* kpad) {
f32 sensorDistance;
f32 upperY;
f32 distanceValue;
f32 zero;
f32 upperY;
f32 sensorDistance;
f32 lowerY;
f32 one;
f32 negativeOne;
KPADDPDObject* object;
f32 calibratedDistance;
negativeOne = -1.0f;
one = 1.0f;
zero = 0.0f;
@@ -300,9 +299,8 @@ static void reset_kpad(KPADInside* kpad) {
kpad->value508 = negativeOne / kp_err_dist_speed;
kpad->value50C = kp_ah_circle_radius * kp_ah_circle_radius;
kpad->value514 = kp_err_dist_min;
calibratedDistance = kp_dist_vv1;
distanceValue = calibratedDistance / sensorDistance;
kpad->value510 = calibratedDistance;
distanceValue = kp_dist_vv1 / sensorDistance;
kpad->value510 = kp_dist_vv1;
kpad->status.release = 0;
kpad->status.trig = 0;
kpad->status.hold = 0;
@@ -856,33 +854,26 @@ static s8 select_1obj_continue(KPADInside* kpad) {
}
*matchedCandidate = *source;
{
f32 distance;
f32 normY;
f32 vertical;
f32 directionY;
f32 axisX = kpad->horizonTangent.x;
f32 normX = kpad->horizonAxis.x;
f32 axisY = kpad->horizonTangent.y;
f32 normY = kpad->horizonAxis.y;
f32 distance = kpad->dpdObjectDistance;
f32 horizontal = axisX * normX;
f32 vertical = axisY * normX;
f32 offsetX;
f32 axisY;
f32 horizontal;
f32 axisX;
f32 directionX;
f32 normX;
f32 directionY;
f32 offsetY;
f32 tangentY;
f32 tangentX;
axisX = kpad->horizonTangent.x;
normX = kpad->horizonAxis.x;
axisY = kpad->horizonTangent.y;
normY = kpad->horizonAxis.y;
distance = kpad->dpdObjectDistance;
horizontal = axisX * normX;
vertical = axisY * normX;
tangentY = axisY * normY;
tangentX = axisX * normY;
directionX = horizontal + tangentY;
directionY = vertical - tangentX;
offsetX = distance * directionX;
offsetX = directionX * distance;
kpad->dpdObjectDirection.x = directionX;
offsetY = distance * directionY;
offsetY = directionY * distance;
kpad->dpdObjectDirection.y = directionY;
if (matchedCandidate == kpad->dpdState.candidates) {
kpad->dpdState.candidates[1].x = matchedCandidate->x + offsetX;

View File

@@ -202,40 +202,33 @@ static inline NWC24Err WriteMBNoReplyField(NWC24MsgObjPrivate* msg) {
return err;
}
typedef struct {
u32 flags;
char* buffer;
} MBFieldWork;
static inline NWC24Err WriteMBRegDateField(NWC24MsgObjPrivate* msg) {
MBFieldWork field;
static inline NWC24Err WriteMBRegDateField(NWC24MsgObjPrivate* msg, u32 flags) {
NWC24Err err;
s32 length;
field.flags = msg->msgBoardFlags.raw & 0xFFFF;
if (!field.flags)
char* buffer;
if (!flags)
return NWC24_OK;
field.buffer = NWC24WorkP->stringWork;
Mail_memset(field.buffer, 0, 1024);
Mail_sprintf(field.buffer, "X-Wii-MB-RegDate: %04X\r\n", field.flags);
length = STD_strnlen(field.buffer, 1024);
err = NWC24FWrite(field.buffer, length, m_pFile);
buffer = NWC24WorkP->stringWork;
Mail_memset(buffer, 0, 1024);
Mail_sprintf(buffer, "X-Wii-MB-RegDate: %04X\r\n", flags);
length = STD_strnlen(buffer, 1024);
err = NWC24FWrite(buffer, length, m_pFile);
if (err == NWC24_OK)
msg->length += length;
return err;
}
static inline NWC24Err WriteMBDelayField(NWC24MsgObjPrivate* msg) {
MBFieldWork field;
static inline NWC24Err WriteMBDelayField(NWC24MsgObjPrivate* msg, u32 flags) {
NWC24Err err;
s32 length;
field.flags = msg->msgBoardFlags.raw & 0xFF0000;
if (!field.flags)
char* buffer;
if (!flags)
return NWC24_OK;
field.buffer = NWC24WorkP->stringWork;
Mail_memset(field.buffer, 0, 1024);
Mail_sprintf(field.buffer, "X-Wii-MB-Delay: %02X\r\n", field.flags >> 16);
length = STD_strnlen(field.buffer, 1024);
err = NWC24FWrite(field.buffer, length, m_pFile);
buffer = NWC24WorkP->stringWork;
Mail_memset(buffer, 0, 1024);
Mail_sprintf(buffer, "X-Wii-MB-Delay: %02X\r\n", flags >> 16);
length = STD_strnlen(buffer, 1024);
err = NWC24FWrite(buffer, length, m_pFile);
if (err == NWC24_OK)
msg->length += length;
return err;
@@ -313,8 +306,8 @@ static NWC24Err NWC24CommitMsgInternal(NWC24MsgObjPrivate* msg, NWC24MBoxType ty
CHECK_WRITE(WriteIconNewField(msg));
if (msg->msgBoardFlags.raw != 0) {
CHECK_WRITE(WriteMBNoReplyField(msg));
CHECK_WRITE(WriteMBRegDateField(msg));
CHECK_WRITE(WriteMBDelayField(msg));
{ u16 dateFlags = msg->msgBoardFlags.raw; CHECK_WRITE(WriteMBRegDateField(msg, dateFlags)); }
CHECK_WRITE(WriteMBDelayField(msg, msg->msgBoardFlags.raw & 0xFF0000));
}
}
CHECK_WRITE(WriteExtraFields(msg));

View File

@@ -19,7 +19,7 @@ static inline NWC24Err SelectMBox(const NWC24MsgObjPrivate* msg, NWC24MBoxType*
}
NWC24Err NWC24ReadMsgField(const NWC24MsgObj* msg, char* fieldName, u8* output, u32 capacity) {
NWC24MsgObjPrivate* privateMsg = (NWC24MsgObjPrivate*)msg;
const NWC24MsgObjPrivate* privateMsg = (const NWC24MsgObjPrivate*)msg;
NWC24File file;
NWC24FileStream stream;
char* field;
@@ -268,7 +268,7 @@ NWC24Err NWC24ReadMsgMBOptOutFlag(const NWC24MsgObj* msg, BOOL* optOut, u32* app
}
NWC24Err NWC24ReadMsgFromAddr(const NWC24MsgObj* msg, char* address, u32 capacity) {
NWC24MsgObjPrivate* privateMsg = (NWC24MsgObjPrivate*)msg;
const NWC24MsgObjPrivate* privateMsg = (const NWC24MsgObjPrivate*)msg;
NWC24MBoxType type;
NWC24File file;
NWC24FileStream stream;
@@ -312,7 +312,7 @@ NWC24Err NWC24ReadMsgFromAddr(const NWC24MsgObj* msg, char* address, u32 capacit
}
NWC24Err NWC24ReadMsgSubject(const NWC24MsgObj* msg, char* subject, u32 capacity) {
NWC24MsgObjPrivate* privateMsg = (NWC24MsgObjPrivate*)msg;
const NWC24MsgObjPrivate* privateMsg = (const NWC24MsgObjPrivate*)msg;
NWC24MBoxType type;
NWC24File file;
u32 length;
@@ -386,14 +386,14 @@ NWC24Err NWC24ReadMsgTextEx(const NWC24MsgObj* msg, char* text, u32 capacity, ch
}
static NWC24Err ReadMsgTextInternal(const NWC24MsgObj* msg, char* text, u32 capacity, char* charset, u32 charsetCapacity, NWC24Encoding* encoding) {
u32 length;
char* buffer;
NWC24MBoxType type;
NWC24File file;
NWC24Err result, closeResult;
NWC24Err overflow = NWC24_OK;
char* buffer;
u32 length;
u32 decodedSize;
NWC24MsgObjPrivate* privateMsg = (NWC24MsgObjPrivate*)msg;
const NWC24MsgObjPrivate* privateMsg = (const NWC24MsgObjPrivate*)msg;
if (!NWC24IsMsgLibOpened() && !NWC24IsMsgLibOpenedByTool())
return NWC24_ERR_LIB_NOT_OPENED;
if (!(privateMsg->type & 0x200))
@@ -481,7 +481,7 @@ close:
}
NWC24Err NWC24ReadMsgAttached(const NWC24MsgObj* msg, u32 index, u8* output, u32 capacity) {
NWC24MsgObjPrivate* privateMsg = (NWC24MsgObjPrivate*)msg;
const NWC24MsgObjPrivate* privateMsg = (const NWC24MsgObjPrivate*)msg;
NWC24File file;
NWC24MBoxType type;
u32 decodedSize;
@@ -510,8 +510,11 @@ NWC24Err NWC24ReadMsgAttached(const NWC24MsgObj* msg, u32 index, u8* output, u32
}
decodedSize = 0;
result = ReadBase64Data(&file, &privateMsg->attached[index], output, capacity, &decodedSize);
if (result == NWC24_OK) {
if (decodedSize != ((const NWC24MsgObjPrivate*)msg)->attachedSize[index]) result = NWC24_ERR_FORMAT;
switch (result) {
case NWC24_OK:
if (decodedSize != privateMsg->attachedSize[index]) { result = NWC24_ERR_FORMAT; }
break;
default: break;
}
closeResult = NWC24iMBoxCloseMsg(&file);
if (result == NWC24_OK)

View File

@@ -1,4 +1,3 @@
#define BS2_MACH_VOLATILE_DVD_STATE
#define BS2_MACH_FIVE_ARG_READ
#include "BS2/BS2.h"
#include "BS2/BS2BringUp.h"
@@ -65,7 +64,7 @@ volatile int CacheFailed = 0;
volatile int RegionValid = 0;
volatile int NandPending = 0;
vu32 CancelNand = 0;
vu32 LowReadResult = 0;
u32 LowReadResult = 0;
u32 CacheCommandComplete = 0;
u32 AudioBufferUnconfigured = 0;
u64 ResetTime = 0;
@@ -578,7 +577,7 @@ void BS2StartGame() {
u32 (*entry)(void);
StartingGame = TRUE;
while (CoverBlock.state != DVD_STATE_IDLE) {
while (DVDGetCommandBlockStatus(&CoverBlock) != DVD_STATE_IDLE) {
}
BS2Report("BS2StartGame(1)\n");
@@ -678,6 +677,8 @@ void BS2StartGame() {
LowReadResult = 0;
DVDLowReadDiskID(&DiskID, (DVDLowCallback)callback);
while (LowReadResult == 0) {
BOOL enabled = OSDisableInterrupts();
OSRestoreInterrupts(enabled);
}
status = LowReadResult;
@@ -692,6 +693,8 @@ void BS2StartGame() {
LowReadResult = 0;
DVDLowRequestError((DVDLowCallback)callback);
while (LowReadResult == 0) {
BOOL enabled = OSDisableInterrupts();
OSRestoreInterrupts(enabled);
}
driveError = DVDLowGetImmBufferReg() & 0xFF000000;
if (driveError == 0x01000000 || (driveError = DVDLowGetImmBufferReg() & 0xFF000000) == 0x03000000) {
@@ -726,6 +729,8 @@ disk_done:
(DVDLowCallback)callback);
}
while (LowReadResult == 0) {
BOOL enabled = OSDisableInterrupts();
OSRestoreInterrupts(enabled);
}
status = LowReadResult;
@@ -743,6 +748,8 @@ disk_done:
LowReadResult = 0;
DVDLowRequestError((DVDLowCallback)callback);
while (LowReadResult == 0) {
BOOL enabled = OSDisableInterrupts();
OSRestoreInterrupts(enabled);
}
driveError = DVDLowGetImmBufferReg() & 0xFF000000;
if (driveError == 0x01000000 || (driveError = DVDLowGetImmBufferReg() & 0xFF000000) == 0x03000000) {

View File

@@ -9,10 +9,14 @@
#include <string.h>
typedef struct UpdateThreadData {
OSThread thread;
u8 stack[4096];
} UpdateThreadData;
static u32 Flags0[BS2_UPDATE_ENTRY_COUNT] = {0};
static u32 Flags1[BS2_UPDATE_ENTRY_COUNT] = {0};
static OSThread Thread = {0};
static u8 ThreadStack[4096] = {0};
static UpdateThreadData Thread = {0};
static BS2UpdateHeader UpdateHeader0 ALIGN32 = {0};
static BS2UpdateHeader UpdateHeader1 ALIGN32 = {0};
@@ -35,7 +39,7 @@ static u32 UpdateImportResult = 0;
u32 StartUpdate = 0;
u32 CancelUpdate = 0;
static u32 UpdateProgress = 0;
static volatile s32 rc = 0;
static s32 rc = 0;
static u64 VersionIOS = 0;
static u32 VersionMEM2 = 0;
static u32 VersionES = 0;
@@ -72,9 +76,9 @@ void BS2UpdateInit(void* allocator) {
memset(EntriesToImport, 0, 0x40000);
memset(Flags1, 0, sizeof(Flags1));
BS2Report("Create update thread\n");
OSCreateThread(&Thread, UpdateThread, NULL, ThreadStack + sizeof(ThreadStack),
sizeof(ThreadStack), 31, 1);
OSResumeThread(&Thread);
OSCreateThread(&Thread.thread, UpdateThread, NULL, Thread.stack + sizeof(Thread.stack),
sizeof(Thread.stack), 31, 1);
OSResumeThread(&Thread.thread);
}
static void* UpdateThread(void* argument) {

View File

@@ -249,14 +249,13 @@ void LayoutByNW4R::create(MEMAllocator* allocator) {
animationCount = paneInfo.animationCount;
u16 animationIndex = 0;
while (animationIndex < animationCount) {
const AnimationFile* const& animation = paneInfo.animations[animationIndex];
void* resource = mpMultiArcResourceAccessor->GetResource(0, animation->name);
void* resource = mpMultiArcResourceAccessor->GetResource(0, paneInfo.animations[animationIndex]->name);
AnimTransformPane* transform = static_cast<AnimTransformPane*>(
getLayout()->CreateAnimTransform(resource, mpMultiArcResourceAccessor));
if (forceName != NULL) {
pane->forceAddAnimation(allocator, animation->id, transform, forceName, false, true);
pane->forceAddAnimation(allocator, paneInfo.animations[animationIndex]->id, transform, forceName, false, true);
} else {
pane->addAnimation(allocator, animation->id, transform, false, true);
pane->addAnimation(allocator, paneInfo.animations[animationIndex]->id, transform, false, true);
}
++animationIndex;
}

View File

@@ -1607,12 +1607,8 @@ namespace ipl {
void Address::set_err_msg(wchar_t* errMsg, u32 errMsgLen, NWC24Err err) {
memset(errMsg, 0, errMsgLen * sizeof(wchar_t));
union MessageValue {
const wchar_t* text;
u32 id;
} message;
message.text = System::getMessage(MESG_ERROR_CODE);
wcsncat(errMsg, message.text, errMsgLen - wcslen(errMsg));
wcsncat(errMsg, System::getMessage(MESG_ERROR_CODE), errMsgLen - wcslen(errMsg));
u32 msgId = MESG_ERROR_CODE;
wchar_t errCode[32];
memset(errCode, 0, sizeof(errCode));
@@ -1621,22 +1617,17 @@ namespace ipl {
switch (err) {
case NWC24_ERR_NETWORK: {
message.id = MESG_ERROR_NWC24_NETWORK;
msgId = MESG_ERROR_NWC24_NETWORK;
break;
}
case NWC24_ERR_SERVER:
case NWC24_ERR_FULL: {
message.id = MESG_ERROR_NWC24_SERVER;
break;
}
default: {
message.id = reinterpret_cast<u32>(message.text);
msgId = MESG_ERROR_NWC24_SERVER;
break;
}
}
message.text = System::getMessage(message.id);
wcsncat(errMsg, message.text, errMsgLen - wcslen(errMsg));
wcsncat(errMsg, System::getMessage(msgId), errMsgLen - wcslen(errMsg));
}
void Address::entry_friend() {

View File

@@ -2125,8 +2125,6 @@ state0:
goto state0Common;
case 3:
goto state0Button3;
case 4:
goto done;
default:
goto done;
}
@@ -2158,14 +2156,11 @@ state0Button3: {
nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName(paneName, true);
ipl::math::VEC3 position(0.0f, 0.0f, 0.0f);
PSMTXMultVec(pane->GetGlobalMtx(), reinterpret_cast<Vec*>(&position), reinterpret_cast<Vec*>(&position));
f32 xOffset;
f32 scale;
f32 height;
xOffset = 15.0f;
height = 50.0f;
scale = 0.5f;
f32 xOffset = 15.0f;
f32 height = 50.0f;
f32 scale = 0.5f;
position.x = position.x + xOffset;
position.y = position.y + height * scale;
position.y = position.y + scale * height;
(mpBalloon)
->setPos(position, false, 1);
(mpBalloon)->fadein();
@@ -2202,14 +2197,11 @@ state22Button3:
nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName(paneName, true);
ipl::math::VEC3 position(0.0f, 0.0f, 0.0f);
PSMTXMultVec(pane->GetGlobalMtx(), reinterpret_cast<Vec*>(&position), reinterpret_cast<Vec*>(&position));
f32 xOffset;
f32 scale;
f32 height;
xOffset = 15.0f;
height = 50.0f;
scale = 0.5f;
f32 xOffset = 15.0f;
f32 height = 50.0f;
f32 scale = 0.5f;
position.x = position.x + xOffset;
position.y = position.y + height * scale;
position.y = position.y + scale * height;
(mpBalloon)
->setPos(position, false, 1);
(mpBalloon)->fadein();
@@ -2258,8 +2250,6 @@ void ipl::scene::AddressEdit::start_left_event(const char* paneName) {
}
break;
}
case 4:
break;
default:
break;
}

View File

@@ -1,4 +1,3 @@
#define IPL_FOCUS_OBJECT_CPP
#include "scene/board/iplFocusObject.h"
#include "scene/parentalDialog/iplParentalDialog.h"
@@ -12,28 +11,6 @@
#include <revolution/cx.h>
#include <revolution/enc.h>
extern char scPaneName_B_Stop[];
namespace ipl {
namespace math {
static inline VEC3 addWeightedVectors(const VEC3& start, const VEC3& end) {
VEC3 sum;
nw4r::math::VEC3Add(&sum, &start, &end);
return sum;
}
static inline void normalizeVector(nw4r::math::VEC3* result, const VEC3& sum, f32 frames) {
nw4r::math::VEC3Scale(result, &sum, 1.0f / frames);
}
template <>
VEC3 LinearIntp<VEC3>::get() const {
nw4r::math::VEC3 result;
VEC3 sum = addWeightedVectors(mStart * (mMaxFrame - mFrame), mEnd * getCurrentFrame());
normalizeVector(&result, sum, getMaxFrame());
return result;
}
}
}
namespace ipl {
namespace scene {
// clang-format off
@@ -360,13 +337,6 @@ namespace ipl {
}
}
}
namespace math {
inline VEC3 VEC3::operator*(f32 val) const {
return VEC3(x * val, y * val, z * val);
}
}
namespace scene {
void focus_object::stt_normal() {
Button* button = get_button();
@@ -2121,7 +2091,7 @@ namespace ipl {
if (event == ::gui::EventHandler::ON_TRIG) {
if (con->downTrg(controller::BTN_INTERACT)) {
if (strcmp(paneName, scPaneName_B_Stop) == 0) {
if (strcmp(paneName, "B_Stop") == 0) {
if (mpInstance->mState == focus_object::STATE_NORMAL) {
focus_object::get_button()->animation(Button::IDANIM_OPTOUT_SELECT);
@@ -2142,24 +2112,3 @@ namespace ipl {
}
} // namespace scene
} // namespace ipl
char scPaneName_B_Stop[] = "B_Stop";
BOOL ipl::scene::scroller::calc(bool canScroll) {
BOOL result = FALSE;
if (canScroll) {
if (mBScroller.calc()) {
result = TRUE;
}
}
mScroller.calc();
f32 movable = mScroller.movable_pos(mBScroller.getSpeed());
mScroller.addScroll(movable);
mBScroller.addSoundFreq(movable);
return result;
}

View File

@@ -328,7 +328,7 @@ namespace ipl {
return isSceneCreated();
}
void SDButton::setEventHandler(::gui::EventHandler* event) {
void SDButton::setEventHandler(::gui::EventHandler* event, ::gui::EventHandler* optOutEvent) {
mpGui->setEventHandler(event);
}

View File

@@ -335,7 +335,7 @@ namespace ipl {
return true;
}
bool SDChannelSelect::enqueueChannelNotice(u64 titleId, u32 value) {
bool SDChannelSelect::enqueueChannelNotice(u32 controller, u32 page, u32 index, u32 value) {
if (mCurrentSDState != 6) {
return false;
}
@@ -344,7 +344,7 @@ namespace ipl {
command.type = 10;
command.arguments.values[0] = value;
command.arguments.values[1] = (u32)&mFirstTitleCount;
command.titleId = titleId;
command.titleId = ((u64)page << 32) | index;
mCommandQueue.push(command);
return true;
}
@@ -363,7 +363,7 @@ namespace ipl {
return true;
}
bool SDChannelSelect::enqueueStateNotice(u64 titleId, u32 state) {
bool SDChannelSelect::enqueueStateNotice(u32 controller, u32 page, u32 index, u32 state) {
if (mCurrentSDState != 6) {
return false;
}
@@ -372,7 +372,7 @@ namespace ipl {
command.type = 7;
command.arguments.values[0] = state;
command.arguments.values[1] = 0;
command.titleId = titleId;
command.titleId = ((u64)page << 32) | index;
mCommandQueue.push(command);
return true;
}

View File

@@ -282,7 +282,7 @@ FaderSceneCommand SDChannelTitle::calcFadein() {
if (!mpFade->isPlaying()) {
iplSDChannelTitle_playBannerIntro(this);
SDButton* button = static_cast<SDButton*>(System::getScene(0x24));
button->setEventHandler(mpButtonEventHandler);
button->setEventHandler(mpButtonEventHandler, NULL);
button->animation(13);
button->animation(14);
mState = 1;
@@ -344,7 +344,7 @@ void SDChannelTitle::initCalcFadeout() {
button->animation(15);
button->animation(16);
}
button->setEventHandler(NULL);
button->setEventHandler(NULL, NULL);
}
FaderSceneCommand SDChannelTitle::calcFadeout() {
@@ -736,7 +736,8 @@ extern "C" void iplSDChannelTitle_startCopyProgress(SDChannelTitle* scene) {
if (channel->mStateFlags == 3) {
scene->mState = 26;
scene->mErrorMessage = 0xaf;
} else if (scene->mpChannelSelect->enqueueChannelNotice(scene->mTitleId, reinterpret_cast<u32>(&scene->mTitleRange))) {
} else if (scene->mpChannelSelect->enqueueChannelNotice(0, static_cast<u32>(scene->mTitleId >> 32),
static_cast<u32>(scene->mTitleId), reinterpret_cast<u32>(&scene->mTitleRange))) {
scene->mState = 20;
} else {
scene->mState = 26;
@@ -825,7 +826,8 @@ extern "C" void iplSDChannelTitle_updateCopyStart(SDChannelTitle* scene) {
ESTitleId temporaryTitle = SCGetTmpTitleID();
if (temporaryTitle && scene->mTitleId != temporaryTitle) {
if (System::isReceiveScheduleStopped()) {
if (scene->mpChannelSelect->enqueueStateNotice(temporaryTitle, 1)) {
if (scene->mpChannelSelect->enqueueStateNotice(0, static_cast<u32>(temporaryTitle >> 32),
static_cast<u32>(temporaryTitle), 1)) {
scene->mState = 16;
} else {
scene->mState = 26;

View File

@@ -763,7 +763,7 @@ unlock_driver:
int ATERMFindChangedApRecord(AtermApRecordSet* currentRecords, AtermApRecordSet* previousRecords,
u32* changedIndex) {
u32 previousIndex;
u32 currentIndex;
u32 currentIndex = 0;
int found = 0;
int result = 0;
u32 ssidLength;
@@ -774,7 +774,6 @@ int ATERMFindChangedApRecord(AtermApRecordSet* currentRecords, AtermApRecordSet*
AtermApRecord* previousRecord = previousRecords->entries;
currentIndex = 0;
for (; currentIndex < currentRecords->count; currentIndex++) {
AtermSsidBuffer ssidName;
ssidName.clear.word0 = 0;
@@ -817,6 +816,8 @@ int ATERMFindChangedApRecord(AtermApRecordSet* currentRecords, AtermApRecordSet*
int currentHasAoss;
int previousHasAoss;
previousHasAoss = 0;
currentHasAoss = 0;
aossSsidName.clear.word0 = 0;
aossSsidName.clear.word1 = 0;
aossSsidName.clear.word2 = 0;
@@ -826,8 +827,6 @@ int ATERMFindChangedApRecord(AtermApRecordSet* currentRecords, AtermApRecordSet*
aossSsidName.clear.word6 = 0;
aossSsidName.clear.word7 = 0;
aossSsidName.clear.finalWord = 0;
currentHasAoss = 0;
previousHasAoss = 0;
currentRecord = currentRecords->entries;
previousRecord = previousRecords->entries;
@@ -1871,13 +1870,13 @@ int ATERMAesKeyWrap(u16* destination, u16* source, u32 length, void* key, u32 ke
union { u64 value; u8 bytes[8]; } counter;
u32 initialValue[2];
u8* outputBlock;
s32 blockIndex;
s32 blockOffset;
u8* destinationBytes;
const u8* sourceBytes;
s32 pass;
s32 blockCount;
u32 rounds;
s32 blockOffset;
s32 blockCount;
s32 pass;
s32 blockIndex;
int result = 1;
initialValue[1] = 0xA6A6A6A6;
@@ -1896,7 +1895,7 @@ int ATERMAesKeyWrap(u16* destination, u16* source, u32 length, void* key, u32 ke
memcpy(destinationBytes + 8, sourceBytes, length);
memcpy(block.bytes, initialValue, sizeof(initialValue));
for (pass = 0; pass < 6; pass++) {
for (blockIndex = 1, blockOffset = 8; blockIndex <= blockCount; blockIndex++, blockOffset += 8) {
for (blockOffset = 8, blockIndex = 1; blockIndex <= blockCount; blockIndex++, blockOffset += 8) {
u64 passBase = (u64)(s64)blockCount * (u64)(s64)pass;
u8* stateBytes = block.bytes;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,69 +0,0 @@
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVL_SDK/src/fa/api/FAAttach] pool: IDENTICAL
[libs/RVL_SDK/src/fa/api/FAAttach] objdiff: code None/500 data 240/240 functions 0/1 fuzzy 99.3600 linked code 0
[libs/RVL_SDK/src/fa/api/FAAttach] instruction-exact functions: 0/1
[libs/RVL_SDK/src/fa/api/FAAttach] section .bss size 208 match 100.0
[libs/RVL_SDK/src/fa/api/FAAttach] section .data size 24 match 100.0
[libs/RVL_SDK/src/fa/api/FAAttach] section .sdata size 8 match 100.0
[libs/RVL_SDK/src/fa/api/FAAttach] section .text size 500 match 99.36
[libs/RVL_SDK/src/fa/api/FAAttach] below 100: FAAttach 99.36
[libs/RVL_SDK/src/fa/api/FAAttach] baseline: code None/500 data 240 functions 0 fuzzy 99.3600
[src/bannerSound/AxAdpcmPlayer] pool: IDENTICAL
[src/bannerSound/AxAdpcmPlayer] objdiff: code 3088/3088 data 6476/6476 functions 13/13 fuzzy 100.0000 linked code 3088
[src/bannerSound/AxAdpcmPlayer] instruction-exact functions: 12/13
[src/bannerSound/AxAdpcmPlayer] section .bss size 6400 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .ctors size 4 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .data size 32 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .sbss size 16 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .sdata size 8 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .sdata2 size 16 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .text size 3088 match 100.0
[src/bannerSound/AxAdpcmPlayer] baseline: code 3088/3088 data 6476 functions 13 fuzzy 100.0000
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] objdiff: code 332/5200 data 96/180 functions 1/7 fuzzy 98.6539 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] instruction-exact functions: 1/7
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section .data size 40 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section .text size 5200 match 98.65385
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section extab size 56 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section extabindex size 84 match 97.61904
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_8148302C 99.49152
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_81483264 98.902435
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_81483308 99.13793
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_814833F0 99.04256
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_814834AC 99.3586
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8GetKOcandidates 97.96712
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] baseline: code 332/5200 data 96 functions 1 fuzzy 98.6539
[src/scene/board/iplFocusObject] pool: IDENTICAL
[src/scene/board/iplFocusObject] objdiff: code 20332/20332 data 2576/2576 functions 89/89 fuzzy 100.0000 linked code 0
[src/scene/board/iplFocusObject] instruction-exact functions: 89/89
[src/scene/board/iplFocusObject] section .data size 2168 match 100.0
[src/scene/board/iplFocusObject] section .rodata size 176 match 100.0
[src/scene/board/iplFocusObject] section .sdata size 176 match 100.0
[src/scene/board/iplFocusObject] section .sdata2 size 56 match 100.0
[src/scene/board/iplFocusObject] section .text size 20332 match 100.0
[src/scene/board/iplFocusObject] baseline: code 19772/20332 data 2576 functions 88 fuzzy 99.6471
[src/system/iplKeyboard] pool: IDENTICAL
[src/system/iplKeyboard] objdiff: code 4752/6024 data 1184/1184 functions 31/32 fuzzy 98.7351 linked code 0
[src/system/iplKeyboard] instruction-exact functions: 31/32
[src/system/iplKeyboard] section .data size 1168 match 100.0
[src/system/iplKeyboard] section .sdata size 8 match 100.0
[src/system/iplKeyboard] section .sdata2 size 8 match 100.0
[src/system/iplKeyboard] section .text size 6024 match 98.73506
[src/system/iplKeyboard] below 100: create__Q33ipl8keyboard7ManagerFPQ33ipl4nand4FilePQ23EGG4Heap 94.00944
[src/system/iplKeyboard] baseline: code 4752/6024 data 1184 functions 31 fuzzy 98.7351
[libs/RVL_SDK/src/fa/pf_dir] pool: IDENTICAL
[libs/RVL_SDK/src/fa/pf_dir] objdiff: code 18976/18976 data 40/40 functions 38/38 fuzzy 100.0000 linked code 0
[libs/RVL_SDK/src/fa/pf_dir] instruction-exact functions: 38/38
[libs/RVL_SDK/src/fa/pf_dir] section .sdata size 32 match 100.0
[libs/RVL_SDK/src/fa/pf_dir] section .sdata2 size 8 match 100.0
[libs/RVL_SDK/src/fa/pf_dir] section .text size 18976 match 100.0
[libs/RVL_SDK/src/fa/pf_dir] baseline: code 11704/18976 data 40 functions 35 fuzzy 99.5432
regressions vs baseline: 0
global matched_code_percent: 88.93407 -> 89.19556
global fuzzy_match_percent: 99.50078 -> 99.50607
global complete_code_percent: 65.19670 -> 65.19670
global matched_data_percent: 99.07044 -> 99.07044
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,126 +0,0 @@
# Fuzzy lane continuation
Baseline: `711ee737f98c1febb2e3d9580bec9be423fd3b19`. Four new exact functions; AxAdpcmPlayer was already matched and linked after origin/main #774.
| Unit | Instruction-exact before → after | Objdiff functions before → after | Code bytes before → after / total | Data bytes before → after / total |
| --- | --- | --- | --- | --- |
| `libs/RVL_SDK/src/fa/api/FAAttach` | 0/1 → 0/1 | 0/1 → 0/1 | 0 → 0 / 500 | 240 → 240 / 240 |
| `src/bannerSound/AxAdpcmPlayer` | 12/13 → 12/13 | 13/13 → 13/13 | 3088 → 3088 / 3088 | 6476 → 6476 / 6476 |
| `libs/RVLMiddleware/eZiText/src/clib/zkokeyp` | 1/7 → 1/7 | 1/7 → 1/7 | 332 → 332 / 5200 | 96 → 96 / 180 |
| `src/scene/board/iplFocusObject` | 88/89 → 89/89 | 88/89 → 89/89 | 19772 → 20332 / 20332 | 2576 → 2576 / 2576 |
| `src/system/iplKeyboard` | 31/32 → 31/32 | 31/32 → 31/32 | 4752 → 4752 / 6024 | 1184 → 1184 / 1184 |
| `libs/RVL_SDK/src/fa/pf_dir` | 35/38 → 38/38 | 35/38 → 38/38 | 11704 → 18976 / 18976 | 40 → 40 / 40 |
Instruction-exact counts above reproduce the gate. Ax reports 12/13 there despite objdiff 13/13; the existing CR1 branch-disassembly normalization issue is independently proven: `checkFile__19AxAdpcmSimplePlayerFPvUl` has all 372 encoded function bytes identical, while odiff displays two different CR1 branch targets. It contributes no new gain.
## Remaining functions
- `FAAttach` 99.36% — 125/125 instructions; ten index/scaled-index/table-base register differences. 3 distinct compiled source forms; attempts lines 3166–3168.
- `Zi8_8148302C` 99.49152% — 59/59 instructions; six work-pointer/value register differences. 4 distinct compiled source forms; attempts lines 3173–3176.
- `Zi8_81483264` 98.902435% — 41/41 instructions; eight metadata/index register differences. 9 distinct compiled source forms; attempts lines 3180–3190.
- `Zi8_81483308` 99.13793% — 58/58 instructions; nine count-pointer/index register differences. 7 distinct compiled source forms; attempts lines 3194–3200.
- `Zi8_814833F0` 99.04256% — 47/47 instructions; eight key/index register differences. 5 distinct compiled source forms; attempts lines 3205–3209.
- `Zi8_814834AC` 99.3586% — 344/343 instructions; extra narrowing in initialized-byte chain, operand scheduling and register differences. 21 distinct compiled source forms; attempts lines 3213–3235.
- `Zi8GetKOcandidates` 97.96712% — 673/669 instructions; extra zero load, helper-return narrowing, final postincrement copy, addressing/condition scheduling. 14 distinct compiled source forms; attempts lines 3241–3257.
- `create__Q33ipl8keyboard7ManagerFPQ33ipl4nand4FilePQ23EGG4Heap` 94.00944% — 318/318 instructions; allocation-result moves across null constructors, dictionary index scheduling and MemoSetting stack-temporary order. 24 distinct compiled source forms; attempts lines 3293–3318.
## Matched functions and source review
`focus_object::cmn_calc`: added a real VEC3 sum and result temporary, with reciprocal evaluation inside normalization; frame 0x60 → 0x70, 140/140 instructions, zero differences.
`PFDIR_p_move`: corrected the six-argument entry-search prototype, used the matching table entry as the current-directory base, moved the actual cluster read inside that helper, separated LFN traversal lifetimes; 631/631 instructions, zero differences.
`PFDIR_p_rename`: shared the typed filename cursor and separated the file, retreat and remaining-LFN counters; corrected error-return branches and count mask; 625/625 instructions, zero differences.
`PFDIR_p_mkdir`: ordinary 11-byte short-name loop and full real scalar declaration order, preserving addressable local order; 562/562 instructions, zero differences.
## Data proof
FAAttach 240/240, Ax 6476/6476, focus 2576/2576, keyboard 1184/1184, PF 40/40 already have all data matched. No config/symbol rename or extent edit was justified.
zkokeyp .data 40-byte ten-entry switch table is byte-identical and each relocation names the exact Zi8_81483118 at the same offset/addend. extab 56 bytes match. extabindex 84 bytes differ only at length words offset64 (1376 versus1372 for Zi8_814834AC) and offset76 (2692 versus2676 for Zi8GetKOcandidates). Exception relocations resolve to identical extab offsets0,8,16,24,32,40,48; anonymous compiler symbol names differ as expected. The candidate function begins four bytes later in our .text because the previous function has an extra instruction. The remaining data differences follow these two code lengths.
## Files and local commits
- `libs/RVL_SDK/src/fa/pf_dir.c`
- `src/scene/board/iplFocusObject.cpp`
- `tools/decomp-assist/fz1.attempts.md`
- `tools/decomp-assist/fz1.next.final-gate.txt`
- `tools/decomp-assist/fz1.next.report.md`
- d4976af8 match focus vector interpolation
- 0035e899 match directory move and correct entry prototype
- d5de7189 match directory rename traversal
- 9170cd3e match directory creation locals
The final evidence commit is identified in the final reply. Matching phase only; the gate retains the existing linked status.
## Final clean gate, verbatim
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVL_SDK/src/fa/api/FAAttach] pool: IDENTICAL
[libs/RVL_SDK/src/fa/api/FAAttach] objdiff: code None/500 data 240/240 functions 0/1 fuzzy 99.3600 linked code 0
[libs/RVL_SDK/src/fa/api/FAAttach] instruction-exact functions: 0/1
[libs/RVL_SDK/src/fa/api/FAAttach] section .bss size 208 match 100.0
[libs/RVL_SDK/src/fa/api/FAAttach] section .data size 24 match 100.0
[libs/RVL_SDK/src/fa/api/FAAttach] section .sdata size 8 match 100.0
[libs/RVL_SDK/src/fa/api/FAAttach] section .text size 500 match 99.36
[libs/RVL_SDK/src/fa/api/FAAttach] below 100: FAAttach 99.36
[libs/RVL_SDK/src/fa/api/FAAttach] baseline: code None/500 data 240 functions 0 fuzzy 99.3600
[src/bannerSound/AxAdpcmPlayer] pool: IDENTICAL
[src/bannerSound/AxAdpcmPlayer] objdiff: code 3088/3088 data 6476/6476 functions 13/13 fuzzy 100.0000 linked code 3088
[src/bannerSound/AxAdpcmPlayer] instruction-exact functions: 12/13
[src/bannerSound/AxAdpcmPlayer] section .bss size 6400 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .ctors size 4 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .data size 32 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .sbss size 16 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .sdata size 8 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .sdata2 size 16 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .text size 3088 match 100.0
[src/bannerSound/AxAdpcmPlayer] baseline: code 3088/3088 data 6476 functions 13 fuzzy 100.0000
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] objdiff: code 332/5200 data 96/180 functions 1/7 fuzzy 98.6539 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] instruction-exact functions: 1/7
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section .data size 40 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section .text size 5200 match 98.65385
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section extab size 56 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section extabindex size 84 match 97.61904
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_8148302C 99.49152
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_81483264 98.902435
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_81483308 99.13793
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_814833F0 99.04256
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_814834AC 99.3586
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8GetKOcandidates 97.96712
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] baseline: code 332/5200 data 96 functions 1 fuzzy 98.6539
[src/scene/board/iplFocusObject] pool: IDENTICAL
[src/scene/board/iplFocusObject] objdiff: code 20332/20332 data 2576/2576 functions 89/89 fuzzy 100.0000 linked code 0
[src/scene/board/iplFocusObject] instruction-exact functions: 89/89
[src/scene/board/iplFocusObject] section .data size 2168 match 100.0
[src/scene/board/iplFocusObject] section .rodata size 176 match 100.0
[src/scene/board/iplFocusObject] section .sdata size 176 match 100.0
[src/scene/board/iplFocusObject] section .sdata2 size 56 match 100.0
[src/scene/board/iplFocusObject] section .text size 20332 match 100.0
[src/scene/board/iplFocusObject] baseline: code 19772/20332 data 2576 functions 88 fuzzy 99.6471
[src/system/iplKeyboard] pool: IDENTICAL
[src/system/iplKeyboard] objdiff: code 4752/6024 data 1184/1184 functions 31/32 fuzzy 98.7351 linked code 0
[src/system/iplKeyboard] instruction-exact functions: 31/32
[src/system/iplKeyboard] section .data size 1168 match 100.0
[src/system/iplKeyboard] section .sdata size 8 match 100.0
[src/system/iplKeyboard] section .sdata2 size 8 match 100.0
[src/system/iplKeyboard] section .text size 6024 match 98.73506
[src/system/iplKeyboard] below 100: create__Q33ipl8keyboard7ManagerFPQ33ipl4nand4FilePQ23EGG4Heap 94.00944
[src/system/iplKeyboard] baseline: code 4752/6024 data 1184 functions 31 fuzzy 98.7351
[libs/RVL_SDK/src/fa/pf_dir] pool: IDENTICAL
[libs/RVL_SDK/src/fa/pf_dir] objdiff: code 18976/18976 data 40/40 functions 38/38 fuzzy 100.0000 linked code 0
[libs/RVL_SDK/src/fa/pf_dir] instruction-exact functions: 38/38
[libs/RVL_SDK/src/fa/pf_dir] section .sdata size 32 match 100.0
[libs/RVL_SDK/src/fa/pf_dir] section .sdata2 size 8 match 100.0
[libs/RVL_SDK/src/fa/pf_dir] section .text size 18976 match 100.0
[libs/RVL_SDK/src/fa/pf_dir] baseline: code 11704/18976 data 40 functions 35 fuzzy 99.5432
regressions vs baseline: 0
global matched_code_percent: 88.93407 -> 89.19556
global fuzzy_match_percent: 99.50078 -> 99.50607
global complete_code_percent: 65.19670 -> 65.19670
global matched_data_percent: 99.07044 -> 99.07044
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,107 +0,0 @@
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVL_SDK/src/fa/api/FAAttach] pool: IDENTICAL
[libs/RVL_SDK/src/fa/api/FAAttach] objdiff: code None/500 data 240/240 functions 0/1 fuzzy 99.3600 linked code 0
[libs/RVL_SDK/src/fa/api/FAAttach] instruction-exact functions: 0/1
[libs/RVL_SDK/src/fa/api/FAAttach] section .bss size 208 match 100.0
[libs/RVL_SDK/src/fa/api/FAAttach] section .data size 24 match 100.0
[libs/RVL_SDK/src/fa/api/FAAttach] section .sdata size 8 match 100.0
[libs/RVL_SDK/src/fa/api/FAAttach] section .text size 500 match 99.36
[libs/RVL_SDK/src/fa/api/FAAttach] below 100: FAAttach 99.36
[libs/RVL_SDK/src/fa/api/FAAttach] baseline: code None/500 data 240 functions 0 fuzzy 99.3600
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] objdiff: code 332/5200 data 96/180 functions 1/7 fuzzy 98.6539 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] instruction-exact functions: 1/7
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section .data size 40 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section .text size 5200 match 98.65385
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section extab size 56 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section extabindex size 84 match 97.61904
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_8148302C 99.49152
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_81483264 98.902435
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_81483308 99.13793
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_814833F0 99.04256
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_814834AC 99.3586
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8GetKOcandidates 97.96712
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] baseline: code 332/5200 data 96 functions 1 fuzzy 98.6539
[src/system/iplKeyboard] pool: IDENTICAL
[src/system/iplKeyboard] objdiff: code 4752/6024 data 1184/1184 functions 31/32 fuzzy 98.7351 linked code 0
[src/system/iplKeyboard] instruction-exact functions: 31/32
[src/system/iplKeyboard] section .data size 1168 match 100.0
[src/system/iplKeyboard] section .sdata size 8 match 100.0
[src/system/iplKeyboard] section .sdata2 size 8 match 100.0
[src/system/iplKeyboard] section .text size 6024 match 98.73506
[src/system/iplKeyboard] below 100: create__Q33ipl8keyboard7ManagerFPQ33ipl4nand4FilePQ23EGG4Heap 94.00944
[src/system/iplKeyboard] baseline: code 4752/6024 data 1184 functions 31 fuzzy 98.7351
[src/BS2/BS2Update] pool: IDENTICAL
[src/BS2/BS2Update] objdiff: code 400/4052 data 10488/10488 functions 9/10 fuzzy 94.2300 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.23001
[src/BS2/BS2Update] below 100: UpdateThread 93.59803
[src/BS2/BS2Update] baseline: code 112/4052 data 10488 functions 8 fuzzy 91.6604
[src/channelScript/CHANSVm] pool: IDENTICAL
[src/channelScript/CHANSVm] objdiff: code 37608/53564 data 6904/6904 functions 221/233 fuzzy 99.3644 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.364426
[src/channelScript/CHANSVm] below 100: CHANSVmConvertToFloatFromStr 97.59036
[src/channelScript/CHANSVm] below 100: VmDateDtor 94.96703
[src/channelScript/CHANSVm] below 100: VmStringReplace 97.878784
[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
[src/BS2/BS2Mach] pool: IDENTICAL
[src/BS2/BS2Mach] objdiff: code 4940/16980 data 155504/158528 functions 24/29 fuzzy 98.1595 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.159485
[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.230415
[src/BS2/BS2Mach] baseline: code 4940/16980 data 155504 functions 24 fuzzy 97.8276
[src/scene/setting/AOSS] pool: IDENTICAL
[src/scene/setting/AOSS] objdiff: code 6436/16192 data 3928/3928 functions 16/21 fuzzy 96.7779 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 96.777916
[src/scene/setting/AOSS] below 100: AOSS_Init_old 93.78725
[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
regressions vs baseline: 0
global matched_code_percent: 89.64909 -> 89.65871
global fuzzy_match_percent: 99.53278 -> 99.53815
global complete_code_percent: 67.39544 -> 67.39544
global matched_data_percent: 99.36508 -> 99.36508
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
review note: libs/RVL_SDK/include/revolution/dvd.h: volatile object declaration (orchestrator checks the target really re-reads it) (+1 net), e.g. volatile s32 state;
review note: src/BS2/BS2Mach.c: volatile object declaration (orchestrator checks the target really re-reads it) (+1 net), e.g. vu32 LowReadResult = 0;
review note: src/BS2/BS2Update.c: volatile object declaration (orchestrator checks the target really re-reads it) (+1 net), e.g. static volatile s32 rc = 0;
note: config touched: config/43U/symbols.txt (orchestrator reviews every config/symbols change)
GATE PASS

View File

@@ -1,129 +0,0 @@
# Fuzzy lane round 2, final verified handoff
One new exact function: `BS2UpdateInit`. Two additional target-proven volatile/poll corrections improve fuzzy code, and remain non-matching. All 31 remaining functions have at least three distinct successfully compiled source forms logged; build failures do not count.
Final full gate (no `--quick`; clean build):
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVL_SDK/src/fa/api/FAAttach] objdiff: code None/500 data 240/240 functions 0/1 fuzzy 99.3600 linked code 0
[libs/RVL_SDK/src/fa/api/FAAttach] instruction-exact functions: 0/1
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] objdiff: code 332/5200 data 96/180 functions 1/7 fuzzy 98.6539 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] instruction-exact functions: 1/7
[src/system/iplKeyboard] objdiff: code 4752/6024 data 1184/1184 functions 31/32 fuzzy 98.7351 linked code 0
[src/system/iplKeyboard] instruction-exact functions: 31/32
[src/BS2/BS2Update] objdiff: code 400/4052 data 10488/10488 functions 9/10 fuzzy 94.2300 linked code 0
[src/BS2/BS2Update] instruction-exact functions: 9/10
[src/channelScript/CHANSVm] objdiff: code 37608/53564 data 6904/6904 functions 221/233 fuzzy 99.3644 linked code 0
[src/channelScript/CHANSVm] instruction-exact functions: 221/233
[src/BS2/BS2Mach] objdiff: code 4940/16980 data 155504/158528 functions 24/29 fuzzy 98.1595 linked code 0
[src/BS2/BS2Mach] instruction-exact functions: 24/29
[src/scene/setting/AOSS] objdiff: code 6436/16192 data 3928/3928 functions 16/21 fuzzy 96.7779 linked code 0
[src/scene/setting/AOSS] instruction-exact functions: 15/21
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
```
Before -> after (matched code/data bytes; denominators unchanged):
| Unit | Raw gate exact functions | Objdiff exact functions | Code bytes | Data bytes |
|---|---|---|---|---|
| `libs/RVL_SDK/src/fa/api/FAAttach` | 0/1 -> 0/1 | 0/1 -> 0/1 | 0 -> 0 / 500 | 240 -> 240 / 240 |
| `libs/RVLMiddleware/eZiText/src/clib/zkokeyp` | 1/7 -> 1/7 | 1/7 -> 1/7 | 332 -> 332 / 5200 | 96 -> 96 / 180 |
| `src/system/iplKeyboard` | 31/32 -> 31/32 | 31/32 -> 31/32 | 4752 -> 4752 / 6024 | 1184 -> 1184 / 1184 |
| `src/BS2/BS2Update` | 8/10 -> 9/10 | 8/10 -> 9/10 | 112 -> 400 / 4052 | 10488 -> 10488 / 10488 |
| `src/channelScript/CHANSVm` | 221/233 -> 221/233 | 221/233 -> 221/233 | 37608 -> 37608 / 53564 | 6904 -> 6904 / 6904 |
| `src/BS2/BS2Mach` | 24/29 -> 24/29 | 24/29 -> 24/29 | 4940 -> 4940 / 16980 | 155504 -> 155504 / 158528 |
| `src/scene/setting/AOSS` | 15/21 -> 15/21 | 16/21 -> 16/21 | 6436 -> 6436 / 16192 | 3928 -> 3928 / 3928 |
Remaining functions (one line each; successful distinct source forms are additional to declaration permutations):
- `libs/RVL_SDK/src/fa/api/FAAttach::FAAttach` — 99.36%; Drive index narrowing and attached-table base register allocation; 125/125 instructions. 9 source forms.
- `libs/RVLMiddleware/eZiText/src/clib/zkokeyp::Zi8_8148302C` — 99.49152%; Work pointer and key-table value registers exchange; 59/59. 5 source forms.
- `libs/RVLMiddleware/eZiText/src/clib/zkokeyp::Zi8_81483264` — 98.902435%; Parameter/metadata and byte iteration index registers exchange; 41/41. 6 source forms.
- `libs/RVLMiddleware/eZiText/src/clib/zkokeyp::Zi8_81483308` — 99.13793%; Count pointer and running counter registers exchange; 58/58. 5 source forms.
- `libs/RVLMiddleware/eZiText/src/clib/zkokeyp::Zi8_814833F0` — 99.04256%; Metadata pointer and candidate index registers exchange; 47/47. 5 source forms.
- `libs/RVLMiddleware/eZiText/src/clib/zkokeyp::Zi8_814834AC` — 99.3586%; Zero initialization chain emits an extra clrlwi; addressing/register operands also differ; 344/343. 8 source forms.
- `libs/RVLMiddleware/eZiText/src/clib/zkokeyp::Zi8GetKOcandidates` — 97.96712%; Candidate loop boundaries, helper return narrowing and temporary scheduling; 673/669. 6 source forms.
- `src/system/iplKeyboard::create__Q33ipl8keyboard7ManagerFPQ33ipl4nand4FilePQ23EGG4Heap` — 94.00944%; Inline resource-node constructor boundary, OEM dictionary index and MemoSetting stack copy order; 318/318. 7 source forms.
- `src/BS2/BS2Update::UpdateThread` — 93.59803%; Import/scan branch and store scheduling, common bases and temporaries; proven rc reloads restored, nine target instructions still absent; 904/913. 10 source forms.
- `src/channelScript/CHANSVm::CHANSVmConvertToFloatFromStr` — 97.59036%; End pointer initialization store and object-type compare occur in opposite order; 83/83. 6 source forms.
- `src/channelScript/CHANSVm::VmDateDtor` — 94.96703%; Variadic date argument and year stack-store scheduling; 91/91. 4 source forms.
- `src/channelScript/CHANSVm::VmStringReplace` — 97.878784%; Search/replacement lengths and live cursor register allocation; 132/132. 3 source forms.
- `src/channelScript/CHANSVm::VmStringSplit` — 98.04054%; Delimiter/parent cursor and result array register allocation; 222/222. 4 source forms.
- `src/channelScript/CHANSVm::CHANSVmFormatString` — 99.84919%; Two temporary object/string-length registers exchange late in the formatter; 431/431. 6 source forms.
- `src/channelScript/CHANSVm::VmBlobGetHexString` — 98.71951%; Output offset and decoded hex digit registers exchange; 82/82. 4 source forms.
- `src/channelScript/CHANSVm::VmBlobPackCommon` — 97.949104%; Packing mode, format and copy-loop temporary register allocation; 668/668. 4 source forms.
- `src/channelScript/CHANSVm::VmBlobUnpack` — 98.452614%; Two-pass format parser and blob cursor/count register allocation; 517/517. 5 source forms.
- `src/channelScript/CHANSVm::VmWinEmuWrite` — 99.62687%; String object and total byte-length registers exchange; 67/67. 4 source forms.
- `src/channelScript/CHANSVm::CHANSVmAddExe` — 99.625984%; Module header and executable type argument registers exchange, plus address operand order; 254/254. 4 source forms.
- `src/channelScript/CHANSVm::CHANSVmLinkModules` — 98.677246%; Dispatch/module/index and global-list pointer registers exchange; 189/189. 4 source forms.
- `src/channelScript/CHANSVm::CHANSVmStep` — 96.46608%; Default step count and loop-entry branch form, floating constant bases and opcode temporaries; 1253/1253. 5 source forms.
- `src/BS2/BS2Mach::Run` — 16.744186%; Target explicitly clears fixed GPRs and the stack pointer and enters via LR; ordinary C cache-loop/callback forms cannot encode that handoff under the no-asm constraint; 11/43. 3 source forms.
- `src/BS2/BS2Mach::BS2StartGame` — 98.72774%; Five initial base/store scheduling operands and five legacy DI address/value register operands remain after fixing all polling loops; 393/393. 17 source forms.
- `src/BS2/BS2Mach::BS2StartGCGame` — 99.5614%; External DVD getter call versus inline state load, and wide tick multiplication operand allocation; 228/228. 8 source forms.
- `src/BS2/BS2Mach::CheckBS2CommandStatus` — 99.50739%; Partition-count slwi and CacheCommandComplete store occur in opposite order; 406/406. 13 source forms.
- `src/BS2/BS2Mach::BS2Tick` — 98.230415%; Boot/hardware address-base sharing, progress-store scheduling and loader output scope; six target instructions absent; 1934/1940. 4 source forms.
- `src/scene/setting/AOSS::AOSS_Init_old` — 93.78725%; Timeout default loads share an array base instead of independent references; local/global allocation and initialization/branch scheduling also differ; 1575/1584. 7 source forms.
- `src/scene/setting/AOSS::AOSSDecryptMessage` — 97.74143%; Checksum and key schedule/state/input/output cursor registers exchange; 321/321. 4 source forms.
- `src/scene/setting/AOSS::AOSSApplyAuthOptions` — 98.77193%; Authentication flags and configuration subrecord pointers use different registers; 114/114. 4 source forms.
- `src/scene/setting/AOSS::AOSSSendHelloRequest` — 92.190475%; Common CRC/key-state base hoisting and packet/key/socket local boundaries differ; 271/273. 8 source forms.
- `src/scene/setting/AOSS::AOSSXorBufferWithKey` — 98.605446%; Unrolled XOR result ownership and packet/mask address register allocation; 147/147. 21 source forms.
Data proof and limits:
- `BS2Update`: `Thread` at 0x810B2580 is an OSThread of size 0x318; target OSCreateThread uses a separate 4096-byte stack starting at thread+0x318. Corrected only the data extent from 0x1318 to 0x318, kept the address and full .bss section size 9056, and left stack bytes unowned. Separate real, initialized thread/stack objects produce 72/72 identical Init instructions and preserve data 10488/10488.
- `zkokeyp`: .data and .extab bytes match. .extabindex has two differing real function-size words (1376/1372 and 2692/2676), corresponding to the two remaining functions with extra instructions. No data rename/extent fix can legitimately conceal that.
- `BS2Mach`: the first 3020 .data bytes are identical, followed by four zero alignment bytes in the target. Anonymous string/table symbols have no authorized real source object name to pair. Two jump table relocation sets also refer into non-matching functions. Data remains 155504/158528; no invented names, pinned literals or padding objects were added.
- Other owned units retain 100% objdiff data. No weak inline/vtable data was suppressed. No other symbol rename or extent correction was made.
Target proof for qualifiers:
- DVD state field: repeated target CoverBlock.state reads at 0xDE0 with a back edge from 0xDE8 and no call. Qualification is guarded by BS2_MACH_VOLATILE_DVD_STATE, defined only by BS2Mach.c; all other translation units compile the original header field.
- LowReadResult: empty repeated polls at 0x1130/0x117C/0x1290/0x12E8, with further loads at 0x113C/0x129C immediately after poll exits. The previous interrupt calls were absent from target code.
- Static signed rc: target store at 0xD5C followed by load at 0xD64, and store at 0xE48 followed by load at 0xE50, with no intervening call. Signed volatile restores two real reads. No use-site volatile cast was added.
Uncertainties:
- AOSSParseNetworkSettings is objdiff 100%, byte-identical, and declaration-tool score (0,0). The gate uses odiff, which incorrectly rebases its CR1 conditional branches by the 36-byte function-position delta. The raw gate consequently prints 15/21, while objdiff and bytes prove 16/21. Raw output is preserved verbatim above; source/metadata were not changed to manipulate this metric.
- Remaining allocation/scheduling causes are hypotheses supported by target diffs and unsuccessful source experiments, not claims that the original source is known.
- Run needs the fixed-register handoff described above; no forbidden assembly or fabricated match was attempted.
Files changed and source commits:
```text
fcbd5a298408059adaf22d29cecb21b9a9cfa301
match update thread creation and object extent
config/43U/symbols.txt
src/BS2/BS2Update.c
tools/decomp-assist/fz1.attempts.md
```
```text
9ab3eb8183594c3a940d7bbb147de7e3c085bca0
restore dvd callback polling
libs/RVL_SDK/include/revolution/dvd.h
src/BS2/BS2Mach.c
tools/decomp-assist/fz1.attempts.md
```
```text
ce9cff4fa6c2d03310c780b1592d02c49bc6c367
preserve update result reloads
src/BS2/BS2Update.c
tools/decomp-assist/fz1.attempts.md
```
Verification artifacts:
- `tools/decomp-assist/fz1.attempts.md` — structural diagnoses, source variant hashes/results, proofs and final all-open audit.
- `tools/decomp-assist/fz1.r2.final-gate.txt` — complete final clean gate output.
- `tools/decomp-assist/fz1.r2.report.md` — this report.
No push, PR, branch switch, rebase, other worktree mutation or subagent was used. Earlier untracked artifacts were left untouched.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -394,854 +394,3 @@ GATE PASS
Before -> after instruction-exact: AddressEdit 87 -> 88; SDChannelSelect 117 -> 117; JPEG 4 -> 4; KPAD 19 -> 19.
Before -> after matched code bytes: AddressEdit 21556 -> 21932; SDChannelSelect 27108 -> 27108; JPEG 712 -> 712; KPAD 5916 -> 5916. Data remains 2560/2560, 2960/2960, none, 8032/8032 respectively.
Source commit: 7e34636b.
# Round 2, proven source levers
Baseline 2daa6aedf69ed53f692092870c89b93d36b42f84
src/scene/address/iplAddressEdit POOL IDENTICAL up to 57 (mine=57 base=57)
create__Q33ipl5scene11AddressEditFv adjacent stack store/reload []
start_point_event__Q33ipl5scene11AddressEditFPCcPQ33ipl10controller9Interface adjacent stack store/reload []
start_left_event__Q33ipl5scene11AddressEditFPCc adjacent stack store/reload []
get_friendinfo__Q33ipl5scene11AddressEditFv adjacent stack store/reload []
update_friendinfo__Q33ipl5scene11AddressEditFv adjacent stack store/reload []
set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err adjacent stack store/reload []
src/scene/sdChannelSelect/iplSDChannelSelect POOL IDENTICAL up to 101 (mine=101 base=101)
create__Q33ipl5scene15SDChannelSelectFv adjacent stack store/reload []
handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv adjacent stack store/reload []
collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl adjacent stack store/reload []
collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl adjacent stack store/reload []
collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl adjacent stack store/reload []
collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl adjacent stack store/reload []
flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv adjacent stack store/reload []
calcCommon__Q33ipl5scene15SDChannelSelectFv adjacent stack store/reload []
initializeNormalPage__Q33ipl5scene15SDChannelSelectFv adjacent stack store/reload []
selectChannel__Q33ipl5scene15SDChannelSelectFii adjacent stack store/reload []
setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj adjacent stack store/reload []
onEventDerived__Q43ipl5scene32@unnamed@iplSDChannelSelect_cpp@33SDChannelSelectButtonEventHandlerFUlUlPCQ33ipl10controller9Interface adjacent stack store/reload []
libs/RVL_SDK/src/kpad/KPAD POOL IDENTICAL up to 0 (mine=0 base=0)
reset_kpad adjacent stack store/reload []
KPADGetProjectionPos adjacent stack store/reload []
KPADSetSensorHeight adjacent stack store/reload []
calc_acc_horizon adjacent stack store/reload []
read_kpad_acc adjacent stack store/reload []
select_1obj_first adjacent stack store/reload []
select_1obj_continue adjacent stack store/reload []
calc_dpd_variable adjacent stack store/reload []
KPADRead adjacent stack store/reload []
KPADInit adjacent stack store/reload []
## src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv
Fetch origin/main 2daa6aedf69ed53f692092870c89b93d36b42f84. Initial assembly diagnosis: (19, 323) structural/positional differences; instructions 820/820
- read-only board layout file view: build failed ^ # (10248) function call '[ipl::layout::Object].Object(EGG::Heap *, {lval} # const ipl::nand::LayoutFile *, {lval} const char[4], {lval} const # char[18])' does not match # 'ipl::layout::Object::Object(EGG::Heap *, void *, const char *, const char # *)' # 'ipl::layout::Object::Object(EGG::Heap *, ipl::nand::LayoutFile *, const # char *, const char *)' # 'ipl::layout::Object::Object(const ipl::layout::Object &)' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- const address-scene view for friend cache lookup: build failed ---------------- # 314: return; # Warning: ^ # (10184) return value expected ### mwcceppc.exe Compiler: # 317: } # Warning: ^ # (10184) return value expected ### mwcceppc.exe Compiler: # 499: mpFriendCache = address->getFriendCache(); # Error: ^ # (10248) function call '[const ipl::scene::Address].getFriendCache()' does # not match # 'ipl::scene::Address::getFriendCache()' (non-static) # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- use base event-handler views at manager construction: (19, 323) structural/positional; instructions 820/820; restored.
## src/scene/address/iplAddressEdit start_point_event__Q33ipl5scene11AddressEditFPCcPQ33ipl10controller9Interface
Fetch origin/main 2daa6aedf69ed53f692092870c89b93d36b42f84. Initial assembly diagnosis: (8, 166) structural/positional differences; instructions 181/182
- place default dispatch before first button case: (8, 166) structural/positional; instructions 181/182; restored.
- cache read-only friend record reference for status: (8, 166) structural/positional; instructions 181/182; restored.
- base frame-controller view of pointed animator: (8, 166) structural/positional; instructions 181/182; restored.
## src/scene/address/iplAddressEdit start_left_event__Q33ipl5scene11AddressEditFPCc
Fetch origin/main 2daa6aedf69ed53f692092870c89b93d36b42f84. Initial assembly diagnosis: (8, 82) structural/positional differences; instructions 95/96
- place default dispatch before first button case: (8, 82) structural/positional; instructions 95/96; restored.
- cache read-only friend record reference for status: (8, 82) structural/positional; instructions 95/96; restored.
- base frame-controller view of pointed animator: (8, 82) structural/positional; instructions 95/96; restored.
## src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv
Fetch origin/main 2daa6aedf69ed53f692092870c89b93d36b42f84. Initial assembly diagnosis: (10, 68) structural/positional differences; instructions 82/84
- const cache view before copying friend record: (10, 68) structural/positional; instructions 82/84; restored.
- const String view when setting name and display panes: (10, 68) structural/positional; instructions 82/84; restored.
- store text arrays through named mutable String view: (10, 39) structural/positional; instructions 83/84; restored.
## src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv
Fetch origin/main d195c16c86f407d4a2b7636ed3b210bb91083ce4. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 38/38
- const create-id reference for memcpy input: (2, 2) structural/positional; instructions 38/38; restored.
- copy through create-id array field: (2, 2) structural/positional; instructions 38/38; restored.
- const address object view for source string and create-id: (2, 2) structural/positional; instructions 38/38; restored.
## src/scene/address/iplAddressEdit set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err
Fetch origin/main d195c16c86f407d4a2b7636ed3b210bb91083ce4. Initial assembly diagnosis: (1, 30) structural/positional differences; instructions 76/75
- read error code through const friend cache: (1, 30) structural/positional; instructions 76/75; restored.
- default message case before explicit server cases: (1, 30) structural/positional; instructions 76/75; restored.
- derive default message at final switch arm: (6, 28) structural/positional; instructions 73/75; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv
Fetch origin/main d195c16c86f407d4a2b7636ed3b210bb91083ce4. Initial assembly diagnosis: (4, 39) structural/positional differences; instructions 145/146
- const BS2 manager view when polling state: build failed ile: src\scene\sdChannelSelect\iplSDChannelSelect.cpp # --------------------------------------------------------- # 243: const BS2Manager* manager = System::getBS2Manager(); # Warning: ^^^^^^^^^^ # (10349) implicit 'int' is no longer supported in C++ ### mwcceppc.exe Compiler: # 243: const BS2Manager* manager = System::getBS2Manager(); # Error: ^ # (10224) 'const' or '&' variable needs initializer # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- bind start tick read-only scalar and split elapsed conversion: (6, 20) structural/positional; instructions 146/146; restored.
- cache mem2 heap pointer before worker allocation: (4, 39) structural/positional; instructions 145/146; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv
Fetch origin/main d195c16c86f407d4a2b7636ed3b210bb91083ce4. Initial assembly diagnosis: (4, 143) structural/positional differences; instructions 170/171
- use const worker view for asynchronous status reads: build failed \mnt\drive2\projects\wii-ipl-workers\data- # d5\src\scene\sdChannelSelect\iplSDChannelSelect.cpp:6) ### mwcceppc.exe Compiler: # File: src\scene\sdChannelSelect\iplSDChannelSelect.cpp # --------------------------------------------------------- # 724: if (worker->is_working()) { # Error: ^ # (10248) function call '[const ipl::NandSDWorker].is_working()' does not # match # 'ipl::NandSDWorker::is_working()' (non-static) # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- read-only title id view during bsearch: build failed d5\src\scene\sdChannelSelect\iplSDChannelSelect.cpp:6) ### mwcceppc.exe Compiler: # File: src\scene\sdChannelSelect\iplSDChannelSelect.cpp # --------------------------------------------------------- # 744: bsearch(static_cast<const ESTitleId*>(mpChannelTitleIds) + channelIndex, mpSDTitleInfo, # Error: ^ # (10247) illegal explicit conversion from 'unsigned long *' to # 'const unsigned long long *' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- dispatch success result with switch labels and explicit default: (8, 143) structural/positional; instructions 172/171; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
Fetch origin/main d542ace0eda57ae50c104c468234b3f15b8db15b. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 101/101
- read NAND title records through const array view: (23, 91) structural/positional; instructions 96/101; restored.
- increment output count from const counter view: (2, 4) structural/positional; instructions 101/101; restored.
- const threshold references for usage comparisons: (2, 4) structural/positional; instructions 101/101; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
Fetch origin/main d542ace0eda57ae50c104c468234b3f15b8db15b. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 102/102
- read NAND title records through const array view: (23, 92) structural/positional; instructions 97/102; restored.
- increment output count from const counter view: (2, 4) structural/positional; instructions 102/102; restored.
- const threshold references for usage comparisons: (2, 4) structural/positional; instructions 102/102; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
Fetch origin/main d542ace0eda57ae50c104c468234b3f15b8db15b. Initial assembly diagnosis: (2, 22) structural/positional differences; instructions 126/126
- read NAND title records through const array view: (19, 118) structural/positional; instructions 123/126; restored.
- increment output count from const counter view: (2, 22) structural/positional; instructions 126/126; restored.
- const threshold references for usage comparisons: (2, 22) structural/positional; instructions 126/126; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
Fetch origin/main d542ace0eda57ae50c104c468234b3f15b8db15b. Initial assembly diagnosis: (8, 16) structural/positional differences; instructions 361/361
- read NAND title records through const array view: (77, 353) structural/positional; instructions 343/361; restored.
- increment output count from const counter view: (8, 16) structural/positional; instructions 361/361; restored.
- const threshold references for usage comparisons: (8, 16) structural/positional; instructions 361/361; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv
Fetch origin/main d542ace0eda57ae50c104c468234b3f15b8db15b. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 35/35
- cache flush heap as const pointer before save manager call: (2, 2) structural/positional; instructions 35/35; restored.
- name save manager before calling flush: build failed t\drive2\projects\wii-ipl-workers\data-d5\include\iplSceneUI.h:11 # Z:\mnt\drive2\projects\wii-ipl-workers\data- # d5\src\scene\sdChannelSelect\iplSDChannelSelect.cpp:6) ### mwcceppc.exe Compiler: # File: src\scene\sdChannelSelect\iplSDChannelSelect.cpp # --------------------------------------------------------- # 1649: system::SaveDataManager* manager = System::getSaveData(); # Error: ^^^^^^ # (10140) undefined identifier 'system' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- move flush result through initialized local file pointer: (2, 2) structural/positional; instructions 35/35; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect calcCommon__Q33ipl5scene15SDChannelSelectFv
Fetch origin/main d542ace0eda57ae50c104c468234b3f15b8db15b. Initial assembly diagnosis: (4, 89) structural/positional differences; instructions 109/108
- read event handler through const scene view: (4, 89) structural/positional; instructions 109/108; restored.
- const initialized handler local at setter call: (4, 89) structural/positional; instructions 109/108; restored.
- base scene object view before button downcast: (4, 89) structural/positional; instructions 109/108; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect initializeNormalPage__Q33ipl5scene15SDChannelSelectFv
Fetch origin/main d542ace0eda57ae50c104c468234b3f15b8db15b. Initial assembly diagnosis: (3, 47) structural/positional differences; instructions 95/94
- read event handler through const scene view: (3, 47) structural/positional; instructions 95/94; restored.
- const initialized handler local at setter call: (3, 47) structural/positional; instructions 95/94; restored.
- base scene object view before button downcast: (3, 47) structural/positional; instructions 95/94; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect selectChannel__Q33ipl5scene15SDChannelSelectFii
Fetch origin/main d542ace0eda57ae50c104c468234b3f15b8db15b. Initial assembly diagnosis: (1, 19) structural/positional differences; instructions 60/59
- read event handler through const scene view: (1, 19) structural/positional; instructions 60/59; restored.
- const initialized handler local at setter call: (1, 19) structural/positional; instructions 60/59; restored.
- base scene object view before button downcast: (1, 19) structural/positional; instructions 60/59; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj
Fetch origin/main d542ace0eda57ae50c104c468234b3f15b8db15b. Initial assembly diagnosis: (23, 68) structural/positional differences; instructions 233/233
- read-only render mode pointer: (23, 68) structural/positional; instructions 233/233; restored.
- const projection view after rect construction: (23, 68) structural/positional; instructions 233/233; restored.
- immutable translated position temporary: (23, 68) structural/positional; instructions 233/233; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect onEventDerived__Q43ipl5scene32@unnamed@iplSDChannelSelect_cpp@33SDChannelSelectButtonEventHandlerFUlUlPCQ33ipl10controller9Interface
Fetch origin/main d542ace0eda57ae50c104c468234b3f15b8db15b. Initial assembly diagnosis: (9, 57) structural/positional differences; instructions 144/144
- read-only scene view for button state tests: (17, 124) structural/positional; instructions 144/144; restored.
- switch event dispatch before normal-event block: (9, 60) structural/positional; instructions 145/144; restored.
- const pane-name pointer binding: (9, 57) structural/positional; instructions 144/144; restored.
## libs/RVL_SDK/src/kpad/KPAD reset_kpad
Fetch origin/main d542ace0eda57ae50c104c468234b3f15b8db15b. Initial assembly diagnosis: (0, 10) structural/positional differences; instructions 117/117
- read reset inputs through const inside-state view: build failed ng=c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 312: kpad->status.pos = input->status.vec = Vec2_0; # Error: ^ # (10179) illegal assignment to constant # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- use const pointer binding for reset input view: (0, 10) structural/positional; instructions 117/117; restored.
- reverse reusable constant declaration order: (0, 36) structural/positional; instructions 117/117; restored.
## libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos
Fetch origin/main d542ace0eda57ae50c104c468234b3f15b8db15b. Initial assembly diagnosis: (0, 9) structural/positional differences; instructions 19/19
- const input vector view for projection components: (0, 9) structural/positional; instructions 19/19; restored.
- const rectangle view for height calculation: (0, 9) structural/positional; instructions 19/19; restored.
- declare double scale after scalar variables before assignments: (0, 10) structural/positional; instructions 19/19; restored.
## libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight
Fetch origin/main d542ace0eda57ae50c104c468234b3f15b8db15b. Initial assembly diagnosis: (0, 7) structural/positional differences; instructions 52/52
- readonly sensor center view for distance computation: (0, 7) structural/positional; instructions 52/52; restored.
- readonly center vector view after sensor position store: (0, 7) structural/positional; instructions 52/52; restored.
- declare diagonal square before width square: (0, 7) structural/positional; instructions 52/52; restored.
## libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon
Fetch origin/main d542ace0eda57ae50c104c468234b3f15b8db15b. Initial assembly diagnosis: (2, 35) structural/positional differences; instructions 101/101
- read horizon inputs through const state view: (8, 57) structural/positional; instructions 102/101; restored.
- cache acceleration vector through const pointer: (2, 35) structural/positional; instructions 101/101; restored.
- cache target-normal vector through const pointer: (2, 35) structural/positional; instructions 101/101; restored.
## libs/RVL_SDK/src/kpad/KPAD read_kpad_acc
Fetch origin/main d542ace0eda57ae50c104c468234b3f15b8db15b. Initial assembly diagnosis: (16, 66) structural/positional differences; instructions 400/400
- read acceleration sample through const pointer view: (16, 66) structural/positional; instructions 400/400; restored.
- readonly sample then readonly smoothing inputs: (16, 66) structural/positional; instructions 400/400; restored.
- declare raw acceleration after previous vector: (32, 82) structural/positional; instructions 400/400; restored.
## libs/RVL_SDK/src/kpad/KPAD select_1obj_first
Fetch origin/main d542ace0eda57ae50c104c468234b3f15b8db15b. Initial assembly diagnosis: (2, 26) structural/positional differences; instructions 109/109
- read sensor geometry through const state view: (2, 26) structural/positional; instructions 109/109; restored.
- readonly scan object while writing only candidates: (2, 26) structural/positional; instructions 109/109; restored.
- read-only geometry and read-only object scan: (2, 26) structural/positional; instructions 109/109; restored.
## libs/RVL_SDK/src/kpad/KPAD select_1obj_continue
Fetch origin/main d542ace0eda57ae50c104c468234b3f15b8db15b. Initial assembly diagnosis: (0, 17) structural/positional differences; instructions 93/93
- read continuation geometry through const state view: (0, 17) structural/positional; instructions 93/93; restored.
- const matched source object during copy: (0, 17) structural/positional; instructions 93/93; restored.
- const source object and state input views: (0, 17) structural/positional; instructions 93/93; restored.
## libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable
Fetch origin/main d542ace0eda57ae50c104c468234b3f15b8db15b. Initial assembly diagnosis: (14, 45) structural/positional differences; instructions 250/250
- readonly state geometry for DPD smoothing: (14, 45) structural/positional; instructions 250/250; restored.
- readonly direction vector during horizon projection: (14, 45) structural/positional; instructions 250/250; restored.
- immutable saved smoothing input view: (14, 45) structural/positional; instructions 250/250; restored.
## libs/RVL_SDK/src/kpad/KPAD KPADRead
Fetch origin/main d542ace0eda57ae50c104c468234b3f15b8db15b. Initial assembly diagnosis: (11, 89) structural/positional differences; instructions 459/459
- const inside-state view for polling condition reads: (11, 89) structural/positional; instructions 459/459; restored.
- const sample view for sampled button and format reads: build failed /libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 1468: read_kpad_stick(kpad, sample); # Error: ^ # (10209) illegal implicit conversion from 'const struct KPADSample *' to # 'struct KPADSample *' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- swap state and output pointer declaration order: (11, 89) structural/positional; instructions 459/459; restored.
## libs/RVL_SDK/src/kpad/KPAD KPADInit
Fetch origin/main d542ace0eda57ae50c104c468234b3f15b8db15b. Initial assembly diagnosis: (9, 81) structural/positional differences; instructions 185/185
- const initial center view in diagonal calculations: (9, 81) structural/positional; instructions 185/185; restored.
- const rotation matrix pointer binding while advancing row index: (9, 81) structural/positional; instructions 185/185; restored.
- declare distance before inside-array pointer: (9, 81) structural/positional; instructions 185/185; restored.
## libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos
Fetch origin/main d542ace0eda57ae50c104c468234b3f15b8db15b. Initial assembly diagnosis: (0, 9) structural/positional differences; instructions 19/19
- definition signature uses const input vector guarded to this unit: (0, 9) structural/positional; instructions 19/19; restored.
## libs/RVL_SDK/src/kpad/KPAD read_kpad_acc
Fetch origin/main d542ace0eda57ae50c104c468234b3f15b8db15b. Initial assembly diagnosis: (16, 66) structural/positional differences; instructions 400/400
- definition signature uses const sample pointer: (50, 118) structural/positional; instructions 400/400; restored.
- smoothing inline helper uses const inside-state pointer: (16, 66) structural/positional; instructions 400/400; restored.
- sample and smoothing helper both use const input pointers: (50, 118) structural/positional; instructions 400/400; restored.
## libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight
Fetch origin/main b5780879949e2436bce826f03a036e1afa63690b. Initial assembly diagnosis: (0, 7) structural/positional differences; instructions 52/52
- name sensor center zero as a float local: (0, 7) structural/positional; instructions 52/52; restored.
- evaluate channel offset before inside-array base: (0, 7) structural/positional; instructions 52/52; restored.
- named zero with offset-first state pointer: (0, 7) structural/positional; instructions 52/52; candidate kept.
## libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos
Fetch origin/main b5780879949e2436bce826f03a036e1afa63690b. Initial assembly diagnosis: (0, 9) structural/positional differences; instructions 19/19
- name projection factors and put aspect before component: (7, 11) structural/positional; instructions 19/19; restored.
- compute aspect before scaled double factor with leading declarations: (0, 10) structural/positional; instructions 19/19; restored.
- use component product for half-height in direct output expressions: (0, 11) structural/positional; instructions 19/19; restored.
Round 2 extent and data audit
main/src/scene/address/iplAddressEdit data 2560/2560. All data sections already 100%; no symbol edits.
create__Q33ipl5scene11AddressEditFv extent 0x81388490..0x81389160; next calcFadein__Q33ipl5scene11AddressEditFv 0x81389160; no overlap.
start_point_event__Q33ipl5scene11AddressEditFPCcPQ33ipl10controller9Interface extent 0x8138c6dc..0x8138c9b4; next start_left_event__Q33ipl5scene11AddressEditFPCc 0x8138c9b4; no overlap.
start_left_event__Q33ipl5scene11AddressEditFPCc extent 0x8138c9b4..0x8138cb34; next start_trig_event__Q33ipl5scene11AddressEditFPCc 0x8138cb34; no overlap.
get_friendinfo__Q33ipl5scene11AddressEditFv extent 0x8138d680..0x8138d7d0; next delete_friendinfo__Q33ipl5scene11AddressEditFv 0x8138d7d0; no overlap.
update_friendinfo__Q33ipl5scene11AddressEditFv extent 0x8138d814..0x8138d8ac; next utf16_wiiid__Q33ipl5scene11AddressEditFPCw 0x8138d8ac; no overlap.
set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err extent 0x8138e70c..0x8138e838; next onEvent__Q33ipl5scene16AddressEditEventFUlUlPv 0x8138e838; no overlap.
main/src/scene/sdChannelSelect/iplSDChannelSelect data 2960/2960. All data sections already 100%; no symbol edits.
create__Q33ipl5scene15SDChannelSelectFv extent 0x813daf80..0x813db1c8; next enqueueStartNotice__Q33ipl5scene15SDChannelSelectFv 0x813db1c8; no overlap.
handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv extent 0x813dbfe0..0x813dc28c; next handleSDMountComplete__Q33ipl5scene15SDChannelSelectFv 0x813dc28c; no overlap.
collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl extent 0x813dd0ac..0x813dd240; next collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 0x813dd240; no overlap.
collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl extent 0x813dd240..0x813dd3d8; next collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 0x813dd3d8; no overlap.
collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl extent 0x813dd3d8..0x813dd5d0; next collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 0x813dd5d0; no overlap.
collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl extent 0x813dd5d0..0x813ddb74; next collectTitlesForMode__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUli 0x813ddb74; no overlap.
flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv extent 0x813ddcd8..0x813ddd64; next handleThreePageDialog__Q33ipl5scene15SDChannelSelectFv 0x813ddd64; no overlap.
calcCommon__Q33ipl5scene15SDChannelSelectFv extent 0x813dde90..0x813de040; next calcFadein__Q33ipl5scene15SDChannelSelectFv 0x813de040; no overlap.
initializeNormalPage__Q33ipl5scene15SDChannelSelectFv extent 0x813df558..0x813df6d0; next refreshPageObjects__Q33ipl5scene15SDChannelSelectFiPQ33ipl5scene12SDChannelObji 0x813df6d0; no overlap.
selectChannel__Q33ipl5scene15SDChannelSelectFii extent 0x813e0450..0x813e053c; next tellStartingZoomAnm__Q33ipl5scene15SDChannelSelectFv 0x813e053c; no overlap.
setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj extent 0x813e0848..0x813e0bec; next initPageAnimations__Q33ipl5scene15SDChannelSelectFRCQ33ipl4math4VEC3i 0x813e0bec; no overlap.
onEventDerived__Q43ipl5scene32@unnamed@iplSDChannelSelect_cpp@33SDChannelSelectButtonEventHandlerFUlUlPCQ33ipl10controller9Interface extent 0x813e2b54..0x813e2d94; next startResetting__Q33ipl5scene15SDChannelSelectFv 0x813e2d94; no overlap.
main/libs/RVL_SDK/src/kpad/KPAD data 8032/8032. All data sections already 100%; no symbol edits.
reset_kpad extent 0x815856cc..0x815858a0; next KPADGetProjectionPos 0x815858a0; no overlap.
KPADGetProjectionPos extent 0x815858a0..0x815858ec; next KPADSetSensorHeight 0x815858ec; no overlap.
KPADSetSensorHeight extent 0x815858ec..0x815859bc; next calc_button_repeat 0x815859bc; no overlap.
calc_acc_horizon extent 0x81585b50..0x81585ce4; next calc_acc_vertical 0x81585ce4; no overlap.
read_kpad_acc extent 0x81585e08..0x81586448; next select_2obj_first 0x81586448; no overlap.
select_1obj_first extent 0x81586858..0x81586a0c; next select_1obj_continue 0x81586a0c; no overlap.
select_1obj_continue extent 0x81586a0c..0x81586b80; next calc_dpd_variable 0x81586b80; no overlap.
calc_dpd_variable extent 0x81586b80..0x81586f68; next read_kpad_dpd 0x81586f68; no overlap.
KPADRead extent 0x81587984..0x815880b0; next KPADInit 0x815880b0; no overlap.
KPADInit extent 0x815880b0..0x81588394; next KPADDisableDPD 0x81588394; no overlap.
No owned open function has adjacent target stw/lwz to the same stack address. No definition-level volatile candidate was justified; no volatile changes made.
## src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv
Fetch origin/main abb652bb85809c516c29c7cc9695c50f839d6ffe. Initial assembly diagnosis: (10, 68) structural/positional differences; instructions 82/84
- reuse one mutable text pointer for both textbox calls: (10, 68) structural/positional; instructions 82/84; restored.
- reuse one const text pointer for both textbox calls: (10, 68) structural/positional; instructions 82/84; restored.
- bind textbox strings as constant pointer locals: (10, 68) structural/positional; instructions 82/84; restored.
## src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv
Fetch origin/main abb652bb85809c516c29c7cc9695c50f839d6ffe. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 38/38
- copy typed identifier through const array input: (2, 2) structural/positional; instructions 38/38; restored.
## libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight
Fetch origin/main abb652bb85809c516c29c7cc9695c50f839d6ffe. Initial assembly diagnosis: (0, 3) structural/positional differences; instructions 52/52
- initialize inside-state pointer at declaration: (0, 3) structural/positional; instructions 52/52; restored.
- look up channel state before float constants: (0, 3) structural/positional; instructions 52/52; restored.
- cache array base in a typed pointer before lookup: (0, 3) structural/positional; instructions 52/52; restored.
- declare inside-state pointer after float locals: (0, 3) structural/positional; instructions 52/52; restored.
Round 2 declaration search after const and structural trials: KPADSetSensorHeight 134 builds, structural 0 / positional 7 -> 3; only inside-array base r4/r3 allocation remains. Search used only initialized ordinary float inputs and a named zero.
## libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight
Fetch origin/main abb652bb85809c516c29c7cc9695c50f839d6ffe. Initial assembly diagnosis: (0, 3) structural/positional differences; instructions 52/52
- isolate typed channel lookup in an inline helper: (0, 3) structural/positional; instructions 52/52; restored.
- initialize state pointer with const binding: (0, 3) structural/positional; instructions 52/52; restored.
- advance typed channel pointer in a separate assignment: (4, 5) structural/positional; instructions 52/52; restored.
## src/scene/address/iplAddressEdit start_point_event__Q33ipl5scene11AddressEditFPCcPQ33ipl10controller9Interface
Fetch origin/main 8f920a08c21c6cf3dc96e8565ee89534277ad3ab. Initial assembly diagnosis: (8, 166) structural/positional differences; instructions 181/182
- explicit no-op fifth button case supported by five-pane table: (0, 4) structural/positional; instructions 182/182; restored.
Round 2 select_1obj_continue declaration search: 23 builds across five independent geometry inputs; best remained structural 0 / positional 17. KPAD height partial was restored after all lookup forms plateaued at three r3/r4 base-register differences.
set_err_msg target disassembly proves r4 message ID is assigned only on the named error cases. Its default path reaches getMessage without initialization. Keeping the safe initialized default; an uninitialized local would violate the worker contract. The unmatched SDButton setter call sites likewise lack r5 opt-out initialization in the target.
- explicit fifth button with implicit default behavior: (10, 160) structural/positional; instructions 184/182; restored.
## src/scene/address/iplAddressEdit start_left_event__Q33ipl5scene11AddressEditFPCc
Fetch origin/main 6b80fd87f561c7582b8ffbac87dd7b111ba64bc2. Initial assembly diagnosis: (8, 82) structural/positional differences; instructions 95/96
- explicit no-op fifth button case supported by five-pane table: (0, 0) structural/positional; instructions 96/96; candidate kept.
- explicit fifth button with implicit default behavior: build failed rs\data- # d5\src\scene\address\iplAddressEdit.cpp:2) ### mwcceppc.exe Compiler: # File: src\scene\address\iplAddressEdit.cpp # --------------------------------------------- # 314: return; # Warning: ^ # (10184) return value expected ### mwcceppc.exe Compiler: # 317: } # Warning: ^ # (10184) return value expected ### mwcceppc.exe Compiler: # 2255: case 4: # Error: ^ # (10172) case constant defined more than once # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- retain supported fifth-button dispatch for focused register diff: (0, 4) structural/positional; instructions 182/182; candidate kept.
- height then scale multiplication operand order in balloon offset: (0, 6) structural/positional; instructions 182/182; restored.
## src/scene/address/iplAddressEdit start_point_event__Q33ipl5scene11AddressEditFPCcPQ33ipl10controller9Interface
Fetch origin/main d6997b0cb9e97fbd2befc07a85c87c74d625f068. Initial assembly diagnosis: (0, 4) structural/positional differences; instructions 182/182
- declare scale before height while preserving literal encounter order: (0, 2) structural/positional; instructions 182/182; restored.
- height-first product with scale-before-height declarations: (0, 0) structural/positional; instructions 182/182; candidate kept.
- read-only offset factors with height-first product: (0, 2) structural/positional; instructions 182/182; restored.
Fifth-button dispatch proof: get_button_no iterates all five entries, so return value 4 is a real input. The target start_left_event includes a distinct no-op branch for that button before the first active block. An explicit case 4 reproduces the original 96 instructions exactly; default still handles invalid inputs. start_point_event requires the same structural case and then differs only in the registers loading 50.0 and 0.5 into the two balloon-offset blocks. Target relocation bytes establish 50.0 is loaded into f1 and 0.5 into f0.
## Round 2 remaining-function audit
create__Q33ipl5scene11AddressEditFv 97.44634%; 3 round-2 source trials logged; structural diagnosis and results above.
get_friendinfo__Q33ipl5scene11AddressEditFv 88.03571%; 6 round-2 source trials logged; structural diagnosis and results above.
update_friendinfo__Q33ipl5scene11AddressEditFv 99.42105%; 4 round-2 source trials logged; structural diagnosis and results above.
set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err 98.666664%; 3 round-2 source trials logged; structural diagnosis and results above.
create__Q33ipl5scene15SDChannelSelectFv 97.73972%; 3 round-2 source trials logged; structural diagnosis and results above.
handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv 99.15205%; 3 round-2 source trials logged; structural diagnosis and results above.
collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.81188%; 3 round-2 source trials logged; structural diagnosis and results above.
collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.833336%; 3 round-2 source trials logged; structural diagnosis and results above.
collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.29365%; 3 round-2 source trials logged; structural diagnosis and results above.
collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.55125%; 3 round-2 source trials logged; structural diagnosis and results above.
flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv 99.65714%; 3 round-2 source trials logged; structural diagnosis and results above.
calcCommon__Q33ipl5scene15SDChannelSelectFv 99.07407%; 3 round-2 source trials logged; structural diagnosis and results above.
initializeNormalPage__Q33ipl5scene15SDChannelSelectFv 98.93617%; 3 round-2 source trials logged; structural diagnosis and results above.
selectChannel__Q33ipl5scene15SDChannelSelectFii 98.305084%; 3 round-2 source trials logged; structural diagnosis and results above.
setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj 93.4721%; 3 round-2 source trials logged; structural diagnosis and results above.
onEventDerived__Q43ipl5scene32@unnamed@iplSDChannelSelect_cpp@33SDChannelSelectButtonEventHandlerFUlUlPCQ33ipl10controller9Interface 98.541664%; 3 round-2 source trials logged; structural diagnosis and results above.
reset_kpad 99.48718%; 3 round-2 source trials logged; structural diagnosis and results above.
KPADGetProjectionPos 96.57895%; 7 round-2 source trials logged; structural diagnosis and results above.
KPADSetSensorHeight 99.23077%; 13 round-2 source trials logged; structural diagnosis and results above.
calc_acc_horizon 97.27723%; 3 round-2 source trials logged; structural diagnosis and results above.
read_kpad_acc 98.15%; 6 round-2 source trials logged; structural diagnosis and results above.
select_1obj_first 98.348625%; 3 round-2 source trials logged; structural diagnosis and results above.
select_1obj_continue 98.49462%; 3 round-2 source trials logged; structural diagnosis and results above.
calc_dpd_variable 94.82%; 3 round-2 source trials logged; structural diagnosis and results above.
KPADRead 97.52723%; 3 round-2 source trials logged; structural diagnosis and results above.
KPADInit 96.51351%; 3 round-2 source trials logged; structural diagnosis and results above.
Both new matches use ordinary C++, with explicit handling of real button index 4 and ordinary ordered balloon-offset locals. No volatile declarations, symbol extent changes, data renames, assembly, header changes or unit-link changes survived.
## Round 2 final full gate
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/scene/address/iplAddressEdit] pool: IDENTICAL
[src/scene/address/iplAddressEdit] objdiff: code 23044/27112 data 2560/2560 functions 90/94 fuzzy 99.5248 linked code 0
[src/scene/address/iplAddressEdit] instruction-exact functions: 90/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.52479
[src/scene/address/iplAddressEdit] below 100: create__Q33ipl5scene11AddressEditFv 97.44634
[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] below 100: set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err 98.666664
[src/scene/address/iplAddressEdit] baseline: code 21932/27112 data 2560 functions 88 fuzzy 99.4923
[src/scene/sdChannelSelect/iplSDChannelSelect] pool: IDENTICAL
[src/scene/sdChannelSelect/iplSDChannelSelect] objdiff: code 27108/33828 data 2960/2960 functions 117/129 fuzzy 99.5051 linked code 0
[src/scene/sdChannelSelect/iplSDChannelSelect] instruction-exact functions: 117/129
[src/scene/sdChannelSelect/iplSDChannelSelect] section .data size 2736 match 100.0
[src/scene/sdChannelSelect/iplSDChannelSelect] section .rodata size 64 match 100.0
[src/scene/sdChannelSelect/iplSDChannelSelect] section .sdata size 80 match 100.0
[src/scene/sdChannelSelect/iplSDChannelSelect] section .sdata2 size 80 match 100.0
[src/scene/sdChannelSelect/iplSDChannelSelect] section .text size 33828 match 99.50514
[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: create__Q33ipl5scene15SDChannelSelectFv 97.73972
[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv 99.15205
[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.81188
[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.833336
[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.29365
[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.55125
[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv 99.65714
[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: calcCommon__Q33ipl5scene15SDChannelSelectFv 99.07407
[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: initializeNormalPage__Q33ipl5scene15SDChannelSelectFv 98.93617
[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: selectChannel__Q33ipl5scene15SDChannelSelectFii 98.305084
[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj 93.4721
[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: onEventDerived__Q43ipl5scene32@unnamed@iplSDChannelSelect_cpp@33SDChannelSelectButtonEventHandlerFUlUlPCQ33ipl10controller9Interface 98.541664
[src/scene/sdChannelSelect/iplSDChannelSelect] baseline: code 27108/33828 data 2960 functions 117 fuzzy 99.5051
[libs/RVL_SDK/src/kpad/KPAD] pool: IDENTICAL
[libs/RVL_SDK/src/kpad/KPAD] objdiff: code 5916/13056 data 8032/8032 functions 19/29 fuzzy 98.5983 linked code 0
[libs/RVL_SDK/src/kpad/KPAD] instruction-exact functions: 19/29
[libs/RVL_SDK/src/kpad/KPAD] section .bss size 7680 match 100.0
[libs/RVL_SDK/src/kpad/KPAD] section .data size 88 match 100.0
[libs/RVL_SDK/src/kpad/KPAD] section .sbss size 32 match 100.0
[libs/RVL_SDK/src/kpad/KPAD] section .sdata size 112 match 100.0
[libs/RVL_SDK/src/kpad/KPAD] section .sdata2 size 120 match 100.0
[libs/RVL_SDK/src/kpad/KPAD] section .text size 13056 match 98.59834
[libs/RVL_SDK/src/kpad/KPAD] below 100: reset_kpad 99.48718
[libs/RVL_SDK/src/kpad/KPAD] below 100: KPADGetProjectionPos 96.57895
[libs/RVL_SDK/src/kpad/KPAD] below 100: KPADSetSensorHeight 99.23077
[libs/RVL_SDK/src/kpad/KPAD] below 100: calc_acc_horizon 97.27723
[libs/RVL_SDK/src/kpad/KPAD] below 100: read_kpad_acc 98.15
[libs/RVL_SDK/src/kpad/KPAD] below 100: select_1obj_first 98.348625
[libs/RVL_SDK/src/kpad/KPAD] below 100: select_1obj_continue 98.49462
[libs/RVL_SDK/src/kpad/KPAD] below 100: calc_dpd_variable 94.82
[libs/RVL_SDK/src/kpad/KPAD] below 100: KPADRead 97.52723
[libs/RVL_SDK/src/kpad/KPAD] below 100: KPADInit 96.51351
[libs/RVL_SDK/src/kpad/KPAD] baseline: code 5916/13056 data 8032 functions 19 fuzzy 98.5983
regressions vs baseline: 0
global matched_code_percent: 89.30427 -> 89.34139
global fuzzy_match_percent: 99.52654 -> 99.52685
global complete_code_percent: 67.23291 -> 67.23291
global matched_data_percent: 99.36508 -> 99.36508
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
Fresh independent ctxdiff after the clean build: start_point_event 182/182 instructions, diffs 0; start_left_event 96/96 instructions, diffs 0. Both exact-name objdiff values are 100.0. Pool and every owned data section remain identical.
Before -> after: AddressEdit exact 88 -> 90, matched code 21932 -> 23044, matched data 2560 -> 2560; SDChannelSelect 117 -> 117, 27108 -> 27108, 2960 -> 2960; KPAD 19 -> 19, 5916 -> 5916, 8032 -> 8032. Every remaining open function has at least three distinct source-level round-2 trials.
# Round 3: fresh origin/main after address event matches landed
Baseline full unit data: address 2560/2560, SD 2960/2960, KPAD 8032/8032; no unpaired owned data needs rename or extent change. Initial quick gate PASS; all pools identical.
## src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv
Fetch origin/main ed5c96bd85c7bba8227f88c82a3cd5f06e6e95a1. Initial assembly diagnosis: (19, 323) structural/positional differences; instructions 820/820
Remote source check: same unit as tested initial report; function still open. Frame/branch/operand diagnosis: see ctxdiff below.
```
src 0xcd0 base 0xcd0 insns 820/820
diffs 323: [10, 14, 17, 24, 25, 30, 31, 36, 37, 42, 43, 48, 49, 54, 55, 60, 61, 66, 67, 72]
10 M lis r30, 0
B lis r31, 0
14 M addi r30, r30, 0
B addi r31, r31, 0
17 M lwz r31, 0xd20(r3)
B lwz r30, 0xd20(r3)
24 M mr r5, r31
B mr r5, r30
25 M addi r7, r30, 0x72
B addi r7, r31, 0x72
30 M addi r4, r30, 0x84
B addi r4, r31, 0x84
31 M addi r5, r30, 0xa0
B addi r5, r31, 0xa0
36 M addi r4, r30, 0xaf
B addi r4, r31, 0xaf
37 M addi r5, r30, 0xc8
B addi r5, r31, 0xc8
42 M addi r4, r30, 0xaf
B addi r4, r31, 0xaf
43 M addi r5, r30, 0xd3
B addi r5, r31, 0xd3
48 M addi r4, r30, 0xaf
B addi r4, r31, 0xaf
49 M addi r5, r30, 0xde
B addi r5, r31, 0xde
54 M addi r4, r30, 0xaf
B addi r4, r31, 0xaf
55 M addi r5, r30, 0xe9
B addi r5, r31, 0xe9
60 M addi r4, r30, 0xaf
B addi r4, r31, 0xaf
61 M addi r5, r30, 0xf5
B addi r5, r31, 0xf5
66 M addi r4, r30, 0x103
B addi r4, r31, 0x103
67 M addi r5, r30, 0xc8
B addi r5, r31, 0xc8
72 M addi r4, r30, 0x103
B addi r4, r31, 0x103
73 M addi r5, r30, 0xd3
B addi r5, r31, 0xd3
78 M addi r4, r30, 0x103
B addi r4, r31, 0x103
79 M addi r5, r30, 0xde
B addi r5, r31, 0xde
84 M addi r4, r30, 0x103
B addi r4, r31, 0x103
85 M addi r5, r30, 0xe9
B addi r5, r31, 0xe9
90 M addi r4, r30, 0x103
B addi r4, r31, 0x103
91 M addi r5, r30, 0xf5
B addi r5, r31, 0xf5
96 M addi r4, r30, 0x11d
B addi r4, r31, 0x11d
97 M addi r5, r30, 0xc8
B addi r5, r31, 0xc8
102 M addi r4, r30, 0x11d
B addi r4, r31, 0x11d
103 M addi r5, r30, 0xd3
B addi r5, r31, 0xd3
108 M addi r4, r30, 0x11d
B addi r4, r31, 0x11d
```
- hoist meaningful layout and event locals; preserve initializer evaluation positions: (19, 323) structural/positional; instructions 820/820; restored.
- name board scene through const base view before layout-file lookup: (19, 323) structural/positional; instructions 820/820; restored.
- use pane base pointer once in each manager trigger loop: (19, 323) structural/positional; instructions 820/820; restored.
## src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv
Fetch origin/main ed5c96bd85c7bba8227f88c82a3cd5f06e6e95a1. Initial assembly diagnosis: (10, 68) structural/positional differences; instructions 82/84
Remote source check: same unit as tested initial report; function still open. Frame/branch/operand diagnosis: see ctxdiff below.
```
src 0x148 base 0x150 insns 82/84
--- delete mine 6:7 base 6:6
M 6 mr r29, r3
--- replace mine 8:9 base 7:9
M 8 lwz r4, 0x4ec(r29)
B 7 lwz r4, 0x4ec(r3)
B 8 mr r28, r3
--- insert mine 10:10 base 10:11
B 10 addi r3, r30, 0
--- delete mine 11:12 base 12:12
M 11 addi r3, r30, 0
--- replace mine 15:16 base 15:16
M 15 addi r3, r29, 0xb0
B 15 addi r3, r28, 0xb0
--- replace mine 18:19 base 18:19
M 18 lwz r3, 0x68(r29)
B 18 lwz r3, 0x68(r28)
--- replace mine 20:21 base 20:21
M 20 addi r4, r4, 0
B 20 addi r29, r28, 0x2b4
--- insert mine 23:23 base 23:24
B 23 addi r4, r4, 0
--- replace mine 28:30 base 29:31
M 28 mr r3, r29
M 29 addi r5, r29, 0x2b4
B 29 mr r3, r28
B 30 mr r5, r29
--- replace mine 42:43 base 43:44
M 42 addi r3, r29, 0xb0
B 43 addi r3, r28, 0xb0
--- replace mine 54:55 base 55:56
M 54 addi r3, r29, 0xb0
B 55 addi r3, r28, 0xb0
--- replace mine 57:58 base 58:59
M 57 lwz r3, 0x68(r29)
B 58 lwz r3, 0x68(r28)
--- replace mine 59:60 base 60:61
M 59 addi r4, r4, 0
B 60 addi r29, r28, 0x2cc
--- insert mine 62:62 base 63:64
B 63 addi r4, r4, 0
--- replace mine 67:69 base 69:71
M 67 mr r3, r29
M 68 addi r5, r29, 0x2cc
B 69 mr r3, r28
B 70 mr r5, r29
--- replace mine 71:72 base 73:74
M 71 addi r3, r29, 0x4e0
B 73 addi r3, r28, 0x4e0
```
- mutable text-array pointer views across pane lookup: (10, 68) structural/positional; instructions 82/84; restored.
- String pointer view retains text-storage base across lookup: (10, 39) structural/positional; instructions 83/84; restored.
- reuse name pointer for displayed friend code and pane pointer for both lookups: (10, 68) structural/positional; instructions 82/84; restored.
## src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv
Fetch origin/main ed5c96bd85c7bba8227f88c82a3cd5f06e6e95a1. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 38/38
Remote source check: same unit as tested initial report; function still open. Frame/branch/operand diagnosis: see ctxdiff below.
```
src 0x98 base 0x98 insns 38/38
diffs 2: [12, 13]
12 M addi r3, r31, 8
B addi r4, r30, 0x2b4
13 M addi r4, r30, 0x2b4
B addi r3, r31, 8
```
- bind source and destination create-id pointers before name-copy call: (2, 2) structural/positional; instructions 38/38; restored.
- use local FriendInfo reference for all update destinations: (2, 2) structural/positional; instructions 38/38; restored.
- name source through read-only byte-array reference: (2, 2) structural/positional; instructions 38/38; restored.
## src/scene/address/iplAddressEdit set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err
Fetch origin/main ed5c96bd85c7bba8227f88c82a3cd5f06e6e95a1. Initial assembly diagnosis: (1, 30) structural/positional differences; instructions 76/75
Remote source check: same unit as tested initial report; function still open. Frame/branch/operand diagnosis: see ctxdiff below.
```
src 0x130 base 0x12c insns 76/75
--- delete mine 46:47 base 46:46
M 46 li r4, 0x1c5
```
- initialized error message selected with conditional expression: (18, 47) structural/positional; instructions 65/75; restored.
- initialize default before formatting error string: (2, 49) structural/positional; instructions 77/75; restored.
- explicit safe default switch initializes every case: (4, 22) structural/positional; instructions 77/75; restored.
## libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos
Fetch origin/main ed5c96bd85c7bba8227f88c82a3cd5f06e6e95a1. Initial assembly diagnosis: (0, 9) structural/positional differences; instructions 19/19
Structural diagnosis: 19/19, same leaf frame. Nine operand/FP-register differences; target scales X via f0 double temporary and constant-first 1.2 multiplies. No stack reload volatility evidence. origin/main function source agrees with tested baseline.
- constant-first x/y aspect multiplies: (0, 10) structural/positional; instructions 19/19; restored.
- named scale coefficients with component-first half-height multiply: (7, 11) structural/positional; instructions 19/19; restored.
- recycle double factor variable for final scaled coordinate: (0, 11) structural/positional; instructions 19/19; restored.
- inline horizontal double scaling with constant-first aspect product: (0, 10) structural/positional; instructions 19/19; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv
Fetch origin/main ed5c96bd85c7bba8227f88c82a3cd5f06e6e95a1. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 35/35
Pool checked identical first. Current origin/main source unchanged from baseline. Structural diagnosis: frame and instruction count match; two heap/manager loads exchanged. Test inline helper argument boundary before declaration search.
- inline save-flush helper with manager-first pointer arguments: (2, 2) structural/positional; instructions 35/35; restored.
- inline save-flush helper with heap-first pointer arguments: (2, 2) structural/positional; instructions 35/35; restored.
- inline save-flush helper with reference arguments: (2, 2) structural/positional; instructions 35/35; restored.
## src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv
Fetch origin/main 2f759f35f124c7103c245346d0cda652bd8b6ff8. Initial assembly diagnosis: (10, 68) structural/positional differences; instructions 82/84
Additional inline-boundary diagnosis: both missing instructions form text addresses before FindPaneByName; target holds reusable text in r29, this in r28. Try combined pane lookup and text setting through explicit inline arguments.
- inline pane-text helper with text last: (10, 68) structural/positional; instructions 82/84; restored.
- inline pane-text helper with text first: (10, 68) structural/positional; instructions 82/84; restored.
- inline pane-text helper with scene reference: (10, 68) structural/positional; instructions 82/84; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (4, 39) structural/positional differences; instructions 145/146
Remote source unchanged from initial tested report. Structural diagnosis: 145/146; target tick duration temporaries differ; same main frame, one instruction missing.
- elapsed tick variable reused for current tick before subtraction: (4, 39) structural/positional; instructions 145/146; restored.
- millisecond conversion consumes named signed elapsed value: (4, 39) structural/positional; instructions 145/146; restored.
- hoist tick scalars to leading local declarations: (4, 39) structural/positional; instructions 145/146; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (4, 143) structural/positional differences; instructions 170/171
Remote source unchanged from initial tested report. Structural diagnosis: 170/171; target beq8+b error dispatch; source uses bne. Error compaction count r8 versus r6; identical frame.
- direct two-case result switch with common postprocessing: (8, 143) structural/positional; instructions 172/171; restored.
- success condition reversed within same OR branch: (6, 143) structural/positional; instructions 170/171; restored.
- hoist error-path channel count before success/error branch: (4, 143) structural/positional; instructions 170/171; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 101/101
Remote source unchanged from initial tested report. Structural diagnosis: equal instruction counts; target stores increment then loads stack bytes and usage threshold; ours hoists threshold before count store. Branch logic and frame agree. Test scalar lifetimes then signed/unsigned alias view.
- snapshot accumulated usage after increment before comparing thresholds: (6, 8) structural/positional; instructions 101/101; restored.
- compound count assignment before threshold comparison: (2, 4) structural/positional; instructions 101/101; restored.
- signed usage thresholds accessed via read-only word representation: (2, 4) structural/positional; instructions 101/101; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 102/102
Remote source unchanged from initial tested report. Structural diagnosis: equal instruction counts; target stores increment then loads stack bytes and usage threshold; ours hoists threshold before count store. Branch logic and frame agree. Test scalar lifetimes then signed/unsigned alias view.
- snapshot accumulated usage after increment before comparing thresholds: (6, 8) structural/positional; instructions 102/102; restored.
- compound count assignment before threshold comparison: (2, 4) structural/positional; instructions 102/102; restored.
- signed usage thresholds accessed via read-only word representation: (2, 4) structural/positional; instructions 102/102; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (2, 22) structural/positional differences; instructions 126/126
Remote source unchanged from initial tested report. Structural diagnosis: equal instruction counts; target stores increment then loads stack bytes and usage threshold; ours hoists threshold before count store. Branch logic and frame agree. Test scalar lifetimes then signed/unsigned alias view.
- snapshot accumulated usage after increment before comparing thresholds: (6, 26) structural/positional; instructions 126/126; restored.
- compound count assignment before threshold comparison: (2, 22) structural/positional; instructions 126/126; restored.
- signed usage thresholds accessed via read-only word representation: (2, 22) structural/positional; instructions 126/126; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (8, 16) structural/positional differences; instructions 361/361
Remote source unchanged from initial tested report. Structural diagnosis: equal instruction counts; target stores increment then loads stack bytes and usage threshold; ours hoists threshold before count store. Branch logic and frame agree. Test scalar lifetimes then signed/unsigned alias view.
- snapshot accumulated usage after increment before comparing thresholds: (24, 32) structural/positional; instructions 361/361; restored.
- compound count assignment before threshold comparison: (8, 16) structural/positional; instructions 361/361; restored.
- signed usage thresholds accessed via read-only word representation: (8, 16) structural/positional; instructions 361/361; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect calcCommon__Q33ipl5scene15SDChannelSelectFv
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (4, 89) structural/positional differences; instructions 109/108
Remote source unchanged from initial tested report. Structural diagnosis: source has one extra li r5,0 for second setter argument; target leaves caller register unspecified. Cannot remove defined NULL semantics via uninitialized values.
- explicit initialized null out-handler argument: (4, 89) structural/positional; instructions 109/108; restored.
- name initialized no-handler view for default and clear calls: (4, 89) structural/positional; instructions 109/108; restored.
- base button-handler input view at setter boundary: (4, 89) structural/positional; instructions 109/108; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect initializeNormalPage__Q33ipl5scene15SDChannelSelectFv
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (3, 47) structural/positional differences; instructions 95/94
Remote source unchanged from initial tested report. Structural diagnosis: source has one extra li r5,0 for second setter argument; target leaves caller register unspecified. Cannot remove defined NULL semantics via uninitialized values.
- explicit initialized null out-handler argument: (3, 47) structural/positional; instructions 95/94; restored.
- name initialized no-handler view for default and clear calls: (3, 47) structural/positional; instructions 95/94; restored.
- base button-handler input view at setter boundary: (3, 47) structural/positional; instructions 95/94; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect selectChannel__Q33ipl5scene15SDChannelSelectFii
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (1, 19) structural/positional differences; instructions 60/59
Remote source unchanged from initial tested report. Structural diagnosis: source has one extra li r5,0 for second setter argument; target leaves caller register unspecified. Cannot remove defined NULL semantics via uninitialized values.
- explicit initialized null out-handler argument: (1, 19) structural/positional; instructions 60/59; restored.
- name initialized no-handler view for default and clear calls: (1, 19) structural/positional; instructions 60/59; restored.
- base button-handler input view at setter boundary: (1, 19) structural/positional; instructions 60/59; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (23, 68) structural/positional differences; instructions 233/233
Remote source unchanged from initial tested report. Structural diagnosis: 233/233; same frame; target float schedule/matrix scale temporary lifetimes differ (23 structural,68 positional).
- separate translated-vector initialization from declaration: (29, 210) structural/positional; instructions 230/233; restored.
- split scale declarations from assignments in matrix branch: (23, 68) structural/positional; instructions 233/233; restored.
- scaled thumbnail extents reused before scissor arithmetic: (24, 68) structural/positional; instructions 233/233; restored.
## src/scene/sdChannelSelect/iplSDChannelSelect onEventDerived__Q43ipl5scene32@unnamed@iplSDChannelSelect_cpp@33SDChannelSelectButtonEventHandlerFUlUlPCQ33ipl10controller9Interface
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (9, 57) structural/positional differences; instructions 144/144
Remote source unchanged from initial tested report. Structural diagnosis: 144/144; event-zero branch target beq8+b end versus ours bne end, plus control/register scheduling; same frame.
- early-return event guard before normal event dispatch: (9, 57) structural/positional; instructions 144/144; restored.
- group special-state dispatch as condition instead of switch: (19, 124) structural/positional; instructions 142/144; restored.
- split component declaration and pane-name assignment: (9, 57) structural/positional; instructions 144/144; restored.
## libs/RVL_SDK/src/kpad/KPAD reset_kpad
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (0, 10) structural/positional differences; instructions 117/117
Remote unit unchanged from initial tested report. Structural diagnosis: 117/117, frame/branches agree,10 FP-register-only changes. Boundary, sensor reference and normalized distance lifetimes conflict; test scalar const/scope before declaration search.
- initialize immutable normalized distance at its first use: build failed RGET_RVL -ipa file -fp_contract off -lang=c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 301: const f32 distanceValue = kp_dist_vv1 / sensorDistance; # Error: ^^^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- initialize immutable sensor reference distance at its first read: build failed -DTARGET_RVL -ipa file -fp_contract off -lang=c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 291: const f32 sensorDistance = kpad->referenceDistance; # Error: ^^^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- initialize immutable upper Y boundary at its definition: build failed de/private/bte -DNDEBUG=1 -DTARGET_RVL -ipa file -fp_contract off -lang=c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 290: const f32 upperY = 0.75f; # Error: ^^^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
## libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (0, 7) structural/positional differences; instructions 52/52
Remote unit unchanged from initial tested report. Structural diagnosis: 52/52, same0x30frame; target inside-array base r3 vsr4 and squared-height f0 vsf4. No store/reload volatility proof.
- initialize sensor-state pointer at declaration rather than later lookup: (0, 7) structural/positional; instructions 52/52; restored.
- keep channel index immutable through typed array lookup: (0, 7) structural/positional; instructions 52/52; restored.
- use named zero after squared-height temporary declaration: (0, 3) structural/positional; instructions 52/52; restored.
## libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (2, 35) structural/positional differences; instructions 101/101
Remote unit unchanged from initial tested report. Structural diagnosis: 101/101,2 structural and35 positional float differences,sameframe. Squared magnitude/projected Y/unit-vector temporary lifetimes and scheduling differ.
- split magnitude square from square-root inline boundary: (2, 35) structural/positional; instructions 101/101; restored.
- name orthogonal projected Y before smoothing multiplication: build failed _contract off -lang=c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 508: const f32 projectedY = targetY * normalizedX - targetX * normalizedY; # Error: ^^^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- bind normalized unit components before stores in separate scalars: build failed TARGET_RVL -ipa file -fp_contract off -lang=c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 512: const f32 unitY = nextY / normalized; # Error: ^^^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
## libs/RVL_SDK/src/kpad/KPAD read_kpad_acc
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (16, 66) structural/positional differences; instructions 400/400
Remote unit unchanged from initial tested report. Structural diagnosis: 400/400; frame matches; helper-clamp/smooth float scheduling differs16structural/66positional. Try vector copy/inline input boundaries.
- group raw and previous vector locals in opposite declaration order: (32, 82) structural/positional; instructions 400/400; restored.
- name read-only remote scaling inputs before each clamp call: build failed T_RVL -ipa file -fp_contract off -lang=c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 606: const f32 rawX = (f32)-(s32)status->accX * kpad->value4DC; # Error: ^^^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- explicitly load previous acceleration through three component assignments: (33, 317) structural/positional; instructions 399/400; restored.
## libs/RVL_SDK/src/kpad/KPAD select_1obj_first
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (2, 26) structural/positional differences; instructions 109/109
Remote unit unchanged from initial tested report. Structural diagnosis: 109/109,2 structural/26positional. FP geometry local order and paired vector stores differ.
- bind object positions as immutable values within scan branch: (2, 26) structural/positional; instructions 109/109; restored.
- name tangent and axis component products before offsets: (2, 26) structural/positional; instructions 109/109; restored.
- use named candidate-array view in destination stores: (40, 52) structural/positional; instructions 109/109; restored.
## libs/RVL_SDK/src/kpad/KPAD select_1obj_continue
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (0, 17) structural/positional differences; instructions 93/93
Remote unit unchanged from initial tested report. Structural diagnosis: 93/93,17 FP differences with equal frame/branches; inner tangent products, direction and offset declarations are remaining lever.
- initialize immutable tangent products in inner geometry scope: (0, 17) structural/positional; instructions 93/93; restored.
- split matched-object copy into position and metadata fields: (0, 17) structural/positional; instructions 93/93; restored.
- declare inner offsets where multiplication first defines them: build failed NDEBUG=1 -DTARGET_RVL -ipa file -fp_contract off -lang=c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 872: f32 offsetX = directionX * distance; # Error: ^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
## libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (14, 45) structural/positional differences; instructions 250/250
Remote unit unchanged from initial tested report. Structural diagnosis: 250/250;14 structural/45positional float scheduling differences; smoothing helper boundaries and vector aggregate stores differ.
- split smoothing magnitude products into named scalar scale: build failed -ipa file -fp_contract off -lang=c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 954: const f32 smoothing = magnitude * kpad->value98; # Error: ^^^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- explicitly assign horizon components instead of vector aggregate: (24, 225) structural/positional; instructions 248/250; restored.
- declare immutable rotated and averaged geometry inputs: (14, 45) structural/positional; instructions 250/250; restored.
## libs/RVL_SDK/src/kpad/KPAD KPADRead
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (11, 89) structural/positional differences; instructions 459/459
Remote unit unchanged from initial tested report. Structural diagnosis: 459/459,frame matches;11structural/89positional polling/loop register schedule. Keep all output values initialized.
- move state pointer initialization after leading local declaration block: (11, 89) structural/positional; instructions 459/459; restored.
- declaration-time explicit no-probe-output argument: build failed de/private/bte -DNDEBUG=1 -DTARGET_RVL -ipa file -fp_contract off -lang=c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 1330: u32* noDeviceOutput = NULL; # Error: ^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- declare immutable previous-buttons value at its initial assignment: build failed L -ipa file -fp_contract off -lang=c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 1440: const u16 previousButtons = kpad->status.hold; # Error: ^^^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
## libs/RVL_SDK/src/kpad/KPAD KPADInit
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (9, 81) structural/positional differences; instructions 185/185
Remote unit unchanged from initial tested report. Structural diagnosis: 185/185,sameframe;9structural/81positional init register/coloring and floatload schedule; test scalar scopes and ring loop form.
- initialize rotation-element cosine at first use after heap/state setup: build failed ract off -lang=c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 1556: f32 rotationElement = (f32)cos(degreesToRadians * sensor_bar_angle_degrees); # Error: ^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- name reference diagonal square before square-root boundary: build failed VL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 1520: const f32 referenceDiagonalSquared = referenceWidth * referenceWidth + referenceHeight * referenceHeight; # Error: ^^^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
- replace nested sample-ring do loop with explicit for loop: (37, 132) structural/positional; instructions 194/185; restored.
C declaration correction: MWCC C mode rejects declarations after statements. Those failed scope trials are restored; repeat with declarations at block starts and unchanged assignment positions. Failed builds do not count toward the successful-trial audit below.
## libs/RVL_SDK/src/kpad/KPAD reset_kpad
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (0, 10) structural/positional differences; instructions 117/117
- immutable normalized distance initialized in leading declarations: (8, 109) structural/positional; instructions 118/117; restored.
- immutable sensor distance initialized in leading declarations: (0, 10) structural/positional; instructions 117/117; restored.
- immutable upper boundary initialized in leading declarations: (0, 10) structural/positional; instructions 117/117; restored.
## libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (2, 35) structural/positional differences; instructions 101/101
- declare orthogonal projected Y before assignments: (2, 35) structural/positional; instructions 101/101; restored.
- define both normalized components at start of normalized-vector block: (2, 37) structural/positional; instructions 101/101; restored.
## libs/RVL_SDK/src/kpad/KPAD read_kpad_acc
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (16, 66) structural/positional differences; instructions 400/400
- declare raw X before switch and assign just before inline clamp: (16, 66) structural/positional; instructions 400/400; restored.
## libs/RVL_SDK/src/kpad/KPAD select_1obj_continue
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (0, 17) structural/positional differences; instructions 93/93
- inner geometry direction values declared before offset values: (0, 19) structural/positional; instructions 93/93; restored.
## libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (14, 45) structural/positional differences; instructions 250/250
- declare smoothing scale at distance-filter block start: (14, 45) structural/positional; instructions 250/250; restored.
## libs/RVL_SDK/src/kpad/KPAD KPADRead
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (11, 89) structural/positional differences; instructions 459/459
- declare typed initialized probe output pointer before statements: (11, 89) structural/positional; instructions 459/459; restored.
- signed previous-button temporary with original truncation preserved: (23, 161) structural/positional; instructions 457/459; restored.
## libs/RVL_SDK/src/kpad/KPAD KPADInit
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (9, 81) structural/positional differences; instructions 185/185
- rotation-element local scoped to start of controller loop: (9, 81) structural/positional; instructions 185/185; restored.
- declare diagonal square at loop start then assign before sqrt: (9, 81) structural/positional; instructions 185/185; restored.
## libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon
Fetch origin/main 7be7f1594ed5c12a2eddaabec47369ee814ccc46. Initial assembly diagnosis: (2, 35) structural/positional differences; instructions 101/101
- Register-only last: declaration search 180 maximum evaluations after structural/source-level trials. declaration block: | f32 magnitude = (f32)sqrt(kpad->acceleration.x * kpad->acceleration.x + kpad->acceleration.y * kpad->acceleration.y); | f32 normalizedX; | f32 normalizedY; | f32 targetY; | f32 targetX; | f32 productX; | f32 oldX; | f32 oldY; | f32 blend; | f32 projectedX; | f32 smoothing; | f32 deltaX; | f32 nextX; | f32 nextY; | f32 normalized; | f32 unitX; | f32 oldCircleX; | f32 oldCircleY; | f32 unitY; | f32 circleX; | f32 deltaCircleX; | f32 circleY; | f32 deltaCircleY; | start (2, 35) | improved (0, 30) | improved (0, 29) | best (0, 29) after 180 builds; kept in source: | f32 productX; | f32 oldX; | f32 normalizedY; | f32 targetY; | f32 targetX; | f32 magnitude = (f32)sqrt(kpad->acceleration.x * kpad->acceleration.x + kpad->acceleration.y * kpad->acceleration.y); | f32 normalizedX; | f32 oldY; | f32 blend; | f32 projectedX; | f32 smoothing; | f32 deltaX; | f32 nextX; | f32 nextY; | f32 normalized; | f32 unitX; | f32 oldCircleX; | f32 oldCircleY; | f32 unitY; | f32 circleX; | f32 deltaCircleX; | f32 circleY; | f32 deltaCircleY; | . Final (0, 29) structural/positional differences; instructions 101/101.
## libs/RVL_SDK/src/kpad/KPAD select_1obj_continue
Fetch origin/main ff52d5235d0823d5433dac6128d118d3f86f7afa. Initial assembly diagnosis: (0, 17) structural/positional differences; instructions 93/93
- Register-only last: declaration search 150 maximum evaluations after structural/source-level trials. declaration block: | f32 axisX; | f32 normX; | f32 axisY; | f32 normY; | f32 distance; | f32 horizontal; | f32 vertical; | f32 offsetX; | f32 directionX; | f32 directionY; | f32 offsetY; | f32 tangentY; | f32 tangentX; | start (0, 17) | improved (0, 16) | improved (0, 15) | improved (0, 8) | improved (0, 6) | improved (0, 4) | improved (0, 0) | best (0, 0) after 95 builds; kept in source: | f32 distance; | f32 normY; | f32 vertical; | f32 directionY; | f32 offsetX; | f32 axisY; | f32 horizontal; | f32 axisX; | f32 directionX; | f32 normX; | f32 offsetY; | f32 tangentY; | f32 tangentX; | . Final (0, 0) structural/positional differences; instructions 93/93.
Round3 exact candidate: select_1obj_continue has 93/93 instructions, ctxdiff diffs0, exact-name objdiff100 after separating declarations from assignments and matching distance-first offset multiplication. All-unit quick gate PASS, pools identical,0 regressions, data unchanged. KPAD19/29 ->20/29, code5916 ->6288/13056.
## libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos
Fetch origin/main b6687e9ff9e08dc5d84b2101e21fd08c41cc3040. Initial assembly diagnosis: (0, 9) structural/positional differences; instructions 19/19
Projection register-only final search: structural operands diagnosed above. Split coefficients into named leading locals, keep literal token order and height/aspect operand order; preserve all assignments in source evaluation order.
- Named coefficients: declaration block: | f64 scaled; | f32 height; | f32 halfHeight; | f32 x; | f32 y; | f32 half; | f32 aspect; | start (0, 11) | improved (0, 10) | improved (0, 9) | improved (0, 7) | best (0, 7) after 97 builds; kept in source: | f32 halfHeight; | f32 aspect; | f32 half; | f32 x; | f32 y; | f32 height; | f64 scaled; |
- Named coefficients with reusable double result: declaration block: | f64 scaled; | f32 height; | f32 halfHeight; | f32 x; | f32 y; | f32 half; | f32 aspect; | start (0, 11) | improved (0, 10) | improved (0, 9) | improved (0, 7) | best (0, 7) after 97 builds; kept in source: | f32 halfHeight; | f32 aspect; | f32 half; | f32 x; | f32 y; | f32 height; | f64 scaled; |
## libs/RVL_SDK/src/kpad/KPAD reset_kpad
Fetch origin/main b6687e9ff9e08dc5d84b2101e21fd08c41cc3040. Initial assembly diagnosis: (0, 10) structural/positional differences; instructions 117/117
Further target diagnosis: target retains calibrated distance constant in f3 through value510 store while ours uses anonymous f0. Give that real input a named scalar, preserving read/store ordering.
- named calibrated distance declaration placement 0: (0, 8) structural/positional; instructions 117/117; restored.
- named calibrated distance declaration placement 1: (0, 10) structural/positional; instructions 117/117; restored.
- named calibrated distance declaration placement 2: (0, 10) structural/positional; instructions 117/117; restored.
- Named calibrated distance final declaration search: declaration block: | f32 upperY; | f32 distanceValue; | f32 zero; | f32 sensorDistance; | f32 lowerY; | f32 one; | f32 negativeOne; | KPADDPDObject* object; | f32 calibratedDistance; | start (0, 8) | improved (0, 0) | best (0, 0) after 4 builds; kept in source: | f32 sensorDistance; | f32 distanceValue; | f32 zero; | f32 upperY; | f32 lowerY; | f32 one; | f32 negativeOne; | KPADDPDObject* object; | f32 calibratedDistance; |
Round3 second exact candidate: reset_kpad117/117, ctxdiff diffs0, objdiff100; named calibrated-distance input fixes its live range, then swapped sensor-distance/upper-boundary declarations matches float registers. All-unit quick gate PASS,0 regressions/patterns/style, pools identical, data100%. KPAD20/29 ->21/29,code6288 ->6756.
## Round3 successful-trial and extent audit
All26 baseline-open functions have at least3 distinct successfully built source variants; failed C-mode declarations excluded. Target ELF extents of all26 end before/equal next symbol in their section, no overlap. Owned source files in HEAD and freshly fetched origin/main were identical before trials; no duplicated remote matches. All owned data already pairs100%, no rename/extent edits justified.
- src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv: baseline 97.44634%; 3 successful source trials.
- src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv: baseline 88.03571%; 6 successful source trials.
- src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv: baseline 99.42105%; 3 successful source trials.
- src/scene/address/iplAddressEdit set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err: baseline 98.666664%; 3 successful source trials.
- src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv: baseline 97.73972%; 3 successful source trials.
- src/scene/sdChannelSelect/iplSDChannelSelect handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv: baseline 99.15205%; 3 successful source trials.
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl: baseline 97.81188%; 3 successful source trials.
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl: baseline 97.833336%; 3 successful source trials.
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl: baseline 97.29365%; 3 successful source trials.
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl: baseline 97.55125%; 3 successful source trials.
- src/scene/sdChannelSelect/iplSDChannelSelect flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv: baseline 99.65714%; 3 successful source trials.
- src/scene/sdChannelSelect/iplSDChannelSelect calcCommon__Q33ipl5scene15SDChannelSelectFv: baseline 99.07407%; 3 successful source trials.
- src/scene/sdChannelSelect/iplSDChannelSelect initializeNormalPage__Q33ipl5scene15SDChannelSelectFv: baseline 98.93617%; 3 successful source trials.
- src/scene/sdChannelSelect/iplSDChannelSelect selectChannel__Q33ipl5scene15SDChannelSelectFii: baseline 98.305084%; 3 successful source trials.
- src/scene/sdChannelSelect/iplSDChannelSelect setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj: baseline 93.4721%; 3 successful source trials.
- src/scene/sdChannelSelect/iplSDChannelSelect onEventDerived__Q43ipl5scene32@unnamed@iplSDChannelSelect_cpp@33SDChannelSelectButtonEventHandlerFUlUlPCQ33ipl10controller9Interface: baseline 98.541664%; 3 successful source trials.
- libs/RVL_SDK/src/kpad/KPAD reset_kpad: baseline 99.48718%; 6 successful source trials.
- libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos: baseline 96.57895%; 4 successful source trials.
- libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight: baseline 99.23077%; 3 successful source trials.
- libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon: baseline 97.27723%; 3 successful source trials.
- libs/RVL_SDK/src/kpad/KPAD read_kpad_acc: baseline 98.15%; 3 successful source trials.
- libs/RVL_SDK/src/kpad/KPAD select_1obj_first: baseline 98.348625%; 3 successful source trials.
- libs/RVL_SDK/src/kpad/KPAD select_1obj_continue: baseline 98.49462%; 3 successful source trials.
- libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable: baseline 94.82%; 3 successful source trials.
- libs/RVL_SDK/src/kpad/KPAD KPADRead: baseline 97.52723%; 3 successful source trials.
- libs/RVL_SDK/src/kpad/KPAD KPADInit: baseline 96.51351%; 3 successful source trials.
## Round3 final full gate and remaining-function audit
Full clean non-quick gate over all three units: GATE PASS; full43U build OK; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d; pools identical;0 regressions,0 forbidden additions,0 readability warnings.
Address exact90/94 ->90/94, code23044 ->23044/27112, data2560 ->2560/2560. SD exact117/129 ->117/129, code27108 ->27108/33828, data2960 ->2960/2960. KPAD exact19/29 ->21/29, code5916 ->6756/13056, data8032 ->8032/8032.
Immediate matching stack store/reload pairs in remaining targets: []. No definition-level volatility justified. No configuration/header/data edits retained. Uncertainty: exact original handling of unspecified message and setter arguments remains unrecoverable safely; no uninitialized-value workaround attempted.
- src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv 97.44634%; 3 successfully built distinct source trials; layout construction lifetime/register scheduling; same820 instructions.
- src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv 88.03571%; 6 successfully built distinct source trials; text-array addresses folded until after pane lookup; target retains pointers across lookup,82/84.
- src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv 99.42105%; 3 successfully built distinct source trials; memcpy source/destination address evaluation order,38/38.
- src/scene/address/iplAddressEdit set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err 98.666664%; 3 successfully built distinct source trials; extra safe default initialization; target appears to leave messageId undefined for unhandled error,76/75.
- src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv 97.73972%; 3 successfully built distinct source trials; elapsed tick conversion temporaries/scheduling,145/146.
- src/scene/sdChannelSelect/iplSDChannelSelect handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv 99.15205%; 3 successfully built distinct source trials; beq-plus-branch dispatch and compaction count coloring,170/171.
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.81188%; 3 successfully built distinct source trials; threshold load hoisted before count store,101/101.
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.833336%; 3 successfully built distinct source trials; threshold load hoisted before count store,102/102.
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.29365%; 3 successfully built distinct source trials; threshold/count schedule plus loop coloring,126/126.
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.55125%; 3 successfully built distinct source trials; four repeated threshold/count schedules,361/361.
- src/scene/sdChannelSelect/iplSDChannelSelect flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv 99.65714%; 3 successfully built distinct source trials; save manager/heap argument load order,35/35.
- src/scene/sdChannelSelect/iplSDChannelSelect calcCommon__Q33ipl5scene15SDChannelSelectFv 99.07407%; 3 successfully built distinct source trials; defined NULL out-handler argument produces extra li r5,0,109/108.
- src/scene/sdChannelSelect/iplSDChannelSelect initializeNormalPage__Q33ipl5scene15SDChannelSelectFv 98.93617%; 3 successfully built distinct source trials; defined NULL out-handler argument produces extra li r5,0,95/94.
- src/scene/sdChannelSelect/iplSDChannelSelect selectChannel__Q33ipl5scene15SDChannelSelectFii 98.305084%; 3 successfully built distinct source trials; defined NULL out-handler argument produces extra li r5,0,60/59.
- src/scene/sdChannelSelect/iplSDChannelSelect setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj 93.4721%; 3 successfully built distinct source trials; matrix/scissor floating operand scheduling and temporaries,233/233.
- src/scene/sdChannelSelect/iplSDChannelSelect onEventDerived__Q43ipl5scene32@unnamed@iplSDChannelSelect_cpp@33SDChannelSelectButtonEventHandlerFUlUlPCQ33ipl10controller9Interface 98.541664%; 3 successfully built distinct source trials; event-zero dispatch branch form and loop/register lifetimes,144/144.
- libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos 96.57895%; 4 successfully built distinct source trials; floating register allocation and multiply operand order,19/19; named coefficients search best7 differences restored.
- libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight 99.23077%; 3 successfully built distinct source trials; inside-array base r4 vsr3 plus squared-height/zero registers,52/52; partial3 differences restored.
- libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon 97.27723%; 3 successfully built distinct source trials; floating lifetimes/coloring,101/101; declaration search best29 differences restored.
- libs/RVL_SDK/src/kpad/KPAD read_kpad_acc 98.15%; 3 successfully built distinct source trials; clamp/smoothing inline boundaries and floating scheduling,400/400.
- libs/RVL_SDK/src/kpad/KPAD select_1obj_first 98.348625%; 3 successfully built distinct source trials; geometry floating lifetimes and paired stores,109/109.
- libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable 94.82%; 3 successfully built distinct source trials; smoothing/projected geometry floating scheduling,250/250.
- libs/RVL_SDK/src/kpad/KPAD KPADRead 97.52723%; 3 successfully built distinct source trials; sample loop/polling temporaries and branch scheduling,459/459.
- libs/RVL_SDK/src/kpad/KPAD KPADInit 96.51351%; 3 successfully built distinct source trials; controller/ring initialization and floating scheduling,185/185.

File diff suppressed because it is too large Load Diff

View File

@@ -1344,352 +1344,3 @@ OPEN TMCJPEGDEC_IdctBlock4x4_Col 83.89781% | 3 distinct compiledR6trials | 137/1
Finalclean ctxdiff:PFVOL_p_rmvvol64/64diffs0;PFENT_ITER_GetLFNEntryName73/73diffs0;uhf_msc_blk_pread129/129diffs0. No code/data/regression failures. No untried remaining function.
R6 files: config/43U/symbols.txt;libs/RVL_SDK/src/fa/pf_volume.c;libs/RVL_SDK/src/fa/pf_entry_iterator.c;libs/RVL_SDK/src/fa/msc/puh_msc_blk.c;tools/decomp-assist/fz3.attempts.md. Commits:2f84a3fe exactvolume+markerextent;5ce59884 iteratorstructuralimprovement;78c76f31 exactMSC;673020e0 exactiterator. HIGH650cc87e/98cb7171 predateR6 retained.
Uncertainty: original mode3 Hangul converter source/inline boundary is unavailable; dynamiccounter and dead newline comparison are proven targetinstructions, generic helper/class attempts constant-fold. Marker1-byteextent proof recorded above; no otherdataownership changes.
# Round7 XHIGH, fresh branch HEAD72cf3991. Each trial logs first differing instruction and source construct, with original always restored until accepted by gate.
libs/RevoEX/src/so/SOOption | R7 pool run before tuning; current source alreadyorigin/main; data ownership audit starts with target extents and relocation names.
libs/RVL_SDK/src/fa/pf_volume | R7 pool run before tuning; current source alreadyorigin/main; data ownership audit starts with target extents and relocation names.
libs/RVL_SDK/src/fa/pf_entry_iterator | R7 pool run before tuning; current source alreadyorigin/main; data ownership audit starts with target extents and relocation names.
src/keyboard/tiString | R7 pool run before tuning; current source alreadyorigin/main; data ownership audit starts with target extents and relocation names.
src/keyboard/tiSignWindow | R7 pool run before tuning; current source alreadyorigin/main; data ownership audit starts with target extents and relocation names.
libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var | R7 pool run before tuning; current source alreadyorigin/main; data ownership audit starts with target extents and relocation names.
libs/RevoEX/src/so/SOOption | R7 data 0/0; no unpaired owned data indicated.
SOGetInterfaceOpt | R7 extent 0x814b476c+0x1dc=0x814b4948; next SOSetInterfaceOpt 0x814b4948; overlap False
SOGetInterfaceOpt | R7 immediate stack store/reload evidence []; no unsupported volatile changes authorized.
libs/RVL_SDK/src/fa/pf_volume | R7 data 210976/210976; no unpaired owned data indicated.
PFVOL_attach | R7 extent 0x815e2364+0x2c0=0x815e2624; next PFVOL_detach 0x815e2624; overlap False
PFVOL_attach | R7 immediate stack store/reload evidence []; no unsupported volatile changes authorized.
PFVOL_regctx | R7 extent 0x815e4220+0x12c=0x815e434c; next PFVOL_unregctx 0x815e434c; overlap False
PFVOL_regctx | R7 immediate stack store/reload evidence []; no unsupported volatile changes authorized.
libs/RVL_SDK/src/fa/pf_entry_iterator | R7 data 24/24; no unpaired owned data indicated.
PFENT_ITER_FindCluster | R7 extent 0x815d3414+0x3b4=0x815d37c8; next PFENT_ITER_Retreat 0x815d37c8; overlap False
PFENT_ITER_FindCluster | R7 immediate stack store/reload evidence [(144, ('stw', 'r0, 0x20(r1)'), ('lwz', 'r0, 0x20(r1)'))]; no unsupported volatile changes authorized.
src/keyboard/tiString | R7 data 288/288; no unpaired owned data indicated.
inputChar__Q39textinput8tistring9DecolatedFw | R7 extent 0x81432ce4+0x220=0x81432f04; next confirmKana__Q39textinput8tistring9DecolatedFv 0x81432f04; overlap False
inputChar__Q39textinput8tistring9DecolatedFw | R7 immediate stack store/reload evidence []; no unsupported volatile changes authorized.
src/keyboard/tiSignWindow | R7 data 3468/3468; no unpaired owned data indicated.
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R7 extent 0x81430e50+0x374=0x814311c4; next __dt__Q49textinput8keyboard10signwindow7AnmPaneFv 0x814311c4; overlap False
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R7 immediate stack store/reload evidence []; no unsupported volatile changes authorized.
libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var | R7 data 0/0; no unpaired owned data indicated.
TMCJPEGDEC_IdctBlock4x4 | R7 extent 0x814ef490+0x220=0x814ef6b0; next TMCJPEGDEC_IdctBlock2x2 0x814ef6b0; overlap False
TMCJPEGDEC_IdctBlock4x4 | R7 immediate stack store/reload evidence []; no unsupported volatile changes authorized.
TMCJPEGDEC_IdctBlock4x4_Col | R7 extent 0x814ef810+0x224=0x814efa34; next TMCJPEGDEC_IdctBlock2x2_Col 0x814efa34; overlap False
TMCJPEGDEC_IdctBlock4x4_Col | R7 immediate stack store/reload evidence []; no unsupported volatile changes authorized.
SOGetInterfaceOpt | R7 fresh fetch origin source identical; first5 level parameter r25 vstarget26 and optionr28 vstarget25;119instructions/frame0x30/branchforms andstoresotherwiseidentical. No overlappingextent or adjacentstackstore/reload. Const input helper and response views before declaration search.
SOGetInterfaceOpt | R7 const length input in OptionLength inline boundary | objdiff 99.78992; 119/119 instructions; structural/exact (0, 5); first (5, ('mr', 'r25, r4'), ('mr', 'r26, r4'))
SOGetInterfaceOpt | R7 read-only view of typed selection object | objdiff 89.31933; 122/119 instructions; structural/exact (21, 116); first (0, ('stwu', 'r1, -0x40(r1)'), ('stwu', 'r1, -0x30(r1)'))
SOGetInterfaceOpt | R7 const selectors and returned response read view | objdiff 99.78992; 119/119 instructions; structural/exact (0, 5); first (5, ('mr', 'r25, r4'), ('mr', 'r26, r4'))
PFVOL_attach | R7 fresh fetch origin unchanged; true first142 beq distance differs because target143 mr0,r3 gives mountstatus distinct from public return0r3.174/176 frame0x20. Successful source li3,0 afterClearMount vs targetli0,0. Inline helper/public early return boundary first, novolatileproof or extentoverlap.
PFVOL_attach | R7 public zero-return on mount error instead of discarded helper result | objdiff 100.0; 176/176 instructions; structural/exact (0, 0); first None
EXACT CANDIDATE /tmp/fz3-r7-candidates/PFVOL_attach_public_zero_return_on_mount_error_instead_of_discarded_helper_result.txt
PFVOL_attach | R7 exact candidate preserves s32 mount error separately from public zero return; no artificial data or volatile; attach inline helper not called bythispath.176/176differences0.
PFVOL_attach | R7 quick GATE PASS,0regressions forbidden readability,36/37vs35/37 exact code17692/17992vs16988 data210976/210976, ctxdiff176/176diffs0. DOL26116613f624061ba99c8d1a299aaa6efa85670d.
PFVOL_regctx | R7 fresh origin unchanged; first16 free slotr5 vsr8, statusr8 vsr5,75/75/frame0x10, nobranchformdifferences/noadjacentstackreloadproof. Const context table view and inline slot boundary next.
PFVOL_regctx | R7 const context array view for registration scan | objdiff 99.0; 75/75 instructions; structural/exact (0, 15); first (16, ('li', 'r5, 0'), ('li', 'r8, 0'))
PFVOL_regctx | R7 const single context input helper for active status | objdiff 99.066666; 75/75 instructions; structural/exact (0, 14); first (16, ('li', 'r7, 0'), ('li', 'r8, 0'))
PFVOL_regctx | R7 const context helper plus declaration order index free id error | objdiff 100.0; 75/75 instructions; structural/exact (0, 0); first None
EXACT CANDIDATE /tmp/fz3-r7-candidates/PFVOL_regctx_const_context_helper_plus_declaration_order_index_free_id_error.txt
PFVOL_regctx | R7 exact from real const input helper boundary ContextStatus, then declaration order context_index/free_context_index/context_id/error. Targetfree_slotr8 statusr5;75/75diffs0. const pointer selected load/temporary allocation; no volatile.
PFVOL_regctx | R7 quick GATE PASS volume37/37vs35/37, allcode17992/17992 alldata210976/210976,0regressions forbidden readability; targetDOLhash. ctxdiff75/75diffs0.
PFENT_ITER_FindCluster | R7 first39 sharedconstantone r7 vstarget8, shifted entriesr8 vstarget7,237/237/frame0xA0. Definitionvolatile evidence is iter.index, not current_cluster: iterator beginsstack0x20; target144 stw r0,0x20(r1) immediately145 lwz r0,0x20(r1), thencmp. Test private struct fieldqualifier with laterunitregressionaudit.
PFENT_ITER_FindCluster | R7 volatile iterator index field proven by immediate stack reload | objdiff 96.8903; 240/237 instructions; structural/exact (16, 202); first (18, ('b', '856'), ('b', '844'))
PFENT_ITER_FindCluster | R7 const iterator input helper returns sector entry count | objdiff 99.81013; 237/237 instructions; structural/exact (0, 8); first (39, ('li', 'r7, 1'), ('li', 'r8, 1'))
PFENT_ITER_FindCluster | R7 const directory entry input parameter | objdiff 85.27426; 227/237 instructions; structural/exact (47, 233); first (2, ('li', 'r9, 0'), ('li', 'r6, 0'))
PFENT_ITER_FindCluster | R7 const entry view only for initial iterator setup | objdiff 99.81013; 237/237 instructions; structural/exact (0, 8); first (39, ('li', 'r7, 1'), ('li', 'r8, 1'))
PFENT_ITER_FindCluster | R7 const cluster input in hint initialization boundary | objdiff 99.81013; 237/237 instructions; structural/exact (0, 8); first (39, ('li', 'r7, 1'), ('li', 'r8, 1'))
PFENT_ITER_FindCluster | R7 reuse initial cluster field for hint sentinel assignments | objdiff 99.81013; 237/237 instructions; structural/exact (0, 8); first (39, ('li', 'r7, 1'), ('li', 'r8, 1'))
inputChar__Q39textinput8tistring9DecolatedFw | R7 fresh origin unchanged; first65mode3branch size125/136frame0x30. Missing dynamicappend, initialNUL, deadnewlinecmp and countmask; no localvolatile evidence or symboloverlap. Constinput character and builder views test missing helper boundary honestly.
inputChar__Q39textinput8tistring9DecolatedFw | R7 const character pointer in mode3 inline append boundary | objdiff 90.132355; 125/136 instructions; structural/exact (18, 73); first (10, ('beq', '428'), ('beq', '472'))
inputChar__Q39textinput8tistring9DecolatedFw | R7 const stream view for mode3 termination and length | objdiff 90.757355; 126/136 instructions; structural/exact (17, 73); first (10, ('beq', '432'), ('beq', '472'))
inputChar__Q39textinput8tistring9DecolatedFw | R7 const stream reference preserves builder termination boundary | objdiff 90.757355; 126/136 instructions; structural/exact (17, 73); first (10, ('beq', '432'), ('beq', '472'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R7 fresh origin unchanged221/frame0x50, first48 vtableconstantr26 vstarget25,34operand-only diffs constructor/table/counter registers. Const pane metadata helper before declaration permutations; no adjacentstack reload or extent overlap.
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R7 const pane metadata in complete construction helper | objdiff 98.07692; 221/221 instructions; structural/exact (0, 61); first (48, ('lis', 'r26, 0'), ('lis', 'r25, 0'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R7 const pane metadata reference in construction boundary | objdiff 98.07692; 221/221 instructions; structural/exact (0, 61); first (48, ('lis', 'r26, 0'), ('lis', 'r25, 0'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R7 animation bound read directly through const pane metadata | objdiff 96.47059; 221/221 instructions; structural/exact (3, 128); first (5, ('li', 'r19, 0'), ('li', 'r14, 0'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R7 readonly pane table base as named loop input | objdiff 99.162895; 221/221 instructions; structural/exact (0, 32); first (48, ('lis', 'r26, 0'), ('lis', 'r25, 0'))
TMCJPEGDEC_IdctBlock4x4 | R7 fresh origin unchanged136/frame0x120. First2 sourceptrr3 vsr8;19form/93operanddiffs, rowstores1,2,3,0 vtarget0,1,2,3 andload/mathoperand ordering. disasm_fn fails no.rela.text; ctxdiff/Capstone andtarget.s authoritative. Noextentoverlap orstackreloadproof. Const coefficient view first.
TMCJPEGDEC_IdctBlock4x4 | R7 const source pointer for both IDCT passes | objdiff 85.44118; 136/136 instructions; structural/exact (19, 93); first (2, ('addi', 'r3, r3, 0x60'), ('addi', 'r8, r3, 0x60'))
TMCJPEGDEC_IdctBlock4x4 | R7 const transform input behind full inline boundary | objdiff 78.338234; 130/136 instructions; structural/exact (47, 133); first (2, ('addi', 'r10, r3, 0x60'), ('addi', 'r8, r3, 0x60'))
TMCJPEGDEC_IdctBlock4x4 | R7 const public coefficient input with unit-guarded prototype | objdiff 85.44118; 136/136 instructions; structural/exact (19, 93); first (2, ('addi', 'r3, r3, 0x60'), ('addi', 'r8, r3, 0x60'))
TMCJPEGDEC_IdctBlock4x4 | R7 readonly source with first-row stores0 1 2 3 and shared rotation | objdiff 78.492645; 136/136 instructions; structural/exact (39, 93); first (2, ('addi', 'r3, r3, 0x60'), ('addi', 'r8, r3, 0x60'))
TMCJPEGDEC_IdctBlock4x4 | R7 read-only transform descriptor includes output pointer and stride | objdiff 85.588234; 136/136 instructions; structural/exact (19, 93); first (2, ('addi', 'r7, r3, 0x60'), ('addi', 'r8, r3, 0x60'))
TMCJPEGDEC_IdctBlock4x4_Col | R7 fresh origin unchanged137/frame0x120; first8 coefficientb r5 vsr10,31form/48operand differences, math operand d+b/rot+sum and load/store scheduling firstpass. Pointers7/8alreadytarget. Const source view then inline row boundary; no volatile/extentproof.
TMCJPEGDEC_IdctBlock4x4_Col | R7 const coefficient source pointer for signed IDCT passes | objdiff 83.89781; 137/137 instructions; structural/exact (31, 48); first (8, ('lwz', 'r5, 4(r7)'), ('lwz', 'r10, 4(r7)'))
TMCJPEGDEC_IdctBlock4x4_Col | R7 const signed transform input behind full inline boundary | objdiff 79.9927; 139/137 instructions; structural/exact (35, 135); first (1, ('addi', 'r5, r3, 0x60'), ('li', 'r0, 2'))
TMCJPEGDEC_IdctBlock4x4_Col | R7 readonly source and target d+b rotation+sum operand order | objdiff 83.86131; 137/137 instructions; structural/exact (31, 48); first (8, ('lwz', 'r5, 4(r7)'), ('lwz', 'r10, 4(r7)'))
TMCJPEGDEC_IdctBlock4x4_Col | R7 odd coefficient recombination inside inline arithmetic boundary | objdiff 79.55474; 137/137 instructions; structural/exact (33, 81); first (2, ('addi', 'r8, r3, 0x60'), ('addi', 'r7, r3, 0x60'))
signcreate | R7 retain candidate readonly named pane table input reduces34to32operand differences221/221structural0,99.117645->99.162895. declsearch13builds nofurtherchange. Actual table remainsmutabledata withsameaddress andextent; view only const, dataowned100.
signcreate | R7 quick GATE PASS,99.162895vs99.117645,55/56 unchanged code6300/7184 data3468/3468;0regressions forbidden readability andtargetDOL. ctxdiff32operands. Constructor-vtable/table relocation load ordering also remains; lis/addi placeholders hide symbol ordering, so not all32differences are onlyregister choices.
SOGetInterfaceOpt | R7 success-scoped immutable command and response pointer bases | objdiff 99.78992; 119/119 instructions; structural/exact (0, 5); first (5, ('mr', 'r25, r4'), ('mr', 'r26, r4'))
SOGetInterfaceOpt | R7 response immutable pointers scoped after selector stores | objdiff 99.78992; 119/119 instructions; structural/exact (0, 5); first (5, ('mr', 'r25, r4'), ('mr', 'r26, r4'))
SOGetInterfaceOpt | R7 unsigned local selector with public API preserved | objdiff 99.78992; 119/119 instructions; structural/exact (0, 5); first (5, ('mr', 'r25, r4'), ('mr', 'r26, r4'))
SOGetInterfaceOpt | R7 unsigned selector check in inline boundary | objdiff 94.94118; 124/119 instructions; structural/exact (9, 112); first (5, ('mr', 'r25, r4'), ('mr', 'r26, r4'))
TMCJPEGDEC_IdctBlock4x4 | R7 readonly eight-coefficient row view for first pass | objdiff 85.661766; 136/136 instructions; structural/exact (19, 89); first (2, ('addi', 'r3, r3, 0x60'), ('addi', 'r8, r3, 0x60'))
TMCJPEGDEC_IdctBlock4x4 | R7 descending paired-row index derives both pass pointers | objdiff 74.94853; 131/136 instructions; structural/exact (42, 134); first (2, ('li', 'r7, 0x60'), ('addi', 'r8, r3, 0x60'))
IDCT R7 new structural hypothesis: target firstpass paired rows may be automatic unrolling of four single-row iterations, ratherthan hand-written pairedsource. Next test restores natural4-rowloop withsource/destination stride8; no pragmas.
TMCJPEGDEC_IdctBlock4x4 | R7 natural four-row loop lets compiler unroll paired rows | objdiff 78.213234; 130/136 instructions; structural/exact (36, 134); first (2, ('addi', 'r12, r3, 0x60'), ('addi', 'r8, r3, 0x60'))
IDCT R7 natural4rowloop IS auto-unrolled2 as target, but savesr27..31 withstmw/lmw ratherthan4individualsave/restore, explaining exactly130vs136. Firstpass body40instructions matches targetcount. Scope evdiff separately from columnphase before moretuning.
TMCJPEGDEC_IdctBlock4x4 | R7 auto unrolled loop with row-local even difference | objdiff 78.213234; 130/136 instructions; structural/exact (36, 134); first (2, ('addi', 'r12, r3, 0x60'), ('addi', 'r8, r3, 0x60'))
TMCJPEGDEC_IdctBlock4x4 | R7 auto unrolled rows with all arithmetic temporaries scoped to row | objdiff 78.58088; 130/136 instructions; structural/exact (36, 131); first (3, ('stmw', 'r27, 0x10c(r1)'), ('stw', 'r31, 0x11c(r1)'))
TMCJPEGDEC_IdctBlock4x4 | R7 auto unrolled rows with const coefficient source | objdiff 78.213234; 130/136 instructions; structural/exact (36, 134); first (2, ('addi', 'r12, r3, 0x60'), ('addi', 'r8, r3, 0x60'))
TMCJPEGDEC_IdctBlock4x4 | R7 auto unrolled rows preserve b plus d subtree | objdiff 78.26471; 130/136 instructions; structural/exact (33, 134); first (2, ('addi', 'r12, r3, 0x60'), ('addi', 'r8, r3, 0x60'))
TMCJPEGDEC_IdctBlock4x4 | R7 auto unrolled rows recombine odd sum before rotation | objdiff 78.26471; 130/136 instructions; structural/exact (33, 134); first (2, ('addi', 'r12, r3, 0x60'), ('addi', 'r8, r3, 0x60'))
TMCJPEGDEC_IdctBlock4x4 | R7 auto unrolled rows compute even difference inside output expressions | objdiff 76.85294; 130/136 instructions; structural/exact (37, 134); first (2, ('stmw', 'r27, 0x10c(r1)'), ('addi', 'r8, r3, 0x60'))
TMCJPEGDEC_IdctBlock4x4 | R7 auto unrolled rows rotate before adding odd coefficient pair | objdiff 78.213234; 130/136 instructions; structural/exact (36, 134); first (2, ('addi', 'r12, r3, 0x60'), ('addi', 'r8, r3, 0x60'))
TMCJPEGDEC_IdctBlock4x4_Col | R7 natural four-row signed IDCT loop with shared temporaries | objdiff 99.48905; 137/137 instructions; structural/exact (0, 12); first (53, ('lwz', 'r9, 0x20(r6)'), ('lwz', 'r10, 0x20(r6)'))
TMCJPEGDEC_IdctBlock4x4_Col | R7 natural signed rows with scoped coefficient and butterfly locals | objdiff 99.48905; 137/137 instructions; structural/exact (0, 12); first (53, ('lwz', 'r9, 0x20(r6)'), ('lwz', 'r10, 0x20(r6)'))
TMCJPEGDEC_IdctBlock4x4_Col | R7 natural signed rows retain sum plus rotation expression | objdiff 99.34306; 137/137 instructions; structural/exact (0, 14); first (12, ('add', 'r3, r10, r12'), ('add', 'r3, r12, r10'))
TMCJPEGDEC_IdctBlock4x4_Col | R7 natural signed rows declare immutable coefficient values in body | objdiff 97.44526; 137/137 instructions; structural/exact (0, 41); first (8, ('lwz', 'r30, 4(r7)'), ('lwz', 'r10, 4(r7)'))
TMCJPEGDEC_IdctBlock4x4_Col | R7 natural signed IDCT with second-pass d plus b operand tree | objdiff 99.52555; 137/137 instructions; structural/exact (0, 12); first (53, ('lwz', 'r9, 0x20(r6)'), ('lwz', 'r10, 0x20(r6)'))
TMCJPEGDEC_IdctBlock4x4_Col | R7 natural signed IDCT second-pass b c declaration lifetimes | objdiff 98.868614; 137/137 instructions; structural/exact (0, 28); first (8, ('lwz', 'r11, 4(r7)'), ('lwz', 'r10, 4(r7)'))
TMCJPEGDEC_IdctBlock4x4_Col | R7 scoped column coefficients | objdiff 99.30657; 137/137 instructions; structural/exact (0, 13); first (53, ('lwz', 'r8, 0x20(r6)'), ('lwz', 'r10, 0x20(r6)'))
TMCJPEGDEC_IdctBlock4x4_Col | R7 scoped column coefficients c before b | objdiff 99.30657; 137/137 instructions; structural/exact (0, 13); first (53, ('lwz', 'r8, 0x20(r6)'), ('lwz', 'r10, 0x20(r6)'))
TMCJPEGDEC_IdctBlock4x4_Col | R7 scoped column butterfly terms | objdiff 99.52555; 137/137 instructions; structural/exact (0, 12); first (53, ('lwz', 'r9, 0x20(r6)'), ('lwz', 'r10, 0x20(r6)'))
TMCJPEGDEC_IdctBlock4x4_Col | R7 scoped column butterfly terms reversed sums | objdiff 99.52555; 137/137 instructions; structural/exact (0, 12); first (53, ('lwz', 'r9, 0x20(r6)'), ('lwz', 'r10, 0x20(r6)'))
TMCJPEGDEC_IdctBlock4x4_Col | R7 EXACT: natural four-row loop auto-unrolls two rows with target load/store scheduling, first53 instructions exact; second-pass scoped coefficient/butterfly locals and d+b operand order reduce remaining12registerdiffs. declsearch28builds gives137/137 anddiffs0, objdiff100. Quick GATE PASS5/6code1260/1804 versus4/6code712; poolidentical, global0regressions forbidden readability, correctDOL. No data symbols or extents changed.
TMCJPEGDEC_IdctBlock4x4 | R7 fresh fetch origin still unchanged136/85.625; transfer proven natural signed-row odddiff/oddsum/even difference before rotation order, then tune unsigned column phase independently.
TMCJPEGDEC_IdctBlock4x4 | R7 natural unsigned rows with odd and even differences before rotation | objdiff 94.30147; 136/136 instructions; structural/exact (2, 86); first (2, ('addi', 'r12, r3, 0x60'), ('addi', 'r8, r3, 0x60'))
TMCJPEGDEC_IdctBlock4x4 | R7 natural unsigned rows with target d plus b addition subtree | objdiff 94.22794; 136/136 instructions; structural/exact (2, 86); first (2, ('addi', 'r12, r3, 0x60'), ('addi', 'r8, r3, 0x60'))
TMCJPEGDEC_IdctBlock4x4 | R7 natural unsigned rows use expression for odd difference | objdiff 94.30147; 136/136 instructions; structural/exact (2, 86); first (2, ('addi', 'r12, r3, 0x60'), ('addi', 'r8, r3, 0x60'))
TMCJPEGDEC_IdctBlock4x4 | R7 natural unsigned rows share scoped butterfly locals | objdiff 97.09559; 136/136 instructions; structural/exact (0, 51); first (50, ('rlwinm', 'r6, r5, 2, 0xe, 0x1d'), ('rlwinm', 'r3, r5, 2, 0xe, 0x1d'))
TMCJPEGDEC_IdctBlock4x4 | R7 scoped natural row arithmetic reproduces first50instructions exactly136/frame0x120. Remaining unsigned-column operands51; leading5scalar declsearch32builds reduces to49; no structural differences, now separate column lifetimes and pointer declarations.
TMCJPEGDEC_IdctBlock4x4 | R7 natural unsigned columns scoped butterfly coefficients | objdiff 96.13971; 136/136 instructions; structural/exact (0, 71); first (10, ('lwz', 'r31, 0xc(r8)'), ('lwz', 'r28, 0xc(r8)'))
TMCJPEGDEC_IdctBlock4x4 | R7 natural unsigned columns have distinct input pointer lifetime | objdiff 97.64706; 136/136 instructions; structural/exact (0, 45); first (53, ('addi', 'r6, r1, 0x14'), ('addi', 'r11, r1, 0x14'))
TMCJPEGDEC_IdctBlock4x4 | R7 natural unsigned columns distinct pointer and scoped math | objdiff 96.36029; 136/136 instructions; structural/exact (0, 67); first (10, ('lwz', 'r31, 0xc(r8)'), ('lwz', 'r28, 0xc(r8)'))
TMCJPEGDEC_IdctBlock4x4 | R7 natural unsigned columns reorder source and index declarations | objdiff 97.42647; 136/136 instructions; structural/exact (0, 49); first (50, ('rlwinm', 'r6, r5, 2, 0xe, 0x1d'), ('rlwinm', 'r3, r5, 2, 0xe, 0x1d'))
TMCJPEGDEC_IdctBlock4x4 | R7 all9column scalar declaration search146builds reduces45to42operand differences,136/136forms0. Firstpass remains exact; source,clamp temp,coefficients and index register choices in columnpass remain. Scoped column pointer distinguishes pass lifetimes.
TMCJPEGDEC_IdctBlock4x4 | R7 natural unsigned columns readonly temporary-buffer pointer | objdiff 98.01471; 136/136 instructions; structural/exact (0, 42); first (53, ('addi', 'r6, r1, 0x14'), ('addi', 'r11, r1, 0x14'))
TMCJPEGDEC_IdctBlock4x4 | R7 natural unsigned columns use target descending loop index | objdiff 98.01471; 136/136 instructions; structural/exact (0, 42); first (53, ('addi', 'r6, r1, 0x14'), ('addi', 'r11, r1, 0x14'))
TMCJPEGDEC_IdctBlock4x4 | R7 natural unsigned columns signed index preserves four iteration counter | objdiff 98.01471; 136/136 instructions; structural/exact (0, 42); first (53, ('addi', 'r6, r1, 0x14'), ('addi', 'r11, r1, 0x14'))
TMCJPEGDEC_IdctBlock4x4 | R7 natural unsigned columns output pointer declared outside row body | objdiff 96.39706; 136/136 instructions; structural/exact (2, 46); first (52, ('addi', 'r7, r1, 0x14'), ('subf', 'r31, r5, r3'))
TMCJPEGDEC_IdctBlock4x4 | R7 source pointer before coefficient declarations | objdiff 97.79412; 136/136 instructions; structural/exact (0, 46); first (50, ('rlwinm', 'r6, r5, 2, 0xe, 0x1d'), ('rlwinm', 'r3, r5, 2, 0xe, 0x1d'))
TMCJPEGDEC_IdctBlock4x4 | R7 source pointer after coefficient declarations | objdiff 97.79412; 136/136 instructions; structural/exact (0, 46); first (50, ('rlwinm', 'r6, r5, 2, 0xe, 0x1d'), ('rlwinm', 'r3, r5, 2, 0xe, 0x1d'))
TMCJPEGDEC_IdctBlock4x4 | R7 source pointer after buffer and loop variables | objdiff 97.79412; 136/136 instructions; structural/exact (0, 46); first (50, ('rlwinm', 'r6, r5, 2, 0xe, 0x1d'), ('rlwinm', 'r3, r5, 2, 0xe, 0x1d'))
TMCJPEGDEC_IdctBlock4x4 | R7 unsigned column transform isolated in readonly inline phase | objdiff 90.07353; 130/136 instructions; structural/exact (10, 132); first (3, ('stmw', 'r27, 0x10c(r1)'), ('stw', 'r31, 0x11c(r1)'))
TMCJPEGDEC_IdctBlock4x4 | R7 column phase block owns coefficient and math locals | objdiff 96.47059; 136/136 instructions; structural/exact (0, 67); first (10, ('lwz', 'r31, 0xc(r8)'), ('lwz', 'r28, 0xc(r8)'))
TMCJPEGDEC_IdctBlock4x4 | R7 column phase block owns only output address and coefficients | objdiff 97.79412; 136/136 instructions; structural/exact (0, 44); first (53, ('addi', 'r6, r1, 0x14'), ('addi', 'r11, r1, 0x14'))
TMCJPEGDEC_IdctBlock4x4 | R7 column phase block owns only rotation and sums | objdiff 97.42647; 136/136 instructions; structural/exact (0, 47); first (53, ('addi', 'r6, r1, 0x14'), ('addi', 'r11, r1, 0x14'))
TMCJPEGDEC_IdctBlock4x4 | R7 column phase declares index and pointer before assignment | objdiff 98.01471; 136/136 instructions; structural/exact (0, 42); first (53, ('addi', 'r6, r1, 0x14'), ('addi', 'r11, r1, 0x14'))
TMCJPEGDEC_IdctBlock4x4 | R7 column phase initializes index before source after separate declarations | objdiff 98.01471; 136/136 instructions; structural/exact (0, 42); first (53, ('addi', 'r6, r1, 0x14'), ('addi', 'r11, r1, 0x14'))
TMCJPEGDEC_IdctBlock4x4 | R7 reuse sp for temporary-buffer column input | objdiff 97.79412; 136/136 instructions; structural/exact (0, 46); first (50, ('rlwinm', 'r6, r5, 2, 0xe, 0x1d'), ('rlwinm', 'r3, r5, 2, 0xe, 0x1d'))
TMCJPEGDEC_IdctBlock4x4 | R7 reuse dp for temporary-buffer column input | objdiff 97.79412; 136/136 instructions; structural/exact (0, 46); first (50, ('rlwinm', 'r6, r5, 2, 0xe, 0x1d'), ('rlwinm', 'r3, r5, 2, 0xe, 0x1d'))
TMCJPEGDEC_IdctBlock4x4 | R7 column index shares u16 output coordinate type | objdiff 96.83088; 137/136 instructions; structural/exact (6, 51); first (53, ('addi', 'r6, r1, 0x14'), ('addi', 'r11, r1, 0x14'))
TMCJPEGDEC_IdctBlock4x4 | R7 column traversal expressed by source end pointer | objdiff 71.92647; 131/136 instructions; structural/exact (51, 134); first (2, ('addi', 'r7, r3, 0x60'), ('addi', 'r8, r3, 0x60'))
TMCJPEGDEC_IdctBlock4x4 | R7 readonly column butterfly helper with named result references | objdiff 87.94118; 130/136 instructions; structural/exact (12, 132); first (3, ('stmw', 'r27, 0x10c(r1)'), ('stw', 'r31, 0x11c(r1)'))
TMCJPEGDEC_IdctBlock4x4 | R7 mutable column butterfly helper input for retail alias assumptions | objdiff 87.94118; 130/136 instructions; structural/exact (12, 132); first (3, ('stmw', 'r27, 0x10c(r1)'), ('stw', 'r31, 0x11c(r1)'))
TMCJPEGDEC_IdctBlock4x4 | R7 readonly column butterfly helper with rotation output first | objdiff 87.94118; 130/136 instructions; structural/exact (12, 132); first (3, ('stmw', 'r27, 0x10c(r1)'), ('stw', 'r31, 0x11c(r1)'))
TMCJPEGDEC_IdctBlock4x4 | R7 full natural unsigned transform with readonly inline input boundary | objdiff 87.463234; 130/136 instructions; structural/exact (11, 134); first (2, ('stmw', 'r27, 0x10c(r1)'), ('addi', 'r8, r3, 0x60'))
TMCJPEGDEC_IdctBlock4x4 | R7 full natural unsigned transform with mutable inline input boundary | objdiff 87.463234; 130/136 instructions; structural/exact (11, 134); first (2, ('stmw', 'r27, 0x10c(r1)'), ('addi', 'r8, r3, 0x60'))
TMCJPEGDEC_IdctBlock4x4 | R7 retain natural four-row unsigned pass:85.625->98.01471,136/136 identical instruction forms, first50instructions exact. Remaining42operands are cyclic r6-r11 allocation in column input/output/clamp temporaries; saved coefficients, pitch/index and arithmetic order now exact. Tested const input, scoped phase/math helpers, natural descending loop, source lifetime/assignment/decl permutations; helpers add fifth saved register and130vs136, rejected. Quick GATE PASS with signed4x4still100,0regressions forbidden/readability andcorrectDOL. Both target.extents exact, novolatile proof ordatachanges.
signcreate | R7 fresh fetch origin remains99.117645, our acceptedreadonlytable99.162895. Inspect constructor constant-hoist relocation order explicitly; next isolate metadata lookup and immutable localpointer forms.
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R7 immutable pane metadata pointer instead of readonly reference | objdiff 99.162895; 221/221 instructions; structural/exact (0, 32); first (48, ('lis', 'r26, 0'), ('lis', 'r25, 0'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R7 readonly pane metadata lookup inline boundary | objdiff 98.77828; 221/221 instructions; structural/exact (0, 44); first (48, ('lis', 'r26, 0'), ('lis', 'r25, 0'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R7 immutable allocated pane buffer inputs to constructors | objdiff 98.30317; 221/221 instructions; structural/exact (0, 54); first (48, ('lis', 'r26, 0'), ('lis', 'r25, 0'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R7 immutable readonly pane table base declaration | objdiff 99.162895; 221/221 instructions; structural/exact (0, 32); first (48, ('lis', 'r26, 0'), ('lis', 'r25, 0'))
R7 pre-final completeness audit | SOGetInterfaceOpt | 7 successfully compiled distinct source-attempt log entries; remaining function re-listed for full gate.
R7 pre-final completeness audit | PFENT_ITER_FindCluster | 6 successfully compiled distinct source-attempt log entries; remaining function re-listed for full gate.
R7 pre-final completeness audit | inputChar__Q39textinput8tistring9DecolatedFw | 3 successfully compiled distinct source-attempt log entries; remaining function re-listed for full gate.
R7 pre-final completeness audit | create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | 8 successfully compiled distinct source-attempt log entries; remaining function re-listed for full gate.
R7 pre-final completeness audit | TMCJPEGDEC_IdctBlock4x4 | 45 successfully compiled distinct source-attempt log entries; remaining function re-listed for full gate.
R7 data audit | all six owned target data objects paired at100 percent; SOOption/IDCT own no data, pf_volume210976, entry_iterator24, tiString288, tiSignWindow3468. No rename, extent, address or section-total changes required this round. Weak deduplicated extras untouched. Prior extent audit proves no overlapping open function sizes.
# R7 final clean full gate over all six owned units (non --quick)
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RevoEX/src/so/SOOption] pool: IDENTICAL
[libs/RevoEX/src/so/SOOption] objdiff: code 816/1292 data None/None functions 3/4 fuzzy 99.9226 linked code 0
[libs/RevoEX/src/so/SOOption] instruction-exact functions: 3/4
[libs/RevoEX/src/so/SOOption] section .text size 1292 match 99.9226
[libs/RevoEX/src/so/SOOption] below 100: SOGetInterfaceOpt 99.78992
[libs/RevoEX/src/so/SOOption] baseline: code 816/1292 data None functions 3 fuzzy 99.9226
[libs/RVL_SDK/src/fa/pf_volume] pool: IDENTICAL
[libs/RVL_SDK/src/fa/pf_volume] objdiff: code 17992/17992 data 210976/210976 functions 37/37 fuzzy 100.0000 linked code 0
[libs/RVL_SDK/src/fa/pf_volume] instruction-exact functions: 37/37
[libs/RVL_SDK/src/fa/pf_volume] section .bss size 210944 match 100.0
[libs/RVL_SDK/src/fa/pf_volume] section .data size 16 match 100.0
[libs/RVL_SDK/src/fa/pf_volume] section .sdata size 8 match 100.0
[libs/RVL_SDK/src/fa/pf_volume] section .sdata2 size 8 match 100.0
[libs/RVL_SDK/src/fa/pf_volume] section .text size 17992 match 100.0
[libs/RVL_SDK/src/fa/pf_volume] baseline: code 16988/17992 data 210976 functions 35 fuzzy 99.9333
[libs/RVL_SDK/src/fa/pf_entry_iterator] pool: IDENTICAL
[libs/RVL_SDK/src/fa/pf_entry_iterator] objdiff: code 6932/7880 data 24/24 functions 15/16 fuzzy 99.9772 linked code 0
[libs/RVL_SDK/src/fa/pf_entry_iterator] instruction-exact functions: 15/16
[libs/RVL_SDK/src/fa/pf_entry_iterator] section .sdata size 24 match 100.0
[libs/RVL_SDK/src/fa/pf_entry_iterator] section .text size 7880 match 99.97716
[libs/RVL_SDK/src/fa/pf_entry_iterator] below 100: PFENT_ITER_FindCluster 99.81013
[libs/RVL_SDK/src/fa/pf_entry_iterator] baseline: code 6932/7880 data 24 functions 15 fuzzy 99.9772
[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/tiSignWindow] pool: IDENTICAL
[src/keyboard/tiSignWindow] objdiff: code 6300/7184 data 3468/3468 functions 55/56 fuzzy 99.8970 linked code 0
[src/keyboard/tiSignWindow] instruction-exact functions: 55/56
[src/keyboard/tiSignWindow] section .ctors size 4 match 100.0
[src/keyboard/tiSignWindow] section .data size 2672 match 100.0
[src/keyboard/tiSignWindow] section .rodata size 784 match 100.0
[src/keyboard/tiSignWindow] section .sdata size 8 match 100.0
[src/keyboard/tiSignWindow] section .text size 7184 match 99.896996
[src/keyboard/tiSignWindow] below 100: create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator 99.162895
[src/keyboard/tiSignWindow] baseline: code 6300/7184 data 3468 functions 55 fuzzy 99.8914
[libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var] pool: IDENTICAL
[libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var] objdiff: code 1260/1804 data None/None functions 5/6 fuzzy 99.4013 linked code 0
[libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var] instruction-exact functions: 5/6
[libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var] section .text size 1804 match 99.40133
[libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var] below 100: TMCJPEGDEC_IdctBlock4x4 98.01471
[libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var] baseline: code 712/1804 data None functions 4 fuzzy 90.7738
regressions vs baseline: 0
global matched_code_percent: 89.19062 -> 89.24243
global fuzzy_match_percent: 99.52355 -> 99.52917
global complete_code_percent: 66.23504 -> 66.23504
global matched_data_percent: 99.36508 -> 99.36508
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
libs/RevoEX/src/so/SOOption | exact 3/4 -> 3/4 | code bytes 816 -> 816/1292 | data bytes 0 -> 0/0
R7 remaining | SOGetInterfaceOpt | 99.78992% | 119/119 identical instruction forms; five callee-saved selector/level register operands differ, first instruction5 mr r25,r4 vsr26. | 7 distinct successful source trials this round; no untried functions.
libs/RVL_SDK/src/fa/pf_volume | exact 35/37 -> 37/37 | code bytes 16988 -> 17992/17992 | data bytes 210976 -> 210976/210976
libs/RVL_SDK/src/fa/pf_entry_iterator | exact 15/16 -> 15/16 | code bytes 6932 -> 6932/7880 | data bytes 24 -> 24/24
R7 remaining | PFENT_ITER_FindCluster | 99.81013% | 237/237 identical forms; eight sector-mask and entries-per-sector register operands differ, first shared1 value r7 vsr8. Volatile iterator-index trial adds three reloads, rejected. | 6 distinct successful source trials this round; no untried functions.
src/keyboard/tiString | exact 41/42 -> 41/42 | code bytes 4632 -> 4632/5176 | data bytes 288 -> 288/288
R7 remaining | inputChar__Q39textinput8tistring9DecolatedFw | 90.132355% | 125/136; Hangul-mode append path optimized to constant index/count; target dynamic append, newline comparison and final count mask remain. No adjacent-stack reload or extent proof supports volatility or resizing. | 3 distinct successful source trials this round; no untried functions.
src/keyboard/tiSignWindow | exact 55/56 -> 55/56 | code bytes 6300 -> 6300/7184 | data bytes 3468 -> 3468/3468
R7 remaining | create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | 99.162895% | 221/221 identical forms;32 operands remain, including constructor/table relocation hoist order and loop/register allocation. First lis AnmPane r26 vsr25. | 8 distinct successful source trials this round; no untried functions.
libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var | exact 4/6 -> 5/6 | code bytes 712 -> 1260/1804 | data bytes 0 -> 0/0
R7 remaining | TMCJPEGDEC_IdctBlock4x4 | 98.01471% | 136/136 identical forms;42 operands, first column pointer r6 vsr11 at instruction53. First50 instructions exact; remaining unsigned column/clamp registers cycle r6-r11. | 45 distinct successful source trials this round; no untried functions.
R7 final files: libs/RVL_SDK/src/fa/pf_volume.c; src/keyboard/tiSignWindow.cpp; libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var.c; tools/decomp-assist/fz3.attempts.md. Source commits451eaff8,becfba47,5058e494,4cd94ca2,8a89a5ba. Three new exact functions,1552 newly matched code bytes; all data unchanged100%, all six poolsidentical, correctDOL,0globalregressions/forbidden/readability. No remaining proof uncertainty for accepted changes; original Hangul helper boundary and remaining compiler allocation are unresolved as logged. No source/header/config changes after clean full gate; final commit is log only.
R8 initial pool libs/RevoEX/src/so/SOOption | POOL IDENTICAL up to 0 (mine=0 base=0)
R8 initial pool libs/RVL_SDK/src/fa/pf_entry_iterator | POOL IDENTICAL up to 0 (mine=0 base=0)
R8 initial pool src/keyboard/tiString | POOL IDENTICAL up to 0 (mine=0 base=0)
R8 initial pool src/keyboard/tiSignWindow | POOL IDENTICAL up to 30 (mine=30 base=30)
R8 initial pool libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var | POOL IDENTICAL up to 0 (mine=0 base=0)
# Round8 XHIGH, fresh branch HEADa61a7cf1. Each trial logs first differing instruction and source construct, with original always restored until accepted by gate.
SOGetInterfaceOpt | R8 origin fetched; source equal origin except README;119/119,frame0x30. First5 mr r25,r4 vtarget26; only five level/option operands. rm/temp slots0xc/8, branchforms, calls,pointersetup andload/store scheduling identical. No symbol overlap (0x814B476c+0x1dc=SOSetInterfaceOpt0x814B4948), no adjacent-stack reload proof; const OptionLength/global qualifiers already ineffective last round. Test selector inline boundary and real response block types before declaration search.
SOGetInterfaceOpt | R8 selector pair initialized inside command inline helper | objdiff 99.78992; 119/119 instructions; structural/exact (0, 5); first (5, ('mr', 'r25, r4'), ('mr', 'r26, r4'))
SOGetInterfaceOpt | R8 selector helper receives operation before protocol level | objdiff 99.78992; 119/119 instructions; structural/exact (0, 5); first (5, ('mr', 'r25, r4'), ('mr', 'r26, r4'))
SOGetInterfaceOpt | R8 aligned length reply remains a typed interface response block | objdiff 99.78992; 119/119 instructions; structural/exact (0, 5); first (5, ('mr', 'r25, r4'), ('mr', 'r26, r4'))
SOGetInterfaceOpt | R8 allocated interface request pointer scoped immutable after allocation | BUILD FAIL OOption.c -o build/43U/src/libs/RevoEX/src/so && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RevoEX/src/so/SOOption.d build/43U/src/libs/RevoEX/src/so/SOOption.d ### mwcceppc.exe Compiler: # File: libs\RevoEX\src\so\SOOption.c # -------------------------------------- # 110: InterfaceOption* const request=SOiAlloc(12,size); # Error: ^^^^^^^^^^^^^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
SOGetInterfaceOpt | R8 immutable interface allocation pointer in its own successful scope | objdiff 98.61345; 119/119 instructions; structural/exact (0, 33); first (5, ('mr', 'r25, r4'), ('mr', 'r26, r4'))
SOGetInterfaceOpt | R8 readonly interface reply byte view for memcpy input | objdiff 99.78992; 119/119 instructions; structural/exact (0, 5); first (5, ('mr', 'r25, r4'), ('mr', 'r26, r4'))
SOGetInterfaceOpt | R8 five distinct compiled structural/type/helper trials; selectors/read-only byte view preserve5operanddiffs, scopedconstallocation worsens33. Leadingdeclsearch65builds no improvement. Baseline restored119/119,99.78992, no data.
PFENT_ITER_FindCluster | R8 fetch source equalorigin,237/237frame0xa0; first39li1r7 vsr8,8registeronlydiffs constant/entry-count swap. Noextentoverlap0x815d3414+0x3b4=Retreat0x815d37c8. Targetadjacentstore/reloaditer.index0x20 alreadypreserved baseline, last roundfieldvolatileadded3loads, rejected. Loop/helper/call/scheduling otherwiseidentical; test entrycount derived from real initialized firstclusterfield.
PFENT_ITER_FindCluster | R8 entry count derives from initialized iterator first cluster | objdiff 99.81013; 237/237 instructions; structural/exact (0, 8); first (39, ('li', 'r7, 1'), ('li', 'r8, 1'))
PFENT_ITER_FindCluster | R8 entry count computes byte geometry using preceding power of two | objdiff 97.95358; 239/237 instructions; structural/exact (5, 206); first (18, ('b', '852'), ('b', '844'))
PFENT_ITER_FindCluster | R8 readonly initialized iterator supplies first sector entry count | objdiff 99.81013; 237/237 instructions; structural/exact (0, 8); first (39, ('li', 'r7, 1'), ('li', 'r8, 1'))
PFENT_ITER_FindCluster | R8 FAT hint first-cluster sentinel initialized in inline boundary | objdiff 99.81013; 237/237 instructions; structural/exact (0, 8); first (39, ('li', 'r7, 1'), ('li', 'r8, 1'))
PFENT_ITER_FindCluster | R8 four compiled source attempts, initialized-field and hint-inline boundaries preserve8diffs; alternate geometryshift adds2instructions and rejected. Leadingdeclsearch36builds leaves8, baseline restored99.81013. Data24bytes remains100; no header/data edits.
inputChar__Q39textinput8tistring9DecolatedFw | R8 fresh fetch sourceequalorigin,125/136frame0x30. Firstrealconstruct65Hangulmode lacksinlinedstream index/count lifetime, initialNUL andunusednewlinecompare;targetcharregister4, counter6 starts0 andcount29mask. Noadjacentstackreloadproof orsizeoverlap0x81432ce4+0x220=confirmKana0x81432f04. Test shared translatorcounter/output-reference boundaries; no empty newline stubs orunsupportedvolatile.
inputChar__Q39textinput8tistring9DecolatedFw | R8 shared translation count initialized before mode dispatch and appended in Hangul | objdiff 90.132355; 125/136 instructions; structural/exact (18, 73); first (10, ('beq', '428'), ('beq', '472'))
inputChar__Q39textinput8tistring9DecolatedFw | R8 wide translation count shared across mode dispatch | objdiff 90.132355; 125/136 instructions; structural/exact (18, 73); first (10, ('beq', '428'), ('beq', '472'))
inputChar__Q39textinput8tistring9DecolatedFw | R8 bounded input array reference and readonly character reference | objdiff 90.132355; 125/136 instructions; structural/exact (18, 73); first (10, ('beq', '428'), ('beq', '472'))
inputChar__Q39textinput8tistring9DecolatedFw | R8 append character through advancing pointer and derive UTF16 count | objdiff 89.92647; 130/136 instructions; structural/exact (18, 87); first (10, ('beq', '448'), ('beq', '472'))
inputChar__Q39textinput8tistring9DecolatedFw | R8 converter handles newline literal then ordinary character append | objdiff 93.22794; 138/136 instructions; structural/exact (17, 75); first (10, ('beq', '480'), ('beq', '472'))
inputChar__Q39textinput8tistring9DecolatedFw | R8 converter newline append through bounded buffer and const character | objdiff 93.22794; 138/136 instructions; structural/exact (17, 75); first (10, ('beq', '480'), ('beq', '472'))
inputChar__Q39textinput8tistring9DecolatedFw | R8 direct newline normalization expresses target retained comparison | objdiff 89.91912; 130/136 instructions; structural/exact (16, 73); first (10, ('beq', '448'), ('beq', '472'))
inputChar__Q39textinput8tistring9DecolatedFw | R8 generic conversion append resets buffer length on newline | objdiff 91.06618; 135/136 instructions; structural/exact (17, 62); first (10, ('beq', '468'), ('beq', '472'))
inputChar__Q39textinput8tistring9DecolatedFw | R8 conversion append carries mutable stream length through newline reset | objdiff 93.60294; 135/136 instructions; structural/exact (15, 61); first (10, ('beq', '468'), ('beq', '472'))
inputChar__Q39textinput8tistring9DecolatedFw | R8 conversion newline clears previous text and resets stream length | objdiff 91.72794; 136/136 instructions; structural/exact (15, 60); first (63, ('b', '88'), ('b', '80'))
inputChar__Q39textinput8tistring9DecolatedFw | R8 conversion buffer owns newline reset append and readonly length | objdiff 92.52941; 135/136 instructions; structural/exact (16, 61); first (10, ('beq', '468'), ('beq', '472'))
inputChar__Q39textinput8tistring9DecolatedFw | R8 conversion buffer keeps UTF16 sized length field | objdiff 91.64706; 135/136 instructions; structural/exact (17, 62); first (10, ('beq', '468'), ('beq', '472'))
inputChar__Q39textinput8tistring9DecolatedFw | R8 conversion buffer newline clear is a real reusable stream method | objdiff 93.05147; 136/136 instructions; structural/exact (17, 60); first (63, ('b', '88'), ('b', '80'))
inputChar__Q39textinput8tistring9DecolatedFw | R8 thirteen distinct compiled trials, including natural pointer/count references and functional newline append/reset stream boundaries. Best93.60294/135vs136 stilladds live newline branch absenttarget and lacks targetpointer/zero ordering. No candidate retained: original converter semantics/boundary unresolved; no unused newline arg, empty stub, arbitrary volatile orsymbolresize introduced. Baseline125/136,90.132355 restored.
signcreate | R8 originfetched equalcurrent99.162895,221/frame0x50. First48AnmPanevtablelisr26vs25; relocationorder targetAnmPane,Button,Scroll,table,All versusoursAnmPane,table,Button,Scroll,All. Remaining32operands includeanimationCount22vs31 andanimatedentry25vs22. Metadata,constructorallocation/calls andbranchforms exact; noextentoverlap oradjacentstackvolatileproof. Test real iterator/animation entry lifetimes before register permutations.
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R8 immutable animation bound and force name scoped to pane setup | objdiff 98.12217; 221/221 instructions; structural/exact (0, 60); first (48, ('lis', 'r26, 0'), ('lis', 'r25, 0'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R8 animation traversal explicit wide induction and UTF16 index view | objdiff 99.162895; 221/221 instructions; structural/exact (0, 32); first (48, ('lis', 'r26, 0'), ('lis', 'r25, 0'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R8 pane metadata index uses proven bounded unsigned loop counter | objdiff 95.701355; 220/221 instructions; structural/exact (5, 184); first (5, ('li', 'r19, 0'), ('li', 'r14, 0'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R8 readonly animation entry reference lives across resource creation | objdiff 99.61539; 221/221 instructions; structural/exact (0, 13); first (49, ('lis', 'r24, 0'), ('lis', 'r27, 0'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R8 animation bound and index declared together in natural for loop | objdiff 98.19005; 221/221 instructions; structural/exact (0, 58); first (48, ('lis', 'r26, 0'), ('lis', 'r25, 0'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R8 readonly animation reference with direct pane table lookup | objdiff 99.72851; 221/221 instructions; structural/exact (0, 10); first (51, ('lis', 'r30, 0'), ('lis', 'r24, 0'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R8 readonly animation reference with count declared after pane creation | objdiff 98.64253; 221/221 instructions; structural/exact (0, 53); first (49, ('lis', 'r24, 0'), ('lis', 'r27, 0'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R8 readonly animation slot pointer declared before pane loop and late bound | objdiff 98.64253; 221/221 instructions; structural/exact (0, 53); first (49, ('lis', 'r24, 0'), ('lis', 'r27, 0'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R8 direct pane lookup with early declared readonly animation slot pointer | objdiff 99.72851; 221/221 instructions; structural/exact (0, 10); first (51, ('lis', 'r30, 0'), ('lis', 'r24, 0'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R8 readonly pane name array view across constructor branches | objdiff 96.8914; 222/221 instructions; structural/exact (5, 160); first (51, ('lis', 'r30, 0'), ('lis', 'r24, 0'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R8 readonly pane table view local to each logical pane iteration | objdiff 99.72851; 221/221 instructions; structural/exact (0, 10); first (51, ('lis', 'r30, 0'), ('lis', 'r24, 0'))
signcreate | R8 retain readonly animation-slot reference instead of repeated table indexing, anddirect pane table lookup. Constreference is to pointer object, so actual animation pointer reloads across calls are preserved.99.162895->99.72851,221/221 instructionforms0,32->10 operands. Remaining4All/table constant-load relocation order and6animation-count22/entry31 swap. Leading3declsearch6builds nofurthergain. QuickGATE PASS55/56,data3468/3468,poolidentical,0globalregressions/forbidden/readability andtargetDOL.
TMCJPEGDEC_IdctBlock4x4 | R8 fresh fetch originequalscurrent98.01471,136/136frame0x120. First53columnpointerr6vs11 with42cyclicr6-r11operands, all instructionforms andfirst50exact. Firstpass provenautomaticunroll4rows. Newhypothesis secondpass pointerr11 is compiler-generated strength reduction from indexed tmp[idx], so its virtual lifetime begins after output/clamp locals instead of explicit column pointerdecl. Noextentoverlap0x814ef490+0x220=2x2start814ef6b0; noimmediate stackreloadproof,data0.
TMCJPEGDEC_IdctBlock4x4 | R8 indexed temporary buffer lets compiler reduce column input pointer | objdiff 100.0; 136/136 instructions; structural/exact (0, 0); first None
EXACT CANDIDATE /tmp/fz3-r8-candidates/TMCJPEGDEC_IdctBlock4x4_indexed_temporary_buffer_lets_compiler_reduce_column_input_pointer.txt
TMCJPEGDEC_IdctBlock4x4 | R8 natural descending signed column index and buffer offsets | objdiff 100.0; 136/136 instructions; structural/exact (0, 0); first None
EXACT CANDIDATE /tmp/fz3-r8-candidates/TMCJPEGDEC_IdctBlock4x4_natural_descending_signed_column_index_and_buffer_offsets.txt
TMCJPEGDEC_IdctBlock4x4 | R8 ascending iteration derives descending temporary and output index | objdiff 90.117645; 138/136 instructions; structural/exact (14, 107); first (10, ('lwz', 'r29, 0xc(r8)'), ('lwz', 'r28, 0xc(r8)'))
TMCJPEGDEC_IdctBlock4x4 | R8 EXACT on firstindexed-column attempt:98.01471->100.0,136/136diffs0; replace explicit columnpointer withtmp[idx],tmp[idx+8/16/24]. Compiler generates pointerlater atvirtualregisterorderneeded forr11, resolving all42operanddiffs. Naturaldescendingi variant also100, ascending3-i changes138 and rejected. QuickGATE PASSunit6/6code1804/1804vs5/6code1260/1804,data0,poolidentical,0globalregressions forbidden readability,correctDOL. This is automatic strength reduction, no volatile, helper, symbol orconfigchange.
signcreate | R8 freshfetch remote stillwithoutnewanimationreference; target221first51All/tableloadorder, six animation bound/slot operands remain; try index declaration before bound and natural readonly animation array view, following proven IDCT auto-generated address allocation.
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R8 animation counter declared before immutable loop bound | objdiff 98.64253; 221/221 instructions; structural/exact (0, 54); first (51, ('lis', 'r30, 0'), ('lis', 'r24, 0'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R8 pane animation force metadata and bound scoped after index declaration | objdiff 98.57466; 221/221 instructions; structural/exact (0, 56); first (51, ('lis', 'r30, 0'), ('lis', 'r24, 0'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R8 readonly animation array input view uses compiler generated element address | objdiff 96.49321; 221/221 instructions; structural/exact (10, 62); first (51, ('lis', 'r30, 0'), ('lis', 'r24, 0'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R8 direct pane field indexing lets compiler form shared row address | objdiff 94.81901; 224/221 instructions; structural/exact (15, 174); first (48, ('lis', 'r24, 0'), ('lis', 'r25, 0'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R8 direct pane fields and immutable late animation count | objdiff 94.253395; 224/221 instructions; structural/exact (15, 172); first (48, ('lis', 'r24, 0'), ('lis', 'r25, 0'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R8 readonly pane row lookup owns masked index alias boundary | objdiff 99.38914; 221/221 instructions; structural/exact (0, 21); first (51, ('lis', 'r30, 0'), ('lis', 'r24, 0'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R8 readonly animation slot reference begins after resource name lookup | objdiff 96.42534; 222/221 instructions; structural/exact (4, 135); first (7, ('mr', 'r23, r3'), ('mr', 'r15, r3'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R8 readonly animation slot reference begins after transform creation | objdiff 98.61991; 222/221 instructions; structural/exact (4, 69); first (48, ('lis', 'r26, 0'), ('lis', 'r25, 0'))
create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | R8 resource and transform declarations precede readonly animation slot view | objdiff 99.72851; 221/221 instructions; structural/exact (0, 10); first (51, ('lis', 'r30, 0'), ('lis', 'r24, 0'))
signcreate | R8 extra natural-index, animation array alias, declaration/lifetime and direct-field tests have no further gain beyondaccepted99.72851. Direct-field rewrite adds3instructions, late-bound reference adds1 orextra saved-register uses; readonly row helper worsens21operands. All rejected variants restored. Remaining exact-shape10operand diffs are4All/table relocation-load ordering and6bound/animation-slot22/31 register swap; no unsupporteddata fixes.
R8 pre-final remaining-attempt audit | SOGetInterfaceOpt | 5 distinct compiled scored attempts this round; no untried functions.
R8 pre-final remaining-attempt audit | PFENT_ITER_FindCluster | 4 distinct compiled scored attempts this round; no untried functions.
R8 pre-final remaining-attempt audit | inputChar__Q39textinput8tistring9DecolatedFw | 13 distinct compiled scored attempts this round; no untried functions.
R8 pre-final remaining-attempt audit | create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | 20 distinct compiled scored attempts this round; no untried functions.
R8 data ownership audit | owned .data/.rodata/.sdata/.ctors target symbols all100: entry_iterator24 bytes,tiString288,tiSignWindow3468;SOOption/IDCT noowned data. All5poolsidentical frominitial pool_diff; no symbolrename,extent,address,section-total orsharedheaderchange. Relocation gaps fromremainingfunctions remain codework. Clean full all-unit gate follows.
# R8 final clean full gate over all five owned units (non --quick)
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RevoEX/src/so/SOOption] pool: IDENTICAL
[libs/RevoEX/src/so/SOOption] objdiff: code 816/1292 data None/None functions 3/4 fuzzy 99.9226 linked code 0
[libs/RevoEX/src/so/SOOption] instruction-exact functions: 3/4
[libs/RevoEX/src/so/SOOption] section .text size 1292 match 99.9226
[libs/RevoEX/src/so/SOOption] below 100: SOGetInterfaceOpt 99.78992
[libs/RevoEX/src/so/SOOption] baseline: code 816/1292 data None functions 3 fuzzy 99.9226
[libs/RVL_SDK/src/fa/pf_entry_iterator] pool: IDENTICAL
[libs/RVL_SDK/src/fa/pf_entry_iterator] objdiff: code 6932/7880 data 24/24 functions 15/16 fuzzy 99.9772 linked code 0
[libs/RVL_SDK/src/fa/pf_entry_iterator] instruction-exact functions: 15/16
[libs/RVL_SDK/src/fa/pf_entry_iterator] section .sdata size 24 match 100.0
[libs/RVL_SDK/src/fa/pf_entry_iterator] section .text size 7880 match 99.97716
[libs/RVL_SDK/src/fa/pf_entry_iterator] below 100: PFENT_ITER_FindCluster 99.81013
[libs/RVL_SDK/src/fa/pf_entry_iterator] baseline: code 6932/7880 data 24 functions 15 fuzzy 99.9772
[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/tiSignWindow] pool: IDENTICAL
[src/keyboard/tiSignWindow] objdiff: code 6300/7184 data 3468/3468 functions 55/56 fuzzy 99.9666 linked code 0
[src/keyboard/tiSignWindow] instruction-exact functions: 55/56
[src/keyboard/tiSignWindow] section .ctors size 4 match 100.0
[src/keyboard/tiSignWindow] section .data size 2672 match 100.0
[src/keyboard/tiSignWindow] section .rodata size 784 match 100.0
[src/keyboard/tiSignWindow] section .sdata size 8 match 100.0
[src/keyboard/tiSignWindow] section .text size 7184 match 99.96659
[src/keyboard/tiSignWindow] below 100: create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator 99.72851
[src/keyboard/tiSignWindow] baseline: code 6300/7184 data 3468 functions 55 fuzzy 99.8970
[libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var] pool: IDENTICAL
[libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var] objdiff: code 1804/1804 data None/None functions 6/6 fuzzy 100.0000 linked code 0
[libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var] instruction-exact functions: 6/6
[libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var] section .text size 1804 match 100.0
[libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var] baseline: code 1260/1804 data None functions 5 fuzzy 99.4013
regressions vs baseline: 0
global matched_code_percent: 89.86156 -> 89.87973
global fuzzy_match_percent: 99.53919 -> 99.53971
global complete_code_percent: 67.39544 -> 67.39544
global matched_data_percent: 99.36508 -> 99.36508
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
libs/RevoEX/src/so/SOOption | exact 3/4 -> 3/4 | code bytes 816 -> 816/1292 | data bytes 0 -> 0/0
R8 remaining | SOGetInterfaceOpt | 99.78992% | 119/119, frame0x30, five register operands remain: level25vs26 andoption28vs25; first5mr r25,r4 vsr26. rm/temp slots, branches, helper/load order exact. | 5 distinct compiled source attempts this round.
libs/RVL_SDK/src/fa/pf_entry_iterator | exact 15/16 -> 15/16 | code bytes 6932 -> 6932/7880 | data bytes 24 -> 24/24
R8 remaining | PFENT_ITER_FindCluster | 99.81013% | 237/237, frame0xa0, eight sharedconstant1 andentries-per-sector register operands remain; first39li r7,1 vsr8. Definitionvolatile wouldadd3loads andwasrejected, no extentoverlap. | 4 distinct compiled source attempts this round.
src/keyboard/tiString | exact 41/42 -> 41/42 | code bytes 4632 -> 4632/5176 | data bytes 288 -> 288/288
R8 remaining | inputChar__Q39textinput8tistring9DecolatedFw | 90.132355% | 125/136, frame0x30, missing original Hangul converter/index/count boundary andretainedunusednewlinecmp; allnewfunctionalbuilder candidates introduce extra livebranch ortemporaloperation ordering, rejected. | 13 distinct compiled source attempts this round.
src/keyboard/tiSignWindow | exact 55/56 -> 55/56 | code bytes 6300 -> 6300/7184 | data bytes 3468 -> 3468/3468
R8 remaining | create__Q49textinput8keyboard10signwindow12LayoutByNW4RFP12MEMAllocator | 99.72851% | 221/221, frame0x50,10operand differences: All-vtable/table address-load relocation order4 andanimation-count22vs31/slot31vs22 registerswap6. First51LISAll30vstable24; allotherconstructors, pointerread/call/order exact. | 20 distinct compiled source attempts this round.
libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var | exact 5/6 -> 6/6 | code bytes 1260 -> 1804/1804 | data bytes 0 -> 0/0
R8 final files: src/keyboard/tiSignWindow.cpp; libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var.c; tools/decomp-assist/fz3.attempts.md. Source commits8fbf59f0,1988244e. One new exact function and544matchedcodebytes, IDCTunit6/6code1804/1804data0. Signcreate99.162895->99.72851genuinefuzzyimprovement, exactcountunchanged. 45distinctcompiledsource trials and107declaration evaluations followingstructuraldiagnostics. Allfivepoolsidentical,data100, correctDOL,0globalregressions/forbidden/readability. No sourcechangesafterfullclean gate; finalcommit logonly. Uncertain: original Hangul helper/newline-processing structure andremaining SO/iterator/register constant-hoist choices; allacceptedbytes/state provedbygate. No untried openfunctions, no symbol/data/header/config changes, no Matching status switches orlinking claims.

View File

@@ -1345,228 +1345,3 @@ readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
Before -> after instruction-exact/code bytes/data bytes: MsgRead11/2480/128 ->11/2480/128; MsgSubject7/2776/232 ->8/3352/232; DateParser5/1168/40 ->5/1168/40. ReadMsgTextInternal94.55056 ->97.44382, retained as fuzzy improvement; NWC24iSetMsgSubjectQP99.548615 ->100.0000, retained as exact144/144,diffs0.
Changed source files: libs/RevoEX/src/nwc24/NWC24MsgRead.c and libs/RevoEX/src/nwc24/NWC24MsgSubject.c. Source commits e1602004 and592e7c2b. Attempts log tools/decomp-assist/fz7.attempts.md. Shared header, DateParser, configuration, all other sources remain unchanged.
## Round e: proven source levers
Fresh origin baseline: Read 11/16, Subject 8/12, Date 5/8. All owned data sections already 100%; no symbol rename or extent correction warranted.
### NWC24ReadMsgField
Fetched origin and confirmed owned source equals baseline origin unit, where this exact-name function was below 100.
Structural diagnosis: target has one additional type-word reload between permission/capability branch and SelectMBox, same frame; text/attached also retain register scheduling differences. Test switch boundary before register allocation.
- NWC24ReadMsgField: permission mask single-case switch boundary: ((3, 84), 101, 102) -> ((4, 6), 102, 102); restored
- NWC24ReadMsgField: mutable local private view for inline alias analysis: ((3, 84), 101, 102) -> ((0, 0), 102, 102); kept
- NWC24ReadMsgField: permission comparison uses named unsigned flags: ((0, 0), 102, 102) -> compile failure; restored
### NWC24ReadMsgFromAddr
Fetched origin and confirmed owned source equals baseline origin unit, where this exact-name function was below 100.
Structural diagnosis: target has one additional type-word reload between permission/capability branch and SelectMBox, same frame; text/attached also retain register scheduling differences. Test switch boundary before register allocation.
- NWC24ReadMsgFromAddr: permission mask single-case switch boundary: ((4, 66), 91, 92) -> ((5, 14), 92, 92); restored
- NWC24ReadMsgFromAddr: mutable local private view for inline alias analysis: ((4, 66), 91, 92) -> ((0, 0), 92, 92); kept
- NWC24ReadMsgFromAddr: permission comparison uses named unsigned flags: ((0, 0), 92, 92) -> compile failure; restored
### NWC24ReadMsgSubject
Fetched origin and confirmed owned source equals baseline origin unit, where this exact-name function was below 100.
Structural diagnosis: target has one additional type-word reload between permission/capability branch and SelectMBox, same frame; text/attached also retain register scheduling differences. Test switch boundary before register allocation.
- NWC24ReadMsgSubject: permission mask single-case switch boundary: ((3, 65), 81, 82) -> ((4, 6), 82, 82); restored
- NWC24ReadMsgSubject: mutable local private view for inline alias analysis: ((3, 65), 81, 82) -> ((0, 0), 82, 82); kept
- NWC24ReadMsgSubject: permission comparison uses named unsigned flags: ((0, 0), 82, 82) -> compile failure; restored
### ReadMsgTextInternal
Fetched origin and confirmed owned source equals baseline origin unit, where this exact-name function was below 100.
Structural diagnosis: target has one additional type-word reload between permission/capability branch and SelectMBox, same frame; text/attached also retain register scheduling differences. Test switch boundary before register allocation.
- ReadMsgTextInternal: permission mask single-case switch boundary: ((7, 157), 177, 178) -> ((8, 25), 178, 178); restored
- ReadMsgTextInternal: mutable local private view for inline alias analysis: ((7, 157), 177, 178) -> ((0, 15), 178, 178); kept
- ReadMsgTextInternal: permission comparison uses named unsigned flags: ((0, 15), 178, 178) -> compile failure; restored
### NWC24ReadMsgAttached
Fetched origin and confirmed owned source equals baseline origin unit, where this exact-name function was below 100.
Structural diagnosis: target has one additional type-word reload between permission/capability branch and SelectMBox, same frame; text/attached also retain register scheduling differences. Test switch boundary before register allocation.
- NWC24ReadMsgAttached: permission mask single-case switch boundary: ((6, 75), 90, 91) -> ((7, 34), 91, 91); restored
- NWC24ReadMsgAttached: mutable local private view for inline alias analysis: ((6, 75), 90, 91) -> ((2, 18), 91, 91); kept
- NWC24ReadMsgAttached: permission comparison uses named unsigned flags: ((2, 18), 91, 91) -> compile failure; restored
Round e pool audit: all three pools IDENTICAL before trials; original/source data sections already 128/128, 232/232, 40/40. No data rename or extent adjustment.
NWC24ReadMsgField extent audit: 0x814A861C+0x198 <= next NWC24ReadMsgFaceData at 0x814A87B4: True.
NWC24ReadMsgField: immediate stack store/reload audit: none; no volatile declaration justified.
NWC24ReadMsgFromAddr extent audit: 0x814A8DD4+0x170 <= next NWC24ReadMsgSubject at 0x814A8F44: True.
NWC24ReadMsgFromAddr: immediate stack store/reload audit: none; no volatile declaration justified.
NWC24ReadMsgSubject extent audit: 0x814A8F44+0x148 <= next NWC24ReadMsgText at 0x814A908C: True.
NWC24ReadMsgSubject: immediate stack store/reload audit: none; no volatile declaration justified.
ReadMsgTextInternal extent audit: 0x814A91A0+0x2C8 <= next NWC24ReadMsgAttached at 0x814A9468: True.
ReadMsgTextInternal: immediate stack store/reload audit: none; no volatile declaration justified.
NWC24ReadMsgAttached extent audit: 0x814A9468+0x16C <= next ReadBase64Data at 0x814A95D4: True.
NWC24ReadMsgAttached: immediate stack store/reload audit: none; no volatile declaration justified.
NWC24ReadMsgSubjectPublic extent audit: 0x814A9850+0x1A0 <= next NWC24ReadMsgTextPublic at 0x814A99F0: True.
NWC24ReadMsgSubjectPublic: immediate stack store/reload audit: none; no volatile declaration justified.
NWC24ReadMsgTextPublic extent audit: 0x814A99F0+0x118 <= next NWC24SetMsgSubjectPublic at 0x814A9B08: True.
NWC24ReadMsgTextPublic: immediate stack store/reload audit: none; no volatile declaration justified.
NWC24SetMsgSubjectAndTextPublic extent audit: 0x814A9CD0+0x2F8 <= next NWC24iGetDefaultCharset at 0x814A9FC8: True.
NWC24SetMsgSubjectAndTextPublic: immediate stack store/reload audit: none; no volatile declaration justified.
NWC24iSetMsgSubjectBase64 extent audit: 0x814AAB18+0x220 <= next NWC24SuspendScheduler at 0x814AAD38: True.
NWC24iSetMsgSubjectBase64: immediate stack store/reload audit: none; no volatile declaration justified.
NWC24iDateToOSCalendarTime extent audit: 0x814AC1C4+0x154 <= next NWC24iIsValidDate at 0x814AC318: True.
NWC24iDateToOSCalendarTime: immediate stack store/reload audit: none; no volatile declaration justified.
ConvertDateToDays extent audit: 0x814AC348+0x1C4 <= next ConvertDaysToDate at 0x814AC50C: True.
ConvertDateToDays: immediate stack store/reload audit: none; no volatile declaration justified.
ConvertDaysToDate extent audit: 0x814AC50C+0x19C <= next NWC24ReadFriendInfo at 0x814AC6A8: True.
ConvertDaysToDate: immediate stack store/reload audit: none; no volatile declaration justified.
- ReadMsgTextInternal: register-only declaration search on actual leading locals after structural trials, ((0, 15), 178, 178) -> ((0, 0), 178, 178); (0, 0) after 6 builds; kept in source:.
### NWC24ReadMsgSubjectPublic
Fetched origin and confirmed owned source equals baseline origin unit, where this exact-name function was below 100.
Structural diagnosis: same frame; each overflow acceptance block lacks two target branches. No immediate stack store/reload proof; volatile rejected without experiment. Test bool switch and helper boundaries.
- NWC24ReadMsgSubjectPublic: boolean success switch with overflow arm break: ((11, 64), 100, 104) -> ((14, 46), 104, 104); restored
- NWC24ReadMsgSubjectPublic: mutable input alias passed into read calls: ((11, 64), 100, 104) -> ((11, 78), 100, 104); restored
- NWC24ReadMsgSubjectPublic: overflow arm routed through shared continuation label: ((11, 64), 100, 104) -> ((11, 64), 100, 104); restored
### NWC24ReadMsgTextPublic
Fetched origin and confirmed owned source equals baseline origin unit, where this exact-name function was below 100.
Structural diagnosis: same frame; each overflow acceptance block lacks two target branches. No immediate stack store/reload proof; volatile rejected without experiment. Test bool switch and helper boundaries.
- NWC24ReadMsgTextPublic: boolean success switch with overflow arm break: ((7, 28), 68, 70) -> ((7, 7), 70, 70); kept
- NWC24ReadMsgTextPublic: mutable input alias passed into read calls: ((7, 7), 70, 70) -> ((7, 25), 70, 70); restored
### NWC24ReadMsgAttached
Fetched origin and confirmed owned source equals baseline origin unit, where this exact-name function was below 100.
- NWC24ReadMsgAttached: decode validation conditional replaces one-case switch: ((2, 18), 91, 91) -> ((8, 34), 90, 91); restored
- NWC24ReadMsgAttached: block-local decode result before error propagation: ((2, 18), 91, 91) -> ((5, 29), 91, 91); restored
- NWC24ReadMsgAttached: register-only declaration search on actual leading locals after structural trials, ((2, 18), 91, 91) -> ((2, 18), 91, 91); order was:.
- NWC24ReadMsgTextPublic: explicit accepted read label after overflow branch: ((7, 28), 68, 70) -> ((7, 28), 68, 70); restored
### NWC24SetMsgSubjectAndTextPublic
Fetched origin and confirmed owned source equals baseline origin unit, where this exact-name function was below 100.
Structural diagnosis: 190/190 same frame and branches, saved parameter/work context register group shifted. Try const read view and separate semantic charset/text encoding lifetimes before declaration search.
- NWC24SetMsgSubjectAndTextPublic: const work-context view while buffers stay mutable: ((0, 65), 190, 190) -> ((0, 65), 190, 190); restored
- NWC24SetMsgSubjectAndTextPublic: const private message view for protection fields: ((0, 65), 190, 190) -> ((0, 65), 190, 190); restored
- NWC24SetMsgSubjectAndTextPublic: separate text encoding from result error lifetime: ((0, 65), 190, 190) -> ((0, 65), 190, 190); restored
### NWC24iDateToOSCalendarTime
Fetched origin and confirmed owned source equals baseline origin unit, where this exact-name function was below 100.
Structural diagnosis: 85/85 frame0x10, all branches/calls identical; year and zero/leap values exchange r0/r5. Const input alias and distinct first/later year lifetimes tested before declaration order.
- NWC24iDateToOSCalendarTime: mutable date input view changes alias assumptions: ((0, 13), 85, 85) -> ((0, 13), 85, 85); restored
- NWC24iDateToOSCalendarTime: distinct zero milliseconds local from leap flag: ((0, 13), 85, 85) -> ((0, 13), 85, 85); restored
- NWC24iDateToOSCalendarTime: calendar stored year drives leap test: ((0, 13), 85, 85) -> ((0, 13), 85, 85); restored
### ConvertDateToDays
Fetched origin and confirmed owned source equals baseline origin unit, where this exact-name function was below 100.
Structural diagnosis: 113/113 leaf; last arithmetic region schedules divisors and accumulated days differently. Separate quotient temporaries then search new interference graph.
- ConvertDateToDays: previous year signed temporary reused by both divisions: ((4, 16), 113, 113) -> ((6, 17), 113, 113); restored
- ConvertDateToDays: separate accumulated whole year days before final addition: ((4, 16), 113, 113) -> ((4, 16), 113, 113); restored
- ConvertDateToDays: register-only declaration search on actual leading locals after structural trials, ((4, 16), 113, 113) -> ((4, 16), 113, 113); order was:.
- ConvertDateToDays: split quarter/century quotient semantic locals followed by declaration graph search: ((4, 16), 113, 113) -> ((4, 16), 113, 113); restored
### ConvertDaysToDate
Fetched origin and confirmed owned source equals baseline origin unit, where this exact-name function was below 100.
Structural diagnosis: 103/103 frame0x10; year loop exact, month leap test uses different r0/r8/r11/r12. Const read-only year view and month length temporaries tested.
- ConvertDaysToDate: const year view for month leap helper: ((0, 26), 103, 103) -> compile failure; restored
- ConvertDaysToDate: month length temporary unifies subtraction: ((0, 26), 103, 103) -> ((6, 42), 102, 103); restored
- ConvertDaysToDate: separate promoted year value in month leap test: ((0, 26), 103, 103) -> ((5, 35), 103, 103); restored
- NWC24ReadMsgAttached: const read view only for post-decode attachment size: ((2, 18), 91, 91) -> ((0, 0), 91, 91); kept
- NWC24ReadMsgAttached: const read view for both attachment size checks: ((0, 0), 91, 91) -> ((8, 28), 90, 91); restored
- NWC24ReadMsgAttached: separate attachment index for post-call decoded size: ((0, 0), 91, 91) -> ((0, 0), 91, 91); restored
### NWC24iSetMsgSubjectBase64
Fetched origin and confirmed owned source equals baseline origin unit, where this exact-name function was below 100.
Structural diagnosis: frame0x60 and136/136 instructions identical; only5 parameter-copy order differences at prologue. Separate work first-half alias and mutable subject read view before searching declarations.
- NWC24iSetMsgSubjectBase64: first buffer alias initialized before output locals: ((0, 5), 136, 136) -> ((0, 5), 136, 136); restored
- NWC24iSetMsgSubjectBase64: mutable subject local view at converter inline boundary: ((0, 5), 136, 136) -> ((0, 50), 136, 136); restored
- NWC24iSetMsgSubjectBase64: register-only declaration search on actual leading locals after structural trials, ((0, 5), 136, 136) -> ((0, 5), 136, 136); order was:.
- NWC24iSetMsgSubjectBase64: first-half work-buffer alias with separate assignment and declaration graph search: ((0, 5), 136, 136) -> ((0, 5), 136, 136); restored
- NWC24iDateToOSCalendarTime: leap calculation within existing inline helper boundary: ((0, 13), 85, 85) -> ((5, 76), 86, 85); restored
- ConvertDaysToDate: const year view declared before month statements: ((0, 26), 103, 103) -> ((0, 26), 103, 103); restored
- ConvertDaysToDate: leap helper promotes year into named signed value: ((0, 26), 103, 103) -> ((0, 28), 103, 103); restored
- ConvertDaysToDate: leap helper separates declaration from zero assignment: ((0, 26), 103, 103) -> ((0, 26), 103, 103); restored
- ConvertDaysToDate: leap helper boolean conditional expression: ((0, 26), 103, 103) -> ((0, 28), 103, 103); restored
### NWC24ReadMsgSubjectPublic
Fetched origin and confirmed owned source equals baseline origin unit, where this exact-name function was below 100.
- NWC24ReadMsgSubjectPublic: direct enum overflow switch arm order ok,overflow,default: ((11, 64), 100, 104) -> ((10, 10), 104, 104); kept
- NWC24iDateToOSCalendarTime: leap zero initialized at arithmetic block instead of field copies: ((0, 13), 85, 85) -> ((5, 76), 86, 85); restored
- NWC24iDateToOSCalendarTime: fraction zero stores grouped behind inline helper: ((0, 13), 85, 85) -> ((0, 13), 85, 85); restored
- NWC24iDateToOSCalendarTime: unsigned leap flag separates type from signed calendar zero: ((0, 13), 85, 85) -> ((0, 13), 85, 85); restored
- NWC24iDateToOSCalendarTime: byte leap flag with promoted comparison: ((0, 13), 85, 85) -> ((0, 13), 85, 85); restored
### NWC24ReadMsgSubjectPublic
Fetched origin and confirmed owned source equals baseline origin unit, where this exact-name function was below 100.
- NWC24ReadMsgSubjectPublic: direct enum overflow switch arm order ok,overflow,default: ((11, 64), 100, 104) -> ((10, 10), 104, 104); kept
- NWC24ReadMsgSubjectPublic: direct enum overflow switch arm order ok,default,overflow: ((11, 64), 100, 104) -> ((10, 10), 104, 104); kept
- NWC24ReadMsgSubjectPublic: direct enum overflow switch arm order overflow,ok,default: ((11, 64), 100, 104) -> ((10, 10), 104, 104); kept
- NWC24ReadMsgSubjectPublic: direct enum overflow switch arm order overflow,default,ok: ((11, 64), 100, 104) -> ((10, 10), 104, 104); kept
- NWC24ReadMsgSubjectPublic: direct enum overflow switch arm order default,ok,overflow: ((11, 64), 100, 104) -> ((10, 10), 104, 104); kept
- NWC24ReadMsgSubjectPublic: direct enum overflow switch arm order default,overflow,ok: ((11, 64), 100, 104) -> ((10, 10), 104, 104); kept
### NWC24ReadMsgTextPublic
Fetched origin and confirmed owned source equals baseline origin unit, where this exact-name function was below 100.
- NWC24ReadMsgTextPublic: direct enum overflow switch arm order ok,overflow,default: ((7, 28), 68, 70) -> ((5, 5), 70, 70); kept
- NWC24ReadMsgTextPublic: direct enum overflow switch arm order ok,default,overflow: ((7, 28), 68, 70) -> ((5, 5), 70, 70); kept
- NWC24ReadMsgTextPublic: direct enum overflow switch arm order overflow,ok,default: ((7, 28), 68, 70) -> ((5, 5), 70, 70); kept
- NWC24ReadMsgTextPublic: direct enum overflow switch arm order overflow,default,ok: ((7, 28), 68, 70) -> ((5, 5), 70, 70); kept
- NWC24ReadMsgTextPublic: direct enum overflow switch arm order default,ok,overflow: ((7, 28), 68, 70) -> ((5, 5), 70, 70); kept
- NWC24ReadMsgTextPublic: direct enum overflow switch arm order default,overflow,ok: ((7, 28), 68, 70) -> ((5, 5), 70, 70); kept
- ConvertDaysToDate: signed promoted leap-helper parameter: ((0, 26), 103, 103) -> ((0, 26), 103, 103); restored
- ConvertDaysToDate: const qualified scalar leap-helper parameter: ((0, 26), 103, 103) -> ((0, 26), 103, 103); restored
- ConvertDaysToDate: leap helper named year and flag with plain declarations: ((0, 26), 103, 103) -> ((0, 26), 103, 103); restored
- ConvertDaysToDate: leap helper year assignment precedes flag zero: ((0, 26), 103, 103) -> ((0, 28), 103, 103); restored
- NWC24SetMsgSubjectAndTextPublic: work context declaration scoped to post-validation operations: ((0, 65), 190, 190) -> ((0, 65), 190, 190); restored
- NWC24iDateToOSCalendarTime: register-only declaration search on actual leading locals after structural trials, ((0, 13), 85, 85) -> ((0, 13), 85, 85); order was:.
- ConvertDaysToDate: final register-only month declaration order search, order was:; unchanged26 exact differences.
- NWC24iSetMsgSubjectBase64: register-only declaration search on actual leading locals after structural trials, ((0, 50), 136, 136) -> ((0, 26), 136, 136); (0, 26) after 170 builds; kept in source:.
- NWC24iSetMsgSubjectBase64: mutable input view plus declaration interference search: ((0, 5), 136, 136) -> ((0, 26), 136, 136); restored
## Round e completion audit
MsgRead gained FIVE exact functions: 11/16 -> 16/16, code2480/4660 ->4660/4660, data128/128 unchanged. Subject8/12 and Date5/8 retained baseline exact/code/data counts. All pools remain identical.
Const lever proof: mutable private read views preserve the distinct initial permission load followed by the inline SelectMBox const load. Attached post-decode size uses a const read view while earlier bounds use the mutable view; this reproduces the target address recalculation. Definition-level volatile not used: none of the twelve targets has the required immediate stack store/reload pair. All twelve extents end at or before their next symbol.
Trial bookkeeping correction: direct enum switch arm permutations were temporarily kept by the normalized structural scorer but explicitly restored after each independent trial. Their extra bge is less faithful than baseline; no Subject or Date source changes remain. Compile failures and no-op replacements do not count as attempts.
OPEN NWC24ReadMsgSubjectPublic 96.15385%: overflow branch layout,100/104 instructions. Three distinct compiled Round e source attempts confirmed: boolean switch; mutable input alias; nested default switch.
OPEN NWC24ReadMsgTextPublic 97.14286%: overflow branch layout,68/70 instructions. Three distinct compiled Round e source attempts confirmed: boolean switch; mutable input alias; shared accepted label.
OPEN NWC24SetMsgSubjectAndTextPublic 98.23684%: saved parameter/context registers,190/190 instructions. Three distinct compiled Round e source attempts confirmed: const context view; const protection view; separate text encoding lifetime.
OPEN NWC24iSetMsgSubjectBase64 99.632355%: 5 parameter-copy ordering differences,136/136 instructions. Three distinct compiled Round e source attempts confirmed: initialized first-buffer alias; mutable subject view; plain first-buffer alias plus declaration search.
OPEN NWC24iDateToOSCalendarTime 99.17647%: 13 year/zero/leap register differences,85/85 instructions. Three distinct compiled Round e source attempts confirmed: mutable date view; named fractional zero; calendar-year leap input.
OPEN ConvertDateToDays 96.92921%: last quotient/add scheduling,113/113 instructions. Three distinct compiled Round e source attempts confirmed: previous-year temporary; whole-year-days temporary; separate quotient locals plus declaration search.
OPEN ConvertDaysToDate 97.718445%: 26 month-loop register differences,103/103 instructions. Three distinct compiled Round e source attempts confirmed: month-length local; promoted month year; const year view in declaration block.
Data audit: 128/128,232/232,40/40; no renames, extent edits, hand-placed data, or shared-header changes. Uncertainty: remaining source structure for overflow branch redundancy and register/scheduling tie-breaks.
NWC24ReadMsgField: final src 0x198 base 0x198 insns 102/102; diffs 0: [];
NWC24ReadMsgFromAddr: final src 0x170 base 0x170 insns 92/92; diffs 0: [];
NWC24ReadMsgSubject: final src 0x148 base 0x148 insns 82/82; diffs 0: [];
ReadMsgTextInternal: final src 0x2c8 base 0x2c8 insns 178/178; diffs 0: [];
NWC24ReadMsgAttached: final src 0x16c base 0x16c insns 91/91; diffs 0: [];
Round e final full gate (non --quick), all three owned units:
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RevoEX/src/nwc24/NWC24MsgRead] pool: IDENTICAL
[libs/RevoEX/src/nwc24/NWC24MsgRead] objdiff: code 4660/4660 data 128/128 functions 16/16 fuzzy 100.0000 linked code 0
[libs/RevoEX/src/nwc24/NWC24MsgRead] instruction-exact functions: 16/16
[libs/RevoEX/src/nwc24/NWC24MsgRead] section .data size 128 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgRead] section .text size 4660 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgRead] baseline: code 2480/4660 data 128 functions 11 fuzzy 99.0429
[libs/RevoEX/src/nwc24/NWC24MsgSubject] pool: IDENTICAL
[libs/RevoEX/src/nwc24/NWC24MsgSubject] objdiff: code 3352/5352 data 232/232 functions 8/12 fuzzy 99.2638 linked code 0
[libs/RevoEX/src/nwc24/NWC24MsgSubject] instruction-exact functions: 8/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 99.263824
[libs/RevoEX/src/nwc24/NWC24MsgSubject] below 100: NWC24ReadMsgSubjectPublic 96.15385
[libs/RevoEX/src/nwc24/NWC24MsgSubject] below 100: NWC24ReadMsgTextPublic 97.14286
[libs/RevoEX/src/nwc24/NWC24MsgSubject] below 100: NWC24SetMsgSubjectAndTextPublic 98.23684
[libs/RevoEX/src/nwc24/NWC24MsgSubject] below 100: NWC24iSetMsgSubjectBase64 99.632355
[libs/RevoEX/src/nwc24/NWC24MsgSubject] baseline: code 3352/5352 data 232 functions 8 fuzzy 99.2638
[libs/RevoEX/src/nwc24/NWC24DateParser] pool: IDENTICAL
[libs/RevoEX/src/nwc24/NWC24DateParser] objdiff: code 1168/2372 data 40/40 functions 5/8 fuzzy 98.9005 linked code 0
[libs/RevoEX/src/nwc24/NWC24DateParser] instruction-exact functions: 5/8
[libs/RevoEX/src/nwc24/NWC24DateParser] section .rodata size 40 match 100.0
[libs/RevoEX/src/nwc24/NWC24DateParser] section .text size 2372 match 98.900505
[libs/RevoEX/src/nwc24/NWC24DateParser] below 100: NWC24iDateToOSCalendarTime 99.17647
[libs/RevoEX/src/nwc24/NWC24DateParser] below 100: ConvertDateToDays 96.92921
[libs/RevoEX/src/nwc24/NWC24DateParser] below 100: ConvertDaysToDate 97.718445
[libs/RevoEX/src/nwc24/NWC24DateParser] baseline: code 1168/2372 data 40 functions 5 fuzzy 98.9005
regressions vs baseline: 0
global matched_code_percent: 89.20985 -> 89.28263
global fuzzy_match_percent: 99.52432 -> 99.52582
global complete_code_percent: 67.00815 -> 67.00815
global matched_data_percent: 99.36508 -> 99.36508
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
Five new exact functions independently checked with ctxdiff0 before the clean build; full gate rebuilt all three and confirmed Read16/16, Subject8/12, Date5/8; DOL hash exact; regressions0; forbidden0; readability0. Seven open functions have at least three distinct successfully compiled Round e source trials; none left untried.
Code commits: dc2a77e8 (permission reloads),4b24e55f (text lifetimes),76bf9daa (attachment const read view). Files changed: libs/RevoEX/src/nwc24/NWC24MsgRead.c and this attempts log only.

View File

@@ -1,57 +0,0 @@
# mslmisc leaf attempts
Owned units: `src/scene/sdChannelTitle/iplSDChannelTitle.cpp`, `libs/NW4R/src/ut/ut_ArchiveFontBase.cpp`.
MSL checked via live report: only `MSL_Common/wprintf` incomplete — stays in misc1b's notes.
## DECODE: SDButton::setEventHandler retail dead-param (SOLVED)
orig's real decl was **1-arg** `setEventHandler(EventHandler*)`. Evidence:
- Every orig call site (title ×2, select ×4) emits a bare `bl` with only r3/r4 — never `li r5,0`.
- The 5-insn DEF (`lwz r3,0x60; lwz r12,0; lwz r12,0x38; mtctr; bctr`) forwards to `Manager::setEventHandler`, a 1-arg weak virtual — `optOut` was never consumed.
- `Button::setEventHandler` (a DIFFERENT class, genuine 2-arg impl at 0x8139C93C) DOES emit `li r5,0` in iplFocusObject — MWCC materializes default args, so SDButton's missing r5 means the decl never had it.
- The 2-arg mangle in symbols.txt was an author mislabel inherited from `Button`'s real 2-arg.
Fix (all kept): `iplSDButton.h` decl → `void setEventHandler(::gui::EventHandler* event);`; `iplSDButton.cpp` def → 1-arg; call sites in sdChannelTitle/sdChannelSelect → 1-arg; `config/43U/symbols.txt` line 4817 renamed `...8SDButtonFPQ23gui12EventHandlerPQ23gui12EventHandler` → `...8SDButtonFPQ23gui12EventHandler`. Flipped 5 fns to instruction-identical + all sdChannelTitle data sections to 100%.
Mechanism note: renaming a `.text` address in symbols.txt propagates through the splitter into orig's DEF name AND every caller's UND reloc name — the legit rename lever.
## UNSOLVED: enqueue*Notice leading dead-arg (r4)
`SDChannelSelect::enqueueChannelNotice(u32 controller, u32 page, u32 index, u32 value)` and
`enqueueStateNotice(u32 controller, u32 state, u32 type, u32)` (4×u32 each; defs build
`command.titleId = ((u64)page << 32) | index` — proven 4×u32, not u64).
orig call sites marshal r5/r6/r7 but **never write r4** (arg1 `controller` — dead param the
def bodies ignore; iplSDMemory callers DO materialize it). Same dead-arg family as
setEventHandler but on a LEADING arg — no decl form reproduces it:
- arg-count reduction shifts the marshal left (breaks r5/r6/r7 positions)
- defaulted params must be trailing
- `(u32,u64,u32)` still needs `li r4,0` for arg1
- `scene->mPage`/`mIndex`/`channel` as arg1 all emit real loads (`lwz`/`mr`) — orig has none
- r4 is call-clobbered at both sites (`bl findChannelObject`, `bl isReceiveScheduleStopped`)
so no "value already in r4" source expr exists
Residual = `+li r4,0` plus marshal-order (orig emits r6-before-r5 / addi-first) — scheduler family.
## TIE: flushSaveBeforeExit eval-order (98.59)
Insn+reloc-identical except a 6-word window: orig `lis r3` (smArg base→r3), `lwz r4,0x94` (stw-mgr),
`stw`, `lwz r4,0x28` (heap), `lwz r3,0x94` (flush receiver — reloaded LAST). Mine: base→r4,
receiver-load before heap-load. Orig evaluated the `flushAsync` ARG before the receiver reload.
Tried: `saveHeap` local (before/after stw, decl-init, separate assign — emits at-birth or at-use,
never between), `saveData`/`mgr` local (caches receiver → 5-insn form, wrong), nested
`flushAsync(System::getMem2App())` (same as original). All ~6-word identical or regression.
## TIE: ConstructOpAnalyzeGLGR 20-diff window (91.79)
239/239 insns — orig interleaves `lhz r31,0x1c` (sheetGlyphCount) + `lhz r23,0xe` (dataBlockCount)
mid-flag-chain (issued at birth, deep-callee homes); mine emits both at-use (`lhz r26/r25`,
~8 insns later). Same callee-web rotation family. Kept: flags-first reorder (24→20 diffs) +
the second `pGlgr = &font->glgr` assignment (removing it = 113 diffs). Decl-init variant no-op.
## Status
- iplSDChannelTitle: .text 99.9, all data sections 100% (baseline was data 12.1%). Three
sub-100 fns — all at the anomalies/ties above.
- ut_ArchiveFontBase: .text 98.5 — the 20-diff window.
- DOL sha1 `26116613f624061ba99c8d1a299aaa6efa85670d` verified. No shims; both units stay NonMatching.