1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-05-11 19:43:44 +00:00
oot/src/boot/boot_main.c
cadmic 9816f62129
Define OOT_DEBUG=0 in retail builds (#1658)
* Define OOT_DEBUG=0 in retail builds

* Fix ifndef

* Replace VI_MODE_EDITOR_INACTIVE

* Revert "Replace VI_MODE_EDITOR_INACTIVE"

This reverts commit f7c4cae7c3.

* Replace VI_MODE_EDITOR_INACTIVE, take 2

* Revert EnBom_Draw
2024-01-30 13:54:38 -05:00

33 lines
941 B
C

#include "global.h"
#include "boot.h"
StackEntry sBootThreadInfo;
OSThread sIdleThread;
STACK(sIdleThreadStack, 0x400);
StackEntry sIdleThreadInfo;
STACK(sBootThreadStack, BOOT_STACK_SIZE);
void cleararena(void) {
bzero(_dmadataSegmentStart, osMemSize - OS_K0_TO_PHYSICAL(_dmadataSegmentStart));
}
void bootproc(void) {
StackCheck_Init(&sBootThreadInfo, sBootThreadStack, STACK_TOP(sBootThreadStack), 0, -1, "boot");
osMemSize = osGetMemSize();
cleararena();
__osInitialize_common();
__osInitialize_autodetect();
gCartHandle = osCartRomInit();
osDriveRomInit();
#if OOT_DEBUG
isPrintfInit();
#endif
Locale_Init();
StackCheck_Init(&sIdleThreadInfo, sIdleThreadStack, STACK_TOP(sIdleThreadStack), 0, 256, "idle");
osCreateThread(&sIdleThread, THREAD_ID_IDLE, Idle_ThreadEntry, NULL, STACK_TOP(sIdleThreadStack),
THREAD_PRI_IDLE_INIT);
osStartThread(&sIdleThread);
}