apple2: Add $C074 control register to TransWarp card emulation. [R. Belmont]

This commit is contained in:
arbee 2019-12-15 22:39:58 -05:00
parent 90475ff0d9
commit 03583be0fe

View File

@ -8,10 +8,15 @@
TODO:
- needs built-in language card, it's advertised to work w/o one.
- C074 speed control
- Doesn't work with Swyft but advertised to; how does h/w get
around the Fxxx ROM not checksumming right?
To control this from software:
- There's no way I can tell to detect it besides maybe measuring
how many cycles between vblanks or something.
- Write to $C074: 0 = fast speed, 1 = 1 MHz,
3 = disables the TransWarp's CPU and restarts the Apple's 65(C)02.
*********************************************************************/
#include "emu.h"
@ -166,9 +171,13 @@ void a2bus_transwarp_device::device_reset()
if (!(m_dsw2->read() & 0x80))
{
if (m_dsw1->read() & 0x80)
{
m_ourcpu->set_unscaled_clock(A2BUS_7M_CLOCK / 4);
}
else
{
m_ourcpu->set_unscaled_clock(A2BUS_7M_CLOCK / 2);
}
}
else
{
@ -181,9 +190,13 @@ void a2bus_transwarp_device::device_timer(emu_timer &timer, device_timer_id id,
if (!(m_dsw2->read() & 0x80))
{
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);
}
@ -221,13 +234,37 @@ WRITE8_MEMBER( a2bus_transwarp_device::dma_w )
{
hit_slot_joy();
}
if (offset == 0xc072)
else if (offset == 0xc072)
{
m_bReadA2ROM = true;
}
if ((offset >= 0xc090) && (offset <= 0xc0ff))
else if (offset == 0xc074)
{
if (data == 0)
{
if (m_dsw1->read() & 0x80)
{
m_ourcpu->set_unscaled_clock(A2BUS_7M_CLOCK / 4);
}
else
{
m_ourcpu->set_unscaled_clock(A2BUS_7M_CLOCK / 2);
}
}
else if (data == 1)
{
m_ourcpu->set_unscaled_clock(1021800);
}
else if (data == 3)
{
// disable our CPU
m_ourcpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
// re-enable the Apple's
lower_slot_dma();
}
return;
}
else if ((offset >= 0xc090) && (offset <= 0xc0ff))
{
hit_slot(((offset >> 4) & 0xf) - 8);
}