summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/silvmil.cpp
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2016-05-27 18:49:47 +0200
committer Ivan Vangelista <mesgnet@yahoo.it>2016-05-27 18:49:47 +0200
commit66cf70ac29f954ae0c47367e86b3d93aadabafb8 (patch)
treec7c20912b4b1931ccd5459326f8791896c43c1e3 /src/mame/drivers/silvmil.cpp
parentc59746f038e7fc92435b81e1604b0e3f9fe508c6 (diff)
some more gen_latch.cpp (nw)
Diffstat (limited to 'src/mame/drivers/silvmil.cpp')
-rw-r--r--src/mame/drivers/silvmil.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mame/drivers/silvmil.cpp b/src/mame/drivers/silvmil.cpp
index fed4f7976be..72948726546 100644
--- a/src/mame/drivers/silvmil.cpp
+++ b/src/mame/drivers/silvmil.cpp
@@ -26,6 +26,7 @@ Very likely to be 'whatever crystals we had on hand which were close enough for
#include "emu.h"
#include "cpu/z80/z80.h"
#include "cpu/m68000/m68000.h"
+#include "machine/gen_latch.h"
#include "sound/okim6295.h"
#include "video/decospr.h"
#include "sound/2151intf.h"
@@ -39,6 +40,7 @@ public:
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
m_sprgen(*this, "spritegen"),
+ m_soundlatch(*this, "soundlatch"),
m_bg_videoram(*this, "bg_videoram"),
m_fg_videoram(*this, "fg_videoram"),
m_spriteram(*this, "spriteram") { }
@@ -48,6 +50,7 @@ public:
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<decospr_device> m_sprgen;
+ required_device<generic_latch_8_device> m_soundlatch;
/* memory pointers */
required_shared_ptr<UINT16> m_bg_videoram;
@@ -111,7 +114,7 @@ public:
{
if (ACCESSING_BITS_0_7)
{
- soundlatch_byte_w(space, 0, data & 0xff);
+ m_soundlatch->write(space, 0, data & 0xff);
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(20));
}
@@ -385,7 +388,7 @@ static ADDRESS_MAP_START( silvmil_sound_map, AS_PROGRAM, 8, silvmil_state )
AM_RANGE(0xd000, 0xd7ff) AM_RAM
AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
AM_RANGE(0xc002, 0xc002) AM_DEVREADWRITE("oki", okim6295_device, read, write) AM_MIRROR(1)
- AM_RANGE(0xc006, 0xc006) AM_READ(soundlatch_byte_r)
+ AM_RANGE(0xc006, 0xc006) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
AM_RANGE(0xc00f, 0xc00f) AM_WRITENOP // ??
ADDRESS_MAP_END
@@ -423,6 +426,8 @@ static MACHINE_CONFIG_START( silvmil, silvmil_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_GENERIC_LATCH_8_ADD("soundlatch")
+
MCFG_YM2151_ADD("ymsnd", XTAL_14_31818MHz/4) /* Verified */
MCFG_YM2151_IRQ_HANDLER(INPUTLINE("audiocpu", 0))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)