coastline 0.0.4
Loading...
Searching...
No Matches
boot.h File Reference

The entry of the cartridge: the routine the console jumps to, the BSS segment it clears, the stack it starts on, and the start of the operating system. More...

#include <ultra64.h>
Include dependency graph for boot.h:

Go to the source code of this file.

Functions

void ramMain (void)
 Clear the BSS segment, two words at a time, move the stack to the boot stack, and jump to OsBootEntry().
void OsBootEntry (void)
 Initialise the operating system, then create and start the boot thread.

Variables

u8 g_abBootStackTop []
 Top of the stack ramMain() hands to OsBootEntry(), from the link script.

Detailed Description

The entry of the cartridge: the routine the console jumps to, the BSS segment it clears, the stack it starts on, and the start of the operating system.

Function Documentation

◆ ramMain()

void ramMain ( void )

Clear the BSS segment, two words at a time, move the stack to the boot stack, and jump to OsBootEntry().

The routine is hand-written assembly in main.s.

Ghidra address:
USA: 0x80200000
Ghidra address:
Asia: 0x80200000
Ghidra address:
EUR: 0x80200000
Ghidra address:
JPN: 0x80200000

◆ OsBootEntry()

void OsBootEntry ( void )

Initialise the operating system, then create and start the boot thread.

The European release first sets the television standard to PAL.

Ghidra address:
USA: 0x8021e5c4
Ghidra address:
Asia: 0x8021E114
Ghidra address:
EUR: 0x8021f8a4
Ghidra address:
JPN: 0x8021f0b4

Variable Documentation

◆ g_abBootStackTop

u8 g_abBootStackTop[]
extern

Top of the stack ramMain() hands to OsBootEntry(), from the link script.

Ghidra address:
USA: 0x803168d0
Ghidra address:
Asia: 0x80316380
Ghidra address:
EUR: 0x803185b0
Ghidra address:
JPN: 0x803171e0