2016-01-05 04:12:47 +00:00
|
|
|
//
|
|
|
|
// Electron.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 03/01/2016.
|
|
|
|
// Copyright © 2016 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef Electron_hpp
|
|
|
|
#define Electron_hpp
|
|
|
|
|
2016-09-08 09:32:17 +00:00
|
|
|
#include "../ConfigurationTarget.hpp"
|
2016-06-01 01:23:44 +00:00
|
|
|
#include "../CRTMachine.hpp"
|
2017-08-16 19:33:40 +00:00
|
|
|
#include "../KeyboardMachine.hpp"
|
2016-06-19 21:25:35 +00:00
|
|
|
|
|
|
|
#include <cstdint>
|
2016-09-20 11:36:57 +00:00
|
|
|
#include <vector>
|
2016-01-05 04:12:47 +00:00
|
|
|
|
|
|
|
namespace Electron {
|
|
|
|
|
2016-01-08 02:01:13 +00:00
|
|
|
enum ROMSlot: uint8_t {
|
2016-01-08 03:26:49 +00:00
|
|
|
ROMSlot0 = 0,
|
|
|
|
ROMSlot1, ROMSlot2, ROMSlot3,
|
|
|
|
ROMSlot4, ROMSlot5, ROMSlot6, ROMSlot7,
|
2016-01-08 02:01:13 +00:00
|
|
|
|
|
|
|
ROMSlotKeyboard = 8, ROMSlot9,
|
|
|
|
ROMSlotBASIC = 10, ROMSlot11,
|
|
|
|
|
2016-01-08 03:26:49 +00:00
|
|
|
ROMSlot12, ROMSlot13, ROMSlot14, ROMSlot15,
|
2016-01-08 02:01:13 +00:00
|
|
|
|
2017-11-07 03:14:15 +00:00
|
|
|
ROMSlotOS, ROMSlotDFS,
|
|
|
|
ROMSlotADFS1, ROMSlotADFS2
|
2016-01-07 02:09:49 +00:00
|
|
|
};
|
|
|
|
|
2016-01-23 05:14:44 +00:00
|
|
|
/*!
|
2016-01-21 02:55:38 +00:00
|
|
|
@abstract Represents an Acorn Electron.
|
2017-11-08 03:54:22 +00:00
|
|
|
|
2016-01-21 02:55:38 +00:00
|
|
|
@discussion An instance of Electron::Machine represents the current state of an
|
|
|
|
Acorn Electron.
|
|
|
|
*/
|
2016-06-19 21:25:35 +00:00
|
|
|
class Machine:
|
|
|
|
public CRTMachine::Machine,
|
2017-08-16 19:33:40 +00:00
|
|
|
public ConfigurationTarget::Machine,
|
|
|
|
public KeyboardMachine::Machine {
|
2016-01-05 04:12:47 +00:00
|
|
|
public:
|
2017-08-16 19:33:40 +00:00
|
|
|
virtual ~Machine();
|
|
|
|
|
|
|
|
/// Creates and returns an Electron.
|
|
|
|
static Machine *Electron();
|
|
|
|
|
|
|
|
/*!
|
|
|
|
Sets the contents of @c slot to @c data. If @c is_writeable is @c true then writing to the slot
|
|
|
|
is enabled — it acts as if it were sideways RAM. Otherwise the slot is modelled as containing ROM.
|
|
|
|
*/
|
2017-11-08 02:19:51 +00:00
|
|
|
virtual void set_rom(ROMSlot slot, const std::vector<uint8_t> &data, bool is_writeable) = 0;
|
2017-08-16 19:33:40 +00:00
|
|
|
|
|
|
|
/// Enables or disables turbo-speed tape loading.
|
|
|
|
virtual void set_use_fast_tape_hack(bool activate) = 0;
|
2016-01-05 04:12:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* Electron_hpp */
|