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