Code restyling.

This commit is contained in:
2020-02-29 18:03:33 +00:00
parent 9abc956373
commit a43b4132ee
40 changed files with 2701 additions and 2473 deletions

View File

@@ -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,65 +659,81 @@ namespace Aaru.Decoders.ATA
else if(!cfa)
{
if(minatalevel >= 5)
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
IncompleteResponse))
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.
UltraFastIDE))
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.
SoftSector))
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.
HardSector))
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.
FormatGapReq))
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.
TrackOffset))
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.
DataStrobeOffset))
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.
RotationalSpeedTolerance))
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.
SpindleControl))
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.
HighHeadSwitch))
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,24 +1346,29 @@ 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.
HostEnvDetect))
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.
DevAttSlimline))
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.
HardwareFeatureControl))
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.
AsyncNotification))
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");
}

View File

@@ -68,7 +68,7 @@ namespace Aaru.Decoders.Bluray
if(BCAResponse.Length != 68)
{
AaruConsole.DebugWriteLine("BD BCA decoder", "Found incorrect Blu-ray BCA size ({0} bytes)",
BCAResponse.Length);
BCAResponse.Length);
return null;
}

View File

@@ -83,8 +83,8 @@ namespace Aaru.Decoders.Bluray
if(CSResponse.Length != 8)
{
AaruConsole.DebugWriteLine("BD Cartridge Status decoder",
"Found incorrect Blu-ray Cartridge Status size ({0} bytes)",
CSResponse.Length);
"Found incorrect Blu-ray Cartridge Status size ({0} bytes)",
CSResponse.Length);
return null;
}

View File

@@ -123,7 +123,7 @@ namespace Aaru.Decoders.Bluray
if(decoded.Signature != DDSIdentifier)
{
AaruConsole.DebugWriteLine("BD DDS decoder", "Found incorrect DDS signature (0x{0:X4})",
decoded.Signature);
decoded.Signature);
return null;
}

View File

@@ -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
}
@@ -88,8 +93,8 @@ namespace Aaru.Decoders.Bluray
if(DIResponse.Length != 4100)
{
AaruConsole.DebugWriteLine("BD Disc Information decoder",
"Found incorrect Blu-ray Disc Information size ({0} bytes)",
DIResponse.Length);
"Found incorrect Blu-ray Disc Information size ({0} bytes)",
DIResponse.Length);
return null;
}
@@ -178,8 +183,8 @@ namespace Aaru.Decoders.Bluray
default:
{
AaruConsole.DebugWriteLine("BD Disc Information decoder",
"Found unknown disc type identifier \"{0}\"",
Encoding.ASCII.GetString(unit.DiscTypeIdentifier));
"Found unknown disc type identifier \"{0}\"",
Encoding.ASCII.GetString(unit.DiscTypeIdentifier));
break;
}

View File

@@ -71,8 +71,8 @@ namespace Aaru.Decoders.Bluray
if(SAIResponse.Length != 16)
{
AaruConsole.DebugWriteLine("BD Spare Area Information decoder",
"Found incorrect Blu-ray Spare Area Information size ({0} bytes)",
SAIResponse.Length);
"Found incorrect Blu-ray Spare Area Information size ({0} bytes)",
SAIResponse.Length);
return null;
}

View File

