  */
 static void n64_send(unsigned char *buffer, char length, bool wide_stop)
 {
-    long target;
-    LED_HIGH;
-    N64_LOW;
+  long target;
+  LED_HIGH;
+  N64_LOW;
+  startTimer();
+
+  for (int i = 0; i < length * 8; i++) {
+    char bit = (buffer[i >> 3] >> (7 - (i & 7))) & 1;
+    target = MICRO_CYCLES * (3 - bit * 2);
+    while (readTimer() < target);
+      N64_HIGH;
+    while (readTimer() < MICRO_CYCLES * 4);
+      N64_LOW;
     startTimer();
- 
-    for (int i = 0; i < length * 8; i++) {
-      char bit = (buffer[i >> 3] >> (7 - (i & 7))) & 1;
-      target = MICRO_CYCLES * (3 - bit * 2);
-      while (readTimer() < target);
-      N64_HIGH;
-      while (readTimer() < MICRO_CYCLES * 4);
-      N64_LOW;
-      startTimer();
-    }
-
-    target = MICRO_CYCLES * (1 + wide_stop);
-
-    while (readTimer() < target);
-
-    N64_HIGH;
-    LED_LOW;
-    while (!N64_QUERY);
+  }
+
+  target = MICRO_CYCLES * (1 + wide_stop);
+
+  while (readTimer() < target);
+
+  N64_HIGH;
+  startTimer();
+  while (!N64_QUERY && readTimer() < MICRO_CYCLES * 4);
+  LED_LOW;
 }
 
 /**


    LED_HIGH;

    for (int i = 1; i <= bitcount; i++) {
        while (!N64_QUERY);
        long lowTime = readTimer();
        startTimer();
        while (N64_QUERY);
        long highTime = readTimer();
        startTimer();
        char bit = (lowTime < highTime);

static char n64_raw_dump[36]; // maximum recv is 1+2+32 bytes + 1 bit
// n64_raw_dump does not include the command byte. That gets pushed into
// n64_command:
static int n64_command;
// bytes to send to the 64
// maximum we'll need to send is 33, 32 for a read request and 1 CRC byte
static unsigned char n64_buffer[33];
