diff --git a/splat.yaml b/splat.yaml index 8bef990..cfdb936 100644 --- a/splat.yaml +++ b/splat.yaml @@ -26,7 +26,8 @@ segments: vram: 0x80000400 subsegments: - [0x1000, hasm, entry] # bootloader - - [0x1060, asm, main] # rsp graphics + - [0x1060, c, main] # rsp graphics + - [0x11B0, bin, noppad_11B0] # There's an extra nop align here, but cant reproduce it with just splat functionality alone. need a . += 0x10 in the linker script at this spot. - [0x11C0, asm] # rsp audio - [0x1A80, asm] # DMA transfer - [0x1F80, asm] # dp intro code diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..e6a1706 --- /dev/null +++ b/src/main.c @@ -0,0 +1,32 @@ +#include + +extern OSThread D_8007F180; +extern OSThread D_8007F730; +extern void func_80000460(); // thread 1 function +extern void func_8002B330(); // thread 6 function +extern u8 D_800818E0[]; + +void func_80000460(s32 arg0) { + osCreateViManager(0xFE); + func_80001474(0, 1); + osViBlack(1); + func_80008F7C(); + func_80000D54(); + func_800052B4(); + func_8000D564(); + func_800019C8(); + func_800057C0(); + osCreateThread(&D_8007F730, 6, &func_8002B330, 0, &D_800818E0, 0x14); + osStartThread(&D_8007F730); + osSetThreadPri(0, 0); + while(1); +} + +void main(void) { + osInitialize(); + osCartRomInit(); + func_8000B7D0(0); + func_80002F58(); + osCreateThread(&D_8007F180, 1, &func_80000460, 0, &D_8007F730, 0x64); + osStartThread(&D_8007F180); +}