| 1 |
#ifndef IMGUI_VDP_REGS_HH |
| 2 |
#define IMGUI_VDP_REGS_HH |
| 3 |
|
| 4 |
#include "ImGuiPart.hh" |
| 5 |
|
| 6 |
#include "EmuTime.hh" |
| 7 |
|
| 8 |
#include <cstdint> |
| 9 |
#include <span> |
| 10 |
|
| 11 |
namespace openmsx { |
| 12 |
|
| 13 |
class ImGuiManager; |
| 14 |
class VDP; |
| 15 |
|
| 16 |
class ImGuiVdpRegs final : public ImGuiPart |
| 17 |
{ |
| 18 |
public: |
| 19 |
using ImGuiPart::ImGuiPart; |
| 20 |
|
| 21 |
[[nodiscard]] zstring_view iniName() const override { return "vdp registers"; } |
| 22 |
void save(ImGuiTextBuffer& buf) override; |
| 23 |
void loadLine(std::string_view name, zstring_view value) override; |
| 24 |
void paint(MSXMotherBoard* motherBoard) override; |
| 25 |
|
| 26 |
private: |
| 27 |
void drawSection(std::span<const uint8_t> showRegisters, std::span<const uint8_t> regValues, |
| 28 |
VDP& vdp, EmuTime time); |
| 29 |
|
| 30 |
public: |
| 31 |
bool show = false; |
| 32 |
|
| 33 |
private: |
| 34 |
int hoveredFunction = -1; |
| 35 |
int newHoveredFunction = -1; |
| 36 |
bool explanation = true; |
| 37 |
bool openControl = false; |
| 38 |
bool openMode = false; |
| 39 |
bool openBase = false; |
| 40 |
bool openColor = false; |
| 41 |
bool openDisplay = false; |
| 42 |
bool openAccess = false; |
| 43 |
bool openV9958 = false; |
| 44 |
bool openCommand = false; |
| 45 |
bool openStatus = false; |
| 46 |
|
| 47 |
static constexpr auto persistentElements = std::tuple{ |
| 48 |
PersistentElement{"show", &ImGuiVdpRegs::show}, |
| 49 |
PersistentElement{"explanation", &ImGuiVdpRegs::explanation}, |
| 50 |
PersistentElement{"openControl", &ImGuiVdpRegs::openControl}, |
| 51 |
PersistentElement{"openMode", &ImGuiVdpRegs::openMode}, |
| 52 |
PersistentElement{"openBase", &ImGuiVdpRegs::openBase}, |
| 53 |
PersistentElement{"openColor", &ImGuiVdpRegs::openColor}, |
| 54 |
PersistentElement{"openDisplay", &ImGuiVdpRegs::openDisplay}, |
| 55 |
PersistentElement{"openAccess", &ImGuiVdpRegs::openAccess}, |
| 56 |
PersistentElement{"openV9958", &ImGuiVdpRegs::openV9958}, |
| 57 |
PersistentElement{"openCommand", &ImGuiVdpRegs::openCommand}, |
| 58 |
PersistentElement{"openStatus", &ImGuiVdpRegs::openStatus} |
| 59 |
}; |
| 60 |
}; |
| 61 |
|
| 62 |
} |
| 63 |
|
| 64 |
#endif |