Plug the 8K hole in the address space of the Grant Searle SBC with 0xff (held high)

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2018-09-16 19:49:52 +01:00
parent 54bb9743be
commit 9e91d2adad
2 changed files with 10 additions and 3 deletions

View File

@ -4,7 +4,11 @@
Board::Board(const Configuration& configuration)
: m_configuration(configuration),
m_cpu(EightBit::mc6809(*this)),
m_disassembler(m_cpu) {}
m_disassembler(m_cpu) {
std::vector<uint8_t> content(m_unused2000.size());
std::fill(content.begin(), content.end(), 0xff);
m_unused2000.load(content);
}
void Board::initialise() {
@ -38,8 +42,11 @@ EightBit::MemoryMapping Board::mapping(uint16_t address) {
if (address < 0x8000)
return { m_ram, 0x0000, EightBit::MemoryMapping::ReadWrite };
if (address < 0xa000)
return { m_unused2000, 0x8000, EightBit::MemoryMapping::ReadOnly };
if (address < 0xc000)
return { m_io, 0x8000, EightBit::MemoryMapping::ReadWrite };
return { m_io, 0xa000, EightBit::MemoryMapping::ReadWrite };
return { m_rom, 0xc000, EightBit::MemoryMapping::ReadOnly };
}

View File

@ -23,7 +23,7 @@ protected:
private:
const Configuration& m_configuration;
EightBit::Ram m_ram = 0x8000; // 0000 - 7FFF, 32K RAM
// 8000 - 9FFF, 8K unused
EightBit::Rom m_unused2000 = 0x2000; // 8000 - 9FFF, 8K unused
EightBit::Ram m_io = 0x2000; // A000 - BFFF, 8K serial interface, minimally decoded
EightBit::Rom m_rom = 0x4000; // C000 - FFFF, 16K ROM