diff options
Diffstat (limited to 'src/devices/bus/pc1512/mouse.cpp')
-rw-r--r-- | src/devices/bus/pc1512/mouse.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/devices/bus/pc1512/mouse.cpp b/src/devices/bus/pc1512/mouse.cpp index 882284e89d2..2cf5616d4b1 100644 --- a/src/devices/bus/pc1512/mouse.cpp +++ b/src/devices/bus/pc1512/mouse.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(PC1512_MOUSE, pc1512_mouse_device, "pc1512_mouse", //------------------------------------------------- device_pc1512_mouse_port_interface::device_pc1512_mouse_port_interface(const machine_config &mconfig, device_t &device) : - device_slot_card_interface(mconfig, device) + device_interface(device, "pc1512mouse") { m_port = dynamic_cast<pc1512_mouse_port_device *>(device.owner()); } @@ -46,7 +46,7 @@ device_pc1512_mouse_port_interface::device_pc1512_mouse_port_interface(const mac pc1512_mouse_port_device::pc1512_mouse_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, PC1512_MOUSE_PORT, tag, owner, clock), - device_slot_interface(mconfig, *this), + device_single_card_slot_interface<device_pc1512_mouse_port_interface>(mconfig, *this), m_write_x(*this), m_write_y(*this), m_write_m1(*this), @@ -68,13 +68,7 @@ pc1512_mouse_device::pc1512_mouse_device(const machine_config &mconfig, const ch void pc1512_mouse_port_device::device_start() { - m_device = dynamic_cast<device_pc1512_mouse_port_interface *>(get_card_device()); - - // resolve callbacks - m_write_x.resolve_safe(); - m_write_y.resolve_safe(); - m_write_m1.resolve_safe(); - m_write_m2.resolve_safe(); + m_device = get_card_device(); } void pc1512_mouse_device::device_start() @@ -88,14 +82,14 @@ void pc1512_mouse_device::device_start() static INPUT_PORTS_START( mouse ) PORT_START("MOUSEB") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Left Mouse Button") PORT_CODE(MOUSECODE_BUTTON1) PORT_CHANGED_MEMBER(DEVICE_SELF, pc1512_mouse_device, mouse_button_1_changed, 0) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Right Mouse Button") PORT_CODE(MOUSECODE_BUTTON2) PORT_CHANGED_MEMBER(DEVICE_SELF, pc1512_mouse_device, mouse_button_2_changed, 0) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Left Mouse Button") PORT_CODE(MOUSECODE_BUTTON1) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(pc1512_mouse_device::mouse_button_1_changed), 0) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Right Mouse Button") PORT_CODE(MOUSECODE_BUTTON2) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(pc1512_mouse_device::mouse_button_2_changed), 0) PORT_START("MOUSEX") - PORT_BIT( 0xff, 0x00, IPT_MOUSE_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(5) PORT_MINMAX(0, 255) PORT_PLAYER(1) PORT_CHANGED_MEMBER(DEVICE_SELF, pc1512_mouse_device, mouse_x_changed, 0) + PORT_BIT( 0xff, 0x00, IPT_MOUSE_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(5) PORT_MINMAX(0, 255) PORT_PLAYER(1) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(pc1512_mouse_device::mouse_x_changed), 0) PORT_START("MOUSEY") - PORT_BIT( 0xff, 0x00, IPT_MOUSE_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(5) PORT_MINMAX(0, 255) PORT_PLAYER(1) PORT_CHANGED_MEMBER(DEVICE_SELF, pc1512_mouse_device, mouse_y_changed, 0) + PORT_BIT( 0xff, 0x00, IPT_MOUSE_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(5) PORT_MINMAX(0, 255) PORT_PLAYER(1) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(pc1512_mouse_device::mouse_y_changed), 0) INPUT_PORTS_END |