diff options
Diffstat (limited to 'src/mame/machine/taitoio.cpp')
-rw-r--r-- | src/mame/machine/taitoio.cpp | 44 |
1 files changed, 41 insertions, 3 deletions
diff --git a/src/mame/machine/taitoio.cpp b/src/mame/machine/taitoio.cpp index 7ec4223c354..b13a09511d1 100644 --- a/src/mame/machine/taitoio.cpp +++ b/src/mame/machine/taitoio.cpp @@ -48,6 +48,11 @@ Newer version of the I/O chip ? #include "machine/taitoio.h" +MACHINE_CONFIG_FRAGMENT( taitoio ) + MCFG_WATCHDOG_ADD("watchdog") +MACHINE_CONFIG_END + + /***************************************************************************/ /* */ /* TC0220IOC */ @@ -58,6 +63,7 @@ const device_type TC0220IOC = &device_creator<tc0220ioc_device>; tc0220ioc_device::tc0220ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, TC0220IOC, "Taito TC0220IOC", tag, owner, clock, "tc0220ioc", __FILE__), + m_watchdog(*this, "watchdog"), m_read_0_cb(*this), m_read_1_cb(*this), m_read_2_cb(*this), @@ -94,6 +100,16 @@ void tc0220ioc_device::device_reset() elem = 0; } +//------------------------------------------------- +// device_mconfig_additions - return a pointer to +// the device's machine fragment +//------------------------------------------------- + +machine_config_constructor tc0220ioc_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( taitoio ); +} + /***************************************************************************** DEVICE HANDLERS *****************************************************************************/ @@ -132,7 +148,7 @@ WRITE8_MEMBER( tc0220ioc_device::write ) switch (offset) { case 0x00: - machine().watchdog_reset(); + m_watchdog->watchdog_reset(); break; case 0x04: /* coin counters and lockout, hi nibble irrelevant */ @@ -184,6 +200,7 @@ const device_type TC0510NIO = &device_creator<tc0510nio_device>; tc0510nio_device::tc0510nio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, TC0510NIO, "Taito TC0510NIO", tag, owner, clock, "tc0510nio", __FILE__), + m_watchdog(*this, "watchdog"), m_read_0_cb(*this), m_read_1_cb(*this), m_read_2_cb(*this), @@ -217,6 +234,16 @@ void tc0510nio_device::device_reset() elem = 0; } +//------------------------------------------------- +// device_mconfig_additions - return a pointer to +// the device's machine fragment +//------------------------------------------------- + +machine_config_constructor tc0510nio_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( taitoio ); +} + /***************************************************************************** DEVICE HANDLERS *****************************************************************************/ @@ -256,7 +283,7 @@ WRITE8_MEMBER( tc0510nio_device::write ) switch (offset) { case 0x00: - machine().watchdog_reset(); + m_watchdog->watchdog_reset(); break; case 0x04: /* coin counters and lockout */ @@ -311,6 +338,7 @@ const device_type TC0640FIO = &device_creator<tc0640fio_device>; tc0640fio_device::tc0640fio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, TC0640FIO, "Taito TC0640FIO", tag, owner, clock, "tc0640fio", __FILE__), + m_watchdog(*this, "watchdog"), m_read_0_cb(*this), m_read_1_cb(*this), m_read_2_cb(*this), @@ -344,6 +372,16 @@ void tc0640fio_device::device_reset() elem = 0; } +//------------------------------------------------- +// device_mconfig_additions - return a pointer to +// the device's machine fragment +//------------------------------------------------- + +machine_config_constructor tc0640fio_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( taitoio ); +} + /***************************************************************************** DEVICE HANDLERS @@ -383,7 +421,7 @@ WRITE8_MEMBER( tc0640fio_device::write ) switch (offset) { case 0x00: - machine().watchdog_reset(); + m_watchdog->watchdog_reset(); break; case 0x04: /* coin counters and lockout */ |