summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/sg1000a.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/sg1000a.cpp')
-rw-r--r--src/mame/drivers/sg1000a.cpp34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/mame/drivers/sg1000a.cpp b/src/mame/drivers/sg1000a.cpp
index cf91d446fcd..0bd5a5cbcd1 100644
--- a/src/mame/drivers/sg1000a.cpp
+++ b/src/mame/drivers/sg1000a.cpp
@@ -324,16 +324,18 @@ void sg1000a_state::decrypted_opcodes_map(address_map &map)
void sg1000a_state::io_map(address_map &map)
{
map.global_mask(0xff);
- map(0x7f, 0x7f).w("snsnd", FUNC(sn76489a_device::write));
- map(0xbe, 0xbf).rw("tms9928a", FUNC(tms9928a_device::read), FUNC(tms9928a_device::write));
+ map(0x7f, 0x7f).w("snsnd", FUNC(sn76489a_device::command_w));
+ map(0xbe, 0xbe).rw("tms9928a", FUNC(tms9928a_device::vram_r), FUNC(tms9928a_device::vram_w));
+ map(0xbf, 0xbf).rw("tms9928a", FUNC(tms9928a_device::register_r), FUNC(tms9928a_device::register_w));
map(0xdc, 0xdf).rw("ppi8255", FUNC(i8255_device::read), FUNC(i8255_device::write));
}
void sg1000a_state::sderby_io_map(address_map &map)
{
map.global_mask(0xff);
- map(0x40, 0x40).mirror(0x3f).w("snsnd", FUNC(sn76489a_device::write));
- map(0x80, 0x81).mirror(0x3e).rw("tms9928a", FUNC(tms9928a_device::read), FUNC(tms9928a_device::write));
+ map(0x40, 0x40).mirror(0x3f).w("snsnd", FUNC(sn76489a_device::command_w));
+ map(0x80, 0x80).mirror(0x3e).rw("tms9928a", FUNC(tms9928a_device::vram_r), FUNC(tms9928a_device::vram_w));
+ map(0x81, 0x81).mirror(0x3e).rw("tms9928a", FUNC(tms9928a_device::register_r), FUNC(tms9928a_device::register_w));
// map(0xc0, 0xc1).mirror(0x06) NEC D8251AC UART
map(0xc8, 0xcb).mirror(0x04).rw("ppi8255", FUNC(i8255_device::read), FUNC(i8255_device::write)); // NEC D8255AC-2
}
@@ -466,12 +468,11 @@ WRITE8_MEMBER(sg1000a_state::sg1000a_coin_counter_w)
*
*************************************/
-void sg1000a_state::sg1000a(machine_config &config)
-{
+MACHINE_CONFIG_START(sg1000a_state::sg1000a)
/* basic machine hardware */
- Z80(config, m_maincpu, XTAL(3'579'545));
- m_maincpu->set_addrmap(AS_PROGRAM, &sg1000a_state::program_map);
- m_maincpu->set_addrmap(AS_IO, &sg1000a_state::io_map);
+ MCFG_DEVICE_ADD("maincpu", Z80, XTAL(3'579'545))
+ MCFG_DEVICE_PROGRAM_MAP(program_map)
+ MCFG_DEVICE_IO_MAP(io_map)
i8255_device &ppi(I8255(config, "ppi8255"));
ppi.in_pa_callback().set_ioport("P1");
@@ -489,8 +490,9 @@ void sg1000a_state::sg1000a(machine_config &config)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- SN76489A(config, "snsnd", XTAL(3'579'545)).add_route(ALL_OUTPUTS, "mono", 1.0);
-}
+ MCFG_DEVICE_ADD("snsnd", SN76489A, XTAL(3'579'545))
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+MACHINE_CONFIG_END
void sg1000a_state::sg1000ax(machine_config &config)
{
@@ -502,14 +504,14 @@ void sg1000a_state::sg1000ax(machine_config &config)
maincpu.set_decrypted_tag(":decrypted_opcodes");
}
-void sg1000a_state::sderbys(machine_config &config)
-{
+MACHINE_CONFIG_START(sg1000a_state::sderbys)
sg1000a(config);
- m_maincpu->set_clock(XTAL(10'738'635) / 3);
- m_maincpu->set_addrmap(AS_IO, &sg1000a_state::sderby_io_map);
+ MCFG_DEVICE_MODIFY("maincpu")
+ MCFG_DEVICE_CLOCK(XTAL(10'738'635) / 3)
+ MCFG_DEVICE_IO_MAP(sderby_io_map)
// Actually uses a Sega 315-5066 chip, which is a TMS9918 and SN76489 in the same package but with RGB output
-}
+MACHINE_CONFIG_END
/*************************************
*