summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-02-18 11:07:44 -0500
committer AJR <ajrhacker@users.noreply.github.com>2018-02-18 11:07:44 -0500
commitb88a6b918c38cc082dc8d01420a2fe7320966289 (patch)
tree1392316755afcf0a9dc871fb5fd106689b4bd0b1
parentf6d153a909566db648dbd7796066f9b7fca7b314 (diff)
ssozumo: Soundlatch modernization (nw)
-rw-r--r--src/mame/drivers/ssozumo.cpp10
-rw-r--r--src/mame/includes/ssozumo.h6
2 files changed, 3 insertions, 13 deletions
diff --git a/src/mame/drivers/ssozumo.cpp b/src/mame/drivers/ssozumo.cpp
index 0b5dae623ab..2c8a2f32d42 100644
--- a/src/mame/drivers/ssozumo.cpp
+++ b/src/mame/drivers/ssozumo.cpp
@@ -14,6 +14,7 @@ Driver by Takahiro Nogi (nogi@kt.rim.or.jp) 1999/10/04
#include "cpu/m6502/m6502.h"
#include "cpu/m6809/m6809.h"
+#include "machine/gen_latch.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
#include "sound/volt_reg.h"
@@ -26,12 +27,6 @@ void ssozumo_state::machine_start()
save_item(NAME(m_sound_nmi_mask));
}
-WRITE8_MEMBER(ssozumo_state::sh_command_w)
-{
- m_soundlatch->write(space, 0, data);
- m_audiocpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
-}
-
ADDRESS_MAP_START(ssozumo_state::ssozumo_map)
AM_RANGE(0x0000, 0x077f) AM_RAM
@@ -43,7 +38,7 @@ ADDRESS_MAP_START(ssozumo_state::ssozumo_map)
AM_RANGE(0x3400, 0x35ff) AM_RAM
AM_RANGE(0x3600, 0x37ff) AM_RAM
AM_RANGE(0x4000, 0x4000) AM_READ_PORT("P1") AM_WRITE(flipscreen_w)
- AM_RANGE(0x4010, 0x4010) AM_READ_PORT("P2") AM_WRITE(sh_command_w)
+ AM_RANGE(0x4010, 0x4010) AM_READ_PORT("P2") AM_DEVWRITE("soundlatch", generic_latch_8_device, write)
AM_RANGE(0x4020, 0x4020) AM_READ_PORT("DSW2") AM_WRITE(scroll_w)
AM_RANGE(0x4030, 0x4030) AM_READ_PORT("DSW1")
// AM_RANGE(0x4030, 0x4030) AM_WRITEONLY
@@ -227,6 +222,7 @@ MACHINE_CONFIG_START(ssozumo_state::ssozumo)
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
+ MCFG_GENERIC_LATCH_DATA_PENDING_CB(INPUTLINE("audiocpu", m6502_device::IRQ_LINE))
MCFG_SOUND_ADD("ay1", YM2149, 1500000)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
diff --git a/src/mame/includes/ssozumo.h b/src/mame/includes/ssozumo.h
index e33713be1cc..4e0abd9c437 100644
--- a/src/mame/includes/ssozumo.h
+++ b/src/mame/includes/ssozumo.h
@@ -1,8 +1,6 @@
// license:BSD-3-Clause
// copyright-holders:Takahiro Nogi
-#include "machine/gen_latch.h"
-
class ssozumo_state : public driver_device
{
public:
@@ -12,7 +10,6 @@ public:
m_audiocpu(*this, "audiocpu"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
- m_soundlatch(*this, "soundlatch"),
m_spriteram(*this, "spriteram"),
m_paletteram(*this, "paletteram"),
m_videoram(*this, "videoram"),
@@ -20,8 +17,6 @@ public:
m_videoram2(*this, "videoram2"),
m_colorram2(*this, "colorram2") { }
-
- DECLARE_WRITE8_MEMBER(sh_command_w);
DECLARE_WRITE8_MEMBER(sound_nmi_mask_w);
DECLARE_WRITE8_MEMBER(videoram_w);
DECLARE_WRITE8_MEMBER(colorram_w);
@@ -53,7 +48,6 @@ private:
required_device<cpu_device> m_audiocpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
- required_device<generic_latch_8_device> m_soundlatch;
required_shared_ptr<uint8_t> m_spriteram;
required_shared_ptr<uint8_t> m_paletteram;