void Advance() { s64 cycles_executed = g_slice_length - Core::g_app_core->down_count; global_timer += cycles_executed; Core::g_app_core->down_count = g_slice_length; if (has_ts_events) MoveEvents(); ProcessFifoWaitEvents(); if (!first) { if (g_slice_length < 10000) { g_slice_length += 10000; Core::g_app_core->down_count += g_slice_length; } } else { // Note that events can eat cycles as well. int target = (int)(first->time - global_timer); if (target > MAX_SLICE_LENGTH) target = MAX_SLICE_LENGTH; const int diff = target - g_slice_length; g_slice_length += diff; Core::g_app_core->down_count += diff; } if (advance_callback) advance_callback(static_cast<int>(cycles_executed)); }
void Advance() { int cyclesExecuted = slicelength - currentMIPS->downcount; globalTimer += cyclesExecuted; currentMIPS->downcount = slicelength; if (Common::AtomicLoadAcquire(hasTsEvents)) MoveEvents(); ProcessFifoWaitEvents(); if (!first) { // WARN_LOG(TIMER, "WARNING - no events in queue. Setting currentMIPS->downcount to 10000"); currentMIPS->downcount += 10000; slicelength = 10000; } else { slicelength = (int)(first->time - globalTimer); if (slicelength > MAX_SLICE_LENGTH) slicelength = MAX_SLICE_LENGTH; currentMIPS->downcount = slicelength; } if (advanceCallback) advanceCallback(cyclesExecuted); }
void Advance() { int cyclesExecuted = slicelength - currentMIPS->downcount; globalTimer += cyclesExecuted; currentMIPS->downcount = slicelength; if (Common::AtomicLoadAcquire(hasTsEvents)) MoveEvents(); ProcessFifoWaitEvents(); if (!first) { // This should never happen in PPSSPP. // WARN_LOG_REPORT(TIME, "WARNING - no events in queue. Setting currentMIPS->downcount to 10000"); if (slicelength < 10000) { slicelength += 10000; currentMIPS->downcount += slicelength; } } else { // Note that events can eat cycles as well. int target = (int)(first->time - globalTimer); if (target > MAX_SLICE_LENGTH) target = MAX_SLICE_LENGTH; const int diff = target - slicelength; slicelength += diff; currentMIPS->downcount += diff; } if (advanceCallback) advanceCallback(cyclesExecuted); }
void Idle() { //DEBUG_LOG(POWERPC, "Idle"); if (SConfig::GetInstance().bSyncGPUOnSkipIdleHack) { //When the FIFO is processing data we must not advance because in this way //the VI will be desynchronized. So, We are waiting until the FIFO finish and //while we process only the events required by the FIFO. ProcessFifoWaitEvents(); Fifo::FlushGpu(); } idledCycles += DowncountToCycles(PowerPC::ppcState.downcount); PowerPC::ppcState.downcount = 0; }
void Idle() { //DEBUG_LOG(POWERPC, "Idle"); //When the FIFO is processing data we must not advance because in this way //the VI will be desynchronized. So, We are waiting until the FIFO finish and //while we process only the events required by the FIFO. while (g_video_backend->Video_IsPossibleWaitingSetDrawDone()) { ProcessFifoWaitEvents(); Common::YieldCPU(); } idledCycles += downcount; downcount = 0; Advance(); }
void Idle() { //DEBUG_LOG(POWERPC, "Idle"); if (SConfig::GetInstance().m_LocalCoreStartupParameter.bSyncGPUOnSkipIdleHack) { //When the FIFO is processing data we must not advance because in this way //the VI will be desynchronized. So, We are waiting until the FIFO finish and //while we process only the events required by the FIFO. while (g_video_backend->Video_IsPossibleWaitingSetDrawDone()) { ProcessFifoWaitEvents(); Common::YieldCPU(); } } idledCycles += DowncountToCycles(PowerPC::ppcState.downcount); PowerPC::ppcState.downcount = 0; }
void Advance() { int cyclesExecuted = slicelength - downcount; globalTimer += cyclesExecuted; downcount = slicelength; ProcessFifoWaitEvents(); if (!first) { // WARN_LOG(CPU, "WARNING - no events in queue. Setting downcount to 10000"); downcount += 10000; } else { slicelength = (int)(first->time - globalTimer); if (slicelength > MAX_SLICE_LENGTH) slicelength = MAX_SLICE_LENGTH; downcount = slicelength; } if (advanceCallback) advanceCallback(cyclesExecuted); }