Dec 162017
Display all EGA 64 colors on screen at once with C source. | |||
---|---|---|---|
File Name | File Size | Zip Size | Zip Type |
EGACOLRS.C | 22209 | 6100 | deflated |
EGACOLRS.COM | 2720 | 2057 | deflated |
EGACOLRS.DOC | 2452 | 1181 | deflated |
Download File EGACOLRS.ZIP Here
Contents of the EGACOLRS.DOC file
EGACOLRS by Mark Adler Pasadena, CA 1988.
EGACOLRS displays all 64 possible colors at once on the screen and
allows cursor key selection of color blocks to indicate the actual byte
value to be used in a pallette for that color.
To use EGACOLRS, simply type EGACOLRS. To get out of EGACOLRS, use Q,
q, or Esc.
Use the cursor keys to move around the 8x8 array of blocks. The byte
value for the selected block will be shown in the lower right corner.
The Home, End, PgUp, and PgDn keys will move to the left, right, top,
and bottom (respectively) of the array. The selected block will blink,
unless it is the black block, in which case you cannot tell it is
blinking (but it really is in some metaphysical sense).
Hitting the space bar will permute the axes of the colors. Perhaps this
requires some explanation. The 64 colors can be viewed as a cube made
of 64 smaller cubes with four cubes to a side of the larger cube. Each
side of the cube is a color (red, green, and blue), and as you move
along and edge, you are increasing or decreasing the intensity of that
color. Each color has two bits assigned to it, hence four intensities
per color. This cube is mapped onto the EGACOLRS screen as four groups
of 4x4 blocks. The top row of the upper left group is the first axis
(initially blue), the left column of the upper left group is the second
axis (initially green), and the upper left boxes in each group is the
third axis (initially red). The space bar steps through the six
possible selections of assigning colors to axes. In this way, colors
that are "similar" because of one or two of the color selections can be
brought next to each other in the same group.
Those who know a little about the EGA will immediately realize that such
a program cannot exist, since the EGA can only display 16 different
colors at one time. That is true, but this program makes the most out
of the phrase "at one time". The way EGACOLRS works is by changing the
EGA's pallette while the electron beam is moving down the screen. The
pallette is changed between every row of blocks by very carefully
watching the horizontal retrace (available on an EGA port) and counting
scan lines. This program has been tested on the slowest PC's (4.77 MHz
8088 machines).
Feel free to send any problems with or comments on EGACOLRS to:
Mark Adler
P.O. Box 60998
Pasadena, CA 91106
December 16, 2017
Add comments