Refactor and code cleanup.

This commit is contained in:
2016-07-28 22:25:26 +01:00
parent af68104f4e
commit 1ad3366dae
57 changed files with 303 additions and 284 deletions

View File

@@ -30,8 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
namespace DiscImageChef.Decoders.ATA namespace DiscImageChef.Decoders.ATA
{ {
public struct AtaRegistersCHS public struct AtaRegistersCHS

View File

@@ -49,7 +49,7 @@ namespace DiscImageChef.Decoders.ATA
/// T13-1699D rev. 4a (ATA8-ACS) /// T13-1699D rev. 4a (ATA8-ACS)
/// T13-2015D rev. 2 (ACS-2) /// T13-2015D rev. 2 (ACS-2)
/// T13-2161D rev. 5 (ACS-3) /// T13-2161D rev. 5 (ACS-3)
/// CF+ & CF Specification rev. 1.4 (CFA) /// CF+ & CF Specification rev. 1.4 (CFA)
/// </summary> /// </summary>
public static class Identify public static class Identify
{ {
@@ -2436,7 +2436,9 @@ namespace DiscImageChef.Decoders.ATA
if((ATAID.PhysLogSectorSize & 0x2000) == 0x2000) if((ATAID.PhysLogSectorSize & 0x2000) == 0x2000)
{ {
#pragma warning disable IDE0004 // Remove Unnecessary Cast
physicalsectorsize = logicalsectorsize * (uint)Math.Pow(2, (double)(ATAID.PhysLogSectorSize & 0xF)); physicalsectorsize = logicalsectorsize * (uint)Math.Pow(2, (double)(ATAID.PhysLogSectorSize & 0xF));
#pragma warning restore IDE0004 // Remove Unnecessary Cast
} }
else else
physicalsectorsize = logicalsectorsize; physicalsectorsize = logicalsectorsize;
@@ -2505,38 +2507,38 @@ namespace DiscImageChef.Decoders.ATA
{ {
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.ExtSectors)) if(ATAID.CommandSet5.HasFlag(CommandSetBit5.ExtSectors))
{ {
if((((ulong)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", (ulong)ATAID.ExtendedUserSectors * logicalsectorsize, sb.AppendFormat("Device size in 48-bit LBA mode: {0} bytes, {1} Tb, {2} TiB", ATAID.ExtendedUserSectors * logicalsectorsize,
((ulong)ATAID.ExtendedUserSectors * logicalsectorsize) / 1000 / 1000 / 1000 / 1000, ((ulong)ATAID.ExtendedUserSectors * logicalsectorsize) / 1024 / 1024 / 1024 / 1024).AppendLine(); (ATAID.ExtendedUserSectors * logicalsectorsize) / 1000 / 1000 / 1000 / 1000, (ATAID.ExtendedUserSectors * logicalsectorsize) / 1024 / 1024 / 1024 / 1024).AppendLine();
} }
else if((((ulong)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", (ulong)ATAID.ExtendedUserSectors * logicalsectorsize, sb.AppendFormat("Device size in 48-bit LBA mode: {0} bytes, {1} Gb, {2} GiB", ATAID.ExtendedUserSectors * logicalsectorsize,
((ulong)ATAID.ExtendedUserSectors * logicalsectorsize) / 1000 / 1000 / 1000, ((ulong)ATAID.ExtendedUserSectors * logicalsectorsize) / 1024 / 1024 / 1024).AppendLine(); (ATAID.ExtendedUserSectors * logicalsectorsize) / 1000 / 1000 / 1000, (ATAID.ExtendedUserSectors * logicalsectorsize) / 1024 / 1024 / 1024).AppendLine();
} }
else else
{ {
sb.AppendFormat("Device size in 48-bit LBA mode: {0} bytes, {1} Mb, {2} MiB", (ulong)ATAID.ExtendedUserSectors * logicalsectorsize, sb.AppendFormat("Device size in 48-bit LBA mode: {0} bytes, {1} Mb, {2} MiB", ATAID.ExtendedUserSectors * logicalsectorsize,
((ulong)ATAID.ExtendedUserSectors * logicalsectorsize) / 1000 / 1000, ((ulong)ATAID.ExtendedUserSectors * logicalsectorsize) / 1024 / 1024).AppendLine(); (ATAID.ExtendedUserSectors * logicalsectorsize) / 1000 / 1000, (ATAID.ExtendedUserSectors * logicalsectorsize) / 1024 / 1024).AppendLine();
} }
} }
else else
{ {
if((((ulong)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", (ulong)ATAID.LBA48Sectors * logicalsectorsize, sb.AppendFormat("Device size in 48-bit LBA mode: {0} bytes, {1} Tb, {2} TiB", ATAID.LBA48Sectors * logicalsectorsize,
((ulong)ATAID.LBA48Sectors * logicalsectorsize) / 1000 / 1000 / 1000 / 1000, ((ulong)ATAID.LBA48Sectors * logicalsectorsize) / 1024 / 1024 / 1024 / 1024).AppendLine(); (ATAID.LBA48Sectors * logicalsectorsize) / 1000 / 1000 / 1000 / 1000, (ATAID.LBA48Sectors * logicalsectorsize) / 1024 / 1024 / 1024 / 1024).AppendLine();
} }
else if((((ulong)ATAID.LBA48Sectors * logicalsectorsize) / 1024 / 1024) > 1000) else if(((ATAID.LBA48Sectors * logicalsectorsize) / 1024 / 1024) > 1000)
{ {
sb.AppendFormat("Device size in 48-bit LBA mode: {0} bytes, {1} Gb, {2} GiB", (ulong)ATAID.LBA48Sectors * logicalsectorsize, sb.AppendFormat("Device size in 48-bit LBA mode: {0} bytes, {1} Gb, {2} GiB", ATAID.LBA48Sectors * logicalsectorsize,
((ulong)ATAID.LBA48Sectors * logicalsectorsize) / 1000 / 1000 / 1000, ((ulong)ATAID.LBA48Sectors * logicalsectorsize) / 1024 / 1024 / 1024).AppendLine(); (ATAID.LBA48Sectors * logicalsectorsize) / 1000 / 1000 / 1000, (ATAID.LBA48Sectors * logicalsectorsize) / 1024 / 1024 / 1024).AppendLine();
} }
else else
{ {
sb.AppendFormat("Device size in 48-bit LBA mode: {0} bytes, {1} Mb, {2} MiB", (ulong)ATAID.LBA48Sectors * logicalsectorsize, sb.AppendFormat("Device size in 48-bit LBA mode: {0} bytes, {1} Mb, {2} MiB", ATAID.LBA48Sectors * logicalsectorsize,
((ulong)ATAID.LBA48Sectors * logicalsectorsize) / 1000 / 1000, ((ulong)ATAID.LBA48Sectors * logicalsectorsize) / 1024 / 1024).AppendLine(); (ATAID.LBA48Sectors * logicalsectorsize) / 1000 / 1000, (ATAID.LBA48Sectors * logicalsectorsize) / 1024 / 1024).AppendLine();
} }
} }
} }

View File

@@ -113,7 +113,7 @@ namespace DiscImageChef.Decoders.Bluray
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Always 66 /// Always 66
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved

View File

@@ -145,7 +145,7 @@ namespace DiscImageChef.Decoders.Bluray
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Always 6 /// Always 6
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved

View File

