1

I am writing Graphics adopter drivers. I know that VBE provides resolution such as 1024×768 or 800×600 etc. My question is how can I get wide screen resolution such as 1366×768 in VESA BIOS?, Which BIOS function should is use?. Please give me mode function number for 1366x786(or others) such as 0117h is for 1024x768 16bit colors. I'm using x86 assembly and VBE3.

tshepang
  • 12,111
  • 21
  • 91
  • 136

2 Answers2

1

All information are inside of the vbe3.pdf from vesa.org: "Note: Starting with VBE version 2.0, VESA will no longer define new VESA mode numbers and it will no longer be mandatory to support these old mode numbers."

But some of the newer PCIe cards like my Nvidia GTX 295(from the manufacturer Colofull) and my Radeon 7950(Saphire) let my use also their widescreen videomodes, but the modenumbers are different and vary from BIOS to Bios and manufacturer. At the end i like to share the modetables from these both cards above.

The first step is to call the funktion 4F00h, for to get the VBE-Info in a buffer of 512 bytes. Return 4Fh in AX if the call was successful.

The next step is to check the major version number of the VBE BIOS at the address buffer+5, if the value is 2 or 3 or 1. Starting with VBE 2 we have to get the mode numbers from the VBE Bios itself.

The next step is to get the pointer of the modetable from the address: buffer+0Eh and with this pointer we can get the modenumbers. Each modenumber are 16 bit an the modetable ends with 0FFFFh.

The next step is to call the function 4F01h for to get the mode specific information with each modenumber in a seperate buffer of 256 byte for to find the resolution and the bits per pixel that we want to use.

;-----

Starting with VBE 3 it is possible to use our own CRTC-parameter-table for to get a higher refreshrate with switching into one of the given resolution and with a given aspect ratio that we can not change on this way. I used it together with a 19" CRT-Monitor with 96khz and 160hz capacity example with 1280x1024 with 85hz, or with 1024x768 with 100hz, 800x600 with 140hz, 640x480 with 160hz refreshrate. But my 28" LCD provide only one native resolution of 1920x1200 with 60hz, but widescreen 16:10 aspect ratio.

------------------------------------- 
VBE Modelist Saphire 7950
------------------------------------- 
mode
number xres yres bpp LFB
0100 640x400x8 C0000000 VGA 4:3
0101 640x480x8 C0000000 VGA 4:3
0103 800x600x8 C0000000 SVGA 4:3
0105 1024x768x8 C0000000 XGA 4:3
0107 1280x1024x8 C0000000 SXGA 5:4
0110 640x480x16 C0000000 VGA 4:3
0111 640x480x16 C0000000 VGA 4:3
0113 800x600x16 C0000000 SVGA 4:3
0114 800x600x16 C0000000 SVGA 4:3
0116 1024x768x16 C0000000 XGA 4:3
0117 1024x768x16 C0000000 XGA 4:3
0119 1280x1024x16 C0000000 SXGA 5:4
011A 1280x1024x16 C0000000 SXGA 5:4
010D 320x200x16 C0000000 CGA 4:3
010E 320x200x16 C0000000 CGA 4:3
0120 320x200x32 C0000000 CGA 4:3
0193 320x240x8 C0000000 QVGA 4:3
0195 320x240x16 C0000000 QVGA 4:3
0196 320x240x32 C0000000 QVGA 4:3
01B3 512x384x8 C0000000 4:3
01B5 512x384x16 C0000000 4:3
01B6 512x384x32 C0000000 4:3
01C3 640x350x8 C0000000 EGA 4:3
01C5 640x350x16 C0000000 EGA 4:3
01C6 640x350x32 C0000000 EGA 4:3
0133 720x400x8 C0000000 WVGA 18:10
0135 720x400x16 C0000000 WVGA 18:10
0136 720x400x32 C0000000 WVGA 18:10
0153 1152x864x8 C0000000 XGA 4:3
0155 1152x864x16 C0000000 XGA 4:3
0156 1152x864x32 C0000000 XGA 4:3
0163 1280x960x8 C0000000 VGA 4:3
0165 1280x960x16 C0000000 VGA 4:3
0166 1280x960x32 C0000000 QVGA VGA 4:3
0121 640x480x32 C0000000 VGA 4:3
0122 800x600x32 C0000000 SVGA 4:3
0123 1024x768x32 C0000000 XGA 4:3
0124 1280x1024x32 C0000000 SXGA 5:4
0143 1400x1050x8 C0000000 SXGA+ 4:3
0145 1400x1050x16 C0000000 SXGA+ 4:3
0146 1400x1050x32 C0000000 SXGA+ 4:3
0173 1600x1200x8 C0000000 UXGA 4:3
0175 1600x1200x16 C0000000 UXGA 4:3
0176 1600x1200x32 C0000000 UXGA 4:3
0183 1792x1344x8 C0000000
0185 1792x1344x16 C0000000
0186 1792x1344x32 C0000000
01D3 1856x1392x8 C0000000
01D5 1856x1392x16 C0000000
01D6 1856x1392x32 C0000000
01E3 1920x1440x8 C0000000 4:3
01E5 1920x1440x16 C0000000 4:3
01E6 1920x1440x32 C0000000 4:3
01D1 1920x1200x8 C0000000 WUXGA 16:10
01D2 1920x1200x16 C0000000 WUXGA 16:10
01D4 1920x1200x32 C0000000 WUXGA 16:10

