From 1135576a3acfba50dd11dc093546cfc5a8587dbc Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 28 Oct 2019 22:12:56 -0400 Subject: [PATCH] Comments in slightly more detail. --- Machines/AtariST/AtariST.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Machines/AtariST/AtariST.cpp b/Machines/AtariST/AtariST.cpp index 5eb927fab..c95c2a000 100644 --- a/Machines/AtariST/AtariST.cpp +++ b/Machines/AtariST/AtariST.cpp @@ -48,13 +48,18 @@ class IntelligentKeyboard: } bool serial_line_did_produce_bit(Serial::Line *, int bit) final { + // Shift. command_ = (command_ >> 1) | (bit << 9); + + // If that's 10 bits, decode a byte and stop. bit_count_ = (bit_count_ + 1) % 10; if(!bit_count_) { dispatch_command(uint8_t(command_ >> 1)); command_ = 0; return false; } + + // Continue. return true; }