@@ -57,8 +57,8 @@ namespace Aaru.Decoders.CD
CDATIPResponse.Length != 28)
{
AaruConsole.DebugWriteLine("CD ATIP decoder",
"Expected CD ATIP size (32 bytes) is not received size ({0} bytes), not decoding",
CDATIPResponse.Length);
"Expected CD ATIP size (32 bytes) is not received size ({0} bytes), not decoding",
CDATIPResponse.Length);
return null;
}
@@ -322,169 +322,169 @@ namespace Aaru.Decoders.CD
case 15:
switch(frm)
{
case 00: return"TDK Corporation";
case 10: return"Ritek Co.";
case 20: return"Mitsubishi Chemical Corporation";
case 30: return"NAN-YA Plastics Corporation";
case 00: return "TDK Corporation";
case 10: return "Ritek Co.";
case 20: return "Mitsubishi Chemical Corporation";
case 30: return "NAN-YA Plastics Corporation";
}
break;
case 16:
switch(frm)
{
case 20: return"Shenzen SG&Gast Digital Optical Discs";
case 30: return"Grand Advance Technology Ltd.";
case 20: return "Shenzen SG&Gast Digital Optical Discs";
case 30: return "Grand Advance Technology Ltd.";
}
break;
case 17:
if(frm == 00)
return"Moser Baer India Limited";
return "Moser Baer India Limited";
break;
case 18:
switch(frm)
{
case 10: return"Wealth Fair Investment Ltd.";
case 60: return"Taroko International Co. Ltd.";
case 10: return "Wealth Fair Investment Ltd.";
case 60: return "Taroko International Co. Ltd.";
}
break;
case 20:
if(frm == 10)
return"CDA Datenträger Albrechts GmbH";
return "CDA Datenträger Albrechts GmbH";
break;
case 21:
switch(frm)
{
case 10: return"Grupo Condor S.L.";
case 30: return"Bestdisc Technology Corporation";
case 40: return"Optical Disc Manufacturing Equipment";
case 50: return"Sound Sound Multi-Media Development Ltd.";
case 10: return "Grupo Condor S.L.";
case 30: return "Bestdisc Technology Corporation";
case 40: return "Optical Disc Manufacturing Equipment";
case 50: return "Sound Sound Multi-Media Development Ltd.";
}
break;
case 22:
switch(frm)
{
case 00: return"Woongjin Media Corp.";
case 10: return"Seantram Technology Inc.";
case 20: return"Advanced Digital Media";
case 30: return"EXIMPO";
case 40: return"CIS Technology Inc.";
case 50: return"Hong Kong Digital Technology Co., Ltd.";
case 60: return"Acer Media Technology, Inc.";
case 00: return "Woongjin Media Corp.";
case 10: return "Seantram Technology Inc.";
case 20: return "Advanced Digital Media";
case 30: return "EXIMPO";
case 40: return "CIS Technology Inc.";
case 50: return "Hong Kong Digital Technology Co., Ltd.";
case 60: return "Acer Media Technology, Inc.";
}
break;
case 23:
switch(frm)
{
case 00: return"Matsushita Electric Industrial Co., Ltd.";
case 10: return"Doremi Media Co., Ltd.";
case 20: return"Nacar Media s.r.l.";
case 30: return"Audio Distributors Co., Ltd.";
case 40: return"Victor Company of Japan, Ltd.";
case 50: return"Optrom Inc.";
case 60: return"Customer Pressing Oosterhout";
case 00: return "Matsushita Electric Industrial Co., Ltd.";
case 10: return "Doremi Media Co., Ltd.";
case 20: return "Nacar Media s.r.l.";
case 30: return "Audio Distributors Co., Ltd.";
case 40: return "Victor Company of Japan, Ltd.";
case 50: return "Optrom Inc.";
case 60: return "Customer Pressing Oosterhout";
}
break;
case 24:
switch(frm)
{
case 00: return"Taiyo Yuden Company Ltd.";
case 10: return"SONY Corporation";
case 20: return"Computer Support Italy s.r.l.";
case 30: return"Unitech Japan Inc.";
case 40: return"kdg mediatech AG";
case 50: return"Guann Yinn Co., Ltd.";
case 60: return"Harmonic Hall Optical Disc Ltd.";
case 00: return "Taiyo Yuden Company Ltd.";
case 10: return "SONY Corporation";
case 20: return "Computer Support Italy s.r.l.";
case 30: return "Unitech Japan Inc.";
case 40: return "kdg mediatech AG";
case 50: return "Guann Yinn Co., Ltd.";
case 60: return "Harmonic Hall Optical Disc Ltd.";
}
break;
case 25:
switch(frm)
{
case 00: return"MPO";
case 20: return"Hitachi Maxell, Ltd.";
case 30: return"Infodisc Technology Co. Ltd.";
case 40: return"Vivastar AG";
case 50: return"AMS Technology Inc.";
case 60: return"Xcitec Inc.";
case 00: return "MPO";
case 20: return "Hitachi Maxell, Ltd.";
case 30: return "Infodisc Technology Co. Ltd.";
case 40: return "Vivastar AG";
case 50: return "AMS Technology Inc.";
case 60: return "Xcitec Inc.";
}
break;
case 26:
switch(frm)
{
case 00: return"Fornet International Pte Ltd.";
case 10: return"POSTECH Corporation";
case 20: return"SKC Co., Ltd.";
case 30: return"Optical Disc Corporation";
case 40: return"FUJI Photo Film Co., Ltd.";
case 50: return"Lead Data Inc.";
case 60: return"CMC Magnetics Corporation";
case 00: return "Fornet International Pte Ltd.";
case 10: return "POSTECH Corporation";
case 20: return "SKC Co., Ltd.";
case 30: return "Optical Disc Corporation";
case 40: return "FUJI Photo Film Co., Ltd.";
case 50: return "Lead Data Inc.";
case 60: return "CMC Magnetics Corporation";
}
break;
case 27:
switch(frm)
{
case 00: return"Digital Storage Technology Co., Ltd.";
case 10: return"Plasmon Data systems Ltd.";
case 20: return"Princo Corporation";
case 30: return"Pioneer Video Corporation";
case 40: return"Kodak Japan Ltd.";
case 50: return"Mitsui Chemicals, Inc.";
case 60: return"Ricoh Company Ltd.";
case 00: return "Digital Storage Technology Co., Ltd.";
case 10: return "Plasmon Data systems Ltd.";
case 20: return "Princo Corporation";
case 30: return "Pioneer Video Corporation";
case 40: return "Kodak Japan Ltd.";
case 50: return "Mitsui Chemicals, Inc.";
case 60: return "Ricoh Company Ltd.";
}
break;
case 28:
switch(frm)
{
case 00: return"Opti.Me.S. S.p.A.";
case 10: return"Gigastore Corporation";
case 20: return"Multi Media Masters & Machinary SA";
case 30: return"Auvistar Industry Co., Ltd.";
case 40: return"King Pro Mediatek Inc.";
case 50: return"Delphi Technology Inc.";
case 60: return"Friendly CD-Tek Co.";
case 00: return "Opti.Me.S. S.p.A.";
case 10: return "Gigastore Corporation";
case 20: return "Multi Media Masters & Machinary SA";
case 30: return "Auvistar Industry Co., Ltd.";
case 40: return "King Pro Mediatek Inc.";
case 50: return "Delphi Technology Inc.";
case 60: return "Friendly CD-Tek Co.";
}
break;
case 29:
switch(frm)
{
case 00: return"Taeil Media Co., Ltd.";
case 10: return"Vanguard Disc Inc.";
case 20: return"Unidisc Technology Co., Ltd.";
case 30: return"Hile Optical Disc Technology Corp.";
case 40: return"Viva Magnetics Ltd.";
case 50: return"General Magnetics Ltd.";
case 00: return "Taeil Media Co., Ltd.";
case 10: return "Vanguard Disc Inc.";
case 20: return "Unidisc Technology Co., Ltd.";
case 30: return "Hile Optical Disc Technology Corp.";
case 40: return "Viva Magnetics Ltd.";
case 50: return "General Magnetics Ltd.";
}
break;
case 30:
if(frm == 10)
return"CDA Datenträger Albrechts GmbH";
return "CDA Datenträger Albrechts GmbH";
break;
case 31:
switch(frm)
{
case 00: return"Ritek Co.";
case 30: return"Grand Advance Technology Ltd.";
case 00: return "Ritek Co.";
case 30: return "Grand Advance Technology Ltd.";
}
break;
case 32:
switch(frm)
{
case 00: return"TDK Corporation";
case 10: return"Prodisc Technology Inc.";
case 00: return "TDK Corporation";
case 10: return "Prodisc Technology Inc.";
}
break;
@@ -492,97 +492,97 @@ namespace Aaru.Decoders.CD
switch(frm)
{
case 20:
case 22: return"Mitsubishi Chemical Corporation";
case 22: return "Mitsubishi Chemical Corporation";
}
break;
case 42:
if(frm == 20)
return"Advanced Digital Media";
return "Advanced Digital Media";
break;
case 45:
switch(frm)
{
case 00: return"Fornet International Pte Ltd.";
case 10: return"Unitech Japan Inc.";
case 20: return"Acer Media Technology, Inc.";
case 40: return"CIS Technology Inc.";
case 50: return"Guann Yinn Co., Ltd.";
case 60: return"Xcitec Inc.";
case 00: return "Fornet International Pte Ltd.";
case 10: return "Unitech Japan Inc.";
case 20: return "Acer Media Technology, Inc.";
case 40: return "CIS Technology Inc.";
case 50: return "Guann Yinn Co., Ltd.";
case 60: return "Xcitec Inc.";
}
break;
case 46:
switch(frm)
{
case 00: return"Taiyo Yuden Company Ltd.";
case 10: return"Hong Kong Digital Technology Co., Ltd.";
case 20: return"Multi Media Masters & Machinary SA";
case 30: return"Computer Support Italy s.r.l.";
case 40: return"FUJI Photo Film Co., Ltd.";
case 50: return"Auvistar Industry Co., Ltd.";
case 60: return"CMC Magnetics Corporation";
case 00: return "Taiyo Yuden Company Ltd.";
case 10: return "Hong Kong Digital Technology Co., Ltd.";
case 20: return "Multi Media Masters & Machinary SA";
case 30: return "Computer Support Italy s.r.l.";
case 40: return "FUJI Photo Film Co., Ltd.";
case 50: return "Auvistar Industry Co., Ltd.";
case 60: return "CMC Magnetics Corporation";
}
break;
case 47:
switch(frm)
{
case 10: return"Hitachi Maxell, Ltd.";
case 20: return"Princo Corporation";
case 40: return"POSTECH Corporation";
case 50: return"Ritek Co.";
case 60: return"Prodisc Technology Inc.";
case 10: return "Hitachi Maxell, Ltd.";
case 20: return "Princo Corporation";
case 40: return "POSTECH Corporation";
case 50: return "Ritek Co.";
case 60: return "Prodisc Technology Inc.";
}
break;
case 48:
switch(frm)
{
case 00: return"Ricoh Company Ltd.";
case 10: return"Kodak Japan Ltd.";
case 20: return"Plasmon Data systems Ltd.";
case 30: return"Pioneer Video Corporation";
case 40: return"Digital Storage Technology Co., Ltd.";
case 50: return"Mitsui Chemicals, Inc.";
case 60: return"Lead Data Inc.";
case 00: return "Ricoh Company Ltd.";
case 10: return "Kodak Japan Ltd.";
case 20: return "Plasmon Data systems Ltd.";
case 30: return "Pioneer Video Corporation";
case 40: return "Digital Storage Technology Co., Ltd.";
case 50: return "Mitsui Chemicals, Inc.";
case 60: return "Lead Data Inc.";
}
break;
case 49:
switch(frm)
{
case 00: return"TDK Corporation";
case 10: return"Gigastore Corporation";
case 20: return"King Pro Mediatek Inc.";
case 30: return"Opti.Me.S. S.p.A.";
case 40: return"Victor Company of Japan, Ltd.";
case 60: return"Matsushita Electric Industrial Co., Ltd.";
case 00: return "TDK Corporation";
case 10: return "Gigastore Corporation";
case 20: return "King Pro Mediatek Inc.";
case 30: return "Opti.Me.S. S.p.A.";
case 40: return "Victor Company of Japan, Ltd.";
case 60: return "Matsushita Electric Industrial Co., Ltd.";
}
break;
case 50:
switch(frm)
{
case 10: return"Vanguard Disc Inc.";
case 20: return"Mitsubishi Chemical Corporation";
case 30: return"CDA Datenträger Albrechts GmbH";
case 10: return "Vanguard Disc Inc.";
case 20: return "Mitsubishi Chemical Corporation";
case 30: return "CDA Datenträger Albrechts GmbH";
}
break;
case 51:
switch(frm)
{
case 10: return"Grand Advance Technology Ltd.";
case 20: return"Infodisc Technology Co. Ltd.";
case 50: return"Hile Optical Disc Technology Corp.";
case 10: return "Grand Advance Technology Ltd.";
case 20: return "Infodisc Technology Co. Ltd.";
case 50: return "Hile Optical Disc Technology Corp.";
}
break;
}
return"";
return "";
}
public struct CDATIP

View File

@@ -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
}
@@ -86,23 +101,23 @@ namespace Aaru.Decoders.CD
if(decoded.DataLength + 2 != CDTextResponse.Length)
{
AaruConsole.DebugWriteLine("CD-TEXT decoder",
"Expected CD-TEXT size ({0} bytes) is not received size ({1} bytes), not decoding",
decoded.DataLength + 2, CDTextResponse.Length);
"Expected CD-TEXT size ({0} bytes) is not received size ({1} bytes), not decoding",
decoded.DataLength + 2, CDTextResponse.Length);
return null;
}
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;

View File

@@ -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
}
}

View File

