summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-05-21 02:27:48 -0400
committer AJR <ajrhacker@users.noreply.github.com>2018-05-21 02:27:48 -0400
commitd205197fe000f59f378156639bffd04bce6ecfc3 (patch)
tree2fae7f56eda102dfbeb856ac65400ed84267f745
parent5844d38beba702c9e27d7e52f42845c4ff62ca52 (diff)
mhavoc.cpp: Use device finder for TMS5220 (nw)
-rw-r--r--src/mame/drivers/mhavoc.cpp1
-rw-r--r--src/mame/includes/mhavoc.h3
-rw-r--r--src/mame/machine/mhavoc.cpp7
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<cpu_device> m_alpha;
optional_device<cpu_device> m_gamma;
optional_device_array<pokey_device, 4> m_pokey;
+ optional_device<tms5220_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<tms5220_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<tms5220_device>("tms");
- tms5220->data_w(space, 0, m_speech_write_buffer);
+ m_tms->data_w(space, 0, m_speech_write_buffer);
}
/*************************************