Jump to content

Video Manager: Difference between revisions

From EDM2
Ak120 (talk | contribs)
No edit summary
Ak120 (talk | contribs)
No edit summary
Line 1: Line 1:
This chapter describes the functions, called by the Video Manager (VMAN), that are designated by the prefix VMI_CMD_. Refer to [[Graphics Adapter Device Drivers]] for descriptions of the Graphics Hardware Interface functions and to [[Enhanced Direct Interface Video Extension (EnDIVE) Functions]] for descriptions of the EnDIVE functions.
This chapter describes the functions, called by the Video Manager (VMAN), that are designated by the prefix VMI_CMD_. Refer to [[Graphics Adapter Device Drivers]] for descriptions of the Graphics Hardware Interface functions and to [[Enhanced Direct Interface Video Extension (EnDIVE) Functions]] for descriptions of the EnDIVE functions.


=== VMI_CMD_xx Functions and GHI_CMD_xx Functions ===
===VMI_CMD_xx Functions and GHI_CMD_xx Functions===
There are only a few differences between the VMAN protocol, Video Manager Interface (VMI), and the GRADD protocol, Graphics Hardware Interface (GHI). In fact, the majority of the functions are identical, with only the prefix (VMI or GHI) indicating to which component the function belongs.
There are only a few differences between the VMAN protocol, Video Manager Interface (VMI), and the GRADD protocol, Graphics Hardware Interface (GHI). In fact, the majority of the functions are identical, with only the prefix (VMI or GHI) indicating to which component the function belongs.


Line 68: Line 68:
*[[VHMapVRAM]]
*[[VHMapVRAM]]


=== The Video Manager Interface Functions ===
====VHAllocMem====
The remainder of this chapter contains a detailed description of the Video Manager interface. Proceed to the following alphabetical list for a description of each function. Helper functions and entry points are included for easy reference.
 
=== VHAllocMem ===
;Syntax
;Syntax
Description:
Description:
Line 93: Line 90:
Memory is valid across all processes.
Memory is valid across all processes.


=== VHFreeMem ===
====VHFreeMem====
;Syntax
;Syntax
Description:
Description:
Line 105: Line 102:


rc = VHFreeMem(pMem);</pre>
rc = VHFreeMem(pMem);</pre>
;pMem
'''pMem'''(PVOID) - input Pointer to memory previously allocated via VHAllocMem.
;rc
'''rc'''(ULONG) - returns Return codes.
RC_SUCCESS <br />RC_ERROR


;Parameters
;Parameters
'''pMem'''(PVOID) - input Pointer to memory previously allocated using VHAllocMem.
:'''pMem'''(PVOID) - input Pointer to memory previously allocated using VHAllocMem.
 
:'''rc'''(ULONG) - returns Return codes.
'''rc'''(ULONG) - returns Return codes.
::RC_SUCCESS
:RC_SUCCESS
::RC_ERROR
:RC_ERROR
 
;Remarks
None.


=== VHLockMem ===
====VHLockMem====
;Syntax
;Syntax
Description:
Description:
Line 138: Line 123:


rc = VHLockMem(pAddress, ulLength, fData);</pre>
rc = VHLockMem(pAddress, ulLength, fData);</pre>
;pAddress
'''pAddress'''(PVOID) - input Address within the first page of code or data.
;ulLength
'''ulLength'''(ULONG) - input Size of code or data segment.
;fData
'''fData'''(BOOL) - input FALSE indicates code segment; TRUE indicates data segment.
;rc
'''rc'''(ULONG) - returns Return value.
Non-zero lockhandle indicates success; zero indicates error.


;Parameters
;Parameters
Line 161: Line 132:
Non-zero lockhandle indicates success; zero indicates error.
Non-zero lockhandle indicates success; zero indicates error.


=== VHPhysToVirt ===
====VHPhysToVirt====
;Syntax
;Syntax
Description:
Description:
Line 169: Line 140:
#include <GRADD.h>
#include <GRADD.h>


PMEMINFO   pMemInfo; /* Pointer to linked list of MEMINFO structures defining address ranges. */
PMEMINFO pMemInfo; /* Pointer to linked list of MEMINFO structures defining address ranges. */
ULONG       rc;
ULONG     rc;


rc = VHPhysToVirt (pMemInfo);</pre>
rc = VHPhysToVirt (pMemInfo);</pre>
;Parameter - pMemInfo
:'''pMemInfo'''(PMEMINFO) - input Pointer to linked list of [[01267.htm|MEMINFO]]structures defining address ranges.
;Return Value - rc
'''rc'''(ULONG) - returns Return codes.


;Parameters
;Parameters
'''pMemInfo'''(PMEMINFO) - input Pointer to linked list of [[01267.htm|MEMINFO]]structures defining address ranges.
:'''pMemInfo'''(PMEMINFO) - input Pointer to linked list of [[MEMINFO]] structures defining address ranges.
 
:'''rc'''(ULONG) - returns Return codes.
'''rc'''(ULONG) - returns Return codes.


;Remarks
;Remarks
Linear virtual address ranges are valid for all processes.
Linear virtual address ranges are valid for all processes.


=== VHMap ===
====VHMap====
;Syntax
;Syntax
Description:
Description:
Line 202: Line 166:


rc = VHMap(pAddress, ulLength);</pre>
rc = VHMap(pAddress, ulLength);</pre>
;Parameter - pAddress
'''pAddress'''(PVOID) - input Address within the first page of code or data.
;Parameter - ulLength
'''ulLength'''(ULONG) - input Size of code or data segment.
;Return Value - rc
'''rc'''(ULONG) - returns Return value.
Non-zero indicates ring 0 alias address; zero indicates error.


;Parameters
;Parameters
'''pAddress'''(PVOID) - input Address within the first page of code or data.
:'''pAddress'''(PVOID) - input Address within the first page of code or data.
 
:'''ulLength'''(ULONG) - input Size of code or data segment.
'''ulLength'''(ULONG) - input Size of code or data segment.
:'''rc'''(ULONG) - returns Return value.
 
'''rc'''(ULONG) - returns Return value.


Non-zero indicates ring 0 alias address; zero indicates error.
Non-zero indicates ring 0 alias address; zero indicates error.


=== VHMapVRAM ===
====VHMapVRAM====
;Syntax
;Syntax
Description:
Description:
Line 236: Line 187:
ULONG      rc;          /*  Return value. */
ULONG      rc;          /*  Return value. */


rc = VHMapVRAM(ulPhysAddr, ulLength, pVRAM,
rc = VHMapVRAM(ulPhysAddr, ulLength, pVRAM, pVRAMRing0);</pre>
      pVRAMRing0);</pre>
 
;Parameter - ulPhysAddr
'''ulPhysAddr'''(ULONG) - input Physical address of the start of the VRAM aperture.
 
;Parameter - ulLength
'''ulLength'''(ULONG) - input Length of VRAM aperture.
 
;Parameter - pVRAM
'''pVRAM'''(PBYTE *) - output Returned process virtual linear aperture pointer.
 
;Parameter - pVRAMRing0
'''pVRAMRing0'''(PBYTE *) - output Returned ring 0 virtual linear aperture pointer.
 
;Return Value - rc
'''rc'''(ULONG) - returns Return value.
 
RC_SUCCESS or RC_ERROR.


;Parameters
;Parameters
'''ulPhysAddr'''(ULONG) - input Physical address of the start of the VRAM aperture.
:'''ulPhysAddr'''(ULONG) - input Physical address of the start of the VRAM aperture.
 
:'''ulLength'''(ULONG) - input Length of VRAM aperture.
'''ulLength'''(ULONG) - input Length of VRAM aperture.
:'''pVRAM'''(PBYTE *) - output Returned process virtual linear aperture pointer.
 
:'''pVRAMRing0'''(PBYTE *) - output Returned ring 0 virtual linear aperture pointer.
'''pVRAM'''(PBYTE *) - output Returned process virtual linear aperture pointer.
:'''rc'''(ULONG) - returns Return value.
 
::RC_SUCCESS or RC_ERROR.
'''pVRAMRing0'''(PBYTE *) - output Returned ring 0 virtual linear aperture pointer.
 
'''rc'''(ULONG) - returns Return value.
 
RC_SUCCESS or RC_ERROR.


;Remarks
;Remarks
Line 274: Line 202:
The ulPhysAddr and ulLength parameters for VHMapVRAM() and VHPhysToVirt() are usually obtained from the VIDEOPMI function PMIREQUEST_SETMODE.
The ulPhysAddr and ulLength parameters for VHMapVRAM() and VHPhysToVirt() are usually obtained from the VIDEOPMI function PMIREQUEST_SETMODE.


=== VMIEntry ===
=== The Video Manager Interface Functions ===
The remainder of this chapter contains a detailed description of the Video Manager interface. Proceed to the following alphabetical list for a description of each function. Helper functions and entry points are included for easy reference.
 
====VMIEntry====
;Syntax
;Syntax
Description:
Description:
Line 289: Line 220:


rc = VMIEntry(gid, ulFunction, pIn, pOut);</pre>
rc = VMIEntry(gid, ulFunction, pIn, pOut);</pre>
;Parameter - gid
'''gid'''(GID) - input ID of the GRADD.
;Parameter - ulFunction
'''ulFunction'''(ULONG) - input Set to appropriate VMI_CMD_ function.
This parameter is set to one of the VMI_CMD_ functions shown in the table of common functions shown at the beginning of this section.
;Parameter - pIn
'''pIn'''(PVOID) - input Pointer to applicable data structure.
;Parameter - pOut
'''pOut'''(PVOID) - output Pointer to applicable data structure.
;Return Value - rc
'''rc'''(ULONG) - returns Return codes.
Valid values are dictated by the applicable VMI_CMD_ function.


;Parameters
;Parameters
'''gid'''(GID) - input ID of the GRADD.
:'''gid'''(GID) - input ID of the GRADD.
 
:'''ulFunction'''(ULONG) - input Set to appropriate VMI_CMD_ function.
'''ulFunction'''(ULONG) - input Set to appropriate VMI_CMD_ function.
:This parameter is set to one of the VMI_CMD_ functions shown in the table of common functions shown at the beginning of this section.
 
