apple2: TransWarp card now slows down during joystick reads [R. Belmont]

This commit is contained in:
arbee 2019-03-16 11:19:12 -04:00
parent e9d6dc8ef0
commit 1d8288f57a
2 changed files with 23 additions and 0 deletions

View File

@ -190,6 +190,11 @@ void a2bus_transwarp_device::device_timer(emu_timer &timer, device_timer_id id,
READ8_MEMBER( a2bus_transwarp_device::dma_r )
{
if (offset == 0xc070)
{
hit_slot_joy();
}
if ((offset >= 0xc090) && (offset <= 0xc0ff))
{
hit_slot(((offset >> 4) & 0xf) - 8);
@ -212,6 +217,11 @@ WRITE8_MEMBER( a2bus_transwarp_device::dma_w )
{
//if ((offset >= 0xc070) && (offset <= 0xc07f)) printf("%02x to %04x\n", data, offset);
if (offset == 0xc070)
{
hit_slot_joy();
}
if (offset == 0xc072)
{
m_bReadA2ROM = true;
@ -244,3 +254,15 @@ void a2bus_transwarp_device::hit_slot(int slot)
}
}
}
void a2bus_transwarp_device::hit_slot_joy()
{
// only do slot slowdown if acceleration is enabled
if (!(m_dsw2->read() & 0x80))
{
// accleration's on
m_ourcpu->set_unscaled_clock(1021800);
// PREAD main loop counts up to 11*256 uSec, add 1 to cover the setup
m_timer->adjust(attotime::from_usec(11*257));
}
}

View File

@ -54,6 +54,7 @@ private:
void m65c02_mem(address_map &map);
void hit_slot(int slot);
void hit_slot_joy();
};
// device type definition