Mail Archives: djgpp/1999/07/23/14:10:31
> Hi! Just wondering why allegro's set_gfx_mode won't autodetect the
> nVidia Riva TNT...?
Which version of Allegro are you using? If it's not version 3.11, go get
this version and try it.
The rest of this message assumes you have version 3.11 and are (still)
having this problem.
What you want to do is, instead of autodetecting, get your program to try
different drivers, starting from the best to the worst.
Like this:
#define scrW 800
#define scrH 600
if (set_gfx_mode(GFX_VBEAF, scrW, scrH, 0, 0) < 0)
if (set_gfx_mode(GFX_VESA3, scrW, scrH, 0, 0) < 0)
if (set_gfx_mode(GFX_VESA2L, scrW, scrH, 0, 0) < 0)
if (set_gfx_mode(GFX_VESA2B, scrW, scrH, 0, 0) < 0)
if (set_gfx_mode(GFX_VESA1, scrW, scrH, 0, 0) < 0)
if (set_gfx_mode(GFX_AUTODETECT, scrW, scrH, 0, 0) < 0)
printf("Sorry, can't set screen mode.\n%s", allegro_error);
To my understanding, The TNT card has onboard Vesa 2 support, although I'm
not stating it as absolute fact. If it doesn't, it would certainly have vesa
1.x support. And why the VBE/AF line at the top? This is a good idea if you
want your program to have the best performance on any machine. If a machine
supports it (and you can make it do this by shipping the VBE/AF drivers with
your software), this is the best driver there is for allegro, as it's the
only one that supports hardware acceleration. I don't think vbe/af currently
supports any 3D cards, but it probably will some day, assuming the
manufacturers will release the appropriate info.
Hope this helps. If not, maybe there's a VESA driver with a CD you would
have got with the card. When I got my PC a couple of years ago, it had an S3
Trio64V+ which had onboard vesa 1.x support, but only recently I found the
vesa 2.0 driver that was on the CD it came with. I was lucky to find it as
there was no documentation pointing to it. It may be the same for the TNT,
as a vesa driver wouldn't be considered important enough to make a serious
note of, since it's just a DOS necessity.
- Steven Taylor.
- Raw text -