Description: Call this when an IO-reg is accessed & accurate cycle info is needed NB. Safe to call multiple times from the same IO function handler (as 'nExecutedCycles - g_nCyclesExecuted' will be zero the 2nd time) Pre: nExecutedCycles = # of cycles executed by Cpu6502() or Cpu65C02() for this iteration of ContinueExecution() Post: g_nCyclesExecuted g_nCumulativeCycles
| 684 | // g_nCumulativeCycles |
| 685 | // |
| 686 | void CpuCalcCycles(const ULONG nExecutedCycles) |
| 687 | { |
| 688 | // Calc # of cycles executed since this func was last called |
| 689 | const ULONG nCycles = nExecutedCycles - g_nCyclesExecuted; |
| 690 | _ASSERT( (LONG)nCycles >= 0 ); |
| 691 | g_nCumulativeCycles += nCycles; |
| 692 | |
| 693 | g_nCyclesExecuted = nExecutedCycles; |
| 694 | } |
| 695 | |
| 696 | //=========================================================================== |
| 697 |
no outgoing calls
no test coverage detected