------------------------------------- 
VBE Modelist Colorfull Geforce GTX295
------------------------------------- 
mode
number xres yres bpp
0100 640x480x8 VGA 4:3
0101 640x480x8 VGA 4:3
0102 800x600x4 SVGA 4:3
0103 800x600x8 SVGA 4:3
0104 1024x768x4 XGA 4:3
0105 1024x768x8 XGA 4:3
0106 1280x1024x4 SXGA 5:4
0107 1280x1024x8 SXGA 5:4
010E 320x200x16 CGA 4:3
010F 320x200x32 CGA 4:3
0111 640x480x16 VGA 4:3
0112 640x480x32 VGA 4:3
0114 800x600x16 SVGA 4:3
0115 800x600x32 SVGA 4:3
0117 1024x768x16 XGA 4:3
0118 1024x768x32 XGA 4:3
011A 1280x1024x16 SXGA 5:4
011B 1280x1024x32 SXGA 5:4
0130 320x200x8 CGA 4:3
0131 320x400x8
0132 320x400x16
0133 320x400x32
0134 320x240x8 QVGA 4:3
0135 320x240x16 QVGA 4:3
0136 320x240x32 QVGA 4:3
013D 640x400x16
013E 640x400x32
0145 1600x1200x8 UXGA 4:3
0146 1600x1200x16 UXGA 4:3
014A 1600x1200x32 UXGA 4:3
0160 1280x800x8 WXGA 16:10
0161 1280x800x32 WXGA 16:10
0162 768x480x8
017B 1280x720x32 
017C 1920x1200x8 WUXGA 16:10
017D 1920x1200x32 WUXGA 16:10
0

If you are using VBE, you should be familiar with the mode list functions 4F00 and 4F01. Use these to find an appropriate custom mode if your BIOS provides such. Otherwise, you might try a higher resolution mode passing in overriding CRTC parameters that constrain the vertical size. No guarantees that that will work, though.

Jester
  • 56,577
  • 4
  • 81
  • 125
  • VBE3's CRCT parameters can only change timing (e.g. refresh rate), and excluding "double scan mode" can't change resolution. Double scan mode halves the resolution. Basically; if bad software mistakenly assumes pixels are square then this won't help as a work-around to fix the bad software. – Brendan May 17 '14 at 02:54
  • Since you can specify `HTotal` and `VTotal`, it should be theoretically possible to change visible resolution too. – Jester May 17 '14 at 10:39
  • With HTotal and VTotal we can only change the position of the resolution for to center the screen in the visible area, but we can not change the resolution with it. – Dirk Wolfgang Glomp May 17 '14 at 14:18