mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-24 05:49:58 +00:00
Work around some crashes I got trying to load a GTA:LCS savestate from 2014.
However, the savestate still loads to a black screen, although background audio is working.
This commit is contained in:
parent
77b40c2ee4
commit
68fc776fa7
@ -66,6 +66,11 @@ public:
|
||||
GeIntrHandler() : IntrHandler(PSP_GE_INTR) {}
|
||||
|
||||
bool run(PendingInterrupt& pend) override {
|
||||
if (ge_pending_cb.empty()) {
|
||||
ERROR_LOG_REPORT(SCEGE, "Unable to run GE interrupt: no pending interrupt");
|
||||
return false;
|
||||
}
|
||||
|
||||
GeInterruptData intrdata = ge_pending_cb.front();
|
||||
DisplayList* dl = gpu->getList(intrdata.listid);
|
||||
|
||||
|
@ -603,15 +603,23 @@ void Jit::Comp_ReplacementFunc(MIPSOpcode op)
|
||||
}
|
||||
}
|
||||
|
||||
// Hack for old savestates: Avoid stack overflow (MIPSCompileOp/CompReplacementFunc)
|
||||
// Not sure about the cause.
|
||||
Memory::Opcode origInstruction = Memory::Read_Instruction(GetCompilerPC(), true);
|
||||
if (origInstruction.encoding == op.encoding) {
|
||||
ERROR_LOG(HLE, "Replacement broken (savestate problem?): %08x", op.encoding);
|
||||
return;
|
||||
}
|
||||
|
||||
if (disabled) {
|
||||
MIPSCompileOp(Memory::Read_Instruction(GetCompilerPC(), true));
|
||||
MIPSCompileOp(origInstruction);
|
||||
} else if (entry->jitReplaceFunc) {
|
||||
MIPSReplaceFunc repl = entry->jitReplaceFunc;
|
||||
int cycles = (this->*repl)();
|
||||
|
||||
if (entry->flags & (REPFLAG_HOOKENTER | REPFLAG_HOOKEXIT)) {
|
||||
// Compile the original instruction at this address. We ignore cycles for hooks.
|
||||
MIPSCompileOp(Memory::Read_Instruction(GetCompilerPC(), true));
|
||||
MIPSCompileOp(origInstruction);
|
||||
} else {
|
||||
FlushAll();
|
||||
MOV(32, R(ECX), M(&mips_->r[MIPS_REG_RA]));
|
||||
|
Loading…
Reference in New Issue
Block a user