2017-06-05 16:31:21 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-09-06 23:55:06 +00:00
|
|
|
#include <Bus.h>
|
|
|
|
#include <Ram.h>
|
|
|
|
#include <InputOutput.h>
|
|
|
|
#include <Intel8080.h>
|
|
|
|
#include <Profiler.h>
|
|
|
|
#include <EventArgs.h>
|
|
|
|
#include <Disassembler.h>
|
2017-06-05 16:31:21 +00:00
|
|
|
|
|
|
|
class Configuration;
|
|
|
|
|
2017-09-06 23:55:06 +00:00
|
|
|
class Board : public EightBit::Bus {
|
2017-06-05 16:31:21 +00:00
|
|
|
public:
|
|
|
|
Board(const Configuration& configuration);
|
|
|
|
|
2017-07-05 16:40:16 +00:00
|
|
|
EightBit::Intel8080& CPU() { return m_cpu; }
|
2018-06-09 23:40:56 +00:00
|
|
|
const EightBit::Intel8080& CPU() const { return m_cpu; }
|
2017-06-05 16:31:21 +00:00
|
|
|
|
2018-11-11 16:48:44 +00:00
|
|
|
virtual void powerOn() final;
|
|
|
|
virtual void powerOff() final;
|
2017-06-05 16:31:21 +00:00
|
|
|
|
2017-09-06 23:55:06 +00:00
|
|
|
protected:
|
2018-11-11 16:48:44 +00:00
|
|
|
virtual void initialise() final;
|
2018-09-15 13:35:59 +00:00
|
|
|
virtual EightBit::MemoryMapping mapping(uint16_t address) final {
|
2018-12-01 15:24:29 +00:00
|
|
|
return { m_ram, 0x0000, 0xffff, EightBit::MemoryMapping::AccessLevel::ReadWrite };
|
2017-09-06 23:55:06 +00:00
|
|
|
}
|
|
|
|
|
2017-06-05 16:31:21 +00:00
|
|
|
private:
|
|
|
|
const Configuration& m_configuration;
|
2017-12-10 21:41:48 +00:00
|
|
|
EightBit::Ram m_ram = 0x10000;
|
2017-06-05 16:31:21 +00:00
|
|
|
EightBit::InputOutput m_ports;
|
|
|
|
EightBit::Intel8080 m_cpu;
|
2017-07-25 13:12:34 +00:00
|
|
|
EightBit::Disassembler m_disassembler;
|
2017-06-05 16:31:21 +00:00
|
|
|
EightBit::Profiler m_profiler;
|
2018-08-25 00:34:30 +00:00
|
|
|
int m_warmstartCount = 0;
|
2017-06-05 16:31:21 +00:00
|
|
|
|
2018-06-24 21:33:02 +00:00
|
|
|
void Cpu_ExecutingInstruction_Cpm(EightBit::Intel8080& cpu);
|
2017-06-05 16:31:21 +00:00
|
|
|
|
2018-06-09 23:40:56 +00:00
|
|
|
void Cpu_ExecutingInstruction_Debug(const EightBit::Intel8080& cpu);
|
2018-06-24 21:33:02 +00:00
|
|
|
void Cpu_ExecutingInstruction_Profile(EightBit::Intel8080& cpu);
|
2017-06-05 16:31:21 +00:00
|
|
|
|
2018-06-24 19:58:20 +00:00
|
|
|
void bdos();
|
2017-06-05 16:31:21 +00:00
|
|
|
};
|