fix DrawSpritesHiAS
[picodrive.git] / platform / psp / psp.h
CommitLineData
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
11void psp_init(void);
12void psp_finish(void);
13
14void psp_msleep(int ms);
15
9112b6ce 16// vram usage map:
17// 000000-044000 fb0
18// 044000-088000 fb1
19// 088000-0cc000 depth (?)
8ab3e3c1 20// 0cc000-126000 emu draw buffers: 512*240 + 512*240*2
9112b6ce 21
8ab3e3c1 22#define VRAMOFFS_FB0 0x00000000
23#define VRAMOFFS_FB1 0x00044000
24#define VRAMOFFS_DEPTH 0x00088000
25#define VRAMOFFS_STUFF 0x000cc000
9112b6ce 26
8ab3e3c1 27#define VRAM_FB0 ((void *) (0x44000000+VRAMOFFS_FB0))
28#define VRAM_FB1 ((void *) (0x44000000+VRAMOFFS_FB1))
29#define VRAM_STUFF ((void *) (0x44000000+VRAMOFFS_STUFF))
9112b6ce 30
8ab3e3c1 31#define VRAM_CACHED_STUFF ((void *) (0x04000000+VRAMOFFS_STUFF))
9112b6ce 32
8ab3e3c1 33#define GU_CMDLIST_SIZE (16*1024)
9112b6ce 34
35extern unsigned int guCmdList[GU_CMDLIST_SIZE];
ea08c296 36extern int psp_unhandled_suspend;
1820b5a7 37
7d4906bf 38void *psp_video_get_active_fb(void);
39void psp_video_switch_to_single(void);
40void psp_video_flip(int wait_vsync);
1820b5a7 41extern void *psp_screen;
42
7d4906bf 43unsigned int psp_pad_read(int blocking);
1820b5a7 44
70357ce5 45int psp_get_cpu_clock(void);
46int psp_set_cpu_clock(int clock);
1820b5a7 47
9caf44b5 48char *psp_get_status_line(void);
49
7d0143a2 50void psp_wait_suspend(void);
ea08c296 51void psp_resume_suspend(void);
7d0143a2 52
1820b5a7 53/* shorter btn names */
e5ab6faf 54#define PBTN_UP PSP_CTRL_UP
55#define PBTN_LEFT PSP_CTRL_LEFT
56#define PBTN_RIGHT PSP_CTRL_RIGHT
57#define PBTN_DOWN PSP_CTRL_DOWN
58#define PBTN_L PSP_CTRL_LTRIGGER
59#define PBTN_R PSP_CTRL_RTRIGGER
60#define PBTN_TRIANGLE PSP_CTRL_TRIANGLE
61#define PBTN_CIRCLE PSP_CTRL_CIRCLE
62#define PBTN_X PSP_CTRL_CROSS
63#define PBTN_SQUARE PSP_CTRL_SQUARE
64#define PBTN_SELECT PSP_CTRL_SELECT
65#define PBTN_START PSP_CTRL_START
66#define PBTN_NOTE PSP_CTRL_NOTE // doesn't seem to work?
1820b5a7 67
9caf44b5 68/* fake 'nub' btns */
e5ab6faf 69#define PBTN_NUB_UP (1 << 28)
70#define PBTN_NUB_RIGHT (1 << 29)
71#define PBTN_NUB_DOWN (1 << 30)
72#define PBTN_NUB_LEFT (1 << 31)
9caf44b5 73