14 :
JoyTap(pluggingController_,
std::move(name_))
21 return "MSX Ninja Tap device";
42 if (!(value & 1) && (previous & 1)) {
46 uint8_t
t = slave->read(time);
47 buf[i] = uint8_t(((
t & 0x0F) << 4) |
52 if (!(value & 4) && (previous & 4)) {
57 if (b & 1)
t |= (1 << i);
60 status = (status & ~0x0F) |
t;
77template<
typename Archive>
80 ar.template serializeBase<JoyTap>(*
this);
81 ar.serialize(
"status", status,
Represents something you can plug devices into.
This device is plugged in into the joy-ports and consolidates several other joysticks plugged into it...
void createPorts(std::string_view description, EmuTime::param time)
std::array< std::optional< JoystickPort >, 4 > slaves
void plugHelper(Connector &connector, EmuTime::param time) override
void serialize(Archive &ar, unsigned version)
std::string_view getDescription() const override
Description for this pluggable.
NinjaTap(PluggingController &pluggingController, std::string name)
uint8_t read(EmuTime::param time) override
Read from the joystick device.
void write(uint8_t value, EmuTime::param time) override
Write a value to the joystick device.
Central administration of Connectors and Pluggables.
constexpr auto enumerate(Iterable &&iterable)
Heavily inspired by Nathan Reed's blog post: Python-Like enumerate() In C++17 http://reedbeta....
This file implemented 3 utility functions:
constexpr void fill(ForwardRange &&range, const T &value)
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)