:'''pIn'''(PVOID) - input Pointer to applicable data structure.
This parameter is set to one of the VMI_CMD_ functions shown in the table of common functions shown at the beginning of this section.
:'''pOut'''(PVOID) - output Pointer to applicable data structure.
 
:'''rc'''(ULONG) - returns Return codes.
'''pIn'''(PVOID) - input Pointer to applicable data structure.
 
'''pOut'''(PVOID) - output Pointer to applicable data structure.
 
'''rc'''(ULONG) - returns Return codes.


Valid values are dictated by the applicable VMI_CMD_ function.
Valid values are dictated by the applicable VMI_CMD_ function.


;Remarks
====VMI_CMD_BANK====
None.
 
=== VMI_CMD_BANK ===
;Syntax
;Syntax
Description:
Description:
Line 342: Line 246:


rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>
;Parameter - gid
'''gid'''(GID) - input ID of the GRADD.
;Parameter - ulFunction
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_BANK.
;Parameter - pIn
'''pIn'''(PVOID) - input Pointer to a [[HWBANKIN]] data structure.
;Parameter - pOut
'''pOut'''(PVOID) - output Pointer to [[HWBANKOUT]] data structure.
;Return Value - rc
'''rc'''(ULONG) - returns Return codes.
RC_ERROR <br />RC_SUCCESS <br />RC_UNSUPPORTED


;Parameters
;Parameters
:'''gid'''(GID) - input ID of the GRADD.
:'''gid'''(GID) - input ID of the GRADD.
:'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_BANK.
:'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_BANK.
:'''pIn'''(PVOID) - input Pointer to a [[01121.htm|HWBANKIN]]data structure.
:'''pIn'''(PVOID) - input Pointer to a [[HWBANKIN]] data structure.
:'''pOut'''(PVOID) - output Pointer to [[01125.htm|HWBANKOUT]]data structure.
:'''pOut'''(PVOID) - output Pointer to [[HWBANKOUT]] data structure.


'''rc'''(ULONG) - returns Return codes.
'''rc'''(ULONG) - returns Return codes.
Line 372: Line 258:
:RC_UNSUPPORTED
:RC_UNSUPPORTED


;Remarks
====VMI_CMD_BITBLT====
None.
 
=== VMI_CMD_BITBLT ===
;Syntax
;Syntax
Description:
Description:
Line 381: Line 264:
''VMI_CMD_BITBLT'' is called to blit a rectangle or series of rectangles to or from the video display. VMAN passes this command directly to the GRADD chain identified by the GRADD ID provided by the caller.
''VMI_CMD_BITBLT'' is called to blit a rectangle or series of rectangles to or from the video display. VMAN passes this command directly to the GRADD chain identified by the GRADD ID provided by the caller.


<pre class="western">#include &lt;GRADD.h&gt;
<pre>#include <GRADD.h>


GID      gid;        /*  ID of the GRADD. */
GID      gid;        /*  ID of the GRADD. */
Line 391: Line 274:
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>


=== VMI_CMD_BITBLT Parameter - gid ===
;Parameters
'''gid'''(GID) - input ID of the GRADD.
:'''gid'''(GID) - input ID of the GRADD.
 
:'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_BITBLT.
=== VMI_CMD_BITBLT Parameter - ulFunction ===
:'''pIn'''(PVOID) - input Pointer to a [[BITBLTINFO]] data structure.
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_BITBLT.
:'''pOut'''(PVOID) - output Null; no output structure needed.
 
:'''rc'''(ULONG) - returns Return codes.
=== VMI_CMD_BITBLT Parameter - pIn ===
::RC_SUCCESS
'''pIn'''(PVOID) - input Pointer to a [[00981.htm|BITBLTINFO]]data structure.
::RC_ERROR
 
=== VMI_CMD_BITBLT Parameter - pOut ===
'''pOut'''(PVOID) - output Null; no output structure needed.
 
=== VMI_CMD_BITBLT Return Value - rc ===
'''rc'''(ULONG) - returns Return codes.
 
RC_SUCCESS <br />RC_ERROR
 
=== VMI_CMD_BITBLT - Parameters ===
'''gid'''(GID) - input ID of the GRADD.
 
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_BITBLT.
 
'''pIn'''(PVOID) - input Pointer to a [[00981.htm|BITBLTINFO]]data structure.
 
'''pOut'''(PVOID) - output Null; no output structure needed.
 
'''rc'''(ULONG) - returns Return codes.


RC_SUCCESS <br />RC_ERROR
====VMI_CMD_EVENT====
 
=== VMI_CMD_BITBLT - Remarks ===
None.
 
=== VMI_CMD_EVENT ===
;Syntax
;Syntax
Description:
Description:
Line 440: Line 299:
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>


=== VMI_CMD_EVENT Parameter - gid ===
;Parameters
'''gid'''(GID) - input ID of the GRADD.
:'''gid'''(GID) - input ID of the GRADD.
 
:'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_EVENT.
=== VMI_CMD_EVENT Parameter - ulFunction ===
:'''pIn'''(PVOID) - input Pointer to an [[HWEVENTIN]] data structure.
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_EVENT.
:'''pOut'''(PVOID) - output NULL; no output structure needed.
 
:'''rc'''(ULONG) - returns Return codes.
=== VMI_CMD_EVENT Parameter - pIn ===
::RC_UNSUPPORTED
'''pIn'''(PVOID) - input Pointer to an [[HWEVENTIN]] data structure.
::RC_SUCCESS
 
=== VMI_CMD_EVENT Parameter - pOut ===
'''pOut'''(PVOID) - output NULL; no output structure needed.
 
=== VMI_CMD_EVENT Return Value - rc ===
 
'''rc'''(ULONG) - returns Return codes.
 
RC_UNSUPPORTED <br />RC_SUCCESS
 
=== VMI_CMD_EVENT - Parameters ===
 
'''gid'''(GID) - input ID of the GRADD.
 
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_EVENT.
 
'''pIn'''(PVOID) - input Pointer to an [[HWEVENTIN]] data structure.
 
'''pOut'''(PVOID) - output NULL; no output structure needed.
 
'''rc'''(ULONG) - returns Return codes.
 
RC_UNSUPPORTED <br />RC_SUCCESS
 
=== VMI_CMD_EVENT - Remarks ===
None.


=== VMI_CMD_EXTENSION ===
====VMI_CMD_EXTENSION====
;Syntax
;Syntax
Description:
Description:
Line 490: Line 323:


rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>
;Parameter - gid
'''gid'''(GID) - input ID of the GRADD.
;Parameter - ulFunction
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_EXTENSION.
;Parameter - pIn
'''pIn'''(PVOID) - input Pointer to an [[HWEXTENSION]] data structure.
;Parameter - pOut
'''pOut'''(PVOID) - output Pointer to an extension-specific output structure.
;Return Value - rc
'''rc'''(ULONG) - returns Return codes.
RC_UNSUPPORTED <br />RC_SUCCESS <br />RC_ERROR


;Parameters
;Parameters
'''gid'''(GID) - input ID of the GRADD.
:'''gid'''(GID) - input ID of the GRADD.
 
:'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_EXTENSION.
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_EXTENSION.
:'''pIn'''(PVOID) - input Pointer to an [[HWEXTENSION]] data structure.
 
:'''pOut'''(PVOID) - output Pointer to an extension-specific output structure.
'''pIn'''(PVOID) - input Pointer to an [[HWEXTENSION]] data structure.
:'''rc'''(ULONG) - returns Return codes.
 
'''pOut'''(PVOID) - output Pointer to an extension-specific output structure.
 
'''rc'''(ULONG) - returns Return codes.


RC_UNSUPPORTED <br />RC_SUCCESS <br />RC_ERROR
RC_UNSUPPORTED <br />RC_SUCCESS <br />RC_ERROR


;Remarks
====VMI_CMD_INIT====
None.
 
=== VMI_CMD_INIT ===
;Syntax
;Syntax


Line 533: Line 342:
During the first initialization, VMAN loads SOFTDRAW and all of the GRADDs specified by the environment variables.
During the first initialization, VMAN loads SOFTDRAW and all of the GRADDs specified by the environment variables.


<pre>#include &lt;GRADD.h&gt;
<pre>#include <GRADD.h>


GID      gid;        /*  NULL. */
GID      gid;        /*  NULL. */
Line 542: Line 351:


rc = VMIEntry(gid, ulFunction, pIn, pOut);</pre>
rc = VMIEntry(gid, ulFunction, pIn, pOut);</pre>
;Parameter - gid
'''gid'''(GID) - input NULL.
;Parameter - ulFunction
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_INIT.
;Parameter - pIn
'''pIn'''(PVOID) - input NULL.
;Parameter - pOut
'''pOut'''(PVOID) - output NULL.
;Return Value - rc
'''rc'''(ULONG) - returns Return codes.
RC_SUCCESS<br />RC_ERROR


;Parameters
;Parameters
 
:'''gid'''(GID) - input NULL.
'''gid'''(GID) - input NULL.
:'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_INIT.
 
:'''pIn'''(PVOID) - input NULL.
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_INIT.
:'''pOut'''(PVOID) - output NULL.
 
:'''rc'''(ULONG) - returns Return codes.
'''pIn'''(PVOID) - input NULL.
 
'''pOut'''(PVOID) - output NULL.
 
'''rc'''(ULONG) - returns Return codes.


RC_SUCCESS<br />RC_ERROR
RC_SUCCESS<br />RC_ERROR


;Remarks
====VMI_CMD_INITPROC====
None.
 
=== VMI_CMD_INITPROC ===
;Syntax
;Syntax
Description:
Description:
Line 593: Line 377:


rc = VMIEntry(gid, ulFunction, pIn, pOut);</pre>
rc = VMIEntry(gid, ulFunction, pIn, pOut);</pre>
;Parameter - gid
'''gid'''(GID) - input NULL.
;Parameter - ulFunction
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_INITPROC.
;Parameter - pIn
'''pIn'''(PVOID) - input NULL.
;Parameter - pOut
'''pOut'''(PVOID) - output Pointer to an [[INITPROCOUT]] data structure.
;Return Value - rc
'''rc'''(ULONG) - returns Return codes.
RC_SUCCESS <br />RC_ERROR


