Index: firmware/5200/freeze.c
===================================================================
--- firmware/5200/freeze.c	(revision 384)
+++ firmware/5200/freeze.c	(revision 385)
@@ -89,6 +89,8 @@
 	*atari_dmactl = 0x22;
 	*atari_skctl = 0x2;
 	*atari_chactl = 0x2;
+	*atari_consol = 4;
+	*atari_potgo = 0xff;
 }
 
 void restore()
Index: firmware/5200/joystick.c
===================================================================
--- firmware/5200/joystick.c	(revision 384)
+++ firmware/5200/joystick.c	(revision 385)
@@ -3,6 +3,8 @@
 #include "regs.h"
 
 //#include <stdio.h>
+//#include <printf.h>
+//extern int debug_pos;
 
 #ifdef USB
 #include "usb.h"
@@ -15,6 +17,10 @@
 extern struct usb_host usb_portb;
 #endif
 
+unsigned char pot0;
+unsigned char pot1;
+unsigned char pot2;
+unsigned char pot3;
 void joystick_poll(struct joystick_status * status)
 {
 	status->x_ = 0;
@@ -28,6 +34,19 @@
 	usb_poll(&usb_portb);
 #endif
 
+	int controls = get_controls();
+
+	int read = 0;
+	if (0==*atari_allpot)
+	{
+		pot0 = *atari_pot0;
+		pot1 = *atari_pot1;
+		pot2 = *atari_pot2;
+		pot3 = *atari_pot3;
+		*atari_potgo = 0xff;
+		read = 1;
+	}
+
 	unsigned char kbcode = *atari_kbcode;
 	kbcode &= 0x1e;
 
@@ -37,26 +56,22 @@
 		kbcode = 0x0;
 	}
 
-	int controls = get_controls();
+	//debug_pos = 400;
+	//printf("%02x %02x %02x %02x\n",pot0,pot1,*atari_allpot,read);
 
-	/**atari_consol = 4;
-	*atari_potgo = 0xff;
-
-	wait_us(1000000/50);
-
-	unsigned char pot0 = *atari_pot0;
-	unsigned char pot1 = *atari_pot1;*/
-
 	status->y_ = (0x8==(kbcode&0x18)) -((unsigned int)(0x18==(kbcode&0x18)));
 	status->x_ = (0x2==(kbcode&0x6)) -((unsigned int)(0x6==(kbcode&0x6)));
-	// Not sure why, but reading these is not working here - what am I doing wrong?
-	/*if (pot0>170) status->x_ =1;
+
+	if (pot0>170) status->x_ =1;
 	if (pot0<60) status->x_ =-1;
 	if (pot1>170) status->y_ =1;
-	if (pot1<60) status->y_ =-1;*/
+	if (pot1<60) status->y_ =-1;
+	if (pot2>170) status->x_ =1;
+	if (pot2<60) status->x_ =-1;
+	if (pot3>170) status->y_ =1;
+	if (pot3<60) status->y_ =-1;
 
-	//status->fire_ = !(1&*atari_trig0);
-	status->fire_ = kbcode==0x14;
+	status->fire_ = (kbcode==0x14) || (!(1&*atari_trig0&*atari_trig1&*atari_trig2&*atari_trig3));
 
 	if (controls!=0)
 	{
@@ -103,13 +118,13 @@
 			if (status->x_ == 0 && status->y_ == 0 && status->fire_ == 0) return;
 			break;
 		case WAIT_FIRE:
-			if (status->fire_ == 1) return;
+			if (status->fire_ == 1 || status->escape_==1) return;
 			break;
 		case WAIT_EITHER:
 			if (status->fire_ == 1) return;
 			// fall through
 		case WAIT_MOVE:
-			if (status->x_ !=0 || status->y_ != 0) return;
+			if (status->x_ !=0 || status->y_ != 0 || status->escape_==1) return;
 			break;
 		}
 	}
