1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-22 12:33:29 +00:00
CLK/Machines/Apple/AppleII/AppleII.hpp

44 lines
1.2 KiB
C++
Raw Normal View History

//
// AppleII.hpp
// Clock Signal
//
// Created by Thomas Harte on 14/04/2018.
// Copyright 2018 Thomas Harte. All rights reserved.
//
#pragma once
2020-03-18 01:53:26 +00:00
#include "../../../Configurable/Configurable.hpp"
#include "../../../Configurable/StandardOptions.hpp"
#include "../../../Analyser/Static/StaticAnalyser.hpp"
#include "../../ROMMachine.hpp"
#include <memory>
2023-05-10 21:02:18 +00:00
namespace Apple::II {
class Machine {
public:
2024-02-17 02:47:23 +00:00
virtual ~Machine() = default;
/// Creates and returns an AppleII.
static std::unique_ptr<Machine> AppleII(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher);
2020-03-18 01:53:26 +00:00
/// Defines the runtime options available for an Apple II.
class Options: public Reflection::StructImpl<Options>, public Configurable::DisplayOption<Options> {
friend Configurable::DisplayOption<Options>;
2020-03-18 01:53:26 +00:00
public:
bool use_square_pixels = false;
Options(Configurable::OptionsType) : Configurable::DisplayOption<Options>(Configurable::Display::CompositeColour) {
2020-03-18 01:53:26 +00:00
if(needs_declare()) {
DeclareField(use_square_pixels);
declare_display_option();
2020-03-18 01:53:26 +00:00
limit_enum(&output, Configurable::Display::CompositeMonochrome, Configurable::Display::CompositeColour, -1);
}
}
};
};
}