diff options
Diffstat (limited to 'src/devices/bus/electron/plus3.cpp')
-rw-r--r-- | src/devices/bus/electron/plus3.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/devices/bus/electron/plus3.cpp b/src/devices/bus/electron/plus3.cpp index 532594eb5cf..14f5b73c957 100644 --- a/src/devices/bus/electron/plus3.cpp +++ b/src/devices/bus/electron/plus3.cpp @@ -65,15 +65,20 @@ ROM_END // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(electron_plus3_device::device_add_mconfig) +void electron_plus3_device::device_add_mconfig(machine_config &config) +{ /* fdc */ - WD1770(config, m_fdc, 16_MHz_XTAL / 2); - FLOPPY_CONNECTOR(config, m_floppy0, electron_floppies, "35dd", floppy_formats, true).enable_sound(true); - FLOPPY_CONNECTOR(config, m_floppy1, electron_floppies, nullptr, floppy_formats).enable_sound(true); + WD1770(config, m_fdc, DERIVED_CLOCK(1, 2)); + FLOPPY_CONNECTOR(config, m_floppy0, electron_floppies, "35dd", floppy_formats).set_fixed(true); + m_floppy0->enable_sound(true); + FLOPPY_CONNECTOR(config, m_floppy1, electron_floppies, nullptr, floppy_formats); + m_floppy1->enable_sound(true); /* pass-through */ - MCFG_ELECTRON_PASSTHRU_EXPANSION_SLOT_ADD(nullptr) -MACHINE_CONFIG_END + ELECTRON_EXPANSION_SLOT(config, m_exp, DERIVED_CLOCK(1, 1), electron_expansion_devices, nullptr); + m_exp->irq_handler().set(DEVICE_SELF_OWNER, FUNC(electron_expansion_slot_device::irq_w)); + m_exp->nmi_handler().set(DEVICE_SELF_OWNER, FUNC(electron_expansion_slot_device::nmi_w)); +} const tiny_rom_entry *electron_plus3_device::device_rom_region() const { @@ -112,8 +117,10 @@ void electron_plus3_device::device_start() // expbus_r - expansion data read //------------------------------------------------- -uint8_t electron_plus3_device::expbus_r(address_space &space, offs_t offset, uint8_t data) +uint8_t electron_plus3_device::expbus_r(address_space &space, offs_t offset) { + uint8_t data = 0xff; + if (offset >= 0x8000 && offset < 0xc000) { if (m_romsel == 4) @@ -130,7 +137,7 @@ uint8_t electron_plus3_device::expbus_r(address_space &space, offs_t offset, uin data = m_fdc->read(offset & 0x03); } - data &= m_exp->expbus_r(space, offset, data); + data &= m_exp->expbus_r(space, offset); return data; } |