summaryrefslogtreecommitdiff
path: root/Source/Core/DebuggerWX
diff options
context:
space:
mode:
authorShawn Hoffman <godisgovernment@gmail.com>2009-06-30 21:11:39 +0000
committerShawn Hoffman <godisgovernment@gmail.com>2009-06-30 21:11:39 +0000
commit656ba06e409caed86833d2e391ab301ae37f7878 (patch)
treef582fe2b9569101df78a353a8fad6a5bb8e0593e /Source/Core/DebuggerWX
parente6d78bcf3c284fd379ec67d10b0fdcf28460b06a (diff)
MemoryWindow will now dump aram instead of ram - if you are viewing aram
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3624 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DebuggerWX')
-rw-r--r--Source/Core/DebuggerWX/Src/MemoryView.h3
-rw-r--r--Source/Core/DebuggerWX/Src/MemoryWindow.cpp40
2 files changed, 34 insertions, 9 deletions
diff --git a/Source/Core/DebuggerWX/Src/MemoryView.h b/Source/Core/DebuggerWX/Src/MemoryView.h
index 70c1371f85..6a2d1b36e4 100644
--- a/Source/Core/DebuggerWX/Src/MemoryView.h
+++ b/Source/Core/DebuggerWX/Src/MemoryView.h
@@ -35,7 +35,8 @@ public:
void OnMouseUpR(wxMouseEvent& event);
void OnPopupMenu(wxCommandEvent& event);
- u32 GetSelection() {return(selection);}
+ u32 GetSelection() { return selection ; }
+ int GetMemoryType() { return memory; }
void Center(u32 addr)
{
diff --git a/Source/Core/DebuggerWX/Src/MemoryWindow.cpp b/Source/Core/DebuggerWX/Src/MemoryWindow.cpp
index a93d095d14..20bdc7c1e6 100644
--- a/Source/Core/DebuggerWX/Src/MemoryWindow.cpp
+++ b/Source/Core/DebuggerWX/Src/MemoryWindow.cpp
@@ -35,6 +35,7 @@
#include "LogManager.h"
#include "HW/Memmap.h"
+#include "HW/DSP.h"
// ugly that this lib included code from the main
#include "../../DolphinWX/Src/Globals.h"
@@ -208,18 +209,41 @@ void CMemoryWindow::OnHostMessage(wxCommandEvent& event)
}
}
-// this is a simple main 1Tsram dump,
// so we can view memory in a tile/hex viewer for data analysis
void CMemoryWindow::OnDumpMemory( wxCommandEvent& event )
{
- FILE* pDumpFile = fopen(MAINRAM_DUMP_FILE, "wb");
- if (pDumpFile)
+ switch (memview->GetMemoryType())
{
- if (Memory::m_pRAM)
+ case 0:
+ default:
{
- fwrite(Memory::m_pRAM, Memory::REALRAM_SIZE, 1, pDumpFile);
+ FILE* pDumpFile = fopen(MAINRAM_DUMP_FILE, "wb");
+ if (pDumpFile)
+ {
+ if (Memory::m_pRAM)
+ {
+ fwrite(Memory::m_pRAM, Memory::REALRAM_SIZE, 1, pDumpFile);
+ }
+ fclose(pDumpFile);
+ delete pDumpFile;
+ }
}
- fclose(pDumpFile);
- }
-}
+ break;
+ case 1:
+ {
+ FILE* pDumpFile = fopen(ARAM_DUMP_FILE, "wb");
+ if (pDumpFile)
+ {
+ u8* aram = DSP::GetARAMPtr();
+ if (aram)
+ {
+ fwrite(aram, DSP::ARAM_SIZE, 1, pDumpFile);
+ }
+ fclose(pDumpFile);
+ delete pDumpFile;
+ }
+ }
+ break;
+ }
+}