mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-22 02:39:05 +02:00
Merge pull request #19895 from hrydgard/regression-fixes
Regression fixes
This commit is contained in:
6 files changed
+29
-20
No files matched your search
@@ -798,6 +798,7 @@ void CallSyscall(MIPSOpcode op) {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Also add support for argument names.
|
||||
size_t hleFormatLogArgs(char *message, size_t sz, const char *argmask) {
|
||||
char *p = message;
|
||||
size_t used = 0;
|
||||
|
||||
@@ -1099,7 +1099,7 @@ static u32 sceDisplaySetBrightness(int level, int other) {
|
||||
static u32 sceDisplaySetHoldMode(u32 hMode) {
|
||||
// Not sure what this does, seems to do nothing in tests and accept all values.
|
||||
holdMode = hMode;
|
||||
return hleReportError(Log::sceDisplay, 0, "unsupported");
|
||||
return hleLogWarning(Log::sceDisplay, 0, "UNIMPL");
|
||||
}
|
||||
|
||||
const HLEFunction sceDisplay[] = {
|
||||
|
||||
+9
-10
@@ -332,18 +332,17 @@ bool __GeTriggerWait(GPUSyncType type, SceUID waitId) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Some games spam this, like MediEvil.
|
||||
static u32 sceGeEdramGetAddr() {
|
||||
u32 retVal = 0x04000000;
|
||||
DEBUG_LOG(Log::sceGe, "%08x = sceGeEdramGetAddr", retVal);
|
||||
hleEatCycles(150);
|
||||
return retVal;
|
||||
return hleLogVerbose(Log::sceGe, retVal);
|
||||
}
|
||||
|
||||
// TODO: Return a different value for the PS3 enhanced-emulator games?
|
||||
static u32 sceGeEdramGetSize() {
|
||||
const u32 retVal = 0x00200000;
|
||||
DEBUG_LOG(Log::sceGe, "%08x = sceGeEdramGetSize()", retVal);
|
||||
return retVal;
|
||||
return hleLogVerbose(Log::sceGe, retVal);
|
||||
}
|
||||
|
||||
static int __GeSubIntrBase(int callbackId) {
|
||||
@@ -351,9 +350,6 @@ static int __GeSubIntrBase(int callbackId) {
|
||||
}
|
||||
|
||||
u32 sceGeListEnQueue(u32 listAddress, u32 stallAddress, int callbackId, u32 optParamAddr) {
|
||||
DEBUG_LOG(Log::sceGe,
|
||||
"sceGeListEnQueue(addr=%08x, stall=%08x, cbid=%08x, param=%08x) ticks=%d",
|
||||
listAddress, stallAddress, callbackId, optParamAddr, (int)CoreTiming::GetTicks());
|
||||
auto optParam = PSPPointer<PspGeListArgs>::Create(optParamAddr);
|
||||
|
||||
bool runList;
|
||||
@@ -369,13 +365,16 @@ u32 sceGeListEnQueue(u32 listAddress, u32 stallAddress, int callbackId, u32 optP
|
||||
}
|
||||
hleEatCycles(490);
|
||||
hleCoreTimingForceCheck();
|
||||
return listID; // We already logged above, logs get confusing if we use hleLogSuccess.
|
||||
DEBUG_LOG(Log::sceGe,
|
||||
"%08x=sceGeListEnQueue(addr=%08x, stall=%08x, cbid=%08x, param=%08x) ticks=%lld", listID,
|
||||
listAddress, stallAddress, callbackId, optParamAddr, (long long)CoreTiming::GetTicks());
|
||||
return hleNoLog(listID); // We already logged above, logs get confusing if we use hleLogSuccess.
|
||||
}
|
||||
|
||||
u32 sceGeListEnQueueHead(u32 listAddress, u32 stallAddress, int callbackId, u32 optParamAddr) {
|
||||
DEBUG_LOG(Log::sceGe,
|
||||
"sceGeListEnQueueHead(addr=%08x, stall=%08x, cbid=%08x, param=%08x) ticks=%d",
|
||||
listAddress, stallAddress, callbackId, optParamAddr, (int)CoreTiming::GetTicks());
|
||||
"sceGeListEnQueueHead(addr=%08x, stall=%08x, cbid=%08x, param=%08x) ticks=%lld",
|
||||
listAddress, stallAddress, callbackId, optParamAddr, (long long)CoreTiming::GetTicks());
|
||||
auto optParam = PSPPointer<PspGeListArgs>::Create(optParamAddr);
|
||||
|
||||
bool runList;
|
||||
|
||||
@@ -600,7 +600,7 @@ static u32 sceKernelMemset(u32 addr, u32 fillc, u32 n) {
|
||||
}
|
||||
}
|
||||
NotifyMemInfo(MemBlockFlags::WRITE, addr, n, "KernelMemset");
|
||||
return hleLogDebug(Log::sceIntc, addr);
|
||||
return hleLogDebug(Log::sceKernel, addr);
|
||||
}
|
||||
|
||||
static u32 sceKernelMemcpy(u32 dst, u32 src, u32 size) {
|
||||
|
||||
@@ -2143,7 +2143,8 @@ u32 sceKernelLoadModule(const char *name, u32 flags, u32 optionAddr) {
|
||||
|
||||
if (!module) {
|
||||
if (magic == 0x46535000) {
|
||||
// TODO: What's actually going on here?
|
||||
// TODO: What's actually going on here? This is needed to keep Tekken 6 working, the "proper" error breaks it, when it tries to load PARAM.SFO as a module.
|
||||
error = -1;
|
||||
return hleDelayResult(hleLogError(Log::Loader, error, "Game tried to load an SFO as a module. Go figure? Magic = %08x", magic), "module loaded", 500);
|
||||
}
|
||||
|
||||
|
||||
+15
-7
@@ -748,18 +748,20 @@ DLResult GPUCommon::ProcessDLQueue() {
|
||||
for (int listIndex = GetNextListIndex(); listIndex != -1; listIndex = GetNextListIndex()) {
|
||||
DisplayList &list = dls[listIndex];
|
||||
|
||||
if (!Memory::IsValidAddress(list.pc)) {
|
||||
ERROR_LOG(Log::G3D, "DL PC = %08x WTF!!!!", list.pc);
|
||||
return DLResult::Error;
|
||||
if (list.state == PSP_GE_DL_STATE_PAUSED) {
|
||||
return DLResult::Done;
|
||||
}
|
||||
|
||||
// Temporary workaround for Crazy Taxi, see #19894
|
||||
if (list.state == PSP_GE_DL_STATE_NONE) {
|
||||
WARN_LOG(Log::G3D, "Discarding display list with state NONE (pc=%08x). This is odd.", list.pc);
|
||||
dlQueue.erase(std::remove(dlQueue.begin(), dlQueue.end(), listIndex), dlQueue.end());
|
||||
return DLResult::Done;
|
||||
}
|
||||
|
||||
DEBUG_LOG(Log::G3D, "%s DL execution at %08x - stall = %08x (startingTicks=%lld)",
|
||||
list.pc == list.startpc ? "Starting" : "Resuming", list.pc, list.stall, startingTicks);
|
||||
|
||||
if (list.state == PSP_GE_DL_STATE_PAUSED) {
|
||||
return DLResult::Done;
|
||||
}
|
||||
|
||||
if (!resumingFromDebugBreak_) {
|
||||
// TODO: Need to be careful when *resuming* a list (when it wasn't from a stall...)
|
||||
currentList = &list;
|
||||
@@ -771,6 +773,11 @@ DLResult GPUCommon::ProcessDLQueue() {
|
||||
|
||||
gstate_c.offsetAddr = list.offsetAddr;
|
||||
|
||||
if (!Memory::IsValidAddress(list.pc)) {
|
||||
ERROR_LOG(Log::G3D, "DL PC = %08x WTF!!!!", list.pc);
|
||||
return DLResult::Done;
|
||||
}
|
||||
|
||||
cycleLastPC = list.pc;
|
||||
cyclesExecuted += 60;
|
||||
downcount = list.stall == 0 ? 0x0FFFFFFF : (list.stall - list.pc) / 4;
|
||||
@@ -842,6 +849,7 @@ DLResult GPUCommon::ProcessDLQueue() {
|
||||
// don't do anything - though dunno about error...
|
||||
break;
|
||||
case GPUSTATE_STALL:
|
||||
// Resume work on this same display list later.
|
||||
return DLResult::Done;
|
||||
default:
|
||||
return DLResult::Error;
|
||||
|
||||
Reference in new issue
Block a user