Compare commits

..

1 Commits

Author SHA1 Message Date
coah
008d40aad0 cleanup(iplChannelManager): name title lookup and meta helpers
Rename Matching-only fn_8133A* APIs and update SD call sites plus
mangled symbols.txt entries.
2026-10-01 17:12:19 -05:00
11 changed files with 287 additions and 204 deletions

View File

@@ -1385,19 +1385,19 @@ getDiskBannerData__Q33ipl7channel7ManagerFib = .text:0x81339FB0; // type:functio
titleIDtoPageIndex__Q33ipl7channel7ManagerCFUxPiPi = .text:0x8133A2BC; // type:function size:0xA0
getLockedMsgFromBuf__Q33ipl7channel7ManagerCFPCQ33ipl7channel22SChanMgrDiskInMessages = .text:0x8133A35C; // type:function size:0xA8
nand_error_handling__Q33ipl7channel7ManagerFi = .text:0x8133A404; // type:function size:0xDC
fn_8133A4E0__Q33ipl7channel7ManagerFUx = .text:0x8133A4E0; // type:function size:0x9C
fn_8133A57C__Q33ipl7channel7ManagerFUx = .text:0x8133A57C; // type:function size:0x3C
fn_8133A5B8__Q33ipl7channel7ManagerFUx = .text:0x8133A5B8; // type:function size:0x38
fn_8133A5F0__Q33ipl7channel7ManagerFUx = .text:0x8133A5F0; // type:function size:0x44
fn_8133A634__Q33ipl7channel7ManagerFUx = .text:0x8133A634; // type:function size:0x44
fn_8133A678__Q33ipl7channel7ManagerFUx = .text:0x8133A678; // type:function size:0x40
fn_8133A6B8__Q33ipl7channel7ManagerFUx = .text:0x8133A6B8; // type:function size:0x84
fn_8133A73C__Q33ipl7channel7ManagerFUx = .text:0x8133A73C; // type:function size:0x68
fn_8133A7A4__Q33ipl7channel7ManagerFPQ23EGG4HeapUx = .text:0x8133A7A4; // type:function size:0xB8
fn_8133A85C__Q33ipl7channel7ManagerFPQ23EGG4HeapUx = .text:0x8133A85C; // type:function size:0xC8
fn_8133A924__Q33ipl7channel7ManagerFPQ23EGG4HeapUx = .text:0x8133A924; // type:function size:0xCC
fn_8133A9F0__Q33ipl7channel7ManagerFv = .text:0x8133A9F0; // type:function size:0x60
fn_8133AA50__Q33ipl7channel7ManagerFUx = .text:0x8133AA50; // type:function size:0x30
findEntryByTitleId__Q33ipl7channel7ManagerFUx = .text:0x8133A4E0; // type:function size:0x9C
getBannerCSIdx__Q33ipl7channel7ManagerFUx = .text:0x8133A57C; // type:function size:0x3C
getSoundSize__Q33ipl7channel7ManagerFUx = .text:0x8133A5B8; // type:function size:0x38
needsNetSetting__Q33ipl7channel7ManagerFUx = .text:0x8133A5F0; // type:function size:0x44
usesAltSound__Q33ipl7channel7ManagerFUx = .text:0x8133A634; // type:function size:0x44
isMissingTicket__Q33ipl7channel7ManagerFUx = .text:0x8133A678; // type:function size:0x40
isNewsChannelV6Plus__Q33ipl7channel7ManagerFUx = .text:0x8133A6B8; // type:function size:0x84
isOperaChannel__Q33ipl7channel7ManagerFUx = .text:0x8133A73C; // type:function size:0x68
readBannerMetaAsync__Q33ipl7channel7ManagerFPQ23EGG4HeapUx = .text:0x8133A7A4; // type:function size:0xB8
readSoundMetaAsync__Q33ipl7channel7ManagerFPQ23EGG4HeapUx = .text:0x8133A85C; // type:function size:0xC8
readBannerCSAsync__Q33ipl7channel7ManagerFPQ23EGG4HeapUx = .text:0x8133A924; // type:function size:0xCC
clearTmpChannel__Q33ipl7channel7ManagerFv = .text:0x8133A9F0; // type:function size:0x60
unloadBanner__Q33ipl7channel7ManagerFUx = .text:0x8133AA50; // type:function size:0x30
__ct__Q33ipl7channel20ChannelScriptManagerFv = .text:0x8133AA80; // type:function size:0x10
create__Q33ipl7channel20ChannelScriptManagerFPQ23EGG7ExpHeap = .text:0x8133AA90; // type:function size:0x90
init__Q33ipl7channel20ChannelScriptManagerFPQ33ipl4nand4FilePQ33ipl7channel9RsoThread = .text:0x8133AB20; // type:function size:0x3D4
@@ -13986,8 +13986,8 @@ lbl_81616AE4 = .rodata:0x81616AE4; // type:object size:0x30
lbl_81616B14 = .rodata:0x81616B14; // type:object size:0x74
lbl_81616B88 = .rodata:0x81616B88; // type:object size:0x40
lbl_81616BC8 = .rodata:0x81616BC8; // type:object size:0x10 data:4byte
scCountryMap_EU = .rodata:0x81616BD8; // type:object size:0xC
scCountryMap_NonEU = .rodata:0x81616BE4; // type:object size:0xC
lbl_81616BD8 = .rodata:0x81616BD8; // type:object size:0xC
lbl_81616BE4 = .rodata:0x81616BE4; // type:object size:0xC
lbl_81616BF0 = .rodata:0x81616BF0; // type:object size:0x88
CHANSVmConstStringObjectUndefined = .rodata:0x81616C78; // type:object size:0x10
lbl_81616C88 = .rodata:0x81616C88; // type:object size:0x10
@@ -15673,11 +15673,11 @@ lbl_8164C54E = .data:0x8164C54E; // type:object size:0x18
lbl_8164C566 = .data:0x8164C566; // type:object size:0xC
lbl_8164C572 = .data:0x8164C572; // type:object size:0xA
__vt__Q33ipl5scene8Calendar = .data:0x8164C57C; // type:object size:0xA4
scN_CalDay_r = .data:0x8164C620; // type:object size:0xB data:string
scDateAnimPaneNames = .data:0x8164C62C; // type:object size:0x14 data:4byte
scMyIplTopFBrlan = .data:0x8164C640; // type:object size:0x12 data:string
scN_CalDay_t = .data:0x8164C652; // type:object size:0xB data:string
scSEDateFocus = .data:0x8164C65D; // type:object size:0x13 data:string
lbl_8164C620 = .data:0x8164C620; // type:object size:0xB data:string
lbl_8164C62C = .data:0x8164C62C; // type:object size:0x14 data:4byte
lbl_8164C640 = .data:0x8164C640; // type:object size:0x12 data:string
lbl_8164C652 = .data:0x8164C652; // type:object size:0xB data:string
lbl_8164C65D = .data:0x8164C65D; // type:object size:0x13 data:string
__vt__Q33ipl5scene4Date = .data:0x8164C670; // type:object size:0x18
@12712 = .data:0x8164C688; // type:object size:0xC scope:local data:string
...data.0 = .data:0x8164C688; // type:label scope:local
@@ -20107,12 +20107,12 @@ gDBCommTable = .data:0x816943C8; // type:object size:0x28
lbl_81694410 = .sdata2:0x81694410; // type:object size:0x4 align:4 data:float
lbl_81694418 = .sdata2:0x81694418; // type:object size:0x8 align:8 data:double
lbl_81694420 = .sdata2:0x81694420; // type:object size:0x4 align:4 data:float
scOrthoLeft = .sdata2:0x81694424; // type:object size:0x4 align:4 data:float
scOrthoRight = .sdata2:0x81694428; // type:object size:0x4 align:4 data:float
scOrthoBottom = .sdata2:0x8169442C; // type:object size:0x4 align:4 data:float
scOrthoTop = .sdata2:0x81694430; // type:object size:0x4 align:4 data:float
scWideOrthoLeft = .sdata2:0x81694434; // type:object size:0x4 align:4 data:float
scWideOrthoRight = .sdata2:0x81694438; // type:object size:0x4 align:4 data:float
lbl_81694424 = .sdata2:0x81694424; // type:object size:0x4 align:4 data:float
lbl_81694428 = .sdata2:0x81694428; // type:object size:0x4 align:4 data:float
lbl_8169442C = .sdata2:0x8169442C; // type:object size:0x4 align:4 data:float
lbl_81694430 = .sdata2:0x81694430; // type:object size:0x4 align:4 data:float
lbl_81694434 = .sdata2:0x81694434; // type:object size:0x4 align:4 data:float
lbl_81694438 = .sdata2:0x81694438; // type:object size:0x4 align:4 data:float
lbl_81694440 = .sdata2:0x81694440; // type:object size:0x4 align:4 data:float
lbl_81694444 = .sdata2:0x81694444; // type:object size:0x4 align:4 data:float
lbl_81694448 = .sdata2:0x81694448; // type:object size:0x8 align:8 data:double
@@ -20201,10 +20201,10 @@ lbl_816945B0 = .sdata2:0x816945B0; // type:object size:0x4 align:4 data:float
lbl_816945B4 = .sdata2:0x816945B4; // type:object size:0x4 align:4 data:float
lbl_816945B8 = .sdata2:0x816945B8; // type:object size:0x8 align:8 data:double
lbl_816945C0 = .sdata2:0x816945C0; // type:object size:0x8 align:8 data:double
scTvrcMsPerSec = .sdata2:0x816945C8; // type:object size:0x4 align:4 data:float
scTvrcNsecPerSec = .sdata2:0x816945D0; // type:object size:0x8 align:8 data:double
scTvrcOne = .sdata2:0x816945D8; // type:object size:0x8 align:8 data:double
scTvrcFloatMagic = .sdata2:0x816945E0; // type:object size:0x8 align:8 data:double
lbl_816945C8 = .sdata2:0x816945C8; // type:object size:0x4 align:4 data:float
lbl_816945D0 = .sdata2:0x816945D0; // type:object size:0x8 align:8 data:double
lbl_816945D8 = .sdata2:0x816945D8; // type:object size:0x8 align:8 data:double
lbl_816945E0 = .sdata2:0x816945E0; // type:object size:0x8 align:8 data:double
lbl_816945E8 = .sdata2:0x816945E8; // type:object size:0x4 align:4 data:float
lbl_816945EC = .sdata2:0x816945EC; // type:object size:0x4 align:4 data:float
lbl_816945F0 = .sdata2:0x816945F0; // type:object size:0x4 align:4 data:float
@@ -21552,7 +21552,7 @@ lbl_8169622C = .sdata:0x8169622C; // type:object size:0x1 data:byte
lbl_8169622D = .sdata:0x8169622D; // type:object size:0x1 data:byte
lbl_8169622E = .sdata:0x8169622E; // type:object size:0x1 data:byte
lbl_8169622F = .sdata:0x8169622F; // type:object size:0x1 data:byte
scTvrcFileHeader = .sdata:0x81696230; // type:object size:0x5 data:string
lbl_81696230 = .sdata:0x81696230; // type:object size:0x5 data:string
TVRC_FILE_HEADER__7LibTVRC = .sdata:0x81696238; // type:object size:0x4 data:4byte
__tienHoseiNsec__7LibTVRC = .sdata:0x8169623C; // type:object size:0x4 data:4byte
_limitMilli__7LibTVRC = .sdata:0x81696240; // type:object size:0x4 data:4byte
@@ -21785,11 +21785,11 @@ scPaneName_T_Stop = .sdata:0x816967B5; // type:object size:0x7 data:string
lbl_816967C0 = .sdata:0x816967C0; // type:object size:0x4 data:string
lbl_816967C4 = .sdata:0x816967C4; // type:object size:0x6 data:string
lbl_816967CA = .sdata:0x816967CA; // type:object size:0x7 data:string
scW_Cal = .sdata:0x816967D8; // type:object size:0x6 data:string
scT_Cal = .sdata:0x816967DE; // type:object size:0x6 data:string
scCal_Ac = .sdata:0x816967E4; // type:object size:0x7 data:string
scInfo_a = .sdata:0x816967EB; // type:object size:0x7 data:string
scB_Cal = .sdata:0x816967F2; // type:object size:0x6 data:string
lbl_816967D8 = .sdata:0x816967D8; // type:object size:0x6 data:string
lbl_816967DE = .sdata:0x816967DE; // type:object size:0x6 data:string
lbl_816967E4 = .sdata:0x816967E4; // type:object size:0x7 data:string
lbl_816967EB = .sdata:0x816967EB; // type:object size:0x7 data:string
lbl_816967F2 = .sdata:0x816967F2; // type:object size:0x6 data:string
@16087 = .sdata:0x816967F8; // type:object size:0x4 scope:local data:string
@16350 = .sdata:0x816967FC; // type:object size:0x7 scope:local data:string
@16351 = .sdata:0x81696803; // type:object size:0x7 scope:local data:string
@@ -22538,7 +22538,7 @@ lbl_816979C8 = .sdata:0x816979C8; // type:object size:0x5 data:string
lbl_816979D0 = .sdata:0x816979D0; // type:object size:0x5 data:string
lbl_816979D8 = .sdata:0x816979D8; // type:object size:0x4 data:string
lbl_816979E0 = .sdata:0x816979E0; // type:object size:0x8 data:string
CDBFSPathSeparator = .sdata:0x816979E8; // type:object size:0x1 data:byte
lbl_816979E8 = .sdata:0x816979E8; // type:object size:0x1 data:byte
@1433 = .sdata:0x816979F0; // type:object size:0x4 scope:local data:string
@1435 = .sdata:0x816979F4; // type:object size:0x1 scope:local
@1440 = .sdata:0x816979F8; // type:object size:0x6 scope:local data:string

