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
|
|
|
|
|
2020-03-17 03:25:05 +00:00
|
|
|
#include "../../Configurable/Configurable.hpp"
|
2020-03-18 03:52:55 +00:00
|
|
|
#include "../../Configurable/StandardOptions.hpp"
|
2018-03-09 20:19:02 +00:00
|
|
|
#include "../../Analyser/Static/StaticAnalyser.hpp"
|
2018-07-11 00:00:46 +00:00
|
|
|
#include "../ROMMachine.hpp"
|
2017-06-04 21:55:19 +00:00
|
|
|
|
2020-03-16 03:48:53 +00:00
|
|
|
#include <memory>
|
|
|
|
|
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();
|
2017-07-09 00:40:19 +00:00
|
|
|
|
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:
|
|
|
|
bool automatic_tape_motor_control;
|
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* ZX8081_hpp */
|