summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/adamnet/adamnet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/adamnet/adamnet.cpp')
-rw-r--r--src/devices/bus/adamnet/adamnet.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/devices/bus/adamnet/adamnet.cpp b/src/devices/bus/adamnet/adamnet.cpp
index 7e45a72adca..c2886c61248 100644
--- a/src/devices/bus/adamnet/adamnet.cpp
+++ b/src/devices/bus/adamnet/adamnet.cpp
@@ -28,8 +28,8 @@ DEFINE_DEVICE_TYPE(ADAMNET_SLOT, adamnet_slot_device, "adamnet_slot", "ADAMnet s
// device_adamnet_card_interface - constructor
//-------------------------------------------------
-device_adamnet_card_interface::device_adamnet_card_interface(const machine_config &mconfig, device_t &device)
- : device_slot_card_interface(mconfig, device),
+device_adamnet_card_interface::device_adamnet_card_interface(const machine_config &mconfig, device_t &device) :
+ device_interface(device, "adamnet"),
m_bus(nullptr)
{
}
@@ -54,7 +54,8 @@ device_adamnet_card_interface::~device_adamnet_card_interface()
//-------------------------------------------------
adamnet_slot_device::adamnet_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, ADAMNET_SLOT, tag, owner, clock),
- device_slot_interface(mconfig, *this), m_bus(nullptr)
+ device_single_card_slot_interface<device_adamnet_card_interface>(mconfig, *this),
+ m_bus(*this, finder_base::DUMMY_TAG)
{
}
@@ -65,9 +66,8 @@ adamnet_slot_device::adamnet_slot_device(const machine_config &mconfig, const ch
void adamnet_slot_device::device_start()
{
- m_bus = machine().device<adamnet_device>(ADAMNET_TAG);
- device_adamnet_card_interface *dev = dynamic_cast<device_adamnet_card_interface *>(get_card_device());
- if (dev) m_bus->add_device(get_card_device());
+ device_adamnet_card_interface *dev = get_card_device();
+ if (dev) m_bus->add_device(&dev->device());
}
@@ -113,7 +113,7 @@ void adamnet_device::device_stop()
void adamnet_device::add_device(device_t *target)
{
- auto entry = global_alloc(daisy_entry(target));
+ auto entry = new daisy_entry(target);
entry->m_interface->m_bus = this;
@@ -139,7 +139,7 @@ adamnet_device::daisy_entry::daisy_entry(device_t *device)
// rxd_r - receive data
//-------------------------------------------------
-READ_LINE_MEMBER( adamnet_device::rxd_r )
+int adamnet_device::rxd_r()
{
int state = m_txd;//1;
@@ -184,7 +184,7 @@ int adamnet_device::rxd_r(device_t *device)
// txd_w - transmit data
//-------------------------------------------------
-WRITE_LINE_MEMBER( adamnet_device::txd_w )
+void adamnet_device::txd_w(int state)
{
if (m_txd != state)
{
@@ -221,7 +221,7 @@ void adamnet_device::txd_w(device_t *device, int state)
// reset_r - bus reset
//-------------------------------------------------
-READ_LINE_MEMBER( adamnet_device::reset_r )
+int adamnet_device::reset_r()
{
return m_reset;
}
@@ -231,7 +231,7 @@ READ_LINE_MEMBER( adamnet_device::reset_r )
// reset_w - bus reset
//-------------------------------------------------
-WRITE_LINE_MEMBER( adamnet_device::reset_w )
+void adamnet_device::reset_w(int state)
{
m_reset = state;