2021-06-15 00:55:39 +00:00
|
|
|
//
|
|
|
|
// Enterprise.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 10/06/2021.
|
|
|
|
// Copyright © 2021 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
2024-01-17 04:34:46 +00:00
|
|
|
#pragma once
|
2021-06-15 00:55:39 +00:00
|
|
|
|
|
|
|
#include "../../Analyser/Static/StaticAnalyser.hpp"
|
2021-07-03 01:42:09 +00:00
|
|
|
#include "../../Configurable/Configurable.hpp"
|
|
|
|
#include "../../Configurable/StandardOptions.hpp"
|
2021-06-15 00:55:39 +00:00
|
|
|
#include "../ROMMachine.hpp"
|
|
|
|
|
2024-01-13 03:03:19 +00:00
|
|
|
#include <memory>
|
|
|
|
|
2021-06-15 00:55:39 +00:00
|
|
|
namespace Enterprise {
|
|
|
|
|
2021-07-03 01:42:09 +00:00
|
|
|
/*!
|
|
|
|
@abstract Represents an Elan Enterprise.
|
|
|
|
|
|
|
|
@discussion An instance of Enterprise::Machine represents the current state of an
|
|
|
|
Elan Enterprise.
|
|
|
|
*/
|
2021-06-15 00:55:39 +00:00
|
|
|
class Machine {
|
|
|
|
public:
|
2024-02-17 02:47:23 +00:00
|
|
|
virtual ~Machine() = default;
|
2024-01-13 03:03:19 +00:00
|
|
|
static std::unique_ptr<Machine> Enterprise(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher);
|
2021-06-15 00:55:39 +00:00
|
|
|
|
2021-07-03 01:42:09 +00:00
|
|
|
/// Defines the runtime options available for an Enterprise.
|
|
|
|
class Options: public Reflection::StructImpl<Options>, public Configurable::DisplayOption<Options> {
|
|
|
|
friend Configurable::DisplayOption<Options>;
|
|
|
|
public:
|
|
|
|
Options(Configurable::OptionsType type) :
|
|
|
|
Configurable::DisplayOption<Options>(type == Configurable::OptionsType::UserFriendly ? Configurable::Display::RGB : Configurable::Display::CompositeColour) {
|
|
|
|
if(needs_declare()) {
|
|
|
|
declare_display_option();
|
|
|
|
limit_enum(&output, Configurable::Display::RGB, Configurable::Display::CompositeColour, Configurable::Display::CompositeMonochrome, -1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
2021-06-15 00:55:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
};
|