openMSX
SG1000JoystickIO.hh
Go to the documentation of this file.
1 #ifndef SG1000JOYSTICKIO_HH
2 #define SG1000JOYSTICKIO_HH
3 
4 #include "MSXDevice.hh"
5 
6 namespace openmsx {
7 
8 class JoystickPortIf;
9 
12 class SG1000JoystickIO final : public MSXDevice
13 {
14 public:
15  explicit SG1000JoystickIO(const DeviceConfig& config);
17 
18  byte readIO(word port, EmuTime::param time) override;
19  byte peekIO(word port, EmuTime::param time) const override;
20 
21  template<typename Archive>
22  void serialize(Archive& ar, unsigned version);
23 
24 private:
25  JoystickPortIf* ports[2];
26 };
27 
28 } // namespace openmsx
29 
30 #endif
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
Definition: MSXDevice.hh:33
I/O port access to the joysticks for the Sega SG-1000.
SG1000JoystickIO(const DeviceConfig &config)
void serialize(Archive &ar, unsigned version)
byte readIO(word port, EmuTime::param time) override
Read a byte from an IO port at a certain time from this device.
byte peekIO(word port, EmuTime::param time) const override
Read a byte from a given IO port.
This file implemented 3 utility functions:
Definition: Autofire.cc:9
uint16_t word
16 bit unsigned integer
Definition: openmsx.hh:29