void BurnTimerUpdateEndYM3812() { // bprintf(PRINT_NORMAL, _T(" - end %i\n"), pCPUTotalCycles()); pCPURunEnd(); nTicksTotal = 0; }
void BurnOPMTimerCallback(int c, double period) { pCPURunEnd(); if (period == 0.0) { nTimerCount[c] = MAX_TIMER_VALUE; return; } nTimerCount[c] = (int)(period * (double)TIMER_TICKS_PER_SECOND); nTimerCount[c] += MAKE_TIMER_TICKS(pCPUTotalCycles(), nCPUClockspeed); }
void BurnOPLTimerCallbackYM3812(INT32 c, double period) { pCPURunEnd(); if (period == 0.0) { nTimerCount[c] = MAX_TIMER_VALUE; // bprintf(PRINT_NORMAL, _T(" - timer %i stopped\n"), c); return; } nTimerCount[c] = (INT32)(period * (double)TIMER_TICKS_PER_SECOND); nTimerCount[c] += MAKE_TIMER_TICKS(pCPUTotalCycles(), nCPUClockspeed); // bprintf(PRINT_NORMAL, _T(" - timer %i started, %08X ticks (fires in %lf seconds)\n"), c, nTimerCount[c], period); }
void BurnOPNTimerCallback(int /*n */, int c, int cnt, double stepTime) { pCPURunEnd(); if (cnt == 0) { nTimerCount[c] = MAX_TIMER_VALUE; // bprintf(PRINT_NORMAL, _T(" - timer %i stopped\n"), c); return; } nTimerCount[c] = (int)(stepTime * cnt * (double)TIMER_TICKS_PER_SECOND); nTimerCount[c] += MAKE_TIMER_TICKS(pCPUTotalCycles(), nCPUClockspeed); // bprintf(PRINT_NORMAL, _T(" - timer %i started, %08X ticks (fires in %lf seconds)\n"), c, nTimerCount[c], stepTime * cnt); }
void BurnTimerSetOneshot(int c, double period) { pCPURunEnd(); if (period == 0.0) { nTimerStart[c] = nTimerCount[c] = MAX_TIMER_VALUE; // bprintf(PRINT_NORMAL, _T(" - timer %i stopped\n"), c); return; } nTimerCount[c] = (int)(period * (double)(TIMER_TICKS_PER_SECOND)); nTimerCount[c] += MAKE_TIMER_TICKS(pCPUTotalCycles(), nCPUClockspeed); // bprintf(PRINT_NORMAL, _T(" - timer %i started, %08X ticks (fires in %lf seconds)\n"), c, nTimerCount[c], period / 1000000.0); }