2016-06-04 21:43:50 -04:00
|
|
|
//
|
|
|
|
// Vic20.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 04/06/2016.
|
2018-05-13 15:19:52 -04:00
|
|
|
// Copyright 2016 Thomas Harte. All rights reserved.
|
2016-06-04 21:43:50 -04:00
|
|
|
//
|
|
|
|
|
2024-01-16 23:34:46 -05:00
|
|
|
#pragma once
|
2016-06-04 21:43:50 -04:00
|
|
|
|
2020-03-18 20:23:55 -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"
|
|
|
|
|
|
|
|
#include <memory>
|
2016-07-10 12:57:17 -04:00
|
|
|
|
2023-05-10 16:02:18 -05:00
|
|
|
namespace Commodore::Vic20 {
|
2016-06-04 21:43:50 -04:00
|
|
|
|
2017-11-20 21:55:32 -05:00
|
|
|
/// @returns The options available for a Vic-20.
|
2020-03-15 23:48:53 -04:00
|
|
|
std::unique_ptr<Reflection::Struct> get_options();
|
2017-11-20 21:55:32 -05:00
|
|
|
|
2018-03-09 15:19:02 -05:00
|
|
|
class Machine {
|
2016-06-04 22:00:50 -04:00
|
|
|
public:
|
2017-08-16 16:05:30 -04:00
|
|
|
virtual ~Machine();
|
2016-12-03 13:30:27 -05:00
|
|
|
|
2017-08-16 16:23:33 -04:00
|
|
|
/// Creates and returns a Vic-20.
|
2024-01-12 22:03:19 -05:00
|
|
|
static std::unique_ptr<Machine> Vic20(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher);
|
2020-03-18 20:23:55 -04:00
|
|
|
|
|
|
|
class Options: public Reflection::StructImpl<Options>, public Configurable::DisplayOption<Options>, public Configurable::QuickloadOption<Options> {
|
|
|
|
friend Configurable::DisplayOption<Options>;
|
|
|
|
friend Configurable::QuickloadOption<Options>;
|
|
|
|
public:
|
|
|
|
Options(Configurable::OptionsType type) :
|
|
|
|
Configurable::DisplayOption<Options>(type == Configurable::OptionsType::UserFriendly ? Configurable::Display::SVideo : Configurable::Display::CompositeColour),
|
|
|
|
Configurable::QuickloadOption<Options>(type == Configurable::OptionsType::UserFriendly) {
|
|
|
|
if(needs_declare()) {
|
|
|
|
declare_display_option();
|
|
|
|
declare_quickload_option();
|
|
|
|
limit_enum(&output, Configurable::Display::SVideo, Configurable::Display::CompositeColour, -1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
2016-06-04 21:43:50 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|