diff options
Diffstat (limited to 'src/mame/machine/namco_c148.cpp')
-rw-r--r-- | src/mame/machine/namco_c148.cpp | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/src/mame/machine/namco_c148.cpp b/src/mame/machine/namco_c148.cpp index a9492710cb9..262ced95964 100644 --- a/src/mame/machine/namco_c148.cpp +++ b/src/mame/machine/namco_c148.cpp @@ -69,8 +69,8 @@ namco_c148_device::namco_c148_device(const machine_config &mconfig, const char * : device_t(mconfig, NAMCO_C148, tag, owner, clock), m_out_ext1_cb(*this), m_out_ext2_cb(*this), - m_hostcpu_tag(nullptr), - m_linked_c148_tag(finder_base::DUMMY_TAG) + m_hostcpu(*this, finder_base::DUMMY_TAG), + m_linked_c148(*this, finder_base::DUMMY_TAG) { } @@ -104,10 +104,6 @@ void namco_c148_device::map(address_map &map) void namco_c148_device::device_start() { - m_hostcpu = machine().device<cpu_device>(m_hostcpu_tag); - m_linked_c148 = machine().device<namco_c148_device>(m_linked_c148_tag); - assert(m_hostcpu != nullptr); - m_out_ext1_cb.resolve_safe(); m_out_ext2_cb.resolve_safe(); @@ -136,25 +132,6 @@ void namco_c148_device::device_reset() m_irqlevel.cpu = 0; } -//------------------------------------------------- -// device_validity_check - device-specific checks -//------------------------------------------------- - -void namco_c148_device::device_validity_check(validity_checker &valid) const -{ - device_t *const hostcpu = mconfig().root_device().subdevice(m_hostcpu_tag); - if (!hostcpu) - osd_printf_error("Host CPU device %s not found\n", m_hostcpu_tag ? m_hostcpu_tag : "<nullptr>"); - else if (!dynamic_cast<cpu_device *>(hostcpu)) - osd_printf_error("Host CPU device %s is not an instance of cpu_device\n", m_hostcpu_tag ? m_hostcpu_tag : "<nullptr>"); - - device_t *const linked_c148 = mconfig().root_device().subdevice(m_linked_c148_tag); - if ((finder_base::DUMMY_TAG != m_linked_c148_tag) && !linked_c148) - osd_printf_error("Linked C148 device %s not found\n", m_linked_c148_tag ? m_linked_c148_tag : "<nullptr>"); - else if (linked_c148 && !dynamic_cast<namco_c148_device *>(linked_c148)) - osd_printf_error("Linked C148 device %s is not an instance of c148_device\n", m_linked_c148_tag ? m_linked_c148_tag : "<nullptr>"); -} - //************************************************************************** // IRQ section //************************************************************************** |