Compare commits

..

1 Commits

Author SHA1 Message Date
coah
9c7fc43320 Restore SD memory dialog-state dispatch mapping 2026-10-01 18:18:42 -05:00
9 changed files with 68 additions and 75 deletions

View File

@@ -3930,9 +3930,9 @@ isLimitOutChannel__Q33ipl5scene12ChannelTitleFv = .text:0x813B9F8C; // type:func
dispTimeLimitWindow__Q33ipl5scene12ChannelTitleFv = .text:0x813B9FE0; // type:function size:0x104
getTimeLimitString__Q33ipl5scene12ChannelTitleFPwUlUl = .text:0x813BA0E4; // type:function size:0x484
getTmdTask__Q33ipl5scene12ChannelTitleFPv = .text:0x813BA568; // type:function size:0x11C
markTmdReadyTask__Q33ipl5scene12ChannelTitleFPv = .text:0x813BA684; // type:function size:0xC
iplChannelTitle_813BA684__Q33ipl5scene12ChannelTitleFPv = .text:0x813BA684; // type:function size:0xC
getTicketLimitTask__Q33ipl5scene12ChannelTitleFPv = .text:0x813BA690; // type:function size:0xF4
deleteTmpTitleContentTask__Q33ipl5scene12ChannelTitleFPv = .text:0x813BA784; // type:function size:0xE0
iplChannelTitle_813BA784__Q33ipl5scene12ChannelTitleFPv = .text:0x813BA784; // type:function size:0xE0
isTimeLimitedTicket__Q33ipl5scene12ChannelTitleFP12ESTicketViewPUl = .text:0x813BA864; // type:function size:0xF4
startGetTicketLimitTask__Q33ipl5scene12ChannelTitleFv = .text:0x813BA958; // type:function size:0x8C
updateLockedMsg__Q33ipl5scene12ChannelTitleFi = .text:0x813BA9E4; // type:function size:0x16C
@@ -4441,7 +4441,7 @@ IPLContestAlloc = .text:0x813D5240; // type:function size:0x60
IPLContestFree = .text:0x813D52A0; // type:function size:0x64
sNHTTPReqCallback = .text:0x813D5304; // type:function size:0x1E0
sNHTTPCleanupCallback = .text:0x813D54E4; // type:function size:0x14
onNatDetectionDone = .text:0x813D54F8; // type:function size:0x6C
iplContest_813D54F8 = .text:0x813D54F8; // type:function size:0x6C
AddressToString = .text:0x813D5564; // type:function size:0xE4
DiscoverReachability = .text:0x813D5648; // type:function size:0xE0
DiscoverMapping = .text:0x813D5728; // type:function size:0xE4
@@ -8879,8 +8879,8 @@ TMCJPEGDEC_move_ptr = .text:0x814EAD28; // type:function size:0xE4
TMCJPEGDEC_load_buff = .text:0x814EAE0C; // type:function size:0x124
TMCJPEGDEC_get_position = .text:0x814EAF30; // type:function size:0x10
TMCJPEGDEC_chk_possible_size = .text:0x814EAF40; // type:function size:0x10
refillJpegBufferAfterFF = .text:0x814EAF50; // type:function size:0x1B8 scope:local
refillJpegBuffer = .text:0x814EB108; // type:function size:0x198 scope:local
TMCJPEG_814EAF50 = .text:0x814EAF50; // type:function size:0x1B8 scope:local
TMCJPEG_814EB108 = .text:0x814EB108; // type:function size:0x198 scope:local
TMCJPEGDEC_init_buff_thumbnail = .text:0x814EB2A0; // type:function size:0x88
TMCJPEGDEC_init_buff = .text:0x814EB328; // type:function size:0x10
TMCJPEGDEC_rewind_ptr = .text:0x814EB338; // type:function size:0xA4

View File

@@ -293,8 +293,8 @@ namespace ipl {
LOCKED_DIALOG_ANIM_MAX,
};
static void markTmdReadyTask(void* work);
static void deleteTmpTitleContentTask(void* work);
static void iplChannelTitle_813BA684(void* work);
static void iplChannelTitle_813BA784(void* work);
static void getTmdTask(void* work);
static void getTicketLimitTask(void* work);
static BOOL isTimeLimitedTicket(ESTicketView * ticket, u32* remainTime = NULL);

View File

