mirror of
https://github.com/holub/mame
synced 2025-07-02 00:29:37 +03:00
apple2: TransWarp card now slows down during joystick reads [R. Belmont]
This commit is contained in:
parent
e9d6dc8ef0
commit
1d8288f57a
@ -190,6 +190,11 @@ void a2bus_transwarp_device::device_timer(emu_timer &timer, device_timer_id id,
|
|||||||
|
|
||||||
READ8_MEMBER( a2bus_transwarp_device::dma_r )
|
READ8_MEMBER( a2bus_transwarp_device::dma_r )
|
||||||
{
|
{
|
||||||
|
if (offset == 0xc070)
|
||||||
|
{
|
||||||
|
hit_slot_joy();
|
||||||
|
}
|
||||||
|
|
||||||
if ((offset >= 0xc090) && (offset <= 0xc0ff))
|
if ((offset >= 0xc090) && (offset <= 0xc0ff))
|
||||||
{
|
{
|
||||||
hit_slot(((offset >> 4) & 0xf) - 8);
|
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) && (offset <= 0xc07f)) printf("%02x to %04x\n", data, offset);
|
||||||
|
|
||||||
|
if (offset == 0xc070)
|
||||||
|
{
|
||||||
|
hit_slot_joy();
|
||||||
|
}
|
||||||
|
|
||||||
if (offset == 0xc072)
|
if (offset == 0xc072)
|
||||||
{
|
{
|
||||||
m_bReadA2ROM = true;
|
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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -54,6 +54,7 @@ private:
|
|||||||
void m65c02_mem(address_map &map);
|
void m65c02_mem(address_map &map);
|
||||||
|
|
||||||
void hit_slot(int slot);
|
void hit_slot(int slot);
|
||||||
|
void hit_slot_joy();
|
||||||
};
|
};
|
||||||
|
|
||||||
// device type definition
|
// device type definition
|
||||||
|
Loading…
Reference in New Issue
Block a user