OXYGENHUB
◆ main openmsx / src / MSXSwitchedDevice.hh
615 B · C++ · last changed chore(): initial commit 1 month ago source blame history raw
1
#ifndef MSXSWITCHEDDEVICE_HH
2
#define MSXSWITCHEDDEVICE_HH
3
4
#include "EmuTime.hh"
5
6
#include <cstdint>
7
8
namespace openmsx {
9
10
class MSXMotherBoard;
11
12
class MSXSwitchedDevice
13
{
14
public:
15
	[[nodiscard]] virtual uint8_t readSwitchedIO(uint16_t port, EmuTime time) = 0;
16
	[[nodiscard]] virtual uint8_t peekSwitchedIO(uint16_t port, EmuTime time) const = 0;
17
	virtual void writeSwitchedIO(uint16_t port, uint8_t value, EmuTime time) = 0;
18
19
protected:
20
	MSXSwitchedDevice(MSXMotherBoard& motherBoard, uint8_t id);
21
	~MSXSwitchedDevice();
22
23
private:
24
	MSXMotherBoard& motherBoard;
25
	const uint8_t id;
26
};
27
28
} // namespace openmsx
29
30
#endif