| 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 time) override; |
| 14 |
void writeIO(uint16_t port, byte value, EmuTime time) override; |
| 15 |
[[nodiscard]] byte readIO(uint16_t port, EmuTime time) override; |
| 16 |
[[nodiscard]] byte peekIO(uint16_t port, EmuTime time) const override; |
| 17 |
|
| 18 |
template<typename Archive> |
| 19 |
void serialize(Archive& ar, unsigned version); |
| 20 |
|
| 21 |
private: |
| 22 |
const uint16_t password; |
| 23 |
byte pointer; |
| 24 |
}; |
| 25 |
|
| 26 |
} |
| 27 |
|
| 28 |
#endif |