Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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
You can’t perform that action at this time.