Board index » delphi » Getting Mode List from VESA 2.0 -HOW?

Getting Mode List from VESA 2.0 -HOW?

Struggling with a VESA VBE 2.0 interface, I am trying to obtain the list
of supported mode numbers the video card has. I already know how to get
the offset to the list, in VesaInfoBlock.VideoModePtr (I declared the
offset as a longint, btw.) field, but then what? All I know is that the
list of numbers takes a word per mode, and is terminated by a -1.

Any ideas? An email response would help.

<cg...@hooked.net>

 

Re:Getting Mode List from VESA 2.0 -HOW?


Quote
cg...@hooked.net wrote:
> Struggling with a VESA VBE 2.0 interface, I am trying to obtain the list
> of supported mode numbers the video card has. I already know how to get
> the offset to the list, in VesaInfoBlock.VideoModePtr (I declared the
> offset as a longint, btw.) field, but then what? All I know is that the
> list of numbers takes a word per mode, and is terminated by a -1.

Well, it should be the same as the way it's done in 1.2 (haven't looked
closely into the 2.0 specs yet, though):

type
  Pword = ^word;

var
  curmode : Pword;

begin
  curmode := VesaInfoBlock.VideoModePtr;
  while curmode^<>-1 do
    begin
      writeln (curmode^); {or store into an array}
      inc (curmode);
    end;
end;

Quote
> Any ideas? An email response would help.

> <cg...@hooked.net>

--
Scott Earnest        | We now return you to our regularly |
set...@ix.netcom.com | scheduled chaos and mayhem. . . .  |

Re:Getting Mode List from VESA 2.0 -HOW?


Quote
cg...@hooked.net wrote:

: Struggling with a VESA VBE 2.0 interface, I am trying to obtain the list
: of supported mode numbers the video card has. I already know how to get
: the offset to the list, in VesaInfoBlock.VideoModePtr (I declared the
: offset as a longint, btw.) field, but then what? All I know is that the
: list of numbers takes a word per mode, and is terminated by a -1.

VBE 2.0 works (for this) exactly as 1.2 did. Only difference is that u
should always do this rather than using a pre-determined mode number ( as
101h, for example ).
You simply need to loop on a pointer on word on list, stopping when 0ffffh
is reached.

As an example, you can look to ugraf source, available on garbo, simtel,
x2ftp ... (name :  ugraf12.zip).

: Any ideas? An email response would help.

: <cg...@hooked.net>

Hope this helps,

                                                        F.

Other Threads