2018-08-26 18:09:34 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Configuration.h"
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include <Ram.h>
|
2018-11-04 16:38:57 +00:00
|
|
|
#include <Rom.h>
|
2018-08-26 18:09:34 +00:00
|
|
|
#include <Bus.h>
|
|
|
|
#include <mc6809.h>
|
|
|
|
#include <Disassembly.h>
|
2018-09-23 12:14:10 +00:00
|
|
|
#include <MC6850.h>
|
2018-11-03 23:11:48 +00:00
|
|
|
#include <UnusedMemory.h>
|
2021-04-07 20:35:33 +00:00
|
|
|
#include <Profiler.h>
|
2018-08-26 18:09:34 +00:00
|
|
|
|
|
|
|
class Board : public EightBit::Bus {
|
|
|
|
public:
|
|
|
|
Board(const Configuration& configuration);
|
|
|
|
|
2018-10-27 20:58:23 +00:00
|
|
|
auto& CPU() { return m_cpu; }
|
|
|
|
auto& ACIA() { return m_acia; }
|
2018-08-26 18:09:34 +00:00
|
|
|
|
2021-12-08 19:50:11 +00:00
|
|
|
void raisePOWER() final;
|
|
|
|
void lowerPOWER() final;
|
2018-08-26 18:09:34 +00:00
|
|
|
|
2018-11-11 16:48:44 +00:00
|
|
|
virtual void initialise() final;
|
2019-01-14 02:10:17 +00:00
|
|
|
|
|
|
|
protected:
|
2021-12-08 19:50:11 +00:00
|
|
|
EightBit::MemoryMapping mapping(uint16_t address) noexcept final;
|
2018-08-26 18:09:34 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
const Configuration& m_configuration;
|
2018-11-03 23:11:48 +00:00
|
|
|
EightBit::Ram m_ram = 0x8000; // 0000 - 7FFF, 32K RAM
|
|
|
|
EightBit::UnusedMemory m_unused2000 = { 0x2000, 0xff }; // 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
|
2018-09-15 13:35:59 +00:00
|
|
|
|
2018-09-23 12:14:10 +00:00
|
|
|
EightBit::mc6850 m_acia;
|
|
|
|
|
2018-11-18 22:15:49 +00:00
|
|
|
EightBit::mc6809 m_cpu = *this;
|
|
|
|
EightBit::Disassembly m_disassembler = { *this, m_cpu };
|
2021-04-07 20:35:33 +00:00
|
|
|
EightBit::Profiler m_profiler = { m_cpu, m_disassembler };
|
2018-08-26 18:09:34 +00:00
|
|
|
|
2018-10-20 15:57:32 +00:00
|
|
|
uint64_t m_totalCycleCount = 0UL;
|
2018-10-27 20:58:23 +00:00
|
|
|
int64_t m_frameCycleCount = 0L;
|
2018-10-20 15:57:32 +00:00
|
|
|
|
|
|
|
// The m_disassembleAt and m_ignoreDisassembly are used to skip pin events
|
2018-08-30 00:37:09 +00:00
|
|
|
EightBit::register16_t m_disassembleAt = 0x0000;
|
|
|
|
bool m_ignoreDisassembly = false;
|
|
|
|
|
2019-01-14 02:10:17 +00:00
|
|
|
void updateAciaPins();
|
2018-10-27 20:58:23 +00:00
|
|
|
|
|
|
|
bool accessAcia();
|
2018-08-26 18:09:34 +00:00
|
|
|
};
|