delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/27/21:48:21

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: PRO: Plz check my code for some errors/optimization. (VESA.CPP)
Date: Thu, 26 Mar 1998 19:19:19 +0000
Organization: None
Message-ID: <6P29HKA3oqG1Ew6q@talula.demon.co.uk>
References: <3518602E DOT 15E3A2C4 AT netrover DOT com> <351A4F5B DOT 56D1 AT club-internet DOT fr>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 29
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Ludvig Larsson writes:
>You want to use the 640x480x65536 res?
>Have your 'set_mode' function to set mode 0x111
>If your function works, you'll get it.

This is a slightly pedantic point, because your advice is correct for
about 99% of cards, but according to the VESA 2.0 specification:

    Note: Starting with VBE version 2.0 VESA will no longer define new
    VESA mode numbers and it will not longer be mandatory to support 
    these old mode numbers.  However, it is highly recommended that BIOS
    implementations continue to support these mode numbers for
    compatibility with old software.  VBE 2.0-aware applications should
    follow the guidelines in Appendix 5 - Application Programming
    Considerations - for setting a desired mode.

So, most drivers will follow the "highly recommended" part and support
the 0x111 mode number, but to be technically correct your code should
scan through the mode list to find a suitable number (that has the
advantage of letting you support any non-standard modes that may be
defined by a particular VESA implementation). My VESA chapter in the
DJGPP User's Guide tells how to do this: it uses a 256 color mode as an
example, but can easily be modifed to look for a 16 bit resolution by
making it check for a MemoryModel of 6 and BitsPerPixel of 15 or 16.


--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
"Pigs use it for a tambourine" - Frank Zappa

- Raw text -


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