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  [[nodiscard]] std::string_view getDescription() const override;
15  void plugHelper(Connector& connector, EmuTime::param time) override;
16 
17  // JoystickDevice
18  [[nodiscard]] 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
Represents something you can plug devices into.
Definition: Connector.hh:21
This device is plugged in into the joyports and consolidates several other joysticks plugged into it.
Definition: JoyTap.hh:22
PluggingController & pluggingController
Definition: JoyTap.hh:44
void plugHelper(Connector &connector, EmuTime::param time) override
Definition: NinjaTap.cc:23
void serialize(Archive &ar, unsigned version)
Definition: NinjaTap.cc:74
std::string_view getDescription() const override
Description for this pluggable.
Definition: NinjaTap.cc:17
NinjaTap(PluggingController &pluggingController, std::string name)
Definition: NinjaTap.cc:9
byte read(EmuTime::param time) override
Read from the joystick device.
Definition: NinjaTap.cc:28
void write(byte value, EmuTime::param time) override
Write a value to the joystick device.
Definition: NinjaTap.cc:33
Central administration of Connectors and Pluggables.
This file implemented 3 utility functions:
Definition: Autofire.cc:9