dualcore integration in famc, bram cart C code, psp bugfixes
[libpicofe.git] / psp / psp.h
CommitLineData
2951214e 1#include <pspctrl.h>
2
3void psp_init(void);
4void psp_finish(void);
5
6void psp_msleep(int ms);
7
db298784 8// vram usage map:
9// 000000-044000 fb0
10// 044000-088000 fb1
11// 088000-0cc000 depth (?)
6f748c47 12// 0cc000-126000 emu draw buffers: 512*240 + 512*240*2
db298784 13
6f748c47 14#define VRAMOFFS_FB0 0x00000000
15#define VRAMOFFS_FB1 0x00044000
16#define VRAMOFFS_DEPTH 0x00088000
17#define VRAMOFFS_STUFF 0x000cc000
db298784 18
6f748c47 19#define VRAM_FB0 ((void *) (0x44000000+VRAMOFFS_FB0))
20#define VRAM_FB1 ((void *) (0x44000000+VRAMOFFS_FB1))
21#define VRAM_STUFF ((void *) (0x44000000+VRAMOFFS_STUFF))
db298784 22
6f748c47 23#define VRAM_CACHED_STUFF ((void *) (0x04000000+VRAMOFFS_STUFF))
db298784 24
6f748c47 25#define GU_CMDLIST_SIZE (16*1024)
db298784 26
27extern unsigned int guCmdList[GU_CMDLIST_SIZE];
2951214e 28
703e4c7b 29void *psp_video_get_active_fb(void);
30void psp_video_switch_to_single(void);
31void psp_video_flip(int wait_vsync);
2951214e 32extern void *psp_screen;
33
703e4c7b 34unsigned int psp_pad_read(int blocking);
2951214e 35
2b90fc61 36int psp_get_cpu_clock(void);
37int psp_set_cpu_clock(int clock);
2951214e 38
16e89bed 39char *psp_get_status_line(void);
40
2951214e 41/* shorter btn names */
42#define BTN_UP PSP_CTRL_UP
43#define BTN_LEFT PSP_CTRL_LEFT
44#define BTN_RIGHT PSP_CTRL_RIGHT
45#define BTN_DOWN PSP_CTRL_DOWN
46#define BTN_L PSP_CTRL_LTRIGGER
47#define BTN_R PSP_CTRL_RTRIGGER
48#define BTN_TRIANGLE PSP_CTRL_TRIANGLE
49#define BTN_CIRCLE PSP_CTRL_CIRCLE
50#define BTN_X PSP_CTRL_CROSS
51#define BTN_SQUARE PSP_CTRL_SQUARE
52#define BTN_SELECT PSP_CTRL_SELECT
53#define BTN_START PSP_CTRL_START
6f748c47 54#define BTN_NOTE PSP_CTRL_NOTE // doesn't seem to work?
2951214e 55
16e89bed 56/* fake 'nub' btns */
57#define BTN_NUB_UP (1 << 28)
58#define BTN_NUB_RIGHT (1 << 29)
59#define BTN_NUB_DOWN (1 << 30)
60#define BTN_NUB_LEFT (1 << 31)
61