Yeah the X axis do cancel each other out, but if you use it for some kind of directional movement it shouldn't be a problem.
Here's the code I came up with if anyone is interested. It's got enough functionality to be pretty darn useful.
//Constants
#constant xbox_a 1
#constant xbox_b 2
#constant xbox_x 3
#constant xbox_y 4
#constant xbox_lb 5
#constant xbox_rb 6
#constant xbox_back 7
#constant xbox_start 8
#constant xbox_lab 9
#constant xbox_rab 10
//Note: RT and LT are controlled by GetRawJoystickZ
//Note: Left analouge stick controlled by GetRawJoystickX and GetRawJoystickY
//Note: Right analouge stick controlled by GetRawJoystickRX and getRawJoystickRY
setprintsize( 2 )
Type _State
h as integer //held
p as integer //pressed
r as integer //released
Endtype
Type _Controller
exists as integer
lax as float //left analouge x
lay as float //left analouge y
rax as float //right analouge x
ray as float //right analouge y
lab as _State
rab as _State
y as _State
x as _State
b as _State
a as _State
lb as _State
rb as _State
rt as float
lt as float
back as _State
start as _State
dp_x as float //dp x
dp_y as float //dpad y
EndType
Global Num_of_Controller as integer : Num_of_Controller = 4
Dim Controller[ Num_of_Controller ] as _Controller
do
For i = 1 to Num_of_Controller
update_xbox_pad( i )
If Controller[ i ].exists = 1
print( "Left Analouge X: " + str( Controller[ i ].lax ) )
print( "Left Analouge Y: " + str( Controller[ i ].lay ) )
print( "Right Analouge X: " + str( Controller[ i ].rax ) )
print( "Right Analouge Y: " + str( Controller[ i ].ray ) )
print( "Analouge Button Right: " + str( Controller[ i ].rt ) )
print( "Analouge Button Left: " + str( Controller[ i ].lt ) )
print( "Button Y Held: " + str( Controller[ i ].y.h ) )
print( "Button X Held: " + str( Controller[ i ].x.h ) )
print( "Button B Held: " + str( Controller[ i ].b.h ) )
print( "Button A Held: " + str( Controller[ i ].a.h ) )
print( "Button LB Held: " + str( Controller[ i ].lb.h ) )
print( "Button RB Held: " + str( Controller[ i ].rb.h ) )
print( "Button Back Held: " + str( Controller[ i ].back.h ) )
print( "Button Start Held: " + str( Controller[ i ].start.h ) )
print( "Button Left Analogue Button Held: " + str( Controller[ i ].lab.h ) )
print( "Button Right Analouge Button Held: " + str( Controller[ i ].rab.h ) )
print( "Button Y Pressed: " + str( Controller[ i ].y.p ) )
print( "Button X Pressed: " + str( Controller[ i ].x.p ) )
print( "Button B Pressed: " + str( Controller[ i ].b.p ) )
print( "Button A Pressed: " + str( Controller[ i ].a.p ) )
print( "Button LB Pressed: " + str( Controller[ i ].lb.p ) )
print( "Button RB Pressed: " + str( Controller[ i ].rb.p ) )
print( "Button Back Pressed: " + str( Controller[ i ].back.p ) )
print( "Button Start Pressed: " + str( Controller[ i ].start.p ) )
print( "Button Left Analogue Button Pressed: " + str( Controller[ i ].lab.p ) )
print( "Button Right Analouge Button Pressed: " + str( Controller[ i ].rab.p ) )
print( "Button Y Released: " + str( Controller[ i ].y.r ) )
print( "Button X Released: " + str( Controller[ i ].x.r ) )
print( "Button B Released: " + str( Controller[ i ].b.r ) )
print( "Button A Released: " + str( Controller[ i ].a.r ) )
print( "Button LB Released: " + str( Controller[ i ].lb.r ) )
print( "Button RB Released: " + str( Controller[ i ].rb.r ) )
print( "Button Back Released: " + str( Controller[ i ].back.r ) )
print( "Button Start Released: " + str( Controller[ i ].start.r ) )
print( "Button Left Analogue Button Released: " + str( Controller[ i ].lab.r ) )
print( "Button Right Analouge Button Released: " + str( Controller[ i ].rab.r ) )
Else
Print( "Controller " + str( i ) + " isn't plugged in.")
EndIf
Next i
Sync()
loop
Function update_xbox_pad( input )
Controller[ input ].exists = GetRawJoystickExists( input )
Select Controller[ input ].exists
case 0
//Nothing is required
endcase
case 1
Controller[ input ].lax = GetRawJoystickX( input )
Controller[ input ].lay = GetRawJoystickY( input )
Controller[ input ].rax = GetRawJoystickRX( input )
Controller[ input ].ray = GetRawJoystickRY( input )
tmp# = GetRawJoystickZ( input ) //This is to avoid calling the command twice.
If tmp# < 0 then Controller[ input ].rt = tmp# else Controller[ input ].rt = 0
If tmp# > 0 then Controller[ input ].lt = tmp# else Controller[ input ].lt = 0
Controller[ input ].y.h = GetRawJoystickButtonState( input, xbox_y )
Controller[ input ].x.h = GetRawJoystickButtonState( input, xbox_x )
Controller[ input ].b.h = GetRawJoystickButtonState( input, xbox_b )
Controller[ input ].a.h = GetRawJoystickButtonState( input, xbox_a )
Controller[ input ].lb.h = GetRawJoystickButtonState( input, xbox_lb )
Controller[ input ].rb.h = GetRawJoystickButtonState( input, xbox_rb )
Controller[ input ].back.h = GetRawJoystickButtonState( input, xbox_back )
Controller[ input ].start.h = GetRawJoystickButtonState( input, xbox_start )
Controller[ input ].lab.h = GetRawJoystickButtonState( input, xbox_lab )
Controller[ input ].rab.h = GetRawJoystickButtonState( input, xbox_rab )
Controller[ input ].y.p = GetRawJoystickButtonPressed( input, xbox_y )
Controller[ input ].x.p = GetRawJoystickButtonPressed( input, xbox_x )
Controller[ input ].b.p = GetRawJoystickButtonPressed( input, xbox_b )
Controller[ input ].a.p = GetRawJoystickButtonPressed( input, xbox_a )
Controller[ input ].lb.p = GetRawJoystickButtonPressed( input, xbox_lb )
Controller[ input ].rb.p = GetRawJoystickButtonPressed( input, xbox_rb )
Controller[ input ].back.p = GetRawJoystickButtonPressed( input, xbox_back )
Controller[ input ].start.p = GetRawJoystickButtonPressed( input, xbox_start )
Controller[ input ].lab.p = GetRawJoystickButtonPressed( input, xbox_lab )
Controller[ input ].rab.p = GetRawJoystickButtonPressed( input, xbox_rab )
Controller[ input ].y.r = GetRawJoystickButtonReleased( input, xbox_y )
Controller[ input ].x.r = GetRawJoystickButtonReleased( input, xbox_x )
Controller[ input ].b.r = GetRawJoystickButtonReleased( input, xbox_b )
Controller[ input ].a.r = GetRawJoystickButtonReleased( input, xbox_a )
Controller[ input ].lb.r = GetRawJoystickButtonReleased( input, xbox_lb )
Controller[ input ].rb.r = GetRawJoystickButtonReleased( input, xbox_rb )
Controller[ input ].back.r = GetRawJoystickButtonReleased( input, xbox_back )
Controller[ input ].start.r = GetRawJoystickButtonReleased( input, xbox_start )
Controller[ input ].lab.r = GetRawJoystickButtonReleased( input, xbox_lab )
Controller[ input ].rab.r = GetRawJoystickButtonReleased( input, xbox_rab )
//Controller[ input ].dp_x
//Controller[ input ].dp_y
EndCase
EndSelect
EndFunction