Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Vbe20
1. VESA®
Video Electronics Standards Association
2150NorthFirst Street, Suite 440 Phone: (408) 435-0333
San Jose, CA 95131-2029 FAX: (408) 435-8225
VESA BIOS EXTENSION (VBE)
Core Functions
Standard
Version: 2.0
Document Revision: 1.1
Ratification Date: November 18, 1994
Purpose
Tostandardizeamodular,softwareinterfacetodisplayandaudiodevices. TheVBEinterfaceis
intendedtosimplifyandencouragethedevelopmentofapplicationsthatwishtousegraphics, video, and
audiodeviceswithoutspecificknowledgeoftheinternaloperationoftheevolvingtargethardware.
Summary
TheVBEstandarddefines aset ofextensions totheVGAROMBIOSservices. These functions can
beaccessedunderDOSthroughinterrupt 10h, orbecalleddirectlybyhighperformance32-bit
applicationsandoperatingsystems otherthanDOS.
Theseextensionsalsoprovideahardware-independentmechanismtoobtainvendorinformation, and
serveasanextensiblefoundationforOEMsandVESAtofacilitaterapidsoftwaresupport ofemerging
hardwaretechnologywithoutsacrificingbackwardscompatibility.
VBE Core Standard
4. Page iv VBECOREFUNCTIONSVERSION2.0
DOCUMENTREVISION1.1
SSC/VBE Workgroup Members
Anyindustrystandardrequiresinput frommanysources. Thepeoplelistedbelowweremembers ofthe
VBEWorkgroupoftheSoftwareStandards Committee(SSC)whichwas responsibleforcombiningall
oftheindustryinputintothisproposal:
CHAIRMAN
Kevin Gillett, S-MOS Systems, Inc.,
past chairman, Rod Dewell , Excalibur Solutions
MEMBERS
David Penley, AT&T Global Information Solutions
Rebecca Nolan, Chips and Technologies, Inc.
Brad Haakenson, Cirrus Logic, Inc.
Joe Rickson, Logitech, Inc.
Aaron Leatherman, LSI Logic Corporation
Jake Richter, Panacea Inc.
Raluca Iovan, Phoenix Technologies Ltd.
Kendall Bennett, SciTech Software
Tom Ryan, SciTech Software
George Bystricky, S-MOS Systems, Inc.
Jason Li, Trident Microsystems, Inc.
Chris Tsang, ULSISystems
GregMoore, VideoElectronics Standards Association
Andy Lambrecht, VLSI Technology, Inc.
Rex Wolfe, Western Digital Imaging
5. VBECOREFUNCTIONSVERSION2.0 Page v
DOCUMENTREVISION1.1
Table of Contents
INTELLECTUAL PROPERTY .....................................................................................................................................................iii
TRADEMARKS ...................................................................................................................................................................................iii
PATENTS............................................................................................................................................................................................iii
SUPPORT FORTHISSPECIFICATION...................................................................................................................................iii
SSC/VBE WORKGROUPMEMBERS........................................................................................................................................iv
TABLE OFCONTENTS..................................................................................................................................................................v
1.0INTRODUCTION...................................................................................................................................................................... 1
1.1SCOPE OF THE VBESTANDARD...............................................................................................................................................1
1.2 BACKGROUNDER ........................................................................................................................................................................2
2.0 VBE OVERVIEW......................................................................................................................................................................5
2.1 VBE FEATURES...........................................................................................................................................................................5
2.2 VBE AFFECTEDDEVICES..........................................................................................................................................................5
2.3 PROVIDINGVENDORINFORMATION.......................................................................................................................................5
3.0 VBE MODE NUMBERS...........................................................................................................................................................6
4.0 VBE FUNCTIONS...................................................................................................................................................................10
4.1 VBE RETURN STATUS .............................................................................................................................................................10
4.2 PROTECTED MODE CONSIDERATIONS................................................................................................................................11
4.3 FUNCTION 00H - RETURN VBECONTROLLERINFORMATION.........................................................................................12
4.4 FUNCTION 01H - RETURN VBE MODE INFORMATION ......................................................................................................16
4.5 FUNCTION 02H - SET VBE MODE.........................................................................................................................................25
4.6 FUNCTION 03H - RETURN CURRENT VBE MODE...............................................................................................................26
4.7 FUNCTION 04H - SAVE/RESTORESTATE ............................................................................................................................27
4.8 FUNCTION 05H - DISPLAYWINDOW CONTROL.................................................................................................................27
4.9 FUNCTION 06H - SET/GET LOGICALSCANLINE LENGTH ................................................................................................28
4.10 FUNCTION 07H - SET/GET DISPLAYSTART ......................................................................................................................29
4.11 FUNCTION 08H - SET/GET DAC PALETTE FORMAT........................................................................................................30
4.12 FUNCTION 09H - SET/GET PALETTE DATA.......................................................................................................................30
4.13 FUNCTION 0AH - RETURN VBEPROTECTED MODE INTERFACE ..................................................................................31
5.0VBESUPPLEMENTAL SPECIFICATIONS......................................................................................................................34
5.1 PURPOSEOFSUPPLEMENTAL SPECIFICATIONS ................................................................................................................34
5.2 OBTAININGSUPPLEMENTAL VBEFUNCTIONNUMBERS.................................................................................................34
5.3 REQUIREDVBESUPPLEMENTAL SPECIFICATION COMPONENTS..................................................................................35
5.3.1 VBE Supplemental Specification Functions..............................................................................................................35
5.3.2 Return Status....................................................................................................................................................................35
5.3.3 Subfunction 00h - Return VBE Supplemental Specification Information ............................................................35
5.4 SUPPLEMENTAL SPECIFICATION PROTECTED MODE GUIDELINES..............................................................................38
5.5 LOADINGSUPPLEMENTAL DRIVERS ....................................................................................................................................39
5.6 IMPLEMENTATION QUESTIONS ............................................................................................................................................39
6. Page vi VBECOREFUNCTIONSVERSION2.0
DOCUMENTREVISION1.1
5.7 KNOWN SUPPLEMENTAL SPECIFICATIONS........................................................................................................................40
5.7.1 Function 10h - Power Management Extensions (PM).............................................................................................40
5.7.2 Function 11h - Flat Panel Interface Extensions (FP)..............................................................................................40
5.7.3 Function 12h - Cursor Interface Extensions (CI).....................................................................................................40
5.7.4 Function 13h - Audio Interface Extensions (AI) .......................................................................................................40
5.7.5 Function 14h - OEM Extensions ..................................................................................................................................40
5.7.6 Function 15h - Display Data Channel (DDC) ..........................................................................................................40
5.7.7 Function 16h - Graphics System Configuration (GC).............................................................................................40
APPENDIX1-VBEQUICKREFERENCE................................................................................................................................41
APPENDIX 2 - VBE DATA STRUCTURES..............................................................................................................................47
APPENDIX 3 - VBE SUPPLEMENTAL SPECS. .....................................................................................................................61
APPENDIX4-VBEIMPLEMENTATIONCONSIDERATIONS .........................................................................................63
A4.1 MINIMUM FUNCTIONALITY REQUIREMENTS..................................................................................................................63
A4.1.1 Required VBE Services...............................................................................................................................................63
A4.1.2 Minimum ROM Implementation................................................................................................................................63
A4.1.3 TSR Implementations ..................................................................................................................................................63
A4.2 VGA BIOS IMPLICATIONS....................................................................................................................................................64
A4.3 ROM SPACE LIMITATIONS..................................................................................................................................................65
A4.3.1 Data Storage ................................................................................................................................................................65
A4.3.2 Removal of Unused VGA Fonts .................................................................................................................................65
A4.3.3 Deleting VGA Parameter Tables...............................................................................................................................66
A4.3.4 Increasing ROM Space...............................................................................................................................................66
4.3.5 Support of VGA TTY Functions....................................................................................................................................66
A4.4 IMPLEMENTATION NOTESBY FUNCTION........................................................................................................................67
A4.4.1 General Notes...............................................................................................................................................................67
A4.4.2 Function 00h - Return VBE Controller Information.............................................................................................67
A4.4.3 Function 01h - Return VBE Mode Information......................................................................................................68
A4.4.4 Function 02h - Set VBE Mode...................................................................................................................................68
A4.4.5 Function 03h - Return Current VBE Mode.............................................................................................................69
A4.4.6 Function 05h - Display Window Control................................................................................................................69
A4.4.7 Function 06h - Get/Set Logical Scan Line Length................................................................................................70
A4.4.8 Function 07h - Get/Set Display Start ......................................................................................................................70
A4.4.9 Function 08h - Set/Get DAC Palette Format.........................................................................................................70
A4.4.10 Function 09h - Set/Get Palette Data......................................................................................................................70
A4.4.11 Function 0Ah - Return VBE Function Information..............................................................................................71
A4.5 PLUGANDPLAY ISSUES ........................................................................................................................................................71
A4.6 SUPPORTING MULTIPLE CONTROLLERS..........................................................................................................................71
A4.6.1 Dual-Controller Designs............................................................................................................................................71
A4.6.2 Provision for Multiple Independent Controllers...................................................................................................71
A4.7 DISPLAYREFRESHRATES ANDINTERLACING .................................................................................................................72
A4.8 OEM EXTENSIONSTOVBE ..................................................................................................................................................72
A4.9 CERTIFICATION REQUIREMENTS .......................................................................................................................................73
A4.9.1 VBETest Utility.............................................................................................................................................................73
A4.9.2 Communication with VESA Office............................................................................................................................73
7. VBECOREFUNCTIONSVERSION2.0 Pagevii
DOCUMENTREVISION1.1
APPENDIX5 - APPLICATIONPROGRAMMING CONSIDERATIONS..........................................................................74
A5.1 APPLICATION DEVELOPER'SSAMPLE SOURCE...............................................................................................................74
C Language Module.................................................................................................................................................................74
Assembly Language Module ...................................................................................................................................................84
A5.2 IMPLEMENTATION NOTESBY FUNCTION........................................................................................................................84
A5.2.1 General Notes...............................................................................................................................................................84
A5.2.2 Function 00h - Return VBE Controller Information.............................................................................................84
A5.2.3 Function 01h - Return VBE Mode Information......................................................................................................85
A5.2.4 Function 02h - Set VBE Mode...................................................................................................................................85
A5.2.5 Function 03h - Return Current VBE Mode.............................................................................................................86
A5.2.6 Function 05h - Display Window Control................................................................................................................86
A5.2.7 Function 06h - Get/Set Logical Scan Line Length................................................................................................86
A5.2.8 Function 07h - Get/Set Display Start ......................................................................................................................87
A5.2.9 Function 08h - Set/Get DAC Palette Format.........................................................................................................87
A5.2.10 Function 09h - Set/Get Palette Data......................................................................................................................87
A5.2.11 Function 0Ah - Return VBE Function Information..............................................................................................88
APPENDIX6-DIFFERENCESBETWEENVBE REVISIONS .............................................................................................89
6.1 VBE 1.0................................................................................................................................................................................89
6.2 VBE 1.1................................................................................................................................................................................89
6.3 VBE 1.2................................................................................................................................................................................89
6.4 VBE 2.0................................................................................................................................................................................89
6.5 VBE 2.0, Rev. 1.1................................................................................................................................................................90
APPENDIX7-RELATEDDOCUMENTS.................................................................................................................................93
8. Introduction
VBECOREFUNCTIONSVERSION2.0 Page1
DOCUMENTREVISION1.1
1.0 Introduction
This document contains the VESA BIOS Extension (VBE) specification for standard software access to
graphics displaycontrollers which support resolutions, color depths, and frame buffer organizations
beyond the VGA hardware standard. It is intended for use by both applications programmers and
system software developers.
System software developers may use this document to supplement the System and INT 10h ROM
BIOS functions to provide the VBE services. Application developers can use this document as a guide
to programming all VBE compatible devices.
To understand the VBE specification, some knowledge of 80x86 assembly language and the VGA
hardware registers may be required. However, the services described in this specification may be
called fromanyhigh-level programming language that provides a mechanism for generating software
interrupts with the 80x86 registers set to user-specified values.
In this specification, 'VBE' and 'VBE 2.0' are synonymous with 'VBE Core Functions version 2.0'.
1.1 Scope of the VBE Standard
TheprimarypurposeoftheVESAVBE is toprovidestandardsoftwaresupport forthemanyunique
implementationsofSuperVGA(SVGA)graphicscontrollersonthePCplatformthat providefeatures
beyondtheoriginalVGAhardwarestandard. Thisis toprovideafeasiblemechanismbywhich
applicationdeveloperscantakeadvantageofthisnonstandardhardwareingraphics applications.
TheVBEspecificationoffersanextensiblesoftwarefoundationwhichallowsittoevolveasdisplayand
audiodevicesevolveovertime,withoutsacrificingbackwardsoftwarecompatibilitywitholder
implementations. Newapplicationsoftwareshouldbeabletoworkwitholderhardware, and
applicationsoftwarethathasalreadyshippedshouldworkcorrectlyonnewhardwaredevices.
VBEservicesprovidestandardaccess toall resolutions andcolordepths providedonthedisplay
controller,andreporttheavailabilityanddetailsofallsupportedconfigurationstotheapplicationas
necessary.
VBEimplementationsfacilitatethefieldsupportofaudioanddisplayhardwarebyprovidingthe
applicationsoftwarewiththemanufacturer'snameandtheproductidentificationofthedisplay
hardware.
SincegraphicscontrollerservicesonthePCaretypicallyimplementedinROM, theVBEservices are
definedsothattheyshouldbeimplementedwithinthestandardVGAROM. WhenROM
implementations ofVBEarenot possible, orwhenfieldsoftwareupgrades totheonboardROMare
necessary, theVBEimplementationmaybealsoofferedas adevicedriverorDOSTerminateandStay
Resident(TSR)program.
9. Introduction
Page2 VBECOREFUNCTIONSVERSION2.0
DOCUMENTREVISION1.1
ThestandardVBEfunctions maybesupplementedbyOEM's as necessarytosupport customor
proprietaryfunctionsuniquetothemanufacturer. ThismechanismenablestheOEMtoestablish
functions that maybestandardtotheproduct line, orprovideaccess tospecial hardware
enhancements.
AlthoughpreviousVBEstandardsassumedthattheunderlyinggraphicsarchitecturewas aVGA
device,thedisplayservicesdescribedbyVBE2.0canbeimplementedonanyframebufferoriented
graphicsdevice.
ThemajorityofVBEservicesfacilitatethesetupandconfigurationofthehardware,allowing
applicationshighperformance,directaccesstotheconfigureddeviceatruntime. Tofurtherimprovethe
performanceofflatframebufferdisplaydevicesinextendedresolutions, VBE2.0provides new
memorymodelsthatdonotrequirethetraditionalframebuffer"banking"mechanisms.
VBEis expectedtoworkonall 80x86platforms, inreal and protected modes.
Sincesomemoderndisplaydevicesaredesignedwithout anyVGAsupport, twodisplaycontrollers
maybepresentinthesystem. OnedisplaycontrollerwouldbeusedforVGAcompatibility, andthe
otherusedforgraphicextensionstothebasicVGAmodes, resolutions, andframebuffermodels.
Therefore, VBEmust beableoffertheapplicationautomaticaccess totheappropriatedevicebasedon
themodeorresolutionthat is requestedbytheapplication.
CurrentlybeyondthescopeoftheVBEspecificationisthehandlingofhardwareconfigurationand
installationissues. It was originallyconsideredtobecomepart ofVBE2.0, howeverwehavedeferred
theissuestotheGraphicsConfigurationSupplementalSpecification. Inaddition,itisalsopossiblefor
anOEMtodefinetheirownextensionsusingtheOEMSupplementalSpecificationifrequired.
1.2 Backgrounder
TheIBMVGA1
has becomeadefactostandardinthePCgraphics world. Amultitudeofdifferent
VGAofferingsexistinthemarketplace,eachoneprovidingBIOSorregistercompatibilitywiththeIBM
VGA.MoreandmoreoftheseVGAcompatibleproducts implement various supersets oftheVGA
standard.Theseextensionsrangefromhigherresolutionsandmorecolors toimprovedperformanceand
evensomegraphicsprocessingcapabilities.Intensecompetitionhasdramaticallyimprovedthe
price/performanceratio, tothebenefit oftheenduser.
1
IBM and VGA are trademarks of International Business Machines Corporation.
10. Introduction
VBECOREFUNCTIONSVERSION2.0 Page3
DOCUMENTREVISION1.1
However, several serious problems faceasoftwaredeveloperwhointends totakeadvantageofthese
"SuperVGA"2
environments.Becausethereisnostandardhardwareimplementation, thedeveloperis
facedwithwidelydifferentSuperVGAhardwarearchitecture.Lackingacommonsoftwareinterface,
designingapplicationsfortheseenvironmentsiscostlyandtechnicallydifficult.Exceptforapplications
supportedbyOEM-specificdisplaydrivers, veryfewsoftwarepackages cantakeadvantageofthe
powerandcapabilities ofSuperVGAproducts.
TheVBEstandardwasoriginallyconceivedtoenablethedevelopmentofapplications that wishedto
takeadvantageofdisplayresolutions andcolordepths beyondtheVGAdefinition. Theneedforan
applicationorsoftwarestandardwas recognizedbythedevelopers ofgraphichardwaretoencourage
theuseandacceptanceoftheirrapidlyadvancingproduct families. It becameobvious that themajority
ofsoftwareapplicationdevelopers didnot havetheresources todevelopandsupport customdevice
levelsoftwareforthehundreds ofdisplayboards onthemarket. Thereforetherichnewfeatures of
thesedisplaydeviceswerenotbeingusedoutsideoftherelativelysmall CADmarket, andonlythen
afterconsiderableeffort.
Indeed, theneedforastandardforSVGAdisplayadapters became so important that the VESA
organizationwasformedtoseekout asolution. Theoriginal VBEstandardwas devisedandagreed
uponbyeachoftheactivedisplaycontrollermanufacturers, andhas sincebeenadoptedbyDOS
applicationdeveloperstoenableuseofnon-VGAextendeddisplaymodes.
As timewent alongVBE1.1was createdtoaddmorevideomodes andincreasedlogical line
length/doublebufferingsupport. VBE1.2was createdtoaddmodes andalsoaddedhigh color
RAMDACsupport.
Inthethreeyears sinceVBE1.2was approved we have seen the standard become widelyaccepted
andmanysuccessful programs haveembracedVBE. However, it has becomeobvious that theneed
foramorerobustandextensiblestandardexists. Earlyextensions totheVGAstandardcontinuedusing
alloftheoriginalVGAI/Oportsandframebufferaddresstocommunicatewiththecontroller
hardware. Aswe'veseen,thesupportedresolutions andcolordepths havegrown, intelligent controllers
withBITBLTandLineDrawFunctionshavebecomecommon,andnewflat framebuffermemory
models haveappearedalongwithdisplaycontrollers that arenot basedonVGAinanyway. VBE2.0
andfutureextensionswillsupportnon-VGAbasedcontrollerswithnewfunctionsforreadingand
writingthepaletteandforaccess totheflat framebuffermodels.
2
The term "Super VGA" is used in this document for a graphics display controller implementing any superset of the
standard IBM VGA display adapter.
17. VBEFunctions
Page10 VBECOREFUNCTIONSVERSION2.0
DOCUMENTREVISION1.1
4.0 VBE Functions
Thischapterdescribesindetaileachofthefunctions definedbytheVBEstandard. VBEfunctions are
calledusingtheINT10hinterrupt vector, passingarguments inthe80X86registers. TheINT10h
interrupthandlerfirstdeterminesifaVBEfunctionhas beenrequested, andifso, processes that
request. Otherwisecontrol is passedtothestandardVGABIOSfor completion.
AllVBEfunctionsarecalledwiththeAHregistersetto4FhtodistinguishthemfromthestandardVGA
BIOSfunctions. TheALregisteris usedtoindicatewhichVBEfunctionis tobeperformed. For
supplementalorextendedfunctionalitytheBLregisterisusedwhenappropriatetoindicateaspecific
sub-function.
Functions00h-0FhhavebeenreservedforStandardVBEfunctionnumbers; Functions 10h-FFh are
reservedforVBESupplementalSpecifications.
InadditiontotheINT10hinterface, aProtectedModeInterfaceis availableand is described below.
4.1 VBE Return Status
TheAXregisterisusedtoindicatethecompletionstatus uponreturnfromVBEfunctions. IfVBE
supportforthespecifiedfunctionisavailable,the4FhvaluepassedintheAHregisteronentryis
returnedintheALregister. IftheVBEfunctioncompletedsuccessfully, 00his returnedintheAH
register. OtherwisetheAHregisteris set toindicatethenatureofthefailure.
VBERETURNSTATUS
AL == 4Fh: Functionissupported
AL != 4Fh: Functionisnotsupported
AH == 00h: Functioncallsuccessful
AH == 01h: Functioncallfailed
AH == 02h: Functionisnotsupportedinthecurrenthardwareconfiguration
AH == 03h: Functioncallinvalidincurrentvideomode
Note: Applicationsshouldtreatanynon-zerovalueintheAHregisterasageneral failureconditionas
laterversionsoftheVBEmaydefineadditional errorcodes.
18. VBEFunctions
00hReturnVBEControllerInformation
VBECOREFUNCTIONSVERSION2.0 Page11
DOCUMENTREVISION1.1
4.2 Protected Mode Considerations
VBEservices maybecalleddirectlyfrom32-bit protectedmodeonly.
For32-bit protectedmode, 2selector/segment descriptors for 32-bit code and the data segment are
needed.Thesewillbeallocatedandinitializedbythecaller.Thesegmentlimitfieldswillbeset to64k.
TheseselectorsmayeitherbeintheGDTorLDT, but must bevalidwhenevertheVBEis calledin
protectedmode. Thecallermust supplyastacklargeenoughforusebyVBEandbypotential interrupt
handlers.Thecaller'sstackwillbeactiveiforwheninterrupts areenabledintheVBEroutine, sincethe
VBEwillnotswitchstackswheninterruptsareenabled,includingNMIinterrupts. The32-bit VBE
interfacerequires a32-bit stack.
Ifthememorylocationis zero, thenonlyI/Omappedports will beusedsotheapplicationdoes not
needtodoanythingspecial. This shouldbethedefault caseforALLcards that have I/Omapped
registersbecauseit provides thebest performance.
Ifthememorylocationis nonzero(therecanbeonlyone), theapplicationwill needtocreateanew32-
bitselectorwiththebaseaddressthatpointstothe“physical”locationspecifiedwiththespecifiedlimit.
Whentheapplicationneeds tocall the32-bitbankswitchfunction,itmustthenloadtheES selector
withthevalueofthenewselectorthat has beencreated. Thebankswitchingcodecanthen directly
accessitsmemorymappedregisters as absoluteoffsets intotheESselector
(i.e., mov[es:10],eaxtoput avalueintotheregisterat base+10).
It is uptotheapplicationcodetosaveandrestoretheprevious stateofthe ESselector ifthis is
necessary(forexampleinflat model code).
WhentheVBEservices arecalled, thecurrent I/Opermissionbit mapmust allowaccess tothe I/O
ports that theVBEmayneedtoaccess. This can be found in the Sub-Table (Ports and Memory)
returnedbyVBEFunction0Ah.
Tosummarize,itistheresponsibilityofthecallingtoensuretothat it has theappropriateI/Oand
memoryprivileges, andalargeenoughstackandappropriateselectors allocated. It is alsothe
responsibilityofthecallingapplicationtopreserveregistersifnecessary.
Applicationsmustusethesameregisters fortheFunction05handFunction09hprotectedmode
interfacethattheywoulduseinarealmodecall. This includes theAXregister.
Function07hprotectedmodecalls haveadifferent format.
AX = 4F07h
BL = 00h Set DisplayCRTCStart
= 80h SetDisplayCRTCStart duringVertical Retrace
CX = Bits 0-15ofdisplaystart address
DX = Bits 16-31ofdisplaystart address
19. VBEFunctions
00hReturnVBEControllerInformation
Page12 VBECOREFUNCTIONSVERSION2.0
DOCUMENTREVISION1.1
Theprotectedmodeapplicationmust keeptrackofthecolordepthandscanlinelengthtocalculatethe
newstartaddress. Ifavaluethat is out ofrangeis programmed, unpredictableresults will occur.
4.3 Function 00h - Return VBE Controller Information
Thisrequiredfunctionreturnsthecapabilitiesofthedisplaycontroller,therevisionleveloftheVBE
implementation,andvendorspecificinformationtoassistinsupportingalldisplaycontrollersinthefield.
Thepurposeofthisfunctionistoprovideinformationtothecallingprogramaboutthegeneral
capabilitiesoftheinstalledVBEsoftwareandhardware.Thisfunctionfillsaninformationblockstructure
attheaddressspecifiedbythecaller. TheVbeInfoBlockinformationblocksizeis 256bytes forVBE
1.x, and 512 bytes for VBE2.0.
Input: AX = 4F00h ReturnVBEControllerInformation
ES:DI = Pointertobufferinwhichtoplace
VbeInfoBlockstructure
(VbeSignatureshouldbeset to'VBE2'when
functioniscalledtoindicateVBE2.0information
isdesiredandtheinformationblockis 512bytes in
size.)
Output: AX = VBEReturnStatus
Note: Allotherregisters arepreserved.
Theinformationblockhasthefollowingstructure:
VbeInfoBlockstruc
VbeSignature db 'VESA' ;VBESignature
VbeVersion dw 0200h ;VBEVersion
OemStringPtr dd ? ;PointertoOEMString
Capabilities db 4 dup (?) ;Capabilitiesofgraphicscontroller
VideoModePtr dd ? ;PointertoVideoModeList
TotalMemory dw ? ; Numberof64kbmemoryblocks
; Added for VBE 2.0
OemSoftwareRev dw ? ;VBEimplementationSoftwarerevision
OemVendorNamePtr dd ? ;PointertoVendorNameString
OemProductNamePtr dd ? ; PointertoProduct NameString
OemProductRevPtr dd ? ;PointertoProductRevisionString
Reserved db 222 dup (?) ;ReservedforVBEimplementationscratch
; area
OemData db 256 dup (?) ; DataAreaforOEMStrings
VbeInfoBlockends
20. VBEFunctions
00hReturnVBEControllerInformation
VBECOREFUNCTIONSVERSION2.0 Page13
DOCUMENTREVISION1.1
Note: AlldatainthisstructureissubjecttochangebytheVBEimplementationwhenVBEFunction
00his called. Therefore, it shouldnot beusedbytheapplicationtostoredataofanykind.
DescriptionoftheVbeInfoBlockstructurefields:
The VbeSignaturefieldisfilledwiththeASCIIcharacters'VESA'bytheVBEimplementation.VBE
2.0applicationsshouldpreset this fieldwiththeASCIIcharacters 'VBE2'toindicatetotheVBE
implementationthattheVBE2.0extendedinformationisdesired,andtheVbeInfoBlockis 512bytes in
size. UponreturnfromVBEFunction00h, this fieldshouldalways beset to'VESA'bytheVBE
implementation.
The VbeVersionisaBCDvaluewhichspecifieswhatleveloftheVBEstandardis implementedinthe
software.Thehigherbytespecifiesthemajorversionnumber.Thelowerbytespecifies theminor
versionnumber.
Note: The BCDvalue for VBE2.0 is 0200h and the BCDvalue for VBE1.2 is 0102h. In the past we
havehadsomeapplicationsmisinterpretingtheseBCDvalues. Forexample, BCD0102hwas
interpretedas 1.02, whichis incorrect.
The OemStringPtrisaRealModefarpointertoanullterminatedOEM-definedstring. This stringmay
beusedtoidentifythegraphicscontrollerchiporOEMproduct familyforhardwarespecificdisplay
drivers.Therearenorestrictionsontheformat ofthestring. This pointermaypoint intoeitherROMor
RAM,dependingonthespecificimplementation. VBE2.0BIOSimplementationsmustplacethisstring
intheOemDataareawithintheVbeInfoBlockif'VBE2'is preset intheVbeSignaturefieldonentryto
Function00h. Thismakes it possibletoconvert theRealModeaddress toanoffset withinthe
VbeInfoBlockforProtectedmodeapplications.
Note: ThelengthoftheOEMStringis not defined, but forspaceconsiderations, werecommenda
stringlengthoflessthan256bytes.
The Capabilities fieldindicatesthesupportofspecificfeaturesinthegraphicsenvironment.Thebits
aredefinedasfollows:
D0 = 0 DACisfixedwidth, with6bits perprimarycolor
= 1 DACwidthis switchableto8bits perprimarycolor
D1 = 0 ControllerisVGAcompatible
= 1 ControllerisnotVGAcompatible
D2 = 0 NormalRAMDACoperation
= 1 WhenprogramminglargeblocksofinformationtotheRAMDAC,
usetheblankbitinFunction09h.
D3-31 =Reserved
21. VBEFunctions
00hReturnVBEControllerInformation
Page14 VBECOREFUNCTIONSVERSION2.0
DOCUMENTREVISION1.1
BIOSImplementationNote: TheDACmust always berestoredto 6 bits per primaryas default upon
amodeset. Ifthe DAChas been switched to 8 bits per primary, the mode set must restore the DAC
to6bits perprimarytoensuretheapplicationdeveloperthat he does not have to reset it.
Application Developer's Note: IfaDACis switchable, youcanassume that the DACwill be
restoredto6bits perprimaryupona mode set. For an application to use a DAC, the application
programisresponsibleforsettingtheDACto8bits perprimarymodeusingFunction08h.
VGAcompatibilityisdefinedas supportingall standardIBMVGAmodes, fonts andI/Oports;
however,VGAcompatibilitydoesn't guaranteethat all modes whichcanbeset areVGAcompatible, or
thatthe8x14fontisavailable.
TheneedforD2=1"programtheRAMDACusingtheblankbit inFunction09h"is forolderstyle
RAMDACs,whereprogrammingtheRAMvaluesduringdisplaytimecausesa"snow-like"effect on
thescreen. NewerstyleRAMDACs don't havethis limitationandcaneasilybeprogrammedat any
time,but olderRAMDACs requirethat theybeblankedsoas not todisplaythesnowwhilevalues
changeduringdisplaytime. Thisbitinformsthesoftwarethatitshouldmakethefunctioncallwith
BL=80hratherthanBL=00htoensuretheminimizationofthe"snow-like"effect.
The VideoModePtr points toalist of modenumbers forall displaymodes supported bythe VBE
implementation. Eachmodenumberoccupies oneword(16bits). Thelist ofmodenumbers is
terminatedbya-1(0FFFFh). Themodenumbers inthis list represent all ofthepotentiallysupported
modes bythedisplaycontroller. RefertoChapter3foradescriptionofVESAVBEmode numbers.
VBE2.0BIOSimplementationsmust placethis modelist intheReservedareaoftheVbeInfoBlockor
haveitstaticallystoredwithintheVBEimplementationif'VBE2'ispresetintheVbeSignaturefieldon
entrytoFunction00h.
Note: Itisresponsibilityoftheapplicationtoverifytheactualavailabilityofanymodereturnedbythis
functionthroughtheReturnVBEModeInformation(VBEFunction01h)call.Someofthereturned
modesmaynotbeavailableduetotheactualamountofmemoryphysicallyinstalledonthedisplay
boardorduetothecapabilities oftheattachedmonitor.
Note: IfaVideoModeList is foundtocontainnoentries (starts with0FFFFh), it canbeassumed that
theVBEimplementationisa"stub"implementationwhereonlyFunction00hissupportedfordiagnostic
or"PlugandPlay"reasons. Thesestubimplementations arenot VBE2.0compliant andshouldonlybe
implementedincaseswherenospaceisavailabletoimplementtheentireVBE.
The TotalMemoryfieldindicatesthemaximumamountofmemoryphysicallyinstalledandavailableto
the frame buffer in 64KBunits. (e.g. 256KB= 4, 512KB= 8) Not all video modes can address all
thismemory,seetheModeInfoBlockfordetailedinformationabout theaddressablememoryforagiven
mode.
The OemSoftwareRev fieldisaBCDvaluewhichspecifiestheOEMrevisionlevel oftheVBE
software. Thehigherbytespecifiesthemajorversionnumber.Thelowerbytespecifies theminor
22. VBEFunctions
00hReturnVBEControllerInformation
VBECOREFUNCTIONSVERSION2.0 Page15
DOCUMENTREVISION1.1
versionnumber. ThisfieldcanbeusedtoidentifytheOEM's VBEsoftwarerelease. This fieldis only
filledinwhen'VBE2'ispresetintheVbeSignaturefieldonentrytoFunction00h.
The OemVendorNamePtrisapointerto anull-terminatedstringcontainingthenameofthevendor
whichproducedthedisplaycontrollerboardproduct. (This stringmaybecontainedinthe
VbeInfoBlockortheVBEimplementation.) Thisfieldisonlyfilledinwhen'VBE2'ispresetinthe
VbeSignaturefieldonentrytoFunction00h. (Note: thelengthofthestrings OemProductRev,
OemProductNameandOemVendorName(includingterminators)summed,mustfitwithina256byte
buffer;thisistoallowforreturnintheOemDatafieldifnecessary.)
The OemProductNamePtrisapointerto anull-terminatedstringcontainingtheproduct nameofthe
displaycontrollerboard. (ThisstringmaybecontainedintheVbeInfoBlockortheVBE
implementation.) Thisfieldisonlyfilledinwhen'VBE2'ispresetintheVbeSignaturefieldonentryto
Function00h. (Note: thelengthofthestrings OemProductRev, OemProductNameand
OemVendorName(includingterminators)summed,mustfitwithina256bytebuffer;thisistoallowfor
returnintheOemDatafieldifnecessary.)
The OemProductRevPtrisapointertoanull-terminatedstringcontainingtherevisionormanufacturing
levelofthedisplaycontrollerboardproduct. (This stringmaybecontainedintheVbeInfoBlockorthe
VBEimplementation.) Thisfieldcanbeusedtodeterminewhichproductionrevisionofthedisplay
controllerboardisinstalled. Thisfieldisonlyfilledinwhen'VBE2'ispresetintheVbeSignaturefieldon
entrytoFunction00h. (Note: thelengthofthestrings OemProductRev, OemProductNameand
OemVendorName(includingterminators)summed,mustfitwithina256bytebuffer;thisistoallowfor
returnintheOemDatafieldifnecessary.)
The ReservedfieldisaspacereservedfordynamicallybuildingtheVideoModeListifnecessaryifthe
VideoModeListisnotstaticallystoredwithintheVBEimplementation. Thisfieldshouldnotbeusedfor
anythingelse,andmaybereassignedinthefuture. Applicationsoftwareshouldnot assumethat
informationinthisfieldisvalid.
The OemDatafieldis a256bytedataareathat is usedtoreturnOEMinformation returned byVBE
Function00hwhen'VBE2'ispresetintheVbeSignaturefield. TheOemVendorNamestring,
OemProductNamestringandOemProductRevstringarecopiedintothis areabytheVBE
implementation. ThisareawillonlybeusedbyVBEimplementations 2.0andabovewhen'VBE2'is
presetintheVbeSignaturefield.
26. VBEFunctions
03hReturnCurrentVBE Mode
VBECOREFUNCTIONSVERSION2.0 Page19
DOCUMENTREVISION1.1
D6 = VGAcompatiblewindowedmemorymodeisavailable
0 = Yes
1 = No
D7 = Linearframebuffermodeisavailable
0 = No
1 = Yes
D8-D15 = Reserved
BitD0issettoindicatethatthismodecanbeinitializedinthepresenthardwareconfiguration. This bit is
resettoindicatetheunavailabilityofagraphicsmodeifitrequires acertainmonitortype, morememory
thanisphysicallyinstalled,etc.
BitD1wasusedbyVBE1.0and1.1toindicatethat theoptional informationfollowingthe
BytesPerScanLinefieldwerepresentinthedatastructure. Thisinformationbecamemandatorywith
VBEversion1.2andabove, soD1is nolonger used and should be set to 1. The Direct Color fields
arevalidonlyiftheMemoryModel fieldis set toa6(Direct Color)or 7 (YUV).
BitD2indicateswhetherthevideoBIOShassupport foroutput functions likeTTYoutput, scroll, etc.
inthismode. TTYsupport is recommendedbut not requiredforall extendedtext andgraphicmodes.
Ifbit D2is set to1, thentheINT10hBIOSmust support all ofthestandardoutput functions listed
below.
AllofthefollowingTTYfunctionsmustbesupportedwhenthisbitisset:
01 Set CursorSize
02 SetCursorPosition
06 ScrollTTYwindowuporBlankWindow
07 ScrollTTYwindowdownorBlankWindow
09 Writecharacterandattributeat cursorposition
0A Writecharacteronlyat cursorposition
0E Writecharacter and advance cursor
Bit D3is set toindicatecolormodes, andclearedformonochromemodes.
Bit D4is set toindicategraphics modes, andclearedfortext modes.
Note: Monochromemodes maptheir CRTCaddress at 3B4h. Color modes map their CRTCaddress
at3D4h.Monochromemodeshaveattributesinwhichonlybit 3(video)andbit 4(intensity)ofthe
attributecontrolleroutputaresignificant.Therefore,monochrometextmodeshaveattributesofoff,
video,highintensity,blink,etc.Monochromegraphics modes aretwoplanegraphics modes andhave
attributesofoff,video,highintensity,andblink.Extendedtwocolormodes that havetheirCRTC
address at 3D4h, arecolormodes withonebit perpixel and one plane. The standard VGAmodes, 06h
and11h, wouldbeclassifiedas colormodes, whilethestandardVGAmodes 07h and 0Fh would be
classifiedasmonochromemodes.
27. VBEFunctions
00hReturnVBEControllerInformation
Page20 VBECOREFUNCTIONSVERSION2.0
DOCUMENTREVISION1.1
Bit D5is usedtoindicateifthemodeis compatiblewiththeVGAhardwareregisters andI/Oports. If
this bit is set, thenthemodeis NOTVGAcompatibleandnoassumptions shouldbemadeabout the
availabilityofanyVGAregisters. Ifclear, thenthestandardVGAI/Oports andframebufferaddress
definedinWinASegmentand/orWinBSegmentcanbeassumed.
BitD6isusedtoindicateifthemodeprovides WindowingorBankingoftheframebuffer intothe
framebuffermemoryregionspecifiedbyWinASegmentandWinBSegment. Ifset,thenWindowingof
theframebufferis NOTpossible. Ifclear, thenthedeviceis capableof mappingtheframebufferinto
thesegmentspecifiedinWinASegmentand/orWinBSegment. (Thisbitisusedinconjunctionwithbit
D7,seetablefollowingD7forusage).
BitD7indicatesthepresenceofaLinearFrameBuffermemorymodel. Ifthis bit is set, thedisplay
controllercanbeputintoaflatmemorymodelbysettingthemode(VBEFunction02h)withtheFlat
MemoryModelbitset.(ThisbitisusedinconjunctionwithbitD6, seefollowingtableforusage)
D7 D6
Windowed frame buffer only 0 0
n/a 0 1
Both Windowed and Linear
4 1 0
Linear frame buffer only 1 1
The BytesPerScanLine fieldspecifieshowmanyfullbytesareineachlogicalscanline.Thelogical
scanlinecouldbeequaltoorlargerthanthedisplayedscanline.
The WinAAttributes and WinBAttributes describethecharacteristics oftheCPUwindowingscheme
suchaswhetherthewindowsexistandareread/writeable, as follows:
D0 = Relocatablewindow(s)supported
0 = Singlenon-relocatablewindowonly
1 = Relocatablewindow(s)aresupported
D1 = Windowreadable
0 = Windowis not readable
1 = Windowisreadable
D2 = Windowwriteable
0 = Windowisnotwriteable
1 = Windowiswriteable
D3-D7 = Reserved
4
Use D14 of the Mode Number to select the Linear Buffer on a mode set (Function 02h).
28. VBEFunctions
03hReturnCurrentVBE Mode
VBECOREFUNCTIONSVERSION2.0 Page21
DOCUMENTREVISION1.1
Evenifwindowingis not supported(bit D0=0forbothWindowAandWindowB), then an
applicationcanassumethatthedisplaymemorybufferresidesatthelocationspecifiedby
WinASegmentand/orWinBSegment.
WinGranularityspecifiesthesmallestboundary, inKB, onwhichthewindowcanbeplacedinthe
framebuffermemory.ThevalueofthisfieldisundefinedifBitD0oftheappropriateWinAttributesfield
is not set.
WinSizespecifiesthesizeofthewindowinKB.
WinASegment and WinBSegmentaddress specifythesegment addresses wherethe windows are
located in the CPUaddress space.
WinFuncPtrspecifiesthesegment:offsetoftheVBEmemorywindowingfunction.Thewindowing
functioncanbeinvokedeitherthroughVBEFunction05h,orbycallingthefunctiondirectly.Adirect
callwillprovidefasteraccesstothehardwarepagingregistersthanusingVBEFunction05h, andis
intendedtobeusedbyhighperformanceapplications.Ifthis fieldis NULL, thenVBEFunction05h
mustbeusedtoset thememorywindowwhenpagingis supported. This direct call methoduses the
sameparametersasVBEFunction05hincludingAXandforVBE2.0implementationswillreturnthe
correct ReturnStatus. VBE1.2implementationsandearlier,didnotrequiretheReturnStatus
informationtobereturned. Formoreinformationonthedirect call method, seethenotes inVBE
Function05handthesamplecodeinAppendix5.
The XResolution and YResolutionspecifythewidthandheightinpixelelementsorcharacters forthis
displaymode.Ingraphicsmodes,thesefieldsindicatethenumberofhorizontalandverticalpixelsthat
maybedisplayed.Intextmodes,thesefieldsindicatethenumberofhorizontal andvertical character
positions. Thenumberofpixelpositionsfortextmodesmaybecalculatedbymultiplyingthereturned
XResolutionandYResolutionvaluesbythecharactercellwidthandheightindicatedintheXCharSize
andYCharSizefieldsdescribedbelow.
The XCharSize and YCharSizespecifythesizeofthecharactercellinpixels. This valueis not zero
based(e.g. XCharSizeforMode3usingthe9point font will haveavalue of9).
The NumberOfPlanes fieldspecifiesthenumberofmemoryplanesavailabletosoftwareinthat mode.
Forstandard16-colorVGAgraphics, this would be set to 4. For standard packed pixel modes, the
fieldwouldbeset to 1. For 256-color non-chain-4 modes, where you need to do bankingto address
allpixels,thisvalueshouldbesettothenumberofbanksrequiredtogettoallthepixels (typicallythis
would be 4 or 8).
The BitsPerPixel fieldspecifiesthetotalnumberofbits allocatedtoonepixel. Forexample, astandard
VGA4Plane16-colorgraphics modewouldhavea4inthis fieldandapacked pixel 256-color
graphicsmodewouldspecify8inthisfield.Thenumberofbits perpixel perplanecannormallybe
derivedbydividingtheBitsPerPixelfieldbytheNumberOfPlanesfield.
29. VBEFunctions
00hReturnVBEControllerInformation
Page22 VBECOREFUNCTIONSVERSION2.0
DOCUMENTREVISION1.1
The MemoryModel fieldspecifiesthegeneraltypeofmemoryorganizationusedinthismode. The
followingmodelshavebeendefined:
00h = Textmode
01h = CGAgraphics
02h = Herculesgraphics
03h = Planar
04h = Packedpixel
05h = Non-chain 4, 256 color
06h = DirectColor
07h = YUV
08h-0Fh = Reserved, to be defined byVESA
10h-FFh = To be defined byOEM
VBEVersion1.1andearlierdefinedDirectColorgraphicsmodes withpixel formats 1:5:5:5, 8:8:8, and
8:8:8:8 as aPackedPixel model with16, 24, and32-bits perpixel, respectively. In VBEVersion 1.2
andlater, theDirect Colormodes usetheDirect Colormemorymodel andusetheMaskSize and
FieldPositionfieldsoftheModeInfoBlocktodescribethepixelformat.BitsPerPixelisalways definedto
bethetotalmemorysizeofthepixel, inbits.
NumberOfBanks.Thisisthenumberofbanksinwhichthescanlines aregrouped. Thequotient from
dividingthescanlinenumberbythenumberofbanksisthebankthatcontains thescanlineandthe
remainderisthescanlinenumberwithinthebank. Forexample, CGAgraphics modes havetwobanks
andHercules graphics modehas fourbanks. Formodes that don't havescanlinebanks (suchas VGA
modes 0Dh-13h), this fieldshouldbeset to 1.
The BankSize fieldspecifies thesizeofabank(groupofscanlines)inunits of1KB. For CGAand
Hercules graphics modes this is 8, as eachbankis 8192bytes inlength. For modes that do not have
scanlinebanks (suchas VGAmodes 0Dh-13h), this fieldshouldbeset to0.
The NumberOfImagePages fieldspecifiesthe"totalnumberminusone(-1)"ofcompletedisplay
imagesthatwillfitintotheframebuffermemory.Theapplicationmayloadmorethanoneimageintothe
framebuffermemoryifthisfieldisnon-zero,andmovethedisplaywindowwithineachofthosepages.
Thisshouldonlybeusedfordeterminingtheadditionaldisplaypageswhichareavailabletothe
application;todeterminetheavailableoffscreenmemory,usetheOffScreenMemOffset and
OffScreenMemSizeinformation.
Note: IftheModeInfoBlockis foranIBMStandardVGAmodeandtheNumberOfImagePages field
containsmorepagesthanwouldbefoundina256KBimplementation, theTTYsupport describedin
theModeAttributes must beaccurate. i.e., iftheTTYfunctions areclaimedtobesupported, theymust
besupportedinallpages,notjustthepagesnormallyfoundinthe256KBimplementation.