34 #ifndef SNES_INTERRUPT_INCLUDE
35 #define SNES_INTERRUPT_INCLUDE
39 extern void *nmi_handler;
42 #define INT_VBLENABLE (1 << 7)
44 #define INT_HVIRQ_H (1 << 4)
46 #define INT_HVIRQ_V (1 << 5)
48 #define INT_HVIRQ_HV (2 << 4)
50 #define INT_JOYPAD_ENABLE (1)
52 #define VBL_READY (1 << 7)
54 #define HBL_READY (1 << 6)
71 #define REG_NMITIMEN (*(vuint8 *)0x4200)
108 #define REG_RDNMI (*(vuint8 *)0x4210)
125 #define REG_TIMEUP (*(vuint8 *)0x4211)
140 #define REG_HVBJOY (*(vuint8 *)0x4212)
150 #define nmiSet(handler) nmi_handler = handler;
164 #define WaitVBLFlag \
165 while ((REG_HVBJOY & VBL_READY)) \
167 while (!(REG_HVBJOY & VBL_READY)) \
void WaitForVBlank(void)
Wait for vblank interrupt
void WaitNVBlank(u16 ntime)
Wait for vblank interrupt ntime times
Custom types used by libsnes.