16#include "CoreObject.h"
17#include "Synchronizable.h"
18#include "Serializable.h"
19#include "Configurable.h"
20#include "Inspectable.h"
21#include "Concurrency.h"
22#include "Suspendable.h"
31 const char *description;
34typedef std::vector<Description> Descriptions;
37public CoreObject,
public Serializable,
public Suspendable,
public Synchronizable,
public Configurable {
42 class Emulator &emulator;
48 std::vector<CoreComponent *> subComponents;
57 CoreComponent(Emulator& ref) : emulator(ref), objid(0) { }
58 CoreComponent(Emulator& ref, isize
id) : emulator(ref), objid(id) { }
60 virtual const Descriptions &getDescriptions()
const = 0;
61 const char *objectName()
const override;
62 const char *description()
const override;
64 bool operator== (CoreComponent &other);
65 bool operator!= (CoreComponent &other) {
return !(other == *
this); }
71 virtual void _initialize() { }
80 void reset(
bool hard);
81 virtual void _reset(
bool hard) { }
84 i64 getFallback(Option opt)
const override;
87 virtual void resetConfig();
90 void routeOption(Option opt, std::vector<Configurable *> &result);
99 virtual bool isPoweredOff()
const;
100 virtual bool isPoweredOn()
const;
101 virtual bool isPaused()
const;
102 virtual bool isRunning()
const;
103 virtual bool isSuspended()
const;
104 virtual bool isHalted()
const;
106 void suspend()
override;
107 void resume()
override;
110 virtual void isReady() const throws;
126 void powerOnOff(
bool value) { value ? powerOn() : powerOff(); }
127 void warpOnOff(
bool value) { value ? warpOn() : warpOff(); }
128 void trackOnOff(
bool value) { value ? trackOn() : trackOff(); }
132 virtual void _isReady() const throws { }
133 virtual void _powerOn() { }
134 virtual void _powerOff() { }
135 virtual void _run() { }
136 virtual void _pause() { }
137 virtual void _halt() { }
138 virtual void _warpOn() { }
139 virtual void _warpOff() { }
140 virtual void _trackOn() { }
141 virtual void _trackOff() { }
142 virtual void _focus() { }
143 virtual void _unfocus() { }
152 bool isEmulatorThread()
const;
155 void exportConfig(std::ostream& ss,
bool diff =
false)
const;
156 void exportDiff(std::ostream& ss)
const { exportConfig(ss,
true); }
166 class AudioPort &audioPort;
170 class ControlPort &port1;
171 class ControlPort &port2;
173 class Datasette &datasette;
174 class Debugger &debugger;
177 class ExpansionPort &expansionPort;
179 class SerialPort &serialPort;
180 class Keyboard &keyboard;
181 class C64Memory &mem;
182 class Monitor &monitor;
183 class MsgQueue &msgQueue;
184 class ParCable &parCable;
185 class PowerPort &powerSupply;
186 class Recorder &recorder;
187 class RegressionTester ®ressionTester;
188 class RetroShell &retroShell;
189 class SIDBridge &sidBridge;
195 class VideoPort &videoPort;
197 Drive *drive[2] = { &drive8, &drive9 };
201 References(C64& ref);
VirtualC64 project namespace.
Definition CmdQueue.cpp:16