papermario
Decompilation of Paper Mario
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Loading...
Searching...
No Matches
crash_screen.c File Reference

Data Structures

struct  CrashScreen
 

Functions

void crash_screen_sleep (s32 ms)
 
void crash_screen_draw_rect (s32 x, s32 y, s32 width, s32 height)
 
void crash_screen_draw_glyph (s32 x, s32 y, s32 glyph)
 
char * crash_screen_copy_to_buf (char *dest, const char *src, size_t size)
 
void crash_screen_printf (s32 x, s32 y, const char *fmt,...)
 
void crash_screen_print_fpr (s32 x, s32 y, s32 regNum, void *addr)
 
void crash_screen_print_fpcsr (u32 value)
 
void crash_screen_draw (OSThread *faultedThread)
 
OSThread * crash_screen_get_faulted_thread (void)
 
void crash_screen_thread_entry (void *unused)
 
void crash_screen_set_draw_info (u16 *frameBufPtr, s16 width, s16 height)
 
void crash_screen_init (void)
 
void crash_screen_printf_with_bg (s16 x, s16 y, const char *fmt,...)
 

Variables

BSS CrashScreen gCrashScreen
 
u8 gCrashScreencharToGlyph [128]
 
u32 gCrashScreenFont []
 
const char * gFaultCauses [18]
 
const char * gFPCSRFaultCauses [6]
 

Data Structure Documentation

◆ CrashScreen

struct CrashScreen
Data Fields
u16 * frameBuf
u16 height
OSMesg mesg
OSMesgQueue queue
char stack[0x800]
OSThread thread
u16 width

Function Documentation

◆ crash_screen_copy_to_buf()

char * crash_screen_copy_to_buf ( char * dest,
const char * src,
size_t size )

◆ crash_screen_draw()

void crash_screen_draw ( OSThread * faultedThread)

◆ crash_screen_draw_glyph()

void crash_screen_draw_glyph ( s32 x,
s32 y,
s32 glyph )

◆ crash_screen_draw_rect()

void crash_screen_draw_rect ( s32 x,
s32 y,
s32 width,
s32 height )

◆ crash_screen_get_faulted_thread()

OSThread * crash_screen_get_faulted_thread ( void )

◆ crash_screen_init()

void crash_screen_init ( void )

Referenced by boot_main().

◆ crash_screen_print_fpcsr()

void crash_screen_print_fpcsr ( u32 value)

Referenced by crash_screen_draw().

◆ crash_screen_print_fpr()

void crash_screen_print_fpr ( s32 x,
s32 y,
s32 regNum,
void * addr )

Referenced by crash_screen_draw().

◆ crash_screen_printf()

void crash_screen_printf ( s32 x,
s32 y,
const char * fmt,
... )

◆ crash_screen_printf_with_bg()

void crash_screen_printf_with_bg ( s16 x,
s16 y,
const char * fmt,
... )

◆ crash_screen_set_draw_info()

void crash_screen_set_draw_info ( u16 * frameBufPtr,
s16 width,
s16 height )

Referenced by gfx_draw_frame().

◆ crash_screen_sleep()

void crash_screen_sleep ( s32 ms)

Referenced by crash_screen_draw().

◆ crash_screen_thread_entry()

void crash_screen_thread_entry ( void * unused)

Referenced by crash_screen_init().

Variable Documentation

◆ gCrashScreen

◆ gCrashScreencharToGlyph

u8 gCrashScreencharToGlyph[128]
Initial value:
= {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, -1, 43, -1, -1, 37, 38, -1, 42,
-1, 39, 44, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 36, -1, -1, -1, -1, 40, -1, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1,
}

Referenced by crash_screen_printf(), and crash_screen_printf_with_bg().

◆ gCrashScreenFont

u32 gCrashScreenFont[]
Initial value:
= {
0x70871C30, 0x8988A250, 0x88808290, 0x88831C90, 0x888402F8, 0x88882210, 0x71CF9C10, 0xF9CF9C70, 0x8228A288,
0xF200A288, 0x0BC11C78, 0x0A222208, 0x8A222288, 0x71C21C70, 0x23C738F8, 0x5228A480, 0x8A282280, 0x8BC822F0,
0xFA282280, 0x8A28A480, 0x8BC738F8, 0xF9C89C08, 0x82288808, 0x82088808, 0xF2EF8808, 0x82288888, 0x82288888,
0x81C89C70, 0x8A08A270, 0x920DA288, 0xA20AB288, 0xC20AAA88, 0xA208A688, 0x9208A288, 0x8BE8A270, 0xF1CF1CF8,
0x8A28A220, 0x8A28A020, 0xF22F1C20, 0x82AA0220, 0x82492220, 0x81A89C20, 0x8A28A288, 0x8A28A288, 0x8A289488,
0x8A2A8850, 0x894A9420, 0x894AA220, 0x70852220, 0xF8011000, 0x08020800, 0x10840400, 0x20040470, 0x40840400,
0x80020800, 0xF8011000, 0x70800000, 0x88822200, 0x08820400, 0x108F8800, 0x20821000, 0x00022200, 0x20800020,
0x00000000,
}

Referenced by crash_screen_draw_glyph().

◆ gFaultCauses

const char* gFaultCauses[18]
Initial value:
= {
"Interrupt",
"TLB modification",
"TLB exception on load",
"TLB exception on store",
"Address error on load",
"Address error on store",
"Bus error on inst.",
"Bus error on data",
"System call exception",
"Breakpoint exception",
"Reserved instruction",
"Coprocessor unusable",
"Arithmetic overflow",
"Trap exception",
"Virtual coherency on inst.",
"Floating point exception",
"Watchpoint exception",
"Virtual coherency on data",
}

Referenced by crash_screen_draw().

◆ gFPCSRFaultCauses

const char* gFPCSRFaultCauses[6]
Initial value:
= {
"Unimplemented operation",
"Invalid operation",
"Division by zero",
"Overflow",
"Underflow",
"Inexact operation",
}

Referenced by crash_screen_print_fpcsr().