2023-11-15 16:01:28 +00:00
|
|
|
//
|
|
|
|
// PCCompatible.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 15/11/2023.
|
|
|
|
// Copyright © 2023 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
2024-01-17 04:34:46 +00:00
|
|
|
#pragma once
|
2023-11-15 16:01:28 +00:00
|
|
|
|
2023-12-06 18:55:41 +00:00
|
|
|
#include "../../Configurable/Configurable.hpp"
|
|
|
|
#include "../../Configurable/StandardOptions.hpp"
|
2023-11-15 16:01:28 +00:00
|
|
|
#include "../../Analyser/Static/StaticAnalyser.hpp"
|
|
|
|
#include "../ROMMachine.hpp"
|
|
|
|
|
|
|
|
namespace PCCompatible {
|
|
|
|
|
|
|
|
/*!
|
|
|
|
Models a PC compatible.
|
|
|
|
*/
|
2024-12-07 16:15:38 +00:00
|
|
|
struct Machine {
|
|
|
|
virtual ~Machine() = default;
|
|
|
|
|
|
|
|
/// Creates and returns a PC Compatible.
|
|
|
|
static std::unique_ptr<Machine> PCCompatible(
|
|
|
|
const Analyser::Static::Target *target,
|
|
|
|
const ROMMachine::ROMFetcher &rom_fetcher
|
|
|
|
);
|
|
|
|
|
|
|
|
/// Defines the runtime options [sometimes] available for a PC.
|
|
|
|
class Options:
|
|
|
|
public Reflection::StructImpl<Options>,
|
|
|
|
public Configurable::DisplayOption<Options>
|
|
|
|
{
|
|
|
|
friend Configurable::DisplayOption<Options>;
|
2023-11-15 16:01:28 +00:00
|
|
|
public:
|
2024-12-07 16:15:38 +00:00
|
|
|
Options(Configurable::OptionsType) :
|
|
|
|
Configurable::DisplayOption<Options>(Configurable::Display::RGB) {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
Options() : Options(Configurable::OptionsType::UserFriendly) {}
|
|
|
|
|
|
|
|
friend Reflection::StructImpl<Options>;
|
|
|
|
void declare_fields() {
|
|
|
|
declare_display_option();
|
|
|
|
limit_enum(&output, Configurable::Display::RGB, Configurable::Display::CompositeColour, -1);
|
|
|
|
}
|
|
|
|
};
|
2023-11-15 16:01:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|