OXYGENHUB
◆ main openmsx / src / input / SG1000JoystickIO.hh
621 B · C++ · last changed chore(): initial commit 1 month ago source blame history raw
1
#ifndef SG1000JOYSTICKIO_HH
2
#define SG1000JOYSTICKIO_HH
3
4
#include "MSXDevice.hh"
5
#include <array>
6
7
namespace openmsx {
8
9
class JoystickPortIf;
10
11
/** I/O port access to the joysticks for the Sega SG-1000.
12
  */
13
class SG1000JoystickIO final : public MSXDevice
14
{
15
public:
16
	explicit SG1000JoystickIO(const DeviceConfig& config);
17
18
	[[nodiscard]] byte readIO(uint16_t port, EmuTime time) override;
19
	[[nodiscard]] byte peekIO(uint16_t port, EmuTime time) const override;
20
21
	template<typename Archive>
22
	void serialize(Archive& ar, unsigned version);
23
24
private:
25
	std::array<JoystickPortIf*, 2> ports;
26
};
27
28
} // namespace openmsx
29
30
#endif