Improve register view window (now shows fp, various special regs). If the window is too small, delete the RegisterView section in your Debugger.ini.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1963 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2009-01-20 19:15:33 +00:00
parent d3d4cc641c
commit 8cdbaa2714
3 changed files with 116 additions and 26 deletions

View File

@ -22,19 +22,49 @@
#include "Common.h"
// 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
// CR0
// SRR0
// SRR1
class CRegTable : public wxGridTableBase
{
enum {
NUM_SPECIALS = 7,
};
public:
CRegTable() {}
int GetNumberCols(void){return 4;}
int GetNumberRows(void){return 16;}
bool IsEmptyCell(int, int){return false;}
wxString GetValue(int, int);
void SetValue(int, int, const wxString &);
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 &);
wxGridCellAttr *GetAttr(int, int, wxGridCellAttr::wxAttrKind);
void UpdateCachedRegs();
private:
DECLARE_NO_COPY_CLASS(CRegTable);
u32 m_CachedRegs[32];
u32 m_CachedSpecialRegs[6];
double m_CachedFRegs[32][2];
bool m_CachedRegHasChanged[32];
bool m_CachedSpecialRegHasChanged[6];
bool m_CachedFRegHasChanged[32][2];
DECLARE_NO_COPY_CLASS(CRegTable);
};
class CRegisterView : public wxGrid
@ -42,8 +72,6 @@ class CRegisterView : public wxGrid
public:
CRegisterView(wxWindow* parent, wxWindowID id);
void Update();
u32 m_CachedRegs[32];
bool m_CachedRegHasChanged[32];
};
#endif