1 #ifndef INPUT_H_ 2 #define INPUT_H_ 3 4 /* Keyboard AKEY_* are in akey.h */ 5 6 /* INPUT_key_consol masks */ 7 /* Note: INPUT_key_consol should be INPUT_CONSOL_NONE if no consol key is pressed. 8 When a consol key is pressed, corresponding bit should be cleared. 9 */ 10 #define INPUT_CONSOL_NONE 0x07 11 #define INPUT_CONSOL_START 0x01 12 #define INPUT_CONSOL_SELECT 0x02 13 #define INPUT_CONSOL_OPTION 0x04 14 15 extern int INPUT_key_code; /* regular Atari key code */ 16 extern int INPUT_key_shift; /* Shift key pressed */ 17 extern int INPUT_key_consol; /* Start, Select and Option keys */ 18 19 /* Joysticks ----------------------------------------------------------- */ 20 21 /* joystick position */ 22 #define INPUT_STICK_LL 0x09 23 #define INPUT_STICK_BACK 0x0d 24 #define INPUT_STICK_LR 0x05 25 #define INPUT_STICK_LEFT 0x0b 26 #define INPUT_STICK_CENTRE 0x0f 27 #define INPUT_STICK_RIGHT 0x07 28 #define INPUT_STICK_UL 0x0a 29 #define INPUT_STICK_FORWARD 0x0e 30 #define INPUT_STICK_UR 0x06 31 32 /* joy_autofire values */ 33 #define INPUT_AUTOFIRE_OFF 0 34 #define INPUT_AUTOFIRE_FIRE 1 /* Fire dependent */ 35 #define INPUT_AUTOFIRE_CONT 2 /* Continuous */ 36 37 extern int INPUT_joy_autofire[4]; /* autofire mode for each Atari port */ 38 39 extern int INPUT_joy_block_opposite_directions; /* can't move joystick left 40 and right simultaneously */ 41 42 extern int INPUT_joy_multijoy; /* emulate MultiJoy4 interface */ 43 44 /* 5200 joysticks values */ 45 extern int INPUT_joy_5200_min; 46 extern int INPUT_joy_5200_center; 47 extern int INPUT_joy_5200_max; 48 49 /* Mouse --------------------------------------------------------------- */ 50 51 /* INPUT_mouse_mode values */ 52 #define INPUT_MOUSE_OFF 0 53 #define INPUT_MOUSE_PAD 1 /* Paddles */ 54 #define INPUT_MOUSE_TOUCH 2 /* Atari touch tablet */ 55 #define INPUT_MOUSE_KOALA 3 /* Koala pad */ 56 #define INPUT_MOUSE_PEN 4 /* Light pen */ 57 #define INPUT_MOUSE_GUN 5 /* Light gun */ 58 #define INPUT_MOUSE_AMIGA 6 /* Amiga mouse */ 59 #define INPUT_MOUSE_ST 7 /* Atari ST mouse */ 60 #define INPUT_MOUSE_TRAK 8 /* Atari CX22 Trak-Ball */ 61 #define INPUT_MOUSE_JOY 9 /* Joystick */ 62 63 extern int INPUT_mouse_mode; /* device emulated with mouse */ 64 extern int INPUT_mouse_port; /* Atari port, to which the emulated device is attached */ 65 extern int INPUT_mouse_delta_x; /* x motion since last frame */ 66 extern int INPUT_mouse_delta_y; /* y motion since last frame */ 67 extern int INPUT_mouse_buttons; /* buttons pressed (b0: left, b1: right, b2: middle */ 68 extern int INPUT_mouse_speed; /* how fast the mouse pointer moves */ 69 extern int INPUT_mouse_pot_min; /* min. value of POKEY's POT register */ 70 extern int INPUT_mouse_pot_max; /* max. value of POKEY's POT register */ 71 extern int INPUT_mouse_pen_ofs_h; /* light pen/gun horizontal offset (for calibration) */ 72 extern int INPUT_mouse_pen_ofs_v; /* light pen/gun vertical offset (for calibration) */ 73 extern int INPUT_mouse_joy_inertia; /* how long the mouse pointer can move (time in Atari frames) 74 after a fast motion of mouse */ 75 extern int INPUT_direct_mouse; /* When true, convert the mouse pointer 76 position directly into POKEY POT values */ 77 78 extern int INPUT_cx85; /* emulate CX85 numeric keypad */ 79 /* Functions ----------------------------------------------------------- */ 80 81 int INPUT_Initialise(int *argc, char *argv[]); 82 void INPUT_Exit(void); 83 void INPUT_Frame(void); 84 void INPUT_Scanline(void); 85 void INPUT_SelectMultiJoy(int no); 86 void INPUT_CenterMousePointer(void); 87 void INPUT_DrawMousePointer(void); 88 int INPUT_Recording(void); 89 int INPUT_Playingback(void); 90 void INPUT_RecordInt(int i); 91 int INPUT_PlaybackInt(void); 92 93 #endif /* INPUT_H_ */ 94