SVIPrinterPort.hh 989 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // $Id:$
  2. #ifndef SVIPRINTERPORT_HH
  3. #define SVIPRINTERPORT_HH
  4. #include "MSXDevice.hh"
  5. #include "Connector.hh"
  6. namespace openmsx {
  7. class PrinterPortDevice;
  8. class SVIPrinterPort final : public MSXDevice, public Connector
  9. {
  10. public:
  11. SVIPrinterPort(const DeviceConfig& config);
  12. PrinterPortDevice& getPluggedPrintDev() const;
  13. // MSXDevice
  14. void reset(EmuTime::param time) override;
  15. byte readIO(word port, EmuTime::param time) override;
  16. byte peekIO(word port, EmuTime::param time) const override;
  17. void writeIO(word port, byte value, EmuTime::param time) override;
  18. // Connector
  19. const std::string getDescription() const override;
  20. string_view getClass() const override;
  21. void plug(Pluggable& dev, EmuTime::param time) override;
  22. template<typename Archive>
  23. void serialize(Archive& ar, unsigned version);
  24. private:
  25. void setStrobe(bool newStrobe, EmuTime::param time);
  26. void writeData(byte newData, EmuTime::param time);
  27. bool strobe;
  28. byte data;
  29. };
  30. } // namespace openmsx
  31. #endif