Work on OSExec, OSReboot OK (#1992)

This commit is contained in:
hatal175
2023-11-27 11:00:11 +02:00
committed by GitHub
parent 7a6acf904c
commit 6b0df1f30d
10 changed files with 261 additions and 242 deletions
+1 -1
View File
@@ -136,7 +136,7 @@ BOOL DVDSetAutoInvalidation(BOOL autoInval);
void DVDResume(void);
static BOOL DVDCancelAsync(DVDCommandBlock* block, DVDCBCallback callback);
s32 DVDCancel(DVDCommandBlock* block);
void __DVDPrepareResetAsync(DVDCBCallback callbac);
BOOL DVDCompareDiskID(DVDDiskID* id1, DVDDiskID* id2);
#ifdef __cplusplus
+6 -11
View File
@@ -99,6 +99,11 @@ extern u8 __OSReport_Warning_disable;
extern u8 __OSReport_System_disable;
extern u8 __OSReport_enable;
extern BOOL __OSIsGcam;
extern u32 BOOT_REGION_START : 0x812FDFF0;
extern u32 BOOT_REGION_END : 0x812FDFEC;
void OSReportInit__Fv(void); // needed for inline asm
u8* OSGetStackPointer(void);
@@ -189,16 +194,6 @@ typedef struct OSBootInfo {
/* 0x3C */ u32 fst_max_length;
} OSBootInfo;
typedef struct {
BOOL valid;
u32 restartCode;
u32 bootDol;
void* regionStart;
void* regionEnd;
BOOL argsUseDefault;
void* argsAddr; // valid only when argsUseDefault = FALSE
} OSExecParams;
typedef struct BI2Debug {
/* 0x00 */ s32 debugMonSize;
/* 0x04 */ s32 simMemSize;
@@ -245,7 +240,7 @@ struct GLOBAL_MEMORY {
u8 padding_0x30e0[4];
u32 field_0x30e4; /* __OSPADButton */
u8 padding_0x30ec[8];
u32 field_0x30f0; /* DOL Execute Parameters */
OSExecParams* field_0x30f0; /* DOL Execute Parameters */
u8 padding_0x30f4[12];
u32 field_0x3100; /* Physical MEM1 size */
u32 field_0x3104; /* Simulated MEM1 size */
+13 -4
View File
@@ -7,14 +7,23 @@
extern "C" {
#endif
typedef struct {
/* 0x00 */ BOOL valid;
/* 0x04 */ u32 restartCode;
/* 0x08 */ u32 bootDol;
/* 0x0C */ void* regionStart;
/* 0x10 */ void* regionEnd;
/* 0x18 */ BOOL argsUseDefault;
/* 0x14 */ void* argsAddr; // valid only when argsUseDefault = FALSE
} OSExecParams;
static s32 PackArgs(void* param_0, u32 param_1, void* param_2);
static void Run(void);
static void Run(int param_0);
static void ReadDisc(void* param_0, s32 param_1, s32 param_2);
static void Callback(void);
void __OSGetExecParams(void* param_0);
static void GetApploaderPosition(void);
void __OSGetExecParams(OSExecParams* param_0);
void __OSBootDolSimple(u32 param_0, u32 param_1, void* param_2, void* param_3, s32 param_4, u32 param_5, void* param_6);
void __OSBootDol(s32 param_0, u32 param_1, s32 param_2);
void __OSBootDol(s32 param_0, u32 param_1, char** param_2);
#ifdef __cplusplus
};