summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/midyunit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/midyunit.cpp')
-rw-r--r--src/mame/drivers/midyunit.cpp69
1 files changed, 37 insertions, 32 deletions
diff --git a/src/mame/drivers/midyunit.cpp b/src/mame/drivers/midyunit.cpp
index 55b749e2e34..4d35c966546 100644
--- a/src/mame/drivers/midyunit.cpp
+++ b/src/mame/drivers/midyunit.cpp
@@ -1098,8 +1098,8 @@ INPUT_PORTS_END
*
*************************************/
-MACHINE_CONFIG_START(midyunit_state::zunit)
-
+void midyunit_state::zunit(machine_config &config)
+{
/* basic machine hardware */
TMS34010(config, m_maincpu, FAST_MASTER_CLOCK);
m_maincpu->set_addrmap(AS_PROGRAM, &midyunit_state::main_map);
@@ -1116,12 +1116,12 @@ MACHINE_CONFIG_START(midyunit_state::zunit)
/* video hardware */
PALETTE(config, m_palette).set_entries(8192);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_video_attributes(VIDEO_ALWAYS_UPDATE);
// from TMS340 registers
- MCFG_SCREEN_RAW_PARAMS(MEDRES_PIXEL_CLOCK*2, 674, 122, 634, 433, 27, 427)
- MCFG_SCREEN_UPDATE_DEVICE("maincpu", tms34010_device, tms340x0_ind16)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen.set_raw(MEDRES_PIXEL_CLOCK*2, 674, 122, 634, 433, 27, 427);
+ screen.set_screen_update("maincpu", FUNC(tms34010_device::tms340x0_ind16));
+ screen.set_palette(m_palette);
MCFG_VIDEO_START_OVERRIDE(midyunit_state,midzunit)
@@ -1131,7 +1131,7 @@ MACHINE_CONFIG_START(midyunit_state::zunit)
WILLIAMS_NARC_SOUND(config, m_narc_sound);
m_narc_sound->add_route(ALL_OUTPUTS, "lspeaker", 1.0);
m_narc_sound->add_route(ALL_OUTPUTS, "rspeaker", 1.0);
-MACHINE_CONFIG_END
+}
@@ -1141,8 +1141,8 @@ MACHINE_CONFIG_END
*
*************************************/
-MACHINE_CONFIG_START(midyunit_state::yunit_core)
-
+void midyunit_state::yunit_core(machine_config &config)
+{
/* basic machine hardware */
TMS34010(config, m_maincpu, SLOW_MASTER_CLOCK);
m_maincpu->set_addrmap(AS_PROGRAM, &midyunit_state::main_map);
@@ -1159,20 +1159,21 @@ MACHINE_CONFIG_START(midyunit_state::yunit_core)
/* video hardware */
PALETTE(config, m_palette).set_entries(256);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_video_attributes(VIDEO_ALWAYS_UPDATE);
// from TMS340 registers - visible area varies slightly between games
// we use the largest visarea (smashtv's) here so that aviwrite will work nicely
- MCFG_SCREEN_RAW_PARAMS(STDRES_PIXEL_CLOCK*2, 506, 90, 500, 289, 20, 276)
- MCFG_SCREEN_UPDATE_DEVICE("maincpu", tms34010_device, tms340x0_ind16)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen.set_raw(STDRES_PIXEL_CLOCK*2, 506, 90, 500, 289, 20, 276);
+ screen.set_screen_update("maincpu", FUNC(tms34010_device::tms340x0_ind16));
+ screen.set_palette(m_palette);
/* sound hardware */
SPEAKER(config, "speaker").front_center();
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(midyunit_state::yunit_cvsd_4bit_slow)
+void midyunit_state::yunit_cvsd_4bit_slow(machine_config &config)
+{
yunit_core(config);
/* basic machine hardware */
@@ -1181,10 +1182,11 @@ MACHINE_CONFIG_START(midyunit_state::yunit_cvsd_4bit_slow)
/* video hardware */
m_palette->set_entries(256);
MCFG_VIDEO_START_OVERRIDE(midyunit_state,midyunit_4bit)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(midyunit_state::yunit_cvsd_4bit_fast)
+void midyunit_state::yunit_cvsd_4bit_fast(machine_config &config)
+{
yunit_core(config);
/* basic machine hardware */
@@ -1195,10 +1197,11 @@ MACHINE_CONFIG_START(midyunit_state::yunit_cvsd_4bit_fast)
/* video hardware */
m_palette->set_entries(256);
MCFG_VIDEO_START_OVERRIDE(midyunit_state,midyunit_4bit)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(midyunit_state::yunit_cvsd_6bit_slow)
+void midyunit_state::yunit_cvsd_6bit_slow(machine_config &config)
+{
yunit_core(config);
/* basic machine hardware */
@@ -1207,10 +1210,11 @@ MACHINE_CONFIG_START(midyunit_state::yunit_cvsd_6bit_slow)
/* video hardware */
m_palette->set_entries(4096);
MCFG_VIDEO_START_OVERRIDE(midyunit_state,midyunit_6bit)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(midyunit_state::yunit_adpcm_6bit_fast)
+void midyunit_state::yunit_adpcm_6bit_fast(machine_config &config)
+{
yunit_core(config);
/* basic machine hardware */
@@ -1221,10 +1225,11 @@ MACHINE_CONFIG_START(midyunit_state::yunit_adpcm_6bit_fast)
/* video hardware */
m_palette->set_entries(4096);
MCFG_VIDEO_START_OVERRIDE(midyunit_state,midyunit_6bit)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(midyunit_state::yunit_adpcm_6bit_faster)
+void midyunit_state::yunit_adpcm_6bit_faster(machine_config &config)
+{
yunit_core(config);
/* basic machine hardware */
@@ -1235,7 +1240,7 @@ MACHINE_CONFIG_START(midyunit_state::yunit_adpcm_6bit_faster)
/* video hardware */
m_palette->set_entries(4096);
MCFG_VIDEO_START_OVERRIDE(midyunit_state,midyunit_6bit)
-MACHINE_CONFIG_END
+}
void midyunit_state::term2(machine_config &config)
@@ -1250,13 +1255,14 @@ void midyunit_state::term2(machine_config &config)
}
-MACHINE_CONFIG_START(midyunit_state::mkyawdim)
+void midyunit_state::mkyawdim(machine_config &config)
+{
yunit_core(config);
/* basic machine hardware */
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(8'000'000) / 2)
- MCFG_DEVICE_PROGRAM_MAP(yawdim_sound_map)
+ Z80(config, m_audiocpu, XTAL(8'000'000) / 2);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &midyunit_state::yawdim_sound_map);
/* video hardware */
m_palette->set_entries(4096);
@@ -1266,9 +1272,8 @@ MACHINE_CONFIG_START(midyunit_state::mkyawdim)
GENERIC_LATCH_8(config, m_soundlatch);
- MCFG_DEVICE_ADD("oki", OKIM6295, XTAL(8'000'000) / 8, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_oki, XTAL(8'000'000) / 8, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "speaker", 1.0);
+}