Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199611.adf » Regulars » StarInfo/Williams/Gamma

StarInfo/Williams/Gamma

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 » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199611.adf » Regulars
Filename: StarInfo/Williams/Gamma
Read OK:
File size: 04A7 bytes
Load address: 0000
Exec address: 0000
File contents
    1REM ==========================================
    2REM  Quickie demo of Risc-PC gamma-correction
    3REM      By R-Fred-W, FishNet Software
    4REM         (rfredw@argonet.co.uk)
    5REM ==========================================
    6
    7ON ERROR PROCdefaultpal:PRINT REPORT$;" at line ";ERL:END
    8
    9DIM r% 256
   10DIM g% 256
   11DIM b% 256
   12
   13rangle = 0
   14gangle = 0
   15bangle = 0
   16REPEAT
   17 rangle = (rangle+3) MOD 360
   18 gangle = (gangle+5) MOD 360
   19 bangle = (bangle+0.3333) MOD 260
   20 PROCsetpal(rangle,gangle,bangle)
   21UNTIL FALSE
   22
   23REM ========================
   24
   25DEFPROCsetpal(rangle,gangle,bangle)
   26
   27 rf = SINRADrangle
   28 gf = SINRADgangle
   29 bf = SINRADbangle
   30
   31 FOR c% = 0 TO 255
   32  IF rf >= 0 THEN
   33   r%?c% = c% + (255 - c%) * rf
   34  ELSE
   35   r%?c% = c%*(rf+1)
   36  ENDIF
   37
   38  IF gf >= 0 THEN
   39   g%?c% = c% + (255 - c%) * gf
   40  ELSE
   41   g%?c% = c%*(gf+1)
   42  ENDIF
   43
   44  IF bf >= 0 THEN
   45   b%?c% = c% + (255 - c%) * bf
   46  ELSE
   47   b%?c% = c%*(bf+1)
   48  ENDIF
   49 NEXT
   50
   51 *FX 19
   52 SYS "OS_CallAVector",r%,g%,b%,0,9,0,0,0,0,&23
   53ENDPROC
   54
   55REM ========================
   56
   57DEFPROCdefaultpal
   58 FOR c% = 0 TO 255
   59  r%?c% = c%
   60  g%?c% = c%
   61  b%?c% = c%
   62 NEXT
   63 SYS "OS_CallAVector",r%,g%,b%,0,9,0,0,0,0,&23
   64ENDPROC
   65
   66
   67
