VirtualC64 v5.0 beta
Commodore 64 Emulator
Loading...
Searching...
No Matches
VideoPort.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 "VideoPortTypes.h"
16#include "SubComponent.h"
17
18namespace vc64 {
19
20class VideoPort final : public SubComponent {
21
22 Descriptions descriptions = {{
23
24 .name = "Video",
25 .description = "Video Port"
26 }};
27
28 ConfigOptions options = {
29
31 };
32
33 // Current configuration
34 VideoPortConfig config = { };
35
36
37 //
38 // Methods
39 //
40
41public:
42
43 VideoPort(C64 &ref);
44 const Descriptions &getDescriptions() const override { return descriptions; }
45
46 VideoPort& operator= (const VideoPort& other) {
47
48 CLONE(config)
49
50 return *this;
51 }
52
53
54 //
55 // Methods from Serializable
56 //
57
58public:
59
60 template <class T>
61 void serialize(T& worker)
62 {
63 if (isResetter(worker)) return;
64
65 worker
66
67 << config.whiteNoise;
68
69 } SERIALIZERS(serialize);
70
71
72 //
73 // Methods from CoreComponent
74 //
75
76private:
77
78 void _dump(Category category, std::ostream& os) const override;
79
80
81 //
82 // Methods from Configurable
83 //
84
85public:
86
87 const VideoPortConfig &getConfig() const { return config; }
88 const ConfigOptions &getOptions() const override { return options; }
89 i64 getOption(Option opt) const override;
90 void checkOption(Option opt, i64 value) override;
91 void setOption(Option opt, i64 value) override;
92
93
94 //
95 // Getting textures
96 //
97
98public:
99
100 // Returns a pointer to the stable emulator texture
101 u32 *getTexture() const;
102
103 // Returns a pointer to the stable DMA debugger texture
104 u32 *getDmaTexture() const;
105
106private:
107
108 // Returns a pointer to a white-noise texture
109 u32 *getNoiseTexture() const;
110
111 // Returns a pointer to a solid blank texture
112 u32 *getBlankTexture() const;
113};
114
115}
VirtualC64 project namespace.
Definition CmdQueue.cpp:16
@ OPT_VID_WHITE_NOISE
Generate white-noise when switched off.
Definition OptionTypes.h:70