亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ddl.c

?? 此代碼為WCE5.0下顯示器的源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
////////////////////////////////////////////////////////////////////////////////////////////
//
//  These are functions that used to be in the miniport but have 
//  now been ported to CE.
//
/////////////////////////////////////////////////////////////////////////////////////////////


#include <windows.h>
#include <ceddk.h>
#include <memory.h>
#include <string.h>
#include <Ndis.h>
 
#include "dal.h"
#include "ltcrt.h"
#include "ltlcd.h"
#include "rprocrtc.h"
#include "rprod.h"
#include "ddl.h"

#define	DRIVER_REGISTRY_STRING	(L"Drivers\\Display\\RageXL")  // also defined in ati.cpp

// Global Variables
PFNGDOENABLE pfnDisplayArray[MAX_NUMBER_DISPLAYS];
PFNGCOENABLE pfnControlArray[MAX_NUMBER_CONTROLLERS];



VOID DDLDebugPrint(ULONG ulDebugLevel, LPCHAR lpDebugMessage, ...)
{
    // Debug output is a pain in the butt in CE so we won't do it.
    return;
}


PFNGDOENABLE* DDLGetDisplayObjects(HDDL hDDL, LPULONG lpulTotalDisplayObjects)
//
//  DESCRIPTION:
//  DDLGetDisplayObjects returns an array of function pointers to the
//  GDOEnable functions of the graphics display objects.
//
//  PARAMETERS:
//  hDDL                    Points to the hardware device extension
//                          structure. This parameter is not used by the
//                          display abstraction layer, but is provided as
//                          a handle uniquely identifying the graphics
//                          adapter for device dependant layer.
//
//  lpulTotalDisplayObjects Pointer to the total number of graphics display
//                          objects.  This value corresponds directly to
//                          the number of GDOEnable function pointers in
//                          the array returned from the function.
//
//  RETURN VALUE:
//   DDLGetDisplayObjects returns an array of function pointers to the
//   GDOEnable functions of the graphics display objects available.  If the
//   function returns a NULL pointer, the DDL observed a fatal error, which
//   will prevent the system from loading successfully.
//
{
    *lpulTotalDisplayObjects = 2;

    // Since this driver is for RageXL only, just hard code the funciton pointers instead of detecting them.
    pfnDisplayArray[0] = CRTEnable;
    pfnDisplayArray[1] = LCDEnable;
    
    return (&(pfnDisplayArray[0]));

}   // DDLGetDisplayObjects()


PFNGCOENABLE*
DDLGetControllerObjects(
    HDDL hDDL,
    LPULONG lpulTotalControllerObjects
    )
//
// DESCRIPTION:
//  DDLGetControllerObjects returns an array of function pointers to the
//  GDOEnable functions of the graphics controller objects.
//
// PARAMETERS:
//  hDDL                    Points to the hardware device extension
//                          structure.  This parameter is not used by the
//                          display abstraction layer, but is provided as
//                          a handle uniquely identifying the graphics
//                          adapter for device dependant layer.
//  lpulTotalControllerObjects  Pointer to the total number of graphics controller
//                          objects.  This value corresponds directly to
//                          the number of GCOEnable function pointers in
//                          the array returned from the function.
//
// RETURN VALUE:
//  DDLGetControllerObjects returns an array of function pointers to the
//  GCOEnable functions of the graphics controller objects available.  If the
//  function returns a NULL pointer, the DDL observed a fatal error, which
//  will prevent the system from loading successfully.
//
{
    // We only return one GCO object.
    *lpulTotalControllerObjects = 1;

    // Fill in the function pointer array.
    pfnControlArray[0] = RageProEnable;

    return (&(pfnControlArray[0]));

}   // DDLGetControllerObjects()


VOID
DDLGetHwAsicID(
    HDDL hDDL,
    LPHW_ASIC_ID lpHwAsicID
    )
//
// DESCRIPTION:
//  Prints the specified debug message.
//
// PARAMETERS:
//  hDDL            Points to the hardware device extension structure.
//                  This parameter is not used by the display abstraction
//                  layer, but is provided as a handle uniquely
//                  identifying the graphics adapter for device dependant
//                  layer.
//
// RETURN VALUE:
//  HW_ASIC_ID structure which includes the ASIC ID, a pointer to IO space,
//  and a pointer to MM space.
//
{
    lpHwAsicID->ulChipFamily         = FAMILY_RAGE_XL;
    lpHwAsicID->ulChipID             = pHwDeviceExtension[gdwMMIndex]->ulConfigChipId;
    lpHwAsicID->ulVRamInstalled      = pHwDeviceExtension[gdwMMIndex]->ulVideoRamSizeInstalled;
    lpHwAsicID->lpIO                 = pHwDeviceExtension[gdwMMIndex]->pvIoBaseAddress;
    lpHwAsicID->lpMMR                = pHwDeviceExtension[gdwMMIndex]->pvAuxBaseAddress;
    lpHwAsicID->lpRomBaseAddress     = pHwDeviceExtension[gdwMMIndex]->pvRomBaseAddress;
    lpHwAsicID->lpFrameBuffer        = (LPVOID)pHwDeviceExtension[gdwMMIndex]->lfbPhysicalAddress.QuadPart;
    lpHwAsicID->ulReferenceFrequency = DDLGetReferenceFreq(hDDL);
}   // DDLGetHwAsicID()


