Index: MemoryWindow.cpp =================================================================== --- MemoryWindow.cpp (revision 3883) +++ MemoryWindow.cpp (working copy) @@ -60,7 +60,8 @@ CMemoryWindow::CMemoryWindow(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) - : wxFrame(parent, id, title, pos, size, style) + : wxFrame(parent, id, title, pos, size, style), + init(false) { wxBoxSizer* sizerBig = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* sizerRight = new wxBoxSizer(wxVERTICAL); @@ -217,6 +218,34 @@ case 0: default: { + int n, i; + if (!init) { + for (n = 0; n < 0x13FFFF; n++) { + diffMemory[n] = true; + } + } + FILE* pDumpFile = fopen("MemDiff.txt", "w"); + for (n = 0; n < 0x13FFFF; n++) { + i = Memory::m_pRAM[n*4] << 24; + i += Memory::m_pRAM[n*4+1] << 16; + i += Memory::m_pRAM[n*4+2] << 8; + i += Memory::m_pRAM[n*4+3]; + if (init & diffMemory[n]) { + if (oldMemory[n] == i) { + diffMemory[n] = false; + } + else { + fprintf(pDumpFile, "%08X:%08X->%08X\n", n*4, oldMemory[n], i); + } + } + oldMemory[n] = i; + } + fclose(pDumpFile); + if (!init) { + init = true; + } + + /* FILE* pDumpFile = fopen(MAINRAM_DUMP_FILE, "wb"); if (pDumpFile) { @@ -227,6 +256,7 @@ fclose(pDumpFile); delete pDumpFile; } + */ } break; Index: MemoryWindow.h =================================================================== --- MemoryWindow.h (revision 3883) +++ MemoryWindow.h (working copy) @@ -69,6 +69,10 @@ void OnHostMessage(wxCommandEvent& event); void SetMemoryValue(wxCommandEvent& event); void OnDumpMemory(wxCommandEvent& event); + + u32 oldMemory[0x13FFFF]; + bool diffMemory[0x13FFFF]; + bool init; }; #endif /*MEMORYWINDOW_*/