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/sound/mos6560.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/sound/mos6560.cpp')
-rw-r--r-- | src/devices/sound/mos6560.cpp | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/devices/sound/mos6560.cpp b/src/devices/sound/mos6560.cpp index bd35429c31c..eebb6ee252e 100644 --- a/src/devices/sound/mos6560.cpp +++ b/src/devices/sound/mos6560.cpp @@ -680,16 +680,16 @@ void mos6560_device::mos6560_colorram_map(address_map &map) map(0x000, 0x3ff).ram(); } -mos6560_device::mos6560_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) - : device_t(mconfig, type, tag, owner, clock), - device_memory_interface(mconfig, *this), - device_sound_interface(mconfig, *this), - device_video_interface(mconfig, *this), - m_variant(variant), - m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, address_map_constructor(FUNC(mos6560_device::mos6560_videoram_map), this)), - m_colorram_space_config("colorram", ENDIANNESS_LITTLE, 8, 10, 0, address_map_constructor(FUNC(mos6560_device::mos6560_colorram_map), this)), - m_read_potx(*this), - m_read_poty(*this) +mos6560_device::mos6560_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) : + device_t(mconfig, type, tag, owner, clock), + device_memory_interface(mconfig, *this), + device_sound_interface(mconfig, *this), + device_video_interface(mconfig, *this), + m_variant(variant), + m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, address_map_constructor(FUNC(mos6560_device::mos6560_videoram_map), this)), + m_colorram_space_config("colorram", ENDIANNESS_LITTLE, 8, 10, 0, address_map_constructor(FUNC(mos6560_device::mos6560_colorram_map), this)), + m_read_potx(*this, 0xff), + m_read_poty(*this, 0xff) { } @@ -731,10 +731,6 @@ void mos6560_device::device_start() { screen().register_screen_bitmap(m_bitmap); - // resolve callbacks - m_read_potx.resolve_safe(0xff); - m_read_poty.resolve_safe(0xff); - switch (m_variant) { case TYPE_6560: |