www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/11/04/03:31:19

Xref: news-dnh.mv.net comp.os.msdos.djgpp:3038
Path: news-dnh.mv.net!mv!news.sprintlink.net!news.zeitgeist.net!wizard.pn.com!Germany.EU.net!zib-berlin.de!solid.theo-physik.uni-kiel.de!news.informatik.uni-kiel.de!news.techfak.uni-kiel.de!news
From: Hartmut Schirmer <hsc AT techfak DOT uni-kiel DOT d400 DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: BCC2GRX and SVGA
Date: 3 Nov 1995 12:39:31 GMT
Organization: Technische Fakultaet
Lines: 72
References: <470bfp$8h2 AT recepsen DOT aa DOT msen DOT com> <9510300714 DOT AA19577 AT zora DOT uni-kiel DOT de> <Pine.BSD/.3 DOT 91 DOT 951031210255 DOT 4871B-100000 AT conch DOT aa DOT msen DOT com> <9511021443 DOT AA22974 AT axp05> <Pine.BSD/.3 DOT 91 DOT 951102195627 DOT 2471B-100000 AT conch DOT aa DOT msen DOT com>
Nntp-Posting-Host: zora.techfak.uni-kiel.de
To: psteele AT conch DOT aa DOT msen DOT com
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

Patrick Steele <psteele AT mail DOT msen DOT com> wrote:
>On Thu, 2 Nov 1995 Broeker AT physik DOT rwth-aachen DOT de wrote:
>
>> In comp.os.msdos.djgpp you write:
>> 
>> >On Mon, 30 Oct 1995, Hartmut Schirmer wrote:
>> 
>> So where's the problem? Does it really make you any problems to change
>> the source code given above to somthing like this:
>> 
>> #ifdef __GNUC__
>>   gd = _SOME_BCC2GRX_COMPATIBLE_GD_
>>   gm = _SOME_BCC2GRX_COMPATIBLE_GD_
>>   set_BGI_mode_whc(&gd, &gm, XRES, YRES, NC);
>> #else
>>   gd = _YOUR_OLD_GD_SETUP_;
>>   gm = _THE_OLD_MODE_SELECTION_;
>> #endif
>
>But there is no BCC2GRX_COMPATIBLE_MODE...  Or maybe I don't understand 
>what you were sayin.  How would I set up for a VESA compatible 
>640x480x256 using BXX2GRX??
>
Just use
  int gd, gm;
  set_BGI_mode_whc(&gd, &gm, 640, 480, 256);
  initgraph(&gd, &gm, "");
and everything will work fine if your GRX is set up for your graphics hardware.
If you've a VESA compatible VGA bios, everything should work without any
addition. Otherwise you may get a bios extension and define

  grx1.0x : go32=<other stuff> driver <select for your hw> gw 640 gh 640 nc 256
  grx20   : grx20drv= gw 640 gh 480 nc 256 

Omit the driver <..> part if you have a VESA video bios.
Now 
  int gd=DETECT, gm;
  initgraph(&gd,&gm,"");
will set up 640x480x256

>> (If I'm not totally mistaken, this would give you a gd/gm pair usable
>> to initgraph() to your desired resolution, independent of the compiler
>> being used. Any corrections on this?)

Remember, Borland didn't define any highres or highcolor mode in the original
BGI api. 

There are a lot of different ways to get high resolution modes. You may use
BC++ 3.1 with different BGI drivers on different machines and the BGI drives
will used different gd/gm values.

Using BCC2GRX you may use the following fact:

  Every driver (except NATIVE_GRX (-1)) passed to initgraph() will
  work like DETECT. Just define a default graphics mode (see above) and
  everything should work as expected.

>I may have missed something somewhere.  What's this about a GO32 
>environment variable?

Read the GRX documentation and check you GRX setup using the modetest
program. If everything works fine, compile the bccbgi.c program coming with
BCC2GRX. The first screen will show you the available mode.

Hope this helps,
Hartmut
-- 
Hartmut Schirmer                         | E-Mail: hsc AT techfak DOT uni-kiel DOT d400 DOT de
Automatisierungs- u. Regelungstechnik,   |  http://www.techfak.uni-kiel.de/~hsc
Technische Fakult"at, Universit"at Kiel, |
Kaiserstr. 2, D-24143 Kiel, Germany,     | Phone: +49-431-77572-245   FAX: -285

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019