mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-10-06 14:59:17 +00:00
984626a331
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
22 lines
385 B
C++
22 lines
385 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include "Memory.h"
|
|
|
|
namespace EightBit {
|
|
class Ram : public Memory {
|
|
public:
|
|
Ram(const size_t size = 0) noexcept
|
|
: Memory(size) {
|
|
}
|
|
|
|
virtual uint8_t& reference(const uint16_t address) final {
|
|
return BYTES()[address];
|
|
}
|
|
|
|
virtual void poke(const uint16_t address, const uint8_t value) final {
|
|
Memory::poke(address, value);
|
|
}
|
|
};
|
|
}
|