ULONG FAR
DDLGetReferenceFreq(
    HDDL hDDL
    )
//
// DESCRIPTION:
//  Gets the reference frequency out of the BIOS tables.
//
// PARAMETERS:
//  hDDL                Points to the hardware device extension structure.
//
// RETURN VALUE:
//  Reference frequency.
//
{
    MP_BIOS_INFO_TABLE     BiosInfoTable;
    USHORT  usOffset2LpInfoTable;
    //UCHAR   ucIndex;
    ULONG   ulOffset, ulBitSignature;

    if (ReadRomImage(&usOffset2LpInfoTable,
                     BIOS_INFO_TABLE_OFFSET,
                     sizeof(USHORT)) != NO_ERROR)
    {
        goto FAIL_FREQREAD;
    }
	
    //[espiritu] EPR#38035 - Change sizeof from USHORT to ULONG to correct black screen boot in Win2K. 
    if (ReadRomImage(&ulOffset,
                     (ULONG) usOffset2LpInfoTable,
                     sizeof(ULONG)) != NO_ERROR)
    {
        goto FAIL_FREQREAD;
    }

    // This scheme to get Ref Freq is supported in the following ASIC
    ulBitSignature = RAGEXL_BIOS_INFO_TABLE_SIGNATURE;

    if (ulOffset != ulBitSignature)
    {
        return (2950); // Not the right version of bios.
                       // Hard code default reference frequence: 2950.
    }

    if (ReadRomImage(&BiosInfoTable,
                     (ULONG) usOffset2LpInfoTable,
                     sizeof(MP_BIOS_INFO_TABLE)) != NO_ERROR)
    {
        goto FAIL_FREQREAD;
    }

    return ((ULONG)BiosInfoTable.usRefFreq);

FAIL_FREQREAD:
        return (2950); // Not the right version of bios.
                       // Hard code default reference frequence: 2950.
}  // DDLGetReferenceFreq()


DWORD
ReadRomImage(
    PVOID pvDestination,
    ULONG ulRomOffset,
    ULONG ulLength
    )
//
// DESCRIPTION:
//  Searches for a specified string in the video ROM image.
//
// PARAMETERS:
//  pvDestination       Buffer in system memory to store ROM image data.
//  ulRomOffset         Offset into ROM image where we should start reading.
//  ulLength            Number of byte to copy from ROM image.
//
// RETURN VALUE:
//  NO_ERROR    OK.
//
// NOTE:
//  We have to distinguish between VGA-enabled and VGA-disabled adapters (NT 5.0 only).
//  For VGA-enabled adapters ROM image is mapped sparse on Alpha - we must use
//  VideoPortReadRegisterBufferUchar(). For VGA-disabled (NT 5.0 only) the ROM image is in
//  the system memory (mapped dense) - we must dereference pointers directly to have this
//  working on Alpha.
//
{
    MMBAREADBUFFER((PUCHAR)(pHwDeviceExtension[gdwMMIndex]->pvRomBaseAddress), ulRomOffset, pvDestination, ulLength);

    return NO_ERROR;
}   // ReadRomImage()



VOID FAR
DDLSbcToDbc(
    HDDL hDDL,
    LPUCHAR pStringName,
    LPUCHAR lpDoubleByte
    )
//
// DESCRIPTION:
//  Converts a single-byte-character into a double-byte-character.
//
// PARAMETERS:
//  hDDL                Points to the hardware device extension structure.
//
{
    ULONG  i;

    i = 0;
    while (pStringName[i] != 0)
    {
        lpDoubleByte[i<<1] = pStringName[i];
        lpDoubleByte[(i<<1)+1] = 0;
        i++;
    }
    lpDoubleByte[i<<1] = 0;
    lpDoubleByte[(i<<1)+1] = 0;
}  // DDLSbcToDbc()


BOOL
DDLGetRegistryParameters(
    HDDL hDDL,
    LPUCHAR pValueName,
    PVOID pValueData,
    PULONG pulValueLength
    )
