   }
 
   // Start 'Loader' application on Gigatron
-  sendController((byte)~buttonA, 2);
+  sendController(~buttonA & 255, 2);
 
   // Wait for Loader to be running
   delay(1000);

  case 'A': sendController(~buttonLeft,   2); break;
  case 'S': sendController(~buttonDown,   2); break;
  case 'D': sendController(~buttonRight,  2); break;
  case 'Z': sendController((byte)~buttonA,2); break;
  case 'X': sendController(~buttonB,      2); break;
  case 'Q': sendController(~buttonSelect, 2); break;
  case 'E': sendController(~buttonStart,  2); break;

}

// Pretend to be a game controller
// Send the same byte a few frames, just like a human user
void sendController(byte value, int n)
{
  // Send controller code for n frames
