17#include "Reflection.h"
108struct CmdTypeEnum : util::Reflection<CmdType, CmdType> {
110 static constexpr long minVal = 0;
111 static constexpr long maxVal =
CMD_FOCUS;
112 static bool isValid(
auto value) {
return value >= minVal && value <= maxVal; }
114 static const char *prefix() {
return "CMD"; }
115 static const char *key(
long value)
216 GamePadAction action;
247 struct { i64 value; i64 value2; };
258 Cmd(CmdType type, i64 v1 = 0, i64 v2 = 0) : type(type), value(v1), value2(v2) { }
259 Cmd(CmdType type,
const KeyCmd &cmd) : type(type), key(cmd) { }
260 Cmd(CmdType type,
const CoordCmd &cmd) : type(type), coord(cmd) { }
261 Cmd(CmdType type,
const GamePadCmd &cmd) : type(type), action(cmd) { }
262 Cmd(CmdType type,
const TapeCmd &cmd) : type(type), tape(cmd) { }
263 Cmd(CmdType type,
const AlarmCmd &cmd) : type(type), alarm(cmd) { }
264 Cmd(CmdType type,
const ShellCmd &cmd) : type(type), shell(cmd) { }
265 Cmd(CmdType type,
const ConfigCmd &cmd) : type(type), config(cmd) { }
VirtualC64 project namespace.
Definition CmdQueue.cpp:16
CMD_TYPE
Emulator command.
Definition CmdQueueTypes.h:28
@ CMD_WP_SET_AT
Set a watchpoint.
Definition CmdQueueTypes.h:57
@ CMD_BP_ENABLE_AT
Enable the breakpoint at an address.
Definition CmdQueueTypes.h:50
@ CMD_BP_MOVE_TO
Change the address of breakpoint.
Definition CmdQueueTypes.h:45
@ CMD_BP_DISABLE_ALL
Disable all brekpoints.
Definition CmdQueueTypes.h:54
@ CMD_CRT_SWITCH_RIGHT
Pull the cartridge switch right.
Definition CmdQueueTypes.h:98
@ CMD_KEY_PRESS
Press a key on the C64 keyboard.
Definition CmdQueueTypes.h:70
@ CMD_MOUSE_EVENT
Signal a mouse button event.
Definition CmdQueueTypes.h:78
@ CMD_CPU_NMI
Emulate an external expansion port NMI.
Definition CmdQueueTypes.h:41
@ CMD_DATASETTE_STOP
Press the datasette stop key.
Definition CmdQueueTypes.h:90
@ CMD_DATASETTE_PLAY
Press the datasette play key.
Definition CmdQueueTypes.h:89
@ CMD_WP_ENABLE_ALL
Enable all watchpoints.
Definition CmdQueueTypes.h:64
@ CMD_FOCUS
The emulator windows got or lost focus.
Definition CmdQueueTypes.h:104
@ CMD_BP_SET_AT
Set a breakpoint.
Definition CmdQueueTypes.h:44
@ CMD_DSK_MODIFIED
Signal that the disk has been saved.
Definition CmdQueueTypes.h:85
@ CMD_BP_DISABLE_NR
Disable the n-th breakpoint.
Definition CmdQueueTypes.h:52
@ CMD_BP_REMOVE_AT
Remove the breakpoint at an address.
Definition CmdQueueTypes.h:47
@ CMD_WP_DISABLE_NR
Disable the n-th watchpoint.
Definition CmdQueueTypes.h:65
@ CMD_BP_DISABLE_AT
Disable the breakpoint at an address.
Definition CmdQueueTypes.h:53
@ CMD_WP_DISABLE_AT
Disable the watchpoint at an address.
Definition CmdQueueTypes.h:66
@ CMD_CRT_BUTTON_RELEASE
Release a cartridge button.
Definition CmdQueueTypes.h:95
@ CMD_BP_ENABLE_ALL
Enable all brekpoints.
Definition CmdQueueTypes.h:51
@ CMD_JOY_EVENT
Signal a joystick button event.
Definition CmdQueueTypes.h:81
@ CMD_DSK_UNMODIFIED
Signan that the disk needs saving.
Definition CmdQueueTypes.h:86
@ CMD_WP_REMOVE_ALL
Remove all watchpoints.
Definition CmdQueueTypes.h:61
@ CMD_WP_REMOVE_AT
Remove the watchpoint at an address.
Definition CmdQueueTypes.h:60
@ CMD_WP_ENABLE_AT
Enable the watchpoint at an address.
Definition CmdQueueTypes.h:63
@ CMD_BP_REMOVE_ALL
Remove all brekpoints.
Definition CmdQueueTypes.h:48
@ CMD_WP_MOVE_TO
Change the address of watchpoint.
Definition CmdQueueTypes.h:58
@ CMD_DSK_TOGGLE_WP
Toggle write-protection.
Definition CmdQueueTypes.h:84
@ CMD_WP_DISABLE_ALL
Disable all watchpoints.
Definition CmdQueueTypes.h:67
@ CMD_NONE
None.
Definition CmdQueueTypes.h:29
@ CMD_DATASETTE_REWIND
Rewind the tape.
Definition CmdQueueTypes.h:91
@ CMD_MOUSE_MOVE_REL
Signal a mouse movement (relative)
Definition CmdQueueTypes.h:77
@ CMD_MOUSE_MOVE_ABS
Signal a mouse movement (absolute)
Definition CmdQueueTypes.h:76
@ CMD_ALARM_ABS
Schedule an alarm (absolute cycle)
Definition CmdQueueTypes.h:35
@ CMD_BP_REMOVE_NR
Remove the n-th breakpoint.
Definition CmdQueueTypes.h:46
@ CMD_KEY_TOGGLE
Press or release a key on the C64 keyboard.
Definition CmdQueueTypes.h:73
@ CMD_INSPECTION_TARGET
Sets the auto-inspection component.
Definition CmdQueueTypes.h:37
@ CMD_ALARM_REL
Schedule an alarm (relative cycle)
Definition CmdQueueTypes.h:36
@ CMD_CPU_BRK
Let the CPU execute a BRK instruction.
Definition CmdQueueTypes.h:40
@ CMD_KEY_RELEASE_ALL
Clear the keyboard matrix.
Definition CmdQueueTypes.h:72
@ CMD_WP_ENABLE_NR
Enable the n-th watchpoint.
Definition CmdQueueTypes.h:62
@ CMD_WP_REMOVE_NR
Remove the n-th watchpoint.
Definition CmdQueueTypes.h:59
@ CMD_BP_ENABLE_NR
Enable the n-th breakpoint.
Definition CmdQueueTypes.h:49
@ CMD_CRT_SWITCH_NEUTRAL
Put the cartridge switch in neutral position.
Definition CmdQueueTypes.h:97
@ CMD_CRT_BUTTON_PRESS
Press a cartridge button.
Definition CmdQueueTypes.h:94
@ CMD_CRT_SWITCH_LEFT
Pull the cartridge switch left.
Definition CmdQueueTypes.h:96
@ CMD_KEY_RELEASE
Release a key on the C64 keyboard.
Definition CmdQueueTypes.h:71
@ CMD_RSH_EXECUTE
Execute a script command.
Definition CmdQueueTypes.h:101
@ CMD_CONFIG
Configure the emulator.
Definition CmdQueueTypes.h:32