//
// DESCRIPTION:
//  DDLGetRegistryParameters reads information from the registry in the
//  DDL specific key.
//
// PARAMETERS:
//  hDDL            Points to the hardware device extension structure.
//                  This parameter is not used by the display abstraction
//                  layer, but is provided as a handle uniquely
//                  identifying the graphics adapter for device dependant
//                  layer.
//  pValueName      Points to a buffer containing a zero-terminated Unicode
//                  string that names the value entry for which data is
//                  being read from the registry.
//  pValueData      Points to a buffer to receive the values from the
//                  registry for the pValueName entry.
//  pulValueLength  Points to the size of the pValueData buffer on input,
//                  and returns the size of the data in pValueData.
//
// RETURN VALUE:
//  The return value is TRUE if the was read from the registry successfully
//  and sufficient buffer space was available in pValueData to return the
//  key value.
//  Otherwise it is FALSE.
//
{
    HKEY hkGDI = NULL;
    DWORD dwSize, dwVal;
    DWORD dwStatus, dwType;
    WCHAR aucDoubleByte[256];

    
    DDLSbcToDbc(hDDL, pValueName, (LPUCHAR)aucDoubleByte);

    dwStatus = RegOpenKeyEx(HKEY_LOCAL_MACHINE, DRIVER_REGISTRY_STRING,
                                              0, 0, &hkGDI);
    if (dwStatus != ERROR_SUCCESS)
    {
        hkGDI = NULL;
        return FALSE;
    }
    else
    {
        dwSize = sizeof(DWORD);
        dwStatus = RegQueryValueEx(hkGDI, (PWSTR)aucDoubleByte, NULL, &dwType,
                                                  (LPBYTE)&dwVal, &dwSize);
        if (dwStatus == ERROR_SUCCESS)
        {
            *((LPBYTE)pValueData) = (BYTE)dwVal;
            pulValueLength = &dwSize;
            RegCloseKey(hkGDI);
            return TRUE;
        }
        else
        {
            RegCloseKey(hkGDI);
            return FALSE;
        }
    }
    
}   // DDLGetRegistryParameters()


BOOL
DDLSetRegistryParameters(
    HDDL hDDL,
    LPUCHAR pValueName,
    PVOID pValueData,
    ULONG ulValueLength)
