Compare commits
1 Commits
cleanup/ip
...
cleanup/pu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5091975abf |
@@ -139,7 +139,7 @@ namespace ipl {
|
||||
math::LinearIntp<math::VEC2> mMoveAnim; // 0x44
|
||||
|
||||
CDBId mCDBId; // 0x74
|
||||
u8 unused_0x7C[4];
|
||||
u8 unk_0x7C[4];
|
||||
CDBRecordKey mCDBRecordKey; // 0x80
|
||||
u32 mCDBGameCode; // 0xB0
|
||||
|
||||
@@ -179,7 +179,7 @@ namespace ipl {
|
||||
int mState; // 0x12C
|
||||
math::VEC2 mConPos; // 0x130
|
||||
int mConChan; // 0x138
|
||||
u8 unused_0x13C[4];
|
||||
u8 unk_0x13C[4];
|
||||
|
||||
static const char* mAnimNames[TYPE_MAX][1 + ANIM_MAX];
|
||||
|
||||
|
||||
@@ -365,8 +365,8 @@ namespace ipl {
|
||||
int getChJumpChanPage() { return mChJumpPage; }
|
||||
int getChJumpChanIndex() { return mChJumpIndex; }
|
||||
|
||||
void setDiskChannelReady(bool flag) { mbDiskChannelReady = flag; }
|
||||
bool isDiskChannelReady() { return mbDiskChannelReady; }
|
||||
void setUnk_0x1B81(bool flag) { unk_0x1B81 = flag; }
|
||||
bool isUnk_0x1B81() { return unk_0x1B81; }
|
||||
|
||||
void resetChJumpLoad() { mbLoadedChJump = false; }
|
||||
bool hasLoadedChJump() { return mbLoadedChJump; }
|
||||
@@ -399,7 +399,7 @@ namespace ipl {
|
||||
|
||||
int mBS2State; // 0x1B7C
|
||||
bool mbCanRefresh; // 0x1B80
|
||||
bool mbDiskChannelReady;
|
||||
bool unk_0x1B81;
|
||||
|
||||
u8* mpDiskIconBuf; // 0x1B84
|
||||
u8* mpDiskBannerBuf; // 0x1B88
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace ipl {
|
||||
u64 titleId; // 0x10
|
||||
bool threadTerminated; // 0x18
|
||||
bool unk_0x19;
|
||||
bool mbHasNewMessage; // 0x1A
|
||||
bool unk_0x1A;
|
||||
|
||||
EGG::ExpHeap* getHeap() { return heap; }
|
||||
} CSData;
|
||||
|
||||
@@ -226,7 +226,7 @@ struct __zi8_work_data_s {
|
||||
ziU16 unk_0xA0[0x42];
|
||||
ziU16* unk_0x124[1];
|
||||
ziU8* unk_0x128;
|
||||
ziU8 uwdPtrCount; // 0x12C
|
||||
ziU8 unk_0x12C;
|
||||
ziU8 unk_0x12D;
|
||||
ziU8 unk_0x12E;
|
||||
ziU8 unk_0x12F;
|
||||
@@ -309,12 +309,12 @@ struct __zi8_work_data_s {
|
||||
ziWChar unk_0x1A92[0x41];
|
||||
ziU8 unk_0x1B14;
|
||||
ziU8 unk_0x1B15[3];
|
||||
ziU16* unicodeMap; // 0x1B18
|
||||
ziU16 unicodeRange1Min; // 0x1B1C
|
||||
ziU16 unicodeRange1Max; // 0x1B1E
|
||||
ziU16 unicodeRange2Min; // 0x1B20
|
||||
ziU16 unicodeRange2Max; // 0x1B22
|
||||
ziU8 unicodeMapSubLang; // 0x1B24
|
||||
ziU16* unk_0x1B18;
|
||||
ziU16 unk_0x1B1C;
|
||||
ziU16 unk_0x1B1E;
|
||||
ziU16 unk_0x1B20;
|
||||
ziU16 unk_0x1B22;
|
||||
ziU8 unk_0x1B24;
|
||||
ziU8 unk_0x1B25[3];
|
||||
union {
|
||||
ziU32 word;
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
#include <zi8clib/zitypes.h>
|
||||
|
||||
ziU32 Zi8GetZHuwdPtr(ziU32* arg0, ziU16* arg1 ZI_NEED_WORK) {
|
||||
if (ZI_WORK->uwdPtrCount == 0) {
|
||||
if (ZI_WORK->unk_0x12C == 0) {
|
||||
*arg0 = 0;
|
||||
*arg1 = 0;
|
||||
Zi8LogError(0x1A5, ZI_WORK);
|
||||
return 0;
|
||||
} else {
|
||||
*arg1 = ZI_WORK->unk_0x124[ZI_WORK->uwdPtrCount - 1][1] / 3;
|
||||
*arg0 = (ziU32)ZI_WORK->unk_0x124[ZI_WORK->uwdPtrCount - 1];
|
||||
*arg1 = ZI_WORK->unk_0x124[ZI_WORK->unk_0x12C - 1][1] / 3;
|
||||
*arg0 = (ziU32)ZI_WORK->unk_0x124[ZI_WORK->unk_0x12C - 1];
|
||||
*arg0 += 8;
|
||||
Zi8LogError(0x64, ZI_WORK);
|
||||
return 1;
|
||||
|
||||
@@ -1752,7 +1752,7 @@ tone_candidates:
|
||||
}
|
||||
}
|
||||
user_character_search:
|
||||
if (((struct __zi8_work_data_s*)work)->uwdPtrCount && (getMode != 0 || !firstPhoneticPass) &&
|
||||
if (((struct __zi8_work_data_s*)work)->unk_0x12C && (getMode != 0 || !firstPhoneticPass) &&
|
||||
!options->countOnly && (match.nCand <= 1 || (getMode != 1 && getMode != 2)) &&
|
||||
Zi8GetZHuwdPtr(&userEntries, &userCount, work) && (getMode != 0 || match.nSeg <= 1)) {
|
||||
userIndex = 0;
|
||||
|
||||
@@ -65,19 +65,19 @@ ziU16 Zi8Uni2Ptr(ziU16 ch, ziE12* buf ZI_NEED_WORK) {
|
||||
}
|
||||
}
|
||||
e = (ziU8*)table;
|
||||
if (WORKP->unicodeMap != ZI8_NULL && WORKP->unicodeMapSubLang == WORKP->subLanguage) {
|
||||
if ((ziU16)ch >= WORKP->unicodeRange1Min && (ziU16)ch <= WORKP->unicodeRange1Max) {
|
||||
i = (ziU16)(ch - WORKP->unicodeRange1Min);
|
||||
if (WORKP->unk_0x1B18 != ZI8_NULL && WORKP->unk_0x1B24 == WORKP->subLanguage) {
|
||||
if ((ziU16)ch >= WORKP->unk_0x1B1C && (ziU16)ch <= WORKP->unk_0x1B1E) {
|
||||
i = (ziU16)(ch - WORKP->unk_0x1B1C);
|
||||
goto map;
|
||||
}
|
||||
if ((ziU16)ch >= WORKP->unicodeRange2Min && (ziU16)ch <= WORKP->unicodeRange2Max) {
|
||||
i = (ziU16)(WORKP->unicodeRange1Max + (ch - WORKP->unicodeRange2Min) -
|
||||
WORKP->unicodeRange1Min + 1);
|
||||
if ((ziU16)ch >= WORKP->unk_0x1B20 && (ziU16)ch <= WORKP->unk_0x1B22) {
|
||||
i = (ziU16)(WORKP->unk_0x1B1E + (ch - WORKP->unk_0x1B20) -
|
||||
WORKP->unk_0x1B1C + 1);
|
||||
goto map;
|
||||
}
|
||||
return 0xFFFF;
|
||||
map:
|
||||
i = WORKP->unicodeMap[i];
|
||||
i = WORKP->unk_0x1B18[i];
|
||||
if (i != 0xFFFF) {
|
||||
e = (ziU8*)table + i * 0xC;
|
||||
if (hi == e[6] && lo == e[7]) {
|
||||
|
||||
@@ -133,11 +133,11 @@ typedef struct WPADExtConfig {
|
||||
union {
|
||||
struct WPADFSConfig {
|
||||
s16 stickXCenter; // 0x00
|
||||
s16 stickXMin; // 0x02
|
||||
s16 stickXMax; // 0x04
|
||||
s16 unk_0x02; // 0x02
|
||||
s16 unk_0x04; // 0x04
|
||||
s16 stickYCenter; // 0x06
|
||||
s16 stickYMin; // 0x08
|
||||
s16 stickYMax; // 0x0A
|
||||
s16 unk_0x08; // 0x08
|
||||
s16 unk_0x0A; // 0x0A
|
||||
|
||||
s16 accX0g; // 0x0C
|
||||
s16 accY0g; // 0x0E
|
||||
@@ -150,18 +150,18 @@ typedef struct WPADExtConfig {
|
||||
|
||||
struct WPADCLConfig {
|
||||
s16 lStickXCenter; // 0x00
|
||||
s16 lStickXMin; // 0x02
|
||||
s16 lStickXMax; // 0x04
|
||||
s16 unk_0x02; // 0x02
|
||||
s16 unk_0x04; // 0x04
|
||||
s16 lStickYCenter; // 0x06
|
||||
s16 lStickYMin; // 0x08
|
||||
s16 lStickYMax; // 0x0A
|
||||
s16 unk_0x08; // 0x08
|
||||
s16 unk_0x0A; // 0x0A
|
||||
|
||||
s16 rStickXCenter; // 0x0C
|
||||
s16 rStickXMin; // 0x0E
|
||||
s16 rStickXMax; // 0x10
|
||||
s16 unk_0x0E; // 0x0E
|
||||
s16 unk_0x10; // 0x10
|
||||
s16 rStickYCenter; // 0x12
|
||||
s16 rStickYMin; // 0x14
|
||||
s16 rStickYMax; // 0x16
|
||||
s16 unk_0x14; // 0x14
|
||||
s16 unk_0x16; // 0x16
|
||||
|
||||
u8 triggerLZero; // 0x18
|
||||
u8 triggerRZero; // 0x19
|
||||
@@ -223,7 +223,7 @@ typedef struct WPADCB {
|
||||
u16 filterDiffExt; // 0x900
|
||||
u16 filterSameExt; // 0x902
|
||||
s64 lastReportSendTime; // 0x908
|
||||
u8 suppressDisconnect; // 0x910
|
||||
u8 unk_0x910;
|
||||
u8 calibrated; // 0x911
|
||||
u16 comboHeld; // 0x912
|
||||
u8 encryptionKey[16]; // 0x914
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
static struct {
|
||||
struct {
|
||||
OSSemaphore* sem; // 0x00
|
||||
u32 initCount;
|
||||
u32 flags;
|
||||
u32 unk_0x04;
|
||||
u32 unk_0x08;
|
||||
} entries[MAX_PUH_SEM]; // 0x00
|
||||
u32 usedCount;
|
||||
OSSemaphore* lockSem;
|
||||
u8 pad[0x0C];
|
||||
u32 unk_0x90;
|
||||
OSSemaphore* unk_0x94;
|
||||
u8 unk_0x98[0x0C];
|
||||
} st_uhs_ker_sem_mng;
|
||||
|
||||
static OSSemaphore st_uhf_ker_sem[MAX_PUH_SEM];
|
||||
@@ -20,17 +20,17 @@ static OSSemaphore st_uhf_ker_sem[MAX_PUH_SEM];
|
||||
static s32 st_uhs_ker_sem_status;
|
||||
|
||||
static int uhf_ker_sem_inline_0() {
|
||||
if (st_uhs_ker_sem_status != 1 || st_uhs_ker_sem_mng.lockSem == 0) {
|
||||
if (st_uhs_ker_sem_status != 1 || st_uhs_ker_sem_mng.unk_0x94 == 0) {
|
||||
return -1;
|
||||
} else {
|
||||
OSWaitSemaphore(st_uhs_ker_sem_mng.lockSem);
|
||||
OSWaitSemaphore(st_uhs_ker_sem_mng.unk_0x94);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void uhf_ker_sem_inline_1() {
|
||||
if (st_uhs_ker_sem_status == 1 && st_uhs_ker_sem_mng.lockSem != 0) {
|
||||
OSSignalSemaphore(st_uhs_ker_sem_mng.lockSem);
|
||||
if (st_uhs_ker_sem_status == 1 && st_uhs_ker_sem_mng.unk_0x94 != 0) {
|
||||
OSSignalSemaphore(st_uhs_ker_sem_mng.unk_0x94);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ s32 uhf_ker_create_sem(u32 initCount, int flags) {
|
||||
return -5;
|
||||
}
|
||||
|
||||
if (st_uhs_ker_sem_mng.usedCount == 12) {
|
||||
if (st_uhs_ker_sem_mng.unk_0x90 == 12) {
|
||||
uhf_ker_sem_inline_1();
|
||||
return -24;
|
||||
}
|
||||
@@ -65,9 +65,9 @@ s32 uhf_ker_create_sem(u32 initCount, int flags) {
|
||||
}
|
||||
|
||||
st_uhs_ker_sem_mng.entries[i].sem = sem;
|
||||
st_uhs_ker_sem_mng.entries[i].initCount = initCount;
|
||||
st_uhs_ker_sem_mng.entries[i].flags = flags;
|
||||
st_uhs_ker_sem_mng.usedCount++;
|
||||
st_uhs_ker_sem_mng.entries[i].unk_0x04 = initCount;
|
||||
st_uhs_ker_sem_mng.entries[i].unk_0x08 = flags;
|
||||
st_uhs_ker_sem_mng.unk_0x90++;
|
||||
|
||||
uhf_ker_sem_inline_1();
|
||||
|
||||
@@ -97,9 +97,9 @@ s32 uhf_ker_delete_sem(int sem) {
|
||||
}
|
||||
|
||||
st_uhs_ker_sem_mng.entries[sem - 1].sem = NULL;
|
||||
st_uhs_ker_sem_mng.entries[sem - 1].initCount = 0;
|
||||
st_uhs_ker_sem_mng.entries[sem - 1].flags = 0;
|
||||
st_uhs_ker_sem_mng.usedCount--;
|
||||
st_uhs_ker_sem_mng.entries[sem - 1].unk_0x04 = 0;
|
||||
st_uhs_ker_sem_mng.entries[sem - 1].unk_0x08 = 0;
|
||||
st_uhs_ker_sem_mng.unk_0x90--;
|
||||
|
||||
uhf_ker_sem_inline_1();
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
static struct {
|
||||
struct {
|
||||
OSThread* unk_0x00;
|
||||
u8 unk_0x04[0x33C];
|
||||
OSThread* thread; // 0x00
|
||||
u8 stack[0x33C]; // 0x04
|
||||
} entries[MAX_PUH_TSK]; // 0x00
|
||||
u32 unk_0x680;
|
||||
u32 unk_0x684;
|
||||
@@ -24,9 +24,9 @@ s32 uhf_ker_set_priority(int tsk, int priority) {
|
||||
return -5;
|
||||
}
|
||||
|
||||
if (st_uhs_ker_tsk_mng.entries[tsk - 1].unk_0x00 == NULL) {
|
||||
if (st_uhs_ker_tsk_mng.entries[tsk - 1].thread == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return OSSetThreadPriority(st_uhs_ker_tsk_mng.entries[tsk - 1].unk_0x00, priority) ? 0 : -20;
|
||||
return OSSetThreadPriority(st_uhs_ker_tsk_mng.entries[tsk - 1].thread, priority) ? 0 : -20;
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ static s32 WPADiSendData(s32 chan, WPADCommand command) {
|
||||
|
||||
if (status == WPAD_ERR_COMMUNICATION_ERROR) {
|
||||
if ((s32)OSTicksToSeconds(__OSGetSystemTime() - p->lastReportSendTime) > 1 && _sleepTime != 0) {
|
||||
if (!p->suppressDisconnect) {
|
||||
if (!p->unk_0x910) {
|
||||
p->lastReportSendTime = __OSGetSystemTime();
|
||||
WPADiDisconnect(chan, FALSE);
|
||||
} else {
|
||||
@@ -1263,7 +1263,7 @@ static void __ClearControlBlock(s32 chan) {
|
||||
|
||||
p->lastControllerDataUpdate = __OSGetSystemTime();
|
||||
p->lastReportSendTime = __OSGetSystemTime();
|
||||
p->suppressDisconnect = 0;
|
||||
p->unk_0x910 = 0;
|
||||
p->unk_0x8C9 = 0;
|
||||
p->unk_0x8C4 = 0;
|
||||
p->wmReadDataPtr = NULL;
|
||||
@@ -2692,7 +2692,7 @@ static void __SendData(s32 chan, WPADCommand command) {
|
||||
u32 time;
|
||||
memcpy(&time, command.dataBuf, sizeof(u32));
|
||||
p->lastReportSendTime = __OSGetSystemTime() + time;
|
||||
p->suppressDisconnect = 1;
|
||||
p->unk_0x910 = 1;
|
||||
return;
|
||||
}
|
||||
default: {
|
||||
@@ -2704,7 +2704,7 @@ static void __SendData(s32 chan, WPADCommand command) {
|
||||
p->cmdBlkCB = command.cmdCB;
|
||||
p->lastReportID = reportID;
|
||||
p->lastReportSendTime = __OSGetSystemTime() + OSSecondsToTicks(2);
|
||||
p->suppressDisconnect = 0;
|
||||
p->unk_0x910 = 0;
|
||||
|
||||
OSRestoreInterrupts(enabled);
|
||||
}
|
||||
|
||||
@@ -393,48 +393,48 @@ static void getExtConfig(s32 chan, s32 result) {
|
||||
p_wpd->extConfig.u.fs.accX1g = (s16)((u16)(((u16)(p_buf[index + 4]) << 2) & 0xFFFC) | (u16)(((u16)(p_buf[index + 7]) >> 4) & 3));
|
||||
p_wpd->extConfig.u.fs.accY1g = (s16)((u16)(((u16)(p_buf[index + 5]) << 2) & 0xFFFC) | (u16)(((u16)(p_buf[index + 7]) >> 2) & 3));
|
||||
p_wpd->extConfig.u.fs.accZ1g = (s16)((u16)(((u16)(p_buf[index + 6]) << 2) & 0xFFFC) | (u16)(((u16)(p_buf[index + 7])) & 3));
|
||||
p_wpd->extConfig.u.fs.stickXMax = (s8)p_buf[index + 8];
|
||||
p_wpd->extConfig.u.fs.stickXMin = (s8)p_buf[index + 9];
|
||||
p_wpd->extConfig.u.fs.unk_0x04 = (s8)p_buf[index + 8];
|
||||
p_wpd->extConfig.u.fs.unk_0x02 = (s8)p_buf[index + 9];
|
||||
p_wpd->extConfig.u.fs.stickXCenter = (s8)p_buf[index + 10];
|
||||
p_wpd->extConfig.u.fs.stickYMax = (s8)p_buf[index + 11];
|
||||
p_wpd->extConfig.u.fs.stickYMin = (s8)p_buf[index + 12];
|
||||
p_wpd->extConfig.u.fs.unk_0x0A = (s8)p_buf[index + 11];
|
||||
p_wpd->extConfig.u.fs.unk_0x08 = (s8)p_buf[index + 12];
|
||||
p_wpd->extConfig.u.fs.stickYCenter = (s8)p_buf[index + 13];
|
||||
|
||||
DEBUGPrint("0G: fsaccX = %d, fsaccY = %d, fsaccZ = %d\n", p_wpd->extConfig.u.fs.accX0g, p_wpd->extConfig.u.fs.accY0g,
|
||||
p_wpd->extConfig.u.fs.accZ0g);
|
||||
DEBUGPrint("1G: fsaccX = %d, fsaccY = %d, fsaccZ = %d\n", p_wpd->extConfig.u.fs.accX1g, p_wpd->extConfig.u.fs.accY1g,
|
||||
p_wpd->extConfig.u.fs.accZ1g);
|
||||
DEBUGPrint("FS: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.fs.stickXCenter, p_wpd->extConfig.u.fs.stickXMax,
|
||||
p_wpd->extConfig.u.fs.stickXMin);
|
||||
DEBUGPrint("FS: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.fs.stickYCenter, p_wpd->extConfig.u.fs.stickYMax,
|
||||
p_wpd->extConfig.u.fs.stickYMin);
|
||||
DEBUGPrint("FS: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.fs.stickXCenter, p_wpd->extConfig.u.fs.unk_0x04,
|
||||
p_wpd->extConfig.u.fs.unk_0x02);
|
||||
DEBUGPrint("FS: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.fs.stickYCenter, p_wpd->extConfig.u.fs.unk_0x0A,
|
||||
p_wpd->extConfig.u.fs.unk_0x08);
|
||||
}
|
||||
break;
|
||||
|
||||
case WPAD_DEV_CLASSIC:
|
||||
p_wpd->extConfig.u.cl.lStickXMax = (s8)p_buf[index + 0];
|
||||
p_wpd->extConfig.u.cl.lStickXMin = (s8)p_buf[index + 1];
|
||||
p_wpd->extConfig.u.cl.unk_0x04 = (s8)p_buf[index + 0];
|
||||
p_wpd->extConfig.u.cl.unk_0x02 = (s8)p_buf[index + 1];
|
||||
p_wpd->extConfig.u.cl.lStickXCenter = (s8)p_buf[index + 2];
|
||||
p_wpd->extConfig.u.cl.lStickYMax = (s8)p_buf[index + 3];
|
||||
p_wpd->extConfig.u.cl.lStickYMin = (s8)p_buf[index + 4];
|
||||
p_wpd->extConfig.u.cl.unk_0x0A = (s8)p_buf[index + 3];
|
||||
p_wpd->extConfig.u.cl.unk_0x08 = (s8)p_buf[index + 4];
|
||||
p_wpd->extConfig.u.cl.lStickYCenter = (s8)p_buf[index + 5];
|
||||
p_wpd->extConfig.u.cl.rStickXMax = (s8)p_buf[index + 6];
|
||||
p_wpd->extConfig.u.cl.rStickXMin = (s8)p_buf[index + 7];
|
||||
p_wpd->extConfig.u.cl.unk_0x10 = (s8)p_buf[index + 6];
|
||||
p_wpd->extConfig.u.cl.unk_0x0E = (s8)p_buf[index + 7];
|
||||
p_wpd->extConfig.u.cl.rStickXCenter = (s8)p_buf[index + 8];
|
||||
p_wpd->extConfig.u.cl.rStickYMax = (s8)p_buf[index + 9];
|
||||
p_wpd->extConfig.u.cl.rStickYMin = (s8)p_buf[index + 10];
|
||||
p_wpd->extConfig.u.cl.unk_0x16 = (s8)p_buf[index + 9];
|
||||
p_wpd->extConfig.u.cl.unk_0x14 = (s8)p_buf[index + 10];
|
||||
p_wpd->extConfig.u.cl.rStickYCenter = (s8)p_buf[index + 11];
|
||||
p_wpd->extConfig.u.cl.triggerLZero = p_buf[index + 12];
|
||||
p_wpd->extConfig.u.cl.triggerRZero = p_buf[index + 13];
|
||||
|
||||
DEBUGPrint("CL: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.cl.lStickXCenter, p_wpd->extConfig.u.cl.lStickXMax,
|
||||
p_wpd->extConfig.u.cl.lStickXMin);
|
||||
DEBUGPrint("CL: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.cl.lStickYCenter, p_wpd->extConfig.u.cl.lStickYMax,
|
||||
p_wpd->extConfig.u.cl.lStickYMin);
|
||||
DEBUGPrint("CR: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.cl.rStickXCenter, p_wpd->extConfig.u.cl.rStickXMax,
|
||||
p_wpd->extConfig.u.cl.rStickXMin);
|
||||
DEBUGPrint("CR: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.cl.rStickYCenter, p_wpd->extConfig.u.cl.rStickYMax,
|
||||
p_wpd->extConfig.u.cl.rStickYMin);
|
||||
DEBUGPrint("CL: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.cl.lStickXCenter, p_wpd->extConfig.u.cl.unk_0x04,
|
||||
p_wpd->extConfig.u.cl.unk_0x02);
|
||||
DEBUGPrint("CL: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.cl.lStickYCenter, p_wpd->extConfig.u.cl.unk_0x0A,
|
||||
p_wpd->extConfig.u.cl.unk_0x08);
|
||||
DEBUGPrint("CR: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.cl.rStickXCenter, p_wpd->extConfig.u.cl.unk_0x10,
|
||||
p_wpd->extConfig.u.cl.unk_0x0E);
|
||||
DEBUGPrint("CR: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.cl.rStickYCenter, p_wpd->extConfig.u.cl.unk_0x16,
|
||||
p_wpd->extConfig.u.cl.unk_0x14);
|
||||
DEBUGPrint("LR: L = %d, R = %d\n", p_wpd->extConfig.u.cl.triggerLZero, p_wpd->extConfig.u.cl.triggerRZero);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -17,9 +17,9 @@ typedef struct NWC24FLHeader {
|
||||
u32 version; // 0x04
|
||||
u32 infoCount; // 0x08
|
||||
u32 registeredCount; // 0x0C
|
||||
u32 confirmedBits[4]; // 0x10
|
||||
u32 unk_0x10[4];
|
||||
u32 unk_0x20[7];
|
||||
u32 listFlags; // 0x3C
|
||||
u32 unk_0x3C;
|
||||
NWC24UserId friendIds[NWC24_FRIEND_INFO_MAX]; // 0x40
|
||||
} NWC24FLHeader;
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ typedef struct _CDBRecordKey {
|
||||
} CDBRecordKey;
|
||||
|
||||
typedef struct _CDBRecord {
|
||||
u32 database; // 0x00
|
||||
u32 unk_0x00;
|
||||
void* cryptBuf; // 0x04
|
||||
CDBRecordKey key; // 0x08
|
||||
void* file; // 0x38
|
||||
|
||||
@@ -58,7 +58,7 @@ void CDBRecordInstanceInit(CDBRecordFile* recordFile, CDBRecord* record, int typ
|
||||
recordFile->used = 1;
|
||||
OSUnlockMutex((OSMutex*)recordFile);
|
||||
recordFile->allocFlag = type;
|
||||
recordFile->database = record->database;
|
||||
recordFile->database = record->unk_0x00;
|
||||
CDBAttrInit(&recordFile->attr);
|
||||
CDBRecordKeyCopy(&recordFile->key, &record->key);
|
||||
}
|
||||
@@ -73,7 +73,7 @@ BOOL CDBRecordInstanceIsUsed(CDBRecordFile* recordFile) {
|
||||
|
||||
void CDBRecordInitDescriptor(CDBRecord* record, CDBDatabase* database, CDBRecordKey* key) {
|
||||
CDBLock();
|
||||
record->database = (u32)database;
|
||||
record->unk_0x00 = (u32)database;
|
||||
CDBRecordKeyCopy(&record->key, key);
|
||||
record->cryptBuf = NULL;
|
||||
record->file = NULL;
|
||||
@@ -95,7 +95,7 @@ CDBErr CDBRecordCreateAtOnce(CDBRecord* record, CDBDatabase* database, const cha
|
||||
|
||||
CDBRecordKeyInit(&key, epoch, gameCode, makerCode, 0, fileType, CDB_FS_LOCATION_NAND);
|
||||
CDBLock();
|
||||
record->database = (u32)database;
|
||||
record->unk_0x00 = (u32)database;
|
||||
CDBRecordKeyCopy(&record->key, &key);
|
||||
record->cryptBuf = NULL;
|
||||
record->file = NULL;
|
||||
@@ -128,7 +128,7 @@ CDBErr CDBRecordOpen_(CDBRecord* record) {
|
||||
CDBDatabase* database;
|
||||
CDBRecordDatabaseState* instance;
|
||||
|
||||
database = (CDBDatabase*)record->database;
|
||||
database = (CDBDatabase*)record->unk_0x00;
|
||||
instance = database->instance;
|
||||
record->cryptBuf = NULL;
|
||||
if (instance == NULL) {
|
||||
@@ -292,7 +292,7 @@ CDBErr CDBRecordWrite_(CDBRecord* record, void* buffer, u32 size) {
|
||||
CDBErr result;
|
||||
CDBRecordDatabaseState* instance;
|
||||
|
||||
database = (CDBDatabase*)record->database;
|
||||
database = (CDBDatabase*)record->unk_0x00;
|
||||
instance = database->instance;
|
||||
recordFile = record->file;
|
||||
if (record->key.location == CDB_FS_LOCATION_SD) {
|
||||
@@ -508,7 +508,7 @@ CDBErr CDBRecordUpdateModifiedDate(CDBRecord* record) {
|
||||
ticks = OSGetTime();
|
||||
modifiedDate = ticks / (OS_BUS_CLOCK / 4);
|
||||
recordFile = record->file;
|
||||
if ((((CDBRecordDatabaseState*)((CDBDatabase*)record->database)->instance)->openFlags & 2) == 0) {
|
||||
if ((((CDBRecordDatabaseState*)((CDBDatabase*)record->unk_0x00)->instance)->openFlags & 2) == 0) {
|
||||
CDBReportError("can't set modified time of the record; the database is opened as READONLY\n");
|
||||
return CDB_ERROR_26;
|
||||
}
|
||||
@@ -570,7 +570,7 @@ CDBErr CDBRecordBackupToSD_(CDBRecord* record) {
|
||||
CDBRecordKeyCopy(&localRecord.key, &record->key);
|
||||
localRecord.file = NULL;
|
||||
localRecord.key.location = CDB_FS_LOCATION_SD;
|
||||
localRecord.database = record->database;
|
||||
localRecord.unk_0x00 = record->unk_0x00;
|
||||
err = CDBRecordFileCreateBlank(&localRecord);
|
||||
if (err != CDB_ERROR_OK) {
|
||||
CDBLock();
|
||||
@@ -614,7 +614,7 @@ CDBErr CDBRecordBackupToSD_(CDBRecord* record) {
|
||||
CDBLock();
|
||||
recordFile = localRecord.file;
|
||||
CDBRecordKeyCopy(&record->key, &localRecord.key);
|
||||
record->database = localRecord.database;
|
||||
record->unk_0x00 = localRecord.unk_0x00;
|
||||
record->file = localRecord.file;
|
||||
record->cryptBuf = localRecord.cryptBuf;
|
||||
CDBRecordKeyCopy(&recordFile->key, &localRecord.key);
|
||||
|
||||
@@ -27,7 +27,7 @@ static NWC24Err GetCachedFLHeader(NWC24FLHeader** header);
|
||||
static ChkHostNameError CheckHostName(const char* hostName, u32 hostNameLength);
|
||||
static inline NWC24Err CheckFriendInfo(const NWC24FriendInfo* friendInfo);
|
||||
|
||||
static u32 GetConfirmedBit(u32 index) {
|
||||
static u32 GetUnkFlag(u32 index) {
|
||||
NWC24Err result;
|
||||
NWC24FLHeader* header;
|
||||
u32 data;
|
||||
@@ -37,11 +37,11 @@ static u32 GetConfirmedBit(u32 index) {
|
||||
return result;
|
||||
}
|
||||
|
||||
data = header->confirmedBits[index >> 5] >> (index & 0x1f) & 1;
|
||||
data = header->unk_0x10[index >> 5] >> (index & 0x1f) & 1;
|
||||
return (NWC24Err)data;
|
||||
}
|
||||
|
||||
static NWC24Err SetConfirmedBit(u32 index, int flag) {
|
||||
static NWC24Err SetUnkFlag(u32 index, int flag) {
|
||||
NWC24Err result;
|
||||
NWC24FLHeader* header;
|
||||
|
||||
@@ -50,11 +50,11 @@ static NWC24Err SetConfirmedBit(u32 index, int flag) {
|
||||
return result;
|
||||
}
|
||||
|
||||
header->confirmedBits[index >> 5] = ~(1 << (index & 0x1f)) & header->confirmedBits[index >> 5] | flag << (index & 0x1f);
|
||||
header->unk_0x10[index >> 5] = ~(1 << (index & 0x1f)) & header->unk_0x10[index >> 5] | flag << (index & 0x1f);
|
||||
return NWC24_OK;
|
||||
}
|
||||
|
||||
static NWC24Err SetListFlag(int flag) {
|
||||
static NWC24Err SetUnkFlag2(int flag) {
|
||||
NWC24Err result;
|
||||
NWC24FLHeader* header;
|
||||
|
||||
@@ -63,7 +63,7 @@ static NWC24Err SetListFlag(int flag) {
|
||||
return result;
|
||||
}
|
||||
|
||||
header->listFlags |= flag;
|
||||
header->unk_0x3C |= flag;
|
||||
return NWC24_OK;
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ NWC24Err NWC24ReadFriendInfo(NWC24FriendInfo* info, u32 index) {
|
||||
Mail_memset(&info->addr.mailAddr[sizeof(NWC24UserId)], 0, sizeof(NWC24UserMailAddr) - sizeof(NWC24UserId));
|
||||
}
|
||||
|
||||
result = GetConfirmedBit(index);
|
||||
result = GetUnkFlag(index);
|
||||
if (result == 1) {
|
||||
info->attr.status = NWC24_FRIENDSTATUS_CONFIRMED;
|
||||
}
|
||||
@@ -189,9 +189,9 @@ NWC24Err NWC24WriteFriendInfo(const NWC24FriendInfo* friendInfo, u32 index) {
|
||||
tmpFriendAddr = (NWC24FriendAddr*)&friendInfo->addr;
|
||||
}
|
||||
|
||||
SetListFlag(1);
|
||||
SetUnkFlag2(1);
|
||||
|
||||
result = SetConfirmedBit(index, 0);
|
||||
result = SetUnkFlag(index, 0);
|
||||
if (result != NWC24_OK) {
|
||||
return result;
|
||||
}
|
||||
@@ -347,7 +347,7 @@ NWC24Err NWC24DeleteFriendInfo(u32 index) {
|
||||
if (resultWrite == NWC24_OK) {
|
||||
header->friendIds[index] = 0;
|
||||
header->registeredCount--;
|
||||
result = SetConfirmedBit(index, 0);
|
||||
result = SetUnkFlag(index, 0);
|
||||
if (result == NWC24_OK) {
|
||||
NWC24FSeek(&file, 0, NWC24_SEEK_BEG);
|
||||
resultWrite = NWC24FWrite(header, sizeof(NWC24FLHeader), &file);
|
||||
@@ -374,8 +374,8 @@ NWC24Err NWC24SwapFriendInfos(u32 index1, u32 index2) {
|
||||
u32 fileOffset1;
|
||||
u32 fileOffset2;
|
||||
|
||||
int confirmedBit1;
|
||||
int confirmedBit2;
|
||||
int friendUnkFlag1;
|
||||
int friendUnkFlag2;
|
||||
|
||||
if (!NWC24IsMsgLibOpened() && !NWC24IsMsgLibOpenedByTool()) {
|
||||
return NWC24_ERR_LIB_NOT_OPENED;
|
||||
@@ -429,10 +429,10 @@ NWC24Err NWC24SwapFriendInfos(u32 index1, u32 index2) {
|
||||
header->friendIds[index2] = tmp;
|
||||
|
||||
// Swap some flag
|
||||
confirmedBit1 = GetConfirmedBit(index1);
|
||||
confirmedBit2 = GetConfirmedBit(index2);
|
||||
SetConfirmedBit(index1, confirmedBit2);
|
||||
SetConfirmedBit(index2, confirmedBit1);
|
||||
friendUnkFlag1 = GetUnkFlag(index1);
|
||||
friendUnkFlag2 = GetUnkFlag(index2);
|
||||
SetUnkFlag(index1, friendUnkFlag2);
|
||||
SetUnkFlag(index2, friendUnkFlag1);
|
||||
|
||||
// Write new header
|
||||
NWC24FSeek(&file, 0, NWC24_SEEK_BEG);
|
||||
@@ -629,10 +629,10 @@ NWC24Err NWC24iCreateFriendList() {
|
||||
header->version = FRIEND_LIST_VERSION;
|
||||
header->infoCount = NWC24_FRIEND_INFO_MAX;
|
||||
header->registeredCount = 0;
|
||||
header->confirmedBits[0] = 0;
|
||||
header->confirmedBits[1] = 0;
|
||||
header->confirmedBits[2] = 0;
|
||||
header->confirmedBits[3] = 0;
|
||||
header->unk_0x10[0] = 0;
|
||||
header->unk_0x10[1] = 0;
|
||||
header->unk_0x10[2] = 0;
|
||||
header->unk_0x10[3] = 0;
|
||||
|
||||
result = NWC24FOpen(&file, FLFilePath, NWC24_OPEN_WRITE);
|
||||
if (result != NWC24_OK) {
|
||||
|
||||
@@ -436,10 +436,10 @@ namespace ipl {
|
||||
data.titleId = System::getChannelManager()->getTitleID(mChanPage, mChanIndex);
|
||||
data.threadTerminated = mbModuleTerminated;
|
||||
data.unk_0x19 = true;
|
||||
data.mbHasNewMessage = true;
|
||||
data.unk_0x1A = true;
|
||||
|
||||
if (!(System::getNwc24Manager() != NULL && System::getNwc24Manager()->isNewMessageThere(ES_TITLE_CODE(data.titleId)))) {
|
||||
data.mbHasNewMessage = false;
|
||||
data.unk_0x1A = false;
|
||||
}
|
||||
|
||||
System::getCSManager()->setData(data);
|
||||
|
||||
@@ -1844,7 +1844,7 @@ namespace ipl {
|
||||
initChanZoomParam(myVec, 1);
|
||||
setChanZoomOrtho();
|
||||
|
||||
if (System::getChannelManager()->isDiskChannelReady()) {
|
||||
if (System::getChannelManager()->isUnk_0x1B81()) {
|
||||
if (System::getBS2Manager()->getIPLState() == bs2::IPL_STATE_RVL_GAME ||
|
||||
System::getBS2Manager()->getIPLState() == bs2::IPL_STATE_DISK_UPDATE) {
|
||||
if (mspDiskID != NULL) {
|
||||
@@ -1856,7 +1856,7 @@ namespace ipl {
|
||||
|
||||
if (strncmp(diskID, mspDiskID, 4) == 0) {
|
||||
if (strncmp(diskMaker, mspDiskMaker, 2) == 0) {
|
||||
System::getChannelManager()->setDiskChannelReady(false);
|
||||
System::getChannelManager()->setUnk_0x1B81(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -467,7 +467,7 @@ namespace ipl {
|
||||
mpDiskBnrLayout->calc();
|
||||
} else {
|
||||
calcModuleChannel();
|
||||
System::getChannelManager()->setDiskChannelReady(false);
|
||||
System::getChannelManager()->setUnk_0x1B81(false);
|
||||
}
|
||||
|
||||
if ((mState == STATE_NORMAL || mState == STATE_WAIT_TMD || mState == STATE_PREPARE_BOOT || mState == STATE_BOOT_SCENE) && !unk_0x90 &&
|
||||
@@ -1220,7 +1220,7 @@ namespace ipl {
|
||||
#pragma ppc_iro_level 0
|
||||
void ChannelTitle::calcNormalParentalDialog() {
|
||||
if (mChanSceneID == SCENE_DISK_CHANNEL &&
|
||||
(System::getBS2Manager()->getIPLState() != bs2::IPL_STATE_RVL_GAME || System::getChannelManager()->isDiskChannelReady())) {
|
||||
(System::getBS2Manager()->getIPLState() != bs2::IPL_STATE_RVL_GAME || System::getChannelManager()->isUnk_0x1B81())) {
|
||||
mParentalState = PARENTAL_STATE_FAILED;
|
||||
}
|
||||
|
||||
@@ -1767,7 +1767,7 @@ namespace ipl {
|
||||
data.threadTerminated = mbModuleTerminated;
|
||||
|
||||
if (System::getNwc24Manager() == NULL || !System::getNwc24Manager()->isNewMessageThere(ES_TITLE_CODE(data.titleId))) {
|
||||
data.mbHasNewMessage = false;
|
||||
data.unk_0x1A = false;
|
||||
}
|
||||
System::getCSManager()->setData(data);
|
||||
if (!System::getCSManager()->init(mpModuleFile, mpModuleThread)) {
|
||||
@@ -2064,7 +2064,7 @@ namespace ipl {
|
||||
break;
|
||||
}
|
||||
case DISK_STATE_WII_DISK_IDLE: {
|
||||
if (BS2State != bs2::IPL_STATE_RVL_GAME || System::getChannelManager()->isDiskChannelReady()) {
|
||||
if (BS2State != bs2::IPL_STATE_RVL_GAME || System::getChannelManager()->isUnk_0x1B81()) {
|
||||
mDiskState = DISK_STATE_EJECT;
|
||||
mpDiskBnrAnims[DISK_ANIM_GRP_ALL][DISK_ANIM_DISK_EJECT]->play();
|
||||
mpDiskBnrLayout->GetRootPane()->SetVisible(true);
|
||||
|
||||
@@ -1118,7 +1118,7 @@ extern "C" void iplSDChannelTitle_updateScriptLoad(SDChannelTitle* scene) {
|
||||
data.titleId = scene->mTitleId;
|
||||
data.threadTerminated = scene->mbScriptFailed;
|
||||
if (!System::getNwc24Manager() || !System::getNwc24Manager()->isNewMessageThere(static_cast<u32>(data.titleId & 0xffffffffULL))) {
|
||||
data.mbHasNewMessage = false;
|
||||
data.unk_0x1A = false;
|
||||
}
|
||||
System::getCSManager()->setData(data);
|
||||
if (!System::getCSManager()->init(scene->mpScriptFile, scene->mpRsoThread)) {
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace ipl {
|
||||
extern "C" const u32 scLangLookup__Q23ipl7channel[][16];
|
||||
|
||||
Manager::Manager(EGG::Heap* heap)
|
||||
: mpHeap(heap), mState(INIT), mbCanRefresh(0), mbDiskChannelReady(false), mbSetDiskBannerInfo(false), mPrevNandResult(NAND_RESULT_OK),
|
||||
: mpHeap(heap), mState(INIT), mbCanRefresh(0), unk_0x1B81(false), mbSetDiskBannerInfo(false), mPrevNandResult(NAND_RESULT_OK),
|
||||
mbLoadedChJump(false) {
|
||||
mpLockedMsgFile = NULL;
|
||||
|
||||
@@ -951,7 +951,7 @@ namespace ipl {
|
||||
int state = System::getBS2Manager()->getIPLState();
|
||||
if (state == bs2::IPL_STATE_RVL_GAME && mBS2State != bs2::IPL_STATE_RVL_GAME) {
|
||||
mbSetDiskBannerInfo = setDiskBannerInfo(false);
|
||||
mbDiskChannelReady = true;
|
||||
unk_0x1B81 = true;
|
||||
} else if (state != bs2::IPL_STATE_RVL_GAME && state != mBS2State) {
|
||||
setDiskBannerInfo(true);
|
||||
}
|
||||
@@ -1076,7 +1076,7 @@ namespace ipl {
|
||||
ARCFileInfo readFile;
|
||||
|
||||
if (unk) {
|
||||
mbDiskChannelReady = false;
|
||||
unk_0x1B81 = false;
|
||||
}
|
||||
|
||||
int diskPage, diskIndex;
|
||||
|
||||
Reference in New Issue
Block a user