avoid forced menu bind, some config refactoring
[gpsp.git] / gp2x / gp2x.h
... / ...
CommitLineData
1#ifndef GP2X_H
2#define GP2X_H
3
4enum
5{
6 GP2X_UP = 1 << 0,
7 GP2X_LEFT = 1 << 2,
8 GP2X_DOWN = 1 << 4,
9 GP2X_RIGHT = 1 << 6,
10 GP2X_START = 1 << 8,
11 GP2X_SELECT = 1 << 9,
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,
18#ifdef WIZ_BUILD
19 GP2X_VOL_UP = 1 << 16,
20 GP2X_VOL_DOWN = 1 << 17,
21 GP2X_PUSH = 1 << 18,
22#else
23 GP2X_VOL_DOWN = 1 << 22,
24 GP2X_VOL_UP = 1 << 23,
25 GP2X_PUSH = 1 << 27,
26#endif
27 GP2X_VOL_MIDDLE = (1 << 24), // fake, menu enter
28};
29
30void gpsp_plat_init(void);
31void gpsp_plat_quit(void);
32
33u32 gpsp_plat_joystick_read(void);
34u32 gpsp_plat_buttons_to_cursor(u32 buttons);
35
36#define PLAT_BUTTON_COUNT 16
37#define PLAT_MENU_BUTTON 15
38extern u32 button_plat_mask_to_config[PLAT_BUTTON_COUNT];
39
40void gp2x_sound_volume(u32 volume_up);
41void gp2x_quit();
42
43void set_FCLK(u32 MHZ);
44
45void upscale_aspect(u16 *dst, u16 *src);
46
47/* wiz only */
48extern void *gpsp_gp2x_screen;
49void fb_use_buffers(int count);
50void pollux_video_flip();
51void wiz_lcd_set_portrait(int y);
52u32 wiz_load_gamepak(char *name);
53
54void do_rotated_blit(void *dst, void *linesx4, u32 y);
55void upscale_aspect_row(void *dst, void *linesx3, u32 row);
56
57#endif