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/68153bim.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/devices/machine/68153bim.cpp') diff --git a/src/devices/machine/68153bim.cpp b/src/devices/machine/68153bim.cpp index f00eb88bf10..85758b13b56 100644 --- a/src/devices/machine/68153bim.cpp +++ b/src/devices/machine/68153bim.cpp @@ -86,7 +86,7 @@ bim68153_device::bim68153_device(const machine_config &mconfig, device_type type , m_out_int_cb(*this) , m_out_intal0_cb(*this) , m_out_intal1_cb(*this) - , m_out_iackout_cb(*this) + , m_out_iackout_cb(*this, 0) , m_iackin(ASSERT_LINE) , m_irq_level(0) { @@ -126,11 +126,6 @@ int bim68153_device::get_channel_index(bim68153_channel *ch) void bim68153_device::device_start() { LOG("%s\n", FUNCNAME); - // resolve callbacks - m_out_int_cb.resolve_safe(); - m_out_intal0_cb.resolve_safe(); - m_out_intal1_cb.resolve_safe(); - m_out_iackout_cb.resolve_safe(0); } //------------------------------------------------- @@ -318,7 +313,7 @@ void bim68153_device::write(offs_t offset, uint8_t data) bim68153_channel::bim68153_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MC68153_CHANNEL, tag, owner, clock) - , m_out_iack_cb(*this) + , m_out_iack_cb(*this, 0) , m_int_state(NONE) , m_control(0) , m_vector(0) @@ -341,9 +336,6 @@ void bim68153_channel::device_start() save_item(NAME(m_control)); save_item(NAME(m_vector)); save_item(NAME(m_int_state)); - - // Resolve callbacks - m_out_iack_cb.resolve_safe(0); } -- cgit v1.2.3-70-g09d2