2017-07-30 22:05:29 -04:00
|
|
|
//
|
|
|
|
// AmstradCPC.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 30/07/2017.
|
2018-05-13 15:19:52 -04:00
|
|
|
// Copyright 2017 Thomas Harte. All rights reserved.
|
2017-07-30 22:05:29 -04:00
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef AmstradCPC_hpp
|
|
|
|
#define AmstradCPC_hpp
|
|
|
|
|
2020-03-16 23:25:05 -04:00
|
|
|
#include "../../Configurable/Configurable.hpp"
|
|
|
|
#include "../../Configurable/StandardOptions.hpp"
|
2018-07-10 20:00:46 -04:00
|
|
|
#include "../../Analyser/Static/StaticAnalyser.hpp"
|
|
|
|
#include "../ROMMachine.hpp"
|
2018-06-21 20:00:49 -04:00
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
2017-07-30 22:05:29 -04:00
|
|
|
namespace AmstradCPC {
|
|
|
|
|
2017-08-02 20:37:26 -04:00
|
|
|
/*!
|
2017-08-16 14:53:03 -04:00
|
|
|
Models an Amstrad CPC.
|
2017-08-02 20:37:26 -04:00
|
|
|
*/
|
2018-03-09 15:19:02 -05:00
|
|
|
class Machine {
|
2017-07-30 22:05:29 -04:00
|
|
|
public:
|
2017-08-11 12:07:48 -04:00
|
|
|
virtual ~Machine();
|
|
|
|
|
2017-08-16 15:33:40 -04:00
|
|
|
/// Creates and returns an Amstrad CPC.
|
2018-07-10 20:00:46 -04:00
|
|
|
static Machine *AmstradCPC(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher);
|
2020-03-16 23:25:05 -04:00
|
|
|
|
2020-03-17 21:53:26 -04:00
|
|
|
/// Defines the runtime options available for an Amstrad CPC.
|
2021-03-15 11:37:03 -04:00
|
|
|
class Options:
|
|
|
|
public Reflection::StructImpl<Options>,
|
|
|
|
public Configurable::DisplayOption<Options>,
|
|
|
|
public Configurable::QuickloadOption<Options>
|
|
|
|
{
|
2020-03-17 23:52:55 -04:00
|
|
|
friend Configurable::DisplayOption<Options>;
|
2021-03-12 22:57:02 -05:00
|
|
|
friend Configurable::QuickloadOption<Options>;
|
2020-03-16 23:25:05 -04:00
|
|
|
public:
|
2021-03-12 22:57:02 -05:00
|
|
|
Options(Configurable::OptionsType type) :
|
|
|
|
Configurable::DisplayOption<Options>(Configurable::Display::RGB),
|
|
|
|
Configurable::QuickloadOption<Options>(type == Configurable::OptionsType::UserFriendly)
|
|
|
|
{
|
2020-03-16 23:25:05 -04:00
|
|
|
if(needs_declare()) {
|
2020-03-17 23:52:55 -04:00
|
|
|
declare_display_option();
|
2021-03-12 22:57:02 -05:00
|
|
|
declare_quickload_option();
|
2020-03-17 21:44:04 -04:00
|
|
|
limit_enum(&output, Configurable::Display::RGB, Configurable::Display::CompositeColour, -1);
|
2020-03-16 23:25:05 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
2017-07-30 22:05:29 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* AmstradCPC_hpp */
|