   Serial.begin(1000000);    // JCB
   GD.begin(~GD_STORAGE);
   LOAD_ASSETS();
+
+  sf = GD.h / 272;
+
+  GD.BitmapHandle(0);
+  GD.BitmapSize(BILINEAR, BORDER, BORDER, sf * 32, sf * 32);
   GD.BitmapHandle(1);
   GD.BitmapSource(CHECKER);
-  GD.BitmapSize(NEAREST, REPEAT, REPEAT, 256, 256);
+  GD.BitmapSize(NEAREST, REPEAT, REPEAT, sf * 256, sf * 256);
   GD.BitmapLayout(L8, CHECKER_WIDTH, CHECKER_HEIGHT);
 }
 

  byte xlat[] = { 0, 0, 0, 1, 5, 2, 3, 4, 0, 6, 0, 7, 11,8, 9,10 };

  for (int i = 0; i < MOVETIME; i++) {
    GD.cmd_gradient(0, 0, 0x101010, 480, 272, 0x202060);
    GD.cmd_bgcolor(0x101020);

    GD.Begin(BITMAPS);
    GD.SaveContext();
    GD.ColorRGB(0xfff0c0);
    GD.ColorA(0xc0);
    GD.cmd_scale(F16(32), F16(32));
    GD.cmd_setmatrix();
    GD.Vertex2ii(32, 8, 1, 0);
    GD.RestoreContext();

    if (c[0])
      moving = 16 * ('8' - c[3]) + (c[2] - 'a');

    GD.SaveContext();
    GD.ColorRGB(0xe0e0e0);
    GD.cmd_loadidentity();
    GD.cmd_scale(F16(sf), F16(sf));
    GD.cmd_setmatrix();
    for (int y = 0; y < 8; y++)
      for (int x = 0; x < 8; x++) {
        int pos = 16 * y + x;
        byte piece = b[pos] & 15;
        if (pos != moving && piece != 0)
          GD.Vertex2ii(32 + sf * 32 * x, 8 + sf * 32 * y, 0, xlat[piece]);
      }

    if (c[0]) {
