apple2: TransWarp needs to stay at 1 MHz if software told it to (nw)

This commit is contained in:
arbee 2019-12-16 07:42:31 -05:00
parent f6ee4fb096
commit 8d393c5e7f
2 changed files with 17 additions and 7 deletions

View File

@ -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) 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(1021800);
}
else
{
if (!(m_dsw2->read() & 0x80))
{ {
m_ourcpu->set_unscaled_clock(A2BUS_7M_CLOCK / 4); if (m_dsw1->read() & 0x80)
} {
else m_ourcpu->set_unscaled_clock(A2BUS_7M_CLOCK / 4);
{ }
m_ourcpu->set_unscaled_clock(A2BUS_7M_CLOCK / 2); else
{
m_ourcpu->set_unscaled_clock(A2BUS_7M_CLOCK / 2);
}
} }
} }
m_timer->adjust(attotime::never); 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_ourcpu->set_unscaled_clock(A2BUS_7M_CLOCK / 2);
} }
m_bIn1MHzMode = false;
} }
else if (data == 1) else if (data == 1)
{ {
m_ourcpu->set_unscaled_clock(1021800); m_ourcpu->set_unscaled_clock(1021800);
m_bIn1MHzMode = true;
} }
else if (data == 3) else if (data == 3)
{ {

View File

@ -42,6 +42,7 @@ protected:
private: private:
bool m_bEnabled; bool m_bEnabled;
bool m_bReadA2ROM; bool m_bReadA2ROM;
bool m_bIn1MHzMode;
emu_timer *m_timer; emu_timer *m_timer;
required_device<cpu_device> m_ourcpu; required_device<cpu_device> m_ourcpu;