;Parameters
;Parameters
:'''gid'''(GID) - input NULL.
:'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_INITPROC.
:'''pIn'''(PVOID) - input NULL.
:'''pOut'''(PVOID) - output Pointer to an [[INITPROCOUT]] data structure.
:'''rc'''(ULONG) - returns Return codes.
::RC_SUCCESS <br />RC_ERROR


'''gid'''(GID) - input NULL.
====VMI_CMD_LINE====
 
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_INITPROC.
 
'''pIn'''(PVOID) - input NULL.
 
'''pOut'''(PVOID) - output Pointer to an [[INITPROCOUT]] data structure.
 
'''rc'''(ULONG) - returns Return codes.
 
RC_SUCCESS <br />RC_ERROR
 
;Remarks
None.
 
=== VMI_CMD_LINE ===
;Syntax
;Syntax
Description:
Description:
Line 634: Line 392:
''VMI_CMD_LINE'' is called to draw a line to the video display. VMAN sends this command directly to the GRADD chain identified by the GRADD ID provided by the caller.
''VMI_CMD_LINE'' is called to draw a line to the video display. VMAN sends this command directly to the GRADD chain identified by the GRADD ID provided by the caller.


<pre class="western">#include &lt;GRADD.h&gt;
<pre>#include &lt;GRADD.h&gt;


GID      gid;        /*  ID of the GRADD. */
GID      gid;        /*  ID of the GRADD. */
Line 643: Line 401:


rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>
;Parameter - gid
'''gid'''(GID) - input ID of the GRADD.
;Parameter - ulFunction
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_LINE.
;Parameter - pIn
'''pIn'''(PVOID) - input Pointer to a [[01223.htm|LINEINFO]]or [[01235.htm|LINEINFO2]]data structure.
;Parameter - pOut
'''pOut'''(PVOID) - output NULL; no output structure is needed.
;Return Value - rc
'''rc'''(ULONG) - returns Return codes.
RC_SUCCESS <br />RC_ERROR


;Parameters
;Parameters
 
:'''gid'''(GID) - input ID of the GRADD.
'''gid'''(GID) - input ID of the GRADD.
:'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_LINE.
 
:'''pIn'''(PVOID) - input Pointer to a [[LINEINFO]] or [[LINEINFO2]] data structure.
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_LINE.
:'''pOut'''(PVOID) - output NULL; no output structure is needed.
 
:'''rc'''(ULONG) - returns Return codes.
'''pIn'''(PVOID) - input Pointer to a [[01223.htm|LINEINFO]]or [[01235.htm|LINEINFO2]]data structure.
 
'''pOut'''(PVOID) - output NULL; no output structure is needed.
 
'''rc'''(ULONG) - returns Return codes.


RC_SUCCESS <br />RC_ERROR
RC_SUCCESS <br />RC_ERROR
Line 687: Line 418:
Since the LINEINFO2 mechanism was defined after several GRADDs were already released, a LINEINFO2 structure will not be passed to a GRADD unless the GRADD sets the DS_SIMPLE_LINES flag in the ulFCFlags member of the [[CAPSINFO]] structure returned for the [[GHI_CMD_QUERYCAPS]] function. Note that if a GRADD indicates it can handle the LINEINFO2 structure, it may still be passed a LINEINFO structure when that generality is needed.
Since the LINEINFO2 mechanism was defined after several GRADDs were already released, a LINEINFO2 structure will not be passed to a GRADD unless the GRADD sets the DS_SIMPLE_LINES flag in the ulFCFlags member of the [[CAPSINFO]] structure returned for the [[GHI_CMD_QUERYCAPS]] function. Note that if a GRADD indicates it can handle the LINEINFO2 structure, it may still be passed a LINEINFO structure when that generality is needed.


=== VMI_CMD_MOVEPTR ===
====VMI_CMD_MOVEPTR====
;Syntax
;Syntax
Description:
Description:
Line 703: Line 434:
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>


;Parameter - gid
;Parameters
'''gid'''(GID) - input ID of the GRADD.
:'''gid'''(GID) - input ID of the GRADD.
 
:'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_MOVEPTR.
=== VMI_CMD_MOVEPTR Parameter - ulFunction ===
:'''pIn'''(PVOID) - input Pointer to an [[HWMOVEPTRIN]] data structure.
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_MOVEPTR.
:'''pOut'''(PVOID) - output NULL; no output structure is needed.
 
:'''rc'''(ULONG) - returns Return codes.
=== VMI_CMD_MOVEPTR Parameter - pIn ===
'''pIn'''(PVOID) - input Pointer to an [[HWMOVEPTRIN]] data structure.
 
=== VMI_CMD_MOVEPTR Parameter - pOut ===
'''pOut'''(PVOID) - output NULL; no output structure is needed.
 
=== VMI_CMD_MOVEPTR Return Value - rc ===
'''rc'''(ULONG) - returns Return codes.
 
RC_SUCCESS <br />RC_ERROR
 
=== VMI_CMD_MOVEPTR - Parameters ===
'''gid'''(GID) - input ID of the GRADD.
 
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_MOVEPTR.
 
'''pIn'''(PVOID) - input Pointer to an [[HWMOVEPTRIN]] data structure.
 
'''pOut'''(PVOID) - output NULL; no output structure is needed.
 
'''rc'''(ULONG) - returns Return codes.


RC_SUCCESS <br />RC_ERROR
RC_SUCCESS <br />RC_ERROR


=== VMI_CMD_MOVEPTR - Remarks ===
====VMI_CMD_PALETTE====
None.
 
=== VMI_CMD_PALETTE ===
;Syntax
;Syntax
Description:
Description:
Line 742: Line 449:
This function is called to query or set the hardware color palette. VMAN sends this command directly to the GRADD chain identified by the GRADD ID provided by the caller.
This function is called to query or set the hardware color palette. VMAN sends this command directly to the GRADD chain identified by the GRADD ID provided by the caller.


The GRADD is expected to respond by describing the palette in a given array or by using the palette given in the array. The GRADD is always given an [[01142.htm|HWPALETTEINFO]]structure with either the PALETTE_GET or PALETTE_SET flag to specifiy the operation to perform.
The GRADD is expected to respond by describing the palette in a given array or by using the palette given in the array. The GRADD is always given an [[HWPALETTEINFO]] structure with either the PALETTE_GET or PALETTE_SET flag to specifiy the operation to perform.


<pre class="western">#include &lt;GRADD.h&gt;
<pre>#include &lt;GRADD.h&gt;


GID      gid;        /*  ID of the GRADD. */
GID      gid;        /*  ID of the GRADD. */
Line 754: Line 461:
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>


=== VMI_CMD_PALETTE Parameter - gid ===
;Parameters
'''gid'''(GID) - input ID of the GRADD.
:'''gid'''(GID) - input ID of the GRADD.
 
:'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_PALETTE.
=== VMI_CMD_PALETTE Parameter - ulFunction ===
:'''pIn'''(PVOID) - input Pointer to an [[HWPALETTEINFO]] data structure.
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_PALETTE.
:'''pOut'''(PVOID) - output NULL; no output structure is needed.
 
::If '_SET' is specified by ''pIn, pOut''If '_GET' is specified by ''pIn, pOut''is a pointer to an [[HWPALETTEINFO]] data structure.
=== VMI_CMD_PALETTE Parameter - pIn ===
'''pIn'''(PVOID) - input Pointer to an [[01142.htm|HWPALETTEINFO]]data structure.
 
=== VMI_CMD_PALETTE Parameter - pOut ===
'''pOut'''(PVOID) - output NULL; no output structure is needed.
 
=== VMI_CMD_PALETTE Return Value - rc ===
'''rc'''(ULONG) - returns Return codes.
 
RC_SUCCESS <br />RC_ERROR
 
=== VMI_CMD_PALETTE - Parameters ===
'''gid'''(GID) - input ID of the GRADD.
 
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_PALETTE.
 
'''pIn'''(PVOID) - input Pointer to an [[01142.htm|HWPALETTEINFO]]data structure.
 
'''pOut'''(PVOID) - output NULL; no output structure is needed.
 
If '_SET' is specified by ''pIn, pOut''If '_GET' is specified by ''pIn, pOut''is a pointer to an [[01142.htm|HWPALETTEINFO]]data structure.


'''rc'''(ULONG) - returns Return codes.
'''rc'''(ULONG) - returns Return codes.
Line 786: Line 472:
RC_SUCCESS <br />RC_ERROR
RC_SUCCESS <br />RC_ERROR


=== VMI_CMD_PALETTE - Remarks ===
====VMI_CMD_QUERYCAPS====
None.
 
=== VMI_CMD_QUERYCAPS ===
;Syntax
;Syntax
Description:
Description:
Line 807: Line 490:
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>


=== VMI_CMD_QUERYCAPS Parameter - gid ===
;Parameters
'''gid'''(GID) - input ID of the GRADD.
:'''gid'''(GID) - input ID of the GRADD.
 
:'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_QUERYCAPS.
 
:'''pIn'''(PVOID) - input NULL.
=== VMI_CMD_QUERYCAPS Parameter - ulFunction ===
:'''pOut'''(PVOID) - output Pointer to a [[CAPSINFO]] data structure.
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_QUERYCAPS.
:'''rc'''(ULONG) - returns Return codes.
 
=== VMI_CMD_QUERYCAPS Parameter - pIn ===
'''pIn'''(PVOID) - input NULL.
 
 
=== VMI_CMD_QUERYCAPS Parameter - pOut ===
'''pOut'''(PVOID) - output Pointer to a [[01020.htm|CAPSINFO]]data structure.
 
=== VMI_CMD_QUERYCAPS Return Value - rc ===
'''rc'''(ULONG) - returns Return codes.


RC_SUCCESS <br />RC_ERROR
RC_SUCCESS <br />RC_ERROR


=== VMI_CMD_QUERYCAPS - Parameters ===
====VMI_CMD_QUERYCHAININFO====
 
'''gid'''(GID) - input ID of the GRADD.
 
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_QUERYCAPS.
 
'''pIn'''(PVOID) - input NULL.
 
