summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/segae.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/segae.cpp')
-rw-r--r--src/mame/drivers/segae.cpp56
1 files changed, 27 insertions, 29 deletions
diff --git a/src/mame/drivers/segae.cpp b/src/mame/drivers/segae.cpp
index f095ea93609..433016e017e 100644
--- a/src/mame/drivers/segae.cpp
+++ b/src/mame/drivers/segae.cpp
@@ -308,7 +308,6 @@ GND 8A 8B GND
#include "machine/mc8123.h"
#include "machine/segacrp2_device.h"
#include "machine/upd4701.h"
-#include "sound/sn76496.h"
#include "video/315_5124.h"
#include "speaker.h"
@@ -411,8 +410,9 @@ void systeme_state::io_map(address_map &map)
{
map.global_mask(0xff);
- map(0x7b, 0x7b).w("sn1", FUNC(segapsg_device::write));
- map(0x7e, 0x7f).w("sn2", FUNC(segapsg_device::write));
+ /* TODO : PSG connection correct? */
+ map(0x7b, 0x7b).w(m_vdp1, FUNC(sega315_5124_device::psg_w));
+ map(0x7e, 0x7f).w(m_vdp2, FUNC(sega315_5124_device::psg_w));
map(0x7e, 0x7e).r(m_vdp1, FUNC(sega315_5124_device::vcount_read));
map(0xba, 0xba).rw(m_vdp1, FUNC(sega315_5124_device::data_read), FUNC(sega315_5124_device::data_write));
map(0xbb, 0xbb).rw(m_vdp1, FUNC(sega315_5124_device::control_read), FUNC(sega315_5124_device::control_write));
@@ -887,9 +887,9 @@ uint32_t systeme_state::screen_update(screen_device &screen, bitmap_rgb32 &bitma
}
MACHINE_CONFIG_START(systeme_state::systeme)
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(10'738'635)/2) /* Z80B @ 5.3693Mhz */
- MCFG_DEVICE_PROGRAM_MAP(systeme_map)
- MCFG_DEVICE_IO_MAP(io_map)
+ Z80(config, m_maincpu, XTAL(10'738'635)/2); /* Z80B @ 5.3693Mhz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &systeme_state::systeme_map);
+ m_maincpu->set_addrmap(AS_IO, &systeme_state::io_map);
I8255(config, m_ppi);
m_ppi->out_pb_callback().set(FUNC(systeme_state::coin_counters_write));
@@ -901,23 +901,19 @@ MACHINE_CONFIG_START(systeme_state::systeme)
sega315_5124_device::HEIGHT_NTSC, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_192_TBORDER_HEIGHT, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_192_TBORDER_HEIGHT + 192)
MCFG_SCREEN_UPDATE_DRIVER(systeme_state, screen_update)
- SEGA315_5124(config, m_vdp1, 0);
+ /* sound hardware */
+ SPEAKER(config, "mono").front_center();
+
+ SEGA315_5124(config, m_vdp1, XTAL(10'738'635));
m_vdp1->set_is_pal(false);
m_vdp1->set_addrmap(0, &systeme_state::vdp1_map);
+ m_vdp1->add_route(ALL_OUTPUTS, "mono", 0.50);
- SEGA315_5124(config, m_vdp2, 0);
+ SEGA315_5124(config, m_vdp2, XTAL(10'738'635));
m_vdp2->set_is_pal(false);
m_vdp2->irq().set_inputline(m_maincpu, 0);
m_vdp2->set_addrmap(0, &systeme_state::vdp2_map);
-
- /* sound hardware */
- SPEAKER(config, "mono").front_center();
-
- MCFG_DEVICE_ADD("sn1", SEGAPSG, XTAL(10'738'635)/3)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-
- MCFG_DEVICE_ADD("sn2", SEGAPSG, XTAL(10'738'635)/3)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ m_vdp2->add_route(ALL_OUTPUTS, "mono", 0.50);
MACHINE_CONFIG_END
void systeme_state::hangonjr(machine_config &config)
@@ -944,13 +940,14 @@ void systeme_state::ridleofp(machine_config &config)
ppi.out_pc_callback().append("upd4701", FUNC(upd4701_device::resety_w)).bit(0); // or possibly bit 1
}
-MACHINE_CONFIG_START(systeme_state::systemex)
+void systeme_state::systemex(machine_config &config)
+{
systeme(config);
- MCFG_DEVICE_REPLACE("maincpu", MC8123, XTAL(10'738'635)/2) /* Z80B @ 5.3693Mhz */
- MCFG_DEVICE_PROGRAM_MAP(systeme_map)
- MCFG_DEVICE_IO_MAP(io_map)
- MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
-MACHINE_CONFIG_END
+ mc8123_device &maincpu(MC8123(config.replace(), m_maincpu, XTAL(10'738'635)/2)); /* Z80B @ 5.3693Mhz */
+ maincpu.set_addrmap(AS_PROGRAM, &systeme_state::systeme_map);
+ maincpu.set_addrmap(AS_IO, &systeme_state::io_map);
+ maincpu.set_addrmap(AS_OPCODES, &systeme_state::decrypted_opcodes_map);
+}
void systeme_state::systemex_315_5177(machine_config &config)
{
@@ -962,13 +959,14 @@ void systeme_state::systemex_315_5177(machine_config &config)
maincpu.set_decrypted_tag(m_decrypted_opcodes);
}
-MACHINE_CONFIG_START(systeme_state::systemeb)
+void systeme_state::systemeb(machine_config &config)
+{
systeme(config);
- MCFG_DEVICE_REPLACE("maincpu", MC8123, XTAL(10'738'635)/2) /* Z80B @ 5.3693Mhz */
- MCFG_DEVICE_PROGRAM_MAP(systeme_map)
- MCFG_DEVICE_IO_MAP(io_map)
- MCFG_DEVICE_OPCODES_MAP(banked_decrypted_opcodes_map)
-MACHINE_CONFIG_END
+ mc8123_device &maincpu(MC8123(config.replace(), m_maincpu, XTAL(10'738'635)/2)); /* Z80B @ 5.3693Mhz */
+ maincpu.set_addrmap(AS_PROGRAM, &systeme_state::systeme_map);
+ maincpu.set_addrmap(AS_IO, &systeme_state::io_map);
+ maincpu.set_addrmap(AS_OPCODES, &systeme_state::banked_decrypted_opcodes_map);
+}
void systeme_state::init_opaopa()