100% d_lib.cpp + mpls symbol names

This commit is contained in:
Sean Miller
2026-04-07 16:26:14 +01:00
parent c5357115f1
commit 917f850824
6 changed files with 51 additions and 25 deletions
+7 -7
View File
@@ -135,13 +135,13 @@ _bss_init_info = .init:0x800066FC; // type:object size:0x20 scope:global data:4b
@eti_80006BD8 = extabindex:0x80006BD8; // type:object size:0xC scope:local hidden
@eti_80006BE4 = extabindex:0x80006BE4; // type:object size:0xC scope:local hidden
_eti_init_info = extabindex:0x80006BF0; // type:object size:0x20 scope:global
fn_80006C20__Fv = .text:0x80006C20; // type:function size:0x4
unknownStub__4dLibFv = .text:0x80006C20; // type:function size:0x4
strequals = .text:0x80006C30; // type:function size:0x90
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__Fv = .text:0x80006DC0; // type:function size:0x48
initialize__4MplsFiPPc = .text:0x80006CE0; // type:function size:0x80
tryLaunchMovie__4MplsFv = .text:0x80006D60; // type:function size:0x60
forceLaunchMovie__4MplsFv = .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
@@ -42061,9 +42061,9 @@ __float_huge = .sdata:0x80574F8C; // type:object size:0x4 align:4 data:float
__double_huge = .sdata:0x80574F90; // type:object size:0x8 align:8 data:double
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:0x1 data:byte
sMplsInitialized = .sbss:0x80574FA8; // type:object size:0x1 data:byte
sSkipMplsMovie = .sbss:0x80574FA9; // type:object size:0x1 data:byte
sIsNormalMode = .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
+6 -1
View File
@@ -1,6 +1,11 @@
#ifndef D_LIB_H
#define D_LIB_H
void fn_80006C20();
namespace dLib {
void unknownStub();
bool strequals(const char *str1, const char *str2);
}; // namespace dLib
#endif // D_LIB_H
+7 -3
View File
@@ -1,8 +1,12 @@
#ifndef MPLS_H
#define MPLS_H
void fn_80006CE0(int, char **);
void fn_80006D60();
void fn_80006DC0();
namespace Mpls {
void initialize(int argc, char **argv);
void tryLaunchMovie();
void forceLaunchMovie();
}; // namespace Mpls
#endif // MPLS_H
+4 -3
View File
@@ -58,11 +58,12 @@ static OSThread MAIN_THREAD;
void main(int argc, char **argv) {
u8 pStackBase[STACK_SIZE] __attribute__((aligned(32)));
fn_80006C20();
dLib::unknownStub();
dMain::g_InitialTime = OSGetTime();
dSystem::fixHeaps();
fn_80006CE0(argc, argv);
fn_80006D60();
Mpls::initialize(argc, argv);
Mpls::tryLaunchMovie();
OSThread *curThread = OSGetCurrentThread();
OSPriority curPrio = OSGetThreadPriority(curThread);
+16
View File
@@ -0,0 +1,16 @@
#include "toBeSorted/d_lib.h"
#include <cstring>
void dLib::unknownStub() {}
bool dLib::strequals(const char *lhs, const char *rhs) {
if (!rhs) {
return false;
}
size_t lhs_len = strlen(lhs);
size_t rhs_len = strlen(rhs);
return (lhs_len == rhs_len) && strncmp(lhs, rhs, lhs_len) == 0;
}
+11 -11
View File
@@ -7,31 +7,31 @@
#include <cstring>
bool lbl_80574FA8;
bool lbl_80574FA9;
bool lbl_80574FAA;
bool sMplsInitialized;
bool sSkipMplsMovie;
bool sIsNormalMode;
void fn_80006CE0(int argc, char **argv) {
void Mpls::initialize(int argc, char **argv) {
if (argc == 2) {
if (strcmp("MPLS_FIRST", argv[1]) == 0) {
lbl_80574FA9 = true;
sSkipMplsMovie = true;
} else if (strcmp("MPLS_NORMAL", argv[1]) == 0) {
lbl_80574FA9 = true;
lbl_80574FAA = true;
sSkipMplsMovie = true;
sIsNormalMode = true;
}
}
lbl_80574FA8 = true;
sMplsInitialized = true;
}
void fn_80006D60() {
if (!lbl_80574FA9 && !SCGetMplsMoviePlay()) {
void Mpls::tryLaunchMovie() {
if (!sSkipMplsMovie && !SCGetMplsMoviePlay()) {
OSExecl("/sys/mpls_movie/player.dol", "", "", "ASPECT_RATIO_AUTO", "DEFAULT", nullptr);
sAssert::assert();
}
}
void fn_80006DC0() {
void Mpls::forceLaunchMovie() {
OSExecl("/sys/mpls_movie/player.dol", "", "", "ASPECT_RATIO_AUTO", "FORCE_MENU", nullptr);
sAssert::assert();
}