'''pOut'''(PVOID) - output Pointer to a [[01020.htm|CAPSINFO]]data structure.
 
'''rc'''(ULONG) - returns Return codes.
 
RC_SUCCESS <br />RC_ERROR
 
=== VMI_CMD_QUERYCAPS - Remarks ===
None.
 
=== VMI_CMD_QUERYCHAININFO ===
;Syntax
;Syntax
Description:
Description:
Line 851: Line 507:
Each GRADDINFO structure contains information, such as capabilities and mode information, for a single GRADD. The [[CHAININFO]] structure contains a pointer to a linked list of GRADDINFO structures. If multiple GRADD chains are in use, the head CHAININFO structure contains a pointer to the next CHAININFO structure.
Each GRADDINFO structure contains information, such as capabilities and mode information, for a single GRADD. The [[CHAININFO]] structure contains a pointer to a linked list of GRADDINFO structures. If multiple GRADD chains are in use, the head CHAININFO structure contains a pointer to the next CHAININFO structure.


<pre class="western">#include &lt;GRADD.h&gt;
<pre>#include <GRADD.h>


GID      gid;        /*  NULL. */
GID      gid;        /*  NULL. */
Line 861: Line 517:
rc = VMIEntry(gid, ulFunction, pIn, pOut);</pre>
rc = VMIEntry(gid, ulFunction, pIn, pOut);</pre>


=== VMI_CMD_QUERYCHAININFO Parameter - gid ===
;Parameters
'''gid'''(GID) - input NULL.
:'''gid'''(GID) - input NULL.
 
:'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_QUERYCHAININFO.
=== VMI_CMD_QUERYCHAININFO Parameter - ulFunction ===
:'''pIn'''(PVOID) - input NULL.
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_QUERYCHAININFO.
:'''pOut'''(PVOID) - output Pointer to a [[VMIQCI]] data structure.
 
=== VMI_CMD_QUERYCHAININFO Parameter - pIn ===
'''pIn'''(PVOID) - input NULL.
 
=== VMI_CMD_QUERYCHAININFO Parameter - pOut ===
'''pOut'''(PVOID) - output Pointer to a [[01391.htm|VMIQCI]]data structure.
 
=== VMI_CMD_QUERYCHAININFO Return Value - rc ===
'''rc'''(ULONG) - returns Return codes.
 
RC_SUCCESS<br />RC_ERROR
 
=== VMI_CMD_QUERYCHAININFO - Parameters ===
'''gid'''(GID) - input NULL.
 
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_QUERYCHAININFO.
 
'''pIn'''(PVOID) - input NULL.
 
'''pOut'''(PVOID) - output Pointer to a [[01391.htm|VMIQCI]]data structure.


'''rc'''(ULONG) - returns Return codes.
'''rc'''(ULONG) - returns Return codes.
Line 891: Line 527:
RC_SUCCESS <br />RC_ERROR
RC_SUCCESS <br />RC_ERROR


=== VMI_CMD_QUERYCHAININFO - Remarks ===
====VMI_CMD_QUERYMODES====
None.
 
=== VMI_CMD_QUERYMODES ===
;Syntax
;Syntax
Description:
Description:
Line 912: Line 545:
rc = VMIEntry(gid, ulFunction, pIn, pOut);</pre>
rc = VMIEntry(gid, ulFunction, pIn, pOut);</pre>


=== VMI_CMD_QUERYMODES Parameter - gid ===
;VMI_CMD_QUERYMODES - Parameters
'''gid'''(GID) - input ID of the GRADD.
:'''gid'''(GID) - input ID of the GRADD.
 
:'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_QUERYMODES.
=== VMI_CMD_QUERYMODES Parameter - ulFunction ===
:'''pIn'''(PVOID) - input Pointer that identifies a QUERYMODE operation.
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_QUERYMODES.
::This pointer identifies one of the following operations:
 
:::QUERYMODE_NUM_MODES
=== VMI_CMD_QUERYMODES Parameter - pIn ===
:::QUERYMODE_MODE_DATA
'''pIn'''(PVOID) - input Pointer that identifies a QUERYMODE operation.
:'''pOut'''(PVOID) - output Pointer to the '''''pIn'''''operation.
 
::This pointer indicates one of the following, depending on the value of '''''pIn:'''''
This pointer identifies one of the following operations:
:::QUERYMODE_NUM_MODES Indicates a pointer to a ULONG containing the number of supported modes.
 
:::QUERYMODE_MODE_DATA Indicates a pointer to an array of [[GDDMODEINFO]] structures large enough for the number of supported modes.
QUERYMODE_NUM_MODES <br />QUERYMODE_MODE_DATA
 
=== VMI_CMD_QUERYMODES Parameter - pOut ===
'''pOut'''(PVOID) - output Pointer to the '''''pIn'''''operation.
 
This pointer indicates one of the following, depending on the value of '''''pIn:'''''


QUERYMODE_NUM_MODES Indicates a pointer to a ULONG containing the number of supported modes. <br />QUERYMODE_MODE_DATA Indicates a pointer to an array of [[GDDMODEINFO]] structures large enough for the number of supported modes.
=== VMI_CMD_QUERYMODES Return Value - rc ===
'''rc'''(ULONG) - returns Return codes.
'''rc'''(ULONG) - returns Return codes.
:RC_SUCCESS
:RC_ERROR


RC_SUCCESS <br />RC_ERROR
====VMI_CMD_REQUESTHW====
 
=== VMI_CMD_QUERYMODES - Parameters ===
'''gid'''(GID) - input ID of the GRADD.
 
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_QUERYMODES.
 
'''pIn'''(PVOID) - input Pointer that identifies a QUERYMODE operation.
 
This pointer identifies one of the following operations:
 
QUERYMODE_NUM_MODES <br />QUERYMODE_MODE_DATA
 
'''pOut'''(PVOID) - output Pointer to the '''''pIn'''''operation.
 
This pointer indicates one of the following, depending on the value of '''''pIn:'''''
 
QUERYMODE_NUM_MODES Indicates a pointer to a ULONG containing the number of supported modes. <br />QUERYMODE_MODE_DATA Indicates a pointer to an array of [[01092.htm|GDDMODEINFO]]structures large enough for the number of supported modes.
 
'''rc'''(ULONG) - returns Return codes.
 
RC_SUCCESS <br />RC_ERROR
 
=== VMI_CMD_QUERYMODES - Remarks ===
None.
 
=== VMI_CMD_REQUESTHW ===
;Syntax
;Syntax
Description:
Description:
Line 967: Line 567:
''VMI_CMD_REQUESTHW'' is called to request access to the video hardware. VMAN processes this command and sends a GHI_CMD_REQUESTHW call to the GRADD chain identified by the GRADD ID provided by the caller.
''VMI_CMD_REQUESTHW'' is called to request access to the video hardware. VMAN processes this command and sends a GHI_CMD_REQUESTHW call to the GRADD chain identified by the GRADD ID provided by the caller.


<pre class="western">#include &lt;GRADD.h&gt;
<pre class="western">#include <GRADD.h>


GID      gid;        /*  ID of the GRADD. */
GID      gid;        /*  ID of the GRADD. */
Line 977: Line 577:
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>


=== VMI_CMD_REQUESTHW Parameter - gid ===
;Parameters
'''gid'''(GID) - input ID of the GRADD.
:'''gid'''(GID) - input ID of the GRADD.
 
:'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_REQUESTHW.
=== VMI_CMD_REQUESTHW Parameter - ulFunction ===
:'''pIn'''(PVOID) - input Pointer to an [[HWREQIN]] data structure.
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_REQUESTHW.
:'''pOut'''(PVOID) - output NULL; no output structure is needed.
 
=== VMI_CMD_REQUESTHW Parameter - pIn ===
'''pIn'''(PVOID) - input Pointer to an [[01148.htm|HWREQIN]]data structure.
 
=== VMI_CMD_REQUESTHW Parameter - pOut ===
'''pOut'''(PVOID) - output NULL; no output structure is needed.
 
=== VMI_CMD_REQUESTHW Return Value - rc ===
'''rc'''(ULONG) - returns Return codes.
 
RC_SUCCESS <br />RC_ERROR
 
=== VMI_CMD_REQUESTHW - Parameters ===
'''gid'''(GID) - input ID of the GRADD.
 
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_REQUESTHW.
 
'''pIn'''(PVOID) - input Pointer to an [[HWREQIN]] data structure.
 
'''pOut'''(PVOID) - output NULL; no output structure is needed.


'''rc'''(ULONG) - returns Return codes.
'''rc'''(ULONG) - returns Return codes.
Line 1,007: Line 587:
RC_SUCCESS <br />RC_ERROR
RC_SUCCESS <br />RC_ERROR


=== VMI_CMD_REQUESTHW - Remarks ===
====VMI_CMD_SETMODE====
None.
 
=== VMI_CMD_SETMODE ===
;Syntax
;Syntax
Description:
Description:
Line 1,025: Line 602:
rc = HWENTRY(gid, ulFunction, pIn, pOut);</pre>
rc = HWENTRY(gid, ulFunction, pIn, pOut);</pre>


=== VMI_CMD_SETMODE Parameter - gid ===
;Parameters
'''gid'''(GID) - input ID of the GRADD.
:'''gid'''(GID) - input ID of the GRADD.
 
:'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_SETMODE.
=== VMI_CMD_SETMODE Parameter - ulFunction ===
:'''pIn'''(PVOID) - input Pointer to PULONG containing the ID of the requested mode.
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_SETMODE.
:'''pOut'''(PVOID) - output NULL.
 
=== VMI_CMD_SETMODE Parameter - pIn ===
'''pIn'''(PVOID) - input Pointer to PULONG containing the ID of the requested mode.
 
=== VMI_CMD_SETMODE Parameter - pOut ===
'''pOut'''(PVOID) - output NULL.
 
=== VMI_CMD_SETMODE Return Value - rc ===
'''rc'''(ULONG) - returns Return codes.
 
RC_SUCCESS <br />RC_ERROR
 
=== VMI_CMD_SETMODE - Parameters ===
'''gid'''(GID) - input ID of the GRADD.
 
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_SETMODE.
 
