mirror of https://github.com/PCSX2/pcsx2.git
wx: Add a logging dialog box, and a debug menu.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@775 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
d228e92e83
commit
3f6a5d358b
|
@ -5,7 +5,7 @@ bin_PROGRAMS = pcsx2
|
|||
|
||||
# the application source, library search path, and link libraries
|
||||
pcsx2_SOURCES = \
|
||||
frmGameFixes.cpp frmGameFixes.h frmMain.cpp frmMain.h main.cpp \
|
||||
frmGameFixes.cpp frmGameFixes.h frmMain.cpp frmMain.h frmLogging.cpp frmLogging.h main.cpp \
|
||||
memzero.h
|
||||
|
||||
pcsx2_LDFLAGS =
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/* Pcsx2 - Pc Ps2 Emulator
|
||||
* Copyright (C) 2002-2009 Pcsx2 Team
|
||||
*
|
||||
* 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; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* 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 for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "PrecompiledHeader.h"
|
||||
#include "Misc.h"
|
||||
|
@ -24,9 +41,9 @@ wxDialog( parent, id, _T("Game Special Fixes"), pos, size )
|
|||
wxStaticBoxSizer& groupSizer = *new wxStaticBoxSizer( groupbox, wxVERTICAL );
|
||||
wxSizerFlags stdSpacing( wxSizerFlags().Border( wxALL, 6 ) );
|
||||
|
||||
groupSizer.Add( chk_FPUCompareHack, stdSpacing );
|
||||
groupSizer.Add( chk_TriAce, stdSpacing );
|
||||
groupSizer.Add( chk_GodWar, stdSpacing );
|
||||
groupSizer.Add( chk_FPUCompareHack);
|
||||
groupSizer.Add( chk_TriAce);
|
||||
groupSizer.Add( chk_GodWar);
|
||||
|
||||
mainSizer.Add( label_Title, wxSizerFlags().Align(wxALIGN_CENTER).DoubleBorder() );
|
||||
mainSizer.Add( &groupSizer, wxSizerFlags().Align(wxALIGN_CENTER).DoubleHorzBorder() );
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/* Pcsx2 - Pc Ps2 Emulator
|
||||
* Copyright (C) 2002-2009 Pcsx2 Team
|
||||
*
|
||||
* 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; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* 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 for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include <wx/image.h>
|
||||
|
|
|
@ -0,0 +1,88 @@
|
|||
/* Pcsx2 - Pc Ps2 Emulator
|
||||
* Copyright (C) 2002-2009 Pcsx2 Team
|
||||
*
|
||||
* 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; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* 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 for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "PrecompiledHeader.h"
|
||||
#include "Misc.h"
|
||||
#include "frmLogging.h"
|
||||
|
||||
frmLogging::frmLogging(wxWindow* parent, int id, const wxPoint& pos, const wxSize& size, long style):
|
||||
wxDialog( parent, id, _T("Logging"), pos, size )
|
||||
{
|
||||
int i;
|
||||
wxStaticBox* mainbox = new wxStaticBox( this, -1, wxEmptyString);
|
||||
wxBoxSizer *mainsizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxStaticBox* eebox = new wxStaticBox( this, -1, _T("EE Logs"));
|
||||
wxStaticBoxSizer *eeSizer = new wxStaticBoxSizer( eebox, wxVERTICAL );
|
||||
eeSizer->Add(new wxCheckBox(this, EE_CPU_LOG, _T("Cpu Log")), 0, wxEXPAND);
|
||||
eeSizer->Add(new wxCheckBox(this, EE_MEM_LOG, _T("Mem Log")), 0, wxEXPAND);
|
||||
eeSizer->Add(new wxCheckBox(this, EE_HW_LOG, _T("Hw Log")), 0, wxEXPAND);
|
||||
eeSizer->Add(new wxCheckBox(this, EE_DMA_LOG, _T("Dma Log")), 0, wxEXPAND);
|
||||
eeSizer->Add(new wxCheckBox(this, EE_BIOS_LOG, _T("Bios Log")), 0, wxEXPAND);
|
||||
eeSizer->Add(new wxCheckBox(this, EE_ELF_LOG, _T("Elf Log")), 0, wxEXPAND);
|
||||
eeSizer->Add(new wxCheckBox(this, EE_FPU_LOG, _T("Fpu Log")), 0, wxEXPAND);
|
||||
eeSizer->Add(new wxCheckBox(this, EE_MMI_LOG, _T("MMI Log")), 0, wxEXPAND);
|
||||
eeSizer->Add(new wxCheckBox(this, EE_VU0_LOG, _T("VU0 Log")), 0, wxEXPAND);
|
||||
eeSizer->Add(new wxCheckBox(this, EE_COP0_LOG, _T("Cop0 Log")), 0, wxEXPAND);
|
||||
eeSizer->Add(new wxCheckBox(this, EE_VIF_LOG, _T("Vif Log")), 0, wxEXPAND);
|
||||
eeSizer->Add(new wxCheckBox(this, EE_SPR_LOG, _T("SPR Log")), 0, wxEXPAND);
|
||||
eeSizer->Add(new wxCheckBox(this, EE_GIF_LOG, _T("GIF Log")), 0, wxEXPAND);
|
||||
eeSizer->Add(new wxCheckBox(this, EE_SIF_LOG, _T("Sif Log")), 0, wxEXPAND);
|
||||
eeSizer->Add(new wxCheckBox(this, EE_IPU_LOG, _T("IPU Log")), 0, wxEXPAND);
|
||||
eeSizer->Add(new wxCheckBox(this, EE_VU_MACRO_LOG, _T("VU Macro Log")), 0, wxEXPAND);
|
||||
eeSizer->Add(new wxCheckBox(this, EE_RPC_LOG, _T("RPC Log")), 0, wxEXPAND);
|
||||
|
||||
mainsizer->Add(eeSizer, 0, wxEXPAND);
|
||||
|
||||
wxStaticBox* iopbox = new wxStaticBox( this, -1, _T("IOP Logs"));
|
||||
wxStaticBoxSizer *iopSizer = new wxStaticBoxSizer( iopbox, wxVERTICAL );
|
||||
iopSizer->Add(new wxCheckBox(this, IOP_IOP_LOG, _T("IOP Log")), 0, wxEXPAND);
|
||||
iopSizer->Add(new wxCheckBox(this, IOP_MEM_LOG, _T("Mem Log")), 0, wxEXPAND);
|
||||
iopSizer->Add(new wxCheckBox(this, IOP_HW_LOG, _T("Hw Log")), 0, wxEXPAND);
|
||||
iopSizer->Add(new wxCheckBox(this, IOP_BIOS_LOG, _T("Bios Log")), 0, wxEXPAND);
|
||||
iopSizer->Add(new wxCheckBox(this, IOP_DMA_LOG, _T("Dma Log")), 0, wxEXPAND);
|
||||
iopSizer->Add(new wxCheckBox(this, IOP_PAD_LOG, _T("Pad Log")), 0, wxEXPAND);
|
||||
iopSizer->Add(new wxCheckBox(this, IOP_GTE_LOG, _T("Gte Log")), 0, wxEXPAND);
|
||||
iopSizer->Add(new wxCheckBox(this, IOP_CDR_LOG, _T("Cdr Log")), 0, wxEXPAND);
|
||||
iopSizer->Add(new wxCheckBox(this, IOP_GPU_LOG, _T("GPU Log")), 0, wxEXPAND);
|
||||
|
||||
mainsizer->Add(iopSizer, 0, wxEXPAND);
|
||||
|
||||
wxStaticBox* miscbox = new wxStaticBox( this, -1, _T("Misc"));
|
||||
wxStaticBoxSizer *miscSizer = new wxStaticBoxSizer( miscbox, wxVERTICAL );
|
||||
miscSizer->Add(new wxCheckBox(this, STDOUT_LOG, _T("Log to STDOUT")), 0, wxEXPAND);
|
||||
miscSizer->Add(new wxCheckBox(this, SYMS_LOG, _T("SYMs Log")), 0, wxEXPAND);
|
||||
|
||||
mainsizer->Add(miscSizer, 0, wxEXPAND);
|
||||
|
||||
SetSizerAndFit( mainsizer, true );
|
||||
|
||||
// Connect all the checkboxes to one function, and pass the checkbox id as user data.
|
||||
for (i = EE_CPU_LOG; i >= SYMS_LOG; i++)
|
||||
Connect(i, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(frmLogging::LogChecked), i);
|
||||
}
|
||||
|
||||
|
||||
void frmLogging::LogChecked(wxCommandEvent &event)
|
||||
{
|
||||
// The checkbox checked should be in event.m_callbackUserData.
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
/* Pcsx2 - Pc Ps2 Emulator
|
||||
* Copyright (C) 2002-2009 Pcsx2 Team
|
||||
*
|
||||
* 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; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* 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 for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include <wx/image.h>
|
||||
|
||||
#pragma once
|
||||
|
||||
class frmLogging: public wxDialog
|
||||
{
|
||||
public:
|
||||
|
||||
frmLogging(wxWindow* parent, int id, const wxPoint& pos=wxDefaultPosition, const wxSize& size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE);
|
||||
|
||||
protected:
|
||||
|
||||
// DECLARE_EVENT_TABLE();
|
||||
enum {
|
||||
EE_CPU_LOG = 100,
|
||||
EE_MEM_LOG,
|
||||
EE_HW_LOG,
|
||||
EE_DMA_LOG,
|
||||
EE_BIOS_LOG,
|
||||
EE_ELF_LOG,
|
||||
EE_FPU_LOG,
|
||||
EE_MMI_LOG,
|
||||
EE_VU0_LOG,
|
||||
EE_COP0_LOG,
|
||||
EE_VIF_LOG,
|
||||
EE_SPR_LOG,
|
||||
EE_GIF_LOG,
|
||||
EE_SIF_LOG,
|
||||
EE_IPU_LOG,
|
||||
EE_VU_MACRO_LOG,
|
||||
EE_RPC_LOG,
|
||||
|
||||
IOP_IOP_LOG,
|
||||
IOP_MEM_LOG,
|
||||
IOP_HW_LOG,
|
||||
IOP_BIOS_LOG,
|
||||
IOP_DMA_LOG,
|
||||
IOP_PAD_LOG,
|
||||
IOP_GTE_LOG,
|
||||
IOP_CDR_LOG,
|
||||
IOP_GPU_LOG,
|
||||
|
||||
STDOUT_LOG,
|
||||
SYMS_LOG
|
||||
} LogChecks;
|
||||
|
||||
public:
|
||||
void LogChecked(wxCommandEvent &event);
|
||||
};
|
|
@ -1,9 +1,26 @@
|
|||
// -*- C++ -*- generated by wxGlade 0.6.3 on Wed Mar 04 16:53:31 2009
|
||||
/* Pcsx2 - Pc Ps2 Emulator
|
||||
* Copyright (C) 2002-2009 Pcsx2 Team
|
||||
*
|
||||
* 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; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* 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 for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "PrecompiledHeader.h"
|
||||
#include "Misc.h"
|
||||
#include "frmMain.h"
|
||||
#include "frmGameFixes.h"
|
||||
#include "frmLogging.h"
|
||||
|
||||
wxMenu* frmMain::MakeLanguagesMenu() const
|
||||
{
|
||||
|
@ -33,11 +50,11 @@ wxMenu* frmMain::MakeStatesSubMenu( int baseid ) const
|
|||
wxMenu* mnuSubstates = new wxMenu();
|
||||
wxString slot( _T("Slot") );
|
||||
|
||||
mnuSubstates->Append( baseid, _T("Slot"), wxEmptyString, wxITEM_NORMAL );
|
||||
mnuSubstates->Append( baseid+1, _T("Slot"), wxEmptyString, wxITEM_NORMAL );
|
||||
mnuSubstates->Append( baseid+2, _T("Slot"), wxEmptyString, wxITEM_NORMAL );
|
||||
mnuSubstates->Append( baseid+3, _T("Slot"), wxEmptyString, wxITEM_NORMAL );
|
||||
mnuSubstates->Append( baseid+4, _T("Slot"), wxEmptyString, wxITEM_NORMAL );
|
||||
mnuSubstates->Append( baseid, _T("Slot 0"), wxEmptyString, wxITEM_NORMAL );
|
||||
mnuSubstates->Append( baseid+1, _T("Slot 1"), wxEmptyString, wxITEM_NORMAL );
|
||||
mnuSubstates->Append( baseid+2, _T("Slot 2"), wxEmptyString, wxITEM_NORMAL );
|
||||
mnuSubstates->Append( baseid+3, _T("Slot 3"), wxEmptyString, wxITEM_NORMAL );
|
||||
mnuSubstates->Append( baseid+4, _T("Slot 4"), wxEmptyString, wxITEM_NORMAL );
|
||||
return mnuSubstates;
|
||||
}
|
||||
|
||||
|
@ -65,6 +82,31 @@ void frmMain::PopulatePadMenu()
|
|||
m_menuPad.Append( Menu_Pad_Advanced, _T("Advanced..."), wxEmptyString, wxITEM_NORMAL );
|
||||
}
|
||||
|
||||
void frmMain::ConnectMenus()
|
||||
{
|
||||
// This just seems a bit more flexable & intuitive to me, if overly verbose.
|
||||
|
||||
Connect( Menu_QuickBootCD, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::Menu_QuickBootCD_Click));
|
||||
Connect( Menu_FullBootCD, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::Menu_BootCD_Click));
|
||||
Connect( Menu_BootNoCD, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::Menu_BootNoCD_Click));
|
||||
|
||||
Connect( Menu_RunELF, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::Menu_OpenELF_Click));
|
||||
Connect( Menu_Run_Exit, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::Menu_Exit_Click));
|
||||
|
||||
Connect( Menu_SuspendExec, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::Menu_Suspend_Click));
|
||||
Connect( Menu_ResumeExec, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::Menu_Resume_Click));
|
||||
Connect( Menu_Reset, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::Menu_Reset_Click));
|
||||
|
||||
Connect( Menu_State_LoadOther, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::Menu_LoadStateOther_Click));
|
||||
Connect( Menu_State_SaveOther, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::Menu_SaveStateOther_Click));
|
||||
|
||||
Connect( Menu_Config_Gamefixes, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::Menu_Gamefixes_Click));
|
||||
|
||||
Connect( Menu_Debug_Open, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::Menu_Debug_Open_Click));
|
||||
Connect( Menu_Debug_MemoryDump, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::Menu_Debug_MemoryDump_Click));
|
||||
Connect( Menu_Debug_Logging, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::Menu_Debug_Logging_Click));
|
||||
}
|
||||
|
||||
frmMain::frmMain(wxWindow* parent, int id, const wxString& title, const wxPoint& pos, const wxSize& size, long style):
|
||||
wxFrame(parent, id, title, pos, size, wxCAPTION|wxCLOSE_BOX|wxSYSTEM_MENU|wxBORDER_THEME),
|
||||
|
||||
|
@ -79,6 +121,7 @@ frmMain::frmMain(wxWindow* parent, int id, const wxString& title, const wxPoint&
|
|||
m_menuVideo( *new wxMenu() ),
|
||||
m_menuAudio( *new wxMenu() ),
|
||||
m_menuPad( *new wxMenu() ),
|
||||
m_menuDebug( *new wxMenu() ),
|
||||
|
||||
m_LoadStatesSubmenu( *MakeStatesSubMenu( Menu_State_Load01 ) ),
|
||||
m_SaveStatesSubmenu( *MakeStatesSubMenu( Menu_State_Save01 ) )
|
||||
|
@ -141,41 +184,26 @@ frmMain::frmMain(wxWindow* parent, int id, const wxString& title, const wxPoint&
|
|||
m_menuMisc.Append(Menu_About, _T("About..."), wxEmptyString, wxITEM_NORMAL);
|
||||
m_menuMisc.Append(Menu_Website, _T("Pcsx2 Website..."), _T("Opens your web-browser!"), wxITEM_NORMAL);
|
||||
|
||||
|
||||
m_menuDebug.Append(Menu_Debug_Open, _T("Open Debug Window..."), wxEmptyString, wxITEM_NORMAL);
|
||||
m_menuDebug.Append(Menu_Debug_MemoryDump, _T("Memory Dump..."), wxEmptyString, wxITEM_NORMAL);
|
||||
m_menuDebug.Append(Menu_Debug_Logging, _T("Logging..."), wxEmptyString, wxITEM_NORMAL);
|
||||
|
||||
m_menubar.Append( &m_menuRun, _T("Run" ));
|
||||
m_menubar.Append( &m_menuConfig, _T("Config" ));
|
||||
m_menubar.Append( &m_menuVideo, _T("Video" ));
|
||||
m_menubar.Append( &m_menuAudio, _T("Audio" ));
|
||||
m_menubar.Append( &m_menuPad, _T("Pad" ));
|
||||
m_menubar.Append( &m_menuMisc, _T("Misc" ));
|
||||
m_menubar.Append( &m_menuDebug, _T("Debug" ));
|
||||
|
||||
SetMenuBar( &m_menubar );
|
||||
|
||||
ConnectMenus();
|
||||
// The many other fancy portions of our main window!
|
||||
|
||||
set_properties();
|
||||
}
|
||||
|
||||
|
||||
BEGIN_EVENT_TABLE(frmMain, wxFrame)
|
||||
EVT_MENU( Menu_QuickBootCD, Menu_QuickBootCD_Click )
|
||||
EVT_MENU( Menu_FullBootCD, Menu_BootCD_Click )
|
||||
EVT_MENU( Menu_BootNoCD, Menu_BootNoCD_Click )
|
||||
|
||||
EVT_MENU( Menu_RunELF, Menu_OpenELF_Click )
|
||||
EVT_MENU( Menu_Run_Exit, Menu_Exit_Click )
|
||||
|
||||
EVT_MENU( Menu_SuspendExec, Menu_Suspend_Click )
|
||||
EVT_MENU( Menu_ResumeExec, Menu_Resume_Click )
|
||||
EVT_MENU( Menu_Reset, Menu_Reset_Click )
|
||||
|
||||
EVT_MENU( Menu_State_LoadOther, Menu_LoadStateOther_Click )
|
||||
EVT_MENU( Menu_State_SaveOther, Menu_SaveStateOther_Click )
|
||||
|
||||
EVT_MENU( Menu_Config_Gamefixes, Menu_Gamefixes_Click )
|
||||
|
||||
END_EVENT_TABLE();
|
||||
|
||||
|
||||
void frmMain::Menu_QuickBootCD_Click(wxCommandEvent &event)
|
||||
{
|
||||
}
|
||||
|
@ -203,6 +231,7 @@ void frmMain::Menu_SaveStateOther_Click(wxCommandEvent &event)
|
|||
|
||||
void frmMain::Menu_Exit_Click(wxCommandEvent &event)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
void frmMain::Menu_Suspend_Click(wxCommandEvent &event)
|
||||
|
@ -223,16 +252,26 @@ void frmMain::Menu_Gamefixes_Click( wxCommandEvent& event )
|
|||
joe.ShowModal();
|
||||
}
|
||||
|
||||
void frmMain::Menu_Debug_Open_Click(wxCommandEvent &event)
|
||||
{
|
||||
}
|
||||
|
||||
// wxGlade: add frmMain event handlers
|
||||
void frmMain::Menu_Debug_MemoryDump_Click(wxCommandEvent &event)
|
||||
{
|
||||
}
|
||||
|
||||
void frmMain::Menu_Debug_Logging_Click(wxCommandEvent &event)
|
||||
{
|
||||
frmLogging joe( NULL, wxID_ANY );
|
||||
joe.ShowModal();
|
||||
}
|
||||
|
||||
void frmMain::set_properties()
|
||||
{
|
||||
wxSize backsize( m_background.GetSize() );
|
||||
|
||||
SetTitle(_("Pcsx2"));
|
||||
wxIcon _icon( _T("./Cdrom02.png"), wxBITMAP_TYPE_PNG );
|
||||
wxIcon _icon( _T("./cdrom02.png"), wxBITMAP_TYPE_PNG );
|
||||
SetIcon(_icon);
|
||||
SetClientSize( backsize );
|
||||
int m_statusbar_widths[] = { (int)(backsize.GetWidth()*0.73), (int)(backsize.GetWidth()*0.25) };
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
/* Pcsx2 - Pc Ps2 Emulator
|
||||
* Copyright (C) 2002-2009 Pcsx2 Team
|
||||
*
|
||||
* 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; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* 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 for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wx/wx.h>
|
||||
|
@ -96,7 +114,7 @@ protected:
|
|||
void PopulateVideoMenu();
|
||||
void PopulateAudioMenu();
|
||||
void PopulatePadMenu();
|
||||
|
||||
void ConnectMenus();
|
||||
|
||||
private:
|
||||
void set_properties();
|
||||
|
@ -109,6 +127,7 @@ protected:
|
|||
wxMenu& m_menuRun;
|
||||
wxMenu& m_menuConfig;
|
||||
wxMenu& m_menuMisc;
|
||||
wxMenu& m_menuDebug;
|
||||
|
||||
wxMenu& m_menuVideo;
|
||||
wxMenu& m_menuAudio;
|
||||
|
@ -117,8 +136,6 @@ protected:
|
|||
wxMenu& m_LoadStatesSubmenu;
|
||||
wxMenu& m_SaveStatesSubmenu;
|
||||
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Menu Options for the Main Window! :D
|
||||
|
||||
|
@ -137,5 +154,10 @@ public:
|
|||
void Menu_Reset_Click(wxCommandEvent &event);
|
||||
|
||||
void Menu_Gamefixes_Click( wxCommandEvent& event );
|
||||
|
||||
void Menu_Debug_Open_Click(wxCommandEvent &event);
|
||||
void Menu_Debug_MemoryDump_Click(wxCommandEvent &event);
|
||||
void Menu_Debug_Logging_Click(wxCommandEvent &event);
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/* Pcsx2 - Pc Ps2 Emulator
|
||||
* Copyright (C) 2002-2009 Pcsx2 Team
|
||||
*
|
||||
* 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; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* 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 for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "PrecompiledHeader.h"
|
||||
#include <wx/wx.h>
|
||||
|
|
|
@ -0,0 +1,185 @@
|
|||
/* Pcsx2 - Pc Ps2 Emulator
|
||||
* Copyright (C) 2002-2009 Pcsx2 Team
|
||||
*
|
||||
* 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; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* 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 for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef _LNX_MEMZERO_H_
|
||||
#define _LNX_MEMZERO_H_
|
||||
|
||||
// To-do: either create a combined Linux/Windows version of this file, or create somewhere to put Linux/Windows
|
||||
// Specific versions of files.
|
||||
|
||||
// This header contains non-optimized implementation of memzero_ptr and memset8_obj,
|
||||
// memset16_obj, etc.
|
||||
|
||||
template< u32 data, typename T >
|
||||
static __forceinline void memset32_obj( T& obj )
|
||||
{
|
||||
// this function works on 32-bit aligned lengths of data only.
|
||||
// If the data length is not a factor of 32 bits, the C++ optimizing compiler will
|
||||
// probably just generate mysteriously broken code in Release builds. ;)
|
||||
|
||||
jASSUME( (sizeof(T) & 0x3) == 0 );
|
||||
|
||||
u32* dest = (u32*)&obj;
|
||||
for( int i=sizeof(T)>>2; i; --i, ++dest )
|
||||
*dest = data;
|
||||
}
|
||||
|
||||
template< uint size >
|
||||
static __forceinline void memzero_ptr( void* dest )
|
||||
{
|
||||
memset( dest, 0, size );
|
||||
}
|
||||
|
||||
template< typename T >
|
||||
static __forceinline void memzero_obj( T& obj )
|
||||
{
|
||||
memset( &obj, 0, sizeof( T ) );
|
||||
}
|
||||
|
||||
template< u8 data, typename T >
|
||||
static __forceinline void memset8_obj( T& obj )
|
||||
{
|
||||
// Aligned sizes use the optimized 32 bit inline memset. Unaligned sizes use memset.
|
||||
if( (sizeof(T) & 0x3) != 0 )
|
||||
memset( &obj, data, sizeof( T ) );
|
||||
else
|
||||
memset32_obj<data + (data<<8) + (data<<16) + (data<<24)>( obj );
|
||||
}
|
||||
|
||||
template< u16 data, typename T >
|
||||
static __forceinline void memset16_obj( T& obj )
|
||||
{
|
||||
if( (sizeof(T) & 0x3) != 0 )
|
||||
_memset_16_unaligned( &obj, data, sizeof( T ) );
|
||||
else
|
||||
memset32_obj<data + (data<<16)>( obj );
|
||||
}
|
||||
|
||||
|
||||
// An optimized memset for 8 bit destination data.
|
||||
template< u8 data, size_t bytes >
|
||||
static __forceinline void memset_8( void *dest )
|
||||
{
|
||||
if( bytes == 0 ) return;
|
||||
|
||||
if( (bytes & 0x3) != 0 )
|
||||
{
|
||||
// unaligned data length. No point in doing an optimized inline version (too complicated!)
|
||||
// So fall back on the compiler implementation:
|
||||
|
||||
memset( dest, data, bytes );
|
||||
return;
|
||||
}
|
||||
|
||||
// This function only works on 32-bit alignments of data copied.
|
||||
jASSUME( (bytes & 0x3) == 0 );
|
||||
|
||||
enum
|
||||
{
|
||||
remdat = bytes>>2,
|
||||
data32 = data + (data<<8) + (data<<16) + (data<<24)
|
||||
};
|
||||
|
||||
// macro to execute the x86/32 "stosd" copies.
|
||||
switch( remdat )
|
||||
{
|
||||
case 1:
|
||||
*(u32*)dest = data32;
|
||||
return;
|
||||
|
||||
case 2:
|
||||
((u32*)dest)[0] = data32;
|
||||
((u32*)dest)[1] = data32;
|
||||
return;
|
||||
|
||||
case 3:
|
||||
__asm__
|
||||
(
|
||||
".intel_syntax noprefix\n"
|
||||
"cld\n"
|
||||
// "mov edi, %0\n"
|
||||
// "mov eax, %1\n"
|
||||
"stosd\n"
|
||||
"stosd\n"
|
||||
"stosd\n"
|
||||
".att_syntax\n"
|
||||
:
|
||||
: "D"(dest), "a"(data32)
|
||||
// D - edi, a -- eax, c ecx
|
||||
:
|
||||
);
|
||||
return;
|
||||
|
||||
case 4:
|
||||
__asm__
|
||||
(
|
||||
".intel_syntax noprefix\n"
|
||||
"cld\n"
|
||||
// "mov edi, %0\n"
|
||||
// "mov eax, %1\n"
|
||||
"stosd\n"
|
||||
"stosd\n"
|
||||
"stosd\n"
|
||||
"stosd\n"
|
||||
".att_syntax\n"
|
||||
:
|
||||
: "D"(dest), "a"(data32)
|
||||
:
|
||||
|
||||
);
|
||||
return;
|
||||
|
||||
case 5:
|
||||
__asm__
|
||||
(
|
||||
".intel_syntax noprefix\n"
|
||||
"cld\n"
|
||||
// "mov edi, %0\n"
|
||||
// "mov eax, %1\n"
|
||||
"stosd\n"
|
||||
"stosd\n"
|
||||
"stosd\n"
|
||||
"stosd\n"
|
||||
"stosd\n"
|
||||
".att_syntax\n"
|
||||
:
|
||||
: "D"(dest), "a"(data32)
|
||||
:
|
||||
|
||||
);
|
||||
return;
|
||||
|
||||
default:
|
||||
__asm__
|
||||
(
|
||||
".intel_syntax noprefix\n"
|
||||
"cld\n"
|
||||
// "mov ecx, %0\n"
|
||||
// "mov edi, %1\n"
|
||||
// "mov eax, %2\n"
|
||||
"rep stosd\n"
|
||||
".att_syntax\n"
|
||||
:
|
||||
: "c"(remdat), "D"(dest), "a"(data32)
|
||||
:
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue