diff --git a/config/43U/symbols.txt b/config/43U/symbols.txt index 4701db6b..7b893d41 100644 --- a/config/43U/symbols.txt +++ b/config/43U/symbols.txt @@ -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 diff --git a/include/system/iplChannelManager.h b/include/system/iplChannelManager.h index 0e7236bf..693eed99 100644 --- a/include/system/iplChannelManager.h +++ b/include/system/iplChannelManager.h @@ -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; } diff --git a/src/scene/sdChannelMemory/iplSDMemory.cpp b/src/scene/sdChannelMemory/iplSDMemory.cpp index 1c26f643..56b706c1 100644 --- a/src/scene/sdChannelMemory/iplSDMemory.cpp +++ b/src/scene/sdChannelMemory/iplSDMemory.cpp @@ -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++; diff --git a/src/scene/sdChannelTitle/iplSDChannelTitle.cpp b/src/scene/sdChannelTitle/iplSDChannelTitle.cpp index a75be681..5bb437ca 100644 --- a/src/scene/sdChannelTitle/iplSDChannelTitle.cpp +++ b/src/scene/sdChannelTitle/iplSDChannelTitle.cpp @@ -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); diff --git a/src/system/iplChannelManager.cpp b/src/system/iplChannelManager.cpp index 73499f0e..f8775b65 100644 --- a/src/system/iplChannelManager.cpp +++ b/src/system/iplChannelManager.cpp @@ -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; }