Dec 092017
 
VGA_PAL is a program to view and set VGA/MCGA palette registers. This allows you to change any of the colors displayed on your monitor. Includes C source code.
File VGA_PAL.ZIP from The Programmer’s Corner in
Category Display Utilities
VGA_PAL is a program to view and set VGA/MCGA palette registers. This allows you to change any of the colors displayed on your monitor. Includes C source code.
File Name File Size Zip Size Zip Type
DEFAULT.PAL 417 96 deflated
REVERSE.PAL 417 98 deflated
VGA_PAL.C 11494 1799 deflated
VGA_PAL.COM 8669 5883 deflated
VGA_PAL.DOC 3925 1418 deflated
WASH.PAL 183 61 deflated
WILD.PAL 183 64 deflated

Download File VGA_PAL.ZIP Here

Contents of the VGA_PAL.DOC file



VGA_PAL : VGA/MCGA palette loader
=======

by Patrick Mueller, May 1990.

Intro
=====
VGA_PAL is a program to view and set VGA/MCGA palette registers.
This allows you to change any of the colors displayed on your
monitor.

VGA_PAL reads from the stdin device and writes to the stdout
device, so you can run it either is a prompted mode (by just
typing VGA_PAL) or a batch mode (by having input redirected to it
from a file or output from another program).

VGA_PAL is written in Microsoft C, and compiled with Microsoft
QuickC. The source is included.

Commands
========
The commands VGA_PAL accepts are:

DUMP256
Print all register settings.

DUMP16
Print first 16 register settings.

DUMP x
Print vga register settings for one color

SET x r g b
Set color x with red, green and blue values r g b.

MODELOAD x
If x is ON, palette will be reloaded on mode changes.
If x is OFF, palette will be remain during mode changes.
The machine default is to reload the palette on mode
changes, which causes the palette to be reloaded
to the power-on defaults whenever a MODE command
is executed (or the MODE is changed via bios().

QUIT
Quits. The program will also quit if input is coming
from a redirected file and the end of the file is
reached.

?
Display help information.

Usage
=====
Included are four default palette files:

default.pal - loads registers with default power-on settings.

reverse.pal - reverses all colors

wash.pal - dulls colors to produce washed out effect

wild.pal - enhances all colors a bit

To load one of these palettes in, execute the command
VGA_PAL < DEFAULT.PAL

To turn the MODELOAD switch on or off, you can execute
the command
ECHO MODELOAD OFF | VGA_PAL


Register Usage
==============
For VGA and MCGA adapters, there are 256 registers called the
palette registers that determine what colors are displayed
on your screen. For instance, when a program wants to display
something in black, it uses color 0. Blue is color 1, etc.
The standard mapping is:

0 : black
1 : blue
2 : green
3 : cyan
4 : red
5 : magenta
6 : brown
7 : white
8 : grey
9 : bright blue
10 : bright green
11 : bright cyan
12 : bright red
13 : bright magenta
14 : yellow
15 : bright white

Older display adapters only support 16 colors. VGA and MCGA adapters
support 256 colors. Since many programs (other than games) must
support older adapters, they only allow you to use colors 0 .. 15.

The actual color displayed is determined by the palette register
for that color number. Each palette register contains 3 values:
the amount of red in the color, the amount of green in the color,
and the amount of blue in the color (RGB). The color value may
be between 0 (no color) and 63 (as much of that color as there is).
For example, the color 0, black, will generally have values of 0
for red, green and blue. Red will have some value for red, but
0s for blue and green. See the file default.pal for the default
colors used by the system.


 December 9, 2017  Add comments

Leave a Reply