2012-11-15 00:39:56 +01:00
|
|
|
#pragma once
|
2013-11-05 19:12:18 +01:00
|
|
|
#include "Emu/CPU/CPUThread.h"
|
|
|
|
|
#include "Emu/CPU/CPUDecoder.h"
|
|
|
|
|
#include "Emu/CPU/CPUDisAsm.h"
|
2012-11-15 00:39:56 +01:00
|
|
|
|
2013-10-06 17:05:58 +02:00
|
|
|
class InterpreterDisAsmFrame : public wxPanel
|
2012-11-15 00:39:56 +01:00
|
|
|
{
|
|
|
|
|
wxListView* m_list;
|
2013-11-05 19:12:18 +01:00
|
|
|
CPUDisAsm* disasm;
|
|
|
|
|
CPUDecoder* decoder;
|
2012-11-15 00:39:56 +01:00
|
|
|
u64 PC;
|
2014-04-10 00:54:32 +02:00
|
|
|
std::vector<u32> remove_markedPC;
|
2012-11-15 00:39:56 +01:00
|
|
|
wxTextCtrl* m_regs;
|
2013-11-23 05:47:19 +01:00
|
|
|
wxTextCtrl* m_calls;
|
2012-11-15 00:39:56 +01:00
|
|
|
wxButton* m_btn_step;
|
|
|
|
|
wxButton* m_btn_run;
|
|
|
|
|
wxButton* m_btn_pause;
|
2013-07-04 16:20:36 +02:00
|
|
|
u32 m_item_count;
|
2013-07-08 15:24:46 +02:00
|
|
|
wxChoice* m_choice_units;
|
2013-06-30 10:46:29 +02:00
|
|
|
|
|
|
|
|
public:
|
2013-11-05 19:12:18 +01:00
|
|
|
CPUThread* CPU;
|
2012-11-15 00:39:56 +01:00
|
|
|
|
|
|
|
|
public:
|
2013-07-08 15:24:46 +02:00
|
|
|
InterpreterDisAsmFrame(wxWindow* parent);
|
2012-11-15 00:39:56 +01:00
|
|
|
~InterpreterDisAsmFrame();
|
|
|
|
|
|
2013-07-08 15:24:46 +02:00
|
|
|
void UpdateUnitList();
|
2013-07-04 16:20:36 +02:00
|
|
|
|
2013-07-08 15:24:46 +02:00
|
|
|
u64 CentrePc(const u64 pc) const;
|
|
|
|
|
void OnSelectUnit(wxCommandEvent& event);
|
2013-06-30 10:46:29 +02:00
|
|
|
void OnKeyDown(wxKeyEvent& event);
|
2013-07-04 16:20:36 +02:00
|
|
|
void OnResize(wxSizeEvent& event);
|
2012-11-15 00:39:56 +01:00
|
|
|
void DoUpdate();
|
|
|
|
|
void ShowAddr(const u64 addr);
|
|
|
|
|
void WriteRegs();
|
2013-11-23 05:47:19 +01:00
|
|
|
void WriteCallStack();
|
2012-11-15 00:39:56 +01:00
|
|
|
|
2013-06-30 10:46:29 +02:00
|
|
|
void HandleCommand(wxCommandEvent& event);
|
2012-11-15 00:39:56 +01:00
|
|
|
void OnUpdate(wxCommandEvent& event);
|
|
|
|
|
void Show_Val(wxCommandEvent& event);
|
|
|
|
|
void Show_PC(wxCommandEvent& event);
|
|
|
|
|
void DoRun(wxCommandEvent& event);
|
|
|
|
|
void DoPause(wxCommandEvent& event);
|
|
|
|
|
void DoStep(wxCommandEvent& event);
|
2013-09-21 02:40:36 +02:00
|
|
|
void InstrKey(wxListEvent& event);
|
2012-11-15 00:39:56 +01:00
|
|
|
void DClick(wxListEvent& event);
|
|
|
|
|
|
|
|
|
|
void MouseWheel(wxMouseEvent& event);
|
|
|
|
|
bool IsBreakPoint(u64 pc);
|
|
|
|
|
void AddBreakPoint(u64 pc);
|
|
|
|
|
bool RemoveBreakPoint(u64 pc);
|
2014-04-10 00:54:32 +02:00
|
|
|
};
|