Corrected incorrect handling of ATA READ LONG, READ TOC/PMA/ATIP and PIONEER READ CD-DA MSF commands.

This commit is contained in:
2017-12-18 17:53:46 +00:00
parent 6654632a9b
commit c30a547b17
3 changed files with 4 additions and 4 deletions

View File

@@ -202,9 +202,9 @@ namespace DiscImageChef.Devices
bool sense; bool sense;
if(retry) if(retry)
registers.command = (byte)AtaCommands.ReadLong;
else
registers.command = (byte)AtaCommands.ReadLongRetry; registers.command = (byte)AtaCommands.ReadLongRetry;
else
registers.command = (byte)AtaCommands.ReadLong;
registers.sectorCount = 1; registers.sectorCount = 1;
registers.cylinderHigh = (byte)((cylinder & 0xFF00) / 0x100); registers.cylinderHigh = (byte)((cylinder & 0xFF00) / 0x100);
registers.cylinderLow = (byte)((cylinder & 0xFF) / 0x1); registers.cylinderLow = (byte)((cylinder & 0xFF) / 0x1);

View File

@@ -292,7 +292,7 @@ namespace DiscImageChef.Devices
byte[] tmpBuffer; byte[] tmpBuffer;
bool sense; bool sense;
if(format == 5) if((format & 0x0F)== 5)
tmpBuffer = new byte[32768]; tmpBuffer = new byte[32768];
else else
tmpBuffer = new byte[1024]; tmpBuffer = new byte[1024];

View File

@@ -92,7 +92,7 @@ namespace DiscImageChef.Devices
byte[] cdb = new byte[12]; byte[] cdb = new byte[12];
bool sense; bool sense;
cdb[0] = (byte)ScsiCommands.ReadCdMsf; cdb[0] = (byte)ScsiCommands.ReadCdDaMsf;
cdb[3] = (byte)((startMsf & 0xFF0000) >> 16); cdb[3] = (byte)((startMsf & 0xFF0000) >> 16);
cdb[4] = (byte)((startMsf & 0xFF00) >> 8); cdb[4] = (byte)((startMsf & 0xFF00) >> 8);
cdb[5] = (byte)(startMsf & 0xFF); cdb[5] = (byte)(startMsf & 0xFF);