diff options
Diffstat (limited to 'src/mame/drivers/dct11em.cpp')
-rw-r--r-- | src/mame/drivers/dct11em.cpp | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/src/mame/drivers/dct11em.cpp b/src/mame/drivers/dct11em.cpp index 42ca84a4083..c2f843e5c55 100644 --- a/src/mame/drivers/dct11em.cpp +++ b/src/mame/drivers/dct11em.cpp @@ -18,17 +18,21 @@ class dct11em_state : public driver_device { public: dct11em_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) , - m_maincpu(*this, "maincpu") { } + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + { } void dct11em(machine_config &config); private: virtual void machine_reset() override; virtual void video_start() override; - uint32_t screen_update_dct11em(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - required_device<cpu_device> m_maincpu; + void dct11em_mem(address_map &map); + + uint32_t screen_update_dct11em(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + required_device<t11_device> m_maincpu; }; void dct11em_state::dct11em_mem(address_map &map) @@ -58,24 +62,24 @@ uint32_t dct11em_state::screen_update_dct11em(screen_device &screen, bitmap_ind1 } -MACHINE_CONFIG_START(dct11em_state::dct11em) +void dct11em_state::dct11em(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu",T11, 7500000) // 7.5MHz XTAL - MCFG_T11_INITIAL_MODE(0x1403) /* according to specs */ - MCFG_DEVICE_PROGRAM_MAP(dct11em_mem) - + T11(config, m_maincpu, 7500000); // 7.5MHz XTAL + m_maincpu->set_initial_mode(0x1403); /* according to specs */ + m_maincpu->set_addrmap(AS_PROGRAM, &dct11em_state::dct11em_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(dct11em_state, screen_update_dct11em) - 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(dct11em_state::screen_update_dct11em)); + screen.set_palette("palette"); + + PALETTE(config, "palette", 2).set_init("palette", FUNC(palette_device::palette_init_monochrome)); +} /* ROM definition */ ROM_START( dct11em ) |