diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2023-01-29 17:11:40 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2023-01-29 17:11:40 -0400 |
commit | 9943fe31f61f4f632064cbc3c4fce9bd7bfe21ae (patch) | |
tree | b6fedfac2ebedf6394ea557f156ad606085157dc /include/dolphin | |
parent | 3125154316a235574579e9d25985236bd799982b (diff) |
__start: Use `__start` from the Super Mario Sunshine decomp project
Link to project:
https://github.com/doldecomp/sms
Diffstat (limited to 'include/dolphin')
-rw-r--r-- | include/dolphin/__start.h | 54 |
1 files changed, 50 insertions, 4 deletions
diff --git a/include/dolphin/__start.h b/include/dolphin/__start.h index 07bb2bf..1b74138 100644 --- a/include/dolphin/__start.h +++ b/include/dolphin/__start.h @@ -1,6 +1,52 @@ -unsigned short Pad3Button : 0x800030e4; +// This file was taken from the Super Mario Sunshine decompilation project. +// https://github.com/doldecomp/sms/blob/master/include/dolphin/__start.h +#include "dolphin/types.h" +#include "dolphin/db.h" -extern int main(int argc, char **argv); +#define PAD3_BUTTON_ADDR 0x800030E4 +#define OS_RESET_RESTART 0 +#define FALSE 0 +#define TRUE 1 +#define EXCEPTIONMASK_ADDR 0x80000044 +#define BOOTINFO2_ADDR 0x800000F4 +#define OS_BI2_DEBUGFLAG_OFFSET 0xC +#define ARENAHI_ADDR 0x80000034 +#define DEBUGFLAG_ADDR 0x800030E8 +#define DVD_DEVICECODE_ADDR 0x800030E6 -__declspec(section ".init") void __check_pad3(void); -__declspec(section ".init") void __start(void); +extern void InitMetroTRK(); + +u16 Pad3Button : PAD3_BUTTON_ADDR; + +extern void memset(void*, int, int); +extern int main(int argc, char* argv[]); +extern void exit(int); +extern void __init_user(void); +extern void InitMetroTRK_BBA(void); +extern void OSInit(void); +extern void OSResetSystem(BOOL reset, u32 resetCode, BOOL forceMenu); +extern void __init_hardware(void); + +__declspec(section ".init") extern void __check_pad3(void); +__declspec(section ".init") extern void __start(void); +__declspec(section ".init") extern void __init_registers(void); +__declspec(section ".init") extern void __init_data(void); + +__declspec(section ".init") extern char _stack_addr[]; +__declspec(section ".init") extern char _SDA_BASE_[]; +__declspec(section ".init") extern char _SDA2_BASE_[]; + +typedef struct __rom_copy_info { + char* rom; + char* addr; + unsigned int size; +} __rom_copy_info; + +__declspec(section ".init") extern __rom_copy_info _rom_copy_info[]; + +typedef struct __bss_init_info { + char* addr; + unsigned int size; +} __bss_init_info; + +__declspec(section ".init") extern __bss_init_info _bss_init_info[]; |