summaryrefslogtreecommitdiff
path: root/src/status.hh
diff options
context:
space:
mode:
authorHannes Schulze <haschu0103@outlook.de>2025-01-23 19:37:32 +0100
committerHannes Schulze <haschu0103@outlook.de>2025-01-23 19:37:32 +0100
commit6512dd599d13035f6a90b2009344e02c488f5aae (patch)
tree5d19f043aac57c5cec6edc8221d5ec9057d49ab3 /src/status.hh
parentbaa585fd21f631708de215929241d40f66b58498 (diff)
initial working version
Diffstat (limited to 'src/status.hh')
-rw-r--r--src/status.hh42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/status.hh b/src/status.hh
index 705ae6e..b56be58 100644
--- a/src/status.hh
+++ b/src/status.hh
@@ -14,6 +14,9 @@ namespace test
nes::cycle_count cpu_cycle;
std::vector<std::uint8_t> ram;
std::vector<std::uint8_t> sram;
+ std::vector<std::uint8_t> vram;
+ std::vector<std::uint8_t> oam;
+ std::vector<std::uint8_t> chrrom;
struct
{
std::uint16_t pc{};
@@ -52,4 +55,43 @@ namespace test
return true;
}
};
+
+ struct memory_operation
+ {
+ enum class type
+ {
+ read_ppustatus,
+ read_oamdata,
+ read_ppudata,
+ write_ppuctrl,
+ write_ppuscroll,
+ write_ppumask,
+ write_ppuaddr,
+ write_ppudata,
+ write_oamaddr,
+ write_oamdata,
+ write_oamdma,
+ };
+
+ explicit constexpr memory_operation(type const t, std::uint8_t const v, nes::cycle_count cycles)
+ : t{ t }
+ , v{ v }
+ , cycles{ cycles }
+ {
+ }
+
+ type t{};
+ std::uint8_t v{};
+ nes::cycle_count cycles;
+ };
+
+ constexpr auto operator==(memory_operation const a, memory_operation const b) -> bool
+ {
+ return a.t == b.t && a.v == b.v;
+ }
+
+ constexpr auto operator!=(memory_operation const a, memory_operation const b) -> bool
+ {
+ return a.t != b.t || a.v != b.v;
+ }
} // namespace test \ No newline at end of file