diff options
author | 2023-06-17 01:10:05 +1000 | |
---|---|---|
committer | 2023-06-17 01:10:05 +1000 | |
commit | e9c1f4a42a6758a6fb75403e28c7dc6cf869081c (patch) | |
tree | 8e0b6d960bed4baec2408c9ab950218592ef33ec /src/devices/machine/z8536.cpp | |
parent | c1ceb6e016763537c5109cc76fe5d1b4ae72fdb3 (diff) |
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.
Diffstat (limited to 'src/devices/machine/z8536.cpp')
-rw-r--r-- | src/devices/machine/z8536.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/devices/machine/z8536.cpp b/src/devices/machine/z8536.cpp index c30868d0dbb..cb1fa74adb6 100644 --- a/src/devices/machine/z8536.cpp +++ b/src/devices/machine/z8536.cpp @@ -779,11 +779,11 @@ void cio_base_device::external_port_w(int port, int bit, int state) cio_base_device::cio_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, type, tag, owner, clock), m_write_irq(*this), - m_read_pa(*this), + m_read_pa(*this, 0), m_write_pa(*this), - m_read_pb(*this), + m_read_pb(*this, 0), m_write_pb(*this), - m_read_pc(*this), + m_read_pc(*this, 0), m_write_pc(*this), m_irq(CLEAR_LINE) { @@ -829,15 +829,6 @@ void cio_base_device::device_start() m_timer = timer_alloc(FUNC(cio_base_device::advance_counters), this); m_timer->adjust(attotime::from_hz(clock() / 2), 0, attotime::from_hz(clock() / 2)); - // resolve callbacks - m_write_irq.resolve_safe(); - m_read_pa.resolve_safe(0); - m_write_pa.resolve_safe(); - m_read_pb.resolve_safe(0); - m_write_pb.resolve_safe(); - m_read_pc.resolve_safe(0); - m_write_pc.resolve_safe(); - save_item(NAME(m_irq)); save_item(NAME(m_register)); save_item(NAME(m_input)); |