mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-12-24 06:29:42 +00:00
b640da1910
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
22 lines
345 B
C++
22 lines
345 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) {
|
|
}
|
|
|
|
uint8_t& reference(const uint16_t address) {
|
|
return BYTES()[address];
|
|
}
|
|
|
|
void poke(uint16_t address, uint8_t value) {
|
|
Memory::poke(address, value);
|
|
}
|
|
};
|
|
}
|