openMSX
MSXOPL3Cartridge.hh
Go to the documentation of this file.
1 #ifndef MSXOPL3CARTRIDGE_HH
2 #define MSXOPL3CARTRIDGE_HH
3 
4 #include "MSXDevice.hh"
5 #include "YMF262.hh"
6 
7 namespace openmsx {
8 
9 class MSXOPL3Cartridge final : public MSXDevice
10 {
11 public:
12  explicit MSXOPL3Cartridge(const DeviceConfig& config);
13 
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 
19  template<typename Archive>
20  void serialize(Archive& ar, unsigned version);
21 
22 private:
23  YMF262 ymf262;
24  int opl3latch;
25 };
26 
27 } // namespace openmsx
28 
29 #endif
openmsx::MSXDevice
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
Definition: MSXDevice.hh:32
openmsx::MSXOPL3Cartridge::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: MSXOPL3Cartridge.cc:59
openmsx::MSXOPL3Cartridge::reset
void reset(EmuTime::param time) override
This method is called on reset.
Definition: MSXOPL3Cartridge.cc:14
openmsx::MSXOPL3Cartridge::peekIO
byte peekIO(word port, EmuTime::param time) const override
Read a byte from a given IO port.
Definition: MSXOPL3Cartridge.cc:41
openmsx::DeviceConfig
Definition: DeviceConfig.hh:20
openmsx::MSXOPL3Cartridge
Definition: MSXOPL3Cartridge.hh:10
openmsx::MSXOPL3Cartridge::MSXOPL3Cartridge
MSXOPL3Cartridge(const DeviceConfig &config)
Definition: MSXOPL3Cartridge.cc:7
MSXDevice.hh
openmsx::MSXOPL3Cartridge::readIO
byte readIO(word port, EmuTime::param time) override
Read a byte from an IO port at a certain time from this device.
Definition: MSXOPL3Cartridge.cc:22
openmsx::word
uint16_t word
16 bit unsigned integer
Definition: openmsx.hh:29
openmsx::MSXOPL3Cartridge::serialize
void serialize(Archive &ar, unsigned version)
Definition: MSXOPL3Cartridge.cc:78
openmsx::YMF262
Definition: YMF262.hh:20
YMF262.hh
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5