mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-06-03 10:26:36 +00:00
A basic memory viewer has been created
This commit is contained in:
@@ -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
@@ -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();
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user