cff531af |
1 | /* |
2 | * PicoDrive |
3 | * (C) notaz, 2007,2008 |
4 | * |
5 | * This work is licensed under the terms of MAME license. |
6 | * See COPYING file in the top-level directory. |
7 | */ |
8b99ab90 |
8 | |
1820b5a7 |
9 | #include <pspctrl.h> |
10 | |
11 | void psp_init(void); |
12 | void psp_finish(void); |
13 | |
14 | void psp_msleep(int ms); |
15 | |
9112b6ce |
16 | // vram usage map: |
1cc77481 |
17 | // 000000-044000 fb0: 512*272*2 |
9112b6ce |
18 | // 044000-088000 fb1 |
1cc77481 |
19 | // 088000-0cc000 depth (Z) |
20 | // 0cc000-110000 emu/menu draw buffer 0: 512*272*2 |
21 | // 110000-154000 emu/menu draw buffer 1 |
9112b6ce |
22 | |
8ab3e3c1 |
23 | #define VRAMOFFS_FB0 0x00000000 |
24 | #define VRAMOFFS_FB1 0x00044000 |
25 | #define VRAMOFFS_DEPTH 0x00088000 |
26 | #define VRAMOFFS_STUFF 0x000cc000 |
9112b6ce |
27 | |
d12dd1b4 |
28 | #define VRAM_ADDR 0x44000000 |
29 | #define VRAM_FB0 ((void *) (VRAM_ADDR+VRAMOFFS_FB0)) |
30 | #define VRAM_FB1 ((void *) (VRAM_ADDR+VRAMOFFS_FB1)) |
31 | #define VRAM_STUFF ((void *) (VRAM_ADDR+VRAMOFFS_STUFF)) |
9112b6ce |
32 | |
d12dd1b4 |
33 | #define VRAM_CACHEDADDR 0x04000000 |
34 | #define VRAM_CACHED_STUFF ((void *) (VRAM_CACHEDADDR+VRAMOFFS_STUFF)) |
9112b6ce |
35 | |
8ab3e3c1 |
36 | #define GU_CMDLIST_SIZE (16*1024) |
9112b6ce |
37 | |
38 | extern unsigned int guCmdList[GU_CMDLIST_SIZE]; |
ea08c296 |
39 | extern int psp_unhandled_suspend; |
1820b5a7 |
40 | |
7d4906bf |
41 | void *psp_video_get_active_fb(void); |
42 | void psp_video_switch_to_single(void); |
d12dd1b4 |
43 | void psp_video_flip(int wait_vsync); |
1820b5a7 |
44 | extern void *psp_screen; |
45 | |
7d4906bf |
46 | unsigned int psp_pad_read(int blocking); |
1820b5a7 |
47 | |
70357ce5 |
48 | int psp_get_cpu_clock(void); |
49 | int psp_set_cpu_clock(int clock); |
1820b5a7 |
50 | |
9caf44b5 |
51 | char *psp_get_status_line(void); |
52 | |
7d0143a2 |
53 | void psp_wait_suspend(void); |
ea08c296 |
54 | void psp_resume_suspend(void); |
7d0143a2 |
55 | |
cdc6aac4 |
56 | /* fake 'nub' btns, mapped to the 4 unused upper bits of ctrl buttons */ |
6370b1d4 |
57 | #define PSP_NUB_UP (1 << 26) |
58 | #define PSP_NUB_RIGHT (1 << 27) |
59 | #define PSP_NUB_DOWN (1 << 28) |
60 | #define PSP_NUB_LEFT (1 << 29) |
9caf44b5 |
61 | |
1cc77481 |
62 | /* from menu.c */ |
63 | void psp_menu_init(void); |