Compare commits
1 Commits
main
...
agent/w092
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
111b4857f7 |
@@ -899,8 +899,8 @@ void AXSetVoiceSrcRatio(AXVPB* vpb, float ratio) {
|
||||
|
||||
old = OSDisableInterrupts();
|
||||
r = 65536.0f * ratio;
|
||||
vpb->pb.src.ratioHi = ((u32)r >> 0x10);
|
||||
vpb->pb.src.ratioLo = ((u32)r);
|
||||
vpb->pb.src.ratioHi = (r >> 0x10);
|
||||
vpb->pb.src.ratioLo = r;
|
||||
vpb->sync |= AX_PBSYNC_SRC_RATIO;
|
||||
OSRestoreInterrupts(old);
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ void AXFXChorusExpCallback(AXFX_BUFFERUPDATE* update, AXFX_CHORUS_EXP* fx) {
|
||||
else if (position < 0) position += fx->delay.sizeFP;
|
||||
distance = position - fx->delay.lastPos;
|
||||
if ((s32)distance < 0) distance += fx->delay.sizeFP;
|
||||
whole = (u32)distance >> 16;
|
||||
whole = distance >> 16;
|
||||
fraction = distance & 0xFFFF;
|
||||
source = fx->delay.lastPos >> 16;
|
||||
history = fx->histIndex;
|
||||
|
||||
@@ -599,7 +599,7 @@ void *GKI_dequeue(BUFFER_Q *p_q)
|
||||
|
||||
GKI_enable();
|
||||
|
||||
return (BUFFER_HDR_T *)p_hdr + 1;
|
||||
return p_hdr + 1;
|
||||
}
|
||||
|
||||
void *GKI_remove_from_queue(BUFFER_Q *p_q, void *p_buf)
|
||||
|
||||
@@ -79,7 +79,7 @@ static s32 DoMount(s32 chan) {
|
||||
|
||||
card = &__CARDBlock[chan];
|
||||
if (card->mountStep == 0) {
|
||||
if (EXIGetID(chan, 0, &id) == 0) {
|
||||
if (!EXIGetID(chan, 0, &id)) {
|
||||
result = CARD_RESULT_NOCARD;
|
||||
} else if (IsCard(id)) {
|
||||
result = CARD_RESULT_READY;
|
||||
|
||||
@@ -107,7 +107,7 @@ CNTError contentOpenNAND(CNTHandleNAND* cntHandle, const char* path, CNTFileInfo
|
||||
return CNT_RESULT_INVALID;
|
||||
}
|
||||
|
||||
if (ARCFastOpen(&cntHandle->ArcHandle, entryNum, &arcFile) == FALSE) {
|
||||
if (!ARCFastOpen(&cntHandle->ArcHandle, entryNum, &arcFile)) {
|
||||
return CNT_RESULT_INVALID;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ s32 contentOpenDVD(CNTHandleDVD* cntHandle, const char* path, CNTFileInfoDVD* cn
|
||||
return CNT_RESULT_INVALID;
|
||||
}
|
||||
|
||||
if (DVDFastOpen(entryNum, &cntFileInfo->fileInfo) == FALSE) {
|
||||
if (!DVDFastOpen(entryNum, &cntFileInfo->fileInfo)) {
|
||||
return CNT_RESULT_INVALID;
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ CNTError contentFastOpenNAND(CNTHandleNAND* cntHandle, s32 entryNum, CNTFileInfo
|
||||
|
||||
ARCFileInfo arcFile;
|
||||
|
||||
if (ARCFastOpen(&cntHandle->ArcHandle, entryNum, &arcFile) == FALSE) {
|
||||
if (!ARCFastOpen(&cntHandle->ArcHandle, entryNum, &arcFile)) {
|
||||
return CNT_RESULT_INVALID;
|
||||
}
|
||||
|
||||
|
||||
@@ -102,8 +102,8 @@ void GXSetDispCopyFrame2Field(GXCopyMode mode) {
|
||||
}
|
||||
|
||||
void GXSetCopyClamp(GXFBClamp clamp) {
|
||||
u8 clmpT = (clamp & GX_CLAMP_TOP) == 1;
|
||||
u8 clmpB = (clamp & GX_CLAMP_BOTTOM) == 2;
|
||||
u8 clmpT = (clamp & GX_CLAMP_TOP) == GX_CLAMP_TOP;
|
||||
u8 clmpB = (clamp & GX_CLAMP_BOTTOM) == GX_CLAMP_BOTTOM;
|
||||
|
||||
SET_REG_FIELD(__GXData->cpDisp, 1, 0, clmpT);
|
||||
SET_REG_FIELD(__GXData->cpDisp, 1, 1, clmpB);
|
||||
@@ -315,7 +315,7 @@ void GXCopyDisp(void* dest, GXBool clear) {
|
||||
|
||||
changePeCtrl = FALSE;
|
||||
|
||||
if ((clear || (u32)GET_REG_FIELD(__GXData->peCtrl, 3, 0) == 3) && (u32)GET_REG_FIELD(__GXData->peCtrl, 1, 6) == 1) {
|
||||
if ((clear || (u32)GET_REG_FIELD(__GXData->peCtrl, 3, 0) == GX_PF_Z24) && (u32)GET_REG_FIELD(__GXData->peCtrl, 1, 6) == 1) {
|
||||
changePeCtrl = TRUE;
|
||||
tempPeCtrl = __GXData->peCtrl;
|
||||
SET_REG_FIELD(tempPeCtrl, 1, 6, 0);
|
||||
@@ -370,12 +370,12 @@ void GXCopyTex(void* dest, GXBool clear) {
|
||||
changePeCtrl = 0;
|
||||
tempPeCtrl = __GXData->peCtrl;
|
||||
|
||||
if (__GXData->cpTexZ && ((tempPeCtrl & 7) != 3)) {
|
||||
if (__GXData->cpTexZ && ((tempPeCtrl & 7) != GX_PF_Z24)) {
|
||||
changePeCtrl = 1;
|
||||
SET_REG_FIELD(tempPeCtrl, 3, 0, 3);
|
||||
SET_REG_FIELD(tempPeCtrl, 3, 0, GX_PF_Z24);
|
||||
}
|
||||
|
||||
if ((clear || ((u32)(tempPeCtrl & 7) == 3)) && ((u32)((tempPeCtrl >> 6) & 1) == 1)) {
|
||||
if ((clear || ((tempPeCtrl & 7) == GX_PF_Z24)) && (((tempPeCtrl >> 6) & 1) == 1)) {
|
||||
changePeCtrl = 1;
|
||||
SET_REG_FIELD(tempPeCtrl, 1, 6, 0);
|
||||
}
|
||||
|
||||
@@ -373,14 +373,14 @@ void __GXInitGX() {
|
||||
}
|
||||
|
||||
GXSetCopyClear(clear, 0xFFFFFF);
|
||||
GXSetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, 0x3C);
|
||||
GXSetTexCoordGen(GX_TEXCOORD1, GX_TG_MTX2x4, GX_TG_TEX1, 0x3C);
|
||||
GXSetTexCoordGen(GX_TEXCOORD2, GX_TG_MTX2x4, GX_TG_TEX2, 0x3C);
|
||||
GXSetTexCoordGen(GX_TEXCOORD3, GX_TG_MTX2x4, GX_TG_TEX3, 0x3C);
|
||||
GXSetTexCoordGen(GX_TEXCOORD4, GX_TG_MTX2x4, GX_TG_TEX4, 0x3C);
|
||||
GXSetTexCoordGen(GX_TEXCOORD5, GX_TG_MTX2x4, GX_TG_TEX5, 0x3C);
|
||||
GXSetTexCoordGen(GX_TEXCOORD6, GX_TG_MTX2x4, GX_TG_TEX6, 0x3C);
|
||||
GXSetTexCoordGen(GX_TEXCOORD7, GX_TG_MTX2x4, GX_TG_TEX7, 0x3C);
|
||||
GXSetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY);
|
||||
GXSetTexCoordGen(GX_TEXCOORD1, GX_TG_MTX2x4, GX_TG_TEX1, GX_IDENTITY);
|
||||
GXSetTexCoordGen(GX_TEXCOORD2, GX_TG_MTX2x4, GX_TG_TEX2, GX_IDENTITY);
|
||||
GXSetTexCoordGen(GX_TEXCOORD3, GX_TG_MTX2x4, GX_TG_TEX3, GX_IDENTITY);
|
||||
GXSetTexCoordGen(GX_TEXCOORD4, GX_TG_MTX2x4, GX_TG_TEX4, GX_IDENTITY);
|
||||
GXSetTexCoordGen(GX_TEXCOORD5, GX_TG_MTX2x4, GX_TG_TEX5, GX_IDENTITY);
|
||||
GXSetTexCoordGen(GX_TEXCOORD6, GX_TG_MTX2x4, GX_TG_TEX6, GX_IDENTITY);
|
||||
GXSetTexCoordGen(GX_TEXCOORD7, GX_TG_MTX2x4, GX_TG_TEX7, GX_IDENTITY);
|
||||
GXSetNumTexGens(1);
|
||||
GXClearVtxDesc();
|
||||
GXInvalidateVtxCache();
|
||||
@@ -395,14 +395,14 @@ void __GXInitGX() {
|
||||
|
||||
GXSetLineWidth(6, GX_TO_ZERO);
|
||||
GXSetPointSize(6, GX_TO_ZERO);
|
||||
GXEnableTexOffsets(GX_TEXCOORD0, 0, 0);
|
||||
GXEnableTexOffsets(GX_TEXCOORD1, 0, 0);
|
||||
GXEnableTexOffsets(GX_TEXCOORD2, 0, 0);
|
||||
GXEnableTexOffsets(GX_TEXCOORD3, 0, 0);
|
||||
GXEnableTexOffsets(GX_TEXCOORD4, 0, 0);
|
||||
GXEnableTexOffsets(GX_TEXCOORD5, 0, 0);
|
||||
GXEnableTexOffsets(GX_TEXCOORD6, 0, 0);
|
||||
GXEnableTexOffsets(GX_TEXCOORD7, 0, 0);
|
||||
GXEnableTexOffsets(GX_TEXCOORD0, GX_FALSE, GX_FALSE);
|
||||
GXEnableTexOffsets(GX_TEXCOORD1, GX_FALSE, GX_FALSE);
|
||||
GXEnableTexOffsets(GX_TEXCOORD2, GX_FALSE, GX_FALSE);
|
||||
GXEnableTexOffsets(GX_TEXCOORD3, GX_FALSE, GX_FALSE);
|
||||
GXEnableTexOffsets(GX_TEXCOORD4, GX_FALSE, GX_FALSE);
|
||||
GXEnableTexOffsets(GX_TEXCOORD5, GX_FALSE, GX_FALSE);
|
||||
GXEnableTexOffsets(GX_TEXCOORD6, GX_FALSE, GX_FALSE);
|
||||
GXEnableTexOffsets(GX_TEXCOORD7, GX_FALSE, GX_FALSE);
|
||||
identity_mtx[0][0] = 1.0f;
|
||||
identity_mtx[0][1] = 0.0f;
|
||||
identity_mtx[0][2] = 0.0f;
|
||||
@@ -436,10 +436,10 @@ void __GXInitGX() {
|
||||
GXSetChanAmbColor(GX_COLOR1A1, black);
|
||||
GXSetChanMatColor(GX_COLOR1A1, white);
|
||||
GXInvalidateTexAll();
|
||||
GXSetTexRegionCallback((GXTexRegionCallback)__GXDefaultTexRegionCallback);
|
||||
GXSetTexRegionCallback(__GXDefaultTexRegionCallback);
|
||||
GXSetTlutRegionCallback(__GXDefaultTlutRegionCallback);
|
||||
|
||||
GXInitTexObj(&tex_obj, DefaultTexData, 4, 4, GX_TF_IA8, GX_CLAMP, GX_CLAMP, 0);
|
||||
GXInitTexObj(&tex_obj, DefaultTexData, 4, 4, GX_TF_IA8, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
GXLoadTexObj(&tex_obj, GX_TEXMAP0);
|
||||
GXLoadTexObj(&tex_obj, GX_TEXMAP1);
|
||||
GXLoadTexObj(&tex_obj, GX_TEXMAP2);
|
||||
|
||||
@@ -23,7 +23,7 @@ static u8 GX2HWFiltConv[6] = {0x00, 0x04, 0x01, 0x05, 0x02, 0x06};
|
||||
static void __GXGetTexTileShift(GXTexFmt fmt, u32* rowTileS, u32* colTileS) {
|
||||
switch (fmt) {
|
||||
case GX_TF_I4:
|
||||
case 0x8:
|
||||
case GX_TF_C4:
|
||||
case GX_TF_CMPR:
|
||||
case GX_CTF_R4:
|
||||
case GX_CTF_Z4: {
|
||||
@@ -33,7 +33,7 @@ static void __GXGetTexTileShift(GXTexFmt fmt, u32* rowTileS, u32* colTileS) {
|
||||
}
|
||||
case GX_TF_I8:
|
||||
case GX_TF_IA4:
|
||||
case 0x9:
|
||||
case GX_TF_C8:
|
||||
case GX_TF_Z8:
|
||||
case GX_CTF_RA4:
|
||||
case GX_TF_A8:
|
||||
@@ -50,7 +50,7 @@ static void __GXGetTexTileShift(GXTexFmt fmt, u32* rowTileS, u32* colTileS) {
|
||||
case GX_TF_RGB565:
|
||||
case GX_TF_RGB5A3:
|
||||
case GX_TF_RGBA8:
|
||||
case 0xA:
|
||||
case GX_TF_C14X2:
|
||||
case GX_TF_Z16:
|
||||
case GX_TF_Z24X8:
|
||||
case GX_CTF_RA8:
|
||||
@@ -141,7 +141,7 @@ void GXInitTexObj(const GXTexObj* obj, void* image_ptr, u16 width, u16 height, G
|
||||
u8 lmax;
|
||||
t->flags |= 1;
|
||||
|
||||
if (format == 8 || format == 9 || format == 10) {
|
||||
if (format == GX_TF_C4 || format == GX_TF_C8 || format == GX_TF_C14X2) {
|
||||
SET_REG_FIELD(t->mode0, 3, 5, 5);
|
||||
} else {
|
||||
SET_REG_FIELD(t->mode0, 3, 5, 6);
|
||||
@@ -163,12 +163,12 @@ void GXInitTexObj(const GXTexObj* obj, void* image_ptr, u16 width, u16 height, G
|
||||
SET_REG_FIELD(t->image0, 10, 0, width - 1);
|
||||
SET_REG_FIELD(t->image0, 10, 10, height - 1);
|
||||
SET_REG_FIELD(t->image0, 4, 20, format & 0xF);
|
||||
imageBase = (u32)((u32)image_ptr >> 5) & 0x01FFFFFF;
|
||||
imageBase = ((u32)image_ptr >> 5) & 0x01FFFFFF;
|
||||
SET_REG_FIELD(t->image3, 24, 0, imageBase);
|
||||
|
||||
switch (format & 0xF) {
|
||||
case GX_TF_I4:
|
||||
case 8: {
|
||||
case GX_TF_C4: {
|
||||
t->loadFmt = 1;
|
||||
rowT = 3;
|
||||
colT = 3;
|
||||
@@ -176,7 +176,7 @@ void GXInitTexObj(const GXTexObj* obj, void* image_ptr, u16 width, u16 height, G
|
||||
}
|
||||
case GX_TF_I8:
|
||||
case GX_TF_IA4:
|
||||
case 9: {
|
||||
case GX_TF_C8: {
|
||||
t->loadFmt = 2;
|
||||
rowT = 3;
|
||||
colT = 2;
|
||||
@@ -185,7 +185,7 @@ void GXInitTexObj(const GXTexObj* obj, void* image_ptr, u16 width, u16 height, G
|
||||
case GX_TF_IA8:
|
||||
case GX_TF_RGB565:
|
||||
case GX_TF_RGB5A3:
|
||||
case 10: {
|
||||
case GX_TF_C14X2: {
|
||||
t->loadFmt = 2;
|
||||
rowT = 2;
|
||||
colT = 2;
|
||||
@@ -510,8 +510,8 @@ void __SetSURegs(u32 tmap, u32 tcoord) NO_INLINE {
|
||||
SET_REG_FIELD(__GXData->suTs0[tcoord], 16, 0, w);
|
||||
SET_REG_FIELD(__GXData->suTs1[tcoord], 16, 0, h);
|
||||
|
||||
s_bias = GET_REG_FIELD(__GXData->tMode0[tmap], 2, 0) == 1;
|
||||
t_bias = GET_REG_FIELD(__GXData->tMode0[tmap], 2, 2) == 1;
|
||||
s_bias = GET_REG_FIELD(__GXData->tMode0[tmap], 2, 0) == GX_REPEAT;
|
||||
t_bias = GET_REG_FIELD(__GXData->tMode0[tmap], 2, 2) == GX_REPEAT;
|
||||
|
||||
SET_REG_FIELD(__GXData->suTs0[tcoord], 1, 16, s_bias);
|
||||
SET_REG_FIELD(__GXData->suTs1[tcoord], 1, 16, t_bias);
|
||||
@@ -566,13 +566,13 @@ void __GXSetSUTexRegs() {
|
||||
for (i = 0; i < nStages; i++) {
|
||||
ptref = &__GXData->tref[i / 2];
|
||||
map = __GXData->texmapId[i];
|
||||
tmap = map & 0xFFFFFEFF;
|
||||
tmap = map & ~GX_TEX_DISABLE;
|
||||
if (i & 1) {
|
||||
coord = GET_REG_FIELD(*ptref, 3, 15);
|
||||
} else {
|
||||
coord = GET_REG_FIELD(*ptref, 3, 3);
|
||||
}
|
||||
if ((tmap != 0xFF) && !(__GXData->tcsManEnab & (1 << coord)) && (__GXData->tevTcEnab & (1 << i))) {
|
||||
if ((tmap != GX_TEXMAP_NULL) && !(__GXData->tcsManEnab & (1 << coord)) && (__GXData->tevTcEnab & (1 << i))) {
|
||||
__SetSURegs(tmap, coord);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -765,7 +765,7 @@ IOSError IOS_IoctlvReboot(IOSFd fd, s32 cmd, u32 readCount, u32 writeCount, IOSI
|
||||
|
||||
if (__relnchFl) {
|
||||
OSRestoreInterrupts(inten);
|
||||
ret = -10;
|
||||
ret = IPC_RESULT_NOTREADY;
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,11 @@ static KPADInside inside_kpads[4];
|
||||
f32 initial_rotation_matrix[16];
|
||||
|
||||
const char* __KPADVersion = "<< RVL_SDK - KPAD \trelease build: Apr 20 2010 11:20:37 (0x4199_60831) >>";
|
||||
static u8 dpdModeTable[12] = {0, 1, 3, 2, 0, 4, 1, 5, 0, 7, 1, 8};
|
||||
static u8 dpdModeTable[12] = {
|
||||
WPAD_DPD_DISABLE, WPAD_FMT_CORE_BTN_ACC, WPAD_DPD_STANDARD, WPAD_FMT_CORE_BTN_ACC_DPD,
|
||||
WPAD_DPD_DISABLE, WPAD_FMT_FS_BTN_ACC, WPAD_DPD_BASIC, WPAD_FMT_FS_BTN_ACC_DPD,
|
||||
WPAD_DPD_DISABLE, WPAD_FMT_CLASSIC_BTN_ACC, WPAD_DPD_BASIC, WPAD_FMT_CLASSIC_BTN_ACC_DPD,
|
||||
};
|
||||
|
||||
static f32 idist_org = 1.0f;
|
||||
static Vec2 iaccXY_nrm_hori = {0.0f, -1.0f};
|
||||
@@ -170,17 +174,17 @@ static void* get_ring_buffer_by_kpad1_style(s32 chan, void* buffer, s32 style);
|
||||
|
||||
void* KPADGetWPADRingBuffer(s32 chan) {
|
||||
static u8 status[0x2A0];
|
||||
return get_ring_buffer_by_kpad1_style(chan, status, 0);
|
||||
return get_ring_buffer_by_kpad1_style(chan, status, WPAD_DEV_CORE);
|
||||
}
|
||||
|
||||
void* KPADGetWPADFSRingBuffer(s32 chan) {
|
||||
static u8 status[0x320];
|
||||
return get_ring_buffer_by_kpad1_style(chan, status, 1);
|
||||
return get_ring_buffer_by_kpad1_style(chan, status, WPAD_DEV_FREESTYLE);
|
||||
}
|
||||
|
||||
void* KPADGetWPADCLRingBuffer(s32 chan) {
|
||||
static u8 status[0x360];
|
||||
return get_ring_buffer_by_kpad1_style(chan, status, 2);
|
||||
return get_ring_buffer_by_kpad1_style(chan, status, WPAD_DEV_CLASSIC);
|
||||
}
|
||||
|
||||
static void* get_ring_buffer_by_kpad1_style(s32 chan, void* buffer, s32 style) {
|
||||
@@ -192,13 +196,13 @@ static void* get_ring_buffer_by_kpad1_style(s32 chan, void* buffer, s32 style) {
|
||||
s32 size;
|
||||
u32 type;
|
||||
switch (style) {
|
||||
case 0:
|
||||
case WPAD_DEV_CORE:
|
||||
size = 0x2A;
|
||||
goto process;
|
||||
case 1:
|
||||
case WPAD_DEV_FREESTYLE:
|
||||
size = 0x32;
|
||||
goto process;
|
||||
case 2:
|
||||
case WPAD_DEV_CLASSIC:
|
||||
size = 0x36;
|
||||
goto process;
|
||||
default:
|
||||
@@ -217,25 +221,25 @@ process:
|
||||
}
|
||||
type = kpad->ringData[index].device;
|
||||
switch (type) {
|
||||
case 0:
|
||||
case 0xFB:
|
||||
case 0xFC:
|
||||
case 0xFF:
|
||||
type = 0;
|
||||
case WPAD_DEV_CORE:
|
||||
case WPAD_DEV_FUTURE:
|
||||
case WPAD_DEV_NOT_SUPPORTED:
|
||||
case WPAD_DEV_UNKNOWN:
|
||||
type = WPAD_DEV_CORE;
|
||||
break;
|
||||
case 1:
|
||||
type = 1;
|
||||
case WPAD_DEV_FREESTYLE:
|
||||
type = WPAD_DEV_FREESTYLE;
|
||||
break;
|
||||
case 2:
|
||||
type = 2;
|
||||
case WPAD_DEV_CLASSIC:
|
||||
type = WPAD_DEV_CLASSIC;
|
||||
break;
|
||||
default:
|
||||
type = 0xFF;
|
||||
type = WPAD_DEV_UNKNOWN;
|
||||
break;
|
||||
}
|
||||
if (type == style) {
|
||||
if (WPADGetStatus() != 3) {
|
||||
kpad->ringData[index].error = 0xFC;
|
||||
kpad->ringData[index].error = WPAD_ERR_INVALID;
|
||||
}
|
||||
memcpy((u8*)buffer + latest * size, &kpad->ringData[index], size);
|
||||
}
|
||||
@@ -438,7 +442,7 @@ static void calc_button_repeat(KPADInside* kpad, u8 extension, s32 elapsed) {
|
||||
u16 extensionThreshold;
|
||||
u16 extensionCurrent;
|
||||
u32 extensionNext;
|
||||
if (extension == 2) {
|
||||
if (extension == WPAD_DEV_CLASSIC) {
|
||||
if (kpad->status.ex_status.cl.trig != 0 || kpad->status.ex_status.cl.release != 0) {
|
||||
kpad->repeatCurrent = 0;
|
||||
kpad->repeatCurrent2 = kpad->repeatDelay;
|
||||
@@ -594,12 +598,12 @@ static void read_kpad_acc(KPADInside* kpad, KPADSample* status) {
|
||||
Vec raw;
|
||||
Vec previous;
|
||||
switch (status->dataFormat) {
|
||||
case 1:
|
||||
case 2:
|
||||
case 4:
|
||||
case 5:
|
||||
case 7:
|
||||
case 8:
|
||||
case WPAD_FMT_CORE_BTN_ACC:
|
||||
case WPAD_FMT_CORE_BTN_ACC_DPD:
|
||||
case WPAD_FMT_FS_BTN_ACC:
|
||||
case WPAD_FMT_FS_BTN_ACC_DPD:
|
||||
case WPAD_FMT_CLASSIC_BTN_ACC:
|
||||
case WPAD_FMT_CLASSIC_BTN_ACC_DPD:
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
@@ -618,11 +622,11 @@ static void read_kpad_acc(KPADInside* kpad, KPADSample* status) {
|
||||
kpad->status.acc_speed = (f32)sqrt(previous.z * previous.z + (previous.x * previous.x + previous.y * previous.y));
|
||||
calc_acc_horizon(kpad);
|
||||
calc_acc_vertical(kpad);
|
||||
if (status->error == 0 && status->device == 1) {
|
||||
if (status->dataFormat == 4) {
|
||||
if (status->error == WPAD_ERR_OK && status->device == WPAD_DEV_FREESTYLE) {
|
||||
if (status->dataFormat == WPAD_FMT_FS_BTN_ACC) {
|
||||
goto read_extension_acceleration;
|
||||
}
|
||||
if (status->dataFormat == 5) {
|
||||
if (status->dataFormat == WPAD_FMT_FS_BTN_ACC_DPD) {
|
||||
goto read_extension_acceleration;
|
||||
}
|
||||
}
|
||||
@@ -1017,7 +1021,7 @@ static void read_kpad_dpd(KPADInside* kpad, KPADSample* status) {
|
||||
DPDObject* source;
|
||||
KPADDPDObject* object;
|
||||
s8 selected;
|
||||
if (format == 2 || format == 5 || format == 8) {
|
||||
if (format == WPAD_FMT_CORE_BTN_ACC_DPD || format == WPAD_FMT_FS_BTN_ACC_DPD || format == WPAD_FMT_CLASSIC_BTN_ACC_DPD) {
|
||||
source = &status->objects[3];
|
||||
object = kpad->dpdState.objects + 3;
|
||||
for (;;) {
|
||||
@@ -1255,7 +1259,7 @@ static void read_kpad_stick(KPADInside* kpad, KPADSample* status) {
|
||||
clamp = clamp_stick_circle;
|
||||
}
|
||||
device = status->device;
|
||||
if (device == 1) {
|
||||
if (device == WPAD_DEV_FREESTYLE) {
|
||||
format = status->dataFormat;
|
||||
if ((u8)(format + 0xFD) <= 2) {
|
||||
if (kpad->extensionResetPending != 0) {
|
||||
@@ -1271,7 +1275,7 @@ static void read_kpad_stick(KPADInside* kpad, KPADSample* status) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (device == 2) {
|
||||
if (device == WPAD_DEV_CLASSIC) {
|
||||
format = status->dataFormat;
|
||||
if ((u8)(format + 0xFA) > 2) {
|
||||
return;
|
||||
@@ -1343,7 +1347,7 @@ s32 KPADRead(s32 chan, KPADStatus* statuses, u32 count) {
|
||||
}
|
||||
kpad->samplingInProgress = 1;
|
||||
probe = WPADProbe(chan, 0);
|
||||
if (probe == -1 && kpad->dpdCallback != 0 && kpad->dpdCallbackFired != 0 && kpad->dpdCallbackPending == 0) {
|
||||
if (probe == WPAD_ERR_NO_CONTROLLER && kpad->dpdCallback != 0 && kpad->dpdCallbackFired != 0 && kpad->dpdCallbackPending == 0) {
|
||||
if (kpad->dpdCallback != 0 && kpad->dpdCallbackPending == 0) {
|
||||
kpad->dpdCallbackPending = 1;
|
||||
kpad->dpdCallback(chan, 1);
|
||||
@@ -1413,7 +1417,7 @@ s32 KPADRead(s32 chan, KPADStatus* statuses, u32 count) {
|
||||
remainingSamples = available;
|
||||
output = statuses + available;
|
||||
--output;
|
||||
device = 0xFD;
|
||||
device = WPAD_DEV_NOT_FOUND;
|
||||
extensionButtons = 0xFFFF;
|
||||
coreButtons = 0xFFFF;
|
||||
buttons = 0xFFFF;
|
||||
@@ -1421,20 +1425,20 @@ s32 KPADRead(s32 chan, KPADStatus* statuses, u32 count) {
|
||||
output--;
|
||||
sample = remainingSamples > 1 ? (KPADSample*)output : &latestSample;
|
||||
switch (sample->error) {
|
||||
case 0:
|
||||
case WPAD_ERR_OK:
|
||||
device = sample->device;
|
||||
if (device == 1) {
|
||||
if (device == WPAD_DEV_FREESTYLE) {
|
||||
coreButtons = sample->buttons;
|
||||
extensionButtons = 0;
|
||||
} else if (device == 2) {
|
||||
} else if (device == WPAD_DEV_CLASSIC) {
|
||||
extensionButtons = sample->extension.cl.buttons;
|
||||
coreButtons = 0;
|
||||
} else {
|
||||
extensionButtons = 0;
|
||||
coreButtons = 0;
|
||||
}
|
||||
case -2:
|
||||
case -7:
|
||||
case WPAD_ERR_COMMUNICATION_ERROR:
|
||||
case WPAD_ERR_CORRUPTED:
|
||||
buttons = sample->buttons;
|
||||
break;
|
||||
}
|
||||
@@ -1458,7 +1462,7 @@ s32 KPADRead(s32 chan, KPADStatus* statuses, u32 count) {
|
||||
kpad->status.hold = heldButtons;
|
||||
kpad->status.trig = changed & heldButtons;
|
||||
kpad->status.release = changed & previousButtons;
|
||||
if (device == 2) {
|
||||
if (device == WPAD_DEV_CLASSIC) {
|
||||
u16 previousExtensionButtons;
|
||||
previousExtensionButtons = kpad->status.ex_status.cl.hold;
|
||||
extensionButtons = (u16)extensionButtons;
|
||||
@@ -1481,9 +1485,9 @@ s32 KPADRead(s32 chan, KPADStatus* statuses, u32 count) {
|
||||
}
|
||||
kpad->status.data_format = sample->dataFormat;
|
||||
switch (sample->error) {
|
||||
case 0:
|
||||
case WPAD_ERR_OK:
|
||||
read_kpad_stick(kpad, sample);
|
||||
case -7:
|
||||
case WPAD_ERR_CORRUPTED:
|
||||
read_kpad_acc(kpad, sample);
|
||||
read_kpad_dpd(kpad, sample);
|
||||
break;
|
||||
@@ -1526,10 +1530,10 @@ void KPADInit(void) {
|
||||
do {
|
||||
kpad->dpdEnable = 1;
|
||||
referenceWidth = 1.0f;
|
||||
kpad->dpdFormat = 0;
|
||||
kpad->dpdFormat = WPAD_DPD_DISABLE;
|
||||
referenceHeight = 0.75f;
|
||||
kpad->status.dev_type = 0xFD;
|
||||
kpad->status.data_format = 0;
|
||||
kpad->status.dev_type = WPAD_DEV_NOT_FOUND;
|
||||
kpad->status.data_format = WPAD_FMT_CORE_BTN;
|
||||
kpad->referenceDistance = idist_org;
|
||||
kpad->accelNormal = iaccXY_nrm_hori;
|
||||
kpad->horizonTangent = isec_nrm_hori;
|
||||
@@ -1587,7 +1591,7 @@ void KPADInit(void) {
|
||||
i = 0;
|
||||
do {
|
||||
i++;
|
||||
kpad->ringData[i - 1].error = -1;
|
||||
kpad->ringData[i - 1].error = WPAD_ERR_NO_CONTROLLER;
|
||||
} while (i < 16);
|
||||
}
|
||||
chan++;
|
||||
@@ -1604,7 +1608,7 @@ void KPADInit(void) {
|
||||
kpad = &inside_kpads[3];
|
||||
do {
|
||||
if (WPADGetStatus() == 3) {
|
||||
WPADControlMotor(chan, 0);
|
||||
WPADControlMotor(chan, WPAD_MOTOR_STOP);
|
||||
}
|
||||
chan--;
|
||||
kpad->resetPending = 1;
|
||||
@@ -1654,7 +1658,7 @@ static void KPADiSamplingCallback(s32 chan) {
|
||||
f32 distance;
|
||||
f32 x;
|
||||
if (kpad->sensorBarPosition != 0) {
|
||||
if (WPADGetSensorBarPosition() == 1) {
|
||||
if (WPADGetSensorBarPosition() == WPAD_SENSOR_BAR_TOP) {
|
||||
sensor = 0.2f;
|
||||
} else {
|
||||
sensor = -0.2f;
|
||||
@@ -1683,16 +1687,16 @@ static void KPADiSamplingCallback(s32 chan) {
|
||||
kpad->sensorHeightPending = 0;
|
||||
}
|
||||
switch (device) {
|
||||
case 0:
|
||||
case 0xFB:
|
||||
case 0xFC:
|
||||
case 0xFF:
|
||||
case WPAD_DEV_CORE:
|
||||
case WPAD_DEV_FUTURE:
|
||||
case WPAD_DEV_NOT_SUPPORTED:
|
||||
case WPAD_DEV_UNKNOWN:
|
||||
tier = 0;
|
||||
break;
|
||||
case 1:
|
||||
case WPAD_DEV_FREESTYLE:
|
||||
tier = 2;
|
||||
break;
|
||||
case 2:
|
||||
case WPAD_DEV_CLASSIC:
|
||||
tier = 4;
|
||||
break;
|
||||
default:
|
||||
@@ -1701,7 +1705,7 @@ static void KPADiSamplingCallback(s32 chan) {
|
||||
if (kpad->dpdEnable != 0) {
|
||||
tier++;
|
||||
}
|
||||
enabled = WPADIsDpdEnabled(chan) != 0 ? kpad->dpdFormat : 0;
|
||||
enabled = WPADIsDpdEnabled(chan) ? kpad->dpdFormat : 0;
|
||||
tableIndex = tier * 2;
|
||||
if (enabled != dpdModeTable[tableIndex]) {
|
||||
if (kpad->dpdCallback != 0 && kpad->dpdCallbackFired == 0) {
|
||||
@@ -1711,7 +1715,7 @@ static void KPADiSamplingCallback(s32 chan) {
|
||||
}
|
||||
if (kpad->dpdCommandPending == 0) {
|
||||
kpad->dpdCommandPending = 1;
|
||||
if (WPADControlDpd(chan, dpdModeTable[tableIndex], KPADiControlDpdCallback) == 0) {
|
||||
if (WPADControlDpd(chan, dpdModeTable[tableIndex], KPADiControlDpdCallback) == WPAD_ERR_OK) {
|
||||
kpad->dpdFormat = dpdModeTable[tableIndex];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ BOOL __OSCheckMutexes(OSThread* thread) {
|
||||
if (mutex->thread != thread) {
|
||||
return FALSE;
|
||||
}
|
||||
if (__OSCheckMutex(mutex) == FALSE) {
|
||||
if (!__OSCheckMutex(mutex)) {
|
||||
return FALSE;
|
||||
}
|
||||
mutex = mutex->link.next;
|
||||
|
||||
@@ -117,7 +117,7 @@ BOOL __OSWriteExpiredFlag() {
|
||||
goto close;
|
||||
}
|
||||
|
||||
ret = NANDPrivateOpen("/shared2/expired", &nInfo, 2);
|
||||
ret = NANDPrivateOpen("/shared2/expired", &nInfo, NAND_ACCESS_WRITE);
|
||||
|
||||
if (ret != NAND_RESULT_OK) {
|
||||
goto close;
|
||||
|
||||
@@ -41,7 +41,7 @@ BOOL __OSWriteStateFlags(OSStateFlags* flags) {
|
||||
memcpy(&StateFlags, flags, sizeof(StateFlags));
|
||||
StateFlags.checkSum = checkSum(&StateFlags);
|
||||
|
||||
ret = NANDOpen(OS_STATE_FLAGS_NAND_PATH, &fileInfo, 2);
|
||||
ret = NANDOpen(OS_STATE_FLAGS_NAND_PATH, &fileInfo, NAND_ACCESS_WRITE);
|
||||
|
||||
if (ret == NAND_RESULT_OK) {
|
||||
ret = NANDWrite(&fileInfo, &StateFlags, sizeof(StateFlags));
|
||||
@@ -67,7 +67,7 @@ BOOL __OSReadStateFlags(OSStateFlags* flags) {
|
||||
NANDFileInfo fileInfo;
|
||||
s32 ret;
|
||||
|
||||
ret = NANDOpen(OS_STATE_FLAGS_NAND_PATH, &fileInfo, 1);
|
||||
ret = NANDOpen(OS_STATE_FLAGS_NAND_PATH, &fileInfo, NAND_ACCESS_READ);
|
||||
|
||||
if (ret == NAND_RESULT_OK) {
|
||||
ret = NANDRead(&fileInfo, &StateFlags, sizeof(OSStateFlags));
|
||||
|
||||
@@ -183,7 +183,7 @@ BOOL __OSSetVIForceDimming(BOOL enable, u32 shiftY, u32 shiftX) {
|
||||
BOOL enabled;
|
||||
|
||||
if (!StmReady) {
|
||||
return -10;
|
||||
return IPC_RESULT_NOTREADY;
|
||||
}
|
||||
|
||||
enabled = OSDisableInterrupts();
|
||||
@@ -215,7 +215,7 @@ BOOL __OSSetVIForceDimming(BOOL enable, u32 shiftY, u32 shiftX) {
|
||||
|
||||
s32 __OSSetIdleLEDMode(u32 mode) {
|
||||
if (!StmReady) {
|
||||
return -6;
|
||||
return IPC_RESULT_NOEXISTS;
|
||||
}
|
||||
StmImInBuf[0] = mode;
|
||||
return IOS_Ioctl(StmImDesc, STM_IOCTL_SET_IDLE_LED_MODE, StmImInBuf, sizeof(StmImInBuf), StmImOutBuf, sizeof(StmImOutBuf));
|
||||
@@ -228,7 +228,7 @@ s32 __OSUnRegisterStateEvent() {
|
||||
return 0;
|
||||
}
|
||||
if (!StmReady) {
|
||||
return -6;
|
||||
return IPC_RESULT_NOEXISTS;
|
||||
}
|
||||
|
||||
result = IOS_Ioctl(StmImDesc, STM_IOCTL_UNREG_STM_EVENT, StmImInBuf, sizeof(StmImInBuf), StmImOutBuf, sizeof(StmImOutBuf));
|
||||
|
||||
@@ -508,7 +508,7 @@ RSOHash RSOGetHash(const char* symbolname) {
|
||||
h = (h << 4) + *symbolname++;
|
||||
g = h & 0xF0000000;
|
||||
if (g != 0) {
|
||||
h ^= (u32)g >> 0x18U;
|
||||
h ^= g >> 0x18U;
|
||||
}
|
||||
h &= ~g;
|
||||
}
|
||||
@@ -552,7 +552,7 @@ BOOL RSOIsImportSymbolResolvedAll(const RSOObjectHeader* rso) {
|
||||
int s_max = RSOGetNumImportSymbols(&rso->impHeader);
|
||||
|
||||
for (i = 0; i < s_max; i++) {
|
||||
if (RSOIsImportSymbolResolved(rso, i) == 0) {
|
||||
if (!RSOIsImportSymbolResolved(rso, i)) {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@@ -885,8 +885,8 @@ static BOOL LinkList(void* i_newRso, void* i_bss, RSOFixedLevel i_fixed_level) {
|
||||
}
|
||||
|
||||
for (a_target = __RSOObjectInfoList.head; a_target; a_target = a_target->link.next) {
|
||||
RSOLink((RSOObjectHeader*)a_rsoInfo, (RSOObjectHeader*)a_target);
|
||||
RSOLink((RSOObjectHeader*)a_target, (RSOObjectHeader*)a_rsoInfo);
|
||||
RSOLink(a_rsoInfo, (RSOObjectHeader*)a_target);
|
||||
RSOLink((RSOObjectHeader*)a_target, a_rsoInfo);
|
||||
}
|
||||
ENQUEUE_INFO(&__RSOObjectInfoList, (RSOObjectInfo*)i_newRso, link);
|
||||
if (i_fixed_level >= RSO_FL_EXTERNAL) {
|
||||
@@ -1062,10 +1062,10 @@ int RSOGetFarCodeSize(RSOObjectHeader* i_rsoImp, const RSOObjectHeader* i_rsoExp
|
||||
RSOImportTable* impTab = (RSOImportTable*)imp->tableOffset;
|
||||
|
||||
for (i = 0; i < s_max; i++, impTab++) {
|
||||
impName = (char*)impTab->strOffset + (u32)imp->stringOffset;
|
||||
impName = (char*)impTab->strOffset + imp->stringOffset;
|
||||
if (impName != NULL) {
|
||||
addr = RSOFindExportSymbolAddr(i_rsoExp, impName);
|
||||
if (addr && checkNeedFarCode(i_rsoImp, (RSOImportTable*)impTab, i, (u32)addr) != 0) {
|
||||
if (addr && checkNeedFarCode(i_rsoImp, impTab, i, (u32)addr) != 0) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
@@ -1093,7 +1093,7 @@ int RSOLinkFar(RSOObjectHeader* i_rsoImp, const RSOObjectHeader* i_rsoExp, void*
|
||||
if (impName != NULL) {
|
||||
addr = RSOFindExportSymbolAddr(i_rsoExp, impName);
|
||||
if (addr) {
|
||||
ret = cnvFarCode(i_rsoImp, (RSOImportTable*)impTab, i, (u32)addr, (u32*)r_buff);
|
||||
ret = cnvFarCode(i_rsoImp, impTab, i, (u32)addr, r_buff);
|
||||
if (ret == 1) {
|
||||
count++;
|
||||
r_buff += (RSO_FAR_JUMP_SIZE / sizeof(*r_buff));
|
||||
@@ -1158,7 +1158,7 @@ int RSOLinkJump(RSOObjectHeader* i_rsoImp, const RSOObjectHeader* i_rsoExp, void
|
||||
a_idx = FindExportIndex(i_rsoExp, impName);
|
||||
if (a_idx >= 0) {
|
||||
addr = RSOGetExportSymbolAddr(i_rsoExp, a_idx);
|
||||
ret = cnvJumpCode(i_rsoImp, (RSOImportTable*)impTab, i, (u32)addr, &a_buff[a_idx * (RSO_FAR_JUMP_SIZE / (int)sizeof(*r_buff))]);
|
||||
ret = cnvJumpCode(i_rsoImp, impTab, i, (u32)addr, &a_buff[a_idx * (RSO_FAR_JUMP_SIZE / (int)sizeof(*r_buff))]);
|
||||
if (ret == 1) {
|
||||
count++;
|
||||
continue;
|
||||
|
||||
@@ -163,7 +163,7 @@ u32 SCCheckStatus() {
|
||||
SetBgJobStatus(SC_STATUS_BUSY);
|
||||
OSRestoreInterrupts(enabled);
|
||||
|
||||
if (ParseConfBuf(Control.fileBuffers[SC_CONF_FILE_SYSTEM], Control.fileSizes[SC_CONF_FILE_SYSTEM]) == 0) {
|
||||
if (ParseConfBuf(Control.fileBuffers[SC_CONF_FILE_SYSTEM], Control.fileSizes[SC_CONF_FILE_SYSTEM]) == SC_STATUS_OK) {
|
||||
enabled = OSDisableInterrupts();
|
||||
|
||||
if (__SCGetConfBuf() != Control.fileBuffers[SC_CONF_FILE_SYSTEM]) {
|
||||
|
||||
@@ -177,7 +177,7 @@ static void SITransferNext(s32 chan) {
|
||||
|
||||
if (packet->chan != SI_CHAN_BAD) {
|
||||
if (packet->fire <= __OSGetSystemTime()) {
|
||||
if (__SITransfer(packet->chan, packet->output, packet->outputBytes, packet->input, packet->inputBytes, packet->callback) != 0) {
|
||||
if (__SITransfer(packet->chan, packet->output, packet->outputBytes, packet->input, packet->inputBytes, packet->callback)) {
|
||||
OSCancelAlarm(&Alarm[chan]);
|
||||
packet->chan = SI_CHAN_BAD;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ s32 uhf_ker_create_sem(u32 initCount, int flags) {
|
||||
return -5;
|
||||
}
|
||||
|
||||
if (st_uhs_ker_sem_mng.usedCount == 12) {
|
||||
if (st_uhs_ker_sem_mng.usedCount == MAX_PUH_SEM) {
|
||||
uhf_ker_sem_inline_1();
|
||||
return -24;
|
||||
}
|
||||
@@ -61,7 +61,7 @@ s32 uhf_ker_create_sem(u32 initCount, int flags) {
|
||||
sem = &st_uhf_ker_sem[i];
|
||||
|
||||
for (k = (int)(1 - initCount); k > 0; k--) {
|
||||
OSWaitSemaphore((OSSemaphore*)sem);
|
||||
OSWaitSemaphore(sem);
|
||||
}
|
||||
|
||||
st_uhs_ker_sem_mng.entries[i].sem = sem;
|
||||
|
||||
@@ -275,12 +275,12 @@ static void getDevConfig(s32 chan, s32 result) {
|
||||
DEBUGPrint("x = %lf, y = %lf\n", x[i], y[i]);
|
||||
}
|
||||
|
||||
difaveX = (f32)((f32)difaveX / (f32)4.0f);
|
||||
difaveY = (f32)((f32)difaveY / (f32)4.0f);
|
||||
deltaX = (f32)atan((f32)((f32)((f32)126.5f + difaveX) / (f32)(1332.5f))) - (f32)atan((f32)((f32)126.5f / 1332.5f));
|
||||
deltaY = (f32)atan((f32)((f32)((f32)93.0f + difaveY) / (f32)(1337.4f))) - (f32)atan((f32)((f32)93.0f / 1337.4f));
|
||||
calibX[chan] = (f32)(-1.0f * (f32)tan(deltaX)) * 1332.5f;
|
||||
calibY[chan] = (f32)(-1.0f * (f32)tan(deltaY)) * 1337.4f;
|
||||
difaveX = difaveX / 4.0f;
|
||||
difaveY = difaveY / 4.0f;
|
||||
deltaX = (f32)atan((126.5f + difaveX) / 1332.5f) - (f32)atan(126.5f / 1332.5f);
|
||||
deltaY = (f32)atan((93.0f + difaveY) / 1337.4f) - (f32)atan(93.0f / 1337.4f);
|
||||
calibX[chan] = (-1.0f * (f32)tan(deltaX)) * 1332.5f;
|
||||
calibY[chan] = (-1.0f * (f32)tan(deltaY)) * 1337.4f;
|
||||
|
||||
DEBUGPrint("difaveX = %lf, difaveY = %lf\n", difaveX, difaveY);
|
||||
DEBUGPrint("deltaX = %lf, deltaY = %lf\n", deltaX, deltaY);
|
||||
@@ -294,19 +294,19 @@ static void getDevConfig(s32 chan, s32 result) {
|
||||
centerY[chan] += y[i];
|
||||
}
|
||||
|
||||
centerX[chan] = (f32)((f32)centerX[chan] / (f32)4.0f);
|
||||
centerY[chan] = (f32)((f32)centerY[chan] / (f32)4.0f);
|
||||
centerX[chan] = centerX[chan] / 4.0f;
|
||||
centerY[chan] = centerY[chan] / 4.0f;
|
||||
DEBUGPrint("centX = %lf, centY = %lf\n", centerX[chan], centerY[chan]);
|
||||
|
||||
rolag[chan] = 0.0f;
|
||||
for (i = 0; i < WPAD_DPD_MAX_OBJECTS; i++) {
|
||||
ag[i] = (f32)atan((f32)(y[i] - centerY[chan]) / (f32)(x[i] - centerX[chan]));
|
||||
ag_org[i] = (f32)atan((f32)((f32)(defaultDpdY[i]) - 383.5f) / (f32)((f32)(defaultDpdX[i]) - 511.5f));
|
||||
ag[i] = (f32)atan((y[i] - centerY[chan]) / (x[i] - centerX[chan]));
|
||||
ag_org[i] = (f32)atan(((f32)defaultDpdY[i] - 383.5f) / ((f32)defaultDpdX[i] - 511.5f));
|
||||
|
||||
rolag[chan] += ag[i] - ag_org[i];
|
||||
}
|
||||
|
||||
rolag[chan] = (f32)((f32)rolag[chan] / (f32)4.0f);
|
||||
rolag[chan] = rolag[chan] / 4.0f;
|
||||
DEBUGPrint("rolag = %lf\n", rolag[chan]);
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
@@ -857,7 +857,7 @@ static void __parse_dpd_data(s32 chan, WPADStatus** p_status, u8 fmt, u8* p_data
|
||||
f32 a;
|
||||
f32 b;
|
||||
|
||||
if (fmt == 3) {
|
||||
if (fmt == WPAD_DPD_STANDARD) {
|
||||
for (i = 0; i < WPAD_DPD_MAX_OBJECTS; i++) {
|
||||
if (i * 3 + 2 < len) {
|
||||
x = *(p_data + i * 3);
|
||||
@@ -882,7 +882,7 @@ static void __parse_dpd_data(s32 chan, WPADStatus** p_status, u8 fmt, u8* p_data
|
||||
(*p_status)->obj[i].traceId = i;
|
||||
}
|
||||
}
|
||||
} else if (fmt == 1) {
|
||||
} else if (fmt == WPAD_DPD_BASIC) {
|
||||
for (i = 0; i < WPAD_DPD_MAX_OBJECTS; i++) {
|
||||
x = *(p_data + i * 3 - (i / 2));
|
||||
y = *(p_data + i * 3 - (i / 2) + 1);
|
||||
@@ -912,9 +912,9 @@ static void __parse_dpd_data(s32 chan, WPADStatus** p_status, u8 fmt, u8* p_data
|
||||
a = (((f32)(*p_status)->obj[i].x) + calibX[chan] - centerX[chan]);
|
||||
b = (((f32)p_cur->obj[i].y) + calibY[chan] - centerY[chan]);
|
||||
p_cur->obj[i].x =
|
||||
(s16)((f32)((f32)a * (f32)cos(-1.0f * rolag[chan])) - (f32)((f32)b * (f32)sin(-1.0f * rolag[chan])) + centerX[chan]);
|
||||
(s16)((a * (f32)cos(-1.0f * rolag[chan])) - (b * (f32)sin(-1.0f * rolag[chan])) + centerX[chan]);
|
||||
(*p_status)->obj[i].y =
|
||||
(s16)((f32)((f32)a * (f32)sin(-1.0f * rolag[chan])) + (f32)((f32)b * (f32)cos(-1.0f * rolag[chan])) + centerY[chan]);
|
||||
(s16)((a * (f32)sin(-1.0f * rolag[chan])) + (b * (f32)cos(-1.0f * rolag[chan])) + centerY[chan]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1327,12 +1327,12 @@ CDBErr CDBDatabaseCleanUpEmptyDirectories(CDBDatabase* database, CDBRecordLocati
|
||||
return CDB_ERROR_26;
|
||||
}
|
||||
|
||||
if ((recordLocation & 1) != 0) {
|
||||
CDBFSFindFirstRoot(find, 1);
|
||||
while (CDBFindDataIsEnd(find) == 0) {
|
||||
if (CDBFindDataIsDirectory(find) != 0) {
|
||||
if (CDBFSIsYearDirName(CDBFindDataGetName(find)) != 0) {
|
||||
result = CDBDatabaseCleanUpEmptyDirectoriesMonth(CDBFindDataGetName(find), 1, NULL);
|
||||
if ((recordLocation & CDB_RECORD_LOCATION_NAND) != 0) {
|
||||
CDBFSFindFirstRoot(find, CDB_FS_LOCATION_NAND);
|
||||
while (!CDBFindDataIsEnd(find)) {
|
||||
if (CDBFindDataIsDirectory(find)) {
|
||||
if (CDBFSIsYearDirName(CDBFindDataGetName(find))) {
|
||||
result = CDBDatabaseCleanUpEmptyDirectoriesMonth(CDBFindDataGetName(find), CDB_FS_LOCATION_NAND, NULL);
|
||||
if (result != CDB_ERROR_OK) {
|
||||
return result;
|
||||
}
|
||||
@@ -1345,18 +1345,18 @@ CDBErr CDBDatabaseCleanUpEmptyDirectories(CDBDatabase* database, CDBRecordLocati
|
||||
|
||||
CDBVFSync();
|
||||
sdAvailable = 0;
|
||||
if (CDBFSSDIsMounted() != 0) {
|
||||
if (CDBFSSDIsMounted()) {
|
||||
if (CDBFSSDIsEjected() == 0) {
|
||||
sdAvailable = 1;
|
||||
}
|
||||
}
|
||||
if (sdAvailable != 0) {
|
||||
if ((recordLocation & 2) != 0) {
|
||||
CDBFSFindFirstRoot(find, 2);
|
||||
while (CDBFindDataIsEnd(find) == 0) {
|
||||
if (CDBFindDataIsDirectory(find) != 0) {
|
||||
if (CDBFSIsYearDirName(CDBFindDataGetName(find)) != 0) {
|
||||
result = CDBDatabaseCleanUpEmptyDirectoriesMonth(CDBFindDataGetName(find), 2, NULL);
|
||||
if ((recordLocation & CDB_RECORD_LOCATION_SD) != 0) {
|
||||
CDBFSFindFirstRoot(find, CDB_FS_LOCATION_SD);
|
||||
while (!CDBFindDataIsEnd(find)) {
|
||||
if (CDBFindDataIsDirectory(find)) {
|
||||
if (CDBFSIsYearDirName(CDBFindDataGetName(find))) {
|
||||
result = CDBDatabaseCleanUpEmptyDirectoriesMonth(CDBFindDataGetName(find), CDB_FS_LOCATION_SD, NULL);
|
||||
if (result != CDB_ERROR_OK) {
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ CDBErr CDBRecordAllocate(CDBRecord* record, int flag) {
|
||||
writeFlag = flag & CDB_RECORD_ALLOC_WRITE;
|
||||
for (i = 0, offset = 0; i < 5; i++, offset += 0x470) {
|
||||
if (CDBRecordInstanceIsUsed(s_recordPool + offset) &&
|
||||
CDBRecordKeyCompare(&record->key, &((CDBRecordFile*)(s_recordPool + offset))->key) == FALSE &&
|
||||
!CDBRecordKeyCompare(&record->key, &((CDBRecordFile*)(s_recordPool + offset))->key) &&
|
||||
record->key.location == ((CDBRecordFile*)(s_recordPool + offset))->key.location) {
|
||||
if ((((CDBRecordFile*)(s_recordPool + offset))->allocFlag & CDB_RECORD_ALLOC_WRITE) != 0) {
|
||||
CDBReportError("can't open the record as WRITE mode; another record discripter opened the record as WRITE mode\n");
|
||||
|
||||
@@ -130,14 +130,14 @@ NCDErr NCDSetIfConfig(NCDIfConfig* ifConfig) {
|
||||
result = ExecConfigCommand("NCDSetIfConfig", NULL, 4);
|
||||
}
|
||||
NWC24iUnlockSocket();
|
||||
} else if (lockErr == -0x16) {
|
||||
} else if (lockErr == NWC24_ERR_MUTEX) {
|
||||
result = -4;
|
||||
} else if (lockErr == -0x1d) {
|
||||
result = -8;
|
||||
} else if (lockErr == NWC24_ERR_INPROGRESS) {
|
||||
result = NCD_RESULT_INPROGRESS;
|
||||
} else {
|
||||
result = -2;
|
||||
}
|
||||
OSUnlockMutex((OSMutex*)&ncdMutex);
|
||||
OSUnlockMutex(&ncdMutex.mutex);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -217,14 +217,14 @@ NCDErr NCDSetIpConfig(NCDIpConfig* ipConfig) {
|
||||
err = ExecConfigCommand("NCDSetIpConfig", NULL, 4);
|
||||
}
|
||||
NWC24iUnlockSocket();
|
||||
} else if (err == -0x16) {
|
||||
} else if (err == NWC24_ERR_MUTEX) {
|
||||
err = -4;
|
||||
} else if (err == -0x1d) {
|
||||
err = -8;
|
||||
} else if (err == NWC24_ERR_INPROGRESS) {
|
||||
err = NCD_RESULT_INPROGRESS;
|
||||
} else {
|
||||
err = -2;
|
||||
}
|
||||
OSUnlockMutex((OSMutex*)&ncdMutex);
|
||||
OSUnlockMutex(&ncdMutex.mutex);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ NCDErr NCDGetCurrentIpConfig(NCDIpConfig* ipConfig) {
|
||||
}
|
||||
}
|
||||
|
||||
OSUnlockMutex((OSMutex*)&ncdMutex);
|
||||
OSUnlockMutex(&ncdMutex.mutex);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -281,8 +281,8 @@ NCDErr NCDGetLinkStatus(void) {
|
||||
LockRight();
|
||||
fd = IOS_Open("/dev/net/ncd/manage", 0);
|
||||
if (fd < 0) {
|
||||
if (fd == -6) {
|
||||
err = -8;
|
||||
if (fd == IPC_RESULT_NOEXISTS) {
|
||||
err = NCD_RESULT_INPROGRESS;
|
||||
} else {
|
||||
err = -2;
|
||||
}
|
||||
@@ -302,7 +302,7 @@ NCDErr NCDGetLinkStatus(void) {
|
||||
err = -1;
|
||||
}
|
||||
}
|
||||
OSUnlockMutex((OSMutex*)&ncdMutex);
|
||||
OSUnlockMutex(&ncdMutex.mutex);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -337,8 +337,8 @@ NCDErr NCDiGetWirelessMacAddress(u8* macAddr) {
|
||||
LockRight();
|
||||
fd = IOS_Open("/dev/net/ncd/manage", 0);
|
||||
if (fd < 0) {
|
||||
if (fd == -6) {
|
||||
err = -8;
|
||||
if (fd == IPC_RESULT_NOEXISTS) {
|
||||
err = NCD_RESULT_INPROGRESS;
|
||||
} else {
|
||||
err = -2;
|
||||
}
|
||||
@@ -359,7 +359,7 @@ NCDErr NCDiGetWirelessMacAddress(u8* macAddr) {
|
||||
err = -1;
|
||||
}
|
||||
}
|
||||
OSUnlockMutex((OSMutex*)&ncdMutex);
|
||||
OSUnlockMutex(&ncdMutex.mutex);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -374,8 +374,8 @@ NCDErr NCDLockWirelessDriver(void) {
|
||||
LockRight();
|
||||
fd = IOS_Open("/dev/net/ncd/manage", 0);
|
||||
if (fd < 0) {
|
||||
if (fd == -6) {
|
||||
err = -8;
|
||||
if (fd == IPC_RESULT_NOEXISTS) {
|
||||
err = NCD_RESULT_INPROGRESS;
|
||||
} else {
|
||||
err = -2;
|
||||
}
|
||||
@@ -395,7 +395,7 @@ NCDErr NCDLockWirelessDriver(void) {
|
||||
err = -1;
|
||||
}
|
||||
}
|
||||
OSUnlockMutex((OSMutex*)&ncdMutex);
|
||||
OSUnlockMutex(&ncdMutex.mutex);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -413,8 +413,8 @@ NCDErr NCDUnlockWirelessDriver(s32 id) {
|
||||
LockRight();
|
||||
fd = IOS_Open("/dev/net/ncd/manage", 0);
|
||||
if (fd < 0) {
|
||||
if (fd == -6) {
|
||||
err = -8;
|
||||
if (fd == IPC_RESULT_NOEXISTS) {
|
||||
err = NCD_RESULT_INPROGRESS;
|
||||
} else {
|
||||
err = -2;
|
||||
}
|
||||
@@ -433,7 +433,7 @@ NCDErr NCDUnlockWirelessDriver(s32 id) {
|
||||
err = -1;
|
||||
}
|
||||
}
|
||||
OSUnlockMutex((OSMutex*)&ncdMutex);
|
||||
OSUnlockMutex(&ncdMutex.mutex);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -452,14 +452,14 @@ s32 NCDRestoreConfig(void) {
|
||||
err = ExecConfigCommand("NCDRestoreConfig", NULL, 4);
|
||||
}
|
||||
NWC24iUnlockSocket();
|
||||
} else if (err == -0x16) {
|
||||
} else if (err == NWC24_ERR_MUTEX) {
|
||||
err = -4;
|
||||
} else if (err == -0x1d) {
|
||||
err = -8;
|
||||
} else if (err == NWC24_ERR_INPROGRESS) {
|
||||
err = NCD_RESULT_INPROGRESS;
|
||||
} else {
|
||||
err = -2;
|
||||
}
|
||||
OSUnlockMutex((OSMutex*)&ncdMutex);
|
||||
OSUnlockMutex(&ncdMutex.mutex);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -493,7 +493,7 @@ NCDErr NCDiGetEnabledConfigList(u32* list0, u32* list1, u32* list2) {
|
||||
}
|
||||
}
|
||||
}
|
||||
OSUnlockMutex((OSMutex*)&ncdMutex);
|
||||
OSUnlockMutex(&ncdMutex.mutex);
|
||||
|
||||
if (list0 != NULL) {
|
||||
*list0 = mask0;
|
||||
@@ -518,8 +518,8 @@ static NCDErr ExecConfigCommand(const char* name, NCDConfig* config, u32 command
|
||||
LockRight();
|
||||
fd = IOS_Open("/dev/net/ncd/manage", 0);
|
||||
if (fd < 0) {
|
||||
if (fd == -6) {
|
||||
err = -8;
|
||||
if (fd == IPC_RESULT_NOEXISTS) {
|
||||
err = NCD_RESULT_INPROGRESS;
|
||||
} else {
|
||||
err = -2;
|
||||
}
|
||||
@@ -557,7 +557,7 @@ static NCDErr ExecConfigCommand(const char* name, NCDConfig* config, u32 command
|
||||
err = -1;
|
||||
}
|
||||
}
|
||||
OSUnlockMutex((OSMutex*)&ncdMutex);
|
||||
OSUnlockMutex(&ncdMutex.mutex);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -568,7 +568,7 @@ static void LockRight(void) {
|
||||
enabled = OSDisableInterrupts();
|
||||
if (!(ncdInitialized & 1)) {
|
||||
OSRegisterVersion(__NCDVersion);
|
||||
OSInitMutex((OSMutex*)&ncdMutex);
|
||||
OSInitMutex(&ncdMutex.mutex);
|
||||
lo = (void*)OSRoundUp32B(IPCGetBufferLo());
|
||||
if ((u32)IPCGetBufferHi() - (u32)lo < NCD_IPC_HEAP_SIZE) {
|
||||
OSPanic("ncdsystem.c", 0x5B1, "Could not reserve heap for NCD library from IPC arena");
|
||||
@@ -581,5 +581,5 @@ static void LockRight(void) {
|
||||
ncdInitialized |= 1;
|
||||
}
|
||||
OSRestoreInterrupts(enabled);
|
||||
OSLockMutex((OSMutex*)&ncdMutex);
|
||||
OSLockMutex(&ncdMutex.mutex);
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@ void* NHTTPi_memclr(void*, u32);
|
||||
s32 NHTTPi_SocSSLConnect(NHTTPBgnEndInfo*, void*, NHTTPRequestInfo*, s32);
|
||||
|
||||
s32 NHTTPi_SocOpen(NHTTPRequestInfo* request) {
|
||||
s32 socket=__SOCreateSocket(2,1,0);
|
||||
s32 socket=__SOCreateSocket(SO_PF_INET,SO_SOCK_STREAM,0);
|
||||
s32 bufferSize=0;
|
||||
if(request) bufferSize=request->recvBufferSize;
|
||||
if(socket>=0 && bufferSize!=0) SOSetSockOpt(socket,0xffff,0x1002,&bufferSize,4);
|
||||
if(socket>=0 && bufferSize!=0) SOSetSockOpt(socket,SO_SOL_SOCKET,SO_SO_RCVBUF,&bufferSize,4);
|
||||
return socket;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ s32 NHTTPi_SocClose(void* mutex, NHTTPRequestInfo* request, s32 socket) {
|
||||
|
||||
s32 NHTTPi_SocConnect(NHTTPBgnEndInfo* info, void* mutex, NHTTPRequestInfo* request, s32 socket, u32 address, u32 port) {
|
||||
SOSockAddrIn destination;
|
||||
destination.len=8; destination.family=2;
|
||||
destination.len=8; destination.family=SO_PF_INET;
|
||||
destination.port=SOHtoNs(port);
|
||||
destination.addr.addr=address;
|
||||
if(SOConnect(socket,&destination)<0) {
|
||||
@@ -57,16 +57,16 @@ s32 NHTTPi_SocSSLConnect(NHTTPBgnEndInfo* info, void* mutex, NHTTPRequestInfo* r
|
||||
request->sslId=SSLNew(request->verifyOption,request->host);
|
||||
if(info->sslInit && request->sslInitParam) info->sslInit(request->sslId,request->sslInitParam);
|
||||
if(request->clientCertDefault==1) {
|
||||
if(SSLSetBuiltinClientCert(request->sslId,request->builtinClientCert)!=0) return -1005;
|
||||
if(SSLSetBuiltinClientCert(request->sslId,request->builtinClientCert)!=SSL_RESULT_OK) return -1005;
|
||||
} else if(request->clientCertData && request->privateKeyData) {
|
||||
if(SSLSetClientCert(request->sslId,request->clientCertData,request->clientCertSize,request->privateKeyData,request->privateKeySize)!=0) return -1005;
|
||||
if(SSLSetClientCert(request->sslId,request->clientCertData,request->clientCertSize,request->privateKeyData,request->privateKeySize)!=SSL_RESULT_OK) return -1005;
|
||||
}
|
||||
if(request->rootCAData) {
|
||||
if(SSLSetRootCA(request->sslId,request->rootCAData,request->rootCASize)!=0) return -1004;
|
||||
if(SSLSetRootCA(request->sslId,request->rootCAData,request->rootCASize)!=SSL_RESULT_OK) return -1004;
|
||||
} else {
|
||||
if(SSLSetBuiltinRootCA(request->sslId,request->builtinRootCA)!=0) return -1004;
|
||||
if(SSLSetBuiltinRootCA(request->sslId,request->builtinRootCA)!=SSL_RESULT_OK) return -1004;
|
||||
}
|
||||
if(SSLConnect(request->sslId,socket)<-1) return -1001;
|
||||
if(SSLConnect(request->sslId,socket)<SSL_RESULT_INVALID) return -1001;
|
||||
while(!complete) {
|
||||
NHTTPConnectionInfo* connection=NHTTPi_Request2Connection(mutex,request);
|
||||
s32 result=SSLDoHandshake(request->sslId);
|
||||
@@ -76,7 +76,7 @@ s32 NHTTPi_SocSSLConnect(NHTTPBgnEndInfo* info, void* mutex, NHTTPRequestInfo* r
|
||||
case -7:
|
||||
case -3:
|
||||
case -2: break;
|
||||
case 0: complete=TRUE; break;
|
||||
case SSL_RESULT_OK: complete=TRUE; break;
|
||||
default: return -1001;
|
||||
}
|
||||
}
|
||||
@@ -88,7 +88,7 @@ s32 NHTTPi_SocRecv_sub(NHTTPConnectionInfo* connection, s32 socket, void* data,
|
||||
s32 received=0;
|
||||
if(length>0) {
|
||||
if(connection->recvBufDataLen==0) {
|
||||
s32 result=SORecv(socket,buffer,32768,flags);
|
||||
s32 result=SORecv(socket,buffer,NHTTP_CONN_RECVBUF_SIZE,flags);
|
||||
if(result>0) {
|
||||
connection->recvBufDataLen=result;
|
||||
connection->recvBufOffset=0;
|
||||
@@ -99,7 +99,7 @@ s32 NHTTPi_SocRecv_sub(NHTTPConnectionInfo* connection, s32 socket, void* data,
|
||||
NHTTPi_memcpy(data,buffer+connection->recvBufOffset,length);
|
||||
connection->recvBufDataLen-=length;
|
||||
if(connection->recvBufDataLen==0) {
|
||||
NHTTPi_memclr(buffer,32768);
|
||||
NHTTPi_memclr(buffer,NHTTP_CONN_RECVBUF_SIZE);
|
||||
connection->recvBufOffset=0;
|
||||
} else connection->recvBufOffset+=length;
|
||||
received=length;
|
||||
@@ -119,7 +119,7 @@ s32 NHTTPi_SocRecv(void* mutex, NHTTPRequestInfo* request, s32 socket, void* dat
|
||||
if(result<0) {
|
||||
if(request->cancel) return -1002;
|
||||
if(request->sslId>0) { if(result==-7 || result==-6) return 0; }
|
||||
else if(result==-56) return 0;
|
||||
else if(result==SO_ENOTCONN) return 0;
|
||||
return -1001;
|
||||
}
|
||||
return result;
|
||||
@@ -176,7 +176,7 @@ s32 NHTTPi_SocSend(const NHTTPRequestInfo* request, s32 socket, const void* data
|
||||
if(result<0) {
|
||||
if(request->cancel) return -1002;
|
||||
if(request->sslId>0) { if(result==-7 || result==-6) return 0; }
|
||||
else if(result==-56) return 0;
|
||||
else if(result==SO_ENOTCONN) return 0;
|
||||
return -1001;
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -616,15 +616,15 @@ static void NHTTPi_ThreadReqEnd(NHTTPThreadContext* context)
|
||||
NHTTPConnectionInfo* connection = NHTTPi_Request2Connection(mutex, request);
|
||||
if (request->cancel)
|
||||
{
|
||||
context->error = 8;
|
||||
context->error = NHTTP_ERROR_CANCELED;
|
||||
context->keepAlive = FALSE;
|
||||
}
|
||||
if (!context->keepAlive && info->socket >= 0)
|
||||
{
|
||||
if (NHTTPi_SocClose(mutex, request, info->socket) < 0) context->error = 10;
|
||||
if (NHTTPi_SocClose(mutex, request, info->socket) < 0) context->error = NHTTP_ERROR_REVOLUTIONWIFI;
|
||||
info->socket = -1;
|
||||
}
|
||||
if (context->error == 0) response->isSuccess = TRUE;
|
||||
if (context->error == NHTTP_ERROR_NONE) response->isSuccess = TRUE;
|
||||
else
|
||||
{
|
||||
response->isSuccess = FALSE;
|
||||
@@ -679,8 +679,8 @@ static BOOL NHTTPi_ThreadHostAddrProc(NHTTPThreadContext* context)
|
||||
context->address = NHTTPi_resolveHostname(request, host);
|
||||
if (context->address == 0)
|
||||
{
|
||||
if (request->proxyEnabled) { context->error = 12; return FALSE; }
|
||||
context->error = 4;
|
||||
if (request->proxyEnabled) { context->error = NHTTP_ERROR_DNS_PROXY; return FALSE; }
|
||||
context->error = NHTTP_ERROR_DNS;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@@ -708,13 +708,13 @@ static BOOL NHTTPi_ThreadConnectProc(NHTTPThreadContext* context)
|
||||
if (info->socket >= 0 && NHTTPi_SocClose(mutex, request, info->socket) < 0)
|
||||
{
|
||||
info->socket = -1;
|
||||
context->error = 10;
|
||||
context->error = NHTTP_ERROR_REVOLUTIONWIFI;
|
||||
return FALSE;
|
||||
}
|
||||
info->socket = NHTTPi_SocOpen(request);
|
||||
if (info->socket < 0)
|
||||
{
|
||||
context->error = 3;
|
||||
context->error = NHTTP_ERROR_SOCKET;
|
||||
return FALSE;
|
||||
}
|
||||
NHTTPi_lockReqList(mutex);
|
||||
@@ -723,11 +723,11 @@ static BOOL NHTTPi_ThreadConnectProc(NHTTPThreadContext* context)
|
||||
if (request->cancel) return FALSE;
|
||||
if (NHTTPi_SocConnect(info, mutex, request, info->socket, context->address, context->port) < 0)
|
||||
{
|
||||
if (request->proxyEnabled) { context->error = 13; return FALSE; }
|
||||
if (request->proxyEnabled) { context->error = NHTTP_ERROR_CONNECT_PROXY; return FALSE; }
|
||||
else
|
||||
{
|
||||
if (NHTTPi_GetSSLError(info) != 0) { context->error = 14; return FALSE; }
|
||||
context->error = 5; return FALSE;
|
||||
if (NHTTPi_GetSSLError(info) != 0) { context->error = NHTTP_ERROR_SSL; return FALSE; }
|
||||
context->error = NHTTP_ERROR_CONNECT; return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -747,7 +747,7 @@ static s32 NHTTPi_ThreadProxyProc(NHTTPThreadContext* context)
|
||||
NHTTPReqInfo* requests = NHTTPi_GetReqInfoP(system);
|
||||
void* mutex = NHTTPi_GetMutexInfoP(system);
|
||||
NHTTPRequestInfo* request = requests->reqQueue->request;
|
||||
context->error = 10;
|
||||
context->error = NHTTP_ERROR_REVOLUTIONWIFI;
|
||||
context->sendLength = 0;
|
||||
if (request->secure && request->proxyEnabled)
|
||||
{
|
||||
@@ -760,15 +760,15 @@ static s32 NHTTPi_ThreadProxyProc(NHTTPThreadContext* context)
|
||||
{
|
||||
if (sslResult == -1004)
|
||||
{
|
||||
if (NHTTPi_GetSSLError(info) != 0) context->error = 16;
|
||||
if (NHTTPi_GetSSLError(info) != 0) context->error = NHTTP_ERROR_SSL_ROOTCA;
|
||||
return 1;
|
||||
}
|
||||
if (sslResult == -1005)
|
||||
{
|
||||
if (NHTTPi_GetSSLError(info) != 0) context->error = 17;
|
||||
if (NHTTPi_GetSSLError(info) != 0) context->error = NHTTP_ERROR_SSL_CLIENTCERT;
|
||||
return 1;
|
||||
}
|
||||
if (NHTTPi_GetSSLError(info) != 0) context->error = 14;
|
||||
if (NHTTPi_GetSSLError(info) != 0) context->error = NHTTP_ERROR_SSL;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -800,7 +800,7 @@ static s32 NHTTPi_ThreadSendProc(NHTTPThreadContext* context)
|
||||
char* buffer = NHTTPi_GetThreadInfoP(system)->commBuf;
|
||||
s32 urlLength = NHTTPi_strlen(request->url);
|
||||
s32 result = 0;
|
||||
context->error = 10;
|
||||
context->error = NHTTP_ERROR_REVOLUTIONWIFI;
|
||||
if (connection != NULL) connection->started = 2;
|
||||
context->sendLength = 0;
|
||||
switch (request->method)
|
||||
@@ -865,7 +865,7 @@ static s32 NHTTPi_ThreadSendProc(NHTTPThreadContext* context)
|
||||
}
|
||||
if (result != 0)
|
||||
{
|
||||
if (result == 3) context->error = 3;
|
||||
if (result == 3) context->error = NHTTP_ERROR_SOCKET;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -930,19 +930,19 @@ static BOOL NHTTPi_ThreadRecvHeaderProc(NHTTPThreadContext* context)
|
||||
block = NHTTPi_alloc(sizeof(NHTTPi_HDRBUFLIST), 4);
|
||||
response->hdrBufBlock_p = block;
|
||||
}
|
||||
if (block == NULL) { context->error = 1; return FALSE; }
|
||||
if (block == NULL) { context->error = NHTTP_ERROR_ALLOC; return FALSE; }
|
||||
block->next_p = NULL;
|
||||
}
|
||||
destination = (char*)block->block + index;
|
||||
received = NHTTPi_SocRecv(mutex, request, info->socket, destination, 1, 0);
|
||||
recent[context->recvLength & 3] = *destination;
|
||||
}
|
||||
if (received <= 0) { context->error = 10; return FALSE; }
|
||||
if (received <= 0) { context->error = NHTTP_ERROR_REVOLUTIONWIFI; return FALSE; }
|
||||
context->recvLength += received;
|
||||
if (NHTTPi_CheckHeaderEnd(recent, context->recvLength)) break;
|
||||
}
|
||||
response->headerLen = context->recvLength;
|
||||
if (response->headerLen == 0) { context->error = 7; return FALSE; }
|
||||
if (response->headerLen == 0) { context->error = NHTTP_ERROR_HTTPPARSE; return FALSE; }
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -956,20 +956,20 @@ static BOOL NHTTPi_ThreadParseHeaderProc(NHTTPThreadContext* context)
|
||||
s32 offset;
|
||||
char* buffer = thread->commBuf;
|
||||
s32 length;
|
||||
if (!NHTTPi_loadFromHdrRecvBuf(response, context->statusLine, 0, 14)) { context->error = 7; return FALSE; }
|
||||
if (NHTTPi_strnicmp(context->statusLine, "HTTP/", 5) != 0) { context->error = 7; return FALSE; }
|
||||
if (context->statusLine[8] != ' ') { context->error = 7; return FALSE; }
|
||||
if (!NHTTPi_loadFromHdrRecvBuf(response, context->statusLine, 0, 14)) { context->error = NHTTP_ERROR_HTTPPARSE; return FALSE; }
|
||||
if (NHTTPi_strnicmp(context->statusLine, "HTTP/", 5) != 0) { context->error = NHTTP_ERROR_HTTPPARSE; return FALSE; }
|
||||
if (context->statusLine[8] != ' ') { context->error = NHTTP_ERROR_HTTPPARSE; return FALSE; }
|
||||
response->httpStatus = NHTTPi_strToInt(context->statusLine + 9, 3);
|
||||
if (response->httpStatus < 0) { context->error = 7; return FALSE; }
|
||||
if (NHTTPi_findNextLineHdrRecvBuf(response, 12, response->headerLen, &lineLength, 0) < 0) { context->error = 7; return FALSE; }
|
||||
if (response->httpStatus < 0) { context->error = NHTTP_ERROR_HTTPPARSE; return FALSE; }
|
||||
if (NHTTPi_findNextLineHdrRecvBuf(response, 12, response->headerLen, &lineLength, 0) < 0) { context->error = NHTTP_ERROR_HTTPPARSE; return FALSE; }
|
||||
context->contentLength = NHTTPi_getHeaderValue(response, "Content-Length", &offset);
|
||||
if (context->contentLength == 0) { context->error = 0; return FALSE; }
|
||||
if (context->contentLength > 0x100) { context->error = 7; return FALSE; }
|
||||
if (context->contentLength == 0) { context->error = NHTTP_ERROR_NONE; return FALSE; }
|
||||
if (context->contentLength > 0x100) { context->error = NHTTP_ERROR_HTTPPARSE; return FALSE; }
|
||||
if (context->contentLength > 0)
|
||||
{
|
||||
if (!NHTTPi_loadFromHdrRecvBuf(response, buffer, offset, context->contentLength)) { context->error = 7; return FALSE; }
|
||||
if (!NHTTPi_loadFromHdrRecvBuf(response, buffer, offset, context->contentLength)) { context->error = NHTTP_ERROR_HTTPPARSE; return FALSE; }
|
||||
context->contentLength = NHTTPi_strToInt(buffer, context->contentLength);
|
||||
if (context->contentLength < 0) { context->error = 7; return FALSE; }
|
||||
if (context->contentLength < 0) { context->error = NHTTP_ERROR_HTTPPARSE; return FALSE; }
|
||||
response->contentLength = context->contentLength;
|
||||
}
|
||||
else response->contentLength = -1;
|
||||
@@ -979,7 +979,7 @@ static BOOL NHTTPi_ThreadParseHeaderProc(NHTTPThreadContext* context)
|
||||
length = NHTTPi_getHeaderValue(response, "Connection", &offset);
|
||||
if (length == 0)
|
||||
{
|
||||
context->error = 7;
|
||||
context->error = NHTTP_ERROR_HTTPPARSE;
|
||||
context->keepAlive = FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1000,7 +1000,7 @@ static BOOL NHTTPi_ThreadParseHeaderProc(NHTTPThreadContext* context)
|
||||
else context->keepAlive = FALSE;
|
||||
}
|
||||
context->chunked = NHTTPi_getHeaderValue(response, "Transfer-Encoding", &offset);
|
||||
if (context->chunked == 0) { context->error = 7; return FALSE; }
|
||||
if (context->chunked == 0) { context->error = NHTTP_ERROR_HTTPPARSE; return FALSE; }
|
||||
if (context->chunked > 0x100) context->chunked = FALSE;
|
||||
else
|
||||
{
|
||||
@@ -1010,7 +1010,7 @@ static BOOL NHTTPi_ThreadParseHeaderProc(NHTTPThreadContext* context)
|
||||
else chunked = FALSE;
|
||||
context->chunked = chunked;
|
||||
}
|
||||
context->error = 0;
|
||||
context->error = NHTTP_ERROR_NONE;
|
||||
response->isHeaderParse = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1055,34 +1055,34 @@ static BOOL NHTTPi_ThreadRecvBodyProc(NHTTPThreadContext* context)
|
||||
while (context->contentLength > 0)
|
||||
{
|
||||
s32 received;
|
||||
if (context->error != 6 && !NHTTPi_BufFull(mutex, response))
|
||||
if (context->error != NHTTP_ERROR_BUFFULL && !NHTTPi_BufFull(mutex, response))
|
||||
{
|
||||
context->error = 6;
|
||||
context->error = NHTTP_ERROR_BUFFULL;
|
||||
response->recvBuf_p = context->discard;
|
||||
response->recvBufLen = 0x200;
|
||||
}
|
||||
if (context->error == 6)
|
||||
if (context->error == NHTTP_ERROR_BUFFULL)
|
||||
received = NHTTPi_RecvBufN(mutex, request, info->socket, 0, context->contentLength, 0);
|
||||
else received = NHTTPi_RecvBufN(mutex, request, info->socket, response->bodyLen, context->contentLength, 0);
|
||||
if (received < 0) return FALSE;
|
||||
if (received == 0) break;
|
||||
if (context->error != 6)
|
||||
if (context->error != NHTTP_ERROR_BUFFULL)
|
||||
{
|
||||
response->bodyLen += received;
|
||||
response->totalBodyLen += received;
|
||||
}
|
||||
context->contentLength -= received;
|
||||
}
|
||||
if (context->error != 6)
|
||||
if (context->error != NHTTP_ERROR_BUFFULL)
|
||||
{
|
||||
if (context->contentLength != 0)
|
||||
context->error = NHTTPi_isRecvBufFull(response, response->bodyLen) ? 6 : 10;
|
||||
else context->error = 0;
|
||||
context->error = NHTTPi_isRecvBufFull(response, response->bodyLen) ? NHTTP_ERROR_BUFFULL : NHTTP_ERROR_REVOLUTIONWIFI;
|
||||
else context->error = NHTTP_ERROR_NONE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
context->error = 10;
|
||||
context->error = NHTTP_ERROR_REVOLUTIONWIFI;
|
||||
if (context->chunked)
|
||||
{
|
||||
remaining = -1;
|
||||
@@ -1118,19 +1118,19 @@ static BOOL NHTTPi_ThreadRecvBodyProc(NHTTPThreadContext* context)
|
||||
}
|
||||
++context->recvLength;
|
||||
}
|
||||
if (context->recvLength == 0x100) { context->error = 7; return FALSE; }
|
||||
if (context->recvLength == 0x100) { context->error = NHTTP_ERROR_HTTPPARSE; return FALSE; }
|
||||
if (remaining > 0)
|
||||
{
|
||||
NHTTPi_SetVirtualContentLength(connection, remaining);
|
||||
while (remaining > 0)
|
||||
{
|
||||
if (context->error != 6 && !NHTTPi_BufFull(mutex, response))
|
||||
if (context->error != NHTTP_ERROR_BUFFULL && !NHTTPi_BufFull(mutex, response))
|
||||
{
|
||||
context->error = 6;
|
||||
context->error = NHTTP_ERROR_BUFFULL;
|
||||
response->recvBuf_p = context->discard;
|
||||
response->recvBufLen = 0x200;
|
||||
}
|
||||
if (context->error == 6)
|
||||
if (context->error == NHTTP_ERROR_BUFFULL)
|
||||
received = NHTTPi_RecvBufN(mutex, request, info->socket, 0, remaining, 0);
|
||||
else received = NHTTPi_RecvBufN(mutex, request, info->socket, response->bodyLen, remaining, 0);
|
||||
if (received <= 0) return FALSE;
|
||||
@@ -1143,7 +1143,7 @@ static BOOL NHTTPi_ThreadRecvBodyProc(NHTTPThreadContext* context)
|
||||
else
|
||||
{
|
||||
NHTTPi_RecvChunkLine(mutex, request, info->socket);
|
||||
context->error = 0;
|
||||
context->error = NHTTP_ERROR_NONE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1155,16 +1155,16 @@ static BOOL NHTTPi_ThreadRecvBodyProc(NHTTPThreadContext* context)
|
||||
s32 received;
|
||||
if (!NHTTPi_BufFull(mutex, response))
|
||||
{
|
||||
context->error = 6;
|
||||
context->error = NHTTP_ERROR_BUFFULL;
|
||||
response->recvBuf_p = context->discard;
|
||||
response->recvBufLen = 0x200;
|
||||
}
|
||||
if (context->error == 6) received = NHTTPi_RecvBuf(mutex, request, info->socket, 0, 0);
|
||||
if (context->error == NHTTP_ERROR_BUFFULL) received = NHTTPi_RecvBuf(mutex, request, info->socket, 0, 0);
|
||||
else received = NHTTPi_RecvBuf(mutex, request, info->socket, response->bodyLen, 0);
|
||||
if (received < 0) return FALSE;
|
||||
if (received == 0)
|
||||
{
|
||||
if (context->error != 6) context->error = 0;
|
||||
if (context->error != NHTTP_ERROR_BUFFULL) context->error = NHTTP_ERROR_NONE;
|
||||
break;
|
||||
}
|
||||
response->bodyLen += received;
|
||||
@@ -1173,7 +1173,7 @@ static BOOL NHTTPi_ThreadRecvBodyProc(NHTTPThreadContext* context)
|
||||
}
|
||||
}
|
||||
connection = NHTTPi_Response2Connection(mutex, response);
|
||||
if (context->error == 0 && connection != NULL) NHTTPi_ReceivedCallback(mutex, connection);
|
||||
if (context->error == NHTTP_ERROR_NONE && connection != NULL) NHTTPi_ReceivedCallback(mutex, connection);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1193,7 +1193,7 @@ void NHTTPi_CommThreadProcMain(void* argument)
|
||||
context.chunked = FALSE;
|
||||
context.retry = FALSE;
|
||||
context.contentLength = 0;
|
||||
context.error = 0;
|
||||
context.error = NHTTP_ERROR_NONE;
|
||||
while (!info->stopping)
|
||||
{
|
||||
s32 result;
|
||||
|
||||
@@ -354,7 +354,7 @@ NWC24Err NWC24iInitMBox(void) {
|
||||
err = NWC24FOpen(&recvFile, path, NWC24_OPEN_NAND_R);
|
||||
if (err == NWC24_OK)
|
||||
err = NWC24FClose(&recvFile);
|
||||
if (err == -20 || recvResult != 0)
|
||||
if (err == NWC24_ERR_FILE_NOEXISTS || recvResult != 0)
|
||||
err = NWC24CreateVF(path, 0x700000);
|
||||
if (err != NWC24_OK)
|
||||
return err;
|
||||
@@ -365,7 +365,7 @@ NWC24Err NWC24iInitMBox(void) {
|
||||
if (sendStatus == NWC24_OK)
|
||||
sendStatus = NWC24FClose(&sendFile);
|
||||
err = sendStatus;
|
||||
if (sendStatus == -20 || sendResult != 0)
|
||||
if (sendStatus == NWC24_ERR_FILE_NOEXISTS || sendResult != 0)
|
||||
err = NWC24CreateVF(path, 0x200000);
|
||||
if (err != NWC24_OK)
|
||||
return err;
|
||||
|
||||
@@ -405,8 +405,9 @@ finish:
|
||||
}
|
||||
}
|
||||
report:
|
||||
if (result == NWC24_ERR_FULL || (result <= -16 && result >= -21) || result == -38 || result == -41 || result == -43 || result == -46)
|
||||
NWC24iSetErrorCode(result - 109300);
|
||||
if (result == NWC24_ERR_FULL || (result <= NWC24_ERR_FILE_OPEN && result >= NWC24_ERR_FILE_OTHER) ||
|
||||
result == NWC24_ERR_NAND_CORRUPT || result == NWC24_ERR_FILE_EXISTS || result == NWC24_ERR_INTERNAL_VF || result == NWC24_ERR_FILE_BROKEN)
|
||||
NWC24iSetErrorCode(NWC24iMakeCode(NWC24_ERRCODE_1093XX, result));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@ NWC24Err NWC24EnableLedNotification(BOOL enable) {
|
||||
if (enable) {
|
||||
do {
|
||||
status = SCCheckStatus();
|
||||
if (status == 2)
|
||||
if (status == SC_STATUS_FATAL)
|
||||
return NWC24_ERR_FATAL;
|
||||
} while (status == 1);
|
||||
} while (status == SC_STATUS_BUSY);
|
||||
SCGetIdleMode(&idleMode);
|
||||
led = idleMode.led;
|
||||
}
|
||||
@@ -40,13 +40,13 @@ NWC24Err NWC24iPrepareShutdown(void) {
|
||||
nwc24ShtRetryRest = 5;
|
||||
do {
|
||||
status = SCCheckStatus();
|
||||
if (status == 2)
|
||||
if (status == SC_STATUS_FATAL)
|
||||
goto ready;
|
||||
} while (status == 1);
|
||||
} while (status == SC_STATUS_BUSY);
|
||||
SCGetIdleMode(&idleMode);
|
||||
__OSSetIdleLEDMode(idleMode.led);
|
||||
ready:
|
||||
if (OSGetAppType() == 0x40)
|
||||
if (OSGetAppType() == OS_APP_TYPE_IPL)
|
||||
NWC24iSetScriptMode(1);
|
||||
return result;
|
||||
}
|
||||
@@ -91,14 +91,14 @@ NWC24Err NWC24DoDailyTasks(void* work) {
|
||||
return NWC24_ERR_LIB_OPENED;
|
||||
do {
|
||||
status = SCCheckStatus();
|
||||
if (status == 2)
|
||||
if (status == SC_STATUS_FATAL)
|
||||
return NWC24_ERR_FATAL;
|
||||
OSSleepTicks(OSMillisecondsToTicks((OSTime)100));
|
||||
} while (status != 0);
|
||||
} while (status != SC_STATUS_OK);
|
||||
if (!SCGetIdleMode(&idleMode))
|
||||
return NWC24_ERR_NOT_FOUND;
|
||||
restrictions = SCGetNetContentRestrictions() & 2;
|
||||
if (idleMode.standby == 0) {
|
||||
if (idleMode.standby == SC_IDLE_MODE_STANDBY_OFF) {
|
||||
if (restrictions == 0) {
|
||||
result = NWC24OpenLib(work);
|
||||
if (result >= 0) {
|
||||
|
||||
@@ -85,7 +85,7 @@ int SOCleanup(void);
|
||||
int SOiConcludeTempRm(const char* funcName, int result, int isTempRm);
|
||||
|
||||
int SOInit(SOLibraryConfig* config) {
|
||||
int result = 0;
|
||||
int result = SO_SUCCESS;
|
||||
int enabled;
|
||||
void* ptr;
|
||||
OSThread* cur;
|
||||
@@ -97,25 +97,25 @@ int SOInit(SOLibraryConfig* config) {
|
||||
soRegistered = 1;
|
||||
}
|
||||
if (!((int)soState == 0 || (int)soState < 0 || (int)soState >= 3)) {
|
||||
result = -7;
|
||||
result = SO_EALREADY;
|
||||
goto finish;
|
||||
}
|
||||
if (config == NULL || config->alloc == NULL || config->free == NULL) {
|
||||
result = -28;
|
||||
result = SO_EINVAL;
|
||||
} else {
|
||||
memset(&soWork, 0, sizeof(soWork));
|
||||
soWork.allocFunc = config->alloc;
|
||||
work = &soWork;
|
||||
work->freeFunc = config->free;
|
||||
work->allocCount = 0;
|
||||
work->rmState = -2;
|
||||
work->rmState = SO_INTERNAL_RM_STATE_CLOSED;
|
||||
work->rmFd = -1;
|
||||
ptr = SOiAlloc(0xB, 0x460);
|
||||
soWork.unk10 = (u32)ptr;
|
||||
if (ptr == NULL) {
|
||||
result = -49;
|
||||
result = SO_ENOMEM;
|
||||
} else {
|
||||
soState = 1;
|
||||
soState = SO_INTERNAL_STATE_READY;
|
||||
}
|
||||
}
|
||||
finish:
|
||||
@@ -167,24 +167,24 @@ int SOFinish(void) {
|
||||
int SOStartup(void) { return SOStartupEx(0x927c0); }
|
||||
|
||||
static int SOStartupErr(s32 errNwc24, s32 exErr) {
|
||||
s32 result = -0x1c;
|
||||
s32 result = SO_EINVAL;
|
||||
switch (errNwc24) {
|
||||
case 0:
|
||||
result = 0;
|
||||
case NWC24_OK:
|
||||
result = SO_SUCCESS;
|
||||
break;
|
||||
case -0x16:
|
||||
case -0xd:
|
||||
result = -0x30;
|
||||
case NWC24_ERR_MUTEX:
|
||||
case NWC24_ERR_NOT_FOUND:
|
||||
result = SO_ENOLINK;
|
||||
break;
|
||||
case -0x21:
|
||||
case -2:
|
||||
case NWC24_ERR_CONFIG_NETWORK:
|
||||
case NWC24_ERR_FAILED:
|
||||
result = exErr;
|
||||
break;
|
||||
case -1:
|
||||
result = -0x80000000;
|
||||
case NWC24_ERR_FATAL:
|
||||
result = SO_EFATAL;
|
||||
break;
|
||||
case -0x1d:
|
||||
result = -0x1a;
|
||||
case NWC24_ERR_INPROGRESS:
|
||||
result = SO_EINPROGRESS;
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
@@ -299,7 +299,7 @@ begin_startup:
|
||||
soState = SO_INTERNAL_STATE_ACTIVE;
|
||||
soWork.rmState = SO_INTERNAL_RM_STATE_OPENED;
|
||||
} else {
|
||||
soState = 1;
|
||||
soState = SO_INTERNAL_STATE_READY;
|
||||
if (result != SO_EFATAL)
|
||||
soWork.rmState = SO_INTERNAL_RM_STATE_CLOSED;
|
||||
}
|
||||
@@ -326,7 +326,7 @@ begin_startup:
|
||||
dhcpTimeOutTicks = 0;
|
||||
}
|
||||
if (limitTime != 0 && dhcpTimeOutTicks <= 0) {
|
||||
result = -76;
|
||||
result = SO_ETIMEDOUT;
|
||||
} else {
|
||||
result = SOiWaitForDHCPEx(
|
||||
(int)((dhcpTimeOutTicks) / ((__OSBusClock / 4) / 1000)));
|
||||
|
||||
@@ -105,7 +105,7 @@ int SOGetInterfaceOpt(void* interface, int level, int option, void* value, int*
|
||||
int* returnedLength;
|
||||
u8* reply;
|
||||
if ((result=SOiPrepareTempRm(NULL,&rm,&temporary))==0) {
|
||||
if(option==0x1001 || option==0x1002) result=-28;
|
||||
if(option==SO_CONFIG_FILTER_INPUT || option==SO_CONFIG_FILTER_OUTPUT) result=-28;
|
||||
else {
|
||||
size=(OptionLength(length)+127)&~31;
|
||||
request=SOiAlloc(12,size);
|
||||
@@ -146,7 +146,7 @@ int SOSetInterfaceOpt(void* interface, int level, int option, const void* value,
|
||||
InterfaceCommand* command;
|
||||
u8* reply;
|
||||
if ((result=SOiPrepareTempRm(NULL,&rm,&temporary))==0) {
|
||||
if(option==0x1001 || option==0x1002 || length<0) result=-28;
|
||||
if(option==SO_CONFIG_FILTER_INPUT || option==SO_CONFIG_FILTER_OUTPUT || length<0) result=-28;
|
||||
else {
|
||||
size=(length+95)&~31;
|
||||
request=SOiAlloc(12,size);
|
||||
|
||||
@@ -41,7 +41,7 @@ void dCommon_DevideBuff32(void* i_buf, u32 i_size, u32* i_1st_size_p, void* i_2n
|
||||
*(void**)i_2nd_pp = (u8*)i_buf + *i_1st_size_p;
|
||||
*i_2nd_size_p = i_size - 0x20;
|
||||
}
|
||||
*i_3rd_size_p = (u32)align;
|
||||
*i_3rd_size_p = align;
|
||||
*(void**)i_3rd_pp = (u8*)i_buf + i_size - align;
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ static dCommon_DriveInfo* _getDriveInfoP(PDM_DISK* p_disk) {
|
||||
u32 handleIdx;
|
||||
|
||||
handleIdx = dCommon_getHandleIdxFromDisk(p_disk);
|
||||
if ((u32)handleIdx < PF_DRIVE_COUNT) {
|
||||
if (handleIdx < PF_DRIVE_COUNT) {
|
||||
return &l_driveInfo[handleIdx];
|
||||
}
|
||||
return NULL;
|
||||
|
||||
@@ -157,22 +157,22 @@ s32 VFi_NandGetLength(NANDFileInfo* info, u32* length) {
|
||||
static u8 _MakePermitForRVL(u8 i_perm) {
|
||||
u8 perm = 0;
|
||||
if ((i_perm & 1) != 0) {
|
||||
perm |= 0x10;
|
||||
perm |= NAND_PERM_USER_READ;
|
||||
}
|
||||
if ((i_perm & 2) != 0) {
|
||||
perm |= 0x20;
|
||||
perm |= NAND_PERM_USER_WRITE;
|
||||
}
|
||||
if ((i_perm & 4) != 0) {
|
||||
perm |= 4;
|
||||
perm |= NAND_PERM_GROUP_READ;
|
||||
}
|
||||
if ((i_perm & 8) != 0) {
|
||||
perm |= 8;
|
||||
perm |= NAND_PERM_GROUP_WRITE;
|
||||
}
|
||||
if ((i_perm & 0x10) != 0) {
|
||||
perm |= 1;
|
||||
perm |= NAND_PERM_BOTH_READ;
|
||||
}
|
||||
if ((i_perm & 0x20) != 0) {
|
||||
perm |= 2;
|
||||
perm |= NAND_PERM_BOTH_WRITE;
|
||||
}
|
||||
return perm;
|
||||
}
|
||||
@@ -618,7 +618,7 @@ static s32 nanddrv_physical_read(u32 num_blocks, u8* buf, u32 block, u32 bps, u3
|
||||
return -20;
|
||||
}
|
||||
fileInfo_p = drive_p->file_p;
|
||||
if (dCommon_ReadDummyBPB(num_blocks, (u8*)buf, block, p_num_success, p_disk, &err, nanddrv_BuildUpBootSector, nanddrv_BuildUpFSInfoSector) == 0) {
|
||||
if (!dCommon_ReadDummyBPB(num_blocks, buf, block, p_num_success, p_disk, &err, nanddrv_BuildUpBootSector, nanddrv_BuildUpFSInfoSector)) {
|
||||
return err;
|
||||
}
|
||||
size = num_blocks * bps;
|
||||
@@ -628,7 +628,7 @@ static s32 nanddrv_physical_read(u32 num_blocks, u8* buf, u32 block, u32 bps, u3
|
||||
if ((offset + size) > fileSize) {
|
||||
return -22;
|
||||
}
|
||||
nandError = A32_NANDRead(fileInfo_p, (u8*)buf, size);
|
||||
nandError = A32_NANDRead(fileInfo_p, buf, size);
|
||||
if (nandError == size) {
|
||||
*p_num_success = num_blocks;
|
||||
return 0;
|
||||
@@ -653,7 +653,7 @@ static s32 nanddrv_physical_write(u32 num_blocks, const u8* buf, u32 block, u32
|
||||
return -20;
|
||||
}
|
||||
fileInfo_p = drive_p->file_p;
|
||||
if (dCommon_WriteDummyBPB(num_blocks, block, p_num_success, p_disk, &err) == 0) {
|
||||
if (!dCommon_WriteDummyBPB(num_blocks, block, p_num_success, p_disk, &err)) {
|
||||
return err;
|
||||
}
|
||||
size = num_blocks * bps;
|
||||
|
||||
@@ -124,7 +124,7 @@ static struct {
|
||||
static u32* _HandleIdxToEventFlagAddress(u32 i_handleIdx /* r3 */) {
|
||||
static u32 tmp;
|
||||
|
||||
if (i_handleIdx < 0x1AU) {
|
||||
if (i_handleIdx < PF_DRIVE_COUNT) {
|
||||
return (u32*)((u8*)l_event + (i_handleIdx << 5));
|
||||
}
|
||||
return &tmp;
|
||||
@@ -153,7 +153,7 @@ SDDevIntrCallback _EventCallBack(u32 status /* r25 */, u32* data /* r27 */) {
|
||||
(void)0;
|
||||
} else {
|
||||
handleIdx = _EventFlagAddressToHandleIdx(data);
|
||||
if ((u32)handleIdx < 0x1AU) {
|
||||
if (handleIdx < PF_DRIVE_COUNT) {
|
||||
handle_p = VFSysGetHandleP(handleIdx);
|
||||
if ((u32)(status & 2) == 2) {
|
||||
*data = 1;
|
||||
@@ -218,7 +218,7 @@ static s32 _ChkMediaInsertedAndNotifyPrfile(PDM_DISK* p_disk /* r27 */) {
|
||||
if ((drive_p == NULL) || (device_p == NULL)) {
|
||||
return 0;
|
||||
}
|
||||
dev_handle_p = &((VFSys_deviceSD*)device_p)->drive;
|
||||
dev_handle_p = &device_p->drive;
|
||||
IOSErr = ISD_GetDeviceStatus(dev_handle_p, &devStatus);
|
||||
if (IOSErr != 0) {
|
||||
dCommon_setLastDeviceErrorToDisk(p_disk, IOSErr);
|
||||
|
||||
439
tools/decomp-assist/rx33.cleanup.md
Normal file
439
tools/decomp-assist/rx33.cleanup.md
Normal file
@@ -0,0 +1,439 @@
|
||||
# rx33 expression cleanup
|
||||
|
||||
Baseline: `38ade13d6fb4320b5779d1e6df4b9250a018b7d8`, branch `agent/w1005/rx33`.
|
||||
|
||||
Scope: eligible RevoEX and RVL SDK C sources from the task. Other workers' files, shared headers, and original assembly bodies stay outside this cleanup.
|
||||
|
||||
Acceptance: every retained edit preserves the complete built object, objdiff function and section scores, string pools, and the 4.3U DOL SHA1 `26116613f624061ba99c8d1a299aaa6efa85670d`. The expression-cleanup task requires unchanged matching counts. Existing nonmatches are not matching assignments.
|
||||
|
||||
## Attempts
|
||||
|
||||
- Read repository instructions, current branch, clean status, SDK constants, and gate implementation. Started a fresh baseline build before editing.
|
||||
- ACCEPT `libs/RVL_SDK/src/gx/GXInit.c`: texture matrix and boolean constants. 17 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/gx/GXInit.c`: redundant texture callback cast. 1 casts; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/gx/GXTexture.c`: texture format and wrap constants. 10 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/gx/GXTexture.c`: redundant shifted address cast. 1 casts; complete object byte-identical to baseline.
|
||||
- REVERT `libs/RVL_SDK/src/gx/GXAttr.c`: normal count conditional. 1 control flow; object bytes changed or compile failed; restored preceding source.
|
||||
- REVERT `libs/RevoEX/src/so/SOCommon.c`: remove empty failure branch. 1 control flow; object bytes changed or compile failed; restored preceding source.
|
||||
- ACCEPT `libs/RevoEX/src/nhttp/NHTTP_thread.c`: named HTTP context errors. 50 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RevoEX/src/nhttp/NHTTP_socket_RVL.c`: socket constants and receive buffer size. 7 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RevoEX/src/so/SOOption.c`: interface filter option constants. 2 constants; complete object byte-identical to baseline.
|
||||
- REVERT `libs/RevoEX/src/so/SOOption.c`: direct interface length member. 1 member offsets; object bytes changed or compile failed; restored preceding source.
|
||||
- REVERT `libs/RevoEX/src/so/SOOption.c`: direct interface reply member. 1 member offsets; object bytes changed or compile failed; restored preceding source.
|
||||
- REVERT `libs/RevoEX/src/so/SOOption.c`: direct interface setting member. 1 member offsets; object bytes changed or compile failed; restored preceding source.
|
||||
- ACCEPT `libs/RVL_SDK/src/os/OSStateFlags.c`: NAND open access constants. 2 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/os/OSPlayTime.c`: NAND open write access. 1 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RevoEX/src/nwc24/NWC24MsgCommit.c`: message commit error constants. 6 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RevoEX/src/nwc24/NWC24MBoxCtrl.c`: mailbox missing file errors. 2 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/cnt/cnt.c`: BOOL file open checks. 3 control flow; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/card/CARDMount.c`: BOOL EXI device check. 1 control flow; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/os/OSMutex.c`: BOOL mutex check. 1 control flow; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RevoEX/src/so/SOCommon.c`: SOInit state and error constants. 7 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RevoEX/src/so/SOCommon.c`: startup error translation constants. 1 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RevoEX/src/so/SOCommon.c`: DHCP timeout constant. 1 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RevoEX/src/nwc24/NWC24System.c`: system status and app type constants. 8 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RevoEX/src/ncd/ncdsystem.c`: IPC and socket lock error constants. 19 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RevoEX/src/ncd/ncdsystem.c`: direct mutex member. 12 member offsets; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/gx/GXFrameBuf.c`: copy clamp and pixel format constants. 5 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/kpad/KPAD.c`: WPAD device and input format comparisons. 16 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/kpad/KPAD.c`: acceleration report format cases. 1 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/kpad/KPAD.c`: sample result cases. 2 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/kpad/KPAD.c`: device dispatch cases. 7 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/kpad/KPAD.c`: BOOL DPD enable check. 1 control flow; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/rso/RSOLink.c`: redundant hash and typed pointer casts. 8 casts; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/ax/AXVPB.c`: redundant sample ratio casts. 2 casts; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/usbcmn/puh_ker_sem.c`: redundant semaphore pointer cast. 1 casts; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RevoEX/src/vf/develop/d_common.c`: redundant alignment and drive index casts. 2 casts; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RevoEX/src/vf/develop/sd_drv.c`: redundant drive and handle casts. 2 casts; complete object byte-identical to baseline.
|
||||
- REVERT `libs/RVL_SDK/src/dvd/dvdfs.c`: redundant command block pointer cast. 1 casts; object bytes changed or compile failed; restored preceding source.
|
||||
- ACCEPT `libs/RVL_SDK/src/axfx/AXFXChorusExp.c`: redundant delay distance cast. 1 casts; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/bte/gki_buffer.c`: redundant queue header pointer cast. 1 casts; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/ipc/ipcclt.c`: reboot request not ready constant. 1 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/sc/scsystem.c`: configuration parse success constant. 1 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/os/OSStateTM.c`: STM IPC result constants. 3 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RevoEX/src/vf/develop/nand_drv.c`: NAND permission bit constants. 6 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/gx/GXTexture.c`: texture map disable flag. 1 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/wpad/WPADHIDParser.c`: redundant calibration average casts. 2 casts; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/wpad/WPADHIDParser.c`: redundant rotated coordinate operand casts. 4 casts; complete object byte-identical to baseline.
|
||||
- REVERT `libs/RevoEX/src/cdb/CDBDatabase.c`: BOOL directory scan checks. 6 control flow; object bytes changed or compile failed; restored preceding source.
|
||||
- ACCEPT `libs/RevoEX/src/cdb/CDBDatabase.c`: BOOL directory predicate checks. 2 control flow; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/usbcmn/puh_ker_sem.c`: semaphore capacity constant. 1 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RevoEX/src/vf/develop/sd_drv.c`: drive count constant. 2 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/wpad/WPADHIDParser.c`: DPD report format constants. 2 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/kpad/KPAD.c`: initial WPAD formats and errors. 7 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/kpad/KPAD.c`: DPD mode and report table constants. 1 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/kpad/KPAD.c`: ring buffer device style constants. 7 constants; complete object byte-identical to baseline.
|
||||
- REVERT `libs/RevoEX/src/so/SOCommon.c`: direct initialized state predicate. 1 control flow; object bytes changed or compile failed; restored preceding source.
|
||||
- ACCEPT `libs/RevoEX/src/cdb/CDBDatabase.c`: isolated BOOL end check. 2 control flow; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RevoEX/src/cdb/CDBDatabase.c`: isolated BOOL year check. 2 control flow; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RevoEX/src/cdb/CDBDatabase.c`: isolated BOOL mount check. 1 control flow; complete object byte-identical to baseline.
|
||||
- REVERT `libs/RevoEX/src/cdb/CDBDatabase.c`: isolated BOOL eject check. 1 control flow; object bytes changed or compile failed; restored preceding source.
|
||||
- ACCEPT `libs/RVL_SDK/src/wpad/WPADHIDParser.c`: redundant center and rotation average casts. 3 casts; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/wpad/WPADHIDParser.c`: redundant calibration angle casts. 4 casts; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/wpad/WPADHIDParser.c`: redundant calibration tangent product casts. 2 casts; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/wpad/WPADHIDParser.c`: redundant DPD angle difference casts. 2 casts; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/wpad/WPADHIDParser.c`: redundant rotated coordinate product casts. 4 casts; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RevoEX/src/vf/develop/nand_drv.c`: BOOL dummy BPB checks. 2 control flow; complete object byte-identical to baseline.
|
||||
- REVERT `libs/RevoEX/src/vf/develop/nand_drv.c`: redundant read buffer casts. 3 casts; object bytes changed or compile failed; restored preceding source.
|
||||
- ACCEPT `libs/RVL_SDK/src/rso/RSOLink.c`: BOOL import resolution check. 1 control flow; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RevoEX/src/cdb/CDBSystem.c`: BOOL record key comparison. 1 control flow; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/si/SIBios.c`: boolean transfer result check. 1 control flow; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RevoEX/src/cdb/CDBDatabase.c`: directory cleanup location constants. 6 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RevoEX/src/nhttp/NHTTP_socket_RVL.c`: SSL setup result constants. 6 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RevoEX/src/vf/develop/nand_drv.c`: redundant read-only path buffer casts. 2 casts; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/gx/GXFrameBuf.c`: depth-only copy pixel format field. 1 constants; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RVL_SDK/src/gx/GXFrameBuf.c`: redundant unsigned pixel control casts. 2 casts; complete object byte-identical to baseline.
|
||||
- ACCEPT `libs/RevoEX/src/nwc24/NWC24MsgCommit.c`: wrap named error condition. 1 formatting; complete object byte-identical to baseline.
|
||||
- REVERT `libs/RVL_SDK/src/dvd/dvd.c`: direct boot magic predicate. 1 control flow; object bytes changed or compile failed; restored preceding source.
|
||||
|
||||
## Audit coverage
|
||||
|
||||
- Scanned all 376 eligible C sources for named result and mode constants, redundant casts, empty condition branches, nested conditionals, BOOL call comparisons, and literal member offsets. Reviewed candidate types against current source and SDK headers.
|
||||
- Existing NAND, ES, and CARD errors already use named codes in their implementations. Kept ordinary negative-result range checks and internal command encodings without a documented enum.
|
||||
- Kept anonymous numeric placeholders such as `PF_ERR_19`, `CDB_ERROR_28`, and `NCD_RESULT_4`; substituting them would not explain the expression. Kept unlabelled WPAD button masks. The HOME definition and comment disagree, so no button-mask substitution relies on them.
|
||||
- OSFont compressed-data offsets have no existing matching header structure. CDB work-area offsets have no complete work structure, and the record pool stride differs from the public struct extent. No layout or shared-header changes were made.
|
||||
- The remaining ternary search hits are independent conditional arguments or the conventional CLAMP macro. The one nested normal-count ternary was compiled and rejected.
|
||||
- Skipped casts that remove const, change signedness or width, convert floating-point precision, or cross public/private object types. The rejected broad NAND buffer trial exposed a required const-removing cast in the write path; only the two same-type read-path casts were retained.
|
||||
- All original assembly bodies and excluded ownership paths are unchanged. The cleanup-specific byte-preservation rule takes precedence over the generic matching-round request for new matches and repeated matching attempts.
|
||||
|
||||
## Rejected trial evidence
|
||||
|
||||
- `libs/RVL_SDK/src/gx/GXAttr.c`, normal count conditional: changed `.text`, `.rela.text`, `.rela.data`, `.symtab`, `.strtab`, `.comment`. Reverted.
|
||||
- `libs/RevoEX/src/so/SOCommon.c`, remove empty failure branch: changed `.strtab`. Reverted.
|
||||
- `libs/RevoEX/src/so/SOOption.c`, direct interface length member: changed `.text`. Reverted.
|
||||
- `libs/RevoEX/src/so/SOOption.c`, direct interface reply member: changed `.text`. Reverted.
|
||||
- `libs/RevoEX/src/so/SOOption.c`, direct interface setting member: changed `.text`. Reverted.
|
||||
- `libs/RVL_SDK/src/dvd/dvdfs.c`, redundant command block pointer cast: changed `.strtab`. Reverted.
|
||||
- `libs/RevoEX/src/cdb/CDBDatabase.c`, BOOL directory scan checks: changed `.text`. Reverted.
|
||||
- `libs/RevoEX/src/so/SOCommon.c`, direct initialized state predicate: changed `.text`, `.rela.text`, `.symtab`, `.strtab`. Reverted.
|
||||
- `libs/RevoEX/src/cdb/CDBDatabase.c`, isolated BOOL eject check: changed `.text`. Reverted.
|
||||
- `libs/RevoEX/src/vf/develop/nand_drv.c`, redundant read buffer casts: compile rejected an implicit const-removing conversion in the write path. Reverted.
|
||||
- `libs/RVL_SDK/src/dvd/dvd.c`, direct boot magic predicate: changed `.strtab`. Reverted.
|
||||
|
||||
## Retained counts
|
||||
|
||||
Counts below count individual constants or casts removed, and individual conditions or member accesses replaced. Attempt entries above count replacement sites, which may contain several constants or casts.
|
||||
|
||||
| File | Constants | Casts | Conditions | Member accesses |
|
||||
|---|---:|---:|---:|---:|
|
||||
| `libs/RVL_SDK/src/ax/AXVPB.c` | 0 | 2 | 0 | 0 |
|
||||
| `libs/RVL_SDK/src/axfx/AXFXChorusExp.c` | 0 | 1 | 0 | 0 |
|
||||
| `libs/RVL_SDK/src/bte/gki_buffer.c` | 0 | 1 | 0 | 0 |
|
||||
| `libs/RVL_SDK/src/card/CARDMount.c` | 0 | 0 | 1 | 0 |
|
||||
| `libs/RVL_SDK/src/cnt/cnt.c` | 0 | 0 | 3 | 0 |
|
||||
| `libs/RVL_SDK/src/gx/GXFrameBuf.c` | 6 | 2 | 0 | 0 |
|
||||
| `libs/RVL_SDK/src/gx/GXInit.c` | 25 | 1 | 0 | 0 |
|
||||
| `libs/RVL_SDK/src/gx/GXTexture.c` | 13 | 1 | 0 | 0 |
|
||||
| `libs/RVL_SDK/src/ipc/ipcclt.c` | 1 | 0 | 0 | 0 |
|
||||
| `libs/RVL_SDK/src/kpad/KPAD.c` | 68 | 0 | 1 | 0 |
|
||||
| `libs/RVL_SDK/src/os/OSMutex.c` | 0 | 0 | 1 | 0 |
|
||||
| `libs/RVL_SDK/src/os/OSPlayTime.c` | 1 | 0 | 0 | 0 |
|
||||
| `libs/RVL_SDK/src/os/OSStateFlags.c` | 2 | 0 | 0 | 0 |
|
||||
| `libs/RVL_SDK/src/os/OSStateTM.c` | 3 | 0 | 0 | 0 |
|
||||
| `libs/RVL_SDK/src/rso/RSOLink.c` | 0 | 8 | 1 | 0 |
|
||||
| `libs/RVL_SDK/src/sc/scsystem.c` | 1 | 0 | 0 | 0 |
|
||||
| `libs/RVL_SDK/src/si/SIBios.c` | 0 | 0 | 1 | 0 |
|
||||
| `libs/RVL_SDK/src/usbcmn/puh_ker_sem.c` | 1 | 1 | 0 | 0 |
|
||||
| `libs/RVL_SDK/src/wpad/WPADHIDParser.c` | 2 | 41 | 0 | 0 |
|
||||
| `libs/RevoEX/src/cdb/CDBDatabase.c` | 6 | 0 | 7 | 0 |
|
||||
| `libs/RevoEX/src/cdb/CDBSystem.c` | 0 | 0 | 1 | 0 |
|
||||
| `libs/RevoEX/src/ncd/ncdsystem.c` | 19 | 0 | 0 | 12 |
|
||||
| `libs/RevoEX/src/nhttp/NHTTP_socket_RVL.c` | 15 | 0 | 0 | 0 |
|
||||
| `libs/RevoEX/src/nhttp/NHTTP_thread.c` | 51 | 0 | 0 | 0 |
|
||||
| `libs/RevoEX/src/nwc24/NWC24MBoxCtrl.c` | 2 | 0 | 0 | 0 |
|
||||
| `libs/RevoEX/src/nwc24/NWC24MsgCommit.c` | 7 | 0 | 0 | 0 |
|
||||
| `libs/RevoEX/src/nwc24/NWC24System.c` | 8 | 0 | 0 | 0 |
|
||||
| `libs/RevoEX/src/so/SOCommon.c` | 20 | 0 | 0 | 0 |
|
||||
| `libs/RevoEX/src/so/SOOption.c` | 4 | 0 | 0 | 0 |
|
||||
| `libs/RevoEX/src/vf/develop/d_common.c` | 0 | 2 | 0 | 0 |
|
||||
| `libs/RevoEX/src/vf/develop/nand_drv.c` | 6 | 2 | 2 | 0 |
|
||||
| `libs/RevoEX/src/vf/develop/sd_drv.c` | 2 | 2 | 0 | 0 |
|
||||
|
||||
Total: 263 constants, 64 casts, 18 conditions, 12 member accesses. One changed error condition was wrapped without changing tokens. 32 C sources changed.
|
||||
|
||||
## Validation
|
||||
|
||||
- Initial full build passed with the required DOL SHA1. Saved all 1,027 source objects and a freshly generated objdiff report before editing.
|
||||
- Quick gate passed after the first groups, with zero regressions and zero added forbidden patterns or readability warnings.
|
||||
- Every retained trial rebuilt its object and compared the entire ELF file with the original local baseline. All 32 final objects pass that byte comparison before the clean gate. All pre-edit target string pools are identical.
|
||||
- Final non-quick gate rebuilt the full 4.3U target from a clean build directory and passed. All 32 touched units have 100% code, data, fuzzy, and instruction-exact results; regressions, added forbidden patterns, and readability warnings are zero.
|
||||
- The fresh final objdiff JSON is identical to the initial report, including every unit, function, section, and global measure. All 1,027 rebuilt source objects have their original SHA256, including all 32 touched objects.
|
||||
- Before -> after across touched units: 553 -> 553 instruction-exact functions; 175,148 -> 175,148 matched code bytes; 128,808 -> 128,808 matched data bytes. No nonmatching function remains in the touched units.
|
||||
- All 32 final source pools equal both the initial source pools and original target pools, including string offsets. `git diff --check` passes. Scope and comment checks pass; no excluded files or original assembly bodies changed.
|
||||
|
||||
## Full clean gate
|
||||
|
||||
Command: `python3 /mnt/drive2/projects/wii-ipl-workers/_restore0928-tools/gate.py <all 32 units listed above> --base 38ade13d6fb4320b5779d1e6df4b9250a018b7d8` (without `--quick`).
|
||||
|
||||
```text
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/RVL_SDK/src/ax/AXVPB] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/ax/AXVPB] objdiff: code 5648/5648 data 71648/71648 functions 22/22 fuzzy 100.0000 linked code 5648
|
||||
[libs/RVL_SDK/src/ax/AXVPB] instruction-exact functions: 22/22
|
||||
[libs/RVL_SDK/src/ax/AXVPB] section .bss size 71424 match 100.0
|
||||
[libs/RVL_SDK/src/ax/AXVPB] section .data size 160 match 100.0
|
||||
[libs/RVL_SDK/src/ax/AXVPB] section .sbss size 32 match 100.0
|
||||
[libs/RVL_SDK/src/ax/AXVPB] section .sdata2 size 32 match 100.0
|
||||
[libs/RVL_SDK/src/ax/AXVPB] section .text size 5648 match 100.0
|
||||
[libs/RVL_SDK/src/ax/AXVPB] baseline: code 5648/5648 data 71648 functions 22 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/axfx/AXFXChorusExp] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/axfx/AXFXChorusExp] objdiff: code 2684/2684 data 48/48 functions 7/7 fuzzy 100.0000 linked code 2684
|
||||
[libs/RVL_SDK/src/axfx/AXFXChorusExp] instruction-exact functions: 7/7
|
||||
[libs/RVL_SDK/src/axfx/AXFXChorusExp] section .sdata2 size 48 match 100.0
|
||||
[libs/RVL_SDK/src/axfx/AXFXChorusExp] section .text size 2684 match 100.0
|
||||
[libs/RVL_SDK/src/axfx/AXFXChorusExp] baseline: code 2684/2684 data 48 functions 7 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/bte/gki_buffer] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/bte/gki_buffer] objdiff: code 5188/5188 data 328/328 functions 18/18 fuzzy 100.0000 linked code 5188
|
||||
[libs/RVL_SDK/src/bte/gki_buffer] instruction-exact functions: 18/18
|
||||
[libs/RVL_SDK/src/bte/gki_buffer] section .data size 328 match 100.0
|
||||
[libs/RVL_SDK/src/bte/gki_buffer] section .text size 5188 match 100.0
|
||||
[libs/RVL_SDK/src/bte/gki_buffer] baseline: code 5188/5188 data 328 functions 18 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/card/CARDMount] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/card/CARDMount] objdiff: code 2380/2380 data 64/64 functions 7/7 fuzzy 100.0000 linked code 2380
|
||||
[libs/RVL_SDK/src/card/CARDMount] instruction-exact functions: 7/7
|
||||
[libs/RVL_SDK/src/card/CARDMount] section .data size 64 match 100.0
|
||||
[libs/RVL_SDK/src/card/CARDMount] section .text size 2380 match 100.0
|
||||
[libs/RVL_SDK/src/card/CARDMount] baseline: code 2380/2380 data 64 functions 7 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/cnt/cnt] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/cnt/cnt] objdiff: code 2228/2228 data 888/888 functions 16/16 fuzzy 100.0000 linked code 2228
|
||||
[libs/RVL_SDK/src/cnt/cnt] instruction-exact functions: 16/16
|
||||
[libs/RVL_SDK/src/cnt/cnt] section .data size 256 match 100.0
|
||||
[libs/RVL_SDK/src/cnt/cnt] section .rodata size 632 match 100.0
|
||||
[libs/RVL_SDK/src/cnt/cnt] section .text size 2228 match 100.0
|
||||
[libs/RVL_SDK/src/cnt/cnt] baseline: code 2228/2228 data 888 functions 16 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/gx/GXFrameBuf] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/gx/GXFrameBuf] objdiff: code 2624/2624 data 256/256 functions 14/14 fuzzy 100.0000 linked code 2624
|
||||
[libs/RVL_SDK/src/gx/GXFrameBuf] instruction-exact functions: 14/14
|
||||
[libs/RVL_SDK/src/gx/GXFrameBuf] section .data size 240 match 100.0
|
||||
[libs/RVL_SDK/src/gx/GXFrameBuf] section .sdata2 size 16 match 100.0
|
||||
[libs/RVL_SDK/src/gx/GXFrameBuf] section .text size 2624 match 100.0
|
||||
[libs/RVL_SDK/src/gx/GXFrameBuf] baseline: code 2624/2624 data 256 functions 14 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/gx/GXInit] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/gx/GXInit] objdiff: code 4556/4556 data 2328/2328 functions 6/6 fuzzy 100.0000 linked code 4556
|
||||
[libs/RVL_SDK/src/gx/GXInit] instruction-exact functions: 6/6
|
||||
[libs/RVL_SDK/src/gx/GXInit] section .bss size 1664 match 100.0
|
||||
[libs/RVL_SDK/src/gx/GXInit] section .data size 576 match 100.0
|
||||
[libs/RVL_SDK/src/gx/GXInit] section .sbss size 40 match 100.0
|
||||
[libs/RVL_SDK/src/gx/GXInit] section .sdata size 8 match 100.0
|
||||
[libs/RVL_SDK/src/gx/GXInit] section .sdata2 size 40 match 100.0
|
||||
[libs/RVL_SDK/src/gx/GXInit] section .text size 4556 match 100.0
|
||||
[libs/RVL_SDK/src/gx/GXInit] baseline: code 4556/4556 data 2328 functions 6 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/gx/GXTexture] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/gx/GXTexture] objdiff: code 3776/3776 data 656/656 functions 27/27 fuzzy 100.0000 linked code 3776
|
||||
[libs/RVL_SDK/src/gx/GXTexture] instruction-exact functions: 27/27
|
||||
[libs/RVL_SDK/src/gx/GXTexture] section .data size 552 match 100.0
|
||||
[libs/RVL_SDK/src/gx/GXTexture] section .sdata size 64 match 100.0
|
||||
[libs/RVL_SDK/src/gx/GXTexture] section .sdata2 size 40 match 100.0
|
||||
[libs/RVL_SDK/src/gx/GXTexture] section .text size 3776 match 100.0
|
||||
[libs/RVL_SDK/src/gx/GXTexture] baseline: code 3776/3776 data 656 functions 27 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/ipc/ipcclt] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/ipc/ipcclt] objdiff: code 6612/6612 data 312/312 functions 22/22 fuzzy 100.0000 linked code 6612
|
||||
[libs/RVL_SDK/src/ipc/ipcclt] instruction-exact functions: 22/22
|
||||
[libs/RVL_SDK/src/ipc/ipcclt] section .bss size 288 match 100.0
|
||||
[libs/RVL_SDK/src/ipc/ipcclt] section .sbss size 16 match 100.0
|
||||
[libs/RVL_SDK/src/ipc/ipcclt] section .sdata size 8 match 100.0
|
||||
[libs/RVL_SDK/src/ipc/ipcclt] section .text size 6612 match 100.0
|
||||
[libs/RVL_SDK/src/ipc/ipcclt] baseline: code 6612/6612 data 312 functions 22 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/kpad/KPAD] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/kpad/KPAD] objdiff: code 13056/13056 data 8032/8032 functions 29/29 fuzzy 100.0000 linked code 13056
|
||||
[libs/RVL_SDK/src/kpad/KPAD] instruction-exact functions: 29/29
|
||||
[libs/RVL_SDK/src/kpad/KPAD] section .bss size 7680 match 100.0
|
||||
[libs/RVL_SDK/src/kpad/KPAD] section .data size 88 match 100.0
|
||||
[libs/RVL_SDK/src/kpad/KPAD] section .sbss size 32 match 100.0
|
||||
[libs/RVL_SDK/src/kpad/KPAD] section .sdata size 112 match 100.0
|
||||
[libs/RVL_SDK/src/kpad/KPAD] section .sdata2 size 120 match 100.0
|
||||
[libs/RVL_SDK/src/kpad/KPAD] section .text size 13056 match 100.0
|
||||
[libs/RVL_SDK/src/kpad/KPAD] baseline: code 13056/13056 data 8032 functions 29 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/os/OSMutex] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/os/OSMutex] objdiff: code 1424/1424 data None/None functions 11/11 fuzzy 100.0000 linked code 1424
|
||||
[libs/RVL_SDK/src/os/OSMutex] instruction-exact functions: 11/11
|
||||
[libs/RVL_SDK/src/os/OSMutex] section .text size 1424 match 100.0
|
||||
[libs/RVL_SDK/src/os/OSMutex] baseline: code 1424/1424 data None functions 11 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/os/OSPlayTime] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/os/OSPlayTime] objdiff: code 2176/2176 data 160/160 functions 7/7 fuzzy 100.0000 linked code 2176
|
||||
[libs/RVL_SDK/src/os/OSPlayTime] instruction-exact functions: 7/7
|
||||
[libs/RVL_SDK/src/os/OSPlayTime] section .bss size 48 match 100.0
|
||||
[libs/RVL_SDK/src/os/OSPlayTime] section .data size 64 match 100.0
|
||||
[libs/RVL_SDK/src/os/OSPlayTime] section .sbss size 24 match 100.0
|
||||
[libs/RVL_SDK/src/os/OSPlayTime] section .sdata size 8 match 100.0
|
||||
[libs/RVL_SDK/src/os/OSPlayTime] section .sdata2 size 16 match 100.0
|
||||
[libs/RVL_SDK/src/os/OSPlayTime] section .text size 2176 match 100.0
|
||||
[libs/RVL_SDK/src/os/OSPlayTime] baseline: code 2176/2176 data 160 functions 7 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/os/OSStateFlags] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/os/OSStateFlags] objdiff: code 632/632 data 72/72 functions 3/3 fuzzy 100.0000 linked code 632
|
||||
[libs/RVL_SDK/src/os/OSStateFlags] instruction-exact functions: 3/3
|
||||
[libs/RVL_SDK/src/os/OSStateFlags] section .bss size 32 match 100.0
|
||||
[libs/RVL_SDK/src/os/OSStateFlags] section .data size 40 match 100.0
|
||||
[libs/RVL_SDK/src/os/OSStateFlags] section .text size 632 match 100.0
|
||||
[libs/RVL_SDK/src/os/OSStateFlags] baseline: code 632/632 data 72 functions 3 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/os/OSStateTM] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/os/OSStateTM] objdiff: code 1868/1868 data 424/424 functions 13/13 fuzzy 100.0000 linked code 1868
|
||||
[libs/RVL_SDK/src/os/OSStateTM] instruction-exact functions: 13/13
|
||||
[libs/RVL_SDK/src/os/OSStateTM] section .bss size 192 match 100.0
|
||||
[libs/RVL_SDK/src/os/OSStateTM] section .data size 200 match 100.0
|
||||
[libs/RVL_SDK/src/os/OSStateTM] section .sbss size 32 match 100.0
|
||||
[libs/RVL_SDK/src/os/OSStateTM] section .text size 1868 match 100.0
|
||||
[libs/RVL_SDK/src/os/OSStateTM] baseline: code 1868/1868 data 424 functions 13 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/rso/RSOLink] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/rso/RSOLink] objdiff: code 5604/5604 data 288/288 functions 16/16 fuzzy 100.0000 linked code 5604
|
||||
[libs/RVL_SDK/src/rso/RSOLink] instruction-exact functions: 16/16
|
||||
[libs/RVL_SDK/src/rso/RSOLink] section .data size 280 match 100.0
|
||||
[libs/RVL_SDK/src/rso/RSOLink] section .sbss size 8 match 100.0
|
||||
[libs/RVL_SDK/src/rso/RSOLink] section .text size 5604 match 100.0
|
||||
[libs/RVL_SDK/src/rso/RSOLink] baseline: code 5604/5604 data 288 functions 16 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/sc/scsystem] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/sc/scsystem] objdiff: code 7440/7440 data 34072/34072 functions 30/30 fuzzy 100.0000 linked code 7440
|
||||
[libs/RVL_SDK/src/sc/scsystem] instruction-exact functions: 30/30
|
||||
[libs/RVL_SDK/src/sc/scsystem] section .bss size 33184 match 100.0
|
||||
[libs/RVL_SDK/src/sc/scsystem] section .data size 504 match 100.0
|
||||
[libs/RVL_SDK/src/sc/scsystem] section .rodata size 88 match 100.0
|
||||
[libs/RVL_SDK/src/sc/scsystem] section .sbss size 24 match 100.0
|
||||
[libs/RVL_SDK/src/sc/scsystem] section .sdata size 272 match 100.0
|
||||
[libs/RVL_SDK/src/sc/scsystem] section .text size 7440 match 100.0
|
||||
[libs/RVL_SDK/src/sc/scsystem] baseline: code 7440/7440 data 34072 functions 30 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/si/SIBios] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/si/SIBios] objdiff: code 5488/5488 data 680/680 functions 19/19 fuzzy 100.0000 linked code 5488
|
||||
[libs/RVL_SDK/src/si/SIBios] instruction-exact functions: 19/19
|
||||
[libs/RVL_SDK/src/si/SIBios] section .bss size 544 match 100.0
|
||||
[libs/RVL_SDK/src/si/SIBios] section .data size 112 match 100.0
|
||||
[libs/RVL_SDK/src/si/SIBios] section .sbss size 16 match 100.0
|
||||
[libs/RVL_SDK/src/si/SIBios] section .sdata size 8 match 100.0
|
||||
[libs/RVL_SDK/src/si/SIBios] section .text size 5488 match 100.0
|
||||
[libs/RVL_SDK/src/si/SIBios] baseline: code 5488/5488 data 680 functions 19 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/usbcmn/puh_ker_sem] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/usbcmn/puh_ker_sem] objdiff: code 768/768 data 320/320 functions 3/3 fuzzy 100.0000 linked code 768
|
||||
[libs/RVL_SDK/src/usbcmn/puh_ker_sem] instruction-exact functions: 3/3
|
||||
[libs/RVL_SDK/src/usbcmn/puh_ker_sem] section .bss size 312 match 100.0
|
||||
[libs/RVL_SDK/src/usbcmn/puh_ker_sem] section .sbss size 8 match 100.0
|
||||
[libs/RVL_SDK/src/usbcmn/puh_ker_sem] section .text size 768 match 100.0
|
||||
[libs/RVL_SDK/src/usbcmn/puh_ker_sem] baseline: code 768/768 data 320 functions 3 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/wpad/WPADHIDParser] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/wpad/WPADHIDParser] objdiff: code 21664/21664 data 1664/1664 functions 22/22 fuzzy 100.0000 linked code 21664
|
||||
[libs/RVL_SDK/src/wpad/WPADHIDParser] instruction-exact functions: 22/22
|
||||
[libs/RVL_SDK/src/wpad/WPADHIDParser] section .bss size 104 match 100.0
|
||||
[libs/RVL_SDK/src/wpad/WPADHIDParser] section .data size 1440 match 100.0
|
||||
[libs/RVL_SDK/src/wpad/WPADHIDParser] section .sbss size 24 match 100.0
|
||||
[libs/RVL_SDK/src/wpad/WPADHIDParser] section .sdata2 size 96 match 100.0
|
||||
[libs/RVL_SDK/src/wpad/WPADHIDParser] section .text size 21664 match 100.0
|
||||
[libs/RVL_SDK/src/wpad/WPADHIDParser] baseline: code 21664/21664 data 1664 functions 22 fuzzy 100.0000
|
||||
[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/CDBSystem] pool: IDENTICAL
|
||||
[libs/RevoEX/src/cdb/CDBSystem] objdiff: code 5076/5076 data 1464/1464 functions 36/36 fuzzy 100.0000 linked code 5076
|
||||
[libs/RevoEX/src/cdb/CDBSystem] instruction-exact functions: 36/36
|
||||
[libs/RevoEX/src/cdb/CDBSystem] section .bss size 96 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBSystem] section .data size 1312 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBSystem] section .sbss size 32 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBSystem] section .sdata size 24 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBSystem] section .text size 5076 match 100.0
|
||||
[libs/RevoEX/src/cdb/CDBSystem] baseline: code 5076/5076 data 1464 functions 36 fuzzy 100.0000
|
||||
[libs/RevoEX/src/ncd/ncdsystem] pool: IDENTICAL
|
||||
[libs/RevoEX/src/ncd/ncdsystem] objdiff: code 4180/4180 data 496/496 functions 15/15 fuzzy 100.0000 linked code 4180
|
||||
[libs/RevoEX/src/ncd/ncdsystem] instruction-exact functions: 15/15
|
||||
[libs/RevoEX/src/ncd/ncdsystem] section .bss size 96 match 100.0
|
||||
[libs/RevoEX/src/ncd/ncdsystem] section .data size 384 match 100.0
|
||||
[libs/RevoEX/src/ncd/ncdsystem] section .sbss size 8 match 100.0
|
||||
[libs/RevoEX/src/ncd/ncdsystem] section .sdata size 8 match 100.0
|
||||
[libs/RevoEX/src/ncd/ncdsystem] section .text size 4180 match 100.0
|
||||
[libs/RevoEX/src/ncd/ncdsystem] baseline: code 4180/4180 data 496 functions 15 fuzzy 100.0000
|
||||
[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_thread] pool: IDENTICAL
|
||||
[libs/RevoEX/src/nhttp/NHTTP_thread] objdiff: code 11292/11292 data 504/504 functions 26/26 fuzzy 100.0000 linked code 11292
|
||||
[libs/RevoEX/src/nhttp/NHTTP_thread] instruction-exact functions: 26/26
|
||||
[libs/RevoEX/src/nhttp/NHTTP_thread] section .data size 200 match 100.0
|
||||
[libs/RevoEX/src/nhttp/NHTTP_thread] section .rodata size 216 match 100.0
|
||||
[libs/RevoEX/src/nhttp/NHTTP_thread] section .sdata size 88 match 100.0
|
||||
[libs/RevoEX/src/nhttp/NHTTP_thread] section .text size 11292 match 100.0
|
||||
[libs/RevoEX/src/nhttp/NHTTP_thread] baseline: code 11292/11292 data 504 functions 26 fuzzy 100.0000
|
||||
[libs/RevoEX/src/nwc24/NWC24MBoxCtrl] pool: IDENTICAL
|
||||
[libs/RevoEX/src/nwc24/NWC24MBoxCtrl] objdiff: code 10604/10604 data 192/192 functions 25/25 fuzzy 100.0000 linked code 10604
|
||||
[libs/RevoEX/src/nwc24/NWC24MBoxCtrl] instruction-exact functions: 25/25
|
||||
[libs/RevoEX/src/nwc24/NWC24MBoxCtrl] section .data size 168 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24MBoxCtrl] section .sbss size 8 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24MBoxCtrl] section .sdata size 16 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24MBoxCtrl] section .text size 10604 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24MBoxCtrl] baseline: code 10604/10604 data 192 functions 25 fuzzy 100.0000
|
||||
[libs/RevoEX/src/nwc24/NWC24MsgCommit] pool: IDENTICAL
|
||||
[libs/RevoEX/src/nwc24/NWC24MsgCommit] objdiff: code 8532/8532 data 904/904 functions 18/18 fuzzy 100.0000 linked code 8532
|
||||
[libs/RevoEX/src/nwc24/NWC24MsgCommit] instruction-exact functions: 18/18
|
||||
[libs/RevoEX/src/nwc24/NWC24MsgCommit] section .bss size 64 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24MsgCommit] section .data size 680 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24MsgCommit] section .sbss size 8 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24MsgCommit] section .sdata size 152 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24MsgCommit] section .text size 8532 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24MsgCommit] baseline: code 8532/8532 data 904 functions 18 fuzzy 100.0000
|
||||
[libs/RevoEX/src/nwc24/NWC24System] pool: IDENTICAL
|
||||
[libs/RevoEX/src/nwc24/NWC24System] objdiff: code 808/808 data 192/192 functions 4/4 fuzzy 100.0000 linked code 808
|
||||
[libs/RevoEX/src/nwc24/NWC24System] instruction-exact functions: 4/4
|
||||
[libs/RevoEX/src/nwc24/NWC24System] section .bss size 96 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24System] section .data size 72 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24System] section .sbss size 16 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24System] section .sdata size 8 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24System] section .text size 808 match 100.0
|
||||
[libs/RevoEX/src/nwc24/NWC24System] baseline: code 808/808 data 192 functions 4 fuzzy 100.0000
|
||||
[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/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
|
||||
[libs/RevoEX/src/vf/develop/d_common] pool: IDENTICAL
|
||||
[libs/RevoEX/src/vf/develop/d_common] objdiff: code 3100/3100 data 520/520 functions 25/25 fuzzy 100.0000 linked code 3100
|
||||
[libs/RevoEX/src/vf/develop/d_common] instruction-exact functions: 25/25
|
||||
[libs/RevoEX/src/vf/develop/d_common] section .bss size 520 match 100.0
|
||||
[libs/RevoEX/src/vf/develop/d_common] section .text size 3100 match 100.0
|
||||
[libs/RevoEX/src/vf/develop/d_common] baseline: code 3100/3100 data 520 functions 25 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/vf/develop/sd_drv] pool: IDENTICAL
|
||||
[libs/RevoEX/src/vf/develop/sd_drv] objdiff: code 3608/3608 data 992/992 functions 16/16 fuzzy 100.0000 linked code 3608
|
||||
[libs/RevoEX/src/vf/develop/sd_drv] instruction-exact functions: 16/16
|
||||
[libs/RevoEX/src/vf/develop/sd_drv] section .bss size 960 match 100.0
|
||||
[libs/RevoEX/src/vf/develop/sd_drv] section .rodata size 32 match 100.0
|
||||
[libs/RevoEX/src/vf/develop/sd_drv] section .text size 3608 match 100.0
|
||||
[libs/RevoEX/src/vf/develop/sd_drv] baseline: code 3608/3608 data 992 functions 16 fuzzy 100.0000
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 93.82541 -> 93.82541
|
||||
global fuzzy_match_percent: 99.81117 -> 99.81117
|
||||
global complete_code_percent: 79.26653 -> 79.26653
|
||||
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
|
||||
```
|
||||
|
||||
## Final independent checks
|
||||
|
||||
- Ran `ctxdiff.py` for all 553 functions in the touched units: every result has identical instruction counts and `diffs 0`.
|
||||
- Initial and final full reports have identical SHA256: `4bad9b1a8d7787054f7c2aa3c898c387437cbaf1fc394f021f314a5db3341c9c`.
|
||||
- Final DOL SHA1: `26116613f624061ba99c8d1a299aaa6efa85670d`.
|
||||
- All 76 compiled trials are recorded above: 65 retained and 11 restored. No unresolved validation issue remains in the retained changes.
|
||||
|
||||
## Source commits
|
||||
|
||||
- `a6ef0917609dbf65938aa40552bc5fa665d6c4cb`: clean up graphics and controller expressions (5 C files).
|
||||
- `ef67d6274bbc3fd3f56900693c4061ad3a1454b1`: name network result and state expressions (8 C files).
|
||||
- `16c09a3b1adfd91e6449321c55f6ee89519e3019`: simplify sdk predicates and redundant casts (19 C files).
|
||||
Reference in New Issue
Block a user