[vcf-midatlantic] Known-good IBM joystick?
evan at vcfed.org
Tue Jul 10 15:05:27 EDT 2018
> Well that is mighty simple.
> So if you speak the truth, your PC subroutine becomes:
> 3000 REM NAVIGATION
> 3010 FB=STICK(1):LR=STICK(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 OUT P,M: REM SEND COMMANDS
> 3070 REM IF M = 10 THEN CALL - 198: FOR W = 1 TO 500: NEXT W: REM
> BACKUP ALERT
> 3080 RETURN
> Is P set somewhere?
Yes, it's set at the start of the program in the card initialization
> and is it definitely not being clobbered somewhere?
> That would be a difference you would not notice on the
> Apple side since it uses L instead of P.
Nope it's all good.
> And this is obviously a subroutine, so there could be other areas of
> the code that
> are not portable between the PC and Apple.
> For instance, all the pokes shown on the web page won't work:
> These poke into Apple memory space where the card is mapped; not the
> same on the PC.
> 1000 REM Activate the Lego interface card
> 1010 S = 7:L = 49280 + S * 16
> 1020 POKE L + 3,1: POKE L + 2,63: POKE L + 1,0
> 1030 POKE L,0: REM CLEAR ALL PORTS
> 1040 RETURN
That's the Apple code. The IBM init code is here:
http://www.snarc.net/mbts/ibmbasic.htm ... I am on top of all this. :)
More information about the vcf-midatlantic