@@ -57,7 +57,7 @@ namespace DiscImageChef.Decoders.Bluray
/// <summary> /// <summary>
/// Disc Definition Structure Identifier "DS" /// Disc Definition Structure Identifier "DS"
/// </summary> /// </summary>
const UInt16 DDSIdentifier = 0x4453; const ushort DDSIdentifier = 0x4453;
#endregion Private constants #endregion Private constants
#region Public methods #region Public methods
@@ -170,7 +170,7 @@ namespace DiscImageChef.Decoders.Bluray
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data Length /// Data Length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
@@ -185,7 +185,7 @@ namespace DiscImageChef.Decoders.Bluray
/// Bytes 4 to 5 /// Bytes 4 to 5
/// "DS" /// "DS"
/// </summary> /// </summary>
public UInt16 Signature; public ushort Signature;
/// <summary> /// <summary>
/// Byte 6 /// Byte 6
/// DDS format /// DDS format
@@ -200,57 +200,57 @@ namespace DiscImageChef.Decoders.Bluray
/// Bytes 8 to 11 /// Bytes 8 to 11
/// DDS update count /// DDS update count
/// </summary> /// </summary>
public UInt32 UpdateCount; public uint UpdateCount;
/// <summary> /// <summary>
/// Bytes 12 to 19 /// Bytes 12 to 19
/// Reserved /// Reserved
/// </summary> /// </summary>
public UInt64 Reserved4; public ulong Reserved4;
/// <summary> /// <summary>
/// Bytes 20 to 23 /// Bytes 20 to 23
/// First PSN of Drive Area /// First PSN of Drive Area
/// </summary> /// </summary>
public UInt32 DriveAreaPSN; public uint DriveAreaPSN;
/// <summary> /// <summary>
/// Bytes 24 to 27 /// Bytes 24 to 27
/// Reserved /// Reserved
/// </summary> /// </summary>
public UInt32 Reserved5; public uint Reserved5;
/// <summary> /// <summary>
/// Bytes 28 to 31 /// Bytes 28 to 31
/// First PSN of Defect List /// First PSN of Defect List
/// </summary> /// </summary>
public UInt32 DefectListPSN; public uint DefectListPSN;
/// <summary> /// <summary>
/// Bytes 32 to 35 /// Bytes 32 to 35
/// Reserved /// Reserved
/// </summary> /// </summary>
public UInt32 Reserved6; public uint Reserved6;
/// <summary> /// <summary>
/// Bytes 36 to 39 /// Bytes 36 to 39
/// PSN of LSN 0 of user data area /// PSN of LSN 0 of user data area
/// </summary> /// </summary>
public UInt32 PSNofLSNZero; public uint PSNofLSNZero;
/// <summary> /// <summary>
/// Bytes 40 to 43 /// Bytes 40 to 43
/// Last LSN of user data area /// Last LSN of user data area
/// </summary> /// </summary>
public UInt32 LastUserAreaLSN; public uint LastUserAreaLSN;
/// <summary> /// <summary>
/// Bytes 44 to 47 /// Bytes 44 to 47
/// ISA0 size /// ISA0 size
/// </summary> /// </summary>
public UInt32 ISA0; public uint ISA0;
/// <summary> /// <summary>
/// Bytes 48 to 51 /// Bytes 48 to 51
/// OSA size /// OSA size
/// </summary> /// </summary>
public UInt32 OSA; public uint OSA;
/// <summary> /// <summary>
/// Bytes 52 to 55 /// Bytes 52 to 55
/// ISA1 size /// ISA1 size
/// </summary> /// </summary>
public UInt32 ISA1; public uint ISA1;
/// <summary> /// <summary>
/// Byte 56 /// Byte 56
/// Spare Area full flags /// Spare Area full flags
@@ -275,12 +275,12 @@ namespace DiscImageChef.Decoders.Bluray
/// Byte 60 to 63 /// Byte 60 to 63
/// Disc type specific field /// Disc type specific field
/// </summary> /// </summary>
public UInt32 DiscTypeSpecificField2; public uint DiscTypeSpecificField2;
/// <summary> /// <summary>
/// Byte 64 to 67 /// Byte 64 to 67
/// Reserved /// Reserved
/// </summary> /// </summary>
public UInt32 Reserved9; public uint Reserved9;
/// <summary> /// <summary>
/// Bytes 68 to 99 /// Bytes 68 to 99
/// Status bits of INFO1/2 and PAC1/2 on L0 and L1 /// Status bits of INFO1/2 and PAC1/2 on L0 and L1

View File

@@ -62,7 +62,7 @@ namespace DiscImageChef.Decoders.Bluray
/// <summary> /// <summary>
/// Disc Information Unit Identifier "DI" /// Disc Information Unit Identifier "DI"
/// </summary> /// </summary>
const UInt16 DIUIdentifier = 0x4449; const ushort DIUIdentifier = 0x4449;
#endregion Private constants #endregion Private constants
#region Public methods #region Public methods
@@ -199,7 +199,7 @@ namespace DiscImageChef.Decoders.Bluray
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Always 4098 /// Always 4098
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
@@ -223,7 +223,7 @@ namespace DiscImageChef.Decoders.Bluray
/// Byte 0 /// Byte 0
/// "DI" /// "DI"
/// </summary> /// </summary>
public UInt16 Signature; public ushort Signature;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Disc information format /// Disc information format
@@ -283,7 +283,7 @@ namespace DiscImageChef.Decoders.Bluray
/// Bytes 109 to 110, BD-R/-RE only /// Bytes 109 to 110, BD-R/-RE only
/// Timestamp /// Timestamp
/// </summary> /// </summary>
public UInt16 TimeStamp; public ushort TimeStamp;
/// <summary> /// <summary>
/// Byte 111 /// Byte 111
/// Product revision number /// Product revision number

View File

@@ -115,7 +115,7 @@ namespace DiscImageChef.Decoders.Bluray
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Always 14 /// Always 14
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
@@ -130,17 +130,17 @@ namespace DiscImageChef.Decoders.Bluray
/// Bytes 4 to 7 /// Bytes 4 to 7
/// Reserved /// Reserved
/// </summary> /// </summary>
public UInt32 Reserved3; public uint Reserved3;
/// <summary> /// <summary>
/// Bytes 8 to 11 /// Bytes 8 to 11
/// Free spare blocks /// Free spare blocks
/// </summary> /// </summary>
public UInt32 FreeSpareBlocks; public uint FreeSpareBlocks;
/// <summary> /// <summary>
/// Bytes 12 to 15 /// Bytes 12 to 15
/// Allocated spare blocks /// Allocated spare blocks
/// </summary> /// </summary>
public UInt32 AllocatedSpareBlocks; public uint AllocatedSpareBlocks;
} }
#endregion Public structures #endregion Public structures
} }

View File

@@ -59,7 +59,7 @@ namespace DiscImageChef.Decoders.CD
/// Bytes 1 to 0 /// Bytes 1 to 0
/// Total size of returned session information minus this field /// Total size of returned session information minus this field
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved

View File

@@ -33,7 +33,6 @@
using System; using System;
using DiscImageChef.Console; using DiscImageChef.Console;
using System.Text; using System.Text;
using System.Collections.Generic;
namespace DiscImageChef.Decoders.CD namespace DiscImageChef.Decoders.CD
{ {
@@ -127,7 +126,7 @@ namespace DiscImageChef.Decoders.CD
/// <summary> /// <summary>
/// Total size of returned CD-Text information minus this field /// Total size of returned CD-Text information minus this field
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Reserved /// Reserved
/// </summary> /// </summary>
@@ -183,7 +182,7 @@ namespace DiscImageChef.Decoders.CD
/// Bytes 16 to 17 /// Bytes 16 to 17
/// CRC16 /// CRC16
/// </summary> /// </summary>
public UInt16 CRC; public ushort CRC;
} }
public static CDText? Decode(byte[] CDTextResponse) public static CDText? Decode(byte[] CDTextResponse)

View File

@@ -30,8 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
namespace DiscImageChef.Decoders.CD namespace DiscImageChef.Decoders.CD
{ {
public enum TOC_ADR : byte public enum TOC_ADR : byte

View File

@@ -67,7 +67,7 @@ namespace DiscImageChef.Decoders.CD
/// <summary> /// <summary>
/// Total size of returned session information minus this field /// Total size of returned session information minus this field
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// First complete session number in hex /// First complete session number in hex
/// </summary> /// </summary>

View File

@@ -58,7 +58,7 @@ namespace DiscImageChef.Decoders.CD
/// <summary> /// <summary>
/// Total size of returned session information minus this field /// Total size of returned session information minus this field
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Reserved /// Reserved
/// </summary> /// </summary>

View File

@@ -58,7 +58,7 @@ namespace DiscImageChef.Decoders.CD
/// <summary> /// <summary>
/// Total size of returned session information minus this field /// Total size of returned session information minus this field
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// First track number in hex /// First track number in hex
/// </summary> /// </summary>
@@ -104,7 +104,7 @@ namespace DiscImageChef.Decoders.CD
/// Bytes 4 to 7 /// Bytes 4 to 7
/// First track number in last complete session start address in LBA or in MSF /// First track number in last complete session start address in LBA or in MSF
/// </summary> /// </summary>
public UInt32 TrackStartAddress; public uint TrackStartAddress;
} }
public static CDSessionInfo? Decode(byte[] CDSessionInfoResponse) public static CDSessionInfo? Decode(byte[] CDSessionInfoResponse)

View File

@@ -60,7 +60,7 @@ namespace DiscImageChef.Decoders.CD
/// <summary> /// <summary>
/// Total size of returned TOC minus this field /// Total size of returned TOC minus this field
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// First track number in hex /// First track number in hex
/// </summary> /// </summary>
@@ -106,7 +106,7 @@ namespace DiscImageChef.Decoders.CD
/// Bytes 4 to 7 /// Bytes 4 to 7
/// The track start address in LBA or in MSF /// The track start address in LBA or in MSF
/// </summary> /// </summary>
public UInt32 TrackStartAddress; public uint TrackStartAddress;
} }
public static CDTOC? Decode(byte[] CDTOCResponse) public static CDTOC? Decode(byte[] CDTOCResponse)

View File

