[Coco] X-PAD question
Neil Morrison
neilsmorr at hotpop.com
Thu Jan 8 12:41:56 EST 2004
----- Original Message -----
From: "Torsten Dittel" <Torsten at Dittel.info>
> Does anyone know how to test an X-PAD on a CoCo2? Is there Software
> integrated in the controller? Anything to think about before
plugging it
> in for the first time? Are there some PEEKs'nPOKEs to read the pen
> position from within BASIC? Which software came originally with
that
> device? I remember it was on cassette only...
There's a crude version of the template on
http://groups.yahoo.com/group/ColorComputer/files/
also
10 ' X-PAD Super-Duper DEMO by Steve, knows everything except the
order of
the status bits for the CoCo X-Pad, Noskowicz
20 CLS
30 PX=&HFF60:PY=&HFF61:PS=&HFF62
40 PRINT at 328,"ANY KEY STOPS"
50 X=PEEK(PX):Y=PEEK(PY):S=PEEK(PS)
60 PRINT at 0,"X=";X" ";
70 PRINT at 32,"Y=";Y" ";
80 PRINT at 64, "S=";S;
90 PLAY"L155 O5 B"
91 IF (S AND 2)=2 THEN PRINT@(32*6+13),"NEAR " ELSE
PRINT@(32*6+13),"FAR "
92 IF (S AND 1)=1 THEN PRINT at 108,"PEN DOWN" ELSE PRINT at 108, "PEN UP
"
93 IF (S AND 4)=4 THEN IF (X<50) THEN PRINT at 243,"RIGHT MARGIN" ELSE
ELSEPRINT at 243,""
94 IF (S AND 4)=4 THEN IF (X>200) THEN PRINT at 224,"LEFT MARGIN" ELSE
ELSE
PRINT at 224," ";
95 IF (S AND 8)=8 THEN PRINT at 10,"TOP MARGIN" ELSE PRINT at 10," "
96 IF (Y>191) AND (S AND 8)<>8 THEN PRINT at 489,"BOTTOM MARGIN"; ELSE
PRINT at 489," ";
97 K$=INKEY$
100 IF K$="" GOTO 50 ELSE END
More information about the Coco
mailing list