Created October 7, 2006 Notes: -The wireless controller used was a Pelican Chameleon wireless ps2 controller, all references to a wireless controller refer to this model. -The following observations are based off of the code for the Javelin Stamp Similarities with wired and wireless: ID is same: ID ='A'=65 (decimal)=0x41 (hex) for digital (just buttons) ID ='s'=115 (decimal)=0x73 (hex) for analog (buttons + joysticks) Data order is same EXCEPT all button and joystick data arrives 2 bits earlier for wireless Exceptions: no "select" button bit for wireless Differences: Status for wired is: 'Z'=90 (decimal) = 0x5A (hex) Status for wireless is: an 0 with two dots ontop= -42 (decimal)= ? (hex) What to change to wired code to make it work for wireless: Do NOT use the manual shift function to get the final byte (left joy, y-axis), just use built in shift function. Shift all data 2 bits sooner. Byte | Wired | Wireless Name | data | data ____________________________ ThumbL select - <-----first data bit received - start - Dup start Dright Dup Ddown Dright Dleft Ddown L2 Dleft R2 ThumbR L2 L1 R2 R1 L1 /\ R1 O /\ X O |_| X RX |_| RX JoyRX RX RX RX RX RX RX RX RX RX RX RX RX RX RY RX RY JoyRY RY RY RY RY RY RY RY RY RY RY RY RY RY LX RY LX JoyLX LX LX LX LX LX LX LX LX LX LX LX LX LX LY LX LY JoyLY LY LY LY LY LY LY LY LY LY LY LY LY LY - LY - <-----last data bit received Some Info about the joystick values: 0 ^ | 127 O 0<--->127 OOO -128<--->-1 O -128 ^ | -1 Note that this diagram holds true for both the left and right joysticks. Also, -128 comes after 127 (2's complement), so if the joystick is moved from left to right (or from up to down), it will read: 0,1,2,...,125,126,127,-128,-127,-126,...,-3,-2,-1