openMSX
MagicKey.cc
Go to the documentation of this file.
1 #include "MagicKey.hh"
2 #include "serialize.hh"
3 #include "serialize_meta.hh"
4 
5 namespace openmsx {
6 
7 // Pluggable
8 std::string_view MagicKey::getName() const
9 {
10  return "magic-key";
11 }
12 
13 std::string_view MagicKey::getDescription() const
14 {
15  return "Dongle used by some Japanese games to enable cheat mode";
16 }
17 
18 void MagicKey::plugHelper(Connector& /*connector*/, EmuTime::param /*time*/)
19 {
20 }
21 
22 void MagicKey::unplugHelper(EmuTime::param /*time*/)
23 {
24 }
25 
26 
27 // JoystickDevice
28 byte MagicKey::read(EmuTime::param /*time*/)
29 {
31 }
32 
33 void MagicKey::write(byte /*value*/, EmuTime::param /*time*/)
34 {
35 }
36 
37 
38 template<typename Archive>
39 void MagicKey::serialize(Archive& /*ar*/, unsigned /*version*/)
40 {
41 }
44 
45 } // namespace openmsx
Represents something you can plug devices into.
Definition: Connector.hh:21
static constexpr int JOY_BUTTONA
static constexpr int JOY_RIGHT
static constexpr int JOY_LEFT
static constexpr int JOY_BUTTONB
byte read(EmuTime::param time) override
Read from the joystick device.
Definition: MagicKey.cc:28
void write(byte value, EmuTime::param time) override
Write a value to the joystick device.
Definition: MagicKey.cc:33
void serialize(Archive &ar, unsigned version)
Definition: MagicKey.cc:39
std::string_view getDescription() const override
Description for this pluggable.
Definition: MagicKey.cc:13
void plugHelper(Connector &connector, EmuTime::param time) override
Definition: MagicKey.cc:18
std::string_view getName() const override
Name used to identify this pluggable.
Definition: MagicKey.cc:8
void unplugHelper(EmuTime::param time) override
Definition: MagicKey.cc:22
This file implemented 3 utility functions:
Definition: Autofire.cc:5
REGISTER_POLYMORPHIC_INITIALIZER(Pluggable, CassettePlayer, "CassettePlayer")
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)
Definition: serialize.hh:983