home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
200-299
/
ff257.lzh
/
ColorReq
/
Color.DOC
< prev
next >
Wrap
Text File
|
1989-10-19
|
27KB
|
451 lines
The Dissidents Color Requester
A tale of horror, suspense, and corporate deterioration
as told by Jeff Glatt, dissidents
Once upon a time, there was a little computer company called "Jack's
Former Computer Company". This little computer company had been extremely
mismanaged for several of the past 64 years, and it appeared as if it
might not survive another 128 years. Its resources depleted and without
any enlightened leadership, bankruptcy was imminent. The owners of
"Jack's Former Computer Company", a trio of brothers named Larry, Curly,
and Moe, desperately needed some fabulous new product with which to capture
the market currently held by a corporate juggernaut, "Big Guy Computers"
(BGC). BGC was so successful in marketing its products that hundreds of
other companies copied the original design without any enhancement whatso-
ever. "Why make something better when its good enough already?" was BGC's
motto, and the copycats agreed. There was another company not quite as big
as BGC called "Orange PeeL Computers". "Why make something cheaper when the
customers are buying enough anyway?", was OPL (pronounced "oh-pull")
computers' motto.
As luck would have it, Jack's Former Computers acquired a very spiffy
product design by scavaging a small, ailing company, and thus released the
LaViva computer. This was spanish for "the life" because Larry, Curly, and
Moe knew that the future of their company would depend upon the life or
death of this computer. Unfortunately, Jack's was still plagued by the same
cretinous management that had decimated the company's resources for the past
few years. This inept team hired several large (actually largely indifferent)
companies to write some system software. The C compiler used to prepare the
first operating system had a devastating bug in it which allowed an addq in-
struction to be placed inbetween a tst and branch instruction, thus altering
the status register flags from the tst instruction. This resulted
in an extremely unstable operating system. Jack's management didn't know
what was wrong, and no one at the company thought to examine the assembled
code to spot this rather obvious bug. Instead, they decided to ship beta
versions to developers in the hope that major software vendors would be will-
ing to spend thousands of dollars developing code for an unstable product
marketed by a barely solvent company. There weren't many takers. Jack's
bumbling management even gave away LaVivaBasic with every unit in the hopes
of attracting sales, though no one would have bought this buggy software
anyway.
Jack's management was convinced that their product was ready to capture
BGC's business clientele, and so all effort was channeled in that direction.
Never mind the fact that at that time businessmen didn't need the graphics
and audio capabilities of the LaViva, or that Jack's previous product was
hugely successful but not in the business market. It was a mute point that
what businessmen wanted was already being marketed by the copycats for less
than the price of the LaViva. Jack's management didn't care that no major
business software house was interested in LaViva, but many entertainment
software writers were. Jack's misguided administrators didn't want the
LaViva to be known as a "toy" computer. (The LaViva would soon be viewed as
such by the industry, primarily because it was being marketed by people with
the mentality of five-year-olds.) When it was time to present the LaViva to
the businessmen of America, each rotund executive lumbered up to the computer
and squinted at the small, white box. After many years of inbreeding with
BGC's formidable and omnipresent sales organization, these businessmen had
developed severe myopia. They could see no farther than the computer's name-
plate, and it did not bear the familiar three letters which they had been
brain-washed into believing was synonymous with quality performance. Instead
there was a rather crytic symbol:
/\
\
\
"What's this?", exclaimed one angry executwit. "It's not a BGC symbol?"
"It must be the company's sales plot", said Jack, a former employee at
Jack's Former Computers. This was not a completely accurate assessment, but
then personal integrity was not a trait of Jack's. Later, Jack would seek
and successfully obtain a significant political office via a major party
endorsement. As fast as their pudgy little feet would move, the businessmen
quickly waddled away. There was no money for advertising, and whatever
meager, initial, positive commentary that the LaViva received by the industry
trade papers was more than overshadowed by the problems that Jack's Former
Computers' management had allowed to occur.
Larry, Curly, and Moe soon realized that LaViva was in trouble, and so
they began their five year mission to explore new leadership, to hire execu-
tives from whence they had never gone before. They recruited the president
of one of the most successful copycat companies, Compost computers. This
executive had run a company whose products were nearly as expensive (and not
much better than) BGC's.
The new president set to work doing what he did best; copying BGC's
products. R&D money, which was currently scarce, was shifted away from the
LaViva toward a new computer line which would prove revolutionary. Well maybe
not, but it sold ok. For some inexplicable reason, investors began to buy a
little of Jack's stock, helping to put Jack's in a reasonable financial si-
tuation, and proving that a stock's value is based almost entirely on image,
inuendo, and probably more paganism and black magic than anyone cares to
admit.
Unfortunately, the new product line offered nothing that hundreds of other
products didn't already, though Jack's computers were significantly cheaper
than the same items made by Compost. It was obvious that Jack's was not going
to survive solely by selling replications, unless the company's over-paid
middle management was trimmed away. This idea repulsed Jack's management
who somehow managed to impale their blood-thirsty fingernails into every
coporate decision, even if the salaried workers were better qualified to
make those decisions. Giving pink slips to the engineers, programmers, and
factory workers was allright, but firing middle management was a truly
anti-american, criminal action. After all, the former employees only made
the product, while middle management "oversaw" it. The mid-level executives
feverishly struggled to "cut costs" using all of the conventional, accepted
methods like closing down R&D departments, winning wage concessions from
labor unions, and generally "laying off" the bulk of the work force.
Fortunately, LaViva's fancy graphics attracted the attention of video
and game software programmers who decided to "fiddle" with LaViva all along
despite a lack of promotion and encouragement from Jack's management. Video
enthusiasts began buying these "token" products and somehow managed to save
the computer from the silicon graveyard. This sales market took Jack's
management by complete surprise as they had not really tried to sell the
machine to anyone due to a lack of advertising funds. With the revenues from
this market, a new, cheaper version of LaViva was developed, but not too
quickly because there weren't many survivors left in the R&D department. Thus
the LaViva .5 was introduced. Also, an upscale version was developed in the
event that professionals happened to somehow find out about this computer.
There were still some bugs in the operating system though. Although certain
parts were rewritten in assembly, some parts (like the "Insight library" and
the "sound device") were left as the same, buggy C code of the original re-
lease. No one even bothered to purchase one of the commercial C compilers
now available and re-compile the code.
The new LaVivas were favorably accepted by the video industry, mostly
because there was no other affordable alternative. The rest of America just
didn't care about LaViva anymore. It was very old news. There was still no
software in any field except video because no 3rd party developer wanted to
bear the burden of not only advertising his product, but also the LaViva.
Soon, both BGC and OPL computers introduced new hardware. It was very
expensive, but of course, 3rd party developers jumped on the bandwagon.
"Now these are companies that KNOW how to market a product", they said. Some
of the hardware, although more expensive, was demonstrably better than La-
Viva, which was, as usual, languishing in the shadows.
Still, Jack's decimated R&D department struggled to piece together a new
operating system, constructed mostly of ideas stolen from public domain
software. Clever LaViva owners had already obtained most of these features
months earlier via disks distributed by a Mr. Barney Trout. There was nothing
really new except for a feature that owners of the new LaVivas could not
use unless they replaced ROMs within the computers that they had purchased.
Jack's didn't do a lick of advertising for the new computers, and not
surprisingly, no one noticed them except for a few people interested in
graphics. Even from these people, there was a collective yawn. Video pro-
fessionals were starting to eye the OPL computer (there really was only one
model, repackaged and/or souped up every now and then). The cost difference
seemed less significant when the notable support by both OPL and other
developers was considered. And the people who just wanted good game graphics
were buying Pretendo game machines. A retail chain called, Our Toys Rust,
filled their shelves with the items now that the stores were now longer
carrying the "toy" computers which had sold so well only a few years earlier.
Jack's management decided that it was time to conquer the workstation
market. Just like in the early days, they hadn't bothered to consider whether
the market wanted them. Would anyone be interested in a slighty used, getting
older by the microsecond computer currently without any significant support?
Would the price difference between the LaViva 2001 AD and the competition be
enough for engineers to overlook the reputation of Jack's management? What
company with a major piece of engineering software was going to port their
product to the LaViva, and why? Would engineers really buy a LaViva 2001 AD
without at least one major engineering application?
Meanwhile, a couple of programmers who really liked the LaViva, (but were
unimpressed with the management of the company that made it), needed a color
control requester. They had heard that the LaViva's next operating system
would have such a feature. Given Jack's management's unwavering commitment
to the LaViva, these programmers decided to write their own rather than wait.
They hoped that many others would decide to continue working with the LaViva
without the help of Jack's Former Computer Company. In fact, they hoped that
developers would shun anything new from Jack's, and embark on a concerted
public domain effort to replace the LaViva's operating system with one that
did not rely on the meager R&D expenditures at Jack's. If developers only
shared a little bit here and there, and made it possible for others to
support any hardware products, then the day might come when no one would
really have to deal with Jack's management. Jack's would only have to make
the base LaViva until the market wanted something better, or another manu-
facturer took over its market completely.
MORAL OF THE STORY: If you want something done for the LaViva computer,
do it yourself.
P.S. PD authors keep it up. Jack's Former Computer Company doesn't support
the LaViva. We do.
«««««««««««««««««««««««««««««««« »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
What now follows is the ColorTool document for the end user.
Before using the dissidents ColorTool, the file "color.library" must be
copied to the libs drawer of your boot (WorkBench) disk.
The dissidents ColorTool allows you to adjust all of the Amiga's colors
in a very straight-forward way. It is a window filled with several gadgets.
At the top are (up to) 32 color "boxes" representing the current colors. One
of the color boxes will have a border around it. This indicates that the box
is the active one. To make another color box the active one, you simply move
the mouse pointer over the desired box, and click the right mouse button.
The border will move to that color box, making that box the active one.
Note that color box #1 appears to be invisible because it is the same
color as the background of the ColorTool window. If you click around the top
left corner of the window where a box "looks" like it might fit, you should
see the border surround this "invisible" color box. Initially, color box #2
is the active one. Because the border is the same color as this box, the
border seems to blend into the box, resulting in what appears to be a color
box larger than the others. If you select another box, note that color box
#2 is really the same size as the others.
Below and to the right of the color boxes are 3 sliders. These sliders
adjust the amount of red, green, and blue in the active color box. To the
left of each slider is a letter followed by a number. The letter indicates
which color component the slider alters: R for red, G for green, and B for
blue. The number is that component's intensity. This ranges from 0 to 15.
For example, you might see the following combination next to the sliders.
R15
G3
B0
This means that the active color box has a lot of red in it, a little green,
and no blue. To your eye, the resulting color box should be some shade of
red. As you move a slider knob, you will see the active box's color change.
Also, you will notice that the number to the left of the slider changes.
When you select a new color box, the sliders are automatically adjusted
to display the amount of red, green, and blue in that color box.
By selecting color boxes, and moving the 3 sliders, you can adjust all of
the colors in the current screen, observing the resulting changes as the
sliders move.
There are several other gadgets below the color box. They are labeled
Default, Cancel, Save, Undo, Copy, and Spread.
The Undo gadget is used to reverse the last change which you made to the
color boxes. If you move a slider, then decide that you don't like the
resulting change to the active color box, you can restore the color by
clicking the right mouse button on the word "Undo". You can even undo the
Undo. By clicking on "Undo" again, you should see that the results you just
canceled are back. This feature is useful for comparing a changed box to the
original box to determine whether you really like the change.
The Copy gadget is used to copy the current color box to another box.
Make sure that the color box you wish to copy has the border around it (e.g.
it is the active box). Then, move the mouse pointer over the word "Copy" and
click the right button. The mouse pointer will turn into the word "TO". This
means that ColorTool now expects you to select a box where you want this color
"TO" be copied. When you select a new color box, its color will change to the
copied box, and this new box will be made the active one (e.g. the border
will move to the new box.) If you don't like the results, you can Undo this.
If you mistakenly click on "Copy" and see the "TO" pointer, simply click on
the same box that is now active to abort the Copy procedure.
The Spread gadget allows you to pick two color boxes, a start and end box,
and have ColorTool alter all of the color boxes inbetween so that they are
various "shades" of the start and end boxes. Select a start box by clicking
on it, then click on the word "Spread". The "TO" mouse pointer will now
appear. Choose a color box for the end, and click on it. All of the boxes
inbetween will change to a smooth variety of shades from start to end. If
you don't like the results, "Undo" them. If you click on "Spread" by
accident, just click on the same box that is now active to abort the Spread.
The Default gadget restores ALL of the color boxes to the same colors as
when the ColorTool window first appeared. This is different than the Undo,
which simply restores only the last change. Use Default when you want to
restore the initial palette and start anew.
NOTE: Since the Default gadget can be configured differently by each
application, some programs may not restore the initial palette,
but instead change all of the color boxes to preset values.
The Save and Cancel gadgets are used to exit the ColorTool. When you have
finished altering the colors, click on one of these gadgets.
The Save gadget will exit the ColorTool, implementing all of the color
adjustments you made to the current screen.
The Cancel gadget will exit, but all of your adjustments will be discarded
and the screen will appear exactly as it did before the ColorTool appeared.
The ColorTool gadgets are initially drawn in the colors of the first two
color boxes. In fact, color box #2 is the foreground color (e.g. the color
that all of the gadgets appear to be). Sometimes, when color box #1 and #2
are almost the same color, the ColorTool gadgets can barely be seen. If this
condition occurs, by using the Function keys, you can change the color of
the gadgets without altering the palette. Press each of the 10 Function keys
on your keyboard, one at a time, until the ColorTool gadgets can be seen
well. One of the function keys should yield a serviceable result. If not,
hold down the ALT key, and press each of the 10 keys again. If you still
cannot see the ColorTool gadgets clearly, hold down the CTRL key and press
the w key. This will alter the first two color boxes (changing them to black
and white respectively). You can then make changes to the other color boxes,
and afterwards restore the first two by pressing CTRL and w again.
Some people prefer to describe a color in terms of Hue, Saturation, and
Value instead of by its red, green, and blue components. By clicking in the
area where the R, G, and B intensities are displayed (e.g. the letters and
numbers), the sliders will change to Hue, Saturation, and Value sliders.
Note that the R, G, and B will change to H, S, and V. Also, the numbers will
represent the value for the sliders. (Though these values are really meaning-
less for HSV, they are included for reference.) Generally speaking, the Hue
slider chooses the color (frequency). As you move the Hue slider you should
see the color box change from red to green to blue. The Saturation determines
the amount of "pigmentation" of the color. If you set Hue to 0 and saturation
to 15, then you should see a definite shade of red. As Saturation goes to 0,
you will notice that the "red" seems to disappear from the color box, leaving
some shade of black, white, or grey. The Value slider determines the bright-
ness of the color. A Value of 0 will most certainly give a very dark, black-
ish color whereas a Value of 15 will give a very bright color. When Satura-
tion is 0, the Hue setting becomes meaningless because you have no "pigment"
in the color. Now, moving the value knob will give you all of the black,
white, and grey shades. For this special case, "--" is displayed for the
Hue value, and the slider knob is forced to maximum right position to remind
you that this color box is in "black and white" mode. To better understand
the intuitive approach of HSV, try the following examples:
1). Set Saturation to 15 so that your color has the maximum amount of
pigmentation. Set Value to 15 so that the color is bright. Now move
the Hue knob and note how the color box changes shade.
2). Set Hue to 0 so that you have a bright red shade. Now slowly lower
the Saturation knob. Notice how the red seems to "disappear" from the
color until finally you are left with no red in the color at all.
3). Now move the Value knob from 15 to 0. Notice that the color box changes
from black to white. This is because Saturation is 0 (i.e. you removed
all the color or pigmentation from the color box).
4). Set Saturation and Value to 15 so that you have the bright red again.
Now adjust the Value knob. Notice how turning down the Value makes the
red darker until finally you have a very dark shade.
To go back to an RGB display, just click on the same display area where
the HSV numbers are printed out.
The ColorTool adjusts the screen colors of the program which called it.
Amiga screens can be various sizes and depths. What this means is that some
screens may have more possible colors than others (i.e. 32 instead of 16).
The ColorTool will display only as many color boxes as there are colors for
the screen.
Only one application can be displaying the ColorTool at a time. If you
run two programs which try to call up the ColorTool SIMULTANEOUSLY, one of
the two will not be able to present the ColorTool. You will have to adjust
the colors for the first application, then select ColorTool's Save (or Can-
cel) before the other application can use the ColorTool.
«««««««««««««««««««««««««««««««« »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
What now follows is the ColorTool document for developers.
Please read the end users document. If you skipped to this section without
reading the preceding information, you're probably a much too careless pro-
grammer to be plunging ahead. If you're one of those BASIC hackers who loaded
the example application into AmigaBasic without even reading this far, then
I pity your hapless soul.
The ColorTool is actually a standard, disk-based library that your applica-
tion can open just like intuition or graphics. The library is called
"color.library". There is only one function in this library, DoColor. This
function is designed to modify the colors of a screen, so you must have
opened a screen before calling DoColor. DoColor opens the ColorTool window,
handles all of the user's interaction (making changes to your screen's colors),
and returns control to your program when the user selects Save or Cancel.
The ColorTool handles screens of all sizes and depths, automatically dis-
playing only as many color boxes as the screen's depth allows. Also, the
ColorTool is designed to fit into any standard size screen.
DoColor returns a 0 if the user selects SAVE and a 1 if he selects CAN-
CEL. (If he selected Cancel, your screen's colors will already have been
restored). There are also a few errors that DoColor can return. These errors
are negative numbers, and indicate that the ColorTool could not be presented
to the user.
In order to conserve memory, the ColorTool can only be displayed by one
application at any given time. Though many applications can have it open and
use it, no two applications can SIMULTANEOUSLY display the ColorTool.
There are two arguments passed to DoColor. One is the address of the
screen whose colors you wish the ColorTool to adjust. The other argument is
the address of a default colorMap (actually a collTable as described in
the GRAPHICS_VIEW include file from Commodore). This is a table of (up to)
32 WORDS representing the colors of the screen. When the user clicks on the
Default gadget, these colors are loaded into the screen. If you pass a NULL
(0), then the screen's initial colors are used instead. Possible uses are:
1). An application could have a preset (or recommended) color setting
invoked by the Default gadget.
2). The application could allow a user to save a color table within a
configuration file. Later, this table could become the one that
gets passed in to DoColor for the Default gadget.
result=DoColor(defaultTable, screen)
d0 a0 a1
Here are the possible error returns from DoColor.
-4 = library in use, another application is displaying it
-3 = passed a null screen address. I told you to open one, pinhead.
-2 = screen has no depth (planes). Please don't do this to me.
-1 = color window can't open (probably out of memory). Buy some more.
The files that you should have received with this document are as follows:
color.library the ColorTool library which must be copied to the libs
dir of your boot disk
ColorTest.asm an example application in assembly
ColorTest.c an example application in C
ColorInterface.asm the C poot that all inefficient, high level languages
like C need to be linked with (assemble this file)
BasicILBM an AmigaBasic application (It could be worse. It could
be Pascal or Modula2. You know, that gibberish that
computer science instructors pretend is a real language.)
color.bmap the bmap file for BASIC
color_lib.fd the fd file for BASIC
TEST the executable of the assembly example
Furthermore, the C and BASIC examples utilize two, public domain libraries
that are already available on Fish disks. One is a file requester, and the
other is an ilbm reader/writer. The documentation and development tools for
the ilbm.library is on disk #237. The FileIO lib should be on this disk or
on #203.
The C example presents the file requester so that you can load an ilbm
picture (using the ilbm library). After the picture is loaded and displayed,
if you press any key, the ColorTool will be presented. As you play with the
sliders, you can see the changes to the screen colors. When you press the
right mouse button, the picture will disappear, and the file requester will
be presented to load the next ilbm. Exit the program by clicking on the file
requester's CANCEL gadget.
The Asm example is very straight-forward. Because it doesn't load any
graphics images, you really can only see the changes made to the first two
colors. If you run the example from the cli, then you can specify the
screen size and depth as follows:
type an l or h (for HIRES or LORES) followed by a number for the depth
For example,
ColorTest l 5
opens a LORES screen with 5 bitplanes (32 colors)
ColorTest h 2
opens a HIRES screen with 2 bitplanes (4 colors)
Note how the ColorTool "fits" into various screen sizes, and presents the
proper number of color boxes.
Incidentally, the library was written in the only language that matters:
assembly. It is approximately 6.6 K in size. Because it uses no uninitialized
data, it does not consume any more memory when loaded into the amiga.
The ColorTool library is copyright 1989 by dissidents software. You may
use and distribute the library with any software (commercial or otherwise)
provided that you do not alter the ColorTool library in any way.
For additional information, contact
Jeff Glatt
6 Sycamore Drive East
New Hartford, NY 13413
dissidents
730 Dawes Avenue
Utica, NY 13502
(315) 797-0343
Coming Soon:
dissidents SAMP reader/writer. Throw away 8SVX and do something that a
professional musician could condone.