1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-15 04:14:34 +00:00

[ntsc-1.0/1.1] Match "system" files (#2254)

This commit is contained in:
cadmic 2024-10-09 06:48:53 -07:00 committed by GitHub
parent d3bf8ae78b
commit 60f9607569
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 108 additions and 6 deletions

View file

@ -1,4 +1,5 @@
#include "ultra64.h"
#include "versions.h"
// Declared before including other headers for BSS ordering
extern uintptr_t gSegments[NUM_SEGMENTS];
@ -39,7 +40,11 @@ uintptr_t gSegments[NUM_SEGMENTS];
OSThread sGraphThread;
STACK(sGraphStack, 0x1800);
#if OOT_VERSION < PAL_1_0
STACK(sSchedStack, 0x400);
#else
STACK(sSchedStack, 0x600);
#endif
STACK(sAudioStack, 0x800);
STACK(sPadMgrStack, 0x500);
STACK(sIrqMgrStack, 0x500);
@ -78,7 +83,7 @@ void Main(void* arg) {
#if PLATFORM_N64
func_800AD410();
if (D_80121211 != 0) {
systemHeapStart = (uintptr_t)&_n64ddSegmentEnd;
systemHeapStart = (uintptr_t)_n64ddSegmentEnd;
SysCfb_Init(1);
} else {
func_800AD488();
@ -150,7 +155,10 @@ void Main(void* arg) {
StackCheck_Init(&sGraphStackInfo, sGraphStack, STACK_TOP(sGraphStack), 0, 0x100, "graph");
osCreateThread(&sGraphThread, THREAD_ID_GRAPH, Graph_ThreadEntry, arg, STACK_TOP(sGraphStack), THREAD_PRI_GRAPH);
osStartThread(&sGraphThread);
#if OOT_VERSION >= PAL_1_0
osSetThreadPri(NULL, THREAD_PRI_MAIN);
#endif
while (true) {
s16* msg = NULL;
@ -162,6 +170,9 @@ void Main(void* arg) {
switch (*msg) {
case OS_SC_PRE_NMI_MSG:
PRINTF(T("main.c: リセットされたみたいだよ\n", "main.c: Looks like it's been reset\n"));
#if OOT_VERSION < PAL_1_0
StackCheck_Check(NULL);
#endif
PreNmiBuff_SetReset(gAppNmiBufferPtr);
break;
}