2015-05-24 06:55:12 +02:00
|
|
|
// Copyright 2009 Dolphin Emulator Project
|
2015-05-18 01:08:10 +02:00
|
|
|
// Licensed under GPLv2+
|
2013-04-18 05:43:35 +02:00
|
|
|
// Refer to the license.txt file included.
|
2009-04-02 14:50:47 +02:00
|
|
|
|
2014-02-10 19:54:46 +01:00
|
|
|
#pragma once
|
2009-04-02 14:50:47 +02:00
|
|
|
|
2016-10-06 18:25:28 +02:00
|
|
|
#include <array>
|
2009-04-02 14:50:47 +02:00
|
|
|
#include <wx/grid.h>
|
|
|
|
|
2014-02-22 23:36:30 +01:00
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
|
2016-10-06 18:35:29 +02:00
|
|
|
class CDSPRegTable final : public wxGridTableBase
|
2009-04-02 14:50:47 +02:00
|
|
|
{
|
|
|
|
public:
|
2016-10-06 18:25:28 +02:00
|
|
|
CDSPRegTable() = default;
|
2016-06-24 10:43:46 +02:00
|
|
|
|
|
|
|
int GetNumberCols() override { return 2; }
|
|
|
|
int GetNumberRows() 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;
|
|
|
|
void UpdateCachedRegs();
|
2016-10-06 18:26:53 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
u64 m_CachedCounter = 0;
|
|
|
|
std::array<u16, 32> m_CachedRegs{};
|
|
|
|
std::array<bool, 32> m_CachedRegHasChanged{};
|
|
|
|
|
2017-07-30 21:56:12 +02:00
|
|
|
DECLARE_NO_COPY_CLASS(CDSPRegTable)
|
2009-04-02 14:50:47 +02:00
|
|
|
};
|
|
|
|
|
2016-10-06 18:35:29 +02:00
|
|
|
class DSPRegisterView final : public wxGrid
|
2009-04-02 14:50:47 +02:00
|
|
|
{
|
|
|
|
public:
|
2016-10-06 18:36:32 +02:00
|
|
|
explicit DSPRegisterView(wxWindow* parent, wxWindowID id = wxID_ANY);
|
2016-10-03 09:29:50 +02:00
|
|
|
void Repopulate();
|
2015-03-24 14:37:20 +01:00
|
|
|
|
|
|
|
private:
|
2016-06-24 10:43:46 +02:00
|
|
|
// Owned by wx. Deleted implicitly upon destruction.
|
|
|
|
CDSPRegTable* m_register_table;
|
2009-04-02 14:50:47 +02:00
|
|
|
};
|