2009-05-21 17:48:31 +02:00
|
|
|
#ifndef GP2X_H
|
|
|
|
#define GP2X_H
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
GP2X_UP = 1 << 0,
|
|
|
|
GP2X_LEFT = 1 << 2,
|
|
|
|
GP2X_DOWN = 1 << 4,
|
|
|
|
GP2X_RIGHT = 1 << 6,
|
2012-10-05 01:02:26 +02:00
|
|
|
GP2X_START = 1 << 8, // Wiz: Menu, Caanoo: I
|
|
|
|
GP2X_SELECT = 1 << 9, // Caanoo: II
|
2009-05-21 17:48:31 +02:00
|
|
|
GP2X_L = 1 << 10,
|
|
|
|
GP2X_R = 1 << 11,
|
|
|
|
GP2X_A = 1 << 12,
|
|
|
|
GP2X_B = 1 << 13,
|
|
|
|
GP2X_X = 1 << 14,
|
|
|
|
GP2X_Y = 1 << 15,
|
2009-05-30 21:47:25 +02:00
|
|
|
#ifdef WIZ_BUILD
|
|
|
|
GP2X_VOL_UP = 1 << 16,
|
|
|
|
GP2X_VOL_DOWN = 1 << 17,
|
|
|
|
GP2X_PUSH = 1 << 18,
|
2012-10-05 01:02:26 +02:00
|
|
|
#elif defined(POLLUX_BUILD)
|
|
|
|
GP2X_HOME = 1 << 16,
|
|
|
|
GP2X_PUSH = 1 << 17,
|
|
|
|
GP2X_VOL_UP = 1 << 30, // dummy
|
|
|
|
GP2X_VOL_DOWN = 1 << 29,
|
2009-05-30 21:47:25 +02:00
|
|
|
#else
|
2009-05-21 17:48:31 +02:00
|
|
|
GP2X_VOL_DOWN = 1 << 22,
|
|
|
|
GP2X_VOL_UP = 1 << 23,
|
2009-05-30 21:47:25 +02:00
|
|
|
GP2X_PUSH = 1 << 27,
|
|
|
|
#endif
|
2011-09-04 18:51:03 +02:00
|
|
|
GP2X_VOL_MIDDLE = (1 << 24), // fake, menu enter
|
2009-05-21 17:48:31 +02:00
|
|
|
};
|
|
|
|
|
2011-09-04 18:51:03 +02:00
|
|
|
void gpsp_plat_init(void);
|
|
|
|
void gpsp_plat_quit(void);
|
2009-05-21 17:48:31 +02:00
|
|
|
|
2011-09-04 18:51:03 +02:00
|
|
|
u32 gpsp_plat_joystick_read(void);
|
|
|
|
u32 gpsp_plat_buttons_to_cursor(u32 buttons);
|
|
|
|
|
2011-09-04 19:02:19 +02:00
|
|
|
#define PLAT_BUTTON_COUNT 16
|
2012-10-03 01:11:28 +02:00
|
|
|
#define PLAT_MENU_BUTTON 15
|
2011-09-04 19:02:19 +02:00
|
|
|
extern u32 button_plat_mask_to_config[PLAT_BUTTON_COUNT];
|
2009-05-21 17:48:31 +02:00
|
|
|
|
|
|
|
void gp2x_sound_volume(u32 volume_up);
|
|
|
|
void gp2x_quit();
|
|
|
|
|
|
|
|
void set_FCLK(u32 MHZ);
|
|
|
|
|
2009-06-06 22:33:15 +02:00
|
|
|
void upscale_aspect(u16 *dst, u16 *src);
|
2009-05-21 17:48:31 +02:00
|
|
|
|
2009-05-31 22:10:24 +02:00
|
|
|
/* wiz only */
|
|
|
|
extern void *gpsp_gp2x_screen;
|
|
|
|
void fb_use_buffers(int count);
|
|
|
|
void pollux_video_flip();
|
2009-06-13 21:19:53 +02:00
|
|
|
void wiz_lcd_set_portrait(int y);
|
|
|
|
u32 wiz_load_gamepak(char *name);
|
|
|
|
|
|
|
|
void do_rotated_blit(void *dst, void *linesx4, u32 y);
|
|
|
|
void upscale_aspect_row(void *dst, void *linesx3, u32 row);
|
2009-05-31 22:10:24 +02:00
|
|
|
|
2009-05-21 17:48:31 +02:00
|
|
|
#endif
|