home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.whtech.com
/
ftp.whtech.com.tar
/
ftp.whtech.com
/
Geneve
/
9640news
/
CAT18
/
LIGHTPEN.ARK
< prev
next >
Wrap
Text File
|
2006-10-19
|
7KB
|
186 lines
?
99/4A LIGHT PEN
===============
At one time I felt that a light pen for the 4A was 1) not
possible on the TI and 2) even if it was possible, it would be
overpriced. Well I was wrong on both counts.
Thru the help a local 'hacker', we now have a working light pen.
This pen is very 'simple' both in parts and constuction. So lets
get started.
CONSTRUCTION
============
First off you will need the following:
ONE- 9 pin D-plug (joystick plug)
TWO- lengths (your choice) of 2 conductor wire
TWO- CDS photocells
TWO- junk Flair pen w/cap
(or anything big enough to hold the CDS cells
Now that you have the above, lets get to the fun part. First off
gut the pens out and cut off the end that the tip was in, and
then punch out the end of the cap. Feed the wire thru the bottom
of the pen out the tip. Solder the the two wires to the leads of
the CDS cell, and place the cell into the cap and put it on the
old pen body. Tape the wire around the pen to help prevent it
from pulling out by accident.
Grab the D-plug and hard wire the leads (pin layout is below) for
pen #1 to pin #7 and #9 (this would be the right direction with
CALL JOYST), with pen #2 solder it to pins #2 and #5 (CALL JOYST
left direction). If you have not figured it out yet, you can add
up to four more pens using the other moves of the joystick
routine. Wrap tape around the plug to protect the wiring.
Now if you have not yet converted the included program get with
it, so you can test your new light pens. As you can tell the
program name is "DOT" and you just touch the dots on the screen
with the pen. Depending upon your TV/monitor, you may need to
adjust the contrast/brightness.
One more thing before you get too busy with the pens I have to
give credit to Edwin McFall of Aberdeen, Wash. Thru his work
this is possible. Hopefuly he will be joining us here soon. If
you have any questions direct them to me: Garry Noel ID#
75166,324
JOYSTICK PORT PINOUT
================================================================
-------------
\ 1 2 3 4 5 /
\ 6 7 8 9 /
---------
PIN USE
==============================
1 NOT USED
2 COMMON LINE JOYST #2
3 UP
4 FIRE
5 LEFT
6 NOT USED
7 COMMON LINE JOYST #1
8 DOWN
9 RIGHT
==============================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100 !---------------------!
110 ! !
120 ! 0000 000 00000 !
130 ! 0 0 0 0 0 !
140 ! 0 0 0 0 0 !
150 ! 0 0 0 0 0 !
160 ! 0 0 0 0 0 !
170 ! 0 0 0 0 0 !
180 ! 0000 000 0 !
190 ! !
200 !_____________________!
210 REM by: Edwin McFall
220 REM 2005 W. 6th
230 REM ABERDEEN WA.
240 REM 98520
250 REM TI 99/4A VER. 1.1
260 REM REQUIRES LIGHTPEN
270 REM AND EXTENDED BASIC
280 REM
290 REM
300 CALL CLEAR :: CALL SCREEN(2)
310 FOR X=1 TO 10 :: CALL COLOR(X,5-11*(X>8),1):: NEXT X
320 RANDOMIZE
330 FOR X=0 TO 2
340 CALL CHAR(96+8*X,"3C7EFFFFFFFF7E3C")
350 CALL COLOR(9+X,1,1)
360 NEXT X
370 PRINT " `hp`hp `hp `hp`hp` hp` ` p`h ` p`h hp` h hp
` h p`h hp` h hp` h p`h"
380 PRINT " hp` h hp` h p`h hp` h hp` h p`h hp` ` p
`h ` p`h"
390 PRINT " `hp`hp `hp p`h": : : : :
400 PRINT : :"`hp`hp`hp`hp`hp`hp`hp`hp`hp`p BY: EDWIN MCFALL hh TOUCH D
OT TO CONTINUE. p`ph`ph`ph`ph`ph`ph`ph`ph`ph`"
410 CALL JOYST(1,X,Y):: IF X<>0 OR Y<>0 THEN 480
420 FOR C=1 TO 3
430 CALL COLOR(9,7-4*(C=1)-8*(C=2),1)
440 CALL COLOR(10,7-4*(C=2)-8*(C=3),1)
450 CALL COLOR(11,7-4*(C=3)-8*(C=1),1)
460 NEXT C
470 GOTO 410
480 CALL SOUND(100,440,0):: CALL CLEAR :: SC=0
490 DISPLAY AT(12,9):"EASY HARD"
500 DISPLAY AT(16,7):"SELECT DFFICULTY" :: DISPLAY AT(18,1):"EASY=LARGE DOTS, HA
RD=SMALL."
510 CALL HCHAR(12,9,112):: CALL HCHAR(12,19,104)
520 CALL COLOR(11,16,16,10,2,2)
530 FOR I=1 TO 10
540 CALL JOYST(1,X,Y):: IF X=4 THEN CALL MAGNIFY(2):: GOTO 610
550 NEXT I
560 CALL COLOR(11,2,2,10,16,16)
570 FOR I=1 TO 10
580 CALL JOYST(1,X,Y):: IF X=4 THEN CALL MAGNIFY(1):: GOTO 610
590 NEXT I
600 GOTO 520
610 CALL CLEAR
620 CALL SPRITE(#1,96,16,92,124)
630 DISPLAY AT(16,6)BEEP:"TOUCH DOT TO START."
640 CALL JOYST(1,X,Y):: IF X<4 THEN 640
650 CALL SOUND(-100,220,5):: CALL SOUND(-100,880,0)
660 CALL CLEAR
670 FOR L=1 TO 20
680 CALL SPRITE(#1,96,16,INT(RND0)+1,INT(RND0)+10)
690 N=0
700 CALL JOYST(1,X,Y)
710 IF X=4 THEN 730
720 N=N+1 :: GOTO 700
730 SC=SC+N :: CALL SOUND(-100,440,5)
740 DISPLAY AT(1,1):"SCORE ";SC
750 FOR X=1 TO 100 :: NEXT X
760 NEXT L
770 FOR Z=1 TO SC STEP 10
780 CALL SOUND(-100,Z+110,0)
790 NEXT Z
800 CALL CLEAR :: CALL SPRITE(#1,96,16,150,123)
810 DISPLAY AT(10,6):"YOUR SCORE IS ";SC :: DISPLAY AT(18,3):"TOUCH DOT TO PLAY
AGAIN."
820 IF SC>150 THEN 830 ELSE DISPLAY AT(12,6):" YOU CAN'T FOOL ME!
YOU CHEATED!" :: GOTO 900
830 IF SC>200 THEN 840 ELSE DISPLAY AT(12,1):" VERY GOOD! YOU'VE MASTERED
THE DOTS." :: GOTO 900
840 IF SC>225 THEN 850 ELSE DISPLAY AT(12,1):"GEE WIZ! I DIDN'T KNOW THAT HUMANS
COULD MOVE THAT FAST!" :: GOTO 900
850 IF SC>250 THEN 860 ELSE DISPLAY AT(12,1):"NOT BAD, BUT YOU'LL NEVER SWAT A
FLY AT THAT SPEED." :: GOTO 900
860 IF SC>300 THEN 870 ELSE DISPLAY AT(12,1):"YOU NEED ALOT MORE PRACTICE" :: GO
TO 900
870 IF SC>350 THEN 880 ELSE DISPLAY AT(12,1):"I THINK YOU NEED A SLOWER GAME.
MAYBE CHECKERS." :: GOTO 900
880 IF SC>400 THEN 890 ELSE DISPLAY AT(12,1):"DIDN'T ANYONE TELL YOU THAT YOUR T
RYING FOR A LOW SCORE!" :: GOTO 900
890 DISPLAY AT(12,1):"LOOKS LIKE YOU NEED HELP. TRY POINTING THE PEN AT THE DO
T STUPID!"
900 FOR Z=1 TO 500 :: CALL JOYST(1,X,Y):: IF X=4 THEN 930
910 NEXT Z
920 CALL CLEAR :: DISPLAY AT(12,1):" DOTS ALL FOLKS..." :: END
930 CALL DELSPRITE(ALL):: GOTO 480
Download complete. Turn off Capture File.