VirtualC64 v5.0 beta
Commodore 64 Emulator
Loading...
Searching...
No Matches
ParCable.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 "ParCableTypes.h"
16#include "DriveTypes.h"
17#include "SubComponent.h"
18
19namespace vc64 {
20
21class ParCable final : public SubComponent {
22
23 Descriptions descriptions = {{
24
25 .name = "ParCable",
26 .description = "Parallel Drive Cable"
27 }};
28
29public:
30
31 ParCable(C64 &ref);
32
33 ParCable& operator= (const ParCable& other) { return *this; }
34
35
36 //
37 // Methods from Serializable
38 //
39
40public:
41
42 template <class T> void serialize(T& worker) { } SERIALIZERS(serialize);
43
44
45 //
46 // Methods from CoreComponent
47 //
48
49public:
50
51 const Descriptions &getDescriptions() const override { return descriptions; }
52
53private:
54
55 void _dump(Category category, std::ostream& os) const override;
56
57
58 //
59 // Using
60 //
61
62public:
63
64 // Returns the current value on the cable
65 u8 getValue() const;
66
67 // Sends a handshake signal
68 void driveHandshake();
69 void c64Handshake();
70
71private:
72
73 void c64Handshake(Drive &drive);
74
75private:
76
77 // Collects port values
78 u8 getCIA() const;
79 u8 getVIA(const Drive &drive) const;
80 u8 getPIA(const Drive &drive) const;
81};
82
83}
VirtualC64 project namespace.
Definition CmdQueue.cpp:16