comparison io.h @ 1026:7267bc1ab547

Fix bug in 68K movep.l when the destination is a register mapped to a host register
author Michael Pavone <pavone@retrodev.com>
date Tue, 10 May 2016 08:59:17 -0700
parents e28f365605da
children 56b1748a8473
comparison
equal deleted inserted replaced
1025:01a91df5b87c 1026:7267bc1ab547
11 11
12 enum { 12 enum {
13 IO_GAMEPAD3, 13 IO_GAMEPAD3,
14 IO_GAMEPAD6, 14 IO_GAMEPAD6,
15 IO_MOUSE, 15 IO_MOUSE,
16 IO_SATURN_KEYBOARD,
16 IO_MENACER, 17 IO_MENACER,
17 IO_JUSTIFIER, 18 IO_JUSTIFIER,
18 IO_SEGA_MULTI, 19 IO_SEGA_MULTI,
19 IO_EA_MULTI_A, 20 IO_EA_MULTI_A,
20 IO_EA_MULTI_B, 21 IO_EA_MULTI_B,
43 uint16_t latched_x; 44 uint16_t latched_x;
44 uint16_t latched_y; 45 uint16_t latched_y;
45 uint8_t tr_counter; 46 uint8_t tr_counter;
46 uint8_t mouse_num; 47 uint8_t mouse_num;
47 } mouse; 48 } mouse;
49 struct {
50 uint16_t events[8];
51 uint8_t read_pos;
52 uint8_t write_pos;
53 } keyboard;
48 } device; 54 } device;
49 uint8_t output; 55 uint8_t output;
50 uint8_t control; 56 uint8_t control;
51 uint8_t input[3]; 57 uint8_t input[3];
52 uint8_t device_type; 58 uint8_t device_type;
74 void map_all_bindings(io_port *ports); 80 void map_all_bindings(io_port *ports);
75 void setup_io_devices(tern_node * config, rom_info *rom, genesis_context * gen); 81 void setup_io_devices(tern_node * config, rom_info *rom, genesis_context * gen);
76 void io_adjust_cycles(io_port * pad, uint32_t current_cycle, uint32_t deduction); 82 void io_adjust_cycles(io_port * pad, uint32_t current_cycle, uint32_t deduction);
77 void io_data_write(io_port * pad, uint8_t value, uint32_t current_cycle); 83 void io_data_write(io_port * pad, uint8_t value, uint32_t current_cycle);
78 uint8_t io_data_read(io_port * pad, uint32_t current_cycle); 84 uint8_t io_data_read(io_port * pad, uint32_t current_cycle);
79 void handle_keydown(int keycode); 85 void handle_keydown(int keycode, char scancode);
80 void handle_keyup(int keycode); 86 void handle_keyup(int keycode, char scancode);
81 void handle_joydown(int joystick, int button); 87 void handle_joydown(int joystick, int button);
82 void handle_joyup(int joystick, int button); 88 void handle_joyup(int joystick, int button);
83 void handle_joy_dpad(int joystick, int dpad, uint8_t state); 89 void handle_joy_dpad(int joystick, int dpad, uint8_t state);
84 void handle_mouse_moved(int mouse, uint16_t x, uint16_t y, int16_t deltax, int16_t deltay); 90 void handle_mouse_moved(int mouse, uint16_t x, uint16_t y, int16_t deltax, int16_t deltay);
85 void handle_mousedown(int mouse, int button); 91 void handle_mousedown(int mouse, int button);