cscg22-gearboy

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

types.h (1945B)


      1/** @file asm/z80/types.h
      2    @anchor file_asm_z80_types_h
      3    Types definitions for the gb.
      4*/
      5#ifndef ASM_Z80_TYPES_INCLUDE
      6#define ASM_Z80_TYPES_INCLUDE
      7
      8#ifndef __PORT_z80
      9  #error z80 only.
     10#endif
     11
     12#ifdef __SDCC
     13
     14#define Z88DK_CALLEE __sdcccall(0) __z88dk_callee
     15#define Z88DK_FASTCALL __z88dk_fastcall
     16
     17#define NONBANKED       __nonbanked /**< Placed in the non-banked lower 16K region (bank 0), regardless of the bank selected by it's source file. */
     18#define BANKED          __banked /**< The function will use banked sdcc calls, and is placed in the bank selected by it's source file (or compiler switches). */
     19
     20/**  Use to create a block of of code which should execute with interrupts temporarily turned off.
     21
     22    __Do not__ use @ref CRITICAL and @ref INTERRUPT attributes for a
     23    function added via add_VBL() (or LCD, etc). The attributes
     24    are only required when constructing a bare jump from the
     25    interrupt vector itself.
     26
     27    @see enable_interrupts, disable_interrupts
     28*/
     29#define CRITICAL        __critical
     30
     31/**  Indicate to the compiler the function will be used as an interrupt handler.
     32
     33    __Do not__ use @ref CRITICAL and @ref INTERRUPT attributes for a
     34    function added via add_VBL() (or LCD, etc). The attributes
     35    are only required when constructing a bare jump from the
     36    interrupt vector itself.
     37*/
     38#define INTERRUPT       __interrupt
     39
     40#else
     41
     42#define Z88DK_CALLEE
     43#define Z88DK_FASTCALL
     44
     45#endif
     46
     47/** Signed eight bit.
     48 */
     49typedef signed char     INT8;
     50/** Unsigned eight bit.
     51 */
     52typedef unsigned char 	UINT8;
     53/** Signed sixteen bit.
     54 */
     55typedef signed int      INT16;
     56/** Unsigned sixteen bit.
     57 */
     58typedef unsigned int  	UINT16;
     59/** Signed 32 bit.
     60 */
     61typedef signed long     INT32;
     62/** Unsigned 32 bit.
     63 */
     64typedef unsigned long 	UINT32;
     65
     66#ifndef __SIZE_T_DEFINED
     67#define __SIZE_T_DEFINED
     68typedef unsigned int	size_t;
     69#endif
     70
     71/** Returned from clock
     72    @see clock
     73*/
     74typedef unsigned int	clock_t;
     75
     76#endif