Code Snippets for The TI-99/4a

 

Call Sound routine I use for SysOp paging on my bbs via XB.  If you like Star Trek you will like it:

 

 

100 CALL SOUND(1250,1760,0,1762,0):: CALL SOUND(1250,1760,0,1319,0,1321,0):: CALL SOUND(1250,1760,7,1319,4,1568,0)

110 CALL SOUND(1250,1319,7,1568,3,988,0)

 

 

Program to test input from joysticks and fire button

 

100 CALL CLEAR

110 DISPLAY AT(3,2):"Joystick Test Program V1.0" :: DISPLAY AT(5,7):"Copyright 2014" :: DISPLAY AT(7,7):"Chris Schneider"

120 DISPLAY AT(12,2):"Joystick 1 or 2>" :: ACCEPT AT(12,18)SIZE(1)BEEP:J

130 DISPLAY AT(14,2):"Release ALPHA Lock!" :: DISPLAY AT(16,2):"FCTN-4 = BREAK":: DISPLAY AT(18,1):"Starting..Move Your Joystick!"

140 CALL JOYST(J,X,Y)

150 CALL KEY(J,K,S)

160 IF X=-4 AND Y=4 THEN PRINT "Upper Left Detected" :: GOTO 140

170 IF X=4 AND Y=4 THEN PRINT "Upper Right Detected" :: GOTO 140

180 IF X=-4 AND Y=-4 THEN PRINT "Lower Left Detected" :: GOTO 140

190 IF X=4 AND Y=-4 THEN PRINT "Lower Right Detected" :: GOTO 140

200 IF X=4 THEN PRINT "Right Detected"

210 IF Y=4 THEN PRINT "Up Detected" :: GOTO 140

220 IF Y=-4 THEN PRINT "Down Detected" :: GOTO 140

230 IF X=-4 THEN PRINT "Left Detected"

240 IF K=18 THEN PRINT "Fire Detected"

250 GOTO 140

260 END

© 2015 by Chris Schneider

  • Twitter Metallic
  • s-facebook
This site was designed with the
.com
website builder. Create your website today.
Start Now