mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Added information from ANSI X3.304-1997 (MMC-1).
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2015-10-31 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
|
* SCSI/Modes.cs:
|
||||||
|
Added information from ANSI X3.304-1997 (MMC-1).
|
||||||
|
|
||||||
2015-10-31 Natalia Portillo <claunia@claunia.com>
|
2015-10-31 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
* SCSI/Modes.cs:
|
* SCSI/Modes.cs:
|
||||||
|
|||||||
@@ -2875,7 +2875,7 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device configuration page
|
/// Device configuration page
|
||||||
/// Page code 0x10
|
/// Page code 0x10
|
||||||
/// 16 bytes in SCSI-2, SSC-1, SSC-2
|
/// 16 bytes in SCSI-2, SSC-1, SSC-2, SSC-3
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public struct ModePage_10_SSC
|
public struct ModePage_10_SSC
|
||||||
{
|
{
|
||||||
@@ -2984,6 +2984,15 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
public bool BAML;
|
public bool BAML;
|
||||||
public bool BAM;
|
public bool BAM;
|
||||||
public byte RewindOnReset;
|
public byte RewindOnReset;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// How drive shall respond to detection of compromised WORM medium integrity
|
||||||
|
/// </summary>
|
||||||
|
public byte WTRE;
|
||||||
|
/// <summary>
|
||||||
|
/// Respond to commands only if a reservation exists
|
||||||
|
/// </summary>
|
||||||
|
public bool OIR;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ModePage_10_SSC? DecodeModePage_10_SSC(byte[] pageResponse)
|
public static ModePage_10_SSC? DecodeModePage_10_SSC(byte[] pageResponse)
|
||||||
@@ -3035,6 +3044,9 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
|
|
||||||
decoded.RewindOnReset = (byte)((pageResponse[15] & 0x18) >> 3);
|
decoded.RewindOnReset = (byte)((pageResponse[15] & 0x18) >> 3);
|
||||||
|
|
||||||
|
decoded.OIR |= (pageResponse[15] & 0x20) == 0x20;
|
||||||
|
decoded.WTRE = (byte)((pageResponse[15] & 0xC0) >> 6);
|
||||||
|
|
||||||
return decoded;
|
return decoded;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3167,6 +3179,19 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (page.WTRE)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
sb.AppendLine("\tDrive will do nothing on WORM tampered medium");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
sb.AppendLine("\tDrive will return CHECK CONDITION on WORM tampered medium");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (page.OIR)
|
||||||
|
sb.AppendLine("\tDrive will only respond to commands if it has received a reservation");
|
||||||
|
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
#endregion Mode Page 0x10: Device configuration page
|
#endregion Mode Page 0x10: Device configuration page
|
||||||
@@ -3175,7 +3200,7 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// CD-ROM audio control parameters
|
/// CD-ROM audio control parameters
|
||||||
/// Page code 0x0E
|
/// Page code 0x0E
|
||||||
/// 16 bytes in SCSI-2
|
/// 16 bytes in SCSI-2, MMC-1
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public struct ModePage_0E
|
public struct ModePage_0E
|
||||||
{
|
{
|
||||||
@@ -3421,7 +3446,7 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// CD-ROM parameteres page
|
/// CD-ROM parameteres page
|
||||||
/// Page code 0x0D
|
/// Page code 0x0D
|
||||||
/// 8 bytes in SCSI-2
|
/// 8 bytes in SCSI-2, MMC-1
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public struct ModePage_0D
|
public struct ModePage_0D
|
||||||
{
|
{
|
||||||
@@ -3552,7 +3577,7 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Read error recovery page for MultiMedia Devices
|
/// Read error recovery page for MultiMedia Devices
|
||||||
/// Page code 0x01
|
/// Page code 0x01
|
||||||
/// 8 bytes in SCSI-2
|
/// 8 bytes in SCSI-2, MMC-1
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public struct ModePage_01_MMC
|
public struct ModePage_01_MMC
|
||||||
{
|
{
|
||||||
@@ -3700,7 +3725,7 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Verify error recovery page for MultiMedia Devices
|
/// Verify error recovery page for MultiMedia Devices
|
||||||
/// Page code 0x07
|
/// Page code 0x07
|
||||||
/// 8 bytes in SCSI-2
|
/// 8 bytes in SCSI-2, MMC-1
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public struct ModePage_07_MMC
|
public struct ModePage_07_MMC
|
||||||
{
|
{
|
||||||
@@ -3917,6 +3942,7 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
/// Page code 0x2A
|
/// Page code 0x2A
|
||||||
/// 16 bytes in OB-U0077C
|
/// 16 bytes in OB-U0077C
|
||||||
/// 20 bytes in SFF-8020i
|
/// 20 bytes in SFF-8020i
|
||||||
|
/// 22 bytes in MMC-1
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public struct ModePage_2A
|
public struct ModePage_2A
|
||||||
{
|
{
|
||||||
@@ -4027,6 +4053,10 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
public bool LSBF;
|
public bool LSBF;
|
||||||
public bool RCK;
|
public bool RCK;
|
||||||
public bool BCK;
|
public bool BCK;
|
||||||
|
|
||||||
|
public bool TestWrite;
|
||||||
|
public ushort MaxWriteSpeed;
|
||||||
|
public ushort CurrentWriteSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ModePage_2A? DecodeModePage_2A(byte[] pageResponse)
|
public static ModePage_2A? DecodeModePage_2A(byte[] pageResponse)
|
||||||
@@ -4099,6 +4129,13 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
decoded.RCK |= (pageResponse[17] & 0x04) == 0x04;
|
decoded.RCK |= (pageResponse[17] & 0x04) == 0x04;
|
||||||
decoded.BCK |= (pageResponse[17] & 0x02) == 0x02;
|
decoded.BCK |= (pageResponse[17] & 0x02) == 0x02;
|
||||||
|
|
||||||
|
if (pageResponse.Length < 22)
|
||||||
|
return decoded;
|
||||||
|
|
||||||
|
decoded.TestWrite |= (pageResponse[3] & 0x04) == 0x04;
|
||||||
|
decoded.MaxWriteSpeed = (ushort)((pageResponse[18] << 8) + pageResponse[19]);
|
||||||
|
decoded.CurrentWriteSpeed = (ushort)((pageResponse[20] << 8) + pageResponse[21]);
|
||||||
|
|
||||||
return decoded;
|
return decoded;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4196,9 +4233,9 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
if(page.BufferSize > 0)
|
if(page.BufferSize > 0)
|
||||||
sb.AppendFormat("\tDrive has {0} Kbyte of buffer", page.BufferSize).AppendLine();
|
sb.AppendFormat("\tDrive has {0} Kbyte of buffer", page.BufferSize).AppendLine();
|
||||||
if (page.MaximumSpeed > 0)
|
if (page.MaximumSpeed > 0)
|
||||||
sb.AppendFormat("\tDrive's maximum speed is {0} Kbyte/sec.", page.MaximumSpeed).AppendLine();
|
sb.AppendFormat("\tDrive's maximum reading speed is {0} Kbyte/sec.", page.MaximumSpeed).AppendLine();
|
||||||
if (page.CurrentSpeed > 0)
|
if (page.CurrentSpeed > 0)
|
||||||
sb.AppendFormat("\tDrive's current speed is {0} Kbyte/sec.", page.CurrentSpeed).AppendLine();
|
sb.AppendFormat("\tDrive's current reading speed is {0} Kbyte/sec.", page.CurrentSpeed).AppendLine();
|
||||||
|
|
||||||
if (page.ReadCDR)
|
if (page.ReadCDR)
|
||||||
{
|
{
|
||||||
@@ -4229,6 +4266,13 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
if (page.SDP)
|
if (page.SDP)
|
||||||
sb.AppendLine("\tDrive contains a changer that can report the exact contents of the slots");
|
sb.AppendLine("\tDrive contains a changer that can report the exact contents of the slots");
|
||||||
|
|
||||||
|
if (page.MaxWriteSpeed > 0)
|
||||||
|
sb.AppendFormat("\tDrive's maximum writing speed is {0} Kbyte/sec.", page.MaxWriteSpeed).AppendLine();
|
||||||
|
if (page.CurrentWriteSpeed > 0)
|
||||||
|
sb.AppendFormat("\tDrive's current writing speed is {0} Kbyte/sec.", page.CurrentWriteSpeed).AppendLine();
|
||||||
|
if (page.TestWrite)
|
||||||
|
sb.AppendLine("\tDrive supports test writing");
|
||||||
|
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
#endregion Mode Page 0x2A: CD-ROM capabilities page
|
#endregion Mode Page 0x2A: CD-ROM capabilities page
|
||||||
@@ -5015,7 +5059,7 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Data compression page
|
/// Data compression page
|
||||||
/// Page code 0x0F
|
/// Page code 0x0F
|
||||||
/// 16 bytes in SSC-1, SSC-2
|
/// 16 bytes in SSC-1, SSC-2, SSC-3
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public struct ModePage_0F
|
public struct ModePage_0F
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user