Home » Archimedes archive » Acorn User » AU 1995-11.adf » !Regulars » Regulars/StarInfo/Ord/!OrdFSI/Pal-256Col

Regulars/StarInfo/Ord/!OrdFSI/Pal-256Col

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-11.adf » !Regulars
Filename: Regulars/StarInfo/Ord/!OrdFSI/Pal-256Col
Read OK:
File size: 01D3 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM Create Palette Lookup Table
   20REM By Andrew Ord
   21file$="Palettes.256Col"
   40
   50REM Memory required to store palette and lookup table
   60DIM pal% 1024+32768
   70
   80REM read palette for a 256 colour mode
   90SYS"ColourTrans_ReadPalette",13,-1,pal%,256*4
  100
  130REM Create the lookup table
  140SYS"Hourglass_On"
  150SYS"IPC_CreateTables",pal%,pal%+1024,256
  160SYS"Hourglass_Smash"
  170
  180REM Save the definition to disk
  190SYS"OS_File",10,file$,&00F,,pal%,pal%+(1024+32768)
  200END
!� Create Palette Lookup Table
� By Andrew Ord
file$="Palettes.256Col"
(
27� Memory required to store palette and lookup table
<� pal% 1024+32768
F
P(� read palette for a 256 colour mode
Z0ș"ColourTrans_ReadPalette",13,-1,pal%,256*4
d
�� Create the lookup table
�ș"Hourglass_On"
�+ș"IPC_CreateTables",pal%,pal%+1024,256
�ș"Hourglass_Smash"
�
�!� Save the definition to disk
�5ș"OS_File",10,file$,&00F,,pal%,pal%+(1024+32768)
��
�
00000000  0d 00 0a 21 f4 20 43 72  65 61 74 65 20 50 61 6c  |...!. Create Pal|
00000010  65 74 74 65 20 4c 6f 6f  6b 75 70 20 54 61 62 6c  |ette Lookup Tabl|
00000020  65 0d 00 14 13 f4 20 42  79 20 41 6e 64 72 65 77  |e..... By Andrew|
00000030  20 4f 72 64 0d 00 15 1b  66 69 6c 65 24 3d 22 50  | Ord....file$="P|
00000040  61 6c 65 74 74 65 73 2e  32 35 36 43 6f 6c 22 0d  |alettes.256Col".|
00000050  00 28 04 0d 00 32 37 f4  20 4d 65 6d 6f 72 79 20  |.(...27. Memory |
00000060  72 65 71 75 69 72 65 64  20 74 6f 20 73 74 6f 72  |required to stor|
00000070  65 20 70 61 6c 65 74 74  65 20 61 6e 64 20 6c 6f  |e palette and lo|
00000080  6f 6b 75 70 20 74 61 62  6c 65 0d 00 3c 15 de 20  |okup table..<.. |
00000090  70 61 6c 25 20 31 30 32  34 2b 33 32 37 36 38 0d  |pal% 1024+32768.|
000000a0  00 46 04 0d 00 50 28 f4  20 72 65 61 64 20 70 61  |.F...P(. read pa|
000000b0  6c 65 74 74 65 20 66 6f  72 20 61 20 32 35 36 20  |lette for a 256 |
000000c0  63 6f 6c 6f 75 72 20 6d  6f 64 65 0d 00 5a 30 c8  |colour mode..Z0.|
000000d0  99 22 43 6f 6c 6f 75 72  54 72 61 6e 73 5f 52 65  |."ColourTrans_Re|
000000e0  61 64 50 61 6c 65 74 74  65 22 2c 31 33 2c 2d 31  |adPalette",13,-1|
000000f0  2c 70 61 6c 25 2c 32 35  36 2a 34 0d 00 64 04 0d  |,pal%,256*4..d..|
00000100  00 82 1d f4 20 43 72 65  61 74 65 20 74 68 65 20  |.... Create the |
00000110  6c 6f 6f 6b 75 70 20 74  61 62 6c 65 0d 00 8c 14  |lookup table....|
00000120  c8 99 22 48 6f 75 72 67  6c 61 73 73 5f 4f 6e 22  |.."Hourglass_On"|
00000130  0d 00 96 2b c8 99 22 49  50 43 5f 43 72 65 61 74  |...+.."IPC_Creat|
00000140  65 54 61 62 6c 65 73 22  2c 70 61 6c 25 2c 70 61  |eTables",pal%,pa|
00000150  6c 25 2b 31 30 32 34 2c  32 35 36 0d 00 a0 17 c8  |l%+1024,256.....|
00000160  99 22 48 6f 75 72 67 6c  61 73 73 5f 53 6d 61 73  |."Hourglass_Smas|
00000170  68 22 0d 00 aa 04 0d 00  b4 21 f4 20 53 61 76 65  |h".......!. Save|
00000180  20 74 68 65 20 64 65 66  69 6e 69 74 69 6f 6e 20  | the definition |
00000190  74 6f 20 64 69 73 6b 0d  00 be 35 c8 99 22 4f 53  |to disk...5.."OS|
000001a0  5f 46 69 6c 65 22 2c 31  30 2c 66 69 6c 65 24 2c  |_File",10,file$,|
000001b0  26 30 30 46 2c 2c 70 61  6c 25 2c 70 61 6c 25 2b  |&00F,,pal%,pal%+|
000001c0  28 31 30 32 34 2b 33 32  37 36 38 29 0d 00 c8 05  |(1024+32768)....|
000001d0  e0 0d ff                                          |...|
000001d3