Home » Archimedes archive » Acorn User » AU 1997-10 A.adf » Regulars » StarInfo/Stoner/MegaBalls
StarInfo/Stoner/MegaBalls
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 » Archimedes archive » Acorn User » AU 1997-10 A.adf » Regulars |
| Filename: | StarInfo/Stoner/MegaBalls |
| Read OK: | ✔ |
| File size: | 0543 bytes |
| Load address: | 0000 |
| Exec address: | 0000 |
File contents
1REM Mega Balls Demo
2REM LEN Nigel Stoner 30/10/96
3ON ERROR MODE12:REPORT:PRINT " at line ";ERL:END
4
5PROCinit
6PROCmega
7SYS 6,112,s%:s%=s%EOR3:SYS6,113,s%
8COLOUR8:PRINT "Finished, press SPACE."
9SYS 6,112,s%:s%=s%EOR3:SYS6,113,s%
10PRINT "Finished, press SPACE."
11END
12
13DEFPROCinit
14LOCAL a%
15MODE 9+128:CLS:ORIGIN 640,320:OFF
16s%=1:SYS 6,112,s%:s%=s%EOR3:SYS6,113,s%:CLS:SYS 6,112,s%:s%=s%EOR3:SYS6,113,s%:CLS:a%=RND(-TIME)
17DIM bx%(2),by%(2),r%(15),g%(15),b%(15),sina(360),cosa(360)
18bx%(1)=640:by%(1)=512
19FOR a%=0 TO 360:sina(a%)=SINRAD(a%):cosa(a%)=COSRAD(a%):NEXT a%
20PROCplascol
21ENDPROC
22
23DEFPROCmega
24LOCAL a%,b%,c%, s,c,ang,ang%, xr%,yr%, bx%,by%,boing%
25ang=RND(360)
26REPEAT:ang+=5:ang%=ang MOD 360:ORIGIN640,380*sina(ang%/2)+320:xr%=320*SINRAD(ang/12):yr%=320*SINRAD(ang/16):bx%(0)=xr%*sina(ang%):by%(0)=yr%*cosa(ang%):bx%(2)=yr%*sina(ang%):by%(2)=xr%*cosa(ang%)
27GCOL3,3:CIRCLEFILLbx%(0),by%(0),256:GCOL3,4:CIRCLEFILLbx%(2),by%(2),196:GCOL3,8:CIRCLEFILL0,0,320:GCOL3,5:CIRCLEFILL-bx%(0),-by%(0),256:GCOL3,6:CIRCLEFILL-bx%(2),-by%(2),196:SYS 6,112,s%:s%=s%EOR3:SYS6,113,s%:WAIT:CLS
28UNTIL ang>7200
29ENDPROC
30
31DEFPROCplascol
32FOR a%=0 TO 12 STEP 4:r%(a%)=RND(255):g%(a%)=RND(255):b%(a%)=RND(255)
33:NEXT a%:s%=4:d%=2:FORb%=0 TO 1:FORa%=0+d% TO 16-d% STEP s%
34r%(a%)=(r%(a%-d%)+r%((a%+d%)MOD16))/2:g%(a%)=(g%(a%-d%)+g%((a%+d%)MOD16))/2:b%(a%)=(b%(a%-d%)+g%((a%+d%)MOD16))/2
35NEXTa%:s%=2:d%=1:NEXT b%
36FOR a%=1 TO 15:COLOURa%,r%(a%),g%(a%),b%(a%):NEXT
37COLOUR 1,0,0,0:COLOUR 3,0,0,0:COLOUR 4,0,0,0:COLOUR 5,0,0,0:COLOUR 6,0,0,0:COLOUR 7,0,0,0
38ENDPROC
� Mega Balls Demo � � Nigel Stoner 30/10/96 � � �12:�:� " at line ";�:� �init �mega "ș 6,112,s%:s%=s%�3:ș6,113,s% !�8:� "Finished, press SPACE." "ș 6,112,s%:s%=s%�3:ș6,113,s% � "Finished, press SPACE." � ��init � a% � 9+128:�:ȑ 640,320:� Ss%=1:ș 6,112,s%:s%=s%�3:ș6,113,s%:�:ș 6,112,s%:s%=s%�3:ș6,113,s%:�:a%=�(-�) <� bx%(2),by%(2),r%(15),g%(15),b%(15),sina(360),cosa(360) bx%(1)=640:by%(1)=512 5� a%=0 � 360:sina(a%)=��(a%):cosa(a%)=��(a%):� a% �plascol � ��mega 5� a%,b%,c%, s,c,ang,ang%, xr%,yr%, bx%,by%,boing% ang=�(360) ��:ang+=5:ang%=ang � 360:ȑ640,380*sina(ang%/2)+320:xr%=320*��(ang/12):yr%=320*��(ang/16):bx%(0)=xr%*sina(ang%):by%(0)=yr%*cosa(ang%):bx%(2)=yr%*sina(ang%):by%(2)=xr%*cosa(ang%) ��3,3:ȏȐbx%(0),by%(0),256:�3,4:ȏȐbx%(2),by%(2),196:�3,8:ȏȐ0,0,320:�3,5:ȏȐ-bx%(0),-by%(0),256:�3,6:ȏȐ-bx%(2),-by%(2),196:ș 6,112,s%:s%=s%�3:ș6,113,s%:Ȗ:� � ang>7200 � ��plascol =� a%=0 � 12 � 4:r%(a%)=�(255):g%(a%)=�(255):b%(a%)=�(255) !3:� a%:s%=4:d%=2:�b%=0 � 1:�a%=0+d% � 16-d% � s% "or%(a%)=(r%(a%-d%)+r%((a%+d%)�16))/2:g%(a%)=(g%(a%-d%)+g%((a%+d%)�16))/2:b%(a%)=(b%(a%-d%)+g%((a%+d%)�16))/2 #�a%:s%=2:d%=1:� b% $*� a%=1 � 15:�a%,r%(a%),g%(a%),b%(a%):� %?� 1,0,0,0:� 3,0,0,0:� 4,0,0,0:� 5,0,0,0:� 6,0,0,0:� 7,0,0,0 &� �
00000000 0d 00 01 15 f4 20 4d 65 67 61 20 42 61 6c 6c 73 |..... Mega Balls| 00000010 20 44 65 6d 6f 0d 00 02 1d f4 20 a9 20 4e 69 67 | Demo..... . Nig| 00000020 65 6c 20 53 74 6f 6e 65 72 20 33 30 2f 31 30 2f |el Stoner 30/10/| 00000030 39 36 0d 00 03 1f ee 20 85 20 eb 31 32 3a f6 3a |96..... . .12:.:| 00000040 f1 20 22 20 61 74 20 6c 69 6e 65 20 22 3b 9e 3a |. " at line ";.:| 00000050 e0 0d 00 04 04 0d 00 05 09 f2 69 6e 69 74 0d 00 |..........init..| 00000060 06 09 f2 6d 65 67 61 0d 00 07 22 c8 99 20 36 2c |...mega...".. 6,| 00000070 31 31 32 2c 73 25 3a 73 25 3d 73 25 82 33 3a c8 |112,s%:s%=s%.3:.| 00000080 99 36 2c 31 31 33 2c 73 25 0d 00 08 21 fb 38 3a |.6,113,s%...!.8:| 00000090 f1 20 22 46 69 6e 69 73 68 65 64 2c 20 70 72 65 |. "Finished, pre| 000000a0 73 73 20 53 50 41 43 45 2e 22 0d 00 09 22 c8 99 |ss SPACE."..."..| 000000b0 20 36 2c 31 31 32 2c 73 25 3a 73 25 3d 73 25 82 | 6,112,s%:s%=s%.| 000000c0 33 3a c8 99 36 2c 31 31 33 2c 73 25 0d 00 0a 1e |3:..6,113,s%....| 000000d0 f1 20 22 46 69 6e 69 73 68 65 64 2c 20 70 72 65 |. "Finished, pre| 000000e0 73 73 20 53 50 41 43 45 2e 22 0d 00 0b 05 e0 0d |ss SPACE."......| 000000f0 00 0c 04 0d 00 0d 0a dd f2 69 6e 69 74 0d 00 0e |.........init...| 00000100 08 ea 20 61 25 0d 00 0f 1a eb 20 39 2b 31 32 38 |.. a%..... 9+128| 00000110 3a db 3a c8 91 20 36 34 30 2c 33 32 30 3a 87 0d |:.:.. 640,320:..| 00000120 00 10 53 73 25 3d 31 3a c8 99 20 36 2c 31 31 32 |..Ss%=1:.. 6,112| 00000130 2c 73 25 3a 73 25 3d 73 25 82 33 3a c8 99 36 2c |,s%:s%=s%.3:..6,| 00000140 31 31 33 2c 73 25 3a db 3a c8 99 20 36 2c 31 31 |113,s%:.:.. 6,11| 00000150 32 2c 73 25 3a 73 25 3d 73 25 82 33 3a c8 99 36 |2,s%:s%=s%.3:..6| 00000160 2c 31 31 33 2c 73 25 3a db 3a 61 25 3d b3 28 2d |,113,s%:.:a%=.(-| 00000170 91 29 0d 00 11 3c de 20 62 78 25 28 32 29 2c 62 |.)...<. bx%(2),b| 00000180 79 25 28 32 29 2c 72 25 28 31 35 29 2c 67 25 28 |y%(2),r%(15),g%(| 00000190 31 35 29 2c 62 25 28 31 35 29 2c 73 69 6e 61 28 |15),b%(15),sina(| 000001a0 33 36 30 29 2c 63 6f 73 61 28 33 36 30 29 0d 00 |360),cosa(360)..| 000001b0 12 19 62 78 25 28 31 29 3d 36 34 30 3a 62 79 25 |..bx%(1)=640:by%| 000001c0 28 31 29 3d 35 31 32 0d 00 13 35 e3 20 61 25 3d |(1)=512...5. a%=| 000001d0 30 20 b8 20 33 36 30 3a 73 69 6e 61 28 61 25 29 |0 . 360:sina(a%)| 000001e0 3d b5 b2 28 61 25 29 3a 63 6f 73 61 28 61 25 29 |=..(a%):cosa(a%)| 000001f0 3d 9b b2 28 61 25 29 3a ed 20 61 25 0d 00 14 0c |=..(a%):. a%....| 00000200 f2 70 6c 61 73 63 6f 6c 0d 00 15 05 e1 0d 00 16 |.plascol........| 00000210 04 0d 00 17 0a dd f2 6d 65 67 61 0d 00 18 35 ea |.......mega...5.| 00000220 20 61 25 2c 62 25 2c 63 25 2c 20 73 2c 63 2c 61 | a%,b%,c%, s,c,a| 00000230 6e 67 2c 61 6e 67 25 2c 20 78 72 25 2c 79 72 25 |ng,ang%, xr%,yr%| 00000240 2c 20 62 78 25 2c 62 79 25 2c 62 6f 69 6e 67 25 |, bx%,by%,boing%| 00000250 0d 00 19 0e 61 6e 67 3d b3 28 33 36 30 29 0d 00 |....ang=.(360)..| 00000260 1a b4 f5 3a 61 6e 67 2b 3d 35 3a 61 6e 67 25 3d |...:ang+=5:ang%=| 00000270 61 6e 67 20 83 20 33 36 30 3a c8 91 36 34 30 2c |ang . 360:..640,| 00000280 33 38 30 2a 73 69 6e 61 28 61 6e 67 25 2f 32 29 |380*sina(ang%/2)| 00000290 2b 33 32 30 3a 78 72 25 3d 33 32 30 2a b5 b2 28 |+320:xr%=320*..(| 000002a0 61 6e 67 2f 31 32 29 3a 79 72 25 3d 33 32 30 2a |ang/12):yr%=320*| 000002b0 b5 b2 28 61 6e 67 2f 31 36 29 3a 62 78 25 28 30 |..(ang/16):bx%(0| 000002c0 29 3d 78 72 25 2a 73 69 6e 61 28 61 6e 67 25 29 |)=xr%*sina(ang%)| 000002d0 3a 62 79 25 28 30 29 3d 79 72 25 2a 63 6f 73 61 |:by%(0)=yr%*cosa| 000002e0 28 61 6e 67 25 29 3a 62 78 25 28 32 29 3d 79 72 |(ang%):bx%(2)=yr| 000002f0 25 2a 73 69 6e 61 28 61 6e 67 25 29 3a 62 79 25 |%*sina(ang%):by%| 00000300 28 32 29 3d 78 72 25 2a 63 6f 73 61 28 61 6e 67 |(2)=xr%*cosa(ang| 00000310 25 29 0d 00 1b a8 e6 33 2c 33 3a c8 8f c8 90 62 |%).....3,3:....b| 00000320 78 25 28 30 29 2c 62 79 25 28 30 29 2c 32 35 36 |x%(0),by%(0),256| 00000330 3a e6 33 2c 34 3a c8 8f c8 90 62 78 25 28 32 29 |:.3,4:....bx%(2)| 00000340 2c 62 79 25 28 32 29 2c 31 39 36 3a e6 33 2c 38 |,by%(2),196:.3,8| 00000350 3a c8 8f c8 90 30 2c 30 2c 33 32 30 3a e6 33 2c |:....0,0,320:.3,| 00000360 35 3a c8 8f c8 90 2d 62 78 25 28 30 29 2c 2d 62 |5:....-bx%(0),-b| 00000370 79 25 28 30 29 2c 32 35 36 3a e6 33 2c 36 3a c8 |y%(0),256:.3,6:.| 00000380 8f c8 90 2d 62 78 25 28 32 29 2c 2d 62 79 25 28 |...-bx%(2),-by%(| 00000390 32 29 2c 31 39 36 3a c8 99 20 36 2c 31 31 32 2c |2),196:.. 6,112,| 000003a0 73 25 3a 73 25 3d 73 25 82 33 3a c8 99 36 2c 31 |s%:s%=s%.3:..6,1| 000003b0 31 33 2c 73 25 3a c8 96 3a db 0d 00 1c 0e fd 20 |13,s%:..:...... | 000003c0 61 6e 67 3e 37 32 30 30 0d 00 1d 05 e1 0d 00 1e |ang>7200........| 000003d0 04 0d 00 1f 0d dd f2 70 6c 61 73 63 6f 6c 0d 00 |.......plascol..| 000003e0 20 3d e3 20 61 25 3d 30 20 b8 20 31 32 20 88 20 | =. a%=0 . 12 . | 000003f0 34 3a 72 25 28 61 25 29 3d b3 28 32 35 35 29 3a |4:r%(a%)=.(255):| 00000400 67 25 28 61 25 29 3d b3 28 32 35 35 29 3a 62 25 |g%(a%)=.(255):b%| 00000410 28 61 25 29 3d b3 28 32 35 35 29 0d 00 21 33 3a |(a%)=.(255)..!3:| 00000420 ed 20 61 25 3a 73 25 3d 34 3a 64 25 3d 32 3a e3 |. a%:s%=4:d%=2:.| 00000430 62 25 3d 30 20 b8 20 31 3a e3 61 25 3d 30 2b 64 |b%=0 . 1:.a%=0+d| 00000440 25 20 b8 20 31 36 2d 64 25 20 88 20 73 25 0d 00 |% . 16-d% . s%..| 00000450 22 6f 72 25 28 61 25 29 3d 28 72 25 28 61 25 2d |"or%(a%)=(r%(a%-| 00000460 64 25 29 2b 72 25 28 28 61 25 2b 64 25 29 83 31 |d%)+r%((a%+d%).1| 00000470 36 29 29 2f 32 3a 67 25 28 61 25 29 3d 28 67 25 |6))/2:g%(a%)=(g%| 00000480 28 61 25 2d 64 25 29 2b 67 25 28 28 61 25 2b 64 |(a%-d%)+g%((a%+d| 00000490 25 29 83 31 36 29 29 2f 32 3a 62 25 28 61 25 29 |%).16))/2:b%(a%)| 000004a0 3d 28 62 25 28 61 25 2d 64 25 29 2b 67 25 28 28 |=(b%(a%-d%)+g%((| 000004b0 61 25 2b 64 25 29 83 31 36 29 29 2f 32 0d 00 23 |a%+d%).16))/2..#| 000004c0 16 ed 61 25 3a 73 25 3d 32 3a 64 25 3d 31 3a ed |..a%:s%=2:d%=1:.| 000004d0 20 62 25 0d 00 24 2a e3 20 61 25 3d 31 20 b8 20 | b%..$*. a%=1 . | 000004e0 31 35 3a fb 61 25 2c 72 25 28 61 25 29 2c 67 25 |15:.a%,r%(a%),g%| 000004f0 28 61 25 29 2c 62 25 28 61 25 29 3a ed 0d 00 25 |(a%),b%(a%):...%| 00000500 3f fb 20 31 2c 30 2c 30 2c 30 3a fb 20 33 2c 30 |?. 1,0,0,0:. 3,0| 00000510 2c 30 2c 30 3a fb 20 34 2c 30 2c 30 2c 30 3a fb |,0,0:. 4,0,0,0:.| 00000520 20 35 2c 30 2c 30 2c 30 3a fb 20 36 2c 30 2c 30 | 5,0,0,0:. 6,0,0| 00000530 2c 30 3a fb 20 37 2c 30 2c 30 2c 30 0d 00 26 05 |,0:. 7,0,0,0..&.| 00000540 e1 0d ff |...| 00000543
.