@@ -69,28 +69,28 @@ namespace Aaru.Decoders.CD
if(decoded.DataLength + 2 != CDFullTOCResponse.Length)
{
AaruConsole.DebugWriteLine("CD full TOC decoder",
"Expected CDFullTOC size ({0} bytes) is not received size ({1} bytes), not decoding",
decoded.DataLength + 2, CDFullTOCResponse.Length);
"Expected CDFullTOC size ({0} bytes) is not received size ({1} bytes), not decoding",
decoded.DataLength + 2, CDFullTOCResponse.Length);
return null;
}
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;
@@ -111,8 +111,8 @@ namespace Aaru.Decoders.CD
sb.AppendFormat("Last complete session number: {0}", response.LastCompleteSession).AppendLine();
foreach(TrackDataDescriptor descriptor in response.TrackDescriptors)
if((descriptor.CONTROL & 0x08) == 0x08 ||
descriptor.ADR != 1 && descriptor.ADR != 5 && descriptor.ADR != 4 && descriptor.ADR != 6 ||
if((descriptor.CONTROL & 0x08) == 0x08 ||
(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");

View File

@@ -61,27 +61,27 @@ namespace Aaru.Decoders.CD
if(decoded.DataLength + 2 != CDPMAResponse.Length)
{
AaruConsole.DebugWriteLine("CD PMA decoder",
"Expected CDPMA size ({0} bytes) is not received size ({1} bytes), not decoding",
decoded.DataLength + 2, CDPMAResponse.Length);
"Expected CDPMA size ({0} bytes) is not received size ({1} bytes), not decoding",
decoded.DataLength + 2, CDPMAResponse.Length);
return null;
}
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;

View File

@@ -61,22 +61,22 @@ namespace Aaru.Decoders.CD
if(decoded.DataLength + 2 != CDSessionInfoResponse.Length)
{
AaruConsole.DebugWriteLine("CD Session Info decoder",
"Expected CDSessionInfo size ({0} bytes) is not received size ({1} bytes), not decoding",
decoded.DataLength + 2, CDSessionInfoResponse.Length);
"Expected CDSessionInfo size ({0} bytes) is not received size ({1} bytes), not decoding",
decoded.DataLength + 2, CDSessionInfoResponse.Length);
return null;
}
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;

View File

@@ -62,22 +62,22 @@ namespace Aaru.Decoders.CD
if(decoded.DataLength + 2 != CDTOCResponse.Length)
{
AaruConsole.DebugWriteLine("CD TOC decoder",
"Expected CDTOC size ({0} bytes) is not received size ({1} bytes), not decoding",
decoded.DataLength + 2, CDTOCResponse.Length);
"Expected CDTOC size ({0} bytes) is not received size ({1} bytes), not decoding",
decoded.DataLength + 2, CDTOCResponse.Length);
return null;
}
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;

View File

@@ -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;

View File

@@ -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
}

View File

@@ -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;

View File

@@ -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 b3 = buffer[51 - 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);
}
}
@@ -306,24 +306,24 @@ namespace Aaru.Decoders.Floppy
};
AaruConsole.DebugWriteLine("Apple ][ GCR Decoder", "Volume {0}",
(((sector.addressField.volume[0] & 0x55) << 1) |
(sector.addressField.volume[1] & 0x55)) & 0xFF);
(((sector.addressField.volume[0] & 0x55) << 1) |
(sector.addressField.volume[1] & 0x55)) & 0xFF);
AaruConsole.DebugWriteLine("Apple ][ GCR Decoder", "Track {0}",
(((sector.addressField.track[0] & 0x55) << 1) |
(sector.addressField.track[1] & 0x55)) & 0xFF);
(((sector.addressField.track[0] & 0x55) << 1) |
(sector.addressField.track[1] & 0x55)) & 0xFF);
AaruConsole.DebugWriteLine("Apple ][ GCR Decoder", "Sector {0}",
(((sector.addressField.sector[0] & 0x55) << 1) |
(sector.addressField.sector[1] & 0x55)) & 0xFF);
(((sector.addressField.sector[0] & 0x55) << 1) |
(sector.addressField.sector[1] & 0x55)) & 0xFF);
AaruConsole.DebugWriteLine("Apple ][ GCR Decoder", "Checksum {0}",
(((sector.addressField.checksum[0] & 0x55) << 1) |
(sector.addressField.checksum[1] & 0x55)) & 0xFF);
(((sector.addressField.checksum[0] & 0x55) << 1) |
(sector.addressField.checksum[1] & 0x55)) & 0xFF);
AaruConsole.DebugWriteLine("Apple ][ GCR Decoder", "Epilogue {0:X2}{1:X2}{2:X2}",
sector.addressField.epilogue[0], sector.addressField.epilogue[1],
sector.addressField.epilogue[2]);
sector.addressField.epilogue[0], sector.addressField.epilogue[1],
sector.addressField.epilogue[2]);
position += 14;
int syncCount = 0;
@@ -351,7 +351,7 @@ namespace Aaru.Decoders.Floppy
sector.dataField = new RawDataField();
AaruConsole.DebugWriteLine("Apple ][ GCR Decoder", "Inner gap has {0} bytes",
sector.innerGap.Length);
sector.innerGap.Length);
AaruConsole.DebugWriteLine("Apple ][ GCR Decoder", "Prologue found at {0}", position);
sector.dataField.prologue = new byte[3];
@@ -377,7 +377,7 @@ namespace Aaru.Decoders.Floppy
sector.dataField.data = gaps.ToArray();
AaruConsole.DebugWriteLine("Apple ][ GCR Decoder", "Data has {0} bytes",
sector.dataField.data.Length);
sector.dataField.data.Length);
sector.dataField.checksum = data[position];
sector.dataField.epilogue = new byte[3];
@@ -519,10 +519,10 @@ namespace Aaru.Decoders.Floppy
}
AaruConsole.DebugWriteLine("Apple ][ GCR Decoder", "Adding sector {0} of track {1}",
(((sector.addressField.sector[0] & 0x55) << 1) |
(sector.addressField.sector[1] & 0x55)) & 0xFF,
(((sector.addressField.track[0] & 0x55) << 1) |
(sector.addressField.track[1] & 0x55)) & 0xFF);
(((sector.addressField.sector[0] & 0x55) << 1) |
(sector.addressField.sector[1] & 0x55)) & 0xFF,
(((sector.addressField.track[0] & 0x55) << 1) |
(sector.addressField.track[1] & 0x55)) & 0xFF);
sectors.Add(sector);
}

View File

@@ -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
}
}

View File

@@ -221,8 +221,8 @@ namespace Aaru.Decoders.MMC
if(response.Length != 512)
return null;
GCHandle handle = GCHandle.Alloc(response, GCHandleType.Pinned);
var csd = (ExtendedCSD)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(ExtendedCSD));
var handle = GCHandle.Alloc(response, GCHandleType.Pinned);
var csd = (ExtendedCSD)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(ExtendedCSD));
handle.Free();
return csd;
@@ -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)

View File

@@ -38,9 +38,9 @@ namespace Aaru.Decoders.MMC
{
switch(mmcVendorId)
{
case 0x15: return"Samsung";
case 0x2C: return"extreMEmory";
default: return$"Unknown manufacturer ID 0x{mmcVendorId:X2}";
case 0x15: return "Samsung";
case 0x2C: return "extreMEmory";
default: return $"Unknown manufacturer ID 0x{mmcVendorId:X2}";
}
}
}

View File

@@ -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
}

View File

