diff options
author | 2020-09-24 08:44:24 -0700 | |
---|---|---|
committer | 2020-09-24 11:44:24 -0400 | |
commit | ba8b5bbbfeb940fdfe7e9a1b9f12e511c5ffb08e (patch) | |
tree | 3cca99a27b3245a1f0989cb9302b78932248edbd | |
parent | 3c5a61c35dec16d0e04b777f5403aa43c7ff2e48 (diff) |
Fix Bondwell 2 machine (#7284)
- The write protection bit was inverted, with that change you can write into IMD files without error.
- The ramcard was broken, it should only respond to addresses below 0x8000, now the option -exp ramcard works and boots up correctly
-rw-r--r-- | src/devices/bus/bw2/ramcard.cpp | 23 | ||||
-rw-r--r-- | src/mame/drivers/bw2.cpp | 4 |
2 files changed, 16 insertions, 11 deletions
diff --git a/src/devices/bus/bw2/ramcard.cpp b/src/devices/bus/bw2/ramcard.cpp index 48de6cffdec..b1e0bfe5bcf 100644 --- a/src/devices/bus/bw2/ramcard.cpp +++ b/src/devices/bus/bw2/ramcard.cpp @@ -90,15 +90,17 @@ void bw2_ramcard_device::device_reset() uint8_t bw2_ramcard_device::bw2_cd_r(offs_t offset, uint8_t data, int ram2, int ram3, int ram4, int ram5, int ram6) { - if (!ram2) + if (offset < 0x8000) { - data = m_rom->base()[offset & 0x3fff]; + if (!ram2) + { + data = m_rom->base()[offset & 0x3fff]; + } + else if (m_en && !ram5) + { + data = m_ram[(m_bank << 15) | offset]; + } } - else if (m_en && !ram5) - { - data = m_ram[(m_bank << 15) | offset]; - } - return data; } @@ -109,9 +111,12 @@ uint8_t bw2_ramcard_device::bw2_cd_r(offs_t offset, uint8_t data, int ram2, int void bw2_ramcard_device::bw2_cd_w(offs_t offset, uint8_t data, int ram2, int ram3, int ram4, int ram5, int ram6) { - if (m_en && !ram5) + if (offset < 0x8000) { - m_ram[(m_bank << 15) | offset] = data; + if (m_en && !ram5) + { + m_ram[(m_bank << 15) | offset] = data; + } } } diff --git a/src/mame/drivers/bw2.cpp b/src/mame/drivers/bw2.cpp index 9a1d03e82bd..455851a628d 100644 --- a/src/mame/drivers/bw2.cpp +++ b/src/mame/drivers/bw2.cpp @@ -450,7 +450,7 @@ uint8_t bw2_state::ppi_pc_r() */ - uint8_t data = 0; + uint8_t data = m_bank; // centronics busy data |= m_centronics_busy << 4; @@ -459,7 +459,7 @@ uint8_t bw2_state::ppi_pc_r() data |= m_mfdbk << 5; // write protect - if (m_floppy) data |= m_floppy->wpt_r() << 7; + if (m_floppy) data |= ((~m_floppy->wpt_r()) & 0x01) << 7; return data; } |