Home » Archimedes archive » Acorn User » AU 1995-12 B.adf » Regulars » StarInfo/Borcherds/JoyTest

StarInfo/Borcherds/JoyTest

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Acorn User » AU 1995-12 B.adf » Regulars
Filename: StarInfo/Borcherds/JoyTest
Read OK:
File size: 0175 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM > JoyTest
   20MODE12
   30PRINT"Analogue/Digital (A/D)";:J$=GET$
   31IF J$="D" OR J$="d" THEN OSCLI"JoystickDigital" ELSE OSCLI"JoystickAnalogue"
   40MOUSE ON
   50REPEAT
   60SYS "Joystick_Read",1 TO A%
   70X%=(A% AND &FF00) >> 8
   80Y%=A% AND &FF
   90B%=(A% AND &30000) >> 16
  100PRINTTAB(0,0);B%;" ";X%;" ";Y%;"        ";
  110
  120X%=(X%+127) AND &FF
  130Y%=(Y%+127) AND &FF
  140
  150IF B%<>0 THEN POINT X%*1280/256,Y%*1024/256
  160
  170UNTIL0
  180
� > JoyTest
�12
#�"Analogue/Digital (A/D)";:J$=�
@� J$="D" � J$="d" � �"JoystickDigital" � �"JoystickAnalogue"
(ȗ �
2�
<ș "Joystick_Read",1 � A%
FX%=(A% � &FF00) >> 8
PY%=A% � &FF
ZB%=(A% � &30000) >> 16
d'�0,0);B%;" ";X%;" ";Y%;"        ";
n
xX%=(X%+127) � &FF
�Y%=(Y%+127) � &FF
�
�(� B%<>0 � Ȓ X%*1280/256,Y%*1024/256
�
��0
�
�
00000000  0d 00 0a 0f f4 20 3e 20  4a 6f 79 54 65 73 74 0d  |..... > JoyTest.|
00000010  00 14 07 eb 31 32 0d 00  1e 23 f1 22 41 6e 61 6c  |....12...#."Anal|
00000020  6f 67 75 65 2f 44 69 67  69 74 61 6c 20 28 41 2f  |ogue/Digital (A/|
00000030  44 29 22 3b 3a 4a 24 3d  be 0d 00 1f 40 e7 20 4a  |D)";:J$=....@. J|
00000040  24 3d 22 44 22 20 84 20  4a 24 3d 22 64 22 20 8c  |$="D" . J$="d" .|
00000050  20 ff 22 4a 6f 79 73 74  69 63 6b 44 69 67 69 74  | ."JoystickDigit|
00000060  61 6c 22 20 8b 20 ff 22  4a 6f 79 73 74 69 63 6b  |al" . ."Joystick|
00000070  41 6e 61 6c 6f 67 75 65  22 0d 00 28 08 c8 97 20  |Analogue"..(... |
00000080  ee 0d 00 32 05 f5 0d 00  3c 1d c8 99 20 22 4a 6f  |...2....<... "Jo|
00000090  79 73 74 69 63 6b 5f 52  65 61 64 22 2c 31 20 b8  |ystick_Read",1 .|
000000a0  20 41 25 0d 00 46 18 58  25 3d 28 41 25 20 80 20  | A%..F.X%=(A% . |
000000b0  26 46 46 30 30 29 20 3e  3e 20 38 0d 00 50 0f 59  |&FF00) >> 8..P.Y|
000000c0  25 3d 41 25 20 80 20 26  46 46 0d 00 5a 1a 42 25  |%=A% . &FF..Z.B%|
000000d0  3d 28 41 25 20 80 20 26  33 30 30 30 30 29 20 3e  |=(A% . &30000) >|
000000e0  3e 20 31 36 0d 00 64 27  f1 8a 30 2c 30 29 3b 42  |> 16..d'..0,0);B|
000000f0  25 3b 22 20 22 3b 58 25  3b 22 20 22 3b 59 25 3b  |%;" ";X%;" ";Y%;|
00000100  22 20 20 20 20 20 20 20  20 22 3b 0d 00 6e 04 0d  |"        ";..n..|
00000110  00 78 15 58 25 3d 28 58  25 2b 31 32 37 29 20 80  |.x.X%=(X%+127) .|
00000120  20 26 46 46 0d 00 82 15  59 25 3d 28 59 25 2b 31  | &FF....Y%=(Y%+1|
00000130  32 37 29 20 80 20 26 46  46 0d 00 8c 04 0d 00 96  |27) . &FF.......|
00000140  28 e7 20 42 25 3c 3e 30  20 8c 20 c8 92 20 58 25  |(. B%<>0 . .. X%|
00000150  2a 31 32 38 30 2f 32 35  36 2c 59 25 2a 31 30 32  |*1280/256,Y%*102|
00000160  34 2f 32 35 36 0d 00 a0  04 0d 00 aa 06 fd 30 0d  |4/256.........0.|
00000170  00 b4 04 0d ff                                    |.....|
00000175