mirror of
https://github.com/holub/mame
synced 2025-10-09 01:39:48 +03:00
mhavoc.cpp: Use device finder for TMS5220 (nw)
This commit is contained in:
parent
5844d38beb
commit
d205197fe0
@ -192,7 +192,6 @@
|
|||||||
#include "machine/atari_vg.h"
|
#include "machine/atari_vg.h"
|
||||||
#include "video/avgdvg.h"
|
#include "video/avgdvg.h"
|
||||||
#include "video/vector.h"
|
#include "video/vector.h"
|
||||||
#include "sound/tms5220.h"
|
|
||||||
#include "machine/nvram.h"
|
#include "machine/nvram.h"
|
||||||
#include "machine/watchdog.h"
|
#include "machine/watchdog.h"
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#include "machine/timer.h"
|
#include "machine/timer.h"
|
||||||
#include "sound/pokey.h"
|
#include "sound/pokey.h"
|
||||||
|
#include "sound/tms5220.h"
|
||||||
|
|
||||||
#define MHAVOC_CLOCK 10000000
|
#define MHAVOC_CLOCK 10000000
|
||||||
#define MHAVOC_CLOCK_5M (MHAVOC_CLOCK/2)
|
#define MHAVOC_CLOCK_5M (MHAVOC_CLOCK/2)
|
||||||
@ -30,6 +31,7 @@ public:
|
|||||||
m_alpha(*this, "alpha"),
|
m_alpha(*this, "alpha"),
|
||||||
m_gamma(*this, "gamma"),
|
m_gamma(*this, "gamma"),
|
||||||
m_pokey(*this, "pokey%u", 1U),
|
m_pokey(*this, "pokey%u", 1U),
|
||||||
|
m_tms(*this, "tms"),
|
||||||
m_lamp(*this, "lamp%u", 0U)
|
m_lamp(*this, "lamp%u", 0U)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
@ -76,6 +78,7 @@ protected:
|
|||||||
required_device<cpu_device> m_alpha;
|
required_device<cpu_device> m_alpha;
|
||||||
optional_device<cpu_device> m_gamma;
|
optional_device<cpu_device> m_gamma;
|
||||||
optional_device_array<pokey_device, 4> m_pokey;
|
optional_device_array<pokey_device, 4> m_pokey;
|
||||||
|
optional_device<tms5220_device> m_tms;
|
||||||
output_finder<2> m_lamp;
|
output_finder<2> m_lamp;
|
||||||
uint8_t m_alpha_data;
|
uint8_t m_alpha_data;
|
||||||
uint8_t m_alpha_rcvd;
|
uint8_t m_alpha_rcvd;
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "sound/tms5220.h"
|
|
||||||
#include "cpu/m6502/m6502.h"
|
#include "cpu/m6502/m6502.h"
|
||||||
#include "includes/mhavoc.h"
|
#include "includes/mhavoc.h"
|
||||||
|
|
||||||
@ -207,8 +206,7 @@ WRITE8_MEMBER(mhavoc_state::mhavoc_rom_banksel_w)
|
|||||||
|
|
||||||
CUSTOM_INPUT_MEMBER(mhavoc_state::tms5220_r)
|
CUSTOM_INPUT_MEMBER(mhavoc_state::tms5220_r)
|
||||||
{
|
{
|
||||||
tms5220_device *tms5220 = machine().device<tms5220_device>("tms");
|
return m_tms->readyq_r() ? 1 : 0;
|
||||||
return tms5220->readyq_r() ? 1 : 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CUSTOM_INPUT_MEMBER(mhavoc_state::mhavoc_bit67_r)
|
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)
|
WRITE8_MEMBER(mhavoc_state::mhavocrv_speech_strobe_w)
|
||||||
{
|
{
|
||||||
tms5220_device *tms5220 = machine().device<tms5220_device>("tms");
|
m_tms->data_w(space, 0, m_speech_write_buffer);
|
||||||
tms5220->data_w(space, 0, m_speech_write_buffer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************
|
/*************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user