Planar DX/PCI User Manual

Display controller
Hide thumbs Also See for DX/PCI:
Table of Contents

Advertisement

Quick Links

Dome
Display Controllers
®
DX/PCI, M2/PCI, RX/PCI
PRODUCT DEVELOPER'S GUIDE
Windows XP
Windows 2000
Windows NT 4.0
Solaris 2.x
www.planar.com

Advertisement

Table of Contents
loading

Summary of Contents for Planar DX/PCI

  • Page 1 Dome Display Controllers ® DX/PCI, M2/PCI, RX/PCI PRODUCT DEVELOPER’S GUIDE Windows XP Windows 2000 Windows NT 4.0 Solaris 2.x www.planar.com...
  • Page 2 June 2002 DOME is a registered trademark and Calibration TQA, DIMPL, DimplX, M2/PCI, RX/PCI, and DX/PCI are trademarks of DOME imaging systems, inc. Microsoft, Windows, and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or in other countries.
  • Page 3: Table Of Contents

    Contents About This Guide Board Architecture DX/PCI Board Architecture M2/PCI Board Architecture RX/PCI Board Architecture Gamma Correction and the 10-Bit DAC Gamma correction Accessing the gamma correction tables Dynamic-Link Library DLL Data Types DOME types Windows types and structures Windows NT DLL...
  • Page 4 iv | Contents DLL Functions DGetDriverVersion DGetDriverVersionMM DGetLibraryVersion DGetBoardType DGetBoardTypeMM DGetNumBoards DGetNumScreens DGetMaxScreens DGetScreenDimensions DGetScreenPlacement DSetBrightness DGetBrightness DSetContrast DGetContrast DGetNumGCTBits DGetNumGCTBitsMM DGetNumGDIBits DGetNumGDIBitsMM DGetSisterDisplayRegPathMM DGetSisterDisplayNumberMM DDirectBlt DGetPaletteTypeMM DSetGCT DGetGCT DSetStartupGCT DCancelStartupGCT DGetRefreshRate DGetRefreshRateMM DCalibratorInit DCalibratorMeasure DGetFtLamScale DSerialCmd...
  • Page 5 DOME MDlib API Function Reference MDlib API Types MDlib API Structures DMdVersion Structure DMdCopyRect Structure DMdFillRect Structure DMdDev Structure MDlib API Functions DMdOpen DMdFdOpen Close RefreshRate FbVideo MapFb UnmapFb FbSize FbWidth FbHeight FbPitch FbType BitsPerPixel CopyRects FillRects InitCmap WriteCmap UpdateCmap ReadCmap InitGCT WriteGCT...
  • Page 7: About This Guide

    About This Guide The Product Developer’s Guide describes the architecture of the DOME DX/PCI™, M2/PCI™, and RX/PCI™ display controllers (boards), as well as the data types and functions specific to DOME and Windows types and structures used in the dynamic-link library and to the MDlib API types and structures for Solaris.
  • Page 8 viii | About This Guide Conventions This documentation uses the conventions shown in this table. This convention... Monospaced type Italic type Bold type File -> Open <Key> Indicates... Computer code or directory; backslash (\) indicates continuation of the previous line of ®...
  • Page 9 DOME MDlib API Function Reference (Solaris) About This Guide | ix Provides… • Architecture drawings for the DX/PCI, M2/PCI, and RX/PCI boards • An explanation of gamma correction and 10-bit DACs • Detailed descriptions of the data types and functions of the DOME DLL for Windows operating systems •...
  • Page 10: Related Documentation

    | About This Guide Related Documentation For more information about your board or related DOME products, refer to these books: • DX/PCI Display Controller Installation Guide • M2/PCI Display Controller Installation Guide • RX/PCI Display Controller Installation Guide • Calibration TQA User’s Guide...
  • Page 11: Board Architecture

    Board Architecture In This Chapter • DX/PCI Board Architecture • M2/PCI Board Architecture • RX/PCI Board Architecture • Gamma Correction and the 10-Bit DAC...
  • Page 12: Dx/Pci Board Architecture

    2 | Board Architecture DX/PCI Board Architecture The DX/PCI™ display controller (board) is a single- or dual-headed, 8-bit framebuffer with an 8-bit digital interface. The figure below shows these significant features of the board architecture: • A highly optimized PCI local bus that provides 32-bit or...
  • Page 13: M2/Pci Board Architecture

    M2/PCI Board Architecture The M2/PCI™ display controller (board) is a single- or dual-headed, 8-bit framebuffer with a 10-bit DAC (digital-to-analog converter). The figure below shows these significant features of the board architecture: • A highly optimized PCI local bus that provides 64-bit, 66 MHz transfers at speeds exceeding 500 MB per second •...
  • Page 14: Rx/Pci Board Architecture

    4 | Board Architecture RX/PCI Board Architecture The RX display controller is a dual-headed, 8-bit frame- buffer with a 10-bit DAC. The figure below shows these significant features of the board architecture: • A highly optimized PCI local bus that provides 64-bit, 66 MHz transfers at speeds exceeding 500 MB per second •...
  • Page 15: Gamma Correction And The 10-Bit Dac

    Gamma Correction and the 10-Bit DAC | 5 Gamma Correction and the 10-Bit DAC All DOME display controllers use a 10-bit DAC in their video output circuitry. Nearly all competitive display boards use 8-bit DACs. The DAC converts the digital image data stored in the board’s video memory to an analog signal that drives the...
  • Page 16: Accessing The Gamma Correction Tables

    6 | Board Architecture The 10-bit DAC on the DOME boards can produce up to 1024 distinct analog values. Thus, the board can perform gamma correction and send 256 distinct pixel values to the display, to produce a truer, more accurate grayscale image. The flat-panel method is somewhat different but still allows more than 256 display value.
  • Page 17: Dynamic-Link Library

    Dynamic-Link Library In This Chapter • DLL Data Types • Windows NT DLL • Windows 2000 DLL • Using Functions in Multi-Monitor and Windows NT 4.0-Compatible Modes • Specific Functions for Windows 2000 in the DLL • DLL Functions...
  • Page 18: Dll Data Types

    8 | Dynamic-Link Library DLL Data Types mdpcint functions that provide an application interface to specific driver functionality. This section describes the data types specific to DOME and the Windows types and structures used in the DLL. DOME types The standard C types of different things to different compilers.
  • Page 19: Windows Nt Dll

    Windows NT DLL | 9 Windows NT DLL All DOME Windows drivers include the mdpcint.dll library. This DLL provides an application interface to the driver. ® When you work in Windows NT 4.0-compatible mode, use only those functions without the MM suffix. Other functions listed in this chapter are not available for the Windows NT operating system;...
  • Page 20: Windows 2000 Dll

    10 | Dynamic-Link Library Windows 2000 DLL All DOME Windows drivers include the This DLL provides an application interface to the driver. The Windows from previous versions of the DLL. For example, the new version of does not run on the Windows NT 4.0 operating system. But, given a Windows NT 4.0-compatible screen configuration, programs written for Windows NT 4.0 will work unchanged under Windows 2000 with the new DLL.
  • Page 21 Full Windows NT 4.0-compatible mode A system that is fully compatible with the Windows NT 4.0 operating system meets these criteria: • All screens are driven by the same type of DOME board, all at the same resolution. • All screens combine to make a rectangle with no gaps. •...
  • Page 22: Changing Displays In The Windows 2000 Virtual Desktop

    12 | Dynamic-Link Library Multi-monitor mode Multi-monitor mode works with any Windows 2000 or Windows XP desktop. Multi-monitor mode includes these features: • One system can include both DOME and other brands of boards. • One system can run different DOME board types simultaneously.
  • Page 23: Using Functions In Multi-Monitor And Windows Nt 4.0-Compatible Modes

    Using Functions in Multi-Monitor and Windows NT 4.0-Compatible Modes | 13 Using Functions in Multi-Monitor and Windows NT 4.0-Compatible Modes Multi-monitor and the Windows NT 4.0-compatible modes treat functions differently depending on the function’s parameters. This section describes how functions work in these modes.
  • Page 24: Using Functions That Do Not Include Hdc And Screen-Number Parameters

    14 | Dynamic-Link Library Example WIN2K_DISPLAY_NUMBER This code sample shows how to cast the display number in the DLL: nDisplay = (UWORD) Win2000DisplayNum | Using functions that do not include HDC and screen-number parameters Functions that did not previously include a screen-number parameter are obsolete in multi-monitor mode.
  • Page 25: Specific Functions For Windows 2000 In The Dll

    Specific Functions for Windows 2000 in the DLL These functions exist only in multi-monitor mode and are only available in the Windows 2000 DLL: • DGetPaletteTypeMM • DGetSisterDisplayRegPathMM • DGetSisterDisplayNumberMM A sister display is one of two displays being driven by the same DOME board.
  • Page 26: Dll Functions

    16 | Dynamic-Link Library DLL Functions Use the DLL functions described in this section to write applications. The functions are listed logically; for example, DSetGCT For a description of this function… DGetDriverVersion DGetDriverVersionMM DGetLibraryVersion DGetBoardType DGetBoardTypeMM DGetNumBoards DGetNumScreens DGetMaxScreens DGetScreenDimensions DGetScreenPlacement DSetBrightness DGetBrightness...
  • Page 27 For a description of this function… DGetNumGCTBits DGetNumGCTBitsMM DGetNumGDIBits DGetNumGDIBitsMM DGetSisterDisplayRegPathMM DGetSisterDisplayNumberMM DDirectBlt DGetPaletteTypeMM DSetGCT DGetGCT DSetStartupGCT DCancelStartupGCT DGetRefreshRate DGetRefreshRateMM DCalibratorInit DCalibratorMeasure DGetFtLamScale DSerialCmd DLL Functions | 17 Go to page…...
  • Page 28: Dgetdriverversion

    18 | DGetDriverVersion DGetDriverVersion (Windows NT, Windows 2000 full Windows NT 4.0 compatible mode) Purpose Use DGetDriverVersion the DOME Windows driver. Syntax DWORD DGetDriverVersion (hdc, lpwDriverVersion) Parameter Type Name UWORD FAR * Return value – zero (0) if function completed successfully; DWORD otherwise, operating system error code.
  • Page 29: Dgetdriverversionmm

    DGetDriverVersionMM (Windows 2000, multi-monitor mode only) Purpose Use DGetDriverVersionMM DOME Windows driver for your board. Syntax DWORD DGetDriverVersionMM (hdc, nDisplay, lpDriverVersion) Parameter Type UWORD UWORD FAR * Return value DWORD – otherwise, operating system error code. to return the version of the Name nDisplay lpDriverVersion...
  • Page 30 20 | DGetDriverVersionMM Example This example returns the driver version in #include <mdpcint.h> UWORD WIN2K_DISPLAY_NUMBER; DWORD UWORD dwRetCode = DGetDriverVersionMM (NULL, nDisplay, &DriverVersion); return dwRetCode; Or, for attached or unattached display 2: DEVMODE dmMode; HDC hdc; /* Fill in relevant parts of dmMode */ hdc = CreateDC (“DISPLAY”, “\\\\.\\DISPLAY2”, NULL, &dmMode);...
  • Page 31: Dgetlibraryversion

    DGetLibraryVersion (Windows NT, Windows 2000 full Windows NT 4.0-compatible mode) Purpose Use DGetLibraryVersion DOME Windows DLL. Syntax DWORD DGetLibraryVersion (lpwLibraryVersion) Parameter Type UWORD FAR * Return value DWORD – otherwise, operating system error code. Example This example returns the library version in wLibraryVersion #include <mdpcint.h>...
  • Page 32: Dgetboardtype

    22 | DGetBoardType DGetBoardType (Obsolete in multi-monitor mode, partial Windows NT 4.0-compatible mode) Purpose Use DGetBoardType Syntax DWORD DGetBoardType (hdc, lpwBoardType) Parameter Type UWORD FAR * Return value DWORD – otherwise, operating system error code. to return the board type. Name Description Handle to the display-device...
  • Page 33 Example This example returns the board type. #include <mdpcint.h> /* has board definitions */ hdc; UWORD wBoardType; DWORD dwRetCode; dwRetCode = DGetBoardType (hdc, &wBoardType); return dwRetCode; See also DGetNumBoards DGetBoardType | 23...
  • Page 34: Dgetboardtypemm

    24 | DGetBoardTypeMM DGetBoardTypeMM (Windows 2000, multi-monitor mode only) Purpose Use DGetBoardTypeMM Syntax DWORD DGetBoardTypeMM (hdc, nDisplay, lpwretType) Parameter Type UWORD UWORD FAR * Return value DWORD – otherwise, operating system error code. to return the board type. Name nDisplay retType zero (0) if function completed successfully;...
  • Page 35 Example This example returns the board type. #include <mdpcint.h> hdc; UWORD nDisplay = (UWORD) Win2000DisplayNum | WIN2K_DISPLAY_NUMBER; DWORD dwRetCode; UWORD retType; dwRetCode = DGetBoardTypeMM (NULL, nDisplay, &retType); return dwRetCode; See also DGetNumBoards DGetBoardTypeMM | 25...
  • Page 36: Dgetnumboards

    26 | DGetNumBoards DGetNumBoards (Obsolete in Windows 2000) Purpose Use DGetNumBoards your system. Syntax DWORD DGetNumBoards (hdc, lpwNumBoards) Parameter Type UWORD FAR * Return value DWORD – otherwise, operating system error code. See also DGetBoardType to return the number of DOME boards in Name Description Handle to the display-device...
  • Page 37: Dgetnumscreens

    DGetNumScreens Purpose Use DGetNumScreens controlled by the DOME Windows driver. Syntax DWORD DGetNumScreens (hdc, lpwNumScreens) Parameter Type UWORD FAR * Return value DWORD – otherwise, operating system error code. Example This example returns the number of screens controlled by DOME Windows drivers. #include <mdpcint.h>...
  • Page 38: Dgetmaxscreens

    28 | DGetMaxScreens DGetMaxScreens (Obsolete in Windows 2000) Purpose Use DGetMaxScreens screens controlled by the DOME Windows driver. Syntax DWORD DGetMaxScreens (hdc, lpwNumScreens) Parameter Type UWORD FAR * Return value DWORD – otherwise, operating system error code. Example This example returns the maximum number of screens controlled by the DOME Windows driver.
  • Page 39: Dgetscreendimensions

    DGetScreenDimensions Purpose Use DGetScreenDimensions a single screen. Syntax DWORD DGetScreenDimensions (hdc, wScreenNumber, lpszSize) Parameter Type UWORD SIZE FAR * Return value DWORD – otherwise, operating system error code. Structure This code fragment defines the typedef struct LONG cx; LONG cy; } SIZE;...
  • Page 40 30 | DGetScreenDimensions Example This example returns the dimensions of screen zero (0). #include <windows.h> /* includes SIZE #include <mdpcint.h> SIZE DWORD dwRetCode = DGetScreenDimensions (hdc, 0, &szSize); return dwRetCode; Or, in Windows 2000 mode: dwRetCode = DGetScreenDimensions (NULL, WIN2K_DISPLAY_NUMBER | 0, &szSize); Or, in Windows 2000 mode with an unattached display: dwRetCode = DGetScreenDimensions (hdc, WIN2K_DISPLAY_NUMBER, &szSize);...
  • Page 41: Dgetscreenplacement

    DGetScreenPlacement Purpose Use DGetScreenPlacement screen in Windows space. Syntax DWORD DGetScreenPlacement (hdc, wScreenNumber, lpptPoint) Parameter Type UWORD POINT FAR * Return value DWORD – otherwise, operating system error code. This function returns an error for unattached displays. Structure This code fragment defines the typedef struct LONG x;...
  • Page 42 32 | DGetScreenPlacement Example This example returns the x,y position of screen one (1) in the Windows desktop. #include <windows.h> /* includes POINT definition */ #include <mdpcint.h> POINT DWORD dwRetCode = DGetScreenPlacement (hdc, 1, &ptPosition); return dwRetCode; See also DGetNumScreens, DGetScreenDimensions, DGetRefreshRate, DGetRefreshRateMM hdc;...
  • Page 43: Dsetbrightness

    DSetBrightness (Available for flat panel only) Purpose Use DSetBrightness Syntax DWORD DSetBrightness (hdc, nDisplay, Brightness) Parameter Type UWORD DWORD Return value DWORD – otherwise, operating system error code. Example This example sets the brightness of the panel. #include <mdpcint.h> UWORD WIN2K_DISPLAY_NUMBER;...
  • Page 44: Dgetbrightness

    34 | DGetBrightness DGetBrightness (Available for flat panel only) Purpose Use DGetBrightness setting of the flat panel. Syntax DWORD DGetBrightness (hdc, nDisplay, pBrightness) Parameter Type UWORD DWORD FAR * Return value DWORD – otherwise, operating system error code. Example This example returns the brightness of a panel. #include <mdpcint.h>...
  • Page 45: Dsetcontrast

    DSetContrast (Available for flat panel only) Purpose Use DSetContrast Syntax DWORD DSetContrast (hdc, nDisplay, Contrast) Parameter Type UWORD DWORD Return value DWORD – otherwise, operating system error code. Example This example sets the contrast of a panel. #include <mdpcint.h> UWORD WIN2K_DISPLAY_NUMBER;...
  • Page 46: Dgetcontrast

    36 | DGetContrast DGetContrast (Available for flat panel only) Purpose Use DGetContrast the flat panel. Syntax DWORD DGetContrast (hdc, nDisplay, pContrast) Parameter Type UWORD DWORD FAR * Return value DWORD – otherwise, operating system error code. Example This example returns the contrast of a panel. #include <mdpcint.h>...
  • Page 47: Dgetnumgctbits

    DGetNumGCTBits (Windows NT, Windows 2000 full Windows NT 4.0 compatible mode) Purpose Use DGetNumGCTBits correction bits. Syntax DWORD DGetNumGCTBits (hdc, lpNumRedBits, lpNumGreenBits, lpNumBlueBits) Parameter Type DWORD FAR * Return value DWORD – otherwise, operating system error code. Example This example returns the number of gamma correction bits. #include <mdpcint.h>...
  • Page 48: Dgetnumgctbitsmm

    38 | DGetNumGCTBitsMM DGetNumGCTBitsMM (Windows 2000, multi-monitor mode only) Purpose Use DGetNumGCTBitsMM correction bits. Syntax DWORD DGetNumGCTBitsMM (hdc, nDisplay, lpNumRedBits, lpNumGreenBits, lpNumBlueBits) Parameter Type UWORD DWORD FAR * Return value DWORD – otherwise, operating system error code. Example This example returns the number of gamma correction bits. #include <mdpcint.h>...
  • Page 49: Dgetnumgdibits

    DGetNumGDIBits (Windows NT, Windows 2000 full Windows NT 4.0 compatible mode) Purpose Use DGetNumGDIBits Windows GDI (graphical device interface) bits. Syntax DWORD DGetNumGDIBits (hdc, lpNumRedBits, lpNumGreenBits, lpNumBlueBits) Parameter Type DWORD FAR * Return value DWORD – otherwise, operating system error code. Example This example returns the number of GDI bits.
  • Page 50: Dgetnumgdibitsmm

    40 | DGetNumGDIBitsMM DGetNumGDIBitsMM (Windows 2000, multi-monitor mode only) Purpose Use DGetNumGDIBitsMM Windows GDI bits. Syntax DWORD DGetNumGDIBitsMM (hdc, nDisplay, lpNumRedBits, lpNumGreenBits, lpNumBlueBits) Parameter Type UWORD DWORD FAR * Return value DWORD – otherwise, operating system error code. to return the number of Name nDisplay lpNumRedBits...
  • Page 51 Example This example returns the number of GDI bits. #include <mdpcint.h> hdc; UWORD nDisplay; DWORD dwRetCode; DWORD NumRedBits, NumGreenBits, NumBlueBits; dwRetCode = DGetNumGDIBitsMM (NULL, nDisplay, &NumRedBits, &NumGreenBits, &NumBlueBits); return dwRetCode; See also DGetScreenDimensions, DGetNumGCTBitsMM DGetNumGDIBitsMM | 41...
  • Page 52: Dgetsisterdisplayregpathmm

    42 | DGetSisterDisplayRegPathMM DGetSisterDisplayRegPathMM (Windows 2000, multi-monitor mode only) Purpose Use DGetSisterDisplayRegPathMM path of the Windows 2000 sister display. Syntax DWORD FAR PASCAL DGetSisterDisplayRegPathMM (hdc, nDisplay, *lpRegPath, szRegPath) Parameter Type UWORD char FAR Return value Zero (0) if successful; otherwise, an error message. Example This example returns the registry path of the sister display to the target display.
  • Page 53: Dgetsisterdisplaynumbermm

    DGetSisterDisplayNumberMM (Windows 2000, multi-monitor mode only) Purpose Use DGetSisterDisplayNumberMM Windows 2000 display number of the sister display. Syntax DWORD FAR PASCAL DGetSisterDisplayNumberMM (hdc, nDisplay, lpDisplayNum) Parameter Type UWORD UWORD FAR Return value Zero (0) if successful; otherwise, an error message. Example This example returns the Windows 2000 display number of the sister display.
  • Page 54: Ddirectblt

    44 | DDirectBlt DDirectBlt (Obsolete in Windows 2000) Purpose Use DDirectBlt from the host to the screen(s). Syntax DWORD DDirectBlt (hdc, DestX, DestY, SrcX, SrcY, Width, Height, SrcStride, lpSrc) Parameter Type void * to provide a direct transfer of image data Name Description Handle to the display-device...
  • Page 55 When you use SrcX + Width bounds of the source image. Otherwise, you risk a system memory access error. Return value zero (0) if function completed successfully; DWORD – otherwise, operating system error code. Example This example transfers image data from the host to the screen.
  • Page 56: Dgetpalettetypemm

    46 | DGetPaletteTypeMM DGetPaletteTypeMM (Windows 2000, multi-monitor mode only) Purpose Use DGetPaletteTypeMM the Windows 2000 display. Syntax DGetPaletteTypeMM (hdc, nDisplay, lppalType) Parameter Type UWORD UWORD FAR Return value Zero (0) if successful; otherwise, an error message. Example This example returns the palette type of the display. #include <mdpcint.h>...
  • Page 57: Dsetgct

    DSetGCT Purpose Use DSetGCT Syntax DWORD DSetGCT (hdc, wScreenNumber, lpgct) Parameter Type UWORD GAMMA_ CORRECTION_ TABLE FAR * Return value DWORD – otherwise, operating system error code. Grayscale boards use green values only. to set the GCT for a particular screen. Name wScreenNumber zero (0) if function completed successfully;...
  • Page 58 48 | DSetGCT Structure This code fragment defines the only valid structure for the GAMMA_CORRECTION_TABLE typedef struct UWORD Reserved1; UWORD Reserved2; UWORD ArraySize; UWORD Red[256]; UWORD Green[256]; UWORD Blue[256]; } GAMMA_CORRECTION_TABLE; DSetGCT GAMMA_CORRECTION_ TABLE be 256. Example This example sets the GCT for screen zero (0). #include <mdpcint.h>...
  • Page 59: Dgetgct

    DGetGCT Purpose Use DGetGCT Syntax DWORD DGetGCT (hdc, wScreenNumber, lpgct) Parameter Type UWORD GAMMA_ CORRECTION_ TABLE FAR * Return value DWORD – otherwise, operating system error code. Structure The code fragment on page 48 defines the CORRECTION_TABLE DGetGCT in the GAMMA_CORRECTION_ TABLE must be 256.
  • Page 60 50 | DGetGCT Example This example returns the GCT for screen zero (0). #include <mdpcint.h> /* includes GAMMA_CORRECTION_TABLEgct; DWORD dwRetCode = DGetGCT (hdc, 0, &gct); return dwRetCode; See also DSetGCT, DSetStartupGCT, DCancelStartupGCT GAMMA_ CORRECTION_TABLE definition */ hdc; dwRetCode;...
  • Page 61: Dsetstartupgct

    DSetStartupGCT Purpose Use DSetStartupGCT screen. This table loads whenever you start the Windows operating system. The GCT supplied to this function takes effect only when you restart Windows. can also replace a previous startup table. Syntax DWORD DSetStartupGCT (wScreenNumber, lpFileName) Parameter Type UWORD SBYTE FAR *...
  • Page 62 52 | DSetStartupGCT Structure This code fragment defines the typedef struct UDWORD IdGCT; UWORD Version; UWORD ArraySize; UWORD Red[256]; UWORD Green[256]; UWORD Blue[256]; } GCT_FILE_FORMAT; ArraySize Example This example sets the initial GCT for screen zero (0). #include <mdpcint.h> DWORD dwRetCode = DSetStartupGCT (0, "screen0.gct");...
  • Page 63: Dcancelstartupgct

    DCancelStartupGCT Purpose Use DCancelStartupGCT particular screen. When you start the Windows operating system after setting this function, the default (linear) GCT loads for the indicated screen. This function takes effect only when you restart the Windows operating system. Syntax DWORD DCancelStartupGCT (wScreenNumber) Parameter Type UWORD Return value...
  • Page 64: Dgetrefreshrate

    54 | DGetRefreshRate DGetRefreshRate (Obsolete in multi-monitor mode) Purpose Use DGetRefreshRate Syntax DWORD DGetRefreshRate (hdc, lpwRefreshRate) Parameter Type UWORD FAR * Return value DWORD – otherwise, operating system error code. Example This example returns the refresh rate of the screen. #include <mdpcint.h>...
  • Page 65: Dgetrefreshratemm

    DGetRefreshRateMM (Windows 2000, multi-monitor mode only) Purpose Use DGetRefreshRateMM refresh rate. Syntax DWORD DGetRefreshRateMM (hdc, nDisplay, lpRefreshRate) Parameter Type UWORD UWORD FAR * Return value DWORD – otherwise, operating system error code. Example This example returns the refresh rate of the screen. #include <mdpcint.h>...
  • Page 66: Dcalibratorinit

    56 | DCalibratorInit DCalibratorInit Purpose Use DCalibratorInit system from DOME and prepare it to take measurements. Syntax DWORD DCalibratorInit (hdc, wScreenNumber, lpInitStruct) Parameter Type UWORD INIT_ CALIBRATOR_ STRUCT FAR * Return value DWORD – otherwise, operating system error code. Structure This code fragment defines the structure.
  • Page 67 is the number of microseconds over which MeasurementTime the sample is taken in DCalibratorMeasure parameter must be greater than 17 and less than 1,179,630. When measuring a periodic source such as a display, sample at an integer number of periods. Setting the proper integration time for a display at a specific frequency is essential to obtaining accurate, repeatable measurements.
  • Page 68 58 | DCalibratorInit Example This example initializes the DOME Calibration TQA system and prepares it to take measurements on screen one (1). #include <mdpcint.h> /* includes INIT_CALIBRATOR_STRUCTInitStruct; DWORD InitStruct.Version = 2; InitStruct.ReadTimeout = 2000; /* Set InitStruct.MeasurementTime using the dwRetCode = DCalibratorInit (hdc, 1, &InitStruct);...
  • Page 69: Dcalibratormeasure

    DCalibratorMeasure Purpose Use DCalibratorMeasure DOME Calibration TQA system and return the result. Syntax DWORD DCalibratorMeasure (hdc, wScreenNumber, lpdwMeasure) Parameter Type UWORD DWORD FAR * Return value – zero (0) if function completed successfully; DWORD otherwise, operating system error code. DCalibratorMeasure | 59 to take a measurement from the Name Description...
  • Page 70 60 | DCalibratorMeasure Example This example returns the screen luminance on screen one (1), as measured by the calibration system. #include <mdpcint.h> DWORD DWORD dwRetCode = DCalibratorMeasure (hdc, 1, &dwMeasure); return dwRetCode; See also DCalibratorInit, DGetFtLamScale hdc; dwMeasure; dwRetCode;...
  • Page 71: Dgetftlamscale

    DGetFtLamScale Purpose Use DGetFtLamScale calibration measurement units to foot Lamberts. Syntax DWORD DGetFtLamScale (hdc, wScreenNumber, lpdScale) Parameter Type UWORD double * Return value DWORD – otherwise, operating system error code. Example This example returns the scale factor to convert the calibration measurement units to foot Lamberts.
  • Page 72: Dserialcmd

    62 | DSerialCmd DSerialCmd Purpose Use DSerialCmd port and then read back the specified number of response bytes from the port. Syntax DWORD DSerialCmd (hdc, wScreenNumber, wnumCmdBytes, lpCmdBuffer, wnumResponseBytes, lpResponseBuffer, dwTimeout) Parameter Type UWORD UWORD UBYTE FAR * to write command bytes to the PS/2 Name Description Handle to the display-...
  • Page 73 Parameter Type UWORD UBYTE FAR * DWORD Return value zero (0) if function completed successfully; DWORD – otherwise, operating system error code. All structures are packed on 1-byte boundaries. Name Description Number of bytes to wnumResponseBytes be read from the port after the If this value is zero (0), the function...
  • Page 74 64 | DSerialCmd Example This example writes a command byte to the PS/2 serial port and then reads back the specified number of response bytes from the port. #include <mdpcint.h> UWORD DWORD UBYTE DWORD /* Put command bytes in CmdBuffer, and set number of dwRetCode = DSerialCmd (hdc, 0, wnumCmdBytes, &CmdBuffer, wnumResponseBytes, &ResponseBuffer, dwTimeout);...
  • Page 75: Dome Mdlib Api Function Reference

    DOME MDlib API Function Reference In This Chapter • MDlib API Types • MDlib API Structures • MDlib API Functions...
  • Page 76: Mdlib Api Types

    66 | DOME MDlib API Function Reference MDlib API Types The standard C types of different things to different compilers and machine types. The MDlib API types, however, are strictly defined as signed or unsigned and by byte size, as shown below. Size 1 byte 2 bytes...
  • Page 77: Mdlib Api Structures

    MDlib API Structures Use this table to quickly locate the MDlib API structures described in this section. For this structure DMdVersion DMdCopyRect DMdFillRect DMdDev DMdVersion Structure Purpose The DMdVersion MDlib API. DMdVersion DMdOpen checks to see if the version of the has used to compile matches that of the MDlib API.
  • Page 78 68 | DMdVersion Structure If the major version number matches, but the minor version number does not, the API retains backward compatibility; a program compiled with an older version of correctly with a newer MDlib API. Structure This table defines the DMdVersion struct { DShort...
  • Page 79: Dmdcopyrect Structure

    DMdCopyRect Structure Purpose The DMdCopyRect screen copying. Structure This table defines the DMdCopyRec struct { DULong DULong DULong DULong DULong DULong } DMdCopyRect DMdCopyRect Structure | 69 structure accelerates screen-to- structure. DMdCopyRect Member Description The x screen coordinate of the srcx upper-left corner pixel of the source rectangle.
  • Page 80: Dmdfillrect Structure

    70 | DMdFillRect Structure DMdFillRect Structure Purpose The DMdFillRect Structure This table defines the DMdFillRect struct { DULong DULong DULong DULong } DMdFillRect structure accelerates screen filling. structure. DMdFillRect Member Description The x screen coordinate of the dstx upper-left corner pixel of the destination rectangle The y screen coordinate of the dsty...
  • Page 81: Dmddev Structure

    DMdDev Structure Purpose The DMdDev that accesses to the DOME MDlib device returned by DMdFdOpen Structure This table defines the DMdDev struct { DMdVersion DLong DVoid DLong DBool DVoid DVoid DLong DLong DLong DLong struct fbtype *(*FbType) () DLong DError structure provides a pointer to the structure is also called the device handle.
  • Page 82 72 | DMdDev Structure DMdDev DError DError DError DError DError DError DError DError DError DVoid DVoid DVoid DVoid DVoid DVoid DVoid DVoid DVoid } DMdDev All structure members, except both pointers to functions that provide the remaining functionality of the DOME MDlib API. Those functions are described in the next section, “MDlib API Functions.”...
  • Page 83: Mdlib Api Functions

    MDlib API Functions Use this reference to the DOME MDlib API functions to write applications. The two by the other functions in the order of their appearance as members of the For a description of this function… functions appear first, followed Open structure.
  • Page 84: Dmdopen

    74 | DMdOpen DMdOpen Purpose Use DMdOpen Syntax DMdDev DMdOpen (name) Parameter Type DChar Return value Device handle if successful; otherwise, Description DMdOpen() and returns the device handle, which provides access to the device. To close the DOME device, use the member function (page 76) of the returned device handle.
  • Page 85: Dmdfdopen

    DMdFdOpen Purpose Use DMdFdOpen is already open. Syntax DMdDev DMdFdOpen (fd) Parameter Type DLong Return value Device handle if successful; otherwise, Description DMdFdOpen() open file descriptor provides access to the device. To close the DOME device, use the device handle. Errors If DMdFdOpen() stderr...
  • Page 86: Close

    76 | Close Close Purpose Use Close Syntax DVoid (*Close) (dev) Parameter Type DMdDev Return value None. Description Close() either DMdOpen() you cannot access the DOME device using the old device handle. Errors None. Example This example closes the device handle #include "domeMd.h"...
  • Page 87: Refreshrate

    RefreshRate Purpose Use RefreshRate mode setting. Syntax DLong (*RefreshRate) (dev) Parameter Type DMdDev Return value An integer equal to 100 times the refresh rate in Hz, if successful. If the display mode is not set to a supported mode, RefreshRate() Description RefreshRate() the refresh rate of the display mode setting.
  • Page 88: Fbvideo

    78 | FbVideo FbVideo Purpose Use FbVideo Syntax DBool (*FbVideo) (dev, on) Parameter Type DMdDev DBool Return value if video was on before the call; TRUE was off. Description FbVideo() the display video off if of the video (on or off) before this call takes effect. Errors None.
  • Page 89: Mapfb

    MapFb Purpose Use MapFb program to access the framebuffer directly. Syntax DVoid *(*MapFb) (dev) Parameter Type DMdDev Return value A pointer to the beginning of the framebuffer if successful; otherwise, Description MapFb() the caller and returns a pointer to the beginning of that space. The caller can access the framebuffer directly through the pointer.
  • Page 90 80 | MapFb Example This example maps the framebuffer. #include "domeMd.h" DMdDev char pFb = (*dev->MapFb) (dev); See also UnmapFb, FbSize, DMdDev Structure dev; *pFb;...
  • Page 91: Unmapfb

    UnmapFb Purpose Use UnmapFb Syntax DVoid (*UnmapFb) (dev) Parameter Type DMdDev Return value None. Description UnmapFb() space of the caller, freeing up any system resources that have been allocated. Attempts to access the framebuffer using the pointer obtained from Errors If UnmapFb() Example This example unmaps the framebuffer.
  • Page 92: Fbsize

    82 | FbSize FbSize Purpose Use FbSize Syntax DLong (*FbSize) (dev) Parameter Type DMdDev Return value Size of framebuffer in bytes. Description FbSize() access locations beyond the size of the framebuffer will result in an error. Errors None. Example This example returns the framebuffer size. #include "domeMd.h"...
  • Page 93: Fbwidth

    FbWidth Purpose Use FbWidth Syntax DLong (*FbWidth) (dev) Parameter Type DMdDev Return value Width in pixels of the visible portion of the framebuffer. Description FbWidth() of the framebuffer. Access to locations beyond the visible portion of the frame- buffer is reserved. To get the number of bits per pixel, use BitsPerPixel() device handle.
  • Page 94: Fbheight

    84 | FbHeight FbHeight Purpose Use FbHeight Syntax DLong (*FbHeight) (dev) Parameter Type DMdDev Return value Height in pixels of the visible portion of the framebuffer. Description FbHeight() of the framebuffer. Access to locations beyond the visible portion of the frame- buffer is reserved.
  • Page 95: Fbpitch

    FbPitch Purpose Use FbPitch Syntax DLong (*FbPitch) (dev) Parameter Type DMdDev Return value Pitch of framebuffer in pixels. Description The pitch, sometimes called the stride, is the number of pixels in one horizontal line of the framebuffer. It may be equal to or greater than the width of the visible portion of the frame- buffer.
  • Page 96: Fbtype

    86 | FbType FbType Purpose Use FbType about the framebuffer. Syntax struct fbtype *(*FbType) (dev) Parameter Type DMdDev Return value Pointer to Sun Description FbType() containing information about the framebuffer. Errors None. Example This example returns the Sun the framebuffer. #include "domeMd.h"...
  • Page 97: Bitsperpixel

    BitsPerPixel Purpose Use BitsPerPixel the framebuffer. Syntax DLong (*BitsPerPixel) (dev) Parameter Type DMdDev Return value Number of bits per pixel of the framebuffer. Description BitsPerPixel() the framebuffer. Errors None. Example This example returns the bits and bytes per pixel of the framebuffer.
  • Page 98: Copyrects

    88 | CopyRects CopyRects Purpose Use CopyRects of rectangles. Syntax DError (*CopyRects) (dev, rop, planeMask, r, nRects) Parameter Type DMdDev DLong DLong DMdCopyRect DLong Return value if successful; otherwise, an error code. D_OK Description CopyRects() DMdCopyRect, rectangles, and copies each source rectangle to the destination, applying the specified rasterop and plane mask while doing so.
  • Page 99 Example This example copies two rectangles from one location on the screen to another. #include "domeMd.h" DMdDev dev; DMdCopyRectrect[2]; DError error; rect[0].srcx = 40; rect[0].srcy = 20; rect[0].dstx = 500; rect[0].dsty = 400; rect[0].width = 100; rect[0].height = 50; rect[1].srcx = 340; error = (*dev->CopyRects) (dev, GXcopy, ~0, rect, 2);...
  • Page 100: Fillrects

    90 | FillRects FillRects Purpose Use FillRects the screen. Syntax DError (*FillRects) (dev, rop, planeMask, value, r, nRects) Parameter Type DMdDev DLong DLong DLong DMdFillRect DLong Return value if successful; otherwise, an error code. D_OK Description FillRects() DMdFillRect, each rectangle on the screen using the pixel value applying the specified rasterop and plane mask while doing so.
  • Page 101 Example This example draws two rectangles on the screen using the pixel value 20. #include "domeMd.h" DMdDev dev; DMdFillRectrect[2]; DError error; rect[0].dstx = 50; rect[0].dsty = 45; rect[0].width = 80; rect[0].height = 65; rect[1].dstx = 30; error = (*dev->FillRects) (dev, GXcopy, ~0, 20, rect, 2);...
  • Page 102: Initcmap

    92 | InitCmap InitCmap Purpose Use InitCmap Syntax DError (*InitCmap) (dev) Parameter Type DMdDev Return value if successful; otherwise, an error code. D_OK Description InitCmap() to a linear ramp. hardware with this linear ramp. Errors DMD_ERROR_BAD_DEVICE - colormap. Example This example initializes the colormap to a linear ramp. #include "domeMd.h"...
  • Page 103: Writecmap

    WriteCmap Purpose Use WriteCmap Syntax DError (*WriteCmap) (dev, i, r, g, b) Parameter Type DMdDev DLong DLong DLong DLong Return value if successful; otherwise, an error code. D_OK Description WriteCmap() color ( colormap. You can write multiple entries by calling WriteCmap() effective unless you call the For an 8-bit-per-pixel framebuffer, the colormap entry...
  • Page 104 94 | WriteCmap Example This example writes colormap entry 4 with the color yellow. #include "domeMd.h" DMdDev DError error = (*dev->WriteCmap) (dev, 4, 0xff, 0xff, 0); See also InitCmap, ReadCmap, UpdateCmap, DMdDev Structure dev; error;...
  • Page 105: Updatecmap

    UpdateCmap Purpose Use UpdateCmap Syntax DError (*UpdateCmap) (dev) Parameter Type DMdDev Return value if successful; otherwise, an error code. D_OK Description UpdateCmap() the current values in the colormap. Errors DMD_ERROR_BAD_DEVICE - colormap. Example This example loads the colormap into the colormap hardware.
  • Page 106: Readcmap

    96 | ReadCmap ReadCmap Purpose Use ReadCmap Syntax DError (*ReadCmap) (dev, i, r, g, b) Parameter Type DMdDev DLong DLong DLong DLong Return value if successful; otherwise, an error code. D_OK Description ReadCmap() in ( Errors DMD_ERROR_BAD_DEVICE - the colormap. DMD_ERROR_BAD_VALUE - too large.
  • Page 107 Example This example reads colormap entry 79. #include "domeMd.h" DMdDev dev; DLong r, g, b; DError error; error = (*dev->ReadCmap) (dev, 79, &r, &g, &b); See also InitCmap, WriteCmap, UpdateCmap, DMdDev Structure ReadCmap | 97...
  • Page 108: Initgct

    98 | InitGCT InitGCT Purpose Use InitGCT Syntax DError (*InitGCT) (dev) Parameter Type DMdDev Return value if successful; otherwise, an error code. D_OK Description InitGCT() a linear ramp. with this linear ramp. Errors DMD_ERROR_BAD_DEVICE - Example This example initializes the GCT to a linear ramp. #include "domeMd.h"...
  • Page 109: Writegct

    WriteGCT Purpose Use WriteGCT Syntax DError (*WriteGCT) (dev, i, r, g, b) Parameter Type DMdDev DLong DLong DLong DLong Return value if successful; otherwise, an error code. D_OK Description WriteGCT() To write multiple entries, call The new values are not effective unless you call the member function.
  • Page 110 100 | WriteGCT Example This example writes GCT entry 15. #include "domeMd.h" DMdDev DError error = (*dev->WriteGCT) (dev, 15, 60, 68, 54); See also InitGCT, ReadGCT, UpdateGCT, DMdDev Structure dev; error;...
  • Page 111: Updategct

    UpdateGCT Purpose Use UpdateGCT Syntax DError (*UpdateGCT) (dev) Parameter Type DMdDev Return value if successful; otherwise, an error code. D_OK Description UpdateGCT() values in the GCT. Errors DMD_ERROR_BAD_DEVICE - Example This example loads the GCT into the GCT hardware. #include "domeMd.h" DMdDev DError error = (*dev->UpdateGCT) (dev);...
  • Page 112: Readgct

    102 | ReadGCT ReadGCT Purpose Use ReadGCT Syntax DError (*ReadGCT) (dev, i, r, g, b) Parameter Type DMdDev DLong DLong DLong DLong Return value if successful; otherwise, an error code. D_OK Description ReadGCT() values in ( Errors DMD_ERROR_BAD_DEVICE - DMD_ERROR_BAD_VALUE - Example This example reads GCT entry 34.
  • Page 113: Index

    Index Symbols (S)=Solaris (W)=Windows accelerating screen filling (S) screen-to-screen copying (S) accessing DOME device (S) GCTs architecture, board DX/PCI M2/PCI RX/PCI BitsPerPixel (S) board – architecture returning number (W) type (W) – brightness Calibration TQA initializing (W) measuring screen luminance (W)
  • Page 114 – structures DOME types drawing array of filled rectangles (S) DSerialCmd (W) DSetBrightness (W) DSetContrast (W) DSetGCT (W) DSetStartupGCT (W) DX/PCI board architecture Dynamic Link Library data types functions – FbHeight (S) FbPitch (S) FbSize (S) FbType (S) FbVideo (S)
  • Page 115 MapFb (S) mapping framebuffer (S) MDlib API data types – functions – structures version number measuring luminance (W) in foot Lamberts screen modes – – opening DOME device (S) PS/2 serial port ReadCmap (S) ReadGCT (S) reading colormap entry (S) GCT entry (S) response bytes from PS/2 port refresh rate...
  • Page 116 106 | Index Windows – DLL functions – modes structures types WriteCmap (S) WriteGCT (S) writing colormap entry (S) command byte to PS/2 port (W) GCT entry (S)

This manual is also suitable for:

Dome m2/pciRx/pciDome dx/pciDome rx/pci

Table of Contents