summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/sunmouse/sunmouse.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/sunmouse/sunmouse.cpp')
-rw-r--r--src/devices/bus/sunmouse/sunmouse.cpp27
1 files changed, 3 insertions, 24 deletions
diff --git a/src/devices/bus/sunmouse/sunmouse.cpp b/src/devices/bus/sunmouse/sunmouse.cpp
index 9b59529c54a..035a01cc7d7 100644
--- a/src/devices/bus/sunmouse/sunmouse.cpp
+++ b/src/devices/bus/sunmouse/sunmouse.cpp
@@ -97,7 +97,7 @@ sun_mouse_port_device::sun_mouse_port_device(
device_t *owner,
uint32_t clock)
: device_t(mconfig, type, tag, owner, clock)
- , device_slot_interface(mconfig, *this)
+ , device_single_card_slot_interface<device_sun_mouse_port_interface>(mconfig, *this)
, m_rxd(0)
, m_rxd_handler(*this)
, m_dev(nullptr)
@@ -112,20 +112,7 @@ sun_mouse_port_device::~sun_mouse_port_device()
void sun_mouse_port_device::device_config_complete()
{
- m_dev = dynamic_cast<device_sun_mouse_port_interface *>(get_card_device());
-}
-
-
-void sun_mouse_port_device::device_validity_check(validity_checker &valid) const
-{
- device_t *const card(get_card_device());
- if (card && !dynamic_cast<device_sun_mouse_port_interface *>(card))
- {
- osd_printf_error(
- "Card device %s (%s) does not implement device_sun_mouse_port_interface\n",
- card->tag(),
- card->name());
- }
+ m_dev = get_card_device();
}
@@ -139,14 +126,6 @@ void sun_mouse_port_device::device_resolve_objects()
void sun_mouse_port_device::device_start()
{
- if (get_card_device() && !m_dev)
- {
- throw emu_fatalerror(
- "Card device %s (%s) does not implement device_sun_mouse_port_interface\n",
- get_card_device()->tag(),
- get_card_device()->name());
- }
-
save_item(NAME(m_rxd));
if (!m_dev)
@@ -163,7 +142,7 @@ WRITE_LINE_MEMBER( sun_mouse_port_device::write_txd )
device_sun_mouse_port_interface::device_sun_mouse_port_interface(machine_config const &mconfig, device_t &device)
- : device_slot_card_interface(mconfig, device)
+ : device_interface(device, "sunmouse")
, m_port(dynamic_cast<sun_mouse_port_device *>(device.owner()))
{
}