mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2026-03-11 04:41:57 +00:00
Ensure the i8080 unit tests run successfully to completion.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
This commit is contained in:
@@ -6,21 +6,20 @@
|
||||
|
||||
Board::Board(const Configuration& configuration)
|
||||
: m_configuration(configuration),
|
||||
m_memory(0xffff),
|
||||
m_cpu(EightBit::Intel8080(m_memory, m_ports)) {
|
||||
m_ram(0x10000),
|
||||
m_cpu(EightBit::Intel8080(*this, m_ports)) {
|
||||
}
|
||||
|
||||
void Board::initialise() {
|
||||
|
||||
m_memory.clear();
|
||||
auto romDirectory = m_configuration.getRomDirectory();
|
||||
|
||||
//m_memory.loadRam(romDirectory + "/TEST.COM", 0x100); // Microcosm
|
||||
//m_memory.loadRam(romDirectory + "/8080PRE.COM", 0x100); // Bartholomew preliminary
|
||||
m_memory.loadRam(romDirectory + "/8080EX1.COM", 0x100); // Cringle/Bartholomew
|
||||
//m_memory.loadRam(romDirectory + "/CPUTEST.COM", 0x100); // SuperSoft diagnostics
|
||||
//m_ram.load(romDirectory + "/TEST.COM", 0x100); // Microcosm
|
||||
//m_ram.load(romDirectory + "/8080PRE.COM", 0x100); // Bartholomew preliminary
|
||||
m_ram.load(romDirectory + "/8080EX1.COM", 0x100); // Cringle/Bartholomew
|
||||
//m_ram.load(romDirectory + "/CPUTEST.COM", 0x100); // SuperSoft diagnostics
|
||||
|
||||
m_memory.poke(5, 0xc9); // ret
|
||||
poke(5, 0xc9); // ret
|
||||
m_cpu.ExecutingInstruction.connect(std::bind(&Board::Cpu_ExecutingInstruction_Cpm, this, std::placeholders::_1));
|
||||
|
||||
if (m_configuration.isProfileMode()) {
|
||||
@@ -61,8 +60,8 @@ void Board::bdos() {
|
||||
break;
|
||||
}
|
||||
case 0x9:
|
||||
for (uint16_t i = m_cpu.DE().word; m_memory.peek(i) != '$'; ++i) {
|
||||
std::cout << m_memory.peek(i);
|
||||
for (uint16_t i = m_cpu.DE().word; peek(i) != '$'; ++i) {
|
||||
std::cout << peek(i);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -73,7 +72,7 @@ void Board::Cpu_ExecutingInstruction_Profile(const EightBit::Intel8080& cpu) {
|
||||
const auto pc = m_cpu.PC();
|
||||
|
||||
m_profiler.addAddress(pc.word);
|
||||
m_profiler.addInstruction(m_memory.peek(pc.word));
|
||||
m_profiler.addInstruction(peek(pc.word));
|
||||
}
|
||||
|
||||
void Board::Cpu_ExecutingInstruction_Debug(const EightBit::Intel8080&) {
|
||||
|
||||
Reference in New Issue
Block a user