From 8684b734e878082cc157379badb904acd41b6918 Mon Sep 17 00:00:00 2001 From: hrydgard Date: Sat, 8 Nov 2008 14:28:28 +0000 Subject: [PATCH] cleaner cpu string, a better error message git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1097 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/CPUDetect.cpp | 7 +++++-- Source/Core/Core/Src/HW/Memmap.cpp | 24 ++++++++++++++++-------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/Source/Core/Common/Src/CPUDetect.cpp b/Source/Core/Common/Src/CPUDetect.cpp index 5ba5fb5819..514a3c6b9c 100644 --- a/Source/Core/Common/Src/CPUDetect.cpp +++ b/Source/Core/Common/Src/CPUDetect.cpp @@ -183,7 +183,11 @@ void CPUInfo::Detect() std::string CPUInfo::Summarize() { - std::string sum = StringFromFormat("%s : %i cores. ", cpu_string, num_cores); + std::string sum; + if (num_cores == 1) + sum = StringFromFormat("%s, %i core, ", cpu_string, num_cores); + else + sum = StringFromFormat("%s, %i cores, ", cpu_string, num_cores); if (bSSE) sum += "SSE"; if (bSSE2) sum += ", SSE2"; if (bSSE3) sum += ", SSE3"; @@ -191,6 +195,5 @@ std::string CPUInfo::Summarize() if (bSSE4_1) sum += ", SSE4.1"; if (bSSE4_2) sum += ", SSE4.2"; if (bLongMode) sum += ", 64-bit support"; - sum += " (wrong? report)"; return sum; } diff --git a/Source/Core/Core/Src/HW/Memmap.cpp b/Source/Core/Core/Src/HW/Memmap.cpp index c7a23302b1..5fc1d0a382 100644 --- a/Source/Core/Core/Src/HW/Memmap.cpp +++ b/Source/Core/Core/Src/HW/Memmap.cpp @@ -1101,14 +1101,22 @@ void SDRUpdated() u32 CheckDTLB(u32 _Address, XCheckTLBFlag _Flag) { - PanicAlert("TLB: %s unknown memory (0x%08x)\n" - "This is either the game crashing randomly, or a TLB write." - "Several games uses the TLB to map memory. This\n" - "function is not supported in Dolphin. " - "Also, unfortunately there is no way to recover from this error," - "so Dolphin will now exit abruptly. Sorry!", - _Flag == FLAG_WRITE ? "Write to" : "Read from", _Address); - + if (Core::GetStartupParameter().bWii) { + // TLB is never used on Wii (except linux and stuff, but we don't care about that) + PanicAlert("%s invalid memory region (0x%08x)\n\n" + "There is no way to recover from this error," + "so Dolphin will now exit. Sorry!", + _Flag == FLAG_WRITE ? "Write to" : "Read from", _Address); + } + else { + PanicAlert("%s invalid memory region (0x%08x)\n\n" + "This is either the game crashing randomly, or a TLB write." + "Several games uses the TLB to map memory. This\n" + "function is not supported in Dolphin. " + "Unfortunately there is no way to recover from this error," + "so Dolphin will now exit abruptly. Sorry!", + _Flag == FLAG_WRITE ? "Write to" : "Read from", _Address); + } exit(0); u32 sr = PowerPC::ppcState.sr[EA_SR(_Address)];