VirtualC64 v5.0 beta
Commodore 64 Emulator
Loading...
Searching...
No Matches
DatasetteTypes.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2// This file is part of VirtualC64
3//
4// Copyright (C) Dirk W. Hoffmann. www.dirkwhoffmann.de
5// This FILE is dual-licensed. You are free to choose between:
6//
7// - The GNU General Public License v3 (or any later version)
8// - The Mozilla Public License v2
9//
10// SPDX-License-Identifier: GPL-3.0-or-later OR MPL-2.0
11// -----------------------------------------------------------------------------
13
14#pragma once
15
16#include "Reflection.h"
17
18namespace vc64 {
19
20//
21// Enumerations
22//
23
29typedef DATASETTE_MODEL DatasetteModel;
30
31struct DatasetteModelEnum : util::Reflection<DatasetteModelEnum, DatasetteModel> {
32
33 static constexpr long minVal = 0;
34 static constexpr long maxVal = DATASETTE_C1530;
35 static bool isValid(auto value) { return value >= minVal && value <= maxVal; }
36
37 static const char *prefix() { return "DATASETTE"; }
38 static const char *key(long value)
39 {
40 switch (value) {
41
42 case DATASETTE_C1530: return "C1530";
43 }
44 return "???";
45 }
46};
47
48//
49// Structures
50//
51
53typedef struct
54{
56 bool connected;
57}
59
61typedef struct
62{
63 bool hasTape;
64 u8 type;
65 bool motor;
66 bool playKey;
67 isize counter;
68}
70
71}
VirtualC64 project namespace.
Definition CmdQueue.cpp:16
DATASETTE_MODEL
Datasette model.
Definition DatasetteTypes.h:26
@ DATASETTE_C1530
Standard datasette (Commodore)
Definition DatasetteTypes.h:27
Datasette configuration.
Definition DatasetteTypes.h:54
DatasetteModel model
Datasette model.
Definition DatasetteTypes.h:55
bool connected
Connection status.
Definition DatasetteTypes.h:56
Datasette current state.
Definition DatasetteTypes.h:62
bool hasTape
Is a tape inserted?
Definition DatasetteTypes.h:63
u8 type
TAP file format.
Definition DatasetteTypes.h:64
bool motor
Is the motor on?
Definition DatasetteTypes.h:65
isize counter
Progress counter.
Definition DatasetteTypes.h:67
bool playKey
Is the play key pressed?
Definition DatasetteTypes.h:66