VirtualC64 v5.0 beta
Commodore 64 Emulator
Loading...
Searching...
No Matches
SuperGames.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 "Cartridge.h"
16
17namespace vc64 {
18
19class SuperGames final : public Cartridge {
20
21 CartridgeTraits traits = {
22
23 .type = CRT_SUPER_GAMES,
24 .title = "Super Games",
25 };
26
27 virtual const CartridgeTraits &getCartridgeTraits() const override { return traits; }
28
29 // Write protection latch
30 bool protect = false;
31
32public:
33
34 SuperGames(C64 &ref) : Cartridge(ref) { };
35
36
37 //
38 // Methods from CoreObject
39 //
40
41private:
42
43 void _dump(Category category, std::ostream& os) const override;
44
45
46 //
47 // Methods from CoreComponent
48 //
49
50public:
51
52 SuperGames& operator= (const SuperGames& other) {
53
54 Cartridge::operator=(other);
55
56 CLONE(protect)
57
58 return *this;
59 }
60 virtual void clone(const Cartridge &other) override { *this = (const SuperGames &)other; }
61
62 template <class T>
63 void serialize(T& worker)
64 {
65 worker
66
67 << protect;
68
69 } CARTRIDGE_SERIALIZERS(serialize)
70
71
72 //
73 // Accessing cartridge memory
74 //
75
76public:
77
78 void pokeIO2(u16 addr, u8 value) override;
79};
80
81}
VirtualC64 project namespace.
Definition CmdQueue.cpp:16