From 2c0df2064755db45c2bdab1e4be93595e33d28a6 Mon Sep 17 00:00:00 2001 From: Amneesh Singh Date: Tue, 11 Jun 2024 22:57:32 +0530 Subject: [PATCH] --amend Signed-off-by: Amneesh Singh --- include/memory.hh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/memory.hh b/include/memory.hh index 11824a3..2f31ba7 100644 --- a/include/memory.hh +++ b/include/memory.hh @@ -10,15 +10,16 @@ namespace matar { class Memory { public: - static constexpr size_t BIOS_SIZE = 1024 * 16; + static constexpr uint32_t BIOS_SIZE = 1024 * 16; Memory(std::array&& bios, std::vector&& rom); - uint8_t read(size_t address) const; - void write(size_t address, uint8_t byte); + uint8_t read(uint32_t address) const; + void write(uint32_t address, uint8_t byte); private: -#define MEMORY_REGION(name, start) static constexpr size_t name##_START = start; +#define MEMORY_REGION(name, start) \ + static constexpr uint32_t name##_START = start; #define DECL_MEMORY(name, ident, start, end) \ MEMORY_REGION(name, start) \ @@ -50,7 +51,7 @@ class Memory { #undef MEMORY_REGION - std::unordered_map invalid_mem; + std::unordered_map invalid_mem; std::vector rom; Header header; void parse_header();