       (str "Incomplete data read from SNES controller: "
            (apply str (map (partial format "%02X") (take len buffer)))))
     (assoc
-      (read-buttons snes-buttons buffer)
+      (read-buttons snes-bits buffer)
       :x-axis (byte-axis (aget buffer 0))
       :y-axis (- (byte-axis (aget buffer 1))))))
 

   :R      [3 5]
   :select [4 0]
   :start  [4 1]})


(defn- snes-read-state

(def ^:const snes-product-id 0xd015)


(def ^:private snes-bits
  {:X      [3 0]
   :A      [3 1]
   :B      [3 2]