'''pIn'''(PVOID) - input Pointer to PULONG containing the ID of the requested mode.
 
'''pOut'''(PVOID) - output NULL.


'''rc'''(ULONG) - returns Return codes.
'''rc'''(ULONG) - returns Return codes.
Line 1,055: Line 612:
RC_SUCCESS <br />RC_ERROR
RC_SUCCESS <br />RC_ERROR


=== VMI_CMD_SETMODE - Remarks ===
====VMI_CMD_SETPTR====
None.
 
=== VMI_CMD_SETPTR ===
;Syntax
;Syntax
Description:
Description:
Line 1,074: Line 628:
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>


=== VMI_CMD_SETPTR Parameter - gid ===
;Parameters ===
'''gid'''(GID) - input ID of the GRADD.
:'''gid'''(GID) - input ID of the GRADD.
 
:'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_SETPTR.
=== VMI_CMD_SETPTR Parameter - ulFunction ===
:'''pIn'''(PVOID) - input Pointer to an [[HWSETPTRIN]] data structure.
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_SETPTR.
:'''pOut'''(PVOID) - output Pointer to an [[HWSETPTROUT]] data structure.
 
:'''rc'''(ULONG) - returns Return codes.
=== VMI_CMD_SETPTR Parameter - pIn ===
'''pIn'''(PVOID) - input Pointer to an [[01153.htm|HWSETPTRIN]]data structure.
 
=== VMI_CMD_SETPTR Parameter - pOut ===
'''pOut'''(PVOID) - output Pointer to an [[01162.htm|HWSETPTROUT]]data structure.
 
=== VMI_CMD_SETPTR Return Value - rc ===
'''rc'''(ULONG) - returns Return codes.
 
RC_SUCCESS <br />RC_ERROR
 
=== VMI_CMD_SETPTR - Parameters ===
'''gid'''(GID) - input ID of the GRADD.
 
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_SETPTR.
 
'''pIn'''(PVOID) - input Pointer to an [[01153.htm|HWSETPTRIN]]data structure.
 
'''pOut'''(PVOID) - output Pointer to an [[01162.htm|HWSETPTROUT]]data structure.
 
'''rc'''(ULONG) - returns Return codes.


RC_SUCCESS <br />RC_ERROR
RC_SUCCESS <br />RC_ERROR


=== VMI_CMD_SETPTR - Remarks ===
====VMI_CMD_SHOWPTR====
None.
 
=== VMI_CMD_SHOWPTR ===
;Syntax
;Syntax
Description:
Description:
Line 1,113: Line 643:
''VMI_CMD_SHOWPTR'' sets the visibility state of the pointer. VMAN sends this command to the GRADD chain identified by the GRADD ID provided by the caller.
''VMI_CMD_SHOWPTR'' sets the visibility state of the pointer. VMAN sends this command to the GRADD chain identified by the GRADD ID provided by the caller.


<pre class="western">#include &lt;GRADD.h&gt;
<pre>#include <GRADD.h>


GID      gid;        /*  ID of the GRADD. */
GID      gid;        /*  ID of the GRADD. */
Line 1,133: Line 663:
RC_SUCCESS <br />RC_ERROR
RC_SUCCESS <br />RC_ERROR


=== VMI_CMD_TERM ===
====VMI_CMD_TERM====
;Syntax
;Syntax
Description:
Description:
Line 1,139: Line 669:
''VMI_CMD_TERM'' is called by a translation layer when it no longer requires the services of VMAN.
''VMI_CMD_TERM'' is called by a translation layer when it no longer requires the services of VMAN.


<pre>#include &lt;GRADD.h&gt;
<pre>#include <GRADD.h>


GID      gid;        /*  NULL; parameter ignored by VMAN. */
GID      gid;        /*  NULL; parameter ignored by VMAN. */
Line 1,159: Line 689:
RC_SUCCESS <br />RC_ERROR
RC_SUCCESS <br />RC_ERROR


=== VMI_CMD_TERMPROC ===
====VMI_CMD_TERMPROC====
;Syntax
;Syntax
Description:
Description:
Line 1,174: Line 704:


rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>
;Parameter - gid
'''gid'''(GID) - input ID of the GRADD.
;Parameter - ulFunction
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_TERMPROC.
;Parameter - pIn
'''pIn'''(PVOID) - input NULL.
;Parameter - pOut
'''pOut'''(PVOID) - output NULL.
;Return Value - rc
'''rc'''(ULONG) - returns Return codes.
:RC_SUCCESS
:RC_ERROR


;Parameters
;Parameters
Line 1,202: Line 715:
:RC_ERROR
:RC_ERROR


=== VMI_CMD_TEXT ===
====VMI_CMD_TEXT====
;Syntax
;Syntax
Description:
Description:
Line 1,217: Line 730:


rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>
;Parameter - gid
'''gid'''(GID) - input ID of the GRADD.
;Parameter - ulFunction
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_TEXT.
;Parameter - pIn
'''pIn'''(PVOID) - input Pointer to a [[TEXTBLTINFO]] data structure.
;Parameter - pOut
'''pOut'''(PVOID) - output Null; no output structure needed.
;Return Value - rc
'''rc'''(ULONG) - returns Return codes.
RC_ERROR <br />RC_SIMULATE <br />RC_SUCCESS <br />RC_UNSUPPORTED


;Parameters
;Parameters
'''gid'''(GID) - input ID of the GRADD.
:'''gid'''(GID) - input ID of the GRADD.
 
:'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_TEXT.
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_TEXT.
:'''pIn'''(PVOID) - input Pointer to a [[TEXTBLTINFO]] data structure.
 
:'''pOut'''(PVOID) - output Null; no output structure needed.
'''pIn'''(PVOID) - input Pointer to a [[01312.htm|TEXTBLTINFO]]data structure.
 
'''pOut'''(PVOID) - output Null; no output structure needed.


'''rc'''(ULONG) - returns Return codes.
'''rc'''(ULONG) - returns Return codes.
Line 1,250: Line 743:
:RC_UNSUPPORTED
:RC_UNSUPPORTED


=== VMI_CMD_USERCAPS ===
====VMI_CMD_USERCAPS====
;Syntax
;Syntax
Description:
Description:
Line 1,272: Line 765:


rc = VMIENTRY(gid, ulFunc, pIn, pOut);</pre>
rc = VMIENTRY(gid, ulFunc, pIn, pOut);</pre>
;Parameter - gid
'''gid'''(GID) - input ID of the GRADD.
;Parameter - ulFunc
'''ulFunc'''(ULONG) - input Set equal to VMI_CMD_USERCAPS.
;Parameter - pIn
'''pIn'''([[PUSERCAPSIN]]) - input Pointer to a [[USERCAPSIN]] data structure.
;Parameter - pOut
'''pOut'''(PVOID) - output Pointer to a buffer area.
Pointer to a buffer area whose format depends on the value of the ulFunction field of the [[USERCAPSIN]] structure pointed to by pIn.
If pIn->ulFunction is QUERYCAPS, pOut points to a ULONG count followed by an array of [[DRIVERCAPS]] structures. If pIn->ulFunction is QUERYCAPSLIST or SETCAP, pOut points to a [[DRIVERCAPS]] structure.
The length of the buffer area provided is specified by the ulSize field of the [[USERCAPSIN]] structure pointed to by pIn.
;Return Value - rc
'''rc'''(ULONG) - returns Return codes.
:RC_UNSUPPORTED
:RC_SUCCESS
:RC_ERROR


;Parameters
;Parameters
Line 1,314: Line 783:
:RC_ERROR
:RC_ERROR


=== VMI_CMD_VRAM ===
====VMI_CMD_VRAM====
;Syntax
;Syntax
Description:
Description:
Line 1,329: Line 798:


rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre>
;Parameter - gid
'''gid'''(GID) - input ID of the GRADD.
;Parameter - ulFunction
'''ulFunction'''(ULONG) - input Set equal to VMI_CMD_VRAM.
;Parameter - pIn
'''pIn'''(PVOID) - input Pointer to a [[VRAMIN]] data structure.
;Parameter - pOut
'''pOut'''(PVOID) - output Pointer to a function-specific output data structure.
If the ulFunction field of the [[VRAMIN]] structure pointed to by pIn is set to VRAM_ALLOCATE, VRAM_DEALLOCATE, or VRAM_QUERY, then pOut points to a [[VRAMALLOCOUT]] data structure.
If the ulFunction field of the [[VRAMIN]] structure pointed to by pIn is set to VRAM_REGISTER or VRAM_DEREGISTER, then pOut points to a [[VRAMREGISTEROUT]] data structure.
;Return Value - rc
'''rc'''(ULONG) - returns Return codes.
:RC_UNSUPPORTED
:RC_SUCCESS
:RC_ERROR


;Parameters
;Parameters

Revision as of 04:50, 4 January 2017

This chapter describes the functions, called by the Video Manager (VMAN), that are designated by the prefix VMI_CMD_. Refer to Graphics Adapter Device Drivers for descriptions of the Graphics Hardware Interface functions and to Enhanced Direct Interface Video Extension (EnDIVE) Functions for descriptions of the EnDIVE functions.

VMI_CMD_xx Functions and GHI_CMD_xx Functions

There are only a few differences between the VMAN protocol, Video Manager Interface (VMI), and the GRADD protocol, Graphics Hardware Interface (GHI). In fact, the majority of the functions are identical, with only the prefix (VMI or GHI) indicating to which component the function belongs.

The common functions are as follows:

VMI GHI
VMI_CMD_BANK GHI_CMD_BANK
VMI_CMD_BITBLT GHI_CMD_BITBLT
VMI_CMD_EVENT GHI_CMD_EVENT
VMI_CMD_EXTENSION GHI_CMD_EXTENSION
VMI_CMD_INIT GHI_CMD_INIT
VMI_CMD_INITPROC GHI_CMD_INITPROC
VMI_CMD_LINE GHI_CMD_LINE
VMI_CMD_MOVEPTR GHI_CMD_MOVEPTR
VMI_CMD_PALETTE GHI_CMD_PALETTE
VMI_CMD_QUERYCAPS GHI_CMD_QUERYCAPS
VMI_CMD_QUERYMODES GHI_CMD_QUERYMODES
VMI_CMD_REQUESTHW GHI_CMD_REQUESTHW
VMI_CMD_SETMODE GHI_CMD_SETMODE
VMI_CMD_SETPTR GHI_CMD_SETPTR
VMI_CMD_SHOWPTR GHI_CMD_SHOWPTR
VMI_CMD_TERM GHI_CMD_TERM
VMI_CMD_TERMPROC GHI_CMD_TERMPROC
VMI_CMD_TEXT GHI_CMD_TEXT
VMI_CMD_USERCAPS GHI_CMD_USERCAPS
VMI_CMD_VRAM GHI_CMD_VRAM

