diff options
author | 2019-12-16 07:42:31 -0500 | |
---|---|---|
committer | 2019-12-16 07:42:31 -0500 | |
commit | 8d393c5e7f7e3a7ddeb20c636e48661ebbc4ec04 (patch) | |
tree | f45cdb7a2064672905c7ce5e9bc689b225a58c78 | |
parent | f6ee4fb09621c3acf9c9bd689447271660c32b38 (diff) |
apple2: TransWarp needs to stay at 1 MHz if software told it to (nw)
-rw-r--r-- | src/devices/bus/a2bus/transwarp.cpp | 23 | ||||
-rw-r--r-- | src/devices/bus/a2bus/transwarp.h | 1 |
2 files changed, 17 insertions, 7 deletions
diff --git a/src/devices/bus/a2bus/transwarp.cpp b/src/devices/bus/a2bus/transwarp.cpp index a40e7e99fae..7c34c3dead1 100644 --- a/src/devices/bus/a2bus/transwarp.cpp +++ b/src/devices/bus/a2bus/transwarp.cpp @@ -187,15 +187,22 @@ void a2bus_transwarp_device::device_reset() void a2bus_transwarp_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) { - if (!(m_dsw2->read() & 0x80)) + if (m_bIn1MHzMode) { - if (m_dsw1->read() & 0x80) - { - m_ourcpu->set_unscaled_clock(A2BUS_7M_CLOCK / 4); - } - else + m_ourcpu->set_unscaled_clock(1021800); + } + else + { + if (!(m_dsw2->read() & 0x80)) { - m_ourcpu->set_unscaled_clock(A2BUS_7M_CLOCK / 2); + if (m_dsw1->read() & 0x80) + { + m_ourcpu->set_unscaled_clock(A2BUS_7M_CLOCK / 4); + } + else + { + m_ourcpu->set_unscaled_clock(A2BUS_7M_CLOCK / 2); + } } } m_timer->adjust(attotime::never); @@ -250,10 +257,12 @@ WRITE8_MEMBER( a2bus_transwarp_device::dma_w ) { m_ourcpu->set_unscaled_clock(A2BUS_7M_CLOCK / 2); } + m_bIn1MHzMode = false; } else if (data == 1) { m_ourcpu->set_unscaled_clock(1021800); + m_bIn1MHzMode = true; } else if (data == 3) { diff --git a/src/devices/bus/a2bus/transwarp.h b/src/devices/bus/a2bus/transwarp.h index e687ae6d350..1c01ffef10d 100644 --- a/src/devices/bus/a2bus/transwarp.h +++ b/src/devices/bus/a2bus/transwarp.h @@ -42,6 +42,7 @@ protected: private: bool m_bEnabled; bool m_bReadA2ROM; + bool m_bIn1MHzMode; emu_timer *m_timer; required_device<cpu_device> m_ourcpu; |