2017-09-06 12:22:23 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstdint>
|
2018-11-04 16:38:57 +00:00
|
|
|
|
|
|
|
#include "Rom.h"
|
2017-09-06 12:22:23 +00:00
|
|
|
|
|
|
|
namespace EightBit {
|
2018-11-04 16:38:57 +00:00
|
|
|
// The RAM class is everything the ROM class is, plus
|
|
|
|
// it's externally 'reference'able and 'poke'able.
|
|
|
|
class Ram : public Rom {
|
2017-09-06 12:22:23 +00:00
|
|
|
public:
|
2018-11-25 10:43:51 +00:00
|
|
|
Ram(size_t size = 0) noexcept;
|
2017-09-06 12:22:23 +00:00
|
|
|
|
2018-11-25 10:43:51 +00:00
|
|
|
virtual uint8_t& reference(uint16_t address) final;
|
|
|
|
virtual void poke(uint16_t address, uint8_t value) final;
|
2017-09-06 12:22:23 +00:00
|
|
|
};
|
|
|
|
}
|