openMSX
MSXResetStatusRegister.hh
Go to the documentation of this file.
1 /*
2  * This class implements the device found on IO-port 0xF4 on a MSX Turbo-R.
3  *
4  * TODO explanation
5  */
6 
7 #ifndef F4DEVICE_HH
8 #define F4DEVICE_HH
9 
10 #include "MSXDevice.hh"
11 
12 namespace openmsx {
13 
14 class MSXResetStatusRegister final : public MSXDevice
15 {
16 public:
17  explicit MSXResetStatusRegister(const DeviceConfig& config);
18 
19  void reset(EmuTime::param time) override;
20  byte readIO(word port, EmuTime::param time) override;
21  byte peekIO(word port, EmuTime::param time) const override;
22  void writeIO(word port, byte value, EmuTime::param time) override;
23 
24  template<typename Archive>
25  void serialize(Archive& ar, unsigned version);
26 
27 private:
28  const bool inverted;
29  byte status;
30 };
31 
32 } // namespace openmsx
33 
34 #endif
MSXResetStatusRegister(const DeviceConfig &config)
byte readIO(word port, EmuTime::param time) override
Read a byte from an IO port at a certain time from this device.
uint8_t byte
8 bit unsigned integer
Definition: openmsx.hh:26
void reset(EmuTime::param time) override
This method is called on reset.
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX...
Definition: MSXDevice.hh:31
uint16_t word
16 bit unsigned integer
Definition: openmsx.hh:29
void serialize(Archive &ar, unsigned version)
byte peekIO(word port, EmuTime::param time) const override
Read a byte from a given IO port.
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.