diff 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
line wrap: on
line diff
--- a/io.h	Fri May 06 19:19:42 2016 -0700
+++ b/io.h	Tue May 10 08:59:17 2016 -0700
@@ -13,6 +13,7 @@
 	IO_GAMEPAD3,
 	IO_GAMEPAD6,
 	IO_MOUSE,
+	IO_SATURN_KEYBOARD,
 	IO_MENACER,
 	IO_JUSTIFIER,
 	IO_SEGA_MULTI,
@@ -45,6 +46,11 @@
 			uint8_t  tr_counter;
 			uint8_t  mouse_num;
 		} mouse;
+		struct {
+			uint16_t events[8];
+			uint8_t  read_pos;
+			uint8_t  write_pos;
+		} keyboard;
 	} device;
 	uint8_t  output;
 	uint8_t  control;
@@ -76,8 +82,8 @@
 void io_adjust_cycles(io_port * pad, uint32_t current_cycle, uint32_t deduction);
 void io_data_write(io_port * pad, uint8_t value, uint32_t current_cycle);
 uint8_t io_data_read(io_port * pad, uint32_t current_cycle);
-void handle_keydown(int keycode);
-void handle_keyup(int keycode);
+void handle_keydown(int keycode, char scancode);
+void handle_keyup(int keycode, char scancode);
 void handle_joydown(int joystick, int button);
 void handle_joyup(int joystick, int button);
 void handle_joy_dpad(int joystick, int dpad, uint8_t state);