summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/williams.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/williams.cpp')
-rw-r--r--src/mame/drivers/williams.cpp142
1 files changed, 69 insertions, 73 deletions
diff --git a/src/mame/drivers/williams.cpp b/src/mame/drivers/williams.cpp
index 5f839a0c0be..36bad4e09e7 100644
--- a/src/mame/drivers/williams.cpp
+++ b/src/mame/drivers/williams.cpp
@@ -1482,14 +1482,14 @@ GFXDECODE_END
*
*************************************/
-MACHINE_CONFIG_START(williams_state::williams)
-
+void williams_state::williams(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", MC6809E, MASTER_CLOCK/3/4)
- MCFG_DEVICE_PROGRAM_MAP(williams_map)
+ MC6809E(config, m_maincpu, MASTER_CLOCK/3/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &williams_state::williams_map);
- MCFG_DEVICE_ADD("soundcpu", M6808, SOUND_CLOCK) // internal clock divider of 4, effective frequency is 894.886kHz
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
+ M6808(config, m_soundcpu, SOUND_CLOCK); // internal clock divider of 4, effective frequency is 894.886kHz
+ m_soundcpu->set_addrmap(AS_PROGRAM, &williams_state::sound_map);
MCFG_MACHINE_START_OVERRIDE(williams_state,williams)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // 5101 (Defender), 5114 or 6514 (later games) + battery
@@ -1503,10 +1503,10 @@ MACHINE_CONFIG_START(williams_state::williams)
WATCHDOG_TIMER(config, m_watchdog);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_SCANLINE | VIDEO_ALWAYS_UPDATE)
- MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK*2/3, 512, 6, 298, 260, 7, 247)
- MCFG_SCREEN_UPDATE_DRIVER(williams_state, screen_update_williams)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_video_attributes(VIDEO_UPDATE_SCANLINE | VIDEO_ALWAYS_UPDATE);
+ m_screen->set_raw(MASTER_CLOCK*2/3, 512, 6, 298, 260, 7, 247);
+ m_screen->set_screen_update(FUNC(williams_state::screen_update_williams));
MCFG_VIDEO_START_OVERRIDE(williams_state,williams)
@@ -1539,39 +1539,38 @@ MACHINE_CONFIG_START(williams_state::williams)
m_pia[2]->writepa_handler().set("dac", FUNC(dac_byte_interface::data_w));
m_pia[2]->irqa_handler().set("soundirq", FUNC(input_merger_any_high_device::in_w<0>));
m_pia[2]->irqb_handler().set("soundirq", FUNC(input_merger_any_high_device::in_w<1>));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(williams_state::defender)
+void williams_state::defender(machine_config &config)
+{
williams(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(defender_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &williams_state::defender_map);
- MCFG_DEVICE_MODIFY("soundcpu")
- MCFG_DEVICE_PROGRAM_MAP(defender_sound_map)
+ m_soundcpu->set_addrmap(AS_PROGRAM, &williams_state::defender_sound_map);
ADDRESS_MAP_BANK(config, "bankc000").set_map(&williams_state::defender_bankc000_map).set_options(ENDIANNESS_BIG, 8, 16, 0x1000);
MCFG_MACHINE_START_OVERRIDE(williams_state,defender)
MCFG_MACHINE_RESET_OVERRIDE(williams_state,defender)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(12, 304-1, 7, 247-1)
-MACHINE_CONFIG_END
+ m_screen->set_visarea(12, 304-1, 7, 247-1);
+}
-MACHINE_CONFIG_START(williams_state::jin) // needs a different screen size or the credit text is clipped
+void williams_state::jin(machine_config &config) // needs a different screen size or the credit text is clipped
+{
defender(config);
/* basic machine hardware */
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0, 315, 7, 247-1)
-MACHINE_CONFIG_END
+ m_screen->set_visarea(0, 315, 7, 247-1);
+}
-MACHINE_CONFIG_START(williams_state::williams_muxed)
+void williams_state::williams_muxed(machine_config &config)
+{
williams(config);
/* basic machine hardware */
@@ -1592,21 +1591,21 @@ MACHINE_CONFIG_START(williams_state::williams_muxed)
LS157(config, m_mux1, 0); // IC4 on interface board (actually LS257 with OC tied low)
m_mux1->a_in_callback().set_ioport("INP2A");
m_mux1->b_in_callback().set_ioport("INP1A");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(spdball_state::spdball)
+void spdball_state::spdball(machine_config &config)
+{
williams(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(spdball_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &spdball_state::spdball_map);
/* pia */
PIA6821(config, m_pia[3], 0);
m_pia[3]->readpa_handler().set_ioport("IN3");
m_pia[3]->readpb_handler().set_ioport("IN4");
-MACHINE_CONFIG_END
+}
void williams_state::lottofun(machine_config &config)
@@ -1623,59 +1622,56 @@ void williams_state::lottofun(machine_config &config)
}
-MACHINE_CONFIG_START(williams_state::sinistar)
+void williams_state::sinistar(machine_config &config)
+{
williams(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(sinistar_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &williams_state::sinistar_map);
/* sound hardware */
- MCFG_DEVICE_ADD("cvsd", HC55516, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.8)
+ HC55516(config, "cvsd", 0).add_route(ALL_OUTPUTS, "speaker", 0.8);
/* pia */
m_pia[0]->readpa_handler().set(FUNC(williams_state::williams_49way_port_0_r));
m_pia[2]->ca2_handler().set("cvsd", FUNC(hc55516_device::digit_w));
m_pia[2]->cb2_handler().set("cvsd", FUNC(hc55516_device::clock_w));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(williams_state::playball)
+void williams_state::playball(machine_config &config)
+{
williams(config);
/* basic machine hardware */
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(6, 298-1, 8, 240-1)
+ m_screen->set_visarea(6, 298-1, 8, 240-1);
/* sound hardware */
- MCFG_DEVICE_ADD("cvsd", HC55516, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.8)
+ HC55516(config, "cvsd", 0).add_route(ALL_OUTPUTS, "speaker", 0.8);
/* pia */
m_pia[1]->writepb_handler().set(FUNC(williams_state::playball_snd_cmd_w));
m_pia[2]->ca2_handler().set("cvsd", FUNC(hc55516_device::digit_w));
m_pia[2]->cb2_handler().set("cvsd", FUNC(hc55516_device::clock_w));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(blaster_state::blastkit)
+void blaster_state::blastkit(machine_config &config)
+{
williams(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(blaster_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &blaster_state::blaster_map);
MCFG_MACHINE_START_OVERRIDE(blaster_state,blaster)
/* video hardware */
MCFG_VIDEO_START_OVERRIDE(blaster_state,blaster)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(blaster_state, screen_update_blaster)
+ m_screen->set_screen_update(FUNC(blaster_state::screen_update_blaster));
/* pia */
m_pia[0]->readpa_handler().set("mux_a", FUNC(ls157_x2_device::output_r));
@@ -1686,7 +1682,7 @@ MACHINE_CONFIG_START(blaster_state::blastkit)
LS157_X2(config, m_muxa, 0);
m_muxa->a_in_callback().set_ioport("IN3");
m_muxa->b_in_callback().set(FUNC(williams_state::williams_49way_port_0_r));
-MACHINE_CONFIG_END
+}
void blaster_state::blaster(machine_config &config)
@@ -1738,14 +1734,14 @@ void blaster_state::blaster(machine_config &config)
}
-MACHINE_CONFIG_START(williams2_state::williams2)
-
+void williams2_state::williams2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", MC6809E, MASTER_CLOCK/3/4)
- MCFG_DEVICE_PROGRAM_MAP(williams2_d000_ram_map)
+ MC6809E(config, m_maincpu, MASTER_CLOCK/3/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &williams2_state::williams2_d000_ram_map);
- MCFG_DEVICE_ADD("soundcpu", M6808, MASTER_CLOCK/3) /* yes, this is different from the older games */
- MCFG_DEVICE_PROGRAM_MAP(williams2_sound_map)
+ M6808(config, m_soundcpu, MASTER_CLOCK/3); /* yes, this is different from the older games */
+ m_soundcpu->set_addrmap(AS_PROGRAM, &williams2_state::williams2_sound_map);
ADDRESS_MAP_BANK(config, "bank8000").set_map(&williams2_state::williams2_bank8000_map).set_options(ENDIANNESS_BIG, 8, 12, 0x800);
@@ -1765,10 +1761,10 @@ MACHINE_CONFIG_START(williams2_state::williams2)
PALETTE(config, m_palette).set_entries(1024);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_williams2);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_SCANLINE | VIDEO_ALWAYS_UPDATE)
- MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK*2/3, 512, 8, 284, 260, 8, 248)
- MCFG_SCREEN_UPDATE_DRIVER(williams2_state, screen_update_williams2)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_video_attributes(VIDEO_UPDATE_SCANLINE | VIDEO_ALWAYS_UPDATE);
+ m_screen->set_raw(MASTER_CLOCK*2/3, 512, 8, 284, 260, 8, 248);
+ m_screen->set_screen_update(FUNC(williams2_state::screen_update_williams2));
MCFG_VIDEO_START_OVERRIDE(williams2_state,williams2)
@@ -1802,10 +1798,11 @@ MACHINE_CONFIG_START(williams2_state::williams2)
m_pia[2]->ca2_handler().set(m_pia[1], FUNC(pia6821_device::cb1_w));
m_pia[2]->irqa_handler().set("soundirq", FUNC(input_merger_any_high_device::in_w<0>));
m_pia[2]->irqb_handler().set("soundirq", FUNC(input_merger_any_high_device::in_w<1>));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(williams2_state::inferno)
+void williams2_state::inferno(machine_config &config)
+{
williams2(config);
m_pia[0]->readpa_handler().set("mux", FUNC(ls157_x2_device::output_r));
m_pia[0]->ca2_handler().set("mux", FUNC(ls157_x2_device::select_w));
@@ -1813,10 +1810,11 @@ MACHINE_CONFIG_START(williams2_state::inferno)
LS157_X2(config, m_mux, 0); // IC45 (for PA4-PA7) + IC46 (for PA0-PA3) on CPU board
m_mux->a_in_callback().set_ioport("INP1");
m_mux->b_in_callback().set_ioport("INP2");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(williams2_state::mysticm)
+void williams2_state::mysticm(machine_config &config)
+{
williams2(config);
/* basic machine hardware */
@@ -1827,15 +1825,15 @@ MACHINE_CONFIG_START(williams2_state::mysticm)
m_pia[1]->irqa_handler().set("mainirq", FUNC(input_merger_any_high_device::in_w<1>));
m_pia[1]->irqb_handler().set("mainirq", FUNC(input_merger_any_high_device::in_w<2>));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(tshoot_state::tshoot)
+void tshoot_state::tshoot(machine_config &config)
+{
williams2(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(williams2_d000_rom_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &tshoot_state::williams2_d000_rom_map);
MCFG_MACHINE_START_OVERRIDE(tshoot_state,tshoot)
@@ -1849,24 +1847,22 @@ MACHINE_CONFIG_START(tshoot_state::tshoot)
m_pia[1]->irqa_handler().set("mainirq", FUNC(input_merger_any_high_device::in_w<2>));
m_pia[1]->irqb_handler().set("mainirq", FUNC(input_merger_any_high_device::in_w<3>));
- MCFG_DEVICE_MODIFY("pia_2")
m_pia[2]->cb2_handler().set(FUNC(tshoot_state::maxvol_w));
LS157_X2(config, m_mux, 0); // U2 + U3 on interface board
m_mux->a_in_callback().set_ioport("INP1");
m_mux->b_in_callback().set_ioport("INP2");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(joust2_state::joust2)
+void joust2_state::joust2(machine_config &config)
+{
williams2(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(williams2_d000_rom_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &joust2_state::williams2_d000_rom_map);
- MCFG_DEVICE_ADD("cvsd", WILLIAMS_CVSD_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
+ WILLIAMS_CVSD_SOUND(config, m_cvsd_sound).add_route(ALL_OUTPUTS, "speaker", 1.0);
MCFG_MACHINE_START_OVERRIDE(joust2_state,joust2)
MCFG_MACHINE_RESET_OVERRIDE(joust2_state,joust2)
@@ -1886,7 +1882,7 @@ MACHINE_CONFIG_START(joust2_state::joust2)
LS157(config, m_mux, 0);
m_mux->a_in_callback().set_ioport("INP1");
m_mux->b_in_callback().set_ioport("INP2");
-MACHINE_CONFIG_END
+}