summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/homerun.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/homerun.cpp')
-rw-r--r--src/mame/drivers/homerun.cpp58
1 files changed, 28 insertions, 30 deletions
diff --git a/src/mame/drivers/homerun.cpp b/src/mame/drivers/homerun.cpp
index 6f8ffa8303a..3dc40648493 100644
--- a/src/mame/drivers/homerun.cpp
+++ b/src/mame/drivers/homerun.cpp
@@ -350,13 +350,13 @@ void homerun_state::machine_reset()
/**************************************************************************/
-MACHINE_CONFIG_START(homerun_state::dynashot)
-
+void homerun_state::dynashot(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(20'000'000)/4)
- MCFG_DEVICE_PROGRAM_MAP(homerun_memmap)
- MCFG_DEVICE_IO_MAP(homerun_iomap)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", homerun_state, irq0_line_hold)
+ Z80(config, m_maincpu, XTAL(20'000'000)/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &homerun_state::homerun_memmap);
+ m_maincpu->set_addrmap(AS_IO, &homerun_state::homerun_iomap);
+ m_maincpu->set_vblank_int("screen", FUNC(homerun_state::irq0_line_hold));
i8255_device &ppi(I8255A(config, "ppi8255"));
ppi.out_pa_callback().set(FUNC(homerun_state::homerun_scrollhi_w));
@@ -364,16 +364,13 @@ MACHINE_CONFIG_START(homerun_state::dynashot)
ppi.out_pc_callback().set(FUNC(homerun_state::homerun_scrollx_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
-// MCFG_SCREEN_REFRESH_RATE(60)
-// MCFG_SCREEN_SIZE(256, 256)
-// MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 30*8-1)
- MCFG_SCREEN_RAW_PARAMS(XTAL(20'000'000)/4,328,0,256,253,0,240)
- MCFG_SCREEN_UPDATE_DRIVER(homerun_state, screen_update_homerun)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(XTAL(20'000'000)/4,328,0,256,253,0,240);
+ m_screen->set_screen_update(FUNC(homerun_state::screen_update_homerun));
+ m_screen->set_palette(m_palette);
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_homerun)
- MCFG_PALETTE_ADD("palette", 16*4)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_homerun);
+ PALETTE(config, m_palette, 16*4);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -382,32 +379,33 @@ MACHINE_CONFIG_START(homerun_state::dynashot)
ymsnd.port_a_read_callback().set_ioport("DSW");
ymsnd.port_b_write_callback().set(FUNC(homerun_state::homerun_banking_w));
ymsnd.add_route(ALL_OUTPUTS, "mono", 0.50);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(homerun_state::homerun)
+void homerun_state::homerun(machine_config &config)
+{
dynashot(config);
/* sound hardware */
- MCFG_DEVICE_ADD("d7756", UPD7756)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+ UPD7756(config, m_d7756);
+ m_d7756->add_route(ALL_OUTPUTS, "mono", 0.75);
- MCFG_DEVICE_ADD("samples", SAMPLES)
- MCFG_SAMPLES_CHANNELS(1)
- MCFG_SAMPLES_NAMES(homerun_sample_names)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-MACHINE_CONFIG_END
+ SAMPLES(config, m_samples);
+ m_samples->set_channels(1);
+ m_samples->set_samples_names(homerun_sample_names);
+ m_samples->add_route(ALL_OUTPUTS, "mono", 0.50);
+}
-MACHINE_CONFIG_START(homerun_state::ganjaja)
+void homerun_state::ganjaja(machine_config &config)
+{
dynashot(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PERIODIC_INT_DRIVER(homerun_state, irq0_line_hold, 4*60) // ?
+ m_maincpu->set_periodic_int(FUNC(homerun_state::irq0_line_hold), attotime::from_hz(4*60)); // ?
/* sound hardware */
- MCFG_DEVICE_ADD("d7756", UPD7756)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
-MACHINE_CONFIG_END
+ UPD7756(config, m_d7756);
+ m_d7756->add_route(ALL_OUTPUTS, "mono", 0.75);
+}