mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Switch between JIT and Interpreter at runtime using the debug window (pause first!)
Plus assorted cleanup & fixes. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@312 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -341,9 +341,8 @@ void CCodeView::OnPaint(wxPaintEvent& event)
|
||||
dc.DrawRectangle(0, 0, 16, rc.height);
|
||||
dc.DrawRectangle(0, 0, rc.width, 5);
|
||||
// TODO - clean up this freaking mess!!!!!
|
||||
int i;
|
||||
|
||||
for (i = -numRows; i <= numRows; i++)
|
||||
for (int i = -numRows; i <= numRows; i++)
|
||||
{
|
||||
unsigned int address = curAddress + i * align;
|
||||
|
||||
@ -469,7 +468,7 @@ void CCodeView::OnPaint(wxPaintEvent& event)
|
||||
|
||||
dc.SetPen(currentPen);
|
||||
|
||||
for (i = 0; i < numBranches; i++)
|
||||
for (int i = 0; i < numBranches; i++)
|
||||
{
|
||||
int x = 300 + (branches[i].srcAddr % 9) * 8;
|
||||
_MoveTo(x-2, branches[i].src);
|
||||
|
@ -75,6 +75,8 @@ BEGIN_EVENT_TABLE(CCodeWindow, wxFrame)
|
||||
EVT_MENU(IDM_BREAKPOINTWINDOW, CCodeWindow::OnToggleBreakPointWindow)
|
||||
EVT_MENU(IDM_MEMORYWINDOW, CCodeWindow::OnToggleMemoryWindow)
|
||||
|
||||
EVT_MENU(IDM_INTERPRETER, CCodeWindow::OnInterpreter)
|
||||
|
||||
EVT_MENU(IDM_CLEARSYMBOLS, CCodeWindow::OnSymbolsMenu)
|
||||
EVT_MENU(IDM_LOADMAPFILE, CCodeWindow::OnSymbolsMenu)
|
||||
EVT_MENU(IDM_SCANFUNCTIONS, CCodeWindow::OnSymbolsMenu)
|
||||
@ -103,7 +105,6 @@ inline wxBitmap _wxGetBitmapFromMemory(const unsigned char* data, int length)
|
||||
return(wxBitmap(wxImage(is, wxBITMAP_TYPE_ANY, -1), -1));
|
||||
}
|
||||
|
||||
|
||||
CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter, wxWindow* parent, wxWindowID id,
|
||||
const wxString& title, const wxPoint& pos, const wxSize& size, long style)
|
||||
: wxFrame(parent, id, title, pos, size, style)
|
||||
@ -225,12 +226,12 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam
|
||||
{
|
||||
wxMenu* pCoreMenu = new wxMenu;
|
||||
wxMenuItem* interpreter = pCoreMenu->Append(IDM_INTERPRETER, _T("&Interpreter"), wxEmptyString, wxITEM_CHECK);
|
||||
interpreter->Check(!_LocalCoreStartupParameter.bUseDynarec);
|
||||
interpreter->Check(!_LocalCoreStartupParameter.bUseJIT);
|
||||
|
||||
// wxMenuItem* dualcore = pDebugMenu->Append(IDM_DUALCORE, _T("&DualCore"), wxEmptyString, wxITEM_CHECK);
|
||||
// dualcore->Check(_LocalCoreStartupParameter.bUseDualCore);
|
||||
|
||||
pMenuBar->Append(pCoreMenu, _T("&Core Startup"));
|
||||
pMenuBar->Append(pCoreMenu, _T("&CPU Mode"));
|
||||
}
|
||||
|
||||
{
|
||||
@ -289,6 +290,14 @@ bool CCodeWindow::UseDualCore()
|
||||
return(GetMenuBar()->IsChecked(IDM_DUALCORE));
|
||||
}
|
||||
|
||||
void CCodeWindow::OnInterpreter(wxCommandEvent& event)
|
||||
{
|
||||
if (Core::GetState() != Core::CORE_RUN) {
|
||||
PowerPC::SetMode(UseInterpreter() ? PowerPC::MODE_INTERPRETER : PowerPC::MODE_JIT);
|
||||
} else {
|
||||
wxMessageBox(_T("Please pause the emulator before changing mode."));
|
||||
}
|
||||
}
|
||||
|
||||
void CCodeWindow::OnJitMenu(wxCommandEvent& event)
|
||||
{
|
||||
|
@ -144,6 +144,7 @@ class CCodeWindow
|
||||
void OnHostMessage(wxCommandEvent& event);
|
||||
void OnSymbolsMenu(wxCommandEvent& event);
|
||||
void OnJitMenu(wxCommandEvent& event);
|
||||
void OnInterpreter(wxCommandEvent& event);
|
||||
|
||||
void CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParameter);
|
||||
|
||||
|
Reference in New Issue
Block a user