mirror of
https://github.com/TomHarte/CLK.git
synced 2024-06-27 01:29:31 +00:00
44 lines
1.0 KiB
C++
44 lines
1.0 KiB
C++
|
//
|
||
|
// PCCompatible.cpp
|
||
|
// Clock Signal
|
||
|
//
|
||
|
// Created by Thomas Harte on 15/11/2023.
|
||
|
// Copyright © 2023 Thomas Harte. All rights reserved.
|
||
|
//
|
||
|
|
||
|
#include "PCCompatible.hpp"
|
||
|
#include "../../InstructionSets/x86/Instruction.hpp"
|
||
|
#include "../../InstructionSets/x86/Perform.hpp"
|
||
|
|
||
|
#include "../TimedMachine.hpp"
|
||
|
|
||
|
namespace PCCompatible {
|
||
|
|
||
|
class ConcreteMachine:
|
||
|
public Machine,
|
||
|
public MachineTypes::TimedMachine
|
||
|
{
|
||
|
public:
|
||
|
ConcreteMachine(
|
||
|
[[maybe_unused]] const Analyser::Static::Target &target,
|
||
|
[[maybe_unused]] const ROMMachine::ROMFetcher &rom_fetcher
|
||
|
) {
|
||
|
// This is actually a MIPS count; try 3 million.
|
||
|
set_clock_rate(3'000'000);
|
||
|
}
|
||
|
|
||
|
void run_for([[maybe_unused]] const Cycles cycles) override {}
|
||
|
};
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
using namespace PCCompatible;
|
||
|
|
||
|
// See header; constructs and returns an instance of the Amstrad CPC.
|
||
|
Machine *Machine::PCCompatible(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher) {
|
||
|
return new PCCompatible::ConcreteMachine(*target, rom_fetcher);
|
||
|
}
|
||
|
|
||
|
Machine::~Machine() {}
|