| 1 |
#include "CircuitDesignerRDDongle.hh" |
| 2 |
|
| 3 |
#include "serialize.hh" |
| 4 |
#include "serialize_meta.hh" |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
namespace openmsx { |
| 26 |
|
| 27 |
|
| 28 |
zstring_view CircuitDesignerRDDongle::getName() const |
| 29 |
{ |
| 30 |
return "circuit-designer-rd-dongle"; |
| 31 |
} |
| 32 |
|
| 33 |
zstring_view CircuitDesignerRDDongle::getDescription() const |
| 34 |
{ |
| 35 |
return "Circuit Designer RD dongle"; |
| 36 |
} |
| 37 |
|
| 38 |
void CircuitDesignerRDDongle::plugHelper( |
| 39 |
Connector& , EmuTime ) |
| 40 |
{ |
| 41 |
} |
| 42 |
|
| 43 |
void CircuitDesignerRDDongle::unplugHelper(EmuTime ) |
| 44 |
{ |
| 45 |
} |
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
uint8_t CircuitDesignerRDDongle::read(EmuTime ) |
| 50 |
{ |
| 51 |
return status; |
| 52 |
} |
| 53 |
|
| 54 |
void CircuitDesignerRDDongle::write(uint8_t value, EmuTime ) |
| 55 |
{ |
| 56 |
if (!(value & WR_PIN7) && (value & WR_PIN6)) { |
| 57 |
status |= JOY_UP; |
| 58 |
} else { |
| 59 |
status &= ~JOY_UP; |
| 60 |
} |
| 61 |
} |
| 62 |
|
| 63 |
template<typename Archive> |
| 64 |
void CircuitDesignerRDDongle::serialize(Archive& , unsigned ) |
| 65 |
{ |
| 66 |
|
| 67 |
|
| 68 |
} |
| 69 |
INSTANTIATE_SERIALIZE_METHODS(CircuitDesignerRDDongle); |
| 70 |
REGISTER_POLYMORPHIC_INITIALIZER(Pluggable, CircuitDesignerRDDongle, "CircuitDesignerRDDongle"); |
| 71 |
|
| 72 |
} |