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