   return count;
 }
 
+void sendPulse(byte pin)
+{
+  digitalWrite(pin, HIGH);
+  delayMicroseconds(50);
+  digitalWrite(pin, LOW);
+  delayMicroseconds(50);
+}
+
 /*----------------------------------------------------------------------+
  |                                                                      |
  |      EEPROM functions                                                |

 #define gigatronPinToBitMask digitalPinToBitMask // Regular Arduino pin numbers

 // Pins for Controller
 #define gameControllerDataPin 10 // PB2 (XXX currently broken)

 // Pins for PS/2 keyboard
 #define keyboardClockPin 3 // Pin 2 or 3 for IRQ

      break;
  }

  // Game controller pass through (Courtesy norgate)
  #if gameControllerDataPin >= 0
    for (;;) {
      byte serialByte = 0;
      sendPulse(gameControllerLatchPin);
      for (byte i=0; i<8; i++) {       // Shift in all 8 bits
        serialByte <<= 1;
        serialByte |= digitalRead(gameControllerDataPin);
        sendPulse(gameControllerPulsePin);
      }

      if (serialByte == 255)
        break;
      critical();                      // Forward byte to Gigatron
      sendFirstByte(serialByte);
      nonCritical();
    } // Loop locally while active to skip PS/2 and waitVSync

    // Allow PS/2 interrupts for a reasonable window
    delay(14);                         // The game controller probe takes 1 ms
  #else
    delay(15);
  #endif

  // debugging
  PORTB &= ~gigatronDataBit;
  PORTB |= gigatronDataBit;

  // PS/2 keyboard events
  byte key = keyboard_getState();
  if (key != 255) {
    byte f = fnKey(key ^ 64);          // Ctrl+Fn key?
