diff --git a/Common/x64Analyzer.cpp b/Common/x64Analyzer.cpp index 1a9d236db6..b0bc65403f 100644 --- a/Common/x64Analyzer.cpp +++ b/Common/x64Analyzer.cpp @@ -145,10 +145,8 @@ bool X86AnalyzeMOV(const unsigned char *codePtr, LSInstructionInfo &info) info.displacement = *((s32 *)codePtr); codePtr += displacementSize; - if (accessType == 1) + if (accessType == 1) // reg/mem { - info.isMemoryWrite = true; - //Write access switch (codeByte) { case MOVE_8BIT: //move 8-bit immediate @@ -182,9 +180,11 @@ bool X86AnalyzeMOV(const unsigned char *codePtr, LSInstructionInfo &info) } break; case MOVE_REG_TO_MEM: //move reg to memory + info.isMemoryWrite = true; break; case MOVE_MEM_TO_REG: + info.isMemoryWrite = false; break; default: @@ -195,6 +195,7 @@ bool X86AnalyzeMOV(const unsigned char *codePtr, LSInstructionInfo &info) else { // Memory read + info.isMemoryWrite = false; //mov eax, dword ptr [rax] == 8b 00 switch (codeByte) diff --git a/Core/ELF/ParamSFO.h b/Core/ELF/ParamSFO.h index aac91f12e7..b0fee3cece 100644 --- a/Core/ELF/ParamSFO.h +++ b/Core/ELF/ParamSFO.h @@ -42,7 +42,11 @@ public: const std::string discID = GetValueString("DISC_ID"); if (discID.empty()) { std::string fakeID = GenerateFakeID(); - WARN_LOG(LOADER, "No DiscID found - generating a fake one: %s", fakeID.c_str()); + WARN_LOG(LOADER, "No DiscID found - generating a fake one: '%s'", fakeID.c_str()); + ValueData data; + data.type = VT_UTF8; + data.s_value = fakeID; + values["DISC_ID"] = data; return fakeID; } return discID; diff --git a/Core/MemFault.cpp b/Core/MemFault.cpp index a550375161..0f4393b3a0 100644 --- a/Core/MemFault.cpp +++ b/Core/MemFault.cpp @@ -113,11 +113,13 @@ bool HandleFault(uintptr_t hostAddress, void *ctx) { int instructionSize = 4; #if PPSSPP_ARCH(AMD64) || PPSSPP_ARCH(X86) // X86, X86-64. Variable instruction size so need to analyze the mov instruction in detail. + instructionSize = 15; // To ignore the access, we need to disassemble the instruction and modify context->CTX_PC LSInstructionInfo info{}; success = X86AnalyzeMOV(codePtr, info); - instructionSize = info.instructionSize; + if (success) + instructionSize = info.instructionSize; #elif PPSSPP_ARCH(ARM64) uint32_t word; memcpy(&word, codePtr, 4); @@ -133,7 +135,7 @@ bool HandleFault(uintptr_t hostAddress, void *ctx) { #endif std::string disassembly; - if (success && DisassembleNativeAt(codePtr, instructionSize, &disassembly)) { + if (DisassembleNativeAt(codePtr, instructionSize, &disassembly)) { infoString += disassembly + "\n"; } diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index 7ddf06d161..e89bc1b1ae 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -1269,21 +1269,23 @@ static void DrawCrashDump(DrawBuffer *draw2d) { // TODO: Draw a lot more information. Full register set, and so on. #ifdef _DEBUG - char build[] = "Debug"; + char build[] = "debug"; #else - char build[] = "Release"; + char build[] = "release"; #endif + + std::string sysName = System_GetProperty(SYSPROP_NAME); + int sysVersion = System_GetPropertyInt(SYSPROP_SYSTEMVERSION); + snprintf(statbuf, sizeof(statbuf), R"(%s Game ID (Title): %s (%s) -PPSSPP build: %s (%s) -ABI: %s +%s (%s) +%s v%d (%s) )", ExceptionTypeAsString(info.type), - g_paramSFO.GetDiscID().c_str(), - g_paramSFO.GetValueString("TITLE").c_str(), - versionString, - build, - GetCompilerABI() + g_paramSFO.GetDiscID().c_str(), g_paramSFO.GetValueString("TITLE").c_str(), + versionString, build, + sysName.c_str(), sysVersion, GetCompilerABI() ); draw2d->SetFontScale(.7f, .7f); @@ -1323,6 +1325,15 @@ BREAK std::string kernelState = __KernelStateSummary(); draw2d->DrawTextShadow(ubuntu24, kernelState.c_str(), x, y, 0xFFFFFFFF); + + // Draw some additional stuff to the right. + snprintf(statbuf, sizeof(statbuf), + "CPU Core: %d\n" + "Locked CPU freq: %d MHz\n", + g_Config.iCpuCore, + g_Config.iLockedCPUSpeed); + + draw2d->DrawTextShadow(ubuntu24, statbuf, 420, 50, 0xFFFFFFFF); } static void DrawAudioDebugStats(DrawBuffer *draw2d, const Bounds &bounds) { diff --git a/pspautotests b/pspautotests index 879e7959eb..7e4a1e7509 160000 --- a/pspautotests +++ b/pspautotests @@ -1 +1 @@ -Subproject commit 879e7959eb3251133fcc4ccf26b0ef35d9d43f8e +Subproject commit 7e4a1e750997e95df8a1f04f9a6396801adf7113