2016-01-05 04:12:47 +00:00
|
|
|
//
|
|
|
|
// Electron.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 03/01/2016.
|
2018-05-13 19:19:52 +00:00
|
|
|
// Copyright 2016 Thomas Harte. All rights reserved.
|
2016-01-05 04:12:47 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef Electron_hpp
|
|
|
|
#define Electron_hpp
|
|
|
|
|
2017-11-18 04:02:00 +00:00
|
|
|
#include "../../Configurable/Configurable.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
|
|
|
};
|
|
|
|
|
2017-11-21 02:55:32 +00:00
|
|
|
/// @returns The options available for an Electron.
|
|
|
|
std::vector<std::unique_ptr<Configurable::Option>> get_options();
|
|
|
|
|
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.
|
|
|
|
*/
|
2018-03-09 20:19:02 +00:00
|
|
|
class 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
|
2018-05-13 19:34:31 +00:00
|
|
|
is enabled: it acts as if it were sideways RAM. Otherwise the slot is modelled as containing ROM.
|
2017-08-16 19:33:40 +00:00
|
|
|
*/
|
2017-11-08 02:19:51 +00:00
|
|
|
virtual void set_rom(ROMSlot slot, const std::vector<uint8_t> &data, bool is_writeable) = 0;
|
2016-01-05 04:12:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* Electron_hpp */
|