home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1987 May / 1987-05.d64 / gameports.64 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  527b  |  30 lines

  1. 100 print chr$(147);chr$(142)
  2. 110 print"[144]joystick/paddle test"
  3. 120 print "press <f1> to stop"
  4. 130 data f,r,l,d,u
  5. 140 data 16,8,4,2,1
  6. 150 dim c(5),b(5)
  7. 160 for j=1 to 5:read c$:c(j)=asc(c$):next j
  8. 170 for j=1 to 5:read b(j):next j
  9. 180 print chr$(19):print:print
  10. 190 g=64
  11. 200 for p=0 to 1
  12. 210 print
  13. 220 poke 56333,127
  14. 230 r=peek(56321-p)
  15. 240 poke 56320,g
  16. 250 g=g+g
  17. 260 x=peek(54297)
  18. 270 y=peek(54298)
  19. 280 poke 56333,129
  20. 290 for b=1 to 5
  21. 300 c=c(b):if r and b(b) then c=32
  22. 310 print chr$(c);
  23. 320 next b
  24. 330 print " port:";p+1;"paddles:";
  25. 340 print right$("  "+str$(x),4);
  26. 350 print right$("  "+str$(y),4)
  27. 360 next p
  28. 370 get x$:if x$="" goto 180
  29. 380 if asc(x$)<>133 goto 180
  30.