; How to read the joystick the fast way: do the same stuff as the system ; call but in two parts (see slowjoy.s) ; Mar 5th 2012 cpu 6800 * = $1000 UP equ 1 DOWN equ 2 LEFT equ 4 RIGHT equ 8 BUTT equ 16 loop jsr $e8b6 ; Init direct joy mode ; Do something useful here for about 1/4th of a frame ; Might be a good idea to put the previous call at the start of the VBI nop ; The following won't take much time if you do it late enough, say, at ; the end of the VBI routine jsr $e88c ; Keyboard staa 1 jsr $e88c ; Joy 1 staa 2 jsr $e88c ; Joy 2 staa 3 ldaa 2 ; Joystick 1 eora #255 ; Change active bits to 1 instead of 0 clrb stab $c100 stab $c101 stab $c102 stab $c103 stab $c104 bita #UP beq notup ldab #'u' stab $c100 notup bita #DOWN beq notdown ldab #'d' stab $c101 notdown bita #LEFT beq notleft ldab #'l' stab $c102 notleft bita #RIGHT beq notrite ldab #'r' stab $c103 notrite bita #BUTT beq nobutt ldab #'b' stab $c104 nobutt bra loop