wiz port wip
[gpsp.git] / gp2x / gp2x.h
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,
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 };
28
29
30 extern u32 gpsp_gp2x_dev_audio;
31 extern u32 gpsp_gp2x_dev;
32
33 void gp2x_sound_volume(u32 volume_up);
34 void gp2x_quit();
35
36 // call this at first
37 void cpuctrl_init(void);
38 void save_system_regs(void);
39 void cpuctrl_deinit(void);
40 void set_display_clock_div(unsigned div);
41
42 void set_FCLK(u32 MHZ);
43 // 0 to 7 divider (freq = FCLK / (1 + div))
44 void set_920_Div(u16 div);
45 void set_DCLK_Div(u16 div);
46
47 void Disable_940(void);
48 void gp2x_video_wait_vsync(void);
49 unsigned short get_920_Div();
50 void set_940_Div(u16 div);
51
52 s32 gp2x_load_mmuhack();
53
54 #endif