[comp.os.msdos.programmer] Solved! Re: SVGA BGI problems in TC++

daly@ecs.umass.edu (Bryon Daly, ECE dept, UMass, Amherst) (02/08/91)

In article <12607@ccncsu.ColoState.EDU>, colburn@handel.CS.ColoState.Edu (Alex Colburn) writes:
> In article <4889@peyote.cactus.org> jjohnson@peyote.cactus.org (Jeff Johnson) writes:
>>In article <12245.27a5ef74@ecs.umass.edu>, daly@ecs.umass.edu (Bryon Daly, ECE dept, UMass, Amherst) writes:
>>
>>> Has anyone else experienced problems with third-party BGI support using 
>>> Turbo C++?  Has anyone gotten the svga15.zip driver to work correctly in 
>>> Turbo C++?
>>
>>I can't get user installable BGI drivers to work with TC++ either.  I
>>have tried a 320x200x256 BGI and svgabg15.zip.  Neither works properly.
>>I can't get lines or text to work.  I have an STB PowerGraph using
>>ET4000 chipset.  Does anyone have an SVGA BGI driver that works with
>>this board and TC++ 1.00?
> 
> 	Sorry  jeff and bryon, but
> 	I've had the svga drivers work just fine in TC++ 2.0
> 	turbo pascal 5.0 and 6.0.  I'm using a paradise card with
> 	512 k, so I can get up to a 640x480x256, the 1024x762x16 mode
> 	isn't yet supported on the bgi drivers.  If you want
> 	I can email you some source that does work on my machine.

I discovered a bug in the svgabg15.zip which let let you initgraph to the
1024x768x256 mode and do graphics, but as soon as you did a setgraph, things
crapped out (you would get "invalid graphics mode", or something)  My code
was calling a setgraph immediately after the initgraph at first, and so I was
never seeing working code.  I have contacted the author about this problem,
and he has confirmed the bug and fixed it.  (I don't know if he's going to 
put out an updated version for the unregistered people to have)  He said it 
should only have affected the 1024x768 mode and the other modes should have
worked normally.  (But I haven't tried them)  A workaround I discovered was to
use initgraph everytime I wished to re-enter graphics mode (not the best
solution, but it is workable).

Thanks to everyone who's tried to help,
Bryon Daly
daly@ecs.umass.edu

jjohnson@peyote.cactus.org (Jeff Johnson) (02/12/91)

In article <12607@ccncsu.ColoState.EDU>, colburn@handel.CS.ColoState.Edu (Alex Colburn) writes:
> In article <4889@peyote.cactus.org> jjohnson@peyote.cactus.org (Jeff Johnson) writes:
>
>I can't get user installable BGI drivers to work with TC++ either.  I
[stuff deleted]

> 	Sorry  jeff and bryon, but
> 	I've had the svga drivers work just fine in TC++ 2.0
	[stuff deleted]

I have discovered my problem.  The the last 8 (?) or so palette slots
aren't initialized and I was testing the drivers with BGIDEMO.  BGIDEMO
uses setcolor(MAXCOLORS-1) to plot most things.  This won't show up if
color 255 is 0,0,0 (black).  When I changed the setcolor() and also
explicity set to colors less than 248 the drivers work fine.  

Thanks to all who responded.

-- 
Jeff Johnson		10926 Jollyville #1420, Austin, TX 78759
Computer Consultant	(512) 343-0675		(512) 750-UNIX
jjohnson@peyote.cactus.org	{uunet|uiucuxc}!cs.utexas.edu!peyote!jjohnson