Mail Archives: djgpp/2000/04/01/08:48:54
Darn it, I went and replied this to an older message posted by you by accident.
Here is the entire text cut 'n pasted. =)
[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 -