 #include <fontALL.h>
 #include "schematic.h"
 #include "TVOlogo.h"
+
+#define  HRES  144      //Resolucao TV
+#define  VRES  96       //
+#define  TV_MODE NTSC
+#define  REFRESH_RATE 5
+#define  FONT8 font8x8  //Fonte padrao
+#define  PLAYER1 2      //Potenciometro player 1
+#define  PLAYER2 1      //Potenciometro player 2
 
 TVout TV;
 

    
    delay(1);
    b += analogRead(2) + analogRead(2) + analogRead(2);
    TV.clear_screen();
    TV.println(xb, yb,".");
    TV.println(0,   (a/6)/8,"|");
    TV.println(110, (b/6)/8,"|");
    TV.select_font(font4x6);
    TV.println(33, 1, ponto1);

  
  }
   TV.select_font(font6x8);

  
  menu();

}

boolean pausado = false;

int speed = 25;
void loop() {
    
    if(pausado) {
      if (digitalRead(2) == HIGH) { 
        pausado = false;
        delay(100);
      }
      return;
    }
    
    if (digitalRead(2) == HIGH) pausado = true;
    
    if (digitalRead(3) == HIGH) {
      xb = 60;
      yb = 60;
      xj1 = 0;
      xj2 = 0;
      i = 1;
      j = 1;
      ponto2 = 0;
      ponto1 = 0;
      speed = 25;
      menu();
      return;
    }
    
    int a = analogRead(1) + analogRead(1) + analogRead(1);
    delay(1);
    a += analogRead(1) + analogRead(1) + analogRead(1);
