mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
REFACTOR: Use preferred braces style.
This commit is contained in:
@@ -185,7 +185,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
{
|
||||
List<pageType> evpds = new List<pageType>();
|
||||
foreach(byte page in evpdPages)
|
||||
{
|
||||
if(page != 0x80)
|
||||
{
|
||||
DicConsole.WriteLine("Querying SCSI EVPD {0:X2}h...", page);
|
||||
@@ -198,7 +197,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
evpds.Add(evpd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(evpds.Count > 0) report.SCSI.EVPDPages = evpds.ToArray();
|
||||
}
|
||||
@@ -354,7 +352,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
{
|
||||
Decoders.SCSI.FixedSense? decSense = Decoders.SCSI.Sense.DecodeFixed(senseBuffer);
|
||||
if(decSense.HasValue)
|
||||
{
|
||||
if(decSense.Value.ASC == 0x3A)
|
||||
{
|
||||
int leftRetries = 20;
|
||||
@@ -386,7 +383,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
mediaTest.MediaIsRecognized &= !sense;
|
||||
}
|
||||
else mediaTest.MediaIsRecognized = false;
|
||||
}
|
||||
else mediaTest.MediaIsRecognized = false;
|
||||
}
|
||||
|
||||
@@ -471,11 +467,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "read6",
|
||||
"_debug_" + mediaTest.MediumTypeName + ".bin", "read results",
|
||||
buffer);
|
||||
}
|
||||
|
||||
DicConsole.WriteLine("Trying SCSI READ (10)...");
|
||||
mediaTest.SupportsRead10 =
|
||||
@@ -483,11 +477,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
mediaTest.BlockSize, 0, 1, timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead10);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "read10",
|
||||
"_debug_" + mediaTest.MediumTypeName + ".bin", "read results",
|
||||
buffer);
|
||||
}
|
||||
|
||||
DicConsole.WriteLine("Trying SCSI READ (12)...");
|
||||
mediaTest.SupportsRead12 =
|
||||
@@ -495,11 +487,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
mediaTest.BlockSize, 0, 1, false, timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead12);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "read12",
|
||||
"_debug_" + mediaTest.MediumTypeName + ".bin", "read results",
|
||||
buffer);
|
||||
}
|
||||
|
||||
DicConsole.WriteLine("Trying SCSI READ (16)...");
|
||||
mediaTest.SupportsRead16 =
|
||||
@@ -507,11 +497,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
mediaTest.BlockSize, 0, 1, false, timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead16);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "read16",
|
||||
"_debug_" + mediaTest.MediumTypeName + ".bin", "read results",
|
||||
buffer);
|
||||
}
|
||||
|
||||
mediaTest.LongBlockSize = mediaTest.BlockSize;
|
||||
DicConsole.WriteLine("Trying SCSI READ LONG (10)...");
|
||||
@@ -521,7 +509,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
{
|
||||
Decoders.SCSI.FixedSense? decSense = Decoders.SCSI.Sense.DecodeFixed(senseBuffer);
|
||||
if(decSense.HasValue)
|
||||
{
|
||||
if(decSense.Value.SenseKey == Decoders.SCSI.SenseKeys.IllegalRequest &&
|
||||
decSense.Value.ASC == 0x24 && decSense.Value.ASCQ == 0x00)
|
||||
{
|
||||
@@ -533,13 +520,10 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
mediaTest.LongBlockSizeSpecified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(mediaTest.SupportsReadLong && mediaTest.LongBlockSize == mediaTest.BlockSize)
|
||||
{
|
||||
if(mediaTest.BlockSize == 512)
|
||||
{
|
||||
foreach(ushort testSize in new[]
|
||||
{
|
||||
// Long sector sizes for floppies
|
||||
@@ -560,9 +544,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(mediaTest.BlockSize == 1024)
|
||||
{
|
||||
foreach(ushort testSize in new[]
|
||||
{
|
||||
// Long sector sizes for floppies
|
||||
@@ -581,7 +563,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(mediaTest.BlockSize == 2048)
|
||||
{
|
||||
sense = dev.ReadLong10(out buffer, out senseBuffer, false, false, 0, 2380,
|
||||
@@ -615,7 +596,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
mediaTest.LongBlockSizeSpecified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(mediaTest.SupportsReadLong && mediaTest.LongBlockSize == mediaTest.BlockSize)
|
||||
{
|
||||
@@ -655,11 +635,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
sense = dev.ReadLong10(out buffer, out senseBuffer, false, false, 0,
|
||||
(ushort)mediaTest.LongBlockSize, timeout, out duration);
|
||||
if(!sense)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readlong10",
|
||||
"_debug_" + mediaTest.MediumTypeName + ".bin", "read results",
|
||||
buffer);
|
||||
}
|
||||
}
|
||||
|
||||
mediaTest.CanReadMediaSerialSpecified = true;
|
||||
@@ -757,11 +735,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !report.SCSI.ReadCapabilities.SupportsRead);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "read6",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + ".bin", "read results",
|
||||
buffer);
|
||||
}
|
||||
|
||||
DicConsole.WriteLine("Trying SCSI READ (10)...");
|
||||
report.SCSI.ReadCapabilities.SupportsRead10 =
|
||||
@@ -770,11 +746,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
|
||||
!report.SCSI.ReadCapabilities.SupportsRead10);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "read10",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + ".bin", "read results",
|
||||
buffer);
|
||||
}
|
||||
|
||||
DicConsole.WriteLine("Trying SCSI READ (12)...");
|
||||
report.SCSI.ReadCapabilities.SupportsRead12 =
|
||||
@@ -783,11 +757,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
|
||||
!report.SCSI.ReadCapabilities.SupportsRead12);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "read12",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + ".bin", "read results",
|
||||
buffer);
|
||||
}
|
||||
|
||||
DicConsole.WriteLine("Trying SCSI READ (16)...");
|
||||
report.SCSI.ReadCapabilities.SupportsRead16 =
|
||||
@@ -796,11 +768,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
|
||||
!report.SCSI.ReadCapabilities.SupportsRead16);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "read16",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + ".bin", "read results",
|
||||
buffer);
|
||||
}
|
||||
|
||||
report.SCSI.ReadCapabilities.LongBlockSize = report.SCSI.ReadCapabilities.BlockSize;
|
||||
DicConsole.WriteLine("Trying SCSI READ LONG (10)...");
|
||||
@@ -809,7 +779,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
{
|
||||
Decoders.SCSI.FixedSense? decSense = Decoders.SCSI.Sense.DecodeFixed(senseBuffer);
|
||||
if(decSense.HasValue)
|
||||
{
|
||||
if(decSense.Value.SenseKey == Decoders.SCSI.SenseKeys.IllegalRequest &&
|
||||
decSense.Value.ASC == 0x24 && decSense.Value.ASCQ == 0x00)
|
||||
{
|
||||
@@ -821,14 +790,11 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
report.SCSI.ReadCapabilities.LongBlockSizeSpecified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(report.SCSI.ReadCapabilities.SupportsReadLong && report.SCSI.ReadCapabilities.LongBlockSize ==
|
||||
report.SCSI.ReadCapabilities.BlockSize)
|
||||
{
|
||||
if(report.SCSI.ReadCapabilities.BlockSize == 512)
|
||||
{
|
||||
foreach(ushort testSize in new[]
|
||||
{
|
||||
// Long sector sizes for floppies
|
||||
@@ -849,9 +815,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(report.SCSI.ReadCapabilities.BlockSize == 1024)
|
||||
{
|
||||
foreach(ushort testSize in new[]
|
||||
{
|
||||
// Long sector sizes for floppies
|
||||
@@ -870,7 +834,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(report.SCSI.ReadCapabilities.BlockSize == 2048)
|
||||
{
|
||||
sense = dev.ReadLong10(out buffer, out senseBuffer, false, false, 0, 2380, timeout,
|
||||
@@ -904,7 +867,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
report.SCSI.ReadCapabilities.LongBlockSizeSpecified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(report.SCSI.ReadCapabilities.SupportsReadLong && report.SCSI.ReadCapabilities.LongBlockSize ==
|
||||
report.SCSI.ReadCapabilities.BlockSize)
|
||||
@@ -955,11 +917,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
(ushort)report.SCSI.ReadCapabilities.LongBlockSize, timeout,
|
||||
out duration);
|
||||
if(!sense)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readlong10",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + ".bin",
|
||||
"read results", buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,7 +168,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
{
|
||||
report.SCSI.MultiMediaDevice.Features = new mmcFeaturesType();
|
||||
foreach(Decoders.SCSI.MMC.Features.FeatureDescriptor desc in ftr.Descriptors)
|
||||
{
|
||||
switch(desc.Code)
|
||||
{
|
||||
case 0x0001:
|
||||
@@ -523,13 +522,11 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
Decoders.SCSI.MMC.Feature_0106? ftr0106 =
|
||||
Decoders.SCSI.MMC.Features.Decode_0106(desc.Data);
|
||||
if(ftr0106.HasValue)
|
||||
{
|
||||
if(ftr0106.Value.CSSVersion > 0)
|
||||
{
|
||||
report.SCSI.MultiMediaDevice.Features.CSSVersionSpecified = true;
|
||||
report.SCSI.MultiMediaDevice.Features.CSSVersion = ftr0106.Value.CSSVersion;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0x0108:
|
||||
@@ -544,13 +541,11 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
Decoders.SCSI.MMC.Feature_010B? ftr010B =
|
||||
Decoders.SCSI.MMC.Features.Decode_010B(desc.Data);
|
||||
if(ftr010B.HasValue)
|
||||
{
|
||||
if(ftr010B.Value.CPRMVersion > 0)
|
||||
{
|
||||
report.SCSI.MultiMediaDevice.Features.CPRMVersionSpecified = true;
|
||||
report.SCSI.MultiMediaDevice.Features.CPRMVersion = ftr010B.Value.CPRMVersion;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0x010C:
|
||||
@@ -653,7 +648,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
report.SCSI.MultiMediaDevice.Features.SupportsVCPS = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(report.SCSI.MultiMediaDevice.Features.CanReadBD ||
|
||||
@@ -763,7 +757,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
{
|
||||
Decoders.SCSI.FixedSense? decSense = Decoders.SCSI.Sense.DecodeFixed(senseBuffer);
|
||||
if(decSense.HasValue)
|
||||
{
|
||||
if(decSense.Value.ASC == 0x3A)
|
||||
{
|
||||
int leftRetries = 20;
|
||||
@@ -811,7 +804,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
mediaTest.MediaIsRecognized &= !sense;
|
||||
}
|
||||
else mediaTest.MediaIsRecognized = false;
|
||||
}
|
||||
else mediaTest.MediaIsRecognized = false;
|
||||
}
|
||||
|
||||
@@ -890,22 +882,18 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
!dev.ReadTocPmaAtip(out buffer, out senseBuffer, false, 0, 0, timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadTOC);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readtoc",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
|
||||
DicConsole.WriteLine("Querying CD Full TOC...");
|
||||
mediaTest.CanReadFullTOC =
|
||||
!dev.ReadRawToc(out buffer, out senseBuffer, 1, timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadFullTOC);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readfulltoc",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
|
||||
if(mediaType.StartsWith("CD-R", StringComparison.Ordinal) ||
|
||||
@@ -917,20 +905,16 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
mediaTest.CanReadATIP = !dev.ReadAtip(out buffer, out senseBuffer, timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadATIP);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "atip",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
DicConsole.WriteLine("Querying CD PMA...");
|
||||
mediaTest.CanReadPMA = !dev.ReadPma(out buffer, out senseBuffer, timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPMA);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "pma",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
|
||||
if(mediaType.StartsWith("DVD-", StringComparison.Ordinal) ||
|
||||
@@ -945,11 +929,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPFI);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "pfi",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
DicConsole.WriteLine("Querying DVD DMI...");
|
||||
mediaTest.CanReadDMI =
|
||||
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0,
|
||||
@@ -957,11 +939,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadDMI);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "dmi",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
|
||||
if(mediaType == "DVD-ROM")
|
||||
@@ -974,11 +954,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadCMI);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "cmi",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
|
||||
if(mediaType == "DVD-ROM" || mediaType == "HD DVD-ROM")
|
||||
@@ -991,11 +969,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadBCA);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "bca",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
mediaTest.CanReadAACSSpecified = true;
|
||||
DicConsole.WriteLine("Querying DVD AACS...");
|
||||
mediaTest.CanReadAACS =
|
||||
@@ -1003,11 +979,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcDiscStructureFormat.DvdAacs, 0, timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadAACS);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "aacs",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
|
||||
if(mediaType == "BD-ROM")
|
||||
@@ -1020,11 +994,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadBCA);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "bdbca",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
|
||||
if(mediaType == "DVD-RAM" || mediaType == "HD DVD-RAM")
|
||||
@@ -1036,11 +1008,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcDiscStructureFormat.DvdramDds, 0, timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadDDS);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "dds",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
mediaTest.CanReadSpareAreaInformation =
|
||||
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0,
|
||||
MmcDiscStructureFormat.DvdramSpareAreaInformation, 0, timeout,
|
||||
@@ -1048,11 +1018,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
|
||||
!mediaTest.CanReadSpareAreaInformation);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "sai",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
|
||||
if(mediaType.StartsWith("BD-R", StringComparison.Ordinal) && mediaType != "BD-ROM")
|
||||
@@ -1065,11 +1033,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcDiscStructureFormat.BdDds, 0, timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadDDS);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "bddds",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
DicConsole.WriteLine("Querying BD SAI...");
|
||||
mediaTest.CanReadSpareAreaInformation =
|
||||
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Bd, 0, 0,
|
||||
@@ -1078,11 +1044,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
|
||||
!mediaTest.CanReadSpareAreaInformation);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "bdsai",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
|
||||
if(mediaType == "DVD-R" || mediaType == "DVD-RW")
|
||||
@@ -1095,11 +1059,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPRI);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "pri",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
|
||||
if(mediaType == "DVD-R" || mediaType == "DVD-RW" || mediaType == "HD DVD-R")
|
||||
@@ -1113,11 +1075,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadMediaID);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "mediaid",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
DicConsole.WriteLine("Querying DVD Embossed PFI...");
|
||||
mediaTest.CanReadRecordablePFI =
|
||||
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0,
|
||||
@@ -1125,11 +1085,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadRecordablePFI);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "epfi",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
|
||||
if(mediaType.StartsWith("DVD+R", StringComparison.Ordinal) || mediaType == "DVD+MRW")
|
||||
@@ -1142,22 +1100,18 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcDiscStructureFormat.Adip, 0, timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadADIP);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "adip",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
DicConsole.WriteLine("Querying DVD DCB...");
|
||||
mediaTest.CanReadDCB =
|
||||
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0,
|
||||
MmcDiscStructureFormat.Dcb, 0, timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadDCB);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "dcb",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
|
||||
if(mediaType == "HD DVD-ROM")
|
||||
@@ -1170,11 +1124,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadHDCMI);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "hdcmi",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
|
||||
if(mediaType.EndsWith(" DL", StringComparison.Ordinal))
|
||||
@@ -1187,11 +1139,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadLayerCapacity);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "layer",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
|
||||
if(mediaType.StartsWith("BD-R", StringComparison.Ordinal))
|
||||
@@ -1205,22 +1155,18 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadDiscInformation);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "di",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
DicConsole.WriteLine("Querying BD PAC...");
|
||||
mediaTest.CanReadPAC =
|
||||
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Bd, 0, 0,
|
||||
MmcDiscStructureFormat.Pac, 0, timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPAC);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "pac",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
|
||||
mediaTest.SupportsReadSpecified = true;
|
||||
@@ -1233,44 +1179,35 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
!dev.Read6(out buffer, out senseBuffer, 0, 2048, timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "read6",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" + mediaType +
|
||||
".bin", "read results", buffer);
|
||||
}
|
||||
DicConsole.WriteLine("Trying SCSI READ (10)...");
|
||||
mediaTest.SupportsRead10 = !dev.Read10(out buffer, out senseBuffer, 0, false, true, false,
|
||||
false, 0, 2048, 0, 1, timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead10);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "read10",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" + mediaType +
|
||||
".bin", "read results", buffer);
|
||||
}
|
||||
DicConsole.WriteLine("Trying SCSI READ (12)...");
|
||||
mediaTest.SupportsRead12 = !dev.Read12(out buffer, out senseBuffer, 0, false, true, false,
|
||||
false, 0, 2048, 0, 1, false, timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead12);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "read12",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" + mediaType +
|
||||
".bin", "read results", buffer);
|
||||
}
|
||||
DicConsole.WriteLine("Trying SCSI READ (16)...");
|
||||
mediaTest.SupportsRead16 = !dev.Read16(out buffer, out senseBuffer, 0, false, true, false, 0,
|
||||
2048, 0, 1, false, timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead16);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "read16",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" + mediaType +
|
||||
".bin", "read results", buffer);
|
||||
}
|
||||
|
||||
if(debug)
|
||||
{
|
||||
if(!tryPlextor)
|
||||
{
|
||||
pressedKey = new ConsoleKeyInfo();
|
||||
@@ -1284,7 +1221,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
|
||||
tryPlextor |= pressedKey.Key == ConsoleKey.Y;
|
||||
}
|
||||
}
|
||||
|
||||
if(mediaType.StartsWith("CD-", StringComparison.Ordinal) ||
|
||||
mediaType.StartsWith("DDCD-", StringComparison.Ordinal) || mediaType == "Audio CD")
|
||||
@@ -1313,11 +1249,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsReadCd);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcd",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
DicConsole.WriteLine("Trying SCSI READ CD MSF...");
|
||||
mediaTest.SupportsReadCdMsf = !dev.ReadCdMsf(out buffer, out senseBuffer, 0x00000200,
|
||||
0x00000201, 2352, MmcSectorTypes.Cdda,
|
||||
@@ -1326,11 +1260,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcSubchannel.None, timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsReadCdMsf);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdmsf",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1342,11 +1274,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsReadCd);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcd",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
DicConsole.WriteLine("Trying SCSI READ CD MSF...");
|
||||
mediaTest.SupportsReadCdMsf = !dev.ReadCdMsf(out buffer, out senseBuffer, 0x00000200,
|
||||
0x00000201, 2048, MmcSectorTypes.AllTypes,
|
||||
@@ -1355,11 +1285,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcSubchannel.None, timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsReadCdMsf);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdmsf",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
DicConsole.WriteLine("Trying SCSI READ CD full sector...");
|
||||
mediaTest.SupportsReadCdRaw = !dev.ReadCd(out buffer, out senseBuffer, 0, 2352, 1,
|
||||
MmcSectorTypes.AllTypes, false, false, true,
|
||||
@@ -1368,11 +1296,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsReadCdRaw);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdraw",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
DicConsole.WriteLine("Trying SCSI READ CD MSF full sector...");
|
||||
mediaTest.SupportsReadCdMsfRaw = !dev.ReadCdMsf(out buffer, out senseBuffer, 0x00000200,
|
||||
0x00000201, 2352,
|
||||
@@ -1383,11 +1309,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
|
||||
!mediaTest.SupportsReadCdMsfRaw);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdmsfraw",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
|
||||
if(mediaTest.SupportsReadCdRaw || mediaType == "Audio CD")
|
||||
@@ -1396,26 +1320,20 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
for(int i = -150; i < 0; i++)
|
||||
{
|
||||
if(mediaType == "Audio CD")
|
||||
{
|
||||
sense = dev.ReadCd(out buffer, out senseBuffer, (uint)i, 2352, 1,
|
||||
MmcSectorTypes.Cdda, false, false, false,
|
||||
MmcHeaderCodes.None, true, false, MmcErrorField.None,
|
||||
MmcSubchannel.None, timeout, out duration);
|
||||
}
|
||||
else
|
||||
{
|
||||
sense = dev.ReadCd(out buffer, out senseBuffer, (uint)i, 2352, 1,
|
||||
MmcSectorTypes.AllTypes, false, false, true,
|
||||
MmcHeaderCodes.AllHeaders, true, true, MmcErrorField.None,
|
||||
MmcSubchannel.None, timeout, out duration);
|
||||
}
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", sense);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "leadin",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
if(!sense)
|
||||
{
|
||||
mediaTest.CanReadLeadIn = true;
|
||||
@@ -1425,30 +1343,24 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
|
||||
DicConsole.WriteLine("Trying to read CD Lead-Out...");
|
||||
if(mediaType == "Audio CD")
|
||||
{
|
||||
mediaTest.CanReadLeadOut = !dev.ReadCd(out buffer, out senseBuffer,
|
||||
(uint)(mediaTest.Blocks + 1), 2352, 1,
|
||||
MmcSectorTypes.Cdda, false, false, false,
|
||||
MmcHeaderCodes.None, true, false,
|
||||
MmcErrorField.None, MmcSubchannel.None,
|
||||
timeout, out duration);
|
||||
}
|
||||
else
|
||||
{
|
||||
mediaTest.CanReadLeadOut = !dev.ReadCd(out buffer, out senseBuffer,
|
||||
(uint)(mediaTest.Blocks + 1), 2352, 1,
|
||||
MmcSectorTypes.AllTypes, false, false, true,
|
||||
MmcHeaderCodes.AllHeaders, true, true,
|
||||
MmcErrorField.None, MmcSubchannel.None,
|
||||
timeout, out duration);
|
||||
}
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadLeadOut);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "leadout",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
|
||||
if(mediaType == "Audio CD")
|
||||
@@ -1460,21 +1372,17 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcErrorField.C2Pointers, MmcSubchannel.None,
|
||||
timeout, out duration);
|
||||
if(!mediaTest.CanReadC2Pointers)
|
||||
{
|
||||
mediaTest.CanReadC2Pointers = !dev.ReadCd(out buffer, out senseBuffer, 0, 2648, 1,
|
||||
MmcSectorTypes.Cdda, false, false, false,
|
||||
MmcHeaderCodes.None, true, false,
|
||||
MmcErrorField.C2PointersAndBlock,
|
||||
MmcSubchannel.None, timeout,
|
||||
out duration);
|
||||
}
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadC2Pointers);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdc2",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
|
||||
DicConsole.WriteLine("Trying to read subchannels...");
|
||||
mediaTest.CanReadPQSubchannel = !dev.ReadCd(out buffer, out senseBuffer, 0, 2368, 1,
|
||||
@@ -1484,11 +1392,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPQSubchannel);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdpq",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
mediaTest.CanReadRWSubchannel = !dev.ReadCd(out buffer, out senseBuffer, 0, 2448, 1,
|
||||
MmcSectorTypes.Cdda, false, false, false,
|
||||
MmcHeaderCodes.None, true, false,
|
||||
@@ -1496,11 +1402,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadRWSubchannel);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdrw",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
mediaTest.CanReadCorrectedSubchannel = !dev.ReadCd(out buffer, out senseBuffer, 0, 2448,
|
||||
1, MmcSectorTypes.Cdda, false, false,
|
||||
false, MmcHeaderCodes.None, true,
|
||||
@@ -1510,11 +1414,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
|
||||
!mediaTest.CanReadCorrectedSubchannel);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdsub",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
|
||||
DicConsole.WriteLine("Trying to read subchannels with C2 Pointers...");
|
||||
mediaTest.CanReadPQSubchannelWithC2 = !dev.ReadCd(out buffer, out senseBuffer, 0, 2662,
|
||||
@@ -1524,7 +1426,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcSubchannel.Q16, timeout,
|
||||
out duration);
|
||||
if(!mediaTest.CanReadPQSubchannelWithC2)
|
||||
{
|
||||
mediaTest.CanReadPQSubchannelWithC2 = !dev.ReadCd(out buffer, out senseBuffer, 0,
|
||||
2664, 1, MmcSectorTypes.Cdda,
|
||||
false, false, false,
|
||||
@@ -1532,15 +1433,12 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcErrorField.C2PointersAndBlock,
|
||||
MmcSubchannel.Q16, timeout,
|
||||
out duration);
|
||||
}
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
|
||||
!mediaTest.CanReadPQSubchannelWithC2);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdpqc2",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
|
||||
mediaTest.CanReadRWSubchannelWithC2 = !dev.ReadCd(out buffer, out senseBuffer, 0, 2712,
|
||||
1, MmcSectorTypes.Cdda, false, false,
|
||||
@@ -1549,7 +1447,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcSubchannel.Raw, timeout,
|
||||
out duration);
|
||||
if(!mediaTest.CanReadRWSubchannelWithC2)
|
||||
{
|
||||
mediaTest.CanReadRWSubchannelWithC2 = !dev.ReadCd(out buffer, out senseBuffer, 0,
|
||||
2714, 1, MmcSectorTypes.Cdda,
|
||||
false, false, false,
|
||||
@@ -1557,15 +1454,12 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcErrorField.C2PointersAndBlock,
|
||||
MmcSubchannel.Raw, timeout,
|
||||
out duration);
|
||||
}
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
|
||||
!mediaTest.CanReadRWSubchannelWithC2);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdrwc2",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
|
||||
mediaTest.CanReadCorrectedSubchannelWithC2 = !dev.ReadCd(out buffer, out senseBuffer, 0,
|
||||
2712, 1, MmcSectorTypes.Cdda,
|
||||
@@ -1576,21 +1470,17 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcSubchannel.Rw, timeout,
|
||||
out duration);
|
||||
if(!mediaTest.CanReadCorrectedSubchannelWithC2)
|
||||
{
|
||||
mediaTest.CanReadCorrectedSubchannelWithC2 =
|
||||
!dev.ReadCd(out buffer, out senseBuffer, 0, 2714, 1, MmcSectorTypes.Cdda, false,
|
||||
false, false, MmcHeaderCodes.None, true, false,
|
||||
MmcErrorField.C2PointersAndBlock, MmcSubchannel.Rw, timeout,
|
||||
out duration);
|
||||
}
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
|
||||
!mediaTest.CanReadCorrectedSubchannelWithC2);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdsubc2",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
else if(mediaTest.SupportsReadCdRaw)
|
||||
{
|
||||
@@ -1601,21 +1491,17 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcErrorField.C2Pointers, MmcSubchannel.None,
|
||||
timeout, out duration);
|
||||
if(!mediaTest.CanReadC2Pointers)
|
||||
{
|
||||
mediaTest.CanReadC2Pointers = !dev.ReadCd(out buffer, out senseBuffer, 0, 2648, 1,
|
||||
MmcSectorTypes.AllTypes, false, false,
|
||||
true, MmcHeaderCodes.AllHeaders, true,
|
||||
true, MmcErrorField.C2PointersAndBlock,
|
||||
MmcSubchannel.None, timeout,
|
||||
out duration);
|
||||
}
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadC2Pointers);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdc2",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
|
||||
DicConsole.WriteLine("Trying to read subchannels...");
|
||||
mediaTest.CanReadPQSubchannel = !dev.ReadCd(out buffer, out senseBuffer, 0, 2368, 1,
|
||||
@@ -1625,11 +1511,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPQSubchannel);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdpq",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
mediaTest.CanReadRWSubchannel = !dev.ReadCd(out buffer, out senseBuffer, 0, 2448, 1,
|
||||
MmcSectorTypes.AllTypes, false, false, true,
|
||||
MmcHeaderCodes.AllHeaders, true, true,
|
||||
@@ -1637,11 +1521,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadRWSubchannel);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdrw",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
mediaTest.CanReadCorrectedSubchannel = !dev.ReadCd(out buffer, out senseBuffer, 0, 2448,
|
||||
1, MmcSectorTypes.AllTypes, false,
|
||||
false, true,
|
||||
@@ -1652,11 +1534,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
|
||||
!mediaTest.CanReadCorrectedSubchannel);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdsub",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
|
||||
DicConsole.WriteLine("Trying to read subchannels with C2 Pointers...");
|
||||
mediaTest.CanReadPQSubchannelWithC2 = !dev.ReadCd(out buffer, out senseBuffer, 0, 2662,
|
||||
@@ -1667,7 +1547,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcSubchannel.Q16, timeout,
|
||||
out duration);
|
||||
if(!mediaTest.CanReadPQSubchannelWithC2)
|
||||
{
|
||||
mediaTest.CanReadPQSubchannelWithC2 = !dev.ReadCd(out buffer, out senseBuffer, 0,
|
||||
2664, 1, MmcSectorTypes.AllTypes,
|
||||
false, false, true,
|
||||
@@ -1676,15 +1555,12 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcErrorField.C2PointersAndBlock,
|
||||
MmcSubchannel.Q16, timeout,
|
||||
out duration);
|
||||
}
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
|
||||
!mediaTest.CanReadPQSubchannelWithC2);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdpqc2",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
|
||||
mediaTest.CanReadRWSubchannelWithC2 = !dev.ReadCd(out buffer, out senseBuffer, 0, 2712,
|
||||
1, MmcSectorTypes.AllTypes, false,
|
||||
@@ -1694,7 +1570,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcSubchannel.Raw, timeout,
|
||||
out duration);
|
||||
if(!mediaTest.CanReadRWSubchannelWithC2)
|
||||
{
|
||||
mediaTest.CanReadRWSubchannelWithC2 = !dev.ReadCd(out buffer, out senseBuffer, 0,
|
||||
2714, 1, MmcSectorTypes.AllTypes,
|
||||
false, false, true,
|
||||
@@ -1703,15 +1578,12 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcErrorField.C2PointersAndBlock,
|
||||
MmcSubchannel.Raw, timeout,
|
||||
out duration);
|
||||
}
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
|
||||
!mediaTest.CanReadRWSubchannelWithC2);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdrwc2",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
|
||||
mediaTest.CanReadCorrectedSubchannelWithC2 = !dev.ReadCd(out buffer, out senseBuffer, 0,
|
||||
2712, 1,
|
||||
@@ -1723,21 +1595,17 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcSubchannel.Rw, timeout,
|
||||
out duration);
|
||||
if(!mediaTest.CanReadCorrectedSubchannelWithC2)
|
||||
{
|
||||
mediaTest.CanReadCorrectedSubchannelWithC2 =
|
||||
!dev.ReadCd(out buffer, out senseBuffer, 0, 2714, 1, MmcSectorTypes.AllTypes,
|
||||
false, false, true, MmcHeaderCodes.AllHeaders, true, true,
|
||||
MmcErrorField.C2PointersAndBlock, MmcSubchannel.Rw, timeout,
|
||||
out duration);
|
||||
}
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
|
||||
!mediaTest.CanReadCorrectedSubchannelWithC2);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdsubc2",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1748,21 +1616,17 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcErrorField.C2Pointers, MmcSubchannel.None,
|
||||
timeout, out duration);
|
||||
if(!mediaTest.CanReadC2Pointers)
|
||||
{
|
||||
mediaTest.CanReadC2Pointers = !dev.ReadCd(out buffer, out senseBuffer, 0, 2344, 1,
|
||||
MmcSectorTypes.AllTypes, false, false,
|
||||
false, MmcHeaderCodes.None, true, false,
|
||||
MmcErrorField.C2PointersAndBlock,
|
||||
MmcSubchannel.None, timeout,
|
||||
out duration);
|
||||
}
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadC2Pointers);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdc2",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
|
||||
DicConsole.WriteLine("Trying to read subchannels...");
|
||||
mediaTest.CanReadPQSubchannel = !dev.ReadCd(out buffer, out senseBuffer, 0, 2064, 1,
|
||||
@@ -1772,11 +1636,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPQSubchannel);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdpq",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
mediaTest.CanReadRWSubchannel = !dev.ReadCd(out buffer, out senseBuffer, 0, 2144, 1,
|
||||
MmcSectorTypes.AllTypes, false, false,
|
||||
false, MmcHeaderCodes.None, true, false,
|
||||
@@ -1784,11 +1646,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadRWSubchannel);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdrw",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
mediaTest.CanReadCorrectedSubchannel = !dev.ReadCd(out buffer, out senseBuffer, 0, 2144,
|
||||
1, MmcSectorTypes.AllTypes, false,
|
||||
false, false, MmcHeaderCodes.None,
|
||||
@@ -1798,11 +1658,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
|
||||
!mediaTest.CanReadCorrectedSubchannel);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdsub",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
|
||||
DicConsole.WriteLine("Trying to read subchannels with C2 Pointers...");
|
||||
mediaTest.CanReadPQSubchannelWithC2 = !dev.ReadCd(out buffer, out senseBuffer, 0, 2358,
|
||||
@@ -1812,7 +1670,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcSubchannel.Q16, timeout,
|
||||
out duration);
|
||||
if(!mediaTest.CanReadPQSubchannelWithC2)
|
||||
{
|
||||
mediaTest.CanReadPQSubchannelWithC2 = !dev.ReadCd(out buffer, out senseBuffer, 0,
|
||||
2360, 1, MmcSectorTypes.AllTypes,
|
||||
false, false, false,
|
||||
@@ -1820,15 +1677,12 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcErrorField.C2PointersAndBlock,
|
||||
MmcSubchannel.Q16, timeout,
|
||||
out duration);
|
||||
}
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
|
||||
!mediaTest.CanReadPQSubchannelWithC2);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdpqc2",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
|
||||
mediaTest.CanReadRWSubchannelWithC2 = !dev.ReadCd(out buffer, out senseBuffer, 0, 2438,
|
||||
1, MmcSectorTypes.AllTypes, false,
|
||||
@@ -1837,7 +1691,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcSubchannel.Raw, timeout,
|
||||
out duration);
|
||||
if(!mediaTest.CanReadRWSubchannelWithC2)
|
||||
{
|
||||
mediaTest.CanReadRWSubchannelWithC2 = !dev.ReadCd(out buffer, out senseBuffer, 0,
|
||||
2440, 1, MmcSectorTypes.AllTypes,
|
||||
false, false, false,
|
||||
@@ -1845,15 +1698,12 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcErrorField.C2PointersAndBlock,
|
||||
MmcSubchannel.Raw, timeout,
|
||||
out duration);
|
||||
}
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
|
||||
!mediaTest.CanReadRWSubchannelWithC2);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdrwc2",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
|
||||
mediaTest.CanReadCorrectedSubchannelWithC2 = !dev.ReadCd(out buffer, out senseBuffer, 0,
|
||||
2438, 1,
|
||||
@@ -1865,21 +1715,17 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
MmcSubchannel.Rw, timeout,
|
||||
out duration);
|
||||
if(!mediaTest.CanReadCorrectedSubchannelWithC2)
|
||||
{
|
||||
mediaTest.CanReadCorrectedSubchannelWithC2 =
|
||||
!dev.ReadCd(out buffer, out senseBuffer, 0, 2440, 1, MmcSectorTypes.AllTypes,
|
||||
false, false, false, MmcHeaderCodes.None, true, false,
|
||||
MmcErrorField.C2PointersAndBlock, MmcSubchannel.Rw, timeout,
|
||||
out duration);
|
||||
}
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
|
||||
!mediaTest.CanReadCorrectedSubchannelWithC2);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readcdsubc2",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
|
||||
if(debug)
|
||||
@@ -1923,11 +1769,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
|
||||
!mediaTest.SupportsPlextorReadCDDA);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "plextorreadcdda",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
|
||||
if(tryPioneer)
|
||||
@@ -1941,11 +1785,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
|
||||
!mediaTest.SupportsPioneerReadCDDA);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "pioneerreadcdda",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
DicConsole.WriteLine("Trying Pioneer READ CD-DA MSF...");
|
||||
mediaTest.SupportsPioneerReadCDDAMSF =
|
||||
!dev.PioneerReadCdDaMsf(out buffer, out senseBuffer, 0x00000200, 0x00000201, 2352,
|
||||
@@ -1953,11 +1795,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
|
||||
!mediaTest.SupportsPioneerReadCDDAMSF);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "pioneerreadcddamsf",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
|
||||
if(tryNec)
|
||||
@@ -1968,11 +1808,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
!dev.NecReadCdDa(out buffer, out senseBuffer, 0, 1, timeout, out duration);
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsNECReadCDDA);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "necreadcdda",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1984,7 +1822,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
{
|
||||
Decoders.SCSI.FixedSense? decSense = Decoders.SCSI.Sense.DecodeFixed(senseBuffer);
|
||||
if(decSense.HasValue)
|
||||
{
|
||||
if(decSense.Value.SenseKey == Decoders.SCSI.SenseKeys.IllegalRequest &&
|
||||
decSense.Value.ASC == 0x24 && decSense.Value.ASCQ == 0x00)
|
||||
{
|
||||
@@ -1995,11 +1832,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
mediaTest.LongBlockSizeSpecified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(debug)
|
||||
{
|
||||
if(!tryHldtst)
|
||||
{
|
||||
pressedKey = new ConsoleKeyInfo();
|
||||
@@ -2013,7 +1848,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
|
||||
tryHldtst |= pressedKey.Key == ConsoleKey.Y;
|
||||
}
|
||||
}
|
||||
|
||||
if(mediaTest.SupportsReadLong && mediaTest.LongBlockSize == mediaTest.BlockSize)
|
||||
{
|
||||
@@ -2037,11 +1871,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
|
||||
!mediaTest.SupportsPlextorReadRawDVD);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "plextorrawdvd",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
if(mediaTest.SupportsPlextorReadRawDVD)
|
||||
mediaTest.SupportsPlextorReadRawDVD = !ArrayHelpers.ArrayIsNullOrEmpty(buffer);
|
||||
}
|
||||
@@ -2055,11 +1887,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
|
||||
!mediaTest.SupportsHLDTSTReadRawDVD);
|
||||
if(debug)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "hldtstrawdvd",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
|
||||
if(mediaTest.SupportsReadLong && mediaTest.LongBlockSize == mediaTest.BlockSize)
|
||||
@@ -2108,11 +1938,9 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
sense = dev.ReadLong10(out buffer, out senseBuffer, false, false, 0,
|
||||
(ushort)mediaTest.LongBlockSize, timeout, out duration);
|
||||
if(!sense)
|
||||
{
|
||||
DataFile.WriteTo("SCSI Report", "readlong10",
|
||||
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
|
||||
mediaType + ".bin", "read results", buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -138,10 +138,8 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
report.SCSI.SequentialDevice.SupportedMediaTypes[i].DensityCodes =
|
||||
new int[mtsh.Value.descriptors[i].densityCodes.Length];
|
||||
for(int j = 0; j < mtsh.Value.descriptors.Length; j++)
|
||||
{
|
||||
report.SCSI.SequentialDevice.SupportedMediaTypes[i].DensityCodes[j] =
|
||||
mtsh.Value.descriptors[i].densityCodes[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -181,7 +179,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
{
|
||||
Decoders.SCSI.FixedSense? decSense = Decoders.SCSI.Sense.DecodeFixed(senseBuffer);
|
||||
if(decSense.HasValue)
|
||||
{
|
||||
if(decSense.Value.ASC == 0x3A)
|
||||
{
|
||||
int leftRetries = 20;
|
||||
@@ -213,7 +210,6 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
seqTest.MediaIsRecognized &= !sense;
|
||||
}
|
||||
else seqTest.MediaIsRecognized = false;
|
||||
}
|
||||
else seqTest.MediaIsRecognized = false;
|
||||
}
|
||||
|
||||
@@ -302,10 +298,8 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
seqTest.SupportedMediaTypes[i].DensityCodes =
|
||||
new int[mtsh.Value.descriptors[i].densityCodes.Length];
|
||||
for(int j = 0; j < mtsh.Value.descriptors.Length; j++)
|
||||
{
|
||||
seqTest.SupportedMediaTypes[i].DensityCodes[j] =
|
||||
mtsh.Value.descriptors[i].densityCodes[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user