SSBM Decomp
Loading...
Searching...
No Matches
OS.c File Reference
#include <dolphin.h>
#include <macros.h>
#include <dolphin/db.h>
#include <dolphin/exi.h>
#include <dolphin/os.h>
#include "__os.h"

Macros

#define OS_BI2_DEBUG_ADDRESS   0x800000F4
#define DEBUGFLAG_ADDR   0x800030E8
#define OS_DEBUG_ADDRESS_2   0x800030E9
#define OS_CURRENTCONTEXT_PADDR   0x00C0
#define OS_EXCEPTIONTABLE_ADDR   0x3000
#define OS_DBJUMPPOINT_ADDR   0x60
#define OS_CACHED_REGION_PREFIX   0x8000
#define OS_BI2_DEBUG_ADDRESS   0x800000F4
#define OS_BI2_DEBUGFLAG_OFFSET   0xC
#define PAD3_BUTTON_ADDR   0x800030E4
#define OS_DVD_DEVICECODE   0x800030E6
#define DEBUGFLAG_ADDR   0x800030E8
#define OS_DEBUG_ADDRESS_2   0x800030E9
#define DB_EXCEPTIONRET_OFFSET   0xC
#define DB_EXCEPTIONDEST_OFFSET   0x8
#define NOP   0x60000000
#define BOOT_REGION_START   (*(u32*) 0x812FDFF0)
#define BOOT_REGION_END   (*(u32*) 0x812FDFEC)

Functions

void EnableMetroTRKInterrupts (void)
void __OSEVStart (void)
void __OSEVEnd (void)
void __OSEVSetNumber (void)
void __OSExceptionVector (void)
void __DBVECTOR (void)
void __OSDBINTSTART (void)
void __OSDBINTEND (void)
void __OSDBJUMPSTART (void)
void __OSDBJUMPEND (void)
static asm void __OSInitFPRs (void)
static void OSExceptionInit (void)
static void OSDefaultExceptionHandler (unsigned char exception, struct OSContext *context)
unsigned long __OSIsDebuggerPresent ()
unsigned long OSGetConsoleType ()
static void ClearArena (void)
void OSInit ()
static asm void __OSDBIntegrator (void)
static asm void __OSDBJump (void)
__OSExceptionHandler __OSSetExceptionHandler (__OSException exception, __OSExceptionHandler handler)
__OSExceptionHandler __OSGetExceptionHandler (__OSException exception)
static asm void OSExceptionVector (void)
void __OSUnhandledException (__OSException exception, OSContext *context, u32 dsisr, u32 dar)
asm void OSDefaultExceptionHandler (register __OSException exception, register OSContext *context)
void __OSPSInit (void)
u32 __OSGetDIConfig (void)

Variables

unsigned long __DVDLongFileNameFlag
unsigned long __PADSpec
unsigned char __ArenaLo []
char _stack_addr []
unsigned char __ArenaHi []
u64 __OSStartTime
static struct OSBootInfo_s * BootInfo
static unsigned long * BI2DebugFlag
static u32 BI2DebugFlagHolder
static double ZeroF
static int AreWeInitialized
static void(** OSExceptionTable )(unsigned char, struct OSContext *)
static u32 __OSExceptionLocations []

Macro Definition Documentation

◆ OS_BI2_DEBUG_ADDRESS [1/2]

#define OS_BI2_DEBUG_ADDRESS   0x800000F4

◆ DEBUGFLAG_ADDR [1/2]

#define DEBUGFLAG_ADDR   0x800030E8

◆ OS_DEBUG_ADDRESS_2 [1/2]

#define OS_DEBUG_ADDRESS_2   0x800030E9

◆ OS_CURRENTCONTEXT_PADDR

#define OS_CURRENTCONTEXT_PADDR   0x00C0

◆ OS_EXCEPTIONTABLE_ADDR

#define OS_EXCEPTIONTABLE_ADDR   0x3000

◆ OS_DBJUMPPOINT_ADDR

#define OS_DBJUMPPOINT_ADDR   0x60

◆ OS_CACHED_REGION_PREFIX

#define OS_CACHED_REGION_PREFIX   0x8000

◆ OS_BI2_DEBUG_ADDRESS [2/2]

#define OS_BI2_DEBUG_ADDRESS   0x800000F4

◆ OS_BI2_DEBUGFLAG_OFFSET

#define OS_BI2_DEBUGFLAG_OFFSET   0xC

◆ PAD3_BUTTON_ADDR

#define PAD3_BUTTON_ADDR   0x800030E4

