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.
This commit is contained in:
TC1995
2016-11-12 15:06:38 +01:00
parent acb06e5a17
commit 0f035b42ea
28 changed files with 3163 additions and 789 deletions

View File

@@ -422,3 +422,16 @@ int dma_channel_write(int channel, uint16_t val)
}
return 0;
}
size_t PageLengthReadWrite(uint32_t Address, size_t TotalSize)
{
size_t l;
uint32_t Page;
Page = Address & 4095;
l = (Page + 4096) - Address;
if (l > TotalSize)
l = TotalSize;
return l;
}