@@ -42,321 +42,321 @@ namespace Aaru.Decoders.PCMCIA
switch(id)
{
#region JEDEC
case 0x01: return"AMD";
case 0x02: return"AMI";
case 0x83: return"Fairchild";
case 0x04: return"Fujitsu";
case 0x85: return"GTE";
case 0x86: return"Harris";
case 0x07: return"Hitachi";
case 0x08: return"Inmos";
case 0x89: return"Intel";
case 0x8A: return"I.T.T.";
case 0x0B: return"Intersil";
case 0x8C: return"Monolithic Memories";
case 0x0D: return"Mostek";
case 0x0E: return"Freescale";
case 0x8F: return"National";
case 0x10: return"NEC";
case 0x91: return"RCA";
case 0x92: return"Raytheon";
case 0x13: return"Conexant";
case 0x94: return"Seeq";
case 0x15: return"NXP";
case 0x16: return"Synertek";
case 0x97: return"Texas Instruments";
case 0x98: return"Toshiba";
case 0x19: return"Xicor";
case 0x1A: return"Zilog";
case 0x9B: return"Eurotechnique";
case 0x1C: return"Mitsubishi2";
case 0x9D: return"Lucent";
case 0x9E: return"Exel";
case 0x1F: return"Atmel";
case 0x20: return"SGS/Thomson";
case 0xA1: return"Lattice Semiconductor";
case 0xA2: return"NCR";
case 0x23: return"Wafer Scale Integration";
case 0xA4: return"International Business Machines";
case 0x25: return"Tristar";
case 0x26: return"Visic";
case 0xA7: return"International CMOS Technology";
case 0xA8: return"SSSI";
case 0x29: return"Microchip Technology";
case 0x2A: return"Ricoh";
case 0xAB: return"VLSI";
case 0x2C: return"Micron Technology";
case 0xAD: return"Hynix Semiconductor";
case 0xAE: return"OKI Semiconductor";
case 0x2F: return"ACTEL";
case 0xB0: return"Sharp";
case 0x31: return"Catalyst";
case 0x32: return"Panasonic";
case 0xB3: return"IDT";
case 0x34: return"Cypress";
case 0xB5: return"Digital Equipment Corporation";
case 0xB6: return"LSI Logic";
case 0x37: return"Zarlink";
case 0x38: return"UTMC";
case 0xB9: return"Thinking Machine";
case 0xBA: return"Thomson CSF";
case 0x3B: return"Integrated CMOS";
case 0xBC: return"Honeywell";
case 0x3D: return"Tektronix";
case 0x3E: return"Oracle Corporation";
case 0xBF: return"Silicon Storage Technology";
case 0x40: return"ProMos";
case 0xC1: return"Infineon";
case 0xC2: return"Macronix";
case 0x43: return"Xerox";
case 0xC4: return"Plus Logic";
case 0x45: return"SanDisk Corporation";
case 0x46: return"Elan Circuit Technology";
case 0xC7: return"European Silicon";
case 0xC8: return"Apple";
case 0x49: return"Xilinx";
case 0x4A: return"Compaq";
case 0xCB: return"Protocol Engines";
case 0x4C: return"SCI";
case 0xCD: return"Seiko Instruments";
case 0xCE: return"Samsung";
case 0x4F: return"I3 Design System";
case 0xD0: return"Klic";
case 0x51: return"Crosspoint Solutions";
case 0x52: return"Alliance Semiconductor";
case 0xD3: return"Tandem";
case 0x54: return"Hewlett-Packard";
case 0xD5: return"Integrated Silicon Solutions";
case 0xD6: return"Brooktree";
case 0x57: return"New Media";
case 0x58: return"MHS Electronic";
case 0xD9: return"Performance Semiconductors";
case 0xDA: return"Winbond Electronic";
case 0x5B: return"Kawasaki Steel";
case 0x5D: return"TECMAR";
case 0x5E: return"Exar";
case 0xDF: return"PCMCIA";
case 0xE0: return"LG Semiconductor";
case 0x61: return"Northern Telecom";
case 0x62: return"Sanyo2";
case 0xE3: return"Array Microsystems";
case 0x64: return"Crystal Semiconductor";
case 0xE5: return"Analog Devices";
case 0xE6: return"PMC-Sierra";
case 0x67: return"Asparix";
case 0x68: return"Convex Computer";
case 0xE9: return"Nimbus Technology";
case 0x6B: return"Transwitch";
case 0xEC: return"Micronas";
case 0x6D: return"Canon";
case 0x6E: return"Altera";
case 0xEF: return"NEXCOM";
case 0x70: return"Qualcomm";
case 0xF1: return"Sony";
case 0xF2: return"Cray Research";
case 0x73: return"AMS";
case 0xF4: return"Vitesse";
case 0x75: return"Aster Electronics";
case 0x76: return"Bay Networks";
case 0xF7: return"Zentrum";
case 0xF8: return"TRW";
case 0x79: return"Thesys";
case 0x7A: return"Solbourne Computer";
case 0xFB: return"Allied-Signal";
case 0x7C: return"Dialog Semiconductor";
case 0xFD: return"Media Vision";
case 0xFE: return"Numonyx Corporation";
case 0x7F01: return"Cirrus Logic";
case 0x7F02: return"National Instruments";
case 0x7F04: return"Alcatel Mietec";
case 0x7F07: return"JTAG Technologies";
case 0x7F08: return"Loral";
case 0x7F0B: return"Bestlink Systems";
case 0x7F0D: return"GENNUM";
case 0x7F0E: return"VideoLogic";
case 0x7F10: return"Chip Express";
case 0x7F13: return"TCSI";
case 0x7F15: return"Hughes Aircraft";
case 0x7F16: return"Lanstar Semiconductor";
case 0x7F19: return"Music Semi";
case 0x7F1A: return"Ericsson Components";
case 0x7F1C: return"Eon Silicon Devices";
case 0x7F1F: return"Integ.Memories Tech.";
case 0x7F20: return"Corollary Inc.";
case 0x7F23: return"EIV(Switzerland)";
case 0x7F25: return"Zarlink(formerly Mitel)";
case 0x7F26: return"Clearpoint";
case 0x7F29: return"Vanguard";
case 0x7F2A: return"Hagiwara Sys-Com";
case 0x7F2C: return"Celestica";
case 0x7F2F: return"Rohm Company Ltd.";
case 0x7F31: return"Libit Signal Processing";
case 0x7F32: return"Enhanced Memories Inc.";
case 0x7F34: return"Adaptec Inc.";
case 0x7F37: return"AMIC Technology";
case 0x7F38: return"Adobe Systems";
case 0x7F3B: return"Newport Digital";
case 0x7F3D: return"T Square";
case 0x7F3E: return"Seiko Epson";
case 0x7F40: return"Viking Components";
case 0x7F43: return"Suwa Electronics";
case 0x7F45: return"Micron CMS";
case 0x7F46: return"American Computer &Digital Components Inc";
case 0x7F49: return"CPU Design";
case 0x7F4A: return"Price Point";
case 0x7F4C: return"Tellabs";
case 0x7F4F: return"Transcend Information";
case 0x7F51: return"CKD Corporation Ltd.";
case 0x7F52: return"Capital Instruments, Inc.";
case 0x7F54: return"Linvex Technology";
case 0x7F57: return"Dynamem, Inc.";
case 0x7F58: return"NERA ASA";
case 0x7F5B: return"Acorn Computers";
case 0x7F5D: return"Oak Technology, Inc.";
case 0x7F5E: return"Itec Memory";
case 0x7F61: return"Wintec Industries";
case 0x7F62: return"Super PC Memory";
case 0x7F64: return"Galvantech";
case 0x7F67: return"GateField";
case 0x7F68: return"Integrated Memory System";
case 0x7F6B: return"Goldenram";
case 0x7F6D: return"Cimaron Communications";
case 0x7F6E: return"Nippon Steel Semi.Corp.";
case 0x7F70: return"AMCC";
case 0x7F73: return"Digital Microwave";
case 0x7F75: return"MIMOS Semiconductor";
case 0x7F76: return"Advanced Fibre";
case 0x7F79: return"Acbel Polytech Inc.";
case 0x7F7A: return"Apacer Technology";
case 0x7F7C: return"FOXCONN";
case 0x7F83: return"ILC Data Device";
case 0x7F85: return"Micro Linear";
case 0x7F86: return"Univ.Of NC";
case 0x7F89: return"Nchip";
case 0x7F8A: return"Galileo Tech";
case 0x7F8C: return"Graychip";
case 0x7F8F: return"Robert Bosch";
case 0x7F91: return"DATARAM";
case 0x7F92: return"United Microelec Corp.";
case 0x7F94: return"Smart Modular";
case 0x7F97: return"Qlogic";
case 0x7F98: return"Kingston";
case 0x7F9B: return"SpaSE";
case 0x7F9D: return"Programmable Micro Corp";
case 0x7F9E: return"DoD";
case 0x7FA1: return"Dallas Semiconductor";
case 0x7FA2: return"Omnivision";
case 0x7FA4: return"Novatel Wireless";
case 0x7FA7: return"Cabletron";
case 0x7FA8: return"Silicon Technology";
case 0x7FAB: return"Vantis";
case 0x7FAD: return"Century";
case 0x7FAE: return"Hal Computers";
case 0x7FB0: return"Juniper Networks";
case 0x7FB3: return"Tundra Semiconductor";
case 0x7FB5: return"LightSpeed Semi.";
case 0x7FB6: return"ZSP Corp.";
case 0x7FB9: return"Dynachip";
case 0x7FBA: return"PNY Electronics";
case 0x7FBC: return"MMC Networks";
case 0x7FBF: return"Broadcom";
case 0x7FC1: return"V3 Semiconductor";
case 0x7FC2: return"Flextronics(formerly Orbit)";
case 0x7FC4: return"Transmeta";
case 0x7FC7: return"Enhance 3000 Inc";
case 0x7FC8: return"Tower Semiconductor";
case 0x7FCB: return"Maxim Integrated Product";
case 0x7FCD: return"Centaur Technology";
case 0x7FCE: return"Unigen Corporation";
case 0x7FD0: return"Memory Card Technology";
case 0x7FD3: return"Aica Kogyo, Ltd.";
case 0x7FD5: return"MSC Vertriebs GmbH";
case 0x7FD6: return"AKM Company, Ltd.";
case 0x7FD9: return"GSI Technology";
case 0x7FDA: return"Dane-Elec (C Memory)";
case 0x7FDC: return"Lara Technology";
case 0x7FDF: return"Tanisys Technology";
case 0x7FE0: return"Truevision";
case 0x7FE3: return"MGV Memory";
case 0x7FE5: return"Gadzoox Networks";
case 0x7FE6: return"Multi Dimensional Cons.";
case 0x7FE9: return"Triscend";
case 0x7FEA: return"XaQti";
case 0x7FEC: return"Clear Logic";
case 0x7FEF: return"Advantage Memory";
case 0x7FF1: return"LeCroy";
case 0x7FF2: return"Yamaha Corporation";
case 0x7FF4: return"NetLogic Microsystems";
case 0x7FF7: return"BF Goodrich Data.";
case 0x7FF8: return"Epigram";
case 0x7FFB: return"Admor Memory";
case 0x7FFD: return"Quadratics Superconductor";
case 0x7FFE: return"3COM";
case 0x01: return "AMD";
case 0x02: return "AMI";
case 0x83: return "Fairchild";
case 0x04: return "Fujitsu";
case 0x85: return "GTE";
case 0x86: return "Harris";
case 0x07: return "Hitachi";
case 0x08: return "Inmos";
case 0x89: return "Intel";
case 0x8A: return "I.T.T.";
case 0x0B: return "Intersil";
case 0x8C: return "Monolithic Memories";
case 0x0D: return "Mostek";
case 0x0E: return "Freescale";
case 0x8F: return "National";
case 0x10: return "NEC";
case 0x91: return "RCA";
case 0x92: return "Raytheon";
case 0x13: return "Conexant";
case 0x94: return "Seeq";
case 0x15: return "NXP";
case 0x16: return "Synertek";
case 0x97: return "Texas Instruments";
case 0x98: return "Toshiba";
case 0x19: return "Xicor";
case 0x1A: return "Zilog";
case 0x9B: return "Eurotechnique";
case 0x1C: return "Mitsubishi2";
case 0x9D: return "Lucent";
case 0x9E: return "Exel";
case 0x1F: return "Atmel";
case 0x20: return "SGS/Thomson";
case 0xA1: return "Lattice Semiconductor";
case 0xA2: return "NCR";
case 0x23: return "Wafer Scale Integration";
case 0xA4: return "International Business Machines";
case 0x25: return "Tristar";
case 0x26: return "Visic";
case 0xA7: return "International CMOS Technology";
case 0xA8: return "SSSI";
case 0x29: return "Microchip Technology";
case 0x2A: return "Ricoh";
case 0xAB: return "VLSI";
case 0x2C: return "Micron Technology";
case 0xAD: return "Hynix Semiconductor";
case 0xAE: return "OKI Semiconductor";
case 0x2F: return "ACTEL";
case 0xB0: return "Sharp";
case 0x31: return "Catalyst";
case 0x32: return "Panasonic";
case 0xB3: return "IDT";
case 0x34: return "Cypress";
case 0xB5: return "Digital Equipment Corporation";
case 0xB6: return "LSI Logic";
case 0x37: return "Zarlink";
case 0x38: return "UTMC";
case 0xB9: return "Thinking Machine";
case 0xBA: return "Thomson CSF";
case 0x3B: return "Integrated CMOS";
case 0xBC: return "Honeywell";
case 0x3D: return "Tektronix";
case 0x3E: return "Oracle Corporation";
case 0xBF: return "Silicon Storage Technology";
case 0x40: return "ProMos";
case 0xC1: return "Infineon";
case 0xC2: return "Macronix";
case 0x43: return "Xerox";
case 0xC4: return "Plus Logic";
case 0x45: return "SanDisk Corporation";
case 0x46: return "Elan Circuit Technology";
case 0xC7: return "European Silicon";
case 0xC8: return "Apple";
case 0x49: return "Xilinx";
case 0x4A: return "Compaq";
case 0xCB: return "Protocol Engines";
case 0x4C: return "SCI";
case 0xCD: return "Seiko Instruments";
case 0xCE: return "Samsung";
case 0x4F: return "I3 Design System";
case 0xD0: return "Klic";
case 0x51: return "Crosspoint Solutions";
case 0x52: return "Alliance Semiconductor";
case 0xD3: return "Tandem";
case 0x54: return "Hewlett-Packard";
case 0xD5: return "Integrated Silicon Solutions";
case 0xD6: return "Brooktree";
case 0x57: return "New Media";
case 0x58: return "MHS Electronic";
case 0xD9: return "Performance Semiconductors";
case 0xDA: return "Winbond Electronic";
case 0x5B: return "Kawasaki Steel";
case 0x5D: return "TECMAR";
case 0x5E: return "Exar";
case 0xDF: return "PCMCIA";
case 0xE0: return "LG Semiconductor";
case 0x61: return "Northern Telecom";
case 0x62: return "Sanyo2";
case 0xE3: return "Array Microsystems";
case 0x64: return "Crystal Semiconductor";
case 0xE5: return "Analog Devices";
case 0xE6: return "PMC-Sierra";
case 0x67: return "Asparix";
case 0x68: return "Convex Computer";
case 0xE9: return "Nimbus Technology";
case 0x6B: return "Transwitch";
case 0xEC: return "Micronas";
case 0x6D: return "Canon";
case 0x6E: return "Altera";
case 0xEF: return "NEXCOM";
case 0x70: return "Qualcomm";
case 0xF1: return "Sony";
case 0xF2: return "Cray Research";
case 0x73: return "AMS";
case 0xF4: return "Vitesse";
case 0x75: return "Aster Electronics";
case 0x76: return "Bay Networks";
case 0xF7: return "Zentrum";
case 0xF8: return "TRW";
case 0x79: return "Thesys";
case 0x7A: return "Solbourne Computer";
case 0xFB: return "Allied-Signal";
case 0x7C: return "Dialog Semiconductor";
case 0xFD: return "Media Vision";
case 0xFE: return "Numonyx Corporation";
case 0x7F01: return "Cirrus Logic";
case 0x7F02: return "National Instruments";
case 0x7F04: return "Alcatel Mietec";
case 0x7F07: return "JTAG Technologies";
case 0x7F08: return "Loral";
case 0x7F0B: return "Bestlink Systems";
case 0x7F0D: return "GENNUM";
case 0x7F0E: return "VideoLogic";
case 0x7F10: return "Chip Express";
case 0x7F13: return "TCSI";
case 0x7F15: return "Hughes Aircraft";
case 0x7F16: return "Lanstar Semiconductor";
case 0x7F19: return "Music Semi";
case 0x7F1A: return "Ericsson Components";
case 0x7F1C: return "Eon Silicon Devices";
case 0x7F1F: return "Integ.Memories Tech.";
case 0x7F20: return "Corollary Inc.";
case 0x7F23: return "EIV(Switzerland)";
case 0x7F25: return "Zarlink(formerly Mitel)";
case 0x7F26: return "Clearpoint";
case 0x7F29: return "Vanguard";
case 0x7F2A: return "Hagiwara Sys-Com";
case 0x7F2C: return "Celestica";
case 0x7F2F: return "Rohm Company Ltd.";
case 0x7F31: return "Libit Signal Processing";
case 0x7F32: return "Enhanced Memories Inc.";
case 0x7F34: return "Adaptec Inc.";
case 0x7F37: return "AMIC Technology";
case 0x7F38: return "Adobe Systems";
case 0x7F3B: return "Newport Digital";
case 0x7F3D: return "T Square";
case 0x7F3E: return "Seiko Epson";
case 0x7F40: return "Viking Components";
case 0x7F43: return "Suwa Electronics";
case 0x7F45: return "Micron CMS";
case 0x7F46: return "American Computer &Digital Components Inc";
case 0x7F49: return "CPU Design";
case 0x7F4A: return "Price Point";
case 0x7F4C: return "Tellabs";
case 0x7F4F: return "Transcend Information";
case 0x7F51: return "CKD Corporation Ltd.";
case 0x7F52: return "Capital Instruments, Inc.";
case 0x7F54: return "Linvex Technology";
case 0x7F57: return "Dynamem, Inc.";
case 0x7F58: return "NERA ASA";
case 0x7F5B: return "Acorn Computers";
case 0x7F5D: return "Oak Technology, Inc.";
case 0x7F5E: return "Itec Memory";
case 0x7F61: return "Wintec Industries";
case 0x7F62: return "Super PC Memory";
case 0x7F64: return "Galvantech";
case 0x7F67: return "GateField";
case 0x7F68: return "Integrated Memory System";
case 0x7F6B: return "Goldenram";
case 0x7F6D: return "Cimaron Communications";
case 0x7F6E: return "Nippon Steel Semi.Corp.";
case 0x7F70: return "AMCC";
case 0x7F73: return "Digital Microwave";
case 0x7F75: return "MIMOS Semiconductor";
case 0x7F76: return "Advanced Fibre";
case 0x7F79: return "Acbel Polytech Inc.";
case 0x7F7A: return "Apacer Technology";
case 0x7F7C: return "FOXCONN";
case 0x7F83: return "ILC Data Device";
case 0x7F85: return "Micro Linear";
case 0x7F86: return "Univ.Of NC";
case 0x7F89: return "Nchip";
case 0x7F8A: return "Galileo Tech";
case 0x7F8C: return "Graychip";
case 0x7F8F: return "Robert Bosch";
case 0x7F91: return "DATARAM";
case 0x7F92: return "United Microelec Corp.";
case 0x7F94: return "Smart Modular";
case 0x7F97: return "Qlogic";
case 0x7F98: return "Kingston";
case 0x7F9B: return "SpaSE";
case 0x7F9D: return "Programmable Micro Corp";
case 0x7F9E: return "DoD";
case 0x7FA1: return "Dallas Semiconductor";
case 0x7FA2: return "Omnivision";
case 0x7FA4: return "Novatel Wireless";
case 0x7FA7: return "Cabletron";
case 0x7FA8: return "Silicon Technology";
case 0x7FAB: return "Vantis";
case 0x7FAD: return "Century";
case 0x7FAE: return "Hal Computers";
case 0x7FB0: return "Juniper Networks";
case 0x7FB3: return "Tundra Semiconductor";
case 0x7FB5: return "LightSpeed Semi.";
case 0x7FB6: return "ZSP Corp.";
case 0x7FB9: return "Dynachip";
case 0x7FBA: return "PNY Electronics";
case 0x7FBC: return "MMC Networks";
case 0x7FBF: return "Broadcom";
case 0x7FC1: return "V3 Semiconductor";
case 0x7FC2: return "Flextronics(formerly Orbit)";
case 0x7FC4: return "Transmeta";
case 0x7FC7: return "Enhance 3000 Inc";
case 0x7FC8: return "Tower Semiconductor";
case 0x7FCB: return "Maxim Integrated Product";
case 0x7FCD: return "Centaur Technology";
case 0x7FCE: return "Unigen Corporation";
case 0x7FD0: return "Memory Card Technology";
case 0x7FD3: return "Aica Kogyo, Ltd.";
case 0x7FD5: return "MSC Vertriebs GmbH";
case 0x7FD6: return "AKM Company, Ltd.";
case 0x7FD9: return "GSI Technology";
case 0x7FDA: return "Dane-Elec (C Memory)";
case 0x7FDC: return "Lara Technology";
case 0x7FDF: return "Tanisys Technology";
case 0x7FE0: return "Truevision";
case 0x7FE3: return "MGV Memory";
case 0x7FE5: return "Gadzoox Networks";
case 0x7FE6: return "Multi Dimensional Cons.";
case 0x7FE9: return "Triscend";
case 0x7FEA: return "XaQti";
case 0x7FEC: return "Clear Logic";
case 0x7FEF: return "Advantage Memory";
case 0x7FF1: return "LeCroy";
case 0x7FF2: return "Yamaha Corporation";
case 0x7FF4: return "NetLogic Microsystems";
case 0x7FF7: return "BF Goodrich Data.";
case 0x7FF8: return "Epigram";
case 0x7FFB: return "Admor Memory";
case 0x7FFD: return "Quadratics Superconductor";
case 0x7FFE: return "3COM";
#endregion JEDEC
case 0x0100: return"Digital Equipment Corporation";
case 0x0101: return"3Com Corporation";
case 0x0102: return"Megahertz Corporation";
case 0x0104: return"Socket Communications";
case 0x0105: return"TDK Corporation";
case 0x0108: return"Standard Microsystems Corporation";
case 0x0109: return"Motorola Corporation";
case 0x010b: return"National Instruments";
case 0x0115: return"US Robotics Corporation";
case 0x0121: return"Olicom";
case 0x0126: return"Proxim";
case 0x0128: return"Megahertz Corporation";
case 0x012F: return"Adaptec Corporation";
case 0x0137: return"Quatech";
case 0x0138: return"Compaq";
case 0x0140: return"Ositech";
case 0x0143: return"D-Link";
case 0x0149: return"Netgear";
case 0x014D: return"Simple Technology";
case 0x0156: return"Lucent Technologies";
case 0x015F: return"Aironet Wireless Communications";
case 0x016B: return"Ericsson";
case 0x016C: return"Psion";
case 0x0183: return"Compaq";
case 0x0186: return"Kingston";
case 0x0192: return"Sierra Wireless";
case 0x0194: return"Dayna Corporation";
case 0x01a6: return"Raytheon";
case 0x01BF: return"Belkin";
case 0x01EB: return"Bay Networks";
case 0x0200: return"Farallon Communications";
case 0x021B: return"Telecom Device";
case 0x023D: return"Nokia Communications";
case 0x0250: return"Samsung";
case 0x0264: return"Anycom";
case 0x0268: return"Alvarion Ltd.";
case 0x026C: return"Symbol";
case 0x026F: return"BUFFALO";
case 0x0274: return"The Linksys Group";
case 0x0288: return"NEC Infrontia";
case 0x028A: return"I-O DATA";
case 0x02AA: return"Asustek Computer";
case 0x02AC: return"Siemens";
case 0x02D2: return"Microsoft Corporation";
case 0x02DF: return"AmbiCom Inc";
case 0x0a02: return"BreezeCOM";
case 0x10CD: return"NewMedia";
case 0x1668: return"ACTIONTEC";
case 0x3401: return"Lasat Communications A/S";
case 0x4E01: return"Lexar Media";
case 0x5241: return"Archos";
case 0x890F: return"Dual";
case 0x8A01: return"Compex Corporation";
case 0xC001: return"Contec";
case 0xC00B: return"MACNICA";
case 0xC00C: return"Roland";
case 0xC00F: return"Corega K.K.";
case 0xC012: return"Hagiwara SYS-COM";
case 0xC015: return"RATOC System Inc.";
case 0xC020: return"NextCom K.K.";
case 0xC250: return"EMTAC Technology Corporation";
case 0xD601: return"Elsa";
default: return$"Unknown vendor id 0x{id:X4}";
case 0x0100: return "Digital Equipment Corporation";
case 0x0101: return "3Com Corporation";
case 0x0102: return "Megahertz Corporation";
case 0x0104: return "Socket Communications";
case 0x0105: return "TDK Corporation";
case 0x0108: return "Standard Microsystems Corporation";
case 0x0109: return "Motorola Corporation";
case 0x010b: return "National Instruments";
case 0x0115: return "US Robotics Corporation";
case 0x0121: return "Olicom";
case 0x0126: return "Proxim";
case 0x0128: return "Megahertz Corporation";
case 0x012F: return "Adaptec Corporation";
case 0x0137: return "Quatech";
case 0x0138: return "Compaq";
case 0x0140: return "Ositech";
case 0x0143: return "D-Link";
case 0x0149: return "Netgear";
case 0x014D: return "Simple Technology";
case 0x0156: return "Lucent Technologies";
case 0x015F: return "Aironet Wireless Communications";
case 0x016B: return "Ericsson";
case 0x016C: return "Psion";
case 0x0183: return "Compaq";
case 0x0186: return "Kingston";
case 0x0192: return "Sierra Wireless";
case 0x0194: return "Dayna Corporation";
case 0x01a6: return "Raytheon";
case 0x01BF: return "Belkin";
case 0x01EB: return "Bay Networks";
case 0x0200: return "Farallon Communications";
case 0x021B: return "Telecom Device";
case 0x023D: return "Nokia Communications";
case 0x0250: return "Samsung";
case 0x0264: return "Anycom";
case 0x0268: return "Alvarion Ltd.";
case 0x026C: return "Symbol";
case 0x026F: return "BUFFALO";
case 0x0274: return "The Linksys Group";
case 0x0288: return "NEC Infrontia";
case 0x028A: return "I-O DATA";
case 0x02AA: return "Asustek Computer";
case 0x02AC: return "Siemens";
case 0x02D2: return "Microsoft Corporation";
case 0x02DF: return "AmbiCom Inc";
case 0x0a02: return "BreezeCOM";
case 0x10CD: return "NewMedia";
case 0x1668: return "ACTIONTEC";
case 0x3401: return "Lasat Communications A/S";
case 0x4E01: return "Lexar Media";
case 0x5241: return "Archos";
case 0x890F: return "Dual";
case 0x8A01: return "Compex Corporation";
case 0xC001: return "Contec";
case 0xC00B: return "MACNICA";
case 0xC00C: return "Roland";
case 0xC00F: return "Corega K.K.";
case 0xC012: return "Hagiwara SYS-COM";
case 0xC015: return "RATOC System Inc.";
case 0xC020: return "NextCom K.K.";
case 0xC250: return "EMTAC Technology Corporation";
case 0xD601: return "Elsa";
default: return $"Unknown vendor id 0x{id:X4}";
}
}
}

