2823a4c8 |
1 | #ifndef GP2X_H |
2 | #define GP2X_H |
3 | |
4 | enum |
5 | { |
6 | GP2X_UP = 1 << 0, |
7 | GP2X_LEFT = 1 << 2, |
8 | GP2X_DOWN = 1 << 4, |
9 | GP2X_RIGHT = 1 << 6, |
108c704a |
10 | GP2X_START = 1 << 8, // Wiz: Menu, Caanoo: I |
11 | GP2X_SELECT = 1 << 9, // Caanoo: II |
2823a4c8 |
12 | GP2X_L = 1 << 10, |
13 | GP2X_R = 1 << 11, |
14 | GP2X_A = 1 << 12, |
15 | GP2X_B = 1 << 13, |
16 | GP2X_X = 1 << 14, |
17 | GP2X_Y = 1 << 15, |
4742480d |
18 | #ifdef WIZ_BUILD |
19 | GP2X_VOL_UP = 1 << 16, |
20 | GP2X_VOL_DOWN = 1 << 17, |
21 | GP2X_PUSH = 1 << 18, |
108c704a |
22 | #elif defined(POLLUX_BUILD) |
23 | GP2X_HOME = 1 << 16, |
24 | GP2X_PUSH = 1 << 17, |
25 | GP2X_VOL_UP = 1 << 30, // dummy |
26 | GP2X_VOL_DOWN = 1 << 29, |
4742480d |
27 | #else |
2823a4c8 |
28 | GP2X_VOL_DOWN = 1 << 22, |
29 | GP2X_VOL_UP = 1 << 23, |
4742480d |
30 | GP2X_PUSH = 1 << 27, |
31 | #endif |
43c24b30 |
32 | GP2X_VOL_MIDDLE = (1 << 24), // fake, menu enter |
2823a4c8 |
33 | }; |
34 | |
43c24b30 |
35 | void gpsp_plat_init(void); |
36 | void gpsp_plat_quit(void); |
2823a4c8 |
37 | |
43c24b30 |
38 | u32 gpsp_plat_joystick_read(void); |
39 | u32 gpsp_plat_buttons_to_cursor(u32 buttons); |
40 | |
eb3668fc |
41 | #define PLAT_BUTTON_COUNT 16 |
0dfe793b |
42 | #define PLAT_MENU_BUTTON 15 |
eb3668fc |
43 | extern u32 button_plat_mask_to_config[PLAT_BUTTON_COUNT]; |
2823a4c8 |
44 | |
45 | void gp2x_sound_volume(u32 volume_up); |
46 | void gp2x_quit(); |
47 | |
2823a4c8 |
48 | void set_FCLK(u32 MHZ); |
2823a4c8 |
49 | |
638cc626 |
50 | void upscale_aspect(u16 *dst, u16 *src); |
2823a4c8 |
51 | |
4cdfc0bc |
52 | /* wiz only */ |
53 | extern void *gpsp_gp2x_screen; |
54 | void fb_use_buffers(int count); |
55 | void pollux_video_flip(); |
42c81190 |
56 | void wiz_lcd_set_portrait(int y); |
57 | u32 wiz_load_gamepak(char *name); |
58 | |
59 | void do_rotated_blit(void *dst, void *linesx4, u32 y); |
60 | void upscale_aspect_row(void *dst, void *linesx3, u32 row); |
4cdfc0bc |
61 | |
2823a4c8 |
62 | #endif |