@@ -1,3 +1,62 @@
2016-07-28 Natalia Portillo <claunia@claunia.com>
* PMA.cs:
* TOC.cs:
* PFI.cs:
* DMI.cs:
* ATIP.cs:
* DDS.cs:
* PRI.cs:
* RMD.cs:
* BCA.cs:
* UDI.cs:
* ADIP.cs:
* AACS.cs:
* DMI.cs:
* Enums.cs:
* CPRM.cs:
* Spare.cs:
* EVPD.cs:
* Enums.cs:
* ISO.cs:
* Errors.cs:
* Enums.cs:
* Modes.cs:
* Sense.cs:
* Types.cs:
* DI.cs:
* Session.cs:
* FullTOC.cs:
* Layers.cs:
* BCA.cs:
* DDS.cs:
* CSS&CPRM.cs:
* Inquiry.cs:
* Identify.cs:
* Enums.cs:
* Amiga.cs:
* Apple2.cs:
* CPRM.cs:
* AACS.cs:
* Spare.cs:
* Cartridge.cs:
* Enums.cs:
* System34.cs:
* Hybrid.cs:
* AppleSony.cs:
* Commodore.cs:
* CDTextOnLeadIn.cs:
* Cartridge.cs:
* System3740.cs:
* Features.cs:
* VendorString.cs:
* Perpendicular.cs:
* BlockLimits.cs:
* WriteProtect.cs:
* DensitySupport.cs:
* DiscInformation.cs:
* DiscStructureCapabilities.cs: Refactor and code cleanup.
2016-02-05 Natalia Portillo <claunia@claunia.com> 2016-02-05 Natalia Portillo <claunia@claunia.com>
* SCSI/Sense.cs: * SCSI/Sense.cs:

View File

@@ -30,8 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
{ {
/// <summary> /// <summary>
@@ -58,7 +56,7 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved

View File

@@ -30,8 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
{ {
/// <summary> /// <summary>
@@ -58,7 +56,7 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved

View File

@@ -30,8 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
{ {
/// <summary> /// <summary>
@@ -58,7 +56,7 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved

View File

@@ -30,8 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
{ {
/// <summary> /// <summary>
@@ -58,7 +56,7 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
@@ -82,7 +80,7 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved

View File

@@ -30,7 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
using System.Text; using System.Text;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
@@ -59,7 +58,7 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
@@ -98,7 +97,7 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved

View File

@@ -30,7 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
using System.Text; using System.Text;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
@@ -58,7 +57,7 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved

View File

@@ -60,7 +60,7 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved

View File

@@ -30,8 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
{ {
/// <summary> /// <summary>
@@ -58,7 +56,7 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved

View File

@@ -30,8 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
{ {
#region Public enumerations #region Public enumerations

View File

@@ -30,8 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
{ {
/// <summary> /// <summary>
@@ -58,7 +56,7 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
@@ -98,7 +96,7 @@ namespace DiscImageChef.Decoders.DVD
/// Byte 8 to 11 /// Byte 8 to 11
/// L0 Data Area Capacity /// L0 Data Area Capacity
/// </summary> /// </summary>
public UInt32 Capacity; public uint Capacity;
} }
public struct MiddleZoneStartAddress public struct MiddleZoneStartAddress
@@ -107,7 +105,7 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length = 10 /// Data length = 10
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
@@ -147,7 +145,7 @@ namespace DiscImageChef.Decoders.DVD
/// Byte 8 to 11 /// Byte 8 to 11
/// Start LBA of Shifted Middle Area on L0 /// Start LBA of Shifted Middle Area on L0
/// </summary> /// </summary>
public UInt32 ShiftedMiddleAreaStartAddress; public uint ShiftedMiddleAreaStartAddress;
} }
public struct JumpIntervalSize public struct JumpIntervalSize
@@ -156,7 +154,7 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length = 10 /// Data length = 10
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
@@ -191,7 +189,7 @@ namespace DiscImageChef.Decoders.DVD
/// Byte 8 to 11 /// Byte 8 to 11
/// Jump Interval size for the Regular Interval Layer Jump /// Jump Interval size for the Regular Interval Layer Jump
/// </summary> /// </summary>
public UInt32 Size; public uint Size;
} }
public struct ManualLayerJumpAddress public struct ManualLayerJumpAddress
@@ -200,7 +198,7 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length = 10 /// Data length = 10
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
@@ -235,7 +233,7 @@ namespace DiscImageChef.Decoders.DVD
/// Byte 8 to 11 /// Byte 8 to 11
/// LBA for the manual layer jump /// LBA for the manual layer jump
/// </summary> /// </summary>
public UInt32 LBA; public uint LBA;
} }
} }
} }

View File

@@ -74,7 +74,7 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
@@ -141,17 +141,17 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 8 to 11 /// Bytes 8 to 11
/// PSN where Data Area starts /// PSN where Data Area starts
/// </summary> /// </summary>
public UInt32 DataAreaStartPSN; public uint DataAreaStartPSN;
/// <summary> /// <summary>
/// Bytes 12 to 15 /// Bytes 12 to 15
/// PSN where Data Area ends /// PSN where Data Area ends
/// </summary> /// </summary>
public UInt32 DataAreaEndPSN; public uint DataAreaEndPSN;
/// <summary> /// <summary>
/// Bytes 16 to 19 /// Bytes 16 to 19
/// PSN where Data Area ends in Layer 0 /// PSN where Data Area ends in Layer 0
/// </summary> /// </summary>
public UInt32 Layer0EndPSN; public uint Layer0EndPSN;
/// <summary> /// <summary>
/// Byte 20, bit 7 /// Byte 20, bit 7
/// True if BCA exists. GC/Wii discs do not have this bit set, but there is a BCA, making it unreadable in normal DVD drives /// True if BCA exists. GC/Wii discs do not have this bit set, but there is a BCA, making it unreadable in normal DVD drives
@@ -169,7 +169,7 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 21 to 22 /// Bytes 21 to 22
/// UMD only, media attribute, application-defined, part of media specific in rest of discs /// UMD only, media attribute, application-defined, part of media specific in rest of discs
/// </summary> /// </summary>
public UInt16 MediaAttribute; public ushort MediaAttribute;
#endregion UMD PFI #endregion UMD PFI
#region DVD-RAM PFI #region DVD-RAM PFI
@@ -285,12 +285,12 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 36 to 39 /// Bytes 36 to 39
/// Sector number of the first sector of the current Border Out /// Sector number of the first sector of the current Border Out
/// </summary> /// </summary>
public UInt32 CurrentBorderOutSector; public uint CurrentBorderOutSector;
/// <summary> /// <summary>
/// Bytes 40 to 43 /// Bytes 40 to 43
/// Sector number of the first sector of the next Border In /// Sector number of the first sector of the next Border In
/// </summary> /// </summary>
public UInt32 NextBorderInSector; public uint NextBorderInSector;
#endregion DVD-R PFI, DVD-RW PFI #endregion DVD-R PFI, DVD-RW PFI
#region DVD+RW PFI #region DVD+RW PFI
@@ -1013,12 +1013,12 @@ namespace DiscImageChef.Decoders.DVD
/// Byte 36 /// Byte 36
/// Start sector number of current RMD in Extra Border Zone /// Start sector number of current RMD in Extra Border Zone
/// </summary> /// </summary>
public UInt32 CurrentRMDExtraBorderPSN; public uint CurrentRMDExtraBorderPSN;
/// <summary> /// <summary>
/// Byte 40 /// Byte 40
/// Start sector number of Physical Format Information blocks in Extra Border Zone /// Start sector number of Physical Format Information blocks in Extra Border Zone
/// </summary> /// </summary>
public UInt32 PFIExtraBorderPSN; public uint PFIExtraBorderPSN;
/// <summary> /// <summary>
/// Byte 44, bit 0 /// Byte 44, bit 0
/// If NOT set, Control Data Zone is pre-recorded /// If NOT set, Control Data Zone is pre-recorded
@@ -1351,7 +1351,7 @@ namespace DiscImageChef.Decoders.DVD
sizeString = "120mm"; sizeString = "120mm";
break; break;
default: default:
sizeString = String.Format("unknown size identifier {0}", decoded.DiscSize); sizeString = string.Format("unknown size identifier {0}", decoded.DiscSize);
break; break;
} }

View File

@@ -30,8 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
{ {
/// <summary> /// <summary>
@@ -58,7 +56,7 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved

View File

@@ -30,8 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
{ {
/// <summary> /// <summary>
@@ -58,7 +56,7 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
@@ -82,7 +80,7 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
@@ -112,7 +110,7 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 6 to 7 /// Bytes 6 to 7
/// Number of remaining RMDs in current RMZ /// Number of remaining RMDs in current RMZ
/// </summary> /// </summary>
public UInt16 CurrentRemainingRMDs; public ushort CurrentRemainingRMDs;
} }
} }
} }

View File

