summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/h6280/h6280.cpp
diff options
context:
space:
mode:
author Vas Crabb <cuavas@users.noreply.github.com>2023-06-17 01:10:05 +1000
committer GitHub <noreply@github.com>2023-06-17 01:10:05 +1000
commite9c1f4a42a6758a6fb75403e28c7dc6cf869081c (patch)
tree8e0b6d960bed4baec2408c9ab950218592ef33ec /src/devices/cpu/h6280/h6280.cpp
parentc1ceb6e016763537c5109cc76fe5d1b4ae72fdb3 (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/cpu/h6280/h6280.cpp')
-rw-r--r--src/devices/cpu/h6280/h6280.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/devices/cpu/h6280/h6280.cpp b/src/devices/cpu/h6280/h6280.cpp
index a0b4115b19e..7bb01c3f6d5 100644
--- a/src/devices/cpu/h6280/h6280.cpp
+++ b/src/devices/cpu/h6280/h6280.cpp
@@ -172,7 +172,7 @@ h6280_device::h6280_device(const machine_config &mconfig, const char *tag, devic
, device_mixer_interface(mconfig, *this, 2)
, m_program_config("program", ENDIANNESS_LITTLE, 8, 21, 0, 16, 0, address_map_constructor(FUNC(h6280_device::internal_map), this))
, m_io_config("io", ENDIANNESS_LITTLE, 8, 2)
- , m_port_in_cb(*this)
+ , m_port_in_cb(*this, 0)
, m_port_out_cb(*this)
, m_psg(*this, "psg")
, m_timer_scale(1)
@@ -238,9 +238,6 @@ void h6280_device::device_add_mconfig(machine_config &config)
void h6280_device::device_start()
{
- m_port_in_cb.resolve();
- m_port_out_cb.resolve_safe();
-
// register our state for the debugger
state_add(STATE_GENPC, "GENPC", m_pc.w.l).noshow();
state_add(STATE_GENPCBASE, "CURPC", m_pc.w.l).noshow();
@@ -2582,7 +2579,7 @@ void h6280_device::timer_w(offs_t offset, uint8_t data)
uint8_t h6280_device::port_r()
{
- if (!m_port_in_cb.isnull())
+ if (!m_port_in_cb.isunset())
return m_port_in_cb();
else
return m_io_buffer;