mirror of
https://github.com/86Box/86Box.git
synced 2026-02-23 18:08:20 -07:00
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.
24 lines
602 B
C
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 |