Home » Archimedes archive » Acorn User » AU 1995-05.adf » !StarInfo_StarInfo » Vibe/ColourCard/ColBalls

Vibe/ColourCard/ColBalls

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 1995-05.adf » !StarInfo_StarInfo
Filename: Vibe/ColourCard/ColBalls
Read OK:
File size: 03DE bytes
Load address: 0000
Exec address: 0000
File contents
   10REM     >ColBalls
   11REM by  Jan Vibe
   12REM (c) AU May 1995
   20
   30MODE 107:OFF
   40SYS "OS_SWINumberFromString",,"ColourTrans_SetGCOL" TO set_gcol%
   50DIM SPR &20000
   60SPR!0=&1FFFF:SPR!4=0:SPR!8=16:SPR!12=16
   70SYS"OS_SpriteOp",256+15,SPR,"BALL",0,128,128,107
   80SYS"OS_SpriteOp",256+29,SPR,"BALL"
   90
  100ONERRORGOTO300
  110REPEAT
  120SYS"OS_SpriteOp",256+60,SPR,"BALL",0
  130CLG:RA%=RND(97)+31
  140R1%=RND(127):G1%=RND(127):B1%=RND(127)
  150R2%=R1%+127:G2%=G1%+127:B2%=B1%+127
  160FORN%=32TO0STEP-1:N1%=32-N%
  170R%=(N%*R1%+N1%*R2%)/32:G%=(N%*G1%+N1%*G2%)/32:B%=(N%*B1%+N1%*B2%)/32
  180SYS set_gcol%,(R%<<8)+(G%<<16)+(B%<<24),,,&100,0
  190CIRCLE FILL RA%,RA%,N%*RA%/32:NEXT
  200SYS"OS_SpriteOp",256+61,SPR,"BALL",0
  210GCOL0TINT0:RECTANGLE FILL 0,0,256
  220GCOL63TINT240
  230D=SQR(2*RA%^2)-RA%:PD=SQR(D^2/2):R1=RA%*.6:P=SQR(R1^2/2)+PD+4
  240CIRCLE FILL P,P,R1
  250SYS"OS_SpriteOp",256+61,SPR,0,0:OFF
  260X%=RND(1152-2*R1)+R1:Y%=RND(848-2*R1)+R1
  270SYS "OS_SpriteOp",256+34,SPR,"BALL",X%-P,Y%-P,8
  280UNTIL0
  290
  300SYS"OS_SpriteOp",256+60,SPR,0,0
  310SYS"OS_SpriteOp",256+61,SPR,0,0
  320REPORT:PRINT" at line "STR$ERL

�     >ColBalls
� by  Jan Vibe
� (c) AU May 1995

