From e9c1f4a42a6758a6fb75403e28c7dc6cf869081c Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sat, 17 Jun 2023 01:10:05 +1000 Subject: emu/devcb.h: Eliminated the need to call resolve() on callbacks. (#11333) Read callbacks now need a default return value supplied at construction. Replaced isnull() with isunset() which tells you if the callback wasn't configured rather than whether it isn't safe to call. Enabled validation of device callbacks (it seems it was disabled at some point, probably accidentally). Device callbacks and object finders now implement the same interface for resolution. --- src/devices/machine/z80pio.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/devices/machine/z80pio.cpp') diff --git a/src/devices/machine/z80pio.cpp b/src/devices/machine/z80pio.cpp index e1664055f21..4f40a1699f8 100644 --- a/src/devices/machine/z80pio.cpp +++ b/src/devices/machine/z80pio.cpp @@ -41,10 +41,10 @@ z80pio_device::z80pio_device(const machine_config &mconfig, const char *tag, dev device_t(mconfig, Z80PIO, tag, owner, clock), device_z80daisy_interface(mconfig, *this), m_out_int_cb(*this), - m_in_pa_cb(*this), + m_in_pa_cb(*this, 0), m_out_pa_cb(*this), m_out_ardy_cb(*this), - m_in_pb_cb(*this), + m_in_pb_cb(*this, 0), m_out_pb_cb(*this), m_out_brdy_cb(*this) { @@ -59,15 +59,6 @@ void z80pio_device::device_start() { m_port[PORT_A].start(this, PORT_A); m_port[PORT_B].start(this, PORT_B); - - // resolve callbacks - m_out_int_cb.resolve_safe(); - m_in_pa_cb.resolve_safe(0); - m_out_pa_cb.resolve_safe(); - m_out_ardy_cb.resolve_safe(); - m_in_pb_cb.resolve_safe(0); - m_out_pb_cb.resolve_safe(); - m_out_brdy_cb.resolve_safe(); } -- cgit v1.2.3-70-g09d2