mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-01 02:03:47 +01:00
Get the CORE_RUNNING_GE coreState working!
This commit is contained in:
1 parent
96c4a10e8c
commit
e94defbb15
8 files changed
+67
-26
No files matched your search
+22
-17
@@ -620,27 +620,32 @@ void PSP_RunLoopWhileState() {
|
||||
// We just run the CPU until we get to vblank. This will quickly sync up pretty nicely.
|
||||
// The actual number of cycles doesn't matter so much here as we will break due to CORE_NEXTFRAME, most of the time hopefully...
|
||||
int blockTicks = usToCycles(1000000 / 10);
|
||||
|
||||
// Run until CORE_NEXTFRAME
|
||||
while (coreState == CORE_RUNNING_CPU || coreState == CORE_STEPPING_CPU) {
|
||||
PSP_RunLoopFor(blockTicks);
|
||||
if (coreState == CORE_STEPPING_CPU) {
|
||||
// Keep the UI responsive.
|
||||
break;
|
||||
}
|
||||
}
|
||||
PSP_RunLoopFor(blockTicks);
|
||||
}
|
||||
|
||||
void PSP_RunLoopUntil(u64 globalticks) {
|
||||
if (coreState == CORE_POWERDOWN || coreState == CORE_BOOT_ERROR || coreState == CORE_RUNTIME_ERROR) {
|
||||
return;
|
||||
} else if (coreState == CORE_STEPPING_CPU) {
|
||||
Core_ProcessStepping(currentDebugMIPS);
|
||||
return;
|
||||
}
|
||||
|
||||
if (coreState != CORE_NEXTFRAME) { // Can be set by SaveState as well as by sceDisplay
|
||||
mipsr4k.RunLoopUntil(globalticks);
|
||||
while (true) {
|
||||
switch (coreState) {
|
||||
case CORE_POWERDOWN:
|
||||
case CORE_BOOT_ERROR:
|
||||
case CORE_RUNTIME_ERROR:
|
||||
case CORE_NEXTFRAME:
|
||||
return;
|
||||
case CORE_STEPPING_CPU:
|
||||
Core_ProcessStepping(currentDebugMIPS);
|
||||
return;
|
||||
case CORE_RUNNING_CPU:
|
||||
mipsr4k.RunLoopUntil(globalticks);
|
||||
break; // Will loop around to go to RUNNING_GE or NEXTFRAME, which will exit.
|
||||
case CORE_STEPPING_GE:
|
||||
_dbg_assert_(false);
|
||||
break;
|
||||
case CORE_RUNNING_GE:
|
||||
gpu->ProcessDLQueue();
|
||||
coreState = CORE_RUNNING_CPU;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user