openMSX
NinjaTap.hh
Go to the documentation of this file.
1#ifndef NINJATAP_HH
2#define NINJATAP_HH
3
4#include "JoyTap.hh"
5#include <array>
6
7namespace openmsx {
8
9class NinjaTap final : public JoyTap
10{
11public:
13
14 // Pluggable
15 [[nodiscard]] std::string_view getDescription() const override;
16 void plugHelper(Connector& connector, EmuTime::param time) override;
17
18 // JoystickDevice
19 [[nodiscard]] uint8_t read(EmuTime::param time) override;
20 void write(uint8_t value, EmuTime::param time) override;
21
22 template<typename Archive>
23 void serialize(Archive& ar, unsigned version);
24
25private:
26 uint8_t status = 0x3F; // TODO check initial value
27 uint8_t previous = 0;
28 std::array<uint8_t, 4> buf;
29};
30
31} // namespace openmsx
32
33#endif
Represents something you can plug devices into.
Definition Connector.hh:21
This device is plugged in into the joy-ports and consolidates several other joysticks plugged into it...
Definition JoyTap.hh:23
PluggingController & pluggingController
Definition JoyTap.hh:45
void plugHelper(Connector &connector, EmuTime::param time) override
Definition NinjaTap.cc:25
void serialize(Archive &ar, unsigned version)
Definition NinjaTap.cc:78
std::string_view getDescription() const override
Description for this pluggable.
Definition NinjaTap.cc:19
uint8_t read(EmuTime::param time) override
Read from the joystick device.
Definition NinjaTap.cc:30
void write(uint8_t value, EmuTime::param time) override
Write a value to the joystick device.
Definition NinjaTap.cc:35
Central administration of Connectors and Pluggables.
This file implemented 3 utility functions:
Definition Autofire.cc:11