Is it possible to use a function call (or any other technique) to determine all available video modes on my or any other machine?
Announcement
Collapse
No announcement yet.
video modes
Collapse
X
-
Are you talking about the SCREEN <number> modes, or the available VESA (Mode-X) screen modes?
Be sure to look at the pbvScrnCard internal variable - it 'describes' the available SCREEN modes that are directly available to your code:
Screen video card descriptor:
bit0=mono bit1=cga bit2=egamono
bit3=egaclr bit5=vga bit6=hercules
------------------
Lance
PowerBASIC Support
mailto:[email protected][email protected]</A>Lance
mailto:[email protected]
-
I am referring to either SCREEN-x or using "call interrupt &h10" to set to a specific video mode. Int10 gives me more options. By the way, I forgot to mention that I am using PB 2.1f. I know I should upgrade but...
------------------
There are no atheists in a fox hole or the morning of a math test.
If my flag offends you, I'll help you pack.
Comment
-
I'm a few years out of date on video modes, but a good start
would be the Int 10h section in Ralf Brown's interrupt list:
http://www.cs.cmu.edu/afs/cs.cmu.edu...WWW/files.html
------------------
Comment
-
The following is courtesy of Tom Hanlin (edited by Lance Edmonds):
Mode X graphics modes are separate from VESA modes. The general summary of graphics modes available to DOS products goes somewhat like this.
The BIOS provides the most universal (and most primitive) graphics support, based on INT 10h services, which is what the BASIC "SCREEN" functionality is based on. The actual BIOS graphics functionality is too pathetic to be useful, but SCREEN is based on the BIOS graphics modes, and uses the BIOS for (if nothing else) actually setting the video mode.
When IBM established the first (relatively) "high color" graphics mode, which we call SCREEN 13, they used a very conservative resolution of 320x200. Standard VGA displays and standard VGA display adapters could actually do much better than this, but the resolution had a convenient aspect ratio, and IBM figured that Serious People like Businessmen would consider graphics frivolous. (Among the good reasons "IBM PCs" aren't generally bought from IBM any more).
Anyway, people figured out soon enough how to implement a variety of nonstandard VGA-level graphics modes of up to some 360x400 in 256 colors. These were described as "Mode X" graphics modes, since they were not tied to any BIOS mode numbers.
Supporting Mode X modes meant reprogramming the graphics controller directly and implementing all of your own graphics routines.
Through EGA days and, to a lesser extent, VGA days, IBM held a pretty good lock on the standards market. They weren't innovating fast enough, though, and their prices were terrible.
Competitors came around with any number of "SuperEGA" and "SuperVGA" graphics cards which, for all their theoretical power, were mostly useless in practice, as they each had different, incompatible methods of handling their new graphics modes. The most successful attempt to resolve this problem was the VESA standard - a (expletive!) design that usually provided at least some basic information about the graphics modes available and a standard way to set the modes.
Even more so than the standard BIOS modes, it was left up to the individual programmer to get anything useful out of VESA modes, but the programmer could, at least, usually find out what modes were available and tell the adapter to switch into a given mode.
On that basis, VESA was somewhat more friendly than the various "Mode X" modes.
Windows became popular not too much later, and development of DOS graphics modes evaporated. One of the more useful features of Windows is a strong level of device independence, fortified by the requirement that hardware developers provide standardized device drivers in order to work with Windows.
Added by Lance:
We are seeing more and more "modern" graphics cards that simply don't support VESA or Mode X graphics at all (or only support a very limited subset of these modes). Such graphics modes are now considered obsolete, driven by the demand for hardware accelerated graphics cards to give better Windows and MM performance.
If you plan on writing high volume 'commercial' applications that require Mode X or VESA graphics, be prepared to face a dwindling target audience. Sad but true.
------------------
Lance
PowerBASIC Support
mailto:[email protected][email protected]</A>Lance
mailto:[email protected]
Comment
Comment