summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/electron/plus3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/electron/plus3.cpp')
-rw-r--r--src/devices/bus/electron/plus3.cpp31
1 files changed, 19 insertions, 12 deletions
diff --git a/src/devices/bus/electron/plus3.cpp b/src/devices/bus/electron/plus3.cpp
index 532594eb5cf..5996e357389 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(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(offset);
return data;
}
@@ -139,13 +146,13 @@ uint8_t electron_plus3_device::expbus_r(address_space &space, offs_t offset, uin
// expbus_w - expansion data write
//-------------------------------------------------
-void electron_plus3_device::expbus_w(address_space &space, offs_t offset, uint8_t data)
+void electron_plus3_device::expbus_w(offs_t offset, uint8_t data)
{
- m_exp->expbus_w(space, offset, data);
+ m_exp->expbus_w(offset, data);
if (offset == 0xfcc0)
{
- wd1770_status_w(space, offset, data);
+ wd1770_status_w(data);
}
else if (offset >= 0xfcc4 && offset < 0xfcc8)
{
@@ -162,7 +169,7 @@ void electron_plus3_device::expbus_w(address_space &space, offs_t offset, uint8_
// IMPLEMENTATION
//**************************************************************************
-WRITE8_MEMBER(electron_plus3_device::wd1770_status_w)
+void electron_plus3_device::wd1770_status_w(uint8_t data)
{
floppy_image_device *floppy = nullptr;