View File

@@ -252,12 +252,12 @@ namespace Aaru.Decoders.SCSI
{
switch(definition)
{
case ScsiDefinitions.Current: return"";
case ScsiDefinitions.CCS: return"CCS";
case ScsiDefinitions.SCSI1: return"SCSI-1";
case ScsiDefinitions.SCSI2: return"SCSI-2";
case ScsiDefinitions.SCSI3: return"SCSI-3";
default: return$"Unknown definition code {(byte)definition}";
case ScsiDefinitions.Current: return "";
case ScsiDefinitions.CCS: return "CCS";
case ScsiDefinitions.SCSI1: return "SCSI-1";
case ScsiDefinitions.SCSI2: return "SCSI-2";
case ScsiDefinitions.SCSI3: return "SCSI-3";
default: return $"Unknown definition code {(byte)definition}";
}
}

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;
}
@@ -83,7 +83,7 @@ namespace Aaru.Decoders.SCSI.MMC
for(int i = 0; i < response.FormatLayers.Length; i++)
switch(response.FormatLayers[i])
{
case(ushort)FormatLayerTypeCodes.BDLayer:
case (ushort)FormatLayerTypeCodes.BDLayer:
{
sb.AppendFormat("Layer {0} is of type Blu-ray", i).AppendLine();
@@ -96,7 +96,7 @@ namespace Aaru.Decoders.SCSI.MMC
break;
}
case(ushort)FormatLayerTypeCodes.CDLayer:
case (ushort)FormatLayerTypeCodes.CDLayer:
{
sb.AppendFormat("Layer {0} is of type CD", i).AppendLine();
@@ -109,7 +109,7 @@ namespace Aaru.Decoders.SCSI.MMC
break;
}
case(ushort)FormatLayerTypeCodes.DVDLayer:
case (ushort)FormatLayerTypeCodes.DVDLayer:
{
sb.AppendFormat("Layer {0} is of type DVD", i).AppendLine();
@@ -122,7 +122,7 @@ namespace Aaru.Decoders.SCSI.MMC
break;
}
case(ushort)FormatLayerTypeCodes.HDDVDLayer:
case (ushort)FormatLayerTypeCodes.HDDVDLayer:
{
sb.AppendFormat("Layer {0} is of type HD DVD", i).AppendLine();

View File

@@ -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.";

View File

@@ -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);

View File

@@ -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.";

View File

@@ -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
}

