10 :
JoyTap(pluggingController_, std::move(name_))
19 return "MSX Ninja Tap device";
40 if (!(value & 1) && (previous & 1)) {
44 byte t = slave->read(time);
45 buf[i] = ((
t & 0x0F) << 4) |
50 if (!(value & 4) && (previous & 4)) {
55 if (b & 1)
t |= (1 << i);
58 status = (status & ~0x0F) |
t;
73 template<
typename Archive>
76 ar.template serializeBase<JoyTap>(*
this);
77 ar.serialize(
"status", status,
Represents something you can plug devices into.
This device is plugged in into the joyports and consolidates several other joysticks plugged into it.
void createPorts(static_string_view description)
std::optional< JoystickPort > slaves[4]
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)
byte read(EmuTime::param time) override
Read from the joystick device.
void write(byte 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:
REGISTER_POLYMORPHIC_INITIALIZER(Pluggable, CassettePlayer, "CassettePlayer")
void fill(ForwardRange &&range, const T &value)
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)