1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-25 18:30:07 +00:00

Add Enterprise parts of the static analyser.

This commit is contained in:
Thomas Harte 2021-06-14 21:11:06 -04:00
parent 88f2a2940b
commit c5a86f0ef7
4 changed files with 44 additions and 1 deletions

View File

@ -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> {
Target() : Analyser::Static::Target(Machine::Enterprise) {}
// TODO: I assume there'll be relevant fields to add here.
};
}
}
}
#endif /* Analyser_Static_Enterprise_Target_h */

View File

@ -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<ConcreteMachine, false, false> 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;