openMSX
MSXSwitchedDevice.hh
Go to the documentation of this file.
1 #ifndef MSXSWITCHEDDEVICE_HH
2 #define MSXSWITCHEDDEVICE_HH
3 
4 #include "EmuTime.hh"
5 #include "openmsx.hh"
6 
7 namespace openmsx {
8 
9 class MSXMotherBoard;
10 
12 {
13 public:
14  [[nodiscard]] virtual byte readSwitchedIO(word port, EmuTime::param time) = 0;
15  [[nodiscard]] virtual byte peekSwitchedIO(word port, EmuTime::param time) const = 0;
16  virtual void writeSwitchedIO(word port, byte value, EmuTime::param time) = 0;
17 
18 protected:
19  MSXSwitchedDevice(MSXMotherBoard& motherBoard, byte id);
21 
22 private:
23  MSXMotherBoard& motherBoard;
24  const byte id;
25 };
26 
27 } // namespace openmsx
28 
29 #endif
virtual byte peekSwitchedIO(word port, EmuTime::param time) const =0
MSXSwitchedDevice(MSXMotherBoard &motherBoard, byte id)
virtual void writeSwitchedIO(word port, byte value, EmuTime::param time)=0
virtual byte readSwitchedIO(word port, EmuTime::param time)=0
This file implemented 3 utility functions:
Definition: Autofire.cc:9
uint16_t word
16 bit unsigned integer
Definition: openmsx.hh:29