Implemented ATAPI and SCSI SEEK (6) command.

This commit is contained in:
OBattler
2016-12-29 20:49:01 +01:00
parent 03ee24cc6c
commit a0b7d55312
3 changed files with 20 additions and 2 deletions

View File

@@ -2692,8 +2692,16 @@ atapi_out:
idecallback[ide_board]=50*IDE_TIME;
break;
case GPCMD_SEEK_6:
case GPCMD_SEEK:
pos=(idebufferb[3]<<16)|(idebufferb[4]<<8)|idebufferb[5];
if (idebufferb[0] == GPCMD_SEEK_6)
{
pos=(idebufferb[2]<<8)|idebufferb[3];
}
else
{
pos=(idebufferb[2]<<24)|(idebufferb[3]<<16)|(idebufferb[4]<<8)|idebufferb[5];
}
cdrom->seek(pos);
ide->packetstatus = ATAPI_STATUS_COMPLETE;
idecallback[ide_board]=50*IDE_TIME;