1 // license:BSD-3-Clause 2 // copyright-holders:Curt Coder 3 /********************************************************************** 4 5 ColecoVision Hand Controller emulation 6 7 **********************************************************************/ 8 9 #ifndef MAME_BUS_COLECO_HAND_H 10 #define MAME_BUS_COLECO_HAND_H 11 12 #pragma once 13 14 #include "ctrl.h" 15 16 17 18 //************************************************************************** 19 // TYPE DEFINITIONS 20 //************************************************************************** 21 22 // ======================> coleco_hand_controller_device 23 24 class coleco_hand_controller_device : public device_t, 25 public device_colecovision_control_port_interface 26 { 27 public: 28 // construction/destruction 29 coleco_hand_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); 30 31 // optional information overrides 32 virtual ioport_constructor device_input_ports() const override; 33 34 DECLARE_CUSTOM_INPUT_MEMBER( keypad_r ); 35 36 protected: 37 // device-level overrides 38 virtual void device_start() override; 39 40 // device_vcs_control_port_interface overrides 41 virtual uint8_t joy_r() override; 42 43 private: 44 required_ioport m_io_common0; 45 required_ioport m_io_common1; 46 required_ioport m_io_keypad; 47 }; 48 49 50 // device type definition 51 DECLARE_DEVICE_TYPE(COLECO_HAND_CONTROLLER, coleco_hand_controller_device) 52 53 54 #endif // MAME_BUS_COLECO_HAND_H 55