VirtualC64 v5.0 beta
Commodore 64 Emulator
Loading...
Searching...
No Matches
GameKiller.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 GameKiller final : public Cartridge {
20
21 CartridgeTraits traits = {
22
23 .type = CRT_GAME_KILLER,
24 .title = "Game Killer",
25
26 .buttons = 1,
27 .button1 = "Freeze"
28 };
29
30 virtual const CartridgeTraits &getCartridgeTraits() const override { return traits; }
31
32public:
33
34 using Cartridge::Cartridge;
35
36private:
37
38 //
39 // Accessing cartridge memory
40 //
41
42 void resetCartConfig() override;
43
44 u8 peek(u16 addr) override;
45 u8 peekIO1(u16 addr) override { return 0; }
46 u8 spypeekIO1(u16 addr) const override { return 0; }
47 u8 peekIO2(u16 addr) override { return 0; }
48 u8 spypeekIO2(u16 addr) const override { return 0; }
49 void pokeIO1(u16 addr, u8 value) override;
50 void pokeIO2(u16 addr, u8 value) override;
51
52
53 //
54 // Operating buttons
55 //
56
57 isize numButtons() const override { return 1; }
58 const char *getButtonTitle(isize nr) const override;
59 void pressButton(isize nr) override;
60 void releaseButton(isize nr) override;
61
62
63 //
64 // Handling delegation calls
65 //
66
67 void updatePeekPokeLookupTables() override;
68 void nmiWillTrigger() override;
69};
70
71}
VirtualC64 project namespace.
Definition CmdQueue.cpp:16