[comp.sys.apple] joystick and GS and clock speed

AWCTTYPA@UIAMVS.BITNET ("David A. Lyons") (08/29/88)

Pardon me if you've seen this note before--as far as I can tell, it did not
make it to the net on the first try.
---- resent note follows ----
>Date:         Tue, 23 Aug 88 19:11:27 GMT
>From:         Tom Schenck <hp-sdd!ncr-sd!crash!maddie@HPLABS.HP.COM>

>Put your //gs at SLOW system speed, exit to BASIC, and run the following
>program -
>
>  10 PRINT PDL(0), PDL(1):GOTO 10
>
>You should see a long row of values, both somwhere close to 128
>(120-135). Now change your system speed to FAST, and run it again.
>You should get two long columns of numbers, from 250-255. A lot of
>the time, they will ONLY be 255.

I just tried that, and my numbers were always centered near 128 (I
left the joystick centered, of course).  Changing speed had no
effect on the numbers.

>The problem derives from the Apple ROM routines. The way they get a
>joystick reading is thusly:
>
>  -Reset the joystick timer
>  -wait for the timer to reach 0
>  -if the timer doesn't reach 0 in a reasonable number of cycles, then it
>   equals 255.

The IIgs ROM switches to "normal" speed before doing the above and
then resumes the speed that was in effect when the routine was
called.

>From simple deductive reasoning, you can see that there is a problem
>when this routine (written for the old days of 1.023 Mhz Apples) is
>run at faster than 1.023 Mhz, namely the 2.5-2.8 Mhz of the fast //gs
>system speed.

Correct--there's a problem when a program reads the joystick itself,
the way the ROM *used* to on the II+, //e, and //c.  Programs that
actually make the ROM call will work fine in either speed; programs
that read the joystick directly without special consideration for
the IIgs will have to be run in "Normal" mode rather than "Fast."

>UUCP: {cbosgd, hplabs!hp-sdd, sdcsvax, nosc}!crash!pnet01!maddie
>ARPA: crash!pnet01!maddie@nosc.mil
>INET: maddie@pnet01.CTS.COM
>
>Tom Schenck, member 52nd Street Development Team.

--David A. Lyons              bitnet: awcttypa@uiamvs
  DAL Systems                 CompuServe:  72177,3233
  P.O. Box 287                GEnie mail:    D.LYONS2
  North Liberty, IA 52317     AppleLinkPE: Dave Lyons