fweed@ufweed.UUCP (Frank P. Weed II) (06/07/90)
How exactly does a person read standard Atari paddles from assembly? The following fragment would seem to be correct, but Intuition doesn't like the "move.w d0,$dff034" - it thinks it has RMB events. move.l _GfxBase,a6 ; C has this variable jsr WaitTOF(a6) moveq.l #1,d0 move.w d0,$dff034 ; start paddle timing jsr WaitTOF(a6) ; data ready next vblank move.w $dff012,_Pot0Dat move.w $dff014,_Pot1Dat -- Frank P. Weed II uucp: uunet!isis!nyx!ufweed!fweed
kevin@cbmvax.commodore.com (Kevin Klop) (06/08/90)
In article <3338.AA3338@ufweed.UUCP> fweed@ufweed.UUCP (Frank P. Weed II) writes: > > How exactly does a person read standard Atari paddles from assembly? The >following fragment would seem to be correct, but Intuition doesn't like the >"move.w d0,$dff034" - it thinks it has RMB events. > > move.l _GfxBase,a6 ; C has this variable > jsr WaitTOF(a6) > moveq.l #1,d0 > move.w d0,$dff034 ; start paddle timing > jsr WaitTOF(a6) ; data ready next vblank > move.w $dff012,_Pot0Dat > move.w $dff014,_Pot1Dat > >-- > >Frank P. Weed II uucp: uunet!isis!nyx!ufweed!fweed Refer to the latest RKMs. They have an example of reading various gameport devices, and how to use the gameport device. -- Kevin-Neil Klop -- Kevin Klop {uunet|rutgers|amiga}!cbmvax!kevin Commodore-Amiga, Inc. The number, 111-111-1111 has been changed. The new number is: 134-253-2452-243556-678893-3567875645434-4456789432576-385972 Disclaimer: _I_ don't know what I said, much less my employer.
jcs@crash.cts.com (John Schultz) (06/09/90)
In article <3338.AA3338@ufweed.UUCP> fweed@ufweed.UUCP (Frank P. Weed II) writes: > How exactly does a person read standard Atari paddles from assembly? The >following fragment would seem to be correct, but Intuition doesn't like the >"move.w d0,$dff034" - it thinks it has RMB events. > > move.l _GfxBase,a6 ; C has this variable > jsr WaitTOF(a6) > moveq.l #1,d0 > move.w d0,$dff034 ; start paddle timing > jsr WaitTOF(a6) ; data ready next vblank > move.w $dff012,_Pot0Dat > move.w $dff014,_Pot1Dat You should allocate the pot bits from misc.resource, and use WritePOTGO. Furthermore, you should do your writes from a vertical blanking interrupt, as it will be more more efficient than waiting around with WaitTOF(). You'll need to throw a couple of .22uf caps between pins 5-8 and 9-8 to get full range readings, assuming the paddles are wired correcly for the Amiga. The caps also tend to suppress jitter. John