openMSX
PasswordCart.hh
Go to the documentation of this file.
1 #ifndef PASSWORDCART_HH
2 #define PASSWORDCART_HH
3 
4 #include "MSXDevice.hh"
5 
6 namespace openmsx {
7 
8 class PasswordCart final : public MSXDevice
9 {
10 public:
11  explicit PasswordCart(const DeviceConfig& config);
12 
13  void reset(EmuTime::param time) override;
14  void writeIO(word port, byte value, EmuTime::param time) override;
15  [[nodiscard]] byte readIO(word port, EmuTime::param time) override;
16  [[nodiscard]] byte peekIO(word port, EmuTime::param time) const override;
17 
18  template<typename Archive>
19  void serialize(Archive& ar, unsigned version);
20 
21 private:
22  const word password;
23  byte pointer;
24 };
25 
26 } // namespace
27 
28 #endif
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
Definition: MSXDevice.hh:32
void reset(EmuTime::param time) override
This method is called on reset.
Definition: PasswordCart.cc:23
byte readIO(word port, EmuTime::param time) override
Read a byte from an IO port at a certain time from this device.
Definition: PasswordCart.cc:33
PasswordCart(const DeviceConfig &config)
Definition: PasswordCart.cc:16
void writeIO(word port, byte value, EmuTime::param time) override
Write a byte to a given IO port at a certain time to this device.
Definition: PasswordCart.cc:28
void serialize(Archive &ar, unsigned version)
Definition: PasswordCart.cc:55
byte peekIO(word port, EmuTime::param time) const override
Read a byte from a given IO port.
Definition: PasswordCart.cc:40
This file implemented 3 utility functions:
Definition: Autofire.cc:5
uint16_t word
16 bit unsigned integer
Definition: openmsx.hh:29