2018-11-25 10:43:51 +00:00
|
|
|
#include "stdafx.h"
|
2021-05-29 09:31:32 +00:00
|
|
|
#include "../inc/UnusedMemory.h"
|
2018-11-25 10:43:51 +00:00
|
|
|
|
2021-07-18 13:28:40 +00:00
|
|
|
#include <cassert>
|
|
|
|
|
2022-01-03 12:29:32 +00:00
|
|
|
EightBit::UnusedMemory::UnusedMemory(const uint16_t size, const uint8_t value) noexcept
|
2018-11-25 10:43:51 +00:00
|
|
|
: m_size(size), m_value(value) {}
|
|
|
|
|
2022-01-03 12:29:32 +00:00
|
|
|
uint16_t EightBit::UnusedMemory::size() const noexcept {
|
2018-11-25 10:43:51 +00:00
|
|
|
return m_size;
|
|
|
|
}
|
|
|
|
|
2021-07-18 13:28:40 +00:00
|
|
|
uint8_t EightBit::UnusedMemory::peek(uint16_t) const noexcept {
|
2018-11-25 10:43:51 +00:00
|
|
|
return m_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
int EightBit::UnusedMemory::load(std::ifstream&, int, int, int) {
|
2018-11-27 22:36:54 +00:00
|
|
|
throw std::logic_error("load operation not allowed.");
|
2018-11-25 10:43:51 +00:00
|
|
|
}
|
|
|
|
|
2020-11-07 09:41:12 +00:00
|
|
|
int EightBit::UnusedMemory::load(std::string, int, int, int) {
|
2018-11-27 22:36:54 +00:00
|
|
|
throw std::logic_error("load operation not allowed.");
|
2018-11-25 10:43:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int EightBit::UnusedMemory::load(const std::vector<uint8_t>&, int, int, int) {
|
2018-11-27 22:36:54 +00:00
|
|
|
throw std::logic_error("load operation not allowed.");
|
2018-11-25 10:43:51 +00:00
|
|
|
}
|
|
|
|
|
2021-07-18 13:28:40 +00:00
|
|
|
void EightBit::UnusedMemory::poke(uint16_t, uint8_t) noexcept {
|
|
|
|
assert(false && "Poke operation not allowed.");
|
2018-11-25 10:43:51 +00:00
|
|
|
}
|