PAlib: PA9.h File Reference

Main Page | Modules | File List | Globals | Search for

# PA9.h File Reference

Contains prototypes and macros... for the arm9. More...

Go to the source code of this file.

## Data Structures

struct | RTC
struct | infos

## Defines

#define | BG_GFX1 0x6000000
#define | BG_GFX2 0x6200000
#define | SPRITE_GFX1 0x6400000
#define | SPRITE_GFX2 0x6600000
#define | REG_DMA3SRC *(volatile u32*)0x040000D4
#define | REG_DMA3DST *(volatile u32*)0x040000D8
#define | REG_DMA3CNT *(volatile u32*)0x040000DC
#define | DMA_ON 0x80000000
#define | DMA_NOW 0x00000000
#define | DMA_16 0x00000000
#define | DMA_32 0x04000000
#define | DMA_16NOW (DMA_ON | DMA_NOW | DMA_16)
#define | DMA_32NOW (DMA_ON | DMA_NOW | DMA_32)
#define | DMA_Copy(source, dest, count, mode) {REG_DMA3SRC = (u32)source; REG_DMA3DST = (u32)dest; REG_DMA3CNT = (count) | (mode);}
#define | DMA_Clear(dest, count, mode) {REG_DMA3SRC = (u32)Blank; REG_DMA3DST = (u32)dest; REG_DMA3CNT = (count) | (mode);}
#define | DMA_Force(ulVal, dest, count, mode) {REG_DMA3SRC=(u32)&ulVal; REG_DMA3DST = (u32)dest; REG_DMA3CNT = (count) |(mode) | DMA_SRC_FIX;}
#define | BACKLIGHT(screen) BIT(2+screen)
#define | _REG8 *(volatile u16 *)
#define | _REG16 *(volatile u16 *)
#define | _REG32 *(volatile u32 *)
#define | SWITCH_SCREENS (1<<15)
#define | N_HBLS 263
#define | SIZEOF_8BIT(x) (sizeof(x))
#define | SIZEOF_16BIT(x) (sizeof(x)>>1)
#define | SIZEOF_32BIT(x) (sizeof(x)>>2)
#define | CODE_IN_IWRAM __attribute__ ((section (".iwram"), long_call))
#define | IN_IWRAM __attribute__ ((section (".iwram")))
#define | CODE_IN_EWRAM __attribute__ ((section (".ewram"), long_call))
#define | IN_EWRAM __attribute__ ((section (".ewram")))
#define | PACKED __attribute__ ((packed))
#define | INFO_COLOR *(u8*)0x027FFC82
#define | INFO_BDAY_MONTH *(u8*)0x027FFC83
#define | INFO_BDAY_DAY *(u8*)0x027FFC84
#define | INFO_ALARM_HOUR *(u8*)0x027FFCD2
#define | INFO_ALARM_MINUTE *(u8*)0x027FFCD3
#define | INFO_NAME *(u8*)0x027FFC86
#define | INFO_NAME_LENGTH *(u8*)0x027FFC9A
#define | INFO_MESSAGE *(u8*)0x027FFC9C
#define | INFO_MESSAGE_LENGTH *(u8*)0x027FFCD0
#define | INFO_LANGUAGE *(u8*)(0x027FFCE4)
#define | PA_LidClosed() (IPC->buttons>>7)
| Check if the DS is closed. Returns 0 if open, 1 if closed

## Functions

void | PA_WaitForVBL (void)
| Wait for the VBlank to occur
void | PA_jpeg_GetImageSize (char *name, int *width, int *height)
void | PA_jpeg_BltImage (char *name, u16 *vram, int output_width, int output_height)
void | PA_Init (void)
| Initialise the library. Must be used at the beginning or main()
void | PA_SetVideoMode (bool screen, u8 mode)
| Change the video mode... Use this with caution
void | PA_UpdateUserInfo (void)

Updates the user info. This is automatically done in PA_Init. You can then get any info with the following variables : PA_UserInfo.Color (favorite color), .BdayDay, .BdayMonth, .AlarmHour, .AlarmMinute, .Name, .NameLength, .Message, .MessageLength, .Language

void | PA_UpdateRTC (void)
| Updates the Real Time Clock, with info on the current date and hour. Automatically updated in the PA VBL... Get the info with PA_RTC.Minutes, .Hour, .Seconds, .Day, .Month, and .Year
void | PA_LoadSplash (void)
| Load a PlayerAdvance splash screen... It's always nice to give some credit ;)
void | PA_NeoSplash (void)
void | PA_SwitchScreens (void)
| Switch the bottom and top screens...
void | PA_InitCPUMeter ()
| BROKEN ----- Initialises the CPU Meter. The CPU value is saved in PA_CPU (and PA_MaxCPU for max usage)
bool | PA_CheckLid (void)
| Check if the DS is closed. If closed, it pauses the DS, and returns 1.
void | PA_Splash (void *tiles0, void *map0, void *tiles1, void *map1, s16 color0, s16 color1, s16 time)
| Splash screen function ! Load your own splash screen...
void | PA_SetScreenLight (bool screen, bool light)
| Set on or off the screen's light
void | PA_SetLedBlink (bool blink, bool speed)
| Set teh DS Led blinking
void | PA_Nothing (void)

## Variables

bool | PA_Screen
RTC | PA_RTC
s16 | PA_ScreenSpace
u32 | Blank [130000 >>2]
const s16 | PA_SIN [512]
infos | PA_UserInfo

## Detailed Description

Contains prototypes and macros... for the arm9.

Contains prototypes and macros... for the arm9