|
Mario Kart 64
|
#include <ultra64.h>#include <macros.h>#include <types.h>#include <config.h>#include <stdarg.h>#include <string.h>#include "crash_screen.h"#include "main.h"#include "textures/crash_screen/crash_screen_font.ia1.inc.c"Macros | |
| #define | DRAW_CODE 0xFFFF |
| #define | CHARACTER_DASH 16 |
| #define | BLACK_COLOUR 0x0001 |
Functions | |
| void | osSetEventMesg (OSEvent, OSMesgQueue *, OSMesg) |
| s32 | osRecvMesg (OSMesgQueue *, OSMesg *, s32) |
| void | crash_screen_draw_glyph (u16 *framebuffer, s32 x, s32 y, s32 glyph) |
| void | crash_screen_draw_info (u16 *framebuffer, OSThread *thread) |
| OSThread * | get_faulted_thread (void) |
| void | thread9_crash_screen (UNUSED void *arg0) |
| Retrieves faulted thread and displays debug info after the user inputs the button sequence. Button sequence: L, Up, Left, Down, Right, R, L, B, A. | |
| void | crash_screen_set_framebuffer (u16 *framebuffer) |
| void | thread9_crash_screen (void *) |
| void | create_debug_thread (void) |
| void | start_debug_thread (void) |
Variables | |
| OSThread | D_80162790 |
| ALIGNED8 u8 | gDebugThreadStack [0x400] |
| OSMesgQueue | D_80162D40 |
| OSMesg | D_80162D58 |
| u16 * | pFramebuffer |
| s32 | sButtonSequenceIndex |
| s32 | sCounter = 0 |
| u8 | crashScreenFont [][8] |
| u16 | sCrashScreenButtonSequence [] |
| #define BLACK_COLOUR 0x0001 |
Draws three black boxes then prints crash info in the following format: Line 1: threadId - address of faulted instruction - error code Line 2: Address in the return address register Line 3: Machine code of faulted instruction
The R4300i manual discusses exceptions in more depth.
| framebuffer | |
| faulted | thread |
| #define CHARACTER_DASH 16 |
| #define DRAW_CODE 0xFFFF |
Retrieves faulted thread and displays debug info after the user inputs the button sequence. Button sequence: L, Up, Left, Down, Right, R, L, B, A.
| u8 crashScreenFont[][8] |
| OSThread D_80162790 |
| OSMesgQueue D_80162D40 |
| OSMesg D_80162D58 |
| u16* pFramebuffer |
| s32 sButtonSequenceIndex |
| s32 sCounter = 0 |
| u16 sCrashScreenButtonSequence[] |