delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/23/10:05:10

Message-ID: <F77915E7F086D31197F4009027CC81C90DB7DF@probe-2.as-london.acclaim.com>
From: Shawn Hargreaves <SHargreaves AT acclaimstudios DOT co DOT uk>
To: djgpp AT delorie DOT com
Subject: Re: fprintf() and using under graphic modes
Date: Tue, 23 Nov 1999 14:39:33 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii writes:
> If your BIOS supports text output in the graphics
> mode you are using, it will work.

Yup. But in my experience only about 50% of VESA implementations have
that support, so it is a bad thing to rely on.

> One way of telling if the particular mode is supported by the BIOS is
> to call the DJGPP functions ScreenRows() and ScreenCols() and compare
> their results with the number of text rows and columns for the
> graphics mode you switched into (which you need to know in advance).

I think it would be more robust to read this directly from the VESA
driver: this can be found in the mode information structure, where
the ModeAttributes field will have bit 2 set if TTY output is available.
As a quick test, run the Allegro "vesainfo -v" program, and see whether
it prints "tty" as part of the ModeAttributes value for the resolution
you are interested in.


	Shawn Hargreaves.

- Raw text -


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