mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-11-19 17:30:56 +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);
|
|
}
|
|
};
|
|
}
|