Compare commits
11 Commits
agent/rea/
...
agent/bitt
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42b06fb67f | ||
|
|
0aa16c0792 | ||
|
|
f8957ca95b | ||
|
|
02fe1755d2 | ||
|
|
5e7b5ad045 | ||
|
|
ca031bd8ff | ||
|
|
b276099f02 | ||
|
|
6bf8283ef1 | ||
|
|
b7a912ce02 | ||
|
|
60341ca483 | ||
|
|
7aa71d2930 |
@@ -727,7 +727,7 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
IPLSection("address", [
|
||||
Object(NonMatching, "scene/address/iplAddress.cpp"),
|
||||
Object(Matching, "scene/address/iplAddress.cpp"),
|
||||
Object(Matching, "scene/address/iplAddressAddSel.cpp"),
|
||||
Object(NonMatching, "scene/address/iplAddressEdit.cpp"),
|
||||
]
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace ipl {
|
||||
namespace memorycard {
|
||||
typedef struct FileInfo {
|
||||
u16 fileNo; // 0x00
|
||||
u16 size; // 0x02
|
||||
volatile u16 size; // 0x02
|
||||
u8 canCopy; // 0x04
|
||||
u8 canMove; // 0x05
|
||||
u16 unk_0x06; // 0x06
|
||||
@@ -28,7 +28,7 @@ namespace ipl {
|
||||
} CardState; // 0x14
|
||||
|
||||
typedef struct IconState {
|
||||
u8 bannerEnable; // 0x00
|
||||
volatile u8 bannerEnable; // 0x00
|
||||
u8 unk_0x01; // 0x01
|
||||
u8 unk_0x02; // 0x02
|
||||
u8 bannerType; // 0x03
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace ipl {
|
||||
STATE_FINISHED,
|
||||
};
|
||||
|
||||
bool mbDoneProcess; // 0x00
|
||||
volatile bool mbDoneProcess; // 0x00
|
||||
int mCDBResult; // 0x04
|
||||
|
||||
int mPrevFreeSize; // 0x08
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace nw4r {
|
||||
PaneList& GetChildList() { return mChildList; }
|
||||
|
||||
const math::VEC3& GetTranslate() { return mTranslate; }
|
||||
#ifdef IPL_SDMEMORY_SET_TRANSLATE_OUT_OF_LINE
|
||||
#if defined(IPL_SDMEMORY_SET_TRANSLATE_OUT_OF_LINE) || defined(IPL_ADDRESS_MATCHING)
|
||||
void SetTranslate(const math::VEC3& translate);
|
||||
#else
|
||||
void SetTranslate(const math::VEC3& translate) { mTranslate = translate; }
|
||||
|
||||
@@ -106,192 +106,43 @@ s32 TMCJPEGDEC_decompmcu(u32 maxMCU, u32 mcuCount, TMCCJPEGDecWork* work, void*
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef __MWERKS__
|
||||
asm s32 TMCJPEGDEC_imagestart(register TMCCJPEGDecWork* work) {
|
||||
nofralloc
|
||||
static inline void initZigzag(TMCCJPEGDecWork* work) {
|
||||
const u8* zigzag = TMCJPEGDEC_Zigzag_data;
|
||||
s32 i;
|
||||
work->restartInterval = 0;
|
||||
work->scanCount = 0;
|
||||
for (i = 0; i < 64; i++) {
|
||||
work->zigzagData[i] = *zigzag++ << 2;
|
||||
}
|
||||
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
lis r8, TMCJPEGDEC_Zigzag_data@ha
|
||||
li r4, 0
|
||||
stw r0, 0x24(r1)
|
||||
li r0, 4
|
||||
addi r8, r8, TMCJPEGDEC_Zigzag_data@l
|
||||
li r7, 0
|
||||
stw r31, 0x1c(r1)
|
||||
mr r31, r3
|
||||
sth r4, 0x181a(r3)
|
||||
stb r4, 0x181c(r3)
|
||||
mtctr r0
|
||||
|
||||
_imagestart_loop:
|
||||
lbz r6, 0(r8)
|
||||
add r9, r3, r7
|
||||
lbz r5, 1(r8)
|
||||
addi r7, r7, 8
|
||||
rlwinm r6, r6, 2, 0x18, 0x1d
|
||||
lbz r4, 2(r8)
|
||||
stb r6, 0x458(r9)
|
||||
rlwinm r5, r5, 2, 0x18, 0x1d
|
||||
rlwinm r6, r4, 2, 0x18, 0x1d
|
||||
lbz r0, 3(r8)
|
||||
stb r5, 0x459(r9)
|
||||
rlwinm r5, r0, 2, 0x18, 0x1d
|
||||
lbz r4, 4(r8)
|
||||
stb r6, 0x45a(r9)
|
||||
rlwinm r6, r4, 2, 0x18, 0x1d
|
||||
lbz r4, 6(r8)
|
||||
stb r5, 0x45b(r9)
|
||||
lbz r0, 5(r8)
|
||||
rlwinm r4, r4, 2, 0x18, 0x1d
|
||||
stb r6, 0x45c(r9)
|
||||
rlwinm r5, r0, 2, 0x18, 0x1d
|
||||
lbz r0, 7(r8)
|
||||
stb r5, 0x45d(r9)
|
||||
lbz r6, 8(r8)
|
||||
rlwinm r0, r0, 2, 0x18, 0x1d
|
||||
stb r4, 0x45e(r9)
|
||||
lbz r5, 9(r8)
|
||||
rlwinm r6, r6, 2, 0x18, 0x1d
|
||||
stb r0, 0x45f(r9)
|
||||
add r9, r3, r7
|
||||
lbz r4, 0xa(r8)
|
||||
rlwinm r5, r5, 2, 0x18, 0x1d
|
||||
stb r6, 0x458(r9)
|
||||
addi r7, r7, 8
|
||||
rlwinm r6, r4, 2, 0x18, 0x1d
|
||||
lbz r0, 0xb(r8)
|
||||
stb r5, 0x459(r9)
|
||||
rlwinm r5, r0, 2, 0x18, 0x1d
|
||||
lbz r4, 0xc(r8)
|
||||
stb r6, 0x45a(r9)
|
||||
rlwinm r6, r4, 2, 0x18, 0x1d
|
||||
lbz r4, 0xe(r8)
|
||||
stb r5, 0x45b(r9)
|
||||
lbz r0, 0xd(r8)
|
||||
rlwinm r4, r4, 2, 0x18, 0x1d
|
||||
stb r6, 0x45c(r9)
|
||||
rlwinm r5, r0, 2, 0x18, 0x1d
|
||||
lbz r0, 0xf(r8)
|
||||
stb r5, 0x45d(r9)
|
||||
addi r8, r8, 0x10
|
||||
rlwinm r0, r0, 2, 0x18, 0x1d
|
||||
stb r4, 0x45e(r9)
|
||||
stb r0, 0x45f(r9)
|
||||
bdnz _imagestart_loop
|
||||
|
||||
mr r4, r31
|
||||
addi r3, r1, 8
|
||||
bl TMCJPEGDEC_get_wbyte
|
||||
cmpwi r3, 0
|
||||
bge _imagestart_have_marker
|
||||
b _imagestart_return
|
||||
|
||||
_imagestart_have_marker:
|
||||
lhz r0, 8(r1)
|
||||
cmplwi r0, 0xffd8
|
||||
beq _imagestart_parse
|
||||
li r3, -0x20
|
||||
b _imagestart_return
|
||||
|
||||
_imagestart_parse:
|
||||
li r0, 0
|
||||
mr r4, r31
|
||||
sth r0, 8(r1)
|
||||
addi r3, r1, 8
|
||||
bl TMCJPEGDEC_parse_para
|
||||
cmpwi r3, 0
|
||||
bge _imagestart_check_sof
|
||||
b _imagestart_return
|
||||
|
||||
_imagestart_check_sof:
|
||||
lhz r0, 8(r1)
|
||||
cmplwi r0, 0xffc0
|
||||
beq _imagestart_parse_sof
|
||||
li r3, -0x10
|
||||
b _imagestart_return
|
||||
|
||||
_imagestart_parse_sof:
|
||||
mr r3, r31
|
||||
bl TMCJPEGDEC_parse_sof
|
||||
srawi r0, r3, 0x1f
|
||||
and r3, r3, r0
|
||||
|
||||
_imagestart_return:
|
||||
lwz r0, 0x24(r1)
|
||||
lwz r31, 0x1c(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x20
|
||||
blr
|
||||
}
|
||||
#else
|
||||
|
||||
s32 TMCJPEGDEC_imagestart(TMCCJPEGDecWork* work) {
|
||||
u16 marker;
|
||||
s32 r;
|
||||
u32 off;
|
||||
u8* p;
|
||||
int i;
|
||||
const u8* zigzag;
|
||||
|
||||
zigzag = TMCJPEGDEC_Zigzag_data;
|
||||
work->restartInterval = 0;
|
||||
work->scanCount = 0;
|
||||
off = 0;
|
||||
i = 4;
|
||||
|
||||
do {
|
||||
p = (u8*)work + off;
|
||||
off += 8;
|
||||
p[0x458] = (zigzag[0] & 0x3F) << 2;
|
||||
p[0x459] = (zigzag[1] & 0x3F) << 2;
|
||||
p[0x45a] = (zigzag[2] & 0x3F) << 2;
|
||||
p[0x45b] = (zigzag[3] & 0x3F) << 2;
|
||||
p[0x45c] = (zigzag[4] & 0x3F) << 2;
|
||||
p[0x45e] = (zigzag[6] & 0x3F) << 2;
|
||||
p[0x45d] = (zigzag[5] & 0x3F) << 2;
|
||||
p[0x45f] = (zigzag[7] & 0x3F) << 2;
|
||||
|
||||
p = (u8*)work + off;
|
||||
off += 8;
|
||||
p[0x458] = (zigzag[8] & 0x3F) << 2;
|
||||
p[0x459] = (zigzag[9] & 0x3F) << 2;
|
||||
p[0x45a] = (zigzag[10] & 0x3F) << 2;
|
||||
p[0x45b] = (zigzag[11] & 0x3F) << 2;
|
||||
p[0x45c] = (zigzag[12] & 0x3F) << 2;
|
||||
p[0x45d] = (zigzag[13] & 0x3F) << 2;
|
||||
p[0x45e] = (zigzag[14] & 0x3F) << 2;
|
||||
p[0x45f] = (zigzag[15] & 0x3F) << 2;
|
||||
|
||||
zigzag += 16;
|
||||
} while (--i != 0);
|
||||
initZigzag(work);
|
||||
|
||||
r = TMCJPEGDEC_get_wbyte(&marker, work);
|
||||
if (r < 0) {
|
||||
return r;
|
||||
}
|
||||
|
||||
if (marker != 0xFFD8) {
|
||||
return -0x20;
|
||||
}
|
||||
|
||||
marker = 0;
|
||||
r = TMCJPEGDEC_parse_para(&marker, work);
|
||||
if (r < 0) {
|
||||
return r;
|
||||
}
|
||||
|
||||
if (marker != 0xFFC0) {
|
||||
return -0x10;
|
||||
}
|
||||
|
||||
r = TMCJPEGDEC_parse_sof(work);
|
||||
if (r < 0) {
|
||||
return r;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
s32 TMCJPEGDEC_imageend(TMCCJPEGDecWork* work) {
|
||||
if (work->pState->unk_0x21 == 1)
|
||||
@@ -783,266 +634,85 @@ s32 TMCJPEGDEC_restart_interval(TMCCJPEGDecWork* work, u32 maxMCU, u32 mcuCount)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __MWERKS__
|
||||
static asm s32 TMCJPEGDEC_parse_para(register u16* marker, register TMCCJPEGDecWork* work) {
|
||||
nofralloc
|
||||
|
||||
stwu r1, -0x30(r1)
|
||||
mflr r0
|
||||
stw r0, 0x34(r1)
|
||||
stmw r26, 0x18(r1)
|
||||
mr r28, r3
|
||||
mr r29, r4
|
||||
li r31, 0
|
||||
lis r26, 1
|
||||
li r27, 1
|
||||
lhz r30, 0(r3)
|
||||
|
||||
_parse_para_loop:
|
||||
mr r4, r29
|
||||
addi r3, r1, 0x12
|
||||
bl TMCJPEGDEC_get_wbyte
|
||||
cmpwi r3, 0
|
||||
bge _parse_para_marker_loaded
|
||||
cmpwi r3, -0x90
|
||||
bne _parse_para_return
|
||||
lhz r0, 0x12(r1)
|
||||
cmplwi r0, 0xffd9
|
||||
bne _parse_para_return
|
||||
li r3, 0
|
||||
b _parse_para_marker_loaded
|
||||
b _parse_para_return
|
||||
|
||||
_parse_para_marker_loaded:
|
||||
lhz r0, 0x12(r1)
|
||||
b _parse_para_marker_condition
|
||||
|
||||
_parse_para_marker_byte:
|
||||
mr r4, r29
|
||||
addi r3, r1, 8
|
||||
bl TMCJPEGDEC_get_byte
|
||||
cmpwi r3, 0
|
||||
bge _parse_para_marker_byte_loaded
|
||||
b _parse_para_return
|
||||
|
||||
_parse_para_marker_byte_loaded:
|
||||
lbz r0, 8(r1)
|
||||
ori r0, r0, 0xff00
|
||||
sth r0, 0x12(r1)
|
||||
|
||||
_parse_para_marker_condition:
|
||||
clrlwi r4, r0, 0x10
|
||||
cmplwi r4, 0xffff
|
||||
beq _parse_para_marker_byte
|
||||
cmplwi r4, 0xffe0
|
||||
blt _parse_para_switch
|
||||
cmplwi r4, 0xffef
|
||||
bgt _parse_para_switch
|
||||
mr r4, r29
|
||||
addi r3, r1, 0x10
|
||||
bl TMCJPEGDEC_get_wbyte
|
||||
cmpwi r3, 0
|
||||
bge _parse_para_app_length
|
||||
b _parse_para_check_result
|
||||
|
||||
_parse_para_app_length:
|
||||
lhz r3, 0x10(r1)
|
||||
cmplwi r3, 2
|
||||
bge _parse_para_app_move
|
||||
li r3, -0x45
|
||||
b _parse_para_check_result
|
||||
|
||||
_parse_para_app_move:
|
||||
addi r0, r3, -2
|
||||
mr r4, r29
|
||||
sth r0, 0x10(r1)
|
||||
clrlwi r3, r0, 0x10
|
||||
bl TMCJPEGDEC_move_ptr
|
||||
srawi r0, r3, 0x1f
|
||||
and r3, r3, r0
|
||||
srawi r0, r3, 0x1f
|
||||
and r3, r3, r0
|
||||
b _parse_para_check_result
|
||||
|
||||
_parse_para_switch:
|
||||
addi r0, r26, -0x27
|
||||
cmpw r4, r0
|
||||
beq _parse_para_eoi
|
||||
bge _parse_para_switch_ge_ffc2
|
||||
addi r0, r26, -0x3e
|
||||
cmpw r4, r0
|
||||
beq _parse_para_sos
|
||||
bge _parse_para_switch_ge_ffc4
|
||||
addi r0, r26, -0x40
|
||||
cmpw r4, r0
|
||||
beq _parse_para_sof
|
||||
b _parse_para_unknown
|
||||
|
||||
_parse_para_switch_ge_ffc4:
|
||||
addi r0, r26, -0x3c
|
||||
cmpw r4, r0
|
||||
beq _parse_para_dht
|
||||
b _parse_para_unknown
|
||||
|
||||
_parse_para_switch_ge_ffc2:
|
||||
addi r0, r26, -0x23
|
||||
cmpw r4, r0
|
||||
beq _parse_para_dri
|
||||
bge _parse_para_switch_ge_ffdc
|
||||
addi r0, r26, -0x25
|
||||
cmpw r4, r0
|
||||
beq _parse_para_dqt
|
||||
bge _parse_para_dnl
|
||||
b _parse_para_com_marker
|
||||
|
||||
_parse_para_switch_ge_ffdc:
|
||||
addi r0, r26, -2
|
||||
cmpw r4, r0
|
||||
beq _parse_para_com
|
||||
b _parse_para_unknown
|
||||
|
||||
_parse_para_dht:
|
||||
mr r3, r30
|
||||
mr r4, r29
|
||||
bl TMCJPEGDEC_parse_dht
|
||||
b _parse_para_check_result
|
||||
|
||||
_parse_para_dqt:
|
||||
mr r3, r29
|
||||
bl TMCJPEGDEC_parse_dqt
|
||||
b _parse_para_check_result
|
||||
|
||||
_parse_para_dri:
|
||||
mr r4, r29
|
||||
addi r3, r1, 0xe
|
||||
bl TMCJPEGDEC_get_wbyte
|
||||
cmpwi r3, 0
|
||||
bge _parse_para_dri_length
|
||||
b _parse_para_check_result
|
||||
|
||||
_parse_para_dri_length:
|
||||
lhz r0, 0xe(r1)
|
||||
cmplwi r0, 4
|
||||
beq _parse_para_dri_value
|
||||
li r3, -0x42
|
||||
b _parse_para_check_result
|
||||
|
||||
_parse_para_dri_value:
|
||||
mr r4, r29
|
||||
addi r3, r1, 0xe
|
||||
bl TMCJPEGDEC_get_wbyte
|
||||
cmpwi r3, 0
|
||||
bge _parse_para_dri_store
|
||||
b _parse_para_check_result
|
||||
|
||||
_parse_para_dri_store:
|
||||
lhz r0, 0xe(r1)
|
||||
li r3, 0
|
||||
sth r0, 0x181a(r29)
|
||||
b _parse_para_check_result
|
||||
|
||||
_parse_para_dnl:
|
||||
mr r4, r29
|
||||
addi r3, r1, 0xc
|
||||
bl TMCJPEGDEC_get_wbyte
|
||||
cmpwi r3, 0
|
||||
bge _parse_para_dnl_length
|
||||
b _parse_para_check_result
|
||||
|
||||
_parse_para_dnl_length:
|
||||
lhz r0, 0xc(r1)
|
||||
cmplwi r0, 4
|
||||
beq _parse_para_dnl_value
|
||||
li r3, -0x43
|
||||
b _parse_para_check_result
|
||||
|
||||
_parse_para_dnl_value:
|
||||
mr r4, r29
|
||||
addi r3, r1, 0xc
|
||||
bl TMCJPEGDEC_get_wbyte
|
||||
cmpwi r3, 0
|
||||
bge _parse_para_dnl_store
|
||||
b _parse_para_check_result
|
||||
|
||||
_parse_para_dnl_store:
|
||||
lhz r0, 0xc(r1)
|
||||
li r3, 0
|
||||
sth r0, 0x17f2(r29)
|
||||
b _parse_para_check_result
|
||||
|
||||
_parse_para_com:
|
||||
mr r4, r29
|
||||
addi r3, r1, 0xa
|
||||
bl TMCJPEGDEC_get_wbyte
|
||||
cmpwi r3, 0
|
||||
bge _parse_para_com_length
|
||||
b _parse_para_check_result
|
||||
|
||||
_parse_para_com_length:
|
||||
lhz r3, 0xa(r1)
|
||||
cmplwi r3, 2
|
||||
bge _parse_para_com_move
|
||||
li r3, -0x44
|
||||
b _parse_para_check_result
|
||||
|
||||
_parse_para_com_move:
|
||||
addi r0, r3, -2
|
||||
mr r4, r29
|
||||
sth r0, 0xa(r1)
|
||||
clrlwi r3, r0, 0x10
|
||||
bl TMCJPEGDEC_move_ptr
|
||||
srawi r0, r3, 0x1f
|
||||
and r3, r3, r0
|
||||
srawi r0, r3, 0x1f
|
||||
and r3, r3, r0
|
||||
b _parse_para_check_result
|
||||
|
||||
_parse_para_sof:
|
||||
li r31, 1
|
||||
b _parse_para_check_result
|
||||
|
||||
_parse_para_sos:
|
||||
li r31, 1
|
||||
b _parse_para_check_result
|
||||
|
||||
_parse_para_com_marker:
|
||||
li r31, 1
|
||||
b _parse_para_check_result
|
||||
|
||||
_parse_para_eoi:
|
||||
stb r27, 0x181c(r29)
|
||||
li r31, 1
|
||||
b _parse_para_check_result
|
||||
|
||||
_parse_para_unknown:
|
||||
li r3, -0x2f
|
||||
|
||||
_parse_para_check_result:
|
||||
cmpwi r3, 0
|
||||
bge _parse_para_keep_going
|
||||
li r31, 1
|
||||
|
||||
_parse_para_keep_going:
|
||||
cmpwi r31, 0
|
||||
beq _parse_para_loop
|
||||
lhz r0, 0x12(r1)
|
||||
sth r0, 0(r28)
|
||||
|
||||
_parse_para_return:
|
||||
lmw r26, 0x18(r1)
|
||||
lwz r0, 0x34(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x30
|
||||
blr
|
||||
static inline s32 skipSegmentData(u16 length, TMCCJPEGDecWork* work) {
|
||||
s32 result = TMCJPEGDEC_move_ptr(length, work);
|
||||
if (result < 0) {
|
||||
return result;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
|
||||
static inline s32 parseApplication(TMCCJPEGDecWork* work) {
|
||||
u16 length;
|
||||
s32 result = TMCJPEGDEC_get_wbyte(&length, work);
|
||||
if (result < 0) {
|
||||
return result;
|
||||
}
|
||||
if (length < 2) {
|
||||
return -0x45;
|
||||
}
|
||||
length -= 2;
|
||||
result = skipSegmentData(length, work);
|
||||
if (result < 0) {
|
||||
return result;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline s32 parseRestartInterval(TMCCJPEGDecWork* work) {
|
||||
u16 length;
|
||||
s32 result = TMCJPEGDEC_get_wbyte(&length, work);
|
||||
if (result < 0) {
|
||||
return result;
|
||||
}
|
||||
if (length != 4) {
|
||||
return -0x42;
|
||||
}
|
||||
result = TMCJPEGDEC_get_wbyte(&length, work);
|
||||
if (result < 0) {
|
||||
return result;
|
||||
}
|
||||
work->restartInterval = length;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline s32 parseNumberOfLines(TMCCJPEGDecWork* work) {
|
||||
u16 length;
|
||||
s32 result = TMCJPEGDEC_get_wbyte(&length, work);
|
||||
if (result < 0) {
|
||||
return result;
|
||||
}
|
||||
if (length != 4) {
|
||||
return -0x43;
|
||||
}
|
||||
result = TMCJPEGDEC_get_wbyte(&length, work);
|
||||
if (result < 0) {
|
||||
return result;
|
||||
}
|
||||
work->frameHeight = length;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline s32 parseComment(TMCCJPEGDecWork* work) {
|
||||
u16 length;
|
||||
s32 result = TMCJPEGDEC_get_wbyte(&length, work);
|
||||
if (result < 0) {
|
||||
return result;
|
||||
}
|
||||
if (length < 2) {
|
||||
return -0x44;
|
||||
}
|
||||
length -= 2;
|
||||
result = skipSegmentData(length, work);
|
||||
if (result < 0) {
|
||||
return result;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static s32 TMCJPEGDEC_parse_para(u16* marker, TMCCJPEGDecWork* work) {
|
||||
u8 byte;
|
||||
u16 local;
|
||||
u16 appSize;
|
||||
u16 driSize;
|
||||
u16 dnlSize;
|
||||
u16 comSize;
|
||||
s32 result;
|
||||
|
||||
u32 keepGoing = 0;
|
||||
@@ -1067,18 +737,7 @@ static s32 TMCJPEGDEC_parse_para(u16* marker, TMCCJPEGDecWork* work) {
|
||||
}
|
||||
|
||||
if (local >= 0xFFE0 && local <= 0xFFEF) {
|
||||
result = TMCJPEGDEC_get_wbyte(&appSize, work);
|
||||
if (result < 0) {
|
||||
goto _check;
|
||||
}
|
||||
if (appSize < 2) {
|
||||
result = -0x45;
|
||||
goto _check;
|
||||
}
|
||||
appSize -= 2;
|
||||
result = TMCJPEGDEC_move_ptr(appSize, work);
|
||||
result = result & (result >> 31);
|
||||
result = result & (result >> 31);
|
||||
result = parseApplication(work);
|
||||
} else {
|
||||
switch ((s32)local) {
|
||||
case 0xFFC4: {
|
||||
@@ -1090,48 +749,15 @@ static s32 TMCJPEGDEC_parse_para(u16* marker, TMCCJPEGDecWork* work) {
|
||||
break;
|
||||
}
|
||||
case 0xFFDD: {
|
||||
result = TMCJPEGDEC_get_wbyte(&driSize, work);
|
||||
if (result >= 0) {
|
||||
if (driSize != 4) {
|
||||
result = -0x42;
|
||||
} else {
|
||||
result = TMCJPEGDEC_get_wbyte(&driSize, work);
|
||||
if (result < 0) {
|
||||
goto _check;
|
||||
}
|
||||
work->restartInterval = driSize;
|
||||
result = 0;
|
||||
}
|
||||
}
|
||||
result = parseRestartInterval(work);
|
||||
break;
|
||||
}
|
||||
case 0xFFDC: {
|
||||
result = TMCJPEGDEC_get_wbyte(&dnlSize, work);
|
||||
if (result >= 0) {
|
||||
if (dnlSize != 4) {
|
||||
result = -0x43;
|
||||
} else {
|
||||
result = TMCJPEGDEC_get_wbyte(&dnlSize, work);
|
||||
if (result >= 0) {
|
||||
work->frameHeight = dnlSize;
|
||||
result = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
result = parseNumberOfLines(work);
|
||||
break;
|
||||
}
|
||||
case 0xFFFE: {
|
||||
result = TMCJPEGDEC_get_wbyte(&comSize, work);
|
||||
if (result >= 0) {
|
||||
if (comSize < 2) {
|
||||
result = -0x44;
|
||||
} else {
|
||||
comSize -= 2;
|
||||
result = TMCJPEGDEC_move_ptr(comSize, work);
|
||||
result = result & result >> 31;
|
||||
result = result & result >> 31;
|
||||
}
|
||||
}
|
||||
result = parseComment(work);
|
||||
break;
|
||||
}
|
||||
case 0xFFC0: {
|
||||
@@ -1158,7 +784,6 @@ static s32 TMCJPEGDEC_parse_para(u16* marker, TMCCJPEGDecWork* work) {
|
||||
}
|
||||
}
|
||||
|
||||
_check:
|
||||
if (result < 0) {
|
||||
keepGoing = 1;
|
||||
}
|
||||
@@ -1167,7 +792,6 @@ static s32 TMCJPEGDEC_parse_para(u16* marker, TMCCJPEGDecWork* work) {
|
||||
*marker = local;
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __MWERKS__
|
||||
static asm s32 TMCJPEGDEC_parse_dht(register s32 first, register TMCCJPEGDecWork* work) {
|
||||
@@ -1959,167 +1583,19 @@ static s32 TMCJPEGDEC_parse_sof(TMCCJPEGDecWork* work) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __MWERKS__
|
||||
static asm s32 TMCJPEGDEC_parse_sos(register TMCCJPEGDecWork* work) {
|
||||
nofralloc
|
||||
|
||||
stwu r1, -0x30(r1)
|
||||
mflr r0
|
||||
stw r0, 0x34(r1)
|
||||
stmw r27, 0x1c(r1)
|
||||
mr r28, r3
|
||||
addi r30, r3, 0x2c
|
||||
addi r29, r3, 0x58
|
||||
addi r3, r1, 0xa
|
||||
mr r4, r28
|
||||
bl TMCJPEGDEC_get_wbyte
|
||||
cmpwi r3, 0
|
||||
bge _parse_sos_have_length
|
||||
b _parse_sos_return
|
||||
|
||||
_parse_sos_have_length:
|
||||
lhz r0, 0xa(r1)
|
||||
cmplwi r0, 2
|
||||
bge _parse_sos_have_count
|
||||
li r3, -0x51
|
||||
b _parse_sos_return
|
||||
|
||||
_parse_sos_have_count:
|
||||
mr r4, r28
|
||||
addi r3, r1, 8
|
||||
bl TMCJPEGDEC_get_byte
|
||||
cmpwi r3, 0
|
||||
bge _parse_sos_store_count
|
||||
b _parse_sos_return
|
||||
|
||||
_parse_sos_store_count:
|
||||
lbz r3, 8(r1)
|
||||
cmplwi r3, 4
|
||||
stb r3, 0x180b(r28)
|
||||
bgt _parse_sos_bad_count
|
||||
lbz r0, 0x180a(r28)
|
||||
cmplw r3, r0
|
||||
beq _parse_sos_count_valid
|
||||
|
||||
_parse_sos_bad_count:
|
||||
li r3, -0x51
|
||||
b _parse_sos_return
|
||||
|
||||
_parse_sos_count_valid:
|
||||
li r31, 0
|
||||
b _parse_sos_loop_condition
|
||||
|
||||
_parse_sos_loop:
|
||||
mr r4, r28
|
||||
addi r3, r1, 8
|
||||
bl TMCJPEGDEC_get_byte
|
||||
cmpwi r3, 0
|
||||
bge _parse_sos_have_component
|
||||
b _parse_sos_return
|
||||
|
||||
_parse_sos_have_component:
|
||||
lbz r0, 0x180a(r28)
|
||||
li r5, 0
|
||||
lbz r4, 8(r1)
|
||||
mtctr r0
|
||||
cmpwi r0, 0
|
||||
ble _parse_sos_bad_component
|
||||
|
||||
_parse_sos_find_component:
|
||||
add r3, r30, r5
|
||||
lbz r0, 0x14(r3)
|
||||
cmpw r4, r0
|
||||
bne _parse_sos_next_component
|
||||
stbx r5, r30, r31
|
||||
add r27, r30, r31
|
||||
b _parse_sos_found_component
|
||||
|
||||
_parse_sos_next_component:
|
||||
addi r5, r5, 1
|
||||
bdnz _parse_sos_find_component
|
||||
|
||||
_parse_sos_bad_component:
|
||||
li r3, -0x51
|
||||
b _parse_sos_return
|
||||
|
||||
_parse_sos_found_component:
|
||||
mr r4, r28
|
||||
addi r3, r1, 8
|
||||
bl TMCJPEGDEC_get_byte
|
||||
cmpwi r3, 0
|
||||
bge _parse_sos_have_tables
|
||||
b _parse_sos_return
|
||||
|
||||
_parse_sos_have_tables:
|
||||
lbz r0, 8(r1)
|
||||
srawi r5, r0, 4
|
||||
clrlwi r6, r0, 0x1c
|
||||
cmpwi r5, 1
|
||||
bgt _parse_sos_bad_tables
|
||||
cmpwi r6, 1
|
||||
ble _parse_sos_tables_valid
|
||||
|
||||
_parse_sos_bad_tables:
|
||||
li r3, -0x51
|
||||
b _parse_sos_return
|
||||
|
||||
_parse_sos_tables_valid:
|
||||
lbz r0, 0(r27)
|
||||
add r3, r29, r5
|
||||
add r4, r30, r0
|
||||
stb r5, 0x1c(r4)
|
||||
lbz r0, 0(r27)
|
||||
add r4, r30, r0
|
||||
stb r6, 0x20(r4)
|
||||
lbz r0, 0x1794(r3)
|
||||
cmplwi r0, 1
|
||||
beq _parse_sos_ac_valid
|
||||
li r3, -0x40
|
||||
b _parse_sos_return
|
||||
|
||||
_parse_sos_ac_valid:
|
||||
add r3, r29, r6
|
||||
lbz r0, 0x1796(r3)
|
||||
cmplwi r0, 1
|
||||
beq _parse_sos_quant_valid
|
||||
li r3, -0x40
|
||||
b _parse_sos_return
|
||||
|
||||
_parse_sos_quant_valid:
|
||||
lbz r0, 0x18(r27)
|
||||
add r3, r29, r0
|
||||
lbz r0, 0x1790(r3)
|
||||
cmplwi r0, 1
|
||||
beq _parse_sos_next
|
||||
li r3, -0x41
|
||||
b _parse_sos_return
|
||||
|
||||
_parse_sos_next:
|
||||
addi r31, r31, 1
|
||||
|
||||
_parse_sos_loop_condition:
|
||||
lbz r0, 0x180b(r28)
|
||||
cmpw r31, r0
|
||||
blt _parse_sos_loop
|
||||
mr r4, r28
|
||||
li r3, 3
|
||||
bl TMCJPEGDEC_move_ptr
|
||||
srawi r0, r3, 0x1f
|
||||
and r3, r3, r0
|
||||
|
||||
_parse_sos_return:
|
||||
lmw r27, 0x1c(r1)
|
||||
lwz r0, 0x34(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x30
|
||||
blr
|
||||
}
|
||||
#else
|
||||
static s32 TMCJPEGDEC_parse_sos(TMCCJPEGDecWork* work) {
|
||||
typedef struct {
|
||||
u8 map[4];
|
||||
u32 dcPredict[4];
|
||||
u8 id[4];
|
||||
u8 quantTable[4];
|
||||
u8 dcTable[4];
|
||||
u8 acTable[4];
|
||||
} TMCComponentInfo;
|
||||
s32 idx;
|
||||
u8* compPtr;
|
||||
TMCComponentInfo* components;
|
||||
TMCUnknownInfo* scalePtr;
|
||||
u8* mapPtr;
|
||||
TMCComponentInfo* mapPtr;
|
||||
|
||||
s32 dcTbl;
|
||||
s32 acTbl;
|
||||
@@ -2130,7 +1606,7 @@ static s32 TMCJPEGDEC_parse_sos(TMCCJPEGDecWork* work) {
|
||||
s32 ci;
|
||||
u8 scanByte;
|
||||
|
||||
compPtr = (u8*)work->compMap;
|
||||
components = (TMCComponentInfo*)work->compMap;
|
||||
scalePtr = (TMCUnknownInfo*)&work->scaleFlag;
|
||||
|
||||
r = TMCJPEGDEC_get_wbyte(&len, work);
|
||||
@@ -2146,12 +1622,12 @@ static s32 TMCJPEGDEC_parse_sos(TMCCJPEGDecWork* work) {
|
||||
return r;
|
||||
}
|
||||
|
||||
if (scanByte > 4 || scanByte != work->compCount) {
|
||||
work->scanCompCount = scanByte;
|
||||
|
||||
if (work->scanCompCount > 4 || work->scanCompCount != work->compCount) {
|
||||
return -0x51;
|
||||
}
|
||||
|
||||
work->scanCompCount = scanByte;
|
||||
|
||||
for (idx = 0; idx < (s32)work->scanCompCount; idx++) {
|
||||
r = TMCJPEGDEC_get_byte(&scanByte, work);
|
||||
if (r < 0) {
|
||||
@@ -2159,18 +1635,15 @@ static s32 TMCJPEGDEC_parse_sos(TMCCJPEGDecWork* work) {
|
||||
}
|
||||
|
||||
for (ci = 0; ci < (s32)work->compCount; ci++) {
|
||||
if ((s32)compPtr[ci + 0x14] == (s32)scanByte) {
|
||||
compPtr[idx] = ci;
|
||||
mapPtr = compPtr + idx;
|
||||
break;
|
||||
if ((s32)scanByte == (s32)components->id[ci]) {
|
||||
components->map[idx] = ci;
|
||||
mapPtr = (TMCComponentInfo*)&components->map[idx];
|
||||
goto componentFound;
|
||||
}
|
||||
}
|
||||
return -0x51;
|
||||
|
||||
// TODO: This isn't right...
|
||||
if (ci >= (s32)work->compCount) {
|
||||
return -0x51;
|
||||
}
|
||||
|
||||
componentFound:
|
||||
r = TMCJPEGDEC_get_byte(&scanByte, work);
|
||||
if (r < 0) {
|
||||
return r;
|
||||
@@ -2183,8 +1656,8 @@ static s32 TMCJPEGDEC_parse_sos(TMCCJPEGDecWork* work) {
|
||||
return -0x51;
|
||||
}
|
||||
|
||||
compPtr[*mapPtr + 0x1c] = dcTbl;
|
||||
compPtr[*mapPtr + 0x20] = acTbl;
|
||||
components->dcTable[mapPtr->map[0]] = dcTbl;
|
||||
components->acTable[mapPtr->map[0]] = acTbl;
|
||||
|
||||
if (scalePtr->dcTblFlag[dcTbl] != 1) {
|
||||
return -0x40;
|
||||
@@ -2194,15 +1667,17 @@ static s32 TMCJPEGDEC_parse_sos(TMCCJPEGDecWork* work) {
|
||||
return -0x40;
|
||||
}
|
||||
|
||||
if (scalePtr->quantTblFlag[mapPtr[0x18]] != 1) {
|
||||
if (scalePtr->quantTblFlag[mapPtr->quantTable[0]] != 1) {
|
||||
return -0x41;
|
||||
}
|
||||
}
|
||||
|
||||
moveResult = TMCJPEGDEC_move_ptr(3, work);
|
||||
return moveResult & (moveResult >> 31);
|
||||
if (moveResult < 0) {
|
||||
return moveResult;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __MWERKS__
|
||||
asm s32 TMCJPEGDEC_err_restart(register TMCCJPEGDecWork* work) {
|
||||
|
||||
@@ -242,61 +242,25 @@ L_2b0:
|
||||
blr
|
||||
}
|
||||
|
||||
asm void _CNTCACHEDeleteTitle() {
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
li r3, 0
|
||||
la r4, scCntCacheSpaceNl
|
||||
stw r0, 0x24(r1)
|
||||
stw r31, 0x1c(r1)
|
||||
stw r30, 0x18(r1)
|
||||
stw r29, 0x14(r1)
|
||||
stw r28, 0x10(r1)
|
||||
bl strtok
|
||||
li r30, 0
|
||||
li r31, -1
|
||||
b L_370
|
||||
L_304:
|
||||
stw r30, errno(r0)
|
||||
li r4, 0
|
||||
li r5, 0x10
|
||||
bl strtoull
|
||||
lwz r0, errno(r0)
|
||||
mr r28, r4
|
||||
mr r29, r3
|
||||
cmpwi r0, 0
|
||||
bne L_364
|
||||
and r0, r3, r31
|
||||
cmplwi r0, 1
|
||||
beq L_364
|
||||
bl _CNTCACHEIsTitleRemovable
|
||||
cmpwi r3, 1
|
||||
bne L_350
|
||||
mr r4, r28
|
||||
mr r3, r29
|
||||
bl ES_DeleteTitle
|
||||
b L_364
|
||||
L_350:
|
||||
cmpwi r3, 0
|
||||
bne L_364
|
||||
mr r4, r28
|
||||
mr r3, r29
|
||||
bl ES_DeleteTitleContent
|
||||
L_364:
|
||||
li r3, 0
|
||||
la r4, scCntCacheSpaceNl
|
||||
bl strtok
|
||||
L_370:
|
||||
cmpwi r3, 0
|
||||
bne L_304
|
||||
lwz r0, 0x24(r1)
|
||||
lwz r31, 0x1c(r1)
|
||||
lwz r30, 0x18(r1)
|
||||
lwz r29, 0x14(r1)
|
||||
lwz r28, 0x10(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x20
|
||||
blr
|
||||
void _CNTCACHEDeleteTitle() {
|
||||
char* token = strtok(NULL, scCntCacheSpaceNl);
|
||||
|
||||
while (token != NULL) {
|
||||
ESTitleId titleId;
|
||||
int removable;
|
||||
|
||||
errno = 0;
|
||||
titleId = strtoull(token, NULL, 16);
|
||||
if (errno == 0 && (u32)ES_TITLE_TYPE(titleId) != 1) {
|
||||
removable = _CNTCACHEIsTitleRemovable(titleId);
|
||||
if (removable == 1) {
|
||||
ES_DeleteTitle(titleId);
|
||||
} else if (removable == 0) {
|
||||
ES_DeleteTitleContent(titleId);
|
||||
}
|
||||
}
|
||||
token = strtok(NULL, scCntCacheSpaceNl);
|
||||
}
|
||||
}
|
||||
|
||||
asm int _CNTCACHEIsTitleRemovable(ESTitleId titleId) {
|
||||
|
||||
@@ -563,6 +563,17 @@ static void WPADiGetScSettings() {
|
||||
_scSetting = FALSE;
|
||||
}
|
||||
|
||||
static void __reconnect(BOOL exec) {
|
||||
DEBUGPrint("Reconnect Start!!\n");
|
||||
|
||||
BTA_DmSendHciReset();
|
||||
|
||||
OSCancelAlarm(&_managerAlarm);
|
||||
|
||||
WUDSetHidRecvCallback(NULL);
|
||||
WUDShutdown(exec);
|
||||
}
|
||||
|
||||
static void WPADiAfh() {
|
||||
BOOL enabled;
|
||||
u8* pWifiChannel;
|
||||
@@ -606,550 +617,6 @@ static void WPADiRumbleMotor(s32 chan, BOOL prevSuccess) {
|
||||
_rumbleCnt[chan] = _wpdcb[chan]->motorBusy ? _rumbleCnt[chan] + 1 : 0;
|
||||
}
|
||||
|
||||
static void __reconnect(BOOL exec) {
|
||||
DEBUGPrint("Reconnect Start!!\n");
|
||||
|
||||
BTA_DmSendHciReset();
|
||||
|
||||
OSCancelAlarm(&_managerAlarm);
|
||||
|
||||
WUDSetHidRecvCallback(NULL);
|
||||
WUDShutdown(exec);
|
||||
}
|
||||
#ifdef __MWERKS__
|
||||
char scWpadManageStrs[0x58] = "Reconnect Start!!\n\0\0\0\0\0\0"
|
||||
"Check the update of WiFi using channel\n\0"
|
||||
"WiFi uses channel = %d\n";
|
||||
extern void _savegpr_19();
|
||||
extern void _restgpr_19();
|
||||
static asm void WPADiManageHandler(OSAlarm* pAlarm, OSContext* pContext) {
|
||||
nofralloc
|
||||
stwu r1, -0x160(r1)
|
||||
mflr r0
|
||||
stw r0, 0x164(r1)
|
||||
addi r11, r1, 0x160
|
||||
bl _savegpr_19
|
||||
lis r28, scWpadVersionStr@ha
|
||||
addi r28, r28, scWpadVersionStr@l
|
||||
bl WUDGetStatus
|
||||
cmpwi r3, 0x3
|
||||
beq WPADiManageHandler_8AC8
|
||||
cmpwi r3, 0x2
|
||||
bne WPADiManageHandler_91D8
|
||||
lwz r0, _initialized(r0)
|
||||
cmpwi r0, 0x0
|
||||
bne WPADiManageHandler_91D8
|
||||
li r0, 0x1
|
||||
lis r3, WPADiConnCallback@ha
|
||||
stw r0, _initialized(r0)
|
||||
addi r3, r3, WPADiConnCallback@l
|
||||
bl WUDSetHidConnCallback
|
||||
lis r3, WPADiRecvCallback@ha
|
||||
addi r3, r3, WPADiRecvCallback@l
|
||||
bl WUDSetHidRecvCallback
|
||||
li r0, 0x32
|
||||
stw r0, _recCnt(r0)
|
||||
b WPADiManageHandler_91D8
|
||||
WPADiManageHandler_8AC8:
|
||||
lwz r4, _recCnt(r0)
|
||||
lwz r19, _recFlag(r0)
|
||||
cntlzw r3, r4
|
||||
subi r0, r4, 0x1
|
||||
extrwi r3, r3, 1, 26
|
||||
cmpwi r19, 0x0
|
||||
neg r3, r3
|
||||
andc r0, r0, r3
|
||||
stw r0, _recCnt(r0)
|
||||
blt WPADiManageHandler_8B28
|
||||
cmpwi r0, 0x0
|
||||
bne WPADiManageHandler_91D8
|
||||
addi r3, r28, 0xf0
|
||||
crclr 4*cr1+eq
|
||||
bl DEBUGPrint
|
||||
bl BTA_DmSendHciReset
|
||||
lis r3, _managerAlarm@ha
|
||||
addi r3, r3, _managerAlarm@l
|
||||
bl OSCancelAlarm
|
||||
li r3, 0x0
|
||||
bl WUDSetHidRecvCallback
|
||||
mr r3, r19
|
||||
bl WUDShutdown
|
||||
b WPADiManageHandler_91D8
|
||||
WPADiManageHandler_8B28:
|
||||
lis r24, _wpdcb@ha
|
||||
li r22, 0x0
|
||||
addi r24, r24, _wpdcb@l
|
||||
la r25, _extCnt
|
||||
la r23, _rumbleCnt
|
||||
li r29, 0x0
|
||||
li r30, 0x10
|
||||
li r31, 0x1
|
||||
WPADiManageHandler_8B48:
|
||||
lbz r0, 0x0(r25)
|
||||
li r21, 0x0
|
||||
cmplwi r0, 0x5
|
||||
bne WPADiManageHandler_8D20
|
||||
lwz r26, 0x0(r24)
|
||||
lwz r0, 0x8d8(r26)
|
||||
cmpwi r0, 0x0
|
||||
beq WPADiManageHandler_8D10
|
||||
bl OSDisableInterrupts
|
||||
mr r27, r3
|
||||
bl OSDisableInterrupts
|
||||
lbz r4, 0x5ec(r26)
|
||||
lbz r0, 0x5ed(r26)
|
||||
subf r0, r4, r0
|
||||
extsb. r19, r0
|
||||
bge WPADiManageHandler_8B94
|
||||
lwz r0, 0x5f4(r26)
|
||||
add r0, r19, r0
|
||||
extsb r19, r0
|
||||
WPADiManageHandler_8B94:
|
||||
bl OSRestoreInterrupts
|
||||
cmpwi r19, 0x0
|
||||
bne WPADiManageHandler_8BB0
|
||||
mr r3, r27
|
||||
bl OSRestoreInterrupts
|
||||
li r0, 0x0
|
||||
b WPADiManageHandler_8BDC
|
||||
WPADiManageHandler_8BB0:
|
||||
lbz r0, 0x5ec(r26)
|
||||
addi r3, r1, 0xc8
|
||||
lwz r4, 0x5f0(r26)
|
||||
li r5, 0x30
|
||||
extsb r0, r0
|
||||
mulli r0, r0, 0x30
|
||||
add r4, r4, r0
|
||||
bl memcpy
|
||||
mr r3, r27
|
||||
bl OSRestoreInterrupts
|
||||
li r0, 0x1
|
||||
WPADiManageHandler_8BDC:
|
||||
cmpwi r0, 0x0
|
||||
beq WPADiManageHandler_8D10
|
||||
lwz r0, 0xc8(r1)
|
||||
cmplwi r0, 0x12
|
||||
beq WPADiManageHandler_8BFC
|
||||
lwz r0, 0x840(r26)
|
||||
cmpwi r0, 0x0
|
||||
beq WPADiManageHandler_8D10
|
||||
WPADiManageHandler_8BFC:
|
||||
lwz r21, 0xc8(r1)
|
||||
mr r3, r22
|
||||
lwz r20, 0xcc(r1)
|
||||
addi r4, r1, 0xf8
|
||||
lwz r19, 0xd0(r1)
|
||||
lwz r12, 0xd4(r1)
|
||||
lwz r11, 0xd8(r1)
|
||||
lwz r10, 0xdc(r1)
|
||||
lwz r9, 0xe0(r1)
|
||||
lwz r8, 0xe4(r1)
|
||||
lwz r7, 0xe8(r1)
|
||||
lwz r6, 0xec(r1)
|
||||
lwz r5, 0xf0(r1)
|
||||
lwz r0, 0xf4(r1)
|
||||
stw r21, 0xf8(r1)
|
||||
stw r20, 0xfc(r1)
|
||||
stw r19, 0x100(r1)
|
||||
stw r12, 0x104(r1)
|
||||
stw r11, 0x108(r1)
|
||||
stw r10, 0x10c(r1)
|
||||
stw r9, 0x110(r1)
|
||||
stw r8, 0x114(r1)
|
||||
stw r7, 0x118(r1)
|
||||
stw r6, 0x11c(r1)
|
||||
stw r5, 0x120(r1)
|
||||
stw r0, 0x124(r1)
|
||||
bl WPADiSendData
|
||||
cmpwi r3, 0x0
|
||||
bne WPADiManageHandler_8D10
|
||||
bl OSDisableInterrupts
|
||||
mr r27, r3
|
||||
bl OSDisableInterrupts
|
||||
lbz r4, 0x5ec(r26)
|
||||
lbz r0, 0x5ed(r26)
|
||||
subf r0, r4, r0
|
||||
extsb. r19, r0
|
||||
bge WPADiManageHandler_8C9C
|
||||
lwz r0, 0x5f4(r26)
|
||||
add r0, r19, r0
|
||||
extsb r19, r0
|
||||
WPADiManageHandler_8C9C:
|
||||
bl OSRestoreInterrupts
|
||||
cmpwi r19, 0x0
|
||||
bne WPADiManageHandler_8CB4
|
||||
mr r3, r27
|
||||
bl OSRestoreInterrupts
|
||||
b WPADiManageHandler_8D08
|
||||
WPADiManageHandler_8CB4:
|
||||
lbz r0, 0x5ec(r26)
|
||||
li r4, 0x0
|
||||
lwz r3, 0x5f0(r26)
|
||||
li r5, 0x30
|
||||
extsb r0, r0
|
||||
mulli r0, r0, 0x30
|
||||
add r3, r3, r0
|
||||
bl memset
|
||||
lbz r0, 0x5ec(r26)
|
||||
mr r3, r27
|
||||
lwz r4, 0x5f4(r26)
|
||||
extsb r6, r0
|
||||
subi r4, r4, 0x1
|
||||
subf r5, r4, r6
|
||||
addi r0, r6, 0x1
|
||||
subf r4, r6, r4
|
||||
nor r4, r5, r4
|
||||
srawi r4, r4, 31
|
||||
andc r0, r0, r4
|
||||
stb r0, 0x5ec(r26)
|
||||
bl OSRestoreInterrupts
|
||||
WPADiManageHandler_8D08:
|
||||
li r21, 0x1
|
||||
b WPADiManageHandler_8D14
|
||||
WPADiManageHandler_8D10:
|
||||
li r21, 0x0
|
||||
WPADiManageHandler_8D14:
|
||||
cmpwi r21, 0x0
|
||||
beq WPADiManageHandler_8D20
|
||||
stb r29, 0x0(r25)
|
||||
WPADiManageHandler_8D20:
|
||||
cmpwi r21, 0x0
|
||||
bne WPADiManageHandler_8ED0
|
||||
lwz r27, 0x0(r24)
|
||||
lwz r0, 0x8d8(r27)
|
||||
cmpwi r0, 0x0
|
||||
beq WPADiManageHandler_8EC8
|
||||
bl OSDisableInterrupts
|
||||
mr r26, r3
|
||||
bl OSDisableInterrupts
|
||||
lbz r4, 0x160(r27)
|
||||
lbz r0, 0x161(r27)
|
||||
subf r0, r4, r0
|
||||
extsb. r19, r0
|
||||
bge WPADiManageHandler_8D64
|
||||
lwz r0, 0x168(r27)
|
||||
add r0, r19, r0
|
||||
extsb r19, r0
|
||||
WPADiManageHandler_8D64:
|
||||
bl OSRestoreInterrupts
|
||||
cmpwi r19, 0x0
|
||||
bne WPADiManageHandler_8D80
|
||||
mr r3, r26
|
||||
bl OSRestoreInterrupts
|
||||
li r0, 0x0
|
||||
b WPADiManageHandler_8DAC
|
||||
WPADiManageHandler_8D80:
|
||||
lbz r0, 0x160(r27)
|
||||
addi r3, r1, 0x68
|
||||
lwz r4, 0x164(r27)
|
||||
li r5, 0x30
|
||||
extsb r0, r0
|
||||
mulli r0, r0, 0x30
|
||||
add r4, r4, r0
|
||||
bl memcpy
|
||||
mr r3, r26
|
||||
bl OSRestoreInterrupts
|
||||
li r0, 0x1
|
||||
WPADiManageHandler_8DAC:
|
||||
cmpwi r0, 0x0
|
||||
beq WPADiManageHandler_8EC8
|
||||
lwz r19, 0x68(r1)
|
||||
mr r3, r22
|
||||
lwz r20, 0x6c(r1)
|
||||
addi r4, r1, 0x98
|
||||
lwz r26, 0x70(r1)
|
||||
lwz r12, 0x74(r1)
|
||||
lwz r11, 0x78(r1)
|
||||
lwz r10, 0x7c(r1)
|
||||
lwz r9, 0x80(r1)
|
||||
lwz r8, 0x84(r1)
|
||||
lwz r7, 0x88(r1)
|
||||
lwz r6, 0x8c(r1)
|
||||
lwz r5, 0x90(r1)
|
||||
lwz r0, 0x94(r1)
|
||||
stw r19, 0x98(r1)
|
||||
stw r20, 0x9c(r1)
|
||||
stw r26, 0xa0(r1)
|
||||
stw r12, 0xa4(r1)
|
||||
stw r11, 0xa8(r1)
|
||||
stw r10, 0xac(r1)
|
||||
stw r9, 0xb0(r1)
|
||||
stw r8, 0xb4(r1)
|
||||
stw r7, 0xb8(r1)
|
||||
stw r6, 0xbc(r1)
|
||||
stw r5, 0xc0(r1)
|
||||
stw r0, 0xc4(r1)
|
||||
bl WPADiSendData
|
||||
cmpwi r3, 0x0
|
||||
bne WPADiManageHandler_8EC8
|
||||
bl OSDisableInterrupts
|
||||
mr r26, r3
|
||||
bl OSDisableInterrupts
|
||||
lbz r4, 0x160(r27)
|
||||
lbz r0, 0x161(r27)
|
||||
subf r0, r4, r0
|
||||
extsb. r19, r0
|
||||
bge WPADiManageHandler_8E54
|
||||
lwz r0, 0x168(r27)
|
||||
add r0, r19, r0
|
||||
extsb r19, r0
|
||||
WPADiManageHandler_8E54:
|
||||
bl OSRestoreInterrupts
|
||||
cmpwi r19, 0x0
|
||||
bne WPADiManageHandler_8E6C
|
||||
mr r3, r26
|
||||
bl OSRestoreInterrupts
|
||||
b WPADiManageHandler_8EC0
|
||||
WPADiManageHandler_8E6C:
|
||||
lbz r0, 0x160(r27)
|
||||
li r4, 0x0
|
||||
lwz r3, 0x164(r27)
|
||||
li r5, 0x30
|
||||
extsb r0, r0
|
||||
mulli r0, r0, 0x30
|
||||
add r3, r3, r0
|
||||
bl memset
|
||||
lbz r0, 0x160(r27)
|
||||
mr r3, r26
|
||||
lwz r4, 0x168(r27)
|
||||
extsb r6, r0
|
||||
subi r4, r4, 0x1
|
||||
subf r5, r4, r6
|
||||
addi r0, r6, 0x1
|
||||
subf r4, r6, r4
|
||||
nor r4, r5, r4
|
||||
srawi r4, r4, 31
|
||||
andc r0, r0, r4
|
||||
stb r0, 0x160(r27)
|
||||
bl OSRestoreInterrupts
|
||||
WPADiManageHandler_8EC0:
|
||||
li r0, 0x1
|
||||
b WPADiManageHandler_8ECC
|
||||
WPADiManageHandler_8EC8:
|
||||
li r0, 0x0
|
||||
WPADiManageHandler_8ECC:
|
||||
or r21, r21, r0
|
||||
WPADiManageHandler_8ED0:
|
||||
lwz r20, 0x0(r24)
|
||||
lwz r0, 0x8bc(r20)
|
||||
cmpwi r0, -0x1
|
||||
beq WPADiManageHandler_8FD0
|
||||
cmpwi r21, 0x1
|
||||
beq WPADiManageHandler_8F18
|
||||
bl OSDisableInterrupts
|
||||
lbz r4, 0x160(r20)
|
||||
lbz r0, 0x161(r20)
|
||||
subf r0, r4, r0
|
||||
extsb. r19, r0
|
||||
bge WPADiManageHandler_8F0C
|
||||
lwz r0, 0x168(r20)
|
||||
add r0, r19, r0
|
||||
extsb r19, r0
|
||||
WPADiManageHandler_8F0C:
|
||||
bl OSRestoreInterrupts
|
||||
cmpwi r19, 0x0
|
||||
ble WPADiManageHandler_8F24
|
||||
WPADiManageHandler_8F18:
|
||||
lwz r3, 0x0(r24)
|
||||
stw r29, 0x8d0(r3)
|
||||
b WPADiManageHandler_8FAC
|
||||
WPADiManageHandler_8F24:
|
||||
lbz r0, 0x0(r23)
|
||||
cmplwi r0, 0x5
|
||||
bne WPADiManageHandler_8FAC
|
||||
sth r31, 0x22(r1)
|
||||
mr r3, r22
|
||||
lwz r5, 0x0(r24)
|
||||
addi r4, r1, 0x38
|
||||
stb r29, 0xc(r1)
|
||||
lwz r12, 0x10(r1)
|
||||
stw r29, 0x8d0(r5)
|
||||
lwz r21, 0xc(r1)
|
||||
lwz r11, 0x14(r1)
|
||||
lwz r10, 0x18(r1)
|
||||
lwz r9, 0x1c(r1)
|
||||
lwz r8, 0x20(r1)
|
||||
lwz r7, 0x24(r1)
|
||||
lwz r6, 0x28(r1)
|
||||
lwz r5, 0x2c(r1)
|
||||
lwz r0, 0x30(r1)
|
||||
stw r30, 0x8(r1)
|
||||
stw r29, 0x34(r1)
|
||||
stw r30, 0x38(r1)
|
||||
stw r21, 0x3c(r1)
|
||||
stw r12, 0x40(r1)
|
||||
stw r11, 0x44(r1)
|
||||
stw r10, 0x48(r1)
|
||||
stw r9, 0x4c(r1)
|
||||
stw r8, 0x50(r1)
|
||||
stw r7, 0x54(r1)
|
||||
stw r6, 0x58(r1)
|
||||
stw r5, 0x5c(r1)
|
||||
stw r0, 0x60(r1)
|
||||
stw r29, 0x64(r1)
|
||||
bl __SendData
|
||||
WPADiManageHandler_8FAC:
|
||||
lwz r3, 0x0(r24)
|
||||
lwz r0, 0x8d0(r3)
|
||||
cmpwi r0, 0x0
|
||||
beq WPADiManageHandler_8FC8
|
||||
lbz r3, 0x0(r23)
|
||||
addi r0, r3, 0x1
|
||||
b WPADiManageHandler_8FCC
|
||||
WPADiManageHandler_8FC8:
|
||||
li r0, 0x0
|
||||
WPADiManageHandler_8FCC:
|
||||
stb r0, 0x0(r23)
|
||||
WPADiManageHandler_8FD0:
|
||||
lbz r0, _checkCnt(r0)
|
||||
cmplwi r0, 0x5
|
||||
bne WPADiManageHandler_8FE4
|
||||
mr r3, r22
|
||||
bl WPADiCheckContInputs
|
||||
WPADiManageHandler_8FE4:
|
||||
lhz r0, _senseCnt(r0)
|
||||
cmplwi r0, 0xa
|
||||
bne WPADiManageHandler_8FF8
|
||||
mr r3, r22
|
||||
bl WPADiRadioSensitivity
|
||||
WPADiManageHandler_8FF8:
|
||||
lbz r3, 0x0(r25)
|
||||
cmplwi r3, 0x5
|
||||
addi r0, r3, 0x1
|
||||
bne WPADiManageHandler_900C
|
||||
mr r0, r3
|
||||
WPADiManageHandler_900C:
|
||||
addi r22, r22, 0x1
|
||||
stb r0, 0x0(r25)
|
||||
cmpwi r22, 0x4
|
||||
addi r25, r25, 0x1
|
||||
addi r24, r24, 0x4
|
||||
addi r23, r23, 0x1
|
||||
blt WPADiManageHandler_8B48
|
||||
lhz r0, _afhCnt(r0)
|
||||
cmplwi r0, 0xea60
|
||||
bne WPADiManageHandler_9090
|
||||
lis r21, 0x8000
|
||||
li r4, 0x1
|
||||
addi r3, r21, 0x31a2
|
||||
bl DCInvalidateRange
|
||||
addi r3, r28, 0x108
|
||||
crclr 4*cr1+eq
|
||||
bl DEBUGPrint
|
||||
lbz r3, _afhChannel(r0)
|
||||
lbz r0, 0x31a2(r21)
|
||||
extsb r3, r3
|
||||
cmpw r3, r0
|
||||
beq WPADiManageHandler_9090
|
||||
bl OSDisableInterrupts
|
||||
lbz r0, 0x31a2(r21)
|
||||
stb r0, _afhChannel(r0)
|
||||
bl OSRestoreInterrupts
|
||||
lbz r4, 0x31a2(r21)
|
||||
addi r3, r28, 0x130
|
||||
crclr 4*cr1+eq
|
||||
bl DEBUGPrint
|
||||
lbz r0, _afhChannel(r0)
|
||||
extsb r3, r0
|
||||
bl WUDSetDisableChannel
|
||||
WPADiManageHandler_9090:
|
||||
lhz r6, _senseCnt(r0)
|
||||
lis r3, 0x1
|
||||
subi r0, r3, 0x15a0
|
||||
lbz r9, _checkCnt(r0)
|
||||
subi r4, r6, 0xa
|
||||
subfic r3, r6, 0xa
|
||||
nor r3, r4, r3
|
||||
lhz r10, _afhCnt(r0)
|
||||
srawi r8, r3, 31
|
||||
addi r7, r6, 0x1
|
||||
clrlwi r0, r0, 16
|
||||
subi r4, r9, 0x5
|
||||
subfic r3, r9, 0x5
|
||||
andc r7, r7, r8
|
||||
nor r5, r4, r3
|
||||
subf r4, r0, r10
|
||||
subf r3, r10, r0
|
||||
lbz r0, _scFlush(r0)
|
||||
srawi r6, r5, 31
|
||||
addi r5, r9, 0x1
|
||||
nor r4, r4, r3
|
||||
addi r3, r10, 0x1
|
||||
srawi r4, r4, 31
|
||||
andc r5, r5, r6
|
||||
andc r3, r3, r4
|
||||
cmpwi r0, 0x0
|
||||
sth r7, _senseCnt(r0)
|
||||
stb r5, _checkCnt(r0)
|
||||
sth r3, _afhCnt(r0)
|
||||
beq WPADiManageHandler_9138
|
||||
bl SCCheckStatus
|
||||
cmpwi r3, 0x0
|
||||
bne WPADiManageHandler_9138
|
||||
lis r3, _scArray@ha
|
||||
addi r3, r3, _scArray@l
|
||||
bl SCSetBtDeviceInfoArray
|
||||
cmpwi r3, 0x1
|
||||
bne WPADiManageHandler_9138
|
||||
li r3, 0x0
|
||||
bl SCFlushAsync
|
||||
li r0, 0x0
|
||||
stb r0, _scFlush(r0)
|
||||
WPADiManageHandler_9138:
|
||||
lbz r0, _scSetting(r0)
|
||||
cmpwi r0, 0x0
|
||||
beq WPADiManageHandler_91D4
|
||||
bl SCCheckStatus
|
||||
cmpwi r3, 0x0
|
||||
bne WPADiManageHandler_91D4
|
||||
bl SCGetBtDpdSensibility
|
||||
clrlwi r0, r3, 24
|
||||
cmplwi r0, 0x1
|
||||
bge WPADiManageHandler_9164
|
||||
li r0, 0x1
|
||||
WPADiManageHandler_9164:
|
||||
cmplwi r0, 0x5
|
||||
ble WPADiManageHandler_9170
|
||||
li r0, 0x5
|
||||
WPADiManageHandler_9170:
|
||||
stb r0, _dpdSensitivity(r0)
|
||||
bl SCGetWpadSensorBarPosition
|
||||
clrlwi r3, r3, 24
|
||||
subi r0, r3, 0x1
|
||||
cntlzw r0, r0
|
||||
extrwi r0, r0, 8, 19
|
||||
stb r0, _sensorBarPos(r0)
|
||||
bl SCGetWpadMotorMode
|
||||
clrlwi r3, r3, 24
|
||||
subi r0, r3, 0x1
|
||||
cntlzw r0, r0
|
||||
srwi r0, r0, 5
|
||||
stw r0, _rumble(r0)
|
||||
bl SCGetWpadSpeakerVolume
|
||||
clrlwi. r0, r3, 24
|
||||
mr r4, r3
|
||||
bne WPADiManageHandler_91B8
|
||||
li r4, 0x0
|
||||
WPADiManageHandler_91B8:
|
||||
clrlwi r0, r3, 24
|
||||
cmplwi r0, 0x7f
|
||||
blt WPADiManageHandler_91C8
|
||||
li r4, 0x7f
|
||||
WPADiManageHandler_91C8:
|
||||
li r0, 0x0
|
||||
stb r4, _speakerVolume(r0)
|
||||
stb r0, _scSetting(r0)
|
||||
WPADiManageHandler_91D4:
|
||||
bl BTA_HhGetAclQueueInfo
|
||||
WPADiManageHandler_91D8:
|
||||
addi r11, r1, 0x160
|
||||
bl _restgpr_19
|
||||
lwz r0, 0x164(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x160
|
||||
blr
|
||||
}
|
||||
#else
|
||||
static void WPADiManageHandler(OSAlarm* pAlarm, OSContext* pContext) {
|
||||
s32 status = WPADGetStatus();
|
||||
s32 chan;
|
||||
@@ -1168,8 +635,10 @@ static void WPADiManageHandler(OSAlarm* pAlarm, OSContext* pContext) {
|
||||
return;
|
||||
}
|
||||
|
||||
_recCnt = _recCnt == 0 ? 0 : _recCnt - 1;
|
||||
|
||||
if (_recFlag >= 0) {
|
||||
if (--_recCnt <= 0) {
|
||||
if (_recCnt == 0) {
|
||||
__reconnect(_recFlag);
|
||||
}
|
||||
return;
|
||||
@@ -1216,9 +685,6 @@ static void WPADiManageHandler(OSAlarm* pAlarm, OSContext* pContext) {
|
||||
|
||||
BTA_HhGetAclQueueInfo();
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
static void WPADiManageHandler0(OSAlarm* pAlarm, OSContext* pContext) {
|
||||
OSSwitchFiberEx((u32)pAlarm, (u32)pContext, 0, 0, WPADiManageHandler, __WPADiManageHandlerStack + sizeof(__WPADiManageHandlerStack));
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ void CDBConvTypeStrToFullPath(char* fullPath, char* yearStr, char* monthStr, cha
|
||||
void CDBConvFileNameStrToFullPath(char* fullPath, char* yearStr, char* monthStr, char* dayStr, char* hourStr, char* minuteStr, char* codeStr,
|
||||
char* typeStr, char* fileStr, CDBLocation location, u64* wiiId);
|
||||
|
||||
CDBDate CDBConvDirStrToCDBDate(char* yearStr, char* monthStr, char* dayStr, char* hourStr, char* minuteStr, CDBLocation location, u64* wiiId);
|
||||
CDBDate CDBConvDirStrToCDBDate(char* yearStr, char* monthStr, char* dayStr, char* hourStr, char* minuteStr);
|
||||
|
||||
void CDBConvGCStrToGCValue(char* gcStr, u32* gcValue);
|
||||
void CDBConvGCValueToGCStr(u32 gcValue, char* gcStr);
|
||||
|
||||
@@ -13,12 +13,12 @@ void CDBClampCDBDate(CDBDate* cdbDate);
|
||||
|
||||
CDBDate CDBMakeCDBDate(int year, int month, int day, int hour, int min, int sec);
|
||||
|
||||
CDBDate CDBMakeCDBDateDayBegin(int year, int month, int day, int hour, int min, int sec);
|
||||
CDBDate CDBMakeCDBDateDayEnd(int year, int month, int day, int hour, int min, int sec);
|
||||
CDBDate CDBMakeCDBDateMonthBegin(int year, int month, int day, int hour, int min, int sec);
|
||||
CDBDate CDBMakeCDBDateMonthEnd(int year, int month, int day, int hour, int min, int sec);
|
||||
CDBDate CDBMakeCDBDateYearBegin(int year, int month, int day, int hour, int min, int sec);
|
||||
CDBDate CDBMakeCDBDateYearEnd(int year, int month, int day, int hour, int min, int sec);
|
||||
CDBDate CDBMakeCDBDateDayBegin(int year, int month, int day);
|
||||
CDBDate CDBMakeCDBDateDayEnd(int year, int month, int day);
|
||||
CDBDate CDBMakeCDBDateMonthBegin(int year, int month);
|
||||
CDBDate CDBMakeCDBDateMonthEnd(int year, int month);
|
||||
CDBDate CDBMakeCDBDateYearBegin(int year);
|
||||
CDBDate CDBMakeCDBDateYearEnd(int year);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -58,19 +58,21 @@ CDBDate CDBMakeCDBDate(int year, int month, int day, int hour, int min, int sec)
|
||||
return OSTicksToSeconds(OSCalendarTimeToTicks(&calendar));
|
||||
}
|
||||
|
||||
CDBDate CDBMakeCDBDateDayBegin(int year, int month, int day, int hour, int min, int sec) {
|
||||
CDBDate CDBMakeCDBDateDayBegin(int year, int month, int day) {
|
||||
return CDBMakeCDBDate(year, month, day, MIN_HOUR, MIN_MINUTE, MIN_SECOND);
|
||||
}
|
||||
|
||||
CDBDate CDBMakeCDBDateDayEnd(int year, int month, int day, int hour, int min, int sec) {
|
||||
CDBDate CDBMakeCDBDateDayEnd(int year, int month, int day) {
|
||||
return CDBMakeCDBDate(year, month, day, MAX_HOUR, MAX_MINUTE, MAX_SECOND);
|
||||
}
|
||||
|
||||
CDBDate CDBMakeCDBDateMonthBegin(int year, int month, int day, int hour, int min, int sec) {
|
||||
CDBDate CDBMakeCDBDateMonthBegin(int year, int month) {
|
||||
return CDBMakeCDBDate(year, month, MIN_DAY, MIN_HOUR, MIN_MINUTE, MIN_SECOND);
|
||||
}
|
||||
|
||||
CDBDate CDBMakeCDBDateMonthEnd(int year, int month, int day, int hour, int min, int sec) {
|
||||
CDBDate CDBMakeCDBDateMonthEnd(int year, int month) {
|
||||
int day;
|
||||
|
||||
switch (month) {
|
||||
case 1: {
|
||||
day = 28;
|
||||
@@ -101,11 +103,11 @@ CDBDate CDBMakeCDBDateMonthEnd(int year, int month, int day, int hour, int min,
|
||||
return CDBMakeCDBDate(year, month, day, MAX_HOUR, MAX_MINUTE, MAX_SECOND);
|
||||
}
|
||||
|
||||
CDBDate CDBMakeCDBDateYearBegin(int year, int month, int day, int hour, int min, int sec) {
|
||||
CDBDate CDBMakeCDBDateYearBegin(int year) {
|
||||
return CDBMakeCDBDate(year, MIN_MONTH - 1, MIN_DAY, MIN_HOUR, MIN_MINUTE, MIN_SECOND);
|
||||
}
|
||||
|
||||
CDBDate CDBMakeCDBDateYearEnd(int year, int month, int day, int hour, int min, int sec) {
|
||||
CDBDate CDBMakeCDBDateYearEnd(int year) {
|
||||
return CDBMakeCDBDate(year, MAX_MONTH - 1, MAX_DAY, MAX_HOUR, MAX_MINUTE, MAX_SECOND);
|
||||
}
|
||||
|
||||
@@ -231,7 +233,7 @@ void CDBConvFileNameStrToFullPath(char* fullPath, char* yearStr, char* monthStr,
|
||||
CDBFSConcatenatePath(fullPath, fileNameStr);
|
||||
}
|
||||
|
||||
CDBDate CDBConvDirStrToCDBDate(char* yearStr, char* monthStr, char* dayStr, char* hourStr, char* minuteStr, CDBLocation location, u64* wiiId) {
|
||||
CDBDate CDBConvDirStrToCDBDate(char* yearStr, char* monthStr, char* dayStr, char* hourStr, char* minuteStr) {
|
||||
return CDBMakeCDBDate(atoi(yearStr), atoi(monthStr), atoi(dayStr), atoi(hourStr), atoi(minuteStr), 0);
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,8 @@
|
||||
#include <revolution/nwc24.h>
|
||||
|
||||
#include <revolution/os.h>
|
||||
#include <revolution/sc.h>
|
||||
#include <revolution/ncd.h>
|
||||
#include <revolution/verdefs.h>
|
||||
|
||||
#define MANAGE_ERROR_CODE_BASE 109000
|
||||
@@ -290,166 +292,104 @@ NWC24Err NWC24GetSchedulerError(s32* numErrors, s32* errorCode) {
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef __MWERKS__
|
||||
extern void _savegpr_27();
|
||||
extern void _restgpr_27();
|
||||
extern void NCDiGetEnabledConfigList();
|
||||
extern NWC24Err AnalyzeScdErrors(s32* errorCode, u32 usage);
|
||||
extern void NWC24iMBoxCheck();
|
||||
extern void SCCheckStatus();
|
||||
extern void SCGetWCFlags();
|
||||
extern void SCGetEULA();
|
||||
extern void SCGetNetContentRestrictions();
|
||||
extern void SCGetParentalControl();
|
||||
extern NCDErr NCDiGetEnabledConfigList(u32* wiredList, u32* wirelessList, u32* aossList);
|
||||
extern NWC24Err NWC24iMBoxCheck(NWC24MBoxType type, u32 size);
|
||||
NWC24Err AnalyzeScdErrors(s32* errorCode, u32 usage);
|
||||
|
||||
asm NWC24Err NWC24Check(register u32 usage) {
|
||||
nofralloc
|
||||
NWC24Err NWC24Check(u32 usage) {
|
||||
NWC24Err result;
|
||||
NWC24Err err;
|
||||
SCParentalControlsInfo pcInfo;
|
||||
u32 wiredList;
|
||||
u32 wirelessList;
|
||||
u32 aossList;
|
||||
NWC24IdCreationStage stage;
|
||||
s32 errorCode;
|
||||
u32 status;
|
||||
u32 wcFlags;
|
||||
BOOL eula;
|
||||
u32 restrictions;
|
||||
|
||||
stwu r1, -0x80(r1)
|
||||
mflr r0
|
||||
stw r0, 0x84(r1)
|
||||
addi r11, r1, 0x80
|
||||
bl _savegpr_27
|
||||
lwz r0, Opened(r0)
|
||||
li r4, 0
|
||||
stw r4, GlobalErrorCode(r0)
|
||||
mr r27, r3
|
||||
cmpwi r0, 1
|
||||
beq _NWC24Check_open
|
||||
li r31, -9
|
||||
b _NWC24Check_return
|
||||
GlobalErrorCode = 0;
|
||||
|
||||
_NWC24Check_open:
|
||||
li r31, -0x27
|
||||
if (Opened != NWC24_LIB_OPENED) {
|
||||
result = NWC24_ERR_LIB_NOT_OPENED;
|
||||
} else {
|
||||
result = NWC24_ERR_DISABLED;
|
||||
|
||||
_NWC24Check_status:
|
||||
bl SCCheckStatus
|
||||
cmplwi r3, 1
|
||||
beq _NWC24Check_status
|
||||
cmplwi r3, 2
|
||||
bne _NWC24Check_status_ok
|
||||
lis r3, -2
|
||||
addi r0, r3, 0x55c8
|
||||
stw r0, GlobalErrorCode(r0)
|
||||
b _NWC24Check_return
|
||||
do {
|
||||
do {
|
||||
status = SCCheckStatus();
|
||||
} while (status == SC_STATUS_BUSY);
|
||||
|
||||
_NWC24Check_status_ok:
|
||||
bl SCGetWCFlags
|
||||
clrlwi r29, r3, 0x1f
|
||||
bl SCGetEULA
|
||||
mr r30, r3
|
||||
bl SCGetNetContentRestrictions
|
||||
rlwinm r28, r3, 0, 0x1e, 0x1e
|
||||
addi r3, r1, 0x1c
|
||||
bl SCGetParentalControl
|
||||
cmpwi r29, 0
|
||||
bne _NWC24Check_eula
|
||||
lis r3, -2
|
||||
addi r0, r3, 0x55ad
|
||||
stw r0, GlobalErrorCode(r0)
|
||||
b _NWC24Check_return
|
||||
if (status == SC_STATUS_FATAL) {
|
||||
GlobalErrorCode = -109112;
|
||||
break;
|
||||
}
|
||||
|
||||
_NWC24Check_eula:
|
||||
cmpwi r30, 0
|
||||
bne _NWC24Check_restrictions
|
||||
lis r3, -2
|
||||
addi r0, r3, 0x55cd
|
||||
stw r0, GlobalErrorCode(r0)
|
||||
b _NWC24Check_return
|
||||
wcFlags = SCGetWCFlags() & SC_WC_FLAGS_ENABLED;
|
||||
eula = SCGetEULA();
|
||||
restrictions =
|
||||
SCGetNetContentRestrictions() & SC_NET_RESTRICTIONS_MSG_BOARD;
|
||||
SCGetParentalControl(&pcInfo);
|
||||
|
||||
_NWC24Check_restrictions:
|
||||
clrlwi. r30, r27, 0x1f
|
||||
beq _NWC24Check_config
|
||||
lbz r0, 0x1c(r1)
|
||||
rlwinm. r0, r0, 0, 0x18, 0x18
|
||||
beq _NWC24Check_config
|
||||
cmpwi r28, 0
|
||||
beq _NWC24Check_config
|
||||
lis r3, -2
|
||||
addi r0, r3, 0x55cd
|
||||
stw r0, GlobalErrorCode(r0)
|
||||
b _NWC24Check_return
|
||||
if (!wcFlags) {
|
||||
GlobalErrorCode = -109139;
|
||||
break;
|
||||
}
|
||||
|
||||
_NWC24Check_config:
|
||||
addi r3, r1, 0x18
|
||||
addi r4, r1, 0x14
|
||||
addi r5, r1, 0x10
|
||||
li r31, -0x1f
|
||||
bl NCDiGetEnabledConfigList
|
||||
cmpwi r3, 0
|
||||
bge _NWC24Check_config_ok
|
||||
lis r3, -2
|
||||
addi r0, r3, 0x55b3
|
||||
stw r0, GlobalErrorCode(r0)
|
||||
b _NWC24Check_return
|
||||
if (!eula) {
|
||||
GlobalErrorCode = -109107;
|
||||
break;
|
||||
}
|
||||
|
||||
_NWC24Check_config_ok:
|
||||
lwz r0, 0x18(r1)
|
||||
cmpwi r0, 0
|
||||
bne _NWC24Check_id
|
||||
lwz r0, 0x14(r1)
|
||||
cmpwi r0, 0
|
||||
bne _NWC24Check_id
|
||||
lwz r0, 0x10(r1)
|
||||
cmpwi r0, 0
|
||||
bne _NWC24Check_id
|
||||
lis r3, -1
|
||||
addi r0, r3, 0x3b85
|
||||
stw r0, GlobalErrorCode(r0)
|
||||
b _NWC24Check_return
|
||||
if ((usage & 1) && (pcInfo.enable & SC_PARENTAL_FLAG_ENABLED) &&
|
||||
restrictions) {
|
||||
GlobalErrorCode = -109107;
|
||||
break;
|
||||
}
|
||||
|
||||
_NWC24Check_id:
|
||||
cmpwi r30, 0
|
||||
beq _NWC24Check_scheduler
|
||||
addi r3, r1, 0xc
|
||||
bl NWC24GetIdCreationStage
|
||||
lwz r0, 0xc(r1)
|
||||
cmpwi r0, 2
|
||||
beq _NWC24Check_scheduler
|
||||
lis r3, -2
|
||||
addi r0, r3, 0x55a8
|
||||
stw r0, GlobalErrorCode(r0)
|
||||
b _NWC24Check_return
|
||||
result = NWC24_ERR_NETWORK;
|
||||
if (NCDiGetEnabledConfigList(&wiredList, &wirelessList,
|
||||
&aossList) < 0) {
|
||||
GlobalErrorCode = -109133;
|
||||
break;
|
||||
}
|
||||
|
||||
_NWC24Check_scheduler:
|
||||
li r0, 0
|
||||
mr r4, r27
|
||||
stw r0, 8(r1)
|
||||
addi r3, r1, 8
|
||||
bl AnalyzeScdErrors
|
||||
cmpwi r3, 0
|
||||
bge _NWC24Check_mbox
|
||||
lwz r0, 8(r1)
|
||||
mr r31, r3
|
||||
stw r0, GlobalErrorCode(r0)
|
||||
b _NWC24Check_return
|
||||
if (wiredList == 0 && wirelessList == 0 && aossList == 0) {
|
||||
GlobalErrorCode = -50299;
|
||||
break;
|
||||
}
|
||||
|
||||
_NWC24Check_mbox:
|
||||
li r3, 0
|
||||
li r4, 0
|
||||
bl NWC24iMBoxCheck
|
||||
cmpwi r3, -6
|
||||
mr r31, r3
|
||||
bne _NWC24Check_mbox_done
|
||||
lis r4, -2
|
||||
addi r0, r4, 0x55ce
|
||||
stw r0, GlobalErrorCode(r0)
|
||||
if (usage & 1) {
|
||||
NWC24GetIdCreationStage(&stage);
|
||||
if (stage != NWC24_IDCS_REGISTERED) {
|
||||
GlobalErrorCode = -109144;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
_NWC24Check_mbox_done:
|
||||
cmpwi r3, -6
|
||||
beq _NWC24Check_return
|
||||
li r31, 0
|
||||
errorCode = 0;
|
||||
err = AnalyzeScdErrors(&errorCode, usage);
|
||||
if (err < 0) {
|
||||
result = err;
|
||||
GlobalErrorCode = errorCode;
|
||||
break;
|
||||
}
|
||||
|
||||
_NWC24Check_return:
|
||||
addi r11, r1, 0x80
|
||||
mr r3, r31
|
||||
bl _restgpr_27
|
||||
lwz r0, 0x84(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x80
|
||||
blr
|
||||
result = NWC24iMBoxCheck(NWC24_MBOX_TYPE_SEND, 0);
|
||||
if (result == NWC24_ERR_FULL) {
|
||||
GlobalErrorCode = -109106;
|
||||
}
|
||||
if (result != NWC24_ERR_FULL) {
|
||||
result = NWC24_OK;
|
||||
}
|
||||
} while (0);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
s32 NWC24GetErrorCode() {
|
||||
return GlobalErrorCode;
|
||||
|
||||
@@ -8,74 +8,35 @@ extern void __shr2u(void);
|
||||
extern void __shl2i(void);
|
||||
|
||||
static NWC24UserId getUnScrambleId(NWC24UserId id);
|
||||
asm NWC24Err NWC24CheckUserId(register NWC24UserId id) {
|
||||
stwu r1,-0x30(r1)
|
||||
mfspr r0,LR
|
||||
stw r0,0x34(r1)
|
||||
addi r11,r1,0x30
|
||||
bl _savegpr_27
|
||||
or r28,r3,r3
|
||||
or r27,r4,r4
|
||||
addi r3,r1,0x8
|
||||
bl NWC24GetMyUserId
|
||||
lwz r3,0x8(r1)
|
||||
lwz r4,0xc(r1)
|
||||
xor r0,r3,r28
|
||||
xor r5,r4,r27
|
||||
or. r0,r5,r0
|
||||
bne NWC24CheckUserId_not_same
|
||||
li r3,-0x23
|
||||
b NWC24CheckUserId_return
|
||||
NWC24CheckUserId_not_same:
|
||||
bl getUnScrambleId
|
||||
or r4,r27,r27
|
||||
rlwinm r27,r3,0x11,0x1d,0x1f
|
||||
or r3,r28,r28
|
||||
bl getUnScrambleId
|
||||
or r30,r4,r4
|
||||
or r31,r3,r3
|
||||
rlwinm r28,r3,0x11,0x1d,0x1f
|
||||
li r29,0
|
||||
NWC24CheckUserId_crc_loop:
|
||||
addi r0,r29,1
|
||||
or r3,r31,r31
|
||||
or r4,r30,r30
|
||||
subfic r5,r0,0x35
|
||||
bl __shr2u
|
||||
rlwinm. r0,r4,0,0x1f,0x1f
|
||||
beq NWC24CheckUserId_crc_next
|
||||
subfic r5,r29,0x2a
|
||||
li r4,0x635
|
||||
li r3,0
|
||||
bl __shl2i
|
||||
xor r30,r30,r4
|
||||
xor r31,r31,r3
|
||||
NWC24CheckUserId_crc_next:
|
||||
addi r29,r29,1
|
||||
cmpwi r29,0x2b
|
||||
blt NWC24CheckUserId_crc_loop
|
||||
or. r0,r30,r31
|
||||
beq NWC24CheckUserId_crc_ok
|
||||
li r3,-0x25
|
||||
b NWC24CheckUserId_return
|
||||
NWC24CheckUserId_crc_ok:
|
||||
cmpwi r27,0
|
||||
bne NWC24CheckUserId_return_ok
|
||||
cmpwi r28,0
|
||||
beq NWC24CheckUserId_return_ok
|
||||
li r3,-0x7
|
||||
b NWC24CheckUserId_return
|
||||
NWC24CheckUserId_return_ok:
|
||||
li r3,0
|
||||
NWC24CheckUserId_return:
|
||||
addi r11,r1,0x30
|
||||
bl _restgpr_27
|
||||
lwz r0,0x34(r1)
|
||||
mtspr LR,r0
|
||||
addi r1,r1,0x30
|
||||
blr
|
||||
NWC24Err NWC24CheckUserId(NWC24UserId id) {
|
||||
NWC24UserId myId;
|
||||
u64 value;
|
||||
int i;
|
||||
u32 area;
|
||||
u32 myArea;
|
||||
|
||||
NWC24GetMyUserId(&myId);
|
||||
if (myId == id) {
|
||||
return NWC24_ERR_ID_GENERATED;
|
||||
}
|
||||
myArea = (getUnScrambleId(myId) >> 47) & 7;
|
||||
value = getUnScrambleId(id);
|
||||
area = (value >> 47) & 7;
|
||||
for (i = 0; i < 0x2B; i++) {
|
||||
if ((value >> (0x35 - (i + 1))) & 1) {
|
||||
value ^= (u64)0x635 << (0x2A - i);
|
||||
}
|
||||
}
|
||||
if (value != 0) {
|
||||
return NWC24_ERR_ID_CRC;
|
||||
}
|
||||
if (myArea == 0 && area != 0) {
|
||||
return NWC24_ERR_PROTECTED;
|
||||
}
|
||||
return NWC24_OK;
|
||||
}
|
||||
|
||||
|
||||
NWC24Err NWC24iCheckUserIdCRC(NWC24UserId id) {
|
||||
u64 value = getUnScrambleId(id);
|
||||
int i;
|
||||
|
||||
@@ -414,503 +414,27 @@ s32 VFi_NandFlushNANDFromHandleIdx(s32 i_handleIdx, BOOL i_setLastDeviceError) {
|
||||
return NAND_RESULT_OK;
|
||||
}
|
||||
|
||||
#ifdef __MWERKS__
|
||||
extern void _savegpr_23();
|
||||
extern void _restgpr_23();
|
||||
static asm s32 _MountPrfFile(register PDM_DISK* p_disk, register char* i_fullpath_p) {
|
||||
nofralloc
|
||||
|
||||
clrlwi r11, r1, 26
|
||||
mr r12, r1
|
||||
subfic r11, r11, -0xc0
|
||||
stwux r1, r1, r11
|
||||
mflr r0
|
||||
mr r11, r12
|
||||
stw r0, 0x4(r12)
|
||||
bl _savegpr_23
|
||||
mr r26, r3
|
||||
mr r27, r4
|
||||
bl VFSysPDMDisk2DriveP
|
||||
mr r23, r3
|
||||
mr r3, r26
|
||||
bl dCommon_getHandleIdxFromDisk
|
||||
cmpwi r23, 0x0
|
||||
mr r31, r3
|
||||
bne _MountPrfFile_L_814D7C0C
|
||||
li r3, -0x14
|
||||
b _MountPrfFile_L_814D824C
|
||||
_MountPrfFile_L_814D7C0C:
|
||||
cmplwi r3, 0x1a
|
||||
lwz r28, 0x0(r23)
|
||||
bge _MountPrfFile_L_814D7CD8
|
||||
lis r4, l_nandFunc@ha
|
||||
slwi r0, r3, 4
|
||||
addi r4, r4, l_nandFunc@l
|
||||
add r3, r4, r0
|
||||
lwz r12, 0x4(r3)
|
||||
cmpwi r12, 0x0
|
||||
beq _MountPrfFile_L_814D7C50
|
||||
mr r3, r27
|
||||
mr r4, r28
|
||||
li r5, 0x1
|
||||
mtctr r12
|
||||
bctrl
|
||||
mr r29, r3
|
||||
b _MountPrfFile_L_814D7DF0
|
||||
_MountPrfFile_L_814D7C50:
|
||||
lis r3, 0x1062
|
||||
lwz r30, VF_nand_retry_max(r0)
|
||||
addi r25, r3, 0x4dd3
|
||||
li r29, 0x0
|
||||
lis r24, 0x8000
|
||||
li r23, 0x0
|
||||
b _MountPrfFile_L_814D7CC8
|
||||
_MountPrfFile_L_814D7C6C:
|
||||
mr r3, r27
|
||||
mr r4, r28
|
||||
li r5, 0x1
|
||||
bl NANDOpen
|
||||
cmpwi r3, -0x3
|
||||
mr r29, r3
|
||||
beq _MountPrfFile_L_814D7C94
|
||||
cmpwi r3, -0x2
|
||||
beq _MountPrfFile_L_814D7C94
|
||||
b _MountPrfFile_L_814D7DF0
|
||||
_MountPrfFile_L_814D7C94:
|
||||
lwz r0, 0xf8(r24)
|
||||
lwz r6, VF_nand_sleep_msec(r0)
|
||||
srwi r0, r0, 2
|
||||
mulhwu r3, r25, r0
|
||||
srawi r0, r6, 31
|
||||
mullw r4, r23, r6
|
||||
srwi r5, r3, 6
|
||||
mulhwu r3, r5, r6
|
||||
mullw r0, r5, r0
|
||||
add r3, r3, r4
|
||||
mullw r4, r5, r6
|
||||
add r3, r3, r0
|
||||
bl OSSleepTicks
|
||||
_MountPrfFile_L_814D7CC8:
|
||||
cmpwi r30, 0x0
|
||||
subi r30, r30, 0x1
|
||||
bgt _MountPrfFile_L_814D7C6C
|
||||
b _MountPrfFile_L_814D7DF0
|
||||
_MountPrfFile_L_814D7CD8:
|
||||
addis r0, r3, 0x1
|
||||
cmplwi r0, 0xfff6
|
||||
bne _MountPrfFile_L_814D7D6C
|
||||
lis r3, 0x1062
|
||||
lwz r30, VF_nand_retry_max(r0)
|
||||
addi r25, r3, 0x4dd3
|
||||
li r29, 0x0
|
||||
lis r24, 0x8000
|
||||
li r23, 0x0
|
||||
b _MountPrfFile_L_814D7D5C
|
||||
_MountPrfFile_L_814D7D00:
|
||||
mr r3, r27
|
||||
mr r4, r28
|
||||
li r5, 0x1
|
||||
bl NANDOpen
|
||||
cmpwi r3, -0x3
|
||||
mr r29, r3
|
||||
beq _MountPrfFile_L_814D7D28
|
||||
cmpwi r3, -0x2
|
||||
beq _MountPrfFile_L_814D7D28
|
||||
b _MountPrfFile_L_814D7DF0
|
||||
_MountPrfFile_L_814D7D28:
|
||||
lwz r0, 0xf8(r24)
|
||||
lwz r6, VF_nand_sleep_msec(r0)
|
||||
srwi r0, r0, 2
|
||||
mulhwu r3, r25, r0
|
||||
srawi r0, r6, 31
|
||||
mullw r4, r23, r6
|
||||
srwi r5, r3, 6
|
||||
mulhwu r3, r5, r6
|
||||
mullw r0, r5, r0
|
||||
add r3, r3, r4
|
||||
mullw r4, r5, r6
|
||||
add r3, r3, r0
|
||||
bl OSSleepTicks
|
||||
_MountPrfFile_L_814D7D5C:
|
||||
cmpwi r30, 0x0
|
||||
subi r30, r30, 0x1
|
||||
bgt _MountPrfFile_L_814D7D00
|
||||
b _MountPrfFile_L_814D7DF0
|
||||
_MountPrfFile_L_814D7D6C:
|
||||
lis r3, 0x1062
|
||||
lwz r30, VF_nand_retry_max(r0)
|
||||
addi r23, r3, 0x4dd3
|
||||
li r29, 0x0
|
||||
lis r25, 0x8000
|
||||
li r24, 0x0
|
||||
b _MountPrfFile_L_814D7DE4
|
||||
_MountPrfFile_L_814D7D88:
|
||||
mr r3, r27
|
||||
mr r4, r28
|
||||
li r5, 0x1
|
||||
bl NANDPrivateOpen
|
||||
cmpwi r3, -0x3
|
||||
mr r29, r3
|
||||
beq _MountPrfFile_L_814D7DB0
|
||||
cmpwi r3, -0x2
|
||||
beq _MountPrfFile_L_814D7DB0
|
||||
b _MountPrfFile_L_814D7DF0
|
||||
_MountPrfFile_L_814D7DB0:
|
||||
lwz r0, 0xf8(r25)
|
||||
lwz r6, VF_nand_sleep_msec(r0)
|
||||
srwi r0, r0, 2
|
||||
mulhwu r3, r23, r0
|
||||
srawi r0, r6, 31
|
||||
mullw r4, r24, r6
|
||||
srwi r5, r3, 6
|
||||
mulhwu r3, r5, r6
|
||||
mullw r0, r5, r0
|
||||
add r3, r3, r4
|
||||
mullw r4, r5, r6
|
||||
add r3, r3, r0
|
||||
bl OSSleepTicks
|
||||
_MountPrfFile_L_814D7DE4:
|
||||
cmpwi r30, 0x0
|
||||
subi r30, r30, 0x1
|
||||
bgt _MountPrfFile_L_814D7D88
|
||||
_MountPrfFile_L_814D7DF0:
|
||||
cmpwi r29, 0x0
|
||||
bne _MountPrfFile_L_814D8038
|
||||
addi r3, r1, 0x40
|
||||
li r4, 0x0
|
||||
li r5, 0x20
|
||||
bl VFipf_memset
|
||||
mr r3, r28
|
||||
addi r4, r1, 0x40
|
||||
li r5, 0x20
|
||||
bl A32_NANDRead
|
||||
cmpwi r3, 0x0
|
||||
mr r30, r3
|
||||
bge _MountPrfFile_L_814D7EAC
|
||||
lis r3, 0x1062
|
||||
lwz r29, VF_nand_retry_max(r0)
|
||||
addi r27, r3, 0x4dd3
|
||||
lis r25, 0x8000
|
||||
li r24, 0x0
|
||||
b _MountPrfFile_L_814D7E8C
|
||||
_MountPrfFile_L_814D7E3C:
|
||||
mr r3, r28
|
||||
bl NANDClose
|
||||
cmpwi r3, -0x3
|
||||
beq _MountPrfFile_L_814D7E58
|
||||
cmpwi r3, -0x2
|
||||
beq _MountPrfFile_L_814D7E58
|
||||
b _MountPrfFile_L_814D7E98
|
||||
_MountPrfFile_L_814D7E58:
|
||||
lwz r0, 0xf8(r25)
|
||||
lwz r6, VF_nand_sleep_msec(r0)
|
||||
srwi r0, r0, 2
|
||||
mulhwu r3, r27, r0
|
||||
srawi r0, r6, 31
|
||||
mullw r4, r24, r6
|
||||
srwi r5, r3, 6
|
||||
mulhwu r3, r5, r6
|
||||
mullw r0, r5, r0
|
||||
add r3, r3, r4
|
||||
mullw r4, r5, r6
|
||||
add r3, r3, r0
|
||||
bl OSSleepTicks
|
||||
_MountPrfFile_L_814D7E8C:
|
||||
cmpwi r29, 0x0
|
||||
subi r29, r29, 0x1
|
||||
bgt _MountPrfFile_L_814D7E3C
|
||||
_MountPrfFile_L_814D7E98:
|
||||
mr r3, r26
|
||||
mr r4, r30
|
||||
bl dCommon_setLastDeviceErrorToDisk
|
||||
mr r3, r30
|
||||
b _MountPrfFile_L_814D824C
|
||||
_MountPrfFile_L_814D7EAC:
|
||||
addi r3, r1, 0x40
|
||||
bl dCommon_PrintSignature
|
||||
addi r3, r1, 0x40
|
||||
bl dCommon_IsPrfFile
|
||||
cmpwi r3, 0x0
|
||||
bne _MountPrfFile_L_814D7F40
|
||||
lis r3, 0x1062
|
||||
lwz r23, VF_nand_retry_max(r0)
|
||||
addi r26, r3, 0x4dd3
|
||||
lis r25, 0x8000
|
||||
li r24, 0x0
|
||||
b _MountPrfFile_L_814D7F2C
|
||||
_MountPrfFile_L_814D7EDC:
|
||||
mr r3, r28
|
||||
bl NANDClose
|
||||
cmpwi r3, -0x3
|
||||
beq _MountPrfFile_L_814D7EF8
|
||||
cmpwi r3, -0x2
|
||||
beq _MountPrfFile_L_814D7EF8
|
||||
b _MountPrfFile_L_814D7F38
|
||||
_MountPrfFile_L_814D7EF8:
|
||||
lwz r0, 0xf8(r25)
|
||||
lwz r6, VF_nand_sleep_msec(r0)
|
||||
srwi r0, r0, 2
|
||||
mulhwu r3, r26, r0
|
||||
srawi r0, r6, 31
|
||||
mullw r4, r24, r6
|
||||
srwi r5, r3, 6
|
||||
mulhwu r3, r5, r6
|
||||
mullw r0, r5, r0
|
||||
add r3, r3, r4
|
||||
mullw r4, r5, r6
|
||||
add r3, r3, r0
|
||||
bl OSSleepTicks
|
||||
_MountPrfFile_L_814D7F2C:
|
||||
cmpwi r23, 0x0
|
||||
subi r23, r23, 0x1
|
||||
bgt _MountPrfFile_L_814D7EDC
|
||||
_MountPrfFile_L_814D7F38:
|
||||
li r3, -0x1
|
||||
b _MountPrfFile_L_814D824C
|
||||
_MountPrfFile_L_814D7F40:
|
||||
lbz r0, 0x49(r1)
|
||||
mr r3, r26
|
||||
lbz r6, 0x4a(r1)
|
||||
lbz r5, 0x4b(r1)
|
||||
slwi r0, r0, 16
|
||||
lbz r4, 0x48(r1)
|
||||
rlwimi r5, r6, 8, 16, 23
|
||||
rlwimi r0, r4, 24, 0, 7
|
||||
or r4, r5, r0
|
||||
bl dCommon_setFileSizeToDisk
|
||||
mr r3, r26
|
||||
bl dCommon_getFileSizeFromDisk
|
||||
subi r0, r3, 0x1f
|
||||
li r3, 0x0
|
||||
srwi r4, r0, 9
|
||||
li r5, 0x1
|
||||
li r6, 0x200
|
||||
bl dCommon_GetNiceFatType
|
||||
mr r23, r3
|
||||
mr r3, r26
|
||||
mr r4, r23
|
||||
bl dCommon_setFatTypeToDisk
|
||||
mr r3, r23
|
||||
bl dCommon_GetReservedSecFromFatType
|
||||
mr r4, r3
|
||||
mr r3, r26
|
||||
bl dCommon_setResvSecNumToDisk
|
||||
mr r3, r23
|
||||
bl dCommon_GetRootEntNumFromFatType
|
||||
mr r4, r3
|
||||
mr r3, r26
|
||||
bl dCommon_setRootEntNumToDisk
|
||||
lis r3, 0x1062
|
||||
lwz r29, VF_nand_retry_max(r0)
|
||||
addi r30, r3, 0x4dd3
|
||||
lis r25, 0x8000
|
||||
li r24, 0x0
|
||||
b _MountPrfFile_L_814D8028
|
||||
_MountPrfFile_L_814D7FD8:
|
||||
mr r3, r28
|
||||
bl NANDClose
|
||||
cmpwi r3, -0x3
|
||||
beq _MountPrfFile_L_814D7FF4
|
||||
cmpwi r3, -0x2
|
||||
beq _MountPrfFile_L_814D7FF4
|
||||
b _MountPrfFile_L_814D804C
|
||||
_MountPrfFile_L_814D7FF4:
|
||||
lwz r0, 0xf8(r25)
|
||||
lwz r6, VF_nand_sleep_msec(r0)
|
||||
srwi r0, r0, 2
|
||||
mulhwu r3, r30, r0
|
||||
srawi r0, r6, 31
|
||||
mullw r4, r24, r6
|
||||
srwi r5, r3, 6
|
||||
mulhwu r3, r5, r6
|
||||
mullw r0, r5, r0
|
||||
add r3, r3, r4
|
||||
mullw r4, r5, r6
|
||||
add r3, r3, r0
|
||||
bl OSSleepTicks
|
||||
_MountPrfFile_L_814D8028:
|
||||
cmpwi r29, 0x0
|
||||
subi r29, r29, 0x1
|
||||
bgt _MountPrfFile_L_814D7FD8
|
||||
b _MountPrfFile_L_814D804C
|
||||
_MountPrfFile_L_814D8038:
|
||||
mr r3, r26
|
||||
mr r4, r29
|
||||
bl dCommon_setLastDeviceErrorToDisk
|
||||
mr r3, r29
|
||||
b _MountPrfFile_L_814D824C
|
||||
_MountPrfFile_L_814D804C:
|
||||
cmplwi r31, 0x1a
|
||||
bge _MountPrfFile_L_814D8114
|
||||
lis r3, l_nandFunc@ha
|
||||
slwi r0, r31, 4
|
||||
addi r3, r3, l_nandFunc@l
|
||||
add r3, r3, r0
|
||||
lwz r12, 0x4(r3)
|
||||
cmpwi r12, 0x0
|
||||
beq _MountPrfFile_L_814D808C
|
||||
mr r3, r27
|
||||
mr r4, r28
|
||||
li r5, 0x3
|
||||
mtctr r12
|
||||
bctrl
|
||||
mr r30, r3
|
||||
b _MountPrfFile_L_814D822C
|
||||
_MountPrfFile_L_814D808C:
|
||||
lis r3, 0x1062
|
||||
lwz r29, VF_nand_retry_max(r0)
|
||||
addi r31, r3, 0x4dd3
|
||||
li r30, 0x0
|
||||
lis r25, 0x8000
|
||||
li r24, 0x0
|
||||
b _MountPrfFile_L_814D8104
|
||||
_MountPrfFile_L_814D80A8:
|
||||
mr r3, r27
|
||||
mr r4, r28
|
||||
li r5, 0x3
|
||||
bl NANDOpen
|
||||
cmpwi r3, -0x3
|
||||
mr r30, r3
|
||||
beq _MountPrfFile_L_814D80D0
|
||||
cmpwi r3, -0x2
|
||||
beq _MountPrfFile_L_814D80D0
|
||||
b _MountPrfFile_L_814D822C
|
||||
_MountPrfFile_L_814D80D0:
|
||||
lwz r0, 0xf8(r25)
|
||||
lwz r6, VF_nand_sleep_msec(r0)
|
||||
srwi r0, r0, 2
|
||||
mulhwu r3, r31, r0
|
||||
srawi r0, r6, 31
|
||||
mullw r4, r24, r6
|
||||
srwi r5, r3, 6
|
||||
mulhwu r3, r5, r6
|
||||
mullw r0, r5, r0
|
||||
add r3, r3, r4
|
||||
mullw r4, r5, r6
|
||||
add r3, r3, r0
|
||||
bl OSSleepTicks
|
||||
_MountPrfFile_L_814D8104:
|
||||
cmpwi r29, 0x0
|
||||
subi r29, r29, 0x1
|
||||
bgt _MountPrfFile_L_814D80A8
|
||||
b _MountPrfFile_L_814D822C
|
||||
_MountPrfFile_L_814D8114:
|
||||
addis r0, r31, 0x1
|
||||
cmplwi r0, 0xfff6
|
||||
bne _MountPrfFile_L_814D81A8
|
||||
lis r3, 0x1062
|
||||
lwz r29, VF_nand_retry_max(r0)
|
||||
addi r31, r3, 0x4dd3
|
||||
li r30, 0x0
|
||||
lis r25, 0x8000
|
||||
li r24, 0x0
|
||||
b _MountPrfFile_L_814D8198
|
||||
_MountPrfFile_L_814D813C:
|
||||
mr r3, r27
|
||||
mr r4, r28
|
||||
li r5, 0x3
|
||||
bl NANDOpen
|
||||
cmpwi r3, -0x3
|
||||
mr r30, r3
|
||||
beq _MountPrfFile_L_814D8164
|
||||
cmpwi r3, -0x2
|
||||
beq _MountPrfFile_L_814D8164
|
||||
b _MountPrfFile_L_814D822C
|
||||
_MountPrfFile_L_814D8164:
|
||||
lwz r0, 0xf8(r25)
|
||||
lwz r6, VF_nand_sleep_msec(r0)
|
||||
srwi r0, r0, 2
|
||||
mulhwu r3, r31, r0
|
||||
srawi r0, r6, 31
|
||||
mullw r4, r24, r6
|
||||
srwi r5, r3, 6
|
||||
mulhwu r3, r5, r6
|
||||
mullw r0, r5, r0
|
||||
add r3, r3, r4
|
||||
mullw r4, r5, r6
|
||||
add r3, r3, r0
|
||||
bl OSSleepTicks
|
||||
_MountPrfFile_L_814D8198:
|
||||
cmpwi r29, 0x0
|
||||
subi r29, r29, 0x1
|
||||
bgt _MountPrfFile_L_814D813C
|
||||
b _MountPrfFile_L_814D822C
|
||||
_MountPrfFile_L_814D81A8:
|
||||
lis r3, 0x1062
|
||||
lwz r29, VF_nand_retry_max(r0)
|
||||
addi r24, r3, 0x4dd3
|
||||
li r30, 0x0
|
||||
lis r25, 0x8000
|
||||
li r31, 0x0
|
||||
b _MountPrfFile_L_814D8220
|
||||
_MountPrfFile_L_814D81C4:
|
||||
mr r3, r27
|
||||
mr r4, r28
|
||||
li r5, 0x3
|
||||
bl NANDPrivateOpen
|
||||
cmpwi r3, -0x3
|
||||
mr r30, r3
|
||||
beq _MountPrfFile_L_814D81EC
|
||||
cmpwi r3, -0x2
|
||||
beq _MountPrfFile_L_814D81EC
|
||||
b _MountPrfFile_L_814D822C
|
||||
_MountPrfFile_L_814D81EC:
|
||||
lwz r0, 0xf8(r25)
|
||||
lwz r6, VF_nand_sleep_msec(r0)
|
||||
srwi r0, r0, 2
|
||||
mulhwu r3, r24, r0
|
||||
srawi r0, r6, 31
|
||||
mullw r4, r31, r6
|
||||
srwi r5, r3, 6
|
||||
mulhwu r3, r5, r6
|
||||
mullw r0, r5, r0
|
||||
add r3, r3, r4
|
||||
mullw r4, r5, r6
|
||||
add r3, r3, r0
|
||||
bl OSSleepTicks
|
||||
_MountPrfFile_L_814D8220:
|
||||
cmpwi r29, 0x0
|
||||
subi r29, r29, 0x1
|
||||
bgt _MountPrfFile_L_814D81C4
|
||||
_MountPrfFile_L_814D822C:
|
||||
cmpwi r30, 0x0
|
||||
bne _MountPrfFile_L_814D823C
|
||||
li r3, 0x0
|
||||
b _MountPrfFile_L_814D824C
|
||||
_MountPrfFile_L_814D823C:
|
||||
mr r3, r26
|
||||
mr r4, r30
|
||||
bl dCommon_setLastDeviceErrorToDisk
|
||||
mr r3, r30
|
||||
_MountPrfFile_L_814D824C:
|
||||
lwz r10, 0x0(r1)
|
||||
mr r11, r10
|
||||
bl _restgpr_23
|
||||
lwz r0, 0x4(r10)
|
||||
mtlr r0
|
||||
mr r1, r10
|
||||
blr
|
||||
}
|
||||
#else
|
||||
static s32 _MountPrfFile(PDM_DISK* p_disk, char* i_fullpath_p) {
|
||||
PR_BINHEADER header ALIGN64;
|
||||
VFSys_drive* drive_p = VFSysPDMDisk2DriveP(p_disk);
|
||||
NANDFileInfo* fileInfo_p = NULL;
|
||||
s32 nandError = NAND_RESULT_OK;
|
||||
NANDFileInfo* fileInfo_p;
|
||||
s32 nandError;
|
||||
u32 handleIdx = dCommon_getHandleIdxFromDisk(p_disk);
|
||||
|
||||
if (drive_p == NULL) {
|
||||
if (!drive_p) {
|
||||
return -20;
|
||||
}
|
||||
fileInfo_p = drive_p->file_p;
|
||||
nandError = VFi_NandOpenSp(i_fullpath_p, fileInfo_p, NAND_ACCESS_READ, handleIdx);
|
||||
if (nandError == 0) {
|
||||
s32 readResult;
|
||||
|
||||
VFipf_memset(&header, 0, 32);
|
||||
nandError = A32_NANDRead(fileInfo_p, &header, 32);
|
||||
if (nandError < NAND_RESULT_OK) {
|
||||
readResult = A32_NANDRead(fileInfo_p, &header, 32);
|
||||
if (readResult < NAND_RESULT_OK) {
|
||||
VFi_NandClose(fileInfo_p);
|
||||
dCommon_setLastDeviceErrorToDisk(p_disk, nandError);
|
||||
return nandError;
|
||||
dCommon_setLastDeviceErrorToDisk(p_disk, readResult);
|
||||
return readResult;
|
||||
}
|
||||
dCommon_PrintSignature(&header);
|
||||
if (!dCommon_IsPrfFile(&header)) {
|
||||
@@ -923,7 +447,7 @@ static s32 _MountPrfFile(PDM_DISK* p_disk, char* i_fullpath_p) {
|
||||
u32 fatType;
|
||||
|
||||
dCommon_setFileSizeToDisk(p_disk,
|
||||
((header.fileSize[0] << 24) | (header.fileSize[1] << 16) | (header.fileSize[2] << 8) | (header.fileSize[3])));
|
||||
((header.fileSize[2] << 8) | header.fileSize[3]) | ((header.fileSize[0] << 24) | (header.fileSize[1] << 16)));
|
||||
fileSize = dCommon_getFileSizeFromDisk(p_disk);
|
||||
dataSize = (fileSize - 0x20);
|
||||
SPU = ((dataSize + 1) >> 9);
|
||||
@@ -946,7 +470,6 @@ static s32 _MountPrfFile(PDM_DISK* p_disk, char* i_fullpath_p) {
|
||||
return nandError;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static u16 _UnmountPrfFile(PDM_DISK* p_disk) {
|
||||
VFSys_drive* drive_p = VFSysPDMDisk2DriveP(p_disk);
|
||||
|
||||
@@ -40,8 +40,6 @@ const u8 scWpaFindOuiPad4 = 0;
|
||||
#define scWpaFindOui0 (*((volatile const u8*)&scWpaFindOui0))
|
||||
#define scWpaFindOui1 (*((volatile const u8*)&scWpaFindOui1))
|
||||
#define scWpaFindOui2 (*((volatile const u8*)&scWpaFindOui2))
|
||||
extern void _savegpr_21();
|
||||
extern void _restgpr_21();
|
||||
|
||||
#define WAIT_FOR_OPERATION(...) \
|
||||
do { \
|
||||
@@ -310,80 +308,45 @@ BOOL WDFindInformationElement(WDInfoElement** outIE, u32* outIELength, WDBssDesc
|
||||
return found;
|
||||
}
|
||||
|
||||
asm BOOL WDiFindVendorSpecificIE(WDVendorInfoElement** outIE, u32* outIELength, WDBssDesc* bssDesc, int id, u8* data, u8 mode) {
|
||||
nofralloc
|
||||
stwu r1, -0x40(r1)
|
||||
mflr r0
|
||||
stw r0, 0x44(r1)
|
||||
addi r11, r1, 0x40
|
||||
bl _savegpr_21
|
||||
cmpwi r5, 0
|
||||
mr r30, r3
|
||||
mr r31, r4
|
||||
mr r21, r6
|
||||
mr r22, r7
|
||||
mr r23, r8
|
||||
li r28, 0
|
||||
beq WDiFindVendorSpecificIE_done
|
||||
addi r26, r5, 0x3e
|
||||
lhz r29, 0x3c(r5)
|
||||
mr r25, r26
|
||||
li r27, 0
|
||||
b WDiFindVendorSpecificIE_loop_check
|
||||
WDiFindVendorSpecificIE_loop:
|
||||
lbzx r0, r26, r27
|
||||
add r25, r26, r27
|
||||
cmplw r0, r21
|
||||
bne WDiFindVendorSpecificIE_next
|
||||
lbz r24, 5(r25)
|
||||
mr r4, r22
|
||||
addi r3, r25, 2
|
||||
li r5, 3
|
||||
bl memcmp
|
||||
cmpwi r3, 0
|
||||
bne WDiFindVendorSpecificIE_next
|
||||
cmplw r24, r23
|
||||
beq WDiFindVendorSpecificIE_found
|
||||
WDiFindVendorSpecificIE_next:
|
||||
lbz r0, 1(r25)
|
||||
add r3, r0, r27
|
||||
addi r27, r3, 2
|
||||
WDiFindVendorSpecificIE_loop_check:
|
||||
cmpw r27, r29
|
||||
blt WDiFindVendorSpecificIE_loop
|
||||
WDiFindVendorSpecificIE_found:
|
||||
cmpw r27, r29
|
||||
bge WDiFindVendorSpecificIE_done
|
||||
cmpwi r30, 0
|
||||
beq WDiFindVendorSpecificIE_no_out
|
||||
addi r0, r25, 6
|
||||
stw r0, 0(r30)
|
||||
WDiFindVendorSpecificIE_no_out:
|
||||
cmpwi r31, 0
|
||||
beq WDiFindVendorSpecificIE_set_found
|
||||
lbz r3, 1(r25)
|
||||
addi r0, r3, -4
|
||||
stw r0, 0(r31)
|
||||
WDiFindVendorSpecificIE_set_found:
|
||||
li r28, 1
|
||||
WDiFindVendorSpecificIE_done:
|
||||
cmpwi r28, 0
|
||||
bne WDiFindVendorSpecificIE_return
|
||||
cmpwi r30, 0
|
||||
beq WDiFindVendorSpecificIE_no_out_null
|
||||
li r0, 0
|
||||
stw r0, 0(r30)
|
||||
WDiFindVendorSpecificIE_no_out_null:
|
||||
cmpwi r31, 0
|
||||
beq WDiFindVendorSpecificIE_return
|
||||
li r0, 0
|
||||
stw r0, 0(r31)
|
||||
WDiFindVendorSpecificIE_return:
|
||||
addi r11, r1, 0x40
|
||||
mr r3, r28
|
||||
bl _restgpr_21
|
||||
lwz r0, 0x44(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x40
|
||||
blr
|
||||
BOOL WDiFindVendorSpecificIE(WDVendorInfoElement** outIE, u32* outIELength, WDBssDesc* bssDesc, int id, u8* data, u8 mode) {
|
||||
u32* lengthResult = outIELength;
|
||||
WDVendorInfoElement** elementResult = outIE;
|
||||
int length;
|
||||
BOOL found = FALSE;
|
||||
|
||||
if (bssDesc != NULL) {
|
||||
s32 offset;
|
||||
u8* ptr = (u8*)(bssDesc + 1);
|
||||
WDVendorInfoElement* infoElement = (WDVendorInfoElement*)ptr;
|
||||
|
||||
length = bssDesc->ieLength;
|
||||
|
||||
for (offset = 0; offset < length; offset += infoElement->length + 2) {
|
||||
infoElement = (WDVendorInfoElement*)(ptr + offset);
|
||||
if (infoElement->id == (u32)id) {
|
||||
u8 elementMode = infoElement->mode;
|
||||
if (memcmp(infoElement->data, data, WD_VENDOR_LENGTH) == 0 && elementMode == mode) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (offset < length) {
|
||||
if (elementResult != NULL) {
|
||||
*elementResult = infoElement + 1;
|
||||
}
|
||||
if (lengthResult != NULL) {
|
||||
*lengthResult = infoElement->length - (sizeof(WDVendorInfoElement) - sizeof(WDInfoElement));
|
||||
}
|
||||
found = TRUE;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
if (elementResult != NULL) {
|
||||
*elementResult = NULL;
|
||||
}
|
||||
if (lengthResult != NULL) {
|
||||
*lengthResult = 0;
|
||||
}
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
@@ -6505,144 +6505,12 @@ notFound:
|
||||
return vmNull;
|
||||
}
|
||||
|
||||
#ifdef __MWERKS__
|
||||
extern void _savegpr_24();
|
||||
extern void _restgpr_24();
|
||||
|
||||
asm CHANSVmErr VmPushFuncReturnInfo(register CHANSVm* vm, register u32 argCount, register u32 totalSlots, register u32 headerCount) {
|
||||
nofralloc
|
||||
|
||||
stwu r1, -0x30(r1)
|
||||
mflr r0
|
||||
stw r0, 0x34(r1)
|
||||
addi r11, r1, 0x30
|
||||
bl _savegpr_24
|
||||
lwz r7, 0x60(r3)
|
||||
mr r25, r3
|
||||
mr r26, r4
|
||||
mr r27, r5
|
||||
cmpwi r7, 0
|
||||
mr r28, r6
|
||||
li r30, -0x3c2
|
||||
beq VmPushFuncReturnInfo_active
|
||||
lwz r0, 0xc(r7)
|
||||
cmplw r0, r4
|
||||
bge VmPushFuncReturnInfo_active
|
||||
li r3, -0x3c2
|
||||
b VmPushFuncReturnInfo_return
|
||||
|
||||
VmPushFuncReturnInfo_active:
|
||||
cmplwi r6, 0xff
|
||||
bgt VmPushFuncReturnInfo_return_result
|
||||
lwz r29, 0x2c(r3)
|
||||
li r31, -1
|
||||
b VmPushFuncReturnInfo_after_loop
|
||||
|
||||
VmPushFuncReturnInfo_loop:
|
||||
lwz r0, 0x28(r25)
|
||||
addi r29, r29, -0x10
|
||||
cmplw r0, r29
|
||||
ble VmPushFuncReturnInfo_clear_stack
|
||||
li r3, -0x3e6
|
||||
b VmPushFuncReturnInfo_return
|
||||
|
||||
VmPushFuncReturnInfo_clear_stack:
|
||||
mr r3, r29
|
||||
li r4, 0
|
||||
li r5, 0x10
|
||||
bl memset
|
||||
lwz r4, 0x60(r25)
|
||||
addi r26, r26, 1
|
||||
lwz r3, 0xc(r4)
|
||||
cmplw r3, r31
|
||||
bge VmPushFuncReturnInfo_after_stack
|
||||
addi r0, r3, 1
|
||||
stw r0, 0xc(r4)
|
||||
b VmPushFuncReturnInfo_after_loop
|
||||
|
||||
VmPushFuncReturnInfo_after_stack:
|
||||
li r3, -0x3c2
|
||||
b VmPushFuncReturnInfo_return
|
||||
|
||||
VmPushFuncReturnInfo_after_loop:
|
||||
cmplw r26, r27
|
||||
blt VmPushFuncReturnInfo_loop
|
||||
stw r29, 0x2c(r25)
|
||||
mr r3, r25
|
||||
bl CHANSVmUpdateSmallestFreeHeapSize
|
||||
slwi r0, r28, 4
|
||||
li r31, 0
|
||||
addic. r24, r0, 0x20
|
||||
beq VmPushFuncReturnInfo_no_block
|
||||
clrlwi. r0, r24, 0x1d
|
||||
bne VmPushFuncReturnInfo_no_block
|
||||
lwz r0, 0x28(r25)
|
||||
lwz r3, 0x2c(r25)
|
||||
subf r0, r0, r3
|
||||
cmplw r0, r24
|
||||
blt VmPushFuncReturnInfo_no_block
|
||||
subf r31, r24, r3
|
||||
mr r3, r25
|
||||
stw r31, 0x2c(r25)
|
||||
bl CHANSVmUpdateSmallestFreeHeapSize
|
||||
mr r3, r31
|
||||
mr r5, r24
|
||||
li r4, 0
|
||||
bl memset
|
||||
|
||||
VmPushFuncReturnInfo_no_block:
|
||||
cmpwi r31, 0
|
||||
beq VmPushFuncReturnInfo_return_result
|
||||
lwz r3, 0x60(r25)
|
||||
cmpwi r3, 0
|
||||
beq VmPushFuncReturnInfo_set_active
|
||||
lwz r0, 4(r3)
|
||||
stw r0, 4(r31)
|
||||
lwz r3, 0x60(r25)
|
||||
lwz r0, 0x10(r3)
|
||||
stw r0, 0x10(r31)
|
||||
lwz r0, 0x60(r25)
|
||||
stw r0, 0(r31)
|
||||
|
||||
VmPushFuncReturnInfo_set_active:
|
||||
stw r31, 0x60(r25)
|
||||
add r0, r28, r27
|
||||
subfic r0, r0, 0x2000
|
||||
li r24, 0
|
||||
stw r29, 8(r31)
|
||||
li r25, 0
|
||||
sth r26, 0x14(r31)
|
||||
sth r27, 0x16(r31)
|
||||
stb r28, 0x1a(r31)
|
||||
sth r0, 0x18(r31)
|
||||
b VmPushFuncReturnInfo_header_loop_check
|
||||
|
||||
VmPushFuncReturnInfo_header_loop:
|
||||
add r3, r31, r25
|
||||
li r4, 0
|
||||
addi r3, r3, 0x20
|
||||
li r5, 0x10
|
||||
bl memset
|
||||
addi r24, r24, 1
|
||||
addi r25, r25, 0x10
|
||||
|
||||
VmPushFuncReturnInfo_header_loop_check:
|
||||
cmplw r24, r28
|
||||
blt VmPushFuncReturnInfo_header_loop
|
||||
li r30, 0
|
||||
|
||||
VmPushFuncReturnInfo_return_result:
|
||||
mr r3, r30
|
||||
|
||||
VmPushFuncReturnInfo_return:
|
||||
addi r11, r1, 0x30
|
||||
bl _restgpr_24
|
||||
lwz r0, 0x34(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x30
|
||||
blr
|
||||
static inline vmU32 VmStackSpace(CHANSVmPrivate* pVm) {
|
||||
vmU32 space = (vmU32)pVm->pFreeExeBuf;
|
||||
space = (vmU32)pVm->pObjStackTopBuf - space;
|
||||
return space;
|
||||
}
|
||||
#else
|
||||
|
||||
static CHANSVmErr VmPushFuncReturnInfo(CHANSVm* vm, u32 argCount, u32 totalSlots, u32 headerCount) {
|
||||
CHANSVmPrivate* pVm = (CHANSVmPrivate*)vm;
|
||||
CHANSVmExecutionCtx* block;
|
||||
@@ -6681,7 +6549,7 @@ static CHANSVmErr VmPushFuncReturnInfo(CHANSVm* vm, u32 argCount, u32 totalSlots
|
||||
block = vmNull;
|
||||
|
||||
if (size != 0 && (size & 7) == 0) {
|
||||
if ((vmU32)pVm->pObjStackTopBuf - (vmU32)pVm->pFreeExeBuf >= size) {
|
||||
if (VmStackSpace(pVm) >= size) {
|
||||
block = (CHANSVmExecutionCtx*)(pVm->pObjStackTopBuf - size);
|
||||
pVm->pObjStackTopBuf = (vmU8*)block;
|
||||
CHANSVmUpdateSmallestFreeHeapSize(vm);
|
||||
@@ -6715,7 +6583,6 @@ static CHANSVmErr VmPushFuncReturnInfo(CHANSVm* vm, u32 argCount, u32 totalSlots
|
||||
return_result:
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
static CHANSVmErr VmReturnWithValue(CHANSVm* vm, u32 val) {
|
||||
CHANSVmPrivate* pVm = (CHANSVmPrivate*)vm;
|
||||
|
||||
@@ -413,6 +413,15 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
inline void nw4r::lyt::Pane::SetTranslate(const nw4r::math::VEC3& translate) {
|
||||
mTranslate = translate;
|
||||
}
|
||||
|
||||
namespace ipl {
|
||||
namespace scene {
|
||||
void Address::destroy() {
|
||||
mpFriendCache->fin();
|
||||
}
|
||||
@@ -1416,6 +1425,10 @@ namespace ipl {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static inline Button* getEventButton() {
|
||||
return static_cast<Button*>(System::getScene(SCENE_BUTTON));
|
||||
}
|
||||
|
||||
void Address::onEventDerived(u32 compId, u32 event, const controller::Interface* con) {
|
||||
const char* paneName = static_cast<gui::PaneComponent*>(mpManager->getComponent(compId))->getPane()->GetName();
|
||||
|
||||
@@ -1426,7 +1439,7 @@ namespace ipl {
|
||||
}
|
||||
|
||||
if (con->downTrg(controller::BTN_INTERACT)) {
|
||||
Button* button = static_cast<Button*>(System::getScene(SCENE_BUTTON));
|
||||
Button* button = getEventButton();
|
||||
if (mState == STATE_COVER_NORMAL || mState == STATE_NORMAL) {
|
||||
if (Button::cmpButtonName(paneName, Button::BTN_EXIT) == 0) {
|
||||
MailAddressSelect* mailAddrSel = static_cast<MailAddressSelect*>(System::getScene(SCENE_MAIL_ADDRESS_SELECT));
|
||||
|
||||
@@ -147,7 +147,7 @@ bool MemoryCardManager::isMoveEnable(u8 slot, u32 index, long* code) {
|
||||
CardDirectory* dirs = reinterpret_cast<CardDirectory*>(memorycard::getCardDirState());
|
||||
memorycard::CardState* states = memorycard::getCardSlotState();
|
||||
u32 file = mFile[slot][index].fileNo;
|
||||
long result;
|
||||
long result = file;
|
||||
bool enabled = false;
|
||||
if (isDistSlot(slot, NULL) &&
|
||||
dirs[slot][file].canMove != 0 &&
|
||||
@@ -186,7 +186,7 @@ bool MemoryCardManager::isCopyEnable(u8 slot, u32 index, long* code) {
|
||||
CardDirectory* dirs = reinterpret_cast<CardDirectory*>(memorycard::getCardDirState());
|
||||
memorycard::CardState* states = memorycard::getCardSlotState();
|
||||
u32 file = mFile[slot][index].fileNo;
|
||||
long result;
|
||||
long result = file;
|
||||
bool enabled = false;
|
||||
if (isDistSlot(slot, NULL) &&
|
||||
dirs[slot][file].canCopy != 0 &&
|
||||
|
||||
@@ -383,83 +383,10 @@ namespace ipl {
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef __MWERKS__
|
||||
extern "C" System::Arg smArg__Q23ipl6System;
|
||||
extern "C" void cdb_backup_delete_search_cb___3iplFPvP10_CDBRecord();
|
||||
extern "C" void cdb_backup_move_search_cb___3iplFPvP10_CDBRecord();
|
||||
extern "C" void getFreeSize__Q33ipl3cdb7ManagerFPUl();
|
||||
extern "C" void search__Q33ipl3cdb7ManagerFRCUlRCUl18CDBSearchDirection17CDBRecordLocationiPFPvP10_CDBRecord_iPv();
|
||||
extern "C" void cleanUpEmptyDirectories__Q33ipl3cdb7ManagerF17CDBRecordLocation();
|
||||
|
||||
asm void cdb_backup_delete_task_(register void* work) {
|
||||
nofralloc
|
||||
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
li r4, 0
|
||||
li r5, 1
|
||||
stw r0, 0x24(r1)
|
||||
li r6, 0
|
||||
li r7, 0
|
||||
li r8, 0
|
||||
stw r31, 0x1c(r1)
|
||||
mr r31, r3
|
||||
li r3, 0x7d0
|
||||
bl CDBMakeCDBDate
|
||||
stw r3, 0xc(r1)
|
||||
li r3, 0x7f3
|
||||
li r4, 0xc
|
||||
li r5, 0x1f
|
||||
li r6, 0x17
|
||||
li r7, 0x3b
|
||||
li r8, 0x3b
|
||||
bl CDBMakeCDBDate
|
||||
lis r4, smArg__Q23ipl6System@ha
|
||||
stw r3, 0x8(r1)
|
||||
addi r4, r4, smArg__Q23ipl6System@l
|
||||
lbz r0, 0x2bc(r4)
|
||||
cmpwi r0, 0
|
||||
beq cdb_backup_delete_task_L1
|
||||
li r3, 0
|
||||
b cdb_backup_delete_task_L2
|
||||
cdb_backup_delete_task_L1:
|
||||
lwz r3, 0x7c(r4)
|
||||
cdb_backup_delete_task_L2:
|
||||
lis r9, cdb_backup_delete_search_cb___3iplFPvP10_CDBRecord@ha
|
||||
mr r10, r31
|
||||
addi r4, r1, 0xc
|
||||
addi r5, r1, 0x8
|
||||
addi r9, r9, cdb_backup_delete_search_cb___3iplFPvP10_CDBRecord@l
|
||||
li r6, 1
|
||||
li r7, 1
|
||||
li r8, 0
|
||||
bl search__Q33ipl3cdb7ManagerFRCUlRCUl18CDBSearchDirection17CDBRecordLocationiPFPvP10_CDBRecord_iPv
|
||||
lis r3, smArg__Q23ipl6System@ha
|
||||
addi r3, r3, smArg__Q23ipl6System@l
|
||||
lbz r0, 0x2bc(r3)
|
||||
cmpwi r0, 0
|
||||
beq cdb_backup_delete_task_L3
|
||||
li r3, 0
|
||||
b cdb_backup_delete_task_L4
|
||||
cdb_backup_delete_task_L3:
|
||||
lwz r3, 0x7c(r3)
|
||||
cdb_backup_delete_task_L4:
|
||||
li r4, 1
|
||||
bl cleanUpEmptyDirectories__Q33ipl3cdb7ManagerF17CDBRecordLocation
|
||||
li r0, 1
|
||||
stb r0, 0(r31)
|
||||
lwz r0, 0x24(r1)
|
||||
lwz r31, 0x1c(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x20
|
||||
blr
|
||||
}
|
||||
#else
|
||||
void cdb_backup_delete_task_(void* work) {
|
||||
CdbBackup* cdbBackup = reinterpret_cast<CdbBackup*>(work);
|
||||
CdbBackup* cdbBackup = static_cast<CdbBackup*>(work);
|
||||
|
||||
CDBDate beginDate = CDBMakeCDBDate(MIN_YEAR, MIN_MONTH - 1, MIN_DAY, MIN_HOUR, MIN_MINUTE, MIN_SECOND);
|
||||
// @Bug should be MAX_MONTH-1
|
||||
CDBDate endDate = CDBMakeCDBDate(MAX_YEAR, MAX_MONTH, MAX_DAY, MAX_HOUR, MAX_MINUTE, MAX_SECOND);
|
||||
|
||||
System::getCdbManager()->search(beginDate, endDate, CDB_SEARCH_DIRECTION_RIGHT, CDB_RECORD_LOCATION_NAND, 0, cdb_backup_delete_search_cb_,
|
||||
@@ -469,7 +396,6 @@ namespace ipl {
|
||||
|
||||
cdbBackup->set_done_process(true);
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOL cdb_backup_move_search_cb_(void* work, CDBRecord* record) {
|
||||
CdbBackup* cdbBackup = reinterpret_cast<CdbBackup*>(work);
|
||||
@@ -498,87 +424,6 @@ namespace ipl {
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef __MWERKS__
|
||||
asm void cdb_backup_move_task_(register void* work) {
|
||||
nofralloc
|
||||
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
li r4, 0
|
||||
li r5, 1
|
||||
stw r0, 0x24(r1)
|
||||
li r6, 0
|
||||
li r7, 0
|
||||
li r8, 0
|
||||
stw r31, 0x1c(r1)
|
||||
mr r31, r3
|
||||
li r3, 0x7d0
|
||||
bl CDBMakeCDBDate
|
||||
stw r3, 0x10(r1)
|
||||
li r3, 0x7f3
|
||||
li r4, 0xc
|
||||
li r5, 0x1f
|
||||
li r6, 0x17
|
||||
li r7, 0x3b
|
||||
li r8, 0x3b
|
||||
bl CDBMakeCDBDate
|
||||
lis r4, smArg__Q23ipl6System@ha
|
||||
stw r3, 0xc(r1)
|
||||
addi r4, r4, smArg__Q23ipl6System@l
|
||||
lbz r0, 0x2bc(r4)
|
||||
cmpwi r0, 0
|
||||
beq cdb_backup_move_task_L1
|
||||
li r3, 0
|
||||
b cdb_backup_move_task_L2
|
||||
cdb_backup_move_task_L1:
|
||||
lwz r3, 0x7c(r4)
|
||||
cdb_backup_move_task_L2:
|
||||
addi r4, r1, 0x8
|
||||
bl getFreeSize__Q33ipl3cdb7ManagerFPUl
|
||||
lwz r0, 0x8(r1)
|
||||
lis r3, smArg__Q23ipl6System@ha
|
||||
addi r3, r3, smArg__Q23ipl6System@l
|
||||
stw r0, 0x8(r31)
|
||||
lwz r0, 0x8(r1)
|
||||
stw r0, 0xc(r31)
|
||||
lbz r0, 0x2bc(r3)
|
||||
cmpwi r0, 0
|
||||
beq cdb_backup_move_task_L3
|
||||
li r3, 0
|
||||
b cdb_backup_move_task_L4
|
||||
cdb_backup_move_task_L3:
|
||||
lwz r3, 0x7c(r3)
|
||||
cdb_backup_move_task_L4:
|
||||
lis r9, cdb_backup_move_search_cb___3iplFPvP10_CDBRecord@ha
|
||||
mr r10, r31
|
||||
addi r4, r1, 0x10
|
||||
addi r5, r1, 0xc
|
||||
addi r9, r9, cdb_backup_move_search_cb___3iplFPvP10_CDBRecord@l
|
||||
li r6, 1
|
||||
li r7, 1
|
||||
li r8, 1
|
||||
bl search__Q33ipl3cdb7ManagerFRCUlRCUl18CDBSearchDirection17CDBRecordLocationiPFPvP10_CDBRecord_iPv
|
||||
lis r3, smArg__Q23ipl6System@ha
|
||||
addi r3, r3, smArg__Q23ipl6System@l
|
||||
lbz r0, 0x2bc(r3)
|
||||
cmpwi r0, 0
|
||||
beq cdb_backup_move_task_L5
|
||||
li r3, 0
|
||||
b cdb_backup_move_task_L6
|
||||
cdb_backup_move_task_L5:
|
||||
lwz r3, 0x7c(r3)
|
||||
cdb_backup_move_task_L6:
|
||||
li r4, 1
|
||||
bl cleanUpEmptyDirectories__Q33ipl3cdb7ManagerF17CDBRecordLocation
|
||||
li r0, 1
|
||||
stb r0, 0(r31)
|
||||
lwz r0, 0x24(r1)
|
||||
lwz r31, 0x1c(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x20
|
||||
blr
|
||||
}
|
||||
#else
|
||||
void cdb_backup_move_task_(void* work) {
|
||||
CdbBackup* cdbBackup = reinterpret_cast<CdbBackup*>(work);
|
||||
|
||||
@@ -599,5 +444,4 @@ namespace ipl {
|
||||
|
||||
cdbBackup->set_done_process(true);
|
||||
}
|
||||
#endif
|
||||
} // namespace ipl
|
||||
|
||||
225
tools/decomp-assist/asm-inventory.md
Normal file
225
tools/decomp-assist/asm-inventory.md
Normal file
@@ -0,0 +1,225 @@
|
||||
# Assembly inventory
|
||||
|
||||
Snapshot: `agent/w1005/da5` after the WPADiManageHandler and _CNTCACHEDeleteTitle C conversions, based on `7aa71d29`.
|
||||
|
||||
Scope: every `asm` function body, `asm` block, and `__asm` block in C/C++ sources and headers under `src/` and `libs/`, including inactive platform branches. Each block gets its own row. Declarations, comments, and standalone assembly files are outside this scan.
|
||||
|
||||
Count: 209 bodies/blocks, 160 ORIGINAL-ASM and 49 PLACEHOLDER. The scan also excluded 65 asm declarations.
|
||||
|
||||
ORIGINAL-ASM requires a matching asm function in the ogws reference or a concrete hardware/runtime register convention. An ordinary prologue, `nofralloc`, or a call to `_savegpr_*` does not establish that a function was originally assembly. PLACEHOLDER means the logic belongs in C/C++, even when the current assembly matches exactly.
|
||||
|
||||
`ogws_sdk/` references resolve under `/mnt/drive2/projects/wii-ipl-workers/_refs/prior/ogws_sdk/`. Linked ogws files supplement those copies for runtime and NW4R routines. The remote files were read on 2026-10-05. The local reference versions can differ from the 2010 target.
|
||||
|
||||
This inventory classifies the other workers' files without modifying them. It records this branch's contents, including placeholders another worker may have already converted elsewhere.
|
||||
|
||||
| File and line | Function | Form | Verdict | Evidence |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| `src/BS2/BS2Init.c:22` | `ClearOtherBATs` | body | ORIGINAL-ASM | isync and direct IBAT/DBAT register writes. |
|
||||
| `src/BS2/BS2Mach.c:246` | `Run` | body | ORIGINAL-ASM | Clears ABI registers, replaces r1, uses dcbz/dcbf, and jumps via LR. |
|
||||
| `src/BS2/BS2Start.c:22` | `__start` | body | ORIGINAL-ASM | Runs before the C stack and ABI registers exist; constructs the initial stack. |
|
||||
| `src/BS2/BS2Start.c:97` | `__init_registers` | body | ORIGINAL-ASM | Initializes GPRs, r1, r2, and r13 for the C runtime. |
|
||||
| `src/channelScript/CHANSVm.c:6512` | `VmPushFuncReturnInfo` | body | PLACEHOLDER | VM frame bookkeeping with ordinary loads, stores, and calls. |
|
||||
| `src/keyboard/tiGUIManager.cpp:359` | `draw__Q39textinput3gui13PaneComponentFv` | body | PLACEHOLDER | GUI pane traversal and drawing calls. |
|
||||
| `src/keyboard/tiInputForm.cpp:1600` | `create__Q39textinput9inputform4BaseFP12MEMAllocatorPQ39textinput9inputform10EditBuffer` | body | PLACEHOLDER | Input-form allocation and initialization. |
|
||||
| `src/scene/button/iplButton.cpp:971` | `push_button_queue` | body | PLACEHOLDER | Button queue traversal and updates. |
|
||||
| `src/scene/channelSelect/iplChannelSelect.cpp:1336` | `updateDiskState__Q33ipl5scene13ChannelSelectFv` | body | PLACEHOLDER | Disc-state updates and scene calls. |
|
||||
| `src/scene/nakamuraTest/gamespy/common/gsPlatformUtil.c:474` | `GetTicks` | block 1 | ORIGINAL-ASM | Inactive PS2 branch reads the CP0 Count register with mfc0 $9. |
|
||||
| `src/sound/iplSound.cpp:341` | `resetAllSound__Q33ipl3snd6SystemFv` | body | PLACEHOLDER | Sound-system reset calls and state writes. |
|
||||
| `src/system/TVRC.cpp:224` | `TVRCSendStartAsync` | body | PLACEHOLDER | IR send setup and ordinary SDK calls. |
|
||||
| `src/system/TVRC.cpp:436` | `__FTVRCLoop0Handler__7LibTVRCFP7OSAlarmP9OSContext` | body | PLACEHOLDER | Timer callback logic and SDK calls. |
|
||||
| `src/system/iplCdbBackup.cpp:394` | `cdb_backup_delete_task_` | body | PLACEHOLDER | Database deletion task control flow. |
|
||||
| `src/system/iplCdbBackup.cpp:502` | `cdb_backup_move_task_` | body | PLACEHOLDER | Database move task control flow. |
|
||||
| `src/system/iplChannelManager.cpp:472` | `getTitleName__Q33ipl7channel7ManagerCFiii` | body | PLACEHOLDER | Channel-title selection and string copying. |
|
||||
| `src/system/iplException.cpp:95` | `Exception::exception_callback` | body | PLACEHOLDER | Console drawing, key polling, and scrolling logic. |
|
||||
| `src/system/iplSaveDataManager.cpp:149` | `Manager::hasChannel` | body | PLACEHOLDER | Title-ID comparisons and channel-slot search. |
|
||||
| `src/system/iplSaveDataManager.cpp:599` | `Manager::makePriorTitleIDList` | body | PLACEHOLDER | Title-ID filtering and ordering. |
|
||||
| `src/system/iplSaveDataManager.cpp:807` | `Manager::doUpdateChanInfos` | body | PLACEHOLDER | Channel metadata validation and updates. |
|
||||
| `src/system/iplSystem.cpp:1089` | `System::warning_run` | body | PLACEHOLDER | Warning-scene control flow and calls. |
|
||||
| `src/system/rvl_dec.c:17` | `Rvl_decode` | block 1 | PLACEHOLDER | Compression signature dispatch, expressible as C branches. |
|
||||
| `src/system/rvl_dec.c:72` | `Rvl_decode_szs` | body | PLACEHOLDER | Yaz/SZS byte-copy decompression loops. |
|
||||
| `src/system/rvl_dec.c:233` | `Rvl_decode_ash` | body | PLACEHOLDER | ASH bitstream and Huffman decoding. |
|
||||
| `src/system/rvl_dec.c:717` | `Rvl_decode_asr` | body | PLACEHOLDER | ASR decompression control flow and buffer writes. |
|
||||
| `libs/MetroTRK/src/Export/targsupp.c:12` | `TRKAccessFile` | body | ORIGINAL-ASM | twi 31,r0,0 is the debugger file-service trap, with debugger-controlled return registers. |
|
||||
| `libs/MetroTRK/src/Export/targsupp.c:22` | `TRKOpenFile` | body | ORIGINAL-ASM | twi 31,r0,0 is the debugger file-service trap, with debugger-controlled return registers. |
|
||||
| `libs/MetroTRK/src/Export/targsupp.c:30` | `TRKCloseFile` | body | ORIGINAL-ASM | twi 31,r0,0 is the debugger file-service trap, with debugger-controlled return registers. |
|
||||
| `libs/MetroTRK/src/Export/targsupp.c:38` | `TRKPositionFile` | body | ORIGINAL-ASM | twi 31,r0,0 is the debugger file-service trap, with debugger-controlled return registers. |
|
||||
| `libs/NW4R/include/nw4r/math/arithmetic.h:30` | `FSelect` | block 1 | ORIGINAL-ASM | Same function contains ASM in [ogws math_arithmetic.h](https://github.com/doldecomp/ogws/blob/master/include/nw4r/math/math_arithmetic.h#L91). |
|
||||
| `libs/NW4R/include/nw4r/math/arithmetic.h:38` | `FAbs` | block 1 | ORIGINAL-ASM | Same function contains ASM in [ogws math_arithmetic.h](https://github.com/doldecomp/ogws/blob/master/include/nw4r/math/math_arithmetic.h#L30). |
|
||||
| `libs/NW4R/include/nw4r/math/types.h:230` | `VEC3Add` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st and ps_* vector or matrix operations. |
|
||||
| `libs/NW4R/include/nw4r/math/types.h:258` | `VEC3Sub` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st and ps_* vector or matrix operations. |
|
||||
| `libs/NW4R/include/nw4r/math/types.h:287` | `VEC3Scale` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st and ps_* vector or matrix operations. |
|
||||
| `libs/NW4R/src/math/math_arithmetic.cpp:11` | `FrSqrt` | block 1 | ORIGINAL-ASM | frsqrte and fixed floating-point refinement; same function uses ASM in [ogws math_arithmetic.cpp](https://github.com/doldecomp/ogws/blob/master/src/nw4r/math/math_arithmetic.cpp#L65). |
|
||||
| `libs/NW4R/src/math/math_types.cpp:11` | `MTX44Identity` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st and ps_* vector or matrix operations. |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/buffer/getcode.c:4` | `TMCJPEGDEC_init_buff_thumbnail` | body | PLACEHOLDER | JPEG parsing, table construction, or decode arithmetic using ordinary integer operations and calls. |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/buffer/mkhdec3.c:7` | `TMCJPEGDEC_make_huffdec` | body | PLACEHOLDER | JPEG parsing, table construction, or decode arithmetic using ordinary integer operations and calls. |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main.c:110` | `TMCJPEGDEC_imagestart` | body | PLACEHOLDER | JPEG parsing, table construction, or decode arithmetic using ordinary integer operations and calls. |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main.c:366` | `TMCJPEGDEC_scan_varinit` | body | PLACEHOLDER | JPEG parsing, table construction, or decode arithmetic using ordinary integer operations and calls. |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main.c:594` | `TMCJPEGDEC_restart_interval` | body | PLACEHOLDER | JPEG parsing, table construction, or decode arithmetic using ordinary integer operations and calls. |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main.c:787` | `TMCJPEGDEC_parse_para` | body | PLACEHOLDER | JPEG parsing, table construction, or decode arithmetic using ordinary integer operations and calls. |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main.c:1173` | `TMCJPEGDEC_parse_dht` | body | PLACEHOLDER | JPEG parsing, table construction, or decode arithmetic using ordinary integer operations and calls. |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main.c:1484` | `TMCJPEGDEC_parse_sof` | body | PLACEHOLDER | JPEG parsing, table construction, or decode arithmetic using ordinary integer operations and calls. |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main.c:1963` | `TMCJPEGDEC_parse_sos` | body | PLACEHOLDER | JPEG parsing, table construction, or decode arithmetic using ordinary integer operations and calls. |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main.c:2208` | `TMCJPEGDEC_err_restart` | body | PLACEHOLDER | JPEG parsing, table construction, or decode arithmetic using ordinary integer operations and calls. |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/reschange/iqdec_resolution_change_a3.c:8` | `TMCJPEGDEC_decode_iquant_rc` | body | PLACEHOLDER | JPEG parsing, table construction, or decode arithmetic using ordinary integer operations and calls. |
|
||||
| `libs/RVL_SDK/include/revolution/os/OSFastCast.h:13` | `OSInitFastCast` | block 1 | ORIGINAL-ASM | mtspr programs the GQR quantization registers. |
|
||||
| `libs/RVL_SDK/include/revolution/os/OSFastCast.h:40` | `__OSu16tof32` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/include/revolution/os/OSFastCast.h:58` | `__OSf32tou8` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/include/revolution/os/OSFastCast.h:77` | `__OSf32tou16` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/include/revolution/os/OSFastCast.h:92` | `__OSs16tof32` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/include/revolution/os/OSFastCast.h:108` | `__OSf32tos16` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/ai/ai.c:154` | `__AICallbackStackSwitch` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/AI_ai.c:146. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:6` | `PPCMfmsr` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfmsr r3`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:14` | `PPCMtmsr` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtmsr newMSR`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:22` | `PPCOrMsr` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfmsr r4`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:31` | `PPCAndMsr` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfmsr r4`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:40` | `PPCAndCMsr` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfmsr r4`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:49` | `PPCMfhid0` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, HID0`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:57` | `PPCMthid0` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr HID0, newHID0`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:65` | `PPCMfhid1` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, HID1`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:73` | `PPCMfl2cr` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, L2CR`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:81` | `PPCMtl2cr` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr L2CR, newL2cr`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:89` | `PPCMtdec` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtdec newDec`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:97` | `PPCMfdec` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfdec r3`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:105` | `PPCSync` | body | ORIGINAL-ASM | Special-register or synchronization operation: `sc`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:113` | `PPCEieio` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfmsr r5`, `mtmsr r6`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:133` | `PPCHalt` | body | ORIGINAL-ASM | Special-register or synchronization operation: `sync`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:145` | `PPCMfmmcr0` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, MMCR0`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:153` | `PPCMtmmcr0` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr MMCR0, newMmcr0`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:161` | `PPCMfmmcr1` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, MMCR1`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:169` | `PPCMtmmcr1` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr MMCR1, newMmcr1`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:177` | `PPCMfpmc1` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, PMC1`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:185` | `PPCMtpmc1` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr PMC1, newPmc1`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:193` | `PPCMfpmc2` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, PMC2`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:201` | `PPCMtpmc2` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr PMC2, newPmc2`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:209` | `PPCMfpmc3` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, PMC3`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:217` | `PPCMtpmc3` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr PMC3, newPmc3`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:225` | `PPCMfpmc4` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, PMC4`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:233` | `PPCMtpmc4` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr PMC4, newPmc4`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:244` | `PPCMffpscr` | block 1 | ORIGINAL-ASM | Special-register or synchronization operation: `mffs fp31`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:252` | `PPCMfsia` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, SIA`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:260` | `PPCMtsia` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr SIA, newSia`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:272` | `PPCMtfpscr` | block 1 | ORIGINAL-ASM | Special-register or synchronization operation: `mtfsf 0xff, fp31`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:282` | `PPCMfhid2` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, HID2`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:290` | `PPCMthid2` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr HID2, newhid2`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:298` | `PPCMfwpar` | body | ORIGINAL-ASM | Special-register or synchronization operation: `sync`, `mfspr r3, WPAR`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:307` | `PPCMtwpar` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr WPAR, newwpar`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:315` | `PPCMfdmaU` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, DMA_U`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:323` | `PPCMfdmaL` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, DMA_L`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:331` | `PPCMtdmaU` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr DMA_U, newdmau`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:339` | `PPCMtdmaL` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr DMA_L, newdmal`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:347` | `PPCMfpvr` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, PVR`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:363` | `PPCSetFpIEEEMode` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtfsb0 FPSCR_NI_BIT`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:371` | `PPCSetFpNonIEEEMode` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtfsb1 FPSCR_NI_BIT`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:382` | `PPCMthid4` | block 1 | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr HID4, val`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:389` | `PPCMthid4` | block 2 | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr HID4, val`. |
|
||||
| `libs/RVL_SDK/src/cntcache/cntcache.c:66` | `CNTCACHEClear` | body | PLACEHOLDER | NAND reads and token dispatch; live-literal reconstruction still lacks four retained pool entries. |
|
||||
| `libs/RVL_SDK/src/cntcache/cntcache.c:266` | `_CNTCACHEIsTitleRemovable` | body | PLACEHOLDER | NAND usage and typed TMD checks; C trials still differ in return copies and scheduling. |
|
||||
| `libs/RVL_SDK/src/cntcache/cntcache.c:360` | `_CNTCACHEDeleteContent` | body | PLACEHOLDER | Token parsing, typed content traversal, and ES deletion calls. |
|
||||
| `libs/RVL_SDK/src/db/db.c:27` | `__DBExceptionDestination` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/DB_db.c:23. |
|
||||
| `libs/RVL_SDK/src/gx/GXLight.c:20` | `PushLight` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/gx/GXTransform.c:19` | `WriteProjPS` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/gx/GXTransform.c:36` | `Copy6Floats` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/gx/GXTransform.c:58` | `WriteMTXPS4x3` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/gx/GXTransform.c:86` | `WriteMTXPS3x3from3x4` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/gx/GXTransform.c:112` | `WriteMTXPS4x2` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/mtx.c:36` | `PSMTXIdentity` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/mtx.c:65` | `PSMTXCopy` | body | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/mtx.c:111` | `PSMTXConcat` | body | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/mtx.c:209` | `PSMTXInverse` | body | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/mtx.c:317` | `PSMTXInvXpose` | body | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/mtx.c:449` | `PSMTXRotTrig` | block 1 | ORIGINAL-ASM | frsp prepares the operands for the paired-single rotation block in this same SDK function. |
|
||||
| `libs/RVL_SDK/src/mtx/mtx.c:457` | `PSMTXRotTrig` | block 2 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/mtx.c:527` | `PSMTXTrans` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/mtx.c:560` | `PSMTXTransApply` | body | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/mtx.c:601` | `PSMTXScale` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/mtx.c:629` | `PSMTXScaleApply` | body | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/mtxvec.c:16` | `PSMTXMultVec` | body | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/vec.c:29` | `PSVECNormalize` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/vec.c:58` | `PSVECCrossProduct` | body | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/os/OS.c:86` | `__OSFPRInit` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OS.c:52. |
|
||||
| `libs/RVL_SDK/src/os/OS.c:582` | `OSInit` | block 1 | PLACEHOLDER | This block only pins __ArenaLo with lis/addi; ogws OS_OS.c uses the C linker-symbol pointer. |
|
||||
| `libs/RVL_SDK/src/os/OS.c:617` | `OSInit` | block 2 | PLACEHOLDER | This block only pins __ArenaLo with lis/addi; ogws OS_OS.c uses the C linker-symbol pointer. |
|
||||
| `libs/RVL_SDK/src/os/OS.c:771` | `__OSDBIntegrator` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OS.c:699. |
|
||||
| `libs/RVL_SDK/src/os/OS.c:794` | `__OSDBJump` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OS.c:729. |
|
||||
| `libs/RVL_SDK/src/os/OS.c:816` | `OSExceptionVector` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OS.c:752. |
|
||||
| `libs/RVL_SDK/src/os/OS.c:876` | `OSDefaultExceptionHandler` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OS.c:817. |
|
||||
| `libs/RVL_SDK/src/os/OS.c:917` | `__OSPSInit` | block 1 | ORIGINAL-ASM | mtspr resets GQR0 through GQR7 for paired-single operations. |
|
||||
| `libs/RVL_SDK/src/os/OSAlarm.c:195` | `DecrementerExceptionHandler` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSAlarm.c:193. |
|
||||
| `libs/RVL_SDK/src/os/OSCache.c:13` | `DCEnable` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSCache.c:5. |
|
||||
| `libs/RVL_SDK/src/os/OSCache.c:28` | `DCInvalidateRange` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSCache.c:18. |
|
||||
| `libs/RVL_SDK/src/os/OSCache.c:50` | `DCFlushRange` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSCache.c:40. |
|
||||
| `libs/RVL_SDK/src/os/OSCache.c:73` | `DCStoreRange` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSCache.c:63. |
|
||||
| `libs/RVL_SDK/src/os/OSCache.c:96` | `DCFlushRangeNoSync` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSCache.c:86. |
|
||||
| `libs/RVL_SDK/src/os/OSCache.c:118` | `DCZeroRange` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSCache.c:130. |
|
||||
| `libs/RVL_SDK/src/os/OSCache.c:140` | `ICInvalidateRange` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSCache.c:152. |
|
||||
| `libs/RVL_SDK/src/os/OSCache.c:165` | `ICFlashInvalidate` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSCache.c:177. |
|
||||
| `libs/RVL_SDK/src/os/OSCache.c:177` | `ICEnable` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSCache.c:189. |
|
||||
| `libs/RVL_SDK/src/os/OSCache.c:192` | `LCDisable` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSCache.c:275. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:11` | `__OSLoadFPUContext` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSContext.c:5. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:97` | `__OSSaveFPUContext` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSContext.c:91. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:184` | `OSLoadFPUContext` | body | ORIGINAL-ASM | Transfers control directly into the FPU context loader, which restores caller-visible FPRs. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:192` | `OSSaveFPUContext` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSContext.c:178. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:200` | `OSSetCurrentContext` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSContext.c:187. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:240` | `OSSaveContext` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSContext.c:227. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:280` | `OSLoadContext` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSContext.c:275. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:353` | `OSGetStackPointer` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSContext.c:351. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:361` | `OSSwitchStack` | body | ORIGINAL-ASM | Returns the old r1 and installs the supplied stack pointer directly. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:371` | `OSSwitchFiber` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSContext.c:360. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:389` | `OSSwitchFiberEx` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSContext.c:384. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:421` | `OSInitContext` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSContext.c:418. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:534` | `OSSwitchFPUContext` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSContext.c:537. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:583` | `OSFillFPUContext` | body | ORIGINAL-ASM | mfmsr/mtmsr/isync enable the FPU before saving all floating-point registers. |
|
||||
| `libs/RVL_SDK/src/os/OSInterrupt.c:40` | `OSDisableInterrupts` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSInterrupt.c:21. |
|
||||
| `libs/RVL_SDK/src/os/OSInterrupt.c:55` | `OSEnableInterrupts` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSInterrupt.c:40. |
|
||||
| `libs/RVL_SDK/src/os/OSInterrupt.c:69` | `OSRestoreInterrupts` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSInterrupt.c:55. |
|
||||
| `libs/RVL_SDK/src/os/OSInterrupt.c:479` | `ExternalInterruptHandler` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSInterrupt.c:534. |
|
||||
| `libs/RVL_SDK/src/os/OSMemory.c:89` | `ConfigMEM1_24MB` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSMemory.c:50. |
|
||||
| `libs/RVL_SDK/src/os/OSMemory.c:136` | `ConfigMEM1_48MB` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSMemory.c:89. |
|
||||
| `libs/RVL_SDK/src/os/OSMemory.c:184` | `ConfigMEM2_52MB` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSMemory.c:128. |
|
||||
| `libs/RVL_SDK/src/os/OSMemory.c:266` | `ConfigMEM2_56MB` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSMemory.c:191. |
|
||||
| `libs/RVL_SDK/src/os/OSMemory.c:348` | `ConfigMEM2_64MB` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSMemory.c:254. |
|
||||
| `libs/RVL_SDK/src/os/OSMemory.c:412` | `ConfigMEM2_112MB` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSMemory.c:304. |
|
||||
| `libs/RVL_SDK/src/os/OSMemory.c:493` | `ConfigMEM2_128MB` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSMemory.c:367. |
|
||||
| `libs/RVL_SDK/src/os/OSMemory.c:557` | `ConfigMEM_ES1_0` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSMemory.c:417. |
|
||||
| `libs/RVL_SDK/src/os/OSMemory.c:590` | `RealMode` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSMemory.c:444. |
|
||||
| `libs/RVL_SDK/src/os/OSSync.c:6` | `SystemCallVector` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSSync.c:11. |
|
||||
| `libs/RVL_SDK/src/os/OSTime.c:22` | `OSGetTime` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSTime.c:23. |
|
||||
| `libs/RVL_SDK/src/os/OSTime.c:38` | `OSGetTick` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSTime.c:39. |
|
||||
| `libs/RVL_SDK/src/os/OSTime.c:48` | `__SetTime` | body | ORIGINAL-ASM | mttbl/mttbu/mttbl update the hardware time base in a fixed sequence. |
|
||||
| `libs/RVL_SDK/src/os/__ppc_eabi_init.cpp:33` | `__init_hardware` | body | ORIGINAL-ASM | Same function is asm in [ogws __ppc_eabi_init.c](https://github.com/doldecomp/ogws/blob/master/src/revolution/OS/__ppc_eabi_init.c#L9). |
|
||||
| `libs/RVL_SDK/src/os/__ppc_eabi_init.cpp:55` | `__flush_cache` | body | ORIGINAL-ASM | Same function is asm in [ogws __ppc_eabi_init.c](https://github.com/doldecomp/ogws/blob/master/src/revolution/OS/__ppc_eabi_init.c#L31). |
|
||||
| `libs/RVL_SDK/src/os/__ppc_eabi_init.cpp:85` | `__init_user` | body | ORIGINAL-ASM | Same function is asm in [ogws __ppc_eabi_init.c](https://github.com/doldecomp/ogws/blob/master/src/revolution/OS/__ppc_eabi_init.c#L55). |
|
||||
| `libs/RVL_SDK/src/sdi/sdi_api.c:785` | `ISD_GetCardSize` | body | PLACEHOLDER | CSD bitfield decoding and arithmetic; no special-register operation. |
|
||||
| `libs/RevoEX/src/cdb/CDBDatabase.c:399` | `CDBDatabaseSearchRecordLayer` | body | PLACEHOLDER | Database traversal or filename checks with ordinary data access and calls. |
|
||||
| `libs/RevoEX/src/cdb/CDBDatabase.c:892` | `CDBDatabaseSearchMinuteLayer` | body | PLACEHOLDER | Database traversal or filename checks with ordinary data access and calls. |
|
||||
| `libs/RevoEX/src/cdb/CDBDatabase.c:1154` | `CDBDatabaseSearchHourLayer` | body | PLACEHOLDER | Database traversal or filename checks with ordinary data access and calls. |
|
||||
| `libs/RevoEX/src/cdb/CDBDatabase.c:1411` | `CDBDatabaseSearchDayLayer` | body | PLACEHOLDER | Database traversal or filename checks with ordinary data access and calls. |
|
||||
| `libs/RevoEX/src/cdb/CDBDatabase.c:1693` | `CDBDatabaseSearchMonthLayer` | body | PLACEHOLDER | Database traversal or filename checks with ordinary data access and calls. |
|
||||
| `libs/RevoEX/src/cdb/CDBDatabase.c:1963` | `CDBDatabaseSearchYearLayer` | body | PLACEHOLDER | Database traversal or filename checks with ordinary data access and calls. |
|
||||
| `libs/RevoEX/src/cdb/CDBFileSystemUtils.c:112` | `CDBFSIsCDBFileOnSD` | body | PLACEHOLDER | Database traversal or filename checks with ordinary data access and calls. |
|
||||
| `libs/RevoEX/src/nwc24/NWC24Manage.c:305` | `NWC24Check` | body | PLACEHOLDER | Account validation and integer bit operations, expressible in C. |
|
||||
| `libs/RevoEX/src/nwc24/NWC24UserId.c:11` | `NWC24CheckUserId` | body | PLACEHOLDER | Account validation and integer bit operations, expressible in C. |
|
||||
| `libs/RevoEX/src/nwc24/NWC24UserId.c:95` | `getUnScrambleId` | body | PLACEHOLDER | Account validation and integer bit operations, expressible in C. |
|
||||
| `libs/RevoEX/src/vf/develop/nand_drv.c:420` | `_MountPrfFile` | body | PLACEHOLDER | Profile-file mounting and error-handling control flow. |
|
||||
| `libs/RevoEX/src/wd/WDScan.c:313` | `WDiFindVendorSpecificIE` | body | PLACEHOLDER | Vendor information-element search and byte comparisons. |
|
||||
| `libs/Runtime/src/Gecko_setjmp.c:30` | `__setjmp` | body | ORIGINAL-ASM | Saves or restores caller GPRs/FPRs, LR, CR, and stack state across nonlocal returns. |
|
||||
| `libs/Runtime/src/Gecko_setjmp.c:79` | `longjmp` | body | ORIGINAL-ASM | Saves or restores caller GPRs/FPRs, LR, CR, and stack state across nonlocal returns. |
|
||||
| `libs/Runtime/src/__init_cpp_exceptions.cpp:23` | `__exception_info_constants` | block 1 | ORIGINAL-ASM | Reads the caller ABI TOC register r2 directly for exception registration. |
|
||||
| `libs/Runtime/src/ptmf.c:13` | `__ptmf_scall` | body | ORIGINAL-ASM | Same function is asm in [ogws ptmf.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/ptmf.c#L37). |
|
||||
| `libs/Runtime/src/runtime.c:101` | `__cvt_fp2unsigned` | body | ORIGINAL-ASM | Same function is asm in [ogws runtime.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/runtime.c#L9). |
|
||||
| `libs/Runtime/src/runtime.c:138` | `__save_fpr` | body | ORIGINAL-ASM | Same function is asm in [ogws runtime.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/runtime.c#L82). |
|
||||
| `libs/Runtime/src/runtime.c:182` | `__restore_fpr` | body | ORIGINAL-ASM | Same function is asm in [ogws runtime.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/runtime.c#L95). |
|
||||
| `libs/Runtime/src/runtime.c:225` | `__save_gpr` | body | ORIGINAL-ASM | Same function is asm in [ogws runtime.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/runtime.c#L108). |
|
||||
| `libs/Runtime/src/runtime.c:268` | `__restore_gpr` | body | ORIGINAL-ASM | Same function is asm in [ogws runtime.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/runtime.c#L121). |
|
||||
| `libs/Runtime/src/runtime.c:311` | `__div2u` | body | ORIGINAL-ASM | Same function is asm in [ogws runtime.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/runtime.c#L130). |
|
||||
| `libs/Runtime/src/runtime.c:384` | `__div2i` | body | ORIGINAL-ASM | Same function is asm in [ogws runtime.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/runtime.c#L214). |
|
||||
| `libs/Runtime/src/runtime.c:480` | `__mod2u` | body | ORIGINAL-ASM | Same function is asm in [ogws runtime.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/runtime.c#L325). |
|
||||
| `libs/Runtime/src/runtime.c:551` | `__mod2i` | body | ORIGINAL-ASM | Same function is asm in [ogws runtime.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/runtime.c#L407). |
|
||||
| `libs/Runtime/src/runtime.c:635` | `__shl2i` | body | ORIGINAL-ASM | Same function is asm in [ogws runtime.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/runtime.c#L505). |
|
||||
| `libs/Runtime/src/runtime.c:649` | `__shr2u` | body | ORIGINAL-ASM | Compiler shift-helper register convention: r3:r4 is the 64-bit operand/result and r5 is the shift count. |
|
||||
| `libs/Runtime/src/runtime.c:663` | `__shr2i` | body | ORIGINAL-ASM | Compiler shift-helper register convention: r3:r4 is the 64-bit operand/result and r5 is the shift count. |
|
||||
| `libs/Runtime/src/runtime.c:679` | `__cvt_sll_dbl` | body | ORIGINAL-ASM | Compiler conversion-helper register convention: r3:r4 input, f1 result, and explicit carry/rounding operations. |
|
||||
| `libs/Runtime/src/runtime.c:732` | `__cvt_ull_dbl` | body | ORIGINAL-ASM | Compiler conversion-helper register convention: r3:r4 input, f1 result, and explicit carry/rounding operations. |
|
||||
| `libs/Runtime/src/runtime.c:779` | `__cvt_ull_flt` | body | ORIGINAL-ASM | Compiler conversion-helper register convention: r3:r4 input, f1 result, and explicit carry/rounding operations. |
|
||||
| `libs/Runtime/src/runtime.c:827` | `__cvt_dbl_usll` | body | ORIGINAL-ASM | Compiler conversion-helper register convention: f1 input and r3:r4 integer result without a recursive compiler conversion call. |
|
||||
| `libs/Runtime/src/runtime.c:889` | `__cvt_dbl_ull` | body | ORIGINAL-ASM | Same function is asm in [ogws runtime.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/runtime.c#L523). |
|
||||
53
tools/decomp-assist/card-result-initialization-audit.md
Normal file
53
tools/decomp-assist/card-result-initialization-audit.md
Normal file
@@ -0,0 +1,53 @@
|
||||
# MemoryCardManager result initialization
|
||||
|
||||
Base: `f8957ca9`. Branch: `agent/fix/card-result-initialization`.
|
||||
One bounded source trial: initialize `result` from the existing `file` value in
|
||||
`isMoveEnable` and `isCopyEnable`. No conditions, shared reads, error priorities,
|
||||
headers, compiler flags, or Matching classifications changed.
|
||||
|
||||
## Target evidence
|
||||
|
||||
Both original functions are 0x1D8 bytes / 118 instructions. At function offset
|
||||
0x4C, `lwz r29,8(r5)` loads `mFile[slot][index].fileNo`. Each ordinary result
|
||||
branch replaces r29 with its error/success code. If the initial eligibility test
|
||||
fails but the second pass finds every condition favorable, the final test at
|
||||
0x1A8 branches directly to the output check without replacing r29; the store at
|
||||
0x1B8 writes that retained file number through `code`.
|
||||
|
||||
That path is relevant because card state is shared with the card thread. For
|
||||
example, the first `isDistSlot` can observe a non-ready slot, and the second can
|
||||
observe a ready slot with otherwise favorable conditions. The old C++ left
|
||||
`result` uninitialized on this path. The target retained the file value.
|
||||
`file` is `u32` (`unsigned long`); the output is `long`, both 32-bit for this
|
||||
target. Valid directory indices are representable in both types. The retained
|
||||
`long result = file;` expresses the target's existing value lifetime.
|
||||
|
||||
## Independent leaf verification
|
||||
|
||||
Configured 43U with explicit local compiler/tool paths. Rebuilt the unmodified
|
||||
baseline in this leaf before editing and preserved its report, object, DOL,
|
||||
all-source-object hashes, and original-function disassembly. The sole candidate
|
||||
was then compiled and the full 43U build, report, and `build/43U/ok` rerun.
|
||||
|
||||
- The complete MemoryCardManager object is byte-identical to the fresh baseline
|
||||
(SHA256 `aa01d4ef861b2dd2e796ee3ffc1853de63dc0e7bed1245b46375aa51a3b62d4f`).
|
||||
- All 1027 source-object SHA256 values are unchanged.
|
||||
- Every report unit entry and all global measures are unchanged.
|
||||
- Both edited functions remain objdiff 100%, 118/118 instructions, zero decoded
|
||||
instruction differences against the original objects.
|
||||
- All 23 previously exact functions in the 26-function unit retain zero
|
||||
instruction differences. Code remains 4080/5396 bytes exact, with unchanged
|
||||
fuzzy score 98.22832%. The unit remains NonMatching and has no owned data.
|
||||
- Pool audit passes (0/0 strings). Literal-reference audit analyzes all 23 exact
|
||||
functions with zero candidates, skips, or errors; there are no string
|
||||
arguments to compare.
|
||||
- Full 43U build passes. DOL bytes equal the baseline and SHA1 is
|
||||
`26116613f624061ba99c8d1a299aaa6efa85670d`.
|
||||
- `git diff --check` passes. No additional source trial was attempted.
|
||||
|
||||
Local evidence is preserved under `build/card-result-review/`: baseline and
|
||||
candidate reports/objects/DOLs, object hashes, build logs, target disassembly,
|
||||
`target-result-dataflow.json`, `pool.txt`, `literals.txt`, and `validation.json`.
|
||||
|
||||
GATE PASS: binary-neutral source-defined initialization; exact siblings,
|
||||
code/data/link measures, all source-object bytes, and full-build/DOL preserved.
|
||||
67
tools/decomp-assist/cdb-unify-arity.attempts.md
Normal file
67
tools/decomp-assist/cdb-unify-arity.attempts.md
Normal file
@@ -0,0 +1,67 @@
|
||||
# Unify CDB helper signatures
|
||||
|
||||
Base: f8957ca95be0ca4b35a281fa9a5d59f7f1787a41.
|
||||
Branch: agent/fix/cdb-unify-arity.
|
||||
Scope: CDBDate.h, CDBConv.h, CDBConv.c, CDBDatabase.c.
|
||||
|
||||
## Reason and consumer audit
|
||||
|
||||
PR #1167 introduced shorter declarations visible only to CDBDatabase.c while
|
||||
CDBConv.c retained the old, longer definitions. Unused trailing machine
|
||||
arguments do not make these incompatible C function types valid.
|
||||
|
||||
Unify declarations and definitions around the arguments used by the target:
|
||||
DayBegin/DayEnd take three ints, MonthBegin/MonthEnd two, YearBegin/YearEnd
|
||||
one, and CDBConvDirStrToCDBDate five character pointers. Remove the
|
||||
CDB_DATABASE_IMPLEMENTATION guard. MonthEnd's former day parameter becomes
|
||||
a local assigned in every switch arm, including default, before any read.
|
||||
All seven external names, linkage, return types, and linked bytes are retained.
|
||||
|
||||
The complete original 43U object relocation audit found 13 call relocations,
|
||||
all in CDBDatabase: one directory conversion and two calls to each of the six
|
||||
date boundary helpers. The only additional 12 relocations were MonthEnd's
|
||||
internal switch destinations. Decoding direct branches throughout the original
|
||||
DOL confirmed the same 13 calls. No literal entry-address references, dynamic
|
||||
ELF sections, relevant export list, or REL/RSO modules were found. These checks
|
||||
cover observed 43U consumers, not hypothetical external fixed-address callers.
|
||||
None of the removed trailing arguments is read by the helper implementations.
|
||||
|
||||
## One bounded source attempt
|
||||
|
||||
Applied the four-file signature correction directly, with no code-generation
|
||||
tuning, new assembly, volatile casts, dummy arguments, or unrelated source edits.
|
||||
Configured only 43U with the existing local compiler, binutils and wrapper paths.
|
||||
Ran the complete default build, then progress, report and build/43U/ok targets.
|
||||
|
||||
Fresh results:
|
||||
|
||||
- CDBConv: 39/39 original functions, 4676/4676 code bytes, 232/232 data bytes;
|
||||
matched and linked code/data all 100%.
|
||||
- CDBDatabase: 33/33 original functions, 12152/12152 code bytes, 312/312 data
|
||||
bytes; matched and linked code/data all 100%.
|
||||
- All 72 exact-name original functions have identical raw instruction bytes,
|
||||
position-normalized Capstone instructions and normalized relocation targets.
|
||||
- Every allocated section and compiled function body is identical to the
|
||||
pre-edit source-object baseline. Existing line-number-derived FORCEACTIVE
|
||||
helper names move from 132/313 to 134/315; their bodies do not change.
|
||||
- String pools: CDBConv 5/5, CDBDatabase 7/7, both identical.
|
||||
- Literal audit: 31 arguments, 72 functions, zero skipped functions, candidates
|
||||
or errors.
|
||||
- MonthEnd jump table: 12/12 destinations identical.
|
||||
- All 1027 report units retain identical measures and section results versus
|
||||
the preserved baseline; global measures are identical.
|
||||
- Full build and build/43U/ok pass.
|
||||
- Original and rebuilt DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d.
|
||||
- git diff --check passes.
|
||||
|
||||
Global completion was also checked. It still fails the pre-existing incomplete
|
||||
project totals (2778928/2995176 matched code, 2312404/2995176 linked code,
|
||||
1832576/1832684 matched data, 1545364/1832684 linked data). This correction
|
||||
makes no new decompilation or completion-percentage claim.
|
||||
|
||||
GATE PASS: bounded signature correction; no exact, data, function or link
|
||||
regression. Independent parent verification is still required before landing.
|
||||
|
||||
Transient validation evidence is in build/cdb-arity-review/: the preserved
|
||||
baseline report/objects, full-build.log, final-gates.log, check_objects.py,
|
||||
object-gates.log, status.json, status.md and completion.log.
|
||||
451
tools/decomp-assist/da2-deasm.attempts.md
Normal file
451
tools/decomp-assist/da2-deasm.attempts.md
Normal file
@@ -0,0 +1,451 @@
|
||||
# da2 de-asm attempts
|
||||
|
||||
Base: 9d40859ee8f4ee37dc692e444727d17367bfcbeb, agent/w1005/da2.
|
||||
Scope: CDBDatabase, CDBFileSystemUtils, NWC24Manage, NWC24UserId, vf/develop/nand_drv, WDScan.
|
||||
All six units begin linked with every function, code byte and data byte exact.
|
||||
Initial DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d.
|
||||
Each conversion starts from the original-object Ghidra export, uses typed C, and requires identical pools, exact objdiff, zero ctxdiff differences and a full gate before its own commit.
|
||||
Evidence files live in build/da2 while this run is active. Rejected conversions restore the existing asm before final verification.
|
||||
|
||||
CDBDatabaseSearchCallCallback / callback-1: Ghidra callback branch with typed instance flags and success nesting. objdiff 100.0%; POOL IDENTICAL up to 7 (mine=7 base=7); src 0xf4 base 0xf4 insns 61/61; diffs 0: []
|
||||
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] pool: IDENTICAL
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] objdiff: code 12152/12152 data 312/312 functions 33/33 fuzzy 100.0000 linked code 12152
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] instruction-exact functions: 33/33
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] section .data size 312 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] section .text size 12152 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] baseline: code 12152/12152 data 312 functions 33 fuzzy 100.0000
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 92.73726 -> 92.73726
|
||||
global fuzzy_match_percent: 99.78007 -> 99.78007
|
||||
global complete_code_percent: 76.40339 -> 76.40339
|
||||
global matched_data_percent: 99.99410 -> 99.99410
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
GATE PASS
|
||||
CDBDatabaseSearchRecordLayer / record-1: Ghidra traversal with typed search buffer and record key array, current directory date prototype. objdiff 97.76286%; POOL IDENTICAL up to 7 (mine=7 base=7); src 0x704 base 0x6fc insns 449/447; --- replace mine 6:7 base 6:9
|
||||
|
||||
CDBDatabaseSearchRecordLayer / record-2: Separate dictionary result to preserve call order, finished local before path bounds. objdiff 98.85906%; POOL IDENTICAL up to 7 (mine=7 base=7); src 0x704 base 0x6fc insns 449/447; --- replace mine 6:7 base 6:9
|
||||
|
||||
CDBDatabaseSearchRecordLayer / record-3: Repair five-argument target call through guarded header declaration; other translation units retain existing prototype. objdiff 100.0%; POOL IDENTICAL up to 7 (mine=7 base=7); src 0x6fc base 0x6fc insns 447/447; diffs 0: []
|
||||
|
||||
Record-layer evidence: the target only prepares r3-r7 for CDBConvDirStrToCDBDate, and CDBConv.c only consumes the five directory strings. The header currently advertises two unused trailing arguments. CDB_DATABASE_IMPLEMENTATION scopes the accurate five-argument declaration to this unit; no other source or output changes. The key storage starts at instance+8 because CDBRecordKey has 8-byte alignment; a typed prefix view replaces byte-offset casts.
|
||||
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] pool: IDENTICAL
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] objdiff: code 12152/12152 data 312/312 functions 33/33 fuzzy 100.0000 linked code 12152
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] instruction-exact functions: 33/33
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] section .data size 312 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] section .text size 12152 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] baseline: code 12152/12152 data 312 functions 33 fuzzy 100.0000
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 92.73726 -> 92.73726
|
||||
global fuzzy_match_percent: 99.78007 -> 99.78007
|
||||
global complete_code_percent: 76.40339 -> 76.40339
|
||||
global matched_data_percent: 99.99410 -> 99.99410
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
GATE PASS
|
||||
CDBDatabaseSearchMinuteLayer / minute-1: Ghidra two-location directory batching with typed integer array and separate dictionary result. objdiff 99.82758%; POOL IDENTICAL up to 7 (mine=7 base=7); src 0x3a0 base 0x3a0 insns 232/232; diffs 7: [154, 156, 159, 161, 180, 183, 186]
|
||||
|
||||
CDBDatabaseSearchMinuteLayer / minute-2: Branch-local forward iterator and current pointer declarations. objdiff 100.0%; POOL IDENTICAL up to 7 (mine=7 base=7); src 0x3a0 base 0x3a0 insns 232/232; diffs 0: []
|
||||
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] pool: IDENTICAL
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] objdiff: code 12152/12152 data 312/312 functions 33/33 fuzzy 100.0000 linked code 12152
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] instruction-exact functions: 33/33
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] section .data size 312 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] section .text size 12152 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] baseline: code 12152/12152 data 312 functions 33 fuzzy 100.0000
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 92.73726 -> 92.73726
|
||||
global fuzzy_match_percent: 99.78007 -> 99.78007
|
||||
global complete_code_percent: 76.40339 -> 76.40339
|
||||
global matched_data_percent: 99.99410 -> 99.99410
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
GATE PASS
|
||||
CDBDatabaseSearchHourLayer / hour-1: Ghidra hour search with branch-local forward iterator. objdiff 100.0%; POOL IDENTICAL up to 7 (mine=7 base=7); src 0x38c base 0x38c insns 227/227; diffs 0: []
|
||||
|
||||
CDBDatabaseSearchDayLayer / day-1: Ghidra day filter and traversal using earlier branch-local iterator fix. COMPILE FAILED.
|
||||
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] pool: IDENTICAL
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] objdiff: code 12152/12152 data 312/312 functions 33/33 fuzzy 100.0000 linked code 12152
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] instruction-exact functions: 33/33
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] section .data size 312 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] section .text size 12152 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] baseline: code 12152/12152 data 312 functions 33 fuzzy 100.0000
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 92.73726 -> 92.73726
|
||||
global fuzzy_match_percent: 99.78007 -> 99.78007
|
||||
global complete_code_percent: 76.40339 -> 76.40339
|
||||
global matched_data_percent: 99.99410 -> 99.99410
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
GATE PASS
|
||||
CDBDatabaseSearchDayLayer / day-2: Scoped date-boundary signatures now match actual used arguments, Ghidra day traversal. objdiff 98.63095%; POOL IDENTICAL up to 7 (mine=7 base=7); src 0x3f0 base 0x3f0 insns 252/252; diffs 63: [12, 13, 15, 19, 34, 39, 41, 47, 48, 52, 56, 61, 75, 79, 81, 85, 89, 95, 96, 100]
|
||||
|
||||
CDBDatabaseSearchDayLayer / day-3: Date predicates follow target compare operand order. objdiff 98.86905%; POOL IDENTICAL up to 7 (mine=7 base=7); src 0x3f0 base 0x3f0 insns 252/252; diffs 55: [12, 13, 15, 19, 34, 39, 41, 47, 48, 52, 56, 61, 75, 79, 81, 85, 89, 95, 96, 100]
|
||||
|
||||
CDBDatabaseSearchDayLayer / day-4: Outer typed iterator locals precede directory state. objdiff 99.80159%; POOL IDENTICAL up to 7 (mine=7 base=7); src 0x3f0 base 0x3f0 insns 252/252; diffs 9: [150, 152, 155, 157, 163, 170, 188, 191, 194]
|
||||
|
||||
CDBDatabaseSearchDayLayer / day-5: Forward and reverse loop counters are distinct outer locals. objdiff 99.60317%; POOL IDENTICAL up to 7 (mine=7 base=7); src 0x3f0 base 0x3f0 insns 252/252; diffs 18: [150, 152, 155, 157, 163, 170, 188, 191, 194, 199, 201, 204, 206, 212, 219, 237, 240, 241]
|
||||
|
||||
CDBDatabaseSearchDayLayer / day-6: Outer reverse locals plus branch-local forward iterator pair. objdiff 99.60317%; POOL IDENTICAL up to 7 (mine=7 base=7); src 0x3f0 base 0x3f0 insns 252/252; diffs 18: [150, 152, 155, 157, 163, 170, 188, 191, 194, 199, 201, 204, 206, 212, 219, 237, 240, 241]
|
||||
|
||||
CDBDatabaseSearchDayLayer / day-7: Iterator index declared before the pointer in each scope. objdiff 100.0%; POOL IDENTICAL up to 7 (mine=7 base=7); src 0x3f0 base 0x3f0 insns 252/252; diffs 0: []
|
||||
|
||||
Day-layer signature proof: CDBConv.c's DayBegin/DayEnd ignore the final three declared parameters; MonthBegin/MonthEnd ignore four, and YearBegin/YearEnd ignore five. Target calls pass only the calendar components used. The accurate declarations use the existing CDB_DATABASE_IMPLEMENTATION guard to leave every other translation unit unchanged. Day comparisons now use the target's operand order. All remaining day differences were resolved by iterator declaration scope and order.
|
||||
|
||||
CDBDatabaseSearchMonthLayer / month-1: Ghidra month traversal with corrected signatures and iterator order. objdiff 100.0%; POOL IDENTICAL up to 7 (mine=7 base=7); insns 240/240; positional diffs 0.
|
||||
|
||||
NWC24CheckUserId / usercheck-1: Ghidra area checks and CRC loop in existing file style. objdiff 95.50848%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 59/59; positional diffs 13.
|
||||
|
||||
_MountPrfFile / nand-1: Existing C fallback checked against Ghidra using native retry helpers. objdiff 97.511734%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 424/426; positional diffs 386.
|
||||
|
||||
WDiFindVendorSpecificIE / vendor-1: Ghidra traversal using WD vendor element fields and cached mode. objdiff 96.53846%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 65/65; positional diffs 35.
|
||||
|
||||
NWC24Check / manage-1: Original-object Ghidra flow with News Channel prior C and current SDK type names. objdiff 100.0%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 119/119; positional diffs 0.
|
||||
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] pool: IDENTICAL
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] objdiff: code 12152/12152 data 312/312 functions 33/33 fuzzy 100.0000 linked code 12152
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] instruction-exact functions: 33/33
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] section .data size 312 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] section .text size 12152 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] baseline: code 12152/12152 data 312 functions 33 fuzzy 100.0000
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 92.73726 -> 92.73726
|
||||
global fuzzy_match_percent: 99.78007 -> 99.78007
|
||||
global complete_code_percent: 76.40339 -> 76.40339
|
||||
global matched_data_percent: 99.99410 -> 99.99410
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
GATE PASS
|
||||
NWC24CheckUserId / usercheck-2: CRC iterator declared before area fields in lifetime order. objdiff 100.0%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 59/59; positional diffs 0.
|
||||
|
||||
CDBDatabaseSearchMonthLayer / month-live: Fresh worktree object confirms isolated exact candidate. objdiff 100.0%; POOL IDENTICAL up to 7 (mine=7 base=7); src 0x3c0 base 0x3c0 insns 240/240; diffs 0: []
|
||||
|
||||
CDBDatabaseSearchYearLayer / year-1: Ghidra root search with date boundary helpers and typed iterator scopes. objdiff 100.0%; POOL IDENTICAL up to 7 (mine=7 base=7); insns 222/222; positional diffs 0.
|
||||
|
||||
CDBFSIsCDBFileOnSD / fsutils-1: Ghidra hexadecimal digit pairs agree with existing C fallback. objdiff 98.85827%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 127/127; positional diffs 20.
|
||||
|
||||
CDBFSIsCDBFileOnSD / fsutils-2: Declare hexadecimal loop counters before character pointer. objdiff 98.74016%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 127/127; positional diffs 22.
|
||||
|
||||
WDiFindVendorSpecificIE / vendor-2: Typed output locals and signed two-byte IE header increment. objdiff 98.53846%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 65/65; positional diffs 14.
|
||||
|
||||
WDiFindVendorSpecificIE / vendor-3: Length local precedes found state; compound offset increment. COMPILE FAILED.
|
||||
|
||||
CDBFSIsCDBFileOnSD / fsutils-3: Explicit pair validation avoids inner-loop induction temporary. objdiff 97.20473%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 125/127; positional diffs 104.
|
||||
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] pool: IDENTICAL
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] objdiff: code 12152/12152 data 312/312 functions 33/33 fuzzy 100.0000 linked code 12152
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] instruction-exact functions: 33/33
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] section .data size 312 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] section .text size 12152 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] baseline: code 12152/12152 data 312 functions 33 fuzzy 100.0000
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 92.73726 -> 92.73726
|
||||
global fuzzy_match_percent: 99.78007 -> 99.78007
|
||||
global complete_code_percent: 76.40339 -> 76.40339
|
||||
global matched_data_percent: 99.99410 -> 99.99410
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
GATE PASS
|
||||
WDiFindVendorSpecificIE / vendor-4: C89 declaration order for length and signed compound offset. objdiff 99.84615%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 65/65; positional diffs 1.
|
||||
|
||||
CDBDatabaseSearchYearLayer / year-live: Fresh object verifies exact root traversal. objdiff 100.0%; POOL IDENTICAL up to 7 (mine=7 base=7); src 0x378 base 0x378 insns 222/222; diffs 0: []
|
||||
|
||||
CDBFSIsCDBFileOnSD / fsutils-4: Static inline character validation helper around ctype conversion. objdiff 93.97638%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 132/127; positional diffs 112.
|
||||
|
||||
CDBFSIsCDBFileOnSD / fsutils-5: Direct filename indexing removes cached element pointer. objdiff 97.125984%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 128/127; positional diffs 117.
|
||||
|
||||
CDBFSIsCDBFileOnSD / fsutils-6: Function-scope pointer and loop counters, assignment after length check. objdiff 98.85827%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 127/127; positional diffs 20.
|
||||
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] pool: IDENTICAL
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] objdiff: code 12152/12152 data 312/312 functions 33/33 fuzzy 100.0000 linked code 12152
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] instruction-exact functions: 33/33
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] section .data size 312 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] section .text size 12152 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] baseline: code 12152/12152 data 312 functions 33 fuzzy 100.0000
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 92.73726 -> 92.73726
|
||||
global fuzzy_match_percent: 99.78007 -> 99.78007
|
||||
global complete_code_percent: 76.40339 -> 76.40339
|
||||
global matched_data_percent: 99.99410 -> 99.99410
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
GATE PASS
|
||||
NWC24Check / manage-live: Prior C adapted to local SDK declarations, isolated exact candidate verified in worktree. objdiff 100.0%; POOL IDENTICAL up to 0 (mine=0 base=0); src 0x1dc base 0x1dc insns 119/119; diffs 0: []
|
||||
|
||||
WDiFindVendorSpecificIE / vendor-5: Unsigned IE length gives target addition operand order. objdiff 99.84615%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 65/65; positional diffs 1.
|
||||
|
||||
WDiFindVendorSpecificIE / vendor-6: Offset-first source sum leaves loaded length first in target instruction. objdiff 99.84615%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 65/65; positional diffs 1.
|
||||
|
||||
WDiFindVendorSpecificIE / vendor-7: Inline helper for the information-element offset step. objdiff 99.84615%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 65/65; positional diffs 1.
|
||||
|
||||
NWC24Check prior source: https://raw.githubusercontent.com/hotlandsoftware/wii-news-channel/main/src/revolution/NWC24/NWC24Manage.c . The original-object Ghidra control flow agrees with that C implementation. SDK names adapted locally; exact 119/119 instructions.
|
||||
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RevoEX/src/nwc24/NWC24Manage] pool: IDENTICAL
|
||||
[libs/RevoEX/src/nwc24/NWC24Manage] objdiff: code 3784/3784 data 336/336 functions 21/21 fuzzy 100.0000 linked code 3784
|
||||
[libs/RevoEX/src/nwc24/NWC24Manage] instruction-exact functions: 21/21
|
||||
[libs/RevoEX/src/nwc24/NWC24Manage] section .bss size 32 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24Manage] section .data size 272 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24Manage] section .sbss size 24 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24Manage] section .sdata size 8 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24Manage] section .text size 3784 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24Manage] baseline: code 3784/3784 data 336 functions 21 fuzzy 100.0000
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 92.73726 -> 92.73726
|
||||
global fuzzy_match_percent: 99.78007 -> 99.78007
|
||||
global complete_code_percent: 76.40339 -> 76.40339
|
||||
global matched_data_percent: 99.99410 -> 99.99410
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
GATE PASS
|
||||
NWC24CheckUserId / usercheck-live: Verify area and CRC checks in the live object. objdiff 100.0%; POOL IDENTICAL up to 0 (mine=0 base=0); src 0xec base 0xec insns 59/59; diffs 0: []
|
||||
|
||||
_MountPrfFile / nand-2: Remove dead initial values and separate read result from open result. objdiff 97.511734%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 424/426; positional diffs 386.
|
||||
|
||||
CDBFSIsCDBFileOnSD / fsutils-7: Inline helper owns prefix walker and nested hexadecimal loops. objdiff 95.03937%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 132/127; positional diffs 87.
|
||||
|
||||
getUnScrambleId / unscramble-1: Ghidra permutation reconstructed as 53-bit rotate, byte permutation, inverse nibble substitution. objdiff 50.298138%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 162/161; positional diffs 157.
|
||||
|
||||
getUnScrambleId / unscramble-2: 64-bit byte helper values preserve masks across inline boundaries. objdiff 49.826088%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 164/161; positional diffs 160.
|
||||
|
||||
getUnScrambleId / unscramble-3: Mask the rotated 53-bit result after the left shift. objdiff 40.51553%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 165/161; positional diffs 161.
|
||||
|
||||
_MountPrfFile / nand-3: Natural null test and grouped big-endian header words. objdiff 100.0%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 426/426; positional diffs 0.
|
||||
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RevoEX/src/nwc24/NWC24UserId] pool: IDENTICAL
|
||||
[libs/RevoEX/src/nwc24/NWC24UserId] objdiff: code 1032/1032 data 16/16 functions 3/3 fuzzy 100.0000 linked code 1032
|
||||
[libs/RevoEX/src/nwc24/NWC24UserId] instruction-exact functions: 3/3
|
||||
[libs/RevoEX/src/nwc24/NWC24UserId] section .rodata size 16 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24UserId] section .text size 1032 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24UserId] baseline: code 1032/1032 data 16 functions 3 fuzzy 100.0000
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 92.73726 -> 92.73726
|
||||
global fuzzy_match_percent: 99.78007 -> 99.78007
|
||||
global complete_code_percent: 76.40339 -> 76.40339
|
||||
global matched_data_percent: 99.99410 -> 99.99410
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
GATE PASS
|
||||
_MountPrfFile / nand-live: Verify native C mount with grouped header decoding. objdiff 100.0%; POOL IDENTICAL up to 0 (mine=0 base=0); src 0x6a8 base 0x6a8 insns 426/426; diffs 0: []
|
||||
|
||||
WDiFindVendorSpecificIE / vendor-8: Simplify source-search result to output local declaration order only. objdiff 99.84615%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 65/65; positional diffs 1.
|
||||
|
||||
getUnScrambleId / unscramble-4: Byte replacement helper mutates a typed 64-bit value in place. objdiff 39.62733%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 169/161; positional diffs 159.
|
||||
|
||||
WDiFindVendorSpecificIE / vendor-min-0: Single null-check operand reversal: element-success. objdiff 99.84615%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 65/65; positional diffs 1.
|
||||
|
||||
WDiFindVendorSpecificIE / vendor-min-1: Single null-check operand reversal: length-success. objdiff 99.84615%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 65/65; positional diffs 1.
|
||||
|
||||
WDiFindVendorSpecificIE / vendor-min-2: Single null-check operand reversal: element-failure. objdiff 99.84615%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 65/65; positional diffs 1.
|
||||
|
||||
CDBFSIsCDBFileOnSD / fsutils-8: Integer loop counters for the four pairs and extension. objdiff 97.28346%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 125/127; positional diffs 116.
|
||||
|
||||
WDiFindVendorSpecificIE / vendor-9: Signed SDK width for offset without reordered null tests. objdiff 100.0%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 65/65; positional diffs 0.
|
||||
|
||||
CDBFSIsCDBFileOnSD / fsutils-type-signed: Counter types s8 i, j;. objdiff 98.85827%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 127/127; positional diffs 20.
|
||||
|
||||
CDBFSIsCDBFileOnSD / fsutils-type-unsigned: Counter types u8 i, j;. objdiff 98.85827%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 127/127; positional diffs 20.
|
||||
|
||||
CDBFSIsCDBFileOnSD / fsutils-type-mixed: Counter types char i; int j;. objdiff 98.85827%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 127/127; positional diffs 20.
|
||||
|
||||
CDBFSIsCDBFileOnSD / fsutils-type-long: Counter types char i; s32 j;. objdiff 98.85827%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 127/127; positional diffs 20.
|
||||
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RevoEX/src/vf/develop/nand_drv] pool: IDENTICAL
|
||||
[libs/RevoEX/src/vf/develop/nand_drv] objdiff: code 12144/12144 data 464/464 functions 33/33 fuzzy 100.0000 linked code 12144
|
||||
[libs/RevoEX/src/vf/develop/nand_drv] instruction-exact functions: 33/33
|
||||
[libs/RevoEX/src/vf/develop/nand_drv] section .bss size 424 match 100.0
|
||||
[libs/RevoEX/src/vf/develop/nand_drv] section .rodata size 32 match 100.0
|
||||
[libs/RevoEX/src/vf/develop/nand_drv] section .sbss size 8 match 100.0
|
||||
[libs/RevoEX/src/vf/develop/nand_drv] section .text size 12144 match 100.0
|
||||
[libs/RevoEX/src/vf/develop/nand_drv] baseline: code 12144/12144 data 464 functions 33 fuzzy 100.0000
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 92.73726 -> 92.73726
|
||||
global fuzzy_match_percent: 99.78007 -> 99.78007
|
||||
global complete_code_percent: 76.40339 -> 76.40339
|
||||
global matched_data_percent: 99.99410 -> 99.99410
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
GATE PASS
|
||||
getUnScrambleId / unscramble-5: Unsigned byte positions and explicit ten-bit wraparound mask. objdiff 50.701862%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 161/161; positional diffs 155.
|
||||
|
||||
WDiFindVendorSpecificIE / vendor-live: Minimal C body uses s32 offset, existing neighboring functions unchanged. objdiff 100.0%; POOL IDENTICAL up to 0 (mine=0 base=0); src 0x104 base 0x104 insns 65/65; diffs 0: []
|
||||
|
||||
CDBFSIsCDBFileOnSD / fsutils-9: One-field cursor struct changes pointer temporary ownership. objdiff 99.09449%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 127/127; positional diffs 17.
|
||||
|
||||
CDBFSIsCDBFileOnSD / fsutils-10: Inline helper separates filename format validation from bounded length check. objdiff 98.74016%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 127/127; positional diffs 22.
|
||||
|
||||
CDBFSIsCDBFileOnSD / fsutils-11: Advance parameter as the prefix walker and preserve the filename for extension checks. objdiff 95.15748%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 129/127; positional diffs 122.
|
||||
|
||||
Wireless source search: stock srcsearch.py initially selected an earlier call site. A worktree-local copy anchors its function matcher to a definition; shared tools were not changed. Seed 25 found 100% after 11 trials. Removing unnecessary reordered null tests retained 100% when offset is s32. The SDK defines s32 as signed long, distinct from int for MWCC's expression lowering. Only the owned WDiFindVendorSpecificIE body and its now-unused asm helper declarations are changed.
|
||||
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RevoEX/src/wd/WDScan] pool: IDENTICAL
|
||||
[libs/RevoEX/src/wd/WDScan] objdiff: code 2180/2180 data 16/16 functions 5/5 fuzzy 100.0000 linked code 2180
|
||||
[libs/RevoEX/src/wd/WDScan] instruction-exact functions: 5/5
|
||||
[libs/RevoEX/src/wd/WDScan] section .sdata size 8 match 100.0
|
||||
[libs/RevoEX/src/wd/WDScan] section .sdata2 size 8 match 100.0
|
||||
[libs/RevoEX/src/wd/WDScan] section .text size 2180 match 100.0
|
||||
[libs/RevoEX/src/wd/WDScan] baseline: code 2180/2180 data 16 functions 5 fuzzy 100.0000
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 92.73726 -> 92.73726
|
||||
global fuzzy_match_percent: 99.78007 -> 99.78007
|
||||
global complete_code_percent: 76.40339 -> 76.40339
|
||||
global matched_data_percent: 99.99410 -> 99.99410
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
GATE PASS
|
||||
getUnScrambleId / unscramble-6: Repeated trial 5; the intended edit did not run because git diff --check caught an EOF blank line. Superseded by trial 6b. objdiff 50.701862%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 161/161; positional diffs 155.
|
||||
|
||||
getUnScrambleId / unscramble-6b: Corrected trial: SDK u32 byte access helpers with explicit byte-width mask. objdiff 48.714287%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 161/161; positional diffs 155.
|
||||
getUnScrambleId / unscramble-7b: Keep the target out-of-line boundary while factoring the byte permutation. objdiff 50.701862%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 161/161; positional diffs 155.
|
||||
|
||||
getUnScrambleId / unscramble-8: Direct byte expressions through macros instead of inline argument temporaries. objdiff 41.142857%; POOL IDENTICAL up to 0 (mine=0 base=0); insns 161/161; positional diffs 157.
|
||||
|
||||
|
||||
## Retained assembly and remaining work
|
||||
|
||||
CDBFSIsCDBFileOnSD remains the original exact asm. The best readable C trial, fsutils-9, has 127/127 instructions and 99.09449% objdiff, with 17 differences in registers r3/r4/r5 around ctype map access and the prefix walker. Tried nested and explicit paired loops, counters with char/s8/u8/int/s32 types, function and block scopes, typed helpers, direct indexing, a one-field cursor, and advancing the input parameter. A 120-second source search tried 217 variants from fsutils-1 without improvement. No C trial was retained. Best source and detailed diff: build/da2/fsutils-9/.
|
||||
|
||||
getUnScrambleId remains the original exact asm. The best C trial, unscramble-5, reaches 161/161 instructions but only 50.701862% objdiff and 155 positional differences, including instruction scheduling through byte permutation and register allocation. Tried u8/u32/u64 byte helpers, return-value and pointer setters, explicit rotation masks, a separate permutation helper, and direct macro expressions. A 180-second source search tried 292 variants with no improvement. Trial 7 inlined away the function; trial 7b restored its original call boundary with NO_INLINE and remained non-exact. No experimental helper, macro, attribute or C body was retained. Best source and detailed diff: build/da2/unscramble-5/. Neither remaining function is claimed to require assembly.
|
||||
|
||||
Both retained functions have more than three distinct compiled source attempts. No untried assignment remains. The two helper-signature header changes are scoped to CDB_DATABASE_IMPLEMENTATION; all other units keep their existing declarations.
|
||||
|
||||
## Converted functions and commits
|
||||
|
||||
143785b0 decomp(cdb): convert search callback to c
|
||||
ea8cd532 decomp(cdb): convert record search layer to c
|
||||
e5989e5e decomp(cdb): convert minute search layer to c
|
||||
4a653bb3 decomp(cdb): convert hour search layer to c
|
||||
952dd221 decomp(cdb): convert day search layer to c
|
||||
b72b9d27 decomp(cdb): convert month search layer to c
|
||||
88082111 decomp(cdb): convert year search layer to c
|
||||
0743c6da decomp(nwc24): convert library check to c
|
||||
a1d0e162 decomp(nwc24): convert user id validation to c
|
||||
19410104 decomp(vf): convert nand prf mount to c
|
||||
d612eee9 decomp(wd): convert vendor element search to c
|
||||
|
||||
## Baseline and final comparison
|
||||
|
||||
Unit | Exact functions | Matched code | Matched data | Asm bodies before -> after
|
||||
--- | --- | --- | --- | ---
|
||||
libs/RevoEX/src/cdb/CDBDatabase | 33 -> 33 | 12152 -> 12152 | 312 -> 312 | 7 -> 0
|
||||
libs/RevoEX/src/cdb/CDBFileSystemUtils | 11 -> 11 | 2480 -> 2480 | 8 -> 8 | 1 -> 1
|
||||
libs/RevoEX/src/nwc24/NWC24Manage | 21 -> 21 | 3784 -> 3784 | 336 -> 336 | 1 -> 0
|
||||
libs/RevoEX/src/nwc24/NWC24UserId | 3 -> 3 | 1032 -> 1032 | 16 -> 16 | 2 -> 1
|
||||
libs/RevoEX/src/vf/develop/nand_drv | 33 -> 33 | 12144 -> 12144 | 464 -> 464 | 1 -> 0
|
||||
libs/RevoEX/src/wd/WDScan | 5 -> 5 | 2180 -> 2180 | 16 -> 16 | 1 -> 0
|
||||
|
||||
Final full gate: clean 4.3U rebuild of all six units passed. The fresh report, object diffs, and DOL agree. Eleven assigned asm bodies are now exact C; the other two remain original asm with the failed C trials recorded above.
|
||||
|
||||
```text
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] pool: IDENTICAL
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] objdiff: code 12152/12152 data 312/312 functions 33/33 fuzzy 100.0000 linked code 12152
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] instruction-exact functions: 33/33
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] section .data size 312 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] section .text size 12152 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] baseline: code 12152/12152 data 312 functions 33 fuzzy 100.0000
|
||||
[libs/RevoEX/src/cdb/CDBFileSystemUtils] pool: IDENTICAL
|
||||
[libs/RevoEX/src/cdb/CDBFileSystemUtils] objdiff: code 2480/2480 data 8/8 functions 11/11 fuzzy 100.0000 linked code 2480
|
||||
[libs/RevoEX/src/cdb/CDBFileSystemUtils] instruction-exact functions: 11/11
|
||||
[libs/RevoEX/src/cdb/CDBFileSystemUtils] section .sdata size 8 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBFileSystemUtils] section .text size 2480 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBFileSystemUtils] baseline: code 2480/2480 data 8 functions 11 fuzzy 100.0000
|
||||
[libs/RevoEX/src/nwc24/NWC24Manage] pool: IDENTICAL
|
||||
[libs/RevoEX/src/nwc24/NWC24Manage] objdiff: code 3784/3784 data 336/336 functions 21/21 fuzzy 100.0000 linked code 3784
|
||||
[libs/RevoEX/src/nwc24/NWC24Manage] instruction-exact functions: 21/21
|
||||
[libs/RevoEX/src/nwc24/NWC24Manage] section .bss size 32 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24Manage] section .data size 272 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24Manage] section .sbss size 24 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24Manage] section .sdata size 8 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24Manage] section .text size 3784 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24Manage] baseline: code 3784/3784 data 336 functions 21 fuzzy 100.0000
|
||||
[libs/RevoEX/src/nwc24/NWC24UserId] pool: IDENTICAL
|
||||
[libs/RevoEX/src/nwc24/NWC24UserId] objdiff: code 1032/1032 data 16/16 functions 3/3 fuzzy 100.0000 linked code 1032
|
||||
[libs/RevoEX/src/nwc24/NWC24UserId] instruction-exact functions: 3/3
|
||||
[libs/RevoEX/src/nwc24/NWC24UserId] section .rodata size 16 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24UserId] section .text size 1032 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24UserId] baseline: code 1032/1032 data 16 functions 3 fuzzy 100.0000
|
||||
[libs/RevoEX/src/vf/develop/nand_drv] pool: IDENTICAL
|
||||
[libs/RevoEX/src/vf/develop/nand_drv] objdiff: code 12144/12144 data 464/464 functions 33/33 fuzzy 100.0000 linked code 12144
|
||||
[libs/RevoEX/src/vf/develop/nand_drv] instruction-exact functions: 33/33
|
||||
[libs/RevoEX/src/vf/develop/nand_drv] section .bss size 424 match 100.0
|
||||
[libs/RevoEX/src/vf/develop/nand_drv] section .rodata size 32 match 100.0
|
||||
[libs/RevoEX/src/vf/develop/nand_drv] section .sbss size 8 match 100.0
|
||||
[libs/RevoEX/src/vf/develop/nand_drv] section .text size 12144 match 100.0
|
||||
[libs/RevoEX/src/vf/develop/nand_drv] baseline: code 12144/12144 data 464 functions 33 fuzzy 100.0000
|
||||
[libs/RevoEX/src/wd/WDScan] pool: IDENTICAL
|
||||
[libs/RevoEX/src/wd/WDScan] objdiff: code 2180/2180 data 16/16 functions 5/5 fuzzy 100.0000 linked code 2180
|
||||
[libs/RevoEX/src/wd/WDScan] instruction-exact functions: 5/5
|
||||
[libs/RevoEX/src/wd/WDScan] section .sdata size 8 match 100.0
|
||||
[libs/RevoEX/src/wd/WDScan] section .sdata2 size 8 match 100.0
|
||||
[libs/RevoEX/src/wd/WDScan] section .text size 2180 match 100.0
|
||||
[libs/RevoEX/src/wd/WDScan] baseline: code 2180/2180 data 16 functions 5 fuzzy 100.0000
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 92.73726 -> 92.73726
|
||||
global fuzzy_match_percent: 99.78007 -> 99.78007
|
||||
global complete_code_percent: 76.40339 -> 76.40339
|
||||
global matched_data_percent: 99.99410 -> 99.99410
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
GATE PASS
|
||||
```
|
||||
|
||||
## Fresh function verification
|
||||
|
||||
```text
|
||||
libs/RevoEX/src/cdb/CDBDatabase: POOL IDENTICAL up to 7 (mine=7 base=7)
|
||||
CDBDatabaseSearchCallCallback: objdiff 100.0%; src 0xf4 base 0xf4 insns 61/61; diffs 0: []
|
||||
CDBDatabaseSearchRecordLayer: objdiff 100.0%; src 0x6fc base 0x6fc insns 447/447; diffs 0: []
|
||||
CDBDatabaseSearchMinuteLayer: objdiff 100.0%; src 0x3a0 base 0x3a0 insns 232/232; diffs 0: []
|
||||
CDBDatabaseSearchHourLayer: objdiff 100.0%; src 0x38c base 0x38c insns 227/227; diffs 0: []
|
||||
CDBDatabaseSearchDayLayer: objdiff 100.0%; src 0x3f0 base 0x3f0 insns 252/252; diffs 0: []
|
||||
CDBDatabaseSearchMonthLayer: objdiff 100.0%; src 0x3c0 base 0x3c0 insns 240/240; diffs 0: []
|
||||
CDBDatabaseSearchYearLayer: objdiff 100.0%; src 0x378 base 0x378 insns 222/222; diffs 0: []
|
||||
|
||||
libs/RevoEX/src/cdb/CDBFileSystemUtils: POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
CDBFSIsCDBFileOnSD: objdiff 100.0%; src 0x1fc base 0x1fc insns 127/127; diffs 0: []
|
||||
|
||||
libs/RevoEX/src/nwc24/NWC24Manage: POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
NWC24Check: objdiff 100.0%; src 0x1dc base 0x1dc insns 119/119; diffs 0: []
|
||||
|
||||
libs/RevoEX/src/nwc24/NWC24UserId: POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
NWC24CheckUserId: objdiff 100.0%; src 0xec base 0xec insns 59/59; diffs 0: []
|
||||
getUnScrambleId: objdiff 100.0%; src 0x284 base 0x284 insns 161/161; diffs 0: []
|
||||
|
||||
libs/RevoEX/src/vf/develop/nand_drv: POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
_MountPrfFile: objdiff 100.0%; src 0x6a8 base 0x6a8 insns 426/426; diffs 0: []
|
||||
|
||||
libs/RevoEX/src/wd/WDScan: POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
WDiFindVendorSpecificIE: objdiff 100.0%; src 0x104 base 0x104 insns 65/65; diffs 0: []
|
||||
|
||||
Owned totals: {"matched_functions": 106, "total_functions": 106, "matched_code": 33772, "total_code": 33772, "matched_data": 1152, "total_data": 1152}
|
||||
DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
GATE PASS: final clean six-unit gate, pools, exact-name objdiff, ctxdiff, fully linked code/data, and DOL hash.
|
||||
```
|
||||
|
||||
`ninja -C . progress build/43U/report.json build/43U/ok` also passed after the clean gate. Each unit retains 100% matched and linked code/data, totaling 106 exact functions, 33772 code bytes and 1152 data bytes. The only remaining assigned asm bodies are CDBFSIsCDBFileOnSD and getUnScrambleId. No rejected source-search change was retained.
|
||||
229
tools/decomp-assist/da3.attempts.md
Normal file
229
tools/decomp-assist/da3.attempts.md
Normal file
@@ -0,0 +1,229 @@
|
||||
# da3 asm conversion evidence
|
||||
|
||||
Scope: agent/w1005/da3, base 9d40859e. Only the six assigned source files are in scope. Original objects and Ghidra exports are the conversion reference. Sources, reports and rejected trials are retained locally under build/da3.
|
||||
|
||||
## Baseline
|
||||
|
||||
Fresh source objects and report: BS2Start 3/3 functions, 472/472 code; BS2Init 2/2, 272/272; BS2Mach 25/29, 5112/16980 code, 158528/158528 data; rvl_dec 4/4, 2600/2600 code, 36872/36872 data; CHANSVm 224/233, 39908/53564 code, 6904/6904 data. Every assigned asm function starts at objdiff 100%. DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d.
|
||||
|
||||
## Architectural assembly retained under deasm rule 1
|
||||
|
||||
- BS2Init::ClearOtherBATs: target has isync, zeroes DBAT2/3 and IBAT1/2/3 lower and upper SPRs, then isync/blr. Ghidra drops every BAT write and shows only the synchronizations. These writes change memory mappings; translating that output would delete required effects. Inspect repository intrinsics before deciding whether C can preserve the exact sequence.
|
||||
- BS2Mach::Run: target starts mtctr r5 / mtlr r3, clears r2/r13 and nonvolatile r14-r31, replaces r1 with 0x81600000, then dcbz/dcbf every 32-byte block and blr to the supplied entry point. C cannot promise a no-return handoff with cleared ABI base registers and a replacement stack. Ghidra loses the stack/register setup. Keep unchanged.
|
||||
- BS2Start::__start and __init_registers: both are in .init. __start calls __init_registers before establishing an 8-byte stack record, then transfers to main/exit. __init_registers initializes r1, r2 and r13 from linker symbols and clears every other required GPR. An ordinary C prologue would use an uninitialized stack and SDA bases. Ghidra reduces __init_registers to return 0 and omits startup stack effects. Keep both unchanged; the assignment counted one but the file contains two.
|
||||
- gsPlatformUtil::GetTicks: mfc0 reads MIPS CP0 register 9 under #ifdef _PS2. It is excluded from the RVL build and has no 43U target symbol or Ghidra export. Hardware counter access requires its platform instruction; keep unchanged. Verify the enclosing preprocessor branch against the included nonport source.
|
||||
|
||||
## VmPushFuncReturnInfo
|
||||
|
||||
1. Compared the original-object Ghidra control flow with the existing portable body, then compiled that body without the asm conditional. Pool identical, 107/107 instructions, only two differences at indices 54/55: heap-end and heap-start loads are reversed. No control-flow or register-allocation differences.
|
||||
2. Read the free executable-buffer boundary into a named block-local before subtracting it from the object stack top. The compiler still schedules the same two loads in the wrong order.
|
||||
6. space helper vmU8* start, vmU8* end: 107/107 instructions, 2 differences: [54, 55].
|
||||
7. space helper vmU8* end, vmU8* start: 107/107 instructions, 2 differences: [54, 55].
|
||||
8. space helper CHANSVmPrivate* pVm: 107/107 instructions, 2 differences: [54, 55].
|
||||
9. space helper const vmU8* start, vmU8* end: 107/107 instructions, 2 differences: [54, 55].
|
||||
10. space helper const vmU8* end, vmU8* start: 107/107 instructions, 2 differences: [54, 55].
|
||||
11. space helper const CHANSVmPrivate* pVm: 108/107 instructions, 58 differences: [17, 19, 28, 42, 51, 53, 54, 55, 56, 58].
|
||||
12. right-hand size comparison: 107/107 instructions, 4 differences: [54, 55, 57, 58].
|
||||
13. named pointer before stack end: 107/107 instructions, 2 differences: [54, 55].
|
||||
14. signed negative gap then negate: 108/107 instructions, 60 differences: [17, 19, 28, 42, 51, 53, 54, 55, 56, 57].
|
||||
15. explicit typed end pointer: 107/107 instructions, 2 differences: [54, 55].
|
||||
3. Pointer subtraction before unsigned conversion: same two load-order differences.
|
||||
4. Negated start address plus end address: same two differences.
|
||||
5. Extracted a stack allocator with its own typed VM pointer and free-buffer local: same two differences.
|
||||
ClearOtherBATs intrinsic audit: repository provides __sync but no __isync or __mtspr declarations/usages. PPCArch wrappers are asm functions; none exposes the required BAT writes. Retained under rule 1.
|
||||
GameSpy audit: nonport.c includes gsPlatformUtil.c. Its 43U report has 18/18 exact functions and no GetTicks symbol. The _PS2 branch ends at gsPlatformUtil.c:541.
|
||||
16. allocator CHANSVm* vm, size, vmPtr, expression argument False: 107/107 instructions, 2 differences: [54, 55].
|
||||
17. allocator CHANSVm* vm, size, vmPtr, expression argument True: 107/107 instructions, 2 differences: [54, 55].
|
||||
18. allocator CHANSVm* vm, size, CHANSVmExecutionCtx*, expression argument False: 107/107 instructions, 2 differences: [54, 55].
|
||||
19. allocator CHANSVm* vm, size, CHANSVmExecutionCtx*, expression argument True: 107/107 instructions, 2 differences: [54, 55].
|
||||
20. allocator CHANSVm* vm, const size, vmPtr, expression argument False: 107/107 instructions, 2 differences: [54, 55].
|
||||
21. allocator CHANSVm* vm, const size, vmPtr, expression argument True: 107/107 instructions, 2 differences: [54, 55].
|
||||
22. allocator CHANSVm* vm, const size, CHANSVmExecutionCtx*, expression argument False: 107/107 instructions, 2 differences: [54, 55].
|
||||
23. allocator CHANSVm* vm, const size, CHANSVmExecutionCtx*, expression argument True: 107/107 instructions, 2 differences: [54, 55].
|
||||
24. allocator CHANSVmPrivate* pVm, size, vmPtr, expression argument False: 107/107 instructions, 2 differences: [54, 55].
|
||||
25. allocator CHANSVmPrivate* pVm, size, vmPtr, expression argument True: 107/107 instructions, 2 differences: [54, 55].
|
||||
26. allocator CHANSVmPrivate* pVm, size, CHANSVmExecutionCtx*, expression argument False: 107/107 instructions, 2 differences: [54, 55].
|
||||
27. allocator CHANSVmPrivate* pVm, size, CHANSVmExecutionCtx*, expression argument True: 107/107 instructions, 2 differences: [54, 55].
|
||||
28. allocator CHANSVmPrivate* pVm, const size, vmPtr, expression argument False: 107/107 instructions, 2 differences: [54, 55].
|
||||
29. allocator CHANSVmPrivate* pVm, const size, vmPtr, expression argument True: 107/107 instructions, 2 differences: [54, 55].
|
||||
30. allocator CHANSVmPrivate* pVm, const size, CHANSVmExecutionCtx*, expression argument False: 107/107 instructions, 2 differences: [54, 55].
|
||||
31. allocator CHANSVmPrivate* pVm, const size, CHANSVmExecutionCtx*, expression argument True: 107/107 instructions, 2 differences: [54, 55].
|
||||
|
||||
Rvl_decode_szs, szs-1: Ghidra control flow with typed header and no register annotations. objdiff 64.26087%, 71/69 instructions, 69 positional differences; POOL IDENTICAL up to 0 (mine=0 base=0). Evidence build/da3/szs-1/.
|
||||
|
||||
Rvl_decode_szs, szs-2: Use the input parameter as the stream cursor and a separate backreference pointer; signed remaining count controls literal and copy exits. objdiff 64.82609%, 71/69 instructions, 66 positional differences; POOL IDENTICAL up to 0 (mine=0 base=0). Evidence build/da3/szs-2/.
|
||||
|
||||
Rvl_decode_szs, szs-3: Byte-wide header and inline helper decode the distance before advancing input. objdiff 55.855072%, 70/69 instructions, 64 positional differences; POOL IDENTICAL up to 0 (mine=0 base=0). Evidence build/da3/szs-3/.
|
||||
|
||||
Rvl_decode_szs, szs-4: Byte flags and counted tail loop with independent copy cursor. objdiff 64.82609%, 71/69 instructions, 66 positional differences; POOL IDENTICAL up to 0 (mine=0 base=0). Evidence build/da3/szs-4/.
|
||||
32. vmSize gap with start assigned first: 107/107 instructions, 5 differences: [54, 55, 56, 57, 59].
|
||||
33. vmSize gap with end assigned first: 107/107 instructions, 2 differences: [54, 55].
|
||||
34. vmS32 gap with start assigned first: 107/107 instructions, 5 differences: [54, 55, 56, 57, 59].
|
||||
35. vmS32 gap with end assigned first: 107/107 instructions, 2 differences: [54, 55].
|
||||
36. unsigned int gap with start assigned first: 107/107 instructions, 5 differences: [54, 55, 56, 57, 59].
|
||||
37. unsigned int gap with end assigned first: 107/107 instructions, 2 differences: [54, 55].
|
||||
38. int gap with start assigned first: 107/107 instructions, 5 differences: [54, 55, 56, 57, 59].
|
||||
39. int gap with end assigned first: 107/107 instructions, 2 differences: [54, 55].
|
||||
40. vmU32 gap with start assigned first: 107/107 instructions, 5 differences: [54, 55, 56, 57, 59].
|
||||
41. vmU32 gap with end assigned first: 107/107 instructions, 2 differences: [54, 55].
|
||||
42. vmSize separately bound boundaries in helper CHANSVm* vm: 108/107 instructions, 58 differences: [17, 19, 28, 42, 51, 53, 54, 55, 56, 58].
|
||||
43. vmSize separately bound boundaries in helper const CHANSVmPrivate* pVm: 108/107 instructions, 58 differences: [17, 19, 28, 42, 51, 53, 54, 55, 56, 58].
|
||||
44. vmU32 separately bound boundaries in helper CHANSVm* vm: 108/107 instructions, 58 differences: [17, 19, 28, 42, 51, 53, 54, 55, 56, 58].
|
||||
45. vmU32 separately bound boundaries in helper const CHANSVmPrivate* pVm: 108/107 instructions, 58 differences: [17, 19, 28, 42, 51, 53, 54, 55, 56, 58].
|
||||
46. int separately bound boundaries in helper CHANSVm* vm: 108/107 instructions, 58 differences: [17, 19, 28, 42, 51, 53, 54, 55, 56, 58].
|
||||
47. int separately bound boundaries in helper const CHANSVmPrivate* pVm: 108/107 instructions, 58 differences: [17, 19, 28, 42, 51, 53, 54, 55, 56, 58].
|
||||
|
||||
Rvl_decode_ash, ash-1: Original Ghidra tree-building control flow rewritten with typed header and separate literal/distance trees. objdiff 27.4%, 251/220 instructions, 251 positional differences; POOL IDENTICAL up to 0 (mine=0 base=0). Evidence build/da3/ash-1/.
|
||||
48. vmS32 separately bound boundaries in helper CHANSVm* vm: 108/107 instructions, 58 differences: [17, 19, 28, 42, 51, 53, 54, 55, 56, 58].
|
||||
|
||||
Rvl_decode_ash, ash-2: Word-wide node counters preserve the target addi arithmetic; offsets unsigned. objdiff 31.568182%, 247/220 instructions, 247 positional differences; POOL IDENTICAL up to 0 (mine=0 base=0). Evidence build/da3/ash-2/.
|
||||
|
||||
Rvl_decode_ash, ash-3: Inline aligned word-reader owns stream offset arithmetic. objdiff 31.568182%, 247/220 instructions, 247 positional differences; POOL IDENTICAL up to 0 (mine=0 base=0). Evidence build/da3/ash-3/.
|
||||
49. vmS32 separately bound boundaries in helper const CHANSVmPrivate* pVm: 108/107 instructions, 58 differences: [17, 19, 28, 42, 51, 53, 54, 55, 56, 58].
|
||||
|
||||
Rvl_decode_asr, asr-1: Ghidra range decoder with named literal/distance state, typed frequency tables and eight-byte backreference copies. objdiff 49.872463%, 373/345 instructions, 372 positional differences; POOL IDENTICAL up to 0 (mine=0 base=0). Evidence build/da3/asr-1/.
|
||||
|
||||
Rvl_decode_asr, asr-2: Counted initialization loops follow the original CTR loops and independently track cumulative totals. objdiff 46.008698%, 377/345 instructions, 376 positional differences; POOL IDENTICAL up to 0 (mine=0 base=0). Evidence build/da3/asr-2/.
|
||||
|
||||
Rvl_decode_asr, asr-3: Inline midpoint helper changes search-expression temporary ownership. objdiff 46.008698%, 377/345 instructions, 376 positional differences; POOL IDENTICAL up to 0 (mine=0 base=0). Evidence build/da3/asr-3/.
|
||||
50. Assign free-size twice and bind stack-end to a separate pointer for allocation; 107/107 instructions, 35 register differences; the two loads have the correct order. Evidence build/da3/vm-50.ctx.
|
||||
51. reused space helper CHANSVmPrivate* pVm, start, const return '': 107/107 instructions, 0 differences: [].
|
||||
63. result before CHANSVmPrivate* pVm, initialized False: 107/107 instructions, 35 differences: [6, 7, 8, 10, 11, 20, 23, 24, 25, 29].
|
||||
64. result before CHANSVmPrivate* pVm, initialized True: 107/107 instructions, 35 differences: [6, 7, 8, 10, 11, 20, 23, 24, 25, 29].
|
||||
65. result before CHANSVmExecutionCtx* block;, initialized False: 107/107 instructions, 35 differences: [6, 7, 8, 10, 11, 20, 23, 24, 25, 29].
|
||||
66. result before CHANSVmExecutionCtx* block;, initialized True: 107/107 instructions, 35 differences: [6, 7, 8, 10, 11, 20, 23, 24, 25, 29].
|
||||
67. result before vmU8* objStackTopBuf;, initialized False: 107/107 instructions, 35 differences: [6, 7, 8, 10, 11, 20, 23, 24, 25, 29].
|
||||
68. result before vmU8* objStackTopBuf;, initialized True: 107/107 instructions, 35 differences: [6, 7, 8, 10, 11, 20, 23, 24, 25, 29].
|
||||
69. result before u32 size;, initialized False: 107/107 instructions, 35 differences: [6, 7, 8, 10, 11, 20, 23, 24, 25, 29].
|
||||
70. result before u32 size;, initialized True: 107/107 instructions, 35 differences: [6, 7, 8, 10, 11, 20, 23, 24, 25, 29].
|
||||
71. result before u32 i;, initialized False: 107/107 instructions, 9 differences: [11, 20, 24, 25, 29, 45, 83, 99, 100].
|
||||
72. result before u32 i;, initialized True: 107/107 instructions, 9 differences: [11, 20, 24, 25, 29, 45, 83, 99, 100].
|
||||
73. result before result = CHANS_VM_ERR_PUSH_FUNC_RETURN_INFO;, initialized False: 107/107 instructions, 9 differences: [11, 20, 24, 25, 29, 45, 83, 99, 100].
|
||||
74. stack allocation locals before CHANSVmPrivate* pVm: 107/107 instructions, 0 differences: [].
|
||||
|
||||
## Exact VM candidate
|
||||
|
||||
Trial 51 is instruction-exact: the stack-space inline helper reads the free-buffer address into one local, replaces that local with the available byte count, then returns it. Moving the twice-assigned value across the inline boundary preserves the target register allocation and the free-buffer/top-buffer load order. No assembly, volatile casts, uninitialized values or layout changes. Trial 74 independently reaches the same 107/107 instructions by declaring the two allocation locals first; trial 51 is the selected implementation.
|
||||
|
||||
Source search uses a private copy under build/da3 because the shared script otherwise locates the earlier VmPushFuncReturnInfo prototype and mutates the next function. The local copy requires a function definition. Seed 31 completed 77 search trials at 99.88785% with no improvement. Seed 32 started after a CPU slot became available and was stopped once manual trial 51 was exact. No shared tooling was edited.
|
||||
|
||||
Decoder first-round conclusions: SZS remains 70-71 instructions versus 69; ASH remains 247-251 versus 220; ASR remains 373-377 versus 345. Each has at least three compiled, distinct source-level trials. The C candidates are not accepted and the original source is restored before the VM full gate. No decoder is claimed to be a legitimate-assembly exception based only on a failed conversion.
|
||||
|
||||
VmPushFuncReturnInfo accepted locally after clean full gate: GATE PASS; objdiff 100.0%, ctxdiff 107/107 and diffs 0; pool 125/125 identical; unit still 224/233 functions, 39908/53564 matched code, 6904/6904 data; global regressions 0; forbidden/readability 0. DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d.
|
||||
|
||||
Rvl_decode_ash, ash-4: Typed encoded-word views preserve byte-offset lwzx reads without index scaling. objdiff 29.263636%, 248/220 instructions, 248 positional differences; POOL IDENTICAL up to 0 (mine=0 base=0). Evidence build/da3/ash-4/.
|
||||
|
||||
## Decoder provenance and constraints
|
||||
|
||||
The local history introduced the SZS/ASH/ASR asm bodies in 94bc16ef, 50fc7d26 and ae79db87 on 2026-09-19. These commits replaced TODOs with retail instruction listings. They do not establish that assembly is required by the API. Treat all three as unresolved conversions.
|
||||
|
||||
The SZS target holds decodedSize in r0 for the entire decode while its C versions allocate a normal GPR; its source/input cursor copies also add instructions. ASH and ASR targets materialize work with lis @h plus ori @l, whereas normal C emits compiler-owned addressing. ASH also preserves the return size in r0 after building both trees. These are concrete code-generation differences, not grounds for asserting a completed decompilation.
|
||||
|
||||
Applicable levers tried: Ghidra reference; typed input/table views; signed/unsigned and byte/word locals; const inputs; separate value lifetimes; local declaration/initialization placement; block scopes; counted loops; inline expressions and allocator boundaries; automatic source mutations. No eZiText optimization-off spelling, thunk-order, data split, compiler version, flags sweep, uninitialized-local or volatile workaround is justified here. No shared header or source unit was changed.
|
||||
|
||||
VmPushFuncReturnInfo conversion commit: e539a6e8. All failed decoder candidates remain outside the source tree.
|
||||
|
||||
## Automatic decoder searches
|
||||
|
||||
- SZS seed 33: 392 search trials in the 180-second search. Best unaccepted C candidate: 65.55073%, 70/69 instructions. The target stores the preserved result in r0 while the C result uses a different register; stream advancement and backreference scheduling also differ.
|
||||
- ASH seed 34: 364 search trials. Best unaccepted C candidate: 33.47273%, 247/220 instructions. Typed tree reconstruction still adds register saves, indexing and branch instructions.
|
||||
- ASR seed 35: 349 search trials. No improvement over the initial 49.872463%, 373/345-instruction C candidate. Table initialization/search/update control flow and register allocation remain different.
|
||||
- Search output is diagnostic only. No automatically mutated C was copied into the source tree. Original rvl_dec.c is restored byte-for-byte. Additional wrapper Rvl_decode asm was observed; the assignment names the three decoder bodies, so the wrapper is unchanged.
|
||||
- The three decoder conversions remain open after the required distinct compiled attempts and searches. Retained architectural routines have separate rule-1 evidence above. They are not conflated with failed decoder conversions.
|
||||
|
||||
BS2Start verification accounts for .init explicitly: __start is 168/168 raw bytes with zero differences; __init_registers is 144/144 raw bytes with zero differences. gate.py and the supplied ctxdiff helper inspect .text only, so gate.py reports 0/0 instruction functions for this .init unit; the live objdiff report and the direct section-byte comparison establish its actual 3/3 exact functions.
|
||||
|
||||
## Final clean validation
|
||||
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[src/BS2/BS2Init] pool: IDENTICAL
|
||||
[src/BS2/BS2Init] objdiff: code 272/272 data None/None functions 2/2 fuzzy 100.0000 linked code 272
|
||||
[src/BS2/BS2Init] instruction-exact functions: 2/2
|
||||
[src/BS2/BS2Init] section .text size 272 match 100.0
|
||||
[src/BS2/BS2Init] baseline: code 272/272 data None functions 2 fuzzy 100.0000
|
||||
[src/BS2/BS2Mach] pool: IDENTICAL
|
||||
[src/BS2/BS2Mach] objdiff: code 5112/16980 data 158528/158528 functions 25/29 fuzzy 99.1698 linked code 0
|
||||
[src/BS2/BS2Mach] instruction-exact functions: 25/29
|
||||
[src/BS2/BS2Mach] section .bss size 155232 match 100.0
|
||||
[src/BS2/BS2Mach] section .data size 3024 match 100.0
|
||||
[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 99.169846
|
||||
[src/BS2/BS2Mach] below 100: BS2StartGame 98.72774
|
||||
[src/BS2/BS2Mach] below 100: BS2StartGCGame 97.82895
|
||||
[src/BS2/BS2Mach] below 100: CheckBS2CommandStatus 99.50739
|
||||
[src/BS2/BS2Mach] below 100: BS2Tick 98.799484
|
||||
[src/BS2/BS2Mach] baseline: code 5112/16980 data 158528 functions 25 fuzzy 99.1698
|
||||
[src/BS2/BS2Start] pool: IDENTICAL
|
||||
[src/BS2/BS2Start] objdiff: code 472/472 data None/None functions 3/3 fuzzy 100.0000 linked code 472
|
||||
[src/BS2/BS2Start] instruction-exact functions: 0/0
|
||||
[src/BS2/BS2Start] section .init size 472 match 100.0
|
||||
[src/BS2/BS2Start] baseline: code 472/472 data None functions 3 fuzzy 100.0000
|
||||
[src/system/rvl_dec] pool: IDENTICAL
|
||||
[src/system/rvl_dec] objdiff: code 2600/2600 data 36872/36872 functions 4/4 fuzzy 100.0000 linked code 2600
|
||||
[src/system/rvl_dec] instruction-exact functions: 4/4
|
||||
[src/system/rvl_dec] section .bss size 36872 match 100.0
|
||||
[src/system/rvl_dec] section .text size 2600 match 100.0
|
||||
[src/system/rvl_dec] baseline: code 2600/2600 data 36872 functions 4 fuzzy 100.0000
|
||||
[src/scene/nakamuraTest/gamespy/nonport] pool: DIVERGES at string 0 (mine=4 orig=1)
|
||||
[src/scene/nakamuraTest/gamespy/nonport] objdiff: code 1352/1352 data 56/56 functions 18/18 fuzzy 100.0000 linked code 1352
|
||||
[src/scene/nakamuraTest/gamespy/nonport] instruction-exact functions: 18/18
|
||||
[src/scene/nakamuraTest/gamespy/nonport] section .bss size 16 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/nonport] section .data size 32 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/nonport] section .sbss size 8 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/nonport] section .text size 1352 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/nonport] baseline: code 1352/1352 data 56 functions 18 fuzzy 100.0000
|
||||
[src/channelScript/CHANSVm] pool: IDENTICAL
|
||||
[src/channelScript/CHANSVm] objdiff: code 39908/53564 data 6904/6904 functions 224/233 fuzzy 99.4673 linked code 0
|
||||
[src/channelScript/CHANSVm] instruction-exact functions: 224/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.46733
|
||||
[src/channelScript/CHANSVm] below 100: CHANSVmConvertToFloatFromStr 97.59036
|
||||
[src/channelScript/CHANSVm] below 100: VmDateDtor 94.96703
|
||||
[src/channelScript/CHANSVm] below 100: VmStringSplit 98.04054
|
||||
[src/channelScript/CHANSVm] below 100: CHANSVmFormatString 99.84919
|
||||
[src/channelScript/CHANSVm] below 100: VmBlobGetHexString 98.71951
|
||||
[src/channelScript/CHANSVm] below 100: VmBlobPackCommon 98.0988
|
||||
[src/channelScript/CHANSVm] below 100: VmBlobUnpack 98.452614
|
||||
[src/channelScript/CHANSVm] below 100: VmWinEmuWrite 99.62687
|
||||
[src/channelScript/CHANSVm] below 100: CHANSVmStep 96.98723
|
||||
[src/channelScript/CHANSVm] baseline: code 39908/53564 data 6904 functions 224 fuzzy 99.4673
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 92.73726 -> 92.73726
|
||||
global fuzzy_match_percent: 99.78007 -> 99.78007
|
||||
global complete_code_percent: 76.40339 -> 76.40339
|
||||
global matched_data_percent: 99.99410 -> 99.99410
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
GATE PASS
|
||||
|
||||
src/BS2/BS2Init: functions 2 -> 2/2; code 272 -> 272/272; data 0 -> 0/0
|
||||
POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
ClearOtherBATs: objdiff 100.0%; src 0x38 base 0x38 insns 14/14; diffs 0: []
|
||||
src/BS2/BS2Mach: functions 25 -> 25/29; code 5112 -> 5112/16980; data 158528 -> 158528/158528
|
||||
POOL IDENTICAL up to 91 (mine=91 base=91)
|
||||
Run: objdiff 100.0%; src 0xac base 0xac insns 43/43; diffs 0: []
|
||||
src/BS2/BS2Start: functions 3 -> 3/3; code 472 -> 472/472; data 0 -> 0/0
|
||||
POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
__start: objdiff 100.0%, .init 42/42 instructions, raw bytes identical
|
||||
__init_registers: objdiff 100.0%, .init 36/36 instructions, raw bytes identical
|
||||
src/system/rvl_dec: functions 4 -> 4/4; code 2600 -> 2600/2600; data 36872 -> 36872/36872
|
||||
POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
Rvl_decode_szs: objdiff 100.0%; src 0x114 base 0x114 insns 69/69; diffs 0: []
|
||||
Rvl_decode_ash: objdiff 100.0%; src 0x370 base 0x370 insns 220/220; diffs 0: []
|
||||
Rvl_decode_asr: objdiff 100.0%; src 0x564 base 0x564 insns 345/345; diffs 0: []
|
||||
src/scene/nakamuraTest/gamespy/nonport: functions 18 -> 18/18; code 1352 -> 1352/1352; data 56 -> 56/56
|
||||
GameSpy pool baseline discrepancy: source .data 260 bytes / four strings, target .data 32 bytes / one string. First source string gsAssert.c, target localhost. Unit inputs are unchanged from 9d40859e, objdiff remains 18/18 and data 56/56, linked DOL is exact. No GameSpy conversion is submitted. The gate prints the pool difference but does not reject it.
|
||||
src/channelScript/CHANSVm: functions 224 -> 224/233; code 39908 -> 39908/53564; data 6904 -> 6904/6904
|
||||
POOL IDENTICAL up to 125 (mine=125 base=125)
|
||||
VmPushFuncReturnInfo: objdiff 100.0%; src 0x1ac base 0x1ac insns 107/107; diffs 0: []
|
||||
DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
|
||||
Final progress/report regeneration and build/43U/ok passed. tools/decomp_status.py wrote build/da3/final-status.json. tools/check_decomp_complete.py returns DECOMPLETE_FAIL for the existing incomplete project. No full-project completion is claimed. Details: build/da3/completion-check.log.
|
||||
|
||||
Result: one exact asm-to-C conversion, five architectural or excluded-platform routines retained with evidence, three decoder conversions still open. The six owned units remain at 276/289 objdiff-exact functions, 49716/75240 matched code bytes and 202360/202360 matched data bytes. All owned function scores and linked measures are unchanged.
|
||||
455
tools/decomp-assist/da4.attempts.md
Normal file
455
tools/decomp-assist/da4.attempts.md
Normal file
@@ -0,0 +1,455 @@
|
||||
# da4 de-asm attempts
|
||||
|
||||
Scope: jdec_main, getcode, mkhdec3, iqdec_resolution_change_a3 in this worktree only.
|
||||
Baseline: 7aa71d2930ed6d903fa00eff756f97f75a11a82d; origin/main 7aa71d2930ed6d903fa00eff756f97f75a11a82d.
|
||||
Acceptance: readable C, exact-name objdiff 100%, ctxdiff zero differences, identical pool, full gate and retail DOL SHA1. Each converted function gets a separate commit.
|
||||
Prior trials: tools/decomp-assist/asm-conversions.attempts.md, lines 450-538.
|
||||
|
||||
|
||||
TMCJPEGDEC_init_buff_thumbnail / getcode1: Existing array C baseline, compare to Ghidra before rewriting typed input.
|
||||
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x88 base 0x88 insns 34/34; diffs 3: [24, 25, 26]; objdiff 99.55882. Evidence: /tmp/da4/getcode1.
|
||||
|
||||
TMCJPEGDEC_init_buff_thumbnail / getcode2: Typed input buffer, destination work and EXIF fields. Ghidra stores remaining before end and mark.
|
||||
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x88 base 0x88 insns 34/34; diffs 4: [24, 25, 26, 28]; objdiff 99.26471. Evidence: /tmp/da4/getcode2.
|
||||
|
||||
TMCJPEGDEC_init_buff_thumbnail / getcode3: Separate current pointer, preserving buffer assignment and subsequent pointer lifetime.
|
||||
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x88 base 0x88 insns 34/34; diffs 4: [24, 25, 26, 28]; objdiff 99.26471. Evidence: /tmp/da4/getcode3.
|
||||
|
||||
TMCJPEGDEC_imagestart / imagestart1: Natural 64-element zigzag loop with shared result exit matching Ghidra branches.
|
||||
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x18c base 0x190 insns 99/100; --- replace mine 2:3 base 2:3; objdiff 93.3. Evidence: /tmp/da4/imagestart1.
|
||||
|
||||
TMCJPEGDEC_imagestart / imagestart2: Named zigzag walker and explicit else branches as in matched buffer_system.
|
||||
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x188 base 0x190 insns 98/100; --- replace mine 2:3 base 2:3; objdiff 95.5. Evidence: /tmp/da4/imagestart2.
|
||||
|
||||
TMCJPEGDEC_init_buff_thumbnail / getcode4: Reuse pointer for thumbnail start and end, allocator lever 18b.
|
||||
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x88 base 0x88 insns 34/34; diffs 6: [24, 25, 26, 28, 30, 31]; objdiff 98.82353. Evidence: /tmp/da4/getcode4.
|
||||
|
||||
TMCJPEGDEC_imagestart / imagestart3: Ghidra nested successful parse paths; named walker before index declaration.
|
||||
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x18c base 0x190 insns 99/100; --- replace mine 7:8 base 7:8; objdiff 94.35. Evidence: /tmp/da4/imagestart3.
|
||||
|
||||
TMCJPEGDEC_init_buff_thumbnail / getcode5: Commuted thumbnail offset/length addition.
|
||||
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x88 base 0x88 insns 34/34; diffs 4: [24, 25, 26, 28]; objdiff 99.26471. Evidence: /tmp/da4/getcode5.
|
||||
TMCJPEGDEC_imagestart / image-l0-f0: Named/indexed zigzag loop; error exit form 0; instructions 100/100, aligned differences 40.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-False-0-False: Typed pointer/integer source arithmetic and named length; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_imagestart / image-l0-f1: Named/indexed zigzag loop; error exit form 1; instructions 98/100, aligned differences 67.
|
||||
TMCJPEGDEC_imagestart / image-l0-f2: Named/indexed zigzag loop; error exit form 2; instructions 98/100, aligned differences 67.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-False-0-True: Typed pointer/integer source arithmetic and named length; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_imagestart / image-l0-f3: Named/indexed zigzag loop; error exit form 3; instructions 100/100, aligned differences 40.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-False-1-False: Typed pointer/integer source arithmetic and named length; instructions 34/34, aligned differences 6.
|
||||
TMCJPEGDEC_imagestart / image-l1-f0: Named/indexed zigzag loop; error exit form 0; instructions 100/100, aligned differences 40.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-False-1-True: Typed pointer/integer source arithmetic and named length; instructions 34/34, aligned differences 6.
|
||||
TMCJPEGDEC_imagestart / image-l1-f1: Named/indexed zigzag loop; error exit form 1; instructions 98/100, aligned differences 67.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-False-2-False: Typed pointer/integer source arithmetic and named length; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_imagestart / image-l1-f2: Named/indexed zigzag loop; error exit form 2; instructions 98/100, aligned differences 67.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-False-2-True: Typed pointer/integer source arithmetic and named length; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-False-3-False: Typed pointer/integer source arithmetic and named length; instructions 34/34, aligned differences 3.
|
||||
TMCJPEGDEC_imagestart / image-l1-f3: Named/indexed zigzag loop; error exit form 3; instructions 100/100, aligned differences 40.
|
||||
TMCJPEGDEC_imagestart / image-l2-f0: Named/indexed zigzag loop; error exit form 0; instructions 100/100, aligned differences 21.
|
||||
TMCJPEGDEC_imagestart / image-l2-f1: Named/indexed zigzag loop; error exit form 1; instructions 98/100, aligned differences 48.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-False-3-True: Typed pointer/integer source arithmetic and named length; instructions 34/34, aligned differences 3.
|
||||
TMCJPEGDEC_imagestart / image-l2-f2: Named/indexed zigzag loop; error exit form 2; instructions 98/100, aligned differences 48.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-False-4-False: Typed pointer/integer source arithmetic and named length; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_imagestart / image-l2-f3: Named/indexed zigzag loop; error exit form 3; instructions 100/100, aligned differences 21.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-False-4-True: Typed pointer/integer source arithmetic and named length; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-True-0-False: Typed pointer/integer source arithmetic and named length; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_imagestart / image-l3-f0: Named/indexed zigzag loop; error exit form 0; instructions 100/100, aligned differences 40.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-True-0-True: Typed pointer/integer source arithmetic and named length; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-True-1-False: Typed pointer/integer source arithmetic and named length; instructions 34/34, aligned differences 6.
|
||||
TMCJPEGDEC_imagestart / image-l3-f1: Named/indexed zigzag loop; error exit form 1; instructions 98/100, aligned differences 67.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-True-1-True: Typed pointer/integer source arithmetic and named length; instructions 34/34, aligned differences 6.
|
||||
TMCJPEGDEC_imagestart / image-l3-f2: Named/indexed zigzag loop; error exit form 2; instructions 98/100, aligned differences 67.
|
||||
TMCJPEGDEC_imagestart / image-l3-f3: Named/indexed zigzag loop; error exit form 3; instructions 100/100, aligned differences 40.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-True-2-False: Typed pointer/integer source arithmetic and named length; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-True-2-True: Typed pointer/integer source arithmetic and named length; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-True-3-False: Typed pointer/integer source arithmetic and named length; instructions 34/34, aligned differences 3.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-True-3-True: Typed pointer/integer source arithmetic and named length; instructions 34/34, aligned differences 3.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-True-4-False: Typed pointer/integer source arithmetic and named length; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-True-4-True: Typed pointer/integer source arithmetic and named length; instructions 34/34, aligned differences 4.
|
||||
|
||||
TMCJPEGDEC_scan_varinit / scan1: Frame member view and direct sampling array access, lever 16.
|
||||
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x204 base 0x204 insns 129/129; diffs 9: [8, 9, 10, 11, 12, 13, 15, 20, 21]; objdiff 99.496124. Evidence: /tmp/da4/scan1.
|
||||
TMCJPEGDEC_scan_varinit / scan-decls-0: Sample/scale/table/index role declaration order; instructions 129/129, aligned differences 9.
|
||||
TMCJPEGDEC_scan_varinit / scan-decls-1: Sample/scale/table/index role declaration order; instructions 129/129, aligned differences 9.
|
||||
TMCJPEGDEC_scan_varinit / scan-decls-2: Sample/scale/table/index role declaration order; instructions 129/129, aligned differences 9.
|
||||
TMCJPEGDEC_scan_varinit / scan-decls-3: Sample/scale/table/index role declaration order; instructions 129/129, aligned differences 9.
|
||||
TMCJPEGDEC_scan_varinit / scan-decls-4: Sample/scale/table/index role declaration order; instructions 129/129, aligned differences 9.
|
||||
TMCJPEGDEC_scan_varinit / scan-decls-5: Sample/scale/table/index role declaration order; instructions 129/129, aligned differences 9.
|
||||
TMCJPEGDEC_scan_varinit / scan-decls-6: Sample/scale/table/index role declaration order; instructions 129/129, aligned differences 9.
|
||||
TMCJPEGDEC_scan_varinit / scan-decls-7: Sample/scale/table/index role declaration order; instructions 129/129, aligned differences 9.
|
||||
TMCJPEGDEC_scan_varinit / scan-inline: Inline boundary for single-component geometry; instructions 129/129, aligned differences 9.
|
||||
TMCJPEGDEC_scan_varinit / scan-direct-0: Remove sample temporaries and test arithmetic width; instructions 129/129, aligned differences 9.
|
||||
TMCJPEGDEC_scan_varinit / scan-direct-1: Remove sample temporaries and test arithmetic width; instructions 129/129, aligned differences 9.
|
||||
|
||||
TMCJPEGDEC_imagestart / imagestart4: Minimal named walker loop with direct error returns.
|
||||
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x190 base 0x190 insns 100/100; diffs 21: [7, 14, 16, 19, 23, 26, 29, 32, 35, 38, 41, 42, 45, 46, 49, 52, 55, 58, 61, 64]; objdiff 98.75. Evidence: /tmp/da4/imagestart4.
|
||||
TMCJPEGDEC_scan_varinit / scan-direct-2: Remove sample temporaries and test arithmetic width; instructions 129/129, aligned differences 9.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-offset-0: Named offset reused as thumbnail address; instructions 34/34, aligned differences 6.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-offset-1: Named offset reused as thumbnail address; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-offset-2: Named offset reused as thumbnail address; instructions 34/34, aligned differences 6.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-offset-3: Named offset reused as thumbnail address; instructions 34/34, aligned differences 8.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-offset-4: Named offset reused as thumbnail address; instructions 34/34, aligned differences 6.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-offset-5: Named offset reused as thumbnail address; instructions 34/34, aligned differences 8.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-inline: Inline EXIF start calculation; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_imagestart / image-inline-0: Inline zigzag initialization; instructions 100/100, aligned differences 0.
|
||||
TMCJPEGDEC_restart_interval / restart-0: Direct error returns, Ghidra integer-width truncation and coordinate order; instructions 93/93, aligned differences 26.
|
||||
TMCJPEGDEC_restart_interval / restart-1: Direct error returns, Ghidra integer-width truncation and coordinate order; instructions 93/93, aligned differences 26.
|
||||
TMCJPEGDEC_restart_interval / restart-2: Direct error returns, Ghidra integer-width truncation and coordinate order; instructions 94/93, aligned differences 44.
|
||||
TMCJPEGDEC_restart_interval / restart-3: Direct error returns, Ghidra integer-width truncation and coordinate order; instructions 94/93, aligned differences 45.
|
||||
|
||||
Accepted TMCJPEGDEC_imagestart: inline initialization of zigzag bytes removes the iterator/base register swap; plain C loop, no forced instructions. ctxdiff 100/100 instructions, diffs 0; exact-name objdiff 100.0; .text 5604/5604, .rodata 256/256, functions 13/13. Full clean gate passed, 0 regressions, 0 forbidden patterns, 0 readability warnings. DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. Gate evidence /tmp/da4/imagestart-gate.log.
|
||||
TMCJPEGDEC_parse_para / para-nested: Nested underflow/EOI error paths as target; instructions 178/183, aligned differences 116.
|
||||
TMCJPEGDEC_parse_para / para-helpers-0: Inline segment parsers, nested successful byte-reader returns; instructions 184/183, aligned differences 165.
|
||||
TMCJPEGDEC_parse_para / para-helpers-1: Inline segment parsers, nested successful byte-reader returns; instructions 184/183, aligned differences 165.
|
||||
TMCJPEGDEC_parse_para / para-helpers-2: Inline segment parsers, nested successful byte-reader returns; instructions 184/183, aligned differences 165.
|
||||
TMCJPEGDEC_parse_para / para-helpers-3: Inline segment parsers, nested successful byte-reader returns; instructions 184/183, aligned differences 165.
|
||||
TMCJPEGDEC_parse_dht / dht-0: Count loop, typed header fields, or inline symbol-count helper; instructions 120/120, aligned differences 16.
|
||||
TMCJPEGDEC_parse_dht / dht-1: Count loop, typed header fields, or inline symbol-count helper; instructions 120/120, aligned differences 16.
|
||||
TMCJPEGDEC_parse_dht / dht-2: Count loop, typed header fields, or inline symbol-count helper; instructions 120/120, aligned differences 16.
|
||||
TMCJPEGDEC_parse_dht / dht-3: Count loop, typed header fields, or inline symbol-count helper; instructions 120/120, aligned differences 16.
|
||||
TMCJPEGDEC_parse_dht / dht-4: Count loop, typed header fields, or inline symbol-count helper; instructions 120/120, aligned differences 16.
|
||||
TMCJPEGDEC_parse_dht / dht-5: Count loop, typed header fields, or inline symbol-count helper; instructions 120/120, aligned differences 34.
|
||||
|
||||
TMCJPEGDEC_parse_para / para-current: Inline segment-parser candidate after nested error checks.
|
||||
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x2e0 base 0x2dc insns 184/183; --- replace mine 14:15 base 14:15; objdiff 99.45355. Evidence: /tmp/da4/para-current.
|
||||
|
||||
TMCJPEGDEC_decode_iquant_rc / iquant1: Typed coefficient/Huffman indexing follows target Ghidra data flow.
|
||||
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x29c base 0x29c insns 167/167; diffs 15: [51, 52, 53, 54, 55, 56, 76, 78, 79, 132, 134, 136, 139, 142, 147]; objdiff 99.461075. Evidence: /tmp/da4/iquant1.
|
||||
|
||||
TMCJPEGDEC_parse_para / para2: Inline segment parsers with combined underflow and EOI exception.
|
||||
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x2dc base 0x2dc insns 183/183; diffs 0: []; objdiff 100.0. Evidence: /tmp/da4/para2.
|
||||
TMCJPEGDEC_decode_iquant_rc / iquant-0: Direct zigzag access, pointer declaration lifetime, bit-position width or shift type; instructions 167/167, aligned differences 73.
|
||||
TMCJPEGDEC_decode_iquant_rc / iquant-1: Direct zigzag access, pointer declaration lifetime, bit-position width or shift type; instructions 167/167, aligned differences 36.
|
||||
TMCJPEGDEC_decode_iquant_rc / iquant-2: Direct zigzag access, pointer declaration lifetime, bit-position width or shift type; instructions 167/167, aligned differences 15.
|
||||
TMCJPEGDEC_decode_iquant_rc / iquant-3: Direct zigzag access, pointer declaration lifetime, bit-position width or shift type; instructions 167/167, aligned differences 15.
|
||||
TMCJPEGDEC_decode_iquant_rc / iquant-inline-0: Inline coefficient sign-extension helper; instructions 167/167, aligned differences 77.
|
||||
TMCJPEGDEC_decode_iquant_rc / iquant-inline-1: Inline coefficient sign-extension helper; instructions 167/167, aligned differences 7.
|
||||
TMCJPEGDEC_parse_sos / sos-0: Typed component view, mapping stored after successful search and early scan count store; instructions 114/112, aligned differences 90.
|
||||
TMCJPEGDEC_parse_sos / sos-1: Typed component view, mapping stored after successful search and early scan count store; instructions 114/112, aligned differences 90.
|
||||
TMCJPEGDEC_parse_sos / sos-2: Typed component view, mapping stored after successful search and early scan count store; instructions 114/112, aligned differences 90.
|
||||
TMCJPEGDEC_parse_sos / sos-3: Typed component view, mapping stored after successful search and early scan count store; instructions 112/112, aligned differences 56.
|
||||
TMCJPEGDEC_scan_varinit / scan-more-0: Sampling pair aggregate, arithmetic inline boundary, or coefficient row view; instructions 129/129, aligned differences 9.
|
||||
TMCJPEGDEC_scan_varinit / scan-more-1: Sampling pair aggregate, arithmetic inline boundary, or coefficient row view; instructions 129/129, aligned differences 9.
|
||||
TMCJPEGDEC_scan_varinit / scan-more-2: Sampling pair aggregate, arithmetic inline boundary, or coefficient row view; instructions 129/129, aligned differences 9.
|
||||
TMCJPEGDEC_scan_varinit / scan-more-3: Sampling pair aggregate, arithmetic inline boundary, or coefficient row view; instructions 129/129, aligned differences 9.
|
||||
TMCJPEGDEC_scan_varinit / scan-more-4: Sampling pair aggregate, arithmetic inline boundary, or coefficient row view; instructions 129/129, aligned differences 9.
|
||||
TMCJPEGDEC_err_restart / err-0: Unsigned next-position division and target final posX subtraction; coordinate arithmetic forms; instructions 113/115, aligned differences 71.
|
||||
TMCJPEGDEC_make_huffdec / mkhdec-0: Ghidra canonical Huffman sizes/codes, typed halfword entries, signed counter loop forms; instructions 193/200, aligned differences 177.
|
||||
TMCJPEGDEC_err_restart / err-1: Unsigned next-position division and target final posX subtraction; coordinate arithmetic forms; instructions 113/115, aligned differences 71.
|
||||
TMCJPEGDEC_make_huffdec / mkhdec-1: Ghidra canonical Huffman sizes/codes, typed halfword entries, signed counter loop forms; instructions 195/200, aligned differences 174.
|
||||
TMCJPEGDEC_make_huffdec / mkhdec-2: Ghidra canonical Huffman sizes/codes, typed halfword entries, signed counter loop forms; instructions 193/200, aligned differences 177.
|
||||
TMCJPEGDEC_err_restart / err-2: Unsigned next-position division and target final posX subtraction; coordinate arithmetic forms; instructions 113/115, aligned differences 71.
|
||||
TMCJPEGDEC_err_restart / err-3: Unsigned next-position division and target final posX subtraction; coordinate arithmetic forms; instructions 113/115, aligned differences 71.
|
||||
TMCJPEGDEC_make_huffdec / mkhdec-3: Ghidra canonical Huffman sizes/codes, typed halfword entries, signed counter loop forms; instructions 193/200, aligned differences 177.
|
||||
TMCJPEGDEC_err_restart / err-4: Unsigned next-position division and target final posX subtraction; coordinate arithmetic forms; instructions 113/115, aligned differences 71.
|
||||
TMCJPEGDEC_make_huffdec / mkhdec-4: Ghidra canonical Huffman sizes/codes, typed halfword entries, signed counter loop forms; instructions 193/200, aligned differences 177.
|
||||
TMCJPEGDEC_parse_sos / sos-corrected-0: Correct target component-found branch and re-read stored scan count; instructions 112/112, aligned differences 0.
|
||||
|
||||
Accepted TMCJPEGDEC_parse_para: inline helpers for APP, DRI, DNL and COM parsing recreate separate stack locals and error-return paths. Segment-skip helper provides the two nested success clamps without bitwise result tricks. Combined underflow/EOI exception matches the final branch. Exact-name objdiff 100.0; ctxdiff 183/183, diffs 0. Full clean GATE PASS, 0 regressions/patterns/readability warnings, DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. Evidence /tmp/da4/para-gate.log.
|
||||
|
||||
TMCJPEGDEC_parse_sos / sos-exact: Matched typed component table and component-found control flow.
|
||||
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x1c0 base 0x1c0 insns 112/112; diffs 0: []; objdiff 100.0. Evidence: /tmp/da4/sos-exact.
|
||||
TMCJPEGDEC_decode_iquant_rc / iquant-more-0: Independent AC value lifetime, signedness, inline parameter const or indexed product form; instructions 167/167, aligned differences 7.
|
||||
TMCJPEGDEC_decode_iquant_rc / iquant-more-1: Independent AC value lifetime, signedness, inline parameter const or indexed product form; instructions 167/167, aligned differences 7.
|
||||
TMCJPEGDEC_decode_iquant_rc / iquant-more-2: Independent AC value lifetime, signedness, inline parameter const or indexed product form; instructions 167/167, aligned differences 7.
|
||||
TMCJPEGDEC_decode_iquant_rc / iquant-more-3: Independent AC value lifetime, signedness, inline parameter const or indexed product form; instructions 167/167, aligned differences 7.
|
||||
TMCJPEGDEC_decode_iquant_rc / iquant-more-4: Independent AC value lifetime, signedness, inline parameter const or indexed product form; instructions 167/167, aligned differences 7.
|
||||
TMCJPEGDEC_decode_iquant_rc / iquant-more-5: Independent AC value lifetime, signedness, inline parameter const or indexed product form; instructions 167/167, aligned differences 7.
|
||||
TMCJPEGDEC_err_restart / err-corrected-0: Marker loop exits before recovery; 16-bit position locals and target grouped sum; instructions 114/115, aligned differences 72.
|
||||
TMCJPEGDEC_decode_iquant_rc / iquant-more-6: Independent AC value lifetime, signedness, inline parameter const or indexed product form; instructions 167/167, aligned differences 7.
|
||||
TMCJPEGDEC_err_restart / err-corrected-1: Marker loop exits before recovery; 16-bit position locals and target grouped sum; instructions 114/115, aligned differences 72.
|
||||
TMCJPEGDEC_err_restart / err-corrected-2: Marker loop exits before recovery; 16-bit position locals and target grouped sum; instructions 113/115, aligned differences 71.
|
||||
TMCJPEGDEC_err_restart / err-corrected-3: Marker loop exits before recovery; 16-bit position locals and target grouped sum; instructions 114/115, aligned differences 72.
|
||||
TMCJPEGDEC_parse_sof / sof-0: Ghidra reused byte/word inputs, full sampling search, and inferred coordinate widths; instructions 219/223, aligned differences 203.
|
||||
TMCJPEGDEC_parse_sof / sof-1: Ghidra reused byte/word inputs, full sampling search, and inferred coordinate widths; instructions 219/223, aligned differences 203.
|
||||
TMCJPEGDEC_parse_sof / sof-2: Ghidra reused byte/word inputs, full sampling search, and inferred coordinate widths; instructions 221/223, aligned differences 205.
|
||||
TMCJPEGDEC_parse_sof / sof-3: Ghidra reused byte/word inputs, full sampling search, and inferred coordinate widths; instructions 219/223, aligned differences 203.
|
||||
TMCJPEGDEC_decode_iquant_rc / iquant-final-0: AC store inline, output-reference value, reused coefficient, mask width or explicit AC block; instructions 167/167, aligned differences 7.
|
||||
TMCJPEGDEC_decode_iquant_rc / iquant-final-1: AC store inline, output-reference value, reused coefficient, mask width or explicit AC block; instructions 167/167, aligned differences 7.
|
||||
TMCJPEGDEC_decode_iquant_rc / iquant-final-2: AC store inline, output-reference value, reused coefficient, mask width or explicit AC block; instructions 167/167, aligned differences 8.
|
||||
TMCJPEGDEC_decode_iquant_rc / iquant-final-3: AC store inline, output-reference value, reused coefficient, mask width or explicit AC block; instructions 167/167, aligned differences 7.
|
||||
TMCJPEGDEC_decode_iquant_rc / iquant-final-4: AC store inline, output-reference value, reused coefficient, mask width or explicit AC block; instructions 167/167, aligned differences 7.
|
||||
TMCJPEGDEC_decode_iquant_rc / iquant-final-5: AC store inline, output-reference value, reused coefficient, mask width or explicit AC block; instructions 167/167, aligned differences 71.
|
||||
TMCJPEGDEC_parse_dht / dht-more-0: Header-local lifetime, narrowed table ID or inline nibble extraction; instructions 120/120, aligned differences 27.
|
||||
TMCJPEGDEC_parse_dht / dht-more-1: Header-local lifetime, narrowed table ID or inline nibble extraction; instructions 120/120, aligned differences 16.
|
||||
TMCJPEGDEC_parse_dht / dht-more-2: Header-local lifetime, narrowed table ID or inline nibble extraction; instructions 120/120, aligned differences 16.
|
||||
TMCJPEGDEC_parse_dht / dht-more-3: Header-local lifetime, narrowed table ID or inline nibble extraction; instructions 120/120, aligned differences 9.
|
||||
TMCJPEGDEC_parse_dht / dht-more-4: Header-local lifetime, narrowed table ID or inline nibble extraction; instructions 120/120, aligned differences 9.
|
||||
TMCJPEGDEC_parse_dht / dht-more-5: Header-local lifetime, narrowed table ID or inline nibble extraction; instructions 120/120, aligned differences 9.
|
||||
TMCJPEGDEC_restart_interval / restart-more-0: Natural marker local and inline position update; instructions 93/93, aligned differences 23.
|
||||
TMCJPEGDEC_restart_interval / restart-more-1: Natural marker local and inline position update; instructions 93/93, aligned differences 26.
|
||||
TMCJPEGDEC_restart_interval / restart-more-2: Natural marker local and inline position update; instructions 93/93, aligned differences 26.
|
||||
TMCJPEGDEC_restart_interval / restart-more-3: Natural marker local and inline position update; instructions 93/93, aligned differences 20.
|
||||
TMCJPEGDEC_restart_interval / restart-more-4: Natural marker local and inline position update; instructions 93/93, aligned differences 17.
|
||||
TMCJPEGDEC_restart_interval / restart-more-5: Natural marker local and inline position update; instructions 93/93, aligned differences 20.
|
||||
|
||||
Accepted TMCJPEGDEC_parse_sos: reused stored scan count, typed component-table view, and explicit component-found error path. Ghidra mapping loop checks were verified against original instructions. Exact-name objdiff 100.0, ctxdiff 112/112 diffs 0. Full clean GATE PASS; 0 regressions/patterns/readability warnings; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. Evidence /tmp/da4/sos-gate.log.
|
||||
TMCJPEGDEC_parse_dht / dht-final-0: Header scalar versus walker lifetime and grouped decoded table fields; instructions 120/120, aligned differences 30.
|
||||
TMCJPEGDEC_parse_dht / dht-final-1: Header scalar versus walker lifetime and grouped decoded table fields; instructions 120/120, aligned differences 9.
|
||||
TMCJPEGDEC_parse_dht / dht-final-2: Header scalar versus walker lifetime and grouped decoded table fields; instructions 120/120, aligned differences 9.
|
||||
TMCJPEGDEC_parse_dht / dht-final-3: Header scalar versus walker lifetime and grouped decoded table fields; instructions 120/120, aligned differences 9.
|
||||
TMCJPEGDEC_make_huffdec / mkhdec-scopes-0: Independent locals per Huffman sizes, codes, valptr and lookup phases; instructions 195/200, aligned differences 174.
|
||||
TMCJPEGDEC_make_huffdec / mkhdec-scopes-1: Independent locals per Huffman sizes, codes, valptr and lookup phases; instructions 198/200, aligned differences 136.
|
||||
TMCJPEGDEC_parse_dht / dht-final-4: Header scalar versus walker lifetime and grouped decoded table fields; instructions 120/120, aligned differences 9.
|
||||
TMCJPEGDEC_make_huffdec / mkhdec-scopes-2: Independent locals per Huffman sizes, codes, valptr and lookup phases; instructions 195/200, aligned differences 171.
|
||||
TMCJPEGDEC_parse_dht / dht-final-5: Header scalar versus walker lifetime and grouped decoded table fields; instructions 120/120, aligned differences 9.
|
||||
TMCJPEGDEC_make_huffdec / mkhdec-scopes-3: Independent locals per Huffman sizes, codes, valptr and lookup phases; instructions 195/200, aligned differences 174.
|
||||
TMCJPEGDEC_parse_dht / dht-final-6: Header scalar versus walker lifetime and grouped decoded table fields; instructions 121/120, aligned differences 107.
|
||||
TMCJPEGDEC_parse_dht / dht-final-7: Header scalar versus walker lifetime and grouped decoded table fields; instructions 120/120, aligned differences 9.
|
||||
|
||||
TMCJPEGDEC_parse_sof / sof-current: Shared byte/word temporaries and 16-bit MCU counts, full sampling search.
|
||||
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x374 base 0x37c insns 221/223; --- replace mine 3:6 base 3:7; objdiff 82.28251. Evidence: /tmp/da4/sof-current.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-final-0: Reuse source/start pointer parameter or group thumbnail pointers; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-final-1: Reuse source/start pointer parameter or group thumbnail pointers; instructions 34/34, aligned differences 6.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-final-2: Reuse source/start pointer parameter or group thumbnail pointers; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-final-3: Reuse source/start pointer parameter or group thumbnail pointers; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-final-4: Reuse source/start pointer parameter or group thumbnail pointers; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-final-5: Reuse source/start pointer parameter or group thumbnail pointers; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_parse_sof / sof-corrected-0: Typed component base, 16-bit maximum sampling, shared scalar input, inline validation; instructions 220/223, aligned differences 140.
|
||||
TMCJPEGDEC_parse_sof / sof-corrected-1: Typed component base, 16-bit maximum sampling, shared scalar input, inline validation; instructions 222/223, aligned differences 142.
|
||||
TMCJPEGDEC_parse_sof / sof-corrected-2: Typed component base, 16-bit maximum sampling, shared scalar input, inline validation; instructions 222/223, aligned differences 142.
|
||||
TMCJPEGDEC_parse_sof / sof-corrected-3: Typed component base, 16-bit maximum sampling, shared scalar input, inline validation; instructions 222/223, aligned differences 142.
|
||||
TMCJPEGDEC_make_huffdec / mkhdec-final-0: Huffman phase declaration order and indexed versus walking table entries; instructions 198/200, aligned differences 133.
|
||||
TMCJPEGDEC_make_huffdec / mkhdec-final-1: Huffman phase declaration order and indexed versus walking table entries; instructions 198/200, aligned differences 136.
|
||||
TMCJPEGDEC_make_huffdec / mkhdec-final-2: Huffman phase declaration order and indexed versus walking table entries; instructions 175/200, aligned differences 115.
|
||||
TMCJPEGDEC_make_huffdec / mkhdec-final-3: Huffman phase declaration order and indexed versus walking table entries; instructions 196/200, aligned differences 134.
|
||||
TMCJPEGDEC_make_huffdec / mkhdec-final-4: Huffman phase declaration order and indexed versus walking table entries; instructions 196/200, aligned differences 134.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-helper-0: Inline input copy/validation or thumbnail-buffer initialization; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-helper-1: Inline input copy/validation or thumbnail-buffer initialization; instructions 39/34, aligned differences 25.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-helper-2: Inline input copy/validation or thumbnail-buffer initialization; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_parse_sof / sof-last-0: Explicit quotient arithmetic or inline sampling-layout search; instructions 222/223, aligned differences 142.
|
||||
TMCJPEGDEC_parse_sof / sof-last-1: Explicit quotient arithmetic or inline sampling-layout search; instructions 222/223, aligned differences 143.
|
||||
TMCJPEGDEC_parse_sof / sof-last-2: Explicit quotient arithmetic or inline sampling-layout search; instructions 222/223, aligned differences 143.
|
||||
TMCJPEGDEC_parse_sof / sof-last-3: Explicit quotient arithmetic or inline sampling-layout search; instructions 222/223, aligned differences 143.
|
||||
TMCJPEGDEC_scan_varinit / scan-pair-0: Named promoted horizontal/vertical scales, direct coefficient access; instructions 129/129, aligned differences 11.
|
||||
TMCJPEGDEC_scan_varinit / scan-pair-1: Named promoted horizontal/vertical scales, direct coefficient access; instructions 129/129, aligned differences 14.
|
||||
TMCJPEGDEC_scan_varinit / scan-width-0: Sampling scale width or direct component index; instructions 129/129, aligned differences 14.
|
||||
TMCJPEGDEC_scan_varinit / scan-width-1: Sampling scale width or direct component index; instructions 131/129, aligned differences 122.
|
||||
|
||||
TMCJPEGDEC_parse_sof / sof2-current: Typed component base, constrained sampling maxima, and inline validation.
|
||||
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x378 base 0x37c insns 222/223; --- replace mine 5:7 base 5:7; objdiff 93.34529. Evidence: /tmp/da4/sof2-current.
|
||||
TMCJPEGDEC_scan_varinit / scan-width-2: Sampling scale width or direct component index; instructions 129/129, aligned differences 11.
|
||||
TMCJPEGDEC_make_huffdec / mkhdec-helper-0: Halfword arrays, countdown condition, or size-table inline helper; instructions 198/200, aligned differences 136.
|
||||
TMCJPEGDEC_make_huffdec / mkhdec-helper-1: Halfword arrays, countdown condition, or size-table inline helper; instructions 196/200, aligned differences 134.
|
||||
TMCJPEGDEC_make_huffdec / mkhdec-helper-2: Halfword arrays, countdown condition, or size-table inline helper; instructions 158/200, aligned differences 98.
|
||||
TMCJPEGDEC_make_huffdec / mkhdec-helper-3: Halfword arrays, countdown condition, or size-table inline helper; instructions 204/200, aligned differences 177.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-typed-0: Typed EXIF/input buffer helper behind existing public ABI; instructions 35/34, aligned differences 25.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-typed-1: Typed EXIF/input buffer helper behind existing public ABI; instructions 35/34, aligned differences 25.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-typed-2: Typed EXIF/input buffer helper behind existing public ABI; instructions 35/34, aligned differences 25.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-typed-3: Typed EXIF/input buffer helper behind existing public ABI; instructions 35/34, aligned differences 25.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-typed-4: Typed EXIF/input buffer helper behind existing public ABI; instructions 35/34, aligned differences 25.
|
||||
TMCJPEGDEC_parse_dht / dht-boundary-0: Count-read inline boundary, decoded header outputs or typed internal table parser; instructions 124/120, aligned differences 79.
|
||||
TMCJPEGDEC_parse_dht / dht-boundary-1: Count-read inline boundary, decoded header outputs or typed internal table parser; instructions 120/120, aligned differences 16.
|
||||
TMCJPEGDEC_err_restart / err-final-0: Independent full-width division/remainder and narrowed restart-step/position lifetimes; instructions 114/115, aligned differences 72.
|
||||
TMCJPEGDEC_err_restart / err-final-1: Independent full-width division/remainder and narrowed restart-step/position lifetimes; instructions 114/115, aligned differences 72.
|
||||
TMCJPEGDEC_err_restart / err-final-2: Independent full-width division/remainder and narrowed restart-step/position lifetimes; instructions 115/115, aligned differences 39.
|
||||
TMCJPEGDEC_err_restart / err-final-3: Independent full-width division/remainder and narrowed restart-step/position lifetimes; instructions 114/115, aligned differences 72.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-arith-0: Address assignment expression or independent length/current/end values; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-arith-1: Address assignment expression or independent length/current/end values; instructions 34/34, aligned differences 8.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-arith-2: Address assignment expression or independent length/current/end values; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-arith-3: Address assignment expression or independent length/current/end values; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-arith-4: Address assignment expression or independent length/current/end values; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-arith-5: Address assignment expression or independent length/current/end values; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_parse_dht / dht-walker-0: Narrowed inline return, count-array start inline or direct indexing; instructions 120/120, aligned differences 13.
|
||||
TMCJPEGDEC_parse_dht / dht-walker-1: Narrowed inline return, count-array start inline or direct indexing; instructions 120/120, aligned differences 9.
|
||||
TMCJPEGDEC_parse_dht / dht-walker-2: Narrowed inline return, count-array start inline or direct indexing; instructions 120/120, aligned differences 9.
|
||||
TMCJPEGDEC_parse_dht / dht-walker-3: Narrowed inline return, count-array start inline or direct indexing; instructions 120/120, aligned differences 6.
|
||||
TMCJPEGDEC_parse_dht / dht-walker-4: Narrowed inline return, count-array start inline or direct indexing; instructions 120/120, aligned differences 9.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-view-0: EXIF triple array view or explicit current address with existing word-buffer representation; instructions 34/34, aligned differences 3.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-view-1: EXIF triple array view or explicit current address with existing word-buffer representation; instructions 34/34, aligned differences 3.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-view-2: EXIF triple array view or explicit current address with existing word-buffer representation; instructions 34/34, aligned differences 3.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-view-3: EXIF triple array view or explicit current address with existing word-buffer representation; instructions 34/34, aligned differences 3.
|
||||
TMCJPEGDEC_restart_interval / restart-final-0: Original block-scoped marker reset and field loads with corrected truncation points; instructions 94/93, aligned differences 42.
|
||||
TMCJPEGDEC_restart_interval / restart-final-1: Original block-scoped marker reset and field loads with corrected truncation points; instructions 93/93, aligned differences 23.
|
||||
|
||||
Search tooling: copied srcsearch.py to /tmp/da4/srcsearch.py with definition-only function discovery. Stock finder could select a forward declaration or call before the definition. Shared source-search concurrency limit retained. Initial thumbnail search completed 154 trials with no gain; scan_varinit search completed 239 trials with no gain. Later searches queued behind all 24 shared slots, rather than increasing the limiter.
|
||||
TMCJPEGDEC_restart_interval / restart-final-2: Original block-scoped marker reset and field loads with corrected truncation points; instructions 93/93, aligned differences 23.
|
||||
TMCJPEGDEC_restart_interval / restart-final-3: Original block-scoped marker reset and field loads with corrected truncation points; instructions 94/93, aligned differences 53.
|
||||
TMCJPEGDEC_parse_sof / sof-types-0: Sampling maxima declared before persistent pointers; zero checks narrow as target proves; instructions 222/223, aligned differences 129.
|
||||
TMCJPEGDEC_parse_sof / sof-types-1: Sampling maxima declared before persistent pointers; zero checks narrow as target proves; instructions 222/223, aligned differences 135.
|
||||
TMCJPEGDEC_parse_sof / sof-types-2: Sampling maxima declared before persistent pointers; zero checks narrow as target proves; instructions 222/223, aligned differences 143.
|
||||
TMCJPEGDEC_parse_dht / dht-types-0: Decoded class/ID order and walker lifetime around count summation; instructions 120/120, aligned differences 6.
|
||||
TMCJPEGDEC_parse_sof / sof-types-3: Sampling maxima declared before persistent pointers; zero checks narrow as target proves; instructions 222/223, aligned differences 129.
|
||||
TMCJPEGDEC_parse_dht / dht-types-1: Decoded class/ID order and walker lifetime around count summation; instructions 120/120, aligned differences 13.
|
||||
TMCJPEGDEC_parse_dht / dht-types-2: Decoded class/ID order and walker lifetime around count summation; instructions 120/120, aligned differences 27.
|
||||
TMCJPEGDEC_parse_dht / dht-types-3: Decoded class/ID order and walker lifetime around count summation; instructions 120/120, aligned differences 6.
|
||||
TMCJPEGDEC_parse_dht / dht-types-4: Decoded class/ID order and walker lifetime around count summation; instructions 120/120, aligned differences 6.
|
||||
|
||||
TMCJPEGDEC_parse_sof / sof-unsized: Unsized local extern declaration, target materializes sample-count table with lis/addi.
|
||||
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x378 base 0x37c insns 222/223; --- replace mine 12:13 base 12:13; objdiff 94.37668. Evidence: /tmp/da4/sof-unsized.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-fields-0: Explicit current/end pointer fields or indexed thumbnail offset; instructions 35/34, aligned differences 11.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-fields-1: Explicit current/end pointer fields or indexed thumbnail offset; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-fields-2: Explicit current/end pointer fields or indexed thumbnail offset; instructions 34/34, aligned differences 4.
|
||||
TMCJPEGDEC_init_buff_thumbnail / get-fields-3: Explicit current/end pointer fields or indexed thumbnail offset; instructions 35/34, aligned differences 12.
|
||||
|
||||
Restored all unaccepted worktree C candidates to the last validated commits while searches continue from isolated snapshots. No source change is being kept at a fuzzy-only score. The failed whole-parser inline trial removed the static parse_dht symbol and was rejected immediately.
|
||||
TMCJPEGDEC_parse_sof / sof-incomplete-array: Diagnostic: incomplete SampleComps extern declaration matches target lis/addi instead of SDA reference; isolated temporary header; instructions 223/223, aligned differences 84.
|
||||
TMCJPEGDEC_init_buff_thumbnail / handoff-evidence: Representative rejected C candidate for persistent-worker handoff; instructions 34/34, aligned differences 3.
|
||||
TMCJPEGDEC_scan_varinit / handoff-evidence: Representative rejected C candidate for persistent-worker handoff; instructions 129/129, aligned differences 9.
|
||||
TMCJPEGDEC_restart_interval / handoff-evidence: Representative rejected C candidate for persistent-worker handoff; instructions 93/93, aligned differences 17.
|
||||
TMCJPEGDEC_parse_dht / handoff-evidence: Representative rejected C candidate for persistent-worker handoff; instructions 120/120, aligned differences 6.
|
||||
TMCJPEGDEC_parse_sof / handoff-evidence: Representative rejected C candidate for persistent-worker handoff; instructions 222/223, aligned differences 129.
|
||||
TMCJPEGDEC_err_restart / handoff-evidence: Representative rejected C candidate for persistent-worker handoff; instructions 115/115, aligned differences 39.
|
||||
TMCJPEGDEC_make_huffdec / handoff-evidence: Representative rejected C candidate for persistent-worker handoff; instructions 198/200, aligned differences 133.
|
||||
TMCJPEGDEC_decode_iquant_rc / handoff-evidence: Representative rejected C candidate for persistent-worker handoff; instructions 167/167, aligned differences 7.
|
||||
|
||||
Unconverted function handoff evidence, all candidates rejected and original asm retained:
|
||||
- TMCJPEGDEC_init_buff_thumbnail: C objdiff 99.55882; instruction delta 0, aligned differences 3; source /tmp/da4/TMCJPEGDEC_init_buff_thumbnail-variants/get-view-0.c.
|
||||
- TMCJPEGDEC_scan_varinit: C objdiff 99.496124; instruction delta 0, aligned differences 9; source /tmp/da4/TMCJPEGDEC_scan_varinit-variants/scan-decls-0.c.
|
||||
- TMCJPEGDEC_restart_interval: C objdiff 96.77419; instruction delta 0, aligned differences 17; source /tmp/da4/TMCJPEGDEC_restart_interval-variants/restart-more-4.c.
|
||||
- TMCJPEGDEC_parse_dht: C objdiff 99.708336; instruction delta 0, aligned differences 6; source /tmp/da4/TMCJPEGDEC_parse_dht-variants/dht-types-0.c.
|
||||
- TMCJPEGDEC_parse_sof: C objdiff 94.37668; instruction delta -1, aligned differences 129; source /tmp/da4/TMCJPEGDEC_parse_sof-variants/sof-types-0.c.
|
||||
- TMCJPEGDEC_err_restart: C objdiff 78.33044; instruction delta 0, aligned differences 39; source /tmp/da4/TMCJPEGDEC_err_restart-variants/err-final-2.c.
|
||||
- TMCJPEGDEC_make_huffdec: C objdiff 78.43; instruction delta -2, aligned differences 133; source /tmp/da4/TMCJPEGDEC_make_huffdec-variants/mkhdec-final-0.c.
|
||||
- TMCJPEGDEC_decode_iquant_rc: C objdiff 99.76048; instruction delta 0, aligned differences 7; source /tmp/da4/TMCJPEGDEC_decode_iquant_rc-variants/iquant-inline-1.c.
|
||||
|
||||
Final retained state
|
||||
|
||||
Converted: TMCJPEGDEC_imagestart (014a5167), TMCJPEGDEC_parse_para (f518779c), TMCJPEGDEC_parse_sos (a6b74133). Each received an independent clean gate before its separate commit.
|
||||
Every other assigned function remains original assembly, unresolved rather than classified as legitimate vendor assembly. No target instruction requires retaining assembly; the remaining problem is reproducing compiler output in C.
|
||||
Compiled source trials by function: TMCJPEGDEC_init_buff_thumbnail=61, TMCJPEGDEC_imagestart=21, TMCJPEGDEC_scan_varinit=24, TMCJPEGDEC_restart_interval=15, TMCJPEGDEC_parse_para=7, TMCJPEGDEC_parse_dht=33, TMCJPEGDEC_decode_iquant_rc=21, TMCJPEGDEC_parse_sos=6, TMCJPEGDEC_err_restart=14, TMCJPEGDEC_make_huffdec=19, TMCJPEGDEC_parse_sof=21. All eight unconverted functions have at least three distinct compiled source attempts.
|
||||
Useful continuation findings: init_buff_thumbnail receives EXIF data through its legacy work pointer. make_huffdec valptr contains 16-bit code/index pairs; its fallback byte stores are wrong. parse_sof reuses one byte and one word input variable, scans all sample layouts, and materializes SampleComps with lis/addi. An isolated unsized-extern header diagnostic restores 223 instructions but leaves 84 register/order differences, so no header change was retained. err_restart final subtraction reads posX, not posY, and original division is signed despite Ghidra guessing unsigned.
|
||||
Applicable levers covered: inline helpers; signedness and widths; const pointers/parameters; separate or reused locals; declaration order; block scopes; counted loops; source search; direct array access; Ghidra and allocator/copy-lifetime hypotheses. eZiText-only spellings, thunk ordering and aggregate/global section boundaries do not apply to these functions. Prior-art gh search was excluded by the worker no-gh contract. No compiler/version flag sweep, new asm, use-site volatile, register keyword, pinned label or shared-layout trick was retained.
|
||||
|
||||
Final clean verification
|
||||
|
||||
```
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main] pool: IDENTICAL
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main] objdiff: code 5604/5604 data 256/256 functions 13/13 fuzzy 100.0000 linked code 5604
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main] instruction-exact functions: 13/13
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main] section .rodata size 256 match 100.0
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main] section .text size 5604 match 100.0
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main] baseline: code 5604/5604 data 256 functions 13 fuzzy 100.0000
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/buffer/getcode] pool: IDENTICAL
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/buffer/getcode] objdiff: code 316/316 data None/None functions 3/3 fuzzy 100.0000 linked code 316
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/buffer/getcode] instruction-exact functions: 3/3
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/buffer/getcode] section .text size 316 match 100.0
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/buffer/getcode] baseline: code 316/316 data None functions 3 fuzzy 100.0000
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/buffer/mkhdec3] pool: IDENTICAL
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/buffer/mkhdec3] objdiff: code 1228/1228 data None/None functions 2/2 fuzzy 100.0000 linked code 1228
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/buffer/mkhdec3] instruction-exact functions: 2/2
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/buffer/mkhdec3] section .text size 1228 match 100.0
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/buffer/mkhdec3] baseline: code 1228/1228 data None functions 2 fuzzy 100.0000
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/reschange/iqdec_resolution_change_a3] pool: IDENTICAL
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/reschange/iqdec_resolution_change_a3] objdiff: code 908/908 data None/None functions 2/2 fuzzy 100.0000 linked code 908
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/reschange/iqdec_resolution_change_a3] instruction-exact functions: 2/2
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/reschange/iqdec_resolution_change_a3] section .text size 908 match 100.0
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/reschange/iqdec_resolution_change_a3] baseline: code 908/908 data None functions 2 fuzzy 100.0000
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 92.73726 -> 92.73726
|
||||
global fuzzy_match_percent: 99.78007 -> 99.78007
|
||||
global complete_code_percent: 76.40339 -> 76.40339
|
||||
global matched_data_percent: 99.99410 -> 99.99410
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
GATE PASS
|
||||
```
|
||||
|
||||
Search completion and resource limit
|
||||
|
||||
getcode-search:
|
||||
```
|
||||
target counts {'TMCJPEGDEC_init_buff_thumbnail': 34} start {'TMCJPEGDEC_init_buff_thumbnail': 34} {'TMCJPEGDEC_init_buff_thumbnail': 99.26471}
|
||||
done 154 trials; best-nodrop energy -99.2647
|
||||
```
|
||||
scan-search:
|
||||
```
|
||||
target counts {'TMCJPEGDEC_scan_varinit': 129} start {'TMCJPEGDEC_scan_varinit': 129} {'TMCJPEGDEC_scan_varinit': 99.496124}
|
||||
done 239 trials; best-nodrop energy -99.4961
|
||||
```
|
||||
getcode-search2:
|
||||
```
|
||||
target counts {'TMCJPEGDEC_init_buff_thumbnail': 34} start {'TMCJPEGDEC_init_buff_thumbnail': 34} {'TMCJPEGDEC_init_buff_thumbnail': 99.55882}
|
||||
done 57 trials; best-nodrop energy -99.5588
|
||||
```
|
||||
iquant-search:
|
||||
```
|
||||
target counts {'TMCJPEGDEC_decode_iquant_rc': 167} start {'TMCJPEGDEC_decode_iquant_rc': 167} {'TMCJPEGDEC_decode_iquant_rc': 99.76048}
|
||||
done 70 trials; best-nodrop energy -99.7605
|
||||
```
|
||||
sof-search:
|
||||
```
|
||||
target counts {'TMCJPEGDEC_parse_sof': 223} start {'TMCJPEGDEC_parse_sof': 222} {'TMCJPEGDEC_parse_sof': 93.34529}
|
||||
done 79 trials; best-nodrop energy -91.3453
|
||||
```
|
||||
err-search:
|
||||
```
|
||||
target counts {'TMCJPEGDEC_err_restart': 115} start {'TMCJPEGDEC_err_restart': 115} {'TMCJPEGDEC_err_restart': 78.33044}
|
||||
it 10 best-nodrop -78.4174 cnt {'TMCJPEGDEC_err_restart': 115} score [78.41739]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [78.41739]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [78.41739]
|
||||
it 26 best-nodrop -79.6957 cnt {'TMCJPEGDEC_err_restart': 115} score [79.695656]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [79.695656]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [79.695656]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [79.695656]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [79.695656]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [79.608696]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [79.608696]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [79.608696]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [79.608696]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [79.608696]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [79.608696]
|
||||
it 39 best-nodrop -85.0435 cnt {'TMCJPEGDEC_err_restart': 115} score [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [84.91304]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [84.91304]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [84.91304]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [84.91304]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [84.91304]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [84.91304]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [84.91304]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [84.91304]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [84.91304]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [84.95652]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [84.91304]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [84.91304]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
it 80 best-nodrop -85.1304 cnt {'TMCJPEGDEC_err_restart': 115} score [85.13043]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.13043]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.13043]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.13043]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.13043]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.13043]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.13043]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.13043]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.13043]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
SOLUTION {'TMCJPEGDEC_err_restart': 115} [85.04348]
|
||||
done 106 trials; best-nodrop energy -85.1304
|
||||
```
|
||||
restart-search: cancelled own queued process after 1093 seconds without acquiring a shared search slot; zero trials ran.
|
||||
dht-search: cancelled own queued process after 948 seconds without acquiring a shared search slot; zero trials ran.
|
||||
mkhdec-search: cancelled own queued process after 828 seconds without acquiring a shared search slot; zero trials ran.
|
||||
dht-search2: cancelled own queued process after 383 seconds without acquiring a shared search slot; zero trials ran.
|
||||
The stopped jobs wrote only temporary search snapshots. No other worker process or shared limiter was changed. Source search completed on thumbnail initialization, scan geometry, coefficient decoding, frame-header parsing and restart error recovery. Huffman-table building, Huffman-header parsing and restart-interval search remained resource-blocked after their manual C trials.
|
||||
|
||||
Final audit: 11 assigned functions, 242 logged compiled trials. Every unconverted function has at least three distinct source-level trials. Retained exact count 20 -> 20, matched code 8056 -> 8056 bytes, matched data 256 -> 256 bytes; asm bodies 11 -> 8. Eight conversions remain unresolved. No push, PR, merge, rebase, worktree switch or outside-worktree edit occurred.
|
||||
92
tools/decomp-assist/da5.attempts.md
Normal file
92
tools/decomp-assist/da5.attempts.md
Normal file
@@ -0,0 +1,92 @@
|
||||
# da5 de-asm attempts
|
||||
|
||||
Worktree `w0929-fix-board`, branch `agent/w1005/da5`, starting commit `7aa71d29`.
|
||||
Read deasm-round.md, common.md, levers.md, and the original-object Ghidra exports.
|
||||
Baseline full build and quick gate pass. DOL SHA1 `26116613f624061ba99c8d1a299aaa6efa85670d`.
|
||||
WPAD: 67/67 exact, code 31040/31040, data 15096/15096.
|
||||
cntcache: 5/5 exact, code 1828/1828, data 280/280.
|
||||
sdi_api: 22/22 exact, code 5948/5948, data 248/248.
|
||||
|
||||
## ISD_GetCardSize
|
||||
|
||||
1. Activate the existing C fallback, name the card geometry values, and correct the high-capacity sector multiplier from 512 to 1024 to match the target shift by 10. Pool 4/4 identical; 84/84 instructions, 33 differences.
|
||||
2. Decode the CSD fields into named locals before clamping the read block length. 84/84 instructions, 26 differences.
|
||||
3. Reverse the two bitwise-OR expressions so MWCC emits the target rotate-insert direction. 84/84 instructions, 23 differences.
|
||||
4. Split the block-length subtraction and capacity product into assignments. 84/84 instructions, 26 differences. Rejected.
|
||||
5. Compile all 36 declaration/field-extraction orders from attempt 3. Best 84/84, 20 differences. No exact result yet. Results in build/da5/sdi-search.json.
|
||||
|
||||
6. Run the provided srcsearch tool. Its relative --out path failed to resolve the mini report; a worktree-local copy used an absolute output path and matched the function definition instead of the earlier prototype. One legal mutation produced no score gain from 98.39286%.
|
||||
7. Compile 180 combinations of declaration order, normalized block length, capacity reuse, and an inline clamp helper. Best remained 84/84 with 20 differences.
|
||||
8. Compile 96 combinations of hoisted fields, separate declarations, unsigned-int versus u32 locals, and output-local order. Same best.
|
||||
9. Compile 24 product/scale/sector inline-helper and geometry-struct variants. Same best.
|
||||
10. Compile all 24 orders including the status local and three output locals. Same best.
|
||||
11. Compile all 24 factor order/grouping combinations from the two best declaration layouts. Best remained 84/84 with 20 register differences. The unchanged asm was retained.
|
||||
|
||||
## WPADiManageHandler
|
||||
|
||||
1. Restore the C handler using the existing queue/rumble/settings helpers, as in the ogws WPAD_WPAD.c reference. The 2010 target also needs the reconnect countdown: decrement with saturation on every running handler call, then reconnect only at zero. Move __reconnect before WPADiAfh to restore literal order and remove the assembly-only packed string block.
|
||||
Pool 22/22 identical; ctxdiff 484/484 instructions, diffs 0.
|
||||
Clean full gate: GATE PASS, 67/67 exact, code 31040/31040, data 15096/15096, no regressions or forbidden/readability findings. DOL SHA1 unchanged.
|
||||
|
||||
## _CNTCACHEDeleteTitle
|
||||
|
||||
1. Reconstruct the token loop and deletion dispatch. Pool 9/9 identical; 51/50 instructions. ES_TITLE_TYPE returns u64, so comparison emits xor plus compare.
|
||||
2. Cast the extracted title type to u32, matching the target's word comparison. Pool unchanged; 50/50 instructions, diffs 0.
|
||||
Clean full gate: GATE PASS, 5/5 exact, code 1828/1828, data 280/280; zero regressions. DOL SHA1 unchanged.
|
||||
|
||||
## _CNTCACHEIsTitleRemovable
|
||||
|
||||
1. Inline NAND usage helper, aligned TMD buffer, typed ESTmdView access. Pool 9/9 identical; 81/82 instructions, path stack offset and return-register differences.
|
||||
2. Align the path buffer, use a single-exit helper, and unsigned version extraction. 80/82; correct frame and path positions, but two missing return copies.
|
||||
3. Separate NAND status from the helper's result and mask the high version byte. 80/82; version test now exact. Missing copies and initializer scheduling remain.
|
||||
4. Shared goto exit in the outer function. 78/82; collapses the target's two early-return branches. Rejected.
|
||||
5. Separate inline TMD eligibility helper. 80/82, shifts scalar stack slots and retains the missing copies. Rejected.
|
||||
6. Use s32 for statuses and the public return value. Same 80/82; DeleteTitle remains exact. Rejected.
|
||||
7. Put the usage check directly into the outer function and reuse the ES result local. Still 80/82; scalar stack positions worsen. Rejected.
|
||||
8. Unsigned removable flag. Still 80/82 and changes cmpwi to cmplwi. Rejected.
|
||||
9. Hoist the ES result declaration without changing early returns. Still 80/82.
|
||||
10. Separate helper result initialization and the negative-error arm. 81/82; adds a branch rather than the target return copies. Rejected.
|
||||
|
||||
11. Group NAND usage counts into a local struct. Still 80/82; moves the scalar slots. Rejected.
|
||||
12. Name the high/low title-ID arguments before snprintf. Still 80/82; changes argument scheduling. Rejected.
|
||||
13. Use automatic inlining instead of an explicit inline keyword on the usage helper. Still 80/82.
|
||||
14. Add a nested path-and-usage helper. Still 80/82.
|
||||
Diagnostic-only opt_propagation, opt_common_subs, scheduling, and opt_dead_assignments pragmas did not change the 80-instruction result. All pragmas removed.
|
||||
|
||||
15. Source search over the usage helper completed 185 trials, with no improvement from the 80/82-instruction, 89.60976% candidate. It waited for a shared CPU slot before starting. The unchanged asm was retained.
|
||||
|
||||
## _CNTCACHEDeleteContent
|
||||
|
||||
1. Reconstruct the typed TMD content loop with an inline NAND usage helper. Pool 9/9 identical; 144/145 instructions. Buffer pointer is formed early; scalar slots reversed; extra constant kept across the loop.
|
||||
2. Move buffer binding after title validation, swap scalar declarations, and use explicit cleanup branches. 143/145. Frame, buffer binding, and scalar slots now match; missing constant reload and helper-result copy remain.
|
||||
3. Use NANDTitleIdHi/Lo in the path helper. Same 143/145.
|
||||
4. Make the inline helper title-ID parameter const. Same 143/145.
|
||||
5. Source search over DeleteContent completed 145 trials with no improvement from the 143/145-instruction, 95.793106% candidate. The unchanged asm was retained.
|
||||
|
||||
## CNTCACHEClear
|
||||
|
||||
1. Implement the NAND read/line-tokenization/delete/seek/cleanup flow with ordinary literals. Pool has 13 strings versus 9: the existing byte pool duplicates all four live literals. Rejected before register tuning.
|
||||
2. Remove the packed byte pool and use a normal version literal. Place the title-data format after the clear routine. Pool has 5 strings versus 9, first divergence at index 1: `DeleteTitle` versus target `DeleteTitle `. The target also retains `%016llx `, `/shared2`, and `DeleteContent `, none referenced by the five surviving functions.
|
||||
3. Reverse the command-dispatch source order. Pool still 5 versus 9, now index 1 is `DeleteContent`. Branch polarity cannot supply the four absent literal entries. Rejected.
|
||||
Kept the original placeholder. No offset references into the byte blob, dummy string objects, or invented dead functions were added to force data offsets. These strings are consistent with removed cache-writing routines. Their original declarations and references remain unknown.
|
||||
|
||||
## Final validation
|
||||
|
||||
Two of six requested bodies converted: WPADiManageHandler and _CNTCACHEDeleteTitle. Four placeholders remain, with the compiled trials recorded above. No remaining assigned body was classified as original assembly.
|
||||
|
||||
The final full, non-quick gate rebuilt all 43U objects and passed for all three assigned units. Pools are identical, every function and owned section is 100.0%, and regressions, forbidden patterns, and readability warnings are all zero. Fresh ctxdiff after the clean build reports 484/484 instructions with zero differences for WPADiManageHandler and 50/50 with zero differences for _CNTCACHEDeleteTitle. Exact-name objdiff reports 100.0% for both.
|
||||
|
||||
| Unit | Instruction-exact before -> after | Code before -> after | Data before -> after |
|
||||
| --- | --- | --- | --- |
|
||||
| WPAD | 67/67 -> 67/67 | 31040/31040 -> 31040/31040 | 15096/15096 -> 15096/15096 |
|
||||
| cntcache | 5/5 -> 5/5 | 1828/1828 -> 1828/1828 | 280/280 -> 280/280 |
|
||||
| sdi_api | 22/22 -> 22/22 | 5948/5948 -> 5948/5948 | 248/248 -> 248/248 |
|
||||
|
||||
GATE PASS
|
||||
|
||||
DOL SHA1: `26116613f624061ba99c8d1a299aaa6efa85670d`.
|
||||
The unit counts remain unchanged because the previous assembly bodies already counted as exact.
|
||||
|
||||
Inventory audit: 209/209 remaining asm bodies and blocks have distinct file/line entries, verified against current source lines. Verdicts: 160 ORIGINAL-ASM, 49 PLACEHOLDER. Excluded 65 declarations and comment text. Other workers' files were classified without edits.
|
||||
|
||||
Scratch candidates and experiment results remain in this worktree's ignored `build/da5/` directory. `build/da5/final-gate.log` contains the full gate output. No source changes remain outside the two accepted conversions.
|
||||
313
tools/decomp-assist/f5b.attempts.md
Normal file
313
tools/decomp-assist/f5b.attempts.md
Normal file
@@ -0,0 +1,313 @@
|
||||
# f5b focus round
|
||||
|
||||
Branch agent/w1005/f5b, base 491bba6a. Own Address::onEventDerived, then AddressEdit::create, get_friendinfo and update_friendinfo. Fresh origin fetch confirms the base. Prior f5 drag match is merged as #1159 and must stay exact.
|
||||
|
||||
Acceptance: readable C/C++, identical pools, exact-name objdiff 100.0 and zero raw instruction differences for each retained candidate, no other function drops, then clean full gate and DOL SHA1. Matching phase only; configure.py remains unchanged. No pushes, PRs, merges, rebases or other-worktree edits.
|
||||
|
||||
Read scene4, gk3 and a23h history, plus f5's 88 manual update measurements and three completed 1200-second searches. Reuse those findings and avoid repeating unchanged hypotheses. Fresh experiments and all rejected variants remain in /tmp/f5b-work.
|
||||
|
||||
## Baseline and trials
|
||||
|
||||
- event-baseline: Fresh real-command compilation on 491bba6a. {"score": 98.42593, "insns": [270, 270], "diffs": 81, "drops": {}, "pool": "POOL IDENTICAL up to 81 (mine=81 base=81)"}. Evidence `/tmp/f5b-work/event-baseline/`.
|
||||
- create-baseline: Fresh real-command compilation on 491bba6a. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-baseline/`.
|
||||
- get-baseline: Fresh real-command compilation on 491bba6a. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-baseline/`.
|
||||
- update-baseline: Fresh real-command compilation on 491bba6a. {"score": 99.42105, "insns": [38, 38], "diffs": 2, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/update-baseline/`.
|
||||
- event-r1-manager-pointer: Give the full pane-name lookup a typed inline return boundary. {"error": "pl-workers\\data-\n# d5\\include\\scene\\iplSceneBase.h:6\n# Z:\\mnt\\drive2\\projects\\wii-ipl-workers\\data-\n# d5\\include\\scene\\iplFaderSceneBase.h:4\n# Z:\\mnt\\drive2\\projects\\wii-ipl-workers\\data-\n# d5\\include\\iplSceneUIHeader.h:5\n# Z:\\mnt\\drive2\\projects\\wii-ipl-workers\\data-\n# d5\\include\\scene\\address\\iplAddress.h:4\n# Z:\\tmp\\f5b-work\\event-r1-manager-pointer\\iplAddress.cpp:6)\n### mwcceppc.exe Compiler:\n# File: Z:\\tmp\\f5b-work\\event-r1-manager-pointer\\iplAddress.cpp\n# ----------------------------------------------------------------\n# 1422: const char* paneName = getEventPaneName(mpManager, compId); \n# Error: ^\n# (10248) function call '[ipl::scene::Address].getEventPaneName({lval} \n# gui::Manager *, {lval} unsigned long)' does not match\n# 'ipl::scene::getEventPaneName(ipl::gui::PaneManager *, unsigned long)'\n# Too many errors printed, aborting program\n\nUser break, cancelled...\n"}. Evidence `/tmp/f5b-work/event-r1-manager-pointer/`.
|
||||
- event-r1-manager-reference: Give the full pane-name lookup a typed inline return boundary. {"error": "orkers\\data-\n# d5\\include\\scene\\iplSceneBase.h:6\n# Z:\\mnt\\drive2\\projects\\wii-ipl-workers\\data-\n# d5\\include\\scene\\iplFaderSceneBase.h:4\n# Z:\\mnt\\drive2\\projects\\wii-ipl-workers\\data-\n# d5\\include\\iplSceneUIHeader.h:5\n# Z:\\mnt\\drive2\\projects\\wii-ipl-workers\\data-\n# d5\\include\\scene\\address\\iplAddress.h:4\n# Z:\\tmp\\f5b-work\\event-r1-manager-reference\\iplAddress.cpp:6)\n### mwcceppc.exe Compiler:\n# File: Z:\\tmp\\f5b-work\\event-r1-manager-reference\\iplAddress.cpp\n# ------------------------------------------------------------------\n# 1422: const char* paneName = getEventPaneName(*mpManager, compId); \n# Error: ^\n# (10248) function call '[ipl::scene::Address].getEventPaneName({lval} \n# gui::Manager, {lval} unsigned long)' does not match\n# 'ipl::scene::getEventPaneName(ipl::gui::PaneManager &, unsigned long)'\n# Too many errors printed, aborting program\n\nUser break, cancelled...\n"}. Evidence `/tmp/f5b-work/event-r1-manager-reference/`.
|
||||
- event-r1-pane-reference: Give the full pane-name lookup a typed inline return boundary. {"score": 98.42593, "insns": [270, 270], "diffs": 81, "drops": {}, "pool": "POOL IDENTICAL up to 81 (mine=81 base=81)"}. Evidence `/tmp/f5b-work/event-r1-pane-reference/`.
|
||||
- event-r1-button-getter: Typed scene getter controls the button receiver lifetime. {"score": 100.0, "insns": [270, 270], "diffs": 0, "drops": {}, "pool": "POOL IDENTICAL up to 81 (mine=81 base=81)"}. Evidence `/tmp/f5b-work/event-r1-button-getter/`.
|
||||
- event-r1-button-reference-getter: Typed scene getter controls the button receiver lifetime. {"score": 100.0, "insns": [270, 270], "diffs": 0, "drops": {}, "pool": "POOL IDENTICAL up to 81 (mine=81 base=81)"}. Evidence `/tmp/f5b-work/event-r1-button-reference-getter/`.
|
||||
- event-r1-mail-getter: Typed mail-scene getter boundary before exit animation. {"score": 98.37037, "insns": [270, 270], "diffs": 84, "drops": {"onEventDerived__Q33ipl5scene7AddressFUlUlPCQ33ipl10controller9Interface": [98.42593, 98.37037]}, "pool": "POOL IDENTICAL up to 81 (mine=81 base=81)"}. Evidence `/tmp/f5b-work/event-r1-mail-getter/`.
|
||||
- event-r1-controller-getter: Typed controller lookup boundary in both hover cases. {"score": 98.42593, "insns": [270, 270], "diffs": 81, "drops": {}, "pool": "POOL IDENTICAL up to 81 (mine=81 base=81)"}. Evidence `/tmp/f5b-work/event-r1-controller-getter/`.
|
||||
- event-r1-animation-pointer: Keep each animation operation behind a typed layout boundary. {"score": 98.42593, "insns": [270, 270], "diffs": 81, "drops": {}, "pool": "POOL IDENTICAL up to 81 (mine=81 base=81)"}. Evidence `/tmp/f5b-work/event-r1-animation-pointer/`.
|
||||
- event-r1-animation-reference: Keep each animation operation behind a typed layout boundary. {"score": 98.42593, "insns": [270, 270], "diffs": 81, "drops": {}, "pool": "POOL IDENTICAL up to 81 (mine=81 base=81)"}. Evidence `/tmp/f5b-work/event-r1-animation-reference/`.
|
||||
|
||||
## Address exact candidate
|
||||
|
||||
A typed getEventButton() inline lookup fixes all 81 register differences without changing the 270-instruction stream or pool. Both pointer-return and reference-return variants were exact; retain the smaller pointer form. Every Address function remains at its baseline or improves, including the merged drag match. Other helper boundaries did not help. The two failed manager experiments passed the derived PaneManager type where the stored receiver is the base gui::Manager; they were not retained.
|
||||
|
||||
- create-r1-board-file-getter: Typed Board lookup boundary, following the exact event Button getter. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r1-board-file-getter/`.
|
||||
- create-r1-board-file-reference: Typed Board lookup boundary, following the exact event Button getter. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r1-board-file-reference/`.
|
||||
- create-r1-board-scene-getter: Typed Board lookup boundary, following the exact event Button getter. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r1-board-scene-getter/`.
|
||||
- create-r1-text-pointer: Inline named-pane setter binds the actual text before its virtual pane lookup. {"score": 95.99756, "insns": [802, 820], "diffs": 318, "drops": {"create__Q33ipl5scene11AddressEditFv": [97.5561, 95.99756]}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r1-text-pointer/`.
|
||||
- create-r1-text-reference: Inline named-pane setter binds the actual text before its virtual pane lookup. {"score": 95.99756, "insns": [802, 820], "diffs": 318, "drops": {"create__Q33ipl5scene11AddressEditFv": [97.5561, 95.99756]}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r1-text-reference/`.
|
||||
- create-r1-text-wrapper: Inline named-pane setter binds the actual text before its virtual pane lookup. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r1-text-wrapper/`.
|
||||
|
||||
Address candidate object rebuild: pool 81/81 identical; onEventDerived 270/270, raw ctxdiff zero. Incremental full gate GATE PASS, Address 101/101 instruction-exact, code 23988/23988, data 1964/1964, zero regressions and correct DOL SHA1. Final clean gate remains required. Evidence: /tmp/f5b-work/address-quick-gate.log.
|
||||
- create-r2-member-direct: Guarded inline member setter binds text across the pane lookup. {"error": "### mwcceppc.exe Compiler:\n# File: Z:\\tmp\\f5b-work\\create-r2-member-direct\\iplAddressEdit.cpp\n# -------------------------------------------------------------------\n# 2: #include \"/tmp/f5b-work/create-r2-member-direct-header/iplAddressEdit.h\" \n# Error: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n# (10151) the file '/tmp/f5b-work/create-r2-member-direct-header/\n# iplAddressEdit.h' cannot be opened\n# Too many errors printed, aborting program\n\nUser break, cancelled...\n"}. Evidence `/tmp/f5b-work/create-r2-member-direct/`.
|
||||
- create-r2-member-wrapper: Guarded inline member setter binds text across the pane lookup. {"error": "### mwcceppc.exe Compiler:\n# File: Z:\\tmp\\f5b-work\\create-r2-member-wrapper\\iplAddressEdit.cpp\n# --------------------------------------------------------------------\n# 2: #include \"/tmp/f5b-work/create-r2-member-wrapper-header/iplAddressEdit.h\" \n# Error: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n# (10151) the file '/tmp/f5b-work/create-r2-member-wrapper-header/\n# iplAddressEdit.h' cannot be opened\n# Too many errors printed, aborting program\n\nUser break, cancelled...\n"}. Evidence `/tmp/f5b-work/create-r2-member-wrapper/`.
|
||||
- create-r2-margin-getters: Inline margin value boundary inside the new expression, preserving allocation condition. {"score": 96.42927, "insns": [808, 820], "diffs": 791, "drops": {"create__Q33ipl5scene11AddressEditFv": [97.5561, 96.42927]}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r2-margin-getters/`.
|
||||
- create-r2-margin-helper-arg: Inline margin value boundary inside the new expression, preserving allocation condition. {"score": 96.42927, "insns": [808, 820], "diffs": 791, "drops": {"create__Q33ipl5scene11AddressEditFv": [97.5561, 96.42927]}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r2-margin-helper-arg/`.
|
||||
- create-r2-member-direct-local: Same guarded setter test with a source-local private include path. {"score": 95.99756, "insns": [802, 820], "diffs": 318, "drops": {"create__Q33ipl5scene11AddressEditFv": [97.5561, 95.99756]}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r2-member-direct-local/`.
|
||||
- create-r2-member-wrapper-local: Same guarded setter test with a source-local private include path. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r2-member-wrapper-local/`.
|
||||
|
||||
Create search seeds 50, 500 and 5000 queued for 1200 seconds each from the best manual state, still baseline. Current shared srcsearch copied privately with only the already-proven owned-definition locator fix; mutation safety guards and the global 24-slot limiter are unchanged. Output directories /tmp/f5b-work/create-search-<seed>.
|
||||
- get-r1-arguments-edit-pane-text: Small setter boundary passes the actual pane and text values in a natural alternate parameter order. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r1-arguments-edit-pane-text/`.
|
||||
- get-r1-arguments-edit-text-pane: Small setter boundary passes the actual pane and text values in a natural alternate parameter order. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r1-arguments-edit-text-pane/`.
|
||||
- get-r1-arguments-pane-edit-text: Small setter boundary passes the actual pane and text values in a natural alternate parameter order. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r1-arguments-pane-edit-text/`.
|
||||
- get-r1-arguments-pane-text-edit: Small setter boundary passes the actual pane and text values in a natural alternate parameter order. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r1-arguments-pane-text-edit/`.
|
||||
- get-r1-arguments-text-edit-pane: Small setter boundary passes the actual pane and text values in a natural alternate parameter order. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r1-arguments-text-edit-pane/`.
|
||||
- get-r1-arguments-text-pane-edit: Small setter boundary passes the actual pane and text values in a natural alternate parameter order. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r1-arguments-text-pane-edit/`.
|
||||
- get-r1-wrapper: Vary the actual pane lookup object boundary without caching an unrelated pointer. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r1-wrapper/`.
|
||||
- get-r1-root-reference: Vary the actual pane lookup object boundary without caching an unrelated pointer. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r1-root-reference/`.
|
||||
- get-search-seed: Name the real cache index and text lifetimes to expose source-search declaration mutations. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-search-seed/`.
|
||||
- update-r1-scene-pointer: Use the typed scene getter boundary that made Address event handling exact. {"score": 99.42105, "insns": [38, 38], "diffs": 2, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/update-r1-scene-pointer/`.
|
||||
- update-r1-scene-reference: Use the typed scene getter boundary that made Address event handling exact. {"score": 99.42105, "insns": [38, 38], "diffs": 2, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/update-r1-scene-reference/`.
|
||||
- update-r1-commit-pointer: Group the cache update and parent-list refresh behind one real operation boundary. {"error": "rSceneBase.h:4\n# Z:\\mnt\\drive2\\projects\\wii-ipl-workers\\data-\n# d5\\include\\iplSceneHeader.h:5\n# Z:\\mnt\\drive2\\projects\\wii-ipl-workers\\data-\n# d5\\include\\scene\\address\\iplAddressEdit.h:4\n# Z:\\tmp\\f5b-work\\update-r1-commit-pointer\\iplAddressEdit.cpp:2)\n### mwcceppc.exe Compiler:\n# File: Z:\\tmp\\f5b-work\\update-r1-commit-pointer\\iplAddressEdit.cpp\n# --------------------------------------------------------------------\n# 313: return; \n# Warning: ^\n# (10184) return value expected\n### mwcceppc.exe Compiler:\n# 316: } \n# Warning: ^\n# (10184) return value expected\n### mwcceppc.exe Compiler:\n# 2885: pl::scene::Address*>(ipl::System::getScene(0x14))->reset_friend(); \n# Error: ^\n# (10381) illegal access from 'ipl::scene::Address' to protected/private \n# member 'ipl::scene::Address::reset_friend()'\n# Too many errors printed, aborting program\n\nUser break, cancelled...\n"}. Evidence `/tmp/f5b-work/update-r1-commit-pointer/`.
|
||||
- update-r1-commit-reference: Group the cache update and parent-list refresh behind one real operation boundary. {"error": "Base.h:4\n# Z:\\mnt\\drive2\\projects\\wii-ipl-workers\\data-\n# d5\\include\\iplSceneHeader.h:5\n# Z:\\mnt\\drive2\\projects\\wii-ipl-workers\\data-\n# d5\\include\\scene\\address\\iplAddressEdit.h:4\n# Z:\\tmp\\f5b-work\\update-r1-commit-reference\\iplAddressEdit.cpp:2)\n### mwcceppc.exe Compiler:\n# File: Z:\\tmp\\f5b-work\\update-r1-commit-reference\\iplAddressEdit.cpp\n# ----------------------------------------------------------------------\n# 313: return; \n# Warning: ^\n# (10184) return value expected\n### mwcceppc.exe Compiler:\n# 316: } \n# Warning: ^\n# (10184) return value expected\n### mwcceppc.exe Compiler:\n# 2885: pl::scene::Address*>(ipl::System::getScene(0x14))->reset_friend(); \n# Error: ^\n# (10381) illegal access from 'ipl::scene::Address' to protected/private \n# member 'ipl::scene::Address::reset_friend()'\n# Too many errors printed, aborting program\n\nUser break, cancelled...\n"}. Evidence `/tmp/f5b-work/update-r1-commit-reference/`.
|
||||
|
||||
Get-friendinfo seeds 51, 501 and 5001 queued with the same 1200-second budget and unchanged limiter. The named-local seed compiled identically to baseline: 82/84 instructions, 88.03571%, 66 positional differences, identical pool and zero drops.
|
||||
- create-r3-const-margins: Test the genuine margin value or reference lifetime across vector construction. {"score": 96.42927, "insns": [808, 820], "diffs": 791, "drops": {"create__Q33ipl5scene11AddressEditFv": [97.5561, 96.42927]}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r3-const-margins/`.
|
||||
- create-r3-static-margins: Test the genuine margin value or reference lifetime across vector construction. {"score": 96.42927, "insns": [808, 820], "diffs": 791, "drops": {"create__Q33ipl5scene11AddressEditFv": [97.5561, 96.42927]}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r3-static-margins/`.
|
||||
- create-r3-reference-margins: Test the genuine margin value or reference lifetime across vector construction. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r3-reference-margins/`.
|
||||
- create-r3-double-margins: Test the genuine margin value or reference lifetime across vector construction. {"score": 97.40976, "insns": [818, 820], "diffs": 329, "drops": {"create__Q33ipl5scene11AddressEditFv": [97.5561, 97.40976]}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r3-double-margins/`.
|
||||
- create-r3-heap-getter: Give the final constructor heap argument a typed value boundary. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r3-heap-getter/`.
|
||||
- create-r3-heap-reference: Give the final constructor heap argument a typed value boundary. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r3-heap-reference/`.
|
||||
- get-r2-const-array-ref-direct: Preserve the actual String array or enclosing edit accessor type across pane lookup. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r2-const-array-ref-direct/`.
|
||||
- get-r2-const-array-ref-wrapper: Preserve the actual String array or enclosing edit accessor type across pane lookup. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r2-const-array-ref-wrapper/`.
|
||||
- get-r2-array-ref-direct: Preserve the actual String array or enclosing edit accessor type across pane lookup. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r2-array-ref-direct/`.
|
||||
- get-r2-array-ref-wrapper: Preserve the actual String array or enclosing edit accessor type across pane lookup. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r2-array-ref-wrapper/`.
|
||||
- get-r2-const-array-pointer-direct: Preserve the actual String array or enclosing edit accessor type across pane lookup. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r2-const-array-pointer-direct/`.
|
||||
- get-r2-const-array-pointer-wrapper: Preserve the actual String array or enclosing edit accessor type across pane lookup. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r2-const-array-pointer-wrapper/`.
|
||||
- update-r2-cache-getter: Typed cache/index accessor boundaries around the final friend update. {"score": 99.42105, "insns": [38, 38], "diffs": 2, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/update-r2-cache-getter/`.
|
||||
- get-r2-edit-pointer-direct: Preserve the actual String array or enclosing edit accessor type across pane lookup. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r2-edit-pointer-direct/`.
|
||||
- update-r2-index-getter: Typed cache/index accessor boundaries around the final friend update. {"score": 99.42105, "insns": [38, 38], "diffs": 2, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/update-r2-index-getter/`.
|
||||
- update-r2-both-getter: Typed cache/index accessor boundaries around the final friend update. {"score": 99.42105, "insns": [38, 38], "diffs": 2, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/update-r2-both-getter/`.
|
||||
- get-r2-edit-pointer-wrapper: Preserve the actual String array or enclosing edit accessor type across pane lookup. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r2-edit-pointer-wrapper/`.
|
||||
- update-r2-commit-member: A member boundary retains the real friend access permission while grouping cache update and list refresh. {"score": 99.42105, "insns": [38, 38], "diffs": 2, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/update-r2-commit-member/`.
|
||||
- get-r3-load-name-pointer: Return the actual name buffer from the operation that fills it. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r3-load-name-pointer/`.
|
||||
- get-r3-load-buffers-pointer: Return populated text buffers at both real String operation boundaries. {"score": 88.09524, "insns": [84, 84], "diffs": 42, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r3-load-buffers-pointer/`.
|
||||
- get-r3-load-name-reference: Return the actual name buffer from the operation that fills it. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r3-load-name-reference/`.
|
||||
- get-r3-load-buffers-reference: Return populated text buffers at both real String operation boundaries. {"score": 88.09524, "insns": [84, 84], "diffs": 42, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r3-load-buffers-reference/`.
|
||||
- update-search-seed: Combine the prior named-local seed with a typed cache getter for a new source-search round. {"score": 99.42105, "insns": [38, 38], "diffs": 2, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/update-search-seed/`.
|
||||
|
||||
Update seeds 52, 502 and 5002 use the prior named-local seed with a new typed cache getter, verified at unchanged 99.42105%, 38/38, two differences. Get-friendinfo seed 50001 uses the best new manual candidate: returning populated display buffers from real String operations gives 84/84 instructions, 88.09524%, 42 positional differences and no drops. Its two added address instructions are duplicated across the format branches, so this is still structurally wrong and is not retained. All runs retain the standard 1200-second budget and 24-slot limiter.
|
||||
- get-r4-display-entry: Keep the display buffer address alive across the real formatting operations. {"score": 92.67857, "insns": [83, 84], "diffs": 36, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r4-display-entry/`.
|
||||
- get-r4-display-before-name: Keep the display buffer address alive across the real formatting operations. {"score": 91.40476, "insns": [83, 84], "diffs": 36, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r4-display-before-name/`.
|
||||
- get-r4-display-before-format: Keep the display buffer address alive across the real formatting operations. {"score": 91.07143, "insns": [83, 84], "diffs": 42, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r4-display-before-format/`.
|
||||
- get-r4-format-boundary: One common formatter return expresses the shared display address after both formatting paths. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r4-format-boundary/`.
|
||||
- get-r5-const-entry-declare: Reuse one typed text receiver with separate definite assignments and natural declaration positions. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r5-const-entry-declare/`.
|
||||
- get-r5-const-entry-name: Reuse one typed text receiver with separate definite assignments and natural declaration positions. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r5-const-entry-name/`.
|
||||
- get-r5-const-after-copy-declare: Reuse one typed text receiver with separate definite assignments and natural declaration positions. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r5-const-after-copy-declare/`.
|
||||
- get-r5-const-after-copy-name: Reuse one typed text receiver with separate definite assignments and natural declaration positions. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r5-const-after-copy-name/`.
|
||||
- get-r5-mutable-entry-declare: Reuse one typed text receiver with separate definite assignments and natural declaration positions. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r5-mutable-entry-declare/`.
|
||||
- get-r5-mutable-entry-name: Reuse one typed text receiver with separate definite assignments and natural declaration positions. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r5-mutable-entry-name/`.
|
||||
- get-r5-mutable-after-copy-declare: Reuse one typed text receiver with separate definite assignments and natural declaration positions. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r5-mutable-after-copy-declare/`.
|
||||
- get-r5-mutable-after-copy-name: Reuse one typed text receiver with separate definite assignments and natural declaration positions. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r5-mutable-after-copy-name/`.
|
||||
- get-r6-text-first: Bind the two real text-setting operands as a typed local value before applying them. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r6-text-first/`.
|
||||
- get-r6-pane-first: Bind the two real text-setting operands as a typed local value before applying them. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r6-pane-first/`.
|
||||
- get-r6-reference-text: Bind the two real text-setting operands as a typed local value before applying them. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r6-reference-text/`.
|
||||
|
||||
Seed get-50001 was still unstarted with an empty log, so it was requeued once from the stronger manual display-entry candidate: 92.67857%, 83/84 instructions, no drops and an identical pool. Its single remaining missing instruction is not yet fixed; the display pointer is computed too early. No trials were discarded, and seed, output directory, time budget and limiter are unchanged.
|
||||
- create-r4-margin-reference-getters: Evaluate ordinary read-only margin objects through references within the new expression. {"score": 96.42927, "insns": [808, 820], "diffs": 791, "drops": {"create__Q33ipl5scene11AddressEditFv": [97.5561, 96.42927]}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r4-margin-reference-getters/`.
|
||||
- create-r4-heap-first: Name actual portrait-creation arguments in the two natural evaluation orders. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r4-heap-first/`.
|
||||
- create-r4-manager-first: Name actual portrait-creation arguments in the two natural evaluation orders. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r4-manager-first/`.
|
||||
- create-r4-layout-factory: Share the repeated real layout construction operation through a typed factory. {"score": 94.68414, "insns": [827, 820], "diffs": 759, "drops": {"create__Q33ipl5scene11AddressEditFv": [97.5561, 94.68414]}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r4-layout-factory/`.
|
||||
|
||||
## Retained source audit
|
||||
|
||||
Address source object audit confirms every changed byte lies inside onEventDerived: 106 bytes across its 81 previously differing instruction words. Function names and extents remain identical; getEventButton emits no standalone function. All allocated non-code sections are byte-identical, and the .sbss extent is unchanged. Evidence: /tmp/f5b-work/event-section-audit.json. Literal-reference checking analyzed all three sound arguments in the owned function with no candidates, skips or errors.
|
||||
|
||||
Origin/main advanced from 491bba6a to bfe77b7f with two keyboard commits. The owned source/header files are unchanged there. The assigned branch remains on its original base, following the no-rebase rule; final regression comparisons will name base 491bba6a explicitly.
|
||||
- create-r5-address-pointer: Apply the successful typed scene-return boundary to the parent Address lookup. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r5-address-pointer/`.
|
||||
- create-r5-two-scene-pointer: Combine both real scene lookup boundaries before judging their register interaction. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r5-two-scene-pointer/`.
|
||||
- create-r6-reviewed-search: Recompile the best search spelling while restoring the target-proven signed Mii index load. {"score": 97.55366, "insns": [818, 820], "diffs": 331, "drops": {"create__Q33ipl5scene11AddressEditFv": [97.5561, 97.55366]}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r6-reviewed-search/`.
|
||||
- create-r5-address-reference: Apply the successful typed scene-return boundary to the parent Address lookup. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r5-address-reference/`.
|
||||
- create-r5-two-scene-reference: Combine both real scene lookup boundaries before judging their register interaction. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r5-two-scene-reference/`.
|
||||
- create-r7-baseline-api-index: Use the API native unsigned index buffer with an explicit signed value at the target-proven load. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r7-baseline-api-index/`.
|
||||
- create-r7-baseline-direct-api-index: Remove the now redundant buffer cast while retaining the signed portrait index value. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r7-baseline-direct-api-index/`.
|
||||
- create-r7-search-api-index: Use the API native unsigned index buffer with an explicit signed value at the target-proven load. {"score": 97.55366, "insns": [818, 820], "diffs": 331, "drops": {"create__Q33ipl5scene11AddressEditFv": [97.5561, 97.55366]}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r7-search-api-index/`.
|
||||
- create-r7-search-direct-api-index: Remove the now redundant buffer cast while retaining the signed portrait index value. {"score": 97.55366, "insns": [818, 820], "diffs": 331, "drops": {"create__Q33ipl5scene11AddressEditFv": [97.5561, 97.55366]}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r7-search-direct-api-index/`.
|
||||
|
||||
## Completed create search review
|
||||
|
||||
- Seed 50: done 290 trials; best-nodrop energy -93.9512; it 180 best-nodrop -93.9512 cnt {'create__Q33ipl5scene11AddressEditFv': 818} score [97.95122]; solution.c present: False.
|
||||
- Seed 500: done 292 trials; best-nodrop energy -93.9512; it 198 best-nodrop -93.9512 cnt {'create__Q33ipl5scene11AddressEditFv': 818} score [97.95122]; solution.c present: False.
|
||||
- Seed 5000: done 289 trials; best-nodrop energy -93.939; it 241 best-nodrop -93.9390 cnt {'create__Q33ipl5scene11AddressEditFv': 818} score [97.939026]; solution.c present: False.
|
||||
|
||||
All three runs used the full 1200-second budget after slot acquisition. Best sources remain 818/820 instructions and below 98%. Their higher scores include an unsigned Mii index buffer that changes the target signed load. Recompiling the best with s16 storage or an explicit s16 value restores that load but gives 97.55366%, below the 97.5561% baseline. Both forms were compiled and rejected. No search changes were retained.
|
||||
|
||||
The current manual archive includes 30 compiled create measurements, 37 get_friendinfo measurements, 8 update_friendinfo measurements and 8 onEventDerived measurements, including each baseline. Six rejected compile attempts are logged separately.
|
||||
|
||||
## First get-friendinfo search results
|
||||
|
||||
- Seed 51: done 237 trials; best-nodrop energy -84.0357; best.c False; solution.c False.
|
||||
- Seed 501: done 238 trials; best-nodrop energy -84.0357; best.c False; solution.c False.
|
||||
- Seed 5001: done 236 trials; best-nodrop energy -84.0357; best.c False; solution.c False.
|
||||
|
||||
These three full 1200-second searches found no improvement from the named-local baseline. The fourth seed still waits to search the stronger 92.67857% early-display-pointer state.
|
||||
|
||||
## Clean full gate
|
||||
|
||||
The non-quick gate ran against pinned branch base 491bba6a. All four pending searches were paused before acquiring a slot or starting their budget, then resumed in a finally block. Evidence: /tmp/f5b-work/gate-search-pause.json. The current source remained unchanged.
|
||||
|
||||
```text
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[src/scene/address/iplAddress] pool: IDENTICAL
|
||||
[src/scene/address/iplAddress] objdiff: code 23988/23988 data 1964/1964 functions 101/101 fuzzy 100.0000 linked code 0
|
||||
[src/scene/address/iplAddress] instruction-exact functions: 101/101
|
||||
[src/scene/address/iplAddress] section .ctors size 4 match 100.0
|
||||
[src/scene/address/iplAddress] section .data size 1880 match 100.0
|
||||
[src/scene/address/iplAddress] section .rodata size 24 match 100.0
|
||||
[src/scene/address/iplAddress] section .sbss size 8 match 100.0
|
||||
[src/scene/address/iplAddress] section .sdata size 16 match 100.0
|
||||
[src/scene/address/iplAddress] section .sdata2 size 32 match 100.0
|
||||
[src/scene/address/iplAddress] section .text size 23988 match 100.0
|
||||
[src/scene/address/iplAddress] baseline: code 22908/23988 data 1964 functions 100 fuzzy 99.9291
|
||||
[src/scene/address/iplAddressEdit] pool: IDENTICAL
|
||||
[src/scene/address/iplAddressEdit] objdiff: code 23344/27112 data 2560/2560 functions 91/94 fuzzy 99.5528 linked code 0
|
||||
[src/scene/address/iplAddressEdit] instruction-exact functions: 91/94
|
||||
[src/scene/address/iplAddressEdit] section .bss size 320 match 100.0
|
||||
[src/scene/address/iplAddressEdit] section .data size 2152 match 100.0
|
||||
[src/scene/address/iplAddressEdit] section .rodata size 40 match 100.0
|
||||
[src/scene/address/iplAddressEdit] section .sdata size 24 match 100.0
|
||||
[src/scene/address/iplAddressEdit] section .sdata2 size 24 match 100.0
|
||||
[src/scene/address/iplAddressEdit] section .text size 27112 match 99.55282
|
||||
[src/scene/address/iplAddressEdit] below 100: create__Q33ipl5scene11AddressEditFv 97.5561
|
||||
[src/scene/address/iplAddressEdit] below 100: get_friendinfo__Q33ipl5scene11AddressEditFv 88.03571
|
||||
[src/scene/address/iplAddressEdit] below 100: update_friendinfo__Q33ipl5scene11AddressEditFv 99.42105
|
||||
[src/scene/address/iplAddressEdit] baseline: code 23344/27112 data 2560 functions 91 fuzzy 99.5528
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 92.65446 -> 92.69051
|
||||
global fuzzy_match_percent: 99.77653 -> 99.77708
|
||||
global complete_code_percent: 76.20227 -> 76.20227
|
||||
global matched_data_percent: 99.99410 -> 99.99410
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
GATE PASS
|
||||
```
|
||||
|
||||
Fresh progress and report generation completed after the gate. Address is instruction-exact and all owned sections are 100%; configure.py is unchanged, so linking remains for the parent.
|
||||
- create-text-view-conditional: Select the two real String text views through a small constant-argument inline accessor. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-text-view-conditional/`.
|
||||
- get-text-view-conditional: Select the two real String text views through a small constant-argument inline accessor. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-text-view-conditional/`.
|
||||
- create-text-view-branches: Select the two real String text views through a small constant-argument inline accessor. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-text-view-branches/`.
|
||||
- get-text-view-branches: Select the two real String text views through a small constant-argument inline accessor. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-text-view-branches/`.
|
||||
- create-text-view-selected-local: Select the two real String text views through a small constant-argument inline accessor. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-text-view-selected-local/`.
|
||||
- get-text-view-selected-local: Select the two real String text views through a small constant-argument inline accessor. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-text-view-selected-local/`.
|
||||
- create-text-view-switch: Select the two real String text views through a small constant-argument inline accessor. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-text-view-switch/`.
|
||||
- get-text-view-switch: Select the two real String text views through a small constant-argument inline accessor. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-text-view-switch/`.
|
||||
|
||||
## Updated lever pack and compiler diagnostics
|
||||
|
||||
Read the new Ghidra exports for every owned function. Event control flow agrees with the retained exact source. get_friendinfo and update_friendinfo have the same calls and branch structure as the current source. The create export truncates at its prologue with bad instruction data, so target assembly remains the authority. New lever 18 permits optimization pragmas for diagnosis only; all experiments stay in private temporary sources and no pragma is retained.
|
||||
|
||||
- get-r9-diagnostic-opt_propagation: Private diagnostic only: determine whether opt_propagation controls the surviving copy or address scheduling difference. {"score": 91.84524, "insns": [82, 84], "diffs": 62, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r9-diagnostic-opt_propagation/`.
|
||||
- get-r9-diagnostic-opt_common_subs: Private diagnostic only: determine whether opt_common_subs controls the surviving copy or address scheduling difference. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r9-diagnostic-opt_common_subs/`.
|
||||
- get-r9-diagnostic-scheduling: Private diagnostic only: determine whether scheduling controls the surviving copy or address scheduling difference. {"score": 72.54762, "insns": [82, 84], "diffs": 69, "drops": {"get_friendinfo__Q33ipl5scene11AddressEditFv": [88.03571, 72.54762]}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r9-diagnostic-scheduling/`.
|
||||
- get-r9-diagnostic-opt_dead_assignments: Private diagnostic only: determine whether opt_dead_assignments controls the surviving copy or address scheduling difference. {"score": 91.84524, "insns": [82, 84], "diffs": 62, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r9-diagnostic-opt_dead_assignments/`.
|
||||
- update-r9-diagnostic-opt_propagation: Private diagnostic only: determine whether opt_propagation controls the surviving copy or address scheduling difference. {"score": 99.42105, "insns": [38, 38], "diffs": 2, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/update-r9-diagnostic-opt_propagation/`.
|
||||
- update-r9-diagnostic-opt_common_subs: Private diagnostic only: determine whether opt_common_subs controls the surviving copy or address scheduling difference. {"score": 99.42105, "insns": [38, 38], "diffs": 2, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/update-r9-diagnostic-opt_common_subs/`.
|
||||
- update-r9-diagnostic-scheduling: Private diagnostic only: determine whether scheduling controls the surviving copy or address scheduling difference. {"score": 62.63158, "insns": [38, 38], "diffs": 17, "drops": {"update_friendinfo__Q33ipl5scene11AddressEditFv": [99.42105, 62.63158]}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/update-r9-diagnostic-scheduling/`.
|
||||
- update-r9-diagnostic-opt_dead_assignments: Private diagnostic only: determine whether opt_dead_assignments controls the surviving copy or address scheduling difference. {"score": 99.42105, "insns": [38, 38], "diffs": 2, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/update-r9-diagnostic-opt_dead_assignments/`.
|
||||
- create-r10-cstyle-casts: Test the new allocator hypothesis that C-style and C++ casts give different temporary numbering. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r10-cstyle-casts/`.
|
||||
- get-r10-cstyle-casts: Test the new allocator hypothesis that C-style and C++ casts give different temporary numbering. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r10-cstyle-casts/`.
|
||||
- update-r10-cstyle-casts: Test the new allocator hypothesis that C-style and C++ casts give different temporary numbering. {"score": 99.42105, "insns": [38, 38], "diffs": 2, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/update-r10-cstyle-casts/`.
|
||||
- update-r10-const-count: Keep the real bounded name-copy operation and vary inline parameter const qualification per the new allocator hypothesis. {"score": 99.42105, "insns": [38, 38], "diffs": 2, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/update-r10-const-count/`.
|
||||
- update-r10-plain-count: Keep the real bounded name-copy operation and vary inline parameter const qualification per the new allocator hypothesis. {"score": 99.42105, "insns": [38, 38], "diffs": 2, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/update-r10-plain-count/`.
|
||||
- update-r10-const-pointer-count: Keep the real bounded name-copy operation and vary inline parameter const qualification per the new allocator hypothesis. {"score": 99.42105, "insns": [38, 38], "diffs": 2, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/update-r10-const-pointer-count/`.
|
||||
|
||||
The eight private diagnostics identify no exact optimization-mode result. Disabling propagation/dead assignments leaves get_friendinfo at 82/84 instructions; disabling scheduling worsens both functions. No diagnostics are retained. C-style cast spellings in all three open functions and primitive/pointer const qualifications in the bounded-name helper also preserve the original scores. These are evidence only, not production changes.
|
||||
- get-r11-root-pointer: Inline only the virtual lookup and text application while evaluating the actual root outside the boundary; test statement count and parameter lifetime. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r11-root-pointer/`.
|
||||
- update-r12-copy-member: Use an actual String member operation instead of a free getter/copy helper; keep the bounded copy and optional clear unchanged. {"score": 99.42105, "insns": [38, 38], "diffs": 2, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/update-r12-copy-member/`.
|
||||
- update-r12-copy-member-count: Use an actual String member operation instead of a free getter/copy helper; keep the bounded copy and optional clear unchanged. {"score": 99.42105, "insns": [38, 38], "diffs": 2, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/update-r12-copy-member-count/`.
|
||||
- update-r12-copy-member-const-count: Use an actual String member operation instead of a free getter/copy helper; keep the bounded copy and optional clear unchanged. {"score": 99.42105, "insns": [38, 38], "diffs": 2, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/update-r12-copy-member-const-count/`.
|
||||
- update-r12-store-member: Use an actual String member operation instead of a free getter/copy helper; keep the bounded copy and optional clear unchanged. {"score": 99.42105, "insns": [38, 38], "diffs": 2, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/update-r12-store-member/`.
|
||||
- create-r11-root-pointer: Inline only the virtual lookup and text application while evaluating the actual root outside the boundary; test statement count and parameter lifetime. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r11-root-pointer/`.
|
||||
- get-r11-root-reference: Inline only the virtual lookup and text application while evaluating the actual root outside the boundary; test statement count and parameter lifetime. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r11-root-reference/`.
|
||||
- create-r11-root-reference: Inline only the virtual lookup and text application while evaluating the actual root outside the boundary; test statement count and parameter lifetime. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r11-root-reference/`.
|
||||
- get-r11-recursive-const: Inline only the virtual lookup and text application while evaluating the actual root outside the boundary; test statement count and parameter lifetime. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r11-recursive-const/`.
|
||||
- create-r11-recursive-const: Inline only the virtual lookup and text application while evaluating the actual root outside the boundary; test statement count and parameter lifetime. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r11-recursive-const/`.
|
||||
- get-r11-recursive-plain: Inline only the virtual lookup and text application while evaluating the actual root outside the boundary; test statement count and parameter lifetime. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r11-recursive-plain/`.
|
||||
- create-r11-recursive-plain: Inline only the virtual lookup and text application while evaluating the actual root outside the boundary; test statement count and parameter lifetime. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r11-recursive-plain/`.
|
||||
- get-r11-root-local: Inline only the virtual lookup and text application while evaluating the actual root outside the boundary; test statement count and parameter lifetime. {"score": 88.03571, "insns": [82, 84], "diffs": 66, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/get-r11-root-local/`.
|
||||
- create-r11-root-local: Inline only the virtual lookup and text application while evaluating the actual root outside the boundary; test statement count and parameter lifetime. {"score": 97.5561, "insns": [818, 820], "diffs": 329, "drops": {}, "pool": "POOL IDENTICAL up to 57 (mine=57 base=57)"}. Evidence `/tmp/f5b-work/create-r11-root-local/`.
|
||||
|
||||
Five further root-pane boundaries, each tested in create and get_friendinfo, preserve the original output. Four String::copyNameTo member forms (fixed bound, bound parameter, const bound parameter, combined clear/copy) preserve update_friendinfo at 99.42105%, 38/38 and two differences. The guarded declarations exist only in the private temporary headers; none is retained.
|
||||
|
||||
Manual archive after the updated lever checks: event: 8 successful measurements and 2 rejected compiles, create: 40 successful measurements and 2 rejected compiles, get: 51 successful measurements and 0 rejected compiles, update: 20 successful measurements and 2 rejected compiles. Counts include baselines and eight diagnostic-only measurements. The six compile errors are the previously logged private-type/include-path experiments. Private test-runner selector and quoting mistakes were corrected before compilation and added no source experiment.
|
||||
|
||||
## Declaration-parser repair for update searches
|
||||
|
||||
Seed 5002 exited after 14 trials with no improvement: every mutable integer declaration had become `unsigned int`, which the shared tool can generate but its single-word declaration parser cannot read back. With the remaining pointer declarations separated, there were no further recognized mutations. This is not an exhausted 1200-second search. The private copy now recognizes that generated type; a direct check finds 11 valid declaration mutations in the formerly absorbing state. The global 24-slot limiter and all mutation dependency/safety guards are unchanged.
|
||||
|
||||
Three replacement update seeds (52, 502, 5002) were queued with fresh 1200-second budgets in /tmp/f5b-work/update-decl-search-<seed>. Original logs remain intact and their outcomes will be counted separately. No shared tool or other worktree was edited.
|
||||
|
||||
Initial update searches ended without any best/solution output: seed 52: 315 trials, seed 502: 315 trials, seed 5002: 14 trials. Seeds 52 and 502 ran through their budgets; seed 5002 stopped at the diagnosed parser state. The three fixed-parser runs remain active to explore the declared integer spellings.
|
||||
|
||||
The fourth get_friendinfo search completed 312 trials over its full budget. Its best objective stayed at 92.67857%, 83/84 instructions, with no best.c or solution.c output. The earlier three get searches also had no improvement. The retained function therefore remains at the original 88.03571%, 82/84; the private fuzzy seed is not retained.
|
||||
|
||||
All three update searches with the declaration-parser repair completed without an improved candidate. update-decl-search-52: 289 trials in 1209.851 seconds; update-decl-search-502: 269 trials in 1200.658 seconds; update-decl-search-5002: 267 trials in 1202.936 seconds. None produced best.c or solution.c. Each used a normal shared search slot and its full 1200-second budget.
|
||||
|
||||
## Final handoff
|
||||
|
||||
- create-search-50: 290 trials, final objective -93.9512, best source True, solution source False, highest logged improvement 97.95122.
|
||||
- create-search-500: 292 trials, final objective -93.9512, best source True, solution source False, highest logged improvement 97.95122.
|
||||
- create-search-5000: 289 trials, final objective -93.939, best source True, solution source False, highest logged improvement 97.939026.
|
||||
- get-search-51: 237 trials, final objective -84.0357, best source False, solution source False, highest logged improvement None.
|
||||
- get-search-501: 238 trials, final objective -84.0357, best source False, solution source False, highest logged improvement None.
|
||||
- get-search-5001: 236 trials, final objective -84.0357, best source False, solution source False, highest logged improvement None.
|
||||
- update-search-52: 315 trials, final objective -99.421, best source False, solution source False, highest logged improvement None.
|
||||
- update-search-502: 315 trials, final objective -99.421, best source False, solution source False, highest logged improvement None.
|
||||
- update-search-5002: 14 trials, final objective -99.421, best source False, solution source False, highest logged improvement None.
|
||||
- get-search-50001: 312 trials, final objective -90.6786, best source False, solution source False, highest logged improvement None.
|
||||
- update-decl-search-52: 289 trials, final objective -99.421, best source False, solution source False, highest logged improvement None.
|
||||
- update-decl-search-502: 269 trials, final objective -99.421, best source False, solution source False, highest logged improvement None.
|
||||
- update-decl-search-5002: 267 trials, final objective -99.421, best source False, solution source False, highest logged improvement None.
|
||||
|
||||
All 13 recorded search runs have ended, 3363 source-search trials total. The seven create/get searches used their full 1200-second budgets; the three declaration-repair update searches also completed their full budgets after slot acquisition. The initial update searches are counted separately because the parser could become stuck after generating unsigned int declarations. Every generated candidate remains below 100.0%; no search source was retained.
|
||||
|
||||
Address::onEventDerived is exact at 100.0%, 270/270 instructions with zero differences. Address now has 101/101 instruction-exact functions, 23988/23988 matched code bytes and 1964/1964 matched data bytes. The source commit is 944e82d9. All allocated data bytes and other function outputs are unchanged. The unit remains NonMatching under the current matching-only worker contract; the parent owns linking.
|
||||
|
||||
AddressEdit::create stays 97.5561%, 818/820 instructions. It rematerializes the two text-buffer addresses at their call sites instead of retaining them across virtual pane lookups, and retains register and constructor argument-scheduling differences. Typed scene/file/heap getters, named-pane setters, margin types/lifetimes, constructor factories, API index forms and three full source searches did not produce an exact result.
|
||||
|
||||
AddressEdit::get_friendinfo stays 88.03571%, 82/84 instructions. Target retains the two text-buffer addresses across virtual pane calls. Array/pointer/reference accessors, argument-order helpers, formatting-return helpers, early declarations and local aggregate views failed to reproduce it. The strongest readable private candidate reached 92.67857%, 83/84, by preserving the display address too early; another reached 84/84 with duplicated branch-local address formation. Neither is exact or retained. Four full search runs exhausted those starting states.
|
||||
|
||||
AddressEdit::update_friendinfo stays 99.42105%, 38/38 instructions. The remaining difference is still the order of wcsncpy source r4 and destination r3 setup. Six new scene/cache/index/commit helper experiments, the checked named-local seed and three new full searches with the declaration-parser repair did not change it. Earlier f5 trials and completed searches were reused before this round. Additional cast, parameter-const, String member-copy, root-pane boundary and diagnostic-only tests from the updated lever pack found no exact result; their measurements are logged above.
|
||||
|
||||
The clean full gate recorded above validates the final source: GATE PASS, correct DOL SHA1, identical pools, zero regressions, zero added forbidden patterns and zero readability warnings. Only this evidence log changed after that gate. No source or header changes from the AddressEdit trials were retained.
|
||||
|
||||
## Gate after capacity-error recovery
|
||||
|
||||
The resumed branch is still agent/w1005/f5b at 944e82d9, with only this evidence log uncommitted. All 13 searches completed before the interruption. The current origin/main b7a912ce02ba00ac94d29a738c03473cd93490f1 has no changes to the four owned source/header paths since base 491bba6a. No branch movement or source change was needed.
|
||||
|
||||
At the user's request, repeated the clean full gate with both owned units and --base 491bba6a. The fresh gate passes, so the source match and this evidence log are retained.
|
||||
|
||||
```text
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[src/scene/address/iplAddress] pool: IDENTICAL
|
||||
[src/scene/address/iplAddress] objdiff: code 23988/23988 data 1964/1964 functions 101/101 fuzzy 100.0000 linked code 0
|
||||
[src/scene/address/iplAddress] instruction-exact functions: 101/101
|
||||
[src/scene/address/iplAddress] section .ctors size 4 match 100.0
|
||||
[src/scene/address/iplAddress] section .data size 1880 match 100.0
|
||||
[src/scene/address/iplAddress] section .rodata size 24 match 100.0
|
||||
[src/scene/address/iplAddress] section .sbss size 8 match 100.0
|
||||
[src/scene/address/iplAddress] section .sdata size 16 match 100.0
|
||||
[src/scene/address/iplAddress] section .sdata2 size 32 match 100.0
|
||||
[src/scene/address/iplAddress] section .text size 23988 match 100.0
|
||||
[src/scene/address/iplAddress] baseline: code 22908/23988 data 1964 functions 100 fuzzy 99.9291
|
||||
[src/scene/address/iplAddressEdit] pool: IDENTICAL
|
||||
[src/scene/address/iplAddressEdit] objdiff: code 23344/27112 data 2560/2560 functions 91/94 fuzzy 99.5528 linked code 0
|
||||
[src/scene/address/iplAddressEdit] instruction-exact functions: 91/94
|
||||
[src/scene/address/iplAddressEdit] section .bss size 320 match 100.0
|
||||
[src/scene/address/iplAddressEdit] section .data size 2152 match 100.0
|
||||
[src/scene/address/iplAddressEdit] section .rodata size 40 match 100.0
|
||||
[src/scene/address/iplAddressEdit] section .sdata size 24 match 100.0
|
||||
[src/scene/address/iplAddressEdit] section .sdata2 size 24 match 100.0
|
||||
[src/scene/address/iplAddressEdit] section .text size 27112 match 99.55282
|
||||
[src/scene/address/iplAddressEdit] below 100: create__Q33ipl5scene11AddressEditFv 97.5561
|
||||
[src/scene/address/iplAddressEdit] below 100: get_friendinfo__Q33ipl5scene11AddressEditFv 88.03571
|
||||
[src/scene/address/iplAddressEdit] below 100: update_friendinfo__Q33ipl5scene11AddressEditFv 99.42105
|
||||
[src/scene/address/iplAddressEdit] baseline: code 23344/27112 data 2560 functions 91 fuzzy 99.5528
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 92.65446 -> 92.69051
|
||||
global fuzzy_match_percent: 99.77653 -> 99.77708
|
||||
global complete_code_percent: 76.20227 -> 76.20227
|
||||
global matched_data_percent: 99.99410 -> 99.99410
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
GATE PASS
|
||||
```
|
||||
|
||||
Fresh progress/report generation after the recovery gate confirms the four target scores: 100.0, 97.5561, 88.03571 and 99.42105. DOL SHA1 is unchanged. Every open function has more than three distinct compiled source-level attempts; the archive contains 119 successful manual measurements and 3363 source-search trials across 13 completed runs. Final git diff --check passes. Only the evidence log changed after this gate.
|
||||
105
tools/decomp-assist/lnkaddr.attempts.md
Normal file
105
tools/decomp-assist/lnkaddr.attempts.md
Normal file
@@ -0,0 +1,105 @@
|
||||
# lnkaddr: link iplAddress
|
||||
|
||||
Worktree data-d5, branch agent/w1005/lnkaddr, base b276099f.
|
||||
The assigned LINK task overrides common.md's matching-only phase.
|
||||
Acceptance requires 101/101 exact functions, unchanged code/data credit and
|
||||
other source objects, Matching enabled, and the full gate with DOL SHA1
|
||||
26116613f624061ba99c8d1a299aaa6efa85670d.
|
||||
|
||||
## Baseline
|
||||
|
||||
Fetched origin/main under the shared Git lock. The remote advanced to ca031bd8;
|
||||
its changes affect iplMemoryCardLib.h and lv19 logs, not this leaf. Address
|
||||
remains NonMatching. Kept the assigned branch without merging or rebasing.
|
||||
Fresh 43U build and report: 101/101 exact-name functions, code 23988/23988,
|
||||
data 1964/1964, linked code 0. Pool strings identical, 81/81. Saved report and
|
||||
all source object SHA256 hashes under build/lnkaddr-baseline-*.
|
||||
|
||||
The target object emits draw, VEC2::operator*(f32), Pane::SetTranslate(VEC3),
|
||||
destroy. Target offsets are 0xc7c, 0x1028, 0x1070, 0x108c respectively.
|
||||
Our object emits draw, SetTranslate(VEC2), SetTranslate(VEC3), VEC2::operator*,
|
||||
VEC2 constructor, destroy. After linker deduplication this reverses the two
|
||||
retained inline functions. The target draw calls SetTranslate(VEC2), while
|
||||
add_translate calls SetTranslate(VEC3); function code already matches.
|
||||
|
||||
## Trial 1: reproduce the link failure
|
||||
|
||||
Change only the configure.py entry to Matching and map the rebuilt DOL.
|
||||
|
||||
Result: 103 differing bytes, unchanged DOL size. Differences cover the two
|
||||
reversed functions and calls in BoardObject, ChannelObj, SDChannelObj,
|
||||
SDMemory, and Address. Both functions still have ctxdiff diffs 0.
|
||||
|
||||
## Trial 2: delay the VEC3 setter definition
|
||||
|
||||
Use the existing IPL_ADDRESS_MATCHING macro to declare SetTranslate(VEC3)
|
||||
in the header and define it inline immediately after Address::draw.
|
||||
Keep its body unchanged. This allows draw's VEC2 multiplication to emit first,
|
||||
then the setter at its original position before Address::destroy. The inline
|
||||
definition should preserve weak binding. No math operator or caller edit.
|
||||
The exported target decompilation confirms ordinary mTranslate assignment.
|
||||
|
||||
The rebuilt object retains STB_WEAK binding. Its order is SetTranslate(VEC2)
|
||||
at 0x1108, VEC2::operator* at 0x1144, the deduplicated VEC2 constructor at
|
||||
0x118c, SetTranslate(VEC3) at 0x1198, and destroy at 0x11b4. Filtering source
|
||||
functions to the 101 target names now reproduces the complete target order.
|
||||
Pool 81/81 remains identical; SetTranslate(VEC3) is 7/7 instructions, diffs 0.
|
||||
IPL_ADDRESS_MATCHING is defined only by iplAddress.cpp.
|
||||
|
||||
Result: full incremental build passes with Matching enabled. DOL SHA1 is
|
||||
26116613f624061ba99c8d1a299aaa6efa85670d; doldiff reports zero differing bytes
|
||||
and equal 3867904-byte files. All 101 exact-name objdiff functions remain 100%,
|
||||
and all 101 ctxdiff runs have equal instruction counts and diffs 0.
|
||||
Code 23988/23988 and data 1964/1964 are now fully linked.
|
||||
Proceed to the required clean full gate and all-object isolation check.
|
||||
|
||||
## Final verification
|
||||
|
||||
The required full gate ran without --quick and passed from a clean 43U build.
|
||||
All 101 functions remain exact. Code 23988/23988 and data 1964/1964 are 100%
|
||||
matched and linked. The final pool is identical at 81/81 strings, and doldiff
|
||||
reports zero differing bytes with the required DOL SHA1.
|
||||
|
||||
Compared SHA256 hashes of all 1027 rebuilt source objects against the fresh
|
||||
baseline. Only src/scene/address/iplAddress.o changed; all 1026 other objects
|
||||
are byte-identical. Comparing complete unit entries in the two live reports
|
||||
also finds only main/src/scene/address/iplAddress changed. No units or objects
|
||||
were added or removed. There are no remaining open functions in this leaf.
|
||||
|
||||
Source changes are confined to the Matching entry, the existing Address-only
|
||||
header guard, and the unchanged setter body at its target emission position.
|
||||
All target function names occur in target order. No new assembly, labels,
|
||||
padding, linker directives, compiler options, or symbol metadata were added.
|
||||
|
||||
Full gate output:
|
||||
|
||||
```text
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[src/scene/address/iplAddress] pool: IDENTICAL
|
||||
[src/scene/address/iplAddress] objdiff: code 23988/23988 data 1964/1964 functions 101/101 fuzzy 100.0000 linked code 23988
|
||||
[src/scene/address/iplAddress] instruction-exact functions: 101/101
|
||||
[src/scene/address/iplAddress] section .ctors size 4 match 100.0
|
||||
[src/scene/address/iplAddress] section .data size 1880 match 100.0
|
||||
[src/scene/address/iplAddress] section .rodata size 24 match 100.0
|
||||
[src/scene/address/iplAddress] section .sbss size 8 match 100.0
|
||||
[src/scene/address/iplAddress] section .sdata size 16 match 100.0
|
||||
[src/scene/address/iplAddress] section .sdata2 size 32 match 100.0
|
||||
[src/scene/address/iplAddress] section .text size 23988 match 100.0
|
||||
[src/scene/address/iplAddress] baseline: code 23988/23988 data 1964 functions 101 fuzzy 100.0000
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 92.77331 -> 92.77331
|
||||
global fuzzy_match_percent: 99.78063 -> 99.78063
|
||||
global complete_code_percent: 76.40339 -> 77.20428
|
||||
global matched_data_percent: 99.99410 -> 99.99410
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
note: config touched: configure.py (orchestrator reviews every config/symbols change)
|
||||
GATE PASS
|
||||
```
|
||||
|
||||
Local evidence: build/lnkaddr-baseline-report.json,
|
||||
build/lnkaddr-baseline-object-hashes.json, build/lnkaddr-trial1-doldiff.txt,
|
||||
build/lnkaddr-function-order.txt, build/lnkaddr-ctxdiff.txt,
|
||||
build/lnkaddr-full-gate.txt, and build/lnkaddr-isolation.json.
|
||||
Ready for independent parent validation.
|
||||
182
tools/decomp-assist/lv19.attempts.md
Normal file
182
tools/decomp-assist/lv19.attempts.md
Normal file
@@ -0,0 +1,182 @@
|
||||
# lv19 definition-level volatile sweep
|
||||
|
||||
Assigned tree: `/mnt/drive2/projects/wii-ipl-workers/data-d4`.
|
||||
Branch: `agent/w1005/lv19`. Starting HEAD: `60341ca4`.
|
||||
|
||||
Scope: enumerate all non-exact 43U functions with pure instruction-order or
|
||||
epilogue-order differences, plus the named near-order candidates. Inspect the
|
||||
adjacent accesses for thread, callback, interrupt, or hardware sharing. Test
|
||||
qualifiers at the real field/global definitions only. No TU-conditional types.
|
||||
Retain each change only after improvement, zero drops across every including
|
||||
unit, full gate, and DOL SHA1 `26116613f624061ba99c8d1a299aaa6efa85670d`.
|
||||
|
||||
Read AGENTS.md, common.md, levers.md including lever 19, unslop, and
|
||||
writing-for-agents. Locked fetch of origin succeeded. Initial tree was clean.
|
||||
Historical SDChannelSelect `mpBS2Manager` volatility regressed twelve exact
|
||||
functions and changed the DOL; do not repeat or hide it behind a TU guard.
|
||||
The supplied lever-19 scope controls this run; unrelated declaration or
|
||||
register searches are outside it.
|
||||
|
||||
Baseline and trial artifacts are under `build/lv19/`. Final full gate output
|
||||
and durable candidate inventory will be recorded here before handoff.
|
||||
|
||||
## Fresh baseline inventory
|
||||
|
||||
Built all 43U objects, report and build/43U/ok. DOL SHA1 `26116613f624061ba99c8d1a299aaa6efa85670d`. Scanned 1027 units and 133 non-exact report functions using the same odiff decoder as ctxdiff.py.
|
||||
|
||||
| Unit | Function | Score | Instructions | Diffs | Unpaired instructions | Class |
|
||||
| --- | --- | ---: | --- | ---: | ---: | --- |
|
||||
| src/BS2/BS2Mach | CheckBS2CommandStatus | 99.50739 | 406/406 | 2 | 0 | pure order |
|
||||
| src/BS2/BS2Update | UpdateThread | 94.83023 | 911/913 | 335 | 189 | named candidate |
|
||||
| src/scene/address/iplAddressEdit | update_friendinfo__Q33ipl5scene11AddressEditFv | 99.42105 | 38/38 | 2 | 0 | pure order |
|
||||
| src/scene/memoryCard/iplMemoryCardManager | isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs | 92.30769 | 26/26 | 8 | 0 | pure order |
|
||||
| src/scene/memoryCard/iplMemoryCardManager | getBlocks__Q33ipl5scene17MemoryCardManagerFUcs | 92.0 | 25/25 | 9 | 0 | pure order |
|
||||
| src/scene/sdChannelSelect/iplSDChannelSelect | collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl | 97.81188 | 101/101 | 4 | 2 | named candidate |
|
||||
| src/scene/sdChannelSelect/iplSDChannelSelect | collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl | 97.833336 | 102/102 | 4 | 2 | named candidate |
|
||||
| src/scene/sdChannelSelect/iplSDChannelSelect | collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl | 98.007935 | 126/126 | 7 | 5 | named candidate |
|
||||
| src/scene/sdChannelSelect/iplSDChannelSelect | collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl | 97.55125 | 361/361 | 16 | 8 | named candidate |
|
||||
| src/scene/sdChannelSelect/iplSDChannelSelect | flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv | 99.65714 | 35/35 | 2 | 0 | pure order |
|
||||
| src/scene/setting/iplSetting | scanAP__Q33ipl5scene7SettingFv | 99.20221 | 272/272 | 4 | 1 | named candidate |
|
||||
| src/scene/setting/AOSSLink | AOSSi_WLANConnect | 98.70968 | 155/155 | 2 | 0 | pure order |
|
||||
| src/scene/setting/ATERM | ATERMBuildEncryptedMessage | 99.791664 | 96/96 | 2 | 0 | pure order |
|
||||
| src/channelScript/CHANSVm | CHANSVmConvertToFloatFromStr | 97.59036 | 83/83 | 2 | 0 | pure order |
|
||||
| src/channelScript/CHANSVm | VmDateDtor | 94.96703 | 91/91 | 7 | 0 | pure order |
|
||||
| libs/RevoEX/src/nhttp/NHTTP_recvbuf | NHTTPi_compareTokenN_HdrRecvBuf | 97.32258 | 124/124 | 5 | 0 | pure order |
|
||||
| libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL | NHTTPi_strnicmp | 99.76471 | 51/51 | 2 | 0 | pure order |
|
||||
| libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL | NHTTPi_compareToken | 99.73333 | 45/45 | 2 | 0 | pure order |
|
||||
| libs/RevoEX/src/so/SOBasic | SOGetSockName | 96.666664 | 63/63 | 3 | 0 | pure order |
|
||||
| libs/RVL_SDK/src/fa/driver/sd_drv | pfd_sddrv_finalize | 92.63158 | 57/57 | 4 | 2 | epilogue |
|
||||
| libs/RVL_SDK/src/kbd/kbd_lib | kbdProcMod | 99.90234 | 256/256 | 4 | 4 | epilogue |
|
||||
| libs/RVL_SDK/src/kbd/kbd_lib | kbd_led_handler | 99.72 | 25/25 | 3 | 1 | epilogue |
|
||||
| libs/RVL_SDK/src/kbd/kbd_lib | KBDSetModState | 99.40476 | 42/42 | 4 | 4 | epilogue |
|
||||
|
||||
Full inventory including non-candidates: `build/lv19/inventory.json`. Branch/call operands use ctxdiff relative offsets; relocation identity requires the normal pool/objdiff checks.
|
||||
|
||||
## Card thread fields
|
||||
|
||||
`FileInfo::size` is written by `clearCardFileEntry` and `updateCardFileEntry`; `IconState::bannerEnable` is written by `loadCardFileIcons`, called from the card thread. The UI getters read those same `sThread->files/icons` arrays. Target final lhz/lbz precedes r11 restoration setup; source hoists r11 before the address/load sequence. Both are eligible definition-level trials. Ninja dependencies identify six including units: src/scene/cardSequence/iplCardSequence, src/scene/memoryCard/iplGCSaveData, src/scene/memoryCard/iplGCWindow, src/scene/memoryCard/iplMemoryCard, src/scene/memoryCard/iplMemoryCardManager, src/scene/sceneSystem/iplSceneCreator. Baseline pools all identical.
|
||||
|
||||
Trial `card_banner_volatile`: {"label": "card_banner_volatile", "edits": [["include/iplMemoryCardLib.h", "u8 bannerEnable;", "volatile u8 bannerEnable;"]], "units": ["src/scene/cardSequence/iplCardSequence", "src/scene/memoryCard/iplGCSaveData", "src/scene/memoryCard/iplGCWindow", "src/scene/memoryCard/iplMemoryCard", "src/scene/memoryCard/iplMemoryCardManager", "src/scene/sceneSystem/iplSceneCreator"], "build": 0, "pool": {"src/scene/cardSequence/iplCardSequence": 0, "src/scene/memoryCard/iplGCSaveData": 0, "src/scene/memoryCard/iplGCWindow": 0, "src/scene/memoryCard/iplMemoryCard": 0, "src/scene/memoryCard/iplMemoryCardManager": 0, "src/scene/sceneSystem/iplSceneCreator": 0}, "changed_functions": [["main/src/scene/memoryCard/iplMemoryCardManager", "isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 92.30769, 100.0], ["main/src/scene/cardSequence/iplCardSequence", "loadCardFileIcons", 90.7832, 91.33984]], "drops": [], "candidates": [["isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 26, 26, 0], ["getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 25, 25, 9]]}. Restored source after measurement. Artifacts `build/lv19/card_banner_volatile/`.
|
||||
|
||||
Trial `card_size_volatile`: {"label": "card_size_volatile", "edits": [["include/iplMemoryCardLib.h", "u16 size;", "volatile u16 size;"]], "units": ["src/scene/cardSequence/iplCardSequence", "src/scene/memoryCard/iplGCSaveData", "src/scene/memoryCard/iplGCWindow", "src/scene/memoryCard/iplMemoryCard", "src/scene/memoryCard/iplMemoryCardManager", "src/scene/sceneSystem/iplSceneCreator"], "build": 0, "pool": {"src/scene/cardSequence/iplCardSequence": 0, "src/scene/memoryCard/iplGCSaveData": 0, "src/scene/memoryCard/iplGCWindow": 0, "src/scene/memoryCard/iplMemoryCard": 0, "src/scene/memoryCard/iplMemoryCardManager": 0, "src/scene/sceneSystem/iplSceneCreator": 0}, "changed_functions": [["main/src/scene/memoryCard/iplMemoryCardManager", "getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 92.0, 100.0]], "drops": [], "candidates": [["isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 26, 26, 8], ["getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 25, 25, 0]]}. Restored source after measurement. Artifacts `build/lv19/card_size_volatile/`.
|
||||
|
||||
Trial `card_banner_size_volatile`: {"label": "card_banner_size_volatile", "edits": [["include/iplMemoryCardLib.h", "u8 bannerEnable;", "volatile u8 bannerEnable;"], ["include/iplMemoryCardLib.h", "u16 size;", "volatile u16 size;"]], "units": ["src/scene/cardSequence/iplCardSequence", "src/scene/memoryCard/iplGCSaveData", "src/scene/memoryCard/iplGCWindow", "src/scene/memoryCard/iplMemoryCard", "src/scene/memoryCard/iplMemoryCardManager", "src/scene/sceneSystem/iplSceneCreator"], "build": 0, "pool": {"src/scene/cardSequence/iplCardSequence": 0, "src/scene/memoryCard/iplGCSaveData": 0, "src/scene/memoryCard/iplGCWindow": 0, "src/scene/memoryCard/iplMemoryCard": 0, "src/scene/memoryCard/iplMemoryCardManager": 0, "src/scene/sceneSystem/iplSceneCreator": 0}, "changed_functions": [["main/src/scene/memoryCard/iplMemoryCardManager", "isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 92.30769, 100.0], ["main/src/scene/memoryCard/iplMemoryCardManager", "getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 92.0, 100.0], ["main/src/scene/cardSequence/iplCardSequence", "loadCardFileIcons", 90.7832, 91.33984]], "drops": [], "candidates": [["isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 26, 26, 0], ["getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 25, 25, 0]]}. Restored source after measurement. Artifacts `build/lv19/card_banner_size_volatile/`.
|
||||
|
||||
## Scope audit for the remaining inventory
|
||||
|
||||
- `CheckBS2CommandStatus`: the differing `stw` relocates to `CacheCommandComplete`. All its reads and writes are inside this function. `BS2NANDCallback` changes `NandPending`, already volatile, rather than `CacheCommandComplete`. The adjacent partition count is disc table data read after DVD completion. No new shared completion declaration has been established here.
|
||||
- `update_friendinfo`: both differences are `addi` arguments for `wcsncpy`, pointing to the friend name and this scene's editable name. They are not scalar shared-state accesses. No qualifier trial is justified.
|
||||
- Four `collectTitles*` functions: the repeated difference is `++*titleCount`, local accumulated blocks, and `secondUsage[0]`. The source exposes these through caller parameters, with no proven shared field/global definition at the accesses. Changing the pointer parameter type or a use-site cast would not be lever 19. `collectTitlesByChannelOrder` also has three address/register differences.
|
||||
- `flushSaveDataAndMountSD`: swapped loads are `System::Arg::mpSaveDataManager` and `mpMem2App`, stable manager/heap pointers. Asynchronous work starts after the call arguments are loaded. There is no callback-written completion flag at these accesses.
|
||||
- `scanAP`: case 9 loads `mpMainLayout` and `unk_0x918`, the animation index set by scene transitions. Its AP worker writes `mAPScanList`, not either reordered field. The latter is not evidence for qualifying the former.
|
||||
- `AOSSi_WLANConnect`: only the IP-config `memset` destination/size argument order differs. The separate `AOSSi_cancel_flag` is genuinely shared with `iplAOSSThread`, so a global-definition trial with the matching extern in AOSS.c will test whether it affects this function. The mutable config itself is handed to synchronous NCD calls and contains no demonstrated completion field.
|
||||
- `ATERMBuildEncryptedMessage`: only the key-parameter save and `memset` destination move exchange places before the first call. No global/field access in that block.
|
||||
- `CHANSVmConvertToFloatFromStr`: the reordered store initializes the local `end` pointer passed to synchronous `strtoull`/`strtod`; the compare checks the input object type. Neither is a worker completion flag. No volatile stack workaround.
|
||||
- `VmDateDtor`: reorders read-only day/month string-table loads and a `snprintf` stack argument. No mutable shared state at the difference.
|
||||
- `NHTTPi_strnicmp` and `NHTTPi_compareToken`: differences precede the first character load and only materialize constants 0 and 0x5a. No declaration to qualify.
|
||||
- `NHTTPi_compareTokenN_HdrRecvBuf`: reorders ASCII bound constants, a sign extension and a local limit decrement. The response buffer is already received; no reordered memory access identifies a shared flag.
|
||||
- `SOGetSockName`: the difference is the first memcpy before IOS_Ioctl, reading caller-owned `addr->len`. The later IOS reply shares the SOSockAddr type, so test its length field unconditionally across all including units, while checking for extra validation reads or regressions.
|
||||
- The tail-window scan also returned `kbdProcMod`, `KBDSetModState`, and `kbd_led_handler`. Manual ctxdiff review excludes them from pure epilogue order: the first two differ in address/value register allocation, and the handler differs in branch polarity and constants. Their Ghidra/source paths were inspected; no claim that they are scheduling-only candidates.
|
||||
- `pfd_sddrv_finalize` mixes one register difference with callback-state store ordering. Its media, device, disk and drive fields are shared with SD insertion/removal callbacks. Test the individual real field declarations and the paired media flags. These types are local to sd_drv.c.
|
||||
|
||||
## BS2Update provenance
|
||||
|
||||
The fresh branch has UpdateThread at 94.83023%, 911/913 instructions, not the ten-difference baseline quoted in the task. Ghidra confirms StartUpdate/CancelUpdate polling and public getter outputs for CurrentEntry, pEntries and ContainsSeatTitles. All five globals are written/read across the created update thread and its API callers. Test each separately, then the start/cancel pair. EntriesCount, State and rc are already volatile and remain unchanged.
|
||||
|
||||
## Accepted banner field
|
||||
|
||||
Unconditional `IconState::bannerEnable` qualifier: `isBannerEnable` 92.30769 -> 100.0%, 26/26 instructions, ctxdiff diffs 0. `loadCardFileIcons` also improves 90.7832 -> 91.33984%. Fresh all-1027-unit report: zero score drops. Full clean gate on all six including units: GATE PASS; zero regressions, forbidden patterns and readability warnings. DOL SHA1 `26116613f624061ba99c8d1a299aaa6efa85670d`. Gate artifact `build/lv19/banner.full-gate.txt`.
|
||||
[src/scene/cardSequence/iplCardSequence] instruction-exact functions: 27/30
|
||||
[src/scene/memoryCard/iplGCSaveData] instruction-exact functions: 12/12
|
||||
[src/scene/memoryCard/iplGCWindow] instruction-exact functions: 48/48
|
||||
[src/scene/memoryCard/iplMemoryCard] instruction-exact functions: 41/41
|
||||
[src/scene/memoryCard/iplMemoryCardManager] objdiff: code 3980/5396 data None/None functions 22/26 fuzzy 98.0801 linked code 0
|
||||
[src/scene/memoryCard/iplMemoryCardManager] instruction-exact functions: 22/26
|
||||
[src/scene/sceneSystem/iplSceneCreator] instruction-exact functions: 2/2
|
||||
|
||||
## Accepted file size field
|
||||
|
||||
Banner qualifier committed as `d8e6bf6a`. Unconditional `FileInfo::size` qualifier: `getBlocks` 92.0 -> 100.0%, 25/25 instructions, ctxdiff diffs 0. Fresh all-1027-unit comparison against the banner commit: this is the only function-score change, zero drops. Full clean gate on all six including units: GATE PASS; zero regressions, forbidden patterns and readability warnings. DOL SHA1 `26116613f624061ba99c8d1a299aaa6efa85670d`. Gate artifact `build/lv19/size.full-gate.txt`.
|
||||
[src/scene/cardSequence/iplCardSequence] instruction-exact functions: 27/30
|
||||
[src/scene/memoryCard/iplGCSaveData] instruction-exact functions: 12/12
|
||||
[src/scene/memoryCard/iplGCWindow] instruction-exact functions: 48/48
|
||||
[src/scene/memoryCard/iplMemoryCard] instruction-exact functions: 41/41
|
||||
[src/scene/memoryCard/iplMemoryCardManager] objdiff: code 4080/5396 data None/None functions 23/26 fuzzy 98.2283 linked code 0
|
||||
[src/scene/memoryCard/iplMemoryCardManager] instruction-exact functions: 23/26
|
||||
[src/scene/sceneSystem/iplSceneCreator] instruction-exact functions: 2/2
|
||||
|
||||
Size qualifier committed as `bbd0bc1b`. Origin/main advanced only through unrelated CHANSVm de-asm commit b7a912ce; locked fetch and source-path comparison confirmed all remaining candidate sources unchanged on origin/main. No branch integration performed.
|
||||
|
||||
An additional <=4-difference review found `ATERMi_AutoConfigThread` at 94.75%, 40/40 instructions, three differences combining one result-register choice and one load/shift order. Its result, state and deadline globals are shared with ATERMGetProgress/cancellation. Added three definition trials and inspected its original Ghidra output. This is a supplemental near-order candidate, not one of the thirteen strict instruction-multiset matches.
|
||||
|
||||
SO length trial covers nineteen including units from Ninja dependencies: libs/RevoEX/src/nhttp/NHTTP_socket_RVL, libs/RevoEX/src/so/SOBasic, libs/RevoEX/src/so/SOCommon, libs/RevoEX/src/so/SOInformation, libs/RevoEX/src/so/SOOption, src/scene/nakamuraTest/gamespy/common/gsAvailable, src/scene/nakamuraTest/gamespy/common/gsSHA1, src/scene/nakamuraTest/gamespy/darray, src/scene/nakamuraTest/gamespy/natneg/NATify, src/scene/nakamuraTest/gamespy/natneg/natneg, src/scene/nakamuraTest/gamespy/nonport, src/scene/nakamuraTest/iplContest, src/scene/nakamuraTest/iplNakamuraTest, src/scene/nakamuraTest/iplNetSetup, src/scene/setting/AOSS, src/scene/setting/ATERM, src/scene/setting/iplAOSSThread, src/scene/setting/iplRakuRakuThread, src/system/iplSocketSetting.
|
||||
|
||||
Trial `update_start_volatile`: {"label": "update_start_volatile", "edits": [["src/BS2/BS2Update.c", "u32 StartUpdate = 0;", "volatile u32 StartUpdate = 0;"]], "units": ["src/BS2/BS2Update"], "build": 0, "pool": {"src/BS2/BS2Update": 0}, "changed_functions": [["main/src/scene/memoryCard/iplMemoryCardManager", "isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 92.30769, 100.0], ["main/src/scene/memoryCard/iplMemoryCardManager", "getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 92.0, 100.0], ["main/src/scene/cardSequence/iplCardSequence", "loadCardFileIcons", 90.7832, 91.33984]], "drops": [], "candidates": [["UpdateThread", 911, 913, 337]]}. Restored source after measurement. Artifacts `build/lv19/update_start_volatile/`.
|
||||
|
||||
Trial `update_cancel_volatile`: {"label": "update_cancel_volatile", "edits": [["src/BS2/BS2Update.c", "u32 CancelUpdate = 0;", "volatile u32 CancelUpdate = 0;"]], "units": ["src/BS2/BS2Update"], "build": 0, "pool": {"src/BS2/BS2Update": 0}, "changed_functions": [["main/src/BS2/BS2Update", "UpdateThread", 94.83023, 94.97262], ["main/src/scene/memoryCard/iplMemoryCardManager", "isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 92.30769, 100.0], ["main/src/scene/memoryCard/iplMemoryCardManager", "getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 92.0, 100.0], ["main/src/scene/cardSequence/iplCardSequence", "loadCardFileIcons", 90.7832, 91.33984]], "drops": [], "candidates": [["UpdateThread", 911, 913, 333]]}. Restored source after measurement. Artifacts `build/lv19/update_cancel_volatile/`.
|
||||
|
||||
Trial `update_current_volatile`: {"label": "update_current_volatile", "edits": [["src/BS2/BS2Update.c", "BS2UpdateEntry* CurrentEntry = 0;", "BS2UpdateEntry* volatile CurrentEntry = 0;"]], "units": ["src/BS2/BS2Update"], "build": 0, "pool": {"src/BS2/BS2Update": 0}, "changed_functions": [["main/src/scene/memoryCard/iplMemoryCardManager", "isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 92.30769, 100.0], ["main/src/scene/memoryCard/iplMemoryCardManager", "getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 92.0, 100.0], ["main/src/scene/cardSequence/iplCardSequence", "loadCardFileIcons", 90.7832, 91.33984]], "drops": [], "candidates": [["UpdateThread", 911, 913, 337]]}. Restored source after measurement. Artifacts `build/lv19/update_current_volatile/`.
|
||||
|
||||
Trial `update_entries_volatile`: {"label": "update_entries_volatile", "edits": [["src/BS2/BS2Update.c", "static BS2UpdateEntry* pEntries = NULL;", "static BS2UpdateEntry* volatile pEntries = NULL;"]], "units": ["src/BS2/BS2Update"], "build": 0, "pool": {"src/BS2/BS2Update": 0}, "changed_functions": [["main/src/scene/memoryCard/iplMemoryCardManager", "isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 92.30769, 100.0], ["main/src/scene/memoryCard/iplMemoryCardManager", "getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 92.0, 100.0], ["main/src/scene/cardSequence/iplCardSequence", "loadCardFileIcons", 90.7832, 91.33984]], "drops": [], "candidates": [["UpdateThread", 911, 913, 337]]}. Restored source after measurement. Artifacts `build/lv19/update_entries_volatile/`.
|
||||
|
||||
Trial `update_seat_volatile`: {"label": "update_seat_volatile", "edits": [["src/BS2/BS2Update.c", "static BOOL ContainsSeatTitles = 0;", "static volatile BOOL ContainsSeatTitles = 0;"]], "units": ["src/BS2/BS2Update"], "build": 0, "pool": {"src/BS2/BS2Update": 0}, "changed_functions": [["main/src/BS2/BS2Update", "UpdateThread", 94.83023, 94.70208], ["main/src/scene/memoryCard/iplMemoryCardManager", "isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 92.30769, 100.0], ["main/src/scene/memoryCard/iplMemoryCardManager", "getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 92.0, 100.0], ["main/src/scene/cardSequence/iplCardSequence", "loadCardFileIcons", 90.7832, 91.33984]], "drops": [["main/src/BS2/BS2Update", "UpdateThread", 94.83023, 94.70208]], "candidates": [["UpdateThread", 911, 913, 338]]}. Restored source after measurement. Artifacts `build/lv19/update_seat_volatile/`.
|
||||
|
||||
Trial `update_start_cancel_volatile`: {"label": "update_start_cancel_volatile", "edits": [["src/BS2/BS2Update.c", "u32 StartUpdate = 0;", "volatile u32 StartUpdate = 0;"], ["src/BS2/BS2Update.c", "u32 CancelUpdate = 0;", "volatile u32 CancelUpdate = 0;"]], "units": ["src/BS2/BS2Update"], "build": 0, "pool": {"src/BS2/BS2Update": 0}, "changed_functions": [["main/src/BS2/BS2Update", "UpdateThread", 94.83023, 94.99671], ["main/src/scene/memoryCard/iplMemoryCardManager", "isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 92.30769, 100.0], ["main/src/scene/memoryCard/iplMemoryCardManager", "getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 92.0, 100.0], ["main/src/scene/cardSequence/iplCardSequence", "loadCardFileIcons", 90.7832, 91.33984]], "drops": [], "candidates": [["UpdateThread", 911, 913, 329]]}. Restored source after measurement. Artifacts `build/lv19/update_start_cancel_volatile/`.
|
||||
|
||||
Trial `sd_inserted_volatile`: {"label": "sd_inserted_volatile", "edits": [["libs/RVL_SDK/src/fa/driver/sd_drv.c", " u32 media_inserted;", " volatile u32 media_inserted;"]], "units": ["libs/RVL_SDK/src/fa/driver/sd_drv"], "build": 0, "pool": {"libs/RVL_SDK/src/fa/driver/sd_drv": 0}, "changed_functions": [["main/src/scene/memoryCard/iplMemoryCardManager", "isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 92.30769, 100.0], ["main/src/scene/memoryCard/iplMemoryCardManager", "getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 92.0, 100.0], ["main/src/scene/cardSequence/iplCardSequence", "loadCardFileIcons", 90.7832, 91.33984], ["main/libs/RVL_SDK/src/fa/driver/sd_drv", "pfd_st_removal_callback", 100.0, 95.36364], ["main/libs/RVL_SDK/src/fa/driver/sd_drv", "pfd_sddrv_finalize", 92.63158, 96.31579]], "drops": [["main/libs/RVL_SDK/src/fa/driver/sd_drv", "pfd_st_removal_callback", 100.0, 95.36364], ["main/libs/RVL_SDK/src/fa/driver/sd_drv", "matched_code", "9260", "8996"], ["main/libs/RVL_SDK/src/fa/driver/sd_drv", "matched_functions", 22, 21]], "candidates": [["pfd_sddrv_finalize", 57, 57, 4]]}. Restored source after measurement. Artifacts `build/lv19/sd_inserted_volatile/`.
|
||||
|
||||
Trial `sd_ejected_volatile`: {"label": "sd_ejected_volatile", "edits": [["libs/RVL_SDK/src/fa/driver/sd_drv.c", " u32 media_ejected;", " volatile u32 media_ejected;"]], "units": ["libs/RVL_SDK/src/fa/driver/sd_drv"], "build": 0, "pool": {"libs/RVL_SDK/src/fa/driver/sd_drv": 0}, "changed_functions": [["main/src/scene/memoryCard/iplMemoryCardManager", "isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 92.30769, 100.0], ["main/src/scene/memoryCard/iplMemoryCardManager", "getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 92.0, 100.0], ["main/src/scene/cardSequence/iplCardSequence", "loadCardFileIcons", 90.7832, 91.33984]], "drops": [], "candidates": [["pfd_sddrv_finalize", 57, 57, 4]]}. Restored source after measurement. Artifacts `build/lv19/sd_ejected_volatile/`.
|
||||
|
||||
Trial `sd_device_volatile`: {"label": "sd_device_volatile", "edits": [["libs/RVL_SDK/src/fa/driver/sd_drv.c", " SDDev* device;\n FADisk* disk;", " SDDev* volatile device;\n FADisk* disk;"]], "units": ["libs/RVL_SDK/src/fa/driver/sd_drv"], "build": 0, "pool": {"libs/RVL_SDK/src/fa/driver/sd_drv": 0}, "changed_functions": [["main/src/scene/memoryCard/iplMemoryCardManager", "isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 92.30769, 100.0], ["main/src/scene/memoryCard/iplMemoryCardManager", "getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 92.0, 100.0], ["main/src/scene/cardSequence/iplCardSequence", "loadCardFileIcons", 90.7832, 91.33984]], "drops": [], "candidates": [["pfd_sddrv_finalize", 57, 57, 4]]}. Restored source after measurement. Artifacts `build/lv19/sd_device_volatile/`.
|
||||
|
||||
Trial `sd_disk_volatile`: {"label": "sd_disk_volatile", "edits": [["libs/RVL_SDK/src/fa/driver/sd_drv.c", " FADisk* disk;", " FADisk* volatile disk;"]], "units": ["libs/RVL_SDK/src/fa/driver/sd_drv"], "build": 0, "pool": {"libs/RVL_SDK/src/fa/driver/sd_drv": 0}, "changed_functions": [["main/src/scene/memoryCard/iplMemoryCardManager", "isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 92.30769, 100.0], ["main/src/scene/memoryCard/iplMemoryCardManager", "getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 92.0, 100.0], ["main/src/scene/cardSequence/iplCardSequence", "loadCardFileIcons", 90.7832, 91.33984]], "drops": [], "candidates": [["pfd_sddrv_finalize", 57, 57, 7]]}. Restored source after measurement. Artifacts `build/lv19/sd_disk_volatile/`.
|
||||
|
||||
Trial `sd_drive_volatile`: {"label": "sd_drive_volatile", "edits": [["libs/RVL_SDK/src/fa/driver/sd_drv.c", " s8 drive;\n} ATTRIBUTE_ALIGN(8)", " volatile s8 drive;\n} ATTRIBUTE_ALIGN(8)"]], "units": ["libs/RVL_SDK/src/fa/driver/sd_drv"], "build": 0, "pool": {"libs/RVL_SDK/src/fa/driver/sd_drv": 0}, "changed_functions": [["main/src/scene/memoryCard/iplMemoryCardManager", "isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 92.30769, 100.0], ["main/src/scene/memoryCard/iplMemoryCardManager", "getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 92.0, 100.0], ["main/src/scene/cardSequence/iplCardSequence", "loadCardFileIcons", 90.7832, 91.33984], ["main/libs/RVL_SDK/src/fa/driver/sd_drv", "pfd_sddrv_finalize", 92.63158, 96.31579]], "drops": [], "candidates": [["pfd_sddrv_finalize", 57, 57, 4]]}. Restored source after measurement. Artifacts `build/lv19/sd_drive_volatile/`.
|
||||
|
||||
Trial `sd_media_flags_volatile`: {"label": "sd_media_flags_volatile", "edits": [["libs/RVL_SDK/src/fa/driver/sd_drv.c", " u32 media_inserted;", " volatile u32 media_inserted;"], ["libs/RVL_SDK/src/fa/driver/sd_drv.c", " u32 media_ejected;", " volatile u32 media_ejected;"]], "units": ["libs/RVL_SDK/src/fa/driver/sd_drv"], "build": 0, "pool": {"libs/RVL_SDK/src/fa/driver/sd_drv": 0}, "changed_functions": [["main/src/scene/memoryCard/iplMemoryCardManager", "isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 92.30769, 100.0], ["main/src/scene/memoryCard/iplMemoryCardManager", "getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 92.0, 100.0], ["main/src/scene/cardSequence/iplCardSequence", "loadCardFileIcons", 90.7832, 91.33984], ["main/libs/RVL_SDK/src/fa/driver/sd_drv", "pfd_st_removal_callback", 100.0, 95.36364], ["main/libs/RVL_SDK/src/fa/driver/sd_drv", "pfd_sddrv_finalize", 92.63158, 96.31579]], "drops": [["main/libs/RVL_SDK/src/fa/driver/sd_drv", "pfd_st_removal_callback", 100.0, 95.36364], ["main/libs/RVL_SDK/src/fa/driver/sd_drv", "matched_code", "9260", "8996"], ["main/libs/RVL_SDK/src/fa/driver/sd_drv", "matched_functions", 22, 21]], "candidates": [["pfd_sddrv_finalize", 57, 57, 4]]}. Restored source after measurement. Artifacts `build/lv19/sd_media_flags_volatile/`.
|
||||
|
||||
Trial `aoss_cancel_volatile`: {"label": "aoss_cancel_volatile", "edits": [["src/scene/setting/AOSSLink.c", "s32 AOSSi_cancel_flag = 0;", "volatile s32 AOSSi_cancel_flag = 0;"], ["src/scene/setting/AOSS.c", "extern int AOSSi_cancel_flag;", "extern volatile int AOSSi_cancel_flag;"]], "units": ["src/scene/setting/AOSS", "src/scene/setting/AOSSLink"], "build": 0, "pool": {"src/scene/setting/AOSS": 0, "src/scene/setting/AOSSLink": 0}, "changed_functions": [["main/src/scene/memoryCard/iplMemoryCardManager", "isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 92.30769, 100.0], ["main/src/scene/memoryCard/iplMemoryCardManager", "getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 92.0, 100.0], ["main/src/scene/cardSequence/iplCardSequence", "loadCardFileIcons", 90.7832, 91.33984]], "drops": [], "candidates": [["AOSSi_WLANConnect", 155, 155, 2]]}. Restored source after measurement. Artifacts `build/lv19/aoss_cancel_volatile/`.
|
||||
|
||||
Trial `so_length_volatile`: {"label": "so_length_volatile", "edits": [["libs/RevoEX/include/revolution/so/SOBasic.h", "typedef struct SOSockAddr {\n u8 len;", "typedef struct SOSockAddr {\n volatile u8 len;"]], "units": ["libs/RevoEX/src/nhttp/NHTTP_socket_RVL", "libs/RevoEX/src/so/SOBasic", "libs/RevoEX/src/so/SOCommon", "libs/RevoEX/src/so/SOInformation", "libs/RevoEX/src/so/SOOption", "src/scene/nakamuraTest/gamespy/common/gsAvailable", "src/scene/nakamuraTest/gamespy/common/gsSHA1", "src/scene/nakamuraTest/gamespy/darray", "src/scene/nakamuraTest/gamespy/natneg/NATify", "src/scene/nakamuraTest/gamespy/natneg/natneg", "src/scene/nakamuraTest/gamespy/nonport", "src/scene/nakamuraTest/iplContest", "src/scene/nakamuraTest/iplNakamuraTest", "src/scene/nakamuraTest/iplNetSetup", "src/scene/setting/AOSS", "src/scene/setting/ATERM", "src/scene/setting/iplAOSSThread", "src/scene/setting/iplRakuRakuThread", "src/system/iplSocketSetting"], "build": 0, "pool": {"libs/RevoEX/src/nhttp/NHTTP_socket_RVL": 0, "libs/RevoEX/src/so/SOBasic": 0, "libs/RevoEX/src/so/SOCommon": 0, "libs/RevoEX/src/so/SOInformation": 0, "libs/RevoEX/src/so/SOOption": 0, "src/scene/nakamuraTest/gamespy/common/gsAvailable": 0, "src/scene/nakamuraTest/gamespy/common/gsSHA1": 0, "src/scene/nakamuraTest/gamespy/darray": 0, "src/scene/nakamuraTest/gamespy/natneg/NATify": 0, "src/scene/nakamuraTest/gamespy/natneg/natneg": 0, "src/scene/nakamuraTest/gamespy/nonport": 1, "src/scene/nakamuraTest/iplContest": 0, "src/scene/nakamuraTest/iplNakamuraTest": 0, "src/scene/nakamuraTest/iplNetSetup": 0, "src/scene/setting/AOSS": 0, "src/scene/setting/ATERM": 0, "src/scene/setting/iplAOSSThread": 0, "src/scene/setting/iplRakuRakuThread": 0, "src/system/iplSocketSetting": 0}, "changed_functions": [["main/src/scene/memoryCard/iplMemoryCardManager", "isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 92.30769, 100.0], ["main/src/scene/memoryCard/iplMemoryCardManager", "getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 92.0, 100.0], ["main/src/scene/cardSequence/iplCardSequence", "loadCardFileIcons", 90.7832, 91.33984], ["main/libs/RevoEX/src/so/SOBasic", "SOBind", 100.0, 96.55173], ["main/libs/RevoEX/src/so/SOBasic", "SOConnect", 100.0, 96.55173], ["main/libs/RevoEX/src/so/SOBasic", "SOGetSockName", 96.666664, 89.84127], ["main/libs/RevoEX/src/so/SOBasic", "RecvFrom", 100.0, 95.25862], ["main/libs/RevoEX/src/so/SOBasic", "SendTo", 100.0, 98.56115]], "drops": [["main/libs/RevoEX/src/so/SOBasic", "SOBind", 100.0, 96.55173], ["main/libs/RevoEX/src/so/SOBasic", "SOConnect", 100.0, 96.55173], ["main/libs/RevoEX/src/so/SOBasic", "SOGetSockName", 96.666664, 89.84127], ["main/libs/RevoEX/src/so/SOBasic", "RecvFrom", 100.0, 95.25862], ["main/libs/RevoEX/src/so/SOBasic", "SendTo", 100.0, 98.56115], ["main/libs/RevoEX/src/so/SOBasic", "matched_code", "3836", "2120"], ["main/libs/RevoEX/src/so/SOBasic", "matched_functions", 21, 17]], "candidates": [["ATERMBuildEncryptedMessage", 96, 96, 2], ["ATERMi_AutoConfigThread", 40, 40, 3], ["SOGetSockName", 66, 63, 53]]}. Restored source after measurement. Artifacts `build/lv19/so_length_volatile/`.
|
||||
|
||||
Trial `aterm_result_volatile`: {"label": "aterm_result_volatile", "edits": [["src/scene/setting/ATERM.c", "u32 gAtermResult;", "volatile u32 gAtermResult;"]], "units": ["src/scene/setting/ATERM"], "build": 0, "pool": {"src/scene/setting/ATERM": 0}, "changed_functions": [["main/src/scene/memoryCard/iplMemoryCardManager", "isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 92.30769, 100.0], ["main/src/scene/memoryCard/iplMemoryCardManager", "getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 92.0, 100.0], ["main/src/scene/cardSequence/iplCardSequence", "loadCardFileIcons", 90.7832, 91.33984]], "drops": [], "candidates": [["ATERMBuildEncryptedMessage", 96, 96, 2], ["ATERMi_AutoConfigThread", 40, 40, 3]]}. Restored source after measurement. Artifacts `build/lv19/aterm_result_volatile/`.
|
||||
|
||||
Trial `aterm_state_volatile`: {"label": "aterm_state_volatile", "edits": [["src/scene/setting/ATERM.c", "s32 gAtermState;", "volatile s32 gAtermState;"]], "units": ["src/scene/setting/ATERM"], "build": 0, "pool": {"src/scene/setting/ATERM": 0}, "changed_functions": [["main/src/scene/memoryCard/iplMemoryCardManager", "isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 92.30769, 100.0], ["main/src/scene/memoryCard/iplMemoryCardManager", "getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 92.0, 100.0], ["main/src/scene/cardSequence/iplCardSequence", "loadCardFileIcons", 90.7832, 91.33984], ["main/src/scene/setting/ATERM", "ATERMi_ApConfigStart", 100.0, 99.02913], ["main/src/scene/setting/ATERM", "ATERMi_ApConfigEnd", 100.0, 97.82946]], "drops": [["main/src/scene/setting/ATERM", "ATERMi_ApConfigStart", 100.0, 99.02913], ["main/src/scene/setting/ATERM", "ATERMi_ApConfigEnd", 100.0, 97.82946], ["main/src/scene/setting/ATERM", "matched_code", "12200", "11272"], ["main/src/scene/setting/ATERM", "matched_functions", 20, 18]], "candidates": [["ATERMBuildEncryptedMessage", 96, 96, 2], ["ATERMi_AutoConfigThread", 40, 40, 3]]}. Restored source after measurement. Artifacts `build/lv19/aterm_state_volatile/`.
|
||||
|
||||
Trial `aterm_deadline_volatile`: {"label": "aterm_deadline_volatile", "edits": [["src/scene/setting/ATERM.c", "u32 gAtermDeadline = 0xFFFFFFFF;", "volatile u32 gAtermDeadline = 0xFFFFFFFF;"]], "units": ["src/scene/setting/ATERM"], "build": 0, "pool": {"src/scene/setting/ATERM": 0}, "changed_functions": [["main/src/scene/memoryCard/iplMemoryCardManager", "isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 92.30769, 100.0], ["main/src/scene/memoryCard/iplMemoryCardManager", "getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 92.0, 100.0], ["main/src/scene/cardSequence/iplCardSequence", "loadCardFileIcons", 90.7832, 91.33984], ["main/src/scene/setting/ATERM", "ATERMRunConfigProtocol", 92.100945, 91.50158]], "drops": [["main/src/scene/setting/ATERM", "ATERMRunConfigProtocol", 92.100945, 91.50158], ["main/src/scene/setting/ATERM", "matched_data", "18864", "18584"]], "candidates": [["ATERMBuildEncryptedMessage", 96, 96, 2], ["ATERMi_AutoConfigThread", 40, 40, 3]]}. Restored source after measurement. Artifacts `build/lv19/aterm_deadline_volatile/`.
|
||||
|
||||
## Follow-up and rejection decisions
|
||||
|
||||
The seventeen additional trials completed and restored their sources. AOSS cancellation was a score no-op. Socket length regressed four exact functions plus SOGetSockName and is rejected. The pre-existing pool divergence in gamespy/nonport is unrelated: that unit has unchanged measures/function scores. ATERM result was a no-op; state lost two exact functions; deadline lost data and regressed RunConfigProtocol. All rejected.
|
||||
|
||||
BS2 start/cancel together improve UpdateThread 94.83023 -> 94.99671%, still 911/913 instructions. SD drive improves finalize 92.63158 -> 96.31579%, still four order differences. Neither meets common.md exact-function handoff, so neither is accepted on fuzzy score alone. The SD callback media_inserted qualifier also regresses the exact removal callback and is rejected. Device/ejected/disk give no score gain.
|
||||
|
||||
Final SD follow-up tests the mount/status flags field alone and with the drive field. The callback-visible driver state is consumed through the registered FA driver operations. The original finalize stores its flags before clearing media_inserted; drive qualification already fixes the value-register choice, leaving store order. These are definition-only diagnostics, with acceptance still requiring original-source evidence and zero drops.
|
||||
|
||||
Trial `sd_status_flags_volatile`: {"label": "sd_status_flags_volatile", "edits": [["libs/RVL_SDK/src/fa/driver/sd_drv.c", "typedef struct PFD_SDDRV_INFO {\n u32 flags;", "typedef struct PFD_SDDRV_INFO {\n volatile u32 flags;"]], "units": ["libs/RVL_SDK/src/fa/driver/sd_drv"], "build": 0, "pool": {"libs/RVL_SDK/src/fa/driver/sd_drv": 0}, "changed_functions": [["main/src/scene/memoryCard/iplMemoryCardManager", "isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 92.30769, 100.0], ["main/src/scene/memoryCard/iplMemoryCardManager", "getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 92.0, 100.0], ["main/src/scene/cardSequence/iplCardSequence", "loadCardFileIcons", 90.7832, 91.33984]], "drops": [], "candidates": [["pfd_sddrv_finalize", 57, 57, 4]]}. Restored source after measurement. Artifacts `build/lv19/sd_status_flags_volatile/`.
|
||||
|
||||
Trial `sd_status_and_drive_volatile`: {"label": "sd_status_and_drive_volatile", "edits": [["libs/RVL_SDK/src/fa/driver/sd_drv.c", "typedef struct PFD_SDDRV_INFO {\n u32 flags;", "typedef struct PFD_SDDRV_INFO {\n volatile u32 flags;"], ["libs/RVL_SDK/src/fa/driver/sd_drv.c", " s8 drive;\n} ATTRIBUTE_ALIGN(8)", " volatile s8 drive;\n} ATTRIBUTE_ALIGN(8)"]], "units": ["libs/RVL_SDK/src/fa/driver/sd_drv"], "build": 0, "pool": {"libs/RVL_SDK/src/fa/driver/sd_drv": 0}, "changed_functions": [["main/src/scene/memoryCard/iplMemoryCardManager", "isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs", 92.30769, 100.0], ["main/src/scene/memoryCard/iplMemoryCardManager", "getBlocks__Q33ipl5scene17MemoryCardManagerFUcs", 92.0, 100.0], ["main/src/scene/cardSequence/iplCardSequence", "loadCardFileIcons", 90.7832, 91.33984], ["main/libs/RVL_SDK/src/fa/driver/sd_drv", "pfd_sddrv_finalize", 92.63158, 96.31579]], "drops": [], "candidates": [["pfd_sddrv_finalize", 57, 57, 4]]}. Restored source after measurement. Artifacts `build/lv19/sd_status_and_drive_volatile/`.
|
||||
|
||||
## Final sweep disposition
|
||||
|
||||
All 22 definition-level trials built successfully and were measured. The two SD follow-up trials gave no exact function: flags alone is unchanged, flags plus drive retains the four-difference 96.31579% near-match. Restored both. No trial remains applied except the two independently committed card field qualifiers. The source diff from 60341ca4 contains only include/iplMemoryCardLib.h.
|
||||
|
||||
The strict scan found thirteen pure order functions. Both card getters are now exact. Remaining pure-order functions have no demonstrated shared declaration at the differing access, or their eligible qualifier trials did not yield an exact gain. The five additional named near-order functions and supplemental ATERM/SD candidates were audited above. Three keyboard tail-window hits were register/branch differences and excluded. No input pointer, local parser end pointer, string table, or UI animation state was qualified just to change scheduling.
|
||||
|
||||
Final clean gate covers 36 units: libs/RVL_SDK/src/fa/driver/sd_drv, libs/RVL_SDK/src/kbd/kbd_lib, libs/RevoEX/src/nhttp/NHTTP_recvbuf, libs/RevoEX/src/nhttp/NHTTP_socket_RVL, libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL, libs/RevoEX/src/so/SOBasic, libs/RevoEX/src/so/SOCommon, libs/RevoEX/src/so/SOInformation, libs/RevoEX/src/so/SOOption, src/BS2/BS2Mach, src/BS2/BS2Update, src/channelScript/CHANSVm, src/scene/address/iplAddressEdit, src/scene/cardSequence/iplCardSequence, src/scene/memoryCard/iplGCSaveData, src/scene/memoryCard/iplGCWindow, src/scene/memoryCard/iplMemoryCard, src/scene/memoryCard/iplMemoryCardManager, src/scene/nakamuraTest/gamespy/common/gsAvailable, src/scene/nakamuraTest/gamespy/common/gsSHA1, src/scene/nakamuraTest/gamespy/darray, src/scene/nakamuraTest/gamespy/natneg/NATify, src/scene/nakamuraTest/gamespy/natneg/natneg, src/scene/nakamuraTest/gamespy/nonport, src/scene/nakamuraTest/iplContest, src/scene/nakamuraTest/iplNakamuraTest, src/scene/nakamuraTest/iplNetSetup, src/scene/sceneSystem/iplSceneCreator, src/scene/sdChannelSelect/iplSDChannelSelect, src/scene/setting/AOSS, src/scene/setting/AOSSLink, src/scene/setting/ATERM, src/scene/setting/iplAOSSThread, src/scene/setting/iplRakuRakuThread, src/scene/setting/iplSetting, src/system/iplSocketSetting. All 1027 units also participate in its global regression check. Each accepted header change had already passed a separate clean gate on all six including units.
|
||||
|
||||
## Final clean evidence
|
||||
|
||||
Final non-quick gate: `GATE PASS` on all 36 listed units, full build ok, zero baseline regressions, zero new forbidden patterns, zero readability warnings. Raw output: `tools/decomp-assist/lv19.final-gate.txt`. Live `build/43U/report.json` regenerated after the gate with `ninja -C . progress build/43U/report.json build/43U/ok`, exit 0. DOL SHA1 `26116613f624061ba99c8d1a299aaa6efa85670d`.
|
||||
|
||||
Fresh comparison of all 1027 units with the initial report found exactly three function-score changes and no score/measure drops:
|
||||
|
||||
- `main/src/scene/memoryCard/iplMemoryCardManager::isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs`: 92.30769 -> 100.0%.
|
||||
- `main/src/scene/memoryCard/iplMemoryCardManager::getBlocks__Q33ipl5scene17MemoryCardManagerFUcs`: 92.0 -> 100.0%.
|
||||
- `main/src/scene/cardSequence/iplCardSequence::loadCardFileIcons`: 90.7832 -> 91.33984%.
|
||||
|
||||
MemoryCardManager instruction-exact functions 21/26 -> 23/26, code 3876/5396 -> 4080/5396. The unit has no owned data section. CardSequence remains 27/30 exact and 1496/1496 data; its icon loader improves without becoming exact. Global code 2777644 -> 2777848, exact report functions 12430 -> 12432; data stays 1832576/1832684. Both getters were rechecked after the clean build: banner 26/26, blocks 25/25, ctxdiff diffs 0.
|
||||
|
||||
All six including-unit pools pass. The untouched gamespy/nonport pool divergence was rechecked after restoration and remains gsAssert.c versus localhost; its measures and functions are unchanged. This unrelated baseline discrepancy is not presented as an identical pool.
|
||||
|
||||
Source changes are only the two unconditional field qualifiers in include/iplMemoryCardLib.h, committed separately as d8e6bf6a and bbd0bc1b. The other files are this attempts log and final gate evidence. No rejected trial remains in a tracked source file. Remaining MemoryCardManager functions `_create_icon`, `getComment`, and `create_banner` are outside the pure scheduling/epilogue candidate set and remain non-exact.
|
||||
359
tools/decomp-assist/lv19.final-gate.txt
Normal file
359
tools/decomp-assist/lv19.final-gate.txt
Normal file
@@ -0,0 +1,359 @@
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] objdiff: code 9260/11760 data 3592/3592 functions 22/26 fuzzy 99.1412 linked code 0
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] instruction-exact functions: 22/26
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] section .bss size 608 match 100.0
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] section .data size 2576 match 100.0
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] section .rodata size 368 match 100.0
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] section .sbss size 40 match 100.0
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] section .text size 11760 match 99.14116
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_init 93.125
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_finalize 92.63158
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_store_mbr_buf 99.75247
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_build_fat32_mbr_bpb 95.202705
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] baseline: code 9260/11760 data 3592 functions 22 fuzzy 99.1412
|
||||
[libs/RVL_SDK/src/kbd/kbd_lib] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/kbd/kbd_lib] objdiff: code 3728/5764 data 5296/5296 functions 17/21 fuzzy 99.9396 linked code 0
|
||||
[libs/RVL_SDK/src/kbd/kbd_lib] instruction-exact functions: 17/21
|
||||
[libs/RVL_SDK/src/kbd/kbd_lib] section .bss size 3968 match 100.0
|
||||
[libs/RVL_SDK/src/kbd/kbd_lib] section .data size 1304 match 100.0
|
||||
[libs/RVL_SDK/src/kbd/kbd_lib] section .sbss size 16 match 100.0
|
||||
[libs/RVL_SDK/src/kbd/kbd_lib] section .sdata size 8 match 100.0
|
||||
[libs/RVL_SDK/src/kbd/kbd_lib] section .text size 5764 match 99.93963
|
||||
[libs/RVL_SDK/src/kbd/kbd_lib] below 100: kbdEventHandler 99.83871
|
||||
[libs/RVL_SDK/src/kbd/kbd_lib] below 100: kbdProcMod 99.90234
|
||||
[libs/RVL_SDK/src/kbd/kbd_lib] below 100: kbd_led_handler 99.72
|
||||
[libs/RVL_SDK/src/kbd/kbd_lib] below 100: KBDSetModState 99.40476
|
||||
[libs/RVL_SDK/src/kbd/kbd_lib] baseline: code 3728/5764 data 5296 functions 17 fuzzy 99.9396
|
||||
[libs/RevoEX/src/nhttp/NHTTP_recvbuf] pool: IDENTICAL
|
||||
[libs/RevoEX/src/nhttp/NHTTP_recvbuf] objdiff: code 1196/1692 data None/None functions 6/7 fuzzy 99.2151 linked code 0
|
||||
[libs/RevoEX/src/nhttp/NHTTP_recvbuf] instruction-exact functions: 6/7
|
||||
[libs/RevoEX/src/nhttp/NHTTP_recvbuf] section .text size 1692 match 99.21513
|
||||
[libs/RevoEX/src/nhttp/NHTTP_recvbuf] below 100: NHTTPi_compareTokenN_HdrRecvBuf 97.32258
|
||||
[libs/RevoEX/src/nhttp/NHTTP_recvbuf] baseline: code 1196/1692 data None functions 6 fuzzy 99.2151
|
||||
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] pool: IDENTICAL
|
||||
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] objdiff: code 2140/2140 data None/None functions 10/10 fuzzy 100.0000 linked code 2140
|
||||
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] instruction-exact functions: 10/10
|
||||
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] section .text size 2140 match 100.0
|
||||
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] baseline: code 2140/2140 data None functions 10 fuzzy 100.0000
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] pool: IDENTICAL
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] objdiff: code 1864/2248 data 112/112 functions 12/14 fuzzy 99.9573 linked code 0
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] instruction-exact functions: 12/14
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] section .data size 72 match 100.0
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] section .rodata size 40 match 100.0
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] section .text size 2248 match 99.9573
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] below 100: NHTTPi_strnicmp 99.76471
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] below 100: NHTTPi_compareToken 99.73333
|
||||
[libs/RevoEX/src/nhttp/NHTTP_stdlib_RVL] baseline: code 1864/2248 data 112 functions 12 fuzzy 99.9573
|
||||
[libs/RevoEX/src/so/SOBasic] pool: IDENTICAL
|
||||
[libs/RevoEX/src/so/SOBasic] objdiff: code 3836/4088 data 144/144 functions 21/22 fuzzy 99.7945 linked code 0
|
||||
[libs/RevoEX/src/so/SOBasic] instruction-exact functions: 21/22
|
||||
[libs/RevoEX/src/so/SOBasic] section .bss size 40 match 100.0
|
||||
[libs/RevoEX/src/so/SOBasic] section .data size 88 match 100.0
|
||||
[libs/RevoEX/src/so/SOBasic] section .sbss size 8 match 100.0
|
||||
[libs/RevoEX/src/so/SOBasic] section .sdata size 8 match 100.0
|
||||
[libs/RevoEX/src/so/SOBasic] section .text size 4088 match 99.79452
|
||||
[libs/RevoEX/src/so/SOBasic] below 100: SOGetSockName 96.666664
|
||||
[libs/RevoEX/src/so/SOBasic] baseline: code 3836/4088 data 144 functions 21 fuzzy 99.7945
|
||||
[libs/RevoEX/src/so/SOCommon] pool: IDENTICAL
|
||||
[libs/RevoEX/src/so/SOCommon] objdiff: code 4404/4404 data 528/528 functions 16/16 fuzzy 100.0000 linked code 4404
|
||||
[libs/RevoEX/src/so/SOCommon] instruction-exact functions: 16/16
|
||||
[libs/RevoEX/src/so/SOCommon] section .bss size 24 match 100.0
|
||||
[libs/RevoEX/src/so/SOCommon] section .data size 480 match 100.0
|
||||
[libs/RevoEX/src/so/SOCommon] section .sbss size 16 match 100.0
|
||||
[libs/RevoEX/src/so/SOCommon] section .sdata size 8 match 100.0
|
||||
[libs/RevoEX/src/so/SOCommon] section .text size 4404 match 100.0
|
||||
[libs/RevoEX/src/so/SOCommon] baseline: code 4404/4404 data 528 functions 16 fuzzy 100.0000
|
||||
[libs/RevoEX/src/so/SOInformation] pool: IDENTICAL
|
||||
[libs/RevoEX/src/so/SOInformation] objdiff: code 1280/1280 data None/None functions 4/4 fuzzy 100.0000 linked code 1280
|
||||
[libs/RevoEX/src/so/SOInformation] instruction-exact functions: 4/4
|
||||
[libs/RevoEX/src/so/SOInformation] section .text size 1280 match 100.0
|
||||
[libs/RevoEX/src/so/SOInformation] baseline: code 1280/1280 data None functions 4 fuzzy 100.0000
|
||||
[libs/RevoEX/src/so/SOOption] pool: IDENTICAL
|
||||
[libs/RevoEX/src/so/SOOption] objdiff: code 1292/1292 data None/None functions 4/4 fuzzy 100.0000 linked code 1292
|
||||
[libs/RevoEX/src/so/SOOption] instruction-exact functions: 4/4
|
||||
[libs/RevoEX/src/so/SOOption] section .text size 1292 match 100.0
|
||||
[libs/RevoEX/src/so/SOOption] baseline: code 1292/1292 data None functions 4 fuzzy 100.0000
|
||||
[src/BS2/BS2Mach] pool: IDENTICAL
|
||||
[src/BS2/BS2Mach] objdiff: code 5112/16980 data 158528/158528 functions 25/29 fuzzy 99.1698 linked code 0
|
||||
[src/BS2/BS2Mach] instruction-exact functions: 25/29
|
||||
[src/BS2/BS2Mach] section .bss size 155232 match 100.0
|
||||
[src/BS2/BS2Mach] section .data size 3024 match 100.0
|
||||
[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 99.169846
|
||||
[src/BS2/BS2Mach] below 100: BS2StartGame 98.72774
|
||||
[src/BS2/BS2Mach] below 100: BS2StartGCGame 97.82895
|
||||
[src/BS2/BS2Mach] below 100: CheckBS2CommandStatus 99.50739
|
||||
[src/BS2/BS2Mach] below 100: BS2Tick 98.799484
|
||||
[src/BS2/BS2Mach] baseline: code 5112/16980 data 158528 functions 25 fuzzy 99.1698
|
||||
[src/BS2/BS2Update] pool: IDENTICAL
|
||||
[src/BS2/BS2Update] objdiff: code 400/4052 data 10488/10488 functions 9/10 fuzzy 95.3406 linked code 0
|
||||
[src/BS2/BS2Update] instruction-exact functions: 9/10
|
||||
[src/BS2/BS2Update] section .bss size 9056 match 100.0
|
||||
[src/BS2/BS2Update] section .data size 1328 match 100.0
|
||||
[src/BS2/BS2Update] section .sbss size 80 match 100.0
|
||||
[src/BS2/BS2Update] section .sdata size 24 match 100.0
|
||||
[src/BS2/BS2Update] section .text size 4052 match 95.340576
|
||||
[src/BS2/BS2Update] below 100: UpdateThread 94.83023
|
||||
[src/BS2/BS2Update] baseline: code 400/4052 data 10488 functions 9 fuzzy 95.3406
|
||||
[src/channelScript/CHANSVm] pool: IDENTICAL
|
||||
[src/channelScript/CHANSVm] objdiff: code 39908/53564 data 6904/6904 functions 224/233 fuzzy 99.4673 linked code 0
|
||||
[src/channelScript/CHANSVm] instruction-exact functions: 224/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.46733
|
||||
[src/channelScript/CHANSVm] below 100: CHANSVmConvertToFloatFromStr 97.59036
|
||||
[src/channelScript/CHANSVm] below 100: VmDateDtor 94.96703
|
||||
[src/channelScript/CHANSVm] below 100: VmStringSplit 98.04054
|
||||
[src/channelScript/CHANSVm] below 100: CHANSVmFormatString 99.84919
|
||||
[src/channelScript/CHANSVm] below 100: VmBlobGetHexString 98.71951
|
||||
[src/channelScript/CHANSVm] below 100: VmBlobPackCommon 98.0988
|
||||
[src/channelScript/CHANSVm] below 100: VmBlobUnpack 98.452614
|
||||
[src/channelScript/CHANSVm] below 100: VmWinEmuWrite 99.62687
|
||||
[src/channelScript/CHANSVm] below 100: CHANSVmStep 96.98723
|
||||
[src/channelScript/CHANSVm] baseline: code 39908/53564 data 6904 functions 224 fuzzy 99.4673
|
||||
[src/scene/address/iplAddressEdit] pool: IDENTICAL
|
||||
[src/scene/address/iplAddressEdit] objdiff: code 23344/27112 data 2560/2560 functions 91/94 fuzzy 99.5528 linked code 0
|
||||
[src/scene/address/iplAddressEdit] instruction-exact functions: 91/94
|
||||
[src/scene/address/iplAddressEdit] section .bss size 320 match 100.0
|
||||
[src/scene/address/iplAddressEdit] section .data size 2152 match 100.0
|
||||
[src/scene/address/iplAddressEdit] section .rodata size 40 match 100.0
|
||||
[src/scene/address/iplAddressEdit] section .sdata size 24 match 100.0
|
||||
[src/scene/address/iplAddressEdit] section .sdata2 size 24 match 100.0
|
||||
[src/scene/address/iplAddressEdit] section .text size 27112 match 99.55282
|
||||
[src/scene/address/iplAddressEdit] below 100: create__Q33ipl5scene11AddressEditFv 97.5561
|
||||
[src/scene/address/iplAddressEdit] below 100: get_friendinfo__Q33ipl5scene11AddressEditFv 88.03571
|
||||
[src/scene/address/iplAddressEdit] below 100: update_friendinfo__Q33ipl5scene11AddressEditFv 99.42105
|
||||
[src/scene/address/iplAddressEdit] baseline: code 23344/27112 data 2560 functions 91 fuzzy 99.5528
|
||||
[src/scene/cardSequence/iplCardSequence] pool: IDENTICAL
|
||||
[src/scene/cardSequence/iplCardSequence] objdiff: code 4168/9852 data 1496/1496 functions 27/30 fuzzy 97.4263 linked code 0
|
||||
[src/scene/cardSequence/iplCardSequence] instruction-exact functions: 27/30
|
||||
[src/scene/cardSequence/iplCardSequence] section .bss size 16 match 100.0
|
||||
[src/scene/cardSequence/iplCardSequence] section .data size 1464 match 100.0
|
||||
[src/scene/cardSequence/iplCardSequence] section .sbss size 8 match 100.0
|
||||
[src/scene/cardSequence/iplCardSequence] section .sdata size 8 match 100.0
|
||||
[src/scene/cardSequence/iplCardSequence] section .text size 9852 match 97.42631
|
||||
[src/scene/cardSequence/iplCardSequence] below 100: cardThreadMain 97.9402
|
||||
[src/scene/cardSequence/iplCardSequence] below 100: loadCardFileIcons 91.33984
|
||||
[src/scene/cardSequence/iplCardSequence] below 100: runCardMoveOrCopy 97.88651
|
||||
[src/scene/cardSequence/iplCardSequence] baseline: code 4168/9852 data 1496 functions 27 fuzzy 97.3106
|
||||
[src/scene/memoryCard/iplGCSaveData] pool: IDENTICAL
|
||||
[src/scene/memoryCard/iplGCSaveData] objdiff: code 2008/2008 data 392/392 functions 12/12 fuzzy 100.0000 linked code 2008
|
||||
[src/scene/memoryCard/iplGCSaveData] instruction-exact functions: 12/12
|
||||
[src/scene/memoryCard/iplGCSaveData] section .data size 336 match 100.0
|
||||
[src/scene/memoryCard/iplGCSaveData] section .rodata size 40 match 100.0
|
||||
[src/scene/memoryCard/iplGCSaveData] section .sdata size 16 match 100.0
|
||||
[src/scene/memoryCard/iplGCSaveData] section .text size 2008 match 100.0
|
||||
[src/scene/memoryCard/iplGCSaveData] baseline: code 2008/2008 data 392 functions 12 fuzzy 100.0000
|
||||
[src/scene/memoryCard/iplGCWindow] pool: IDENTICAL
|
||||
[src/scene/memoryCard/iplGCWindow] objdiff: code 9964/9964 data 2032/2032 functions 48/48 fuzzy 100.0000 linked code 9964
|
||||
[src/scene/memoryCard/iplGCWindow] instruction-exact functions: 48/48
|
||||
[src/scene/memoryCard/iplGCWindow] section .data size 1784 match 100.0
|
||||
[src/scene/memoryCard/iplGCWindow] section .rodata size 176 match 100.0
|
||||
[src/scene/memoryCard/iplGCWindow] section .sdata size 48 match 100.0
|
||||
[src/scene/memoryCard/iplGCWindow] section .sdata2 size 24 match 100.0
|
||||
[src/scene/memoryCard/iplGCWindow] section .text size 9964 match 100.0
|
||||
[src/scene/memoryCard/iplGCWindow] baseline: code 9964/9964 data 2032 functions 48 fuzzy 100.0000
|
||||
[src/scene/memoryCard/iplMemoryCard] pool: IDENTICAL
|
||||
[src/scene/memoryCard/iplMemoryCard] objdiff: code 9264/9264 data 2656/2656 functions 41/41 fuzzy 100.0000 linked code 9264
|
||||
[src/scene/memoryCard/iplMemoryCard] instruction-exact functions: 41/41
|
||||
[src/scene/memoryCard/iplMemoryCard] section .data size 2320 match 100.0
|
||||
[src/scene/memoryCard/iplMemoryCard] section .rodata size 280 match 100.0
|
||||
[src/scene/memoryCard/iplMemoryCard] section .sdata size 40 match 100.0
|
||||
[src/scene/memoryCard/iplMemoryCard] section .sdata2 size 16 match 100.0
|
||||
[src/scene/memoryCard/iplMemoryCard] section .text size 9264 match 100.0
|
||||
[src/scene/memoryCard/iplMemoryCard] baseline: code 9264/9264 data 2656 functions 41 fuzzy 100.0000
|
||||
[src/scene/memoryCard/iplMemoryCardManager] pool: IDENTICAL
|
||||
[src/scene/memoryCard/iplMemoryCardManager] objdiff: code 4080/5396 data None/None functions 23/26 fuzzy 98.2283 linked code 0
|
||||
[src/scene/memoryCard/iplMemoryCardManager] instruction-exact functions: 23/26
|
||||
[src/scene/memoryCard/iplMemoryCardManager] section .text size 5396 match 98.22832
|
||||
[src/scene/memoryCard/iplMemoryCardManager] below 100: _create_icon__Q33ipl5scene17MemoryCardManagerFUcsl 87.55
|
||||
[src/scene/memoryCard/iplMemoryCardManager] below 100: getComment__Q33ipl5scene17MemoryCardManagerFUcsi 98.94309
|
||||
[src/scene/memoryCard/iplMemoryCardManager] below 100: create_banner__Q33ipl5scene17MemoryCardManagerFUcs 90.42453
|
||||
[src/scene/memoryCard/iplMemoryCardManager] baseline: code 3876/5396 data None functions 21 fuzzy 97.9318
|
||||
[src/scene/nakamuraTest/gamespy/common/gsAvailable] pool: IDENTICAL
|
||||
[src/scene/nakamuraTest/gamespy/common/gsAvailable] objdiff: code 832/832 data 272/272 functions 3/3 fuzzy 100.0000 linked code 832
|
||||
[src/scene/nakamuraTest/gamespy/common/gsAvailable] instruction-exact functions: 3/3
|
||||
[src/scene/nakamuraTest/gamespy/common/gsAvailable] section .bss size 216 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/common/gsAvailable] section .data size 40 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/common/gsAvailable] section .sbss size 8 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/common/gsAvailable] section .sdata size 8 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/common/gsAvailable] section .text size 832 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/common/gsAvailable] baseline: code 832/832 data 272 functions 3 fuzzy 100.0000
|
||||
[src/scene/nakamuraTest/gamespy/common/gsSHA1] pool: IDENTICAL
|
||||
[src/scene/nakamuraTest/gamespy/common/gsSHA1] objdiff: code 1472/1472 data 16/16 functions 5/5 fuzzy 100.0000 linked code 1472
|
||||
[src/scene/nakamuraTest/gamespy/common/gsSHA1] instruction-exact functions: 5/5
|
||||
[src/scene/nakamuraTest/gamespy/common/gsSHA1] section .rodata size 16 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/common/gsSHA1] section .text size 1472 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/common/gsSHA1] baseline: code 1472/1472 data 16 functions 5 fuzzy 100.0000
|
||||
[src/scene/nakamuraTest/gamespy/darray] pool: IDENTICAL
|
||||
[src/scene/nakamuraTest/gamespy/darray] objdiff: code 348/348 data None/None functions 5/5 fuzzy 100.0000 linked code 348
|
||||
[src/scene/nakamuraTest/gamespy/darray] instruction-exact functions: 5/5
|
||||
[src/scene/nakamuraTest/gamespy/darray] section .text size 348 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/darray] baseline: code 348/348 data None functions 5 fuzzy 100.0000
|
||||
[src/scene/nakamuraTest/gamespy/natneg/NATify] pool: IDENTICAL
|
||||
[src/scene/nakamuraTest/gamespy/natneg/NATify] objdiff: code 2344/2344 data 608/608 functions 6/6 fuzzy 100.0000 linked code 2344
|
||||
[src/scene/nakamuraTest/gamespy/natneg/NATify] instruction-exact functions: 6/6
|
||||
[src/scene/nakamuraTest/gamespy/natneg/NATify] section .bss size 560 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/natneg/NATify] section .sbss size 32 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/natneg/NATify] section .sdata size 16 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/natneg/NATify] section .text size 2344 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/natneg/NATify] baseline: code 2344/2344 data 608 functions 6 fuzzy 100.0000
|
||||
[src/scene/nakamuraTest/gamespy/natneg/natneg] pool: IDENTICAL
|
||||
[src/scene/nakamuraTest/gamespy/natneg/natneg] objdiff: code 4448/4448 data 896/896 functions 16/16 fuzzy 100.0000 linked code 4448
|
||||
[src/scene/nakamuraTest/gamespy/natneg/natneg] instruction-exact functions: 16/16
|
||||
[src/scene/nakamuraTest/gamespy/natneg/natneg] section .bss size 728 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/natneg/natneg] section .data size 88 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/natneg/natneg] section .sbss size 48 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/natneg/natneg] section .sdata size 32 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/natneg/natneg] section .text size 4448 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/natneg/natneg] baseline: code 4448/4448 data 896 functions 16 fuzzy 100.0000
|
||||
[src/scene/nakamuraTest/gamespy/nonport] pool: DIVERGES at string 0 (mine=4 orig=1)
|
||||
[src/scene/nakamuraTest/gamespy/nonport] objdiff: code 1352/1352 data 56/56 functions 18/18 fuzzy 100.0000 linked code 1352
|
||||
[src/scene/nakamuraTest/gamespy/nonport] instruction-exact functions: 18/18
|
||||
[src/scene/nakamuraTest/gamespy/nonport] section .bss size 16 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/nonport] section .data size 32 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/nonport] section .sbss size 8 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/nonport] section .text size 1352 match 100.0
|
||||
[src/scene/nakamuraTest/gamespy/nonport] baseline: code 1352/1352 data 56 functions 18 fuzzy 100.0000
|
||||
[src/scene/nakamuraTest/iplContest] pool: IDENTICAL
|
||||
[src/scene/nakamuraTest/iplContest] objdiff: code 3792/3792 data 3096/3096 functions 18/18 fuzzy 100.0000 linked code 3792
|
||||
[src/scene/nakamuraTest/iplContest] instruction-exact functions: 18/18
|
||||
[src/scene/nakamuraTest/iplContest] section .bss size 2256 match 100.0
|
||||
[src/scene/nakamuraTest/iplContest] section .data size 752 match 100.0
|
||||
[src/scene/nakamuraTest/iplContest] section .rodata size 72 match 100.0
|
||||
[src/scene/nakamuraTest/iplContest] section .sdata size 8 match 100.0
|
||||
[src/scene/nakamuraTest/iplContest] section .sdata2 size 8 match 100.0
|
||||
[src/scene/nakamuraTest/iplContest] section .text size 3792 match 100.0
|
||||
[src/scene/nakamuraTest/iplContest] baseline: code 3792/3792 data 3096 functions 18 fuzzy 100.0000
|
||||
[src/scene/nakamuraTest/iplNakamuraTest] pool: IDENTICAL
|
||||
[src/scene/nakamuraTest/iplNakamuraTest] objdiff: code 3596/3596 data 912/912 functions 15/15 fuzzy 100.0000 linked code 3596
|
||||
[src/scene/nakamuraTest/iplNakamuraTest] instruction-exact functions: 15/15
|
||||
[src/scene/nakamuraTest/iplNakamuraTest] section .data size 872 match 100.0
|
||||
[src/scene/nakamuraTest/iplNakamuraTest] section .rodata size 24 match 100.0
|
||||
[src/scene/nakamuraTest/iplNakamuraTest] section .sbss size 8 match 100.0
|
||||
[src/scene/nakamuraTest/iplNakamuraTest] section .sdata size 8 match 100.0
|
||||
[src/scene/nakamuraTest/iplNakamuraTest] section .text size 3596 match 100.0
|
||||
[src/scene/nakamuraTest/iplNakamuraTest] baseline: code 3596/3596 data 912 functions 15 fuzzy 100.0000
|
||||
[src/scene/nakamuraTest/iplNetSetup] pool: IDENTICAL
|
||||
[src/scene/nakamuraTest/iplNetSetup] objdiff: code 2080/2080 data 256/256 functions 11/11 fuzzy 100.0000 linked code 2080
|
||||
[src/scene/nakamuraTest/iplNetSetup] instruction-exact functions: 11/11
|
||||
[src/scene/nakamuraTest/iplNetSetup] section .bss size 40 match 100.0
|
||||
[src/scene/nakamuraTest/iplNetSetup] section .data size 208 match 100.0
|
||||
[src/scene/nakamuraTest/iplNetSetup] section .sbss size 8 match 100.0
|
||||
[src/scene/nakamuraTest/iplNetSetup] section .text size 2080 match 100.0
|
||||
[src/scene/nakamuraTest/iplNetSetup] baseline: code 2080/2080 data 256 functions 11 fuzzy 100.0000
|
||||
[src/scene/sceneSystem/iplSceneCreator] pool: IDENTICAL
|
||||
[src/scene/sceneSystem/iplSceneCreator] objdiff: code 1332/1332 data 304/304 functions 2/2 fuzzy 100.0000 linked code 1332
|
||||
[src/scene/sceneSystem/iplSceneCreator] instruction-exact functions: 2/2
|
||||
[src/scene/sceneSystem/iplSceneCreator] section .data size 304 match 100.0
|
||||
[src/scene/sceneSystem/iplSceneCreator] section .text size 1332 match 100.0
|
||||
[src/scene/sceneSystem/iplSceneCreator] baseline: code 1332/1332 data 304 functions 2 fuzzy 100.0000
|
||||
[src/scene/sdChannelSelect/iplSDChannelSelect] pool: IDENTICAL
|
||||
[src/scene/sdChannelSelect/iplSDChannelSelect] objdiff: code 30344/33828 data 2960/2960 functions 123/129 fuzzy 99.7731 linked code 0
|
||||
[src/scene/sdChannelSelect/iplSDChannelSelect] instruction-exact functions: 123/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.77309
|
||||
[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: create__Q33ipl5scene15SDChannelSelectFv 97.73972
|
||||
[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 98.007935
|
||||
[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.55125
|
||||
[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv 99.65714
|
||||
[src/scene/sdChannelSelect/iplSDChannelSelect] baseline: code 30344/33828 data 2960 functions 123 fuzzy 99.7731
|
||||
[src/scene/setting/AOSS] pool: IDENTICAL
|
||||
[src/scene/setting/AOSS] objdiff: code 7720/16192 data 3928/3928 functions 17/21 fuzzy 97.9155 linked code 0
|
||||
[src/scene/setting/AOSS] instruction-exact functions: 17/21
|
||||
[src/scene/setting/AOSS] section .bss size 3496 match 100.0
|
||||
[src/scene/setting/AOSS] section .data size 368 match 100.0
|
||||
[src/scene/setting/AOSS] section .sbss size 32 match 100.0
|
||||
[src/scene/setting/AOSS] section .sdata size 24 match 100.0
|
||||
[src/scene/setting/AOSS] section .sdata2 size 8 match 100.0
|
||||
[src/scene/setting/AOSS] section .text size 16192 match 97.91551
|
||||
[src/scene/setting/AOSS] below 100: AOSS_Init_old 96.18624
|
||||
[src/scene/setting/AOSS] below 100: AOSSApplyAuthOptions 98.77193
|
||||
[src/scene/setting/AOSS] below 100: AOSSSendHelloRequest 92.48351
|
||||
[src/scene/setting/AOSS] below 100: AOSSXorBufferWithKey 98.605446
|
||||
[src/scene/setting/AOSS] baseline: code 7720/16192 data 3928 functions 17 fuzzy 97.9155
|
||||
[src/scene/setting/AOSSLink] pool: IDENTICAL
|
||||
[src/scene/setting/AOSSLink] objdiff: code 668/2196 data 2432/2432 functions 12/14 fuzzy 99.0073 linked code 0
|
||||
[src/scene/setting/AOSSLink] instruction-exact functions: 12/14
|
||||
[src/scene/setting/AOSSLink] section .bss size 2344 match 100.0
|
||||
[src/scene/setting/AOSSLink] section .data size 48 match 100.0
|
||||
[src/scene/setting/AOSSLink] section .sbss size 40 match 100.0
|
||||
[src/scene/setting/AOSSLink] section .text size 2196 match 99.007286
|
||||
[src/scene/setting/AOSSLink] below 100: AOSSi_WLANGetBSSList 98.48018
|
||||
[src/scene/setting/AOSSLink] below 100: AOSSi_WLANConnect 98.70968
|
||||
[src/scene/setting/AOSSLink] baseline: code 668/2196 data 2432 functions 12 fuzzy 99.0073
|
||||
[src/scene/setting/ATERM] pool: IDENTICAL
|
||||
[src/scene/setting/ATERM] objdiff: code 12200/19204 data 18864/18864 functions 20/26 fuzzy 98.2020 linked code 0
|
||||
[src/scene/setting/ATERM] instruction-exact functions: 20/26
|
||||
[src/scene/setting/ATERM] section .bss size 8160 match 100.0
|
||||
[src/scene/setting/ATERM] section .data size 280 match 100.0
|
||||
[src/scene/setting/ATERM] section .rodata size 10280 match 100.0
|
||||
[src/scene/setting/ATERM] section .sbss size 80 match 100.0
|
||||
[src/scene/setting/ATERM] section .sdata size 56 match 100.0
|
||||
[src/scene/setting/ATERM] section .sdata2 size 8 match 100.0
|
||||
[src/scene/setting/ATERM] section .text size 19204 match 98.20204
|
||||
[src/scene/setting/ATERM] below 100: ATERMDiscoverAccessPoints 98.31939
|
||||
[src/scene/setting/ATERM] below 100: ATERMBuildEncryptedMessage 99.791664
|
||||
[src/scene/setting/ATERM] below 100: ATERMBuildAssociationRequest 98.7594
|
||||
[src/scene/setting/ATERM] below 100: ATERMRunConfigProtocol 92.100945
|
||||
[src/scene/setting/ATERM] below 100: ATERMi_AutoConfigThread 94.75
|
||||
[src/scene/setting/ATERM] below 100: ATERMAesExpandEncryptKey 98.94403
|
||||
[src/scene/setting/ATERM] baseline: code 12200/19204 data 18864 functions 20 fuzzy 98.2020
|
||||
[src/scene/setting/iplAOSSThread] pool: IDENTICAL
|
||||
[src/scene/setting/iplAOSSThread] objdiff: code 1892/1892 data 88/88 functions 10/10 fuzzy 100.0000 linked code 1892
|
||||
[src/scene/setting/iplAOSSThread] instruction-exact functions: 10/10
|
||||
[src/scene/setting/iplAOSSThread] section .bss size 16 match 100.0
|
||||
[src/scene/setting/iplAOSSThread] section .data size 48 match 100.0
|
||||
[src/scene/setting/iplAOSSThread] section .sbss size 16 match 100.0
|
||||
[src/scene/setting/iplAOSSThread] section .sdata size 8 match 100.0
|
||||
[src/scene/setting/iplAOSSThread] section .text size 1892 match 100.0
|
||||
[src/scene/setting/iplAOSSThread] baseline: code 1892/1892 data 88 functions 10 fuzzy 100.0000
|
||||
[src/scene/setting/iplRakuRakuThread] pool: IDENTICAL
|
||||
[src/scene/setting/iplRakuRakuThread] objdiff: code 2168/2168 data 456/456 functions 14/14 fuzzy 100.0000 linked code 2168
|
||||
[src/scene/setting/iplRakuRakuThread] instruction-exact functions: 14/14
|
||||
[src/scene/setting/iplRakuRakuThread] section .bss size 296 match 100.0
|
||||
[src/scene/setting/iplRakuRakuThread] section .data size 136 match 100.0
|
||||
[src/scene/setting/iplRakuRakuThread] section .sbss size 16 match 100.0
|
||||
[src/scene/setting/iplRakuRakuThread] section .sdata size 8 match 100.0
|
||||
[src/scene/setting/iplRakuRakuThread] section .text size 2168 match 100.0
|
||||
[src/scene/setting/iplRakuRakuThread] baseline: code 2168/2168 data 456 functions 14 fuzzy 100.0000
|
||||
[src/scene/setting/iplSetting] pool: IDENTICAL
|
||||
[src/scene/setting/iplSetting] objdiff: code 36796/37884 data 5696/5696 functions 111/112 fuzzy 99.9771 linked code 0
|
||||
[src/scene/setting/iplSetting] instruction-exact functions: 111/112
|
||||
[src/scene/setting/iplSetting] section .bss size 456 match 100.0
|
||||
[src/scene/setting/iplSetting] section .data size 4016 match 100.0
|
||||
[src/scene/setting/iplSetting] section .rodata size 640 match 100.0
|
||||
[src/scene/setting/iplSetting] section .sbss size 16 match 100.0
|
||||
[src/scene/setting/iplSetting] section .sdata size 504 match 100.0
|
||||
[src/scene/setting/iplSetting] section .sdata2 size 64 match 100.0
|
||||
[src/scene/setting/iplSetting] section .text size 37884 match 99.97709
|
||||
[src/scene/setting/iplSetting] below 100: scanAP__Q33ipl5scene7SettingFv 99.20221
|
||||
[src/scene/setting/iplSetting] baseline: code 36796/37884 data 5696 functions 111 fuzzy 99.9771
|
||||
[src/system/iplSocketSetting] pool: IDENTICAL
|
||||
[src/system/iplSocketSetting] objdiff: code 864/864 data 128/128 functions 8/8 fuzzy 100.0000 linked code 864
|
||||
[src/system/iplSocketSetting] instruction-exact functions: 8/8
|
||||
[src/system/iplSocketSetting] section .bss size 64 match 100.0
|
||||
[src/system/iplSocketSetting] section .data size 48 match 100.0
|
||||
[src/system/iplSocketSetting] section .sbss size 16 match 100.0
|
||||
[src/system/iplSocketSetting] section .text size 864 match 100.0
|
||||
[src/system/iplSocketSetting] baseline: code 864/864 data 128 functions 8 fuzzy 100.0000
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 92.73726 -> 92.74406
|
||||
global fuzzy_match_percent: 99.78007 -> 99.78099
|
||||
global complete_code_percent: 76.40339 -> 76.40339
|
||||
global matched_data_percent: 99.99410 -> 99.99410
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
review note: include/iplMemoryCardLib.h: volatile object declaration (orchestrator checks the target really re-reads it) (+2 net), e.g. volatile u16 size; // 0x02
|
||||
GATE PASS
|
||||
94
tools/decomp-assist/rea-cdb.attempts.md
Normal file
94
tools/decomp-assist/rea-cdb.attempts.md
Normal file
@@ -0,0 +1,94 @@
|
||||
# REA CDB source conversion, 2026-10-05
|
||||
|
||||
Baseline: `9d40859ee8f4ee37dc692e444727d17367bfcbeb`.
|
||||
REA: `coah80/rea` commit `d19af8526975e8380da733c4f7313f73ee6a1c74`.
|
||||
Ghidra 12.1.4, language `PowerPC:BE:32:Gekko_Broadway`.
|
||||
|
||||
## Filename validator, rejected
|
||||
|
||||
`CDBFSIsCDBFileOnSD`: REA confirmed eight hexadecimal characters, a dot,
|
||||
and three hexadecimal characters, with a bounded length check of 13.
|
||||
The existing C fallback compiled to 127/127 instructions with 20 register
|
||||
differences. The assembly body was restored; no filename source change is kept.
|
||||
|
||||
Compiled trials:
|
||||
|
||||
- advance-pointer: src 0x1fc base 0x1fc insns 127/127; diffs 33: [9, 11, 12, 13, 16, 18, 20, 27, 28, 29, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45].
|
||||
- afterlength: src 0x1fc base 0x1fc insns 127/127; diffs 27: [8, 9, 10, 11, 12, 13, 14, 16, 18, 20, 27, 28, 29, 35, 37, 39, 46, 47, 48, 55].
|
||||
- before: src 0x204 base 0x1fc insns 129/127; --- replace mine 5:8 base 5:6.
|
||||
- char-local: src 0x204 base 0x1fc insns 129/127; --- replace mine 8:10 base 8:10.
|
||||
- early-length: src 0x1fc base 0x1fc insns 127/127; diffs 113: [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27].
|
||||
- index-base: src 0x200 base 0x1fc insns 128/127; --- replace mine 8:10 base 8:10.
|
||||
- index-expression: src 0x1fc base 0x1fc insns 127/127; diffs 20: [9, 11, 12, 13, 16, 18, 20, 27, 28, 29, 35, 37, 39, 46, 47, 48, 55, 73, 92, 111].
|
||||
- indices-first: src 0x1fc base 0x1fc insns 127/127; diffs 22: [9, 11, 12, 13, 14, 16, 18, 20, 27, 28, 29, 35, 37, 39, 46, 47, 48, 54, 55, 73].
|
||||
- indices-int: src 0x1f4 base 0x1fc insns 125/127; --- replace mine 8:10 base 8:10.
|
||||
- indices-short: src 0x1fc base 0x1fc insns 127/127; diffs 20: [9, 11, 12, 13, 16, 18, 20, 27, 28, 29, 35, 37, 39, 46, 47, 48, 55, 73, 92, 111].
|
||||
- indices-signed-char: src 0x1fc base 0x1fc insns 127/127; diffs 20: [9, 11, 12, 13, 16, 18, 20, 27, 28, 29, 35, 37, 39, 46, 47, 48, 55, 73, 92, 111].
|
||||
- indices-unsigned-char: src 0x1fc base 0x1fc insns 127/127; diffs 20: [9, 11, 12, 13, 16, 18, 20, 27, 28, 29, 35, 37, 39, 46, 47, 48, 55, 73, 92, 111].
|
||||
- indices-unsigned-short: src 0x1fc base 0x1fc insns 127/127; diffs 20: [9, 11, 12, 13, 16, 18, 20, 27, 28, 29, 35, 37, 39, 46, 47, 48, 55, 73, 92, 111].
|
||||
- indices-unsigned: src 0x1f4 base 0x1fc insns 125/127; --- replace mine 8:10 base 8:10.
|
||||
- inside: src 0x1fc base 0x1fc insns 127/127; diffs 24: [9, 11, 12, 13, 16, 18, 20, 27, 28, 29, 35, 37, 39, 46, 47, 48, 55, 57, 62, 73].
|
||||
- local-int: src 0x1fc base 0x1fc insns 127/127; diffs 22: [9, 11, 12, 13, 14, 16, 18, 20, 27, 28, 29, 35, 37, 39, 46, 47, 48, 54, 55, 73].
|
||||
- outer-decls-4: src 0x1fc base 0x1fc insns 127/127; diffs 20: [9, 11, 12, 13, 16, 18, 20, 27, 28, 29, 35, 37, 39, 46, 47, 48, 55, 73, 92, 111].
|
||||
- outer-decls-5: src 0x1fc base 0x1fc insns 127/127; diffs 22: [9, 11, 12, 13, 14, 16, 18, 20, 27, 28, 29, 35, 37, 39, 46, 47, 48, 54, 55, 73].
|
||||
- pointer-after-indices: src 0x1fc base 0x1fc insns 127/127; diffs 20: [9, 11, 12, 13, 16, 18, 20, 27, 28, 29, 35, 37, 39, 46, 47, 48, 55, 73, 92, 111].
|
||||
- pointer-before-call: src 0x204 base 0x1fc insns 129/127; --- delete mine 6:8 base 6:6.
|
||||
- pointer-const: src 0x1fc base 0x1fc insns 127/127; diffs 20: [9, 11, 12, 13, 16, 18, 20, 27, 28, 29, 35, 37, 39, 46, 47, 48, 55, 73, 92, 111].
|
||||
- pointer-loop-init: src 0x1fc base 0x1fc insns 127/127; diffs 20: [9, 11, 12, 13, 16, 18, 20, 27, 28, 29, 35, 37, 39, 46, 47, 48, 55, 73, 92, 111].
|
||||
- pointer-subscript: src 0x1fc base 0x1fc insns 127/127; diffs 20: [9, 11, 12, 13, 16, 18, 20, 27, 28, 29, 35, 37, 39, 46, 47, 48, 55, 73, 92, 111].
|
||||
- positive-condition: src 0x1fc base 0x1fc insns 127/127; diffs 20: [9, 11, 12, 13, 16, 18, 20, 27, 28, 29, 35, 37, 39, 46, 47, 48, 55, 73, 92, 111].
|
||||
- separate-checks: src 0x1fc base 0x1fc insns 127/127; diffs 20: [9, 11, 12, 13, 16, 18, 20, 27, 28, 29, 35, 37, 39, 46, 47, 48, 55, 73, 92, 111].
|
||||
- separate-index: src 0x1fc base 0x1fc insns 127/127; diffs 20: [9, 11, 12, 13, 16, 18, 20, 27, 28, 29, 35, 37, 39, 46, 47, 48, 55, 73, 92, 111].
|
||||
- unrolled-0: src 0x1f4 base 0x1fc insns 125/127; --- replace mine 8:10 base 8:10.
|
||||
- unrolled-1: src 0x1f4 base 0x1fc insns 125/127; --- replace mine 8:10 base 8:10.
|
||||
|
||||
## Search callback, exact candidate
|
||||
|
||||
REA imported the original CDBDatabase object, listed its functions, and
|
||||
exported `CDBDatabaseSearchCallCallback` assembly and pseudocode.
|
||||
The input SHA-256 is `336938cc4483cf2cd8e1c0a9e188fc567f09c0a4a4911b10fdc4e173d4b02605`.
|
||||
|
||||
Used existing typed database state, search conditions, and record fields.
|
||||
Corrected the local `CDBRecordOpenReadOnly` declaration to return `CDBErr`.
|
||||
Kept the success block nested under `result == CDB_ERROR_OK`, with the error
|
||||
return in its else block. This preserves the target's extra branch that the
|
||||
prior early-return trials in `asm-conversions.attempts.md` did not reproduce.
|
||||
|
||||
First compiled candidate: 61/61 instructions, 244/244 bytes, ctxdiff zero.
|
||||
String pool: identical, seven entries. This replaces an existing matching
|
||||
assembly body; it does not increase the already-counted exact function total.
|
||||
|
||||
REA evidence remains locally in `build/rea-cdbcallback/elf.json` and `elf.c`.
|
||||
The verifier command was:
|
||||
|
||||
```
|
||||
node /mnt/drive2/projects/rea-wii/scripts/verify-wii-powerpc.mjs \
|
||||
build/43U/obj/libs/RevoEX/src/cdb/CDBDatabase.o \
|
||||
CDBDatabaseSearchCallCallback build/rea-cdbcallback
|
||||
```
|
||||
|
||||
## Full validation
|
||||
|
||||
```
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] pool: IDENTICAL
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] objdiff: code 12152/12152 data 312/312 functions 33/33 fuzzy 100.0000 linked code 12152
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] instruction-exact functions: 33/33
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] section .data size 312 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] section .text size 12152 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBDatabase] baseline: code 12152/12152 data 312 functions 33 fuzzy 100.0000
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 92.73726 -> 92.73726
|
||||
global fuzzy_match_percent: 99.78007 -> 99.78007
|
||||
global complete_code_percent: 76.40339 -> 76.40339
|
||||
global matched_data_percent: 99.99410 -> 99.99410
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
GATE PASS
|
||||
```
|
||||
|
||||
The final completion checker still fails for the incomplete overall project.
|
||||
After this candidate was exact, a read-only check found the separate `data-d2`
|
||||
worker had independently converted this callback too. The draft PR notes
|
||||
this overlap so the reviewer can choose one implementation.
|
||||
Reference in New Issue
Block a user