1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-12 18:01:16 +00:00
oot/src/boot/boot_main.c
fig02 28cc9d68cf
Remove "z64" prefix from all headers (#2518)
* z64 - a

* z64 - b

* z64 - c

* z64 - d

* z64 - e

* z64 - f

* z64 - g

* z64 - h

* z64 - i

* z64 - l

* z64 - m

* z64 - o

* z64 - p

* z64 - q

* z64 - r

* z64 - s

* z64 - t

* z64 - v

* restore file

* fix merge

* fix merge

---------

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2025-06-04 14:38:33 -04:00

48 lines
1.2 KiB
C

#include "boot.h"
#include "carthandle.h"
#include "idle.h"
#include "is_debug.h"
#include "segment_symbols.h"
#include "stack.h"
#include "stackcheck.h"
#if PLATFORM_N64
#include "cic6105.h"
#endif
#include "z_locale.h"
#include "thread.h"
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.2:128"
StackEntry sBootThreadInfo;
OSThread sIdleThread;
STACK(sIdleThreadStack, 0x400);
StackEntry sIdleThreadInfo;
STACK(sBootThreadStack, BOOT_STACK_SIZE);
void bootclear(void) {
bzero(_bootSegmentEnd, osMemSize - OS_K0_TO_PHYSICAL(_bootSegmentEnd));
}
void bootproc(void) {
StackCheck_Init(&sBootThreadInfo, sBootThreadStack, STACK_TOP(sBootThreadStack), 0, -1, "boot");
osMemSize = osGetMemSize();
#if PLATFORM_N64
func_80001720();
#endif
bootclear();
osInitialize();
gCartHandle = osCartRomInit();
osDriveRomInit();
#if DEBUG_FEATURES
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);
}