A basic memory viewer has been created

This commit is contained in:
Anonymus Raccoon
2020-02-18 00:45:13 +01:00
parent 1bbf9cfe77
commit 92e48db363
13 changed files with 196 additions and 75 deletions
+5
View File
@@ -42,4 +42,9 @@ namespace ComSquare::Ram
throw InvalidAddress("Ram memset start", start);
std::memset(&this->_data[start], value, sizeof(uint8_t) * (end - start));
}
size_t Ram::getSize()
{
return this->_size;
}
}
+5 -2
View File
@@ -13,10 +13,10 @@ namespace ComSquare::Ram
private:
//! @brief The ram. (Can be used for WRam, SRam, VRam etc)
uint8_t *_data;
//! @brief The size of the ram.
//! @brief The size of the ram (iny bytes).
size_t _size;
public:
//! @brief Load a rom from it's path.
//! @brief Create a ram of a given size in bytes.
explicit Ram(size_t size);
//! @brief The ram can't be copied.
Ram(const Ram &) = delete;
@@ -40,6 +40,9 @@ namespace ComSquare::Ram
//! @param end end address to replace
//! @param value replace value
void memset(uint24_t start, uint24_t end, uint8_t value);
//! @brief Get the size of the ram in bytes.
size_t getSize();
};
}