Compare commits
1 Commits
main
...
agent/w092
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
972502c9be |
@@ -13,7 +13,7 @@ extern "C" char scLytFatalMsg[] = "Error#004\nAn error has occurred.\nThe system
|
||||
GXColor front = {*((volatile const u8*)&::scLytFatalColorR), *((volatile const u8*)&::scLytFatalColorG), \
|
||||
*((volatile const u8*)&::scLytFatalColorB), *((volatile const u8*)&::scLytFatalColorA)}; \
|
||||
GXColor back = {0, 0, 0, 0}; \
|
||||
OSFatal((GXColor)front, (GXColor)back, ::scLytFatalMsg); \
|
||||
OSFatal(front, back, ::scLytFatalMsg); \
|
||||
} \
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ extern "C" char scLytFatalMsg[] = "Error#004\nAn error has occurred.\nThe system
|
||||
if (!(x)) { \
|
||||
GXColor front = {255, 255, 255, 0}; \
|
||||
GXColor back = {0, 0, 0, 0}; \
|
||||
OSFatal((GXColor)front, (GXColor)back, ::scLytFatalMsg); \
|
||||
OSFatal(front, back, ::scLytFatalMsg); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
@@ -1,21 +1,27 @@
|
||||
#include <string.h>
|
||||
#include <tmc_jpeg_internal.h>
|
||||
|
||||
static s32 clampU8(s32 v) {
|
||||
s32 ok;
|
||||
ok = 0;
|
||||
if (v < 256 && v > -1) {
|
||||
ok = 1;
|
||||
}
|
||||
return ok ? v : (v < 0 ? 0 : 255);
|
||||
}
|
||||
|
||||
static s32 clampS8(s32 v) {
|
||||
s32 inRange = 0;
|
||||
if (v < 128 && v > -129) {
|
||||
static s32 clampU8(s32 value) {
|
||||
s32 inRange;
|
||||
inRange = 0;
|
||||
if (value < 256 && value > -1) {
|
||||
inRange = 1;
|
||||
}
|
||||
return inRange ? v : (v > 0) ? 127 : -128;
|
||||
if (inRange) {
|
||||
return value;
|
||||
}
|
||||
if (value < 0) {
|
||||
return 0;
|
||||
}
|
||||
return 255;
|
||||
}
|
||||
|
||||
static s32 clampS8(s32 value) {
|
||||
s32 inRange = 0;
|
||||
if (value < 128 && value > -129) {
|
||||
inRange = 1;
|
||||
}
|
||||
return inRange ? value : (value > 0) ? 127 : -128;
|
||||
}
|
||||
|
||||
static s32 scalingClampU8(s32 value) {
|
||||
@@ -26,70 +32,70 @@ static s32 scalingClampU8(s32 value) {
|
||||
}
|
||||
|
||||
void TMCJPEGDEC_IdctBlock_Lumi(s32* block, u8* conv_row_ptr, u16 pitch, s32 zigzag) {
|
||||
s32 tmp[64];
|
||||
s32* dst;
|
||||
s32 d;
|
||||
s32 t;
|
||||
s32 i;
|
||||
s32 y;
|
||||
s32 b2;
|
||||
s32 b1;
|
||||
s32 b4;
|
||||
s32 b5;
|
||||
s32 b6;
|
||||
s32 b7;
|
||||
s32 n;
|
||||
s32 workspace[64];
|
||||
s32* workspaceCursor;
|
||||
s32 evenBaseSum;
|
||||
s32 evenRotation;
|
||||
s32 column;
|
||||
s32 evenOutput3;
|
||||
s32 coefficient2;
|
||||
s32 coefficient1;
|
||||
s32 coefficient4;
|
||||
s32 coefficient5;
|
||||
s32 coefficient6;
|
||||
s32 coefficient7;
|
||||
s32 oddOutput0;
|
||||
s32 m;
|
||||
s32 a;
|
||||
s32 done;
|
||||
s32 evenBaseDifference;
|
||||
s32 processedCoefficients;
|
||||
s32 z;
|
||||
s32 v;
|
||||
s32 p;
|
||||
s32 p_part;
|
||||
s32 m_part;
|
||||
s32 u;
|
||||
s32 evenOutput1;
|
||||
s32 oddOutput3;
|
||||
s32 oddLowRotation;
|
||||
s32 oddHighRotation;
|
||||
s32 evenRotationSum;
|
||||
s32 r;
|
||||
s32 o;
|
||||
s32 x;
|
||||
s32 x_factor;
|
||||
s32 z_factor;
|
||||
s32 iter;
|
||||
s32 q;
|
||||
s32 w;
|
||||
s32 e;
|
||||
s32 b3;
|
||||
s32 oddOutput1;
|
||||
s32 oddSumRotation;
|
||||
s32 oddSumDifference;
|
||||
s32 oddDifferenceSum;
|
||||
s32 columnsRemaining;
|
||||
s32 oddOutput2;
|
||||
s32 evenOutput0;
|
||||
s32 evenOutput2;
|
||||
s32 coefficient3;
|
||||
|
||||
r = (zigzag >> 4) * 8;
|
||||
dst = tmp;
|
||||
done = 0;
|
||||
workspaceCursor = workspace;
|
||||
processedCoefficients = 0;
|
||||
{
|
||||
for (; done < r; done += 8) {
|
||||
u32 ac;
|
||||
b4 = block[4];
|
||||
b6 = block[6];
|
||||
b2 = block[2];
|
||||
b1 = block[1];
|
||||
b7 = block[7];
|
||||
b5 = block[5];
|
||||
b3 = block[3];
|
||||
for (; processedCoefficients < r; processedCoefficients += 8) {
|
||||
u32 acBits;
|
||||
coefficient4 = block[4];
|
||||
coefficient6 = block[6];
|
||||
coefficient2 = block[2];
|
||||
coefficient1 = block[1];
|
||||
coefficient7 = block[7];
|
||||
coefficient5 = block[5];
|
||||
coefficient3 = block[3];
|
||||
|
||||
ac = (u32)b4;
|
||||
ac |= (u32)b6;
|
||||
ac |= (u32)b2;
|
||||
ac |= (u32)b1;
|
||||
ac |= (u32)b7;
|
||||
ac |= (u32)b5;
|
||||
ac |= (u32)b3;
|
||||
if (ac == 0) {
|
||||
s32 val = block[0];
|
||||
dst[7] = val;
|
||||
dst[6] = val;
|
||||
dst[5] = val;
|
||||
dst[4] = val;
|
||||
dst[3] = val;
|
||||
dst[2] = val;
|
||||
dst[1] = val;
|
||||
dst[0] = val;
|
||||
acBits = (u32)coefficient4;
|
||||
acBits |= (u32)coefficient6;
|
||||
acBits |= (u32)coefficient2;
|
||||
acBits |= (u32)coefficient1;
|
||||
acBits |= (u32)coefficient7;
|
||||
acBits |= (u32)coefficient5;
|
||||
acBits |= (u32)coefficient3;
|
||||
if (acBits == 0) {
|
||||
s32 sample = block[0];
|
||||
workspaceCursor[7] = sample;
|
||||
workspaceCursor[6] = sample;
|
||||
workspaceCursor[5] = sample;
|
||||
workspaceCursor[4] = sample;
|
||||
workspaceCursor[3] = sample;
|
||||
workspaceCursor[2] = sample;
|
||||
workspaceCursor[1] = sample;
|
||||
workspaceCursor[0] = sample;
|
||||
} else {
|
||||
s32 oddLowSum;
|
||||
s32 oddHighSum;
|
||||
@@ -97,242 +103,242 @@ void TMCJPEGDEC_IdctBlock_Lumi(s32* block, u8* conv_row_ptr, u16 pitch, s32 zigz
|
||||
s32 oddHighDifference;
|
||||
s32 dcValue;
|
||||
|
||||
t = b2 - b6;
|
||||
oddLowSum = b5 + b3;
|
||||
oddLowDifference = b5 - b3;
|
||||
oddHighSum = b1 + b7;
|
||||
oddHighDifference = b1 - b7;
|
||||
u = b6 + b2;
|
||||
t = t * 0xB5 >> 8;
|
||||
x_factor = oddHighSum - oddLowSum;
|
||||
z_factor = oddLowDifference + oddHighDifference;
|
||||
evenRotation = coefficient2 - coefficient6;
|
||||
oddLowSum = coefficient5 + coefficient3;
|
||||
oddLowDifference = coefficient5 - coefficient3;
|
||||
oddHighSum = coefficient1 + coefficient7;
|
||||
oddHighDifference = coefficient1 - coefficient7;
|
||||
evenRotationSum = coefficient6 + coefficient2;
|
||||
evenRotation = evenRotation * 0xB5 >> 8;
|
||||
oddSumDifference = oddHighSum - oddLowSum;
|
||||
oddDifferenceSum = oddLowDifference + oddHighDifference;
|
||||
dcValue = block[0];
|
||||
a = dcValue - b4;
|
||||
x = x_factor * 0xB5 >> 8;
|
||||
d = dcValue + b4;
|
||||
u = t + u;
|
||||
v = a + t;
|
||||
z = z_factor * 0x62 >> 8;
|
||||
w = d + u;
|
||||
y = d - u;
|
||||
m_part = oddHighDifference * 0x14E >> 8;
|
||||
e = a - t;
|
||||
m = m_part - z;
|
||||
evenBaseDifference = dcValue - coefficient4;
|
||||
oddSumRotation = oddSumDifference * 0xB5 >> 8;
|
||||
evenBaseSum = dcValue + coefficient4;
|
||||
evenRotationSum = evenRotation + evenRotationSum;
|
||||
evenOutput1 = evenBaseDifference + evenRotation;
|
||||
z = oddDifferenceSum * 0x62 >> 8;
|
||||
evenOutput0 = evenBaseSum + evenRotationSum;
|
||||
evenOutput3 = evenBaseSum - evenRotationSum;
|
||||
oddHighRotation = oddHighDifference * 0x14E >> 8;
|
||||
evenOutput2 = evenBaseDifference - evenRotation;
|
||||
m = oddHighRotation - z;
|
||||
oddLowSum += m;
|
||||
n = oddHighSum + oddLowSum;
|
||||
o = x + m;
|
||||
dst[0] = w + n;
|
||||
p_part = oddLowDifference * 0x8B;
|
||||
dst[7] = w - n;
|
||||
p_part >>= 8;
|
||||
dst[1] = v + o;
|
||||
p = z + p_part;
|
||||
q = p + x;
|
||||
dst[6] = v - o;
|
||||
dst[2] = e + q;
|
||||
dst[5] = e - q;
|
||||
dst[3] = y + p;
|
||||
dst[4] = y - p;
|
||||
oddOutput0 = oddHighSum + oddLowSum;
|
||||
oddOutput1 = oddSumRotation + m;
|
||||
workspaceCursor[0] = evenOutput0 + oddOutput0;
|
||||
oddLowRotation = oddLowDifference * 0x8B;
|
||||
workspaceCursor[7] = evenOutput0 - oddOutput0;
|
||||
oddLowRotation >>= 8;
|
||||
workspaceCursor[1] = evenOutput1 + oddOutput1;
|
||||
oddOutput3 = z + oddLowRotation;
|
||||
oddOutput2 = oddOutput3 + oddSumRotation;
|
||||
workspaceCursor[6] = evenOutput1 - oddOutput1;
|
||||
workspaceCursor[2] = evenOutput2 + oddOutput2;
|
||||
workspaceCursor[5] = evenOutput2 - oddOutput2;
|
||||
workspaceCursor[3] = evenOutput3 + oddOutput3;
|
||||
workspaceCursor[4] = evenOutput3 - oddOutput3;
|
||||
}
|
||||
block += 8;
|
||||
dst += 8;
|
||||
workspaceCursor += 8;
|
||||
}
|
||||
}
|
||||
|
||||
dst = tmp + done;
|
||||
for (; done <= 0x38; done += 8) {
|
||||
memset(dst, 0, 0x20);
|
||||
dst += 8;
|
||||
workspaceCursor = workspace + processedCoefficients;
|
||||
for (; processedCoefficients <= 0x38; processedCoefficients += 8) {
|
||||
memset(workspaceCursor, 0, 0x20);
|
||||
workspaceCursor += 8;
|
||||
}
|
||||
|
||||
r = pitch * 8 - pitch;
|
||||
z = pitch * 4;
|
||||
m = pitch * 2;
|
||||
dst = tmp + 7;
|
||||
for (iter = 8, i = 7; iter > 0; iter--, i--) {
|
||||
u32 ac;
|
||||
u8* out;
|
||||
workspaceCursor = workspace + 7;
|
||||
for (columnsRemaining = 8, column = 7; columnsRemaining > 0; columnsRemaining--, column--) {
|
||||
u32 acBits;
|
||||
u8* output;
|
||||
|
||||
b4 = dst[0x20];
|
||||
b6 = dst[0x30];
|
||||
b2 = dst[0x10];
|
||||
b1 = dst[8];
|
||||
b7 = dst[0x38];
|
||||
b5 = dst[0x28];
|
||||
b3 = dst[0x18];
|
||||
coefficient4 = workspaceCursor[0x20];
|
||||
coefficient6 = workspaceCursor[0x30];
|
||||
coefficient2 = workspaceCursor[0x10];
|
||||
coefficient1 = workspaceCursor[8];
|
||||
coefficient7 = workspaceCursor[0x38];
|
||||
coefficient5 = workspaceCursor[0x28];
|
||||
coefficient3 = workspaceCursor[0x18];
|
||||
|
||||
ac = (u32)b4;
|
||||
ac |= (u32)b6;
|
||||
ac |= (u32)b2;
|
||||
ac |= (u32)b1;
|
||||
ac |= (u32)b7;
|
||||
ac |= (u32)b5;
|
||||
ac |= (u32)b3;
|
||||
out = conv_row_ptr + i;
|
||||
if (ac == 0) {
|
||||
u8 val = clampU8((*dst >> 11) + 0x80);
|
||||
out[r] = val;
|
||||
out[pitch * 6] = val;
|
||||
out[z + pitch] = val;
|
||||
out[z] = val;
|
||||
out[z - pitch] = val;
|
||||
out[m] = val;
|
||||
out[pitch] = val;
|
||||
out[0] = val;
|
||||
acBits = (u32)coefficient4;
|
||||
acBits |= (u32)coefficient6;
|
||||
acBits |= (u32)coefficient2;
|
||||
acBits |= (u32)coefficient1;
|
||||
acBits |= (u32)coefficient7;
|
||||
acBits |= (u32)coefficient5;
|
||||
acBits |= (u32)coefficient3;
|
||||
output = conv_row_ptr + column;
|
||||
if (acBits == 0) {
|
||||
u8 sample = clampU8((*workspaceCursor >> 11) + 0x80);
|
||||
output[r] = sample;
|
||||
output[pitch * 6] = sample;
|
||||
output[z + pitch] = sample;
|
||||
output[z] = sample;
|
||||
output[z - pitch] = sample;
|
||||
output[m] = sample;
|
||||
output[pitch] = sample;
|
||||
output[0] = sample;
|
||||
} else {
|
||||
s32 oddLowSum;
|
||||
s32 oddHighSum;
|
||||
s32 dcValue;
|
||||
|
||||
t = b2 - b6;
|
||||
oddLowSum = b5 + b3;
|
||||
b5 = b5 - b3;
|
||||
oddHighSum = b1 + b7;
|
||||
b1 = b1 - b7;
|
||||
u = b6 + b2;
|
||||
b2 = t * 0xB5 >> 8;
|
||||
x_factor = oddHighSum - oddLowSum;
|
||||
z_factor = b5 + b1;
|
||||
dcValue = *dst + 0x40000;
|
||||
a = dcValue - b4;
|
||||
x = x_factor * 0xB5 >> 8;
|
||||
d = dcValue + b4;
|
||||
u = b2 + u;
|
||||
v = a + b2;
|
||||
z_factor = z_factor * 0x62 >> 8;
|
||||
w = d + u;
|
||||
y = d - u;
|
||||
m_part = b1 * 0x14E >> 8;
|
||||
e = a - b2;
|
||||
m_part = m_part - z_factor;
|
||||
oddLowSum += m_part;
|
||||
n = oddHighSum + oddLowSum;
|
||||
o = x + m_part;
|
||||
p_part = b5 * 0x8B >> 8;
|
||||
p = z_factor + p_part;
|
||||
q = p + x;
|
||||
out[0] = scalingClampU8(w + n);
|
||||
out[r] = scalingClampU8(w - n);
|
||||
out[pitch] = scalingClampU8(v + o);
|
||||
out[pitch * 6] = scalingClampU8(v - o);
|
||||
out[m] = scalingClampU8(e + q);
|
||||
out[z + pitch] = scalingClampU8(e - q);
|
||||
out[z - pitch] = scalingClampU8(y + p);
|
||||
out[z] = scalingClampU8(y - p);
|
||||
evenRotation = coefficient2 - coefficient6;
|
||||
oddLowSum = coefficient5 + coefficient3;
|
||||
coefficient5 = coefficient5 - coefficient3;
|
||||
oddHighSum = coefficient1 + coefficient7;
|
||||
coefficient1 = coefficient1 - coefficient7;
|
||||
evenRotationSum = coefficient6 + coefficient2;
|
||||
coefficient2 = evenRotation * 0xB5 >> 8;
|
||||
oddSumDifference = oddHighSum - oddLowSum;
|
||||
oddDifferenceSum = coefficient5 + coefficient1;
|
||||
dcValue = *workspaceCursor + 0x40000;
|
||||
evenBaseDifference = dcValue - coefficient4;
|
||||
oddSumRotation = oddSumDifference * 0xB5 >> 8;
|
||||
evenBaseSum = dcValue + coefficient4;
|
||||
evenRotationSum = coefficient2 + evenRotationSum;
|
||||
evenOutput1 = evenBaseDifference + coefficient2;
|
||||
oddDifferenceSum = oddDifferenceSum * 0x62 >> 8;
|
||||
evenOutput0 = evenBaseSum + evenRotationSum;
|
||||
evenOutput3 = evenBaseSum - evenRotationSum;
|
||||
oddHighRotation = coefficient1 * 0x14E >> 8;
|
||||
evenOutput2 = evenBaseDifference - coefficient2;
|
||||
oddHighRotation = oddHighRotation - oddDifferenceSum;
|
||||
oddLowSum += oddHighRotation;
|
||||
oddOutput0 = oddHighSum + oddLowSum;
|
||||
oddOutput1 = oddSumRotation + oddHighRotation;
|
||||
oddLowRotation = coefficient5 * 0x8B >> 8;
|
||||
oddOutput3 = oddDifferenceSum + oddLowRotation;
|
||||
oddOutput2 = oddOutput3 + oddSumRotation;
|
||||
output[0] = scalingClampU8(evenOutput0 + oddOutput0);
|
||||
output[r] = scalingClampU8(evenOutput0 - oddOutput0);
|
||||
output[pitch] = scalingClampU8(evenOutput1 + oddOutput1);
|
||||
output[pitch * 6] = scalingClampU8(evenOutput1 - oddOutput1);
|
||||
output[m] = scalingClampU8(evenOutput2 + oddOutput2);
|
||||
output[z + pitch] = scalingClampU8(evenOutput2 - oddOutput2);
|
||||
output[z - pitch] = scalingClampU8(evenOutput3 + oddOutput3);
|
||||
output[z] = scalingClampU8(evenOutput3 - oddOutput3);
|
||||
}
|
||||
dst--;
|
||||
workspaceCursor--;
|
||||
}
|
||||
}
|
||||
|
||||
void TMCJPEGDEC_IdctBlock_Col(s32* block, u8* conv_row_ptr, u16 pitch, s32 zigzag) {
|
||||
s32 tmp[64];
|
||||
s32* dst;
|
||||
s32 a;
|
||||
s32 iter;
|
||||
s32 d;
|
||||
s32 b1;
|
||||
s32 b2;
|
||||
s32 b3;
|
||||
s32 b4;
|
||||
s32 b5;
|
||||
s32 b6;
|
||||
s32 b7;
|
||||
s32 workspace[64];
|
||||
s32* workspaceCursor;
|
||||
s32 evenBaseDifference;
|
||||
s32 columnsRemaining;
|
||||
s32 evenBaseSum;
|
||||
s32 coefficient1;
|
||||
s32 coefficient2;
|
||||
s32 coefficient3;
|
||||
s32 coefficient4;
|
||||
s32 coefficient5;
|
||||
s32 coefficient6;
|
||||
s32 coefficient7;
|
||||
s32 v;
|
||||
s32 r;
|
||||
s32 done;
|
||||
s32 i;
|
||||
s32 rowCoefficientCount;
|
||||
s32 processedCoefficients;
|
||||
s32 column;
|
||||
s32 m;
|
||||
s32 n;
|
||||
s32 o;
|
||||
s32 x;
|
||||
s32 q;
|
||||
s32 e;
|
||||
s32 oddOutput1;
|
||||
s32 oddSumRotation;
|
||||
s32 oddOutput2;
|
||||
s32 evenOutput2;
|
||||
s32 u;
|
||||
s32 w;
|
||||
s32 p;
|
||||
s32 t;
|
||||
s32 evenOutput0;
|
||||
s32 oddOutput3;
|
||||
s32 rotation45;
|
||||
s32 z;
|
||||
s32 x_factor;
|
||||
s32 z_factor;
|
||||
s32 m_part;
|
||||
s32 p_part;
|
||||
s32 y;
|
||||
s32 oddSumDifference;
|
||||
s32 oddDifferenceSum;
|
||||
s32 oddHighRotation;
|
||||
s32 oddLowRotation;
|
||||
s32 evenOutput3;
|
||||
|
||||
if (zigzag == 0x11) {
|
||||
s32 val;
|
||||
val = clampS8(block[0] >> 11);
|
||||
memset(conv_row_ptr, (s8)val, 0x40);
|
||||
s32 sample;
|
||||
sample = clampS8(block[0] >> 11);
|
||||
memset(conv_row_ptr, (s8)sample, 0x40);
|
||||
return;
|
||||
}
|
||||
|
||||
r = (zigzag >> 4) * 8;
|
||||
rowCoefficientCount = (zigzag >> 4) * 8;
|
||||
if ((zigzag & 0xF) > 2) {
|
||||
goto mode_gt_2;
|
||||
goto fullRowTransform;
|
||||
}
|
||||
|
||||
dst = tmp;
|
||||
done = 0;
|
||||
for (; done < r; done += 8) {
|
||||
workspaceCursor = workspace;
|
||||
processedCoefficients = 0;
|
||||
for (; processedCoefficients < rowCoefficientCount; processedCoefficients += 8) {
|
||||
s32 dcValue;
|
||||
s32 oddCoefficient;
|
||||
|
||||
oddCoefficient = block[1];
|
||||
dcValue = block[0];
|
||||
t = oddCoefficient * 0xB5 >> 8;
|
||||
rotation45 = oddCoefficient * 0xB5 >> 8;
|
||||
v = oddCoefficient * 0x62 >> 8;
|
||||
u = v + t;
|
||||
u = v + rotation45;
|
||||
z = (oddCoefficient * 0x14E >> 8) - v;
|
||||
m = oddCoefficient + z;
|
||||
n = t + z;
|
||||
dst[0] = dcValue + m;
|
||||
dst[7] = dcValue - m;
|
||||
dst[1] = dcValue + n;
|
||||
dst[6] = dcValue - n;
|
||||
dst[2] = dcValue + u;
|
||||
dst[5] = dcValue - u;
|
||||
dst[3] = dcValue + v;
|
||||
dst[4] = dcValue - v;
|
||||
dst += 8;
|
||||
n = rotation45 + z;
|
||||
workspaceCursor[0] = dcValue + m;
|
||||
workspaceCursor[7] = dcValue - m;
|
||||
workspaceCursor[1] = dcValue + n;
|
||||
workspaceCursor[6] = dcValue - n;
|
||||
workspaceCursor[2] = dcValue + u;
|
||||
workspaceCursor[5] = dcValue - u;
|
||||
workspaceCursor[3] = dcValue + v;
|
||||
workspaceCursor[4] = dcValue - v;
|
||||
workspaceCursor += 8;
|
||||
block += 8;
|
||||
}
|
||||
dst = tmp + done;
|
||||
for (; done <= 0x38; done += 8) {
|
||||
memset(dst, 0, 0x20);
|
||||
dst += 8;
|
||||
workspaceCursor = workspace + processedCoefficients;
|
||||
for (; processedCoefficients <= 0x38; processedCoefficients += 8) {
|
||||
memset(workspaceCursor, 0, 0x20);
|
||||
workspaceCursor += 8;
|
||||
}
|
||||
goto epilogue;
|
||||
goto columnTransform;
|
||||
|
||||
mode_gt_2:
|
||||
dst = tmp;
|
||||
done = 0;
|
||||
for (; done < r; done += 8) {
|
||||
u32 ac;
|
||||
b4 = block[4];
|
||||
b6 = block[6];
|
||||
b2 = block[2];
|
||||
b1 = block[1];
|
||||
b7 = block[7];
|
||||
b5 = block[5];
|
||||
b3 = block[3];
|
||||
fullRowTransform:
|
||||
workspaceCursor = workspace;
|
||||
processedCoefficients = 0;
|
||||
for (; processedCoefficients < rowCoefficientCount; processedCoefficients += 8) {
|
||||
u32 acBits;
|
||||
coefficient4 = block[4];
|
||||
coefficient6 = block[6];
|
||||
coefficient2 = block[2];
|
||||
coefficient1 = block[1];
|
||||
coefficient7 = block[7];
|
||||
coefficient5 = block[5];
|
||||
coefficient3 = block[3];
|
||||
|
||||
ac = (u32)b4;
|
||||
ac |= (u32)b6;
|
||||
ac |= (u32)b2;
|
||||
ac |= (u32)b1;
|
||||
ac |= (u32)b7;
|
||||
ac |= (u32)b5;
|
||||
ac |= (u32)b3;
|
||||
if (ac == 0) {
|
||||
s32 val;
|
||||
val = block[0];
|
||||
dst[7] = val;
|
||||
dst[6] = val;
|
||||
dst[5] = val;
|
||||
dst[4] = val;
|
||||
dst[3] = val;
|
||||
dst[2] = val;
|
||||
dst[1] = val;
|
||||
dst[0] = val;
|
||||
acBits = (u32)coefficient4;
|
||||
acBits |= (u32)coefficient6;
|
||||
acBits |= (u32)coefficient2;
|
||||
acBits |= (u32)coefficient1;
|
||||
acBits |= (u32)coefficient7;
|
||||
acBits |= (u32)coefficient5;
|
||||
acBits |= (u32)coefficient3;
|
||||
if (acBits == 0) {
|
||||
s32 sample;
|
||||
sample = block[0];
|
||||
workspaceCursor[7] = sample;
|
||||
workspaceCursor[6] = sample;
|
||||
workspaceCursor[5] = sample;
|
||||
workspaceCursor[4] = sample;
|
||||
workspaceCursor[3] = sample;
|
||||
workspaceCursor[2] = sample;
|
||||
workspaceCursor[1] = sample;
|
||||
workspaceCursor[0] = sample;
|
||||
} else {
|
||||
s32 oddLowSum;
|
||||
s32 oddLowDifference;
|
||||
@@ -340,86 +346,86 @@ mode_gt_2:
|
||||
s32 oddHighDifference;
|
||||
s32 dcValue;
|
||||
|
||||
t = b2 - b6;
|
||||
oddLowSum = b5 + b3;
|
||||
oddLowDifference = b5 - b3;
|
||||
oddHighSum = b1 + b7;
|
||||
oddHighDifference = b1 - b7;
|
||||
u = b6 + b2;
|
||||
t = t * 0xB5 >> 8;
|
||||
x_factor = oddHighSum - oddLowSum;
|
||||
z_factor = oddLowDifference + oddHighDifference;
|
||||
rotation45 = coefficient2 - coefficient6;
|
||||
oddLowSum = coefficient5 + coefficient3;
|
||||
oddLowDifference = coefficient5 - coefficient3;
|
||||
oddHighSum = coefficient1 + coefficient7;
|
||||
oddHighDifference = coefficient1 - coefficient7;
|
||||
u = coefficient6 + coefficient2;
|
||||
rotation45 = rotation45 * 0xB5 >> 8;
|
||||
oddSumDifference = oddHighSum - oddLowSum;
|
||||
oddDifferenceSum = oddLowDifference + oddHighDifference;
|
||||
dcValue = block[0];
|
||||
a = dcValue - b4;
|
||||
x = x_factor * 0xB5 >> 8;
|
||||
d = dcValue + b4;
|
||||
u = t + u;
|
||||
v = a + t;
|
||||
z = z_factor * 0x62 >> 8;
|
||||
w = d + u;
|
||||
y = d - u;
|
||||
m_part = oddHighDifference * 0x14E >> 8;
|
||||
e = a - t;
|
||||
m = m_part - z;
|
||||
evenBaseDifference = dcValue - coefficient4;
|
||||
oddSumRotation = oddSumDifference * 0xB5 >> 8;
|
||||
evenBaseSum = dcValue + coefficient4;
|
||||
u = rotation45 + u;
|
||||
v = evenBaseDifference + rotation45;
|
||||
z = oddDifferenceSum * 0x62 >> 8;
|
||||
evenOutput0 = evenBaseSum + u;
|
||||
evenOutput3 = evenBaseSum - u;
|
||||
oddHighRotation = oddHighDifference * 0x14E >> 8;
|
||||
evenOutput2 = evenBaseDifference - rotation45;
|
||||
m = oddHighRotation - z;
|
||||
oddLowSum += m;
|
||||
n = oddHighSum + oddLowSum;
|
||||
o = x + m;
|
||||
dst[0] = w + n;
|
||||
p_part = oddLowDifference * 0x8B;
|
||||
dst[7] = w - n;
|
||||
p_part >>= 8;
|
||||
dst[1] = v + o;
|
||||
p = z + p_part;
|
||||
q = p + x;
|
||||
dst[6] = v - o;
|
||||
dst[2] = e + q;
|
||||
dst[5] = e - q;
|
||||
dst[3] = y + p;
|
||||
dst[4] = y - p;
|
||||
oddOutput1 = oddSumRotation + m;
|
||||
workspaceCursor[0] = evenOutput0 + n;
|
||||
oddLowRotation = oddLowDifference * 0x8B;
|
||||
workspaceCursor[7] = evenOutput0 - n;
|
||||
oddLowRotation >>= 8;
|
||||
workspaceCursor[1] = v + oddOutput1;
|
||||
oddOutput3 = z + oddLowRotation;
|
||||
oddOutput2 = oddOutput3 + oddSumRotation;
|
||||
workspaceCursor[6] = v - oddOutput1;
|
||||
workspaceCursor[2] = evenOutput2 + oddOutput2;
|
||||
workspaceCursor[5] = evenOutput2 - oddOutput2;
|
||||
workspaceCursor[3] = evenOutput3 + oddOutput3;
|
||||
workspaceCursor[4] = evenOutput3 - oddOutput3;
|
||||
}
|
||||
block += 8;
|
||||
dst += 8;
|
||||
workspaceCursor += 8;
|
||||
}
|
||||
|
||||
dst = tmp + done;
|
||||
for (; done <= 0x38; done += 8) {
|
||||
memset(dst, 0, 0x20);
|
||||
dst += 8;
|
||||
workspaceCursor = workspace + processedCoefficients;
|
||||
for (; processedCoefficients <= 0x38; processedCoefficients += 8) {
|
||||
memset(workspaceCursor, 0, 0x20);
|
||||
workspaceCursor += 8;
|
||||
}
|
||||
|
||||
epilogue:
|
||||
columnTransform:
|
||||
|
||||
dst = tmp + 7;
|
||||
for (iter = 8, i = 7; iter > 0; iter--, i--) {
|
||||
u32 ac;
|
||||
workspaceCursor = workspace + 7;
|
||||
for (columnsRemaining = 8, column = 7; columnsRemaining > 0; columnsRemaining--, column--) {
|
||||
u32 acBits;
|
||||
u8* output;
|
||||
b4 = dst[0x20];
|
||||
output = conv_row_ptr + i;
|
||||
b6 = dst[0x30];
|
||||
b2 = dst[0x10];
|
||||
b1 = dst[8];
|
||||
b7 = dst[0x38];
|
||||
b5 = dst[0x28];
|
||||
b3 = dst[0x18];
|
||||
coefficient4 = workspaceCursor[0x20];
|
||||
output = conv_row_ptr + column;
|
||||
coefficient6 = workspaceCursor[0x30];
|
||||
coefficient2 = workspaceCursor[0x10];
|
||||
coefficient1 = workspaceCursor[8];
|
||||
coefficient7 = workspaceCursor[0x38];
|
||||
coefficient5 = workspaceCursor[0x28];
|
||||
coefficient3 = workspaceCursor[0x18];
|
||||
|
||||
ac = (u32)b4;
|
||||
ac |= (u32)b6;
|
||||
ac |= (u32)b2;
|
||||
ac |= (u32)b1;
|
||||
ac |= (u32)b7;
|
||||
ac |= (u32)b5;
|
||||
ac |= (u32)b3;
|
||||
if (ac == 0) {
|
||||
s32 val;
|
||||
val = clampS8(*dst >> 11);
|
||||
output[56] = (u8)val;
|
||||
output[48] = (u8)val;
|
||||
output[40] = (u8)val;
|
||||
output[32] = (u8)val;
|
||||
output[24] = (u8)val;
|
||||
output[16] = (u8)val;
|
||||
output[8] = (u8)val;
|
||||
output[0] = (u8)val;
|
||||
acBits = (u32)coefficient4;
|
||||
acBits |= (u32)coefficient6;
|
||||
acBits |= (u32)coefficient2;
|
||||
acBits |= (u32)coefficient1;
|
||||
acBits |= (u32)coefficient7;
|
||||
acBits |= (u32)coefficient5;
|
||||
acBits |= (u32)coefficient3;
|
||||
if (acBits == 0) {
|
||||
s32 sample;
|
||||
sample = clampS8(*workspaceCursor >> 11);
|
||||
output[56] = (u8)sample;
|
||||
output[48] = (u8)sample;
|
||||
output[40] = (u8)sample;
|
||||
output[32] = (u8)sample;
|
||||
output[24] = (u8)sample;
|
||||
output[16] = (u8)sample;
|
||||
output[8] = (u8)sample;
|
||||
output[0] = (u8)sample;
|
||||
} else {
|
||||
s32 oddLowSum;
|
||||
s32 oddLowDifference;
|
||||
@@ -427,42 +433,42 @@ epilogue:
|
||||
s32 oddHighDifference;
|
||||
s32 dcValue;
|
||||
|
||||
t = b2 - b6;
|
||||
oddLowSum = b5 + b3;
|
||||
oddLowDifference = b5 - b3;
|
||||
oddHighSum = b1 + b7;
|
||||
oddHighDifference = b1 - b7;
|
||||
u = b6 + b2;
|
||||
t = t * 0xB5 >> 8;
|
||||
x_factor = oddHighSum - oddLowSum;
|
||||
z_factor = oddLowDifference + oddHighDifference;
|
||||
dcValue = *dst;
|
||||
a = dcValue - b4;
|
||||
x = x_factor * 0xB5 >> 8;
|
||||
d = dcValue + b4;
|
||||
u = t + u;
|
||||
v = a + t;
|
||||
z = z_factor * 0x62 >> 8;
|
||||
w = d + u;
|
||||
y = d - u;
|
||||
m_part = oddHighDifference * 0x14E >> 8;
|
||||
e = a - t;
|
||||
m = m_part - z;
|
||||
rotation45 = coefficient2 - coefficient6;
|
||||
oddLowSum = coefficient5 + coefficient3;
|
||||
oddLowDifference = coefficient5 - coefficient3;
|
||||
oddHighSum = coefficient1 + coefficient7;
|
||||
oddHighDifference = coefficient1 - coefficient7;
|
||||
u = coefficient6 + coefficient2;
|
||||
rotation45 = rotation45 * 0xB5 >> 8;
|
||||
oddSumDifference = oddHighSum - oddLowSum;
|
||||
oddDifferenceSum = oddLowDifference + oddHighDifference;
|
||||
dcValue = *workspaceCursor;
|
||||
evenBaseDifference = dcValue - coefficient4;
|
||||
oddSumRotation = oddSumDifference * 0xB5 >> 8;
|
||||
evenBaseSum = dcValue + coefficient4;
|
||||
u = rotation45 + u;
|
||||
v = evenBaseDifference + rotation45;
|
||||
z = oddDifferenceSum * 0x62 >> 8;
|
||||
evenOutput0 = evenBaseSum + u;
|
||||
evenOutput3 = evenBaseSum - u;
|
||||
oddHighRotation = oddHighDifference * 0x14E >> 8;
|
||||
evenOutput2 = evenBaseDifference - rotation45;
|
||||
m = oddHighRotation - z;
|
||||
oddLowSum += m;
|
||||
n = oddHighSum + oddLowSum;
|
||||
o = x + m;
|
||||
p_part = oddLowDifference * 0x8B >> 8;
|
||||
p = z + p_part;
|
||||
q = p + x;
|
||||
output[0] = (u8)clampS8((w + n) >> 11);
|
||||
output[56] = (u8)clampS8((w - n) >> 11);
|
||||
output[8] = (u8)clampS8((v + o) >> 11);
|
||||
output[48] = (u8)clampS8((v - o) >> 11);
|
||||
output[16] = (u8)clampS8((e + q) >> 11);
|
||||
output[40] = (u8)clampS8((e - q) >> 11);
|
||||
output[24] = (u8)clampS8((y + p) >> 11);
|
||||
output[32] = (u8)clampS8((y - p) >> 11);
|
||||
oddOutput1 = oddSumRotation + m;
|
||||
oddLowRotation = oddLowDifference * 0x8B >> 8;
|
||||
oddOutput3 = z + oddLowRotation;
|
||||
oddOutput2 = oddOutput3 + oddSumRotation;
|
||||
output[0] = (u8)clampS8((evenOutput0 + n) >> 11);
|
||||
output[56] = (u8)clampS8((evenOutput0 - n) >> 11);
|
||||
output[8] = (u8)clampS8((v + oddOutput1) >> 11);
|
||||
output[48] = (u8)clampS8((v - oddOutput1) >> 11);
|
||||
output[16] = (u8)clampS8((evenOutput2 + oddOutput2) >> 11);
|
||||
output[40] = (u8)clampS8((evenOutput2 - oddOutput2) >> 11);
|
||||
output[24] = (u8)clampS8((evenOutput3 + oddOutput3) >> 11);
|
||||
output[32] = (u8)clampS8((evenOutput3 - oddOutput3) >> 11);
|
||||
}
|
||||
dst--;
|
||||
workspaceCursor--;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,50 +46,50 @@ FAError FAAttach(u32 device, char* nand_path, u32 nand_size, FADrvTbl* table) {
|
||||
if (table == NULL) {
|
||||
return -2;
|
||||
}
|
||||
if (device == 2 && nand_path == NULL) {
|
||||
if (device == FA_DEVICE_NAND && nand_path == NULL) {
|
||||
return -2;
|
||||
}
|
||||
if (device == 3 && table->pPart == NULL) {
|
||||
return -2;
|
||||
}
|
||||
if (device <= 2) {
|
||||
if (device <= FA_DEVICE_NAND) {
|
||||
if (pdm_open_disk(&drvInitFunc.entries[(u8)device], &disk) != 0) {
|
||||
return -1;
|
||||
return FA_ERR_SYSTEM;
|
||||
}
|
||||
if (pdm_open_partition(disk, 0, &table->pPart) != 0) {
|
||||
return -1;
|
||||
return FA_ERR_SYSTEM;
|
||||
}
|
||||
}
|
||||
drives[0] = table;
|
||||
drives[1] = NULL;
|
||||
if (device == 2) {
|
||||
if (device == FA_DEVICE_NAND) {
|
||||
memcpy(nand.path, nand_path, 78);
|
||||
nand.size = nand_size;
|
||||
}
|
||||
if (device == 2) {
|
||||
if (device == FA_DEVICE_NAND) {
|
||||
error = pfstub_attach(drives, &nand);
|
||||
} else {
|
||||
error = pfstub_attach(drives, NULL);
|
||||
}
|
||||
if (error != 0) {
|
||||
return -1;
|
||||
return FA_ERR_SYSTEM;
|
||||
}
|
||||
index = table->drive - 'A';
|
||||
if (device <= 2) {
|
||||
if (device <= FA_DEVICE_NAND) {
|
||||
gOpenDisk[index] = disk;
|
||||
gOpenPartition[index] = table->pPart;
|
||||
if (device == 0) {
|
||||
if (device == FA_DEVICE_SD) {
|
||||
if (pfd_sddrv_is_media_insert()) {
|
||||
drives[0]->stat |= 0x10;
|
||||
drives[0]->stat |= FA_DRV_TBL_STAT_INSERTED;
|
||||
}
|
||||
} else if (device == 1) {
|
||||
} else if (device == FA_DEVICE_USB) {
|
||||
if (pfd_mscdrv_is_media_insert(disk)) {
|
||||
drives[0]->stat |= 0x10;
|
||||
drives[0]->stat |= FA_DRV_TBL_STAT_INSERTED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
gOpenDisk[index] = NULL;
|
||||
gOpenPartition[index] = NULL;
|
||||
}
|
||||
return 0;
|
||||
return FA_ERR_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -10,15 +10,15 @@ FAError FADetach(s8 drive) {
|
||||
FADisk* disk = gOpenDisk[drive - 'A'];
|
||||
FAPartition* partition = gOpenPartition[drive - 'A'];
|
||||
if (pfstub_detach(drive) != 0) {
|
||||
return -1;
|
||||
return FA_ERR_SYSTEM;
|
||||
}
|
||||
if (disk != NULL && partition != NULL) {
|
||||
if (pdm_close_partition(partition) != 0) {
|
||||
return -1;
|
||||
return FA_ERR_SYSTEM;
|
||||
}
|
||||
if (pdm_close_disk(disk) != 0) {
|
||||
return -1;
|
||||
return FA_ERR_SYSTEM;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return FA_ERR_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ extern s32 pfstub_errnum(void);
|
||||
|
||||
FAError FAErrnum(void) {
|
||||
s32 error = pfstub_errnum();
|
||||
if (error == 5) {
|
||||
return 5;
|
||||
if (error == FA_ERR_EIO) {
|
||||
return FA_ERR_EIO;
|
||||
}
|
||||
return error == 0 ? 0 : error;
|
||||
return error == FA_ERR_SUCCESS ? FA_ERR_SUCCESS : error;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ extern s32 pfstub_init_prfile2(s32 config, void* parameter);
|
||||
FAError FAInit(int flag) {
|
||||
s32 error;
|
||||
if (FAInInitializing == 1) {
|
||||
return -1;
|
||||
return FA_ERR_SYSTEM;
|
||||
}
|
||||
FAInInitializing = 1;
|
||||
if (!FADiskInitialized) {
|
||||
@@ -19,7 +19,7 @@ FAError FAInit(int flag) {
|
||||
FADiskInitialized = error == 0;
|
||||
if (error != 0) {
|
||||
FAInInitializing = 0;
|
||||
return -1;
|
||||
return FA_ERR_SYSTEM;
|
||||
}
|
||||
}
|
||||
if (!FAFileSysInitialized) {
|
||||
@@ -27,10 +27,10 @@ FAError FAInit(int flag) {
|
||||
FAFileSysInitialized = error == 0;
|
||||
if (error == -1) {
|
||||
FAInInitializing = 0;
|
||||
return -1;
|
||||
return FA_ERR_SYSTEM;
|
||||
}
|
||||
}
|
||||
FAInInitializing = 0;
|
||||
OSRegisterVersion(__FAVersion[0]);
|
||||
return 0;
|
||||
return FA_ERR_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -19,12 +19,12 @@ void FANotifyUSBEject(s8 drive);
|
||||
FAError FARegistCB(s32 device, FAInsertCallback insert, FAEjectCallback eject) {
|
||||
s32 error;
|
||||
switch (device) {
|
||||
case 0:
|
||||
case FA_DEVICE_SD:
|
||||
gMediaInOutCallback.sd_insert = insert;
|
||||
gMediaInOutCallback.sd_eject = eject;
|
||||
error = pfd_sddrv_registar_callback(FANotifySDInsert, FANotifySDEject);
|
||||
break;
|
||||
case 1:
|
||||
case FA_DEVICE_USB:
|
||||
gMediaInOutCallback.usb_insert = insert;
|
||||
gMediaInOutCallback.usb_eject = eject;
|
||||
error = pfd_mscdrv_registar_callback(FANotifyUSBInsert, FANotifyUSBEject);
|
||||
@@ -33,9 +33,9 @@ FAError FARegistCB(s32 device, FAInsertCallback insert, FAEjectCallback eject) {
|
||||
return -2;
|
||||
}
|
||||
if (error != 0) {
|
||||
return -1;
|
||||
return FA_ERR_SYSTEM;
|
||||
}
|
||||
return 0;
|
||||
return FA_ERR_SUCCESS;
|
||||
}
|
||||
|
||||
void FANotifySDInsert(s8 drive) {
|
||||
|
||||
@@ -85,18 +85,18 @@ static s32 fa_nanddrv_physical_write(u32, const u8*, u32, u32, u32*, PDM_DISK*);
|
||||
|
||||
static s32 fa_nanddrv_RelateNANDFileToDsk(PDM_DISK* disk, NAND_DISK_INFO* info, s32 format) {
|
||||
s32 error = NANDChangeDir(NAND_Org_Path);
|
||||
if (error != 0) { return error; }
|
||||
if (info->flags & 4) { error = 0; }
|
||||
else { error = NANDOpen(info->path, &info->file, 3); }
|
||||
if (format) { error = -12; }
|
||||
if (error != NAND_RESULT_OK) { return error; }
|
||||
if (info->flags & 4) { error = NAND_RESULT_OK; }
|
||||
else { error = NANDOpen(info->path, &info->file, NAND_ACCESS_RW); }
|
||||
if (format) { error = NAND_RESULT_NOEXISTS; }
|
||||
switch (error) {
|
||||
case -12:
|
||||
case NAND_RESULT_NOEXISTS:
|
||||
error = fa_nanddrv_CreateNANDFileForDsk(info);
|
||||
if (error == 0) { info->disk = disk; }
|
||||
if (error == NAND_RESULT_OK) { info->disk = disk; }
|
||||
break;
|
||||
case 0:
|
||||
info->disk = disk;
|
||||
error = 0;
|
||||
error = NAND_RESULT_OK;
|
||||
break;
|
||||
}
|
||||
return error;
|
||||
@@ -110,28 +110,28 @@ static s32 fa_nanddrv_CreateNANDFileForDsk(NAND_DISK_INFO* info) {
|
||||
s32 error;
|
||||
u32 remaining;
|
||||
error = fa_nanddrv_ParseCreateNANDFile(info);
|
||||
if (error != 0) { return error; }
|
||||
if (error != NAND_RESULT_OK) { return error; }
|
||||
pf_memset(boot, 0, 512);
|
||||
clusters = 0;
|
||||
fa_nanddrv_BuildUpBootSector(info, boot, &type, 0);
|
||||
if (type != fa_nanddrv_VerifyBPB(boot, &clusters)) { fa_nanddrv_BuildUpBootSector(info, boot, &type, clusters); }
|
||||
error = NANDWrite(&info->file, boot, 512);
|
||||
if (error < 0) { NANDClose(&info->file); NANDDelete(info->path); return error; }
|
||||
if (error < NAND_RESULT_OK) { NANDClose(&info->file); NANDDelete(info->path); return error; }
|
||||
remaining = info->file_size - 512;
|
||||
if (type == PDM_FAT_32) {
|
||||
fa_nanddrv_BuildUpFSInfoSector(fsinfo);
|
||||
error = NANDWrite(&info->file, fsinfo, 512);
|
||||
if (error < 0) { NANDClose(&info->file); NANDDelete(info->path); return error; }
|
||||
if (error < NAND_RESULT_OK) { NANDClose(&info->file); NANDDelete(info->path); return error; }
|
||||
remaining -= 512;
|
||||
}
|
||||
pf_memset(zeros, 0, 512);
|
||||
for (; remaining >= 512; remaining -= 512) {
|
||||
error = NANDWrite(&info->file, zeros, 512);
|
||||
if (error < 0) { NANDClose(&info->file); NANDDelete(info->path); return error; }
|
||||
if (error < NAND_RESULT_OK) { NANDClose(&info->file); NANDDelete(info->path); return error; }
|
||||
}
|
||||
if (remaining) {
|
||||
error = NANDWrite(&info->file, zeros, remaining);
|
||||
if (error < 0) { NANDClose(&info->file); NANDDelete(info->path); return error; }
|
||||
if (error < NAND_RESULT_OK) { NANDClose(&info->file); NANDDelete(info->path); return error; }
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -150,25 +150,25 @@ static s32 fa_nanddrv_ParseCreateNANDFile(NAND_DISK_INFO* info) {
|
||||
switch (*path) {
|
||||
case '/':
|
||||
if (length == 0) {
|
||||
if (position == 0) { error = NANDChangeDir("/"); if (error != 0) { return error; } }
|
||||
if (position == 0) { error = NANDChangeDir("/"); if (error != NAND_RESULT_OK) { return error; } }
|
||||
path++;
|
||||
break;
|
||||
}
|
||||
if (path[1] == 0) {
|
||||
if (length > 12) { return -20; }
|
||||
error = NANDCreate(name, 0x30, 0);
|
||||
if (error == 0 || error == -6) {
|
||||
NANDOpen(name, &info->file, 3);
|
||||
error = NANDCreate(name, NAND_PERM_USER, 0);
|
||||
if (error == NAND_RESULT_OK || error == NAND_RESULT_EXISTS) {
|
||||
NANDOpen(name, &info->file, NAND_ACCESS_RW);
|
||||
error = NANDChangeDir(NAND_Org_Path);
|
||||
}
|
||||
return error;
|
||||
}
|
||||
if (length > 11) { return -20; }
|
||||
if (pf_strcmp(name, "..") != 0) { error = NANDCreateDir(name, 0x30, 0); }
|
||||
else { error = 0; }
|
||||
if (error == 0 || error == -6 || error == -1) {
|
||||
if (pf_strcmp(name, "..") != 0) { error = NANDCreateDir(name, NAND_PERM_USER, 0); }
|
||||
else { error = NAND_RESULT_OK; }
|
||||
if (error == NAND_RESULT_OK || error == NAND_RESULT_EXISTS || error == NAND_RESULT_ACCESS) {
|
||||
error = NANDChangeDir(name);
|
||||
if (error != 0) { return error; }
|
||||
if (error != NAND_RESULT_OK) { return error; }
|
||||
} else {
|
||||
return error;
|
||||
}
|
||||
@@ -179,9 +179,9 @@ static s32 fa_nanddrv_ParseCreateNANDFile(NAND_DISK_INFO* info) {
|
||||
break;
|
||||
case 0:
|
||||
if (length > 12) { return -20; }
|
||||
error = NANDCreate(name, 0x30, 0);
|
||||
if (error == 0 || error == -6) {
|
||||
NANDOpen(name, &info->file, 3);
|
||||
error = NANDCreate(name, NAND_PERM_USER, 0);
|
||||
if (error == NAND_RESULT_OK || error == NAND_RESULT_EXISTS) {
|
||||
NANDOpen(name, &info->file, NAND_ACCESS_RW);
|
||||
error = NANDChangeDir(NAND_Org_Path);
|
||||
}
|
||||
return error;
|
||||
@@ -220,7 +220,7 @@ static s32 fa_nanddrv_VerifyBPB(u8* buf, u32* clusters) {
|
||||
total = (u32)(total - first) >> cluster_log;
|
||||
if (total < 4085) { return 0; }
|
||||
result = PDM_FAT_32;
|
||||
if ((u32)total < 65525) { result = PDM_FAT_16; }
|
||||
if (total < 65525) { result = PDM_FAT_16; }
|
||||
return result;
|
||||
}
|
||||
#pragma dont_inline on
|
||||
@@ -279,8 +279,8 @@ static s32 fa_nanddrv_BuildUpBootSector(NAND_DISK_INFO* info, u8* buf, PDM_FAT_T
|
||||
s32 fa_nanddrv_init(PDM_DISK* disk) {
|
||||
if (disk == 0) { return -20; }
|
||||
if (NAND_Init == 0) {
|
||||
if (NANDInit() != 0) { return -21; }
|
||||
if (NANDGetCurrentDir(NAND_Org_Path) != 0) { return -21; }
|
||||
if (NANDInit() != NAND_RESULT_OK) { return -21; }
|
||||
if (NANDGetCurrentDir(NAND_Org_Path) != NAND_RESULT_OK) { return -21; }
|
||||
NAND_Init++;
|
||||
}
|
||||
pdm_disk_notify_media_insert(disk);
|
||||
@@ -350,9 +350,9 @@ s32 fa_nanddrv_unmount(PDM_DISK* disk) {
|
||||
if (error != 0) { result = error; goto flush_done; }
|
||||
error = NANDClose(&info->file);
|
||||
if (error < 0) { result = error; goto flush_done; }
|
||||
error = NANDOpen(info->path, &info->file, 3);
|
||||
error = NANDOpen(info->path, &info->file, NAND_ACCESS_RW);
|
||||
if (error < 0) { result = error; goto flush_done; }
|
||||
error = NANDSeek(&info->file, position, 0);
|
||||
error = NANDSeek(&info->file, position, NAND_SEEK_BEG);
|
||||
result = error < 0 ? error : 0;
|
||||
flush_done:
|
||||
error = result;
|
||||
@@ -443,7 +443,7 @@ static s32 fa_nanddrv_physical_read(u32 count, u8* buf, u32 block, u32 bps, u32*
|
||||
remaining = count * bps;
|
||||
file_size = info->file_size;
|
||||
wanted = block * bps;
|
||||
if (NANDTell(&info->file, &position) != 0 || position != wanted) { error = NANDSeek(&info->file, wanted, 0); }
|
||||
if (NANDTell(&info->file, &position) != NAND_RESULT_OK || position != wanted) { error = NANDSeek(&info->file, wanted, NAND_SEEK_BEG); }
|
||||
else { error = 0; }
|
||||
if (error >= 0) {
|
||||
if (wanted + remaining > file_size) {
|
||||
@@ -497,7 +497,7 @@ static s32 fa_nanddrv_physical_write(u32 count, const u8* buf, u32 block, u32 bp
|
||||
remaining = count * bps;
|
||||
file_size = info->file_size;
|
||||
wanted = block * bps;
|
||||
if (NANDTell(&info->file, &position) != 0 || position != wanted) { error = NANDSeek(&info->file, wanted, 0); }
|
||||
if (NANDTell(&info->file, &position) != NAND_RESULT_OK || position != wanted) { error = NANDSeek(&info->file, wanted, NAND_SEEK_BEG); }
|
||||
else { error = 0; }
|
||||
if (error >= 0) {
|
||||
if (wanted + remaining > file_size) {
|
||||
|
||||
@@ -940,7 +940,7 @@ s32 pfd_sddrv_store_bpb_buf(PFD_SDDRV_FORMAT_DATA* format_data, u8* sector_buffe
|
||||
pfd_sddrv_store_le16(sector_buffer, boot_sector->reserved_sector_count, offsetof(PFD_SDDRV_BPB, reserved_sector_count), 1);
|
||||
boot_sector->fat_count = 2;
|
||||
pfd_sddrv_store_le16(sector_buffer, boot_sector->root_entry_count, offsetof(PFD_SDDRV_BPB, root_entry_count), 0x200);
|
||||
pfd_sddrv_store_le16(sector_buffer, boot_sector->total_sectors_16, offsetof(PFD_SDDRV_BPB, total_sectors_16), (u16)sectors_16);
|
||||
pfd_sddrv_store_le16(sector_buffer, boot_sector->total_sectors_16, offsetof(PFD_SDDRV_BPB, total_sectors_16), sectors_16);
|
||||
boot_sector->media_descriptor = 0xf8;
|
||||
pfd_sddrv_store_le16(sector_buffer, boot_sector->sectors_per_fat_16, offsetof(PFD_SDDRV_BPB, sectors_per_fat_16), (u16)format_data->sectors_per_fat);
|
||||
pfd_sddrv_store_le16(sector_buffer, boot_sector->sectors_per_track, offsetof(PFD_SDDRV_BPB, sectors_per_track), (u16)settings.root_entries);
|
||||
@@ -1245,11 +1245,11 @@ s32 pfd_sddrv_store_fat32_mbr_buf(PFD_SDDRV_FORMAT_DATA* format_data, u8* sector
|
||||
master_boot_record = (PFD_SDDRV_MBR*)sector_buffer;
|
||||
partition = &master_boot_record->partitions[0];
|
||||
partition->boot_indicator = 0;
|
||||
partition->start_head = (u8)start_head;
|
||||
partition->start_head = start_head;
|
||||
pfd_sddrv_store_le16(sector_buffer, partition->start_sector_cylinder, offsetof(PFD_SDDRV_MBR, partitions) + offsetof(PFD_SDDRV_PARTITION_ENTRY, start_sector_cylinder),
|
||||
((start_cylinder & 0xff) << 8) + ((start_sector & 0x3f) | ((start_cylinder & 0x300) >> 2)));
|
||||
partition->partition_type = partition_type;
|
||||
partition->end_head = (u8)end_head;
|
||||
partition->end_head = end_head;
|
||||
pfd_sddrv_store_le16(sector_buffer, partition->end_sector_cylinder, offsetof(PFD_SDDRV_MBR, partitions) + offsetof(PFD_SDDRV_PARTITION_ENTRY, end_sector_cylinder),
|
||||
((end_cylinder & 0xff) << 8) + ((end_sector & 0x3f) | ((end_cylinder & 0x300) >> 2)));
|
||||
pfd_sddrv_store_le32(sector_buffer, partition->first_sector, offsetof(PFD_SDDRV_MBR, partitions) + offsetof(PFD_SDDRV_PARTITION_ENTRY, first_sector), format_data->partition_start_sector);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <private/fa/pdm.h>
|
||||
extern void* pf_memset(void*, pf_u8, pf_u32);
|
||||
PDM_DISK_SET pdm_disk_set;
|
||||
PDM_DISK_TBL pdm_drv_tbl[26];
|
||||
PDM_DISK_TBL pdm_drv_tbl[PDM_DRIVE_COUNT];
|
||||
|
||||
pf_s32 pdm_disk_convert_sector_into_block(PDM_DISK* p_disk, pf_u32 start, pf_u32 count, pf_u32 bytes_per_sector, pf_u32* p_start, pf_u32* p_count) {
|
||||
pf_u32 ratio;
|
||||
@@ -44,11 +44,11 @@ pf_s32 pdm_disk_add_disk(PDM_INIT_DISK* p_init_disk_tbl, PDM_DISK** pp_disk) {
|
||||
pf_u16 disk_no;
|
||||
PDM_DISK* p_disk;
|
||||
*pp_disk = PF_NULL;
|
||||
if (pdm_disk_set.num_allocated_disk >= 26) { return 8; }
|
||||
for (disk_no = 0; disk_no < 26; disk_no++) {
|
||||
if (pdm_disk_set.num_allocated_disk >= PDM_DRIVE_COUNT) { return 8; }
|
||||
for (disk_no = 0; disk_no < PDM_DRIVE_COUNT; disk_no++) {
|
||||
if (!(pdm_disk_set.disk[disk_no].status & 1)) { break; }
|
||||
}
|
||||
if (disk_no >= 26) { return 8; }
|
||||
if (disk_no >= PDM_DRIVE_COUNT) { return 8; }
|
||||
p_driver = &pdm_drv_tbl[disk_no];
|
||||
p_init_disk_tbl->p_func(p_driver, p_init_disk_tbl->ui_ext);
|
||||
p_disk = &pdm_disk_set.disk[disk_no];
|
||||
|
||||
@@ -177,11 +177,11 @@ pf_s32 pdm_part_get_partition(PDM_DISK* p_disk, pf_u32 id, PDM_PARTITION** pp_pa
|
||||
pf_s32 err;
|
||||
pf_u16 index;
|
||||
*pp_part = PF_NULL;
|
||||
if (pdm_disk_set.num_partition >= 26) { return 10; }
|
||||
for (index = 0; index < 26; index++) {
|
||||
if (pdm_disk_set.num_partition >= PDM_DRIVE_COUNT) { return 10; }
|
||||
for (index = 0; index < PDM_DRIVE_COUNT; index++) {
|
||||
if (!(pdm_disk_set.partition[index].status & 1)) { break; }
|
||||
}
|
||||
if (index == 26) { return 10; }
|
||||
if (index == PDM_DRIVE_COUNT) { return 10; }
|
||||
err = pdm_disk_set_disk(p_disk, &pdm_disk_set.partition[index]);
|
||||
if (err != 0) { return err; }
|
||||
pdm_disk_set.num_partition++;
|
||||
@@ -298,7 +298,7 @@ pf_s32 pdm_part_unregister_callback(PDM_PARTITION* p_part) {
|
||||
}
|
||||
void pdm_part_set_change_media_state(PDM_DISK* p_disk, pf_bool is_inserted) {
|
||||
pf_u16 index;
|
||||
for (index = 0; index < 26; index++) {
|
||||
for (index = 0; index < PDM_DRIVE_COUNT; index++) {
|
||||
if ((pdm_disk_set.partition[index].status & 1) && pdm_disk_set.partition[index].p_disk == p_disk) {
|
||||
PDM_PARTITION* p_part = &pdm_disk_set.partition[index];
|
||||
p_part->status |= 2;
|
||||
|
||||
@@ -150,8 +150,8 @@ pf_u16* pf_w_strcpy(pf_u16* dst, const pf_u16* src) {
|
||||
}
|
||||
|
||||
pf_s32 pf_w_strcmp(const pf_u16* s1, const pf_u16* s2) {
|
||||
const pf_u16* p1 = (pf_u16*)s1;
|
||||
const pf_u16* p2 = (pf_u16*)s2;
|
||||
const pf_u16* p1 = s1;
|
||||
const pf_u16* p2 = s2;
|
||||
|
||||
while (*p1 != 0 && *p2 != 0 && *p1 == *p2) {
|
||||
p1++;
|
||||
@@ -162,8 +162,8 @@ pf_s32 pf_w_strcmp(const pf_u16* s1, const pf_u16* s2) {
|
||||
}
|
||||
|
||||
pf_s32 pf_w_strncmp(const pf_u16* s1, const pf_u16* s2, pf_u32 length) {
|
||||
const pf_u16* p1 = (pf_u16*)s1;
|
||||
const pf_u16* p2 = (pf_u16*)s2;
|
||||
const pf_u16* p1 = s1;
|
||||
const pf_u16* p2 = s2;
|
||||
|
||||
while (length-- != 0) {
|
||||
if (*p1 == 0 || *p2 == 0 || *p1 != *p2) {
|
||||
|
||||
@@ -129,12 +129,12 @@ pf_s32 VFiPFCODE_CP932_Unicode2OEM(const pf_u16* uc_src, pf_s8* cp932_dst) {
|
||||
}
|
||||
|
||||
pf_s32 VFiPFCODE_CP932_OEMCharWidth(const pf_s8* buf) {
|
||||
pf_u16 tmp;
|
||||
pf_u16 unicode;
|
||||
pf_s32 width;
|
||||
pf_s16 oem_width;
|
||||
pf_s16 uni_width;
|
||||
|
||||
width = VFiPFCODE_CP932_OEM2Unicode(buf, &tmp);
|
||||
width = VFiPFCODE_CP932_OEM2Unicode(buf, &unicode);
|
||||
VFiPFCODE_Divide_Width(width, &oem_width, &uni_width);
|
||||
return (pf_s32)oem_width;
|
||||
}
|
||||
@@ -163,11 +163,11 @@ pf_bool VFiPFCODE_CP932_isOEMMBchar(pf_s8 cp932, pf_u32 num) {
|
||||
}
|
||||
|
||||
pf_s32 VFiPFCODE_CP932_UnicodeCharWidth(const pf_u16* buf) {
|
||||
pf_s8 tmp[2];
|
||||
pf_s8 encoded[2];
|
||||
pf_s32 width;
|
||||
pf_s16 oem_width;
|
||||
pf_s16 uni_width;
|
||||
width = VFiPFCODE_CP932_Unicode2OEM(buf, tmp);
|
||||
width = VFiPFCODE_CP932_Unicode2OEM(buf, encoded);
|
||||
VFiPFCODE_Divide_Width(width, &oem_width, &uni_width);
|
||||
return uni_width;
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ pf_s32 PFENT_searchEmptyTailSFN(PFENTRY_FFD* p_ffd, pf_u32 tail_index, const pf_
|
||||
pf_memset(p_tail_bit, 0, p_vol->tail_entry.tracker_size * 4);
|
||||
iter.ffd = *p_ffd;
|
||||
|
||||
for (err = PFENT_ITER_IteratorInitialize(&iter, 0); PFENT_ITER_IsAtLogicalEnd(&iter) == PF_FALSE;
|
||||
for (err = PFENT_ITER_IteratorInitialize(&iter, 0); !PFENT_ITER_IsAtLogicalEnd(&iter);
|
||||
err = PFENT_ITER_Advance(&iter, PF_FALSE)) {
|
||||
if (err != 0) {
|
||||
return err;
|
||||
|
||||
@@ -274,7 +274,7 @@ pf_s32 PFENT_ITER_DoFindEntry(PFITER_ENT_ITER* p_iter, PF_DIR_ENT* p_ent, PF_STR
|
||||
goto finish;
|
||||
}
|
||||
}
|
||||
for (; PFENT_ITER_IsAtLogicalEnd(p_iter) == PF_FALSE; err = AdvanceIterator(p_iter, 0)) {
|
||||
for (; !PFENT_ITER_IsAtLogicalEnd(p_iter); err = AdvanceIterator(p_iter, 0)) {
|
||||
pf_s32 attr;
|
||||
if (err != 0) return err;
|
||||
if (p_iter->buf[0] == 0) break;
|
||||
@@ -614,7 +614,7 @@ pf_s32 PFENT_ITER_FindDirEntryFromCluster(PFITER_ENT_ITER* p_iter, PF_DIR_ENT* p
|
||||
p_ent->ordinal = 0;
|
||||
p_ent->check_sum = 0;
|
||||
if ((p_ent->attr & 0x10) && p_ent->start_cluster == 1) return 2;
|
||||
for (; PFENT_ITER_IsAtLogicalEnd(p_iter) == PF_FALSE; err = AdvanceIterator(p_iter, PF_FALSE)) {
|
||||
for (; !PFENT_ITER_IsAtLogicalEnd(p_iter); err = AdvanceIterator(p_iter, PF_FALSE)) {
|
||||
if (err != 0) {
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ pf_s32 PFFAT12_WriteFATEntryWithBuf(PF_VOLUME* p_vol, pf_s16 cluster, pf_u16 val
|
||||
p_page->sector = next_sector;
|
||||
p_page->p_buf[0] = value >> 4;
|
||||
} else {
|
||||
*(p_page->p_buf + ((pf_u16)offset_in_sector + 1)) = value >> 4;
|
||||
p_page->p_buf[(pf_u16)offset_in_sector + 1] = value >> 4;
|
||||
}
|
||||
} else {
|
||||
p_page->p_buf[(pf_u16)offset_in_sector] = value;
|
||||
@@ -165,7 +165,7 @@ pf_s32 PFFAT12_WriteFATEntryWithBuf(PF_VOLUME* p_vol, pf_s16 cluster, pf_u16 val
|
||||
p_page->sector = next_sector;
|
||||
p_page->p_buf[0] = (p_page->p_buf[0] & 0xF0) | ((pf_u8)(value >> 8));
|
||||
} else {
|
||||
*(p_page->p_buf + ((pf_u16)offset_in_sector + 1)) = (*(p_page->p_buf + ((pf_u16)offset_in_sector + 1)) & 0xF0) | ((pf_u8)(value >> 8));
|
||||
p_page->p_buf[(pf_u16)offset_in_sector + 1] = (p_page->p_buf[(pf_u16)offset_in_sector + 1] & 0xF0) | ((pf_u8)(value >> 8));
|
||||
}
|
||||
}
|
||||
if (err != 0) { result = err; }
|
||||
@@ -220,7 +220,7 @@ pf_s32 PFFAT12_ReadFATEntryWithBuf(PF_VOLUME* p_vol , pf_u16 cluster , pf_u32* p
|
||||
LOAD_FAT_SECTOR(0);
|
||||
state.offset &= p_vol->bpb.bytes_per_sector - 1;
|
||||
if (state.offset == (p_vol->bpb.bytes_per_sector - 1)) {
|
||||
*p_value = *(p_page->p_buf + state.offset);
|
||||
*p_value = p_page->p_buf[state.offset];
|
||||
if (p_page->option == 1) {
|
||||
for (state.err = 0; (pf_u16)state.err < p_vol->bpb.num_active_FATs; state.err++) {
|
||||
VFiPFSEC_WriteFAT(p_vol, p_page->p_buf, p_page->sector + (pf_u16)state.err * p_vol->bpb.sectors_per_FAT, 0, p_vol->bpb.bytes_per_sector);
|
||||
@@ -231,7 +231,7 @@ pf_s32 PFFAT12_ReadFATEntryWithBuf(PF_VOLUME* p_vol , pf_u16 cluster , pf_u32* p
|
||||
p_page->sector = state.sector + 1;
|
||||
*p_value += (pf_u16)(*p_page->p_buf) << 8;
|
||||
} else {
|
||||
*p_value = ((pf_u16)p_page->p_buf[state.offset + 1] << 8) + *(p_page->p_buf + state.offset);
|
||||
*p_value = ((pf_u16)p_page->p_buf[state.offset + 1] << 8) + p_page->p_buf[state.offset];
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#define PF_FA_STR_LAYOUT
|
||||
#include <decomp/utils.h>
|
||||
#include <revolution/fa/types.h>
|
||||
#include <private/vf/PrFILE2/fatfs/pf_volume.h>
|
||||
#include <private/vf/PrFILE2/fatfs/pf_dir.h>
|
||||
#include <private/vf/PrFILE2/fatfs/pf_path.h>
|
||||
@@ -1717,13 +1718,13 @@ pf_s32 PFFILE_fseek(PFFILE_FILE* file, pf_s32 offset, pf_s32 origin) {
|
||||
return 0x26;
|
||||
}
|
||||
switch (origin) {
|
||||
case 1:
|
||||
case FA_SEEK_ORIGIN_CURRENT:
|
||||
file_io = file->cursor.position;
|
||||
break;
|
||||
case 0:
|
||||
case FA_SEEK_ORIGIN_BEGIN:
|
||||
file_io = 0;
|
||||
break;
|
||||
case 2:
|
||||
case FA_SEEK_ORIGIN_END:
|
||||
file_io = file->p_sfd->dir_entry.file_size;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -149,7 +149,7 @@ static pf_u32 PFPATH_UNI_ConvertFWchar(pf_u16 src, pf_u16* dst) {
|
||||
}
|
||||
|
||||
static pf_u32 PFPATH_OEM_ConvertFWchar(const pf_s8* src, pf_u16* dst) {
|
||||
pf_vol_set.codeset.oem2unicode((pf_s8*)src, dst);
|
||||
pf_vol_set.codeset.oem2unicode(src, dst);
|
||||
if (PFPATH_UNI_ConvertFWchar((pf_u16)*dst, dst) == 1) {
|
||||
pf_vol_set.codeset.unicode2oem(dst, (pf_s8*)dst);
|
||||
*dst = (pf_u16)*dst;
|
||||
@@ -201,9 +201,9 @@ static pf_u16 PFPATH_GetNextCharOfFileName(PF_FILE_NAME_ITER* p_name) {
|
||||
|
||||
pf_u16 PFPATH_GetNextCharOfPattern(PF_STR* p_pattern, pf_u32 name_kind) {
|
||||
pf_u16 wc;
|
||||
pf_u16 tmp_wc;
|
||||
pf_u16 oem_character;
|
||||
pf_s8 pattern[3];
|
||||
pf_u16 twc;
|
||||
pf_u16 fullwidth_character;
|
||||
|
||||
if (p_pattern->code_mode == 1) {
|
||||
pattern[0] = *p_pattern->p_head++;
|
||||
@@ -236,12 +236,11 @@ pf_u16 PFPATH_GetNextCharOfPattern(PF_STR* p_pattern, pf_u32 name_kind) {
|
||||
if (name_kind == 0) {
|
||||
PF_PATH_VOLUME_SET* volume = &pf_vol_set;
|
||||
|
||||
volume->codeset.unicode2oem(&wc, (pf_s8*)&tmp_wc);
|
||||
tmp_wc = (pf_u16)tmp_wc;
|
||||
if (volume->codeset.is_oem_mb_char((pf_u8)(tmp_wc >> 8), 1) != 0) {
|
||||
wc = tmp_wc;
|
||||
volume->codeset.unicode2oem(&wc, (pf_s8*)&oem_character);
|
||||
if (volume->codeset.is_oem_mb_char((pf_u8)(oem_character >> 8), 1) != 0) {
|
||||
wc = oem_character;
|
||||
} else {
|
||||
pattern[0] = (pf_u8)(tmp_wc >> 8);
|
||||
pattern[0] = (pf_u8)(oem_character >> 8);
|
||||
if ((volume->config & 0x10000) != 0 || VALID_PATH_CHAR(pattern[0], 0x02)) {
|
||||
wc = (pf_u8)pattern[0];
|
||||
} else {
|
||||
@@ -252,8 +251,8 @@ pf_u16 PFPATH_GetNextCharOfPattern(PF_STR* p_pattern, pf_u32 name_kind) {
|
||||
}
|
||||
wc = (wc >= 'a') && (wc <= 'z') ? wc - ' ' : wc;
|
||||
if (name_kind != 0) {
|
||||
if (PFPATH_UNI_ConvertFWchar((pf_u16)wc, &twc) == 1) {
|
||||
wc = twc;
|
||||
if (PFPATH_UNI_ConvertFWchar((pf_u16)wc, &fullwidth_character) == 1) {
|
||||
wc = fullwidth_character;
|
||||
}
|
||||
} else {
|
||||
if ((pf_u8)(wc >> 8) == 0) {
|
||||
@@ -263,8 +262,8 @@ pf_u16 PFPATH_GetNextCharOfPattern(PF_STR* p_pattern, pf_u32 name_kind) {
|
||||
pattern[0] = (pf_u8)(wc >> 8);
|
||||
pattern[1] = (pf_u8)wc;
|
||||
}
|
||||
if (PFPATH_OEM_ConvertFWchar(pattern, &twc) == 1) {
|
||||
wc = twc;
|
||||
if (PFPATH_OEM_ConvertFWchar(pattern, &fullwidth_character) == 1) {
|
||||
wc = fullwidth_character;
|
||||
}
|
||||
}
|
||||
return wc;
|
||||
@@ -339,13 +338,13 @@ pf_s32 PFPATH_cmpNameImpl(const pf_s8* name, const pf_s8* pattern, pf_u32* match
|
||||
if (pattern_width == 1) {
|
||||
read_char = pf_toupper(*pattern);
|
||||
} else {
|
||||
read_char = (pf_u16)PF_GET_LE_U16((const pf_u8*)pattern);
|
||||
read_char = PF_GET_LE_U16((const pf_u8*)pattern);
|
||||
}
|
||||
pattern_char = (pf_u16)read_char;
|
||||
if (name_width == 1) {
|
||||
read_char = pf_toupper(*name);
|
||||
} else {
|
||||
read_char = (pf_u16)PF_GET_LE_U16((const pf_u8*)name);
|
||||
read_char = PF_GET_LE_U16((const pf_u8*)name);
|
||||
}
|
||||
name_char = (pf_u16)read_char;
|
||||
if (pattern_width == 2 && PFPATH_OEM_ConvertFWchar(pattern, &converted_pattern) == 1) {
|
||||
@@ -368,7 +367,7 @@ pf_s32 PFPATH_cmpNameImpl(const pf_s8* name, const pf_s8* pattern, pf_u32* match
|
||||
if (pattern_width == 1) {
|
||||
read_char = pf_toupper(*pattern);
|
||||
} else {
|
||||
read_char = (pf_u16)PF_GET_LE_U16((const pf_u8*)pattern);
|
||||
read_char = PF_GET_LE_U16((const pf_u8*)pattern);
|
||||
}
|
||||
pattern_char = (pf_u16)read_char;
|
||||
pattern += pattern_width;
|
||||
@@ -377,7 +376,7 @@ pf_s32 PFPATH_cmpNameImpl(const pf_s8* name, const pf_s8* pattern, pf_u32* match
|
||||
name += name_width;
|
||||
name_width = pf_vol_set.codeset.oem_char_width(name);
|
||||
if (name_width == 1) { read_char = pf_toupper(*name); }
|
||||
else { read_char = (pf_u16)PF_GET_LE_U16((const pf_u8*)name); }
|
||||
else { read_char = PF_GET_LE_U16((const pf_u8*)name); }
|
||||
name_char = (pf_u16)read_char;
|
||||
}
|
||||
} while (pattern_char == '?' || pattern_char == '*');
|
||||
@@ -397,7 +396,7 @@ pf_s32 PFPATH_cmpNameImpl(const pf_s8* name, const pf_s8* pattern, pf_u32* match
|
||||
if (name_width == 1) {
|
||||
read_char = pf_toupper(*name);
|
||||
} else {
|
||||
read_char = (pf_u16)PF_GET_LE_U16((const pf_u8*)name);
|
||||
read_char = PF_GET_LE_U16((const pf_u8*)name);
|
||||
}
|
||||
name_char = (pf_u16)read_char;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ pf_s32 VFiPFSEC_ReadFAT(PF_VOLUME* p_vol, pf_u8* p_buf, pf_u32 sector, pf_u16 of
|
||||
PF_CACHE_PAGE* p_page;
|
||||
pf_s32 err;
|
||||
|
||||
if ((p_vol->flags & 0x01) == 0 || VFiPFDRV_IsInserted(p_vol) == PF_FALSE) {
|
||||
if ((p_vol->flags & 0x01) == 0 || !VFiPFDRV_IsInserted(p_vol)) {
|
||||
return 9;
|
||||
}
|
||||
if (sector >= p_vol->bpb.total_sectors || offset >= p_vol->bpb.bytes_per_sector || offset + size > p_vol->bpb.bytes_per_sector) {
|
||||
@@ -53,7 +53,7 @@ pf_s32 VFiPFSEC_ReadData(PF_VOLUME* p_vol, pf_u8* p_buf, pf_u32 sector, pf_u16 o
|
||||
pf_s32 err;
|
||||
|
||||
*p_success_size = 0;
|
||||
if ((p_vol->flags & 0x01) == 0 || VFiPFDRV_IsInserted(p_vol) == PF_FALSE) {
|
||||
if ((p_vol->flags & 0x01) == 0 || !VFiPFDRV_IsInserted(p_vol)) {
|
||||
return 9;
|
||||
}
|
||||
if ((sector >= p_vol->bpb.total_sectors || offset >= p_vol->bpb.bytes_per_sector || offset + size > p_vol->bpb.bytes_per_sector) && offset != 0) {
|
||||
|
||||
@@ -14,8 +14,8 @@ void VFiPF_LE16_TO_U16_STR(pf_u8* sSrc, pf_u32 num) {
|
||||
pf_s8* p = (pf_s8*)sSrc + cnt;
|
||||
tmp_src = *p;
|
||||
#ifdef DEBUG
|
||||
*((pf_u8*)sSrc + cnt) = *((pf_u8*)sSrc + cnt + 1);
|
||||
*((pf_u8*)sSrc + cnt + 1) = tmp_src;
|
||||
*(sSrc + cnt) = *(sSrc + cnt + 1);
|
||||
*(sSrc + cnt + 1) = tmp_src;
|
||||
#else
|
||||
sSrc[cnt] = sSrc[cnt + 1];
|
||||
sSrc[cnt + 1] = tmp_src;
|
||||
|
||||
@@ -134,19 +134,19 @@ pf_u16 PFSTR_StrNumChar(PF_STR* p_str, pf_u32 target) {
|
||||
pf_s32 PFSTR_StrCmp(const PF_STR* p_str, const pf_s8* s) {
|
||||
pf_u16 wc;
|
||||
const pf_u16* wp;
|
||||
const pf_s8* p1;
|
||||
const pf_s8* p2;
|
||||
const pf_s8* stringCursor;
|
||||
const pf_s8* compareCursor;
|
||||
pf_s32 ret;
|
||||
|
||||
if (p_str->code_mode == 1) {
|
||||
p1 = p_str->p_head;
|
||||
p2 = s;
|
||||
ret = pf_strcmp(p1, p2);
|
||||
stringCursor = p_str->p_head;
|
||||
compareCursor = s;
|
||||
ret = pf_strcmp(stringCursor, compareCursor);
|
||||
} else {
|
||||
wp = (pf_u16*)p_str->p_head;
|
||||
|
||||
do {
|
||||
pf_vol_set.codeset.oem2unicode((pf_s8*)s, &wc);
|
||||
pf_vol_set.codeset.oem2unicode(s, &wc);
|
||||
s++;
|
||||
|
||||
if (*wp++ != wc) {
|
||||
@@ -164,20 +164,20 @@ pf_s32 PFSTR_StrCmp(const PF_STR* p_str, const pf_s8* s) {
|
||||
pf_s32 PFSTR_StrNCmp(PF_STR* p_str, const pf_s8* s, pf_u32 target, pf_s16 offset, pf_u16 num) {
|
||||
pf_u16 wc;
|
||||
const pf_u16* wp;
|
||||
const pf_s8* p1;
|
||||
const pf_s8* p2;
|
||||
const pf_s8* stringCursor;
|
||||
const pf_s8* compareCursor;
|
||||
pf_s32 ret;
|
||||
|
||||
if (p_str->code_mode == 1 || target == 3) {
|
||||
if (target == 1) {
|
||||
p1 = &p_str->p_head[offset];
|
||||
stringCursor = &p_str->p_head[offset];
|
||||
} else if (target == 2) {
|
||||
p1 = &p_str->p_tail[offset];
|
||||
stringCursor = &p_str->p_tail[offset];
|
||||
} else {
|
||||
p1 = &p_str->p_current[offset];
|
||||
stringCursor = &p_str->p_current[offset];
|
||||
}
|
||||
p2 = s;
|
||||
ret = pf_strncmp(p1, p2, num);
|
||||
compareCursor = s;
|
||||
ret = pf_strncmp(stringCursor, compareCursor, num);
|
||||
} else {
|
||||
if (target == 1) {
|
||||
wp = (pf_u16*)p_str->p_head + offset;
|
||||
@@ -186,7 +186,7 @@ pf_s32 PFSTR_StrNCmp(PF_STR* p_str, const pf_s8* s, pf_u32 target, pf_s16 offset
|
||||
}
|
||||
|
||||
do {
|
||||
pf_vol_set.codeset.oem2unicode((pf_s8*)s, &wc);
|
||||
pf_vol_set.codeset.oem2unicode(s, &wc);
|
||||
s++;
|
||||
num--;
|
||||
|
||||
|
||||
@@ -169,28 +169,28 @@ static const u32 AESiDecryptTable[] = {
|
||||
};
|
||||
|
||||
#define ROTATE(x,n) (((x) << (n)) | ((x) >> (32 - (n))))
|
||||
#define ENCRYPT(a,b,c,d) (((ROTATE(AESiEncryptTable[((b)>>16)&255],16) ^ ROTATE(AESiEncryptTable[(a)>>24],24)) ^ AESiEncryptTable[(d)&255]) ^ ROTATE(AESiEncryptTable[((c)>>8)&255],8))
|
||||
#define DECRYPT(a,b,c,d) (((ROTATE(AESiDecryptTable[((b)>>16)&255],16) ^ AESiDecryptTable[(d)&255]) ^ ROTATE(AESiDecryptTable[(a)>>24],24)) ^ ROTATE(AESiDecryptTable[((c)>>8)&255],8))
|
||||
#define SUBSTITUTE(table,a,b,c,d) ((((u32)table[(a)>>24]<<24) | table[(d)&255]) | (((u32)table[((b)>>16)&255]<<16) | ((u32)table[((c)>>8)&255]<<8)))
|
||||
#define ENCRYPT(state0,state1,state2,state3) (((ROTATE(AESiEncryptTable[((state1)>>16)&255],16) ^ ROTATE(AESiEncryptTable[(state0)>>24],24)) ^ AESiEncryptTable[(state3)&255]) ^ ROTATE(AESiEncryptTable[((state2)>>8)&255],8))
|
||||
#define DECRYPT(state0,state1,state2,state3) (((ROTATE(AESiDecryptTable[((state1)>>16)&255],16) ^ AESiDecryptTable[(state3)&255]) ^ ROTATE(AESiDecryptTable[(state0)>>24],24)) ^ ROTATE(AESiDecryptTable[((state2)>>8)&255],8))
|
||||
#define SUBSTITUTE(table,state0,state1,state2,state3) ((((u32)table[(state0)>>24]<<24) | table[(state3)&255]) | (((u32)table[((state1)>>16)&255]<<16) | ((u32)table[((state2)>>8)&255]<<8)))
|
||||
|
||||
#define DECRYPT_FINAL(table,a,b,c,d,key) ((table[(d)&255] ^ ((u32)table[((c)>>8)&255]<<8)) ^ (((u32)table[((b)>>16)&255]<<16) ^ ((key) ^ ((u32)table[(a)>>24]<<24))))
|
||||
#define DECRYPT_FINAL(table,state0,state1,state2,state3,key) ((table[(state3)&255] ^ ((u32)table[((state2)>>8)&255]<<8)) ^ (((u32)table[((state1)>>16)&255]<<16) ^ ((key) ^ ((u32)table[(state0)>>24]<<24))))
|
||||
|
||||
void AESiEncryptBlock(AESContext* context, u32* output, const u32* input) {
|
||||
u32 rounds = context->rounds;
|
||||
const u32* key = context->keys + 4;
|
||||
u32 a=input[0]^context->keys[0], b=input[1]^context->keys[1], c=input[2]^context->keys[2], d=input[3]^context->keys[3];
|
||||
u32 state0=input[0]^context->keys[0], state1=input[1]^context->keys[1], state2=input[2]^context->keys[2], state3=input[3]^context->keys[3];
|
||||
while (--rounds != 0) {
|
||||
u32 nextA=ENCRYPT(a,b,c,d);
|
||||
u32 nextB=ENCRYPT(b,c,d,a);
|
||||
u32 nextC=ENCRYPT(c,d,a,b);
|
||||
u32 nextD=ENCRYPT(d,a,b,c);
|
||||
a=nextA^key[0]; b=nextB^key[1]; c=nextC^key[2]; d=nextD^key[3];
|
||||
u32 nextState0=ENCRYPT(state0,state1,state2,state3);
|
||||
u32 nextState1=ENCRYPT(state1,state2,state3,state0);
|
||||
u32 nextState2=ENCRYPT(state2,state3,state0,state1);
|
||||
u32 nextState3=ENCRYPT(state3,state0,state1,state2);
|
||||
state0=nextState0^key[0]; state1=nextState1^key[1]; state2=nextState2^key[2]; state3=nextState3^key[3];
|
||||
key += 4;
|
||||
}
|
||||
output[0] = SUBSTITUTE(AESiSubShiftTable,a,b,c,d)^key[0];
|
||||
output[1] = SUBSTITUTE(AESiSubShiftTable,b,c,d,a)^key[1];
|
||||
output[2] = SUBSTITUTE(AESiSubShiftTable,c,d,a,b)^key[2];
|
||||
output[3] = SUBSTITUTE(AESiSubShiftTable,d,a,b,c)^key[3];
|
||||
output[0] = SUBSTITUTE(AESiSubShiftTable,state0,state1,state2,state3)^key[0];
|
||||
output[1] = SUBSTITUTE(AESiSubShiftTable,state1,state2,state3,state0)^key[1];
|
||||
output[2] = SUBSTITUTE(AESiSubShiftTable,state2,state3,state0,state1)^key[2];
|
||||
output[3] = SUBSTITUTE(AESiSubShiftTable,state3,state0,state1,state2)^key[3];
|
||||
}
|
||||
|
||||
#define DOUBLE_BYTES(x) ((((x)&0x7f7f7f7f)<<1) ^ ((((x)&0x80808080)>>7)*0x1b))
|
||||
@@ -198,10 +198,10 @@ void AESiEncryptBlock(AESContext* context, u32* output, const u32* input) {
|
||||
void AESiDecryptBlock(AESContext* context, u32* output, const u32* input) {
|
||||
u32 rounds=context->rounds;
|
||||
u32* key=context->keys;
|
||||
u32 b;
|
||||
u32 a;
|
||||
u32 c;
|
||||
u32 d;
|
||||
u32 state1;
|
||||
u32 state0;
|
||||
u32 state2;
|
||||
u32 state3;
|
||||
key += rounds*4;
|
||||
if (context->needsTransform) {
|
||||
u32 round;
|
||||
@@ -209,31 +209,31 @@ void AESiDecryptBlock(AESContext* context, u32* output, const u32* input) {
|
||||
u32 word;
|
||||
for (word=0; word<4; ++word) {
|
||||
u32 value=context->keys[round*4 + word];
|
||||
u32 twice=DOUBLE_BYTES(value);
|
||||
u32 four=DOUBLE_BYTES(twice);
|
||||
u32 eight=DOUBLE_BYTES(four)^value;
|
||||
u32 mixed=(ROTATE(eight,8) ^ (eight ^ four));
|
||||
mixed=(ROTATE(mixed,8) ^ (mixed ^ twice));
|
||||
u32 timesTwo=DOUBLE_BYTES(value);
|
||||
u32 timesFour=DOUBLE_BYTES(timesTwo);
|
||||
u32 timesNine=DOUBLE_BYTES(timesFour)^value;
|
||||
u32 mixed=(ROTATE(timesNine,8) ^ (timesNine ^ timesFour));
|
||||
mixed=(ROTATE(mixed,8) ^ (mixed ^ timesTwo));
|
||||
mixed=(ROTATE(mixed,8) ^ (mixed ^ value));
|
||||
context->keys[round*4 + word]=mixed;
|
||||
}
|
||||
}
|
||||
context->needsTransform=0;
|
||||
}
|
||||
a=input[0]^key[0]; b=input[1]^key[1]; c=input[2]^key[2]; d=input[3]^key[3];
|
||||
state0=input[0]^key[0]; state1=input[1]^key[1]; state2=input[2]^key[2]; state3=input[3]^key[3];
|
||||
key-=4;
|
||||
while (--rounds != 0) {
|
||||
u32 nextA=DECRYPT(a,d,c,b);
|
||||
u32 nextB=DECRYPT(b,a,d,c);
|
||||
u32 nextC=DECRYPT(c,b,a,d);
|
||||
u32 nextD=DECRYPT(d,c,b,a);
|
||||
a=nextA^key[0]; b=nextB^key[1]; c=nextC^key[2]; d=nextD^key[3];
|
||||
u32 nextState0=DECRYPT(state0,state3,state2,state1);
|
||||
u32 nextState1=DECRYPT(state1,state0,state3,state2);
|
||||
u32 nextState2=DECRYPT(state2,state1,state0,state3);
|
||||
u32 nextState3=DECRYPT(state3,state2,state1,state0);
|
||||
state0=nextState0^key[0]; state1=nextState1^key[1]; state2=nextState2^key[2]; state3=nextState3^key[3];
|
||||
key-=4;
|
||||
}
|
||||
output[0]=DECRYPT_FINAL(AESiInvSubShiftTable,a,d,c,b,key[0]);
|
||||
output[1]=DECRYPT_FINAL(AESiInvSubShiftTable,b,a,d,c,key[1]);
|
||||
output[2]=DECRYPT_FINAL(AESiInvSubShiftTable,c,b,a,d,key[2]);
|
||||
output[3]=DECRYPT_FINAL(AESiInvSubShiftTable,d,c,b,a,key[3]);
|
||||
output[0]=DECRYPT_FINAL(AESiInvSubShiftTable,state0,state3,state2,state1,key[0]);
|
||||
output[1]=DECRYPT_FINAL(AESiInvSubShiftTable,state1,state0,state3,state2,key[1]);
|
||||
output[2]=DECRYPT_FINAL(AESiInvSubShiftTable,state2,state1,state0,state3,key[2]);
|
||||
output[3]=DECRYPT_FINAL(AESiInvSubShiftTable,state3,state2,state1,state0,key[3]);
|
||||
}
|
||||
|
||||
BOOL NETAESCreateEx(AESContext* context, const void* key, u32 keyLength, const void* iv, const AESBlockMode* mode) {
|
||||
@@ -248,7 +248,7 @@ BOOL NETAESCreateEx(AESContext* context, const void* key, u32 keyLength, const v
|
||||
context->needsTransform = 1;
|
||||
context->rounds = (keyLength * 8) / 32 + 6;
|
||||
context->mode = mode;
|
||||
memcpy(context->chain, iv, 16);
|
||||
memcpy(context->chain, iv, sizeof(context->chain));
|
||||
schedule = context->keys;
|
||||
words = keyLength / 4;
|
||||
memcpy(schedule, key, keyLength);
|
||||
@@ -326,8 +326,8 @@ static void NETiAESEncryptoBlock(AESContext* context, u32* output, const u32* in
|
||||
}
|
||||
|
||||
static void NETiAESDecryptoBlock(AESContext* context, u32* output, const u32* input) {
|
||||
u32 a=context->chain[0], b=context->chain[1], c=context->chain[2], d=context->chain[3];
|
||||
u32 state0=context->chain[0], state1=context->chain[1], state2=context->chain[2], state3=context->chain[3];
|
||||
context->chain[0]=input[0]; context->chain[1]=input[1]; context->chain[2]=input[2]; context->chain[3]=input[3];
|
||||
AESiDecryptBlock(context,output,input);
|
||||
output[0]^=a; output[1]^=b; output[2]^=c; output[3]^=d;
|
||||
output[0]^=state0; output[1]^=state1; output[2]^=state2; output[3]^=state3;
|
||||
}
|
||||
|
||||
@@ -4,26 +4,26 @@ void* NHTTPi_memcpy(void*, const void*, u32);
|
||||
s32 NHTTPi_SocRecv(void*, NHTTPRequestInfo*, s32, void*, s32, s32);
|
||||
|
||||
static void FindHeaderBlock(const NHTTPResponseInfo* response, s32 position, NHTTPi_HDRBUFLIST** block, s32* offset) {
|
||||
if(position<1024) { *offset=position; *block=NULL; }
|
||||
if(position<NHTTP_HDRRECVBUF_INILEN) { *offset=position; *block=NULL; }
|
||||
else {
|
||||
s32 blocks=(position-1024)>>9;
|
||||
s32 blocks=(position-NHTTP_HDRRECVBUF_INILEN)>>NHTTP_HDRRECVBUF_BLOCKSHIFT;
|
||||
*block=response->hdrBufBlock_p;
|
||||
while(blocks--) *block=(*block)->next_p;
|
||||
*offset=(position-1024)&511;
|
||||
*offset=(position-NHTTP_HDRRECVBUF_INILEN)&NHTTP_HDRRECVBUF_BLOCKMASK;
|
||||
}
|
||||
}
|
||||
|
||||
static int ReadHeaderChar(const NHTTPResponseInfo* response, NHTTPi_HDRBUFLIST** block, s32* offset) {
|
||||
if(!*block) {
|
||||
if(*offset<1024) return (s8)response->hdrBufFirst[(*offset)++];
|
||||
if(*offset<NHTTP_HDRRECVBUF_INILEN) return (s8)response->hdrBufFirst[(*offset)++];
|
||||
*block=response->hdrBufBlock_p;
|
||||
*offset=0;
|
||||
} else if(*offset==512) { *offset=0; *block=(*block)->next_p; }
|
||||
} else if(*offset==NHTTP_HDRRECVBUF_BLOCKLEN) { *offset=0; *block=(*block)->next_p; }
|
||||
return (*block)->block[(*offset)++];
|
||||
}
|
||||
|
||||
static int LowerCase(int character) {
|
||||
return ((character >= 'A') & (character <= 'Z')) ? character + 32 : character;
|
||||
return ((character >= 'A') & (character <= 'Z')) ? character + ('a' - 'A') : character;
|
||||
}
|
||||
|
||||
s32 NHTTPi_findNextLineHdrRecvBuf(const NHTTPResponseInfo* response, s32 position, s32 limit, s32* colon, s32* newlineLength) {
|
||||
@@ -96,25 +96,25 @@ s32 NHTTPi_loadFromHdrRecvBuf(NHTTPResponseInfo* response, char* destination, s3
|
||||
NHTTPi_HDRBUFLIST* block;
|
||||
if (position + length <= response->headerLen) {
|
||||
if(length) {
|
||||
if(position<1024) {
|
||||
if(position<NHTTP_HDRRECVBUF_INILEN) {
|
||||
amount=length;
|
||||
if(length>1024-position) amount=1024-position;
|
||||
if(length>NHTTP_HDRRECVBUF_INILEN-position) amount=NHTTP_HDRRECVBUF_INILEN-position;
|
||||
NHTTPi_memcpy(destination,response->hdrBufFirst+position,amount);
|
||||
position+=amount; length-=amount; destination+=amount;
|
||||
}
|
||||
if(length) {
|
||||
s32 blocks;
|
||||
position-=1024;
|
||||
position-=NHTTP_HDRRECVBUF_INILEN;
|
||||
block=response->hdrBufBlock_p;
|
||||
blocks=position>>9;
|
||||
position&=511;
|
||||
blocks=position>>NHTTP_HDRRECVBUF_BLOCKSHIFT;
|
||||
position&=NHTTP_HDRRECVBUF_BLOCKMASK;
|
||||
while(blocks--) block=block->next_p;
|
||||
while(length) {
|
||||
amount=length;
|
||||
if(length>512-position) amount=512-position;
|
||||
if(length>NHTTP_HDRRECVBUF_BLOCKLEN-position) amount=NHTTP_HDRRECVBUF_BLOCKLEN-position;
|
||||
NHTTPi_memcpy(destination,block->block+position,amount);
|
||||
position+=amount;
|
||||
position&=511;
|
||||
position&=NHTTP_HDRRECVBUF_BLOCKMASK;
|
||||
block=block->next_p;
|
||||
length-=amount; destination+=amount;
|
||||
}
|
||||
@@ -135,12 +135,12 @@ s32 NHTTPi_RecvBuf(void* mutex, NHTTPRequestInfo* request, s32 socket, u32 offse
|
||||
s32 NHTTPi_RecvBufN(void* mutex, NHTTPRequestInfo* request, s32 socket, u32 offset, s32 length, s32 flags) {
|
||||
s32 available;
|
||||
NHTTPResponseInfo* response=request->response;
|
||||
void* buf;
|
||||
void* receiveCursor;
|
||||
if(response->recvBufLen<=offset) return -1003;
|
||||
available=response->recvBufLen;
|
||||
buf=response->recvBuf_p;
|
||||
receiveCursor=response->recvBuf_p;
|
||||
available=available-offset;
|
||||
buf=(u8*)buf+offset;
|
||||
receiveCursor=(u8*)receiveCursor+offset;
|
||||
if(length>available) length=available;
|
||||
return NHTTPi_SocRecv(mutex,request,socket,buf,length,flags);
|
||||
return NHTTPi_SocRecv(mutex,request,socket,receiveCursor,length,flags);
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ void BS2UpdateInit(void* allocator) {
|
||||
memset(Flags1, 0, sizeof(Flags1));
|
||||
BS2Report("Create update thread\n");
|
||||
OSCreateThread(&Thread, UpdateThread, NULL, ThreadStack + sizeof(ThreadStack),
|
||||
sizeof(ThreadStack), 31, 1);
|
||||
sizeof(ThreadStack), 31, OS_THREAD_ATTR_DETACH);
|
||||
OSResumeThread(&Thread);
|
||||
}
|
||||
|
||||
@@ -113,37 +113,37 @@ static inline u32 BS2SelectUpdateEntries(void) {
|
||||
selectedSeatCount = 0;
|
||||
State = 0;
|
||||
ContainsSeatTitles = FALSE;
|
||||
if (ES_GetTitleId(&scratch.titleId) != 0) {
|
||||
if (ES_GetTitleId(&scratch.titleId) != ES_ERR_OK) {
|
||||
regionValid = FALSE;
|
||||
} else {
|
||||
titleRegion = (u8)scratch.titleId;
|
||||
switch (SCGetProductArea()) {
|
||||
case 0:
|
||||
case 5:
|
||||
case SC_PRODUCT_AREA_JPN:
|
||||
case SC_PRODUCT_AREA_TWN:
|
||||
if (titleRegion == 'J' || titleRegion == 'D') {
|
||||
regionValid = TRUE;
|
||||
goto product_region_checked;
|
||||
}
|
||||
goto invalid_product_region;
|
||||
case 1:
|
||||
case SC_PRODUCT_AREA_USA:
|
||||
if (titleRegion == 'E' || titleRegion == 'D') {
|
||||
regionValid = TRUE;
|
||||
goto product_region_checked;
|
||||
}
|
||||
goto invalid_product_region;
|
||||
case 2:
|
||||
case SC_PRODUCT_AREA_EUR:
|
||||
if (titleRegion == 'P' || titleRegion == 'D') {
|
||||
regionValid = TRUE;
|
||||
goto product_region_checked;
|
||||
}
|
||||
goto invalid_product_region;
|
||||
case 6:
|
||||
case SC_PRODUCT_AREA_KOR:
|
||||
if (titleRegion == 'K') {
|
||||
regionValid = TRUE;
|
||||
goto product_region_checked;
|
||||
}
|
||||
goto invalid_product_region;
|
||||
case 11:
|
||||
case SC_PRODUCT_AREA_CHN:
|
||||
if (titleRegion == 'C') {
|
||||
regionValid = TRUE;
|
||||
goto product_region_checked;
|
||||
@@ -347,7 +347,7 @@ product_region_checked:
|
||||
if (seatEntries[index].type != 7) {
|
||||
continue;
|
||||
}
|
||||
if (ES_GetTicketViews(seatEntries[index].titleId, NULL, &scratch.ticketCount) != 0) {
|
||||
if (ES_GetTicketViews(seatEntries[index].titleId, NULL, &scratch.ticketCount) != ES_ERR_OK) {
|
||||
BS2Report("Faild to get eTicket views.\n");
|
||||
continue;
|
||||
}
|
||||
@@ -378,7 +378,7 @@ product_region_checked:
|
||||
BS2Report("Error: cannot get channel count.");
|
||||
goto seats_done;
|
||||
}
|
||||
if (NANDSecretGetUserAvailableArea(&scratch.freeBlocks, &scratch.freeInodes) != 0) {
|
||||
if (NANDSecretGetUserAvailableArea(&scratch.freeBlocks, &scratch.freeInodes) != NAND_RESULT_OK) {
|
||||
BS2Report("Error: cannot get free user blocks.");
|
||||
goto seats_done;
|
||||
}
|
||||
|
||||
@@ -150,15 +150,15 @@ namespace www {
|
||||
extern const char* strProps[FORM_ID_MAX];
|
||||
int getStringPropertyIdx(const char* targetStr) {
|
||||
const char* names[ARRAY_LENGTH(strProps)];
|
||||
const char** __pDst = names - 1;
|
||||
const char* const* __pSrc = strProps - 1;
|
||||
const char** destinationName = names - 1;
|
||||
const char* const* sourceName = strProps - 1;
|
||||
for (int i = 0; i < (ARRAY_LENGTH(names) >> 1); i++) {
|
||||
*(++__pDst) = *(++__pSrc);
|
||||
*(++__pDst) = *(++__pSrc);
|
||||
*(++destinationName) = *(++sourceName);
|
||||
*(++destinationName) = *(++sourceName);
|
||||
}
|
||||
|
||||
if (ARRAY_LENGTH(names) & 1) {
|
||||
*(++__pDst) = *(++__pSrc);
|
||||
*(++destinationName) = *(++sourceName);
|
||||
}
|
||||
|
||||
for (int i = 0; i < (int)ARRAY_LENGTH(names) >> 1 << 1; i++) {
|
||||
@@ -704,7 +704,7 @@ namespace www {
|
||||
break;
|
||||
}
|
||||
case WB_ID_COUNTRY_SAVE: {
|
||||
sWiiData.data[0x3C] = ipl::parental::Parental::getCountry();
|
||||
sWiiData.data[WB_ID_COUNTRY] = ipl::parental::Parental::getCountry();
|
||||
break;
|
||||
}
|
||||
case WB_ID_FLUSH: {
|
||||
@@ -933,11 +933,11 @@ namespace www {
|
||||
int getBytePropIndex(const char* targetStr) {
|
||||
const char* names[ARRAY_LENGTH(byteProps)];
|
||||
|
||||
const char** __pDst = names - 1;
|
||||
const char* const* __pSrc = byteProps - 1;
|
||||
const char** destinationName = names - 1;
|
||||
const char* const* sourceName = byteProps - 1;
|
||||
for (int i = 0; i < (ARRAY_LENGTH(names) >> 1); i++) {
|
||||
*(++__pDst) = *(++__pSrc);
|
||||
*(++__pDst) = *(++__pSrc);
|
||||
*(++destinationName) = *(++sourceName);
|
||||
*(++destinationName) = *(++sourceName);
|
||||
}
|
||||
|
||||
for (int i = 0; i < (int)ARRAY_LENGTH(names); i++) {
|
||||
|
||||
@@ -147,37 +147,37 @@ namespace textinput {
|
||||
mpPaneManager->setAllBoundingBoxComponentTriggerTarget(true);
|
||||
|
||||
for (u16 i = 0; i < ARRAY_LENGTH(csPaneToAnimation); i++) {
|
||||
const PaneToAnimation& p = csPaneToAnimation[i];
|
||||
const PaneToAnimation& paneAnimations = csPaneToAnimation[i];
|
||||
AnmPane* pane = NULL;
|
||||
switch (p.type) {
|
||||
switch (paneAnimations.type) {
|
||||
case KT_Whole: {
|
||||
void* pBtnBuf = MEMAllocFromAllocator(allocator, sizeof(WholeAnmPane));
|
||||
pane = new (pBtnBuf) WholeAnmPane(getPane(p.paneName), this);
|
||||
pane = new (pBtnBuf) WholeAnmPane(getPane(paneAnimations.paneName), this);
|
||||
break;
|
||||
}
|
||||
case KT_NormalButton: {
|
||||
void* pBtnBuf = MEMAllocFromAllocator(allocator, sizeof(NormalButtonAnmPane));
|
||||
pane = new (pBtnBuf) NormalButtonAnmPane(getPane(p.paneName), NULL);
|
||||
pane = new (pBtnBuf) NormalButtonAnmPane(getPane(paneAnimations.paneName), NULL);
|
||||
break;
|
||||
}
|
||||
case KT_ChangeButton: {
|
||||
void* pBtnBuf = MEMAllocFromAllocator(allocator, sizeof(ChangeButtonAnmPane));
|
||||
pane = new (pBtnBuf) ChangeButtonAnmPane(getPane(p.paneName), NULL, this);
|
||||
pane = new (pBtnBuf) ChangeButtonAnmPane(getPane(paneAnimations.paneName), NULL, this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
nw4r::ut::List_Append(&mAnmPanes, pane);
|
||||
|
||||
for (u16 j = 0; j < p.count; j++) {
|
||||
void* pResource = mpMultiArcResourceAccessor->GetResource(0, p.pAnims[j]->fileName);
|
||||
for (u16 j = 0; j < paneAnimations.count; j++) {
|
||||
void* pResource = mpMultiArcResourceAccessor->GetResource(0, paneAnimations.pAnims[j]->fileName);
|
||||
AnimTransformPane* transform =
|
||||
static_cast<AnimTransformPane*>(getLayout()->CreateAnimTransform(pResource, mpMultiArcResourceAccessor));
|
||||
|
||||
if (p.forceAddName == NULL) {
|
||||
pane->addAnimation(allocator, p.pAnims[j]->id, transform, false, true);
|
||||
if (paneAnimations.forceAddName == NULL) {
|
||||
pane->addAnimation(allocator, paneAnimations.pAnims[j]->id, transform, false, true);
|
||||
} else {
|
||||
pane->forceAddAnimation(allocator, p.pAnims[j]->id, transform, p.forceAddName, false, true);
|
||||
pane->forceAddAnimation(allocator, paneAnimations.pAnims[j]->id, transform, paneAnimations.forceAddName, false, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -374,7 +374,7 @@ namespace textinput {
|
||||
if (pane != NULL) {
|
||||
switch (event) {
|
||||
case ON_TRIG: {
|
||||
if ((input->trigger & 0x800)) {
|
||||
if ((input->trigger & WPAD_BUTTON_A)) {
|
||||
pane->onAnmEvent(nw4rmanager::AnmPane::PE_0);
|
||||
}
|
||||
break;
|
||||
@@ -391,7 +391,7 @@ namespace textinput {
|
||||
}
|
||||
}
|
||||
|
||||
if (event == ON_TRIG && (input->trigger & 0x800)) {
|
||||
if (event == ON_TRIG && (input->trigger & WPAD_BUTTON_A)) {
|
||||
char paneName[17];
|
||||
// open-coded util::replaceChar
|
||||
memset(paneName, 0, 17);
|
||||
|
||||
@@ -242,16 +242,16 @@ void Decolated::inputString(const wchar_t* string) {
|
||||
void Decolated::inputString(const wchar_t* string, TranslateMode mode) {
|
||||
TranslateMode oldMode = static_cast<TranslateMode>(mTranslateMode);
|
||||
if (oldMode != mode) {
|
||||
if (!isKanaFix() && mode == 0) {
|
||||
if (!isKanaFix() && mode == TM_Direct) {
|
||||
confirmKana();
|
||||
}
|
||||
mTranslateMode = mode;
|
||||
switch (mode) {
|
||||
case 1:
|
||||
mKanaStream.mQueue.mode = static_cast<KPRMode>(4);
|
||||
case TM_Kana:
|
||||
mKanaStream.mQueue.mode = KPR_MODE_JP_ROMAJI_HIRAGANA;
|
||||
break;
|
||||
case 2:
|
||||
mKanaStream.mQueue.mode = static_cast<KPRMode>(8);
|
||||
case TM_Roman:
|
||||
mKanaStream.mQueue.mode = KPR_MODE_JP_ROMAJI_KATAKANA;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -259,16 +259,16 @@ void Decolated::inputString(const wchar_t* string, TranslateMode mode) {
|
||||
}
|
||||
inputString(string);
|
||||
if (mTranslateMode != oldMode) {
|
||||
if (!isKanaFix() && oldMode == 0) {
|
||||
if (!isKanaFix() && oldMode == TM_Direct) {
|
||||
confirmKana();
|
||||
}
|
||||
mTranslateMode = oldMode;
|
||||
switch (oldMode) {
|
||||
case 1:
|
||||
mKanaStream.mQueue.mode = static_cast<KPRMode>(4);
|
||||
case TM_Kana:
|
||||
mKanaStream.mQueue.mode = KPR_MODE_JP_ROMAJI_HIRAGANA;
|
||||
break;
|
||||
case 2:
|
||||
mKanaStream.mQueue.mode = static_cast<KPRMode>(8);
|
||||
case TM_Roman:
|
||||
mKanaStream.mQueue.mode = KPR_MODE_JP_ROMAJI_KATAKANA;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -457,9 +457,9 @@ bool Decolated::atTheBeginningOfASentence() {
|
||||
}
|
||||
s32 ch = getWCharAtCursor();
|
||||
switch (ch) {
|
||||
case 0x2e:
|
||||
case 0x21:
|
||||
case 0x3f:
|
||||
case L'.':
|
||||
case L'!':
|
||||
case L'?':
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
@@ -468,16 +468,16 @@ bool Decolated::atTheBeginningOfASentence() {
|
||||
|
||||
void Decolated::setTranslateMode(TranslateMode mode) {
|
||||
if (mTranslateMode != mode) {
|
||||
if (!isKanaFix() && mode == 0) {
|
||||
if (!isKanaFix() && mode == TM_Direct) {
|
||||
confirmKana();
|
||||
}
|
||||
mTranslateMode = mode;
|
||||
switch (mode) {
|
||||
case 1:
|
||||
mKanaStream.mQueue.mode = static_cast<KPRMode>(4);
|
||||
case TM_Kana:
|
||||
mKanaStream.mQueue.mode = KPR_MODE_JP_ROMAJI_HIRAGANA;
|
||||
break;
|
||||
case 2:
|
||||
mKanaStream.mQueue.mode = static_cast<KPRMode>(8);
|
||||
case TM_Roman:
|
||||
mKanaStream.mQueue.mode = KPR_MODE_JP_ROMAJI_KATAKANA;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -487,15 +487,15 @@ void Decolated::setTranslateMode(TranslateMode mode) {
|
||||
|
||||
void Decolated::initKanaConverter() {
|
||||
KPRInitQueue(&mKanaStream.mQueue);
|
||||
KPRSetMode(&mKanaStream.mQueue, 0);
|
||||
KPRSetMode(&mKanaStream.mQueue, KPR_MODE_NONE);
|
||||
mKanaStream.mOutput[0] = 0;
|
||||
s32 mode = mTranslateMode;
|
||||
switch (mode) {
|
||||
case 1:
|
||||
mKanaStream.mQueue.mode = static_cast<KPRMode>(4);
|
||||
case TM_Kana:
|
||||
mKanaStream.mQueue.mode = KPR_MODE_JP_ROMAJI_HIRAGANA;
|
||||
break;
|
||||
case 2:
|
||||
mKanaStream.mQueue.mode = static_cast<KPRMode>(8);
|
||||
case TM_Roman:
|
||||
mKanaStream.mQueue.mode = KPR_MODE_JP_ROMAJI_KATAKANA;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -45,24 +45,24 @@ namespace textinput {
|
||||
"P_BT_cancel",
|
||||
5,
|
||||
NULL,
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[4]}},
|
||||
{&csAninationFile[ANM_Normal], &csAninationFile[ANM_FocusIn], &csAninationFile[ANM_FocusOut], &csAninationFile[ANM_RollOver], &csAninationFile[ANM_Pushed]}},
|
||||
{KT_NormalButton,
|
||||
"P_BT_confirm",
|
||||
5,
|
||||
COMMON_BUTTON_ANIM,
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[4]}},
|
||||
{&csAninationFile[ANM_Normal], &csAninationFile[ANM_FocusIn], &csAninationFile[ANM_FocusOut], &csAninationFile[ANM_RollOver], &csAninationFile[ANM_Pushed]}},
|
||||
{KT_ToggleButton,
|
||||
"P_kyChng_QWERTY",
|
||||
7,
|
||||
NULL,
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[4], &csAninationFile[5],
|
||||
&csAninationFile[6], &csAninationFile[7]}},
|
||||
{&csAninationFile[ANM_Normal], &csAninationFile[ANM_FocusIn], &csAninationFile[ANM_FocusOut], &csAninationFile[ANM_RollOver], &csAninationFile[ANM_Pushed], &csAninationFile[ANM_ToggleOn],
|
||||
&csAninationFile[ANM_ToggleOff], &csAninationFile[7]}},
|
||||
{KT_ToggleButton,
|
||||
"P_kyChng_CP",
|
||||
7,
|
||||
COMMON_CHG_ANIM,
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[4], &csAninationFile[5],
|
||||
&csAninationFile[6], &csAninationFile[7]}},
|
||||
{&csAninationFile[ANM_Normal], &csAninationFile[ANM_FocusIn], &csAninationFile[ANM_FocusOut], &csAninationFile[ANM_RollOver], &csAninationFile[ANM_Pushed], &csAninationFile[ANM_ToggleOn],
|
||||
&csAninationFile[ANM_ToggleOff], &csAninationFile[7]}},
|
||||
};
|
||||
|
||||
void Base::setQwerty(bool qwerty) {
|
||||
@@ -95,32 +95,32 @@ namespace textinput {
|
||||
mpPaneManager->setAllBoundingBoxComponentTriggerTarget(true);
|
||||
|
||||
for (u16 i = 0; i < ARRAY_LENGTH(csPaneToAnimation); i++) {
|
||||
const PaneToAnimation& p = csPaneToAnimation[i];
|
||||
const PaneToAnimation& paneAnimations = csPaneToAnimation[i];
|
||||
AnmPane* pane = NULL;
|
||||
switch (p.type) {
|
||||
switch (paneAnimations.type) {
|
||||
case KT_NormalButton: {
|
||||
void* pBtnBuf = MEMAllocFromAllocator(allocator, sizeof(NormalButtonAnmPane));
|
||||
pane = new (pBtnBuf) NormalButtonAnmPane(getPane(p.paneName), NULL);
|
||||
pane = new (pBtnBuf) NormalButtonAnmPane(getPane(paneAnimations.paneName), NULL);
|
||||
break;
|
||||
}
|
||||
case KT_ToggleButton: {
|
||||
void* pBtnBuf = MEMAllocFromAllocator(allocator, sizeof(ToggleButtonAnmPane));
|
||||
pane = new (pBtnBuf) ToggleButtonAnmPane(getPane(p.paneName), NULL);
|
||||
pane = new (pBtnBuf) ToggleButtonAnmPane(getPane(paneAnimations.paneName), NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
nw4r::ut::List_Append(&mAnmPanes, pane);
|
||||
|
||||
for (u16 j = 0; j < p.count; j++) {
|
||||
void* pResource = mpMultiArcResourceAccessor->GetResource(0, p.pAnims[j]->fileName);
|
||||
for (u16 j = 0; j < paneAnimations.count; j++) {
|
||||
void* pResource = mpMultiArcResourceAccessor->GetResource(0, paneAnimations.pAnims[j]->fileName);
|
||||
AnimTransformPane* transform =
|
||||
static_cast<AnimTransformPane*>(getLayout()->CreateAnimTransform(pResource, mpMultiArcResourceAccessor));
|
||||
|
||||
if (p.forceAddName == NULL) {
|
||||
pane->addAnimation(allocator, p.pAnims[j]->id, transform, false, true);
|
||||
if (paneAnimations.forceAddName == NULL) {
|
||||
pane->addAnimation(allocator, paneAnimations.pAnims[j]->id, transform, false, true);
|
||||
} else {
|
||||
pane->forceAddAnimation(allocator, p.pAnims[j]->id, transform, p.forceAddName, false, true);
|
||||
pane->forceAddAnimation(allocator, paneAnimations.pAnims[j]->id, transform, paneAnimations.forceAddName, false, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -383,7 +383,7 @@ namespace textinput {
|
||||
if (pane != NULL) {
|
||||
switch (event) {
|
||||
case ON_TRIG: {
|
||||
if ((input->trigger & 0x800)) {
|
||||
if ((input->trigger & WPAD_BUTTON_A)) {
|
||||
pane->onAnmEvent(nw4rmanager::AnmPane::PE_0);
|
||||
}
|
||||
break;
|
||||
@@ -400,19 +400,19 @@ namespace textinput {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (event == ON_TRIG && (input->trigger & 0x800)) {
|
||||
if (event == ON_TRIG && (input->trigger & WPAD_BUTTON_A)) {
|
||||
if (util::strcmp(paneName, "P_BT_confirm")) {
|
||||
mpLayoutByNW4R->onOK();
|
||||
} else if (util::strcmp(paneName, "P_BT_cancel")) {
|
||||
mpLayoutByNW4R->onCancel();
|
||||
} else if (util::strcmp(paneName, "P_kyChng_QWERTY")) {
|
||||
if (!mpLayoutByNW4R->isQwerty()) {
|
||||
mpLayoutByNW4R->searchAnmPane("P_kyChng_CP")->changeAnimation(6);
|
||||
mpLayoutByNW4R->searchAnmPane("P_kyChng_CP")->changeAnimation(ANM_ToggleOff);
|
||||
}
|
||||
mpLayoutByNW4R->setQwertyWithSE(true);
|
||||
} else if (util::strcmp(paneName, "P_kyChng_CP")) {
|
||||
if (mpLayoutByNW4R->isQwerty()) {
|
||||
mpLayoutByNW4R->searchAnmPane("P_kyChng_QWERTY")->changeAnimation(6);
|
||||
mpLayoutByNW4R->searchAnmPane("P_kyChng_QWERTY")->changeAnimation(ANM_ToggleOff);
|
||||
}
|
||||
mpLayoutByNW4R->setQwertyWithSE(false);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ void WithZi::ChangeDictionaryLanguage(u8 language) {
|
||||
u32 attached;
|
||||
entryIndex = -1;
|
||||
baseIndex = 0;
|
||||
dictionaryTable = (EZTXLanguageEntry*)mpDictionaries;
|
||||
dictionaryTable = mpDictionaries;
|
||||
entry = dictionaryTable;
|
||||
for (s32 groups = 2; groups != 0; --groups) {
|
||||
for (s32 column = 0; column < 6; ++column) {
|
||||
@@ -104,8 +104,8 @@ void WithZi::init() {
|
||||
mbContextChanged = 0;
|
||||
clearCandidates();
|
||||
memset(LatestWord, 0, 0x80);
|
||||
LatestWord[0] = 0x20;
|
||||
if (getPredictLanguage() == 1) {
|
||||
LatestWord[0] = L' ';
|
||||
if (getPredictLanguage() == ZI8_LANG_ZH) {
|
||||
update();
|
||||
}
|
||||
}
|
||||
@@ -132,7 +132,7 @@ void WithZi::clearCandidates() {
|
||||
mSearch.maxCandidates = 0x28;
|
||||
mSearch.elementCount = 0;
|
||||
mSearch.firstCandidate = 0;
|
||||
if (getPredictLanguage() == 1) {
|
||||
if (getPredictLanguage() == ZI8_LANG_ZH) {
|
||||
mSearch.getMode = 1;
|
||||
mSearch.context = 0x10;
|
||||
}
|
||||
@@ -319,7 +319,7 @@ void WithZi::update() {
|
||||
mSearch.completion = 0;
|
||||
mSearch.scratch = 0;
|
||||
|
||||
if (getPredictLanguage() == 1) {
|
||||
if (getPredictLanguage() == ZI8_LANG_ZH) {
|
||||
mSearch.getMode = 1;
|
||||
mSearch.context = 0x11;
|
||||
if (mbKoreanPartialConfirm != 0) {
|
||||
@@ -335,8 +335,8 @@ void WithZi::update() {
|
||||
}
|
||||
else if (elementCount == 1 &&
|
||||
(0xeff1 <= ElementBuffer[0] && ElementBuffer[0] <= 0xeff9) &&
|
||||
mpHoldingKey != NULL && getPredictLanguage() != 0x12) {
|
||||
CandidatedWord[0] = 0x3e;
|
||||
mpHoldingKey != NULL && getPredictLanguage() != ZI8_LANG_KO) {
|
||||
CandidatedWord[0] = L'>';
|
||||
CandidatedWord[1] = 0;
|
||||
mCandidateCount = 1;
|
||||
u16* output = CandidatedWord + 0x40;
|
||||
@@ -355,7 +355,7 @@ void WithZi::update() {
|
||||
memcpy(PredictionBuffer, CandidatesBuffer, 0x200);
|
||||
ChangeDictionaryLanguage(getPredictLanguage());
|
||||
u32 count = EZTXGetCandidates(&mSearch, mpDictionaryWork) & 0xff;
|
||||
if (getPredictLanguage() == 1 && count == 0x61) {
|
||||
if (getPredictLanguage() == ZI8_LANG_ZH && count == 0x61) {
|
||||
wchar_t* candidateOutput = reinterpret_cast<wchar_t*>(PredictionBuffer);
|
||||
mSearch.firstCandidate = 0x61;
|
||||
mSearch.candidates = candidateOutput + 0xC2;
|
||||
@@ -367,7 +367,7 @@ void WithZi::update() {
|
||||
if (static_cast<s32>(count) > 0x28) {
|
||||
count = 0x28;
|
||||
}
|
||||
if (getPredictLanguage() == 1 && mbContextChanged != 0 &&
|
||||
if (getPredictLanguage() == ZI8_LANG_ZH && mbContextChanged != 0 &&
|
||||
(mbContextChanged = 0, mSearch.count == 0)) {
|
||||
u32 length = mCurrentWordLength;
|
||||
u32 wordLength = wcslen((wchar_t*)LatestWord) & 0xff;
|
||||
@@ -380,8 +380,8 @@ void WithZi::update() {
|
||||
count = EZTXGetCandidates(&mSearch, mpDictionaryWork) & 0xff;
|
||||
}
|
||||
if (count == 0) {
|
||||
if (getPredictLanguage() != 1) {
|
||||
if (getPredictLanguage() == 0x12) {
|
||||
if (getPredictLanguage() != ZI8_LANG_ZH) {
|
||||
if (getPredictLanguage() == ZI8_LANG_KO) {
|
||||
backSpace();
|
||||
return;
|
||||
}
|
||||
@@ -395,12 +395,12 @@ void WithZi::update() {
|
||||
u16* source = reinterpret_cast<u16*>(mSearch.candidates);
|
||||
u16* destination = CandidatedWord;
|
||||
for (s32 index = 0; index < static_cast<s32>(count); index++) {
|
||||
if (getPredictLanguage() == 1) {
|
||||
if (getPredictLanguage() == ZI8_LANG_ZH) {
|
||||
u16* output;
|
||||
s32 length;
|
||||
length = 0;
|
||||
output = destination;
|
||||
for (; *source != 0x20 && *source != 0; source++) {
|
||||
for (; *source != L' ' && *source != 0; source++) {
|
||||
*output++ = *source;
|
||||
++length;
|
||||
}
|
||||
@@ -409,7 +409,7 @@ void WithZi::update() {
|
||||
} else if (mPredictLanguage == PL_11) {
|
||||
*destination = *source++;
|
||||
destination[1] = 0;
|
||||
} else if (getPredictLanguage() == 0x12) {
|
||||
} else if (getPredictLanguage() == ZI8_LANG_KO) {
|
||||
u16* output = destination;
|
||||
u16 character;
|
||||
while ((character = *source) >= 0x100) {
|
||||
@@ -535,10 +535,10 @@ u32 WithZi::setElementBuffer() {
|
||||
while ((inputCharacter = buffers.read(static_cast<u16>(count))) != 0 && static_cast<u16>(count) < 0xff) {
|
||||
u16 index = count;
|
||||
buffers.element(index) = inputCharacter;
|
||||
if (getPredictLanguage() == 1) {
|
||||
if (getPredictLanguage() == ZI8_LANG_ZH) {
|
||||
s32 character = buffers.element(index);
|
||||
if (0x30 <= character && character <= 0x39) buffers.element(index) = character + 0xf300;
|
||||
else if ((0x61 <= character && character <= 0x7a) || (0x41 <= character && character <= 0x5a)) buffers.element(index) += 0xf300;
|
||||
if (L'0' <= character && character <= L'9') buffers.element(index) = character + 0xf300;
|
||||
else if ((L'a' <= character && character <= L'z') || (L'A' <= character && character <= L'Z')) buffers.element(index) += 0xf300;
|
||||
}
|
||||
++count;
|
||||
}
|
||||
@@ -569,7 +569,7 @@ u8 WithZi::getPredictLanguage() {
|
||||
|
||||
void WithZi::setCurrentWord(const wchar_t* word) {
|
||||
if (word == NULL) {
|
||||
LatestWord[0] = 0x20;
|
||||
LatestWord[0] = L' ';
|
||||
LatestWord[1] = 0;
|
||||
return;
|
||||
}
|
||||
@@ -580,7 +580,7 @@ void WithZi::setCurrentWord(const wchar_t* word) {
|
||||
mbContextChanged = 1;
|
||||
length = 0;
|
||||
currentWord = reinterpret_cast<wchar_t*>(LatestWord);
|
||||
for (; *currentWord != 0 && *currentWord != 0x20;
|
||||
for (; *currentWord != 0 && *currentWord != L' ';
|
||||
currentWord++, ++length) {
|
||||
if (length == 0x3f) {
|
||||
LatestWord[length] = 0;
|
||||
|
||||
@@ -1981,11 +1981,11 @@ namespace ipl {
|
||||
}
|
||||
|
||||
void FriendListCache::swap(u32 index1, u32 index2) {
|
||||
NWC24FriendInfo temp ATTRIBUTE_ALIGN(32);
|
||||
NWC24FriendInfo savedFriend ATTRIBUTE_ALIGN(32);
|
||||
|
||||
memcpy(&temp, &mInfos[index1], sizeof(NWC24FriendInfo));
|
||||
memcpy(&savedFriend, &mInfos[index1], sizeof(NWC24FriendInfo));
|
||||
memcpy(&mInfos[index1], &mInfos[index2], sizeof(NWC24FriendInfo));
|
||||
memcpy(&mInfos[index2], &temp, sizeof(NWC24FriendInfo));
|
||||
memcpy(&mInfos[index2], &savedFriend, sizeof(NWC24FriendInfo));
|
||||
|
||||
u8 bThere = mbThere[index1];
|
||||
mbThere[index1] = mbThere[index2];
|
||||
@@ -2026,10 +2026,10 @@ namespace ipl {
|
||||
manager->initMsgObj(&msgObj, NWC24_MSGTYPE_PUBLIC);
|
||||
manager->setMsgToAddr(&msgObj, info.addr.mailAddr, strlen(info.addr.mailAddr));
|
||||
|
||||
const wchar_t* subject = System::getMessage(385);
|
||||
const wchar_t* subject = System::getMessage(MESG_FRIEND_CACHE_EMAIL_TITLE);
|
||||
|
||||
wchar_t text[0x400];
|
||||
wcscpy(text, System::getMessage(386));
|
||||
wcscpy(text, System::getMessage(MESG_FRIEND_CACHE_EMAIL_BODY));
|
||||
|
||||
if (mMyUserId != 1234567890123456ULL) {
|
||||
wchar_t idStr[17];
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -138,7 +138,7 @@ namespace ipl {
|
||||
|
||||
BOOL ESMisc::ContentExist(ESTmdView* tmdView, u32 contentIndex, s32* result) {
|
||||
u32 numContents;
|
||||
u32 contents[512] ALIGN32;
|
||||
u32 contents[ES_MAX_CONTENT] ALIGN32;
|
||||
|
||||
ESTitleId titleId = tmdView->head.titleId;
|
||||
|
||||
@@ -282,7 +282,7 @@ namespace ipl {
|
||||
ESTicketView* ticketView;
|
||||
|
||||
if (ticket == NULL) {
|
||||
if (GetTicketViewList(heap, titleId, &ticket, &ticketLength) < 0) {
|
||||
if (GetTicketViewList(heap, titleId, &ticket, &ticketLength) < ES_ERR_OK) {
|
||||
if (ticket != NULL) {
|
||||
heap->free(ticket);
|
||||
}
|
||||
@@ -291,9 +291,9 @@ namespace ipl {
|
||||
allocated = true;
|
||||
}
|
||||
|
||||
ticketView = (ESTicketView*)heap->alloc(0xe0, -32);
|
||||
ticketView = (ESTicketView*)heap->alloc(0xe0, -DEFAULT_ALIGN);
|
||||
|
||||
if (ESP_InitLib() < 0) {
|
||||
if (ESP_InitLib() < ES_ERR_OK) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ namespace ipl {
|
||||
index = 0;
|
||||
}
|
||||
|
||||
memcpy(ticketView, (u8*)ticket + index * 0xd8, 0xd8);
|
||||
memcpy(ticketView, &ticket[index], sizeof(ESTicketView));
|
||||
|
||||
{
|
||||
ESFd fd = ES_OpenTitleContentFile(titleId, ticketView, 0);
|
||||
@@ -315,18 +315,18 @@ namespace ipl {
|
||||
if (fd < 0) {
|
||||
OSReport("ESMisc::GetValidTicketIndex: ES_OpenTitleContentFile fd %d\n", fd);
|
||||
} else {
|
||||
char* buf = (char*)heap->alloc(0x40, -32);
|
||||
char* buf = (char*)heap->alloc(0x40, -DEFAULT_ALIGN);
|
||||
u32 numRead = ES_ReadContentFile(fd, buf, 0x40);
|
||||
|
||||
if (numRead != 0x40) {
|
||||
OSReport("ESMisc::GetValidTicketIndex: ES_ReadContentFile err %d\n", numRead);
|
||||
heap->free(buf);
|
||||
|
||||
if (ES_CloseContentFile(fd) < 0) {
|
||||
if (ES_CloseContentFile(fd) < ES_ERR_OK) {
|
||||
goto error;
|
||||
}
|
||||
} else {
|
||||
if (ES_CloseContentFile(fd) < 0) {
|
||||
if (ES_CloseContentFile(fd) < ES_ERR_OK) {
|
||||
heap->free(buf);
|
||||
goto error;
|
||||
}
|
||||
@@ -997,7 +997,7 @@ namespace ipl {
|
||||
goto cleanup;
|
||||
}
|
||||
for (u32 j = 0; j < *ticketViewCount; j++) {
|
||||
memcpy(ticketViews, (u8*)ticketViewList + j * sizeof(ESTicketView), sizeof(ESTicketView));
|
||||
memcpy(ticketViews, &ticketViewList[j], sizeof(ESTicketView));
|
||||
ret = ES_DeleteTicket((ESTicketView*)ticketViews);
|
||||
if (ret != ES_ERR_OK) {
|
||||
OSReport("%s::%s: ES_DeleteTicket failed: %d for %016llx\n", __FILE__, __FUNCTION__, ret,
|
||||
@@ -1262,7 +1262,7 @@ namespace ipl {
|
||||
tmdSize = 0;
|
||||
|
||||
ret = Exist(titleId, &tmdOffset, &tmdSize);
|
||||
if (ret == FALSE) {
|
||||
if (!ret) {
|
||||
ret = ES_ERR_NO_TMD_FILE_FOUND;
|
||||
goto out;
|
||||
}
|
||||
|
||||
659
tools/decomp-assist/rx43.cleanup.md
Normal file
659
tools/decomp-assist/rx43.cleanup.md
Normal file
@@ -0,0 +1,659 @@
|
||||
# rx43 expression cleanup
|
||||
|
||||
Baseline: `46618a101c2aabcd39559270fa2fd7344accc872`, branch `agent/w1005/rx43`. Both baseline and final clean 4.3U builds produced DOL SHA1 `26116613f624061ba99c8d1a299aaa6efa85670d`.
|
||||
|
||||
This round preserves the baseline output. Existing unmatched functions are not matching assignments. Each retained trial rebuilt its object and compared the complete ELF with a saved baseline, including sections, relocations, and symbols. Every rejected trial restored the previous source and rebuilt before continuing.
|
||||
|
||||
Inventoried 193 permitted files: three address sources, three address headers, 175 FA sources, and the twelve other named sources. Saved their source, all 1027 compiled objects, and a fresh objdiff report under `/tmp/rx43`. No shared header, TMC header identifier, excluded file, build configuration, or symbol definition changed.
|
||||
|
||||
## Result
|
||||
|
||||
Changed 32 source files. Retained cleanup counts: 388 constants or sizes, 33 casts, 8 control-flow sites, 8 member or array expressions, and 128 identifier declarations or labels. Identifier counts include AES macro parameters, but exclude repeated uses.
|
||||
|
||||
All 1027 rebuilt object SHA256 values equal the baseline. The complete parsed objdiff JSON is identical, including every function, section, and global metric. All 32 touched-unit pools are identical to retail and produce the same `pool_diff.py` output as the baseline. The gate reports zero regressions, zero added forbidden patterns, and zero readability warnings.
|
||||
|
||||
Touched units: instruction-exact functions 659/677 -> 659/677; matched code 168228/190716 -> 168228/190716 bytes; matched data 67384/67384 -> 67384/67384 bytes.
|
||||
|
||||
31 representative exact functions also passed `ctxdiff.py` with equal instruction counts and `diffs 0`. The JPEG unit has no exact function in the baseline; its complete object still remains identical. No new exact match is claimed.
|
||||
|
||||
## Trials
|
||||
|
||||
Counts are replacement sites, except names, which count declarations, macro parameters, or labels. KEEP means complete ELF identity; REVERT means bytes changed; ERROR means compilation failed. All REVERT and ERROR trials were restored. Trial 33 is superseded by the self-assignment deletion in 45. Trial 44 was undone in 105 because deleting the newly unused local in 102 changed bytes. These three rows do not count toward the retained totals.
|
||||
|
||||
| Trial | File | Category | Change | Count | Result |
|
||||
| --- | --- | --- | --- | ---: | --- |
|
||||
| 1 | `src/scene/address/iplAddressEdit.cpp` | constants | Use existing scene IDs in lookups and scene transitions | 51 | ERROR |
|
||||
| 2 | `src/scene/address/iplAddressEdit.cpp` | constants | Use Button animation enum names for button animation requests | 68 | KEEP |
|
||||
| 3 | `src/keyboard/tiToolBar.cpp` | constants | Use WPAD_BUTTON_A for the trigger mask | 2 | KEEP |
|
||||
| 4 | `src/keyboard/tiPredictLang.cpp` | constants | Use WPAD_BUTTON_A for the trigger mask | 2 | KEEP |
|
||||
| 5 | `libs/NW4R/src/lyt/lyt_window.cpp` | casts | Pass GXColor values without same-type casts | 4 | KEEP |
|
||||
| 6 | `libs/RevoEX/src/nhttp/NHTTP_recvbuf.c` | constants | Use existing header-buffer length, shift, and mask definitions | 16 | KEEP |
|
||||
| 7 | `src/scene/address/iplAddressEdit.cpp` | constants | Use scene IDs from the ipl namespace | 51 | KEEP |
|
||||
| 8 | `src/scene/address/iplAddressEdit.cpp` | constants | Use confirmed-friend status and add-mode enums | 9 | KEEP |
|
||||
| 9 | `src/scene/address/iplAddressEdit.cpp` | constants | Name the Korean product area | 2 | KEEP |
|
||||
| 10 | `src/scene/address/iplAddressEdit.cpp` | casts | Remove same-type casts of string literals | 3 | KEEP |
|
||||
| 11 | `src/keyboard/tiToolBar.cpp` | constants | Use the toggle-off animation enum | 2 | KEEP |
|
||||
| 12 | `src/keyboard/tiString.cpp` | constants | Name the KPR kana conversion modes | 8 | KEEP |
|
||||
| 13 | `src/BS2/BS2Update.c` | constants | Use ES and NAND success results and the detached-thread flag | 4 | ERROR |
|
||||
| 14 | `src/iplwww/www_wiisetting.cpp` | constants | Use the nonblocking OS message flag | 1 | ERROR |
|
||||
| 15 | `src/scene/address/iplAddressEdit.cpp` | constants | Use the shared controller interaction mask | 3 | KEEP |
|
||||
| 16 | `src/scene/address/iplAddressEdit.cpp` | constants | Name keyboard input modes | 8 | KEEP |
|
||||
| 17 | `src/scene/address/iplAddressEdit.cpp` | casts | Use VEC3 pointer conversions in matrix transforms | 6 | KEEP |
|
||||
| 18 | `src/keyboard/tiString.cpp` | constants | Name translate modes in switches and direct-input comparisons | 12 | KEEP |
|
||||
| 19 | `src/BS2/BS2Update.c` | constants | Name ES and NAND success results and the SDK detached-thread flag | 4 | KEEP |
|
||||
| 20 | `src/utility/iplESMisc.cpp` | members | Copy the indexed ticket through its declared array type | 1 | KEEP |
|
||||
| 21 | `src/utility/iplESMisc.cpp` | members | Copy a ticket view through the typed list | 1 | KEEP |
|
||||
| 22 | `src/utility/iplESMisc.cpp` | control | Negate the BOOL result from Exist directly | 1 | KEEP |
|
||||
| 23 | `libs/RVL_SDK/src/fa/api/FAAttach.c` | constants | Use named FA devices and insertion flags | 9 | KEEP |
|
||||
| 24 | `libs/RVL_SDK/src/fa/api/FARegistCB.c` | constants | Name the registered SD and USB devices | 2 | KEEP |
|
||||
| 25 | `libs/RVL_SDK/src/fa/api/FAErrnum.c` | constants | Name the public FA error results | 4 | KEEP |
|
||||
| 26 | `libs/RVL_SDK/src/fa/kernel/pfk_api.c` | control | Test OS thread BOOL results directly | 2 | REVERT |
|
||||
| 27 | `libs/RVL_SDK/src/fa/driver/nand_drv.c` | constants | Name NAND file permissions, access, seek origins, and errors | 16 | KEEP |
|
||||
| 28 | `libs/RVL_SDK/src/fa/pdm_disk.c` | constants | Use the declared disk limit | 4 | KEEP |
|
||||
| 29 | `libs/RVL_SDK/src/fa/driver/nand_drv.c` | casts | Remove the same-type cast of total | 1 | KEEP |
|
||||
| 30 | `libs/RVL_SDK/src/fa/driver/sd_drv.c` | casts | Remove the same-type cast of sectors_16 | 1 | KEEP |
|
||||
| 31 | `libs/RVL_SDK/src/fa/driver/sd_drv.c` | casts | Remove the same-type cast of start_head | 1 | KEEP |
|
||||
| 32 | `libs/RVL_SDK/src/fa/driver/sd_drv.c` | casts | Remove the same-type cast of end_head | 1 | KEEP |
|
||||
| 33 | `libs/RVL_SDK/src/fa/pf_path.c` | casts | Remove the same-type cast of tmp_wc | 1 | KEEP (superseded) |
|
||||
| 34 | `libs/RVL_SDK/src/fa/pf_path.c` | casts | Remove the same-type cast of wc | 1 | REVERT |
|
||||
| 35 | `libs/RVL_SDK/src/fa/pdm_api.c` | control | Return the error directly without a redundant ternary | 3 | REVERT |
|
||||
| 36 | `libs/RVL_SDK/src/fa/api/FAErrnum.c` | control | Return the error without an identity ternary | 1 | REVERT |
|
||||
| 37 | `libs/RVL_SDK/src/fa/api/FAFopen.c` | control | Remove the null pointer self-assignment | 1 | REVERT |
|
||||
| 38 | `libs/RVL_SDK/src/fa/kernel/pfk_api.c` | control | Test OSIsThreadSuspended directly | 1 | REVERT |
|
||||
| 39 | `libs/RVL_SDK/src/fa/kernel/pfk_api.c` | control | Test OSSetThreadPriority directly | 1 | REVERT |
|
||||
| 40 | `libs/RVL_SDK/src/fa/pf_cp932.c` | names | Name the converted character buffers | 2 | KEEP |
|
||||
| 41 | `src/iplwww/www_wiisetting.cpp` | names | Name the property-name copy cursors | 4 | KEEP |
|
||||
| 42 | `src/scene/address/iplAddress.cpp` | names | Name the friend saved during swap | 1 | KEEP |
|
||||
| 43 | `src/keyboard/tiZiString.cpp` | casts | Use the existing typed dictionary-table pointer | 1 | KEEP |
|
||||
| 44 | `src/keyboard/tiPredictLang.cpp` | control | Return the prediction mode without assigning a discarded local | 1 | KEEP (superseded) |
|
||||
| 45 | `libs/RVL_SDK/src/fa/pf_path.c` | control | Remove the now-redundant temporary self-assignment | 1 | KEEP |
|
||||
| 46 | `libs/RVL_SDK/src/fa/pdm_partition.c` | constants | Use the declared partition limit | 4 | KEEP |
|
||||
| 47 | `src/utility/iplESMisc.cpp` | constants | Use the declared maximum number of title contents | 1 | KEEP |
|
||||
| 48 | `src/utility/iplESMisc.cpp` | constants | Name ES success checks and the heap alignment | 6 | KEEP |
|
||||
| 49 | `src/scene/address/iplAddressEdit.cpp` | constants | Use existing common messages in dialog and button calls | 25 | KEEP |
|
||||
| 50 | `src/scene/address/iplAddressEdit.cpp` | constants | Name network dialog text and button messages | 10 | REVERT |
|
||||
| 51 | `src/keyboard/tiString.cpp` | constants | Write sentence punctuation as character literals | 3 | KEEP |
|
||||
| 52 | `src/iplwww/www_wiisetting.cpp` | casts | Pass the DPD callback with its declared function type | 1 | ERROR |
|
||||
| 53 | `src/scene/address/iplAddressEdit.cpp` | constants | Name network dialog messages with verified numeric values | 9 | KEEP |
|
||||
| 54 | `src/scene/address/iplAddressEdit.cpp` | constants | Name friend types, the friend limit, and WiiConnect24 enable flag | 6 | KEEP |
|
||||
| 55 | `src/keyboard/tiZiString.cpp` | constants | Use Zi dictionary language constants | 11 | KEEP |
|
||||
| 56 | `src/keyboard/tiZiString.cpp` | constants | Write word delimiters and ASCII ranges as character literals | 9 | KEEP |
|
||||
| 57 | `libs/RevoEX/src/nhttp/NHTTP_recvbuf.c` | constants | Express lowercase conversion using its ASCII character difference | 1 | KEEP |
|
||||
| 58 | `libs/RevoEX/src/net/aes.c` | constants | Use the CBC chain size when copying its initialization vector | 1 | KEEP |
|
||||
| 59 | `libs/RVLMiddleware/TMC_JPEG/src/buffer/idct_block_var.c` | control | Express the unsigned clamp as direct range checks | 1 | KEEP |
|
||||
| 60 | `libs/RVLMiddleware/TMC_JPEG/src/buffer/idct_block_var.c` | control | Express the signed clamp as direct range checks | 1 | REVERT |
|
||||
| 61 | `libs/RVLMiddleware/TMC_JPEG/src/buffer/idct_block_var.c` | names | Name IDCT workspace, coefficients, butterfly outputs, and loop positions | 60 | KEEP |
|
||||
| 62 | `libs/RVLMiddleware/TMC_JPEG/src/buffer/idct_block_var.c` | names | Name clamp input values and the unsigned range flag | 3 | KEEP |
|
||||
| 63 | `libs/RVLMiddleware/TMC_JPEG/src/buffer/idct_block_var.c` | control | Use the original unsigned range condition without a temporary flag | 1 | REVERT |
|
||||
| 64 | `src/BS2/BS2Update.c` | constants | Name product regions in the region-validation switch | 6 | KEEP |
|
||||
| 65 | `src/keyboard/tiToolBar.cpp` | constants | Name valid indices in the animation resource table | 24 | KEEP |
|
||||
| 66 | `libs/RVL_SDK/src/fa/pf_clib.c` | casts | Use typed wide-string pointers without casts that discard const | 4 | KEEP |
|
||||
| 67 | `libs/RVL_SDK/src/fa/pf_str.c` | casts | Pass a const narrow string directly to the character converter | 2 | KEEP |
|
||||
| 68 | `libs/RevoEX/src/net/aes.c` | names | Name AES state words and finite-field multiplication intermediates | 39 | KEEP |
|
||||
| 69 | `libs/RVL_SDK/src/fa/pf_str.c` | names | Name the two compared string cursors | 4 | KEEP |
|
||||
| 70 | `libs/RVL_SDK/src/fa/pf_path.c` | casts | Pass the declared const OEM input without casting away const | 1 | KEEP |
|
||||
| 71 | `libs/RVL_SDK/src/fa/pf_clib.c` | control | Use a direct wide-string pointer difference | 1 | REVERT |
|
||||
| 72 | `libs/RVL_SDK/src/fa/pf_service.c` | casts | Remove casts of an already unsigned-byte buffer | 3 | KEEP |
|
||||
| 73 | `libs/RVL_SDK/src/fa/driver/nand_drv.c` | control | Test whether the disk search exhausted its array directly | 2 | REVERT |
|
||||
| 74 | `libs/RevoEX/src/nhttp/NHTTP_recvbuf.c` | control | Use logical conjunction for the ASCII uppercase test | 1 | REVERT |
|
||||
| 75 | `src/scene/address/iplAddressEdit.cpp` | members | Use the friend-name member size when clearing it | 1 | KEEP |
|
||||
| 76 | `src/keyboard/tiPredictLang.cpp` | names | Name each pane animation descriptor | 1 | KEEP |
|
||||
| 77 | `src/keyboard/tiToolBar.cpp` | names | Name each pane animation descriptor | 1 | KEEP |
|
||||
| 78 | `libs/RVL_SDK/src/fa/pf_entry_iterator.c` | control | Negate the iterator end predicate directly | 2 | KEEP |
|
||||
| 79 | `libs/RVL_SDK/src/fa/pf_entry.c` | control | Negate the iterator end predicate directly | 1 | KEEP |
|
||||
| 80 | `libs/RVL_SDK/src/fa/pf_sector.c` | control | Negate the media-inserted predicate directly | 2 | KEEP |
|
||||
| 81 | `src/scene/address/iplAddress.cpp` | control | Return the drag-state bool directly | 1 | REVERT |
|
||||
| 82 | `libs/RVL_SDK/src/fa/pf_volume.c` | constants | Use the existing FAT32 enum from the FAT header | 6 | REVERT |
|
||||
| 83 | `libs/RVL_SDK/src/fa/driver/sd_drv.c` | constants | Use the existing FAT12 format enum | 1 | REVERT |
|
||||
| 84 | `libs/RVL_SDK/src/fa/api/FAAttach.c` | constants | Name public FA success and general-error returns | 4 | KEEP |
|
||||
| 85 | `libs/RVL_SDK/src/fa/api/FADetach.c` | constants | Name public FA success and general-error returns | 4 | KEEP |
|
||||
| 86 | `libs/RVL_SDK/src/fa/api/FAInit.c` | constants | Name public FA success and general-error returns | 4 | KEEP |
|
||||
| 87 | `libs/RVL_SDK/src/fa/api/FARegistCB.c` | constants | Name public FA success and general-error returns | 2 | KEEP |
|
||||
| 88 | `libs/RVL_SDK/src/fa/pf_file.c` | constants | Name seek origins with the public FA enum | 3 | KEEP |
|
||||
| 89 | `libs/RVL_SDK/src/fa/pf_fat12.c` | members | Index the existing FAT byte buffer directly | 5 | KEEP |
|
||||
| 90 | `libs/RevoEX/src/nhttp/NHTTP_recvbuf.c` | casts | Keep the receive cursor typed as a byte pointer | 1 | ERROR |
|
||||
| 91 | `libs/RVLMiddleware/TMC_JPEG/src/buffer/idct_block_var.c` | names | Give luminance row-transform values and output strides separate names | 10 | REVERT |
|
||||
| 92 | `libs/RVLMiddleware/TMC_JPEG/src/buffer/idct_block_var.c` | names | Give sparse and full chroma transform values separate names | 15 | REVERT |
|
||||
| 93 | `libs/RevoEX/src/nhttp/NHTTP_recvbuf.c` | casts | Use the receive buffer declared char type for its cursor | 1 | REVERT |
|
||||
| 94 | `libs/RevoEX/src/nhttp/NHTTP_recvbuf.c` | names | Name the body receive cursor | 1 | KEEP |
|
||||
| 95 | `src/iplwww/www_wiisetting.cpp` | constants | Use the country write-back index enum | 1 | KEEP |
|
||||
| 96 | `libs/RVL_SDK/src/fa/pf_path.c` | casts | Pass the wide-character member without a same-type cast | 1 | REVERT |
|
||||
| 97 | `libs/RVL_SDK/src/fa/pf_path.c` | control | Remove the wide-character destination self-assignment | 1 | REVERT |
|
||||
| 98 | `libs/RVL_SDK/src/fa/pf_path.c` | casts | Use the declared 16-bit little-endian accessor result | 5 | KEEP |
|
||||
| 99 | `libs/RVL_SDK/src/fa/pf_path.c` | names | Name converted pattern characters | 2 | KEEP |
|
||||
| 100 | `libs/RVLMiddleware/TMC_JPEG/src/buffer/idct_block_var.c` | names | Name luminance butterfly temporaries without splitting their lifetimes | 4 | KEEP |
|
||||
| 101 | `libs/RVLMiddleware/TMC_JPEG/src/buffer/idct_block_var.c` | names | Name chroma row extent, shared rotation, and transform phases | 4 | KEEP |
|
||||
| 102 | `src/keyboard/tiPredictLang.cpp` | control | Remove the prediction mode local made unused by a direct return | 1 | REVERT |
|
||||
| 103 | `src/keyboard/tiZiString.cpp` | constants | Write the remaining ASCII digit bounds as characters | 2 | KEEP |
|
||||
| 104 | `libs/RVL_SDK/src/fa/driver/nand_drv.c` | constants | Name NAND helper success values and direct NAND-call checks | 19 | KEEP |
|
||||
| 105 | `src/keyboard/tiPredictLang.cpp` | control | Restore the original assignment because removing its unused local changes bytes | 1 | KEEP (superseded) |
|
||||
| 106 | `src/scene/address/iplAddressEdit.cpp` | constants | Name direct button animation requests missed by the first pass | 4 | KEEP |
|
||||
| 107 | `src/scene/address/iplAddressEdit.cpp` | constants | Name parental messaging restrictions and confirmed friend checks | 4 | KEEP |
|
||||
| 108 | `src/scene/address/iplAddressEdit.cpp` | constants | Name product regions in keyboard setup switches | 4 | KEEP |
|
||||
| 109 | `src/scene/address/iplAddressEdit.cpp` | constants | Name friend registration mode switch cases | 2 | KEEP |
|
||||
| 110 | `src/scene/address/iplAddressEdit.cpp` | constants | Name the Mii attachment message | 1 | KEEP |
|
||||
| 111 | `src/scene/address/iplAddressEdit.cpp` | names | Name saved friend status as a status rather than an address type | 2 | KEEP |
|
||||
| 112 | `src/scene/address/iplAddress.cpp` | constants | Name the waiting-friend email subject and body messages | 2 | KEEP |
|
||||
| 113 | `src/scene/address/iplAddressEdit.cpp` | constants | Name keyboard state bounds where a declared enum exists | 4 | KEEP |
|
||||
|
||||
## Rejected candidates and scope decisions
|
||||
|
||||
- Trials 1 and 13 used an incorrect namespace or SDK spelling. The corrected scene IDs and `OS_THREAD_ATTR_DETACH` passed in 7 and 19. This SDK has no named nonblocking message flag, so 14 remains literal zero.
|
||||
- Trial 50 incorrectly mapped message 446 to an enum for 454. The object comparison rejected it. Trial 53 retained only verified values; message 446 remains unchanged because no matching named entry exists.
|
||||
- Trial 52 could not remove the DPD callback cast: the declared SDK parameter is `KPADCallback*`, whereas the callback is a function pointer. Changing that shared signature is outside this task.
|
||||
- Trials 26, 38, and 39 changed bytes when simplifying OS thread BOOL checks. Trials 35, 36, 37, 71, 73, and 81 changed bytes when simplifying returns, self-assignment, pointer differences, or ternaries. The original expressions remain.
|
||||
- The unsigned JPEG clamp accepted direct branches while retaining its range flag. The signed clamp and removing the unsigned range flag changed bytes (60 and 63). Splitting reused JPEG variables into separate lifetimes also changed bytes (91 and 92); accepted renames preserve declarations, statement order, and lifetimes.
|
||||
- The FAT enums in 82 and 83 have the expected numeric values, but including their headers and using them changed object output. The source was restored.
|
||||
- The HTTP receive pointer could not be implicitly initialized as `u8*` from the declared `char*` buffer (90). A `char*` cursor compiled but changed bytes (93). Changing the uppercase test from bitwise to logical conjunction also changed bytes (74).
|
||||
- Remaining same-type narrow-integer casts and destination self-assignment in `pf_path.c` changed bytes in 34, 96, and 97. Accepted accessor casts were removed in 98.
|
||||
- Address hover counters use `== TRUE` as a count-of-one check and must not become a general truth test. Internal PF errors have different meanings from public FA errno values; numeric-only PF aliases would not improve readability.
|
||||
- Existing serialized disk offsets and the save-block offset accesses in ESMisc have no verified declared member equivalent. No new struct layout or shared-header guard was introduced.
|
||||
- `math_types.cpp`, address headers, and `iplAddressAddSel.cpp` had no suitable remaining cleanup from the requested categories. They remain byte-for-byte source-identical. The toolbar table still contains its pre-existing index 7; the animation enum defines only indices 0 through 6.
|
||||
- Three casts removed from `pf_service.c` occur in its DEBUG branch. The mandated release 4.3U build validates byte preservation; a separate DEBUG configuration was not built.
|
||||
- Source comments are unchanged in every touched file. A final scan of all 193 permitted files found no Ghidra or m2c placeholder identifiers. Mathematical one-letter temporaries that would require lifetime changes remain where trials rejected those changes.
|
||||
|
||||
## Files changed
|
||||
|
||||
- `libs/NW4R/src/lyt/lyt_window.cpp`
|
||||
- `libs/RVLMiddleware/TMC_JPEG/src/buffer/idct_block_var.c`
|
||||
- `libs/RVL_SDK/src/fa/api/FAAttach.c`
|
||||
- `libs/RVL_SDK/src/fa/api/FADetach.c`
|
||||
- `libs/RVL_SDK/src/fa/api/FAErrnum.c`
|
||||
- `libs/RVL_SDK/src/fa/api/FAInit.c`
|
||||
- `libs/RVL_SDK/src/fa/api/FARegistCB.c`
|
||||
- `libs/RVL_SDK/src/fa/driver/nand_drv.c`
|
||||
- `libs/RVL_SDK/src/fa/driver/sd_drv.c`
|
||||
- `libs/RVL_SDK/src/fa/pdm_disk.c`
|
||||
- `libs/RVL_SDK/src/fa/pdm_partition.c`
|
||||
- `libs/RVL_SDK/src/fa/pf_clib.c`
|
||||
- `libs/RVL_SDK/src/fa/pf_cp932.c`
|
||||
- `libs/RVL_SDK/src/fa/pf_entry.c`
|
||||
- `libs/RVL_SDK/src/fa/pf_entry_iterator.c`
|
||||
- `libs/RVL_SDK/src/fa/pf_fat12.c`
|
||||
- `libs/RVL_SDK/src/fa/pf_file.c`
|
||||
- `libs/RVL_SDK/src/fa/pf_path.c`
|
||||
- `libs/RVL_SDK/src/fa/pf_sector.c`
|
||||
- `libs/RVL_SDK/src/fa/pf_service.c`
|
||||
- `libs/RVL_SDK/src/fa/pf_str.c`
|
||||
- `libs/RevoEX/src/net/aes.c`
|
||||
- `libs/RevoEX/src/nhttp/NHTTP_recvbuf.c`
|
||||
- `src/BS2/BS2Update.c`
|
||||
- `src/iplwww/www_wiisetting.cpp`
|
||||
- `src/keyboard/tiPredictLang.cpp`
|
||||
- `src/keyboard/tiString.cpp`
|
||||
- `src/keyboard/tiToolBar.cpp`
|
||||
- `src/keyboard/tiZiString.cpp`
|
||||
- `src/scene/address/iplAddress.cpp`
|
||||
- `src/scene/address/iplAddressEdit.cpp`
|
||||
- `src/utility/iplESMisc.cpp`
|
||||
|
||||
## Pre-existing non-matching functions
|
||||
|
||||
These 18 baseline functions remain unchanged. They retain their existing code-generation differences from retail. This cleanup intentionally does not alter those bytes.
|
||||
|
||||
| Unit | Exact symbol | Objdiff before and after |
|
||||
| --- | --- | ---: |
|
||||
| `libs/NW4R/src/lyt/lyt_window` | `DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc` | 98.17819% |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/buffer/idct_block_var` | `TMCJPEGDEC_IdctBlock_Lumi` | 86.178986% |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/buffer/idct_block_var` | `TMCJPEGDEC_IdctBlock_Col` | 92.927315% |
|
||||
| `libs/RVL_SDK/src/fa/driver/sd_drv` | `pfd_sddrv_init` | 93.125% |
|
||||
| `libs/RVL_SDK/src/fa/driver/sd_drv` | `pfd_sddrv_finalize` | 92.63158% |
|
||||
| `libs/RVL_SDK/src/fa/driver/sd_drv` | `pfd_sddrv_build_fat32_mbr_bpb` | 95.202705% |
|
||||
| `libs/RVL_SDK/src/fa/pdm_partition` | `pdm_part_is_master_boot_sector` | 87.39286% |
|
||||
| `libs/RevoEX/src/net/aes` | `AESiEncryptBlock` | 65.81013% |
|
||||
| `libs/RevoEX/src/net/aes` | `AESiDecryptBlock` | 78.95618% |
|
||||
| `libs/RevoEX/src/nhttp/NHTTP_recvbuf` | `NHTTPi_compareTokenN_HdrRecvBuf` | 97.32258% |
|
||||
| `src/BS2/BS2Update` | `UpdateThread` | 95.23877% |
|
||||
| `src/iplwww/www_wiisetting` | `Getter___Q23www10wiisettingFP14WWWJSPluginObjPCcP16WWWJSPluginValue` | 99.86043% |
|
||||
| `src/keyboard/tiString` | `inputChar__Q39textinput8tistring9DecolatedFw` | 90.757355% |
|
||||
| `src/keyboard/tiZiString` | `update__Q39textinput8tistring6WithZiFv` | 98.36996% |
|
||||
| `src/scene/address/iplAddressEdit` | `create__Q33ipl5scene11AddressEditFv` | 97.5561% |
|
||||
| `src/scene/address/iplAddressEdit` | `get_friendinfo__Q33ipl5scene11AddressEditFv` | 88.03571% |
|
||||
| `src/scene/address/iplAddressEdit` | `update_friendinfo__Q33ipl5scene11AddressEditFv` | 99.42105% |
|
||||
| `src/utility/iplESMisc` | `DeleteUnauthorizedData__Q33ipl7utility6ESMiscFPQ23EGG4Heap` | 99.14254% |
|
||||
|
||||
## Verification commands
|
||||
|
||||
```sh
|
||||
python3 /mnt/drive2/projects/wii-ipl-workers/_restore0928-tools/gate.py <all 32 changed units> --base 46618a101c2aabcd39559270fa2fd7344accc872
|
||||
build/tools/objdiff-cli report generate -p . -o /tmp/rx43/after.json -f json
|
||||
python3 tools/decomp-assist/pool_diff.py build/43U/src/<unit>.o build/43U/obj/<unit>.o
|
||||
python3 tools/decomp-assist/ctxdiff.py <unit> <exact-symbol>
|
||||
git diff --check
|
||||
```
|
||||
|
||||
The full gate below is the final non-quick run. Supplemental evidence in `/tmp/rx43` includes baseline/final JSON, complete object hashes, each trial build output, rejected source diffs and objects, pool output, and ctxdiff output.
|
||||
|
||||
## Final full gate
|
||||
|
||||
```text
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[libs/NW4R/src/lyt/lyt_window] pool: IDENTICAL
|
||||
[libs/NW4R/src/lyt/lyt_window] objdiff: code 9848/11352 data 316/316 functions 20/21 fuzzy 99.7586 linked code 0
|
||||
[libs/NW4R/src/lyt/lyt_window] instruction-exact functions: 20/21
|
||||
[libs/NW4R/src/lyt/lyt_window] section .ctors size 4 match 100.0
|
||||
[libs/NW4R/src/lyt/lyt_window] section .data size 256 match 100.0
|
||||
[libs/NW4R/src/lyt/lyt_window] section .sbss size 8 match 100.0
|
||||
[libs/NW4R/src/lyt/lyt_window] section .sdata2 size 48 match 100.0
|
||||
[libs/NW4R/src/lyt/lyt_window] section .text size 11352 match 99.75864
|
||||
[libs/NW4R/src/lyt/lyt_window] below 100: DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc 98.17819
|
||||
[libs/NW4R/src/lyt/lyt_window] baseline: code 9848/11352 data 316 functions 20 fuzzy 99.7586
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/buffer/idct_block_var] pool: IDENTICAL
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/buffer/idct_block_var] objdiff: code None/2844 data None/None functions 0/2 fuzzy 90.4880 linked code 0
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/buffer/idct_block_var] instruction-exact functions: 0/2
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/buffer/idct_block_var] section .text size 2844 match 90.488045
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/buffer/idct_block_var] below 100: TMCJPEGDEC_IdctBlock_Lumi 86.178986
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/buffer/idct_block_var] below 100: TMCJPEGDEC_IdctBlock_Col 92.927315
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/buffer/idct_block_var] baseline: code None/2844 data None functions 0 fuzzy 90.4880
|
||||
[libs/RVL_SDK/src/fa/api/FAAttach] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/api/FAAttach] objdiff: code 500/500 data 240/240 functions 1/1 fuzzy 100.0000 linked code 500
|
||||
[libs/RVL_SDK/src/fa/api/FAAttach] instruction-exact functions: 1/1
|
||||
[libs/RVL_SDK/src/fa/api/FAAttach] section .bss size 208 match 100.0
|
||||
[libs/RVL_SDK/src/fa/api/FAAttach] section .data size 24 match 100.0
|
||||
[libs/RVL_SDK/src/fa/api/FAAttach] section .sdata size 8 match 100.0
|
||||
[libs/RVL_SDK/src/fa/api/FAAttach] section .text size 500 match 100.0
|
||||
[libs/RVL_SDK/src/fa/api/FAAttach] baseline: code 500/500 data 240 functions 1 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/fa/api/FADetach] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/api/FADetach] objdiff: code 168/168 data None/None functions 1/1 fuzzy 100.0000 linked code 168
|
||||
[libs/RVL_SDK/src/fa/api/FADetach] instruction-exact functions: 1/1
|
||||
[libs/RVL_SDK/src/fa/api/FADetach] section .text size 168 match 100.0
|
||||
[libs/RVL_SDK/src/fa/api/FADetach] baseline: code 168/168 data None functions 1 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/fa/api/FAErrnum] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/api/FAErrnum] objdiff: code 64/64 data None/None functions 1/1 fuzzy 100.0000 linked code 64
|
||||
[libs/RVL_SDK/src/fa/api/FAErrnum] instruction-exact functions: 1/1
|
||||
[libs/RVL_SDK/src/fa/api/FAErrnum] section .text size 64 match 100.0
|
||||
[libs/RVL_SDK/src/fa/api/FAErrnum] baseline: code 64/64 data None functions 1 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/fa/api/FAInit] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/api/FAInit] objdiff: code 208/208 data 88/88 functions 1/1 fuzzy 100.0000 linked code 208
|
||||
[libs/RVL_SDK/src/fa/api/FAInit] instruction-exact functions: 1/1
|
||||
[libs/RVL_SDK/src/fa/api/FAInit] section .data size 72 match 100.0
|
||||
[libs/RVL_SDK/src/fa/api/FAInit] section .sbss size 8 match 100.0
|
||||
[libs/RVL_SDK/src/fa/api/FAInit] section .sdata size 8 match 100.0
|
||||
[libs/RVL_SDK/src/fa/api/FAInit] section .text size 208 match 100.0
|
||||
[libs/RVL_SDK/src/fa/api/FAInit] baseline: code 208/208 data 88 functions 1 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/fa/api/FARegistCB] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/api/FARegistCB] objdiff: code 300/300 data 24/24 functions 5/5 fuzzy 100.0000 linked code 300
|
||||
[libs/RVL_SDK/src/fa/api/FARegistCB] instruction-exact functions: 5/5
|
||||
[libs/RVL_SDK/src/fa/api/FARegistCB] section .bss size 24 match 100.0
|
||||
[libs/RVL_SDK/src/fa/api/FARegistCB] section .text size 300 match 100.0
|
||||
[libs/RVL_SDK/src/fa/api/FARegistCB] baseline: code 300/300 data 24 functions 5 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/fa/driver/nand_drv] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/driver/nand_drv] objdiff: code 6952/6952 data 5696/5696 functions 18/18 fuzzy 100.0000 linked code 6952
|
||||
[libs/RVL_SDK/src/fa/driver/nand_drv] instruction-exact functions: 18/18
|
||||
[libs/RVL_SDK/src/fa/driver/nand_drv] section .bss size 5624 match 100.0
|
||||
[libs/RVL_SDK/src/fa/driver/nand_drv] section .rodata size 32 match 100.0
|
||||
[libs/RVL_SDK/src/fa/driver/nand_drv] section .sbss size 32 match 100.0
|
||||
[libs/RVL_SDK/src/fa/driver/nand_drv] section .sdata size 8 match 100.0
|
||||
[libs/RVL_SDK/src/fa/driver/nand_drv] section .text size 6952 match 100.0
|
||||
[libs/RVL_SDK/src/fa/driver/nand_drv] baseline: code 6952/6952 data 5696 functions 18 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] objdiff: code 10068/11760 data 3592/3592 functions 23/26 fuzzy 99.1582 linked code 0
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] instruction-exact functions: 23/26
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] section .bss size 608 match 100.0
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] section .data size 2576 match 100.0
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] section .rodata size 368 match 100.0
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] section .sbss size 40 match 100.0
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] section .text size 11760 match 99.158165
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_init 93.125
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_finalize 92.63158
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_build_fat32_mbr_bpb 95.202705
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] baseline: code 10068/11760 data 3592 functions 23 fuzzy 99.1582
|
||||
[libs/RVL_SDK/src/fa/pdm_disk] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/pdm_disk] objdiff: code 2028/2028 data 2504/2504 functions 17/17 fuzzy 100.0000 linked code 2028
|
||||
[libs/RVL_SDK/src/fa/pdm_disk] instruction-exact functions: 17/17
|
||||
[libs/RVL_SDK/src/fa/pdm_disk] section .bss size 2504 match 100.0
|
||||
[libs/RVL_SDK/src/fa/pdm_disk] section .text size 2028 match 100.0
|
||||
[libs/RVL_SDK/src/fa/pdm_disk] baseline: code 2028/2028 data 2504 functions 17 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/fa/pdm_partition] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/pdm_partition] objdiff: code 3380/3716 data None/None functions 19/20 fuzzy 98.8601 linked code 0
|
||||
[libs/RVL_SDK/src/fa/pdm_partition] instruction-exact functions: 19/20
|
||||
[libs/RVL_SDK/src/fa/pdm_partition] section .text size 3716 match 98.86006
|
||||
[libs/RVL_SDK/src/fa/pdm_partition] below 100: pdm_part_is_master_boot_sector 87.39286
|
||||
[libs/RVL_SDK/src/fa/pdm_partition] baseline: code 3380/3716 data None functions 19 fuzzy 98.8601
|
||||
[libs/RVL_SDK/src/fa/pf_clib] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/pf_clib] objdiff: code 1084/1084 data None/None functions 12/12 fuzzy 100.0000 linked code 1084
|
||||
[libs/RVL_SDK/src/fa/pf_clib] instruction-exact functions: 12/12
|
||||
[libs/RVL_SDK/src/fa/pf_clib] section .text size 1084 match 100.0
|
||||
[libs/RVL_SDK/src/fa/pf_clib] baseline: code 1084/1084 data None functions 12 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/fa/pf_cp932] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/pf_cp932] objdiff: code 1296/1296 data 17016/17016 functions 6/6 fuzzy 100.0000 linked code 1296
|
||||
[libs/RVL_SDK/src/fa/pf_cp932] instruction-exact functions: 6/6
|
||||
[libs/RVL_SDK/src/fa/pf_cp932] section .rodata size 17016 match 100.0
|
||||
[libs/RVL_SDK/src/fa/pf_cp932] section .text size 1296 match 100.0
|
||||
[libs/RVL_SDK/src/fa/pf_cp932] baseline: code 1296/1296 data 17016 functions 6 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/fa/pf_entry] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/pf_entry] objdiff: code 6532/6532 data 24/24 functions 20/20 fuzzy 100.0000 linked code 6532
|
||||
[libs/RVL_SDK/src/fa/pf_entry] instruction-exact functions: 20/20
|
||||
[libs/RVL_SDK/src/fa/pf_entry] section .data size 16 match 100.0
|
||||
[libs/RVL_SDK/src/fa/pf_entry] section .sdata2 size 8 match 100.0
|
||||
[libs/RVL_SDK/src/fa/pf_entry] section .text size 6532 match 100.0
|
||||
[libs/RVL_SDK/src/fa/pf_entry] baseline: code 6532/6532 data 24 functions 20 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/fa/pf_entry_iterator] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/pf_entry_iterator] objdiff: code 7880/7880 data 24/24 functions 16/16 fuzzy 100.0000 linked code 7880
|
||||
[libs/RVL_SDK/src/fa/pf_entry_iterator] instruction-exact functions: 16/16
|
||||
[libs/RVL_SDK/src/fa/pf_entry_iterator] section .sdata size 24 match 100.0
|
||||
[libs/RVL_SDK/src/fa/pf_entry_iterator] section .text size 7880 match 100.0
|
||||
[libs/RVL_SDK/src/fa/pf_entry_iterator] baseline: code 7880/7880 data 24 functions 16 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/fa/pf_fat12] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/pf_fat12] objdiff: code 2164/2164 data None/None functions 4/4 fuzzy 100.0000 linked code 2164
|
||||
[libs/RVL_SDK/src/fa/pf_fat12] instruction-exact functions: 4/4
|
||||
[libs/RVL_SDK/src/fa/pf_fat12] section .text size 2164 match 100.0
|
||||
[libs/RVL_SDK/src/fa/pf_fat12] baseline: code 2164/2164 data None functions 4 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/fa/pf_file] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/pf_file] objdiff: code 17820/17820 data None/None functions 45/45 fuzzy 100.0000 linked code 17820
|
||||
[libs/RVL_SDK/src/fa/pf_file] instruction-exact functions: 45/45
|
||||
[libs/RVL_SDK/src/fa/pf_file] section .text size 17820 match 100.0
|
||||
[libs/RVL_SDK/src/fa/pf_file] baseline: code 17820/17820 data None functions 45 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/fa/pf_path] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/pf_path] objdiff: code 11872/11872 data 56/56 functions 27/27 fuzzy 100.0000 linked code 11872
|
||||
[libs/RVL_SDK/src/fa/pf_path] instruction-exact functions: 27/27
|
||||
[libs/RVL_SDK/src/fa/pf_path] section .sdata size 48 match 100.0
|
||||
[libs/RVL_SDK/src/fa/pf_path] section .sdata2 size 8 match 100.0
|
||||
[libs/RVL_SDK/src/fa/pf_path] section .text size 11872 match 100.0
|
||||
[libs/RVL_SDK/src/fa/pf_path] baseline: code 11872/11872 data 56 functions 27 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/fa/pf_sector] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/pf_sector] objdiff: code 1832/1832 data None/None functions 4/4 fuzzy 100.0000 linked code 1832
|
||||
[libs/RVL_SDK/src/fa/pf_sector] instruction-exact functions: 4/4
|
||||
[libs/RVL_SDK/src/fa/pf_sector] section .text size 1832 match 100.0
|
||||
[libs/RVL_SDK/src/fa/pf_sector] baseline: code 1832/1832 data None functions 4 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/fa/pf_service] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/pf_service] objdiff: code 312/312 data None/None functions 2/2 fuzzy 100.0000 linked code 312
|
||||
[libs/RVL_SDK/src/fa/pf_service] instruction-exact functions: 2/2
|
||||
[libs/RVL_SDK/src/fa/pf_service] section .text size 312 match 100.0
|
||||
[libs/RVL_SDK/src/fa/pf_service] baseline: code 312/312 data None functions 2 fuzzy 100.0000
|
||||
[libs/RVL_SDK/src/fa/pf_str] pool: IDENTICAL
|
||||
[libs/RVL_SDK/src/fa/pf_str] objdiff: code 1380/1380 data None/None functions 11/11 fuzzy 100.0000 linked code 1380
|
||||
[libs/RVL_SDK/src/fa/pf_str] instruction-exact functions: 11/11
|
||||
[libs/RVL_SDK/src/fa/pf_str] section .text size 1380 match 100.0
|
||||
[libs/RVL_SDK/src/fa/pf_str] baseline: code 1380/1380 data None functions 11 fuzzy 100.0000
|
||||
[libs/RevoEX/src/net/aes] pool: IDENTICAL
|
||||
[libs/RevoEX/src/net/aes] objdiff: code 1116/2752 data 2800/2800 functions 7/9 fuzzy 84.4709 linked code 0
|
||||
[libs/RevoEX/src/net/aes] instruction-exact functions: 7/9
|
||||
[libs/RevoEX/src/net/aes] section .data size 200 match 100.0
|
||||
[libs/RevoEX/src/net/aes] section .rodata size 2592 match 100.0
|
||||
[libs/RevoEX/src/net/aes] section .sdata2 size 8 match 100.0
|
||||
[libs/RevoEX/src/net/aes] section .text size 2752 match 84.47093
|
||||
[libs/RevoEX/src/net/aes] below 100: AESiEncryptBlock 65.81013
|
||||
[libs/RevoEX/src/net/aes] below 100: AESiDecryptBlock 78.95618
|
||||
[libs/RevoEX/src/net/aes] baseline: code 1116/2752 data 2800 functions 7 fuzzy 84.4709
|
||||
[libs/RevoEX/src/nhttp/NHTTP_recvbuf] pool: IDENTICAL
|
||||
[libs/RevoEX/src/nhttp/NHTTP_recvbuf] objdiff: code 1196/1692 data None/None functions 6/7 fuzzy 99.2151 linked code 0
|
||||
[libs/RevoEX/src/nhttp/NHTTP_recvbuf] instruction-exact functions: 6/7
|
||||
[libs/RevoEX/src/nhttp/NHTTP_recvbuf] section .text size 1692 match 99.21513
|
||||
[libs/RevoEX/src/nhttp/NHTTP_recvbuf] below 100: NHTTPi_compareTokenN_HdrRecvBuf 97.32258
|
||||
[libs/RevoEX/src/nhttp/NHTTP_recvbuf] baseline: code 1196/1692 data None functions 6 fuzzy 99.2151
|
||||
[src/BS2/BS2Update] pool: IDENTICAL
|
||||
[src/BS2/BS2Update] objdiff: code 400/4052 data 10488/10488 functions 9/10 fuzzy 95.7088 linked code 0
|
||||
[src/BS2/BS2Update] instruction-exact functions: 9/10
|
||||
[src/BS2/BS2Update] section .bss size 9056 match 100.0
|
||||
[src/BS2/BS2Update] section .data size 1328 match 100.0
|
||||
[src/BS2/BS2Update] section .sbss size 80 match 100.0
|
||||
[src/BS2/BS2Update] section .sdata size 24 match 100.0
|
||||
[src/BS2/BS2Update] section .text size 4052 match 95.708786
|
||||
[src/BS2/BS2Update] below 100: UpdateThread 95.23877
|
||||
[src/BS2/BS2Update] baseline: code 400/4052 data 10488 functions 9 fuzzy 95.7088
|
||||
[src/iplwww/www_wiisetting] pool: IDENTICAL
|
||||
[src/iplwww/www_wiisetting] objdiff: code 3740/6176 data 3856/3856 functions 20/21 fuzzy 99.9450 linked code 0
|
||||
[src/iplwww/www_wiisetting] instruction-exact functions: 20/21
|
||||
[src/iplwww/www_wiisetting] section .bss size 104 match 100.0
|
||||
[src/iplwww/www_wiisetting] section .data size 2576 match 100.0
|
||||
[src/iplwww/www_wiisetting] section .rodata size 792 match 100.0
|
||||
[src/iplwww/www_wiisetting] section .sbss size 32 match 100.0
|
||||
[src/iplwww/www_wiisetting] section .sdata size 320 match 100.0
|
||||
[src/iplwww/www_wiisetting] section .sdata2 size 32 match 100.0
|
||||
[src/iplwww/www_wiisetting] section .text size 6176 match 99.94495
|
||||
[src/iplwww/www_wiisetting] below 100: Getter___Q23www10wiisettingFP14WWWJSPluginObjPCcP16WWWJSPluginValue 99.86043
|
||||
[src/iplwww/www_wiisetting] baseline: code 3740/6176 data 3856 functions 20 fuzzy 99.9450
|
||||
[src/keyboard/tiPredictLang] pool: IDENTICAL
|
||||
[src/keyboard/tiPredictLang] objdiff: code 5536/5536 data 2300/2300 functions 36/36 fuzzy 100.0000 linked code 5536
|
||||
[src/keyboard/tiPredictLang] instruction-exact functions: 36/36
|
||||
[src/keyboard/tiPredictLang] section .ctors size 4 match 100.0
|
||||
[src/keyboard/tiPredictLang] section .data size 1672 match 100.0
|
||||
[src/keyboard/tiPredictLang] section .rodata size 616 match 100.0
|
||||
[src/keyboard/tiPredictLang] section .sdata size 8 match 100.0
|
||||
[src/keyboard/tiPredictLang] section .text size 5536 match 100.0
|
||||
[src/keyboard/tiPredictLang] baseline: code 5536/5536 data 2300 functions 36 fuzzy 100.0000
|
||||
[src/keyboard/tiString] pool: IDENTICAL
|
||||
[src/keyboard/tiString] objdiff: code 4632/5176 data 288/288 functions 41/42 fuzzy 99.0286 linked code 0
|
||||
[src/keyboard/tiString] instruction-exact functions: 41/42
|
||||
[src/keyboard/tiString] section .data size 288 match 100.0
|
||||
[src/keyboard/tiString] section .text size 5176 match 99.028595
|
||||
[src/keyboard/tiString] below 100: inputChar__Q39textinput8tistring9DecolatedFw 90.757355
|
||||
[src/keyboard/tiString] baseline: code 4632/5176 data 288 functions 41 fuzzy 99.0286
|
||||
[src/keyboard/tiToolBar] pool: IDENTICAL
|
||||
[src/keyboard/tiToolBar] objdiff: code 5464/5464 data 1452/1452 functions 37/37 fuzzy 100.0000 linked code 5464
|
||||
[src/keyboard/tiToolBar] instruction-exact functions: 37/37
|
||||
[src/keyboard/tiToolBar] section .ctors size 4 match 100.0
|
||||
[src/keyboard/tiToolBar] section .data size 944 match 100.0
|
||||
[src/keyboard/tiToolBar] section .rodata size 480 match 100.0
|
||||
[src/keyboard/tiToolBar] section .sdata size 24 match 100.0
|
||||
[src/keyboard/tiToolBar] section .text size 5464 match 100.0
|
||||
[src/keyboard/tiToolBar] baseline: code 5464/5464 data 1452 functions 37 fuzzy 100.0000
|
||||
[src/keyboard/tiZiString] pool: IDENTICAL
|
||||
[src/keyboard/tiZiString] objdiff: code 3720/5504 data 7680/7680 functions 28/29 fuzzy 99.4717 linked code 0
|
||||
[src/keyboard/tiZiString] instruction-exact functions: 28/29
|
||||
[src/keyboard/tiZiString] section .bss size 7296 match 100.0
|
||||
[src/keyboard/tiZiString] section .data size 328 match 100.0
|
||||
[src/keyboard/tiZiString] section .rodata size 56 match 100.0
|
||||
[src/keyboard/tiZiString] section .text size 5504 match 99.47166
|
||||
[src/keyboard/tiZiString] below 100: update__Q39textinput8tistring6WithZiFv 98.36996
|
||||
[src/keyboard/tiZiString] baseline: code 3720/5504 data 7680 functions 28 fuzzy 99.4717
|
||||
[src/scene/address/iplAddress] pool: IDENTICAL
|
||||
[src/scene/address/iplAddress] objdiff: code 23988/23988 data 1964/1964 functions 101/101 fuzzy 100.0000 linked code 23988
|
||||
[src/scene/address/iplAddress] instruction-exact functions: 101/101
|
||||
[src/scene/address/iplAddress] section .ctors size 4 match 100.0
|
||||
[src/scene/address/iplAddress] section .data size 1880 match 100.0
|
||||
[src/scene/address/iplAddress] section .rodata size 24 match 100.0
|
||||
[src/scene/address/iplAddress] section .sbss size 8 match 100.0
|
||||
[src/scene/address/iplAddress] section .sdata size 16 match 100.0
|
||||
[src/scene/address/iplAddress] section .sdata2 size 32 match 100.0
|
||||
[src/scene/address/iplAddress] section .text size 23988 match 100.0
|
||||
[src/scene/address/iplAddress] baseline: code 23988/23988 data 1964 functions 101 fuzzy 100.0000
|
||||
[src/scene/address/iplAddressEdit] pool: IDENTICAL
|
||||
[src/scene/address/iplAddressEdit] objdiff: code 23344/27112 data 2560/2560 functions 91/94 fuzzy 99.5528 linked code 0
|
||||
[src/scene/address/iplAddressEdit] instruction-exact functions: 91/94
|
||||
[src/scene/address/iplAddressEdit] section .bss size 320 match 100.0
|
||||
[src/scene/address/iplAddressEdit] section .data size 2152 match 100.0
|
||||
[src/scene/address/iplAddressEdit] section .rodata size 40 match 100.0
|
||||
[src/scene/address/iplAddressEdit] section .sdata size 24 match 100.0
|
||||
[src/scene/address/iplAddressEdit] section .sdata2 size 24 match 100.0
|
||||
[src/scene/address/iplAddressEdit] section .text size 27112 match 99.55282
|
||||
[src/scene/address/iplAddressEdit] below 100: create__Q33ipl5scene11AddressEditFv 97.5561
|
||||
[src/scene/address/iplAddressEdit] below 100: get_friendinfo__Q33ipl5scene11AddressEditFv 88.03571
|
||||
[src/scene/address/iplAddressEdit] below 100: update_friendinfo__Q33ipl5scene11AddressEditFv 99.42105
|
||||
[src/scene/address/iplAddressEdit] baseline: code 23344/27112 data 2560 functions 91 fuzzy 99.5528
|
||||
[src/utility/iplESMisc] pool: IDENTICAL
|
||||
[src/utility/iplESMisc] objdiff: code 9404/11200 data 4416/4416 functions 30/31 fuzzy 99.8625 linked code 0
|
||||
[src/utility/iplESMisc] instruction-exact functions: 30/31
|
||||
[src/utility/iplESMisc] section .data size 4384 match 100.0
|
||||
[src/utility/iplESMisc] section .sdata size 32 match 100.0
|
||||
[src/utility/iplESMisc] section .text size 11200 match 99.8625
|
||||
[src/utility/iplESMisc] below 100: DeleteUnauthorizedData__Q33ipl7utility6ESMiscFPQ23EGG4Heap 99.14254
|
||||
[src/utility/iplESMisc] baseline: code 9404/11200 data 4416 functions 30 fuzzy 99.8625
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 93.99622 -> 93.99622
|
||||
global fuzzy_match_percent: 99.81744 -> 99.81744
|
||||
global complete_code_percent: 80.08451 -> 80.08451
|
||||
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
|
||||
```
|
||||
|
||||
## Pool checks
|
||||
|
||||
```text
|
||||
[libs/NW4R/src/lyt/lyt_window] POOL IDENTICAL up to 1 (mine=1 base=1)
|
||||
[libs/RVLMiddleware/TMC_JPEG/src/buffer/idct_block_var] POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
[libs/RVL_SDK/src/fa/api/FAAttach] POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
[libs/RVL_SDK/src/fa/api/FADetach] POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
[libs/RVL_SDK/src/fa/api/FAErrnum] POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
[libs/RVL_SDK/src/fa/api/FAInit] POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
[libs/RVL_SDK/src/fa/api/FARegistCB] POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
[libs/RVL_SDK/src/fa/driver/nand_drv] POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] POOL IDENTICAL up to 46 (mine=46 base=46)
|
||||
[libs/RVL_SDK/src/fa/pdm_disk] POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
[libs/RVL_SDK/src/fa/pdm_partition] POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
[libs/RVL_SDK/src/fa/pf_clib] POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
[libs/RVL_SDK/src/fa/pf_cp932] POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
[libs/RVL_SDK/src/fa/pf_entry] POOL IDENTICAL up to 1 (mine=1 base=1)
|
||||
[libs/RVL_SDK/src/fa/pf_entry_iterator] POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
[libs/RVL_SDK/src/fa/pf_fat12] POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
[libs/RVL_SDK/src/fa/pf_file] POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
[libs/RVL_SDK/src/fa/pf_path] POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
[libs/RVL_SDK/src/fa/pf_sector] POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
[libs/RVL_SDK/src/fa/pf_service] POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
[libs/RVL_SDK/src/fa/pf_str] POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
[libs/RevoEX/src/net/aes] POOL IDENTICAL up to 4 (mine=4 base=4)
|
||||
[libs/RevoEX/src/nhttp/NHTTP_recvbuf] POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
[src/BS2/BS2Update] POOL IDENTICAL up to 55 (mine=55 base=55)
|
||||
[src/iplwww/www_wiisetting] POOL IDENTICAL up to 72 (mine=72 base=72)
|
||||
[src/keyboard/tiPredictLang] POOL IDENTICAL up to 14 (mine=14 base=14)
|
||||
[src/keyboard/tiString] POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
[src/keyboard/tiToolBar] POOL IDENTICAL up to 12 (mine=12 base=12)
|
||||
[src/keyboard/tiZiString] POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
[src/scene/address/iplAddress] POOL IDENTICAL up to 81 (mine=81 base=81)
|
||||
[src/scene/address/iplAddressEdit] POOL IDENTICAL up to 57 (mine=57 base=57)
|
||||
[src/utility/iplESMisc] POOL IDENTICAL up to 114 (mine=114 base=114)
|
||||
```
|
||||
|
||||
## Representative ctxdiff checks
|
||||
|
||||
```text
|
||||
[libs/NW4R/src/lyt/lyt_window] __ct__Q34nw4r3lyt6WindowFPCQ44nw4r3lyt3res6WindowRCQ34nw4r3lyt11ResBlockSet
|
||||
src 0x208 base 0x208 insns 130/130
|
||||
diffs 0: []
|
||||
|
||||
[libs/RVL_SDK/src/fa/api/FAAttach] FAAttach
|
||||
src 0x1f4 base 0x1f4 insns 125/125
|
||||
diffs 0: []
|
||||
|
||||
[libs/RVL_SDK/src/fa/api/FADetach] FADetach
|
||||
src 0xa8 base 0xa8 insns 42/42
|
||||
diffs 0: []
|
||||
|
||||
[libs/RVL_SDK/src/fa/api/FAErrnum] FAErrnum
|
||||
src 0x40 base 0x40 insns 16/16
|
||||
diffs 0: []
|
||||
|
||||
[libs/RVL_SDK/src/fa/api/FAInit] FAInit
|
||||
src 0xd0 base 0xd0 insns 52/52
|
||||
diffs 0: []
|
||||
|
||||
[libs/RVL_SDK/src/fa/api/FARegistCB] FARegistCB
|
||||
src 0xa0 base 0xa0 insns 40/40
|
||||
diffs 0: []
|
||||
|
||||
[libs/RVL_SDK/src/fa/driver/nand_drv] fa_nanddrv_physical_read
|
||||
src 0x2ec base 0x2ec insns 187/187
|
||||
diffs 0: []
|
||||
|
||||
[libs/RVL_SDK/src/fa/driver/sd_drv] pfd_sddrv_store_bpb_buf
|
||||
src 0x51c base 0x51c insns 327/327
|
||||
diffs 0: []
|
||||
|
||||
[libs/RVL_SDK/src/fa/pdm_disk] pdm_disk_convert_sector_into_block
|
||||
src 0xb0 base 0xb0 insns 44/44
|
||||
diffs 0: []
|
||||
|
||||
[libs/RVL_SDK/src/fa/pdm_partition] pdm_part_unregister_callback
|
||||
src 0x14 base 0x14 insns 5/5
|
||||
diffs 0: []
|
||||
|
||||
[libs/RVL_SDK/src/fa/pf_clib] pf_w_strcmp
|
||||
src 0x38 base 0x38 insns 14/14
|
||||
diffs 0: []
|
||||
|
||||
[libs/RVL_SDK/src/fa/pf_cp932] PFCODE_CP932_OEM2Unicode
|
||||
src 0x1bc base 0x1bc insns 111/111
|
||||
diffs 0: []
|
||||
|
||||
[libs/RVL_SDK/src/fa/pf_entry] PFENT_searchEmptyTailSFN
|
||||
src 0x370 base 0x370 insns 220/220
|
||||
diffs 0: []
|
||||
|
||||
[libs/RVL_SDK/src/fa/pf_entry_iterator] PFENT_ITER_IsAtLogicalEnd
|
||||
src 0x10c base 0x10c insns 67/67
|
||||
diffs 0: []
|
||||
|
||||
[libs/RVL_SDK/src/fa/pf_fat12] PFFAT12_WriteFATEntryWithBuf
|
||||
src 0x2bc base 0x2bc insns 175/175
|
||||
diffs 0: []
|
||||
|
||||
[libs/RVL_SDK/src/fa/pf_file] PFFILE_fseek
|
||||
src 0x224 base 0x224 insns 137/137
|
||||
diffs 0: []
|
||||
|
||||
[libs/RVL_SDK/src/fa/pf_path] PFPATH_GetNextCharOfPattern
|
||||
src 0x37c base 0x37c insns 223/223
|
||||
diffs 0: []
|
||||
|
||||
[libs/RVL_SDK/src/fa/pf_sector] PFSEC_ReadFAT
|
||||
src 0xc4 base 0xc4 insns 49/49
|
||||
diffs 0: []
|
||||
|
||||
[libs/RVL_SDK/src/fa/pf_service] PF_GET_LE_U16
|
||||
src 0x10 base 0x10 insns 4/4
|
||||
diffs 0: []
|
||||
|
||||
[libs/RVL_SDK/src/fa/pf_str] PFSTR_StrCmp
|
||||
src 0xa4 base 0xa4 insns 41/41
|
||||
diffs 0: []
|
||||
|
||||
[libs/RevoEX/src/net/aes] NETAESCreateEx
|
||||
src 0x1b0 base 0x1b0 insns 108/108
|
||||
diffs 0: []
|
||||
|
||||
[libs/RevoEX/src/nhttp/NHTTP_recvbuf] NHTTPi_RecvBufN
|
||||
src 0x3c base 0x3c insns 15/15
|
||||
diffs 0: []
|
||||
|
||||
[src/BS2/BS2Update] BS2UpdateInit
|
||||
src 0x120 base 0x120 insns 72/72
|
||||
diffs 0: []
|
||||
|
||||
[src/iplwww/www_wiisetting] DPDCallback2__Q23www10wiisettingFll
|
||||
src 0x24 base 0x24 insns 9/9
|
||||
diffs 0: []
|
||||
|
||||
[src/keyboard/tiPredictLang] __dt__Q39textinput11predictlang12LayoutByNW4RFv
|
||||
src 0xe8 base 0xe8 insns 58/58
|
||||
diffs 0: []
|
||||
|
||||
[src/keyboard/tiString] inputString__Q39textinput8tistring9DecolatedFPCw
|
||||
src 0x64 base 0x64 insns 25/25
|
||||
diffs 0: []
|
||||
|
||||
[src/keyboard/tiToolBar] setQwerty__Q39textinput7toolbar4BaseFb
|
||||
src 0xd0 base 0xd0 insns 52/52
|
||||
diffs 0: []
|
||||
|
||||
[src/keyboard/tiZiString] init__Q39textinput8tistring6WithZiFv
|
||||
src 0x8c base 0x8c insns 35/35
|
||||
diffs 0: []
|
||||
|
||||
[src/scene/address/iplAddress] swap__Q33ipl5scene15FriendListCacheFUlUl
|
||||
src 0xcc base 0xcc insns 51/51
|
||||
diffs 0: []
|
||||
|
||||
[src/scene/address/iplAddressEdit] stt_msg_add_rlt__Q33ipl5scene11AddressEditFv
|
||||
src 0x68 base 0x68 insns 26/26
|
||||
diffs 0: []
|
||||
|
||||
[src/utility/iplESMisc] GetValidTicketIndex__Q33ipl7utility6ESMiscFPQ23EGG4HeapUxP12ESTicketViewUl
|
||||
src 0x2dc base 0x2dc insns 183/183
|
||||
diffs 0: []
|
||||
```
|
||||
|
||||
## Local source commits
|
||||
|
||||
- `936619dd441ec7e5eccaddb9c5ec021a1ce87235` clean up address scene expressions
|
||||
- `6231525de4d35138d4282eb5745b0286b775f2ca` clean up keyboard expressions
|
||||
- `276caecf786de24c810ec8ae9400c77c399100c6` clarify aes and http buffer expressions
|
||||
- `7ed84e64f6e57501f09a5b2e54c0e7ec4f9430d1` clarify jpeg transform expressions
|
||||
- `23e91b1ef26e2dbffa04256d01c9913aac3747e3` remove redundant layout color casts
|
||||
- `7637bba3716bd5c0c70b71f8869d93e08d345d5e` clean up filesystem expressions
|
||||
- `b5c7caf7f04205266fb05903b02745fbac01997a` clean up system utility expressions
|
||||
|
||||
Each commit contains one source group from the final gate-passing diff. Only the report was added after source validation. No remote operation was performed.
|
||||
Reference in New Issue
Block a user