diff options
Diffstat (limited to 'src/mame/drivers/e100.cpp')
-rw-r--r-- | src/mame/drivers/e100.cpp | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/src/mame/drivers/e100.cpp b/src/mame/drivers/e100.cpp index b239287e33e..cd77707ade0 100644 --- a/src/mame/drivers/e100.cpp +++ b/src/mame/drivers/e100.cpp @@ -258,12 +258,12 @@ WRITE8_MEMBER( e100_state::pia_w ) if ((offset & 0x08) == 0x08) { LOG("- PIA1\n"); - m_pia1->write(offset, data); + m_pia1->write(space, offset, data); } if ((offset & 0x10) == 0x10) { LOG("- PIA2\n"); - m_pia2->write(offset, data); + m_pia2->write(space, offset, data); } if (VERBOSE && (offset & 0x18) == 0x18) { @@ -284,19 +284,19 @@ READ8_MEMBER( e100_state::pia_r ) { case 0x18: // read PIA1 and PIA2 at the same time, should really only happen for writes... { - uint8_t data1 = m_pia1->read(offset); - uint8_t data2 = m_pia2->read(offset); + uint8_t data1 = m_pia1->read(space, offset); + uint8_t data2 = m_pia2->read(space, offset); logerror("%s: Dual device read may have caused unpredictable results on real hardware\n", FUNCNAME); data = data1 & data2; // We assume that the stable behaviour is that data lines with a low level by either device succeeds LOGCS("%s %s[%02x] %02x & %02x -> %02x Dual device read!!\n", PIA1_TAG "/" PIA2_TAG, FUNCNAME, offset, data1, data2, data); } break; case 0x08: // PIA1 - data = m_pia1->read(offset); + data = m_pia1->read(space, offset); LOGCS("%s %s(%02x)\n", PIA1_TAG, FUNCNAME, data); break; case 0x10: // PIA2 - data = m_pia2->read(offset); + data = m_pia2->read(space, offset); LOGCS("%s %s(%02x)\n", PIA2_TAG, FUNCNAME, data); break; default: // None of the devices are selected @@ -538,10 +538,9 @@ static INPUT_PORTS_START( e100 ) PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD)) INPUT_PORTS_END -void e100_state::e100(machine_config &config) -{ - M6802(config, m_maincpu, XTAL(4'000'000)); - m_maincpu->set_addrmap(AS_PROGRAM, &e100_state::e100_map); +MACHINE_CONFIG_START(e100_state::e100) + MCFG_DEVICE_ADD("maincpu", M6802, XTAL(4'000'000)) + MCFG_DEVICE_PROGRAM_MAP(e100_map) /* Devices */ TTL74145(config, m_kbd_74145, 0); @@ -586,19 +585,19 @@ void e100_state::e100(machine_config &config) * Once created it may be given on the commandline or mounted via TAB and select * E100 supports cassette through the 'LOAD' and 'SAVE' commands with no arguments */ - CASSETTE(config, m_cassette); - m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_MUTED | CASSETTE_MOTOR_ENABLED); + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_MUTED | CASSETTE_MOTOR_ENABLED) /* screen TODO: simplify the screen config, look at zx.cpp */ - screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(XTAL(4'000'000)/2, 265, 0, 265, 265, 0, 265); - screen.set_screen_update(FUNC(e100_state::screen_update)); - screen.set_palette("palette"); + MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_RAW_PARAMS(XTAL(4'000'000)/2, 265, 0, 265, 265, 0, 265) + MCFG_SCREEN_UPDATE_DRIVER(e100_state, screen_update) + MCFG_SCREEN_PALETTE("palette") PALETTE(config, "palette", palette_device::MONOCHROME); /* There is a 50Hz signal from the video circuit to CA1 which generates interrupts and drives a software RTC */ - TIMER(config, "video50hz").configure_periodic(FUNC(e100_state::rtc_w), attotime::from_hz(100)); /* Will be divided by two through toggle in the handler */ -} + MCFG_TIMER_DRIVER_ADD_PERIODIC("video50hz", e100_state, rtc_w, attotime::from_hz(100)) /* Will be divided by two through toggle in the handler */ +MACHINE_CONFIG_END /* ROM sets from Didact was not versioned in general, so the numbering are just assumptions */ ROM_START( e100 ) |