@@ -30,7 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
using System.Text; using System.Text;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
@@ -58,7 +57,7 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
@@ -73,17 +72,17 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 4 to 7 /// Bytes 4 to 7
/// Data length /// Data length
/// </summary> /// </summary>
public UInt32 UnusedPrimaryBlocks; public uint UnusedPrimaryBlocks;
/// <summary> /// <summary>
/// Bytes 8 to 11 /// Bytes 8 to 11
/// Data length /// Data length
/// </summary> /// </summary>
public UInt32 UnusedSupplementaryBlocks; public uint UnusedSupplementaryBlocks;
/// <summary> /// <summary>
/// Bytes 12 to 15 /// Bytes 12 to 15
/// Data length /// Data length
/// </summary> /// </summary>
public UInt32 AllocatedSupplementaryBlocks; public uint AllocatedSupplementaryBlocks;
} }
public static SpareAreaInformation? Decode(byte[] response) public static SpareAreaInformation? Decode(byte[] response)

View File

@@ -30,8 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
namespace DiscImageChef.Decoders.DVD namespace DiscImageChef.Decoders.DVD
{ {
/// <summary> /// <summary>
@@ -58,7 +56,7 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
@@ -83,37 +81,37 @@ namespace DiscImageChef.Decoders.DVD
/// Bytes 6 to 7 /// Bytes 6 to 7
/// Random number /// Random number
/// </summary> /// </summary>
public UInt16 RandomNumber; public ushort RandomNumber;
/// <summary> /// <summary>
/// Byte 8 to 11 /// Byte 8 to 11
/// Year /// Year
/// </summary> /// </summary>
public UInt32 Year; public uint Year;
/// <summary> /// <summary>
/// Byte 12 to 13 /// Byte 12 to 13
/// Month /// Month
/// </summary> /// </summary>
public UInt16 Month; public ushort Month;
/// <summary> /// <summary>
/// Byte 14 to 15 /// Byte 14 to 15
/// Day /// Day
/// </summary> /// </summary>
public UInt16 Day; public ushort Day;
/// <summary> /// <summary>
/// Byte 16 to 17 /// Byte 16 to 17
/// Hour /// Hour
/// </summary> /// </summary>
public UInt16 Hour; public ushort Hour;
/// <summary> /// <summary>
/// Byte 18 to 19 /// Byte 18 to 19
/// Minute /// Minute
/// </summary> /// </summary>
public UInt16 Minute; public ushort Minute;
/// <summary> /// <summary>
/// Byte 20 to 21 /// Byte 20 to 21
/// Second /// Second
/// </summary> /// </summary>
public UInt16 Second; public ushort Second;
} }
} }
} }

View File

@@ -30,7 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace DiscImageChef.Decoders.Floppy namespace DiscImageChef.Decoders.Floppy
@@ -76,11 +75,11 @@ namespace DiscImageChef.Decoders.Floppy
/// <summary> /// <summary>
/// Checksum from <see cref="amiga"/> to <see cref="label"/> /// Checksum from <see cref="amiga"/> to <see cref="label"/>
/// </summary> /// </summary>
public UInt32 headerChecksum; public uint headerChecksum;
/// <summary> /// <summary>
/// Checksum from <see cref="data"/> /// Checksum from <see cref="data"/>
/// </summary> /// </summary>
public UInt32 dataChecksum; public uint dataChecksum;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)]
public byte[] data; public byte[] data;
} }

View File

@@ -30,7 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace DiscImageChef.Decoders.Floppy namespace DiscImageChef.Decoders.Floppy

View File

@@ -30,7 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace DiscImageChef.Decoders.Floppy namespace DiscImageChef.Decoders.Floppy
@@ -89,7 +88,7 @@ namespace DiscImageChef.Decoders.Floppy
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
public byte[] prologue; public byte[] prologue;
/// <summary> /// <summary>
/// Encoded (decodedTrack & 0x3F) /// Encoded (decodedTrack &amp; 0x3F)
/// </summary> /// </summary>
public byte track; public byte track;
/// <summary> /// <summary>

View File

@@ -30,7 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace DiscImageChef.Decoders.Floppy namespace DiscImageChef.Decoders.Floppy
@@ -64,11 +63,11 @@ namespace DiscImageChef.Decoders.Floppy
/// <summary> /// <summary>
/// Format ID, unknown meaning /// Format ID, unknown meaning
/// </summary> /// </summary>
public UInt16 format; public ushort format;
/// <summary> /// <summary>
/// Filled with 0x0F /// Filled with 0x0F
/// </summary> /// </summary>
public UInt16 fill; public ushort fill;
} }
/// <summary> /// <summary>
@@ -92,7 +91,7 @@ namespace DiscImageChef.Decoders.Floppy
/// <summary> /// <summary>
/// Filled with 0x0F /// Filled with 0x0F
/// </summary> /// </summary>
public UInt16 fill; public ushort fill;
} }
} }
} }

View File

@@ -30,8 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
namespace DiscImageChef.Decoders.Floppy namespace DiscImageChef.Decoders.Floppy
{ {
/// <summary> /// <summary>

View File

@@ -30,7 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace DiscImageChef.Decoders.Floppy namespace DiscImageChef.Decoders.Floppy
@@ -130,9 +129,9 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary> /// </summary>
public IBMSectorSizeCode sectorSize; public IBMSectorSizeCode sectorSize;
/// <summary> /// <summary>
/// CRC16 from <see cref="AddressMark.aone"/> to end of <see cref="sectorSize"/> /// CRC16 from <see cref="aone"/> to end of <see cref="sectorSize"/>
/// </summary> /// </summary>
public UInt16 crc; public ushort crc;
} }
/// <summary> /// <summary>
@@ -161,7 +160,7 @@ namespace DiscImageChef.Decoders.Floppy
/// <summary> /// <summary>
/// CRC16 from <see cref="aone"/> to end of <see cref="data"/> /// CRC16 from <see cref="aone"/> to end of <see cref="data"/>
/// </summary> /// </summary>
public UInt16 crc; public ushort crc;
} }
} }
} }

View File

@@ -30,7 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace DiscImageChef.Decoders.Floppy namespace DiscImageChef.Decoders.Floppy
@@ -161,9 +160,9 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary> /// </summary>
public IBMSectorSizeCode sectorSize; public IBMSectorSizeCode sectorSize;
/// <summary> /// <summary>
/// CRC16 from <see cref="AddressMark.aone"/> to end of <see cref="sectorSize"/> /// CRC16 from <see cref="aone"/> to end of <see cref="sectorSize"/>
/// </summary> /// </summary>
public UInt16 crc; public ushort crc;
} }
/// <summary> /// <summary>
@@ -192,7 +191,7 @@ namespace DiscImageChef.Decoders.Floppy
/// <summary> /// <summary>
/// CRC16 from <see cref="aone"/> to end of <see cref="data"/> /// CRC16 from <see cref="aone"/> to end of <see cref="data"/>
/// </summary> /// </summary>
public UInt16 crc; public ushort crc;
} }
} }
} }

View File

@@ -30,7 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace DiscImageChef.Decoders.Floppy namespace DiscImageChef.Decoders.Floppy
@@ -162,9 +161,9 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary> /// </summary>
public IBMSectorSizeCode sectorSize; public IBMSectorSizeCode sectorSize;
/// <summary> /// <summary>
/// CRC16 from <see cref="AddressMark.aone"/> to end of <see cref="sectorSize"/> /// CRC16 from <see cref="aone"/> to end of <see cref="sectorSize"/>
/// </summary> /// </summary>
public UInt16 crc; public ushort crc;
} }
/// <summary> /// <summary>
@@ -193,7 +192,7 @@ namespace DiscImageChef.Decoders.Floppy
/// <summary> /// <summary>
/// CRC16 from <see cref="aone"/> to end of <see cref="data"/> /// CRC16 from <see cref="aone"/> to end of <see cref="data"/>
/// </summary> /// </summary>
public UInt16 crc; public ushort crc;
} }
} }
} }

View File

@@ -30,7 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace DiscImageChef.Decoders.Floppy namespace DiscImageChef.Decoders.Floppy
@@ -152,7 +151,7 @@ namespace DiscImageChef.Decoders.Floppy
/// <summary> /// <summary>
/// CRC16 from <see cref="type"/> to end of <see cref="sectorSize"/> /// CRC16 from <see cref="type"/> to end of <see cref="sectorSize"/>
/// </summary> /// </summary>
public UInt16 crc; public ushort crc;
} }
/// <summary> /// <summary>
@@ -176,7 +175,7 @@ namespace DiscImageChef.Decoders.Floppy
/// <summary> /// <summary>
/// CRC16 from <see cref="type"/> to end of <see cref="data"/> /// CRC16 from <see cref="type"/> to end of <see cref="data"/>
/// </summary> /// </summary>
public UInt16 crc; public ushort crc;
} }
} }
} }

View File

@@ -30,7 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace DiscImageChef.Decoders.SCSI namespace DiscImageChef.Decoders.SCSI

View File