View File

@@ -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)

View File

@@ -51,7 +51,7 @@ namespace Aaru.Decoders.SCSI
return
"ECMA-59 & ANSI X3.121-1984: 200 mm Flexible Disk Cartridge using Two-Frequency Recording at 13262 ftprad on Both Sides";
case MediumTypes.ECMA69:
return"ECMA-69: 200 mm Flexible Disk Cartridge using MFM Recording at 13262 ftprad on Both Sides";
return "ECMA-69: 200 mm Flexible Disk Cartridge using MFM Recording at 13262 ftprad on Both Sides";
case MediumTypes.ECMA66:
return
"ECMA-66: 130 mm Flexible Disk Cartridge using Two-Frequency Recording at 7958 ftprad on One Side";
@@ -75,16 +75,16 @@ namespace Aaru.Decoders.SCSI
case MediumTypes.Unspecified_DS:
return "Unspecified double sided flexible disk";
*/
case MediumTypes.X3_73: return"ANSI X3.73-1980: 200 mm, 6631 ftprad, 1,9 Tracks per mm, 1 side";
case MediumTypes.X3_73_DS: return"ANSI X3.73-1980: 200 mm, 6631 ftprad, 1,9 Tracks per mm, 2 sides";
case MediumTypes.X3_82: return"ANSI X3.80-1980: 130 mm, 3979 ftprad, 1,9 Tracks per mm, 1 side";
case MediumTypes.X3_73: return "ANSI X3.73-1980: 200 mm, 6631 ftprad, 1,9 Tracks per mm, 1 side";
case MediumTypes.X3_73_DS: return "ANSI X3.73-1980: 200 mm, 6631 ftprad, 1,9 Tracks per mm, 2 sides";
case MediumTypes.X3_82: return "ANSI X3.80-1980: 130 mm, 3979 ftprad, 1,9 Tracks per mm, 1 side";
case MediumTypes.Type3Floppy:
return"3.5-inch, 135 tpi, 12362 bits/radian, double-sided MFM (aka 1.25Mb)";
case MediumTypes.HDFloppy: return"3.5-inch, 135 tpi, 15916 bits/radian, double-sided MFM (aka 1.44Mb)";
case MediumTypes.ReadOnly: return"a Read-only optical";
case MediumTypes.WORM: return"a Write-once Read-many optical";
case MediumTypes.Erasable: return"a Erasable optical";
case MediumTypes.RO_WORM: return"a combination of read-only and write-once optical";
return "3.5-inch, 135 tpi, 12362 bits/radian, double-sided MFM (aka 1.25Mb)";
case MediumTypes.HDFloppy: return "3.5-inch, 135 tpi, 15916 bits/radian, double-sided MFM (aka 1.44Mb)";
case MediumTypes.ReadOnly: return "a Read-only optical";
case MediumTypes.WORM: return "a Write-once Read-many optical";
case MediumTypes.Erasable: return "a Erasable optical";
case MediumTypes.RO_WORM: return "a combination of read-only and write-once optical";
// These magneto-opticals were never manufactured
/*
@@ -94,9 +94,9 @@ namespace Aaru.Decoders.SCSI
case MediumTypes.WORM_RW:
return "a combination of write-once and erasable optical";
*/
case MediumTypes.DOW: return"a direct-overwrite optical";
case MediumTypes.HiMD: return"a Sony Hi-MD disc";
default: return$"Unknown medium type 0x{(byte)type:X2}";
case MediumTypes.DOW: return "a direct-overwrite optical";
case MediumTypes.HiMD: return "a Sony Hi-MD disc";
default: return $"Unknown medium type 0x{(byte)type:X2}";
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -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);

