2013-04-18 03:43:35 +00:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2009-04-02 12:50:47 +00:00
|
|
|
|
2014-02-10 18:54:46 +00:00
|
|
|
#pragma once
|
2009-04-02 12:50:47 +00:00
|
|
|
|
2014-02-22 22:36:30 +00:00
|
|
|
#include <cstring>
|
|
|
|
#include <wx/defs.h>
|
2009-04-02 12:50:47 +00:00
|
|
|
#include <wx/grid.h>
|
2014-02-22 22:36:30 +00:00
|
|
|
#include <wx/string.h>
|
|
|
|
#include <wx/windowid.h>
|
2009-04-02 12:50:47 +00:00
|
|
|
|
2014-02-22 22:36:30 +00:00
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
|
|
|
|
class wxWindow;
|
2009-04-02 12:50:47 +00:00
|
|
|
|
2011-01-29 04:52:19 +00:00
|
|
|
class CDSPRegTable : public wxGridTableBase
|
2009-04-02 12:50:47 +00:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
u64 m_CachedCounter;
|
|
|
|
u16 m_CachedRegs[32];
|
|
|
|
bool m_CachedRegHasChanged[32];
|
|
|
|
|
2011-01-29 04:52:19 +00:00
|
|
|
DECLARE_NO_COPY_CLASS(CDSPRegTable);
|
2009-04-02 12:50:47 +00:00
|
|
|
|
|
|
|
public:
|
2011-01-29 04:52:19 +00:00
|
|
|
CDSPRegTable()
|
2009-04-02 12:50:47 +00:00
|
|
|
{
|
|
|
|
memset(m_CachedRegs, 0, sizeof(m_CachedRegs));
|
|
|
|
memset(m_CachedRegHasChanged, 0, sizeof(m_CachedRegHasChanged));
|
|
|
|
}
|
|
|
|
|
2014-03-08 00:54:44 +00:00
|
|
|
int GetNumberCols(void) override {return 2;}
|
|
|
|
int GetNumberRows(void) override {return 32;}
|
|
|
|
bool IsEmptyCell(int row, int col) override {return false;}
|
|
|
|
wxString GetValue(int row, int col) override;
|
|
|
|
void SetValue(int row, int col, const wxString &) override;
|
|
|
|
wxGridCellAttr *GetAttr(int, int, wxGridCellAttr::wxAttrKind) override;
|
2009-04-02 12:50:47 +00:00
|
|
|
void UpdateCachedRegs();
|
|
|
|
};
|
|
|
|
|
|
|
|
class DSPRegisterView : public wxGrid
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
DSPRegisterView(wxWindow* parent, wxWindowID id);
|
2014-03-08 00:54:44 +00:00
|
|
|
void Update() override;
|
2009-04-02 12:50:47 +00:00
|
|
|
};
|