diff --git a/MC6809/test/Board.cpp b/MC6809/test/Board.cpp index 8b8f50b..3b31044 100644 --- a/MC6809/test/Board.cpp +++ b/MC6809/test/Board.cpp @@ -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 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 }; } diff --git a/MC6809/test/Board.h b/MC6809/test/Board.h index fef3a1f..a4ba56f 100644 --- a/MC6809/test/Board.h +++ b/MC6809/test/Board.h @@ -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