Super Mario 64 Source
A Super Mario 64 decompilation, brought to you by a bunch of clever folks.
Functions | Variables
crash.inc.c File Reference
#include <sm64.h>
#include "crash.h"

Functions

void generate_exception_preambles (void *entryPoint)
 
int crash_strlen (char *str)
 
void show_crash_screen_and_hang (void)
 
u8 ascii_to_idx (char c)
 
void fb_set_address (void *address)
 
void fb_swap ()
 
void fb_fill (int baseX, int baseY, int width, int height)
 
void fb_draw_char (int x, int y, u8 idx)
 
void fb_draw_char_shaded (int x, int y, u8 idx)
 
int fb_print_str (int x, int y, const char *str)
 
void fb_print_int_hex (int x, int y, u32 value, int nbits)
 
int fb_print_uint (int x, int y, u32 value)
 
void fb_print_gpr_states (int x, int y, const char *regNames[], u32 *regContext)
 

Variables

u32 exceptionRegContext []
 
charpAssertFile
 
int nAssertLine
 
charpAssertExpression
 
int nAssertStopProgram
 
u16 fbFillColor = 0xFFFF
 
u16 fbShadeColor = 0x0000
 
u16fbAddress = NULL
 
u8 crashFont []
 
const charszErrCodes []
 
const charszGPRegisters1 []
 
const charszGPRegisters2 []
 

Function Documentation

◆ ascii_to_idx()

u8 ascii_to_idx ( char  c)

◆ crash_strlen()

int crash_strlen ( char str)

◆ fb_draw_char()

void fb_draw_char ( int  x,
int  y,
u8  idx 
)

◆ fb_draw_char_shaded()

void fb_draw_char_shaded ( int  x,
int  y,
u8  idx 
)

◆ fb_fill()

void fb_fill ( int  baseX,
int  baseY,
int  width,
int  height 
)

◆ fb_print_gpr_states()

void fb_print_gpr_states ( int  x,
int  y,
const char regNames[],
u32 regContext 
)

◆ fb_print_int_hex()

void fb_print_int_hex ( int  x,
int  y,
u32  value,
int  nbits 
)

◆ fb_print_str()

int fb_print_str ( int  x,
int  y,
const char str 
)

◆ fb_print_uint()

int fb_print_uint ( int  x,
int  y,
u32  value 
)

◆ fb_set_address()

void fb_set_address ( void address)

◆ fb_swap()

void fb_swap ( void  )

◆ generate_exception_preambles()

void generate_exception_preambles ( void entryPoint)

◆ show_crash_screen_and_hang()

void show_crash_screen_and_hang ( void  )

Variable Documentation

◆ crashFont

u8 crashFont[]

◆ exceptionRegContext

u32 exceptionRegContext[]

◆ fbAddress

u16* fbAddress = NULL

◆ fbFillColor

u16 fbFillColor = 0xFFFF

◆ fbShadeColor

u16 fbShadeColor = 0x0000

◆ nAssertLine

int nAssertLine

◆ nAssertStopProgram

int nAssertStopProgram

◆ pAssertExpression

char* pAssertExpression

◆ pAssertFile

char* pAssertFile

◆ szErrCodes

const char* szErrCodes[]
Initial value:
= {
"INTERRUPT",
"TLB MOD",
"UNMAPPED LOAD ADDR",
"UNMAPPED STORE ADDR",
"BAD LOAD ADDR",
"BAD STORE ADDR",
"BUS ERR ON INSTR FETCH",
"BUS ERR ON LOADSTORE",
"SYSCALL",
"BREAKPOINT",
"UNKNOWN INSTR",
"COP UNUSABLE",
"ARITHMETIC OVERFLOW",
"TRAP EXC",
"VIRTUAL COHERENCY INSTR",
"FLOAT EXC",
}

◆ szGPRegisters1

const char* szGPRegisters1[]
Initial value:
= { "R0", "AT", "V0", "V1", "A0", "A1", "A2", "A3",
"T0", "T1", "T2", "T3", "T4", "T5", "T6", NULL }
#define NULL
Definition: mbi.h:101

◆ szGPRegisters2

const char* szGPRegisters2[]
Initial value:
= { "T7", "S0", "S1", "S2", "S3", "S4",
"S5", "S6", "S7", "T8", "T9",
"GP", "SP", "FP", "RA", NULL }
#define NULL
Definition: mbi.h:101