📄 daldef.h
字号:
BOOL bFailNextMode;
// mode DAL returns to the driver as the default mode via DALGetDefaultMode
DEVMODE_INFO sDefaultMode;
// last mode requested by the driver in DALSetMode
DEVMODE_INFO sMode;
// last driver mode requested by the driver
DEVMODE_INFO sLastMode;
// starting offset for the surface of the last requested mode
ULONG ulOffset;
// pitch of the surface for the last requested mode
ULONG ulPitch;
// Count in bytes of memory consumed by the mode on this controller
// when the controller is active, otherwise it is zero.
ULONG ulMemoryUsed;
// array of gamma correction values for the controllers belonging
// to the current driver for desktop modes
DEVCLUT16 aGamma16[256];
// array of gamma correction values for the controllers belonging
// to the current driver to be used with full screen gaming applications
DEVCLUT16 aGameGamma16[256];
} DRIVERDATA, FAR *LPDRIVERDATA;
//
// DAL_DRIVER_MAP - stores the mapping of controllers to a driver, and
// displays mapped to the controllers owned by the driver
//
//
typedef struct _DAL_DRIVER_MAP
{
UCHAR ucControllers;
UCHAR aucDisplayMap[MAX_NUMBER_CONTROLLERS];
} DAL_DRIVER_MAP, FAR *LPDAL_DRIVER_MAP;
//
// DAL_OBJECT_MAP - stores the mapping of controllers to drivers and
// displays to controllers for those drivers
//
typedef struct _DAL_OBJECT_MAP
{
DAL_DRIVER_MAP aDriverMap[MAX_NUMBER_CONTROLLERS];
} DAL_OBJECT_MAP, FAR *LPDAL_OBJECT_MAP;
// DFP bootup behavior, shift used when calculating driver index,
// assumes 5 display bits (CRT, LCD, TV, DFP, DDC) + driver bit. - VG
#define OBJECT_MAP_DRIVER_INDEX_SHIFT MAX_NUMBER_DISPLAYS
typedef struct _CAPTURE_ENGINE
{
BOOL bEnabled;
ULONG ulFrameRate;
ULONG ulVideoWidth;
ULONG ulVideoHeight;
ULONG ulVBIWidth;
ULONG ulVBIHeight;
FIXEDPOINT sAveBWAllocated;
FIXEDPOINT sPeakBWAllocated;
} CAPTURE_ENGINE, FAR *LPCAPTURE_ENGINE;
// structure to contruct DAL rule table.
typedef struct _DALRULEREGISTRY
{
char *RegKey;
ULONG ulORMask;
BOOL bIsDefaultEnabled;
} DALRULEREGISTRY;
typedef struct _DAL_GDOGCO_ADJUSTMENT
{
ULONG ulHook; //defined in dal.h
ULONG ulHookIndex; //HOOK, Or HOOK2
}DAL_GDOGCO_ADJUSTMENT;
// this structure is used for detailed timing format from registry only
// INPUTREGDETAILEDTIMINGINFO is the structure reading from the registry
// REGDETAILTEDTIMINGINFO is the cache structure in DAL storage area.
typedef struct _INPUTREGDETAILTEDTIMINGINFO
{
ULONG ulFlags; // flags to indicate various conditions
ULONG ulHorizontalTotal; // horizontal totol time
ULONG ulHorizontalDisplay; // horizontal address time
ULONG ulHorizontalSyncStart; // horizontal sync start
ULONG ulHorizontalSyncWidth; // horizontal sync time
ULONG ulVerticalTotal; // vertical total time
ULONG ulVerticalDisplay; // vertical address time
ULONG ulVerticalSyncStart; // vertical sync start
ULONG ulVerticalSyncWidth; // vertical sync time
ULONG ulPixelClock; // pixel clock frequency to use
ULONG ulHorizontalOverscanRight; // right overscan width
ULONG ulHorizontalOverscanLeft; // left overscan width
ULONG ulVerticalOverscanBottom; // bottom overscan width
ULONG ulVerticalOverscanTop; // top overscan width
ULONG ulOverscan8B; // 8bpp and blue overscan color
ULONG ulOverscanGR; // green and red overscan color
ULONG ulCRC; // CRC
} INPUTREGDETAILEDTIMINGINFO, FAR *LPINPUTREGDETAILEDTIMINGINFO;
typedef struct _REGDETAILTEDTIMINGINFO
{
ULONG ulFlags;
USHORT usPelsWidth;
USHORT usPelsHeight;
USHORT usDisplayFrequency;
DAL_CRTC_TIMING sDisplayDetailedTiming;
} REGDETAILEDTIMINGINFO, FAR *LPREGDETAILEDTIMINGINFO;
#define BCD2US(b) ((((((LPUCHAR)(b))[0] & 0x0F) \
+ ((((LPUCHAR)(b))[0] >> 4) * 10)) * 100) \
+ ((((LPUCHAR)(b))[1] & 0x0F) \
+ ((((LPUCHAR)(b))[1] >> 4) * 10)))
#define BCD2UL(b) ((BCD2US(&((LPUSHORT)(b))[0]) * 10000) \
+(BCD2US(&((LPUSHORT)(b))[1]) ))
//
// HW_DAL_EXTENSION contains all information specific to a single adapter
// or instance of the DAL.
//
#define DALRULE1_NOTVANDLCDONSAMECONTROLLER 0x00000001L
#define DALRULE1_DISPLAYSCHANGEBOOTDEFAULTMODE 0x00000002L
#define DALRULE1_USEDEVICESELECTEDSCHEME 0x00000004L
#define DALRULE1_DISPLAYSRESTRICTMODES 0x00000008L
#define DALRULE1_RESTRICTUNKNOWNMONITOR 0x00000010L
#define DALRULE1_DDCOVERRIDESPNP 0x00000020L
#define DALRULE1_NOFORCEBOOT 0x00000040L
#define DALRULE1_RESTRICT8BPPON2NDDRV 0x00000080L
#define DALRULE1_DISABLEHTIMECALCULATION 0x00000100L
#define DALRULE1_DISABLEBANDWIDTHCALCULATION 0x00000200L
#define DALRULE1_USELASTSELECTEDSCHEME 0x00000400L
#define DALRULE1_DEFAULTSONPRIMARYONLY 0x00000800L
#define DALRULE1_RESTRICTNONDDCCRTTO640x480 0x00001000L
#define DALRULE1_ALLOWLOWRESAT60FORDDCCRT 0x00002000L
#define DALRULE1_USEENABLEDATBOOTSCHEME 0x00004000L
#define DALRULE1_GETVGAEXPANSIONATBOOT 0x00008000L
#define DALRULE1_SETCRTOVERLCDASDEFAULT 0x00010000L
#define DALRULE1_NOCRTANDLCDONSAMECONTROLLER 0x00020000L
#define DALRULE1_DISABLECWDDEDETECTION 0x00040000L
#define DALRULE1_USECMOSDISPLAYSETTINGS 0x00080000L
#define DALRULE1_NOTVANDCRTONSAMECONTROLLER 0x00100000L
#define DALRULE1_RESTRICTDISPLAYSBASEDONPANELRES 0x00200000L
#define DALRULE1_DONTSHAREMODETABLE 0x00400000L
#define DALRULE1_MOBILEFEATURES 0x00800000L
#define DALRULE1_READDETAILEDTIMINGPERMODE 0x01000000L
#define DALRULE1_SETLCDASDEFAULTDEVICE 0x02000000L
#define DALRULE1_DISABLEMONITORRANGELIMIT 0x04000000L
#define DALRULE1_NOCRTANDTVACTIVESIMULTANEOUSLY 0x08000000L
#define DALRULE1_DISABLEDYNAMICOBJECTMAPUPDATE 0x10000000L
#define DALRULE1_RESEXACTMATCHINEDID 0x20000000L
#define DALRULE1_SAVEPANLOCK 0x40000000L
#define DALRULE1_ONEDISPLAYBOOTDEFAULT 0x80000000L
#define DALRULE2_CRTSUPPORTSALLMODES 0x00000001L
#define DALRULE2_DFPSUPPORTSALLMODES 0x00000002L
#define DALRULE2_LCDSUPPORTSALLMODES 0x00000004L
#define DALRULE2_RESERVED0x00000008L 0x00000008L
#define DALRULE2_DISABLESIZEADJUSTMENT 0x00000010L
#define DALRULE2_DISABLEPOSITIONADJUSTMENT 0x00000020L
#define DALRULE2_DISABLECRTPOSADJUSTIFTVACTIVE 0x00000040L
#define DALRULE2_GETDEFAULTTVFORMATATBOOT 0x00000080L
#define DALRULE2_ADDNATIVEMODESTOMODETABLE 0x00000100L
#define DALRULE2_NOMODECHANGEWITHOVERLAY 0x00000200L
#define DALRULE2_DDC1SUPPORT 0x00000400L
#define DALRULE2_ENABLEDALRESUMESUPPORT 0x00000800L
#define DALRULE2_ENABLEDDC2CWRITEI2CLINE 0x00001000L
#define DALRULE2_DISPLAYLIMITSOSMONITORINFO 0x00002000L
#define DALRULE2_DISPLAYSRESTRICTMODESLOWEST 0x00004000L
#define DALRULE2_DISPLAYSRESTRICTMODESLARGEDESKTOP 0x00008000L
#define DALRULE2_ALLOWNONDDCCRTALLMODESUPTO1600x1200 0x00010000L
#define DALRULE2_DYNAMICBANDWIDTHMODEENUMERATION 0x00020000L
#define DALRULE2_DONOTLOWERVIEW 0x00040000L
#define DALRULE2_DISABLEPOWERPLAYFEATURE 0x00080000L
#define DALRULE2_POWERPLAYOPTIONENABLEDBYDEFAULT 0x00100000L
#define DALRULE2_SETDEFAULTMODETO32BPP 0x00200000L
#define DALRULE2_ANALOGDDCDISPLAYSUPPORTALLREFRESHRATE 0x00400000L
#define DALRULE2_DDC_PROTOCAL1 0x00800000L
#define DALRULE2_GetLCDFakeEDID 0x01000000L
#define DALRULE2_GetTVFakeEDID 0x02000000L
#define DALRULE2_NOCVANDTVACTIVESIMULTANEOUSLY 0x04000000L
#define DALRULE2_ENABLELOG 0x08000000L
#define DALRULE2_NOCRTTVANDDVIACTIVESIMULTANEOUSLY 0x10000000L
#define DALRULE2_ENABLEDALFSDOSTOWINDOWSSELECTION 0x20000000L
#define DALRULE2_DISABLEDISPLAYSWITCHINGIFOVERLAYALLOCATED 0x40000000L
#define DALRULE2_DISABLEDISPLAYSWITCHINGIFDDEXCLUSIVEMODE 0x80000000L
#define DALRULE3_DONOTPERFORMDISPLAYDETECTION 0x00000001L
#define DALRULE3_BOOTUPWITHLCDALWAYSONCRTC1 0x00000002L
#define DALRULE3_POWERPLAYFORCEREFRESHSCREEN 0x00000004L
#define DALRULE3_NOEDIDTOOS 0x00000008L
#define DALRULE3_DONOTVALIDATESVGAMODEWITH1400PANEL 0x00000010L
#define DALRULE3_DONOTUSEEDIDMAXPIXCLK 0x00000020L
#define DALRULE3_DONOTREPORTCUSTOMREFRESHRATE 0x00000040L
#define DALRULE3_FORCELCDONPRIMARYINEXTDESKTOP 0x00000080L
#define DALRULE3_BANDWIDTHMODEENUMERATION 0x00000100L
#define DALRULE3_ENUMDISPLAYSRESTRICTMODES 0x00000200L
#define DALRULE3_MATCHEDIDSBEFOREUSINGOSMONITORINFO 0x00000400L
#define DALRULE3_POWERPLAYDISREGARDDISPLAY 0x00000800L
#define DALRULE3_DFPRESTRICTNONSTANDARDMODE 0x00001000L
#define HDAL_SAVECONNECTED 0x00000001L
#define HDAL_SAVEOBJECTMAP 0x00000002L
#define HDAL_SAVESELECTED 0x00000004L
#define HDAL_SAVESELECTEDOBJECTMAP 0x00000008L
#define HDAL_SAVECURRENTOBJECTMAP 0x00000010L
#define HDAL_SHARINGMODETABLE 0x00000020L
#define HDAL_SAVEPANLOCK 0x00000040L
#define HDAL_INITIALIZING 0x00000080L
#define HDAL_UPDATEDISPLAYSMODESUPPORTED 0x00000100L
#define HDAL_SAVEDISPLAYSRESTRICTMODES 0x00000200L
#define HDAL_SAVEDISPLAYSRESTRICTMODESLOWEST 0x00000400L
#define HDAL_SAVEDISPLAYSRESTRICTMODESLARGEDESKTOP 0x00000800L
#define HDAL_SAVEREFRESHRATE 0x00001000L
#define HDAL_SAVEPOWERPLAYOPTION 0x00002000L
#define HDAL_INTERNALMODECHANGE 0x00004000L
#define HDAL_RESUMING 0x00008000L
#define DAL_PWRSTATEOPTION_POWERPLAYFEATUREENABLE 0x00000001L
#define DAL_PWRSTATEOPTION_LOWERTO16BPP 0x00010000L
typedef struct _HW_DAL_EXTENSION
{
// size of the dal extension structure
ULONG ulSize;
// handle to the DDL's instance for the adapter (on NT this is the
// HW_DEVICE_EXTENSION structure in the miniport).
HDDL hDDL;
LPVOID lpLibVersionString;
// bit vector specifying rules for the dal
ULONG ulDalRule1;
// bit vector specifying rules for the dal
ULONG ulDalRule2;
// bit vector specifying rules for the dal
ULONG ulDalRule3;
// bit flags describing the state of the DAL itself
ULONG ulFlags;
// struct containing the chipID, and pointers to the MMR's and PIO
HW_ASIC_ID hwAsicID;
// amount of video memory on the graphics adapter (constant!)
ULONG ulVideoMemorySize;
// amount of video memory available on the graphics adapter
ULONG ulVideoMemorySizeAvailable;
// specifies how many display drivers are sharing this adapter
ULONG ulDrivers;
// power state of the adapter.
ULONG ulPowerState;
// Keep track of the AMC prot allocation
ULONG ulMultiMediaInfo;
// Read this from the registry (Could be an OEM specific Value)
ULONG ulOptimumFrequency;
// Read from registry number of retries of DDC writes
ULONG ulRetryDDCWriteTimes;
// speficies the number of graphics controllers on the adapter.
ULONG ulControllersCount;
// records a map of controllers to a 0 based index for a driver
ULONG aControllerMap[MAX_NUMBER_CONTROLLERS];
// pointer to the currently selected object mapping for the adapter
LPDAL_OBJECT_MAP lpObjectMap;
// stores the mapping of the driver states given a display mapping
DAL_OBJECT_MAP asDriverObjectMap[MAX_OBJECT_MAP * MAX_NUMBER_CONTROLLERS];
ULONG ulDriverObjectMapCurrentRegistryPage;
// stores the mapping of the active displays on a per driver and controller basis
DAL_OBJECT_MAP asDriverSelectedObjectMap[MAX_OBJECT_MAP * MAX_NUMBER_CONTROLLERS];
ULONG ulDriverSelectedObjectMapCurrentRegistryPage;
// store the mapping for the current session used in last selected scheme
DAL_OBJECT_MAP sCurrentDriverObjectMap;
// records a map of screen surfaces to a 0 based index for the driver
DRIVERDATA aDriverData[MAX_NUMBER_CONTROLLERS];
// array of controller structures and their specific state information
DEVGCO aControllers[MAX_NUMBER_CONTROLLERS];
// bit flag of displays detected as connected
ULONG ulConnectedDisplays;
// bit flag of displays that are hot plggable.
ULONG ulHotPlaggableDisplays;
// bit flag of active displays at boot time.
ULONG ulEnabledAtBootDisplays;
// bit flaf of display indeces selected
ULONG ulSelectedDisplays;
// bit flag of displays selected for bootup (maybe same as ulConnectedDisplays
// or may differ) define by registry rules.
ULONG ulBootDisplaysSelected;
// reports the total number of displays described in aDisplays
ULONG ulDisplaysCount;
ULONG ulDisplays;
ULONG ulEnabledDisplayTypes;
//
RECT sPanLock[MAX_NUMBER_CONTROLLERS];
ULONG aulRefreshRate[MAX_NUMBER_CONTROLLERS];
// array of display structures and their specific state information
DEVGDO aDisplays[MAX_NUMBER_DISPLAYS];
// structure to optimize tracking of enumeration index for CWDDE EnumViewRes
CWDDEMODEENUM sEnumView;
// structure to optimize tracking of enumeration index for CWDDE EnumRefresh
CWDDEMODEENUM sEnumRefresh;
// specifies the number of actual modes in the mode structure
ULONG ulModeCount;
// indicates whether power play feature is supported by the addapter.
BOOL bPowerPlaySupported;
// Number Of Power States (0 is not valid)
ULONG ulNumberOfPowerStates;
// Current power state (0 is not valid state) (1 means default state)
ULONG ulCurrentPowerState;
// Requested power state (0 is not valid state)
ULONG ulRequestedPowerState;
// Options for setting power state
ULONG ulPowerStateOptions;
// Supported power state.
DAL_ADAPTERPOWERSTATES sAdapterPowerStates;
// this is switch to turn ON/OFF bandwidth test
BOOL bEnableBandwidthTest;
BOOL bEnableHTimeTest;
// pointer to array of modes, so DAL can reference the mode list from anywhere,
// including another DAL instance (i.e. for Aurora) [GG] 11/11/99
LPDAL_MODEINFO lpaModes;
// array of modes supported by the adapter and associated objects
DAL_MODEINFO aModes[MAX_DAL_MODES];
// overlay adjustments
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -