26class Emulator :
public Thread,
public Synchronizable,
27public Inspectable<EmulatorInfo, EmulatorStats>,
public Configurable {
32 ConfigOptions options = { };
36 C64 main = C64(*
this, 0);
39 C64 ahead = C64(*
this, 1);
50 static Defaults defaults;
53 Host host = Host(*
this);
66 void launch(
const void *listener, Callback *func);
72 bool isInitialized()
const;
84 const char *objectName()
const override {
return "Emulator"; }
88 void _dump(Category category, std::ostream& os)
const override;
107 const ConfigOptions &getOptions()
const override {
return options; }
108 i64 getOption(
Option opt)
const override;
109 void checkOption(
Option opt, i64 value)
override;
110 void setOption(
Option opt, i64 value)
override;
120 i64 get(
Option opt, isize
id = 0)
const;
123 void check(
Option opt, i64 value, std::optional<isize>
id = std::nullopt);
126 void set(
Option opt, i64 value, std::optional<isize>
id = std::nullopt);
129 void set(
Option opt,
const string &value)
throws;
130 void set(
Option opt,
const string &value, isize
id)
throws;
131 void set(
const string &opt,
const string &value)
throws;
132 void set(
const string &opt,
const string &value, isize
id)
throws;
143 std::vector<Configurable *> routeOption(
Option opt);
144 std::vector<const Configurable *> routeOption(
Option opt)
const;
147 i64 overrideOption(
Option opt, i64 value)
const;
150 void revertToFactorySettings();
159 void update()
override;
161 isize missingFrames()
const override;
162 void computeFrame()
override;
163 void recreateRunAheadInstance();
165 void _powerOn()
override { main.powerOn(); }
166 void _powerOff()
override { main.powerOff(); }
167 void _pause()
override { main.pause(); }
168 void _run()
override { main.run(); }
169 void _halt()
override { main.halt(); }
170 void _warpOn()
override { main.warpOn(); }
171 void _warpOff()
override { main.warpOff(); }
172 void _trackOn()
override { main.trackOn(); }
173 void _trackOff()
override { main.trackOff(); }
175 void isReady()
override;
179 double refreshRate()
const override;
196 u32 *getTexture()
const;
197 u32 *getDmaTexture()
const;
207 void put(
const Cmd &cmd);
208 void put(
CmdType type, i64 payload) { put (Cmd(type, payload)); }
213 void process(
const Cmd &cmd);
Command queue.
Definition CmdQueue.h:25
Inspection interface.
Definition Inspectable.h:32
Implements the emulator's state model.
Definition Thread.h:35
Public API.
Definition VirtualC64.h:1086
VirtualC64 project namespace.
Definition CmdQueue.cpp:16
C64_MODEL
C64 model.
Definition C64Types.h:33
CMD_TYPE
Emulator command.
Definition CmdQueueTypes.h:28
OPT
Configuration option.
Definition OptionTypes.h:26
The current emulator configuration.
Definition EmulatorTypes.h:302
The current emulator state.
Definition EmulatorTypes.h:309
Collected run-time data.
Definition EmulatorTypes.h:323