summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine/petcass.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mess/machine/petcass.c')
-rw-r--r--src/mess/machine/petcass.c32
1 files changed, 5 insertions, 27 deletions
diff --git a/src/mess/machine/petcass.c b/src/mess/machine/petcass.c
index 6ebe89e6bb0..bfe065a6d48 100644
--- a/src/mess/machine/petcass.c
+++ b/src/mess/machine/petcass.c
@@ -53,8 +53,9 @@ device_pet_datassette_port_interface::~device_pet_datassette_port_interface()
//-------------------------------------------------
pet_datassette_port_device::pet_datassette_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, PET_DATASSETTE_PORT, "Datassette Port", tag, owner, clock),
- device_slot_interface(mconfig, *this)
+ device_t(mconfig, PET_DATASSETTE_PORT, "Datassette Port", tag, owner, clock),
+ device_slot_interface(mconfig, *this),
+ m_read_handler(*this)
{
}
@@ -69,29 +70,6 @@ pet_datassette_port_device::~pet_datassette_port_device()
//-------------------------------------------------
-// device_config_complete - perform any
-// operations now that the configuration is
-// complete
-//-------------------------------------------------
-
-void pet_datassette_port_device::device_config_complete()
-{
- // inherit a copy of the static data
- const pet_datassette_port_interface *intf = reinterpret_cast<const pet_datassette_port_interface *>(static_config());
- if (intf != NULL)
- {
- *static_cast<pet_datassette_port_interface *>(this) = *intf;
- }
-
- // or initialize to defaults if none provided
- else
- {
- memset(&m_out_read_cb, 0, sizeof(m_out_read_cb));
- }
-}
-
-
-//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@@ -100,7 +78,7 @@ void pet_datassette_port_device::device_start()
m_cart = dynamic_cast<device_pet_datassette_port_interface *>(get_card_device());
// resolve callbacks
- m_out_read_func.resolve(m_out_read_cb, *this);
+ m_read_handler.resolve_safe();
}
@@ -109,4 +87,4 @@ WRITE_LINE_MEMBER( pet_datassette_port_device::write ) { if (m_cart != NULL) m_c
READ_LINE_MEMBER( pet_datassette_port_device::sense_r ) { int state = 1; if (m_cart != NULL) state = m_cart->datassette_sense(); return state; }
WRITE_LINE_MEMBER( pet_datassette_port_device::motor_w ) { if (m_cart != NULL) m_cart->datassette_motor(state); }
-WRITE_LINE_MEMBER( pet_datassette_port_device::read_w ) { m_out_read_func(state); }
+WRITE_LINE_MEMBER( pet_datassette_port_device::read_w ) { m_read_handler(state); }