mirror of
https://github.com/aaru-dps/Aaru.Decoders.git
synced 2025-12-16 19:24:32 +00:00
Code cleanup.
This commit is contained in:
153
ATA/Identify.cs
153
ATA/Identify.cs
@@ -127,7 +127,8 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
/// Words 10 to 19
|
/// Words 10 to 19
|
||||||
/// Device serial number, right justified, padded with spaces
|
/// Device serial number, right justified, padded with spaces
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)] public string SerialNumber;
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
|
||||||
|
public string SerialNumber;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Word 20
|
/// Word 20
|
||||||
/// Manufacturer defined
|
/// Manufacturer defined
|
||||||
@@ -153,12 +154,14 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
/// Words 23 to 26
|
/// Words 23 to 26
|
||||||
/// Firmware revision, left justified, padded with spaces
|
/// Firmware revision, left justified, padded with spaces
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)] public string FirmwareRevision;
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)]
|
||||||
|
public string FirmwareRevision;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Words 27 to 46
|
/// Words 27 to 46
|
||||||
/// Model number, left justified, padded with spaces
|
/// Model number, left justified, padded with spaces
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)] public string Model;
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
|
||||||
|
public string Model;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Word 47 bits 7 to 0
|
/// Word 47 bits 7 to 0
|
||||||
/// Maximum number of sectors that can be transferred per
|
/// Maximum number of sectors that can be transferred per
|
||||||
@@ -565,7 +568,8 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
/// Words 121 to 125
|
/// Words 121 to 125
|
||||||
/// Reserved
|
/// Reserved
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] public ushort[] ReservedWords121;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
|
||||||
|
public ushort[] ReservedWords121;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Word 126
|
/// Word 126
|
||||||
@@ -591,7 +595,8 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Words 129 to 159
|
/// Words 129 to 159
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 31)] public ushort[] ReservedWords129;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 31)]
|
||||||
|
public ushort[] ReservedWords129;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Word 160
|
/// Word 160
|
||||||
@@ -607,7 +612,8 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
/// Words 161 to 167
|
/// Words 161 to 167
|
||||||
/// Reserved for CFA
|
/// Reserved for CFA
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 7)] public ushort[] ReservedCFA;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 7)]
|
||||||
|
public ushort[] ReservedCFA;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Word 168
|
/// Word 168
|
||||||
@@ -624,7 +630,8 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
/// Words 170 to 173
|
/// Words 170 to 173
|
||||||
/// Additional product identifier
|
/// Additional product identifier
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)] public string AdditionalPID;
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)]
|
||||||
|
public string AdditionalPID;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Word 174
|
/// Word 174
|
||||||
@@ -641,12 +648,14 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
/// Words 176 to 195
|
/// Words 176 to 195
|
||||||
/// Current media serial number
|
/// Current media serial number
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)] public string MediaSerial;
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
|
||||||
|
public string MediaSerial;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Words 196 to 205
|
/// Words 196 to 205
|
||||||
/// Current media manufacturer
|
/// Current media manufacturer
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)] public string MediaManufacturer;
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
|
||||||
|
public string MediaManufacturer;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Word 206
|
/// Word 206
|
||||||
@@ -759,7 +768,8 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
/// Words 224 to 229
|
/// Words 224 to 229
|
||||||
/// Reserved for CE-ATA
|
/// Reserved for CE-ATA
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public ushort[] ReservedCEATA224;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
||||||
|
public ushort[] ReservedCEATA224;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Words 230 to 233
|
/// Words 230 to 233
|
||||||
@@ -781,7 +791,8 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Words 236 to 254
|
/// Words 236 to 254
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 19)] public ushort[] ReservedWords;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 19)]
|
||||||
|
public ushort[] ReservedWords;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Word 255 bits 7 to 0
|
/// Word 255 bits 7 to 0
|
||||||
@@ -1889,8 +1900,10 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
|
|
||||||
IdentifyDevice ATAID = IdentifyDeviceResponse.Value;
|
IdentifyDevice ATAID = IdentifyDeviceResponse.Value;
|
||||||
if(ATAID.GeneralConfiguration.HasFlag(GeneralConfigurationBit.NonMagnetic))
|
if(ATAID.GeneralConfiguration.HasFlag(GeneralConfigurationBit.NonMagnetic))
|
||||||
if((ushort)ATAID.GeneralConfiguration != 0x848A) atapi = true;
|
if((ushort)ATAID.GeneralConfiguration != 0x848A)
|
||||||
else cfa = true;
|
atapi = true;
|
||||||
|
else
|
||||||
|
cfa = true;
|
||||||
|
|
||||||
if(atapi) sb.AppendLine("ATAPI device");
|
if(atapi) sb.AppendLine("ATAPI device");
|
||||||
else if(cfa) sb.AppendLine("CompactFlash device");
|
else if(cfa) sb.AppendLine("CompactFlash device");
|
||||||
@@ -1972,66 +1985,77 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
maxatalevel = 1;
|
maxatalevel = 1;
|
||||||
if(minatalevel > 1) minatalevel = 1;
|
if(minatalevel > 1) minatalevel = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ata2)
|
if(ata2)
|
||||||
{
|
{
|
||||||
sb.Append("ATA-2 ");
|
sb.Append("ATA-2 ");
|
||||||
maxatalevel = 2;
|
maxatalevel = 2;
|
||||||
if(minatalevel > 2) minatalevel = 2;
|
if(minatalevel > 2) minatalevel = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ata3)
|
if(ata3)
|
||||||
{
|
{
|
||||||
sb.Append("ATA-3 ");
|
sb.Append("ATA-3 ");
|
||||||
maxatalevel = 3;
|
maxatalevel = 3;
|
||||||
if(minatalevel > 3) minatalevel = 3;
|
if(minatalevel > 3) minatalevel = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ata4)
|
if(ata4)
|
||||||
{
|
{
|
||||||
sb.Append("ATA/ATAPI-4 ");
|
sb.Append("ATA/ATAPI-4 ");
|
||||||
maxatalevel = 4;
|
maxatalevel = 4;
|
||||||
if(minatalevel > 4) minatalevel = 4;
|
if(minatalevel > 4) minatalevel = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ata5)
|
if(ata5)
|
||||||
{
|
{
|
||||||
sb.Append("ATA/ATAPI-5 ");
|
sb.Append("ATA/ATAPI-5 ");
|
||||||
maxatalevel = 5;
|
maxatalevel = 5;
|
||||||
if(minatalevel > 5) minatalevel = 5;
|
if(minatalevel > 5) minatalevel = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ata6)
|
if(ata6)
|
||||||
{
|
{
|
||||||
sb.Append("ATA/ATAPI-6 ");
|
sb.Append("ATA/ATAPI-6 ");
|
||||||
maxatalevel = 6;
|
maxatalevel = 6;
|
||||||
if(minatalevel > 6) minatalevel = 6;
|
if(minatalevel > 6) minatalevel = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ata7)
|
if(ata7)
|
||||||
{
|
{
|
||||||
sb.Append("ATA/ATAPI-7 ");
|
sb.Append("ATA/ATAPI-7 ");
|
||||||
maxatalevel = 7;
|
maxatalevel = 7;
|
||||||
if(minatalevel > 7) minatalevel = 7;
|
if(minatalevel > 7) minatalevel = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(acs)
|
if(acs)
|
||||||
{
|
{
|
||||||
sb.Append("ATA8-ACS ");
|
sb.Append("ATA8-ACS ");
|
||||||
maxatalevel = 8;
|
maxatalevel = 8;
|
||||||
if(minatalevel > 8) minatalevel = 8;
|
if(minatalevel > 8) minatalevel = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(acs2)
|
if(acs2)
|
||||||
{
|
{
|
||||||
sb.Append("ATA8-ACS2 ");
|
sb.Append("ATA8-ACS2 ");
|
||||||
maxatalevel = 9;
|
maxatalevel = 9;
|
||||||
if(minatalevel > 9) minatalevel = 9;
|
if(minatalevel > 9) minatalevel = 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(acs3)
|
if(acs3)
|
||||||
{
|
{
|
||||||
sb.Append("ATA8-ACS3 ");
|
sb.Append("ATA8-ACS3 ");
|
||||||
maxatalevel = 10;
|
maxatalevel = 10;
|
||||||
if(minatalevel > 10) minatalevel = 10;
|
if(minatalevel > 10) minatalevel = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(acs4)
|
if(acs4)
|
||||||
{
|
{
|
||||||
sb.Append("ATA8-ACS4 ");
|
sb.Append("ATA8-ACS4 ");
|
||||||
maxatalevel = 11;
|
maxatalevel = 11;
|
||||||
if(minatalevel > 11) minatalevel = 11;
|
if(minatalevel > 11) minatalevel = 11;
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.AppendLine();
|
sb.AppendLine();
|
||||||
|
|
||||||
sb.Append("Maximum ATA revision supported: ");
|
sb.Append("Maximum ATA revision supported: ");
|
||||||
@@ -2365,8 +2389,10 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.NominalRotationRate != 0x0000 && ATAID.NominalRotationRate != 0xFFFF)
|
if(ATAID.NominalRotationRate != 0x0000 && ATAID.NominalRotationRate != 0xFFFF)
|
||||||
if(ATAID.NominalRotationRate == 0x0001) sb.AppendLine("Device does not rotate.");
|
if(ATAID.NominalRotationRate == 0x0001)
|
||||||
else sb.AppendFormat("Device rotate at {0} rpm", ATAID.NominalRotationRate).AppendLine();
|
sb.AppendLine("Device does not rotate.");
|
||||||
|
else
|
||||||
|
sb.AppendFormat("Device rotate at {0} rpm", ATAID.NominalRotationRate).AppendLine();
|
||||||
|
|
||||||
uint logicalsectorsize = 0;
|
uint logicalsectorsize = 0;
|
||||||
if(!atapi)
|
if(!atapi)
|
||||||
@@ -2376,8 +2402,10 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
if((ATAID.PhysLogSectorSize & 0x8000) == 0x0000 && (ATAID.PhysLogSectorSize & 0x4000) == 0x4000)
|
if((ATAID.PhysLogSectorSize & 0x8000) == 0x0000 && (ATAID.PhysLogSectorSize & 0x4000) == 0x4000)
|
||||||
{
|
{
|
||||||
if((ATAID.PhysLogSectorSize & 0x1000) == 0x1000)
|
if((ATAID.PhysLogSectorSize & 0x1000) == 0x1000)
|
||||||
if(ATAID.LogicalSectorWords <= 255 || ATAID.LogicalAlignment == 0xFFFF) logicalsectorsize = 512;
|
if(ATAID.LogicalSectorWords <= 255 || ATAID.LogicalAlignment == 0xFFFF)
|
||||||
else logicalsectorsize = ATAID.LogicalSectorWords * 2;
|
logicalsectorsize = 512;
|
||||||
|
else
|
||||||
|
logicalsectorsize = ATAID.LogicalSectorWords * 2;
|
||||||
else logicalsectorsize = 512;
|
else logicalsectorsize = 512;
|
||||||
|
|
||||||
if((ATAID.PhysLogSectorSize & 0x2000) == 0x2000)
|
if((ATAID.PhysLogSectorSize & 0x2000) == 0x2000)
|
||||||
@@ -2443,9 +2471,11 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
if(ATAID.Capabilities.HasFlag(CapabilitiesBit.LBASupport))
|
if(ATAID.Capabilities.HasFlag(CapabilitiesBit.LBASupport))
|
||||||
if((ulong)ATAID.LBASectors * logicalsectorsize / 1024 / 1024 > 1000000)
|
if((ulong)ATAID.LBASectors * logicalsectorsize / 1024 / 1024 > 1000000)
|
||||||
sb.AppendFormat("Device size in 28-bit LBA mode: {0} bytes, {1} Tb, {2} TiB",
|
sb.AppendFormat("Device size in 28-bit LBA mode: {0} bytes, {1} Tb, {2} TiB",
|
||||||
(ulong)ATAID.LBASectors * logicalsectorsize,
|
(ulong)ATAID.LBASectors *
|
||||||
|
logicalsectorsize,
|
||||||
(ulong)ATAID.LBASectors * logicalsectorsize / 1000 / 1000 / 1000 / 1000,
|
(ulong)ATAID.LBASectors * logicalsectorsize / 1000 / 1000 / 1000 / 1000,
|
||||||
(ulong)ATAID.LBASectors * 512 / 1024 / 1024 / 1024 / 1024).AppendLine();
|
(ulong)ATAID.LBASectors * 512 / 1024 / 1024 / 1024 / 1024)
|
||||||
|
.AppendLine();
|
||||||
else if((ulong)ATAID.LBASectors * logicalsectorsize / 1024 / 1024 > 1000)
|
else if((ulong)ATAID.LBASectors * logicalsectorsize / 1024 / 1024 > 1000)
|
||||||
sb.AppendFormat("Device size in 28-bit LBA mode: {0} bytes, {1} Gb, {2} GiB",
|
sb.AppendFormat("Device size in 28-bit LBA mode: {0} bytes, {1} Gb, {2} GiB",
|
||||||
(ulong)ATAID.LBASectors * logicalsectorsize,
|
(ulong)ATAID.LBASectors * logicalsectorsize,
|
||||||
@@ -2461,13 +2491,15 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.ExtSectors))
|
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.ExtSectors))
|
||||||
if(ATAID.ExtendedUserSectors * logicalsectorsize / 1024 / 1024 > 1000000)
|
if(ATAID.ExtendedUserSectors * logicalsectorsize / 1024 / 1024 > 1000000)
|
||||||
sb.AppendFormat("Device size in 48-bit LBA mode: {0} bytes, {1} Tb, {2} TiB",
|
sb.AppendFormat("Device size in 48-bit LBA mode: {0} bytes, {1} Tb, {2} TiB",
|
||||||
ATAID.ExtendedUserSectors * logicalsectorsize,
|
ATAID.ExtendedUserSectors *
|
||||||
|
logicalsectorsize,
|
||||||
ATAID.ExtendedUserSectors * logicalsectorsize / 1000 / 1000 / 1000 / 1000,
|
ATAID.ExtendedUserSectors * logicalsectorsize / 1000 / 1000 / 1000 / 1000,
|
||||||
ATAID.ExtendedUserSectors * logicalsectorsize / 1024 / 1024 / 1024 / 1024)
|
ATAID.ExtendedUserSectors * logicalsectorsize / 1024 / 1024 / 1024 / 1024)
|
||||||
.AppendLine();
|
.AppendLine();
|
||||||
else if(ATAID.ExtendedUserSectors * logicalsectorsize / 1024 / 1024 > 1000)
|
else if(ATAID.ExtendedUserSectors * logicalsectorsize / 1024 / 1024 > 1000)
|
||||||
sb.AppendFormat("Device size in 48-bit LBA mode: {0} bytes, {1} Gb, {2} GiB",
|
sb.AppendFormat("Device size in 48-bit LBA mode: {0} bytes, {1} Gb, {2} GiB",
|
||||||
ATAID.ExtendedUserSectors * logicalsectorsize,
|
ATAID.ExtendedUserSectors *
|
||||||
|
logicalsectorsize,
|
||||||
ATAID.ExtendedUserSectors * logicalsectorsize / 1000 / 1000 / 1000,
|
ATAID.ExtendedUserSectors * logicalsectorsize / 1000 / 1000 / 1000,
|
||||||
ATAID.ExtendedUserSectors * logicalsectorsize / 1024 / 1024 / 1024)
|
ATAID.ExtendedUserSectors * logicalsectorsize / 1024 / 1024 / 1024)
|
||||||
.AppendLine();
|
.AppendLine();
|
||||||
@@ -2480,7 +2512,8 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
{
|
{
|
||||||
if(ATAID.LBA48Sectors * logicalsectorsize / 1024 / 1024 > 1000000)
|
if(ATAID.LBA48Sectors * logicalsectorsize / 1024 / 1024 > 1000000)
|
||||||
sb.AppendFormat("Device size in 48-bit LBA mode: {0} bytes, {1} Tb, {2} TiB",
|
sb.AppendFormat("Device size in 48-bit LBA mode: {0} bytes, {1} Tb, {2} TiB",
|
||||||
ATAID.LBA48Sectors * logicalsectorsize,
|
ATAID.LBA48Sectors *
|
||||||
|
logicalsectorsize,
|
||||||
ATAID.LBA48Sectors * logicalsectorsize / 1000 / 1000 / 1000 / 1000,
|
ATAID.LBA48Sectors * logicalsectorsize / 1000 / 1000 / 1000 / 1000,
|
||||||
ATAID.LBA48Sectors * logicalsectorsize / 1024 / 1024 / 1024 / 1024)
|
ATAID.LBA48Sectors * logicalsectorsize / 1024 / 1024 / 1024 / 1024)
|
||||||
.AppendLine();
|
.AppendLine();
|
||||||
@@ -2505,6 +2538,7 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
sb.AppendFormat("{0} bytes per unformatted sector", ATAID.UnformattedBPS).AppendLine();
|
sb.AppendFormat("{0} bytes per unformatted sector", ATAID.UnformattedBPS).AppendLine();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if((ushort)ATAID.SpecificConfiguration != 0x0000 && (ushort)ATAID.SpecificConfiguration != 0xFFFF)
|
if((ushort)ATAID.SpecificConfiguration != 0x0000 && (ushort)ATAID.SpecificConfiguration != 0xFFFF)
|
||||||
switch(ATAID.SpecificConfiguration)
|
switch(ATAID.SpecificConfiguration)
|
||||||
{
|
{
|
||||||
@@ -2562,6 +2596,7 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
sb.AppendLine().Append("IORDY is supported");
|
sb.AppendLine().Append("IORDY is supported");
|
||||||
if(ATAID.Capabilities.HasFlag(CapabilitiesBit.CanDisableIORDY)) sb.Append(" and can be disabled");
|
if(ATAID.Capabilities.HasFlag(CapabilitiesBit.CanDisableIORDY)) sb.Append(" and can be disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.Capabilities.HasFlag(CapabilitiesBit.DMASupport)) sb.AppendLine().Append("DMA is supported");
|
if(ATAID.Capabilities.HasFlag(CapabilitiesBit.DMASupport)) sb.AppendLine().Append("DMA is supported");
|
||||||
|
|
||||||
if(ATAID.Capabilities2.HasFlag(CapabilitiesBit2.MustBeSet) &&
|
if(ATAID.Capabilities2.HasFlag(CapabilitiesBit2.MustBeSet) &&
|
||||||
@@ -2623,36 +2658,43 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
sb.Append("DMA0 ");
|
sb.Append("DMA0 ");
|
||||||
if(ATAID.DMAActive.HasFlag(TransferMode.Mode0)) sb.Append("(active) ");
|
if(ATAID.DMAActive.HasFlag(TransferMode.Mode0)) sb.Append("(active) ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.DMASupported.HasFlag(TransferMode.Mode1))
|
if(ATAID.DMASupported.HasFlag(TransferMode.Mode1))
|
||||||
{
|
{
|
||||||
sb.Append("DMA1 ");
|
sb.Append("DMA1 ");
|
||||||
if(ATAID.DMAActive.HasFlag(TransferMode.Mode1)) sb.Append("(active) ");
|
if(ATAID.DMAActive.HasFlag(TransferMode.Mode1)) sb.Append("(active) ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.DMASupported.HasFlag(TransferMode.Mode2))
|
if(ATAID.DMASupported.HasFlag(TransferMode.Mode2))
|
||||||
{
|
{
|
||||||
sb.Append("DMA2 ");
|
sb.Append("DMA2 ");
|
||||||
if(ATAID.DMAActive.HasFlag(TransferMode.Mode2)) sb.Append("(active) ");
|
if(ATAID.DMAActive.HasFlag(TransferMode.Mode2)) sb.Append("(active) ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.DMASupported.HasFlag(TransferMode.Mode3))
|
if(ATAID.DMASupported.HasFlag(TransferMode.Mode3))
|
||||||
{
|
{
|
||||||
sb.Append("DMA3 ");
|
sb.Append("DMA3 ");
|
||||||
if(ATAID.DMAActive.HasFlag(TransferMode.Mode3)) sb.Append("(active) ");
|
if(ATAID.DMAActive.HasFlag(TransferMode.Mode3)) sb.Append("(active) ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.DMASupported.HasFlag(TransferMode.Mode4))
|
if(ATAID.DMASupported.HasFlag(TransferMode.Mode4))
|
||||||
{
|
{
|
||||||
sb.Append("DMA4 ");
|
sb.Append("DMA4 ");
|
||||||
if(ATAID.DMAActive.HasFlag(TransferMode.Mode4)) sb.Append("(active) ");
|
if(ATAID.DMAActive.HasFlag(TransferMode.Mode4)) sb.Append("(active) ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.DMASupported.HasFlag(TransferMode.Mode5))
|
if(ATAID.DMASupported.HasFlag(TransferMode.Mode5))
|
||||||
{
|
{
|
||||||
sb.Append("DMA5 ");
|
sb.Append("DMA5 ");
|
||||||
if(ATAID.DMAActive.HasFlag(TransferMode.Mode5)) sb.Append("(active) ");
|
if(ATAID.DMAActive.HasFlag(TransferMode.Mode5)) sb.Append("(active) ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.DMASupported.HasFlag(TransferMode.Mode6))
|
if(ATAID.DMASupported.HasFlag(TransferMode.Mode6))
|
||||||
{
|
{
|
||||||
sb.Append("DMA6 ");
|
sb.Append("DMA6 ");
|
||||||
if(ATAID.DMAActive.HasFlag(TransferMode.Mode6)) sb.Append("(active) ");
|
if(ATAID.DMAActive.HasFlag(TransferMode.Mode6)) sb.Append("(active) ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.DMASupported.HasFlag(TransferMode.Mode7))
|
if(ATAID.DMASupported.HasFlag(TransferMode.Mode7))
|
||||||
{
|
{
|
||||||
sb.Append("DMA7 ");
|
sb.Append("DMA7 ");
|
||||||
@@ -2666,36 +2708,43 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
sb.Append("MDMA0 ");
|
sb.Append("MDMA0 ");
|
||||||
if(ATAID.MDMAActive.HasFlag(TransferMode.Mode0)) sb.Append("(active) ");
|
if(ATAID.MDMAActive.HasFlag(TransferMode.Mode0)) sb.Append("(active) ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.MDMASupported.HasFlag(TransferMode.Mode1))
|
if(ATAID.MDMASupported.HasFlag(TransferMode.Mode1))
|
||||||
{
|
{
|
||||||
sb.Append("MDMA1 ");
|
sb.Append("MDMA1 ");
|
||||||
if(ATAID.MDMAActive.HasFlag(TransferMode.Mode1)) sb.Append("(active) ");
|
if(ATAID.MDMAActive.HasFlag(TransferMode.Mode1)) sb.Append("(active) ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.MDMASupported.HasFlag(TransferMode.Mode2))
|
if(ATAID.MDMASupported.HasFlag(TransferMode.Mode2))
|
||||||
{
|
{
|
||||||
sb.Append("MDMA2 ");
|
sb.Append("MDMA2 ");
|
||||||
if(ATAID.MDMAActive.HasFlag(TransferMode.Mode2)) sb.Append("(active) ");
|
if(ATAID.MDMAActive.HasFlag(TransferMode.Mode2)) sb.Append("(active) ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.MDMASupported.HasFlag(TransferMode.Mode3))
|
if(ATAID.MDMASupported.HasFlag(TransferMode.Mode3))
|
||||||
{
|
{
|
||||||
sb.Append("MDMA3 ");
|
sb.Append("MDMA3 ");
|
||||||
if(ATAID.MDMAActive.HasFlag(TransferMode.Mode3)) sb.Append("(active) ");
|
if(ATAID.MDMAActive.HasFlag(TransferMode.Mode3)) sb.Append("(active) ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.MDMASupported.HasFlag(TransferMode.Mode4))
|
if(ATAID.MDMASupported.HasFlag(TransferMode.Mode4))
|
||||||
{
|
{
|
||||||
sb.Append("MDMA4 ");
|
sb.Append("MDMA4 ");
|
||||||
if(ATAID.MDMAActive.HasFlag(TransferMode.Mode4)) sb.Append("(active) ");
|
if(ATAID.MDMAActive.HasFlag(TransferMode.Mode4)) sb.Append("(active) ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.MDMASupported.HasFlag(TransferMode.Mode5))
|
if(ATAID.MDMASupported.HasFlag(TransferMode.Mode5))
|
||||||
{
|
{
|
||||||
sb.Append("MDMA5 ");
|
sb.Append("MDMA5 ");
|
||||||
if(ATAID.MDMAActive.HasFlag(TransferMode.Mode5)) sb.Append("(active) ");
|
if(ATAID.MDMAActive.HasFlag(TransferMode.Mode5)) sb.Append("(active) ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.MDMASupported.HasFlag(TransferMode.Mode6))
|
if(ATAID.MDMASupported.HasFlag(TransferMode.Mode6))
|
||||||
{
|
{
|
||||||
sb.Append("MDMA6 ");
|
sb.Append("MDMA6 ");
|
||||||
if(ATAID.MDMAActive.HasFlag(TransferMode.Mode6)) sb.Append("(active) ");
|
if(ATAID.MDMAActive.HasFlag(TransferMode.Mode6)) sb.Append("(active) ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.MDMASupported.HasFlag(TransferMode.Mode7))
|
if(ATAID.MDMASupported.HasFlag(TransferMode.Mode7))
|
||||||
{
|
{
|
||||||
sb.Append("MDMA7 ");
|
sb.Append("MDMA7 ");
|
||||||
@@ -2708,36 +2757,43 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
sb.Append("UDMA0 ");
|
sb.Append("UDMA0 ");
|
||||||
if(ATAID.UDMAActive.HasFlag(TransferMode.Mode0)) sb.Append("(active) ");
|
if(ATAID.UDMAActive.HasFlag(TransferMode.Mode0)) sb.Append("(active) ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.UDMASupported.HasFlag(TransferMode.Mode1))
|
if(ATAID.UDMASupported.HasFlag(TransferMode.Mode1))
|
||||||
{
|
{
|
||||||
sb.Append("UDMA1 ");
|
sb.Append("UDMA1 ");
|
||||||
if(ATAID.UDMAActive.HasFlag(TransferMode.Mode1)) sb.Append("(active) ");
|
if(ATAID.UDMAActive.HasFlag(TransferMode.Mode1)) sb.Append("(active) ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.UDMASupported.HasFlag(TransferMode.Mode2))
|
if(ATAID.UDMASupported.HasFlag(TransferMode.Mode2))
|
||||||
{
|
{
|
||||||
sb.Append("UDMA2 ");
|
sb.Append("UDMA2 ");
|
||||||
if(ATAID.UDMAActive.HasFlag(TransferMode.Mode2)) sb.Append("(active) ");
|
if(ATAID.UDMAActive.HasFlag(TransferMode.Mode2)) sb.Append("(active) ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.UDMASupported.HasFlag(TransferMode.Mode3))
|
if(ATAID.UDMASupported.HasFlag(TransferMode.Mode3))
|
||||||
{
|
{
|
||||||
sb.Append("UDMA3 ");
|
sb.Append("UDMA3 ");
|
||||||
if(ATAID.UDMAActive.HasFlag(TransferMode.Mode3)) sb.Append("(active) ");
|
if(ATAID.UDMAActive.HasFlag(TransferMode.Mode3)) sb.Append("(active) ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.UDMASupported.HasFlag(TransferMode.Mode4))
|
if(ATAID.UDMASupported.HasFlag(TransferMode.Mode4))
|
||||||
{
|
{
|
||||||
sb.Append("UDMA4 ");
|
sb.Append("UDMA4 ");
|
||||||
if(ATAID.UDMAActive.HasFlag(TransferMode.Mode4)) sb.Append("(active) ");
|
if(ATAID.UDMAActive.HasFlag(TransferMode.Mode4)) sb.Append("(active) ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.UDMASupported.HasFlag(TransferMode.Mode5))
|
if(ATAID.UDMASupported.HasFlag(TransferMode.Mode5))
|
||||||
{
|
{
|
||||||
sb.Append("UDMA5 ");
|
sb.Append("UDMA5 ");
|
||||||
if(ATAID.UDMAActive.HasFlag(TransferMode.Mode5)) sb.Append("(active) ");
|
if(ATAID.UDMAActive.HasFlag(TransferMode.Mode5)) sb.Append("(active) ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.UDMASupported.HasFlag(TransferMode.Mode6))
|
if(ATAID.UDMASupported.HasFlag(TransferMode.Mode6))
|
||||||
{
|
{
|
||||||
sb.Append("UDMA6 ");
|
sb.Append("UDMA6 ");
|
||||||
if(ATAID.UDMAActive.HasFlag(TransferMode.Mode6)) sb.Append("(active) ");
|
if(ATAID.UDMAActive.HasFlag(TransferMode.Mode6)) sb.Append("(active) ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.UDMASupported.HasFlag(TransferMode.Mode7))
|
if(ATAID.UDMASupported.HasFlag(TransferMode.Mode7))
|
||||||
{
|
{
|
||||||
sb.Append("UDMA7 ");
|
sb.Append("UDMA7 ");
|
||||||
@@ -2876,66 +2932,79 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
sb.AppendLine().Append("NOP is supported");
|
sb.AppendLine().Append("NOP is supported");
|
||||||
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.Nop)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.Nop)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet.HasFlag(CommandSetBit.ReadBuffer))
|
if(ATAID.CommandSet.HasFlag(CommandSetBit.ReadBuffer))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("READ BUFFER is supported");
|
sb.AppendLine().Append("READ BUFFER is supported");
|
||||||
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.ReadBuffer)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.ReadBuffer)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet.HasFlag(CommandSetBit.WriteBuffer))
|
if(ATAID.CommandSet.HasFlag(CommandSetBit.WriteBuffer))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("WRITE BUFFER is supported");
|
sb.AppendLine().Append("WRITE BUFFER is supported");
|
||||||
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.WriteBuffer)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.WriteBuffer)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet.HasFlag(CommandSetBit.HPA))
|
if(ATAID.CommandSet.HasFlag(CommandSetBit.HPA))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("Host Protected Area is supported");
|
sb.AppendLine().Append("Host Protected Area is supported");
|
||||||
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.HPA)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.HPA)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet.HasFlag(CommandSetBit.DeviceReset))
|
if(ATAID.CommandSet.HasFlag(CommandSetBit.DeviceReset))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("DEVICE RESET is supported");
|
sb.AppendLine().Append("DEVICE RESET is supported");
|
||||||
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.DeviceReset)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.DeviceReset)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet.HasFlag(CommandSetBit.Service))
|
if(ATAID.CommandSet.HasFlag(CommandSetBit.Service))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("SERVICE interrupt is supported");
|
sb.AppendLine().Append("SERVICE interrupt is supported");
|
||||||
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.Service)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.Service)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet.HasFlag(CommandSetBit.Release))
|
if(ATAID.CommandSet.HasFlag(CommandSetBit.Release))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("Release is supported");
|
sb.AppendLine().Append("Release is supported");
|
||||||
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.Release)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.Release)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet.HasFlag(CommandSetBit.LookAhead))
|
if(ATAID.CommandSet.HasFlag(CommandSetBit.LookAhead))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("Look-ahead read is supported");
|
sb.AppendLine().Append("Look-ahead read is supported");
|
||||||
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.LookAhead)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.LookAhead)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet.HasFlag(CommandSetBit.WriteCache))
|
if(ATAID.CommandSet.HasFlag(CommandSetBit.WriteCache))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("Write cache is supported");
|
sb.AppendLine().Append("Write cache is supported");
|
||||||
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.WriteCache)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.WriteCache)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet.HasFlag(CommandSetBit.Packet))
|
if(ATAID.CommandSet.HasFlag(CommandSetBit.Packet))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("PACKET is supported");
|
sb.AppendLine().Append("PACKET is supported");
|
||||||
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.Packet)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.Packet)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet.HasFlag(CommandSetBit.PowerManagement))
|
if(ATAID.CommandSet.HasFlag(CommandSetBit.PowerManagement))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("Power management is supported");
|
sb.AppendLine().Append("Power management is supported");
|
||||||
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.PowerManagement)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.PowerManagement)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet.HasFlag(CommandSetBit.RemovableMedia))
|
if(ATAID.CommandSet.HasFlag(CommandSetBit.RemovableMedia))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("Removable media feature set is supported");
|
sb.AppendLine().Append("Removable media feature set is supported");
|
||||||
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.RemovableMedia)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.RemovableMedia)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet.HasFlag(CommandSetBit.SecurityMode))
|
if(ATAID.CommandSet.HasFlag(CommandSetBit.SecurityMode))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("Security mode is supported");
|
sb.AppendLine().Append("Security mode is supported");
|
||||||
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.SecurityMode)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet.HasFlag(CommandSetBit.SecurityMode)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.Capabilities.HasFlag(CapabilitiesBit.LBASupport))
|
if(ATAID.Capabilities.HasFlag(CapabilitiesBit.LBASupport))
|
||||||
sb.AppendLine().Append("28-bit LBA is supported");
|
sb.AppendLine().Append("28-bit LBA is supported");
|
||||||
|
|
||||||
@@ -2947,21 +3016,25 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
sb.AppendLine().Append("48-bit LBA is supported");
|
sb.AppendLine().Append("48-bit LBA is supported");
|
||||||
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.LBA48)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.LBA48)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.FlushCache))
|
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.FlushCache))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("FLUSH CACHE is supported");
|
sb.AppendLine().Append("FLUSH CACHE is supported");
|
||||||
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.FlushCache)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.FlushCache)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.FlushCacheExt))
|
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.FlushCacheExt))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("FLUSH CACHE EXT is supported");
|
sb.AppendLine().Append("FLUSH CACHE EXT is supported");
|
||||||
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.FlushCacheExt)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.FlushCacheExt)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.DCO))
|
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.DCO))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("Device Configuration Overlay feature set is supported");
|
sb.AppendLine().Append("Device Configuration Overlay feature set is supported");
|
||||||
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.DCO)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.DCO)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.AAM))
|
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.AAM))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("Automatic Acoustic Management is supported");
|
sb.AppendLine().Append("Automatic Acoustic Management is supported");
|
||||||
@@ -2969,17 +3042,20 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
sb.AppendFormat(" and enabled with value {0} (vendor recommends {1}", ATAID.CurrentAAM,
|
sb.AppendFormat(" and enabled with value {0} (vendor recommends {1}", ATAID.CurrentAAM,
|
||||||
ATAID.RecommendedAAM);
|
ATAID.RecommendedAAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.SetMax))
|
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.SetMax))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("SET MAX security extension is supported");
|
sb.AppendLine().Append("SET MAX security extension is supported");
|
||||||
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.SetMax)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.SetMax)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.AddressOffsetReservedAreaBoot))
|
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.AddressOffsetReservedAreaBoot))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("Address Offset Reserved Area Boot is supported");
|
sb.AppendLine().Append("Address Offset Reserved Area Boot is supported");
|
||||||
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.AddressOffsetReservedAreaBoot))
|
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.AddressOffsetReservedAreaBoot))
|
||||||
sb.Append(" and enabled");
|
sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.SetFeaturesRequired))
|
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.SetFeaturesRequired))
|
||||||
sb.AppendLine().Append("SET FEATURES is required before spin-up");
|
sb.AppendLine().Append("SET FEATURES is required before spin-up");
|
||||||
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.PowerUpInStandby))
|
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.PowerUpInStandby))
|
||||||
@@ -2987,28 +3063,33 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
sb.AppendLine().Append("Power-up in standby is supported");
|
sb.AppendLine().Append("Power-up in standby is supported");
|
||||||
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.PowerUpInStandby)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.PowerUpInStandby)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.RemovableNotification))
|
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.RemovableNotification))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("Removable Media Status Notification is supported");
|
sb.AppendLine().Append("Removable Media Status Notification is supported");
|
||||||
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.RemovableNotification))
|
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.RemovableNotification))
|
||||||
sb.Append(" and enabled");
|
sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.APM))
|
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.APM))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("Advanced Power Management is supported");
|
sb.AppendLine().Append("Advanced Power Management is supported");
|
||||||
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.APM))
|
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.APM))
|
||||||
sb.AppendFormat(" and enabled with value {0}", ATAID.CurrentAPM);
|
sb.AppendFormat(" and enabled with value {0}", ATAID.CurrentAPM);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.CompactFlash))
|
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.CompactFlash))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("CompactFlash feature set is supported");
|
sb.AppendLine().Append("CompactFlash feature set is supported");
|
||||||
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.CompactFlash)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.CompactFlash)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.RWQueuedDMA))
|
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.RWQueuedDMA))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("READ DMA QUEUED and WRITE DMA QUEUED are supported");
|
sb.AppendLine().Append("READ DMA QUEUED and WRITE DMA QUEUED are supported");
|
||||||
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.RWQueuedDMA)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.RWQueuedDMA)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.DownloadMicrocode))
|
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.DownloadMicrocode))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("DOWNLOAD MICROCODE is supported");
|
sb.AppendLine().Append("DOWNLOAD MICROCODE is supported");
|
||||||
@@ -3033,16 +3114,19 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
sb.AppendLine().Append("S.M.A.R.T. self-testing is supported");
|
sb.AppendLine().Append("S.M.A.R.T. self-testing is supported");
|
||||||
if(ATAID.EnabledCommandSet3.HasFlag(CommandSetBit3.SMARTSelfTest)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet3.HasFlag(CommandSetBit3.SMARTSelfTest)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.SMARTLog))
|
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.SMARTLog))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("S.M.A.R.T. error logging is supported");
|
sb.AppendLine().Append("S.M.A.R.T. error logging is supported");
|
||||||
if(ATAID.EnabledCommandSet3.HasFlag(CommandSetBit3.SMARTLog)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet3.HasFlag(CommandSetBit3.SMARTLog)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.IdleImmediate))
|
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.IdleImmediate))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("IDLE IMMEDIATE with UNLOAD FEATURE is supported");
|
sb.AppendLine().Append("IDLE IMMEDIATE with UNLOAD FEATURE is supported");
|
||||||
if(ATAID.EnabledCommandSet3.HasFlag(CommandSetBit3.IdleImmediate)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet3.HasFlag(CommandSetBit3.IdleImmediate)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.WriteURG))
|
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.WriteURG))
|
||||||
sb.AppendLine().Append("URG bit is supported in WRITE STREAM DMA EXT and WRITE STREAM EXT");
|
sb.AppendLine().Append("URG bit is supported in WRITE STREAM DMA EXT and WRITE STREAM EXT");
|
||||||
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.ReadURG))
|
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.ReadURG))
|
||||||
@@ -3054,26 +3138,31 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
sb.AppendLine().Append("WRITE DMA QUEUED FUA EXT is supported");
|
sb.AppendLine().Append("WRITE DMA QUEUED FUA EXT is supported");
|
||||||
if(ATAID.EnabledCommandSet3.HasFlag(CommandSetBit3.FUAWriteQ)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet3.HasFlag(CommandSetBit3.FUAWriteQ)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.FUAWrite))
|
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.FUAWrite))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("WRITE DMA FUA EXT and WRITE MULTIPLE FUA EXT are supported");
|
sb.AppendLine().Append("WRITE DMA FUA EXT and WRITE MULTIPLE FUA EXT are supported");
|
||||||
if(ATAID.EnabledCommandSet3.HasFlag(CommandSetBit3.FUAWrite)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet3.HasFlag(CommandSetBit3.FUAWrite)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.GPL))
|
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.GPL))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("General Purpose Logging is supported");
|
sb.AppendLine().Append("General Purpose Logging is supported");
|
||||||
if(ATAID.EnabledCommandSet3.HasFlag(CommandSetBit3.GPL)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet3.HasFlag(CommandSetBit3.GPL)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.Streaming))
|
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.Streaming))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("Streaming feature set is supported");
|
sb.AppendLine().Append("Streaming feature set is supported");
|
||||||
if(ATAID.EnabledCommandSet3.HasFlag(CommandSetBit3.Streaming)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet3.HasFlag(CommandSetBit3.Streaming)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.MCPT))
|
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.MCPT))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("Media Card Pass Through command set is supported");
|
sb.AppendLine().Append("Media Card Pass Through command set is supported");
|
||||||
if(ATAID.EnabledCommandSet3.HasFlag(CommandSetBit3.MCPT)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet3.HasFlag(CommandSetBit3.MCPT)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.MediaSerial))
|
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.MediaSerial))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("Media Serial is supported");
|
sb.AppendLine().Append("Media Serial is supported");
|
||||||
@@ -3089,42 +3178,50 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
sb.AppendLine().Append("DSN feature set is supported");
|
sb.AppendLine().Append("DSN feature set is supported");
|
||||||
if(ATAID.EnabledCommandSet4.HasFlag(CommandSetBit4.DSN)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet4.HasFlag(CommandSetBit4.DSN)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet4.HasFlag(CommandSetBit4.AMAC))
|
if(ATAID.CommandSet4.HasFlag(CommandSetBit4.AMAC))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("Accessible Max Address Configuration is supported");
|
sb.AppendLine().Append("Accessible Max Address Configuration is supported");
|
||||||
if(ATAID.EnabledCommandSet4.HasFlag(CommandSetBit4.AMAC)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet4.HasFlag(CommandSetBit4.AMAC)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet4.HasFlag(CommandSetBit4.ExtPowerCond))
|
if(ATAID.CommandSet4.HasFlag(CommandSetBit4.ExtPowerCond))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("Extended Power Conditions are supported");
|
sb.AppendLine().Append("Extended Power Conditions are supported");
|
||||||
if(ATAID.EnabledCommandSet4.HasFlag(CommandSetBit4.ExtPowerCond)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet4.HasFlag(CommandSetBit4.ExtPowerCond)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet4.HasFlag(CommandSetBit4.ExtStatusReport))
|
if(ATAID.CommandSet4.HasFlag(CommandSetBit4.ExtStatusReport))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("Extended Status Reporting is supported");
|
sb.AppendLine().Append("Extended Status Reporting is supported");
|
||||||
if(ATAID.EnabledCommandSet4.HasFlag(CommandSetBit4.ExtStatusReport)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet4.HasFlag(CommandSetBit4.ExtStatusReport)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet4.HasFlag(CommandSetBit4.FreeFallControl))
|
if(ATAID.CommandSet4.HasFlag(CommandSetBit4.FreeFallControl))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("Free-fall control feature set is supported");
|
sb.AppendLine().Append("Free-fall control feature set is supported");
|
||||||
if(ATAID.EnabledCommandSet4.HasFlag(CommandSetBit4.FreeFallControl)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet4.HasFlag(CommandSetBit4.FreeFallControl)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet4.HasFlag(CommandSetBit4.SegmentedDownloadMicrocode))
|
if(ATAID.CommandSet4.HasFlag(CommandSetBit4.SegmentedDownloadMicrocode))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("Segmented feature in DOWNLOAD MICROCODE is supported");
|
sb.AppendLine().Append("Segmented feature in DOWNLOAD MICROCODE is supported");
|
||||||
if(ATAID.EnabledCommandSet4.HasFlag(CommandSetBit4.SegmentedDownloadMicrocode))
|
if(ATAID.EnabledCommandSet4.HasFlag(CommandSetBit4.SegmentedDownloadMicrocode))
|
||||||
sb.Append(" and enabled");
|
sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet4.HasFlag(CommandSetBit4.RWDMAExtGpl))
|
if(ATAID.CommandSet4.HasFlag(CommandSetBit4.RWDMAExtGpl))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("READ/WRITE DMA EXT GPL are supported");
|
sb.AppendLine().Append("READ/WRITE DMA EXT GPL are supported");
|
||||||
if(ATAID.EnabledCommandSet4.HasFlag(CommandSetBit4.RWDMAExtGpl)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet4.HasFlag(CommandSetBit4.RWDMAExtGpl)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet4.HasFlag(CommandSetBit4.WriteUnc))
|
if(ATAID.CommandSet4.HasFlag(CommandSetBit4.WriteUnc))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("WRITE UNCORRECTABLE is supported");
|
sb.AppendLine().Append("WRITE UNCORRECTABLE is supported");
|
||||||
if(ATAID.EnabledCommandSet4.HasFlag(CommandSetBit4.WriteUnc)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet4.HasFlag(CommandSetBit4.WriteUnc)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet4.HasFlag(CommandSetBit4.WRV))
|
if(ATAID.CommandSet4.HasFlag(CommandSetBit4.WRV))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("Write/Read/Verify is supported");
|
sb.AppendLine().Append("Write/Read/Verify is supported");
|
||||||
@@ -3134,12 +3231,14 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
if(ATAID.EnabledCommandSet4.HasFlag(CommandSetBit4.WRV))
|
if(ATAID.EnabledCommandSet4.HasFlag(CommandSetBit4.WRV))
|
||||||
sb.AppendLine().AppendFormat("Current Write/Read/Verify mode: {0}", ATAID.WRVMode);
|
sb.AppendLine().AppendFormat("Current Write/Read/Verify mode: {0}", ATAID.WRVMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet4.HasFlag(CommandSetBit4.DT1825))
|
if(ATAID.CommandSet4.HasFlag(CommandSetBit4.DT1825))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("DT1825 is supported");
|
sb.AppendLine().Append("DT1825 is supported");
|
||||||
if(ATAID.EnabledCommandSet4.HasFlag(CommandSetBit4.DT1825)) sb.Append(" and enabled");
|
if(ATAID.EnabledCommandSet4.HasFlag(CommandSetBit4.DT1825)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.Capabilities3.HasFlag(CapabilitiesBit3.BlockErase))
|
if(ATAID.Capabilities3.HasFlag(CapabilitiesBit3.BlockErase))
|
||||||
sb.AppendLine().Append("BLOCK ERASE EXT is supported");
|
sb.AppendLine().Append("BLOCK ERASE EXT is supported");
|
||||||
if(ATAID.Capabilities3.HasFlag(CapabilitiesBit3.Overwrite))
|
if(ATAID.Capabilities3.HasFlag(CapabilitiesBit3.Overwrite))
|
||||||
@@ -3171,6 +3270,7 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.ReadZeroTrim))
|
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.ReadZeroTrim))
|
||||||
sb.AppendLine().Append("Read after TRIM returns empty data");
|
sb.AppendLine().Append("Read after TRIM returns empty data");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.LongPhysSectorAligError))
|
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.LongPhysSectorAligError))
|
||||||
sb.AppendLine().Append("Device supports Long Physical Sector Alignment Error Reporting Control");
|
sb.AppendLine().Append("Device supports Long Physical Sector Alignment Error Reporting Control");
|
||||||
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.Encrypted))
|
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.Encrypted))
|
||||||
@@ -3216,21 +3316,25 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
if(ATAID.EnabledSATAFeatures.HasFlag(SATAFeaturesBit.NonZeroBufferOffset))
|
if(ATAID.EnabledSATAFeatures.HasFlag(SATAFeaturesBit.NonZeroBufferOffset))
|
||||||
sb.Append(" and enabled");
|
sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.SATAFeatures.HasFlag(SATAFeaturesBit.DMASetup))
|
if(ATAID.SATAFeatures.HasFlag(SATAFeaturesBit.DMASetup))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("DMA Setup auto-activation is supported");
|
sb.AppendLine().Append("DMA Setup auto-activation is supported");
|
||||||
if(ATAID.EnabledSATAFeatures.HasFlag(SATAFeaturesBit.DMASetup)) sb.Append(" and enabled");
|
if(ATAID.EnabledSATAFeatures.HasFlag(SATAFeaturesBit.DMASetup)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.SATAFeatures.HasFlag(SATAFeaturesBit.InitPowerMgmt))
|
if(ATAID.SATAFeatures.HasFlag(SATAFeaturesBit.InitPowerMgmt))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("Device-initiated power management is supported");
|
sb.AppendLine().Append("Device-initiated power management is supported");
|
||||||
if(ATAID.EnabledSATAFeatures.HasFlag(SATAFeaturesBit.InitPowerMgmt)) sb.Append(" and enabled");
|
if(ATAID.EnabledSATAFeatures.HasFlag(SATAFeaturesBit.InitPowerMgmt)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.SATAFeatures.HasFlag(SATAFeaturesBit.InOrderData))
|
if(ATAID.SATAFeatures.HasFlag(SATAFeaturesBit.InOrderData))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("In-order data delivery is supported");
|
sb.AppendLine().Append("In-order data delivery is supported");
|
||||||
if(ATAID.EnabledSATAFeatures.HasFlag(SATAFeaturesBit.InOrderData)) sb.Append(" and enabled");
|
if(ATAID.EnabledSATAFeatures.HasFlag(SATAFeaturesBit.InOrderData)) sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!atapi)
|
if(!atapi)
|
||||||
if(ATAID.SATAFeatures.HasFlag(SATAFeaturesBit.HardwareFeatureControl))
|
if(ATAID.SATAFeatures.HasFlag(SATAFeaturesBit.HardwareFeatureControl))
|
||||||
{
|
{
|
||||||
@@ -3238,6 +3342,7 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
if(ATAID.EnabledSATAFeatures.HasFlag(SATAFeaturesBit.HardwareFeatureControl))
|
if(ATAID.EnabledSATAFeatures.HasFlag(SATAFeaturesBit.HardwareFeatureControl))
|
||||||
sb.Append(" and enabled");
|
sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(atapi)
|
if(atapi)
|
||||||
if(ATAID.SATAFeatures.HasFlag(SATAFeaturesBit.AsyncNotification))
|
if(ATAID.SATAFeatures.HasFlag(SATAFeaturesBit.AsyncNotification))
|
||||||
{
|
{
|
||||||
@@ -3245,18 +3350,21 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
if(ATAID.EnabledSATAFeatures.HasFlag(SATAFeaturesBit.AsyncNotification))
|
if(ATAID.EnabledSATAFeatures.HasFlag(SATAFeaturesBit.AsyncNotification))
|
||||||
sb.Append(" and enabled");
|
sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.SATAFeatures.HasFlag(SATAFeaturesBit.SettingsPreserve))
|
if(ATAID.SATAFeatures.HasFlag(SATAFeaturesBit.SettingsPreserve))
|
||||||
{
|
{
|
||||||
sb.AppendLine().Append("Software Settings Preservation is supported");
|
sb.AppendLine().Append("Software Settings Preservation is supported");
|
||||||
if(ATAID.EnabledSATAFeatures.HasFlag(SATAFeaturesBit.SettingsPreserve))
|
if(ATAID.EnabledSATAFeatures.HasFlag(SATAFeaturesBit.SettingsPreserve))
|
||||||
sb.Append(" and enabled");
|
sb.Append(" and enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ATAID.SATAFeatures.HasFlag(SATAFeaturesBit.NCQAutoSense))
|
if(ATAID.SATAFeatures.HasFlag(SATAFeaturesBit.NCQAutoSense))
|
||||||
sb.AppendLine().Append("NCQ Autosense is supported");
|
sb.AppendLine().Append("NCQ Autosense is supported");
|
||||||
if(ATAID.EnabledSATAFeatures.HasFlag(SATAFeaturesBit.EnabledSlumber))
|
if(ATAID.EnabledSATAFeatures.HasFlag(SATAFeaturesBit.EnabledSlumber))
|
||||||
sb.AppendLine().Append("Automatic Partial to Slumber transitions are enabled");
|
sb.AppendLine().Append("Automatic Partial to Slumber transitions are enabled");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if((ATAID.RemovableStatusSet & 0x03) > 0)
|
if((ATAID.RemovableStatusSet & 0x03) > 0)
|
||||||
sb.AppendLine().Append("Removable Media Status Notification feature set is supported");
|
sb.AppendLine().Append("Removable Media Status Notification feature set is supported");
|
||||||
|
|
||||||
@@ -3343,6 +3451,7 @@ namespace DiscImageChef.Decoders.ATA
|
|||||||
|
|
||||||
sb.AppendLine().AppendFormat("Version {0}", (ATAID.NVCacheCaps & 0x0F00) >> 8).AppendLine();
|
sb.AppendLine().AppendFormat("Version {0}", (ATAID.NVCacheCaps & 0x0F00) >> 8).AppendLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.AppendLine().AppendFormat("Non-Volatile Cache is {0} bytes", ATAID.NVCacheSize * logicalsectorsize)
|
sb.AppendLine().AppendFormat("Non-Volatile Cache is {0} bytes", ATAID.NVCacheSize * logicalsectorsize)
|
||||||
.AppendLine();
|
.AppendLine();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,6 +124,7 @@ namespace DiscImageChef.Decoders.Bluray
|
|||||||
if(response.CWP) sb.AppendLine("Media has write protection bit marked, shouldn't");
|
if(response.CWP) sb.AppendLine("Media has write protection bit marked, shouldn't");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -356,6 +356,7 @@ namespace DiscImageChef.Decoders.CD
|
|||||||
sb.AppendFormat("Unknown CD-RW disc subtype: {0}", response.DiscSubType).AppendLine();
|
sb.AppendFormat("Unknown CD-RW disc subtype: {0}", response.DiscSubType).AppendLine();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(response.ReferenceSpeed)
|
switch(response.ReferenceSpeed)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
|
|||||||
@@ -204,10 +204,8 @@ namespace DiscImageChef.Decoders.CD
|
|||||||
sb.AppendFormat("First complete session number: {0}", response.FirstCompleteSession).AppendLine();
|
sb.AppendFormat("First complete session number: {0}", response.FirstCompleteSession).AppendLine();
|
||||||
sb.AppendFormat("Last complete session number: {0}", response.LastCompleteSession).AppendLine();
|
sb.AppendFormat("Last complete session number: {0}", response.LastCompleteSession).AppendLine();
|
||||||
foreach(TrackDataDescriptor descriptor in response.TrackDescriptors)
|
foreach(TrackDataDescriptor descriptor in response.TrackDescriptors)
|
||||||
if((descriptor.CONTROL & 0x08) ==
|
if((descriptor.CONTROL & 0x08) == 0x08 ||
|
||||||
0x08 ||
|
descriptor.ADR != 1 && descriptor.ADR != 5 && descriptor.ADR != 4 && descriptor.ADR != 6 ||
|
||||||
descriptor.ADR != 1 && descriptor.ADR != 5 && descriptor.ADR != 4 &&
|
|
||||||
descriptor.ADR != 6 ||
|
|
||||||
descriptor.TNO != 0)
|
descriptor.TNO != 0)
|
||||||
{
|
{
|
||||||
sb.AppendLine("Unknown TOC entry format, printing values as-is");
|
sb.AppendLine("Unknown TOC entry format, printing values as-is");
|
||||||
|
|||||||
@@ -216,8 +216,10 @@ namespace DiscImageChef.Decoders.DVD
|
|||||||
dds.InProcess |= (response[7] & 0x80) == 0x80;
|
dds.InProcess |= (response[7] & 0x80) == 0x80;
|
||||||
dds.UserCertification |= (response[7] & 0x02) == 0x02;
|
dds.UserCertification |= (response[7] & 0x02) == 0x02;
|
||||||
dds.ManufacturerCertification |= (response[7] & 0x01) == 0x01;
|
dds.ManufacturerCertification |= (response[7] & 0x01) == 0x01;
|
||||||
dds.UpdateCount = (uint)((response[8] << 24) + (response[9] << 16) + (response[10] << 8) + response[11]);
|
dds.UpdateCount =
|
||||||
dds.Groups = (ushort)((response[12] << 8) + response[13]);
|
(uint)((response[8] << 24) + (response[9] << 16) + (response[10] << 8) + response[11]);
|
||||||
|
dds.Groups =
|
||||||
|
(ushort)((response[12] << 8) + response[13]);
|
||||||
|
|
||||||
// ECMA-272
|
// ECMA-272
|
||||||
if(dds.Groups == 24)
|
if(dds.Groups == 24)
|
||||||
@@ -290,6 +292,7 @@ namespace DiscImageChef.Decoders.DVD
|
|||||||
if(decoded.GroupCertificationFlags[i].PartialCertification)
|
if(decoded.GroupCertificationFlags[i].PartialCertification)
|
||||||
sb.AppendFormat("Group {0} is being certified partially", i).AppendLine();
|
sb.AppendFormat("Group {0} is being certified partially", i).AppendLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(decoded.GroupCertificationFlags[i].UserCertification)
|
if(decoded.GroupCertificationFlags[i].UserCertification)
|
||||||
sb.AppendFormat("Group {0} has been certified by an user", i).AppendLine();
|
sb.AppendFormat("Group {0} has been certified by an user", i).AppendLine();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1095,7 +1095,8 @@ namespace DiscImageChef.Decoders.DVD
|
|||||||
(uint)((response[8] << 24) + (response[9] << 16) + (response[10] << 8) + response[11]);
|
(uint)((response[8] << 24) + (response[9] << 16) + (response[10] << 8) + response[11]);
|
||||||
pfi.DataAreaEndPSN =
|
pfi.DataAreaEndPSN =
|
||||||
(uint)((response[12] << 24) + (response[13] << 16) + (response[14] << 8) + response[15]);
|
(uint)((response[12] << 24) + (response[13] << 16) + (response[14] << 8) + response[15]);
|
||||||
pfi.Layer0EndPSN = (uint)((response[16] << 24) + (response[17] << 16) + (response[18] << 8) + response[19]);
|
pfi.Layer0EndPSN =
|
||||||
|
(uint)((response[16] << 24) + (response[17] << 16) + (response[18] << 8) + response[19]);
|
||||||
pfi.BCA |= (response[20] & 0x80) == 0x80;
|
pfi.BCA |= (response[20] & 0x80) == 0x80;
|
||||||
|
|
||||||
switch(pfi.DiskCategory)
|
switch(pfi.DiskCategory)
|
||||||
@@ -1198,6 +1199,7 @@ namespace DiscImageChef.Decoders.DVD
|
|||||||
pfi.PowerRatioLandThreshold6T = response[626];
|
pfi.PowerRatioLandThreshold6T = response[626];
|
||||||
pfi.PowerRatioGrooveThreshold6T = response[627];
|
pfi.PowerRatioGrooveThreshold6T = response[627];
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
// DVD-R and DVD-RW
|
// DVD-R and DVD-RW
|
||||||
case DiskCategory.DVDR when pfi.PartVersion < 6:
|
case DiskCategory.DVDR when pfi.PartVersion < 6:
|
||||||
@@ -1602,7 +1604,8 @@ namespace DiscImageChef.Decoders.DVD
|
|||||||
if(decoded.Layers == 1 && !decoded.TrackPath)
|
if(decoded.Layers == 1 && !decoded.TrackPath)
|
||||||
sb.AppendFormat("Layer 0 ends at PSN {0:X}h", decoded.Layer0EndPSN).AppendLine();
|
sb.AppendFormat("Layer 0 ends at PSN {0:X}h", decoded.Layer0EndPSN).AppendLine();
|
||||||
}
|
}
|
||||||
else sb.AppendLine("Disc is empty");
|
else
|
||||||
|
sb.AppendLine("Disc is empty");
|
||||||
else sb.AppendLine("Disc is empty");
|
else sb.AppendLine("Disc is empty");
|
||||||
|
|
||||||
if(decoded.BCA) sb.AppendLine("Disc has a burst cutting area");
|
if(decoded.BCA) sb.AppendLine("Disc has a burst cutting area");
|
||||||
@@ -1632,6 +1635,7 @@ namespace DiscImageChef.Decoders.DVD
|
|||||||
sb.AppendFormat("Disc manufacturer supplementary information is {0}",
|
sb.AppendFormat("Disc manufacturer supplementary information is {0}",
|
||||||
decoded.DiskManufacturerSupplementary).AppendLine();
|
decoded.DiskManufacturerSupplementary).AppendLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case DiskCategory.DVDR when decoded.PartVersion < 6:
|
case DiskCategory.DVDR when decoded.PartVersion < 6:
|
||||||
case DiskCategory.DVDRW when decoded.PartVersion < 3:
|
case DiskCategory.DVDRW when decoded.PartVersion < 3:
|
||||||
|
|||||||
@@ -48,11 +48,13 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set to 0x00
|
/// Set to 0x00
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] zero;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
|
||||||
|
public byte[] zero;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set to 0xA1
|
/// Set to 0xA1
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] sync;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
|
||||||
|
public byte[] sync;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set to 0xFF
|
/// Set to 0xFF
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -72,7 +74,8 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// OS dependent tag
|
/// OS dependent tag
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] label;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||||
|
public byte[] label;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checksum from <see cref="amiga" /> to <see cref="label" />
|
/// Checksum from <see cref="amiga" /> to <see cref="label" />
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -81,7 +84,8 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// Checksum from <see cref="data" />
|
/// Checksum from <see cref="data" />
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public uint dataChecksum;
|
public uint dataChecksum;
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)] public byte[] data;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)]
|
||||||
|
public byte[] data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -93,33 +93,39 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// checksum[0] = (decodedChecksum >> 1) | 0xAA
|
/// checksum[0] = (decodedChecksum >> 1) | 0xAA
|
||||||
/// checksum[1] = decodedChecksum | 0xAA
|
/// checksum[1] = decodedChecksum | 0xAA
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] checksum;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
|
||||||
|
public byte[] checksum;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Always 0xDE, 0xAA, 0xEB
|
/// Always 0xDE, 0xAA, 0xEB
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] epilogue;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||||
|
public byte[] epilogue;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Always 0xD5, 0xAA, 0x96
|
/// Always 0xD5, 0xAA, 0x96
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] prologue;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||||
|
public byte[] prologue;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sector number encoded as:
|
/// Sector number encoded as:
|
||||||
/// sector[0] = (decodedSector >> 1) | 0xAA
|
/// sector[0] = (decodedSector >> 1) | 0xAA
|
||||||
/// sector[1] = decodedSector | 0xAA
|
/// sector[1] = decodedSector | 0xAA
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] sector;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
|
||||||
|
public byte[] sector;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Track number encoded as:
|
/// Track number encoded as:
|
||||||
/// track[0] = (decodedTrack >> 1) | 0xAA
|
/// track[0] = (decodedTrack >> 1) | 0xAA
|
||||||
/// track[1] = decodedTrack | 0xAA
|
/// track[1] = decodedTrack | 0xAA
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] track;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
|
||||||
|
public byte[] track;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Volume number encoded as:
|
/// Volume number encoded as:
|
||||||
/// volume[0] = (decodedVolume >> 1) | 0xAA
|
/// volume[0] = (decodedVolume >> 1) | 0xAA
|
||||||
/// volume[1] = decodedVolume | 0xAA
|
/// volume[1] = decodedVolume | 0xAA
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] volume;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
|
||||||
|
public byte[] volume;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -137,11 +143,13 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Always 0xDE, 0xAA, 0xEB
|
/// Always 0xDE, 0xAA, 0xEB
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] epilogue;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||||
|
public byte[] epilogue;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Always 0xD5, 0xAA, 0xAD
|
/// Always 0xD5, 0xAA, 0xAD
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] prologue;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||||
|
public byte[] prologue;
|
||||||
}
|
}
|
||||||
|
|
||||||
static readonly byte[] ReadTable5and3 =
|
static readonly byte[] ReadTable5and3 =
|
||||||
@@ -296,8 +304,10 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
public static byte[] DecodeSector(RawSector sector)
|
public static byte[] DecodeSector(RawSector sector)
|
||||||
{
|
{
|
||||||
if(sector.addressField.prologue[0] != 0xD5 || sector.addressField.prologue[1] != 0xAA) return null;
|
if(sector.addressField.prologue[0] != 0xD5 || sector.addressField.prologue[1] != 0xAA) return null;
|
||||||
|
|
||||||
// Pre DOS 3.3
|
// Pre DOS 3.3
|
||||||
if(sector.addressField.prologue[2] == 0xB5) return Decode5and3(sector.dataField.data);
|
if(sector.addressField.prologue[2] == 0xB5) return Decode5and3(sector.dataField.data);
|
||||||
|
|
||||||
// DOS 3.3
|
// DOS 3.3
|
||||||
return sector.addressField.prologue[2] == 0x96 ? Decode6and2(sector.dataField.data) : null;
|
return sector.addressField.prologue[2] == 0x96 ? Decode6and2(sector.dataField.data) : null;
|
||||||
// Unknown
|
// Unknown
|
||||||
@@ -340,7 +350,8 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
track = new[] {data[position + 5], data[position + 6]},
|
track = new[] {data[position + 5], data[position + 6]},
|
||||||
sector = new[] {data[position + 7], data[position + 8]},
|
sector = new[] {data[position + 7], data[position + 8]},
|
||||||
checksum = new[] {data[position + 9], data[position + 10]},
|
checksum = new[] {data[position + 9], data[position + 10]},
|
||||||
epilogue = new[] {data[position + 11], data[position + 12], data[position + 13]}
|
epilogue = new[]
|
||||||
|
{data[position + 11], data[position + 12], data[position + 13]}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,8 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Always 0xDE, 0xAA
|
/// Always 0xDE, 0xAA
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] epilogue;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
|
||||||
|
public byte[] epilogue;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Disk format
|
/// Disk format
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -106,7 +107,8 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Always 0xD5, 0xAA, 0x96
|
/// Always 0xD5, 0xAA, 0x96
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] prologue;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||||
|
public byte[] prologue;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Encoded sector number
|
/// Encoded sector number
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -129,19 +131,23 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checksum
|
/// Checksum
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] public byte[] checksum;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
|
||||||
|
public byte[] checksum;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Encoded data bytes.
|
/// Encoded data bytes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 698)] public byte[] data;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 698)]
|
||||||
|
public byte[] data;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Always 0xDE, 0xAA
|
/// Always 0xDE, 0xAA
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] epilogue;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
|
||||||
|
public byte[] epilogue;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Always 0xD5, 0xAA, 0xAD
|
/// Always 0xD5, 0xAA, 0xAD
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] prologue;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||||
|
public byte[] prologue;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Spare, usually <see cref="RawAddressField.sector" />
|
/// Spare, usually <see cref="RawAddressField.sector" />
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -190,6 +196,7 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
ck3++;
|
ck3++;
|
||||||
ck1 &= 0xFF;
|
ck1 &= 0xFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
ms.WriteByte(carry);
|
ms.WriteByte(carry);
|
||||||
|
|
||||||
carry = (byte)((bf2[j] ^ ck3) & 0xFF);
|
carry = (byte)((bf2[j] ^ ck3) & 0xFF);
|
||||||
@@ -199,6 +206,7 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
ck2++;
|
ck2++;
|
||||||
ck3 &= 0xFF;
|
ck3 &= 0xFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
ms.WriteByte(carry);
|
ms.WriteByte(carry);
|
||||||
|
|
||||||
if(ms.Length == 524) break;
|
if(ms.Length == 524) break;
|
||||||
@@ -210,6 +218,7 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
ck1++;
|
ck1++;
|
||||||
ck2 &= 0xFF;
|
ck2 &= 0xFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
ms.WriteByte(carry);
|
ms.WriteByte(carry);
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,7 +86,8 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// User data
|
/// User data
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] public byte data;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)]
|
||||||
|
public byte data;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// XOR of <see cref="data" />
|
/// XOR of <see cref="data" />
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -61,7 +61,8 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Start of track, 32 bytes set to 0x4E
|
/// Start of track, 32 bytes set to 0x4E
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] public byte[] innerGap;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
|
||||||
|
public byte[] innerGap;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Track sectors
|
/// Track sectors
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -84,7 +85,8 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 22 bytes set to 0x4E, set to 0x22 on Commodore 1581
|
/// 22 bytes set to 0x4E, set to 0x22 on Commodore 1581
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 22)] public byte[] innerGap;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 22)]
|
||||||
|
public byte[] innerGap;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sector data block
|
/// Sector data block
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -103,11 +105,13 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 12 bytes set to 0
|
/// 12 bytes set to 0
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
|
||||||
|
public byte[] zero;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 3 bytes set to 0xA1
|
/// 3 bytes set to 0xA1
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||||
|
public byte[] aone;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set to <see cref="IBMIdType.AddressMark" />
|
/// Set to <see cref="IBMIdType.AddressMark" />
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -142,11 +146,13 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 12 bytes set to 0
|
/// 12 bytes set to 0
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
|
||||||
|
public byte[] zero;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 3 bytes set to 0xA1
|
/// 3 bytes set to 0xA1
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||||
|
public byte[] aone;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set to <see cref="IBMIdType.DataMark" /> or to <see cref="IBMIdType.DeletedDataMark" />
|
/// Set to <see cref="IBMIdType.DataMark" /> or to <see cref="IBMIdType.DeletedDataMark" />
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -84,7 +84,8 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 41 bytes set to 0x4E
|
/// 41 bytes set to 0x4E
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 41)] public byte[] innerGap;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 41)]
|
||||||
|
public byte[] innerGap;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sector data block
|
/// Sector data block
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -104,15 +105,18 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gap from index pulse, 80 bytes set to 0x4E
|
/// Gap from index pulse, 80 bytes set to 0x4E
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 80)] public byte[] gap;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 80)]
|
||||||
|
public byte[] gap;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 12 bytes set to 0x00
|
/// 12 bytes set to 0x00
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
|
||||||
|
public byte[] zero;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 3 bytes set to 0xC2
|
/// 3 bytes set to 0xC2
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] ctwo;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||||
|
public byte[] ctwo;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set to <see cref="IBMIdType.IndexMark" />
|
/// Set to <see cref="IBMIdType.IndexMark" />
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -120,7 +124,8 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gap until first sector, 50 bytes to 0x4E
|
/// Gap until first sector, 50 bytes to 0x4E
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] public byte[] gap1;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)]
|
||||||
|
public byte[] gap1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -131,11 +136,13 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 12 bytes set to 0
|
/// 12 bytes set to 0
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
|
||||||
|
public byte[] zero;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 3 bytes set to 0xA1
|
/// 3 bytes set to 0xA1
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||||
|
public byte[] aone;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set to <see cref="IBMIdType.AddressMark" />
|
/// Set to <see cref="IBMIdType.AddressMark" />
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -170,11 +177,13 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 12 bytes set to 0
|
/// 12 bytes set to 0
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
|
||||||
|
public byte[] zero;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 3 bytes set to 0xA1
|
/// 3 bytes set to 0xA1
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||||
|
public byte[] aone;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set to <see cref="IBMIdType.DataMark" /> or to <see cref="IBMIdType.DeletedDataMark" />
|
/// Set to <see cref="IBMIdType.DataMark" /> or to <see cref="IBMIdType.DeletedDataMark" />
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -82,15 +82,18 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gap from index pulse, 80 bytes set to 0x4E
|
/// Gap from index pulse, 80 bytes set to 0x4E
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 80)] public byte[] gap;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 80)]
|
||||||
|
public byte[] gap;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 12 bytes set to 0x00
|
/// 12 bytes set to 0x00
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
|
||||||
|
public byte[] zero;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 3 bytes set to 0xC2
|
/// 3 bytes set to 0xC2
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] ctwo;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||||
|
public byte[] ctwo;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set to <see cref="IBMIdType.IndexMark" />
|
/// Set to <see cref="IBMIdType.IndexMark" />
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -98,7 +101,8 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gap until first sector, 50 bytes to 0x4E
|
/// Gap until first sector, 50 bytes to 0x4E
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] public byte[] gap1;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)]
|
||||||
|
public byte[] gap1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -113,7 +117,8 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 22 bytes set to 0x4E, set to 0x22 on Commodore 1581
|
/// 22 bytes set to 0x4E, set to 0x22 on Commodore 1581
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 22)] public byte[] innerGap;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 22)]
|
||||||
|
public byte[] innerGap;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sector data block
|
/// Sector data block
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -132,11 +137,13 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 12 bytes set to 0
|
/// 12 bytes set to 0
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
|
||||||
|
public byte[] zero;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 3 bytes set to 0xA1
|
/// 3 bytes set to 0xA1
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||||
|
public byte[] aone;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set to <see cref="IBMIdType.AddressMark" />
|
/// Set to <see cref="IBMIdType.AddressMark" />
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -171,11 +178,13 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 12 bytes set to 0
|
/// 12 bytes set to 0
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
|
||||||
|
public byte[] zero;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 3 bytes set to 0xA1
|
/// 3 bytes set to 0xA1
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||||
|
public byte[] aone;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set to <see cref="IBMIdType.DataMark" /> or to <see cref="IBMIdType.DeletedDataMark" />
|
/// Set to <see cref="IBMIdType.DataMark" /> or to <see cref="IBMIdType.DeletedDataMark" />
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -80,11 +80,13 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gap from index pulse, 80 bytes set to 0xFF
|
/// Gap from index pulse, 80 bytes set to 0xFF
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)] public byte[] gap;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)]
|
||||||
|
public byte[] gap;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 6 bytes set to 0x00
|
/// 6 bytes set to 0x00
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public byte[] zero;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
||||||
|
public byte[] zero;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set to <see cref="IBMIdType.IndexMark" />
|
/// Set to <see cref="IBMIdType.IndexMark" />
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -92,7 +94,8 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gap until first sector, 26 bytes to 0xFF
|
/// Gap until first sector, 26 bytes to 0xFF
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 26)] public byte[] gap1;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 26)]
|
||||||
|
public byte[] gap1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -107,7 +110,8 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 11 bytes set to 0xFF
|
/// 11 bytes set to 0xFF
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 11)] public byte[] innerGap;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 11)]
|
||||||
|
public byte[] innerGap;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sector data block
|
/// Sector data block
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -126,7 +130,8 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 6 bytes set to 0
|
/// 6 bytes set to 0
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public byte[] zero;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
||||||
|
public byte[] zero;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set to <see cref="IBMIdType.AddressMark" />
|
/// Set to <see cref="IBMIdType.AddressMark" />
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -161,7 +166,8 @@ namespace DiscImageChef.Decoders.Floppy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 12 bytes set to 0
|
/// 12 bytes set to 0
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
|
||||||
|
public byte[] zero;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set to <see cref="IBMIdType.DataMark" /> or to <see cref="IBMIdType.DeletedDataMark" />
|
/// Set to <see cref="IBMIdType.DataMark" /> or to <see cref="IBMIdType.DeletedDataMark" />
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -117,7 +117,8 @@ namespace DiscImageChef.Decoders.MMC
|
|||||||
WriteMisalignment = (response[6] & 0x40) == 0x40,
|
WriteMisalignment = (response[6] & 0x40) == 0x40,
|
||||||
ReadMisalignment = (response[6] & 0x20) == 0x20,
|
ReadMisalignment = (response[6] & 0x20) == 0x20,
|
||||||
DSRImplemented = (response[6] & 0x10) == 0x10,
|
DSRImplemented = (response[6] & 0x10) == 0x10,
|
||||||
Size = (ushort)(((response[6] & 0x03) << 10) + (response[7] << 2) + ((response[8] & 0xC0) >> 6)),
|
Size =
|
||||||
|
(ushort)(((response[6] & 0x03) << 10) + (response[7] << 2) + ((response[8] & 0xC0) >> 6)),
|
||||||
ReadCurrentAtVddMin = (byte)((response[8] & 0x38) >> 3),
|
ReadCurrentAtVddMin = (byte)((response[8] & 0x38) >> 3),
|
||||||
ReadCurrentAtVddMax = (byte)(response[8] & 0x07),
|
ReadCurrentAtVddMax = (byte)(response[8] & 0x07),
|
||||||
WriteCurrentAtVddMin = (byte)((response[9] & 0xE0) >> 5),
|
WriteCurrentAtVddMin = (byte)((response[9] & 0xE0) >> 5),
|
||||||
@@ -338,7 +339,9 @@ namespace DiscImageChef.Decoders.MMC
|
|||||||
sb.AppendFormat("\tDevice's clock frequency: {0}{1}", result, unit).AppendLine();
|
sb.AppendFormat("\tDevice's clock frequency: {0}{1}", result, unit).AppendLine();
|
||||||
|
|
||||||
unit = "";
|
unit = "";
|
||||||
for(int cl = 0, mask = 1; cl <= 11; cl++, mask <<= 1) if((csd.Classes & mask) == mask) unit += $" {cl}";
|
for(int cl = 0, mask = 1; cl <= 11; cl++, mask <<= 1)
|
||||||
|
if((csd.Classes & mask) == mask)
|
||||||
|
unit += $" {cl}";
|
||||||
|
|
||||||
sb.AppendFormat("\tDevice support command classes {0}", unit).AppendLine();
|
sb.AppendFormat("\tDevice support command classes {0}", unit).AppendLine();
|
||||||
if(csd.ReadBlockLength == 15) sb.AppendLine("\tRead block length size is defined in extended CSD");
|
if(csd.ReadBlockLength == 15) sb.AppendLine("\tRead block length size is defined in extended CSD");
|
||||||
|
|||||||
@@ -44,7 +44,8 @@ namespace DiscImageChef.Decoders.MMC
|
|||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
public class ExtendedCSD
|
public class ExtendedCSD
|
||||||
{
|
{
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public byte[] Reserved0;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
||||||
|
public byte[] Reserved0;
|
||||||
public byte ExtendedSecurityCommandsError;
|
public byte ExtendedSecurityCommandsError;
|
||||||
public byte SupportedCommandSets;
|
public byte SupportedCommandSets;
|
||||||
public byte HPIFeatures;
|
public byte HPIFeatures;
|
||||||
@@ -62,11 +63,13 @@ namespace DiscImageChef.Decoders.MMC
|
|||||||
public byte OperationCodesTimeout;
|
public byte OperationCodesTimeout;
|
||||||
public uint FFUArgument;
|
public uint FFUArgument;
|
||||||
public byte BarrierSupport;
|
public byte BarrierSupport;
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 177)] public byte[] Reserved1;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 177)]
|
||||||
|
public byte[] Reserved1;
|
||||||
public byte CMDQueuingSupport;
|
public byte CMDQueuingSupport;
|
||||||
public byte CMDQueuingDepth;
|
public byte CMDQueuingDepth;
|
||||||
public uint NumberofFWSectorsCorrectlyProgrammed;
|
public uint NumberofFWSectorsCorrectlyProgrammed;
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] public byte[] VendorHealthReport;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
|
||||||
|
public byte[] VendorHealthReport;
|
||||||
public byte DeviceLifeEstimationTypeB;
|
public byte DeviceLifeEstimationTypeB;
|
||||||
public byte DeviceLifeEstimationTypeA;
|
public byte DeviceLifeEstimationTypeA;
|
||||||
public byte PreEOLInformation;
|
public byte PreEOLInformation;
|
||||||
@@ -160,11 +163,14 @@ namespace DiscImageChef.Decoders.MMC
|
|||||||
public byte HWResetFunction;
|
public byte HWResetFunction;
|
||||||
public byte HPIManagement;
|
public byte HPIManagement;
|
||||||
public byte PartitioningSupport;
|
public byte PartitioningSupport;
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] MaxEnhancedAreaSize;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||||
|
public byte[] MaxEnhancedAreaSize;
|
||||||
public byte PartitionsAttribute;
|
public byte PartitionsAttribute;
|
||||||
public byte PartitioningSetting;
|
public byte PartitioningSetting;
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] GeneralPurposePartitionSize;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] EnhancedUserDataAreaSize;
|
public byte[] GeneralPurposePartitionSize;
|
||||||
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||||
|
public byte[] EnhancedUserDataAreaSize;
|
||||||
public uint EnhancedUserDataStartAddress;
|
public uint EnhancedUserDataStartAddress;
|
||||||
public byte Reserved15;
|
public byte Reserved15;
|
||||||
public byte BadBlockManagementMode;
|
public byte BadBlockManagementMode;
|
||||||
@@ -173,7 +179,8 @@ namespace DiscImageChef.Decoders.MMC
|
|||||||
public byte PeriodicWakeUp;
|
public byte PeriodicWakeUp;
|
||||||
public byte SupportsProgramCxDInDDR;
|
public byte SupportsProgramCxDInDDR;
|
||||||
public ushort Reserved16;
|
public ushort Reserved16;
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] public byte[] VendorSpecific;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)]
|
||||||
|
public byte[] VendorSpecific;
|
||||||
public byte NativeSectorSize;
|
public byte NativeSectorSize;
|
||||||
public byte SectorSizeEmulation;
|
public byte SectorSizeEmulation;
|
||||||
public byte SectorSize;
|
public byte SectorSize;
|
||||||
@@ -183,7 +190,8 @@ namespace DiscImageChef.Decoders.MMC
|
|||||||
public ushort ExceptionEventsControl;
|
public ushort ExceptionEventsControl;
|
||||||
public ushort ExceptionEventsStatus;
|
public ushort ExceptionEventsStatus;
|
||||||
public ushort ExtendedPartitionsAttribute;
|
public ushort ExtendedPartitionsAttribute;
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 15)] public byte[] ContextConfiguration;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 15)]
|
||||||
|
public byte[] ContextConfiguration;
|
||||||
public byte PackedCommandStatus;
|
public byte PackedCommandStatus;
|
||||||
public byte PackedCommandFailureIndex;
|
public byte PackedCommandFailureIndex;
|
||||||
public byte PowerOffNotification;
|
public byte PowerOffNotification;
|
||||||
@@ -199,7 +207,8 @@ namespace DiscImageChef.Decoders.MMC
|
|||||||
public byte ProductStateAwarenessEnablement;
|
public byte ProductStateAwarenessEnablement;
|
||||||
public byte SecureRemovalType;
|
public byte SecureRemovalType;
|
||||||
public byte CommandQueueModeEnable;
|
public byte CommandQueueModeEnable;
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 15)] public byte[] Reserved18;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 15)]
|
||||||
|
public byte[] Reserved18;
|
||||||
}
|
}
|
||||||
|
|
||||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
|||||||
@@ -1418,6 +1418,7 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
sb.AppendFormat("\tDevice responded to ATA command {0:X2}h", page.CommandCode).AppendLine();
|
sb.AppendFormat("\tDevice responded to ATA command {0:X2}h", page.CommandCode).AppendLine();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(page.Signature[0])
|
switch(page.Signature[0])
|
||||||
{
|
{
|
||||||
case 0x00:
|
case 0x00:
|
||||||
@@ -2332,7 +2333,8 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
|
|
||||||
array = new List<byte>();
|
array = new List<byte>();
|
||||||
}
|
}
|
||||||
else array.Add(pageResponse[pos]);
|
else
|
||||||
|
array.Add(pageResponse[pos]);
|
||||||
|
|
||||||
return decoded;
|
return decoded;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,17 +82,20 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
decoded.PeripheralQualifier = (byte)((SCSIInquiryResponse[0] & 0xE0) >> 5);
|
decoded.PeripheralQualifier = (byte)((SCSIInquiryResponse[0] & 0xE0) >> 5);
|
||||||
decoded.PeripheralDeviceType = (byte)(SCSIInquiryResponse[0] & 0x1F);
|
decoded.PeripheralDeviceType = (byte)(SCSIInquiryResponse[0] & 0x1F);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SCSIInquiryResponse.Length >= 2)
|
if(SCSIInquiryResponse.Length >= 2)
|
||||||
{
|
{
|
||||||
decoded.RMB = Convert.ToBoolean(SCSIInquiryResponse[1] & 0x80);
|
decoded.RMB = Convert.ToBoolean(SCSIInquiryResponse[1] & 0x80);
|
||||||
decoded.DeviceTypeModifier = (byte)(SCSIInquiryResponse[1] & 0x7F);
|
decoded.DeviceTypeModifier = (byte)(SCSIInquiryResponse[1] & 0x7F);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SCSIInquiryResponse.Length >= 3)
|
if(SCSIInquiryResponse.Length >= 3)
|
||||||
{
|
{
|
||||||
decoded.ISOVersion = (byte)((SCSIInquiryResponse[2] & 0xC0) >> 6);
|
decoded.ISOVersion = (byte)((SCSIInquiryResponse[2] & 0xC0) >> 6);
|
||||||
decoded.ECMAVersion = (byte)((SCSIInquiryResponse[2] & 0x38) >> 3);
|
decoded.ECMAVersion = (byte)((SCSIInquiryResponse[2] & 0x38) >> 3);
|
||||||
decoded.ANSIVersion = (byte)(SCSIInquiryResponse[2] & 0x07);
|
decoded.ANSIVersion = (byte)(SCSIInquiryResponse[2] & 0x07);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SCSIInquiryResponse.Length >= 4)
|
if(SCSIInquiryResponse.Length >= 4)
|
||||||
{
|
{
|
||||||
decoded.AERC = Convert.ToBoolean(SCSIInquiryResponse[3] & 0x80);
|
decoded.AERC = Convert.ToBoolean(SCSIInquiryResponse[3] & 0x80);
|
||||||
@@ -101,6 +104,7 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
decoded.HiSup = Convert.ToBoolean(SCSIInquiryResponse[3] & 0x10);
|
decoded.HiSup = Convert.ToBoolean(SCSIInquiryResponse[3] & 0x10);
|
||||||
decoded.ResponseDataFormat = (byte)(SCSIInquiryResponse[3] & 0x07);
|
decoded.ResponseDataFormat = (byte)(SCSIInquiryResponse[3] & 0x07);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SCSIInquiryResponse.Length >= 5) decoded.AdditionalLength = SCSIInquiryResponse[4];
|
if(SCSIInquiryResponse.Length >= 5) decoded.AdditionalLength = SCSIInquiryResponse[4];
|
||||||
if(SCSIInquiryResponse.Length >= 6)
|
if(SCSIInquiryResponse.Length >= 6)
|
||||||
{
|
{
|
||||||
@@ -111,6 +115,7 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
decoded.Reserved2 = (byte)((SCSIInquiryResponse[5] & 0x06) >> 1);
|
decoded.Reserved2 = (byte)((SCSIInquiryResponse[5] & 0x06) >> 1);
|
||||||
decoded.Protect = Convert.ToBoolean(SCSIInquiryResponse[5] & 0x01);
|
decoded.Protect = Convert.ToBoolean(SCSIInquiryResponse[5] & 0x01);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SCSIInquiryResponse.Length >= 7)
|
if(SCSIInquiryResponse.Length >= 7)
|
||||||
{
|
{
|
||||||
decoded.BQue = Convert.ToBoolean(SCSIInquiryResponse[6] & 0x80);
|
decoded.BQue = Convert.ToBoolean(SCSIInquiryResponse[6] & 0x80);
|
||||||
@@ -122,6 +127,7 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
decoded.Addr32 = Convert.ToBoolean(SCSIInquiryResponse[6] & 0x02);
|
decoded.Addr32 = Convert.ToBoolean(SCSIInquiryResponse[6] & 0x02);
|
||||||
decoded.Addr16 = Convert.ToBoolean(SCSIInquiryResponse[6] & 0x01);
|
decoded.Addr16 = Convert.ToBoolean(SCSIInquiryResponse[6] & 0x01);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SCSIInquiryResponse.Length >= 8)
|
if(SCSIInquiryResponse.Length >= 8)
|
||||||
{
|
{
|
||||||
decoded.RelAddr = Convert.ToBoolean(SCSIInquiryResponse[7] & 0x80);
|
decoded.RelAddr = Convert.ToBoolean(SCSIInquiryResponse[7] & 0x80);
|
||||||
@@ -133,21 +139,25 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
decoded.CmdQue = Convert.ToBoolean(SCSIInquiryResponse[7] & 0x02);
|
decoded.CmdQue = Convert.ToBoolean(SCSIInquiryResponse[7] & 0x02);
|
||||||
decoded.SftRe = Convert.ToBoolean(SCSIInquiryResponse[7] & 0x01);
|
decoded.SftRe = Convert.ToBoolean(SCSIInquiryResponse[7] & 0x01);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SCSIInquiryResponse.Length >= 16)
|
if(SCSIInquiryResponse.Length >= 16)
|
||||||
{
|
{
|
||||||
decoded.VendorIdentification = new byte[8];
|
decoded.VendorIdentification = new byte[8];
|
||||||
Array.Copy(SCSIInquiryResponse, 8, decoded.VendorIdentification, 0, 8);
|
Array.Copy(SCSIInquiryResponse, 8, decoded.VendorIdentification, 0, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SCSIInquiryResponse.Length >= 32)
|
if(SCSIInquiryResponse.Length >= 32)
|
||||||
{
|
{
|
||||||
decoded.ProductIdentification = new byte[16];
|
decoded.ProductIdentification = new byte[16];
|
||||||
Array.Copy(SCSIInquiryResponse, 16, decoded.ProductIdentification, 0, 16);
|
Array.Copy(SCSIInquiryResponse, 16, decoded.ProductIdentification, 0, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SCSIInquiryResponse.Length >= 36)
|
if(SCSIInquiryResponse.Length >= 36)
|
||||||
{
|
{
|
||||||
decoded.ProductRevisionLevel = new byte[4];
|
decoded.ProductRevisionLevel = new byte[4];
|
||||||
Array.Copy(SCSIInquiryResponse, 32, decoded.ProductRevisionLevel, 0, 4);
|
Array.Copy(SCSIInquiryResponse, 32, decoded.ProductRevisionLevel, 0, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SCSIInquiryResponse.Length >= 44)
|
if(SCSIInquiryResponse.Length >= 44)
|
||||||
{
|
{
|
||||||
// Seagate 1
|
// Seagate 1
|
||||||
@@ -155,6 +165,7 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
decoded.Seagate_DriveSerialNumber = new byte[8];
|
decoded.Seagate_DriveSerialNumber = new byte[8];
|
||||||
Array.Copy(SCSIInquiryResponse, 36, decoded.Seagate_DriveSerialNumber, 0, 8);
|
Array.Copy(SCSIInquiryResponse, 36, decoded.Seagate_DriveSerialNumber, 0, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SCSIInquiryResponse.Length >= 46)
|
if(SCSIInquiryResponse.Length >= 46)
|
||||||
{
|
{
|
||||||
// Kreon
|
// Kreon
|
||||||
@@ -168,6 +179,7 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
decoded.KreonIdentifier.SequenceEqual(new byte[] {0x4B, 0x52, 0x45, 0x4F, 0x4E}))
|
decoded.KreonIdentifier.SequenceEqual(new byte[] {0x4B, 0x52, 0x45, 0x4F, 0x4E}))
|
||||||
decoded.KreonPresent = true;
|
decoded.KreonPresent = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SCSIInquiryResponse.Length >= 49)
|
if(SCSIInquiryResponse.Length >= 49)
|
||||||
{
|
{
|
||||||
// HP
|
// HP
|
||||||
@@ -177,6 +189,7 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
decoded.HP_OBDR = new byte[6];
|
decoded.HP_OBDR = new byte[6];
|
||||||
Array.Copy(SCSIInquiryResponse, 43, decoded.HP_OBDR, 0, 6);
|
Array.Copy(SCSIInquiryResponse, 43, decoded.HP_OBDR, 0, 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SCSIInquiryResponse.Length >= 56)
|
if(SCSIInquiryResponse.Length >= 56)
|
||||||
{
|
{
|
||||||
decoded.VendorSpecific = new byte[20];
|
decoded.VendorSpecific = new byte[20];
|
||||||
@@ -218,6 +231,7 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
decoded.QAS = Convert.ToBoolean(SCSIInquiryResponse[56] & 0x02);
|
decoded.QAS = Convert.ToBoolean(SCSIInquiryResponse[56] & 0x02);
|
||||||
decoded.IUS = Convert.ToBoolean(SCSIInquiryResponse[56] & 0x01);
|
decoded.IUS = Convert.ToBoolean(SCSIInquiryResponse[56] & 0x01);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SCSIInquiryResponse.Length >= 58) decoded.Reserved4 = SCSIInquiryResponse[57];
|
if(SCSIInquiryResponse.Length >= 58) decoded.Reserved4 = SCSIInquiryResponse[57];
|
||||||
if(SCSIInquiryResponse.Length >= 60)
|
if(SCSIInquiryResponse.Length >= 60)
|
||||||
{
|
{
|
||||||
@@ -236,16 +250,19 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
decoded.Reserved5 = new byte[SCSIInquiryResponse.Length - 74];
|
decoded.Reserved5 = new byte[SCSIInquiryResponse.Length - 74];
|
||||||
Array.Copy(SCSIInquiryResponse, 74, decoded.Reserved5, 0, SCSIInquiryResponse.Length - 74);
|
Array.Copy(SCSIInquiryResponse, 74, decoded.Reserved5, 0, SCSIInquiryResponse.Length - 74);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SCSIInquiryResponse.Length >= 96)
|
if(SCSIInquiryResponse.Length >= 96)
|
||||||
{
|
{
|
||||||
decoded.Reserved5 = new byte[22];
|
decoded.Reserved5 = new byte[22];
|
||||||
Array.Copy(SCSIInquiryResponse, 74, decoded.Reserved5, 0, 22);
|
Array.Copy(SCSIInquiryResponse, 74, decoded.Reserved5, 0, 22);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SCSIInquiryResponse.Length > 96)
|
if(SCSIInquiryResponse.Length > 96)
|
||||||
{
|
{
|
||||||
decoded.VendorSpecific2 = new byte[SCSIInquiryResponse.Length - 96];
|
decoded.VendorSpecific2 = new byte[SCSIInquiryResponse.Length - 96];
|
||||||
Array.Copy(SCSIInquiryResponse, 96, decoded.VendorSpecific2, 0, SCSIInquiryResponse.Length - 96);
|
Array.Copy(SCSIInquiryResponse, 96, decoded.VendorSpecific2, 0, SCSIInquiryResponse.Length - 96);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SCSIInquiryResponse.Length >= 144)
|
if(SCSIInquiryResponse.Length >= 144)
|
||||||
{
|
{
|
||||||
// Seagate 2
|
// Seagate 2
|
||||||
@@ -253,7 +270,9 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
decoded.Seagate_Copyright = new byte[48];
|
decoded.Seagate_Copyright = new byte[48];
|
||||||
Array.Copy(SCSIInquiryResponse, 96, decoded.Seagate_Copyright, 0, 48);
|
Array.Copy(SCSIInquiryResponse, 96, decoded.Seagate_Copyright, 0, 48);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SCSIInquiryResponse.Length < 148) return decoded;
|
if(SCSIInquiryResponse.Length < 148) return decoded;
|
||||||
|
|
||||||
// Seagate 2
|
// Seagate 2
|
||||||
decoded.Seagate3Present = true;
|
decoded.Seagate3Present = true;
|
||||||
decoded.Seagate_ServoPROMPartNo = new byte[4];
|
decoded.Seagate_ServoPROMPartNo = new byte[4];
|
||||||
|
|||||||
@@ -415,7 +415,8 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
|||||||
sb.AppendFormat("Last track in last session is track {0}", decoded.LastTrackLastSession).AppendLine();
|
sb.AppendFormat("Last track in last session is track {0}", decoded.LastTrackLastSession).AppendLine();
|
||||||
sb.AppendFormat("Last session Lead-In address is {0} (as LBA) or {1:X2}:{2:X2}:{3:X2}",
|
sb.AppendFormat("Last session Lead-In address is {0} (as LBA) or {1:X2}:{2:X2}:{3:X2}",
|
||||||
decoded.LastSessionLeadInStartLBA, (decoded.LastSessionLeadInStartLBA & 0xFF0000) >> 16,
|
decoded.LastSessionLeadInStartLBA, (decoded.LastSessionLeadInStartLBA & 0xFF0000) >> 16,
|
||||||
(decoded.LastSessionLeadInStartLBA & 0xFF00) >> 8, decoded.LastSessionLeadInStartLBA & 0xFF)
|
(decoded.LastSessionLeadInStartLBA & 0xFF00) >> 8,
|
||||||
|
decoded.LastSessionLeadInStartLBA & 0xFF)
|
||||||
.AppendLine();
|
.AppendLine();
|
||||||
sb.AppendFormat("Last possible Lead-Out address is {0} (as LBA) or {1:X2}:{2:X2}:{3:X2}",
|
sb.AppendFormat("Last possible Lead-Out address is {0} (as LBA) or {1:X2}:{2:X2}:{3:X2}",
|
||||||
decoded.LastPossibleLeadOutStartLBA, (decoded.LastPossibleLeadOutStartLBA & 0xFF0000) >> 16,
|
decoded.LastPossibleLeadOutStartLBA, (decoded.LastPossibleLeadOutStartLBA & 0xFF0000) >> 16,
|
||||||
|
|||||||
@@ -2506,8 +2506,10 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
|||||||
decoded.Persistent |= (feature[2] & 0x02) == 0x02;
|
decoded.Persistent |= (feature[2] & 0x02) == 0x02;
|
||||||
decoded.Version = (byte)((feature[2] & 0x3C) >> 2);
|
decoded.Version = (byte)((feature[2] & 0x3C) >> 2);
|
||||||
|
|
||||||
decoded.LogicalBlockSize = (uint)((feature[4] << 24) + (feature[5] << 16) + (feature[6] << 8) + feature[7]);
|
decoded.LogicalBlockSize =
|
||||||
decoded.Blocking = (ushort)((feature[8] << 8) + feature[9]);
|
(uint)((feature[4] << 24) + (feature[5] << 16) + (feature[6] << 8) + feature[7]);
|
||||||
|
decoded.Blocking =
|
||||||
|
(ushort)((feature[8] << 8) + feature[9]);
|
||||||
decoded.PP |= (feature[10] & 0x01) == 0x01;
|
decoded.PP |= (feature[10] & 0x01) == 0x01;
|
||||||
|
|
||||||
return decoded;
|
return decoded;
|
||||||
@@ -2750,8 +2752,10 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
|||||||
decoded.Persistent |= (feature[2] & 0x02) == 0x02;
|
decoded.Persistent |= (feature[2] & 0x02) == 0x02;
|
||||||
decoded.Version = (byte)((feature[2] & 0x3C) >> 2);
|
decoded.Version = (byte)((feature[2] & 0x3C) >> 2);
|
||||||
|
|
||||||
decoded.LogicalBlockSize = (uint)((feature[4] << 24) + (feature[5] << 16) + (feature[6] << 8) + feature[7]);
|
decoded.LogicalBlockSize =
|
||||||
decoded.Blocking = (ushort)((feature[8] << 8) + feature[9]);
|
(uint)((feature[4] << 24) + (feature[5] << 16) + (feature[6] << 8) + feature[7]);
|
||||||
|
decoded.Blocking =
|
||||||
|
(ushort)((feature[8] << 8) + feature[9]);
|
||||||
decoded.PP |= (feature[10] & 0x01) == 0x01;
|
decoded.PP |= (feature[10] & 0x01) == 0x01;
|
||||||
|
|
||||||
return decoded;
|
return decoded;
|
||||||
@@ -4983,6 +4987,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
|||||||
sb.AppendFormat("\t{0} media blocks are required for the binding nonce", ftr.BindNonceBlocks)
|
sb.AppendFormat("\t{0} media blocks are required for the binding nonce", ftr.BindNonceBlocks)
|
||||||
.AppendLine();
|
.AppendLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ftr.AGIDs > 0) sb.AppendFormat("\tDrive supports {0} AGIDs concurrently", ftr.AGIDs).AppendLine();
|
if(ftr.AGIDs > 0) sb.AppendFormat("\tDrive supports {0} AGIDs concurrently", ftr.AGIDs).AppendLine();
|
||||||
|
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
|
|||||||
@@ -123,7 +123,8 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
string UnrecCIRCAbort = "\tUnrecovered CIRC errors will return CHECK CONDITION.";
|
string UnrecCIRCAbort = "\tUnrecovered CIRC errors will return CHECK CONDITION.";
|
||||||
string UnrecECCNotAbort = "\tUnrecovered ECC errors will not abort the transfer.";
|
string UnrecECCNotAbort = "\tUnrecovered ECC errors will not abort the transfer.";
|
||||||
string UnrecCIRCNotAbort = "\tUnrecovered CIRC errors will not abort the transfer.";
|
string UnrecCIRCNotAbort = "\tUnrecovered CIRC errors will not abort the transfer.";
|
||||||
string UnrecECCAbortData = "\tUnrecovered ECC errors will return CHECK CONDITION and the uncorrected data.";
|
string UnrecECCAbortData =
|
||||||
|
"\tUnrecovered ECC errors will return CHECK CONDITION and the uncorrected data.";
|
||||||
string UnrecCIRCAbortData =
|
string UnrecCIRCAbortData =
|
||||||
"\tUnrecovered CIRC errors will return CHECK CONDITION and the uncorrected data.";
|
"\tUnrecovered CIRC errors will return CHECK CONDITION and the uncorrected data.";
|
||||||
|
|
||||||
|
|||||||
@@ -106,8 +106,10 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
decoded.Cylinders = (uint)((pageResponse[2] << 16) + (pageResponse[3] << 8) + pageResponse[4]);
|
decoded.Cylinders = (uint)((pageResponse[2] << 16) + (pageResponse[3] << 8) + pageResponse[4]);
|
||||||
decoded.Heads = pageResponse[5];
|
decoded.Heads = pageResponse[5];
|
||||||
decoded.WritePrecompCylinder = (uint)((pageResponse[6] << 16) + (pageResponse[7] << 8) + pageResponse[8]);
|
decoded.WritePrecompCylinder = (uint)((pageResponse[6] << 16) + (pageResponse[7] << 8) + pageResponse[8]);
|
||||||
decoded.WriteReduceCylinder = (uint)((pageResponse[9] << 16) + (pageResponse[10] << 8) + pageResponse[11]);
|
decoded.WriteReduceCylinder =
|
||||||
decoded.DriveStepRate = (ushort)((pageResponse[12] << 8) + pageResponse[13]);
|
(uint)((pageResponse[9] << 16) + (pageResponse[10] << 8) + pageResponse[11]);
|
||||||
|
decoded.DriveStepRate =
|
||||||
|
(ushort)((pageResponse[12] << 8) + pageResponse[13]);
|
||||||
decoded.LandingCylinder = (pageResponse[14] << 16) + (pageResponse[15] << 8) + pageResponse[16];
|
decoded.LandingCylinder = (pageResponse[14] << 16) + (pageResponse[15] << 8) + pageResponse[16];
|
||||||
decoded.RPL = (byte)(pageResponse[17] & 0x03);
|
decoded.RPL = (byte)(pageResponse[17] & 0x03);
|
||||||
decoded.RotationalOffset = pageResponse[18];
|
decoded.RotationalOffset = pageResponse[18];
|
||||||
|
|||||||
@@ -109,7 +109,8 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
string UnrecCIRCAbort = "\tUnrecovered CIRC errors will return CHECK CONDITION.";
|
string UnrecCIRCAbort = "\tUnrecovered CIRC errors will return CHECK CONDITION.";
|
||||||
string UnrecECCNotAbort = "\tUnrecovered ECC errors will not abort the transfer.";
|
string UnrecECCNotAbort = "\tUnrecovered ECC errors will not abort the transfer.";
|
||||||
string UnrecCIRCNotAbort = "\tUnrecovered CIRC errors will not abort the transfer.";
|
string UnrecCIRCNotAbort = "\tUnrecovered CIRC errors will not abort the transfer.";
|
||||||
string UnrecECCAbortData = "\tUnrecovered ECC errors will return CHECK CONDITION and the uncorrected data.";
|
string UnrecECCAbortData =
|
||||||
|
"\tUnrecovered ECC errors will return CHECK CONDITION and the uncorrected data.";
|
||||||
string UnrecCIRCAbortData =
|
string UnrecCIRCAbortData =
|
||||||
"\tUnrecovered CIRC errors will return CHECK CONDITION and the uncorrected data.";
|
"\tUnrecovered CIRC errors will return CHECK CONDITION and the uncorrected data.";
|
||||||
|
|
||||||
|
|||||||
@@ -245,6 +245,7 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
? "\tRecovered buffer data comes in LIFO order"
|
? "\tRecovered buffer data comes in LIFO order"
|
||||||
: "\tRecovered buffer data comes in FIFO order");
|
: "\tRecovered buffer data comes in FIFO order");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(page.BIS) sb.AppendLine("\tMedium supports block IDs");
|
if(page.BIS) sb.AppendLine("\tMedium supports block IDs");
|
||||||
if(page.RSmk) sb.AppendLine("\tDrive reports setmarks");
|
if(page.RSmk) sb.AppendLine("\tDrive reports setmarks");
|
||||||
switch(page.SOCF)
|
switch(page.SOCF)
|
||||||
|
|||||||
@@ -251,7 +251,8 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
if(page.PartitionSizes[i] == 0)
|
if(page.PartitionSizes[i] == 0)
|
||||||
if(page.PartitionSizes.Length == 1)
|
if(page.PartitionSizes.Length == 1)
|
||||||
sb.AppendLine("\tDevice recognizes one single partition spanning whole medium");
|
sb.AppendLine("\tDevice recognizes one single partition spanning whole medium");
|
||||||
else sb.AppendFormat("\tPartition {0} runs for rest of medium", i).AppendLine();
|
else
|
||||||
|
sb.AppendFormat("\tPartition {0} runs for rest of medium", i).AppendLine();
|
||||||
else
|
else
|
||||||
sb.AppendFormat("\tPartition {0} is {1} {2} long", i, page.PartitionSizes[i], measure).AppendLine();
|
sb.AppendFormat("\tPartition {0} is {1} {2} long", i, page.PartitionSizes[i], measure).AppendLine();
|
||||||
|
|
||||||
|
|||||||
@@ -186,8 +186,10 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
if(page.LogErr) sb.AppendLine("\tDrive shall log informational exception conditions");
|
if(page.LogErr) sb.AppendLine("\tDrive shall log informational exception conditions");
|
||||||
|
|
||||||
if(page.IntervalTimer > 0)
|
if(page.IntervalTimer > 0)
|
||||||
if(page.IntervalTimer == 0xFFFFFFFF) sb.AppendLine("\tTimer interval is vendor-specific");
|
if(page.IntervalTimer == 0xFFFFFFFF)
|
||||||
else sb.AppendFormat("\tTimer interval is {0} ms", page.IntervalTimer * 100).AppendLine();
|
sb.AppendLine("\tTimer interval is vendor-specific");
|
||||||
|
else
|
||||||
|
sb.AppendFormat("\tTimer interval is {0} ms", page.IntervalTimer * 100).AppendLine();
|
||||||
|
|
||||||
if(page.ReportCount > 0)
|
if(page.ReportCount > 0)
|
||||||
sb.AppendFormat("\tInformational exception conditions will be reported a maximum of {0} times",
|
sb.AppendFormat("\tInformational exception conditions will be reported a maximum of {0} times",
|
||||||
|
|||||||
@@ -285,7 +285,8 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
for(int i = 0; i < descriptors; i++)
|
for(int i = 0; i < descriptors; i++)
|
||||||
decoded.WriteSpeedPerformanceDescriptors[i] = new ModePage_2A_WriteDescriptor
|
decoded.WriteSpeedPerformanceDescriptors[i] = new ModePage_2A_WriteDescriptor
|
||||||
{
|
{
|
||||||
RotationControl = (byte)(pageResponse[1 + 32 + i * 4] & 0x07),
|
RotationControl =
|
||||||
|
(byte)(pageResponse[1 + 32 + i * 4] & 0x07),
|
||||||
WriteSpeed = (ushort)((pageResponse[2 + 32 + i * 4] << 8) + pageResponse[3 + 32 + i * 4])
|
WriteSpeed = (ushort)((pageResponse[2 + 32 + i * 4] << 8) + pageResponse[3 + 32 + i * 4])
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -356,6 +357,7 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
sb.AppendLine(page.LockState
|
sb.AppendLine(page.LockState
|
||||||
? "\tDrive is locked, media cannot be ejected, but if empty, can be inserted"
|
? "\tDrive is locked, media cannot be ejected, but if empty, can be inserted"
|
||||||
: "\tDrive is not locked, media can be ejected and inserted");
|
: "\tDrive is not locked, media can be ejected and inserted");
|
||||||
|
|
||||||
if(page.Eject) sb.AppendLine("\tDrive can eject media");
|
if(page.Eject) sb.AppendLine("\tDrive can eject media");
|
||||||
|
|
||||||
if(page.SeparateChannelMute) sb.AppendLine("\tEach channel can be muted independently");
|
if(page.SeparateChannelMute) sb.AppendLine("\tEach channel can be muted independently");
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
header.BlockDescriptors[i].Density = DensityType.Default;
|
header.BlockDescriptors[i].Density = DensityType.Default;
|
||||||
header.BlockDescriptors[i].Blocks += (ulong)(modeResponse[0 + i * 8 + 8] << 24);
|
header.BlockDescriptors[i].Blocks += (ulong)(modeResponse[0 + i * 8 + 8] << 24);
|
||||||
}
|
}
|
||||||
|
|
||||||
header.BlockDescriptors[i].Blocks += (ulong)(modeResponse[1 + i * 8 + 8] << 16);
|
header.BlockDescriptors[i].Blocks += (ulong)(modeResponse[1 + i * 8 + 8] << 16);
|
||||||
header.BlockDescriptors[i].Blocks += (ulong)(modeResponse[2 + i * 8 + 8] << 8);
|
header.BlockDescriptors[i].Blocks += (ulong)(modeResponse[2 + i * 8 + 8] << 8);
|
||||||
header.BlockDescriptors[i].Blocks += modeResponse[3 + i * 8 + 8];
|
header.BlockDescriptors[i].Blocks += modeResponse[3 + i * 8 + 8];
|
||||||
|
|||||||
@@ -115,11 +115,17 @@ namespace DiscImageChef.Decoders.SCSI.SSC
|
|||||||
duplicate = (response[offset + 2] & 0x40) == 0x40,
|
duplicate = (response[offset + 2] & 0x40) == 0x40,
|
||||||
defaultDensity = (response[offset + 2] & 0x20) == 0x20,
|
defaultDensity = (response[offset + 2] & 0x20) == 0x20,
|
||||||
reserved = (byte)((response[offset + 2] & 0x1E) >> 1),
|
reserved = (byte)((response[offset + 2] & 0x1E) >> 1),
|
||||||
lenvalid = (response[offset + 2] & 0x01) == 0x01,
|
lenvalid =
|
||||||
len = (ushort)((response[offset + 3] << 8) + response[offset + 4]),
|
(response[offset + 2] &
|
||||||
bpmm = (uint)((response[offset + 5] << 16) + (response[offset + 6] << 8) + response[offset + 7]),
|
0x01) == 0x01,
|
||||||
width = (ushort)((response[offset + 8] << 8) + response[offset + 9]),
|
len =
|
||||||
tracks = (ushort)((response[offset + 10] << 8) + response[offset + 11]),
|
(ushort)((response[offset + 3] << 8) + response[offset + 4]),
|
||||||
|
bpmm =
|
||||||
|
(uint)((response[offset + 5] << 16) + (response[offset + 6] << 8) + response[offset + 7]),
|
||||||
|
width =
|
||||||
|
(ushort)((response[offset + 8] << 8) + response[offset + 9]),
|
||||||
|
tracks =
|
||||||
|
(ushort)((response[offset + 10] << 8) + response[offset + 11]),
|
||||||
capacity = (uint)((response[offset + 12] << 24) + (response[offset + 13] << 16) +
|
capacity = (uint)((response[offset + 12] << 24) + (response[offset + 13] << 16) +
|
||||||
(response[offset + 14] << 8) + response[offset + 15])
|
(response[offset + 14] << 8) + response[offset + 15])
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -363,7 +363,8 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
|
|
||||||
offset += descLen;
|
offset += descLen;
|
||||||
}
|
}
|
||||||
else break;
|
else
|
||||||
|
break;
|
||||||
|
|
||||||
return decoded;
|
return decoded;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,8 @@ namespace DiscImageChef.Decoders.SecureDigital
|
|||||||
cid.ProductRevision & 0x0F).AppendLine();
|
cid.ProductRevision & 0x0F).AppendLine();
|
||||||
sb.AppendFormat("\tProduct serial number: {0}", cid.ProductSerialNumber).AppendLine();
|
sb.AppendFormat("\tProduct serial number: {0}", cid.ProductSerialNumber).AppendLine();
|
||||||
sb.AppendFormat("\tDevice manufactured month {0} of {1}", (cid.ManufacturingDate & 0xF00) >> 8,
|
sb.AppendFormat("\tDevice manufactured month {0} of {1}", (cid.ManufacturingDate & 0xF00) >> 8,
|
||||||
(cid.ManufacturingDate & 0xFF) + 2000).AppendLine();
|
(cid.ManufacturingDate & 0xFF) + 2000)
|
||||||
|
.AppendLine();
|
||||||
sb.AppendFormat("\tCID CRC: 0x{0:X2}", cid.CRC).AppendLine();
|
sb.AppendFormat("\tCID CRC: 0x{0:X2}", cid.CRC).AppendLine();
|
||||||
|
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
|
|||||||
@@ -127,7 +127,8 @@ namespace DiscImageChef.Decoders.SecureDigital
|
|||||||
|
|
||||||
if(csd.Structure == 0)
|
if(csd.Structure == 0)
|
||||||
{
|
{
|
||||||
csd.Size = (ushort)(((response[6] & 0x03) << 10) + (response[7] << 2) + ((response[8] & 0xC0) >> 6));
|
csd.Size =
|
||||||
|
(ushort)(((response[6] & 0x03) << 10) + (response[7] << 2) + ((response[8] & 0xC0) >> 6));
|
||||||
csd.ReadCurrentAtVddMin = (byte)((response[8] & 0x38) >> 3);
|
csd.ReadCurrentAtVddMin = (byte)((response[8] & 0x38) >> 3);
|
||||||
csd.ReadCurrentAtVddMax = (byte)(response[8] & 0x07);
|
csd.ReadCurrentAtVddMax = (byte)(response[8] & 0x07);
|
||||||
csd.WriteCurrentAtVddMin = (byte)((response[9] & 0xE0) >> 5);
|
csd.WriteCurrentAtVddMin = (byte)((response[9] & 0xE0) >> 5);
|
||||||
@@ -329,7 +330,9 @@ namespace DiscImageChef.Decoders.SecureDigital
|
|||||||
sb.AppendFormat("\tDevice's transfer speed: {0}{1}", result, unit).AppendLine();
|
sb.AppendFormat("\tDevice's transfer speed: {0}{1}", result, unit).AppendLine();
|
||||||
|
|
||||||
unit = "";
|
unit = "";
|
||||||
for(int cl = 0, mask = 1; cl <= 11; cl++, mask <<= 1) if((csd.Classes & mask) == mask) unit += $" {cl}";
|
for(int cl = 0, mask = 1; cl <= 11; cl++, mask <<= 1)
|
||||||
|
if((csd.Classes & mask) == mask)
|
||||||
|
unit += $" {cl}";
|
||||||
|
|
||||||
sb.AppendFormat("\tDevice support command classes {0}", unit).AppendLine();
|
sb.AppendFormat("\tDevice support command classes {0}", unit).AppendLine();
|
||||||
sb.AppendFormat("\tRead block length is {0} bytes", Math.Pow(2, csd.ReadBlockLength)).AppendLine();
|
sb.AppendFormat("\tRead block length is {0} bytes", Math.Pow(2, csd.ReadBlockLength)).AppendLine();
|
||||||
@@ -347,7 +350,8 @@ namespace DiscImageChef.Decoders.SecureDigital
|
|||||||
sb.AppendFormat("\tDevice has {0} blocks", (int)result).AppendLine();
|
sb.AppendFormat("\tDevice has {0} blocks", (int)result).AppendLine();
|
||||||
|
|
||||||
result = (csd.Size + 1) * Math.Pow(2, csd.SizeMultiplier + 2) * Math.Pow(2, csd.ReadBlockLength);
|
result = (csd.Size + 1) * Math.Pow(2, csd.SizeMultiplier + 2) * Math.Pow(2, csd.ReadBlockLength);
|
||||||
if(result > 1073741824) sb.AppendFormat("\tDevice has {0} GiB", result / 1073741824.0).AppendLine();
|
if(result > 1073741824)
|
||||||
|
sb.AppendFormat("\tDevice has {0} GiB", result / 1073741824.0).AppendLine();
|
||||||
else if(result > 1048576) sb.AppendFormat("\tDevice has {0} MiB", result / 1048576.0).AppendLine();
|
else if(result > 1048576) sb.AppendFormat("\tDevice has {0} MiB", result / 1048576.0).AppendLine();
|
||||||
else if(result > 1024) sb.AppendFormat("\tDevice has {0} KiB", result / 1024.0).AppendLine();
|
else if(result > 1024) sb.AppendFormat("\tDevice has {0} KiB", result / 1024.0).AppendLine();
|
||||||
else sb.AppendFormat("\tDevice has {0} bytes", result).AppendLine();
|
else sb.AppendFormat("\tDevice has {0} bytes", result).AppendLine();
|
||||||
|
|||||||
48
Sega/CD.cs
48
Sega/CD.cs
@@ -49,9 +49,11 @@ namespace DiscImageChef.Decoders.Sega
|
|||||||
public struct IPBin
|
public struct IPBin
|
||||||
{
|
{
|
||||||
/// <summary>Must be "SEGADISCSYSTEM " or "SEGADATADISC " or "SEGAOS "</summary>
|
/// <summary>Must be "SEGADISCSYSTEM " or "SEGADATADISC " or "SEGAOS "</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] SegaHardwareID;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||||
|
public byte[] SegaHardwareID;
|
||||||
/// <summary>0x010, Varies</summary>
|
/// <summary>0x010, Varies</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 11)] public byte[] volume_name;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 11)]
|
||||||
|
public byte[] volume_name;
|
||||||
/// <summary>0x01B, 0x00</summary>
|
/// <summary>0x01B, 0x00</summary>
|
||||||
public byte spare_space1;
|
public byte spare_space1;
|
||||||
/// <summary>0x01C, Volume version in BCD. <100 = Prerelease.</summary>
|
/// <summary>0x01C, Volume version in BCD. <100 = Prerelease.</summary>
|
||||||
@@ -59,7 +61,8 @@ namespace DiscImageChef.Decoders.Sega
|
|||||||
/// <summary>0x01E, Bit 0 = 1 => CD-ROM. Rest should be 0.</summary>
|
/// <summary>0x01E, Bit 0 = 1 => CD-ROM. Rest should be 0.</summary>
|
||||||
public ushort volume_type;
|
public ushort volume_type;
|
||||||
/// <summary>0x020, Unknown, varies!</summary>
|
/// <summary>0x020, Unknown, varies!</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 11)] public byte[] system_name;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 11)]
|
||||||
|
public byte[] system_name;
|
||||||
/// <summary>0x02B, 0x00</summary>
|
/// <summary>0x02B, 0x00</summary>
|
||||||
public byte spare_space2;
|
public byte spare_space2;
|
||||||
/// <summary>0x02C, Should be 1</summary>
|
/// <summary>0x02C, Should be 1</summary>
|
||||||
@@ -83,33 +86,46 @@ namespace DiscImageChef.Decoders.Sega
|
|||||||
/// <summary>0x04C, System program work RAM size in bytes</summary>
|
/// <summary>0x04C, System program work RAM size in bytes</summary>
|
||||||
public uint sp_work_ram_size;
|
public uint sp_work_ram_size;
|
||||||
/// <summary>0x050, MMDDYYYY</summary>
|
/// <summary>0x050, MMDDYYYY</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public byte[] release_date;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
|
||||||
|
public byte[] release_date;
|
||||||
/// <summary>0x058, Seems to be all 0x20s</summary>
|
/// <summary>0x058, Seems to be all 0x20s</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 7)] public byte[] unknown1;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 7)]
|
||||||
|
public byte[] unknown1;
|
||||||
/// <summary>0x05F, 0x00 ?</summary>
|
/// <summary>0x05F, 0x00 ?</summary>
|
||||||
public byte spare_space4;
|
public byte spare_space4;
|
||||||
/// <summary>0x060, System Reserved Area</summary>
|
/// <summary>0x060, System Reserved Area</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 160)] public byte[] system_reserved;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 160)]
|
||||||
|
public byte[] system_reserved;
|
||||||
/// <summary>0x100, Hardware ID</summary>
|
/// <summary>0x100, Hardware ID</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] hardware_id;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||||
|
public byte[] hardware_id;
|
||||||
/// <summary>0x113 or 0x110, "SEGA" or "T-xx"</summary>
|
/// <summary>0x113 or 0x110, "SEGA" or "T-xx"</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] public byte[] developer_code;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
|
||||||
|
public byte[] developer_code;
|
||||||
/// <summary>0x118, Another release date, this with month in letters?</summary>
|
/// <summary>0x118, Another release date, this with month in letters?</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public byte[] release_date2;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
|
||||||
|
public byte[] release_date2;
|
||||||
/// <summary>0x120, Domestic version of the game title</summary>
|
/// <summary>0x120, Domestic version of the game title</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 48)] public byte[] domestic_title;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 48)]
|
||||||
|
public byte[] domestic_title;
|
||||||
/// <summary>0x150, Overseas version of the game title</summary>
|
/// <summary>0x150, Overseas version of the game title</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 48)] public byte[] overseas_title;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 48)]
|
||||||
|
public byte[] overseas_title;
|
||||||
/// <summary>0x180, Official product code</summary>
|
/// <summary>0x180, Official product code</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 13)] public byte[] product_code;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 13)]
|
||||||
|
public byte[] product_code;
|
||||||
/// <summary>0x190, Supported peripherals, see above</summary>
|
/// <summary>0x190, Supported peripherals, see above</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] peripherals;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||||
|
public byte[] peripherals;
|
||||||
/// <summary>0x1A0, 0x20</summary>
|
/// <summary>0x1A0, 0x20</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] spare_space6;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||||
|
public byte[] spare_space6;
|
||||||
/// <summary>0x1B0, Inside here should be modem information, but I need to get a modem-enabled game</summary>
|
/// <summary>0x1B0, Inside here should be modem information, but I need to get a modem-enabled game</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] public byte[] spare_space7;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)]
|
||||||
|
public byte[] spare_space7;
|
||||||
/// <summary>0x1F0, Region codes, space-filled</summary>
|
/// <summary>0x1F0, Region codes, space-filled</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] region_codes;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||||
|
public byte[] region_codes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IPBin? DecodeIPBin(byte[] ipbin_sector)
|
public static IPBin? DecodeIPBin(byte[] ipbin_sector)
|
||||||
|
|||||||
@@ -48,15 +48,18 @@ namespace DiscImageChef.Decoders.Sega
|
|||||||
public struct IPBin
|
public struct IPBin
|
||||||
{
|
{
|
||||||
/// <summary>Must be "SEGA SEGAKATANA "</summary>
|
/// <summary>Must be "SEGA SEGAKATANA "</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] SegaHardwareID;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||||
|
public byte[] SegaHardwareID;
|
||||||
/// <summary>0x010, "SEGA ENTERPRISES"</summary>
|
/// <summary>0x010, "SEGA ENTERPRISES"</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] maker_id;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||||
|
public byte[] maker_id;
|
||||||
/// <summary>0x020, CRC of product_no and product_version</summary>
|
/// <summary>0x020, CRC of product_no and product_version</summary>
|
||||||
public uint dreamcast_crc;
|
public uint dreamcast_crc;
|
||||||
/// <summary>0x024, " "</summary>
|
/// <summary>0x024, " "</summary>
|
||||||
public byte spare_space1;
|
public byte spare_space1;
|
||||||
/// <summary>0x025, "GD-ROM"</summary>
|
/// <summary>0x025, "GD-ROM"</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public byte[] dreamcast_media;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
||||||
|
public byte[] dreamcast_media;
|
||||||
/// <summary>0x02B, Disc number</summary>
|
/// <summary>0x02B, Disc number</summary>
|
||||||
public byte disc_no;
|
public byte disc_no;
|
||||||
/// <summary>0x02C, '/'</summary>
|
/// <summary>0x02C, '/'</summary>
|
||||||
@@ -64,29 +67,40 @@ namespace DiscImageChef.Decoders.Sega
|
|||||||
/// <summary>0x02D, Total number of discs</summary>
|
/// <summary>0x02D, Total number of discs</summary>
|
||||||
public byte disc_total_nos;
|
public byte disc_total_nos;
|
||||||
/// <summary>0x02E, " "</summary>
|
/// <summary>0x02E, " "</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] spare_space2;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
|
||||||
|
public byte[] spare_space2;
|
||||||
/// <summary>0x030, Region codes, space-filled</summary>
|
/// <summary>0x030, Region codes, space-filled</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public byte[] region_codes;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
|
||||||
|
public byte[] region_codes;
|
||||||
/// <summary>0x038, Supported peripherals, bitwise</summary>
|
/// <summary>0x038, Supported peripherals, bitwise</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 7)] public byte[] peripherals;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 7)]
|
||||||
|
public byte[] peripherals;
|
||||||
/// <summary>0x03F, ' '</summary>
|
/// <summary>0x03F, ' '</summary>
|
||||||
public byte spare_space3;
|
public byte spare_space3;
|
||||||
/// <summary>0x040, Product number</summary>
|
/// <summary>0x040, Product number</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)] public byte[] product_no;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)]
|
||||||
|
public byte[] product_no;
|
||||||
/// <summary>0x04A, Product version</summary>
|
/// <summary>0x04A, Product version</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public byte[] product_version;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
||||||
|
public byte[] product_version;
|
||||||
/// <summary>0x050, YYYYMMDD</summary>
|
/// <summary>0x050, YYYYMMDD</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public byte[] release_date;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
|
||||||
|
public byte[] release_date;
|
||||||
/// <summary>0x058, " "</summary>
|
/// <summary>0x058, " "</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public byte[] spare_space4;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
|
||||||
|
public byte[] spare_space4;
|
||||||
/// <summary>0x060, Usually "1ST_READ.BIN" or "0WINCE.BIN "</summary>
|
/// <summary>0x060, Usually "1ST_READ.BIN" or "0WINCE.BIN "</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] boot_filename;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
|
||||||
|
public byte[] boot_filename;
|
||||||
/// <summary>0x06C, " "</summary>
|
/// <summary>0x06C, " "</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] public byte[] spare_space5;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
|
||||||
|
public byte[] spare_space5;
|
||||||
/// <summary>0x070, Game producer, space-filled</summary>
|
/// <summary>0x070, Game producer, space-filled</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] producer;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||||
|
public byte[] producer;
|
||||||
/// <summary>0x080, Game name, space-filled</summary>
|
/// <summary>0x080, Game name, space-filled</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] public byte[] product_name;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
|
||||||
|
public byte[] product_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IPBin? DecodeIPBin(byte[] ipbin_sector)
|
public static IPBin? DecodeIPBin(byte[] ipbin_sector)
|
||||||
|
|||||||
@@ -48,17 +48,23 @@ namespace DiscImageChef.Decoders.Sega
|
|||||||
public struct IPBin
|
public struct IPBin
|
||||||
{
|
{
|
||||||
/// <summary>Must be "SEGA SEGASATURN "</summary>
|
/// <summary>Must be "SEGA SEGASATURN "</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] SegaHardwareID;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||||
|
public byte[] SegaHardwareID;
|
||||||
/// <summary>0x010, "SEGA ENTERPRISES"</summary>
|
/// <summary>0x010, "SEGA ENTERPRISES"</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] maker_id;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||||
|
public byte[] maker_id;
|
||||||
/// <summary>0x020, Product number</summary>
|
/// <summary>0x020, Product number</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)] public byte[] product_no;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)]
|
||||||
|
public byte[] product_no;
|
||||||
/// <summary>0x02A, Product version</summary>
|
/// <summary>0x02A, Product version</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public byte[] product_version;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
||||||
|
public byte[] product_version;
|
||||||
/// <summary>0x030, YYYYMMDD</summary>
|
/// <summary>0x030, YYYYMMDD</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public byte[] release_date;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
|
||||||
|
public byte[] release_date;
|
||||||
/// <summary>0x038, "CD-"</summary>
|
/// <summary>0x038, "CD-"</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] saturn_media;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||||
|
public byte[] saturn_media;
|
||||||
/// <summary>0x03B, Disc number</summary>
|
/// <summary>0x03B, Disc number</summary>
|
||||||
public byte disc_no;
|
public byte disc_no;
|
||||||
/// <summary>// 0x03C, '/'</summary>
|
/// <summary>// 0x03C, '/'</summary>
|
||||||
@@ -66,13 +72,17 @@ namespace DiscImageChef.Decoders.Sega
|
|||||||
/// <summary>// 0x03D, Total number of discs</summary>
|
/// <summary>// 0x03D, Total number of discs</summary>
|
||||||
public byte disc_total_nos;
|
public byte disc_total_nos;
|
||||||
/// <summary>0x03E, " "</summary>
|
/// <summary>0x03E, " "</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] spare_space1;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
|
||||||
|
public byte[] spare_space1;
|
||||||
/// <summary>0x040, Region codes, space-filled</summary>
|
/// <summary>0x040, Region codes, space-filled</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] region_codes;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||||
|
public byte[] region_codes;
|
||||||
/// <summary>0x050, Supported peripherals, see above</summary>
|
/// <summary>0x050, Supported peripherals, see above</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] peripherals;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||||
|
public byte[] peripherals;
|
||||||
/// <summary>0x060, Game name, space-filled</summary>
|
/// <summary>0x060, Game name, space-filled</summary>
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 112)] public byte[] product_name;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 112)]
|
||||||
|
public byte[] product_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IPBin? DecodeIPBin(byte[] ipbin_sector)
|
public static IPBin? DecodeIPBin(byte[] ipbin_sector)
|
||||||
|
|||||||
@@ -50,8 +50,13 @@ namespace DiscImageChef.Decoders.Xbox
|
|||||||
if(BitConverter.ToUInt32(dmi, 4) != 1) return false;
|
if(BitConverter.ToUInt32(dmi, 4) != 1) return false;
|
||||||
|
|
||||||
// Catalogue number is two letters, five numbers, one letter
|
// Catalogue number is two letters, five numbers, one letter
|
||||||
for(int i = 12; i < 14; i++) if(dmi[i] < 0x41 || dmi[i] > 0x5A) return false;
|
for(int i = 12; i < 14; i++)
|
||||||
for(int i = 14; i < 19; i++) if(dmi[i] < 0x30 || dmi[i] > 0x39) return false;
|
if(dmi[i] < 0x41 || dmi[i] > 0x5A)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
for(int i = 14; i < 19; i++)
|
||||||
|
if(dmi[i] < 0x30 || dmi[i] > 0x39)
|
||||||
|
return false;
|
||||||
|
|
||||||
if(dmi[19] < 0x41 || dmi[19] > 0x5A) return false;
|
if(dmi[19] < 0x41 || dmi[19] > 0x5A) return false;
|
||||||
|
|
||||||
|
|||||||
12
Xbox/SS.cs
12
Xbox/SS.cs
@@ -238,9 +238,12 @@ namespace DiscImageChef.Decoders.Xbox
|
|||||||
LayerType = (LayerTypeFieldMask)(response[2] & 0x07),
|
LayerType = (LayerTypeFieldMask)(response[2] & 0x07),
|
||||||
LinearDensity = (LinearDensityField)((response[3] & 0xF0) >> 4),
|
LinearDensity = (LinearDensityField)((response[3] & 0xF0) >> 4),
|
||||||
TrackDensity = (TrackDensityField)(response[3] & 0x0F),
|
TrackDensity = (TrackDensityField)(response[3] & 0x0F),
|
||||||
DataAreaStartPSN = (uint)((response[4] << 24) + (response[5] << 16) + (response[6] << 8) + response[7]),
|
DataAreaStartPSN =
|
||||||
DataAreaEndPSN = (uint)((response[8] << 24) + (response[9] << 16) + (response[10] << 8) + response[11]),
|
(uint)((response[4] << 24) + (response[5] << 16) + (response[6] << 8) + response[7]),
|
||||||
Layer0EndPSN = (uint)((response[12] << 24) + (response[13] << 16) + (response[14] << 8) + response[15]),
|
DataAreaEndPSN =
|
||||||
|
(uint)((response[8] << 24) + (response[9] << 16) + (response[10] << 8) + response[11]),
|
||||||
|
Layer0EndPSN =
|
||||||
|
(uint)((response[12] << 24) + (response[13] << 16) + (response[14] << 8) + response[15]),
|
||||||
Unknown1 = response[27],
|
Unknown1 = response[27],
|
||||||
Unknown2 = new byte[28],
|
Unknown2 = new byte[28],
|
||||||
Unknown3 = new byte[436],
|
Unknown3 = new byte[436],
|
||||||
@@ -437,7 +440,8 @@ namespace DiscImageChef.Decoders.Xbox
|
|||||||
if(decoded.Layers == 1 && !decoded.TrackPath)
|
if(decoded.Layers == 1 && !decoded.TrackPath)
|
||||||
sb.AppendFormat("Layer 0 ends at PSN {0:X}h", decoded.Layer0EndPSN).AppendLine();
|
sb.AppendFormat("Layer 0 ends at PSN {0:X}h", decoded.Layer0EndPSN).AppendLine();
|
||||||
}
|
}
|
||||||
else sb.AppendLine("Disc is empty");
|
else
|
||||||
|
sb.AppendLine("Disc is empty");
|
||||||
else sb.AppendLine("Disc is empty");
|
else sb.AppendLine("Disc is empty");
|
||||||
|
|
||||||
sb.AppendLine("Challenges:");
|
sb.AppendLine("Challenges:");
|
||||||
|
|||||||
Reference in New Issue
Block a user