From 03d1438be8e0d871839dd662a393d1c4f04fc260 Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Wed, 2 Jun 2010 18:07:08 +0000 Subject: [PATCH] Cleanup after multi-level SVN rename. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5573 8ced0084-cf51-0410-be5f-012b33b47a6e --- Externals/Memcard Manager/src/MCMdebug.cpp | 519 --------------------- Externals/Memcard Manager/src/MCMdebug.h | 111 ----- Externals/Memcard Manager/src/MCMmain.h | 17 - Externals/Memcard Manager/src/mcmMain.cpp | 51 -- 4 files changed, 698 deletions(-) delete mode 100644 Externals/Memcard Manager/src/MCMdebug.cpp delete mode 100644 Externals/Memcard Manager/src/MCMdebug.h delete mode 100644 Externals/Memcard Manager/src/MCMmain.h delete mode 100644 Externals/Memcard Manager/src/mcmMain.cpp diff --git a/Externals/Memcard Manager/src/MCMdebug.cpp b/Externals/Memcard Manager/src/MCMdebug.cpp deleted file mode 100644 index a1d65003b3..0000000000 --- a/Externals/Memcard Manager/src/MCMdebug.cpp +++ /dev/null @@ -1,519 +0,0 @@ -#include "MemcardManager.h" -#include "MCMdebug.h" - -BEGIN_EVENT_TABLE(CMemcardManagerDebug, wxWindow) - EVT_CLOSE(CMemcardManagerDebug::OnClose) -END_EVENT_TABLE() - -CMemcardManagerDebug::CMemcardManagerDebug(wxFrame* parent, const wxPoint& pos, const wxSize& size) : - wxFrame(parent, wxID_ANY, _T("Memcard Debug Window"), pos, size, MEMCARD_MANAGER_STYLE) -{ - // Create the GUI controls - Init_ChildControls(); - - // Setup Window - SetBackgroundColour(m_Notebook_MCMD->GetBackgroundColour()); - SetSize(size); - SetPosition(pos); - - Layout(); - Show(); -} - - -void CMemcardManagerDebug::updatePanels(GCMemcard **memCard,int card) -{ - memoryCard = memCard; - updateHDRtab(card); - updateDIRtab(card); - updateDIRBtab(card); - updateBATtab(card); - updateBATBtab(card); -} - -void CMemcardManagerDebug::Init_ChildControls() -{ - // Main Notebook - m_Notebook_MCMD = new wxNotebook(this, ID_NOTEBOOK_MAIN, wxDefaultPosition, wxDefaultSize); - - m_Tab_HDR = new wxPanel(m_Notebook_MCMD, ID_TAB_HDR, wxDefaultPosition, wxDefaultSize); - m_Tab_DIR = new wxPanel(m_Notebook_MCMD, ID_TAB_DIR, wxDefaultPosition, wxDefaultSize); - m_Tab_DIR_b = new wxPanel(m_Notebook_MCMD, ID_TAB_DIR_B, wxDefaultPosition, wxDefaultSize); - m_Tab_BAT = new wxPanel(m_Notebook_MCMD, ID_TAB_BAT, wxDefaultPosition, wxDefaultSize); - m_Tab_BAT_b = new wxPanel(m_Notebook_MCMD, ID_TAB_BAT_B, wxDefaultPosition, wxDefaultSize); - - Init_HDR(); - Init_DIR(); - Init_DIR_b(); - Init_BAT(); - Init_BAT_b(); - - // Add Tabs to Notebook - m_Notebook_MCMD->AddPage(m_Tab_HDR, _T("HDR")); - m_Notebook_MCMD->AddPage(m_Tab_DIR, _T("DIR")); - m_Notebook_MCMD->AddPage(m_Tab_DIR_b, _T("DIR_b")); - m_Notebook_MCMD->AddPage(m_Tab_BAT, _T("Bat")); - m_Notebook_MCMD->AddPage(m_Tab_BAT_b, _T("Bat_b")); - - wxBoxSizer* sMain = new wxBoxSizer(wxVERTICAL); - sMain->Add(m_Notebook_MCMD, 1, wxEXPAND|wxALL, 5); - SetSizer(sMain); - Layout(); - Fit(); -} -void CMemcardManagerDebug::OnClose(wxCloseEvent& WXUNUSED (event)) -{ - Hide(); -} - -void CMemcardManagerDebug::Init_HDR() -{ - wxBoxSizer *sMain; - wxStaticBoxSizer *sHDR[2]; - - sMain = new wxBoxSizer(wxHORIZONTAL); - sHDR[0] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_HDR, wxT("MEMCARD:A")); - sHDR[1] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_HDR, wxT("MEMCARD:B")); - - wxGridBagSizer * sOtPaths[2]; - - wxStaticText *st[2][11]; - - for(int i = SLOT_A; i <=SLOT_B;i++) - { - sOtPaths[i] = new wxGridBagSizer(0, 0); - sOtPaths[i]->AddGrowableCol(1); - st[i][0]= new wxStaticText(m_Tab_HDR, 0, wxT("Ser\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - st[i][1]= new wxStaticText(m_Tab_HDR, 0, wxT("fmtTime\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - st[i][2]= new wxStaticText(m_Tab_HDR, 0, wxT("SRAMBIAS\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - st[i][3]= new wxStaticText(m_Tab_HDR, 0, wxT("SRAMLANG\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - st[i][4]= new wxStaticText(m_Tab_HDR, 0, wxT("Unk2\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - st[i][5]= new wxStaticText(m_Tab_HDR, 0, wxT("deviceID\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - st[i][6]= new wxStaticText(m_Tab_HDR, 0, wxT("Size\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - st[i][7]= new wxStaticText(m_Tab_HDR, 0, wxT("Encoding\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - st[i][8]= new wxStaticText(m_Tab_HDR, 0, wxT("UpdateCounter\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - st[i][9]= new wxStaticText(m_Tab_HDR, 0, wxT("CheckSum1\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - st[i][10]= new wxStaticText(m_Tab_HDR, 0, wxT("CheckSum2\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - - t_HDR_ser[i] = new wxStaticText(m_Tab_HDR, 0, wxT("XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX"), - wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - t_HDR_fmtTime[i] = new wxStaticText(m_Tab_HDR, 0, wxT("XXXXXXXX, XXXXXXXX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - t_HDR_SRAMBIAS[i] = new wxStaticText(m_Tab_HDR, 0, wxT("XX, XX, XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - t_HDR_SRAMLANG[i] = new wxStaticText(m_Tab_HDR, 0, wxT("XX, XX, XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - t_HDR_Unk2[i] = new wxStaticText(m_Tab_HDR, 0, wxT("XX, XX, XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - t_HDR_devID[i] = new wxStaticText(m_Tab_HDR, 0, wxT("XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - t_HDR_Size[i] = new wxStaticText(m_Tab_HDR, 0, wxT("XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - t_HDR_Encoding[i] = new wxStaticText(m_Tab_HDR, 0, wxT("XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - t_HDR_UpdateCounter[i] = new wxStaticText(m_Tab_HDR, 0, wxT("XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - t_HDR_CheckSum1[i] = new wxStaticText(m_Tab_HDR, 0, wxT("XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - t_HDR_CheckSum2[i] = new wxStaticText(m_Tab_HDR, 0, wxT("XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - - sOtPaths[i]->Add(st[i][0], wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_HDR_ser[i], wxGBPosition(0, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sOtPaths[i]->Add(st[i][1], wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_HDR_fmtTime[i], wxGBPosition(1, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sOtPaths[i]->Add(st[i][2], wxGBPosition(2, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_HDR_SRAMBIAS[i], wxGBPosition(2, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sOtPaths[i]->Add(st[i][3], wxGBPosition(3, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_HDR_SRAMLANG[i], wxGBPosition(3, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sOtPaths[i]->Add(st[i][4], wxGBPosition(4, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_HDR_Unk2[i], wxGBPosition(4, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sOtPaths[i]->Add(st[i][5], wxGBPosition(5, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_HDR_devID[i], wxGBPosition(5, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sOtPaths[i]->Add(st[i][6], wxGBPosition(6, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_HDR_Size[i], wxGBPosition(6, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sOtPaths[i]->Add(st[i][7], wxGBPosition(7, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_HDR_Encoding[i], wxGBPosition(7, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sOtPaths[i]->Add(st[i][8], wxGBPosition(8, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_HDR_UpdateCounter[i], wxGBPosition(8, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sOtPaths[i]->Add(st[i][9], wxGBPosition(9, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_HDR_CheckSum1[i], wxGBPosition(9, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sOtPaths[i]->Add(st[i][10], wxGBPosition(10, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_HDR_CheckSum2[i], wxGBPosition(10, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sHDR[i]->Add(sOtPaths[i], 0, wxEXPAND|wxALL, 5); - sMain->Add(sHDR[i], 0, wxEXPAND|wxALL, 1); - } - m_Tab_HDR->SetSizer(sMain); - m_Tab_HDR->Layout(); -} - -void CMemcardManagerDebug::updateHDRtab(int card) -{ - wxString wx_ser, - wx_fmtTime, - wx_SRAMBIAS, - wx_SRAMLANG, - wx_Unk2, - wx_devID, - wx_Size, - wx_Encoding, - wx_UpdateCounter, - wx_CheckSum1, - wx_CheckSum2; - - wx_ser.Printf(wxT("%02X, %02X, %02X, %02X, %02X, %02X, %02X, %02X, %02X, %02X, %02X, %02X"), - memoryCard[card]->hdr.serial[0],memoryCard[card]->hdr.serial[1], - memoryCard[card]->hdr.serial[2],memoryCard[card]->hdr.serial[3], - memoryCard[card]->hdr.serial[4],memoryCard[card]->hdr.serial[5], - memoryCard[card]->hdr.serial[6],memoryCard[card]->hdr.serial[7], - memoryCard[card]->hdr.serial[8],memoryCard[card]->hdr.serial[9], - memoryCard[card]->hdr.serial[10],memoryCard[card]->hdr.serial[11]); - - wx_fmtTime.Printf(wxT("%08X, %08X"), - Common::swap32(memoryCard[card]->hdr.fmtTime.high),Common::swap32(memoryCard[card]->hdr.fmtTime.low)); - - wx_SRAMBIAS.Printf(wxT("%02X, %02X, %02X, %02X"), - memoryCard[card]->hdr.SramBias[0],memoryCard[card]->hdr.SramBias[1], - memoryCard[card]->hdr.SramBias[2],memoryCard[card]->hdr.SramBias[3]); - - wx_SRAMLANG.Printf(wxT("%02X, %02X, %02X, %02X"), - memoryCard[card]->hdr.SramLang[0], memoryCard[card]->hdr.SramLang[1], - memoryCard[card]->hdr.SramLang[2],memoryCard[card]->hdr.SramLang[3]); - - wx_Unk2.Printf(wxT("%02X, %02X, %02X, %02X"), - memoryCard[card]->hdr.Unk2[0],memoryCard[card]->hdr.Unk2[1], - memoryCard[card]->hdr.Unk2[2],memoryCard[card]->hdr.Unk2[3]); - - wx_devID.Printf(wxT("%02X, %02X"), - memoryCard[card]->hdr.deviceID[0],memoryCard[card]->hdr.deviceID[1]); - - wx_Size.Printf(wxT("%02X, %02X"), - memoryCard[card]->hdr.SizeMb[0],memoryCard[card]->hdr.SizeMb[1]); - - wx_Encoding.Printf( wxT("%02X, %02X"), - memoryCard[card]->hdr.Encoding[0],memoryCard[card]->hdr.Encoding[1]); - - wx_UpdateCounter.Printf(wxT("%02X, %02X"), - memoryCard[card]->hdr.UpdateCounter[0],memoryCard[card]->hdr.UpdateCounter[1]); - - wx_CheckSum1.Printf(wxT("%02X, %02X"), - memoryCard[card]->hdr.CheckSum1[0],memoryCard[card]->hdr.CheckSum1[1]); - - wx_CheckSum2.Printf(wxT("%02X, %02X"), - memoryCard[card]->hdr.CheckSum2[0],memoryCard[card]->hdr.CheckSum2[1]); - - - t_HDR_ser[card]->SetLabel(wx_ser); - t_HDR_fmtTime[card]->SetLabel(wx_fmtTime); - t_HDR_SRAMBIAS[card]->SetLabel(wx_SRAMBIAS); - t_HDR_SRAMLANG[card]->SetLabel(wx_SRAMLANG); - t_HDR_Unk2[card]->SetLabel(wx_Unk2); - t_HDR_devID[card]->SetLabel(wx_devID); - t_HDR_Size[card]->SetLabel(wx_Size); - t_HDR_Encoding[card]->SetLabel(wx_Encoding); - t_HDR_UpdateCounter[card]->SetLabel(wx_UpdateCounter); - t_HDR_CheckSum1[card]->SetLabel(wx_CheckSum1); - t_HDR_CheckSum2[card]->SetLabel(wx_CheckSum2); -} - - - -void CMemcardManagerDebug::Init_DIR() -{ - wxBoxSizer *sMain; - wxStaticBoxSizer *sDIR[2]; - sMain = new wxBoxSizer(wxHORIZONTAL); - sDIR[0] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_DIR, wxT("MEMCARD:A")); - sDIR[1] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_DIR, wxT("MEMCARD:B")); - - wxGridBagSizer * sOtPaths[3]; - - wxStaticText *st[2][9]; - for(int i = SLOT_A; i <=SLOT_B;i++) - { - sOtPaths[i] = new wxGridBagSizer(0, 0); - sOtPaths[i]->AddGrowableCol(1); - st[i][0]= new wxStaticText(m_Tab_DIR, 0, wxT("UpdateCounter\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - st[i][1]= new wxStaticText(m_Tab_DIR, 0, wxT("CheckSum1\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - st[i][2]= new wxStaticText(m_Tab_DIR, 0, wxT("CheckSum2\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - - t_DIR_UpdateCounter[i] = new wxStaticText(m_Tab_DIR, 0, wxT("XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - t_DIR_CheckSum1[i] = new wxStaticText(m_Tab_DIR, 0, wxT("XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - t_DIR_CheckSum2[i] = new wxStaticText(m_Tab_DIR, 0, wxT("XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - - sOtPaths[i]->Add(st[i][0], wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_DIR_UpdateCounter[i], wxGBPosition(0, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sOtPaths[i]->Add(st[i][1], wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_DIR_CheckSum1[i], wxGBPosition(1, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sOtPaths[i]->Add(st[i][2], wxGBPosition(2, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_DIR_CheckSum2[i], wxGBPosition(2, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - - sDIR[i]->Add(sOtPaths[i], 0, wxEXPAND|wxALL, 5); - sMain->Add(sDIR[i], 0, wxEXPAND|wxALL, 1); - } - - m_Tab_DIR->SetSizer(sMain); - m_Tab_DIR->Layout(); -} - - -void CMemcardManagerDebug::updateDIRtab(int card) -{ - wxString wx_UpdateCounter, - wx_CheckSum1, - wx_CheckSum2; - - wx_UpdateCounter.Printf(wxT("%02X, %02X"), - memoryCard[card]->dir.UpdateCounter[0],memoryCard[card]->dir.UpdateCounter[1]); - - wx_CheckSum1.Printf(wxT("%02X, %02X"), - memoryCard[card]->dir.CheckSum1[0],memoryCard[card]->dir.CheckSum1[1]); - - wx_CheckSum2.Printf(wxT("%02X, %02X"), - memoryCard[card]->dir.CheckSum2[0],memoryCard[card]->dir.CheckSum2[1]); - - t_DIR_UpdateCounter[card]->SetLabel(wx_UpdateCounter); - t_DIR_CheckSum1[card]->SetLabel(wx_CheckSum1); - t_DIR_CheckSum2[card]->SetLabel(wx_CheckSum2); -} - - -void CMemcardManagerDebug::Init_DIR_b() -{ - wxBoxSizer *sMain; - wxStaticBoxSizer *sDIR_b[2]; - sMain = new wxBoxSizer(wxHORIZONTAL); - sDIR_b[0] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_DIR_b, wxT("MEMCARD:A")); - sDIR_b[1] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_DIR_b, wxT("MEMCARD:B")); - - wxGridBagSizer * sOtPaths[3]; - - wxStaticText *st[2][9]; - for(int i = SLOT_A; i <=SLOT_B;i++) - { - sOtPaths[i] = new wxGridBagSizer(0, 0); - sOtPaths[i]->AddGrowableCol(1); - st[i][0]= new wxStaticText(m_Tab_DIR_b, 0, wxT("UpdateCounter\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - st[i][1]= new wxStaticText(m_Tab_DIR_b, 0, wxT("CheckSum1\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - st[i][2]= new wxStaticText(m_Tab_DIR_b, 0, wxT("CheckSum2\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - - t_DIR_b_UpdateCounter[i] = new wxStaticText(m_Tab_DIR_b, 0, wxT("XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - t_DIR_b_CheckSum1[i] = new wxStaticText(m_Tab_DIR_b, 0, wxT("XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - t_DIR_b_CheckSum2[i] = new wxStaticText(m_Tab_DIR_b, 0, wxT("XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - - sOtPaths[i]->Add(st[i][0], wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_DIR_b_UpdateCounter[i], wxGBPosition(0, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sOtPaths[i]->Add(st[i][1], wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_DIR_b_CheckSum1[i], wxGBPosition(1, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sOtPaths[i]->Add(st[i][2], wxGBPosition(2, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_DIR_b_CheckSum2[i], wxGBPosition(2, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sDIR_b[i]->Add(sOtPaths[i], 0, wxEXPAND|wxALL, 5); - sMain->Add(sDIR_b[i], 0, wxEXPAND|wxALL, 1); - } - m_Tab_DIR_b->SetSizer(sMain); - m_Tab_DIR_b->Layout(); -} - -void CMemcardManagerDebug::updateDIRBtab(int card) -{ - wxString wx_UpdateCounter, - wx_CheckSum1, - wx_CheckSum2; - - wx_UpdateCounter.Printf(wxT("%02X, %02X"), - memoryCard[card]->dir_backup.UpdateCounter[0],memoryCard[card]->dir_backup.UpdateCounter[1]); - wx_CheckSum1.Printf(wxT("%02X, %02X"), - memoryCard[card]->dir_backup.CheckSum1[0],memoryCard[card]->dir_backup.CheckSum1[1]); - wx_CheckSum2.Printf(wxT("%02X, %02X"), - memoryCard[card]->dir_backup.CheckSum2[0],memoryCard[card]->dir_backup.CheckSum2[1]); - - t_DIR_b_UpdateCounter[card]->SetLabel(wx_UpdateCounter); - t_DIR_b_CheckSum1[card]->SetLabel(wx_CheckSum1); - t_DIR_b_CheckSum2[card]->SetLabel(wx_CheckSum2); -} - -void CMemcardManagerDebug::Init_BAT() -{ - wxBoxSizer *sMain; - wxStaticBoxSizer *sBAT[4]; - sMain = new wxBoxSizer(wxHORIZONTAL); - sBAT[0] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_BAT, wxT("MEMCARD:A")); - sBAT[1] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_BAT, wxT("MEMCARD:B")); - sBAT[2] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_BAT, wxT("MEMCARD:A MAP")); - sBAT[3] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_BAT, wxT("MEMCARD:B MAP")); - wxGridBagSizer * sOtPaths[4]; - - wxStaticText *st[2][9]; - for(int i = SLOT_A; i <=SLOT_B;i++) - { - sOtPaths[i] = new wxGridBagSizer(0, 0); - sOtPaths[i]->AddGrowableCol(1); - st[i][0]= new wxStaticText(m_Tab_BAT, 0, wxT("CheckSum1\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - st[i][1]= new wxStaticText(m_Tab_BAT, 0, wxT("CheckSum2\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - st[i][2]= new wxStaticText(m_Tab_BAT, 0, wxT("UpdateCounter\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - st[i][3]= new wxStaticText(m_Tab_BAT, 0, wxT("FreeBlocks\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - st[i][4]= new wxStaticText(m_Tab_BAT, 0, wxT("LastAllocated\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - - t_BAT_CheckSum1[i] = new wxStaticText(m_Tab_BAT, 0, wxT("XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - t_BAT_CheckSum2[i] = new wxStaticText(m_Tab_BAT, 0, wxT("XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - t_BAT_UpdateCounter[i] = new wxStaticText(m_Tab_BAT, 0, wxT("XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - t_BAT_FreeBlocks[i] = new wxStaticText(m_Tab_BAT, 0, wxT("XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - t_BAT_LastAllocated[i] = new wxStaticText(m_Tab_BAT, 0, wxT("XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - - - - sOtPaths[i]->Add(st[i][0], wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_BAT_CheckSum1[i], wxGBPosition(0, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sOtPaths[i]->Add(st[i][1], wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_BAT_CheckSum2[i], wxGBPosition(1, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sOtPaths[i]->Add(st[i][2], wxGBPosition(2, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_BAT_UpdateCounter[i], wxGBPosition(2, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sOtPaths[i]->Add(st[i][3], wxGBPosition(3, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_BAT_FreeBlocks[i], wxGBPosition(3, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sOtPaths[i]->Add(st[i][4], wxGBPosition(4, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_BAT_LastAllocated[i], wxGBPosition(4, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - - sBAT[i]->Add(sOtPaths[i], 0, wxEXPAND|wxALL, 5); - sMain->Add(sBAT[i], 0, wxEXPAND|wxALL, 1); - } - - for (int k=2;k<=3;k++) //256 - { - sOtPaths[k] = new wxGridBagSizer(0, 0); - sOtPaths[k]->AddGrowableCol(1); - - for(int j=0;j<256;j++) - { - t_BAT_map[j][k%2] = new wxStaticText(m_Tab_BAT, 0, wxT("XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - sOtPaths[k]->Add(t_BAT_map[j][k%2], wxGBPosition(j, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - - } - - sBAT[k]->Add(sOtPaths[k], 0, wxEXPAND|wxALL, 5); - sMain->Add(sBAT[k], 0, wxEXPAND|wxALL, 1); - } - - m_Tab_BAT->SetSizer(sMain); - m_Tab_BAT->Layout(); -} - -void CMemcardManagerDebug::updateBATtab(int card) -{ - wxString wx_UpdateCounter, - wx_CheckSum1, - wx_CheckSum2, - wx_FreeBlocks, - wx_LastAllocated; - - wx_CheckSum1.Printf(wxT("%02X, %02X"), memoryCard[card]->bat.CheckSum1[0],memoryCard[card]->bat.CheckSum1[1]); - wx_CheckSum2.Printf(wxT("%02X, %02X"), memoryCard[card]->bat.CheckSum2[0],memoryCard[card]->bat.CheckSum2[1]); - wx_UpdateCounter.Printf(wxT("%02X, %02X"), memoryCard[card]->bat.UpdateCounter[0],memoryCard[card]->bat.UpdateCounter[1]); - wx_FreeBlocks.Printf(wxT("%02X, %02X"), memoryCard[card]->bat.FreeBlocks[0],memoryCard[card]->bat.FreeBlocks[1]); - wx_LastAllocated.Printf(wxT("%d"), memoryCard[card]->bat.LastAllocated[0] << 8 | memoryCard[card]->bat.LastAllocated[1]); - - t_BAT_CheckSum1[card]->SetLabel(wx_CheckSum1); - t_BAT_CheckSum2[card]->SetLabel(wx_CheckSum2); - t_BAT_UpdateCounter[card]->SetLabel(wx_UpdateCounter); - t_BAT_FreeBlocks[card]->SetLabel(wx_FreeBlocks); - t_BAT_LastAllocated[card]->SetLabel(wx_LastAllocated); - - wxString wx_map[256]; - int pagesMax = 2048; - pagesMax = (1) * 13*8; - for(int j=0;j<2048 && j < pagesMax ;j+=8) - { - wx_map[j/8].Printf(wxT("%d, %d, %d, %d, %d, %d, %d, %d"), - (memoryCard[card]->bat.Map[j] == 0xFFFF)? -1 : Common::swap16(memoryCard[card]->bat.Map[j]), - (memoryCard[card]->bat.Map[j+1] == 0xFFFF)? -1 : Common::swap16(memoryCard[card]->bat.Map[j+1]), - (memoryCard[card]->bat.Map[j+2] == 0xFFFF)? -1 : Common::swap16(memoryCard[card]->bat.Map[j+2]), - (memoryCard[card]->bat.Map[j+3] == 0xFFFF)? -1 : Common::swap16(memoryCard[card]->bat.Map[j+3]), - (memoryCard[card]->bat.Map[j+4] == 0xFFFF)? -1 : Common::swap16(memoryCard[card]->bat.Map[j+4]), - (memoryCard[card]->bat.Map[j+5] == 0xFFFF)? -1 : Common::swap16(memoryCard[card]->bat.Map[j+5]), - (memoryCard[card]->bat.Map[j+6] == 0xFFFF)? -1 : Common::swap16(memoryCard[card]->bat.Map[j+6]), - (memoryCard[card]->bat.Map[j+7] == 0xFFFF)? -1 : Common::swap16(memoryCard[card]->bat.Map[j+7])); - t_BAT_map[j/8][card]->SetLabel(wx_map[j/8]); - } -} - -void CMemcardManagerDebug::Init_BAT_b() -{ - wxBoxSizer *sMain; - wxStaticBoxSizer *sBAT_b[2]; - sMain = new wxBoxSizer(wxHORIZONTAL); - sBAT_b[0] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_BAT_b, wxT("MEMCARD:A")); - sBAT_b[1] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_BAT_b, wxT("MEMCARD:B")); - - wxGridBagSizer * sOtPaths[3]; - wxStaticText *st[2][9]; - - for(int i = SLOT_A; i <=SLOT_B;i++) - { - sOtPaths[i] = new wxGridBagSizer(0, 0); - sOtPaths[i]->AddGrowableCol(1); - st[i][0]= new wxStaticText(m_Tab_BAT_b, 0, wxT("CheckSum1\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - st[i][1]= new wxStaticText(m_Tab_BAT_b, 0, wxT("CheckSum2\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - st[i][2]= new wxStaticText(m_Tab_BAT_b, 0, wxT("UpdateCounter\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - st[i][3]= new wxStaticText(m_Tab_BAT_b, 0, wxT("FreeBlocks\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - st[i][4]= new wxStaticText(m_Tab_BAT_b, 0, wxT("LastAllocated\t\t"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - - t_BAT_b_CheckSum1[i] = new wxStaticText(m_Tab_BAT_b, 0, wxT("XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - t_BAT_b_CheckSum2[i] = new wxStaticText(m_Tab_BAT_b, 0, wxT("XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - t_BAT_b_UpdateCounter[i] = new wxStaticText(m_Tab_BAT_b, 0, wxT("XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - t_BAT_b_FreeBlocks[i] = new wxStaticText(m_Tab_BAT_b, 0, wxT("XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - t_BAT_b_LastAllocated[i] = new wxStaticText(m_Tab_BAT_b, 0, wxT("XX, XX"), wxDefaultPosition, wxDefaultSize, 0, wxEmptyString); - - sOtPaths[i]->Add(st[i][0], wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_BAT_b_CheckSum1[i], wxGBPosition(0, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sOtPaths[i]->Add(st[i][1], wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_BAT_b_CheckSum2[i], wxGBPosition(1, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sOtPaths[i]->Add(st[i][2], wxGBPosition(2, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_BAT_b_UpdateCounter[i], wxGBPosition(2, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sOtPaths[i]->Add(st[i][3], wxGBPosition(3, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_BAT_b_FreeBlocks[i], wxGBPosition(3, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sOtPaths[i]->Add(st[i][4], wxGBPosition(4, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sOtPaths[i]->Add(t_BAT_b_LastAllocated[i], wxGBPosition(4, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - - sBAT_b[i]->Add(sOtPaths[i], 0, wxEXPAND|wxALL, 5); - sMain->Add(sBAT_b[i], 0, wxEXPAND|wxALL, 1); - } - - m_Tab_BAT_b->SetSizer(sMain); - m_Tab_BAT_b->Layout(); -} - -void CMemcardManagerDebug::updateBATBtab(int card) -{ - wxString wx_UpdateCounter, - wx_CheckSum1, - wx_CheckSum2, - wx_FreeBlocks, - wx_LastAllocated; - - wx_CheckSum1.Printf(wxT("%02X, %02X"), memoryCard[card]->bat_backup.CheckSum1[0],memoryCard[card]->bat_backup.CheckSum1[1]); - wx_CheckSum2.Printf(wxT("%02X, %02X"), memoryCard[card]->bat_backup.CheckSum2[0],memoryCard[card]->bat_backup.CheckSum2[1]); - wx_UpdateCounter.Printf(wxT("%02X, %02X"), memoryCard[card]->bat_backup.UpdateCounter[0],memoryCard[card]->bat_backup.UpdateCounter[1]); - wx_FreeBlocks.Printf(wxT("%02X, %02X"), memoryCard[card]->bat_backup.FreeBlocks[0],memoryCard[card]->bat_backup.FreeBlocks[1]); - wx_LastAllocated.Printf(wxT("%02X, %02X"), memoryCard[card]->bat_backup.LastAllocated[0],memoryCard[card]->bat_backup.LastAllocated[1]); - - t_BAT_b_CheckSum1[card]->SetLabel(wx_CheckSum1); - t_BAT_b_CheckSum2[card]->SetLabel(wx_CheckSum2); - t_BAT_b_UpdateCounter[card]->SetLabel(wx_UpdateCounter); - t_BAT_b_FreeBlocks[card]->SetLabel(wx_FreeBlocks); - t_BAT_b_LastAllocated[card]->SetLabel(wx_LastAllocated); -} diff --git a/Externals/Memcard Manager/src/MCMdebug.h b/Externals/Memcard Manager/src/MCMdebug.h deleted file mode 100644 index e4c8e858c8..0000000000 --- a/Externals/Memcard Manager/src/MCMdebug.h +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (C) 2003 Dolphin Project. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, version 2.0. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License 2.0 for more details. - -// A copy of the GPL 2.0 should have been included with the program. -// If not, see http://www.gnu.org/licenses/ - -// Official SVN repository and contact information can be found at -// http://code.google.com/p/dolphin-emu/ - -#ifndef __MCM_H__ -#define __MCM_H__ - -#include "MemcardManager.h" -#include -#include - - -class CMemcardManagerDebug : public wxFrame -{ - public: - - CMemcardManagerDebug(wxFrame* parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize); - virtual ~CMemcardManagerDebug(){}; - void updatePanels(GCMemcard ** memCard,int card); - - private: - enum - { - ID_NOTEBOOK_MAIN, - ID_TAB_HDR, - ID_TAB_DIR, - ID_TAB_DIR_B, - ID_TAB_BAT, - ID_TAB_BAT_B, - }; - - - - GCMemcard **memoryCard; - - wxNotebook *m_Notebook_MCMD; - - wxPanel *m_Tab_HDR, - *m_Tab_DIR, - *m_Tab_DIR_b, - *m_Tab_BAT, - *m_Tab_BAT_b; - - wxBoxSizer *sMain, - *sDebug, - *sDebug2; - - wxStaticText *t_HDR_ser[2], - *t_HDR_fmtTime[2], - *t_HDR_SRAMBIAS[2], - *t_HDR_SRAMLANG[2], - *t_HDR_Unk2[2], - *t_HDR_devID[2], - *t_HDR_Size[2], - *t_HDR_Encoding[2], - *t_HDR_UpdateCounter[2], - *t_HDR_CheckSum1[2], - *t_HDR_CheckSum2[2], - - *t_DIR_UpdateCounter[2], - *t_DIR_CheckSum1[2], - *t_DIR_CheckSum2[2], - - *t_DIR_b_UpdateCounter[2], - *t_DIR_b_CheckSum1[2], - *t_DIR_b_CheckSum2[2], - - *t_BAT_CheckSum1[2], - *t_BAT_CheckSum2[2], - *t_BAT_UpdateCounter[2], - *t_BAT_FreeBlocks[2], - *t_BAT_LastAllocated[2], - *t_BAT_map[256][2], - - *t_BAT_b_CheckSum1[2], - *t_BAT_b_CheckSum2[2], - *t_BAT_b_UpdateCounter[2], - *t_BAT_b_FreeBlocks[2], - *t_BAT_b_LastAllocated[2]; - - DECLARE_EVENT_TABLE(); - void Init_ChildControls(); - void OnClose(wxCloseEvent& event); - - void Init_HDR(); - void Init_DIR(); - void Init_DIR_b(); - void Init_BAT(); - void Init_BAT_b(); - void updateHDRtab(int card); - void updateDIRtab(int card); - void updateDIRBtab(int card); - void updateBATtab(int card); - void updateBATBtab(int card); - -}; - -#endif diff --git a/Externals/Memcard Manager/src/MCMmain.h b/Externals/Memcard Manager/src/MCMmain.h deleted file mode 100644 index 149ee695c6..0000000000 --- a/Externals/Memcard Manager/src/MCMmain.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _MCM__ -#define _MCM__ - -void __Log(int logNumber, const char* text, ...){logNumber; text;} -void __Logv(int log, int v, const char *format, ...){log; v; format;} - -#include "MemcardManager.h" -#include "Timer.h" - -class MCMApp - : public wxApp -{ - public: - bool OnInit(); - -}; -#endif diff --git a/Externals/Memcard Manager/src/mcmMain.cpp b/Externals/Memcard Manager/src/mcmMain.cpp deleted file mode 100644 index eddc182f18..0000000000 --- a/Externals/Memcard Manager/src/mcmMain.cpp +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (C) 2003 Dolphin Project. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, version 2.0. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License 2.0 for more details. - -// A copy of the GPL 2.0 should have been included with the program. -// If not, see http://www.gnu.org/licenses/ - -// Official SVN repository and contact information can be found at -// http://code.google.com/p/dolphin-emu/ -#include "MCMmain.h" - -IMPLEMENT_APP(MCMApp) - -CMemcardManager *main_frame; - -#if defined HAVE_WX && HAVE_WX -bool wxMsgAlert(const char* caption, const char* text, bool yes_no, int Style) -{ - return wxYES == wxMessageBox(wxString::FromAscii(text), - wxString::FromAscii(caption), - (yes_no)?wxYES_NO:wxOK); -} -#endif - -bool MCMApp::OnInit() -{ - // Register message box handler - #if defined(HAVE_WX) && HAVE_WX - RegisterMsgAlertHandler(&wxMsgAlert); - #endif - - main_frame = new CMemcardManager((wxFrame*) NULL, wxID_ANY, wxString::FromAscii("Memcard Manager"), - wxPoint(100, 100), wxSize(800, 600)); - main_frame->Show(); - SetTopWindow(main_frame); - return true; -} - -u32 CEXIIPL::GetGCTime() -{ - const u32 cJanuary2000 = 0x386D42C0; // Seconds between 1.1.1970 and 1.1.2000 - u64 ltime = Common::Timer::GetLocalTimeSinceJan1970(); - return ((u32)ltime - cJanuary2000); -}