Listing of file='JOYTST.BAS;01' on disk='vmedia/joystick_sound-sector.ccvf'
1 REM **************************************** 2 REM JOYSTICK NUMERICAL TEST ROUTINE 3 REM **************************************** 4 REM 5 REM THIS PROGRAM DISPLAYS THE OUTPUT OF ALL FOUR 6 REM JOYSTICKS CONTINUOUSLY ON THE SCREEN AS NUMBERS 7 REM IN THE RANGE 0-255. IT COULD BE USED TO ADJUST 8 REM THE ZERO AND SPAN OF THE JOYSTICKS OR JUST LOOK 9 REM FOR BAD JOYSTICKS. 10 PLOT 6,2,12,14:PRINT "JOYSTICK TEST":PRINT :PLOT 15 20 PRINT "X-Y COORDS FOR ALL 4 JOYSTICKS DISPLAYED CONTINUOUSLY" 30 PRINT "TYPE <LINEFEED> TO HALT PROGRAM" 40 INPUT "TYPE <RETURN> WHEN READY TO START";A$ 50 REM THE PROGRAM IS SIMPLY AN INFINITE LOOP, SO IT IS 55 REM NECESSARY TO USE <LINEFEED> TO BREAK IT. 60 REM NOTE THAT IT IS NOT AT ALL NECESSARY TO SPLIT 65 REM UP THE OUT AND INP INSTRUCTIONS ON SEPARATE LINES. 70 REM IN FACT, THE A/D CONVERTER IS SO FAST THAT IT IS 75 REM NOT EVEN POSSIBLE TO READ ITS STATUS BEFORE IT 80 REM HAS FINISHED, EVEN BY USING:- OUT 160,1:X=INP(160) 85 REM BECAUSE X WILL ALWAYS INDICATE CONVERSION COMPLETE! 90 REM 95 JN= 160:REM I/O PORT ADDRESS FOR 3650 (USE 32 FOR CCII) 100 PRINT 105 PRINT " X0"," Y0"," X1"," Y1"," X2"," Y2"," X3"," Y3" 110 FOR I= 1TO 10 120 FOR K= 0 TO 3 130 OUT JN+ 2* K,1 140 X(K) = INP (JN+ 2* K) 150 OUT JN+ 2* K+ 1,1 160 Y(K) = INP (JN+ 2* K+ 1) 170 NEXT K 180 PRINT X(0),Y(0),X(1),Y(1),X(2),Y(2),X(3),Y(3) 185 REM WAIT A WHILE - USER CAN'T READ THAT FAST 190 FOR J= 1TO 200:NEXT J 200 NEXT I 210 GOTO 100