Note: The VMI_CMD_QUERYCHAININFO function has no corresponding GHI function.

VMAN and GRADD Entry Points

The main difference between the two types of functions (VMI_ and GHI_) is that the ulFunction parameter in VMIEntry and HWEntry points to the respective VMI_ or GHI_ function name.

VMI GHI
VMIEntry HWEntry

Video Helper Functions

The following list identifies the VMI video helper functions:

VHAllocMem

Syntax

Description:

VHAllocMem returns a 32-bit pointer to a piece of memory. The caller of this function supplies the byte count required. This function is a helper service for operations that are common across all GRADDs.

#include <GRADD.h>

ULONG    cBytes;  /*  Number of bytes of memory requested. */
PVOID    pMem;    /*  Returned address of allocated memory, or NULL. */

pMem = VHAllocMem(cBytes);
Parameters
cBytes(ULONG) - input Number of bytes of memory required.
Indicates the number of bytes of memory required for this allocation request.
pMem(PVOID) - returns Return value.
Success Returns pointer to allocated memory.
Error Returns NULL pointer.
Remarks

Memory is valid across all processes.

VHFreeMem

Syntax

Description:

VHFreeMem frees memory that has been allocated via the VHAllocMem helper. This function is a helper service for operations that are common across all GRADDs.

#include <GRADD.h>

PVOID    pMem;  /*  Pointer to previous memory allocation. */
ULONG    rc;    /*  Return codes. */

rc = VHFreeMem(pMem);
Parameters
pMem(PVOID) - input Pointer to memory previously allocated using VHAllocMem.
rc(ULONG) - returns Return codes.
RC_SUCCESS
RC_ERROR

VHLockMem

Syntax

Description:

VHLockMem makes code or data segments available for ring 0 interrupt-time processing. At interrupt time, code and data segments must be non-swappable and accessible from the ring 0 context.

#include <GRADD.h>

PVOID    pAddress;  /*  Address within the first page of code or data. */
ULONG    ulLength;  /*  Size of code or data segment. */
BOOL     fData;     /*  FALSE indicates code segment; TRUE indicates data segment. */
ULONG    rc;        /*  Return value. */

rc = VHLockMem(pAddress, ulLength, fData);
Parameters
pAddress(PVOID) - input Address within the first page of code or data.
ulLength(ULONG) - input Size of code or data segment.
fData(BOOL) - input FALSE indicates code segment; TRUE indicates data segment.
rc(ULONG) - returns Return value.

Non-zero lockhandle indicates success; zero indicates error.

VHPhysToVirt

Syntax

Description:

VHPhysToVirt converts physical address ranges to linear virtual address ranges for processes using VMI.

#include <GRADD.h>

PMEMINFO  pMemInfo; /* Pointer to linked list of MEMINFO structures defining address ranges. */
ULONG     rc;

rc = VHPhysToVirt (pMemInfo);
Parameters
pMemInfo(PMEMINFO) - input Pointer to linked list of MEMINFO structures defining address ranges.
rc(ULONG) - returns Return codes.
Remarks

Linear virtual address ranges are valid for all processes.

VHMap

Syntax

Description:

VHMap aliases process memory to a global ring 0 context.

#include <GRADD.h>

PVOID    pAddress;  /*  Address within the first page of code or data. */
ULONG    ulLength;  /*  Size of code or data segment. */
ULONG    rc;        /*  Return value. */

rc = VHMap(pAddress, ulLength);
Parameters
pAddress(PVOID) - input Address within the first page of code or data.
ulLength(ULONG) - input Size of code or data segment.
rc(ULONG) - returns Return value.

Non-zero indicates ring 0 alias address; zero indicates error.

VHMapVRAM

Syntax

Description:

VHMapVRAM converts the physical address of VRAM to linear virtual aperture for both process and global ring 0 context.

#include <GRADD.h>

ULONG      ulPhysAddr;  /*  Physical address of the start of the VRAM aperture. */
ULONG      ulLength;    /*  Length of VRAM aperture. */
PBYTE     *pVRAM;       /*  Returned process virtual linear aperture pointer. */
PBYTE     *pVRAMRing0;  /*  Returned ring 0 virtual linear aperture pointer. */
ULONG      rc;          /*  Return value. */

rc = VHMapVRAM(ulPhysAddr, ulLength, pVRAM, pVRAMRing0);
Parameters
ulPhysAddr(ULONG) - input Physical address of the start of the VRAM aperture.
ulLength(ULONG) - input Length of VRAM aperture.
pVRAM(PBYTE *) - output Returned process virtual linear aperture pointer.
pVRAMRing0(PBYTE *) - output Returned ring 0 virtual linear aperture pointer.
rc(ULONG) - returns Return value.
RC_SUCCESS or RC_ERROR.
Remarks

VHMapVRAM must be used instead of VHPhysToVirt() and VHMap() for the frame buffer so that the ring 0 address is available for SoftDraw. For other physical memory areas needed by GRADD at interrupt time, use VHPhysToVirt() and VHMap().

The ulPhysAddr and ulLength parameters for VHMapVRAM() and VHPhysToVirt() are usually obtained from the VIDEOPMI function PMIREQUEST_SETMODE.

The Video Manager Interface Functions

The remainder of this chapter contains a detailed description of the Video Manager interface. Proceed to the following alphabetical list for a description of each function. Helper functions and entry points are included for easy reference.

VMIEntry

Syntax

Description:

VMIEntry is the single exported function from the Video Manager component. It is part of the Video Manager Interface (VMI) protocol and receives operations from the translation layer components.

#include <GRADD.h>

GID      gid;         /*  ID of the GRADD. */
ULONG    ulFunction;  /*  Set to appropriate VMI_CMD_ function. */
PVOID    pIn;         /*  Pointer to applicable data structure. */
PVOID    pOut;        /*  Pointer to applicable data structure. */
ULONG    rc;          /*  Return codes. */

rc = VMIEntry(gid, ulFunction, pIn, pOut);
Parameters
gid(GID) - input ID of the GRADD.
ulFunction(ULONG) - input Set to appropriate VMI_CMD_ function.
This parameter is set to one of the VMI_CMD_ functions shown in the table of common functions shown at the beginning of this section.
pIn(PVOID) - input Pointer to applicable data structure.
pOut(PVOID) - output Pointer to applicable data structure.
rc(ULONG) - returns Return codes.

Valid values are dictated by the applicable VMI_CMD_ function.

VMI_CMD_BANK

Syntax

Description:

VMI_CMD_BANK is called to set or get the region or bank number of the video display. VMAN passes this command directly to the GRADD chain identified by the GRADD ID provided by the caller.

#include <GRADD.h>

GID      gid;         /*  ID of the GRADD. */
ULONG    ulFunction;  /*  Set equal to VMI_CMD_BANK. */
PVOID    pIn;         /*  Pointer to a HWBANKIN data structure. */
PVOID    pOut;        /*  Pointer to HWBANKOUT data structure. */
ULONG    rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);
Parameters
gid(GID) - input ID of the GRADD.
ulFunction(ULONG) - input Set equal to VMI_CMD_BANK.
pIn(PVOID) - input Pointer to a HWBANKIN data structure.
pOut(PVOID) - output Pointer to HWBANKOUT data structure.

rc(ULONG) - returns Return codes.

RC_ERROR
RC_SUCCESS
RC_UNSUPPORTED

VMI_CMD_BITBLT

Syntax

Description:

VMI_CMD_BITBLT is called to blit a rectangle or series of rectangles to or from the video display. VMAN passes this command directly to the GRADD chain identified by the GRADD ID provided by the caller.

#include <GRADD.h>

GID      gid;         /*  ID of the GRADD. */
ULONG    ulFunction;  /*  Set equal to VMI_CMD_BITBLT. */
PVOID    pIn;         /*  Pointer to a BITBLTINFO data structure. */
PVOID    pOut;        /*  Null; no output structure needed. */
ULONG    rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);
Parameters
gid(GID) - input ID of the GRADD.
ulFunction(ULONG) - input Set equal to VMI_CMD_BITBLT.
pIn(PVOID) - input Pointer to a BITBLTINFO data structure.
pOut(PVOID) - output Null; no output structure needed.
rc(ULONG) - returns Return codes.
RC_SUCCESS
RC_ERROR

VMI_CMD_EVENT

Syntax

Description:

VMI_CMD_EVENTis called to notify a GRADD of specific events. VMAN sends this command directly to the GRADD chain identified by the GRADD ID.

#include <GRADD.h>

GID      gid;         /*  ID of the GRADD. */
ULONG    ulFunction;  /*  Set equal to VMI_CMD_EVENT. */
PVOID    pIn;         /*  Pointer to an HWEVENTIN data structure. */
PVOID    pOut;        /*  NULL; no output structure needed. */
ULONG    rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);
Parameters
gid(GID) - input ID of the GRADD.
ulFunction(ULONG) - input Set equal to VMI_CMD_EVENT.
pIn(PVOID) - input Pointer to an HWEVENTIN data structure.
pOut(PVOID) - output NULL; no output structure needed.
rc(ULONG) - returns Return codes.
RC_UNSUPPORTED
RC_SUCCESS

VMI_CMD_EXTENSION

Syntax

Description:

VMI_CMD_EXTENSION is called to send an extension command to a GRADD. VMAN sends this command directly to the GRADD chain identified by the GRADD ID provided by the caller.

#include <GRADD.h>

