ksp: update with the latest versions of the files

This commit is contained in:
Vince Weaver 2016-05-27 15:42:56 -04:00
parent 7898dfd373
commit 25a7e1d97a
5 changed files with 28 additions and 21 deletions

View File

@ -1,6 +1,7 @@
PCX2HGR = ../hgr-utils/pcx2hgr PCX2HGR = ../hgr-utils/pcx2hgr
DOS33 = ../dos33fs-utils/dos33 DOS33 = ../dos33fs-utils/dos33
TXT2BAS = ../asoft_basic-utils/tokenize_asoft TXT2BAS = ../asoft_basic-utils/tokenize_asoft
SHAPETABLE = ../hgr-utils/shape_table
all: ksp.dsk all: ksp.dsk
@ -28,14 +29,14 @@ PHYSICS.BAS: physics.bas
VAB.BAS: vab.bas VAB.BAS: vab.bas
$(TXT2BAS) < vab.bas > VAB.BAS $(TXT2BAS) < vab.bas > VAB.BAS
LOAD_DEMO.BAS: load_demo.bas LOAD_KSP.BAS: load_ksp.bas
$(TXT2BAS) < load_demo.bas > LOAD_DEMO.BAS $(TXT2BAS) < load_ksp.bas > LOAD_KSP.BAS
ROCKET.SHAPE: ship2.table ROCKET.SHAPE: ship2.table
../hgr-utils/shape_table -b < ship2.table > ROCKET.SHAPE $(SHAPETABLE) -b < ship2.table > ROCKET.SHAPE
VAB.SHAPE: ship.table VAB.SHAPE: ship.table
../hgr-utils/shape_table -b < ship.table > VAB.SHAPE $(SHAPETABLE) -b < ship.table > VAB.SHAPE
ksp.dsk: ACMPLX.BAS \ ksp.dsk: ACMPLX.BAS \
@ -44,7 +45,7 @@ ksp.dsk: ACMPLX.BAS \
KSP.BAS \ KSP.BAS \
ROCKET.SHAPE \ ROCKET.SHAPE \
VAB.SHAPE \ VAB.SHAPE \
LOAD_DEMO.BAS \ LOAD_KSP.BAS \
LAUNCH.BAS GLOBE.HGR LAUNCHPAD.HGR ORBIT_TOP.HGR ORBIT_RIGHT.HGR \ LAUNCH.BAS GLOBE.HGR LAUNCHPAD.HGR ORBIT_TOP.HGR ORBIT_RIGHT.HGR \
LOADING.BAS LOADING.HGR SQUAD.HGR TITLE.HGR \ LOADING.BAS LOADING.HGR SQUAD.HGR TITLE.HGR \
PHYSICS.BAS \ PHYSICS.BAS \
@ -65,7 +66,7 @@ ksp.dsk: ACMPLX.BAS \
$(DOS33) -y ksp.dsk SAVE A FLIGHT.BAS $(DOS33) -y ksp.dsk SAVE A FLIGHT.BAS
$(DOS33) -y ksp.dsk SAVE A CONTRACT.BAS $(DOS33) -y ksp.dsk SAVE A CONTRACT.BAS
$(DOS33) -y ksp.dsk SAVE A KSP.BAS $(DOS33) -y ksp.dsk SAVE A KSP.BAS
$(DOS33) -y ksp.dsk SAVE A LOAD_DEMO.BAS $(DOS33) -y ksp.dsk SAVE A LOAD_KSP.BAS
$(DOS33) -y ksp.dsk SAVE B ROCKET.SHAPE $(DOS33) -y ksp.dsk SAVE B ROCKET.SHAPE
$(DOS33) -y ksp.dsk SAVE B VAB.SHAPE $(DOS33) -y ksp.dsk SAVE B VAB.SHAPE
@ -95,4 +96,4 @@ VAB.HGR: vab.pcx
$(PCX2HGR) vab.pcx > VAB.HGR $(PCX2HGR) vab.pcx > VAB.HGR
clean: clean:
rm -f *~ *.HGR *.SHAPE rm -f *~ *.HGR *.SHAPE *.BAS

View File

