VESA BIOS Extensions

VESA BIOS Extensions (VBE) is a VESA standard, currently at version 3, that defines the interface that can be used by software to access compliant video boards at high resolutions and bit depths.

This is opposed to the "traditional" int 10h BIOS calls, which are limited to resolutions of 640×480 pixels with 16 color (4-bit) depth or less.

VBE is made available through the video card's BIOS, which installs during boot up some interrupt vectors that point to itself.

Most newer cards implement the more capable VBE 3.0 standard. Older versions of VBE provide only a real mode interface, which cannot be used without a significant performance penalty from within protected mode operating systems.

Consequently, the VBE standard has almost never been used for writing a video card's drivers; each vendor has thus had to invent a proprietary protocol for communicating with its own video card.

Despite this, it is common that a driver thunk out to the real mode interrupt in order to initialize screen modes and gain direct access to a card's linear frame buffer, because these tasks would otherwise require handling many hundreds of proprietary variations that exist from card to card.

 

VBE mode numbers

Although mode number is a 16-bit value, the optional VBE mode numbers are 14 bits wide. Bit 15 is used by VGA BIOS as a flag to clear or preserve display memory. VBE defined mode numbers as follows:

Bit

Meaning

0–8

Mode numbers. If bit 8 is 1, it is a VESA defined VBE mode.

9-10

Reserved for expansion. Must be set to 0.

11

Refresh rate control Select. If set to 1, use user specified CRTC values for refresh rate, otherwise use BIOS default refresh rate.

12–13

Reserved for VBE/AF. Must be set to 0.

14

Linear/Flat Frame Buffer Select. If set to 1, use linear frame buffer, otherwise use banked frame buffer.

15

Preserve Display Memory Select. If set to 1, preserve display memory, otherwise clear display memory.

 

Starting in VBE/Core 2.0, VESA no longer defines new VESA mode numbers and no longer requires a device to implement the old numbers. To properly detect information of a screen mode, use Function 01h - Return VBE Mode Information.

Mode 81FFh is a special video mode designed to preserve current memory contents and give access to the entire video memory.

 

Modes defined by VESA

Beginning with the VBE 2.0 standard, no new modes will be defined by VESA, and old modes are no longer mandatory. The use of defined modes should be considered deprecated: modern video cards may or may not use these mode numbers (even though most do for backward compatibility), and modern software should not use them. The correct way for software to discover available display modes is to obtain a list of modes (using "Function 00h - Return VBE Controller Information") and then to check each mode (using "Function 01h: Return VBE Mode Information") until it finds the mode/s it requires.

Graphics modes

320×200

640×400

640×480

800×600

1024×768

1280×1024

16-color palette

 

 

 

258 (0102h), 106 (6Ah)

260 (0104h)

262 (0106h)

256-color palette

 

256 (0100h)

257 (0101h)

259 (0103h)

261 (0105h)

263 (0107h)

15-bit (5:5:5)

269 (010Dh)

 

272 (0110h)

275 (0113h)

278 (0116h)

281 (0119h)

16-bit (5:6:5)

270 (010Eh)

 

273 (0111h)

276 (0114h)

279 (0117h)

282 (011Ah)

24-bit (8:8:8)

271 (010Fh)

 

274 (0112h)

277 (0115h)

280 (0118h)

283 (011Bh)

Modes 264–268 are text modes. 264 (0108h) is 80 columns × 60 rows (80×60), 265 (0109h) is 132×25, 266 (010Ah) is 132×43, 267 (010Bh) is 132×50 and 268 (010Ch) is 132×60.

Text modes

Columns

Rows

80

132

25

 

265 (0109h)

43

 

266 (010Ah)

50

 

267 (010Bh)

60

264 (0108h)

268 (010Ch)

 

                    ORG 0x7F00

                    JMP VBE_START

                    NOP

vbei_signature      DD  00H

vbei_version        DW  00H

vbei_oem            DD  00H

vbei_capabilities   DD  00H

vbei_video_modes    DD  00H

vbei_video_memory   DW  00H

vbei_software_rev   DW  00H

vbei_vendor         DD  00H

vbei_product_name   DD  00H

vbei_product_rev    DD  00H

vbei_reserved TIMES 222 DB 00H

vbei_oem_data TIMES 256 DB 00H

 

VBE_START:

                    XOR AX, AX

                    MOV ES, AX

                    MOV DI, 7F04H

                    MOV AX, 4F00H       ; Get VESA mode information

                    INT 10H

                    CMP AX, 004FH

 

                    MOV AX, 4F01H       ; Get VESA mode information

                    MOV CX, 0111H

                    MOV DI, 0500H

                    INT 10H

                    CMP AX, 004FH

 

                    MOV AX, 4F03H       ; Get current VBE mode

                    INT 10H

                    CMP AX, 004FH

                    MOV AX, 4F02H       ; Set VBE mode

                    MOV BX, 0111H + 4000H

                    INT 10H

                    CMP AX, 004FH

(End)

转载于:https://my.oschina.net/dubenju/blog/807538

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值