GID      gid;         /*  ID of the GRADD. */
ULONG    ulFunction;  /*  Set equal to VMI_CMD_EXTENSION. */
PVOID    pIn;         /*  Pointer to an HWEXTENSION data structure. */
PVOID    pOut;        /*  Pointer to an extension-specific output structure. */
ULONG    rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);
Parameters
gid(GID) - input ID of the GRADD.
ulFunction(ULONG) - input Set equal to VMI_CMD_EXTENSION.
pIn(PVOID) - input Pointer to an HWEXTENSION data structure.
pOut(PVOID) - output Pointer to an extension-specific output structure.
rc(ULONG) - returns Return codes.

RC_UNSUPPORTED
RC_SUCCESS
RC_ERROR

VMI_CMD_INIT

Syntax

Description:

VMI_CMD_INITinforms the Video Manager (VMAN) that a translation layer has been loaded and that VMAN may need to be initialized. VMAN initializes itself once only; subsequent VMI_CMD_INIT calls are ignored.

During the first initialization, VMAN loads SOFTDRAW and all of the GRADDs specified by the environment variables.

#include <GRADD.h>

GID      gid;         /*  NULL. */
ULONG    ulFunction;  /*  Set equal to VMI_CMD_INIT. */
PVOID    pIn;         /*  NULL. */
PVOID    pOut;        /*  NULL. */
ULONG    rc;          /*  Return codes. */

rc = VMIEntry(gid, ulFunction, pIn, pOut);
Parameters
gid(GID) - input NULL.
ulFunction(ULONG) - input Set equal to VMI_CMD_INIT.
pIn(PVOID) - input NULL.
pOut(PVOID) - output NULL.
rc(ULONG) - returns Return codes.

RC_SUCCESS
RC_ERROR

VMI_CMD_INITPROC

Syntax

Description:

VMI_CMD_INITPROC informs VMAN that a new process is being initialized. It indicates that this new process intends to be a client of the VMAN component.

VMAN ensures that all data and code is valid under this new process.

#include <GRADD.h>

GID      gid;         /*  NULL. */
ULONG    ulFunction;  /*  Set equal to VMI_CMD_INITPROC. */
PVOID    pIn;         /*  NULL. */
PVOID    pOut;        /*  Pointer to an INITPROCOUT data structure. */
ULONG    rc;          /*  Return codes. */

rc = VMIEntry(gid, ulFunction, pIn, pOut);
Parameters
gid(GID) - input NULL.
ulFunction(ULONG) - input Set equal to VMI_CMD_INITPROC.
pIn(PVOID) - input NULL.
pOut(PVOID) - output Pointer to an INITPROCOUT data structure.
rc(ULONG) - returns Return codes.
RC_SUCCESS
RC_ERROR

VMI_CMD_LINE

Syntax

Description:

VMI_CMD_LINE is called to draw a line to the video display. VMAN sends this command directly to the GRADD chain identified by the GRADD ID provided by the caller.

#include <GRADD.h>

GID      gid;         /*  ID of the GRADD. */
ULONG    ulFunction;  /*  Set equal to VMI_CMD_LINE. */
PVOID    pIn;         /*  Pointer to a LINEINFO or LINEINFO2 data structure. */
PVOID    pOut;        /*  NULL; no output structure is needed. */
ULONG    rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);
Parameters
gid(GID) - input ID of the GRADD.
ulFunction(ULONG) - input Set equal to VMI_CMD_LINE.
pIn(PVOID) - input Pointer to a LINEINFO or LINEINFO2 data structure.
pOut(PVOID) - output NULL; no output structure is needed.
rc(ULONG) - returns Return codes.

RC_SUCCESS
RC_ERROR

Remarks

The LINEINFO structure can describe a sequence of line segments where each line segment may be clipped. The LINEINFO2 structure describes a sequence of line segments where only the start of the first segment and the end of the last segment may be clipped. For many cases, the simpler LINEINFO2 data can be generated more efficiently than for the more general LINEINFO data.

The LINEINFO and LINEINFO2 structures can be differentiated using the ulLength field at the start of each structure.

Since the LINEINFO2 mechanism was defined after several GRADDs were already released, a LINEINFO2 structure will not be passed to a GRADD unless the GRADD sets the DS_SIMPLE_LINES flag in the ulFCFlags member of the CAPSINFO structure returned for the GHI_CMD_QUERYCAPS function. Note that if a GRADD indicates it can handle the LINEINFO2 structure, it may still be passed a LINEINFO structure when that generality is needed.

VMI_CMD_MOVEPTR

Syntax

Description:

VMI_CMD_MOVEPTR is called to change the position of the pointer hot spot. VMAN sends this command directly to the GRADD chain identified by the GRADD ID provided by the caller.

#include <GRADD.h>;

GID      gid;         /*  ID of the GRADD. */
ULONG    ulFunction;  /*  Set equal to VMI_CMD_MOVEPTR. */
PVOID    pIn;         /*  Pointer to an HWMOVEPTRIN data structure. */
PVOID    pOut;        /*  NULL; no output structure is needed. */
ULONG    rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);
Parameters
gid(GID) - input ID of the GRADD.
ulFunction(ULONG) - input Set equal to VMI_CMD_MOVEPTR.
pIn(PVOID) - input Pointer to an HWMOVEPTRIN data structure.
pOut(PVOID) - output NULL; no output structure is needed.
rc(ULONG) - returns Return codes.

RC_SUCCESS
RC_ERROR

VMI_CMD_PALETTE

Syntax

Description:

This function is called to query or set the hardware color palette. VMAN sends this command directly to the GRADD chain identified by the GRADD ID provided by the caller.

The GRADD is expected to respond by describing the palette in a given array or by using the palette given in the array. The GRADD is always given an HWPALETTEINFO structure with either the PALETTE_GET or PALETTE_SET flag to specifiy the operation to perform.

#include <GRADD.h>

GID      gid;         /*  ID of the GRADD. */
ULONG    ulFunction;  /*  Set equal to VMI_CMD_PALETTE. */
PVOID    pIn;         /*  Pointer to an HWPALETTEINFO data structure. */
PVOID    pOut;        /*  NULL; no output structure is needed. */
ULONG    rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);
Parameters
gid(GID) - input ID of the GRADD.
ulFunction(ULONG) - input Set equal to VMI_CMD_PALETTE.
pIn(PVOID) - input Pointer to an HWPALETTEINFO data structure.
pOut(PVOID) - output NULL; no output structure is needed.
If '_SET' is specified by pIn, pOutIf '_GET' is specified by pIn, pOutis a pointer to an HWPALETTEINFO data structure.

rc(ULONG) - returns Return codes.

RC_SUCCESS
RC_ERROR

VMI_CMD_QUERYCAPS

Syntax

Description:

VMI_CMD_QUERYCAPS returns the capabilities of a particular GRADD. VMAN sends this command directly to the GRADD chain identified by the GRADD ID provided by the caller.

VMI_CMD_QUERYCAPS is not typically used by translation layers because the VMI_CMD_QUERYCHAININFO function returns the capabilities of all GRADDs, as opposed to just one. VMI_CMD_QUERYCHAININFO is the recommended way of querying the capabilities of all GRADDs in the system.

#include <GRADD.h>

GID      gid;         /*  ID of the GRADD. */
ULONG    ulFunction;  /*  Set equal to VMI_CMD_QUERYCAPS. */
PVOID    pIn;         /*  NULL. */
PVOID    pOut;        /*  Pointer to a CAPSINFO data structure. */
ULONG    rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);
Parameters
gid(GID) - input ID of the GRADD.
ulFunction(ULONG) - input Set equal to VMI_CMD_QUERYCAPS.
pIn(PVOID) - input NULL.
pOut(PVOID) - output Pointer to a CAPSINFO data structure.
rc(ULONG) - returns Return codes.

RC_SUCCESS
RC_ERROR

VMI_CMD_QUERYCHAININFO

Syntax

Description:

VMI_CMD_QUERYCHAININFO is unique to VMAN (there is no corresponding function in the Graphics Hardware Interface). This function is called to obtain a pointer to the video chain information, which contains information about every GRADD currently loaded.

Each GRADDINFO structure contains information, such as capabilities and mode information, for a single GRADD. The CHAININFO structure contains a pointer to a linked list of GRADDINFO structures. If multiple GRADD chains are in use, the head CHAININFO structure contains a pointer to the next CHAININFO structure.

#include <GRADD.h>

GID      gid;         /*  NULL. */
ULONG    ulFunction;  /*  Set equal to VMI_CMD_QUERYCHAININFO. */
PVOID    pIn;         /*  NULL. */
PVOID    pOut;        /*  Pointer to a VMIQCI data structure. */
ULONG    rc;          /*  Return codes. */

rc = VMIEntry(gid, ulFunction, pIn, pOut);
Parameters
gid(GID) - input NULL.
ulFunction(ULONG) - input Set equal to VMI_CMD_QUERYCHAININFO.
pIn(PVOID) - input NULL.
pOut(PVOID) - output Pointer to a VMIQCI data structure.

rc(ULONG) - returns Return codes.

RC_SUCCESS
RC_ERROR

VMI_CMD_QUERYMODES

Syntax

Description:

VMI_CMD_QUERYMODES returns video mode information for a particular GRADD. VMAN passes this command directly to the GRADD chain identified by the GRADD ID provided by the caller.

VMI_CMD_QUERYMODES is not typically used by translation layers because the VMI_CMD_QUERYCHAININFO function returns the supported modes of all GRADDs, as opposed to just one. VMI_CMD_QUERYCHAININFO is the recommended way of querying the available modes of all GRADDs in the system.

#include <GRADD.h>

GID      gid;         /*  ID of the GRADD. */
ULONG    ulFunction;  /*  Set equal to VMI_CMD_QUERYMODES. */
PVOID    pIn;         /*  Pointer that identifies a QUERYMODE operation. */
PVOID    pOut;        /*  Pointer to the pIn operation. */
ULONG    rc;          /*  Return codes. */

