From c1610da573139af0ee0922cfc32d6a4187a54a38 Mon Sep 17 00:00:00 2001 From: Sean Miller Date: Tue, 7 Apr 2026 15:08:16 +0100 Subject: [PATCH] 100% mpls.cpp --- config/SOUE01/splits.txt | 1 + config/SOUE01/symbols.txt | 39 ++++++++++++++++++++------------------- include/rvl/OS/OSExec.h | 2 ++ include/rvl/SC/scapi.h | 1 + include/toBeSorted/mpls.h | 1 + src/toBeSorted/mpls.cpp | 37 +++++++++++++++++++++++++++++++++++++ 6 files changed, 62 insertions(+), 19 deletions(-) create mode 100644 src/toBeSorted/mpls.cpp diff --git a/config/SOUE01/splits.txt b/config/SOUE01/splits.txt index 79b80620..46128aad 100644 --- a/config/SOUE01/splits.txt +++ b/config/SOUE01/splits.txt @@ -23,6 +23,7 @@ toBeSorted/unk_sorajima_list.cpp: toBeSorted/mpls.cpp: .text start:0x80006CE0 end:0x80006E08 align:16 .data start:0x804FD060 end:0x804FD0B8 + .sdata start:0x80571440 end:0x80571450 .sbss start:0x80574FA8 end:0x80574FB0 toBeSorted/mdl_base.cpp: diff --git a/config/SOUE01/symbols.txt b/config/SOUE01/symbols.txt index 7869e513..ab536f9c 100644 --- a/config/SOUE01/symbols.txt +++ b/config/SOUE01/symbols.txt @@ -141,7 +141,7 @@ findSMA2 = .text:0x80006CC0; // type:function size:0x10 findSMA3 = .text:0x80006CD0; // type:function size:0x10 fn_80006CE0__FiPPc = .text:0x80006CE0; // type:function size:0x80 fn_80006D60__Fv = .text:0x80006D60; // type:function size:0x60 -fn_80006DC0 = .text:0x80006DC0; // type:function size:0x48 +fn_80006DC0__Fv = .text:0x80006DC0; // type:function size:0x48 fn_80006E10 = .text:0x80006E10; // type:function size:0x3C fn_80006E50 = .text:0x80006E50; // type:function size:0x58 printGameInfo__Fv = .text:0x80006EB0; // type:function size:0xBC scope:local @@ -2826,9 +2826,9 @@ initAudioMgr__6dSys_cFPQ23EGG4Heap = .text:0x80064250; // type:function size:0xB beginRender__6dSys_cFv = .text:0x80064300; // type:function size:0x38 endRender__6dSys_cFv = .text:0x80064340; // type:function size:0x18 beginFrame__6dSys_cFv = .text:0x80064360; // type:function size:0x68 -onBeginFrame__Q23EGG129TSystemFv = .text:0x800643D0; // type:function size:0x4 +onBeginFrame__Q23EGG126TSystemFv = .text:0x800643D0; // type:function size:0x4 endFrame__6dSys_cFv = .text:0x800643E0; // type:function size:0x48 -onEndFrame__Q23EGG129TSystemFv = .text:0x80064430; // type:function size:0x4 +onEndFrame__Q23EGG126TSystemFv = .text:0x80064430; // type:function size:0x4 setBlack__6dSys_cFb = .text:0x80064440; // type:function size:0x80 setFrameRate__6dSys_cFUc = .text:0x800644C0; // type:function size:0x10 getFrameRate__6dSys_cFv = .text:0x800644D0; // type:function size:0x10 @@ -2836,18 +2836,18 @@ setClearColor__6dSys_cFQ34nw4r2ut5Color = .text:0x800644E0; // type:function siz getClearColor__6dSys_cFv = .text:0x80064540; // type:function size:0x14 create__6dSys_cFv = .text:0x80064560; // type:function size:0x3BC setPosParam__Q23EGG14CoreControllerFff = .text:0x80064920; // type:function size:0x8 -initialize__Q23EGG129TSystemFv = .text:0x80064930; // type:function size:0x1F4 +initialize__Q23EGG126TSystemFv = .text:0x80064930; // type:function size:0x1F4 execute__6dSys_cFv = .text:0x80064B30; // type:function size:0x268 fixHeaps__7dSystemFv = .text:0x80064DA0; // type:function size:0xB8 __sinit_\d_sys_cpp = .text:0x80064E60; // type:function size:0x34 scope:local -initRenderMode__Q23EGG129TSystemFv = .text:0x80064EA0; // type:function size:0x4 -getVideo__Q23EGG129TSystemFv = .text:0x80064EB0; // type:function size:0x8 -getSystemHeap__Q23EGG129TSystemFv = .text:0x80064EC0; // type:function size:0x8 -getDisplay__Q23EGG129TSystemFv = .text:0x80064ED0; // type:function size:0x8 -getXfbMgr__Q23EGG129TSystemFv = .text:0x80064EE0; // type:function size:0x8 -getPerfView__Q23EGG129TSystemFv = .text:0x80064EF0; // type:function size:0x14 -getSceneMgr__Q23EGG129TSystemFv = .text:0x80064F10; // type:function size:0x8 -getAudioMgr__Q23EGG129TSystemFv = .text:0x80064F20; // type:function size:0x8 +initRenderMode__Q23EGG126TSystemFv = .text:0x80064EA0; // type:function size:0x4 +getVideo__Q23EGG126TSystemFv = .text:0x80064EB0; // type:function size:0x8 +getSystemHeap__Q23EGG126TSystemFv = .text:0x80064EC0; // type:function size:0x8 +getDisplay__Q23EGG126TSystemFv = .text:0x80064ED0; // type:function size:0x8 +getXfbMgr__Q23EGG126TSystemFv = .text:0x80064EE0; // type:function size:0x8 +getPerfView__Q23EGG126TSystemFv = .text:0x80064EF0; // type:function size:0x14 +getSceneMgr__Q23EGG126TSystemFv = .text:0x80064F10; // type:function size:0x8 +getAudioMgr__Q23EGG126TSystemFv = .text:0x80064F20; // type:function size:0x8 fn_80064F30 = .text:0x80064F30; // type:function size:0x24 fn_80064F60 = .text:0x80064F60; // type:function size:0x2C fn_80064F90 = .text:0x80064F90; // type:function size:0x30 @@ -29272,10 +29272,11 @@ gTRKMemMap = .rodata:0x804FCFC0; // type:object size:0x10 data:4byte lbl_804FCFD0 = .rodata:0x804FCFD0; // type:object size:0x28 data:4byte lbl_804FCFF8 = .rodata:0x804FCFF8; // type:object size:0x28 data:4byte lbl_804FD020 = .rodata:0x804FD020; // type:object size:0x28 data:4byte -lbl_804FD060 = .data:0x804FD060; // type:object size:0xB data:string -lbl_804FD06C = .data:0x804FD06C; // type:object size:0xC data:string -lbl_804FD078 = .data:0x804FD078; // type:object size:0x1B data:string -lbl_804FD094 = .data:0x804FD094; // type:object size:0x24 +@805 = .data:0x804FD060; // type:object size:0xB data:string +@806 = .data:0x804FD06C; // type:object size:0xC data:string +@810 = .data:0x804FD078; // type:object size:0x1B data:string +@812 = .data:0x804FD094; // type:object size:0x12 data:string +@815 = .data:0x804FD0A8; // type:object size:0xB data:string lbl_804FD0B8 = .data:0x804FD0B8; // type:object size:0x10 @5819 = .data:0x804FD0C8; // type:object size:0x10 scope:local data:string ...data.0 = .data:0x804FD0C8; // type:label scope:local @@ -39715,8 +39716,8 @@ jumptable_805713B0 = .data:0x805713B0; // type:object size:0x1C scope:local jumptable_805713CC = .data:0x805713CC; // type:object size:0x1C scope:local @stringBase0 = .data:0x805713E8; // type:object size:0x30 scope:local data:string_table gTRKExceptionStatus = .data:0x80571418; // type:object size:0x10 scope:local data:4byte -lbl_80571440 = .sdata:0x80571440; // type:object size:0x8 -lbl_80571448 = .sdata:0x80571448; // type:object size:0x8 data:string +@811 = .sdata:0x80571440; // type:object size:0x8 +@813 = .sdata:0x80571448; // type:object size:0x8 data:string @5820 = .sdata:0x80571450; // type:object size:0x3 scope:local data:string @5822 = .sdata:0x80571454; // type:object size:0x4 scope:local data:string @5824 = .sdata:0x80571458; // type:object size:0x5 scope:local data:string @@ -42062,7 +42063,7 @@ lbl_80574FA0 = .sbss:0x80574FA0; // type:object size:0x4 data:4byte lbl_80574FA4 = .sbss:0x80574FA4; // type:object size:0x4 data:4byte lbl_80574FA8 = .sbss:0x80574FA8; // type:object size:0x1 data:byte lbl_80574FA9 = .sbss:0x80574FA9; // type:object size:0x1 data:byte -lbl_80574FAA = .sbss:0x80574FAA; // type:object size:0x6 data:byte +lbl_80574FAA = .sbss:0x80574FAA; // type:object size:0x1 data:byte sButtonSequencePtr = .sbss:0x80574FB0; // type:object size:0x4 scope:local data:4byte sAsserted = .sbss:0x80574FB4; // type:object size:0x1 scope:local data:byte @GUARD@exceptionCreate__FPQ23EGG4Heap@mapFile = .sbss:0x80574FB5; // type:object size:0x1 scope:local data:byte diff --git a/include/rvl/OS/OSExec.h b/include/rvl/OS/OSExec.h index 37b72f80..74093536 100644 --- a/include/rvl/OS/OSExec.h +++ b/include/rvl/OS/OSExec.h @@ -19,6 +19,8 @@ extern BOOL __OSInReboot; void __OSGetExecParams(OSExecParams *out); void __OSLaunchMenu(void); +void OSExecl(const char* dolfile, const char* arg0, ...); + #ifdef __cplusplus } #endif diff --git a/include/rvl/SC/scapi.h b/include/rvl/SC/scapi.h index b63389f3..b9971c1a 100644 --- a/include/rvl/SC/scapi.h +++ b/include/rvl/SC/scapi.h @@ -74,6 +74,7 @@ u32 SCGetCounterBias(void); void SCGetBtDeviceInfoArray(SCBtDeviceInfoArray *info); void SCSetBtDeviceInfoArray(const SCBtDeviceInfoArray *info); u32 SCGetBtDpdSensibility(void); +BOOL SCGetMplsMoviePlay(void); u8 SCGetWpadMotorMode(void); void SCSetWpadMotorMode(u8 mode); u8 SCGetWpadSensorBarPosition(void); diff --git a/include/toBeSorted/mpls.h b/include/toBeSorted/mpls.h index 561c5bff..c7820a31 100644 --- a/include/toBeSorted/mpls.h +++ b/include/toBeSorted/mpls.h @@ -3,5 +3,6 @@ void fn_80006CE0(int, char **); void fn_80006D60(); +void fn_80006DC0(); #endif // MPLS_H diff --git a/src/toBeSorted/mpls.cpp b/src/toBeSorted/mpls.cpp new file mode 100644 index 00000000..e5ae1804 --- /dev/null +++ b/src/toBeSorted/mpls.cpp @@ -0,0 +1,37 @@ +#include "toBeSorted/mpls.h" + +#include "s/s_Assert.h" + +#include "rvl/OS.h" +#include "rvl/SC.h" + +#include + +bool lbl_80574FA8; +bool lbl_80574FA9; +bool lbl_80574FAA; + +void fn_80006CE0(int argc, char **argv) { + if (argc == 2) { + if (strcmp("MPLS_FIRST", argv[1]) == 0) { + lbl_80574FA9 = true; + } else if (strcmp("MPLS_NORMAL", argv[1]) == 0) { + lbl_80574FA9 = true; + lbl_80574FAA = true; + } + } + + lbl_80574FA8 = true; +} + +void fn_80006D60() { + if (!lbl_80574FA9 && !SCGetMplsMoviePlay()) { + OSExecl("/sys/mpls_movie/player.dol", "", "", "ASPECT_RATIO_AUTO", "DEFAULT", nullptr); + sAssert::assert(); + } +} + +void fn_80006DC0() { + OSExecl("/sys/mpls_movie/player.dol", "", "", "ASPECT_RATIO_AUTO", "FORCE_MENU", nullptr); + sAssert::assert(); +}