@@ -31,7 +31,6 @@
// ****************************************************************************/ // ****************************************************************************/
using System; using System;
using DiscImageChef;
namespace DiscImageChef.Decoders.SCSI namespace DiscImageChef.Decoders.SCSI
{ {

View File

@@ -30,8 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
namespace DiscImageChef.Decoders.SCSI namespace DiscImageChef.Decoders.SCSI
{ {
public enum PeripheralQualifiers : byte public enum PeripheralQualifiers : byte

View File

@@ -448,7 +448,7 @@ namespace DiscImageChef.Decoders.SCSI
if(response.VersionDescriptors != null) if(response.VersionDescriptors != null)
{ {
foreach(UInt16 VersionDescriptor in response.VersionDescriptors) foreach(ushort VersionDescriptor in response.VersionDescriptors)
{ {
switch(VersionDescriptor) switch(VersionDescriptor)
{ {
@@ -2140,7 +2140,7 @@ namespace DiscImageChef.Decoders.SCSI
/// Array of version descriptors /// Array of version descriptors
/// Bytes 58 to 73 /// Bytes 58 to 73
/// </summary> /// </summary>
public UInt16[] VersionDescriptors; public ushort[] VersionDescriptors;
/// <summary> /// <summary>
/// Reserved /// Reserved
/// Bytes 74 to 95 /// Bytes 74 to 95

View File

@@ -58,7 +58,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
@@ -82,7 +82,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
@@ -106,7 +106,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
@@ -130,7 +130,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
@@ -154,7 +154,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data length /// Data length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
@@ -178,7 +178,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data Length /// Data Length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
@@ -187,7 +187,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
/// <summary> /// <summary>
/// Byte 3 /// Byte 3
/// Number of LBA extents the drive can store. /// Number of LBA extents the drive can store.
/// if(MaxLBAExtents == 0 && DataLength > 2), 256 extents can be stored /// if(MaxLBAExtents == 0 &amp;&amp; DataLength > 2), 256 extents can be stored
/// </summary> /// </summary>
public byte MaxLBAExtents; public byte MaxLBAExtents;
/// <summary> /// <summary>
@@ -208,12 +208,12 @@ namespace DiscImageChef.Decoders.SCSI.MMC
/// Bytes 8 to 11 /// Bytes 8 to 11
/// Start LBA of extent /// Start LBA of extent
/// </summary> /// </summary>
public UInt32 StartLBA; public uint StartLBA;
/// <summary> /// <summary>
/// Bytes 12 to 15 /// Bytes 12 to 15
/// Extent length /// Extent length
/// </summary> /// </summary>
public UInt32 LBACount; public uint LBACount;
} }
public static AACSVolumeIdentifier? DecodeAACSVolumeIdentifier(byte[] AACSVIResponse) public static AACSVolumeIdentifier? DecodeAACSVolumeIdentifier(byte[] AACSVIResponse)

View File

@@ -58,7 +58,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data Length /// Data Length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved

View File

@@ -58,7 +58,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
/// Bytes 0 to 1 /// Bytes 0 to 1
/// 32 + OPCTablesNumber*8 /// 32 + OPCTablesNumber*8
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2, bits 7 to 5 /// Byte 2, bits 7 to 5
/// 000b /// 000b
@@ -88,17 +88,17 @@ namespace DiscImageChef.Decoders.SCSI.MMC
/// Byte 9 (MSB) and byte 4 (LSB) /// Byte 9 (MSB) and byte 4 (LSB)
/// Number of sessions /// Number of sessions
/// </summary> /// </summary>
public UInt16 Sessions; public ushort Sessions;
/// <summary> /// <summary>
/// Byte 10 (MSB) and byte 5 (LSB) /// Byte 10 (MSB) and byte 5 (LSB)
/// Number of first track in last session /// Number of first track in last session
/// </summary> /// </summary>
public UInt16 FirstTrackLastSession; public ushort FirstTrackLastSession;
/// <summary> /// <summary>
/// Byte 11 (MSB) and byte 6 (LSB) /// Byte 11 (MSB) and byte 6 (LSB)
/// Number of last track in last session /// Number of last track in last session
/// </summary> /// </summary>
public UInt16 LastTrackLastSession; public ushort LastTrackLastSession;
/// <summary> /// <summary>
/// Byte 7, bit 7 /// Byte 7, bit 7
/// If set, DiscIdentification is valid /// If set, DiscIdentification is valid
@@ -143,22 +143,22 @@ namespace DiscImageChef.Decoders.SCSI.MMC
/// Bytes 12 to 15 /// Bytes 12 to 15
/// Disc identification number from PMA /// Disc identification number from PMA
/// </summary> /// </summary>
public UInt32 DiscIdentification; public uint DiscIdentification;
/// <summary> /// <summary>
/// Bytes 16 to 19 /// Bytes 16 to 19
/// Last Session Lead-in Start Address (MSF for CD, LBA for others) /// Last Session Lead-in Start Address (MSF for CD, LBA for others)
/// </summary> /// </summary>
public UInt32 LastSessionLeadInStartLBA; public uint LastSessionLeadInStartLBA;
/// <summary> /// <summary>
/// Bytes 20 to 23 /// Bytes 20 to 23
/// Last Possible Lead-out Start Address (MSF for CD, LBA for others) /// Last Possible Lead-out Start Address (MSF for CD, LBA for others)
/// </summary> /// </summary>
public UInt32 LastPossibleLeadOutStartLBA; public uint LastPossibleLeadOutStartLBA;
/// <summary> /// <summary>
/// Bytes 24 to 31 /// Bytes 24 to 31
/// Disc barcode /// Disc barcode
/// </summary> /// </summary>
public UInt64 DiscBarcode; public ulong DiscBarcode;
/// <summary> /// <summary>
/// Byte 32 /// Byte 32
/// Disc application code /// Disc application code
@@ -182,7 +182,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
/// Bytes 0 to 1 /// Bytes 0 to 1
/// kilobytes/sec this OPC table applies to /// kilobytes/sec this OPC table applies to
/// </summary> /// </summary>
public UInt16 Speed; public ushort Speed;
/// <summary> /// <summary>
/// Bytes 2 to 7 /// Bytes 2 to 7
/// OPC values /// OPC values
@@ -196,7 +196,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
/// Bytes 0 to 1 /// Bytes 0 to 1
/// 10 /// 10
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2, bits 7 to 5 /// Byte 2, bits 7 to 5
/// 001b /// 001b
@@ -216,22 +216,22 @@ namespace DiscImageChef.Decoders.SCSI.MMC
/// Bytes 4 to 5 /// Bytes 4 to 5
/// Maximum possible number of the tracks on the disc /// Maximum possible number of the tracks on the disc
/// </summary> /// </summary>
public UInt16 MaxTracks; public ushort MaxTracks;
/// <summary> /// <summary>
/// Bytes 6 to 7 /// Bytes 6 to 7
/// Number of the assigned tracks on the disc /// Number of the assigned tracks on the disc
/// </summary> /// </summary>
public UInt16 AssignedTracks; public ushort AssignedTracks;
/// <summary> /// <summary>
/// Bytes 8 to 9 /// Bytes 8 to 9
/// Maximum possible number of appendable tracks on the disc /// Maximum possible number of appendable tracks on the disc
/// </summary> /// </summary>
public UInt16 MaxAppendableTracks; public ushort MaxAppendableTracks;
/// <summary> /// <summary>
/// Bytes 10 to 11 /// Bytes 10 to 11
/// Current number of appendable tracks on the disc /// Current number of appendable tracks on the disc
/// </summary> /// </summary>
public UInt16 AppendableTracks; public ushort AppendableTracks;
} }
public struct POWResourcesInformation public struct POWResourcesInformation
@@ -240,7 +240,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
/// Bytes 0 to 1 /// Bytes 0 to 1
/// 14 /// 14
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2, bits 7 to 5 /// Byte 2, bits 7 to 5
/// 010b /// 010b
@@ -260,17 +260,17 @@ namespace DiscImageChef.Decoders.SCSI.MMC
/// Bytes 4 to 7 /// Bytes 4 to 7
/// Remaining POW replacements /// Remaining POW replacements
/// </summary> /// </summary>
public UInt32 RemainingPOWReplacements; public uint RemainingPOWReplacements;
/// <summary> /// <summary>
/// Bytes 8 to 11 /// Bytes 8 to 11
/// Remaining POW reallocation map entries /// Remaining POW reallocation map entries
/// </summary> /// </summary>
public UInt32 RemainingPOWReallocation; public uint RemainingPOWReallocation;
/// <summary> /// <summary>
/// Bytes 12 to 15 /// Bytes 12 to 15
/// Number of remaining POW updates /// Number of remaining POW updates
/// </summary> /// </summary>
public UInt32 RemainingPOWUpdates; public uint RemainingPOWUpdates;
} }
public static StandardDiscInformation? Decode000b(byte[] response) public static StandardDiscInformation? Decode000b(byte[] response)

View File

@@ -30,8 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
namespace DiscImageChef.Decoders.SCSI.MMC namespace DiscImageChef.Decoders.SCSI.MMC
{ {
public enum FormatLayerTypeCodes : ushort public enum FormatLayerTypeCodes : ushort

View File

@@ -5316,13 +5316,15 @@ namespace DiscImageChef.Decoders.SCSI.MMC
try try
{ {
DateTime fwDate = new DateTime(Int32.Parse(syear), Int32.Parse(smonth), DateTime fwDate = new DateTime(int.Parse(syear), int.Parse(smonth),
Int32.Parse(sday), Int32.Parse(shour), Int32.Parse(sminute), int.Parse(sday), int.Parse(shour), int.Parse(sminute),
Int32.Parse(ssecond), DateTimeKind.Utc); int.Parse(ssecond), DateTimeKind.Utc);
sb.AppendFormat("Drive firmware is dated {0}", fwDate).AppendLine(); sb.AppendFormat("Drive firmware is dated {0}", fwDate).AppendLine();
} }
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
catch catch
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
{ {
} }

View File

@@ -58,7 +58,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data Length /// Data Length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved
@@ -98,7 +98,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
/// Bytes 6 to end /// Bytes 6 to end
/// Recognized format layers /// Recognized format layers
/// </summary> /// </summary>
public UInt16[] FormatLayers; public ushort[] FormatLayers;
} }
public static RecognizedFormatLayers? DecodeFormatLayers(byte[] FormatLayersResponse) public static RecognizedFormatLayers? DecodeFormatLayers(byte[] FormatLayersResponse)
@@ -122,7 +122,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
decoded.Reserved4 = (byte)((FormatLayersResponse[5] & 0x0C) >> 2); decoded.Reserved4 = (byte)((FormatLayersResponse[5] & 0x0C) >> 2);
decoded.OnlineFormatLayer = (byte)(FormatLayersResponse[5] & 0x03); decoded.OnlineFormatLayer = (byte)(FormatLayersResponse[5] & 0x03);
decoded.FormatLayers = new UInt16[(FormatLayersResponse.Length - 6) / 2]; decoded.FormatLayers = new ushort[(FormatLayersResponse.Length - 6) / 2];
for(int i = 0; i < (FormatLayersResponse.Length - 6) / 2; i++) for(int i = 0; i < (FormatLayersResponse.Length - 6) / 2; i++)
{ {
@@ -147,7 +147,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
{ {
switch(response.FormatLayers[i]) switch(response.FormatLayers[i])
{ {
case (UInt16)FormatLayerTypeCodes.BDLayer: case (ushort)FormatLayerTypeCodes.BDLayer:
{ {
sb.AppendFormat("Layer {0} is of type Blu-ray", i).AppendLine(); sb.AppendFormat("Layer {0} is of type Blu-ray", i).AppendLine();
if(response.DefaultFormatLayer == i) if(response.DefaultFormatLayer == i)
@@ -156,7 +156,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
sb.AppendLine("This is the layer actually in use."); sb.AppendLine("This is the layer actually in use.");
break; break;
} }
case (UInt16)FormatLayerTypeCodes.CDLayer: case (ushort)FormatLayerTypeCodes.CDLayer:
{ {
sb.AppendFormat("Layer {0} is of type CD", i).AppendLine(); sb.AppendFormat("Layer {0} is of type CD", i).AppendLine();
if(response.DefaultFormatLayer == i) if(response.DefaultFormatLayer == i)
@@ -165,7 +165,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
sb.AppendLine("This is the layer actually in use."); sb.AppendLine("This is the layer actually in use.");
break; break;
} }
case (UInt16)FormatLayerTypeCodes.DVDLayer: case (ushort)FormatLayerTypeCodes.DVDLayer:
{ {
sb.AppendFormat("Layer {0} is of type DVD", i).AppendLine(); sb.AppendFormat("Layer {0} is of type DVD", i).AppendLine();
if(response.DefaultFormatLayer == i) if(response.DefaultFormatLayer == i)
@@ -174,7 +174,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
sb.AppendLine("This is the layer actually in use."); sb.AppendLine("This is the layer actually in use.");
break; break;
} }
case (UInt16)FormatLayerTypeCodes.HDDVDLayer: case (ushort)FormatLayerTypeCodes.HDDVDLayer:
{ {
sb.AppendFormat("Layer {0} is of type HD DVD", i).AppendLine(); sb.AppendFormat("Layer {0} is of type HD DVD", i).AppendLine();
if(response.DefaultFormatLayer == i) if(response.DefaultFormatLayer == i)

View File

@@ -58,7 +58,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
/// Bytes 0 to 1 /// Bytes 0 to 1
/// Data Length /// Data Length
/// </summary> /// </summary>
public UInt16 DataLength; public ushort DataLength;
/// <summary> /// <summary>
/// Byte 2 /// Byte 2
/// Reserved /// Reserved

View File

@@ -233,7 +233,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "15916 flux transitions per radian"; density = "15916 flux transitions per radian";
break; break;
default: default:
density = String.Format("with unknown density code 0x{0:X2}", (byte)descriptor.Density); density = string.Format("with unknown density code 0x{0:X2}", (byte)descriptor.Density);
break; break;
} }
@@ -272,7 +272,7 @@ namespace DiscImageChef.Decoders.SCSI
sb.AppendLine("\tDevice uses a write cache but doesn't return until cache is flushed"); sb.AppendLine("\tDevice uses a write cache but doesn't return until cache is flushed");
break; break;
default: default:
sb.AppendFormat("\tUnknown buffered mode code 0x{0:X2}", (byte)header.Value.BufferedMode).AppendLine(); sb.AppendFormat("\tUnknown buffered mode code 0x{0:X2}", header.Value.BufferedMode).AppendLine();
break; break;
} }
@@ -463,7 +463,7 @@ namespace DiscImageChef.Decoders.SCSI
medium = "Exatape 75m"; medium = "Exatape 75m";
break; break;
default: default:
medium = String.Format("unknown medium type 0x{0:X2}", (byte)header.Value.MediumType); medium = string.Format("unknown medium type 0x{0:X2}", (byte)header.Value.MediumType);
break; break;
} }
@@ -601,7 +601,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "AIT-3"; density = "AIT-3";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -623,7 +623,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "LTO Ultrium-5 WORM"; density = "LTO Ultrium-5 WORM";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -636,7 +636,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "LTO Ultrium"; density = "LTO Ultrium";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -649,7 +649,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "LTO Ultrium-2"; density = "LTO Ultrium-2";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -665,7 +665,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "DDS-3"; density = "DDS-3";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -681,7 +681,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "DDS-4"; density = "DDS-4";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -694,7 +694,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "DAT-72"; density = "DAT-72";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -708,7 +708,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "LTO Ultrium-3"; density = "LTO Ultrium-3";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -721,7 +721,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "DDS cleaning cartridge"; density = "DDS cleaning cartridge";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -735,7 +735,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "LTO Ultrium-4"; density = "LTO Ultrium-4";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -749,7 +749,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "LTO Ultrium-5"; density = "LTO Ultrium-5";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -763,7 +763,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "LTO Ultrium-6"; density = "LTO Ultrium-6";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -777,7 +777,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "LTO Ultrium-7"; density = "LTO Ultrium-7";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -799,7 +799,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "LTO Ultrium-5 in CD emulation mode"; density = "LTO Ultrium-5 in CD emulation mode";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -833,7 +833,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "VXA-1"; density = "VXA-1";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -876,7 +876,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "VXA-3"; density = "VXA-3";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -914,7 +914,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "DLTtape III compressed"; density = "DLTtape III compressed";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -946,7 +946,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "DLTtape IIIxt compressed"; density = "DLTtape IIIxt compressed";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1000,7 +1000,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "DLTtape IV at 98250 bpi compressed"; density = "DLTtape IV at 98250 bpi compressed";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1039,7 +1039,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "Super DLTtape I at 133000 bpi compressed"; density = "Super DLTtape I at 133000 bpi compressed";
break;*/ break;*/
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1052,7 +1052,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "Super DLTtape II"; density = "Super DLTtape II";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1069,7 +1069,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "VStape I compressed"; density = "VStape I compressed";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1082,7 +1082,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "DLTtape S4"; density = "DLTtape S4";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1104,7 +1104,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "EXB-8500 compressed"; density = "EXB-8500 compressed";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1129,7 +1129,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "Mammoth"; density = "Mammoth";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1154,7 +1154,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "Mammoth"; density = "Mammoth";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1179,7 +1179,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "Mammoth"; density = "Mammoth";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1201,7 +1201,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "Mammoth-2"; density = "Mammoth-2";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1214,7 +1214,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "DC-2900SL"; density = "DC-2900SL";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1227,7 +1227,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "DC-9250"; density = "DC-9250";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1240,7 +1240,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "SLR-32"; density = "SLR-32";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1253,7 +1253,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "MRL1-26GBSL"; density = "MRL1-26GBSL";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1266,7 +1266,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "SLRtape-50"; density = "SLRtape-50";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1279,7 +1279,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "SLRtape-50 SL"; density = "SLRtape-50 SL";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1292,7 +1292,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "SLR-32 SL"; density = "SLR-32 SL";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1305,7 +1305,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "SLR-5"; density = "SLR-5";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1318,7 +1318,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "SLR-5 SL"; density = "SLR-5 SL";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1331,7 +1331,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "SLRtape-7"; density = "SLRtape-7";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1344,7 +1344,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "SLRtape-7 SL"; density = "SLRtape-7 SL";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1357,7 +1357,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "SLRtape-24"; density = "SLRtape-24";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1370,7 +1370,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "SLRtape-24 SL"; density = "SLRtape-24 SL";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1383,7 +1383,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "SLRtape-140"; density = "SLRtape-140";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1396,7 +1396,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "SLRtape-40"; density = "SLRtape-40";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1409,7 +1409,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "SLRtape-60 or SLRtape-75"; density = "SLRtape-60 or SLRtape-75";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1422,7 +1422,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "SLRtape-100"; density = "SLRtape-100";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
@@ -1435,13 +1435,13 @@ namespace DiscImageChef.Decoders.SCSI
density = "SLR40, SLR60 or SLR100"; density = "SLR40, SLR60 or SLR100";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
} }
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
@@ -1583,7 +1583,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "ANSI X3.200: 356 mm double-sided optical disc with 56350 tracks"; density = "ANSI X3.200: 356 mm double-sided optical disc with 56350 tracks";
break; break;
default: default:
density = String.Format("unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
@@ -1787,7 +1787,7 @@ namespace DiscImageChef.Decoders.SCSI
density = "LTO Ultrium-5"; density = "LTO Ultrium-5";
break; break;
default: default:
density = String.Format("with unknown density code 0x{0:X2}", descriptor.Density); density = string.Format("with unknown density code 0x{0:X2}", descriptor.Density);
break; break;
} }
@@ -1811,8 +1811,6 @@ namespace DiscImageChef.Decoders.SCSI
break; break;
} }
#endregion Multimedia device mode header #endregion Multimedia device mode header
default:
break;
} }
return sb.ToString(); return sb.ToString();
@@ -2244,7 +2242,7 @@ namespace DiscImageChef.Decoders.SCSI
if(page.BusyTimeoutPeriod == 0xFFFF) if(page.BusyTimeoutPeriod == 0xFFFF)
sb.AppendLine("\tThere is no limit on the maximum time that is allowed to remain busy"); sb.AppendLine("\tThere is no limit on the maximum time that is allowed to remain busy");
else else
sb.AppendFormat("\tA maximum of {0} ms are allowed to remain busy", (int)page.BusyTimeoutPeriod * 100).AppendLine(); sb.AppendFormat("\tA maximum of {0} ms are allowed to remain busy", page.BusyTimeoutPeriod * 100).AppendLine();
} }
if(page.ExtendedSelfTestCompletionTime > 0) if(page.ExtendedSelfTestCompletionTime > 0)
@@ -2372,15 +2370,15 @@ namespace DiscImageChef.Decoders.SCSI
if(page.BufferEmptyRatio > 0) if(page.BufferEmptyRatio > 0)
sb.AppendFormat("\t{0} ratio of buffer that shall be empty prior to attempting a reselection", page.BufferEmptyRatio).AppendLine(); sb.AppendFormat("\t{0} ratio of buffer that shall be empty prior to attempting a reselection", page.BufferEmptyRatio).AppendLine();
if(page.BusInactivityLimit > 0) if(page.BusInactivityLimit > 0)
sb.AppendFormat("\t{0} µs maximum permitted to assert BSY without a REQ/ACK handshake", (int)page.BusInactivityLimit * 100).AppendLine(); sb.AppendFormat("\t{0} µs maximum permitted to assert BSY without a REQ/ACK handshake", page.BusInactivityLimit * 100).AppendLine();
if(page.DisconnectTimeLimit > 0) if(page.DisconnectTimeLimit > 0)
sb.AppendFormat("\t{0} µs maximum permitted wait after releasing the bus before attempting reselection", (int)page.DisconnectTimeLimit * 100).AppendLine(); sb.AppendFormat("\t{0} µs maximum permitted wait after releasing the bus before attempting reselection", page.DisconnectTimeLimit * 100).AppendLine();
if(page.ConnectTimeLimit > 0) if(page.ConnectTimeLimit > 0)
sb.AppendFormat("\t{0} µs allowed to use the bus before disconnecting, if granted the privilege and not restricted", (int)page.ConnectTimeLimit * 100).AppendLine(); sb.AppendFormat("\t{0} µs allowed to use the bus before disconnecting, if granted the privilege and not restricted", page.ConnectTimeLimit * 100).AppendLine();
if(page.MaxBurstSize > 0) if(page.MaxBurstSize > 0)
sb.AppendFormat("\t{0} bytes maximum can be transferred before disconnecting", (int)page.MaxBurstSize * 512).AppendLine(); sb.AppendFormat("\t{0} bytes maximum can be transferred before disconnecting", page.MaxBurstSize * 512).AppendLine();
if(page.FirstBurstSize > 0) if(page.FirstBurstSize > 0)
sb.AppendFormat("\t{0} bytes maximum can be transferred for a command along with the disconnect command", (int)page.FirstBurstSize * 512).AppendLine(); sb.AppendFormat("\t{0} bytes maximum can be transferred for a command along with the disconnect command", page.FirstBurstSize * 512).AppendLine();
if(page.DIMM) if(page.DIMM)
sb.AppendLine("\tTarget shall not transfer data for a command during the same interconnect tenancy"); sb.AppendLine("\tTarget shall not transfer data for a command during the same interconnect tenancy");
@@ -3853,7 +3851,7 @@ namespace DiscImageChef.Decoders.SCSI
sb.AppendFormat("\tActive partition: {0}", page.ActivePartition).AppendLine(); sb.AppendFormat("\tActive partition: {0}", page.ActivePartition).AppendLine();
sb.AppendFormat("\tWrite buffer shall have a full ratio of {0} before being flushed to medium", page.WriteBufferFullRatio).AppendLine(); sb.AppendFormat("\tWrite buffer shall have a full ratio of {0} before being flushed to medium", page.WriteBufferFullRatio).AppendLine();
sb.AppendFormat("\tRead buffer shall have an empty ratio of {0} before more data is read from medium", page.ReadBufferEmptyRatio).AppendLine(); sb.AppendFormat("\tRead buffer shall have an empty ratio of {0} before more data is read from medium", page.ReadBufferEmptyRatio).AppendLine();
sb.AppendFormat("\tDrive will delay {0} ms before buffered data is forcefully written to the medium even before buffer is full", (int)page.WriteDelayTime * 100).AppendLine(); sb.AppendFormat("\tDrive will delay {0} ms before buffered data is forcefully written to the medium even before buffer is full", page.WriteDelayTime * 100).AppendLine();
if(page.DBR) if(page.DBR)
{ {
sb.AppendLine("\tDrive supports recovering data from buffer"); sb.AppendLine("\tDrive supports recovering data from buffer");
@@ -6261,7 +6259,7 @@ namespace DiscImageChef.Decoders.SCSI
#region Mode Page 0x1C: Timer & Protect page #region Mode Page 0x1C: Timer & Protect page
/// <summary> /// <summary>
/// Timer & Protect page /// Timer &amp; Protect page
/// Page code 0x1C /// Page code 0x1C
/// 8 bytes in INF-8070 /// 8 bytes in INF-8070
/// </summary> /// </summary>

View File

@@ -88,7 +88,9 @@ namespace DiscImageChef.Decoders.SCSI.SSC
sb.AppendFormat("Device's minimum block size is {0} bytes", decoded.Value.minBlockLen).AppendLine(); sb.AppendFormat("Device's minimum block size is {0} bytes", decoded.Value.minBlockLen).AppendLine();
if(decoded.Value.granularity > 0) if(decoded.Value.granularity > 0)
#pragma warning disable IDE0004 // Remove Unnecessary Cast
sb.AppendFormat("Device's needs a block size granularity of 2^{0} ({1}) bytes", decoded.Value.granularity, Math.Pow(2, (double)decoded.Value.granularity)).AppendLine(); sb.AppendFormat("Device's needs a block size granularity of 2^{0} ({1}) bytes", decoded.Value.granularity, Math.Pow(2, (double)decoded.Value.granularity)).AppendLine();
#pragma warning restore IDE0004 // Remove Unnecessary Cast
} }
return sb.ToString(); return sb.ToString();

