westdrm: Add some I/O devices to this skeleton (nw)

This commit is contained in:
AJR 2018-04-18 02:22:54 -04:00
parent ae401cbc40
commit ebc1f2b50b
2 changed files with 31 additions and 2 deletions

View File

@ -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

View File

@ -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;