diff options
Diffstat (limited to 'src/mame/drivers/spartanxtec.cpp')
-rw-r--r-- | src/mame/drivers/spartanxtec.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/mame/drivers/spartanxtec.cpp b/src/mame/drivers/spartanxtec.cpp index 3d267d47276..7cd0a9f9b8a 100644 --- a/src/mame/drivers/spartanxtec.cpp +++ b/src/mame/drivers/spartanxtec.cpp @@ -22,6 +22,7 @@ probably an original bug? #include "emu.h" #include "cpu/z80/z80.h" #include "includes/iremipt.h" +#include "machine/gen_latch.h" #include "sound/ay8910.h" class spartanxtec_state : public driver_device @@ -36,7 +37,8 @@ public: m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), m_palette(*this, "palette"), - m_gfxdecode(*this, "gfxdecode") + m_gfxdecode(*this, "gfxdecode"), + m_soundlatch(*this, "soundlatch") { } required_shared_ptr<UINT8> m_m62_tileram; @@ -45,6 +47,9 @@ public: required_shared_ptr<UINT8> m_scroll_hi; required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; + required_device<palette_device> m_palette; + required_device<gfxdecode_device> m_gfxdecode; + required_device<generic_latch_8_device> m_soundlatch; virtual void machine_start() override; virtual void machine_reset() override; @@ -60,11 +65,6 @@ public: DECLARE_WRITE8_MEMBER(a801_w); DECLARE_WRITE8_MEMBER(sound_irq_ack); DECLARE_WRITE8_MEMBER(irq_ack); - - required_device<palette_device> m_palette; - required_device<gfxdecode_device> m_gfxdecode; - - }; @@ -161,7 +161,7 @@ UINT32 spartanxtec_state::screen_update_spartanxtec(screen_device &screen, bitma WRITE8_MEMBER(spartanxtec_state::spartanxtec_soundlatch_w) { - soundlatch_byte_w(space, 0, data); + m_soundlatch->write(space, 0, data); m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -213,7 +213,7 @@ static ADDRESS_MAP_START( spartanxtec_sound_map, AS_PROGRAM, 8, spartanxtec_stat AM_RANGE(0x0000, 0x0fff) AM_ROM AM_RANGE(0x8000, 0x83ff) AM_RAM - AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_byte_r) + AM_RANGE(0xc000, 0xc000) AM_DEVREAD("soundlatch", generic_latch_8_device, read) ADDRESS_MAP_END static ADDRESS_MAP_START( spartanxtec_sound_io, AS_IO, 8, spartanxtec_state ) @@ -383,6 +383,8 @@ static MACHINE_CONFIG_START( spartanxtec, spartanxtec_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_GENERIC_LATCH_8_ADD("soundlatch") + MCFG_SOUND_ADD("ay1", AY8910, 1000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) MCFG_SOUND_ADD("ay2", AY8910, 1000000) |