-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IR Interpreter - collect remaining bugs #15670
Comments
How about Metal Gear Solid: Peace Walker? (#10650) |
Workaround is disabled JIT Functionality ALU |
Is this memory leaks always happened and can be easily reproduced? |
Thanks! Yeah, this will prevent the crash when starting a race on Burnout Legends too. |
Disabling ALU probably disables a lot of things, and could by proxy affect something else. Sometimes, disabling other things may also help. If there's something other than ALU or LSU that helps, that's more useful information. It's kinda like if your automobile was having problems getting from point A to point B, and you tried shutting it off and pushing it by hand and foot to the destination. Did it help? Yes, the automobile is now at the destination. Does it tell someone what part of the electrical system is malfunctioning that keeps making it shut off on its own? Not really. If ALU is the only thing that can help, and disabling everything but ALU doesn't even help, that is more useful. -[Unknown] |
It pretty much has to be in IRApplyPasses, then, if ALU_IMM alone even fixes it. Most likely either RemoveLoadStoreLeftRight or PropagateConstants (can try commenting them out in the array in IRFrontend.cpp.) -[Unknown] |
Commenting |
Okay, commenting these cases inside case IROp::Sub:
case IROp::Slt:
case IROp::SltU:
symmetric = false; // fallthrough
case IROp::Add:
case IROp::And:
case IROp::Or:
case IROp::Xor:
// Regularize, for the add/or check below.
if (symmetric && inst.src2 == inst.dest && inst.src1 != inst.src2) {
std::swap(inst.src1, inst.src2);
}
if (gpr.IsImm(inst.src1) && gpr.IsImm(inst.src2)) {
gpr.SetImm(inst.dest, Evaluate(gpr.GetImm(inst.src1), gpr.GetImm(inst.src2), inst.op));
} else if (inst.op == IROp::And && gpr.IsImm(inst.src1) && gpr.GetImm(inst.src1) == 0) {
gpr.SetImm(inst.dest, 0);
} else if (inst.op == IROp::And && gpr.IsImm(inst.src2) && gpr.GetImm(inst.src2) == 0) {
gpr.SetImm(inst.dest, 0);
} else if (gpr.IsImm(inst.src2)) {
const u32 imm2 = gpr.GetImm(inst.src2);
gpr.MapDirtyIn(inst.dest, inst.src1);
if (imm2 == 0 && (inst.op == IROp::Add || inst.op == IROp::Or)) {
// Add / Or with zero is just a Mov.
if (inst.dest != inst.src1)
out.Write(IROp::Mov, inst.dest, inst.src1);
} else {
out.Write(ArithToArithConst(inst.op), inst.dest, inst.src1, out.AddConstant(imm2));
}
} else if (symmetric && gpr.IsImm(inst.src1)) {
const u32 imm1 = gpr.GetImm(inst.src1);
gpr.MapDirtyIn(inst.dest, inst.src2);
if (imm1 == 0 && (inst.op == IROp::Add || inst.op == IROp::Or)) {
// Add / Or with zero is just a Mov.
if (inst.dest != inst.src2)
out.Write(IROp::Mov, inst.dest, inst.src2);
} else {
out.Write(ArithToArithConst(inst.op), inst.dest, inst.src2, out.AddConstant(imm1));
}
} else {
gpr.MapDirtyInIn(inst.dest, inst.src1, inst.src2);
goto doDefault;
}
break; Edit: Commenting
Edit2: Changing this one line: if (imm2 == 0 && (inst.op == IROp::Add || inst.op == IROp::Or)) { into: if (imm2 == 0 && (inst.op == IROp::Add)) { will also fixes this |
Metal Gear Solid Peace Walker can also be fix by disabling jit functionality VFPU_VEC |
-[Unknown] |
Would be good to check these scenarios against #15713 when it's built or merged. It could change or fix some of them. -[Unknown] |
All right, i'll test again later. Btw @Gamemulatorer Could you test the artifacts from my workaround PR on MGS PW (and may be other games too) to see whether it fixes the issue there too? anr2me#17 |
Cool! with #15713 :
PS: I can't reproduce the issue on MGS:PW even without #15713 (ie. v1.12.3-1435) on Windows, may be someone else can test other games mentioned in this issue. |
GoW Ghost of Sparta still crashing using IR Interpreter #14958 (comment) Metal Gear Solid Peace Walker still have glitch Burnouts Legends not crashing anymore using IR Interpreter 🎉 |
I will test your build later and give feedback 🙂 |
Doesn't crash on my phone if i disable LSU in jit disable functionality using IR Interpreter. |
On Windows, disabling LSU only prevent ppsspp from crashing, but the game still crashed/showing blue/purple screen. There is one time where the game didn't crashed but showing a strange polygon/graphical glitches like in one of your video, but only happened once during my test, most of the time either ppsspp crashed or showing blue/purple screen. Edit: Yeah, i need to enable "Ignore bad memory access" combined with disabled LSU to prevent the game from crashing. |
Ignore Bad Memory Access is enable only LSU is disabled. |
@anr2me your android build cannot locate my others games especially in internal memory. |
With #16396, I think all the known IR issues might be fixed? Although someone posted one on Discord that might be that same bug. -[Unknown] |
Add Crash Of The Titans (Europe) to the list it also crashes in IR INTERPRETER see #12510 |
I'm not sure if it's really an IR issue specifically, given #14964 etc. Any game that requires "fast memory" to be disabled in jit should be expected to not work under IR, but that's not exactly a bug (in IR, it's definitely a bug somewhere else if any game requires fast memory in the first place.) Maybe more of a requested feature. IR doesn't support slow memory - you can't turn off fast memory for it. So it works like the actual PSP does, crashing on bad memory access. -[Unknown] |
As many of you have noticed, the IR interpreter (which is the only practical alternative on modern iOS due to Apple restrictions) is considerably less stable in some games than the JIT or the normal interpreter.
This should be fixable with some work, just need to investigate the issues one by one in detail. Here are the ones I know of:
Burnout Legends crashes when starting the first raceMetal Gear Solid: Peace Walker (MGS: Peace Walker: Character model glitch with IR interpreter #10650)God of War - Ghost of Sparta has a crash, might not be unique to IR: GOW - Ghost Of Sparta Segmentation fault #6982 God Of War Ghost Of Sparta: crash jumping down in nexus of atlantis (has workaround) #14958 (might be dupes)(not IR)Dissidia 012 Final Fantasy (Dissidia 012 Final Fantasy flickering animations with IR/Interpreter #13990)Frontier Gate Boost (Frontier Gate Boost bugs while using IR or interpreter #10500)Please report any others you know of here.
The text was updated successfully, but these errors were encountered: