mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Code cleanup.
This commit is contained in:
@@ -232,8 +232,8 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
decoded.VolumeIdentifier = new byte[AACSVIResponse.Length - 4];
|
||||
|
||||
decoded.DataLength = BigEndianBitConverter.ToUInt16(AACSVIResponse, 0);
|
||||
decoded.Reserved1 = AACSVIResponse[2];
|
||||
decoded.Reserved2 = AACSVIResponse[3];
|
||||
decoded.Reserved1 = AACSVIResponse[2];
|
||||
decoded.Reserved2 = AACSVIResponse[3];
|
||||
Array.Copy(AACSVIResponse, 4, decoded.VolumeIdentifier, 0, AACSVIResponse.Length - 4);
|
||||
|
||||
return decoded;
|
||||
@@ -247,10 +247,10 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
#if DEBUG
|
||||
#if DEBUG
|
||||
if(response.Reserved1 != 0) sb.AppendFormat("Reserved1 = 0x{0:X2}", response.Reserved1).AppendLine();
|
||||
if(response.Reserved2 != 0) sb.AppendFormat("Reserved2 = 0x{0:X2}", response.Reserved2).AppendLine();
|
||||
#endif
|
||||
#endif
|
||||
sb.AppendFormat("AACS Volume Identifier in hex follows:");
|
||||
sb.AppendLine(PrintHex.ByteArrayToHexArrayString(response.VolumeIdentifier, 80));
|
||||
|
||||
@@ -274,8 +274,8 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
decoded.MediaSerialNumber = new byte[AACSMSNResponse.Length - 4];
|
||||
|
||||
decoded.DataLength = BigEndianBitConverter.ToUInt16(AACSMSNResponse, 0);
|
||||
decoded.Reserved1 = AACSMSNResponse[2];
|
||||
decoded.Reserved2 = AACSMSNResponse[3];
|
||||
decoded.Reserved1 = AACSMSNResponse[2];
|
||||
decoded.Reserved2 = AACSMSNResponse[3];
|
||||
Array.Copy(AACSMSNResponse, 4, decoded.MediaSerialNumber, 0, AACSMSNResponse.Length - 4);
|
||||
|
||||
return decoded;
|
||||
@@ -289,10 +289,10 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
#if DEBUG
|
||||
#if DEBUG
|
||||
if(response.Reserved1 != 0) sb.AppendFormat("Reserved1 = 0x{0:X2}", response.Reserved1).AppendLine();
|
||||
if(response.Reserved2 != 0) sb.AppendFormat("Reserved2 = 0x{0:X2}", response.Reserved2).AppendLine();
|
||||
#endif
|
||||
#endif
|
||||
sb.AppendFormat("AACS Media Serial Number in hex follows:");
|
||||
sb.AppendLine(PrintHex.ByteArrayToHexArrayString(response.MediaSerialNumber, 80));
|
||||
|
||||
@@ -316,8 +316,8 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
decoded.MediaIdentifier = new byte[AACSMIResponse.Length - 4];
|
||||
|
||||
decoded.DataLength = BigEndianBitConverter.ToUInt16(AACSMIResponse, 0);
|
||||
decoded.Reserved1 = AACSMIResponse[2];
|
||||
decoded.Reserved2 = AACSMIResponse[3];
|
||||
decoded.Reserved1 = AACSMIResponse[2];
|
||||
decoded.Reserved2 = AACSMIResponse[3];
|
||||
Array.Copy(AACSMIResponse, 4, decoded.MediaIdentifier, 0, AACSMIResponse.Length - 4);
|
||||
|
||||
return decoded;
|
||||
@@ -331,10 +331,10 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
#if DEBUG
|
||||
#if DEBUG
|
||||
if(response.Reserved1 != 0) sb.AppendFormat("Reserved1 = 0x{0:X2}", response.Reserved1).AppendLine();
|
||||
if(response.Reserved2 != 0) sb.AppendFormat("Reserved2 = 0x{0:X2}", response.Reserved2).AppendLine();
|
||||
#endif
|
||||
#endif
|
||||
sb.AppendFormat("AACS Media Identifier in hex follows:");
|
||||
sb.AppendLine(PrintHex.ByteArrayToHexArrayString(response.MediaIdentifier, 80));
|
||||
|
||||
@@ -358,7 +358,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
decoded.MediaKeyBlockPacks = new byte[AACSMKBResponse.Length - 4];
|
||||
|
||||
decoded.DataLength = BigEndianBitConverter.ToUInt16(AACSMKBResponse, 0);
|
||||
decoded.Reserved = AACSMKBResponse[2];
|
||||
decoded.Reserved = AACSMKBResponse[2];
|
||||
decoded.TotalPacks = AACSMKBResponse[3];
|
||||
Array.Copy(AACSMKBResponse, 4, decoded.MediaKeyBlockPacks, 0, AACSMKBResponse.Length - 4);
|
||||
|
||||
@@ -373,9 +373,9 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
#if DEBUG
|
||||
#if DEBUG
|
||||
if(response.Reserved != 0) sb.AppendFormat("Reserved = 0x{0:X2}", response.Reserved).AppendLine();
|
||||
#endif
|
||||
#endif
|
||||
sb.AppendFormat("Total number of media key blocks available to transfer {0}", response.TotalPacks)
|
||||
.AppendLine();
|
||||
sb.AppendFormat("AACS Media Key Blocks in hex follows:");
|
||||
@@ -401,8 +401,8 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
decoded.DataKeys = new byte[AACSDKResponse.Length - 4];
|
||||
|
||||
decoded.DataLength = BigEndianBitConverter.ToUInt16(AACSDKResponse, 0);
|
||||
decoded.Reserved1 = AACSDKResponse[2];
|
||||
decoded.Reserved2 = AACSDKResponse[3];
|
||||
decoded.Reserved1 = AACSDKResponse[2];
|
||||
decoded.Reserved2 = AACSDKResponse[3];
|
||||
Array.Copy(AACSDKResponse, 4, decoded.DataKeys, 0, AACSDKResponse.Length - 4);
|
||||
|
||||
return decoded;
|
||||
@@ -416,10 +416,10 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
#if DEBUG
|
||||
#if DEBUG
|
||||
if(response.Reserved1 != 0) sb.AppendFormat("Reserved1 = 0x{0:X2}", response.Reserved1).AppendLine();
|
||||
if(response.Reserved2 != 0) sb.AppendFormat("Reserved2 = 0x{0:X2}", response.Reserved2).AppendLine();
|
||||
#endif
|
||||
#endif
|
||||
sb.AppendFormat("AACS Data Keys in hex follows:");
|
||||
sb.AppendLine(PrintHex.ByteArrayToHexArrayString(response.DataKeys, 80));
|
||||
|
||||
@@ -440,8 +440,8 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
|
||||
BigEndianBitConverter.IsLittleEndian = BitConverter.IsLittleEndian;
|
||||
|
||||
decoded.DataLength = BigEndianBitConverter.ToUInt16(AACSLBAExtsResponse, 0);
|
||||
decoded.Reserved = AACSLBAExtsResponse[2];
|
||||
decoded.DataLength = BigEndianBitConverter.ToUInt16(AACSLBAExtsResponse, 0);
|
||||
decoded.Reserved = AACSLBAExtsResponse[2];
|
||||
decoded.MaxLBAExtents = AACSLBAExtsResponse[3];
|
||||
|
||||
if((AACSLBAExtsResponse.Length - 4) % 16 != 0) return decoded;
|
||||
@@ -452,7 +452,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
{
|
||||
decoded.Extents[i].Reserved = new byte[8];
|
||||
Array.Copy(AACSLBAExtsResponse, 0 + i * 16 + 4, decoded.Extents[i].Reserved, 0, 8);
|
||||
decoded.Extents[i].StartLBA = BigEndianBitConverter.ToUInt32(AACSLBAExtsResponse, 8 + i * 16 + 4);
|
||||
decoded.Extents[i].StartLBA = BigEndianBitConverter.ToUInt32(AACSLBAExtsResponse, 8 + i * 16 + 4);
|
||||
decoded.Extents[i].LBACount = BigEndianBitConverter.ToUInt32(AACSLBAExtsResponse, 12 + i * 16 + 4);
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
decoded.MKBPackData = new byte[CPRMMKBResponse.Length - 4];
|
||||
|
||||
decoded.DataLength = BigEndianBitConverter.ToUInt16(CPRMMKBResponse, 0);
|
||||
decoded.Reserved = CPRMMKBResponse[2];
|
||||
decoded.Reserved = CPRMMKBResponse[2];
|
||||
decoded.TotalPacks = CPRMMKBResponse[3];
|
||||
Array.Copy(CPRMMKBResponse, 4, decoded.MKBPackData, 0, CPRMMKBResponse.Length - 4);
|
||||
|
||||
@@ -107,9 +107,9 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
#if DEBUG
|
||||
#if DEBUG
|
||||
if(response.Reserved != 0) sb.AppendFormat("Reserved = 0x{0:X2}", response.Reserved).AppendLine();
|
||||
#endif
|
||||
#endif
|
||||
sb.AppendFormat("Total number of CPRM Media Key Blocks available to transfer: {0}", response.TotalPacks)
|
||||
.AppendLine();
|
||||
sb.AppendFormat("CPRM Media Key Blocks in hex follows:");
|
||||
|
||||
@@ -289,22 +289,22 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
|
||||
if(decoded.DataLength + 2 != response.Length) return null;
|
||||
|
||||
decoded.DataType = (byte)((response[2] & 0xE0) >> 5);
|
||||
decoded.Erasable |= (response[2] & 0x10) == 0x10;
|
||||
decoded.LastSessionStatus = (byte)((response[2] & 0x0C) >> 2);
|
||||
decoded.DiscStatus = (byte)(response[2] & 0x03);
|
||||
decoded.FirstTrackNumber = response[3];
|
||||
decoded.Sessions = (ushort)((response[9] << 8) + response[4]);
|
||||
decoded.FirstTrackLastSession = (ushort)((response[10] << 8) + response[5]);
|
||||
decoded.LastTrackLastSession = (ushort)((response[11] << 8) + response[6]);
|
||||
decoded.DataType = (byte)((response[2] & 0xE0) >> 5);
|
||||
decoded.Erasable |= (response[2] & 0x10) == 0x10;
|
||||
decoded.LastSessionStatus = (byte)((response[2] & 0x0C) >> 2);
|
||||
decoded.DiscStatus = (byte)(response[2] & 0x03);
|
||||
decoded.FirstTrackNumber = response[3];
|
||||
decoded.Sessions = (ushort)((response[9] << 8) + response[4]);
|
||||
decoded.FirstTrackLastSession = (ushort)((response[10] << 8) + response[5]);
|
||||
decoded.LastTrackLastSession = (ushort)((response[11] << 8) + response[6]);
|
||||
|
||||
decoded.DID_V |= (response[7] & 0x80) == 0x80;
|
||||
decoded.DBC_V |= (response[7] & 0x40) == 0x40;
|
||||
decoded.URU |= (response[7] & 0x20) == 0x20;
|
||||
decoded.DAC_V |= (response[7] & 0x10) == 0x10;
|
||||
decoded.Reserved |= (response[7] & 0x08) == 0x08;
|
||||
decoded.Dbit |= (response[7] & 0x04) == 0x04;
|
||||
decoded.BGFormatStatus = (byte)(response[7] & 0x03);
|
||||
decoded.DID_V |= (response[7] & 0x80) == 0x80;
|
||||
decoded.DBC_V |= (response[7] & 0x40) == 0x40;
|
||||
decoded.URU |= (response[7] & 0x20) == 0x20;
|
||||
decoded.DAC_V |= (response[7] & 0x10) == 0x10;
|
||||
decoded.Reserved |= (response[7] & 0x08) == 0x08;
|
||||
decoded.Dbit |= (response[7] & 0x04) == 0x04;
|
||||
decoded.BGFormatStatus = (byte)(response[7] & 0x03);
|
||||
|
||||
decoded.DiscIdentification =
|
||||
(uint)((response[12] << 24) + (response[13] << 16) + (response[14] << 8) + response[15]);
|
||||
@@ -319,14 +319,14 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
decoded.DiscBarcode = BitConverter.ToUInt64(temp, 0);
|
||||
|
||||
decoded.DiscApplicationCode = response[32];
|
||||
decoded.OPCTablesNumber = response[33];
|
||||
decoded.OPCTablesNumber = response[33];
|
||||
|
||||
if(decoded.OPCTablesNumber <= 0 || response.Length != decoded.OPCTablesNumber * 8 + 34) return decoded;
|
||||
|
||||
decoded.OPCTables = new OPCTable[decoded.OPCTablesNumber];
|
||||
for(int i = 0; i < decoded.OPCTablesNumber; i++)
|
||||
{
|
||||
decoded.OPCTables[i].Speed = (ushort)((response[34 + i * 8 + 0] << 16) + response[34 + i * 8 + 1]);
|
||||
decoded.OPCTables[i].Speed = (ushort)((response[34 + i * 8 + 0] << 16) + response[34 + i * 8 + 1]);
|
||||
decoded.OPCTables[i].OPCValues = new byte[6];
|
||||
Array.Copy(response, 34 + i * 8 + 2, decoded.OPCTables[i].OPCValues, 0, 6);
|
||||
}
|
||||
@@ -415,11 +415,12 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
sb.AppendFormat("Last track in last session is track {0}", decoded.LastTrackLastSession).AppendLine();
|
||||
sb.AppendFormat("Last session Lead-In address is {0} (as LBA) or {1:X2}:{2:X2}:{3:X2}",
|
||||
decoded.LastSessionLeadInStartLBA, (decoded.LastSessionLeadInStartLBA & 0xFF0000) >> 16,
|
||||
(decoded.LastSessionLeadInStartLBA & 0xFF00) >> 8, decoded.LastSessionLeadInStartLBA & 0xFF)
|
||||
(decoded.LastSessionLeadInStartLBA & 0xFF00) >> 8,
|
||||
decoded.LastSessionLeadInStartLBA & 0xFF)
|
||||
.AppendLine();
|
||||
sb.AppendFormat("Last possible Lead-Out address is {0} (as LBA) or {1:X2}:{2:X2}:{3:X2}",
|
||||
decoded.LastPossibleLeadOutStartLBA, (decoded.LastPossibleLeadOutStartLBA & 0xFF0000) >> 16,
|
||||
(decoded.LastPossibleLeadOutStartLBA & 0xFF00) >> 8,
|
||||
(decoded.LastPossibleLeadOutStartLBA & 0xFF00) >> 8,
|
||||
decoded.LastPossibleLeadOutStartLBA & 0xFF).AppendLine();
|
||||
|
||||
sb.AppendLine(decoded.URU ? "Disc is defined for unrestricted use" : "Disc is defined for restricted use");
|
||||
@@ -449,11 +450,11 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
|
||||
if(decoded.DataLength + 2 != response.Length) return null;
|
||||
|
||||
decoded.DataType = (byte)((response[2] & 0xE0) >> 5);
|
||||
decoded.MaxTracks = (ushort)((response[4] << 8) + response[5]);
|
||||
decoded.AssignedTracks = (ushort)((response[6] << 8) + response[7]);
|
||||
decoded.MaxAppendableTracks = (ushort)((response[8] << 8) + response[9]);
|
||||
decoded.AppendableTracks = (ushort)((response[10] << 8) + response[11]);
|
||||
decoded.DataType = (byte)((response[2] & 0xE0) >> 5);
|
||||
decoded.MaxTracks = (ushort)((response[4] << 8) + response[5]);
|
||||
decoded.AssignedTracks = (ushort)((response[6] << 8) + response[7]);
|
||||
decoded.MaxAppendableTracks = (ushort)((response[8] << 8) + response[9]);
|
||||
decoded.AppendableTracks = (ushort)((response[10] << 8) + response[11]);
|
||||
|
||||
return decoded;
|
||||
}
|
||||
|
||||
@@ -38,9 +38,9 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
public enum FormatLayerTypeCodes : ushort
|
||||
{
|
||||
CDLayer = 0x0008,
|
||||
DVDLayer = 0x0010,
|
||||
BDLayer = 0x0040,
|
||||
CDLayer = 0x0008,
|
||||
DVDLayer = 0x0010,
|
||||
BDLayer = 0x0040,
|
||||
HDDVDLayer = 0x0050
|
||||
}
|
||||
|
||||
@@ -48,30 +48,30 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
public enum SessionStatusCodes : byte
|
||||
{
|
||||
Empty = 0x00,
|
||||
Incomplete = 0x01,
|
||||
Empty = 0x00,
|
||||
Incomplete = 0x01,
|
||||
ReservedOrDamaged = 0x02,
|
||||
Complete = 0x03
|
||||
Complete = 0x03
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
public enum DiscStatusCodes : byte
|
||||
{
|
||||
Empty = 0x00,
|
||||
Empty = 0x00,
|
||||
Incomplete = 0x01,
|
||||
Finalized = 0x02,
|
||||
Others = 0x03
|
||||
Finalized = 0x02,
|
||||
Others = 0x03
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
public enum BGFormatStatusCodes : byte
|
||||
{
|
||||
NoFormattable = 0x00,
|
||||
NoFormattable = 0x00,
|
||||
IncompleteBackgroundFormat = 0x01,
|
||||
BackgroundFormatInProgress = 0x02,
|
||||
FormatComplete = 0x03
|
||||
FormatComplete = 0x03
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
@@ -82,8 +82,8 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
/// Also valid for CD-DA, DVD and BD
|
||||
/// </summary>
|
||||
CDROM = 0x00,
|
||||
CDi = 0x10,
|
||||
CDROMXA = 0x20,
|
||||
CDi = 0x10,
|
||||
CDROMXA = 0x20,
|
||||
Undefined = 0xFF
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -116,14 +116,14 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
|
||||
BigEndianBitConverter.IsLittleEndian = BitConverter.IsLittleEndian;
|
||||
|
||||
decoded.DataLength = BigEndianBitConverter.ToUInt16(FormatLayersResponse, 0);
|
||||
decoded.Reserved1 = FormatLayersResponse[2];
|
||||
decoded.Reserved2 = FormatLayersResponse[3];
|
||||
decoded.NumberOfLayers = FormatLayersResponse[4];
|
||||
decoded.Reserved3 = (byte)((FormatLayersResponse[5] & 0xC0) >> 6);
|
||||
decoded.DataLength = BigEndianBitConverter.ToUInt16(FormatLayersResponse, 0);
|
||||
decoded.Reserved1 = FormatLayersResponse[2];
|
||||
decoded.Reserved2 = FormatLayersResponse[3];
|
||||
decoded.NumberOfLayers = FormatLayersResponse[4];
|
||||
decoded.Reserved3 = (byte)((FormatLayersResponse[5] & 0xC0) >> 6);
|
||||
decoded.DefaultFormatLayer = (byte)((FormatLayersResponse[5] & 0x30) >> 4);
|
||||
decoded.Reserved4 = (byte)((FormatLayersResponse[5] & 0x0C) >> 2);
|
||||
decoded.OnlineFormatLayer = (byte)(FormatLayersResponse[5] & 0x03);
|
||||
decoded.Reserved4 = (byte)((FormatLayersResponse[5] & 0x0C) >> 2);
|
||||
decoded.OnlineFormatLayer = (byte)(FormatLayersResponse[5] & 0x03);
|
||||
|
||||
decoded.FormatLayers = new ushort[(FormatLayersResponse.Length - 6) / 2];
|
||||
|
||||
@@ -150,28 +150,28 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
{
|
||||
sb.AppendFormat("Layer {0} is of type Blu-ray", i).AppendLine();
|
||||
if(response.DefaultFormatLayer == i) sb.AppendLine("This is the default layer.");
|
||||
if(response.OnlineFormatLayer == i) sb.AppendLine("This is the layer actually in use.");
|
||||
if(response.OnlineFormatLayer == i) sb.AppendLine("This is the layer actually in use.");
|
||||
break;
|
||||
}
|
||||
case (ushort)FormatLayerTypeCodes.CDLayer:
|
||||
{
|
||||
sb.AppendFormat("Layer {0} is of type CD", i).AppendLine();
|
||||
if(response.DefaultFormatLayer == i) sb.AppendLine("This is the default layer.");
|
||||
if(response.OnlineFormatLayer == i) sb.AppendLine("This is the layer actually in use.");
|
||||
if(response.OnlineFormatLayer == i) sb.AppendLine("This is the layer actually in use.");
|
||||
break;
|
||||
}
|
||||
case (ushort)FormatLayerTypeCodes.DVDLayer:
|
||||
{
|
||||
sb.AppendFormat("Layer {0} is of type DVD", i).AppendLine();
|
||||
if(response.DefaultFormatLayer == i) sb.AppendLine("This is the default layer.");
|
||||
if(response.OnlineFormatLayer == i) sb.AppendLine("This is the layer actually in use.");
|
||||
if(response.OnlineFormatLayer == i) sb.AppendLine("This is the layer actually in use.");
|
||||
break;
|
||||
}
|
||||
case (ushort)FormatLayerTypeCodes.HDDVDLayer:
|
||||
{
|
||||
sb.AppendFormat("Layer {0} is of type HD DVD", i).AppendLine();
|
||||
if(response.DefaultFormatLayer == i) sb.AppendLine("This is the default layer.");
|
||||
if(response.OnlineFormatLayer == i) sb.AppendLine("This is the layer actually in use.");
|
||||
if(response.OnlineFormatLayer == i) sb.AppendLine("This is the layer actually in use.");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -179,7 +179,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
sb.AppendFormat("Layer {0} is of unknown type 0x{1:X4}", i, response.FormatLayers[i])
|
||||
.AppendLine();
|
||||
if(response.DefaultFormatLayer == i) sb.AppendLine("This is the default layer.");
|
||||
if(response.OnlineFormatLayer == i) sb.AppendLine("This is the layer actually in use.");
|
||||
if(response.OnlineFormatLayer == i) sb.AppendLine("This is the layer actually in use.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,16 +125,16 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
BigEndianBitConverter.IsLittleEndian = BitConverter.IsLittleEndian;
|
||||
|
||||
decoded.DataLength = BigEndianBitConverter.ToUInt16(WPSResponse, 0);
|
||||
decoded.Reserved1 = WPSResponse[2];
|
||||
decoded.Reserved2 = WPSResponse[3];
|
||||
decoded.Reserved3 = (byte)((WPSResponse[4] & 0xF0) >> 4);
|
||||
decoded.MSWI = Convert.ToBoolean(WPSResponse[4] & 0x08);
|
||||
decoded.CWP = Convert.ToBoolean(WPSResponse[4] & 0x04);
|
||||
decoded.PWP = Convert.ToBoolean(WPSResponse[4] & 0x02);
|
||||
decoded.SWPP = Convert.ToBoolean(WPSResponse[4] & 0x01);
|
||||
decoded.Reserved4 = WPSResponse[5];
|
||||
decoded.Reserved5 = WPSResponse[6];
|
||||
decoded.Reserved6 = WPSResponse[7];
|
||||
decoded.Reserved1 = WPSResponse[2];
|
||||
decoded.Reserved2 = WPSResponse[3];
|
||||
decoded.Reserved3 = (byte)((WPSResponse[4] & 0xF0) >> 4);
|
||||
decoded.MSWI = Convert.ToBoolean(WPSResponse[4] & 0x08);
|
||||
decoded.CWP = Convert.ToBoolean(WPSResponse[4] & 0x04);
|
||||
decoded.PWP = Convert.ToBoolean(WPSResponse[4] & 0x02);
|
||||
decoded.SWPP = Convert.ToBoolean(WPSResponse[4] & 0x01);
|
||||
decoded.Reserved4 = WPSResponse[5];
|
||||
decoded.Reserved5 = WPSResponse[6];
|
||||
decoded.Reserved6 = WPSResponse[7];
|
||||
|
||||
return decoded;
|
||||
}
|
||||
@@ -152,14 +152,14 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
if(response.PWP) sb.AppendLine("Media surface sets write protection");
|
||||
if(response.SWPP) sb.AppendLine("Software write protection is set until power down");
|
||||
|
||||
#if DEBUG
|
||||
#if DEBUG
|
||||
if(response.Reserved1 != 0) sb.AppendFormat("Reserved1 = 0x{0:X2}", response.Reserved1).AppendLine();
|
||||
if(response.Reserved2 != 0) sb.AppendFormat("Reserved2 = 0x{0:X2}", response.Reserved2).AppendLine();
|
||||
if(response.Reserved3 != 0) sb.AppendFormat("Reserved3 = 0x{0:X2}", response.Reserved3).AppendLine();
|
||||
if(response.Reserved4 != 0) sb.AppendFormat("Reserved4 = 0x{0:X2}", response.Reserved4).AppendLine();
|
||||
if(response.Reserved5 != 0) sb.AppendFormat("Reserved5 = 0x{0:X2}", response.Reserved5).AppendLine();
|
||||
if(response.Reserved6 != 0) sb.AppendFormat("Reserved6 = 0x{0:X2}", response.Reserved6).AppendLine();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user