home *** CD-ROM | disk | FTP | other *** search
-
- HERC.BGI - Supplemental Documentation
-
- HERC.BGI is a "unified" driver that support both the Hercules
- monochrome graphics cards (in 2 colors) and Hercules InColor Card
- (in 16 colors). This B.G.I. driver is appropriate for use with
- Turbo C 2.0 and Turbo Pascal 5.0.
-
- Since the present BGI kernal does not recognize a InColor card
- when it tries to autodetect the attached video card in the system,
- this HERC.BGI has built the DETECT function built into the driver
- itself. If an InColor card is present in the system, the driver will
- detect it during its installation and act accorrdingly - that is,
- operate in 16 colors.
-
- The InColor card will share the same GraphDriver and GraphMode
- values with the monochrome graphics cards. That is,
- GraphDriver = HERCMONO, and GraphMode = HERCMONOHI.
-
- To autodetect an InColor card, the following sequence of code
- could be used: (in C syntax)
-
- graphdriver = DETECT;
- initgraph(&graphdriver, &graphmode, "");
- /* ...
- graphics error processing
- */
- if (graphdriver == HERCMONO) {
- if (getmaxcolor() == 15) {
- ... /* InColor card */
- }
- else {
- ... /* monochrome graphics cards */
- }
- }
- ....
-
- NOTE - The Autodetect function of Borland's BGI will always want to load the
- driver of the device that it identifies as the highest performance
- adapter in the system. This means that in some dual monitor
- configurations the DETECT function may force the BGI driver to
- what it identifies as the higher performance graphics mode. For
- example, in systems that include both a Hercules InColor Card and a
- Hercules VGA Card, the BGI Autodetect function will load the EGAVGA.BGI
- driver even though you may want to execute the program on the InColor
- Card. In such a case, you must explicitly name the HERCMONO as the
- graphdriver rather than use the DETECT function.