Implemented ATAPI and SCSI SEEK (6) command.
This commit is contained in:
10
src/ide.c
10
src/ide.c
@@ -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;
|
||||
|
@@ -14,6 +14,7 @@
|
||||
#define GPCMD_TEST_UNIT_READY 0x00
|
||||
#define GPCMD_REQUEST_SENSE 0x03
|
||||
#define GPCMD_READ_6 0x08
|
||||
#define GPCMD_SEEK_6 0x0B
|
||||
#define GPCMD_INQUIRY 0x12
|
||||
#define GPCMD_MODE_SELECT_6 0x15
|
||||
#define GPCMD_MODE_SENSE_6 0x1a
|
||||
|
@@ -31,6 +31,7 @@ uint8_t SCSICommandTable[0x100] =
|
||||
[GPCMD_PREVENT_REMOVAL] = CHECK_READY,
|
||||
[GPCMD_READ_CDROM_CAPACITY] = CHECK_READY,
|
||||
[GPCMD_READ_10] = CHECK_READY,
|
||||
[GPCMD_SEEK_6] = CHECK_READY | NONDATA,
|
||||
[GPCMD_SEEK] = CHECK_READY | NONDATA,
|
||||
[GPCMD_READ_SUBCHANNEL] = CHECK_READY,
|
||||
[GPCMD_READ_TOC_PMA_ATIP] = CHECK_READY | ALLOW_UA, /* Read TOC - can get through UNIT_ATTENTION, per VIDE-CDD.SYS
|
||||
@@ -921,8 +922,16 @@ void SCSICDROM_Command(uint8_t id, uint8_t lun, uint8_t *cdb)
|
||||
SCSIDMAResetPosition(id);
|
||||
break;
|
||||
|
||||
case GPCMD_SEEK6:
|
||||
case GPCMD_SEEK:
|
||||
SCSIDevices[id].lba_pos = (cdb[3]<<16)|(cdb[4]<<8)|cdb[5];
|
||||
if (cbd[0] == GPCMD_SEEK6)
|
||||
{
|
||||
SCSIDevices[id].lba_pos = (cdb[2]<<8)|cdb[3];
|
||||
}
|
||||
else
|
||||
{
|
||||
SCSIDevices[id].lba_pos = (cdb[2]<<24)|(cdb[3]<<16)|(cdb[4]<<8)|cdb[5];
|
||||
}
|
||||
cdrom->seek(SCSIDevices[id].lba_pos);
|
||||
|
||||
SCSIPhase = SCSI_PHASE_STATUS;
|
||||
|
Reference in New Issue
Block a user