home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
ega
/
egacolrs.arc
/
EGACOLRS.DOC
< prev
Wrap
Text File
|
1989-03-10
|
3KB
|
55 lines
EGACOLRS by Mark Adler Pasadena, CA 1988, 1989.
EGACOLRS displays all 64 possible colors at once on the screen. The
cursor keys can be used to point to a specific color and that color's
byte value (as would be used in a palette set) is shown in hexadecimal
on the screen.
To use EGACOLRS, simply type EGACOLRS. To get out of EGACOLRS, use Q,
q, or Esc. EGACOLRS will run on either an EGA or VGA compatible video
adapter.
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 can't tell it is
blinking since the background is black (but it really is blinking 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" can be brought next to each other in the same group
by using the space bar.
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 palette while the electron beam is moving down the screen. The
palette 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
bitnet: madler@hamlet
arpa: madler@hamlet.caltech.edu