View File

@@ -38,11 +38,11 @@ namespace Aaru.Decoders.SecureDigital
{
switch(sdVendorId)
{
case 0x02: return"Kingston";
case 0x03: return"Sandisk";
case 0x27: return"CnMemory";
case 0xAA: return"QEMU";
default: return$"Unknown manufacturer ID 0x{sdVendorId:X2}";
case 0x02: return "Kingston";
case 0x03: return "Sandisk";
case 0x27: return "CnMemory";
case 0xAA: return "QEMU";
default: return $"Unknown manufacturer ID 0x{sdVendorId:X2}";
}
}
}

View File

@@ -52,64 +52,64 @@ 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));
Encoding.ASCII.GetString(ipbin.volume_name));
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.system_name = \"{0}\"",
Encoding.ASCII.GetString(ipbin.system_name));
Encoding.ASCII.GetString(ipbin.system_name));
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.volume_version = \"{0:X}\"",
ipbin.volume_version);
ipbin.volume_version);
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.volume_type = 0x{0:X8}",
ipbin.volume_type);
ipbin.volume_type);
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.system_version = 0x{0:X8}",
ipbin.system_version);
ipbin.system_version);
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.ip_address = 0x{0:X8}", ipbin.ip_address);
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.ip_loadsize = {0}", ipbin.ip_loadsize);
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.ip_entry_address = 0x{0:X8}",
ipbin.ip_entry_address);
ipbin.ip_entry_address);
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.ip_work_ram_size = {0}",
ipbin.ip_work_ram_size);
ipbin.ip_work_ram_size);
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.sp_address = 0x{0:X8}", ipbin.sp_address);
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.sp_loadsize = {0}", ipbin.sp_loadsize);
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.sp_entry_address = 0x{0:X8}",
ipbin.sp_entry_address);
ipbin.sp_entry_address);
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.sp_work_ram_size = {0}",
ipbin.sp_work_ram_size);
ipbin.sp_work_ram_size);
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.release_date = \"{0}\"",
Encoding.ASCII.GetString(ipbin.release_date));
Encoding.ASCII.GetString(ipbin.release_date));
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.release_date2 = \"{0}\"",
Encoding.ASCII.GetString(ipbin.release_date2));
Encoding.ASCII.GetString(ipbin.release_date2));
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.developer_code = \"{0}\"",
Encoding.ASCII.GetString(ipbin.developer_code));
Encoding.ASCII.GetString(ipbin.developer_code));
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.domestic_title = \"{0}\"",
Encoding.ASCII.GetString(ipbin.domestic_title));
Encoding.ASCII.GetString(ipbin.domestic_title));
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.overseas_title = \"{0}\"",
Encoding.ASCII.GetString(ipbin.overseas_title));
Encoding.ASCII.GetString(ipbin.overseas_title));
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.product_code = \"{0}\"",
Encoding.ASCII.GetString(ipbin.product_code));
Encoding.ASCII.GetString(ipbin.product_code));
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.peripherals = \"{0}\"",
Encoding.ASCII.GetString(ipbin.peripherals));
Encoding.ASCII.GetString(ipbin.peripherals));
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.region_codes = \"{0}\"",
Encoding.ASCII.GetString(ipbin.region_codes));
Encoding.ASCII.GetString(ipbin.region_codes));
string id = Encoding.ASCII.GetString(ipbin.SegaHardwareID);
@@ -213,51 +213,51 @@ namespace Aaru.Decoders.Sega
foreach(byte peripheral in ipbin.peripherals)
switch((char)peripheral)
{
case'A':
case 'A':
IPBinInformation.AppendLine("Game supports analog controller.");
break;
case'B':
case 'B':
IPBinInformation.AppendLine("Game supports trackball.");
break;
case'G':
case 'G':
IPBinInformation.AppendLine("Game supports light gun.");
break;
case'J':
case 'J':
IPBinInformation.AppendLine("Game supports JoyPad.");
break;
case'K':
case 'K':
IPBinInformation.AppendLine("Game supports keyboard.");
break;
case'M':
case 'M':
IPBinInformation.AppendLine("Game supports mouse.");
break;
case'O':
case 'O':
IPBinInformation.AppendLine("Game supports Master System's JoyPad.");
break;
case'P':
case 'P':
IPBinInformation.AppendLine("Game supports printer interface.");
break;
case'R':
case 'R':
IPBinInformation.AppendLine("Game supports serial (RS-232C) interface.");
break;
case'T':
case 'T':
IPBinInformation.AppendLine("Game supports tablet interface.");
break;
case'V':
case 'V':
IPBinInformation.AppendLine("Game supports paddle controller.");
break;
case' ': break;
case ' ': break;
default:
IPBinInformation.AppendFormat("Game supports unknown peripheral {0}.", peripheral).AppendLine();
@@ -269,19 +269,19 @@ namespace Aaru.Decoders.Sega
foreach(byte region in ipbin.region_codes)
switch((char)region)
{
case'J':
case 'J':
IPBinInformation.AppendLine("Japanese NTSC.");
break;
case'U':
case 'U':
IPBinInformation.AppendLine("USA NTSC.");
break;
case'E':
case 'E':
IPBinInformation.AppendLine("Europe PAL.");
break;
case' ': break;
case ' ': break;
default:
IPBinInformation.AppendFormat("Game supports unknown region {0}.", region).AppendLine();

View File

@@ -52,54 +52,55 @@ 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));
Encoding.ASCII.GetString(ipbin.maker_id));
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.spare_space1 = \"{0}\"",
(char)ipbin.spare_space1);
(char)ipbin.spare_space1);
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.dreamcast_media = \"{0}\"",
Encoding.ASCII.GetString(ipbin.dreamcast_media));
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);
(char)ipbin.disc_no_separator);
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.disc_total_nos = \"{0}\"",
(char)ipbin.disc_total_nos);
(char)ipbin.disc_total_nos);
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.spare_space2 = \"{0}\"",
Encoding.ASCII.GetString(ipbin.spare_space2));
Encoding.ASCII.GetString(ipbin.spare_space2));
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.region_codes = \"{0}\"",
Encoding.ASCII.GetString(ipbin.region_codes));
Encoding.ASCII.GetString(ipbin.region_codes));
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.peripherals = \"{0}\"",
Encoding.ASCII.GetString(ipbin.peripherals));
Encoding.ASCII.GetString(ipbin.peripherals));
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.product_no = \"{0}\"",
Encoding.ASCII.GetString(ipbin.product_no));
Encoding.ASCII.GetString(ipbin.product_no));
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.product_version = \"{0}\"",
Encoding.ASCII.GetString(ipbin.product_version));
Encoding.ASCII.GetString(ipbin.product_version));
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.release_date = \"{0}\"",
Encoding.ASCII.GetString(ipbin.release_date));
Encoding.ASCII.GetString(ipbin.release_date));
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.spare_space3 = \"{0}\"",
(char)ipbin.spare_space3);
(char)ipbin.spare_space3);
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.boot_filename = \"{0}\"",
Encoding.ASCII.GetString(ipbin.boot_filename));
Encoding.ASCII.GetString(ipbin.boot_filename));
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.producer = \"{0}\"",
Encoding.ASCII.GetString(ipbin.producer));
Encoding.ASCII.GetString(ipbin.producer));
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.product_name = \"{0}\"",
Encoding.ASCII.GetString(ipbin.product_name));
Encoding.ASCII.GetString(ipbin.product_name));
return Encoding.ASCII.GetString(ipbin.SegaHardwareID) == "SEGA SEGAKATANA " ? ipbin : (IPBin?)null;
}
@@ -141,11 +142,11 @@ namespace Aaru.Decoders.Sega
switch(Encoding.ASCII.GetString(ipbin.boot_filename))
{
case"1ST_READ.BIN":
case "1ST_READ.BIN":
IPBinInformation.AppendLine("Disc boots natively.");
break;
case"0WINCE.BIN ":
case "0WINCE.BIN ":
IPBinInformation.AppendLine("Disc boots using Windows CE.");
break;
@@ -161,19 +162,19 @@ namespace Aaru.Decoders.Sega
foreach(byte region in ipbin.region_codes)
switch((char)region)
{
case'J':
case 'J':
IPBinInformation.AppendLine("Japanese NTSC.");
break;
case'U':
case 'U':
IPBinInformation.AppendLine("North America NTSC.");
break;
case'E':
case 'E':
IPBinInformation.AppendLine("Europe PAL.");
break;
case' ': break;
case ' ': break;
default:
IPBinInformation.AppendFormat("Game supports unknown region {0}.", region).AppendLine();

View File

@@ -52,45 +52,45 @@ 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));
Encoding.ASCII.GetString(ipbin.maker_id));
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.product_no = \"{0}\"",
Encoding.ASCII.GetString(ipbin.product_no));
Encoding.ASCII.GetString(ipbin.product_no));
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.product_version = \"{0}\"",
Encoding.ASCII.GetString(ipbin.product_version));
Encoding.ASCII.GetString(ipbin.product_version));
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.release_datedate = \"{0}\"",
Encoding.ASCII.GetString(ipbin.release_date));
Encoding.ASCII.GetString(ipbin.release_date));
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.saturn_media = \"{0}\"",
Encoding.ASCII.GetString(ipbin.saturn_media));
Encoding.ASCII.GetString(ipbin.saturn_media));
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.disc_no = {0}", (char)ipbin.disc_no);
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.disc_no_separator = \"{0}\"",
(char)ipbin.disc_no_separator);
(char)ipbin.disc_no_separator);
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.disc_total_nos = {0}",
(char)ipbin.disc_total_nos);
(char)ipbin.disc_total_nos);
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.release_date = \"{0}\"",
Encoding.ASCII.GetString(ipbin.release_date));
Encoding.ASCII.GetString(ipbin.release_date));
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.spare_space1 = \"{0}\"",
Encoding.ASCII.GetString(ipbin.spare_space1));
Encoding.ASCII.GetString(ipbin.spare_space1));
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.region_codes = \"{0}\"",
Encoding.ASCII.GetString(ipbin.region_codes));
Encoding.ASCII.GetString(ipbin.region_codes));
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.peripherals = \"{0}\"",
Encoding.ASCII.GetString(ipbin.peripherals));
Encoding.ASCII.GetString(ipbin.peripherals));
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.product_name = \"{0}\"",
Encoding.ASCII.GetString(ipbin.product_name));
Encoding.ASCII.GetString(ipbin.product_name));
return Encoding.ASCII.GetString(ipbin.SegaHardwareID) == "SEGA SEGASATURN " ? ipbin : (IPBin?)null;
}
@@ -132,31 +132,31 @@ namespace Aaru.Decoders.Sega
foreach(byte peripheral in ipbin.peripherals)
switch((char)peripheral)
{
case'A':
case 'A':
IPBinInformation.AppendLine("Game supports analog controller.");
break;
case'J':
case 'J':
IPBinInformation.AppendLine("Game supports JoyPad.");
break;
case'K':
case 'K':
IPBinInformation.AppendLine("Game supports keyboard.");
break;
case'M':
case 'M':
IPBinInformation.AppendLine("Game supports mouse.");
break;
case'S':
case 'S':
IPBinInformation.AppendLine("Game supports analog steering controller.");
break;
case'T':
case 'T':
IPBinInformation.AppendLine("Game supports multitap.");
break;
case' ': break;
case ' ': break;
default:
IPBinInformation.AppendFormat("Game supports unknown peripheral {0}.", peripheral).AppendLine();
@@ -168,23 +168,23 @@ namespace Aaru.Decoders.Sega
foreach(byte region in ipbin.region_codes)
switch((char)region)
{
case'J':
case 'J':
IPBinInformation.AppendLine("Japanese NTSC.");
break;
case'U':
case 'U':
IPBinInformation.AppendLine("North America NTSC.");
break;
case'E':
case 'E':
IPBinInformation.AppendLine("Europe PAL.");
break;
case'T':
case 'T':
IPBinInformation.AppendLine("Asia NTSC.");
break;
case' ': break;
case ' ': break;
default:
IPBinInformation.AppendFormat("Game supports unknown region {0}.", region).AppendLine();

View File

@@ -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;