View File

@@ -166,7 +166,9 @@ namespace DiscImageChef.Decoders.SCSI.SSC
if(descriptor.defaultDensity) if(descriptor.defaultDensity)
sb.AppendLine("\tThis is the default density on the drive"); sb.AppendLine("\tThis is the default density on the drive");
sb.AppendFormat("\tDensity has {0} bits per mm, with {1} tracks in a {2} mm width tape", sb.AppendFormat("\tDensity has {0} bits per mm, with {1} tracks in a {2} mm width tape",
#pragma warning disable IDE0004 // Remove Unnecessary Cast
descriptor.bpmm, descriptor.tracks, (double)((double)descriptor.width / (double)10)).AppendLine(); descriptor.bpmm, descriptor.tracks, (double)((double)descriptor.width / (double)10)).AppendLine();
#pragma warning restore IDE0004 // Remove Unnecessary Cast
sb.AppendFormat("\tDensity maximum capacity is {0} megabytes", descriptor.capacity).AppendLine(); sb.AppendFormat("\tDensity maximum capacity is {0} megabytes", descriptor.capacity).AppendLine();
sb.AppendFormat("\tDensity description: {0}", descriptor.description).AppendLine(); sb.AppendFormat("\tDensity description: {0}", descriptor.description).AppendLine();
sb.AppendLine(); sb.AppendLine();
@@ -256,7 +258,9 @@ namespace DiscImageChef.Decoders.SCSI.SSC
} }
sb.AppendFormat("\tMedium has a nominal length of {0} m in a {1} mm width tape", sb.AppendFormat("\tMedium has a nominal length of {0} m in a {1} mm width tape",
#pragma warning disable IDE0004 // Remove Unnecessary Cast
descriptor.length, (double)((double)descriptor.width / (double)10)).AppendLine(); descriptor.length, (double)((double)descriptor.width / (double)10)).AppendLine();
#pragma warning restore IDE0004 // Remove Unnecessary Cast
sb.AppendFormat("\tMedium description: {0}", descriptor.description).AppendLine(); sb.AppendFormat("\tMedium description: {0}", descriptor.description).AppendLine();
sb.AppendLine(); sb.AppendLine();
} }

