mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Added READ DISC STRUCTURE.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2015-11-02 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
|
* DiscImageChef.Decoders.csproj:
|
||||||
|
* SCSI/DiscStructureCapabilities.cs:
|
||||||
|
Added READ DISC STRUCTURE.
|
||||||
|
|
||||||
2015-11-01 Natalia Portillo <claunia@claunia.com>
|
2015-11-01 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
* SCSI/MMC/Features.cs:
|
* SCSI/MMC/Features.cs:
|
||||||
|
|||||||
@@ -81,6 +81,7 @@
|
|||||||
<Compile Include="SCSI\EVPD.cs" />
|
<Compile Include="SCSI\EVPD.cs" />
|
||||||
<Compile Include="SCSI\Modes.cs" />
|
<Compile Include="SCSI\Modes.cs" />
|
||||||
<Compile Include="SCSI\MMC\Features.cs" />
|
<Compile Include="SCSI\MMC\Features.cs" />
|
||||||
|
<Compile Include="SCSI\DiscStructureCapabilities.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
86
DiscImageChef.Decoders/SCSI/DiscStructureCapabilities.cs
Normal file
86
DiscImageChef.Decoders/SCSI/DiscStructureCapabilities.cs
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
// /***************************************************************************
|
||||||
|
// The Disc Image Chef
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Filename : DiscStructureCapabilities.cs
|
||||||
|
// Version : 1.0
|
||||||
|
// Author(s) : Natalia Portillo
|
||||||
|
//
|
||||||
|
// Component : Component
|
||||||
|
//
|
||||||
|
// Revision : $Revision$
|
||||||
|
// Last change by : $Author$
|
||||||
|
// Date : $Date$
|
||||||
|
//
|
||||||
|
// --[ Description ] ----------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Description
|
||||||
|
//
|
||||||
|
// --[ License ] --------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright (C) 2011-2015 Claunia.com
|
||||||
|
// ****************************************************************************/
|
||||||
|
// //$Id$
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace DiscImageChef.Decoders.SCSI
|
||||||
|
{
|
||||||
|
public static class DiscStructureCapabilities
|
||||||
|
{
|
||||||
|
public struct Capability
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// READ/SEND DISC STRUCTURE format code
|
||||||
|
/// </summary>
|
||||||
|
public byte FormatCode;
|
||||||
|
/// <summary>
|
||||||
|
/// Supported in SEND DISC STRUCTURE
|
||||||
|
/// </summary>
|
||||||
|
public bool SDS;
|
||||||
|
/// <summary>
|
||||||
|
/// Supported in READ DISC STRUCTURE
|
||||||
|
/// </summary>
|
||||||
|
public bool RDS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Capability[] Decode(byte[] response)
|
||||||
|
{
|
||||||
|
ushort len = (ushort)((response[0] << 8) + response[1]);
|
||||||
|
|
||||||
|
if (len + 2 != response.Length)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
List<Capability> caps = new List<Capability>();
|
||||||
|
|
||||||
|
uint offset = 4;
|
||||||
|
|
||||||
|
while (offset < response.Length)
|
||||||
|
{
|
||||||
|
Capability cap = new Capability();
|
||||||
|
cap.FormatCode = response[offset];
|
||||||
|
cap.SDS = (response[offset + 1] & 0x80) == 0x80;
|
||||||
|
cap.RDS = (response[offset + 1] & 0x40) == 0x40;
|
||||||
|
caps.Add(cap);
|
||||||
|
offset += 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
return caps.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,3 +1,9 @@
|
|||||||
|
2015-11-02 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
|
* Enums.cs:
|
||||||
|
* Device/ScsiCommands.cs:
|
||||||
|
Added READ DISC STRUCTURE.
|
||||||
|
|
||||||
2015-11-01 Natalia Portillo <claunia@claunia.com>
|
2015-11-01 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
* Device/ScsiCommands.cs:
|
* Device/ScsiCommands.cs:
|
||||||
|
|||||||
@@ -507,6 +507,45 @@ namespace DiscImageChef.Devices
|
|||||||
|
|
||||||
return sense;
|
return sense;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool ReadDiscStructure(out byte[] buffer, out byte[] senseBuffer, MmcDiscStructureMediaType mediaType, uint address, byte layerNumber, MmcDiscStructureFormat format, byte AGID, uint timeout, out double duration)
|
||||||
|
{
|
||||||
|
senseBuffer = new byte[32];
|
||||||
|
byte[] cdb = new byte[12];
|
||||||
|
buffer = new byte[8];
|
||||||
|
bool sense;
|
||||||
|
|
||||||
|
cdb[0] = (byte)ScsiCommands.ReadDiscStructure;
|
||||||
|
cdb[1] = (byte)((byte)mediaType & 0x0F);
|
||||||
|
cdb[2] = (byte)((address & 0xFF000000) >> 24);
|
||||||
|
cdb[2] = (byte)((address & 0xFF0000) >> 16);
|
||||||
|
cdb[4] = (byte)((address & 0xFF00) >> 8);
|
||||||
|
cdb[5] = (byte)(address & 0xFF);
|
||||||
|
cdb[6] = layerNumber;
|
||||||
|
cdb[7] = (byte)format;
|
||||||
|
cdb[8] = (byte)((buffer.Length & 0xFF00) >> 8);
|
||||||
|
cdb[9] = (byte)(buffer.Length & 0xFF);
|
||||||
|
cdb[10] = (byte)((AGID & 0x03) << 6);
|
||||||
|
|
||||||
|
lastError = SendScsiCommand(cdb, ref buffer, out senseBuffer, timeout, ScsiDirection.In, out duration, out sense);
|
||||||
|
error = lastError != 0;
|
||||||
|
|
||||||
|
if (sense)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
ushort strctLength = (ushort)(((int)buffer[0] << 8) + buffer[1] + 2);
|
||||||
|
buffer = new byte[strctLength];
|
||||||
|
cdb[8] = (byte)((buffer.Length & 0xFF00) >> 8);
|
||||||
|
cdb[9] = (byte)(buffer.Length & 0xFF);
|
||||||
|
senseBuffer = new byte[32];
|
||||||
|
|
||||||
|
lastError = SendScsiCommand(cdb, ref buffer, out senseBuffer, timeout, ScsiDirection.In, out duration, out sense);
|
||||||
|
error = lastError != 0;
|
||||||
|
|
||||||
|
DicConsole.DebugWriteLine("SCSI Device", "READ DISC STRUCTURE took {0} ms.", duration);
|
||||||
|
|
||||||
|
return sense;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2760,5 +2760,207 @@ namespace DiscImageChef.Devices
|
|||||||
Single = 0x02,
|
Single = 0x02,
|
||||||
Reserved = 0x03
|
Reserved = 0x03
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum MmcDiscStructureMediaType : byte
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Disc Structures for DVD and HD DVD
|
||||||
|
/// </summary>
|
||||||
|
DVD = 0x00,
|
||||||
|
/// <summary>
|
||||||
|
/// Disc Structures for BD
|
||||||
|
/// </summary>
|
||||||
|
BD = 0x01
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum MmcDiscStructureFormat : byte
|
||||||
|
{
|
||||||
|
// Generic Format Codes
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// AACS Volume Identifier
|
||||||
|
/// </summary>
|
||||||
|
AACSVolId = 0x80,
|
||||||
|
/// <summary>
|
||||||
|
/// AACS Pre-recorded Media Serial Number
|
||||||
|
/// </summary>
|
||||||
|
AACSMediaSerial = 0x81,
|
||||||
|
/// <summary>
|
||||||
|
/// AACS Media Identifier
|
||||||
|
/// </summary>
|
||||||
|
AACSMediaId = 0x82,
|
||||||
|
/// <summary>
|
||||||
|
/// AACS Lead-in Media Key Block
|
||||||
|
/// </summary>
|
||||||
|
AACSMKB = 0x83,
|
||||||
|
/// <summary>
|
||||||
|
/// AACS Data Keys
|
||||||
|
/// </summary>
|
||||||
|
AACSDataKeys = 0x84,
|
||||||
|
/// <summary>
|
||||||
|
/// AACS LBA extents
|
||||||
|
/// </summary>
|
||||||
|
AACSLBAExtents = 0x85,
|
||||||
|
/// <summary>
|
||||||
|
/// CPRM Media Key Block specified by AACS
|
||||||
|
/// </summary>
|
||||||
|
AACSMKBCPRM = 0x86,
|
||||||
|
/// <summary>
|
||||||
|
/// Recognized format layers
|
||||||
|
/// </summary>
|
||||||
|
RecognizedFormatLayers = 0x90,
|
||||||
|
/// <summary>
|
||||||
|
/// Write protection status
|
||||||
|
/// </summary>
|
||||||
|
WriteProtectionStatus = 0xC0,
|
||||||
|
/// <summary>
|
||||||
|
/// READ/SEND DISC STRUCTURE capability list
|
||||||
|
/// </summary>
|
||||||
|
CapabilityList = 0xFF,
|
||||||
|
|
||||||
|
// DVD Disc Structures
|
||||||
|
/// <summary>
|
||||||
|
/// DVD Lead-in Physical Information
|
||||||
|
/// </summary>
|
||||||
|
PhysicalInformation = 0x00,
|
||||||
|
/// <summary>
|
||||||
|
/// DVD Lead-in Copyright Information
|
||||||
|
/// </summary>
|
||||||
|
CopyrightInformation = 0x01,
|
||||||
|
/// <summary>
|
||||||
|
/// CSS/CPPM Disc key
|
||||||
|
/// </summary>
|
||||||
|
DiscKey = 0x02,
|
||||||
|
/// <summary>
|
||||||
|
/// DVD Burst Cutting Area
|
||||||
|
/// </summary>
|
||||||
|
BurstCuttingArea = 0x03,
|
||||||
|
/// <summary>
|
||||||
|
/// DVD Lead-in Disc Manufacturing Information
|
||||||
|
/// </summary>
|
||||||
|
DiscManufacturingInformation = 0x04,
|
||||||
|
/// <summary>
|
||||||
|
/// DVD Copyright Information from specified sector
|
||||||
|
/// </summary>
|
||||||
|
SectorCopyrightInformation = 0x05,
|
||||||
|
/// <summary>
|
||||||
|
/// CSS/CPPM Media Identifier
|
||||||
|
/// </summary>
|
||||||
|
MediaIdentifier = 0x06,
|
||||||
|
/// <summary>
|
||||||
|
/// CSS/CPPM Media Key Block
|
||||||
|
/// </summary>
|
||||||
|
MediaKeyBlock = 0x07,
|
||||||
|
/// <summary>
|
||||||
|
/// DDS from DVD-RAM
|
||||||
|
/// </summary>
|
||||||
|
DVDRAM_DDS = 0x08,
|
||||||
|
/// <summary>
|
||||||
|
/// DVD-RAM Medium Status
|
||||||
|
/// </summary>
|
||||||
|
DVDRAM_MediumStatus = 0x09,
|
||||||
|
/// <summary>
|
||||||
|
/// DVD-RAM Spare Area Information
|
||||||
|
/// </summary>
|
||||||
|
DVDRAM_SpareAreaInformation = 0x0A,
|
||||||
|
/// <summary>
|
||||||
|
/// DVD-RAM Recording Type Information
|
||||||
|
/// </summary>
|
||||||
|
DVDRAM_RecordingType = 0x0B,
|
||||||
|
/// <summary>
|
||||||
|
/// DVD-R/-RW RMD in last Border-out
|
||||||
|
/// </summary>
|
||||||
|
LastBorderOutRMD = 0x0C,
|
||||||
|
/// <summary>
|
||||||
|
/// Specified RMD from last recorded Border-out
|
||||||
|
/// </summary>
|
||||||
|
SpecifiedRMD = 0x0D,
|
||||||
|
/// <summary>
|
||||||
|
/// DVD-R/-RW Lead-in pre-recorded information
|
||||||
|
/// </summary>
|
||||||
|
PreRecordedInfo = 0x0E,
|
||||||
|
/// <summary>
|
||||||
|
/// DVD-R/-RW Media Identifier
|
||||||
|
/// </summary>
|
||||||
|
DVDR_MediaIdentifier = 0x0F,
|
||||||
|
/// <summary>
|
||||||
|
/// DVD-R/-RW Physical Format Information
|
||||||
|
/// </summary>
|
||||||
|
DVDR_PhysicalInformation = 0x10,
|
||||||
|
/// <summary>
|
||||||
|
/// ADIP
|
||||||
|
/// </summary>
|
||||||
|
ADIP = 0x11,
|
||||||
|
/// <summary>
|
||||||
|
/// HD DVD Lead-in Copyright Protection Information
|
||||||
|
/// </summary>
|
||||||
|
HDDVD_CopyrightInformation = 0x12,
|
||||||
|
/// <summary>
|
||||||
|
/// AACS Lead-in Copyright Data Section
|
||||||
|
/// </summary>
|
||||||
|
DVD_AACS = 0x15,
|
||||||
|
/// <summary>
|
||||||
|
/// HD DVD-R Medium Status
|
||||||
|
/// </summary>
|
||||||
|
HDDVDR_MediumStatus = 0x19,
|
||||||
|
/// <summary>
|
||||||
|
/// HD DVD-R Last recorded RMD in the latest RMZ
|
||||||
|
/// </summary>
|
||||||
|
HDDVDR_LastRMD = 0x1A,
|
||||||
|
/// <summary>
|
||||||
|
/// DVD+/-R DL and DVD-Download DL layer capacity
|
||||||
|
/// </summary>
|
||||||
|
DVDR_LayerCapacity = 0x20,
|
||||||
|
/// <summary>
|
||||||
|
/// DVD-R DL Middle Zone start address
|
||||||
|
/// </summary>
|
||||||
|
MiddleZoneStart = 0x21,
|
||||||
|
/// <summary>
|
||||||
|
/// DVD-R DL Jump Interval Size
|
||||||
|
/// </summary>
|
||||||
|
JumpIntervalSize = 0x22,
|
||||||
|
/// <summary>
|
||||||
|
/// DVD-R DL Start LBA of the manual layer jump
|
||||||
|
/// </summary>
|
||||||
|
ManualLayerJumpStartLBA = 0x23,
|
||||||
|
/// <summary>
|
||||||
|
/// DVD-R DL Remapping information of the specified Anchor Point
|
||||||
|
/// </summary>
|
||||||
|
RemapAnchorPoint = 0x24,
|
||||||
|
/// <summary>
|
||||||
|
/// Disc Control Block
|
||||||
|
/// </summary>
|
||||||
|
DCB = 0x30,
|
||||||
|
|
||||||
|
// BD Disc Structures
|
||||||
|
/// <summary>
|
||||||
|
/// Blu-ray Disc Information
|
||||||
|
/// </summary>
|
||||||
|
DiscInformation = 0x00,
|
||||||
|
/// <summary>
|
||||||
|
/// Blu-ray Burst Cutting Area
|
||||||
|
/// </summary>
|
||||||
|
BD_BurstCuttingArea = 0x03,
|
||||||
|
/// <summary>
|
||||||
|
/// Blu-ray DDS
|
||||||
|
/// </summary>
|
||||||
|
BD_DDS = 0x08,
|
||||||
|
/// <summary>
|
||||||
|
/// Blu-ray Cartridge Status
|
||||||
|
/// </summary>
|
||||||
|
CartridgeStatus = 0x09,
|
||||||
|
/// <summary>
|
||||||
|
/// Blu-ray Spare Area Information
|
||||||
|
/// </summary>
|
||||||
|
BD_SpareAreaInformation = 0x0A,
|
||||||
|
/// <summary>
|
||||||
|
/// Unmodified DFL
|
||||||
|
/// </summary>
|
||||||
|
RawDFL = 0x12,
|
||||||
|
/// <summary>
|
||||||
|
/// Physical Access Control
|
||||||
|
/// </summary>
|
||||||
|
PAC = 0x30
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
2015-11-02 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
|
* Commands/DeviceInfo.cs:
|
||||||
|
Added READ DISC STRUCTURE.
|
||||||
|
|
||||||
2015-11-01 Natalia Portillo <claunia@claunia.com>
|
2015-11-01 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
* Commands/DeviceInfo.cs:
|
* Commands/DeviceInfo.cs:
|
||||||
|
|||||||
@@ -449,208 +449,252 @@ namespace DiscImageChef.Commands
|
|||||||
if (devType == DiscImageChef.Decoders.SCSI.PeripheralDeviceTypes.MultiMediaDevice)
|
if (devType == DiscImageChef.Decoders.SCSI.PeripheralDeviceTypes.MultiMediaDevice)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
byte[] confBuf;
|
||||||
|
sense = dev.GetConfiguration(out confBuf, out senseBuf, dev.Timeout, out duration);
|
||||||
|
|
||||||
byte[] confBuf;
|
if (!sense)
|
||||||
sense = dev.GetConfiguration(out confBuf, out senseBuf, dev.Timeout, out duration);
|
|
||||||
|
|
||||||
if (!sense)
|
|
||||||
{
|
|
||||||
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:");
|
Decoders.SCSI.MMC.Features.SeparatedFeatures ftr = Decoders.SCSI.MMC.Features.Separate(confBuf);
|
||||||
foreach (Decoders.SCSI.MMC.Features.FeatureDescriptor desc in ftr.Descriptors)
|
|
||||||
{
|
|
||||||
DicConsole.DebugWriteLine("Device-Info command", "Feature {0:X4}h", desc.Code);
|
|
||||||
|
|
||||||
switch (desc.Code)
|
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.DebugWriteLine("Device-Info command", "Feature {0:X4}h", desc.Code);
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0000(desc.Data));
|
|
||||||
break;
|
switch (desc.Code)
|
||||||
case 0x0001:
|
{
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0001(desc.Data));
|
case 0x0000:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0000(desc.Data));
|
||||||
case 0x0002:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0002(desc.Data));
|
case 0x0001:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0001(desc.Data));
|
||||||
case 0x0003:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0003(desc.Data));
|
case 0x0002:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0002(desc.Data));
|
||||||
case 0x0004:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0004(desc.Data));
|
case 0x0003:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0003(desc.Data));
|
||||||
case 0x0010:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0010(desc.Data));
|
case 0x0004:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0004(desc.Data));
|
||||||
case 0x001D:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_001D(desc.Data));
|
case 0x0010:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0010(desc.Data));
|
||||||
case 0x001E:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_001E(desc.Data));
|
case 0x001D:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_001D(desc.Data));
|
||||||
case 0x001F:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_001F(desc.Data));
|
case 0x001E:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_001E(desc.Data));
|
||||||
case 0x0020:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0020(desc.Data));
|
case 0x001F:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_001F(desc.Data));
|
||||||
case 0x0021:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0021(desc.Data));
|
case 0x0020:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0020(desc.Data));
|
||||||
case 0x0022:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0022(desc.Data));
|
case 0x0021:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0021(desc.Data));
|
||||||
case 0x0023:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0023(desc.Data));
|
case 0x0022:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0022(desc.Data));
|
||||||
case 0x0024:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0024(desc.Data));
|
case 0x0023:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0023(desc.Data));
|
||||||
case 0x0025:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0025(desc.Data));
|
case 0x0024:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0024(desc.Data));
|
||||||
case 0x0026:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0026(desc.Data));
|
case 0x0025:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0025(desc.Data));
|
||||||
case 0x0027:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0027(desc.Data));
|
case 0x0026:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0026(desc.Data));
|
||||||
case 0x0028:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0028(desc.Data));
|
case 0x0027:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0027(desc.Data));
|
||||||
case 0x0029:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0029(desc.Data));
|
case 0x0028:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0028(desc.Data));
|
||||||
case 0x002A:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002A(desc.Data));
|
case 0x0029:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0029(desc.Data));
|
||||||
case 0x002B:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002B(desc.Data));
|
case 0x002A:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002A(desc.Data));
|
||||||
case 0x002C:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002C(desc.Data));
|
case 0x002B:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002B(desc.Data));
|
||||||
case 0x002D:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002D(desc.Data));
|
case 0x002C:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002C(desc.Data));
|
||||||
case 0x002E:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002E(desc.Data));
|
case 0x002D:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002D(desc.Data));
|
||||||
case 0x002F:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002F(desc.Data));
|
case 0x002E:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002E(desc.Data));
|
||||||
case 0x0030:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0030(desc.Data));
|
case 0x002F:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_002F(desc.Data));
|
||||||
case 0x0031:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0031(desc.Data));
|
case 0x0030:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0030(desc.Data));
|
||||||
case 0x0032:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0032(desc.Data));
|
case 0x0031:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0031(desc.Data));
|
||||||
case 0x0033:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0033(desc.Data));
|
case 0x0032:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0032(desc.Data));
|
||||||
case 0x0035:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0035(desc.Data));
|
case 0x0033:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0033(desc.Data));
|
||||||
case 0x0037:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0037(desc.Data));
|
case 0x0035:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0035(desc.Data));
|
||||||
case 0x0038:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0038(desc.Data));
|
case 0x0037:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0037(desc.Data));
|
||||||
case 0x003A:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_003A(desc.Data));
|
case 0x0038:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0038(desc.Data));
|
||||||
case 0x003B:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_003B(desc.Data));
|
case 0x003A:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_003A(desc.Data));
|
||||||
case 0x0040:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0040(desc.Data));
|
case 0x003B:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_003B(desc.Data));
|
||||||
case 0x0041:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0041(desc.Data));
|
case 0x0040:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0040(desc.Data));
|
||||||
case 0x0042:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0042(desc.Data));
|
case 0x0041:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0041(desc.Data));
|
||||||
case 0x0050:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0050(desc.Data));
|
case 0x0042:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0042(desc.Data));
|
||||||
case 0x0051:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0051(desc.Data));
|
case 0x0050:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0050(desc.Data));
|
||||||
case 0x0080:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0080(desc.Data));
|
case 0x0051:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0051(desc.Data));
|
||||||
case 0x0100:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0100(desc.Data));
|
case 0x0080:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0080(desc.Data));
|
||||||
case 0x0101:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0101(desc.Data));
|
case 0x0100:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0100(desc.Data));
|
||||||
case 0x0102:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0102(desc.Data));
|
case 0x0101:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0101(desc.Data));
|
||||||
case 0x0103:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0103(desc.Data));
|
case 0x0102:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0102(desc.Data));
|
||||||
case 0x0104:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0104(desc.Data));
|
case 0x0103:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0103(desc.Data));
|
||||||
case 0x0105:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0105(desc.Data));
|
case 0x0104:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0104(desc.Data));
|
||||||
case 0x0106:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0106(desc.Data));
|
case 0x0105:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0105(desc.Data));
|
||||||
case 0x0107:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0107(desc.Data));
|
case 0x0106:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0106(desc.Data));
|
||||||
case 0x0108:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0108(desc.Data));
|
case 0x0107:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0107(desc.Data));
|
||||||
case 0x0109:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0109(desc.Data));
|
case 0x0108:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0108(desc.Data));
|
||||||
case 0x010A:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_010A(desc.Data));
|
case 0x0109:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0109(desc.Data));
|
||||||
case 0x010B:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_010B(desc.Data));
|
case 0x010A:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_010A(desc.Data));
|
||||||
case 0x010C:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_010C(desc.Data));
|
case 0x010B:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_010B(desc.Data));
|
||||||
case 0x010D:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_010D(desc.Data));
|
case 0x010C:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_010C(desc.Data));
|
||||||
case 0x010E:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_010E(desc.Data));
|
case 0x010D:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_010D(desc.Data));
|
||||||
case 0x0110:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0110(desc.Data));
|
case 0x010E:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_010E(desc.Data));
|
||||||
case 0x0113:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0113(desc.Data));
|
case 0x0110:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0110(desc.Data));
|
||||||
case 0x0142:
|
break;
|
||||||
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0142(desc.Data));
|
case 0x0113:
|
||||||
break;
|
DicConsole.WriteLine(Decoders.SCSI.MMC.Features.Prettify_0113(desc.Data));
|
||||||
default:
|
break;
|
||||||
DicConsole.WriteLine("Found unknown feature code {0:X4}h", desc.Code);
|
case 0x0142:
|
||||||
break;
|
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");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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);
|
||||||
|
|
||||||
|
if (!sense)
|
||||||
|
{
|
||||||
|
Decoders.SCSI.DiscStructureCapabilities.Capability[] caps = Decoders.SCSI.DiscStructureCapabilities.Decode(strBuf);
|
||||||
|
if (caps != null)
|
||||||
|
{
|
||||||
|
foreach (Decoders.SCSI.DiscStructureCapabilities.Capability cap in caps)
|
||||||
|
{
|
||||||
|
if (cap.SDS && cap.RDS)
|
||||||
|
DicConsole.WriteLine("Drive can READ/SEND DISC STRUCTURE format {0:X2}h", cap.FormatCode);
|
||||||
|
else if (cap.SDS)
|
||||||
|
DicConsole.WriteLine("Drive can SEND DISC STRUCTURE format {0:X2}h", cap.FormatCode);
|
||||||
|
else if (cap.RDS)
|
||||||
|
DicConsole.WriteLine("Drive can READ DISC STRUCTURE format {0:X2}h", cap.FormatCode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
DicConsole.DebugWriteLine("Device-Info command", "GET CONFIGURATION returned no feature descriptors");
|
sense = dev.ReadDiscStructure(out strBuf, out senseBuf, MmcDiscStructureMediaType.BD, 0, 0, MmcDiscStructureFormat.CapabilityList, 0, dev.Timeout, out duration);
|
||||||
|
|
||||||
|
if (!sense)
|
||||||
|
{
|
||||||
|
Decoders.SCSI.DiscStructureCapabilities.Capability[] caps = Decoders.SCSI.DiscStructureCapabilities.Decode(strBuf);
|
||||||
|
if (caps != null)
|
||||||
|
{
|
||||||
|
foreach (Decoders.SCSI.DiscStructureCapabilities.Capability cap in caps)
|
||||||
|
{
|
||||||
|
if (cap.SDS && cap.RDS)
|
||||||
|
DicConsole.WriteLine("Drive can READ/SEND DISC STRUCTURE format {0:X2}h", cap.FormatCode);
|
||||||
|
else if (cap.SDS)
|
||||||
|
DicConsole.WriteLine("Drive can SEND DISC STRUCTURE format {0:X2}h", cap.FormatCode);
|
||||||
|
else if (cap.RDS)
|
||||||
|
DicConsole.WriteLine("Drive can READ DISC STRUCTURE format {0:X2}h", cap.FormatCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user