61 bool next(uint8_t (&rom)[8])
74 uint8_t lastZero{ 0 };
75 for (uint8_t bit = 1; bit <= 64; ++bit)
77 const uint8_t idBit{
bus.read_bit() };
78 const uint8_t complementBit{
bus.read_bit() };
79 uint8_t& romByte{ rom[(bit - 1) / 8] };
80 const uint8_t mask{
static_cast< uint8_t
>(1U << ((bit - 1) % 8)) };
82 if (idBit && complementBit)
89 bool direction{ idBit != 0 };
90 if (idBit == complementBit)
100 romByte =
static_cast< uint8_t
>(direction ? (romByte | mask) : (romByte & ~mask));
101 bus.write_bit(direction ? 1 : 0);