summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/p112.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/p112.cpp')
-rw-r--r--src/mame/drivers/p112.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/mame/drivers/p112.cpp b/src/mame/drivers/p112.cpp
index 178c57f5d9d..7b4c6cb4ad3 100644
--- a/src/mame/drivers/p112.cpp
+++ b/src/mame/drivers/p112.cpp
@@ -90,25 +90,24 @@ uint32_t p112_state::screen_update_p112(screen_device &screen, bitmap_ind16 &bit
return 0;
}
-MACHINE_CONFIG_START(p112_state::p112)
+void p112_state::p112(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",Z180, XTAL(16'000'000))
- MCFG_DEVICE_PROGRAM_MAP(p112_mem)
- MCFG_DEVICE_IO_MAP(p112_io)
-
+ Z180(config, m_maincpu, XTAL(16'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &p112_state::p112_mem);
+ m_maincpu->set_addrmap(AS_IO, &p112_state::p112_io);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(240, 320)
- MCFG_SCREEN_VISIBLE_AREA(0, 240-1, 0, 320-1)
- MCFG_SCREEN_UPDATE_DRIVER(p112_state, screen_update_p112)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(240, 320);
+ screen.set_visarea(0, 240-1, 0, 320-1);
+ screen.set_screen_update(FUNC(p112_state::screen_update_p112));
+ screen.set_palette("palette");
PALETTE(config, "palette", palette_device::MONOCHROME);
-
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( p112 )