rc = VMIEntry(gid, ulFunction, pIn, pOut);
VMI_CMD_QUERYMODES - Parameters
gid(GID) - input ID of the GRADD.
ulFunction(ULONG) - input Set equal to VMI_CMD_QUERYMODES.
pIn(PVOID) - input Pointer that identifies a QUERYMODE operation.
This pointer identifies one of the following operations:
QUERYMODE_NUM_MODES
QUERYMODE_MODE_DATA
pOut(PVOID) - output Pointer to the pInoperation.
This pointer indicates one of the following, depending on the value of pIn:
QUERYMODE_NUM_MODES Indicates a pointer to a ULONG containing the number of supported modes.
QUERYMODE_MODE_DATA Indicates a pointer to an array of GDDMODEINFO structures large enough for the number of supported modes.

rc(ULONG) - returns Return codes.

RC_SUCCESS
RC_ERROR

VMI_CMD_REQUESTHW

Syntax

Description:

VMI_CMD_REQUESTHW is called to request access to the video hardware. VMAN processes this command and sends a GHI_CMD_REQUESTHW call to the GRADD chain identified by the GRADD ID provided by the caller.

#include <GRADD.h>

GID      gid;         /*  ID of the GRADD. */
ULONG    ulFunction;  /*  Set equal to VMI_CMD_REQUESTHW. */
PVOID    pIn;         /*  Pointer to an HWREQIN data structure. */
PVOID    pOut;        /*  NULL; no output structure is needed. */
ULONG    rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);
Parameters
gid(GID) - input ID of the GRADD.
ulFunction(ULONG) - input Set equal to VMI_CMD_REQUESTHW.
pIn(PVOID) - input Pointer to an HWREQIN data structure.
pOut(PVOID) - output NULL; no output structure is needed.

rc(ULONG) - returns Return codes.

RC_SUCCESS
RC_ERROR

VMI_CMD_SETMODE

Syntax

Description:

VMI_CMD_SETMODE sets the video display adapter to a given mode. VMAN passes this command directly to the GRADD chain identified by the GRADD ID provided by the caller. The GRADD is expected to set the video mode, given an ID of the chosen mode.

#include <GRADD.h>

GID      gid;         /*  ID of the GRADD. */
ULONG    ulFunction;  /*  Set equal to VMI_CMD_SETMODE. */
PVOID    pIn;         /*  Pointer to PULONG containing the ID of the requested mode. */
PVOID    pOut;        /*  NULL. */
ULONG    rc;          /*  Return codes. */

rc = HWENTRY(gid, ulFunction, pIn, pOut);
Parameters
gid(GID) - input ID of the GRADD.
ulFunction(ULONG) - input Set equal to VMI_CMD_SETMODE.
pIn(PVOID) - input Pointer to PULONG containing the ID of the requested mode.
pOut(PVOID) - output NULL.

rc(ULONG) - returns Return codes.

RC_SUCCESS
RC_ERROR

VMI_CMD_SETPTR

Syntax

Description:

VMI_CMD_SETPTR sets the pointer AND,XOR masks. VMAN sends this command to the GRADD chain identified by the GRADD ID provided by the caller.

#include <GRADD.h>

GID      gid;         /*  ID of the GRADD. */
ULONG    ulFunction;  /*  Set equal to VMI_CMD_SETPTR. */
PVOID    pIn;         /*  Pointer to an HWSETPTRIN data structure. */
PVOID    pOut;        /*  Pointer to an HWSETPTROUT data structure. */
ULONG    rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);
Parameters ===
gid(GID) - input ID of the GRADD.
ulFunction(ULONG) - input Set equal to VMI_CMD_SETPTR.
pIn(PVOID) - input Pointer to an HWSETPTRIN data structure.
pOut(PVOID) - output Pointer to an HWSETPTROUT data structure.
rc(ULONG) - returns Return codes.

RC_SUCCESS
RC_ERROR

VMI_CMD_SHOWPTR

Syntax

Description:

VMI_CMD_SHOWPTR sets the visibility state of the pointer. VMAN sends this command to the GRADD chain identified by the GRADD ID provided by the caller.

#include <GRADD.h>

GID      gid;         /*  ID of the GRADD. */
ULONG    ulFunction;  /*  Set equal to VMI_CMD_SHOWPTR. */
PVOID    pIn;         /*  Pointer to an HWSHOWPTRIN data structure. */
PVOID    pOut;        /*  NULL; no output structure needed. */
ULONG    rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);
Parameters
gid(GID) - input ID of the GRADD.
ulFunction(ULONG) - input Set equal to VMI_CMD_SHOWPTR.
pIn(PVOID) - input Pointer to an HWSHOWPTRIN data structure.
pOut(PVOID) - output NULL; no output structure needed.

rc(ULONG) - returns Return codes.

RC_SUCCESS
RC_ERROR

VMI_CMD_TERM

Syntax

Description:

VMI_CMD_TERM is called by a translation layer when it no longer requires the services of VMAN.

#include <GRADD.h>

GID      gid;         /*  NULL; parameter ignored by VMAN. */
ULONG    ulFunction;  /*  Set equal to VMI_CMD_TERM. */
PVOID    pIn;         /*  NULL. */
PVOID    pOut;        /*  NULL. */
ULONG    rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);
Parameters
gid(GID) - input NULL; parameter ignored by VMAN.
ulFunction(ULONG) - input Set equal to VMI_CMD_TERM.
pIn(PVOID) - input NULL.
pOut(PVOID) - output NULL.

rc(ULONG) - returns Return codes.

RC_SUCCESS
RC_ERROR

VMI_CMD_TERMPROC

Syntax

Description:

VMI_CMD_TERMPROC informs VMAN that an existing client process is being terminated. VMAN cleans up all resources owned by this process. VMAN passes this command directly to the GRADD chain identified by the GRADD ID provided by the caller.

#include <GRADD.h>

GID      gid;         /*  ID of the GRADD. */
ULONG    ulFunction;  /*  Set equal to VMI_CMD_TERMPROC. */
PVOID    pIn;         /*  NULL. */
PVOID    pOut;        /*  NULL. */
ULONG    rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);
Parameters
gid(GID) - input ID of the GRADD.
ulFunction(ULONG) - input Set equal to VMI_CMD_TERMPROC.
pIn(PVOID) - input NULL.
pOut(PVOID) - output NULL.

rc(ULONG) - returns Return codes.

RC_SUCCESS
RC_ERROR

VMI_CMD_TEXT

Syntax

Description:

VMI_CMD_TEXT is called to draw text to the video display. VMAN passes this command directly to the GRADD chain identified by the GRADD ID provided by the caller.

#include <GRADD.h>

GID      gid;         /*  ID of the GRADD. */
ULONG    ulFunction;  /*  Set equal to VMI_CMD_TEXT. */
PVOID    pIn;         /*  Pointer to a TEXTBLTINFO data structure. */
PVOID    pOut;        /*  Null; no output structure needed. */
ULONG    rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);
Parameters
gid(GID) - input ID of the GRADD.
ulFunction(ULONG) - input Set equal to VMI_CMD_TEXT.
pIn(PVOID) - input Pointer to a TEXTBLTINFO data structure.
pOut(PVOID) - output Null; no output structure needed.

rc(ULONG) - returns Return codes.

RC_ERROR
RC_SIMULATE
RC_SUCCESS
RC_UNSUPPORTED

VMI_CMD_USERCAPS

Syntax

Description:

VMI_CMD_USERCAPS enables and supports the CAPABILITIES button on the OS/2 System Object.

When the Video Configuration Manager presents the interface to the user, each capability is presented in a separate window page of the capabilities notebook in System Object. The window layout depends on the capability type :

Boolean type is represented by a check box.
Aggregate type is represented by a list box.

The capability description appears as the title for that control.

VMAN accumulates capabilities for all GRADDs, and routes capability settings to the specific GRADD that supports certain capabilities.

#include <GRADD.h>

GID            gid;     /*  ID of the GRADD. */
ULONG          ulFunc;  /*  Set equal to VMI_CMD_USERCAPS. */
PUSERCAPSIN    pIn;     /*  Pointer to a USERCAPSIN data structure. */
PVOID          pOut;    /*  Pointer to a buffer area. */
ULONG          rc;      /*  Return codes. */

rc = VMIENTRY(gid, ulFunc, pIn, pOut);
Parameters
gid(GID) - input ID of the GRADD.
ulFunc(ULONG) - input Set equal to VMI_CMD_USERCAPS.
pIn(PUSERCAPSIN) - input Pointer to a USERCAPSIN data structure.
pOut(PVOID) - output Pointer to a buffer area.

Pointer to a buffer area whose format depends on the value of the ulFunction field of the USERCAPSINstructure pointed to by pIn.

If pIn->ulFunction is QUERYCAPS, pOut points to a ULONG count followed by an array of DRIVERCAPS structures. If pIn->ulFunction is QUERYCAPSLIST or SETCAP, pOut points to a DRIVERCAPS structure.

The length of the buffer area provided is specified by the ulSize field of the USERCAPSIN structure pointed to by pIn.

rc(ULONG) - returns Return codes.

RC_UNSUPPORTED
RC_SUCCESS
RC_ERROR

VMI_CMD_VRAM

Syntax

Description:

VMI_CMD_VRAM is called to allocate off-screen video memory. VMAN sends this command to the GRADD chain identified by the GRADD ID provided by the caller.

#include <GRADD.h>

GID      gid;         /*  ID of the GRADD. */
ULONG    ulFunction;  /*  Set equal to VMI_CMD_VRAM. */
PVOID    pIn;         /*  Pointer to a VRAMIN data structure. */
PVOID    pOut;        /*  Pointer to a function-specific output data structure. */
ULONG    rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);
Parameters
gid(GID) - input ID of the GRADD.
ulFunction(ULONG) - input Set equal to VMI_CMD_VRAM.
pIn(PVOID) - input Pointer to a VRAMIN data structure.
pOut(PVOID) - output Pointer to a function-specific output data structure.

If the ulFunction field of the VRAMIN structure pointed to by pIn is set to VRAM_ALLOCATE, VRAM_DEALLOCATE, or VRAM_QUERY, then pOut points to a VRAMALLOCOUT data structure.

If the ulFunction field of the VRAMIN structure pointed to by pIn is set to VRAM_REGISTER or VRAM_DEREGISTER, then pOut points to a VRAMREGISTEROUT data structure.

rc(ULONG) - returns Return codes.

RC_UNSUPPORTED
RC_SUCCESS
RC_ERROR