2017-06-04 21:55:19 +00:00
|
|
|
//
|
|
|
|
// ZX8081.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 04/06/2017.
|
2018-05-13 19:19:52 +00:00
|
|
|
// Copyright 2017 Thomas Harte. All rights reserved.
|
2017-06-04 21:55:19 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef ZX8081_hpp
|
|
|
|
#define ZX8081_hpp
|
|
|
|
|
2021-03-18 02:40:29 +00:00
|
|
|
#include "../../../Configurable/Configurable.hpp"
|
|
|
|
#include "../../../Configurable/StandardOptions.hpp"
|
|
|
|
#include "../../../Analyser/Static/StaticAnalyser.hpp"
|
|
|
|
#include "../../ROMMachine.hpp"
|
2017-06-04 21:55:19 +00:00
|
|
|
|
2020-03-16 03:48:53 +00:00
|
|
|
#include <memory>
|
|
|
|
|
2021-03-18 02:40:29 +00:00
|
|
|
namespace Sinclair {
|
2017-06-04 21:55:19 +00:00
|
|
|
namespace ZX8081 {
|
|
|
|
|
2020-03-17 03:25:05 +00:00
|
|
|
/// The ZX80/81 machine.
|
2018-03-09 20:19:02 +00:00
|
|
|
class Machine {
|
2017-06-04 21:55:19 +00:00
|
|
|
public:
|
2017-08-11 16:11:01 +00:00
|
|
|
virtual ~Machine();
|
2018-07-11 00:00:46 +00:00
|
|
|
static Machine *ZX8081(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher);
|
2017-06-23 00:20:31 +00:00
|
|
|
|
2017-08-03 02:12:59 +00:00
|
|
|
virtual void set_tape_is_playing(bool is_playing) = 0;
|
2018-02-15 02:46:50 +00:00
|
|
|
virtual bool get_tape_is_playing() = 0;
|
2020-03-17 03:25:05 +00:00
|
|
|
|
|
|
|
/// Defines the runtime options available for a ZX80/81.
|
2020-03-18 03:52:55 +00:00
|
|
|
class Options: public Reflection::StructImpl<Options>, public Configurable::QuickloadOption<Options> {
|
|
|
|
friend Configurable::QuickloadOption<Options>;
|
2020-03-17 03:25:05 +00:00
|
|
|
public:
|
2021-04-18 15:56:22 +00:00
|
|
|
bool automatic_tape_motor_control = true;
|
2020-03-17 03:25:05 +00:00
|
|
|
|
|
|
|
Options(Configurable::OptionsType type):
|
2020-03-19 22:58:36 +00:00
|
|
|
Configurable::QuickloadOption<Options>(type == Configurable::OptionsType::UserFriendly),
|
|
|
|
automatic_tape_motor_control(type == Configurable::OptionsType::UserFriendly) {
|
2020-03-17 03:25:05 +00:00
|
|
|
|
|
|
|
// Declare fields if necessary.
|
|
|
|
if(needs_declare()) {
|
|
|
|
DeclareField(automatic_tape_motor_control);
|
2020-03-18 03:52:55 +00:00
|
|
|
declare_quickload_option();
|
2020-03-17 03:25:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
2017-06-04 21:55:19 +00:00
|
|
|
};
|
|
|
|
|
2021-03-18 02:40:29 +00:00
|
|
|
}
|
2017-06-04 21:55:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* ZX8081_hpp */
|