comparison io.h @ 913:a5a51465f8b0

Allow IO device config to be overriden by ROM DB
author Michael Pavone <pavone@retrodev.com>
date Tue, 08 Dec 2015 19:33:58 -0800
parents 599e2861f484
children 9e882eca717e
comparison
equal deleted inserted replaced
912:599e2861f484 913:a5a51465f8b0
5 */ 5 */
6 #ifndef IO_H_ 6 #ifndef IO_H_
7 #define IO_H_ 7 #define IO_H_
8 #include <stdint.h> 8 #include <stdint.h>
9 #include "tern.h" 9 #include "tern.h"
10 #include "romdb.h"
10 11
11 enum { 12 enum {
12 IO_GAMEPAD3, 13 IO_GAMEPAD3,
13 IO_GAMEPAD6, 14 IO_GAMEPAD6,
14 IO_MOUSE, 15 IO_MOUSE,
67 IO_READ 68 IO_READ
68 }; 69 };
69 70
70 void set_keybindings(io_port *ports); 71 void set_keybindings(io_port *ports);
71 void map_all_bindings(io_port *ports); 72 void map_all_bindings(io_port *ports);
72 void setup_io_devices(tern_node * config, io_port * ports); 73 void setup_io_devices(tern_node * config, rom_info *rom, io_port * ports);
73 void io_adjust_cycles(io_port * pad, uint32_t current_cycle, uint32_t deduction); 74 void io_adjust_cycles(io_port * pad, uint32_t current_cycle, uint32_t deduction);
74 void io_data_write(io_port * pad, uint8_t value, uint32_t current_cycle); 75 void io_data_write(io_port * pad, uint8_t value, uint32_t current_cycle);
75 uint8_t io_data_read(io_port * pad, uint32_t current_cycle); 76 uint8_t io_data_read(io_port * pad, uint32_t current_cycle);
76 void handle_keydown(int keycode); 77 void handle_keydown(int keycode);
77 void handle_keyup(int keycode); 78 void handle_keyup(int keycode);