Called by: . CpuExecute() every ~1000 cycles @ 1MHz (or ~3 cycles when MODE_STEPPING) . MB_SyncEventCallback() on a TIMER1/2 underflow . IORead() / IOWrite() (for both normal & full-speed)
| 957 | // . MB_SyncEventCallback() on a TIMER1/2 underflow |
| 958 | // . IORead() / IOWrite() (for both normal & full-speed) |
| 959 | void MockingboardCard::UpdateCycles(ULONG executedCycles) |
| 960 | { |
| 961 | CpuCalcCycles(executedCycles); |
| 962 | UINT64 uCycles = g_nCumulativeCycles - m_lastCumulativeCycle; |
| 963 | _ASSERT(uCycles >= 0); |
| 964 | if (uCycles == 0) |
| 965 | return; |
| 966 | |
| 967 | m_lastCumulativeCycle = g_nCumulativeCycles; |
| 968 | _ASSERT(uCycles < 0x10000 || g_nAppMode == MODE_BENCHMARK); |
| 969 | USHORT nClocks = (USHORT)uCycles; |
| 970 | |
| 971 | for (UINT i = 0; i < NUM_SUBUNITS_PER_MB; i++) |
| 972 | { |
| 973 | m_MBSubUnit[i].sy6522.UpdateTimer1(nClocks); |
| 974 | m_MBSubUnit[i].sy6522.UpdateTimer2(nClocks); |
| 975 | } |
| 976 | } |
| 977 | |
| 978 | //----------------------------------------------------------------------------- |
| 979 |
no test coverage detected