View File

@@ -396,9 +396,9 @@ namespace DiscImageChef.Decoders.SCSI
if(!sense.HasValue) if(!sense.HasValue)
return null; return null;
return sense.Value.AddressValid ? String.Format("Error class {0} type {1} happened on block {2}\n", return sense.Value.AddressValid ? string.Format("Error class {0} type {1} happened on block {2}\n",
sense.Value.ErrorClass, sense.Value.ErrorType, sense.Value.LBA) : sense.Value.ErrorClass, sense.Value.ErrorType, sense.Value.LBA) :
String.Format("Error class {0} type {1}\n", sense.Value.ErrorClass, string.Format("Error class {0} type {1}\n", sense.Value.ErrorClass,
sense.Value.ErrorType); sense.Value.ErrorType);
} }
@@ -499,7 +499,7 @@ namespace DiscImageChef.Decoders.SCSI
/// </summary> /// </summary>
/// <returns>The information value</returns> /// <returns>The information value</returns>
/// <param name="descriptor">Descriptor.</param> /// <param name="descriptor">Descriptor.</param>
public static UInt64 DecodeDescriptor00(byte[] descriptor) public static ulong DecodeDescriptor00(byte[] descriptor)
{ {
if(descriptor.Length != 12 || descriptor[0] != 0x00) if(descriptor.Length != 12 || descriptor[0] != 0x00)
return 0; return 0;
@@ -523,7 +523,7 @@ namespace DiscImageChef.Decoders.SCSI
/// </summary> /// </summary>
/// <returns>The command-specific information sense data descriptor.</returns> /// <returns>The command-specific information sense data descriptor.</returns>
/// <param name="descriptor">Descriptor.</param> /// <param name="descriptor">Descriptor.</param>
public static UInt64 DecodeDescriptor01(byte[] descriptor) public static ulong DecodeDescriptor01(byte[] descriptor)
{ {
if(descriptor.Length != 12 || descriptor[0] != 0x01) if(descriptor.Length != 12 || descriptor[0] != 0x01)
return 0; return 0;
@@ -640,9 +640,9 @@ namespace DiscImageChef.Decoders.SCSI
throw new NotImplementedException("Check SBC-3"); throw new NotImplementedException("Check SBC-3");
} }
public static string PrettifyDescriptor00(UInt64 information) public static string PrettifyDescriptor00(ulong information)
{ {
return String.Format("On logical block {0}\n", information); return string.Format("On logical block {0}\n", information);
} }
public static string PrettifyDescriptor00(byte[] descriptor) public static string PrettifyDescriptor00(byte[] descriptor)
@@ -1884,7 +1884,7 @@ namespace DiscImageChef.Decoders.SCSI
case 0x00: case 0x00:
return "RAM FAILURE"; return "RAM FAILURE";
default: default:
return String.Format("DIAGNOSTIC FAILURE ON COMPONENT {0:X2}h", ASCQ); return string.Format("DIAGNOSTIC FAILURE ON COMPONENT {0:X2}h", ASCQ);
} }
case 0x41: case 0x41:
switch(ASCQ) switch(ASCQ)
@@ -2031,7 +2031,7 @@ namespace DiscImageChef.Decoders.SCSI
} }
break; break;
case 0x4E: case 0x4E:
return String.Format("OVERLAPPED COMMANDS ATTEMPTED FOR TASK TAG {0:X2}h", ASCQ); return string.Format("OVERLAPPED COMMANDS ATTEMPTED FOR TASK TAG {0:X2}h", ASCQ);
case 0x50: case 0x50:
switch(ASCQ) switch(ASCQ)
{ {
@@ -2566,7 +2566,7 @@ namespace DiscImageChef.Decoders.SCSI
} }
break; break;
case 0x70: case 0x70:
return String.Format("DECOMPRESSION EXCEPTION SHORT ALGORITHM ID OF {0:X2}h", ASCQ); return string.Format("DECOMPRESSION EXCEPTION SHORT ALGORITHM ID OF {0:X2}h", ASCQ);
case 0x71: case 0x71:
switch(ASCQ) switch(ASCQ)
{ {
@@ -2684,10 +2684,10 @@ namespace DiscImageChef.Decoders.SCSI
} }
return ASC >= 0x80 ? ASCQ >= 0x80 ? return ASC >= 0x80 ? ASCQ >= 0x80 ?
String.Format("VENDOR-SPECIFIC ASC {0:X2}h WITH VENDOR-SPECIFIC ASCQ {1:X2}h", ASC, ASCQ) : string.Format("VENDOR-SPECIFIC ASC {0:X2}h WITH VENDOR-SPECIFIC ASCQ {1:X2}h", ASC, ASCQ) :
String.Format("VENDOR-SPECIFIC ASC {0:X2}h WITH ASCQ {1:X2}h", ASC, ASCQ) : string.Format("VENDOR-SPECIFIC ASC {0:X2}h WITH ASCQ {1:X2}h", ASC, ASCQ) :
ASCQ >= 0x80 ? String.Format("ASC {0:X2}h WITH VENDOR-SPECIFIC ASCQ {1:X2}h", ASC, ASCQ) : ASCQ >= 0x80 ? string.Format("ASC {0:X2}h WITH VENDOR-SPECIFIC ASCQ {1:X2}h", ASC, ASCQ) :
String.Format("ASC {0:X2}h WITH ASCQ {1:X2}h", ASC, ASCQ); string.Format("ASC {0:X2}h WITH ASCQ {1:X2}h", ASC, ASCQ);
} }
} }
} }

