From d205197fe000f59f378156639bffd04bce6ecfc3 Mon Sep 17 00:00:00 2001 From: AJR Date: Mon, 21 May 2018 02:27:48 -0400 Subject: mhavoc.cpp: Use device finder for TMS5220 (nw) --- src/mame/drivers/mhavoc.cpp | 1 - src/mame/includes/mhavoc.h | 3 +++ src/mame/machine/mhavoc.cpp | 7 ++----- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/mame/drivers/mhavoc.cpp b/src/mame/drivers/mhavoc.cpp index d7cb481a4bf..f5811e15d88 100644 --- a/src/mame/drivers/mhavoc.cpp +++ b/src/mame/drivers/mhavoc.cpp @@ -192,7 +192,6 @@ #include "machine/atari_vg.h" #include "video/avgdvg.h" #include "video/vector.h" -#include "sound/tms5220.h" #include "machine/nvram.h" #include "machine/watchdog.h" #include "screen.h" diff --git a/src/mame/includes/mhavoc.h b/src/mame/includes/mhavoc.h index 1b2aa3ec738..e34cea36a40 100644 --- a/src/mame/includes/mhavoc.h +++ b/src/mame/includes/mhavoc.h @@ -8,6 +8,7 @@ #include "machine/timer.h" #include "sound/pokey.h" +#include "sound/tms5220.h" #define MHAVOC_CLOCK 10000000 #define MHAVOC_CLOCK_5M (MHAVOC_CLOCK/2) @@ -30,6 +31,7 @@ public: m_alpha(*this, "alpha"), m_gamma(*this, "gamma"), m_pokey(*this, "pokey%u", 1U), + m_tms(*this, "tms"), m_lamp(*this, "lamp%u", 0U) { } @@ -76,6 +78,7 @@ protected: required_device m_alpha; optional_device m_gamma; optional_device_array m_pokey; + optional_device m_tms; output_finder<2> m_lamp; uint8_t m_alpha_data; uint8_t m_alpha_rcvd; diff --git a/src/mame/machine/mhavoc.cpp b/src/mame/machine/mhavoc.cpp index 3c075767ed9..23183d12f55 100644 --- a/src/mame/machine/mhavoc.cpp +++ b/src/mame/machine/mhavoc.cpp @@ -7,7 +7,6 @@ ***************************************************************************/ #include "emu.h" -#include "sound/tms5220.h" #include "cpu/m6502/m6502.h" #include "includes/mhavoc.h" @@ -207,8 +206,7 @@ WRITE8_MEMBER(mhavoc_state::mhavoc_rom_banksel_w) CUSTOM_INPUT_MEMBER(mhavoc_state::tms5220_r) { - tms5220_device *tms5220 = machine().device("tms"); - return tms5220->readyq_r() ? 1 : 0; + return m_tms->readyq_r() ? 1 : 0; } CUSTOM_INPUT_MEMBER(mhavoc_state::mhavoc_bit67_r) @@ -316,8 +314,7 @@ WRITE8_MEMBER(mhavoc_state::mhavocrv_speech_data_w) WRITE8_MEMBER(mhavoc_state::mhavocrv_speech_strobe_w) { - tms5220_device *tms5220 = machine().device("tms"); - tms5220->data_w(space, 0, m_speech_write_buffer); + m_tms->data_w(space, 0, m_speech_write_buffer); } /************************************* -- cgit v1.2.3