mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-05-28 17:41:37 +00:00
TIMER1's T1C=T1L=/usr/bin/bash000 gets interpreted as
This commit is contained in:
parent
7609b5f67e
commit
3a7ff2063b
|
@ -110,6 +110,7 @@ USHORT SY6522::SetTimerSyncEvent(BYTE reg, USHORT timerLatch)
|
|||
if (syncEvent->m_active)
|
||||
g_SynchronousEventMgr.Remove(syncEvent->m_id);
|
||||
|
||||
if (m_isMegaAudio && timerLatch == 0x0000) timerLatch = 0xFFFF; // Probably should be 0x10000, but 0xFFFF is good enough
|
||||
const UINT kMegaAudioAdjust = m_isMegaAudio ? 1 : 0; // MegaAudio asserts IRQ 1 cycle late!
|
||||
syncEvent->SetCycles(timerLatch + kExtraTimerCycles + opcodeCycleAdjust + kMegaAudioAdjust);
|
||||
g_SynchronousEventMgr.Insert(syncEvent);
|
||||
|
@ -289,8 +290,9 @@ int SY6522::OnTimer1Underflow(USHORT& counter)
|
|||
if (m_isMegaAudio)
|
||||
{
|
||||
const UINT kMegaAudioAdjust = 1; // MegaAudio asserts IRQ 1 cycle late!
|
||||
const UINT timerLatch = m_regs.TIMER1_LATCH.w ? m_regs.TIMER1_LATCH.w : 0x10000; // MegaAudio: for a latch of 0x0000 use 0x10000!
|
||||
while (timer < -2)
|
||||
timer += (m_regs.TIMER1_LATCH.w + kExtraTimerCycles + kMegaAudioAdjust);
|
||||
timer += (timerLatch + kExtraTimerCycles + kMegaAudioAdjust);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user