The stand-alone BGI emulator is a plug in replacement for the GRAPHICS.LIB
that came with the compiler.  Advantages:  speed!  This will be several times
faster at many operations.  Additionally, it can use super VGA support,
hi-color support (16K colors!), and accelrator card support (blazing speed!
and includes floodfill on 8514).  Being a plug-in replacement, there's not
really much I can do to improve the feature set.  But, you'll be able to mix
BGI calls (via the BGI emulator) with ViewPoint calls in the same program
(ViewPoint is my main product), providing a smooth transition path to some
_real_ power.

This is a pre-release.  It will be shareware when it matures.  Give it
a spin and help me get the kinks out, and you'll get SA-BGIEMU for free.

Graphics driver summary:

The following drivers are supplied in this ZIP.
   VGA.DRV      standard VGA
   SVGA8.DRV    super VGA 256 color
   SVGA16.DRV   hi-color (32K colors)

A note on hi-color support:  Although BGI uses byte values in places
internally, the parameters to functions are declared to take ints.  This
means that BGIEMU, which completely replaces BGI, can support 32K colors.
The BGIDEMO.C program can show hi-color without even recompiling!  The
program was not written with this in mind, so results are spotty.  But you
can see that all the functions work.  Just SET VPDRV=SVGA16.DRV before
you run BGIDEMO (assuming you have a card capable of this mode).

Notes:

This is the second cut at a BGI emulator.  The first time required
recompiling, and compiling as C++.  This had advantages-- enhancements
and efficiency.

This time, it is pure _link_ time replacement.  Take your existing OBJs,
C or C++, and simply replace GRAPHICS.LIB with SABGIEMU.LIB and it will
take it.  There are no new or replacement headers, and no special
instructions.

Ultimatly, it will be available in two forms:  A set of functions for
use with the ViewPoint C++ Graphics Library provide BGI work-alike features.
Native ViewPoint calls and emulation functions can be mixed, facilitating
porting of programs from BGI to ViewPoint, and using pre-existing components.
The basic BGI calls can be extended by using more modes and options available
in ViewPoint.  This will be a standard part of the next version of
ViewPoint.

Second, the stand-alone emulator (what you have now) is menat to be linked
with a program as a drop-in replacement.  This is to give programs higher
performance and a few enhancements.

Notes on this draft, in no particular order:

1. the initgraph() function is not emulating BGI's behavior.  It is
ignoring the parameters.  This will be fixed shortly.  For now, it uses
an environment variable to specify which driver and mode to use, and
can use another environment variable to specify a path to search.
In a nutshell:              SET VPDRV=SVGA8.DRV;4
will use the svga8.drv file (super VGA) mode 4 (640x480).


2. fill patterns are not quite right.  First of all, I'd love it if someone
sent me the data (8 bytes per pattern) that describe the built-in patterns.
The "CLEAR" pattern is now solid black, when I think in BGI it is transparent.
I'll fix that, and speed up the "SOLID" pattern use too.

3. font scaling does not yet work.  Scale factor is ignored.  To produce
a _much_ higher speed in stroked font rendering, the CHR file is converted
to bitmapped format first.  This can take a lot of memory, at high
magnifications.  I plan a fancier system of cacheing bitmaps which will
store Least Reciently Used letters up to a maximum amount of memory, and
will work across all font/size settings too.  So it won't necessarily have
to reload the CHR files when you change fonts, either.

4. vertical printing direction is not yet implemented.  Direction is ignored.

5. thick lines is not yet implemented.

6. line-pattern support is not yet implemented.  Lines will be solid.

7. *.CHR fonts must be found in the current directory.

8. palette functions are not yet implemented.

9. this is built for small model.  GRAPHICS.LIB works for any model.
This lib does not.  I'm not sure what I'm going to do about it yet.
Note that the BGI functions are declared using far pointers as the
parameters.  This lib is small model ultimatly, and won't like those
pointers pointing to things that could not be reached with a near
pointer.

What's new in this release:

1. the solid and empty fill pattern are implemented differently.  It
was just setting the fill pattern to an 8x8 grid of 0's or 1's, but now
it switches to a completely different drawing method.

2. Line patterns are now implemented.  However, I guessed at the actual
pattern data.  If anyone wants to tell me what it ought to look like,
be by guest.


I've spent a long time getting CHR fonts to work.  I've stubbed out most
of the stuff I've not gotten to yet so that BGIDEMO can compile and link,
and it does most of the stuff.  I'll continue working on it.  As you spot
things that are not being emulated correctly, please bring it to my
attention and I'll fix it promptly.


