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