View File

@@ -30,8 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
namespace DiscImageChef.Decoders.SCSI namespace DiscImageChef.Decoders.SCSI
{ {
public enum MediumTypes : byte public enum MediumTypes : byte
@@ -827,7 +825,7 @@ namespace DiscImageChef.Decoders.SCSI
/// </summary> /// </summary>
Mammoth = 0x27, Mammoth = 0x27,
/// <summary> /// <summary>
/// IBM 3490 & 3490E /// IBM 3490 &amp; 3490E
/// </summary> /// </summary>
IBM3490E = 0x28, IBM3490E = 0x28,
/// <summary> /// <summary>

View File

@@ -30,8 +30,6 @@
// Copyright © 2011-2016 Natalia Portillo // Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System;
namespace DiscImageChef.Decoders.SCSI namespace DiscImageChef.Decoders.SCSI
{ {
public static class VendorString public static class VendorString

View File

@@ -83,13 +83,13 @@ namespace DiscImageChef.Decoders.Xbox
/// Bytes 4 to 7 /// Bytes 4 to 7
/// 0x02 in XGD2 and XGD3 /// 0x02 in XGD2 and XGD3
/// </summary> /// </summary>
public UInt32 Version; public uint Version;
/// <summary> /// <summary>
/// Bytes 20 to 27 /// Bytes 20 to 27
/// DMI timestamp /// DMI timestamp
/// </summary> /// </summary>
public Int64 Timestamp; public long Timestamp;
/// <summary> /// <summary>
/// Bytes 36 to 51 /// Bytes 36 to 51