You might want to do the following to test if the virtual joystick is working: set it up and make sure it is displayed on the screen. Next, print the output of the virtual device on the screen, to see if the X and Y-coordinates are behaving as you would like. I'm a bit starved for time, so I'm unable to write a program that does this, but here is some code that might help you on your way:
JoystickType = GetJoyStickExists() ` 0 = no, 1 = yes, 2 = if virtual joystick is enabled
do
CheckInput()
print("X : " + str(JoyX#)
print("Y : " + str(JoyY#)
Sync()
loop
Function CheckInput()
if JoyStickType = 0 then exitfunction
// move with virtual joystick
if JoyStickType = 2
JoyX# = (GetVirtualJoystickX( 1 ) * 2.0)
JoyY# = (GetVirtualJoystickY( 1 ) * 2.0)
endif
// move with real joystick
if JoyStickType = 1
JoyX# = (GetRawJoystickX( 1 ) * 2.0)
JoyY# = (GetRawJoystickY( 1 ) * 2.0)
endif
if JoyX# < -1.0 then ScrollScreen("Left")
if JoyX# > 1.0 then ScrollScreen("Right")
if JoyY# < -1.0 then ScrollScreen("Up")
if JoyY# > 1.0 then ScrollScreen("Down")
endfunction