0� ==========================================
/�  Quickie demo of Risc-PC gamma-correction
(�      By R-Fred-W, FishNet Software
$�         (rfredw@argonet.co.uk)
0� ==========================================

(� � �defaultpal:� �$;" at line ";�:�

	� r% 256

� g% 256
� b% 256


rangle = 0
gangle = 0
bangle = 0
�
 rangle = (rangle+3) � 360
 gangle = (gangle+5) � 360
# bangle = (bangle+0.3333) � 260
" �setpal(rangle,gangle,bangle)
� �

� ========================

"��setpal(rangle,gangle,bangle)

 rf = ��rangle
 gf = ��gangle
 bf = ��bangle

 � c% = 0 � 255
   � rf >= 0 �
!#   r%?c% = c% + (255 - c%) * rf
"  �
#   r%?c% = c%*(rf+1)
$  �
%
&  � gf >= 0 �
'#   g%?c% = c% + (255 - c%) * gf
(  �
)   g%?c% = c%*(gf+1)
*  �
+
,  � bf >= 0 �
-#   b%?c% = c% + (255 - c%) * bf
.  �
/   b%?c% = c%*(bf+1)
0  �
1 �
2
3 *FX 19
41 ș "OS_CallAVector",r%,g%,b%,0,9,0,0,0,0,&23
5�
6
7� ========================
8
9��defaultpal
: � c% = 0 � 255
;  r%?c% = c%
<  g%?c% = c%
=  b%?c% = c%
> �
?1 ș "OS_CallAVector",r%,g%,b%,0,9,0,0,0,0,&23
@�
A
B
C
�
00000000  0d 00 01 30 f4 20 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |...0. ==========|
00000010  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
*
00000030  0d 00 02 2f f4 20 20 51  75 69 63 6b 69 65 20 64  |.../.  Quickie d|
00000040  65 6d 6f 20 6f 66 20 52  69 73 63 2d 50 43 20 67  |emo of Risc-PC g|
00000050  61 6d 6d 61 2d 63 6f 72  72 65 63 74 69 6f 6e 0d  |amma-correction.|
00000060  00 03 28 f4 20 20 20 20  20 20 42 79 20 52 2d 46  |..(.      By R-F|
00000070  72 65 64 2d 57 2c 20 46  69 73 68 4e 65 74 20 53  |red-W, FishNet S|
00000080  6f 66 74 77 61 72 65 0d  00 04 24 f4 20 20 20 20  |oftware...$.    |
00000090  20 20 20 20 20 28 72 66  72 65 64 77 40 61 72 67  |     (rfredw@arg|
000000a0  6f 6e 65 74 2e 63 6f 2e  75 6b 29 0d 00 05 30 f4  |onet.co.uk)...0.|
000000b0  20 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  | ===============|
000000c0  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
000000d0  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 0d 00 06 04 0d  |===========.....|
000000e0  00 07 28 ee 20 85 20 f2  64 65 66 61 75 6c 74 70  |..(. . .defaultp|
000000f0  61 6c 3a f1 20 f6 24 3b  22 20 61 74 20 6c 69 6e  |al:. .$;" at lin|
00000100  65 20 22 3b 9e 3a e0 0d  00 08 04 0d 00 09 0c de  |e ";.:..........|
00000110  20 72 25 20 32 35 36 0d  00 0a 0c de 20 67 25 20  | r% 256..... g% |
00000120  32 35 36 0d 00 0b 0c de  20 62 25 20 32 35 36 0d  |256..... b% 256.|
00000130  00 0c 04 0d 00 0d 0e 72  61 6e 67 6c 65 20 3d 20  |.......rangle = |
00000140  30 0d 00 0e 0e 67 61 6e  67 6c 65 20 3d 20 30 0d  |0....gangle = 0.|
00000150  00 0f 0e 62 61 6e 67 6c  65 20 3d 20 30 0d 00 10  |...bangle = 0...|
00000160  05 f5 0d 00 11 1e 20 72  61 6e 67 6c 65 20 3d 20  |...... rangle = |
00000170  28 72 61 6e 67 6c 65 2b  33 29 20 83 20 33 36 30  |(rangle+3) . 360|
00000180  0d 00 12 1e 20 67 61 6e  67 6c 65 20 3d 20 28 67  |.... gangle = (g|
00000190  61 6e 67 6c 65 2b 35 29  20 83 20 33 36 30 0d 00  |angle+5) . 360..|
000001a0  13 23 20 62 61 6e 67 6c  65 20 3d 20 28 62 61 6e  |.# bangle = (ban|
000001b0  67 6c 65 2b 30 2e 33 33  33 33 29 20 83 20 32 36  |gle+0.3333) . 26|
000001c0  30 0d 00 14 22 20 f2 73  65 74 70 61 6c 28 72 61  |0..." .setpal(ra|
000001d0  6e 67 6c 65 2c 67 61 6e  67 6c 65 2c 62 61 6e 67  |ngle,gangle,bang|
000001e0  6c 65 29 0d 00 15 07 fd  20 a3 0d 00 16 04 0d 00  |le)..... .......|
000001f0  17 1e f4 20 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |... ============|
00000200  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 0d 00 18 04  |============....|
00000210  0d 00 19 22 dd f2 73 65  74 70 61 6c 28 72 61 6e  |..."..setpal(ran|
00000220  67 6c 65 2c 67 61 6e 67  6c 65 2c 62 61 6e 67 6c  |gle,gangle,bangl|
00000230  65 29 0d 00 1a 04 0d 00  1b 12 20 72 66 20 3d 20  |e)........ rf = |
00000240  b5 b2 72 61 6e 67 6c 65  0d 00 1c 12 20 67 66 20  |..rangle.... gf |
00000250  3d 20 b5 b2 67 61 6e 67  6c 65 0d 00 1d 12 20 62  |= ..gangle.... b|
00000260  66 20 3d 20 b5 b2 62 61  6e 67 6c 65 0d 00 1e 04  |f = ..bangle....|
00000270  0d 00 1f 13 20 e3 20 63  25 20 3d 20 30 20 b8 20  |.... . c% = 0 . |
00000280  32 35 35 0d 00 20 11 20  20 e7 20 72 66 20 3e 3d  |255.. .  . rf >=|
00000290  20 30 20 8c 0d 00 21 23  20 20 20 72 25 3f 63 25  | 0 ...!#   r%?c%|
000002a0  20 3d 20 63 25 20 2b 20  28 32 35 35 20 2d 20 63  | = c% + (255 - c|
000002b0  25 29 20 2a 20 72 66 0d  00 22 07 20 20 cc 0d 00  |%) * rf..".  ...|
000002c0  23 18 20 20 20 72 25 3f  63 25 20 3d 20 63 25 2a  |#.   r%?c% = c%*|
000002d0  28 72 66 2b 31 29 0d 00  24 07 20 20 cd 0d 00 25  |(rf+1)..$.  ...%|
000002e0  04 0d 00 26 11 20 20 e7  20 67 66 20 3e 3d 20 30  |...&.  . gf >= 0|
000002f0  20 8c 0d 00 27 23 20 20  20 67 25 3f 63 25 20 3d  | ...'#   g%?c% =|
00000300  20 63 25 20 2b 20 28 32  35 35 20 2d 20 63 25 29  | c% + (255 - c%)|
00000310  20 2a 20 67 66 0d 00 28  07 20 20 cc 0d 00 29 18  | * gf..(.  ...).|
00000320  20 20 20 67 25 3f 63 25  20 3d 20 63 25 2a 28 67  |   g%?c% = c%*(g|
00000330  66 2b 31 29 0d 00 2a 07  20 20 cd 0d 00 2b 04 0d  |f+1)..*.  ...+..|
00000340  00 2c 11 20 20 e7 20 62  66 20 3e 3d 20 30 20 8c  |.,.  . bf >= 0 .|
00000350  0d 00 2d 23 20 20 20 62  25 3f 63 25 20 3d 20 63  |..-#   b%?c% = c|
00000360  25 20 2b 20 28 32 35 35  20 2d 20 63 25 29 20 2a  |% + (255 - c%) *|
00000370  20 62 66 0d 00 2e 07 20  20 cc 0d 00 2f 18 20 20  | bf....  .../.  |
00000380  20 62 25 3f 63 25 20 3d  20 63 25 2a 28 62 66 2b  | b%?c% = c%*(bf+|
00000390  31 29 0d 00 30 07 20 20  cd 0d 00 31 06 20 ed 0d  |1)..0.  ...1. ..|
000003a0  00 32 04 0d 00 33 0b 20  2a 46 58 20 31 39 0d 00  |.2...3. *FX 19..|
000003b0  34 31 20 c8 99 20 22 4f  53 5f 43 61 6c 6c 41 56  |41 .. "OS_CallAV|
000003c0  65 63 74 6f 72 22 2c 72  25 2c 67 25 2c 62 25 2c  |ector",r%,g%,b%,|
000003d0  30 2c 39 2c 30 2c 30 2c  30 2c 30 2c 26 32 33 0d  |0,9,0,0,0,0,&23.|
000003e0  00 35 05 e1 0d 00 36 04  0d 00 37 1e f4 20 3d 3d  |.5....6...7.. ==|
000003f0  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
00000400  3d 3d 3d 3d 3d 3d 0d 00  38 04 0d 00 39 10 dd f2  |======..8...9...|
00000410  64 65 66 61 75 6c 74 70  61 6c 0d 00 3a 13 20 e3  |defaultpal..:. .|
00000420  20 63 25 20 3d 20 30 20  b8 20 32 35 35 0d 00 3b  | c% = 0 . 255..;|
00000430  10 20 20 72 25 3f 63 25  20 3d 20 63 25 0d 00 3c  |.  r%?c% = c%..<|
00000440  10 20 20 67 25 3f 63 25  20 3d 20 63 25 0d 00 3d  |.  g%?c% = c%..=|
00000450  10 20 20 62 25 3f 63 25  20 3d 20 63 25 0d 00 3e  |.  b%?c% = c%..>|
00000460  06 20 ed 0d 00 3f 31 20  c8 99 20 22 4f 53 5f 43  |. ...?1 .. "OS_C|
00000470  61 6c 6c 41 56 65 63 74  6f 72 22 2c 72 25 2c 67  |allAVector",r%,g|
00000480  25 2c 62 25 2c 30 2c 39  2c 30 2c 30 2c 30 2c 30  |%,b%,0,9,0,0,0,0|
00000490  2c 26 32 33 0d 00 40 05  e1 0d 00 41 04 0d 00 42  |,&23..@....A...B|
000004a0  04 0d 00 43 04 0d ff                              |...C...|
000004a7