Added screenshot feature
[clinton/Virtual-Jaguar-Rx.git] / src / joystick.h
1 //
2 // Jaguar joystick handler
3 //
4
5 #ifndef __JOYSTICK_H__
6 #define __JOYSTICK_H__
7
8 #include <stdint.h>
9
10 enum { BUTTON_FIRST = 0, BUTTON_U = 0,
11 BUTTON_D = 1,
12 BUTTON_L = 2,
13 BUTTON_R = 3,
14
15 BUTTON_s = 4,
16 BUTTON_7 = 5,
17 BUTTON_4 = 6,
18 BUTTON_1 = 7,
19 BUTTON_0 = 8,
20 BUTTON_8 = 9,
21 BUTTON_5 = 10,
22 BUTTON_2 = 11,
23 BUTTON_d = 12,
24 BUTTON_9 = 13,
25 BUTTON_6 = 14,
26 BUTTON_3 = 15,
27
28 BUTTON_A = 16,
29 BUTTON_B = 17,
30 BUTTON_C = 18,
31 BUTTON_OPTION = 19,
32 BUTTON_PAUSE = 20, BUTTON_LAST = 20 };
33
34 void JoystickInit(void);
35 void JoystickReset(void);
36 void JoystickDone(void);
37 //void JoystickWriteByte(uint32_t, uint8_t);
38 void JoystickWriteWord(uint32_t, uint16_t);
39 //uint8_t JoystickReadByte(uint32_t);
40 uint16_t JoystickReadWord(uint32_t);
41 void JoystickExec(void);
42
43 extern uint8_t joypad0Buttons[];
44 extern uint8_t joypad1Buttons[];
45 extern bool audioEnabled;
46 extern bool joysticksEnabled;
47
48 #endif // __JOYSTICK_H__
49