summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-04-18 02:22:54 -0400
committer AJR <ajrhacker@users.noreply.github.com>2018-04-18 02:22:54 -0400
commitebc1f2b50bd9db1d85f15f46007f6d3a7b94f338 (patch)
tree4eb2469b56496c489fa1b7be9fe7d0b07ca5b81b
parentae401cbc40dbaac2b55ecbdc3f6718b743d42759 (diff)
westdrm: Add some I/O devices to this skeleton (nw)
-rw-r--r--src/mame/drivers/segacoin.cpp30
-rw-r--r--src/mame/machine/315_5338a.cpp3
2 files changed, 31 insertions, 2 deletions
diff --git a/src/mame/drivers/segacoin.cpp b/src/mame/drivers/segacoin.cpp
index 26c264b49a2..3b1c76f080a 100644
--- a/src/mame/drivers/segacoin.cpp
+++ b/src/mame/drivers/segacoin.cpp
@@ -19,7 +19,10 @@ TODO:
#include "emu.h"
#include "cpu/z80/z80.h"
-//#include "sound/2612intf.h"
+#include "machine/315_5338a.h"
+#include "machine/pit8253.h"
+#include "sound/2612intf.h"
+#include "speaker.h"
class segacoin_state : public driver_device
@@ -59,6 +62,9 @@ void segacoin_state::main_portmap(address_map &map)
{
map.unmap_value_high();
map.global_mask(0xff);
+ map(0x00, 0x00).nopw(); // watchdog?
+ map(0x10, 0x13).rw("pit", FUNC(pit8253_device::read), FUNC(pit8253_device::write));
+ map(0x20, 0x2f).rw("io", FUNC(sega_315_5338a_device::read), FUNC(sega_315_5338a_device::write));
}
@@ -72,6 +78,9 @@ void segacoin_state::sound_portmap(address_map &map)
{
map.unmap_value_high();
map.global_mask(0xff);
+ map(0x00, 0x03).rw("ym0", FUNC(ym3438_device::read), FUNC(ym3438_device::write));
+ map(0x40, 0x43).rw("ym1", FUNC(ym3438_device::read), FUNC(ym3438_device::write));
+ map(0x80, 0x83).rw("ym2", FUNC(ym3438_device::read), FUNC(ym3438_device::write));
}
@@ -120,6 +129,11 @@ MACHINE_CONFIG_START(segacoin_state::westdrm)
MCFG_CPU_PROGRAM_MAP(main_map)
MCFG_CPU_IO_MAP(main_portmap)
+ MCFG_DEVICE_ADD("pit", PIT8253, 0)
+ MCFG_PIT8253_CLK2(1000000) // clock frequency unknown
+
+ MCFG_DEVICE_ADD("io", SEGA_315_5338A, 0)
+
MCFG_CPU_ADD("audiocpu", Z80, 8000000) // clock frequency unknown
MCFG_CPU_PROGRAM_MAP(sound_map)
MCFG_CPU_IO_MAP(sound_portmap)
@@ -127,7 +141,19 @@ MACHINE_CONFIG_START(segacoin_state::westdrm)
/* no video! */
/* sound hardware */
- //..
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+
+ MCFG_SOUND_ADD("ym0", YM3438, 8000000) // clock frequency unknown
+ MCFG_SOUND_ROUTE(0, "mono", 0.40)
+ MCFG_SOUND_ROUTE(1, "mono", 0.40)
+
+ MCFG_SOUND_ADD("ym1", YM3438, 8000000) // clock frequency unknown
+ MCFG_SOUND_ROUTE(0, "mono", 0.40)
+ MCFG_SOUND_ROUTE(1, "mono", 0.40)
+
+ MCFG_SOUND_ADD("ym2", YM3438, 8000000) // clock frequency unknown
+ MCFG_SOUND_ROUTE(0, "mono", 0.40)
+ MCFG_SOUND_ROUTE(1, "mono", 0.40)
MACHINE_CONFIG_END
diff --git a/src/mame/machine/315_5338a.cpp b/src/mame/machine/315_5338a.cpp
index 5c7a3c7c211..a362ce656e2 100644
--- a/src/mame/machine/315_5338a.cpp
+++ b/src/mame/machine/315_5338a.cpp
@@ -95,6 +95,9 @@ READ8_MEMBER( sega_315_5338a_device::read )
// input port
case 0x06: data = m_in6_cb(0); break;
+ // serial data read back?
+ case 0x0a: data = m_serial_output; break;
+
// serial data input
case 0x0c: data = m_read_cb(m_address); break;