1 #ifndef winx68k_joy_h
2 #define winx68k_joy_h
3 
4 #include "common.h"
5 
6 #define	JOY_UP		0x01
7 #define	JOY_DOWN	0x02
8 #define	JOY_LEFT	0x04
9 #define	JOY_RIGHT	0x08
10 #define	JOY_TRG2	0x20
11 #define	JOY_TRG1	0x40
12 
13 #define	JOY_TRG5	0x01
14 #define	JOY_TRG4	0x02
15 #define	JOY_TRG3	0x04
16 #define	JOY_TRG7	0x08
17 #define	JOY_TRG8	0x20
18 #define	JOY_TRG6	0x40
19 
20 #ifndef PSP
21 #define JOYAXISPLAY 2048
22 #endif
23 
24 #define need_Vpad() (is_menu || Keyboard_IsSwKeyboard() || (!Config.JoyOrMouse && !r_joy))
25 
26 void Joystick_Init(void);
27 void Joystick_Cleanup(void);
28 BYTE FASTCALL Joystick_Read(BYTE num);
29 void FASTCALL Joystick_Write(BYTE num, BYTE data);
30 
31 typedef signed int R_Keycode;
32 void FASTCALL Joystick_Update(int is_menu, R_Keycode key, int port);
33 
34 
35 BYTE get_joy_downstate(void);
36 void reset_joy_downstate(void);
37 BYTE get_joy_upstate(void);
38 void reset_joy_upstate(void);
39 
40 extern BYTE JoyKeyState;
41 extern BYTE keyb_in, joy_in;
42 
43 extern int  *r_joy;
44 
45 #endif
46