2015-05-23 22:55:12 -06:00
|
|
|
// Copyright 2009 Dolphin Emulator Project
|
2015-05-17 17:08:10 -06:00
|
|
|
// Licensed under GPLv2+
|
2013-04-17 21:43:35 -06:00
|
|
|
// Refer to the license.txt file included.
|
2009-04-02 06:50:47 -06:00
|
|
|
|
2014-02-10 11:54:46 -07:00
|
|
|
#pragma once
|
2009-04-02 06:50:47 -06:00
|
|
|
|
2014-02-22 15:36:30 -07:00
|
|
|
#include <cstring>
|
2009-04-02 06:50:47 -06:00
|
|
|
#include <wx/grid.h>
|
|
|
|
|
2014-02-22 15:36:30 -07:00
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
|
2011-01-28 21:52:19 -07:00
|
|
|
class CDSPRegTable : public wxGridTableBase
|
2009-04-02 06:50:47 -06:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
u64 m_CachedCounter;
|
|
|
|
u16 m_CachedRegs[32];
|
|
|
|
bool m_CachedRegHasChanged[32];
|
|
|
|
|
2011-01-28 21:52:19 -07:00
|
|
|
DECLARE_NO_COPY_CLASS(CDSPRegTable);
|
2009-04-02 06:50:47 -06:00
|
|
|
|
|
|
|
public:
|
2011-01-28 21:52:19 -07:00
|
|
|
CDSPRegTable()
|
2009-04-02 06:50:47 -06:00
|
|
|
{
|
|
|
|
memset(m_CachedRegs, 0, sizeof(m_CachedRegs));
|
|
|
|
memset(m_CachedRegHasChanged, 0, sizeof(m_CachedRegHasChanged));
|
|
|
|
}
|
|
|
|
|
2014-08-30 10:41:21 -06:00
|
|
|
int GetNumberCols() override { return 2; }
|
|
|
|
int GetNumberRows() override { return 32; }
|
|
|
|
bool IsEmptyCell(int row, int col) override { return false; }
|
2014-03-07 17:54:44 -07:00
|
|
|
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 06:50:47 -06:00
|
|
|
void UpdateCachedRegs();
|
|
|
|
};
|
|
|
|
|
|
|
|
class DSPRegisterView : public wxGrid
|
|
|
|
{
|
|
|
|
public:
|
2015-02-24 06:31:50 -07:00
|
|
|
DSPRegisterView(wxWindow* parent, wxWindowID id = wxID_ANY);
|
2014-03-07 17:54:44 -07:00
|
|
|
void Update() override;
|
2015-03-24 07:37:20 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
// Owned by wx. Deleted implicitly upon destruction.
|
|
|
|
CDSPRegTable* m_register_table;
|
2009-04-02 06:50:47 -06:00
|
|
|
};
|