Mercurial > repos > blastem
view io.h @ 558:dc9f178085a0
Use a typedef code_ptr in place of uint8_t * in 68K core to better support host instruction sets with different instruction word sizes. Make x86_68k_options contain a cpu_options so that gen_mem_fun can eventually be shared with the Z80 core.
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 24 Feb 2014 01:30:16 -0800 |
parents | 140af5509ce7 |
children | d77c79cec800 |
line wrap: on
line source
/* Copyright 2013 Michael Pavone This file is part of BlastEm. BlastEm is free software distributed under the terms of the GNU General Public License version 3 or greater. See COPYING for full license text. */ #ifndef IO_H_ #define IO_H_ #include <stdint.h> typedef struct { uint32_t th_counter; uint32_t timeout_cycle; uint8_t output; uint8_t control; uint8_t input[3]; } io_port; #define GAMEPAD_TH0 0 #define GAMEPAD_TH1 1 #define GAMEPAD_EXTRA 2 #define GAMEPAD_NONE 0xF void set_keybindings(); 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_joydown(int joystick, int button); void handle_joyup(int joystick, int button); void handle_joy_dpad(int joystick, int dpad, uint8_t state); #endif //IO_H_