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 "noncopyable.hh"
6 #include "openmsx.hh"
7 
8 namespace openmsx {
9 
10 class MSXMotherBoard;
11 
13 {
14 public:
15  virtual byte readSwitchedIO(word port, EmuTime::param time) = 0;
16  virtual byte peekSwitchedIO(word port, EmuTime::param time) const = 0;
17  virtual void writeSwitchedIO(word port, byte value, EmuTime::param time) = 0;
18 
19 protected:
20  MSXSwitchedDevice(MSXMotherBoard& motherBoard, byte id);
21  virtual ~MSXSwitchedDevice();
22 
23 private:
24  MSXMotherBoard& motherBoard;
25  const byte id;
26 };
27 
28 } // namespace openmsx
29 
30 #endif