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/i8355.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/i8355.cpp')
-rw-r--r-- | src/devices/machine/i8355.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/devices/machine/i8355.cpp b/src/devices/machine/i8355.cpp index caa31eb7e1a..501120ae79d 100644 --- a/src/devices/machine/i8355.cpp +++ b/src/devices/machine/i8355.cpp @@ -87,13 +87,13 @@ inline void i8355_device::write_port(int port, u8 data) // i8355_device - constructor //------------------------------------------------- -i8355_device::i8355_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) - : device_t(mconfig, I8355, tag, owner, clock), - m_in_pa_cb(*this), - m_out_pa_cb(*this), - m_in_pb_cb(*this), - m_out_pb_cb(*this), - m_rom(*this, DEVICE_SELF) +i8355_device::i8355_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : + device_t(mconfig, I8355, tag, owner, clock), + m_in_pa_cb(*this, 0), + m_out_pa_cb(*this), + m_in_pb_cb(*this, 0), + m_out_pb_cb(*this), + m_rom(*this, DEVICE_SELF) { } @@ -103,12 +103,6 @@ i8355_device::i8355_device(const machine_config &mconfig, const char *tag, devic void i8355_device::device_start() { - // resolve callbacks - m_in_pa_cb.resolve_safe(0); - m_in_pb_cb.resolve_safe(0); - m_out_pa_cb.resolve_safe(); - m_out_pb_cb.resolve_safe(); - // register for state saving save_item(NAME(m_output)); save_item(NAME(m_ddr)); |