mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: Final cleanup of DiscImageChef.Decoders.
This commit is contained in:
1242
ATA/Identify.cs
1242
ATA/Identify.cs
File diff suppressed because it is too large
Load Diff
@@ -38,19 +38,19 @@ using DiscImageChef.Console;
|
||||
namespace DiscImageChef.Decoders.Bluray
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -112,23 +112,23 @@ namespace DiscImageChef.Decoders.Bluray
|
||||
public struct BurstCuttingArea
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Always 66
|
||||
/// Bytes 0 to 1
|
||||
/// Always 66
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Byte 4 to 67
|
||||
/// BCA data
|
||||
/// Byte 4 to 67
|
||||
/// BCA data
|
||||
/// </summary>
|
||||
public byte[] BCA;
|
||||
}
|
||||
|
||||
@@ -38,19 +38,19 @@ using DiscImageChef.Console;
|
||||
namespace DiscImageChef.Decoders.Bluray
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -137,58 +137,58 @@ namespace DiscImageChef.Decoders.Bluray
|
||||
public struct CartridgeStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Always 6
|
||||
/// Bytes 0 to 1
|
||||
/// Always 6
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Byte 4, bit 7
|
||||
/// Medium is inserted in a cartridge
|
||||
/// Byte 4, bit 7
|
||||
/// Medium is inserted in a cartridge
|
||||
/// </summary>
|
||||
public bool Cartridge;
|
||||
/// <summary>
|
||||
/// Byte 4, bit 6
|
||||
/// Medium taken out / put in a cartridge
|
||||
/// Byte 4, bit 6
|
||||
/// Medium taken out / put in a cartridge
|
||||
/// </summary>
|
||||
public bool OUT;
|
||||
/// <summary>
|
||||
/// Byte 4, bits 5 to 3
|
||||
/// Reserved
|
||||
/// Byte 4, bits 5 to 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved3;
|
||||
/// <summary>
|
||||
/// Byte 4, bit 2
|
||||
/// Cartridge sets write protection
|
||||
/// Byte 4, bit 2
|
||||
/// Cartridge sets write protection
|
||||
/// </summary>
|
||||
public bool CWP;
|
||||
/// <summary>
|
||||
/// Byte 4, bits 1 to 0
|
||||
/// Reserved
|
||||
/// Byte 4, bits 1 to 0
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved4;
|
||||
/// <summary>
|
||||
/// Byte 5
|
||||
/// Reserved
|
||||
/// Byte 5
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved5;
|
||||
/// <summary>
|
||||
/// Byte 6
|
||||
/// Reserved
|
||||
/// Byte 6
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved6;
|
||||
/// <summary>
|
||||
/// Byte 7
|
||||
/// Reserved
|
||||
/// Byte 7
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved7;
|
||||
}
|
||||
|
||||
128
Blu-ray/DDS.cs
128
Blu-ray/DDS.cs
@@ -38,19 +38,19 @@ using DiscImageChef.Console;
|
||||
namespace DiscImageChef.Decoders.Bluray
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -60,7 +60,7 @@ namespace DiscImageChef.Decoders.Bluray
|
||||
{
|
||||
#region Private constants
|
||||
/// <summary>
|
||||
/// Disc Definition Structure Identifier "DS"
|
||||
/// Disc Definition Structure Identifier "DS"
|
||||
/// </summary>
|
||||
const ushort DDSIdentifier = 0x4453;
|
||||
#endregion Private constants
|
||||
@@ -162,128 +162,128 @@ namespace DiscImageChef.Decoders.Bluray
|
||||
public struct DiscDefinitionStructure
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data Length
|
||||
/// Bytes 0 to 1
|
||||
/// Data Length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Bytes 4 to 5
|
||||
/// "DS"
|
||||
/// Bytes 4 to 5
|
||||
/// "DS"
|
||||
/// </summary>
|
||||
public ushort Signature;
|
||||
/// <summary>
|
||||
/// Byte 6
|
||||
/// DDS format
|
||||
/// Byte 6
|
||||
/// DDS format
|
||||
/// </summary>
|
||||
public byte Format;
|
||||
/// <summary>
|
||||
/// Byte 7
|
||||
/// Reserved
|
||||
/// Byte 7
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved3;
|
||||
/// <summary>
|
||||
/// Bytes 8 to 11
|
||||
/// DDS update count
|
||||
/// Bytes 8 to 11
|
||||
/// DDS update count
|
||||
/// </summary>
|
||||
public uint UpdateCount;
|
||||
/// <summary>
|
||||
/// Bytes 12 to 19
|
||||
/// Reserved
|
||||
/// Bytes 12 to 19
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public ulong Reserved4;
|
||||
/// <summary>
|
||||
/// Bytes 20 to 23
|
||||
/// First PSN of Drive Area
|
||||
/// Bytes 20 to 23
|
||||
/// First PSN of Drive Area
|
||||
/// </summary>
|
||||
public uint DriveAreaPSN;
|
||||
/// <summary>
|
||||
/// Bytes 24 to 27
|
||||
/// Reserved
|
||||
/// Bytes 24 to 27
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public uint Reserved5;
|
||||
/// <summary>
|
||||
/// Bytes 28 to 31
|
||||
/// First PSN of Defect List
|
||||
/// Bytes 28 to 31
|
||||
/// First PSN of Defect List
|
||||
/// </summary>
|
||||
public uint DefectListPSN;
|
||||
/// <summary>
|
||||
/// Bytes 32 to 35
|
||||
/// Reserved
|
||||
/// Bytes 32 to 35
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public uint Reserved6;
|
||||
/// <summary>
|
||||
/// Bytes 36 to 39
|
||||
/// PSN of LSN 0 of user data area
|
||||
/// Bytes 36 to 39
|
||||
/// PSN of LSN 0 of user data area
|
||||
/// </summary>
|
||||
public uint PSNofLSNZero;
|
||||
/// <summary>
|
||||
/// Bytes 40 to 43
|
||||
/// Last LSN of user data area
|
||||
/// Bytes 40 to 43
|
||||
/// Last LSN of user data area
|
||||
/// </summary>
|
||||
public uint LastUserAreaLSN;
|
||||
/// <summary>
|
||||
/// Bytes 44 to 47
|
||||
/// ISA0 size
|
||||
/// Bytes 44 to 47
|
||||
/// ISA0 size
|
||||
/// </summary>
|
||||
public uint ISA0;
|
||||
/// <summary>
|
||||
/// Bytes 48 to 51
|
||||
/// OSA size
|
||||
/// Bytes 48 to 51
|
||||
/// OSA size
|
||||
/// </summary>
|
||||
public uint OSA;
|
||||
/// <summary>
|
||||
/// Bytes 52 to 55
|
||||
/// ISA1 size
|
||||
/// Bytes 52 to 55
|
||||
/// ISA1 size
|
||||
/// </summary>
|
||||
public uint ISA1;
|
||||
/// <summary>
|
||||
/// Byte 56
|
||||
/// Spare Area full flags
|
||||
/// Byte 56
|
||||
/// Spare Area full flags
|
||||
/// </summary>
|
||||
public byte SpareAreaFullFlags;
|
||||
/// <summary>
|
||||
/// Byte 57
|
||||
/// Reserved
|
||||
/// Byte 57
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved7;
|
||||
/// <summary>
|
||||
/// Byte 58
|
||||
/// Disc type specific field
|
||||
/// Byte 58
|
||||
/// Disc type specific field
|
||||
/// </summary>
|
||||
public byte DiscTypeSpecificField1;
|
||||
/// <summary>
|
||||
/// Byte 59
|
||||
/// Reserved
|
||||
/// Byte 59
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved8;
|
||||
/// <summary>
|
||||
/// Byte 60 to 63
|
||||
/// Disc type specific field
|
||||
/// Byte 60 to 63
|
||||
/// Disc type specific field
|
||||
/// </summary>
|
||||
public uint DiscTypeSpecificField2;
|
||||
/// <summary>
|
||||
/// Byte 64 to 67
|
||||
/// Reserved
|
||||
/// Byte 64 to 67
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public uint Reserved9;
|
||||
/// <summary>
|
||||
/// Bytes 68 to 99
|
||||
/// Status bits of INFO1/2 and PAC1/2 on L0 and L1
|
||||
/// Bytes 68 to 99
|
||||
/// Status bits of INFO1/2 and PAC1/2 on L0 and L1
|
||||
/// </summary>
|
||||
public byte[] StatusBits;
|
||||
/// <summary>
|
||||
/// Bytes 100 to end
|
||||
/// Disc type specific data
|
||||
/// Bytes 100 to end
|
||||
/// Disc type specific data
|
||||
/// </summary>
|
||||
public byte[] DiscTypeSpecificData;
|
||||
}
|
||||
|
||||
100
Blu-ray/DI.cs
100
Blu-ray/DI.cs
@@ -39,19 +39,19 @@ using DiscImageChef.Console;
|
||||
namespace DiscImageChef.Decoders.Bluray
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -65,7 +65,7 @@ namespace DiscImageChef.Decoders.Bluray
|
||||
const string DiscTypeBDR = "BDR";
|
||||
|
||||
/// <summary>
|
||||
/// Disc Information Unit Identifier "DI"
|
||||
/// Disc Information Unit Identifier "DI"
|
||||
/// </summary>
|
||||
const ushort DIUIdentifier = 0x4449;
|
||||
#endregion Private constants
|
||||
@@ -204,23 +204,23 @@ namespace DiscImageChef.Decoders.Bluray
|
||||
public struct DiscInformation
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Always 4098
|
||||
/// Bytes 0 to 1
|
||||
/// Always 4098
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Byte 4 to 4099
|
||||
/// Disc information units
|
||||
/// Byte 4 to 4099
|
||||
/// Disc information units
|
||||
/// </summary>
|
||||
public DiscInformationUnits[] Units;
|
||||
}
|
||||
@@ -228,73 +228,73 @@ namespace DiscImageChef.Decoders.Bluray
|
||||
public struct DiscInformationUnits
|
||||
{
|
||||
/// <summary>
|
||||
/// Byte 0
|
||||
/// "DI"
|
||||
/// Byte 0
|
||||
/// "DI"
|
||||
/// </summary>
|
||||
public ushort Signature;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Disc information format
|
||||
/// Byte 2
|
||||
/// Disc information format
|
||||
/// </summary>
|
||||
public byte Format;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Number of DI units per block
|
||||
/// Byte 3
|
||||
/// Number of DI units per block
|
||||
/// </summary>
|
||||
public byte UnitsPerBlock;
|
||||
/// <summary>
|
||||
/// Byte 4
|
||||
/// Reserved for BD-ROM, legacy information for BD-R/-RE
|
||||
/// Byte 4
|
||||
/// Reserved for BD-ROM, legacy information for BD-R/-RE
|
||||
/// </summary>
|
||||
public byte Legacy;
|
||||
/// <summary>
|
||||
/// Byte 5
|
||||
/// Sequence number for this DI unit
|
||||
/// Byte 5
|
||||
/// Sequence number for this DI unit
|
||||
/// </summary>
|
||||
public byte Sequence;
|
||||
/// <summary>
|
||||
/// Byte 6
|
||||
/// Number of bytes used by this DI unit, should be 64 for BD-ROM and 112 for BD-R/-RE
|
||||
/// Byte 6
|
||||
/// Number of bytes used by this DI unit, should be 64 for BD-ROM and 112 for BD-R/-RE
|
||||
/// </summary>
|
||||
public byte Length;
|
||||
/// <summary>
|
||||
/// Byte 7
|
||||
/// Reserved
|
||||
/// Byte 7
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved;
|
||||
/// <summary>
|
||||
/// Bytes 8 to 10
|
||||
/// Disc type identifier
|
||||
/// Bytes 8 to 10
|
||||
/// Disc type identifier
|
||||
/// </summary>
|
||||
public byte[] DiscTypeIdentifier;
|
||||
/// <summary>
|
||||
/// Byte 11
|
||||
/// Disc size/class/version
|
||||
/// Byte 11
|
||||
/// Disc size/class/version
|
||||
/// </summary>
|
||||
public byte DiscSizeClassVersion;
|
||||
/// <summary>
|
||||
/// Bytes 12 to 63 for BD-ROM, bytes 12 to 99 for BD-R/-RE
|
||||
/// Format dependent contents, disclosed in private blu-ray specifications
|
||||
/// Bytes 12 to 63 for BD-ROM, bytes 12 to 99 for BD-R/-RE
|
||||
/// Format dependent contents, disclosed in private blu-ray specifications
|
||||
/// </summary>
|
||||
public byte[] FormatDependentContents;
|
||||
/// <summary>
|
||||
/// Bytes 100 to 105, BD-R/-RE only
|
||||
/// Manufacturer ID
|
||||
/// Bytes 100 to 105, BD-R/-RE only
|
||||
/// Manufacturer ID
|
||||
/// </summary>
|
||||
public byte[] ManufacturerID;
|
||||
/// <summary>
|
||||
/// Bytes 106 to 108, BD-R/-RE only
|
||||
/// Media type ID
|
||||
/// Bytes 106 to 108, BD-R/-RE only
|
||||
/// Media type ID
|
||||
/// </summary>
|
||||
public byte[] MediaTypeID;
|
||||
/// <summary>
|
||||
/// Bytes 109 to 110, BD-R/-RE only
|
||||
/// Timestamp
|
||||
/// Bytes 109 to 110, BD-R/-RE only
|
||||
/// Timestamp
|
||||
/// </summary>
|
||||
public ushort TimeStamp;
|
||||
/// <summary>
|
||||
/// Byte 111
|
||||
/// Product revision number
|
||||
/// Byte 111
|
||||
/// Product revision number
|
||||
/// </summary>
|
||||
public byte ProductRevisionNumber;
|
||||
}
|
||||
|
||||
@@ -38,19 +38,19 @@ using DiscImageChef.Console;
|
||||
namespace DiscImageChef.Decoders.Bluray
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -114,33 +114,33 @@ namespace DiscImageChef.Decoders.Bluray
|
||||
public struct SpareAreaInformation
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Always 14
|
||||
/// Bytes 0 to 1
|
||||
/// Always 14
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Bytes 4 to 7
|
||||
/// Reserved
|
||||
/// Bytes 4 to 7
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public uint Reserved3;
|
||||
/// <summary>
|
||||
/// Bytes 8 to 11
|
||||
/// Free spare blocks
|
||||
/// Bytes 8 to 11
|
||||
/// Free spare blocks
|
||||
/// </summary>
|
||||
public uint FreeSpareBlocks;
|
||||
/// <summary>
|
||||
/// Bytes 12 to 15
|
||||
/// Allocated spare blocks
|
||||
/// Bytes 12 to 15
|
||||
/// Allocated spare blocks
|
||||
/// </summary>
|
||||
public uint AllocatedSpareBlocks;
|
||||
}
|
||||
|
||||
219
CD/ATIP.cs
219
CD/ATIP.cs
@@ -38,19 +38,19 @@ using DiscImageChef.Console;
|
||||
namespace DiscImageChef.Decoders.CD
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -61,163 +61,163 @@ namespace DiscImageChef.Decoders.CD
|
||||
public struct CDATIP
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 1 to 0
|
||||
/// Total size of returned session information minus this field
|
||||
/// Bytes 1 to 0
|
||||
/// Total size of returned session information minus this field
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Byte 4, bits 7 to 4
|
||||
/// Indicative target writing power
|
||||
/// Byte 4, bits 7 to 4
|
||||
/// Indicative target writing power
|
||||
/// </summary>
|
||||
public byte ITWP;
|
||||
/// <summary>
|
||||
/// Byte 4, bit 3
|
||||
/// Set if DDCD
|
||||
/// Byte 4, bit 3
|
||||
/// Set if DDCD
|
||||
/// </summary>
|
||||
public bool DDCD;
|
||||
/// <summary>
|
||||
/// Byte 4, bits 2 to 0
|
||||
/// Reference speed
|
||||
/// Byte 4, bits 2 to 0
|
||||
/// Reference speed
|
||||
/// </summary>
|
||||
public byte ReferenceSpeed;
|
||||
/// <summary>
|
||||
/// Byte 5, bit 7
|
||||
/// Always unset
|
||||
/// Byte 5, bit 7
|
||||
/// Always unset
|
||||
/// </summary>
|
||||
public bool AlwaysZero;
|
||||
/// <summary>
|
||||
/// Byte 5, bit 6
|
||||
/// Unrestricted media
|
||||
/// Byte 5, bit 6
|
||||
/// Unrestricted media
|
||||
/// </summary>
|
||||
public bool URU;
|
||||
/// <summary>
|
||||
/// Byte 5, bits 5 to 0
|
||||
/// Reserved
|
||||
/// Byte 5, bits 5 to 0
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved3;
|
||||
/// <summary>
|
||||
/// Byte 6, bit 7
|
||||
/// Always set
|
||||
/// Byte 6, bit 7
|
||||
/// Always set
|
||||
/// </summary>
|
||||
public bool AlwaysOne;
|
||||
/// <summary>
|
||||
/// Byte 6, bit 6
|
||||
/// Set if rewritable (CD-RW or DDCD-RW)
|
||||
/// Byte 6, bit 6
|
||||
/// Set if rewritable (CD-RW or DDCD-RW)
|
||||
/// </summary>
|
||||
public bool DiscType;
|
||||
/// <summary>
|
||||
/// Byte 6, bits 5 to 3
|
||||
/// Disc subtype
|
||||
/// Byte 6, bits 5 to 3
|
||||
/// Disc subtype
|
||||
/// </summary>
|
||||
public byte DiscSubType;
|
||||
/// <summary>
|
||||
/// Byte 6, bit 2
|
||||
/// A1 values are valid
|
||||
/// Byte 6, bit 2
|
||||
/// A1 values are valid
|
||||
/// </summary>
|
||||
public bool A1Valid;
|
||||
/// <summary>
|
||||
/// Byte 6, bit 1
|
||||
/// A2 values are valid
|
||||
/// Byte 6, bit 1
|
||||
/// A2 values are valid
|
||||
/// </summary>
|
||||
public bool A2Valid;
|
||||
/// <summary>
|
||||
/// Byte 6, bit 0
|
||||
/// A3 values are valid
|
||||
/// Byte 6, bit 0
|
||||
/// A3 values are valid
|
||||
/// </summary>
|
||||
public bool A3Valid;
|
||||
/// <summary>
|
||||
/// Byte 7
|
||||
/// Reserved
|
||||
/// Byte 7
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved4;
|
||||
/// <summary>
|
||||
/// Byte 8
|
||||
/// ATIP Start time of Lead-In (Minute)
|
||||
/// Byte 8
|
||||
/// ATIP Start time of Lead-In (Minute)
|
||||
/// </summary>
|
||||
public byte LeadInStartMin;
|
||||
/// <summary>
|
||||
/// Byte 9
|
||||
/// ATIP Start time of Lead-In (Second)
|
||||
/// Byte 9
|
||||
/// ATIP Start time of Lead-In (Second)
|
||||
/// </summary>
|
||||
public byte LeadInStartSec;
|
||||
/// <summary>
|
||||
/// Byte 10
|
||||
/// ATIP Start time of Lead-In (Frame)
|
||||
/// Byte 10
|
||||
/// ATIP Start time of Lead-In (Frame)
|
||||
/// </summary>
|
||||
public byte LeadInStartFrame;
|
||||
/// <summary>
|
||||
/// Byte 11
|
||||
/// Reserved
|
||||
/// Byte 11
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved5;
|
||||
/// <summary>
|
||||
/// Byte 12
|
||||
/// ATIP Last possible start time of Lead-Out (Minute)
|
||||
/// Byte 12
|
||||
/// ATIP Last possible start time of Lead-Out (Minute)
|
||||
/// </summary>
|
||||
public byte LeadOutStartMin;
|
||||
/// <summary>
|
||||
/// Byte 13
|
||||
/// ATIP Last possible start time of Lead-Out (Second)
|
||||
/// Byte 13
|
||||
/// ATIP Last possible start time of Lead-Out (Second)
|
||||
/// </summary>
|
||||
public byte LeadOutStartSec;
|
||||
/// <summary>
|
||||
/// Byte 14
|
||||
/// ATIP Last possible start time of Lead-Out (Frame)
|
||||
/// Byte 14
|
||||
/// ATIP Last possible start time of Lead-Out (Frame)
|
||||
/// </summary>
|
||||
public byte LeadOutStartFrame;
|
||||
/// <summary>
|
||||
/// Byte 15
|
||||
/// Reserved
|
||||
/// Byte 15
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved6;
|
||||
/// <summary>
|
||||
/// Bytes 16 to 18
|
||||
/// A1 values
|
||||
/// Bytes 16 to 18
|
||||
/// A1 values
|
||||
/// </summary>
|
||||
public byte[] A1Values;
|
||||
/// <summary>
|
||||
/// Byte 19
|
||||
/// Reserved
|
||||
/// Byte 19
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved7;
|
||||
/// <summary>
|
||||
/// Bytes 20 to 22
|
||||
/// A2 values
|
||||
/// Bytes 20 to 22
|
||||
/// A2 values
|
||||
/// </summary>
|
||||
public byte[] A2Values;
|
||||
/// <summary>
|
||||
/// Byte 23
|
||||
/// Reserved
|
||||
/// Byte 23
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved8;
|
||||
/// <summary>
|
||||
/// Bytes 24 to 26
|
||||
/// A3 values
|
||||
/// Bytes 24 to 26
|
||||
/// A3 values
|
||||
/// </summary>
|
||||
public byte[] A3Values;
|
||||
/// <summary>
|
||||
/// Byte 27
|
||||
/// Reserved
|
||||
/// Byte 27
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved9;
|
||||
/// <summary>
|
||||
/// Bytes 28 to 30
|
||||
/// S4 values
|
||||
/// Bytes 28 to 30
|
||||
/// S4 values
|
||||
/// </summary>
|
||||
public byte[] S4Values;
|
||||
/// <summary>
|
||||
/// Byte 31
|
||||
/// Reserved
|
||||
/// Byte 31
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved10;
|
||||
}
|
||||
@@ -434,11 +434,9 @@ namespace DiscImageChef.Decoders.CD
|
||||
|
||||
if(response.DiscType) sb.AppendLine("Disc uses phase change");
|
||||
else
|
||||
{
|
||||
sb.AppendLine(type < 5
|
||||
? "Disc uses long strategy type dye (Cyanine, AZO, etc...)"
|
||||
: "Disc uses short strategy type dye (Phthalocyanine, etc...)");
|
||||
}
|
||||
|
||||
string manufacturer = ManufacturerFromATIP(response.LeadInStartSec, frm);
|
||||
|
||||
@@ -458,7 +456,8 @@ namespace DiscImageChef.Decoders.CD
|
||||
switch(sec)
|
||||
{
|
||||
case 15:
|
||||
switch(frm) {
|
||||
switch(frm)
|
||||
{
|
||||
case 00: return "TDK Corporation";
|
||||
case 10: return "Ritek Co.";
|
||||
case 20: return "Mitsubishi Chemical Corporation";
|
||||
@@ -467,7 +466,8 @@ namespace DiscImageChef.Decoders.CD
|
||||
|
||||
break;
|
||||
case 16:
|
||||
switch(frm) {
|
||||
switch(frm)
|
||||
{
|
||||
case 20: return "Shenzen SG&Gast Digital Optical Discs";
|
||||
case 30: return "Grand Advance Technology Ltd.";
|
||||
}
|
||||
@@ -478,7 +478,8 @@ namespace DiscImageChef.Decoders.CD
|
||||
|
||||
break;
|
||||
case 18:
|
||||
switch(frm) {
|
||||
switch(frm)
|
||||
{
|
||||
case 10: return "Wealth Fair Investment Ltd.";
|
||||
case 60: return "Taroko International Co. Ltd.";
|
||||
}
|
||||
@@ -489,7 +490,8 @@ namespace DiscImageChef.Decoders.CD
|
||||
|
||||
break;
|
||||
case 21:
|
||||
switch(frm) {
|
||||
switch(frm)
|
||||
{
|
||||
case 10: return "Grupo Condor S.L.";
|
||||
case 30: return "Bestdisc Technology Corporation";
|
||||
case 40: return "Optical Disc Manufacturing Equipment";
|
||||
@@ -498,7 +500,8 @@ namespace DiscImageChef.Decoders.CD
|
||||
|
||||
break;
|
||||
case 22:
|
||||
switch(frm) {
|
||||
switch(frm)
|
||||
{
|
||||
case 00: return "Woongjin Media Corp.";
|
||||
case 10: return "Seantram Technology Inc.";
|
||||
case 20: return "Advanced Digital Media";
|
||||
@@ -510,7 +513,8 @@ namespace DiscImageChef.Decoders.CD
|
||||
|
||||
break;
|
||||
case 23:
|
||||
switch(frm) {
|
||||
switch(frm)
|
||||
{
|
||||
case 00: return "Matsushita Electric Industrial Co., Ltd.";
|
||||
case 10: return "Doremi Media Co., Ltd.";
|
||||
case 20: return "Nacar Media s.r.l.";
|
||||
@@ -522,7 +526,8 @@ namespace DiscImageChef.Decoders.CD
|
||||
|
||||
break;
|
||||
case 24:
|
||||
switch(frm) {
|
||||
switch(frm)
|
||||
{
|
||||
case 00: return "Taiyo Yuden Company Ltd.";
|
||||
case 10: return "SONY Corporation";
|
||||
case 20: return "Computer Support Italy s.r.l.";
|
||||
@@ -534,7 +539,8 @@ namespace DiscImageChef.Decoders.CD
|
||||
|
||||
break;
|
||||
case 25:
|
||||
switch(frm) {
|
||||
switch(frm)
|
||||
{
|
||||
case 00: return "MPO";
|
||||
case 20: return "Hitachi Maxell, Ltd.";
|
||||
case 30: return "Infodisc Technology Co. Ltd.";
|
||||
@@ -545,7 +551,8 @@ namespace DiscImageChef.Decoders.CD
|
||||
|
||||
break;
|
||||
case 26:
|
||||
switch(frm) {
|
||||
switch(frm)
|
||||
{
|
||||
case 00: return "Fornet International Pte Ltd.";
|
||||
case 10: return "POSTECH Corporation";
|
||||
case 20: return "SKC Co., Ltd.";
|
||||
@@ -557,7 +564,8 @@ namespace DiscImageChef.Decoders.CD
|
||||
|
||||
break;
|
||||
case 27:
|
||||
switch(frm) {
|
||||
switch(frm)
|
||||
{
|
||||
case 00: return "Digital Storage Technology Co., Ltd.";
|
||||
case 10: return "Plasmon Data systems Ltd.";
|
||||
case 20: return "Princo Corporation";
|
||||
@@ -569,7 +577,8 @@ namespace DiscImageChef.Decoders.CD
|
||||
|
||||
break;
|
||||
case 28:
|
||||
switch(frm) {
|
||||
switch(frm)
|
||||
{
|
||||
case 00: return "Opti.Me.S. S.p.A.";
|
||||
case 10: return "Gigastore Corporation";
|
||||
case 20: return "Multi Media Masters & Machinary SA";
|
||||
@@ -581,7 +590,8 @@ namespace DiscImageChef.Decoders.CD
|
||||
|
||||
break;
|
||||
case 29:
|
||||
switch(frm) {
|
||||
switch(frm)
|
||||
{
|
||||
case 00: return "Taeil Media Co., Ltd.";
|
||||
case 10: return "Vanguard Disc Inc.";
|
||||
case 20: return "Unidisc Technology Co., Ltd.";
|
||||
@@ -596,14 +606,16 @@ namespace DiscImageChef.Decoders.CD
|
||||
|
||||
break;
|
||||
case 31:
|
||||
switch(frm) {
|
||||
switch(frm)
|
||||
{
|
||||
case 00: return "Ritek Co.";
|
||||
case 30: return "Grand Advance Technology Ltd.";
|
||||
}
|
||||
|
||||
break;
|
||||
case 32:
|
||||
switch(frm) {
|
||||
switch(frm)
|
||||
{
|
||||
case 00: return "TDK Corporation";
|
||||
case 10: return "Prodisc Technology Inc.";
|
||||
}
|
||||
@@ -618,7 +630,8 @@ namespace DiscImageChef.Decoders.CD
|
||||
|
||||
break;
|
||||
case 45:
|
||||
switch(frm) {
|
||||
switch(frm)
|
||||
{
|
||||
case 00: return "Fornet International Pte Ltd.";
|
||||
case 10: return "Unitech Japan Inc.";
|
||||
case 20: return "Acer Media Technology, Inc.";
|
||||
@@ -629,7 +642,8 @@ namespace DiscImageChef.Decoders.CD
|
||||
|
||||
break;
|
||||
case 46:
|
||||
switch(frm) {
|
||||
switch(frm)
|
||||
{
|
||||
case 00: return "Taiyo Yuden Company Ltd.";
|
||||
case 10: return "Hong Kong Digital Technology Co., Ltd.";
|
||||
case 20: return "Multi Media Masters & Machinary SA";
|
||||
@@ -641,7 +655,8 @@ namespace DiscImageChef.Decoders.CD
|
||||
|
||||
break;
|
||||
case 47:
|
||||
switch(frm) {
|
||||
switch(frm)
|
||||
{
|
||||
case 10: return "Hitachi Maxell, Ltd.";
|
||||
case 20: return "Princo Corporation";
|
||||
case 40: return "POSTECH Corporation";
|
||||
@@ -651,7 +666,8 @@ namespace DiscImageChef.Decoders.CD
|
||||
|
||||
break;
|
||||
case 48:
|
||||
switch(frm) {
|
||||
switch(frm)
|
||||
{
|
||||
case 00: return "Ricoh Company Ltd.";
|
||||
case 10: return "Kodak Japan Ltd.";
|
||||
case 20: return "Plasmon Data systems Ltd.";
|
||||
@@ -663,7 +679,8 @@ namespace DiscImageChef.Decoders.CD
|
||||
|
||||
break;
|
||||
case 49:
|
||||
switch(frm) {
|
||||
switch(frm)
|
||||
{
|
||||
case 00: return "TDK Corporation";
|
||||
case 10: return "Gigastore Corporation";
|
||||
case 20: return "King Pro Mediatek Inc.";
|
||||
@@ -674,7 +691,8 @@ namespace DiscImageChef.Decoders.CD
|
||||
|
||||
break;
|
||||
case 50:
|
||||
switch(frm) {
|
||||
switch(frm)
|
||||
{
|
||||
case 10: return "Vanguard Disc Inc.";
|
||||
case 20: return "Mitsubishi Chemical Corporation";
|
||||
case 30: return "CDA Datenträger Albrechts GmbH";
|
||||
@@ -682,7 +700,8 @@ namespace DiscImageChef.Decoders.CD
|
||||
|
||||
break;
|
||||
case 51:
|
||||
switch(frm) {
|
||||
switch(frm)
|
||||
{
|
||||
case 10: return "Grand Advance Technology Ltd.";
|
||||
case 20: return "Infodisc Technology Co. Ltd.";
|
||||
case 50: return "Hile Optical Disc Technology Corp.";
|
||||
|
||||
@@ -38,19 +38,19 @@ using DiscImageChef.Console;
|
||||
namespace DiscImageChef.Decoders.CD
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -61,67 +61,67 @@ namespace DiscImageChef.Decoders.CD
|
||||
public enum PackTypeIndicator : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Title of the track (or album if track == 0)
|
||||
/// Title of the track (or album if track == 0)
|
||||
/// </summary>
|
||||
Title = 0x80,
|
||||
/// <summary>
|
||||
/// Performer
|
||||
/// Performer
|
||||
/// </summary>
|
||||
Performer = 0x81,
|
||||
/// <summary>
|
||||
/// Songwriter
|
||||
/// Songwriter
|
||||
/// </summary>
|
||||
Songwriter = 0x82,
|
||||
/// <summary>
|
||||
/// Composer
|
||||
/// Composer
|
||||
/// </summary>
|
||||
Composer = 0x83,
|
||||
/// <summary>
|
||||
/// Arranger
|
||||
/// Arranger
|
||||
/// </summary>
|
||||
Arranger = 0x84,
|
||||
/// <summary>
|
||||
/// Message from the content provider or artist
|
||||
/// Message from the content provider or artist
|
||||
/// </summary>
|
||||
Message = 0x85,
|
||||
/// <summary>
|
||||
/// Disc identification information
|
||||
/// Disc identification information
|
||||
/// </summary>
|
||||
DiscIdentification = 0x86,
|
||||
/// <summary>
|
||||
/// Genre identification
|
||||
/// Genre identification
|
||||
/// </summary>
|
||||
GenreIdentification = 0x87,
|
||||
/// <summary>
|
||||
/// Table of content information
|
||||
/// Table of content information
|
||||
/// </summary>
|
||||
TOCInformation = 0x88,
|
||||
/// <summary>
|
||||
/// Second table of content information
|
||||
/// Second table of content information
|
||||
/// </summary>
|
||||
SecondTOCInformation = 0x89,
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
Reserved1 = 0x8A,
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
Reserved2 = 0x8B,
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
Reserved3 = 0x8C,
|
||||
/// <summary>
|
||||
/// Reserved for content provider only
|
||||
/// Reserved for content provider only
|
||||
/// </summary>
|
||||
ReservedForContentProvider = 0x8D,
|
||||
/// <summary>
|
||||
/// UPC of album or ISRC of track
|
||||
/// UPC of album or ISRC of track
|
||||
/// </summary>
|
||||
UPCorISRC = 0x8E,
|
||||
/// <summary>
|
||||
/// Size information of the block
|
||||
/// Size information of the block
|
||||
/// </summary>
|
||||
BlockSizeInformation = 0x8F
|
||||
}
|
||||
@@ -129,19 +129,19 @@ namespace DiscImageChef.Decoders.CD
|
||||
public struct CDText
|
||||
{
|
||||
/// <summary>
|
||||
/// Total size of returned CD-Text information minus this field
|
||||
/// Total size of returned CD-Text information minus this field
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// CD-Text data packs
|
||||
/// CD-Text data packs
|
||||
/// </summary>
|
||||
public CDTextPack[] DataPacks;
|
||||
}
|
||||
@@ -149,43 +149,43 @@ namespace DiscImageChef.Decoders.CD
|
||||
public struct CDTextPack
|
||||
{
|
||||
/// <summary>
|
||||
/// Byte 0
|
||||
/// Pack ID1 (Pack Type)
|
||||
/// Byte 0
|
||||
/// Pack ID1 (Pack Type)
|
||||
/// </summary>
|
||||
public byte HeaderID1;
|
||||
/// <summary>
|
||||
/// Byte 1
|
||||
/// Pack ID2 (Track number)
|
||||
/// Byte 1
|
||||
/// Pack ID2 (Track number)
|
||||
/// </summary>
|
||||
public byte HeaderID2;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Pack ID3
|
||||
/// Byte 2
|
||||
/// Pack ID3
|
||||
/// </summary>
|
||||
public byte HeaderID3;
|
||||
/// <summary>
|
||||
/// Byte 3, bit 7
|
||||
/// Double Byte Character Code
|
||||
/// Byte 3, bit 7
|
||||
/// Double Byte Character Code
|
||||
/// </summary>
|
||||
public bool DBCC;
|
||||
/// <summary>
|
||||
/// Byte 3, bits 6 to 4
|
||||
/// Block number
|
||||
/// Byte 3, bits 6 to 4
|
||||
/// Block number
|
||||
/// </summary>
|
||||
public byte BlockNumber;
|
||||
/// <summary>
|
||||
/// Byte 3, bits 3 to 0
|
||||
/// Character position
|
||||
/// Byte 3, bits 3 to 0
|
||||
/// Character position
|
||||
/// </summary>
|
||||
public byte CharacterPosition;
|
||||
/// <summary>
|
||||
/// Bytes 4 to 15
|
||||
/// Text data
|
||||
/// Bytes 4 to 15
|
||||
/// Text data
|
||||
/// </summary>
|
||||
public byte[] TextDataField;
|
||||
/// <summary>
|
||||
/// Bytes 16 to 17
|
||||
/// CRC16
|
||||
/// Bytes 16 to 17
|
||||
/// CRC16
|
||||
/// </summary>
|
||||
public ushort CRC;
|
||||
}
|
||||
|
||||
28
CD/Enums.cs
28
CD/Enums.cs
@@ -38,27 +38,27 @@ namespace DiscImageChef.Decoders.CD
|
||||
public enum TocAdr : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Q Sub-channel mode information not supplied
|
||||
/// Q Sub-channel mode information not supplied
|
||||
/// </summary>
|
||||
NoInformation = 0x00,
|
||||
/// <summary>
|
||||
/// Q Sub-channel encodes current position data
|
||||
/// Q Sub-channel encodes current position data
|
||||
/// </summary>
|
||||
CurrentPosition = 0x01,
|
||||
/// <summary>
|
||||
/// Q Sub-channel encodes the media catalog number
|
||||
/// Q Sub-channel encodes the media catalog number
|
||||
/// </summary>
|
||||
MediaCatalogNumber = 0x02,
|
||||
/// <summary>
|
||||
/// Q Sub-channel encodes the ISRC
|
||||
/// Q Sub-channel encodes the ISRC
|
||||
/// </summary>
|
||||
ISRC = 0x03,
|
||||
/// <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>
|
||||
TrackPointer = 0x01,
|
||||
/// <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>
|
||||
VideoTrackPointer = 0x04
|
||||
}
|
||||
@@ -66,35 +66,35 @@ namespace DiscImageChef.Decoders.CD
|
||||
public enum TocControl : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Stereo audio, no pre-emphasis
|
||||
/// Stereo audio, no pre-emphasis
|
||||
/// </summary>
|
||||
TwoChanNoPreEmph = 0x00,
|
||||
/// <summary>
|
||||
/// Stereo audio with pre-emphasis
|
||||
/// Stereo audio with pre-emphasis
|
||||
/// </summary>
|
||||
TwoChanPreEmph = 0x01,
|
||||
/// <summary>
|
||||
/// If mask applied, track can be copied
|
||||
/// If mask applied, track can be copied
|
||||
/// </summary>
|
||||
CopyPermissionMask = 0x02,
|
||||
/// <summary>
|
||||
/// Data track, recorded uninterrumpted
|
||||
/// Data track, recorded uninterrumpted
|
||||
/// </summary>
|
||||
DataTrack = 0x04,
|
||||
/// <summary>
|
||||
/// Data track, recorded incrementally
|
||||
/// Data track, recorded incrementally
|
||||
/// </summary>
|
||||
DataTrackIncremental = 0x05,
|
||||
/// <summary>
|
||||
/// Quadraphonic audio, no pre-emphasis
|
||||
/// Quadraphonic audio, no pre-emphasis
|
||||
/// </summary>
|
||||
FourChanNoPreEmph = 0x08,
|
||||
/// <summary>
|
||||
/// Quadraphonic audio with pre-emphasis
|
||||
/// Quadraphonic audio with pre-emphasis
|
||||
/// </summary>
|
||||
FourChanPreEmph = 0x09,
|
||||
/// <summary>
|
||||
/// Reserved mask
|
||||
/// Reserved mask
|
||||
/// </summary>
|
||||
ReservedMask = 0x0C
|
||||
}
|
||||
|
||||
@@ -38,21 +38,21 @@ using DiscImageChef.Console;
|
||||
namespace DiscImageChef.Decoders.CD
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ISO/IEC 61104: Compact disc video system - 12 cm CD-V
|
||||
/// ISO/IEC 60908: Audio recording - Compact disc digital audio system
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ISO/IEC 61104: Compact disc video system - 12 cm CD-V
|
||||
/// ISO/IEC 60908: Audio recording - Compact disc digital audio system
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -69,19 +69,19 @@ namespace DiscImageChef.Decoders.CD
|
||||
public struct CDFullTOC
|
||||
{
|
||||
/// <summary>
|
||||
/// Total size of returned session information minus this field
|
||||
/// Total size of returned session information minus this field
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// First complete session number in hex
|
||||
/// First complete session number in hex
|
||||
/// </summary>
|
||||
public byte FirstCompleteSession;
|
||||
/// <summary>
|
||||
/// Last complete session number in hex
|
||||
/// Last complete session number in hex
|
||||
/// </summary>
|
||||
public byte LastCompleteSession;
|
||||
/// <summary>
|
||||
/// Track descriptors
|
||||
/// Track descriptors
|
||||
/// </summary>
|
||||
public TrackDataDescriptor[] TrackDescriptors;
|
||||
}
|
||||
@@ -89,62 +89,62 @@ namespace DiscImageChef.Decoders.CD
|
||||
public struct TrackDataDescriptor
|
||||
{
|
||||
/// <summary>
|
||||
/// Byte 0
|
||||
/// Session number in hex
|
||||
/// Byte 0
|
||||
/// Session number in hex
|
||||
/// </summary>
|
||||
public byte SessionNumber;
|
||||
/// <summary>
|
||||
/// Byte 1, bits 7 to 4
|
||||
/// Type of information in Q subchannel of block where this TOC entry was found
|
||||
/// Byte 1, bits 7 to 4
|
||||
/// Type of information in Q subchannel of block where this TOC entry was found
|
||||
/// </summary>
|
||||
public byte ADR;
|
||||
/// <summary>
|
||||
/// Byte 1, bits 3 to 0
|
||||
/// Track attributes
|
||||
/// Byte 1, bits 3 to 0
|
||||
/// Track attributes
|
||||
/// </summary>
|
||||
public byte CONTROL;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Byte 2
|
||||
/// </summary>
|
||||
public byte TNO;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Byte 3
|
||||
/// </summary>
|
||||
public byte POINT;
|
||||
/// <summary>
|
||||
/// Byte 4
|
||||
/// Byte 4
|
||||
/// </summary>
|
||||
public byte Min;
|
||||
/// <summary>
|
||||
/// Byte 5
|
||||
/// Byte 5
|
||||
/// </summary>
|
||||
public byte Sec;
|
||||
/// <summary>
|
||||
/// Byte 6
|
||||
/// Byte 6
|
||||
/// </summary>
|
||||
public byte Frame;
|
||||
/// <summary>
|
||||
/// Byte 7, CD only
|
||||
/// Byte 7, CD only
|
||||
/// </summary>
|
||||
public byte Zero;
|
||||
/// <summary>
|
||||
/// Byte 7, bits 7 to 4, DDCD only
|
||||
/// Byte 7, bits 7 to 4, DDCD only
|
||||
/// </summary>
|
||||
public byte HOUR;
|
||||
/// <summary>
|
||||
/// Byte 7, bits 3 to 0, DDCD only
|
||||
/// Byte 7, bits 3 to 0, DDCD only
|
||||
/// </summary>
|
||||
public byte PHOUR;
|
||||
/// <summary>
|
||||
/// Byte 8
|
||||
/// Byte 8
|
||||
/// </summary>
|
||||
public byte PMIN;
|
||||
/// <summary>
|
||||
/// Byte 9
|
||||
/// Byte 9
|
||||
/// </summary>
|
||||
public byte PSEC;
|
||||
/// <summary>
|
||||
/// Byte 10
|
||||
/// Byte 10
|
||||
/// </summary>
|
||||
public byte PFRAME;
|
||||
}
|
||||
|
||||
66
CD/PMA.cs
66
CD/PMA.cs
@@ -38,19 +38,19 @@ using DiscImageChef.Console;
|
||||
namespace DiscImageChef.Decoders.CD
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -60,19 +60,19 @@ namespace DiscImageChef.Decoders.CD
|
||||
public struct CDPMA
|
||||
{
|
||||
/// <summary>
|
||||
/// Total size of returned session information minus this field
|
||||
/// Total size of returned session information minus this field
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Track descriptors
|
||||
/// Track descriptors
|
||||
/// </summary>
|
||||
public CDPMADescriptors[] PMADescriptors;
|
||||
}
|
||||
@@ -80,58 +80,58 @@ namespace DiscImageChef.Decoders.CD
|
||||
public struct CDPMADescriptors
|
||||
{
|
||||
/// <summary>
|
||||
/// Byte 0
|
||||
/// Reserved
|
||||
/// Byte 0
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved;
|
||||
/// <summary>
|
||||
/// Byte 1, bits 7 to 4
|
||||
/// Type of information in Q subchannel of block where this TOC entry was found
|
||||
/// Byte 1, bits 7 to 4
|
||||
/// Type of information in Q subchannel of block where this TOC entry was found
|
||||
/// </summary>
|
||||
public byte ADR;
|
||||
/// <summary>
|
||||
/// Byte 1, bits 3 to 0
|
||||
/// Track attributes
|
||||
/// Byte 1, bits 3 to 0
|
||||
/// Track attributes
|
||||
/// </summary>
|
||||
public byte CONTROL;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Byte 2
|
||||
/// </summary>
|
||||
public byte TNO;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Byte 3
|
||||
/// </summary>
|
||||
public byte POINT;
|
||||
/// <summary>
|
||||
/// Byte 4
|
||||
/// Byte 4
|
||||
/// </summary>
|
||||
public byte Min;
|
||||
/// <summary>
|
||||
/// Byte 5
|
||||
/// Byte 5
|
||||
/// </summary>
|
||||
public byte Sec;
|
||||
/// <summary>
|
||||
/// Byte 6
|
||||
/// Byte 6
|
||||
/// </summary>
|
||||
public byte Frame;
|
||||
/// <summary>
|
||||
/// Byte 7, bits 7 to 4
|
||||
/// Byte 7, bits 7 to 4
|
||||
/// </summary>
|
||||
public byte HOUR;
|
||||
/// <summary>
|
||||
/// Byte 7, bits 3 to 0
|
||||
/// Byte 7, bits 3 to 0
|
||||
/// </summary>
|
||||
public byte PHOUR;
|
||||
/// <summary>
|
||||
/// Byte 8
|
||||
/// Byte 8
|
||||
/// </summary>
|
||||
public byte PMIN;
|
||||
/// <summary>
|
||||
/// Byte 9
|
||||
/// Byte 9
|
||||
/// </summary>
|
||||
public byte PSEC;
|
||||
/// <summary>
|
||||
/// Byte 10
|
||||
/// Byte 10
|
||||
/// </summary>
|
||||
public byte PFRAME;
|
||||
}
|
||||
|
||||
@@ -38,19 +38,19 @@ using DiscImageChef.Console;
|
||||
namespace DiscImageChef.Decoders.CD
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -60,19 +60,19 @@ namespace DiscImageChef.Decoders.CD
|
||||
public struct CDSessionInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Total size of returned session information minus this field
|
||||
/// Total size of returned session information minus this field
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// First track number in hex
|
||||
/// First track number in hex
|
||||
/// </summary>
|
||||
public byte FirstCompleteSession;
|
||||
/// <summary>
|
||||
/// Last track number in hex
|
||||
/// Last track number in hex
|
||||
/// </summary>
|
||||
public byte LastCompleteSession;
|
||||
/// <summary>
|
||||
/// Track descriptors
|
||||
/// Track descriptors
|
||||
/// </summary>
|
||||
public TrackDataDescriptor[] TrackDescriptors;
|
||||
}
|
||||
@@ -80,33 +80,33 @@ namespace DiscImageChef.Decoders.CD
|
||||
public struct TrackDataDescriptor
|
||||
{
|
||||
/// <summary>
|
||||
/// Byte 0
|
||||
/// Reserved
|
||||
/// Byte 0
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 1, bits 7 to 4
|
||||
/// Type of information in Q subchannel of block where this TOC entry was found
|
||||
/// Byte 1, bits 7 to 4
|
||||
/// Type of information in Q subchannel of block where this TOC entry was found
|
||||
/// </summary>
|
||||
public byte ADR;
|
||||
/// <summary>
|
||||
/// Byte 1, bits 3 to 0
|
||||
/// Track attributes
|
||||
/// Byte 1, bits 3 to 0
|
||||
/// Track attributes
|
||||
/// </summary>
|
||||
public byte CONTROL;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// First track number in last complete session
|
||||
/// Byte 2
|
||||
/// First track number in last complete session
|
||||
/// </summary>
|
||||
public byte TrackNumber;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Bytes 4 to 7
|
||||
/// First track number in last complete session start address in LBA or in MSF
|
||||
/// Bytes 4 to 7
|
||||
/// First track number in last complete session start address in LBA or in MSF
|
||||
/// </summary>
|
||||
public uint TrackStartAddress;
|
||||
}
|
||||
|
||||
62
CD/TOC.cs
62
CD/TOC.cs
@@ -38,21 +38,21 @@ using DiscImageChef.Console;
|
||||
namespace DiscImageChef.Decoders.CD
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ISO/IEC 61104: Compact disc video system - 12 cm CD-V
|
||||
/// ISO/IEC 60908: Audio recording - Compact disc digital audio system
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ISO/IEC 61104: Compact disc video system - 12 cm CD-V
|
||||
/// ISO/IEC 60908: Audio recording - Compact disc digital audio system
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -62,19 +62,19 @@ namespace DiscImageChef.Decoders.CD
|
||||
public struct CDTOC
|
||||
{
|
||||
/// <summary>
|
||||
/// Total size of returned TOC minus this field
|
||||
/// Total size of returned TOC minus this field
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// First track number in hex
|
||||
/// First track number in hex
|
||||
/// </summary>
|
||||
public byte FirstTrack;
|
||||
/// <summary>
|
||||
/// Last track number in hex
|
||||
/// Last track number in hex
|
||||
/// </summary>
|
||||
public byte LastTrack;
|
||||
/// <summary>
|
||||
/// Track descriptors
|
||||
/// Track descriptors
|
||||
/// </summary>
|
||||
public CDTOCTrackDataDescriptor[] TrackDescriptors;
|
||||
}
|
||||
@@ -82,33 +82,33 @@ namespace DiscImageChef.Decoders.CD
|
||||
public struct CDTOCTrackDataDescriptor
|
||||
{
|
||||
/// <summary>
|
||||
/// Byte 0
|
||||
/// Reserved
|
||||
/// Byte 0
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 1, bits 7 to 4
|
||||
/// Type of information in Q subchannel of block where this TOC entry was found
|
||||
/// Byte 1, bits 7 to 4
|
||||
/// Type of information in Q subchannel of block where this TOC entry was found
|
||||
/// </summary>
|
||||
public byte ADR;
|
||||
/// <summary>
|
||||
/// Byte 1, bits 3 to 0
|
||||
/// Track attributes
|
||||
/// Byte 1, bits 3 to 0
|
||||
/// Track attributes
|
||||
/// </summary>
|
||||
public byte CONTROL;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Track number
|
||||
/// Byte 2
|
||||
/// Track number
|
||||
/// </summary>
|
||||
public byte TrackNumber;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Bytes 4 to 7
|
||||
/// The track start address in LBA or in MSF
|
||||
/// Bytes 4 to 7
|
||||
/// The track start address in LBA or in MSF
|
||||
/// </summary>
|
||||
public uint TrackStartAddress;
|
||||
}
|
||||
|
||||
44
DVD/AACS.cs
44
DVD/AACS.cs
@@ -35,20 +35,20 @@ using System.Diagnostics.CodeAnalysis;
|
||||
namespace DiscImageChef.Decoders.DVD
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ECMA 365
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ECMA 365
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -58,23 +58,23 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public struct HDLeadInCopyright
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Bytes 4 to 2052
|
||||
/// HD DVD Lead-In Copyright Information
|
||||
/// Bytes 4 to 2052
|
||||
/// HD DVD Lead-In Copyright Information
|
||||
/// </summary>
|
||||
public byte[] CopyrightInformation;
|
||||
}
|
||||
|
||||
44
DVD/ADIP.cs
44
DVD/ADIP.cs
@@ -35,20 +35,20 @@ using System.Diagnostics.CodeAnalysis;
|
||||
namespace DiscImageChef.Decoders.DVD
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ECMA 365
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ECMA 365
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -58,23 +58,23 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public struct ADIPInformation
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Bytes 4 to 259
|
||||
/// ADIP, defined in DVD standards
|
||||
/// Bytes 4 to 259
|
||||
/// ADIP, defined in DVD standards
|
||||
/// </summary>
|
||||
public byte[] ADIP;
|
||||
}
|
||||
|
||||
44
DVD/BCA.cs
44
DVD/BCA.cs
@@ -35,20 +35,20 @@ using System.Diagnostics.CodeAnalysis;
|
||||
namespace DiscImageChef.Decoders.DVD
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ECMA 365
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ECMA 365
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -58,23 +58,23 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public struct BurstCuttingArea
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Bytes 4 to end
|
||||
/// Burst cutting area contents, 12 to 188 bytes
|
||||
/// Bytes 4 to end
|
||||
/// Burst cutting area contents, 12 to 188 bytes
|
||||
/// </summary>
|
||||
public byte[] BCA;
|
||||
}
|
||||
|
||||
60
DVD/CPRM.cs
60
DVD/CPRM.cs
@@ -35,20 +35,20 @@ using System.Diagnostics.CodeAnalysis;
|
||||
namespace DiscImageChef.Decoders.DVD
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ECMA 365
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ECMA 365
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -58,23 +58,23 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public struct DiscMediaIdentifier
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Bytes 4 to end
|
||||
/// Disc Media Identifier for CPRM
|
||||
/// Bytes 4 to end
|
||||
/// Disc Media Identifier for CPRM
|
||||
/// </summary>
|
||||
public byte[] MediaIdentifier;
|
||||
}
|
||||
@@ -82,23 +82,23 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public struct DiscMediaKeyBlock
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Bytes 4 to end
|
||||
/// Disc Media Key Block for CPRM
|
||||
/// Bytes 4 to end
|
||||
/// Disc Media Key Block for CPRM
|
||||
/// </summary>
|
||||
public byte[] MediaKeyBlock;
|
||||
}
|
||||
|
||||
@@ -36,20 +36,20 @@ using System.Text;
|
||||
namespace DiscImageChef.Decoders.DVD
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ECMA 365
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ECMA 365
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -60,38 +60,38 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public struct LeadInCopyright
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Byte 4
|
||||
/// Copy protection system type
|
||||
/// Byte 4
|
||||
/// Copy protection system type
|
||||
/// </summary>
|
||||
public CopyrightType CopyrightType;
|
||||
/// <summary>
|
||||
/// Byte 5
|
||||
/// Bitmask of regions where this disc is playable
|
||||
/// Byte 5
|
||||
/// Bitmask of regions where this disc is playable
|
||||
/// </summary>
|
||||
public byte RegionInformation;
|
||||
/// <summary>
|
||||
/// Byte 6
|
||||
/// Reserved
|
||||
/// Byte 6
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved3;
|
||||
/// <summary>
|
||||
/// Byte 7
|
||||
/// Reserved
|
||||
/// Byte 7
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved4;
|
||||
}
|
||||
@@ -99,23 +99,23 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public struct DiscKey
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Bytes 4 to 2052
|
||||
/// Disc key for CSS, Album Identifier for CPPM
|
||||
/// Bytes 4 to 2052
|
||||
/// Disc key for CSS, Album Identifier for CPPM
|
||||
/// </summary>
|
||||
public byte[] Key;
|
||||
}
|
||||
|
||||
@@ -36,19 +36,19 @@ using System.Text;
|
||||
namespace DiscImageChef.Decoders.DVD
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -59,68 +59,68 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public struct MediumStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Byte 4, bit 7
|
||||
/// Medium is in a cartridge
|
||||
/// Byte 4, bit 7
|
||||
/// Medium is in a cartridge
|
||||
/// </summary>
|
||||
public bool Cartridge;
|
||||
/// <summary>
|
||||
/// Byte 4, bit 6
|
||||
/// Medium has been taken out/inserted in a cartridge
|
||||
/// Byte 4, bit 6
|
||||
/// Medium has been taken out/inserted in a cartridge
|
||||
/// </summary>
|
||||
public bool OUT;
|
||||
/// <summary>
|
||||
/// Byte 4, bits 5 to 4
|
||||
/// Reserved
|
||||
/// Byte 4, bits 5 to 4
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved3;
|
||||
/// <summary>
|
||||
/// Byte 4, bit 3
|
||||
/// Media is write protected by reason stablished in RAMSWI
|
||||
/// Byte 4, bit 3
|
||||
/// Media is write protected by reason stablished in RAMSWI
|
||||
/// </summary>
|
||||
public bool MSWI;
|
||||
/// <summary>
|
||||
/// Byte 4, bit 2
|
||||
/// Media is write protected by cartridge
|
||||
/// Byte 4, bit 2
|
||||
/// Media is write protected by cartridge
|
||||
/// </summary>
|
||||
public bool CWP;
|
||||
/// <summary>
|
||||
/// Byte 4, bit 1
|
||||
/// Media is persistently write protected
|
||||
/// Byte 4, bit 1
|
||||
/// Media is persistently write protected
|
||||
/// </summary>
|
||||
public bool PWP;
|
||||
/// <summary>
|
||||
/// Byte 4, bit 0
|
||||
/// Reserved
|
||||
/// Byte 4, bit 0
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public bool Reserved4;
|
||||
/// <summary>
|
||||
/// Byte 5
|
||||
/// Writable status depending on cartridge
|
||||
/// Byte 5
|
||||
/// Writable status depending on cartridge
|
||||
/// </summary>
|
||||
public byte DiscType;
|
||||
/// <summary>
|
||||
/// Byte 6
|
||||
/// Reserved
|
||||
/// Byte 6
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved5;
|
||||
/// <summary>
|
||||
/// Byte 7
|
||||
/// Reason of specific write protection, only defined 0x01 as "bare disc wp", and 0xFF as unspecified. Rest reserved.
|
||||
/// Byte 7
|
||||
/// Reason of specific write protection, only defined 0x01 as "bare disc wp", and 0xFF as unspecified. Rest reserved.
|
||||
/// </summary>
|
||||
public byte RAMSWI;
|
||||
}
|
||||
@@ -188,8 +188,7 @@ namespace DiscImageChef.Decoders.DVD
|
||||
sb.AppendLine("Disc is write inhibited for an unspecified reason");
|
||||
break;
|
||||
default:
|
||||
sb.AppendFormat("Disc has unknown reason {0} for write inhibition", decoded.RAMSWI)
|
||||
.AppendLine();
|
||||
sb.AppendFormat("Disc has unknown reason {0} for write inhibition", decoded.RAMSWI).AppendLine();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
140
DVD/DDS.cs
140
DVD/DDS.cs
@@ -37,21 +37,21 @@ using System.Text;
|
||||
namespace DiscImageChef.Decoders.DVD
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// 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)
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// 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)
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -62,110 +62,110 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public struct DiscDefinitionStructure
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
|
||||
/// <summary>
|
||||
/// Bytes 4 to 5
|
||||
/// DDS Identifier = 0x0A0A
|
||||
/// Bytes 4 to 5
|
||||
/// DDS Identifier = 0x0A0A
|
||||
/// </summary>
|
||||
public ushort Identifier;
|
||||
/// <summary>
|
||||
/// Byte 6
|
||||
/// Reserved
|
||||
/// Byte 6
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved3;
|
||||
/// <summary>
|
||||
/// Byte 7, bit 7
|
||||
/// If set, formatting is in process
|
||||
/// Byte 7, bit 7
|
||||
/// If set, formatting is in process
|
||||
/// </summary>
|
||||
public bool InProcess;
|
||||
/// <summary>
|
||||
/// Byte 7, bit 6
|
||||
/// If set, formatting is using partial certification
|
||||
/// Only in ECMA-272
|
||||
/// Byte 7, bit 6
|
||||
/// If set, formatting is using partial certification
|
||||
/// Only in ECMA-272
|
||||
/// </summary>
|
||||
public bool PartialCertification;
|
||||
/// <summary>
|
||||
/// Byte 7, bit 5
|
||||
/// If set, only a group is being formatted
|
||||
/// Only in ECMA-272
|
||||
/// Byte 7, bit 5
|
||||
/// If set, only a group is being formatted
|
||||
/// Only in ECMA-272
|
||||
/// </summary>
|
||||
public bool FormattingOnlyAGroup;
|
||||
/// <summary>
|
||||
/// Byte 7, bits 4 to 2
|
||||
/// Reserved
|
||||
/// Byte 7, bits 4 to 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved4;
|
||||
/// <summary>
|
||||
/// Byte 7, bit 1
|
||||
/// If set, disk has been certified by a user
|
||||
/// Byte 7, bit 1
|
||||
/// If set, disk has been certified by a user
|
||||
/// </summary>
|
||||
public bool UserCertification;
|
||||
/// <summary>
|
||||
/// Byte 7, bit 0
|
||||
/// If set, disk has been certified by a manufacturer
|
||||
/// Byte 7, bit 0
|
||||
/// If set, disk has been certified by a manufacturer
|
||||
/// </summary>
|
||||
public bool ManufacturerCertification;
|
||||
/// <summary>
|
||||
/// Bytes 8 to 11
|
||||
/// How many times the DDS has been updated
|
||||
/// Bytes 8 to 11
|
||||
/// How many times the DDS has been updated
|
||||
/// </summary>
|
||||
public uint UpdateCount;
|
||||
/// <summary>
|
||||
/// Bytes 12 to 13
|
||||
/// How many groups the disk has
|
||||
/// 24 for ECMA-272
|
||||
/// 1 for ECMA-330
|
||||
/// Bytes 12 to 13
|
||||
/// How many groups the disk has
|
||||
/// 24 for ECMA-272
|
||||
/// 1 for ECMA-330
|
||||
/// </summary>
|
||||
public ushort Groups;
|
||||
/// <summary>
|
||||
/// Bytes 14 to 15
|
||||
/// How many zones the disk has
|
||||
/// Only in ECMA-330
|
||||
/// Bytes 14 to 15
|
||||
/// How many zones the disk has
|
||||
/// Only in ECMA-330
|
||||
/// </summary>
|
||||
public ushort Zones;
|
||||
/// <summary>
|
||||
/// Bytes 14 to 19 in ECMA-272
|
||||
/// Bytes 16 to 83 in ECMA-330
|
||||
/// Reserved
|
||||
/// Bytes 14 to 19 in ECMA-272
|
||||
/// Bytes 16 to 83 in ECMA-330
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte[] Reserved;
|
||||
/// <summary>
|
||||
/// Bytes 20 to 43
|
||||
/// Group certification flags
|
||||
/// Bytes 20 to 43
|
||||
/// Group certification flags
|
||||
/// </summary>
|
||||
public GroupCertificationFlag[] GroupCertificationFlags;
|
||||
|
||||
/// <summary>
|
||||
/// Bytes 85 to 87
|
||||
/// Location of first sector in the Primary Spare Area
|
||||
/// Bytes 85 to 87
|
||||
/// Location of first sector in the Primary Spare Area
|
||||
/// </summary>
|
||||
public uint SpareAreaFirstPSN;
|
||||
/// <summary>
|
||||
/// Bytes 89 to 91
|
||||
/// Location of first sector in the Primary Spare Area
|
||||
/// Bytes 89 to 91
|
||||
/// Location of first sector in the Primary Spare Area
|
||||
/// </summary>
|
||||
public uint SpareAreaLastPSN;
|
||||
/// <summary>
|
||||
/// Bytes 93 to 95
|
||||
/// PSN for LSN 0
|
||||
/// Bytes 93 to 95
|
||||
/// PSN for LSN 0
|
||||
/// </summary>
|
||||
public uint LSN0Location;
|
||||
/// <summary>
|
||||
/// The starting LSN of each zone
|
||||
/// The starting LSN of each zone
|
||||
/// </summary>
|
||||
public uint[] StartLSNForZone;
|
||||
}
|
||||
@@ -173,28 +173,28 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public struct GroupCertificationFlag
|
||||
{
|
||||
/// <summary>
|
||||
/// Bit 7
|
||||
/// If set, formatting of this group is in process
|
||||
/// Bit 7
|
||||
/// If set, formatting of this group is in process
|
||||
/// </summary>
|
||||
public bool InProcess;
|
||||
/// <summary>
|
||||
/// Bit 6
|
||||
/// If set, formatting is using partial certification
|
||||
/// Bit 6
|
||||
/// If set, formatting is using partial certification
|
||||
/// </summary>
|
||||
public bool PartialCertification;
|
||||
/// <summary>
|
||||
/// Bits 5 to 2
|
||||
/// Reserved
|
||||
/// Bits 5 to 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Bit 1
|
||||
/// If set, this group has been certified by user
|
||||
/// Bit 1
|
||||
/// If set, this group has been certified by user
|
||||
/// </summary>
|
||||
public bool UserCertification;
|
||||
/// <summary>
|
||||
/// Bit 0
|
||||
/// Reserved
|
||||
/// Bit 0
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public bool Reserved2;
|
||||
}
|
||||
|
||||
44
DVD/DMI.cs
44
DVD/DMI.cs
@@ -35,20 +35,20 @@ using System.Diagnostics.CodeAnalysis;
|
||||
namespace DiscImageChef.Decoders.DVD
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ECMA 365
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ECMA 365
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -58,23 +58,23 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public struct DiscManufacturingInformation
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Bytes 4 to 2052
|
||||
/// Disc Manufacturing Information
|
||||
/// Bytes 4 to 2052
|
||||
/// Disc Manufacturing Information
|
||||
/// </summary>
|
||||
public byte[] DMI;
|
||||
}
|
||||
|
||||
84
DVD/Enums.cs
84
DVD/Enums.cs
@@ -39,60 +39,60 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public enum DiskCategory : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// DVD-ROM. Version 1 is ECMA-267 and ECMA-268.
|
||||
/// DVD-ROM. Version 1 is ECMA-267 and ECMA-268.
|
||||
/// </summary>
|
||||
DVDROM = 0,
|
||||
/// <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>
|
||||
DVDRAM = 1,
|
||||
/// <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>
|
||||
DVDR = 2,
|
||||
/// <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>
|
||||
DVDRW = 3,
|
||||
/// <summary>
|
||||
/// HD DVD-ROM
|
||||
/// HD DVD-ROM
|
||||
/// </summary>
|
||||
HDDVDROM = 4,
|
||||
/// <summary>
|
||||
/// HD DVD-RAM
|
||||
/// HD DVD-RAM
|
||||
/// </summary>
|
||||
HDDVDRAM = 5,
|
||||
/// <summary>
|
||||
/// HD DVD-R
|
||||
/// HD DVD-R
|
||||
/// </summary>
|
||||
HDDVDR = 6,
|
||||
/// <summary>
|
||||
/// HD DVD-RW
|
||||
/// HD DVD-RW
|
||||
/// </summary>
|
||||
HDDVDRW = 7,
|
||||
/// <summary>
|
||||
/// UMD. Version 0 is ECMA-365.
|
||||
/// UMD. Version 0 is ECMA-365.
|
||||
/// </summary>
|
||||
UMD = 8,
|
||||
/// <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>
|
||||
DVDPRW = 9,
|
||||
/// <summary>
|
||||
/// DVD+R. Version 1 is ECMA-349.
|
||||
/// DVD+R. Version 1 is ECMA-349.
|
||||
/// </summary>
|
||||
DVDPR = 10,
|
||||
/// <summary>
|
||||
/// DVD+RW DL. Version 1 is ECMA-374.
|
||||
/// DVD+RW DL. Version 1 is ECMA-374.
|
||||
/// </summary>
|
||||
DVDPRWDL = 13,
|
||||
/// <summary>
|
||||
/// DVD+R DL. Version 1 is ECMA-364.
|
||||
/// DVD+R DL. Version 1 is ECMA-364.
|
||||
/// </summary>
|
||||
DVDPRDL = 14,
|
||||
/// <summary>
|
||||
/// According to standards this value is reserved.
|
||||
/// It's used by Nintendo GODs and WODs.
|
||||
/// According to standards this value is reserved.
|
||||
/// It's used by Nintendo GODs and WODs.
|
||||
/// </summary>
|
||||
Nintendo = 15
|
||||
}
|
||||
@@ -101,23 +101,23 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public enum MaximumRateField : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// 2.52 Mbps
|
||||
/// 2.52 Mbps
|
||||
/// </summary>
|
||||
TwoMbps = 0x00,
|
||||
/// <summary>
|
||||
/// 5.04 Mbps
|
||||
/// 5.04 Mbps
|
||||
/// </summary>
|
||||
FiveMbps = 0x01,
|
||||
/// <summary>
|
||||
/// 10.08 Mbps
|
||||
/// 10.08 Mbps
|
||||
/// </summary>
|
||||
TenMbps = 0x02,
|
||||
/// <summary>
|
||||
/// 20.16 Mbps
|
||||
/// 20.16 Mbps
|
||||
/// </summary>
|
||||
TwentyMbps = 0x03,
|
||||
/// <summary>
|
||||
/// 30.24 Mbps
|
||||
/// 30.24 Mbps
|
||||
/// </summary>
|
||||
ThirtyMbps = 0x04,
|
||||
Unspecified = 0x0F
|
||||
@@ -136,31 +136,31 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public enum LinearDensityField : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// 0.267 μm/bit
|
||||
/// 0.267 μm/bit
|
||||
/// </summary>
|
||||
TwoSix = 0x00,
|
||||
/// <summary>
|
||||
/// 0.293 μm/bit
|
||||
/// 0.293 μm/bit
|
||||
/// </summary>
|
||||
TwoNine = 0x01,
|
||||
/// <summary>
|
||||
/// 0.409 to 0.435 μm/bit
|
||||
/// 0.409 to 0.435 μm/bit
|
||||
/// </summary>
|
||||
FourZero = 0x02,
|
||||
/// <summary>
|
||||
/// 0.280 to 0.291 μm/bit
|
||||
/// 0.280 to 0.291 μm/bit
|
||||
/// </summary>
|
||||
TwoEight = 0x04,
|
||||
/// <summary>
|
||||
/// 0.153 μm/bit
|
||||
/// 0.153 μm/bit
|
||||
/// </summary>
|
||||
OneFive = 0x05,
|
||||
/// <summary>
|
||||
/// 0.130 to 0.140 μm/bit
|
||||
/// 0.130 to 0.140 μm/bit
|
||||
/// </summary>
|
||||
OneThree = 0x06,
|
||||
/// <summary>
|
||||
/// 0.353 μm/bit
|
||||
/// 0.353 μm/bit
|
||||
/// </summary>
|
||||
ThreeFive = 0x08
|
||||
}
|
||||
@@ -169,23 +169,23 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public enum TrackDensityField : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// 0.74 μm/track
|
||||
/// 0.74 μm/track
|
||||
/// </summary>
|
||||
Seven = 0x00,
|
||||
/// <summary>
|
||||
/// 0.80 μm/track
|
||||
/// 0.80 μm/track
|
||||
/// </summary>
|
||||
Eight = 0x01,
|
||||
/// <summary>
|
||||
/// 0.615 μm/track
|
||||
/// 0.615 μm/track
|
||||
/// </summary>
|
||||
Six = 0x02,
|
||||
/// <summary>
|
||||
/// 0.40 μm/track
|
||||
/// 0.40 μm/track
|
||||
/// </summary>
|
||||
Four = 0x03,
|
||||
/// <summary>
|
||||
/// 0.34 μm/track
|
||||
/// 0.34 μm/track
|
||||
/// </summary>
|
||||
Three = 0x04
|
||||
}
|
||||
@@ -194,19 +194,19 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public enum CopyrightType : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// There is no copy protection
|
||||
/// There is no copy protection
|
||||
/// </summary>
|
||||
NoProtection = 0x00,
|
||||
/// <summary>
|
||||
/// Copy protection is CSS/CPPM
|
||||
/// Copy protection is CSS/CPPM
|
||||
/// </summary>
|
||||
CSS = 0x01,
|
||||
/// <summary>
|
||||
/// Copy protection is CPRM
|
||||
/// Copy protection is CPRM
|
||||
/// </summary>
|
||||
CPRM = 0x02,
|
||||
/// <summary>
|
||||
/// Copy protection is AACS
|
||||
/// Copy protection is AACS
|
||||
/// </summary>
|
||||
AACS = 0x10
|
||||
}
|
||||
@@ -215,11 +215,11 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public enum WPDiscTypes : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Should not write without a cartridge
|
||||
/// Should not write without a cartridge
|
||||
/// </summary>
|
||||
DoNotWrite = 0x00,
|
||||
/// <summary>
|
||||
/// Can write without a cartridge
|
||||
/// Can write without a cartridge
|
||||
/// </summary>
|
||||
CanWrite = 0x01,
|
||||
Reserved1 = 0x02,
|
||||
@@ -230,11 +230,11 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public enum DVDSize
|
||||
{
|
||||
/// <summary>
|
||||
/// 120 mm
|
||||
/// 120 mm
|
||||
/// </summary>
|
||||
OneTwenty = 0,
|
||||
/// <summary>
|
||||
/// 80 mm
|
||||
/// 80 mm
|
||||
/// </summary>
|
||||
Eighty = 1
|
||||
}
|
||||
@@ -243,11 +243,11 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public enum DVDRAMDiscType
|
||||
{
|
||||
/// <summary>
|
||||
/// Shall not be recorded without a case
|
||||
/// Shall not be recorded without a case
|
||||
/// </summary>
|
||||
Cased = 0,
|
||||
/// <summary>
|
||||
/// May be recorded without a case or within one
|
||||
/// May be recorded without a case or within one
|
||||
/// </summary>
|
||||
Uncased = 1
|
||||
}
|
||||
|
||||
164
DVD/Layers.cs
164
DVD/Layers.cs
@@ -35,20 +35,20 @@ using System.Diagnostics.CodeAnalysis;
|
||||
namespace DiscImageChef.Decoders.DVD
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ECMA 365
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ECMA 365
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -58,48 +58,48 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public struct LayerCapacity
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Byte 4, bit 7
|
||||
/// If set, L0 capacity is immutable
|
||||
/// Byte 4, bit 7
|
||||
/// If set, L0 capacity is immutable
|
||||
/// </summary>
|
||||
public bool InitStatus;
|
||||
/// <summary>
|
||||
/// Byte 4, bits 6 to 0
|
||||
/// Reserved
|
||||
/// Byte 4, bits 6 to 0
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved3;
|
||||
/// <summary>
|
||||
/// Byte 5
|
||||
/// Reserved
|
||||
/// Byte 5
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved4;
|
||||
/// <summary>
|
||||
/// Byte 6
|
||||
/// Reserved
|
||||
/// Byte 6
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved5;
|
||||
/// <summary>
|
||||
/// Byte 7
|
||||
/// Reserved
|
||||
/// Byte 7
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved6;
|
||||
/// <summary>
|
||||
/// Byte 8 to 11
|
||||
/// L0 Data Area Capacity
|
||||
/// Byte 8 to 11
|
||||
/// L0 Data Area Capacity
|
||||
/// </summary>
|
||||
public uint Capacity;
|
||||
}
|
||||
@@ -107,48 +107,48 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public struct MiddleZoneStartAddress
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length = 10
|
||||
/// Bytes 0 to 1
|
||||
/// Data length = 10
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Byte 4, bit 7
|
||||
/// If set, L0 shifter middle area is immutable
|
||||
/// Byte 4, bit 7
|
||||
/// If set, L0 shifter middle area is immutable
|
||||
/// </summary>
|
||||
public bool InitStatus;
|
||||
/// <summary>
|
||||
/// Byte 4, bits 6 to 0
|
||||
/// Reserved
|
||||
/// Byte 4, bits 6 to 0
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved3;
|
||||
/// <summary>
|
||||
/// Byte 5
|
||||
/// Reserved
|
||||
/// Byte 5
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved4;
|
||||
/// <summary>
|
||||
/// Byte 6
|
||||
/// Reserved
|
||||
/// Byte 6
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved5;
|
||||
/// <summary>
|
||||
/// Byte 7
|
||||
/// Reserved
|
||||
/// Byte 7
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved6;
|
||||
/// <summary>
|
||||
/// Byte 8 to 11
|
||||
/// Start LBA of Shifted Middle Area on L0
|
||||
/// Byte 8 to 11
|
||||
/// Start LBA of Shifted Middle Area on L0
|
||||
/// </summary>
|
||||
public uint ShiftedMiddleAreaStartAddress;
|
||||
}
|
||||
@@ -156,43 +156,43 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public struct JumpIntervalSize
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length = 10
|
||||
/// Bytes 0 to 1
|
||||
/// Data length = 10
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Byte 4
|
||||
/// Reserved
|
||||
/// Byte 4
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved3;
|
||||
/// <summary>
|
||||
/// Byte 5
|
||||
/// Reserved
|
||||
/// Byte 5
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved4;
|
||||
/// <summary>
|
||||
/// Byte 6
|
||||
/// Reserved
|
||||
/// Byte 6
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved5;
|
||||
/// <summary>
|
||||
/// Byte 7
|
||||
/// Reserved
|
||||
/// Byte 7
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved6;
|
||||
/// <summary>
|
||||
/// Byte 8 to 11
|
||||
/// Jump Interval size for the Regular Interval Layer Jump
|
||||
/// Byte 8 to 11
|
||||
/// Jump Interval size for the Regular Interval Layer Jump
|
||||
/// </summary>
|
||||
public uint Size;
|
||||
}
|
||||
@@ -200,43 +200,43 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public struct ManualLayerJumpAddress
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length = 10
|
||||
/// Bytes 0 to 1
|
||||
/// Data length = 10
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Byte 4
|
||||
/// Reserved
|
||||
/// Byte 4
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved3;
|
||||
/// <summary>
|
||||
/// Byte 5
|
||||
/// Reserved
|
||||
/// Byte 5
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved4;
|
||||
/// <summary>
|
||||
/// Byte 6
|
||||
/// Reserved
|
||||
/// Byte 6
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved5;
|
||||
/// <summary>
|
||||
/// Byte 7
|
||||
/// Reserved
|
||||
/// Byte 7
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved6;
|
||||
/// <summary>
|
||||
/// Byte 8 to 11
|
||||
/// LBA for the manual layer jump
|
||||
/// Byte 8 to 11
|
||||
/// LBA for the manual layer jump
|
||||
/// </summary>
|
||||
public uint LBA;
|
||||
}
|
||||
|
||||
867
DVD/PFI.cs
867
DVD/PFI.cs
File diff suppressed because it is too large
Load Diff
44
DVD/PRI.cs
44
DVD/PRI.cs
@@ -35,20 +35,20 @@ using System.Diagnostics.CodeAnalysis;
|
||||
namespace DiscImageChef.Decoders.DVD
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ECMA 365
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ECMA 365
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -58,23 +58,23 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public struct PreRecordedInformation
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Bytes 4 to end
|
||||
/// Pre-recorded Information in Lead-in for writable media
|
||||
/// Bytes 4 to end
|
||||
/// Pre-recorded Information in Lead-in for writable media
|
||||
/// </summary>
|
||||
public byte[] PRI;
|
||||
}
|
||||
|
||||
72
DVD/RMD.cs
72
DVD/RMD.cs
@@ -35,20 +35,20 @@ using System.Diagnostics.CodeAnalysis;
|
||||
namespace DiscImageChef.Decoders.DVD
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ECMA 365
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ECMA 365
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -58,23 +58,23 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public struct LastBorderOutRMD
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Bytes 4 to end
|
||||
/// RMD in last recorded Border-out
|
||||
/// Bytes 4 to end
|
||||
/// RMD in last recorded Border-out
|
||||
/// </summary>
|
||||
public byte[] RMD;
|
||||
}
|
||||
@@ -82,38 +82,38 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public struct HDMediumStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Byte 4, bits 7 to 1
|
||||
/// Reserved
|
||||
/// Byte 4, bits 7 to 1
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved3;
|
||||
/// <summary>
|
||||
/// Byte 4, bit 0
|
||||
/// Test Zone has been extended
|
||||
/// Byte 4, bit 0
|
||||
/// Test Zone has been extended
|
||||
/// </summary>
|
||||
public bool ExtendedTestZone;
|
||||
/// <summary>
|
||||
/// Byte 5
|
||||
/// Number of remaining RMDs in RDZ
|
||||
/// Byte 5
|
||||
/// Number of remaining RMDs in RDZ
|
||||
/// </summary>
|
||||
public byte RemainingRMDs;
|
||||
/// <summary>
|
||||
/// Bytes 6 to 7
|
||||
/// Number of remaining RMDs in current RMZ
|
||||
/// Bytes 6 to 7
|
||||
/// Number of remaining RMDs in current RMZ
|
||||
/// </summary>
|
||||
public ushort CurrentRemainingRMDs;
|
||||
}
|
||||
|
||||
50
DVD/Spare.cs
50
DVD/Spare.cs
@@ -36,19 +36,19 @@ using System.Text;
|
||||
namespace DiscImageChef.Decoders.DVD
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -59,33 +59,33 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public struct SpareAreaInformation
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Bytes 4 to 7
|
||||
/// Data length
|
||||
/// Bytes 4 to 7
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public uint UnusedPrimaryBlocks;
|
||||
/// <summary>
|
||||
/// Bytes 8 to 11
|
||||
/// Data length
|
||||
/// Bytes 8 to 11
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public uint UnusedSupplementaryBlocks;
|
||||
/// <summary>
|
||||
/// Bytes 12 to 15
|
||||
/// Data length
|
||||
/// Bytes 12 to 15
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public uint AllocatedSupplementaryBlocks;
|
||||
}
|
||||
|
||||
76
DVD/UDI.cs
76
DVD/UDI.cs
@@ -35,20 +35,20 @@ using System.Diagnostics.CodeAnalysis;
|
||||
namespace DiscImageChef.Decoders.DVD
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ECMA 365
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// ECMA 365
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -58,63 +58,63 @@ namespace DiscImageChef.Decoders.DVD
|
||||
public struct UniqueDiscIdentifier
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Byte 4
|
||||
/// Reserved
|
||||
/// Byte 4
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved3;
|
||||
/// <summary>
|
||||
/// Byte 5
|
||||
/// Reserved
|
||||
/// Byte 5
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved4;
|
||||
/// <summary>
|
||||
/// Bytes 6 to 7
|
||||
/// Random number
|
||||
/// Bytes 6 to 7
|
||||
/// Random number
|
||||
/// </summary>
|
||||
public ushort RandomNumber;
|
||||
/// <summary>
|
||||
/// Byte 8 to 11
|
||||
/// Year
|
||||
/// Byte 8 to 11
|
||||
/// Year
|
||||
/// </summary>
|
||||
public uint Year;
|
||||
/// <summary>
|
||||
/// Byte 12 to 13
|
||||
/// Month
|
||||
/// Byte 12 to 13
|
||||
/// Month
|
||||
/// </summary>
|
||||
public ushort Month;
|
||||
/// <summary>
|
||||
/// Byte 14 to 15
|
||||
/// Day
|
||||
/// Byte 14 to 15
|
||||
/// Day
|
||||
/// </summary>
|
||||
public ushort Day;
|
||||
/// <summary>
|
||||
/// Byte 16 to 17
|
||||
/// Hour
|
||||
/// Byte 16 to 17
|
||||
/// Hour
|
||||
/// </summary>
|
||||
public ushort Hour;
|
||||
/// <summary>
|
||||
/// Byte 18 to 19
|
||||
/// Minute
|
||||
/// Byte 18 to 19
|
||||
/// Minute
|
||||
/// </summary>
|
||||
public ushort Minute;
|
||||
/// <summary>
|
||||
/// Byte 20 to 21
|
||||
/// Second
|
||||
/// Byte 20 to 21
|
||||
/// Second
|
||||
/// </summary>
|
||||
public ushort Second;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ using System.Runtime.InteropServices;
|
||||
namespace DiscImageChef.Decoders.Floppy
|
||||
{
|
||||
/// <summary>
|
||||
/// Methods and structures for Commodore Amiga decoding
|
||||
/// Methods and structures for Commodore Amiga decoding
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -46,39 +46,39 @@ namespace DiscImageChef.Decoders.Floppy
|
||||
public struct Sector
|
||||
{
|
||||
/// <summary>
|
||||
/// Set to 0x00
|
||||
/// Set to 0x00
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] zero;
|
||||
/// <summary>
|
||||
/// Set to 0xA1
|
||||
/// Set to 0xA1
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] sync;
|
||||
/// <summary>
|
||||
/// Set to 0xFF
|
||||
/// Set to 0xFF
|
||||
/// </summary>
|
||||
public byte amiga;
|
||||
/// <summary>
|
||||
/// Track number
|
||||
/// Track number
|
||||
/// </summary>
|
||||
public byte track;
|
||||
/// <summary>
|
||||
/// Sector number
|
||||
/// Sector number
|
||||
/// </summary>
|
||||
public byte sector;
|
||||
/// <summary>
|
||||
/// Remaining sectors til end of writing
|
||||
/// Remaining sectors til end of writing
|
||||
/// </summary>
|
||||
public byte remaining;
|
||||
/// <summary>
|
||||
/// OS dependent tag
|
||||
/// OS dependent tag
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] label;
|
||||
/// <summary>
|
||||
/// Checksum from <see cref="amiga"/> to <see cref="label"/>
|
||||
/// Checksum from <see cref="amiga" /> to <see cref="label" />
|
||||
/// </summary>
|
||||
public uint headerChecksum;
|
||||
/// <summary>
|
||||
/// Checksum from <see cref="data"/>
|
||||
/// Checksum from <see cref="data" />
|
||||
/// </summary>
|
||||
public uint dataChecksum;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)] public byte[] data;
|
||||
|
||||
111
Floppy/Apple2.cs
111
Floppy/Apple2.cs
@@ -41,7 +41,7 @@ using DiscImageChef.Console;
|
||||
namespace DiscImageChef.Decoders.Floppy
|
||||
{
|
||||
/// <summary>
|
||||
/// Methods and structures for Apple ][ floppy decoding
|
||||
/// Methods and structures for Apple ][ floppy decoding
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -49,99 +49,99 @@ namespace DiscImageChef.Decoders.Floppy
|
||||
public static class Apple2
|
||||
{
|
||||
/// <summary>
|
||||
/// GCR-encoded Apple ][ GCR floppy track
|
||||
/// GCR-encoded Apple ][ GCR floppy track
|
||||
/// </summary>
|
||||
public class RawTrack
|
||||
{
|
||||
/// <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>
|
||||
public byte[] gap;
|
||||
public RawSector[] sectors;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GCR-encoded Apple ][ GCR floppy sector
|
||||
/// GCR-encoded Apple ][ GCR floppy sector
|
||||
/// </summary>
|
||||
public class RawSector
|
||||
{
|
||||
/// <summary>
|
||||
/// Address field
|
||||
/// Address field
|
||||
/// </summary>
|
||||
public RawAddressField addressField;
|
||||
/// <summary>
|
||||
/// Track preamble, set to self-sync 0xFF, between 5 and 10 bytes
|
||||
/// </summary>
|
||||
public byte[] innerGap;
|
||||
/// <summary>
|
||||
/// Data field
|
||||
/// Data field
|
||||
/// </summary>
|
||||
public RawDataField dataField;
|
||||
/// <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>
|
||||
public byte[] gap;
|
||||
/// <summary>
|
||||
/// Track preamble, set to self-sync 0xFF, between 5 and 10 bytes
|
||||
/// </summary>
|
||||
public byte[] innerGap;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GCR-encoded Apple ][ GCR floppy sector address field
|
||||
/// GCR-encoded Apple ][ GCR floppy sector address field
|
||||
/// </summary>
|
||||
public class RawAddressField
|
||||
{
|
||||
/// <summary>
|
||||
/// Always 0xD5, 0xAA, 0x96
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] prologue;
|
||||
/// <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
|
||||
/// decodedChecksum = decodedVolume ^ decodedTrack ^ decodedSector
|
||||
/// checksum[0] = (decodedChecksum >> 1) | 0xAA
|
||||
/// checksum[1] = decodedChecksum | 0xAA
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] checksum;
|
||||
/// <summary>
|
||||
/// Always 0xDE, 0xAA, 0xEB
|
||||
/// Always 0xDE, 0xAA, 0xEB
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] epilogue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GCR-encoded Apple ][ GCR floppy sector data field
|
||||
/// </summary>
|
||||
public class RawDataField
|
||||
{
|
||||
/// <summary>
|
||||
/// Always 0xD5, 0xAA, 0xAD
|
||||
/// Always 0xD5, 0xAA, 0x96
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] prologue;
|
||||
/// <summary>
|
||||
/// Encoded data bytes.
|
||||
/// 410 bytes for 5to3 (aka DOS 3.2) format
|
||||
/// 342 bytes for 6to2 (aka DOS 3.3) format
|
||||
/// Sector number encoded as:
|
||||
/// sector[0] = (decodedSector >> 1) | 0xAA
|
||||
/// sector[1] = decodedSector | 0xAA
|
||||
/// </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;
|
||||
/// <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>
|
||||
[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 =
|
||||
@@ -217,7 +217,7 @@ namespace DiscImageChef.Decoders.Floppy
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Decodes the 5and3 encoded data
|
||||
/// Decodes the 5and3 encoded data
|
||||
/// </summary>
|
||||
/// <param name="data">5and3 encoded data.</param>
|
||||
public static byte[] Decode5and3(byte[] data)
|
||||
@@ -253,7 +253,7 @@ namespace DiscImageChef.Decoders.Floppy
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Decodes the 6and2 encoded data
|
||||
/// Decodes the 6and2 encoded data
|
||||
/// </summary>
|
||||
/// <param name="data">6and2 encoded data.</param>
|
||||
public static byte[] Decode6and2(byte[] data)
|
||||
@@ -549,8 +549,7 @@ namespace DiscImageChef.Decoders.Floppy
|
||||
|
||||
MemoryStream raw = new MemoryStream();
|
||||
raw.Write(track.gap, 0, track.gap.Length);
|
||||
foreach(byte[] rawSector in track.sectors.Select(MarshalSector))
|
||||
{ raw.Write(rawSector, 0, rawSector.Length); }
|
||||
foreach(byte[] rawSector in track.sectors.Select(MarshalSector)) raw.Write(rawSector, 0, rawSector.Length);
|
||||
|
||||
return raw.ToArray();
|
||||
}
|
||||
@@ -589,7 +588,7 @@ namespace DiscImageChef.Decoders.Floppy
|
||||
if(disk == null) return null;
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace DiscImageChef.Decoders.Floppy
|
||||
// Inside Macintosh, Volume II, ISBN 0-201-17732-3
|
||||
|
||||
/// <summary>
|
||||
/// Methods and structures for Apple Sony GCR floppy decoding
|
||||
/// Methods and structures for Apple Sony GCR floppy decoding
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -52,100 +52,100 @@ namespace DiscImageChef.Decoders.Floppy
|
||||
public static class AppleSony
|
||||
{
|
||||
/// <summary>
|
||||
/// GCR-encoded Apple Sony GCR floppy track
|
||||
/// GCR-encoded Apple Sony GCR floppy track
|
||||
/// </summary>
|
||||
public class RawTrack
|
||||
{
|
||||
/// <summary>
|
||||
/// Track preamble, set to self-sync 0xFF, 36 bytes
|
||||
/// Track preamble, set to self-sync 0xFF, 36 bytes
|
||||
/// </summary>
|
||||
public byte[] gap;
|
||||
public RawSector[] sectors;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GCR-encoded Apple Sony GCR floppy sector
|
||||
/// GCR-encoded Apple Sony GCR floppy sector
|
||||
/// </summary>
|
||||
public class RawSector
|
||||
{
|
||||
/// <summary>
|
||||
/// Address field
|
||||
/// Address field
|
||||
/// </summary>
|
||||
public RawAddressField addressField;
|
||||
/// <summary>
|
||||
/// Track preamble, set to self-sync 0xFF, 6 bytes
|
||||
/// </summary>
|
||||
public byte[] innerGap;
|
||||
/// <summary>
|
||||
/// Data field
|
||||
/// Data field
|
||||
/// </summary>
|
||||
public RawDataField dataField;
|
||||
/// <summary>
|
||||
/// Track preamble, set to self-sync 0xFF, unknown size
|
||||
/// Track preamble, set to self-sync 0xFF, unknown size
|
||||
/// </summary>
|
||||
public byte[] gap;
|
||||
/// <summary>
|
||||
/// Track preamble, set to self-sync 0xFF, 6 bytes
|
||||
/// </summary>
|
||||
public byte[] innerGap;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GCR-encoded Apple Sony GCR floppy sector address field
|
||||
/// GCR-encoded Apple Sony GCR floppy sector address field
|
||||
/// </summary>
|
||||
public class RawAddressField
|
||||
{
|
||||
/// <summary>
|
||||
/// Always 0xD5, 0xAA, 0x96
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] prologue;
|
||||
/// <summary>
|
||||
/// Encoded (decodedTrack & 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
|
||||
/// Checksum
|
||||
/// </summary>
|
||||
public byte checksum;
|
||||
/// <summary>
|
||||
/// Always 0xDE, 0xAA
|
||||
/// Always 0xDE, 0xAA
|
||||
/// </summary>
|
||||
[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 & 0x3F)
|
||||
/// </summary>
|
||||
public byte track;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GCR-encoded Apple ][ GCR floppy sector data field
|
||||
/// GCR-encoded Apple ][ GCR floppy sector data field
|
||||
/// </summary>
|
||||
public class RawDataField
|
||||
{
|
||||
/// <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;
|
||||
/// <summary>
|
||||
/// Encoded data bytes.
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 698)] public byte[] data;
|
||||
/// <summary>
|
||||
/// Checksum
|
||||
/// Checksum
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] public byte[] checksum;
|
||||
/// <summary>
|
||||
/// Always 0xDE, 0xAA
|
||||
/// Encoded data bytes.
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 698)] public byte[] data;
|
||||
/// <summary>
|
||||
/// Always 0xDE, 0xAA
|
||||
/// </summary>
|
||||
[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)
|
||||
@@ -441,8 +441,7 @@ namespace DiscImageChef.Decoders.Floppy
|
||||
|
||||
MemoryStream raw = new MemoryStream();
|
||||
raw.Write(track.gap, 0, track.gap.Length);
|
||||
foreach(byte[] rawSector in track.sectors.Select(MarshalSector))
|
||||
{ raw.Write(rawSector, 0, rawSector.Length); }
|
||||
foreach(byte[] rawSector in track.sectors.Select(MarshalSector)) raw.Write(rawSector, 0, rawSector.Length);
|
||||
|
||||
return raw.ToArray();
|
||||
}
|
||||
@@ -481,7 +480,7 @@ namespace DiscImageChef.Decoders.Floppy
|
||||
if(disk == null) return null;
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ using System.Runtime.InteropServices;
|
||||
namespace DiscImageChef.Decoders.Floppy
|
||||
{
|
||||
/// <summary>
|
||||
/// Methods and structures for Commodore GCR floppy decoding
|
||||
/// Methods and structures for Commodore GCR floppy decoding
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -44,55 +44,55 @@ namespace DiscImageChef.Decoders.Floppy
|
||||
public static class Commodore
|
||||
{
|
||||
/// <summary>
|
||||
/// Decoded Commodore GCR sector header
|
||||
/// Decoded Commodore GCR sector header
|
||||
/// </summary>
|
||||
public struct SectorHeader
|
||||
{
|
||||
/// <summary>
|
||||
/// Always 0x08
|
||||
/// Always 0x08
|
||||
/// </summary>
|
||||
public byte id;
|
||||
/// <summary>
|
||||
/// XOR of following fields
|
||||
/// XOR of following fields
|
||||
/// </summary>
|
||||
public byte checksum;
|
||||
/// <summary>
|
||||
/// Sector number
|
||||
/// Sector number
|
||||
/// </summary>
|
||||
public byte sector;
|
||||
/// <summary>
|
||||
/// Track number
|
||||
/// Track number
|
||||
/// </summary>
|
||||
public byte track;
|
||||
/// <summary>
|
||||
/// Format ID, unknown meaning
|
||||
/// Format ID, unknown meaning
|
||||
/// </summary>
|
||||
public ushort format;
|
||||
/// <summary>
|
||||
/// Filled with 0x0F
|
||||
/// Filled with 0x0F
|
||||
/// </summary>
|
||||
public ushort fill;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Decoded Commodore GCR sector data
|
||||
/// Decoded Commodore GCR sector data
|
||||
/// </summary>
|
||||
public struct SectorData
|
||||
{
|
||||
/// <summary>
|
||||
/// Always 0x07
|
||||
/// Always 0x07
|
||||
/// </summary>
|
||||
public byte id;
|
||||
/// <summary>
|
||||
/// User data
|
||||
/// User data
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] public byte data;
|
||||
/// <summary>
|
||||
/// XOR of <see cref="data"/>
|
||||
/// XOR of <see cref="data" />
|
||||
/// </summary>
|
||||
public byte checksum;
|
||||
/// <summary>
|
||||
/// Filled with 0x0F
|
||||
/// Filled with 0x0F
|
||||
/// </summary>
|
||||
public ushort fill;
|
||||
}
|
||||
|
||||
@@ -35,41 +35,41 @@ using System.Diagnostics.CodeAnalysis;
|
||||
namespace DiscImageChef.Decoders.Floppy
|
||||
{
|
||||
/// <summary>
|
||||
/// In-sector code for sector size
|
||||
/// In-sector code for sector size
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum IBMSectorSizeCode : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// 128 bytes/sector
|
||||
/// 128 bytes/sector
|
||||
/// </summary>
|
||||
EighthKilo = 0,
|
||||
/// <summary>
|
||||
/// 256 bytes/sector
|
||||
/// 256 bytes/sector
|
||||
/// </summary>
|
||||
QuarterKilo = 1,
|
||||
/// <summary>
|
||||
/// 512 bytes/sector
|
||||
/// 512 bytes/sector
|
||||
/// </summary>
|
||||
HalfKilo = 2,
|
||||
/// <summary>
|
||||
/// 1024 bytes/sector
|
||||
/// 1024 bytes/sector
|
||||
/// </summary>
|
||||
Kilo = 3,
|
||||
/// <summary>
|
||||
/// 2048 bytes/sector
|
||||
/// 2048 bytes/sector
|
||||
/// </summary>
|
||||
TwiceKilo = 4,
|
||||
/// <summary>
|
||||
/// 4096 bytes/sector
|
||||
/// 4096 bytes/sector
|
||||
/// </summary>
|
||||
FriceKilo = 5,
|
||||
/// <summary>
|
||||
/// 8192 bytes/sector
|
||||
/// 8192 bytes/sector
|
||||
/// </summary>
|
||||
TwiceFriceKilo = 6,
|
||||
/// <summary>
|
||||
/// 16384 bytes/sector
|
||||
/// 16384 bytes/sector
|
||||
/// </summary>
|
||||
FricelyFriceKilo = 7
|
||||
}
|
||||
@@ -87,19 +87,19 @@ namespace DiscImageChef.Decoders.Floppy
|
||||
public enum AppleEncodedFormat : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Disk is an Apple II 3.5" disk
|
||||
/// Disk is an Apple II 3.5" disk
|
||||
/// </summary>
|
||||
AppleII = 0x96,
|
||||
/// <summary>
|
||||
/// Disk is an Apple Lisa 3.5" disk
|
||||
/// Disk is an Apple Lisa 3.5" disk
|
||||
/// </summary>
|
||||
Lisa = 0x97,
|
||||
/// <summary>
|
||||
/// Disk is an Apple Macintosh single-sided 3.5" disk
|
||||
/// Disk is an Apple Macintosh single-sided 3.5" disk
|
||||
/// </summary>
|
||||
MacSingleSide = 0x9A,
|
||||
/// <summary>
|
||||
/// Disk is an Apple Macintosh double-sided 3.5" disk
|
||||
/// Disk is an Apple Macintosh double-sided 3.5" disk
|
||||
/// </summary>
|
||||
MacDoubleSide = 0xD9
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace DiscImageChef.Decoders.Floppy
|
||||
// ECMA-100
|
||||
|
||||
/// <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>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -54,109 +54,109 @@ namespace DiscImageChef.Decoders.Floppy
|
||||
public static class ISO
|
||||
{
|
||||
/// <summary>
|
||||
/// ISO floppy track, also used by Atari ST and others
|
||||
/// ISO floppy track, also used by Atari ST and others
|
||||
/// </summary>
|
||||
public struct Track
|
||||
{
|
||||
/// <summary>
|
||||
/// Start of track, 32 bytes set to 0x4E
|
||||
/// Start of track, 32 bytes set to 0x4E
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] public byte[] innerGap;
|
||||
/// <summary>
|
||||
/// Track sectors
|
||||
/// Track sectors
|
||||
/// </summary>
|
||||
public Sector[] sectors;
|
||||
/// <summary>
|
||||
/// Undefined size
|
||||
/// Undefined size
|
||||
/// </summary>
|
||||
public byte[] gap;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raw demodulated format for IBM System 34 floppies
|
||||
/// Raw demodulated format for IBM System 34 floppies
|
||||
/// </summary>
|
||||
public struct Sector
|
||||
{
|
||||
/// <summary>
|
||||
/// Sector address mark
|
||||
/// Sector address mark
|
||||
/// </summary>
|
||||
public AddressMark addressMark;
|
||||
/// <summary>
|
||||
/// 22 bytes set to 0x4E, set to 0x22 on Commodore 1581
|
||||
/// 22 bytes set to 0x4E, set to 0x22 on Commodore 1581
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 22)] public byte[] innerGap;
|
||||
/// <summary>
|
||||
/// Sector data block
|
||||
/// Sector data block
|
||||
/// </summary>
|
||||
public DataBlock dataBlock;
|
||||
/// <summary>
|
||||
/// Variable bytes set to 0x4E, ECMA defines 54
|
||||
/// Variable bytes set to 0x4E, ECMA defines 54
|
||||
/// </summary>
|
||||
public byte[] outerGap;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sector address mark for IBM System 34 floppies, contains sync word
|
||||
/// Sector address mark for IBM System 34 floppies, contains sync word
|
||||
/// </summary>
|
||||
public struct AddressMark
|
||||
{
|
||||
/// <summary>
|
||||
/// 12 bytes set to 0
|
||||
/// 12 bytes set to 0
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
|
||||
/// <summary>
|
||||
/// 3 bytes set to 0xA1
|
||||
/// 3 bytes set to 0xA1
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
|
||||
/// <summary>
|
||||
/// Set to <see cref="IBMIdType.AddressMark"/>
|
||||
/// Set to <see cref="IBMIdType.AddressMark" />
|
||||
/// </summary>
|
||||
public IBMIdType type;
|
||||
/// <summary>
|
||||
/// Track number
|
||||
/// Track number
|
||||
/// </summary>
|
||||
public byte track;
|
||||
/// <summary>
|
||||
/// Side number
|
||||
/// Side number
|
||||
/// </summary>
|
||||
public byte side;
|
||||
/// <summary>
|
||||
/// Sector number
|
||||
/// Sector number
|
||||
/// </summary>
|
||||
public byte sector;
|
||||
/// <summary>
|
||||
/// <see cref="IBMSectorSizeCode"/>
|
||||
/// <see cref="IBMSectorSizeCode" />
|
||||
/// </summary>
|
||||
public IBMSectorSizeCode sectorSize;
|
||||
/// <summary>
|
||||
/// CRC16 from <see cref="aone"/> to end of <see cref="sectorSize"/>
|
||||
/// CRC16 from <see cref="aone" /> to end of <see cref="sectorSize" />
|
||||
/// </summary>
|
||||
public ushort crc;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sector data block for IBM System 34 floppies
|
||||
/// Sector data block for IBM System 34 floppies
|
||||
/// </summary>
|
||||
public struct DataBlock
|
||||
{
|
||||
/// <summary>
|
||||
/// 12 bytes set to 0
|
||||
/// 12 bytes set to 0
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
|
||||
/// <summary>
|
||||
/// 3 bytes set to 0xA1
|
||||
/// 3 bytes set to 0xA1
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
|
||||
/// <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>
|
||||
public IBMIdType type;
|
||||
/// <summary>
|
||||
/// User data
|
||||
/// User data
|
||||
/// </summary>
|
||||
public byte[] data;
|
||||
/// <summary>
|
||||
/// CRC16 from <see cref="aone"/> to end of <see cref="data"/>
|
||||
/// CRC16 from <see cref="aone" /> to end of <see cref="data" />
|
||||
/// </summary>
|
||||
public ushort crc;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace DiscImageChef.Decoders.Floppy
|
||||
// ECMA-100
|
||||
|
||||
/// <summary>
|
||||
/// Methods and structures for perpendicular MFM floppy decoding
|
||||
/// Methods and structures for perpendicular MFM floppy decoding
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -54,137 +54,137 @@ namespace DiscImageChef.Decoders.Floppy
|
||||
public static class Perpendicular
|
||||
{
|
||||
/// <summary>
|
||||
/// Perpendicular floppy track
|
||||
/// Perpendicular floppy track
|
||||
/// </summary>
|
||||
public struct Track
|
||||
{
|
||||
/// <summary>
|
||||
/// Start of track
|
||||
/// Start of track
|
||||
/// </summary>
|
||||
public TrackPreamble trackStart;
|
||||
/// <summary>
|
||||
/// Track sectors
|
||||
/// Track sectors
|
||||
/// </summary>
|
||||
public Sector[] sectors;
|
||||
/// <summary>
|
||||
/// Undefined size
|
||||
/// Undefined size
|
||||
/// </summary>
|
||||
public byte[] gap;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raw demodulated format for perpendicular floppies
|
||||
/// Raw demodulated format for perpendicular floppies
|
||||
/// </summary>
|
||||
public struct Sector
|
||||
{
|
||||
/// <summary>
|
||||
/// Sector address mark
|
||||
/// Sector address mark
|
||||
/// </summary>
|
||||
public AddressMark addressMark;
|
||||
/// <summary>
|
||||
/// 41 bytes set to 0x4E
|
||||
/// 41 bytes set to 0x4E
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 41)] public byte[] innerGap;
|
||||
/// <summary>
|
||||
/// Sector data block
|
||||
/// Sector data block
|
||||
/// </summary>
|
||||
public DataBlock dataBlock;
|
||||
/// <summary>
|
||||
/// Variable-sized inter-sector gap, ECMA defines 83 bytes
|
||||
/// Variable-sized inter-sector gap, ECMA defines 83 bytes
|
||||
/// </summary>
|
||||
public byte[] outerGap;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start of IBM PC MFM floppy track
|
||||
/// Used by IBM PC, Apple Macintosh (high-density only), and a lot others
|
||||
/// Start of IBM PC MFM floppy track
|
||||
/// Used by IBM PC, Apple Macintosh (high-density only), and a lot others
|
||||
/// </summary>
|
||||
public struct TrackPreamble
|
||||
{
|
||||
/// <summary>
|
||||
/// Gap from index pulse, 80 bytes set to 0x4E
|
||||
/// Gap from index pulse, 80 bytes set to 0x4E
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 80)] public byte[] gap;
|
||||
/// <summary>
|
||||
/// 12 bytes set to 0x00
|
||||
/// 12 bytes set to 0x00
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
|
||||
/// <summary>
|
||||
/// 3 bytes set to 0xC2
|
||||
/// 3 bytes set to 0xC2
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] ctwo;
|
||||
/// <summary>
|
||||
/// Set to <see cref="IBMIdType.IndexMark"/>
|
||||
/// Set to <see cref="IBMIdType.IndexMark" />
|
||||
/// </summary>
|
||||
public IBMIdType type;
|
||||
/// <summary>
|
||||
/// Gap until first sector, 50 bytes to 0x4E
|
||||
/// Gap until first sector, 50 bytes to 0x4E
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] public byte[] gap1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sector address mark for IBM System 34 floppies, contains sync word
|
||||
/// Sector address mark for IBM System 34 floppies, contains sync word
|
||||
/// </summary>
|
||||
public struct AddressMark
|
||||
{
|
||||
/// <summary>
|
||||
/// 12 bytes set to 0
|
||||
/// 12 bytes set to 0
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
|
||||
/// <summary>
|
||||
/// 3 bytes set to 0xA1
|
||||
/// 3 bytes set to 0xA1
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
|
||||
/// <summary>
|
||||
/// Set to <see cref="IBMIdType.AddressMark"/>
|
||||
/// Set to <see cref="IBMIdType.AddressMark" />
|
||||
/// </summary>
|
||||
public IBMIdType type;
|
||||
/// <summary>
|
||||
/// Track number
|
||||
/// Track number
|
||||
/// </summary>
|
||||
public byte track;
|
||||
/// <summary>
|
||||
/// Side number
|
||||
/// Side number
|
||||
/// </summary>
|
||||
public byte side;
|
||||
/// <summary>
|
||||
/// Sector number
|
||||
/// Sector number
|
||||
/// </summary>
|
||||
public byte sector;
|
||||
/// <summary>
|
||||
/// <see cref="IBMSectorSizeCode"/>
|
||||
/// <see cref="IBMSectorSizeCode" />
|
||||
/// </summary>
|
||||
public IBMSectorSizeCode sectorSize;
|
||||
/// <summary>
|
||||
/// CRC16 from <see cref="aone"/> to end of <see cref="sectorSize"/>
|
||||
/// CRC16 from <see cref="aone" /> to end of <see cref="sectorSize" />
|
||||
/// </summary>
|
||||
public ushort crc;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sector data block for IBM System 34 floppies
|
||||
/// Sector data block for IBM System 34 floppies
|
||||
/// </summary>
|
||||
public struct DataBlock
|
||||
{
|
||||
/// <summary>
|
||||
/// 12 bytes set to 0
|
||||
/// 12 bytes set to 0
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
|
||||
/// <summary>
|
||||
/// 3 bytes set to 0xA1
|
||||
/// 3 bytes set to 0xA1
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
|
||||
/// <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>
|
||||
public IBMIdType type;
|
||||
/// <summary>
|
||||
/// User data
|
||||
/// User data
|
||||
/// </summary>
|
||||
public byte[] data;
|
||||
/// <summary>
|
||||
/// CRC16 from <see cref="aone"/> to end of <see cref="data"/>
|
||||
/// CRC16 from <see cref="aone" /> to end of <see cref="data" />
|
||||
/// </summary>
|
||||
public ushort crc;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace DiscImageChef.Decoders.Floppy
|
||||
// ECMA-100
|
||||
|
||||
/// <summary>
|
||||
/// Methods and structures for IBM System 34 floppy decoding
|
||||
/// Methods and structures for IBM System 34 floppy decoding
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -54,138 +54,138 @@ namespace DiscImageChef.Decoders.Floppy
|
||||
public static class System34
|
||||
{
|
||||
/// <summary>
|
||||
/// Track format for IBM System 34 floppy
|
||||
/// Used by IBM PC, Apple Macintosh (high-density only), and a lot others
|
||||
/// Track format for IBM System 34 floppy
|
||||
/// Used by IBM PC, Apple Macintosh (high-density only), and a lot others
|
||||
/// </summary>
|
||||
public struct Track
|
||||
{
|
||||
/// <summary>
|
||||
/// Start of track
|
||||
/// Start of track
|
||||
/// </summary>
|
||||
public TrackPreamble trackStart;
|
||||
/// <summary>
|
||||
/// Track sectors
|
||||
/// Track sectors
|
||||
/// </summary>
|
||||
public Sector[] sectors;
|
||||
/// <summary>
|
||||
/// Undefined size
|
||||
/// Undefined size
|
||||
/// </summary>
|
||||
public byte[] gap;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start of IBM PC MFM floppy track
|
||||
/// Used by IBM PC, Apple Macintosh (high-density only), and a lot others
|
||||
/// Start of IBM PC MFM floppy track
|
||||
/// Used by IBM PC, Apple Macintosh (high-density only), and a lot others
|
||||
/// </summary>
|
||||
public struct TrackPreamble
|
||||
{
|
||||
/// <summary>
|
||||
/// Gap from index pulse, 80 bytes set to 0x4E
|
||||
/// Gap from index pulse, 80 bytes set to 0x4E
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 80)] public byte[] gap;
|
||||
/// <summary>
|
||||
/// 12 bytes set to 0x00
|
||||
/// 12 bytes set to 0x00
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
|
||||
/// <summary>
|
||||
/// 3 bytes set to 0xC2
|
||||
/// 3 bytes set to 0xC2
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] ctwo;
|
||||
/// <summary>
|
||||
/// Set to <see cref="IBMIdType.IndexMark"/>
|
||||
/// Set to <see cref="IBMIdType.IndexMark" />
|
||||
/// </summary>
|
||||
public IBMIdType type;
|
||||
/// <summary>
|
||||
/// Gap until first sector, 50 bytes to 0x4E
|
||||
/// Gap until first sector, 50 bytes to 0x4E
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] public byte[] gap1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raw demodulated format for IBM System 34 floppies
|
||||
/// Raw demodulated format for IBM System 34 floppies
|
||||
/// </summary>
|
||||
public struct Sector
|
||||
{
|
||||
/// <summary>
|
||||
/// Sector address mark
|
||||
/// Sector address mark
|
||||
/// </summary>
|
||||
public AddressMark addressMark;
|
||||
/// <summary>
|
||||
/// 22 bytes set to 0x4E, set to 0x22 on Commodore 1581
|
||||
/// 22 bytes set to 0x4E, set to 0x22 on Commodore 1581
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 22)] public byte[] innerGap;
|
||||
/// <summary>
|
||||
/// Sector data block
|
||||
/// Sector data block
|
||||
/// </summary>
|
||||
public DataBlock dataBlock;
|
||||
/// <summary>
|
||||
/// Variable bytes set to 0x4E, ECMA defines 54
|
||||
/// Variable bytes set to 0x4E, ECMA defines 54
|
||||
/// </summary>
|
||||
public byte[] outerGap;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sector address mark for IBM System 34 floppies, contains sync word
|
||||
/// Sector address mark for IBM System 34 floppies, contains sync word
|
||||
/// </summary>
|
||||
public struct AddressMark
|
||||
{
|
||||
/// <summary>
|
||||
/// 12 bytes set to 0
|
||||
/// 12 bytes set to 0
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
|
||||
/// <summary>
|
||||
/// 3 bytes set to 0xA1
|
||||
/// 3 bytes set to 0xA1
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
|
||||
/// <summary>
|
||||
/// Set to <see cref="IBMIdType.AddressMark"/>
|
||||
/// Set to <see cref="IBMIdType.AddressMark" />
|
||||
/// </summary>
|
||||
public IBMIdType type;
|
||||
/// <summary>
|
||||
/// Track number
|
||||
/// Track number
|
||||
/// </summary>
|
||||
public byte track;
|
||||
/// <summary>
|
||||
/// Side number
|
||||
/// Side number
|
||||
/// </summary>
|
||||
public byte side;
|
||||
/// <summary>
|
||||
/// Sector number
|
||||
/// Sector number
|
||||
/// </summary>
|
||||
public byte sector;
|
||||
/// <summary>
|
||||
/// <see cref="IBMSectorSizeCode"/>
|
||||
/// <see cref="IBMSectorSizeCode" />
|
||||
/// </summary>
|
||||
public IBMSectorSizeCode sectorSize;
|
||||
/// <summary>
|
||||
/// CRC16 from <see cref="aone"/> to end of <see cref="sectorSize"/>
|
||||
/// CRC16 from <see cref="aone" /> to end of <see cref="sectorSize" />
|
||||
/// </summary>
|
||||
public ushort crc;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sector data block for IBM System 34 floppies
|
||||
/// Sector data block for IBM System 34 floppies
|
||||
/// </summary>
|
||||
public struct DataBlock
|
||||
{
|
||||
/// <summary>
|
||||
/// 12 bytes set to 0
|
||||
/// 12 bytes set to 0
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
|
||||
/// <summary>
|
||||
/// 3 bytes set to 0xA1
|
||||
/// 3 bytes set to 0xA1
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
|
||||
/// <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>
|
||||
public IBMIdType type;
|
||||
/// <summary>
|
||||
/// User data
|
||||
/// User data
|
||||
/// </summary>
|
||||
public byte[] data;
|
||||
/// <summary>
|
||||
/// CRC16 from <see cref="aone"/> to end of <see cref="data"/>
|
||||
/// CRC16 from <see cref="aone" /> to end of <see cref="data" />
|
||||
/// </summary>
|
||||
public ushort crc;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace DiscImageChef.Decoders.Floppy
|
||||
// ECMA-100
|
||||
|
||||
/// <summary>
|
||||
/// Methods and structures for IBM System 3740 floppy decoding
|
||||
/// Methods and structures for IBM System 3740 floppy decoding
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -54,124 +54,124 @@ namespace DiscImageChef.Decoders.Floppy
|
||||
public static class System3740
|
||||
{
|
||||
/// <summary>
|
||||
/// Track format for IBM System 3740 floppy
|
||||
/// Track format for IBM System 3740 floppy
|
||||
/// </summary>
|
||||
public struct Track
|
||||
{
|
||||
/// <summary>
|
||||
/// Start of track
|
||||
/// Start of track
|
||||
/// </summary>
|
||||
public TrackPreamble trackStart;
|
||||
/// <summary>
|
||||
/// Track sectors
|
||||
/// Track sectors
|
||||
/// </summary>
|
||||
public Sector[] sectors;
|
||||
/// <summary>
|
||||
/// Undefined size
|
||||
/// Undefined size
|
||||
/// </summary>
|
||||
public byte[] gap;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start of IBM PC FM floppy track
|
||||
/// Start of IBM PC FM floppy track
|
||||
/// </summary>
|
||||
public struct TrackPreamble
|
||||
{
|
||||
/// <summary>
|
||||
/// Gap from index pulse, 80 bytes set to 0xFF
|
||||
/// Gap from index pulse, 80 bytes set to 0xFF
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)] public byte[] gap;
|
||||
/// <summary>
|
||||
/// 6 bytes set to 0x00
|
||||
/// 6 bytes set to 0x00
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public byte[] zero;
|
||||
/// <summary>
|
||||
/// Set to <see cref="IBMIdType.IndexMark"/>
|
||||
/// Set to <see cref="IBMIdType.IndexMark" />
|
||||
/// </summary>
|
||||
public IBMIdType type;
|
||||
/// <summary>
|
||||
/// Gap until first sector, 26 bytes to 0xFF
|
||||
/// Gap until first sector, 26 bytes to 0xFF
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 26)] public byte[] gap1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raw demodulated format for IBM System 3740 floppies
|
||||
/// Raw demodulated format for IBM System 3740 floppies
|
||||
/// </summary>
|
||||
public struct Sector
|
||||
{
|
||||
/// <summary>
|
||||
/// Sector address mark
|
||||
/// Sector address mark
|
||||
/// </summary>
|
||||
public AddressMark addressMark;
|
||||
/// <summary>
|
||||
/// 11 bytes set to 0xFF
|
||||
/// 11 bytes set to 0xFF
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 11)] public byte[] innerGap;
|
||||
/// <summary>
|
||||
/// Sector data block
|
||||
/// Sector data block
|
||||
/// </summary>
|
||||
public DataBlock dataBlock;
|
||||
/// <summary>
|
||||
/// Variable bytes set to 0xFF
|
||||
/// Variable bytes set to 0xFF
|
||||
/// </summary>
|
||||
public byte[] outerGap;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sector address mark for IBM System 3740 floppies, contains sync word
|
||||
/// Sector address mark for IBM System 3740 floppies, contains sync word
|
||||
/// </summary>
|
||||
public struct AddressMark
|
||||
{
|
||||
/// <summary>
|
||||
/// 6 bytes set to 0
|
||||
/// 6 bytes set to 0
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public byte[] zero;
|
||||
/// <summary>
|
||||
/// Set to <see cref="IBMIdType.AddressMark"/>
|
||||
/// Set to <see cref="IBMIdType.AddressMark" />
|
||||
/// </summary>
|
||||
public IBMIdType type;
|
||||
/// <summary>
|
||||
/// Track number
|
||||
/// Track number
|
||||
/// </summary>
|
||||
public byte track;
|
||||
/// <summary>
|
||||
/// Side number
|
||||
/// Side number
|
||||
/// </summary>
|
||||
public byte side;
|
||||
/// <summary>
|
||||
/// Sector number
|
||||
/// Sector number
|
||||
/// </summary>
|
||||
public byte sector;
|
||||
/// <summary>
|
||||
/// <see cref="IBMSectorSizeCode"/>
|
||||
/// <see cref="IBMSectorSizeCode" />
|
||||
/// </summary>
|
||||
public IBMSectorSizeCode sectorSize;
|
||||
/// <summary>
|
||||
/// CRC16 from <see cref="type"/> to end of <see cref="sectorSize"/>
|
||||
/// CRC16 from <see cref="type" /> to end of <see cref="sectorSize" />
|
||||
/// </summary>
|
||||
public ushort crc;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sector data block for IBM System 3740 floppies
|
||||
/// Sector data block for IBM System 3740 floppies
|
||||
/// </summary>
|
||||
public struct DataBlock
|
||||
{
|
||||
/// <summary>
|
||||
/// 12 bytes set to 0
|
||||
/// 12 bytes set to 0
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
|
||||
/// <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>
|
||||
public IBMIdType type;
|
||||
/// <summary>
|
||||
/// User data
|
||||
/// User data
|
||||
/// </summary>
|
||||
public byte[] data;
|
||||
/// <summary>
|
||||
/// CRC16 from <see cref="type"/> to end of <see cref="data"/>
|
||||
/// CRC16 from <see cref="type" /> to end of <see cref="data" />
|
||||
/// </summary>
|
||||
public ushort crc;
|
||||
}
|
||||
|
||||
42
LisaTag.cs
42
LisaTag.cs
@@ -41,7 +41,7 @@ namespace DiscImageChef.Decoders
|
||||
public static class LisaTag
|
||||
{
|
||||
/// <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>
|
||||
public struct ProfileTag
|
||||
{
|
||||
@@ -56,31 +56,31 @@ namespace DiscImageChef.Decoders
|
||||
/// <summary>0x04, file ID</summary>
|
||||
public short FileId;
|
||||
/// <summary>
|
||||
/// 0x06 bit 7, checksum valid?
|
||||
/// 0x06 bit 7, checksum valid?
|
||||
/// </summary>
|
||||
public bool ValidChk;
|
||||
/// <summary>
|
||||
/// 0x06 bits 6 to 0, used bytes in block
|
||||
/// 0x06 bits 6 to 0, used bytes in block
|
||||
/// </summary>
|
||||
public ushort UsedBytes;
|
||||
/// <summary>
|
||||
/// 0x08, 3 bytes, absolute page number
|
||||
/// 0x08, 3 bytes, absolute page number
|
||||
/// </summary>
|
||||
public uint AbsPage;
|
||||
/// <summary>
|
||||
/// 0x0B, checksum of data
|
||||
/// 0x0B, checksum of data
|
||||
/// </summary>
|
||||
public byte Checksum;
|
||||
/// <summary>
|
||||
/// 0x0C, relative page number
|
||||
/// 0x0C, relative page number
|
||||
/// </summary>
|
||||
public ushort RelPage;
|
||||
/// <summary>
|
||||
/// 0x0E, 3 bytes, next block, 0xFFFFFF if it's last block
|
||||
/// 0x0E, 3 bytes, next block, 0xFFFFFF if it's last block
|
||||
/// </summary>
|
||||
public uint NextBlock;
|
||||
/// <summary>
|
||||
/// 0x11, 3 bytes, previous block, 0xFFFFFF if it's first block
|
||||
/// 0x11, 3 bytes, previous block, 0xFFFFFF if it's first block
|
||||
/// </summary>
|
||||
public uint PrevBlock;
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace DiscImageChef.Decoders
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// LisaOS tag as stored on Priam DataTower disks (24 bytes)
|
||||
/// LisaOS tag as stored on Priam DataTower disks (24 bytes)
|
||||
/// </summary>
|
||||
public struct PriamTag
|
||||
{
|
||||
@@ -106,35 +106,35 @@ namespace DiscImageChef.Decoders
|
||||
/// <summary>0x04, file ID</summary>
|
||||
public short FileId;
|
||||
/// <summary>
|
||||
/// 0x06 bit 7, checksum valid?
|
||||
/// 0x06 bit 7, checksum valid?
|
||||
/// </summary>
|
||||
public bool ValidChk;
|
||||
/// <summary>
|
||||
/// 0x06 bits 6 to 0, used bytes in block
|
||||
/// 0x06 bits 6 to 0, used bytes in block
|
||||
/// </summary>
|
||||
public ushort UsedBytes;
|
||||
/// <summary>
|
||||
/// 0x08, 3 bytes, absolute page number
|
||||
/// 0x08, 3 bytes, absolute page number
|
||||
/// </summary>
|
||||
public uint AbsPage;
|
||||
/// <summary>
|
||||
/// 0x0B, checksum of data
|
||||
/// 0x0B, checksum of data
|
||||
/// </summary>
|
||||
public byte Checksum;
|
||||
/// <summary>
|
||||
/// 0x0C, relative page number
|
||||
/// 0x0C, relative page number
|
||||
/// </summary>
|
||||
public ushort RelPage;
|
||||
/// <summary>
|
||||
/// 0x0E, 3 bytes, next block, 0xFFFFFF if it's last block
|
||||
/// 0x0E, 3 bytes, next block, 0xFFFFFF if it's last block
|
||||
/// </summary>
|
||||
public uint NextBlock;
|
||||
/// <summary>
|
||||
/// 0x11, 3 bytes, previous block, 0xFFFFFF if it's first block
|
||||
/// 0x11, 3 bytes, previous block, 0xFFFFFF if it's first block
|
||||
/// </summary>
|
||||
public uint PrevBlock;
|
||||
/// <summary>
|
||||
/// 0x14, disk size
|
||||
/// 0x14, disk size
|
||||
/// </summary>
|
||||
public uint DiskSize;
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace DiscImageChef.Decoders
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// LisaOS tag as stored on Apple Sony disks (12 bytes)
|
||||
/// LisaOS tag as stored on Apple Sony disks (12 bytes)
|
||||
/// </summary>
|
||||
public struct SonyTag
|
||||
{
|
||||
@@ -160,15 +160,15 @@ namespace DiscImageChef.Decoders
|
||||
/// <summary>0x04, file ID</summary>
|
||||
public short FileId;
|
||||
/// <summary>
|
||||
/// 0x06, relative page number
|
||||
/// 0x06, relative page number
|
||||
/// </summary>
|
||||
public ushort RelPage;
|
||||
/// <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>
|
||||
public ushort NextBlock;
|
||||
/// <summary>
|
||||
/// 0x0A, 3 bytes, previous block, 0x7FF if it's first block
|
||||
/// 0x0A, 3 bytes, previous block, 0x7FF if it's first block
|
||||
/// </summary>
|
||||
public ushort PrevBlock;
|
||||
|
||||
|
||||
@@ -271,7 +271,8 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
else
|
||||
{
|
||||
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();
|
||||
|
||||
114
PCMCIA/Enums.cs
114
PCMCIA/Enums.cs
@@ -35,169 +35,169 @@ using System.Diagnostics.CodeAnalysis;
|
||||
namespace DiscImageChef.Decoders.PCMCIA
|
||||
{
|
||||
/// <summary>
|
||||
/// Tuple codes.
|
||||
/// Tuple codes.
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum TupleCodes : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Checksum control
|
||||
/// Checksum control
|
||||
/// </summary>
|
||||
CISTPL_CHECKSUM = 0x10,
|
||||
/// <summary>
|
||||
/// End-of-chain
|
||||
/// End-of-chain
|
||||
/// </summary>
|
||||
CISTPL_END = 0xFF,
|
||||
/// <summary>
|
||||
/// Indirect access PC Card memory
|
||||
/// Indirect access PC Card memory
|
||||
/// </summary>
|
||||
CISTPL_INDIRECT = 0x03,
|
||||
/// <summary>
|
||||
/// Link-target-control
|
||||
/// Link-target-control
|
||||
/// </summary>
|
||||
CISTPL_LINKTARGET = 0x13,
|
||||
/// <summary>
|
||||
/// Longlink to attribute memory
|
||||
/// Longlink to attribute memory
|
||||
/// </summary>
|
||||
CISTPL_LONGLINK_A = 0x11,
|
||||
/// <summary>
|
||||
/// Longlink to common memory
|
||||
/// Longlink to common memory
|
||||
/// </summary>
|
||||
CISTPL_LONGLINK_C = 0x12,
|
||||
/// <summary>
|
||||
/// Longlink to next chain on a Cardbus PC Card
|
||||
/// Longlink to next chain on a Cardbus PC Card
|
||||
/// </summary>
|
||||
CISTPL_LONGLINK_CB = 0x02,
|
||||
/// <summary>
|
||||
/// Longlink to function specific chains
|
||||
/// Longlink to function specific chains
|
||||
/// </summary>
|
||||
CISTPL_LONGLINK_MFC = 0x06,
|
||||
/// <summary>
|
||||
/// No-link to common memory
|
||||
/// No-link to common memory
|
||||
/// </summary>
|
||||
CISTPL_NO_LINK = 0x14,
|
||||
/// <summary>
|
||||
/// Null tuple
|
||||
/// Null tuple
|
||||
/// </summary>
|
||||
CISTPL_NULL = 0x00,
|
||||
/// <summary>
|
||||
/// Alternate language string
|
||||
/// Alternate language string
|
||||
/// </summary>
|
||||
CISTPL_ALTSTR = 0x16,
|
||||
/// <summary>
|
||||
/// Common memory device information
|
||||
/// Common memory device information
|
||||
/// </summary>
|
||||
CISTPL_DEVICE = 0x01,
|
||||
/// <summary>
|
||||
/// Attribute memory device information
|
||||
/// Attribute memory device information
|
||||
/// </summary>
|
||||
CISTPL_DEVICE_A = 0x17,
|
||||
/// <summary>
|
||||
/// Other operating conditions information for attribute memory
|
||||
/// Other operating conditions information for attribute memory
|
||||
/// </summary>
|
||||
CISTPL_DEVICE_OA = 0x1D,
|
||||
/// <summary>
|
||||
/// Other operating conditions information for common memory
|
||||
/// Other operating conditions information for common memory
|
||||
/// </summary>
|
||||
CISTPL_DEVICE_OC = 0x1C,
|
||||
/// <summary>
|
||||
/// Device geometry information for common memory
|
||||
/// Device geometry information for common memory
|
||||
/// </summary>
|
||||
CISTPL_DEVICEGEO = 0x1E,
|
||||
/// <summary>
|
||||
/// Device geometry information for attribute memory
|
||||
/// Device geometry information for attribute memory
|
||||
/// </summary>
|
||||
CISTPL_DEVICEGEO_A = 0x1F,
|
||||
/// <summary>
|
||||
/// Extended common memory device information
|
||||
/// Extended common memory device information
|
||||
/// </summary>
|
||||
CISTPL_EXTDEVIC = 0x09,
|
||||
/// <summary>
|
||||
/// Function extensions
|
||||
/// Function extensions
|
||||
/// </summary>
|
||||
CISTPL_FUNCE = 0x22,
|
||||
/// <summary>
|
||||
/// Function class identification
|
||||
/// Function class identification
|
||||
/// </summary>
|
||||
CISTPL_FUNCID = 0x21,
|
||||
/// <summary>
|
||||
/// JEDEC programming information for attribute memory
|
||||
/// JEDEC programming information for attribute memory
|
||||
/// </summary>
|
||||
CISTPL_JEDEC_A = 0x19,
|
||||
/// <summary>
|
||||
/// JEDEC programming information for common memory
|
||||
/// JEDEC programming information for common memory
|
||||
/// </summary>
|
||||
CISTPL_JEDEC_C = 0x18,
|
||||
/// <summary>
|
||||
/// Manufacturer identification string
|
||||
/// Manufacturer identification string
|
||||
/// </summary>
|
||||
CISTPL_MANFID = 0x20,
|
||||
/// <summary>
|
||||
/// Level 1 version/product information
|
||||
/// Level 1 version/product information
|
||||
/// </summary>
|
||||
CISTPL_VERS_1 = 0x15,
|
||||
/// <summary>
|
||||
/// BAR for a CardBus PC Card
|
||||
/// BAR for a CardBus PC Card
|
||||
/// </summary>
|
||||
CISTPL_BAR = 0x07,
|
||||
/// <summary>
|
||||
/// Configuration-table-entry
|
||||
/// Configuration-table-entry
|
||||
/// </summary>
|
||||
CISTPL_CFTABLE_ENTRY = 0x1B,
|
||||
/// <summary>
|
||||
/// Configuration-table-entry for a CardBus PC Card
|
||||
/// Configuration-table-entry for a CardBus PC Card
|
||||
/// </summary>
|
||||
CISTPL_CFTABLE_ENTRY_CB = 0x05,
|
||||
/// <summary>
|
||||
/// Configuration tuple for a 16-bit PC Card
|
||||
/// Configuration tuple for a 16-bit PC Card
|
||||
/// </summary>
|
||||
CISTPL_CONFIG = 0x1A,
|
||||
/// <summary>
|
||||
/// Configuration tuple for a CardBus PC Card
|
||||
/// Configuration tuple for a CardBus PC Card
|
||||
/// </summary>
|
||||
CISTPL_CONFIG_CB = 0x04,
|
||||
/// <summary>
|
||||
/// Function state save/restore definition
|
||||
/// Function state save/restore definition
|
||||
/// </summary>
|
||||
CISTPL_PWR_MGMNT = 0x08,
|
||||
/// <summary>
|
||||
/// Battery replacement date
|
||||
/// Battery replacement date
|
||||
/// </summary>
|
||||
CISTPL_BATTERY = 0x45,
|
||||
/// <summary>
|
||||
/// Card initialization date
|
||||
/// Card initialization date
|
||||
/// </summary>
|
||||
CISTPL_DATE = 0x44,
|
||||
/// <summary>
|
||||
/// Level 2 version/product information
|
||||
/// Level 2 version/product information
|
||||
/// </summary>
|
||||
CISTPL_VERS_2 = 0x40,
|
||||
/// <summary>
|
||||
/// Byte ordering for disk-like partitions
|
||||
/// Byte ordering for disk-like partitions
|
||||
/// </summary>
|
||||
CISTPL_BYTEORDER = 0x43,
|
||||
/// <summary>
|
||||
/// Data recording format for common memory
|
||||
/// Data recording format for common memory
|
||||
/// </summary>
|
||||
CISTPL_FORMAT = 0x41,
|
||||
/// <summary>
|
||||
/// Data recording format for attribute memory
|
||||
/// Data recording format for attribute memory
|
||||
/// </summary>
|
||||
CISTPL_FORMAT_A = 0x47,
|
||||
/// <summary>
|
||||
/// Partition geometry
|
||||
/// Partition geometry
|
||||
/// </summary>
|
||||
CISTPL_GEOMETRY = 0x42,
|
||||
/// <summary>
|
||||
/// Software interleaving
|
||||
/// Software interleaving
|
||||
/// </summary>
|
||||
CISTPL_SWIL = 0x23,
|
||||
/// <summary>
|
||||
/// Partition organization
|
||||
/// Partition organization
|
||||
/// </summary>
|
||||
CISTPL_ORG = 0x46,
|
||||
/// <summary>
|
||||
/// Special purpose
|
||||
/// Special purpose
|
||||
/// </summary>
|
||||
CISTPL_SPCL = 0x90
|
||||
}
|
||||
@@ -206,43 +206,43 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
public enum DeviceTypeCodes : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// No device, used to designate a hole
|
||||
/// No device, used to designate a hole
|
||||
/// </summary>
|
||||
DTYPE_NULL = 0,
|
||||
/// <summary>
|
||||
/// Masked ROM
|
||||
/// Masked ROM
|
||||
/// </summary>
|
||||
DTYPE_ROM = 1,
|
||||
/// <summary>
|
||||
/// One-type-programmable ROM
|
||||
/// One-type-programmable ROM
|
||||
/// </summary>
|
||||
DTYPE_OTPROM = 2,
|
||||
/// <summary>
|
||||
/// UV-Erasable Programmable ROM
|
||||
/// UV-Erasable Programmable ROM
|
||||
/// </summary>
|
||||
DTYPE_EPROM = 3,
|
||||
/// <summary>
|
||||
/// Electronically-Erasable Programmable ROM
|
||||
/// Electronically-Erasable Programmable ROM
|
||||
/// </summary>
|
||||
DTYPE_EEPROM = 4,
|
||||
/// <summary>
|
||||
/// Flash memory
|
||||
/// Flash memory
|
||||
/// </summary>
|
||||
DTYPE_FLASH = 5,
|
||||
/// <summary>
|
||||
/// Static RAM
|
||||
/// Static RAM
|
||||
/// </summary>
|
||||
DTYPE_SRAM = 6,
|
||||
/// <summary>
|
||||
/// Dynamic RAM
|
||||
/// Dynamic RAM
|
||||
/// </summary>
|
||||
DTYPE_DRAM = 7,
|
||||
/// <summary>
|
||||
/// Function-specific memory address range
|
||||
/// Function-specific memory address range
|
||||
/// </summary>
|
||||
DTYPE_FUNCSPEC = 13,
|
||||
/// <summary>
|
||||
/// Extended type follows
|
||||
/// Extended type follows
|
||||
/// </summary>
|
||||
DTYPE_EXTEND = 14
|
||||
}
|
||||
@@ -251,27 +251,27 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
public enum DeviceSpeedCodes : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// No device
|
||||
/// No device
|
||||
/// </summary>
|
||||
DSPEED_NULL = 0,
|
||||
/// <summary>
|
||||
/// 250 ns
|
||||
/// 250 ns
|
||||
/// </summary>
|
||||
DSPEED_250NS = 1,
|
||||
/// <summary>
|
||||
/// 200 ns
|
||||
/// 200 ns
|
||||
/// </summary>
|
||||
DSPEED_200NS = 2,
|
||||
/// <summary>
|
||||
/// 150 ns
|
||||
/// 150 ns
|
||||
/// </summary>
|
||||
DSPEED_150NS = 3,
|
||||
/// <summary>
|
||||
/// 100 ns
|
||||
/// 100 ns
|
||||
/// </summary>
|
||||
DSPEED_100NS = 4,
|
||||
/// <summary>
|
||||
/// Extended speed follows
|
||||
/// Extended speed follows
|
||||
/// </summary>
|
||||
DSPEED_EXT = 7
|
||||
}
|
||||
|
||||
190
PCMCIA/Types.cs
190
PCMCIA/Types.cs
@@ -35,7 +35,7 @@ using System.Diagnostics.CodeAnalysis;
|
||||
namespace DiscImageChef.Decoders.PCMCIA
|
||||
{
|
||||
/// <summary>
|
||||
/// Basic classure of a PCMCIA tuple
|
||||
/// Basic classure of a PCMCIA tuple
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -48,7 +48,7 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checksum tuple
|
||||
/// Checksum tuple
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -56,29 +56,29 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
public class ChecksumTuple
|
||||
{
|
||||
/// <summary>
|
||||
/// <see cref="TupleCodes.CISTPL_CHECKSUM"/>
|
||||
/// <see cref="TupleCodes.CISTPL_CHECKSUM" />
|
||||
/// </summary>
|
||||
public TupleCodes Code;
|
||||
/// <summary>
|
||||
/// Link to next tuple
|
||||
/// Link to next tuple
|
||||
/// </summary>
|
||||
public byte Link;
|
||||
/// <summary>
|
||||
/// Offset to region to be checksummed
|
||||
/// Offset to region to be checksummed
|
||||
/// </summary>
|
||||
public short Offset;
|
||||
/// <summary>
|
||||
/// Length of region to be checksummed
|
||||
/// Length of region to be checksummed
|
||||
/// </summary>
|
||||
public ushort Length;
|
||||
/// <summary>
|
||||
/// Modulo-256 sum of region
|
||||
/// Modulo-256 sum of region
|
||||
/// </summary>
|
||||
public byte Checksum;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indirect Access PC Card Memory
|
||||
/// Indirect Access PC Card Memory
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -86,17 +86,17 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
public class IndirectTuple
|
||||
{
|
||||
/// <summary>
|
||||
/// <see cref="TupleCodes.CISTPL_INDIRECT"/>
|
||||
/// <see cref="TupleCodes.CISTPL_INDIRECT" />
|
||||
/// </summary>
|
||||
public TupleCodes Code;
|
||||
/// <summary>
|
||||
/// Link to next tuple
|
||||
/// Link to next tuple
|
||||
/// </summary>
|
||||
public byte Link;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Link target tuple
|
||||
/// Link target tuple
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -104,21 +104,21 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
public class LinkTargetTuple
|
||||
{
|
||||
/// <summary>
|
||||
/// <see cref="TupleCodes.CISTPL_LINKTARGET"/>
|
||||
/// <see cref="TupleCodes.CISTPL_LINKTARGET" />
|
||||
/// </summary>
|
||||
public TupleCodes Code;
|
||||
/// <summary>
|
||||
/// Link to next tuple
|
||||
/// Link to next tuple
|
||||
/// </summary>
|
||||
public byte Link;
|
||||
/// <summary>
|
||||
/// 'C''I''S' in ASCII
|
||||
/// 'C''I''S' in ASCII
|
||||
/// </summary>
|
||||
public byte[] Tag;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 16-bit PC Card Long Link Tuple
|
||||
/// 16-bit PC Card Long Link Tuple
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -126,15 +126,16 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
public class LongLinkTuple
|
||||
{
|
||||
/// <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>
|
||||
public TupleCodes Code;
|
||||
/// <summary>
|
||||
/// Link to next tuple
|
||||
/// Link to next tuple
|
||||
/// </summary>
|
||||
public byte Link;
|
||||
/// <summary>
|
||||
/// Target address
|
||||
/// Target address
|
||||
/// </summary>
|
||||
public uint Address;
|
||||
}
|
||||
@@ -146,17 +147,17 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
public class ConfigurationAddress
|
||||
{
|
||||
/// <summary>
|
||||
/// Target address space, 0 = attribute, 1 = common
|
||||
/// Target address space, 0 = attribute, 1 = common
|
||||
/// </summary>
|
||||
public byte TargetAddressSpace;
|
||||
/// <summary>
|
||||
/// Target address
|
||||
/// Target address
|
||||
/// </summary>
|
||||
public uint Address;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Multiple function link tuple
|
||||
/// Multiple function link tuple
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -164,19 +165,19 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
public class MultipleFunctionLinkTuple
|
||||
{
|
||||
/// <summary>
|
||||
/// <see cref="TupleCodes.CISTPL_LONGLINK_MFC"/>
|
||||
/// <see cref="TupleCodes.CISTPL_LONGLINK_MFC" />
|
||||
/// </summary>
|
||||
public TupleCodes Code;
|
||||
/// <summary>
|
||||
/// Link to next tuple
|
||||
/// Link to next tuple
|
||||
/// </summary>
|
||||
public byte Link;
|
||||
/// <summary>
|
||||
/// How many functions follow
|
||||
/// How many functions follow
|
||||
/// </summary>
|
||||
public byte NumberFunctions;
|
||||
/// <summary>
|
||||
/// Link to more configuration registers
|
||||
/// Link to more configuration registers
|
||||
/// </summary>
|
||||
public ConfigurationAddress[] Addresses;
|
||||
}
|
||||
@@ -187,11 +188,11 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
public class NoLinkTuple
|
||||
{
|
||||
/// <summary>
|
||||
/// <see cref="TupleCodes.CISTPL_NO_LINK"/>
|
||||
/// <see cref="TupleCodes.CISTPL_NO_LINK" />
|
||||
/// </summary>
|
||||
public TupleCodes Code;
|
||||
/// <summary>
|
||||
/// Link to next tuple
|
||||
/// Link to next tuple
|
||||
/// </summary>
|
||||
public byte Link;
|
||||
}
|
||||
@@ -202,15 +203,16 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
public class AlternateStringTuple
|
||||
{
|
||||
/// <summary>
|
||||
/// <see cref="TupleCodes.CISTPL_ALTSTR"/>
|
||||
/// <see cref="TupleCodes.CISTPL_ALTSTR" />
|
||||
/// </summary>
|
||||
public TupleCodes Code;
|
||||
/// <summary>
|
||||
/// Link to next tuple
|
||||
/// Link to next tuple
|
||||
/// </summary>
|
||||
public byte Link;
|
||||
/// <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>
|
||||
public string[] Strings;
|
||||
}
|
||||
@@ -222,15 +224,15 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
public class ExtendedDeviceSpeed
|
||||
{
|
||||
/// <summary>
|
||||
/// Another extended follows
|
||||
/// Another extended follows
|
||||
/// </summary>
|
||||
public bool Extended;
|
||||
/// <summary>
|
||||
/// Speed mantisa
|
||||
/// Speed mantisa
|
||||
/// </summary>
|
||||
public byte Mantissa;
|
||||
/// <summary>
|
||||
/// Speed exponent
|
||||
/// Speed exponent
|
||||
/// </summary>
|
||||
public byte Exponent;
|
||||
}
|
||||
@@ -241,31 +243,31 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
public struct DeviceInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Device type code
|
||||
/// Device type code
|
||||
/// </summary>
|
||||
public DeviceTypeCodes Type;
|
||||
/// <summary>
|
||||
/// Write protected
|
||||
/// Write protected
|
||||
/// </summary>
|
||||
public bool WPS;
|
||||
/// <summary>
|
||||
/// Speed code
|
||||
/// Speed code
|
||||
/// </summary>
|
||||
public DeviceSpeedCodes Speed;
|
||||
/// <summary>
|
||||
/// Extended speeds
|
||||
/// Extended speeds
|
||||
/// </summary>
|
||||
public ExtendedDeviceSpeed[] ExtendedSpeeds;
|
||||
/// <summary>
|
||||
/// Extended types
|
||||
/// Extended types
|
||||
/// </summary>
|
||||
public byte[] ExtendedTypes;
|
||||
/// <summary>
|
||||
/// Size in units - 1
|
||||
/// Size in units - 1
|
||||
/// </summary>
|
||||
public byte Units;
|
||||
/// <summary>
|
||||
/// Code to define units unit
|
||||
/// Code to define units unit
|
||||
/// </summary>
|
||||
public byte SizeCode;
|
||||
}
|
||||
@@ -276,15 +278,15 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
public class DeviceTuple
|
||||
{
|
||||
/// <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>
|
||||
public TupleCodes Code;
|
||||
/// <summary>
|
||||
/// Link to next tuple
|
||||
/// Link to next tuple
|
||||
/// </summary>
|
||||
public byte Link;
|
||||
/// <summary>
|
||||
/// Array of device information bytes
|
||||
/// Array of device information bytes
|
||||
/// </summary>
|
||||
public DeviceInfo[] Infos;
|
||||
}
|
||||
@@ -295,15 +297,15 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
public struct OtherConditionInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// True if another other condition info follows
|
||||
/// True if another other condition info follows
|
||||
/// </summary>
|
||||
public bool Extended;
|
||||
/// <summary>
|
||||
/// Vcc used
|
||||
/// Vcc used
|
||||
/// </summary>
|
||||
public byte VccUsed;
|
||||
/// <summary>
|
||||
/// Supports WAIT# signal
|
||||
/// Supports WAIT# signal
|
||||
/// </summary>
|
||||
public bool MWAIT;
|
||||
}
|
||||
@@ -314,19 +316,19 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
public class OtherConditionTuple
|
||||
{
|
||||
/// <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>
|
||||
public TupleCodes Code;
|
||||
/// <summary>
|
||||
/// Link to next tuple
|
||||
/// Link to next tuple
|
||||
/// </summary>
|
||||
public byte Link;
|
||||
/// <summary>
|
||||
/// Array of other condition information bytes
|
||||
/// Array of other condition information bytes
|
||||
/// </summary>
|
||||
public OtherConditionInfo[] OtherConditionInfos;
|
||||
/// <summary>
|
||||
/// Array of device information bytes
|
||||
/// Array of device information bytes
|
||||
/// </summary>
|
||||
public DeviceInfo[] Infos;
|
||||
}
|
||||
@@ -337,31 +339,31 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
public struct DeviceGeometry
|
||||
{
|
||||
/// <summary>
|
||||
/// 1 << n-1 bytes, 2 = 16-bit PC Card, 3 = CardBus PC Card
|
||||
/// 1 << n-1 bytes, 2 = 16-bit PC Card, 3 = CardBus PC Card
|
||||
/// </summary>
|
||||
public byte CardInterface;
|
||||
/// <summary>
|
||||
/// Erase block size in 1 << n-1 increments of <see cref="CardInterface"/> wide accesses.
|
||||
/// If n == 4, and <see cref="CardInterface"/> == 16, erase block size = 32 * 4 = 128 bytes
|
||||
/// Erase block size in 1 << n-1 increments of <see cref="CardInterface" /> wide accesses.
|
||||
/// If n == 4, and <see cref="CardInterface" /> == 16, erase block size = 32 * 4 = 128 bytes
|
||||
/// </summary>
|
||||
public byte EraseBlockSize;
|
||||
/// <summary>
|
||||
/// Read block size in 1 << n-1 increments of <see cref="CardInterface"/> wide accesses.
|
||||
/// If n == 4, and <see cref="CardInterface"/> == 16, read block size = 32 * 4 = 128 bytes
|
||||
/// Read block size in 1 << n-1 increments of <see cref="CardInterface" /> wide accesses.
|
||||
/// If n == 4, and <see cref="CardInterface" /> == 16, read block size = 32 * 4 = 128 bytes
|
||||
/// </summary>
|
||||
public byte ReadBlockSize;
|
||||
/// <summary>
|
||||
/// Write block size in 1 << n-1 increments of <see cref="CardInterface"/> wide accesses.
|
||||
/// If n == 4, and <see cref="CardInterface"/> == 16, write block size = 32 * 4 = 128 bytes
|
||||
/// Write block size in 1 << n-1 increments of <see cref="CardInterface" /> wide accesses.
|
||||
/// If n == 4, and <see cref="CardInterface" /> == 16, write block size = 32 * 4 = 128 bytes
|
||||
/// </summary>
|
||||
public byte WriteBlockSize;
|
||||
/// <summary>
|
||||
/// Device partitioning in granularity of 1 << n-1 erase blocks
|
||||
/// If n == 4, and erase block is 128 bytes, partitions must be aligned to 32 erase block, or 4096 bytes
|
||||
/// Device partitioning in granularity of 1 << n-1 erase blocks
|
||||
/// If n == 4, and erase block is 128 bytes, partitions must be aligned to 32 erase block, or 4096 bytes
|
||||
/// </summary>
|
||||
public byte Partitions;
|
||||
/// <summary>
|
||||
/// Card employs a multiple of 1 << n-1 times interleaving the entire memory arrays
|
||||
/// Card employs a multiple of 1 << n-1 times interleaving the entire memory arrays
|
||||
/// </summary>
|
||||
public byte Interleaving;
|
||||
}
|
||||
@@ -373,15 +375,15 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
public class DeviceGeometryTuple
|
||||
{
|
||||
/// <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>
|
||||
public TupleCodes Code;
|
||||
/// <summary>
|
||||
/// Link to next tuple
|
||||
/// Link to next tuple
|
||||
/// </summary>
|
||||
public byte Link;
|
||||
/// <summary>
|
||||
/// Array of device geometries
|
||||
/// Array of device geometries
|
||||
/// </summary>
|
||||
public DeviceGeometry[] Geometries;
|
||||
}
|
||||
@@ -392,23 +394,23 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
public class FunctionIdentificationTuple
|
||||
{
|
||||
/// <summary>
|
||||
/// <see cref="TupleCodes.CISTPL_FUNCID"/>
|
||||
/// <see cref="TupleCodes.CISTPL_FUNCID" />
|
||||
/// </summary>
|
||||
public TupleCodes Code;
|
||||
/// <summary>
|
||||
/// Link to next tuple
|
||||
/// Link to next tuple
|
||||
/// </summary>
|
||||
public byte Link;
|
||||
/// <summary>
|
||||
/// Function code
|
||||
/// Function code
|
||||
/// </summary>
|
||||
public FunctionCodes Function;
|
||||
/// <summary>
|
||||
/// Device contains boot ROM
|
||||
/// Device contains boot ROM
|
||||
/// </summary>
|
||||
public bool ROM;
|
||||
/// <summary>
|
||||
/// Device wants to be part of power-on-self-test
|
||||
/// Device wants to be part of power-on-self-test
|
||||
/// </summary>
|
||||
public bool POST;
|
||||
}
|
||||
@@ -420,19 +422,19 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
public class ManufacturerIdentificationTuple
|
||||
{
|
||||
/// <summary>
|
||||
/// <see cref="TupleCodes.CISTPL_MANFID"/>
|
||||
/// <see cref="TupleCodes.CISTPL_MANFID" />
|
||||
/// </summary>
|
||||
public TupleCodes Code;
|
||||
/// <summary>
|
||||
/// Link to next tuple
|
||||
/// Link to next tuple
|
||||
/// </summary>
|
||||
public byte Link;
|
||||
/// <summary>
|
||||
/// Manufacturer ID
|
||||
/// Manufacturer ID
|
||||
/// </summary>
|
||||
public ushort ManufacturerID;
|
||||
/// <summary>
|
||||
/// Card ID
|
||||
/// Card ID
|
||||
/// </summary>
|
||||
public ushort CardID;
|
||||
}
|
||||
@@ -444,31 +446,31 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
public class Level1VersionTuple
|
||||
{
|
||||
/// <summary>
|
||||
/// <see cref="TupleCodes.CISTPL_VERS_1"/>
|
||||
/// <see cref="TupleCodes.CISTPL_VERS_1" />
|
||||
/// </summary>
|
||||
public TupleCodes Code;
|
||||
/// <summary>
|
||||
/// Link to next tuple
|
||||
/// Link to next tuple
|
||||
/// </summary>
|
||||
public byte Link;
|
||||
/// <summary>
|
||||
/// Major version of standard compliance
|
||||
/// Major version of standard compliance
|
||||
/// </summary>
|
||||
public byte MajorVersion;
|
||||
/// <summary>
|
||||
/// Minor version of standard compliance
|
||||
/// Minor version of standard compliance
|
||||
/// </summary>
|
||||
public byte MinorVersion;
|
||||
/// <summary>
|
||||
/// Manufacturer string
|
||||
/// Manufacturer string
|
||||
/// </summary>
|
||||
public string Manufacturer;
|
||||
/// <summary>
|
||||
/// Product string
|
||||
/// Product string
|
||||
/// </summary>
|
||||
public string Product;
|
||||
/// <summary>
|
||||
/// Additional information strings
|
||||
/// Additional information strings
|
||||
/// </summary>
|
||||
public string[] AdditionalInformation;
|
||||
}
|
||||
@@ -479,43 +481,43 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
public class Level2VersionTuple
|
||||
{
|
||||
/// <summary>
|
||||
/// <see cref="TupleCodes.CISTPL_VERS_2"/>
|
||||
/// <see cref="TupleCodes.CISTPL_VERS_2" />
|
||||
/// </summary>
|
||||
public TupleCodes Code;
|
||||
/// <summary>
|
||||
/// Link to next tuple
|
||||
/// Link to next tuple
|
||||
/// </summary>
|
||||
public byte Link;
|
||||
/// <summary>
|
||||
/// Version of this classure
|
||||
/// Version of this classure
|
||||
/// </summary>
|
||||
public byte StructureVersion;
|
||||
/// <summary>
|
||||
/// Level of compliance
|
||||
/// Level of compliance
|
||||
/// </summary>
|
||||
public byte Compliance;
|
||||
/// <summary>
|
||||
/// Address of first data byte
|
||||
/// Address of first data byte
|
||||
/// </summary>
|
||||
public ushort Address;
|
||||
/// <summary>
|
||||
/// Vendor-specific byte
|
||||
/// Vendor-specific byte
|
||||
/// </summary>
|
||||
public byte VendorSpecific1;
|
||||
/// <summary>
|
||||
/// Vendor-specific byte
|
||||
/// Vendor-specific byte
|
||||
/// </summary>
|
||||
public byte VendorSpecific2;
|
||||
/// <summary>
|
||||
/// Number of copies of CIS present
|
||||
/// Number of copies of CIS present
|
||||
/// </summary>
|
||||
public byte CISCopies;
|
||||
/// <summary>
|
||||
/// Vendor of software that formatted the card
|
||||
/// Vendor of software that formatted the card
|
||||
/// </summary>
|
||||
public string OEM;
|
||||
/// <summary>
|
||||
/// Informational message about the card
|
||||
/// Informational message about the card
|
||||
/// </summary>
|
||||
public string Information;
|
||||
}
|
||||
@@ -526,23 +528,23 @@ namespace DiscImageChef.Decoders.PCMCIA
|
||||
public class GeometryTuple
|
||||
{
|
||||
/// <summary>
|
||||
/// <see cref="TupleCodes.CISTPL_GEOMETRY"/>
|
||||
/// <see cref="TupleCodes.CISTPL_GEOMETRY" />
|
||||
/// </summary>
|
||||
public TupleCodes Code;
|
||||
/// <summary>
|
||||
/// Link to next tuple
|
||||
/// Link to next tuple
|
||||
/// </summary>
|
||||
public byte Link;
|
||||
/// <summary>
|
||||
/// Sectors per track
|
||||
/// Sectors per track
|
||||
/// </summary>
|
||||
public byte SectorsPerTrack;
|
||||
/// <summary>
|
||||
/// Tracks per cylinder
|
||||
/// Tracks per cylinder
|
||||
/// </summary>
|
||||
public byte TracksPerCylinder;
|
||||
/// <summary>
|
||||
/// Cylinders
|
||||
/// Cylinders
|
||||
/// </summary>
|
||||
public ushort Cylinders;
|
||||
}
|
||||
|
||||
@@ -44,15 +44,15 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public struct Capability
|
||||
{
|
||||
/// <summary>
|
||||
/// READ/SEND DISC STRUCTURE format code
|
||||
/// READ/SEND DISC STRUCTURE format code
|
||||
/// </summary>
|
||||
public byte FormatCode;
|
||||
/// <summary>
|
||||
/// Supported in SEND DISC STRUCTURE
|
||||
/// Supported in SEND DISC STRUCTURE
|
||||
/// </summary>
|
||||
public bool SDS;
|
||||
/// <summary>
|
||||
/// Supported in READ DISC STRUCTURE
|
||||
/// Supported in READ DISC STRUCTURE
|
||||
/// </summary>
|
||||
public bool RDS;
|
||||
}
|
||||
|
||||
422
SCSI/EVPD.cs
422
SCSI/EVPD.cs
File diff suppressed because it is too large
Load Diff
120
SCSI/Enums.cs
120
SCSI/Enums.cs
@@ -37,23 +37,23 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public enum PeripheralQualifiers : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Peripheral qualifier: Device is connected and supported
|
||||
/// Peripheral qualifier: Device is connected and supported
|
||||
/// </summary>
|
||||
Supported = 0x00,
|
||||
/// <summary>
|
||||
/// Peripheral qualifier: Device is supported but not connected
|
||||
/// Peripheral qualifier: Device is supported but not connected
|
||||
/// </summary>
|
||||
Unconnected = 0x01,
|
||||
/// <summary>
|
||||
/// Peripheral qualifier: Reserved value
|
||||
/// Peripheral qualifier: Reserved value
|
||||
/// </summary>
|
||||
Reserved = 0x02,
|
||||
/// <summary>
|
||||
/// Peripheral qualifier: Device is connected but unsupported
|
||||
/// Peripheral qualifier: Device is connected but unsupported
|
||||
/// </summary>
|
||||
Unsupported = 0x03,
|
||||
/// <summary>
|
||||
/// Peripheral qualifier: Vendor values: 0x04, 0x05, 0x06 and 0x07
|
||||
/// Peripheral qualifier: Vendor values: 0x04, 0x05, 0x06 and 0x07
|
||||
/// </summary>
|
||||
VendorMask = 0x04
|
||||
}
|
||||
@@ -62,95 +62,95 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public enum PeripheralDeviceTypes : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Direct-access device
|
||||
/// Direct-access device
|
||||
/// </summary>
|
||||
DirectAccess = 0x00,
|
||||
/// <summary>
|
||||
/// Sequential-access device
|
||||
/// Sequential-access device
|
||||
/// </summary>
|
||||
SequentialAccess = 0x01,
|
||||
/// <summary>
|
||||
/// Printer device
|
||||
/// Printer device
|
||||
/// </summary>
|
||||
PrinterDevice = 0x02,
|
||||
/// <summary>
|
||||
/// Processor device
|
||||
/// Processor device
|
||||
/// </summary>
|
||||
ProcessorDevice = 0x03,
|
||||
/// <summary>
|
||||
/// Write-once device
|
||||
/// Write-once device
|
||||
/// </summary>
|
||||
WriteOnceDevice = 0x04,
|
||||
/// <summary>
|
||||
/// CD-ROM/DVD/etc device
|
||||
/// CD-ROM/DVD/etc device
|
||||
/// </summary>
|
||||
MultiMediaDevice = 0x05,
|
||||
/// <summary>
|
||||
/// Scanner device
|
||||
/// Scanner device
|
||||
/// </summary>
|
||||
ScannerDevice = 0x06,
|
||||
/// <summary>
|
||||
/// Optical memory device
|
||||
/// Optical memory device
|
||||
/// </summary>
|
||||
OpticalDevice = 0x07,
|
||||
/// <summary>
|
||||
/// Medium change device
|
||||
/// Medium change device
|
||||
/// </summary>
|
||||
MediumChangerDevice = 0x08,
|
||||
/// <summary>
|
||||
/// Communications device
|
||||
/// Communications device
|
||||
/// </summary>
|
||||
CommsDevice = 0x09,
|
||||
/// <summary>
|
||||
/// Graphics arts pre-press device (defined in ASC IT8)
|
||||
/// Graphics arts pre-press device (defined in ASC IT8)
|
||||
/// </summary>
|
||||
PrePressDevice1 = 0x0A,
|
||||
/// <summary>
|
||||
/// Graphics arts pre-press device (defined in ASC IT8)
|
||||
/// Graphics arts pre-press device (defined in ASC IT8)
|
||||
/// </summary>
|
||||
PrePressDevice2 = 0x0B,
|
||||
/// <summary>
|
||||
/// Array controller device
|
||||
/// Array controller device
|
||||
/// </summary>
|
||||
ArrayControllerDevice = 0x0C,
|
||||
/// <summary>
|
||||
/// Enclosure services device
|
||||
/// Enclosure services device
|
||||
/// </summary>
|
||||
EnclosureServiceDevice = 0x0D,
|
||||
/// <summary>
|
||||
/// Simplified direct-access device
|
||||
/// Simplified direct-access device
|
||||
/// </summary>
|
||||
SimplifiedDevice = 0x0E,
|
||||
/// <summary>
|
||||
/// Optical card reader/writer device
|
||||
/// Optical card reader/writer device
|
||||
/// </summary>
|
||||
OCRWDevice = 0x0F,
|
||||
/// <summary>
|
||||
/// Bridging Expanders
|
||||
/// Bridging Expanders
|
||||
/// </summary>
|
||||
BridgingExpander = 0x10,
|
||||
/// <summary>
|
||||
/// Object-based Storage Device
|
||||
/// Object-based Storage Device
|
||||
/// </summary>
|
||||
ObjectDevice = 0x11,
|
||||
/// <summary>
|
||||
/// Automation/Drive Interface
|
||||
/// Automation/Drive Interface
|
||||
/// </summary>
|
||||
ADCDevice = 0x12,
|
||||
/// <summary>
|
||||
/// Security Manager Device
|
||||
/// Security Manager Device
|
||||
/// </summary>
|
||||
SCSISecurityManagerDevice = 0x13,
|
||||
/// <summary>
|
||||
/// Host managed zoned block device
|
||||
/// Host managed zoned block device
|
||||
/// </summary>
|
||||
SCSIZonedBlockDevice = 0x14,
|
||||
/// <summary>
|
||||
/// Well known logical unit
|
||||
/// Well known logical unit
|
||||
/// </summary>
|
||||
WellKnownDevice = 0x1E,
|
||||
/// <summary>
|
||||
/// Unknown or no device type
|
||||
/// Unknown or no device type
|
||||
/// </summary>
|
||||
UnknownDevice = 0x1F
|
||||
}
|
||||
@@ -159,31 +159,31 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public enum ANSIVersions : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Device does not claim conformance to any ANSI version
|
||||
/// Device does not claim conformance to any ANSI version
|
||||
/// </summary>
|
||||
ANSINoVersion = 0x00,
|
||||
/// <summary>
|
||||
/// Device complies with ANSI X3.131:1986
|
||||
/// Device complies with ANSI X3.131:1986
|
||||
/// </summary>
|
||||
ANSI1986Version = 0x01,
|
||||
/// <summary>
|
||||
/// Device complies with ANSI X3.131:1994
|
||||
/// Device complies with ANSI X3.131:1994
|
||||
/// </summary>
|
||||
ANSI1994Version = 0x02,
|
||||
/// <summary>
|
||||
/// Device complies with ANSI X3.301:1997
|
||||
/// Device complies with ANSI X3.301:1997
|
||||
/// </summary>
|
||||
ANSI1997Version = 0x03,
|
||||
/// <summary>
|
||||
/// Device complies with ANSI X3.351:2001
|
||||
/// Device complies with ANSI X3.351:2001
|
||||
/// </summary>
|
||||
ANSI2001Version = 0x04,
|
||||
/// <summary>
|
||||
/// Device complies with ANSI X3.408:2005.
|
||||
/// Device complies with ANSI X3.408:2005.
|
||||
/// </summary>
|
||||
ANSI2005Version = 0x05,
|
||||
/// <summary>
|
||||
/// Device complies with SPC-4
|
||||
/// Device complies with SPC-4
|
||||
/// </summary>
|
||||
ANSI2008Version = 0x06
|
||||
}
|
||||
@@ -192,11 +192,11 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public enum ECMAVersions : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Device does not claim conformance to any ECMA version
|
||||
/// Device does not claim conformance to any ECMA version
|
||||
/// </summary>
|
||||
ECMANoVersion = 0x00,
|
||||
/// <summary>
|
||||
/// Device complies with a ECMA-111 standard
|
||||
/// Device complies with a ECMA-111 standard
|
||||
/// </summary>
|
||||
ECMA111 = 0x01
|
||||
}
|
||||
@@ -205,11 +205,11 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public enum ISOVersions : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Device does not claim conformance to any ISO/IEC version
|
||||
/// Device does not claim conformance to any ISO/IEC version
|
||||
/// </summary>
|
||||
ISONoVersion = 0x00,
|
||||
/// <summary>
|
||||
/// Device complies with ISO/IEC 9316:1995
|
||||
/// Device complies with ISO/IEC 9316:1995
|
||||
/// </summary>
|
||||
ISO1995Version = 0x02
|
||||
}
|
||||
@@ -218,19 +218,19 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public enum SPIClocking : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Supports only ST
|
||||
/// Supports only ST
|
||||
/// </summary>
|
||||
ST = 0x00,
|
||||
/// <summary>
|
||||
/// Supports only DT
|
||||
/// Supports only DT
|
||||
/// </summary>
|
||||
DT = 0x01,
|
||||
/// <summary>
|
||||
/// Reserved value
|
||||
/// Reserved value
|
||||
/// </summary>
|
||||
Reserved = 0x02,
|
||||
/// <summary>
|
||||
/// Supports ST and DT
|
||||
/// Supports ST and DT
|
||||
/// </summary>
|
||||
STandDT = 0x03
|
||||
}
|
||||
@@ -239,19 +239,19 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public enum TGPSValues : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Assymetrical access not supported
|
||||
/// Assymetrical access not supported
|
||||
/// </summary>
|
||||
NotSupported = 0x00,
|
||||
/// <summary>
|
||||
/// Only implicit assymetrical access is supported
|
||||
/// Only implicit assymetrical access is supported
|
||||
/// </summary>
|
||||
OnlyImplicit = 0x01,
|
||||
/// <summary>
|
||||
/// Only explicit assymetrical access is supported
|
||||
/// Only explicit assymetrical access is supported
|
||||
/// </summary>
|
||||
OnlyExplicit = 0x02,
|
||||
/// <summary>
|
||||
/// Both implicit and explicit assymetrical access are supported
|
||||
/// Both implicit and explicit assymetrical access are supported
|
||||
/// </summary>
|
||||
Both = 0x03
|
||||
}
|
||||
@@ -260,55 +260,55 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public enum ProtocolIdentifiers : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Fibre Channel
|
||||
/// Fibre Channel
|
||||
/// </summary>
|
||||
FibreChannel = 0,
|
||||
/// <summary>
|
||||
/// Parallel SCSI
|
||||
/// Parallel SCSI
|
||||
/// </summary>
|
||||
SCSI = 1,
|
||||
/// <summary>
|
||||
/// SSA
|
||||
/// SSA
|
||||
/// </summary>
|
||||
SSA = 2,
|
||||
/// <summary>
|
||||
/// IEEE-1394
|
||||
/// IEEE-1394
|
||||
/// </summary>
|
||||
Firewire = 3,
|
||||
/// <summary>
|
||||
/// SCSI Remote Direct Memory Access Protocol
|
||||
/// SCSI Remote Direct Memory Access Protocol
|
||||
/// </summary>
|
||||
RDMAP = 4,
|
||||
/// <summary>
|
||||
/// Internet SCSI
|
||||
/// Internet SCSI
|
||||
/// </summary>
|
||||
iSCSI = 5,
|
||||
/// <summary>
|
||||
/// Serial SCSI
|
||||
/// Serial SCSI
|
||||
/// </summary>
|
||||
SAS = 6,
|
||||
/// <summary>
|
||||
/// Automation/Drive Interface Transport Protocol
|
||||
/// Automation/Drive Interface Transport Protocol
|
||||
/// </summary>
|
||||
ADT = 7,
|
||||
/// <summary>
|
||||
/// AT Attachment Interface (ATA/ATAPI)
|
||||
/// AT Attachment Interface (ATA/ATAPI)
|
||||
/// </summary>
|
||||
ATA = 8,
|
||||
/// <summary>
|
||||
/// USB Attached SCSI
|
||||
/// USB Attached SCSI
|
||||
/// </summary>
|
||||
UAS = 9,
|
||||
/// <summary>
|
||||
/// SCSI over PCI Express
|
||||
/// SCSI over PCI Express
|
||||
/// </summary>
|
||||
SCSIe = 10,
|
||||
/// <summary>
|
||||
/// PCI Express
|
||||
/// PCI Express
|
||||
/// </summary>
|
||||
PCIe = 11,
|
||||
/// <summary>
|
||||
/// No specific protocol
|
||||
/// No specific protocol
|
||||
/// </summary>
|
||||
NoProtocol = 15
|
||||
}
|
||||
|
||||
337
SCSI/Inquiry.cs
337
SCSI/Inquiry.cs
@@ -39,15 +39,15 @@ using DiscImageChef.Console;
|
||||
namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// T9/375-D revision 10l
|
||||
/// T10/995-D revision 10
|
||||
/// T10/1236-D revision 20
|
||||
/// T10/1416-D revision 23
|
||||
/// T10/1731-D revision 16
|
||||
/// T10/502 revision 05
|
||||
/// RFC 7144
|
||||
/// ECMA-111
|
||||
/// Information from the following standards:
|
||||
/// T9/375-D revision 10l
|
||||
/// T10/995-D revision 10
|
||||
/// T10/1236-D revision 20
|
||||
/// T10/1416-D revision 23
|
||||
/// T10/1731-D revision 16
|
||||
/// T10/502 revision 05
|
||||
/// RFC 7144
|
||||
/// ECMA-111
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -227,7 +227,8 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
else descriptorsNo = (SCSIInquiryResponse.Length - 58) / 2;
|
||||
|
||||
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)
|
||||
@@ -2084,237 +2085,237 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public struct SCSIInquiry
|
||||
{
|
||||
/// <summary>
|
||||
/// Peripheral qualifier
|
||||
/// Byte 0, bits 7 to 5
|
||||
/// Peripheral qualifier
|
||||
/// Byte 0, bits 7 to 5
|
||||
/// </summary>
|
||||
public byte PeripheralQualifier;
|
||||
/// <summary>
|
||||
/// Peripheral device type
|
||||
/// Byte 0, bits 4 to 0
|
||||
/// Peripheral device type
|
||||
/// Byte 0, bits 4 to 0
|
||||
/// </summary>
|
||||
public byte PeripheralDeviceType;
|
||||
/// <summary>
|
||||
/// Removable device
|
||||
/// Byte 1, bit 7
|
||||
/// Removable device
|
||||
/// Byte 1, bit 7
|
||||
/// </summary>
|
||||
public bool RMB;
|
||||
/// <summary>
|
||||
/// SCSI-1 vendor-specific qualification codes
|
||||
/// Byte 1, bits 6 to 0
|
||||
/// SCSI-1 vendor-specific qualification codes
|
||||
/// Byte 1, bits 6 to 0
|
||||
/// </summary>
|
||||
public byte DeviceTypeModifier;
|
||||
/// <summary>
|
||||
/// ISO/IEC SCSI Standard Version
|
||||
/// Byte 2, bits 7 to 6, mask = 0xC0, >> 6
|
||||
/// ISO/IEC SCSI Standard Version
|
||||
/// Byte 2, bits 7 to 6, mask = 0xC0, >> 6
|
||||
/// </summary>
|
||||
public byte ISOVersion;
|
||||
/// <summary>
|
||||
/// ECMA SCSI Standard Version
|
||||
/// Byte 2, bits 5 to 3, mask = 0x38, >> 3
|
||||
/// ECMA SCSI Standard Version
|
||||
/// Byte 2, bits 5 to 3, mask = 0x38, >> 3
|
||||
/// </summary>
|
||||
public byte ECMAVersion;
|
||||
/// <summary>
|
||||
/// ANSI SCSI Standard Version
|
||||
/// Byte 2, bits 2 to 0, mask = 0x07
|
||||
/// ANSI SCSI Standard Version
|
||||
/// Byte 2, bits 2 to 0, mask = 0x07
|
||||
/// </summary>
|
||||
public byte ANSIVersion;
|
||||
/// <summary>
|
||||
/// Asynchronous Event Reporting Capability supported
|
||||
/// Byte 3, bit 7
|
||||
/// Asynchronous Event Reporting Capability supported
|
||||
/// Byte 3, bit 7
|
||||
/// </summary>
|
||||
public bool AERC;
|
||||
/// <summary>
|
||||
/// Device supports TERMINATE TASK command
|
||||
/// Byte 3, bit 6
|
||||
/// Device supports TERMINATE TASK command
|
||||
/// Byte 3, bit 6
|
||||
/// </summary>
|
||||
public bool TrmTsk;
|
||||
/// <summary>
|
||||
/// Supports setting Normal ACA
|
||||
/// Byte 3, bit 5
|
||||
/// Supports setting Normal ACA
|
||||
/// Byte 3, bit 5
|
||||
/// </summary>
|
||||
public bool NormACA;
|
||||
/// <summary>
|
||||
/// Supports LUN hierarchical addressing
|
||||
/// Byte 3, bit 4
|
||||
/// Supports LUN hierarchical addressing
|
||||
/// Byte 3, bit 4
|
||||
/// </summary>
|
||||
public bool HiSup;
|
||||
/// <summary>
|
||||
/// Responde data format
|
||||
/// Byte 3, bit 3 to 0
|
||||
/// Responde data format
|
||||
/// Byte 3, bit 3 to 0
|
||||
/// </summary>
|
||||
public byte ResponseDataFormat;
|
||||
/// <summary>
|
||||
/// Lenght of total INQUIRY response minus 4
|
||||
/// Byte 4
|
||||
/// Lenght of total INQUIRY response minus 4
|
||||
/// Byte 4
|
||||
/// </summary>
|
||||
public byte AdditionalLength;
|
||||
/// <summary>
|
||||
/// Device contains an embedded storage array controller
|
||||
/// Byte 5, bit 7
|
||||
/// Device contains an embedded storage array controller
|
||||
/// Byte 5, bit 7
|
||||
/// </summary>
|
||||
public bool SCCS;
|
||||
/// <summary>
|
||||
/// Device contains an Access Control Coordinator
|
||||
/// Byte 5, bit 6
|
||||
/// Device contains an Access Control Coordinator
|
||||
/// Byte 5, bit 6
|
||||
/// </summary>
|
||||
public bool ACC;
|
||||
/// <summary>
|
||||
/// Supports asymetrical logical unit access
|
||||
/// Byte 5, bits 5 to 4
|
||||
/// Supports asymetrical logical unit access
|
||||
/// Byte 5, bits 5 to 4
|
||||
/// </summary>
|
||||
public byte TPGS;
|
||||
/// <summary>
|
||||
/// Supports third-party copy commands
|
||||
/// Byte 5, bit 3
|
||||
/// Supports third-party copy commands
|
||||
/// Byte 5, bit 3
|
||||
/// </summary>
|
||||
public bool ThreePC;
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// Byte 5, bits 2 to 1
|
||||
/// Reserved
|
||||
/// Byte 5, bits 2 to 1
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Supports protection information
|
||||
/// Byte 5, bit 0
|
||||
/// Supports protection information
|
||||
/// Byte 5, bit 0
|
||||
/// </summary>
|
||||
public bool Protect;
|
||||
/// <summary>
|
||||
/// Supports basic queueing
|
||||
/// Byte 6, bit 7
|
||||
/// Supports basic queueing
|
||||
/// Byte 6, bit 7
|
||||
/// </summary>
|
||||
public bool BQue;
|
||||
/// <summary>
|
||||
/// Device contains an embedded enclosure services component
|
||||
/// Byte 6, bit 6
|
||||
/// Device contains an embedded enclosure services component
|
||||
/// Byte 6, bit 6
|
||||
/// </summary>
|
||||
public bool EncServ;
|
||||
/// <summary>
|
||||
/// Vendor-specific
|
||||
/// Byte 6, bit 5
|
||||
/// Vendor-specific
|
||||
/// Byte 6, bit 5
|
||||
/// </summary>
|
||||
public bool VS1;
|
||||
/// <summary>
|
||||
/// Multi-port device
|
||||
/// Byte 6, bit 4
|
||||
/// Multi-port device
|
||||
/// Byte 6, bit 4
|
||||
/// </summary>
|
||||
public bool MultiP;
|
||||
/// <summary>
|
||||
/// Device contains or is attached to a medium changer
|
||||
/// Byte 6, bit 3
|
||||
/// Device contains or is attached to a medium changer
|
||||
/// Byte 6, bit 3
|
||||
/// </summary>
|
||||
public bool MChngr;
|
||||
/// <summary>
|
||||
/// Device supports request and acknowledge handshakes
|
||||
/// Byte 6, bit 2
|
||||
/// Device supports request and acknowledge handshakes
|
||||
/// Byte 6, bit 2
|
||||
/// </summary>
|
||||
public bool ACKREQQ;
|
||||
/// <summary>
|
||||
/// Supports 32-bit wide SCSI addresses
|
||||
/// Byte 6, bit 1
|
||||
/// Supports 32-bit wide SCSI addresses
|
||||
/// Byte 6, bit 1
|
||||
/// </summary>
|
||||
public bool Addr32;
|
||||
/// <summary>
|
||||
/// Supports 16-bit wide SCSI addresses
|
||||
/// Byte 6, bit 0
|
||||
/// Supports 16-bit wide SCSI addresses
|
||||
/// Byte 6, bit 0
|
||||
/// </summary>
|
||||
public bool Addr16;
|
||||
/// <summary>
|
||||
/// Device supports relative addressing
|
||||
/// Byte 7, bit 7
|
||||
/// Device supports relative addressing
|
||||
/// Byte 7, bit 7
|
||||
/// </summary>
|
||||
public bool RelAddr;
|
||||
/// <summary>
|
||||
/// Supports 32-bit wide data transfers
|
||||
/// Byte 7, bit 6
|
||||
/// Supports 32-bit wide data transfers
|
||||
/// Byte 7, bit 6
|
||||
/// </summary>
|
||||
public bool WBus32;
|
||||
/// <summary>
|
||||
/// Supports 16-bit wide data transfers
|
||||
/// Byte 7, bit 5
|
||||
/// Supports 16-bit wide data transfers
|
||||
/// Byte 7, bit 5
|
||||
/// </summary>
|
||||
public bool WBus16;
|
||||
/// <summary>
|
||||
/// Supports synchronous data transfer
|
||||
/// Byte 7, bit 4
|
||||
/// Supports synchronous data transfer
|
||||
/// Byte 7, bit 4
|
||||
/// </summary>
|
||||
public bool Sync;
|
||||
/// <summary>
|
||||
/// Supports linked commands
|
||||
/// Byte 7, bit 3
|
||||
/// Supports linked commands
|
||||
/// Byte 7, bit 3
|
||||
/// </summary>
|
||||
public bool Linked;
|
||||
/// <summary>
|
||||
/// Supports CONTINUE TASK and TARGET TRANSFER DISABLE commands
|
||||
/// Byte 7, bit 2
|
||||
/// Supports CONTINUE TASK and TARGET TRANSFER DISABLE commands
|
||||
/// Byte 7, bit 2
|
||||
/// </summary>
|
||||
public bool TranDis;
|
||||
/// <summary>
|
||||
/// Supports TCQ queue
|
||||
/// Byte 7, bit 1
|
||||
/// Supports TCQ queue
|
||||
/// Byte 7, bit 1
|
||||
/// </summary>
|
||||
public bool CmdQue;
|
||||
/// <summary>
|
||||
/// Indicates that the devices responds to RESET with soft reset
|
||||
/// Byte 7, bit 0
|
||||
/// Indicates that the devices responds to RESET with soft reset
|
||||
/// Byte 7, bit 0
|
||||
/// </summary>
|
||||
public bool SftRe;
|
||||
/// <summary>
|
||||
/// Vendor identification
|
||||
/// Bytes 8 to 15
|
||||
/// Vendor identification
|
||||
/// Bytes 8 to 15
|
||||
/// </summary>
|
||||
public byte[] VendorIdentification;
|
||||
/// <summary>
|
||||
/// Product identification
|
||||
/// Bytes 16 to 31
|
||||
/// Product identification
|
||||
/// Bytes 16 to 31
|
||||
/// </summary>
|
||||
public byte[] ProductIdentification;
|
||||
/// <summary>
|
||||
/// Product revision level
|
||||
/// Bytes 32 to 35
|
||||
/// Product revision level
|
||||
/// Bytes 32 to 35
|
||||
/// </summary>
|
||||
public byte[] ProductRevisionLevel;
|
||||
/// <summary>
|
||||
/// Vendor-specific data
|
||||
/// Bytes 36 to 55
|
||||
/// Vendor-specific data
|
||||
/// Bytes 36 to 55
|
||||
/// </summary>
|
||||
public byte[] VendorSpecific;
|
||||
/// <summary>
|
||||
/// Byte 56, bits 7 to 4
|
||||
/// Byte 56, bits 7 to 4
|
||||
/// </summary>
|
||||
public byte Reserved3;
|
||||
/// <summary>
|
||||
/// Supported SPI clocking
|
||||
/// Byte 56, bits 3 to 2
|
||||
/// Supported SPI clocking
|
||||
/// Byte 56, bits 3 to 2
|
||||
/// </summary>
|
||||
public byte Clocking;
|
||||
/// <summary>
|
||||
/// Device supports Quick Arbitration and Selection
|
||||
/// Byte 56, bit 1
|
||||
/// Device supports Quick Arbitration and Selection
|
||||
/// Byte 56, bit 1
|
||||
/// </summary>
|
||||
public bool QAS;
|
||||
/// <summary>
|
||||
/// Supports information unit transfers
|
||||
/// Byte 56, bit 0
|
||||
/// Supports information unit transfers
|
||||
/// Byte 56, bit 0
|
||||
/// </summary>
|
||||
public bool IUS;
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// Byte 57
|
||||
/// Reserved
|
||||
/// Byte 57
|
||||
/// </summary>
|
||||
public byte Reserved4;
|
||||
/// <summary>
|
||||
/// Array of version descriptors
|
||||
/// Bytes 58 to 73
|
||||
/// Array of version descriptors
|
||||
/// Bytes 58 to 73
|
||||
/// </summary>
|
||||
public ushort[] VersionDescriptors;
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// Bytes 74 to 95
|
||||
/// Reserved
|
||||
/// Bytes 74 to 95
|
||||
/// </summary>
|
||||
public byte[] Reserved5;
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// Bytes 96 to end
|
||||
/// Reserved
|
||||
/// Bytes 96 to end
|
||||
/// </summary>
|
||||
public byte[] VendorSpecific2;
|
||||
|
||||
@@ -2322,191 +2323,191 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
|
||||
#region Quantum vendor unique inquiry data structure
|
||||
/// <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>
|
||||
public bool QuantumPresent;
|
||||
/// <summary>
|
||||
/// The product family.
|
||||
/// Byte 36, bits 7 to 5
|
||||
/// The product family.
|
||||
/// Byte 36, bits 7 to 5
|
||||
/// </summary>
|
||||
public byte Qt_ProductFamily;
|
||||
/// <summary>
|
||||
/// The released firmware.
|
||||
/// Byte 36, bits 4 to 0
|
||||
/// The released firmware.
|
||||
/// Byte 36, bits 4 to 0
|
||||
/// </summary>
|
||||
public byte Qt_ReleasedFirmware;
|
||||
/// <summary>
|
||||
/// The firmware major version.
|
||||
/// Byte 37
|
||||
/// The firmware major version.
|
||||
/// Byte 37
|
||||
/// </summary>
|
||||
public byte Qt_FirmwareMajorVersion;
|
||||
/// <summary>
|
||||
/// The firmware minor version.
|
||||
/// Byte 38
|
||||
/// The firmware minor version.
|
||||
/// Byte 38
|
||||
/// </summary>
|
||||
public byte Qt_FirmwareMinorVersion;
|
||||
/// <summary>
|
||||
/// The EEPROM format major version.
|
||||
/// Byte 39
|
||||
/// The EEPROM format major version.
|
||||
/// Byte 39
|
||||
/// </summary>
|
||||
public byte Qt_EEPROMFormatMajorVersion;
|
||||
/// <summary>
|
||||
/// The EEPROM format minor version.
|
||||
/// Byte 40
|
||||
/// The EEPROM format minor version.
|
||||
/// Byte 40
|
||||
/// </summary>
|
||||
public byte Qt_EEPROMFormatMinorVersion;
|
||||
/// <summary>
|
||||
/// The firmware personality.
|
||||
/// Byte 41
|
||||
/// The firmware personality.
|
||||
/// Byte 41
|
||||
/// </summary>
|
||||
public byte Qt_FirmwarePersonality;
|
||||
/// <summary>
|
||||
/// The firmware sub personality.
|
||||
/// Byte 42
|
||||
/// The firmware sub personality.
|
||||
/// Byte 42
|
||||
/// </summary>
|
||||
public byte Qt_FirmwareSubPersonality;
|
||||
/// <summary>
|
||||
/// The tape directory format version.
|
||||
/// Byte 43
|
||||
/// The tape directory format version.
|
||||
/// Byte 43
|
||||
/// </summary>
|
||||
public byte Qt_TapeDirectoryFormatVersion;
|
||||
/// <summary>
|
||||
/// The controller hardware version.
|
||||
/// Byte 44
|
||||
/// The controller hardware version.
|
||||
/// Byte 44
|
||||
/// </summary>
|
||||
public byte Qt_ControllerHardwareVersion;
|
||||
/// <summary>
|
||||
/// The drive EEPROM version.
|
||||
/// Byte 45
|
||||
/// The drive EEPROM version.
|
||||
/// Byte 45
|
||||
/// </summary>
|
||||
public byte Qt_DriveEEPROMVersion;
|
||||
/// <summary>
|
||||
/// The drive hardware version.
|
||||
/// Byte 46
|
||||
/// The drive hardware version.
|
||||
/// Byte 46
|
||||
/// </summary>
|
||||
public byte Qt_DriveHardwareVersion;
|
||||
/// <summary>
|
||||
/// The media loader firmware version.
|
||||
/// Byte 47
|
||||
/// The media loader firmware version.
|
||||
/// Byte 47
|
||||
/// </summary>
|
||||
public byte Qt_MediaLoaderFirmwareVersion;
|
||||
/// <summary>
|
||||
/// The media loader hardware version.
|
||||
/// Byte 48
|
||||
/// The media loader hardware version.
|
||||
/// Byte 48
|
||||
/// </summary>
|
||||
public byte Qt_MediaLoaderHardwareVersion;
|
||||
/// <summary>
|
||||
/// The media loader mechanical version.
|
||||
/// Byte 49
|
||||
/// The media loader mechanical version.
|
||||
/// Byte 49
|
||||
/// </summary>
|
||||
public byte Qt_MediaLoaderMechanicalVersion;
|
||||
/// <summary>
|
||||
/// Is a media loader present?
|
||||
/// Byte 50
|
||||
/// Is a media loader present?
|
||||
/// Byte 50
|
||||
/// </summary>
|
||||
public bool Qt_MediaLoaderPresent;
|
||||
/// <summary>
|
||||
/// Is a library present?
|
||||
/// Byte 51
|
||||
/// Is a library present?
|
||||
/// Byte 51
|
||||
/// </summary>
|
||||
public bool Qt_LibraryPresent;
|
||||
/// <summary>
|
||||
/// The module revision.
|
||||
/// Bytes 52 to 55
|
||||
/// The module revision.
|
||||
/// Bytes 52 to 55
|
||||
/// </summary>
|
||||
public byte[] Qt_ModuleRevision;
|
||||
#endregion Quantum vendor unique inquiry data structure
|
||||
|
||||
#region IBM vendor unique inquiry data structure
|
||||
/// <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>
|
||||
public bool IBMPresent;
|
||||
/// <summary>
|
||||
/// Drive is not capable of automation
|
||||
/// Byte 36 bit 0
|
||||
/// Drive is not capable of automation
|
||||
/// Byte 36 bit 0
|
||||
/// </summary>
|
||||
public bool IBM_AutDis;
|
||||
/// <summary>
|
||||
/// If not zero, limit in MB/s = Max * (this / 256)
|
||||
/// Byte 37
|
||||
/// If not zero, limit in MB/s = Max * (this / 256)
|
||||
/// Byte 37
|
||||
/// </summary>
|
||||
public byte IBM_PerformanceLimit;
|
||||
/// <summary>
|
||||
/// Byte 41
|
||||
/// Byte 41
|
||||
/// </summary>
|
||||
public byte IBM_OEMSpecific;
|
||||
#endregion IBM vendor unique inquiry data structure
|
||||
|
||||
#region HP vendor unique inquiry data structure
|
||||
/// <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>
|
||||
public bool HPPresent;
|
||||
/// <summary>
|
||||
/// WORM version
|
||||
/// Byte 40 bits 7 to 1
|
||||
/// WORM version
|
||||
/// Byte 40 bits 7 to 1
|
||||
/// </summary>
|
||||
public byte HP_WORMVersion;
|
||||
/// <summary>
|
||||
/// WORM supported
|
||||
/// Byte 40 bit 0
|
||||
/// WORM supported
|
||||
/// Byte 40 bit 0
|
||||
/// </summary>
|
||||
public bool HP_WORM;
|
||||
/// <summary>
|
||||
/// Bytes 43 to 48
|
||||
/// Bytes 43 to 48
|
||||
/// </summary>
|
||||
public byte[] HP_OBDR;
|
||||
#endregion HP vendor unique inquiry data structure
|
||||
|
||||
#region Seagate vendor unique inquiry data structure
|
||||
/// <summary>
|
||||
/// Means that bytes 36 to 43 are filled
|
||||
/// Means that bytes 36 to 43 are filled
|
||||
/// </summary>
|
||||
public bool SeagatePresent;
|
||||
/// <summary>
|
||||
/// Drive Serial Number
|
||||
/// Bytes 36 to 43
|
||||
/// Drive Serial Number
|
||||
/// Bytes 36 to 43
|
||||
/// </summary>
|
||||
public byte[] Seagate_DriveSerialNumber;
|
||||
/// <summary>
|
||||
/// Means that bytes 96 to 143 are filled
|
||||
/// Means that bytes 96 to 143 are filled
|
||||
/// </summary>
|
||||
public bool Seagate2Present;
|
||||
/// <summary>
|
||||
/// Contains Seagate copyright notice
|
||||
/// Bytes 96 to 143
|
||||
/// Contains Seagate copyright notice
|
||||
/// Bytes 96 to 143
|
||||
/// </summary>
|
||||
public byte[] Seagate_Copyright;
|
||||
/// <summary>
|
||||
/// Means that bytes 144 to 147 are filled
|
||||
/// Means that bytes 144 to 147 are filled
|
||||
/// </summary>
|
||||
public bool Seagate3Present;
|
||||
/// <summary>
|
||||
/// Reserved Seagate field
|
||||
/// Bytes 144 to 147
|
||||
/// Reserved Seagate field
|
||||
/// Bytes 144 to 147
|
||||
/// </summary>
|
||||
public byte[] Seagate_ServoPROMPartNo;
|
||||
#endregion Seagate vendor unique inquiry data structure
|
||||
|
||||
#region Kreon vendor unique inquiry data structure
|
||||
/// <summary>
|
||||
/// Means that firmware is Kreon
|
||||
/// Means that firmware is Kreon
|
||||
/// </summary>
|
||||
public bool KreonPresent;
|
||||
/// <summary>
|
||||
/// Kreon identifier
|
||||
/// Bytes 36 to 40
|
||||
/// Kreon identifier
|
||||
/// Bytes 36 to 40
|
||||
/// </summary>
|
||||
public byte[] KreonIdentifier;
|
||||
/// <summary>
|
||||
/// Kreon just a 0x20
|
||||
/// Bytes 41
|
||||
/// Kreon just a 0x20
|
||||
/// Bytes 41
|
||||
/// </summary>
|
||||
public byte KreonSpace;
|
||||
/// <summary>
|
||||
/// Kreon version string
|
||||
/// Bytes 42 to 46
|
||||
/// Kreon version string
|
||||
/// Bytes 42 to 46
|
||||
/// </summary>
|
||||
public byte[] KreonVersion;
|
||||
#endregion Kreon vendor unique inquiry data structure
|
||||
|
||||
136
SCSI/MMC/AACS.cs
136
SCSI/MMC/AACS.cs
@@ -37,19 +37,19 @@ using System.Text;
|
||||
namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -60,23 +60,23 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
public struct AACSVolumeIdentifier
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Bytes 4 to end
|
||||
/// AACS volume identifier data
|
||||
/// Bytes 4 to end
|
||||
/// AACS volume identifier data
|
||||
/// </summary>
|
||||
public byte[] VolumeIdentifier;
|
||||
}
|
||||
@@ -84,23 +84,23 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
public struct AACSMediaSerialNumber
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Bytes 4 to end
|
||||
/// AACS media serial number
|
||||
/// Bytes 4 to end
|
||||
/// AACS media serial number
|
||||
/// </summary>
|
||||
public byte[] MediaSerialNumber;
|
||||
}
|
||||
@@ -108,23 +108,23 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
public struct AACSMediaIdentifier
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Bytes 4 to end
|
||||
/// AACS media identifier data
|
||||
/// Bytes 4 to end
|
||||
/// AACS media identifier data
|
||||
/// </summary>
|
||||
public byte[] MediaIdentifier;
|
||||
}
|
||||
@@ -132,23 +132,23 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
public struct AACSMediaKeyBlock
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Number of MKB packs available to transfer
|
||||
/// Byte 3
|
||||
/// Number of MKB packs available to transfer
|
||||
/// </summary>
|
||||
public byte TotalPacks;
|
||||
/// <summary>
|
||||
/// Bytes 4 to end
|
||||
/// AACS media key block packs
|
||||
/// Bytes 4 to end
|
||||
/// AACS media key block packs
|
||||
/// </summary>
|
||||
public byte[] MediaKeyBlockPacks;
|
||||
}
|
||||
@@ -156,23 +156,23 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
public struct AACSDataKeys
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Bytes 4 to end
|
||||
/// AACS data keys
|
||||
/// Bytes 4 to end
|
||||
/// AACS data keys
|
||||
/// </summary>
|
||||
public byte[] DataKeys;
|
||||
}
|
||||
@@ -180,24 +180,24 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
public struct AACSLBAExtentsResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data Length
|
||||
/// Bytes 0 to 1
|
||||
/// Data Length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Number of LBA extents the drive can store.
|
||||
/// if(MaxLBAExtents == 0 && DataLength > 2), 256 extents can be stored
|
||||
/// Byte 3
|
||||
/// Number of LBA extents the drive can store.
|
||||
/// if(MaxLBAExtents == 0 && DataLength > 2), 256 extents can be stored
|
||||
/// </summary>
|
||||
public byte MaxLBAExtents;
|
||||
/// <summary>
|
||||
/// Bytes 4 to end
|
||||
/// LBA Extents
|
||||
/// Bytes 4 to end
|
||||
/// LBA Extents
|
||||
/// </summary>
|
||||
public AACSLBAExtent[] Extents;
|
||||
}
|
||||
@@ -205,18 +205,18 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
public struct AACSLBAExtent
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 7
|
||||
/// Reserved
|
||||
/// Bytes 0 to 7
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte[] Reserved;
|
||||
/// <summary>
|
||||
/// Bytes 8 to 11
|
||||
/// Start LBA of extent
|
||||
/// Bytes 8 to 11
|
||||
/// Start LBA of extent
|
||||
/// </summary>
|
||||
public uint StartLBA;
|
||||
/// <summary>
|
||||
/// Bytes 12 to 15
|
||||
/// Extent length
|
||||
/// Bytes 12 to 15
|
||||
/// Extent length
|
||||
/// </summary>
|
||||
public uint LBACount;
|
||||
}
|
||||
|
||||
@@ -37,19 +37,19 @@ using System.Text;
|
||||
namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -60,23 +60,23 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
public struct CPRMMediaKeyBlock
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data Length
|
||||
/// Bytes 0 to 1
|
||||
/// Data Length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Number of MKB packs available to transfer
|
||||
/// Byte 3
|
||||
/// Number of MKB packs available to transfer
|
||||
/// </summary>
|
||||
public byte TotalPacks;
|
||||
/// <summary>
|
||||
/// Byte 4
|
||||
/// MKB Packs
|
||||
/// Byte 4
|
||||
/// MKB Packs
|
||||
/// </summary>
|
||||
public byte[] MKBPackData;
|
||||
}
|
||||
|
||||
@@ -37,19 +37,19 @@ using System.Text;
|
||||
namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -60,123 +60,123 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
public struct StandardDiscInformation
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// 32 + OPCTablesNumber*8
|
||||
/// Bytes 0 to 1
|
||||
/// 32 + OPCTablesNumber*8
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2, bits 7 to 5
|
||||
/// 000b
|
||||
/// Byte 2, bits 7 to 5
|
||||
/// 000b
|
||||
/// </summary>
|
||||
public byte DataType;
|
||||
/// <summary>
|
||||
/// Byte 2, bit 4
|
||||
/// If set, disc is erasable
|
||||
/// Byte 2, bit 4
|
||||
/// If set, disc is erasable
|
||||
/// </summary>
|
||||
public bool Erasable;
|
||||
/// <summary>
|
||||
/// Byte 2, bits 3 to 2
|
||||
/// Status of last session
|
||||
/// Byte 2, bits 3 to 2
|
||||
/// Status of last session
|
||||
/// </summary>
|
||||
public byte LastSessionStatus;
|
||||
/// <summary>
|
||||
/// Byte 2, bits 1 to 0
|
||||
/// Status of disc
|
||||
/// Byte 2, bits 1 to 0
|
||||
/// Status of disc
|
||||
/// </summary>
|
||||
public byte DiscStatus;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Number of logical track that contains LBA 0
|
||||
/// Byte 3
|
||||
/// Number of logical track that contains LBA 0
|
||||
/// </summary>
|
||||
public byte FirstTrackNumber;
|
||||
/// <summary>
|
||||
/// Byte 9 (MSB) and byte 4 (LSB)
|
||||
/// Number of sessions
|
||||
/// Byte 9 (MSB) and byte 4 (LSB)
|
||||
/// Number of sessions
|
||||
/// </summary>
|
||||
public ushort Sessions;
|
||||
/// <summary>
|
||||
/// Byte 10 (MSB) and byte 5 (LSB)
|
||||
/// Number of first track in last session
|
||||
/// Byte 10 (MSB) and byte 5 (LSB)
|
||||
/// Number of first track in last session
|
||||
/// </summary>
|
||||
public ushort FirstTrackLastSession;
|
||||
/// <summary>
|
||||
/// Byte 11 (MSB) and byte 6 (LSB)
|
||||
/// Number of last track in last session
|
||||
/// Byte 11 (MSB) and byte 6 (LSB)
|
||||
/// Number of last track in last session
|
||||
/// </summary>
|
||||
public ushort LastTrackLastSession;
|
||||
/// <summary>
|
||||
/// Byte 7, bit 7
|
||||
/// If set, DiscIdentification is valid
|
||||
/// Byte 7, bit 7
|
||||
/// If set, DiscIdentification is valid
|
||||
/// </summary>
|
||||
public bool DID_V;
|
||||
/// <summary>
|
||||
/// Byte 7, bit 6
|
||||
/// If set, DiscBarcode is valid
|
||||
/// Byte 7, bit 6
|
||||
/// If set, DiscBarcode is valid
|
||||
/// </summary>
|
||||
public bool DBC_V;
|
||||
/// <summary>
|
||||
/// Byte 7, bit 5
|
||||
/// If set, disc is unrestricted
|
||||
/// Byte 7, bit 5
|
||||
/// If set, disc is unrestricted
|
||||
/// </summary>
|
||||
public bool URU;
|
||||
/// <summary>
|
||||
/// Byte 7, bit 4
|
||||
/// If set DiscApplicationCode is valid
|
||||
/// Byte 7, bit 4
|
||||
/// If set DiscApplicationCode is valid
|
||||
/// </summary>
|
||||
public bool DAC_V;
|
||||
/// <summary>
|
||||
/// Byte 7, bit 3
|
||||
/// Reserved
|
||||
/// Byte 7, bit 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public bool Reserved;
|
||||
/// <summary>
|
||||
/// Byte 7, bit 2
|
||||
/// Copy of dirty bit from MRW status
|
||||
/// Byte 7, bit 2
|
||||
/// Copy of dirty bit from MRW status
|
||||
/// </summary>
|
||||
public bool Dbit;
|
||||
/// <summary>
|
||||
/// Byte 7, bits 1 to 0
|
||||
/// Background format status
|
||||
/// Byte 7, bits 1 to 0
|
||||
/// Background format status
|
||||
/// </summary>
|
||||
public byte BGFormatStatus;
|
||||
/// <summary>
|
||||
/// Byte 8
|
||||
/// Disc type code
|
||||
/// Byte 8
|
||||
/// Disc type code
|
||||
/// </summary>
|
||||
public byte DiscType;
|
||||
/// <summary>
|
||||
/// Bytes 12 to 15
|
||||
/// Disc identification number from PMA
|
||||
/// Bytes 12 to 15
|
||||
/// Disc identification number from PMA
|
||||
/// </summary>
|
||||
public uint DiscIdentification;
|
||||
/// <summary>
|
||||
/// Bytes 16 to 19
|
||||
/// Last Session Lead-in Start Address (MSF for CD, LBA for others)
|
||||
/// Bytes 16 to 19
|
||||
/// Last Session Lead-in Start Address (MSF for CD, LBA for others)
|
||||
/// </summary>
|
||||
public uint LastSessionLeadInStartLBA;
|
||||
/// <summary>
|
||||
/// Bytes 20 to 23
|
||||
/// Last Possible Lead-out Start Address (MSF for CD, LBA for others)
|
||||
/// Bytes 20 to 23
|
||||
/// Last Possible Lead-out Start Address (MSF for CD, LBA for others)
|
||||
/// </summary>
|
||||
public uint LastPossibleLeadOutStartLBA;
|
||||
/// <summary>
|
||||
/// Bytes 24 to 31
|
||||
/// Disc barcode
|
||||
/// Bytes 24 to 31
|
||||
/// Disc barcode
|
||||
/// </summary>
|
||||
public ulong DiscBarcode;
|
||||
/// <summary>
|
||||
/// Byte 32
|
||||
/// Disc application code
|
||||
/// Byte 32
|
||||
/// Disc application code
|
||||
/// </summary>
|
||||
public byte DiscApplicationCode;
|
||||
/// <summary>
|
||||
/// Byte 33
|
||||
/// How many OPC tables are
|
||||
/// Byte 33
|
||||
/// How many OPC tables are
|
||||
/// </summary>
|
||||
public byte OPCTablesNumber;
|
||||
/// <summary>
|
||||
/// Bytes 34 to end
|
||||
/// OPC tables (8 bytes each)
|
||||
/// Bytes 34 to end
|
||||
/// OPC tables (8 bytes each)
|
||||
/// </summary>
|
||||
public OPCTable[] OPCTables;
|
||||
}
|
||||
@@ -184,13 +184,13 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
public struct OPCTable
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// kilobytes/sec this OPC table applies to
|
||||
/// Bytes 0 to 1
|
||||
/// kilobytes/sec this OPC table applies to
|
||||
/// </summary>
|
||||
public ushort Speed;
|
||||
/// <summary>
|
||||
/// Bytes 2 to 7
|
||||
/// OPC values
|
||||
/// Bytes 2 to 7
|
||||
/// OPC values
|
||||
/// </summary>
|
||||
public byte[] OPCValues;
|
||||
}
|
||||
@@ -198,43 +198,43 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
public struct TrackResourcesInformation
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// 10
|
||||
/// Bytes 0 to 1
|
||||
/// 10
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2, bits 7 to 5
|
||||
/// 001b
|
||||
/// Byte 2, bits 7 to 5
|
||||
/// 001b
|
||||
/// </summary>
|
||||
public byte DataType;
|
||||
/// <summary>
|
||||
/// Byte 2, bits 4 to 0
|
||||
/// Reserved
|
||||
/// Byte 2, bits 4 to 0
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Bytes 4 to 5
|
||||
/// Maximum possible number of the tracks on the disc
|
||||
/// Bytes 4 to 5
|
||||
/// Maximum possible number of the tracks on the disc
|
||||
/// </summary>
|
||||
public ushort MaxTracks;
|
||||
/// <summary>
|
||||
/// Bytes 6 to 7
|
||||
/// Number of the assigned tracks on the disc
|
||||
/// Bytes 6 to 7
|
||||
/// Number of the assigned tracks on the disc
|
||||
/// </summary>
|
||||
public ushort AssignedTracks;
|
||||
/// <summary>
|
||||
/// Bytes 8 to 9
|
||||
/// Maximum possible number of appendable tracks on the disc
|
||||
/// Bytes 8 to 9
|
||||
/// Maximum possible number of appendable tracks on the disc
|
||||
/// </summary>
|
||||
public ushort MaxAppendableTracks;
|
||||
/// <summary>
|
||||
/// Bytes 10 to 11
|
||||
/// Current number of appendable tracks on the disc
|
||||
/// Bytes 10 to 11
|
||||
/// Current number of appendable tracks on the disc
|
||||
/// </summary>
|
||||
public ushort AppendableTracks;
|
||||
}
|
||||
@@ -242,38 +242,38 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
public struct POWResourcesInformation
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// 14
|
||||
/// Bytes 0 to 1
|
||||
/// 14
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2, bits 7 to 5
|
||||
/// 010b
|
||||
/// Byte 2, bits 7 to 5
|
||||
/// 010b
|
||||
/// </summary>
|
||||
public byte DataType;
|
||||
/// <summary>
|
||||
/// Byte 2, bits 4 to 0
|
||||
/// Reserved
|
||||
/// Byte 2, bits 4 to 0
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Bytes 4 to 7
|
||||
/// Remaining POW replacements
|
||||
/// Bytes 4 to 7
|
||||
/// Remaining POW replacements
|
||||
/// </summary>
|
||||
public uint RemainingPOWReplacements;
|
||||
/// <summary>
|
||||
/// Bytes 8 to 11
|
||||
/// Remaining POW reallocation map entries
|
||||
/// Bytes 8 to 11
|
||||
/// Remaining POW reallocation map entries
|
||||
/// </summary>
|
||||
public uint RemainingPOWReallocation;
|
||||
/// <summary>
|
||||
/// Bytes 12 to 15
|
||||
/// Number of remaining POW updates
|
||||
/// Bytes 12 to 15
|
||||
/// Number of remaining POW updates
|
||||
/// </summary>
|
||||
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 session Lead-In address is {0} (as LBA) or {1:X2}:{2:X2}:{3:X2}",
|
||||
decoded.LastSessionLeadInStartLBA, (decoded.LastSessionLeadInStartLBA & 0xFF0000) >> 16,
|
||||
(decoded.LastSessionLeadInStartLBA & 0xFF00) >> 8,
|
||||
decoded.LastSessionLeadInStartLBA & 0xFF).AppendLine();
|
||||
(decoded.LastSessionLeadInStartLBA & 0xFF00) >> 8, decoded.LastSessionLeadInStartLBA & 0xFF)
|
||||
.AppendLine();
|
||||
sb.AppendFormat("Last possible Lead-Out address is {0} (as LBA) or {1:X2}:{2:X2}:{3:X2}",
|
||||
decoded.LastPossibleLeadOutStartLBA, (decoded.LastPossibleLeadOutStartLBA & 0xFF0000) >> 16,
|
||||
(decoded.LastPossibleLeadOutStartLBA & 0xFF00) >> 8,
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
public enum DiscTypeCodes : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Also valid for CD-DA, DVD and BD
|
||||
/// Also valid for CD-DA, DVD and BD
|
||||
/// </summary>
|
||||
CDROM = 0x00,
|
||||
CDi = 0x10,
|
||||
|
||||
1000
SCSI/MMC/Features.cs
1000
SCSI/MMC/Features.cs
File diff suppressed because it is too large
Load Diff
@@ -37,19 +37,19 @@ using System.Text;
|
||||
namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -60,48 +60,48 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
public struct RecognizedFormatLayers
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data Length
|
||||
/// Bytes 0 to 1
|
||||
/// Data Length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Byte 4
|
||||
/// Number of format layers in hybrid disc identified by drive
|
||||
/// Byte 4
|
||||
/// Number of format layers in hybrid disc identified by drive
|
||||
/// </summary>
|
||||
public byte NumberOfLayers;
|
||||
/// <summary>
|
||||
/// Byte 5, bits 7 to 6
|
||||
/// Reserved
|
||||
/// Byte 5, bits 7 to 6
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved3;
|
||||
/// <summary>
|
||||
/// Byte 5, bits 5 to 4
|
||||
/// Layer no. used when disc is inserted
|
||||
/// Byte 5, bits 5 to 4
|
||||
/// Layer no. used when disc is inserted
|
||||
/// </summary>
|
||||
public byte DefaultFormatLayer;
|
||||
/// <summary>
|
||||
/// Byte 5, bits 3 to 2
|
||||
/// Reserved
|
||||
/// Byte 5, bits 3 to 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved4;
|
||||
/// <summary>
|
||||
/// Byte 5, bits 1 to 0
|
||||
/// Layer no. currently in use
|
||||
/// Byte 5, bits 1 to 0
|
||||
/// Layer no. currently in use
|
||||
/// </summary>
|
||||
public byte OnlineFormatLayer;
|
||||
/// <summary>
|
||||
/// Bytes 6 to end
|
||||
/// Recognized format layers
|
||||
/// Bytes 6 to end
|
||||
/// Recognized format layers
|
||||
/// </summary>
|
||||
public ushort[] FormatLayers;
|
||||
}
|
||||
@@ -127,7 +127,8 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -37,19 +37,19 @@ using System.Text;
|
||||
namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
/// T10/1048-D revision 10a
|
||||
/// T10/1228-D revision 7.0c
|
||||
/// T10/1228-D revision 11a
|
||||
/// T10/1363-D revision 10g
|
||||
/// T10/1545-D revision 1d
|
||||
/// T10/1545-D revision 5
|
||||
/// T10/1545-D revision 5a
|
||||
/// T10/1675-D revision 2c
|
||||
/// T10/1675-D revision 4
|
||||
/// T10/1836-D revision 2g
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
@@ -60,58 +60,58 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
public struct WriteProtectionStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data Length
|
||||
/// Bytes 0 to 1
|
||||
/// Data Length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Byte 4, bits 7 to 4
|
||||
/// Reserved
|
||||
/// Byte 4, bits 7 to 4
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved3;
|
||||
/// <summary>
|
||||
/// Byte 4, bit 3
|
||||
/// Writing inhibited by media specific reason
|
||||
/// Byte 4, bit 3
|
||||
/// Writing inhibited by media specific reason
|
||||
/// </summary>
|
||||
public bool MSWI;
|
||||
/// <summary>
|
||||
/// Byte 4, bit 2
|
||||
/// Cartridge sets write protection
|
||||
/// Byte 4, bit 2
|
||||
/// Cartridge sets write protection
|
||||
/// </summary>
|
||||
public bool CWP;
|
||||
/// <summary>
|
||||
/// Byte 4, bit 1
|
||||
/// Media surface sets write protection
|
||||
/// Byte 4, bit 1
|
||||
/// Media surface sets write protection
|
||||
/// </summary>
|
||||
public bool PWP;
|
||||
/// <summary>
|
||||
/// Byte 4, bit 0
|
||||
/// Software write protection until power down
|
||||
/// Byte 4, bit 0
|
||||
/// Software write protection until power down
|
||||
/// </summary>
|
||||
public bool SWPP;
|
||||
/// <summary>
|
||||
/// Byte 5
|
||||
/// Reserved
|
||||
/// Byte 5
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved4;
|
||||
/// <summary>
|
||||
/// Byte 6
|
||||
/// Reserved
|
||||
/// Byte 6
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved5;
|
||||
/// <summary>
|
||||
/// Byte 7
|
||||
/// Reserved
|
||||
/// Byte 7
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved6;
|
||||
}
|
||||
|
||||
@@ -42,30 +42,30 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
#region Mode Page 0x00: Drive Operation Mode page
|
||||
/// <summary>
|
||||
/// Drive Operation Mode page
|
||||
/// Page code 0x00
|
||||
/// 4 bytes in INF-8070
|
||||
/// Drive Operation Mode page
|
||||
/// Page code 0x00
|
||||
/// 4 bytes in INF-8070
|
||||
/// </summary>
|
||||
public struct ModePage_00_SFF
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// Select LUN Mode
|
||||
/// Select LUN Mode
|
||||
/// </summary>
|
||||
public bool SLM;
|
||||
/// <summary>
|
||||
/// Select LUN for rewritable
|
||||
/// Select LUN for rewritable
|
||||
/// </summary>
|
||||
public bool SLR;
|
||||
/// <summary>
|
||||
/// Disable verify for WRITE
|
||||
/// Disable verify for WRITE
|
||||
/// </summary>
|
||||
public bool DVW;
|
||||
/// <summary>
|
||||
/// Disable deferred error
|
||||
/// Disable deferred error
|
||||
/// </summary>
|
||||
public bool DDE;
|
||||
}
|
||||
|
||||
@@ -42,75 +42,75 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
#region Mode Page 0x01: Read-write error recovery page
|
||||
/// <summary>
|
||||
/// Disconnect-reconnect page
|
||||
/// Page code 0x01
|
||||
/// 12 bytes in SCSI-2, SBC-1, SBC-2
|
||||
/// Disconnect-reconnect page
|
||||
/// Page code 0x01
|
||||
/// 12 bytes in SCSI-2, SBC-1, SBC-2
|
||||
/// </summary>
|
||||
public struct ModePage_01
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// Automatic Write Reallocation Enabled
|
||||
/// Automatic Write Reallocation Enabled
|
||||
/// </summary>
|
||||
public bool AWRE;
|
||||
/// <summary>
|
||||
/// Automatic Read Reallocation Enabled
|
||||
/// Automatic Read Reallocation Enabled
|
||||
/// </summary>
|
||||
public bool ARRE;
|
||||
/// <summary>
|
||||
/// Transfer block
|
||||
/// Transfer block
|
||||
/// </summary>
|
||||
public bool TB;
|
||||
/// <summary>
|
||||
/// Read continuous
|
||||
/// Read continuous
|
||||
/// </summary>
|
||||
public bool RC;
|
||||
/// <summary>
|
||||
/// Enable early recovery
|
||||
/// Enable early recovery
|
||||
/// </summary>
|
||||
public bool EER;
|
||||
/// <summary>
|
||||
/// Post error reporting
|
||||
/// Post error reporting
|
||||
/// </summary>
|
||||
public bool PER;
|
||||
/// <summary>
|
||||
/// Disable transfer on error
|
||||
/// Disable transfer on error
|
||||
/// </summary>
|
||||
public bool DTE;
|
||||
/// <summary>
|
||||
/// Disable correction
|
||||
/// Disable correction
|
||||
/// </summary>
|
||||
public bool DCR;
|
||||
/// <summary>
|
||||
/// How many times to retry a read operation
|
||||
/// How many times to retry a read operation
|
||||
/// </summary>
|
||||
public byte ReadRetryCount;
|
||||
/// <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>
|
||||
public byte CorrectionSpan;
|
||||
/// <summary>
|
||||
/// Offset to move the heads
|
||||
/// Offset to move the heads
|
||||
/// </summary>
|
||||
public sbyte HeadOffsetCount;
|
||||
/// <summary>
|
||||
/// Incremental position to which the recovered data strobe shall be adjusted
|
||||
/// Incremental position to which the recovered data strobe shall be adjusted
|
||||
/// </summary>
|
||||
public sbyte DataStrobeOffsetCount;
|
||||
/// <summary>
|
||||
/// How many times to retry a write operation
|
||||
/// How many times to retry a write operation
|
||||
/// </summary>
|
||||
public byte WriteRetryCount;
|
||||
/// <summary>
|
||||
/// Maximum time in ms to use in data error recovery procedures
|
||||
/// Maximum time in ms to use in data error recovery procedures
|
||||
/// </summary>
|
||||
public ushort RecoveryTimeLimit;
|
||||
|
||||
/// <summary>
|
||||
/// Logical block provisioning error reporting is enabled
|
||||
/// Logical block provisioning error reporting is enabled
|
||||
/// </summary>
|
||||
public bool LBPERE;
|
||||
}
|
||||
@@ -189,37 +189,38 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
return sb.ToString();
|
||||
}
|
||||
#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;
|
||||
pg[1] = 6;
|
||||
public static byte[] EncodeModePage_01(ModePage_01 page)
|
||||
{
|
||||
byte[] pg = new byte[8];
|
||||
|
||||
if(page.PS) pg[0] += 0x80;
|
||||
if(page.AWRE) pg[2] += 0x80;
|
||||
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[0] = 0x01;
|
||||
pg[1] = 6;
|
||||
|
||||
pg[3] = page.ReadRetryCount;
|
||||
pg[4] = page.CorrectionSpan;
|
||||
pg[5] = (byte)page.HeadOffsetCount;
|
||||
pg[6] = (byte)page.DataStrobeOffsetCount;
|
||||
if(page.PS) pg[0] += 0x80;
|
||||
if(page.AWRE) pg[2] += 0x80;
|
||||
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;
|
||||
|
||||
// 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);*/
|
||||
pg[3] = page.ReadRetryCount;
|
||||
pg[4] = page.CorrectionSpan;
|
||||
pg[5] = (byte)page.HeadOffsetCount;
|
||||
pg[6] = (byte)page.DataStrobeOffsetCount;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,31 +42,31 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
#region Mode Page 0x01: Read error recovery page for MultiMedia Devices
|
||||
/// <summary>
|
||||
/// Read error recovery page for MultiMedia Devices
|
||||
/// Page code 0x01
|
||||
/// 8 bytes in SCSI-2, MMC-1
|
||||
/// 12 bytes in MMC-2, MMC-3
|
||||
/// Read error recovery page for MultiMedia Devices
|
||||
/// Page code 0x01
|
||||
/// 8 bytes in SCSI-2, MMC-1
|
||||
/// 12 bytes in MMC-2, MMC-3
|
||||
/// </summary>
|
||||
public struct ModePage_01_MMC
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// Error recovery parameter
|
||||
/// Error recovery parameter
|
||||
/// </summary>
|
||||
public byte Parameter;
|
||||
/// <summary>
|
||||
/// How many times to retry a read operation
|
||||
/// How many times to retry a read operation
|
||||
/// </summary>
|
||||
public byte ReadRetryCount;
|
||||
/// <summary>
|
||||
/// How many times to retry a write operation
|
||||
/// How many times to retry a write operation
|
||||
/// </summary>
|
||||
public byte WriteRetryCount;
|
||||
/// <summary>
|
||||
/// Maximum time in ms to use in data error recovery procedures
|
||||
/// Maximum time in ms to use in data error recovery procedures
|
||||
/// </summary>
|
||||
public ushort RecoveryTimeLimit;
|
||||
}
|
||||
@@ -195,24 +195,25 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
return sb.ToString();
|
||||
}
|
||||
#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;
|
||||
pg[1] = 10;
|
||||
public static byte[] EncodeModePage_01_MMC(ModePage_01_MMC page)
|
||||
{
|
||||
byte[] pg = new byte[12];
|
||||
|
||||
if(page.PS) pg[0] += 0x80;
|
||||
pg[2] = page.Parameter;
|
||||
pg[3] = page.ReadRetryCount;
|
||||
pg[0] = 0x01;
|
||||
pg[1] = 10;
|
||||
|
||||
// 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;
|
||||
pg[10] = (byte)((page.RecoveryTimeLimit & 0xFF00) << 8);
|
||||
pg[11] = (byte)(page.RecoveryTimeLimit & 0xFF);
|
||||
// This is from a newer version of SCSI unknown what happen for drives expecting an 8 byte page
|
||||
|
||||
return pg;
|
||||
}
|
||||
pg[8] = page.WriteRetryCount;
|
||||
pg[10] = (byte)((page.RecoveryTimeLimit & 0xFF00) << 8);
|
||||
pg[11] = (byte)(page.RecoveryTimeLimit & 0xFF);
|
||||
|
||||
return pg;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,59 +42,60 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
#region Mode Page 0x02: Disconnect-reconnect page
|
||||
/// <summary>
|
||||
/// Disconnect-reconnect page
|
||||
/// Page code 0x02
|
||||
/// 16 bytes in SCSI-2, SPC-1, SPC-2, SPC-3, SPC-4, SPC-5
|
||||
/// Disconnect-reconnect page
|
||||
/// Page code 0x02
|
||||
/// 16 bytes in SCSI-2, SPC-1, SPC-2, SPC-3, SPC-4, SPC-5
|
||||
/// </summary>
|
||||
public struct ModePage_02
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// How full should be the buffer prior to attempting a reselection
|
||||
/// How full should be the buffer prior to attempting a reselection
|
||||
/// </summary>
|
||||
public byte BufferFullRatio;
|
||||
/// <summary>
|
||||
/// How empty should be the buffer prior to attempting a reselection
|
||||
/// How empty should be the buffer prior to attempting a reselection
|
||||
/// </summary>
|
||||
public byte BufferEmptyRatio;
|
||||
/// <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>
|
||||
public ushort BusInactivityLimit;
|
||||
/// <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>
|
||||
public ushort DisconnectTimeLimit;
|
||||
/// <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>
|
||||
public ushort ConnectTimeLimit;
|
||||
/// <summary>
|
||||
/// Maximum amount of data before disconnecting in 512 bytes increments
|
||||
/// Maximum amount of data before disconnecting in 512 bytes increments
|
||||
/// </summary>
|
||||
public ushort MaxBurstSize;
|
||||
/// <summary>
|
||||
/// Data transfer disconnect control
|
||||
/// Data transfer disconnect control
|
||||
/// </summary>
|
||||
public byte DTDC;
|
||||
|
||||
/// <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>
|
||||
public bool DIMM;
|
||||
/// <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>
|
||||
public byte FairArbitration;
|
||||
/// <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>
|
||||
public ushort FirstBurstSize;
|
||||
/// <summary>
|
||||
/// Target is allowed to re-order the data transfer
|
||||
/// Target is allowed to re-order the data transfer
|
||||
/// </summary>
|
||||
public bool EMDP;
|
||||
}
|
||||
|
||||
@@ -42,67 +42,67 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
#region Mode Page 0x03: Format device page
|
||||
/// <summary>
|
||||
/// Disconnect-reconnect page
|
||||
/// Page code 0x03
|
||||
/// 24 bytes in SCSI-2, SBC-1
|
||||
/// Disconnect-reconnect page
|
||||
/// Page code 0x03
|
||||
/// 24 bytes in SCSI-2, SBC-1
|
||||
/// </summary>
|
||||
public struct ModePage_03
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <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>
|
||||
public ushort TracksPerZone;
|
||||
/// <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>
|
||||
public ushort AltSectorsPerZone;
|
||||
/// <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>
|
||||
public ushort AltTracksPerZone;
|
||||
/// <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>
|
||||
public ushort AltTracksPerLun;
|
||||
/// <summary>
|
||||
/// Number of physical sectors per track
|
||||
/// Number of physical sectors per track
|
||||
/// </summary>
|
||||
public ushort SectorsPerTrack;
|
||||
/// <summary>
|
||||
/// Bytes per physical sector
|
||||
/// Bytes per physical sector
|
||||
/// </summary>
|
||||
public ushort BytesPerSector;
|
||||
/// <summary>
|
||||
/// Interleave value, target dependent
|
||||
/// Interleave value, target dependent
|
||||
/// </summary>
|
||||
public ushort Interleave;
|
||||
/// <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>
|
||||
public ushort TrackSkew;
|
||||
/// <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>
|
||||
public ushort CylinderSkew;
|
||||
/// <summary>
|
||||
/// Soft-sectored
|
||||
/// Soft-sectored
|
||||
/// </summary>
|
||||
public bool SSEC;
|
||||
/// <summary>
|
||||
/// Hard-sectored
|
||||
/// Hard-sectored
|
||||
/// </summary>
|
||||
public bool HSEC;
|
||||
/// <summary>
|
||||
/// Removable
|
||||
/// Removable
|
||||
/// </summary>
|
||||
public bool RMB;
|
||||
/// <summary>
|
||||
/// If set, address are allocated progressively in a surface before going to the next.
|
||||
/// Otherwise, it goes by cylinders
|
||||
/// If set, address are allocated progressively in a surface before going to the next.
|
||||
/// Otherwise, it goes by cylinders
|
||||
/// </summary>
|
||||
public bool SURF;
|
||||
}
|
||||
|
||||
@@ -42,50 +42,50 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
#region Mode Page 0x04: Rigid disk drive geometry page
|
||||
/// <summary>
|
||||
/// Disconnect-reconnect page
|
||||
/// Page code 0x04
|
||||
/// 24 bytes in SCSI-2, SBC-1
|
||||
/// Disconnect-reconnect page
|
||||
/// Page code 0x04
|
||||
/// 24 bytes in SCSI-2, SBC-1
|
||||
/// </summary>
|
||||
public struct ModePage_04
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// Cylinders used for data storage
|
||||
/// Cylinders used for data storage
|
||||
/// </summary>
|
||||
public uint Cylinders;
|
||||
/// <summary>
|
||||
/// Heads for reading and/or writing
|
||||
/// Heads for reading and/or writing
|
||||
/// </summary>
|
||||
public byte Heads;
|
||||
/// <summary>
|
||||
/// Cylinder where write precompensation starts
|
||||
/// Cylinder where write precompensation starts
|
||||
/// </summary>
|
||||
public uint WritePrecompCylinder;
|
||||
/// <summary>
|
||||
/// Cylinder where write current reduction starts
|
||||
/// Cylinder where write current reduction starts
|
||||
/// </summary>
|
||||
public uint WriteReduceCylinder;
|
||||
/// <summary>
|
||||
/// Step rate in 100 ns units
|
||||
/// Step rate in 100 ns units
|
||||
/// </summary>
|
||||
public ushort DriveStepRate;
|
||||
/// <summary>
|
||||
/// Cylinder where the heads park
|
||||
/// Cylinder where the heads park
|
||||
/// </summary>
|
||||
public int LandingCylinder;
|
||||
/// <summary>
|
||||
/// Rotational position locking
|
||||
/// Rotational position locking
|
||||
/// </summary>
|
||||
public byte RPL;
|
||||
/// <summary>
|
||||
/// Rotational skew to apply when synchronized
|
||||
/// Rotational skew to apply when synchronized
|
||||
/// </summary>
|
||||
public byte RotationalOffset;
|
||||
/// <summary>
|
||||
/// Medium speed in rpm
|
||||
/// Medium speed in rpm
|
||||
/// </summary>
|
||||
public ushort MediumRotationRate;
|
||||
}
|
||||
|
||||
@@ -42,115 +42,115 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
#region Mode Page 0x05: Flexible disk page
|
||||
/// <summary>
|
||||
/// Disconnect-reconnect page
|
||||
/// Page code 0x05
|
||||
/// 32 bytes in SCSI-2, SBC-1
|
||||
/// Disconnect-reconnect page
|
||||
/// Page code 0x05
|
||||
/// 32 bytes in SCSI-2, SBC-1
|
||||
/// </summary>
|
||||
public struct ModePage_05
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// Data rate of peripheral device on kbit/s
|
||||
/// Data rate of peripheral device on kbit/s
|
||||
/// </summary>
|
||||
public ushort TransferRate;
|
||||
/// <summary>
|
||||
/// Heads for reading and/or writing
|
||||
/// Heads for reading and/or writing
|
||||
/// </summary>
|
||||
public byte Heads;
|
||||
/// <summary>
|
||||
/// Sectors per revolution per head
|
||||
/// Sectors per revolution per head
|
||||
/// </summary>
|
||||
public byte SectorsPerTrack;
|
||||
/// <summary>
|
||||
/// Bytes of data per sector
|
||||
/// Bytes of data per sector
|
||||
/// </summary>
|
||||
public ushort BytesPerSector;
|
||||
/// <summary>
|
||||
/// Cylinders used for data storage
|
||||
/// Cylinders used for data storage
|
||||
/// </summary>
|
||||
public ushort Cylinders;
|
||||
/// <summary>
|
||||
/// Cylinder where write precompensation starts
|
||||
/// Cylinder where write precompensation starts
|
||||
/// </summary>
|
||||
public ushort WritePrecompCylinder;
|
||||
/// <summary>
|
||||
/// Cylinder where write current reduction starts
|
||||
/// Cylinder where write current reduction starts
|
||||
/// </summary>
|
||||
public ushort WriteReduceCylinder;
|
||||
/// <summary>
|
||||
/// Step rate in 100 μs units
|
||||
/// Step rate in 100 μs units
|
||||
/// </summary>
|
||||
public ushort DriveStepRate;
|
||||
/// <summary>
|
||||
/// Width of step pulse in μs
|
||||
/// Width of step pulse in μs
|
||||
/// </summary>
|
||||
public byte DriveStepPulse;
|
||||
/// <summary>
|
||||
/// Head settle time in 100 μs units
|
||||
/// Head settle time in 100 μs units
|
||||
/// </summary>
|
||||
public ushort HeadSettleDelay;
|
||||
/// <summary>
|
||||
/// If <see cref="TRDY"/> is <c>true</c>, specified in 1/10s of a
|
||||
/// second the time waiting for read status before aborting medium
|
||||
/// access. Otherwise, indicates time to way before medimum access
|
||||
/// after motor on signal is asserted.
|
||||
/// If <see cref="TRDY" /> is <c>true</c>, specified in 1/10s of a
|
||||
/// second the time waiting for read status before aborting medium
|
||||
/// access. Otherwise, indicates time to way before medimum access
|
||||
/// after motor on signal is asserted.
|
||||
/// </summary>
|
||||
public byte MotorOnDelay;
|
||||
/// <summary>
|
||||
/// 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
|
||||
/// 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
|
||||
/// </summary>
|
||||
public byte MotorOffDelay;
|
||||
/// <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>
|
||||
public bool TRDY;
|
||||
/// <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>
|
||||
public bool SSN;
|
||||
/// <summary>
|
||||
/// If <c>true</c> specifies that motor on shall remain released.
|
||||
/// If <c>true</c> specifies that motor on shall remain released.
|
||||
/// </summary>
|
||||
public bool MO;
|
||||
/// <summary>
|
||||
/// Number of additional step pulses per cylinder.
|
||||
/// Number of additional step pulses per cylinder.
|
||||
/// </summary>
|
||||
public byte SPC;
|
||||
/// <summary>
|
||||
/// Write compensation value
|
||||
/// Write compensation value
|
||||
/// </summary>
|
||||
public byte WriteCompensation;
|
||||
/// <summary>
|
||||
/// Head loading time in ms.
|
||||
/// Head loading time in ms.
|
||||
/// </summary>
|
||||
public byte HeadLoadDelay;
|
||||
/// <summary>
|
||||
/// Head unloading time in ms.
|
||||
/// Head unloading time in ms.
|
||||
/// </summary>
|
||||
public byte HeadUnloadDelay;
|
||||
/// <summary>
|
||||
/// Description of shugart's bus pin 34 usage
|
||||
/// Description of shugart's bus pin 34 usage
|
||||
/// </summary>
|
||||
public byte Pin34;
|
||||
/// <summary>
|
||||
/// Description of shugart's bus pin 2 usage
|
||||
/// Description of shugart's bus pin 2 usage
|
||||
/// </summary>
|
||||
public byte Pin2;
|
||||
/// <summary>
|
||||
/// Description of shugart's bus pin 4 usage
|
||||
/// Description of shugart's bus pin 4 usage
|
||||
/// </summary>
|
||||
public byte Pin4;
|
||||
/// <summary>
|
||||
/// Description of shugart's bus pin 1 usage
|
||||
/// Description of shugart's bus pin 1 usage
|
||||
/// </summary>
|
||||
public byte Pin1;
|
||||
/// <summary>
|
||||
/// Medium speed in rpm
|
||||
/// Medium speed in rpm
|
||||
/// </summary>
|
||||
public ushort MediumRotationRate;
|
||||
}
|
||||
|
||||
@@ -40,61 +40,61 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
{
|
||||
#region Mode Page 0x06: Optical memory page
|
||||
/// <summary>
|
||||
/// Optical memory page
|
||||
/// Page code 0x06
|
||||
/// 4 bytes in SCSI-2
|
||||
/// </summary>
|
||||
public struct ModePage_06
|
||||
{
|
||||
#region Mode Page 0x06: Optical memory page
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Optical memory page
|
||||
/// Page code 0x06
|
||||
/// 4 bytes in SCSI-2
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// Report updated block read
|
||||
/// </summary>
|
||||
public bool RUBR;
|
||||
}
|
||||
public struct ModePage_06
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// Report updated block read
|
||||
/// </summary>
|
||||
public bool RUBR;
|
||||
}
|
||||
|
||||
public static ModePage_06? DecodeModePage_06(byte[] pageResponse)
|
||||
{
|
||||
if((pageResponse?[0] & 0x40) == 0x40) return null;
|
||||
public static ModePage_06? DecodeModePage_06(byte[] pageResponse)
|
||||
{
|
||||
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.RUBR |= (pageResponse[2] & 0x01) == 0x01;
|
||||
decoded.PS |= (pageResponse[0] & 0x80) == 0x80;
|
||||
decoded.RUBR |= (pageResponse[2] & 0x01) == 0x01;
|
||||
|
||||
return decoded;
|
||||
}
|
||||
return decoded;
|
||||
}
|
||||
|
||||
public static string PrettifyModePage_06(byte[] pageResponse)
|
||||
{
|
||||
return PrettifyModePage_06(DecodeModePage_06(pageResponse));
|
||||
}
|
||||
public static string PrettifyModePage_06(byte[] pageResponse)
|
||||
{
|
||||
return PrettifyModePage_06(DecodeModePage_06(pageResponse));
|
||||
}
|
||||
|
||||
public static string PrettifyModePage_06(ModePage_06? modePage)
|
||||
{
|
||||
if(!modePage.HasValue) return null;
|
||||
public static string PrettifyModePage_06(ModePage_06? modePage)
|
||||
{
|
||||
if(!modePage.HasValue) return null;
|
||||
|
||||
ModePage_06 page = modePage.Value;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
ModePage_06 page = modePage.Value;
|
||||
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.RUBR) sb.AppendLine("\tOn reading an updated block drive will return RECOVERED ERROR");
|
||||
if(page.PS) sb.AppendLine("\tParameters can be saved");
|
||||
if(page.RUBR) sb.AppendLine("\tOn reading an updated block drive will return RECOVERED ERROR");
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
#endregion Mode Page 0x06: Optical memory page
|
||||
return sb.ToString();
|
||||
}
|
||||
#endregion Mode Page 0x06: Optical memory page
|
||||
}
|
||||
}
|
||||
@@ -43,42 +43,42 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
#region Mode Page 0x07: Verify error recovery page
|
||||
/// <summary>
|
||||
/// Disconnect-reconnect page
|
||||
/// Page code 0x07
|
||||
/// 12 bytes in SCSI-2, SBC-1, SBC-2
|
||||
/// Disconnect-reconnect page
|
||||
/// Page code 0x07
|
||||
/// 12 bytes in SCSI-2, SBC-1, SBC-2
|
||||
/// </summary>
|
||||
public struct ModePage_07
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// Enable early recovery
|
||||
/// Enable early recovery
|
||||
/// </summary>
|
||||
public bool EER;
|
||||
/// <summary>
|
||||
/// Post error reporting
|
||||
/// Post error reporting
|
||||
/// </summary>
|
||||
public bool PER;
|
||||
/// <summary>
|
||||
/// Disable transfer on error
|
||||
/// Disable transfer on error
|
||||
/// </summary>
|
||||
public bool DTE;
|
||||
/// <summary>
|
||||
/// Disable correction
|
||||
/// Disable correction
|
||||
/// </summary>
|
||||
public bool DCR;
|
||||
/// <summary>
|
||||
/// How many times to retry a verify operation
|
||||
/// How many times to retry a verify operation
|
||||
/// </summary>
|
||||
public byte VerifyRetryCount;
|
||||
/// <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>
|
||||
public byte CorrectionSpan;
|
||||
/// <summary>
|
||||
/// Maximum time in ms to use in data error recovery procedures
|
||||
/// Maximum time in ms to use in data error recovery procedures
|
||||
/// </summary>
|
||||
public ushort RecoveryTimeLimit;
|
||||
}
|
||||
|
||||
@@ -42,22 +42,22 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
#region Mode Page 0x07: Verify error recovery page for MultiMedia Devices
|
||||
/// <summary>
|
||||
/// Verify error recovery page for MultiMedia Devices
|
||||
/// Page code 0x07
|
||||
/// 8 bytes in SCSI-2, MMC-1
|
||||
/// Verify error recovery page for MultiMedia Devices
|
||||
/// Page code 0x07
|
||||
/// 8 bytes in SCSI-2, MMC-1
|
||||
/// </summary>
|
||||
public struct ModePage_07_MMC
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// Error recovery parameter
|
||||
/// Error recovery parameter
|
||||
/// </summary>
|
||||
public byte Parameter;
|
||||
/// <summary>
|
||||
/// How many times to retry a verify operation
|
||||
/// How many times to retry a verify operation
|
||||
/// </summary>
|
||||
public byte VerifyRetryCount;
|
||||
}
|
||||
|
||||
@@ -42,96 +42,96 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
#region Mode Page 0x08: Caching page
|
||||
/// <summary>
|
||||
/// Disconnect-reconnect page
|
||||
/// Page code 0x08
|
||||
/// 12 bytes in SCSI-2
|
||||
/// 20 bytes in SBC-1, SBC-2, SBC-3
|
||||
/// Disconnect-reconnect page
|
||||
/// Page code 0x08
|
||||
/// 12 bytes in SCSI-2
|
||||
/// 20 bytes in SBC-1, SBC-2, SBC-3
|
||||
/// </summary>
|
||||
public struct ModePage_08
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// <c>true</c> if write cache is enabled
|
||||
/// <c>true</c> if write cache is enabled
|
||||
/// </summary>
|
||||
public bool WCE;
|
||||
/// <summary>
|
||||
/// Multiplication factor
|
||||
/// Multiplication factor
|
||||
/// </summary>
|
||||
public bool MF;
|
||||
/// <summary>
|
||||
/// <c>true</c> if read cache is enabled
|
||||
/// <c>true</c> if read cache is enabled
|
||||
/// </summary>
|
||||
public bool RCD;
|
||||
/// <summary>
|
||||
/// Advices on reading-cache retention priority
|
||||
/// Advices on reading-cache retention priority
|
||||
/// </summary>
|
||||
public byte DemandReadRetentionPrio;
|
||||
/// <summary>
|
||||
/// Advices on writing-cache retention priority
|
||||
/// Advices on writing-cache retention priority
|
||||
/// </summary>
|
||||
public byte WriteRetentionPriority;
|
||||
/// <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>
|
||||
public ushort DisablePreFetch;
|
||||
/// <summary>
|
||||
/// Minimum pre-fetch
|
||||
/// Minimum pre-fetch
|
||||
/// </summary>
|
||||
public ushort MinimumPreFetch;
|
||||
/// <summary>
|
||||
/// Maximum pre-fetch
|
||||
/// Maximum pre-fetch
|
||||
/// </summary>
|
||||
public ushort MaximumPreFetch;
|
||||
/// <summary>
|
||||
/// Upper limit on maximum pre-fetch value
|
||||
/// Upper limit on maximum pre-fetch value
|
||||
/// </summary>
|
||||
public ushort MaximumPreFetchCeiling;
|
||||
|
||||
/// <summary>
|
||||
/// Manual cache controlling
|
||||
/// Manual cache controlling
|
||||
/// </summary>
|
||||
public bool IC;
|
||||
/// <summary>
|
||||
/// Abort pre-fetch
|
||||
/// Abort pre-fetch
|
||||
/// </summary>
|
||||
public bool ABPF;
|
||||
/// <summary>
|
||||
/// Caching analysis permitted
|
||||
/// Caching analysis permitted
|
||||
/// </summary>
|
||||
public bool CAP;
|
||||
/// <summary>
|
||||
/// Pre-fetch over discontinuities
|
||||
/// Pre-fetch over discontinuities
|
||||
/// </summary>
|
||||
public bool Disc;
|
||||
/// <summary>
|
||||
/// <see cref="CacheSegmentSize"/> is to be used to control caching segmentation
|
||||
/// <see cref="CacheSegmentSize" /> is to be used to control caching segmentation
|
||||
/// </summary>
|
||||
public bool Size;
|
||||
/// <summary>
|
||||
/// Force sequential write
|
||||
/// Force sequential write
|
||||
/// </summary>
|
||||
public bool FSW;
|
||||
/// <summary>
|
||||
/// Logical block cache segment size
|
||||
/// Logical block cache segment size
|
||||
/// </summary>
|
||||
public bool LBCSS;
|
||||
/// <summary>
|
||||
/// Disable read-ahead
|
||||
/// Disable read-ahead
|
||||
/// </summary>
|
||||
public bool DRA;
|
||||
/// <summary>
|
||||
/// How many segments should the cache be divided upon
|
||||
/// How many segments should the cache be divided upon
|
||||
/// </summary>
|
||||
public byte CacheSegments;
|
||||
/// <summary>
|
||||
/// How many bytes should the cache be divided upon
|
||||
/// How many bytes should the cache be divided upon
|
||||
/// </summary>
|
||||
public ushort CacheSegmentSize;
|
||||
/// <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>
|
||||
public uint NonCacheSegmentSize;
|
||||
|
||||
|
||||
@@ -42,123 +42,125 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
#region Mode Page 0x0A: Control mode page
|
||||
/// <summary>
|
||||
/// Control mode page
|
||||
/// Page code 0x0A
|
||||
/// 8 bytes in SCSI-2
|
||||
/// 12 bytes in SPC-1, SPC-2, SPC-3, SPC-4, SPC-5
|
||||
/// Control mode page
|
||||
/// Page code 0x0A
|
||||
/// 8 bytes in SCSI-2
|
||||
/// 12 bytes in SPC-1, SPC-2, SPC-3, SPC-4, SPC-5
|
||||
/// </summary>
|
||||
public struct ModePage_0A
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// If set, target shall report log exception conditions
|
||||
/// If set, target shall report log exception conditions
|
||||
/// </summary>
|
||||
public bool RLEC;
|
||||
/// <summary>
|
||||
/// Queue algorithm modifier
|
||||
/// Queue algorithm modifier
|
||||
/// </summary>
|
||||
public byte QueueAlgorithm;
|
||||
/// <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>
|
||||
public byte QErr;
|
||||
/// <summary>
|
||||
/// Tagged queuing is disabled
|
||||
/// Tagged queuing is disabled
|
||||
/// </summary>
|
||||
public bool DQue;
|
||||
/// <summary>
|
||||
/// Extended Contingent Allegiance is enabled
|
||||
/// Extended Contingent Allegiance is enabled
|
||||
/// </summary>
|
||||
public bool EECA;
|
||||
/// <summary>
|
||||
/// Target may issue an asynchronous event notification upon completing its initialization
|
||||
/// Target may issue an asynchronous event notification upon completing its initialization
|
||||
/// </summary>
|
||||
public bool RAENP;
|
||||
/// <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>
|
||||
public bool UAAENP;
|
||||
/// <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>
|
||||
public bool EAENP;
|
||||
/// <summary>
|
||||
/// Minimum time in ms after initialization before attempting asynchronous event notifications
|
||||
/// Minimum time in ms after initialization before attempting asynchronous event notifications
|
||||
/// </summary>
|
||||
public ushort ReadyAENHoldOffPeriod;
|
||||
|
||||
/// <summary>
|
||||
/// Global logging target save disabled
|
||||
/// Global logging target save disabled
|
||||
/// </summary>
|
||||
public bool GLTSD;
|
||||
/// <summary>
|
||||
/// CHECK CONDITION should be reported rather than a long busy condition
|
||||
/// CHECK CONDITION should be reported rather than a long busy condition
|
||||
/// </summary>
|
||||
public bool RAC;
|
||||
/// <summary>
|
||||
/// Software write protect is active
|
||||
/// Software write protect is active
|
||||
/// </summary>
|
||||
public bool SWP;
|
||||
/// <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>
|
||||
public ushort BusyTimeoutPeriod;
|
||||
|
||||
/// <summary>
|
||||
/// Task set type
|
||||
/// Task set type
|
||||
/// </summary>
|
||||
public byte TST;
|
||||
/// <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>
|
||||
public bool TAS;
|
||||
/// <summary>
|
||||
/// Action to be taken when a medium is inserted
|
||||
/// Action to be taken when a medium is inserted
|
||||
/// </summary>
|
||||
public byte AutoloadMode;
|
||||
/// <summary>
|
||||
/// Time in seconds to complete an extended self-test
|
||||
/// Time in seconds to complete an extended self-test
|
||||
/// </summary>
|
||||
public byte ExtendedSelfTestCompletionTime;
|
||||
|
||||
/// <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>
|
||||
public bool TMF_ONLY;
|
||||
/// <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>
|
||||
public bool D_SENSE;
|
||||
/// <summary>
|
||||
/// Unit attention interlocks control
|
||||
/// Unit attention interlocks control
|
||||
/// </summary>
|
||||
public byte UA_INTLCK_CTRL;
|
||||
/// <summary>
|
||||
/// LOGICAL BLOCK APPLICATION TAG should not be modified
|
||||
/// LOGICAL BLOCK APPLICATION TAG should not be modified
|
||||
/// </summary>
|
||||
public bool ATO;
|
||||
|
||||
/// <summary>
|
||||
/// Protector information checking is disabled
|
||||
/// Protector information checking is disabled
|
||||
/// </summary>
|
||||
public bool DPICZ;
|
||||
/// <summary>
|
||||
/// No unit attention on release
|
||||
/// No unit attention on release
|
||||
/// </summary>
|
||||
public bool NUAR;
|
||||
/// <summary>
|
||||
/// Application Tag mode page is enabled
|
||||
/// Application Tag mode page is enabled
|
||||
/// </summary>
|
||||
public bool ATMPE;
|
||||
/// <summary>
|
||||
/// Abort any write command without protection information
|
||||
/// Abort any write command without protection information
|
||||
/// </summary>
|
||||
public bool RWWP;
|
||||
/// <summary>
|
||||
/// Supportes block lengths and protection information
|
||||
/// Supportes block lengths and protection information
|
||||
/// </summary>
|
||||
public bool SBLP;
|
||||
}
|
||||
@@ -355,40 +357,40 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
|
||||
#region Mode Page 0x0A subpage 0x01: Control Extension mode page
|
||||
/// <summary>
|
||||
/// Control Extension mode page
|
||||
/// Page code 0x0A
|
||||
/// Subpage code 0x01
|
||||
/// 32 bytes in SPC-3, SPC-4, SPC-5
|
||||
/// Control Extension mode page
|
||||
/// Page code 0x0A
|
||||
/// Subpage code 0x01
|
||||
/// 32 bytes in SPC-3, SPC-4, SPC-5
|
||||
/// </summary>
|
||||
public struct ModePage_0A_S01
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// Timestamp outside this standard
|
||||
/// Timestamp outside this standard
|
||||
/// </summary>
|
||||
public bool TCMOS;
|
||||
/// <summary>
|
||||
/// SCSI precedence
|
||||
/// SCSI precedence
|
||||
/// </summary>
|
||||
public bool SCSIP;
|
||||
/// <summary>
|
||||
/// Implicit Asymmetric Logical Unit Access Enabled
|
||||
/// Implicit Asymmetric Logical Unit Access Enabled
|
||||
/// </summary>
|
||||
public bool IALUAE;
|
||||
/// <summary>
|
||||
/// Initial task priority
|
||||
/// Initial task priority
|
||||
/// </summary>
|
||||
public byte InitialPriority;
|
||||
|
||||
/// <summary>
|
||||
/// Device life control disabled
|
||||
/// Device life control disabled
|
||||
/// </summary>
|
||||
public bool DLC;
|
||||
/// <summary>
|
||||
/// Maximum size of SENSE data in bytes
|
||||
/// Maximum size of SENSE data in bytes
|
||||
/// </summary>
|
||||
public byte MaximumSenseLength;
|
||||
}
|
||||
@@ -455,5 +457,5 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
return sb.ToString();
|
||||
}
|
||||
#endregion Mode Page 0x0A subpage 0x01: Control Extension mode page
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,14 +42,14 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
#region Mode Page 0x0B: Medium types supported page
|
||||
/// <summary>
|
||||
/// Disconnect-reconnect page
|
||||
/// Page code 0x0B
|
||||
/// 8 bytes in SCSI-2
|
||||
/// Disconnect-reconnect page
|
||||
/// Page code 0x0B
|
||||
/// 8 bytes in SCSI-2
|
||||
/// </summary>
|
||||
public struct ModePage_0B
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
public MediumTypes MediumType1;
|
||||
|
||||
@@ -34,8 +34,8 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
public static partial class Modes
|
||||
{
|
||||
#region Mode Page 0x0C: Notch page
|
||||
// TODO: Implement this page
|
||||
#endregion Mode Page 0x0C: Notch page
|
||||
#region Mode Page 0x0C: Notch page
|
||||
// TODO: Implement this page
|
||||
#endregion Mode Page 0x0C: Notch page
|
||||
}
|
||||
}
|
||||
@@ -42,26 +42,26 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
#region Mode Page 0x0D: CD-ROM parameteres page
|
||||
/// <summary>
|
||||
/// CD-ROM parameteres page
|
||||
/// Page code 0x0D
|
||||
/// 8 bytes in SCSI-2, MMC-1, MMC-2, MMC-3
|
||||
/// CD-ROM parameteres page
|
||||
/// Page code 0x0D
|
||||
/// 8 bytes in SCSI-2, MMC-1, MMC-2, MMC-3
|
||||
/// </summary>
|
||||
public struct ModePage_0D
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <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>
|
||||
public byte InactivityTimerMultiplier;
|
||||
/// <summary>
|
||||
/// Seconds per Minute
|
||||
/// Seconds per Minute
|
||||
/// </summary>
|
||||
public ushort SecondsPerMinute;
|
||||
/// <summary>
|
||||
/// Frames per Second
|
||||
/// Frames per Second
|
||||
/// </summary>
|
||||
public ushort FramesPerSecond;
|
||||
}
|
||||
|
||||
@@ -42,66 +42,66 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
#region Mode Page 0x0E: CD-ROM audio control parameters page
|
||||
/// <summary>
|
||||
/// CD-ROM audio control parameters
|
||||
/// Page code 0x0E
|
||||
/// 16 bytes in SCSI-2, MMC-1, MMC-2, MMC-3
|
||||
/// CD-ROM audio control parameters
|
||||
/// Page code 0x0E
|
||||
/// 16 bytes in SCSI-2, MMC-1, MMC-2, MMC-3
|
||||
/// </summary>
|
||||
public struct ModePage_0E
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// Return status as soon as playback operation starts
|
||||
/// Return status as soon as playback operation starts
|
||||
/// </summary>
|
||||
public bool Immed;
|
||||
/// <summary>
|
||||
/// Stop on track crossing
|
||||
/// Stop on track crossing
|
||||
/// </summary>
|
||||
public bool SOTC;
|
||||
/// <summary>
|
||||
/// Indicates <see cref="BlocksPerSecondOfAudio"/> is valid
|
||||
/// Indicates <see cref="BlocksPerSecondOfAudio" /> is valid
|
||||
/// </summary>
|
||||
public bool APRVal;
|
||||
/// <summary>
|
||||
/// Multiplier for <see cref="BlocksPerSecondOfAudio"/>
|
||||
/// Multiplier for <see cref="BlocksPerSecondOfAudio" />
|
||||
/// </summary>
|
||||
public byte LBAFormat;
|
||||
/// <summary>
|
||||
/// LBAs per second of audio
|
||||
/// LBAs per second of audio
|
||||
/// </summary>
|
||||
public ushort BlocksPerSecondOfAudio;
|
||||
/// <summary>
|
||||
/// Channels output on this port
|
||||
/// Channels output on this port
|
||||
/// </summary>
|
||||
public byte OutputPort0ChannelSelection;
|
||||
/// <summary>
|
||||
/// Volume level for this port
|
||||
/// Volume level for this port
|
||||
/// </summary>
|
||||
public byte OutputPort0Volume;
|
||||
/// <summary>
|
||||
/// Channels output on this port
|
||||
/// Channels output on this port
|
||||
/// </summary>
|
||||
public byte OutputPort1ChannelSelection;
|
||||
/// <summary>
|
||||
/// Volume level for this port
|
||||
/// Volume level for this port
|
||||
/// </summary>
|
||||
public byte OutputPort1Volume;
|
||||
/// <summary>
|
||||
/// Channels output on this port
|
||||
/// Channels output on this port
|
||||
/// </summary>
|
||||
public byte OutputPort2ChannelSelection;
|
||||
/// <summary>
|
||||
/// Volume level for this port
|
||||
/// Volume level for this port
|
||||
/// </summary>
|
||||
public byte OutputPort2Volume;
|
||||
/// <summary>
|
||||
/// Channels output on this port
|
||||
/// Channels output on this port
|
||||
/// </summary>
|
||||
public byte OutputPort3ChannelSelection;
|
||||
/// <summary>
|
||||
/// Volume level for this port
|
||||
/// Volume level for this port
|
||||
/// </summary>
|
||||
public byte OutputPort3Volume;
|
||||
}
|
||||
|
||||
@@ -42,38 +42,38 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
#region Mode Page 0x0F: Data compression page
|
||||
/// <summary>
|
||||
/// Data compression page
|
||||
/// Page code 0x0F
|
||||
/// 16 bytes in SSC-1, SSC-2, SSC-3
|
||||
/// Data compression page
|
||||
/// Page code 0x0F
|
||||
/// 16 bytes in SSC-1, SSC-2, SSC-3
|
||||
/// </summary>
|
||||
public struct ModePage_0F
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// Data compression enabled
|
||||
/// Data compression enabled
|
||||
/// </summary>
|
||||
public bool DCE;
|
||||
/// <summary>
|
||||
/// Data compression capable
|
||||
/// Data compression capable
|
||||
/// </summary>
|
||||
public bool DCC;
|
||||
/// <summary>
|
||||
/// Data decompression enabled
|
||||
/// Data decompression enabled
|
||||
/// </summary>
|
||||
public bool DDE;
|
||||
/// <summary>
|
||||
/// Report exception on decompression
|
||||
/// Report exception on decompression
|
||||
/// </summary>
|
||||
public byte RED;
|
||||
/// <summary>
|
||||
/// Compression algorithm
|
||||
/// Compression algorithm
|
||||
/// </summary>
|
||||
public uint CompressionAlgo;
|
||||
/// <summary>
|
||||
/// Decompression algorithm
|
||||
/// Decompression algorithm
|
||||
/// </summary>
|
||||
public uint DecompressionAlgo;
|
||||
}
|
||||
|
||||
@@ -42,34 +42,34 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
#region Mode Page 0x10: XOR control mode page
|
||||
/// <summary>
|
||||
/// XOR control mode page
|
||||
/// Page code 0x10
|
||||
/// 24 bytes in SBC-1, SBC-2
|
||||
/// XOR control mode page
|
||||
/// Page code 0x10
|
||||
/// 24 bytes in SBC-1, SBC-2
|
||||
/// </summary>
|
||||
public struct ModePage_10
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// Disables XOR operations
|
||||
/// Disables XOR operations
|
||||
/// </summary>
|
||||
public bool XORDIS;
|
||||
/// <summary>
|
||||
/// Maximum transfer length in blocks for a XOR command
|
||||
/// Maximum transfer length in blocks for a XOR command
|
||||
/// </summary>
|
||||
public uint MaxXorWrite;
|
||||
/// <summary>
|
||||
/// Maximum regenerate length in blocks
|
||||
/// Maximum regenerate length in blocks
|
||||
/// </summary>
|
||||
public uint MaxRegenSize;
|
||||
/// <summary>
|
||||
/// Maximum transfer length in blocks for READ during a rebuild
|
||||
/// Maximum transfer length in blocks for READ during a rebuild
|
||||
/// </summary>
|
||||
public uint MaxRebuildRead;
|
||||
/// <summary>
|
||||
/// Minimum time in ms between READs during a rebuild
|
||||
/// Minimum time in ms between READs during a rebuild
|
||||
/// </summary>
|
||||
public ushort RebuildDelay;
|
||||
}
|
||||
|
||||
@@ -40,113 +40,113 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
{
|
||||
#region Mode Page 0x10: Device configuration page
|
||||
#region Mode Page 0x10: Device configuration page
|
||||
/// <summary>
|
||||
/// Device configuration page
|
||||
/// Page code 0x10
|
||||
/// 16 bytes in SCSI-2, SSC-1, SSC-2, SSC-3
|
||||
/// Device configuration page
|
||||
/// Page code 0x10
|
||||
/// 16 bytes in SCSI-2, SSC-1, SSC-2, SSC-3
|
||||
/// </summary>
|
||||
public struct ModePage_10_SSC
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <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>
|
||||
public bool CAP;
|
||||
/// <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>
|
||||
public bool CAF;
|
||||
/// <summary>
|
||||
/// Active format, vendor-specific
|
||||
/// Active format, vendor-specific
|
||||
/// </summary>
|
||||
public byte ActiveFormat;
|
||||
/// <summary>
|
||||
/// Current logical partition
|
||||
/// Current logical partition
|
||||
/// </summary>
|
||||
public byte ActivePartition;
|
||||
/// <summary>
|
||||
/// How full the buffer shall be before writing to medium
|
||||
/// How full the buffer shall be before writing to medium
|
||||
/// </summary>
|
||||
public byte WriteBufferFullRatio;
|
||||
/// <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>
|
||||
public byte ReadBufferEmptyRatio;
|
||||
/// <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>
|
||||
public ushort WriteDelayTime;
|
||||
/// <summary>
|
||||
/// Drive supports recovering data from buffer
|
||||
/// Drive supports recovering data from buffer
|
||||
/// </summary>
|
||||
public bool DBR;
|
||||
/// <summary>
|
||||
/// Medium has block IDs
|
||||
/// Medium has block IDs
|
||||
/// </summary>
|
||||
public bool BIS;
|
||||
/// <summary>
|
||||
/// Drive recognizes and reports setmarks
|
||||
/// Drive recognizes and reports setmarks
|
||||
/// </summary>
|
||||
public bool RSmk;
|
||||
/// <summary>
|
||||
/// Drive selects best speed
|
||||
/// Drive selects best speed
|
||||
/// </summary>
|
||||
public bool AVC;
|
||||
/// <summary>
|
||||
/// If drive should stop pre-reading on filemarks
|
||||
/// If drive should stop pre-reading on filemarks
|
||||
/// </summary>
|
||||
public byte SOCF;
|
||||
/// <summary>
|
||||
/// If set, recovered buffer data is LIFO, otherwise, FIFO
|
||||
/// If set, recovered buffer data is LIFO, otherwise, FIFO
|
||||
/// </summary>
|
||||
public bool RBO;
|
||||
/// <summary>
|
||||
/// Report early warnings
|
||||
/// Report early warnings
|
||||
/// </summary>
|
||||
public bool REW;
|
||||
/// <summary>
|
||||
/// Inter-block gap
|
||||
/// Inter-block gap
|
||||
/// </summary>
|
||||
public byte GapSize;
|
||||
/// <summary>
|
||||
/// End-of-Data format
|
||||
/// End-of-Data format
|
||||
/// </summary>
|
||||
public byte EODDefined;
|
||||
/// <summary>
|
||||
/// EOD generation enabled
|
||||
/// EOD generation enabled
|
||||
/// </summary>
|
||||
public bool EEG;
|
||||
/// <summary>
|
||||
/// Synchronize data to medium on early warning
|
||||
/// Synchronize data to medium on early warning
|
||||
/// </summary>
|
||||
public bool SEW;
|
||||
/// <summary>
|
||||
/// Bytes to reduce buffer size on early warning
|
||||
/// Bytes to reduce buffer size on early warning
|
||||
/// </summary>
|
||||
public uint BufferSizeEarlyWarning;
|
||||
/// <summary>
|
||||
/// Selected data compression algorithm
|
||||
/// Selected data compression algorithm
|
||||
/// </summary>
|
||||
public byte SelectedCompression;
|
||||
|
||||
/// <summary>
|
||||
/// Soft write protect
|
||||
/// Soft write protect
|
||||
/// </summary>
|
||||
public bool SWP;
|
||||
/// <summary>
|
||||
/// Associated write protect
|
||||
/// Associated write protect
|
||||
/// </summary>
|
||||
public bool ASOCWP;
|
||||
/// <summary>
|
||||
/// Persistent write protect
|
||||
/// Persistent write protect
|
||||
/// </summary>
|
||||
public bool PERSWP;
|
||||
/// <summary>
|
||||
/// Permanent write protect
|
||||
/// Permanent write protect
|
||||
/// </summary>
|
||||
public bool PRMWP;
|
||||
|
||||
@@ -155,11 +155,11 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public byte RewindOnReset;
|
||||
|
||||
/// <summary>
|
||||
/// How drive shall respond to detection of compromised WORM medium integrity
|
||||
/// How drive shall respond to detection of compromised WORM medium integrity
|
||||
/// </summary>
|
||||
public byte WTRE;
|
||||
/// <summary>
|
||||
/// Respond to commands only if a reservation exists
|
||||
/// Respond to commands only if a reservation exists
|
||||
/// </summary>
|
||||
public bool OIR;
|
||||
}
|
||||
|
||||
@@ -45,19 +45,19 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public enum PartitionSizeUnitOfMeasures : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Partition size is measures in bytes
|
||||
/// Partition size is measures in bytes
|
||||
/// </summary>
|
||||
Bytes = 0,
|
||||
/// <summary>
|
||||
/// Partition size is measures in Kilobytes
|
||||
/// Partition size is measures in Kilobytes
|
||||
/// </summary>
|
||||
Kilobytes = 1,
|
||||
/// <summary>
|
||||
/// Partition size is measures in Megabytes
|
||||
/// Partition size is measures in Megabytes
|
||||
/// </summary>
|
||||
Megabytes = 2,
|
||||
/// <summary>
|
||||
/// Partition size is 10eUNITS bytes
|
||||
/// Partition size is 10eUNITS bytes
|
||||
/// </summary>
|
||||
Exponential = 3
|
||||
}
|
||||
@@ -65,67 +65,67 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public enum MediumFormatRecognitionValues : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Logical unit is incapable of format or partition recognition
|
||||
/// Logical unit is incapable of format or partition recognition
|
||||
/// </summary>
|
||||
Incapable = 0,
|
||||
/// <summary>
|
||||
/// Logical unit is capable of format recognition only
|
||||
/// Logical unit is capable of format recognition only
|
||||
/// </summary>
|
||||
FormatCapable = 1,
|
||||
/// <summary>
|
||||
/// Logical unit is capable of partition recognition only
|
||||
/// Logical unit is capable of partition recognition only
|
||||
/// </summary>
|
||||
PartitionCapable = 2,
|
||||
/// <summary>
|
||||
/// Logical unit is capable of both format and partition recognition
|
||||
/// Logical unit is capable of both format and partition recognition
|
||||
/// </summary>
|
||||
Capable = 3
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Medium partition page(1)
|
||||
/// Page code 0x11
|
||||
/// Medium partition page(1)
|
||||
/// Page code 0x11
|
||||
/// </summary>
|
||||
public struct ModePage_11
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// Maximum number of additional partitions supported
|
||||
/// Maximum number of additional partitions supported
|
||||
/// </summary>
|
||||
public byte MaxAdditionalPartitions;
|
||||
/// <summary>
|
||||
/// Number of additional partitions to be defined for a volume
|
||||
/// Number of additional partitions to be defined for a volume
|
||||
/// </summary>
|
||||
public byte AdditionalPartitionsDefined;
|
||||
/// <summary>
|
||||
/// Device defines partitions based on its fixed definition
|
||||
/// Device defines partitions based on its fixed definition
|
||||
/// </summary>
|
||||
public bool FDP;
|
||||
/// <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>
|
||||
public bool SDP;
|
||||
/// <summary>
|
||||
/// Initiator defines number and size of partitions
|
||||
/// Initiator defines number and size of partitions
|
||||
/// </summary>
|
||||
public bool IDP;
|
||||
/// <summary>
|
||||
/// Defines the unit on which the partition sizes are defined
|
||||
/// Defines the unit on which the partition sizes are defined
|
||||
/// </summary>
|
||||
public PartitionSizeUnitOfMeasures PSUM;
|
||||
public bool POFM;
|
||||
public bool CLEAR;
|
||||
public bool ADDP;
|
||||
/// <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>
|
||||
public MediumFormatRecognitionValues MediumFormatRecognition;
|
||||
public byte PartitionUnits;
|
||||
/// <summary>
|
||||
/// Array of partition sizes in units defined above
|
||||
/// Array of partition sizes in units defined above
|
||||
/// </summary>
|
||||
public ushort[] PartitionSizes;
|
||||
}
|
||||
@@ -196,8 +196,7 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
sb.AppendLine("\tDevice shall erase all partitions on MODE SELECT for partitioning");
|
||||
else if(!page.CLEAR)
|
||||
sb.AppendLine("\tDevice shall not erase any partition on MODE SELECT for partitioning");
|
||||
else
|
||||
sb.AppendLine("\tDevice shall erase all partitions differing on size on MODE SELECT for partitioning");
|
||||
else sb.AppendLine("\tDevice shall erase all partitions differing on size on MODE SELECT for partitioning");
|
||||
|
||||
string measure;
|
||||
|
||||
|
||||
@@ -42,17 +42,17 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
#region Mode Pages 0x12, 0x13, 0x14: Medium partition page (2-4)
|
||||
/// <summary>
|
||||
/// Medium partition page (2-4)
|
||||
/// Page codes 0x12, 0x13 and 0x14
|
||||
/// Medium partition page (2-4)
|
||||
/// Page codes 0x12, 0x13 and 0x14
|
||||
/// </summary>
|
||||
public struct ModePage_12_13_14
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// Array of partition sizes in units defined in mode page 11
|
||||
/// Array of partition sizes in units defined in mode page 11
|
||||
/// </summary>
|
||||
public ushort[] PartitionSizes;
|
||||
}
|
||||
|
||||
@@ -42,60 +42,60 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
#region Mode Page 0x1A: Power condition page
|
||||
/// <summary>
|
||||
/// Power condition page
|
||||
/// Page code 0x1A
|
||||
/// 12 bytes in SPC-1, SPC-2, SPC-3, SPC-4
|
||||
/// 40 bytes in SPC-5
|
||||
/// Power condition page
|
||||
/// Page code 0x1A
|
||||
/// 12 bytes in SPC-1, SPC-2, SPC-3, SPC-4
|
||||
/// 40 bytes in SPC-5
|
||||
/// </summary>
|
||||
public struct ModePage_1A
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// Idle timer activated
|
||||
/// Idle timer activated
|
||||
/// </summary>
|
||||
public bool Idle;
|
||||
/// <summary>
|
||||
/// Standby timer activated
|
||||
/// Standby timer activated
|
||||
/// </summary>
|
||||
public bool Standby;
|
||||
/// <summary>
|
||||
/// Idle timer
|
||||
/// Idle timer
|
||||
/// </summary>
|
||||
public uint IdleTimer;
|
||||
/// <summary>
|
||||
/// Standby timer
|
||||
/// Standby timer
|
||||
/// </summary>
|
||||
public uint StandbyTimer;
|
||||
|
||||
/// <summary>
|
||||
/// Interactions between background functions and power management
|
||||
/// Interactions between background functions and power management
|
||||
/// </summary>
|
||||
public byte PM_BG_Precedence;
|
||||
/// <summary>
|
||||
/// Standby timer Y activated
|
||||
/// Standby timer Y activated
|
||||
/// </summary>
|
||||
public bool Standby_Y;
|
||||
/// <summary>
|
||||
/// Idle timer B activated
|
||||
/// Idle timer B activated
|
||||
/// </summary>
|
||||
public bool Idle_B;
|
||||
/// <summary>
|
||||
/// Idle timer C activated
|
||||
/// Idle timer C activated
|
||||
/// </summary>
|
||||
public bool Idle_C;
|
||||
/// <summary>
|
||||
/// Idle timer B
|
||||
/// Idle timer B
|
||||
/// </summary>
|
||||
public uint IdleTimer_B;
|
||||
/// <summary>
|
||||
/// Idle timer C
|
||||
/// Idle timer C
|
||||
/// </summary>
|
||||
public uint IdleTimer_C;
|
||||
/// <summary>
|
||||
/// Standby timer Y
|
||||
/// Standby timer Y
|
||||
/// </summary>
|
||||
public uint StandbyTimer_Y;
|
||||
public byte CCF_Idle;
|
||||
@@ -200,23 +200,23 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
|
||||
#region Mode Page 0x1A subpage 0x01: Power Consumption mode page
|
||||
/// <summary>
|
||||
/// Power Consumption mode page
|
||||
/// Page code 0x1A
|
||||
/// Subpage code 0x01
|
||||
/// 16 bytes in SPC-5
|
||||
/// Power Consumption mode page
|
||||
/// Page code 0x1A
|
||||
/// Subpage code 0x01
|
||||
/// 16 bytes in SPC-5
|
||||
/// </summary>
|
||||
public struct ModePage_1A_S01
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// Active power level
|
||||
/// Active power level
|
||||
/// </summary>
|
||||
public byte ActiveLevel;
|
||||
/// <summary>
|
||||
/// Power Consumption VPD identifier in use
|
||||
/// Power Consumption VPD identifier in use
|
||||
/// </summary>
|
||||
public byte PowerConsumptionIdentifier;
|
||||
}
|
||||
|
||||
@@ -42,34 +42,34 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
#region Mode Page 0x1B: Removable Block Access Capabilities page
|
||||
/// <summary>
|
||||
/// Removable Block Access Capabilities page
|
||||
/// Page code 0x1B
|
||||
/// 12 bytes in INF-8070
|
||||
/// Removable Block Access Capabilities page
|
||||
/// Page code 0x1B
|
||||
/// 12 bytes in INF-8070
|
||||
/// </summary>
|
||||
public struct ModePage_1B
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// Supports reporting progress of format
|
||||
/// Supports reporting progress of format
|
||||
/// </summary>
|
||||
public bool SRFP;
|
||||
/// <summary>
|
||||
/// Non-CD Optical Device
|
||||
/// Non-CD Optical Device
|
||||
/// </summary>
|
||||
public bool NCD;
|
||||
/// <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>
|
||||
public bool SML;
|
||||
/// <summary>
|
||||
/// Total number of LUNs
|
||||
/// Total number of LUNs
|
||||
/// </summary>
|
||||
public byte TLUN;
|
||||
/// <summary>
|
||||
/// System Floppy Type device
|
||||
/// System Floppy Type device
|
||||
/// </summary>
|
||||
public bool SFLP;
|
||||
}
|
||||
|
||||
@@ -42,56 +42,56 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
#region Mode Page 0x1C: Informational exceptions control page
|
||||
/// <summary>
|
||||
/// Informational exceptions control page
|
||||
/// Page code 0x1C
|
||||
/// 12 bytes in SPC-1, SPC-2, SPC-3, SPC-4
|
||||
/// Informational exceptions control page
|
||||
/// Page code 0x1C
|
||||
/// 12 bytes in SPC-1, SPC-2, SPC-3, SPC-4
|
||||
/// </summary>
|
||||
public struct ModePage_1C
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// Informational exception operations should not affect performance
|
||||
/// Informational exception operations should not affect performance
|
||||
/// </summary>
|
||||
public bool Perf;
|
||||
/// <summary>
|
||||
/// Disable informational exception operations
|
||||
/// Disable informational exception operations
|
||||
/// </summary>
|
||||
public bool DExcpt;
|
||||
/// <summary>
|
||||
/// Create a test device failure at next interval time
|
||||
/// Create a test device failure at next interval time
|
||||
/// </summary>
|
||||
public bool Test;
|
||||
/// <summary>
|
||||
/// Log informational exception conditions
|
||||
/// Log informational exception conditions
|
||||
/// </summary>
|
||||
public bool LogErr;
|
||||
/// <summary>
|
||||
/// Method of reporting informational exceptions
|
||||
/// Method of reporting informational exceptions
|
||||
/// </summary>
|
||||
public byte MRIE;
|
||||
/// <summary>
|
||||
/// 100 ms period to report an informational exception condition
|
||||
/// 100 ms period to report an informational exception condition
|
||||
/// </summary>
|
||||
public uint IntervalTimer;
|
||||
/// <summary>
|
||||
/// How many times to report informational exceptions
|
||||
/// How many times to report informational exceptions
|
||||
/// </summary>
|
||||
public uint ReportCount;
|
||||
|
||||
/// <summary>
|
||||
/// Enable background functions
|
||||
/// Enable background functions
|
||||
/// </summary>
|
||||
public bool EBF;
|
||||
/// <summary>
|
||||
/// Warning reporting enabled
|
||||
/// Warning reporting enabled
|
||||
/// </summary>
|
||||
public bool EWasc;
|
||||
|
||||
/// <summary>
|
||||
/// Enable reporting of background self-test errors
|
||||
/// Enable reporting of background self-test errors
|
||||
/// </summary>
|
||||
public bool EBACKERR;
|
||||
}
|
||||
@@ -204,47 +204,47 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
|
||||
#region Mode Page 0x1C subpage 0x01: Background Control mode page
|
||||
/// <summary>
|
||||
/// Background Control mode page
|
||||
/// Page code 0x1A
|
||||
/// Subpage code 0x01
|
||||
/// 16 bytes in SPC-5
|
||||
/// Background Control mode page
|
||||
/// Page code 0x1A
|
||||
/// Subpage code 0x01
|
||||
/// 16 bytes in SPC-5
|
||||
/// </summary>
|
||||
public struct ModePage_1C_S01
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// Suspend on log full
|
||||
/// Suspend on log full
|
||||
/// </summary>
|
||||
public bool S_L_Full;
|
||||
/// <summary>
|
||||
/// Log only when intervention required
|
||||
/// Log only when intervention required
|
||||
/// </summary>
|
||||
public bool LOWIR;
|
||||
/// <summary>
|
||||
/// Enable background medium scan
|
||||
/// Enable background medium scan
|
||||
/// </summary>
|
||||
public bool En_Bms;
|
||||
/// <summary>
|
||||
/// Enable background pre-scan
|
||||
/// Enable background pre-scan
|
||||
/// </summary>
|
||||
public bool En_Ps;
|
||||
/// <summary>
|
||||
/// Time in hours between background medium scans
|
||||
/// Time in hours between background medium scans
|
||||
/// </summary>
|
||||
public ushort BackgroundScanInterval;
|
||||
/// <summary>
|
||||
/// Maximum time in hours for a background pre-scan to complete
|
||||
/// Maximum time in hours for a background pre-scan to complete
|
||||
/// </summary>
|
||||
public ushort BackgroundPrescanTimeLimit;
|
||||
/// <summary>
|
||||
/// Minimum time in ms being idle before resuming a background scan
|
||||
/// Minimum time in ms being idle before resuming a background scan
|
||||
/// </summary>
|
||||
public ushort MinIdleBeforeBgScan;
|
||||
/// <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>
|
||||
public ushort MaxTimeSuspendBgScan;
|
||||
}
|
||||
|
||||
@@ -42,26 +42,26 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
#region Mode Page 0x1C: Timer & Protect page
|
||||
/// <summary>
|
||||
/// Timer & Protect page
|
||||
/// Page code 0x1C
|
||||
/// 8 bytes in INF-8070
|
||||
/// Timer & Protect page
|
||||
/// Page code 0x1C
|
||||
/// 8 bytes in INF-8070
|
||||
/// </summary>
|
||||
public struct ModePage_1C_SFF
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <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>
|
||||
public byte InactivityTimeMultiplier;
|
||||
/// <summary>
|
||||
/// Disabled until power cycle
|
||||
/// Disabled until power cycle
|
||||
/// </summary>
|
||||
public bool DISP;
|
||||
/// <summary>
|
||||
/// Software Write Protect until Power-down
|
||||
/// Software Write Protect until Power-down
|
||||
/// </summary>
|
||||
public bool SWPP;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public struct ModePage_1D
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
public bool WORMM;
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public struct Certance_ModePage_21
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
public byte OperatingSystemsSupport;
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public struct Certance_ModePage_22
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
public byte BaudRate;
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public struct IBM_ModePage_24
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
public byte ModeControl;
|
||||
|
||||
@@ -44,106 +44,106 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
{
|
||||
#region Mode Page 0x2A: CD-ROM capabilities page
|
||||
/// <summary>
|
||||
/// CD-ROM capabilities page
|
||||
/// Page code 0x2A
|
||||
/// 16 bytes in OB-U0077C
|
||||
/// 20 bytes in SFF-8020i
|
||||
/// 22 bytes in MMC-1
|
||||
/// 26 bytes in MMC-2
|
||||
/// Variable bytes in MMC-3
|
||||
/// CD-ROM capabilities page
|
||||
/// Page code 0x2A
|
||||
/// 16 bytes in OB-U0077C
|
||||
/// 20 bytes in SFF-8020i
|
||||
/// 22 bytes in MMC-1
|
||||
/// 26 bytes in MMC-2
|
||||
/// Variable bytes in MMC-3
|
||||
/// </summary>
|
||||
public struct ModePage_2A
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// Drive supports multi-session and/or Photo-CD
|
||||
/// Drive supports multi-session and/or Photo-CD
|
||||
/// </summary>
|
||||
public bool MultiSession;
|
||||
/// <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>
|
||||
public bool Mode2Form2;
|
||||
/// <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>
|
||||
public bool Mode2Form1;
|
||||
/// <summary>
|
||||
/// Drive is capable of playing audio
|
||||
/// Drive is capable of playing audio
|
||||
/// </summary>
|
||||
public bool AudioPlay;
|
||||
/// <summary>
|
||||
/// Drive can return the ISRC
|
||||
/// Drive can return the ISRC
|
||||
/// </summary>
|
||||
public bool ISRC;
|
||||
/// <summary>
|
||||
/// Drive can return the media catalogue number
|
||||
/// Drive can return the media catalogue number
|
||||
/// </summary>
|
||||
public bool UPC;
|
||||
/// <summary>
|
||||
/// Drive can return C2 pointers
|
||||
/// Drive can return C2 pointers
|
||||
/// </summary>
|
||||
public bool C2Pointer;
|
||||
/// <summary>
|
||||
/// Drive can read, deinterlave and correct R-W subchannels
|
||||
/// Drive can read, deinterlave and correct R-W subchannels
|
||||
/// </summary>
|
||||
public bool DeinterlaveSubchannel;
|
||||
/// <summary>
|
||||
/// Drive can read interleaved and uncorrected R-W subchannels
|
||||
/// Drive can read interleaved and uncorrected R-W subchannels
|
||||
/// </summary>
|
||||
public bool Subchannel;
|
||||
/// <summary>
|
||||
/// Drive can continue from a loss of streaming on audio reading
|
||||
/// Drive can continue from a loss of streaming on audio reading
|
||||
/// </summary>
|
||||
public bool AccurateCDDA;
|
||||
/// <summary>
|
||||
/// Audio can be read as digital data
|
||||
/// Audio can be read as digital data
|
||||
/// </summary>
|
||||
public bool CDDACommand;
|
||||
/// <summary>
|
||||
/// Loading Mechanism Type
|
||||
/// Loading Mechanism Type
|
||||
/// </summary>
|
||||
public byte LoadingMechanism;
|
||||
/// <summary>
|
||||
/// Drive can eject discs
|
||||
/// Drive can eject discs
|
||||
/// </summary>
|
||||
public bool Eject;
|
||||
/// <summary>
|
||||
/// Drive's optional prevent jumper status
|
||||
/// Drive's optional prevent jumper status
|
||||
/// </summary>
|
||||
public bool PreventJumper;
|
||||
/// <summary>
|
||||
/// Current lock status
|
||||
/// Current lock status
|
||||
/// </summary>
|
||||
public bool LockState;
|
||||
/// <summary>
|
||||
/// Drive can lock media
|
||||
/// Drive can lock media
|
||||
/// </summary>
|
||||
public bool Lock;
|
||||
/// <summary>
|
||||
/// Each channel can be muted independently
|
||||
/// Each channel can be muted independently
|
||||
/// </summary>
|
||||
public bool SeparateChannelMute;
|
||||
/// <summary>
|
||||
/// Each channel's volume can be controlled independently
|
||||
/// Each channel's volume can be controlled independently
|
||||
/// </summary>
|
||||
public bool SeparateChannelVolume;
|
||||
/// <summary>
|
||||
/// Maximum drive speed in Kbytes/second
|
||||
/// Maximum drive speed in Kbytes/second
|
||||
/// </summary>
|
||||
public ushort MaximumSpeed;
|
||||
/// <summary>
|
||||
/// Supported volume levels
|
||||
/// Supported volume levels
|
||||
/// </summary>
|
||||
public ushort SupportedVolumeLevels;
|
||||
/// <summary>
|
||||
/// Buffer size in Kbytes
|
||||
/// Buffer size in Kbytes
|
||||
/// </summary>
|
||||
public ushort BufferSize;
|
||||
/// <summary>
|
||||
/// Current drive speed in Kbytes/second
|
||||
/// Current drive speed in Kbytes/second
|
||||
/// </summary>
|
||||
public ushort CurrentSpeed;
|
||||
|
||||
@@ -283,13 +283,11 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
decoded.WriteSpeedPerformanceDescriptors = new ModePage_2A_WriteDescriptor[descriptors];
|
||||
|
||||
for(int i = 0; i < descriptors; i++)
|
||||
{
|
||||
decoded.WriteSpeedPerformanceDescriptors[i] = new ModePage_2A_WriteDescriptor
|
||||
{
|
||||
{
|
||||
RotationControl = (byte)(pageResponse[1 + 32 + i * 4] & 0x07),
|
||||
WriteSpeed = (ushort)((pageResponse[2 + 32 + i * 4] << 8) + pageResponse[3 + 32 + i * 4])
|
||||
};
|
||||
}
|
||||
|
||||
return decoded;
|
||||
}
|
||||
@@ -355,11 +353,9 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
: "\tDrive is not locked, media can be ejected and inserted");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendLine(page.LockState
|
||||
? "\tDrive is locked, media cannot be ejected, but if empty, can be inserted"
|
||||
: "\tDrive is not locked, media can be ejected and inserted");
|
||||
}
|
||||
if(page.Eject) sb.AppendLine("\tDrive can eject media");
|
||||
|
||||
if(page.SeparateChannelMute) sb.AppendLine("\tEach channel can be muted independently");
|
||||
@@ -414,9 +410,11 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
}
|
||||
|
||||
if(page.WriteSpeedPerformanceDescriptors != null)
|
||||
foreach(ModePage_2A_WriteDescriptor descriptor in page.WriteSpeedPerformanceDescriptors.Where(descriptor => descriptor.WriteSpeed > 0)) if(descriptor.RotationControl == 0)
|
||||
sb.AppendFormat("\tDrive supports writing at {0} Kbyte/sec. in CLV mode",
|
||||
descriptor.WriteSpeed).AppendLine();
|
||||
foreach(ModePage_2A_WriteDescriptor descriptor in
|
||||
page.WriteSpeedPerformanceDescriptors.Where(descriptor => descriptor.WriteSpeed > 0))
|
||||
if(descriptor.RotationControl == 0)
|
||||
sb.AppendFormat("\tDrive supports writing at {0} Kbyte/sec. in CLV mode", descriptor.WriteSpeed)
|
||||
.AppendLine();
|
||||
else if(descriptor.RotationControl == 1)
|
||||
sb.AppendFormat("\tDrive supports writing at is {0} Kbyte/sec. in pure CAV mode",
|
||||
descriptor.WriteSpeed).AppendLine();
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public struct IBM_ModePage_2F
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
public byte FenceBehaviour;
|
||||
|
||||
@@ -41,28 +41,28 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
{
|
||||
#region Apple Mode Page 0x30: Apple OEM String
|
||||
static readonly byte[] AppleOEMString =
|
||||
{
|
||||
0x41, 0x50, 0x50, 0x4C, 0x45, 0x20, 0x43, 0x4F, 0x4D, 0x50, 0x55, 0x54, 0x45, 0x52, 0x2C, 0x20, 0x49, 0x4E,
|
||||
0x43, 0x2E
|
||||
};
|
||||
#region Apple Mode Page 0x30: Apple OEM String
|
||||
static readonly byte[] AppleOEMString =
|
||||
{
|
||||
0x41, 0x50, 0x50, 0x4C, 0x45, 0x20, 0x43, 0x4F, 0x4D, 0x50, 0x55, 0x54, 0x45, 0x52, 0x2C, 0x20, 0x49, 0x4E,
|
||||
0x43, 0x2E
|
||||
};
|
||||
|
||||
public static bool IsAppleModePage_30(byte[] pageResponse)
|
||||
{
|
||||
if((pageResponse?[0] & 0x40) == 0x40) return false;
|
||||
public static bool IsAppleModePage_30(byte[] pageResponse)
|
||||
{
|
||||
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];
|
||||
Array.Copy(pageResponse, 10, str, 0, 20);
|
||||
byte[] str = new byte[20];
|
||||
Array.Copy(pageResponse, 10, str, 0, 20);
|
||||
|
||||
return AppleOEMString.SequenceEqual(str);
|
||||
}
|
||||
#endregion Apple Mode Page 0x30: Apple OEM String
|
||||
return AppleOEMString.SequenceEqual(str);
|
||||
}
|
||||
#endregion Apple Mode Page 0x30: Apple OEM String
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public struct HP_ModePage_3B
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
public byte MSN;
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public struct HP_ModePage_3C
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
public bool LT;
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public struct HP_ModePage_3D
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
public byte ResetBehaviour;
|
||||
|
||||
@@ -40,54 +40,54 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
{
|
||||
#region IBM Mode Page 0x3D: Behaviour Configuration Mode page
|
||||
public struct IBM_ModePage_3D
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
public ushort NumberOfWraps;
|
||||
}
|
||||
#region IBM Mode Page 0x3D: Behaviour Configuration Mode page
|
||||
public struct IBM_ModePage_3D
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
public ushort NumberOfWraps;
|
||||
}
|
||||
|
||||
public static IBM_ModePage_3D? DecodeIBMModePage_3D(byte[] pageResponse)
|
||||
{
|
||||
if((pageResponse?[0] & 0x40) == 0x40) return null;
|
||||
public static IBM_ModePage_3D? DecodeIBMModePage_3D(byte[] pageResponse)
|
||||
{
|
||||
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.NumberOfWraps = (ushort)((pageResponse[3] << 8) + pageResponse[4]);
|
||||
decoded.PS |= (pageResponse[0] & 0x80) == 0x80;
|
||||
decoded.NumberOfWraps = (ushort)((pageResponse[3] << 8) + pageResponse[4]);
|
||||
|
||||
return decoded;
|
||||
}
|
||||
return decoded;
|
||||
}
|
||||
|
||||
public static string PrettifyIBMModePage_3D(byte[] pageResponse)
|
||||
{
|
||||
return PrettifyIBMModePage_3D(DecodeIBMModePage_3D(pageResponse));
|
||||
}
|
||||
public static string PrettifyIBMModePage_3D(byte[] pageResponse)
|
||||
{
|
||||
return PrettifyIBMModePage_3D(DecodeIBMModePage_3D(pageResponse));
|
||||
}
|
||||
|
||||
public static string PrettifyIBMModePage_3D(IBM_ModePage_3D? modePage)
|
||||
{
|
||||
if(!modePage.HasValue) return null;
|
||||
public static string PrettifyIBMModePage_3D(IBM_ModePage_3D? modePage)
|
||||
{
|
||||
if(!modePage.HasValue) return null;
|
||||
|
||||
IBM_ModePage_3D page = modePage.Value;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
IBM_ModePage_3D page = modePage.Value;
|
||||
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();
|
||||
}
|
||||
#endregion IBM Mode Page 0x3D: Behaviour Configuration Mode page
|
||||
return sb.ToString();
|
||||
}
|
||||
#endregion IBM Mode Page 0x3D: Behaviour Configuration Mode page
|
||||
}
|
||||
}
|
||||
@@ -46,15 +46,15 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public enum Fujitsu_VerifyModes : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Always verify after writing
|
||||
/// Always verify after writing
|
||||
/// </summary>
|
||||
Always = 0,
|
||||
/// <summary>
|
||||
/// Never verify after writing
|
||||
/// Never verify after writing
|
||||
/// </summary>
|
||||
Never = 1,
|
||||
/// <summary>
|
||||
/// Verify after writing depending on condition
|
||||
/// Verify after writing depending on condition
|
||||
/// </summary>
|
||||
Depends = 2,
|
||||
Reserved = 4
|
||||
@@ -63,25 +63,25 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public struct Fujitsu_ModePage_3E
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
/// <summary>
|
||||
/// If set, AV data support mode is applied
|
||||
/// If set, AV data support mode is applied
|
||||
/// </summary>
|
||||
public bool audioVisualMode;
|
||||
/// <summary>
|
||||
/// If set the test write operation is restricted
|
||||
/// If set the test write operation is restricted
|
||||
/// </summary>
|
||||
public bool streamingMode;
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Verify mode for WRITE commands
|
||||
/// Verify mode for WRITE commands
|
||||
/// </summary>
|
||||
public Fujitsu_VerifyModes verifyMode;
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Device type provided in response to INQUIRY
|
||||
/// Device type provided in response to INQUIRY
|
||||
/// </summary>
|
||||
public PeripheralDeviceTypes devType;
|
||||
public byte[] Reserved3;
|
||||
|
||||
@@ -40,57 +40,59 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
{
|
||||
#region HP Mode Page 0x3E: CD-ROM Emulation/Disaster Recovery Mode page
|
||||
public struct HP_ModePage_3E
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
public bool NonAuto;
|
||||
public bool CDmode;
|
||||
}
|
||||
#region HP Mode Page 0x3E: CD-ROM Emulation/Disaster Recovery Mode page
|
||||
public struct HP_ModePage_3E
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters can be saved
|
||||
/// </summary>
|
||||
public bool PS;
|
||||
public bool NonAuto;
|
||||
public bool CDmode;
|
||||
}
|
||||
|
||||
public static HP_ModePage_3E? DecodeHPModePage_3E(byte[] pageResponse)
|
||||
{
|
||||
if((pageResponse?[0] & 0x40) == 0x40) return null;
|
||||
public static HP_ModePage_3E? DecodeHPModePage_3E(byte[] pageResponse)
|
||||
{
|
||||
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.NonAuto |= (pageResponse[2] & 0x02) == 0x02;
|
||||
decoded.CDmode |= (pageResponse[2] & 0x01) == 0x01;
|
||||
decoded.PS |= (pageResponse[0] & 0x80) == 0x80;
|
||||
decoded.NonAuto |= (pageResponse[2] & 0x02) == 0x02;
|
||||
decoded.CDmode |= (pageResponse[2] & 0x01) == 0x01;
|
||||
|
||||
return decoded;
|
||||
}
|
||||
return decoded;
|
||||
}
|
||||
|
||||
public static string PrettifyHPModePage_3E(byte[] pageResponse)
|
||||
{
|
||||
return PrettifyHPModePage_3E(DecodeHPModePage_3E(pageResponse));
|
||||
}
|
||||
public static string PrettifyHPModePage_3E(byte[] pageResponse)
|
||||
{
|
||||
return PrettifyHPModePage_3E(DecodeHPModePage_3E(pageResponse));
|
||||
}
|
||||
|
||||
public static string PrettifyHPModePage_3E(HP_ModePage_3E? modePage)
|
||||
{
|
||||
if(!modePage.HasValue) return null;
|
||||
public static string PrettifyHPModePage_3E(HP_ModePage_3E? modePage)
|
||||
{
|
||||
if(!modePage.HasValue) return null;
|
||||
|
||||
HP_ModePage_3E page = modePage.Value;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
HP_ModePage_3E page = modePage.Value;
|
||||
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");
|
||||
if(page.NonAuto) sb.AppendLine("\tDrive will not exit emulation automatically");
|
||||
sb.AppendLine(page.CDmode
|
||||
? "\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();
|
||||
}
|
||||
#endregion HP Mode Page 0x3E: CD-ROM Emulation/Disaster Recovery Mode page
|
||||
return sb.ToString();
|
||||
}
|
||||
#endregion HP Mode Page 0x3E: CD-ROM Emulation/Disaster Recovery Mode page
|
||||
}
|
||||
}
|
||||
@@ -146,13 +146,12 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
else
|
||||
sb.AppendFormat("\t{0} blocks have {1} and are {2} bytes each", descriptor.Blocks,
|
||||
density, descriptor.BlockLength).AppendLine();
|
||||
else if(descriptor.Blocks == 0)
|
||||
sb.AppendFormat("\tAll remaining blocks are {0} bytes each", descriptor.BlockLength)
|
||||
.AppendLine();
|
||||
else
|
||||
if(descriptor.Blocks == 0)
|
||||
sb.AppendFormat("\tAll remaining blocks are {0} bytes each", descriptor.BlockLength)
|
||||
.AppendLine();
|
||||
else
|
||||
sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
|
||||
descriptor.BlockLength).AppendLine();
|
||||
sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
|
||||
descriptor.BlockLength).AppendLine();
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -1421,28 +1420,23 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
else
|
||||
sb.AppendFormat("\tAll remaining blocks conform to {0} and are {1} bytes each",
|
||||
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
|
||||
if(descriptor.BlockLength == 0)
|
||||
sb.AppendFormat("\t{0} blocks conform to {1} and have a variable length",
|
||||
descriptor.Blocks, density).AppendLine();
|
||||
else
|
||||
sb.AppendFormat("\t{0} blocks conform to {1} and are {2} bytes each",
|
||||
descriptor.Blocks, density, descriptor.BlockLength)
|
||||
.AppendLine();
|
||||
sb.AppendFormat("\t{0} blocks conform to {1} and are {2} bytes each",
|
||||
descriptor.Blocks, density, descriptor.BlockLength).AppendLine();
|
||||
else if(descriptor.Blocks == 0)
|
||||
if(descriptor.BlockLength == 0)
|
||||
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
|
||||
if(descriptor.Blocks == 0)
|
||||
if(descriptor.BlockLength == 0)
|
||||
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();
|
||||
sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
|
||||
descriptor.BlockLength).AppendLine();
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -1563,28 +1557,23 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
else
|
||||
sb.AppendFormat("\tAll remaining blocks are {0} and are {1} bytes each",
|
||||
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
|
||||
if(descriptor.BlockLength == 0)
|
||||
sb.AppendFormat("\t{0} blocks are {1} and have a variable length",
|
||||
descriptor.Blocks, density).AppendLine();
|
||||
else
|
||||
sb.AppendFormat("\t{0} blocks are {1} and are {2} bytes each",
|
||||
descriptor.Blocks, density, descriptor.BlockLength)
|
||||
.AppendLine();
|
||||
sb.AppendFormat("\t{0} blocks are {1} and are {2} bytes each", descriptor.Blocks,
|
||||
density, descriptor.BlockLength).AppendLine();
|
||||
else if(descriptor.Blocks == 0)
|
||||
if(descriptor.BlockLength == 0)
|
||||
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
|
||||
if(descriptor.Blocks == 0)
|
||||
if(descriptor.BlockLength == 0)
|
||||
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();
|
||||
sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
|
||||
descriptor.BlockLength).AppendLine();
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -1758,13 +1747,12 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
else
|
||||
sb.AppendFormat("\t{0} blocks have {1} and are {2} bytes each", descriptor.Blocks,
|
||||
density, descriptor.BlockLength).AppendLine();
|
||||
else if(descriptor.Blocks == 0)
|
||||
sb.AppendFormat("\tAll remaining blocks are {0} bytes each", descriptor.BlockLength)
|
||||
.AppendLine();
|
||||
else
|
||||
if(descriptor.Blocks == 0)
|
||||
sb.AppendFormat("\tAll remaining blocks are {0} bytes each", descriptor.BlockLength)
|
||||
.AppendLine();
|
||||
else
|
||||
sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
|
||||
descriptor.BlockLength).AppendLine();
|
||||
sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
|
||||
descriptor.BlockLength).AppendLine();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -103,7 +103,8 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
}
|
||||
}
|
||||
|
||||
switch(deviceType) {
|
||||
switch(deviceType)
|
||||
{
|
||||
case PeripheralDeviceTypes.DirectAccess:
|
||||
case PeripheralDeviceTypes.MultiMediaDevice:
|
||||
header.WriteProtected = (modeResponse[3] & 0x80) == 0x80;
|
||||
@@ -114,7 +115,8 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
header.Speed = (byte)(modeResponse[3] & 0x0F);
|
||||
header.BufferedMode = (byte)((modeResponse[3] & 0x70) >> 4);
|
||||
break;
|
||||
case PeripheralDeviceTypes.PrinterDevice: header.BufferedMode = (byte)((modeResponse[3] & 0x70) >> 4);
|
||||
case PeripheralDeviceTypes.PrinterDevice:
|
||||
header.BufferedMode = (byte)((modeResponse[3] & 0x70) >> 4);
|
||||
break;
|
||||
case PeripheralDeviceTypes.OpticalDevice:
|
||||
header.WriteProtected = (modeResponse[3] & 0x80) == 0x80;
|
||||
@@ -200,17 +202,21 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
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;
|
||||
|
||||
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];
|
||||
|
||||
hdr[2] = (byte)header.MediumType;
|
||||
|
||||
switch(deviceType) {
|
||||
switch(deviceType)
|
||||
{
|
||||
case PeripheralDeviceTypes.DirectAccess:
|
||||
case PeripheralDeviceTypes.MultiMediaDevice:
|
||||
if(header.WriteProtected) hdr[3] += 0x80;
|
||||
@@ -221,7 +227,8 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
hdr[3] += (byte)(header.Speed & 0x0F);
|
||||
hdr[3] += (byte)((header.BufferedMode << 4) & 0x70);
|
||||
break;
|
||||
case PeripheralDeviceTypes.PrinterDevice: hdr[3] += (byte)((header.BufferedMode << 4) & 0x70);
|
||||
case PeripheralDeviceTypes.PrinterDevice:
|
||||
hdr[3] += (byte)((header.BufferedMode << 4) & 0x70);
|
||||
break;
|
||||
case PeripheralDeviceTypes.OpticalDevice:
|
||||
if(header.WriteProtected) hdr[3] += 0x80;
|
||||
|
||||
@@ -64,7 +64,8 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
}
|
||||
}
|
||||
|
||||
switch(deviceType) {
|
||||
switch(deviceType)
|
||||
{
|
||||
case PeripheralDeviceTypes.DirectAccess:
|
||||
case PeripheralDeviceTypes.MultiMediaDevice:
|
||||
header.WriteProtected = (modeResponse[2] & 0x80) == 0x80;
|
||||
@@ -75,7 +76,8 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
header.Speed = (byte)(modeResponse[2] & 0x0F);
|
||||
header.BufferedMode = (byte)((modeResponse[2] & 0x70) >> 4);
|
||||
break;
|
||||
case PeripheralDeviceTypes.PrinterDevice: header.BufferedMode = (byte)((modeResponse[2] & 0x70) >> 4);
|
||||
case PeripheralDeviceTypes.PrinterDevice:
|
||||
header.BufferedMode = (byte)((modeResponse[2] & 0x70) >> 4);
|
||||
break;
|
||||
case PeripheralDeviceTypes.OpticalDevice:
|
||||
header.WriteProtected = (modeResponse[2] & 0x80) == 0x80;
|
||||
@@ -160,11 +162,14 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
|
||||
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;
|
||||
|
||||
switch(deviceType) {
|
||||
switch(deviceType)
|
||||
{
|
||||
case PeripheralDeviceTypes.DirectAccess:
|
||||
case PeripheralDeviceTypes.MultiMediaDevice:
|
||||
if(header.WriteProtected) hdr[2] += 0x80;
|
||||
@@ -175,7 +180,8 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
hdr[2] += (byte)(header.Speed & 0x0F);
|
||||
hdr[2] += (byte)((header.BufferedMode << 4) & 0x70);
|
||||
break;
|
||||
case PeripheralDeviceTypes.PrinterDevice: hdr[2] += (byte)((header.BufferedMode << 4) & 0x70);
|
||||
case PeripheralDeviceTypes.PrinterDevice:
|
||||
hdr[2] += (byte)((header.BufferedMode << 4) & 0x70);
|
||||
break;
|
||||
case PeripheralDeviceTypes.OpticalDevice:
|
||||
if(header.WriteProtected) hdr[2] += 0x80;
|
||||
|
||||
@@ -44,15 +44,15 @@ namespace DiscImageChef.Decoders.SCSI.SSC
|
||||
public struct BlockLimitsData
|
||||
{
|
||||
/// <summary>
|
||||
/// All blocks size must be multiple of 2^<cref name="granularity"/>
|
||||
/// All blocks size must be multiple of 2^<cref name="granularity" />
|
||||
/// </summary>
|
||||
public byte granularity;
|
||||
/// <summary>
|
||||
/// Maximum block length in bytes
|
||||
/// Maximum block length in bytes
|
||||
/// </summary>
|
||||
public uint maxBlockLen;
|
||||
/// <summary>
|
||||
/// Minimum block length in bytes
|
||||
/// Minimum block length in bytes
|
||||
/// </summary>
|
||||
public ushort minBlockLen;
|
||||
}
|
||||
@@ -86,8 +86,7 @@ namespace DiscImageChef.Decoders.SCSI.SSC
|
||||
|
||||
if(decoded.Value.granularity > 0)
|
||||
sb.AppendFormat("Device's needs a block size granularity of 2^{0} ({1}) bytes",
|
||||
decoded.Value.granularity, Math.Pow(2, decoded.Value.granularity))
|
||||
.AppendLine();
|
||||
decoded.Value.granularity, Math.Pow(2, decoded.Value.granularity)).AppendLine();
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
|
||||
@@ -167,8 +167,7 @@ namespace DiscImageChef.Decoders.SCSI.SSC
|
||||
if(descriptor.duplicate) sb.AppendLine("\tThis descriptor is duplicated");
|
||||
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",
|
||||
descriptor.bpmm, descriptor.tracks, descriptor.width / (double)10)
|
||||
.AppendLine();
|
||||
descriptor.bpmm, descriptor.tracks, descriptor.width / (double)10).AppendLine();
|
||||
sb.AppendFormat("\tDensity maximum capacity is {0} megabytes", descriptor.capacity).AppendLine();
|
||||
sb.AppendFormat("\tDensity description: {0}", descriptor.description).AppendLine();
|
||||
sb.AppendLine();
|
||||
@@ -258,8 +257,8 @@ namespace DiscImageChef.Decoders.SCSI.SSC
|
||||
sb.AppendLine();
|
||||
}
|
||||
|
||||
sb.AppendFormat("\tMedium has a nominal length of {0} m in a {1} mm width tape",
|
||||
descriptor.length, descriptor.width / (double)10).AppendLine();
|
||||
sb.AppendFormat("\tMedium has a nominal length of {0} m in a {1} mm width tape", descriptor.length,
|
||||
descriptor.width / (double)10).AppendLine();
|
||||
sb.AppendFormat("\tMedium description: {0}", descriptor.description).AppendLine();
|
||||
sb.AppendLine();
|
||||
}
|
||||
|
||||
@@ -55,23 +55,23 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public struct StandardSense
|
||||
{
|
||||
/// <summary>
|
||||
/// If set, <see cref="LBA"/> is valid
|
||||
/// If set, <see cref="LBA" /> is valid
|
||||
/// </summary>
|
||||
public bool AddressValid;
|
||||
/// <summary>
|
||||
/// Error class, 0 to 6
|
||||
/// Error class, 0 to 6
|
||||
/// </summary>
|
||||
public byte ErrorClass;
|
||||
/// <summary>
|
||||
/// Error type
|
||||
/// Error type
|
||||
/// </summary>
|
||||
public byte ErrorType;
|
||||
/// <summary>
|
||||
/// Private usage
|
||||
/// Private usage
|
||||
/// </summary>
|
||||
public byte Private;
|
||||
/// <summary>
|
||||
/// LBA where error happened
|
||||
/// LBA where error happened
|
||||
/// </summary>
|
||||
public uint LBA;
|
||||
}
|
||||
@@ -79,67 +79,67 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public enum SenseKeys : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// No information to be reported, but bits should be checked
|
||||
/// No information to be reported, but bits should be checked
|
||||
/// </summary>
|
||||
NoSense = 0,
|
||||
/// <summary>
|
||||
/// Target performed some recovery to successfully complete last command
|
||||
/// Target performed some recovery to successfully complete last command
|
||||
/// </summary>
|
||||
RecoveredError = 1,
|
||||
/// <summary>
|
||||
/// Target is not ready
|
||||
/// Target is not ready
|
||||
/// </summary>
|
||||
NotReady = 2,
|
||||
/// <summary>
|
||||
/// Non-recoverable medium error occurred
|
||||
/// Non-recoverable medium error occurred
|
||||
/// </summary>
|
||||
MediumError = 3,
|
||||
/// <summary>
|
||||
/// Non-recoverable hardware error occurred
|
||||
/// Non-recoverable hardware error occurred
|
||||
/// </summary>
|
||||
HardwareError = 4,
|
||||
/// <summary>
|
||||
/// Target has received an illegal request
|
||||
/// Target has received an illegal request
|
||||
/// </summary>
|
||||
IllegalRequest = 5,
|
||||
/// <summary>
|
||||
/// Target requires initiator attention
|
||||
/// Target requires initiator attention
|
||||
/// </summary>
|
||||
UnitAttention = 6,
|
||||
/// <summary>
|
||||
/// A protected command has been denied
|
||||
/// A protected command has been denied
|
||||
/// </summary>
|
||||
DataProtect = 7,
|
||||
/// <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>
|
||||
BlankCheck = 8,
|
||||
/// <summary>
|
||||
/// For private/vendor usage
|
||||
/// For private/vendor usage
|
||||
/// </summary>
|
||||
PrivateUse = 9,
|
||||
/// <summary>
|
||||
/// COPY command aborted
|
||||
/// COPY command aborted
|
||||
/// </summary>
|
||||
CopyAborted = 0xA,
|
||||
/// <summary>
|
||||
/// Command aborted
|
||||
/// Command aborted
|
||||
/// </summary>
|
||||
AbortedCommand = 0xB,
|
||||
/// <summary>
|
||||
/// SEARCH command has been satisfied
|
||||
/// SEARCH command has been satisfied
|
||||
/// </summary>
|
||||
Equal = 0xC,
|
||||
/// <summary>
|
||||
/// End-of-medium reached with data remaining in buffer
|
||||
/// End-of-medium reached with data remaining in buffer
|
||||
/// </summary>
|
||||
VolumeOverflow = 0xD,
|
||||
/// <summary>
|
||||
/// COMPARE failed
|
||||
/// COMPARE failed
|
||||
/// </summary>
|
||||
Miscompare = 0xE,
|
||||
/// <summary>
|
||||
/// Complated
|
||||
/// Complated
|
||||
/// </summary>
|
||||
Completed = 0xF
|
||||
}
|
||||
@@ -152,52 +152,52 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public struct FixedSense
|
||||
{
|
||||
/// <summary>
|
||||
/// If set, <see cref="Information"/> is valid
|
||||
/// If set, <see cref="Information" /> is valid
|
||||
/// </summary>
|
||||
public bool InformationValid;
|
||||
/// <summary>
|
||||
/// Contains number of current segment descriptor
|
||||
/// Contains number of current segment descriptor
|
||||
/// </summary>
|
||||
public byte SegmentNumber;
|
||||
/// <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>
|
||||
public bool Filemark;
|
||||
/// <summary>
|
||||
/// If set indicates device has arrived end-of-medium
|
||||
/// If set indicates device has arrived end-of-medium
|
||||
/// </summary>
|
||||
public bool EOM;
|
||||
/// <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>
|
||||
public bool ILI;
|
||||
/// <summary>
|
||||
/// Contains the sense key
|
||||
/// Contains the sense key
|
||||
/// </summary>
|
||||
public SenseKeys SenseKey;
|
||||
/// <summary>
|
||||
/// Additional information
|
||||
/// Additional information
|
||||
/// </summary>
|
||||
public uint Information;
|
||||
/// <summary>
|
||||
/// Additional sense length
|
||||
/// Additional sense length
|
||||
/// </summary>
|
||||
public byte AdditionalLength;
|
||||
/// <summary>
|
||||
/// Command specific information field
|
||||
/// Command specific information field
|
||||
/// </summary>
|
||||
public uint CommandSpecific;
|
||||
/// <summary>
|
||||
/// Additional sense code
|
||||
/// Additional sense code
|
||||
/// </summary>
|
||||
public byte ASC;
|
||||
/// <summary>
|
||||
/// Additional sense code qualifier
|
||||
/// Additional sense code qualifier
|
||||
/// </summary>
|
||||
public byte ASCQ;
|
||||
public byte FieldReplaceable;
|
||||
/// <summary>
|
||||
/// If set, <see cref="SenseKeySpecific"/> is valid
|
||||
/// If set, <see cref="SenseKeySpecific" /> is valid
|
||||
/// </summary>
|
||||
public bool SKSV;
|
||||
public uint SenseKeySpecific;
|
||||
@@ -210,20 +210,20 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public struct DescriptorSense
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains the sense key
|
||||
/// Contains the sense key
|
||||
/// </summary>
|
||||
public SenseKeys SenseKey;
|
||||
/// <summary>
|
||||
/// Additional sense code
|
||||
/// Additional sense code
|
||||
/// </summary>
|
||||
public byte ASC;
|
||||
/// <summary>
|
||||
/// Additional sense code qualifier
|
||||
/// Additional sense code qualifier
|
||||
/// </summary>
|
||||
public byte ASCQ;
|
||||
public bool Overflow;
|
||||
/// <summary>
|
||||
/// The descriptors, indexed by type
|
||||
/// The descriptors, indexed by type
|
||||
/// </summary>
|
||||
public Dictionary<byte, byte[]> Descriptors;
|
||||
}
|
||||
@@ -243,7 +243,7 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
public static class Sense
|
||||
{
|
||||
/// <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>
|
||||
/// <returns>The type.</returns>
|
||||
/// <param name="sense">Sense bytes.</param>
|
||||
@@ -425,8 +425,8 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
|
||||
if((decoded.SenseKeySpecific & 0x200000) == 0x200000)
|
||||
sb.AppendFormat("Invalid value in bit {0} in field {1} of CDB",
|
||||
(decoded.SenseKeySpecific & 0x70000) >> 16,
|
||||
decoded.SenseKeySpecific & 0xFFFF).AppendLine();
|
||||
(decoded.SenseKeySpecific & 0x70000) >> 16, decoded.SenseKeySpecific & 0xFFFF)
|
||||
.AppendLine();
|
||||
else
|
||||
sb.AppendFormat("Invalid value in field {0} of CDB", decoded.SenseKeySpecific & 0xFFFF)
|
||||
.AppendLine();
|
||||
@@ -471,7 +471,7 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Decodes the information sense data descriptor
|
||||
/// Decodes the information sense data descriptor
|
||||
/// </summary>
|
||||
/// <returns>The information value</returns>
|
||||
/// <param name="descriptor">Descriptor.</param>
|
||||
@@ -494,7 +494,7 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Decodes the command-specific information sense data descriptor
|
||||
/// Decodes the command-specific information sense data descriptor
|
||||
/// </summary>
|
||||
/// <returns>The command-specific information sense data descriptor.</returns>
|
||||
/// <param name="descriptor">Descriptor.</param>
|
||||
@@ -517,7 +517,7 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Decodes the sense key specific sense data descriptor
|
||||
/// Decodes the sense key specific sense data descriptor
|
||||
/// </summary>
|
||||
/// <returns>The sense key specific sense data descriptor.</returns>
|
||||
/// <param name="descriptor">Descriptor.</param>
|
||||
@@ -531,7 +531,7 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Decodes the field replaceable unit sense data descriptor
|
||||
/// Decodes the field replaceable unit sense data descriptor
|
||||
/// </summary>
|
||||
/// <returns>The field replaceable unit sense data descriptor.</returns>
|
||||
/// <param name="descriptor">Descriptor.</param>
|
||||
@@ -543,7 +543,7 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Decodes the another progress indication sense data descriptor
|
||||
/// Decodes the another progress indication sense data descriptor
|
||||
/// </summary>
|
||||
/// <returns>The another progress indication sense data descriptor.</returns>
|
||||
/// <param name="descriptor">Descriptor.</param>
|
||||
|
||||
480
SCSI/Types.cs
480
SCSI/Types.cs
File diff suppressed because it is too large
Load Diff
@@ -189,8 +189,10 @@ namespace DiscImageChef.Decoders.Sega
|
||||
provider);
|
||||
}
|
||||
#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
|
||||
}
|
||||
|
||||
|
||||
55
Xbox/DMI.cs
55
Xbox/DMI.cs
@@ -74,36 +74,36 @@ namespace DiscImageChef.Decoders.Xbox
|
||||
public struct XboxDMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
|
||||
/// <summary>
|
||||
/// Bytes 4 to 7
|
||||
/// 0x01 in XGD
|
||||
/// Bytes 4 to 7
|
||||
/// 0x01 in XGD
|
||||
/// </summary>
|
||||
public uint Version;
|
||||
|
||||
/// <summary>
|
||||
/// Bytes 12 to 16
|
||||
/// Catalogue number in XX-XXXXX-X
|
||||
/// Bytes 12 to 16
|
||||
/// Catalogue number in XX-XXXXX-X
|
||||
/// </summary>
|
||||
public string CatalogNumber;
|
||||
|
||||
/// <summary>
|
||||
/// Bytes 20 to 27
|
||||
/// DMI timestamp
|
||||
/// Bytes 20 to 27
|
||||
/// DMI timestamp
|
||||
/// </summary>
|
||||
public long Timestamp;
|
||||
}
|
||||
@@ -111,42 +111,42 @@ namespace DiscImageChef.Decoders.Xbox
|
||||
public struct Xbox360DMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// Bytes 0 to 1
|
||||
/// Data length
|
||||
/// </summary>
|
||||
public ushort DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// Byte 2
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
|
||||
/// <summary>
|
||||
/// Bytes 4 to 7
|
||||
/// 0x02 in XGD2 and XGD3
|
||||
/// Bytes 4 to 7
|
||||
/// 0x02 in XGD2 and XGD3
|
||||
/// </summary>
|
||||
public uint Version;
|
||||
|
||||
/// <summary>
|
||||
/// Bytes 20 to 27
|
||||
/// DMI timestamp
|
||||
/// Bytes 20 to 27
|
||||
/// DMI timestamp
|
||||
/// </summary>
|
||||
public long Timestamp;
|
||||
|
||||
/// <summary>
|
||||
/// Bytes 36 to 51
|
||||
/// Media ID in hex XXXXXXXXXXXX-XXXXXXXX
|
||||
/// Bytes 36 to 51
|
||||
/// Media ID in hex XXXXXXXXXXXX-XXXXXXXX
|
||||
/// </summary>
|
||||
public byte[] MediaID;
|
||||
|
||||
/// <summary>
|
||||
/// Bytes 68 to 83
|
||||
/// Catalogue number in XX-XXXX-XX-XXY-XXX, Y not always exists
|
||||
/// Bytes 68 to 83
|
||||
/// Catalogue number in XX-XXXX-XX-XXY-XXX, Y not always exists
|
||||
/// </summary>
|
||||
public string CatalogNumber;
|
||||
}
|
||||
@@ -235,7 +235,8 @@ namespace DiscImageChef.Decoders.Xbox
|
||||
|
||||
sb.Append("-");
|
||||
|
||||
switch(decoded.CatalogNumber.Length) {
|
||||
switch(decoded.CatalogNumber.Length)
|
||||
{
|
||||
case 13:
|
||||
for(int i = 8; i < 10; i++) sb.AppendFormat("{0}", decoded.CatalogNumber[i]);
|
||||
|
||||
|
||||
138
Xbox/SS.cs
138
Xbox/SS.cs
@@ -46,148 +46,148 @@ namespace DiscImageChef.Decoders.Xbox
|
||||
public struct SecuritySector
|
||||
{
|
||||
/// <summary>
|
||||
/// Byte 0, bits 7 to 4
|
||||
/// Disk category field
|
||||
/// Byte 0, bits 7 to 4
|
||||
/// Disk category field
|
||||
/// </summary>
|
||||
public DiskCategory DiskCategory;
|
||||
/// <summary>
|
||||
/// Byte 0, bits 3 to 0
|
||||
/// Media version
|
||||
/// Byte 0, bits 3 to 0
|
||||
/// Media version
|
||||
/// </summary>
|
||||
public byte PartVersion;
|
||||
/// <summary>
|
||||
/// Byte 1, bits 7 to 4
|
||||
/// 120mm if 0, 80mm if 1. If UMD (60mm) 0 also. Reserved rest of values
|
||||
/// Byte 1, bits 7 to 4
|
||||
/// 120mm if 0, 80mm if 1. If UMD (60mm) 0 also. Reserved rest of values
|
||||
/// </summary>
|
||||
public DVDSize DiscSize;
|
||||
/// <summary>
|
||||
/// Byte 1, bits 3 to 0
|
||||
/// Maximum data rate
|
||||
/// Byte 1, bits 3 to 0
|
||||
/// Maximum data rate
|
||||
/// </summary>
|
||||
public MaximumRateField MaximumRate;
|
||||
/// <summary>
|
||||
/// Byte 2, bit 7
|
||||
/// Reserved
|
||||
/// Byte 2, bit 7
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public bool Reserved3;
|
||||
/// <summary>
|
||||
/// Byte 2, bits 6 to 5
|
||||
/// Number of layers
|
||||
/// Byte 2, bits 6 to 5
|
||||
/// Number of layers
|
||||
/// </summary>
|
||||
public byte Layers;
|
||||
/// <summary>
|
||||
/// Byte 2, bit 4
|
||||
/// Track path
|
||||
/// Byte 2, bit 4
|
||||
/// Track path
|
||||
/// </summary>
|
||||
public bool TrackPath;
|
||||
/// <summary>
|
||||
/// Byte 2, bits 3 to 0
|
||||
/// Layer type
|
||||
/// Byte 2, bits 3 to 0
|
||||
/// Layer type
|
||||
/// </summary>
|
||||
public LayerTypeFieldMask LayerType;
|
||||
/// <summary>
|
||||
/// Byte 3, bits 7 to 4
|
||||
/// Linear density field
|
||||
/// Byte 3, bits 7 to 4
|
||||
/// Linear density field
|
||||
/// </summary>
|
||||
public LinearDensityField LinearDensity;
|
||||
/// <summary>
|
||||
/// Byte 3, bits 3 to 0
|
||||
/// Track density field
|
||||
/// Byte 3, bits 3 to 0
|
||||
/// Track density field
|
||||
/// </summary>
|
||||
public TrackDensityField TrackDensity;
|
||||
/// <summary>
|
||||
/// Bytes 4 to 7
|
||||
/// PSN where Data Area starts
|
||||
/// Bytes 4 to 7
|
||||
/// PSN where Data Area starts
|
||||
/// </summary>
|
||||
public uint DataAreaStartPSN;
|
||||
/// <summary>
|
||||
/// Bytes 8 to 11
|
||||
/// PSN where Data Area ends
|
||||
/// Bytes 8 to 11
|
||||
/// PSN where Data Area ends
|
||||
/// </summary>
|
||||
public uint DataAreaEndPSN;
|
||||
/// <summary>
|
||||
/// Bytes 12 to 15
|
||||
/// PSN where Data Area ends in Layer 0
|
||||
/// Bytes 12 to 15
|
||||
/// PSN where Data Area ends in Layer 0
|
||||
/// </summary>
|
||||
public uint Layer0EndPSN;
|
||||
|
||||
/// <summary>
|
||||
/// Byte 27
|
||||
/// Always 0x06 on XGD3
|
||||
/// Byte 27
|
||||
/// Always 0x06 on XGD3
|
||||
/// </summary>
|
||||
public byte Unknown1;
|
||||
/// <summary>
|
||||
/// Bytes 256 to 283
|
||||
/// Unknown, XGD2 and XGD3
|
||||
/// Bytes 256 to 283
|
||||
/// Unknown, XGD2 and XGD3
|
||||
/// </summary>
|
||||
public byte[] Unknown2;
|
||||
/// <summary>
|
||||
/// Bytes 284 to 719
|
||||
/// Unknown, XGD3
|
||||
/// Bytes 284 to 719
|
||||
/// Unknown, XGD3
|
||||
/// </summary>
|
||||
public byte[] Unknown3;
|
||||
/// <summary>
|
||||
/// Bytes 720 to 723
|
||||
/// Unknown
|
||||
/// Bytes 720 to 723
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
public byte[] Unknown4;
|
||||
/// <summary>
|
||||
/// Bytes 724 to 767
|
||||
/// Unknown, XGD3
|
||||
/// Bytes 724 to 767
|
||||
/// Unknown, XGD3
|
||||
/// </summary>
|
||||
public byte[] Unknown5;
|
||||
/// <summary>
|
||||
/// Byte 768
|
||||
/// Version of challenge table
|
||||
/// Byte 768
|
||||
/// Version of challenge table
|
||||
/// </summary>
|
||||
public byte ChallengeTableVersion;
|
||||
/// <summary>
|
||||
/// Byte 769
|
||||
/// Number of challenge entries
|
||||
/// Byte 769
|
||||
/// Number of challenge entries
|
||||
/// </summary>
|
||||
public byte NoChallengeEntries;
|
||||
/// <summary>
|
||||
/// Bytes 770 to 1022
|
||||
/// Unknown
|
||||
/// Bytes 770 to 1022
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
public ChallengeEntry[] ChallengeEntries;
|
||||
/// <summary>
|
||||
/// Byte 1023
|
||||
/// Unknown
|
||||
/// Byte 1023
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
public byte Unknown6;
|
||||
/// <summary>
|
||||
/// Bytes 1052 to 1099
|
||||
/// Unknown, XGD1 only
|
||||
/// Bytes 1052 to 1099
|
||||
/// Unknown, XGD1 only
|
||||
/// </summary>
|
||||
public byte[] Unknown7;
|
||||
/// <summary>
|
||||
/// Bytes 1120 to 1135
|
||||
/// Unknown, XGD2 and XGD3
|
||||
/// Bytes 1120 to 1135
|
||||
/// Unknown, XGD2 and XGD3
|
||||
/// </summary>
|
||||
public byte[] Unknown8;
|
||||
/// <summary>
|
||||
/// Bytes 1180 to 1195
|
||||
/// Unknown
|
||||
/// Bytes 1180 to 1195
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
public byte[] Unknown9;
|
||||
/// <summary>
|
||||
/// Bytes 1208 to 1511
|
||||
/// Unknown
|
||||
/// Bytes 1208 to 1511
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
public byte[] Unknown10;
|
||||
/// <summary>
|
||||
/// Bytes 1528 to 1632
|
||||
/// Bytes 1528 to 1632
|
||||
/// </summary>
|
||||
public byte[] Unknown11;
|
||||
/// <summary>
|
||||
/// Bytes 1633 to 1839
|
||||
/// Security extents, 23 entries of 9 bytes
|
||||
/// Bytes 1633 to 1839
|
||||
/// Security extents, 23 entries of 9 bytes
|
||||
/// </summary>
|
||||
public SecuritySectorExtent[] Extents;
|
||||
/// <summary>
|
||||
/// Bytes 1840 to 2047
|
||||
/// Copy of the security extents, 23 entries of 9 bytes
|
||||
/// Bytes 1840 to 2047
|
||||
/// Copy of the security extents, 23 entries of 9 bytes
|
||||
/// </summary>
|
||||
public SecuritySectorExtent[] ExtentsCopy;
|
||||
}
|
||||
@@ -195,18 +195,18 @@ namespace DiscImageChef.Decoders.Xbox
|
||||
public struct SecuritySectorExtent
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 2
|
||||
/// Unknown
|
||||
/// Bytes 0 to 2
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
public uint Unknown;
|
||||
/// <summary>
|
||||
/// Bytes 3 to 5
|
||||
/// Start PSN of this security extent
|
||||
/// Bytes 3 to 5
|
||||
/// Start PSN of this security extent
|
||||
/// </summary>
|
||||
public uint StartPSN;
|
||||
/// <summary>
|
||||
/// Bytes 6 to 8
|
||||
/// End PSN of this security extent
|
||||
/// Bytes 6 to 8
|
||||
/// End PSN of this security extent
|
||||
/// </summary>
|
||||
public uint EndPSN;
|
||||
}
|
||||
@@ -265,9 +265,8 @@ namespace DiscImageChef.Decoders.Xbox
|
||||
Array.Copy(response, 724, ss.Unknown5, 0, 43);
|
||||
|
||||
for(int i = 0; i < 23; i++)
|
||||
{
|
||||
ss.ChallengeEntries[i] = new ChallengeEntry
|
||||
{
|
||||
{
|
||||
Level = response[770 + i * 11 + 0],
|
||||
ChallengeId = response[770 + i * 11 + 1],
|
||||
ChallengeValue =
|
||||
@@ -277,7 +276,6 @@ namespace DiscImageChef.Decoders.Xbox
|
||||
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])
|
||||
};
|
||||
}
|
||||
|
||||
Array.Copy(response, 1052, ss.Unknown7, 0, 48);
|
||||
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, 1528, ss.Unknown11, 0, 104);
|
||||
for(int i = 0; i < 23; i++)
|
||||
{
|
||||
ss.Extents[i] = new SecuritySectorExtent
|
||||
{
|
||||
{
|
||||
Unknown =
|
||||
(uint)((response[1633 + i * 9 + 0] << 16) + (response[1633 + i * 9 + 1] << 8) +
|
||||
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) +
|
||||
response[1633 + i * 9 + 8])
|
||||
};
|
||||
}
|
||||
|
||||
for(int i = 0; i < 23; i++)
|
||||
{
|
||||
ss.ExtentsCopy[i] = new SecuritySectorExtent
|
||||
{
|
||||
{
|
||||
Unknown =
|
||||
(uint)((response[1840 + i * 9 + 0] << 16) + (response[1840 + i * 9 + 1] << 8) +
|
||||
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) +
|
||||
response[1840 + i * 9 + 8])
|
||||
};
|
||||
}
|
||||
|
||||
return ss;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user