From 7d77c095c084b193c8c56004676e6aeac87de393 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Thu, 1 Oct 2026 17:10:58 -0500 Subject: [PATCH 1/3] cleanup(iplSystem): name ortho viewport float constants (#508) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit lbl_81694424..38 → scOrthoLeft/Right/Bottom/Top and scWideOrthoLeft/Right. --- config/43U/symbols.txt | 12 +++++------ src/system/iplSystem.cpp | 46 ++++++++++++++++++++-------------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/config/43U/symbols.txt b/config/43U/symbols.txt index 4701db6b..84c73887 100644 --- a/config/43U/symbols.txt +++ b/config/43U/symbols.txt @@ -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 -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 +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_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 diff --git a/src/system/iplSystem.cpp b/src/system/iplSystem.cpp index 14be104f..ded0b5a2 100644 --- a/src/system/iplSystem.cpp +++ b/src/system/iplSystem.cpp @@ -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 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" 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" 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, lbl_81694424-0xc + lfd f31, scOrthoLeft-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, lbl_81694424-0x14 + lfs f1, scOrthoLeft-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, lbl_81694424-0x4 + lfs f6, scOrthoLeft-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*)&lbl_81694424); - rect->right = *((volatile const f32*)&lbl_81694428); - rect->bottom = *((volatile const f32*)&lbl_8169442C); - rect->top = *((volatile const f32*)&lbl_81694430); + rect->left = *((volatile const f32*)&scOrthoLeft); + rect->right = *((volatile const f32*)&scOrthoRight); + rect->bottom = *((volatile const f32*)&scOrthoBottom); + rect->top = *((volatile const f32*)&scOrthoTop); } void System::getProjectionRect16x9(nw4r::ut::Rect* rect) { - 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); + rect->left = *((volatile const f32*)&scWideOrthoLeft); + rect->right = *((volatile const f32*)&scWideOrthoRight); + rect->bottom = *((volatile const f32*)&scOrthoBottom); + rect->top = *((volatile const f32*)&scOrthoTop); } GXRenderModeObj* System::getRenderModeObj() { @@ -1516,11 +1516,11 @@ namespace ipl { #ifdef __MWERKS__ #pragma force_active on -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; +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; #pragma force_active off #endif -- 2.49.1 From e2191ae9330eda9d0fc66ed1625af9c911316ba5 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Thu, 1 Oct 2026 17:11:51 -0500 Subject: [PATCH 2/3] cleanup(TVRC): name timing constants and file header (#509) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit lbl_816945C8/D0/D8/E0 → scTvrcMsPerSec/NsecPerSec/One/FloatMagic; lbl_81696230 → scTvrcFileHeader ("TVR0"). --- config/43U/symbols.txt | 10 +++++----- src/system/TVRC.cpp | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/config/43U/symbols.txt b/config/43U/symbols.txt index 84c73887..2782003e 100644 --- a/config/43U/symbols.txt +++ b/config/43U/symbols.txt @@ -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 -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 +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_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 -lbl_81696230 = .sdata:0x81696230; // type:object size:0x5 data:string +scTvrcFileHeader = .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 diff --git a/src/system/TVRC.cpp b/src/system/TVRC.cpp index 8b963c23..c565a18d 100644 --- a/src/system/TVRC.cpp +++ b/src/system/TVRC.cpp @@ -10,10 +10,10 @@ #pragma sym on -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" 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" 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 lbl_81696230[5] = {'T', 'V', 'R', '0', '\0'}; +extern "C" char scTvrcFileHeader[5] = {'T', 'V', 'R', '0', '\0'}; #pragma pop namespace LibTVRC { - const char* TVRC_FILE_HEADER = lbl_81696230; + const char* TVRC_FILE_HEADER = scTvrcFileHeader; u32 __tienHoseiNsec = 1100; u32 _limitMilli = 400; @@ -267,7 +267,7 @@ TVRCSendStartAsync_valid: bne TVRCSendStartAsync_custom lwz r6, _tvrcFile__7LibTVRC lis r3, 2 - lfs f1, lbl_816945C8 + lfs f1, scTvrcMsPerSec 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, lbl_816945D0 + lfd f0, scTvrcNsecPerSec 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, lbl_816945E0 + lfd f1, scTvrcFloatMagic 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, lbl_816945D8 + lfd f1, scTvrcOne addi r29, r28, _tickWait__7LibTVRC@l - lfd f0, lbl_816945D0 + lfd f0, scTvrcNsecPerSec fsub f3, f1, f2 lfs f2, _Hz__7LibTVRC stw r25, 0x14(r1) - lfd f1, lbl_816945E0 + lfd f1, scTvrcFloatMagic fmul f3, f0, f3 stw r27, 0x10(r1) lfd f0, 0x10(r1) -- 2.49.1 From 008d40aad05a184492a75c11086ea8dd0c358488 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Thu, 1 Oct 2026 17:12:19 -0500 Subject: [PATCH 3/3] cleanup(iplChannelManager): name title lookup and meta helpers Rename Matching-only fn_8133A* APIs and update SD call sites plus mangled symbols.txt entries. --- config/43U/symbols.txt | 26 +++++----- include/system/iplChannelManager.h | 26 +++++----- src/scene/sdChannelMemory/iplSDMemory.cpp | 2 +- .../sdChannelTitle/iplSDChannelTitle.cpp | 26 +++++----- src/system/iplChannelManager.cpp | 50 +++++++++---------- 5 files changed, 65 insertions(+), 65 deletions(-) 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; } -- 2.49.1