Files
86Box/src/scattergather.h
TC1995 0f035b42ea Added preliminary Adaptec 154x emulation, needs fixing in the Read 10 command.
Made ATAPI derived from SCSI.
Added proper S/G emulation for SCSI DMA.
Added SCSI CD-ROM emulation, preserving all the former ATAPI commands as well.
2016-11-12 15:06:38 +01:00

24 lines
602 B
C

#ifndef _SCATTERGATHER_H_
#define _SCATTERGATHER_H_
typedef struct SGSEG
{
uint8_t Address[128*512];
uint32_t Length;
} SGSEG;
typedef struct SGBUF
{
const SGSEG *SegmentPtr;
unsigned SegmentNum;
unsigned SegmentIndex;
uint8_t *SegmentPtrCur;
uint32_t SegmentLeft;
} SGBUF;
uint32_t SegmentBufferCopy(SGBUF *SegmentDst, SGBUF *SegmentSrc, uint32_t Copy);
uint8_t *SegmentBufferGetNextSegment(SGBUF *SegmentBuf, uint32_t Segment);
uint32_t SegmentBufferAdvance(SGBUF *SegmentBuf, uint32_t Advance);
void SegmentBufferInit(SGBUF *SegmentBuf, const SGSEG *SegmentPtr, uint32_t Segments);
#endif