◆ OS_DVD_DEVICECODE

#define OS_DVD_DEVICECODE   0x800030E6

◆ DEBUGFLAG_ADDR [2/2]

#define DEBUGFLAG_ADDR   0x800030E8

◆ OS_DEBUG_ADDRESS_2 [2/2]

#define OS_DEBUG_ADDRESS_2   0x800030E9

◆ DB_EXCEPTIONRET_OFFSET

#define DB_EXCEPTIONRET_OFFSET   0xC

◆ DB_EXCEPTIONDEST_OFFSET

#define DB_EXCEPTIONDEST_OFFSET   0x8

◆ NOP

#define NOP   0x60000000

◆ BOOT_REGION_START

#define BOOT_REGION_START   (*(u32*) 0x812FDFF0)

◆ BOOT_REGION_END

#define BOOT_REGION_END   (*(u32*) 0x812FDFEC)

Function Documentation

◆ EnableMetroTRKInterrupts()

void EnableMetroTRKInterrupts ( void )
extern

◆ __OSEVStart()

void __OSEVStart ( void )

◆ __OSEVEnd()

void __OSEVEnd ( void )

◆ __OSEVSetNumber()

void __OSEVSetNumber ( void )

◆ __OSExceptionVector()

void __OSExceptionVector ( void )

◆ __DBVECTOR()

void __DBVECTOR ( void )

◆ __OSDBINTSTART()

void __OSDBINTSTART ( void )

◆ __OSDBINTEND()

void __OSDBINTEND ( void )

◆ __OSDBJUMPSTART()

void __OSDBJUMPSTART ( void )

◆ __OSDBJUMPEND()

void __OSDBJUMPEND ( void )

◆ __OSInitFPRs()

asm void __OSInitFPRs ( void )
static

◆ OSExceptionInit()

void OSExceptionInit ( void )
static

◆ OSDefaultExceptionHandler() [1/2]

void OSDefaultExceptionHandler ( unsigned char exception,
struct OSContext * context )
static

◆ __OSIsDebuggerPresent()

unsigned long __OSIsDebuggerPresent ( void )

◆ OSGetConsoleType()

unsigned long OSGetConsoleType ( void )

◆ ClearArena()

void ClearArena ( void )
static

◆ OSInit()

void OSInit ( void )

◆ __OSDBIntegrator()

asm void __OSDBIntegrator ( void )
static

◆ __OSDBJump()

asm void __OSDBJump ( void )
static

◆ __OSSetExceptionHandler()

__OSExceptionHandler __OSSetExceptionHandler ( __OSException exception,
__OSExceptionHandler handler )

◆ __OSGetExceptionHandler()

__OSExceptionHandler __OSGetExceptionHandler ( __OSException exception)

◆ OSExceptionVector()

asm void OSExceptionVector ( void )
static

◆ __OSUnhandledException()

void __OSUnhandledException ( __OSException exception,
OSContext * context,
u32 dsisr,
u32 dar )

◆ OSDefaultExceptionHandler() [2/2]

asm void OSDefaultExceptionHandler ( register __OSException exception,
register OSContext * context )

◆ __OSPSInit()

void __OSPSInit ( void )

◆ __OSGetDIConfig()

u32 __OSGetDIConfig ( void )

Variable Documentation

◆ __DVDLongFileNameFlag

unsigned long __DVDLongFileNameFlag
extern

◆ __PADSpec

unsigned long __PADSpec
extern

◆ __ArenaLo

unsigned char __ArenaLo[]
extern

◆ _stack_addr

char _stack_addr[]
extern

◆ __ArenaHi

unsigned char __ArenaHi[]
extern

◆ __OSStartTime

u64 __OSStartTime

◆ BootInfo

struct OSBootInfo_s* BootInfo
static

◆ BI2DebugFlag

unsigned long* BI2DebugFlag
static

◆ BI2DebugFlagHolder

u32 BI2DebugFlagHolder
static

◆ ZeroF

double ZeroF
static

◆ AreWeInitialized

int AreWeInitialized
static

◆ OSExceptionTable

void(** OSExceptionTable) (unsigned char, struct OSContext *) ( unsigned char ,
struct OSContext *  )
static

◆ __OSExceptionLocations

u32 __OSExceptionLocations[]
static
Initial value:
= {
0x00000100, 0x00000200, 0x00000300, 0x00000400, 0x00000500, 0x00000600, 0x00000700, 0x00000800,
0x00000900, 0x00000C00, 0x00000D00, 0x00000F00, 0x00001300, 0x00001400, 0x00001700,
}