VirtualC64 v5.0 beta
Commodore 64 Emulator
Loading...
Searching...
No Matches
PowerPort.h
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// -----------------------------------------------------------------------------
12
13#pragma once
14
15#include "PowerPortTypes.h"
16#include "SubComponent.h"
17#include "Chrono.h"
18
19namespace vc64 {
20
21class PowerPort final : public SubComponent {
22
23 Descriptions descriptions = {{
24
25 .name = "Power",
26 .description = "Power Port"
27 }};
28
29 ConfigOptions options = {
30
32 };
33
34 PowerPortConfig config = { };
35
36
37 //
38 // Methods
39 //
40
41public:
42
43 PowerPort(C64& ref);
44 PowerPort& operator= (const PowerPort& other) { return *this; }
45
46
47 //
48 // Methods from Serializable
49 //
50
51public:
52
53 template <class T> void serialize(T& worker) { } SERIALIZERS(serialize);
54
55
56 //
57 // Methods from CoreComponent
58 //
59
60public:
61
62 const Descriptions &getDescriptions() const override { return descriptions; }
63
64private:
65
66 void _dump(Category category, std::ostream& os) const override;
67
68
69 //
70 // Methods from Inspectable
71 //
72
73public:
74
75 const PowerPortConfig &getConfig() const { return config; }
76 const ConfigOptions &getOptions() const override { return options; }
77 i64 getOption(Option opt) const override;
78 void checkOption(Option opt, i64 value) override;
79 void setOption(Option opt, i64 value) override;
80
81
82 //
83 // Using the device
84 //
85
86public:
87
88 // Returns the number of CPU cycles between two TOD increments
89 Cycle todTickDelay(u8 cra);
90};
91
92}
VirtualC64 project namespace.
Definition CmdQueue.cpp:16
@ OPT_POWER_GRID
Power-grid stability (affects TOD)
Definition OptionTypes.h:98