diff options
Diffstat (limited to 'src/devices/bus/electron/cart/ap34.cpp')
-rw-r--r-- | src/devices/bus/electron/cart/ap34.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/devices/bus/electron/cart/ap34.cpp b/src/devices/bus/electron/cart/ap34.cpp index 30847c55aa4..694df390266 100644 --- a/src/devices/bus/electron/cart/ap34.cpp +++ b/src/devices/bus/electron/cart/ap34.cpp @@ -47,7 +47,7 @@ void ap34_floppies(device_slot_interface &device) void electron_ap34_device::device_add_mconfig(machine_config &config) { /* fdc */ - WD1770(config, m_fdc, 16_MHz_XTAL / 2); + WD1770(config, m_fdc, DERIVED_CLOCK(1, 2)); FLOPPY_CONNECTOR(config, m_floppy0, ap34_floppies, "525qd", electron_ap34_device::floppy_formats).enable_sound(true); FLOPPY_CONNECTOR(config, m_floppy1, ap34_floppies, nullptr, electron_ap34_device::floppy_formats).enable_sound(true); } @@ -81,9 +81,9 @@ void electron_ap34_device::device_start() // read - cartridge data read //------------------------------------------------- -uint8_t electron_ap34_device::read(address_space &space, offs_t offset, int infc, int infd, int romqa) +uint8_t electron_ap34_device::read(offs_t offset, int infc, int infd, int romqa, int oe, int oe2) { - uint8_t data = 0xfe; + uint8_t data = 0xff; if (infc) { @@ -97,18 +97,16 @@ uint8_t electron_ap34_device::read(address_space &space, offs_t offset, int infc break; } } - - if (!infc && !infd) + else if (oe) { - if (offset >= 0x0000 && offset < 0x4000) - { - data = m_rom[(offset & 0x3fff) + (romqa * 0x4000)]; - } - if (m_ram.size() != 0 && romqa == 0 && offset >= 0x3000) { data = m_ram[offset & 0x0fff]; } + else + { + data = m_rom[(offset & 0x3fff) | (romqa << 14)]; + } } return data; @@ -118,14 +116,14 @@ uint8_t electron_ap34_device::read(address_space &space, offs_t offset, int infc // write - cartridge data write //------------------------------------------------- -void electron_ap34_device::write(address_space &space, offs_t offset, uint8_t data, int infc, int infd, int romqa) +void electron_ap34_device::write(offs_t offset, uint8_t data, int infc, int infd, int romqa, int oe, int oe2) { if (infc) { switch (offset & 0xff) { case 0xc0: - wd1770_control_w(space, 0, data); + wd1770_control_w(data); break; case 0xc4: case 0xc5: @@ -135,8 +133,7 @@ void electron_ap34_device::write(address_space &space, offs_t offset, uint8_t da break; } } - - if (!infc && !infd) + else if (oe) { if (m_ram.size() != 0 && romqa == 0 && offset >= 0x3000) { @@ -150,7 +147,7 @@ void electron_ap34_device::write(address_space &space, offs_t offset, uint8_t da // IMPLEMENTATION //************************************************************************** -WRITE8_MEMBER(electron_ap34_device::wd1770_control_w) +void electron_ap34_device::wd1770_control_w(uint8_t data) { floppy_image_device *floppy = nullptr; @@ -167,6 +164,7 @@ WRITE8_MEMBER(electron_ap34_device::wd1770_control_w) m_fdc->dden_w(BIT(data, 3)); // bit 4: NMI - not connected + //m_slot->nmi_w(!BIT(data, 4)); // bit 5: reset if (!BIT(data, 5)) m_fdc->soft_reset(); |