2017-07-05 16:46:02 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-09-06 23:58:56 +00:00
|
|
|
#include "Configuration.h"
|
|
|
|
|
2017-07-05 16:46:02 +00:00
|
|
|
#include <string>
|
|
|
|
|
2017-09-06 23:58:56 +00:00
|
|
|
#include <Bus.h>
|
|
|
|
#include <Disassembly.h>
|
|
|
|
#include <mos6502.h>
|
2018-12-01 16:41:39 +00:00
|
|
|
#include <Ram.h>
|
2018-11-18 13:52:43 +00:00
|
|
|
#include <Register.h>
|
2018-12-01 16:41:39 +00:00
|
|
|
#include <Symbols.h>
|
2017-07-05 16:46:02 +00:00
|
|
|
|
2017-09-06 23:58:56 +00:00
|
|
|
class Board : public EightBit::Bus {
|
2017-07-05 16:46:02 +00:00
|
|
|
public:
|
|
|
|
Board(const Configuration& configuration);
|
|
|
|
|
|
|
|
EightBit::MOS6502& CPU() { return m_cpu; }
|
|
|
|
|
2019-01-14 02:10:17 +00:00
|
|
|
virtual void raisePOWER() final;
|
|
|
|
virtual void lowerPOWER() final;
|
2017-07-05 16:46:02 +00:00
|
|
|
|
2018-11-11 16:48:44 +00:00
|
|
|
virtual void initialise() final;
|
2019-01-14 02:10:17 +00:00
|
|
|
|
|
|
|
protected:
|
2021-07-18 13:28:40 +00:00
|
|
|
virtual 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 };
|
2017-09-06 23:58:56 +00:00
|
|
|
}
|
|
|
|
|
2017-07-05 16:46:02 +00:00
|
|
|
private:
|
|
|
|
const Configuration& m_configuration;
|
2018-06-09 23:40:56 +00:00
|
|
|
EightBit::Ram m_ram = 0x10000;
|
2018-11-18 13:52:43 +00:00
|
|
|
EightBit::MOS6502 m_cpu = *this;
|
2018-06-16 08:53:44 +00:00
|
|
|
EightBit::Symbols m_symbols;
|
2018-11-18 13:52:43 +00:00
|
|
|
EightBit::Disassembly m_disassembler = { *this, m_cpu, m_symbols };
|
2017-07-05 16:46:02 +00:00
|
|
|
|
2018-11-18 13:52:43 +00:00
|
|
|
EightBit::register16_t m_oldPC = EightBit::Chip::Mask16;
|
2018-06-09 23:40:56 +00:00
|
|
|
bool m_stopped = false;
|
2017-07-05 16:46:02 +00:00
|
|
|
};
|