Share via


Display Drivers and the OS Image

The emulated blit functions are located in a single library called Emul.lib. The display driver links to this library through a link directive during the driver's Sysgen build phase. The GPE library is provided in binary form and links to the driver during the Sysgen build phase.

The ROM Image Builder tool (Romimage.exe) creates OS images. For most of the sample display drivers, the Common.bib file directs Romimage.exe to include the appropriate driver in the OS image, based on the display environment variables selected. The Common.bib file is located in the %_WINCEROOT%\Public\Common\OAK\Files directory.

Each sample display driver is associated with an environment variable of the form BSP_DISPLAY_NAME, for example, BSP_DISPLAY_PERM3 or BSP_DISPLAY_ATI. For each variable set, the associated driver and driver registry information is included in the OS image. Multiple display drivers can be included in the OS image and the correct driver will be loaded based on the hardware detected and the PCI template information in the registry. The following code example shows the PCI template information contained in the DDB5476 Boston platform registry file.

IF BSP_DISPLAY_TVIA5000
; @CESYSGEN IF CE_MODULES_PCI
; GWES will be able to auto-detect the display adapter if a candidate value
; points to the adapter's PCI instance.  Values from Candidate1 to Candidate32
; (decimal) are possible; GWES will examine them sequentially until it finds
; a match.
[HKEY_LOCAL_MACHINE\System\GDI\DisplayCandidates]
        "Candidate2"="Drivers\\BuiltIn\\PCI\\Instance\\TVIA5000"
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PCI\Template\TVIA5000]
    "DisplayDll"="ddi_tvia5.dll"
    "Class"=dword:03
    "SubClass"=dword:00
    "ProgIF"=dword:00
    "VendorID"=dword:10EA
    "DeviceID"=dword:5000
; @CESYSGEN ENDIF CE_MODULES_PCI
ENDIF ; BSP_DISPLAY_TVIA5000

If the display controller found by the PCI bus driver matches the PCI configuration information specified, then the driver instance tree is populated with instance information for this card. When GWES starts, it enumerates the display candidate's list, which contains instance information, by looking for a specific driver to load for that device. If it cannot find a driver with a specific name, it loads the default driver, Ddi.dll.

See Also

Driver Loading Model | PCI Device Support | Platform Building | Display Driver Architecture | Display Driver Extensions | Display Driver Samples

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.