12 , i8251(getScheduler(), interface, getCurrentTime())
29 return i8251.
readIO(port & 1, time);
34 return i8251.
peekIO(port & 1, time);
41 i8251.
writeIO(port & 1, value, time);
46void MSXFacMidiInterface::Interface::setRxRDY(
bool , EmuTime::param )
50void MSXFacMidiInterface::Interface::setDTR(
bool , EmuTime::param )
54void MSXFacMidiInterface::Interface::setRTS(
bool , EmuTime::param )
58bool MSXFacMidiInterface::Interface::getDSR(EmuTime::param )
63bool MSXFacMidiInterface::Interface::getCTS(EmuTime::param )
68void MSXFacMidiInterface::Interface::setDataBits(DataBits bits)
70 auto& midi =
OUTER(MSXFacMidiInterface, interface);
71 midi.outConnector.setDataBits(bits);
74void MSXFacMidiInterface::Interface::setStopBits(StopBits bits)
76 auto& midi =
OUTER(MSXFacMidiInterface, interface);
77 midi.outConnector.setStopBits(bits);
80void MSXFacMidiInterface::Interface::setParityBit(
bool enable, Parity parity)
82 auto& midi =
OUTER(MSXFacMidiInterface, interface);
83 midi.outConnector.setParityBit(enable, parity);
86void MSXFacMidiInterface::Interface::recvByte(
byte value, EmuTime::param time)
88 auto& midi =
OUTER(MSXFacMidiInterface, interface);
89 midi.outConnector.recvByte(value, time);
92void MSXFacMidiInterface::Interface::signal(EmuTime::param time)
94 const auto& midi =
OUTER(MSXFacMidiInterface, interface);
95 midi.getPluggedMidiInDev().signal(time);
132template<
typename Archive>
135 ar.template serializeBase<MSXDevice>(*
this);
136 ar.template serializeBase<MidiInConnector>(*
this);
137 ar.serialize(
"outConnector", outConnector,
#define REGISTER_MSXDEVICE(CLASS, NAME)
void setPeriodicState(EmuDuration::param total, EmuDuration::param hi, EmuTime::param time)
static constexpr EmuDuration hz(unsigned x)
byte peekIO(word port, EmuTime::param time) const
void setStopBits(StopBits bits) override
void recvByte(byte value, EmuTime::param time) override
void writeIO(word port, byte value, EmuTime::param time)
void reset(EmuTime::param time)
void setDataBits(DataBits bits) override
byte readIO(word port, EmuTime::param time)
void setParityBit(bool enable, Parity parity) override
bool isRecvEnabled() const
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
EmuTime::param getCurrentTime() const
void setDataBits(DataBits bits) override
void recvByte(byte value, EmuTime::param time) override
bool acceptsData() override
void writeIO(word port, byte value, EmuTime::param time) override
Write a byte to a given IO port at a certain time to this device.
byte readIO(word port, EmuTime::param time) override
Read a byte from an IO port at a certain time from this device.
MSXFacMidiInterface(const DeviceConfig &config)
void serialize(Archive &ar, unsigned version)
void setStopBits(StopBits bits) override
void setParityBit(bool enable, Parity parity) override
void reset(EmuTime::param time) override
This method is called on reset.
byte peekIO(word port, EmuTime::param time) const override
Read a byte from a given IO port.
This file implemented 3 utility functions:
uint16_t word
16 bit unsigned integer
#define OUTER(type, member)
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)