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  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
This device is pluged in into the joyports and consolidates several other joysticks plugged into it...
Definition: JoyTap.hh:20
void write(byte value, EmuTime::param time) override
Write a value to the joystick device.
Definition: NinjaTap.cc:32
Represents something you can plug devices into.
Definition: Connector.hh:20
uint8_t byte
8 bit unsigned integer
Definition: openmsx.hh:26
PluggingController & pluggingController
Definition: JoyTap.hh:43
Central administration of Connectors and Pluggables.
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
string_view getDescription() const override
Description for this pluggable.
Definition: NinjaTap.cc:16
void plugHelper(Connector &connector, EmuTime::param time) override
Definition: NinjaTap.cc:22
NinjaTap(PluggingController &pluggingController, std::string name)
Definition: NinjaTap.cc:8
byte read(EmuTime::param time) override
Read from the joystick device.
Definition: NinjaTap.cc:27
This class implements a (close approximation) of the std::string_view class.
Definition: string_view.hh:16
void serialize(Archive &ar, unsigned version)
Definition: NinjaTap.cc:73