@@ -26,18 +26,6 @@ namespace ipl {
namespace savedata {
extern "C" BOOL isTitleCached(void* manager, ESTitleId titleId);
struct ChannelSlot {
u8 valid; // 0x00 (primaryType)
u8 pad[3]; // 0x01
s32 titleId; // 0x04 (sceneID)
u8 rest[8]; // 0x08
};
struct ChannelPage {
u8 pad[0x30];
ChannelSlot slots[MAX_CHANNEL_INDEX]; // 0x30
};
class Manager {
public:
Manager(EGG::Heap* heap);

View File

@@ -1,7 +1,7 @@
#include <tmc_jpeg_internal.h>
static s32 refillJpegBufferAfterFF(TMCCJPEGDecWork* work);
static s32 refillJpegBuffer(TMCCJPEGDecWork* work);
static s32 TMCJPEG_814EAF50(TMCCJPEGDecWork* work);
static s32 TMCJPEG_814EB108(TMCCJPEGDecWork* work);
s32 TMCJPEGDEC_init_ptr_buff(TMCCJPEGDecWork* work, void* param) {
u32 readSize;
@@ -52,7 +52,7 @@ s32 TMCJPEGDEC_get_byte(u8* dst, TMCCJPEGDecWork* work) {
if (work->pBufCur >= work->pBufEnd) {
if (work->remaining != 0) {
s32 r = refillJpegBuffer(work);
s32 r = TMCJPEG_814EB108(work);
if (r < 0) {
return r;
}
@@ -69,7 +69,7 @@ s32 TMCJPEGDEC_get_byte(u8* dst, TMCCJPEGDecWork* work) {
if (cur >= work->pBufEnd) {
if (work->remaining != 0) {
s32 r = refillJpegBuffer(work);
s32 r = TMCJPEG_814EB108(work);
if (r < 0) {
return r;
}
@@ -92,7 +92,7 @@ s32 TMCJPEGDEC_get_wbyte(u16* dst, TMCCJPEGDecWork* work) {
if (work->pBufCur >= work->pBufEnd) {
if (work->remaining != 0) {
r = refillJpegBuffer(work);
r = TMCJPEG_814EB108(work);
if (r < 0) {
goto br;
} else {
@@ -119,7 +119,7 @@ s32 TMCJPEGDEC_get_wbyte(u16* dst, TMCCJPEGDecWork* work) {
}
if (work->remaining != 0) {
r = refillJpegBuffer(work);
r = TMCJPEG_814EB108(work);
if (r >= 0) {
goto o1;
}
@@ -144,7 +144,7 @@ p2:
goto r2;
}
if (work->remaining != 0) {
r = refillJpegBuffer(work);
r = TMCJPEG_814EB108(work);
if (r < 0)
goto ez;
else {
@@ -166,7 +166,7 @@ r2:
}
if (work->remaining != 0) {
r = refillJpegBuffer(work);
r = TMCJPEG_814EB108(work);
if (r < 0)
goto ez;
else {
@@ -193,7 +193,7 @@ s32 TMCJPEGDEC_get_sbyte(u8* dst, u32 count, TMCCJPEGDecWork* work) {
for (i = 0; i < count; i++) {
if (work->pBufCur >= work->pBufEnd) {
if (work->remaining != 0) {
r = refillJpegBuffer(work);
r = TMCJPEG_814EB108(work);
if (r < 0) {
goto copy_byte;
} else {
@@ -214,7 +214,7 @@ s32 TMCJPEGDEC_get_sbyte(u8* dst, u32 count, TMCCJPEGDecWork* work) {
goto r0;
}
if (work->remaining != 0) {
r = refillJpegBuffer(work);
r = TMCJPEG_814EB108(work);
if (r >= 0) {
goto r0;
}
@@ -251,7 +251,7 @@ lp:
if (work->remaining == 0) {
goto er1;
}
r = refillJpegBuffer(work);
r = TMCJPEG_814EB108(work);
if (r >= 0) {
goto lc;
}
@@ -271,7 +271,7 @@ lc:
if (work->remaining == 0) {
goto er2;
}
r = refillJpegBuffer(work);
r = TMCJPEG_814EB108(work);
if (r >= 0) {
goto ret0;
}
@@ -320,7 +320,7 @@ s32 TMCJPEGDEC_load_buff(TMCCJPEGDecWork* work) {
if (work->remaining == 0) {
break;
}
r = refillJpegBufferAfterFF(work);
r = TMCJPEG_814EAF50(work);
if (r < 0) {
return r;
}
@@ -345,7 +345,7 @@ s32 TMCJPEGDEC_load_buff(TMCCJPEGDecWork* work) {
if (work->remaining == 0) {
break;
}
r = refillJpegBufferAfterFF(work);
r = TMCJPEG_814EAF50(work);
if (r < 0) {
return r;
}
@@ -364,7 +364,7 @@ s32 TMCJPEGDEC_chk_possible_size(TMCCJPEGDecWork* work) {
return work->pBufEnd - work->pBufCur;
}
static s32 refillJpegBufferAfterFF(TMCCJPEGDecWork* work) {
static s32 TMCJPEG_814EAF50(TMCCJPEGDecWork* work) {
u8 marker;
u32 readSize;
u8* dest;
@@ -410,7 +410,7 @@ static s32 refillJpegBufferAfterFF(TMCCJPEGDecWork* work) {
return 0;
}
static s32 refillJpegBuffer(TMCCJPEGDecWork* work) {
static s32 TMCJPEG_814EB108(TMCCJPEGDecWork* work) {
u8* end;
u32 i, j;
s32 readSize;

View File

@@ -2289,7 +2289,7 @@ namespace ipl {
unk_0x360 = false;
System::getTask1()->request(markTmdReadyTask, this, NULL);
System::getTask1()->request(iplChannelTitle_813BA684, this, NULL);
mState = STATE_WAIT_TMD;
} else {
@@ -2301,7 +2301,7 @@ namespace ipl {
unk_0x360 = false;
System::getTask1()->request(markTmdReadyTask, this, NULL);
System::getTask1()->request(iplChannelTitle_813BA684, this, NULL);
mState = STATE_WAIT_TMD;
}
@@ -2408,7 +2408,7 @@ namespace ipl {
if (mTmpTitleID != 0) {
SCSetTmpTitleID(0);
System::getTask1()->request(deleteTmpTitleContentTask, this, NULL);
System::getTask1()->request(iplChannelTitle_813BA784, this, NULL);
} else {
unk_0x370 = true;
}
@@ -2673,7 +2673,7 @@ namespace ipl {
chanTtl->unk_0x360 = true;
}
void ChannelTitle::markTmdReadyTask(void* work) {
void ChannelTitle::iplChannelTitle_813BA684(void* work) {
ChannelTitle* chanTtl = static_cast<ChannelTitle*>(work);
chanTtl->unk_0x360 = true;
}
@@ -2699,7 +2699,7 @@ namespace ipl {
}
#pragma pop
void ChannelTitle::deleteTmpTitleContentTask(void* work) {
void ChannelTitle::iplChannelTitle_813BA784(void* work) {
ChannelTitle* chanTtl = static_cast<ChannelTitle*>(work);
if (chanTtl->mTmpTitleID != 0) {

View File

@@ -48,7 +48,7 @@ void IPLContestGSFree(void* block);
void* IPLContestGSRealloc(void* oldBlock, u32 newSize);
void* IPLContestGSMemalign(u32 align, u32 size);
void onNatDetectionDone(BOOL success, NAT nat);
void iplContest_813D54F8(BOOL success, NAT nat);
void* IPLContestAlloc(int size);
void IPLContestFree(void* block, u32 _unused);
@@ -227,7 +227,7 @@ int IPLContestProcess() {
break;
}
case 2: {
NNStartNatDetection(onNatDetectionDone);
NNStartNatDetection(iplContest_813D54F8);
g_session.unk_0x030 = 3;
OSReport("Port mapping detectioning test has been started.\n");
g_session.detectStartTime = OSGetTime();
@@ -461,7 +461,7 @@ void sNHTTPCleanupCallback() {
g_session.state = 3;
}
void onNatDetectionDone(gsi_bool success, NAT nat) {
void iplContest_813D54F8(gsi_bool success, NAT nat) {
if (success) {
g_session.nat = nat;
g_session.unk_0x03c = 0;

View File

@@ -512,25 +512,25 @@ namespace ipl {
case 12:
onDialogState12();
break;
case 13:
case 19:
onDialogState13();
break;
case 14:
case 13:
onDialogState14();
break;
case 15:
case 14:
onDialogState15();
break;
case 16:
case 15:
onDialogState16();
break;
case 17:
case 16:
onDialogState17();
break;
case 18:
case 17:
onDialogState18();
break;
case 19:
case 18:
onDialogState19();
break;
case 20:

View File

@@ -230,29 +230,34 @@ namespace ipl {
blr
}
int Manager::getNumValidChannel() const {
const ChannelSlot* q;
int dens = 12;
const ChannelPage* p;
int slot;
int count = 0;
int page;
u8 flag;
s32 val;
for (page = 0; page < 4; page++) {
p = (const ChannelPage*)((const u8*)this + page * 0xc0);
for (slot = 0; slot < dens; slot++) {
q = &p->slots[slot];
flag = q->valid;
if (flag != 0) {
val = q->titleId;
if (val != 0) {
count++;
}
}
}
}
return count;
asm int Manager::getNumValidChannel() const {
nofralloc
li r9, 0
li r10, 0
li r4, 0
li r0, 0xc
getNumValidChannel_L1:
add r8, r3, r4
li r5, 0
mtctr r0
getNumValidChannel_L2:
add r7, r8, r5
lbz r6, 0x30(r7)
cmpwi r6, 0
beq getNumValidChannel_L3
lwz r6, 0x34(r7)
cmpwi r6, 0
beq getNumValidChannel_L3
addi r9, r9, 1
getNumValidChannel_L3:
addi r5, r5, 0x10
bdnz getNumValidChannel_L2
addi r10, r10, 1
addi r4, r4, 0xc0
cmpwi r10, 4
blt getNumValidChannel_L1
mr r3, r9
blr
}
BOOL Manager::isResetAcceptable() {

View File

@@ -674,7 +674,7 @@ int Rvl_decode_ash(u8* out, u8* in) {
shifted = shifted - nodeVal;
tmp15 = nodeVal >> 3;
if (tmp15 == 0) {
goto copy_lit_tail;
goto LAB_813325b8;
}
do {
*out = litPtr[-1];
@@ -690,7 +690,7 @@ int Rvl_decode_ash(u8* out, u8* in) {
tmp15 = tmp15 - 1;
} while (tmp15 != 0);
for (nodeVal = nodeVal & 7; nodeVal != 0; nodeVal = nodeVal - 1) {
copy_lit_tail:
LAB_813325b8:
dst = litPtr - 1;
litPtr = litPtr + 1;
*out = *dst;