Home » Personal collection » Commodore disks » disk50a2_progs1.d64 » globe2
globe2
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Personal collection » Commodore disks » disk50a2_progs1.d64 |
Filename: | globe2 |
Read OK: | ✔ |
File size: | 0AD3 bytes |
Load address: | 0801 |
Exec address: | 0000 |
File contents
10 REM PROGRAM GLOBE 20 REM VERSION B1.0 30 REM AUTHOR M. TOULMONDE 40 REM BEEBUG JAN/FEB 1986 50 REM COPYRIGHT 60 REM CONVERTED BY D. FORD 70 : 100 K=0.95:GOSUB 1000:REM INPUT 110 GOSUB 1180:REM GLOBE 120 IF P<>0 THEN GOSUB 1380:REM LINES 130 GOSUB 1500:REM CONTS 140 GET A$:IF A$="" THEN 140 150 GOSUB 2500:REM GRAPH OFF 160 GOTO 70 170 : 1000 REM INPUT 1005 PRINT"<clr><white>";:POKE53280,0:POKE53281,0 1010 POKE211,15:POKE214,2:SYS 58732:PRINT"🶠♠ 🻠🰠ðŸ´":PRINTCHR$(14) 1020 PRINT" ðŸ°HIS PROGRAM DRAWS A PICTURE OF THE" 1022 PRINT"ðŸ¶ARTH AS IT WOULD BE SEEN IF WE WERE" 1024 PRINT"IN SPACE.":PRINT 1030 PRINT"♠ MAGNIFICATION OF 1 GIVES A COMPLETE" 1032 PRINT"REPRESENTATION OF THE GLOBE":PRINT 1040 INPUT"╲AGNIFICATION";R:PRINT 1050 R=500*ABS(R):IF R=0 THEN R=500 1060 PRINT"ðŸ±IVE THE POSITIONS OF THE POINT LOCATED" 1062 PRINT"AT THE VERTICAL OF WHICHEVER COUNTRY" 1064 PRINT"OR PART OF THE EARTH YOU WISH TO SEE:":PRINT 1070 INPUT"ðŸ¼ATITUDE (-90 TO 90)";LA 1080 IF ABS(LA)>90 THEN 1070 1090 INPUT"ðŸ¼ONGITUDE (-180 TO 180";LO 1100 LO=-LO:IF ABS(LO)>180 THEN 1090 1110 PRINT:PRINT"╲ERIDIAN AND PARALLEL LINES (ðŸµ/╱) ? "; 1120 GET R$:IF R$<>"Y" AND R$<>"N" THEN 1120 1125 PRINT R$ 1130 IF R$="N" THEN P=0:RETURN 1140 INPUT"♠NGLE STEP (EG 15/30/45/90)";P 1150 IF P<1 THEN P=90 1160 RETURN 1170 : 1180 REM GLOBE 1200 GOSUB 2000 1230 G=π/180:S=SIN(LA*G):C=COS(LA*G) 1240 IF R>850 THEN T=0:GOTO 1340 1250 CL=1:XX%=R:YY%=0 1270 FOR I=0 TO 180 STEP 2 1280 X1=R*COS(I*G):Y1=K*R*SIN(I*G) 1290 X2=R*COS((360-I)*G):Y2=K*R*SIN((360-I)*G) 1300 GOSUB 3000 1330 NEXT:T=0 1340 RETURN 1370 : 1380 REM LINES 1390 CL=0 1400 FOR L=0 TO 180-P STEP P 1410 FORF=90TO450STEP12:FC=F:LC=L:GOSUB1640:NEXT 1420 T=0:NEXT L 1430 FORL=0TO360STEP12:FC=66.5:LC=L:GOSUB1640:NEXT 1440 FORL=0TO360STEP12:FC=-66.5:LC=L:GOSUB1640:NEXT 1450 FORL=0TO360STEP12:FC=23.5:LC=L:GOSUB1640:NEXT 1460 FORL=0TO360STEP12:FC=-23.5:LC=L:GOSUB1640:NEXT 1470 FORL=0TO360STEP12:FC=0:LC=L:GOSUB1640:NEXT 1480 RETURN 1490 : 1630 : 1640 REM C 1650 D=(LC-LO)*G:Q=SIN(D):M=COS(D) 1660 U=COS(FC*G):V=SIN(FC*G) 1670 X%=R*U*Q:Y%=R*(V*C-U*M*S)*K 1680 IF T=0 THEN X1=X%:Y1=Y%:GOTO 1710 1690 Z=V*S+U*M*C 1700 IF Z<0 THEN X1=X%:Y1=Y%:GOTO 1710 1705 X2=X%:Y2=Y%:GOSUB 3000 1710 T=1:RETURN 2000 REM HIRES ON! 2010 POKE 53272,(PEEK(53272)AND15)OR16 2020 POKE 56578,PEEK(56578)OR3 2030 POKE 56576,(PEEK(56576)AND252)OR3 2040 POKE 53272,(PEEK(53272)AND241)OR8 2050 POKE 53265,PEEK(53265)OR32 2055 POKE 53270,PEEK(53270) OR 16 2060 FOR J=$400 TO $07F0 2070 POKEJ,86:NEXT 2080 FORJ=$2000 TO $4000:POKEJ,0:NEXT 2085 POKE 53280,0:POKE 53281,0 2090 RETURN 2500 REM HIRES OFF! 2510 POKE 53265,PEEK(53265) AND 223 2520 POKE 53272,(PEEK(53272)AND240)OR4 2530 RETURN 3000 REM DRAW LINE! 3010 XA=(X1+640)/5:XB=(X2+640)/5 3020 YA=(512-Y1)/6:YB=(512-Y2)/6 3030 IF XA<>XB THEN MP=(YB-YA)/(XB-XA):CP=YA-MP*XA 3040 IF ABS(XB-XA)<ABS(YB-YA) THEN 3120 3050 IF XA=XB THEN RETURN 3060 FOR X3=XA TO XB STEP 2*SGN(XB-XA) 3070 Y3=MP*X3+CP 3080 GOSUB 3500:REM PLOT 3090 NEXT:X1=X2:Y1=Y2 3100 RETURN 3110 : 3120 FOR Y3=YA TO YB STEP SGN(YB-YA) 3130 X3=XA:IF XA<>XB THEN X3=(Y3-CP)/MP 3140 GOSUB 3500:REM PLOT 3150 NEXT:X1=X2:Y1=Y2 3160 RETURN 3500 XT=X3:X3=X3 AND 254:CX=0 3510 IF (CL AND 1)=1 THEN CX=1 3520 GOSUB 4000:CX=0:X3=X3+1 3530 IF (CL AND 2)=2 THEN CX=1 3540 GOSUB 4000:X3=XT:RETURN 4000 CH=INT(X3/8):RO=INT(Y3/8):LN=Y3 AND 7 4010 BY=8192+RO*320+8*CH+LN:BI=7-(X3 AND 7) 4020 IF (CX AND 1)=1 THEN POKE BY,PEEK(BY) OR (2^BI):RETURN 4030 POKE BY,PEEK(BY) AND (255-(2^BI)):RETURN
� PROGRAM GLOBE ( � VERSION B1.0 B � AUTHOR M. TOULMONDE \( � BEEBUG JAN/FEB 1986 l2 � COPYRIGHT �<