Xref: utzoo comp.sys.atari.8bit:2187 comp.sys.cbm:2003 Path: utzoo!attcan!uunet!cbmvax!fred From: fred@cbmvax.UUCP (Fred Bowen) Newsgroups: comp.sys.atari.8bit,comp.sys.cbm Subject: Re: commodore mouse Message-ID: <5690@cbmvax.UUCP> Date: 12 Jan 89 22:40:15 GMT References: <33889@bbn.COM> <5644@cbmvax.UUCP> <13398@cup.portal.com> Reply-To: fred@cbmvax.UUCP (Fred Bowen) Organization: Commodore Technology, West Chester, PA Lines: 42 In article <13398@cup.portal.com> Bob_BobR_Retelle@cup.portal.com writes: > >Fred, if you're still tuned in here, is this A/D process similar to the way >the C-64 reads the Paddle pots..? >The 8-bit Atari uses a somewhat similar way of reading the A/D ports through >hardware, although the scaling seems to be a little different. [...] >As far as the proportional mode of the 1351 mouse, does the resultant data >get stored in the same locations as the paddle values..? [...] >I guess I'm just a little bit confused as to the actual input method from >the mouse... if it's a variable resistance, as in a paddle, does the computer >translate the x-y values into an absolute position, rather than relative >direction and speed values, as an Amiga or Atari ST mouse..? The POT lines are read on the C64/128 via the SID POTx,y registers, just as the 1351 mouse movements are. The difference between an actual paddle and the mouse inputs is how they are driven- the mouse manipulates the resistance (normally variable as in the paddle) such that the value one would read from the SID POT register is equivalent to the digital data corresponding to the mouse's relative movement (bits 6-1). The mouse's speed can only be inferred, taking into account the polling frequency and the relative change in position. The left button appears as a joystick "fire" signal, and the right button as a joystick "up" signal. The specifics pertaining to the SID and the values of the caps and resistors (accounts for the difference between CBM and Atari scaling factors) can be found in the C64 or C128 Programmer's Ref Guide. The specifics pertaining to the value read from the SID POT register can be found in the 1351 User's Guide. One important note- on the C64/128, a 4066 analog switch is used to toggle the POT lines between the two joy/paddle ports. The selection is made via one of the lines shared with the keyboard scan lines. This means a keyscan will temporarily clobber anything in the POT registers. Since the POT register requires some time to "charge" before its data is valid, at least 1.6ms must transpire after this switch has been twiddled. -- -- Fred Bowen uucp: {uunet|rutgers|pyramid}!cbmvax!fred arpa: cbmvax!fred@uunet.uu.net tele: 215 431-9100 Commodore Electronics, Ltd., 1200 Wilson Drive, West Chester, PA, 19380