//
// DESCRIPTION:
//  DDLSetRegistryParameters writes information to the registry in the
//  DDL specific key.
//
// PARAMETERS:
//  hDDL            Points to the hardware device extension structure.
//                  This parameter is not used by the display abstraction
//                  layer, but is provided as a handle uniquely
//                  identifying the graphics adapter for device dependant
//                  layer.
//  pValueName      Points to a buffer containing a zero-terminated Unicode
//                  string that names the value entry for which data is
//                  being read from the registry.
//  pValueData      Points to a buffer containing the values to be written
//                  for the pValueName entry.
//  pValueLength    Points to the size of the data to be written to the
//                  registry.
//
// RETURN VALUE:
//  The return value is TRUE if the was data was written to the registry

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产99久久久久久免费看农村| 777亚洲妇女| 日本免费在线视频不卡一不卡二| 美女视频一区在线观看| 99久久婷婷国产精品综合| 日韩三级免费观看| 亚洲六月丁香色婷婷综合久久 | 国产美女视频91| 色猫猫国产区一区二在线视频| 99热99精品| 一本大道av一区二区在线播放| 日韩美女主播在线视频一区二区三区| 日韩欧美国产一二三区| 欧美电视剧在线看免费| 一区二区三区中文在线| 99久久精品免费看国产免费软件| 一本色道**综合亚洲精品蜜桃冫| www精品美女久久久tv| 中文字幕高清不卡| 亚洲丝袜另类动漫二区| 国产精品91一区二区| 成人爽a毛片一区二区免费| 日韩精品一区二区三区中文精品| 日韩不卡在线观看日韩不卡视频| 91成人在线观看喷潮| 日韩一级大片在线观看| 国产欧美精品一区二区色综合| 久久精品国产网站| 7777精品伊人久久久大香线蕉完整版| 一区二区三区中文字幕精品精品| 秋霞电影网一区二区| 欧美日韩mp4| 日本一区二区免费在线| 亚洲一区二区三区四区中文字幕| 91在线观看一区二区| 中文字幕日韩av资源站| 成人白浆超碰人人人人| 欧美精品日日鲁夜夜添| 亚洲a一区二区| 国产宾馆实践打屁股91| 欧美色图一区二区三区| 亚洲永久精品大片| 欧美在线色视频| 首页亚洲欧美制服丝腿| 欧美一区二区人人喊爽| 亚洲色图第一区| 捆绑调教一区二区三区| 精品国产成人系列| 亚欧色一区w666天堂| 欧美揉bbbbb揉bbbbb| 日韩精品一二三| 精品国产乱码久久久久久老虎| 国产成人在线看| 亚洲欧洲日本在线| 国产综合一区二区| 中文字幕亚洲一区二区va在线| 色噜噜狠狠色综合中国| 国产欧美日韩精品a在线观看| 日韩成人伦理电影在线观看| 欧美成人免费网站| 成人av电影在线网| 丝袜诱惑亚洲看片| 国产欧美日韩精品在线| 欧美日韩一区二区三区在线| 麻豆国产精品777777在线| 国产精品女主播av| 884aa四虎影成人精品一区| 成人小视频在线| 日韩中文字幕亚洲一区二区va在线| 日韩一级片在线播放| 99久久久久久| 自拍偷拍欧美激情| www.av精品| 秋霞成人午夜伦在线观看| 欧美片在线播放| 夫妻av一区二区| 日韩激情一区二区| 91精品国产一区二区三区香蕉| 国产98色在线|日韩| 亚洲va国产天堂va久久en| 国产精品欧美极品| 欧美va天堂va视频va在线| 欧美亚洲综合另类| 国产mv日韩mv欧美| 国产精品大尺度| 91在线视频18| 亚洲一区二区三区自拍| 欧美日韩午夜精品| 不卡影院免费观看| 国内精品嫩模私拍在线| 精品国产一区二区亚洲人成毛片| 一本色道久久综合亚洲91| 亚洲日本在线a| 欧美国产成人精品| 精品粉嫩超白一线天av| 成人综合激情网| 激情综合网最新| 国产精品视频观看| 久久久高清一区二区三区| 91精品欧美综合在线观看最新| 日本高清成人免费播放| 国产v综合v亚洲欧| 国产激情91久久精品导航| 中文字幕一区二区三区色视频 | 麻豆视频观看网址久久| 欧美精品一区二区高清在线观看| 国产乱人伦偷精品视频不卡 | 欧美一区二区视频免费观看| 欧美在线色视频| 欧美探花视频资源| 91麻豆国产香蕉久久精品| 亚洲制服欧美中文字幕中文字幕| 国产精品网站在线观看| 欧美激情综合五月色丁香小说| 国产午夜精品一区二区三区嫩草 | 成人欧美一区二区三区黑人麻豆| 久久久精品日韩欧美| 久久精品视频网| 国产欧美日韩一区二区三区在线观看 | 中文文精品字幕一区二区| 中文一区二区在线观看| 国产精品国产三级国产aⅴ中文| 欧美国产欧美亚州国产日韩mv天天看完整| 成人免费高清在线| 亚洲第一成人在线| 午夜免费欧美电影| 蜜桃久久久久久| 免费欧美日韩国产三级电影| 免费观看在线色综合| 国产在线麻豆精品观看| 国产sm精品调教视频网站| 一区二区三区四区乱视频| 午夜精品一区二区三区免费视频| 午夜精品成人在线视频| 中文字幕中文乱码欧美一区二区| 1024精品合集| 精品国精品自拍自在线| 在线观看日韩精品| 制服丝袜中文字幕一区| 国产99久久久国产精品免费看| 不卡一区二区在线| 欧美日精品一区视频| 不卡免费追剧大全电视剧网站| 91亚洲永久精品| 制服丝袜在线91| 久久亚洲一区二区三区四区| 色偷偷88欧美精品久久久| 欧美日韩亚洲综合一区| 91在线无精精品入口| 欧美精品三级在线观看| 久久久电影一区二区三区| 一区二区三区精品在线| 久久99精品国产麻豆婷婷| 成人综合在线观看| 91精品视频网| ...av二区三区久久精品| 久久精品亚洲国产奇米99| 综合色中文字幕| 中文字幕高清不卡| 免费观看久久久4p| 秋霞午夜av一区二区三区| zzijzzij亚洲日本少妇熟睡| 欧美一区二区三区婷婷月色| 亚洲欧美在线高清| 久久精品国产免费| 欧美三级韩国三级日本一级| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 久久精品久久综合| 午夜精品一区二区三区免费视频 | 国产精品视频九色porn| 日本不卡1234视频| 亚洲va欧美va人人爽午夜| 国产成人在线视频网站| 国产成人av影院| 91.com视频| 亚洲黄色免费电影| 国产成人在线观看| av午夜一区麻豆| 91丨porny丨首页| 一本色道久久综合亚洲aⅴ蜜桃 | 国产亚洲1区2区3区| 天天综合日日夜夜精品| 91网站视频在线观看| 国产亚洲精品中文字幕| 久久成人免费电影| 欧美挠脚心视频网站| 一区二区三区日韩精品视频| 波波电影院一区二区三区| www.av精品| 一本色道**综合亚洲精品蜜桃冫| 久久久精品国产免大香伊| 久久精品国产精品青草| 精品在线视频一区| 国产成人午夜视频| 欧美精品一区二区三区蜜桃| 日本亚洲电影天堂| 国产在线不卡视频| 精品国产一区二区三区av性色| 国产欧美一区二区精品忘忧草| 国产拍揄自揄精品视频麻豆|