diff options
Diffstat (limited to 'src/mame/drivers/alphasma.cpp')
-rw-r--r-- | src/mame/drivers/alphasma.cpp | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/src/mame/drivers/alphasma.cpp b/src/mame/drivers/alphasma.cpp index afb54668e78..3487869370d 100644 --- a/src/mame/drivers/alphasma.cpp +++ b/src/mame/drivers/alphasma.cpp @@ -431,40 +431,39 @@ void alphasmart_state::machine_reset() m_port_d = 0; } -void alphasmart_state::alphasmart(machine_config &config) -{ +MACHINE_CONFIG_START(alphasmart_state::alphasmart) /* basic machine hardware */ MC68HC11(config, m_maincpu, XTAL(8'000'000)/2); // MC68HC11D0, XTAL is 8 Mhz, unknown divider m_maincpu->set_addrmap(AS_PROGRAM, &alphasmart_state::alphasmart_mem); m_maincpu->set_addrmap(AS_IO, &alphasmart_state::alphasmart_io); m_maincpu->set_config(0, 192, 0x00); - KS0066_F05(config, m_lcdc0, 0); - m_lcdc0->set_lcd_size(2, 40); - KS0066_F05(config, m_lcdc1, 0); - m_lcdc1->set_lcd_size(2, 40); + MCFG_KS0066_F05_ADD("ks0066_0") + MCFG_HD44780_LCD_SIZE(2, 40) + MCFG_KS0066_F05_ADD("ks0066_1") + MCFG_HD44780_LCD_SIZE(2, 40) RAM(config, RAM_TAG).set_default_size("128K"); /* video hardware */ - screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD)); - screen.set_refresh_hz(50); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ - screen.set_screen_update(FUNC(alphasmart_state::screen_update)); - screen.set_size(6*40, 9*4); - screen.set_visarea_full(); - screen.set_palette("palette"); + MCFG_SCREEN_ADD("screen", LCD) + MCFG_SCREEN_REFRESH_RATE(50) + MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ + MCFG_SCREEN_UPDATE_DRIVER(alphasmart_state, screen_update) + MCFG_SCREEN_SIZE(6*40, 9*4) + MCFG_SCREEN_VISIBLE_AREA(0, (6*40)-1, 0, (9*4)-1) + MCFG_SCREEN_PALETTE("palette") PALETTE(config, "palette", FUNC(alphasmart_state::alphasmart_palette), 2); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); -} +MACHINE_CONFIG_END -void asma2k_state::asma2k(machine_config &config) -{ +MACHINE_CONFIG_START(asma2k_state::asma2k) alphasmart(config); - m_maincpu->set_addrmap(AS_PROGRAM, &asma2k_state::asma2k_mem); -} + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_PROGRAM_MAP(asma2k_mem) +MACHINE_CONFIG_END /* ROM definition */ ROM_START( asmapro ) |