apply the new wxw method to dsp hle, wiimote, and padsimple.

wiimote config now loads way faster :)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3649 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman
2009-07-02 19:00:27 +00:00
parent 12efada734
commit 99a33ccba9
24 changed files with 618 additions and 689 deletions

View File

@ -42,7 +42,7 @@
// Make the wxTextCtrls scroll with each other
void CDebugger::DoScrollBlocks()
void DSPDebuggerHLE::DoScrollBlocks()
{
// ShowPosition = in letters
// GetScrollPos = number of lines from the top
@ -75,13 +75,13 @@ void CDebugger::DoScrollBlocks()
}*/
}
void CDebugger::ScrollBlocksMouse(wxMouseEvent& event)
void DSPDebuggerHLE::ScrollBlocksMouse(wxMouseEvent& event)
{
DoScrollBlocks();
event.Skip(); // otherwise we remove the regular behavior, for example scrolling
}
void CDebugger::ScrollBlocksCursor(wxScrollWinEvent& event)
void DSPDebuggerHLE::ScrollBlocksCursor(wxScrollWinEvent& event)
{
DoScrollBlocks();
event.Skip(); // otherwise we remove the regular behavior, for example scrolling

View File

@ -42,38 +42,38 @@
// =======================================================================================
// Event table and class
BEGIN_EVENT_TABLE(CDebugger,wxDialog)
EVT_CLOSE(CDebugger::OnClose) // on close event
BEGIN_EVENT_TABLE(DSPDebuggerHLE,wxDialog)
EVT_CLOSE(DSPDebuggerHLE::OnClose) // on close event
EVT_BUTTON(ID_UPD,CDebugger::OnUpdate) // buttons
EVT_BUTTON(ID_UPD,DSPDebuggerHLE::OnUpdate) // buttons
// left cotrols
EVT_CHECKLISTBOX(IDC_CHECKLIST5, CDebugger::OnOptions) // options
EVT_CHECKLISTBOX(IDC_CHECKLIST6, CDebugger::OnShowAll)
EVT_RADIOBOX(IDC_RADIO0,CDebugger::ShowBase) // update frequency
EVT_CHECKLISTBOX(IDC_CHECKLIST5, DSPDebuggerHLE::OnOptions) // options
EVT_CHECKLISTBOX(IDC_CHECKLIST6, DSPDebuggerHLE::OnShowAll)
EVT_RADIOBOX(IDC_RADIO0,DSPDebuggerHLE::ShowBase) // update frequency
// right cotrols
EVT_RADIOBOX(IDC_RADIO0,CDebugger::ShowBase)
EVT_RADIOBOX(IDC_RADIO1,CDebugger::ChangeFrequency) // update frequency
EVT_RADIOBOX(IDC_RADIO2,CDebugger::ChangePreset) // presets
EVT_CHECKLISTBOX(IDC_CHECKLIST1, CDebugger::OnSettingsCheck) // settings
EVT_RADIOBOX(IDC_RADIO0,DSPDebuggerHLE::ShowBase)
EVT_RADIOBOX(IDC_RADIO1,DSPDebuggerHLE::ChangeFrequency) // update frequency
EVT_RADIOBOX(IDC_RADIO2,DSPDebuggerHLE::ChangePreset) // presets
EVT_CHECKLISTBOX(IDC_CHECKLIST1, DSPDebuggerHLE::OnSettingsCheck) // settings
EVT_NOTEBOOK_PAGE_CHANGED(ID_NOTEBOOK, CDebugger::UpdateMail) // mails
EVT_RADIOBOX(IDC_RADIO3,CDebugger::ChangeMail)
EVT_CHECKLISTBOX(IDC_CHECKLIST2, CDebugger::OnGameChange) // gc
EVT_CHECKLISTBOX(IDC_CHECKLIST3, CDebugger::OnGameChange) // wii
EVT_CHECKLISTBOX(IDC_CHECKLIST4, CDebugger::MailSettings) // settings
EVT_NOTEBOOK_PAGE_CHANGED(ID_NOTEBOOK, DSPDebuggerHLE::UpdateMail) // mails
EVT_RADIOBOX(IDC_RADIO3,DSPDebuggerHLE::ChangeMail)
EVT_CHECKLISTBOX(IDC_CHECKLIST2, DSPDebuggerHLE::OnGameChange) // gc
EVT_CHECKLISTBOX(IDC_CHECKLIST3, DSPDebuggerHLE::OnGameChange) // wii
EVT_CHECKLISTBOX(IDC_CHECKLIST4, DSPDebuggerHLE::MailSettings) // settings
//EVT_RIGHT_DOWN(CDebugger::ScrollBlocks)
//EVT_LEFT_DOWN(CDebugger::ScrollBlocks)
//EVT_MOUSE_EVENTS(CDebugger::ScrollBlocks)
//EVT_MOTION(CDebugger::ScrollBlocks)
//EVT_RIGHT_DOWN(DSPDebuggerHLE::ScrollBlocks)
//EVT_LEFT_DOWN(DSPDebuggerHLE::ScrollBlocks)
//EVT_MOUSE_EVENTS(DSPDebuggerHLE::ScrollBlocks)
//EVT_MOTION(DSPDebuggerHLE::ScrollBlocks)
//EVT_SCROLL(CDebugger::ScrollBlocks)
//EVT_SCROLLWIN(CDebugger::ScrollBlocks)
//EVT_SCROLL(DSPDebuggerHLE::ScrollBlocks)
//EVT_SCROLLWIN(DSPDebuggerHLE::ScrollBlocks)
END_EVENT_TABLE()
CDebugger::CDebugger(wxWindow *parent, wxWindowID id, const wxString &title,
DSPDebuggerHLE::DSPDebuggerHLE(wxWindow *parent, wxWindowID id, const wxString &title,
const wxPoint &position, const wxSize& size, long style)
: wxDialog(parent, id, title, position, size, style)
, m_GPRListView(NULL)
@ -131,16 +131,16 @@ CDebugger::CDebugger(wxWindow *parent, wxWindowID id, const wxString &title,
//m_bl95, m_PageBlock, sBlock
m_bl95->Connect(wxID_ANY, wxEVT_SCROLLWIN_THUMBTRACK,
wxScrollWinEventHandler(CDebugger::ScrollBlocksCursor), (wxObject*)NULL, this);
wxScrollWinEventHandler(DSPDebuggerHLE::ScrollBlocksCursor), (wxObject*)NULL, this);
m_bl95->Connect(wxID_ANY, wxEVT_SCROLLWIN_THUMBRELEASE,
wxScrollWinEventHandler(CDebugger::ScrollBlocksCursor), (wxObject*)NULL, this);
wxScrollWinEventHandler(DSPDebuggerHLE::ScrollBlocksCursor), (wxObject*)NULL, this);
m_bl95->Connect(wxID_ANY, wxEVT_MOTION,
wxMouseEventHandler(CDebugger::ScrollBlocksMouse), (wxObject*)NULL, this);
wxMouseEventHandler(DSPDebuggerHLE::ScrollBlocksMouse), (wxObject*)NULL, this);
m_bl95->Connect(wxID_ANY, wxEVT_MOUSEWHEEL,
wxMouseEventHandler(CDebugger::ScrollBlocksMouse), (wxObject*)NULL, this);
wxMouseEventHandler(DSPDebuggerHLE::ScrollBlocksMouse), (wxObject*)NULL, this);
}
CDebugger::~CDebugger()
DSPDebuggerHLE::~DSPDebuggerHLE()
{
// empty
IniFile file;
@ -154,7 +154,7 @@ CDebugger::~CDebugger()
// ========================================================================
// System functions
// --------------
void CDebugger::OnClose(wxCloseEvent& /*event*/)
void DSPDebuggerHLE::OnClose(wxCloseEvent& /*event*/)
{
// Save the window position when we hide the window to
IniFile file;
@ -165,18 +165,7 @@ void CDebugger::OnClose(wxCloseEvent& /*event*/)
EndModal(0);
}
void CDebugger::DoHide()
{
Hide();
}
void CDebugger::DoShow()
{
Show();
DoShowConsole(); // The console goes with the wx window
}
void CDebugger::OnUpdate(wxCommandEvent& /*event*/)
void DSPDebuggerHLE::OnUpdate(wxCommandEvent& /*event*/)
{
this->NotifyUpdate();
}
@ -186,19 +175,18 @@ void CDebugger::OnUpdate(wxCommandEvent& /*event*/)
// ==========================================================================
// Save and load settings
// --------------
void CDebugger::Save(IniFile& _IniFile) const
void DSPDebuggerHLE::Save(IniFile& _IniFile) const
{
// TODO2: get the screen resolution and make limits from that
if(GetPosition().x < 1000 && GetPosition().y < 1000
&& GetSize().GetWidth() < 1000 && GetSize().GetHeight() < 1000
)
&& GetSize().GetWidth() < 1000 && GetSize().GetHeight() < 1000)
{
_IniFile.Set("SoundWindow", "x", GetPosition().x);
_IniFile.Set("SoundWindow", "y", GetPosition().y);
_IniFile.Set("SoundWindow", "w", GetSize().GetWidth());
_IniFile.Set("SoundWindow", "h", GetSize().GetHeight());
}
_IniFile.Set("SoundWindow", "Console", m_options->IsChecked(3)); // save settings
// save settings
_IniFile.Set("SoundWindow", "UpdateFrequency", m_RadioBox[1]->GetSelection());
_IniFile.Set("SoundWindow", "ScanMails", m_gcwiiset->IsChecked(0));
_IniFile.Set("SoundWindow", "StoreMails", m_gcwiiset->IsChecked(1));
@ -206,7 +194,7 @@ void CDebugger::Save(IniFile& _IniFile) const
}
void CDebugger::Load(IniFile& _IniFile)
void DSPDebuggerHLE::Load(IniFile& _IniFile)
{
int x,y,w,h;
_IniFile.Get("SoundWindow", "x", &x, GetPosition().x);
@ -215,12 +203,6 @@ void CDebugger::Load(IniFile& _IniFile)
_IniFile.Get("SoundWindow", "h", &h, GetSize().GetHeight());
SetSize(x, y, w, h);
// Show console or not
bool Console;
_IniFile.Get("SoundWindow", "Console", &Console, m_options->IsChecked(3));
m_options->Check(3, Console);
DoShowConsole();
// Show number base
_IniFile.Get("SoundWindow", "ShowBase", &bShowBase, !m_RadioBox[0]->GetSelection());
m_RadioBox[0]->SetSelection(!bShowBase);
@ -241,7 +223,7 @@ void CDebugger::Load(IniFile& _IniFile)
//////////////////////////////////////////////////////////////////////////////////////////
// Create GUI controls
// -------------
void CDebugger::CreateGUIControls()
void DSPDebuggerHLE::CreateGUIControls()
{
SetTitle(wxT("Sound Debugging"));
@ -350,12 +332,10 @@ SetTitle(wxT("Sound Debugging"));
m_options->Append(wxT("Save to file"));
m_options->Append(wxT("Only looping"));
m_options->Append(wxT("Show all"));
m_options->Append(wxT("Show console"));
m_options->Check(0, gSaveFile);
m_options->Check(1, gOnlyLooping);
m_options->Check(2, gShowAll);
m_options->Check(3, gSaveFile);
m_options->SetMinSize(wxSize(m_options->GetSize().GetWidth() - 40,
m_options->GetCount() * 15));
@ -563,7 +543,7 @@ SetTitle(wxT("Sound Debugging"));
// =======================================================================================
// Settings
void CDebugger::OnSettingsCheck(wxCommandEvent& event)
void DSPDebuggerHLE::OnSettingsCheck(wxCommandEvent& event)
{
gSSBM = m_settings->IsChecked(0);
gSSBMremedy1 = m_settings->IsChecked(1);
@ -576,12 +556,12 @@ void CDebugger::OnSettingsCheck(wxCommandEvent& event)
// =======================================================================================
// Change preset
void CDebugger::ChangePreset(wxCommandEvent& event)
void DSPDebuggerHLE::ChangePreset(wxCommandEvent& event)
{
DoChangePreset();
}
void CDebugger::DoChangePreset()
void DSPDebuggerHLE::DoChangePreset()
{
if(m_RadioBox[2]->GetSelection() == 0)
gPreset = 0;
@ -595,7 +575,7 @@ void CDebugger::DoChangePreset()
// =======================================================================================
// Show base
void CDebugger::ShowBase(wxCommandEvent& event)
void DSPDebuggerHLE::ShowBase(wxCommandEvent& event)
{
if(m_RadioBox[0]->GetSelection() == 0)
bShowBase = true;
@ -605,12 +585,12 @@ void CDebugger::ShowBase(wxCommandEvent& event)
// =======================================================================================
// Change update frequency
void CDebugger::ChangeFrequency(wxCommandEvent& event)
void DSPDebuggerHLE::ChangeFrequency(wxCommandEvent& event)
{
DoChangeFrequency();
}
void CDebugger::DoChangeFrequency()
void DSPDebuggerHLE::DoChangeFrequency()
{
if(m_RadioBox[1]->GetSelection() == 0)
gUpdFreq = 0;
@ -624,17 +604,14 @@ void CDebugger::DoChangeFrequency()
// =======================================================================================
// Options
void CDebugger::OnOptions(wxCommandEvent& event)
void DSPDebuggerHLE::OnOptions(wxCommandEvent& event)
{
gSaveFile = m_options->IsChecked(0);
gOnlyLooping = m_options->IsChecked(1);
gShowAll = m_options->IsChecked(2);
gSaveFile = m_options->IsChecked(3);
if(event.GetInt() == 3) DoShowConsole();
}
void CDebugger::OnShowAll(wxCommandEvent& event)
void DSPDebuggerHLE::OnShowAll(wxCommandEvent& event)
{
/// Only allow one selection at a time
for (u32 i = 0; i < m_opt_showall->GetCount(); ++i)
@ -647,24 +624,7 @@ void CDebugger::OnShowAll(wxCommandEvent& event)
else giShowAll = -1;
}
// --------------
// =======================================================================================
// Show or hide console window
void CDebugger::ShowHideConsole(wxCommandEvent& event)
{
DoShowConsole();
}
void CDebugger::DoShowConsole()
{
ConsoleListener* console = LogManager::GetInstance()->getConsoleListener();
if(m_options->IsChecked(3) && !console->IsOpen())
console->Open();
}
void CDebugger::NotifyUpdate()
void DSPDebuggerHLE::NotifyUpdate()
{
if (m_GPRListView != NULL)
{

View File

@ -19,8 +19,8 @@
//
//////////////////////////////////////////////////////////////////////////////////////////
#ifndef __CDebugger_h__
#define __CDebugger_h__
#ifndef __DSPDebuggerHLE_h__
#define __DSPDebuggerHLE_h__
// general things
#include <iostream>
@ -51,42 +51,41 @@
class CPBView;
class IniFile;
// Window settings
#undef CDebugger_STYLE
#define CDebugger_STYLE wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN | wxNO_FULL_REPAINT_ON_RESIZE
class CDebugger : public wxDialog
class DSPDebuggerHLE : public wxDialog
{
private:
DECLARE_EVENT_TABLE();
public:
CDebugger(wxWindow *parent, wxWindowID id = 1, const wxString &title = _("Sound Debugger"),
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
long style = CDebugger_STYLE);
DSPDebuggerHLE(wxWindow *parent,
wxWindowID id = 1,
const wxString &title = wxT("Sound Debugger"),
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE);
virtual ~CDebugger();
virtual ~DSPDebuggerHLE();
void Save(IniFile& _IniFile) const;
void Load(IniFile& _IniFile);
void DoHide(); void DoShow();
void NotifyUpdate();
void OnUpdate(wxCommandEvent& event);
void ShowHideConsole(wxCommandEvent& event); // options
// options
void ShowBase(wxCommandEvent& event);
void DoShowConsole();
//void OnlyLooping(wxCommandEvent& event);
void OnOptions(wxCommandEvent& event);
void OnShowAll(wxCommandEvent& event);
void ChangeFrequency(wxCommandEvent& event); // update frequency
// update frequency
void ChangeFrequency(wxCommandEvent& event);
void DoChangeFrequency();
void ChangePreset(wxCommandEvent& event);
void DoChangePreset();
void OnSettingsCheck(wxCommandEvent& event); // settings
// settings
void OnSettingsCheck(wxCommandEvent& event);
// ============== Mail
void DoUpdateMail();
@ -161,8 +160,6 @@ class CDebugger : public wxDialog
ID_NOTEBOOK, ID_PAGEMAIN, ID_PAGEMAIL, ID_PAGEBLOCK, // notebook
ID_LOG, ID_LOG1, // mails
ID_BL0, ID_BL95, ID_BL94, ID_BL93, ID_BL92,
ID_DUMMY_VALUE_ //don't remove this value unless you have other enum values
};
void OnClose(wxCloseEvent& event);

View File

@ -27,7 +27,7 @@
#if defined(HAVE_WX) && HAVE_WX
#include "../Debugger/Debugger.h"
extern CDebugger* m_frame;
extern DSPDebuggerHLE* m_DebuggerFrame;
#endif
#include "../Debugger/File.h"
@ -88,7 +88,7 @@ int PrintFile(int a, char *fmt, ...)
{
#if defined(DEBUG_HLE) && defined(_WIN32)
if(m_frame->gSaveFile)
if(m_DebuggerFrame->gSaveFile)
{
char s[StringSize];
va_list argptr;

View File

@ -51,7 +51,7 @@
// -------------
// Externals
extern CDebugger* m_frame;
extern DSPDebuggerHLE* m_DebuggerFrame;
//int PBSize = 128;
// Parameter blocks
@ -148,7 +148,7 @@ std::vector<int> numberRunning(NUMBER_OF_PBS);
// Classes
extern CDebugger* m_frame;
extern DSPDebuggerHLE* m_DebuggerFrame;
//////////////////////////
@ -160,7 +160,7 @@ std::string writeTitle(int a, bool Wii)
std::string b;
if(a == 0)
{
if(m_frame->bShowBase) // show base 10
if(m_DebuggerFrame->bShowBase) // show base 10
{
b = " adpcm adpcm_loop\n";
b = b + " Nr m pos / end lpos | voll volr | isl iss | pre yn1 yn2 pre yn1 yn2 | frac ratio[hi lo]\n";
@ -173,7 +173,7 @@ std::string writeTitle(int a, bool Wii)
}
else if(a == 1)
{
if(m_frame->bShowBase) // show base 10
if(m_DebuggerFrame->bShowBase) // show base 10
{
b = " Nr pos / end lpos | voll volr | src form coef | 1 2 3 4 5 addr value\n";
}
@ -184,7 +184,7 @@ std::string writeTitle(int a, bool Wii)
}
else if(a == 2)
{
if(m_frame->bShowBase) // show base 10
if(m_DebuggerFrame->bShowBase) // show base 10
{
b = " Nr pos / end lpos | voll volr | isl iss | e-l e-s\n";
}
@ -195,7 +195,7 @@ std::string writeTitle(int a, bool Wii)
}
else if(a == 3)
{
if(m_frame->bShowBase) // show base 10
if(m_DebuggerFrame->bShowBase) // show base 10
{
if(Wii)
b = " Nr voll volr dl dr curv delt mixc r | v1 v2 v3 v4 v5 v6 v7 | d1 d2 d3 d4 d5 d6 d7\n";
@ -244,7 +244,7 @@ std::string writeMessage(int a, int i, bool Wii)
*/
if(a == 0)
{
if(m_frame->bShowBase) // base 10 (decimal)
if(m_DebuggerFrame->bShowBase) // base 10 (decimal)
{
if(Wii) // Wii
{
@ -280,7 +280,7 @@ std::string writeMessage(int a, int i, bool Wii)
}
else if(a == 1)
{
if(m_frame->bShowBase) // base 10 (decimal)
if(m_DebuggerFrame->bShowBase) // base 10 (decimal)
{
sprintf(buf,"%c%02i %10s/%10s %10s | %6s %6s | %u %u %u | %u %u %u %u %u %08x %08x %08x %08x %08x %08x",
223, i, ThS(gsamplePos[i]).c_str(), ThS(gsampleEnd[i]).c_str(), ThS(gloopPos[i]).c_str(),
@ -316,7 +316,7 @@ std::string writeMessage(int a, int i, bool Wii)
}
else if(a == 2)
{
if(m_frame->bShowBase)
if(m_DebuggerFrame->bShowBase)
{
sprintf(buf,"%c%02i %10s/%10s %10s | %05i %05i | %i %i | %10s %10s",
223, i, ThS(gsamplePos[i]).c_str(), ThS(gsampleEnd[i]).c_str(), ThS(gloopPos[i]).c_str(),
@ -342,7 +342,7 @@ std::string writeMessage(int a, int i, bool Wii)
*/
else if(a == 3)
{
if(m_frame->bShowBase)
if(m_DebuggerFrame->bShowBase)
{
if(Wii) // Wii
{
@ -532,23 +532,23 @@ bool PrepareConditions(bool Wii, int i, ParamBlockType &PBs)
{
bool Conditions;
if (m_frame->gOnlyLooping) // show only looping blocks
if (m_DebuggerFrame->gOnlyLooping) // show only looping blocks
{
Conditions = PBs[i].audio_addr.looping ? true : false;
}
else if (m_frame->gShowAll) // show all blocks
else if (m_DebuggerFrame->gShowAll) // show all blocks
{
Conditions = true;
}
else if (m_frame->giShowAll > -1) // show all blocks
else if (m_DebuggerFrame->giShowAll > -1) // show all blocks
{
if (m_frame->giShowAll == 0)
if (m_DebuggerFrame->giShowAll == 0)
Conditions = (i < 31);
else if(m_frame->giShowAll == 1)
else if(m_DebuggerFrame->giShowAll == 1)
Conditions = (i > 30 && i < 61);
else if(m_frame->giShowAll == 2)
else if(m_DebuggerFrame->giShowAll == 2)
Conditions = (i > 60 && i < 91);
else if(m_frame->giShowAll == 3)
else if(m_DebuggerFrame->giShowAll == 3)
Conditions = (i > 90 && i < 121);
}
else // show only the ones that have recently been running
@ -640,7 +640,7 @@ void Logging_(short* _pBuffer, int _iSize, int a, bool Wii, ParamBlockType &PBs,
// Control how often the screen is updated, and then update the screen
// --------------
if(a == 0) count1++; // a == 0 when Logging is called before the blocks are updated
if (m_frame->gUpdFreq > 0 && count1 > (200/m_frame->gUpdFreq))
if (m_DebuggerFrame->gUpdFreq > 0 && count1 > (200/m_DebuggerFrame->gUpdFreq))
{
// =======================================================================================
@ -712,7 +712,7 @@ void Logging_(short* _pBuffer, int _iSize, int a, bool Wii, ParamBlockType &PBs,
// --------------
char buffer [1000] = "";
std::string sbuff;
sbuff = writeTitle(m_frame->gPreset, Wii);
sbuff = writeTitle(m_DebuggerFrame->gPreset, Wii);
// ==============
@ -733,7 +733,7 @@ void Logging_(short* _pBuffer, int _iSize, int a, bool Wii, ParamBlockType &PBs,
// --------------------------------------
// Save playback history text string for the console and GUI debugger
// ------------------
if(m_frame)
if(m_DebuggerFrame)
{
std::string guipr; // gui progress
@ -750,7 +750,7 @@ void Logging_(short* _pBuffer, int _iSize, int a, bool Wii, ParamBlockType &PBs,
}
u32 run = atoi( guipr.c_str());
m_frame->m_GPRListView->m_CachedRegs[1][i] = run;
m_DebuggerFrame->m_GPRListView->m_CachedRegs[1][i] = run;
guipr.clear();
}
@ -771,41 +771,41 @@ void Logging_(short* _pBuffer, int _iSize, int a, bool Wii, ParamBlockType &PBs,
// Hopefully this is false if we don't have a debugging window and so it doesn't cause a crash
if(m_frame)
if(m_DebuggerFrame)
{
m_frame->m_GPRListView->m_CachedRegs[2][i] = gsamplePos[i];
m_frame->m_GPRListView->m_CachedRegs[3][i] = gsampleEnd[i];
m_frame->m_GPRListView->m_CachedRegs[4][i] = gloopPos[i];
m_DebuggerFrame->m_GPRListView->m_CachedRegs[2][i] = gsamplePos[i];
m_DebuggerFrame->m_GPRListView->m_CachedRegs[3][i] = gsampleEnd[i];
m_DebuggerFrame->m_GPRListView->m_CachedRegs[4][i] = gloopPos[i];
m_frame->m_GPRListView->m_CachedRegs[5][i] = gvolume_left[i];
m_frame->m_GPRListView->m_CachedRegs[6][i] = gvolume_right[i];
m_DebuggerFrame->m_GPRListView->m_CachedRegs[5][i] = gvolume_left[i];
m_DebuggerFrame->m_GPRListView->m_CachedRegs[6][i] = gvolume_right[i];
m_frame->m_GPRListView->m_CachedRegs[7][i] = glooping[i];
m_frame->m_GPRListView->m_CachedRegs[8][i] = gloop1[i];
m_frame->m_GPRListView->m_CachedRegs[9][i] = gloop2[i];
m_frame->m_GPRListView->m_CachedRegs[10][i] = gloop3[i];
m_DebuggerFrame->m_GPRListView->m_CachedRegs[7][i] = glooping[i];
m_DebuggerFrame->m_GPRListView->m_CachedRegs[8][i] = gloop1[i];
m_DebuggerFrame->m_GPRListView->m_CachedRegs[9][i] = gloop2[i];
m_DebuggerFrame->m_GPRListView->m_CachedRegs[10][i] = gloop3[i];
m_frame->m_GPRListView->m_CachedRegs[11][i] = gis_stream[i];
m_DebuggerFrame->m_GPRListView->m_CachedRegs[11][i] = gis_stream[i];
m_frame->m_GPRListView->m_CachedRegs[12][i] = gaudioFormat[i];
m_frame->m_GPRListView->m_CachedRegs[13][i] = gsrc_type[i];
m_frame->m_GPRListView->m_CachedRegs[14][i] = gcoef[i];
m_DebuggerFrame->m_GPRListView->m_CachedRegs[12][i] = gaudioFormat[i];
m_DebuggerFrame->m_GPRListView->m_CachedRegs[13][i] = gsrc_type[i];
m_DebuggerFrame->m_GPRListView->m_CachedRegs[14][i] = gcoef[i];
m_frame->m_GPRListView->m_CachedRegs[15][i] = gfrac[i];
m_DebuggerFrame->m_GPRListView->m_CachedRegs[15][i] = gfrac[i];
m_frame->m_GPRListView->m_CachedRegs[16][i] = gratio[i];
m_frame->m_GPRListView->m_CachedRegs[17][i] = gratiohi[i];
m_frame->m_GPRListView->m_CachedRegs[18][i] = gratiolo[i];
m_DebuggerFrame->m_GPRListView->m_CachedRegs[16][i] = gratio[i];
m_DebuggerFrame->m_GPRListView->m_CachedRegs[17][i] = gratiohi[i];
m_DebuggerFrame->m_GPRListView->m_CachedRegs[18][i] = gratiolo[i];
m_frame->m_GPRListView->m_CachedRegs[19][i] = gupdates1[i];
m_frame->m_GPRListView->m_CachedRegs[20][i] = gupdates2[i];
m_frame->m_GPRListView->m_CachedRegs[21][i] = gupdates3[i];
m_frame->m_GPRListView->m_CachedRegs[22][i] = gupdates4[i];
m_frame->m_GPRListView->m_CachedRegs[23][i] = gupdates5[i];
m_DebuggerFrame->m_GPRListView->m_CachedRegs[19][i] = gupdates1[i];
m_DebuggerFrame->m_GPRListView->m_CachedRegs[20][i] = gupdates2[i];
m_DebuggerFrame->m_GPRListView->m_CachedRegs[21][i] = gupdates3[i];
m_DebuggerFrame->m_GPRListView->m_CachedRegs[22][i] = gupdates4[i];
m_DebuggerFrame->m_GPRListView->m_CachedRegs[23][i] = gupdates5[i];
}
// add new line
sbuff = sbuff + writeMessage(m_frame->gPreset, i, Wii); strcpy(buffer, "");
sbuff = sbuff + writeMessage(m_DebuggerFrame->gPreset, i, Wii); strcpy(buffer, "");
sbuff = sbuff + "\n";
} // end of if(Conditions)
@ -818,13 +818,13 @@ void Logging_(short* _pBuffer, int _iSize, int a, bool Wii, ParamBlockType &PBs,
// Write global values
// ---------------
int nOfBlocks;
int span = m_frame->gLastBlock - m_addressPBs;
int span = m_DebuggerFrame->gLastBlock - m_addressPBs;
if(Wii)
nOfBlocks = (m_frame->gLastBlock-m_addressPBs) / 256;
nOfBlocks = (m_DebuggerFrame->gLastBlock-m_addressPBs) / 256;
else
nOfBlocks = (m_frame->gLastBlock-m_addressPBs) / 192;
nOfBlocks = (m_DebuggerFrame->gLastBlock-m_addressPBs) / 192;
sprintf(buffer, "\nThe parameter blocks span from %08x to %08x (%s bytes) impl. %i blocks | numberOfPBs %i | _iSize %i\n",
m_addressPBs, m_frame->gLastBlock, ThS(span).c_str(), nOfBlocks, numberOfPBs, _iSize);
m_addressPBs, m_DebuggerFrame->gLastBlock, ThS(span).c_str(), nOfBlocks, numberOfPBs, _iSize);
sbuff = sbuff + buffer; strcpy(buffer, "");
// ===============
@ -834,7 +834,7 @@ void Logging_(short* _pBuffer, int _iSize, int a, bool Wii, ParamBlockType &PBs,
// ---------------
sprintf(buffer, "\nSettings: SSBM fix %i | SSBM rem1 %i | SSBM rem2 %i\nSequenced %i | Volume %i | Reset %i | Only looping %i | Save file %i\n",
gSSBM, gSSBMremedy1, gSSBMremedy2, gSequenced,
gVolume, gReset, m_frame->gOnlyLooping, m_frame->gSaveFile);
gVolume, gReset, m_DebuggerFrame->gOnlyLooping, m_DebuggerFrame->gSaveFile);
sbuff = sbuff + buffer; strcpy(buffer, "");
// ===============
@ -895,9 +895,9 @@ void Logging_(short* _pBuffer, int _iSize, int a, bool Wii, ParamBlockType &PBs,
// New values are written so update - DISABLED - It flickered a lot, even worse than a
// console window. So for now only the console windows is updated.
/*
if(m_frame)
if(m_DebuggerFrame)
{
m_frame->NotifyUpdate();
m_DebuggerFrame->NotifyUpdate();
}
*/
@ -914,7 +914,7 @@ void CUCode_AX::Logging(short* _pBuffer, int _iSize, int a, bool Wii)
{
/* Doing all this may have a noticable CPU effect, so we can disable it completely
this way. But remember that "Save to file" will not write anything then either. */
if (m_frame->gUpdFreq > 0)
if (m_DebuggerFrame->gUpdFreq > 0)
{
int version; // AX version
int numberOfPBs;

View File

@ -46,14 +46,14 @@
// Declarations and definitions
// -------------
extern std::vector<std::string> sMailLog, sMailTime;
extern CDebugger* m_frame;
extern DSPDebuggerHLE* m_DebuggerFrame;
///////////////////////////////
// =======================================================================================
// Update mail window
// --------------
void CDebugger::DoUpdateMail()
void DSPDebuggerHLE::DoUpdateMail()
{
//Console::Print("i %i %i\n", sFullMail.size(), sMailLog.size());
@ -68,17 +68,17 @@ void CDebugger::DoUpdateMail()
}
void CDebugger::UpdateMail(wxNotebookEvent& event)
void DSPDebuggerHLE::UpdateMail(wxNotebookEvent& event)
{
DoUpdateMail();
/* This may be called before m_frame is fully created through the
/* This may be called before m_DebuggerFrame is fully created through the
EVT_NOTEBOOK_PAGE_CHANGED, in that case it will crash because this
is accessing members of it */
if(StoreMails && m_frame) ReadDir();
if(StoreMails && m_DebuggerFrame) ReadDir();
}
// Change mail from radio button change
void CDebugger::ChangeMail(wxCommandEvent& event)
void DSPDebuggerHLE::ChangeMail(wxCommandEvent& event)
{
//Console::Print("abc");
DoUpdateMail();
@ -91,7 +91,7 @@ void CDebugger::ChangeMail(wxCommandEvent& event)
// =======================================================================================
// Read out mails from dir
// --------------
void CDebugger::ReadDir()
void DSPDebuggerHLE::ReadDir()
{
CFileSearch::XStringVector Directories;
//Directories.push_back("Logs/Mail");
@ -157,7 +157,7 @@ void CDebugger::ReadDir()
// =======================================================================================
// Check for duplicates and count files from all_all_files
// --------------
bool CDebugger::NoDuplicate(std::string FileName)
bool DSPDebuggerHLE::NoDuplicate(std::string FileName)
{
for (u32 i = 0; i < all_files.size(); i++)
{
@ -168,7 +168,7 @@ bool CDebugger::NoDuplicate(std::string FileName)
}
// Count the number of files for each game
u32 CDebugger::CountFiles(std::string FileName)
u32 DSPDebuggerHLE::CountFiles(std::string FileName)
{
int match = 0;
@ -187,7 +187,7 @@ u32 CDebugger::CountFiles(std::string FileName)
// =======================================================================================
// Read file from harddrive
// --------------
std::string CDebugger::Readfile_(std::string FileName)
std::string DSPDebuggerHLE::Readfile_(std::string FileName)
{
char c; // declare a char variable
FILE *file; // declare a FILE pointer
@ -220,7 +220,7 @@ std::string CDebugger::Readfile_(std::string FileName)
}
// Read file
void CDebugger::Readfile(std::string FileName, bool GC)
void DSPDebuggerHLE::Readfile(std::string FileName, bool GC)
{
u32 n = CountFiles(FileName); // count how many mails we have
u32 curr_n = 0;
@ -264,7 +264,7 @@ void CDebugger::Readfile(std::string FileName, bool GC)
// =======================================================================================
// Read the file to the text window
// ---------------
void CDebugger::OnGameChange(wxCommandEvent& event)
void DSPDebuggerHLE::OnGameChange(wxCommandEvent& event)
{
if(event.GetId() == 2006)
{
@ -286,7 +286,7 @@ void CDebugger::OnGameChange(wxCommandEvent& event)
}
// Settings
void CDebugger::MailSettings(wxCommandEvent& event)
void DSPDebuggerHLE::MailSettings(wxCommandEvent& event)
{
//for (int i = 0; i < all_all_files.size(); ++i)
//Console::Print("s: %s \n", all_all_files.at(i).c_str());