Created
February 28, 2013 09:52
-
-
Save tomaes/5055588 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 rem analogue mouse test tool | |
12 rem - movement detection by polling SID registers s+25/26 | |
14 rem - left/right buttons detection by polling control port #1 | |
16 s=54272: js=56321 | |
18 print"{reverse on}{down}analogue mouse test{reverse off}{down*4}" | |
20 y$="{light gray}yes{light blue}":n$="{gray}no {light blue}" | |
22 h$=n$: v$=n$: lmb$=n$: rmb$=n$ | |
24 ho=peek(s+25):vo=peek(s+26) | |
26 fori=.to39:next | |
28 if ho<>peek(s+25) then h$=y$ | |
30 if vo<>peek(s+26) then v$=y$ | |
32 j=peek(js) | |
34 if j=239 then lmb$=y$ | |
36 if j=254 then rmb$=y$ | |
38 if j=238 then lmb$=y$: rmb$=y$ | |
40 print"{up*4}movement horizontal:"h$ | |
42 print"movement vertical :"v$ | |
44 print"mouse button left :"lmb$ | |
46 print"mouse button right :"rmb$ | |
48 goto22 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment