More MIPSState * plumbing (manual)

This commit is contained in:
Henrik Rydgård committed 2026-08-12 14:02:19 +02:00
1 parent c9c886d78f
commit e9a3449ede
37 files changed
+130 -123

No files matched your search

+4 -4
View File
@@ -664,7 +664,7 @@ static void __KernelDelayEndCallback(SceUID threadID, SceUID prevCallbackId) {
// TODO: Don't wake up if __KernelCurHasReadyCallbacks()?
s64 cyclesLeft = delayDeadline - CoreTiming::GetTicks();
s64 cyclesLeft = delayDeadline - CoreTiming::GetTicks(currentMIPS);
if (cyclesLeft < 0) {
__KernelResumeThreadFromWait(threadID, 0);
} else {
@@ -884,7 +884,7 @@ void __KernelThreadingDoState(PointerWrap &p)
Do(p, pausedDelays);
__SetCurrentThread(kernelObjects.GetFast<PSPThread>(currentThread), currentThread, __KernelGetThreadName(currentThread));
lastSwitchCycles = CoreTiming::GetTicks();
lastSwitchCycles = CoreTiming::GetTicks(currentMIPS);
if (s >= 2)
Do(p, threadEventHandlers);
@@ -1037,7 +1037,7 @@ void __KernelIdle()
// Don't skip 0xDEADBEEF here, this is called directly bypassing CallSyscall().
// That means the hle flag would stick around until the next call.
CoreTiming::Idle();
CoreTiming::Idle(currentMIPS);
// We Advance within __KernelReSchedule(), so anything that has now happened after idle
// will be triggered properly upon reschedule.
__KernelReSchedule("idle");
@@ -2943,7 +2943,7 @@ void __KernelSwitchContext(PSPThread *target, const char *reason) {
#if DEBUG_LEVEL <= MAX_LOGLEVEL || DEBUG_LOG == NOTICE_LOG
if (!(fromIdle && toIdle))
{
u64 nowCycles = CoreTiming::GetTicks();
u64 nowCycles = CoreTiming::GetTicks(currentMIPS);
s64 consumedCycles = nowCycles - lastSwitchCycles;
lastSwitchCycles = nowCycles;