openMSX
NinjaTap.hh
Go to the documentation of this file.
1 #ifndef NINJATAP_HH
2 #define NINJATAP_HH
3 
4 #include "JoyTap.hh"
5 
6 namespace openmsx {
7 
8 class NinjaTap final : public JoyTap
9 {
10 public:
12 
13  // Pluggable
14  std::string_view getDescription() const override;
15  void plugHelper(Connector& connector, EmuTime::param time) override;
16 
17  // JoystickDevice
18  byte read(EmuTime::param time) override;
19  void write(byte value, EmuTime::param time) override;
20 
21  template<typename Archive>
22  void serialize(Archive& ar, unsigned version);
23 
24 private:
25  byte status;
26  byte previous;
27  byte buf[4];
28 };
29 
30 } // namespace openmsx
31 
32 #endif
openmsx::JoyTap::pluggingController
PluggingController & pluggingController
Definition: JoyTap.hh:43
JoyTap.hh
openmsx::JoyTap
This device is pluged in into the joyports and consolidates several other joysticks plugged into it.
Definition: JoyTap.hh:20
openmsx::NinjaTap
Definition: NinjaTap.hh:8
openmsx::NinjaTap::plugHelper
void plugHelper(Connector &connector, EmuTime::param time) override
Definition: NinjaTap.cc:22
openmsx::NinjaTap::write
void write(byte value, EmuTime::param time) override
Write a value to the joystick device.
Definition: NinjaTap.cc:32
openmsx::NinjaTap::NinjaTap
NinjaTap(PluggingController &pluggingController, std::string name)
Definition: NinjaTap.cc:8
openmsx::NinjaTap::serialize
void serialize(Archive &ar, unsigned version)
Definition: NinjaTap.cc:73
openmsx::Connector
Represents something you can plug devices into.
Definition: Connector.hh:20
openmsx::PluggingController
Central administration of Connectors and Pluggables.
Definition: PluggingController.hh:21
openmsx
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
openmsx::NinjaTap::getDescription
std::string_view getDescription() const override
Description for this pluggable.
Definition: NinjaTap.cc:16
openmsx::NinjaTap::read
byte read(EmuTime::param time) override
Read from the joystick device.
Definition: NinjaTap.cc:27