View File

@@ -336,19 +336,19 @@ namespace ipl {
BOOL nand_error_handling(int code);
SEntry* fn_8133A4E0(ESTitleId titleId);
u32 fn_8133A57C(ESTitleId titleId);
u32 fn_8133A5B8(ESTitleId titleId);
BOOL fn_8133A5F0(ESTitleId titleId);
BOOL fn_8133A634(ESTitleId titleId);
BOOL fn_8133A678(ESTitleId titleId);
BOOL fn_8133A6B8(ESTitleId titleId);
BOOL fn_8133A73C(ESTitleId titleId);
nand::MetaFile* fn_8133A7A4(EGG::Heap* heap, ESTitleId titleId);
nand::MetaFile* fn_8133A85C(EGG::Heap* heap, ESTitleId titleId);
nand::SharedFile* fn_8133A924(EGG::Heap* heap, ESTitleId titleId);
void fn_8133A9F0();
void fn_8133AA50(ESTitleId titleId);
SEntry* findEntryByTitleId(ESTitleId titleId);
u32 getBannerCSIdx(ESTitleId titleId);
u32 getSoundSize(ESTitleId titleId);
BOOL needsNetSetting(ESTitleId titleId);
BOOL usesAltSound(ESTitleId titleId);
BOOL isMissingTicket(ESTitleId titleId);
BOOL isNewsChannelV6Plus(ESTitleId titleId);
BOOL isOperaChannel(ESTitleId titleId);
nand::MetaFile* readBannerMetaAsync(EGG::Heap* heap, ESTitleId titleId);
nand::MetaFile* readSoundMetaAsync(EGG::Heap* heap, ESTitleId titleId);
nand::SharedFile* readBannerCSAsync(EGG::Heap* heap, ESTitleId titleId);
void clearTmpChannel();
void unloadBanner(ESTitleId titleId);
BOOL isReady() { return mState == FINISH; }

View File

@@ -8,10 +8,10 @@ extern u32 CDBGetInitialCode();
extern void CDBLock();
extern CDBErr CDBDatabaseAllocate(CDBDatabase* database, u32 flags);
extern void CDBUnlock();
extern CDBErr CDBDatabaseFree(CDBDatabase* database);
extern void CDBDatabaseFree();
extern void CDBRecordCreateAtOnce();
extern void CDBRecordInitDescriptor(CDBRecord* record, CDBDatabase* database, CDBRecordKey* key);
extern BOOL CDBRecordIsExistFile(CDBRecord* record);
extern void CDBRecordInitDescriptor();
extern void CDBRecordIsExistFile();
extern void CDBRecordOpenReadOnly();
extern void CDBRecordKeyArrayInit();
extern void CDBRecordKeyArraySetReverse();
@@ -157,27 +157,59 @@ CDBErr CDBDatabaseOpen(CDBDatabase* database) {
return result;
}
CDBErr CDBDatabaseClose(CDBDatabase* database) {
CDBErr result;
CDBErr status;
CDBDatabaseState* instance;
CDBLock();
instance = database->instance;
if (instance == NULL || instance->flags == 0) {
CDBReportError(lbl_8166B528);
result = CDB_ERROR_27;
} else {
status = CDBDatabaseFree(database);
if (status != CDB_ERROR_OK) {
result = status;
} else {
instance->flags = 0;
result = CDB_ERROR_OK;
}
}
CDBUnlock();
return result;
asm CDBErr CDBDatabaseClose(CDBDatabase* database) {
#ifdef __MWERKS__
nofralloc
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
stw r31, 0xc(r1)
stw r30, 0x8(r1)
mr r30, r3
bl CDBLock
lwz r31, 0x8(r30)
cmpwi r31, 0x0
beq L_8148746C
addis r3, r31, 0x1
lwz r0, -0x3ff0(r3)
cmpwi r0, 0x0
bne L_8148749C
L_8148746C:
li r3, 0x2
bl CDBIsPrintDebugMessage
cmpwi r3, 0x0
beq L_81487494
li r3, 0x2
bl CDBReport_
lis r3, lbl_8166B528@ha
addi r3, r3, lbl_8166B528@l
crclr 4*cr1+eq
bl OSReport
L_81487494:
li r31, 0x1b
b L_814874C4
L_8148749C:
mr r3, r30
bl CDBDatabaseFree
cmpwi r3, 0x0
beq L_814874B4
mr r31, r3
b L_814874C4
L_814874B4:
addis r3, r31, 0x1
li r0, 0x0
stw r0, -0x3ff0(r3)
li r31, 0x0
L_814874C4:
bl CDBUnlock
mr r3, r31
lwz r31, 0xc(r1)
lwz r30, 0x8(r1)
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
#endif
}
CDBErr CDBDatabasePrivateCreateRecordAtOnce(CDBDatabase* database, CDBRecord* record, const char* typeStr, const char* fileTypeStr, u8* recordData, u32 recordDataSize, char* makerCodeStr, char* gameCodeStr) {
@@ -493,24 +525,72 @@ asm CDBErr CDBDatabaseCreateRecordImAtOnce_() {
#endif
}
CDBErr CDBDatabaseFindByKey(CDBDatabase* database, CDBRecord* record, CDBRecordKey* recordKey) {
CDBErr result;
CDBLock();
if (!CDBRecordKeyIsValid(recordKey)) {
CDBReportError(lbl_8166B5A8);
result = CDB_ERROR_5;
} else {
CDBRecordInitDescriptor(record, database, recordKey);
if (!CDBRecordIsExistFile(record)) {
CDBReportError(lbl_8166B5B8, recordKey->keyString);
result = CDB_ERROR_CANNOT_OPEN_FILE;
} else {
result = CDB_ERROR_OK;
}
}
CDBUnlock();
return result;
asm CDBErr CDBDatabaseFindByKey() {
#ifdef __MWERKS__
nofralloc
stwu r1, -0x20(r1)
mflr r0
stw r0, 0x24(r1)
stw r31, 0x1c(r1)
mr r31, r5
stw r30, 0x18(r1)
mr r30, r4
stw r29, 0x14(r1)
mr r29, r3
bl CDBLock
mr r3, r31
bl CDBRecordKeyIsValid
cmpwi r3, 0x0
bne L_81487ABC
li r3, 0x2
bl CDBIsPrintDebugMessage
cmpwi r3, 0x0
beq L_81487AB4
li r3, 0x2
bl CDBReport_
lis r3, lbl_8166B5A8@ha
addi r3, r3, lbl_8166B5A8@l
crclr 4*cr1+eq
bl OSReport
L_81487AB4:
li r31, 0x5
b L_81487B14
L_81487ABC:
mr r3, r30
mr r4, r29
mr r5, r31
bl CDBRecordInitDescriptor
mr r3, r30
bl CDBRecordIsExistFile
cmpwi r3, 0x0
bne L_81487B10
li r3, 0x2
bl CDBIsPrintDebugMessage
cmpwi r3, 0x0
beq L_81487B08
li r3, 0x2
bl CDBReport_
lis r3, lbl_8166B5B8@ha
mr r4, r31
addi r3, r3, lbl_8166B5B8@l
crclr 4*cr1+eq
bl OSReport
L_81487B08:
li r31, 0x23
b L_81487B14
L_81487B10:
li r31, 0x0
L_81487B14:
bl CDBUnlock
mr r3, r31
lwz r31, 0x1c(r1)
lwz r30, 0x18(r1)
lwz r29, 0x14(r1)
lwz r0, 0x24(r1)
mtlr r0
addi r1, r1, 0x20
blr
#endif
}
CDBErr CDBDatabaseSearchConditionsIsMatch(CDBSearchConditions* conditions, char* key) {

View File

@@ -6,10 +6,13 @@
#include <stdlib.h>
#include <string.h>
char CDBFSPathSeparator = '/';
#pragma push
#pragma section sconst_type ".sdata"
extern const char lbl_816979E8[8] = "/\0\0\0\0\0\0\0";
#pragma pop
void CDBFSConcatenatePath(char* path, const char* concatPath) {
strcat(path, &CDBFSPathSeparator);
strcat(path, lbl_816979E8);
strcat(path, concatPath);
}

View File

@@ -526,8 +526,8 @@ extern const u8 controlKeys[];
return false;
}
extern "C" const u8 scCountryMap_EU[] = {0x0f, 0x21, 0x20, 0x08, 0x09, 0x0e, 0x19, 0x00, 0x21, 0x21, 0x00, 0x00};
extern "C" const u8 scCountryMap_NonEU[] = {0x0f, 0x21, 0x20, 0x04, 0x09, 0x0e, 0x11, 0x00, 0x21, 0x21, 0x00, 0x00};
extern "C" const u8 lbl_81616BD8[] = {0x0f, 0x21, 0x20, 0x08, 0x09, 0x0e, 0x19, 0x00, 0x21, 0x21, 0x00, 0x00};
extern "C" const u8 lbl_81616BE4[] = {0x0f, 0x21, 0x20, 0x04, 0x09, 0x0e, 0x11, 0x00, 0x21, 0x21, 0x00, 0x00};
const u8 controlKeys[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x01, 0x0a, 0x03,
@@ -640,16 +640,16 @@ const u8 controlKeys[] = {
nofralloc
cmpwi r4, 2
bne setLanguage_L1
lis r4, scCountryMap_EU@ha
lis r4, lbl_81616BD8@ha
lis r3, sInstance__Q39textinput5input10HKBManager@ha
addi r4, r4, scCountryMap_EU@l
addi r4, r4, lbl_81616BD8@l
lbzx r4, r4, r5
addi r3, r3, sInstance__Q39textinput5input10HKBManager@l
b SetCountry__Q39textinput5input10HKBManagerFUc
setLanguage_L1:
lis r4, scCountryMap_NonEU@ha
lis r4, lbl_81616BE4@ha
lis r3, sInstance__Q39textinput5input10HKBManager@ha
addi r4, r4, scCountryMap_NonEU@l
addi r4, r4, lbl_81616BE4@l
lbzx r4, r4, r5
addi r3, r3, sInstance__Q39textinput5input10HKBManager@l
b SetCountry__Q39textinput5input10HKBManagerFUc

View File

@@ -7,40 +7,40 @@
namespace ipl {
namespace scene {
extern "C" char scW_Cal[];
extern "C" char scT_Cal[];
extern "C" char scCal_Ac[];
extern "C" char scInfo_a[];
extern "C" char scB_Cal[];
extern "C" char lbl_816967D8[];
extern "C" char lbl_816967DE[];
extern "C" char lbl_816967E4[];
extern "C" char lbl_816967EB[];
extern "C" char lbl_816967F2[];
#pragma push
#pragma section const_type ".data"
extern "C" const char scN_CalDay_r[] = "N_CalDay_r";
extern "C" const char lbl_8164C620[] = "N_CalDay_r";
#pragma pop
// clang-format off
extern "C" const char* scDateAnimPaneNames[Date::ANIM_PANE_MAX] = {
scN_CalDay_r,
scW_Cal,
scT_Cal,
scCal_Ac,
scInfo_a,
extern "C" const char* lbl_8164C62C[Date::ANIM_PANE_MAX] = {
lbl_8164C620,
lbl_816967D8,
lbl_816967DE,
lbl_816967E4,
lbl_816967EB,
};
#pragma push
#pragma section const_type ".data"
extern "C" const char scMyIplTopFBrlan[] = "my_IplTop_f.brlan";
extern "C" const char scN_CalDay_t[] = "N_CalDay_t";
extern "C" const char scSEDateFocus[] = "WIPL_SE_DATE_FOCUS";
extern "C" const char lbl_8164C640[] = "my_IplTop_f.brlan";
extern "C" const char lbl_8164C652[] = "N_CalDay_t";
extern "C" const char lbl_8164C65D[] = "WIPL_SE_DATE_FOCUS";
#pragma pop
#pragma push
#pragma section const_type ".sdata"
extern "C" char scW_Cal[] = "W_Cal";
extern "C" char scT_Cal[] = "T_Cal";
extern "C" char scCal_Ac[] = "Cal_Ac";
extern "C" char scInfo_a[] = "Info_a";
extern "C" char scB_Cal[] = "B_Cal";
extern "C" char lbl_816967D8[] = "W_Cal";
extern "C" char lbl_816967DE[] = "T_Cal";
extern "C" char lbl_816967E4[] = "Cal_Ac";
extern "C" char lbl_816967EB[] = "Info_a";
extern "C" char lbl_816967F2[] = "B_Cal";
#pragma pop
static const Date::AnmFrame scAnmFrame[] = {
@@ -73,7 +73,7 @@ namespace ipl {
// Bind animations
for (int i = 0; i < ANIM_PANE_MAX; i++) {
mpPaneAnims[i] = mpLayout->bind(scMyIplTopFBrlan, scDateAnimPaneNames[i], false);
mpPaneAnims[i] = mpLayout->bind(lbl_8164C640, lbl_8164C62C[i], false);
}
mpLayout->finishBinding();
@@ -81,7 +81,7 @@ namespace ipl {
mpGui = new gui::PaneManager(this, mpLayout->getDrawInfo(), NULL, NULL);
mpGui->setupScene(mpLayout);
mpGui->setAllComponentTriggerTarget(false);
mpGui->setTriggerTarget(mpLayout->FindPaneByName(scB_Cal), true);
mpGui->setTriggerTarget(mpLayout->FindPaneByName(lbl_816967F2), true);
// Init date
mpDate = new utility::Date();
@@ -128,19 +128,19 @@ namespace ipl {
}
void Date::setRotate(const nw4r::math::VEC3& vec) {
mpLayout->FindPaneByName(scN_CalDay_t)->SetRotate(vec);
mpLayout->FindPaneByName(lbl_8164C652)->SetRotate(vec);
}
void Date::setTranslate(const nw4r::math::VEC3& vec) {
mpLayout->FindPaneByName(scN_CalDay_t)->SetTranslate(vec);
mpLayout->FindPaneByName(lbl_8164C652)->SetTranslate(vec);
}
void Date::setVisible(bool visible) {
mpLayout->FindPaneByName(scDateAnimPaneNames[0])->SetVisible(visible);
mpLayout->FindPaneByName(lbl_8164C62C[0])->SetVisible(visible);
}
bool Date::getVisible() {
return mpLayout->FindPaneByName(scDateAnimPaneNames[0])->IsVisible();
return mpLayout->FindPaneByName(lbl_8164C62C[0])->IsVisible();
}
void Date::setAttribute(int attr) {
@@ -209,13 +209,13 @@ namespace ipl {
}
void Date::start_point_event(const char* paneName, controller::Interface* con) {
if (strcmp(paneName, scB_Cal) == 0) {
if (strcmp(paneName, lbl_816967F2) == 0) {
if (unk_0x3C == 0) {
static_cast<Calendar*>(System::getScene(SCENE_CALENDAR))->onPointDate(this);
onCmdRecv(1);
if (getVisible()) {
snd::getSystem()->startSE(scSEDateFocus);
snd::getSystem()->startSE(lbl_8164C65D);
if (con != NULL) {
con->rumble(1);
}
@@ -226,7 +226,7 @@ namespace ipl {
}
void Date::start_left_event(const char* paneName) {
if (strcmp(paneName, scB_Cal) == 0) {
if (strcmp(paneName, lbl_816967F2) == 0) {
if (unk_0x3C == 1) {
onCmdRecv(2);
}
@@ -262,7 +262,7 @@ namespace ipl {
numStr[index++] = 0;
nw4r::lyt::TextBox* pane = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpLayout->FindPaneByName(scDateAnimPaneNames[2]));
nw4r::lyt::TextBox* pane = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpLayout->FindPaneByName(lbl_8164C62C[2]));
pane->SetString(numStr);
}

View File

@@ -1058,7 +1058,7 @@ namespace ipl {
}
const ESTitleId* titleEntry = &mTitleIds[mCurrentTitle];
System::getChannelManager()->fn_8133AA50(*titleEntry);
System::getChannelManager()->unloadBanner(*titleEntry);
if (mpSDChannelSelect->getWorker()->get_async_result() == 0) {
mCurrentTitle++;

View File

@@ -849,7 +849,7 @@ extern "C" void iplSDChannelTitle_813E7074(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E71A4(SDChannelTitle* scene) {
if (!scene->mpChannelSelect->getWorker()->is_working()) {
SCSetTmpTitleID(0);
System::getChannelManager()->fn_8133A9F0();
System::getChannelManager()->clearTmpChannel();
int result = scene->mpChannelSelect->getWorker()->get_async_result();
if (!result) {
if (scene->mbCopiedTitle) {
@@ -983,7 +983,7 @@ extern "C" void iplSDChannelTitle_813E7800(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E787C(SDChannelTitle* scene) {
if (scene->mbTmdReady) {
if (!System::getChannelManager()->fn_8133A678(scene->mTitleId) && !utility::ESMisc::CheckTmdCountryCode(scene->mpTmd)) {
if (!System::getChannelManager()->isMissingTicket(scene->mTitleId) && !utility::ESMisc::CheckTmdCountryCode(scene->mpTmd)) {
System::getErrorHandler()->set(ErrorHandler::DEFAULT, 3, NULL, 0, -1);
}
scene->mMakerCode = scene->mpTmd->head.groupId;
@@ -1043,8 +1043,8 @@ extern "C" void iplSDChannelTitle_813E7B30(SDChannelTitle* scene, ESTitleId titl
delete scene->mpScriptFile;
scene->mpScriptFile = NULL;
}
if (System::getChannelManager()->fn_8133A57C(title)) {
scene->mpScriptFile = System::getChannelManager()->fn_8133A924(scene->mpRsoHeap, title);
if (System::getChannelManager()->getBannerCSIdx(title)) {
scene->mpScriptFile = System::getChannelManager()->readBannerCSAsync(scene->mpRsoHeap, title);
scene->mbScriptFailed = false;
scene->mScriptEnabled = 1;
scene->mScriptState = 1;
@@ -1097,7 +1097,7 @@ extern "C" void iplSDChannelTitle_813E7D14(SDChannelTitle* scene) {
scene->mScriptState = 1;
scene->mScriptHeapIndex = nextHeap;
}
if (System::getChannelManager()->fn_8133A634(scene->mTitleId) &&
if (System::getChannelManager()->usesAltSound(scene->mTitleId) &&
scene->mScriptFrame == scene->mScriptDuration - 240) {
snd::getSystem()->stopBannerSound(180);
}
@@ -1155,7 +1155,7 @@ extern "C" void iplSDChannelTitle_813E8034(SDChannelTitle* scene) {
scene->mpBannerAnimations[0]->play();
}
if (scene->mState != 6) {
if (!System::getChannelManager()->fn_8133A634(scene->mTitleId) || !scene->mScriptEnabled) {
if (!System::getChannelManager()->usesAltSound(scene->mTitleId) || !scene->mScriptEnabled) {
iplSDChannelTitle_813E8160(scene);
}
if (!scene->mpBannerLayout) {
@@ -1169,7 +1169,7 @@ extern "C" void iplSDChannelTitle_813E8034(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E8160(SDChannelTitle* scene) {
if (scene->mpSoundFiles[scene->mLoadedIndex] && scene->mpSoundFiles[scene->mLoadedIndex]->checkData() == 1) {
void* sound = scene->mpSoundFiles[scene->mLoadedIndex]->getBuffer();
u32 size = System::getChannelManager()->fn_8133A5B8(scene->mTitleId);
u32 size = System::getChannelManager()->getSoundSize(scene->mTitleId);
snd::getSystem()->startBannerSound(sound, size, false);
}
}
@@ -1230,7 +1230,7 @@ extern "C" void iplSDChannelTitle_813E8360(SDChannelTitle* scene) {
}
extern "C" BOOL iplSDChannelTitle_813E847C(SDChannelTitle*, ESTmdView*, ESTitleId titleId) {
if (!System::getChannelManager()->fn_8133A5F0(titleId) || ncd::NCDSetting::getConnectEnableFlag()) {
if (!System::getChannelManager()->needsNetSetting(titleId) || ncd::NCDSetting::getConnectEnableFlag()) {
return TRUE;
}
return FALSE;
@@ -1429,8 +1429,8 @@ extern "C" void iplSDChannelTitle_813E8D14(SDChannelTitle*, nw4r::lyt::Pane* pan
}
extern "C" nand::LayoutFile* iplSDChannelTitle_813E8DCC(SDChannelTitle*, ESTitleId title, nand::File** sound) {
*sound = System::getChannelManager()->fn_8133A85C(System::getMem2App(), title);
nand::MetaFile* banner = System::getChannelManager()->fn_8133A7A4(System::getMem2App(), title);
*sound = System::getChannelManager()->readSoundMetaAsync(System::getMem2App(), title);
nand::MetaFile* banner = System::getChannelManager()->readBannerMetaAsync(System::getMem2App(), title);
return new (System::getMem2App(), 4) nand::LayoutFile(banner, NULL);
}
@@ -1453,15 +1453,15 @@ extern "C" BOOL iplSDChannelTitle_813E8F04(SDChannelTitle* scene, ESTmdView* tmd
return TRUE;
}
if (parental.enable & SC_PARENTAL_FLAG_ENABLED) {
u32 restrictions = System::getChannelManager()->fn_8133A6B8(scene->mTitleId);
u32 restrictions = System::getChannelManager()->isNewsChannelV6Plus(scene->mTitleId);
u32 networkRestrictions = SCGetNetContentRestrictions();
if (networkRestrictions & restrictions) {
return FALSE;
}
if (SCGetWwwRestriction() && System::getChannelManager()->fn_8133A73C(scene->mTitleId)) {
if (SCGetWwwRestriction() && System::getChannelManager()->isOperaChannel(scene->mTitleId)) {
return FALSE;
}
if (System::getChannelManager()->fn_8133A73C(scene->mTitleId)) {
if (System::getChannelManager()->isOperaChannel(scene->mTitleId)) {
return TRUE;
} else {
return utility::ESMisc::CheckTmdParentalControl(tmd);

View File

@@ -10,10 +10,10 @@
#pragma sym on
extern "C" const f32 scTvrcMsPerSec = 1000.0f;
extern "C" const f64 scTvrcNsecPerSec = 1000000000.0;
extern "C" const f64 scTvrcOne = 1.0;
extern "C" const f64 scTvrcFloatMagic = 4503599627370496.0;
extern "C" const f32 lbl_816945C8 = 1000.0f;
extern "C" const f64 lbl_816945D0 = 1000000000.0;
extern "C" const f64 lbl_816945D8 = 1.0;
extern "C" const f64 lbl_816945E0 = 4503599627370496.0;
extern "C" BOOL _isInitialized__7LibTVRC;
extern "C" BOOL _isActive__7LibTVRC;
@@ -53,11 +53,11 @@ extern "C" void __FTVRCLoop1Handler__7LibTVRCFP7OSAlarmP9OSContext();
#pragma push
#pragma section data_type ".sdata"
extern "C" char scTvrcFileHeader[5] = {'T', 'V', 'R', '0', '\0'};
extern "C" char lbl_81696230[5] = {'T', 'V', 'R', '0', '\0'};
#pragma pop
namespace LibTVRC {
const char* TVRC_FILE_HEADER = scTvrcFileHeader;
const char* TVRC_FILE_HEADER = lbl_81696230;
u32 __tienHoseiNsec = 1100;
u32 _limitMilli = 400;
@@ -267,7 +267,7 @@ TVRCSendStartAsync_valid:
bne TVRCSendStartAsync_custom
lwz r6, _tvrcFile__7LibTVRC
lis r3, 2
lfs f1, scTvrcMsPerSec
lfs f1, lbl_816945C8
lis r4, 0x8000
lfs f0, 0xc(r6)
subi r0, r3, 0x17b8
@@ -309,7 +309,7 @@ TVRCSendStartAsync_no_repeat:
TVRCSendStartAsync_timing:
lfs f1, _onTimeRatio__7LibTVRC
lis r4, 0x8000
lfd f0, scTvrcNsecPerSec
lfd f0, lbl_816945D0
lis r27, 0x4330
lwz r0, 0xf8(r4)
lis r3, 2
@@ -321,7 +321,7 @@ TVRCSendStartAsync_timing:
divwu r26, r4, r0
fdiv f2, f1, f0
stw r27, 8(r1)
lfd f1, scTvrcFloatMagic
lfd f1, lbl_816945E0
stw r25, 0xc(r1)
lfd f0, 8(r1)
fsub f0, f0, f1
@@ -339,13 +339,13 @@ TVRCSendStartAsync_timing:
bl __div2i
lfs f2, _onTimeRatio__7LibTVRC
lis r28, _tickWait__7LibTVRC@ha
lfd f1, scTvrcOne
lfd f1, lbl_816945D8
addi r29, r28, _tickWait__7LibTVRC@l
lfd f0, scTvrcNsecPerSec
lfd f0, lbl_816945D0
fsub f3, f1, f2
lfs f2, _Hz__7LibTVRC
stw r25, 0x14(r1)
lfd f1, scTvrcFloatMagic
lfd f1, lbl_816945E0
fmul f3, f0, f3
stw r27, 0x10(r1)
lfd f0, 0x10(r1)

View File

@@ -1235,7 +1235,7 @@ namespace ipl {
#pragma pop
SEntry* Manager::fn_8133A4E0(ESTitleId titleId) {
SEntry* Manager::findEntryByTitleId(ESTitleId titleId) {
for (int page = 0; page < MAX_CHANNEL_PAGE; page++) {
for (int index = 0; index < MAX_CHANNEL_INDEX; index++) {
ESTitleId cmp = ES_TITLE_ID(mChannels[page][index].info.titleType, mChannels[page][index].info.titleCode);
@@ -1255,8 +1255,8 @@ namespace ipl {
return NULL;
}
u32 Manager::fn_8133A57C(ESTitleId titleId) {
SEntry* channel = fn_8133A4E0(titleId);
u32 Manager::getBannerCSIdx(ESTitleId titleId) {
SEntry* channel = findEntryByTitleId(titleId);
if (channel != NULL) {
return channel->metaHdr->blockHdr.bannerCSIdx;
} else {
@@ -1264,8 +1264,8 @@ namespace ipl {
}
}
u32 Manager::fn_8133A5B8(ESTitleId titleId) {
SEntry* channel = fn_8133A4E0(titleId);
u32 Manager::getSoundSize(ESTitleId titleId) {
SEntry* channel = findEntryByTitleId(titleId);
if (channel != NULL) {
return channel->metaHdr->blockHdr.soundSize;
} else {
@@ -1273,8 +1273,8 @@ namespace ipl {
}
}
BOOL Manager::fn_8133A5F0(ESTitleId titleId) {
SEntry* channel = fn_8133A4E0(titleId);
BOOL Manager::needsNetSetting(ESTitleId titleId) {
SEntry* channel = findEntryByTitleId(titleId);
if (channel != NULL && (channel->metaHdr->blockHdr.netSetting << 8)) {
return TRUE;
} else {
@@ -1282,8 +1282,8 @@ namespace ipl {
}
}
BOOL Manager::fn_8133A634(ESTitleId titleId) {
SEntry* channel = fn_8133A4E0(titleId);
BOOL Manager::usesAltSound(ESTitleId titleId) {
SEntry* channel = findEntryByTitleId(titleId);
if (channel != NULL && (channel->metaHdr->blockHdr.useAltSound << 14)) {
return TRUE;
} else {
@@ -1291,8 +1291,8 @@ namespace ipl {
}
}
BOOL Manager::fn_8133A678(ESTitleId titleId) {
SEntry* channel = fn_8133A4E0(titleId);
BOOL Manager::isMissingTicket(ESTitleId titleId) {
SEntry* channel = findEntryByTitleId(titleId);
if (channel != NULL && channel->missingTicket != FALSE) {
return TRUE;
} else {
@@ -1300,8 +1300,8 @@ namespace ipl {
}
}
BOOL Manager::fn_8133A6B8(ESTitleId titleId) {
SEntry* channel = fn_8133A4E0(titleId);
BOOL Manager::isNewsChannelV6Plus(ESTitleId titleId) {
SEntry* channel = findEntryByTitleId(titleId);
if (channel == NULL) {
return FALSE;
}
@@ -1315,8 +1315,8 @@ namespace ipl {
}
}
BOOL Manager::fn_8133A73C(ESTitleId titleId) {
SEntry* channel = fn_8133A4E0(titleId);
BOOL Manager::isOperaChannel(ESTitleId titleId) {
SEntry* channel = findEntryByTitleId(titleId);
if (channel == NULL) {
return FALSE;
}
@@ -1329,8 +1329,8 @@ namespace ipl {
}
}
nand::MetaFile* Manager::fn_8133A7A4(EGG::Heap* heap, ESTitleId titleId) {
SEntry* channel = fn_8133A4E0(titleId);
nand::MetaFile* Manager::readBannerMetaAsync(EGG::Heap* heap, ESTitleId titleId) {
SEntry* channel = findEntryByTitleId(titleId);
if (channel == NULL) {
return NULL;
}
@@ -1343,8 +1343,8 @@ namespace ipl {
}
}
nand::MetaFile* Manager::fn_8133A85C(EGG::Heap* heap, ESTitleId titleId) {
SEntry* channel = fn_8133A4E0(titleId);
nand::MetaFile* Manager::readSoundMetaAsync(EGG::Heap* heap, ESTitleId titleId) {
SEntry* channel = findEntryByTitleId(titleId);
if (channel == NULL) {
return NULL;
}
@@ -1357,8 +1357,8 @@ namespace ipl {
}
}
nand::SharedFile* Manager::fn_8133A924(EGG::Heap* heap, ESTitleId titleId) {
SEntry* channel = fn_8133A4E0(titleId);
nand::SharedFile* Manager::readBannerCSAsync(EGG::Heap* heap, ESTitleId titleId) {
SEntry* channel = findEntryByTitleId(titleId);
if (channel == NULL) {
return NULL;
}
@@ -1366,7 +1366,7 @@ namespace ipl {
if (!channel->loadedBnr || channel->info.primaryType == channel::PRIMARY_TYPE_DISK) {
return NULL;
} else {
u32 index = fn_8133A57C(titleId);
u32 index = getBannerCSIdx(titleId);
if (index == 0) {
return NULL;
}
@@ -1375,15 +1375,15 @@ namespace ipl {
}
}
void Manager::fn_8133A9F0() {
void Manager::clearTmpChannel() {
if (mTmpChannel.bnrFile != NULL) {
delete mTmpChannel.bnrFile;
}
memset(&mTmpChannel, 0, sizeof(mTmpChannel));
}
void Manager::fn_8133AA50(ESTitleId titleId) {
SEntry* channel = fn_8133A4E0(titleId);
void Manager::unloadBanner(ESTitleId titleId) {
SEntry* channel = findEntryByTitleId(titleId);
if (channel != NULL) {
channel->loadedBnr = false;
}

View File

@@ -39,12 +39,12 @@
extern "C" ipl::System::Arg smArg__Q23ipl6System;
extern "C" ipl::snd::System sSystem__Q23ipl3snd;
extern "C" void initOnMemory__Q33ipl3snd6SystemFPCvPQ23EGG4HeapUl();
extern "C" const f32 scOrthoLeft;
extern "C" const f32 scOrthoRight;
extern "C" const f32 scOrthoBottom;
extern "C" const f32 scOrthoTop;
extern "C" const f32 scWideOrthoLeft;
extern "C" const f32 scWideOrthoRight;
extern "C" const f32 lbl_81694424;
extern "C" const f32 lbl_81694428;
extern "C" const f32 lbl_8169442C;
extern "C" const f32 lbl_81694430;
extern "C" const f32 lbl_81694434;
extern "C" const f32 lbl_81694438;
extern "C" void* m_handle__Q23ipl11TVRCManager;
extern "C" void _savegpr_27();
extern "C" void _restgpr_27();
@@ -1139,7 +1139,7 @@ namespace ipl {
bl VISetBlack
lwz r3, 0xb0(r28)
li r0, 1
lfd f31, scOrthoLeft-0xc
lfd f31, lbl_81694424-0xc
lis r30, 0x4330
lbz r29, 0x3d(r3)
lis r31, sSystem__Q23ipl3snd@ha
@@ -1162,7 +1162,7 @@ namespace ipl {
bl makeRawData__Q33ipl7utility11JpegDecoderFv
warning_run_no_jpeg:
lwz r3, 0x74(r28)
lfs f1, scOrthoLeft-0x14
lfs f1, lbl_81694424-0x14
lwz r27, 0(r3)
stw r30, 8(r1)
fmr f2, f1
@@ -1170,7 +1170,7 @@ namespace ipl {
fmr f5, f1
lhz r0, 6(r27)
stw r3, 0xc(r1)
lfs f6, scOrthoLeft-0x4
lfs f6, lbl_81694424-0x4
lfd f0, 8(r1)
stw r0, 0x14(r1)
fsubs f3, f0, f31
@@ -1362,17 +1362,17 @@ namespace ipl {
}
void System::getProjectionRect4x3(nw4r::ut::Rect* rect) {
rect->left = *((volatile const f32*)&scOrthoLeft);
rect->right = *((volatile const f32*)&scOrthoRight);
rect->bottom = *((volatile const f32*)&scOrthoBottom);
rect->top = *((volatile const f32*)&scOrthoTop);
rect->left = *((volatile const f32*)&lbl_81694424);
rect->right = *((volatile const f32*)&lbl_81694428);
rect->bottom = *((volatile const f32*)&lbl_8169442C);
rect->top = *((volatile const f32*)&lbl_81694430);
}
void System::getProjectionRect16x9(nw4r::ut::Rect* rect) {
rect->left = *((volatile const f32*)&scWideOrthoLeft);
rect->right = *((volatile const f32*)&scWideOrthoRight);
rect->bottom = *((volatile const f32*)&scOrthoBottom);
rect->top = *((volatile const f32*)&scOrthoTop);
rect->left = *((volatile const f32*)&lbl_81694434);
rect->right = *((volatile const f32*)&lbl_81694438);
rect->bottom = *((volatile const f32*)&lbl_8169442C);
rect->top = *((volatile const f32*)&lbl_81694430);
}
GXRenderModeObj* System::getRenderModeObj() {
@@ -1516,11 +1516,11 @@ namespace ipl {
#ifdef __MWERKS__
#pragma force_active on
extern "C" const f32 scOrthoLeft = -304.0f;
extern "C" const f32 scOrthoRight = 304.0f;
extern "C" const f32 scOrthoBottom = 228.0f;
extern "C" const f32 scOrthoTop = -228.0f;
extern "C" const f32 scWideOrthoLeft = -416.0f;
extern "C" const f32 scWideOrthoRight = 416.0f;
extern "C" const f32 lbl_81694424 = -304.0f;
extern "C" const f32 lbl_81694428 = 304.0f;
extern "C" const f32 lbl_8169442C = 228.0f;
extern "C" const f32 lbl_81694430 = -228.0f;
extern "C" const f32 lbl_81694434 = -416.0f;
extern "C" const f32 lbl_81694438 = 416.0f;
#pragma force_active off
#endif