summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/segas16a.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/segas16a.cpp')
-rw-r--r--src/mame/drivers/segas16a.cpp174
1 files changed, 89 insertions, 85 deletions
diff --git a/src/mame/drivers/segas16a.cpp b/src/mame/drivers/segas16a.cpp
index dd705344ea8..46ca54d69c9 100644
--- a/src/mame/drivers/segas16a.cpp
+++ b/src/mame/drivers/segas16a.cpp
@@ -1963,16 +1963,16 @@ GFXDECODE_END
// GENERIC MACHINE DRIVERS
//**************************************************************************
-MACHINE_CONFIG_START(segas16a_state::system16a)
-
+void segas16a_state::system16a(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD("maincpu", M68000, 10000000)
- MCFG_DEVICE_PROGRAM_MAP(system16a_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", segas16a_state, irq4_line_hold)
+ M68000(config, m_maincpu, 10000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &segas16a_state::system16a_map);
+ m_maincpu->set_vblank_int("screen", FUNC(segas16a_state::irq4_line_hold));
- MCFG_DEVICE_ADD("soundcpu", Z80, 4000000)
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_IO_MAP(sound_portmap)
+ Z80(config, m_soundcpu, 4000000);
+ m_soundcpu->set_addrmap(AS_PROGRAM, &segas16a_state::sound_map);
+ m_soundcpu->set_addrmap(AS_IO, &segas16a_state::sound_portmap);
N7751(config, m_n7751, 6000000);
m_n7751->bus_in_cb().set(FUNC(segas16a_state::n7751_rom_r));
@@ -1998,18 +1998,18 @@ MACHINE_CONFIG_START(segas16a_state::system16a)
m_i8255->out_pc_callback().set(FUNC(segas16a_state::tilemap_sound_w));
// video hardware
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(342,262) // to be verified
- MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(segas16a_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_size(342, 262); // to be verified
+ m_screen->set_visarea(0*8, 40*8-1, 0*8, 28*8-1);
+ m_screen->set_screen_update(FUNC(segas16a_state::screen_update));
+ m_screen->set_palette(m_palette);
SEGA_SYS16A_SPRITES(config, m_sprites, 0);
SEGAIC16VID(config, m_segaic16vid, 0, "gfxdecode");
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_segas16a)
- MCFG_PALETTE_ADD("palette", 2048*3)
+ GFXDECODE(config, "gfxdecode", m_palette, gfx_segas16a);
+ PALETTE(config, m_palette, 2048*3);
// sound hardware
SPEAKER(config, "speaker").front_center();
@@ -2020,75 +2020,79 @@ MACHINE_CONFIG_START(segas16a_state::system16a)
m_ymsnd->port_write_handler().set(FUNC(segas16a_state::n7751_control_w));
m_ymsnd->add_route(ALL_OUTPUTS, "speaker", 0.43);
- MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
-MACHINE_CONFIG_END
+ DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.4); // unknown DAC
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
+ vref.set_output(5.0);
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
+}
-MACHINE_CONFIG_START(segas16a_state::system16a_fd1089a)
+void segas16a_state::system16a_fd1089a(machine_config &config)
+{
system16a(config);
- MCFG_DEVICE_REPLACE("maincpu", FD1089A, 10000000)
- MCFG_DEVICE_PROGRAM_MAP(system16a_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", segas16a_state, irq4_line_hold)
-MACHINE_CONFIG_END
+ FD1089A(config.replace(), m_maincpu, 10000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &segas16a_state::system16a_map);
+ m_maincpu->set_vblank_int("screen", FUNC(segas16a_state::irq4_line_hold));
+}
-MACHINE_CONFIG_START(segas16a_state::system16a_fd1089b)
+void segas16a_state::system16a_fd1089b(machine_config &config)
+{
system16a(config);
- MCFG_DEVICE_REPLACE("maincpu", FD1089B, 10000000)
- MCFG_DEVICE_PROGRAM_MAP(system16a_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", segas16a_state, irq4_line_hold)
-MACHINE_CONFIG_END
+ FD1089B(config.replace(), m_maincpu, 10000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &segas16a_state::system16a_map);
+ m_maincpu->set_vblank_int("screen", FUNC(segas16a_state::irq4_line_hold));
+}
-MACHINE_CONFIG_START(segas16a_state::system16a_fd1094)
+void segas16a_state::system16a_fd1094(machine_config &config)
+{
system16a(config);
- MCFG_DEVICE_REPLACE("maincpu", FD1094, 10000000)
- MCFG_DEVICE_PROGRAM_MAP(system16a_map)
- MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", segas16a_state, irq4_line_hold)
-MACHINE_CONFIG_END
+ FD1094(config.replace(), m_maincpu, 10000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &segas16a_state::system16a_map);
+ m_maincpu->set_addrmap(AS_OPCODES, &segas16a_state::decrypted_opcodes_map);
+ m_maincpu->set_vblank_int("screen", FUNC(segas16a_state::irq4_line_hold));
+}
-MACHINE_CONFIG_START(segas16a_state::aceattaca_fd1094)
+void segas16a_state::aceattaca_fd1094(machine_config &config)
+{
system16a_fd1094(config);
- MCFG_DEVICE_ADD("cxdio", CXD1095, 0)
-MACHINE_CONFIG_END
-
+ CXD1095(config, "cxdio", 0);
+}
-MACHINE_CONFIG_START(segas16a_state::system16a_i8751)
+void segas16a_state::system16a_i8751(machine_config &config)
+{
system16a(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_VBLANK_INT_REMOVE()
+ m_maincpu->set_vblank_int(device_interrupt_delegate(), nullptr);
- MCFG_DEVICE_ADD("mcu", I8751, 8000000)
- MCFG_DEVICE_IO_MAP(mcu_io_map)
- MCFG_MCS51_PORT_P1_OUT_CB(WRITE8(*this, segas16a_state, mcu_control_w))
-
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, segas16a_state, i8751_main_cpu_vblank_w))
-MACHINE_CONFIG_END
+ I8751(config, m_mcu, 8000000);
+ m_mcu->set_addrmap(AS_IO, &segas16a_state::mcu_io_map);
+ m_mcu->port_out_cb<1>().set(FUNC(segas16a_state::mcu_control_w));
+ m_screen->screen_vblank().set(FUNC(segas16a_state::i8751_main_cpu_vblank_w));
+}
-MACHINE_CONFIG_START(segas16a_state::system16a_no7751)
+void segas16a_state::system16a_no7751(machine_config &config)
+{
system16a(config);
- MCFG_DEVICE_MODIFY("soundcpu")
- MCFG_DEVICE_IO_MAP(sound_no7751_portmap)
+ m_soundcpu->set_addrmap(AS_IO, &segas16a_state::sound_no7751_portmap);
- MCFG_DEVICE_REMOVE("n7751")
- MCFG_DEVICE_REMOVE("dac")
- MCFG_DEVICE_REMOVE("vref")
+ config.device_remove("n7751");
+ config.device_remove("dac");
+ config.device_remove("vref");
YM2151(config.replace(), m_ymsnd, 4000000);
m_ymsnd->add_route(ALL_OUTPUTS, "speaker", 1.0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(segas16a_state::system16a_no7751p)
+void segas16a_state::system16a_no7751p(machine_config &config)
+{
system16a_no7751(config);
- MCFG_DEVICE_REPLACE("soundcpu", SEGA_315_5177, 4000000)
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_IO_MAP(sound_no7751_portmap)
- MCFG_DEVICE_OPCODES_MAP(sound_decrypted_opcodes_map)
- MCFG_SEGAZ80_SET_DECRYPTED_TAG(":sound_decrypted_opcodes")
-MACHINE_CONFIG_END
+ segacrp2_z80_device &z80(SEGA_315_5177(config.replace(), m_soundcpu, 4000000));
+ z80.set_addrmap(AS_PROGRAM, &segas16a_state::sound_map);
+ z80.set_addrmap(AS_IO, &segas16a_state::sound_no7751_portmap);
+ z80.set_addrmap(AS_OPCODES, &segas16a_state::sound_decrypted_opcodes_map);
+ z80.set_decrypted_tag(":decrypted_opcodes");
+}
/*
static MACHINE_CONFIG_START( system16a_i8751_no7751 )
@@ -2102,44 +2106,44 @@ static MACHINE_CONFIG_START( system16a_i8751_no7751 )
MACHINE_CONFIG_END
*/
-MACHINE_CONFIG_START(segas16a_state::system16a_fd1089a_no7751)
+void segas16a_state::system16a_fd1089a_no7751(machine_config &config)
+{
system16a_fd1089a(config);
- MCFG_DEVICE_MODIFY("soundcpu")
- MCFG_DEVICE_IO_MAP(sound_no7751_portmap)
+ m_soundcpu->set_addrmap(AS_IO, &segas16a_state::sound_no7751_portmap);
- MCFG_DEVICE_REMOVE("n7751")
- MCFG_DEVICE_REMOVE("dac")
- MCFG_DEVICE_REMOVE("vref")
+ config.device_remove("n7751");
+ config.device_remove("dac");
+ config.device_remove("vref");
YM2151(config.replace(), m_ymsnd, 4000000);
m_ymsnd->add_route(ALL_OUTPUTS, "speaker", 1.0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(segas16a_state::system16a_fd1089b_no7751)
+void segas16a_state::system16a_fd1089b_no7751(machine_config &config)
+{
system16a_fd1089b(config);
- MCFG_DEVICE_MODIFY("soundcpu")
- MCFG_DEVICE_IO_MAP(sound_no7751_portmap)
+ m_soundcpu->set_addrmap(AS_IO, &segas16a_state::sound_no7751_portmap);
- MCFG_DEVICE_REMOVE("n7751")
- MCFG_DEVICE_REMOVE("dac")
- MCFG_DEVICE_REMOVE("vref")
+ config.device_remove("n7751");
+ config.device_remove("dac");
+ config.device_remove("vref");
YM2151(config.replace(), m_ymsnd, 4000000);
m_ymsnd->add_route(ALL_OUTPUTS, "speaker", 1.0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(segas16a_state::system16a_fd1094_no7751)
+void segas16a_state::system16a_fd1094_no7751(machine_config &config)
+{
system16a_fd1094(config);
- MCFG_DEVICE_MODIFY("soundcpu")
- MCFG_DEVICE_IO_MAP(sound_no7751_portmap)
+ m_soundcpu->set_addrmap(AS_IO, &segas16a_state::sound_no7751_portmap);
- MCFG_DEVICE_REMOVE("n7751")
- MCFG_DEVICE_REMOVE("dac")
- MCFG_DEVICE_REMOVE("vref")
+ config.device_remove("n7751");
+ config.device_remove("dac");
+ config.device_remove("vref");
YM2151(config.replace(), m_ymsnd, 4000000);
m_ymsnd->add_route(ALL_OUTPUTS, "speaker", 1.0);
-MACHINE_CONFIG_END
+}