[comp.lang.c] simulate VGA on HERC using BGI driver

SRGXNBS@grace.dsir.govt.nz (06/14/91)

I've got a cad program I use at work which requires EGA/VGA, I'd also
like to run it at home but only have a herc screen. The program uses
a BGI driver .. I was wondering if it would be possible to "fake" VGA
by writing an EGA/VGA simulation .BGI driver for a hercules screen? It
would also require a pop-up facility to adjust the colour->monochrome
translation on the fly. Most cad (electrical) is 2D anyway so I should
be able to operate the program (EAGLE by CadSoft) ok.
Any help/comments etc. appreciated ....
bruce

eeh@Dixie.Com (Ed Howland) (06/19/91)

SRGXNBS@grace.dsir.govt.nz writes:

>I've got a cad program I use at work which requires EGA/VGA, I'd also
>like to run it at home but only have a herc screen. The program uses
>a BGI driver .. I was wondering if it would be possible to "fake" VGA
>by writing an EGA/VGA simulation .BGI driver for a hercules screen? It
>would also require a pop-up facility to adjust the colour->monochrome
>translation on the fly. Most cad (electrical) is 2D anyway so I should
>be able to operate the program (EAGLE by CadSoft) ok.
>Any help/comments etc. appreciated ....
>bruce

I presume that you have  some ability to change the driver that is loaded
with the .EXE, since you say you want a new .BGI file. You should not have
to create a new one, just use the herc  .BGI and link to (using BIN2OBJ.EXE)
the cad software. If the calling software has properly initialized the loaded
driver (via registerBGIdriver()) or autodetect, it should convert the 
coordinates, color map, etc. If the calling software makes some non-standard
assumptions about the hardware, or explicitly loads the EGA/VGA driver (no
autodetect) then you might have to fake the EGA/VGA itself. Borland (I think)
sells a driver development kit. Or I once heard about it being available
somewhere.
Ed.
-- 
Ed Howland
internet: eeh@dixie.com
uucp:     ..[emory,uunet]!rsiatl!eeh

gram@uctcs.cs.uct.ac.za (Graham Wheeler) (06/21/91)

In <20401@rsiatl.Dixie.Com> eeh@Dixie.Com (Ed Howland) writes:

>SRGXNBS@grace.dsir.govt.nz writes:

>>I've got a cad program I use at work which requires EGA/VGA, I'd also
>>like to run it at home but only have a herc screen. The program uses
>>a BGI driver .. I was wondering if it would be possible to "fake" VGA
>>by writing an EGA/VGA simulation .BGI driver for a hercules screen? It

Maybe as a quick fix (with no colour fixing, unfortunately) you can just rename
the herc.bgi file to egavga.bgi?
--
Graham Wheeler <gram@cs.uct.ac.za> | "That which is weak conquers the strong,
Data Network Architectures Lab     | that which is soft conquers the hard.
Dept. of Computer Science          | All men know this; none practise it"
University of Cape Town            |		Lao Tzu - Tao Te Ching Ch.78