summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/segae.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2019-03-26 11:13:37 +1100
committer Vas Crabb <vas@vastheman.com>2019-03-26 11:13:37 +1100
commit97b67170277437131adf6ed4d60139c172529e4f (patch)
tree7a5cbf608f191075f1612b1af15832c206a3fe2d /src/mame/drivers/segae.cpp
parentb380514764cf857469bae61c11143a19f79a74c5 (diff)
(nw) Clean up the mess on master
This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release.
Diffstat (limited to 'src/mame/drivers/segae.cpp')
-rw-r--r--src/mame/drivers/segae.cpp73
1 files changed, 36 insertions, 37 deletions
diff --git a/src/mame/drivers/segae.cpp b/src/mame/drivers/segae.cpp
index 9fd3d468b2b..ef357426bc1 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::command_w));
- map(0x7e, 0x7f).w("sn2", FUNC(segapsg_device::command_w));
+ /* 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));
@@ -886,39 +886,36 @@ uint32_t systeme_state::screen_update(screen_device &screen, bitmap_rgb32 &bitma
return 0;
}
-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)
+void systeme_state::systeme(machine_config &config)
+{
+ 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));
m_ppi->tri_pb_callback().set_constant(0);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(XTAL(10'738'635)/2, \
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(XTAL(10'738'635)/2, \
sega315_5124_device::WIDTH , sega315_5124_device::LBORDER_START + sega315_5124_device::LBORDER_WIDTH, sega315_5124_device::LBORDER_START + sega315_5124_device::LBORDER_WIDTH + 256, \
- 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)
-
- MCFG_DEVICE_ADD("vdp1", SEGA315_5124, 0)
- MCFG_SEGA315_5124_IS_PAL(false)
- MCFG_DEVICE_ADDRESS_MAP(0, vdp1_map)
-
- MCFG_DEVICE_ADD("vdp2", SEGA315_5124, 0)
- MCFG_SEGA315_5124_IS_PAL(false)
- MCFG_SEGA315_5124_INT_CB(INPUTLINE("maincpu", 0))
- MCFG_DEVICE_ADDRESS_MAP(0, vdp2_map)
+ 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);
+ screen.set_screen_update(FUNC(systeme_state::screen_update));
/* 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)
+ 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);
- MCFG_DEVICE_ADD("sn2", SEGAPSG, XTAL(10'738'635)/3)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-MACHINE_CONFIG_END
+ 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);
+ m_vdp2->add_route(ALL_OUTPUTS, "mono", 0.50);
+}
void systeme_state::hangonjr(machine_config &config)
{
@@ -944,13 +941,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 +960,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()