summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/vtech/ioexp/joystick.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/vtech/ioexp/joystick.cpp')
-rw-r--r--src/devices/bus/vtech/ioexp/joystick.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/devices/bus/vtech/ioexp/joystick.cpp b/src/devices/bus/vtech/ioexp/joystick.cpp
index a352c555fbd..f54125c64ae 100644
--- a/src/devices/bus/vtech/ioexp/joystick.cpp
+++ b/src/devices/bus/vtech/ioexp/joystick.cpp
@@ -20,6 +20,16 @@
DEFINE_DEVICE_TYPE(VTECH_JOYSTICK_INTERFACE, vtech_joystick_interface_device, "vtech_joystick", "Laser/VZ Joystick Interface")
//-------------------------------------------------
+// io_map - memory space address map
+//-------------------------------------------------
+
+void vtech_joystick_interface_device::io_map(address_map &map)
+{
+ map.unmap_value_high();
+ map(0x20, 0x2f).r(FUNC(vtech_joystick_interface_device::joystick_r));
+}
+
+//-------------------------------------------------
// input_ports - device-specific input ports
//-------------------------------------------------
@@ -66,8 +76,7 @@ ioport_constructor vtech_joystick_interface_device::device_input_ports() const
//-------------------------------------------------
vtech_joystick_interface_device::vtech_joystick_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- device_t(mconfig, VTECH_JOYSTICK_INTERFACE, tag, owner, clock),
- device_vtech_ioexp_interface(mconfig, *this),
+ vtech_ioexp_device(mconfig, VTECH_JOYSTICK_INTERFACE, tag, owner, clock),
m_joy0(*this, "joystick_0"),
m_joy0_arm(*this, "joystick_0_arm"),
m_joy1(*this, "joystick_1"),
@@ -81,15 +90,7 @@ vtech_joystick_interface_device::vtech_joystick_interface_device(const machine_c
void vtech_joystick_interface_device::device_start()
{
-}
-
-//-------------------------------------------------
-// device_reset - device-specific reset
-//-------------------------------------------------
-
-void vtech_joystick_interface_device::device_reset()
-{
- io_space().install_read_handler(0x20, 0x2f, read8sm_delegate(*this, FUNC(vtech_joystick_interface_device::joystick_r)));
+ vtech_ioexp_device::device_start();
}