cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

crash_handler.h (639B)


      1/** @file gb/crash_handler.h
      2
      3    When crash_handler.h is included, a crash dump screen
      4    will be displayed if the CPU executes uninitalized
      5    memory (with a value of 0xFF, the opcode for RST 38).
      6    A handler is installed for RST 38 that calls
      7    @ref __HandleCrash().
      8
      9    \code{.c}
     10    #include <gb/crash_handler.h>
     11    \endcode
     12
     13    Also see the `crash` example project included with gbdk.
     14*/
     15#ifndef __CRASH_HANDLER_INCLUDE
     16#define __CRASH_HANDLER_INCLUDE
     17
     18/** Display the crash dump screen.
     19
     20    See the intro for this file for more details.
     21*/
     22void __HandleCrash();
     23static void * __CRASH_HANDLER_INIT = &__HandleCrash;
     24
     25#endif