Mail Archives: djgpp/2000/04/01/08:35:15
From: | "AndrewJ" <luminous-is AT home DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
References: | <4698esg56ttr8u6sfedrtdvsjovi2s6dpg AT 4ax DOT com>
|
Subject: | Re: Vesa is a pain help please
|
Lines: | 35
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Newsreader: | Microsoft Outlook Express 5.00.2919.6600
|
X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2919.6600
|
Message-ID: | <BqlF4.103701$Hq3.2655687@news2.rdc1.on.home.com>
|
Date: | Sat, 01 Apr 2000 11:53:05 GMT
|
NNTP-Posting-Host: | 24.42.120.18
|
X-Complaints-To: | abuse AT home DOT net
|
X-Trace: | news2.rdc1.on.home.com 954589985 24.42.120.18 (Sat, 01 Apr 2000 03:53:05 PST)
|
NNTP-Posting-Date: | Sat, 01 Apr 2000 03:53:05 PST
|
Organization: | @Home Network Canada
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
[snip]
> union REGS regs;
> regs.x.ax = 0x4F02; /* change display mode */
> regs.x.bx = 117; /* three-digit mode number */
> int86(0x10, ®s, ®s); /* Call the BIOS (int10) */
> if(regs.h.al != 0x4F)
> {
> printf("VESA modes NOT supported!\n");
> }
[snip]
Well, I see one problem right off the bat. Mode numbers are generally given in
hex, NOT decimal, so when your trying to set it to mode 117, you're giving it
an invalid vesa mode (0x75, which isn't even a vesa mode). Try setting it to
mode 0x0117 instead and you should get proper results.
Secondly, going with the assumption that this would be a complete program, you
aren't following the recommended steps for use vesa. Ideally you should be
allocating a block of real-mode memory (dpmi functions will do this), getting
the vbe information to check that vbe is actually installed (unless you only
intend to use this on your system and you know you have vbe), going through the
mode list pointer getting information about each mode until you find the one
that corresponds to the mode you want, and *then* setting the mode. In VBE 2+
it was no longer required by the specification to continue using fixed mode
numbers for various modes, so in theory mode 0x0117 might not even be
1024x768x16bpp on your system (although I've yet to hear about a card that
didn't retain all the old VBE 1.x mode numbers).
Hope this helps,
AndrewJ
- Raw text -