From 44e43fe5c30e66b9f28b41b405c39f300ae31627 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 19 Jul 2014 19:43:46 -0400 Subject: [PATCH 1/2] Core: Make CPU_POWERDOWN the initial CPU state. This isn't a correct state for the CPU to begin in when starting the application. Also CPU_STEPPING as an initial state causes the emulator to crash if you use any of the debugger stepping buttons, since it checks if the CPU is in the CPU_STEPPING state before performing their functions. --- Source/Core/Core/PowerPC/PowerPC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Core/PowerPC/PowerPC.cpp b/Source/Core/Core/PowerPC/PowerPC.cpp index caa7f02eb5..9778c2234a 100644 --- a/Source/Core/Core/PowerPC/PowerPC.cpp +++ b/Source/Core/Core/PowerPC/PowerPC.cpp @@ -30,7 +30,7 @@ namespace PowerPC // STATE_TO_SAVE PowerPCState GC_ALIGNED16(ppcState); -static volatile CPUState state = CPU_STEPPING; +static volatile CPUState state = CPU_POWERDOWN; Interpreter * const interpreter = Interpreter::getInstance(); static CoreMode mode; From 298425920a0e4ac3aa7da635336b8be39eb08788 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 19 Jul 2014 19:59:44 -0400 Subject: [PATCH 2/2] DolphinWX: Fix a possible crash when setting debugger memory values. --- Source/Core/DolphinWX/Debugger/MemoryWindow.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Core/DolphinWX/Debugger/MemoryWindow.cpp b/Source/Core/DolphinWX/Debugger/MemoryWindow.cpp index 8621cb6f5b..0640142422 100644 --- a/Source/Core/DolphinWX/Debugger/MemoryWindow.cpp +++ b/Source/Core/DolphinWX/Debugger/MemoryWindow.cpp @@ -160,6 +160,12 @@ void CMemoryWindow::JumpToAddress(u32 _Address) void CMemoryWindow::SetMemoryValue(wxCommandEvent& event) { + if (!Memory::IsInitialized()) + { + PanicAlertT("Cannot set uninitialized memory."); + return; + } + std::string str_addr = WxStrToStr(addrbox->GetValue()); std::string str_val = WxStrToStr(valbox->GetValue()); u32 addr;