REFERENCE MANUAL
FOR SVGACC
THE SUPER VGA
GRAPHICS LIBRARY
FOR USE WITH
MICROSOFT
COMPATIBLE C/C++
COMPILERS
1993-2000 by Zephyr Software - Stephen L. Balkum and Daniel A.
Sill
All rights reserved. No part of this book shall be reproduced or
transmitted by any means, electronic, mechanical, photocopying,
recording or otherwise, without written permission from Zephyr
Software - Stephen L. Balkum and Daniel A. Sill.
Although every effort has been made to insure the accuracy of the
material in this book, Zephyr Software, Stephen L. Balkum and
Daniel A. Sill assume no responsibility for errors or omissions.
In addition no liability is assumed for damages resulting from
the use of the information contained herein.
Printed in the United States of America
Trademarks
Sound Blaster and Sound Blaster Pro are trademarks of Creative
Labs, Inc.
All others are trademarks of their respective owners.
ii
SOFTWARE LICENSE AGREEMENT
By using this software, you agree to the terms of this
agreement.
No warranties are expressed or implied. In no event
shall Zephyr Software, Stephen L. Balkum or Daniel A.
Sill be held liable for damages resulting from the use
or misuse of this product, including but not limited to
implied warranties of fitness for a particular purpose.
The shareware version may be freely distributed as long
as all files stay together and are not modified in any
way. No cost may be charged for the shareware version
beyond normal and reasonable copying and distribution
expenses.
No products developed with this software shall be sold
unless this software has been registered with Zephyr
Software, Stephen L. Balkum or Daniel A. Sill.
At no time for any reason shall this software be
reverse engineered, decompiled or disassembled.
This software may not be rented or leased.
This software may be used only on one terminal or one
computer at any one given moment in time. This
software may not be installed on a network of any type.
Contact Zephyr Software, Stephen L. Balkum or Daniel A.
Sill for networking options.
United States Government Restricted Rights:
Use, duplication or disclosure of this software and
documentation by the U.S. Government is subject to the
restrictions as set forth in subparagraph (c)(1)(ii) of
the Rights in Technical Data and Computer Software
clause at DFARS 252.227-7013. Contractor/manufacturer
is Stephen L. Balkum and Daniel A. Sill, P.O. Box 407,
Pflugerville, Texas 78619-0407.
The ownership of this software may be transferred as
long as Zephyr Software, Stephen L. Balkum or Daniel A.
Sill is notified in writing of the transfer date and
new owner. The new owner must agree to this contract.
The transfer must include all registered updates and
previously registered versions. The original owner may
not retain any copies in any form of the registered
software or its documents.
iii
INTRODUCTION
We spent weeks searching the depths of the internet ftp sites for
a library that would allow the programmer full access to the
abilities of Super VGA. We wanted the colors VGA could provide
and better resolution than EGA could provide. Professionally
developed libraries with this ability were definitely out of our
price range. After our searches continuously returned nothing,
we decided to fill the apparent void in the shareware market.
Our searches did give two useful packages: John Bridges' VGAKIT
and Finn Thoegersen's VGADOC. We began with these two works and
developed a graphics library intended to allow the programmer
access to the huge world of high resolution programming.
On the surface the task appeared quite simple. However, it
quickly became obvious that the routines in this library would be
required to affect extremely large amounts of data. Operations
must be quick to be successful. Therefore, every effort was made
to create the fastest code possible - even at the expense of
size. For this reason we opted to write code with the 32 bit
instructions of the 80386 and better processors. It is our
opinion that anyone with a hi-res card in a lesser machine may
have some priorities out of order. All routines are written in
assembly and use absolutely no floating point values. Anytime a
real number was required, fixed point notation was used. In
addition we attempted to write the routines such that any
reasonable argument passed can be interpreted intelligently by
the library.
With the numerous Super VGA cards available and no well
established standard we chose John Bridges' identification and
bank switching routines as a beginning. These two routines have
undergone some modification, but not enough to justify
copyrighting this portion of the library's code by Zephyr
Software. We have no intentions of releasing our changes to
these routines into the public domain. From that point onward
all code is original. In some instances common algorithms were
researched and original code written according to that algorithm.
This Super VGA library gives the programmer transparent access to
twenty different Super VGA cards. These cards include Acumos,
Ahead, ATI Technologies, Avance, Chips and Technologies, Cirrus
Logic, Everex, Genoa, MXIC, NCR, Oak Technologies,
Paradise/Western Digital, Primus, Realtek, Trident, Tseng Labs,
Video 7 and the VESA standard. Please see the WHICHVGA function
for the specific chipsets. The programmer only needs to verify
that the end user's card has been identified, but not which card
was recognized. After proper identification, all functions react
in exactly the same fashion. The library contains functions to
draw all of the major primitives. In addition there are
functions that modify the screen palette, write text on the
screen with a choice of fonts and modify the reaction of the
primitives. Identification routines include not only the video
2
card, but also the amount of video memory, type of pro