2017-06-05 21:39:15 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
2017-09-07 00:04:09 +00:00
|
|
|
#include <Ram.h>
|
|
|
|
#include <Bus.h>
|
|
|
|
#include <InputOutput.h>
|
|
|
|
#include <Profiler.h>
|
|
|
|
#include <EventArgs.h>
|
|
|
|
#include <Disassembler.h>
|
|
|
|
#include <Z80.h>
|
|
|
|
|
2017-06-05 21:39:15 +00:00
|
|
|
#include "Configuration.h"
|
|
|
|
|
2017-09-07 00:04:09 +00:00
|
|
|
class Board : public EightBit::Bus {
|
2017-06-05 21:39:15 +00:00
|
|
|
public:
|
|
|
|
Board(const Configuration& configuration);
|
|
|
|
|
2018-11-27 22:28:09 +00:00
|
|
|
EightBit::Z80& CPU() noexcept { return m_cpu; }
|
2017-06-05 21:39:15 +00:00
|
|
|
|
2019-01-14 02:10:17 +00:00
|
|
|
void raisePOWER() final;
|
|
|
|
void lowerPOWER() noexcept final;
|
2017-06-05 21:39:15 +00:00
|
|
|
|
2018-11-27 22:28:09 +00:00
|
|
|
void initialise() final;
|
2019-01-14 02:10:17 +00:00
|
|
|
|
|
|
|
protected:
|
2018-11-27 22:28:09 +00:00
|
|
|
EightBit::MemoryMapping mapping(uint16_t address) noexcept final {
|
2018-12-01 15:24:29 +00:00
|
|
|
return { m_ram, 0x0000, 0xffff, EightBit::MemoryMapping::AccessLevel::ReadWrite };
|
2018-06-09 23:40:56 +00:00
|
|
|
}
|
|
|
|
|
2017-06-05 21:39:15 +00:00
|
|
|
private:
|
|
|
|
const Configuration& m_configuration;
|
2017-11-18 14:29:30 +00:00
|
|
|
EightBit::Ram m_ram = 0x10000;
|
2017-06-05 21:39:15 +00:00
|
|
|
EightBit::InputOutput m_ports;
|
2020-02-09 11:51:58 +00:00
|
|
|
EightBit::Z80 m_cpu = *this;
|
2018-11-24 10:56:00 +00:00
|
|
|
EightBit::Disassembler m_disassembler = *this;
|
|
|
|
EightBit::Profiler m_profiler = { m_cpu, m_disassembler };
|
2018-08-25 00:34:30 +00:00
|
|
|
int m_warmstartCount = 0;
|
2017-06-05 21:39:15 +00:00
|
|
|
|
2018-06-24 19:58:20 +00:00
|
|
|
void bdos();
|
2017-06-05 21:39:15 +00:00
|
|
|
};
|