2013-04-18 03:43:35 +00:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-02-10 18:54:46 +00:00
|
|
|
#pragma once
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2008-12-09 05:29:14 +00:00
|
|
|
#include <wx/grid.h>
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
#include "Common.h"
|
|
|
|
|
2009-01-20 19:15:33 +00:00
|
|
|
// New register view:
|
|
|
|
// R0 0x8000000 F0 0.0000 F0_PS1 0.0000
|
|
|
|
// R1 0x8000000 F1 0.0000 F1_PS1 0.0000
|
|
|
|
// R31 0x8000000 F31 0.0000 F31_PS1 0.0000
|
|
|
|
// PC (specials)
|
|
|
|
// LR
|
|
|
|
// CTR
|
2009-06-13 14:10:10 +00:00
|
|
|
// CR0-7
|
|
|
|
// FPSCR
|
2009-10-17 07:17:49 +00:00
|
|
|
// MSR
|
2009-01-20 19:15:33 +00:00
|
|
|
// SRR0
|
|
|
|
// SRR1
|
2009-06-13 14:10:10 +00:00
|
|
|
// Exceptions
|
2009-10-17 07:17:49 +00:00
|
|
|
// Interrupt Mask (PI)
|
|
|
|
// Interrupt Cause(PI)
|
2009-01-20 19:15:33 +00:00
|
|
|
|
2009-01-20 13:13:03 +00:00
|
|
|
class CRegTable : public wxGridTableBase
|
2008-12-09 05:29:14 +00:00
|
|
|
{
|
2009-01-20 19:15:33 +00:00
|
|
|
enum {
|
2009-10-17 07:17:49 +00:00
|
|
|
NUM_SPECIALS = 11,
|
2009-01-20 19:15:33 +00:00
|
|
|
};
|
|
|
|
|
2009-01-20 13:13:03 +00:00
|
|
|
public:
|
2009-01-20 19:15:33 +00:00
|
|
|
CRegTable() {
|
|
|
|
memset(m_CachedRegs, 0, sizeof(m_CachedRegs));
|
|
|
|
memset(m_CachedSpecialRegs, 0, sizeof(m_CachedSpecialRegs));
|
|
|
|
memset(m_CachedFRegs, 0, sizeof(m_CachedFRegs));
|
|
|
|
memset(m_CachedRegHasChanged, 0, sizeof(m_CachedRegHasChanged));
|
|
|
|
memset(m_CachedSpecialRegHasChanged, 0, sizeof(m_CachedSpecialRegHasChanged));
|
|
|
|
memset(m_CachedFRegHasChanged, 0, sizeof(m_CachedFRegHasChanged));
|
|
|
|
}
|
|
|
|
int GetNumberCols(void) {return 5;}
|
|
|
|
int GetNumberRows(void) {return 32 + NUM_SPECIALS;}
|
|
|
|
bool IsEmptyCell(int row, int col) {return row > 31 && col > 2;}
|
|
|
|
wxString GetValue(int row, int col);
|
|
|
|
void SetValue(int row, int col, const wxString &);
|
2009-01-20 13:13:03 +00:00
|
|
|
wxGridCellAttr *GetAttr(int, int, wxGridCellAttr::wxAttrKind);
|
2009-01-20 19:15:33 +00:00
|
|
|
void UpdateCachedRegs();
|
2009-01-20 13:13:03 +00:00
|
|
|
|
|
|
|
private:
|
2009-01-20 19:15:33 +00:00
|
|
|
u32 m_CachedRegs[32];
|
2009-09-08 21:16:05 +00:00
|
|
|
u32 m_CachedSpecialRegs[NUM_SPECIALS];
|
2010-10-19 13:35:25 +00:00
|
|
|
u64 m_CachedFRegs[32][2];
|
2009-01-20 19:15:33 +00:00
|
|
|
bool m_CachedRegHasChanged[32];
|
2009-09-08 21:16:05 +00:00
|
|
|
bool m_CachedSpecialRegHasChanged[NUM_SPECIALS];
|
2009-01-20 19:15:33 +00:00
|
|
|
bool m_CachedFRegHasChanged[32][2];
|
|
|
|
|
|
|
|
DECLARE_NO_COPY_CLASS(CRegTable);
|
2008-12-09 05:29:14 +00:00
|
|
|
};
|
|
|
|
|
2009-01-20 13:13:03 +00:00
|
|
|
class CRegisterView : public wxGrid
|
2008-12-08 04:46:09 +00:00
|
|
|
{
|
2009-01-20 13:13:03 +00:00
|
|
|
public:
|
|
|
|
CRegisterView(wxWindow* parent, wxWindowID id);
|
|
|
|
void Update();
|
2008-12-08 04:46:09 +00:00
|
|
|
};
|