#include <PA_IPC.h>
#include <arm9/as_lib9.h>
#include <arm9/PA_Sound.h>
#include <nds.h>
#include <nds/memory.h>
#include <nds/bios.h>
#include <malloc.h>
#include "../PA_Shared.h"
#include <stdarg.h>
#include <string.h>
Structures de données | |
struct | RTC |
struct | infos |
Macros | |
#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 | DMA_CopyEx(type, source, dest, count, mode) {DMA_SRC(type) = (u32)source; DMA_DEST(type) = (u32)dest; DMA_CR(type) = (count) | (mode);} |
#define | BACKLIGHT(screen) BIT(2+screen) |
#define | ALWAYSINLINE __attribute__((always_inline)) static inline |
#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 | PA_LidClosed() (PA_IPC_compat->buttons>>7) |
Vérifie si la DS est fermée. Renvoie 0 si ouverte, 1 si fermée. | |
#define | PA_CloseLidSound(close_sound) |
Vérifie si la DS est fermée. Si fermée, ca met en pause la DS et joue un son. | |
#define | PA_CloseLidSound2(close_sound, open_sound) |
Vérifie si la DS est fermée. Si fermée, ca met en pause la DS et joue un son. | |
#define | PA_WaitFor(something) {PA_WaitForVBL(); while(!(something)){PA_WaitForVBL(); }} |
Attendre un événement précis... | |
Fonctions | |
void | PA_WaitForVBL (void) |
Attendre le vbl... | |
void | PAWaitForVBL (void) |
void | PA_PowerOff () |
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 la lib... Doit etre placé au début de main(). | |
void | PA_Init2D (void) |
Remet en mode 2D après avoir utilisé la 3D. | |
void | PA_SetVideoMode (u8 screen, u8 mode) |
Changer de mode video... A utiliser avec précaution. | |
void | PA_UpdateUserInfo (void) |
Met à jour les infos sur l'utilisateur... C'est fait automatiquement dans PA_Init. On peut ensuite récupérer toutes les infos avec PA_UserInfo.Color (couleur favorite), .BdayDay, .BdayMonth, .AlarmHour, .AlarmMinute, .Name, .NameLength, .Message, .MessageLength, .Language. | |
void | PA_UpdateRTC (void) |
Met à jour les infos sur l'heure et la date. C'est automatiquement mis à jour dans le VBL PA... On récupère les infos avec PA_RTC.Minutes, .Hour, .Seconds, .Day, .Month, et .Year. | |
void | PA_SwitchScreens (void) |
Echange les écrans du haut et du bas. | |
void | PA_SetAutoCheckLid (u8 on) |
Vérifie automatiquement si la DS est fermée dans PA_WaitForVBL. | |
u8 | PA_CheckLid (void) |
Vérifie si la DS est fermée. Si fermée, ca met en pause la DS et renvoie 1. | |
void | PA_SetScreenLight (u8 screen, u8 light) |
Allumer ou eteindre la lumière d'un écran. | |
void | PA_SetLedBlink (u8 blink, u8 speed) |
Régler le clignotement de la led. | |
void | PA_SetDSLBrightness (u8 level) |
Régler le niveau de lumière de la DS Lite. | |
bool | PA_Locate (char *start, char *target, bool isDir, int depth, char *result) |
Find a directory in the file system within a given depth. | |
void | PA_Nothing (void) |
Variables | |
u8 | PA_Screen |
RTC | PA_RTC |
s16 | PA_ScreenSpace |
u8 | pa_checklid |
u32 | Blank [130000 >>2] |
volatile PA_IPCType | PA_IPC |
const s16 | PA_SIN [512] |
infos | PA_UserInfo |
u8 | PA_ExtPal [2][2] |
Contains prototypes and macros... for the arm9
#define _REG16 *(volatile u16 *) |
#define _REG32 *(volatile u32 *) |
#define _REG8 *(volatile u16 *) |
#define ALWAYSINLINE __attribute__((always_inline)) static inline |
#define BACKLIGHT | ( | screen | ) | BIT(2+screen) |
#define BG_GFX1 0x6000000 |
#define BG_GFX2 0x6200000 |
#define CODE_IN_EWRAM __attribute__ ((section (".ewram"), long_call)) |
#define CODE_IN_IWRAM __attribute__ ((section (".iwram"), long_call)) |
#define DMA_16 0x00000000 |
#define DMA_16NOW (DMA_ON | DMA_NOW | DMA_16) |
#define DMA_32 0x04000000 |
#define DMA_32NOW (DMA_ON | DMA_NOW | DMA_32) |
#define DMA_Clear | ( | dest, | |||
count, | |||||
mode | ) | {REG_DMA3SRC = (u32)Blank; REG_DMA3DST = (u32)dest; REG_DMA3CNT = (count) | (mode);} |
#define DMA_Copy | ( | source, | |||
dest, | |||||
count, | |||||
mode | ) | {REG_DMA3SRC = (u32)source; REG_DMA3DST = (u32)dest; REG_DMA3CNT = (count) | (mode);} |
#define DMA_CopyEx | ( | type, | |||
source, | |||||
dest, | |||||
count, | |||||
mode | ) | {DMA_SRC(type) = (u32)source; DMA_DEST(type) = (u32)dest; DMA_CR(type) = (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 DMA_NOW 0x00000000 |
#define DMA_ON 0x80000000 |
#define IN_EWRAM __attribute__ ((section (".ewram"))) |
#define IN_IWRAM __attribute__ ((section (".iwram"))) |
#define N_HBLS 263 |
#define PACKED __attribute__ ((packed)) |
#define REG_DMA3CNT *(volatile u32*)0x040000DC |
#define REG_DMA3DST *(volatile u32*)0x040000D8 |
#define REG_DMA3SRC *(volatile u32*)0x040000D4 |
#define SIZEOF_16BIT | ( | x | ) | (sizeof(x)>>1) |
#define SIZEOF_32BIT | ( | x | ) | (sizeof(x)>>2) |
#define SIZEOF_8BIT | ( | x | ) | (sizeof(x)) |
#define SPRITE_GFX1 0x6400000 |
#define SPRITE_GFX2 0x6600000 |
#define SWITCH_SCREENS (1<<15) |
void PA_jpeg_BltImage | ( | char * | name, | |
u16 * | vram, | |||
int | output_width, | |||
int | output_height | |||
) |
void PA_jpeg_GetImageSize | ( | char * | name, | |
int * | width, | |||
int * | height | |||
) |
void PA_Nothing | ( | void | ) |
void PA_PowerOff | ( | ) | [inline] |
void PAWaitForVBL | ( | void | ) | [inline] |
u32 Blank[130000 >>2] |
u8 pa_checklid |
volatile PA_IPCType PA_IPC |
u8 PA_Screen |
s16 PA_ScreenSpace |
const s16 PA_SIN[512] |