[vcf-midatlantic] Known-good IBM joystick?
Evan Koblentz
evan at vcfed.org
Tue Jul 10 13:34:54 EDT 2018
I know anyone can make mistakes, but .... I am VERY confident in my code
this time around. :)
Alas, I don't have the actual IBM code here at home.
The joystick routine in my (perfectly working) Applesoft code is:
--------------------------
3000 REM NAVIGATION
3010 FB = PDL (1):LR = PDL (0):M = 0: REM SET VARIABLES
3020 IF FB < 75 THEN M = 5
3030 IF FB > 180 THEN M = 10
3040 IF LR < 75 THEN M = 9
3050 IF LR > 180 THEN M = 6
3060 POKE L,M: REM SEND COMMANDS
3070 IF M = 10 THEN CALL - 198: FOR W = 1 TO 500: NEXT W: REM BACKUP
ALERT
3080 RETURN
--------------------------
I made two changes for the IBM side:
3010 FB=STICK(1):LR=STICK(0):M=0: REM SET VARIABLES
3060 OUT P,M: REM SEND COMMANDS
Both lines are correct. No room for gray area there.
I omitted line 3070 for now. It makes the backup beep when the robot
goes in reverse. :) I'll add an IBM version back in after I get the
navigation working again.
I don't have time now to explain to everyone how the Lego system works,
but anyone who's interested is welcome to examine the relevant pages of
my under-construction web site about this subject. :)
http://www.snarc.net/mbts/applebasic.htm
http://www.snarc.net/mbts/direct.htm
More information about the vcf-midatlantic
mailing list