SETPAL.INC doc file / Kari Lammassaari /Finland SetPal.inc contains following Types,Consts,Variables, procedures and functions: Type PaletteArrayType = Array[0..15,0..2] Of Byte; Const OriginalPalette :PaletteArrayType = ( (0,0,0), (0,0,0), (1,6,1), (3,7,3), (1,1,7), (2,3,7), (5,1,1), (2,6,7), (7,1,1), (7,3,3), (6,6,1), (6,6,4), (1,4,1), (6,2,5), (5,5,5), (7,7,7) );{Default values after boot sequence} Var PaletteArray :PaletteArrayType; - Procedure SetPal(Var PalAr:PaletteArrayType); {Sets color palette of all colours.} {Stores standard palette table in standard VRAM location.} {Dicrect code. No ROM routines used.} - Procedure GetPal(Var PalAr:PaletteArrayType); {Reads palette values from VRAM standard palette table location.} {In screens 0..4 SetPal must be used before usage of this code to avoid unpredictable results. (The BIOS CHGMOD doesn't set palette table under DOS ! ) } {Dicrect code. No ROM routines used.} - Procedure ResetPal; {Restores original palette values to VDP.} {Dicrect code. No ROM routines used.} - Procedure SetRGB(Color,r,g,b:Byte); {Sets RGB values for individual color.} {Doesn't store value to PaletteArray nor VRAM palette table.} {Direct code. No ROM bios used. } {Color = 0-15, r,g,b = 0..7} - Procedure FadeDown(Color,Speed:Byte); { Fades color r,g,b values to 0,0,0 =Black } { For security reasons SetPal must have been called before usage of this procedure in screens 0 - 4 } {Color = 0..15 , Speed = 0..255 (1/10 secs delay between transitions) } {Doesn't store value to PaletteArray nor VRAM palette table.} - Procedure FadeUp(Color,Speed:Byte); { Fades (actually brightens) color r,g,b values to 7,7,7 = white } { For security reasons SetPal must have been called before usage of this procedure in screens 0 - 4 } {Color = 0..15 , Speed = 0..255 (1/10 secs delay between transitions) } {Doesn't store value to PaletteArray nor VRAM palette table.} - Procedure FadeTo(SourceColor,TargetColor,Speed:Byte); { Fades source r,g,b values to rgb of target } { For security reasons SetPal must have been called before usage of this procedure in screens 0 - 4 } { Stores values to PaletteArray and VRAM palette table.}