head 1.1; branch 1.1.1; access ; symbols start:1.1.1.1 PAlibDoc:1.1.1; locks ; strict; comment @# @; 1.1 date 2005.11.02.08.30.22; author jandujar; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2005.11.02.08.30.22; author jandujar; state Exp; branches ; next ; desc @@ 1.1 log @Initial revision @ text @
Go to the source code of this file.
Defines | |
#define | REG_IME *(u32*)0x04000208 |
#define | REG_IE *(u32*)0x04000210 |
#define | REG_IF *(u32*)0x04000214 |
#define | REG_INTERRUPT IRQ_HANDLER |
#define | REG_DISPSTAT DISP_SR |
#define | REG_VCOUNT _REG16(0x04000006) |
#define | INTVBLANK 0x0001 |
#define | INTHBLANK 0x0002 |
#define | INTVCOUNT 0x0004 |
#define | INTTIMER0 0x0008 |
#define | INTTIMER1 0x0010 |
#define | INTTIMER2 0x0020 |
#define | INTTIMER3 0x0040 |
#define | INTCOM 0x0080 |
#define | INTDMA0 0x0100 |
#define | INTDMA1 0x0200 |
#define | INTDMA2 0x0400 |
#define | INTDMA3 0x0800 |
#define | INTBUTTON 0x1000 |
#define | INTCART 0x2000 |
#define | INT_VBLANK 0 |
#define | INT_HBLANK 1 |
#define | INT_VCOUNT 2 |
#define | INT_TIMER0 3 |
#define | INT_TIMER1 4 |
#define | INT_TIMER2 5 |
#define | INT_TIMER3 6 |
#define | INT_COM 7 |
#define | INT_DMA0 8 |
#define | INT_DMA1 9 |
#define | INT_DMA2 10 |
#define | INT_DMA3 11 |
#define | INT_KEY 12 |
#define | INT_CART 13 |
#define | ENABLE_VBLANK 8 |
#define | ENABLE_HBLANK 16 |
#define | ENABLE_VCOUNT 32 |
#define | TIMER0COUNT *(volatile u16 *)(0x04000100) |
#define | TIMER0CNT *(volatile u16 *)(0x04000102) |
#define | TIMER0CNT_TIMER_START (TIMER0CNT |= 0x0080) |
#define | TIMER0CNT_IRQ_ENABLE (TIMER0CNT |= 0x0040) |
#define | PA_EnableTimer0() {TIMER0CNT_TIMER_START; TIMER0CNT_IRQ_ENABLE;} |
#define | TIMER0CNT_TIMER_STOP (TIMER0CNT &= 0xFF7F) |
#define | TIMER0CNT_IRQ_DISABLE (TIMER0CNT &= 0xFFBF) |
#define | PA_DisableTimer0() {TIMER0CNT_TIMER_STOP; TIMER0CNT_IRQ_DISABLE;} |
#define | TIMER1COUNT *(volatile u16 *)(0x04000104) |
#define | TIMER1CNT *(volatile u16 *)(0x04000106) |
#define | TIMER1CNT_TIMER_START (TIMER1CNT |= 0x0080) |
#define | TIMER1CNT_IRQ_ENABLE (TIMER1CNT |= 0x0040) |
#define | PA_EnableTimer1() {TIMER1CNT_TIMER_START; TIMER1CNT_IRQ_ENABLE;} |
#define | TIMER1CNT_TIMER_STOP (TIMER1CNT &= 0xFF7F) |
#define | TIMER1CNT_IRQ_DISABLE (TIMER1CNT &= 0xFFBF) |
#define | PA_DisableTimer1() {TIMER1CNT_TIMER_STOP; TIMER1CNT_IRQ_DISABLE;} |
#define | TIMER2COUNT *(volatile u16 *)(0x04000108) |
#define | TIMER2CNT *(volatile u16 *)(0x0400010A) |
#define | TIMER2CNT_TIMER_START (TIMER2CNT |= 0x0080) |
#define | TIMER2CNT_IRQ_ENABLE (TIMER2CNT |= 0x0040) |
#define | PA_EnableTimer2() {TIMER2CNT_TIMER_START; TIMER2CNT_IRQ_ENABLE;} |
#define | TIMER2CNT_TIMER_STOP (TIMER2CNT &= 0xFF7F) |
#define | TIMER2CNT_IRQ_DISABLE (TIMER2CNT &= 0xFFBF) |
#define | PA_DisableTimer2() {TIMER2CNT_TIMER_STOP; TIMER2CNT_IRQ_DISABLE;} |
#define | TIMER3COUNT *(volatile u16 *)(0x0400010C) |
#define | TIMER3CNT *(volatile u16 *)(0x0400010E) |
#define | TIMER3CNT_TIMER_START (TIMER3CNT |= 0x0080) |
#define | TIMER3CNT_IRQ_ENABLE (TIMER3CNT |= 0x0040) |
#define | PA_EnableTimer3() {TIMER3CNT_TIMER_START; TIMER3CNT_IRQ_ENABLE;} |
#define | TIMER3CNT_TIMER_STOP (TIMER3CNT &= 0xFF7F) |
#define | TIMER3CNT_IRQ_DISABLE (TIMER3CNT &= 0xFFBF) |
#define | PA_DisableTimer3() {TIMER3CNT_TIMER_STOP; TIMER3CNT_IRQ_DISABLE;} |
#define | PA_InitVBL() PA_StartInt(INT_VBLANK, PA_vblFunc) |
Intiate a basic VBL function. Very usefull for unexperienced users, it updates the OAM (sprites), the Keypad, and the Stylus input every frame. No need to use PA_UpdateOAM, PA_UpdatePad, PA_UpdateStylus, and PA_UpdateRTC ! | |
#define | PA_GetVcount() (REG_VCOUNT&511) |
Get the vertical line count... | |
Typedefs | |
typedef void(* | funcpointer )(void) |
Functions | |
void | interruptfunction (void) |
void | PA_ResetInterrupts (void) |
Reset the interrupt system. Disables all interrupts. | |
void | PA_StartInt (u8 inter, funcpointer interfunc) |
Initiate a given interrupt. | |
void | PA_StopInt (u8 inter) |
Initiate a given interrupt. | |
void | PA_vblFunc (void) |
The standard PAlib VBL function... This will update the pad, the stylus, the RTC, etc... You could/should use this function if you do your own custom VBL... | |
Variables | |
volatile bool | PA_Newframe |
volatile bool | PA_vblok |
u32 | PA_CPU |
u32 | PA_MaxCPU |
u32 | PA_lines |
u8 | PA_VBLCount |
u8 | PA_nVBLs |
funcpointer | interruptfunc [14] |
Current working interrupts are VBlank, HBlank, VCount, and Timers