diff options
Diffstat (limited to 'src/devices/bus/pc1512/mouse.cpp')
-rw-r--r-- | src/devices/bus/pc1512/mouse.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/devices/bus/pc1512/mouse.cpp b/src/devices/bus/pc1512/mouse.cpp index 3029110de6e..04d688765a8 100644 --- a/src/devices/bus/pc1512/mouse.cpp +++ b/src/devices/bus/pc1512/mouse.cpp @@ -15,8 +15,8 @@ // DEVICE DEFINITION //************************************************************************** -const device_type PC1512_MOUSE_PORT = device_creator<pc1512_mouse_port_t>; -const device_type PC1512_MOUSE = device_creator<pc1512_mouse_t>; +DEFINE_DEVICE_TYPE(PC1512_MOUSE_PORT, pc1512_mouse_port_device, "pc1512_mouse_port", "Amstrad PC1512 mouse port") +DEFINE_DEVICE_TYPE(PC1512_MOUSE, pc1512_mouse_device, "pc1512_mouse", "Amstrad PC1512 mouse") @@ -31,7 +31,7 @@ const device_type PC1512_MOUSE = device_creator<pc1512_mouse_t>; device_pc1512_mouse_port_interface::device_pc1512_mouse_port_interface(const machine_config &mconfig, device_t &device) : device_slot_card_interface(mconfig, device) { - m_port = dynamic_cast<pc1512_mouse_port_t *>(device.owner()); + m_port = dynamic_cast<pc1512_mouse_port_device *>(device.owner()); } @@ -41,11 +41,11 @@ device_pc1512_mouse_port_interface::device_pc1512_mouse_port_interface(const mac //************************************************************************** //------------------------------------------------- -// pc1512_mouse_port_t - constructor +// pc1512_mouse_port_device - constructor //------------------------------------------------- -pc1512_mouse_port_t::pc1512_mouse_port_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - device_t(mconfig, PC1512_MOUSE_PORT, "Amstrad PC1512 mouse port", tag, owner, clock, "pc1512_mouse_port", __FILE__), +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), m_write_x(*this), m_write_y(*this), @@ -55,8 +55,8 @@ pc1512_mouse_port_t::pc1512_mouse_port_t(const machine_config &mconfig, const ch { } -pc1512_mouse_t::pc1512_mouse_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - device_t(mconfig, PC1512_MOUSE, "Amstrad PC1512 mouse", tag, owner, clock, "pc1512_mouse", __FILE__), +pc1512_mouse_device::pc1512_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + device_t(mconfig, PC1512_MOUSE, tag, owner, clock), device_pc1512_mouse_port_interface(mconfig, *this) { } @@ -66,7 +66,7 @@ pc1512_mouse_t::pc1512_mouse_t(const machine_config &mconfig, const char *tag, d // device_start - device-specific startup //------------------------------------------------- -void pc1512_mouse_port_t::device_start() +void pc1512_mouse_port_device::device_start() { m_device = dynamic_cast<device_pc1512_mouse_port_interface *>(get_card_device()); @@ -77,7 +77,7 @@ void pc1512_mouse_port_t::device_start() m_write_m2.resolve_safe(); } -void pc1512_mouse_t::device_start() +void pc1512_mouse_device::device_start() { } @@ -88,14 +88,14 @@ void pc1512_mouse_t::device_start() static INPUT_PORTS_START( mouse ) PORT_START("MOUSEB") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_NAME("Left Mouse Button") PORT_CODE(MOUSECODE_BUTTON1) PORT_CHANGED_MEMBER(DEVICE_SELF, pc1512_mouse_t, mouse_button_1_changed, 0) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_NAME("Right Mouse Button") PORT_CODE(MOUSECODE_BUTTON2) PORT_CHANGED_MEMBER(DEVICE_SELF, pc1512_mouse_t, mouse_button_2_changed, 0) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) 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_SPECIAL ) PORT_NAME("Right Mouse Button") PORT_CODE(MOUSECODE_BUTTON2) PORT_CHANGED_MEMBER(DEVICE_SELF, 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_t, 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, 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_t, 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, pc1512_mouse_device, mouse_y_changed, 0) INPUT_PORTS_END @@ -103,7 +103,7 @@ INPUT_PORTS_END // input_ports - device-specific input ports //------------------------------------------------- -ioport_constructor pc1512_mouse_t::device_input_ports() const +ioport_constructor pc1512_mouse_device::device_input_ports() const { return INPUT_PORTS_NAME( mouse ); } |