Mockingboard: moved multi-TIMER1 support before the AY access. (#685)
This commit is contained in:
parent
11323e2aba
commit
ed9ae72778
1 changed files with 13 additions and 13 deletions
|
@ -394,6 +394,19 @@ static void SY6522_Write(BYTE nDevice, BYTE nReg, BYTE nValue)
|
|||
break;
|
||||
}
|
||||
|
||||
if (g_waitFirstAYWriteAfterTimer1Int) // GH#685: Multiple TIMER1 interrupts
|
||||
{
|
||||
g_waitFirstAYWriteAfterTimer1Int = false;
|
||||
//CpuCalcCycles(uExecutedCycles); // Done in parent MB_Write() via MB_UpdateCycles()
|
||||
|
||||
g_AYWriteAccessTimer1IntPeriod = g_nCumulativeCycles - g_lastAY8910cycleAccess;
|
||||
if (g_AYWriteAccessTimer1IntPeriod > 0xffff)
|
||||
g_AYWriteAccessTimer1IntPeriod = (UINT64)g_f6522TimerPeriod_NoIRQ;
|
||||
g_lastAY8910cycleAccess = g_nCumulativeCycles;
|
||||
|
||||
MB_Update();
|
||||
}
|
||||
|
||||
if(g_bPhasorEnable)
|
||||
{
|
||||
int nAY_CS = (g_nPhasorMode & 1) ? (~(nValue >> 3) & 3) : 1;
|
||||
|
@ -409,19 +422,6 @@ static void SY6522_Write(BYTE nDevice, BYTE nReg, BYTE nValue)
|
|||
AY8910_Write(nDevice, nReg, nValue, 0);
|
||||
}
|
||||
|
||||
if (g_waitFirstAYWriteAfterTimer1Int) // GH#685: Multiple TIMER1 interrupts
|
||||
{
|
||||
g_waitFirstAYWriteAfterTimer1Int = false;
|
||||
//CpuCalcCycles(uExecutedCycles); // Done in parent MB_Write() via MB_UpdateCycles()
|
||||
|
||||
g_AYWriteAccessTimer1IntPeriod = g_nCumulativeCycles - g_lastAY8910cycleAccess;
|
||||
if (g_AYWriteAccessTimer1IntPeriod > 0xffff)
|
||||
g_AYWriteAccessTimer1IntPeriod = (UINT64) g_f6522TimerPeriod_NoIRQ;
|
||||
g_lastAY8910cycleAccess = g_nCumulativeCycles;
|
||||
|
||||
MB_Update();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 0x01: // ORA
|
||||
|
|
Loading…
Add table
Reference in a new issue