mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-11-09 13:07:15 +00:00
d70f6b375b
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
22 lines
310 B
C++
22 lines
310 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include "Memory.h"
|
|
|
|
namespace EightBit {
|
|
class Rom : public Memory {
|
|
public:
|
|
Rom(size_t size = 0)
|
|
: Memory(size) {
|
|
}
|
|
|
|
uint8_t peek(uint16_t address) const {
|
|
return read(address);
|
|
}
|
|
|
|
uint8_t& reference(uint16_t address) {
|
|
return BYTES()[address];
|
|
}
|
|
};
|
|
}
|