14#define PROCESS_PALETTE_FADING (1 << 0)
15#define PROCESS_BITMAP_TASK (1 << 1)
16#define PROCESS_DMA_TASK (1 << 2)
17#define PROCESS_VDP_SCROLL_TASK (1 << 3)
20#define ROM_ALIGN_BIT 17
21#define ROM_ALIGN (1 << ROM_ALIGN_BIT)
22#define ROM_ALIGN_MASK (ROM_ALIGN - 1)
25#define ROM_END (((u32) &_stext) + ((u32) &_sdata))
26#define ROM_SIZE ((ROM_END + ROM_ALIGN_MASK) & (~ROM_ALIGN_MASK))
32#define FORCE_INLINE inline __attribute__((always_inline))
38#define NO_INLINE __attribute__((noinline))
44#define RAM_SECT __attribute__((section(".ramprog")))
50#define HINTERRUPT_CALLBACK __attribute__((interrupt)) void
56#define PACKED __attribute__((__packed__))
77 char modem_support[12];
100#if LEGACY_ERROR_HANDLER
107extern VoidCallback *busErrorCB;
114extern VoidCallback *addressErrorCB;
121extern VoidCallback *illegalInstCB;
128extern VoidCallback *zeroDivideCB;
135extern VoidCallback *chkInstCB;
142extern VoidCallback *trapvInstCB;
149extern VoidCallback *privilegeViolationCB;
156extern VoidCallback *traceCB;
163extern VoidCallback *line1x1xCB;
170extern VoidCallback *errorExceptionCB;
179extern VoidCallback *
intCB;
u16 SYS_getAndSetInterruptMaskLevel(u16 value)
Set the interrupt mask level to given value and return previous level.
u32 SYS_getStackPointer()
Returns the current value of the stack pointer register (A7)
void SYS_enableInts(void)
Re-enable interrupts (Vertical, Horizontal and External).
Definition sys.c:802
void SYS_disableInts(void)
Disable interrupts (Vertical, Horizontal and External).
Definition sys.c:774
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:842
bool SYS_doVBlankProcess(void)
Wait for start of VBlank and do all the VBlank processing (DMA transfers, XGM driver tempo,...
Definition sys.c:634
void SYS_showFrameLoad(bool mean)
Show a cursor indicating current frame load level in scanline (top = 0% load, bottom = 100% load)
Definition sys.c:860
u16 SYS_isPAL(void)
Return != 0 if we are on a PAL system.
Definition sys.c:900
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:985
u32 SYS_getFPS(void)
Returns number of Frame Per Second.
Definition sys.c:906
u16 SYS_getCPULoad(void)
Return an estimation of CPU frame load (in %)
Definition sys.c:979
fix32 SYS_getFPSAsFloat(void)
Returns number of Frame Per Second (fix32 form).
Definition sys.c:924
void SYS_setExtIntCallback(VoidCallback *CB)
Set External interrupt callback method.
Definition sys.c:848
void SYS_reset(void)
Soft reset.
void SYS_setVBlankCallback(VoidCallback *CB)
Set user 'Vertical Blank' callback method.
Definition sys.c:830
bool SYS_nextFrame(void)
End the current frame (alias for SYS_doVBlankProcess(void)).
Definition sys.c:769
void SYS_hideFrameLoad(void)
Hide the frame load cursor previously enabled using SYS_showFrameLoad() method.
Definition sys.c:877
VBlankProcessTime
Define at which period to do VBlank process (see SYS_doVBlankProcess() method)
Definition sys.h:94
@ ON_VBLANK
Definition sys.h:96
@ ON_VBLANK_START
Definition sys.h:97
bool SYS_doVBlankProcessEx(VBlankProcessTime processTime)
Do all the VBlank processing (DMA transfers, XGM driver tempo, Joypad pooling..)
Definition sys.c:639
void SYS_setVIntCallback(VoidCallback *CB)
Set 'Vertical Interrupt' callback method, prefer SYS_setVBlankCallback(..) when possible.
Definition sys.c:836
bool SYS_getShowFrameLoad()
Returns TRUE if frame load is currently displayed, FALSE otherwise.
Definition sys.c:855
void SYS_die(char *err,...)
Die with the specified error message. Program execution is interrupted. Accepts a list of strings....
Definition sys.c:1024
bool SYS_isInVInt(void)
Return TRUE if we are in the V-Interrupt process.
Definition sys.c:890
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:1015
u16 SYS_isNTSC(void)
Return != 0 if we are on a NTSC system.
Definition sys.c:895
unsigned long u32
Definition types.h:105
unsigned short u16
Definition types.h:100
s32 fix32
Definition types.h:215