REFACTOR: Reformat code.

This commit is contained in:
2017-12-19 20:33:03 +00:00
parent 77edc7c91c
commit e6f6ace80b
704 changed files with 82627 additions and 83641 deletions

View File

@@ -219,8 +219,7 @@ namespace DiscImageChef.Decoders.CD
public static CDATIP? Decode(byte[] CDATIPResponse)
{
if(CDATIPResponse == null)
return null;
if(CDATIPResponse == null) return null;
CDATIP decoded = new CDATIP();
@@ -228,7 +227,9 @@ namespace DiscImageChef.Decoders.CD
if(CDATIPResponse.Length != 32 && CDATIPResponse.Length != 28)
{
DicConsole.DebugWriteLine("CD ATIP decoder", "Expected CD ATIP size (32 bytes) is not received size ({0} bytes), not decoding", CDATIPResponse.Length);
DicConsole.DebugWriteLine("CD ATIP decoder",
"Expected CD ATIP size (32 bytes) is not received size ({0} bytes), not decoding",
CDATIPResponse.Length);
return null;
}
@@ -283,8 +284,7 @@ namespace DiscImageChef.Decoders.CD
public static string Prettify(CDATIP? CDATIPResponse)
{
if(CDATIPResponse == null)
return null;
if(CDATIPResponse == null) return null;
CDATIP response = CDATIPResponse.Value;
@@ -293,10 +293,8 @@ namespace DiscImageChef.Decoders.CD
if(response.DDCD)
{
sb.AppendFormat("Indicative Target Writing Power: 0x{0:X2}", response.ITWP).AppendLine();
if(response.DiscType)
sb.AppendLine("Disc is DDCD-RW");
else
sb.AppendLine("Disc is DDCD-R");
if(response.DiscType) sb.AppendLine("Disc is DDCD-RW");
else sb.AppendLine("Disc is DDCD-R");
switch(response.ReferenceSpeed)
{
case 2:
@@ -309,9 +307,16 @@ namespace DiscImageChef.Decoders.CD
sb.AppendFormat("Reference speed set is unknown: {0}", response.ReferenceSpeed).AppendLine();
break;
}
sb.AppendFormat("ATIP Start time of Lead-in: 0x{0:X6}", (response.LeadInStartMin << 16) + (response.LeadInStartSec << 8) + response.LeadInStartFrame).AppendLine();
sb.AppendFormat("ATIP Last possible start time of Lead-out: 0x{0:X6}", (response.LeadOutStartMin << 16) + (response.LeadOutStartSec << 8) + response.LeadOutStartFrame).AppendLine();
sb.AppendFormat("S4 value: 0x{0:X6}", (response.S4Values[0] << 16) + (response.S4Values[1] << 8) + response.S4Values[2]).AppendLine();
sb.AppendFormat("ATIP Start time of Lead-in: 0x{0:X6}",
(response.LeadInStartMin << 16) + (response.LeadInStartSec << 8) +
response.LeadInStartFrame).AppendLine();
sb.AppendFormat("ATIP Last possible start time of Lead-out: 0x{0:X6}",
(response.LeadOutStartMin << 16) + (response.LeadOutStartSec << 8) +
response.LeadOutStartFrame).AppendLine();
sb.AppendFormat("S4 value: 0x{0:X6}",
(response.S4Values[0] << 16) + (response.S4Values[1] << 8) + response.S4Values[2])
.AppendLine();
}
else
{
@@ -354,7 +359,8 @@ namespace DiscImageChef.Decoders.CD
sb.AppendLine("Reference speed is 2x");
break;
default:
sb.AppendFormat("Reference speed set is unknown: {0}", response.ReferenceSpeed).AppendLine();
sb.AppendFormat("Reference speed set is unknown: {0}", response.ReferenceSpeed)
.AppendLine();
break;
}
}
@@ -393,21 +399,30 @@ namespace DiscImageChef.Decoders.CD
}
}
if(response.URU)
sb.AppendLine("Disc use is unrestricted");
else
sb.AppendLine("Disc use is restricted");
if(response.URU) sb.AppendLine("Disc use is unrestricted");
else sb.AppendLine("Disc use is restricted");
sb.AppendFormat("ATIP Start time of Lead-in: {0}:{1:D2}:{2:D2}", response.LeadInStartMin, response.LeadInStartSec, response.LeadInStartFrame).AppendLine();
sb.AppendFormat("ATIP Last possible start time of Lead-out: {0}:{1:D2}:{2:D2}", response.LeadOutStartMin, response.LeadOutStartSec, response.LeadOutStartFrame).AppendLine();
sb.AppendFormat("ATIP Start time of Lead-in: {0}:{1:D2}:{2:D2}", response.LeadInStartMin,
response.LeadInStartSec, response.LeadInStartFrame).AppendLine();
sb.AppendFormat("ATIP Last possible start time of Lead-out: {0}:{1:D2}:{2:D2}",
response.LeadOutStartMin, response.LeadOutStartSec, response.LeadOutStartFrame)
.AppendLine();
if(response.A1Valid)
sb.AppendFormat("A1 value: 0x{0:X6}", (response.A1Values[0] << 16) + (response.A1Values[1] << 8) + response.A1Values[2]).AppendLine();
sb.AppendFormat("A1 value: 0x{0:X6}",
(response.A1Values[0] << 16) + (response.A1Values[1] << 8) + response.A1Values[2])
.AppendLine();
if(response.A2Valid)
sb.AppendFormat("A2 value: 0x{0:X6}", (response.A2Values[0] << 16) + (response.A2Values[1] << 8) + response.A2Values[2]).AppendLine();
sb.AppendFormat("A2 value: 0x{0:X6}",
(response.A2Values[0] << 16) + (response.A2Values[1] << 8) + response.A2Values[2])
.AppendLine();
if(response.A3Valid)
sb.AppendFormat("A3 value: 0x{0:X6}", (response.A3Values[0] << 16) + (response.A3Values[1] << 8) + response.A3Values[2]).AppendLine();
sb.AppendFormat("A3 value: 0x{0:X6}",
(response.A3Values[0] << 16) + (response.A3Values[1] << 8) + response.A3Values[2])
.AppendLine();
if(response.S4Values != null)
sb.AppendFormat("S4 value: 0x{0:X6}", (response.S4Values[0] << 16) + (response.S4Values[1] << 8) + response.S4Values[2]).AppendLine();
sb.AppendFormat("S4 value: 0x{0:X6}",
(response.S4Values[0] << 16) + (response.S4Values[1] << 8) + response.S4Values[2])
.AppendLine();
}
if(response.LeadInStartMin == 97)
@@ -416,20 +431,16 @@ namespace DiscImageChef.Decoders.CD
int frm = response.LeadInStartFrame - type;
string manufacturer = "";
if(response.DiscType)
sb.AppendLine("Disc uses phase change");
if(response.DiscType) sb.AppendLine("Disc uses phase change");
else
{
if(type < 5)
sb.AppendLine("Disc uses long strategy type dye (Cyanine, AZO, etc...)");
else
sb.AppendLine("Disc uses short strategy type dye (Phthalocyanine, etc...)");
if(type < 5) sb.AppendLine("Disc uses long strategy type dye (Cyanine, AZO, etc...)");
else sb.AppendLine("Disc uses short strategy type dye (Phthalocyanine, etc...)");
}
manufacturer = ManufacturerFromATIP(response.LeadInStartSec, frm);
if(manufacturer != "")
sb.AppendFormat("Disc manufactured by: {0}", manufacturer).AppendLine();
if(manufacturer != "") sb.AppendFormat("Disc manufactured by: {0}", manufacturer).AppendLine();
}
return sb.ToString();
@@ -446,285 +457,198 @@ namespace DiscImageChef.Decoders.CD
switch(sec)
{
case 15:
if(frm == 00)
return "TDK Corporation";
if(frm == 10)
return "Ritek Co.";
if(frm == 20)
return "Mitsubishi Chemical Corporation";
if(frm == 30)
return "NAN-YA Plastics Corporation";
if(frm == 00) return "TDK Corporation";
if(frm == 10) return "Ritek Co.";
if(frm == 20) return "Mitsubishi Chemical Corporation";
if(frm == 30) return "NAN-YA Plastics Corporation";
break;
case 16:
if(frm == 20)
return "Shenzen SG&Gast Digital Optical Discs";
if(frm == 30)
return "Grand Advance Technology Ltd.";
if(frm == 20) return "Shenzen SG&Gast Digital Optical Discs";
if(frm == 30) return "Grand Advance Technology Ltd.";
break;
case 17:
if(frm == 00)
return "Moser Baer India Limited";
if(frm == 00) return "Moser Baer India Limited";
break;
case 18:
if(frm == 10)
return "Wealth Fair Investment Ltd.";
if(frm == 60)
return "Taroko International Co. Ltd.";
if(frm == 10) return "Wealth Fair Investment Ltd.";
if(frm == 60) return "Taroko International Co. Ltd.";
break;
case 20:
if(frm == 10)
return "CDA Datenträger Albrechts GmbH";
if(frm == 10) return "CDA Datenträger Albrechts GmbH";
break;
case 21:
if(frm == 10)
return "Grupo Condor S.L.";
if(frm == 30)
return "Bestdisc Technology Corporation";
if(frm == 40)
return "Optical Disc Manufacturing Equipment";
if(frm == 50)
return "Sound Sound Multi-Media Development Ltd.";
if(frm == 10) return "Grupo Condor S.L.";
if(frm == 30) return "Bestdisc Technology Corporation";
if(frm == 40) return "Optical Disc Manufacturing Equipment";
if(frm == 50) return "Sound Sound Multi-Media Development Ltd.";
break;
case 22:
if(frm == 00)
return "Woongjin Media Corp.";
if(frm == 10)
return "Seantram Technology Inc.";
if(frm == 20)
return "Advanced Digital Media";
if(frm == 30)
return "EXIMPO";
if(frm == 40)
return "CIS Technology Inc.";
if(frm == 50)
return "Hong Kong Digital Technology Co., Ltd.";
if(frm == 60)
return "Acer Media Technology, Inc.";
if(frm == 00) return "Woongjin Media Corp.";
if(frm == 10) return "Seantram Technology Inc.";
if(frm == 20) return "Advanced Digital Media";
if(frm == 30) return "EXIMPO";
if(frm == 40) return "CIS Technology Inc.";
if(frm == 50) return "Hong Kong Digital Technology Co., Ltd.";
if(frm == 60) return "Acer Media Technology, Inc.";
break;
case 23:
if(frm == 00)
return "Matsushita Electric Industrial Co., Ltd.";
if(frm == 10)
return "Doremi Media Co., Ltd.";
if(frm == 20)
return "Nacar Media s.r.l.";
if(frm == 30)
return "Audio Distributors Co., Ltd.";
if(frm == 40)
return "Victor Company of Japan, Ltd.";
if(frm == 50)
return "Optrom Inc.";
if(frm == 60)
return "Customer Pressing Oosterhout";
if(frm == 00) return "Matsushita Electric Industrial Co., Ltd.";
if(frm == 10) return "Doremi Media Co., Ltd.";
if(frm == 20) return "Nacar Media s.r.l.";
if(frm == 30) return "Audio Distributors Co., Ltd.";
if(frm == 40) return "Victor Company of Japan, Ltd.";
if(frm == 50) return "Optrom Inc.";
if(frm == 60) return "Customer Pressing Oosterhout";
break;
case 24:
if(frm == 00)
return "Taiyo Yuden Company Ltd.";
if(frm == 10)
return "SONY Corporation";
if(frm == 20)
return "Computer Support Italy s.r.l.";
if(frm == 30)
return "Unitech Japan Inc.";
if(frm == 40)
return "kdg mediatech AG";
if(frm == 50)
return "Guann Yinn Co., Ltd.";
if(frm == 60)
return "Harmonic Hall Optical Disc Ltd.";
if(frm == 00) return "Taiyo Yuden Company Ltd.";
if(frm == 10) return "SONY Corporation";
if(frm == 20) return "Computer Support Italy s.r.l.";
if(frm == 30) return "Unitech Japan Inc.";
if(frm == 40) return "kdg mediatech AG";
if(frm == 50) return "Guann Yinn Co., Ltd.";
if(frm == 60) return "Harmonic Hall Optical Disc Ltd.";
break;
case 25:
if(frm == 00)
return "MPO";
if(frm == 20)
return "Hitachi Maxell, Ltd.";
if(frm == 30)
return "Infodisc Technology Co. Ltd.";
if(frm == 40)
return "Vivastar AG";
if(frm == 50)
return "AMS Technology Inc.";
if(frm == 60)
return "Xcitec Inc.";
if(frm == 00) return "MPO";
if(frm == 20) return "Hitachi Maxell, Ltd.";
if(frm == 30) return "Infodisc Technology Co. Ltd.";
if(frm == 40) return "Vivastar AG";
if(frm == 50) return "AMS Technology Inc.";
if(frm == 60) return "Xcitec Inc.";
break;
case 26:
if(frm == 00)
return "Fornet International Pte Ltd.";
if(frm == 10)
return "POSTECH Corporation";
if(frm == 20)
return "SKC Co., Ltd.";
if(frm == 30)
return "Optical Disc Corporation";
if(frm == 40)
return "FUJI Photo Film Co., Ltd.";
if(frm == 50)
return "Lead Data Inc.";
if(frm == 60)
return "CMC Magnetics Corporation";
if(frm == 00) return "Fornet International Pte Ltd.";
if(frm == 10) return "POSTECH Corporation";
if(frm == 20) return "SKC Co., Ltd.";
if(frm == 30) return "Optical Disc Corporation";
if(frm == 40) return "FUJI Photo Film Co., Ltd.";
if(frm == 50) return "Lead Data Inc.";
if(frm == 60) return "CMC Magnetics Corporation";
break;
case 27:
if(frm == 00)
return "Digital Storage Technology Co., Ltd.";
if(frm == 10)
return "Plasmon Data systems Ltd.";
if(frm == 20)
return "Princo Corporation";
if(frm == 30)
return "Pioneer Video Corporation";
if(frm == 40)
return "Kodak Japan Ltd.";
if(frm == 50)
return "Mitsui Chemicals, Inc.";
if(frm == 60)
return "Ricoh Company Ltd.";
if(frm == 00) return "Digital Storage Technology Co., Ltd.";
if(frm == 10) return "Plasmon Data systems Ltd.";
if(frm == 20) return "Princo Corporation";
if(frm == 30) return "Pioneer Video Corporation";
if(frm == 40) return "Kodak Japan Ltd.";
if(frm == 50) return "Mitsui Chemicals, Inc.";
if(frm == 60) return "Ricoh Company Ltd.";
break;
case 28:
if(frm == 00)
return "Opti.Me.S. S.p.A.";
if(frm == 10)
return "Gigastore Corporation";
if(frm == 20)
return "Multi Media Masters & Machinary SA";
if(frm == 30)
return "Auvistar Industry Co., Ltd.";
if(frm == 40)
return "King Pro Mediatek Inc.";
if(frm == 50)
return "Delphi Technology Inc.";
if(frm == 60)
return "Friendly CD-Tek Co.";
if(frm == 00) return "Opti.Me.S. S.p.A.";
if(frm == 10) return "Gigastore Corporation";
if(frm == 20) return "Multi Media Masters & Machinary SA";
if(frm == 30) return "Auvistar Industry Co., Ltd.";
if(frm == 40) return "King Pro Mediatek Inc.";
if(frm == 50) return "Delphi Technology Inc.";
if(frm == 60) return "Friendly CD-Tek Co.";
break;
case 29:
if(frm == 00)
return "Taeil Media Co., Ltd.";
if(frm == 10)
return "Vanguard Disc Inc.";
if(frm == 20)
return "Unidisc Technology Co., Ltd.";
if(frm == 30)
return "Hile Optical Disc Technology Corp.";
if(frm == 40)
return "Viva Magnetics Ltd.";
if(frm == 50)
return "General Magnetics Ltd.";
if(frm == 00) return "Taeil Media Co., Ltd.";
if(frm == 10) return "Vanguard Disc Inc.";
if(frm == 20) return "Unidisc Technology Co., Ltd.";
if(frm == 30) return "Hile Optical Disc Technology Corp.";
if(frm == 40) return "Viva Magnetics Ltd.";
if(frm == 50) return "General Magnetics Ltd.";
break;
case 30:
if(frm == 10)
return "CDA Datenträger Albrechts GmbH";
if(frm == 10) return "CDA Datenträger Albrechts GmbH";
break;
case 31:
if(frm == 00)
return "Ritek Co.";
if(frm == 30)
return "Grand Advance Technology Ltd.";
if(frm == 00) return "Ritek Co.";
if(frm == 30) return "Grand Advance Technology Ltd.";
break;
case 32:
if(frm == 00)
return "TDK Corporation";
if(frm == 10)
return "Prodisc Technology Inc.";
if(frm == 00) return "TDK Corporation";
if(frm == 10) return "Prodisc Technology Inc.";
break;
case 34:
if(frm == 20)
return "Mitsubishi Chemical Corporation";
if(frm == 20) return "Mitsubishi Chemical Corporation";
break;
case 42:
if(frm == 20)
return "Advanced Digital Media";
if(frm == 20) return "Advanced Digital Media";
break;
case 45:
if(frm == 00)
return "Fornet International Pte Ltd.";
if(frm == 10)
return "Unitech Japan Inc.";
if(frm == 20)
return "Acer Media Technology, Inc.";
if(frm == 40)
return "CIS Technology Inc.";
if(frm == 50)
return "Guann Yinn Co., Ltd.";
if(frm == 60)
return "Xcitec Inc.";
if(frm == 00) return "Fornet International Pte Ltd.";
if(frm == 10) return "Unitech Japan Inc.";
if(frm == 20) return "Acer Media Technology, Inc.";
if(frm == 40) return "CIS Technology Inc.";
if(frm == 50) return "Guann Yinn Co., Ltd.";
if(frm == 60) return "Xcitec Inc.";
break;
case 46:
if(frm == 00)
return "Taiyo Yuden Company Ltd.";
if(frm == 10)
return "Hong Kong Digital Technology Co., Ltd.";
if(frm == 20)
return "Multi Media Masters & Machinary SA";
if(frm == 30)
return "Computer Support Italy s.r.l.";
if(frm == 40)
return "FUJI Photo Film Co., Ltd.";
if(frm == 50)
return "Auvistar Industry Co., Ltd.";
if(frm == 60)
return "CMC Magnetics Corporation";
if(frm == 00) return "Taiyo Yuden Company Ltd.";
if(frm == 10) return "Hong Kong Digital Technology Co., Ltd.";
if(frm == 20) return "Multi Media Masters & Machinary SA";
if(frm == 30) return "Computer Support Italy s.r.l.";
if(frm == 40) return "FUJI Photo Film Co., Ltd.";
if(frm == 50) return "Auvistar Industry Co., Ltd.";
if(frm == 60) return "CMC Magnetics Corporation";
break;
case 47:
if(frm == 10)
return "Hitachi Maxell, Ltd.";
if(frm == 20)
return "Princo Corporation";
if(frm == 40)
return "POSTECH Corporation";
if(frm == 50)
return "Ritek Co.";
if(frm == 60)
return "Prodisc Technology Inc.";
if(frm == 10) return "Hitachi Maxell, Ltd.";
if(frm == 20) return "Princo Corporation";
if(frm == 40) return "POSTECH Corporation";
if(frm == 50) return "Ritek Co.";
if(frm == 60) return "Prodisc Technology Inc.";
break;
case 48:
if(frm == 00)
return "Ricoh Company Ltd.";
if(frm == 10)
return "Kodak Japan Ltd.";
if(frm == 20)
return "Plasmon Data systems Ltd.";
if(frm == 30)
return "Pioneer Video Corporation";
if(frm == 40)
return "Digital Storage Technology Co., Ltd.";
if(frm == 50)
return "Mitsui Chemicals, Inc.";
if(frm == 60)
return "Lead Data Inc.";
if(frm == 00) return "Ricoh Company Ltd.";
if(frm == 10) return "Kodak Japan Ltd.";
if(frm == 20) return "Plasmon Data systems Ltd.";
if(frm == 30) return "Pioneer Video Corporation";
if(frm == 40) return "Digital Storage Technology Co., Ltd.";
if(frm == 50) return "Mitsui Chemicals, Inc.";
if(frm == 60) return "Lead Data Inc.";
break;
case 49:
if(frm == 00)
return "TDK Corporation";
if(frm == 10)
return "Gigastore Corporation";
if(frm == 20)
return "King Pro Mediatek Inc.";
if(frm == 30)
return "Opti.Me.S. S.p.A.";
if(frm == 40)
return "Victor Company of Japan, Ltd.";
if(frm == 60)
return "Matsushita Electric Industrial Co., Ltd.";
if(frm == 00) return "TDK Corporation";
if(frm == 10) return "Gigastore Corporation";
if(frm == 20) return "King Pro Mediatek Inc.";
if(frm == 30) return "Opti.Me.S. S.p.A.";
if(frm == 40) return "Victor Company of Japan, Ltd.";
if(frm == 60) return "Matsushita Electric Industrial Co., Ltd.";
break;
case 50:
if(frm == 10)
return "Vanguard Disc Inc.";
if(frm == 20)
return "Mitsubishi Chemical Corporation";
if(frm == 30)
return "CDA Datenträger Albrechts GmbH";
if(frm == 10) return "Vanguard Disc Inc.";
if(frm == 20) return "Mitsubishi Chemical Corporation";
if(frm == 30) return "CDA Datenträger Albrechts GmbH";
break;
case 51:
if(frm == 10)
return "Grand Advance Technology Ltd.";
if(frm == 20)
return "Infodisc Technology Co. Ltd.";
if(frm == 50)
return "Hile Optical Disc Technology Corp.";
if(frm == 10) return "Grand Advance Technology Ltd.";
if(frm == 20) return "Infodisc Technology Co. Ltd.";
if(frm == 50) return "Hile Optical Disc Technology Corp.";
break;
}
return "";
}
}
}
}