home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
pascal
/
vdl020d.zip
/
VVDS.DOC
< prev
next >
Wrap
Text File
|
1993-04-14
|
5KB
|
168 lines
{
════════════════════════════════════════════════════════════════════════════
Visionix Virtual DMA Services Unit (VVDS)
Copyright 1991,92,93 Visionix
ALL RIGHTS RESERVED
────────────────────────────────────────────────────────────────────────────
Revision history in reverse chronological order:
Initials Date Comment
-------- -------- -------------------------------------------------------
mep 03/27/93 Unit created.
────────────────────────────────────────────────────────────────────────────
}
Unit VVDS;
{────────────────────────────────────────────────────────────────────────────}
Const
{-------------------------------------------}
{ Product Numbers - use with VVDSGetVersion }
{-------------------------------------------}
vdspnQMAPS = $0000; { Quadtel's QMAPS }
vdspnHPMM = $0000; { Hewlett-Packard's HPMM.SYS }
vdspnEMM386 = $0001; { Microsoft's EMM386.EXE }
vdspn386MAX = $4560; { Qualitas' 386MAX }
vdspnMC = $4D43; { V Communication's Memory Commander }
vdspnQEMM386 = $5145; { Quarterdeck's QEMM-386 }
vdsMaxArray = $F;
{-----------------------------------------}
{ Version Flags - use with VVDSGetVersion }
{-----------------------------------------}
vdsvfPCXTBus = $1; { DMA in first megabyte only }
vdsvfPhyBuf = $2; { Physical buffer/Remap region in first megabyte }
vdsvfAutoRemap = $4; { Automatic remap enabled }
vdsvfPhyCont = $8; { All memory is physically contiguous }
Type
TVDSErr = BYTE;
{---}
TDDS = RECORD { DMA descriptor }
RegionSize : LONGINT;
Offset : LONGINT;
SegSelector : WORD;
BufferID : WORD;
PhysicalAddr : LONGINT;
END;
PDDS = ^TDDS;
{---}
TEDDS_Header = RECORD
RegionSize : LONGINT;
Offset : LONGINT;
SegSelector : WORD;
Rsvp : WORD;
NumAvail : WORD;
NumUsed : WORD;
END;
TEDDS_Region = RECORD
PhysicalAddr : LONGINT;
Size : LONGINT;
END;
TEDDS_Array = Array[0..vdsMaxArray] of TEDDS_Region;
TEDDS = RECORD { Extended DMA descriptor }
Header : TEDDS_Header;
Region : TEDDS_Array;
END;
PEDDS = ^TEDDS;
{---}
TEDDSPageTable_Header = RECORD
RegionSize : LONGINT;
Offset : LONGINT;
SegSelector : WORD;
Rsvp : WORD;
NumAvail : WORD;
NumUsed : WORD;
END;
TEDDSPageTable_Region = RECORD
Entry : LONGINT;
END;
TEDDSPageTable_Array = Array[0..vdsMaxArray] of TEDDSPageTable_Region;
TEDDSPageTable = RECORD { Extended DMA descriptor with page table entries }
Header : TEDDSPageTable_Header;
PageTable : TEDDSPageTable_Array;
END;
PEDDSPageTable = ^TEDDSPageTable;
{────────────────────────────────────────────────────────────────────────────}
Function VVDSErrorToStr( ErrorCode : TVDSErr ) : STRING;
Function VVDSInstalled : BOOLEAN;
Function VVDSGetVersion( Var Version : STRING;
Var ProductNum : WORD;
Var ProductRev : WORD;
Var MaxDMABufSize : LONGINT;
Var Flags : WORD ) : TVDSErr;
Function VVDSLockRegion( Region : PDDS;
Flags : WORD ) : TVDSErr;
Function VVDSUnlockRegion( Region : PDDS;
Flags : WORD ) : TVDSErr;
Function VVDSScatGatLockRegion( Region : PEDDS;
Flags : WORD ) : TVDSErr;
Function VVDSScatGatUnlockRegion( Region : PEDDS;
Flags : WORD ) : TVDSErr;
Function VVDSRequestDMABuf( Region : PDDS;
Flags : WORD ) : TVDSErr;
Function VVDSReleaseDMABuf( Region : PDDS;
Flags : WORD ) : TVDSErr;
Function VVDSCopyToDMABuf( Region : PDDS;
DMABufOfs : LONGINT ) : TVDSErr;
Function VVDSCopyFromDMABuf( Region : PDDS;
DMABufOfs : LONGINT ) : TVDSErr;
Function VVDSDisableDMATrans( DMAChannel : WORD ) : TVDSErr;
Function VVDSEnableDMATrans( DMAChannel : WORD;
Var DCountAtZero : BOOLEAN ) : TVDSErr;
{────────────────────────────────────────────────────────────────────────────}