17class ClockPinListener;
23 void reset(EmuTime::param time);
24 [[nodiscard]] uint8_t
readIO(EmuTime::param time);
25 [[nodiscard]] uint8_t
peekIO(EmuTime::param time)
const;
26 void writeIO(uint8_t value, EmuTime::param time);
32 template<
typename Archive>
33 void serialize(Archive& ar,
unsigned version);
39 static constexpr uint8_t WRT_FRMT = 0x30;
40 static constexpr uint8_t WF_LATCH = 0x00;
41 static constexpr uint8_t WF_LOW = 0x10;
42 static constexpr uint8_t WF_HIGH = 0x20;
43 static constexpr uint8_t WF_BOTH = 0x30;
44 static constexpr uint8_t CNTR_MODE = 0x0E;
45 static constexpr uint8_t CNTR_M0 = 0x00;
46 static constexpr uint8_t CNTR_M1 = 0x02;
47 static constexpr uint8_t CNTR_M2 = 0x04;
48 static constexpr uint8_t CNTR_M3 = 0x06;
49 static constexpr uint8_t CNTR_M4 = 0x08;
50 static constexpr uint8_t CNTR_M5 = 0x0A;
51 static constexpr uint8_t CNTR_M2_ = 0x0C;
52 static constexpr uint8_t CNTR_M3_ = 0x0E;
54 void writeLoad(uint16_t value, EmuTime::param time);
55 void advance(EmuTime::param time);
62 uint16_t latchedCounter;
63 uint16_t counterLoad = 0;
64 uint8_t control, latchedControl;
65 bool ltchCtrl, ltchCntr;
69 bool active, triggered, counting;
81 void reset(EmuTime::param time);
82 [[nodiscard]] uint8_t
readIO(uint16_t port, EmuTime::param time);
83 [[nodiscard]] uint8_t
peekIO(uint16_t port, EmuTime::param time)
const;
84 void writeIO(uint16_t port, uint8_t value, EmuTime::param time);
86 void setGate(
unsigned cntr,
bool status, EmuTime::param time);
90 template<
typename Archive>
91 void serialize(Archive& ar,
unsigned version);
94 void readBackHelper(uint8_t value,
unsigned cntr, EmuTime::param time);
97 std::array<Counter, 3> counter;
void latchStatus(EmuTime::param time)
uint8_t peekIO(EmuTime::param time) const
void serialize(Archive &ar, unsigned version)
void reset(EmuTime::param time)
void writeIO(uint8_t value, EmuTime::param time)
uint8_t readIO(EmuTime::param time)
void latchCounter(EmuTime::param time)
void writeControlWord(uint8_t value, EmuTime::param time)
void setGateStatus(bool status, EmuTime::param time)
void reset(EmuTime::param time)
uint8_t peekIO(uint16_t port, EmuTime::param time) const
void writeIO(uint16_t port, uint8_t value, EmuTime::param time)
uint8_t readIO(uint16_t port, EmuTime::param time)
ClockPin & getClockPin(unsigned cntr)
void serialize(Archive &ar, unsigned version)
void setGate(unsigned cntr, bool status, EmuTime::param time)
ClockPin & getOutputPin(unsigned cntr)
This file implemented 3 utility functions: