diff --git a/Analyser/Static/Enterprise/StaticAnalyser.cpp b/Analyser/Static/Enterprise/StaticAnalyser.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Analyser/Static/Enterprise/StaticAnalyser.hpp b/Analyser/Static/Enterprise/StaticAnalyser.hpp new file mode 100644 index 000000000..e69de29bb diff --git a/Analyser/Static/Enterprise/Target.hpp b/Analyser/Static/Enterprise/Target.hpp new file mode 100644 index 000000000..f77f01f50 --- /dev/null +++ b/Analyser/Static/Enterprise/Target.hpp @@ -0,0 +1,30 @@ +// +// Target.hpp +// Clock Signal +// +// Created by Thomas Harte on 14/06/2021. +// Copyright © 2021 Thomas Harte. All rights reserved. +// + +#ifndef Analyser_Static_Enterprise_Target_h +#define Analyser_Static_Enterprise_Target_h + +#include "../../../Reflection/Enum.hpp" +#include "../../../Reflection/Struct.hpp" +#include "../StaticAnalyser.hpp" + +namespace Analyser { +namespace Static { +namespace Enterprise { + +struct Target: public Analyser::Static::Target, public Reflection::StructImpl { + Target() : Analyser::Static::Target(Machine::Enterprise) {} + + // TODO: I assume there'll be relevant fields to add here. +}; + +} +} +} + +#endif /* Analyser_Static_Enterprise_Target_h */ diff --git a/Machines/Enterprise/Enterprise.cpp b/Machines/Enterprise/Enterprise.cpp index 102cbea31..50665c781 100644 --- a/Machines/Enterprise/Enterprise.cpp +++ b/Machines/Enterprise/Enterprise.cpp @@ -10,16 +10,21 @@ #include "../MachineTypes.hpp" +#include "../../Processors/Z80/Z80.hpp" + #include "../../Analyser/Static/Enterprise/Target.hpp" + namespace Enterprise { class ConcreteMachine: + public CPU::Z80::BusHandler, public Machine, public MachineTypes::ScanProducer, public MachineTypes::TimedMachine { public: - ConcreteMachine(const Analyser::Static::Enterprise::Target &target, const ROMMachine::ROMFetcher &rom_fetcher) { + ConcreteMachine(const Analyser::Static::Enterprise::Target &target, const ROMMachine::ROMFetcher &rom_fetcher) : + z80(*this) { // Request a clock of 4Mhz; this'll be mapped upwards for Nick and Dave elsewhere. set_clock_rate(4'000'000); @@ -28,6 +33,14 @@ class ConcreteMachine: } private: + CPU::Z80::Processor z80_; + + // MARK: - Z80::BusHandler. + forceinline HalfCycles perform_machine_cycle(const CPU::Z80::PartialMachineCycle &cycle) { + (void)cycle; + return HalfCycles(0); + } + // MARK: - ScanProducer void set_scan_target(Outputs::Display::ScanTarget *scan_target) override { (void)scan_target;