mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
REFACTOR: Convert 'if' statement to 'switch' statement.
This commit is contained in:
@@ -963,223 +963,223 @@ namespace DiscImageChef.Commands
|
||||
}
|
||||
}
|
||||
|
||||
if(devType == Decoders.SCSI.PeripheralDeviceTypes.MultiMediaDevice)
|
||||
{
|
||||
byte[] confBuf;
|
||||
sense = dev.GetConfiguration(out confBuf, out senseBuf, dev.Timeout, out duration);
|
||||
switch(devType) {
|
||||
case Decoders.SCSI.PeripheralDeviceTypes.MultiMediaDevice:
|
||||
byte[] confBuf;
|
||||
sense = dev.GetConfiguration(out confBuf, out senseBuf, dev.Timeout, out duration);
|
||||
|
||||
if(!sense)
|
||||
{
|
||||
DataFile.WriteTo("Device-Info command", options.OutputPrefix, "_mmc_getconfiguration.bin",
|
||||
"MMC GET CONFIGURATION", confBuf);
|
||||
|
||||
Decoders.SCSI.MMC.Features.SeparatedFeatures ftr =
|
||||
Decoders.SCSI.MMC.Features.Separate(confBuf);
|
||||
|
||||
DicConsole.DebugWriteLine("Device-Info command", "GET CONFIGURATION length is {0} bytes",
|
||||
ftr.DataLength);
|
||||
DicConsole.DebugWriteLine("Device-Info command",
|
||||
"GET CONFIGURATION current profile is {0:X4}h",
|
||||
ftr.CurrentProfile);
|
||||
if(ftr.Descriptors != null)
|
||||
if(!sense)
|
||||
{
|
||||
DicConsole.WriteLine("SCSI MMC GET CONFIGURATION Features:");
|
||||
foreach(Decoders.SCSI.MMC.Features.FeatureDescriptor desc in ftr.Descriptors)
|
||||
{
|
||||
DicConsole.DebugWriteLine("Device-Info command", "Feature {0:X4}h", desc.Code);
|
||||
DataFile.WriteTo("Device-Info command", options.OutputPrefix, "_mmc_getconfiguration.bin",
|
||||
"MMC GET CONFIGURATION", confBuf);
|
||||
|
||||
switch(desc.Code)
|
||||
Decoders.SCSI.MMC.Features.SeparatedFeatures ftr =
|
||||
Decoders.SCSI.MMC.Features.Separate(confBuf);
|
||||
|
||||
DicConsole.DebugWriteLine("Device-Info command", "GET CONFIGURATION length is {0} bytes",
|
||||
ftr.DataLength);
|
||||
DicConsole.DebugWriteLine("Device-Info command",
|
||||
"GET CONFIGURATION current profile is {0:X4}h",
|
||||
ftr.CurrentProfile);
|
||||
if(ftr.Descriptors != null)
|
||||
{
|
||||
DicConsole.WriteLine("SCSI MMC GET CONFIGURATION Features:");
|
||||
foreach(Decoders.SCSI.MMC.Features.FeatureDescriptor desc in ftr.Descriptors)
|
||||
{
|
||||
case 0x0000:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0000(desc.Data));
|
||||
break;
|
||||
case 0x0001:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0001(desc.Data));
|
||||
break;
|
||||
case 0x0002:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0002(desc.Data));
|
||||
break;
|
||||
case 0x0003:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0003(desc.Data));
|
||||
break;
|
||||
case 0x0004:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0004(desc.Data));
|
||||
break;
|
||||
case 0x0010:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0010(desc.Data));
|
||||
break;
|
||||
case 0x001D:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_001D(desc.Data));
|
||||
break;
|
||||
case 0x001E:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_001E(desc.Data));
|
||||
break;
|
||||
case 0x001F:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_001F(desc.Data));
|
||||
break;
|
||||
case 0x0020:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0020(desc.Data));
|
||||
break;
|
||||
case 0x0021:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0021(desc.Data));
|
||||
break;
|
||||
case 0x0022:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0022(desc.Data));
|
||||
break;
|
||||
case 0x0023:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0023(desc.Data));
|
||||
break;
|
||||
case 0x0024:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0024(desc.Data));
|
||||
break;
|
||||
case 0x0025:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0025(desc.Data));
|
||||
break;
|
||||
case 0x0026:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0026(desc.Data));
|
||||
break;
|
||||
case 0x0027:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0027(desc.Data));
|
||||
break;
|
||||
case 0x0028:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0028(desc.Data));
|
||||
break;
|
||||
case 0x0029:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0029(desc.Data));
|
||||
break;
|
||||
case 0x002A:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002A(desc.Data));
|
||||
break;
|
||||
case 0x002B:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002B(desc.Data));
|
||||
break;
|
||||
case 0x002C:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002C(desc.Data));
|
||||
break;
|
||||
case 0x002D:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002D(desc.Data));
|
||||
break;
|
||||
case 0x002E:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002E(desc.Data));
|
||||
break;
|
||||
case 0x002F:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002F(desc.Data));
|
||||
break;
|
||||
case 0x0030:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0030(desc.Data));
|
||||
break;
|
||||
case 0x0031:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0031(desc.Data));
|
||||
break;
|
||||
case 0x0032:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0032(desc.Data));
|
||||
break;
|
||||
case 0x0033:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0033(desc.Data));
|
||||
break;
|
||||
case 0x0035:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0035(desc.Data));
|
||||
break;
|
||||
case 0x0037:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0037(desc.Data));
|
||||
break;
|
||||
case 0x0038:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0038(desc.Data));
|
||||
break;
|
||||
case 0x003A:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_003A(desc.Data));
|
||||
break;
|
||||
case 0x003B:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_003B(desc.Data));
|
||||
break;
|
||||
case 0x0040:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0040(desc.Data));
|
||||
break;
|
||||
case 0x0041:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0041(desc.Data));
|
||||
break;
|
||||
case 0x0042:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0042(desc.Data));
|
||||
break;
|
||||
case 0x0050:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0050(desc.Data));
|
||||
break;
|
||||
case 0x0051:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0051(desc.Data));
|
||||
break;
|
||||
case 0x0080:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0080(desc.Data));
|
||||
break;
|
||||
case 0x0100:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0100(desc.Data));
|
||||
break;
|
||||
case 0x0101:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0101(desc.Data));
|
||||
break;
|
||||
case 0x0102:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0102(desc.Data));
|
||||
break;
|
||||
case 0x0103:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0103(desc.Data));
|
||||
break;
|
||||
case 0x0104:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0104(desc.Data));
|
||||
break;
|
||||
case 0x0105:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0105(desc.Data));
|
||||
break;
|
||||
case 0x0106:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0106(desc.Data));
|
||||
break;
|
||||
case 0x0107:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0107(desc.Data));
|
||||
break;
|
||||
case 0x0108:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0108(desc.Data));
|
||||
break;
|
||||
case 0x0109:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0109(desc.Data));
|
||||
break;
|
||||
case 0x010A:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_010A(desc.Data));
|
||||
break;
|
||||
case 0x010B:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_010B(desc.Data));
|
||||
break;
|
||||
case 0x010C:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_010C(desc.Data));
|
||||
break;
|
||||
case 0x010D:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_010D(desc.Data));
|
||||
break;
|
||||
case 0x010E:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_010E(desc.Data));
|
||||
break;
|
||||
case 0x0110:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0110(desc.Data));
|
||||
break;
|
||||
case 0x0113:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0113(desc.Data));
|
||||
break;
|
||||
case 0x0142:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0142(desc.Data));
|
||||
break;
|
||||
default:
|
||||
DicConsole.WriteLine("Found unknown feature code {0:X4}h", desc.Code);
|
||||
break;
|
||||
DicConsole.DebugWriteLine("Device-Info command", "Feature {0:X4}h", desc.Code);
|
||||
|
||||
switch(desc.Code)
|
||||
{
|
||||
case 0x0000:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0000(desc.Data));
|
||||
break;
|
||||
case 0x0001:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0001(desc.Data));
|
||||
break;
|
||||
case 0x0002:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0002(desc.Data));
|
||||
break;
|
||||
case 0x0003:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0003(desc.Data));
|
||||
break;
|
||||
case 0x0004:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0004(desc.Data));
|
||||
break;
|
||||
case 0x0010:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0010(desc.Data));
|
||||
break;
|
||||
case 0x001D:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_001D(desc.Data));
|
||||
break;
|
||||
case 0x001E:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_001E(desc.Data));
|
||||
break;
|
||||
case 0x001F:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_001F(desc.Data));
|
||||
break;
|
||||
case 0x0020:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0020(desc.Data));
|
||||
break;
|
||||
case 0x0021:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0021(desc.Data));
|
||||
break;
|
||||
case 0x0022:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0022(desc.Data));
|
||||
break;
|
||||
case 0x0023:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0023(desc.Data));
|
||||
break;
|
||||
case 0x0024:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0024(desc.Data));
|
||||
break;
|
||||
case 0x0025:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0025(desc.Data));
|
||||
break;
|
||||
case 0x0026:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0026(desc.Data));
|
||||
break;
|
||||
case 0x0027:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0027(desc.Data));
|
||||
break;
|
||||
case 0x0028:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0028(desc.Data));
|
||||
break;
|
||||
case 0x0029:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0029(desc.Data));
|
||||
break;
|
||||
case 0x002A:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002A(desc.Data));
|
||||
break;
|
||||
case 0x002B:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002B(desc.Data));
|
||||
break;
|
||||
case 0x002C:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002C(desc.Data));
|
||||
break;
|
||||
case 0x002D:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002D(desc.Data));
|
||||
break;
|
||||
case 0x002E:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002E(desc.Data));
|
||||
break;
|
||||
case 0x002F:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002F(desc.Data));
|
||||
break;
|
||||
case 0x0030:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0030(desc.Data));
|
||||
break;
|
||||
case 0x0031:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0031(desc.Data));
|
||||
break;
|
||||
case 0x0032:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0032(desc.Data));
|
||||
break;
|
||||
case 0x0033:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0033(desc.Data));
|
||||
break;
|
||||
case 0x0035:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0035(desc.Data));
|
||||
break;
|
||||
case 0x0037:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0037(desc.Data));
|
||||
break;
|
||||
case 0x0038:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0038(desc.Data));
|
||||
break;
|
||||
case 0x003A:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_003A(desc.Data));
|
||||
break;
|
||||
case 0x003B:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_003B(desc.Data));
|
||||
break;
|
||||
case 0x0040:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0040(desc.Data));
|
||||
break;
|
||||
case 0x0041:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0041(desc.Data));
|
||||
break;
|
||||
case 0x0042:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0042(desc.Data));
|
||||
break;
|
||||
case 0x0050:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0050(desc.Data));
|
||||
break;
|
||||
case 0x0051:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0051(desc.Data));
|
||||
break;
|
||||
case 0x0080:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0080(desc.Data));
|
||||
break;
|
||||
case 0x0100:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0100(desc.Data));
|
||||
break;
|
||||
case 0x0101:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0101(desc.Data));
|
||||
break;
|
||||
case 0x0102:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0102(desc.Data));
|
||||
break;
|
||||
case 0x0103:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0103(desc.Data));
|
||||
break;
|
||||
case 0x0104:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0104(desc.Data));
|
||||
break;
|
||||
case 0x0105:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0105(desc.Data));
|
||||
break;
|
||||
case 0x0106:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0106(desc.Data));
|
||||
break;
|
||||
case 0x0107:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0107(desc.Data));
|
||||
break;
|
||||
case 0x0108:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0108(desc.Data));
|
||||
break;
|
||||
case 0x0109:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0109(desc.Data));
|
||||
break;
|
||||
case 0x010A:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_010A(desc.Data));
|
||||
break;
|
||||
case 0x010B:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_010B(desc.Data));
|
||||
break;
|
||||
case 0x010C:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_010C(desc.Data));
|
||||
break;
|
||||
case 0x010D:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_010D(desc.Data));
|
||||
break;
|
||||
case 0x010E:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_010E(desc.Data));
|
||||
break;
|
||||
case 0x0110:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0110(desc.Data));
|
||||
break;
|
||||
case 0x0113:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0113(desc.Data));
|
||||
break;
|
||||
case 0x0142:
|
||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0142(desc.Data));
|
||||
break;
|
||||
default:
|
||||
DicConsole.WriteLine("Found unknown feature code {0:X4}h", desc.Code);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
DicConsole.DebugWriteLine("Device-Info command",
|
||||
"GET CONFIGURATION returned no feature descriptors");
|
||||
}
|
||||
else
|
||||
DicConsole.DebugWriteLine("Device-Info command",
|
||||
"GET CONFIGURATION returned no feature descriptors");
|
||||
}
|
||||
|
||||
// TODO: DVD drives respond correctly to BD status.
|
||||
// While specification says if no medium is present
|
||||
// it should inform all possible capabilities,
|
||||
// testing drives show only supported media capabilities.
|
||||
/*
|
||||
// TODO: DVD drives respond correctly to BD status.
|
||||
// While specification says if no medium is present
|
||||
// it should inform all possible capabilities,
|
||||
// testing drives show only supported media capabilities.
|
||||
/*
|
||||
byte[] strBuf;
|
||||
sense = dev.ReadDiscStructure(out strBuf, out senseBuf, MmcDiscStructureMediaType.DVD, 0, 0, MmcDiscStructureFormat.CapabilityList, 0, dev.Timeout, out duration);
|
||||
|
||||
@@ -1220,284 +1220,283 @@ namespace DiscImageChef.Commands
|
||||
}
|
||||
*/
|
||||
|
||||
#region Plextor
|
||||
if(dev.Manufacturer == "PLEXTOR")
|
||||
{
|
||||
bool plxtSense = true;
|
||||
bool plxtDvd = false;
|
||||
byte[] plxtBuf = null;
|
||||
|
||||
switch(dev.Model)
|
||||
#region Plextor
|
||||
if(dev.Manufacturer == "PLEXTOR")
|
||||
{
|
||||
case "DVDR PX-708A":
|
||||
case "DVDR PX-708A2":
|
||||
case "DVDR PX-712A":
|
||||
plxtDvd = true;
|
||||
plxtSense = dev.PlextorReadEeprom(out plxtBuf, out senseBuf, dev.Timeout,
|
||||
out duration);
|
||||
break;
|
||||
case "DVDR PX-714A":
|
||||
case "DVDR PX-716A":
|
||||
case "DVDR PX-716AL":
|
||||
case "DVDR PX-755A":
|
||||
case "DVDR PX-760A":
|
||||
{
|
||||
byte[] plxtBufSmall;
|
||||
plxtBuf = new byte[256 * 4];
|
||||
for(byte i = 0; i < 4; i++)
|
||||
{
|
||||
plxtSense = dev.PlextorReadEepromBlock(out plxtBufSmall, out senseBuf, i, 256,
|
||||
dev.Timeout, out duration);
|
||||
if(plxtSense) break;
|
||||
bool plxtSense = true;
|
||||
bool plxtDvd = false;
|
||||
byte[] plxtBuf = null;
|
||||
|
||||
Array.Copy(plxtBufSmall, 0, plxtBuf, i * 256, 256);
|
||||
switch(dev.Model)
|
||||
{
|
||||
case "DVDR PX-708A":
|
||||
case "DVDR PX-708A2":
|
||||
case "DVDR PX-712A":
|
||||
plxtDvd = true;
|
||||
plxtSense = dev.PlextorReadEeprom(out plxtBuf, out senseBuf, dev.Timeout,
|
||||
out duration);
|
||||
break;
|
||||
case "DVDR PX-714A":
|
||||
case "DVDR PX-716A":
|
||||
case "DVDR PX-716AL":
|
||||
case "DVDR PX-755A":
|
||||
case "DVDR PX-760A":
|
||||
{
|
||||
byte[] plxtBufSmall;
|
||||
plxtBuf = new byte[256 * 4];
|
||||
for(byte i = 0; i < 4; i++)
|
||||
{
|
||||
plxtSense = dev.PlextorReadEepromBlock(out plxtBufSmall, out senseBuf, i, 256,
|
||||
dev.Timeout, out duration);
|
||||
if(plxtSense) break;
|
||||
|
||||
Array.Copy(plxtBufSmall, 0, plxtBuf, i * 256, 256);
|
||||
}
|
||||
|
||||
plxtDvd = true;
|
||||
break;
|
||||
}
|
||||
|
||||
plxtDvd = true;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
if(dev.Model.StartsWith("CD-R ", StringComparison.Ordinal))
|
||||
plxtSense = dev.PlextorReadEepromCdr(out plxtBuf, out senseBuf, dev.Timeout,
|
||||
out duration);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!plxtSense)
|
||||
{
|
||||
DataFile.WriteTo("Device-Info command", options.OutputPrefix, "_plextor_eeprom.bin",
|
||||
"PLEXTOR READ EEPROM", plxtBuf);
|
||||
|
||||
ushort discs;
|
||||
uint cdReadTime, cdWriteTime, dvdReadTime = 0, dvdWriteTime = 0;
|
||||
|
||||
BigEndianBitConverter.IsLittleEndian = BitConverter.IsLittleEndian;
|
||||
if(plxtDvd)
|
||||
{
|
||||
discs = BigEndianBitConverter.ToUInt16(plxtBuf, 0x0120);
|
||||
cdReadTime = BigEndianBitConverter.ToUInt32(plxtBuf, 0x0122);
|
||||
cdWriteTime = BigEndianBitConverter.ToUInt32(plxtBuf, 0x0126);
|
||||
dvdReadTime = BigEndianBitConverter.ToUInt32(plxtBuf, 0x012A);
|
||||
dvdWriteTime = BigEndianBitConverter.ToUInt32(plxtBuf, 0x012E);
|
||||
}
|
||||
else
|
||||
{
|
||||
discs = BigEndianBitConverter.ToUInt16(plxtBuf, 0x0078);
|
||||
cdReadTime = BigEndianBitConverter.ToUInt32(plxtBuf, 0x006C);
|
||||
cdWriteTime = BigEndianBitConverter.ToUInt32(plxtBuf, 0x007A);
|
||||
}
|
||||
|
||||
DicConsole.WriteLine("Drive has loaded a total of {0} discs", discs);
|
||||
DicConsole
|
||||
.WriteLine("Drive has spent {0} hours, {1} minutes and {2} seconds reading CDs",
|
||||
cdReadTime / 3600, cdReadTime / 60 % 60, cdReadTime % 60);
|
||||
DicConsole
|
||||
.WriteLine("Drive has spent {0} hours, {1} minutes and {2} seconds writing CDs",
|
||||
cdWriteTime / 3600, cdWriteTime / 60 % 60, cdWriteTime % 60);
|
||||
if(plxtDvd)
|
||||
{
|
||||
DicConsole
|
||||
.WriteLine("Drive has spent {0} hours, {1} minutes and {2} seconds reading DVDs",
|
||||
dvdReadTime / 3600, dvdReadTime / 60 % 60, dvdReadTime % 60);
|
||||
DicConsole
|
||||
.WriteLine("Drive has spent {0} hours, {1} minutes and {2} seconds writing DVDs",
|
||||
dvdWriteTime / 3600, dvdWriteTime / 60 % 60, dvdWriteTime % 60);
|
||||
}
|
||||
}
|
||||
|
||||
bool plxtPwrRecEnabled;
|
||||
ushort plxtPwrRecSpeed;
|
||||
plxtSense = dev.PlextorGetPoweRec(out senseBuf, out plxtPwrRecEnabled, out plxtPwrRecSpeed,
|
||||
dev.Timeout, out duration);
|
||||
if(!plxtSense)
|
||||
{
|
||||
DicConsole.Write("Drive supports PoweRec");
|
||||
if(plxtPwrRecEnabled)
|
||||
{
|
||||
DicConsole.Write(", has it enabled");
|
||||
|
||||
if(plxtPwrRecSpeed > 0)
|
||||
DicConsole.WriteLine(" and recommends {0} Kb/sec.", plxtPwrRecSpeed);
|
||||
else DicConsole.WriteLine(".");
|
||||
|
||||
ushort plxtPwrRecSelected, plxtPwrRecMax, plxtPwrRecLast;
|
||||
plxtSense = dev.PlextorGetSpeeds(out senseBuf, out plxtPwrRecSelected,
|
||||
out plxtPwrRecMax, out plxtPwrRecLast, dev.Timeout,
|
||||
out duration);
|
||||
|
||||
if(!plxtSense)
|
||||
default:
|
||||
{
|
||||
if(plxtPwrRecSelected > 0)
|
||||
DicConsole
|
||||
.WriteLine("Selected PoweRec speed for currently inserted media is {0} Kb/sec ({1}x)",
|
||||
plxtPwrRecSelected, plxtPwrRecSelected / 177);
|
||||
if(plxtPwrRecMax > 0)
|
||||
DicConsole
|
||||
.WriteLine("Maximum PoweRec speed for currently inserted media is {0} Kb/sec ({1}x)",
|
||||
plxtPwrRecMax, plxtPwrRecMax / 177);
|
||||
if(plxtPwrRecLast > 0)
|
||||
DicConsole.WriteLine("Last used PoweRec was {0} Kb/sec ({1}x)",
|
||||
plxtPwrRecLast, plxtPwrRecLast / 177);
|
||||
if(dev.Model.StartsWith("CD-R ", StringComparison.Ordinal))
|
||||
plxtSense = dev.PlextorReadEepromCdr(out plxtBuf, out senseBuf, dev.Timeout,
|
||||
out duration);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else DicConsole.WriteLine("PoweRec is disabled");
|
||||
}
|
||||
|
||||
// TODO: Check it with a drive
|
||||
plxtSense = dev.PlextorGetSilentMode(out plxtBuf, out senseBuf, dev.Timeout, out duration);
|
||||
if(!plxtSense)
|
||||
{
|
||||
DicConsole.WriteLine("Drive supports Plextor SilentMode");
|
||||
if(plxtBuf[0] == 1)
|
||||
if(!plxtSense)
|
||||
{
|
||||
DicConsole.WriteLine("Plextor SilentMode is enabled:");
|
||||
if(plxtBuf[1] == 2) DicConsole.WriteLine("\tAccess time is slow");
|
||||
else DicConsole.WriteLine("\tAccess time is fast");
|
||||
DataFile.WriteTo("Device-Info command", options.OutputPrefix, "_plextor_eeprom.bin",
|
||||
"PLEXTOR READ EEPROM", plxtBuf);
|
||||
|
||||
if(plxtBuf[2] > 0)
|
||||
DicConsole.WriteLine("\tCD read speed limited to {0}x", plxtBuf[2]);
|
||||
if(plxtBuf[3] > 0 && plxtDvd)
|
||||
DicConsole.WriteLine("\tDVD read speed limited to {0}x", plxtBuf[3]);
|
||||
if(plxtBuf[4] > 0)
|
||||
DicConsole.WriteLine("\tCD write speed limited to {0}x", plxtBuf[4]);
|
||||
if(plxtBuf[6] > 0)
|
||||
DicConsole.WriteLine("\tTray eject speed limited to {0}", -(plxtBuf[6] + 48));
|
||||
if(plxtBuf[7] > 0)
|
||||
DicConsole.WriteLine("\tTray eject speed limited to {0}", plxtBuf[7] - 47);
|
||||
ushort discs;
|
||||
uint cdReadTime, cdWriteTime, dvdReadTime = 0, dvdWriteTime = 0;
|
||||
|
||||
BigEndianBitConverter.IsLittleEndian = BitConverter.IsLittleEndian;
|
||||
if(plxtDvd)
|
||||
{
|
||||
discs = BigEndianBitConverter.ToUInt16(plxtBuf, 0x0120);
|
||||
cdReadTime = BigEndianBitConverter.ToUInt32(plxtBuf, 0x0122);
|
||||
cdWriteTime = BigEndianBitConverter.ToUInt32(plxtBuf, 0x0126);
|
||||
dvdReadTime = BigEndianBitConverter.ToUInt32(plxtBuf, 0x012A);
|
||||
dvdWriteTime = BigEndianBitConverter.ToUInt32(plxtBuf, 0x012E);
|
||||
}
|
||||
else
|
||||
{
|
||||
discs = BigEndianBitConverter.ToUInt16(plxtBuf, 0x0078);
|
||||
cdReadTime = BigEndianBitConverter.ToUInt32(plxtBuf, 0x006C);
|
||||
cdWriteTime = BigEndianBitConverter.ToUInt32(plxtBuf, 0x007A);
|
||||
}
|
||||
|
||||
DicConsole.WriteLine("Drive has loaded a total of {0} discs", discs);
|
||||
DicConsole
|
||||
.WriteLine("Drive has spent {0} hours, {1} minutes and {2} seconds reading CDs",
|
||||
cdReadTime / 3600, cdReadTime / 60 % 60, cdReadTime % 60);
|
||||
DicConsole
|
||||
.WriteLine("Drive has spent {0} hours, {1} minutes and {2} seconds writing CDs",
|
||||
cdWriteTime / 3600, cdWriteTime / 60 % 60, cdWriteTime % 60);
|
||||
if(plxtDvd)
|
||||
{
|
||||
DicConsole
|
||||
.WriteLine("Drive has spent {0} hours, {1} minutes and {2} seconds reading DVDs",
|
||||
dvdReadTime / 3600, dvdReadTime / 60 % 60, dvdReadTime % 60);
|
||||
DicConsole
|
||||
.WriteLine("Drive has spent {0} hours, {1} minutes and {2} seconds writing DVDs",
|
||||
dvdWriteTime / 3600, dvdWriteTime / 60 % 60, dvdWriteTime % 60);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
plxtSense = dev.PlextorGetGigaRec(out plxtBuf, out senseBuf, dev.Timeout, out duration);
|
||||
if(!plxtSense) DicConsole.WriteLine("Drive supports Plextor GigaRec");
|
||||
bool plxtPwrRecEnabled;
|
||||
ushort plxtPwrRecSpeed;
|
||||
plxtSense = dev.PlextorGetPoweRec(out senseBuf, out plxtPwrRecEnabled, out plxtPwrRecSpeed,
|
||||
dev.Timeout, out duration);
|
||||
if(!plxtSense)
|
||||
{
|
||||
DicConsole.Write("Drive supports PoweRec");
|
||||
if(plxtPwrRecEnabled)
|
||||
{
|
||||
DicConsole.Write(", has it enabled");
|
||||
|
||||
plxtSense = dev.PlextorGetSecuRec(out plxtBuf, out senseBuf, dev.Timeout, out duration);
|
||||
if(!plxtSense) DicConsole.WriteLine("Drive supports Plextor SecuRec");
|
||||
if(plxtPwrRecSpeed > 0)
|
||||
DicConsole.WriteLine(" and recommends {0} Kb/sec.", plxtPwrRecSpeed);
|
||||
else DicConsole.WriteLine(".");
|
||||
|
||||
plxtSense = dev.PlextorGetSpeedRead(out plxtBuf, out senseBuf, dev.Timeout, out duration);
|
||||
if(!plxtSense)
|
||||
{
|
||||
DicConsole.Write("Drive supports Plextor SpeedRead");
|
||||
if((plxtBuf[2] & 0x01) == 0x01) DicConsole.WriteLine("and has it enabled");
|
||||
else DicConsole.WriteLine();
|
||||
}
|
||||
ushort plxtPwrRecSelected, plxtPwrRecMax, plxtPwrRecLast;
|
||||
plxtSense = dev.PlextorGetSpeeds(out senseBuf, out plxtPwrRecSelected,
|
||||
out plxtPwrRecMax, out plxtPwrRecLast, dev.Timeout,
|
||||
out duration);
|
||||
|
||||
plxtSense = dev.PlextorGetHiding(out plxtBuf, out senseBuf, dev.Timeout, out duration);
|
||||
if(!plxtSense)
|
||||
{
|
||||
DicConsole.WriteLine("Drive supports hiding CD-Rs and forcing single session");
|
||||
if(!plxtSense)
|
||||
{
|
||||
if(plxtPwrRecSelected > 0)
|
||||
DicConsole
|
||||
.WriteLine("Selected PoweRec speed for currently inserted media is {0} Kb/sec ({1}x)",
|
||||
plxtPwrRecSelected, plxtPwrRecSelected / 177);
|
||||
if(plxtPwrRecMax > 0)
|
||||
DicConsole
|
||||
.WriteLine("Maximum PoweRec speed for currently inserted media is {0} Kb/sec ({1}x)",
|
||||
plxtPwrRecMax, plxtPwrRecMax / 177);
|
||||
if(plxtPwrRecLast > 0)
|
||||
DicConsole.WriteLine("Last used PoweRec was {0} Kb/sec ({1}x)",
|
||||
plxtPwrRecLast, plxtPwrRecLast / 177);
|
||||
}
|
||||
}
|
||||
else DicConsole.WriteLine("PoweRec is disabled");
|
||||
}
|
||||
|
||||
if((plxtBuf[2] & 0x02) == 0x02) DicConsole.WriteLine("Drive currently hides CD-Rs");
|
||||
if((plxtBuf[2] & 0x01) == 0x01)
|
||||
DicConsole.WriteLine("Drive currently forces single session");
|
||||
}
|
||||
// TODO: Check it with a drive
|
||||
plxtSense = dev.PlextorGetSilentMode(out plxtBuf, out senseBuf, dev.Timeout, out duration);
|
||||
if(!plxtSense)
|
||||
{
|
||||
DicConsole.WriteLine("Drive supports Plextor SilentMode");
|
||||
if(plxtBuf[0] == 1)
|
||||
{
|
||||
DicConsole.WriteLine("Plextor SilentMode is enabled:");
|
||||
if(plxtBuf[1] == 2) DicConsole.WriteLine("\tAccess time is slow");
|
||||
else DicConsole.WriteLine("\tAccess time is fast");
|
||||
|
||||
plxtSense = dev.PlextorGetVariRec(out plxtBuf, out senseBuf, false, dev.Timeout,
|
||||
out duration);
|
||||
if(!plxtSense) DicConsole.WriteLine("Drive supports Plextor VariRec");
|
||||
if(plxtBuf[2] > 0)
|
||||
DicConsole.WriteLine("\tCD read speed limited to {0}x", plxtBuf[2]);
|
||||
if(plxtBuf[3] > 0 && plxtDvd)
|
||||
DicConsole.WriteLine("\tDVD read speed limited to {0}x", plxtBuf[3]);
|
||||
if(plxtBuf[4] > 0)
|
||||
DicConsole.WriteLine("\tCD write speed limited to {0}x", plxtBuf[4]);
|
||||
if(plxtBuf[6] > 0)
|
||||
DicConsole.WriteLine("\tTray eject speed limited to {0}", -(plxtBuf[6] + 48));
|
||||
if(plxtBuf[7] > 0)
|
||||
DicConsole.WriteLine("\tTray eject speed limited to {0}", plxtBuf[7] - 47);
|
||||
}
|
||||
}
|
||||
|
||||
if(plxtDvd)
|
||||
{
|
||||
plxtSense = dev.PlextorGetVariRec(out plxtBuf, out senseBuf, true, dev.Timeout,
|
||||
plxtSense = dev.PlextorGetGigaRec(out plxtBuf, out senseBuf, dev.Timeout, out duration);
|
||||
if(!plxtSense) DicConsole.WriteLine("Drive supports Plextor GigaRec");
|
||||
|
||||
plxtSense = dev.PlextorGetSecuRec(out plxtBuf, out senseBuf, dev.Timeout, out duration);
|
||||
if(!plxtSense) DicConsole.WriteLine("Drive supports Plextor SecuRec");
|
||||
|
||||
plxtSense = dev.PlextorGetSpeedRead(out plxtBuf, out senseBuf, dev.Timeout, out duration);
|
||||
if(!plxtSense)
|
||||
{
|
||||
DicConsole.Write("Drive supports Plextor SpeedRead");
|
||||
if((plxtBuf[2] & 0x01) == 0x01) DicConsole.WriteLine("and has it enabled");
|
||||
else DicConsole.WriteLine();
|
||||
}
|
||||
|
||||
plxtSense = dev.PlextorGetHiding(out plxtBuf, out senseBuf, dev.Timeout, out duration);
|
||||
if(!plxtSense)
|
||||
{
|
||||
DicConsole.WriteLine("Drive supports hiding CD-Rs and forcing single session");
|
||||
|
||||
if((plxtBuf[2] & 0x02) == 0x02) DicConsole.WriteLine("Drive currently hides CD-Rs");
|
||||
if((plxtBuf[2] & 0x01) == 0x01)
|
||||
DicConsole.WriteLine("Drive currently forces single session");
|
||||
}
|
||||
|
||||
plxtSense = dev.PlextorGetVariRec(out plxtBuf, out senseBuf, false, dev.Timeout,
|
||||
out duration);
|
||||
if(!plxtSense) DicConsole.WriteLine("Drive supports Plextor VariRec for DVDs");
|
||||
if(!plxtSense) DicConsole.WriteLine("Drive supports Plextor VariRec");
|
||||
|
||||
plxtSense = dev.PlextorGetBitsetting(out plxtBuf, out senseBuf, false, dev.Timeout,
|
||||
out duration);
|
||||
if(!plxtSense) DicConsole.WriteLine("Drive supports bitsetting DVD+R book type");
|
||||
plxtSense = dev.PlextorGetBitsetting(out plxtBuf, out senseBuf, true, dev.Timeout,
|
||||
out duration);
|
||||
if(!plxtSense) DicConsole.WriteLine("Drive supports bitsetting DVD+R DL book type");
|
||||
plxtSense = dev.PlextorGetTestWriteDvdPlus(out plxtBuf, out senseBuf, dev.Timeout,
|
||||
out duration);
|
||||
if(!plxtSense) DicConsole.WriteLine("Drive supports test writing DVD+");
|
||||
if(plxtDvd)
|
||||
{
|
||||
plxtSense = dev.PlextorGetVariRec(out plxtBuf, out senseBuf, true, dev.Timeout,
|
||||
out duration);
|
||||
if(!plxtSense) DicConsole.WriteLine("Drive supports Plextor VariRec for DVDs");
|
||||
|
||||
plxtSense = dev.PlextorGetBitsetting(out plxtBuf, out senseBuf, false, dev.Timeout,
|
||||
out duration);
|
||||
if(!plxtSense) DicConsole.WriteLine("Drive supports bitsetting DVD+R book type");
|
||||
plxtSense = dev.PlextorGetBitsetting(out plxtBuf, out senseBuf, true, dev.Timeout,
|
||||
out duration);
|
||||
if(!plxtSense) DicConsole.WriteLine("Drive supports bitsetting DVD+R DL book type");
|
||||
plxtSense = dev.PlextorGetTestWriteDvdPlus(out plxtBuf, out senseBuf, dev.Timeout,
|
||||
out duration);
|
||||
if(!plxtSense) DicConsole.WriteLine("Drive supports test writing DVD+");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion Plextor
|
||||
#endregion Plextor
|
||||
|
||||
if(inq.Value.KreonPresent)
|
||||
{
|
||||
KreonFeatures krFeatures;
|
||||
if(!dev.KreonGetFeatureList(out senseBuf, out krFeatures, dev.Timeout, out duration))
|
||||
if(inq.Value.KreonPresent)
|
||||
{
|
||||
DicConsole.WriteLine("Drive has kreon firmware:");
|
||||
if(krFeatures.HasFlag(KreonFeatures.ChallengeResponse))
|
||||
DicConsole.WriteLine("\tCan do challenge/response with Xbox discs");
|
||||
if(krFeatures.HasFlag(KreonFeatures.DecryptSs))
|
||||
DicConsole.WriteLine("\tCan read and descrypt SS from Xbox discs");
|
||||
if(krFeatures.HasFlag(KreonFeatures.XtremeUnlock))
|
||||
DicConsole.WriteLine("\tCan set xtreme unlock state with Xbox discs");
|
||||
if(krFeatures.HasFlag(KreonFeatures.WxripperUnlock))
|
||||
DicConsole.WriteLine("\tCan set wxripper unlock state with Xbox discs");
|
||||
if(krFeatures.HasFlag(KreonFeatures.ChallengeResponse360))
|
||||
DicConsole.WriteLine("\tCan do challenge/response with Xbox 360 discs");
|
||||
if(krFeatures.HasFlag(KreonFeatures.DecryptSs360))
|
||||
DicConsole.WriteLine("\tCan read and descrypt SS from Xbox 360 discs");
|
||||
if(krFeatures.HasFlag(KreonFeatures.XtremeUnlock360))
|
||||
DicConsole.WriteLine("\tCan set xtreme unlock state with Xbox 360 discs");
|
||||
if(krFeatures.HasFlag(KreonFeatures.WxripperUnlock360))
|
||||
DicConsole.WriteLine("\tCan set wxripper unlock state with Xbox 360 discs");
|
||||
if(krFeatures.HasFlag(KreonFeatures.Lock))
|
||||
DicConsole.WriteLine("\tCan set locked state");
|
||||
if(krFeatures.HasFlag(KreonFeatures.ErrorSkipping))
|
||||
DicConsole.WriteLine("\tCan skip read errors");
|
||||
KreonFeatures krFeatures;
|
||||
if(!dev.KreonGetFeatureList(out senseBuf, out krFeatures, dev.Timeout, out duration))
|
||||
{
|
||||
DicConsole.WriteLine("Drive has kreon firmware:");
|
||||
if(krFeatures.HasFlag(KreonFeatures.ChallengeResponse))
|
||||
DicConsole.WriteLine("\tCan do challenge/response with Xbox discs");
|
||||
if(krFeatures.HasFlag(KreonFeatures.DecryptSs))
|
||||
DicConsole.WriteLine("\tCan read and descrypt SS from Xbox discs");
|
||||
if(krFeatures.HasFlag(KreonFeatures.XtremeUnlock))
|
||||
DicConsole.WriteLine("\tCan set xtreme unlock state with Xbox discs");
|
||||
if(krFeatures.HasFlag(KreonFeatures.WxripperUnlock))
|
||||
DicConsole.WriteLine("\tCan set wxripper unlock state with Xbox discs");
|
||||
if(krFeatures.HasFlag(KreonFeatures.ChallengeResponse360))
|
||||
DicConsole.WriteLine("\tCan do challenge/response with Xbox 360 discs");
|
||||
if(krFeatures.HasFlag(KreonFeatures.DecryptSs360))
|
||||
DicConsole.WriteLine("\tCan read and descrypt SS from Xbox 360 discs");
|
||||
if(krFeatures.HasFlag(KreonFeatures.XtremeUnlock360))
|
||||
DicConsole.WriteLine("\tCan set xtreme unlock state with Xbox 360 discs");
|
||||
if(krFeatures.HasFlag(KreonFeatures.WxripperUnlock360))
|
||||
DicConsole.WriteLine("\tCan set wxripper unlock state with Xbox 360 discs");
|
||||
if(krFeatures.HasFlag(KreonFeatures.Lock))
|
||||
DicConsole.WriteLine("\tCan set locked state");
|
||||
if(krFeatures.HasFlag(KreonFeatures.ErrorSkipping))
|
||||
DicConsole.WriteLine("\tCan skip read errors");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Decoders.SCSI.PeripheralDeviceTypes.SequentialAccess:
|
||||
byte[] seqBuf;
|
||||
|
||||
if(devType == Decoders.SCSI.PeripheralDeviceTypes.SequentialAccess)
|
||||
{
|
||||
byte[] seqBuf;
|
||||
|
||||
sense = dev.ReadBlockLimits(out seqBuf, out senseBuf, dev.Timeout, out duration);
|
||||
if(sense)
|
||||
DicConsole.ErrorWriteLine("READ BLOCK LIMITS:\n{0}",
|
||||
Decoders.SCSI.Sense.PrettifySense(senseBuf));
|
||||
else
|
||||
{
|
||||
DataFile.WriteTo("Device-Info command", options.OutputPrefix, "_ssc_readblocklimits.bin",
|
||||
"SSC READ BLOCK LIMITS", seqBuf);
|
||||
DicConsole.WriteLine("Block limits for device:");
|
||||
DicConsole.WriteLine(Decoders.SCSI.SSC.BlockLimits.Prettify(seqBuf));
|
||||
}
|
||||
|
||||
sense = dev.ReportDensitySupport(out seqBuf, out senseBuf, dev.Timeout, out duration);
|
||||
if(sense)
|
||||
DicConsole.ErrorWriteLine("REPORT DENSITY SUPPORT:\n{0}",
|
||||
Decoders.SCSI.Sense.PrettifySense(senseBuf));
|
||||
else
|
||||
{
|
||||
DataFile.WriteTo("Device-Info command", options.OutputPrefix,
|
||||
"_ssc_reportdensitysupport.bin", "SSC REPORT DENSITY SUPPORT", seqBuf);
|
||||
Decoders.SCSI.SSC.DensitySupport.DensitySupportHeader? dens =
|
||||
Decoders.SCSI.SSC.DensitySupport.DecodeDensity(seqBuf);
|
||||
if(dens.HasValue)
|
||||
sense = dev.ReadBlockLimits(out seqBuf, out senseBuf, dev.Timeout, out duration);
|
||||
if(sense)
|
||||
DicConsole.ErrorWriteLine("READ BLOCK LIMITS:\n{0}",
|
||||
Decoders.SCSI.Sense.PrettifySense(senseBuf));
|
||||
else
|
||||
{
|
||||
DicConsole.WriteLine("Densities supported by device:");
|
||||
DicConsole.WriteLine(Decoders.SCSI.SSC.DensitySupport.PrettifyDensity(dens));
|
||||
DataFile.WriteTo("Device-Info command", options.OutputPrefix, "_ssc_readblocklimits.bin",
|
||||
"SSC READ BLOCK LIMITS", seqBuf);
|
||||
DicConsole.WriteLine("Block limits for device:");
|
||||
DicConsole.WriteLine(Decoders.SCSI.SSC.BlockLimits.Prettify(seqBuf));
|
||||
}
|
||||
}
|
||||
|
||||
sense = dev.ReportDensitySupport(out seqBuf, out senseBuf, true, false, dev.Timeout,
|
||||
out duration);
|
||||
if(sense)
|
||||
DicConsole.ErrorWriteLine("REPORT DENSITY SUPPORT (MEDIUM):\n{0}",
|
||||
Decoders.SCSI.Sense.PrettifySense(senseBuf));
|
||||
else
|
||||
{
|
||||
DataFile.WriteTo("Device-Info command", options.OutputPrefix,
|
||||
"_ssc_reportdensitysupport_medium.bin",
|
||||
"SSC REPORT DENSITY SUPPORT (MEDIUM)", seqBuf);
|
||||
Decoders.SCSI.SSC.DensitySupport.MediaTypeSupportHeader? meds =
|
||||
Decoders.SCSI.SSC.DensitySupport.DecodeMediumType(seqBuf);
|
||||
if(meds.HasValue)
|
||||
sense = dev.ReportDensitySupport(out seqBuf, out senseBuf, dev.Timeout, out duration);
|
||||
if(sense)
|
||||
DicConsole.ErrorWriteLine("REPORT DENSITY SUPPORT:\n{0}",
|
||||
Decoders.SCSI.Sense.PrettifySense(senseBuf));
|
||||
else
|
||||
{
|
||||
DicConsole.WriteLine("Medium types supported by device:");
|
||||
DicConsole.WriteLine(Decoders.SCSI.SSC.DensitySupport.PrettifyMediumType(meds));
|
||||
DataFile.WriteTo("Device-Info command", options.OutputPrefix,
|
||||
"_ssc_reportdensitysupport.bin", "SSC REPORT DENSITY SUPPORT", seqBuf);
|
||||
Decoders.SCSI.SSC.DensitySupport.DensitySupportHeader? dens =
|
||||
Decoders.SCSI.SSC.DensitySupport.DecodeDensity(seqBuf);
|
||||
if(dens.HasValue)
|
||||
{
|
||||
DicConsole.WriteLine("Densities supported by device:");
|
||||
DicConsole.WriteLine(Decoders.SCSI.SSC.DensitySupport.PrettifyDensity(dens));
|
||||
}
|
||||
}
|
||||
DicConsole.WriteLine(Decoders.SCSI.SSC.DensitySupport.PrettifyMediumType(seqBuf));
|
||||
}
|
||||
|
||||
sense = dev.ReportDensitySupport(out seqBuf, out senseBuf, true, false, dev.Timeout,
|
||||
out duration);
|
||||
if(sense)
|
||||
DicConsole.ErrorWriteLine("REPORT DENSITY SUPPORT (MEDIUM):\n{0}",
|
||||
Decoders.SCSI.Sense.PrettifySense(senseBuf));
|
||||
else
|
||||
{
|
||||
DataFile.WriteTo("Device-Info command", options.OutputPrefix,
|
||||
"_ssc_reportdensitysupport_medium.bin",
|
||||
"SSC REPORT DENSITY SUPPORT (MEDIUM)", seqBuf);
|
||||
Decoders.SCSI.SSC.DensitySupport.MediaTypeSupportHeader? meds =
|
||||
Decoders.SCSI.SSC.DensitySupport.DecodeMediumType(seqBuf);
|
||||
if(meds.HasValue)
|
||||
{
|
||||
DicConsole.WriteLine("Medium types supported by device:");
|
||||
DicConsole.WriteLine(Decoders.SCSI.SSC.DensitySupport.PrettifyMediumType(meds));
|
||||
}
|
||||
DicConsole.WriteLine(Decoders.SCSI.SSC.DensitySupport.PrettifyMediumType(seqBuf));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user