X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=psp%2Fpsp.h;h=7269863b9817fc7478517603d2bcc3dfc1b3579d;hb=960a8e2716349f9a7df6cca9b6e8e6b0724fe7ba;hp=07d4093c9493850f7a64da2c1f62b89fb9e9365f;hpb=2b90fc61e0907707c60bb01d97645b6afc22d4ae;p=libpicofe.git diff --git a/psp/psp.h b/psp/psp.h index 07d4093..7269863 100644 --- a/psp/psp.h +++ b/psp/psp.h @@ -1,3 +1,8 @@ +// (c) Copyright 2007 notaz, All rights reserved. +// Free for non-commercial use. + +// For commercial use, separate licencing terms must be obtained. + #include void psp_init(void); @@ -5,8 +10,27 @@ void psp_finish(void); void psp_msleep(int ms); -#define PSP_VRAM_BASE0 ((void *) 0x44000000) -#define PSP_VRAM_BASE1 ((void *) 0x44044000) +// vram usage map: +// 000000-044000 fb0 +// 044000-088000 fb1 +// 088000-0cc000 depth (?) +// 0cc000-126000 emu draw buffers: 512*240 + 512*240*2 + +#define VRAMOFFS_FB0 0x00000000 +#define VRAMOFFS_FB1 0x00044000 +#define VRAMOFFS_DEPTH 0x00088000 +#define VRAMOFFS_STUFF 0x000cc000 + +#define VRAM_FB0 ((void *) (0x44000000+VRAMOFFS_FB0)) +#define VRAM_FB1 ((void *) (0x44000000+VRAMOFFS_FB1)) +#define VRAM_STUFF ((void *) (0x44000000+VRAMOFFS_STUFF)) + +#define VRAM_CACHED_STUFF ((void *) (0x04000000+VRAMOFFS_STUFF)) + +#define GU_CMDLIST_SIZE (16*1024) + +extern unsigned int guCmdList[GU_CMDLIST_SIZE]; +extern int psp_unhandled_suspend; void *psp_video_get_active_fb(void); void psp_video_switch_to_single(void); @@ -18,6 +42,11 @@ unsigned int psp_pad_read(int blocking); int psp_get_cpu_clock(void); int psp_set_cpu_clock(int clock); +char *psp_get_status_line(void); + +void psp_wait_suspend(void); +void psp_resume_suspend(void); + /* shorter btn names */ #define BTN_UP PSP_CTRL_UP #define BTN_LEFT PSP_CTRL_LEFT @@ -31,5 +60,11 @@ int psp_set_cpu_clock(int clock); #define BTN_SQUARE PSP_CTRL_SQUARE #define BTN_SELECT PSP_CTRL_SELECT #define BTN_START PSP_CTRL_START -#define BTN_NOTE PSP_CTRL_NOTE +#define BTN_NOTE PSP_CTRL_NOTE // doesn't seem to work? + +/* fake 'nub' btns */ +#define BTN_NUB_UP (1 << 28) +#define BTN_NUB_RIGHT (1 << 29) +#define BTN_NUB_DOWN (1 << 30) +#define BTN_NUB_LEFT (1 << 31)