diff --git a/Source/Dolphin.sln b/Source/Dolphin.sln
index 87089abec0..5dc39ac730 100644
--- a/Source/Dolphin.sln
+++ b/Source/Dolphin.sln
@@ -154,7 +154,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AudioCommon", "Core\AudioCo
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_DSP_LLE_Test", "Plugins\Plugin_DSP_LLE-testing\Plugin_DSP_LLE_Test.vcproj", "{3D8156A9-64D1-4C8E-ADBE-1B319030E4A4}"
ProjectSection(ProjectDependencies) = postProject
+ {11F55366-12EC-4C44-A8CB-1D4E315D61ED} = {11F55366-12EC-4C44-A8CB-1D4E315D61ED}
{FBAFB369-07EB-4460-9CAD-08BE5789DAB6} = {FBAFB369-07EB-4460-9CAD-08BE5789DAB6}
+ {0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E} = {0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E}
+ {1C8436C9-DBAF-42BE-83BC-CF3EC9175ABE} = {1C8436C9-DBAF-42BE-83BC-CF3EC9175ABE}
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
EndProjectSection
EndProject
diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Plugin_DSP_LLE_Test.vcproj b/Source/Plugins/Plugin_DSP_LLE-testing/Plugin_DSP_LLE_Test.vcproj
index f52df5535a..9d55d6f22d 100644
--- a/Source/Plugins/Plugin_DSP_LLE-testing/Plugin_DSP_LLE_Test.vcproj
+++ b/Source/Plugins/Plugin_DSP_LLE-testing/Plugin_DSP_LLE_Test.vcproj
@@ -45,8 +45,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -766,17 +722,25 @@
+
+
+
+
diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/ConfigDlg.cpp b/Source/Plugins/Plugin_DSP_LLE-testing/Src/DSPConfigDlgLLE.cpp
similarity index 83%
rename from Source/Plugins/Plugin_DSP_LLE-testing/Src/ConfigDlg.cpp
rename to Source/Plugins/Plugin_DSP_LLE-testing/Src/DSPConfigDlgLLE.cpp
index 0a6ff609bf..a387516eee 100644
--- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/ConfigDlg.cpp
+++ b/Source/Plugins/Plugin_DSP_LLE-testing/Src/DSPConfigDlgLLE.cpp
@@ -17,16 +17,16 @@
#include "Config.h"
-#include "ConfigDlg.h"
+#include "DSPConfigDlgLLE.h"
-BEGIN_EVENT_TABLE(ConfigDialog, wxDialog)
-EVT_BUTTON(wxID_OK, ConfigDialog::SettingsChanged)
-EVT_CHECKBOX(ID_ENABLE_HLE_AUDIO, ConfigDialog::SettingsChanged)
-EVT_CHECKBOX(ID_ENABLE_DTK_MUSIC, ConfigDialog::SettingsChanged)
-EVT_CHECKBOX(ID_ENABLE_THROTTLE, ConfigDialog::SettingsChanged)
+BEGIN_EVENT_TABLE(DSPConfigDialogLLE, wxDialog)
+EVT_BUTTON(wxID_OK, DSPConfigDialogLLE::SettingsChanged)
+EVT_CHECKBOX(ID_ENABLE_HLE_AUDIO, DSPConfigDialogLLE::SettingsChanged)
+EVT_CHECKBOX(ID_ENABLE_DTK_MUSIC, DSPConfigDialogLLE::SettingsChanged)
+EVT_CHECKBOX(ID_ENABLE_THROTTLE, DSPConfigDialogLLE::SettingsChanged)
END_EVENT_TABLE()
-ConfigDialog::ConfigDialog(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
+DSPConfigDialogLLE::DSPConfigDialogLLE(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
: wxDialog(parent, id, title, position, size, style)
{
// Load config settings
@@ -73,18 +73,18 @@ ConfigDialog::ConfigDialog(wxWindow *parent, wxWindowID id, const wxString &titl
}
// Add audio output options
-void ConfigDialog::AddBackend(const char* backend)
+void DSPConfigDialogLLE::AddBackend(const char* backend)
{
m_BackendSelection->Append(wxString::FromAscii(backend));
// Update value
m_BackendSelection->SetValue(wxString::FromAscii(g_Config.sBackend.c_str()));
}
-ConfigDialog::~ConfigDialog()
+DSPConfigDialogLLE::~DSPConfigDialogLLE()
{
}
-void ConfigDialog::SettingsChanged(wxCommandEvent& event)
+void DSPConfigDialogLLE::SettingsChanged(wxCommandEvent& event)
{
g_Config.m_EnableHLEAudio = m_buttonEnableHLEAudio->GetValue();
g_Config.m_EnableThrottle = m_buttonEnableThrottle->GetValue();
diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/ConfigDlg.h b/Source/Plugins/Plugin_DSP_LLE-testing/Src/DSPConfigDlgLLE.h
similarity index 81%
rename from Source/Plugins/Plugin_DSP_LLE-testing/Src/ConfigDlg.h
rename to Source/Plugins/Plugin_DSP_LLE-testing/Src/DSPConfigDlgLLE.h
index d0fe6e1466..3b145081f9 100644
--- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/ConfigDlg.h
+++ b/Source/Plugins/Plugin_DSP_LLE-testing/Src/DSPConfigDlgLLE.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 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
@@ -15,26 +15,26 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef __DSP_HLE_CONFIGDIALOG_h__
-#define __DSP_HLE_CONFIGDIALOG_h__
+#ifndef __DSP_LLE_CONFIGDIALOG_h__
+#define __DSP_LLE_CONFIGDIALOG_h__
#include
#include
#include
#include
-class ConfigDialog : public wxDialog
+class DSPConfigDialogLLE : public wxDialog
{
public:
- ConfigDialog(wxWindow *parent,
+ DSPConfigDialogLLE(wxWindow *parent,
wxWindowID id = 1,
- const wxString &title = wxT("Dolphin DSP-HLE Plugin Settings"),
+ const wxString &title = wxT("Dolphin DSP-LLE Plugin Settings"),
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE);
- virtual ~ConfigDialog();
+ virtual ~DSPConfigDialogLLE();
void AddBackend(const char *backend);
-
+
private:
DECLARE_EVENT_TABLE();
@@ -58,4 +58,4 @@ private:
void SettingsChanged(wxCommandEvent& event);
};
-#endif //__DSP_HLE_CONFIGDIALOG_h__
+#endif //__DSP_LLE_CONFIGDIALOG_h__
diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/DisAsmDlg.cpp b/Source/Plugins/Plugin_DSP_LLE-testing/Src/DisAsmDlg.cpp
deleted file mode 100644
index a72c7a08fa..0000000000
--- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/DisAsmDlg.cpp
+++ /dev/null
@@ -1,667 +0,0 @@
-// Copyright (C) 2003-2008 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 "stdafx.h"
-#include "../res/resource.h"
-#include "DisAsmDlg.h"
-
-#include "gdsp_memory.h"
-#include "gdsp_interpreter.h"
-#include "disassemble.h"
-#include "RegSettings.h"
-
-CDisAsmDlg::CDisAsmDlg()
- : m_CachedStepCounter(-1)
- , m_CachedCR(-1)
- , m_State(RUN)
- , m_CachedUCodeCRC(-1)
-{}
-
-
-BOOL CDisAsmDlg::PreTranslateMessage(MSG* pMsg)
-{
- return(IsDialogMessage(pMsg));
-}
-
-
-BOOL CDisAsmDlg::OnIdle()
-{
- return(FALSE);
-}
-
-
-LRESULT CDisAsmDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
-{
- CWindowSettings ws;
-
- if (ws.Load("Software\\Dolphin\\DSP", "DisAsm"))
- {
- ws.ApplyTo(CWindow(m_hWnd), SW_SHOW);
- }
-
- m_DisAsmListViewCtrl.m_hWnd = GetDlgItem(IDC_DISASM_LIST);
-
- UIAddChildWindowContainer(m_hWnd);
-
- m_DisAsmListViewCtrl.AddColumn(_T("BP"), ColumnBP);
- m_DisAsmListViewCtrl.AddColumn(_T("Function"), ColumnFunction);
- m_DisAsmListViewCtrl.AddColumn(_T("Address"), ColumnAddress);
- m_DisAsmListViewCtrl.AddColumn(_T("Mnenmomic"), ColumnMenmomic);
- m_DisAsmListViewCtrl.AddColumn(_T("Opcode"), ColumnOpcode);
- m_DisAsmListViewCtrl.AddColumn(_T("Ext"), ColumnExt);
- m_DisAsmListViewCtrl.AddColumn(_T("Parameter"), ColumnParameter);
-
- m_DisAsmListViewCtrl.SetColumnWidth(ColumnBP, 25);
- m_DisAsmListViewCtrl.SetColumnWidth(ColumnFunction, 160);
- m_DisAsmListViewCtrl.SetColumnWidth(ColumnAddress, 55);
- m_DisAsmListViewCtrl.SetColumnWidth(ColumnMenmomic, 55);
- m_DisAsmListViewCtrl.SetColumnWidth(ColumnOpcode, 60);
- m_DisAsmListViewCtrl.SetColumnWidth(ColumnExt, 40);
- m_DisAsmListViewCtrl.SetColumnWidth(ColumnParameter, 500);
-
- m_DisAsmListViewCtrl.SetExtendedListViewStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES);
-
- m_RegisterDlg.Create(m_hWnd);
-
- UpdateDialog();
-
- DlgResize_Init(true, false, WS_THICKFRAME);
-
- return(TRUE);
-}
-
-
-LRESULT CDisAsmDlg::OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
-{
- CWindowSettings ws;
- ws.GetFrom(CWindow(m_hWnd));
- ws.Save("Software\\Dolphin\\DSP", "DisAsm");
-
- return(0);
-}
-
-
-LRESULT CDisAsmDlg::OnStep(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
-{
- m_State = STEP;
-
- UpdateButtonTexts();
- return(0);
-}
-
-
-LRESULT CDisAsmDlg::OnGo(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
-{
- if ((m_State == RUN) || (m_State == RUN_START))
- {
- m_State = PAUSE;
- }
- else
- {
- m_State = RUN_START;
- }
-
- UpdateButtonTexts();
- return(0);
-}
-
-
-LRESULT CDisAsmDlg::OnShowRegisters(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
-{
- if (m_RegisterDlg.IsWindowVisible())
- {
- m_RegisterDlg.ShowWindow(SW_HIDE);
- }
- else
- {
- m_RegisterDlg.ShowWindow(SW_SHOW);
- }
-
- UpdateButtonTexts();
- return(0);
-}
-
-
-LRESULT CDisAsmDlg::OnDblClick(int /*idCtrl*/, LPNMHDR pnmh, BOOL& /*bHandled*/)
-{
- int Index = m_DisAsmListViewCtrl.GetSelectedIndex();
-
- if (Index != -1)
- {
- uint16 SelectedPC = static_cast(m_DisAsmListViewCtrl.GetItemData(Index));
- ToggleBreakPoint(SelectedPC);
- }
-
- RedrawDisAsmListView();
- return(0);
-}
-
-
-LRESULT CDisAsmDlg::OnRClick(int /*idCtrl*/, LPNMHDR pnmh, BOOL& /*bHandled*/)
-{
- int Index = m_DisAsmListViewCtrl.GetSelectedIndex();
-
- if (Index != -1)
- {
- uint16 SelectedPC = static_cast(m_DisAsmListViewCtrl.GetItemData(Index));
- g_dsp.pc = SelectedPC;
- }
-
- RedrawDisAsmListView();
- return(0);
-}
-
-
-void CDisAsmDlg::CloseDialog(int nVal)
-{
- DestroyWindow();
- ::PostQuitMessage(nVal);
-}
-
-
-int CALLBACK CDisAsmDlg::CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
-{
- return(lParam1 > lParam2);
-}
-
-
-void CDisAsmDlg::RebuildDisAsmListView()
-{
- if (!m_DisAsmListViewCtrl.IsWindow())
- return;
-
- m_DisAsmListViewCtrl.ShowWindow(SW_HIDE);
- m_DisAsmListViewCtrl.DeleteAllItems();
-
- char Buffer[256];
- gd_globals_t gdg;
-
- if (g_dsp.pc & 0x8000)
- {
- gdg.binbuf = g_dsp.irom;
- }
- else
- {
- gdg.binbuf = g_dsp.iram;
- }
-
- gdg.buffer = Buffer;
- gdg.buffer_size = 256;
- gdg.ext_separator = (char)0xff;
-
- gdg.show_pc = false;
- gdg.show_hex = false;
- gdg.print_tabs = true;
- gdg.decode_names = true;
- gdg.decode_registers = true;
-
- for (gdg.pc = 0; gdg.pc < DSP_IROM_SIZE;)
- {
- uint16 CurrentPC = gdg.pc;
-
- if (g_dsp.pc & 0x8000)
- {
- CurrentPC |= 0x8000;
- }
-
- char Temp[256];
- sprintf_s(Temp, 256, "0x%04x", CurrentPC);
-
- char Temp2[256];
- sprintf_s(Temp2, 256, "0x%04x", dsp_imem_read(CurrentPC));
-
- char* pOpcode = gd_dis_opcode(&gdg);
- const char* pParameter = NULL;
- const char* pExtension = NULL;
-
- size_t WholeString = strlen(pOpcode);
-
- for (size_t i = 0; i < WholeString; i++)
- {
- if (pOpcode[i] == (char)0xff)
- {
- pOpcode[i] = 0x00;
- pExtension = &pOpcode[i + 1];
- }
-
- if (pOpcode[i] == 0x09)
- {
- pOpcode[i] = 0x00;
- pParameter = &pOpcode[i + 1];
- }
- }
-
-
- const char* pFunctionName = NULL;
-
- if (m_SymbolMap.find(CurrentPC) != m_SymbolMap.end())
- {
- pFunctionName = m_SymbolMap[CurrentPC].Name.c_str();
- }
-
- int Item = m_DisAsmListViewCtrl.AddItem(0, ColumnBP, _T(" "));
- m_DisAsmListViewCtrl.AddItem(Item, ColumnFunction, pFunctionName);
- m_DisAsmListViewCtrl.AddItem(Item, ColumnAddress, Temp);
- m_DisAsmListViewCtrl.AddItem(Item, ColumnMenmomic, Temp2);
- m_DisAsmListViewCtrl.AddItem(Item, ColumnOpcode, pOpcode);
- m_DisAsmListViewCtrl.AddItem(Item, ColumnExt, pExtension);
-
- if (!_stricmp(pOpcode, "CALL"))
- {
- uint32 FunctionAddress = -1;
- sscanf(pParameter, "0x%04x", &FunctionAddress);
-
- if (m_SymbolMap.find(FunctionAddress) != m_SymbolMap.end())
- {
- pParameter = m_SymbolMap[FunctionAddress].Name.c_str();
- }
- }
-
- m_DisAsmListViewCtrl.AddItem(Item, ColumnParameter, pParameter);
-
- m_DisAsmListViewCtrl.SetItemData(Item, CurrentPC);
- }
-
- m_DisAsmListViewCtrl.SortItems(CompareFunc, (LPARAM) this);
-
- m_DisAsmListViewCtrl.ShowWindow(SW_SHOW);
-}
-
-
-void CDisAsmDlg::UpdateDisAsmListView()
-{
- if (g_dsp.dram == NULL)
- {
- return;
- }
-
- // check if we have to rebuild the list view
- if (m_DisAsmListViewCtrl.GetItemCount() == 0)
- {
- RebuildDisAsmListView();
- }
- else
- {
- uint16 FirstPC = static_cast(m_DisAsmListViewCtrl.GetItemData(0));
-
- if ((FirstPC & 0x8000) != (g_dsp.pc & 0x8000))
- {
- RebuildDisAsmListView();
- }
- }
-
- if (m_CachedStepCounter == g_dsp.step_counter)
- {
- return;
- }
-
- // show PC
- for (int i = 0; i < m_DisAsmListViewCtrl.GetItemCount(); i++)
- {
- if (m_DisAsmListViewCtrl.GetItemData(i) == g_dsp.pc)
- {
- m_DisAsmListViewCtrl.EnsureVisible(i - 5, FALSE);
- m_DisAsmListViewCtrl.EnsureVisible(i + 14, FALSE);
- break;
- }
- }
-
- m_CachedStepCounter = g_dsp.step_counter;
-
- RedrawDisAsmListView();
-
- m_RegisterDlg.UpdateRegisterListView();
-}
-
-
-void CDisAsmDlg::UpdateSymbolMap()
-{
- if (g_dsp.dram == NULL)
- {
- return;
- }
-
- if (m_CachedUCodeCRC != g_dsp.iram_crc)
- {
- // load symbol map (if there is one)
- m_CachedUCodeCRC = g_dsp.iram_crc;
- char FileName[MAX_PATH];
- sprintf(FileName, "maps\\DSP_%08x.map", m_CachedUCodeCRC);
- LoadSymbolMap(FileName);
-
- // rebuild the disasm
- RebuildDisAsmListView();
- }
-}
-
-
-void CDisAsmDlg::UpdateRegisterFlags()
-{
- if (m_CachedCR == g_dsp.cr)
- {
- return;
- }
-
- CButton ButtonAssertInt(GetDlgItem(IDC_ASSERT_INT));
- ButtonAssertInt.SetCheck(g_dsp.cr & 0x02 ? BST_CHECKED : BST_UNCHECKED);
-
- CButton ButtonReset(GetDlgItem(IDC_HALT));
- ButtonReset.SetCheck(g_dsp.cr & 0x04 ? BST_CHECKED : BST_UNCHECKED);
-
- CButton ButtonInit(GetDlgItem(IDC_INIT));
- ButtonInit.SetCheck(g_dsp.cr & 0x800 ? BST_CHECKED : BST_UNCHECKED);
-
- m_CachedCR = g_dsp.cr;
-}
-
-
-bool CDisAsmDlg::CanDoStep()
-{
- UpdateSymbolMap(); // update the symbols all the time because there a script cmds like bps
-
- switch (m_State)
- {
- case RUN_START:
- m_State = RUN;
- return(true);
-
- case RUN:
-
- if (IsBreakPoint(g_dsp.pc))
- {
- UpdateDialog();
- m_State = PAUSE;
- return(false);
- }
-
- return(true);
-
- case PAUSE:
- UpdateDialog();
- return(false);
-
- case STEP:
- UpdateDialog();
- m_State = PAUSE;
- return(true);
- }
-
- return(false);
-}
-
-
-void CDisAsmDlg::DebugBreak()
-{
- m_State = PAUSE;
-}
-
-
-void CDisAsmDlg::UpdateButtonTexts()
-{
- // go button
- {
- CButton Button(GetDlgItem(ID_GO));
-
- switch (m_State)
- {
- case RUN_START:
- case RUN:
- Button.SetWindowText("Pause");
- break;
-
- case PAUSE:
- case STEP:
- Button.SetWindowText("Go");
- break;
- }
- }
-
- // show register
- {
- CButton Button(GetDlgItem(ID_SHOW_REGISTER));
-
- if (m_RegisterDlg.IsWindowVisible())
- {
- Button.SetWindowText("Hide Regs");
- }
- else
- {
- Button.SetWindowText("Show Regs");
- }
- }
-}
-
-
-bool CDisAsmDlg::IsBreakPoint(uint16 _Address)
-{
- return(std::find(m_BreakPoints.begin(), m_BreakPoints.end(), _Address) != m_BreakPoints.end());
-}
-
-
-void CDisAsmDlg::ToggleBreakPoint(uint16 _Address)
-{
- if (IsBreakPoint(_Address))
- {
- RemoveBreakPoint(_Address);
- }
- else
- {
- AddBreakPoint(_Address);
- }
-}
-
-
-void CDisAsmDlg::RemoveBreakPoint(uint16 _Address)
-{
- CBreakPointList::iterator itr = std::find(m_BreakPoints.begin(), m_BreakPoints.end(), _Address);
-
- if (itr != m_BreakPoints.end())
- {
- m_BreakPoints.erase(itr);
- }
-}
-
-
-void CDisAsmDlg::AddBreakPoint(uint16 _Address)
-{
- CBreakPointList::iterator itr = std::find(m_BreakPoints.begin(), m_BreakPoints.end(), _Address);
-
- if (itr == m_BreakPoints.end())
- {
- m_BreakPoints.push_back(_Address);
- }
-}
-
-
-void CDisAsmDlg::ClearBreakPoints()
-{
- m_BreakPoints.clear();
-}
-
-
-LRESULT CDisAsmDlg::OnCustomDraw(int /*idCtrl*/, LPNMHDR pnmh, BOOL& _bHandled)
-{
- int result = CDRF_DODEFAULT;
-
- NMLVCUSTOMDRAW* pLVCD = reinterpret_cast(pnmh);
-
- switch (pLVCD->nmcd.dwDrawStage)
- {
- case CDDS_PREPAINT:
- result = CDRF_NOTIFYITEMDRAW;
- break;
-
- case CDDS_ITEMPREPAINT:
- result = CDRF_NOTIFYSUBITEMDRAW;
- break;
-
- case (CDDS_ITEMPREPAINT | CDDS_SUBITEM):
- {
- pLVCD->nmcd.uItemState &= ~(CDIS_SELECTED | CDIS_FOCUS);
-
- uint16 CurrentAddress = static_cast(m_DisAsmListViewCtrl.GetItemData((int)pLVCD->nmcd.dwItemSpec));
- pLVCD->clrTextBk = FindColor(CurrentAddress);
-
- if (CurrentAddress == g_dsp.pc)
- {
- pLVCD->clrTextBk = RGB(96, 192, 128);
- }
-
- switch (pLVCD->iSubItem)
- {
- case 0x00:
- {
- if (IsBreakPoint(CurrentAddress))
- {
- pLVCD->clrTextBk = RGB(255, 64, 64);
- }
- }
- break;
-
- default:
- break;
- }
- }
- }
-
- return(result);
-}
-
-
-void CDisAsmDlg::RedrawDisAsmListView()
-{
- ::InvalidateRect(m_DisAsmListViewCtrl.m_hWnd, NULL, FALSE);
-}
-
-
-bool CDisAsmDlg::LoadSymbolMap(const char* _pFileName)
-{
- m_SymbolMap.clear();
-
- FILE* pFile = fopen(_pFileName, "r");
-
- if (!pFile)
- {
- return(false);
- }
-
- char Name[1024];
- uint32 AddressStart, AddressEnd;
-
- while (!feof(pFile))
- {
- char line[512];
- fgets(line, 511, pFile);
-
- if (strlen(line) < 2)
- {
- continue;
- }
-
- // check for comment
- if (line[0] == '.')
- {
- continue;
- }
-
- // clear all breakpoints
- if (line[0] == 'C')
- {
- ClearBreakPoints();
- continue;
- }
-
- // add breakpoint
- if (line[0] == 'B')
- {
- sscanf(line, "B %04x", &AddressStart);
- AddBreakPoint(static_cast(AddressStart));
- continue;
- }
-
- // default add new symbol
- sscanf(line, "%04x %04x %s", &AddressStart, &AddressEnd, Name);
-
- if (m_SymbolMap.find(AddressStart) == m_SymbolMap.end())
- {
- m_SymbolMap.insert(std::pair(AddressStart, SSymbol(AddressStart, AddressEnd, Name)));
- }
- else
- {
- m_SymbolMap[AddressStart] = SSymbol(AddressStart, AddressEnd, Name);
- }
- }
-
- fclose(pFile);
-
- return(true);
-}
-
-
-DWORD CDisAsmDlg::FindColor(uint16 _Address)
-{
- size_t Color = 0;
- static int Colors[6] = {0xC0FFFF, 0xFFE0C0, 0xC0C0FF, 0xFFC0FF, 0xC0FFC0, 0xFFFFC0};
-
- for (CSymbolMap::const_iterator itr = m_SymbolMap.begin(); itr != m_SymbolMap.end(); itr++)
- {
- const SSymbol& rSymbol = itr->second;
-
- if ((rSymbol.AddressStart <= _Address) && (_Address <= rSymbol.AddressEnd))
- {
- return(Colors[Color % 6]);
- }
-
- Color++;
- }
-
- return(GetSysColor(COLOR_3DLIGHT));
-}
-
-
-void CDisAsmDlg::UpdateDialog()
-{
- UpdateSymbolMap();
- UpdateDisAsmListView();
-// UpdateButtonTexts();
- UpdateRegisterFlags();
-}
-
-LRESULT CDisAsmDlg::OnLvnItemchangedDisasmList(int /*idCtrl*/, LPNMHDR pNMHDR, BOOL& /*bHandled*/)
-{
- LPNMLISTVIEW pNMLV = reinterpret_cast(pNMHDR);
- // TODO: Add your control notification handler code here
-
- return 0;
-}
-
-
-// TODO: make the members adjust with the dialog
-LRESULT CDisAsmDlg::OnSize(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& /*bHandled*/)
-{
- // we habe to make a group of the items I think
- /*
- CRect lpRect;
-
-
- int wid = lpRect.right - lpRect.left - 100;
- int hei = lpRect.bottom - lpRect.top - 20;
- m_DisAsmListViewCtrl.ResizeClient(wid, hei, true);
- */
-
- return 0;
-}
diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/DisAsmDlg.h b/Source/Plugins/Plugin_DSP_LLE-testing/Src/DisAsmDlg.h
deleted file mode 100644
index ef128c24fc..0000000000
--- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/DisAsmDlg.h
+++ /dev/null
@@ -1,163 +0,0 @@
-// Copyright (C) 2003-2008 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 "Globals.h"
-
-#include
-#include
-
-#include "../res/resource.h"
-#include "DisAsmListView.h"
-#include "RegisterDlg.h"
-
-class CDisAsmDlg
- : public CDialogImpl, public CUpdateUI, public CDialogResize
-{
- public:
-
- CDisAsmDlg();
-
- enum { IDD = IDD_DISASMDLG };
-
- virtual BOOL PreTranslateMessage(MSG* pMsg);
- virtual BOOL OnIdle();
-
-
- BEGIN_UPDATE_UI_MAP(CDisAsmDlg)
- END_UPDATE_UI_MAP()
-
- BEGIN_DLGRESIZE_MAP(CDisAsmDlg)
- DLGRESIZE_CONTROL(IDR_MAINFRAME, DLSZ_SIZE_X | DLSZ_SIZE_Y)
- END_DLGRESIZE_MAP()
-
- BEGIN_MSG_MAP(CDisAsmDlg)
- MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
- MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
- COMMAND_ID_HANDLER(ID_STEP, OnStep)
- COMMAND_ID_HANDLER(ID_GO, OnGo)
- COMMAND_ID_HANDLER(ID_SHOW_REGISTER, OnShowRegisters)
- NOTIFY_CODE_HANDLER(NM_CLICK, OnDblClick)
- NOTIFY_CODE_HANDLER(NM_RETURN, OnDblClick)
- NOTIFY_CODE_HANDLER(NM_RCLICK, OnRClick)
- NOTIFY_CODE_HANDLER(NM_CUSTOMDRAW, OnCustomDraw)
- NOTIFY_HANDLER(IDC_DISASM_LIST, LVN_ITEMCHANGED, OnLvnItemchangedDisasmList)
- MESSAGE_HANDLER(WM_SIZE, OnSize)
- CHAIN_MSG_MAP(CDialogResize)
-
- END_MSG_MAP()
-
-// Handler prototypes (uncomment arguments if needed):
-// LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
-// LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
-// LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/)
-
- LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL & /*bHandled*/);
- LRESULT OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL & /*bHandled*/);
-
- LRESULT OnStep(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL & /*bHandled*/);
- LRESULT OnGo(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL & /*bHandled*/);
- LRESULT OnShowRegisters(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL & /*bHandled*/);
- LRESULT OnCustomDraw(int /*idCtrl*/, LPNMHDR pnmh, BOOL& _bHandled);
-
- LRESULT OnDblClick(int /*idCtrl*/, LPNMHDR pnmh, BOOL& /*bHandled*/);
- LRESULT OnRClick(int /*idCtrl*/, LPNMHDR pnmh, BOOL& /*bHandled*/);
-
- void CloseDialog(int nVal);
-
- bool CanDoStep();
-
- void DebugBreak();
-
-
- private:
-
- enum EColumns
- {
- ColumnBP = 0,
- ColumnFunction = 1,
- ColumnAddress = 2,
- ColumnMenmomic = 3,
- ColumnOpcode = 4,
- ColumnExt = 5,
- ColumnParameter = 6
- };
-
- enum EState
- {
- PAUSE,
- STEP,
- RUN,
- RUN_START // ignores breakpoints and switches after one step to RUN
- };
- EState m_State;
-
-
- CListViewCtrl m_DisAsmListViewCtrl;
- CRegisterDlg m_RegisterDlg;
- //CWindow GroupLeft
- CStatic GroupLeft;
-
- uint64 m_CachedStepCounter;
- uint16 m_CachedCR;
- uint32 m_CachedUCodeCRC;
-
- typedef std::listCBreakPointList;
- CBreakPointList m_BreakPoints;
-
- // break point handling
- bool IsBreakPoint(uint16 _Address);
- void ToggleBreakPoint(uint16 _Address);
- void RemoveBreakPoint(uint16 _Address);
- void AddBreakPoint(uint16 _Address);
- void ClearBreakPoints();
-
-
- // update dialog
- void UpdateDisAsmListView();
- void UpdateRegisterFlags();
- void UpdateSymbolMap();
- void UpdateButtonTexts();
-
- void RedrawDisAsmListView();
- void RebuildDisAsmListView();
-
-
- struct SSymbol
- {
- uint32 AddressStart;
- uint32 AddressEnd;
- std::string Name;
-
- SSymbol(uint32 _AddressStart = 0, uint32 _AddressEnd = 0, char* _Name = NULL)
- : AddressStart(_AddressStart)
- , AddressEnd(_AddressEnd)
- , Name(_Name)
- {}
- };
- typedef std::mapCSymbolMap;
- CSymbolMap m_SymbolMap;
-
- void AddSymbol(uint16 _AddressStart, uint16 _AddressEnd, char* _Name);
- bool LoadSymbolMap(const char* _pFileName);
- DWORD FindColor(uint16 _Address);
- void UpdateDialog();
-
- static int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
-public:
- LRESULT OnLvnItemchangedDisasmList(int /*idCtrl*/, LPNMHDR pNMHDR, BOOL& /*bHandled*/);
- LRESULT OnSize(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
-};
diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/DisAsmListView.h b/Source/Plugins/Plugin_DSP_LLE-testing/Src/DisAsmListView.h
deleted file mode 100644
index 65f9dd7f1f..0000000000
--- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/DisAsmListView.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (C) 2003-2008 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 _MYLISTVIEW_H
-#define _MYLISTVIEW_H
-
-class CDisAsmListView
- : public CWindowImpl,
- public CCustomDraw
-{
- public:
-
- BEGIN_MSG_MAP(CDisAsmListView)
- CHAIN_MSG_MAP(CCustomDraw)
- END_MSG_MAP()
-
- DWORD OnPrePaint(int /*idCtrl*/, LPNMCUSTOMDRAW /*lpNMCustomDraw*/)
- {
- return(CDRF_NOTIFYITEMDRAW);
- }
-
-
- DWORD OnItemPrePaint(int /*idCtrl*/, LPNMCUSTOMDRAW lpNMCustomDraw)
- {
- NMLVCUSTOMDRAW* pLVCD = reinterpret_cast(lpNMCustomDraw);
-
- // This is the prepaint stage for an item. Here's where we set the
- // item's text color. Our return value will tell Windows to draw the
- // item itself, but it will use the new color we set here for the background
-
- COLORREF crText;
-
- if ((pLVCD->nmcd.dwItemSpec % 2) == 0)
- {
- crText = RGB(200, 200, 255);
- }
- else
- {
- crText = RGB(255, 255, 255);
- }
-
- // Store the color back in the NMLVCUSTOMDRAW struct.
- pLVCD->clrTextBk = crText;
-
- // Tell Windows to paint the control itself.
- return(CDRF_DODEFAULT);
- }
-};
-
-#endif _MYLISTVIEW_H
diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/Globals.cpp b/Source/Plugins/Plugin_DSP_LLE-testing/Src/Globals.cpp
index cb59ab5c2e..f594c728a5 100644
--- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/Globals.cpp
+++ b/Source/Plugins/Plugin_DSP_LLE-testing/Src/Globals.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 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
diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/Globals.h b/Source/Plugins/Plugin_DSP_LLE-testing/Src/Globals.h
index 8c1152f69d..d590dd1ace 100644
--- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/Globals.h
+++ b/Source/Plugins/Plugin_DSP_LLE-testing/Src/Globals.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 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
diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/HLE_Functions.cpp b/Source/Plugins/Plugin_DSP_LLE-testing/Src/HLE_Functions.cpp
index 08f4a00d9a..ceb9ff4e99 100644
--- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/HLE_Functions.cpp
+++ b/Source/Plugins/Plugin_DSP_LLE-testing/Src/HLE_Functions.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 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
diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/HLE_Helper.cpp b/Source/Plugins/Plugin_DSP_LLE-testing/Src/HLE_Helper.cpp
index 8d0c523554..4fc201007e 100644
--- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/HLE_Helper.cpp
+++ b/Source/Plugins/Plugin_DSP_LLE-testing/Src/HLE_Helper.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 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
diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/HLE_Helper.h b/Source/Plugins/Plugin_DSP_LLE-testing/Src/HLE_Helper.h
index f1aa055cf0..ffd3866fe9 100644
--- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/HLE_Helper.h
+++ b/Source/Plugins/Plugin_DSP_LLE-testing/Src/HLE_Helper.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 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
diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/Logging/AXTask.cpp b/Source/Plugins/Plugin_DSP_LLE-testing/Src/Logging/AXTask.cpp
index 970712fa0f..b70c5e31d7 100644
--- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/Logging/AXTask.cpp
+++ b/Source/Plugins/Plugin_DSP_LLE-testing/Src/Logging/AXTask.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 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
diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/Logging/Logging.cpp b/Source/Plugins/Plugin_DSP_LLE-testing/Src/Logging/Logging.cpp
index dd6d144216..96a12ec6f5 100644
--- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/Logging/Logging.cpp
+++ b/Source/Plugins/Plugin_DSP_LLE-testing/Src/Logging/Logging.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 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
diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/Logging/Logging.h b/Source/Plugins/Plugin_DSP_LLE-testing/Src/Logging/Logging.h
index ce074b4fbb..8ad804bbbf 100644
--- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/Logging/Logging.h
+++ b/Source/Plugins/Plugin_DSP_LLE-testing/Src/Logging/Logging.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 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
diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/Logging/ReadPBs.cpp b/Source/Plugins/Plugin_DSP_LLE-testing/Src/Logging/ReadPBs.cpp
index 97c089dacd..89509f3c70 100644
--- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/Logging/ReadPBs.cpp
+++ b/Source/Plugins/Plugin_DSP_LLE-testing/Src/Logging/ReadPBs.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 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
diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/Logging/UCode_AXStructs.h b/Source/Plugins/Plugin_DSP_LLE-testing/Src/Logging/UCode_AXStructs.h
index ea1fdabc2a..409f6f80a1 100644
--- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/Logging/UCode_AXStructs.h
+++ b/Source/Plugins/Plugin_DSP_LLE-testing/Src/Logging/UCode_AXStructs.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 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
diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/RegSettings.cpp b/Source/Plugins/Plugin_DSP_LLE-testing/Src/RegSettings.cpp
deleted file mode 100644
index eebd599054..0000000000
--- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/RegSettings.cpp
+++ /dev/null
@@ -1,274 +0,0 @@
-// RegSettings.cpp
-//
-// Copyright (c) 2001 Magomed Abdurakhmanov
-// maq@hotbox.ru, http://mickels.iwt.ru/en
-//
-//
-//
-// No warranties are given. Use at your own risk.
-//
-//////////////////////////////////////////////////////////////////////
-
-#include "stdafx.h"
-#include "RegSettings.h"
-
-//////////////////////////////////////////////////////////////////////
-// CWindowSettings
-
-#define S_WINDOW_PLACEMENT_VAL _T("WindowPlacement")
-
-CWindowSettings::CWindowSettings()
-{
- m_WindowPlacement.length = sizeof(m_WindowPlacement);
- m_WindowPlacement.flags = 0;
- m_WindowPlacement.ptMinPosition.x = 0;
- m_WindowPlacement.ptMinPosition.y = 0;
- m_WindowPlacement.ptMaxPosition.x = 0;
- m_WindowPlacement.ptMaxPosition.y = 0;
-
- CRect rc;
- SystemParametersInfo(SPI_GETWORKAREA, 0, rc, 0);
- rc.DeflateRect(100, 100);
- m_WindowPlacement.rcNormalPosition = rc;
- m_WindowPlacement.showCmd = SW_SHOWNORMAL;
-}
-
-
-bool CWindowSettings::Load(LPCTSTR szRegKey, LPCTSTR szPrefix, HKEY hkRootKey /* = HKEY_CURRENT_USER*/)
-{
- CRegKey reg;
- DWORD err = reg.Open(hkRootKey, szRegKey, KEY_READ);
-
- if (err == ERROR_SUCCESS)
- {
- DWORD dwType = NULL;
- DWORD dwSize = sizeof(m_WindowPlacement);
- err = RegQueryValueEx(reg.m_hKey, CString(szPrefix) + S_WINDOW_PLACEMENT_VAL, NULL, &dwType,
- (LPBYTE)&m_WindowPlacement, &dwSize);
- }
-
- return(err == ERROR_SUCCESS);
-}
-
-
-bool CWindowSettings::Save(LPCTSTR szRegKey, LPCTSTR szPrefix, HKEY hkRootKey /* = HKEY_CURRENT_USER*/) const
-{
- CRegKey reg;
- DWORD err = reg.Create(hkRootKey, szRegKey);
-
- if (err == ERROR_SUCCESS)
- {
- err = RegSetValueEx(reg.m_hKey, CString(szPrefix) + S_WINDOW_PLACEMENT_VAL, NULL, REG_BINARY,
- (LPBYTE)&m_WindowPlacement, sizeof(m_WindowPlacement));
- }
-
- return(err == ERROR_SUCCESS);
-}
-
-
-void CWindowSettings::GetFrom(CWindow& Wnd)
-{
- ATLASSERT(Wnd.IsWindow());
- Wnd.GetWindowPlacement(&m_WindowPlacement);
-}
-
-
-void CWindowSettings::ApplyTo(CWindow& Wnd, int nCmdShow /* = SW_SHOWNORMAL*/) const
-{
- ATLASSERT(Wnd.IsWindow());
-
- Wnd.SetWindowPlacement(&m_WindowPlacement);
-
- if (SW_SHOWNORMAL != nCmdShow)
- {
- Wnd.ShowWindow(nCmdShow);
- }
- else
- if (m_WindowPlacement.showCmd == SW_MINIMIZE || m_WindowPlacement.showCmd == SW_SHOWMINIMIZED)
- {
- Wnd.ShowWindow(SW_SHOWNORMAL);
- }
-}
-
-
-//////////////////////////////////////////////////////////////////////
-// CReBarSettings
-
-#define S_BAR_BANDCOUNT _T("BandCount")
-#define S_BAR_ID_VAL _T("ID")
-#define S_BAR_CX_VAL _T("CX")
-#define S_BAR_BREAKLINE_VAL _T("BreakLine")
-
-CReBarSettings::CReBarSettings()
-{
- m_pBands = NULL;
- m_cbBandCount = 0;
-}
-
-
-CReBarSettings::~CReBarSettings()
-{
- if (m_pBands != NULL)
- {
- delete[] m_pBands;
- m_pBands = NULL;
- }
-}
-
-
-bool CReBarSettings::Load(LPCTSTR szRegKey, LPCTSTR szPrefix, HKEY hkRootKey /* = HKEY_CURRENT_USER*/)
-{
- if (m_pBands != NULL)
- {
- delete[] m_pBands;
- m_pBands = NULL;
- }
-
- m_pBands = NULL;
- m_cbBandCount = 0;
-
- CRegKey reg;
- DWORD err = reg.Open(hkRootKey, szRegKey, KEY_READ);
-
- if (err == ERROR_SUCCESS)
- {
- reg.QueryDWORDValue(CString(szPrefix) + S_BAR_BANDCOUNT, m_cbBandCount);
-
- if (m_cbBandCount > 0)
- {
- m_pBands = new BandInfo[m_cbBandCount];
- }
-
- for (DWORD i = 0; i < m_cbBandCount; i++)
- {
- CString s;
- s.Format(_T("%s%i_"), szPrefix, i);
- reg.QueryDWORDValue(s + S_BAR_ID_VAL, m_pBands[i].ID);
- reg.QueryDWORDValue(s + S_BAR_CX_VAL, m_pBands[i].cx);
-
- DWORD dw;
- reg.QueryDWORDValue(s + S_BAR_BREAKLINE_VAL, dw);
- m_pBands[i].BreakLine = dw != 0;
- }
- }
-
- return(err == ERROR_SUCCESS);
-}
-
-
-bool CReBarSettings::Save(LPCTSTR szRegKey, LPCTSTR szPrefix, HKEY hkRootKey /* = HKEY_CURRENT_USER*/) const
-{
- CRegKey reg;
- DWORD err = reg.Create(hkRootKey, szRegKey);
-
- if (err == ERROR_SUCCESS)
- {
- reg.SetDWORDValue(CString(szPrefix) + S_BAR_BANDCOUNT, m_cbBandCount);
-
- for (DWORD i = 0; i < m_cbBandCount; i++)
- {
- CString s;
- s.Format(_T("%s%i_"), szPrefix, i);
- reg.SetDWORDValue(s + S_BAR_ID_VAL, m_pBands[i].ID);
- reg.SetDWORDValue(s + S_BAR_CX_VAL, m_pBands[i].cx);
-
- DWORD dw = m_pBands[i].BreakLine;
- reg.SetDWORDValue(s + S_BAR_BREAKLINE_VAL, dw);
- }
- }
-
- return(err == ERROR_SUCCESS);
-}
-
-
-void CReBarSettings::GetFrom(CReBarCtrl& ReBar)
-{
- ATLASSERT(ReBar.IsWindow());
-
- if (m_pBands != NULL)
- {
- delete[] m_pBands;
- }
-
- m_pBands = NULL;
- m_cbBandCount = ReBar.GetBandCount();
-
- if (m_cbBandCount > 0)
- {
- m_pBands = new BandInfo[m_cbBandCount];
- }
-
- for (UINT i = 0; i < m_cbBandCount; i++)
- {
- REBARBANDINFO rbi;
- rbi.cbSize = sizeof(rbi);
- rbi.fMask = RBBIM_ID | RBBIM_SIZE | RBBIM_STYLE;
- ReBar.GetBandInfo(i, &rbi);
- m_pBands[i].ID = rbi.wID;
- m_pBands[i].cx = rbi.cx;
- m_pBands[i].BreakLine = (rbi.fStyle & RBBS_BREAK) != 0;
- }
-}
-
-
-void CReBarSettings::ApplyTo(CReBarCtrl& ReBar) const
-{
- ATLASSERT(ReBar.IsWindow());
-
- for (UINT i = 0; i < m_cbBandCount; i++)
- {
- ReBar.MoveBand(ReBar.IdToIndex(m_pBands[i].ID), i);
- REBARBANDINFO rbi;
- rbi.cbSize = sizeof(rbi);
- rbi.fMask = RBBIM_ID | RBBIM_SIZE | RBBIM_STYLE;
- ReBar.GetBandInfo(i, &rbi);
-
- rbi.cx = m_pBands[i].cx;
-
- if (m_pBands[i].BreakLine)
- {
- rbi.fStyle |= RBBS_BREAK;
- }
- else
- {
- rbi.fStyle &= (~RBBS_BREAK);
- }
-
- ReBar.SetBandInfo(i, &rbi);
- }
-}
-
-
-//////////////////////////////////////////////////////////////////////
-// CSplitterSettings
-
-#define S_SPLITTER_POS _T("SplitterPos")
-
-bool CSplitterSettings::Load(LPCTSTR szRegKey, LPCTSTR szPrefix, HKEY hkRootKey /* = HKEY_CURRENT_USER*/)
-{
- CRegKey reg;
- DWORD err = reg.Open(hkRootKey, szRegKey, KEY_READ);
-
- if (err == ERROR_SUCCESS)
- {
- reg.QueryDWORDValue(CString(szPrefix) + S_SPLITTER_POS, m_dwPos);
- }
-
- return(err == ERROR_SUCCESS);
-}
-
-
-bool CSplitterSettings::Save(LPCTSTR szRegKey, LPCTSTR szPrefix, HKEY hkRootKey /* = HKEY_CURRENT_USER*/) const
-{
- CRegKey reg;
- DWORD err = reg.Create(hkRootKey, szRegKey);
-
- if (err == ERROR_SUCCESS)
- {
- reg.SetDWORDValue(CString(szPrefix) + S_SPLITTER_POS, m_dwPos);
- }
-
- return(err == ERROR_SUCCESS);
-}
-
-
diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/RegSettings.h b/Source/Plugins/Plugin_DSP_LLE-testing/Src/RegSettings.h
deleted file mode 100644
index 83a71e2415..0000000000
--- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/RegSettings.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// RegSettings.h
-//
-// Copyright (c) 2001 Magomed Abdurakhmanov
-// maq@hotbox.ru, http://mickels.iwt.ru/en
-//
-//
-//
-// No warranties are given. Use at your own risk.
-//
-//////////////////////////////////////////////////////////////////////
-
-#if !defined (AFX_REGSETTINGS_H__91E69C67_8104_4819_969A_B5E71A9993D5__INCLUDED_)
-#define AFX_REGSETTINGS_H__91E69C67_8104_4819_969A_B5E71A9993D5__INCLUDED_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-#include
-#include
-
-class CWindowSettings
-{
- public:
-
- WINDOWPLACEMENT m_WindowPlacement;
-
- CWindowSettings();
- void GetFrom(CWindow& Wnd);
- void ApplyTo(CWindow& Wnd, int nCmdShow = SW_SHOWNORMAL) const;
-
- bool Load(LPCTSTR szRegKey, LPCTSTR szPrefix, HKEY hkRootKey = HKEY_CURRENT_USER);
- bool Save(LPCTSTR szRegKey, LPCTSTR szPrefix, HKEY hkRootKey = HKEY_CURRENT_USER) const;
-};
-
-class CReBarSettings
-{
- public:
-
- struct BandInfo
- {
- DWORD ID;
- DWORD cx;
- bool BreakLine;
- }* m_pBands;
-
- DWORD m_cbBandCount;
-
- CReBarSettings();
- ~CReBarSettings();
-
- void GetFrom(CReBarCtrl& ReBar);
- void ApplyTo(CReBarCtrl& ReBar) const;
-
- bool Load(LPCTSTR szRegKey, LPCTSTR szPrefix, HKEY hkRootKey = HKEY_CURRENT_USER);
- bool Save(LPCTSTR szRegKey, LPCTSTR szPrefix, HKEY hkRootKey = HKEY_CURRENT_USER) const;
-};
-
-class CSplitterSettings
-{
- public:
-
- DWORD m_dwPos;
-
- templatevoid GetFrom(const T& Splitter)
- {
- m_dwPos = Splitter.GetSplitterPos();
- }
-
-
- templatevoid ApplyTo(T& Splitter) const
- {
- Splitter.SetSplitterPos(m_dwPos);
- }
-
-
- bool Load(LPCTSTR szRegKey, LPCTSTR szPrefix, HKEY hkRootKey = HKEY_CURRENT_USER);
- bool Save(LPCTSTR szRegKey, LPCTSTR szPrefix, HKEY hkRootKey = HKEY_CURRENT_USER) const;
-};
-
-#endif // !defined(AFX_REGSETTINGS_H__91E69C67_8104_4819_969A_B5E71A9993D5__INCLUDED_)
diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/RegisterDlg.cpp b/Source/Plugins/Plugin_DSP_LLE-testing/Src/RegisterDlg.cpp
deleted file mode 100644
index 9e0889d3bb..0000000000
--- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/RegisterDlg.cpp
+++ /dev/null
@@ -1,207 +0,0 @@
-// Copyright (C) 2003-2008 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 "../res/resource.h"
-#include "RegisterDlg.h"
-
-#include "disassemble.h"
-#include "gdsp_interpreter.h"
-#include "RegSettings.h"
-
-CRegisterDlg::CRegisterDlg()
- : m_CachedCounter(-1)
-{}
-
-
-BOOL CRegisterDlg::PreTranslateMessage(MSG* pMsg)
-{
- return(IsDialogMessage(pMsg));
-}
-
-
-BOOL CRegisterDlg::OnIdle()
-{
- return(FALSE);
-}
-
-
-LRESULT CRegisterDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
-{
- CWindowSettings ws;
-
- if (ws.Load("Software\\Dolphin\\DSP", "Register"))
- {
- ws.ApplyTo(CWindow(m_hWnd), SW_SHOW);
- }
-
- m_RegisterListViewCtrl.m_hWnd = GetDlgItem(IDC_DISASM_LIST);
-
- UIAddChildWindowContainer(m_hWnd);
-
- m_RegisterListViewCtrl.AddColumn(_T("General"), 0);
- m_RegisterListViewCtrl.AddColumn(_T(" "), 1);
- m_RegisterListViewCtrl.AddColumn(_T("Special"), 2);
- m_RegisterListViewCtrl.AddColumn(_T("0"), 3);
-
- m_RegisterListViewCtrl.SetColumnWidth(0, 50);
- m_RegisterListViewCtrl.SetColumnWidth(1, 100);
- m_RegisterListViewCtrl.SetColumnWidth(2, 60);
- m_RegisterListViewCtrl.SetColumnWidth(3, 100);
-
- m_RegisterListViewCtrl.SetExtendedListViewStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES);
- m_RegisterListViewCtrl.SetTextBkColor(GetSysColor(COLOR_3DLIGHT));
-
-
- for (uint16 i = 0; i < 16; i++)
- {
- // 0-15
- int Item = m_RegisterListViewCtrl.AddItem(0, 0, gd_dis_get_reg_name(i));
-
- // 16-31
- m_RegisterListViewCtrl.AddItem(Item, 2, gd_dis_get_reg_name(16 + i));
-
- // just for easy sort
- m_RegisterListViewCtrl.SetItemData(Item, i);
- }
-
- m_RegisterListViewCtrl.SortItems(CompareFunc, (LPARAM) this);
-
- UpdateRegisterListView();
-
- return(TRUE);
-}
-
-
-LRESULT CRegisterDlg::OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
-{
- CWindowSettings ws;
- ws.GetFrom(CWindow(m_hWnd));
- ws.Save("Software\\Dolphin\\DSP", "Register");
-
- return(0);
-}
-
-
-void CRegisterDlg::UpdateRegisterListView()
-{
- if (m_CachedCounter == g_dsp.step_counter)
- {
- return;
- }
-
- m_CachedCounter = g_dsp.step_counter;
-
- char Temp[256];
-
- for (uint16 i = 0; i < 16; i++)
- {
- // 0-15
- if (m_CachedRegs[i] != g_dsp.r[i])
- {
- m_CachedRegHasChanged[i] = true;
- }
- else
- {
- m_CachedRegHasChanged[i] = false;
- }
-
- m_CachedRegs[i] = g_dsp.r[i];
-
- sprintf_s(Temp, 256, "0x%04x", g_dsp.r[i]);
- m_RegisterListViewCtrl.SetItemText(i, 1, Temp);
-
- // 16-31
- if (m_CachedRegs[16 + i] != g_dsp.r[16 + i])
- {
- m_CachedRegHasChanged[16 + i] = true;
- }
- else
- {
- m_CachedRegHasChanged[16 + i] = false;
- }
-
- m_CachedRegs[16 + i] = g_dsp.r[16 + i];
-
- sprintf_s(Temp, 256, "0x%04x", g_dsp.r[16 + i]);
- m_RegisterListViewCtrl.SetItemText(i, 3, Temp);
- }
-}
-
-
-int CALLBACK CRegisterDlg::CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
-{
- return(lParam1 > lParam2);
-}
-
-
-LRESULT CRegisterDlg::OnCustomDraw(int /*idCtrl*/, LPNMHDR pnmh, BOOL& _bHandled)
-{
- int result = CDRF_DODEFAULT;
-
- NMLVCUSTOMDRAW* pLVCD = reinterpret_cast(pnmh);
-
- switch (pLVCD->nmcd.dwDrawStage)
- {
- case CDDS_PREPAINT:
- result = CDRF_NOTIFYITEMDRAW;
- break;
-
- case CDDS_ITEMPREPAINT:
- result = CDRF_NOTIFYSUBITEMDRAW;
- break;
-
- case (CDDS_ITEMPREPAINT | CDDS_SUBITEM):
- {
- pLVCD->nmcd.uItemState &= ~(CDIS_SELECTED | CDIS_FOCUS);
-
- int Offset = static_cast(m_RegisterListViewCtrl.GetItemData((int)pLVCD->nmcd.dwItemSpec));
-
- size_t Register = -1;
-
- if (pLVCD->iSubItem == 1)
- {
- Register = Offset;
- }
- else if (pLVCD->iSubItem == 3)
- {
- Register = Offset + 16;
- }
-
- if (Register != -1)
- {
- if (m_CachedRegHasChanged[Register])
- {
- pLVCD->clrTextBk = RGB(0xFF, 192, 192);
- }
- else
- {
- pLVCD->clrTextBk = RGB(0xF0, 0xF0, 0xF0);
- }
- }
- else
- {
- pLVCD->clrTextBk = RGB(192, 224, 192);
- }
-
-
- // uint16 CurrentAddress = static_cast(m_DisAsmListViewCtrl.GetItemData((int)pLVCD->nmcd.dwItemSpec));
- }
- break;
- }
-
- return(result);
-}
diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/RegisterDlg.h b/Source/Plugins/Plugin_DSP_LLE-testing/Src/RegisterDlg.h
deleted file mode 100644
index 7f7a1e4e21..0000000000
--- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/RegisterDlg.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (C) 2003-2008 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/
-
-#pragma once
-
-#include "Globals.h"
-
-#include