- m_C = 0;
-
- m_S1 = decode_hamming_84(data + 2); /* S1 */
- int S2C4 = decode_hamming_84(data + 3);
-
- m_S2 = S2C4 & 7;
- m_C |= (S2C4 & 8) ? (1<<4) : 0;
-
- m_S3 = decode_hamming_84(data + 4);
-
- int S4C5C6 = decode_hamming_84(data + 5);
-
- m_S4 = S4C5C6 & 3;
- m_C |= (S4C5C6 & 0xC) << 3;
-
- m_C |= decode_hamming_84(data + 6) << 7;
- m_C |= decode_hamming_84(data + 7) << 11;
-
- int serial_mode = m_C & (1<<11);
-
+ int X = decode_hamming_84(data + 1) * 0x10 + decode_hamming_84(data),
+// S1 = decode_hamming_84(data + 2),
+ S2C4 = decode_hamming_84(data + 3),
+// S2 = S2C4 & 7,
+// S3 = decode_hamming_84(data + 4),
+ S4C5C6 = decode_hamming_84(data + 5),
+// S4 = S4C5C6 & 3,
+ C = ((S2C4 & 8) ? (1<<4) : 0) |
+ ((S4C5C6 & 0xC) << 3) |
+ (decode_hamming_84(data + 6) << 7) |
+ (decode_hamming_84(data + 7) << 11),
+ serial_mode = C & (1<<11);
+