� 107:�
(Bș "OS_SWINumberFromString",,"ColourTrans_SetGCOL" � set_gcol%
2� SPR &20000
<+SPR!0=&1FFFF:SPR!4=0:SPR!8=16:SPR!12=16
F3ș"OS_SpriteOp",256+15,SPR,"BALL",0,128,128,107
P%ș"OS_SpriteOp",256+29,SPR,"BALL"
Z
d��TlA
n�
x'ș"OS_SpriteOp",256+60,SPR,"BALL",0
��:RA%=�(97)+31
�$R1%=�(127):G1%=�(127):B1%=�(127)
�'R2%=R1%+127:G2%=G1%+127:B2%=B1%+127
��N%=32�0�-1:N1%=32-N%
�HR%=(N%*R1%+N1%*R2%)/32:G%=(N%*G1%+N1%*G2%)/32:B%=(N%*B1%+N1%*B2%)/32
�3ș set_gcol%,(R%<<8)+(G%<<16)+(B%<<24),,,&100,0
�ȏ Ȑ RA%,RA%,N%*RA%/32:�
�'ș"OS_SpriteOp",256+61,SPR,"BALL",0
��0Ȝ0:ȓ Ȑ 0,0,256
��63Ȝ240
�;D=�(2*RA%^2)-RA%:PD=�(D^2/2):R1=RA%*.6:P=�(R1^2/2)+PD+4
�ȏ Ȑ P,P,R1
�$ș"OS_SpriteOp",256+61,SPR,0,0:�
(X%=�(1152-2*R1)+R1:Y%=�(848-2*R1)+R1
2ș "OS_SpriteOp",256+34,SPR,"BALL",X%-P,Y%-P,8
�0
"
,"ș"OS_SpriteOp",256+60,SPR,0,0
6"ș"OS_SpriteOp",256+61,SPR,0,0
@�:�" at line "Þ
�
00000000  0d 00 0a 13 f4 20 20 20  20 20 3e 43 6f 6c 42 61  |.....     >ColBa|
00000010  6c 6c 73 0d 00 0b 12 f4  20 62 79 20 20 4a 61 6e  |lls..... by  Jan|
00000020  20 56 69 62 65 0d 00 0c  15 f4 20 28 63 29 20 41  | Vibe..... (c) A|
00000030  55 20 4d 61 79 20 31 39  39 35 0d 00 14 04 0d 00  |U May 1995......|
00000040  1e 0b eb 20 31 30 37 3a  87 0d 00 28 42 c8 99 20  |... 107:...(B.. |
00000050  22 4f 53 5f 53 57 49 4e  75 6d 62 65 72 46 72 6f  |"OS_SWINumberFro|
00000060  6d 53 74 72 69 6e 67 22  2c 2c 22 43 6f 6c 6f 75  |mString",,"Colou|
00000070  72 54 72 61 6e 73 5f 53  65 74 47 43 4f 4c 22 20  |rTrans_SetGCOL" |
00000080  b8 20 73 65 74 5f 67 63  6f 6c 25 0d 00 32 10 de  |. set_gcol%..2..|
00000090  20 53 50 52 20 26 32 30  30 30 30 0d 00 3c 2b 53  | SPR &20000..<+S|
000000a0  50 52 21 30 3d 26 31 46  46 46 46 3a 53 50 52 21  |PR!0=&1FFFF:SPR!|
000000b0  34 3d 30 3a 53 50 52 21  38 3d 31 36 3a 53 50 52  |4=0:SPR!8=16:SPR|
000000c0  21 31 32 3d 31 36 0d 00  46 33 c8 99 22 4f 53 5f  |!12=16..F3.."OS_|
000000d0  53 70 72 69 74 65 4f 70  22 2c 32 35 36 2b 31 35  |SpriteOp",256+15|
000000e0  2c 53 50 52 2c 22 42 41  4c 4c 22 2c 30 2c 31 32  |,SPR,"BALL",0,12|
000000f0  38 2c 31 32 38 2c 31 30  37 0d 00 50 25 c8 99 22  |8,128,107..P%.."|
00000100  4f 53 5f 53 70 72 69 74  65 4f 70 22 2c 32 35 36  |OS_SpriteOp",256|
00000110  2b 32 39 2c 53 50 52 2c  22 42 41 4c 4c 22 0d 00  |+29,SPR,"BALL"..|
00000120  5a 04 0d 00 64 0b ee 85  e5 8d 54 6c 41 0d 00 6e  |Z...d.....TlA..n|
00000130  05 f5 0d 00 78 27 c8 99  22 4f 53 5f 53 70 72 69  |....x'.."OS_Spri|
00000140  74 65 4f 70 22 2c 32 35  36 2b 36 30 2c 53 50 52  |teOp",256+60,SPR|
00000150  2c 22 42 41 4c 4c 22 2c  30 0d 00 82 12 da 3a 52  |,"BALL",0.....:R|
00000160  41 25 3d b3 28 39 37 29  2b 33 31 0d 00 8c 24 52  |A%=.(97)+31...$R|
00000170  31 25 3d b3 28 31 32 37  29 3a 47 31 25 3d b3 28  |1%=.(127):G1%=.(|
00000180  31 32 37 29 3a 42 31 25  3d b3 28 31 32 37 29 0d  |127):B1%=.(127).|
00000190  00 96 27 52 32 25 3d 52  31 25 2b 31 32 37 3a 47  |..'R2%=R1%+127:G|
000001a0  32 25 3d 47 31 25 2b 31  32 37 3a 42 32 25 3d 42  |2%=G1%+127:B2%=B|
000001b0  31 25 2b 31 32 37 0d 00  a0 19 e3 4e 25 3d 33 32  |1%+127.....N%=32|
000001c0  b8 30 88 2d 31 3a 4e 31  25 3d 33 32 2d 4e 25 0d  |.0.-1:N1%=32-N%.|
000001d0  00 aa 48 52 25 3d 28 4e  25 2a 52 31 25 2b 4e 31  |..HR%=(N%*R1%+N1|
000001e0  25 2a 52 32 25 29 2f 33  32 3a 47 25 3d 28 4e 25  |%*R2%)/32:G%=(N%|
000001f0  2a 47 31 25 2b 4e 31 25  2a 47 32 25 29 2f 33 32  |*G1%+N1%*G2%)/32|
00000200  3a 42 25 3d 28 4e 25 2a  42 31 25 2b 4e 31 25 2a  |:B%=(N%*B1%+N1%*|
00000210  42 32 25 29 2f 33 32 0d  00 b4 33 c8 99 20 73 65  |B2%)/32...3.. se|
00000220  74 5f 67 63 6f 6c 25 2c  28 52 25 3c 3c 38 29 2b  |t_gcol%,(R%<<8)+|
00000230  28 47 25 3c 3c 31 36 29  2b 28 42 25 3c 3c 32 34  |(G%<<16)+(B%<<24|
00000240  29 2c 2c 2c 26 31 30 30  2c 30 0d 00 be 1d c8 8f  |),,,&100,0......|
00000250  20 c8 90 20 52 41 25 2c  52 41 25 2c 4e 25 2a 52  | .. RA%,RA%,N%*R|
00000260  41 25 2f 33 32 3a ed 0d  00 c8 27 c8 99 22 4f 53  |A%/32:....'.."OS|
00000270  5f 53 70 72 69 74 65 4f  70 22 2c 32 35 36 2b 36  |_SpriteOp",256+6|
00000280  31 2c 53 50 52 2c 22 42  41 4c 4c 22 2c 30 0d 00  |1,SPR,"BALL",0..|
00000290  d2 17 e6 30 c8 9c 30 3a  c8 93 20 c8 90 20 30 2c  |...0..0:.. .. 0,|
000002a0  30 2c 32 35 36 0d 00 dc  0c e6 36 33 c8 9c 32 34  |0,256.....63..24|
000002b0  30 0d 00 e6 3b 44 3d b6  28 32 2a 52 41 25 5e 32  |0...;D=.(2*RA%^2|
000002c0  29 2d 52 41 25 3a 50 44  3d b6 28 44 5e 32 2f 32  |)-RA%:PD=.(D^2/2|
000002d0  29 3a 52 31 3d 52 41 25  2a 2e 36 3a 50 3d b6 28  |):R1=RA%*.6:P=.(|
000002e0  52 31 5e 32 2f 32 29 2b  50 44 2b 34 0d 00 f0 10  |R1^2/2)+PD+4....|
000002f0  c8 8f 20 c8 90 20 50 2c  50 2c 52 31 0d 00 fa 24  |.. .. P,P,R1...$|
00000300  c8 99 22 4f 53 5f 53 70  72 69 74 65 4f 70 22 2c  |.."OS_SpriteOp",|
00000310  32 35 36 2b 36 31 2c 53  50 52 2c 30 2c 30 3a 87  |256+61,SPR,0,0:.|
00000320  0d 01 04 28 58 25 3d b3  28 31 31 35 32 2d 32 2a  |...(X%=.(1152-2*|
00000330  52 31 29 2b 52 31 3a 59  25 3d b3 28 38 34 38 2d  |R1)+R1:Y%=.(848-|
00000340  32 2a 52 31 29 2b 52 31  0d 01 0e 32 c8 99 20 22  |2*R1)+R1...2.. "|
00000350  4f 53 5f 53 70 72 69 74  65 4f 70 22 2c 32 35 36  |OS_SpriteOp",256|
00000360  2b 33 34 2c 53 50 52 2c  22 42 41 4c 4c 22 2c 58  |+34,SPR,"BALL",X|
00000370  25 2d 50 2c 59 25 2d 50  2c 38 0d 01 18 06 fd 30  |%-P,Y%-P,8.....0|
00000380  0d 01 22 04 0d 01 2c 22  c8 99 22 4f 53 5f 53 70  |.."...,".."OS_Sp|
00000390  72 69 74 65 4f 70 22 2c  32 35 36 2b 36 30 2c 53  |riteOp",256+60,S|
000003a0  50 52 2c 30 2c 30 0d 01  36 22 c8 99 22 4f 53 5f  |PR,0,0..6".."OS_|
000003b0  53 70 72 69 74 65 4f 70  22 2c 32 35 36 2b 36 31  |SpriteOp",256+61|
000003c0  2c 53 50 52 2c 30 2c 30  0d 01 40 14 f6 3a f1 22  |,SPR,0,0..@..:."|
000003d0  20 61 74 20 6c 69 6e 65  20 22 c3 9e 0d ff        | at line "....|
000003de