mirror of
https://github.com/aaru-dps/Aaru.Decoders.git
synced 2025-12-16 19:24:32 +00:00
Code restyling.
This commit is contained in:
252
ATA/Identify.cs
252
ATA/Identify.cs
@@ -70,7 +70,8 @@ namespace Aaru.Decoders.ATA
|
||||
|
||||
CommonTypes.Structs.Devices.ATA.Identify.IdentifyDevice ATAID = IdentifyDeviceResponse.Value;
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.NonMagnetic))
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.GeneralConfigurationBit.NonMagnetic))
|
||||
if((ushort)ATAID.GeneralConfiguration != 0x848A)
|
||||
atapi = true;
|
||||
else
|
||||
@@ -120,8 +121,10 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
// Obsolete in ATA-2, if present, device supports ATA-1
|
||||
ata1 |=
|
||||
ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.FastIDE) ||
|
||||
ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.SlowIDE) ||
|
||||
ATAID.GeneralConfiguration.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.GeneralConfigurationBit.FastIDE) ||
|
||||
ATAID.GeneralConfiguration.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.GeneralConfigurationBit.SlowIDE) ||
|
||||
ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
UltraFastIDE);
|
||||
|
||||
@@ -656,64 +659,80 @@ namespace Aaru.Decoders.ATA
|
||||
else if(!cfa)
|
||||
{
|
||||
if(minatalevel >= 5)
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
IncompleteResponse))
|
||||
sb.AppendLine("Incomplete identify response");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.NonMagnetic))
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.GeneralConfigurationBit.NonMagnetic))
|
||||
sb.AppendLine("Device uses non-magnetic media");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.Removable))
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.GeneralConfigurationBit.Removable))
|
||||
sb.AppendLine("Device is removable");
|
||||
|
||||
if(minatalevel <= 5)
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.Fixed))
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.GeneralConfigurationBit.Fixed))
|
||||
sb.AppendLine("Device is fixed");
|
||||
|
||||
if(ata1)
|
||||
{
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.SlowIDE))
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.GeneralConfigurationBit.SlowIDE))
|
||||
sb.AppendLine("Device transfer rate is <= 5 Mb/s");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.FastIDE))
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.GeneralConfigurationBit.FastIDE))
|
||||
sb.AppendLine("Device transfer rate is > 5 Mb/s but <= 10 Mb/s");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
UltraFastIDE))
|
||||
sb.AppendLine("Device transfer rate is > 10 Mb/s");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
SoftSector))
|
||||
sb.AppendLine("Device is soft sectored");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
HardSector))
|
||||
sb.AppendLine("Device is hard sectored");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.NotMFM))
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.GeneralConfigurationBit.NotMFM))
|
||||
sb.AppendLine("Device is not MFM encoded");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
FormatGapReq))
|
||||
sb.AppendLine("Format speed tolerance gap is required");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
TrackOffset))
|
||||
sb.AppendLine("Track offset option is available");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
DataStrobeOffset))
|
||||
sb.AppendLine("Data strobe offset option is available");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
RotationalSpeedTolerance))
|
||||
sb.AppendLine("Rotational speed tolerance is higher than 0,5%");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
SpindleControl))
|
||||
sb.AppendLine("Spindle motor control is implemented");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
HighHeadSwitch))
|
||||
sb.AppendLine("Head switch time is bigger than 15 µs.");
|
||||
}
|
||||
@@ -971,7 +990,8 @@ namespace Aaru.Decoders.ATA
|
||||
|
||||
if(ATAID.Capabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit2.MustBeSet) &&
|
||||
!ATAID.Capabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit2.MustBeClear))
|
||||
if(ATAID.Capabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit2.SpecificStandbyTimer))
|
||||
if(ATAID.Capabilities2.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CapabilitiesBit2.SpecificStandbyTimer))
|
||||
sb.AppendLine().Append("Device indicates a specific minimum standby timer value");
|
||||
|
||||
if(ATAID.Capabilities3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit3.MultipleValid))
|
||||
@@ -984,13 +1004,15 @@ namespace Aaru.Decoders.ATA
|
||||
ATAID.MultipleMaxSectors);
|
||||
}
|
||||
|
||||
if(ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.PhysicalAlignment1) ||
|
||||
if(ATAID.Capabilities.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CapabilitiesBit.PhysicalAlignment1) ||
|
||||
ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.PhysicalAlignment0))
|
||||
sb.AppendLine().AppendFormat("Long Physical Alignment setting is {0}",
|
||||
(ushort)ATAID.Capabilities & 0x03);
|
||||
|
||||
if(ata1)
|
||||
if(ATAID.TrustedComputing.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TrustedComputingBit.TrustedComputing))
|
||||
if(ATAID.TrustedComputing.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.TrustedComputingBit.TrustedComputing))
|
||||
sb.AppendLine().Append("Device supports doubleword I/O");
|
||||
|
||||
if(atapi)
|
||||
@@ -1005,7 +1027,8 @@ namespace Aaru.Decoders.ATA
|
||||
)
|
||||
sb.AppendLine().Append("ATAPI device supports overlapped operations");
|
||||
|
||||
if(ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.RequiresATASoftReset))
|
||||
if(ATAID.Capabilities.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CapabilitiesBit.RequiresATASoftReset))
|
||||
sb.AppendLine().Append("ATAPI device requires ATA software reset");
|
||||
}
|
||||
|
||||
@@ -1278,35 +1301,44 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
if(!ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.Clear))
|
||||
{
|
||||
if(ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.Gen1Speed))
|
||||
if(ATAID.SATACapabilities.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATACapabilitiesBit.Gen1Speed))
|
||||
sb.AppendLine().Append("SATA 1.5Gb/s is supported");
|
||||
|
||||
if(ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.Gen2Speed))
|
||||
if(ATAID.SATACapabilities.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATACapabilitiesBit.Gen2Speed))
|
||||
sb.AppendLine().Append("SATA 3.0Gb/s is supported");
|
||||
|
||||
if(ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.Gen3Speed))
|
||||
if(ATAID.SATACapabilities.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATACapabilitiesBit.Gen3Speed))
|
||||
sb.AppendLine().Append("SATA 6.0Gb/s is supported");
|
||||
|
||||
if(ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.PowerReceipt))
|
||||
if(ATAID.SATACapabilities.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATACapabilitiesBit.PowerReceipt))
|
||||
sb.AppendLine().Append("Receipt of host initiated power management requests is supported");
|
||||
|
||||
if(ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.PHYEventCounter))
|
||||
if(ATAID.SATACapabilities.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATACapabilitiesBit.PHYEventCounter))
|
||||
sb.AppendLine().Append("PHY Event counters are supported");
|
||||
|
||||
if(ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.HostSlumbTrans))
|
||||
if(ATAID.SATACapabilities.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATACapabilitiesBit.HostSlumbTrans))
|
||||
sb.AppendLine().Append("Supports host automatic partial to slumber transitions is supported");
|
||||
|
||||
if(ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.DevSlumbTrans))
|
||||
if(ATAID.SATACapabilities.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATACapabilitiesBit.DevSlumbTrans))
|
||||
sb.AppendLine().Append("Supports device automatic partial to slumber transitions is supported");
|
||||
|
||||
if(ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.NCQ))
|
||||
{
|
||||
sb.AppendLine().Append("NCQ is supported");
|
||||
|
||||
if(ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.NCQPriority))
|
||||
if(ATAID.SATACapabilities.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATACapabilitiesBit.NCQPriority))
|
||||
sb.AppendLine().Append("NCQ priority is supported");
|
||||
|
||||
if(ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.UnloadNCQ))
|
||||
if(ATAID.SATACapabilities.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATACapabilitiesBit.UnloadNCQ))
|
||||
sb.AppendLine().Append("Unload is supported with outstanding NCQ commands");
|
||||
}
|
||||
}
|
||||
@@ -1314,23 +1346,28 @@ namespace Aaru.Decoders.ATA
|
||||
if(!ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit2.Clear)
|
||||
)
|
||||
{
|
||||
if(!ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.Clear) &&
|
||||
if(!ATAID.SATACapabilities.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATACapabilitiesBit.Clear) &&
|
||||
ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.NCQ))
|
||||
{
|
||||
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit2.NCQMgmt))
|
||||
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATACapabilitiesBit2.NCQMgmt))
|
||||
sb.AppendLine().Append("NCQ queue management is supported");
|
||||
|
||||
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit2.NCQStream))
|
||||
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATACapabilitiesBit2.NCQStream))
|
||||
sb.AppendLine().Append("NCQ streaming is supported");
|
||||
}
|
||||
|
||||
if(atapi)
|
||||
{
|
||||
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit2.
|
||||
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATACapabilitiesBit2.
|
||||
HostEnvDetect))
|
||||
sb.AppendLine().Append("ATAPI device supports host environment detection");
|
||||
|
||||
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit2.
|
||||
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATACapabilitiesBit2.
|
||||
DevAttSlimline))
|
||||
sb.AppendLine().Append("ATAPI device supports attention on slimline connected devices");
|
||||
}
|
||||
@@ -1482,7 +1519,8 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
sb.AppendLine().Append("Power management is supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.PowerManagement))
|
||||
if(ATAID.EnabledCommandSet.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit.PowerManagement))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1490,7 +1528,8 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
sb.AppendLine().Append("Removable media feature set is supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.RemovableMedia))
|
||||
if(ATAID.EnabledCommandSet.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit.RemovableMedia))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1520,7 +1559,8 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
sb.AppendLine().Append("FLUSH CACHE is supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.FlushCache))
|
||||
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit2.FlushCache))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1528,7 +1568,8 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
sb.AppendLine().Append("FLUSH CACHE EXT is supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.FlushCacheExt))
|
||||
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit2.FlushCacheExt))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1557,7 +1598,8 @@ namespace Aaru.Decoders.ATA
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.AddressOffsetReservedAreaBoot))
|
||||
if(ATAID.CommandSet2.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit2.AddressOffsetReservedAreaBoot))
|
||||
{
|
||||
sb.AppendLine().Append("Address Offset Reserved Area Boot is supported");
|
||||
|
||||
@@ -1566,18 +1608,21 @@ namespace Aaru.Decoders.ATA
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.SetFeaturesRequired))
|
||||
if(ATAID.CommandSet2.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit2.SetFeaturesRequired))
|
||||
sb.AppendLine().Append("SET FEATURES is required before spin-up");
|
||||
|
||||
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.PowerUpInStandby))
|
||||
{
|
||||
sb.AppendLine().Append("Power-up in standby is supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.PowerUpInStandby))
|
||||
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit2.PowerUpInStandby))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.RemovableNotification))
|
||||
if(ATAID.CommandSet2.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit2.RemovableNotification))
|
||||
{
|
||||
sb.AppendLine().Append("Removable Media Status Notification is supported");
|
||||
|
||||
@@ -1598,7 +1643,8 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
sb.AppendLine().Append("CompactFlash feature set is supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.CompactFlash))
|
||||
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit2.CompactFlash))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1606,7 +1652,8 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
sb.AppendLine().Append("READ DMA QUEUED and WRITE DMA QUEUED are supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.RWQueuedDMA))
|
||||
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit2.RWQueuedDMA))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1614,7 +1661,8 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
sb.AppendLine().Append("DOWNLOAD MICROCODE is supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.DownloadMicrocode))
|
||||
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit2.DownloadMicrocode))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
}
|
||||
@@ -1627,7 +1675,8 @@ namespace Aaru.Decoders.ATA
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
if(ATAID.SCTCommandTransport.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SCTCommandTransportBit.Supported))
|
||||
if(ATAID.SCTCommandTransport.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SCTCommandTransportBit.Supported))
|
||||
sb.AppendLine().Append("S.M.A.R.T. Command Transport is supported");
|
||||
|
||||
if(ATAID.CommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.MustBeSet) &&
|
||||
@@ -1637,7 +1686,8 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
sb.AppendLine().Append("S.M.A.R.T. self-testing is supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.SMARTSelfTest))
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit3.SMARTSelfTest))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1645,7 +1695,8 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
sb.AppendLine().Append("S.M.A.R.T. error logging is supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.SMARTLog))
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit3.SMARTLog))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1653,7 +1704,8 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
sb.AppendLine().Append("IDLE IMMEDIATE with UNLOAD FEATURE is supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.IdleImmediate))
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit3.IdleImmediate))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1670,7 +1722,8 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
sb.AppendLine().Append("WRITE DMA QUEUED FUA EXT is supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.FUAWriteQ))
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit3.FUAWriteQ))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1678,7 +1731,8 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
sb.AppendLine().Append("WRITE DMA FUA EXT and WRITE MULTIPLE FUA EXT are supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.FUAWrite))
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit3.FUAWrite))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1694,7 +1748,8 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
sb.AppendLine().Append("Streaming feature set is supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.Streaming))
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit3.Streaming))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1710,7 +1765,8 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
sb.AppendLine().Append("Media Serial is supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.MediaSerial))
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit3.MediaSerial))
|
||||
sb.Append(" and valid");
|
||||
}
|
||||
}
|
||||
@@ -1738,7 +1794,8 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
sb.AppendLine().Append("Extended Power Conditions are supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.ExtPowerCond))
|
||||
if(ATAID.EnabledCommandSet4.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit4.ExtPowerCond))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1746,7 +1803,8 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
sb.AppendLine().Append("Extended Status Reporting is supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.ExtStatusReport))
|
||||
if(ATAID.EnabledCommandSet4.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit4.ExtStatusReport))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1754,11 +1812,13 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
sb.AppendLine().Append("Free-fall control feature set is supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.FreeFallControl))
|
||||
if(ATAID.EnabledCommandSet4.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit4.FreeFallControl))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
if(ATAID.CommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.SegmentedDownloadMicrocode))
|
||||
if(ATAID.CommandSet4.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit4.SegmentedDownloadMicrocode))
|
||||
{
|
||||
sb.AppendLine().Append("Segmented feature in DOWNLOAD MICROCODE is supported");
|
||||
|
||||
@@ -1771,7 +1831,8 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
sb.AppendLine().Append("READ/WRITE DMA EXT GPL are supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.RWDMAExtGpl))
|
||||
if(ATAID.EnabledCommandSet4.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit4.RWDMAExtGpl))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1779,7 +1840,8 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
sb.AppendLine().Append("WRITE UNCORRECTABLE is supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.WriteUnc))
|
||||
if(ATAID.EnabledCommandSet4.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CommandSetBit4.WriteUnc))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1867,36 +1929,43 @@ namespace Aaru.Decoders.ATA
|
||||
sb.AppendLine().Append("Sanitize feature set is supported");
|
||||
|
||||
sb.AppendLine().
|
||||
Append(ATAID.Capabilities3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit3.SanitizeCommands)
|
||||
Append(ATAID.Capabilities3.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CapabilitiesBit3.SanitizeCommands)
|
||||
? "Sanitize commands are specified by ACS-3 or higher"
|
||||
: "Sanitize commands are specified by ACS-2");
|
||||
|
||||
if(ATAID.Capabilities3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit3.SanitizeAntifreeze))
|
||||
if(ATAID.Capabilities3.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.CapabilitiesBit3.SanitizeAntifreeze))
|
||||
sb.AppendLine().Append("SANITIZE ANTIFREEZE LOCK EXT is supported");
|
||||
}
|
||||
|
||||
if(!ata1 &&
|
||||
maxatalevel >= 8)
|
||||
if(ATAID.TrustedComputing.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TrustedComputingBit.Set) &&
|
||||
!ATAID.TrustedComputing.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TrustedComputingBit.Clear) &&
|
||||
ATAID.TrustedComputing.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TrustedComputingBit.TrustedComputing))
|
||||
!ATAID.TrustedComputing.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.TrustedComputingBit.Clear) &&
|
||||
ATAID.TrustedComputing.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.TrustedComputingBit.TrustedComputing))
|
||||
sb.AppendLine().Append("Trusted Computing feature set is supported");
|
||||
|
||||
if((ATAID.TransportMajorVersion & 0xF000) >> 12 == 0x1 ||
|
||||
(ATAID.TransportMajorVersion & 0xF000) >> 12 == 0xE)
|
||||
{
|
||||
if(!ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.Clear))
|
||||
if(ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.ReadLogDMAExt))
|
||||
if(ATAID.SATACapabilities.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATACapabilitiesBit.ReadLogDMAExt))
|
||||
sb.AppendLine().Append("READ LOG DMA EXT is supported");
|
||||
|
||||
if(!ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit2.Clear)
|
||||
)
|
||||
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit2.FPDMAQ))
|
||||
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATACapabilitiesBit2.FPDMAQ))
|
||||
sb.AppendLine().Append("RECEIVE FPDMA QUEUED and SEND FPDMA QUEUED are supported");
|
||||
|
||||
if(!ATAID.SATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.Clear))
|
||||
{
|
||||
if(ATAID.SATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.NonZeroBufferOffset))
|
||||
if(ATAID.SATAFeatures.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATAFeaturesBit.NonZeroBufferOffset))
|
||||
{
|
||||
sb.AppendLine().Append("Non-zero buffer offsets are supported");
|
||||
|
||||
@@ -1909,11 +1978,13 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
sb.AppendLine().Append("DMA Setup auto-activation is supported");
|
||||
|
||||
if(ATAID.EnabledSATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.DMASetup))
|
||||
if(ATAID.EnabledSATAFeatures.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATAFeaturesBit.DMASetup))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
if(ATAID.SATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.InitPowerMgmt))
|
||||
if(ATAID.SATAFeatures.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATAFeaturesBit.InitPowerMgmt))
|
||||
{
|
||||
sb.AppendLine().Append("Device-initiated power management is supported");
|
||||
|
||||
@@ -1926,7 +1997,8 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
sb.AppendLine().Append("In-order data delivery is supported");
|
||||
|
||||
if(ATAID.EnabledSATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.InOrderData))
|
||||
if(ATAID.EnabledSATAFeatures.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATAFeaturesBit.InOrderData))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1936,22 +2008,26 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
sb.AppendLine().Append("Hardware Feature Control is supported");
|
||||
|
||||
if(ATAID.EnabledSATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.
|
||||
if(ATAID.EnabledSATAFeatures.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATAFeaturesBit.
|
||||
HardwareFeatureControl))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
if(atapi)
|
||||
if(ATAID.SATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.AsyncNotification))
|
||||
if(ATAID.SATAFeatures.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATAFeaturesBit.AsyncNotification))
|
||||
{
|
||||
sb.AppendLine().Append("Asynchronous notification is supported");
|
||||
|
||||
if(ATAID.EnabledSATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.
|
||||
if(ATAID.EnabledSATAFeatures.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATAFeaturesBit.
|
||||
AsyncNotification))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
if(ATAID.SATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.SettingsPreserve))
|
||||
if(ATAID.SATAFeatures.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATAFeaturesBit.SettingsPreserve))
|
||||
{
|
||||
sb.AppendLine().Append("Software Settings Preservation is supported");
|
||||
|
||||
@@ -1964,7 +2040,8 @@ namespace Aaru.Decoders.ATA
|
||||
)
|
||||
sb.AppendLine().Append("NCQ Autosense is supported");
|
||||
|
||||
if(ATAID.EnabledSATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.EnabledSlumber))
|
||||
if(ATAID.EnabledSATAFeatures.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SATAFeaturesBit.EnabledSlumber))
|
||||
sb.AppendLine().Append("Automatic Partial to Slumber transitions are enabled");
|
||||
}
|
||||
}
|
||||
@@ -1993,16 +2070,20 @@ namespace Aaru.Decoders.ATA
|
||||
{
|
||||
sb.AppendLine("Security is enabled");
|
||||
|
||||
sb.AppendLine(ATAID.SecurityStatus.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SecurityStatusBit.Locked)
|
||||
sb.AppendLine(ATAID.SecurityStatus.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SecurityStatusBit.Locked)
|
||||
? "Security is locked" : "Security is not locked");
|
||||
|
||||
sb.AppendLine(ATAID.SecurityStatus.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SecurityStatusBit.Frozen)
|
||||
sb.AppendLine(ATAID.SecurityStatus.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SecurityStatusBit.Frozen)
|
||||
? "Security is frozen" : "Security is not frozen");
|
||||
|
||||
sb.AppendLine(ATAID.SecurityStatus.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SecurityStatusBit.Expired)
|
||||
sb.AppendLine(ATAID.SecurityStatus.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SecurityStatusBit.Expired)
|
||||
? "Security count has expired" : "Security count has notexpired");
|
||||
|
||||
sb.AppendLine(ATAID.SecurityStatus.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SecurityStatusBit.Maximum)
|
||||
sb.AppendLine(ATAID.SecurityStatus.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SecurityStatusBit.Maximum)
|
||||
? "Security level is maximum" : "Security level is high");
|
||||
}
|
||||
else
|
||||
@@ -2032,7 +2113,8 @@ namespace Aaru.Decoders.ATA
|
||||
sb.AppendFormat("Streaming performance granularity is {0}", ATAID.StreamPerformanceGranularity);
|
||||
}
|
||||
|
||||
if(ATAID.SCTCommandTransport.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SCTCommandTransportBit.Supported))
|
||||
if(ATAID.SCTCommandTransport.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SCTCommandTransportBit.Supported))
|
||||
{
|
||||
sb.AppendLine().AppendLine("S.M.A.R.T. Command Transport (SCT):");
|
||||
|
||||
@@ -2040,7 +2122,8 @@ namespace Aaru.Decoders.ATA
|
||||
LongSectorAccess))
|
||||
sb.AppendLine("SCT Long Sector Address is supported");
|
||||
|
||||
if(ATAID.SCTCommandTransport.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SCTCommandTransportBit.WriteSame))
|
||||
if(ATAID.SCTCommandTransport.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SCTCommandTransportBit.WriteSame))
|
||||
sb.AppendLine("SCT Write Same is supported");
|
||||
|
||||
if(ATAID.SCTCommandTransport.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SCTCommandTransportBit.
|
||||
@@ -2051,7 +2134,8 @@ namespace Aaru.Decoders.ATA
|
||||
FeaturesControl))
|
||||
sb.AppendLine("SCT Features Control is supported");
|
||||
|
||||
if(ATAID.SCTCommandTransport.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SCTCommandTransportBit.DataTables))
|
||||
if(ATAID.SCTCommandTransport.HasFlag(CommonTypes.
|
||||
Structs.Devices.ATA.Identify.SCTCommandTransportBit.DataTables))
|
||||
sb.AppendLine("SCT Data Tables are supported");
|
||||
}
|
||||
|
||||
|
||||
@@ -50,23 +50,28 @@ namespace Aaru.Decoders.Bluray
|
||||
public enum BluSize : byte
|
||||
{
|
||||
/// <summary>120mm</summary>
|
||||
OneTwenty = 0, /// <summary>80mm</summary>
|
||||
OneTwenty = 0,
|
||||
/// <summary>80mm</summary>
|
||||
Eighty = 1
|
||||
}
|
||||
|
||||
public enum ChannelLength : byte
|
||||
{
|
||||
/// <summary>74.5nm channel or 25Gb/layer</summary>
|
||||
Seventy = 1, /// <summary>69.0nm channel or 27Gb/layer</summary>
|
||||
Seventy = 1,
|
||||
/// <summary>69.0nm channel or 27Gb/layer</summary>
|
||||
Sixty = 2
|
||||
}
|
||||
|
||||
public enum HybridLayer : byte
|
||||
{
|
||||
/// <summary>No hybrid layer</summary>
|
||||
None = 0, /// <summary>-ROM layer</summary>
|
||||
ReadOnly = 1, /// <summary>-R layer</summary>
|
||||
Recordable = 2, /// <summary>-RW layer</summary>
|
||||
None = 0,
|
||||
/// <summary>-ROM layer</summary>
|
||||
ReadOnly = 1,
|
||||
/// <summary>-R layer</summary>
|
||||
Recordable = 2,
|
||||
/// <summary>-RW layer</summary>
|
||||
Rewritable = 3
|
||||
}
|
||||
|
||||
|
||||
@@ -49,21 +49,36 @@ namespace Aaru.Decoders.CD
|
||||
public enum PackTypeIndicator : byte
|
||||
{
|
||||
/// <summary>Title of the track (or album if track == 0)</summary>
|
||||
Title = 0x80, /// <summary>Performer</summary>
|
||||
Performer = 0x81, /// <summary>Songwriter</summary>
|
||||
Songwriter = 0x82, /// <summary>Composer</summary>
|
||||
Composer = 0x83, /// <summary>Arranger</summary>
|
||||
Arranger = 0x84, /// <summary>Message from the content provider or artist</summary>
|
||||
Message = 0x85, /// <summary>Disc identification information</summary>
|
||||
DiscIdentification = 0x86, /// <summary>Genre identification</summary>
|
||||
GenreIdentification = 0x87, /// <summary>Table of content information</summary>
|
||||
TOCInformation = 0x88, /// <summary>Second table of content information</summary>
|
||||
SecondTOCInformation = 0x89, /// <summary>Reserved</summary>
|
||||
Reserved1 = 0x8A, /// <summary>Reserved</summary>
|
||||
Reserved2 = 0x8B, /// <summary>Reserved</summary>
|
||||
Reserved3 = 0x8C, /// <summary>Reserved for content provider only</summary>
|
||||
ReservedForContentProvider = 0x8D, /// <summary>UPC of album or ISRC of track</summary>
|
||||
UPCorISRC = 0x8E, /// <summary>Size information of the block</summary>
|
||||
Title = 0x80,
|
||||
/// <summary>Performer</summary>
|
||||
Performer = 0x81,
|
||||
/// <summary>Songwriter</summary>
|
||||
Songwriter = 0x82,
|
||||
/// <summary>Composer</summary>
|
||||
Composer = 0x83,
|
||||
/// <summary>Arranger</summary>
|
||||
Arranger = 0x84,
|
||||
/// <summary>Message from the content provider or artist</summary>
|
||||
Message = 0x85,
|
||||
/// <summary>Disc identification information</summary>
|
||||
DiscIdentification = 0x86,
|
||||
/// <summary>Genre identification</summary>
|
||||
GenreIdentification = 0x87,
|
||||
/// <summary>Table of content information</summary>
|
||||
TOCInformation = 0x88,
|
||||
/// <summary>Second table of content information</summary>
|
||||
SecondTOCInformation = 0x89,
|
||||
/// <summary>Reserved</summary>
|
||||
Reserved1 = 0x8A,
|
||||
/// <summary>Reserved</summary>
|
||||
Reserved2 = 0x8B,
|
||||
/// <summary>Reserved</summary>
|
||||
Reserved3 = 0x8C,
|
||||
/// <summary>Reserved for content provider only</summary>
|
||||
ReservedForContentProvider = 0x8D,
|
||||
/// <summary>UPC of album or ISRC of track</summary>
|
||||
UPCorISRC = 0x8E,
|
||||
/// <summary>Size information of the block</summary>
|
||||
BlockSizeInformation = 0x8F
|
||||
}
|
||||
|
||||
@@ -94,15 +109,15 @@ namespace Aaru.Decoders.CD
|
||||
|
||||
for(int i = 0; i < (decoded.DataLength - 2) / 18; i++)
|
||||
{
|
||||
decoded.DataPacks[i].HeaderID1 = CDTextResponse[0 + i * 18 + 4];
|
||||
decoded.DataPacks[i].HeaderID2 = CDTextResponse[1 + i * 18 + 4];
|
||||
decoded.DataPacks[i].HeaderID3 = CDTextResponse[2 + i * 18 + 4];
|
||||
decoded.DataPacks[i].DBCC = Convert.ToBoolean(CDTextResponse[3 + i * 18 + 4] & 0x80);
|
||||
decoded.DataPacks[i].BlockNumber = (byte)((CDTextResponse[3 + i * 18 + 4] & 0x70) >> 4);
|
||||
decoded.DataPacks[i].CharacterPosition = (byte)(CDTextResponse[3 + i * 18 + 4] & 0x0F);
|
||||
decoded.DataPacks[i].HeaderID1 = CDTextResponse[0 + (i * 18) + 4];
|
||||
decoded.DataPacks[i].HeaderID2 = CDTextResponse[1 + (i * 18) + 4];
|
||||
decoded.DataPacks[i].HeaderID3 = CDTextResponse[2 + (i * 18) + 4];
|
||||
decoded.DataPacks[i].DBCC = Convert.ToBoolean(CDTextResponse[3 + (i * 18) + 4] & 0x80);
|
||||
decoded.DataPacks[i].BlockNumber = (byte)((CDTextResponse[3 + (i * 18) + 4] & 0x70) >> 4);
|
||||
decoded.DataPacks[i].CharacterPosition = (byte)(CDTextResponse[3 + (i * 18) + 4] & 0x0F);
|
||||
decoded.DataPacks[i].TextDataField = new byte[12];
|
||||
Array.Copy(CDTextResponse, 4 + i * 18 + 4, decoded.DataPacks[i].TextDataField, 0, 12);
|
||||
decoded.DataPacks[i].CRC = BigEndianBitConverter.ToUInt16(CDTextResponse, 16 + i * 18 + 4);
|
||||
Array.Copy(CDTextResponse, 4 + (i * 18) + 4, decoded.DataPacks[i].TextDataField, 0, 12);
|
||||
decoded.DataPacks[i].CRC = BigEndianBitConverter.ToUInt16(CDTextResponse, 16 + (i * 18) + 4);
|
||||
}
|
||||
|
||||
return decoded;
|
||||
|
||||
36
CD/Enums.cs
36
CD/Enums.cs
@@ -38,24 +38,36 @@ namespace Aaru.Decoders.CD
|
||||
public enum TocAdr : byte
|
||||
{
|
||||
/// <summary>Q Sub-channel mode information not supplied</summary>
|
||||
NoInformation = 0x00, /// <summary>Q Sub-channel encodes current position data</summary>
|
||||
CurrentPosition = 0x01, /// <summary>Q Sub-channel encodes the media catalog number</summary>
|
||||
MediaCatalogNumber = 0x02, /// <summary>Q Sub-channel encodes the ISRC</summary>
|
||||
ISRC = 0x03, /// <summary>Q Sub-channel encodes the start of an audio/data track (if found in TOC)</summary>
|
||||
TrackPointer = 0x01, /// <summary>Q Sub-channel encodes the start of a video track (if found in TOC) for CD-V</summary>
|
||||
NoInformation = 0x00,
|
||||
/// <summary>Q Sub-channel encodes current position data</summary>
|
||||
CurrentPosition = 0x01,
|
||||
/// <summary>Q Sub-channel encodes the media catalog number</summary>
|
||||
MediaCatalogNumber = 0x02,
|
||||
/// <summary>Q Sub-channel encodes the ISRC</summary>
|
||||
ISRC = 0x03,
|
||||
/// <summary>Q Sub-channel encodes the start of an audio/data track (if found in TOC)</summary>
|
||||
TrackPointer = 0x01,
|
||||
/// <summary>Q Sub-channel encodes the start of a video track (if found in TOC) for CD-V</summary>
|
||||
VideoTrackPointer = 0x04
|
||||
}
|
||||
|
||||
public enum TocControl : byte
|
||||
{
|
||||
/// <summary>Stereo audio, no pre-emphasis</summary>
|
||||
TwoChanNoPreEmph = 0x00, /// <summary>Stereo audio with pre-emphasis</summary>
|
||||
TwoChanPreEmph = 0x01, /// <summary>If mask applied, track can be copied</summary>
|
||||
CopyPermissionMask = 0x02, /// <summary>Data track, recorded uninterrumpted</summary>
|
||||
DataTrack = 0x04, /// <summary>Data track, recorded incrementally</summary>
|
||||
DataTrackIncremental = 0x05, /// <summary>Quadraphonic audio, no pre-emphasis</summary>
|
||||
FourChanNoPreEmph = 0x08, /// <summary>Quadraphonic audio with pre-emphasis</summary>
|
||||
FourChanPreEmph = 0x09, /// <summary>Reserved mask</summary>
|
||||
TwoChanNoPreEmph = 0x00,
|
||||
/// <summary>Stereo audio with pre-emphasis</summary>
|
||||
TwoChanPreEmph = 0x01,
|
||||
/// <summary>If mask applied, track can be copied</summary>
|
||||
CopyPermissionMask = 0x02,
|
||||
/// <summary>Data track, recorded uninterrumpted</summary>
|
||||
DataTrack = 0x04,
|
||||
/// <summary>Data track, recorded incrementally</summary>
|
||||
DataTrackIncremental = 0x05,
|
||||
/// <summary>Quadraphonic audio, no pre-emphasis</summary>
|
||||
FourChanNoPreEmph = 0x08,
|
||||
/// <summary>Quadraphonic audio with pre-emphasis</summary>
|
||||
FourChanPreEmph = 0x09,
|
||||
/// <summary>Reserved mask</summary>
|
||||
ReservedMask = 0x0C
|
||||
}
|
||||
}
|
||||
@@ -77,20 +77,20 @@ namespace Aaru.Decoders.CD
|
||||
|
||||
for(int i = 0; i < (decoded.DataLength - 2) / 11; i++)
|
||||
{
|
||||
decoded.TrackDescriptors[i].SessionNumber = CDFullTOCResponse[0 + i * 11 + 4];
|
||||
decoded.TrackDescriptors[i].ADR = (byte)((CDFullTOCResponse[1 + i * 11 + 4] & 0xF0) >> 4);
|
||||
decoded.TrackDescriptors[i].CONTROL = (byte)(CDFullTOCResponse[1 + i * 11 + 4] & 0x0F);
|
||||
decoded.TrackDescriptors[i].TNO = CDFullTOCResponse[2 + i * 11 + 4];
|
||||
decoded.TrackDescriptors[i].POINT = CDFullTOCResponse[3 + i * 11 + 4];
|
||||
decoded.TrackDescriptors[i].Min = CDFullTOCResponse[4 + i * 11 + 4];
|
||||
decoded.TrackDescriptors[i].Sec = CDFullTOCResponse[5 + i * 11 + 4];
|
||||
decoded.TrackDescriptors[i].Frame = CDFullTOCResponse[6 + i * 11 + 4];
|
||||
decoded.TrackDescriptors[i].Zero = CDFullTOCResponse[7 + i * 11 + 4];
|
||||
decoded.TrackDescriptors[i].HOUR = (byte)((CDFullTOCResponse[7 + i * 11 + 4] & 0xF0) >> 4);
|
||||
decoded.TrackDescriptors[i].PHOUR = (byte)(CDFullTOCResponse[7 + i * 11 + 4] & 0x0F);
|
||||
decoded.TrackDescriptors[i].PMIN = CDFullTOCResponse[8 + i * 11 + 4];
|
||||
decoded.TrackDescriptors[i].PSEC = CDFullTOCResponse[9 + i * 11 + 4];
|
||||
decoded.TrackDescriptors[i].PFRAME = CDFullTOCResponse[10 + i * 11 + 4];
|
||||
decoded.TrackDescriptors[i].SessionNumber = CDFullTOCResponse[0 + (i * 11) + 4];
|
||||
decoded.TrackDescriptors[i].ADR = (byte)((CDFullTOCResponse[1 + (i * 11) + 4] & 0xF0) >> 4);
|
||||
decoded.TrackDescriptors[i].CONTROL = (byte)(CDFullTOCResponse[1 + (i * 11) + 4] & 0x0F);
|
||||
decoded.TrackDescriptors[i].TNO = CDFullTOCResponse[2 + (i * 11) + 4];
|
||||
decoded.TrackDescriptors[i].POINT = CDFullTOCResponse[3 + (i * 11) + 4];
|
||||
decoded.TrackDescriptors[i].Min = CDFullTOCResponse[4 + (i * 11) + 4];
|
||||
decoded.TrackDescriptors[i].Sec = CDFullTOCResponse[5 + (i * 11) + 4];
|
||||
decoded.TrackDescriptors[i].Frame = CDFullTOCResponse[6 + (i * 11) + 4];
|
||||
decoded.TrackDescriptors[i].Zero = CDFullTOCResponse[7 + (i * 11) + 4];
|
||||
decoded.TrackDescriptors[i].HOUR = (byte)((CDFullTOCResponse[7 + (i * 11) + 4] & 0xF0) >> 4);
|
||||
decoded.TrackDescriptors[i].PHOUR = (byte)(CDFullTOCResponse[7 + (i * 11) + 4] & 0x0F);
|
||||
decoded.TrackDescriptors[i].PMIN = CDFullTOCResponse[8 + (i * 11) + 4];
|
||||
decoded.TrackDescriptors[i].PSEC = CDFullTOCResponse[9 + (i * 11) + 4];
|
||||
decoded.TrackDescriptors[i].PFRAME = CDFullTOCResponse[10 + (i * 11) + 4];
|
||||
}
|
||||
|
||||
return decoded;
|
||||
@@ -112,7 +112,7 @@ namespace Aaru.Decoders.CD
|
||||
|
||||
foreach(TrackDataDescriptor descriptor in response.TrackDescriptors)
|
||||
if((descriptor.CONTROL & 0x08) == 0x08 ||
|
||||
descriptor.ADR != 1 && descriptor.ADR != 5 && descriptor.ADR != 4 && descriptor.ADR != 6 ||
|
||||
(descriptor.ADR != 1 && descriptor.ADR != 5 && descriptor.ADR != 4 && descriptor.ADR != 6) ||
|
||||
descriptor.TNO != 0)
|
||||
{
|
||||
sb.AppendLine("Unknown TOC entry format, printing values as-is");
|
||||
|
||||
26
CD/PMA.cs
26
CD/PMA.cs
@@ -69,19 +69,19 @@ namespace Aaru.Decoders.CD
|
||||
|
||||
for(int i = 0; i < (decoded.DataLength - 2) / 11; i++)
|
||||
{
|
||||
decoded.PMADescriptors[i].Reserved = CDPMAResponse[0 + i * 11 + 4];
|
||||
decoded.PMADescriptors[i].ADR = (byte)((CDPMAResponse[1 + i * 11 + 4] & 0xF0) >> 4);
|
||||
decoded.PMADescriptors[i].CONTROL = (byte)(CDPMAResponse[1 + i * 11 + 4] & 0x0F);
|
||||
decoded.PMADescriptors[i].TNO = CDPMAResponse[2 + i * 11 + 4];
|
||||
decoded.PMADescriptors[i].POINT = CDPMAResponse[3 + i * 11 + 4];
|
||||
decoded.PMADescriptors[i].Min = CDPMAResponse[4 + i * 11 + 4];
|
||||
decoded.PMADescriptors[i].Sec = CDPMAResponse[5 + i * 11 + 4];
|
||||
decoded.PMADescriptors[i].Frame = CDPMAResponse[6 + i * 11 + 4];
|
||||
decoded.PMADescriptors[i].HOUR = (byte)((CDPMAResponse[7 + i * 11 + 4] & 0xF0) >> 4);
|
||||
decoded.PMADescriptors[i].PHOUR = (byte)(CDPMAResponse[7 + i * 11 + 4] & 0x0F);
|
||||
decoded.PMADescriptors[i].PMIN = CDPMAResponse[8 + i * 11 + 4];
|
||||
decoded.PMADescriptors[i].PSEC = CDPMAResponse[9 + i * 11 + 4];
|
||||
decoded.PMADescriptors[i].PFRAME = CDPMAResponse[10 + i * 11 + 4];
|
||||
decoded.PMADescriptors[i].Reserved = CDPMAResponse[0 + (i * 11) + 4];
|
||||
decoded.PMADescriptors[i].ADR = (byte)((CDPMAResponse[1 + (i * 11) + 4] & 0xF0) >> 4);
|
||||
decoded.PMADescriptors[i].CONTROL = (byte)(CDPMAResponse[1 + (i * 11) + 4] & 0x0F);
|
||||
decoded.PMADescriptors[i].TNO = CDPMAResponse[2 + (i * 11) + 4];
|
||||
decoded.PMADescriptors[i].POINT = CDPMAResponse[3 + (i * 11) + 4];
|
||||
decoded.PMADescriptors[i].Min = CDPMAResponse[4 + (i * 11) + 4];
|
||||
decoded.PMADescriptors[i].Sec = CDPMAResponse[5 + (i * 11) + 4];
|
||||
decoded.PMADescriptors[i].Frame = CDPMAResponse[6 + (i * 11) + 4];
|
||||
decoded.PMADescriptors[i].HOUR = (byte)((CDPMAResponse[7 + (i * 11) + 4] & 0xF0) >> 4);
|
||||
decoded.PMADescriptors[i].PHOUR = (byte)(CDPMAResponse[7 + (i * 11) + 4] & 0x0F);
|
||||
decoded.PMADescriptors[i].PMIN = CDPMAResponse[8 + (i * 11) + 4];
|
||||
decoded.PMADescriptors[i].PSEC = CDPMAResponse[9 + (i * 11) + 4];
|
||||
decoded.PMADescriptors[i].PFRAME = CDPMAResponse[10 + (i * 11) + 4];
|
||||
}
|
||||
|
||||
return decoded;
|
||||
|
||||
@@ -69,14 +69,14 @@ namespace Aaru.Decoders.CD
|
||||
|
||||
for(int i = 0; i < (decoded.DataLength - 2) / 8; i++)
|
||||
{
|
||||
decoded.TrackDescriptors[i].Reserved1 = CDSessionInfoResponse[0 + i * 8 + 4];
|
||||
decoded.TrackDescriptors[i].ADR = (byte)((CDSessionInfoResponse[1 + i * 8 + 4] & 0xF0) >> 4);
|
||||
decoded.TrackDescriptors[i].CONTROL = (byte)(CDSessionInfoResponse[1 + i * 8 + 4] & 0x0F);
|
||||
decoded.TrackDescriptors[i].TrackNumber = CDSessionInfoResponse[2 + i * 8 + 4];
|
||||
decoded.TrackDescriptors[i].Reserved2 = CDSessionInfoResponse[3 + i * 8 + 4];
|
||||
decoded.TrackDescriptors[i].Reserved1 = CDSessionInfoResponse[0 + (i * 8) + 4];
|
||||
decoded.TrackDescriptors[i].ADR = (byte)((CDSessionInfoResponse[1 + (i * 8) + 4] & 0xF0) >> 4);
|
||||
decoded.TrackDescriptors[i].CONTROL = (byte)(CDSessionInfoResponse[1 + (i * 8) + 4] & 0x0F);
|
||||
decoded.TrackDescriptors[i].TrackNumber = CDSessionInfoResponse[2 + (i * 8) + 4];
|
||||
decoded.TrackDescriptors[i].Reserved2 = CDSessionInfoResponse[3 + (i * 8) + 4];
|
||||
|
||||
decoded.TrackDescriptors[i].TrackStartAddress =
|
||||
BigEndianBitConverter.ToUInt32(CDSessionInfoResponse, 4 + i * 8 + 4);
|
||||
BigEndianBitConverter.ToUInt32(CDSessionInfoResponse, 4 + (i * 8) + 4);
|
||||
}
|
||||
|
||||
return decoded;
|
||||
|
||||
12
CD/TOC.cs
12
CD/TOC.cs
@@ -70,14 +70,14 @@ namespace Aaru.Decoders.CD
|
||||
|
||||
for(int i = 0; i < (decoded.DataLength - 2) / 8; i++)
|
||||
{
|
||||
decoded.TrackDescriptors[i].Reserved1 = CDTOCResponse[0 + i * 8 + 4];
|
||||
decoded.TrackDescriptors[i].ADR = (byte)((CDTOCResponse[1 + i * 8 + 4] & 0xF0) >> 4);
|
||||
decoded.TrackDescriptors[i].CONTROL = (byte)(CDTOCResponse[1 + i * 8 + 4] & 0x0F);
|
||||
decoded.TrackDescriptors[i].TrackNumber = CDTOCResponse[2 + i * 8 + 4];
|
||||
decoded.TrackDescriptors[i].Reserved2 = CDTOCResponse[3 + i * 8 + 4];
|
||||
decoded.TrackDescriptors[i].Reserved1 = CDTOCResponse[0 + (i * 8) + 4];
|
||||
decoded.TrackDescriptors[i].ADR = (byte)((CDTOCResponse[1 + (i * 8) + 4] & 0xF0) >> 4);
|
||||
decoded.TrackDescriptors[i].CONTROL = (byte)(CDTOCResponse[1 + (i * 8) + 4] & 0x0F);
|
||||
decoded.TrackDescriptors[i].TrackNumber = CDTOCResponse[2 + (i * 8) + 4];
|
||||
decoded.TrackDescriptors[i].Reserved2 = CDTOCResponse[3 + (i * 8) + 4];
|
||||
|
||||
decoded.TrackDescriptors[i].TrackStartAddress =
|
||||
BigEndianBitConverter.ToUInt32(CDTOCResponse, 4 + i * 8 + 4);
|
||||
BigEndianBitConverter.ToUInt32(CDTOCResponse, 4 + (i * 8) + 4);
|
||||
}
|
||||
|
||||
return decoded;
|
||||
|
||||
10
DVD/DDS.cs
10
DVD/DDS.cs
@@ -69,11 +69,9 @@ namespace Aaru.Decoders.DVD
|
||||
dds.UserCertification |= (response[7] & 0x02) == 0x02;
|
||||
dds.ManufacturerCertification |= (response[7] & 0x01) == 0x01;
|
||||
|
||||
dds.UpdateCount =
|
||||
(uint)((response[8] << 24) + (response[9] << 16) + (response[10] << 8) + response[11]);
|
||||
dds.UpdateCount = (uint)((response[8] << 24) + (response[9] << 16) + (response[10] << 8) + response[11]);
|
||||
|
||||
dds.Groups =
|
||||
(ushort)((response[12] << 8) + response[13]);
|
||||
dds.Groups = (ushort)((response[12] << 8) + response[13]);
|
||||
|
||||
// ECMA-272
|
||||
if(dds.Groups == 24)
|
||||
@@ -110,8 +108,8 @@ namespace Aaru.Decoders.DVD
|
||||
dds.StartLSNForZone = new uint[dds.Zones];
|
||||
|
||||
for(int i = 0; i < dds.Zones; i++)
|
||||
dds.StartLSNForZone[i] = (uint)((response[260 + i * 4 + 1] << 16) +
|
||||
(response[260 + i * 4 + 2] << 8) + response[260 + i * 4 + 3]);
|
||||
dds.StartLSNForZone[i] = (uint)((response[260 + (i * 4) + 1] << 16) +
|
||||
(response[260 + (i * 4) + 2] << 8) + response[260 + (i * 4) + 3]);
|
||||
}
|
||||
|
||||
return dds;
|
||||
|
||||
99
DVD/Enums.cs
99
DVD/Enums.cs
@@ -39,19 +39,32 @@ namespace Aaru.Decoders.DVD
|
||||
public enum DiskCategory : byte
|
||||
{
|
||||
/// <summary>DVD-ROM. Version 1 is ECMA-267 and ECMA-268.</summary>
|
||||
DVDROM = 0, /// <summary>DVD-RAM. Version 1 is ECMA-272. Version 6 is ECMA-330.</summary>
|
||||
DVDRAM = 1, /// <summary>DVD-R. Version 1 is ECMA-279. Version 5 is ECMA-359. Version 6 is ECMA-382.</summary>
|
||||
DVDR = 2, /// <summary>DVD-RW. Version 2 is ECMA-338. Version 3 is ECMA-384.</summary>
|
||||
DVDRW = 3, /// <summary>HD DVD-ROM</summary>
|
||||
HDDVDROM = 4, /// <summary>HD DVD-RAM</summary>
|
||||
HDDVDRAM = 5, /// <summary>HD DVD-R</summary>
|
||||
HDDVDR = 6, /// <summary>HD DVD-RW</summary>
|
||||
HDDVDRW = 7, /// <summary>UMD. Version 0 is ECMA-365.</summary>
|
||||
UMD = 8, /// <summary>DVD+RW. Version 1 is ECMA-274. Version 2 is ECMA-337. Version 3 is ECMA-371.</summary>
|
||||
DVDPRW = 9, /// <summary>DVD+R. Version 1 is ECMA-349.</summary>
|
||||
DVDPR = 10, /// <summary>DVD+RW DL. Version 1 is ECMA-374.</summary>
|
||||
DVDPRWDL = 13, /// <summary>DVD+R DL. Version 1 is ECMA-364.</summary>
|
||||
DVDPRDL = 14, /// <summary>According to standards this value is reserved. It's used by Nintendo GODs and WODs.</summary>
|
||||
DVDROM = 0,
|
||||
/// <summary>DVD-RAM. Version 1 is ECMA-272. Version 6 is ECMA-330.</summary>
|
||||
DVDRAM = 1,
|
||||
/// <summary>DVD-R. Version 1 is ECMA-279. Version 5 is ECMA-359. Version 6 is ECMA-382.</summary>
|
||||
DVDR = 2,
|
||||
/// <summary>DVD-RW. Version 2 is ECMA-338. Version 3 is ECMA-384.</summary>
|
||||
DVDRW = 3,
|
||||
/// <summary>HD DVD-ROM</summary>
|
||||
HDDVDROM = 4,
|
||||
/// <summary>HD DVD-RAM</summary>
|
||||
HDDVDRAM = 5,
|
||||
/// <summary>HD DVD-R</summary>
|
||||
HDDVDR = 6,
|
||||
/// <summary>HD DVD-RW</summary>
|
||||
HDDVDRW = 7,
|
||||
/// <summary>UMD. Version 0 is ECMA-365.</summary>
|
||||
UMD = 8,
|
||||
/// <summary>DVD+RW. Version 1 is ECMA-274. Version 2 is ECMA-337. Version 3 is ECMA-371.</summary>
|
||||
DVDPRW = 9,
|
||||
/// <summary>DVD+R. Version 1 is ECMA-349.</summary>
|
||||
DVDPR = 10,
|
||||
/// <summary>DVD+RW DL. Version 1 is ECMA-374.</summary>
|
||||
DVDPRWDL = 13,
|
||||
/// <summary>DVD+R DL. Version 1 is ECMA-364.</summary>
|
||||
DVDPRDL = 14,
|
||||
/// <summary>According to standards this value is reserved. It's used by Nintendo GODs and WODs.</summary>
|
||||
Nintendo = 15
|
||||
}
|
||||
|
||||
@@ -59,10 +72,14 @@ namespace Aaru.Decoders.DVD
|
||||
public enum MaximumRateField : byte
|
||||
{
|
||||
/// <summary>2.52 Mbps</summary>
|
||||
TwoMbps = 0x00, /// <summary>5.04 Mbps</summary>
|
||||
FiveMbps = 0x01, /// <summary>10.08 Mbps</summary>
|
||||
TenMbps = 0x02, /// <summary>20.16 Mbps</summary>
|
||||
TwentyMbps = 0x03, /// <summary>30.24 Mbps</summary>
|
||||
TwoMbps = 0x00,
|
||||
/// <summary>5.04 Mbps</summary>
|
||||
FiveMbps = 0x01,
|
||||
/// <summary>10.08 Mbps</summary>
|
||||
TenMbps = 0x02,
|
||||
/// <summary>20.16 Mbps</summary>
|
||||
TwentyMbps = 0x03,
|
||||
/// <summary>30.24 Mbps</summary>
|
||||
ThirtyMbps = 0x04, Unspecified = 0x0F
|
||||
}
|
||||
|
||||
@@ -77,12 +94,18 @@ namespace Aaru.Decoders.DVD
|
||||
public enum LinearDensityField : byte
|
||||
{
|
||||
/// <summary>0.267 μm/bit</summary>
|
||||
TwoSix = 0x00, /// <summary>0.293 μm/bit</summary>
|
||||
TwoNine = 0x01, /// <summary>0.409 to 0.435 μm/bit</summary>
|
||||
FourZero = 0x02, /// <summary>0.280 to 0.291 μm/bit</summary>
|
||||
TwoEight = 0x04, /// <summary>0.153 μm/bit</summary>
|
||||
OneFive = 0x05, /// <summary>0.130 to 0.140 μm/bit</summary>
|
||||
OneThree = 0x06, /// <summary>0.353 μm/bit</summary>
|
||||
TwoSix = 0x00,
|
||||
/// <summary>0.293 μm/bit</summary>
|
||||
TwoNine = 0x01,
|
||||
/// <summary>0.409 to 0.435 μm/bit</summary>
|
||||
FourZero = 0x02,
|
||||
/// <summary>0.280 to 0.291 μm/bit</summary>
|
||||
TwoEight = 0x04,
|
||||
/// <summary>0.153 μm/bit</summary>
|
||||
OneFive = 0x05,
|
||||
/// <summary>0.130 to 0.140 μm/bit</summary>
|
||||
OneThree = 0x06,
|
||||
/// <summary>0.353 μm/bit</summary>
|
||||
ThreeFive = 0x08
|
||||
}
|
||||
|
||||
@@ -90,10 +113,14 @@ namespace Aaru.Decoders.DVD
|
||||
public enum TrackDensityField : byte
|
||||
{
|
||||
/// <summary>0.74 μm/track</summary>
|
||||
Seven = 0x00, /// <summary>0.80 μm/track</summary>
|
||||
Eight = 0x01, /// <summary>0.615 μm/track</summary>
|
||||
Six = 0x02, /// <summary>0.40 μm/track</summary>
|
||||
Four = 0x03, /// <summary>0.34 μm/track</summary>
|
||||
Seven = 0x00,
|
||||
/// <summary>0.80 μm/track</summary>
|
||||
Eight = 0x01,
|
||||
/// <summary>0.615 μm/track</summary>
|
||||
Six = 0x02,
|
||||
/// <summary>0.40 μm/track</summary>
|
||||
Four = 0x03,
|
||||
/// <summary>0.34 μm/track</summary>
|
||||
Three = 0x04
|
||||
}
|
||||
|
||||
@@ -101,9 +128,12 @@ namespace Aaru.Decoders.DVD
|
||||
public enum CopyrightType : byte
|
||||
{
|
||||
/// <summary>There is no copy protection</summary>
|
||||
NoProtection = 0x00, /// <summary>Copy protection is CSS/CPPM</summary>
|
||||
CSS = 0x01, /// <summary>Copy protection is CPRM</summary>
|
||||
CPRM = 0x02, /// <summary>Copy protection is AACS</summary>
|
||||
NoProtection = 0x00,
|
||||
/// <summary>Copy protection is CSS/CPPM</summary>
|
||||
CSS = 0x01,
|
||||
/// <summary>Copy protection is CPRM</summary>
|
||||
CPRM = 0x02,
|
||||
/// <summary>Copy protection is AACS</summary>
|
||||
AACS = 0x10
|
||||
}
|
||||
|
||||
@@ -111,7 +141,8 @@ namespace Aaru.Decoders.DVD
|
||||
public enum WPDiscTypes : byte
|
||||
{
|
||||
/// <summary>Should not write without a cartridge</summary>
|
||||
DoNotWrite = 0x00, /// <summary>Can write without a cartridge</summary>
|
||||
DoNotWrite = 0x00,
|
||||
/// <summary>Can write without a cartridge</summary>
|
||||
CanWrite = 0x01, Reserved1 = 0x02, Reserved2 = 0x03
|
||||
}
|
||||
|
||||
@@ -119,7 +150,8 @@ namespace Aaru.Decoders.DVD
|
||||
public enum DVDSize
|
||||
{
|
||||
/// <summary>120 mm</summary>
|
||||
OneTwenty = 0, /// <summary>80 mm</summary>
|
||||
OneTwenty = 0,
|
||||
/// <summary>80 mm</summary>
|
||||
Eighty = 1
|
||||
}
|
||||
|
||||
@@ -127,7 +159,8 @@ namespace Aaru.Decoders.DVD
|
||||
public enum DVDRAMDiscType
|
||||
{
|
||||
/// <summary>Shall not be recorded without a case</summary>
|
||||
Cased = 0, /// <summary>May be recorded without a case or within one</summary>
|
||||
Cased = 0,
|
||||
/// <summary>May be recorded without a case or within one</summary>
|
||||
Uncased = 1
|
||||
}
|
||||
|
||||
|
||||
@@ -99,8 +99,7 @@ namespace Aaru.Decoders.DVD
|
||||
pfi.DataAreaEndPSN =
|
||||
(uint)((response[12] << 24) + (response[13] << 16) + (response[14] << 8) + response[15]);
|
||||
|
||||
pfi.Layer0EndPSN =
|
||||
(uint)((response[16] << 24) + (response[17] << 16) + (response[18] << 8) + response[19]);
|
||||
pfi.Layer0EndPSN = (uint)((response[16] << 24) + (response[17] << 16) + (response[18] << 8) + response[19]);
|
||||
|
||||
pfi.BCA |= (response[20] & 0x80) == 0x80;
|
||||
|
||||
|
||||
@@ -168,16 +168,16 @@ namespace Aaru.Decoders.Floppy
|
||||
|
||||
for(int i = 0; i < 51; i++)
|
||||
{
|
||||
byte b1 = buffer[51 * 3 - i];
|
||||
byte b2 = buffer[51 * 2 - i];
|
||||
byte b1 = buffer[(51 * 3) - i];
|
||||
byte b2 = buffer[(51 * 2) - i];
|
||||
byte b3 = buffer[51 - i];
|
||||
byte b4 = (byte)((((b1 & 2) << 1) | (b2 & 2) | ((b3 & 2) >> 1)) & 0xFF);
|
||||
byte b5 = (byte)((((b1 & 1) << 2) | ((b2 & 1) << 1) | (b3 & 1)) & 0xFF);
|
||||
output[250 - 5 * i] = (byte)(((buffer[i + 51 * 3 + 1] << 3) | ((b1 >> 2) & 0x7)) & 0xFF);
|
||||
output[251 - 5 * i] = (byte)(((buffer[i + 51 * 4 + 1] << 3) | ((b2 >> 2) & 0x7)) & 0xFF);
|
||||
output[252 - 5 * i] = (byte)(((buffer[i + 51 * 5 + 1] << 3) | ((b3 >> 2) & 0x7)) & 0xFF);
|
||||
output[253 - 5 * i] = (byte)(((buffer[i + 51 * 6 + 1] << 3) | b4) & 0xFF);
|
||||
output[254 - 5 * i] = (byte)(((buffer[i + 51 * 7 + 1] << 3) | b5) & 0xFF);
|
||||
output[250 - (5 * i)] = (byte)(((buffer[i + (51 * 3) + 1] << 3) | ((b1 >> 2) & 0x7)) & 0xFF);
|
||||
output[251 - (5 * i)] = (byte)(((buffer[i + (51 * 4) + 1] << 3) | ((b2 >> 2) & 0x7)) & 0xFF);
|
||||
output[252 - (5 * i)] = (byte)(((buffer[i + (51 * 5) + 1] << 3) | ((b3 >> 2) & 0x7)) & 0xFF);
|
||||
output[253 - (5 * i)] = (byte)(((buffer[i + (51 * 6) + 1] << 3) | b4) & 0xFF);
|
||||
output[254 - (5 * i)] = (byte)(((buffer[i + (51 * 7) + 1] << 3) | b5) & 0xFF);
|
||||
}
|
||||
|
||||
output[255] = (byte)(((buffer[409] << 3) | (buffer[0] & 0x7)) & 0xFF);
|
||||
@@ -220,8 +220,8 @@ namespace Aaru.Decoders.Floppy
|
||||
}
|
||||
else
|
||||
{
|
||||
output[i] |= (byte)(((buffer[i - 86 * 2] & 0x10) >> 3) & 0xFF);
|
||||
output[i] |= (byte)(((buffer[i - 86 * 2] & 0x20) >> 5) & 0xFF);
|
||||
output[i] |= (byte)(((buffer[i - (86 * 2)] & 0x10) >> 3) & 0xFF);
|
||||
output[i] |= (byte)(((buffer[i - (86 * 2)] & 0x20) >> 5) & 0xFF);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,13 +39,20 @@ namespace Aaru.Decoders.Floppy
|
||||
public enum IBMSectorSizeCode : byte
|
||||
{
|
||||
/// <summary>128 bytes/sector</summary>
|
||||
EighthKilo = 0, /// <summary>256 bytes/sector</summary>
|
||||
QuarterKilo = 1, /// <summary>512 bytes/sector</summary>
|
||||
HalfKilo = 2, /// <summary>1024 bytes/sector</summary>
|
||||
Kilo = 3, /// <summary>2048 bytes/sector</summary>
|
||||
TwiceKilo = 4, /// <summary>4096 bytes/sector</summary>
|
||||
FriceKilo = 5, /// <summary>8192 bytes/sector</summary>
|
||||
TwiceFriceKilo = 6, /// <summary>16384 bytes/sector</summary>
|
||||
EighthKilo = 0,
|
||||
/// <summary>256 bytes/sector</summary>
|
||||
QuarterKilo = 1,
|
||||
/// <summary>512 bytes/sector</summary>
|
||||
HalfKilo = 2,
|
||||
/// <summary>1024 bytes/sector</summary>
|
||||
Kilo = 3,
|
||||
/// <summary>2048 bytes/sector</summary>
|
||||
TwiceKilo = 4,
|
||||
/// <summary>4096 bytes/sector</summary>
|
||||
FriceKilo = 5,
|
||||
/// <summary>8192 bytes/sector</summary>
|
||||
TwiceFriceKilo = 6,
|
||||
/// <summary>16384 bytes/sector</summary>
|
||||
FricelyFriceKilo = 7
|
||||
}
|
||||
|
||||
@@ -60,9 +67,12 @@ namespace Aaru.Decoders.Floppy
|
||||
public enum AppleEncodedFormat : byte
|
||||
{
|
||||
/// <summary>Disk is an Apple II 3.5" disk</summary>
|
||||
AppleII = 0x96, /// <summary>Disk is an Apple Lisa 3.5" disk</summary>
|
||||
Lisa = 0x97, /// <summary>Disk is an Apple Macintosh single-sided 3.5" disk</summary>
|
||||
MacSingleSide = 0x9A, /// <summary>Disk is an Apple Macintosh double-sided 3.5" disk</summary>
|
||||
AppleII = 0x96,
|
||||
/// <summary>Disk is an Apple Lisa 3.5" disk</summary>
|
||||
Lisa = 0x97,
|
||||
/// <summary>Disk is an Apple Macintosh single-sided 3.5" disk</summary>
|
||||
MacSingleSide = 0x9A,
|
||||
/// <summary>Disk is an Apple Macintosh double-sided 3.5" disk</summary>
|
||||
MacDoubleSide = 0xD9
|
||||
}
|
||||
}
|
||||
@@ -221,7 +221,7 @@ namespace Aaru.Decoders.MMC
|
||||
if(response.Length != 512)
|
||||
return null;
|
||||
|
||||
GCHandle handle = GCHandle.Alloc(response, GCHandleType.Pinned);
|
||||
var handle = GCHandle.Alloc(response, GCHandleType.Pinned);
|
||||
var csd = (ExtendedCSD)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(ExtendedCSD));
|
||||
handle.Free();
|
||||
|
||||
@@ -473,7 +473,7 @@ namespace Aaru.Decoders.MMC
|
||||
sb.AppendFormat("\tDevice has a {0} KiB boot partition", csd.BootPartitionSize * 128).AppendLine();
|
||||
|
||||
if((csd.AccessSize & 0x0F) > 0)
|
||||
sb.AppendFormat("\tDevice has a page size of {0} KiB", (csd.AccessSize & 0x0F) * 512.0 / 1024.0).
|
||||
sb.AppendFormat("\tDevice has a page size of {0} KiB", ((csd.AccessSize & 0x0F) * 512.0) / 1024.0).
|
||||
AppendLine();
|
||||
|
||||
if(csd.HighCapacityEraseUnitSize > 0)
|
||||
|
||||
159
PCMCIA/Enums.cs
159
PCMCIA/Enums.cs
@@ -39,45 +39,84 @@ namespace Aaru.Decoders.PCMCIA
|
||||
public enum TupleCodes : byte
|
||||
{
|
||||
/// <summary>Checksum control</summary>
|
||||
CISTPL_CHECKSUM = 0x10, /// <summary>End-of-chain</summary>
|
||||
CISTPL_END = 0xFF, /// <summary>Indirect access PC Card memory</summary>
|
||||
CISTPL_INDIRECT = 0x03, /// <summary>Link-target-control</summary>
|
||||
CISTPL_LINKTARGET = 0x13, /// <summary>Longlink to attribute memory</summary>
|
||||
CISTPL_LONGLINK_A = 0x11, /// <summary>Longlink to common memory</summary>
|
||||
CISTPL_LONGLINK_C = 0x12, /// <summary>Longlink to next chain on a Cardbus PC Card</summary>
|
||||
CISTPL_LONGLINK_CB = 0x02, /// <summary>Longlink to function specific chains</summary>
|
||||
CISTPL_LONGLINK_MFC = 0x06, /// <summary>No-link to common memory</summary>
|
||||
CISTPL_NO_LINK = 0x14, /// <summary>Null tuple</summary>
|
||||
CISTPL_NULL = 0x00, /// <summary>Alternate language string</summary>
|
||||
CISTPL_ALTSTR = 0x16, /// <summary>Common memory device information</summary>
|
||||
CISTPL_DEVICE = 0x01, /// <summary>Attribute memory device information</summary>
|
||||
CISTPL_DEVICE_A = 0x17, /// <summary>Other operating conditions information for attribute memory</summary>
|
||||
CISTPL_DEVICE_OA = 0x1D, /// <summary>Other operating conditions information for common memory</summary>
|
||||
CISTPL_DEVICE_OC = 0x1C, /// <summary>Device geometry information for common memory</summary>
|
||||
CISTPL_DEVICEGEO = 0x1E, /// <summary>Device geometry information for attribute memory</summary>
|
||||
CISTPL_DEVICEGEO_A = 0x1F, /// <summary>Extended common memory device information</summary>
|
||||
CISTPL_EXTDEVIC = 0x09, /// <summary>Function extensions</summary>
|
||||
CISTPL_FUNCE = 0x22, /// <summary>Function class identification</summary>
|
||||
CISTPL_FUNCID = 0x21, /// <summary>JEDEC programming information for attribute memory</summary>
|
||||
CISTPL_JEDEC_A = 0x19, /// <summary>JEDEC programming information for common memory</summary>
|
||||
CISTPL_JEDEC_C = 0x18, /// <summary>Manufacturer identification string</summary>
|
||||
CISTPL_MANFID = 0x20, /// <summary>Level 1 version/product information</summary>
|
||||
CISTPL_VERS_1 = 0x15, /// <summary>BAR for a CardBus PC Card</summary>
|
||||
CISTPL_BAR = 0x07, /// <summary>Configuration-table-entry</summary>
|
||||
CISTPL_CFTABLE_ENTRY = 0x1B, /// <summary>Configuration-table-entry for a CardBus PC Card</summary>
|
||||
CISTPL_CFTABLE_ENTRY_CB = 0x05, /// <summary>Configuration tuple for a 16-bit PC Card</summary>
|
||||
CISTPL_CONFIG = 0x1A, /// <summary>Configuration tuple for a CardBus PC Card</summary>
|
||||
CISTPL_CONFIG_CB = 0x04, /// <summary>Function state save/restore definition</summary>
|
||||
CISTPL_PWR_MGMNT = 0x08, /// <summary>Battery replacement date</summary>
|
||||
CISTPL_BATTERY = 0x45, /// <summary>Card initialization date</summary>
|
||||
CISTPL_DATE = 0x44, /// <summary>Level 2 version/product information</summary>
|
||||
CISTPL_VERS_2 = 0x40, /// <summary>Byte ordering for disk-like partitions</summary>
|
||||
CISTPL_BYTEORDER = 0x43, /// <summary>Data recording format for common memory</summary>
|
||||
CISTPL_FORMAT = 0x41, /// <summary>Data recording format for attribute memory</summary>
|
||||
CISTPL_FORMAT_A = 0x47, /// <summary>Partition geometry</summary>
|
||||
CISTPL_GEOMETRY = 0x42, /// <summary>Software interleaving</summary>
|
||||
CISTPL_SWIL = 0x23, /// <summary>Partition organization</summary>
|
||||
CISTPL_ORG = 0x46, /// <summary>Special purpose</summary>
|
||||
CISTPL_CHECKSUM = 0x10,
|
||||
/// <summary>End-of-chain</summary>
|
||||
CISTPL_END = 0xFF,
|
||||
/// <summary>Indirect access PC Card memory</summary>
|
||||
CISTPL_INDIRECT = 0x03,
|
||||
/// <summary>Link-target-control</summary>
|
||||
CISTPL_LINKTARGET = 0x13,
|
||||
/// <summary>Longlink to attribute memory</summary>
|
||||
CISTPL_LONGLINK_A = 0x11,
|
||||
/// <summary>Longlink to common memory</summary>
|
||||
CISTPL_LONGLINK_C = 0x12,
|
||||
/// <summary>Longlink to next chain on a Cardbus PC Card</summary>
|
||||
CISTPL_LONGLINK_CB = 0x02,
|
||||
/// <summary>Longlink to function specific chains</summary>
|
||||
CISTPL_LONGLINK_MFC = 0x06,
|
||||
/// <summary>No-link to common memory</summary>
|
||||
CISTPL_NO_LINK = 0x14,
|
||||
/// <summary>Null tuple</summary>
|
||||
CISTPL_NULL = 0x00,
|
||||
/// <summary>Alternate language string</summary>
|
||||
CISTPL_ALTSTR = 0x16,
|
||||
/// <summary>Common memory device information</summary>
|
||||
CISTPL_DEVICE = 0x01,
|
||||
/// <summary>Attribute memory device information</summary>
|
||||
CISTPL_DEVICE_A = 0x17,
|
||||
/// <summary>Other operating conditions information for attribute memory</summary>
|
||||
CISTPL_DEVICE_OA = 0x1D,
|
||||
/// <summary>Other operating conditions information for common memory</summary>
|
||||
CISTPL_DEVICE_OC = 0x1C,
|
||||
/// <summary>Device geometry information for common memory</summary>
|
||||
CISTPL_DEVICEGEO = 0x1E,
|
||||
/// <summary>Device geometry information for attribute memory</summary>
|
||||
CISTPL_DEVICEGEO_A = 0x1F,
|
||||
/// <summary>Extended common memory device information</summary>
|
||||
CISTPL_EXTDEVIC = 0x09,
|
||||
/// <summary>Function extensions</summary>
|
||||
CISTPL_FUNCE = 0x22,
|
||||
/// <summary>Function class identification</summary>
|
||||
CISTPL_FUNCID = 0x21,
|
||||
/// <summary>JEDEC programming information for attribute memory</summary>
|
||||
CISTPL_JEDEC_A = 0x19,
|
||||
/// <summary>JEDEC programming information for common memory</summary>
|
||||
CISTPL_JEDEC_C = 0x18,
|
||||
/// <summary>Manufacturer identification string</summary>
|
||||
CISTPL_MANFID = 0x20,
|
||||
/// <summary>Level 1 version/product information</summary>
|
||||
CISTPL_VERS_1 = 0x15,
|
||||
/// <summary>BAR for a CardBus PC Card</summary>
|
||||
CISTPL_BAR = 0x07,
|
||||
/// <summary>Configuration-table-entry</summary>
|
||||
CISTPL_CFTABLE_ENTRY = 0x1B,
|
||||
/// <summary>Configuration-table-entry for a CardBus PC Card</summary>
|
||||
CISTPL_CFTABLE_ENTRY_CB = 0x05,
|
||||
/// <summary>Configuration tuple for a 16-bit PC Card</summary>
|
||||
CISTPL_CONFIG = 0x1A,
|
||||
/// <summary>Configuration tuple for a CardBus PC Card</summary>
|
||||
CISTPL_CONFIG_CB = 0x04,
|
||||
/// <summary>Function state save/restore definition</summary>
|
||||
CISTPL_PWR_MGMNT = 0x08,
|
||||
/// <summary>Battery replacement date</summary>
|
||||
CISTPL_BATTERY = 0x45,
|
||||
/// <summary>Card initialization date</summary>
|
||||
CISTPL_DATE = 0x44,
|
||||
/// <summary>Level 2 version/product information</summary>
|
||||
CISTPL_VERS_2 = 0x40,
|
||||
/// <summary>Byte ordering for disk-like partitions</summary>
|
||||
CISTPL_BYTEORDER = 0x43,
|
||||
/// <summary>Data recording format for common memory</summary>
|
||||
CISTPL_FORMAT = 0x41,
|
||||
/// <summary>Data recording format for attribute memory</summary>
|
||||
CISTPL_FORMAT_A = 0x47,
|
||||
/// <summary>Partition geometry</summary>
|
||||
CISTPL_GEOMETRY = 0x42,
|
||||
/// <summary>Software interleaving</summary>
|
||||
CISTPL_SWIL = 0x23,
|
||||
/// <summary>Partition organization</summary>
|
||||
CISTPL_ORG = 0x46,
|
||||
/// <summary>Special purpose</summary>
|
||||
CISTPL_SPCL = 0x90
|
||||
}
|
||||
|
||||
@@ -85,15 +124,24 @@ namespace Aaru.Decoders.PCMCIA
|
||||
public enum DeviceTypeCodes : byte
|
||||
{
|
||||
/// <summary>No device, used to designate a hole</summary>
|
||||
DTYPE_NULL = 0, /// <summary>Masked ROM</summary>
|
||||
DTYPE_ROM = 1, /// <summary>One-type-programmable ROM</summary>
|
||||
DTYPE_OTPROM = 2, /// <summary>UV-Erasable Programmable ROM</summary>
|
||||
DTYPE_EPROM = 3, /// <summary>Electronically-Erasable Programmable ROM</summary>
|
||||
DTYPE_EEPROM = 4, /// <summary>Flash memory</summary>
|
||||
DTYPE_FLASH = 5, /// <summary>Static RAM</summary>
|
||||
DTYPE_SRAM = 6, /// <summary>Dynamic RAM</summary>
|
||||
DTYPE_DRAM = 7, /// <summary>Function-specific memory address range</summary>
|
||||
DTYPE_FUNCSPEC = 13, /// <summary>Extended type follows</summary>
|
||||
DTYPE_NULL = 0,
|
||||
/// <summary>Masked ROM</summary>
|
||||
DTYPE_ROM = 1,
|
||||
/// <summary>One-type-programmable ROM</summary>
|
||||
DTYPE_OTPROM = 2,
|
||||
/// <summary>UV-Erasable Programmable ROM</summary>
|
||||
DTYPE_EPROM = 3,
|
||||
/// <summary>Electronically-Erasable Programmable ROM</summary>
|
||||
DTYPE_EEPROM = 4,
|
||||
/// <summary>Flash memory</summary>
|
||||
DTYPE_FLASH = 5,
|
||||
/// <summary>Static RAM</summary>
|
||||
DTYPE_SRAM = 6,
|
||||
/// <summary>Dynamic RAM</summary>
|
||||
DTYPE_DRAM = 7,
|
||||
/// <summary>Function-specific memory address range</summary>
|
||||
DTYPE_FUNCSPEC = 13,
|
||||
/// <summary>Extended type follows</summary>
|
||||
DTYPE_EXTEND = 14
|
||||
}
|
||||
|
||||
@@ -101,11 +149,16 @@ namespace Aaru.Decoders.PCMCIA
|
||||
public enum DeviceSpeedCodes : byte
|
||||
{
|
||||
/// <summary>No device</summary>
|
||||
DSPEED_NULL = 0, /// <summary>250 ns</summary>
|
||||
DSPEED_250NS = 1, /// <summary>200 ns</summary>
|
||||
DSPEED_200NS = 2, /// <summary>150 ns</summary>
|
||||
DSPEED_150NS = 3, /// <summary>100 ns</summary>
|
||||
DSPEED_100NS = 4, /// <summary>Extended speed follows</summary>
|
||||
DSPEED_NULL = 0,
|
||||
/// <summary>250 ns</summary>
|
||||
DSPEED_250NS = 1,
|
||||
/// <summary>200 ns</summary>
|
||||
DSPEED_200NS = 2,
|
||||
/// <summary>150 ns</summary>
|
||||
DSPEED_150NS = 3,
|
||||
/// <summary>100 ns</summary>
|
||||
DSPEED_100NS = 4,
|
||||
/// <summary>Extended speed follows</summary>
|
||||
DSPEED_EXT = 7
|
||||
}
|
||||
|
||||
|
||||
@@ -295,9 +295,9 @@ namespace Aaru.Decoders.SCSI.MMC
|
||||
for(int i = 0; i < (AACSLBAExtsResponse.Length - 4) / 16; i++)
|
||||
{
|
||||
decoded.Extents[i].Reserved = new byte[8];
|
||||
Array.Copy(AACSLBAExtsResponse, 0 + i * 16 + 4, decoded.Extents[i].Reserved, 0, 8);
|
||||
decoded.Extents[i].StartLBA = BigEndianBitConverter.ToUInt32(AACSLBAExtsResponse, 8 + i * 16 + 4);
|
||||
decoded.Extents[i].LBACount = BigEndianBitConverter.ToUInt32(AACSLBAExtsResponse, 12 + i * 16 + 4);
|
||||
Array.Copy(AACSLBAExtsResponse, 0 + (i * 16) + 4, decoded.Extents[i].Reserved, 0, 8);
|
||||
decoded.Extents[i].StartLBA = BigEndianBitConverter.ToUInt32(AACSLBAExtsResponse, 8 + (i * 16) + 4);
|
||||
decoded.Extents[i].LBACount = BigEndianBitConverter.ToUInt32(AACSLBAExtsResponse, 12 + (i * 16) + 4);
|
||||
}
|
||||
|
||||
return decoded;
|
||||
|
||||
@@ -96,16 +96,17 @@ namespace Aaru.Decoders.SCSI.MMC
|
||||
decoded.OPCTablesNumber = response[33];
|
||||
|
||||
if(decoded.OPCTablesNumber <= 0 ||
|
||||
response.Length != decoded.OPCTablesNumber * 8 + 34)
|
||||
response.Length != (decoded.OPCTablesNumber * 8) + 34)
|
||||
return decoded;
|
||||
|
||||
decoded.OPCTables = new OPCTable[decoded.OPCTablesNumber];
|
||||
|
||||
for(int i = 0; i < decoded.OPCTablesNumber; i++)
|
||||
{
|
||||
decoded.OPCTables[i].Speed = (ushort)((response[34 + i * 8 + 0] << 16) + response[34 + i * 8 + 1]);
|
||||
decoded.OPCTables[i].Speed = (ushort)((response[34 + (i * 8) + 0] << 16) + response[34 + (i * 8) + 1]);
|
||||
|
||||
decoded.OPCTables[i].OPCValues = new byte[6];
|
||||
Array.Copy(response, 34 + i * 8 + 2, decoded.OPCTables[i].OPCValues, 0, 6);
|
||||
Array.Copy(response, 34 + (i * 8) + 2, decoded.OPCTables[i].OPCValues, 0, 6);
|
||||
}
|
||||
|
||||
return decoded;
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Aaru.Decoders.SCSI.MMC
|
||||
};
|
||||
|
||||
for(int i = 0; i < (FormatLayersResponse.Length - 6) / 2; i++)
|
||||
decoded.FormatLayers[i] = BigEndianBitConverter.ToUInt16(FormatLayersResponse, i * 2 + 6);
|
||||
decoded.FormatLayers[i] = BigEndianBitConverter.ToUInt16(FormatLayersResponse, (i * 2) + 6);
|
||||
|
||||
return decoded;
|
||||
}
|
||||
|
||||
@@ -139,8 +139,7 @@ namespace Aaru.Decoders.SCSI
|
||||
string UnrecECCNotAbort = "\tUnrecovered ECC errors will not abort the transfer.";
|
||||
string UnrecCIRCNotAbort = "\tUnrecovered CIRC errors will not abort the transfer.";
|
||||
|
||||
string UnrecECCAbortData =
|
||||
"\tUnrecovered ECC errors will return CHECK CONDITION and the uncorrected data.";
|
||||
string UnrecECCAbortData = "\tUnrecovered ECC errors will return CHECK CONDITION and the uncorrected data.";
|
||||
|
||||
string UnrecCIRCAbortData =
|
||||
"\tUnrecovered CIRC errors will return CHECK CONDITION and the uncorrected data.";
|
||||
|
||||
@@ -86,11 +86,9 @@ namespace Aaru.Decoders.SCSI
|
||||
decoded.Heads = pageResponse[5];
|
||||
decoded.WritePrecompCylinder = (uint)((pageResponse[6] << 16) + (pageResponse[7] << 8) + pageResponse[8]);
|
||||
|
||||
decoded.WriteReduceCylinder =
|
||||
(uint)((pageResponse[9] << 16) + (pageResponse[10] << 8) + pageResponse[11]);
|
||||
decoded.WriteReduceCylinder = (uint)((pageResponse[9] << 16) + (pageResponse[10] << 8) + pageResponse[11]);
|
||||
|
||||
decoded.DriveStepRate =
|
||||
(ushort)((pageResponse[12] << 8) + pageResponse[13]);
|
||||
decoded.DriveStepRate = (ushort)((pageResponse[12] << 8) + pageResponse[13]);
|
||||
|
||||
decoded.LandingCylinder = (pageResponse[14] << 16) + (pageResponse[15] << 8) + pageResponse[16];
|
||||
decoded.RPL = (byte)(pageResponse[17] & 0x03);
|
||||
|
||||
@@ -104,8 +104,7 @@ namespace Aaru.Decoders.SCSI
|
||||
string UnrecECCNotAbort = "\tUnrecovered ECC errors will not abort the transfer.";
|
||||
string UnrecCIRCNotAbort = "\tUnrecovered CIRC errors will not abort the transfer.";
|
||||
|
||||
string UnrecECCAbortData =
|
||||
"\tUnrecovered ECC errors will return CHECK CONDITION and the uncorrected data.";
|
||||
string UnrecECCAbortData = "\tUnrecovered ECC errors will return CHECK CONDITION and the uncorrected data.";
|
||||
|
||||
string UnrecCIRCAbortData =
|
||||
"\tUnrecovered CIRC errors will return CHECK CONDITION and the uncorrected data.";
|
||||
|
||||
@@ -44,18 +44,24 @@ namespace Aaru.Decoders.SCSI
|
||||
public enum PartitionSizeUnitOfMeasures : byte
|
||||
{
|
||||
/// <summary>Partition size is measures in bytes</summary>
|
||||
Bytes = 0, /// <summary>Partition size is measures in Kilobytes</summary>
|
||||
Kilobytes = 1, /// <summary>Partition size is measures in Megabytes</summary>
|
||||
Megabytes = 2, /// <summary>Partition size is 10eUNITS bytes</summary>
|
||||
Bytes = 0,
|
||||
/// <summary>Partition size is measures in Kilobytes</summary>
|
||||
Kilobytes = 1,
|
||||
/// <summary>Partition size is measures in Megabytes</summary>
|
||||
Megabytes = 2,
|
||||
/// <summary>Partition size is 10eUNITS bytes</summary>
|
||||
Exponential = 3
|
||||
}
|
||||
|
||||
public enum MediumFormatRecognitionValues : byte
|
||||
{
|
||||
/// <summary>Logical unit is incapable of format or partition recognition</summary>
|
||||
Incapable = 0, /// <summary>Logical unit is capable of format recognition only</summary>
|
||||
FormatCapable = 1, /// <summary>Logical unit is capable of partition recognition only</summary>
|
||||
PartitionCapable = 2, /// <summary>Logical unit is capable of both format and partition recognition</summary>
|
||||
Incapable = 0,
|
||||
/// <summary>Logical unit is capable of format recognition only</summary>
|
||||
FormatCapable = 1,
|
||||
/// <summary>Logical unit is capable of partition recognition only</summary>
|
||||
PartitionCapable = 2,
|
||||
/// <summary>Logical unit is capable of both format and partition recognition</summary>
|
||||
Capable = 3
|
||||
}
|
||||
|
||||
|
||||
@@ -140,8 +140,8 @@ namespace Aaru.Decoders.SCSI
|
||||
if(page.PS)
|
||||
sb.AppendLine("\tParameters can be saved");
|
||||
|
||||
if(page.Standby && page.StandbyTimer > 0 ||
|
||||
page.Standby_Y && page.StandbyTimer_Y > 0)
|
||||
if((page.Standby && page.StandbyTimer > 0) ||
|
||||
(page.Standby_Y && page.StandbyTimer_Y > 0))
|
||||
{
|
||||
if(page.Standby &&
|
||||
page.StandbyTimer > 0)
|
||||
@@ -154,9 +154,9 @@ namespace Aaru.Decoders.SCSI
|
||||
else
|
||||
sb.AppendLine("\tDrive will not enter standy mode");
|
||||
|
||||
if(page.Idle && page.IdleTimer > 0 ||
|
||||
page.Idle_B && page.IdleTimer_B > 0 ||
|
||||
page.Idle_C && page.IdleTimer_C > 0)
|
||||
if((page.Idle && page.IdleTimer > 0) ||
|
||||
(page.Idle_B && page.IdleTimer_B > 0) ||
|
||||
(page.Idle_C && page.IdleTimer_C > 0))
|
||||
{
|
||||
if(page.Idle &&
|
||||
page.IdleTimer > 0)
|
||||
|
||||
@@ -64,21 +64,36 @@ namespace Aaru.Decoders.SCSI
|
||||
public enum SenseKeys : byte
|
||||
{
|
||||
/// <summary>No information to be reported, but bits should be checked</summary>
|
||||
NoSense = 0, /// <summary>Target performed some recovery to successfully complete last command</summary>
|
||||
RecoveredError = 1, /// <summary>Target is not ready</summary>
|
||||
NotReady = 2, /// <summary>Non-recoverable medium error occurred</summary>
|
||||
MediumError = 3, /// <summary>Non-recoverable hardware error occurred</summary>
|
||||
HardwareError = 4, /// <summary>Target has received an illegal request</summary>
|
||||
IllegalRequest = 5, /// <summary>Target requires initiator attention</summary>
|
||||
UnitAttention = 6, /// <summary>A protected command has been denied</summary>
|
||||
DataProtect = 7, /// <summary>A blank block has been tried to read or a non-rewritable one to write</summary>
|
||||
BlankCheck = 8, /// <summary>For private/vendor usage</summary>
|
||||
PrivateUse = 9, /// <summary>COPY command aborted</summary>
|
||||
CopyAborted = 0xA, /// <summary>Command aborted</summary>
|
||||
AbortedCommand = 0xB, /// <summary>SEARCH command has been satisfied</summary>
|
||||
Equal = 0xC, /// <summary>End-of-medium reached with data remaining in buffer</summary>
|
||||
VolumeOverflow = 0xD, /// <summary>COMPARE failed</summary>
|
||||
Miscompare = 0xE, /// <summary>Complated</summary>
|
||||
NoSense = 0,
|
||||
/// <summary>Target performed some recovery to successfully complete last command</summary>
|
||||
RecoveredError = 1,
|
||||
/// <summary>Target is not ready</summary>
|
||||
NotReady = 2,
|
||||
/// <summary>Non-recoverable medium error occurred</summary>
|
||||
MediumError = 3,
|
||||
/// <summary>Non-recoverable hardware error occurred</summary>
|
||||
HardwareError = 4,
|
||||
/// <summary>Target has received an illegal request</summary>
|
||||
IllegalRequest = 5,
|
||||
/// <summary>Target requires initiator attention</summary>
|
||||
UnitAttention = 6,
|
||||
/// <summary>A protected command has been denied</summary>
|
||||
DataProtect = 7,
|
||||
/// <summary>A blank block has been tried to read or a non-rewritable one to write</summary>
|
||||
BlankCheck = 8,
|
||||
/// <summary>For private/vendor usage</summary>
|
||||
PrivateUse = 9,
|
||||
/// <summary>COPY command aborted</summary>
|
||||
CopyAborted = 0xA,
|
||||
/// <summary>Command aborted</summary>
|
||||
AbortedCommand = 0xB,
|
||||
/// <summary>SEARCH command has been satisfied</summary>
|
||||
Equal = 0xC,
|
||||
/// <summary>End-of-medium reached with data remaining in buffer</summary>
|
||||
VolumeOverflow = 0xD,
|
||||
/// <summary>COMPARE failed</summary>
|
||||
Miscompare = 0xE,
|
||||
/// <summary>Complated</summary>
|
||||
Completed = 0xF
|
||||
}
|
||||
|
||||
|
||||
@@ -126,8 +126,7 @@ namespace Aaru.Decoders.SecureDigital
|
||||
|
||||
if(csd.Structure == 0)
|
||||
{
|
||||
csd.Size =
|
||||
(ushort)(((response[6] & 0x03) << 10) + (response[7] << 2) + ((response[8] & 0xC0) >> 6));
|
||||
csd.Size = (ushort)(((response[6] & 0x03) << 10) + (response[7] << 2) + ((response[8] & 0xC0) >> 6));
|
||||
|
||||
csd.ReadCurrentAtVddMin = (byte)((response[8] & 0x38) >> 3);
|
||||
csd.ReadCurrentAtVddMax = (byte)(response[8] & 0x07);
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Aaru.Decoders.Sega
|
||||
if(ipbin_sector.Length < 512)
|
||||
return null;
|
||||
|
||||
var ipbin = Marshal.ByteArrayToStructureLittleEndian<IPBin>(ipbin_sector);
|
||||
IPBin ipbin = Marshal.ByteArrayToStructureLittleEndian<IPBin>(ipbin_sector);
|
||||
|
||||
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.volume_name = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.volume_name));
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Aaru.Decoders.Sega
|
||||
if(ipbin_sector.Length < 512)
|
||||
return null;
|
||||
|
||||
var ipbin = Marshal.ByteArrayToStructureLittleEndian<IPBin>(ipbin_sector);
|
||||
IPBin ipbin = Marshal.ByteArrayToStructureLittleEndian<IPBin>(ipbin_sector);
|
||||
|
||||
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.maker_id = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.maker_id));
|
||||
@@ -63,7 +63,8 @@ namespace Aaru.Decoders.Sega
|
||||
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.dreamcast_media = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.dreamcast_media));
|
||||
|
||||
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.disc_no = {0}", (char)ipbin.disc_no);
|
||||
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.disc_no = {0}",
|
||||
(char)ipbin.disc_no);
|
||||
|
||||
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.disc_no_separator = \"{0}\"",
|
||||
(char)ipbin.disc_no_separator);
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Aaru.Decoders.Sega
|
||||
if(ipbin_sector.Length < 512)
|
||||
return null;
|
||||
|
||||
var ipbin = Marshal.ByteArrayToStructureLittleEndian<IPBin>(ipbin_sector);
|
||||
IPBin ipbin = Marshal.ByteArrayToStructureLittleEndian<IPBin>(ipbin_sector);
|
||||
|
||||
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.maker_id = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.maker_id));
|
||||
|
||||
37
Xbox/SS.cs
37
Xbox/SS.cs
@@ -90,12 +90,13 @@ namespace Aaru.Decoders.Xbox
|
||||
for(int i = 0; i < 23; i++)
|
||||
ss.ChallengeEntries[i] = new ChallengeEntry
|
||||
{
|
||||
Level = response[770 + i * 11 + 0], ChallengeId = response[770 + i * 11 + 1],
|
||||
ChallengeValue = (uint)((response[770 + i * 11 + 2] << 24) + (response[770 + i * 11 + 3] << 16) +
|
||||
(response[770 + i * 11 + 4] << 8) + response[770 + i * 11 + 5]),
|
||||
ResponseModifier = response[770 + i * 11 + 6],
|
||||
ResponseValue = (uint)((response[770 + i * 11 + 7] << 24) + (response[770 + i * 11 + 8] << 16) +
|
||||
(response[770 + i * 11 + 9] << 8) + response[770 + i * 11 + 10])
|
||||
Level = response[770 + (i * 11) + 0], ChallengeId = response[770 + (i * 11) + 1],
|
||||
ChallengeValue = (uint)((response[770 + (i * 11) + 2] << 24) +
|
||||
(response[770 + (i * 11) + 3] << 16) + (response[770 + (i * 11) + 4] << 8) +
|
||||
response[770 + (i * 11) + 5]),
|
||||
ResponseModifier = response[770 + (i * 11) + 6],
|
||||
ResponseValue = (uint)((response[770 + (i * 11) + 7] << 24) + (response[770 + (i * 11) + 8] << 16) +
|
||||
(response[770 + (i * 11) + 9] << 8) + response[770 + (i * 11) + 10])
|
||||
};
|
||||
|
||||
Array.Copy(response, 1052, ss.Unknown7, 0, 48);
|
||||
@@ -107,23 +108,23 @@ namespace Aaru.Decoders.Xbox
|
||||
for(int i = 0; i < 23; i++)
|
||||
ss.Extents[i] = new SecuritySectorExtent
|
||||
{
|
||||
Unknown = (uint)((response[1633 + i * 9 + 0] << 16) + (response[1633 + i * 9 + 1] << 8) +
|
||||
response[1633 + i * 9 + 2]),
|
||||
StartPSN = (uint)((response[1633 + i * 9 + 3] << 16) + (response[1633 + i * 9 + 4] << 8) +
|
||||
response[1633 + i * 9 + 5]),
|
||||
EndPSN = (uint)((response[1633 + i * 9 + 6] << 16) + (response[1633 + i * 9 + 7] << 8) +
|
||||
response[1633 + i * 9 + 8])
|
||||
Unknown = (uint)((response[1633 + (i * 9) + 0] << 16) + (response[1633 + (i * 9) + 1] << 8) +
|
||||
response[1633 + (i * 9) + 2]),
|
||||
StartPSN = (uint)((response[1633 + (i * 9) + 3] << 16) + (response[1633 + (i * 9) + 4] << 8) +
|
||||
response[1633 + (i * 9) + 5]),
|
||||
EndPSN = (uint)((response[1633 + (i * 9) + 6] << 16) + (response[1633 + (i * 9) + 7] << 8) +
|
||||
response[1633 + (i * 9) + 8])
|
||||
};
|
||||
|
||||
for(int i = 0; i < 23; i++)
|
||||
ss.ExtentsCopy[i] = new SecuritySectorExtent
|
||||
{
|
||||
Unknown = (uint)((response[1840 + i * 9 + 0] << 16) + (response[1840 + i * 9 + 1] << 8) +
|
||||
response[1840 + i * 9 + 2]),
|
||||
StartPSN = (uint)((response[1840 + i * 9 + 3] << 16) + (response[1840 + i * 9 + 4] << 8) +
|
||||
response[1840 + i * 9 + 5]),
|
||||
EndPSN = (uint)((response[1840 + i * 9 + 6] << 16) + (response[1840 + i * 9 + 7] << 8) +
|
||||
response[1840 + i * 9 + 8])
|
||||
Unknown = (uint)((response[1840 + (i * 9) + 0] << 16) + (response[1840 + (i * 9) + 1] << 8) +
|
||||
response[1840 + (i * 9) + 2]),
|
||||
StartPSN = (uint)((response[1840 + (i * 9) + 3] << 16) + (response[1840 + (i * 9) + 4] << 8) +
|
||||
response[1840 + (i * 9) + 5]),
|
||||
EndPSN = (uint)((response[1840 + (i * 9) + 6] << 16) + (response[1840 + (i * 9) + 7] << 8) +
|
||||
response[1840 + (i * 9) + 8])
|
||||
};
|
||||
|
||||
return ss;
|
||||
|
||||
Reference in New Issue
Block a user