@ -48,6 +48,7 @@
965 DATA 255,108,202,108,170,108 965 DATA 255,108,202,108,170,108
970 DATA 143,216,152,216,170,216,255,216,227,255 970 DATA 143,216,152,216,170,216,255,216,227,255
989 REM *** DONE LOADING *** 989 REM *** DONE LOADING ***
990 VTAB 1
999 GET A$ 999 GET A$
1000 REM *** VAB *** 1000 REM *** VAB ***
1010 REM HIMEM: 8135 1010 REM HIMEM: 8135
@ -124,8 +125,8 @@
1752 REM EN(3)=3:ST(3)=3:FT(3)=1 1752 REM EN(3)=3:ST(3)=3:FT(3)=1
1776 POKE 232,0:POKE 233,16 1776 POKE 232,0:POKE 233,16
1783 PRINT CHR$(4);"BLOAD ROCKET.SHAPE,A$1000" 1783 PRINT CHR$(4);"BLOAD ROCKET.SHAPE,A$1000"
1800 PRINT "ROCKET SUMMARY:":PRINT 1800 HOME:PRINT "ROCKET SUMMARY:":PRINT
1802 G=-9.8:LN=0:CQ=0:OM=0:S=SS 1802 G=-9.8:LN=0:CQ=0:OM=0:S=SS:DT=1
1805 FOR I=1 TO S 1805 FOR I=1 TO S
1810 EM(I)=EN(I)*1.5+ST(I)*FT(I)*0.5 1810 EM(I)=EN(I)*1.5+ST(I)*FT(I)*0.5
1812 IF I=1 THEN EM(I)=EM(I)+1.0 1812 IF I=1 THEN EM(I)=EM(I)+1.0
@ -146,7 +147,8 @@
1993 PRINT " DELTAV=";DV(I) 1993 PRINT " DELTAV=";DV(I)
1995 PRINT " TWR=";TW(I) 1995 PRINT " TWR=";TW(I)
2000 NEXT I 2000 NEXT I
2999 GET A$ 2998 GET A$
2999 HOME
3000 AN=0:GX=0:GY=-9.8:GA=0:V=0:VX=0:VY=0:AX=0:AY=0:KR=600000 3000 AN=0:GX=0:GY=-9.8:GA=0:V=0:VX=0:VY=0:AX=0:AY=0:KR=600000
3016 RX=0:RY=KR+10:RA=KR+10:TR=0:T=0:BF=0:MX=0 3016 RX=0:RY=KR+10:RA=KR+10:TR=0:T=0:BF=0:MX=0
3020 HGR:ROT=0:SCALE=2:H=0 3020 HGR:ROT=0:SCALE=2:H=0
@ -176,8 +178,8 @@
4060 GA=ATN(RX/RY) 4060 GA=ATN(RX/RY)
4065 IF RY<0 THEN GA=GA+3.14 4065 IF RY<0 THEN GA=GA+3.14
4070 GY=COS(GA)*G:GX=SIN(GA)*G:AY=AY+GY:AX=AX+GX 4070 GY=COS(GA)*G:GX=SIN(GA)*G:AY=AY+GY:AX=AX+GX
4090 ZX=VX:ZY=VY:VY=ZY+AY:VX=ZX+AX:V=SQR(VX*VX+VY*VY) 4090 ZX=VX:ZY=VY:VY=ZY+AY*DT:VX=ZX+AX*DT:V=SQR(VX*VX+VY*VY)
5012 RY=RY+0.5*(ZY+VY):RX=RX+0.5*(ZX+VX):RA=SQR(RX*RX+RY*RY) 5012 RY=RY+0.5*(ZY+VY)*DT:RX=RX+0.5*(ZX+VX)*DT:RA=SQR(RX*RX+RY*RY)
5020 IF RA<KR THEN GOTO 8000 5020 IF RA<KR THEN GOTO 8000
5030 G=-9.8/((RA/KR)*(RA/KR)) 5030 G=-9.8/((RA/KR)*(RA/KR))
5032 VTAB 21:PRINT "TIME: ";T,"STAGE: ";4-S;" ";AN$ 5032 VTAB 21:PRINT "TIME: ";T,"STAGE: ";4-S;" ";AN$
@ -192,9 +194,11 @@
6062 IF A$="D" THEN R=R+8:AN=AN+0.7853 6062 IF A$="D" THEN R=R+8:AN=AN+0.7853
6063 IF A$="C" THEN GOTO 8000 6063 IF A$="C" THEN GOTO 8000
6064 IF A$="Z" THEN TR=1 6064 IF A$="Z" THEN TR=1
6066 IF A$="X" THEN TR=0 6065 IF A$="X" THEN TR=0
6067 IF A$="M" AND OM=1 THEN OM=0:CQ=-1:GOTO 4000 6066 IF A$=">" THEN DT=DT+1
6068 IF A$="M" AND OM=0 THEN OM=1:HOME:PRINT:PRINT CHR$(4);"BLOAD GLOBE.HGR,A$2000":GOTO 6095 6067 IF A$="<" THEN DT=DT-1:IF DT<1 THEN DT=1
6068 IF A$="M" AND OM=1 THEN OM=0:CQ=-1:GOTO 4000
6069 IF A$="M" AND OM=0 THEN OM=1:HOME:PRINT:PRINT CHR$(4);"BLOAD GLOBE.HGR,A$2000":GOTO 6095
6070 IF A$=" " AND LN=1 THEN S=S-1:XX=PEEK(-16336):IF S<1 THEN S=1 6070 IF A$=" " AND LN=1 THEN S=S-1:XX=PEEK(-16336):IF S<1 THEN S=1
6071 IF A$=" " AND LN=0 THEN GOSUB 7500 6071 IF A$=" " AND LN=0 THEN GOSUB 7500
6072 IF A$="E" THEN GOSUB 8100 6072 IF A$="E" THEN GOSUB 8100
@ -206,7 +210,7 @@
6080 ROT=R 6080 ROT=R
6090 IF OM<>1 THEN XDRAW 1+((S-1)*2)+TR AT 140,80 6090 IF OM<>1 THEN XDRAW 1+((S-1)*2)+TR AT 140,80
6095 IF OM=1 THEN HX=INT(RX/25000)+140:HY=INT(-RY/25000)+85:HCOLOR=3:HPLOT HX,HY 6095 IF OM=1 THEN HX=INT(RX/25000)+140:HY=INT(-RY/25000)+85:HCOLOR=3:HPLOT HX,HY
6118 T=T+1:EC=EC+1 6118 T=T+DT:EC=EC+DT
6150 IF OM<>1 AND EC>30 THEN EC=0:GOSUB 8100 6150 IF OM<>1 AND EC>30 THEN EC=0:GOSUB 8100
6200 GOTO 4000 6200 GOTO 4000
7500 REM *** LAUNCH *** 7500 REM *** LAUNCH ***
@ -293,6 +297,7 @@
9260 PRINT " X - CUT ENGINES" 9260 PRINT " X - CUT ENGINES"
9270 PRINT " SPACE - LAUNCH,STAGE" 9270 PRINT " SPACE - LAUNCH,STAGE"
9275 PRINT " M - SWITCH TO ORBITAL VIEW" 9275 PRINT " M - SWITCH TO ORBITAL VIEW"
9277 PRINT " <,> - FAST FORWARD"
9280 PRINT " ESC - QUIT" 9280 PRINT " ESC - QUIT"
9300 GET A$ 9300 GET A$
9320 GOTO 9010 9320 GOTO 9010

Binary file not shown.

View File

@ -1,5 +0,0 @@
10 REM LOAD BASIC PROGRAM INTO HGR2 AREA
15 PRINT "LOADING PRESENTER DEMO TO A$4000"
20 POKE 104,64
30 POKE 16384,0
40 PRINT CHR$(4);"LOAD KSP.BAS"

6
ksp/load_ksp.bas Normal file
View File

@ -0,0 +1,6 @@
10 REM LOAD BASIC PROGRAM INTO HGR2 AREA
15 PRINT "KSP TOO BIG, LOADING TO A$4000"
20 POKE 104,64
30 POKE 16384,0
40 PRINT CHR$(4);"RUN KSP.BAS"
50 RUN