diff --git a/M6502/HarteTest_6502/HarteTest_6502.vcxproj b/M6502/HarteTest_6502/HarteTest_6502.vcxproj
index 7f99a99..36ded50 100644
--- a/M6502/HarteTest_6502/HarteTest_6502.vcxproj
+++ b/M6502/HarteTest_6502/HarteTest_6502.vcxproj
@@ -164,7 +164,6 @@
-
NotUsing
NotUsing
diff --git a/M6502/HarteTest_6502/HarteTest_6502.vcxproj.filters b/M6502/HarteTest_6502/HarteTest_6502.vcxproj.filters
index e487be5..69c0257 100644
--- a/M6502/HarteTest_6502/HarteTest_6502.vcxproj.filters
+++ b/M6502/HarteTest_6502/HarteTest_6502.vcxproj.filters
@@ -41,9 +41,6 @@
Source Files
-
- Source Files
-
Source Files
diff --git a/M6502/HarteTest_6502/array_t.h b/M6502/HarteTest_6502/array_t.h
index 71b961d..036d26e 100644
--- a/M6502/HarteTest_6502/array_t.h
+++ b/M6502/HarteTest_6502/array_t.h
@@ -7,16 +7,17 @@ private:
const simdjson::dom::array m_raw;
protected:
- array_t(simdjson::dom::array input) noexcept;
-
[[nodiscard]] auto raw() const noexcept { return m_raw; }
- [[nodiscard]] auto at(size_t idx) const noexcept { return raw().at(idx); }
- [[nodiscard]] auto integer_at(size_t idx) const noexcept { return at(idx).get_int64(); }
-
public:
+ array_t(simdjson::dom::array input) noexcept;
+
[[nodiscard]] auto begin() const noexcept { return m_raw.begin(); }
[[nodiscard]] auto end() const noexcept { return m_raw.end(); }
[[nodiscard]] auto size() const noexcept { return m_raw.size(); }
+
+ [[nodiscard]] auto at(size_t idx) const noexcept { return raw().at(idx); }
[[nodiscard]] auto operator[](size_t idx) const noexcept { return at(idx); }
+
+ [[nodiscard]] auto integer_at(size_t idx) const noexcept { return at(idx).get_int64(); }
};
diff --git a/M6502/HarteTest_6502/byte_t.h b/M6502/HarteTest_6502/byte_t.h
index 96a8964..1ecf267 100644
--- a/M6502/HarteTest_6502/byte_t.h
+++ b/M6502/HarteTest_6502/byte_t.h
@@ -7,13 +7,12 @@
#include "array_t.h"
class byte_t : public array_t {
-protected:
- [[nodiscard]] auto address_at(size_t idx) const noexcept { return (uint16_t)integer_at(idx); }
- [[nodiscard]] auto byte_at(size_t idx) const noexcept { return (uint8_t)integer_at(idx); }
-
public:
byte_t(simdjson::dom::array input) noexcept;
+ [[nodiscard]] auto address_at(size_t idx) const noexcept { return (uint16_t)integer_at(idx); }
+ [[nodiscard]] auto byte_at(size_t idx) const noexcept { return (uint8_t)integer_at(idx); }
+
[[nodiscard]] auto address() const noexcept { return address_at(0); }
[[nodiscard]] auto value() const noexcept { return byte_at(1); }
};
diff --git a/M6502/HarteTest_6502/element_t.h b/M6502/HarteTest_6502/element_t.h
index 6826904..5f9aba3 100644
--- a/M6502/HarteTest_6502/element_t.h
+++ b/M6502/HarteTest_6502/element_t.h
@@ -9,11 +9,12 @@ private:
simdjson::dom::element m_raw;
protected:
+ [[nodiscard]] auto raw() const noexcept { return m_raw; }
+
+public:
element_t() noexcept;
element_t(simdjson::dom::element input) noexcept;
- [[nodiscard]] auto raw() const noexcept { return m_raw; }
-
[[nodiscard]] auto at(std::string_view key) const noexcept { return raw()[key]; }
[[nodiscard]] auto operator[](std::string_view key) const noexcept { return at(key); }
[[nodiscard]] auto array_at(std::string_view key) const noexcept { return at(key).get_array(); }
diff --git a/M6502/HarteTest_6502/processor_test_suite_t.h b/M6502/HarteTest_6502/processor_test_suite_t.h
index e37ab48..be201e3 100644
--- a/M6502/HarteTest_6502/processor_test_suite_t.h
+++ b/M6502/HarteTest_6502/processor_test_suite_t.h
@@ -17,4 +17,3 @@ public:
co_generator_t generator();
};
-
diff --git a/M6502/HarteTest_6502/ram_t.cpp b/M6502/HarteTest_6502/ram_t.cpp
deleted file mode 100644
index 09e9bab..0000000
--- a/M6502/HarteTest_6502/ram_t.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "stdafx.h"
-#include "ram_t.h"
-
-ram_t::ram_t(const simdjson::dom::array input) noexcept
-: array_t(input) {}
diff --git a/M6502/HarteTest_6502/ram_t.h b/M6502/HarteTest_6502/ram_t.h
index 6c725a7..4a4508d 100644
--- a/M6502/HarteTest_6502/ram_t.h
+++ b/M6502/HarteTest_6502/ram_t.h
@@ -1,10 +1,5 @@
#pragma once
-#include "simdjson/simdjson.h"
-
#include "array_t.h"
-class ram_t final : public array_t {
-public:
- ram_t(simdjson::dom::array input) noexcept;
-};
+typedef array_t ram_t;
diff --git a/M6502/HarteTest_6502/state_t.h b/M6502/HarteTest_6502/state_t.h
index eb1983b..6bcd655 100644
--- a/M6502/HarteTest_6502/state_t.h
+++ b/M6502/HarteTest_6502/state_t.h
@@ -9,13 +9,12 @@
#include "ram_t.h"
class state_t final : public element_t {
-private:
- [[nodiscard]] auto address_at(std::string_view key) const noexcept { return (uint16_t)integer_at(key); }
- [[nodiscard]] auto byte_at(std::string_view key) const noexcept { return (uint8_t)integer_at(key); }
-
public:
state_t(simdjson::dom::element input) noexcept;
+ [[nodiscard]] auto address_at(std::string_view key) const noexcept { return (uint16_t)integer_at(key); }
+ [[nodiscard]] auto byte_at(std::string_view key) const noexcept { return (uint8_t)integer_at(key); }
+
[[nodiscard]] auto pc() const noexcept { return address_at("pc"); }
[[nodiscard]] auto s() const noexcept { return byte_at("s"); }
[[nodiscard]] auto a() const noexcept { return byte_at("a"); }