home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software of the Month Club 1994 October
/
SOFM_Oct1994.bin
/
pc
/
dtp
/
qb0_11
/
qb0.doc
< prev
next >
Wrap
Text File
|
1994-07-04
|
10KB
|
243 lines
QB0.DOC · · · · · · · page 1
QB0.DOC - documentation for CubiNaut 1.10 (c)'94 silicon alley
[has gaps to print on 66-line continuous paper]
CubiNaut is a tool to show colors and their RGB co-ordinates. It's also fun to
play with.
Minimum kit: 8086, VGA or MCGA, DOS 2.0.
CubiNaut can show each of the 262144 different VGA shades. To show up to
248 together on one screen, it uses mode 13h, pretty chunky, i know, but the
only 256-color mode for which you don't need SVGA.
As for people with CGA or EGA: i'm really sorry you can't run it, but the
whole point of CubiNaut is to let you wade through a quarter million colors,
and you haven't got those colors...
What's New
For those who know CubiNaut 1.00: the big new feature is Flood, filling the
whole screen with your chosen color (at the request of some of my users).
Also, code is packed yet more tightly - still under 4 K, folks.
The Color Cube
CubiNaut lets you journey through the color cube, the set of all colors your
screen can display, arranged as a cube, the 3 dimensions being red, green, and
blue content. Each component ranges from 0 to 63 (hex 3F).
To show you the inside of the cube, CubiNaut cuts pieces off. For example,
to look at the color with red, green, blue values of 32, 42, 21 (a greenish
beige) it makes a cut to expose
this .M. this .M. the colors with red content
way more .·' `·. way more .·' ;· of 32 (about halfway the
red R' ;B blue R' .·' : cube).
: `·. .·' : : `·' : The chosen color is some-
: BLACK : : : o .· where on the cut face, but can
Y. : .C Y. : .·' be exposed further. The blue
`·. : .·' `·' content being 21 (one third of
`G' the maximum), it will cut away one
this way third in the blue direction.
more green .M.
.·' ;·
Now the color is on both the cut :`·.·' : .·.
faces, so it must be on the edge : : : .·' ;·
between them. : o .· :`·o·'.·
A final cut, corresponding to `·:·' `·:·'
the green content of 42 (two thirds
down the way), exposes our color from 3 sides. There it is (marked o), on the
intersection of 3 edges and 3 cut faces.
The current corner color and its neighbouring colors are shown as little
cubes that stack up.
The current color is also used as text background, to show how it looks in
bulk.
The program starts with 19 19 19 (hex 13 13 13), dark grey.
QB0.DOC · · · · · · · page 2
Keys
* Insert/Home/PgUp INCREASES the current color's red/green/blue content. This
slices one layer off the appropriate face to expose another, brighter layer.
The remaining part of the cube is shifted one unit towards you, so the new
corner color is in the same place on screen where the old one was. Works
different after F2.
* Delete/End/PgDn DECREASES the current color's red/green/blue content. This
adds a (darker) layer to the cube, which moves one unit away from you, so once
again you see the new corner color where the old one was. Different after F2.
* Ctrl with any of these keys in/decreases the step between layers. Initially,
you get every fourth layer in the red and blue directions (step +04), but every
other green layer (step +02).
Choose large steps to ZOOM OUT. Try step sizes all +08, color values 03, to
see the whole cube in the viewport.
Small steps are essential to ZOOM IN and see fine nuances of shade.
You'll want to increase a step size when neighbouring colors become indis-
tinguishable. You can set the three step sizes separately.
* F2 flips the sign of the steps. On startup, all the neighbouring colors you
see are BRIGHTER than the corner color. The colors whose red, green or blue
content are lower than those of the corner color have all been cut away, to
expose the corner.
After F2, you're looking the other way, and the neighbouring colors you see
are DARKER. Now the colors with higher red, green or blue contents have been
cut away.
Every next F2 reverses the situation.
This means after using F2 (an odd number of times), changing red/green/blue
has a different visual effect: now INcreasing adds a (brighter) layer, and DE-
creasing slices a layer off.
If this all sounds complicated, just get to know the program a bit before
using F2.
* F10 does not affect the colors; it toggles between bases 10d (decimal) and
10h (hex) to display the numbers. You get decimal on startup.
* Enter (or ─┘ or Return) floods the whole display and border with your
chosen color. Press any key to get back into editing mode (a keypress to get
out of flood will not have the key's normal effect).
* Esc, finally, gets you back to the drab white on black DOS prompt.
More about Keys
You may have seen that, while other keys repeat when held down, Insert doesn't
normally. Ours is not to wonder why, ours is just to compute and sigh...
This would make increasing red awkward, but i didn't want to give up Insert;
CubiNaut's color keys are (on a 101/102 keyboard) perfectly arranged for their
task. So CubiNaut repeats Insert "by hand", 18 times per second, after a half-
second delay. This may be a bit faster or slower than your other keys, but at
least you don't have to go taptaptap...
Technical note: CubiNaut detects Ins-down at 0040:0018 bit 7, chains int 1C
for its timing, and restores the vector on exit. Time-of-day routines continue
while CubiNaut runs. My eternal gratitude to anyone who knows a better trick to
make Insert behave like a proper key.
QB0.DOC · · · · · · · page 3
By the way, in/decreasing a color component may be slower than its key's
repeat. CubiNaut clears the keyboard buffer each time it reads a key, so a key
won't go on after it's released, and you shouldn't get a bloodcurdling screech
from a full keyboard buffer.
If you have a non-enhanced (XT) keyboard then CtrlIns and CtrlDel simply
don't exist. My solution is to offer Ctrl-> & Ctrl<- as alternatives and, for
symmetry, -> & <- as alternatives for Ins & Del.
Ctrl up/down arrows would have been more convenient to use, but these don't
exist either on the XT keyboard... Ours is not etc.
Windows
CubiNaut is a DOS program. It runs happily under Windows 3.1, if run full-
screen. It only needs a PIF if you have edited your _DEFAULT.PIF to make DOS
programs run windowed by default (in which case you know how to make a PIF).
QB0.ICO is provided, so you can fiddle with Properties in Program Manager
and give CubiNaut its icon. It's nice!
The Values
The values CubiNaut displays for red, green, and blue range from 0 to 63 (3Fh)
This corresponds to the way VGA colors are stored in the DAC registers, as
accessed by int 10, ah = 10, al = 10/12/15/17 (all hex) and to values C library
remap functions expect.
If you need R/G/B values in the range 0 - 255 (FFh), the way 24-bit graphics
store their pixel colors, and 2/4/16/256 color BMP's store their palettes, or
for Windows, then you should multiply by 4 (or shift << 2) the values CubiNaut
gives you.
Epilog
This is an original creation of the mind, and as such copyright material under
British law, and hence under international law (because of various treaties).
The author reserves all rights to her creation. (c)'91-'94 Marijke van Gans,
trading as silicon alley.
CubiNaut is SHAREWARE, so anyone may copy it and pass it round, as long as
you keep the complete package together when you do so: QB0.COM (program),
QB0.ICO (icon), and QB0.DOC (documentation).
This software is not to be sold or hired, but bona fide shareware distributors
may levy a reasonable handling charge (send me your advert or catalog and you
will be informed of all my programs and their upgrades when released).
Try it out to your heart's content. If you decide to keep the program, you
should pay for it. Any money you paid to a distributor was their handling fee,
i don't get a penny of that. Price: 5 ECU, or Britain £4, Deutschland 10 DM,
Éire £4, Nederland ƒ10, Nihon ¥600, USA $6, or equivalent in local currency.
If used for a business, government agency or other organisation, the maximum
trial period is 59 calendar days, after which registration fees must be paid
for each computer on which the software is to be used. Invoice on request.
Please send cash, international postal money order, or a cheque drawn on a
British bank (an exotic cheque would cost more to cash than the $6). Or pay me
via CompuServe: GO SWREG (should be available in a few days).
QB0.DOC · · · · · · · page 4
Benefits of registration include
+ a disk with the latest version (please mention whether you want 3½" or 5¼")
+ some more shareware to try out, on the same disk
+ good chance of having your suggestions included in next version
+ eternal support from the author herself (CompuServe, phone, and mail)
+ the right to run any future versions of CubiNaut
Credits
silicon alley software is lovingly handcrafted, using the finest development
tools available on this planet, including
* SemWare's QEdit (to write the source, and this doc)
* Interrupt List, started by Janet Jack, current ed. Ralf Brown (a huge and
invaluable resource, and free to use)
* Eric Isaacson's A86 assembler (used for all silicon alley library routines,
and for time-critical code)
* Microsoft C (to compile the rest of the code, and link it all together)
* ...and a great π486sx33 given to me by my brother & his wife.
All trademarks belong to their respective owners.
silicon alley
CompuServe: 100345,2675
InterNet: 100345.2675@compuserve.com
Snail mail: P O Box 2799, London E9 7AW, England, Europe