29 setStrobe(
true, time);
45 switch (port & 0x01) {
47 writeData(value, time);
50 setStrobe(value & 1, time);
57 void SVIPrinterPort::setStrobe(
bool newStrobe, EmuTime::param time)
59 if (newStrobe != strobe) {
64 void SVIPrinterPort::writeData(
byte newData, EmuTime::param time)
66 if (newData != data) {
74 return "Spectravideo SVI-328 Printer port";
79 return "Printer Port";
91 return *checked_cast<PrinterPortDevice*>(&
getPlugged());
94 template<
typename Archive>
97 ar.template serializeBase<MSXDevice>(*
this);
98 ar.template serializeBase<Connector>(*
this);
99 ar.serialize(
"strobe", strobe,
Represents something you can plug devices into.
Pluggable & getPlugged() const
Returns the Pluggable currently plugged in.
virtual void plug(Pluggable &device, EmuTime::param time)
This plugs a Pluggable in this Connector.
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
EmuTime::param getCurrentTime() const
virtual bool getStatus(EmuTime::param time)=0
Returns the STATUS signal: false = low = ready, true = high = not ready.
virtual void writeData(byte data, EmuTime::param time)=0
Sets the data signals.
virtual void setStrobe(bool strobe, EmuTime::param time)=0
Sets the strobe signal: false = low, true = high.
void serialize(Archive &ar, unsigned version)
void plug(Pluggable &dev, EmuTime::param time) override
This plugs a Pluggable in this Connector.
std::string_view getClass() const override
A Connector belong to a certain class.
byte readIO(word port, EmuTime::param time) override
Read a byte from an IO port at a certain time from this device.
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.
SVIPrinterPort(const DeviceConfig &config)
std::string_view getDescription() const override
Get a description for this connector.
byte peekIO(word port, EmuTime::param time) const override
Read a byte from a given IO port.
void reset(EmuTime::param time) override
This method is called on reset.
PrinterPortDevice & getPluggedPrintDev() const
This file implemented 3 utility functions:
REGISTER_MSXDEVICE(ChakkariCopy, "ChakkariCopy")
uint16_t word
16 bit unsigned integer
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)