REFACTOR: Final cleanup of DiscImageChef.Decoders.

This commit is contained in:
2017-12-23 18:31:38 +00:00
parent 60ed13e9b3
commit 354e31d149
100 changed files with 4791 additions and 4707 deletions

View File

@@ -31,6 +31,7 @@
// ****************************************************************************/
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;
using System.Text;
@@ -252,7 +253,7 @@ namespace DiscImageChef.Decoders.ATA
public byte MultipleSectorNumber;
/// <summary>
/// Word 59 bits 15 to 8
/// Indicates if <see cref="MultipleSectorNumber"/> is valid
/// Indicates if <see cref="MultipleSectorNumber" /> is valid
/// </summary>
public CapabilitiesBit3 Capabilities3;
/// <summary>
@@ -1888,10 +1889,8 @@ namespace DiscImageChef.Decoders.ATA
IdentifyDevice ATAID = IdentifyDeviceResponse.Value;
if(ATAID.GeneralConfiguration.HasFlag(GeneralConfigurationBit.NonMagnetic))
if((ushort)ATAID.GeneralConfiguration != 0x848A)
atapi = true;
else
cfa = true;
if((ushort)ATAID.GeneralConfiguration != 0x848A) atapi = true;
else cfa = true;
if(atapi) sb.AppendLine("ATAPI device");
else if(cfa) sb.AppendLine("CompactFlash device");
@@ -1914,7 +1913,8 @@ namespace DiscImageChef.Decoders.ATA
if(ATAID.MediaSerial != "") sb.AppendFormat("Media serial #: {0}", ATAID.MediaSerial).AppendLine();
}
if(ATAID.EnabledCommandSet3.HasFlag(CommandSetBit3.WWN)) sb.AppendFormat("World Wide Name: {0:X16}", ATAID.WWN).AppendLine();
if(ATAID.EnabledCommandSet3.HasFlag(CommandSetBit3.WWN))
sb.AppendFormat("World Wide Name: {0:X16}", ATAID.WWN).AppendLine();
}
bool ata1 = false,
@@ -2381,10 +2381,7 @@ namespace DiscImageChef.Decoders.ATA
else logicalsectorsize = 512;
if((ATAID.PhysLogSectorSize & 0x2000) == 0x2000)
{
physicalsectorsize =
logicalsectorsize * (uint)Math.Pow(2, ATAID.PhysLogSectorSize & 0xF);
}
physicalsectorsize = logicalsectorsize * (uint)Math.Pow(2, ATAID.PhysLogSectorSize & 0xF);
else physicalsectorsize = logicalsectorsize;
}
else
@@ -2422,9 +2419,11 @@ namespace DiscImageChef.Decoders.ATA
ATAID.Cylinders * ATAID.Heads * ATAID.SectorsPerTrack).AppendLine();
}
if(ATAID.Capabilities.HasFlag(CapabilitiesBit.LBASupport)) sb.AppendFormat("{0} sectors in 28-bit LBA mode", ATAID.LBASectors).AppendLine();
if(ATAID.Capabilities.HasFlag(CapabilitiesBit.LBASupport))
sb.AppendFormat("{0} sectors in 28-bit LBA mode", ATAID.LBASectors).AppendLine();
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.LBA48)) sb.AppendFormat("{0} sectors in 48-bit LBA mode", ATAID.LBA48Sectors).AppendLine();
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.LBA48))
sb.AppendFormat("{0} sectors in 48-bit LBA mode", ATAID.LBA48Sectors).AppendLine();
if(minatalevel <= 5)
if(ATAID.CurrentSectors > 0)
@@ -2533,8 +2532,8 @@ namespace DiscImageChef.Decoders.ATA
switch(ATAID.BufferType)
{
case 1:
sb.AppendFormat("{0} KiB of single ported single sector buffer",
ATAID.BufferSize * 512 / 1024).AppendLine();
sb.AppendFormat("{0} KiB of single ported single sector buffer", ATAID.BufferSize * 512 / 1024)
.AppendLine();
break;
case 2:
sb.AppendFormat("{0} KiB of dual ported multi sector buffer", ATAID.BufferSize * 512 / 1024)
@@ -2758,7 +2757,8 @@ namespace DiscImageChef.Decoders.ATA
.AppendFormat("At minimum {0} ns. transfer cycle time per word in PIO, " + "with IORDY flow control",
ATAID.MinPIOCycleTimeFlow);
if(ATAID.MaxQueueDepth != 0) sb.AppendLine().AppendFormat("{0} depth of queue maximum", ATAID.MaxQueueDepth + 1);
if(ATAID.MaxQueueDepth != 0)
sb.AppendLine().AppendFormat("{0} depth of queue maximum", ATAID.MaxQueueDepth + 1);
if(atapi)
{
@@ -2775,19 +2775,28 @@ namespace DiscImageChef.Decoders.ATA
{
if(!ATAID.SATACapabilities.HasFlag(SATACapabilitiesBit.Clear))
{
if(ATAID.SATACapabilities.HasFlag(SATACapabilitiesBit.Gen1Speed)) sb.AppendLine().Append("SATA 1.5Gb/s is supported");
if(ATAID.SATACapabilities.HasFlag(SATACapabilitiesBit.Gen2Speed)) sb.AppendLine().Append("SATA 3.0Gb/s is supported");
if(ATAID.SATACapabilities.HasFlag(SATACapabilitiesBit.Gen3Speed)) sb.AppendLine().Append("SATA 6.0Gb/s is supported");
if(ATAID.SATACapabilities.HasFlag(SATACapabilitiesBit.PowerReceipt)) sb.AppendLine().Append("Receipt of host initiated power management requests is supported");
if(ATAID.SATACapabilities.HasFlag(SATACapabilitiesBit.PHYEventCounter)) sb.AppendLine().Append("PHY Event counters are supported");
if(ATAID.SATACapabilities.HasFlag(SATACapabilitiesBit.HostSlumbTrans)) sb.AppendLine().Append("Supports host automatic partial to slumber transitions is supported");
if(ATAID.SATACapabilities.HasFlag(SATACapabilitiesBit.DevSlumbTrans)) sb.AppendLine().Append("Supports device automatic partial to slumber transitions is supported");
if(ATAID.SATACapabilities.HasFlag(SATACapabilitiesBit.Gen1Speed))
sb.AppendLine().Append("SATA 1.5Gb/s is supported");
if(ATAID.SATACapabilities.HasFlag(SATACapabilitiesBit.Gen2Speed))
sb.AppendLine().Append("SATA 3.0Gb/s is supported");
if(ATAID.SATACapabilities.HasFlag(SATACapabilitiesBit.Gen3Speed))
sb.AppendLine().Append("SATA 6.0Gb/s is supported");
if(ATAID.SATACapabilities.HasFlag(SATACapabilitiesBit.PowerReceipt))
sb.AppendLine().Append("Receipt of host initiated power management requests is supported");
if(ATAID.SATACapabilities.HasFlag(SATACapabilitiesBit.PHYEventCounter))
sb.AppendLine().Append("PHY Event counters are supported");
if(ATAID.SATACapabilities.HasFlag(SATACapabilitiesBit.HostSlumbTrans))
sb.AppendLine().Append("Supports host automatic partial to slumber transitions is supported");
if(ATAID.SATACapabilities.HasFlag(SATACapabilitiesBit.DevSlumbTrans))
sb.AppendLine().Append("Supports device automatic partial to slumber transitions is supported");
if(ATAID.SATACapabilities.HasFlag(SATACapabilitiesBit.NCQ))
{
sb.AppendLine().Append("NCQ is supported");
if(ATAID.SATACapabilities.HasFlag(SATACapabilitiesBit.NCQPriority)) sb.AppendLine().Append("NCQ priority is supported");
if(ATAID.SATACapabilities.HasFlag(SATACapabilitiesBit.UnloadNCQ)) sb.AppendLine().Append("Unload is supported with outstanding NCQ commands");
if(ATAID.SATACapabilities.HasFlag(SATACapabilitiesBit.NCQPriority))
sb.AppendLine().Append("NCQ priority is supported");
if(ATAID.SATACapabilities.HasFlag(SATACapabilitiesBit.UnloadNCQ))
sb.AppendLine().Append("Unload is supported with outstanding NCQ commands");
}
}
@@ -2796,14 +2805,18 @@ namespace DiscImageChef.Decoders.ATA
if(!ATAID.SATACapabilities.HasFlag(SATACapabilitiesBit.Clear) &&
ATAID.SATACapabilities.HasFlag(SATACapabilitiesBit.NCQ))
{
if(ATAID.SATACapabilities2.HasFlag(SATACapabilitiesBit2.NCQMgmt)) sb.AppendLine().Append("NCQ queue management is supported");
if(ATAID.SATACapabilities2.HasFlag(SATACapabilitiesBit2.NCQStream)) sb.AppendLine().Append("NCQ streaming is supported");
if(ATAID.SATACapabilities2.HasFlag(SATACapabilitiesBit2.NCQMgmt))
sb.AppendLine().Append("NCQ queue management is supported");
if(ATAID.SATACapabilities2.HasFlag(SATACapabilitiesBit2.NCQStream))
sb.AppendLine().Append("NCQ streaming is supported");
}
if(atapi)
{
if(ATAID.SATACapabilities2.HasFlag(SATACapabilitiesBit2.HostEnvDetect)) sb.AppendLine().Append("ATAPI device supports host environment detection");
if(ATAID.SATACapabilities2.HasFlag(SATACapabilitiesBit2.DevAttSlimline)) sb.AppendLine().Append("ATAPI device supports attention on slimline connected devices");
if(ATAID.SATACapabilities2.HasFlag(SATACapabilitiesBit2.HostEnvDetect))
sb.AppendLine().Append("ATAPI device supports host environment detection");
if(ATAID.SATACapabilities2.HasFlag(SATACapabilitiesBit2.DevAttSlimline))
sb.AppendLine().Append("ATAPI device supports attention on slimline connected devices");
}
//sb.AppendFormat("Negotiated speed = {0}", ((ushort)ATAID.SATACapabilities2 & 0x000E) >> 1);
@@ -2967,7 +2980,8 @@ namespace DiscImageChef.Decoders.ATA
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.AddressOffsetReservedAreaBoot))
sb.Append(" and enabled");
}
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.SetFeaturesRequired)) sb.AppendLine().Append("SET FEATURES is required before spin-up");
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.SetFeaturesRequired))
sb.AppendLine().Append("SET FEATURES is required before spin-up");
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.PowerUpInStandby))
{
sb.AppendLine().Append("Power-up in standby is supported");
@@ -2982,7 +2996,8 @@ namespace DiscImageChef.Decoders.ATA
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.APM))
{
sb.AppendLine().Append("Advanced Power Management is supported");
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.APM)) sb.AppendFormat(" and enabled with value {0}", ATAID.CurrentAPM);
if(ATAID.EnabledCommandSet2.HasFlag(CommandSetBit2.APM))
sb.AppendFormat(" and enabled with value {0}", ATAID.CurrentAPM);
}
if(ATAID.CommandSet2.HasFlag(CommandSetBit2.CompactFlash))
{
@@ -3028,9 +3043,12 @@ namespace DiscImageChef.Decoders.ATA
sb.AppendLine().Append("IDLE IMMEDIATE with UNLOAD FEATURE is supported");
if(ATAID.EnabledCommandSet3.HasFlag(CommandSetBit3.IdleImmediate)) sb.Append(" and enabled");
}
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.WriteURG)) sb.AppendLine().Append("URG bit is supported in WRITE STREAM DMA EXT and WRITE STREAM EXT");
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.ReadURG)) sb.AppendLine().Append("URG bit is supported in READ STREAM DMA EXT and READ STREAM EXT");
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.WWN)) sb.AppendLine().Append("Device has a World Wide Name");
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.WriteURG))
sb.AppendLine().Append("URG bit is supported in WRITE STREAM DMA EXT and WRITE STREAM EXT");
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.ReadURG))
sb.AppendLine().Append("URG bit is supported in READ STREAM DMA EXT and READ STREAM EXT");
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.WWN))
sb.AppendLine().Append("Device has a World Wide Name");
if(ATAID.CommandSet3.HasFlag(CommandSetBit3.FUAWriteQ))
{
sb.AppendLine().Append("WRITE DMA QUEUED FUA EXT is supported");
@@ -3132,23 +3150,33 @@ namespace DiscImageChef.Decoders.ATA
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.DeviceConfDMA))
sb.AppendLine()
.Append("DEVICE CONFIGURATION IDENTIFY DMA and DEVICE CONFIGURATION SET DMA are supported");
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.ReadBufferDMA)) sb.AppendLine().Append("READ BUFFER DMA is supported");
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.WriteBufferDMA)) sb.AppendLine().Append("WRITE BUFFER DMA is supported");
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.DownloadMicroCodeDMA)) sb.AppendLine().Append("DOWNLOAD MICROCODE DMA is supported");
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.SetMaxDMA)) sb.AppendLine().Append("SET PASSWORD DMA and SET UNLOCK DMA are supported");
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.Ata28)) sb.AppendLine().Append("Not all 28-bit commands are supported");
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.ReadBufferDMA))
sb.AppendLine().Append("READ BUFFER DMA is supported");
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.WriteBufferDMA))
sb.AppendLine().Append("WRITE BUFFER DMA is supported");
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.DownloadMicroCodeDMA))
sb.AppendLine().Append("DOWNLOAD MICROCODE DMA is supported");
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.SetMaxDMA))
sb.AppendLine().Append("SET PASSWORD DMA and SET UNLOCK DMA are supported");
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.Ata28))
sb.AppendLine().Append("Not all 28-bit commands are supported");
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.CFast)) sb.AppendLine().Append("Device follows CFast specification");
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.CFast))
sb.AppendLine().Append("Device follows CFast specification");
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.IEEE1667)) sb.AppendLine().Append("Device follows IEEE-1667");
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.DeterministicTrim))
{
sb.AppendLine().Append("Read after TRIM is deterministic");
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.ReadZeroTrim)) sb.AppendLine().Append("Read after TRIM returns empty data");
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.ReadZeroTrim))
sb.AppendLine().Append("Read after TRIM returns empty data");
}
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.LongPhysSectorAligError)) sb.AppendLine().Append("Device supports Long Physical Sector Alignment Error Reporting Control");
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.Encrypted)) sb.AppendLine().Append("Device encrypts all user data");
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.AllCacheNV)) sb.AppendLine().Append("Device's write cache is non-volatile");
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.LongPhysSectorAligError))
sb.AppendLine().Append("Device supports Long Physical Sector Alignment Error Reporting Control");
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.Encrypted))
sb.AppendLine().Append("Device encrypts all user data");
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.AllCacheNV))
sb.AppendLine().Append("Device's write cache is non-volatile");
if(ATAID.CommandSet5.HasFlag(CommandSetBit5.ZonedBit0) ||
ATAID.CommandSet5.HasFlag(CommandSetBit5.ZonedBit1)) sb.AppendLine().Append("Device is zoned");
@@ -3223,13 +3251,17 @@ namespace DiscImageChef.Decoders.ATA
if(ATAID.EnabledSATAFeatures.HasFlag(SATAFeaturesBit.SettingsPreserve))
sb.Append(" and enabled");
}
if(ATAID.SATAFeatures.HasFlag(SATAFeaturesBit.NCQAutoSense)) sb.AppendLine().Append("NCQ Autosense is supported");
if(ATAID.EnabledSATAFeatures.HasFlag(SATAFeaturesBit.EnabledSlumber)) sb.AppendLine().Append("Automatic Partial to Slumber transitions are enabled");
if(ATAID.SATAFeatures.HasFlag(SATAFeaturesBit.NCQAutoSense))
sb.AppendLine().Append("NCQ Autosense is supported");
if(ATAID.EnabledSATAFeatures.HasFlag(SATAFeaturesBit.EnabledSlumber))
sb.AppendLine().Append("Automatic Partial to Slumber transitions are enabled");
}
}
if((ATAID.RemovableStatusSet & 0x03) > 0) sb.AppendLine().Append("Removable Media Status Notification feature set is supported");
if((ATAID.RemovableStatusSet & 0x03) > 0)
sb.AppendLine().Append("Removable Media Status Notification feature set is supported");
if(ATAID.FreeFallSensitivity != 0x00 && ATAID.FreeFallSensitivity != 0xFF) sb.AppendLine().AppendFormat("Free-fall sensitivity set to {0}", ATAID.FreeFallSensitivity);
if(ATAID.FreeFallSensitivity != 0x00 && ATAID.FreeFallSensitivity != 0xFF)
sb.AppendLine().AppendFormat("Free-fall sensitivity set to {0}", ATAID.FreeFallSensitivity);
if(ATAID.DataSetMgmt.HasFlag(DataSetMgmtBit.Trim)) sb.AppendLine().Append("TRIM is supported");
if(ATAID.DataSetMgmtSize > 0)
@@ -3386,7 +3418,7 @@ namespace DiscImageChef.Decoders.ATA
return BitConverter.ToUInt64(qword, 0);
}
static string DescrambleATAString(byte[] buffer, int offset, int length)
static string DescrambleATAString(IList<byte> buffer, int offset, int length)
{
byte[] outbuf = buffer[offset + length - 1] != 0x00 ? new byte[length + 1] : new byte[length];

View File

@@ -434,11 +434,9 @@ namespace DiscImageChef.Decoders.CD
if(response.DiscType) sb.AppendLine("Disc uses phase change");
else
{
sb.AppendLine(type < 5
? "Disc uses long strategy type dye (Cyanine, AZO, etc...)"
: "Disc uses short strategy type dye (Phthalocyanine, etc...)");
}
string manufacturer = ManufacturerFromATIP(response.LeadInStartSec, frm);
@@ -458,7 +456,8 @@ namespace DiscImageChef.Decoders.CD
switch(sec)
{
case 15:
switch(frm) {
switch(frm)
{
case 00: return "TDK Corporation";
case 10: return "Ritek Co.";
case 20: return "Mitsubishi Chemical Corporation";
@@ -467,7 +466,8 @@ namespace DiscImageChef.Decoders.CD
break;
case 16:
switch(frm) {
switch(frm)
{
case 20: return "Shenzen SG&Gast Digital Optical Discs";
case 30: return "Grand Advance Technology Ltd.";
}
@@ -478,7 +478,8 @@ namespace DiscImageChef.Decoders.CD
break;
case 18:
switch(frm) {
switch(frm)
{
case 10: return "Wealth Fair Investment Ltd.";
case 60: return "Taroko International Co. Ltd.";
}
@@ -489,7 +490,8 @@ namespace DiscImageChef.Decoders.CD
break;
case 21:
switch(frm) {
switch(frm)
{
case 10: return "Grupo Condor S.L.";
case 30: return "Bestdisc Technology Corporation";
case 40: return "Optical Disc Manufacturing Equipment";
@@ -498,7 +500,8 @@ namespace DiscImageChef.Decoders.CD
break;
case 22:
switch(frm) {
switch(frm)
{
case 00: return "Woongjin Media Corp.";
case 10: return "Seantram Technology Inc.";
case 20: return "Advanced Digital Media";
@@ -510,7 +513,8 @@ namespace DiscImageChef.Decoders.CD
break;
case 23:
switch(frm) {
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.";
@@ -522,7 +526,8 @@ namespace DiscImageChef.Decoders.CD
break;
case 24:
switch(frm) {
switch(frm)
{
case 00: return "Taiyo Yuden Company Ltd.";
case 10: return "SONY Corporation";
case 20: return "Computer Support Italy s.r.l.";
@@ -534,7 +539,8 @@ namespace DiscImageChef.Decoders.CD
break;
case 25:
switch(frm) {
switch(frm)
{
case 00: return "MPO";
case 20: return "Hitachi Maxell, Ltd.";
case 30: return "Infodisc Technology Co. Ltd.";
@@ -545,7 +551,8 @@ namespace DiscImageChef.Decoders.CD
break;
case 26:
switch(frm) {
switch(frm)
{
case 00: return "Fornet International Pte Ltd.";
case 10: return "POSTECH Corporation";
case 20: return "SKC Co., Ltd.";
@@ -557,7 +564,8 @@ namespace DiscImageChef.Decoders.CD
break;
case 27:
switch(frm) {
switch(frm)
{
case 00: return "Digital Storage Technology Co., Ltd.";
case 10: return "Plasmon Data systems Ltd.";
case 20: return "Princo Corporation";
@@ -569,7 +577,8 @@ namespace DiscImageChef.Decoders.CD
break;
case 28:
switch(frm) {
switch(frm)
{
case 00: return "Opti.Me.S. S.p.A.";
case 10: return "Gigastore Corporation";
case 20: return "Multi Media Masters & Machinary SA";
@@ -581,7 +590,8 @@ namespace DiscImageChef.Decoders.CD
break;
case 29:
switch(frm) {
switch(frm)
{
case 00: return "Taeil Media Co., Ltd.";
case 10: return "Vanguard Disc Inc.";
case 20: return "Unidisc Technology Co., Ltd.";
@@ -596,14 +606,16 @@ namespace DiscImageChef.Decoders.CD
break;
case 31:
switch(frm) {
switch(frm)
{
case 00: return "Ritek Co.";
case 30: return "Grand Advance Technology Ltd.";
}
break;
case 32:
switch(frm) {
switch(frm)
{
case 00: return "TDK Corporation";
case 10: return "Prodisc Technology Inc.";
}
@@ -618,7 +630,8 @@ namespace DiscImageChef.Decoders.CD
break;
case 45:
switch(frm) {
switch(frm)
{
case 00: return "Fornet International Pte Ltd.";
case 10: return "Unitech Japan Inc.";
case 20: return "Acer Media Technology, Inc.";
@@ -629,7 +642,8 @@ namespace DiscImageChef.Decoders.CD
break;
case 46:
switch(frm) {
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";
@@ -641,7 +655,8 @@ namespace DiscImageChef.Decoders.CD
break;
case 47:
switch(frm) {
switch(frm)
{
case 10: return "Hitachi Maxell, Ltd.";
case 20: return "Princo Corporation";
case 40: return "POSTECH Corporation";
@@ -651,7 +666,8 @@ namespace DiscImageChef.Decoders.CD
break;
case 48:
switch(frm) {
switch(frm)
{
case 00: return "Ricoh Company Ltd.";
case 10: return "Kodak Japan Ltd.";
case 20: return "Plasmon Data systems Ltd.";
@@ -663,7 +679,8 @@ namespace DiscImageChef.Decoders.CD
break;
case 49:
switch(frm) {
switch(frm)
{
case 00: return "TDK Corporation";
case 10: return "Gigastore Corporation";
case 20: return "King Pro Mediatek Inc.";
@@ -674,7 +691,8 @@ namespace DiscImageChef.Decoders.CD
break;
case 50:
switch(frm) {
switch(frm)
{
case 10: return "Vanguard Disc Inc.";
case 20: return "Mitsubishi Chemical Corporation";
case 30: return "CDA Datenträger Albrechts GmbH";
@@ -682,7 +700,8 @@ namespace DiscImageChef.Decoders.CD
break;
case 51:
switch(frm) {
switch(frm)
{
case 10: return "Grand Advance Technology Ltd.";
case 20: return "Infodisc Technology Co. Ltd.";
case 50: return "Hile Optical Disc Technology Corp.";

View File

@@ -188,8 +188,7 @@ namespace DiscImageChef.Decoders.DVD
sb.AppendLine("Disc is write inhibited for an unspecified reason");
break;
default:
sb.AppendFormat("Disc has unknown reason {0} for write inhibition", decoded.RAMSWI)
.AppendLine();
sb.AppendFormat("Disc has unknown reason {0} for write inhibition", decoded.RAMSWI).AppendLine();
break;
}

View File

@@ -56,20 +56,28 @@ namespace DiscImageChef.Decoders.DVD
/// ECMA 274: Data Interchange on 120 mm Optical Disk using +RW Format - Capacity: 3,0 Gbytes and 6,0 Gbytes
/// ECMA 279: 80 mm (1,23 Gbytes per side) and 120 mm (3,95 Gbytes per side) DVD-Recordable Disk (DVD-R)
/// ECMA 330: 120 mm (4,7 Gbytes per side) and 80 mm (1,46 Gbytes per side) DVD Rewritable Disk (DVD-RAM)
/// ECMA 337: Data Interchange on 120 mm and 80 mm Optical Disk using +RW Format - Capacity: 4,7 and 1,46 Gbytes per Side
/// ECMA 337: Data Interchange on 120 mm and 80 mm Optical Disk using +RW Format - Capacity: 4,7 and 1,46 Gbytes per
/// Side
/// ECMA 338: 80 mm (1,46 Gbytes per side) and 120 mm (4,70 Gbytes per side) DVD Re-recordable Disk (DVD-RW)
/// ECMA 349: Data Interchange on 120 mm and 80 mm Optical Disk using +R Format - Capacity: 4,7 and 1,46 Gbytes per Side
/// ECMA 349: Data Interchange on 120 mm and 80 mm Optical Disk using +R Format - Capacity: 4,7 and 1,46 Gbytes per
/// Side
/// ECMA 359: 80 mm (1,46 Gbytes per side) and 120 mm (4,70 Gbytes per side) DVD Recordable Disk (DVD-R)
/// ECMA 364: Data Interchange on 120 mm and 80 mm Optical Disk using +R DL Format - Capacity 8,55 and 2,66 Gbytes per Side
/// ECMA 364: Data Interchange on 120 mm and 80 mm Optical Disk using +R DL Format - Capacity 8,55 and 2,66 Gbytes per
/// Side
/// ECMA 365: Data Interchange on 60 mm Read-Only ODC - Capacity: 1,8 Gbytes (UMD™)
/// ECMA 371: Data Interchange on 120 mm and 80 mm Optical Disk using +RW HS Format - Capacity 4,7 and 1,46 Gbytes per side
/// ECMA 374: Data Interchange on 120 mm and 80 mm Optical Disk using +RW DL Format - Capacity 8,55 and 2,66 Gbytes per side
/// ECMA 382: 120 mm (8,54 Gbytes per side) and 80 mm (2,66 Gbytes per side) DVD Recordable Disk for Dual Layer (DVD-R for DL)
/// ECMA 384: 120 mm (8,54 Gbytes per side) and 80 mm (2,66 Gbytes per side) DVD Re-recordable Disk for Dual Layer (DVD-RW for DL)
/// ECMA 371: Data Interchange on 120 mm and 80 mm Optical Disk using +RW HS Format - Capacity 4,7 and 1,46 Gbytes per
/// side
/// ECMA 374: Data Interchange on 120 mm and 80 mm Optical Disk using +RW DL Format - Capacity 8,55 and 2,66 Gbytes per
/// side
/// ECMA 382: 120 mm (8,54 Gbytes per side) and 80 mm (2,66 Gbytes per side) DVD Recordable Disk for Dual Layer (DVD-R
/// for DL)
/// ECMA 384: 120 mm (8,54 Gbytes per side) and 80 mm (2,66 Gbytes per side) DVD Re-recordable Disk for Dual Layer
/// (DVD-RW for DL)
/// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "NotAccessedField.Global")]
public static class PFI
{
public struct PhysicalFormatInformation
@@ -158,7 +166,8 @@ namespace DiscImageChef.Decoders.DVD
public uint Layer0EndPSN;
/// <summary>
/// Byte 20, bit 7
/// True if BCA exists. GC/Wii discs do not have this bit set, but there is a BCA, making it unreadable in normal DVD drives
/// True if BCA exists. GC/Wii discs do not have this bit set, but there is a BCA, making it unreadable in normal DVD
/// drives
/// </summary>
public bool BCA;
/// <summary>
@@ -1082,9 +1091,11 @@ namespace DiscImageChef.Decoders.DVD
pfi.Layer0EndPSN = (uint)((response[16] << 24) + (response[17] << 16) + (response[18] << 8) + response[19]);
pfi.BCA |= (response[20] & 0x80) == 0x80;
switch(pfi.DiskCategory) {
switch(pfi.DiskCategory)
{
// UMD
case DiskCategory.UMD: pfi.MediaAttribute = (ushort)((response[21] << 8) + response[22]);
case DiskCategory.UMD:
pfi.MediaAttribute = (ushort)((response[21] << 8) + response[22]);
break;
// DVD-RAM
case DiskCategory.DVDRAM:
@@ -1231,7 +1242,8 @@ namespace DiscImageChef.Decoders.DVD
pfi.PFIUsedInADIP = response[35];
}
switch(pfi.DiskCategory) {
switch(pfi.DiskCategory)
{
// DVD+RW
case DiskCategory.DVDPRW when pfi.PartVersion == 2:
pfi.TopFirstPulseDuration = response[55];
@@ -1270,9 +1282,11 @@ namespace DiscImageChef.Decoders.DVD
break;
}
switch(pfi.DiskCategory) {
switch(pfi.DiskCategory)
{
// DVD+R DL
case DiskCategory.DVDPRDL: pfi.LayerStructure = (DVDLayerStructure)((response[34] & 0xC0) >> 6);
case DiskCategory.DVDPRDL:
pfi.LayerStructure = (DVDLayerStructure)((response[34] & 0xC0) >> 6);
break;
// DVD+RW DL
case DiskCategory.DVDPRWDL:
@@ -1351,10 +1365,13 @@ namespace DiscImageChef.Decoders.DVD
{
case DiskCategory.DVDROM:
sb.AppendFormat(categorySentence, sizeString, "DVD-ROM", decoded.PartVersion).AppendLine();
switch(decoded.DiscSize) {
case DVDSize.OneTwenty when decoded.PartVersion == 1: sb.AppendLine("Disc claims conformation to ECMA-267");
switch(decoded.DiscSize)
{
case DVDSize.OneTwenty when decoded.PartVersion == 1:
sb.AppendLine("Disc claims conformation to ECMA-267");
break;
case DVDSize.Eighty when decoded.PartVersion == 1: sb.AppendLine("Disc claims conformation to ECMA-268");
case DVDSize.Eighty when decoded.PartVersion == 1:
sb.AppendLine("Disc claims conformation to ECMA-268");
break;
}
@@ -1583,8 +1600,10 @@ namespace DiscImageChef.Decoders.DVD
if(decoded.BCA) sb.AppendLine("Disc has a burst cutting area");
switch(decoded.DiskCategory) {
case DiskCategory.UMD: sb.AppendFormat("Media attribute is {0}", decoded.MediaAttribute).AppendLine();
switch(decoded.DiskCategory)
{
case DiskCategory.UMD:
sb.AppendFormat("Media attribute is {0}", decoded.MediaAttribute).AppendLine();
break;
case DiskCategory.DVDRAM:
switch(decoded.DiscType)
@@ -1611,7 +1630,8 @@ namespace DiscImageChef.Decoders.DVD
case DiskCategory.DVDRW when decoded.PartVersion < 3:
sb.AppendFormat("Current Border-Out first sector is PSN {0:X}h", decoded.CurrentBorderOutSector)
.AppendLine();
sb.AppendFormat("Next Border-In first sector is PSN {0:X}h", decoded.NextBorderInSector).AppendLine();
sb.AppendFormat("Next Border-In first sector is PSN {0:X}h", decoded.NextBorderInSector)
.AppendLine();
break;
case DiskCategory.DVDPR:
case DiskCategory.DVDPRW:
@@ -1628,10 +1648,9 @@ namespace DiscImageChef.Decoders.DVD
if((decoded.DiskCategory != DiskCategory.DVDR || decoded.PartVersion < 6) &&
(decoded.DiskCategory != DiskCategory.DVDRW || decoded.PartVersion < 3)) return sb.ToString();
sb.AppendFormat("Current RMD in extra Border zone starts at PSN {0:X}h",
decoded.CurrentRMDExtraBorderPSN).AppendLine();
sb.AppendFormat("PFI in extra Border zone starts at PSN {0:X}h", decoded.PFIExtraBorderPSN)
sb.AppendFormat("Current RMD in extra Border zone starts at PSN {0:X}h", decoded.CurrentRMDExtraBorderPSN)
.AppendLine();
sb.AppendFormat("PFI in extra Border zone starts at PSN {0:X}h", decoded.PFIExtraBorderPSN).AppendLine();
if(!decoded.PreRecordedControlDataInv) sb.AppendLine("Control Data Zone is pre-recorded");
if(decoded.PreRecordedLeadIn) sb.AppendLine("Lead-In is pre-recorded");
if(decoded.PreRecordedLeadOut) sb.AppendLine("Lead-Out is pre-recorded");

View File

@@ -74,11 +74,11 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] label;
/// <summary>
/// Checksum from <see cref="amiga"/> to <see cref="label"/>
/// Checksum from <see cref="amiga" /> to <see cref="label" />
/// </summary>
public uint headerChecksum;
/// <summary>
/// Checksum from <see cref="data"/>
/// Checksum from <see cref="data" />
/// </summary>
public uint dataChecksum;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)] public byte[] data;

View File

@@ -70,10 +70,6 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
public RawAddressField addressField;
/// <summary>
/// Track preamble, set to self-sync 0xFF, between 5 and 10 bytes
/// </summary>
public byte[] innerGap;
/// <summary>
/// Data field
/// </summary>
public RawDataField dataField;
@@ -81,6 +77,10 @@ namespace DiscImageChef.Decoders.Floppy
/// Track preamble, set to self-sync 0xFF, between 14 and 24 bytes
/// </summary>
public byte[] gap;
/// <summary>
/// Track preamble, set to self-sync 0xFF, between 5 and 10 bytes
/// </summary>
public byte[] innerGap;
}
/// <summary>
@@ -88,28 +88,6 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
public class RawAddressField
{
/// <summary>
/// Always 0xD5, 0xAA, 0x96
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] prologue;
/// <summary>
/// Volume number encoded as:
/// volume[0] = (decodedVolume >> 1) | 0xAA
/// volume[1] = decodedVolume | 0xAA
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] volume;
/// <summary>
/// Track number encoded as:
/// track[0] = (decodedTrack >> 1) | 0xAA
/// track[1] = decodedTrack | 0xAA
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] track;
/// <summary>
/// Sector number encoded as:
/// sector[0] = (decodedSector >> 1) | 0xAA
/// sector[1] = decodedSector | 0xAA
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] sector;
/// <summary>
/// decodedChecksum = decodedVolume ^ decodedTrack ^ decodedSector
/// checksum[0] = (decodedChecksum >> 1) | 0xAA
@@ -120,6 +98,28 @@ namespace DiscImageChef.Decoders.Floppy
/// Always 0xDE, 0xAA, 0xEB
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] epilogue;
/// <summary>
/// Always 0xD5, 0xAA, 0x96
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] prologue;
/// <summary>
/// Sector number encoded as:
/// sector[0] = (decodedSector >> 1) | 0xAA
/// sector[1] = decodedSector | 0xAA
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] sector;
/// <summary>
/// Track number encoded as:
/// track[0] = (decodedTrack >> 1) | 0xAA
/// track[1] = decodedTrack | 0xAA
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] track;
/// <summary>
/// Volume number encoded as:
/// volume[0] = (decodedVolume >> 1) | 0xAA
/// volume[1] = decodedVolume | 0xAA
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] volume;
}
/// <summary>
@@ -127,21 +127,21 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
public class RawDataField
{
/// <summary>
/// Always 0xD5, 0xAA, 0xAD
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] prologue;
public byte checksum;
/// <summary>
/// Encoded data bytes.
/// 410 bytes for 5to3 (aka DOS 3.2) format
/// 342 bytes for 6to2 (aka DOS 3.3) format
/// </summary>
public byte[] data;
public byte checksum;
/// <summary>
/// Always 0xDE, 0xAA, 0xEB
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] epilogue;
/// <summary>
/// Always 0xD5, 0xAA, 0xAD
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] prologue;
}
static readonly byte[] ReadTable5and3 =
@@ -549,8 +549,7 @@ namespace DiscImageChef.Decoders.Floppy
MemoryStream raw = new MemoryStream();
raw.Write(track.gap, 0, track.gap.Length);
foreach(byte[] rawSector in track.sectors.Select(MarshalSector))
{ raw.Write(rawSector, 0, rawSector.Length); }
foreach(byte[] rawSector in track.sectors.Select(MarshalSector)) raw.Write(rawSector, 0, rawSector.Length);
return raw.ToArray();
}
@@ -589,7 +588,7 @@ namespace DiscImageChef.Decoders.Floppy
if(disk == null) return null;
MemoryStream raw = new MemoryStream();
foreach(byte[] rawTrack in disk.Select(MarshalTrack)) { raw.Write(rawTrack, 0, rawTrack.Length); }
foreach(byte[] rawTrack in disk.Select(MarshalTrack)) raw.Write(rawTrack, 0, rawTrack.Length);
return raw.ToArray();
}

View File

@@ -73,10 +73,6 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
public RawAddressField addressField;
/// <summary>
/// Track preamble, set to self-sync 0xFF, 6 bytes
/// </summary>
public byte[] innerGap;
/// <summary>
/// Data field
/// </summary>
public RawDataField dataField;
@@ -84,6 +80,10 @@ namespace DiscImageChef.Decoders.Floppy
/// Track preamble, set to self-sync 0xFF, unknown size
/// </summary>
public byte[] gap;
/// <summary>
/// Track preamble, set to self-sync 0xFF, 6 bytes
/// </summary>
public byte[] innerGap;
}
/// <summary>
@@ -91,15 +91,23 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
public class RawAddressField
{
/// <summary>
/// Checksum
/// </summary>
public byte checksum;
/// <summary>
/// Always 0xDE, 0xAA
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] epilogue;
/// <summary>
/// Disk format
/// </summary>
public AppleEncodedFormat format;
/// <summary>
/// Always 0xD5, 0xAA, 0x96
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] prologue;
/// <summary>
/// Encoded (decodedTrack &amp; 0x3F)
/// </summary>
public byte track;
/// <summary>
/// Encoded sector number
/// </summary>
public byte sector;
@@ -108,17 +116,9 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
public byte side;
/// <summary>
/// Disk format
/// Encoded (decodedTrack &amp; 0x3F)
/// </summary>
public AppleEncodedFormat format;
/// <summary>
/// Checksum
/// </summary>
public byte checksum;
/// <summary>
/// Always 0xDE, 0xAA
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] epilogue;
public byte track;
}
/// <summary>
@@ -127,25 +127,25 @@ namespace DiscImageChef.Decoders.Floppy
public class RawDataField
{
/// <summary>
/// Always 0xD5, 0xAA, 0xAD
/// Checksum
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] prologue;
/// <summary>
/// Spare, usually <see cref="RawAddressField.sector"/>
/// </summary>
public byte spare;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] public byte[] checksum;
/// <summary>
/// Encoded data bytes.
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 698)] public byte[] data;
/// <summary>
/// Checksum
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] public byte[] checksum;
/// <summary>
/// Always 0xDE, 0xAA
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] epilogue;
/// <summary>
/// Always 0xD5, 0xAA, 0xAD
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] prologue;
/// <summary>
/// Spare, usually <see cref="RawAddressField.sector" />
/// </summary>
public byte spare;
}
public static byte[] DecodeSector(RawSector sector)
@@ -441,8 +441,7 @@ namespace DiscImageChef.Decoders.Floppy
MemoryStream raw = new MemoryStream();
raw.Write(track.gap, 0, track.gap.Length);
foreach(byte[] rawSector in track.sectors.Select(MarshalSector))
{ raw.Write(rawSector, 0, rawSector.Length); }
foreach(byte[] rawSector in track.sectors.Select(MarshalSector)) raw.Write(rawSector, 0, rawSector.Length);
return raw.ToArray();
}
@@ -481,7 +480,7 @@ namespace DiscImageChef.Decoders.Floppy
if(disk == null) return null;
MemoryStream raw = new MemoryStream();
foreach(byte[] rawTrack in disk.Select(MarshalTrack)) { raw.Write(rawTrack, 0, rawTrack.Length); }
foreach(byte[] rawTrack in disk.Select(MarshalTrack)) raw.Write(rawTrack, 0, rawTrack.Length);
return raw.ToArray();
}

View File

@@ -88,7 +88,7 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] public byte data;
/// <summary>
/// XOR of <see cref="data"/>
/// XOR of <see cref="data" />
/// </summary>
public byte checksum;
/// <summary>

View File

@@ -109,7 +109,7 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
/// <summary>
/// Set to <see cref="IBMIdType.AddressMark"/>
/// Set to <see cref="IBMIdType.AddressMark" />
/// </summary>
public IBMIdType type;
/// <summary>
@@ -125,11 +125,11 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
public byte sector;
/// <summary>
/// <see cref="IBMSectorSizeCode"/>
/// <see cref="IBMSectorSizeCode" />
/// </summary>
public IBMSectorSizeCode sectorSize;
/// <summary>
/// CRC16 from <see cref="aone"/> to end of <see cref="sectorSize"/>
/// CRC16 from <see cref="aone" /> to end of <see cref="sectorSize" />
/// </summary>
public ushort crc;
}
@@ -148,7 +148,7 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
/// <summary>
/// Set to <see cref="IBMIdType.DataMark"/> or to <see cref="IBMIdType.DeletedDataMark"/>
/// Set to <see cref="IBMIdType.DataMark" /> or to <see cref="IBMIdType.DeletedDataMark" />
/// </summary>
public IBMIdType type;
/// <summary>
@@ -156,7 +156,7 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
public byte[] data;
/// <summary>
/// CRC16 from <see cref="aone"/> to end of <see cref="data"/>
/// CRC16 from <see cref="aone" /> to end of <see cref="data" />
/// </summary>
public ushort crc;
}

View File

@@ -114,7 +114,7 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] ctwo;
/// <summary>
/// Set to <see cref="IBMIdType.IndexMark"/>
/// Set to <see cref="IBMIdType.IndexMark" />
/// </summary>
public IBMIdType type;
/// <summary>
@@ -137,7 +137,7 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
/// <summary>
/// Set to <see cref="IBMIdType.AddressMark"/>
/// Set to <see cref="IBMIdType.AddressMark" />
/// </summary>
public IBMIdType type;
/// <summary>
@@ -153,11 +153,11 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
public byte sector;
/// <summary>
/// <see cref="IBMSectorSizeCode"/>
/// <see cref="IBMSectorSizeCode" />
/// </summary>
public IBMSectorSizeCode sectorSize;
/// <summary>
/// CRC16 from <see cref="aone"/> to end of <see cref="sectorSize"/>
/// CRC16 from <see cref="aone" /> to end of <see cref="sectorSize" />
/// </summary>
public ushort crc;
}
@@ -176,7 +176,7 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
/// <summary>
/// Set to <see cref="IBMIdType.DataMark"/> or to <see cref="IBMIdType.DeletedDataMark"/>
/// Set to <see cref="IBMIdType.DataMark" /> or to <see cref="IBMIdType.DeletedDataMark" />
/// </summary>
public IBMIdType type;
/// <summary>
@@ -184,7 +184,7 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
public byte[] data;
/// <summary>
/// CRC16 from <see cref="aone"/> to end of <see cref="data"/>
/// CRC16 from <see cref="aone" /> to end of <see cref="data" />
/// </summary>
public ushort crc;
}

View File

@@ -92,7 +92,7 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] ctwo;
/// <summary>
/// Set to <see cref="IBMIdType.IndexMark"/>
/// Set to <see cref="IBMIdType.IndexMark" />
/// </summary>
public IBMIdType type;
/// <summary>
@@ -138,7 +138,7 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
/// <summary>
/// Set to <see cref="IBMIdType.AddressMark"/>
/// Set to <see cref="IBMIdType.AddressMark" />
/// </summary>
public IBMIdType type;
/// <summary>
@@ -154,11 +154,11 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
public byte sector;
/// <summary>
/// <see cref="IBMSectorSizeCode"/>
/// <see cref="IBMSectorSizeCode" />
/// </summary>
public IBMSectorSizeCode sectorSize;
/// <summary>
/// CRC16 from <see cref="aone"/> to end of <see cref="sectorSize"/>
/// CRC16 from <see cref="aone" /> to end of <see cref="sectorSize" />
/// </summary>
public ushort crc;
}
@@ -177,7 +177,7 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] aone;
/// <summary>
/// Set to <see cref="IBMIdType.DataMark"/> or to <see cref="IBMIdType.DeletedDataMark"/>
/// Set to <see cref="IBMIdType.DataMark" /> or to <see cref="IBMIdType.DeletedDataMark" />
/// </summary>
public IBMIdType type;
/// <summary>
@@ -185,7 +185,7 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
public byte[] data;
/// <summary>
/// CRC16 from <see cref="aone"/> to end of <see cref="data"/>
/// CRC16 from <see cref="aone" /> to end of <see cref="data" />
/// </summary>
public ushort crc;
}

View File

@@ -86,7 +86,7 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public byte[] zero;
/// <summary>
/// Set to <see cref="IBMIdType.IndexMark"/>
/// Set to <see cref="IBMIdType.IndexMark" />
/// </summary>
public IBMIdType type;
/// <summary>
@@ -128,7 +128,7 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public byte[] zero;
/// <summary>
/// Set to <see cref="IBMIdType.AddressMark"/>
/// Set to <see cref="IBMIdType.AddressMark" />
/// </summary>
public IBMIdType type;
/// <summary>
@@ -144,11 +144,11 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
public byte sector;
/// <summary>
/// <see cref="IBMSectorSizeCode"/>
/// <see cref="IBMSectorSizeCode" />
/// </summary>
public IBMSectorSizeCode sectorSize;
/// <summary>
/// CRC16 from <see cref="type"/> to end of <see cref="sectorSize"/>
/// CRC16 from <see cref="type" /> to end of <see cref="sectorSize" />
/// </summary>
public ushort crc;
}
@@ -163,7 +163,7 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] public byte[] zero;
/// <summary>
/// Set to <see cref="IBMIdType.DataMark"/> or to <see cref="IBMIdType.DeletedDataMark"/>
/// Set to <see cref="IBMIdType.DataMark" /> or to <see cref="IBMIdType.DeletedDataMark" />
/// </summary>
public IBMIdType type;
/// <summary>
@@ -171,7 +171,7 @@ namespace DiscImageChef.Decoders.Floppy
/// </summary>
public byte[] data;
/// <summary>
/// CRC16 from <see cref="type"/> to end of <see cref="data"/>
/// CRC16 from <see cref="type" /> to end of <see cref="data" />
/// </summary>
public ushort crc;
}

View File

@@ -271,7 +271,8 @@ namespace DiscImageChef.Decoders.PCMCIA
else
{
sb.AppendLine("\tAdditional information:");
foreach(string info in tuple.AdditionalInformation.Where(info => !string.IsNullOrEmpty(info))) sb.AppendFormat("\t\t{0}", info).AppendLine();
foreach(string info in tuple.AdditionalInformation.Where(info => !string.IsNullOrEmpty(info)))
sb.AppendFormat("\t\t{0}", info).AppendLine();
}
return sb.ToString();

View File

@@ -56,7 +56,7 @@ namespace DiscImageChef.Decoders.PCMCIA
public class ChecksumTuple
{
/// <summary>
/// <see cref="TupleCodes.CISTPL_CHECKSUM"/>
/// <see cref="TupleCodes.CISTPL_CHECKSUM" />
/// </summary>
public TupleCodes Code;
/// <summary>
@@ -86,7 +86,7 @@ namespace DiscImageChef.Decoders.PCMCIA
public class IndirectTuple
{
/// <summary>
/// <see cref="TupleCodes.CISTPL_INDIRECT"/>
/// <see cref="TupleCodes.CISTPL_INDIRECT" />
/// </summary>
public TupleCodes Code;
/// <summary>
@@ -104,7 +104,7 @@ namespace DiscImageChef.Decoders.PCMCIA
public class LinkTargetTuple
{
/// <summary>
/// <see cref="TupleCodes.CISTPL_LINKTARGET"/>
/// <see cref="TupleCodes.CISTPL_LINKTARGET" />
/// </summary>
public TupleCodes Code;
/// <summary>
@@ -126,7 +126,8 @@ namespace DiscImageChef.Decoders.PCMCIA
public class LongLinkTuple
{
/// <summary>
/// <see cref="TupleCodes.CISTPL_LONGLINK_A"/> or <see cref="TupleCodes.CISTPL_LONGLINK_C"/> or <see cref="TupleCodes.CISTPL_LONGLINK_CB"/>
/// <see cref="TupleCodes.CISTPL_LONGLINK_A" /> or <see cref="TupleCodes.CISTPL_LONGLINK_C" /> or
/// <see cref="TupleCodes.CISTPL_LONGLINK_CB" />
/// </summary>
public TupleCodes Code;
/// <summary>
@@ -164,7 +165,7 @@ namespace DiscImageChef.Decoders.PCMCIA
public class MultipleFunctionLinkTuple
{
/// <summary>
/// <see cref="TupleCodes.CISTPL_LONGLINK_MFC"/>
/// <see cref="TupleCodes.CISTPL_LONGLINK_MFC" />
/// </summary>
public TupleCodes Code;
/// <summary>
@@ -187,7 +188,7 @@ namespace DiscImageChef.Decoders.PCMCIA
public class NoLinkTuple
{
/// <summary>
/// <see cref="TupleCodes.CISTPL_NO_LINK"/>
/// <see cref="TupleCodes.CISTPL_NO_LINK" />
/// </summary>
public TupleCodes Code;
/// <summary>
@@ -202,7 +203,7 @@ namespace DiscImageChef.Decoders.PCMCIA
public class AlternateStringTuple
{
/// <summary>
/// <see cref="TupleCodes.CISTPL_ALTSTR"/>
/// <see cref="TupleCodes.CISTPL_ALTSTR" />
/// </summary>
public TupleCodes Code;
/// <summary>
@@ -210,7 +211,8 @@ namespace DiscImageChef.Decoders.PCMCIA
/// </summary>
public byte Link;
/// <summary>
/// Array of strings. On memory they're preceded by an ISO Escape Code indicating codepage. Here they're stored as Unicode, so no need for it.
/// Array of strings. On memory they're preceded by an ISO Escape Code indicating codepage. Here they're stored as
/// Unicode, so no need for it.
/// </summary>
public string[] Strings;
}
@@ -276,7 +278,7 @@ namespace DiscImageChef.Decoders.PCMCIA
public class DeviceTuple
{
/// <summary>
/// <see cref="TupleCodes.CISTPL_DEVICE"/> or <see cref="TupleCodes.CISTPL_DEVICE_A"/>
/// <see cref="TupleCodes.CISTPL_DEVICE" /> or <see cref="TupleCodes.CISTPL_DEVICE_A" />
/// </summary>
public TupleCodes Code;
/// <summary>
@@ -314,7 +316,7 @@ namespace DiscImageChef.Decoders.PCMCIA
public class OtherConditionTuple
{
/// <summary>
/// <see cref="TupleCodes.CISTPL_DEVICE_OC"/> or <see cref="TupleCodes.CISTPL_DEVICE_OA"/>
/// <see cref="TupleCodes.CISTPL_DEVICE_OC" /> or <see cref="TupleCodes.CISTPL_DEVICE_OA" />
/// </summary>
public TupleCodes Code;
/// <summary>
@@ -341,18 +343,18 @@ namespace DiscImageChef.Decoders.PCMCIA
/// </summary>
public byte CardInterface;
/// <summary>
/// Erase block size in 1 &lt;&lt; n-1 increments of <see cref="CardInterface"/> wide accesses.
/// If n == 4, and <see cref="CardInterface"/> == 16, erase block size = 32 * 4 = 128 bytes
/// Erase block size in 1 &lt;&lt; n-1 increments of <see cref="CardInterface" /> wide accesses.
/// If n == 4, and <see cref="CardInterface" /> == 16, erase block size = 32 * 4 = 128 bytes
/// </summary>
public byte EraseBlockSize;
/// <summary>
/// Read block size in 1 &lt;&lt; n-1 increments of <see cref="CardInterface"/> wide accesses.
/// If n == 4, and <see cref="CardInterface"/> == 16, read block size = 32 * 4 = 128 bytes
/// Read block size in 1 &lt;&lt; n-1 increments of <see cref="CardInterface" /> wide accesses.
/// If n == 4, and <see cref="CardInterface" /> == 16, read block size = 32 * 4 = 128 bytes
/// </summary>
public byte ReadBlockSize;
/// <summary>
/// Write block size in 1 &lt;&lt; n-1 increments of <see cref="CardInterface"/> wide accesses.
/// If n == 4, and <see cref="CardInterface"/> == 16, write block size = 32 * 4 = 128 bytes
/// Write block size in 1 &lt;&lt; n-1 increments of <see cref="CardInterface" /> wide accesses.
/// If n == 4, and <see cref="CardInterface" /> == 16, write block size = 32 * 4 = 128 bytes
/// </summary>
public byte WriteBlockSize;
/// <summary>
@@ -373,7 +375,7 @@ namespace DiscImageChef.Decoders.PCMCIA
public class DeviceGeometryTuple
{
/// <summary>
/// <see cref="TupleCodes.CISTPL_DEVICEGEO"/> or <see cref="TupleCodes.CISTPL_DEVICEGEO_A"/>
/// <see cref="TupleCodes.CISTPL_DEVICEGEO" /> or <see cref="TupleCodes.CISTPL_DEVICEGEO_A" />
/// </summary>
public TupleCodes Code;
/// <summary>
@@ -392,7 +394,7 @@ namespace DiscImageChef.Decoders.PCMCIA
public class FunctionIdentificationTuple
{
/// <summary>
/// <see cref="TupleCodes.CISTPL_FUNCID"/>
/// <see cref="TupleCodes.CISTPL_FUNCID" />
/// </summary>
public TupleCodes Code;
/// <summary>
@@ -420,7 +422,7 @@ namespace DiscImageChef.Decoders.PCMCIA
public class ManufacturerIdentificationTuple
{
/// <summary>
/// <see cref="TupleCodes.CISTPL_MANFID"/>
/// <see cref="TupleCodes.CISTPL_MANFID" />
/// </summary>
public TupleCodes Code;
/// <summary>
@@ -444,7 +446,7 @@ namespace DiscImageChef.Decoders.PCMCIA
public class Level1VersionTuple
{
/// <summary>
/// <see cref="TupleCodes.CISTPL_VERS_1"/>
/// <see cref="TupleCodes.CISTPL_VERS_1" />
/// </summary>
public TupleCodes Code;
/// <summary>
@@ -479,7 +481,7 @@ namespace DiscImageChef.Decoders.PCMCIA
public class Level2VersionTuple
{
/// <summary>
/// <see cref="TupleCodes.CISTPL_VERS_2"/>
/// <see cref="TupleCodes.CISTPL_VERS_2" />
/// </summary>
public TupleCodes Code;
/// <summary>
@@ -526,7 +528,7 @@ namespace DiscImageChef.Decoders.PCMCIA
public class GeometryTuple
{
/// <summary>
/// <see cref="TupleCodes.CISTPL_GEOMETRY"/>
/// <see cref="TupleCodes.CISTPL_GEOMETRY" />
/// </summary>
public TupleCodes Code;
/// <summary>

View File

@@ -390,7 +390,6 @@ namespace DiscImageChef.Decoders.SCSI
PageLength = (byte)(pageResponse[3] + 4)
};
int position = 4;
List<IdentificatonDescriptor> descriptors = new List<IdentificatonDescriptor>();
@@ -409,12 +408,16 @@ namespace DiscImageChef.Decoders.SCSI
if(descriptor.Length + position + 4 >= pageResponse.Length)
descriptor.Length = (byte)(pageResponse.Length - position - 4);
Array.Copy(pageResponse, position + 4, descriptor.Binary, 0, descriptor.Length);
switch(descriptor.CodeSet) {
case IdentificationCodeSet.ASCII: descriptor.ASCII = StringHandlers.CToString(descriptor.Binary);
switch(descriptor.CodeSet)
{
case IdentificationCodeSet.ASCII:
descriptor.ASCII = StringHandlers.CToString(descriptor.Binary);
break;
case IdentificationCodeSet.UTF8: descriptor.ASCII = Encoding.UTF8.GetString(descriptor.Binary);
case IdentificationCodeSet.UTF8:
descriptor.ASCII = Encoding.UTF8.GetString(descriptor.Binary);
break;
default: descriptor.ASCII = "";
default:
descriptor.ASCII = "";
break;
}
@@ -521,9 +524,11 @@ namespace DiscImageChef.Decoders.SCSI
switch(descriptor.Type)
{
case IdentificationTypes.NoAuthority:
switch(descriptor.CodeSet) {
switch(descriptor.CodeSet)
{
case IdentificationCodeSet.ASCII:
case IdentificationCodeSet.UTF8: sb.AppendFormat("\tVendor descriptor contains: {0}", descriptor.ASCII).AppendLine();
case IdentificationCodeSet.UTF8:
sb.AppendFormat("\tVendor descriptor contains: {0}", descriptor.ASCII).AppendLine();
break;
case IdentificationCodeSet.Binary:
sb.AppendFormat("\tVendor descriptor contains binary data (hex): {0}",
@@ -538,9 +543,11 @@ namespace DiscImageChef.Decoders.SCSI
break;
case IdentificationTypes.Inquiry:
switch(descriptor.CodeSet) {
switch(descriptor.CodeSet)
{
case IdentificationCodeSet.ASCII:
case IdentificationCodeSet.UTF8: sb.AppendFormat("\tInquiry descriptor contains: {0}", descriptor.ASCII).AppendLine();
case IdentificationCodeSet.UTF8:
sb.AppendFormat("\tInquiry descriptor contains: {0}", descriptor.ASCII).AppendLine();
break;
case IdentificationCodeSet.Binary:
sb.AppendFormat("\tInquiry descriptor contains binary data (hex): {0}",
@@ -720,7 +727,8 @@ namespace DiscImageChef.Decoders.SCSI
break;
default:
switch(descriptor.CodeSet) {
switch(descriptor.CodeSet)
{
case IdentificationCodeSet.ASCII:
case IdentificationCodeSet.UTF8:
sb.AppendFormat("\tUnknown descriptor type {1} contains: {0}", descriptor.ASCII,
@@ -732,7 +740,8 @@ namespace DiscImageChef.Decoders.SCSI
(byte)descriptor.Type).AppendLine();
break;
default:
sb.AppendFormat("Inquiry descriptor type {2} contains unknown kind {1} of data (hex): {0}",
sb
.AppendFormat("Inquiry descriptor type {2} contains unknown kind {1} of data (hex): {0}",
PrintHex.ByteArrayToHexArrayString(descriptor.Binary, 40),
(byte)descriptor.CodeSet, (byte)descriptor.Type).AppendLine();
break;
@@ -798,7 +807,6 @@ namespace DiscImageChef.Decoders.SCSI
PageLength = (byte)(pageResponse[3] + 4)
};
int position = 4;
List<SoftwareIdentifier> identifiers = new List<SoftwareIdentifier>();
@@ -924,7 +932,6 @@ namespace DiscImageChef.Decoders.SCSI
PageLength = (ushort)((pageResponse[2] << 8) + pageResponse[3] + 4)
};
int position = 4;
List<NetworkDescriptor> descriptors = new List<NetworkDescriptor>();
@@ -1223,7 +1230,8 @@ namespace DiscImageChef.Decoders.SCSI
sb.AppendLine("SCSI Extended INQUIRY Data:");
switch(page.PeripheralDeviceType) {
switch(page.PeripheralDeviceType)
{
case PeripheralDeviceTypes.DirectAccess:
case PeripheralDeviceTypes.SCSIZonedBlockDevice:
switch(page.SPT)
@@ -1256,7 +1264,8 @@ namespace DiscImageChef.Decoders.SCSI
}
break;
case PeripheralDeviceTypes.SequentialAccess when page.SPT == 1: sb.AppendLine("Logical unit supports logical block protection");
case PeripheralDeviceTypes.SequentialAccess when page.SPT == 1:
sb.AppendLine("Logical unit supports logical block protection");
break;
}
@@ -1813,7 +1822,8 @@ namespace DiscImageChef.Decoders.SCSI
CartridgeCapacity = (ushort)((pageResponse[10] << 8) + pageResponse[11] + 4),
PortATransportType = pageResponse[12],
PortASelectionID = pageResponse[15],
OperatingHours = (uint)((pageResponse[20] << 24) + (pageResponse[21] << 16) + (pageResponse[22] << 8) +
OperatingHours =
(uint)((pageResponse[20] << 24) + (pageResponse[21] << 16) + (pageResponse[22] << 8) +
pageResponse[23]),
CartridgeSerialNumber = new byte[32]
};
@@ -1996,8 +2006,6 @@ namespace DiscImageChef.Decoders.SCSI
Date = new byte[8]
};
Array.Copy(pageResponse, 4, decoded.CodeName, 0, 12);
Array.Copy(pageResponse, 23, decoded.Date, 0, 8);
@@ -2291,7 +2299,8 @@ namespace DiscImageChef.Decoders.SCSI
if(pageResponse[4] != pageResponse[3] - 1) return null;
List<byte> array = new List<byte>();
const string fwRegExStr = @"Firmware Rev\s+=\s+(?<fw>\d+\.\d+)\s+Build date\s+=\s+(?<date>(\w|\d|\s*.)*)\s*$";
const string fwRegExStr =
@"Firmware Rev\s+=\s+(?<fw>\d+\.\d+)\s+Build date\s+=\s+(?<date>(\w|\d|\s*.)*)\s*$";
const string fwcRegExStr = @"FW_CONF\s+=\s+(?<value>0x[0-9A-Fa-f]{8})\s*$";
const string servoRegExStr = @"Servo\s+Rev\s+=\s+(?<version>\d+\.\d+)\s*$";
Regex fwRegEx = new Regex(fwRegExStr);
@@ -2314,8 +2323,7 @@ namespace DiscImageChef.Decoders.SCSI
decoded.Version = Encoding.ASCII.GetBytes(fwMatch.Groups["fw"].Value);
decoded.Date = Encoding.ASCII.GetBytes(fwMatch.Groups["date"].Value);
}
else if(fwcMatch.Success)
decoded.Variant = Encoding.ASCII.GetBytes(fwMatch.Groups["value"].Value);
else if(fwcMatch.Success) decoded.Variant = Encoding.ASCII.GetBytes(fwMatch.Groups["value"].Value);
else if(servoMatch.Success)
{
decoded.Component = Encoding.ASCII.GetBytes("Servo");
@@ -2425,8 +2433,6 @@ namespace DiscImageChef.Decoders.SCSI
ServoFirmware = new byte[4]
};
Array.Copy(pageResponse, 4, decoded.ControllerFirmware, 0, 4);
Array.Copy(pageResponse, 8, decoded.BootFirmware, 0, 4);
Array.Copy(pageResponse, 12, decoded.ServoFirmware, 0, 4);

View File

@@ -227,7 +227,8 @@ namespace DiscImageChef.Decoders.SCSI
else descriptorsNo = (SCSIInquiryResponse.Length - 58) / 2;
decoded.VersionDescriptors = new ushort[descriptorsNo];
for(int i = 0; i < descriptorsNo; i++) decoded.VersionDescriptors[i] = BitConverter.ToUInt16(SCSIInquiryResponse, 58 + i * 2);
for(int i = 0; i < descriptorsNo; i++)
decoded.VersionDescriptors[i] = BitConverter.ToUInt16(SCSIInquiryResponse, 58 + i * 2);
}
if(SCSIInquiryResponse.Length >= 75 && SCSIInquiryResponse.Length < 96)

View File

@@ -415,8 +415,8 @@ namespace DiscImageChef.Decoders.SCSI.MMC
sb.AppendFormat("Last track in last session is track {0}", decoded.LastTrackLastSession).AppendLine();
sb.AppendFormat("Last session Lead-In address is {0} (as LBA) or {1:X2}:{2:X2}:{3:X2}",
decoded.LastSessionLeadInStartLBA, (decoded.LastSessionLeadInStartLBA & 0xFF0000) >> 16,
(decoded.LastSessionLeadInStartLBA & 0xFF00) >> 8,
decoded.LastSessionLeadInStartLBA & 0xFF).AppendLine();
(decoded.LastSessionLeadInStartLBA & 0xFF00) >> 8, decoded.LastSessionLeadInStartLBA & 0xFF)
.AppendLine();
sb.AppendFormat("Last possible Lead-Out address is {0} (as LBA) or {1:X2}:{2:X2}:{3:X2}",
decoded.LastPossibleLeadOutStartLBA, (decoded.LastPossibleLeadOutStartLBA & 0xFF0000) >> 16,
(decoded.LastPossibleLeadOutStartLBA & 0xFF00) >> 8,

View File

@@ -5344,25 +5344,6 @@ namespace DiscImageChef.Decoders.SCSI.MMC
return Prettify_0142(Decode_0142(feature));
}
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "NotAccessedField.Global")]
public struct FeatureDescriptor
{
public ushort Code;
public byte[] Data;
}
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "NotAccessedField.Global")]
public struct SeparatedFeatures
{
public uint DataLength;
public ushort CurrentProfile;
public FeatureDescriptor[] Descriptors;
}
public static SeparatedFeatures Separate(byte[] response)
{
SeparatedFeatures dec = new SeparatedFeatures
@@ -5391,5 +5372,24 @@ namespace DiscImageChef.Decoders.SCSI.MMC
return dec;
}
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "NotAccessedField.Global")]
public struct FeatureDescriptor
{
public ushort Code;
public byte[] Data;
}
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "NotAccessedField.Global")]
public struct SeparatedFeatures
{
public uint DataLength;
public ushort CurrentProfile;
public FeatureDescriptor[] Descriptors;
}
}
}

View File

@@ -127,7 +127,8 @@ namespace DiscImageChef.Decoders.SCSI.MMC
decoded.FormatLayers = new ushort[(FormatLayersResponse.Length - 6) / 2];
for(int i = 0; i < (FormatLayersResponse.Length - 6) / 2; i++) decoded.FormatLayers[i] = BigEndianBitConverter.ToUInt16(FormatLayersResponse, i * 2 + 6);
for(int i = 0; i < (FormatLayersResponse.Length - 6) / 2; i++)
decoded.FormatLayers[i] = BigEndianBitConverter.ToUInt16(FormatLayersResponse, i * 2 + 6);
return decoded;
}

View File

@@ -189,6 +189,7 @@ namespace DiscImageChef.Decoders.SCSI
return sb.ToString();
}
#endregion Mode Page 0x01: Read-write error recovery page
public static byte[] EncodeModePage_01(ModePage_01 page)
{
byte[] pg = new byte[8];

View File

@@ -195,6 +195,7 @@ namespace DiscImageChef.Decoders.SCSI
return sb.ToString();
}
#endregion Mode Page 0x01: Read error recovery page for MultiMedia Devices
public static byte[] EncodeModePage_01_MMC(ModePage_01_MMC page)
{
byte[] pg = new byte[12];

View File

@@ -69,7 +69,8 @@ namespace DiscImageChef.Decoders.SCSI
/// </summary>
public ushort DisconnectTimeLimit;
/// <summary>
/// Max. time in 100 µs increments allowed to use the bus before disconnecting, if granted the privilege and not restricted by <see cref="DTDC"/>
/// Max. time in 100 µs increments allowed to use the bus before disconnecting, if granted the privilege and not
/// restricted by <see cref="DTDC" />
/// </summary>
public ushort ConnectTimeLimit;
/// <summary>

View File

@@ -93,7 +93,7 @@ namespace DiscImageChef.Decoders.SCSI
/// </summary>
public ushort HeadSettleDelay;
/// <summary>
/// If <see cref="TRDY"/> is <c>true</c>, specified in 1/10s of a
/// If <see cref="TRDY" /> is <c>true</c>, specified in 1/10s of a
/// second the time waiting for read status before aborting medium
/// access. Otherwise, indicates time to way before medimum access
/// after motor on signal is asserted.

View File

@@ -107,7 +107,7 @@ namespace DiscImageChef.Decoders.SCSI
/// </summary>
public bool Disc;
/// <summary>
/// <see cref="CacheSegmentSize"/> is to be used to control caching segmentation
/// <see cref="CacheSegmentSize" /> is to be used to control caching segmentation
/// </summary>
public bool Size;
/// <summary>

View File

@@ -62,7 +62,8 @@ namespace DiscImageChef.Decoders.SCSI
/// </summary>
public byte QueueAlgorithm;
/// <summary>
/// If set all remaining suspended I/O processes shall be aborted after the contingent allegiance condition or extended contingent allegiance condition
/// If set all remaining suspended I/O processes shall be aborted after the contingent allegiance condition or extended
/// contingent allegiance condition
/// </summary>
public byte QErr;
/// <summary>
@@ -129,7 +130,8 @@ namespace DiscImageChef.Decoders.SCSI
/// </summary>
public bool TMF_ONLY;
/// <summary>
/// Device shall return descriptor format sense data when returning sense data in the same transactions as a CHECK CONDITION
/// Device shall return descriptor format sense data when returning sense data in the same transactions as a CHECK
/// CONDITION
/// </summary>
public bool D_SENSE;
/// <summary>

View File

@@ -61,11 +61,11 @@ namespace DiscImageChef.Decoders.SCSI
/// </summary>
public bool SOTC;
/// <summary>
/// Indicates <see cref="BlocksPerSecondOfAudio"/> is valid
/// Indicates <see cref="BlocksPerSecondOfAudio" /> is valid
/// </summary>
public bool APRVal;
/// <summary>
/// Multiplier for <see cref="BlocksPerSecondOfAudio"/>
/// Multiplier for <see cref="BlocksPerSecondOfAudio" />
/// </summary>
public byte LBAFormat;
/// <summary>

View File

@@ -53,11 +53,11 @@ namespace DiscImageChef.Decoders.SCSI
/// </summary>
public bool PS;
/// <summary>
/// Used in mode select to change partition to one specified in <see cref="ActivePartition"/>
/// Used in mode select to change partition to one specified in <see cref="ActivePartition" />
/// </summary>
public bool CAP;
/// <summary>
/// Used in mode select to change format to one specified in <see cref="ActiveFormat"/>
/// Used in mode select to change format to one specified in <see cref="ActiveFormat" />
/// </summary>
public bool CAF;
/// <summary>

View File

@@ -196,8 +196,7 @@ namespace DiscImageChef.Decoders.SCSI
sb.AppendLine("\tDevice shall erase all partitions on MODE SELECT for partitioning");
else if(!page.CLEAR)
sb.AppendLine("\tDevice shall not erase any partition on MODE SELECT for partitioning");
else
sb.AppendLine("\tDevice shall erase all partitions differing on size on MODE SELECT for partitioning");
else sb.AppendLine("\tDevice shall erase all partitions differing on size on MODE SELECT for partitioning");
string measure;

View File

@@ -283,13 +283,11 @@ namespace DiscImageChef.Decoders.SCSI
decoded.WriteSpeedPerformanceDescriptors = new ModePage_2A_WriteDescriptor[descriptors];
for(int i = 0; i < descriptors; i++)
{
decoded.WriteSpeedPerformanceDescriptors[i] = new ModePage_2A_WriteDescriptor
{
RotationControl = (byte)(pageResponse[1 + 32 + i * 4] & 0x07),
WriteSpeed = (ushort)((pageResponse[2 + 32 + i * 4] << 8) + pageResponse[3 + 32 + i * 4])
};
}
return decoded;
}
@@ -355,11 +353,9 @@ namespace DiscImageChef.Decoders.SCSI
: "\tDrive is not locked, media can be ejected and inserted");
}
else
{
sb.AppendLine(page.LockState
? "\tDrive is locked, media cannot be ejected, but if empty, can be inserted"
: "\tDrive is not locked, media can be ejected and inserted");
}
if(page.Eject) sb.AppendLine("\tDrive can eject media");
if(page.SeparateChannelMute) sb.AppendLine("\tEach channel can be muted independently");
@@ -414,9 +410,11 @@ namespace DiscImageChef.Decoders.SCSI
}
if(page.WriteSpeedPerformanceDescriptors != null)
foreach(ModePage_2A_WriteDescriptor descriptor in page.WriteSpeedPerformanceDescriptors.Where(descriptor => descriptor.WriteSpeed > 0)) if(descriptor.RotationControl == 0)
sb.AppendFormat("\tDrive supports writing at {0} Kbyte/sec. in CLV mode",
descriptor.WriteSpeed).AppendLine();
foreach(ModePage_2A_WriteDescriptor descriptor in
page.WriteSpeedPerformanceDescriptors.Where(descriptor => descriptor.WriteSpeed > 0))
if(descriptor.RotationControl == 0)
sb.AppendFormat("\tDrive supports writing at {0} Kbyte/sec. in CLV mode", descriptor.WriteSpeed)
.AppendLine();
else if(descriptor.RotationControl == 1)
sb.AppendFormat("\tDrive supports writing at is {0} Kbyte/sec. in pure CAV mode",
descriptor.WriteSpeed).AppendLine();

View File

@@ -86,7 +86,9 @@ namespace DiscImageChef.Decoders.SCSI
if(page.PS) sb.AppendLine("\tParameters can be saved");
sb.AppendLine(page.CDmode ? "\tDrive is emulating a CD-ROM drive" : "\tDrive is not emulating a CD-ROM drive");
sb.AppendLine(page.CDmode
? "\tDrive is emulating a CD-ROM drive"
: "\tDrive is not emulating a CD-ROM drive");
if(page.NonAuto) sb.AppendLine("\tDrive will not exit emulation automatically");
return sb.ToString();

View File

@@ -146,8 +146,7 @@ namespace DiscImageChef.Decoders.SCSI
else
sb.AppendFormat("\t{0} blocks have {1} and are {2} bytes each", descriptor.Blocks,
density, descriptor.BlockLength).AppendLine();
else
if(descriptor.Blocks == 0)
else if(descriptor.Blocks == 0)
sb.AppendFormat("\tAll remaining blocks are {0} bytes each", descriptor.BlockLength)
.AppendLine();
else
@@ -1421,25 +1420,20 @@ namespace DiscImageChef.Decoders.SCSI
else
sb.AppendFormat("\tAll remaining blocks conform to {0} and are {1} bytes each",
density, descriptor.BlockLength).AppendLine();
else
if(descriptor.BlockLength == 0)
else if(descriptor.BlockLength == 0)
sb.AppendFormat("\t{0} blocks conform to {1} and have a variable length",
descriptor.Blocks, density).AppendLine();
else
sb.AppendFormat("\t{0} blocks conform to {1} and are {2} bytes each",
descriptor.Blocks, density, descriptor.BlockLength)
.AppendLine();
else
if(descriptor.Blocks == 0)
descriptor.Blocks, density, descriptor.BlockLength).AppendLine();
else if(descriptor.Blocks == 0)
if(descriptor.BlockLength == 0)
sb.AppendFormat("\tAll remaining blocks have a variable length").AppendLine();
else
sb.AppendFormat("\tAll remaining blocks are {0} bytes each",
descriptor.BlockLength).AppendLine();
else
if(descriptor.BlockLength == 0)
sb.AppendFormat("\t{0} blocks have a variable length", descriptor.Blocks)
sb.AppendFormat("\tAll remaining blocks are {0} bytes each", descriptor.BlockLength)
.AppendLine();
else if(descriptor.BlockLength == 0)
sb.AppendFormat("\t{0} blocks have a variable length", descriptor.Blocks).AppendLine();
else
sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
descriptor.BlockLength).AppendLine();
@@ -1563,25 +1557,20 @@ namespace DiscImageChef.Decoders.SCSI
else
sb.AppendFormat("\tAll remaining blocks are {0} and are {1} bytes each",
density, descriptor.BlockLength).AppendLine();
else
if(descriptor.BlockLength == 0)
else if(descriptor.BlockLength == 0)
sb.AppendFormat("\t{0} blocks are {1} and have a variable length",
descriptor.Blocks, density).AppendLine();
else
sb.AppendFormat("\t{0} blocks are {1} and are {2} bytes each",
descriptor.Blocks, density, descriptor.BlockLength)
.AppendLine();
else
if(descriptor.Blocks == 0)
sb.AppendFormat("\t{0} blocks are {1} and are {2} bytes each", descriptor.Blocks,
density, descriptor.BlockLength).AppendLine();
else if(descriptor.Blocks == 0)
if(descriptor.BlockLength == 0)
sb.AppendFormat("\tAll remaining blocks have a variable length").AppendLine();
else
sb.AppendFormat("\tAll remaining blocks are {0} bytes each",
descriptor.BlockLength).AppendLine();
else
if(descriptor.BlockLength == 0)
sb.AppendFormat("\t{0} blocks have a variable length", descriptor.Blocks)
sb.AppendFormat("\tAll remaining blocks are {0} bytes each", descriptor.BlockLength)
.AppendLine();
else if(descriptor.BlockLength == 0)
sb.AppendFormat("\t{0} blocks have a variable length", descriptor.Blocks).AppendLine();
else
sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
descriptor.BlockLength).AppendLine();
@@ -1758,8 +1747,7 @@ namespace DiscImageChef.Decoders.SCSI
else
sb.AppendFormat("\t{0} blocks have {1} and are {2} bytes each", descriptor.Blocks,
density, descriptor.BlockLength).AppendLine();
else
if(descriptor.Blocks == 0)
else if(descriptor.Blocks == 0)
sb.AppendFormat("\tAll remaining blocks are {0} bytes each", descriptor.BlockLength)
.AppendLine();
else

View File

@@ -103,7 +103,8 @@ namespace DiscImageChef.Decoders.SCSI
}
}
switch(deviceType) {
switch(deviceType)
{
case PeripheralDeviceTypes.DirectAccess:
case PeripheralDeviceTypes.MultiMediaDevice:
header.WriteProtected = (modeResponse[3] & 0x80) == 0x80;
@@ -114,7 +115,8 @@ namespace DiscImageChef.Decoders.SCSI
header.Speed = (byte)(modeResponse[3] & 0x0F);
header.BufferedMode = (byte)((modeResponse[3] & 0x70) >> 4);
break;
case PeripheralDeviceTypes.PrinterDevice: header.BufferedMode = (byte)((modeResponse[3] & 0x70) >> 4);
case PeripheralDeviceTypes.PrinterDevice:
header.BufferedMode = (byte)((modeResponse[3] & 0x70) >> 4);
break;
case PeripheralDeviceTypes.OpticalDevice:
header.WriteProtected = (modeResponse[3] & 0x80) == 0x80;
@@ -200,17 +202,21 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static byte[] EncodeModeHeader10(ModeHeader header, PeripheralDeviceTypes deviceType, bool longLBA = false)
public static byte[] EncodeModeHeader10(ModeHeader header, PeripheralDeviceTypes deviceType,
bool longLBA = false)
{
byte[] hdr;
if(header.BlockDescriptors != null)
hdr = longLBA ? new byte[8 + header.BlockDescriptors.Length * 16] : new byte[8 + header.BlockDescriptors.Length * 8];
hdr = longLBA
? new byte[8 + header.BlockDescriptors.Length * 16]
: new byte[8 + header.BlockDescriptors.Length * 8];
else hdr = new byte[8];
hdr[2] = (byte)header.MediumType;
switch(deviceType) {
switch(deviceType)
{
case PeripheralDeviceTypes.DirectAccess:
case PeripheralDeviceTypes.MultiMediaDevice:
if(header.WriteProtected) hdr[3] += 0x80;
@@ -221,7 +227,8 @@ namespace DiscImageChef.Decoders.SCSI
hdr[3] += (byte)(header.Speed & 0x0F);
hdr[3] += (byte)((header.BufferedMode << 4) & 0x70);
break;
case PeripheralDeviceTypes.PrinterDevice: hdr[3] += (byte)((header.BufferedMode << 4) & 0x70);
case PeripheralDeviceTypes.PrinterDevice:
hdr[3] += (byte)((header.BufferedMode << 4) & 0x70);
break;
case PeripheralDeviceTypes.OpticalDevice:
if(header.WriteProtected) hdr[3] += 0x80;

View File

@@ -64,7 +64,8 @@ namespace DiscImageChef.Decoders.SCSI
}
}
switch(deviceType) {
switch(deviceType)
{
case PeripheralDeviceTypes.DirectAccess:
case PeripheralDeviceTypes.MultiMediaDevice:
header.WriteProtected = (modeResponse[2] & 0x80) == 0x80;
@@ -75,7 +76,8 @@ namespace DiscImageChef.Decoders.SCSI
header.Speed = (byte)(modeResponse[2] & 0x0F);
header.BufferedMode = (byte)((modeResponse[2] & 0x70) >> 4);
break;
case PeripheralDeviceTypes.PrinterDevice: header.BufferedMode = (byte)((modeResponse[2] & 0x70) >> 4);
case PeripheralDeviceTypes.PrinterDevice:
header.BufferedMode = (byte)((modeResponse[2] & 0x70) >> 4);
break;
case PeripheralDeviceTypes.OpticalDevice:
header.WriteProtected = (modeResponse[2] & 0x80) == 0x80;
@@ -160,11 +162,14 @@ namespace DiscImageChef.Decoders.SCSI
public static byte[] EncodeModeHeader6(ModeHeader header, PeripheralDeviceTypes deviceType)
{
byte[] hdr = header.BlockDescriptors != null ? new byte[4 + header.BlockDescriptors.Length * 8] : new byte[4];
byte[] hdr = header.BlockDescriptors != null
? new byte[4 + header.BlockDescriptors.Length * 8]
: new byte[4];
hdr[1] = (byte)header.MediumType;
switch(deviceType) {
switch(deviceType)
{
case PeripheralDeviceTypes.DirectAccess:
case PeripheralDeviceTypes.MultiMediaDevice:
if(header.WriteProtected) hdr[2] += 0x80;
@@ -175,7 +180,8 @@ namespace DiscImageChef.Decoders.SCSI
hdr[2] += (byte)(header.Speed & 0x0F);
hdr[2] += (byte)((header.BufferedMode << 4) & 0x70);
break;
case PeripheralDeviceTypes.PrinterDevice: hdr[2] += (byte)((header.BufferedMode << 4) & 0x70);
case PeripheralDeviceTypes.PrinterDevice:
hdr[2] += (byte)((header.BufferedMode << 4) & 0x70);
break;
case PeripheralDeviceTypes.OpticalDevice:
if(header.WriteProtected) hdr[2] += 0x80;

View File

@@ -44,7 +44,7 @@ namespace DiscImageChef.Decoders.SCSI.SSC
public struct BlockLimitsData
{
/// <summary>
/// All blocks size must be multiple of 2^<cref name="granularity"/>
/// All blocks size must be multiple of 2^<cref name="granularity" />
/// </summary>
public byte granularity;
/// <summary>
@@ -86,8 +86,7 @@ namespace DiscImageChef.Decoders.SCSI.SSC
if(decoded.Value.granularity > 0)
sb.AppendFormat("Device's needs a block size granularity of 2^{0} ({1}) bytes",
decoded.Value.granularity, Math.Pow(2, decoded.Value.granularity))
.AppendLine();
decoded.Value.granularity, Math.Pow(2, decoded.Value.granularity)).AppendLine();
}
return sb.ToString();

View File

@@ -167,8 +167,7 @@ namespace DiscImageChef.Decoders.SCSI.SSC
if(descriptor.duplicate) sb.AppendLine("\tThis descriptor is duplicated");
if(descriptor.defaultDensity) sb.AppendLine("\tThis is the default density on the drive");
sb.AppendFormat("\tDensity has {0} bits per mm, with {1} tracks in a {2} mm width tape",
descriptor.bpmm, descriptor.tracks, descriptor.width / (double)10)
.AppendLine();
descriptor.bpmm, descriptor.tracks, descriptor.width / (double)10).AppendLine();
sb.AppendFormat("\tDensity maximum capacity is {0} megabytes", descriptor.capacity).AppendLine();
sb.AppendFormat("\tDensity description: {0}", descriptor.description).AppendLine();
sb.AppendLine();
@@ -258,8 +257,8 @@ namespace DiscImageChef.Decoders.SCSI.SSC
sb.AppendLine();
}
sb.AppendFormat("\tMedium has a nominal length of {0} m in a {1} mm width tape",
descriptor.length, descriptor.width / (double)10).AppendLine();
sb.AppendFormat("\tMedium has a nominal length of {0} m in a {1} mm width tape", descriptor.length,
descriptor.width / (double)10).AppendLine();
sb.AppendFormat("\tMedium description: {0}", descriptor.description).AppendLine();
sb.AppendLine();
}

View File

@@ -55,7 +55,7 @@ namespace DiscImageChef.Decoders.SCSI
public struct StandardSense
{
/// <summary>
/// If set, <see cref="LBA"/> is valid
/// If set, <see cref="LBA" /> is valid
/// </summary>
public bool AddressValid;
/// <summary>
@@ -152,7 +152,7 @@ namespace DiscImageChef.Decoders.SCSI
public struct FixedSense
{
/// <summary>
/// If set, <see cref="Information"/> is valid
/// If set, <see cref="Information" /> is valid
/// </summary>
public bool InformationValid;
/// <summary>
@@ -197,7 +197,7 @@ namespace DiscImageChef.Decoders.SCSI
public byte ASCQ;
public byte FieldReplaceable;
/// <summary>
/// If set, <see cref="SenseKeySpecific"/> is valid
/// If set, <see cref="SenseKeySpecific" /> is valid
/// </summary>
public bool SKSV;
public uint SenseKeySpecific;
@@ -425,8 +425,8 @@ namespace DiscImageChef.Decoders.SCSI
if((decoded.SenseKeySpecific & 0x200000) == 0x200000)
sb.AppendFormat("Invalid value in bit {0} in field {1} of CDB",
(decoded.SenseKeySpecific & 0x70000) >> 16,
decoded.SenseKeySpecific & 0xFFFF).AppendLine();
(decoded.SenseKeySpecific & 0x70000) >> 16, decoded.SenseKeySpecific & 0xFFFF)
.AppendLine();
else
sb.AppendFormat("Invalid value in field {0} of CDB", decoded.SenseKeySpecific & 0xFFFF)
.AppendLine();

View File

@@ -45,7 +45,8 @@ namespace DiscImageChef.Decoders.SCSI
/// </summary>
ECMA54 = 0x09,
/// <summary>
/// ECMA-59 &amp; ANSI X3.121-1984: 200 mm Flexible Disk Cartridge using Two-Frequency Recording at 13262 ftprad on Both Sides
/// ECMA-59 &amp; ANSI X3.121-1984: 200 mm Flexible Disk Cartridge using Two-Frequency Recording at 13262 ftprad on
/// Both Sides
/// </summary>
ECMA59 = 0x0A,
/// <summary>
@@ -57,19 +58,23 @@ namespace DiscImageChef.Decoders.SCSI
/// </summary>
ECMA66 = 0x0E,
/// <summary>
/// ECMA-70 &amp; ANSI X3.125-1985: 130 mm Flexible Disk Cartridge using MFM Recording at 7958 ftprad on Both Sides; 1,9 Tracks per mm
/// ECMA-70 &amp; ANSI X3.125-1985: 130 mm Flexible Disk Cartridge using MFM Recording at 7958 ftprad on Both Sides;
/// 1,9 Tracks per mm
/// </summary>
ECMA70 = 0x12,
/// <summary>
/// ECMA-78 &amp; ANSI X3.126-1986: 130 mm Flexible Disk Cartridge using MFM Recording at 7958 ftprad on Both Sides; 3,8 Tracks per mm
/// ECMA-78 &amp; ANSI X3.126-1986: 130 mm Flexible Disk Cartridge using MFM Recording at 7958 ftprad on Both Sides;
/// 3,8 Tracks per mm
/// </summary>
ECMA78 = 0x16,
/// <summary>
/// ECMA-99 &amp; ISO 8630-1985: 130 mm Flexible Disk Cartridge using MFM Recording at 13262 ftprad on Both Sides; 3,8 Tracks per mm
/// ECMA-99 &amp; ISO 8630-1985: 130 mm Flexible Disk Cartridge using MFM Recording at 13262 ftprad on Both Sides; 3,8
/// Tracks per mm
/// </summary>
ECMA99 = 0x1A,
/// <summary>
/// ECMA-100 &amp; ANSI X3.137: 90 mm Flexible Disk Cartridge using MFM Recording at 7859 ftprad on Both Sides; 5,3 Tracks per mm
/// ECMA-100 &amp; ANSI X3.137: 90 mm Flexible Disk Cartridge using MFM Recording at 7859 ftprad on Both Sides; 5,3
/// Tracks per mm
/// </summary>
ECMA100 = 0x1E,
#endregion Medium Types defined in ECMA-111 for Direct-Access devices
@@ -626,7 +631,8 @@ namespace DiscImageChef.Decoders.SCSI
/// </summary>
ECMA79 = 0x07,
/// <summary>
/// Draft ECMA &amp; ANSI X3B5/87-099: 12,7 mm Magnetic Tape Cartridge using IFM Recording on 18 Tracks at 1944 ftpmm, GCR (IBM 3480, 3490, 3490E)
/// Draft ECMA &amp; ANSI X3B5/87-099: 12,7 mm Magnetic Tape Cartridge using IFM Recording on 18 Tracks at 1944 ftpmm,
/// GCR (IBM 3480, 3490, 3490E)
/// </summary>
IBM3480 = 0x09,
/// <summary>

View File

@@ -189,7 +189,9 @@ namespace DiscImageChef.Decoders.Sega
provider);
}
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
catch { // ignored
catch
{
// ignored
}
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
}

View File

@@ -235,7 +235,8 @@ namespace DiscImageChef.Decoders.Xbox
sb.Append("-");
switch(decoded.CatalogNumber.Length) {
switch(decoded.CatalogNumber.Length)
{
case 13:
for(int i = 8; i < 10; i++) sb.AppendFormat("{0}", decoded.CatalogNumber[i]);

View File

@@ -265,7 +265,6 @@ namespace DiscImageChef.Decoders.Xbox
Array.Copy(response, 724, ss.Unknown5, 0, 43);
for(int i = 0; i < 23; i++)
{
ss.ChallengeEntries[i] = new ChallengeEntry
{
Level = response[770 + i * 11 + 0],
@@ -277,7 +276,6 @@ namespace DiscImageChef.Decoders.Xbox
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);
Array.Copy(response, 1120, ss.Unknown8, 0, 16);
@@ -285,7 +283,6 @@ namespace DiscImageChef.Decoders.Xbox
Array.Copy(response, 1208, ss.Unknown10, 0, 303);
Array.Copy(response, 1528, ss.Unknown11, 0, 104);
for(int i = 0; i < 23; i++)
{
ss.Extents[i] = new SecuritySectorExtent
{
Unknown =
@@ -297,10 +294,8 @@ namespace DiscImageChef.Decoders.Xbox
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 =
@@ -312,7 +307,6 @@ namespace DiscImageChef.Decoders.Xbox
EndPSN = (uint)((response[1840 + i * 9 + 6] << 16) + (response[1840 + i * 9 + 7] << 8) +
response[1840 + i * 9 + 8])
};
}
return ss;
}