summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/unkhorse.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/unkhorse.cpp')
-rw-r--r--src/mame/drivers/unkhorse.cpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/mame/drivers/unkhorse.cpp b/src/mame/drivers/unkhorse.cpp
index cb7067d6d73..ff964588507 100644
--- a/src/mame/drivers/unkhorse.cpp
+++ b/src/mame/drivers/unkhorse.cpp
@@ -192,12 +192,12 @@ INPUT_PORTS_END
***************************************************************************/
-MACHINE_CONFIG_START(horse_state::horse)
-
+void horse_state::horse(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8085A, XTAL(12'000'000) / 2)
- MCFG_DEVICE_PROGRAM_MAP(horse_map)
- MCFG_DEVICE_IO_MAP(horse_io_map)
+ I8085A(config, m_maincpu, XTAL(12'000'000) / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &horse_state::horse_map);
+ m_maincpu->set_addrmap(AS_IO, &horse_state::horse_io_map);
i8155_device &i8155(I8155(config, "i8155", XTAL(12'000'000) / 4)); // port A input, B output, C output but unused
i8155.in_pa_callback().set(FUNC(horse_state::input_r));
@@ -205,21 +205,20 @@ MACHINE_CONFIG_START(horse_state::horse)
i8155.out_to_callback().set("speaker", FUNC(speaker_sound_device::level_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(horse_state, screen_update)
- MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("maincpu", I8085_RST75_LINE))
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 1*8, 31*8-1);
+ screen.set_screen_update(FUNC(horse_state::screen_update));
+ screen.screen_vblank().set_inputline(m_maincpu, I8085_RST75_LINE);
+ screen.set_palette("palette");
PALETTE(config, "palette", palette_device::BGR_3BIT);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-MACHINE_CONFIG_END
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
+}