REFACTOR: Final cleanup of DiscImageChef.Decoders.

This commit is contained in:
2017-12-23 18:31:38 +00:00
parent 60ed13e9b3
commit 354e31d149
100 changed files with 4791 additions and 4707 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -38,19 +38,19 @@ using DiscImageChef.Console;
namespace DiscImageChef.Decoders.Bluray namespace DiscImageChef.Decoders.Bluray
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -112,23 +112,23 @@ namespace DiscImageChef.Decoders.Bluray
public struct BurstCuttingArea public struct BurstCuttingArea
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Always 66 /// Always 66
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Byte 4 to 67 /// Byte 4 to 67
/// BCA data /// BCA data
/// </summary> /// </summary>
public byte[] BCA; public byte[] BCA;
} }

View File

@@ -38,19 +38,19 @@ using DiscImageChef.Console;
namespace DiscImageChef.Decoders.Bluray namespace DiscImageChef.Decoders.Bluray
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -137,58 +137,58 @@ namespace DiscImageChef.Decoders.Bluray
public struct CartridgeStatus public struct CartridgeStatus
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Always 6 /// Always 6
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Byte 4, bit 7 /// Byte 4, bit 7
/// Medium is inserted in a cartridge /// Medium is inserted in a cartridge
/// </summary> /// </summary>
public bool Cartridge; public bool Cartridge;
/// <summary> /// <summary>
/// Byte 4, bit 6 /// Byte 4, bit 6
/// Medium taken out / put in a cartridge /// Medium taken out / put in a cartridge
/// </summary> /// </summary>
public bool OUT; public bool OUT;
/// <summary> /// <summary>
/// Byte 4, bits 5 to 3 /// Byte 4, bits 5 to 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved3; public byte Reserved3;
/// <summary> /// <summary>
/// Byte 4, bit 2 /// Byte 4, bit 2
/// Cartridge sets write protection /// Cartridge sets write protection
/// </summary> /// </summary>
public bool CWP; public bool CWP;
/// <summary> /// <summary>
/// Byte 4, bits 1 to 0 /// Byte 4, bits 1 to 0
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved4; public byte Reserved4;
/// <summary> /// <summary>
/// Byte 5 /// Byte 5
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved5; public byte Reserved5;
/// <summary> /// <summary>
/// Byte 6 /// Byte 6
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved6; public byte Reserved6;
/// <summary> /// <summary>
/// Byte 7 /// Byte 7
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved7; public byte Reserved7;
} }

View File

@@ -38,19 +38,19 @@ using DiscImageChef.Console;
namespace DiscImageChef.Decoders.Bluray namespace DiscImageChef.Decoders.Bluray
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -60,7 +60,7 @@ namespace DiscImageChef.Decoders.Bluray
{ {
#region Private constants #region Private constants
/// <summary> /// <summary>
/// Disc Definition Structure Identifier "DS" /// Disc Definition Structure Identifier "DS"
/// </summary> /// </summary>
const ushort DDSIdentifier = 0x4453; const ushort DDSIdentifier = 0x4453;
#endregion Private constants #endregion Private constants
@@ -162,128 +162,128 @@ namespace DiscImageChef.Decoders.Bluray
public struct DiscDefinitionStructure public struct DiscDefinitionStructure
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data Length /// Data Length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Bytes 4 to 5 /// Bytes 4 to 5
/// "DS" /// "DS"
/// </summary> /// </summary>
public ushort Signature; public ushort Signature;
/// <summary> /// <summary>
/// Byte 6 /// Byte 6
/// DDS format /// DDS format
/// </summary> /// </summary>
public byte Format; public byte Format;
/// <summary> /// <summary>
/// Byte 7 /// Byte 7
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved3; public byte Reserved3;
/// <summary> /// <summary>
/// Bytes 8 to 11 /// Bytes 8 to 11
/// DDS update count /// DDS update count
/// </summary> /// </summary>
public uint UpdateCount; public uint UpdateCount;
/// <summary> /// <summary>
/// Bytes 12 to 19 /// Bytes 12 to 19
/// Reserved /// Reserved
/// </summary> /// </summary>
public ulong Reserved4; public ulong Reserved4;
/// <summary> /// <summary>
/// Bytes 20 to 23 /// Bytes 20 to 23
/// First PSN of Drive Area /// First PSN of Drive Area
/// </summary> /// </summary>
public uint DriveAreaPSN; public uint DriveAreaPSN;
/// <summary> /// <summary>
/// Bytes 24 to 27 /// Bytes 24 to 27
/// Reserved /// Reserved
/// </summary> /// </summary>
public uint Reserved5; public uint Reserved5;
/// <summary> /// <summary>
/// Bytes 28 to 31 /// Bytes 28 to 31
/// First PSN of Defect List /// First PSN of Defect List
/// </summary> /// </summary>
public uint DefectListPSN; public uint DefectListPSN;
/// <summary> /// <summary>
/// Bytes 32 to 35 /// Bytes 32 to 35
/// Reserved /// Reserved
/// </summary> /// </summary>
public uint Reserved6; public uint Reserved6;
/// <summary> /// <summary>
/// Bytes 36 to 39 /// Bytes 36 to 39
/// PSN of LSN 0 of user data area /// PSN of LSN 0 of user data area
/// </summary> /// </summary>
public uint PSNofLSNZero; public uint PSNofLSNZero;
/// <summary> /// <summary>
/// Bytes 40 to 43 /// Bytes 40 to 43
/// Last LSN of user data area /// Last LSN of user data area
/// </summary> /// </summary>
public uint LastUserAreaLSN; public uint LastUserAreaLSN;
/// <summary> /// <summary>
/// Bytes 44 to 47 /// Bytes 44 to 47
/// ISA0 size /// ISA0 size
/// </summary> /// </summary>
public uint ISA0; public uint ISA0;
/// <summary> /// <summary>
/// Bytes 48 to 51 /// Bytes 48 to 51
/// OSA size /// OSA size
/// </summary> /// </summary>
public uint OSA; public uint OSA;
/// <summary> /// <summary>
/// Bytes 52 to 55 /// Bytes 52 to 55
/// ISA1 size /// ISA1 size
/// </summary> /// </summary>
public uint ISA1; public uint ISA1;
/// <summary> /// <summary>
/// Byte 56 /// Byte 56
/// Spare Area full flags /// Spare Area full flags
/// </summary> /// </summary>
public byte SpareAreaFullFlags; public byte SpareAreaFullFlags;
/// <summary> /// <summary>
/// Byte 57 /// Byte 57
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved7; public byte Reserved7;
/// <summary> /// <summary>
/// Byte 58 /// Byte 58
/// Disc type specific field /// Disc type specific field
/// </summary> /// </summary>
public byte DiscTypeSpecificField1; public byte DiscTypeSpecificField1;
/// <summary> /// <summary>
/// Byte 59 /// Byte 59
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved8; public byte Reserved8;
/// <summary> /// <summary>
/// Byte 60 to 63 /// Byte 60 to 63
/// Disc type specific field /// Disc type specific field
/// </summary> /// </summary>
public uint DiscTypeSpecificField2; public uint DiscTypeSpecificField2;
/// <summary> /// <summary>
/// Byte 64 to 67 /// Byte 64 to 67
/// Reserved /// Reserved
/// </summary> /// </summary>
public uint Reserved9; public uint Reserved9;
/// <summary> /// <summary>
/// Bytes 68 to 99 /// Bytes 68 to 99
/// Status bits of INFO1/2 and PAC1/2 on L0 and L1 /// Status bits of INFO1/2 and PAC1/2 on L0 and L1
/// </summary> /// </summary>
public byte[] StatusBits; public byte[] StatusBits;
/// <summary> /// <summary>
/// Bytes 100 to end /// Bytes 100 to end
/// Disc type specific data /// Disc type specific data
/// </summary> /// </summary>
public byte[] DiscTypeSpecificData; public byte[] DiscTypeSpecificData;
} }

View File

@@ -39,19 +39,19 @@ using DiscImageChef.Console;
namespace DiscImageChef.Decoders.Bluray namespace DiscImageChef.Decoders.Bluray
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -65,7 +65,7 @@ namespace DiscImageChef.Decoders.Bluray
const string DiscTypeBDR = "BDR"; const string DiscTypeBDR = "BDR";
/// <summary> /// <summary>
/// Disc Information Unit Identifier "DI" /// Disc Information Unit Identifier "DI"
/// </summary> /// </summary>
const ushort DIUIdentifier = 0x4449; const ushort DIUIdentifier = 0x4449;
#endregion Private constants #endregion Private constants
@@ -204,23 +204,23 @@ namespace DiscImageChef.Decoders.Bluray
public struct DiscInformation public struct DiscInformation
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Always 4098 /// Always 4098
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Byte 4 to 4099 /// Byte 4 to 4099
/// Disc information units /// Disc information units
/// </summary> /// </summary>
public DiscInformationUnits[] Units; public DiscInformationUnits[] Units;
} }
@@ -228,73 +228,73 @@ namespace DiscImageChef.Decoders.Bluray
public struct DiscInformationUnits public struct DiscInformationUnits
{ {
/// <summary> /// <summary>
/// Byte 0 /// Byte 0
/// "DI" /// "DI"
/// </summary> /// </summary>
public ushort Signature; public ushort Signature;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Disc information format /// Disc information format
/// </summary> /// </summary>
public byte Format; public byte Format;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Number of DI units per block /// Number of DI units per block
/// </summary> /// </summary>
public byte UnitsPerBlock; public byte UnitsPerBlock;
/// <summary> /// <summary>
/// Byte 4 /// Byte 4
/// Reserved for BD-ROM, legacy information for BD-R/-RE /// Reserved for BD-ROM, legacy information for BD-R/-RE
/// </summary> /// </summary>
public byte Legacy; public byte Legacy;
/// <summary> /// <summary>
/// Byte 5 /// Byte 5
/// Sequence number for this DI unit /// Sequence number for this DI unit
/// </summary> /// </summary>
public byte Sequence; public byte Sequence;
/// <summary> /// <summary>
/// Byte 6 /// Byte 6
/// Number of bytes used by this DI unit, should be 64 for BD-ROM and 112 for BD-R/-RE /// Number of bytes used by this DI unit, should be 64 for BD-ROM and 112 for BD-R/-RE
/// </summary> /// </summary>
public byte Length; public byte Length;
/// <summary> /// <summary>
/// Byte 7 /// Byte 7
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved; public byte Reserved;
/// <summary> /// <summary>
/// Bytes 8 to 10 /// Bytes 8 to 10
/// Disc type identifier /// Disc type identifier
/// </summary> /// </summary>
public byte[] DiscTypeIdentifier; public byte[] DiscTypeIdentifier;
/// <summary> /// <summary>
/// Byte 11 /// Byte 11
/// Disc size/class/version /// Disc size/class/version
/// </summary> /// </summary>
public byte DiscSizeClassVersion; public byte DiscSizeClassVersion;
/// <summary> /// <summary>
/// Bytes 12 to 63 for BD-ROM, bytes 12 to 99 for BD-R/-RE /// Bytes 12 to 63 for BD-ROM, bytes 12 to 99 for BD-R/-RE
/// Format dependent contents, disclosed in private blu-ray specifications /// Format dependent contents, disclosed in private blu-ray specifications
/// </summary> /// </summary>
public byte[] FormatDependentContents; public byte[] FormatDependentContents;
/// <summary> /// <summary>
/// Bytes 100 to 105, BD-R/-RE only /// Bytes 100 to 105, BD-R/-RE only
/// Manufacturer ID /// Manufacturer ID
/// </summary> /// </summary>
public byte[] ManufacturerID; public byte[] ManufacturerID;
/// <summary> /// <summary>
/// Bytes 106 to 108, BD-R/-RE only /// Bytes 106 to 108, BD-R/-RE only
/// Media type ID /// Media type ID
/// </summary> /// </summary>
public byte[] MediaTypeID; public byte[] MediaTypeID;
/// <summary> /// <summary>
/// Bytes 109 to 110, BD-R/-RE only /// Bytes 109 to 110, BD-R/-RE only
/// Timestamp /// Timestamp
/// </summary> /// </summary>
public ushort TimeStamp; public ushort TimeStamp;
/// <summary> /// <summary>
/// Byte 111 /// Byte 111
/// Product revision number /// Product revision number
/// </summary> /// </summary>
public byte ProductRevisionNumber; public byte ProductRevisionNumber;
} }

View File

@@ -38,19 +38,19 @@ using DiscImageChef.Console;
namespace DiscImageChef.Decoders.Bluray namespace DiscImageChef.Decoders.Bluray
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -114,33 +114,33 @@ namespace DiscImageChef.Decoders.Bluray
public struct SpareAreaInformation public struct SpareAreaInformation
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Always 14 /// Always 14
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Bytes 4 to 7 /// Bytes 4 to 7
/// Reserved /// Reserved
/// </summary> /// </summary>
public uint Reserved3; public uint Reserved3;
/// <summary> /// <summary>
/// Bytes 8 to 11 /// Bytes 8 to 11
/// Free spare blocks /// Free spare blocks
/// </summary> /// </summary>
public uint FreeSpareBlocks; public uint FreeSpareBlocks;
/// <summary> /// <summary>
/// Bytes 12 to 15 /// Bytes 12 to 15
/// Allocated spare blocks /// Allocated spare blocks
/// </summary> /// </summary>
public uint AllocatedSpareBlocks; public uint AllocatedSpareBlocks;
} }

View File

@@ -38,19 +38,19 @@ using DiscImageChef.Console;
namespace DiscImageChef.Decoders.CD namespace DiscImageChef.Decoders.CD
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -61,163 +61,163 @@ namespace DiscImageChef.Decoders.CD
public struct CDATIP public struct CDATIP
{ {
/// <summary> /// <summary>
/// Bytes 1 to 0 /// Bytes 1 to 0
/// Total size of returned session information minus this field /// Total size of returned session information minus this field
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Byte 4, bits 7 to 4 /// Byte 4, bits 7 to 4
/// Indicative target writing power /// Indicative target writing power
/// </summary> /// </summary>
public byte ITWP; public byte ITWP;
/// <summary> /// <summary>
/// Byte 4, bit 3 /// Byte 4, bit 3
/// Set if DDCD /// Set if DDCD
/// </summary> /// </summary>
public bool DDCD; public bool DDCD;
/// <summary> /// <summary>
/// Byte 4, bits 2 to 0 /// Byte 4, bits 2 to 0
/// Reference speed /// Reference speed
/// </summary> /// </summary>
public byte ReferenceSpeed; public byte ReferenceSpeed;
/// <summary> /// <summary>
/// Byte 5, bit 7 /// Byte 5, bit 7
/// Always unset /// Always unset
/// </summary> /// </summary>
public bool AlwaysZero; public bool AlwaysZero;
/// <summary> /// <summary>
/// Byte 5, bit 6 /// Byte 5, bit 6
/// Unrestricted media /// Unrestricted media
/// </summary> /// </summary>
public bool URU; public bool URU;
/// <summary> /// <summary>
/// Byte 5, bits 5 to 0 /// Byte 5, bits 5 to 0
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved3; public byte Reserved3;
/// <summary> /// <summary>
/// Byte 6, bit 7 /// Byte 6, bit 7
/// Always set /// Always set
/// </summary> /// </summary>
public bool AlwaysOne; public bool AlwaysOne;
/// <summary> /// <summary>
/// Byte 6, bit 6 /// Byte 6, bit 6
/// Set if rewritable (CD-RW or DDCD-RW) /// Set if rewritable (CD-RW or DDCD-RW)
/// </summary> /// </summary>
public bool DiscType; public bool DiscType;
/// <summary> /// <summary>
/// Byte 6, bits 5 to 3 /// Byte 6, bits 5 to 3
/// Disc subtype /// Disc subtype
/// </summary> /// </summary>
public byte DiscSubType; public byte DiscSubType;
/// <summary> /// <summary>
/// Byte 6, bit 2 /// Byte 6, bit 2
/// A1 values are valid /// A1 values are valid
/// </summary> /// </summary>
public bool A1Valid; public bool A1Valid;
/// <summary> /// <summary>
/// Byte 6, bit 1 /// Byte 6, bit 1
/// A2 values are valid /// A2 values are valid
/// </summary> /// </summary>
public bool A2Valid; public bool A2Valid;
/// <summary> /// <summary>
/// Byte 6, bit 0 /// Byte 6, bit 0
/// A3 values are valid /// A3 values are valid
/// </summary> /// </summary>
public bool A3Valid; public bool A3Valid;
/// <summary> /// <summary>
/// Byte 7 /// Byte 7
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved4; public byte Reserved4;
/// <summary> /// <summary>
/// Byte 8 /// Byte 8
/// ATIP Start time of Lead-In (Minute) /// ATIP Start time of Lead-In (Minute)
/// </summary> /// </summary>
public byte LeadInStartMin; public byte LeadInStartMin;
/// <summary> /// <summary>
/// Byte 9 /// Byte 9
/// ATIP Start time of Lead-In (Second) /// ATIP Start time of Lead-In (Second)
/// </summary> /// </summary>
public byte LeadInStartSec; public byte LeadInStartSec;
/// <summary> /// <summary>
/// Byte 10 /// Byte 10
/// ATIP Start time of Lead-In (Frame) /// ATIP Start time of Lead-In (Frame)
/// </summary> /// </summary>
public byte LeadInStartFrame; public byte LeadInStartFrame;
/// <summary> /// <summary>
/// Byte 11 /// Byte 11
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved5; public byte Reserved5;
/// <summary> /// <summary>
/// Byte 12 /// Byte 12
/// ATIP Last possible start time of Lead-Out (Minute) /// ATIP Last possible start time of Lead-Out (Minute)
/// </summary> /// </summary>
public byte LeadOutStartMin; public byte LeadOutStartMin;
/// <summary> /// <summary>
/// Byte 13 /// Byte 13
/// ATIP Last possible start time of Lead-Out (Second) /// ATIP Last possible start time of Lead-Out (Second)
/// </summary> /// </summary>
public byte LeadOutStartSec; public byte LeadOutStartSec;
/// <summary> /// <summary>
/// Byte 14 /// Byte 14
/// ATIP Last possible start time of Lead-Out (Frame) /// ATIP Last possible start time of Lead-Out (Frame)
/// </summary> /// </summary>
public byte LeadOutStartFrame; public byte LeadOutStartFrame;
/// <summary> /// <summary>
/// Byte 15 /// Byte 15
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved6; public byte Reserved6;
/// <summary> /// <summary>
/// Bytes 16 to 18 /// Bytes 16 to 18
/// A1 values /// A1 values
/// </summary> /// </summary>
public byte[] A1Values; public byte[] A1Values;
/// <summary> /// <summary>
/// Byte 19 /// Byte 19
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved7; public byte Reserved7;
/// <summary> /// <summary>
/// Bytes 20 to 22 /// Bytes 20 to 22
/// A2 values /// A2 values
/// </summary> /// </summary>
public byte[] A2Values; public byte[] A2Values;
/// <summary> /// <summary>
/// Byte 23 /// Byte 23
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved8; public byte Reserved8;
/// <summary> /// <summary>
/// Bytes 24 to 26 /// Bytes 24 to 26
/// A3 values /// A3 values
/// </summary> /// </summary>
public byte[] A3Values; public byte[] A3Values;
/// <summary> /// <summary>
/// Byte 27 /// Byte 27
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved9; public byte Reserved9;
/// <summary> /// <summary>
/// Bytes 28 to 30 /// Bytes 28 to 30
/// S4 values /// S4 values
/// </summary> /// </summary>
public byte[] S4Values; public byte[] S4Values;
/// <summary> /// <summary>
/// Byte 31 /// Byte 31
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved10; public byte Reserved10;
} }
@@ -434,11 +434,9 @@ namespace DiscImageChef.Decoders.CD
if(response.DiscType) sb.AppendLine("Disc uses phase change"); if(response.DiscType) sb.AppendLine("Disc uses phase change");
else else
{
sb.AppendLine(type < 5 sb.AppendLine(type < 5
? "Disc uses long strategy type dye (Cyanine, AZO, etc...)" ? "Disc uses long strategy type dye (Cyanine, AZO, etc...)"
: "Disc uses short strategy type dye (Phthalocyanine, etc...)"); : "Disc uses short strategy type dye (Phthalocyanine, etc...)");
}
string manufacturer = ManufacturerFromATIP(response.LeadInStartSec, frm); string manufacturer = ManufacturerFromATIP(response.LeadInStartSec, frm);
@@ -458,7 +456,8 @@ namespace DiscImageChef.Decoders.CD
switch(sec) switch(sec)
{ {
case 15: case 15:
switch(frm) { switch(frm)
{
case 00: return "TDK Corporation"; case 00: return "TDK Corporation";
case 10: return "Ritek Co."; case 10: return "Ritek Co.";
case 20: return "Mitsubishi Chemical Corporation"; case 20: return "Mitsubishi Chemical Corporation";
@@ -467,7 +466,8 @@ namespace DiscImageChef.Decoders.CD
break; break;
case 16: case 16:
switch(frm) { switch(frm)
{
case 20: return "Shenzen SG&Gast Digital Optical Discs"; case 20: return "Shenzen SG&Gast Digital Optical Discs";
case 30: return "Grand Advance Technology Ltd."; case 30: return "Grand Advance Technology Ltd.";
} }
@@ -478,7 +478,8 @@ namespace DiscImageChef.Decoders.CD
break; break;
case 18: case 18:
switch(frm) { switch(frm)
{
case 10: return "Wealth Fair Investment Ltd."; case 10: return "Wealth Fair Investment Ltd.";
case 60: return "Taroko International Co. Ltd."; case 60: return "Taroko International Co. Ltd.";
} }
@@ -489,7 +490,8 @@ namespace DiscImageChef.Decoders.CD
break; break;
case 21: case 21:
switch(frm) { switch(frm)
{
case 10: return "Grupo Condor S.L."; case 10: return "Grupo Condor S.L.";
case 30: return "Bestdisc Technology Corporation"; case 30: return "Bestdisc Technology Corporation";
case 40: return "Optical Disc Manufacturing Equipment"; case 40: return "Optical Disc Manufacturing Equipment";
@@ -498,7 +500,8 @@ namespace DiscImageChef.Decoders.CD
break; break;
case 22: case 22:
switch(frm) { switch(frm)
{
case 00: return "Woongjin Media Corp."; case 00: return "Woongjin Media Corp.";
case 10: return "Seantram Technology Inc."; case 10: return "Seantram Technology Inc.";
case 20: return "Advanced Digital Media"; case 20: return "Advanced Digital Media";
@@ -510,7 +513,8 @@ namespace DiscImageChef.Decoders.CD
break; break;
case 23: case 23:
switch(frm) { switch(frm)
{
case 00: return "Matsushita Electric Industrial Co., Ltd."; case 00: return "Matsushita Electric Industrial Co., Ltd.";
case 10: return "Doremi Media Co., Ltd."; case 10: return "Doremi Media Co., Ltd.";
case 20: return "Nacar Media s.r.l."; case 20: return "Nacar Media s.r.l.";
@@ -522,7 +526,8 @@ namespace DiscImageChef.Decoders.CD
break; break;
case 24: case 24:
switch(frm) { switch(frm)
{
case 00: return "Taiyo Yuden Company Ltd."; case 00: return "Taiyo Yuden Company Ltd.";
case 10: return "SONY Corporation"; case 10: return "SONY Corporation";
case 20: return "Computer Support Italy s.r.l."; case 20: return "Computer Support Italy s.r.l.";
@@ -534,7 +539,8 @@ namespace DiscImageChef.Decoders.CD
break; break;
case 25: case 25:
switch(frm) { switch(frm)
{
case 00: return "MPO"; case 00: return "MPO";
case 20: return "Hitachi Maxell, Ltd."; case 20: return "Hitachi Maxell, Ltd.";
case 30: return "Infodisc Technology Co. Ltd."; case 30: return "Infodisc Technology Co. Ltd.";
@@ -545,7 +551,8 @@ namespace DiscImageChef.Decoders.CD
break; break;
case 26: case 26:
switch(frm) { switch(frm)
{
case 00: return "Fornet International Pte Ltd."; case 00: return "Fornet International Pte Ltd.";
case 10: return "POSTECH Corporation"; case 10: return "POSTECH Corporation";
case 20: return "SKC Co., Ltd."; case 20: return "SKC Co., Ltd.";
@@ -557,7 +564,8 @@ namespace DiscImageChef.Decoders.CD
break; break;
case 27: case 27:
switch(frm) { switch(frm)
{
case 00: return "Digital Storage Technology Co., Ltd."; case 00: return "Digital Storage Technology Co., Ltd.";
case 10: return "Plasmon Data systems Ltd."; case 10: return "Plasmon Data systems Ltd.";
case 20: return "Princo Corporation"; case 20: return "Princo Corporation";
@@ -569,7 +577,8 @@ namespace DiscImageChef.Decoders.CD
break; break;
case 28: case 28:
switch(frm) { switch(frm)
{
case 00: return "Opti.Me.S. S.p.A."; case 00: return "Opti.Me.S. S.p.A.";
case 10: return "Gigastore Corporation"; case 10: return "Gigastore Corporation";
case 20: return "Multi Media Masters & Machinary SA"; case 20: return "Multi Media Masters & Machinary SA";
@@ -581,7 +590,8 @@ namespace DiscImageChef.Decoders.CD
break; break;
case 29: case 29:
switch(frm) { switch(frm)
{
case 00: return "Taeil Media Co., Ltd."; case 00: return "Taeil Media Co., Ltd.";
case 10: return "Vanguard Disc Inc."; case 10: return "Vanguard Disc Inc.";
case 20: return "Unidisc Technology Co., Ltd."; case 20: return "Unidisc Technology Co., Ltd.";
@@ -596,14 +606,16 @@ namespace DiscImageChef.Decoders.CD
break; break;
case 31: case 31:
switch(frm) { switch(frm)
{
case 00: return "Ritek Co."; case 00: return "Ritek Co.";
case 30: return "Grand Advance Technology Ltd."; case 30: return "Grand Advance Technology Ltd.";
} }
break; break;
case 32: case 32:
switch(frm) { switch(frm)
{
case 00: return "TDK Corporation"; case 00: return "TDK Corporation";
case 10: return "Prodisc Technology Inc."; case 10: return "Prodisc Technology Inc.";
} }
@@ -618,7 +630,8 @@ namespace DiscImageChef.Decoders.CD
break; break;
case 45: case 45:
switch(frm) { switch(frm)
{
case 00: return "Fornet International Pte Ltd."; case 00: return "Fornet International Pte Ltd.";
case 10: return "Unitech Japan Inc."; case 10: return "Unitech Japan Inc.";
case 20: return "Acer Media Technology, Inc."; case 20: return "Acer Media Technology, Inc.";
@@ -629,7 +642,8 @@ namespace DiscImageChef.Decoders.CD
break; break;
case 46: case 46:
switch(frm) { switch(frm)
{
case 00: return "Taiyo Yuden Company Ltd."; case 00: return "Taiyo Yuden Company Ltd.";
case 10: return "Hong Kong Digital Technology Co., Ltd."; case 10: return "Hong Kong Digital Technology Co., Ltd.";
case 20: return "Multi Media Masters & Machinary SA"; case 20: return "Multi Media Masters & Machinary SA";
@@ -641,7 +655,8 @@ namespace DiscImageChef.Decoders.CD
break; break;
case 47: case 47:
switch(frm) { switch(frm)
{
case 10: return "Hitachi Maxell, Ltd."; case 10: return "Hitachi Maxell, Ltd.";
case 20: return "Princo Corporation"; case 20: return "Princo Corporation";
case 40: return "POSTECH Corporation"; case 40: return "POSTECH Corporation";
@@ -651,7 +666,8 @@ namespace DiscImageChef.Decoders.CD
break; break;
case 48: case 48:
switch(frm) { switch(frm)
{
case 00: return "Ricoh Company Ltd."; case 00: return "Ricoh Company Ltd.";
case 10: return "Kodak Japan Ltd."; case 10: return "Kodak Japan Ltd.";
case 20: return "Plasmon Data systems Ltd."; case 20: return "Plasmon Data systems Ltd.";
@@ -663,7 +679,8 @@ namespace DiscImageChef.Decoders.CD
break; break;
case 49: case 49:
switch(frm) { switch(frm)
{
case 00: return "TDK Corporation"; case 00: return "TDK Corporation";
case 10: return "Gigastore Corporation"; case 10: return "Gigastore Corporation";
case 20: return "King Pro Mediatek Inc."; case 20: return "King Pro Mediatek Inc.";
@@ -674,7 +691,8 @@ namespace DiscImageChef.Decoders.CD
break; break;
case 50: case 50:
switch(frm) { switch(frm)
{
case 10: return "Vanguard Disc Inc."; case 10: return "Vanguard Disc Inc.";
case 20: return "Mitsubishi Chemical Corporation"; case 20: return "Mitsubishi Chemical Corporation";
case 30: return "CDA Datenträger Albrechts GmbH"; case 30: return "CDA Datenträger Albrechts GmbH";
@@ -682,7 +700,8 @@ namespace DiscImageChef.Decoders.CD
break; break;
case 51: case 51:
switch(frm) { switch(frm)
{
case 10: return "Grand Advance Technology Ltd."; case 10: return "Grand Advance Technology Ltd.";
case 20: return "Infodisc Technology Co. Ltd."; case 20: return "Infodisc Technology Co. Ltd.";
case 50: return "Hile Optical Disc Technology Corp."; case 50: return "Hile Optical Disc Technology Corp.";

View File

@@ -38,19 +38,19 @@ using DiscImageChef.Console;
namespace DiscImageChef.Decoders.CD namespace DiscImageChef.Decoders.CD
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -61,67 +61,67 @@ namespace DiscImageChef.Decoders.CD
public enum PackTypeIndicator : byte public enum PackTypeIndicator : byte
{ {
/// <summary> /// <summary>
/// Title of the track (or album if track == 0) /// Title of the track (or album if track == 0)
/// </summary> /// </summary>
Title = 0x80, Title = 0x80,
/// <summary> /// <summary>
/// Performer /// Performer
/// </summary> /// </summary>
Performer = 0x81, Performer = 0x81,
/// <summary> /// <summary>
/// Songwriter /// Songwriter
/// </summary> /// </summary>
Songwriter = 0x82, Songwriter = 0x82,
/// <summary> /// <summary>
/// Composer /// Composer
/// </summary> /// </summary>
Composer = 0x83, Composer = 0x83,
/// <summary> /// <summary>
/// Arranger /// Arranger
/// </summary> /// </summary>
Arranger = 0x84, Arranger = 0x84,
/// <summary> /// <summary>
/// Message from the content provider or artist /// Message from the content provider or artist
/// </summary> /// </summary>
Message = 0x85, Message = 0x85,
/// <summary> /// <summary>
/// Disc identification information /// Disc identification information
/// </summary> /// </summary>
DiscIdentification = 0x86, DiscIdentification = 0x86,
/// <summary> /// <summary>
/// Genre identification /// Genre identification
/// </summary> /// </summary>
GenreIdentification = 0x87, GenreIdentification = 0x87,
/// <summary> /// <summary>
/// Table of content information /// Table of content information
/// </summary> /// </summary>
TOCInformation = 0x88, TOCInformation = 0x88,
/// <summary> /// <summary>
/// Second table of content information /// Second table of content information
/// </summary> /// </summary>
SecondTOCInformation = 0x89, SecondTOCInformation = 0x89,
/// <summary> /// <summary>
/// Reserved /// Reserved
/// </summary> /// </summary>
Reserved1 = 0x8A, Reserved1 = 0x8A,
/// <summary> /// <summary>
/// Reserved /// Reserved
/// </summary> /// </summary>
Reserved2 = 0x8B, Reserved2 = 0x8B,
/// <summary> /// <summary>
/// Reserved /// Reserved
/// </summary> /// </summary>
Reserved3 = 0x8C, Reserved3 = 0x8C,
/// <summary> /// <summary>
/// Reserved for content provider only /// Reserved for content provider only
/// </summary> /// </summary>
ReservedForContentProvider = 0x8D, ReservedForContentProvider = 0x8D,
/// <summary> /// <summary>
/// UPC of album or ISRC of track /// UPC of album or ISRC of track
/// </summary> /// </summary>
UPCorISRC = 0x8E, UPCorISRC = 0x8E,
/// <summary> /// <summary>
/// Size information of the block /// Size information of the block
/// </summary> /// </summary>
BlockSizeInformation = 0x8F BlockSizeInformation = 0x8F
} }
@@ -129,19 +129,19 @@ namespace DiscImageChef.Decoders.CD
public struct CDText public struct CDText
{ {
/// <summary> /// <summary>
/// Total size of returned CD-Text information minus this field /// Total size of returned CD-Text information minus this field
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// CD-Text data packs /// CD-Text data packs
/// </summary> /// </summary>
public CDTextPack[] DataPacks; public CDTextPack[] DataPacks;
} }
@@ -149,43 +149,43 @@ namespace DiscImageChef.Decoders.CD
public struct CDTextPack public struct CDTextPack
{ {
/// <summary> /// <summary>
/// Byte 0 /// Byte 0
/// Pack ID1 (Pack Type) /// Pack ID1 (Pack Type)
/// </summary> /// </summary>
public byte HeaderID1; public byte HeaderID1;
/// <summary> /// <summary>
/// Byte 1 /// Byte 1
/// Pack ID2 (Track number) /// Pack ID2 (Track number)
/// </summary> /// </summary>
public byte HeaderID2; public byte HeaderID2;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Pack ID3 /// Pack ID3
/// </summary> /// </summary>
public byte HeaderID3; public byte HeaderID3;
/// <summary> /// <summary>
/// Byte 3, bit 7 /// Byte 3, bit 7
/// Double Byte Character Code /// Double Byte Character Code
/// </summary> /// </summary>
public bool DBCC; public bool DBCC;
/// <summary> /// <summary>
/// Byte 3, bits 6 to 4 /// Byte 3, bits 6 to 4
/// Block number /// Block number
/// </summary> /// </summary>
public byte BlockNumber; public byte BlockNumber;
/// <summary> /// <summary>
/// Byte 3, bits 3 to 0 /// Byte 3, bits 3 to 0
/// Character position /// Character position
/// </summary> /// </summary>
public byte CharacterPosition; public byte CharacterPosition;
/// <summary> /// <summary>
/// Bytes 4 to 15 /// Bytes 4 to 15
/// Text data /// Text data
/// </summary> /// </summary>
public byte[] TextDataField; public byte[] TextDataField;
/// <summary> /// <summary>
/// Bytes 16 to 17 /// Bytes 16 to 17
/// CRC16 /// CRC16
/// </summary> /// </summary>
public ushort CRC; public ushort CRC;
} }

View File

@@ -38,27 +38,27 @@ namespace DiscImageChef.Decoders.CD
public enum TocAdr : byte public enum TocAdr : byte
{ {
/// <summary> /// <summary>
/// Q Sub-channel mode information not supplied /// Q Sub-channel mode information not supplied
/// </summary> /// </summary>
NoInformation = 0x00, NoInformation = 0x00,
/// <summary> /// <summary>
/// Q Sub-channel encodes current position data /// Q Sub-channel encodes current position data
/// </summary> /// </summary>
CurrentPosition = 0x01, CurrentPosition = 0x01,
/// <summary> /// <summary>
/// Q Sub-channel encodes the media catalog number /// Q Sub-channel encodes the media catalog number
/// </summary> /// </summary>
MediaCatalogNumber = 0x02, MediaCatalogNumber = 0x02,
/// <summary> /// <summary>
/// Q Sub-channel encodes the ISRC /// Q Sub-channel encodes the ISRC
/// </summary> /// </summary>
ISRC = 0x03, ISRC = 0x03,
/// <summary> /// <summary>
/// Q Sub-channel encodes the start of an audio/data track (if found in TOC) /// Q Sub-channel encodes the start of an audio/data track (if found in TOC)
/// </summary> /// </summary>
TrackPointer = 0x01, TrackPointer = 0x01,
/// <summary> /// <summary>
/// Q Sub-channel encodes the start of a video track (if found in TOC) for CD-V /// Q Sub-channel encodes the start of a video track (if found in TOC) for CD-V
/// </summary> /// </summary>
VideoTrackPointer = 0x04 VideoTrackPointer = 0x04
} }
@@ -66,35 +66,35 @@ namespace DiscImageChef.Decoders.CD
public enum TocControl : byte public enum TocControl : byte
{ {
/// <summary> /// <summary>
/// Stereo audio, no pre-emphasis /// Stereo audio, no pre-emphasis
/// </summary> /// </summary>
TwoChanNoPreEmph = 0x00, TwoChanNoPreEmph = 0x00,
/// <summary> /// <summary>
/// Stereo audio with pre-emphasis /// Stereo audio with pre-emphasis
/// </summary> /// </summary>
TwoChanPreEmph = 0x01, TwoChanPreEmph = 0x01,
/// <summary> /// <summary>
/// If mask applied, track can be copied /// If mask applied, track can be copied
/// </summary> /// </summary>
CopyPermissionMask = 0x02, CopyPermissionMask = 0x02,
/// <summary> /// <summary>
/// Data track, recorded uninterrumpted /// Data track, recorded uninterrumpted
/// </summary> /// </summary>
DataTrack = 0x04, DataTrack = 0x04,
/// <summary> /// <summary>
/// Data track, recorded incrementally /// Data track, recorded incrementally
/// </summary> /// </summary>
DataTrackIncremental = 0x05, DataTrackIncremental = 0x05,
/// <summary> /// <summary>
/// Quadraphonic audio, no pre-emphasis /// Quadraphonic audio, no pre-emphasis
/// </summary> /// </summary>
FourChanNoPreEmph = 0x08, FourChanNoPreEmph = 0x08,
/// <summary> /// <summary>
/// Quadraphonic audio with pre-emphasis /// Quadraphonic audio with pre-emphasis
/// </summary> /// </summary>
FourChanPreEmph = 0x09, FourChanPreEmph = 0x09,
/// <summary> /// <summary>
/// Reserved mask /// Reserved mask
/// </summary> /// </summary>
ReservedMask = 0x0C ReservedMask = 0x0C
} }

View File

@@ -38,21 +38,21 @@ using DiscImageChef.Console;
namespace DiscImageChef.Decoders.CD namespace DiscImageChef.Decoders.CD
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// ISO/IEC 61104: Compact disc video system - 12 cm CD-V /// ISO/IEC 61104: Compact disc video system - 12 cm CD-V
/// ISO/IEC 60908: Audio recording - Compact disc digital audio system /// ISO/IEC 60908: Audio recording - Compact disc digital audio system
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -69,19 +69,19 @@ namespace DiscImageChef.Decoders.CD
public struct CDFullTOC public struct CDFullTOC
{ {
/// <summary> /// <summary>
/// Total size of returned session information minus this field /// Total size of returned session information minus this field
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// First complete session number in hex /// First complete session number in hex
/// </summary> /// </summary>
public byte FirstCompleteSession; public byte FirstCompleteSession;
/// <summary> /// <summary>
/// Last complete session number in hex /// Last complete session number in hex
/// </summary> /// </summary>
public byte LastCompleteSession; public byte LastCompleteSession;
/// <summary> /// <summary>
/// Track descriptors /// Track descriptors
/// </summary> /// </summary>
public TrackDataDescriptor[] TrackDescriptors; public TrackDataDescriptor[] TrackDescriptors;
} }
@@ -89,62 +89,62 @@ namespace DiscImageChef.Decoders.CD
public struct TrackDataDescriptor public struct TrackDataDescriptor
{ {
/// <summary> /// <summary>
/// Byte 0 /// Byte 0
/// Session number in hex /// Session number in hex
/// </summary> /// </summary>
public byte SessionNumber; public byte SessionNumber;
/// <summary> /// <summary>
/// Byte 1, bits 7 to 4 /// Byte 1, bits 7 to 4
/// Type of information in Q subchannel of block where this TOC entry was found /// Type of information in Q subchannel of block where this TOC entry was found
/// </summary> /// </summary>
public byte ADR; public byte ADR;
/// <summary> /// <summary>
/// Byte 1, bits 3 to 0 /// Byte 1, bits 3 to 0
/// Track attributes /// Track attributes
/// </summary> /// </summary>
public byte CONTROL; public byte CONTROL;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// </summary> /// </summary>
public byte TNO; public byte TNO;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// </summary> /// </summary>
public byte POINT; public byte POINT;
/// <summary> /// <summary>
/// Byte 4 /// Byte 4
/// </summary> /// </summary>
public byte Min; public byte Min;
/// <summary> /// <summary>
/// Byte 5 /// Byte 5
/// </summary> /// </summary>
public byte Sec; public byte Sec;
/// <summary> /// <summary>
/// Byte 6 /// Byte 6
/// </summary> /// </summary>
public byte Frame; public byte Frame;
/// <summary> /// <summary>
/// Byte 7, CD only /// Byte 7, CD only
/// </summary> /// </summary>
public byte Zero; public byte Zero;
/// <summary> /// <summary>
/// Byte 7, bits 7 to 4, DDCD only /// Byte 7, bits 7 to 4, DDCD only
/// </summary> /// </summary>
public byte HOUR; public byte HOUR;
/// <summary> /// <summary>
/// Byte 7, bits 3 to 0, DDCD only /// Byte 7, bits 3 to 0, DDCD only
/// </summary> /// </summary>
public byte PHOUR; public byte PHOUR;
/// <summary> /// <summary>
/// Byte 8 /// Byte 8
/// </summary> /// </summary>
public byte PMIN; public byte PMIN;
/// <summary> /// <summary>
/// Byte 9 /// Byte 9
/// </summary> /// </summary>
public byte PSEC; public byte PSEC;
/// <summary> /// <summary>
/// Byte 10 /// Byte 10
/// </summary> /// </summary>
public byte PFRAME; public byte PFRAME;
} }

View File

@@ -38,19 +38,19 @@ using DiscImageChef.Console;
namespace DiscImageChef.Decoders.CD namespace DiscImageChef.Decoders.CD
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -60,19 +60,19 @@ namespace DiscImageChef.Decoders.CD
public struct CDPMA public struct CDPMA
{ {
/// <summary> /// <summary>
/// Total size of returned session information minus this field /// Total size of returned session information minus this field
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Track descriptors /// Track descriptors
/// </summary> /// </summary>
public CDPMADescriptors[] PMADescriptors; public CDPMADescriptors[] PMADescriptors;
} }
@@ -80,58 +80,58 @@ namespace DiscImageChef.Decoders.CD
public struct CDPMADescriptors public struct CDPMADescriptors
{ {
/// <summary> /// <summary>
/// Byte 0 /// Byte 0
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved; public byte Reserved;
/// <summary> /// <summary>
/// Byte 1, bits 7 to 4 /// Byte 1, bits 7 to 4
/// Type of information in Q subchannel of block where this TOC entry was found /// Type of information in Q subchannel of block where this TOC entry was found
/// </summary> /// </summary>
public byte ADR; public byte ADR;
/// <summary> /// <summary>
/// Byte 1, bits 3 to 0 /// Byte 1, bits 3 to 0
/// Track attributes /// Track attributes
/// </summary> /// </summary>
public byte CONTROL; public byte CONTROL;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// </summary> /// </summary>
public byte TNO; public byte TNO;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// </summary> /// </summary>
public byte POINT; public byte POINT;
/// <summary> /// <summary>
/// Byte 4 /// Byte 4
/// </summary> /// </summary>
public byte Min; public byte Min;
/// <summary> /// <summary>
/// Byte 5 /// Byte 5
/// </summary> /// </summary>
public byte Sec; public byte Sec;
/// <summary> /// <summary>
/// Byte 6 /// Byte 6
/// </summary> /// </summary>
public byte Frame; public byte Frame;
/// <summary> /// <summary>
/// Byte 7, bits 7 to 4 /// Byte 7, bits 7 to 4
/// </summary> /// </summary>
public byte HOUR; public byte HOUR;
/// <summary> /// <summary>
/// Byte 7, bits 3 to 0 /// Byte 7, bits 3 to 0
/// </summary> /// </summary>
public byte PHOUR; public byte PHOUR;
/// <summary> /// <summary>
/// Byte 8 /// Byte 8
/// </summary> /// </summary>
public byte PMIN; public byte PMIN;
/// <summary> /// <summary>
/// Byte 9 /// Byte 9
/// </summary> /// </summary>
public byte PSEC; public byte PSEC;
/// <summary> /// <summary>
/// Byte 10 /// Byte 10
/// </summary> /// </summary>
public byte PFRAME; public byte PFRAME;
} }

View File

@@ -38,19 +38,19 @@ using DiscImageChef.Console;
namespace DiscImageChef.Decoders.CD namespace DiscImageChef.Decoders.CD
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -60,19 +60,19 @@ namespace DiscImageChef.Decoders.CD
public struct CDSessionInfo public struct CDSessionInfo
{ {
/// <summary> /// <summary>
/// Total size of returned session information minus this field /// Total size of returned session information minus this field
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// First track number in hex /// First track number in hex
/// </summary> /// </summary>
public byte FirstCompleteSession; public byte FirstCompleteSession;
/// <summary> /// <summary>
/// Last track number in hex /// Last track number in hex
/// </summary> /// </summary>
public byte LastCompleteSession; public byte LastCompleteSession;
/// <summary> /// <summary>
/// Track descriptors /// Track descriptors
/// </summary> /// </summary>
public TrackDataDescriptor[] TrackDescriptors; public TrackDataDescriptor[] TrackDescriptors;
} }
@@ -80,33 +80,33 @@ namespace DiscImageChef.Decoders.CD
public struct TrackDataDescriptor public struct TrackDataDescriptor
{ {
/// <summary> /// <summary>
/// Byte 0 /// Byte 0
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 1, bits 7 to 4 /// Byte 1, bits 7 to 4
/// Type of information in Q subchannel of block where this TOC entry was found /// Type of information in Q subchannel of block where this TOC entry was found
/// </summary> /// </summary>
public byte ADR; public byte ADR;
/// <summary> /// <summary>
/// Byte 1, bits 3 to 0 /// Byte 1, bits 3 to 0
/// Track attributes /// Track attributes
/// </summary> /// </summary>
public byte CONTROL; public byte CONTROL;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// First track number in last complete session /// First track number in last complete session
/// </summary> /// </summary>
public byte TrackNumber; public byte TrackNumber;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Bytes 4 to 7 /// Bytes 4 to 7
/// First track number in last complete session start address in LBA or in MSF /// First track number in last complete session start address in LBA or in MSF
/// </summary> /// </summary>
public uint TrackStartAddress; public uint TrackStartAddress;
} }

View File

@@ -38,21 +38,21 @@ using DiscImageChef.Console;
namespace DiscImageChef.Decoders.CD namespace DiscImageChef.Decoders.CD
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// ISO/IEC 61104: Compact disc video system - 12 cm CD-V /// ISO/IEC 61104: Compact disc video system - 12 cm CD-V
/// ISO/IEC 60908: Audio recording - Compact disc digital audio system /// ISO/IEC 60908: Audio recording - Compact disc digital audio system
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -62,19 +62,19 @@ namespace DiscImageChef.Decoders.CD
public struct CDTOC public struct CDTOC
{ {
/// <summary> /// <summary>
/// Total size of returned TOC minus this field /// Total size of returned TOC minus this field
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// First track number in hex /// First track number in hex
/// </summary> /// </summary>
public byte FirstTrack; public byte FirstTrack;
/// <summary> /// <summary>
/// Last track number in hex /// Last track number in hex
/// </summary> /// </summary>
public byte LastTrack; public byte LastTrack;
/// <summary> /// <summary>
/// Track descriptors /// Track descriptors
/// </summary> /// </summary>
public CDTOCTrackDataDescriptor[] TrackDescriptors; public CDTOCTrackDataDescriptor[] TrackDescriptors;
} }
@@ -82,33 +82,33 @@ namespace DiscImageChef.Decoders.CD
public struct CDTOCTrackDataDescriptor public struct CDTOCTrackDataDescriptor
{ {
/// <summary> /// <summary>
/// Byte 0 /// Byte 0
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 1, bits 7 to 4 /// Byte 1, bits 7 to 4
/// Type of information in Q subchannel of block where this TOC entry was found /// Type of information in Q subchannel of block where this TOC entry was found
/// </summary> /// </summary>
public byte ADR; public byte ADR;
/// <summary> /// <summary>
/// Byte 1, bits 3 to 0 /// Byte 1, bits 3 to 0
/// Track attributes /// Track attributes
/// </summary> /// </summary>
public byte CONTROL; public byte CONTROL;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Track number /// Track number
/// </summary> /// </summary>
public byte TrackNumber; public byte TrackNumber;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Bytes 4 to 7 /// Bytes 4 to 7
/// The track start address in LBA or in MSF /// The track start address in LBA or in MSF
/// </summary> /// </summary>
public uint TrackStartAddress; public uint TrackStartAddress;
} }

View File

@@ -35,20 +35,20 @@ using System.Diagnostics.CodeAnalysis;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// ECMA 365 /// ECMA 365
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -58,23 +58,23 @@ namespace DiscImageChef.Decoders.DVD
public struct HDLeadInCopyright public struct HDLeadInCopyright
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Bytes 4 to 2052 /// Bytes 4 to 2052
/// HD DVD Lead-In Copyright Information /// HD DVD Lead-In Copyright Information
/// </summary> /// </summary>
public byte[] CopyrightInformation; public byte[] CopyrightInformation;
} }

View File

@@ -35,20 +35,20 @@ using System.Diagnostics.CodeAnalysis;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// ECMA 365 /// ECMA 365
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -58,23 +58,23 @@ namespace DiscImageChef.Decoders.DVD
public struct ADIPInformation public struct ADIPInformation
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Bytes 4 to 259 /// Bytes 4 to 259
/// ADIP, defined in DVD standards /// ADIP, defined in DVD standards
/// </summary> /// </summary>
public byte[] ADIP; public byte[] ADIP;
} }

View File

@@ -35,20 +35,20 @@ using System.Diagnostics.CodeAnalysis;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// ECMA 365 /// ECMA 365
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -58,23 +58,23 @@ namespace DiscImageChef.Decoders.DVD
public struct BurstCuttingArea public struct BurstCuttingArea
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Bytes 4 to end /// Bytes 4 to end
/// Burst cutting area contents, 12 to 188 bytes /// Burst cutting area contents, 12 to 188 bytes
/// </summary> /// </summary>
public byte[] BCA; public byte[] BCA;
} }

View File

@@ -35,20 +35,20 @@ using System.Diagnostics.CodeAnalysis;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// ECMA 365 /// ECMA 365
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -58,23 +58,23 @@ namespace DiscImageChef.Decoders.DVD
public struct DiscMediaIdentifier public struct DiscMediaIdentifier
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Bytes 4 to end /// Bytes 4 to end
/// Disc Media Identifier for CPRM /// Disc Media Identifier for CPRM
/// </summary> /// </summary>
public byte[] MediaIdentifier; public byte[] MediaIdentifier;
} }
@@ -82,23 +82,23 @@ namespace DiscImageChef.Decoders.DVD
public struct DiscMediaKeyBlock public struct DiscMediaKeyBlock
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Bytes 4 to end /// Bytes 4 to end
/// Disc Media Key Block for CPRM /// Disc Media Key Block for CPRM
/// </summary> /// </summary>
public byte[] MediaKeyBlock; public byte[] MediaKeyBlock;
} }

View File

@@ -36,20 +36,20 @@ using System.Text;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// ECMA 365 /// ECMA 365
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -60,38 +60,38 @@ namespace DiscImageChef.Decoders.DVD
public struct LeadInCopyright public struct LeadInCopyright
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Byte 4 /// Byte 4
/// Copy protection system type /// Copy protection system type
/// </summary> /// </summary>
public CopyrightType CopyrightType; public CopyrightType CopyrightType;
/// <summary> /// <summary>
/// Byte 5 /// Byte 5
/// Bitmask of regions where this disc is playable /// Bitmask of regions where this disc is playable
/// </summary> /// </summary>
public byte RegionInformation; public byte RegionInformation;
/// <summary> /// <summary>
/// Byte 6 /// Byte 6
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved3; public byte Reserved3;
/// <summary> /// <summary>
/// Byte 7 /// Byte 7
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved4; public byte Reserved4;
} }
@@ -99,23 +99,23 @@ namespace DiscImageChef.Decoders.DVD
public struct DiscKey public struct DiscKey
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Bytes 4 to 2052 /// Bytes 4 to 2052
/// Disc key for CSS, Album Identifier for CPPM /// Disc key for CSS, Album Identifier for CPPM
/// </summary> /// </summary>
public byte[] Key; public byte[] Key;
} }

View File

@@ -36,19 +36,19 @@ using System.Text;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -59,68 +59,68 @@ namespace DiscImageChef.Decoders.DVD
public struct MediumStatus public struct MediumStatus
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Byte 4, bit 7 /// Byte 4, bit 7
/// Medium is in a cartridge /// Medium is in a cartridge
/// </summary> /// </summary>
public bool Cartridge; public bool Cartridge;
/// <summary> /// <summary>
/// Byte 4, bit 6 /// Byte 4, bit 6
/// Medium has been taken out/inserted in a cartridge /// Medium has been taken out/inserted in a cartridge
/// </summary> /// </summary>
public bool OUT; public bool OUT;
/// <summary> /// <summary>
/// Byte 4, bits 5 to 4 /// Byte 4, bits 5 to 4
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved3; public byte Reserved3;
/// <summary> /// <summary>
/// Byte 4, bit 3 /// Byte 4, bit 3
/// Media is write protected by reason stablished in RAMSWI /// Media is write protected by reason stablished in RAMSWI
/// </summary> /// </summary>
public bool MSWI; public bool MSWI;
/// <summary> /// <summary>
/// Byte 4, bit 2 /// Byte 4, bit 2
/// Media is write protected by cartridge /// Media is write protected by cartridge
/// </summary> /// </summary>
public bool CWP; public bool CWP;
/// <summary> /// <summary>
/// Byte 4, bit 1 /// Byte 4, bit 1
/// Media is persistently write protected /// Media is persistently write protected
/// </summary> /// </summary>
public bool PWP; public bool PWP;
/// <summary> /// <summary>
/// Byte 4, bit 0 /// Byte 4, bit 0
/// Reserved /// Reserved
/// </summary> /// </summary>
public bool Reserved4; public bool Reserved4;
/// <summary> /// <summary>
/// Byte 5 /// Byte 5
/// Writable status depending on cartridge /// Writable status depending on cartridge
/// </summary> /// </summary>
public byte DiscType; public byte DiscType;
/// <summary> /// <summary>
/// Byte 6 /// Byte 6
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved5; public byte Reserved5;
/// <summary> /// <summary>
/// Byte 7 /// Byte 7
/// Reason of specific write protection, only defined 0x01 as "bare disc wp", and 0xFF as unspecified. Rest reserved. /// Reason of specific write protection, only defined 0x01 as "bare disc wp", and 0xFF as unspecified. Rest reserved.
/// </summary> /// </summary>
public byte RAMSWI; public byte RAMSWI;
} }
@@ -188,8 +188,7 @@ namespace DiscImageChef.Decoders.DVD
sb.AppendLine("Disc is write inhibited for an unspecified reason"); sb.AppendLine("Disc is write inhibited for an unspecified reason");
break; break;
default: default:
sb.AppendFormat("Disc has unknown reason {0} for write inhibition", decoded.RAMSWI) sb.AppendFormat("Disc has unknown reason {0} for write inhibition", decoded.RAMSWI).AppendLine();
.AppendLine();
break; break;
} }

View File

@@ -37,21 +37,21 @@ using System.Text;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// ECMA 272: 120 mm DVD Rewritable Disk (DVD-RAM) /// ECMA 272: 120 mm DVD Rewritable Disk (DVD-RAM)
/// ECMA 330: 120 mm (4,7 Gbytes per side) and 80 mm (1,46 Gbytes per side) DVD Rewritable Disk (DVD-RAM) /// ECMA 330: 120 mm (4,7 Gbytes per side) and 80 mm (1,46 Gbytes per side) DVD Rewritable Disk (DVD-RAM)
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -62,110 +62,110 @@ namespace DiscImageChef.Decoders.DVD
public struct DiscDefinitionStructure public struct DiscDefinitionStructure
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Bytes 4 to 5 /// Bytes 4 to 5
/// DDS Identifier = 0x0A0A /// DDS Identifier = 0x0A0A
/// </summary> /// </summary>
public ushort Identifier; public ushort Identifier;
/// <summary> /// <summary>
/// Byte 6 /// Byte 6
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved3; public byte Reserved3;
/// <summary> /// <summary>
/// Byte 7, bit 7 /// Byte 7, bit 7
/// If set, formatting is in process /// If set, formatting is in process
/// </summary> /// </summary>
public bool InProcess; public bool InProcess;
/// <summary> /// <summary>
/// Byte 7, bit 6 /// Byte 7, bit 6
/// If set, formatting is using partial certification /// If set, formatting is using partial certification
/// Only in ECMA-272 /// Only in ECMA-272
/// </summary> /// </summary>
public bool PartialCertification; public bool PartialCertification;
/// <summary> /// <summary>
/// Byte 7, bit 5 /// Byte 7, bit 5
/// If set, only a group is being formatted /// If set, only a group is being formatted
/// Only in ECMA-272 /// Only in ECMA-272
/// </summary> /// </summary>
public bool FormattingOnlyAGroup; public bool FormattingOnlyAGroup;
/// <summary> /// <summary>
/// Byte 7, bits 4 to 2 /// Byte 7, bits 4 to 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved4; public byte Reserved4;
/// <summary> /// <summary>
/// Byte 7, bit 1 /// Byte 7, bit 1
/// If set, disk has been certified by a user /// If set, disk has been certified by a user
/// </summary> /// </summary>
public bool UserCertification; public bool UserCertification;
/// <summary> /// <summary>
/// Byte 7, bit 0 /// Byte 7, bit 0
/// If set, disk has been certified by a manufacturer /// If set, disk has been certified by a manufacturer
/// </summary> /// </summary>
public bool ManufacturerCertification; public bool ManufacturerCertification;
/// <summary> /// <summary>
/// Bytes 8 to 11 /// Bytes 8 to 11
/// How many times the DDS has been updated /// How many times the DDS has been updated
/// </summary> /// </summary>
public uint UpdateCount; public uint UpdateCount;
/// <summary> /// <summary>
/// Bytes 12 to 13 /// Bytes 12 to 13
/// How many groups the disk has /// How many groups the disk has
/// 24 for ECMA-272 /// 24 for ECMA-272
/// 1 for ECMA-330 /// 1 for ECMA-330
/// </summary> /// </summary>
public ushort Groups; public ushort Groups;
/// <summary> /// <summary>
/// Bytes 14 to 15 /// Bytes 14 to 15
/// How many zones the disk has /// How many zones the disk has
/// Only in ECMA-330 /// Only in ECMA-330
/// </summary> /// </summary>
public ushort Zones; public ushort Zones;
/// <summary> /// <summary>
/// Bytes 14 to 19 in ECMA-272 /// Bytes 14 to 19 in ECMA-272
/// Bytes 16 to 83 in ECMA-330 /// Bytes 16 to 83 in ECMA-330
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte[] Reserved; public byte[] Reserved;
/// <summary> /// <summary>
/// Bytes 20 to 43 /// Bytes 20 to 43
/// Group certification flags /// Group certification flags
/// </summary> /// </summary>
public GroupCertificationFlag[] GroupCertificationFlags; public GroupCertificationFlag[] GroupCertificationFlags;
/// <summary> /// <summary>
/// Bytes 85 to 87 /// Bytes 85 to 87
/// Location of first sector in the Primary Spare Area /// Location of first sector in the Primary Spare Area
/// </summary> /// </summary>
public uint SpareAreaFirstPSN; public uint SpareAreaFirstPSN;
/// <summary> /// <summary>
/// Bytes 89 to 91 /// Bytes 89 to 91
/// Location of first sector in the Primary Spare Area /// Location of first sector in the Primary Spare Area
/// </summary> /// </summary>
public uint SpareAreaLastPSN; public uint SpareAreaLastPSN;
/// <summary> /// <summary>
/// Bytes 93 to 95 /// Bytes 93 to 95
/// PSN for LSN 0 /// PSN for LSN 0
/// </summary> /// </summary>
public uint LSN0Location; public uint LSN0Location;
/// <summary> /// <summary>
/// The starting LSN of each zone /// The starting LSN of each zone
/// </summary> /// </summary>
public uint[] StartLSNForZone; public uint[] StartLSNForZone;
} }
@@ -173,28 +173,28 @@ namespace DiscImageChef.Decoders.DVD
public struct GroupCertificationFlag public struct GroupCertificationFlag
{ {
/// <summary> /// <summary>
/// Bit 7 /// Bit 7
/// If set, formatting of this group is in process /// If set, formatting of this group is in process
/// </summary> /// </summary>
public bool InProcess; public bool InProcess;
/// <summary> /// <summary>
/// Bit 6 /// Bit 6
/// If set, formatting is using partial certification /// If set, formatting is using partial certification
/// </summary> /// </summary>
public bool PartialCertification; public bool PartialCertification;
/// <summary> /// <summary>
/// Bits 5 to 2 /// Bits 5 to 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Bit 1 /// Bit 1
/// If set, this group has been certified by user /// If set, this group has been certified by user
/// </summary> /// </summary>
public bool UserCertification; public bool UserCertification;
/// <summary> /// <summary>
/// Bit 0 /// Bit 0
/// Reserved /// Reserved
/// </summary> /// </summary>
public bool Reserved2; public bool Reserved2;
} }

View File

@@ -35,20 +35,20 @@ using System.Diagnostics.CodeAnalysis;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// ECMA 365 /// ECMA 365
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -58,23 +58,23 @@ namespace DiscImageChef.Decoders.DVD
public struct DiscManufacturingInformation public struct DiscManufacturingInformation
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Bytes 4 to 2052 /// Bytes 4 to 2052
/// Disc Manufacturing Information /// Disc Manufacturing Information
/// </summary> /// </summary>
public byte[] DMI; public byte[] DMI;
} }

View File

@@ -39,60 +39,60 @@ namespace DiscImageChef.Decoders.DVD
public enum DiskCategory : byte public enum DiskCategory : byte
{ {
/// <summary> /// <summary>
/// DVD-ROM. Version 1 is ECMA-267 and ECMA-268. /// DVD-ROM. Version 1 is ECMA-267 and ECMA-268.
/// </summary> /// </summary>
DVDROM = 0, DVDROM = 0,
/// <summary> /// <summary>
/// DVD-RAM. Version 1 is ECMA-272. Version 6 is ECMA-330. /// DVD-RAM. Version 1 is ECMA-272. Version 6 is ECMA-330.
/// </summary> /// </summary>
DVDRAM = 1, DVDRAM = 1,
/// <summary> /// <summary>
/// DVD-R. Version 1 is ECMA-279. Version 5 is ECMA-359. Version 6 is ECMA-382. /// DVD-R. Version 1 is ECMA-279. Version 5 is ECMA-359. Version 6 is ECMA-382.
/// </summary> /// </summary>
DVDR = 2, DVDR = 2,
/// <summary> /// <summary>
/// DVD-RW. Version 2 is ECMA-338. Version 3 is ECMA-384. /// DVD-RW. Version 2 is ECMA-338. Version 3 is ECMA-384.
/// </summary> /// </summary>
DVDRW = 3, DVDRW = 3,
/// <summary> /// <summary>
/// HD DVD-ROM /// HD DVD-ROM
/// </summary> /// </summary>
HDDVDROM = 4, HDDVDROM = 4,
/// <summary> /// <summary>
/// HD DVD-RAM /// HD DVD-RAM
/// </summary> /// </summary>
HDDVDRAM = 5, HDDVDRAM = 5,
/// <summary> /// <summary>
/// HD DVD-R /// HD DVD-R
/// </summary> /// </summary>
HDDVDR = 6, HDDVDR = 6,
/// <summary> /// <summary>
/// HD DVD-RW /// HD DVD-RW
/// </summary> /// </summary>
HDDVDRW = 7, HDDVDRW = 7,
/// <summary> /// <summary>
/// UMD. Version 0 is ECMA-365. /// UMD. Version 0 is ECMA-365.
/// </summary> /// </summary>
UMD = 8, UMD = 8,
/// <summary> /// <summary>
/// DVD+RW. Version 1 is ECMA-274. Version 2 is ECMA-337. Version 3 is ECMA-371. /// DVD+RW. Version 1 is ECMA-274. Version 2 is ECMA-337. Version 3 is ECMA-371.
/// </summary> /// </summary>
DVDPRW = 9, DVDPRW = 9,
/// <summary> /// <summary>
/// DVD+R. Version 1 is ECMA-349. /// DVD+R. Version 1 is ECMA-349.
/// </summary> /// </summary>
DVDPR = 10, DVDPR = 10,
/// <summary> /// <summary>
/// DVD+RW DL. Version 1 is ECMA-374. /// DVD+RW DL. Version 1 is ECMA-374.
/// </summary> /// </summary>
DVDPRWDL = 13, DVDPRWDL = 13,
/// <summary> /// <summary>
/// DVD+R DL. Version 1 is ECMA-364. /// DVD+R DL. Version 1 is ECMA-364.
/// </summary> /// </summary>
DVDPRDL = 14, DVDPRDL = 14,
/// <summary> /// <summary>
/// According to standards this value is reserved. /// According to standards this value is reserved.
/// It's used by Nintendo GODs and WODs. /// It's used by Nintendo GODs and WODs.
/// </summary> /// </summary>
Nintendo = 15 Nintendo = 15
} }
@@ -101,23 +101,23 @@ namespace DiscImageChef.Decoders.DVD
public enum MaximumRateField : byte public enum MaximumRateField : byte
{ {
/// <summary> /// <summary>
/// 2.52 Mbps /// 2.52 Mbps
/// </summary> /// </summary>
TwoMbps = 0x00, TwoMbps = 0x00,
/// <summary> /// <summary>
/// 5.04 Mbps /// 5.04 Mbps
/// </summary> /// </summary>
FiveMbps = 0x01, FiveMbps = 0x01,
/// <summary> /// <summary>
/// 10.08 Mbps /// 10.08 Mbps
/// </summary> /// </summary>
TenMbps = 0x02, TenMbps = 0x02,
/// <summary> /// <summary>
/// 20.16 Mbps /// 20.16 Mbps
/// </summary> /// </summary>
TwentyMbps = 0x03, TwentyMbps = 0x03,
/// <summary> /// <summary>
/// 30.24 Mbps /// 30.24 Mbps
/// </summary> /// </summary>
ThirtyMbps = 0x04, ThirtyMbps = 0x04,
Unspecified = 0x0F Unspecified = 0x0F
@@ -136,31 +136,31 @@ namespace DiscImageChef.Decoders.DVD
public enum LinearDensityField : byte public enum LinearDensityField : byte
{ {
/// <summary> /// <summary>
/// 0.267 μm/bit /// 0.267 μm/bit
/// </summary> /// </summary>
TwoSix = 0x00, TwoSix = 0x00,
/// <summary> /// <summary>
/// 0.293 μm/bit /// 0.293 μm/bit
/// </summary> /// </summary>
TwoNine = 0x01, TwoNine = 0x01,
/// <summary> /// <summary>
/// 0.409 to 0.435 μm/bit /// 0.409 to 0.435 μm/bit
/// </summary> /// </summary>
FourZero = 0x02, FourZero = 0x02,
/// <summary> /// <summary>
/// 0.280 to 0.291 μm/bit /// 0.280 to 0.291 μm/bit
/// </summary> /// </summary>
TwoEight = 0x04, TwoEight = 0x04,
/// <summary> /// <summary>
/// 0.153 μm/bit /// 0.153 μm/bit
/// </summary> /// </summary>
OneFive = 0x05, OneFive = 0x05,
/// <summary> /// <summary>
/// 0.130 to 0.140 μm/bit /// 0.130 to 0.140 μm/bit
/// </summary> /// </summary>
OneThree = 0x06, OneThree = 0x06,
/// <summary> /// <summary>
/// 0.353 μm/bit /// 0.353 μm/bit
/// </summary> /// </summary>
ThreeFive = 0x08 ThreeFive = 0x08
} }
@@ -169,23 +169,23 @@ namespace DiscImageChef.Decoders.DVD
public enum TrackDensityField : byte public enum TrackDensityField : byte
{ {
/// <summary> /// <summary>
/// 0.74 μm/track /// 0.74 μm/track
/// </summary> /// </summary>
Seven = 0x00, Seven = 0x00,
/// <summary> /// <summary>
/// 0.80 μm/track /// 0.80 μm/track
/// </summary> /// </summary>
Eight = 0x01, Eight = 0x01,
/// <summary> /// <summary>
/// 0.615 μm/track /// 0.615 μm/track
/// </summary> /// </summary>
Six = 0x02, Six = 0x02,
/// <summary> /// <summary>
/// 0.40 μm/track /// 0.40 μm/track
/// </summary> /// </summary>
Four = 0x03, Four = 0x03,
/// <summary> /// <summary>
/// 0.34 μm/track /// 0.34 μm/track
/// </summary> /// </summary>
Three = 0x04 Three = 0x04
} }
@@ -194,19 +194,19 @@ namespace DiscImageChef.Decoders.DVD
public enum CopyrightType : byte public enum CopyrightType : byte
{ {
/// <summary> /// <summary>
/// There is no copy protection /// There is no copy protection
/// </summary> /// </summary>
NoProtection = 0x00, NoProtection = 0x00,
/// <summary> /// <summary>
/// Copy protection is CSS/CPPM /// Copy protection is CSS/CPPM
/// </summary> /// </summary>
CSS = 0x01, CSS = 0x01,
/// <summary> /// <summary>
/// Copy protection is CPRM /// Copy protection is CPRM
/// </summary> /// </summary>
CPRM = 0x02, CPRM = 0x02,
/// <summary> /// <summary>
/// Copy protection is AACS /// Copy protection is AACS
/// </summary> /// </summary>
AACS = 0x10 AACS = 0x10
} }
@@ -215,11 +215,11 @@ namespace DiscImageChef.Decoders.DVD
public enum WPDiscTypes : byte public enum WPDiscTypes : byte
{ {
/// <summary> /// <summary>
/// Should not write without a cartridge /// Should not write without a cartridge
/// </summary> /// </summary>
DoNotWrite = 0x00, DoNotWrite = 0x00,
/// <summary> /// <summary>
/// Can write without a cartridge /// Can write without a cartridge
/// </summary> /// </summary>
CanWrite = 0x01, CanWrite = 0x01,
Reserved1 = 0x02, Reserved1 = 0x02,
@@ -230,11 +230,11 @@ namespace DiscImageChef.Decoders.DVD
public enum DVDSize public enum DVDSize
{ {
/// <summary> /// <summary>
/// 120 mm /// 120 mm
/// </summary> /// </summary>
OneTwenty = 0, OneTwenty = 0,
/// <summary> /// <summary>
/// 80 mm /// 80 mm
/// </summary> /// </summary>
Eighty = 1 Eighty = 1
} }
@@ -243,11 +243,11 @@ namespace DiscImageChef.Decoders.DVD
public enum DVDRAMDiscType public enum DVDRAMDiscType
{ {
/// <summary> /// <summary>
/// Shall not be recorded without a case /// Shall not be recorded without a case
/// </summary> /// </summary>
Cased = 0, Cased = 0,
/// <summary> /// <summary>
/// May be recorded without a case or within one /// May be recorded without a case or within one
/// </summary> /// </summary>
Uncased = 1 Uncased = 1
} }

View File

@@ -35,20 +35,20 @@ using System.Diagnostics.CodeAnalysis;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// ECMA 365 /// ECMA 365
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -58,48 +58,48 @@ namespace DiscImageChef.Decoders.DVD
public struct LayerCapacity public struct LayerCapacity
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Byte 4, bit 7 /// Byte 4, bit 7
/// If set, L0 capacity is immutable /// If set, L0 capacity is immutable
/// </summary> /// </summary>
public bool InitStatus; public bool InitStatus;
/// <summary> /// <summary>
/// Byte 4, bits 6 to 0 /// Byte 4, bits 6 to 0
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved3; public byte Reserved3;
/// <summary> /// <summary>
/// Byte 5 /// Byte 5
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved4; public byte Reserved4;
/// <summary> /// <summary>
/// Byte 6 /// Byte 6
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved5; public byte Reserved5;
/// <summary> /// <summary>
/// Byte 7 /// Byte 7
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved6; public byte Reserved6;
/// <summary> /// <summary>
/// Byte 8 to 11 /// Byte 8 to 11
/// L0 Data Area Capacity /// L0 Data Area Capacity
/// </summary> /// </summary>
public uint Capacity; public uint Capacity;
} }
@@ -107,48 +107,48 @@ namespace DiscImageChef.Decoders.DVD
public struct MiddleZoneStartAddress public struct MiddleZoneStartAddress
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length = 10 /// Data length = 10
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Byte 4, bit 7 /// Byte 4, bit 7
/// If set, L0 shifter middle area is immutable /// If set, L0 shifter middle area is immutable
/// </summary> /// </summary>
public bool InitStatus; public bool InitStatus;
/// <summary> /// <summary>
/// Byte 4, bits 6 to 0 /// Byte 4, bits 6 to 0
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved3; public byte Reserved3;
/// <summary> /// <summary>
/// Byte 5 /// Byte 5
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved4; public byte Reserved4;
/// <summary> /// <summary>
/// Byte 6 /// Byte 6
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved5; public byte Reserved5;
/// <summary> /// <summary>
/// Byte 7 /// Byte 7
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved6; public byte Reserved6;
/// <summary> /// <summary>
/// Byte 8 to 11 /// Byte 8 to 11
/// Start LBA of Shifted Middle Area on L0 /// Start LBA of Shifted Middle Area on L0
/// </summary> /// </summary>
public uint ShiftedMiddleAreaStartAddress; public uint ShiftedMiddleAreaStartAddress;
} }
@@ -156,43 +156,43 @@ namespace DiscImageChef.Decoders.DVD
public struct JumpIntervalSize public struct JumpIntervalSize
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length = 10 /// Data length = 10
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Byte 4 /// Byte 4
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved3; public byte Reserved3;
/// <summary> /// <summary>
/// Byte 5 /// Byte 5
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved4; public byte Reserved4;
/// <summary> /// <summary>
/// Byte 6 /// Byte 6
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved5; public byte Reserved5;
/// <summary> /// <summary>
/// Byte 7 /// Byte 7
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved6; public byte Reserved6;
/// <summary> /// <summary>
/// Byte 8 to 11 /// Byte 8 to 11
/// Jump Interval size for the Regular Interval Layer Jump /// Jump Interval size for the Regular Interval Layer Jump
/// </summary> /// </summary>
public uint Size; public uint Size;
} }
@@ -200,43 +200,43 @@ namespace DiscImageChef.Decoders.DVD
public struct ManualLayerJumpAddress public struct ManualLayerJumpAddress
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length = 10 /// Data length = 10
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Byte 4 /// Byte 4
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved3; public byte Reserved3;
/// <summary> /// <summary>
/// Byte 5 /// Byte 5
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved4; public byte Reserved4;
/// <summary> /// <summary>
/// Byte 6 /// Byte 6
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved5; public byte Reserved5;
/// <summary> /// <summary>
/// Byte 7 /// Byte 7
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved6; public byte Reserved6;
/// <summary> /// <summary>
/// Byte 8 to 11 /// Byte 8 to 11
/// LBA for the manual layer jump /// LBA for the manual layer jump
/// </summary> /// </summary>
public uint LBA; public uint LBA;
} }

File diff suppressed because it is too large Load Diff

View File

@@ -35,20 +35,20 @@ using System.Diagnostics.CodeAnalysis;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// ECMA 365 /// ECMA 365
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -58,23 +58,23 @@ namespace DiscImageChef.Decoders.DVD
public struct PreRecordedInformation public struct PreRecordedInformation
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Bytes 4 to end /// Bytes 4 to end
/// Pre-recorded Information in Lead-in for writable media /// Pre-recorded Information in Lead-in for writable media
/// </summary> /// </summary>
public byte[] PRI; public byte[] PRI;
} }

View File

@@ -35,20 +35,20 @@ using System.Diagnostics.CodeAnalysis;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// ECMA 365 /// ECMA 365
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -58,23 +58,23 @@ namespace DiscImageChef.Decoders.DVD
public struct LastBorderOutRMD public struct LastBorderOutRMD
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Bytes 4 to end /// Bytes 4 to end
/// RMD in last recorded Border-out /// RMD in last recorded Border-out
/// </summary> /// </summary>
public byte[] RMD; public byte[] RMD;
} }
@@ -82,38 +82,38 @@ namespace DiscImageChef.Decoders.DVD
public struct HDMediumStatus public struct HDMediumStatus
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Byte 4, bits 7 to 1 /// Byte 4, bits 7 to 1
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved3; public byte Reserved3;
/// <summary> /// <summary>
/// Byte 4, bit 0 /// Byte 4, bit 0
/// Test Zone has been extended /// Test Zone has been extended
/// </summary> /// </summary>
public bool ExtendedTestZone; public bool ExtendedTestZone;
/// <summary> /// <summary>
/// Byte 5 /// Byte 5
/// Number of remaining RMDs in RDZ /// Number of remaining RMDs in RDZ
/// </summary> /// </summary>
public byte RemainingRMDs; public byte RemainingRMDs;
/// <summary> /// <summary>
/// Bytes 6 to 7 /// Bytes 6 to 7
/// Number of remaining RMDs in current RMZ /// Number of remaining RMDs in current RMZ
/// </summary> /// </summary>
public ushort CurrentRemainingRMDs; public ushort CurrentRemainingRMDs;
} }

View File

@@ -36,19 +36,19 @@ using System.Text;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -59,33 +59,33 @@ namespace DiscImageChef.Decoders.DVD
public struct SpareAreaInformation public struct SpareAreaInformation
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Bytes 4 to 7 /// Bytes 4 to 7
/// Data length /// Data length
/// </summary> /// </summary>
public uint UnusedPrimaryBlocks; public uint UnusedPrimaryBlocks;
/// <summary> /// <summary>
/// Bytes 8 to 11 /// Bytes 8 to 11
/// Data length /// Data length
/// </summary> /// </summary>
public uint UnusedSupplementaryBlocks; public uint UnusedSupplementaryBlocks;
/// <summary> /// <summary>
/// Bytes 12 to 15 /// Bytes 12 to 15
/// Data length /// Data length
/// </summary> /// </summary>
public uint AllocatedSupplementaryBlocks; public uint AllocatedSupplementaryBlocks;
} }

View File

@@ -35,20 +35,20 @@ using System.Diagnostics.CodeAnalysis;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// ECMA 365 /// ECMA 365
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -58,63 +58,63 @@ namespace DiscImageChef.Decoders.DVD
public struct UniqueDiscIdentifier public struct UniqueDiscIdentifier
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Byte 4 /// Byte 4
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved3; public byte Reserved3;
/// <summary> /// <summary>
/// Byte 5 /// Byte 5
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved4; public byte Reserved4;
/// <summary> /// <summary>
/// Bytes 6 to 7 /// Bytes 6 to 7
/// Random number /// Random number
/// </summary> /// </summary>
public ushort RandomNumber; public ushort RandomNumber;
/// <summary> /// <summary>
/// Byte 8 to 11 /// Byte 8 to 11
/// Year /// Year
/// </summary> /// </summary>
public uint Year; public uint Year;
/// <summary> /// <summary>
/// Byte 12 to 13 /// Byte 12 to 13
/// Month /// Month
/// </summary> /// </summary>
public ushort Month; public ushort Month;
/// <summary> /// <summary>
/// Byte 14 to 15 /// Byte 14 to 15
/// Day /// Day
/// </summary> /// </summary>
public ushort Day; public ushort Day;
/// <summary> /// <summary>
/// Byte 16 to 17 /// Byte 16 to 17
/// Hour /// Hour
/// </summary> /// </summary>
public ushort Hour; public ushort Hour;
/// <summary> /// <summary>
/// Byte 18 to 19 /// Byte 18 to 19
/// Minute /// Minute
/// </summary> /// </summary>
public ushort Minute; public ushort Minute;
/// <summary> /// <summary>
/// Byte 20 to 21 /// Byte 20 to 21
/// Second /// Second
/// </summary> /// </summary>
public ushort Second; public ushort Second;
} }

View File

@@ -36,7 +36,7 @@ using System.Runtime.InteropServices;
namespace DiscImageChef.Decoders.Floppy namespace DiscImageChef.Decoders.Floppy
{ {
/// <summary> /// <summary>
/// Methods and structures for Commodore Amiga decoding /// Methods and structures for Commodore Amiga decoding
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -46,39 +46,39 @@ namespace DiscImageChef.Decoders.Floppy
public struct Sector public struct Sector
{ {
/// <summary> /// <summary>
/// Set to 0x00 /// Set to 0x00
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] zero; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] zero;
/// <summary> /// <summary>
/// Set to 0xA1 /// Set to 0xA1
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] sync; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] sync;
/// <summary> /// <summary>
/// Set to 0xFF /// Set to 0xFF
/// </summary> /// </summary>
public byte amiga; public byte amiga;
/// <summary> /// <summary>
/// Track number /// Track number
/// </summary> /// </summary>
public byte track; public byte track;
/// <summary> /// <summary>
/// Sector number /// Sector number
/// </summary> /// </summary>
public byte sector; public byte sector;
/// <summary> /// <summary>
/// Remaining sectors til end of writing /// Remaining sectors til end of writing
/// </summary> /// </summary>
public byte remaining; public byte remaining;
/// <summary> /// <summary>
/// OS dependent tag /// OS dependent tag
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] label; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] label;
/// <summary> /// <summary>
/// Checksum from <see cref="amiga"/> to <see cref="label"/> /// Checksum from <see cref="amiga" /> to <see cref="label" />
/// </summary> /// </summary>
public uint headerChecksum; public uint headerChecksum;
/// <summary> /// <summary>
/// Checksum from <see cref="data"/> /// Checksum from <see cref="data" />
/// </summary> /// </summary>
public uint dataChecksum; public uint dataChecksum;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)] public byte[] data; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)] public byte[] data;

View File

@@ -41,7 +41,7 @@ using DiscImageChef.Console;
namespace DiscImageChef.Decoders.Floppy namespace DiscImageChef.Decoders.Floppy
{ {
/// <summary> /// <summary>
/// Methods and structures for Apple ][ floppy decoding /// Methods and structures for Apple ][ floppy decoding
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -49,99 +49,99 @@ namespace DiscImageChef.Decoders.Floppy
public static class Apple2 public static class Apple2
{ {
/// <summary> /// <summary>
/// GCR-encoded Apple ][ GCR floppy track /// GCR-encoded Apple ][ GCR floppy track
/// </summary> /// </summary>
public class RawTrack public class RawTrack
{ {
/// <summary> /// <summary>
/// Track preamble, set to self-sync 0xFF, between 40 and 95 bytes /// Track preamble, set to self-sync 0xFF, between 40 and 95 bytes
/// </summary> /// </summary>
public byte[] gap; public byte[] gap;
public RawSector[] sectors; public RawSector[] sectors;
} }
/// <summary> /// <summary>
/// GCR-encoded Apple ][ GCR floppy sector /// GCR-encoded Apple ][ GCR floppy sector
/// </summary> /// </summary>
public class RawSector public class RawSector
{ {
/// <summary> /// <summary>
/// Address field /// Address field
/// </summary> /// </summary>
public RawAddressField addressField; public RawAddressField addressField;
/// <summary> /// <summary>
/// Track preamble, set to self-sync 0xFF, between 5 and 10 bytes /// Data field
/// </summary>
public byte[] innerGap;
/// <summary>
/// Data field
/// </summary> /// </summary>
public RawDataField dataField; public RawDataField dataField;
/// <summary> /// <summary>
/// Track preamble, set to self-sync 0xFF, between 14 and 24 bytes /// Track preamble, set to self-sync 0xFF, between 14 and 24 bytes
/// </summary> /// </summary>
public byte[] gap; public byte[] gap;
/// <summary>
/// Track preamble, set to self-sync 0xFF, between 5 and 10 bytes
/// </summary>
public byte[] innerGap;
} }
/// <summary> /// <summary>
/// GCR-encoded Apple ][ GCR floppy sector address field /// GCR-encoded Apple ][ GCR floppy sector address field
/// </summary> /// </summary>
public class RawAddressField public class RawAddressField
{ {
/// <summary> /// <summary>
/// Always 0xD5, 0xAA, 0x96 /// decodedChecksum = decodedVolume ^ decodedTrack ^ decodedSector
/// </summary> /// checksum[0] = (decodedChecksum >> 1) | 0xAA
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] prologue; /// checksum[1] = decodedChecksum | 0xAA
/// <summary>
/// Volume number encoded as:
/// volume[0] = (decodedVolume >> 1) | 0xAA
/// volume[1] = decodedVolume | 0xAA
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] volume;
/// <summary>
/// Track number encoded as:
/// track[0] = (decodedTrack >> 1) | 0xAA
/// track[1] = decodedTrack | 0xAA
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] track;
/// <summary>
/// Sector number encoded as:
/// sector[0] = (decodedSector >> 1) | 0xAA
/// sector[1] = decodedSector | 0xAA
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] sector;
/// <summary>
/// decodedChecksum = decodedVolume ^ decodedTrack ^ decodedSector
/// checksum[0] = (decodedChecksum >> 1) | 0xAA
/// checksum[1] = decodedChecksum | 0xAA
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] checksum; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] checksum;
/// <summary> /// <summary>
/// Always 0xDE, 0xAA, 0xEB /// Always 0xDE, 0xAA, 0xEB
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] epilogue; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] epilogue;
}
/// <summary>
/// GCR-encoded Apple ][ GCR floppy sector data field
/// </summary>
public class RawDataField
{
/// <summary> /// <summary>
/// Always 0xD5, 0xAA, 0xAD /// Always 0xD5, 0xAA, 0x96
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] prologue; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] prologue;
/// <summary> /// <summary>
/// Encoded data bytes. /// Sector number encoded as:
/// 410 bytes for 5to3 (aka DOS 3.2) format /// sector[0] = (decodedSector >> 1) | 0xAA
/// 342 bytes for 6to2 (aka DOS 3.3) format /// sector[1] = decodedSector | 0xAA
/// </summary> /// </summary>
public byte[] data; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] sector;
/// <summary>
/// Track number encoded as:
/// track[0] = (decodedTrack >> 1) | 0xAA
/// track[1] = decodedTrack | 0xAA
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] track;
/// <summary>
/// Volume number encoded as:
/// volume[0] = (decodedVolume >> 1) | 0xAA
/// volume[1] = decodedVolume | 0xAA
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] volume;
}
/// <summary>
/// GCR-encoded Apple ][ GCR floppy sector data field
/// </summary>
public class RawDataField
{
public byte checksum; public byte checksum;
/// <summary> /// <summary>
/// Always 0xDE, 0xAA, 0xEB /// Encoded data bytes.
/// 410 bytes for 5to3 (aka DOS 3.2) format
/// 342 bytes for 6to2 (aka DOS 3.3) format
/// </summary>
public byte[] data;
/// <summary>
/// Always 0xDE, 0xAA, 0xEB
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] epilogue; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] epilogue;
/// <summary>
/// Always 0xD5, 0xAA, 0xAD
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] prologue;
} }
static readonly byte[] ReadTable5and3 = static readonly byte[] ReadTable5and3 =
@@ -217,7 +217,7 @@ namespace DiscImageChef.Decoders.Floppy
}; };
/// <summary> /// <summary>
/// Decodes the 5and3 encoded data /// Decodes the 5and3 encoded data
/// </summary> /// </summary>
/// <param name="data">5and3 encoded data.</param> /// <param name="data">5and3 encoded data.</param>
public static byte[] Decode5and3(byte[] data) public static byte[] Decode5and3(byte[] data)
@@ -253,7 +253,7 @@ namespace DiscImageChef.Decoders.Floppy
} }
/// <summary> /// <summary>
/// Decodes the 6and2 encoded data /// Decodes the 6and2 encoded data
/// </summary> /// </summary>
/// <param name="data">6and2 encoded data.</param> /// <param name="data">6and2 encoded data.</param>
public static byte[] Decode6and2(byte[] data) public static byte[] Decode6and2(byte[] data)
@@ -549,8 +549,7 @@ namespace DiscImageChef.Decoders.Floppy
MemoryStream raw = new MemoryStream(); MemoryStream raw = new MemoryStream();
raw.Write(track.gap, 0, track.gap.Length); raw.Write(track.gap, 0, track.gap.Length);
foreach(byte[] rawSector in track.sectors.Select(MarshalSector)) foreach(byte[] rawSector in track.sectors.Select(MarshalSector)) raw.Write(rawSector, 0, rawSector.Length);
{ raw.Write(rawSector, 0, rawSector.Length); }
return raw.ToArray(); return raw.ToArray();
} }
@@ -589,7 +588,7 @@ namespace DiscImageChef.Decoders.Floppy
if(disk == null) return null; if(disk == null) return null;
MemoryStream raw = new MemoryStream(); MemoryStream raw = new MemoryStream();
foreach(byte[] rawTrack in disk.Select(MarshalTrack)) { raw.Write(rawTrack, 0, rawTrack.Length); } foreach(byte[] rawTrack in disk.Select(MarshalTrack)) raw.Write(rawTrack, 0, rawTrack.Length);
return raw.ToArray(); return raw.ToArray();
} }

View File

@@ -43,7 +43,7 @@ namespace DiscImageChef.Decoders.Floppy
// Inside Macintosh, Volume II, ISBN 0-201-17732-3 // Inside Macintosh, Volume II, ISBN 0-201-17732-3
/// <summary> /// <summary>
/// Methods and structures for Apple Sony GCR floppy decoding /// Methods and structures for Apple Sony GCR floppy decoding
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -52,100 +52,100 @@ namespace DiscImageChef.Decoders.Floppy
public static class AppleSony public static class AppleSony
{ {
/// <summary> /// <summary>
/// GCR-encoded Apple Sony GCR floppy track /// GCR-encoded Apple Sony GCR floppy track
/// </summary> /// </summary>
public class RawTrack public class RawTrack
{ {
/// <summary> /// <summary>
/// Track preamble, set to self-sync 0xFF, 36 bytes /// Track preamble, set to self-sync 0xFF, 36 bytes
/// </summary> /// </summary>
public byte[] gap; public byte[] gap;
public RawSector[] sectors; public RawSector[] sectors;
} }
/// <summary> /// <summary>
/// GCR-encoded Apple Sony GCR floppy sector /// GCR-encoded Apple Sony GCR floppy sector
/// </summary> /// </summary>
public class RawSector public class RawSector
{ {
/// <summary> /// <summary>
/// Address field /// Address field
/// </summary> /// </summary>
public RawAddressField addressField; public RawAddressField addressField;
/// <summary> /// <summary>
/// Track preamble, set to self-sync 0xFF, 6 bytes /// Data field
/// </summary>
public byte[] innerGap;
/// <summary>
/// Data field
/// </summary> /// </summary>
public RawDataField dataField; public RawDataField dataField;
/// <summary> /// <summary>
/// Track preamble, set to self-sync 0xFF, unknown size /// Track preamble, set to self-sync 0xFF, unknown size
/// </summary> /// </summary>
public byte[] gap; public byte[] gap;
/// <summary>
/// Track preamble, set to self-sync 0xFF, 6 bytes
/// </summary>
public byte[] innerGap;
} }
/// <summary> /// <summary>
/// GCR-encoded Apple Sony GCR floppy sector address field /// GCR-encoded Apple Sony GCR floppy sector address field
/// </summary> /// </summary>
public class RawAddressField public class RawAddressField
{ {
/// <summary> /// <summary>
/// Always 0xD5, 0xAA, 0x96 /// Checksum
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] prologue;
/// <summary>
/// Encoded (decodedTrack &amp; 0x3F)
/// </summary>
public byte track;
/// <summary>
/// Encoded sector number
/// </summary>
public byte sector;
/// <summary>
/// Encoded side number
/// </summary>
public byte side;
/// <summary>
/// Disk format
/// </summary>
public AppleEncodedFormat format;
/// <summary>
/// Checksum
/// </summary> /// </summary>
public byte checksum; public byte checksum;
/// <summary> /// <summary>
/// Always 0xDE, 0xAA /// Always 0xDE, 0xAA
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] epilogue; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] epilogue;
/// <summary>
/// Disk format
/// </summary>
public AppleEncodedFormat format;
/// <summary>
/// Always 0xD5, 0xAA, 0x96
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] prologue;
/// <summary>
/// Encoded sector number
/// </summary>
public byte sector;
/// <summary>
/// Encoded side number
/// </summary>
public byte side;
/// <summary>
/// Encoded (decodedTrack &amp; 0x3F)
/// </summary>
public byte track;
} }
/// <summary> /// <summary>
/// GCR-encoded Apple ][ GCR floppy sector data field /// GCR-encoded Apple ][ GCR floppy sector data field
/// </summary> /// </summary>
public class RawDataField public class RawDataField
{ {
/// <summary> /// <summary>
/// Always 0xD5, 0xAA, 0xAD /// Checksum
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] prologue;
/// <summary>
/// Spare, usually <see cref="RawAddressField.sector"/>
/// </summary>
public byte spare;
/// <summary>
/// Encoded data bytes.
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 698)] public byte[] data;
/// <summary>
/// Checksum
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] public byte[] checksum; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] public byte[] checksum;
/// <summary> /// <summary>
/// Always 0xDE, 0xAA /// Encoded data bytes.
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 698)] public byte[] data;
/// <summary>
/// Always 0xDE, 0xAA
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] epilogue; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] epilogue;
/// <summary>
/// Always 0xD5, 0xAA, 0xAD
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] prologue;
/// <summary>
/// Spare, usually <see cref="RawAddressField.sector" />
/// </summary>
public byte spare;
} }
public static byte[] DecodeSector(RawSector sector) public static byte[] DecodeSector(RawSector sector)
@@ -441,8 +441,7 @@ namespace DiscImageChef.Decoders.Floppy
MemoryStream raw = new MemoryStream(); MemoryStream raw = new MemoryStream();
raw.Write(track.gap, 0, track.gap.Length); raw.Write(track.gap, 0, track.gap.Length);
foreach(byte[] rawSector in track.sectors.Select(MarshalSector)) foreach(byte[] rawSector in track.sectors.Select(MarshalSector)) raw.Write(rawSector, 0, rawSector.Length);
{ raw.Write(rawSector, 0, rawSector.Length); }
return raw.ToArray(); return raw.ToArray();
} }
@@ -481,7 +480,7 @@ namespace DiscImageChef.Decoders.Floppy
if(disk == null) return null; if(disk == null) return null;
MemoryStream raw = new MemoryStream(); MemoryStream raw = new MemoryStream();
foreach(byte[] rawTrack in disk.Select(MarshalTrack)) { raw.Write(rawTrack, 0, rawTrack.Length); } foreach(byte[] rawTrack in disk.Select(MarshalTrack)) raw.Write(rawTrack, 0, rawTrack.Length);
return raw.ToArray(); return raw.ToArray();
} }

View File

@@ -36,7 +36,7 @@ using System.Runtime.InteropServices;
namespace DiscImageChef.Decoders.Floppy namespace DiscImageChef.Decoders.Floppy
{ {
/// <summary> /// <summary>
/// Methods and structures for Commodore GCR floppy decoding /// Methods and structures for Commodore GCR floppy decoding
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -44,55 +44,55 @@ namespace DiscImageChef.Decoders.Floppy
public static class Commodore public static class Commodore
{ {
/// <summary> /// <summary>
/// Decoded Commodore GCR sector header /// Decoded Commodore GCR sector header
/// </summary> /// </summary>
public struct SectorHeader public struct SectorHeader
{ {
/// <summary> /// <summary>
/// Always 0x08 /// Always 0x08
/// </summary> /// </summary>
public byte id; public byte id;
/// <summary> /// <summary>
/// XOR of following fields /// XOR of following fields
/// </summary> /// </summary>
public byte checksum; public byte checksum;
/// <summary> /// <summary>
/// Sector number /// Sector number
/// </summary> /// </summary>
public byte sector; public byte sector;
/// <summary> /// <summary>
/// Track number /// Track number
/// </summary> /// </summary>
public byte track; public byte track;
/// <summary> /// <summary>
/// Format ID, unknown meaning /// Format ID, unknown meaning
/// </summary> /// </summary>
public ushort format; public ushort format;
/// <summary> /// <summary>
/// Filled with 0x0F /// Filled with 0x0F
/// </summary> /// </summary>
public ushort fill; public ushort fill;
} }
/// <summary> /// <summary>
/// Decoded Commodore GCR sector data /// Decoded Commodore GCR sector data
/// </summary> /// </summary>
public struct SectorData public struct SectorData
{ {
/// <summary> /// <summary>
/// Always 0x07 /// Always 0x07
/// </summary> /// </summary>
public byte id; public byte id;
/// <summary> /// <summary>
/// User data /// User data
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] public byte data; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] public byte data;
/// <summary> /// <summary>
/// XOR of <see cref="data"/> /// XOR of <see cref="data" />
/// </summary> /// </summary>
public byte checksum; public byte checksum;
/// <summary> /// <summary>
/// Filled with 0x0F /// Filled with 0x0F
/// </summary> /// </summary>
public ushort fill; public ushort fill;
} }

View File

@@ -35,41 +35,41 @@ using System.Diagnostics.CodeAnalysis;
namespace DiscImageChef.Decoders.Floppy namespace DiscImageChef.Decoders.Floppy
{ {
/// <summary> /// <summary>
/// In-sector code for sector size /// In-sector code for sector size
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
public enum IBMSectorSizeCode : byte public enum IBMSectorSizeCode : byte
{ {
/// <summary> /// <summary>
/// 128 bytes/sector /// 128 bytes/sector
/// </summary> /// </summary>
EighthKilo = 0, EighthKilo = 0,
/// <summary> /// <summary>
/// 256 bytes/sector /// 256 bytes/sector
/// </summary> /// </summary>
QuarterKilo = 1, QuarterKilo = 1,
/// <summary> /// <summary>
/// 512 bytes/sector /// 512 bytes/sector
/// </summary> /// </summary>
HalfKilo = 2, HalfKilo = 2,
/// <summary> /// <summary>
/// 1024 bytes/sector /// 1024 bytes/sector
/// </summary> /// </summary>
Kilo = 3, Kilo = 3,
/// <summary> /// <summary>
/// 2048 bytes/sector /// 2048 bytes/sector
/// </summary> /// </summary>
TwiceKilo = 4, TwiceKilo = 4,
/// <summary> /// <summary>
/// 4096 bytes/sector /// 4096 bytes/sector
/// </summary> /// </summary>
FriceKilo = 5, FriceKilo = 5,
/// <summary> /// <summary>
/// 8192 bytes/sector /// 8192 bytes/sector
/// </summary> /// </summary>
TwiceFriceKilo = 6, TwiceFriceKilo = 6,
/// <summary> /// <summary>
/// 16384 bytes/sector /// 16384 bytes/sector
/// </summary> /// </summary>
FricelyFriceKilo = 7 FricelyFriceKilo = 7
} }
@@ -87,19 +87,19 @@ namespace DiscImageChef.Decoders.Floppy
public enum AppleEncodedFormat : byte public enum AppleEncodedFormat : byte
{ {
/// <summary> /// <summary>
/// Disk is an Apple II 3.5" disk /// Disk is an Apple II 3.5" disk
/// </summary> /// </summary>
AppleII = 0x96, AppleII = 0x96,
/// <summary> /// <summary>
/// Disk is an Apple Lisa 3.5" disk /// Disk is an Apple Lisa 3.5" disk
/// </summary> /// </summary>
Lisa = 0x97, Lisa = 0x97,
/// <summary> /// <summary>
/// Disk is an Apple Macintosh single-sided 3.5" disk /// Disk is an Apple Macintosh single-sided 3.5" disk
/// </summary> /// </summary>
MacSingleSide = 0x9A, MacSingleSide = 0x9A,
/// <summary> /// <summary>
/// Disk is an Apple Macintosh double-sided 3.5" disk /// Disk is an Apple Macintosh double-sided 3.5" disk
/// </summary> /// </summary>
MacDoubleSide = 0xD9 MacDoubleSide = 0xD9
} }

View File

@@ -46,7 +46,7 @@ namespace DiscImageChef.Decoders.Floppy
// ECMA-100 // ECMA-100
/// <summary> /// <summary>
/// Methods and structures for ISO floppy decoding (also used by Atari ST and others) /// Methods and structures for ISO floppy decoding (also used by Atari ST and others)
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -54,109 +54,109 @@ namespace DiscImageChef.Decoders.Floppy
public static class ISO public static class ISO
{ {
/// <summary> /// <summary>
/// ISO floppy track, also used by Atari ST and others /// ISO floppy track, also used by Atari ST and others
/// </summary> /// </summary>
public struct Track public struct Track
{ {
/// <summary> /// <summary>
/// Start of track, 32 bytes set to 0x4E /// Start of track, 32 bytes set to 0x4E
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] public byte[] innerGap; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] public byte[] innerGap;
/// <summary> /// <summary>
/// Track sectors /// Track sectors
/// </summary> /// </summary>
public Sector[] sectors; public Sector[] sectors;
/// <summary> /// <summary>
/// Undefined size /// Undefined size
/// </summary> /// </summary>
public byte[] gap; public byte[] gap;
} }
/// <summary> /// <summary>
/// Raw demodulated format for IBM System 34 floppies /// Raw demodulated format for IBM System 34 floppies
/// </summary> /// </summary>
public struct Sector public struct Sector
{ {
/// <summary> /// <summary>
/// Sector address mark /// Sector address mark
/// </summary> /// </summary>
public AddressMark addressMark; public AddressMark addressMark;
/// <summary> /// <summary>
/// 22 bytes set to 0x4E, set to 0x22 on Commodore 1581 /// 22 bytes set to 0x4E, set to 0x22 on Commodore 1581
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 22)] public byte[] innerGap; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 22)] public byte[] innerGap;
/// <summary> /// <summary>
/// Sector data block /// Sector data block
/// </summary> /// </summary>
public DataBlock dataBlock; public DataBlock dataBlock;
/// <summary> /// <summary>
/// Variable bytes set to 0x4E, ECMA defines 54 /// Variable bytes set to 0x4E, ECMA defines 54
/// </summary> /// </summary>
public byte[] outerGap; public byte[] outerGap;
} }
/// <summary> /// <summary>
/// Sector address mark for IBM System 34 floppies, contains sync word /// Sector address mark for IBM System 34 floppies, contains sync word
/// </summary> /// </summary>
public struct AddressMark public struct AddressMark
{ {
/// <summary> /// <summary>
/// 12 bytes set to 0 /// 12 bytes set to 0
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
/// <summary> /// <summary>
/// 3 bytes set to 0xA1 /// 3 bytes set to 0xA1
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
/// <summary> /// <summary>
/// Set to <see cref="IBMIdType.AddressMark"/> /// Set to <see cref="IBMIdType.AddressMark" />
/// </summary> /// </summary>
public IBMIdType type; public IBMIdType type;
/// <summary> /// <summary>
/// Track number /// Track number
/// </summary> /// </summary>
public byte track; public byte track;
/// <summary> /// <summary>
/// Side number /// Side number
/// </summary> /// </summary>
public byte side; public byte side;
/// <summary> /// <summary>
/// Sector number /// Sector number
/// </summary> /// </summary>
public byte sector; public byte sector;
/// <summary> /// <summary>
/// <see cref="IBMSectorSizeCode"/> /// <see cref="IBMSectorSizeCode" />
/// </summary> /// </summary>
public IBMSectorSizeCode sectorSize; public IBMSectorSizeCode sectorSize;
/// <summary> /// <summary>
/// CRC16 from <see cref="aone"/> to end of <see cref="sectorSize"/> /// CRC16 from <see cref="aone" /> to end of <see cref="sectorSize" />
/// </summary> /// </summary>
public ushort crc; public ushort crc;
} }
/// <summary> /// <summary>
/// Sector data block for IBM System 34 floppies /// Sector data block for IBM System 34 floppies
/// </summary> /// </summary>
public struct DataBlock public struct DataBlock
{ {
/// <summary> /// <summary>
/// 12 bytes set to 0 /// 12 bytes set to 0
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
/// <summary> /// <summary>
/// 3 bytes set to 0xA1 /// 3 bytes set to 0xA1
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
/// <summary> /// <summary>
/// Set to <see cref="IBMIdType.DataMark"/> or to <see cref="IBMIdType.DeletedDataMark"/> /// Set to <see cref="IBMIdType.DataMark" /> or to <see cref="IBMIdType.DeletedDataMark" />
/// </summary> /// </summary>
public IBMIdType type; public IBMIdType type;
/// <summary> /// <summary>
/// User data /// User data
/// </summary> /// </summary>
public byte[] data; public byte[] data;
/// <summary> /// <summary>
/// CRC16 from <see cref="aone"/> to end of <see cref="data"/> /// CRC16 from <see cref="aone" /> to end of <see cref="data" />
/// </summary> /// </summary>
public ushort crc; public ushort crc;
} }

View File

@@ -46,7 +46,7 @@ namespace DiscImageChef.Decoders.Floppy
// ECMA-100 // ECMA-100
/// <summary> /// <summary>
/// Methods and structures for perpendicular MFM floppy decoding /// Methods and structures for perpendicular MFM floppy decoding
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -54,137 +54,137 @@ namespace DiscImageChef.Decoders.Floppy
public static class Perpendicular public static class Perpendicular
{ {
/// <summary> /// <summary>
/// Perpendicular floppy track /// Perpendicular floppy track
/// </summary> /// </summary>
public struct Track public struct Track
{ {
/// <summary> /// <summary>
/// Start of track /// Start of track
/// </summary> /// </summary>
public TrackPreamble trackStart; public TrackPreamble trackStart;
/// <summary> /// <summary>
/// Track sectors /// Track sectors
/// </summary> /// </summary>
public Sector[] sectors; public Sector[] sectors;
/// <summary> /// <summary>
/// Undefined size /// Undefined size
/// </summary> /// </summary>
public byte[] gap; public byte[] gap;
} }
/// <summary> /// <summary>
/// Raw demodulated format for perpendicular floppies /// Raw demodulated format for perpendicular floppies
/// </summary> /// </summary>
public struct Sector public struct Sector
{ {
/// <summary> /// <summary>
/// Sector address mark /// Sector address mark
/// </summary> /// </summary>
public AddressMark addressMark; public AddressMark addressMark;
/// <summary> /// <summary>
/// 41 bytes set to 0x4E /// 41 bytes set to 0x4E
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 41)] public byte[] innerGap; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 41)] public byte[] innerGap;
/// <summary> /// <summary>
/// Sector data block /// Sector data block
/// </summary> /// </summary>
public DataBlock dataBlock; public DataBlock dataBlock;
/// <summary> /// <summary>
/// Variable-sized inter-sector gap, ECMA defines 83 bytes /// Variable-sized inter-sector gap, ECMA defines 83 bytes
/// </summary> /// </summary>
public byte[] outerGap; public byte[] outerGap;
} }
/// <summary> /// <summary>
/// Start of IBM PC MFM floppy track /// Start of IBM PC MFM floppy track
/// Used by IBM PC, Apple Macintosh (high-density only), and a lot others /// Used by IBM PC, Apple Macintosh (high-density only), and a lot others
/// </summary> /// </summary>
public struct TrackPreamble public struct TrackPreamble
{ {
/// <summary> /// <summary>
/// Gap from index pulse, 80 bytes set to 0x4E /// Gap from index pulse, 80 bytes set to 0x4E
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 80)] public byte[] gap; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 80)] public byte[] gap;
/// <summary> /// <summary>
/// 12 bytes set to 0x00 /// 12 bytes set to 0x00
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
/// <summary> /// <summary>
/// 3 bytes set to 0xC2 /// 3 bytes set to 0xC2
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] ctwo; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] ctwo;
/// <summary> /// <summary>
/// Set to <see cref="IBMIdType.IndexMark"/> /// Set to <see cref="IBMIdType.IndexMark" />
/// </summary> /// </summary>
public IBMIdType type; public IBMIdType type;
/// <summary> /// <summary>
/// Gap until first sector, 50 bytes to 0x4E /// Gap until first sector, 50 bytes to 0x4E
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] public byte[] gap1; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] public byte[] gap1;
} }
/// <summary> /// <summary>
/// Sector address mark for IBM System 34 floppies, contains sync word /// Sector address mark for IBM System 34 floppies, contains sync word
/// </summary> /// </summary>
public struct AddressMark public struct AddressMark
{ {
/// <summary> /// <summary>
/// 12 bytes set to 0 /// 12 bytes set to 0
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
/// <summary> /// <summary>
/// 3 bytes set to 0xA1 /// 3 bytes set to 0xA1
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
/// <summary> /// <summary>
/// Set to <see cref="IBMIdType.AddressMark"/> /// Set to <see cref="IBMIdType.AddressMark" />
/// </summary> /// </summary>
public IBMIdType type; public IBMIdType type;
/// <summary> /// <summary>
/// Track number /// Track number
/// </summary> /// </summary>
public byte track; public byte track;
/// <summary> /// <summary>
/// Side number /// Side number
/// </summary> /// </summary>
public byte side; public byte side;
/// <summary> /// <summary>
/// Sector number /// Sector number
/// </summary> /// </summary>
public byte sector; public byte sector;
/// <summary> /// <summary>
/// <see cref="IBMSectorSizeCode"/> /// <see cref="IBMSectorSizeCode" />
/// </summary> /// </summary>
public IBMSectorSizeCode sectorSize; public IBMSectorSizeCode sectorSize;
/// <summary> /// <summary>
/// CRC16 from <see cref="aone"/> to end of <see cref="sectorSize"/> /// CRC16 from <see cref="aone" /> to end of <see cref="sectorSize" />
/// </summary> /// </summary>
public ushort crc; public ushort crc;
} }
/// <summary> /// <summary>
/// Sector data block for IBM System 34 floppies /// Sector data block for IBM System 34 floppies
/// </summary> /// </summary>
public struct DataBlock public struct DataBlock
{ {
/// <summary> /// <summary>
/// 12 bytes set to 0 /// 12 bytes set to 0
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
/// <summary> /// <summary>
/// 3 bytes set to 0xA1 /// 3 bytes set to 0xA1
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
/// <summary> /// <summary>
/// Set to <see cref="IBMIdType.DataMark"/> or to <see cref="IBMIdType.DeletedDataMark"/> /// Set to <see cref="IBMIdType.DataMark" /> or to <see cref="IBMIdType.DeletedDataMark" />
/// </summary> /// </summary>
public IBMIdType type; public IBMIdType type;
/// <summary> /// <summary>
/// User data /// User data
/// </summary> /// </summary>
public byte[] data; public byte[] data;
/// <summary> /// <summary>
/// CRC16 from <see cref="aone"/> to end of <see cref="data"/> /// CRC16 from <see cref="aone" /> to end of <see cref="data" />
/// </summary> /// </summary>
public ushort crc; public ushort crc;
} }

View File

@@ -46,7 +46,7 @@ namespace DiscImageChef.Decoders.Floppy
// ECMA-100 // ECMA-100
/// <summary> /// <summary>
/// Methods and structures for IBM System 34 floppy decoding /// Methods and structures for IBM System 34 floppy decoding
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -54,138 +54,138 @@ namespace DiscImageChef.Decoders.Floppy
public static class System34 public static class System34
{ {
/// <summary> /// <summary>
/// Track format for IBM System 34 floppy /// Track format for IBM System 34 floppy
/// Used by IBM PC, Apple Macintosh (high-density only), and a lot others /// Used by IBM PC, Apple Macintosh (high-density only), and a lot others
/// </summary> /// </summary>
public struct Track public struct Track
{ {
/// <summary> /// <summary>
/// Start of track /// Start of track
/// </summary> /// </summary>
public TrackPreamble trackStart; public TrackPreamble trackStart;
/// <summary> /// <summary>
/// Track sectors /// Track sectors
/// </summary> /// </summary>
public Sector[] sectors; public Sector[] sectors;
/// <summary> /// <summary>
/// Undefined size /// Undefined size
/// </summary> /// </summary>
public byte[] gap; public byte[] gap;
} }
/// <summary> /// <summary>
/// Start of IBM PC MFM floppy track /// Start of IBM PC MFM floppy track
/// Used by IBM PC, Apple Macintosh (high-density only), and a lot others /// Used by IBM PC, Apple Macintosh (high-density only), and a lot others
/// </summary> /// </summary>
public struct TrackPreamble public struct TrackPreamble
{ {
/// <summary> /// <summary>
/// Gap from index pulse, 80 bytes set to 0x4E /// Gap from index pulse, 80 bytes set to 0x4E
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 80)] public byte[] gap; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 80)] public byte[] gap;
/// <summary> /// <summary>
/// 12 bytes set to 0x00 /// 12 bytes set to 0x00
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
/// <summary> /// <summary>
/// 3 bytes set to 0xC2 /// 3 bytes set to 0xC2
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] ctwo; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] ctwo;
/// <summary> /// <summary>
/// Set to <see cref="IBMIdType.IndexMark"/> /// Set to <see cref="IBMIdType.IndexMark" />
/// </summary> /// </summary>
public IBMIdType type; public IBMIdType type;
/// <summary> /// <summary>
/// Gap until first sector, 50 bytes to 0x4E /// Gap until first sector, 50 bytes to 0x4E
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] public byte[] gap1; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] public byte[] gap1;
} }
/// <summary> /// <summary>
/// Raw demodulated format for IBM System 34 floppies /// Raw demodulated format for IBM System 34 floppies
/// </summary> /// </summary>
public struct Sector public struct Sector
{ {
/// <summary> /// <summary>
/// Sector address mark /// Sector address mark
/// </summary> /// </summary>
public AddressMark addressMark; public AddressMark addressMark;
/// <summary> /// <summary>
/// 22 bytes set to 0x4E, set to 0x22 on Commodore 1581 /// 22 bytes set to 0x4E, set to 0x22 on Commodore 1581
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 22)] public byte[] innerGap; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 22)] public byte[] innerGap;
/// <summary> /// <summary>
/// Sector data block /// Sector data block
/// </summary> /// </summary>
public DataBlock dataBlock; public DataBlock dataBlock;
/// <summary> /// <summary>
/// Variable bytes set to 0x4E, ECMA defines 54 /// Variable bytes set to 0x4E, ECMA defines 54
/// </summary> /// </summary>
public byte[] outerGap; public byte[] outerGap;
} }
/// <summary> /// <summary>
/// Sector address mark for IBM System 34 floppies, contains sync word /// Sector address mark for IBM System 34 floppies, contains sync word
/// </summary> /// </summary>
public struct AddressMark public struct AddressMark
{ {
/// <summary> /// <summary>
/// 12 bytes set to 0 /// 12 bytes set to 0
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
/// <summary> /// <summary>
/// 3 bytes set to 0xA1 /// 3 bytes set to 0xA1
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
/// <summary> /// <summary>
/// Set to <see cref="IBMIdType.AddressMark"/> /// Set to <see cref="IBMIdType.AddressMark" />
/// </summary> /// </summary>
public IBMIdType type; public IBMIdType type;
/// <summary> /// <summary>
/// Track number /// Track number
/// </summary> /// </summary>
public byte track; public byte track;
/// <summary> /// <summary>
/// Side number /// Side number
/// </summary> /// </summary>
public byte side; public byte side;
/// <summary> /// <summary>
/// Sector number /// Sector number
/// </summary> /// </summary>
public byte sector; public byte sector;
/// <summary> /// <summary>
/// <see cref="IBMSectorSizeCode"/> /// <see cref="IBMSectorSizeCode" />
/// </summary> /// </summary>
public IBMSectorSizeCode sectorSize; public IBMSectorSizeCode sectorSize;
/// <summary> /// <summary>
/// CRC16 from <see cref="aone"/> to end of <see cref="sectorSize"/> /// CRC16 from <see cref="aone" /> to end of <see cref="sectorSize" />
/// </summary> /// </summary>
public ushort crc; public ushort crc;
} }
/// <summary> /// <summary>
/// Sector data block for IBM System 34 floppies /// Sector data block for IBM System 34 floppies
/// </summary> /// </summary>
public struct DataBlock public struct DataBlock
{ {
/// <summary> /// <summary>
/// 12 bytes set to 0 /// 12 bytes set to 0
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
/// <summary> /// <summary>
/// 3 bytes set to 0xA1 /// 3 bytes set to 0xA1
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
/// <summary> /// <summary>
/// Set to <see cref="IBMIdType.DataMark"/> or to <see cref="IBMIdType.DeletedDataMark"/> /// Set to <see cref="IBMIdType.DataMark" /> or to <see cref="IBMIdType.DeletedDataMark" />
/// </summary> /// </summary>
public IBMIdType type; public IBMIdType type;
/// <summary> /// <summary>
/// User data /// User data
/// </summary> /// </summary>
public byte[] data; public byte[] data;
/// <summary> /// <summary>
/// CRC16 from <see cref="aone"/> to end of <see cref="data"/> /// CRC16 from <see cref="aone" /> to end of <see cref="data" />
/// </summary> /// </summary>
public ushort crc; public ushort crc;
} }

View File

@@ -46,7 +46,7 @@ namespace DiscImageChef.Decoders.Floppy
// ECMA-100 // ECMA-100
/// <summary> /// <summary>
/// Methods and structures for IBM System 3740 floppy decoding /// Methods and structures for IBM System 3740 floppy decoding
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -54,124 +54,124 @@ namespace DiscImageChef.Decoders.Floppy
public static class System3740 public static class System3740
{ {
/// <summary> /// <summary>
/// Track format for IBM System 3740 floppy /// Track format for IBM System 3740 floppy
/// </summary> /// </summary>
public struct Track public struct Track
{ {
/// <summary> /// <summary>
/// Start of track /// Start of track
/// </summary> /// </summary>
public TrackPreamble trackStart; public TrackPreamble trackStart;
/// <summary> /// <summary>
/// Track sectors /// Track sectors
/// </summary> /// </summary>
public Sector[] sectors; public Sector[] sectors;
/// <summary> /// <summary>
/// Undefined size /// Undefined size
/// </summary> /// </summary>
public byte[] gap; public byte[] gap;
} }
/// <summary> /// <summary>
/// Start of IBM PC FM floppy track /// Start of IBM PC FM floppy track
/// </summary> /// </summary>
public struct TrackPreamble public struct TrackPreamble
{ {
/// <summary> /// <summary>
/// Gap from index pulse, 80 bytes set to 0xFF /// Gap from index pulse, 80 bytes set to 0xFF
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)] public byte[] gap; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)] public byte[] gap;
/// <summary> /// <summary>
/// 6 bytes set to 0x00 /// 6 bytes set to 0x00
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public byte[] zero; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public byte[] zero;
/// <summary> /// <summary>
/// Set to <see cref="IBMIdType.IndexMark"/> /// Set to <see cref="IBMIdType.IndexMark" />
/// </summary> /// </summary>
public IBMIdType type; public IBMIdType type;
/// <summary> /// <summary>
/// Gap until first sector, 26 bytes to 0xFF /// Gap until first sector, 26 bytes to 0xFF
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 26)] public byte[] gap1; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 26)] public byte[] gap1;
} }
/// <summary> /// <summary>
/// Raw demodulated format for IBM System 3740 floppies /// Raw demodulated format for IBM System 3740 floppies
/// </summary> /// </summary>
public struct Sector public struct Sector
{ {
/// <summary> /// <summary>
/// Sector address mark /// Sector address mark
/// </summary> /// </summary>
public AddressMark addressMark; public AddressMark addressMark;
/// <summary> /// <summary>
/// 11 bytes set to 0xFF /// 11 bytes set to 0xFF
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 11)] public byte[] innerGap; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 11)] public byte[] innerGap;
/// <summary> /// <summary>
/// Sector data block /// Sector data block
/// </summary> /// </summary>
public DataBlock dataBlock; public DataBlock dataBlock;
/// <summary> /// <summary>
/// Variable bytes set to 0xFF /// Variable bytes set to 0xFF
/// </summary> /// </summary>
public byte[] outerGap; public byte[] outerGap;
} }
/// <summary> /// <summary>
/// Sector address mark for IBM System 3740 floppies, contains sync word /// Sector address mark for IBM System 3740 floppies, contains sync word
/// </summary> /// </summary>
public struct AddressMark public struct AddressMark
{ {
/// <summary> /// <summary>
/// 6 bytes set to 0 /// 6 bytes set to 0
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public byte[] zero; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public byte[] zero;
/// <summary> /// <summary>
/// Set to <see cref="IBMIdType.AddressMark"/> /// Set to <see cref="IBMIdType.AddressMark" />
/// </summary> /// </summary>
public IBMIdType type; public IBMIdType type;
/// <summary> /// <summary>
/// Track number /// Track number
/// </summary> /// </summary>
public byte track; public byte track;
/// <summary> /// <summary>
/// Side number /// Side number
/// </summary> /// </summary>
public byte side; public byte side;
/// <summary> /// <summary>
/// Sector number /// Sector number
/// </summary> /// </summary>
public byte sector; public byte sector;
/// <summary> /// <summary>
/// <see cref="IBMSectorSizeCode"/> /// <see cref="IBMSectorSizeCode" />
/// </summary> /// </summary>
public IBMSectorSizeCode sectorSize; public IBMSectorSizeCode sectorSize;
/// <summary> /// <summary>
/// CRC16 from <see cref="type"/> to end of <see cref="sectorSize"/> /// CRC16 from <see cref="type" /> to end of <see cref="sectorSize" />
/// </summary> /// </summary>
public ushort crc; public ushort crc;
} }
/// <summary> /// <summary>
/// Sector data block for IBM System 3740 floppies /// Sector data block for IBM System 3740 floppies
/// </summary> /// </summary>
public struct DataBlock public struct DataBlock
{ {
/// <summary> /// <summary>
/// 12 bytes set to 0 /// 12 bytes set to 0
/// </summary> /// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
/// <summary> /// <summary>
/// Set to <see cref="IBMIdType.DataMark"/> or to <see cref="IBMIdType.DeletedDataMark"/> /// Set to <see cref="IBMIdType.DataMark" /> or to <see cref="IBMIdType.DeletedDataMark" />
/// </summary> /// </summary>
public IBMIdType type; public IBMIdType type;
/// <summary> /// <summary>
/// User data /// User data
/// </summary> /// </summary>
public byte[] data; public byte[] data;
/// <summary> /// <summary>
/// CRC16 from <see cref="type"/> to end of <see cref="data"/> /// CRC16 from <see cref="type" /> to end of <see cref="data" />
/// </summary> /// </summary>
public ushort crc; public ushort crc;
} }

View File

@@ -41,7 +41,7 @@ namespace DiscImageChef.Decoders
public static class LisaTag public static class LisaTag
{ {
/// <summary> /// <summary>
/// LisaOS tag as stored on Apple Profile and FileWare disks (20 bytes) /// LisaOS tag as stored on Apple Profile and FileWare disks (20 bytes)
/// </summary> /// </summary>
public struct ProfileTag public struct ProfileTag
{ {
@@ -56,31 +56,31 @@ namespace DiscImageChef.Decoders
/// <summary>0x04, file ID</summary> /// <summary>0x04, file ID</summary>
public short FileId; public short FileId;
/// <summary> /// <summary>
/// 0x06 bit 7, checksum valid? /// 0x06 bit 7, checksum valid?
/// </summary> /// </summary>
public bool ValidChk; public bool ValidChk;
/// <summary> /// <summary>
/// 0x06 bits 6 to 0, used bytes in block /// 0x06 bits 6 to 0, used bytes in block
/// </summary> /// </summary>
public ushort UsedBytes; public ushort UsedBytes;
/// <summary> /// <summary>
/// 0x08, 3 bytes, absolute page number /// 0x08, 3 bytes, absolute page number
/// </summary> /// </summary>
public uint AbsPage; public uint AbsPage;
/// <summary> /// <summary>
/// 0x0B, checksum of data /// 0x0B, checksum of data
/// </summary> /// </summary>
public byte Checksum; public byte Checksum;
/// <summary> /// <summary>
/// 0x0C, relative page number /// 0x0C, relative page number
/// </summary> /// </summary>
public ushort RelPage; public ushort RelPage;
/// <summary> /// <summary>
/// 0x0E, 3 bytes, next block, 0xFFFFFF if it's last block /// 0x0E, 3 bytes, next block, 0xFFFFFF if it's last block
/// </summary> /// </summary>
public uint NextBlock; public uint NextBlock;
/// <summary> /// <summary>
/// 0x11, 3 bytes, previous block, 0xFFFFFF if it's first block /// 0x11, 3 bytes, previous block, 0xFFFFFF if it's first block
/// </summary> /// </summary>
public uint PrevBlock; public uint PrevBlock;
@@ -91,7 +91,7 @@ namespace DiscImageChef.Decoders
} }
/// <summary> /// <summary>
/// LisaOS tag as stored on Priam DataTower disks (24 bytes) /// LisaOS tag as stored on Priam DataTower disks (24 bytes)
/// </summary> /// </summary>
public struct PriamTag public struct PriamTag
{ {
@@ -106,35 +106,35 @@ namespace DiscImageChef.Decoders
/// <summary>0x04, file ID</summary> /// <summary>0x04, file ID</summary>
public short FileId; public short FileId;
/// <summary> /// <summary>
/// 0x06 bit 7, checksum valid? /// 0x06 bit 7, checksum valid?
/// </summary> /// </summary>
public bool ValidChk; public bool ValidChk;
/// <summary> /// <summary>
/// 0x06 bits 6 to 0, used bytes in block /// 0x06 bits 6 to 0, used bytes in block
/// </summary> /// </summary>
public ushort UsedBytes; public ushort UsedBytes;
/// <summary> /// <summary>
/// 0x08, 3 bytes, absolute page number /// 0x08, 3 bytes, absolute page number
/// </summary> /// </summary>
public uint AbsPage; public uint AbsPage;
/// <summary> /// <summary>
/// 0x0B, checksum of data /// 0x0B, checksum of data
/// </summary> /// </summary>
public byte Checksum; public byte Checksum;
/// <summary> /// <summary>
/// 0x0C, relative page number /// 0x0C, relative page number
/// </summary> /// </summary>
public ushort RelPage; public ushort RelPage;
/// <summary> /// <summary>
/// 0x0E, 3 bytes, next block, 0xFFFFFF if it's last block /// 0x0E, 3 bytes, next block, 0xFFFFFF if it's last block
/// </summary> /// </summary>
public uint NextBlock; public uint NextBlock;
/// <summary> /// <summary>
/// 0x11, 3 bytes, previous block, 0xFFFFFF if it's first block /// 0x11, 3 bytes, previous block, 0xFFFFFF if it's first block
/// </summary> /// </summary>
public uint PrevBlock; public uint PrevBlock;
/// <summary> /// <summary>
/// 0x14, disk size /// 0x14, disk size
/// </summary> /// </summary>
public uint DiskSize; public uint DiskSize;
@@ -145,7 +145,7 @@ namespace DiscImageChef.Decoders
} }
/// <summary> /// <summary>
/// LisaOS tag as stored on Apple Sony disks (12 bytes) /// LisaOS tag as stored on Apple Sony disks (12 bytes)
/// </summary> /// </summary>
public struct SonyTag public struct SonyTag
{ {
@@ -160,15 +160,15 @@ namespace DiscImageChef.Decoders
/// <summary>0x04, file ID</summary> /// <summary>0x04, file ID</summary>
public short FileId; public short FileId;
/// <summary> /// <summary>
/// 0x06, relative page number /// 0x06, relative page number
/// </summary> /// </summary>
public ushort RelPage; public ushort RelPage;
/// <summary> /// <summary>
/// 0x08, 3 bytes, next block, 0x7FF if it's last block, 0x8000 set if block is valid /// 0x08, 3 bytes, next block, 0x7FF if it's last block, 0x8000 set if block is valid
/// </summary> /// </summary>
public ushort NextBlock; public ushort NextBlock;
/// <summary> /// <summary>
/// 0x0A, 3 bytes, previous block, 0x7FF if it's first block /// 0x0A, 3 bytes, previous block, 0x7FF if it's first block
/// </summary> /// </summary>
public ushort PrevBlock; public ushort PrevBlock;

View File

@@ -271,7 +271,8 @@ namespace DiscImageChef.Decoders.PCMCIA
else else
{ {
sb.AppendLine("\tAdditional information:"); sb.AppendLine("\tAdditional information:");
foreach(string info in tuple.AdditionalInformation.Where(info => !string.IsNullOrEmpty(info))) sb.AppendFormat("\t\t{0}", info).AppendLine(); foreach(string info in tuple.AdditionalInformation.Where(info => !string.IsNullOrEmpty(info)))
sb.AppendFormat("\t\t{0}", info).AppendLine();
} }
return sb.ToString(); return sb.ToString();

View File

@@ -35,169 +35,169 @@ using System.Diagnostics.CodeAnalysis;
namespace DiscImageChef.Decoders.PCMCIA namespace DiscImageChef.Decoders.PCMCIA
{ {
/// <summary> /// <summary>
/// Tuple codes. /// Tuple codes.
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
public enum TupleCodes : byte public enum TupleCodes : byte
{ {
/// <summary> /// <summary>
/// Checksum control /// Checksum control
/// </summary> /// </summary>
CISTPL_CHECKSUM = 0x10, CISTPL_CHECKSUM = 0x10,
/// <summary> /// <summary>
/// End-of-chain /// End-of-chain
/// </summary> /// </summary>
CISTPL_END = 0xFF, CISTPL_END = 0xFF,
/// <summary> /// <summary>
/// Indirect access PC Card memory /// Indirect access PC Card memory
/// </summary> /// </summary>
CISTPL_INDIRECT = 0x03, CISTPL_INDIRECT = 0x03,
/// <summary> /// <summary>
/// Link-target-control /// Link-target-control
/// </summary> /// </summary>
CISTPL_LINKTARGET = 0x13, CISTPL_LINKTARGET = 0x13,
/// <summary> /// <summary>
/// Longlink to attribute memory /// Longlink to attribute memory
/// </summary> /// </summary>
CISTPL_LONGLINK_A = 0x11, CISTPL_LONGLINK_A = 0x11,
/// <summary> /// <summary>
/// Longlink to common memory /// Longlink to common memory
/// </summary> /// </summary>
CISTPL_LONGLINK_C = 0x12, CISTPL_LONGLINK_C = 0x12,
/// <summary> /// <summary>
/// Longlink to next chain on a Cardbus PC Card /// Longlink to next chain on a Cardbus PC Card
/// </summary> /// </summary>
CISTPL_LONGLINK_CB = 0x02, CISTPL_LONGLINK_CB = 0x02,
/// <summary> /// <summary>
/// Longlink to function specific chains /// Longlink to function specific chains
/// </summary> /// </summary>
CISTPL_LONGLINK_MFC = 0x06, CISTPL_LONGLINK_MFC = 0x06,
/// <summary> /// <summary>
/// No-link to common memory /// No-link to common memory
/// </summary> /// </summary>
CISTPL_NO_LINK = 0x14, CISTPL_NO_LINK = 0x14,
/// <summary> /// <summary>
/// Null tuple /// Null tuple
/// </summary> /// </summary>
CISTPL_NULL = 0x00, CISTPL_NULL = 0x00,
/// <summary> /// <summary>
/// Alternate language string /// Alternate language string
/// </summary> /// </summary>
CISTPL_ALTSTR = 0x16, CISTPL_ALTSTR = 0x16,
/// <summary> /// <summary>
/// Common memory device information /// Common memory device information
/// </summary> /// </summary>
CISTPL_DEVICE = 0x01, CISTPL_DEVICE = 0x01,
/// <summary> /// <summary>
/// Attribute memory device information /// Attribute memory device information
/// </summary> /// </summary>
CISTPL_DEVICE_A = 0x17, CISTPL_DEVICE_A = 0x17,
/// <summary> /// <summary>
/// Other operating conditions information for attribute memory /// Other operating conditions information for attribute memory
/// </summary> /// </summary>
CISTPL_DEVICE_OA = 0x1D, CISTPL_DEVICE_OA = 0x1D,
/// <summary> /// <summary>
/// Other operating conditions information for common memory /// Other operating conditions information for common memory
/// </summary> /// </summary>
CISTPL_DEVICE_OC = 0x1C, CISTPL_DEVICE_OC = 0x1C,
/// <summary> /// <summary>
/// Device geometry information for common memory /// Device geometry information for common memory
/// </summary> /// </summary>
CISTPL_DEVICEGEO = 0x1E, CISTPL_DEVICEGEO = 0x1E,
/// <summary> /// <summary>
/// Device geometry information for attribute memory /// Device geometry information for attribute memory
/// </summary> /// </summary>
CISTPL_DEVICEGEO_A = 0x1F, CISTPL_DEVICEGEO_A = 0x1F,
/// <summary> /// <summary>
/// Extended common memory device information /// Extended common memory device information
/// </summary> /// </summary>
CISTPL_EXTDEVIC = 0x09, CISTPL_EXTDEVIC = 0x09,
/// <summary> /// <summary>
/// Function extensions /// Function extensions
/// </summary> /// </summary>
CISTPL_FUNCE = 0x22, CISTPL_FUNCE = 0x22,
/// <summary> /// <summary>
/// Function class identification /// Function class identification
/// </summary> /// </summary>
CISTPL_FUNCID = 0x21, CISTPL_FUNCID = 0x21,
/// <summary> /// <summary>
/// JEDEC programming information for attribute memory /// JEDEC programming information for attribute memory
/// </summary> /// </summary>
CISTPL_JEDEC_A = 0x19, CISTPL_JEDEC_A = 0x19,
/// <summary> /// <summary>
/// JEDEC programming information for common memory /// JEDEC programming information for common memory
/// </summary> /// </summary>
CISTPL_JEDEC_C = 0x18, CISTPL_JEDEC_C = 0x18,
/// <summary> /// <summary>
/// Manufacturer identification string /// Manufacturer identification string
/// </summary> /// </summary>
CISTPL_MANFID = 0x20, CISTPL_MANFID = 0x20,
/// <summary> /// <summary>
/// Level 1 version/product information /// Level 1 version/product information
/// </summary> /// </summary>
CISTPL_VERS_1 = 0x15, CISTPL_VERS_1 = 0x15,
/// <summary> /// <summary>
/// BAR for a CardBus PC Card /// BAR for a CardBus PC Card
/// </summary> /// </summary>
CISTPL_BAR = 0x07, CISTPL_BAR = 0x07,
/// <summary> /// <summary>
/// Configuration-table-entry /// Configuration-table-entry
/// </summary> /// </summary>
CISTPL_CFTABLE_ENTRY = 0x1B, CISTPL_CFTABLE_ENTRY = 0x1B,
/// <summary> /// <summary>
/// Configuration-table-entry for a CardBus PC Card /// Configuration-table-entry for a CardBus PC Card
/// </summary> /// </summary>
CISTPL_CFTABLE_ENTRY_CB = 0x05, CISTPL_CFTABLE_ENTRY_CB = 0x05,
/// <summary> /// <summary>
/// Configuration tuple for a 16-bit PC Card /// Configuration tuple for a 16-bit PC Card
/// </summary> /// </summary>
CISTPL_CONFIG = 0x1A, CISTPL_CONFIG = 0x1A,
/// <summary> /// <summary>
/// Configuration tuple for a CardBus PC Card /// Configuration tuple for a CardBus PC Card
/// </summary> /// </summary>
CISTPL_CONFIG_CB = 0x04, CISTPL_CONFIG_CB = 0x04,
/// <summary> /// <summary>
/// Function state save/restore definition /// Function state save/restore definition
/// </summary> /// </summary>
CISTPL_PWR_MGMNT = 0x08, CISTPL_PWR_MGMNT = 0x08,
/// <summary> /// <summary>
/// Battery replacement date /// Battery replacement date
/// </summary> /// </summary>
CISTPL_BATTERY = 0x45, CISTPL_BATTERY = 0x45,
/// <summary> /// <summary>
/// Card initialization date /// Card initialization date
/// </summary> /// </summary>
CISTPL_DATE = 0x44, CISTPL_DATE = 0x44,
/// <summary> /// <summary>
/// Level 2 version/product information /// Level 2 version/product information
/// </summary> /// </summary>
CISTPL_VERS_2 = 0x40, CISTPL_VERS_2 = 0x40,
/// <summary> /// <summary>
/// Byte ordering for disk-like partitions /// Byte ordering for disk-like partitions
/// </summary> /// </summary>
CISTPL_BYTEORDER = 0x43, CISTPL_BYTEORDER = 0x43,
/// <summary> /// <summary>
/// Data recording format for common memory /// Data recording format for common memory
/// </summary> /// </summary>
CISTPL_FORMAT = 0x41, CISTPL_FORMAT = 0x41,
/// <summary> /// <summary>
/// Data recording format for attribute memory /// Data recording format for attribute memory
/// </summary> /// </summary>
CISTPL_FORMAT_A = 0x47, CISTPL_FORMAT_A = 0x47,
/// <summary> /// <summary>
/// Partition geometry /// Partition geometry
/// </summary> /// </summary>
CISTPL_GEOMETRY = 0x42, CISTPL_GEOMETRY = 0x42,
/// <summary> /// <summary>
/// Software interleaving /// Software interleaving
/// </summary> /// </summary>
CISTPL_SWIL = 0x23, CISTPL_SWIL = 0x23,
/// <summary> /// <summary>
/// Partition organization /// Partition organization
/// </summary> /// </summary>
CISTPL_ORG = 0x46, CISTPL_ORG = 0x46,
/// <summary> /// <summary>
/// Special purpose /// Special purpose
/// </summary> /// </summary>
CISTPL_SPCL = 0x90 CISTPL_SPCL = 0x90
} }
@@ -206,43 +206,43 @@ namespace DiscImageChef.Decoders.PCMCIA
public enum DeviceTypeCodes : byte public enum DeviceTypeCodes : byte
{ {
/// <summary> /// <summary>
/// No device, used to designate a hole /// No device, used to designate a hole
/// </summary> /// </summary>
DTYPE_NULL = 0, DTYPE_NULL = 0,
/// <summary> /// <summary>
/// Masked ROM /// Masked ROM
/// </summary> /// </summary>
DTYPE_ROM = 1, DTYPE_ROM = 1,
/// <summary> /// <summary>
/// One-type-programmable ROM /// One-type-programmable ROM
/// </summary> /// </summary>
DTYPE_OTPROM = 2, DTYPE_OTPROM = 2,
/// <summary> /// <summary>
/// UV-Erasable Programmable ROM /// UV-Erasable Programmable ROM
/// </summary> /// </summary>
DTYPE_EPROM = 3, DTYPE_EPROM = 3,
/// <summary> /// <summary>
/// Electronically-Erasable Programmable ROM /// Electronically-Erasable Programmable ROM
/// </summary> /// </summary>
DTYPE_EEPROM = 4, DTYPE_EEPROM = 4,
/// <summary> /// <summary>
/// Flash memory /// Flash memory
/// </summary> /// </summary>
DTYPE_FLASH = 5, DTYPE_FLASH = 5,
/// <summary> /// <summary>
/// Static RAM /// Static RAM
/// </summary> /// </summary>
DTYPE_SRAM = 6, DTYPE_SRAM = 6,
/// <summary> /// <summary>
/// Dynamic RAM /// Dynamic RAM
/// </summary> /// </summary>
DTYPE_DRAM = 7, DTYPE_DRAM = 7,
/// <summary> /// <summary>
/// Function-specific memory address range /// Function-specific memory address range
/// </summary> /// </summary>
DTYPE_FUNCSPEC = 13, DTYPE_FUNCSPEC = 13,
/// <summary> /// <summary>
/// Extended type follows /// Extended type follows
/// </summary> /// </summary>
DTYPE_EXTEND = 14 DTYPE_EXTEND = 14
} }
@@ -251,27 +251,27 @@ namespace DiscImageChef.Decoders.PCMCIA
public enum DeviceSpeedCodes : byte public enum DeviceSpeedCodes : byte
{ {
/// <summary> /// <summary>
/// No device /// No device
/// </summary> /// </summary>
DSPEED_NULL = 0, DSPEED_NULL = 0,
/// <summary> /// <summary>
/// 250 ns /// 250 ns
/// </summary> /// </summary>
DSPEED_250NS = 1, DSPEED_250NS = 1,
/// <summary> /// <summary>
/// 200 ns /// 200 ns
/// </summary> /// </summary>
DSPEED_200NS = 2, DSPEED_200NS = 2,
/// <summary> /// <summary>
/// 150 ns /// 150 ns
/// </summary> /// </summary>
DSPEED_150NS = 3, DSPEED_150NS = 3,
/// <summary> /// <summary>
/// 100 ns /// 100 ns
/// </summary> /// </summary>
DSPEED_100NS = 4, DSPEED_100NS = 4,
/// <summary> /// <summary>
/// Extended speed follows /// Extended speed follows
/// </summary> /// </summary>
DSPEED_EXT = 7 DSPEED_EXT = 7
} }

View File

@@ -35,7 +35,7 @@ using System.Diagnostics.CodeAnalysis;
namespace DiscImageChef.Decoders.PCMCIA namespace DiscImageChef.Decoders.PCMCIA
{ {
/// <summary> /// <summary>
/// Basic classure of a PCMCIA tuple /// Basic classure of a PCMCIA tuple
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -48,7 +48,7 @@ namespace DiscImageChef.Decoders.PCMCIA
} }
/// <summary> /// <summary>
/// Checksum tuple /// Checksum tuple
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -56,29 +56,29 @@ namespace DiscImageChef.Decoders.PCMCIA
public class ChecksumTuple public class ChecksumTuple
{ {
/// <summary> /// <summary>
/// <see cref="TupleCodes.CISTPL_CHECKSUM"/> /// <see cref="TupleCodes.CISTPL_CHECKSUM" />
/// </summary> /// </summary>
public TupleCodes Code; public TupleCodes Code;
/// <summary> /// <summary>
/// Link to next tuple /// Link to next tuple
/// </summary> /// </summary>
public byte Link; public byte Link;
/// <summary> /// <summary>
/// Offset to region to be checksummed /// Offset to region to be checksummed
/// </summary> /// </summary>
public short Offset; public short Offset;
/// <summary> /// <summary>
/// Length of region to be checksummed /// Length of region to be checksummed
/// </summary> /// </summary>
public ushort Length; public ushort Length;
/// <summary> /// <summary>
/// Modulo-256 sum of region /// Modulo-256 sum of region
/// </summary> /// </summary>
public byte Checksum; public byte Checksum;
} }
/// <summary> /// <summary>
/// Indirect Access PC Card Memory /// Indirect Access PC Card Memory
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -86,17 +86,17 @@ namespace DiscImageChef.Decoders.PCMCIA
public class IndirectTuple public class IndirectTuple
{ {
/// <summary> /// <summary>
/// <see cref="TupleCodes.CISTPL_INDIRECT"/> /// <see cref="TupleCodes.CISTPL_INDIRECT" />
/// </summary> /// </summary>
public TupleCodes Code; public TupleCodes Code;
/// <summary> /// <summary>
/// Link to next tuple /// Link to next tuple
/// </summary> /// </summary>
public byte Link; public byte Link;
} }
/// <summary> /// <summary>
/// Link target tuple /// Link target tuple
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -104,21 +104,21 @@ namespace DiscImageChef.Decoders.PCMCIA
public class LinkTargetTuple public class LinkTargetTuple
{ {
/// <summary> /// <summary>
/// <see cref="TupleCodes.CISTPL_LINKTARGET"/> /// <see cref="TupleCodes.CISTPL_LINKTARGET" />
/// </summary> /// </summary>
public TupleCodes Code; public TupleCodes Code;
/// <summary> /// <summary>
/// Link to next tuple /// Link to next tuple
/// </summary> /// </summary>
public byte Link; public byte Link;
/// <summary> /// <summary>
/// 'C''I''S' in ASCII /// 'C''I''S' in ASCII
/// </summary> /// </summary>
public byte[] Tag; public byte[] Tag;
} }
/// <summary> /// <summary>
/// 16-bit PC Card Long Link Tuple /// 16-bit PC Card Long Link Tuple
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -126,15 +126,16 @@ namespace DiscImageChef.Decoders.PCMCIA
public class LongLinkTuple public class LongLinkTuple
{ {
/// <summary> /// <summary>
/// <see cref="TupleCodes.CISTPL_LONGLINK_A"/> or <see cref="TupleCodes.CISTPL_LONGLINK_C"/> or <see cref="TupleCodes.CISTPL_LONGLINK_CB"/> /// <see cref="TupleCodes.CISTPL_LONGLINK_A" /> or <see cref="TupleCodes.CISTPL_LONGLINK_C" /> or
/// <see cref="TupleCodes.CISTPL_LONGLINK_CB" />
/// </summary> /// </summary>
public TupleCodes Code; public TupleCodes Code;
/// <summary> /// <summary>
/// Link to next tuple /// Link to next tuple
/// </summary> /// </summary>
public byte Link; public byte Link;
/// <summary> /// <summary>
/// Target address /// Target address
/// </summary> /// </summary>
public uint Address; public uint Address;
} }
@@ -146,17 +147,17 @@ namespace DiscImageChef.Decoders.PCMCIA
public class ConfigurationAddress public class ConfigurationAddress
{ {
/// <summary> /// <summary>
/// Target address space, 0 = attribute, 1 = common /// Target address space, 0 = attribute, 1 = common
/// </summary> /// </summary>
public byte TargetAddressSpace; public byte TargetAddressSpace;
/// <summary> /// <summary>
/// Target address /// Target address
/// </summary> /// </summary>
public uint Address; public uint Address;
} }
/// <summary> /// <summary>
/// Multiple function link tuple /// Multiple function link tuple
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -164,19 +165,19 @@ namespace DiscImageChef.Decoders.PCMCIA
public class MultipleFunctionLinkTuple public class MultipleFunctionLinkTuple
{ {
/// <summary> /// <summary>
/// <see cref="TupleCodes.CISTPL_LONGLINK_MFC"/> /// <see cref="TupleCodes.CISTPL_LONGLINK_MFC" />
/// </summary> /// </summary>
public TupleCodes Code; public TupleCodes Code;
/// <summary> /// <summary>
/// Link to next tuple /// Link to next tuple
/// </summary> /// </summary>
public byte Link; public byte Link;
/// <summary> /// <summary>
/// How many functions follow /// How many functions follow
/// </summary> /// </summary>
public byte NumberFunctions; public byte NumberFunctions;
/// <summary> /// <summary>
/// Link to more configuration registers /// Link to more configuration registers
/// </summary> /// </summary>
public ConfigurationAddress[] Addresses; public ConfigurationAddress[] Addresses;
} }
@@ -187,11 +188,11 @@ namespace DiscImageChef.Decoders.PCMCIA
public class NoLinkTuple public class NoLinkTuple
{ {
/// <summary> /// <summary>
/// <see cref="TupleCodes.CISTPL_NO_LINK"/> /// <see cref="TupleCodes.CISTPL_NO_LINK" />
/// </summary> /// </summary>
public TupleCodes Code; public TupleCodes Code;
/// <summary> /// <summary>
/// Link to next tuple /// Link to next tuple
/// </summary> /// </summary>
public byte Link; public byte Link;
} }
@@ -202,15 +203,16 @@ namespace DiscImageChef.Decoders.PCMCIA
public class AlternateStringTuple public class AlternateStringTuple
{ {
/// <summary> /// <summary>
/// <see cref="TupleCodes.CISTPL_ALTSTR"/> /// <see cref="TupleCodes.CISTPL_ALTSTR" />
/// </summary> /// </summary>
public TupleCodes Code; public TupleCodes Code;
/// <summary> /// <summary>
/// Link to next tuple /// Link to next tuple
/// </summary> /// </summary>
public byte Link; public byte Link;
/// <summary> /// <summary>
/// Array of strings. On memory they're preceded by an ISO Escape Code indicating codepage. Here they're stored as Unicode, so no need for it. /// Array of strings. On memory they're preceded by an ISO Escape Code indicating codepage. Here they're stored as
/// Unicode, so no need for it.
/// </summary> /// </summary>
public string[] Strings; public string[] Strings;
} }
@@ -222,15 +224,15 @@ namespace DiscImageChef.Decoders.PCMCIA
public class ExtendedDeviceSpeed public class ExtendedDeviceSpeed
{ {
/// <summary> /// <summary>
/// Another extended follows /// Another extended follows
/// </summary> /// </summary>
public bool Extended; public bool Extended;
/// <summary> /// <summary>
/// Speed mantisa /// Speed mantisa
/// </summary> /// </summary>
public byte Mantissa; public byte Mantissa;
/// <summary> /// <summary>
/// Speed exponent /// Speed exponent
/// </summary> /// </summary>
public byte Exponent; public byte Exponent;
} }
@@ -241,31 +243,31 @@ namespace DiscImageChef.Decoders.PCMCIA
public struct DeviceInfo public struct DeviceInfo
{ {
/// <summary> /// <summary>
/// Device type code /// Device type code
/// </summary> /// </summary>
public DeviceTypeCodes Type; public DeviceTypeCodes Type;
/// <summary> /// <summary>
/// Write protected /// Write protected
/// </summary> /// </summary>
public bool WPS; public bool WPS;
/// <summary> /// <summary>
/// Speed code /// Speed code
/// </summary> /// </summary>
public DeviceSpeedCodes Speed; public DeviceSpeedCodes Speed;
/// <summary> /// <summary>
/// Extended speeds /// Extended speeds
/// </summary> /// </summary>
public ExtendedDeviceSpeed[] ExtendedSpeeds; public ExtendedDeviceSpeed[] ExtendedSpeeds;
/// <summary> /// <summary>
/// Extended types /// Extended types
/// </summary> /// </summary>
public byte[] ExtendedTypes; public byte[] ExtendedTypes;
/// <summary> /// <summary>
/// Size in units - 1 /// Size in units - 1
/// </summary> /// </summary>
public byte Units; public byte Units;
/// <summary> /// <summary>
/// Code to define units unit /// Code to define units unit
/// </summary> /// </summary>
public byte SizeCode; public byte SizeCode;
} }
@@ -276,15 +278,15 @@ namespace DiscImageChef.Decoders.PCMCIA
public class DeviceTuple public class DeviceTuple
{ {
/// <summary> /// <summary>
/// <see cref="TupleCodes.CISTPL_DEVICE"/> or <see cref="TupleCodes.CISTPL_DEVICE_A"/> /// <see cref="TupleCodes.CISTPL_DEVICE" /> or <see cref="TupleCodes.CISTPL_DEVICE_A" />
/// </summary> /// </summary>
public TupleCodes Code; public TupleCodes Code;
/// <summary> /// <summary>
/// Link to next tuple /// Link to next tuple
/// </summary> /// </summary>
public byte Link; public byte Link;
/// <summary> /// <summary>
/// Array of device information bytes /// Array of device information bytes
/// </summary> /// </summary>
public DeviceInfo[] Infos; public DeviceInfo[] Infos;
} }
@@ -295,15 +297,15 @@ namespace DiscImageChef.Decoders.PCMCIA
public struct OtherConditionInfo public struct OtherConditionInfo
{ {
/// <summary> /// <summary>
/// True if another other condition info follows /// True if another other condition info follows
/// </summary> /// </summary>
public bool Extended; public bool Extended;
/// <summary> /// <summary>
/// Vcc used /// Vcc used
/// </summary> /// </summary>
public byte VccUsed; public byte VccUsed;
/// <summary> /// <summary>
/// Supports WAIT# signal /// Supports WAIT# signal
/// </summary> /// </summary>
public bool MWAIT; public bool MWAIT;
} }
@@ -314,19 +316,19 @@ namespace DiscImageChef.Decoders.PCMCIA
public class OtherConditionTuple public class OtherConditionTuple
{ {
/// <summary> /// <summary>
/// <see cref="TupleCodes.CISTPL_DEVICE_OC"/> or <see cref="TupleCodes.CISTPL_DEVICE_OA"/> /// <see cref="TupleCodes.CISTPL_DEVICE_OC" /> or <see cref="TupleCodes.CISTPL_DEVICE_OA" />
/// </summary> /// </summary>
public TupleCodes Code; public TupleCodes Code;
/// <summary> /// <summary>
/// Link to next tuple /// Link to next tuple
/// </summary> /// </summary>
public byte Link; public byte Link;
/// <summary> /// <summary>
/// Array of other condition information bytes /// Array of other condition information bytes
/// </summary> /// </summary>
public OtherConditionInfo[] OtherConditionInfos; public OtherConditionInfo[] OtherConditionInfos;
/// <summary> /// <summary>
/// Array of device information bytes /// Array of device information bytes
/// </summary> /// </summary>
public DeviceInfo[] Infos; public DeviceInfo[] Infos;
} }
@@ -337,31 +339,31 @@ namespace DiscImageChef.Decoders.PCMCIA
public struct DeviceGeometry public struct DeviceGeometry
{ {
/// <summary> /// <summary>
/// 1 &lt;&lt; n-1 bytes, 2 = 16-bit PC Card, 3 = CardBus PC Card /// 1 &lt;&lt; n-1 bytes, 2 = 16-bit PC Card, 3 = CardBus PC Card
/// </summary> /// </summary>
public byte CardInterface; public byte CardInterface;
/// <summary> /// <summary>
/// Erase block size in 1 &lt;&lt; n-1 increments of <see cref="CardInterface"/> wide accesses. /// Erase block size in 1 &lt;&lt; n-1 increments of <see cref="CardInterface" /> wide accesses.
/// If n == 4, and <see cref="CardInterface"/> == 16, erase block size = 32 * 4 = 128 bytes /// If n == 4, and <see cref="CardInterface" /> == 16, erase block size = 32 * 4 = 128 bytes
/// </summary> /// </summary>
public byte EraseBlockSize; public byte EraseBlockSize;
/// <summary> /// <summary>
/// Read block size in 1 &lt;&lt; n-1 increments of <see cref="CardInterface"/> wide accesses. /// Read block size in 1 &lt;&lt; n-1 increments of <see cref="CardInterface" /> wide accesses.
/// If n == 4, and <see cref="CardInterface"/> == 16, read block size = 32 * 4 = 128 bytes /// If n == 4, and <see cref="CardInterface" /> == 16, read block size = 32 * 4 = 128 bytes
/// </summary> /// </summary>
public byte ReadBlockSize; public byte ReadBlockSize;
/// <summary> /// <summary>
/// Write block size in 1 &lt;&lt; n-1 increments of <see cref="CardInterface"/> wide accesses. /// Write block size in 1 &lt;&lt; n-1 increments of <see cref="CardInterface" /> wide accesses.
/// If n == 4, and <see cref="CardInterface"/> == 16, write block size = 32 * 4 = 128 bytes /// If n == 4, and <see cref="CardInterface" /> == 16, write block size = 32 * 4 = 128 bytes
/// </summary> /// </summary>
public byte WriteBlockSize; public byte WriteBlockSize;
/// <summary> /// <summary>
/// Device partitioning in granularity of 1 &lt;&lt; n-1 erase blocks /// Device partitioning in granularity of 1 &lt;&lt; n-1 erase blocks
/// If n == 4, and erase block is 128 bytes, partitions must be aligned to 32 erase block, or 4096 bytes /// If n == 4, and erase block is 128 bytes, partitions must be aligned to 32 erase block, or 4096 bytes
/// </summary> /// </summary>
public byte Partitions; public byte Partitions;
/// <summary> /// <summary>
/// Card employs a multiple of 1 &lt;&lt; n-1 times interleaving the entire memory arrays /// Card employs a multiple of 1 &lt;&lt; n-1 times interleaving the entire memory arrays
/// </summary> /// </summary>
public byte Interleaving; public byte Interleaving;
} }
@@ -373,15 +375,15 @@ namespace DiscImageChef.Decoders.PCMCIA
public class DeviceGeometryTuple public class DeviceGeometryTuple
{ {
/// <summary> /// <summary>
/// <see cref="TupleCodes.CISTPL_DEVICEGEO"/> or <see cref="TupleCodes.CISTPL_DEVICEGEO_A"/> /// <see cref="TupleCodes.CISTPL_DEVICEGEO" /> or <see cref="TupleCodes.CISTPL_DEVICEGEO_A" />
/// </summary> /// </summary>
public TupleCodes Code; public TupleCodes Code;
/// <summary> /// <summary>
/// Link to next tuple /// Link to next tuple
/// </summary> /// </summary>
public byte Link; public byte Link;
/// <summary> /// <summary>
/// Array of device geometries /// Array of device geometries
/// </summary> /// </summary>
public DeviceGeometry[] Geometries; public DeviceGeometry[] Geometries;
} }
@@ -392,23 +394,23 @@ namespace DiscImageChef.Decoders.PCMCIA
public class FunctionIdentificationTuple public class FunctionIdentificationTuple
{ {
/// <summary> /// <summary>
/// <see cref="TupleCodes.CISTPL_FUNCID"/> /// <see cref="TupleCodes.CISTPL_FUNCID" />
/// </summary> /// </summary>
public TupleCodes Code; public TupleCodes Code;
/// <summary> /// <summary>
/// Link to next tuple /// Link to next tuple
/// </summary> /// </summary>
public byte Link; public byte Link;
/// <summary> /// <summary>
/// Function code /// Function code
/// </summary> /// </summary>
public FunctionCodes Function; public FunctionCodes Function;
/// <summary> /// <summary>
/// Device contains boot ROM /// Device contains boot ROM
/// </summary> /// </summary>
public bool ROM; public bool ROM;
/// <summary> /// <summary>
/// Device wants to be part of power-on-self-test /// Device wants to be part of power-on-self-test
/// </summary> /// </summary>
public bool POST; public bool POST;
} }
@@ -420,19 +422,19 @@ namespace DiscImageChef.Decoders.PCMCIA
public class ManufacturerIdentificationTuple public class ManufacturerIdentificationTuple
{ {
/// <summary> /// <summary>
/// <see cref="TupleCodes.CISTPL_MANFID"/> /// <see cref="TupleCodes.CISTPL_MANFID" />
/// </summary> /// </summary>
public TupleCodes Code; public TupleCodes Code;
/// <summary> /// <summary>
/// Link to next tuple /// Link to next tuple
/// </summary> /// </summary>
public byte Link; public byte Link;
/// <summary> /// <summary>
/// Manufacturer ID /// Manufacturer ID
/// </summary> /// </summary>
public ushort ManufacturerID; public ushort ManufacturerID;
/// <summary> /// <summary>
/// Card ID /// Card ID
/// </summary> /// </summary>
public ushort CardID; public ushort CardID;
} }
@@ -444,31 +446,31 @@ namespace DiscImageChef.Decoders.PCMCIA
public class Level1VersionTuple public class Level1VersionTuple
{ {
/// <summary> /// <summary>
/// <see cref="TupleCodes.CISTPL_VERS_1"/> /// <see cref="TupleCodes.CISTPL_VERS_1" />
/// </summary> /// </summary>
public TupleCodes Code; public TupleCodes Code;
/// <summary> /// <summary>
/// Link to next tuple /// Link to next tuple
/// </summary> /// </summary>
public byte Link; public byte Link;
/// <summary> /// <summary>
/// Major version of standard compliance /// Major version of standard compliance
/// </summary> /// </summary>
public byte MajorVersion; public byte MajorVersion;
/// <summary> /// <summary>
/// Minor version of standard compliance /// Minor version of standard compliance
/// </summary> /// </summary>
public byte MinorVersion; public byte MinorVersion;
/// <summary> /// <summary>
/// Manufacturer string /// Manufacturer string
/// </summary> /// </summary>
public string Manufacturer; public string Manufacturer;
/// <summary> /// <summary>
/// Product string /// Product string
/// </summary> /// </summary>
public string Product; public string Product;
/// <summary> /// <summary>
/// Additional information strings /// Additional information strings
/// </summary> /// </summary>
public string[] AdditionalInformation; public string[] AdditionalInformation;
} }
@@ -479,43 +481,43 @@ namespace DiscImageChef.Decoders.PCMCIA
public class Level2VersionTuple public class Level2VersionTuple
{ {
/// <summary> /// <summary>
/// <see cref="TupleCodes.CISTPL_VERS_2"/> /// <see cref="TupleCodes.CISTPL_VERS_2" />
/// </summary> /// </summary>
public TupleCodes Code; public TupleCodes Code;
/// <summary> /// <summary>
/// Link to next tuple /// Link to next tuple
/// </summary> /// </summary>
public byte Link; public byte Link;
/// <summary> /// <summary>
/// Version of this classure /// Version of this classure
/// </summary> /// </summary>
public byte StructureVersion; public byte StructureVersion;
/// <summary> /// <summary>
/// Level of compliance /// Level of compliance
/// </summary> /// </summary>
public byte Compliance; public byte Compliance;
/// <summary> /// <summary>
/// Address of first data byte /// Address of first data byte
/// </summary> /// </summary>
public ushort Address; public ushort Address;
/// <summary> /// <summary>
/// Vendor-specific byte /// Vendor-specific byte
/// </summary> /// </summary>
public byte VendorSpecific1; public byte VendorSpecific1;
/// <summary> /// <summary>
/// Vendor-specific byte /// Vendor-specific byte
/// </summary> /// </summary>
public byte VendorSpecific2; public byte VendorSpecific2;
/// <summary> /// <summary>
/// Number of copies of CIS present /// Number of copies of CIS present
/// </summary> /// </summary>
public byte CISCopies; public byte CISCopies;
/// <summary> /// <summary>
/// Vendor of software that formatted the card /// Vendor of software that formatted the card
/// </summary> /// </summary>
public string OEM; public string OEM;
/// <summary> /// <summary>
/// Informational message about the card /// Informational message about the card
/// </summary> /// </summary>
public string Information; public string Information;
} }
@@ -526,23 +528,23 @@ namespace DiscImageChef.Decoders.PCMCIA
public class GeometryTuple public class GeometryTuple
{ {
/// <summary> /// <summary>
/// <see cref="TupleCodes.CISTPL_GEOMETRY"/> /// <see cref="TupleCodes.CISTPL_GEOMETRY" />
/// </summary> /// </summary>
public TupleCodes Code; public TupleCodes Code;
/// <summary> /// <summary>
/// Link to next tuple /// Link to next tuple
/// </summary> /// </summary>
public byte Link; public byte Link;
/// <summary> /// <summary>
/// Sectors per track /// Sectors per track
/// </summary> /// </summary>
public byte SectorsPerTrack; public byte SectorsPerTrack;
/// <summary> /// <summary>
/// Tracks per cylinder /// Tracks per cylinder
/// </summary> /// </summary>
public byte TracksPerCylinder; public byte TracksPerCylinder;
/// <summary> /// <summary>
/// Cylinders /// Cylinders
/// </summary> /// </summary>
public ushort Cylinders; public ushort Cylinders;
} }

View File

@@ -44,15 +44,15 @@ namespace DiscImageChef.Decoders.SCSI
public struct Capability public struct Capability
{ {
/// <summary> /// <summary>
/// READ/SEND DISC STRUCTURE format code /// READ/SEND DISC STRUCTURE format code
/// </summary> /// </summary>
public byte FormatCode; public byte FormatCode;
/// <summary> /// <summary>
/// Supported in SEND DISC STRUCTURE /// Supported in SEND DISC STRUCTURE
/// </summary> /// </summary>
public bool SDS; public bool SDS;
/// <summary> /// <summary>
/// Supported in READ DISC STRUCTURE /// Supported in READ DISC STRUCTURE
/// </summary> /// </summary>
public bool RDS; public bool RDS;
} }

File diff suppressed because it is too large Load Diff

View File

@@ -37,23 +37,23 @@ namespace DiscImageChef.Decoders.SCSI
public enum PeripheralQualifiers : byte public enum PeripheralQualifiers : byte
{ {
/// <summary> /// <summary>
/// Peripheral qualifier: Device is connected and supported /// Peripheral qualifier: Device is connected and supported
/// </summary> /// </summary>
Supported = 0x00, Supported = 0x00,
/// <summary> /// <summary>
/// Peripheral qualifier: Device is supported but not connected /// Peripheral qualifier: Device is supported but not connected
/// </summary> /// </summary>
Unconnected = 0x01, Unconnected = 0x01,
/// <summary> /// <summary>
/// Peripheral qualifier: Reserved value /// Peripheral qualifier: Reserved value
/// </summary> /// </summary>
Reserved = 0x02, Reserved = 0x02,
/// <summary> /// <summary>
/// Peripheral qualifier: Device is connected but unsupported /// Peripheral qualifier: Device is connected but unsupported
/// </summary> /// </summary>
Unsupported = 0x03, Unsupported = 0x03,
/// <summary> /// <summary>
/// Peripheral qualifier: Vendor values: 0x04, 0x05, 0x06 and 0x07 /// Peripheral qualifier: Vendor values: 0x04, 0x05, 0x06 and 0x07
/// </summary> /// </summary>
VendorMask = 0x04 VendorMask = 0x04
} }
@@ -62,95 +62,95 @@ namespace DiscImageChef.Decoders.SCSI
public enum PeripheralDeviceTypes : byte public enum PeripheralDeviceTypes : byte
{ {
/// <summary> /// <summary>
/// Direct-access device /// Direct-access device
/// </summary> /// </summary>
DirectAccess = 0x00, DirectAccess = 0x00,
/// <summary> /// <summary>
/// Sequential-access device /// Sequential-access device
/// </summary> /// </summary>
SequentialAccess = 0x01, SequentialAccess = 0x01,
/// <summary> /// <summary>
/// Printer device /// Printer device
/// </summary> /// </summary>
PrinterDevice = 0x02, PrinterDevice = 0x02,
/// <summary> /// <summary>
/// Processor device /// Processor device
/// </summary> /// </summary>
ProcessorDevice = 0x03, ProcessorDevice = 0x03,
/// <summary> /// <summary>
/// Write-once device /// Write-once device
/// </summary> /// </summary>
WriteOnceDevice = 0x04, WriteOnceDevice = 0x04,
/// <summary> /// <summary>
/// CD-ROM/DVD/etc device /// CD-ROM/DVD/etc device
/// </summary> /// </summary>
MultiMediaDevice = 0x05, MultiMediaDevice = 0x05,
/// <summary> /// <summary>
/// Scanner device /// Scanner device
/// </summary> /// </summary>
ScannerDevice = 0x06, ScannerDevice = 0x06,
/// <summary> /// <summary>
/// Optical memory device /// Optical memory device
/// </summary> /// </summary>
OpticalDevice = 0x07, OpticalDevice = 0x07,
/// <summary> /// <summary>
/// Medium change device /// Medium change device
/// </summary> /// </summary>
MediumChangerDevice = 0x08, MediumChangerDevice = 0x08,
/// <summary> /// <summary>
/// Communications device /// Communications device
/// </summary> /// </summary>
CommsDevice = 0x09, CommsDevice = 0x09,
/// <summary> /// <summary>
/// Graphics arts pre-press device (defined in ASC IT8) /// Graphics arts pre-press device (defined in ASC IT8)
/// </summary> /// </summary>
PrePressDevice1 = 0x0A, PrePressDevice1 = 0x0A,
/// <summary> /// <summary>
/// Graphics arts pre-press device (defined in ASC IT8) /// Graphics arts pre-press device (defined in ASC IT8)
/// </summary> /// </summary>
PrePressDevice2 = 0x0B, PrePressDevice2 = 0x0B,
/// <summary> /// <summary>
/// Array controller device /// Array controller device
/// </summary> /// </summary>
ArrayControllerDevice = 0x0C, ArrayControllerDevice = 0x0C,
/// <summary> /// <summary>
/// Enclosure services device /// Enclosure services device
/// </summary> /// </summary>
EnclosureServiceDevice = 0x0D, EnclosureServiceDevice = 0x0D,
/// <summary> /// <summary>
/// Simplified direct-access device /// Simplified direct-access device
/// </summary> /// </summary>
SimplifiedDevice = 0x0E, SimplifiedDevice = 0x0E,
/// <summary> /// <summary>
/// Optical card reader/writer device /// Optical card reader/writer device
/// </summary> /// </summary>
OCRWDevice = 0x0F, OCRWDevice = 0x0F,
/// <summary> /// <summary>
/// Bridging Expanders /// Bridging Expanders
/// </summary> /// </summary>
BridgingExpander = 0x10, BridgingExpander = 0x10,
/// <summary> /// <summary>
/// Object-based Storage Device /// Object-based Storage Device
/// </summary> /// </summary>
ObjectDevice = 0x11, ObjectDevice = 0x11,
/// <summary> /// <summary>
/// Automation/Drive Interface /// Automation/Drive Interface
/// </summary> /// </summary>
ADCDevice = 0x12, ADCDevice = 0x12,
/// <summary> /// <summary>
/// Security Manager Device /// Security Manager Device
/// </summary> /// </summary>
SCSISecurityManagerDevice = 0x13, SCSISecurityManagerDevice = 0x13,
/// <summary> /// <summary>
/// Host managed zoned block device /// Host managed zoned block device
/// </summary> /// </summary>
SCSIZonedBlockDevice = 0x14, SCSIZonedBlockDevice = 0x14,
/// <summary> /// <summary>
/// Well known logical unit /// Well known logical unit
/// </summary> /// </summary>
WellKnownDevice = 0x1E, WellKnownDevice = 0x1E,
/// <summary> /// <summary>
/// Unknown or no device type /// Unknown or no device type
/// </summary> /// </summary>
UnknownDevice = 0x1F UnknownDevice = 0x1F
} }
@@ -159,31 +159,31 @@ namespace DiscImageChef.Decoders.SCSI
public enum ANSIVersions : byte public enum ANSIVersions : byte
{ {
/// <summary> /// <summary>
/// Device does not claim conformance to any ANSI version /// Device does not claim conformance to any ANSI version
/// </summary> /// </summary>
ANSINoVersion = 0x00, ANSINoVersion = 0x00,
/// <summary> /// <summary>
/// Device complies with ANSI X3.131:1986 /// Device complies with ANSI X3.131:1986
/// </summary> /// </summary>
ANSI1986Version = 0x01, ANSI1986Version = 0x01,
/// <summary> /// <summary>
/// Device complies with ANSI X3.131:1994 /// Device complies with ANSI X3.131:1994
/// </summary> /// </summary>
ANSI1994Version = 0x02, ANSI1994Version = 0x02,
/// <summary> /// <summary>
/// Device complies with ANSI X3.301:1997 /// Device complies with ANSI X3.301:1997
/// </summary> /// </summary>
ANSI1997Version = 0x03, ANSI1997Version = 0x03,
/// <summary> /// <summary>
/// Device complies with ANSI X3.351:2001 /// Device complies with ANSI X3.351:2001
/// </summary> /// </summary>
ANSI2001Version = 0x04, ANSI2001Version = 0x04,
/// <summary> /// <summary>
/// Device complies with ANSI X3.408:2005. /// Device complies with ANSI X3.408:2005.
/// </summary> /// </summary>
ANSI2005Version = 0x05, ANSI2005Version = 0x05,
/// <summary> /// <summary>
/// Device complies with SPC-4 /// Device complies with SPC-4
/// </summary> /// </summary>
ANSI2008Version = 0x06 ANSI2008Version = 0x06
} }
@@ -192,11 +192,11 @@ namespace DiscImageChef.Decoders.SCSI
public enum ECMAVersions : byte public enum ECMAVersions : byte
{ {
/// <summary> /// <summary>
/// Device does not claim conformance to any ECMA version /// Device does not claim conformance to any ECMA version
/// </summary> /// </summary>
ECMANoVersion = 0x00, ECMANoVersion = 0x00,
/// <summary> /// <summary>
/// Device complies with a ECMA-111 standard /// Device complies with a ECMA-111 standard
/// </summary> /// </summary>
ECMA111 = 0x01 ECMA111 = 0x01
} }
@@ -205,11 +205,11 @@ namespace DiscImageChef.Decoders.SCSI
public enum ISOVersions : byte public enum ISOVersions : byte
{ {
/// <summary> /// <summary>
/// Device does not claim conformance to any ISO/IEC version /// Device does not claim conformance to any ISO/IEC version
/// </summary> /// </summary>
ISONoVersion = 0x00, ISONoVersion = 0x00,
/// <summary> /// <summary>
/// Device complies with ISO/IEC 9316:1995 /// Device complies with ISO/IEC 9316:1995
/// </summary> /// </summary>
ISO1995Version = 0x02 ISO1995Version = 0x02
} }
@@ -218,19 +218,19 @@ namespace DiscImageChef.Decoders.SCSI
public enum SPIClocking : byte public enum SPIClocking : byte
{ {
/// <summary> /// <summary>
/// Supports only ST /// Supports only ST
/// </summary> /// </summary>
ST = 0x00, ST = 0x00,
/// <summary> /// <summary>
/// Supports only DT /// Supports only DT
/// </summary> /// </summary>
DT = 0x01, DT = 0x01,
/// <summary> /// <summary>
/// Reserved value /// Reserved value
/// </summary> /// </summary>
Reserved = 0x02, Reserved = 0x02,
/// <summary> /// <summary>
/// Supports ST and DT /// Supports ST and DT
/// </summary> /// </summary>
STandDT = 0x03 STandDT = 0x03
} }
@@ -239,19 +239,19 @@ namespace DiscImageChef.Decoders.SCSI
public enum TGPSValues : byte public enum TGPSValues : byte
{ {
/// <summary> /// <summary>
/// Assymetrical access not supported /// Assymetrical access not supported
/// </summary> /// </summary>
NotSupported = 0x00, NotSupported = 0x00,
/// <summary> /// <summary>
/// Only implicit assymetrical access is supported /// Only implicit assymetrical access is supported
/// </summary> /// </summary>
OnlyImplicit = 0x01, OnlyImplicit = 0x01,
/// <summary> /// <summary>
/// Only explicit assymetrical access is supported /// Only explicit assymetrical access is supported
/// </summary> /// </summary>
OnlyExplicit = 0x02, OnlyExplicit = 0x02,
/// <summary> /// <summary>
/// Both implicit and explicit assymetrical access are supported /// Both implicit and explicit assymetrical access are supported
/// </summary> /// </summary>
Both = 0x03 Both = 0x03
} }
@@ -260,55 +260,55 @@ namespace DiscImageChef.Decoders.SCSI
public enum ProtocolIdentifiers : byte public enum ProtocolIdentifiers : byte
{ {
/// <summary> /// <summary>
/// Fibre Channel /// Fibre Channel
/// </summary> /// </summary>
FibreChannel = 0, FibreChannel = 0,
/// <summary> /// <summary>
/// Parallel SCSI /// Parallel SCSI
/// </summary> /// </summary>
SCSI = 1, SCSI = 1,
/// <summary> /// <summary>
/// SSA /// SSA
/// </summary> /// </summary>
SSA = 2, SSA = 2,
/// <summary> /// <summary>
/// IEEE-1394 /// IEEE-1394
/// </summary> /// </summary>
Firewire = 3, Firewire = 3,
/// <summary> /// <summary>
/// SCSI Remote Direct Memory Access Protocol /// SCSI Remote Direct Memory Access Protocol
/// </summary> /// </summary>
RDMAP = 4, RDMAP = 4,
/// <summary> /// <summary>
/// Internet SCSI /// Internet SCSI
/// </summary> /// </summary>
iSCSI = 5, iSCSI = 5,
/// <summary> /// <summary>
/// Serial SCSI /// Serial SCSI
/// </summary> /// </summary>
SAS = 6, SAS = 6,
/// <summary> /// <summary>
/// Automation/Drive Interface Transport Protocol /// Automation/Drive Interface Transport Protocol
/// </summary> /// </summary>
ADT = 7, ADT = 7,
/// <summary> /// <summary>
/// AT Attachment Interface (ATA/ATAPI) /// AT Attachment Interface (ATA/ATAPI)
/// </summary> /// </summary>
ATA = 8, ATA = 8,
/// <summary> /// <summary>
/// USB Attached SCSI /// USB Attached SCSI
/// </summary> /// </summary>
UAS = 9, UAS = 9,
/// <summary> /// <summary>
/// SCSI over PCI Express /// SCSI over PCI Express
/// </summary> /// </summary>
SCSIe = 10, SCSIe = 10,
/// <summary> /// <summary>
/// PCI Express /// PCI Express
/// </summary> /// </summary>
PCIe = 11, PCIe = 11,
/// <summary> /// <summary>
/// No specific protocol /// No specific protocol
/// </summary> /// </summary>
NoProtocol = 15 NoProtocol = 15
} }

View File

@@ -39,15 +39,15 @@ using DiscImageChef.Console;
namespace DiscImageChef.Decoders.SCSI namespace DiscImageChef.Decoders.SCSI
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// T9/375-D revision 10l /// T9/375-D revision 10l
/// T10/995-D revision 10 /// T10/995-D revision 10
/// T10/1236-D revision 20 /// T10/1236-D revision 20
/// T10/1416-D revision 23 /// T10/1416-D revision 23
/// T10/1731-D revision 16 /// T10/1731-D revision 16
/// T10/502 revision 05 /// T10/502 revision 05
/// RFC 7144 /// RFC 7144
/// ECMA-111 /// ECMA-111
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -227,7 +227,8 @@ namespace DiscImageChef.Decoders.SCSI
else descriptorsNo = (SCSIInquiryResponse.Length - 58) / 2; else descriptorsNo = (SCSIInquiryResponse.Length - 58) / 2;
decoded.VersionDescriptors = new ushort[descriptorsNo]; decoded.VersionDescriptors = new ushort[descriptorsNo];
for(int i = 0; i < descriptorsNo; i++) decoded.VersionDescriptors[i] = BitConverter.ToUInt16(SCSIInquiryResponse, 58 + i * 2); for(int i = 0; i < descriptorsNo; i++)
decoded.VersionDescriptors[i] = BitConverter.ToUInt16(SCSIInquiryResponse, 58 + i * 2);
} }
if(SCSIInquiryResponse.Length >= 75 && SCSIInquiryResponse.Length < 96) if(SCSIInquiryResponse.Length >= 75 && SCSIInquiryResponse.Length < 96)
@@ -2084,237 +2085,237 @@ namespace DiscImageChef.Decoders.SCSI
public struct SCSIInquiry public struct SCSIInquiry
{ {
/// <summary> /// <summary>
/// Peripheral qualifier /// Peripheral qualifier
/// Byte 0, bits 7 to 5 /// Byte 0, bits 7 to 5
/// </summary> /// </summary>
public byte PeripheralQualifier; public byte PeripheralQualifier;
/// <summary> /// <summary>
/// Peripheral device type /// Peripheral device type
/// Byte 0, bits 4 to 0 /// Byte 0, bits 4 to 0
/// </summary> /// </summary>
public byte PeripheralDeviceType; public byte PeripheralDeviceType;
/// <summary> /// <summary>
/// Removable device /// Removable device
/// Byte 1, bit 7 /// Byte 1, bit 7
/// </summary> /// </summary>
public bool RMB; public bool RMB;
/// <summary> /// <summary>
/// SCSI-1 vendor-specific qualification codes /// SCSI-1 vendor-specific qualification codes
/// Byte 1, bits 6 to 0 /// Byte 1, bits 6 to 0
/// </summary> /// </summary>
public byte DeviceTypeModifier; public byte DeviceTypeModifier;
/// <summary> /// <summary>
/// ISO/IEC SCSI Standard Version /// ISO/IEC SCSI Standard Version
/// Byte 2, bits 7 to 6, mask = 0xC0, >> 6 /// Byte 2, bits 7 to 6, mask = 0xC0, >> 6
/// </summary> /// </summary>
public byte ISOVersion; public byte ISOVersion;
/// <summary> /// <summary>
/// ECMA SCSI Standard Version /// ECMA SCSI Standard Version
/// Byte 2, bits 5 to 3, mask = 0x38, >> 3 /// Byte 2, bits 5 to 3, mask = 0x38, >> 3
/// </summary> /// </summary>
public byte ECMAVersion; public byte ECMAVersion;
/// <summary> /// <summary>
/// ANSI SCSI Standard Version /// ANSI SCSI Standard Version
/// Byte 2, bits 2 to 0, mask = 0x07 /// Byte 2, bits 2 to 0, mask = 0x07
/// </summary> /// </summary>
public byte ANSIVersion; public byte ANSIVersion;
/// <summary> /// <summary>
/// Asynchronous Event Reporting Capability supported /// Asynchronous Event Reporting Capability supported
/// Byte 3, bit 7 /// Byte 3, bit 7
/// </summary> /// </summary>
public bool AERC; public bool AERC;
/// <summary> /// <summary>
/// Device supports TERMINATE TASK command /// Device supports TERMINATE TASK command
/// Byte 3, bit 6 /// Byte 3, bit 6
/// </summary> /// </summary>
public bool TrmTsk; public bool TrmTsk;
/// <summary> /// <summary>
/// Supports setting Normal ACA /// Supports setting Normal ACA
/// Byte 3, bit 5 /// Byte 3, bit 5
/// </summary> /// </summary>
public bool NormACA; public bool NormACA;
/// <summary> /// <summary>
/// Supports LUN hierarchical addressing /// Supports LUN hierarchical addressing
/// Byte 3, bit 4 /// Byte 3, bit 4
/// </summary> /// </summary>
public bool HiSup; public bool HiSup;
/// <summary> /// <summary>
/// Responde data format /// Responde data format
/// Byte 3, bit 3 to 0 /// Byte 3, bit 3 to 0
/// </summary> /// </summary>
public byte ResponseDataFormat; public byte ResponseDataFormat;
/// <summary> /// <summary>
/// Lenght of total INQUIRY response minus 4 /// Lenght of total INQUIRY response minus 4
/// Byte 4 /// Byte 4
/// </summary> /// </summary>
public byte AdditionalLength; public byte AdditionalLength;
/// <summary> /// <summary>
/// Device contains an embedded storage array controller /// Device contains an embedded storage array controller
/// Byte 5, bit 7 /// Byte 5, bit 7
/// </summary> /// </summary>
public bool SCCS; public bool SCCS;
/// <summary> /// <summary>
/// Device contains an Access Control Coordinator /// Device contains an Access Control Coordinator
/// Byte 5, bit 6 /// Byte 5, bit 6
/// </summary> /// </summary>
public bool ACC; public bool ACC;
/// <summary> /// <summary>
/// Supports asymetrical logical unit access /// Supports asymetrical logical unit access
/// Byte 5, bits 5 to 4 /// Byte 5, bits 5 to 4
/// </summary> /// </summary>
public byte TPGS; public byte TPGS;
/// <summary> /// <summary>
/// Supports third-party copy commands /// Supports third-party copy commands
/// Byte 5, bit 3 /// Byte 5, bit 3
/// </summary> /// </summary>
public bool ThreePC; public bool ThreePC;
/// <summary> /// <summary>
/// Reserved /// Reserved
/// Byte 5, bits 2 to 1 /// Byte 5, bits 2 to 1
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Supports protection information /// Supports protection information
/// Byte 5, bit 0 /// Byte 5, bit 0
/// </summary> /// </summary>
public bool Protect; public bool Protect;
/// <summary> /// <summary>
/// Supports basic queueing /// Supports basic queueing
/// Byte 6, bit 7 /// Byte 6, bit 7
/// </summary> /// </summary>
public bool BQue; public bool BQue;
/// <summary> /// <summary>
/// Device contains an embedded enclosure services component /// Device contains an embedded enclosure services component
/// Byte 6, bit 6 /// Byte 6, bit 6
/// </summary> /// </summary>
public bool EncServ; public bool EncServ;
/// <summary> /// <summary>
/// Vendor-specific /// Vendor-specific
/// Byte 6, bit 5 /// Byte 6, bit 5
/// </summary> /// </summary>
public bool VS1; public bool VS1;
/// <summary> /// <summary>
/// Multi-port device /// Multi-port device
/// Byte 6, bit 4 /// Byte 6, bit 4
/// </summary> /// </summary>
public bool MultiP; public bool MultiP;
/// <summary> /// <summary>
/// Device contains or is attached to a medium changer /// Device contains or is attached to a medium changer
/// Byte 6, bit 3 /// Byte 6, bit 3
/// </summary> /// </summary>
public bool MChngr; public bool MChngr;
/// <summary> /// <summary>
/// Device supports request and acknowledge handshakes /// Device supports request and acknowledge handshakes
/// Byte 6, bit 2 /// Byte 6, bit 2
/// </summary> /// </summary>
public bool ACKREQQ; public bool ACKREQQ;
/// <summary> /// <summary>
/// Supports 32-bit wide SCSI addresses /// Supports 32-bit wide SCSI addresses
/// Byte 6, bit 1 /// Byte 6, bit 1
/// </summary> /// </summary>
public bool Addr32; public bool Addr32;
/// <summary> /// <summary>
/// Supports 16-bit wide SCSI addresses /// Supports 16-bit wide SCSI addresses
/// Byte 6, bit 0 /// Byte 6, bit 0
/// </summary> /// </summary>
public bool Addr16; public bool Addr16;
/// <summary> /// <summary>
/// Device supports relative addressing /// Device supports relative addressing
/// Byte 7, bit 7 /// Byte 7, bit 7
/// </summary> /// </summary>
public bool RelAddr; public bool RelAddr;
/// <summary> /// <summary>
/// Supports 32-bit wide data transfers /// Supports 32-bit wide data transfers
/// Byte 7, bit 6 /// Byte 7, bit 6
/// </summary> /// </summary>
public bool WBus32; public bool WBus32;
/// <summary> /// <summary>
/// Supports 16-bit wide data transfers /// Supports 16-bit wide data transfers
/// Byte 7, bit 5 /// Byte 7, bit 5
/// </summary> /// </summary>
public bool WBus16; public bool WBus16;
/// <summary> /// <summary>
/// Supports synchronous data transfer /// Supports synchronous data transfer
/// Byte 7, bit 4 /// Byte 7, bit 4
/// </summary> /// </summary>
public bool Sync; public bool Sync;
/// <summary> /// <summary>
/// Supports linked commands /// Supports linked commands
/// Byte 7, bit 3 /// Byte 7, bit 3
/// </summary> /// </summary>
public bool Linked; public bool Linked;
/// <summary> /// <summary>
/// Supports CONTINUE TASK and TARGET TRANSFER DISABLE commands /// Supports CONTINUE TASK and TARGET TRANSFER DISABLE commands
/// Byte 7, bit 2 /// Byte 7, bit 2
/// </summary> /// </summary>
public bool TranDis; public bool TranDis;
/// <summary> /// <summary>
/// Supports TCQ queue /// Supports TCQ queue
/// Byte 7, bit 1 /// Byte 7, bit 1
/// </summary> /// </summary>
public bool CmdQue; public bool CmdQue;
/// <summary> /// <summary>
/// Indicates that the devices responds to RESET with soft reset /// Indicates that the devices responds to RESET with soft reset
/// Byte 7, bit 0 /// Byte 7, bit 0
/// </summary> /// </summary>
public bool SftRe; public bool SftRe;
/// <summary> /// <summary>
/// Vendor identification /// Vendor identification
/// Bytes 8 to 15 /// Bytes 8 to 15
/// </summary> /// </summary>
public byte[] VendorIdentification; public byte[] VendorIdentification;
/// <summary> /// <summary>
/// Product identification /// Product identification
/// Bytes 16 to 31 /// Bytes 16 to 31
/// </summary> /// </summary>
public byte[] ProductIdentification; public byte[] ProductIdentification;
/// <summary> /// <summary>
/// Product revision level /// Product revision level
/// Bytes 32 to 35 /// Bytes 32 to 35
/// </summary> /// </summary>
public byte[] ProductRevisionLevel; public byte[] ProductRevisionLevel;
/// <summary> /// <summary>
/// Vendor-specific data /// Vendor-specific data
/// Bytes 36 to 55 /// Bytes 36 to 55
/// </summary> /// </summary>
public byte[] VendorSpecific; public byte[] VendorSpecific;
/// <summary> /// <summary>
/// Byte 56, bits 7 to 4 /// Byte 56, bits 7 to 4
/// </summary> /// </summary>
public byte Reserved3; public byte Reserved3;
/// <summary> /// <summary>
/// Supported SPI clocking /// Supported SPI clocking
/// Byte 56, bits 3 to 2 /// Byte 56, bits 3 to 2
/// </summary> /// </summary>
public byte Clocking; public byte Clocking;
/// <summary> /// <summary>
/// Device supports Quick Arbitration and Selection /// Device supports Quick Arbitration and Selection
/// Byte 56, bit 1 /// Byte 56, bit 1
/// </summary> /// </summary>
public bool QAS; public bool QAS;
/// <summary> /// <summary>
/// Supports information unit transfers /// Supports information unit transfers
/// Byte 56, bit 0 /// Byte 56, bit 0
/// </summary> /// </summary>
public bool IUS; public bool IUS;
/// <summary> /// <summary>
/// Reserved /// Reserved
/// Byte 57 /// Byte 57
/// </summary> /// </summary>
public byte Reserved4; public byte Reserved4;
/// <summary> /// <summary>
/// Array of version descriptors /// Array of version descriptors
/// Bytes 58 to 73 /// Bytes 58 to 73
/// </summary> /// </summary>
public ushort[] VersionDescriptors; public ushort[] VersionDescriptors;
/// <summary> /// <summary>
/// Reserved /// Reserved
/// Bytes 74 to 95 /// Bytes 74 to 95
/// </summary> /// </summary>
public byte[] Reserved5; public byte[] Reserved5;
/// <summary> /// <summary>
/// Reserved /// Reserved
/// Bytes 96 to end /// Bytes 96 to end
/// </summary> /// </summary>
public byte[] VendorSpecific2; public byte[] VendorSpecific2;
@@ -2322,191 +2323,191 @@ namespace DiscImageChef.Decoders.SCSI
#region Quantum vendor unique inquiry data structure #region Quantum vendor unique inquiry data structure
/// <summary> /// <summary>
/// Means that the INQUIRY response contains 56 bytes or more, so this data has been filled /// Means that the INQUIRY response contains 56 bytes or more, so this data has been filled
/// </summary> /// </summary>
public bool QuantumPresent; public bool QuantumPresent;
/// <summary> /// <summary>
/// The product family. /// The product family.
/// Byte 36, bits 7 to 5 /// Byte 36, bits 7 to 5
/// </summary> /// </summary>
public byte Qt_ProductFamily; public byte Qt_ProductFamily;
/// <summary> /// <summary>
/// The released firmware. /// The released firmware.
/// Byte 36, bits 4 to 0 /// Byte 36, bits 4 to 0
/// </summary> /// </summary>
public byte Qt_ReleasedFirmware; public byte Qt_ReleasedFirmware;
/// <summary> /// <summary>
/// The firmware major version. /// The firmware major version.
/// Byte 37 /// Byte 37
/// </summary> /// </summary>
public byte Qt_FirmwareMajorVersion; public byte Qt_FirmwareMajorVersion;
/// <summary> /// <summary>
/// The firmware minor version. /// The firmware minor version.
/// Byte 38 /// Byte 38
/// </summary> /// </summary>
public byte Qt_FirmwareMinorVersion; public byte Qt_FirmwareMinorVersion;
/// <summary> /// <summary>
/// The EEPROM format major version. /// The EEPROM format major version.
/// Byte 39 /// Byte 39
/// </summary> /// </summary>
public byte Qt_EEPROMFormatMajorVersion; public byte Qt_EEPROMFormatMajorVersion;
/// <summary> /// <summary>
/// The EEPROM format minor version. /// The EEPROM format minor version.
/// Byte 40 /// Byte 40
/// </summary> /// </summary>
public byte Qt_EEPROMFormatMinorVersion; public byte Qt_EEPROMFormatMinorVersion;
/// <summary> /// <summary>
/// The firmware personality. /// The firmware personality.
/// Byte 41 /// Byte 41
/// </summary> /// </summary>
public byte Qt_FirmwarePersonality; public byte Qt_FirmwarePersonality;
/// <summary> /// <summary>
/// The firmware sub personality. /// The firmware sub personality.
/// Byte 42 /// Byte 42
/// </summary> /// </summary>
public byte Qt_FirmwareSubPersonality; public byte Qt_FirmwareSubPersonality;
/// <summary> /// <summary>
/// The tape directory format version. /// The tape directory format version.
/// Byte 43 /// Byte 43
/// </summary> /// </summary>
public byte Qt_TapeDirectoryFormatVersion; public byte Qt_TapeDirectoryFormatVersion;
/// <summary> /// <summary>
/// The controller hardware version. /// The controller hardware version.
/// Byte 44 /// Byte 44
/// </summary> /// </summary>
public byte Qt_ControllerHardwareVersion; public byte Qt_ControllerHardwareVersion;
/// <summary> /// <summary>
/// The drive EEPROM version. /// The drive EEPROM version.
/// Byte 45 /// Byte 45
/// </summary> /// </summary>
public byte Qt_DriveEEPROMVersion; public byte Qt_DriveEEPROMVersion;
/// <summary> /// <summary>
/// The drive hardware version. /// The drive hardware version.
/// Byte 46 /// Byte 46
/// </summary> /// </summary>
public byte Qt_DriveHardwareVersion; public byte Qt_DriveHardwareVersion;
/// <summary> /// <summary>
/// The media loader firmware version. /// The media loader firmware version.
/// Byte 47 /// Byte 47
/// </summary> /// </summary>
public byte Qt_MediaLoaderFirmwareVersion; public byte Qt_MediaLoaderFirmwareVersion;
/// <summary> /// <summary>
/// The media loader hardware version. /// The media loader hardware version.
/// Byte 48 /// Byte 48
/// </summary> /// </summary>
public byte Qt_MediaLoaderHardwareVersion; public byte Qt_MediaLoaderHardwareVersion;
/// <summary> /// <summary>
/// The media loader mechanical version. /// The media loader mechanical version.
/// Byte 49 /// Byte 49
/// </summary> /// </summary>
public byte Qt_MediaLoaderMechanicalVersion; public byte Qt_MediaLoaderMechanicalVersion;
/// <summary> /// <summary>
/// Is a media loader present? /// Is a media loader present?
/// Byte 50 /// Byte 50
/// </summary> /// </summary>
public bool Qt_MediaLoaderPresent; public bool Qt_MediaLoaderPresent;
/// <summary> /// <summary>
/// Is a library present? /// Is a library present?
/// Byte 51 /// Byte 51
/// </summary> /// </summary>
public bool Qt_LibraryPresent; public bool Qt_LibraryPresent;
/// <summary> /// <summary>
/// The module revision. /// The module revision.
/// Bytes 52 to 55 /// Bytes 52 to 55
/// </summary> /// </summary>
public byte[] Qt_ModuleRevision; public byte[] Qt_ModuleRevision;
#endregion Quantum vendor unique inquiry data structure #endregion Quantum vendor unique inquiry data structure
#region IBM vendor unique inquiry data structure #region IBM vendor unique inquiry data structure
/// <summary> /// <summary>
/// Means that the INQUIRY response contains 56 bytes or more, so this data has been filled /// Means that the INQUIRY response contains 56 bytes or more, so this data has been filled
/// </summary> /// </summary>
public bool IBMPresent; public bool IBMPresent;
/// <summary> /// <summary>
/// Drive is not capable of automation /// Drive is not capable of automation
/// Byte 36 bit 0 /// Byte 36 bit 0
/// </summary> /// </summary>
public bool IBM_AutDis; public bool IBM_AutDis;
/// <summary> /// <summary>
/// If not zero, limit in MB/s = Max * (this / 256) /// If not zero, limit in MB/s = Max * (this / 256)
/// Byte 37 /// Byte 37
/// </summary> /// </summary>
public byte IBM_PerformanceLimit; public byte IBM_PerformanceLimit;
/// <summary> /// <summary>
/// Byte 41 /// Byte 41
/// </summary> /// </summary>
public byte IBM_OEMSpecific; public byte IBM_OEMSpecific;
#endregion IBM vendor unique inquiry data structure #endregion IBM vendor unique inquiry data structure
#region HP vendor unique inquiry data structure #region HP vendor unique inquiry data structure
/// <summary> /// <summary>
/// Means that the INQUIRY response contains 49 bytes or more, so this data has been filled /// Means that the INQUIRY response contains 49 bytes or more, so this data has been filled
/// </summary> /// </summary>
public bool HPPresent; public bool HPPresent;
/// <summary> /// <summary>
/// WORM version /// WORM version
/// Byte 40 bits 7 to 1 /// Byte 40 bits 7 to 1
/// </summary> /// </summary>
public byte HP_WORMVersion; public byte HP_WORMVersion;
/// <summary> /// <summary>
/// WORM supported /// WORM supported
/// Byte 40 bit 0 /// Byte 40 bit 0
/// </summary> /// </summary>
public bool HP_WORM; public bool HP_WORM;
/// <summary> /// <summary>
/// Bytes 43 to 48 /// Bytes 43 to 48
/// </summary> /// </summary>
public byte[] HP_OBDR; public byte[] HP_OBDR;
#endregion HP vendor unique inquiry data structure #endregion HP vendor unique inquiry data structure
#region Seagate vendor unique inquiry data structure #region Seagate vendor unique inquiry data structure
/// <summary> /// <summary>
/// Means that bytes 36 to 43 are filled /// Means that bytes 36 to 43 are filled
/// </summary> /// </summary>
public bool SeagatePresent; public bool SeagatePresent;
/// <summary> /// <summary>
/// Drive Serial Number /// Drive Serial Number
/// Bytes 36 to 43 /// Bytes 36 to 43
/// </summary> /// </summary>
public byte[] Seagate_DriveSerialNumber; public byte[] Seagate_DriveSerialNumber;
/// <summary> /// <summary>
/// Means that bytes 96 to 143 are filled /// Means that bytes 96 to 143 are filled
/// </summary> /// </summary>
public bool Seagate2Present; public bool Seagate2Present;
/// <summary> /// <summary>
/// Contains Seagate copyright notice /// Contains Seagate copyright notice
/// Bytes 96 to 143 /// Bytes 96 to 143
/// </summary> /// </summary>
public byte[] Seagate_Copyright; public byte[] Seagate_Copyright;
/// <summary> /// <summary>
/// Means that bytes 144 to 147 are filled /// Means that bytes 144 to 147 are filled
/// </summary> /// </summary>
public bool Seagate3Present; public bool Seagate3Present;
/// <summary> /// <summary>
/// Reserved Seagate field /// Reserved Seagate field
/// Bytes 144 to 147 /// Bytes 144 to 147
/// </summary> /// </summary>
public byte[] Seagate_ServoPROMPartNo; public byte[] Seagate_ServoPROMPartNo;
#endregion Seagate vendor unique inquiry data structure #endregion Seagate vendor unique inquiry data structure
#region Kreon vendor unique inquiry data structure #region Kreon vendor unique inquiry data structure
/// <summary> /// <summary>
/// Means that firmware is Kreon /// Means that firmware is Kreon
/// </summary> /// </summary>
public bool KreonPresent; public bool KreonPresent;
/// <summary> /// <summary>
/// Kreon identifier /// Kreon identifier
/// Bytes 36 to 40 /// Bytes 36 to 40
/// </summary> /// </summary>
public byte[] KreonIdentifier; public byte[] KreonIdentifier;
/// <summary> /// <summary>
/// Kreon just a 0x20 /// Kreon just a 0x20
/// Bytes 41 /// Bytes 41
/// </summary> /// </summary>
public byte KreonSpace; public byte KreonSpace;
/// <summary> /// <summary>
/// Kreon version string /// Kreon version string
/// Bytes 42 to 46 /// Bytes 42 to 46
/// </summary> /// </summary>
public byte[] KreonVersion; public byte[] KreonVersion;
#endregion Kreon vendor unique inquiry data structure #endregion Kreon vendor unique inquiry data structure

View File

@@ -37,19 +37,19 @@ using System.Text;
namespace DiscImageChef.Decoders.SCSI.MMC namespace DiscImageChef.Decoders.SCSI.MMC
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -60,23 +60,23 @@ namespace DiscImageChef.Decoders.SCSI.MMC
public struct AACSVolumeIdentifier public struct AACSVolumeIdentifier
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Bytes 4 to end /// Bytes 4 to end
/// AACS volume identifier data /// AACS volume identifier data
/// </summary> /// </summary>
public byte[] VolumeIdentifier; public byte[] VolumeIdentifier;
} }
@@ -84,23 +84,23 @@ namespace DiscImageChef.Decoders.SCSI.MMC
public struct AACSMediaSerialNumber public struct AACSMediaSerialNumber
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Bytes 4 to end /// Bytes 4 to end
/// AACS media serial number /// AACS media serial number
/// </summary> /// </summary>
public byte[] MediaSerialNumber; public byte[] MediaSerialNumber;
} }
@@ -108,23 +108,23 @@ namespace DiscImageChef.Decoders.SCSI.MMC
public struct AACSMediaIdentifier public struct AACSMediaIdentifier
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Bytes 4 to end /// Bytes 4 to end
/// AACS media identifier data /// AACS media identifier data
/// </summary> /// </summary>
public byte[] MediaIdentifier; public byte[] MediaIdentifier;
} }
@@ -132,23 +132,23 @@ namespace DiscImageChef.Decoders.SCSI.MMC
public struct AACSMediaKeyBlock public struct AACSMediaKeyBlock
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved; public byte Reserved;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Number of MKB packs available to transfer /// Number of MKB packs available to transfer
/// </summary> /// </summary>
public byte TotalPacks; public byte TotalPacks;
/// <summary> /// <summary>
/// Bytes 4 to end /// Bytes 4 to end
/// AACS media key block packs /// AACS media key block packs
/// </summary> /// </summary>
public byte[] MediaKeyBlockPacks; public byte[] MediaKeyBlockPacks;
} }
@@ -156,23 +156,23 @@ namespace DiscImageChef.Decoders.SCSI.MMC
public struct AACSDataKeys public struct AACSDataKeys
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Bytes 4 to end /// Bytes 4 to end
/// AACS data keys /// AACS data keys
/// </summary> /// </summary>
public byte[] DataKeys; public byte[] DataKeys;
} }
@@ -180,24 +180,24 @@ namespace DiscImageChef.Decoders.SCSI.MMC
public struct AACSLBAExtentsResponse public struct AACSLBAExtentsResponse
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data Length /// Data Length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved; public byte Reserved;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Number of LBA extents the drive can store. /// Number of LBA extents the drive can store.
/// if(MaxLBAExtents == 0 &amp;&amp; DataLength > 2), 256 extents can be stored /// if(MaxLBAExtents == 0 &amp;&amp; DataLength > 2), 256 extents can be stored
/// </summary> /// </summary>
public byte MaxLBAExtents; public byte MaxLBAExtents;
/// <summary> /// <summary>
/// Bytes 4 to end /// Bytes 4 to end
/// LBA Extents /// LBA Extents
/// </summary> /// </summary>
public AACSLBAExtent[] Extents; public AACSLBAExtent[] Extents;
} }
@@ -205,18 +205,18 @@ namespace DiscImageChef.Decoders.SCSI.MMC
public struct AACSLBAExtent public struct AACSLBAExtent
{ {
/// <summary> /// <summary>
/// Bytes 0 to 7 /// Bytes 0 to 7
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte[] Reserved; public byte[] Reserved;
/// <summary> /// <summary>
/// Bytes 8 to 11 /// Bytes 8 to 11
/// Start LBA of extent /// Start LBA of extent
/// </summary> /// </summary>
public uint StartLBA; public uint StartLBA;
/// <summary> /// <summary>
/// Bytes 12 to 15 /// Bytes 12 to 15
/// Extent length /// Extent length
/// </summary> /// </summary>
public uint LBACount; public uint LBACount;
} }

View File

@@ -37,19 +37,19 @@ using System.Text;
namespace DiscImageChef.Decoders.SCSI.MMC namespace DiscImageChef.Decoders.SCSI.MMC
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -60,23 +60,23 @@ namespace DiscImageChef.Decoders.SCSI.MMC
public struct CPRMMediaKeyBlock public struct CPRMMediaKeyBlock
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data Length /// Data Length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved; public byte Reserved;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Number of MKB packs available to transfer /// Number of MKB packs available to transfer
/// </summary> /// </summary>
public byte TotalPacks; public byte TotalPacks;
/// <summary> /// <summary>
/// Byte 4 /// Byte 4
/// MKB Packs /// MKB Packs
/// </summary> /// </summary>
public byte[] MKBPackData; public byte[] MKBPackData;
} }

View File

@@ -37,19 +37,19 @@ using System.Text;
namespace DiscImageChef.Decoders.SCSI.MMC namespace DiscImageChef.Decoders.SCSI.MMC
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -60,123 +60,123 @@ namespace DiscImageChef.Decoders.SCSI.MMC
public struct StandardDiscInformation public struct StandardDiscInformation
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// 32 + OPCTablesNumber*8 /// 32 + OPCTablesNumber*8
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2, bits 7 to 5 /// Byte 2, bits 7 to 5
/// 000b /// 000b
/// </summary> /// </summary>
public byte DataType; public byte DataType;
/// <summary> /// <summary>
/// Byte 2, bit 4 /// Byte 2, bit 4
/// If set, disc is erasable /// If set, disc is erasable
/// </summary> /// </summary>
public bool Erasable; public bool Erasable;
/// <summary> /// <summary>
/// Byte 2, bits 3 to 2 /// Byte 2, bits 3 to 2
/// Status of last session /// Status of last session
/// </summary> /// </summary>
public byte LastSessionStatus; public byte LastSessionStatus;
/// <summary> /// <summary>
/// Byte 2, bits 1 to 0 /// Byte 2, bits 1 to 0
/// Status of disc /// Status of disc
/// </summary> /// </summary>
public byte DiscStatus; public byte DiscStatus;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Number of logical track that contains LBA 0 /// Number of logical track that contains LBA 0
/// </summary> /// </summary>
public byte FirstTrackNumber; public byte FirstTrackNumber;
/// <summary> /// <summary>
/// Byte 9 (MSB) and byte 4 (LSB) /// Byte 9 (MSB) and byte 4 (LSB)
/// Number of sessions /// Number of sessions
/// </summary> /// </summary>
public ushort Sessions; public ushort Sessions;
/// <summary> /// <summary>
/// Byte 10 (MSB) and byte 5 (LSB) /// Byte 10 (MSB) and byte 5 (LSB)
/// Number of first track in last session /// Number of first track in last session
/// </summary> /// </summary>
public ushort FirstTrackLastSession; public ushort FirstTrackLastSession;
/// <summary> /// <summary>
/// Byte 11 (MSB) and byte 6 (LSB) /// Byte 11 (MSB) and byte 6 (LSB)
/// Number of last track in last session /// Number of last track in last session
/// </summary> /// </summary>
public ushort LastTrackLastSession; public ushort LastTrackLastSession;
/// <summary> /// <summary>
/// Byte 7, bit 7 /// Byte 7, bit 7
/// If set, DiscIdentification is valid /// If set, DiscIdentification is valid
/// </summary> /// </summary>
public bool DID_V; public bool DID_V;
/// <summary> /// <summary>
/// Byte 7, bit 6 /// Byte 7, bit 6
/// If set, DiscBarcode is valid /// If set, DiscBarcode is valid
/// </summary> /// </summary>
public bool DBC_V; public bool DBC_V;
/// <summary> /// <summary>
/// Byte 7, bit 5 /// Byte 7, bit 5
/// If set, disc is unrestricted /// If set, disc is unrestricted
/// </summary> /// </summary>
public bool URU; public bool URU;
/// <summary> /// <summary>
/// Byte 7, bit 4 /// Byte 7, bit 4
/// If set DiscApplicationCode is valid /// If set DiscApplicationCode is valid
/// </summary> /// </summary>
public bool DAC_V; public bool DAC_V;
/// <summary> /// <summary>
/// Byte 7, bit 3 /// Byte 7, bit 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public bool Reserved; public bool Reserved;
/// <summary> /// <summary>
/// Byte 7, bit 2 /// Byte 7, bit 2
/// Copy of dirty bit from MRW status /// Copy of dirty bit from MRW status
/// </summary> /// </summary>
public bool Dbit; public bool Dbit;
/// <summary> /// <summary>
/// Byte 7, bits 1 to 0 /// Byte 7, bits 1 to 0
/// Background format status /// Background format status
/// </summary> /// </summary>
public byte BGFormatStatus; public byte BGFormatStatus;
/// <summary> /// <summary>
/// Byte 8 /// Byte 8
/// Disc type code /// Disc type code
/// </summary> /// </summary>
public byte DiscType; public byte DiscType;
/// <summary> /// <summary>
/// Bytes 12 to 15 /// Bytes 12 to 15
/// Disc identification number from PMA /// Disc identification number from PMA
/// </summary> /// </summary>
public uint DiscIdentification; public uint DiscIdentification;
/// <summary> /// <summary>
/// Bytes 16 to 19 /// Bytes 16 to 19
/// Last Session Lead-in Start Address (MSF for CD, LBA for others) /// Last Session Lead-in Start Address (MSF for CD, LBA for others)
/// </summary> /// </summary>
public uint LastSessionLeadInStartLBA; public uint LastSessionLeadInStartLBA;
/// <summary> /// <summary>
/// Bytes 20 to 23 /// Bytes 20 to 23
/// Last Possible Lead-out Start Address (MSF for CD, LBA for others) /// Last Possible Lead-out Start Address (MSF for CD, LBA for others)
/// </summary> /// </summary>
public uint LastPossibleLeadOutStartLBA; public uint LastPossibleLeadOutStartLBA;
/// <summary> /// <summary>
/// Bytes 24 to 31 /// Bytes 24 to 31
/// Disc barcode /// Disc barcode
/// </summary> /// </summary>
public ulong DiscBarcode; public ulong DiscBarcode;
/// <summary> /// <summary>
/// Byte 32 /// Byte 32
/// Disc application code /// Disc application code
/// </summary> /// </summary>
public byte DiscApplicationCode; public byte DiscApplicationCode;
/// <summary> /// <summary>
/// Byte 33 /// Byte 33
/// How many OPC tables are /// How many OPC tables are
/// </summary> /// </summary>
public byte OPCTablesNumber; public byte OPCTablesNumber;
/// <summary> /// <summary>
/// Bytes 34 to end /// Bytes 34 to end
/// OPC tables (8 bytes each) /// OPC tables (8 bytes each)
/// </summary> /// </summary>
public OPCTable[] OPCTables; public OPCTable[] OPCTables;
} }
@@ -184,13 +184,13 @@ namespace DiscImageChef.Decoders.SCSI.MMC
public struct OPCTable public struct OPCTable
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// kilobytes/sec this OPC table applies to /// kilobytes/sec this OPC table applies to
/// </summary> /// </summary>
public ushort Speed; public ushort Speed;
/// <summary> /// <summary>
/// Bytes 2 to 7 /// Bytes 2 to 7
/// OPC values /// OPC values
/// </summary> /// </summary>
public byte[] OPCValues; public byte[] OPCValues;
} }
@@ -198,43 +198,43 @@ namespace DiscImageChef.Decoders.SCSI.MMC
public struct TrackResourcesInformation public struct TrackResourcesInformation
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// 10 /// 10
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2, bits 7 to 5 /// Byte 2, bits 7 to 5
/// 001b /// 001b
/// </summary> /// </summary>
public byte DataType; public byte DataType;
/// <summary> /// <summary>
/// Byte 2, bits 4 to 0 /// Byte 2, bits 4 to 0
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Bytes 4 to 5 /// Bytes 4 to 5
/// Maximum possible number of the tracks on the disc /// Maximum possible number of the tracks on the disc
/// </summary> /// </summary>
public ushort MaxTracks; public ushort MaxTracks;
/// <summary> /// <summary>
/// Bytes 6 to 7 /// Bytes 6 to 7
/// Number of the assigned tracks on the disc /// Number of the assigned tracks on the disc
/// </summary> /// </summary>
public ushort AssignedTracks; public ushort AssignedTracks;
/// <summary> /// <summary>
/// Bytes 8 to 9 /// Bytes 8 to 9
/// Maximum possible number of appendable tracks on the disc /// Maximum possible number of appendable tracks on the disc
/// </summary> /// </summary>
public ushort MaxAppendableTracks; public ushort MaxAppendableTracks;
/// <summary> /// <summary>
/// Bytes 10 to 11 /// Bytes 10 to 11
/// Current number of appendable tracks on the disc /// Current number of appendable tracks on the disc
/// </summary> /// </summary>
public ushort AppendableTracks; public ushort AppendableTracks;
} }
@@ -242,38 +242,38 @@ namespace DiscImageChef.Decoders.SCSI.MMC
public struct POWResourcesInformation public struct POWResourcesInformation
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// 14 /// 14
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2, bits 7 to 5 /// Byte 2, bits 7 to 5
/// 010b /// 010b
/// </summary> /// </summary>
public byte DataType; public byte DataType;
/// <summary> /// <summary>
/// Byte 2, bits 4 to 0 /// Byte 2, bits 4 to 0
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Bytes 4 to 7 /// Bytes 4 to 7
/// Remaining POW replacements /// Remaining POW replacements
/// </summary> /// </summary>
public uint RemainingPOWReplacements; public uint RemainingPOWReplacements;
/// <summary> /// <summary>
/// Bytes 8 to 11 /// Bytes 8 to 11
/// Remaining POW reallocation map entries /// Remaining POW reallocation map entries
/// </summary> /// </summary>
public uint RemainingPOWReallocation; public uint RemainingPOWReallocation;
/// <summary> /// <summary>
/// Bytes 12 to 15 /// Bytes 12 to 15
/// Number of remaining POW updates /// Number of remaining POW updates
/// </summary> /// </summary>
public uint RemainingPOWUpdates; public uint RemainingPOWUpdates;
} }
@@ -415,8 +415,8 @@ namespace DiscImageChef.Decoders.SCSI.MMC
sb.AppendFormat("Last track in last session is track {0}", decoded.LastTrackLastSession).AppendLine(); 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}", 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, (decoded.LastSessionLeadInStartLBA & 0xFF0000) >> 16,
(decoded.LastSessionLeadInStartLBA & 0xFF00) >> 8, (decoded.LastSessionLeadInStartLBA & 0xFF00) >> 8, decoded.LastSessionLeadInStartLBA & 0xFF)
decoded.LastSessionLeadInStartLBA & 0xFF).AppendLine(); .AppendLine();
sb.AppendFormat("Last possible Lead-Out address is {0} (as LBA) or {1:X2}:{2:X2}:{3:X2}", 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, (decoded.LastPossibleLeadOutStartLBA & 0xFF0000) >> 16,
(decoded.LastPossibleLeadOutStartLBA & 0xFF00) >> 8, (decoded.LastPossibleLeadOutStartLBA & 0xFF00) >> 8,

View File

@@ -79,7 +79,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
public enum DiscTypeCodes : byte public enum DiscTypeCodes : byte
{ {
/// <summary> /// <summary>
/// Also valid for CD-DA, DVD and BD /// Also valid for CD-DA, DVD and BD
/// </summary> /// </summary>
CDROM = 0x00, CDROM = 0x00,
CDi = 0x10, CDi = 0x10,

File diff suppressed because it is too large Load Diff

View File

@@ -37,19 +37,19 @@ using System.Text;
namespace DiscImageChef.Decoders.SCSI.MMC namespace DiscImageChef.Decoders.SCSI.MMC
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -60,48 +60,48 @@ namespace DiscImageChef.Decoders.SCSI.MMC
public struct RecognizedFormatLayers public struct RecognizedFormatLayers
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data Length /// Data Length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Byte 4 /// Byte 4
/// Number of format layers in hybrid disc identified by drive /// Number of format layers in hybrid disc identified by drive
/// </summary> /// </summary>
public byte NumberOfLayers; public byte NumberOfLayers;
/// <summary> /// <summary>
/// Byte 5, bits 7 to 6 /// Byte 5, bits 7 to 6
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved3; public byte Reserved3;
/// <summary> /// <summary>
/// Byte 5, bits 5 to 4 /// Byte 5, bits 5 to 4
/// Layer no. used when disc is inserted /// Layer no. used when disc is inserted
/// </summary> /// </summary>
public byte DefaultFormatLayer; public byte DefaultFormatLayer;
/// <summary> /// <summary>
/// Byte 5, bits 3 to 2 /// Byte 5, bits 3 to 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved4; public byte Reserved4;
/// <summary> /// <summary>
/// Byte 5, bits 1 to 0 /// Byte 5, bits 1 to 0
/// Layer no. currently in use /// Layer no. currently in use
/// </summary> /// </summary>
public byte OnlineFormatLayer; public byte OnlineFormatLayer;
/// <summary> /// <summary>
/// Bytes 6 to end /// Bytes 6 to end
/// Recognized format layers /// Recognized format layers
/// </summary> /// </summary>
public ushort[] FormatLayers; public ushort[] FormatLayers;
} }
@@ -127,7 +127,8 @@ namespace DiscImageChef.Decoders.SCSI.MMC
decoded.FormatLayers = new ushort[(FormatLayersResponse.Length - 6) / 2]; decoded.FormatLayers = new ushort[(FormatLayersResponse.Length - 6) / 2];
for(int i = 0; i < (FormatLayersResponse.Length - 6) / 2; i++) decoded.FormatLayers[i] = BigEndianBitConverter.ToUInt16(FormatLayersResponse, i * 2 + 6); for(int i = 0; i < (FormatLayersResponse.Length - 6) / 2; i++)
decoded.FormatLayers[i] = BigEndianBitConverter.ToUInt16(FormatLayersResponse, i * 2 + 6);
return decoded; return decoded;
} }

View File

@@ -37,19 +37,19 @@ using System.Text;
namespace DiscImageChef.Decoders.SCSI.MMC namespace DiscImageChef.Decoders.SCSI.MMC
{ {
/// <summary> /// <summary>
/// Information from the following standards: /// Information from the following standards:
/// ANSI X3.304-1997 /// ANSI X3.304-1997
/// T10/1048-D revision 9.0 /// T10/1048-D revision 9.0
/// T10/1048-D revision 10a /// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c /// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a /// T10/1228-D revision 11a
/// T10/1363-D revision 10g /// T10/1363-D revision 10g
/// T10/1545-D revision 1d /// T10/1545-D revision 1d
/// T10/1545-D revision 5 /// T10/1545-D revision 5
/// T10/1545-D revision 5a /// T10/1545-D revision 5a
/// T10/1675-D revision 2c /// T10/1675-D revision 2c
/// T10/1675-D revision 4 /// T10/1675-D revision 4
/// T10/1836-D revision 2g /// T10/1836-D revision 2g
/// </summary> /// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")] [SuppressMessage("ReSharper", "MemberCanBeInternal")]
@@ -60,58 +60,58 @@ namespace DiscImageChef.Decoders.SCSI.MMC
public struct WriteProtectionStatus public struct WriteProtectionStatus
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data Length /// Data Length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Byte 4, bits 7 to 4 /// Byte 4, bits 7 to 4
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved3; public byte Reserved3;
/// <summary> /// <summary>
/// Byte 4, bit 3 /// Byte 4, bit 3
/// Writing inhibited by media specific reason /// Writing inhibited by media specific reason
/// </summary> /// </summary>
public bool MSWI; public bool MSWI;
/// <summary> /// <summary>
/// Byte 4, bit 2 /// Byte 4, bit 2
/// Cartridge sets write protection /// Cartridge sets write protection
/// </summary> /// </summary>
public bool CWP; public bool CWP;
/// <summary> /// <summary>
/// Byte 4, bit 1 /// Byte 4, bit 1
/// Media surface sets write protection /// Media surface sets write protection
/// </summary> /// </summary>
public bool PWP; public bool PWP;
/// <summary> /// <summary>
/// Byte 4, bit 0 /// Byte 4, bit 0
/// Software write protection until power down /// Software write protection until power down
/// </summary> /// </summary>
public bool SWPP; public bool SWPP;
/// <summary> /// <summary>
/// Byte 5 /// Byte 5
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved4; public byte Reserved4;
/// <summary> /// <summary>
/// Byte 6 /// Byte 6
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved5; public byte Reserved5;
/// <summary> /// <summary>
/// Byte 7 /// Byte 7
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved6; public byte Reserved6;
} }

View File

@@ -42,30 +42,30 @@ namespace DiscImageChef.Decoders.SCSI
{ {
#region Mode Page 0x00: Drive Operation Mode page #region Mode Page 0x00: Drive Operation Mode page
/// <summary> /// <summary>
/// Drive Operation Mode page /// Drive Operation Mode page
/// Page code 0x00 /// Page code 0x00
/// 4 bytes in INF-8070 /// 4 bytes in INF-8070
/// </summary> /// </summary>
public struct ModePage_00_SFF public struct ModePage_00_SFF
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// Select LUN Mode /// Select LUN Mode
/// </summary> /// </summary>
public bool SLM; public bool SLM;
/// <summary> /// <summary>
/// Select LUN for rewritable /// Select LUN for rewritable
/// </summary> /// </summary>
public bool SLR; public bool SLR;
/// <summary> /// <summary>
/// Disable verify for WRITE /// Disable verify for WRITE
/// </summary> /// </summary>
public bool DVW; public bool DVW;
/// <summary> /// <summary>
/// Disable deferred error /// Disable deferred error
/// </summary> /// </summary>
public bool DDE; public bool DDE;
} }

View File

@@ -42,75 +42,75 @@ namespace DiscImageChef.Decoders.SCSI
{ {
#region Mode Page 0x01: Read-write error recovery page #region Mode Page 0x01: Read-write error recovery page
/// <summary> /// <summary>
/// Disconnect-reconnect page /// Disconnect-reconnect page
/// Page code 0x01 /// Page code 0x01
/// 12 bytes in SCSI-2, SBC-1, SBC-2 /// 12 bytes in SCSI-2, SBC-1, SBC-2
/// </summary> /// </summary>
public struct ModePage_01 public struct ModePage_01
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// Automatic Write Reallocation Enabled /// Automatic Write Reallocation Enabled
/// </summary> /// </summary>
public bool AWRE; public bool AWRE;
/// <summary> /// <summary>
/// Automatic Read Reallocation Enabled /// Automatic Read Reallocation Enabled
/// </summary> /// </summary>
public bool ARRE; public bool ARRE;
/// <summary> /// <summary>
/// Transfer block /// Transfer block
/// </summary> /// </summary>
public bool TB; public bool TB;
/// <summary> /// <summary>
/// Read continuous /// Read continuous
/// </summary> /// </summary>
public bool RC; public bool RC;
/// <summary> /// <summary>
/// Enable early recovery /// Enable early recovery
/// </summary> /// </summary>
public bool EER; public bool EER;
/// <summary> /// <summary>
/// Post error reporting /// Post error reporting
/// </summary> /// </summary>
public bool PER; public bool PER;
/// <summary> /// <summary>
/// Disable transfer on error /// Disable transfer on error
/// </summary> /// </summary>
public bool DTE; public bool DTE;
/// <summary> /// <summary>
/// Disable correction /// Disable correction
/// </summary> /// </summary>
public bool DCR; public bool DCR;
/// <summary> /// <summary>
/// How many times to retry a read operation /// How many times to retry a read operation
/// </summary> /// </summary>
public byte ReadRetryCount; public byte ReadRetryCount;
/// <summary> /// <summary>
/// How many bits of largest data burst error is maximum to apply error correction on it /// How many bits of largest data burst error is maximum to apply error correction on it
/// </summary> /// </summary>
public byte CorrectionSpan; public byte CorrectionSpan;
/// <summary> /// <summary>
/// Offset to move the heads /// Offset to move the heads
/// </summary> /// </summary>
public sbyte HeadOffsetCount; public sbyte HeadOffsetCount;
/// <summary> /// <summary>
/// Incremental position to which the recovered data strobe shall be adjusted /// Incremental position to which the recovered data strobe shall be adjusted
/// </summary> /// </summary>
public sbyte DataStrobeOffsetCount; public sbyte DataStrobeOffsetCount;
/// <summary> /// <summary>
/// How many times to retry a write operation /// How many times to retry a write operation
/// </summary> /// </summary>
public byte WriteRetryCount; public byte WriteRetryCount;
/// <summary> /// <summary>
/// Maximum time in ms to use in data error recovery procedures /// Maximum time in ms to use in data error recovery procedures
/// </summary> /// </summary>
public ushort RecoveryTimeLimit; public ushort RecoveryTimeLimit;
/// <summary> /// <summary>
/// Logical block provisioning error reporting is enabled /// Logical block provisioning error reporting is enabled
/// </summary> /// </summary>
public bool LBPERE; public bool LBPERE;
} }
@@ -189,37 +189,38 @@ namespace DiscImageChef.Decoders.SCSI
return sb.ToString(); return sb.ToString();
} }
#endregion Mode Page 0x01: Read-write error recovery page #endregion Mode Page 0x01: Read-write error recovery page
public static byte[] EncodeModePage_01(ModePage_01 page)
{
byte[] pg = new byte[8];
pg[0] = 0x01; public static byte[] EncodeModePage_01(ModePage_01 page)
pg[1] = 6; {
byte[] pg = new byte[8];
if(page.PS) pg[0] += 0x80; pg[0] = 0x01;
if(page.AWRE) pg[2] += 0x80; pg[1] = 6;
if(page.ARRE) pg[2] += 0x40;
if(page.TB) pg[2] += 0x20;
if(page.RC) pg[2] += 0x10;
if(page.EER) pg[2] += 0x08;
if(page.PER) pg[2] += 0x04;
if(page.DTE) pg[2] += 0x02;
if(page.DCR) pg[2] += 0x01;
pg[3] = page.ReadRetryCount; if(page.PS) pg[0] += 0x80;
pg[4] = page.CorrectionSpan; if(page.AWRE) pg[2] += 0x80;
pg[5] = (byte)page.HeadOffsetCount; if(page.ARRE) pg[2] += 0x40;
pg[6] = (byte)page.DataStrobeOffsetCount; if(page.TB) pg[2] += 0x20;
if(page.RC) pg[2] += 0x10;
if(page.EER) pg[2] += 0x08;
if(page.PER) pg[2] += 0x04;
if(page.DTE) pg[2] += 0x02;
if(page.DCR) pg[2] += 0x01;
// This is from a newer version of SCSI unknown what happen for drives expecting an 8 byte page pg[3] = page.ReadRetryCount;
/* pg[4] = page.CorrectionSpan;
pg[8] = page.WriteRetryCount; pg[5] = (byte)page.HeadOffsetCount;
if (page.LBPERE) pg[6] = (byte)page.DataStrobeOffsetCount;
pg[7] += 0x80;
pg[10] = (byte)((page.RecoveryTimeLimit & 0xFF00) << 8);
pg[11] = (byte)(page.RecoveryTimeLimit & 0xFF);*/
return pg; // This is from a newer version of SCSI unknown what happen for drives expecting an 8 byte page
} /*
pg[8] = page.WriteRetryCount;
if (page.LBPERE)
pg[7] += 0x80;
pg[10] = (byte)((page.RecoveryTimeLimit & 0xFF00) << 8);
pg[11] = (byte)(page.RecoveryTimeLimit & 0xFF);*/
return pg;
}
} }
} }

View File

@@ -42,31 +42,31 @@ namespace DiscImageChef.Decoders.SCSI
{ {
#region Mode Page 0x01: Read error recovery page for MultiMedia Devices #region Mode Page 0x01: Read error recovery page for MultiMedia Devices
/// <summary> /// <summary>
/// Read error recovery page for MultiMedia Devices /// Read error recovery page for MultiMedia Devices
/// Page code 0x01 /// Page code 0x01
/// 8 bytes in SCSI-2, MMC-1 /// 8 bytes in SCSI-2, MMC-1
/// 12 bytes in MMC-2, MMC-3 /// 12 bytes in MMC-2, MMC-3
/// </summary> /// </summary>
public struct ModePage_01_MMC public struct ModePage_01_MMC
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// Error recovery parameter /// Error recovery parameter
/// </summary> /// </summary>
public byte Parameter; public byte Parameter;
/// <summary> /// <summary>
/// How many times to retry a read operation /// How many times to retry a read operation
/// </summary> /// </summary>
public byte ReadRetryCount; public byte ReadRetryCount;
/// <summary> /// <summary>
/// How many times to retry a write operation /// How many times to retry a write operation
/// </summary> /// </summary>
public byte WriteRetryCount; public byte WriteRetryCount;
/// <summary> /// <summary>
/// Maximum time in ms to use in data error recovery procedures /// Maximum time in ms to use in data error recovery procedures
/// </summary> /// </summary>
public ushort RecoveryTimeLimit; public ushort RecoveryTimeLimit;
} }
@@ -195,24 +195,25 @@ namespace DiscImageChef.Decoders.SCSI
return sb.ToString(); return sb.ToString();
} }
#endregion Mode Page 0x01: Read error recovery page for MultiMedia Devices #endregion Mode Page 0x01: Read error recovery page for MultiMedia Devices
public static byte[] EncodeModePage_01_MMC(ModePage_01_MMC page)
{
byte[] pg = new byte[12];
pg[0] = 0x01; public static byte[] EncodeModePage_01_MMC(ModePage_01_MMC page)
pg[1] = 10; {
byte[] pg = new byte[12];
if(page.PS) pg[0] += 0x80; pg[0] = 0x01;
pg[2] = page.Parameter; pg[1] = 10;
pg[3] = page.ReadRetryCount;
// This is from a newer version of SCSI unknown what happen for drives expecting an 8 byte page if(page.PS) pg[0] += 0x80;
pg[2] = page.Parameter;
pg[3] = page.ReadRetryCount;
pg[8] = page.WriteRetryCount; // This is from a newer version of SCSI unknown what happen for drives expecting an 8 byte page
pg[10] = (byte)((page.RecoveryTimeLimit & 0xFF00) << 8);
pg[11] = (byte)(page.RecoveryTimeLimit & 0xFF);
return pg; pg[8] = page.WriteRetryCount;
} pg[10] = (byte)((page.RecoveryTimeLimit & 0xFF00) << 8);
pg[11] = (byte)(page.RecoveryTimeLimit & 0xFF);
return pg;
}
} }
} }

View File

@@ -42,59 +42,60 @@ namespace DiscImageChef.Decoders.SCSI
{ {
#region Mode Page 0x02: Disconnect-reconnect page #region Mode Page 0x02: Disconnect-reconnect page
/// <summary> /// <summary>
/// Disconnect-reconnect page /// Disconnect-reconnect page
/// Page code 0x02 /// Page code 0x02
/// 16 bytes in SCSI-2, SPC-1, SPC-2, SPC-3, SPC-4, SPC-5 /// 16 bytes in SCSI-2, SPC-1, SPC-2, SPC-3, SPC-4, SPC-5
/// </summary> /// </summary>
public struct ModePage_02 public struct ModePage_02
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// How full should be the buffer prior to attempting a reselection /// How full should be the buffer prior to attempting a reselection
/// </summary> /// </summary>
public byte BufferFullRatio; public byte BufferFullRatio;
/// <summary> /// <summary>
/// How empty should be the buffer prior to attempting a reselection /// How empty should be the buffer prior to attempting a reselection
/// </summary> /// </summary>
public byte BufferEmptyRatio; public byte BufferEmptyRatio;
/// <summary> /// <summary>
/// Max. time in 100 µs increments that the target is permitted to assert BSY without a REQ/ACK /// Max. time in 100 µs increments that the target is permitted to assert BSY without a REQ/ACK
/// </summary> /// </summary>
public ushort BusInactivityLimit; public ushort BusInactivityLimit;
/// <summary> /// <summary>
/// Min. time in 100 µs increments to wait after releasing the bus before attempting reselection /// Min. time in 100 µs increments to wait after releasing the bus before attempting reselection
/// </summary> /// </summary>
public ushort DisconnectTimeLimit; public ushort DisconnectTimeLimit;
/// <summary> /// <summary>
/// Max. time in 100 µs increments allowed to use the bus before disconnecting, if granted the privilege and not restricted by <see cref="DTDC"/> /// Max. time in 100 µs increments allowed to use the bus before disconnecting, if granted the privilege and not
/// restricted by <see cref="DTDC" />
/// </summary> /// </summary>
public ushort ConnectTimeLimit; public ushort ConnectTimeLimit;
/// <summary> /// <summary>
/// Maximum amount of data before disconnecting in 512 bytes increments /// Maximum amount of data before disconnecting in 512 bytes increments
/// </summary> /// </summary>
public ushort MaxBurstSize; public ushort MaxBurstSize;
/// <summary> /// <summary>
/// Data transfer disconnect control /// Data transfer disconnect control
/// </summary> /// </summary>
public byte DTDC; public byte DTDC;
/// <summary> /// <summary>
/// Target shall not transfer data for a command during the same interconnect tenancy /// Target shall not transfer data for a command during the same interconnect tenancy
/// </summary> /// </summary>
public bool DIMM; public bool DIMM;
/// <summary> /// <summary>
/// Wether to use fair or unfair arbitration when requesting an interconnect tenancy /// Wether to use fair or unfair arbitration when requesting an interconnect tenancy
/// </summary> /// </summary>
public byte FairArbitration; public byte FairArbitration;
/// <summary> /// <summary>
/// Max. ammount of data in 512 bytes increments that may be transferred for a command along with the command /// Max. ammount of data in 512 bytes increments that may be transferred for a command along with the command
/// </summary> /// </summary>
public ushort FirstBurstSize; public ushort FirstBurstSize;
/// <summary> /// <summary>
/// Target is allowed to re-order the data transfer /// Target is allowed to re-order the data transfer
/// </summary> /// </summary>
public bool EMDP; public bool EMDP;
} }

View File

@@ -42,67 +42,67 @@ namespace DiscImageChef.Decoders.SCSI
{ {
#region Mode Page 0x03: Format device page #region Mode Page 0x03: Format device page
/// <summary> /// <summary>
/// Disconnect-reconnect page /// Disconnect-reconnect page
/// Page code 0x03 /// Page code 0x03
/// 24 bytes in SCSI-2, SBC-1 /// 24 bytes in SCSI-2, SBC-1
/// </summary> /// </summary>
public struct ModePage_03 public struct ModePage_03
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// Tracks per zone to use in dividing the capacity for the purpose of allocating alternate sectors /// Tracks per zone to use in dividing the capacity for the purpose of allocating alternate sectors
/// </summary> /// </summary>
public ushort TracksPerZone; public ushort TracksPerZone;
/// <summary> /// <summary>
/// Number of sectors per zone that shall be reserved for defect handling /// Number of sectors per zone that shall be reserved for defect handling
/// </summary> /// </summary>
public ushort AltSectorsPerZone; public ushort AltSectorsPerZone;
/// <summary> /// <summary>
/// Number of tracks per zone that shall be reserved for defect handling /// Number of tracks per zone that shall be reserved for defect handling
/// </summary> /// </summary>
public ushort AltTracksPerZone; public ushort AltTracksPerZone;
/// <summary> /// <summary>
/// Number of tracks per LUN that shall be reserved for defect handling /// Number of tracks per LUN that shall be reserved for defect handling
/// </summary> /// </summary>
public ushort AltTracksPerLun; public ushort AltTracksPerLun;
/// <summary> /// <summary>
/// Number of physical sectors per track /// Number of physical sectors per track
/// </summary> /// </summary>
public ushort SectorsPerTrack; public ushort SectorsPerTrack;
/// <summary> /// <summary>
/// Bytes per physical sector /// Bytes per physical sector
/// </summary> /// </summary>
public ushort BytesPerSector; public ushort BytesPerSector;
/// <summary> /// <summary>
/// Interleave value, target dependent /// Interleave value, target dependent
/// </summary> /// </summary>
public ushort Interleave; public ushort Interleave;
/// <summary> /// <summary>
/// Sectors between last block of one track and first block of the next /// Sectors between last block of one track and first block of the next
/// </summary> /// </summary>
public ushort TrackSkew; public ushort TrackSkew;
/// <summary> /// <summary>
/// Sectors between last block of a cylinder and first block of the next one /// Sectors between last block of a cylinder and first block of the next one
/// </summary> /// </summary>
public ushort CylinderSkew; public ushort CylinderSkew;
/// <summary> /// <summary>
/// Soft-sectored /// Soft-sectored
/// </summary> /// </summary>
public bool SSEC; public bool SSEC;
/// <summary> /// <summary>
/// Hard-sectored /// Hard-sectored
/// </summary> /// </summary>
public bool HSEC; public bool HSEC;
/// <summary> /// <summary>
/// Removable /// Removable
/// </summary> /// </summary>
public bool RMB; public bool RMB;
/// <summary> /// <summary>
/// If set, address are allocated progressively in a surface before going to the next. /// If set, address are allocated progressively in a surface before going to the next.
/// Otherwise, it goes by cylinders /// Otherwise, it goes by cylinders
/// </summary> /// </summary>
public bool SURF; public bool SURF;
} }

View File

@@ -42,50 +42,50 @@ namespace DiscImageChef.Decoders.SCSI
{ {
#region Mode Page 0x04: Rigid disk drive geometry page #region Mode Page 0x04: Rigid disk drive geometry page
/// <summary> /// <summary>
/// Disconnect-reconnect page /// Disconnect-reconnect page
/// Page code 0x04 /// Page code 0x04
/// 24 bytes in SCSI-2, SBC-1 /// 24 bytes in SCSI-2, SBC-1
/// </summary> /// </summary>
public struct ModePage_04 public struct ModePage_04
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// Cylinders used for data storage /// Cylinders used for data storage
/// </summary> /// </summary>
public uint Cylinders; public uint Cylinders;
/// <summary> /// <summary>
/// Heads for reading and/or writing /// Heads for reading and/or writing
/// </summary> /// </summary>
public byte Heads; public byte Heads;
/// <summary> /// <summary>
/// Cylinder where write precompensation starts /// Cylinder where write precompensation starts
/// </summary> /// </summary>
public uint WritePrecompCylinder; public uint WritePrecompCylinder;
/// <summary> /// <summary>
/// Cylinder where write current reduction starts /// Cylinder where write current reduction starts
/// </summary> /// </summary>
public uint WriteReduceCylinder; public uint WriteReduceCylinder;
/// <summary> /// <summary>
/// Step rate in 100 ns units /// Step rate in 100 ns units
/// </summary> /// </summary>
public ushort DriveStepRate; public ushort DriveStepRate;
/// <summary> /// <summary>
/// Cylinder where the heads park /// Cylinder where the heads park
/// </summary> /// </summary>
public int LandingCylinder; public int LandingCylinder;
/// <summary> /// <summary>
/// Rotational position locking /// Rotational position locking
/// </summary> /// </summary>
public byte RPL; public byte RPL;
/// <summary> /// <summary>
/// Rotational skew to apply when synchronized /// Rotational skew to apply when synchronized
/// </summary> /// </summary>
public byte RotationalOffset; public byte RotationalOffset;
/// <summary> /// <summary>
/// Medium speed in rpm /// Medium speed in rpm
/// </summary> /// </summary>
public ushort MediumRotationRate; public ushort MediumRotationRate;
} }

View File

@@ -42,115 +42,115 @@ namespace DiscImageChef.Decoders.SCSI
{ {
#region Mode Page 0x05: Flexible disk page #region Mode Page 0x05: Flexible disk page
/// <summary> /// <summary>
/// Disconnect-reconnect page /// Disconnect-reconnect page
/// Page code 0x05 /// Page code 0x05
/// 32 bytes in SCSI-2, SBC-1 /// 32 bytes in SCSI-2, SBC-1
/// </summary> /// </summary>
public struct ModePage_05 public struct ModePage_05
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// Data rate of peripheral device on kbit/s /// Data rate of peripheral device on kbit/s
/// </summary> /// </summary>
public ushort TransferRate; public ushort TransferRate;
/// <summary> /// <summary>
/// Heads for reading and/or writing /// Heads for reading and/or writing
/// </summary> /// </summary>
public byte Heads; public byte Heads;
/// <summary> /// <summary>
/// Sectors per revolution per head /// Sectors per revolution per head
/// </summary> /// </summary>
public byte SectorsPerTrack; public byte SectorsPerTrack;
/// <summary> /// <summary>
/// Bytes of data per sector /// Bytes of data per sector
/// </summary> /// </summary>
public ushort BytesPerSector; public ushort BytesPerSector;
/// <summary> /// <summary>
/// Cylinders used for data storage /// Cylinders used for data storage
/// </summary> /// </summary>
public ushort Cylinders; public ushort Cylinders;
/// <summary> /// <summary>
/// Cylinder where write precompensation starts /// Cylinder where write precompensation starts
/// </summary> /// </summary>
public ushort WritePrecompCylinder; public ushort WritePrecompCylinder;
/// <summary> /// <summary>
/// Cylinder where write current reduction starts /// Cylinder where write current reduction starts
/// </summary> /// </summary>
public ushort WriteReduceCylinder; public ushort WriteReduceCylinder;
/// <summary> /// <summary>
/// Step rate in 100 μs units /// Step rate in 100 μs units
/// </summary> /// </summary>
public ushort DriveStepRate; public ushort DriveStepRate;
/// <summary> /// <summary>
/// Width of step pulse in μs /// Width of step pulse in μs
/// </summary> /// </summary>
public byte DriveStepPulse; public byte DriveStepPulse;
/// <summary> /// <summary>
/// Head settle time in 100 μs units /// Head settle time in 100 μs units
/// </summary> /// </summary>
public ushort HeadSettleDelay; public ushort HeadSettleDelay;
/// <summary> /// <summary>
/// If <see cref="TRDY"/> is <c>true</c>, specified in 1/10s of a /// If <see cref="TRDY" /> is <c>true</c>, specified in 1/10s of a
/// second the time waiting for read status before aborting medium /// second the time waiting for read status before aborting medium
/// access. Otherwise, indicates time to way before medimum access /// access. Otherwise, indicates time to way before medimum access
/// after motor on signal is asserted. /// after motor on signal is asserted.
/// </summary> /// </summary>
public byte MotorOnDelay; public byte MotorOnDelay;
/// <summary> /// <summary>
/// Time in 1/10s of a second to wait before releasing the motor on /// Time in 1/10s of a second to wait before releasing the motor on
/// signal after an idle condition. 0xFF means to never release the /// signal after an idle condition. 0xFF means to never release the
/// signal /// signal
/// </summary> /// </summary>
public byte MotorOffDelay; public byte MotorOffDelay;
/// <summary> /// <summary>
/// Specifies if a signal indicates that the medium is ready to be accessed /// Specifies if a signal indicates that the medium is ready to be accessed
/// </summary> /// </summary>
public bool TRDY; public bool TRDY;
/// <summary> /// <summary>
/// If <c>true</c> sectors start with one. Otherwise, they start with zero. /// If <c>true</c> sectors start with one. Otherwise, they start with zero.
/// </summary> /// </summary>
public bool SSN; public bool SSN;
/// <summary> /// <summary>
/// If <c>true</c> specifies that motor on shall remain released. /// If <c>true</c> specifies that motor on shall remain released.
/// </summary> /// </summary>
public bool MO; public bool MO;
/// <summary> /// <summary>
/// Number of additional step pulses per cylinder. /// Number of additional step pulses per cylinder.
/// </summary> /// </summary>
public byte SPC; public byte SPC;
/// <summary> /// <summary>
/// Write compensation value /// Write compensation value
/// </summary> /// </summary>
public byte WriteCompensation; public byte WriteCompensation;
/// <summary> /// <summary>
/// Head loading time in ms. /// Head loading time in ms.
/// </summary> /// </summary>
public byte HeadLoadDelay; public byte HeadLoadDelay;
/// <summary> /// <summary>
/// Head unloading time in ms. /// Head unloading time in ms.
/// </summary> /// </summary>
public byte HeadUnloadDelay; public byte HeadUnloadDelay;
/// <summary> /// <summary>
/// Description of shugart's bus pin 34 usage /// Description of shugart's bus pin 34 usage
/// </summary> /// </summary>
public byte Pin34; public byte Pin34;
/// <summary> /// <summary>
/// Description of shugart's bus pin 2 usage /// Description of shugart's bus pin 2 usage
/// </summary> /// </summary>
public byte Pin2; public byte Pin2;
/// <summary> /// <summary>
/// Description of shugart's bus pin 4 usage /// Description of shugart's bus pin 4 usage
/// </summary> /// </summary>
public byte Pin4; public byte Pin4;
/// <summary> /// <summary>
/// Description of shugart's bus pin 1 usage /// Description of shugart's bus pin 1 usage
/// </summary> /// </summary>
public byte Pin1; public byte Pin1;
/// <summary> /// <summary>
/// Medium speed in rpm /// Medium speed in rpm
/// </summary> /// </summary>
public ushort MediumRotationRate; public ushort MediumRotationRate;
} }

View File

@@ -40,61 +40,61 @@ namespace DiscImageChef.Decoders.SCSI
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")] [SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
public static partial class Modes public static partial class Modes
{ {
#region Mode Page 0x06: Optical memory page #region Mode Page 0x06: Optical memory page
/// <summary>
/// Optical memory page
/// Page code 0x06
/// 4 bytes in SCSI-2
/// </summary>
public struct ModePage_06
{
/// <summary> /// <summary>
/// Parameters can be saved /// Optical memory page
/// Page code 0x06
/// 4 bytes in SCSI-2
/// </summary> /// </summary>
public bool PS; public struct ModePage_06
/// <summary> {
/// Report updated block read /// <summary>
/// </summary> /// Parameters can be saved
public bool RUBR; /// </summary>
} public bool PS;
/// <summary>
/// Report updated block read
/// </summary>
public bool RUBR;
}
public static ModePage_06? DecodeModePage_06(byte[] pageResponse) public static ModePage_06? DecodeModePage_06(byte[] pageResponse)
{ {
if((pageResponse?[0] & 0x40) == 0x40) return null; if((pageResponse?[0] & 0x40) == 0x40) return null;
if((pageResponse?[0] & 0x3F) != 0x06) return null; if((pageResponse?[0] & 0x3F) != 0x06) return null;
if(pageResponse[1] + 2 != pageResponse.Length) return null; if(pageResponse[1] + 2 != pageResponse.Length) return null;
if(pageResponse.Length < 4) return null; if(pageResponse.Length < 4) return null;
ModePage_06 decoded = new ModePage_06(); ModePage_06 decoded = new ModePage_06();
decoded.PS |= (pageResponse[0] & 0x80) == 0x80; decoded.PS |= (pageResponse[0] & 0x80) == 0x80;
decoded.RUBR |= (pageResponse[2] & 0x01) == 0x01; decoded.RUBR |= (pageResponse[2] & 0x01) == 0x01;
return decoded; return decoded;
} }
public static string PrettifyModePage_06(byte[] pageResponse) public static string PrettifyModePage_06(byte[] pageResponse)
{ {
return PrettifyModePage_06(DecodeModePage_06(pageResponse)); return PrettifyModePage_06(DecodeModePage_06(pageResponse));
} }
public static string PrettifyModePage_06(ModePage_06? modePage) public static string PrettifyModePage_06(ModePage_06? modePage)
{ {
if(!modePage.HasValue) return null; if(!modePage.HasValue) return null;
ModePage_06 page = modePage.Value; ModePage_06 page = modePage.Value;
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.AppendLine("SCSI optical memory:"); sb.AppendLine("SCSI optical memory:");
if(page.PS) sb.AppendLine("\tParameters can be saved"); if(page.PS) sb.AppendLine("\tParameters can be saved");
if(page.RUBR) sb.AppendLine("\tOn reading an updated block drive will return RECOVERED ERROR"); if(page.RUBR) sb.AppendLine("\tOn reading an updated block drive will return RECOVERED ERROR");
return sb.ToString(); return sb.ToString();
} }
#endregion Mode Page 0x06: Optical memory page #endregion Mode Page 0x06: Optical memory page
} }
} }

View File

@@ -43,42 +43,42 @@ namespace DiscImageChef.Decoders.SCSI
{ {
#region Mode Page 0x07: Verify error recovery page #region Mode Page 0x07: Verify error recovery page
/// <summary> /// <summary>
/// Disconnect-reconnect page /// Disconnect-reconnect page
/// Page code 0x07 /// Page code 0x07
/// 12 bytes in SCSI-2, SBC-1, SBC-2 /// 12 bytes in SCSI-2, SBC-1, SBC-2
/// </summary> /// </summary>
public struct ModePage_07 public struct ModePage_07
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// Enable early recovery /// Enable early recovery
/// </summary> /// </summary>
public bool EER; public bool EER;
/// <summary> /// <summary>
/// Post error reporting /// Post error reporting
/// </summary> /// </summary>
public bool PER; public bool PER;
/// <summary> /// <summary>
/// Disable transfer on error /// Disable transfer on error
/// </summary> /// </summary>
public bool DTE; public bool DTE;
/// <summary> /// <summary>
/// Disable correction /// Disable correction
/// </summary> /// </summary>
public bool DCR; public bool DCR;
/// <summary> /// <summary>
/// How many times to retry a verify operation /// How many times to retry a verify operation
/// </summary> /// </summary>
public byte VerifyRetryCount; public byte VerifyRetryCount;
/// <summary> /// <summary>
/// How many bits of largest data burst error is maximum to apply error correction on it /// How many bits of largest data burst error is maximum to apply error correction on it
/// </summary> /// </summary>
public byte CorrectionSpan; public byte CorrectionSpan;
/// <summary> /// <summary>
/// Maximum time in ms to use in data error recovery procedures /// Maximum time in ms to use in data error recovery procedures
/// </summary> /// </summary>
public ushort RecoveryTimeLimit; public ushort RecoveryTimeLimit;
} }

View File

@@ -42,22 +42,22 @@ namespace DiscImageChef.Decoders.SCSI
{ {
#region Mode Page 0x07: Verify error recovery page for MultiMedia Devices #region Mode Page 0x07: Verify error recovery page for MultiMedia Devices
/// <summary> /// <summary>
/// Verify error recovery page for MultiMedia Devices /// Verify error recovery page for MultiMedia Devices
/// Page code 0x07 /// Page code 0x07
/// 8 bytes in SCSI-2, MMC-1 /// 8 bytes in SCSI-2, MMC-1
/// </summary> /// </summary>
public struct ModePage_07_MMC public struct ModePage_07_MMC
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// Error recovery parameter /// Error recovery parameter
/// </summary> /// </summary>
public byte Parameter; public byte Parameter;
/// <summary> /// <summary>
/// How many times to retry a verify operation /// How many times to retry a verify operation
/// </summary> /// </summary>
public byte VerifyRetryCount; public byte VerifyRetryCount;
} }

View File

@@ -42,96 +42,96 @@ namespace DiscImageChef.Decoders.SCSI
{ {
#region Mode Page 0x08: Caching page #region Mode Page 0x08: Caching page
/// <summary> /// <summary>
/// Disconnect-reconnect page /// Disconnect-reconnect page
/// Page code 0x08 /// Page code 0x08
/// 12 bytes in SCSI-2 /// 12 bytes in SCSI-2
/// 20 bytes in SBC-1, SBC-2, SBC-3 /// 20 bytes in SBC-1, SBC-2, SBC-3
/// </summary> /// </summary>
public struct ModePage_08 public struct ModePage_08
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// <c>true</c> if write cache is enabled /// <c>true</c> if write cache is enabled
/// </summary> /// </summary>
public bool WCE; public bool WCE;
/// <summary> /// <summary>
/// Multiplication factor /// Multiplication factor
/// </summary> /// </summary>
public bool MF; public bool MF;
/// <summary> /// <summary>
/// <c>true</c> if read cache is enabled /// <c>true</c> if read cache is enabled
/// </summary> /// </summary>
public bool RCD; public bool RCD;
/// <summary> /// <summary>
/// Advices on reading-cache retention priority /// Advices on reading-cache retention priority
/// </summary> /// </summary>
public byte DemandReadRetentionPrio; public byte DemandReadRetentionPrio;
/// <summary> /// <summary>
/// Advices on writing-cache retention priority /// Advices on writing-cache retention priority
/// </summary> /// </summary>
public byte WriteRetentionPriority; public byte WriteRetentionPriority;
/// <summary> /// <summary>
/// If requested read blocks are more than this, no pre-fetch is done /// If requested read blocks are more than this, no pre-fetch is done
/// </summary> /// </summary>
public ushort DisablePreFetch; public ushort DisablePreFetch;
/// <summary> /// <summary>
/// Minimum pre-fetch /// Minimum pre-fetch
/// </summary> /// </summary>
public ushort MinimumPreFetch; public ushort MinimumPreFetch;
/// <summary> /// <summary>
/// Maximum pre-fetch /// Maximum pre-fetch
/// </summary> /// </summary>
public ushort MaximumPreFetch; public ushort MaximumPreFetch;
/// <summary> /// <summary>
/// Upper limit on maximum pre-fetch value /// Upper limit on maximum pre-fetch value
/// </summary> /// </summary>
public ushort MaximumPreFetchCeiling; public ushort MaximumPreFetchCeiling;
/// <summary> /// <summary>
/// Manual cache controlling /// Manual cache controlling
/// </summary> /// </summary>
public bool IC; public bool IC;
/// <summary> /// <summary>
/// Abort pre-fetch /// Abort pre-fetch
/// </summary> /// </summary>
public bool ABPF; public bool ABPF;
/// <summary> /// <summary>
/// Caching analysis permitted /// Caching analysis permitted
/// </summary> /// </summary>
public bool CAP; public bool CAP;
/// <summary> /// <summary>
/// Pre-fetch over discontinuities /// Pre-fetch over discontinuities
/// </summary> /// </summary>
public bool Disc; public bool Disc;
/// <summary> /// <summary>
/// <see cref="CacheSegmentSize"/> is to be used to control caching segmentation /// <see cref="CacheSegmentSize" /> is to be used to control caching segmentation
/// </summary> /// </summary>
public bool Size; public bool Size;
/// <summary> /// <summary>
/// Force sequential write /// Force sequential write
/// </summary> /// </summary>
public bool FSW; public bool FSW;
/// <summary> /// <summary>
/// Logical block cache segment size /// Logical block cache segment size
/// </summary> /// </summary>
public bool LBCSS; public bool LBCSS;
/// <summary> /// <summary>
/// Disable read-ahead /// Disable read-ahead
/// </summary> /// </summary>
public bool DRA; public bool DRA;
/// <summary> /// <summary>
/// How many segments should the cache be divided upon /// How many segments should the cache be divided upon
/// </summary> /// </summary>
public byte CacheSegments; public byte CacheSegments;
/// <summary> /// <summary>
/// How many bytes should the cache be divided upon /// How many bytes should the cache be divided upon
/// </summary> /// </summary>
public ushort CacheSegmentSize; public ushort CacheSegmentSize;
/// <summary> /// <summary>
/// How many bytes should be used as a buffer when all other cached data cannot be evicted /// How many bytes should be used as a buffer when all other cached data cannot be evicted
/// </summary> /// </summary>
public uint NonCacheSegmentSize; public uint NonCacheSegmentSize;

View File

@@ -42,123 +42,125 @@ namespace DiscImageChef.Decoders.SCSI
{ {
#region Mode Page 0x0A: Control mode page #region Mode Page 0x0A: Control mode page
/// <summary> /// <summary>
/// Control mode page /// Control mode page
/// Page code 0x0A /// Page code 0x0A
/// 8 bytes in SCSI-2 /// 8 bytes in SCSI-2
/// 12 bytes in SPC-1, SPC-2, SPC-3, SPC-4, SPC-5 /// 12 bytes in SPC-1, SPC-2, SPC-3, SPC-4, SPC-5
/// </summary> /// </summary>
public struct ModePage_0A public struct ModePage_0A
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// If set, target shall report log exception conditions /// If set, target shall report log exception conditions
/// </summary> /// </summary>
public bool RLEC; public bool RLEC;
/// <summary> /// <summary>
/// Queue algorithm modifier /// Queue algorithm modifier
/// </summary> /// </summary>
public byte QueueAlgorithm; public byte QueueAlgorithm;
/// <summary> /// <summary>
/// If set all remaining suspended I/O processes shall be aborted after the contingent allegiance condition or extended contingent allegiance condition /// If set all remaining suspended I/O processes shall be aborted after the contingent allegiance condition or extended
/// contingent allegiance condition
/// </summary> /// </summary>
public byte QErr; public byte QErr;
/// <summary> /// <summary>
/// Tagged queuing is disabled /// Tagged queuing is disabled
/// </summary> /// </summary>
public bool DQue; public bool DQue;
/// <summary> /// <summary>
/// Extended Contingent Allegiance is enabled /// Extended Contingent Allegiance is enabled
/// </summary> /// </summary>
public bool EECA; public bool EECA;
/// <summary> /// <summary>
/// Target may issue an asynchronous event notification upon completing its initialization /// Target may issue an asynchronous event notification upon completing its initialization
/// </summary> /// </summary>
public bool RAENP; public bool RAENP;
/// <summary> /// <summary>
/// Target may issue an asynchronous event notification instead of a unit attention condition /// Target may issue an asynchronous event notification instead of a unit attention condition
/// </summary> /// </summary>
public bool UAAENP; public bool UAAENP;
/// <summary> /// <summary>
/// Target may issue an asynchronous event notification instead of a deferred error /// Target may issue an asynchronous event notification instead of a deferred error
/// </summary> /// </summary>
public bool EAENP; public bool EAENP;
/// <summary> /// <summary>
/// Minimum time in ms after initialization before attempting asynchronous event notifications /// Minimum time in ms after initialization before attempting asynchronous event notifications
/// </summary> /// </summary>
public ushort ReadyAENHoldOffPeriod; public ushort ReadyAENHoldOffPeriod;
/// <summary> /// <summary>
/// Global logging target save disabled /// Global logging target save disabled
/// </summary> /// </summary>
public bool GLTSD; public bool GLTSD;
/// <summary> /// <summary>
/// CHECK CONDITION should be reported rather than a long busy condition /// CHECK CONDITION should be reported rather than a long busy condition
/// </summary> /// </summary>
public bool RAC; public bool RAC;
/// <summary> /// <summary>
/// Software write protect is active /// Software write protect is active
/// </summary> /// </summary>
public bool SWP; public bool SWP;
/// <summary> /// <summary>
/// Maximum time in 100 ms units allowed to remain busy. 0xFFFF == unlimited. /// Maximum time in 100 ms units allowed to remain busy. 0xFFFF == unlimited.
/// </summary> /// </summary>
public ushort BusyTimeoutPeriod; public ushort BusyTimeoutPeriod;
/// <summary> /// <summary>
/// Task set type /// Task set type
/// </summary> /// </summary>
public byte TST; public byte TST;
/// <summary> /// <summary>
/// Tasks aborted by other initiator's actions should be terminated with TASK ABORTED /// Tasks aborted by other initiator's actions should be terminated with TASK ABORTED
/// </summary> /// </summary>
public bool TAS; public bool TAS;
/// <summary> /// <summary>
/// Action to be taken when a medium is inserted /// Action to be taken when a medium is inserted
/// </summary> /// </summary>
public byte AutoloadMode; public byte AutoloadMode;
/// <summary> /// <summary>
/// Time in seconds to complete an extended self-test /// Time in seconds to complete an extended self-test
/// </summary> /// </summary>
public byte ExtendedSelfTestCompletionTime; public byte ExtendedSelfTestCompletionTime;
/// <summary> /// <summary>
/// All tasks received in nexus with ACA ACTIVE is set and an ACA condition is established shall terminate /// All tasks received in nexus with ACA ACTIVE is set and an ACA condition is established shall terminate
/// </summary> /// </summary>
public bool TMF_ONLY; public bool TMF_ONLY;
/// <summary> /// <summary>
/// Device shall return descriptor format sense data when returning sense data in the same transactions as a CHECK CONDITION /// Device shall return descriptor format sense data when returning sense data in the same transactions as a CHECK
/// CONDITION
/// </summary> /// </summary>
public bool D_SENSE; public bool D_SENSE;
/// <summary> /// <summary>
/// Unit attention interlocks control /// Unit attention interlocks control
/// </summary> /// </summary>
public byte UA_INTLCK_CTRL; public byte UA_INTLCK_CTRL;
/// <summary> /// <summary>
/// LOGICAL BLOCK APPLICATION TAG should not be modified /// LOGICAL BLOCK APPLICATION TAG should not be modified
/// </summary> /// </summary>
public bool ATO; public bool ATO;
/// <summary> /// <summary>
/// Protector information checking is disabled /// Protector information checking is disabled
/// </summary> /// </summary>
public bool DPICZ; public bool DPICZ;
/// <summary> /// <summary>
/// No unit attention on release /// No unit attention on release
/// </summary> /// </summary>
public bool NUAR; public bool NUAR;
/// <summary> /// <summary>
/// Application Tag mode page is enabled /// Application Tag mode page is enabled
/// </summary> /// </summary>
public bool ATMPE; public bool ATMPE;
/// <summary> /// <summary>
/// Abort any write command without protection information /// Abort any write command without protection information
/// </summary> /// </summary>
public bool RWWP; public bool RWWP;
/// <summary> /// <summary>
/// Supportes block lengths and protection information /// Supportes block lengths and protection information
/// </summary> /// </summary>
public bool SBLP; public bool SBLP;
} }
@@ -355,40 +357,40 @@ namespace DiscImageChef.Decoders.SCSI
#region Mode Page 0x0A subpage 0x01: Control Extension mode page #region Mode Page 0x0A subpage 0x01: Control Extension mode page
/// <summary> /// <summary>
/// Control Extension mode page /// Control Extension mode page
/// Page code 0x0A /// Page code 0x0A
/// Subpage code 0x01 /// Subpage code 0x01
/// 32 bytes in SPC-3, SPC-4, SPC-5 /// 32 bytes in SPC-3, SPC-4, SPC-5
/// </summary> /// </summary>
public struct ModePage_0A_S01 public struct ModePage_0A_S01
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// Timestamp outside this standard /// Timestamp outside this standard
/// </summary> /// </summary>
public bool TCMOS; public bool TCMOS;
/// <summary> /// <summary>
/// SCSI precedence /// SCSI precedence
/// </summary> /// </summary>
public bool SCSIP; public bool SCSIP;
/// <summary> /// <summary>
/// Implicit Asymmetric Logical Unit Access Enabled /// Implicit Asymmetric Logical Unit Access Enabled
/// </summary> /// </summary>
public bool IALUAE; public bool IALUAE;
/// <summary> /// <summary>
/// Initial task priority /// Initial task priority
/// </summary> /// </summary>
public byte InitialPriority; public byte InitialPriority;
/// <summary> /// <summary>
/// Device life control disabled /// Device life control disabled
/// </summary> /// </summary>
public bool DLC; public bool DLC;
/// <summary> /// <summary>
/// Maximum size of SENSE data in bytes /// Maximum size of SENSE data in bytes
/// </summary> /// </summary>
public byte MaximumSenseLength; public byte MaximumSenseLength;
} }
@@ -455,5 +457,5 @@ namespace DiscImageChef.Decoders.SCSI
return sb.ToString(); return sb.ToString();
} }
#endregion Mode Page 0x0A subpage 0x01: Control Extension mode page #endregion Mode Page 0x0A subpage 0x01: Control Extension mode page
} }
} }

View File

@@ -42,14 +42,14 @@ namespace DiscImageChef.Decoders.SCSI
{ {
#region Mode Page 0x0B: Medium types supported page #region Mode Page 0x0B: Medium types supported page
/// <summary> /// <summary>
/// Disconnect-reconnect page /// Disconnect-reconnect page
/// Page code 0x0B /// Page code 0x0B
/// 8 bytes in SCSI-2 /// 8 bytes in SCSI-2
/// </summary> /// </summary>
public struct ModePage_0B public struct ModePage_0B
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
public MediumTypes MediumType1; public MediumTypes MediumType1;

View File

@@ -34,8 +34,8 @@ namespace DiscImageChef.Decoders.SCSI
{ {
public static partial class Modes public static partial class Modes
{ {
#region Mode Page 0x0C: Notch page #region Mode Page 0x0C: Notch page
// TODO: Implement this page // TODO: Implement this page
#endregion Mode Page 0x0C: Notch page #endregion Mode Page 0x0C: Notch page
} }
} }

View File

@@ -42,26 +42,26 @@ namespace DiscImageChef.Decoders.SCSI
{ {
#region Mode Page 0x0D: CD-ROM parameteres page #region Mode Page 0x0D: CD-ROM parameteres page
/// <summary> /// <summary>
/// CD-ROM parameteres page /// CD-ROM parameteres page
/// Page code 0x0D /// Page code 0x0D
/// 8 bytes in SCSI-2, MMC-1, MMC-2, MMC-3 /// 8 bytes in SCSI-2, MMC-1, MMC-2, MMC-3
/// </summary> /// </summary>
public struct ModePage_0D public struct ModePage_0D
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// Time the drive shall remain in hold track state after seek or read /// Time the drive shall remain in hold track state after seek or read
/// </summary> /// </summary>
public byte InactivityTimerMultiplier; public byte InactivityTimerMultiplier;
/// <summary> /// <summary>
/// Seconds per Minute /// Seconds per Minute
/// </summary> /// </summary>
public ushort SecondsPerMinute; public ushort SecondsPerMinute;
/// <summary> /// <summary>
/// Frames per Second /// Frames per Second
/// </summary> /// </summary>
public ushort FramesPerSecond; public ushort FramesPerSecond;
} }

View File

@@ -42,66 +42,66 @@ namespace DiscImageChef.Decoders.SCSI
{ {
#region Mode Page 0x0E: CD-ROM audio control parameters page #region Mode Page 0x0E: CD-ROM audio control parameters page
/// <summary> /// <summary>
/// CD-ROM audio control parameters /// CD-ROM audio control parameters
/// Page code 0x0E /// Page code 0x0E
/// 16 bytes in SCSI-2, MMC-1, MMC-2, MMC-3 /// 16 bytes in SCSI-2, MMC-1, MMC-2, MMC-3
/// </summary> /// </summary>
public struct ModePage_0E public struct ModePage_0E
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// Return status as soon as playback operation starts /// Return status as soon as playback operation starts
/// </summary> /// </summary>
public bool Immed; public bool Immed;
/// <summary> /// <summary>
/// Stop on track crossing /// Stop on track crossing
/// </summary> /// </summary>
public bool SOTC; public bool SOTC;
/// <summary> /// <summary>
/// Indicates <see cref="BlocksPerSecondOfAudio"/> is valid /// Indicates <see cref="BlocksPerSecondOfAudio" /> is valid
/// </summary> /// </summary>
public bool APRVal; public bool APRVal;
/// <summary> /// <summary>
/// Multiplier for <see cref="BlocksPerSecondOfAudio"/> /// Multiplier for <see cref="BlocksPerSecondOfAudio" />
/// </summary> /// </summary>
public byte LBAFormat; public byte LBAFormat;
/// <summary> /// <summary>
/// LBAs per second of audio /// LBAs per second of audio
/// </summary> /// </summary>
public ushort BlocksPerSecondOfAudio; public ushort BlocksPerSecondOfAudio;
/// <summary> /// <summary>
/// Channels output on this port /// Channels output on this port
/// </summary> /// </summary>
public byte OutputPort0ChannelSelection; public byte OutputPort0ChannelSelection;
/// <summary> /// <summary>
/// Volume level for this port /// Volume level for this port
/// </summary> /// </summary>
public byte OutputPort0Volume; public byte OutputPort0Volume;
/// <summary> /// <summary>
/// Channels output on this port /// Channels output on this port
/// </summary> /// </summary>
public byte OutputPort1ChannelSelection; public byte OutputPort1ChannelSelection;
/// <summary> /// <summary>
/// Volume level for this port /// Volume level for this port
/// </summary> /// </summary>
public byte OutputPort1Volume; public byte OutputPort1Volume;
/// <summary> /// <summary>
/// Channels output on this port /// Channels output on this port
/// </summary> /// </summary>
public byte OutputPort2ChannelSelection; public byte OutputPort2ChannelSelection;
/// <summary> /// <summary>
/// Volume level for this port /// Volume level for this port
/// </summary> /// </summary>
public byte OutputPort2Volume; public byte OutputPort2Volume;
/// <summary> /// <summary>
/// Channels output on this port /// Channels output on this port
/// </summary> /// </summary>
public byte OutputPort3ChannelSelection; public byte OutputPort3ChannelSelection;
/// <summary> /// <summary>
/// Volume level for this port /// Volume level for this port
/// </summary> /// </summary>
public byte OutputPort3Volume; public byte OutputPort3Volume;
} }

View File

@@ -42,38 +42,38 @@ namespace DiscImageChef.Decoders.SCSI
{ {
#region Mode Page 0x0F: Data compression page #region Mode Page 0x0F: Data compression page
/// <summary> /// <summary>
/// Data compression page /// Data compression page
/// Page code 0x0F /// Page code 0x0F
/// 16 bytes in SSC-1, SSC-2, SSC-3 /// 16 bytes in SSC-1, SSC-2, SSC-3
/// </summary> /// </summary>
public struct ModePage_0F public struct ModePage_0F
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// Data compression enabled /// Data compression enabled
/// </summary> /// </summary>
public bool DCE; public bool DCE;
/// <summary> /// <summary>
/// Data compression capable /// Data compression capable
/// </summary> /// </summary>
public bool DCC; public bool DCC;
/// <summary> /// <summary>
/// Data decompression enabled /// Data decompression enabled
/// </summary> /// </summary>
public bool DDE; public bool DDE;
/// <summary> /// <summary>
/// Report exception on decompression /// Report exception on decompression
/// </summary> /// </summary>
public byte RED; public byte RED;
/// <summary> /// <summary>
/// Compression algorithm /// Compression algorithm
/// </summary> /// </summary>
public uint CompressionAlgo; public uint CompressionAlgo;
/// <summary> /// <summary>
/// Decompression algorithm /// Decompression algorithm
/// </summary> /// </summary>
public uint DecompressionAlgo; public uint DecompressionAlgo;
} }

View File

@@ -42,34 +42,34 @@ namespace DiscImageChef.Decoders.SCSI
{ {
#region Mode Page 0x10: XOR control mode page #region Mode Page 0x10: XOR control mode page
/// <summary> /// <summary>
/// XOR control mode page /// XOR control mode page
/// Page code 0x10 /// Page code 0x10
/// 24 bytes in SBC-1, SBC-2 /// 24 bytes in SBC-1, SBC-2
/// </summary> /// </summary>
public struct ModePage_10 public struct ModePage_10
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// Disables XOR operations /// Disables XOR operations
/// </summary> /// </summary>
public bool XORDIS; public bool XORDIS;
/// <summary> /// <summary>
/// Maximum transfer length in blocks for a XOR command /// Maximum transfer length in blocks for a XOR command
/// </summary> /// </summary>
public uint MaxXorWrite; public uint MaxXorWrite;
/// <summary> /// <summary>
/// Maximum regenerate length in blocks /// Maximum regenerate length in blocks
/// </summary> /// </summary>
public uint MaxRegenSize; public uint MaxRegenSize;
/// <summary> /// <summary>
/// Maximum transfer length in blocks for READ during a rebuild /// Maximum transfer length in blocks for READ during a rebuild
/// </summary> /// </summary>
public uint MaxRebuildRead; public uint MaxRebuildRead;
/// <summary> /// <summary>
/// Minimum time in ms between READs during a rebuild /// Minimum time in ms between READs during a rebuild
/// </summary> /// </summary>
public ushort RebuildDelay; public ushort RebuildDelay;
} }

View File

@@ -40,113 +40,113 @@ namespace DiscImageChef.Decoders.SCSI
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")] [SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
public static partial class Modes public static partial class Modes
{ {
#region Mode Page 0x10: Device configuration page #region Mode Page 0x10: Device configuration page
/// <summary> /// <summary>
/// Device configuration page /// Device configuration page
/// Page code 0x10 /// Page code 0x10
/// 16 bytes in SCSI-2, SSC-1, SSC-2, SSC-3 /// 16 bytes in SCSI-2, SSC-1, SSC-2, SSC-3
/// </summary> /// </summary>
public struct ModePage_10_SSC public struct ModePage_10_SSC
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// Used in mode select to change partition to one specified in <see cref="ActivePartition"/> /// Used in mode select to change partition to one specified in <see cref="ActivePartition" />
/// </summary> /// </summary>
public bool CAP; public bool CAP;
/// <summary> /// <summary>
/// Used in mode select to change format to one specified in <see cref="ActiveFormat"/> /// Used in mode select to change format to one specified in <see cref="ActiveFormat" />
/// </summary> /// </summary>
public bool CAF; public bool CAF;
/// <summary> /// <summary>
/// Active format, vendor-specific /// Active format, vendor-specific
/// </summary> /// </summary>
public byte ActiveFormat; public byte ActiveFormat;
/// <summary> /// <summary>
/// Current logical partition /// Current logical partition
/// </summary> /// </summary>
public byte ActivePartition; public byte ActivePartition;
/// <summary> /// <summary>
/// How full the buffer shall be before writing to medium /// How full the buffer shall be before writing to medium
/// </summary> /// </summary>
public byte WriteBufferFullRatio; public byte WriteBufferFullRatio;
/// <summary> /// <summary>
/// How empty the buffer shall be before reading more data from the medium /// How empty the buffer shall be before reading more data from the medium
/// </summary> /// </summary>
public byte ReadBufferEmptyRatio; public byte ReadBufferEmptyRatio;
/// <summary> /// <summary>
/// Delay in 100 ms before buffered data is forcefully written to the medium even before buffer is full /// Delay in 100 ms before buffered data is forcefully written to the medium even before buffer is full
/// </summary> /// </summary>
public ushort WriteDelayTime; public ushort WriteDelayTime;
/// <summary> /// <summary>
/// Drive supports recovering data from buffer /// Drive supports recovering data from buffer
/// </summary> /// </summary>
public bool DBR; public bool DBR;
/// <summary> /// <summary>
/// Medium has block IDs /// Medium has block IDs
/// </summary> /// </summary>
public bool BIS; public bool BIS;
/// <summary> /// <summary>
/// Drive recognizes and reports setmarks /// Drive recognizes and reports setmarks
/// </summary> /// </summary>
public bool RSmk; public bool RSmk;
/// <summary> /// <summary>
/// Drive selects best speed /// Drive selects best speed
/// </summary> /// </summary>
public bool AVC; public bool AVC;
/// <summary> /// <summary>
/// If drive should stop pre-reading on filemarks /// If drive should stop pre-reading on filemarks
/// </summary> /// </summary>
public byte SOCF; public byte SOCF;
/// <summary> /// <summary>
/// If set, recovered buffer data is LIFO, otherwise, FIFO /// If set, recovered buffer data is LIFO, otherwise, FIFO
/// </summary> /// </summary>
public bool RBO; public bool RBO;
/// <summary> /// <summary>
/// Report early warnings /// Report early warnings
/// </summary> /// </summary>
public bool REW; public bool REW;
/// <summary> /// <summary>
/// Inter-block gap /// Inter-block gap
/// </summary> /// </summary>
public byte GapSize; public byte GapSize;
/// <summary> /// <summary>
/// End-of-Data format /// End-of-Data format
/// </summary> /// </summary>
public byte EODDefined; public byte EODDefined;
/// <summary> /// <summary>
/// EOD generation enabled /// EOD generation enabled
/// </summary> /// </summary>
public bool EEG; public bool EEG;
/// <summary> /// <summary>
/// Synchronize data to medium on early warning /// Synchronize data to medium on early warning
/// </summary> /// </summary>
public bool SEW; public bool SEW;
/// <summary> /// <summary>
/// Bytes to reduce buffer size on early warning /// Bytes to reduce buffer size on early warning
/// </summary> /// </summary>
public uint BufferSizeEarlyWarning; public uint BufferSizeEarlyWarning;
/// <summary> /// <summary>
/// Selected data compression algorithm /// Selected data compression algorithm
/// </summary> /// </summary>
public byte SelectedCompression; public byte SelectedCompression;
/// <summary> /// <summary>
/// Soft write protect /// Soft write protect
/// </summary> /// </summary>
public bool SWP; public bool SWP;
/// <summary> /// <summary>
/// Associated write protect /// Associated write protect
/// </summary> /// </summary>
public bool ASOCWP; public bool ASOCWP;
/// <summary> /// <summary>
/// Persistent write protect /// Persistent write protect
/// </summary> /// </summary>
public bool PERSWP; public bool PERSWP;
/// <summary> /// <summary>
/// Permanent write protect /// Permanent write protect
/// </summary> /// </summary>
public bool PRMWP; public bool PRMWP;
@@ -155,11 +155,11 @@ namespace DiscImageChef.Decoders.SCSI
public byte RewindOnReset; public byte RewindOnReset;
/// <summary> /// <summary>
/// How drive shall respond to detection of compromised WORM medium integrity /// How drive shall respond to detection of compromised WORM medium integrity
/// </summary> /// </summary>
public byte WTRE; public byte WTRE;
/// <summary> /// <summary>
/// Respond to commands only if a reservation exists /// Respond to commands only if a reservation exists
/// </summary> /// </summary>
public bool OIR; public bool OIR;
} }

View File

@@ -45,19 +45,19 @@ namespace DiscImageChef.Decoders.SCSI
public enum PartitionSizeUnitOfMeasures : byte public enum PartitionSizeUnitOfMeasures : byte
{ {
/// <summary> /// <summary>
/// Partition size is measures in bytes /// Partition size is measures in bytes
/// </summary> /// </summary>
Bytes = 0, Bytes = 0,
/// <summary> /// <summary>
/// Partition size is measures in Kilobytes /// Partition size is measures in Kilobytes
/// </summary> /// </summary>
Kilobytes = 1, Kilobytes = 1,
/// <summary> /// <summary>
/// Partition size is measures in Megabytes /// Partition size is measures in Megabytes
/// </summary> /// </summary>
Megabytes = 2, Megabytes = 2,
/// <summary> /// <summary>
/// Partition size is 10eUNITS bytes /// Partition size is 10eUNITS bytes
/// </summary> /// </summary>
Exponential = 3 Exponential = 3
} }
@@ -65,67 +65,67 @@ namespace DiscImageChef.Decoders.SCSI
public enum MediumFormatRecognitionValues : byte public enum MediumFormatRecognitionValues : byte
{ {
/// <summary> /// <summary>
/// Logical unit is incapable of format or partition recognition /// Logical unit is incapable of format or partition recognition
/// </summary> /// </summary>
Incapable = 0, Incapable = 0,
/// <summary> /// <summary>
/// Logical unit is capable of format recognition only /// Logical unit is capable of format recognition only
/// </summary> /// </summary>
FormatCapable = 1, FormatCapable = 1,
/// <summary> /// <summary>
/// Logical unit is capable of partition recognition only /// Logical unit is capable of partition recognition only
/// </summary> /// </summary>
PartitionCapable = 2, PartitionCapable = 2,
/// <summary> /// <summary>
/// Logical unit is capable of both format and partition recognition /// Logical unit is capable of both format and partition recognition
/// </summary> /// </summary>
Capable = 3 Capable = 3
} }
/// <summary> /// <summary>
/// Medium partition page(1) /// Medium partition page(1)
/// Page code 0x11 /// Page code 0x11
/// </summary> /// </summary>
public struct ModePage_11 public struct ModePage_11
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// Maximum number of additional partitions supported /// Maximum number of additional partitions supported
/// </summary> /// </summary>
public byte MaxAdditionalPartitions; public byte MaxAdditionalPartitions;
/// <summary> /// <summary>
/// Number of additional partitions to be defined for a volume /// Number of additional partitions to be defined for a volume
/// </summary> /// </summary>
public byte AdditionalPartitionsDefined; public byte AdditionalPartitionsDefined;
/// <summary> /// <summary>
/// Device defines partitions based on its fixed definition /// Device defines partitions based on its fixed definition
/// </summary> /// </summary>
public bool FDP; public bool FDP;
/// <summary> /// <summary>
/// Device should divide medium according to the additional partitions defined field using sizes defined by device /// Device should divide medium according to the additional partitions defined field using sizes defined by device
/// </summary> /// </summary>
public bool SDP; public bool SDP;
/// <summary> /// <summary>
/// Initiator defines number and size of partitions /// Initiator defines number and size of partitions
/// </summary> /// </summary>
public bool IDP; public bool IDP;
/// <summary> /// <summary>
/// Defines the unit on which the partition sizes are defined /// Defines the unit on which the partition sizes are defined
/// </summary> /// </summary>
public PartitionSizeUnitOfMeasures PSUM; public PartitionSizeUnitOfMeasures PSUM;
public bool POFM; public bool POFM;
public bool CLEAR; public bool CLEAR;
public bool ADDP; public bool ADDP;
/// <summary> /// <summary>
/// Defines the capabilities for the unit to recognize media partitions and format /// Defines the capabilities for the unit to recognize media partitions and format
/// </summary> /// </summary>
public MediumFormatRecognitionValues MediumFormatRecognition; public MediumFormatRecognitionValues MediumFormatRecognition;
public byte PartitionUnits; public byte PartitionUnits;
/// <summary> /// <summary>
/// Array of partition sizes in units defined above /// Array of partition sizes in units defined above
/// </summary> /// </summary>
public ushort[] PartitionSizes; public ushort[] PartitionSizes;
} }
@@ -196,8 +196,7 @@ namespace DiscImageChef.Decoders.SCSI
sb.AppendLine("\tDevice shall erase all partitions on MODE SELECT for partitioning"); sb.AppendLine("\tDevice shall erase all partitions on MODE SELECT for partitioning");
else if(!page.CLEAR) else if(!page.CLEAR)
sb.AppendLine("\tDevice shall not erase any partition on MODE SELECT for partitioning"); sb.AppendLine("\tDevice shall not erase any partition on MODE SELECT for partitioning");
else else sb.AppendLine("\tDevice shall erase all partitions differing on size on MODE SELECT for partitioning");
sb.AppendLine("\tDevice shall erase all partitions differing on size on MODE SELECT for partitioning");
string measure; string measure;

View File

@@ -42,17 +42,17 @@ namespace DiscImageChef.Decoders.SCSI
{ {
#region Mode Pages 0x12, 0x13, 0x14: Medium partition page (2-4) #region Mode Pages 0x12, 0x13, 0x14: Medium partition page (2-4)
/// <summary> /// <summary>
/// Medium partition page (2-4) /// Medium partition page (2-4)
/// Page codes 0x12, 0x13 and 0x14 /// Page codes 0x12, 0x13 and 0x14
/// </summary> /// </summary>
public struct ModePage_12_13_14 public struct ModePage_12_13_14
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// Array of partition sizes in units defined in mode page 11 /// Array of partition sizes in units defined in mode page 11
/// </summary> /// </summary>
public ushort[] PartitionSizes; public ushort[] PartitionSizes;
} }

View File

@@ -42,60 +42,60 @@ namespace DiscImageChef.Decoders.SCSI
{ {
#region Mode Page 0x1A: Power condition page #region Mode Page 0x1A: Power condition page
/// <summary> /// <summary>
/// Power condition page /// Power condition page
/// Page code 0x1A /// Page code 0x1A
/// 12 bytes in SPC-1, SPC-2, SPC-3, SPC-4 /// 12 bytes in SPC-1, SPC-2, SPC-3, SPC-4
/// 40 bytes in SPC-5 /// 40 bytes in SPC-5
/// </summary> /// </summary>
public struct ModePage_1A public struct ModePage_1A
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// Idle timer activated /// Idle timer activated
/// </summary> /// </summary>
public bool Idle; public bool Idle;
/// <summary> /// <summary>
/// Standby timer activated /// Standby timer activated
/// </summary> /// </summary>
public bool Standby; public bool Standby;
/// <summary> /// <summary>
/// Idle timer /// Idle timer
/// </summary> /// </summary>
public uint IdleTimer; public uint IdleTimer;
/// <summary> /// <summary>
/// Standby timer /// Standby timer
/// </summary> /// </summary>
public uint StandbyTimer; public uint StandbyTimer;
/// <summary> /// <summary>
/// Interactions between background functions and power management /// Interactions between background functions and power management
/// </summary> /// </summary>
public byte PM_BG_Precedence; public byte PM_BG_Precedence;
/// <summary> /// <summary>
/// Standby timer Y activated /// Standby timer Y activated
/// </summary> /// </summary>
public bool Standby_Y; public bool Standby_Y;
/// <summary> /// <summary>
/// Idle timer B activated /// Idle timer B activated
/// </summary> /// </summary>
public bool Idle_B; public bool Idle_B;
/// <summary> /// <summary>
/// Idle timer C activated /// Idle timer C activated
/// </summary> /// </summary>
public bool Idle_C; public bool Idle_C;
/// <summary> /// <summary>
/// Idle timer B /// Idle timer B
/// </summary> /// </summary>
public uint IdleTimer_B; public uint IdleTimer_B;
/// <summary> /// <summary>
/// Idle timer C /// Idle timer C
/// </summary> /// </summary>
public uint IdleTimer_C; public uint IdleTimer_C;
/// <summary> /// <summary>
/// Standby timer Y /// Standby timer Y
/// </summary> /// </summary>
public uint StandbyTimer_Y; public uint StandbyTimer_Y;
public byte CCF_Idle; public byte CCF_Idle;
@@ -200,23 +200,23 @@ namespace DiscImageChef.Decoders.SCSI
#region Mode Page 0x1A subpage 0x01: Power Consumption mode page #region Mode Page 0x1A subpage 0x01: Power Consumption mode page
/// <summary> /// <summary>
/// Power Consumption mode page /// Power Consumption mode page
/// Page code 0x1A /// Page code 0x1A
/// Subpage code 0x01 /// Subpage code 0x01
/// 16 bytes in SPC-5 /// 16 bytes in SPC-5
/// </summary> /// </summary>
public struct ModePage_1A_S01 public struct ModePage_1A_S01
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// Active power level /// Active power level
/// </summary> /// </summary>
public byte ActiveLevel; public byte ActiveLevel;
/// <summary> /// <summary>
/// Power Consumption VPD identifier in use /// Power Consumption VPD identifier in use
/// </summary> /// </summary>
public byte PowerConsumptionIdentifier; public byte PowerConsumptionIdentifier;
} }

View File

@@ -42,34 +42,34 @@ namespace DiscImageChef.Decoders.SCSI
{ {
#region Mode Page 0x1B: Removable Block Access Capabilities page #region Mode Page 0x1B: Removable Block Access Capabilities page
/// <summary> /// <summary>
/// Removable Block Access Capabilities page /// Removable Block Access Capabilities page
/// Page code 0x1B /// Page code 0x1B
/// 12 bytes in INF-8070 /// 12 bytes in INF-8070
/// </summary> /// </summary>
public struct ModePage_1B public struct ModePage_1B
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// Supports reporting progress of format /// Supports reporting progress of format
/// </summary> /// </summary>
public bool SRFP; public bool SRFP;
/// <summary> /// <summary>
/// Non-CD Optical Device /// Non-CD Optical Device
/// </summary> /// </summary>
public bool NCD; public bool NCD;
/// <summary> /// <summary>
/// Phase change dual device supporting a CD and a Non-CD Optical devices /// Phase change dual device supporting a CD and a Non-CD Optical devices
/// </summary> /// </summary>
public bool SML; public bool SML;
/// <summary> /// <summary>
/// Total number of LUNs /// Total number of LUNs
/// </summary> /// </summary>
public byte TLUN; public byte TLUN;
/// <summary> /// <summary>
/// System Floppy Type device /// System Floppy Type device
/// </summary> /// </summary>
public bool SFLP; public bool SFLP;
} }

View File

@@ -42,56 +42,56 @@ namespace DiscImageChef.Decoders.SCSI
{ {
#region Mode Page 0x1C: Informational exceptions control page #region Mode Page 0x1C: Informational exceptions control page
/// <summary> /// <summary>
/// Informational exceptions control page /// Informational exceptions control page
/// Page code 0x1C /// Page code 0x1C
/// 12 bytes in SPC-1, SPC-2, SPC-3, SPC-4 /// 12 bytes in SPC-1, SPC-2, SPC-3, SPC-4
/// </summary> /// </summary>
public struct ModePage_1C public struct ModePage_1C
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// Informational exception operations should not affect performance /// Informational exception operations should not affect performance
/// </summary> /// </summary>
public bool Perf; public bool Perf;
/// <summary> /// <summary>
/// Disable informational exception operations /// Disable informational exception operations
/// </summary> /// </summary>
public bool DExcpt; public bool DExcpt;
/// <summary> /// <summary>
/// Create a test device failure at next interval time /// Create a test device failure at next interval time
/// </summary> /// </summary>
public bool Test; public bool Test;
/// <summary> /// <summary>
/// Log informational exception conditions /// Log informational exception conditions
/// </summary> /// </summary>
public bool LogErr; public bool LogErr;
/// <summary> /// <summary>
/// Method of reporting informational exceptions /// Method of reporting informational exceptions
/// </summary> /// </summary>
public byte MRIE; public byte MRIE;
/// <summary> /// <summary>
/// 100 ms period to report an informational exception condition /// 100 ms period to report an informational exception condition
/// </summary> /// </summary>
public uint IntervalTimer; public uint IntervalTimer;
/// <summary> /// <summary>
/// How many times to report informational exceptions /// How many times to report informational exceptions
/// </summary> /// </summary>
public uint ReportCount; public uint ReportCount;
/// <summary> /// <summary>
/// Enable background functions /// Enable background functions
/// </summary> /// </summary>
public bool EBF; public bool EBF;
/// <summary> /// <summary>
/// Warning reporting enabled /// Warning reporting enabled
/// </summary> /// </summary>
public bool EWasc; public bool EWasc;
/// <summary> /// <summary>
/// Enable reporting of background self-test errors /// Enable reporting of background self-test errors
/// </summary> /// </summary>
public bool EBACKERR; public bool EBACKERR;
} }
@@ -204,47 +204,47 @@ namespace DiscImageChef.Decoders.SCSI
#region Mode Page 0x1C subpage 0x01: Background Control mode page #region Mode Page 0x1C subpage 0x01: Background Control mode page
/// <summary> /// <summary>
/// Background Control mode page /// Background Control mode page
/// Page code 0x1A /// Page code 0x1A
/// Subpage code 0x01 /// Subpage code 0x01
/// 16 bytes in SPC-5 /// 16 bytes in SPC-5
/// </summary> /// </summary>
public struct ModePage_1C_S01 public struct ModePage_1C_S01
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// Suspend on log full /// Suspend on log full
/// </summary> /// </summary>
public bool S_L_Full; public bool S_L_Full;
/// <summary> /// <summary>
/// Log only when intervention required /// Log only when intervention required
/// </summary> /// </summary>
public bool LOWIR; public bool LOWIR;
/// <summary> /// <summary>
/// Enable background medium scan /// Enable background medium scan
/// </summary> /// </summary>
public bool En_Bms; public bool En_Bms;
/// <summary> /// <summary>
/// Enable background pre-scan /// Enable background pre-scan
/// </summary> /// </summary>
public bool En_Ps; public bool En_Ps;
/// <summary> /// <summary>
/// Time in hours between background medium scans /// Time in hours between background medium scans
/// </summary> /// </summary>
public ushort BackgroundScanInterval; public ushort BackgroundScanInterval;
/// <summary> /// <summary>
/// Maximum time in hours for a background pre-scan to complete /// Maximum time in hours for a background pre-scan to complete
/// </summary> /// </summary>
public ushort BackgroundPrescanTimeLimit; public ushort BackgroundPrescanTimeLimit;
/// <summary> /// <summary>
/// Minimum time in ms being idle before resuming a background scan /// Minimum time in ms being idle before resuming a background scan
/// </summary> /// </summary>
public ushort MinIdleBeforeBgScan; public ushort MinIdleBeforeBgScan;
/// <summary> /// <summary>
/// Maximum time in ms to start processing commands while performing a background scan /// Maximum time in ms to start processing commands while performing a background scan
/// </summary> /// </summary>
public ushort MaxTimeSuspendBgScan; public ushort MaxTimeSuspendBgScan;
} }

View File

@@ -42,26 +42,26 @@ namespace DiscImageChef.Decoders.SCSI
{ {
#region Mode Page 0x1C: Timer & Protect page #region Mode Page 0x1C: Timer & Protect page
/// <summary> /// <summary>
/// Timer &amp; Protect page /// Timer &amp; Protect page
/// Page code 0x1C /// Page code 0x1C
/// 8 bytes in INF-8070 /// 8 bytes in INF-8070
/// </summary> /// </summary>
public struct ModePage_1C_SFF public struct ModePage_1C_SFF
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// Time the device shall remain in the current state after seek, read or write operation /// Time the device shall remain in the current state after seek, read or write operation
/// </summary> /// </summary>
public byte InactivityTimeMultiplier; public byte InactivityTimeMultiplier;
/// <summary> /// <summary>
/// Disabled until power cycle /// Disabled until power cycle
/// </summary> /// </summary>
public bool DISP; public bool DISP;
/// <summary> /// <summary>
/// Software Write Protect until Power-down /// Software Write Protect until Power-down
/// </summary> /// </summary>
public bool SWPP; public bool SWPP;
} }

View File

@@ -44,7 +44,7 @@ namespace DiscImageChef.Decoders.SCSI
public struct ModePage_1D public struct ModePage_1D
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
public bool WORMM; public bool WORMM;

View File

@@ -44,7 +44,7 @@ namespace DiscImageChef.Decoders.SCSI
public struct Certance_ModePage_21 public struct Certance_ModePage_21
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
public byte OperatingSystemsSupport; public byte OperatingSystemsSupport;

View File

@@ -45,7 +45,7 @@ namespace DiscImageChef.Decoders.SCSI
public struct Certance_ModePage_22 public struct Certance_ModePage_22
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
public byte BaudRate; public byte BaudRate;

View File

@@ -44,7 +44,7 @@ namespace DiscImageChef.Decoders.SCSI
public struct IBM_ModePage_24 public struct IBM_ModePage_24
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
public byte ModeControl; public byte ModeControl;

View File

@@ -44,106 +44,106 @@ namespace DiscImageChef.Decoders.SCSI
{ {
#region Mode Page 0x2A: CD-ROM capabilities page #region Mode Page 0x2A: CD-ROM capabilities page
/// <summary> /// <summary>
/// CD-ROM capabilities page /// CD-ROM capabilities page
/// Page code 0x2A /// Page code 0x2A
/// 16 bytes in OB-U0077C /// 16 bytes in OB-U0077C
/// 20 bytes in SFF-8020i /// 20 bytes in SFF-8020i
/// 22 bytes in MMC-1 /// 22 bytes in MMC-1
/// 26 bytes in MMC-2 /// 26 bytes in MMC-2
/// Variable bytes in MMC-3 /// Variable bytes in MMC-3
/// </summary> /// </summary>
public struct ModePage_2A public struct ModePage_2A
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// Drive supports multi-session and/or Photo-CD /// Drive supports multi-session and/or Photo-CD
/// </summary> /// </summary>
public bool MultiSession; public bool MultiSession;
/// <summary> /// <summary>
/// Drive is capable of reading sectors in Mode 2 Form 2 format /// Drive is capable of reading sectors in Mode 2 Form 2 format
/// </summary> /// </summary>
public bool Mode2Form2; public bool Mode2Form2;
/// <summary> /// <summary>
/// Drive is capable of reading sectors in Mode 2 Form 1 format /// Drive is capable of reading sectors in Mode 2 Form 1 format
/// </summary> /// </summary>
public bool Mode2Form1; public bool Mode2Form1;
/// <summary> /// <summary>
/// Drive is capable of playing audio /// Drive is capable of playing audio
/// </summary> /// </summary>
public bool AudioPlay; public bool AudioPlay;
/// <summary> /// <summary>
/// Drive can return the ISRC /// Drive can return the ISRC
/// </summary> /// </summary>
public bool ISRC; public bool ISRC;
/// <summary> /// <summary>
/// Drive can return the media catalogue number /// Drive can return the media catalogue number
/// </summary> /// </summary>
public bool UPC; public bool UPC;
/// <summary> /// <summary>
/// Drive can return C2 pointers /// Drive can return C2 pointers
/// </summary> /// </summary>
public bool C2Pointer; public bool C2Pointer;
/// <summary> /// <summary>
/// Drive can read, deinterlave and correct R-W subchannels /// Drive can read, deinterlave and correct R-W subchannels
/// </summary> /// </summary>
public bool DeinterlaveSubchannel; public bool DeinterlaveSubchannel;
/// <summary> /// <summary>
/// Drive can read interleaved and uncorrected R-W subchannels /// Drive can read interleaved and uncorrected R-W subchannels
/// </summary> /// </summary>
public bool Subchannel; public bool Subchannel;
/// <summary> /// <summary>
/// Drive can continue from a loss of streaming on audio reading /// Drive can continue from a loss of streaming on audio reading
/// </summary> /// </summary>
public bool AccurateCDDA; public bool AccurateCDDA;
/// <summary> /// <summary>
/// Audio can be read as digital data /// Audio can be read as digital data
/// </summary> /// </summary>
public bool CDDACommand; public bool CDDACommand;
/// <summary> /// <summary>
/// Loading Mechanism Type /// Loading Mechanism Type
/// </summary> /// </summary>
public byte LoadingMechanism; public byte LoadingMechanism;
/// <summary> /// <summary>
/// Drive can eject discs /// Drive can eject discs
/// </summary> /// </summary>
public bool Eject; public bool Eject;
/// <summary> /// <summary>
/// Drive's optional prevent jumper status /// Drive's optional prevent jumper status
/// </summary> /// </summary>
public bool PreventJumper; public bool PreventJumper;
/// <summary> /// <summary>
/// Current lock status /// Current lock status
/// </summary> /// </summary>
public bool LockState; public bool LockState;
/// <summary> /// <summary>
/// Drive can lock media /// Drive can lock media
/// </summary> /// </summary>
public bool Lock; public bool Lock;
/// <summary> /// <summary>
/// Each channel can be muted independently /// Each channel can be muted independently
/// </summary> /// </summary>
public bool SeparateChannelMute; public bool SeparateChannelMute;
/// <summary> /// <summary>
/// Each channel's volume can be controlled independently /// Each channel's volume can be controlled independently
/// </summary> /// </summary>
public bool SeparateChannelVolume; public bool SeparateChannelVolume;
/// <summary> /// <summary>
/// Maximum drive speed in Kbytes/second /// Maximum drive speed in Kbytes/second
/// </summary> /// </summary>
public ushort MaximumSpeed; public ushort MaximumSpeed;
/// <summary> /// <summary>
/// Supported volume levels /// Supported volume levels
/// </summary> /// </summary>
public ushort SupportedVolumeLevels; public ushort SupportedVolumeLevels;
/// <summary> /// <summary>
/// Buffer size in Kbytes /// Buffer size in Kbytes
/// </summary> /// </summary>
public ushort BufferSize; public ushort BufferSize;
/// <summary> /// <summary>
/// Current drive speed in Kbytes/second /// Current drive speed in Kbytes/second
/// </summary> /// </summary>
public ushort CurrentSpeed; public ushort CurrentSpeed;
@@ -283,13 +283,11 @@ namespace DiscImageChef.Decoders.SCSI
decoded.WriteSpeedPerformanceDescriptors = new ModePage_2A_WriteDescriptor[descriptors]; decoded.WriteSpeedPerformanceDescriptors = new ModePage_2A_WriteDescriptor[descriptors];
for(int i = 0; i < descriptors; i++) for(int i = 0; i < descriptors; i++)
{
decoded.WriteSpeedPerformanceDescriptors[i] = new ModePage_2A_WriteDescriptor decoded.WriteSpeedPerformanceDescriptors[i] = new ModePage_2A_WriteDescriptor
{ {
RotationControl = (byte)(pageResponse[1 + 32 + i * 4] & 0x07), RotationControl = (byte)(pageResponse[1 + 32 + i * 4] & 0x07),
WriteSpeed = (ushort)((pageResponse[2 + 32 + i * 4] << 8) + pageResponse[3 + 32 + i * 4]) WriteSpeed = (ushort)((pageResponse[2 + 32 + i * 4] << 8) + pageResponse[3 + 32 + i * 4])
}; };
}
return decoded; return decoded;
} }
@@ -355,11 +353,9 @@ namespace DiscImageChef.Decoders.SCSI
: "\tDrive is not locked, media can be ejected and inserted"); : "\tDrive is not locked, media can be ejected and inserted");
} }
else else
{
sb.AppendLine(page.LockState sb.AppendLine(page.LockState
? "\tDrive is locked, media cannot be ejected, but if empty, can be inserted" ? "\tDrive is locked, media cannot be ejected, but if empty, can be inserted"
: "\tDrive is not locked, media can be ejected and inserted"); : "\tDrive is not locked, media can be ejected and inserted");
}
if(page.Eject) sb.AppendLine("\tDrive can eject media"); if(page.Eject) sb.AppendLine("\tDrive can eject media");
if(page.SeparateChannelMute) sb.AppendLine("\tEach channel can be muted independently"); if(page.SeparateChannelMute) sb.AppendLine("\tEach channel can be muted independently");
@@ -414,9 +410,11 @@ namespace DiscImageChef.Decoders.SCSI
} }
if(page.WriteSpeedPerformanceDescriptors != null) if(page.WriteSpeedPerformanceDescriptors != null)
foreach(ModePage_2A_WriteDescriptor descriptor in page.WriteSpeedPerformanceDescriptors.Where(descriptor => descriptor.WriteSpeed > 0)) if(descriptor.RotationControl == 0) foreach(ModePage_2A_WriteDescriptor descriptor in
sb.AppendFormat("\tDrive supports writing at {0} Kbyte/sec. in CLV mode", page.WriteSpeedPerformanceDescriptors.Where(descriptor => descriptor.WriteSpeed > 0))
descriptor.WriteSpeed).AppendLine(); if(descriptor.RotationControl == 0)
sb.AppendFormat("\tDrive supports writing at {0} Kbyte/sec. in CLV mode", descriptor.WriteSpeed)
.AppendLine();
else if(descriptor.RotationControl == 1) else if(descriptor.RotationControl == 1)
sb.AppendFormat("\tDrive supports writing at is {0} Kbyte/sec. in pure CAV mode", sb.AppendFormat("\tDrive supports writing at is {0} Kbyte/sec. in pure CAV mode",
descriptor.WriteSpeed).AppendLine(); descriptor.WriteSpeed).AppendLine();

View File

@@ -45,7 +45,7 @@ namespace DiscImageChef.Decoders.SCSI
public struct IBM_ModePage_2F public struct IBM_ModePage_2F
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
public byte FenceBehaviour; public byte FenceBehaviour;

View File

@@ -41,28 +41,28 @@ namespace DiscImageChef.Decoders.SCSI
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")] [SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
public static partial class Modes public static partial class Modes
{ {
#region Apple Mode Page 0x30: Apple OEM String #region Apple Mode Page 0x30: Apple OEM String
static readonly byte[] AppleOEMString = static readonly byte[] AppleOEMString =
{ {
0x41, 0x50, 0x50, 0x4C, 0x45, 0x20, 0x43, 0x4F, 0x4D, 0x50, 0x55, 0x54, 0x45, 0x52, 0x2C, 0x20, 0x49, 0x4E, 0x41, 0x50, 0x50, 0x4C, 0x45, 0x20, 0x43, 0x4F, 0x4D, 0x50, 0x55, 0x54, 0x45, 0x52, 0x2C, 0x20, 0x49, 0x4E,
0x43, 0x2E 0x43, 0x2E
}; };
public static bool IsAppleModePage_30(byte[] pageResponse) public static bool IsAppleModePage_30(byte[] pageResponse)
{ {
if((pageResponse?[0] & 0x40) == 0x40) return false; if((pageResponse?[0] & 0x40) == 0x40) return false;
if((pageResponse?[0] & 0x3F) != 0x30) return false; if((pageResponse?[0] & 0x3F) != 0x30) return false;
if(pageResponse[1] + 2 != pageResponse.Length) return false; if(pageResponse[1] + 2 != pageResponse.Length) return false;
if(pageResponse.Length != 30) return false; if(pageResponse.Length != 30) return false;
byte[] str = new byte[20]; byte[] str = new byte[20];
Array.Copy(pageResponse, 10, str, 0, 20); Array.Copy(pageResponse, 10, str, 0, 20);
return AppleOEMString.SequenceEqual(str); return AppleOEMString.SequenceEqual(str);
} }
#endregion Apple Mode Page 0x30: Apple OEM String #endregion Apple Mode Page 0x30: Apple OEM String
} }
} }

View File

@@ -45,7 +45,7 @@ namespace DiscImageChef.Decoders.SCSI
public struct HP_ModePage_3B public struct HP_ModePage_3B
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
public byte MSN; public byte MSN;

View File

@@ -45,7 +45,7 @@ namespace DiscImageChef.Decoders.SCSI
public struct HP_ModePage_3C public struct HP_ModePage_3C
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
public bool LT; public bool LT;

View File

@@ -44,7 +44,7 @@ namespace DiscImageChef.Decoders.SCSI
public struct HP_ModePage_3D public struct HP_ModePage_3D
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
public byte ResetBehaviour; public byte ResetBehaviour;

View File

@@ -40,54 +40,54 @@ namespace DiscImageChef.Decoders.SCSI
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")] [SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
public static partial class Modes public static partial class Modes
{ {
#region IBM Mode Page 0x3D: Behaviour Configuration Mode page #region IBM Mode Page 0x3D: Behaviour Configuration Mode page
public struct IBM_ModePage_3D public struct IBM_ModePage_3D
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
public ushort NumberOfWraps; public ushort NumberOfWraps;
} }
public static IBM_ModePage_3D? DecodeIBMModePage_3D(byte[] pageResponse) public static IBM_ModePage_3D? DecodeIBMModePage_3D(byte[] pageResponse)
{ {
if((pageResponse?[0] & 0x40) == 0x40) return null; if((pageResponse?[0] & 0x40) == 0x40) return null;
if((pageResponse?[0] & 0x3F) != 0x3D) return null; if((pageResponse?[0] & 0x3F) != 0x3D) return null;
if(pageResponse[1] + 2 != pageResponse.Length) return null; if(pageResponse[1] + 2 != pageResponse.Length) return null;
if(pageResponse.Length != 5) return null; if(pageResponse.Length != 5) return null;
IBM_ModePage_3D decoded = new IBM_ModePage_3D(); IBM_ModePage_3D decoded = new IBM_ModePage_3D();
decoded.PS |= (pageResponse[0] & 0x80) == 0x80; decoded.PS |= (pageResponse[0] & 0x80) == 0x80;
decoded.NumberOfWraps = (ushort)((pageResponse[3] << 8) + pageResponse[4]); decoded.NumberOfWraps = (ushort)((pageResponse[3] << 8) + pageResponse[4]);
return decoded; return decoded;
} }
public static string PrettifyIBMModePage_3D(byte[] pageResponse) public static string PrettifyIBMModePage_3D(byte[] pageResponse)
{ {
return PrettifyIBMModePage_3D(DecodeIBMModePage_3D(pageResponse)); return PrettifyIBMModePage_3D(DecodeIBMModePage_3D(pageResponse));
} }
public static string PrettifyIBMModePage_3D(IBM_ModePage_3D? modePage) public static string PrettifyIBMModePage_3D(IBM_ModePage_3D? modePage)
{ {
if(!modePage.HasValue) return null; if(!modePage.HasValue) return null;
IBM_ModePage_3D page = modePage.Value; IBM_ModePage_3D page = modePage.Value;
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.AppendLine("IBM LEOT Mode Page:"); sb.AppendLine("IBM LEOT Mode Page:");
if(page.PS) sb.AppendLine("\tParameters can be saved"); if(page.PS) sb.AppendLine("\tParameters can be saved");
sb.AppendFormat("\t{0} wraps", page.NumberOfWraps).AppendLine(); sb.AppendFormat("\t{0} wraps", page.NumberOfWraps).AppendLine();
return sb.ToString(); return sb.ToString();
} }
#endregion IBM Mode Page 0x3D: Behaviour Configuration Mode page #endregion IBM Mode Page 0x3D: Behaviour Configuration Mode page
} }
} }

View File

@@ -46,15 +46,15 @@ namespace DiscImageChef.Decoders.SCSI
public enum Fujitsu_VerifyModes : byte public enum Fujitsu_VerifyModes : byte
{ {
/// <summary> /// <summary>
/// Always verify after writing /// Always verify after writing
/// </summary> /// </summary>
Always = 0, Always = 0,
/// <summary> /// <summary>
/// Never verify after writing /// Never verify after writing
/// </summary> /// </summary>
Never = 1, Never = 1,
/// <summary> /// <summary>
/// Verify after writing depending on condition /// Verify after writing depending on condition
/// </summary> /// </summary>
Depends = 2, Depends = 2,
Reserved = 4 Reserved = 4
@@ -63,25 +63,25 @@ namespace DiscImageChef.Decoders.SCSI
public struct Fujitsu_ModePage_3E public struct Fujitsu_ModePage_3E
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
/// <summary> /// <summary>
/// If set, AV data support mode is applied /// If set, AV data support mode is applied
/// </summary> /// </summary>
public bool audioVisualMode; public bool audioVisualMode;
/// <summary> /// <summary>
/// If set the test write operation is restricted /// If set the test write operation is restricted
/// </summary> /// </summary>
public bool streamingMode; public bool streamingMode;
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Verify mode for WRITE commands /// Verify mode for WRITE commands
/// </summary> /// </summary>
public Fujitsu_VerifyModes verifyMode; public Fujitsu_VerifyModes verifyMode;
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Device type provided in response to INQUIRY /// Device type provided in response to INQUIRY
/// </summary> /// </summary>
public PeripheralDeviceTypes devType; public PeripheralDeviceTypes devType;
public byte[] Reserved3; public byte[] Reserved3;

View File

@@ -40,57 +40,59 @@ namespace DiscImageChef.Decoders.SCSI
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")] [SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
public static partial class Modes public static partial class Modes
{ {
#region HP Mode Page 0x3E: CD-ROM Emulation/Disaster Recovery Mode page #region HP Mode Page 0x3E: CD-ROM Emulation/Disaster Recovery Mode page
public struct HP_ModePage_3E public struct HP_ModePage_3E
{ {
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS;
public bool NonAuto; public bool NonAuto;
public bool CDmode; public bool CDmode;
} }
public static HP_ModePage_3E? DecodeHPModePage_3E(byte[] pageResponse) public static HP_ModePage_3E? DecodeHPModePage_3E(byte[] pageResponse)
{ {
if((pageResponse?[0] & 0x40) == 0x40) return null; if((pageResponse?[0] & 0x40) == 0x40) return null;
if((pageResponse?[0] & 0x3F) != 0x3E) return null; if((pageResponse?[0] & 0x3F) != 0x3E) return null;
if(pageResponse[1] + 2 != pageResponse.Length) return null; if(pageResponse[1] + 2 != pageResponse.Length) return null;
if(pageResponse.Length != 4) return null; if(pageResponse.Length != 4) return null;
HP_ModePage_3E decoded = new HP_ModePage_3E(); HP_ModePage_3E decoded = new HP_ModePage_3E();
decoded.PS |= (pageResponse[0] & 0x80) == 0x80; decoded.PS |= (pageResponse[0] & 0x80) == 0x80;
decoded.NonAuto |= (pageResponse[2] & 0x02) == 0x02; decoded.NonAuto |= (pageResponse[2] & 0x02) == 0x02;
decoded.CDmode |= (pageResponse[2] & 0x01) == 0x01; decoded.CDmode |= (pageResponse[2] & 0x01) == 0x01;
return decoded; return decoded;
} }
public static string PrettifyHPModePage_3E(byte[] pageResponse) public static string PrettifyHPModePage_3E(byte[] pageResponse)
{ {
return PrettifyHPModePage_3E(DecodeHPModePage_3E(pageResponse)); return PrettifyHPModePage_3E(DecodeHPModePage_3E(pageResponse));
} }
public static string PrettifyHPModePage_3E(HP_ModePage_3E? modePage) public static string PrettifyHPModePage_3E(HP_ModePage_3E? modePage)
{ {
if(!modePage.HasValue) return null; if(!modePage.HasValue) return null;
HP_ModePage_3E page = modePage.Value; HP_ModePage_3E page = modePage.Value;
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.AppendLine("HP CD-ROM Emulation/Disaster Recovery Mode Page:"); sb.AppendLine("HP CD-ROM Emulation/Disaster Recovery Mode Page:");
if(page.PS) sb.AppendLine("\tParameters can be saved"); if(page.PS) sb.AppendLine("\tParameters can be saved");
sb.AppendLine(page.CDmode ? "\tDrive is emulating a CD-ROM drive" : "\tDrive is not emulating a CD-ROM drive"); sb.AppendLine(page.CDmode
if(page.NonAuto) sb.AppendLine("\tDrive will not exit emulation automatically"); ? "\tDrive is emulating a CD-ROM drive"
: "\tDrive is not emulating a CD-ROM drive");
if(page.NonAuto) sb.AppendLine("\tDrive will not exit emulation automatically");
return sb.ToString(); return sb.ToString();
} }
#endregion HP Mode Page 0x3E: CD-ROM Emulation/Disaster Recovery Mode page #endregion HP Mode Page 0x3E: CD-ROM Emulation/Disaster Recovery Mode page
} }
} }

View File

@@ -146,13 +146,12 @@ namespace DiscImageChef.Decoders.SCSI
else else
sb.AppendFormat("\t{0} blocks have {1} and are {2} bytes each", descriptor.Blocks, sb.AppendFormat("\t{0} blocks have {1} and are {2} bytes each", descriptor.Blocks,
density, descriptor.BlockLength).AppendLine(); density, descriptor.BlockLength).AppendLine();
else if(descriptor.Blocks == 0)
sb.AppendFormat("\tAll remaining blocks are {0} bytes each", descriptor.BlockLength)
.AppendLine();
else else
if(descriptor.Blocks == 0) sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
sb.AppendFormat("\tAll remaining blocks are {0} bytes each", descriptor.BlockLength) descriptor.BlockLength).AppendLine();
.AppendLine();
else
sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
descriptor.BlockLength).AppendLine();
} }
break; break;
@@ -1421,28 +1420,23 @@ namespace DiscImageChef.Decoders.SCSI
else else
sb.AppendFormat("\tAll remaining blocks conform to {0} and are {1} bytes each", sb.AppendFormat("\tAll remaining blocks conform to {0} and are {1} bytes each",
density, descriptor.BlockLength).AppendLine(); density, descriptor.BlockLength).AppendLine();
else if(descriptor.BlockLength == 0)
sb.AppendFormat("\t{0} blocks conform to {1} and have a variable length",
descriptor.Blocks, density).AppendLine();
else else
if(descriptor.BlockLength == 0) sb.AppendFormat("\t{0} blocks conform to {1} and are {2} bytes each",
sb.AppendFormat("\t{0} blocks conform to {1} and have a variable length", descriptor.Blocks, density, descriptor.BlockLength).AppendLine();
descriptor.Blocks, density).AppendLine(); else if(descriptor.Blocks == 0)
else if(descriptor.BlockLength == 0)
sb.AppendFormat("\t{0} blocks conform to {1} and are {2} bytes each", sb.AppendFormat("\tAll remaining blocks have a variable length").AppendLine();
descriptor.Blocks, density, descriptor.BlockLength) else
.AppendLine(); sb.AppendFormat("\tAll remaining blocks are {0} bytes each", descriptor.BlockLength)
.AppendLine();
else if(descriptor.BlockLength == 0)
sb.AppendFormat("\t{0} blocks have a variable length", descriptor.Blocks).AppendLine();
else else
if(descriptor.Blocks == 0) sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
if(descriptor.BlockLength == 0) descriptor.BlockLength).AppendLine();
sb.AppendFormat("\tAll remaining blocks have a variable length").AppendLine();
else
sb.AppendFormat("\tAll remaining blocks are {0} bytes each",
descriptor.BlockLength).AppendLine();
else
if(descriptor.BlockLength == 0)
sb.AppendFormat("\t{0} blocks have a variable length", descriptor.Blocks)
.AppendLine();
else
sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
descriptor.BlockLength).AppendLine();
} }
break; break;
@@ -1563,28 +1557,23 @@ namespace DiscImageChef.Decoders.SCSI
else else
sb.AppendFormat("\tAll remaining blocks are {0} and are {1} bytes each", sb.AppendFormat("\tAll remaining blocks are {0} and are {1} bytes each",
density, descriptor.BlockLength).AppendLine(); density, descriptor.BlockLength).AppendLine();
else if(descriptor.BlockLength == 0)
sb.AppendFormat("\t{0} blocks are {1} and have a variable length",
descriptor.Blocks, density).AppendLine();
else else
if(descriptor.BlockLength == 0) sb.AppendFormat("\t{0} blocks are {1} and are {2} bytes each", descriptor.Blocks,
sb.AppendFormat("\t{0} blocks are {1} and have a variable length", density, descriptor.BlockLength).AppendLine();
descriptor.Blocks, density).AppendLine(); else if(descriptor.Blocks == 0)
else if(descriptor.BlockLength == 0)
sb.AppendFormat("\t{0} blocks are {1} and are {2} bytes each", sb.AppendFormat("\tAll remaining blocks have a variable length").AppendLine();
descriptor.Blocks, density, descriptor.BlockLength) else
.AppendLine(); sb.AppendFormat("\tAll remaining blocks are {0} bytes each", descriptor.BlockLength)
.AppendLine();
else if(descriptor.BlockLength == 0)
sb.AppendFormat("\t{0} blocks have a variable length", descriptor.Blocks).AppendLine();
else else
if(descriptor.Blocks == 0) sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
if(descriptor.BlockLength == 0) descriptor.BlockLength).AppendLine();
sb.AppendFormat("\tAll remaining blocks have a variable length").AppendLine();
else
sb.AppendFormat("\tAll remaining blocks are {0} bytes each",
descriptor.BlockLength).AppendLine();
else
if(descriptor.BlockLength == 0)
sb.AppendFormat("\t{0} blocks have a variable length", descriptor.Blocks)
.AppendLine();
else
sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
descriptor.BlockLength).AppendLine();
} }
break; break;
@@ -1758,13 +1747,12 @@ namespace DiscImageChef.Decoders.SCSI
else else
sb.AppendFormat("\t{0} blocks have {1} and are {2} bytes each", descriptor.Blocks, sb.AppendFormat("\t{0} blocks have {1} and are {2} bytes each", descriptor.Blocks,
density, descriptor.BlockLength).AppendLine(); density, descriptor.BlockLength).AppendLine();
else if(descriptor.Blocks == 0)
sb.AppendFormat("\tAll remaining blocks are {0} bytes each", descriptor.BlockLength)
.AppendLine();
else else
if(descriptor.Blocks == 0) sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
sb.AppendFormat("\tAll remaining blocks are {0} bytes each", descriptor.BlockLength) descriptor.BlockLength).AppendLine();
.AppendLine();
else
sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
descriptor.BlockLength).AppendLine();
} }
break; break;

View File

@@ -103,7 +103,8 @@ namespace DiscImageChef.Decoders.SCSI
} }
} }
switch(deviceType) { switch(deviceType)
{
case PeripheralDeviceTypes.DirectAccess: case PeripheralDeviceTypes.DirectAccess:
case PeripheralDeviceTypes.MultiMediaDevice: case PeripheralDeviceTypes.MultiMediaDevice:
header.WriteProtected = (modeResponse[3] & 0x80) == 0x80; header.WriteProtected = (modeResponse[3] & 0x80) == 0x80;
@@ -114,7 +115,8 @@ namespace DiscImageChef.Decoders.SCSI
header.Speed = (byte)(modeResponse[3] & 0x0F); header.Speed = (byte)(modeResponse[3] & 0x0F);
header.BufferedMode = (byte)((modeResponse[3] & 0x70) >> 4); header.BufferedMode = (byte)((modeResponse[3] & 0x70) >> 4);
break; break;
case PeripheralDeviceTypes.PrinterDevice: header.BufferedMode = (byte)((modeResponse[3] & 0x70) >> 4); case PeripheralDeviceTypes.PrinterDevice:
header.BufferedMode = (byte)((modeResponse[3] & 0x70) >> 4);
break; break;
case PeripheralDeviceTypes.OpticalDevice: case PeripheralDeviceTypes.OpticalDevice:
header.WriteProtected = (modeResponse[3] & 0x80) == 0x80; header.WriteProtected = (modeResponse[3] & 0x80) == 0x80;
@@ -200,17 +202,21 @@ namespace DiscImageChef.Decoders.SCSI
return decoded; return decoded;
} }
public static byte[] EncodeModeHeader10(ModeHeader header, PeripheralDeviceTypes deviceType, bool longLBA = false) public static byte[] EncodeModeHeader10(ModeHeader header, PeripheralDeviceTypes deviceType,
bool longLBA = false)
{ {
byte[] hdr; byte[] hdr;
if(header.BlockDescriptors != null) if(header.BlockDescriptors != null)
hdr = longLBA ? new byte[8 + header.BlockDescriptors.Length * 16] : new byte[8 + header.BlockDescriptors.Length * 8]; hdr = longLBA
? new byte[8 + header.BlockDescriptors.Length * 16]
: new byte[8 + header.BlockDescriptors.Length * 8];
else hdr = new byte[8]; else hdr = new byte[8];
hdr[2] = (byte)header.MediumType; hdr[2] = (byte)header.MediumType;
switch(deviceType) { switch(deviceType)
{
case PeripheralDeviceTypes.DirectAccess: case PeripheralDeviceTypes.DirectAccess:
case PeripheralDeviceTypes.MultiMediaDevice: case PeripheralDeviceTypes.MultiMediaDevice:
if(header.WriteProtected) hdr[3] += 0x80; if(header.WriteProtected) hdr[3] += 0x80;
@@ -221,7 +227,8 @@ namespace DiscImageChef.Decoders.SCSI
hdr[3] += (byte)(header.Speed & 0x0F); hdr[3] += (byte)(header.Speed & 0x0F);
hdr[3] += (byte)((header.BufferedMode << 4) & 0x70); hdr[3] += (byte)((header.BufferedMode << 4) & 0x70);
break; break;
case PeripheralDeviceTypes.PrinterDevice: hdr[3] += (byte)((header.BufferedMode << 4) & 0x70); case PeripheralDeviceTypes.PrinterDevice:
hdr[3] += (byte)((header.BufferedMode << 4) & 0x70);
break; break;
case PeripheralDeviceTypes.OpticalDevice: case PeripheralDeviceTypes.OpticalDevice:
if(header.WriteProtected) hdr[3] += 0x80; if(header.WriteProtected) hdr[3] += 0x80;

View File

@@ -64,7 +64,8 @@ namespace DiscImageChef.Decoders.SCSI
} }
} }
switch(deviceType) { switch(deviceType)
{
case PeripheralDeviceTypes.DirectAccess: case PeripheralDeviceTypes.DirectAccess:
case PeripheralDeviceTypes.MultiMediaDevice: case PeripheralDeviceTypes.MultiMediaDevice:
header.WriteProtected = (modeResponse[2] & 0x80) == 0x80; header.WriteProtected = (modeResponse[2] & 0x80) == 0x80;
@@ -75,7 +76,8 @@ namespace DiscImageChef.Decoders.SCSI
header.Speed = (byte)(modeResponse[2] & 0x0F); header.Speed = (byte)(modeResponse[2] & 0x0F);
header.BufferedMode = (byte)((modeResponse[2] & 0x70) >> 4); header.BufferedMode = (byte)((modeResponse[2] & 0x70) >> 4);
break; break;
case PeripheralDeviceTypes.PrinterDevice: header.BufferedMode = (byte)((modeResponse[2] & 0x70) >> 4); case PeripheralDeviceTypes.PrinterDevice:
header.BufferedMode = (byte)((modeResponse[2] & 0x70) >> 4);
break; break;
case PeripheralDeviceTypes.OpticalDevice: case PeripheralDeviceTypes.OpticalDevice:
header.WriteProtected = (modeResponse[2] & 0x80) == 0x80; header.WriteProtected = (modeResponse[2] & 0x80) == 0x80;
@@ -160,11 +162,14 @@ namespace DiscImageChef.Decoders.SCSI
public static byte[] EncodeModeHeader6(ModeHeader header, PeripheralDeviceTypes deviceType) public static byte[] EncodeModeHeader6(ModeHeader header, PeripheralDeviceTypes deviceType)
{ {
byte[] hdr = header.BlockDescriptors != null ? new byte[4 + header.BlockDescriptors.Length * 8] : new byte[4]; byte[] hdr = header.BlockDescriptors != null
? new byte[4 + header.BlockDescriptors.Length * 8]
: new byte[4];
hdr[1] = (byte)header.MediumType; hdr[1] = (byte)header.MediumType;
switch(deviceType) { switch(deviceType)
{
case PeripheralDeviceTypes.DirectAccess: case PeripheralDeviceTypes.DirectAccess:
case PeripheralDeviceTypes.MultiMediaDevice: case PeripheralDeviceTypes.MultiMediaDevice:
if(header.WriteProtected) hdr[2] += 0x80; if(header.WriteProtected) hdr[2] += 0x80;
@@ -175,7 +180,8 @@ namespace DiscImageChef.Decoders.SCSI
hdr[2] += (byte)(header.Speed & 0x0F); hdr[2] += (byte)(header.Speed & 0x0F);
hdr[2] += (byte)((header.BufferedMode << 4) & 0x70); hdr[2] += (byte)((header.BufferedMode << 4) & 0x70);
break; break;
case PeripheralDeviceTypes.PrinterDevice: hdr[2] += (byte)((header.BufferedMode << 4) & 0x70); case PeripheralDeviceTypes.PrinterDevice:
hdr[2] += (byte)((header.BufferedMode << 4) & 0x70);
break; break;
case PeripheralDeviceTypes.OpticalDevice: case PeripheralDeviceTypes.OpticalDevice:
if(header.WriteProtected) hdr[2] += 0x80; if(header.WriteProtected) hdr[2] += 0x80;

View File

@@ -44,15 +44,15 @@ namespace DiscImageChef.Decoders.SCSI.SSC
public struct BlockLimitsData public struct BlockLimitsData
{ {
/// <summary> /// <summary>
/// All blocks size must be multiple of 2^<cref name="granularity"/> /// All blocks size must be multiple of 2^<cref name="granularity" />
/// </summary> /// </summary>
public byte granularity; public byte granularity;
/// <summary> /// <summary>
/// Maximum block length in bytes /// Maximum block length in bytes
/// </summary> /// </summary>
public uint maxBlockLen; public uint maxBlockLen;
/// <summary> /// <summary>
/// Minimum block length in bytes /// Minimum block length in bytes
/// </summary> /// </summary>
public ushort minBlockLen; public ushort minBlockLen;
} }
@@ -86,8 +86,7 @@ namespace DiscImageChef.Decoders.SCSI.SSC
if(decoded.Value.granularity > 0) if(decoded.Value.granularity > 0)
sb.AppendFormat("Device's needs a block size granularity of 2^{0} ({1}) bytes", sb.AppendFormat("Device's needs a block size granularity of 2^{0} ({1}) bytes",
decoded.Value.granularity, Math.Pow(2, decoded.Value.granularity)) decoded.Value.granularity, Math.Pow(2, decoded.Value.granularity)).AppendLine();
.AppendLine();
} }
return sb.ToString(); return sb.ToString();

View File

@@ -167,8 +167,7 @@ namespace DiscImageChef.Decoders.SCSI.SSC
if(descriptor.duplicate) sb.AppendLine("\tThis descriptor is duplicated"); if(descriptor.duplicate) sb.AppendLine("\tThis descriptor is duplicated");
if(descriptor.defaultDensity) sb.AppendLine("\tThis is the default density on the drive"); if(descriptor.defaultDensity) sb.AppendLine("\tThis is the default density on the drive");
sb.AppendFormat("\tDensity has {0} bits per mm, with {1} tracks in a {2} mm width tape", sb.AppendFormat("\tDensity has {0} bits per mm, with {1} tracks in a {2} mm width tape",
descriptor.bpmm, descriptor.tracks, descriptor.width / (double)10) descriptor.bpmm, descriptor.tracks, descriptor.width / (double)10).AppendLine();
.AppendLine();
sb.AppendFormat("\tDensity maximum capacity is {0} megabytes", descriptor.capacity).AppendLine(); sb.AppendFormat("\tDensity maximum capacity is {0} megabytes", descriptor.capacity).AppendLine();
sb.AppendFormat("\tDensity description: {0}", descriptor.description).AppendLine(); sb.AppendFormat("\tDensity description: {0}", descriptor.description).AppendLine();
sb.AppendLine(); sb.AppendLine();
@@ -258,8 +257,8 @@ namespace DiscImageChef.Decoders.SCSI.SSC
sb.AppendLine(); sb.AppendLine();
} }
sb.AppendFormat("\tMedium has a nominal length of {0} m in a {1} mm width tape", sb.AppendFormat("\tMedium has a nominal length of {0} m in a {1} mm width tape", descriptor.length,
descriptor.length, descriptor.width / (double)10).AppendLine(); descriptor.width / (double)10).AppendLine();
sb.AppendFormat("\tMedium description: {0}", descriptor.description).AppendLine(); sb.AppendFormat("\tMedium description: {0}", descriptor.description).AppendLine();
sb.AppendLine(); sb.AppendLine();
} }

View File

@@ -55,23 +55,23 @@ namespace DiscImageChef.Decoders.SCSI
public struct StandardSense public struct StandardSense
{ {
/// <summary> /// <summary>
/// If set, <see cref="LBA"/> is valid /// If set, <see cref="LBA" /> is valid
/// </summary> /// </summary>
public bool AddressValid; public bool AddressValid;
/// <summary> /// <summary>
/// Error class, 0 to 6 /// Error class, 0 to 6
/// </summary> /// </summary>
public byte ErrorClass; public byte ErrorClass;
/// <summary> /// <summary>
/// Error type /// Error type
/// </summary> /// </summary>
public byte ErrorType; public byte ErrorType;
/// <summary> /// <summary>
/// Private usage /// Private usage
/// </summary> /// </summary>
public byte Private; public byte Private;
/// <summary> /// <summary>
/// LBA where error happened /// LBA where error happened
/// </summary> /// </summary>
public uint LBA; public uint LBA;
} }
@@ -79,67 +79,67 @@ namespace DiscImageChef.Decoders.SCSI
public enum SenseKeys : byte public enum SenseKeys : byte
{ {
/// <summary> /// <summary>
/// No information to be reported, but bits should be checked /// No information to be reported, but bits should be checked
/// </summary> /// </summary>
NoSense = 0, NoSense = 0,
/// <summary> /// <summary>
/// Target performed some recovery to successfully complete last command /// Target performed some recovery to successfully complete last command
/// </summary> /// </summary>
RecoveredError = 1, RecoveredError = 1,
/// <summary> /// <summary>
/// Target is not ready /// Target is not ready
/// </summary> /// </summary>
NotReady = 2, NotReady = 2,
/// <summary> /// <summary>
/// Non-recoverable medium error occurred /// Non-recoverable medium error occurred
/// </summary> /// </summary>
MediumError = 3, MediumError = 3,
/// <summary> /// <summary>
/// Non-recoverable hardware error occurred /// Non-recoverable hardware error occurred
/// </summary> /// </summary>
HardwareError = 4, HardwareError = 4,
/// <summary> /// <summary>
/// Target has received an illegal request /// Target has received an illegal request
/// </summary> /// </summary>
IllegalRequest = 5, IllegalRequest = 5,
/// <summary> /// <summary>
/// Target requires initiator attention /// Target requires initiator attention
/// </summary> /// </summary>
UnitAttention = 6, UnitAttention = 6,
/// <summary> /// <summary>
/// A protected command has been denied /// A protected command has been denied
/// </summary> /// </summary>
DataProtect = 7, DataProtect = 7,
/// <summary> /// <summary>
/// A blank block has been tried to read or a non-rewritable one to write /// A blank block has been tried to read or a non-rewritable one to write
/// </summary> /// </summary>
BlankCheck = 8, BlankCheck = 8,
/// <summary> /// <summary>
/// For private/vendor usage /// For private/vendor usage
/// </summary> /// </summary>
PrivateUse = 9, PrivateUse = 9,
/// <summary> /// <summary>
/// COPY command aborted /// COPY command aborted
/// </summary> /// </summary>
CopyAborted = 0xA, CopyAborted = 0xA,
/// <summary> /// <summary>
/// Command aborted /// Command aborted
/// </summary> /// </summary>
AbortedCommand = 0xB, AbortedCommand = 0xB,
/// <summary> /// <summary>
/// SEARCH command has been satisfied /// SEARCH command has been satisfied
/// </summary> /// </summary>
Equal = 0xC, Equal = 0xC,
/// <summary> /// <summary>
/// End-of-medium reached with data remaining in buffer /// End-of-medium reached with data remaining in buffer
/// </summary> /// </summary>
VolumeOverflow = 0xD, VolumeOverflow = 0xD,
/// <summary> /// <summary>
/// COMPARE failed /// COMPARE failed
/// </summary> /// </summary>
Miscompare = 0xE, Miscompare = 0xE,
/// <summary> /// <summary>
/// Complated /// Complated
/// </summary> /// </summary>
Completed = 0xF Completed = 0xF
} }
@@ -152,52 +152,52 @@ namespace DiscImageChef.Decoders.SCSI
public struct FixedSense public struct FixedSense
{ {
/// <summary> /// <summary>
/// If set, <see cref="Information"/> is valid /// If set, <see cref="Information" /> is valid
/// </summary> /// </summary>
public bool InformationValid; public bool InformationValid;
/// <summary> /// <summary>
/// Contains number of current segment descriptor /// Contains number of current segment descriptor
/// </summary> /// </summary>
public byte SegmentNumber; public byte SegmentNumber;
/// <summary> /// <summary>
/// If set indicates current command has read a filemark or a setmark /// If set indicates current command has read a filemark or a setmark
/// </summary> /// </summary>
public bool Filemark; public bool Filemark;
/// <summary> /// <summary>
/// If set indicates device has arrived end-of-medium /// If set indicates device has arrived end-of-medium
/// </summary> /// </summary>
public bool EOM; public bool EOM;
/// <summary> /// <summary>
/// Means the requested logical block length did not match the logical block length on the medium /// Means the requested logical block length did not match the logical block length on the medium
/// </summary> /// </summary>
public bool ILI; public bool ILI;
/// <summary> /// <summary>
/// Contains the sense key /// Contains the sense key
/// </summary> /// </summary>
public SenseKeys SenseKey; public SenseKeys SenseKey;
/// <summary> /// <summary>
/// Additional information /// Additional information
/// </summary> /// </summary>
public uint Information; public uint Information;
/// <summary> /// <summary>
/// Additional sense length /// Additional sense length
/// </summary> /// </summary>
public byte AdditionalLength; public byte AdditionalLength;
/// <summary> /// <summary>
/// Command specific information field /// Command specific information field
/// </summary> /// </summary>
public uint CommandSpecific; public uint CommandSpecific;
/// <summary> /// <summary>
/// Additional sense code /// Additional sense code
/// </summary> /// </summary>
public byte ASC; public byte ASC;
/// <summary> /// <summary>
/// Additional sense code qualifier /// Additional sense code qualifier
/// </summary> /// </summary>
public byte ASCQ; public byte ASCQ;
public byte FieldReplaceable; public byte FieldReplaceable;
/// <summary> /// <summary>
/// If set, <see cref="SenseKeySpecific"/> is valid /// If set, <see cref="SenseKeySpecific" /> is valid
/// </summary> /// </summary>
public bool SKSV; public bool SKSV;
public uint SenseKeySpecific; public uint SenseKeySpecific;
@@ -210,20 +210,20 @@ namespace DiscImageChef.Decoders.SCSI
public struct DescriptorSense public struct DescriptorSense
{ {
/// <summary> /// <summary>
/// Contains the sense key /// Contains the sense key
/// </summary> /// </summary>
public SenseKeys SenseKey; public SenseKeys SenseKey;
/// <summary> /// <summary>
/// Additional sense code /// Additional sense code
/// </summary> /// </summary>
public byte ASC; public byte ASC;
/// <summary> /// <summary>
/// Additional sense code qualifier /// Additional sense code qualifier
/// </summary> /// </summary>
public byte ASCQ; public byte ASCQ;
public bool Overflow; public bool Overflow;
/// <summary> /// <summary>
/// The descriptors, indexed by type /// The descriptors, indexed by type
/// </summary> /// </summary>
public Dictionary<byte, byte[]> Descriptors; public Dictionary<byte, byte[]> Descriptors;
} }
@@ -243,7 +243,7 @@ namespace DiscImageChef.Decoders.SCSI
public static class Sense public static class Sense
{ {
/// <summary> /// <summary>
/// Gets the SCSI SENSE type to help chosing the correct decoding function /// Gets the SCSI SENSE type to help chosing the correct decoding function
/// </summary> /// </summary>
/// <returns>The type.</returns> /// <returns>The type.</returns>
/// <param name="sense">Sense bytes.</param> /// <param name="sense">Sense bytes.</param>
@@ -425,8 +425,8 @@ namespace DiscImageChef.Decoders.SCSI
if((decoded.SenseKeySpecific & 0x200000) == 0x200000) if((decoded.SenseKeySpecific & 0x200000) == 0x200000)
sb.AppendFormat("Invalid value in bit {0} in field {1} of CDB", sb.AppendFormat("Invalid value in bit {0} in field {1} of CDB",
(decoded.SenseKeySpecific & 0x70000) >> 16, (decoded.SenseKeySpecific & 0x70000) >> 16, decoded.SenseKeySpecific & 0xFFFF)
decoded.SenseKeySpecific & 0xFFFF).AppendLine(); .AppendLine();
else else
sb.AppendFormat("Invalid value in field {0} of CDB", decoded.SenseKeySpecific & 0xFFFF) sb.AppendFormat("Invalid value in field {0} of CDB", decoded.SenseKeySpecific & 0xFFFF)
.AppendLine(); .AppendLine();
@@ -471,7 +471,7 @@ namespace DiscImageChef.Decoders.SCSI
} }
/// <summary> /// <summary>
/// Decodes the information sense data descriptor /// Decodes the information sense data descriptor
/// </summary> /// </summary>
/// <returns>The information value</returns> /// <returns>The information value</returns>
/// <param name="descriptor">Descriptor.</param> /// <param name="descriptor">Descriptor.</param>
@@ -494,7 +494,7 @@ namespace DiscImageChef.Decoders.SCSI
} }
/// <summary> /// <summary>
/// Decodes the command-specific information sense data descriptor /// Decodes the command-specific information sense data descriptor
/// </summary> /// </summary>
/// <returns>The command-specific information sense data descriptor.</returns> /// <returns>The command-specific information sense data descriptor.</returns>
/// <param name="descriptor">Descriptor.</param> /// <param name="descriptor">Descriptor.</param>
@@ -517,7 +517,7 @@ namespace DiscImageChef.Decoders.SCSI
} }
/// <summary> /// <summary>
/// Decodes the sense key specific sense data descriptor /// Decodes the sense key specific sense data descriptor
/// </summary> /// </summary>
/// <returns>The sense key specific sense data descriptor.</returns> /// <returns>The sense key specific sense data descriptor.</returns>
/// <param name="descriptor">Descriptor.</param> /// <param name="descriptor">Descriptor.</param>
@@ -531,7 +531,7 @@ namespace DiscImageChef.Decoders.SCSI
} }
/// <summary> /// <summary>
/// Decodes the field replaceable unit sense data descriptor /// Decodes the field replaceable unit sense data descriptor
/// </summary> /// </summary>
/// <returns>The field replaceable unit sense data descriptor.</returns> /// <returns>The field replaceable unit sense data descriptor.</returns>
/// <param name="descriptor">Descriptor.</param> /// <param name="descriptor">Descriptor.</param>
@@ -543,7 +543,7 @@ namespace DiscImageChef.Decoders.SCSI
} }
/// <summary> /// <summary>
/// Decodes the another progress indication sense data descriptor /// Decodes the another progress indication sense data descriptor
/// </summary> /// </summary>
/// <returns>The another progress indication sense data descriptor.</returns> /// <returns>The another progress indication sense data descriptor.</returns>
/// <param name="descriptor">Descriptor.</param> /// <param name="descriptor">Descriptor.</param>

File diff suppressed because it is too large Load Diff

View File

@@ -189,8 +189,10 @@ namespace DiscImageChef.Decoders.Sega
provider); provider);
} }
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body #pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
catch { // ignored catch
} {
// ignored
}
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body #pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
} }

View File

@@ -74,36 +74,36 @@ namespace DiscImageChef.Decoders.Xbox
public struct XboxDMI public struct XboxDMI
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Bytes 4 to 7 /// Bytes 4 to 7
/// 0x01 in XGD /// 0x01 in XGD
/// </summary> /// </summary>
public uint Version; public uint Version;
/// <summary> /// <summary>
/// Bytes 12 to 16 /// Bytes 12 to 16
/// Catalogue number in XX-XXXXX-X /// Catalogue number in XX-XXXXX-X
/// </summary> /// </summary>
public string CatalogNumber; public string CatalogNumber;
/// <summary> /// <summary>
/// Bytes 20 to 27 /// Bytes 20 to 27
/// DMI timestamp /// DMI timestamp
/// </summary> /// </summary>
public long Timestamp; public long Timestamp;
} }
@@ -111,42 +111,42 @@ namespace DiscImageChef.Decoders.Xbox
public struct Xbox360DMI public struct Xbox360DMI
{ {
/// <summary> /// <summary>
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public ushort DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved1; public byte Reserved1;
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Reserved /// Reserved
/// </summary> /// </summary>
public byte Reserved2; public byte Reserved2;
/// <summary> /// <summary>
/// Bytes 4 to 7 /// Bytes 4 to 7
/// 0x02 in XGD2 and XGD3 /// 0x02 in XGD2 and XGD3
/// </summary> /// </summary>
public uint Version; public uint Version;
/// <summary> /// <summary>
/// Bytes 20 to 27 /// Bytes 20 to 27
/// DMI timestamp /// DMI timestamp
/// </summary> /// </summary>
public long Timestamp; public long Timestamp;
/// <summary> /// <summary>
/// Bytes 36 to 51 /// Bytes 36 to 51
/// Media ID in hex XXXXXXXXXXXX-XXXXXXXX /// Media ID in hex XXXXXXXXXXXX-XXXXXXXX
/// </summary> /// </summary>
public byte[] MediaID; public byte[] MediaID;
/// <summary> /// <summary>
/// Bytes 68 to 83 /// Bytes 68 to 83
/// Catalogue number in XX-XXXX-XX-XXY-XXX, Y not always exists /// Catalogue number in XX-XXXX-XX-XXY-XXX, Y not always exists
/// </summary> /// </summary>
public string CatalogNumber; public string CatalogNumber;
} }
@@ -235,7 +235,8 @@ namespace DiscImageChef.Decoders.Xbox
sb.Append("-"); sb.Append("-");
switch(decoded.CatalogNumber.Length) { switch(decoded.CatalogNumber.Length)
{
case 13: case 13:
for(int i = 8; i < 10; i++) sb.AppendFormat("{0}", decoded.CatalogNumber[i]); for(int i = 8; i < 10; i++) sb.AppendFormat("{0}", decoded.CatalogNumber[i]);

View File

@@ -46,148 +46,148 @@ namespace DiscImageChef.Decoders.Xbox
public struct SecuritySector public struct SecuritySector
{ {
/// <summary> /// <summary>
/// Byte 0, bits 7 to 4 /// Byte 0, bits 7 to 4
/// Disk category field /// Disk category field
/// </summary> /// </summary>
public DiskCategory DiskCategory; public DiskCategory DiskCategory;
/// <summary> /// <summary>
/// Byte 0, bits 3 to 0 /// Byte 0, bits 3 to 0
/// Media version /// Media version
/// </summary> /// </summary>
public byte PartVersion; public byte PartVersion;
/// <summary> /// <summary>
/// Byte 1, bits 7 to 4 /// Byte 1, bits 7 to 4
/// 120mm if 0, 80mm if 1. If UMD (60mm) 0 also. Reserved rest of values /// 120mm if 0, 80mm if 1. If UMD (60mm) 0 also. Reserved rest of values
/// </summary> /// </summary>
public DVDSize DiscSize; public DVDSize DiscSize;
/// <summary> /// <summary>
/// Byte 1, bits 3 to 0 /// Byte 1, bits 3 to 0
/// Maximum data rate /// Maximum data rate
/// </summary> /// </summary>
public MaximumRateField MaximumRate; public MaximumRateField MaximumRate;
/// <summary> /// <summary>
/// Byte 2, bit 7 /// Byte 2, bit 7
/// Reserved /// Reserved
/// </summary> /// </summary>
public bool Reserved3; public bool Reserved3;
/// <summary> /// <summary>
/// Byte 2, bits 6 to 5 /// Byte 2, bits 6 to 5
/// Number of layers /// Number of layers
/// </summary> /// </summary>
public byte Layers; public byte Layers;
/// <summary> /// <summary>
/// Byte 2, bit 4 /// Byte 2, bit 4
/// Track path /// Track path
/// </summary> /// </summary>
public bool TrackPath; public bool TrackPath;
/// <summary> /// <summary>
/// Byte 2, bits 3 to 0 /// Byte 2, bits 3 to 0
/// Layer type /// Layer type
/// </summary> /// </summary>
public LayerTypeFieldMask LayerType; public LayerTypeFieldMask LayerType;
/// <summary> /// <summary>
/// Byte 3, bits 7 to 4 /// Byte 3, bits 7 to 4
/// Linear density field /// Linear density field
/// </summary> /// </summary>
public LinearDensityField LinearDensity; public LinearDensityField LinearDensity;
/// <summary> /// <summary>
/// Byte 3, bits 3 to 0 /// Byte 3, bits 3 to 0
/// Track density field /// Track density field
/// </summary> /// </summary>
public TrackDensityField TrackDensity; public TrackDensityField TrackDensity;
/// <summary> /// <summary>
/// Bytes 4 to 7 /// Bytes 4 to 7
/// PSN where Data Area starts /// PSN where Data Area starts
/// </summary> /// </summary>
public uint DataAreaStartPSN; public uint DataAreaStartPSN;
/// <summary> /// <summary>
/// Bytes 8 to 11 /// Bytes 8 to 11
/// PSN where Data Area ends /// PSN where Data Area ends
/// </summary> /// </summary>
public uint DataAreaEndPSN; public uint DataAreaEndPSN;
/// <summary> /// <summary>
/// Bytes 12 to 15 /// Bytes 12 to 15
/// PSN where Data Area ends in Layer 0 /// PSN where Data Area ends in Layer 0
/// </summary> /// </summary>
public uint Layer0EndPSN; public uint Layer0EndPSN;
/// <summary> /// <summary>
/// Byte 27 /// Byte 27
/// Always 0x06 on XGD3 /// Always 0x06 on XGD3
/// </summary> /// </summary>
public byte Unknown1; public byte Unknown1;
/// <summary> /// <summary>
/// Bytes 256 to 283 /// Bytes 256 to 283
/// Unknown, XGD2 and XGD3 /// Unknown, XGD2 and XGD3
/// </summary> /// </summary>
public byte[] Unknown2; public byte[] Unknown2;
/// <summary> /// <summary>
/// Bytes 284 to 719 /// Bytes 284 to 719
/// Unknown, XGD3 /// Unknown, XGD3
/// </summary> /// </summary>
public byte[] Unknown3; public byte[] Unknown3;
/// <summary> /// <summary>
/// Bytes 720 to 723 /// Bytes 720 to 723
/// Unknown /// Unknown
/// </summary> /// </summary>
public byte[] Unknown4; public byte[] Unknown4;
/// <summary> /// <summary>
/// Bytes 724 to 767 /// Bytes 724 to 767
/// Unknown, XGD3 /// Unknown, XGD3
/// </summary> /// </summary>
public byte[] Unknown5; public byte[] Unknown5;
/// <summary> /// <summary>
/// Byte 768 /// Byte 768
/// Version of challenge table /// Version of challenge table
/// </summary> /// </summary>
public byte ChallengeTableVersion; public byte ChallengeTableVersion;
/// <summary> /// <summary>
/// Byte 769 /// Byte 769
/// Number of challenge entries /// Number of challenge entries
/// </summary> /// </summary>
public byte NoChallengeEntries; public byte NoChallengeEntries;
/// <summary> /// <summary>
/// Bytes 770 to 1022 /// Bytes 770 to 1022
/// Unknown /// Unknown
/// </summary> /// </summary>
public ChallengeEntry[] ChallengeEntries; public ChallengeEntry[] ChallengeEntries;
/// <summary> /// <summary>
/// Byte 1023 /// Byte 1023
/// Unknown /// Unknown
/// </summary> /// </summary>
public byte Unknown6; public byte Unknown6;
/// <summary> /// <summary>
/// Bytes 1052 to 1099 /// Bytes 1052 to 1099
/// Unknown, XGD1 only /// Unknown, XGD1 only
/// </summary> /// </summary>
public byte[] Unknown7; public byte[] Unknown7;
/// <summary> /// <summary>
/// Bytes 1120 to 1135 /// Bytes 1120 to 1135
/// Unknown, XGD2 and XGD3 /// Unknown, XGD2 and XGD3
/// </summary> /// </summary>
public byte[] Unknown8; public byte[] Unknown8;
/// <summary> /// <summary>
/// Bytes 1180 to 1195 /// Bytes 1180 to 1195
/// Unknown /// Unknown
/// </summary> /// </summary>
public byte[] Unknown9; public byte[] Unknown9;
/// <summary> /// <summary>
/// Bytes 1208 to 1511 /// Bytes 1208 to 1511
/// Unknown /// Unknown
/// </summary> /// </summary>
public byte[] Unknown10; public byte[] Unknown10;
/// <summary> /// <summary>
/// Bytes 1528 to 1632 /// Bytes 1528 to 1632
/// </summary> /// </summary>
public byte[] Unknown11; public byte[] Unknown11;
/// <summary> /// <summary>
/// Bytes 1633 to 1839 /// Bytes 1633 to 1839
/// Security extents, 23 entries of 9 bytes /// Security extents, 23 entries of 9 bytes
/// </summary> /// </summary>
public SecuritySectorExtent[] Extents; public SecuritySectorExtent[] Extents;
/// <summary> /// <summary>
/// Bytes 1840 to 2047 /// Bytes 1840 to 2047
/// Copy of the security extents, 23 entries of 9 bytes /// Copy of the security extents, 23 entries of 9 bytes
/// </summary> /// </summary>
public SecuritySectorExtent[] ExtentsCopy; public SecuritySectorExtent[] ExtentsCopy;
} }
@@ -195,18 +195,18 @@ namespace DiscImageChef.Decoders.Xbox
public struct SecuritySectorExtent public struct SecuritySectorExtent
{ {
/// <summary> /// <summary>
/// Bytes 0 to 2 /// Bytes 0 to 2
/// Unknown /// Unknown
/// </summary> /// </summary>
public uint Unknown; public uint Unknown;
/// <summary> /// <summary>
/// Bytes 3 to 5 /// Bytes 3 to 5
/// Start PSN of this security extent /// Start PSN of this security extent
/// </summary> /// </summary>
public uint StartPSN; public uint StartPSN;
/// <summary> /// <summary>
/// Bytes 6 to 8 /// Bytes 6 to 8
/// End PSN of this security extent /// End PSN of this security extent
/// </summary> /// </summary>
public uint EndPSN; public uint EndPSN;
} }
@@ -265,9 +265,8 @@ namespace DiscImageChef.Decoders.Xbox
Array.Copy(response, 724, ss.Unknown5, 0, 43); Array.Copy(response, 724, ss.Unknown5, 0, 43);
for(int i = 0; i < 23; i++) for(int i = 0; i < 23; i++)
{
ss.ChallengeEntries[i] = new ChallengeEntry ss.ChallengeEntries[i] = new ChallengeEntry
{ {
Level = response[770 + i * 11 + 0], Level = response[770 + i * 11 + 0],
ChallengeId = response[770 + i * 11 + 1], ChallengeId = response[770 + i * 11 + 1],
ChallengeValue = ChallengeValue =
@@ -277,7 +276,6 @@ namespace DiscImageChef.Decoders.Xbox
ResponseValue = (uint)((response[770 + i * 11 + 7] << 24) + (response[770 + i * 11 + 8] << 16) + ResponseValue = (uint)((response[770 + i * 11 + 7] << 24) + (response[770 + i * 11 + 8] << 16) +
(response[770 + i * 11 + 9] << 8) + response[770 + i * 11 + 10]) (response[770 + i * 11 + 9] << 8) + response[770 + i * 11 + 10])
}; };
}
Array.Copy(response, 1052, ss.Unknown7, 0, 48); Array.Copy(response, 1052, ss.Unknown7, 0, 48);
Array.Copy(response, 1120, ss.Unknown8, 0, 16); Array.Copy(response, 1120, ss.Unknown8, 0, 16);
@@ -285,9 +283,8 @@ namespace DiscImageChef.Decoders.Xbox
Array.Copy(response, 1208, ss.Unknown10, 0, 303); Array.Copy(response, 1208, ss.Unknown10, 0, 303);
Array.Copy(response, 1528, ss.Unknown11, 0, 104); Array.Copy(response, 1528, ss.Unknown11, 0, 104);
for(int i = 0; i < 23; i++) for(int i = 0; i < 23; i++)
{
ss.Extents[i] = new SecuritySectorExtent ss.Extents[i] = new SecuritySectorExtent
{ {
Unknown = Unknown =
(uint)((response[1633 + i * 9 + 0] << 16) + (response[1633 + i * 9 + 1] << 8) + (uint)((response[1633 + i * 9 + 0] << 16) + (response[1633 + i * 9 + 1] << 8) +
response[1633 + i * 9 + 2]), response[1633 + i * 9 + 2]),
@@ -297,12 +294,10 @@ namespace DiscImageChef.Decoders.Xbox
EndPSN = (uint)((response[1633 + i * 9 + 6] << 16) + (response[1633 + i * 9 + 7] << 8) + EndPSN = (uint)((response[1633 + i * 9 + 6] << 16) + (response[1633 + i * 9 + 7] << 8) +
response[1633 + i * 9 + 8]) response[1633 + i * 9 + 8])
}; };
}
for(int i = 0; i < 23; i++) for(int i = 0; i < 23; i++)
{
ss.ExtentsCopy[i] = new SecuritySectorExtent ss.ExtentsCopy[i] = new SecuritySectorExtent
{ {
Unknown = Unknown =
(uint)((response[1840 + i * 9 + 0] << 16) + (response[1840 + i * 9 + 1] << 8) + (uint)((response[1840 + i * 9 + 0] << 16) + (response[1840 + i * 9 + 1] << 8) +
response[1840 + i * 9 + 2]), response[1840 + i * 9 + 2]),
@@ -312,7 +307,6 @@ namespace DiscImageChef.Decoders.Xbox
EndPSN = (uint)((response[1840 + i * 9 + 6] << 16) + (response[1840 + i * 9 + 7] << 8) + EndPSN = (uint)((response[1840 + i * 9 + 6] << 16) + (response[1840 + i * 9 + 7] << 8) +
response[1840 + i * 9 + 8]) response[1840 + i * 9 + 8])
}; };
}
return ss; return ss;
} }