openMSX
MusicModuleMIDI.hh
Go to the documentation of this file.
1 #ifndef MUSICMODULEMIDI_HH
2 #define MUSICMODULEMIDI_HH
3 
4 #include "MSXDevice.hh"
5 #include "MC6850.hh"
6 #include "serialize_meta.hh"
7 
8 namespace openmsx {
9 
10 class MusicModuleMIDI final : public MSXDevice
11 {
12 public:
13  explicit MusicModuleMIDI(const DeviceConfig& config);
14 
15  // MSXDevice
16  void reset(EmuTime::param time) override;
17  [[nodiscard]] byte readIO(word port, EmuTime::param time) override;
18  [[nodiscard]] byte peekIO(word port, EmuTime::param time) const override;
19  void writeIO(word port, byte value, EmuTime::param time) override;
20 
21  template<typename Archive>
22  void serialize(Archive& ar, unsigned version);
23 
24 private:
25  MC6850 mc6850;
26 };
28 
29 } // namespace openmsx
30 
31 #endif
openmsx::MSXDevice
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
Definition: MSXDevice.hh:32
MC6850.hh
openmsx::MusicModuleMIDI::peekIO
byte peekIO(word port, EmuTime::param time) const override
Read a byte from a given IO port.
Definition: MusicModuleMIDI.cc:52
openmsx::DeviceConfig
Definition: DeviceConfig.hh:20
serialize_meta.hh
openmsx::MC6850
Definition: MC6850.hh:17
openmsx::SERIALIZE_CLASS_VERSION
SERIALIZE_CLASS_VERSION(CassettePlayer, 2)
openmsx::MusicModuleMIDI::reset
void reset(EmuTime::param time) override
This method is called on reset.
Definition: MusicModuleMIDI.cc:35
openmsx::MusicModuleMIDI::readIO
byte readIO(word port, EmuTime::param time) override
Read a byte from an IO port at a certain time from this device.
Definition: MusicModuleMIDI.cc:40
MSXDevice.hh
openmsx::MusicModuleMIDI::MusicModuleMIDI
MusicModuleMIDI(const DeviceConfig &config)
Definition: MusicModuleMIDI.cc:28
openmsx::word
uint16_t word
16 bit unsigned integer
Definition: openmsx.hh:29
openmsx::MusicModuleMIDI
Definition: MusicModuleMIDI.hh:11
openmsx::MusicModuleMIDI::serialize
void serialize(Archive &ar, unsigned version)
Definition: MusicModuleMIDI.cc:79
openmsx::MusicModuleMIDI::writeIO
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.
Definition: MusicModuleMIDI.cc:64
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5