diff options
Diffstat (limited to 'src/mame/drivers/mk85.cpp')
-rw-r--r-- | src/mame/drivers/mk85.cpp | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/src/mame/drivers/mk85.cpp b/src/mame/drivers/mk85.cpp index b1161c79b20..54aa9cfa102 100644 --- a/src/mame/drivers/mk85.cpp +++ b/src/mame/drivers/mk85.cpp @@ -39,9 +39,12 @@ public: private: virtual void machine_reset() override; virtual void video_start() override; - uint32_t screen_update_mk85(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - required_device<cpu_device> m_maincpu; + void mk85_mem(address_map &map); + + uint32_t screen_update_mk85(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + required_device<k1801vm2_device> m_maincpu; }; @@ -70,24 +73,24 @@ uint32_t mk85_state::screen_update_mk85(screen_device &screen, bitmap_ind16 &bit return 0; } -MACHINE_CONFIG_START(mk85_state::mk85) +void mk85_state::mk85(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", K1801VM2, XTAL(4'000'000)) - MCFG_T11_INITIAL_MODE(0) - MCFG_DEVICE_PROGRAM_MAP(mk85_mem) - + K1801VM2(config, m_maincpu, XTAL(4'000'000)); + m_maincpu->set_initial_mode(0); + m_maincpu->set_addrmap(AS_PROGRAM, &mk85_state::mk85_mem); /* 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(640, 480) - MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) - MCFG_SCREEN_UPDATE_DRIVER(mk85_state, screen_update_mk85) - MCFG_SCREEN_PALETTE("palette") - - MCFG_PALETTE_ADD_MONOCHROME("palette") -MACHINE_CONFIG_END + 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(640, 480); + screen.set_visarea(0, 640-1, 0, 480-1); + screen.set_screen_update(FUNC(mk85_state::screen_update_mk85)); + screen.set_palette("palette"); + + PALETTE(config, "palette", 2).set_init("palette", FUNC(palette_device::palette_init_monochrome)); +} /* ROM definition */ ROM_START( mk85 ) |