Index: firmware/5200/mainmenu.c
===================================================================
--- firmware/5200/mainmenu.c	(revision 384)
+++ firmware/5200/mainmenu.c	(revision 385)
@@ -193,7 +193,7 @@
 		if (size == 16384) // uff!
 		{
 			struct joystick_status joy;
-			joy.x_ = joy.y_ = joy.fire_ = 0;
+			joy.x_ = joy.y_ = joy.fire_ = joy.escape_ = 0;
 
 			clearscreen();
 			debug_pos = 0;
@@ -224,7 +224,7 @@
 int settings()
 {
 	struct joystick_status joy;
-	joy.x_ = joy.y_ = joy.fire_ = 0;
+	joy.x_ = joy.y_ = joy.fire_ = joy.escape_ = 0;
 
 	int row = 0;
 
@@ -281,6 +281,7 @@
 		// move
 		joystick_wait(&joy,WAIT_QUIET);
 		joystick_wait(&joy,WAIT_EITHER);
+		if (joy.escape_) break;
 
 		row+=joy.y_;
 		if (row<0) row = 0;
Index: firmware/regs.h
===================================================================
--- firmware/regs.h	(revision 384)
+++ firmware/regs.h	(revision 385)
@@ -53,8 +53,6 @@
 
 #define atari_porta ((unsigned char volatile *)(0xd300 + atari_regbase))
 #define atari_portb ((unsigned char volatile *)(0xd301 + atari_regbase))
-#define atari_trig0 ((unsigned char volatile *)(0xd010 + atari_regbase))
-#define atari_trig1 ((unsigned char volatile *)(0xd011 + atari_regbase))
 #define atari_chbase ((unsigned char volatile *)(0xd409 + atari_regbase))
 #define atari_chactl ((unsigned char volatile *)(0xd401 + atari_regbase))
 #define atari_dmactl ((unsigned char volatile *)(0xd400 + atari_regbase))
@@ -68,6 +66,10 @@
 #define atari_colpf0 ((unsigned char volatile *)(0xc016 + atari_regbase))
 #define atari_prior ((unsigned char volatile *)(0xc01b + atari_regbase))
 #define atari_consol ((unsigned char volatile *)(0xc01f + atari_regbase))
+#define atari_trig0 ((unsigned char volatile *)(0xc010 + atari_regbase))
+#define atari_trig1 ((unsigned char volatile *)(0xc011 + atari_regbase))
+#define atari_trig2 ((unsigned char volatile *)(0xc012 + atari_regbase))
+#define atari_trig3 ((unsigned char volatile *)(0xc013 + atari_regbase))
 
 #define atari_skctl ((unsigned char volatile *)(0xe80f + atari_regbase))
 #define atari_kbcode ((unsigned char volatile *)(0xe809 + atari_regbase))
@@ -74,7 +76,10 @@
 #define atari_random ((unsigned char volatile *)(0xe80a + atari_regbase))
 #define atari_pot0 ((unsigned char volatile *)(0xe800 + atari_regbase))
 #define atari_pot1 ((unsigned char volatile *)(0xe801 + atari_regbase))
+#define atari_pot2 ((unsigned char volatile *)(0xe802 + atari_regbase))
+#define atari_pot3 ((unsigned char volatile *)(0xe803 + atari_regbase))
 #define atari_potgo ((unsigned char volatile *)(0xe80b + atari_regbase))
+#define atari_allpot ((unsigned char volatile *)(0xe808 + atari_regbase))
 
 #else
 
@@ -89,6 +94,9 @@
 #define atari_kbcode ((unsigned char volatile *)(0xd209 + atari_regbase))
 #define atari_random ((unsigned char volatile *)(0xd20a + atari_regbase))
 
+#define atari_trig0 ((unsigned char volatile *)(0xd010 + atari_regbase))
+#define atari_trig1 ((unsigned char volatile *)(0xd011 + atari_regbase))
+
 #endif
 
 #endif // regs_h
Index: firmware/usb/hid.c
===================================================================
--- firmware/usb/hid.c	(revision 384)
+++ firmware/usb/hid.c	(revision 385)
@@ -550,21 +550,24 @@
     { 10, 10, 0x41, 0 }, /* l2 -> f8 */
     { 11, 11, 0x41, 0 }, /* r2 -> f8 */
     { 7, 7, 0x41, 0 }, /* 4 -> f8 */
+    { 10, 11, 0x43, 0 }, /* l2&r2 -> f10 */
+    { 8, 11, 0x42, 0 }, /* l1&r2 -> f9 */
 #endif
 #ifdef FIRMWARE_5200
     { 13, 13, 0x3a, 0 }, /* start -> f1 (start) */
     { 12, 12, 0x3b, 0 }, /* select -> f2 (pause) */
-    { 10, 10, 0x00, 8 }, /* l2 -> fire2 */
-    { 11, 11, 0x00, 8 }, /* r2 -> fire2 */
-    { 7, 7, 0x00, 8 }, /* 4 -> fire2 */
+    { 10, 10, 0x00, 5 }, /* l2 -> fire2 */
+    { 11, 11, 0x00, 5 }, /* r2 -> fire2 */
+    { 7, 7, 0x00, 5 }, /* 4 -> fire2 */
 #endif
-    { 10, 11, 0x43, 0 }, /* l2&r2 -> f10 */
-    { 8, 11, 0x42, 0 }, /* l1&r2 -> f9 */
     { 4, 4, 0x45, 0 }, /* 1 -> f12 */
     { 5, 5, 0x44, 0 }, /* 2 -> f11 */
+    { 14, 15, 0x29, 0 }, /* both sticks  -> esc */
     { 6, 6, 0x00, 4 }, /* 3 -> fire */
     { 8, 8, 0x00, 4 }, /* l1 -> fire */
     { 9, 9, 0x00, 4 }, /* r1 -> fire */
+    { 8, 15, 0x43, 0 }, /* l2& rstick click -> f10 */
+    { 9, 15, 0x42, 0 }, /* l1& rstick click -> f9 */
     { 0, 0, 0x00, 0 }  /* ----  end ---- */
   };
 
