14#define PROCESS_PALETTE_FADING (1 << 0)
15#define PROCESS_BITMAP_TASK (1 << 1)
16#define PROCESS_DMA_TASK (1 << 2)
17#define PROCESS_XGM_TASK (1 << 3)
18#define PROCESS_VDP_SCROLL_TASK (1 << 4)
19#define PROCESS_XGM2_FADE_TASK (1 << 5)
22#define ROM_ALIGN_BIT 17
23#define ROM_ALIGN (1 << ROM_ALIGN_BIT)
24#define ROM_ALIGN_MASK (ROM_ALIGN - 1)
27#define ROM_END (((u32) &_stext) + ((u32) &_sdata))
28#define ROM_SIZE ((ROM_END + ROM_ALIGN_MASK) & (~ROM_ALIGN_MASK))
34#define FORCE_INLINE inline __attribute__((always_inline))
40#define NO_INLINE __attribute__((noinline))
46#define RAM_SECT __attribute__((section(".ramprog")))
52#define HINTERRUPT_CALLBACK __attribute__((interrupt)) void
73 char modem_support[12];
96#if LEGACY_ERROR_HANDLER
103extern VoidCallback *busErrorCB;
110extern VoidCallback *addressErrorCB;
117extern VoidCallback *illegalInstCB;
124extern VoidCallback *zeroDivideCB;
131extern VoidCallback *chkInstCB;
138extern VoidCallback *trapvInstCB;
145extern VoidCallback *privilegeViolationCB;
152extern VoidCallback *traceCB;
159extern VoidCallback *line1x1xCB;
166extern VoidCallback *errorExceptionCB;
175extern VoidCallback *
intCB;
u16 SYS_getAndSetInterruptMaskLevel(u16 value)
Set the interrupt mask level to given value and return previous level.
void SYS_enableInts(void)
Re-enable interrupts (Vertical, Horizontal and External).
Definition sys.c:829
void SYS_disableInts(void)
Disable interrupts (Vertical, Horizontal and External).
Definition sys.c:801
VoidCallback * intCB
Level interrupt callback.
void SYS_hardReset(void)
Hard reset.
void SYS_assertReset(void)
Assert reset.
void SYS_setHIntCallback(VoidCallback *CB)
Set 'Horizontal Interrupt' callback method (need to be prefixed by HINTERRUPT_CALLBACK).
Definition sys.c:869
bool SYS_doVBlankProcess(void)
Wait for start of VBlank and do all the VBlank processing (DMA transfers, XGM driver tempo,...
Definition sys.c:655
void SYS_showFrameLoad(bool mean)
Show a cursor indicating current frame load level in scanline (top = 0% load, bottom = 100% load)
Definition sys.c:887
u16 SYS_isPAL(void)
Return != 0 if we are on a PAL system.
Definition sys.c:927
void SYS_setInterruptMaskLevel(u16 value)
Set interrupt mask level.
u16 SYS_computeChecksum(void)
Computes full ROM checksum and return it. The checksum is a custom fast 32 bit checksum converted to...
Definition sys.c:1012
u32 SYS_getFPS(void)
Returns number of Frame Per Second.
Definition sys.c:933
u16 SYS_getCPULoad(void)
Return an estimation of CPU frame load (in %)
Definition sys.c:1006
fix32 SYS_getFPSAsFloat(void)
Returns number of Frame Per Second (fix32 form).
Definition sys.c:951
void SYS_setExtIntCallback(VoidCallback *CB)
Set External interrupt callback method.
Definition sys.c:875
void SYS_reset(void)
Soft reset.
void SYS_setVBlankCallback(VoidCallback *CB)
Set user 'Vertical Blank' callback method.
Definition sys.c:857
bool SYS_nextFrame(void)
End the current frame (alias for SYS_doVBlankProcess(void)).
Definition sys.c:796
void SYS_hideFrameLoad(void)
Hide the frame load cursor previously enabled using SYS_showFrameLoad() method.
Definition sys.c:904
VBlankProcessTime
Define at which period to do VBlank process (see SYS_doVBlankProcess() method)
Definition sys.h:90
@ ON_VBLANK
Definition sys.h:92
@ ON_VBLANK_START
Definition sys.h:93
bool SYS_doVBlankProcessEx(VBlankProcessTime processTime)
Do all the VBlank processing (DMA transfers, XGM driver tempo, Joypad pooling..)
Definition sys.c:660
void SYS_setVIntCallback(VoidCallback *CB)
Set 'Vertical Interrupt' callback method, prefer SYS_setVBlankCallback(..) when possible.
Definition sys.c:863
bool SYS_getShowFrameLoad()
Returns TRUE if frame load is currently displayed, FALSE otherwise.
Definition sys.c:882
void SYS_die(char *err,...)
Die with the specified error message. Program execution is interrupted. Accepts a list of strings....
Definition sys.c:1051
bool SYS_isInVInt(void)
Return TRUE if we are in the V-Interrupt process.
Definition sys.c:917
u16 SYS_getInterruptMaskLevel(void)
Return current interrupt mask level.
bool SYS_isChecksumOk(void)
Returns TRUE if ROM checksum is ok (correspond to rom_head.checksum field)
Definition sys.c:1042
u16 SYS_isNTSC(void)
Return != 0 if we are on a NTSC system.
Definition sys.c:922
unsigned long u32
Definition types.h:105
unsigned short u16
Definition types.h:100
s32 fix32
Definition types.h:208