mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Move all localizable strings from Aaru.Decoders project to resources.
This commit is contained in:
87
CD/ATIP.cs
87
CD/ATIP.cs
@@ -66,7 +66,8 @@ public static class ATIP
|
||||
CDATIPResponse.Length != 28)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("CD ATIP decoder",
|
||||
"Expected CD ATIP size (32 bytes) is not received size ({0} bytes), not decoding",
|
||||
Localization.
|
||||
Expected_CD_ATIP_size_32_bytes_is_not_received_size_0_bytes_not_decoding,
|
||||
CDATIPResponse.Length);
|
||||
|
||||
return null;
|
||||
@@ -130,79 +131,80 @@ public static class ATIP
|
||||
|
||||
if(response.DDCD)
|
||||
{
|
||||
sb.AppendFormat("Indicative Target Writing Power: 0x{0:X2}", response.ITWP).AppendLine();
|
||||
sb.AppendLine(response.DiscType ? "Disc is DDCD-RW" : "Disc is DDCD-R");
|
||||
sb.AppendFormat(Localization.Indicative_Target_Writing_Power_0, response.ITWP).AppendLine();
|
||||
sb.AppendLine(response.DiscType ? Localization.Disc_is_DDCD_RW : Localization.Disc_is_DDCD_R);
|
||||
|
||||
switch(response.ReferenceSpeed)
|
||||
{
|
||||
case 2:
|
||||
sb.AppendLine("Reference speed is 4x");
|
||||
sb.AppendLine(Localization.Reference_speed_is_4x);
|
||||
|
||||
break;
|
||||
case 3:
|
||||
sb.AppendLine("Reference speed is 8x");
|
||||
sb.AppendLine(Localization.Reference_speed_is_8x);
|
||||
|
||||
break;
|
||||
default:
|
||||
sb.AppendFormat("Reference speed set is unknown: {0}", response.ReferenceSpeed).AppendLine();
|
||||
sb.AppendFormat(Localization.Reference_speed_set_is_unknown_0, response.ReferenceSpeed).
|
||||
AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
sb.AppendFormat("ATIP Start time of Lead-in: 0x{0:X6}",
|
||||
sb.AppendFormat(Localization.ATIP_Start_time_of_Lead_in_0,
|
||||
(response.LeadInStartMin << 16) + (response.LeadInStartSec << 8) +
|
||||
response.LeadInStartFrame).AppendLine();
|
||||
|
||||
sb.AppendFormat("ATIP Last possible start time of Lead-out: 0x{0:X6}",
|
||||
sb.AppendFormat(Localization.ATIP_Last_possible_start_time_of_Lead_out_0,
|
||||
(response.LeadOutStartMin << 16) + (response.LeadOutStartSec << 8) +
|
||||
response.LeadOutStartFrame).AppendLine();
|
||||
|
||||
sb.AppendFormat("S4 value: 0x{0:X6}",
|
||||
sb.AppendFormat(Localization.S4_value_0,
|
||||
(response.S4Values[0] << 16) + (response.S4Values[1] << 8) + response.S4Values[2]).
|
||||
AppendLine();
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendFormat("Indicative Target Writing Power: 0x{0:X2}", response.ITWP & 0x07).AppendLine();
|
||||
sb.AppendFormat(Localization.Indicative_Target_Writing_Power_0, response.ITWP & 0x07).AppendLine();
|
||||
|
||||
if(response.DiscType)
|
||||
{
|
||||
switch(response.DiscSubType)
|
||||
{
|
||||
case 0:
|
||||
sb.AppendLine("Disc is CD-RW");
|
||||
sb.AppendLine(Localization.Disc_is_CD_RW);
|
||||
|
||||
break;
|
||||
case 1:
|
||||
sb.AppendLine("Disc is High-Speed CD-RW");
|
||||
sb.AppendLine(Localization.Disc_is_High_Speed_CD_RW);
|
||||
|
||||
break;
|
||||
case 2:
|
||||
sb.AppendLine("Disc is Ultra-Speed CD-RW");
|
||||
sb.AppendLine(Localization.Disc_is_Ultra_Speed_CD_RW);
|
||||
|
||||
break;
|
||||
case 3:
|
||||
sb.AppendLine("Disc is Ultra-Speed+ CD-RW");
|
||||
sb.AppendLine(Localization.Disc_is_Ultra_Speed_Plus_CD_RW);
|
||||
|
||||
break;
|
||||
case 4:
|
||||
sb.AppendLine("Disc is medium type B, low beta category (B-) CD-RW");
|
||||
sb.AppendLine(Localization.Disc_is_medium_type_B_low_beta_category_CD_RW);
|
||||
|
||||
break;
|
||||
case 5:
|
||||
sb.AppendLine("Disc is medium type B, high beta category (B+) CD-RW");
|
||||
sb.AppendLine(Localization.Disc_is_medium_type_B_high_beta_category_CD_RW);
|
||||
|
||||
break;
|
||||
case 6:
|
||||
sb.AppendLine("Disc is medium type C, low beta category (C-) CD-RW");
|
||||
sb.AppendLine(Localization.Disc_is_medium_type_C_low_beta_category_CD_RW);
|
||||
|
||||
break;
|
||||
case 7:
|
||||
sb.AppendLine("Disc is medium type C, high beta category (C+) CD-RW");
|
||||
sb.AppendLine(Localization.Disc_is_medium_type_C_high_beta_category_CD_RW);
|
||||
|
||||
break;
|
||||
default:
|
||||
sb.AppendFormat("Unknown CD-RW disc subtype: {0}", response.DiscSubType).AppendLine();
|
||||
sb.AppendFormat(Localization.Unknown_CD_RW_disc_subtype_0, response.DiscSubType).AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -210,85 +212,86 @@ public static class ATIP
|
||||
switch(response.ReferenceSpeed)
|
||||
{
|
||||
case 1:
|
||||
sb.AppendLine("Reference speed is 2x");
|
||||
sb.AppendLine(Localization.Reference_speed_is_2x);
|
||||
|
||||
break;
|
||||
default:
|
||||
sb.AppendFormat("Reference speed set is unknown: {0}", response.ReferenceSpeed).AppendLine();
|
||||
sb.AppendFormat(Localization.Reference_speed_set_is_unknown_0, response.ReferenceSpeed).
|
||||
AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendLine("Disc is CD-R");
|
||||
sb.AppendLine(Localization.Disc_is_CD_R);
|
||||
|
||||
switch(response.DiscSubType)
|
||||
{
|
||||
case 0:
|
||||
sb.AppendLine("Disc is normal speed (CLV) CD-R");
|
||||
sb.AppendLine(Localization.Disc_is_normal_speed_CLV_CD_R);
|
||||
|
||||
break;
|
||||
case 1:
|
||||
sb.AppendLine("Disc is high speed (CAV) CD-R");
|
||||
sb.AppendLine(Localization.Disc_is_high_speed_CAV_CD_R);
|
||||
|
||||
break;
|
||||
case 2:
|
||||
sb.AppendLine("Disc is medium type A, low beta category (A-) CD-R");
|
||||
sb.AppendLine(Localization.Disc_is_medium_type_A_low_beta_category_CD_R);
|
||||
|
||||
break;
|
||||
case 3:
|
||||
sb.AppendLine("Disc is medium type A, high beta category (A+) CD-R");
|
||||
sb.AppendLine(Localization.Disc_is_medium_type_A_high_beta_category_CD_R);
|
||||
|
||||
break;
|
||||
case 4:
|
||||
sb.AppendLine("Disc is medium type B, low beta category (B-) CD-R");
|
||||
sb.AppendLine(Localization.Disc_is_medium_type_B_low_beta_category_CD_R);
|
||||
|
||||
break;
|
||||
case 5:
|
||||
sb.AppendLine("Disc is medium type B, high beta category (B+) CD-R");
|
||||
sb.AppendLine(Localization.Disc_is_medium_type__high_beta_category__CD_R);
|
||||
|
||||
break;
|
||||
case 6:
|
||||
sb.AppendLine("Disc is medium type C, low beta category (C-) CD-R");
|
||||
sb.AppendLine(Localization.Disc_is_medium_type_C_low_beta_category__CD_R);
|
||||
|
||||
break;
|
||||
case 7:
|
||||
sb.AppendLine("Disc is medium type C, high beta category (C+) CD-R");
|
||||
sb.AppendLine(Localization.Disc_is_medium_type_C_high_beta_category__CD_R);
|
||||
|
||||
break;
|
||||
default:
|
||||
sb.AppendFormat("Unknown CD-R disc subtype: {0}", response.DiscSubType).AppendLine();
|
||||
sb.AppendFormat(Localization.Unknown_CD_R_disc_subtype_0, response.DiscSubType).AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
sb.AppendLine(response.URU ? "Disc use is unrestricted" : "Disc use is restricted");
|
||||
sb.AppendLine(response.URU ? Localization.Disc_use_is_unrestricted : Localization.Disc_use_is_restricted);
|
||||
|
||||
sb.AppendFormat("ATIP Start time of Lead-in: {0}:{1:D2}:{2:D2}", response.LeadInStartMin,
|
||||
sb.AppendFormat(Localization.ATIP_Start_time_of_Lead_in_0_1_2, response.LeadInStartMin,
|
||||
response.LeadInStartSec, response.LeadInStartFrame).AppendLine();
|
||||
|
||||
sb.AppendFormat("ATIP Last possible start time of Lead-out: {0}:{1:D2}:{2:D2}", response.LeadOutStartMin,
|
||||
sb.AppendFormat(Localization.ATIP_Last_possible_start_time_of_Lead_out_0_1_2, response.LeadOutStartMin,
|
||||
response.LeadOutStartSec, response.LeadOutStartFrame).AppendLine();
|
||||
|
||||
if(response.A1Valid)
|
||||
sb.AppendFormat("A1 value: 0x{0:X6}",
|
||||
sb.AppendFormat(Localization.A1_value_0,
|
||||
(response.A1Values[0] << 16) + (response.A1Values[1] << 8) + response.A1Values[2]).
|
||||
AppendLine();
|
||||
|
||||
if(response.A2Valid)
|
||||
sb.AppendFormat("A2 value: 0x{0:X6}",
|
||||
sb.AppendFormat(Localization.A2_value_0,
|
||||
(response.A2Values[0] << 16) + (response.A2Values[1] << 8) + response.A2Values[2]).
|
||||
AppendLine();
|
||||
|
||||
if(response.A3Valid)
|
||||
sb.AppendFormat("A3 value: 0x{0:X6}",
|
||||
sb.AppendFormat(Localization.A3_value_0,
|
||||
(response.A3Values[0] << 16) + (response.A3Values[1] << 8) + response.A3Values[2]).
|
||||
AppendLine();
|
||||
|
||||
if(response.S4Values != null)
|
||||
sb.AppendFormat("S4 value: 0x{0:X6}",
|
||||
sb.AppendFormat(Localization.S4_value_0,
|
||||
(response.S4Values[0] << 16) + (response.S4Values[1] << 8) + response.S4Values[2]).
|
||||
AppendLine();
|
||||
}
|
||||
@@ -300,15 +303,15 @@ public static class ATIP
|
||||
int frm = response.LeadInStartFrame - type;
|
||||
|
||||
if(response.DiscType)
|
||||
sb.AppendLine("Disc uses phase change");
|
||||
sb.AppendLine(Localization.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...)");
|
||||
sb.AppendLine(type < 5 ? Localization.Disc_uses_long_strategy_type_dye_Cyanine_AZO_etc
|
||||
: Localization.Disc_uses_short_strategy_type_dye_Phthalocyanine_etc);
|
||||
|
||||
string manufacturer = ManufacturerFromATIP(response.LeadInStartSec, frm);
|
||||
|
||||
if(manufacturer != "")
|
||||
sb.AppendFormat("Disc manufactured by: {0}", manufacturer).AppendLine();
|
||||
sb.AppendFormat(Localization.Disc_manufactured_by_0, manufacturer).AppendLine();
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
@@ -111,7 +111,8 @@ public static class CDTextOnLeadIn
|
||||
if(decoded.DataLength + 2 != CDTextResponse.Length)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("CD-TEXT decoder",
|
||||
"Expected CD-TEXT size ({0} bytes) is not received size ({1} bytes), not decoding",
|
||||
Localization.
|
||||
Expected_CD_TEXT_size_0_bytes_is_not_received_size_1_bytes_not_decoding,
|
||||
decoded.DataLength + 2, CDTextResponse.Length);
|
||||
|
||||
return null;
|
||||
@@ -143,10 +144,10 @@ public static class CDTextOnLeadIn
|
||||
|
||||
#if DEBUG
|
||||
if(response.Reserved1 != 0)
|
||||
sb.AppendFormat("Reserved1 = 0x{0:X2}", response.Reserved1).AppendLine();
|
||||
sb.AppendFormat(Localization.Reserved1_equals_0_X8, response.Reserved1).AppendLine();
|
||||
|
||||
if(response.Reserved2 != 0)
|
||||
sb.AppendFormat("Reserved2 = 0x{0:X2}", response.Reserved2).AppendLine();
|
||||
sb.AppendFormat(Localization.Reserved2_equals_0_X8, response.Reserved2).AppendLine();
|
||||
#endif
|
||||
|
||||
foreach(CDTextPack descriptor in response.DataPacks)
|
||||
@@ -154,7 +155,8 @@ public static class CDTextOnLeadIn
|
||||
{
|
||||
// Ignore NOPs
|
||||
if((descriptor.HeaderID1 & 0x80) != 0)
|
||||
sb.AppendFormat("Incorrect CD-Text pack type {0}, not decoding", descriptor.HeaderID1).AppendLine();
|
||||
sb.AppendFormat(Localization.Incorrect_CD_Text_pack_type_0_not_decoding, descriptor.HeaderID1).
|
||||
AppendLine();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -162,36 +164,33 @@ public static class CDTextOnLeadIn
|
||||
{
|
||||
case 0x80:
|
||||
{
|
||||
sb.Append("CD-Text pack contains title for ");
|
||||
|
||||
if(descriptor.HeaderID2 == 0x00)
|
||||
sb.AppendLine("album");
|
||||
sb.AppendLine(Localization.CD_Text_pack_contains_title_for_album);
|
||||
else
|
||||
sb.AppendFormat("track {0}", descriptor.HeaderID2).AppendLine();
|
||||
sb.AppendFormat(Localization.CD_Text_pack_contains_title_for_track_0, descriptor.HeaderID2).
|
||||
AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x81:
|
||||
{
|
||||
sb.Append("CD-Text pack contains performer for ");
|
||||
|
||||
if(descriptor.HeaderID2 == 0x00)
|
||||
sb.AppendLine("album");
|
||||
sb.AppendLine(Localization.CD_Text_pack_contains_performer_for_album);
|
||||
else
|
||||
sb.AppendFormat("track {0}", descriptor.HeaderID2).AppendLine();
|
||||
sb.AppendFormat(Localization.CD_Text_pack_contains_performer_for_track_0,
|
||||
descriptor.HeaderID2).AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x82:
|
||||
{
|
||||
sb.Append("CD-Text pack contains songwriter for ");
|
||||
|
||||
if(descriptor.HeaderID2 == 0x00)
|
||||
sb.AppendLine("album");
|
||||
sb.AppendLine(Localization.CD_Text_pack_contains_songwriter_for_album);
|
||||
else
|
||||
sb.AppendFormat("track {0}", descriptor.HeaderID2).AppendLine();
|
||||
sb.AppendFormat(Localization.CD_Text_pack_contains_songwriter_for_track_0,
|
||||
descriptor.HeaderID2).AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -199,61 +198,59 @@ public static class CDTextOnLeadIn
|
||||
case 0x83:
|
||||
{
|
||||
if(descriptor.HeaderID2 == 0x00)
|
||||
sb.AppendLine("album");
|
||||
sb.AppendLine(Localization.album);
|
||||
else
|
||||
sb.AppendFormat("track {0}", descriptor.HeaderID2).AppendLine();
|
||||
sb.AppendFormat(Localization.track_0, descriptor.HeaderID2).AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x84:
|
||||
{
|
||||
sb.Append("CD-Text pack contains arranger for ");
|
||||
|
||||
if(descriptor.HeaderID2 == 0x00)
|
||||
sb.AppendLine("album");
|
||||
sb.AppendLine(Localization.CD_Text_pack_contains_arranger_for_album);
|
||||
else
|
||||
sb.AppendFormat("track {0}", descriptor.HeaderID2).AppendLine();
|
||||
sb.AppendFormat(Localization.CD_Text_pack_contains_arranger_for_track_0,
|
||||
descriptor.HeaderID2).AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x85:
|
||||
{
|
||||
sb.Append("CD-Text pack contains content provider's message for ");
|
||||
|
||||
if(descriptor.HeaderID2 == 0x00)
|
||||
sb.AppendLine("album");
|
||||
sb.AppendLine(Localization.CD_Text_pack_contains_content_provider_message_for_album);
|
||||
else
|
||||
sb.AppendFormat("track {0}", descriptor.HeaderID2).AppendLine();
|
||||
sb.AppendFormat(Localization.CD_Text_pack_contains_content_provider_message_for_track_0,
|
||||
descriptor.HeaderID2).AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x86:
|
||||
{
|
||||
sb.AppendLine("CD-Text pack contains disc identification information");
|
||||
sb.AppendLine(Localization.CD_Text_pack_contains_disc_identification_information);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x87:
|
||||
{
|
||||
sb.AppendLine("CD-Text pack contains genre identification information");
|
||||
sb.AppendLine(Localization.CD_Text_pack_contains_genre_identification_information);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x88:
|
||||
{
|
||||
sb.AppendLine("CD-Text pack contains table of contents information");
|
||||
sb.AppendLine(Localization.CD_Text_pack_contains_table_of_contents_information);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x89:
|
||||
{
|
||||
sb.AppendLine("CD-Text pack contains second table of contents information");
|
||||
sb.AppendLine(Localization.CD_Text_pack_contains_second_table_of_contents_information);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -262,14 +259,14 @@ public static class CDTextOnLeadIn
|
||||
case 0x8B:
|
||||
case 0x8C:
|
||||
{
|
||||
sb.AppendLine("CD-Text pack contains reserved data");
|
||||
sb.AppendLine(Localization.CD_Text_pack_contains_reserved_data);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x8D:
|
||||
{
|
||||
sb.AppendLine("CD-Text pack contains data reserved for content provider only");
|
||||
sb.AppendLine(Localization.CD_Text_pack_contains_data_reserved_for_content_provider_only);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -277,16 +274,16 @@ public static class CDTextOnLeadIn
|
||||
case 0x8E:
|
||||
{
|
||||
if(descriptor.HeaderID2 == 0x00)
|
||||
sb.AppendLine("CD-Text pack contains UPC");
|
||||
sb.AppendLine(Localization.CD_Text_pack_contains_UPC);
|
||||
else
|
||||
sb.AppendFormat("track {0}", descriptor.HeaderID2).AppendLine();
|
||||
sb.AppendFormat(Localization.track_0, descriptor.HeaderID2).AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x8F:
|
||||
{
|
||||
sb.AppendLine("CD-Text pack contains size block information");
|
||||
sb.AppendLine(Localization.CD_Text_pack_contains_size_block_information);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -305,12 +302,12 @@ public static class CDTextOnLeadIn
|
||||
case 0x8E:
|
||||
{
|
||||
if(descriptor.DBCC)
|
||||
sb.AppendLine("Double Byte Character Code is used");
|
||||
sb.AppendLine(Localization.Double_Byte_Character_Code_is_used);
|
||||
|
||||
sb.AppendFormat("Block number {0}", descriptor.BlockNumber).AppendLine();
|
||||
sb.AppendFormat("Character position {0}", descriptor.CharacterPosition).AppendLine();
|
||||
sb.AppendFormat(Localization.Block_number_0, descriptor.BlockNumber).AppendLine();
|
||||
sb.AppendFormat(Localization.Character_position_0, descriptor.CharacterPosition).AppendLine();
|
||||
|
||||
sb.AppendFormat("Text field: \"{0}\"",
|
||||
sb.AppendFormat(Localization.Text_field_0,
|
||||
StringHandlers.CToString(descriptor.TextDataField,
|
||||
Encoding.GetEncoding("iso-8859-1"))).AppendLine();
|
||||
|
||||
@@ -319,14 +316,14 @@ public static class CDTextOnLeadIn
|
||||
|
||||
default:
|
||||
{
|
||||
sb.AppendFormat("Binary contents: {0}",
|
||||
sb.AppendFormat(Localization.Binary_contents_0,
|
||||
PrintHex.ByteArrayToHexArrayString(descriptor.TextDataField, 28)).AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
sb.AppendFormat("CRC: 0x{0:X4}", descriptor.CRC).AppendLine();
|
||||
sb.AppendFormat(Localization.CRC_0_X4, descriptor.CRC).AppendLine();
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
|
||||
297
CD/FullTOC.cs
297
CD/FullTOC.cs
@@ -60,13 +60,6 @@ namespace Aaru.Decoders.CD;
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static class FullTOC
|
||||
{
|
||||
const string StereoNoPre = "Stereo audio track with no pre-emphasis";
|
||||
const string StereoPreEm = "Stereo audio track with 50/15 μs pre-emphasis";
|
||||
const string QuadNoPreEm = "Quadraphonic audio track with no pre-emphasis";
|
||||
const string QuadPreEmph = "Quadraphonic audio track with 50/15 μs pre-emphasis";
|
||||
const string DataUnintrp = "Data track, recorded uninterrupted";
|
||||
const string DataIncrtly = "Data track, recorded incrementally";
|
||||
|
||||
public static CDFullTOC? Decode(byte[] CDFullTOCResponse)
|
||||
{
|
||||
if(CDFullTOCResponse is not { Length: > 4 })
|
||||
@@ -84,7 +77,8 @@ public static class FullTOC
|
||||
if(decoded.DataLength + 2 != CDFullTOCResponse.Length)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("CD full TOC decoder",
|
||||
"Expected CDFullTOC size ({0} bytes) is not received size ({1} bytes), not decoding",
|
||||
Localization.
|
||||
Expected_CDFullTOC_size_0_bytes_is_not_received_size_1_bytes_not_decoding,
|
||||
decoded.DataLength + 2, CDFullTOCResponse.Length);
|
||||
|
||||
return null;
|
||||
@@ -122,34 +116,34 @@ public static class FullTOC
|
||||
|
||||
int lastSession = 0;
|
||||
|
||||
sb.AppendFormat("First complete session number: {0}", response.FirstCompleteSession).AppendLine();
|
||||
sb.AppendFormat("Last complete session number: {0}", response.LastCompleteSession).AppendLine();
|
||||
sb.AppendFormat(Localization.First_complete_session_number_0, response.FirstCompleteSession).AppendLine();
|
||||
sb.AppendFormat(Localization.Last_complete_session_number_0, response.LastCompleteSession).AppendLine();
|
||||
|
||||
foreach(TrackDataDescriptor descriptor in response.TrackDescriptors)
|
||||
if((descriptor.CONTROL & 0x08) == 0x08 ||
|
||||
(descriptor.ADR != 1 && descriptor.ADR != 5 && descriptor.ADR != 4 && descriptor.ADR != 6) ||
|
||||
descriptor.TNO != 0)
|
||||
{
|
||||
sb.AppendLine("Unknown TOC entry format, printing values as-is");
|
||||
sb.AppendFormat("SessionNumber = {0}", descriptor.SessionNumber).AppendLine();
|
||||
sb.AppendFormat("ADR = {0}", descriptor.ADR).AppendLine();
|
||||
sb.AppendFormat("CONTROL = {0}", descriptor.CONTROL).AppendLine();
|
||||
sb.AppendFormat("TNO = {0}", descriptor.TNO).AppendLine();
|
||||
sb.AppendFormat("POINT = {0}", descriptor.POINT).AppendLine();
|
||||
sb.AppendFormat("Min = {0}", descriptor.Min).AppendLine();
|
||||
sb.AppendFormat("Sec = {0}", descriptor.Sec).AppendLine();
|
||||
sb.AppendFormat("Frame = {0}", descriptor.Frame).AppendLine();
|
||||
sb.AppendFormat("HOUR = {0}", descriptor.HOUR).AppendLine();
|
||||
sb.AppendFormat("PHOUR = {0}", descriptor.PHOUR).AppendLine();
|
||||
sb.AppendFormat("PMIN = {0}", descriptor.PMIN).AppendLine();
|
||||
sb.AppendFormat("PSEC = {0}", descriptor.PSEC).AppendLine();
|
||||
sb.AppendFormat("PFRAME = {0}", descriptor.PFRAME).AppendLine();
|
||||
sb.AppendLine(Localization.Unknown_TOC_entry_format_printing_values_as_is);
|
||||
sb.AppendLine($"SessionNumber = {descriptor.SessionNumber}");
|
||||
sb.AppendLine($"ADR = {descriptor.ADR}");
|
||||
sb.AppendLine($"CONTROL = {descriptor.CONTROL}");
|
||||
sb.AppendLine($"TNO = {descriptor.TNO}");
|
||||
sb.AppendLine($"POINT = {descriptor.POINT}");
|
||||
sb.AppendLine($"Min = {descriptor.Min}");
|
||||
sb.AppendLine($"Sec = {descriptor.Sec}");
|
||||
sb.AppendLine($"Frame = {descriptor.Frame}");
|
||||
sb.AppendLine($"HOUR = {descriptor.HOUR}");
|
||||
sb.AppendLine($"PHOUR = {descriptor.PHOUR}");
|
||||
sb.AppendLine($"PMIN = {descriptor.PMIN}");
|
||||
sb.AppendLine($"PSEC = {descriptor.PSEC}");
|
||||
sb.AppendLine($"PFRAME = {descriptor.PFRAME}");
|
||||
}
|
||||
else
|
||||
{
|
||||
if(descriptor.SessionNumber > lastSession)
|
||||
{
|
||||
sb.AppendFormat("Session {0}", descriptor.SessionNumber).AppendLine();
|
||||
sb.AppendFormat(Localization.Session_0, descriptor.SessionNumber).AppendLine();
|
||||
lastSession = descriptor.SessionNumber;
|
||||
}
|
||||
|
||||
@@ -162,40 +156,45 @@ public static class FullTOC
|
||||
{
|
||||
case 0xA0 when descriptor.ADR == 4:
|
||||
{
|
||||
sb.AppendFormat("First video track number: {0}", descriptor.PMIN).AppendLine();
|
||||
sb.AppendFormat(Localization.First_video_track_number_0, descriptor.PMIN).AppendLine();
|
||||
|
||||
switch(descriptor.PSEC)
|
||||
{
|
||||
case 0x10:
|
||||
sb.AppendLine("CD-V single in NTSC format with digital stereo sound");
|
||||
sb.AppendLine(Localization.
|
||||
CD_V_single_in_NTSC_format_with_digital_stereo_sound);
|
||||
|
||||
break;
|
||||
case 0x11:
|
||||
sb.AppendLine("CD-V single in NTSC format with digital bilingual sound");
|
||||
sb.AppendLine(Localization.
|
||||
CD_V_single_in_NTSC_format_with_digital_bilingual_sound);
|
||||
|
||||
break;
|
||||
case 0x12:
|
||||
sb.AppendLine("CD-V disc in NTSC format with digital stereo sound");
|
||||
sb.AppendLine(Localization.CD_V_disc_in_NTSC_format_with_digital_stereo_sound);
|
||||
|
||||
break;
|
||||
case 0x13:
|
||||
sb.AppendLine("CD-V disc in NTSC format with digital bilingual sound");
|
||||
sb.AppendLine(Localization.
|
||||
CD_V_disc_in_NTSC_format_with_digital_bilingual_sound);
|
||||
|
||||
break;
|
||||
case 0x20:
|
||||
sb.AppendLine("CD-V single in PAL format with digital stereo sound");
|
||||
sb.AppendLine(Localization.CD_V_single_in_PAL_format_with_digital_stereo_sound);
|
||||
|
||||
break;
|
||||
case 0x21:
|
||||
sb.AppendLine("CD-V single in PAL format with digital bilingual sound");
|
||||
sb.AppendLine(Localization.
|
||||
CD_V_single_in_PAL_format_with_digital_bilingual_sound);
|
||||
|
||||
break;
|
||||
case 0x22:
|
||||
sb.AppendLine("CD-V disc in PAL format with digital stereo sound");
|
||||
sb.AppendLine(Localization.CD_V_disc_in_PAL_format_with_digital_stereo_sound);
|
||||
|
||||
break;
|
||||
case 0x23:
|
||||
sb.AppendLine("CD-V disc in PAL format with digital bilingual sound");
|
||||
sb.AppendLine(Localization.
|
||||
CD_V_disc_in_PAL_format_with_digital_bilingual_sound);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -205,80 +204,80 @@ public static class FullTOC
|
||||
|
||||
case 0xA0 when descriptor.ADR == 1:
|
||||
{
|
||||
sb.AppendFormat("First track number: {0} (", descriptor.PMIN);
|
||||
sb.AppendFormat(Localization.First_track_number_0_open_parenthesis, descriptor.PMIN);
|
||||
|
||||
switch((TocControl)(descriptor.CONTROL & 0x0D))
|
||||
{
|
||||
case TocControl.TwoChanNoPreEmph:
|
||||
sb.Append(StereoNoPre);
|
||||
sb.Append(Localization.Stereo_audio_track_with_no_pre_emphasis);
|
||||
|
||||
break;
|
||||
case TocControl.TwoChanPreEmph:
|
||||
sb.Append(StereoPreEm);
|
||||
sb.Append(Localization.Stereo_audio_track_with_50_15_us_pre_emphasis);
|
||||
|
||||
break;
|
||||
case TocControl.FourChanNoPreEmph:
|
||||
sb.Append(QuadNoPreEm);
|
||||
sb.Append(Localization.Quadraphonic_audio_track_with_no_pre_emphasis);
|
||||
|
||||
break;
|
||||
case TocControl.FourChanPreEmph:
|
||||
sb.Append(QuadPreEmph);
|
||||
sb.Append(Localization.Quadraphonic_audio_track_with_50_15_us_pre_emphasis);
|
||||
|
||||
break;
|
||||
case TocControl.DataTrack:
|
||||
sb.Append(DataUnintrp);
|
||||
sb.Append(Localization.Data_track_recorded_uninterrupted);
|
||||
|
||||
break;
|
||||
case TocControl.DataTrackIncremental:
|
||||
sb.Append(DataIncrtly);
|
||||
sb.Append(Localization.Data_track_recorded_incrementally);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
sb.AppendLine(")");
|
||||
sb.AppendFormat("Disc type: {0}", descriptor.PSEC).AppendLine();
|
||||
sb.AppendLine(Localization.close_parenthesis);
|
||||
sb.AppendFormat(Localization.Disc_type_0, descriptor.PSEC).AppendLine();
|
||||
|
||||
//sb.AppendFormat("Absolute time: {3:D2}:{0:D2}:{1:D2}:{2:D2}", descriptor.Min, descriptor.Sec, descriptor.Frame, descriptor.HOUR).AppendLine();
|
||||
break;
|
||||
}
|
||||
|
||||
case 0xA1 when descriptor.ADR == 4:
|
||||
sb.AppendFormat("Last video track number: {0}", descriptor.PMIN).AppendLine();
|
||||
sb.AppendFormat(Localization.Last_video_track_number_0, descriptor.PMIN).AppendLine();
|
||||
|
||||
break;
|
||||
case 0xA1 when descriptor.ADR == 1:
|
||||
{
|
||||
sb.AppendFormat("Last track number: {0} (", descriptor.PMIN);
|
||||
sb.AppendFormat(Localization.Last_track_number_0_open_parenthesis, descriptor.PMIN);
|
||||
|
||||
switch((TocControl)(descriptor.CONTROL & 0x0D))
|
||||
{
|
||||
case TocControl.TwoChanNoPreEmph:
|
||||
sb.Append(StereoNoPre);
|
||||
sb.Append(Localization.Stereo_audio_track_with_no_pre_emphasis);
|
||||
|
||||
break;
|
||||
case TocControl.TwoChanPreEmph:
|
||||
sb.Append(StereoPreEm);
|
||||
sb.Append(Localization.Stereo_audio_track_with_50_15_us_pre_emphasis);
|
||||
|
||||
break;
|
||||
case TocControl.FourChanNoPreEmph:
|
||||
sb.Append(QuadNoPreEm);
|
||||
sb.Append(Localization.Quadraphonic_audio_track_with_no_pre_emphasis);
|
||||
|
||||
break;
|
||||
case TocControl.FourChanPreEmph:
|
||||
sb.Append(QuadPreEmph);
|
||||
sb.Append(Localization.Quadraphonic_audio_track_with_50_15_us_pre_emphasis);
|
||||
|
||||
break;
|
||||
case TocControl.DataTrack:
|
||||
sb.Append(DataUnintrp);
|
||||
sb.Append(Localization.Data_track_recorded_uninterrupted);
|
||||
|
||||
break;
|
||||
case TocControl.DataTrackIncremental:
|
||||
sb.Append(DataIncrtly);
|
||||
sb.Append(Localization.Data_track_recorded_incrementally);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
sb.AppendLine(")");
|
||||
sb.AppendLine(Localization.close_parenthesis);
|
||||
|
||||
//sb.AppendFormat("Absolute time: {3:D2}:{0:D2}:{1:D2}:{2:D2}", descriptor.Min, descriptor.Sec, descriptor.Frame, descriptor.HOUR).AppendLine();
|
||||
break;
|
||||
@@ -287,11 +286,10 @@ public static class FullTOC
|
||||
case 0xA2:
|
||||
{
|
||||
if(descriptor.PHOUR > 0)
|
||||
sb.AppendFormat("Lead-out start position: {3:D2}:{0:D2}:{1:D2}:{2:D2}",
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME,
|
||||
descriptor.PHOUR).AppendLine();
|
||||
sb.AppendFormat(Localization.Lead_out_start_position_3_0_1_2, descriptor.PMIN,
|
||||
descriptor.PSEC, descriptor.PFRAME, descriptor.PHOUR).AppendLine();
|
||||
else
|
||||
sb.AppendFormat("Lead-out start position: {0:D2}:{1:D2}:{2:D2}", descriptor.PMIN,
|
||||
sb.AppendFormat(Localization.Lead_out_start_position_0_1_2, descriptor.PMIN,
|
||||
descriptor.PSEC, descriptor.PFRAME).AppendLine();
|
||||
|
||||
//sb.AppendFormat("Absolute time: {3:D2}:{0:D2}:{1:D2}:{2:D2}", descriptor.Min, descriptor.Sec, descriptor.Frame, descriptor.HOUR).AppendLine();
|
||||
@@ -302,12 +300,12 @@ public static class FullTOC
|
||||
case TocControl.TwoChanPreEmph:
|
||||
case TocControl.FourChanNoPreEmph:
|
||||
case TocControl.FourChanPreEmph:
|
||||
sb.AppendLine("Lead-out is audio type");
|
||||
sb.AppendLine(Localization.Lead_out_is_audio_type);
|
||||
|
||||
break;
|
||||
case TocControl.DataTrack:
|
||||
case TocControl.DataTrackIncremental:
|
||||
sb.AppendLine("Lead-out is data type");
|
||||
sb.AppendLine(Localization.Lead_out_is_data_type);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -317,16 +315,16 @@ public static class FullTOC
|
||||
|
||||
case 0xF0:
|
||||
{
|
||||
sb.AppendFormat("Book type: 0x{0:X2}", descriptor.PMIN);
|
||||
sb.AppendFormat("Material type: 0x{0:X2}", descriptor.PSEC);
|
||||
sb.AppendFormat("Moment of inertia: 0x{0:X2}", descriptor.PFRAME);
|
||||
sb.AppendFormat(Localization.Book_type_0, descriptor.PMIN);
|
||||
sb.AppendFormat(Localization.Material_type_0, descriptor.PSEC);
|
||||
sb.AppendFormat(Localization.Moment_of_inertia_0, descriptor.PFRAME);
|
||||
|
||||
if(descriptor.PHOUR > 0)
|
||||
sb.AppendFormat("Absolute time: {3:D2}:{0:D2}:{1:D2}:{2:D2}", descriptor.Min,
|
||||
descriptor.Sec, descriptor.Frame, descriptor.HOUR).AppendLine();
|
||||
sb.AppendFormat(Localization.Absolute_time_3_0_1_2, descriptor.Min, descriptor.Sec,
|
||||
descriptor.Frame, descriptor.HOUR).AppendLine();
|
||||
else
|
||||
sb.AppendFormat("Absolute time: {0:D2}:{1:D2}:{2:D2}", descriptor.Min,
|
||||
descriptor.Sec, descriptor.Frame).AppendLine();
|
||||
sb.AppendFormat(Localization.Absolute_time_0_1_2, descriptor.Min, descriptor.Sec,
|
||||
descriptor.Frame).AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -335,70 +333,70 @@ public static class FullTOC
|
||||
{
|
||||
if(descriptor.POINT is >= 0x01 and <= 0x63)
|
||||
if(descriptor.ADR == 4)
|
||||
sb.AppendFormat("Video track {3} starts at: {0:D2}:{1:D2}:{2:D2}",
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME,
|
||||
descriptor.POINT).AppendLine();
|
||||
sb.AppendFormat(Localization.Video_track_3_starts_at_0_1_2, descriptor.PMIN,
|
||||
descriptor.PSEC, descriptor.PFRAME, descriptor.POINT).
|
||||
AppendLine();
|
||||
else
|
||||
{
|
||||
string type = "Audio";
|
||||
|
||||
if((TocControl)(descriptor.CONTROL & 0x0D) == TocControl.DataTrack ||
|
||||
(TocControl)(descriptor.CONTROL & 0x0D) == TocControl.DataTrackIncremental)
|
||||
type = "Data";
|
||||
bool data = (TocControl)(descriptor.CONTROL & 0x0D) == TocControl.DataTrack ||
|
||||
(TocControl)(descriptor.CONTROL & 0x0D) ==
|
||||
TocControl.DataTrackIncremental;
|
||||
|
||||
if(descriptor.PHOUR > 0)
|
||||
sb.AppendFormat("{5} track {3} starts at: {4:D2}:{0:D2}:{1:D2}:{2:D2} (",
|
||||
sb.AppendFormat(data ? Localization.Data_track_3_starts_at_4_0_1_2_open_parenthesis : Localization.Audio_track_3_starts_at_4_0_1_2_open_parenthesis,
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME,
|
||||
descriptor.POINT, descriptor.PHOUR, type);
|
||||
descriptor.POINT, descriptor.PHOUR);
|
||||
|
||||
else
|
||||
sb.AppendFormat("{4} track {3} starts at: {0:D2}:{1:D2}:{2:D2} (",
|
||||
sb.AppendFormat(data ? Localization.Data_track_3_starts_at_0_1_2_open_parenthesis : Localization.Audio_track_3_starts_at_0_1_2_open_parenthesis,
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME,
|
||||
descriptor.POINT, type);
|
||||
descriptor.POINT);
|
||||
|
||||
switch((TocControl)(descriptor.CONTROL & 0x0D))
|
||||
{
|
||||
case TocControl.TwoChanNoPreEmph:
|
||||
sb.Append(StereoNoPre);
|
||||
sb.Append(Localization.Stereo_audio_track_with_no_pre_emphasis);
|
||||
|
||||
break;
|
||||
case TocControl.TwoChanPreEmph:
|
||||
sb.Append(StereoPreEm);
|
||||
sb.Append(Localization.Stereo_audio_track_with_50_15_us_pre_emphasis);
|
||||
|
||||
break;
|
||||
case TocControl.FourChanNoPreEmph:
|
||||
sb.Append(QuadNoPreEm);
|
||||
sb.Append(Localization.Quadraphonic_audio_track_with_no_pre_emphasis);
|
||||
|
||||
break;
|
||||
case TocControl.FourChanPreEmph:
|
||||
sb.Append(QuadPreEmph);
|
||||
sb.Append(Localization.
|
||||
Quadraphonic_audio_track_with_50_15_us_pre_emphasis);
|
||||
|
||||
break;
|
||||
case TocControl.DataTrack:
|
||||
sb.Append(DataUnintrp);
|
||||
sb.Append(Localization.Data_track_recorded_uninterrupted);
|
||||
|
||||
break;
|
||||
case TocControl.DataTrackIncremental:
|
||||
sb.Append(DataIncrtly);
|
||||
sb.Append(Localization.Data_track_recorded_incrementally);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
sb.AppendLine(")");
|
||||
sb.AppendLine(Localization.close_parenthesis);
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendFormat("ADR = {0}", descriptor.ADR).AppendLine();
|
||||
sb.AppendFormat("CONTROL = {0}", descriptor.CONTROL).AppendLine();
|
||||
sb.AppendFormat("TNO = {0}", descriptor.TNO).AppendLine();
|
||||
sb.AppendFormat("POINT = {0}", descriptor.POINT).AppendLine();
|
||||
sb.AppendFormat("Min = {0}", descriptor.Min).AppendLine();
|
||||
sb.AppendFormat("Sec = {0}", descriptor.Sec).AppendLine();
|
||||
sb.AppendFormat("Frame = {0}", descriptor.Frame).AppendLine();
|
||||
sb.AppendFormat("HOUR = {0}", descriptor.HOUR).AppendLine();
|
||||
sb.AppendFormat("PHOUR = {0}", descriptor.PHOUR).AppendLine();
|
||||
sb.AppendFormat("PMIN = {0}", descriptor.PMIN).AppendLine();
|
||||
sb.AppendFormat("PSEC = {0}", descriptor.PSEC).AppendLine();
|
||||
sb.AppendFormat("PFRAME = {0}", descriptor.PFRAME).AppendLine();
|
||||
sb.Append($"ADR = {descriptor.ADR}").AppendLine();
|
||||
sb.Append($"CONTROL = {descriptor.CONTROL}").AppendLine();
|
||||
sb.Append($"TNO = {descriptor.TNO}").AppendLine();
|
||||
sb.Append($"POINT = {descriptor.POINT}").AppendLine();
|
||||
sb.Append($"Min = {descriptor.Min}").AppendLine();
|
||||
sb.Append($"Sec = {descriptor.Sec}").AppendLine();
|
||||
sb.Append($"Frame = {descriptor.Frame}").AppendLine();
|
||||
sb.Append($"HOUR = {descriptor.HOUR}").AppendLine();
|
||||
sb.Append($"PHOUR = {descriptor.PHOUR}").AppendLine();
|
||||
sb.Append($"PMIN = {descriptor.PMIN}").AppendLine();
|
||||
sb.Append($"PSEC = {descriptor.PSEC}").AppendLine();
|
||||
sb.Append($"PFRAME = {descriptor.PFRAME}").AppendLine();
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -417,23 +415,23 @@ public static class FullTOC
|
||||
if(descriptor.PHOUR > 0)
|
||||
{
|
||||
sb.
|
||||
AppendFormat("Start of next possible program in the recordable area of the disc: {3:D2}:{0:D2}:{1:D2}:{2:D2}",
|
||||
AppendFormat(Localization.Start_of_next_possible_program_in_the_recordable_area_of_the_disc_3_0_1_2,
|
||||
descriptor.Min, descriptor.Sec, descriptor.Frame, descriptor.HOUR).
|
||||
AppendLine();
|
||||
|
||||
sb.
|
||||
AppendFormat("Maximum start of outermost Lead-out in the recordable area of the disc: {3:D2}:{0:D2}:{1:D2}:{2:D2}",
|
||||
AppendFormat(Localization.Maximum_start_of_outermost_Lead_out_in_the_recordable_area_of_the_disc_3_0_1_2,
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME,
|
||||
descriptor.PHOUR).AppendLine();
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.
|
||||
AppendFormat("Start of next possible program in the recordable area of the disc: {0:D2}:{1:D2}:{2:D2}",
|
||||
AppendFormat(Localization.Start_of_next_possible_program_in_the_recordable_area_of_the_disc_0_1_2,
|
||||
descriptor.Min, descriptor.Sec, descriptor.Frame).AppendLine();
|
||||
|
||||
sb.
|
||||
AppendFormat("Maximum start of outermost Lead-out in the recordable area of the disc: {0:D2}:{1:D2}:{2:D2}",
|
||||
AppendFormat(Localization.Maximum_start_of_outermost_Lead_out_in_the_recordable_area_of_the_disc_0_1_2,
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME).AppendLine();
|
||||
}
|
||||
|
||||
@@ -442,9 +440,11 @@ public static class FullTOC
|
||||
|
||||
case 0xB1:
|
||||
{
|
||||
sb.AppendFormat("Number of skip interval pointers: {0}", descriptor.PMIN).AppendLine();
|
||||
sb.AppendFormat(Localization.Number_of_skip_interval_pointers_0, descriptor.PMIN).
|
||||
AppendLine();
|
||||
|
||||
sb.AppendFormat("Number of skip track pointers: {0}", descriptor.PSEC).AppendLine();
|
||||
sb.AppendFormat(Localization.Number_of_skip_track_pointers_0, descriptor.PSEC).
|
||||
AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -453,44 +453,43 @@ public static class FullTOC
|
||||
case 0xB3:
|
||||
case 0xB4:
|
||||
{
|
||||
sb.AppendFormat("Skip track {0}", descriptor.Min).AppendLine();
|
||||
sb.AppendFormat("Skip track {0}", descriptor.Sec).AppendLine();
|
||||
sb.AppendFormat("Skip track {0}", descriptor.Frame).AppendLine();
|
||||
sb.AppendFormat("Skip track {0}", descriptor.Zero).AppendLine();
|
||||
sb.AppendFormat("Skip track {0}", descriptor.PMIN).AppendLine();
|
||||
sb.AppendFormat("Skip track {0}", descriptor.PSEC).AppendLine();
|
||||
sb.AppendFormat("Skip track {0}", descriptor.PFRAME).AppendLine();
|
||||
sb.AppendFormat(Localization.Skip_track_0, descriptor.Min).AppendLine();
|
||||
sb.AppendFormat(Localization.Skip_track_0, descriptor.Sec).AppendLine();
|
||||
sb.AppendFormat(Localization.Skip_track_0, descriptor.Frame).AppendLine();
|
||||
sb.AppendFormat(Localization.Skip_track_0, descriptor.Zero).AppendLine();
|
||||
sb.AppendFormat(Localization.Skip_track_0, descriptor.PMIN).AppendLine();
|
||||
sb.AppendFormat(Localization.Skip_track_0, descriptor.PSEC).AppendLine();
|
||||
sb.AppendFormat(Localization.Skip_track_0, descriptor.PFRAME).AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 0xC0:
|
||||
{
|
||||
sb.AppendFormat("Optimum recording power: 0x{0:X2}", descriptor.Min).AppendLine();
|
||||
sb.AppendFormat(Localization.Optimum_recording_power_0, descriptor.Min).AppendLine();
|
||||
|
||||
if(descriptor.PHOUR > 0)
|
||||
sb.
|
||||
AppendFormat("Start time of the first Lead-in area in the disc: {3:D2}:{0:D2}:{1:D2}:{2:D2}",
|
||||
AppendFormat(Localization.Start_time_of_the_first_Lead_in_area_in_the_disc_3_0_1_2,
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME,
|
||||
descriptor.PHOUR).AppendLine();
|
||||
else
|
||||
sb.
|
||||
AppendFormat("Start time of the first Lead-in area in the disc: {0:D2}:{1:D2}:{2:D2}",
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME).AppendLine();
|
||||
sb.AppendFormat(Localization.Start_time_of_the_first_Lead_in_area_in_the_disc_0_1_2,
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME).AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 0xC1:
|
||||
{
|
||||
sb.AppendFormat("Copy of information of A1 from ATIP found");
|
||||
sb.AppendFormat("Min = {0}", descriptor.Min).AppendLine();
|
||||
sb.AppendFormat("Sec = {0}", descriptor.Sec).AppendLine();
|
||||
sb.AppendFormat("Frame = {0}", descriptor.Frame).AppendLine();
|
||||
sb.AppendFormat("Zero = {0}", descriptor.Zero).AppendLine();
|
||||
sb.AppendFormat("PMIN = {0}", descriptor.PMIN).AppendLine();
|
||||
sb.AppendFormat("PSEC = {0}", descriptor.PSEC).AppendLine();
|
||||
sb.AppendFormat("PFRAME = {0}", descriptor.PFRAME).AppendLine();
|
||||
sb.AppendFormat(Localization.Copy_of_information_of_A1_from_ATIP_found);
|
||||
sb.Append($"Min = {descriptor.Min}").AppendLine();
|
||||
sb.Append($"Sec = {descriptor.Sec}").AppendLine();
|
||||
sb.Append($"Frame = {descriptor.Frame}").AppendLine();
|
||||
sb.Append($"Zero = {descriptor.Zero}").AppendLine();
|
||||
sb.Append($"PMIN = {descriptor.PMIN}").AppendLine();
|
||||
sb.Append($"PSEC = {descriptor.PSEC}").AppendLine();
|
||||
sb.Append($"PFRAME = {descriptor.PFRAME}").AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -499,22 +498,20 @@ public static class FullTOC
|
||||
{
|
||||
if(descriptor.PHOUR > 0)
|
||||
{
|
||||
sb.
|
||||
AppendFormat("Start position of outer part lead-in area: {3:D2}:{0:D2}:{1:D2}:{2:D2}",
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME,
|
||||
descriptor.PHOUR).AppendLine();
|
||||
sb.AppendFormat(Localization.Start_position_of_outer_part_lead_in_area_3_0_1_2,
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME,
|
||||
descriptor.PHOUR).AppendLine();
|
||||
|
||||
sb.
|
||||
AppendFormat("Stop position of inner part lead-out area: {3:D2}:{0:D2}:{1:D2}:{2:D2}",
|
||||
descriptor.Min, descriptor.Sec, descriptor.Frame, descriptor.HOUR).
|
||||
AppendLine();
|
||||
sb.AppendFormat(Localization.Stop_position_of_inner_part_lead_out_area_3_0_1_2,
|
||||
descriptor.Min, descriptor.Sec, descriptor.Frame, descriptor.HOUR).
|
||||
AppendLine();
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendFormat("Start position of outer part lead-in area: {0:D2}:{1:D2}:{2:D2}",
|
||||
sb.AppendFormat(Localization.Start_position_of_outer_part_lead_in_area_0_1_2,
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME).AppendLine();
|
||||
|
||||
sb.AppendFormat("Stop position of inner part lead-out area: {0:D2}:{1:D2}:{2:D2}",
|
||||
sb.AppendFormat(Localization.Stop_position_of_inner_part_lead_out_area_0_1_2,
|
||||
descriptor.Min, descriptor.Sec, descriptor.Frame).AppendLine();
|
||||
}
|
||||
|
||||
@@ -525,28 +522,26 @@ public static class FullTOC
|
||||
{
|
||||
if(descriptor.POINT is >= 0x01 and <= 0x40)
|
||||
{
|
||||
sb.
|
||||
AppendFormat("Start time for interval that should be skipped: {0:D2}:{1:D2}:{2:D2}",
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME).AppendLine();
|
||||
sb.AppendFormat(Localization.Start_time_for_interval_that_should_be_skipped_0_1_2,
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME).AppendLine();
|
||||
|
||||
sb.
|
||||
AppendFormat("Ending time for interval that should be skipped: {0:D2}:{1:D2}:{2:D2}",
|
||||
descriptor.Min, descriptor.Sec, descriptor.Frame).AppendLine();
|
||||
sb.AppendFormat(Localization.Ending_time_for_interval_that_should_be_skipped_0_1_2,
|
||||
descriptor.Min, descriptor.Sec, descriptor.Frame).AppendLine();
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendFormat("ADR = {0}", descriptor.ADR).AppendLine();
|
||||
sb.AppendFormat("CONTROL = {0}", descriptor.CONTROL).AppendLine();
|
||||
sb.AppendFormat("TNO = {0}", descriptor.TNO).AppendLine();
|
||||
sb.AppendFormat("POINT = {0}", descriptor.POINT).AppendLine();
|
||||
sb.AppendFormat("Min = {0}", descriptor.Min).AppendLine();
|
||||
sb.AppendFormat("Sec = {0}", descriptor.Sec).AppendLine();
|
||||
sb.AppendFormat("Frame = {0}", descriptor.Frame).AppendLine();
|
||||
sb.AppendFormat("HOUR = {0}", descriptor.HOUR).AppendLine();
|
||||
sb.AppendFormat("PHOUR = {0}", descriptor.PHOUR).AppendLine();
|
||||
sb.AppendFormat("PMIN = {0}", descriptor.PMIN).AppendLine();
|
||||
sb.AppendFormat("PSEC = {0}", descriptor.PSEC).AppendLine();
|
||||
sb.AppendFormat("PFRAME = {0}", descriptor.PFRAME).AppendLine();
|
||||
sb.Append($"ADR = {descriptor.ADR}").AppendLine();
|
||||
sb.Append($"CONTROL = {descriptor.CONTROL}").AppendLine();
|
||||
sb.Append($"TNO = {descriptor.TNO}").AppendLine();
|
||||
sb.Append($"POINT = {descriptor.POINT}").AppendLine();
|
||||
sb.Append($"Min = {descriptor.Min}").AppendLine();
|
||||
sb.Append($"Sec = {descriptor.Sec}").AppendLine();
|
||||
sb.Append($"Frame = {descriptor.Frame}").AppendLine();
|
||||
sb.Append($"HOUR = {descriptor.HOUR}").AppendLine();
|
||||
sb.Append($"PHOUR = {descriptor.PHOUR}").AppendLine();
|
||||
sb.Append($"PMIN = {descriptor.PMIN}").AppendLine();
|
||||
sb.Append($"PSEC = {descriptor.PSEC}").AppendLine();
|
||||
sb.Append($"PFRAME = {descriptor.PFRAME}").AppendLine();
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -559,7 +554,7 @@ public static class FullTOC
|
||||
case 6:
|
||||
{
|
||||
uint id = (uint)((descriptor.Min << 16) + (descriptor.Sec << 8) + descriptor.Frame);
|
||||
sb.AppendFormat("Disc ID: {0:X6}", id & 0x00FFFFFF).AppendLine();
|
||||
sb.AppendFormat(Localization.Disc_ID_0_X6, id & 0x00FFFFFF).AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
192
CD/PMA.cs
192
CD/PMA.cs
@@ -30,6 +30,7 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Aaru.Console;
|
||||
@@ -74,7 +75,8 @@ public static class PMA
|
||||
if(decoded.DataLength + 2 != CDPMAResponse.Length)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("CD PMA decoder",
|
||||
"Expected CD PMA size ({0} bytes) is not received size ({1} bytes), not decoding",
|
||||
Localization.
|
||||
Expected_CD_PMA_size_0_bytes_is_not_received_size_1_bytes_not_decoding,
|
||||
decoded.DataLength + 2, CDPMAResponse.Length);
|
||||
|
||||
return null;
|
||||
@@ -111,17 +113,19 @@ public static class PMA
|
||||
|
||||
#if DEBUG
|
||||
if(response.Reserved1 != 0)
|
||||
sb.AppendFormat("Reserved1 = 0x{0:X2}", response.Reserved1).AppendLine();
|
||||
sb.AppendFormat(Localization.Reserved1_equals_0_X8, response.Reserved1).AppendLine();
|
||||
|
||||
if(response.Reserved2 != 0)
|
||||
sb.AppendFormat("Reserved2 = 0x{0:X2}", response.Reserved2).AppendLine();
|
||||
sb.AppendFormat(Localization.Reserved2_equals_0_X8, response.Reserved2).AppendLine();
|
||||
#endif
|
||||
|
||||
List<string> tracks;
|
||||
|
||||
foreach(CDPMADescriptors descriptor in response.PMADescriptors)
|
||||
{
|
||||
#if DEBUG
|
||||
if(descriptor.Reserved != 0)
|
||||
sb.AppendFormat("Reserved = 0x{0:X2}", descriptor.Reserved).AppendLine();
|
||||
sb.AppendFormat(Localization.Reserved_equals_0_X2, descriptor.Reserved).AppendLine();
|
||||
#endif
|
||||
|
||||
switch(descriptor.ADR)
|
||||
@@ -129,50 +133,88 @@ public static class PMA
|
||||
case 1:
|
||||
if(descriptor.POINT > 0)
|
||||
{
|
||||
sb.AppendFormat("Track {0}", descriptor.POINT);
|
||||
|
||||
switch((TocControl)(descriptor.CONTROL & 0x0D))
|
||||
{
|
||||
case TocControl.TwoChanNoPreEmph:
|
||||
sb.Append(" (Stereo audio track with no pre-emphasis)");
|
||||
if(descriptor.PHOUR > 0)
|
||||
sb.AppendFormat(Localization.Track_0_Stereo_audio_track_with_no_pre_emphasis_starts_at_4_1_2_3_and_ends_at_8_5_6_7,
|
||||
descriptor.POINT, descriptor.PMIN, descriptor.PSEC,
|
||||
descriptor.PFRAME, descriptor.PHOUR, descriptor.Min, descriptor.Sec,
|
||||
descriptor.Frame, descriptor.HOUR);
|
||||
else
|
||||
sb.AppendFormat(Localization.Track_0_Stereo_audio_track_with_no_pre_emphasis_starts_at_1_2_3_and_ends_at_4_5_6,
|
||||
descriptor.POINT, descriptor.PMIN, descriptor.PSEC,
|
||||
descriptor.PFRAME, descriptor.Min, descriptor.Sec,
|
||||
descriptor.Frame);
|
||||
|
||||
break;
|
||||
case TocControl.TwoChanPreEmph:
|
||||
sb.Append(" (Stereo audio track with 50/15 μs pre-emphasis)");
|
||||
if(descriptor.PHOUR > 0)
|
||||
sb.AppendFormat(Localization.Track_0_Stereo_audio_track_with_50_15_s_pre_emphasis_starts_at_4_1_2_3_and_ends_at_8_5_6_7,
|
||||
descriptor.POINT, descriptor.PMIN, descriptor.PSEC,
|
||||
descriptor.PFRAME, descriptor.PHOUR, descriptor.Min, descriptor.Sec,
|
||||
descriptor.Frame, descriptor.HOUR);
|
||||
else
|
||||
sb.AppendFormat(Localization.Track_0_Stereo_audio_track_with_50_15_us_pre_emphasis_starts_at_1_2_3_and_ends_at_4_5_6,
|
||||
descriptor.POINT, descriptor.PMIN, descriptor.PSEC,
|
||||
descriptor.PFRAME, descriptor.Min, descriptor.Sec,
|
||||
descriptor.Frame);
|
||||
|
||||
break;
|
||||
case TocControl.FourChanNoPreEmph:
|
||||
sb.Append(" (Quadraphonic audio track with no pre-emphasis)");
|
||||
if(descriptor.PHOUR > 0)
|
||||
sb.AppendFormat(Localization.Track_0_Quadraphonic_audio_track_with_no_pre_emphasis_starts_at_4_1_2_3_and_ends_at_8_5_6_7,
|
||||
descriptor.POINT, descriptor.PMIN, descriptor.PSEC,
|
||||
descriptor.PFRAME, descriptor.PHOUR, descriptor.Min, descriptor.Sec,
|
||||
descriptor.Frame, descriptor.HOUR);
|
||||
else
|
||||
sb.AppendFormat(Localization.Track_0_Quadraphonic_audio_track_with_no_pre_emphasis_starts_at_1_2_3_and_ends_at_4_5_6,
|
||||
descriptor.POINT, descriptor.PMIN, descriptor.PSEC,
|
||||
descriptor.PFRAME, descriptor.Min, descriptor.Sec,
|
||||
descriptor.Frame);
|
||||
|
||||
break;
|
||||
case TocControl.FourChanPreEmph:
|
||||
sb.Append(" (Quadraphonic audio track with 50/15 μs pre-emphasis)");
|
||||
if(descriptor.PHOUR > 0)
|
||||
sb.AppendFormat(Localization.Track_0_Quadraphonic_audio_track_with_50_15_us_pre_emphasis_starts_at_4_1_2_3_and_ends_at_8_5_6_7,
|
||||
descriptor.POINT, descriptor.PMIN, descriptor.PSEC,
|
||||
descriptor.PFRAME, descriptor.PHOUR, descriptor.Min, descriptor.Sec,
|
||||
descriptor.Frame, descriptor.HOUR);
|
||||
else
|
||||
sb.AppendFormat(Localization.Track_0_Quadraphonic_audio_track_with_50_15_us_pre_emphasis_starts_at_1_2_3_and_ends_at_4_5_6,
|
||||
descriptor.POINT, descriptor.PMIN, descriptor.PSEC,
|
||||
descriptor.PFRAME, descriptor.Min, descriptor.Sec,
|
||||
descriptor.Frame);
|
||||
|
||||
break;
|
||||
case TocControl.DataTrack:
|
||||
sb.Append(" (Data track, recorded uninterrupted)");
|
||||
if(descriptor.PHOUR > 0)
|
||||
sb.AppendFormat(Localization.Track_0_Data_track_recorded_uninterrupted_starts_at_4_1_2_3_and_ends_at_8_5_6_7,
|
||||
descriptor.POINT, descriptor.PMIN, descriptor.PSEC,
|
||||
descriptor.PFRAME, descriptor.PHOUR, descriptor.Min, descriptor.Sec,
|
||||
descriptor.Frame, descriptor.HOUR);
|
||||
else
|
||||
sb.AppendFormat(Localization.Track_0_Data_track_recorded_uninterrupted_starts_at_1_2_3_and_ends_at_4_5_6,
|
||||
descriptor.POINT, descriptor.PMIN, descriptor.PSEC,
|
||||
descriptor.PFRAME, descriptor.Min, descriptor.Sec,
|
||||
descriptor.Frame);
|
||||
|
||||
break;
|
||||
case TocControl.DataTrackIncremental:
|
||||
sb.Append(" (Data track, recorded incrementally)");
|
||||
if(descriptor.PHOUR > 0)
|
||||
sb.AppendFormat(Localization.Track_0_Data_track_recorded_incrementally_starts_at_4_1_2_3_and_ends_at_8_5_6_7,
|
||||
descriptor.POINT, descriptor.PMIN, descriptor.PSEC,
|
||||
descriptor.PFRAME, descriptor.PHOUR, descriptor.Min, descriptor.Sec,
|
||||
descriptor.Frame, descriptor.HOUR);
|
||||
else
|
||||
sb.AppendFormat(Localization.Track_0_Data_track_recorded_incrementally_starts_at_1_2_3_and_ends_at_4_5_6,
|
||||
descriptor.POINT, descriptor.PMIN, descriptor.PSEC,
|
||||
descriptor.PFRAME, descriptor.Min, descriptor.Sec,
|
||||
descriptor.Frame);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if(descriptor.PHOUR > 0)
|
||||
sb.AppendFormat(" starts at {3}:{0:D2}:{1:D2}:{2:D2}", descriptor.PMIN, descriptor.PSEC,
|
||||
descriptor.PFRAME, descriptor.PHOUR);
|
||||
else
|
||||
sb.AppendFormat(" starts at {0:D2}:{1:D2}:{2:D2}", descriptor.PMIN, descriptor.PSEC,
|
||||
descriptor.PFRAME);
|
||||
|
||||
if(descriptor.PHOUR > 0)
|
||||
sb.AppendFormat(" and ends at {3}:{0:D2}:{1:D2}:{2:D2}", descriptor.Min, descriptor.Sec,
|
||||
descriptor.Frame, descriptor.HOUR);
|
||||
else
|
||||
sb.AppendFormat(" and ends at {0:D2}:{1:D2}:{2:D2}", descriptor.Min, descriptor.Sec,
|
||||
descriptor.Frame);
|
||||
|
||||
sb.AppendLine();
|
||||
}
|
||||
else
|
||||
@@ -181,109 +223,97 @@ public static class PMA
|
||||
break;
|
||||
case 2:
|
||||
uint id = (uint)((descriptor.Min << 16) + (descriptor.Sec << 8) + descriptor.Frame);
|
||||
sb.AppendFormat("Disc ID: {0:X6}", id & 0x00FFFFFF).AppendLine();
|
||||
sb.AppendFormat(Localization.Disc_ID_0_X6, id & 0x00FFFFFF).AppendLine();
|
||||
|
||||
break;
|
||||
case 3:
|
||||
sb.AppendFormat("Skip track assignment {0} says that tracks ", descriptor.POINT);
|
||||
tracks = new List<string>();
|
||||
|
||||
if(descriptor.Min > 0)
|
||||
sb.AppendFormat("{0} ", descriptor.Min);
|
||||
tracks.Add($"{descriptor.Min}");
|
||||
|
||||
if(descriptor.Sec > 0)
|
||||
sb.AppendFormat("{0} ", descriptor.Sec);
|
||||
tracks.Add($"{descriptor.Sec}");
|
||||
|
||||
if(descriptor.Frame > 0)
|
||||
sb.AppendFormat("{0} ", descriptor.Frame);
|
||||
tracks.Add($"{descriptor.Frame}");
|
||||
|
||||
if(descriptor.PMIN > 0)
|
||||
sb.AppendFormat("{0} ", descriptor.PMIN);
|
||||
tracks.Add($"{descriptor.PMIN}");
|
||||
|
||||
if(descriptor.PSEC > 0)
|
||||
sb.AppendFormat("{0} ", descriptor.PSEC);
|
||||
tracks.Add($"{descriptor.PSEC}");
|
||||
|
||||
if(descriptor.PFRAME > 0)
|
||||
sb.AppendFormat("{0} ", descriptor.PFRAME);
|
||||
tracks.Add($"{descriptor.PFRAME}");
|
||||
|
||||
sb.AppendLine("should be skipped");
|
||||
sb.AppendFormat(Localization.Skip_track_assignment_0_says_that_tracks_1_should_be_skipped,
|
||||
descriptor.POINT, string.Join(' ', tracks));
|
||||
|
||||
break;
|
||||
case 4:
|
||||
sb.AppendFormat("Unskip track assignment {0} says that tracks ", descriptor.POINT);
|
||||
tracks = new List<string>();
|
||||
|
||||
if(descriptor.Min > 0)
|
||||
sb.AppendFormat("{0} ", descriptor.Min);
|
||||
tracks.Add($"{descriptor.Min}");
|
||||
|
||||
if(descriptor.Sec > 0)
|
||||
sb.AppendFormat("{0} ", descriptor.Sec);
|
||||
tracks.Add($"{descriptor.Sec}");
|
||||
|
||||
if(descriptor.Frame > 0)
|
||||
sb.AppendFormat("{0} ", descriptor.Frame);
|
||||
tracks.Add($"{descriptor.Frame}");
|
||||
|
||||
if(descriptor.PMIN > 0)
|
||||
sb.AppendFormat("{0} ", descriptor.PMIN);
|
||||
tracks.Add($"{descriptor.PMIN}");
|
||||
|
||||
if(descriptor.PSEC > 0)
|
||||
sb.AppendFormat("{0} ", descriptor.PSEC);
|
||||
tracks.Add($"{descriptor.PSEC}");
|
||||
|
||||
if(descriptor.PFRAME > 0)
|
||||
sb.AppendFormat("{0} ", descriptor.PFRAME);
|
||||
tracks.Add($"{descriptor.PFRAME}");
|
||||
|
||||
sb.AppendLine("should not be skipped");
|
||||
sb.AppendFormat(Localization.Unskip_track_assignment_0_says_that_tracks_1_should_not_be_skipped,
|
||||
descriptor.POINT, string.Join(' ', tracks));
|
||||
|
||||
break;
|
||||
case 5:
|
||||
sb.AppendFormat("Skip time interval assignment {0} says that from ", descriptor.POINT);
|
||||
|
||||
if(descriptor.PHOUR > 0)
|
||||
sb.AppendFormat("{3}:{0:D2}:{1:D2}:{2:D2} to ", descriptor.PMIN, descriptor.PSEC,
|
||||
descriptor.PFRAME, descriptor.PHOUR);
|
||||
else
|
||||
sb.AppendFormat("{0:D2}:{1:D2}:{2:D2} to ", descriptor.PMIN, descriptor.PSEC,
|
||||
descriptor.PFRAME);
|
||||
|
||||
if(descriptor.PHOUR > 0)
|
||||
sb.AppendFormat("{3}:{0:D2}:{1:D2}:{2:D2} ", descriptor.Min, descriptor.Sec, descriptor.Frame,
|
||||
sb.AppendFormat(Localization.Skip_time_interval_assignment_0_says_that_from_4_1_2_3_to_8_5_6_7_should_be_skipped,
|
||||
descriptor.POINT, descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME,
|
||||
descriptor.PHOUR, descriptor.Min, descriptor.Sec, descriptor.Frame,
|
||||
descriptor.HOUR);
|
||||
else
|
||||
sb.AppendFormat("{0:D2}:{1:D2}:{2:D2} ", descriptor.Min, descriptor.Sec, descriptor.Frame);
|
||||
|
||||
sb.AppendLine("should be skipped");
|
||||
sb.AppendFormat(Localization.Skip_time_interval_assignment_0_says_that_from_1_2_3_to_4_5_6_should_be_skipped,
|
||||
descriptor.POINT, descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME,
|
||||
descriptor.Min, descriptor.Sec, descriptor.Frame);
|
||||
|
||||
break;
|
||||
case 6:
|
||||
sb.AppendFormat("Unskip time interval assignment {0} says that from ", descriptor.POINT);
|
||||
|
||||
if(descriptor.PHOUR > 0)
|
||||
sb.AppendFormat("{3}:{0:D2}:{1:D2}:{2:D2} to ", descriptor.PMIN, descriptor.PSEC,
|
||||
descriptor.PFRAME, descriptor.PHOUR);
|
||||
else
|
||||
sb.AppendFormat("{0:D2}:{1:D2}:{2:D2} to ", descriptor.PMIN, descriptor.PSEC,
|
||||
descriptor.PFRAME);
|
||||
|
||||
if(descriptor.PHOUR > 0)
|
||||
sb.AppendFormat("{3}:{0:D2}:{1:D2}:{2:D2} ", descriptor.Min, descriptor.Sec, descriptor.Frame,
|
||||
sb.AppendFormat(Localization.Unskip_time_interval_assignment_0_says_that_from_4_1_2_3_to_8_5_6_7_should_not_be_skipped,
|
||||
descriptor.POINT, descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME,
|
||||
descriptor.PHOUR, descriptor.Min, descriptor.Sec, descriptor.Frame,
|
||||
descriptor.HOUR);
|
||||
else
|
||||
sb.AppendFormat("{0:D2}:{1:D2}:{2:D2} ", descriptor.Min, descriptor.Sec, descriptor.Frame);
|
||||
|
||||
sb.AppendLine("should not be skipped");
|
||||
sb.AppendFormat(Localization.Unskip_time_interval_assignment_0_says_that_from_1_2_3_to_4_5_6_should_not_be_skipped,
|
||||
descriptor.POINT, descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME,
|
||||
descriptor.Min, descriptor.Sec, descriptor.Frame);
|
||||
|
||||
break;
|
||||
default:
|
||||
|
||||
sb.AppendFormat("ADR = {0}", descriptor.ADR).AppendLine();
|
||||
sb.AppendFormat("CONTROL = {0}", descriptor.CONTROL).AppendLine();
|
||||
sb.AppendFormat("TNO = {0}", descriptor.TNO).AppendLine();
|
||||
sb.AppendFormat("POINT = {0}", descriptor.POINT).AppendLine();
|
||||
sb.AppendFormat("Min = {0}", descriptor.Min).AppendLine();
|
||||
sb.AppendFormat("Sec = {0}", descriptor.Sec).AppendLine();
|
||||
sb.AppendFormat("Frame = {0}", descriptor.Frame).AppendLine();
|
||||
sb.AppendFormat("HOUR = {0}", descriptor.HOUR).AppendLine();
|
||||
sb.AppendFormat("PHOUR = {0}", descriptor.PHOUR).AppendLine();
|
||||
sb.AppendFormat("PMIN = {0}", descriptor.PMIN).AppendLine();
|
||||
sb.AppendFormat("PSEC = {0}", descriptor.PSEC).AppendLine();
|
||||
sb.AppendFormat("PFRAME = {0}", descriptor.PFRAME).AppendLine();
|
||||
sb.AppendLine($"ADR = {descriptor.ADR}");
|
||||
sb.AppendLine($"CONTROL = {descriptor.CONTROL}");
|
||||
sb.AppendLine($"TNO = {descriptor.TNO}");
|
||||
sb.AppendLine($"POINT = {descriptor.POINT}");
|
||||
sb.AppendLine($"Min = {descriptor.Min}");
|
||||
sb.AppendLine($"Sec = {descriptor.Sec}");
|
||||
sb.AppendLine($"Frame = {descriptor.Frame}");
|
||||
sb.AppendLine($"HOUR = {descriptor.HOUR}");
|
||||
sb.AppendLine($"PHOUR = {descriptor.PHOUR}");
|
||||
sb.AppendLine($"PMIN = {descriptor.PMIN}");
|
||||
sb.AppendLine($"PSEC = {descriptor.PSEC}");
|
||||
sb.AppendLine($"PFRAME = {descriptor.PFRAME}");
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
76
CD/Sector.cs
76
CD/Sector.cs
@@ -294,11 +294,11 @@ public static class Sector
|
||||
buffer[9] != 0xFF ||
|
||||
buffer[10] != 0xFF ||
|
||||
buffer[11] != 0x00)
|
||||
return "CD sector.";
|
||||
return Localization.CD_sector;
|
||||
|
||||
var sb = new StringBuilder();
|
||||
|
||||
sb.AppendLine("CD-ROM sector.");
|
||||
sb.AppendLine(Localization.CD_ROM_sector);
|
||||
|
||||
byte min = buffer[12];
|
||||
byte sec = buffer[13];
|
||||
@@ -321,24 +321,24 @@ public static class Sector
|
||||
if(moreThan90)
|
||||
min += 0x90;
|
||||
|
||||
sb.AppendFormat("Position {0:X2}:{1:X2}:{2:X2} (LBA {3})", min, sec, frame, lba).AppendLine();
|
||||
sb.AppendFormat(Localization.Position_0_1_2_LBA_3, min, sec, frame, lba).AppendLine();
|
||||
|
||||
switch(buffer[15] & 0x03)
|
||||
{
|
||||
case 0:
|
||||
sb.AppendLine("Mode 0.");
|
||||
sb.AppendLine(Localization.Mode_0);
|
||||
|
||||
break;
|
||||
case 1:
|
||||
sb.AppendLine("Mode 1.");
|
||||
sb.AppendLine(Localization.Mode_1);
|
||||
|
||||
break;
|
||||
case 2:
|
||||
sb.AppendLine("Mode 2.");
|
||||
sb.AppendLine(Localization.Mode_2);
|
||||
|
||||
break;
|
||||
case 3:
|
||||
sb.AppendLine("Invalid mode 0.");
|
||||
sb.AppendLine(Localization.Invalid_mode_3);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -346,35 +346,35 @@ public static class Sector
|
||||
switch((buffer[15] & 0xE0) >> 5)
|
||||
{
|
||||
case 0:
|
||||
sb.AppendLine("User data block");
|
||||
sb.AppendLine(Localization.User_data_block);
|
||||
|
||||
break;
|
||||
case 1:
|
||||
sb.AppendLine("Fourth run-in block");
|
||||
sb.AppendLine(Localization.Fourth_run_in_block);
|
||||
|
||||
break;
|
||||
case 2:
|
||||
sb.AppendLine("Third run-in block");
|
||||
sb.AppendLine(Localization.Third_run_in_block);
|
||||
|
||||
break;
|
||||
case 3:
|
||||
sb.AppendLine("Second run-in block");
|
||||
sb.AppendLine(Localization.Second_run_in_block);
|
||||
|
||||
break;
|
||||
case 4:
|
||||
sb.AppendLine("First run-in block");
|
||||
sb.AppendLine(Localization.First_run_in_block);
|
||||
|
||||
break;
|
||||
case 5:
|
||||
sb.AppendLine("Link block");
|
||||
sb.AppendLine(Localization.Link_block);
|
||||
|
||||
break;
|
||||
case 6:
|
||||
sb.AppendLine("Second run-out block");
|
||||
sb.AppendLine(Localization.Second_run_out_block);
|
||||
|
||||
break;
|
||||
case 7:
|
||||
sb.AppendLine("First run-out block");
|
||||
sb.AppendLine(Localization.First_run_out_block);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -395,13 +395,13 @@ public static class Sector
|
||||
break;
|
||||
}
|
||||
|
||||
sb.AppendLine(empty ? "Correct sector contents." : "Incorrect sector contents.");
|
||||
sb.AppendLine(empty ? Localization.Correct_sector_contents : Localization.Incorrect_sector_contents);
|
||||
|
||||
break;
|
||||
case 1:
|
||||
sb.AppendLine(correctEdc == true ? "Correct EDC." : "Incorrect EDC.");
|
||||
sb.AppendLine(correctEccP == true ? "Correct ECC P." : "Incorrect ECC P.");
|
||||
sb.AppendLine(correctEccQ == true ? "Correct ECC Q." : "Incorrect ECC Q.");
|
||||
sb.AppendLine(correctEdc == true ? Localization.Correct_EDC : Localization.Incorrect_EDC);
|
||||
sb.AppendLine(correctEccP == true ? Localization.Correct_ECC_P : Localization.Incorrect_ECC_P);
|
||||
sb.AppendLine(correctEccQ == true ? Localization.Correct_ECC_Q : Localization.Incorrect_ECC_Q);
|
||||
|
||||
for(int i = 2068; i < 2076; i++)
|
||||
if(buffer[i] != 0x00)
|
||||
@@ -411,7 +411,7 @@ public static class Sector
|
||||
break;
|
||||
}
|
||||
|
||||
sb.AppendLine(empty ? "Correct zero fill." : "Incorrect zero fill.");
|
||||
sb.AppendLine(empty ? Localization.Correct_zero_fill : Localization.Incorrect_zero_fill);
|
||||
|
||||
break;
|
||||
case 2:
|
||||
@@ -420,48 +420,48 @@ public static class Sector
|
||||
buffer[18] != buffer[22] ||
|
||||
buffer[19] != buffer[23])
|
||||
{
|
||||
sb.AppendLine("Subheader copies differ.");
|
||||
sb.AppendLine(correctEdc == true ? "Correct EDC." : "Incorrect EDC.");
|
||||
sb.AppendLine(correctEccP == true ? "Correct ECC P." : "Incorrect ECC P.");
|
||||
sb.AppendLine(correctEccQ == true ? "Correct ECC Q." : "Incorrect ECC Q.");
|
||||
sb.AppendLine(Localization.Subheader_copies_differ);
|
||||
sb.AppendLine(correctEdc == true ? Localization.Correct_EDC : Localization.Incorrect_EDC);
|
||||
sb.AppendLine(correctEccP == true ? Localization.Correct_ECC_P : Localization.Incorrect_ECC_P);
|
||||
sb.AppendLine(correctEccQ == true ? Localization.Correct_ECC_Q : Localization.Incorrect_ECC_Q);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
sb.AppendFormat("File number: {0}", buffer[16]).AppendLine();
|
||||
sb.AppendFormat("Channel number: {0}", buffer[17]).AppendLine();
|
||||
sb.AppendFormat("Coding information number: {0}", buffer[19]).AppendLine();
|
||||
sb.AppendFormat(Localization.File_number_0, buffer[16]).AppendLine();
|
||||
sb.AppendFormat(Localization.Channel_number_0, buffer[17]).AppendLine();
|
||||
sb.AppendFormat(Localization.Coding_information_number_0, buffer[19]).AppendLine();
|
||||
|
||||
if((buffer[18] & 0x80) == 0x80)
|
||||
sb.AppendLine("End of file.");
|
||||
sb.AppendLine(Localization.End_of_file);
|
||||
|
||||
if((buffer[18] & 0x40) == 0x40)
|
||||
sb.AppendLine("Real-time block.");
|
||||
sb.AppendLine(Localization.Real_time_block);
|
||||
|
||||
sb.AppendLine((buffer[18] & 0x20) == 0x20 ? "Form 2." : "Form 1.");
|
||||
sb.AppendLine((buffer[18] & 0x20) == 0x20 ? Localization.Form_2 : Localization.Form_1);
|
||||
|
||||
if((buffer[18] & 0x10) == 0x10)
|
||||
sb.AppendLine("Trigger block.");
|
||||
sb.AppendLine(Localization.Trigger_block);
|
||||
|
||||
if((buffer[18] & 0x08) == 0x08)
|
||||
sb.AppendLine("Data block.");
|
||||
sb.AppendLine(Localization.Data_block);
|
||||
|
||||
if((buffer[18] & 0x04) == 0x04)
|
||||
sb.AppendLine("Audio block.");
|
||||
sb.AppendLine(Localization.Audio_block);
|
||||
|
||||
if((buffer[18] & 0x02) == 0x02)
|
||||
sb.AppendLine("Video block.");
|
||||
sb.AppendLine(Localization.Video_block);
|
||||
|
||||
if((buffer[18] & 0x01) == 0x01)
|
||||
sb.AppendLine("End of record.");
|
||||
sb.AppendLine(Localization.End_of_record);
|
||||
|
||||
if((buffer[18] & 0x20) != 0x20)
|
||||
{
|
||||
sb.AppendLine(correctEccP == true ? "Correct ECC P." : "Incorrect ECC P.");
|
||||
sb.AppendLine(correctEccQ == true ? "Correct ECC Q." : "Incorrect ECC Q.");
|
||||
sb.AppendLine(correctEccP == true ? Localization.Correct_ECC_P : Localization.Incorrect_ECC_P);
|
||||
sb.AppendLine(correctEccQ == true ? Localization.Correct_ECC_Q : Localization.Incorrect_ECC_Q);
|
||||
}
|
||||
|
||||
sb.AppendLine(correctEdc == true ? "Correct EDC." : "Incorrect EDC.");
|
||||
sb.AppendLine(correctEdc == true ? Localization.Correct_EDC : Localization.Incorrect_EDC);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,8 @@ public static class Session
|
||||
if(decoded.DataLength + 2 != CDSessionInfoResponse.Length)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("CD Session Info decoder",
|
||||
"Expected CDSessionInfo size ({0} bytes) is not received size ({1} bytes), not decoding",
|
||||
Localization.
|
||||
Expected_CDSessionInfo_size_0_bytes_is_not_received_size_1_bytes_not_decoding,
|
||||
decoded.DataLength + 2, CDSessionInfoResponse.Length);
|
||||
|
||||
return null;
|
||||
@@ -100,14 +101,15 @@ public static class Session
|
||||
|
||||
var sb = new StringBuilder();
|
||||
|
||||
sb.AppendFormat("First complete session number: {0}", response.FirstCompleteSession).AppendLine();
|
||||
sb.AppendFormat("Last complete session number: {0}", response.LastCompleteSession).AppendLine();
|
||||
sb.AppendFormat(Localization.First_complete_session_number_0, response.FirstCompleteSession).AppendLine();
|
||||
sb.AppendFormat(Localization.Last_complete_session_number_0, response.LastCompleteSession).AppendLine();
|
||||
|
||||
foreach(TrackDataDescriptor descriptor in response.TrackDescriptors)
|
||||
{
|
||||
sb.AppendFormat("First track number in last complete session: {0}", descriptor.TrackNumber).AppendLine();
|
||||
sb.AppendFormat(Localization.First_track_number_in_last_complete_session_0, descriptor.TrackNumber).
|
||||
AppendLine();
|
||||
|
||||
sb.AppendFormat("Track starts at LBA {0}, or MSF {1:X2}:{2:X2}:{3:X2}", descriptor.TrackStartAddress,
|
||||
sb.AppendFormat(Localization.Track_starts_at_LBA_0_or_MSF_2_3, descriptor.TrackStartAddress,
|
||||
(descriptor.TrackStartAddress & 0x0000FF00) >> 8,
|
||||
(descriptor.TrackStartAddress & 0x00FF0000) >> 16,
|
||||
(descriptor.TrackStartAddress & 0xFF000000) >> 24).AppendLine();
|
||||
@@ -115,65 +117,65 @@ public static class Session
|
||||
switch((TocAdr)descriptor.ADR)
|
||||
{
|
||||
case TocAdr.NoInformation:
|
||||
sb.AppendLine("Q subchannel mode not given");
|
||||
sb.AppendLine(Localization.Q_subchannel_mode_not_given);
|
||||
|
||||
break;
|
||||
case TocAdr.CurrentPosition:
|
||||
sb.AppendLine("Q subchannel stores current position");
|
||||
sb.AppendLine(Localization.Q_subchannel_stores_current_position);
|
||||
|
||||
break;
|
||||
case TocAdr.ISRC:
|
||||
sb.AppendLine("Q subchannel stores ISRC");
|
||||
sb.AppendLine(Localization.Q_subchannel_stores_ISRC);
|
||||
|
||||
break;
|
||||
case TocAdr.MediaCatalogNumber:
|
||||
sb.AppendLine("Q subchannel stores media catalog number");
|
||||
sb.AppendLine(Localization.Q_subchannel_stores_media_catalog_number);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if((descriptor.CONTROL & (byte)TocControl.ReservedMask) == (byte)TocControl.ReservedMask)
|
||||
sb.AppendFormat("Reserved flags 0x{0:X2} set", descriptor.CONTROL).AppendLine();
|
||||
sb.AppendFormat(Localization.Reserved_flags_0_set, descriptor.CONTROL).AppendLine();
|
||||
else
|
||||
{
|
||||
switch((TocControl)(descriptor.CONTROL & 0x0D))
|
||||
{
|
||||
case TocControl.TwoChanNoPreEmph:
|
||||
sb.AppendLine("Stereo audio track with no pre-emphasis");
|
||||
sb.AppendLine(Localization.Stereo_audio_track_with_no_pre_emphasis);
|
||||
|
||||
break;
|
||||
case TocControl.TwoChanPreEmph:
|
||||
sb.AppendLine("Stereo audio track with 50/15 μs pre-emphasis");
|
||||
sb.AppendLine(Localization.Stereo_audio_track_with_50_15_us_pre_emphasis);
|
||||
|
||||
break;
|
||||
case TocControl.FourChanNoPreEmph:
|
||||
sb.AppendLine("Quadraphonic audio track with no pre-emphasis");
|
||||
sb.AppendLine(Localization.Quadraphonic_audio_track_with_no_pre_emphasis);
|
||||
|
||||
break;
|
||||
case TocControl.FourChanPreEmph:
|
||||
sb.AppendLine("Stereo audio track with 50/15 μs pre-emphasis");
|
||||
sb.AppendLine(Localization.Stereo_audio_track_with_50_15_us_pre_emphasis);
|
||||
|
||||
break;
|
||||
case TocControl.DataTrack:
|
||||
sb.AppendLine("Data track, recorded uninterrupted");
|
||||
sb.AppendLine(Localization.Data_track_recorded_uninterrupted);
|
||||
|
||||
break;
|
||||
case TocControl.DataTrackIncremental:
|
||||
sb.AppendLine("Data track, recorded incrementally");
|
||||
sb.AppendLine(Localization.Data_track_recorded_incrementally);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
sb.AppendLine((descriptor.CONTROL & (byte)TocControl.CopyPermissionMask) ==
|
||||
(byte)TocControl.CopyPermissionMask ? "Digital copy of track is permitted"
|
||||
: "Digital copy of track is prohibited");
|
||||
(byte)TocControl.CopyPermissionMask ? Localization.Digital_copy_of_track_is_permitted
|
||||
: Localization.Digital_copy_of_track_is_prohibited);
|
||||
|
||||
#if DEBUG
|
||||
if(descriptor.Reserved1 != 0)
|
||||
sb.AppendFormat("Reserved1 = 0x{0:X2}", descriptor.Reserved1).AppendLine();
|
||||
sb.AppendFormat(Localization.Reserved1_equals_0_X8, descriptor.Reserved1).AppendLine();
|
||||
|
||||
if(descriptor.Reserved2 != 0)
|
||||
sb.AppendFormat("Reserved2 = 0x{0:X2}", descriptor.Reserved2).AppendLine();
|
||||
sb.AppendFormat(Localization.Reserved2_equals_0_X8, descriptor.Reserved2).AppendLine();
|
||||
#endif
|
||||
|
||||
sb.AppendLine();
|
||||
|
||||
455
CD/Subchannel.cs
455
CD/Subchannel.cs
@@ -337,13 +337,17 @@ public static class Subchannel
|
||||
|
||||
string controlInfo = ((control & 0xC) / 4) switch
|
||||
{
|
||||
0 => $"stereo audio {((control & 0x01) == 1 ? "with" : "without")} pre-emphasis",
|
||||
1 => $"{((control & 0x01) == 1 ? "incremental" : "uninterrupted")} data",
|
||||
2 => $"quadraphonic audio {((control & 0x01) == 1 ? "with" : "without")} pre-emphasis",
|
||||
_ => $"reserved control value {control & 0x01}"
|
||||
0 => (control & 0x01) == 1 ? Localization.Subchannel_PrettifyQ_stereo_audio_with_pre_emphasis
|
||||
: Localization.Subchannel_PrettifyQ_stereo_audio_without_pre_emphasis,
|
||||
1 => (control & 0x01) == 1 ? Localization.Subchannel_PrettifyQ_incremental_data
|
||||
: Localization.Subchannel_PrettifyQ_uninterrupted_data,
|
||||
2 => (control & 0x01) == 1 ? Localization.Subchannel_PrettifyQ_quadraphonic_audio_with_pre_emphasis
|
||||
: Localization.Subchannel_PrettifyQ_quadraphonic_audio_without_pre_emphasis,
|
||||
_ => string.Format(Localization.Subchannel_PrettifyQ_reserved_control_value__0_, control & 0x01)
|
||||
};
|
||||
|
||||
string copy = (control & 0x02) > 0 ? "copy permitted" : "copy prohibited";
|
||||
string copy = (control & 0x02) > 0 ? Localization.Subchannel_PrettifyQ_copy_permitted
|
||||
: Localization.Subchannel_PrettifyQ_copy_prohibited;
|
||||
|
||||
if(bcd)
|
||||
BcdToBinaryQ(subBuf);
|
||||
@@ -362,160 +366,246 @@ public static class Subchannel
|
||||
|
||||
if(lba < 0)
|
||||
{
|
||||
area = "Lead-In";
|
||||
area = Localization.Subchannel_PrettifyQ_Lead_In;
|
||||
|
||||
switch(adr)
|
||||
{
|
||||
case 1 when subBuf[2] < 0xA0:
|
||||
return $"{minute:D2}:{second:D2}:{frame:D2} - LBA {lba,6}: {area} area, {(corruptedPause
|
||||
? "corrupted pause"
|
||||
: pause
|
||||
? "pause"
|
||||
: "not pause")}, {controlInfo}, {copy}, Q mode {adr} position: {subBuf[3]
|
||||
:X2}:{subBuf[4]:X2}:{subBuf[5]:X2} (LBA {qPos}), track {subBuf[2]
|
||||
:X} starts at {subBuf[7]:X2}:{subBuf[8]:X2}:{subBuf[9]:X2} (LBA {qStart
|
||||
}), Q CRC 0x{subBuf[10]:X2}{subBuf[11]:X2} ({(crcOk ? "OK" : "BAD")}), R-W {
|
||||
(rwEmpty ? "empty" : "not empty")}";
|
||||
return
|
||||
string.Format(Localization.Subchannel_PrettifyQ_0_1_2_LBA_3_4_area_5_6_7_Q_mode_8_position_9_10_11_LBA_12_track_13_starts_at_14_15_16_LBA_17_Q_CRC_18_19_20_R_W_21,
|
||||
minute, second, frame, lba, area, corruptedPause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_corrupted_pause
|
||||
: pause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_pause
|
||||
: Localization.
|
||||
Subchannel_PrettifyQ_not_pause,
|
||||
controlInfo, copy, adr, subBuf[3], subBuf[4], subBuf[5], qPos, subBuf[2],
|
||||
subBuf[7], subBuf[8], subBuf[9], qStart, subBuf[10], subBuf[11],
|
||||
crcOk ? Localization.Subchannel_PrettifyQ_OK
|
||||
: Localization.Subchannel_PrettifyQ_BAD,
|
||||
rwEmpty ? Localization.Subchannel_PrettifyQ_empty
|
||||
: Localization.Subchannel_PrettifyQ_not_empty);
|
||||
case 1 when subBuf[2] == 0xA0:
|
||||
{
|
||||
string format = subBuf[8] switch
|
||||
{
|
||||
0x00 => "CD-DA / CD-ROM",
|
||||
0x10 => "CD-i",
|
||||
0x20 => "CD-ROM XA",
|
||||
_ => $"unknown {subBuf[0]:X2}"
|
||||
0x00 => Localization.Subchannel_PrettifyQ_CD_DA_CD_ROM,
|
||||
0x10 => Localization.Subchannel_PrettifyQ_CD_i,
|
||||
0x20 => Localization.Subchannel_PrettifyQ_CD_ROM_XA,
|
||||
_ => string.Format(Localization.Subchannel_PrettifyQ_unknown_0, subBuf[0])
|
||||
};
|
||||
|
||||
return $"{minute:D2}:{second:D2}:{frame:D2} - LBA {lba,6}: {area} area, {(corruptedPause
|
||||
? "corrupted pause"
|
||||
: pause
|
||||
? "pause"
|
||||
: "not pause")}, {controlInfo}, {copy}, Q mode {adr} position: {subBuf[3]
|
||||
:X2}:{subBuf[4]:X2}:{subBuf[5]:X2} (LBA {qPos}), track {subBuf[2]
|
||||
:X} is first program area track in {format} format, Q CRC 0x{subBuf[10]:X2}{
|
||||
subBuf[11]:X2} ({(crcOk ? "OK" : "BAD")}), R-W {
|
||||
(rwEmpty ? "empty" : "not empty")}";
|
||||
return
|
||||
string.Format(Localization.Subchannel_PrettifyQ_0_1_2_LBA_3_4_area_5_6_7_Q_mode_8_position_9_10_11_LBA_12_track_13_is_first_program_area_track_in_14_format_Q_CRC_15_16_17_R_W_18,
|
||||
minute, second, frame, lba, area, corruptedPause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_corrupted_pause
|
||||
: pause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_pause
|
||||
: Localization.
|
||||
Subchannel_PrettifyQ_not_pause,
|
||||
controlInfo, copy, adr, subBuf[3], subBuf[4], subBuf[5], qPos, subBuf[2], format,
|
||||
subBuf[10], subBuf[11],
|
||||
crcOk ? Localization.Subchannel_PrettifyQ_OK
|
||||
: Localization.Subchannel_PrettifyQ_BAD,
|
||||
rwEmpty ? Localization.Subchannel_PrettifyQ_empty
|
||||
: Localization.Subchannel_PrettifyQ_not_empty);
|
||||
}
|
||||
case 1 when subBuf[2] == 0xA1:
|
||||
return $"{minute:D2}:{second:D2}:{frame:D2} - LBA {lba,6}: {area} area, {(corruptedPause
|
||||
? "corrupted pause"
|
||||
: pause
|
||||
? "pause"
|
||||
: "not pause")}, {controlInfo}, {copy}, Q mode {adr} position: {subBuf[3]
|
||||
:X2}:{subBuf[4]:X2}:{subBuf[5]:X2} (LBA {qPos}), track {subBuf[2]
|
||||
:X} is last program area track, Q CRC 0x{subBuf[10]:X2}{subBuf[11]:X2} ({
|
||||
(crcOk ? "OK" : "BAD")}), R-W {(rwEmpty ? "empty" : "not empty")}";
|
||||
return
|
||||
string.Format(Localization.Subchannel_PrettifyQ_0_1_2_LBA_3_4_area_5_6_7_Q_mode_8_position_9_10_11_LBA_12_track_13_is_last_program_area_track_Q_CRC_14_15_16_R_W_17,
|
||||
minute, second, frame, lba, area, corruptedPause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_corrupted_pause
|
||||
: pause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_pause
|
||||
: Localization.
|
||||
Subchannel_PrettifyQ_not_pause,
|
||||
controlInfo, copy, adr, subBuf[3], subBuf[4], subBuf[5], qPos, subBuf[2],
|
||||
subBuf[10], subBuf[11],
|
||||
crcOk ? Localization.Subchannel_PrettifyQ_OK
|
||||
: Localization.Subchannel_PrettifyQ_BAD,
|
||||
rwEmpty ? Localization.Subchannel_PrettifyQ_empty
|
||||
: Localization.Subchannel_PrettifyQ_not_empty);
|
||||
case 1:
|
||||
return subBuf[2] == 0xA2 ? $"{minute:D2}:{second:D2}:{frame:D2} - LBA {lba,6}: {area} area, {
|
||||
(corruptedPause
|
||||
? "corrupted pause"
|
||||
: pause
|
||||
? "pause"
|
||||
: "not pause")}, {controlInfo}, {copy}, Q mode {adr} position: {subBuf[3]:X2}:{
|
||||
subBuf[4]:X2}:{subBuf[5]:X2} (LBA {qPos}), track {subBuf[2]:X} starts at {subBuf[7]
|
||||
:X2}{subBuf[8]:X2}{subBuf[9]:X2} (LBA {qStart}), Q CRC 0x{subBuf[10]:X2}{subBuf[11]
|
||||
:X2} ({(crcOk ? "OK" : "BAD")}), R-W {(rwEmpty ? "empty" : "not empty")}" : $"{
|
||||
minute:D2}:{second:D2}:{frame:D2} - LBA {lba,6}: {area} area, {(corruptedPause
|
||||
? "corrupted pause"
|
||||
: pause
|
||||
? "pause"
|
||||
: "not pause")}, {controlInfo}, {copy}, Q: {subBuf[0]
|
||||
:X2} {subBuf[1]:X2} {subBuf[2]:X2} {subBuf[3]:X2} {
|
||||
subBuf[4]:X2} {subBuf[5]:X2} {subBuf[6]:X2} {subBuf[7]
|
||||
:X2} {subBuf[8]:X2} {subBuf[9]:X2} CRC 0x{
|
||||
subBuf[10]:X2}{subBuf[11]:X2} ({
|
||||
(crcOk ? "OK" : "BAD")}), R-W {
|
||||
(rwEmpty ? "empty" : "not empty")}";
|
||||
return subBuf[2] == 0xA2
|
||||
? string.
|
||||
Format(Localization.Subchannel_PrettifyQ_0_1_2_LBA_3_4_area_5_6_7_Q_mode_8_position_9_10_11_LBA_12_track_13_starts_at_14_15_16_LBA_17_Q_CRC_18_19_20_R_W_21,
|
||||
minute, second, frame, lba, area, corruptedPause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_corrupted_pause
|
||||
: pause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_pause
|
||||
: Localization.
|
||||
Subchannel_PrettifyQ_not_pause,
|
||||
controlInfo, copy, adr, subBuf[3], subBuf[4], subBuf[5], qPos, subBuf[2],
|
||||
subBuf[7], subBuf[8], subBuf[9], qStart, subBuf[10], subBuf[11],
|
||||
crcOk ? Localization.Subchannel_PrettifyQ_OK
|
||||
: Localization.Subchannel_PrettifyQ_BAD,
|
||||
rwEmpty ? Localization.Subchannel_PrettifyQ_empty
|
||||
: Localization.Subchannel_PrettifyQ_not_empty)
|
||||
: string.
|
||||
Format(Localization.Subchannel_PrettifyQ_0_1_2_LBA_3_4_area_5_6_7_Q_8_9_10_11_12_13_14_15_16_17_CRC_18_19_20_R_W_21,
|
||||
minute, second, frame, lba, area, corruptedPause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_corrupted_pause
|
||||
: pause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_pause
|
||||
: Localization.
|
||||
Subchannel_PrettifyQ_not_pause,
|
||||
controlInfo, copy, subBuf[0], subBuf[1], subBuf[2], subBuf[3], subBuf[4],
|
||||
subBuf[5], subBuf[6], subBuf[7], subBuf[8], subBuf[9], subBuf[10], subBuf[11],
|
||||
crcOk ? Localization.Subchannel_PrettifyQ_OK
|
||||
: Localization.Subchannel_PrettifyQ_BAD,
|
||||
rwEmpty ? Localization.Subchannel_PrettifyQ_empty
|
||||
: Localization.Subchannel_PrettifyQ_not_empty);
|
||||
case 2:
|
||||
return $"{minute:D2}:{second:D2}:{frame:D2} - LBA {lba,6}: {area} area, {(corruptedPause
|
||||
? "corrupted pause"
|
||||
: pause
|
||||
? "pause"
|
||||
: "not pause")}, {controlInfo}, {copy}, Q mode {adr} MCN: {DecodeMcn(subBuf)
|
||||
} frame {subBuf[9]:X2} CRC 0x{subBuf[10]:X2}{subBuf[11]:X2} ({
|
||||
(crcOk ? "OK" : "BAD")}), R-W {(rwEmpty ? "empty" : "not empty")}";
|
||||
return
|
||||
string.Format(Localization.Subchannel_PrettifyQ_0_1_2_LBA_3_4_area_5_6_7_Q_mode_8_MCN_9_frame_10_CRC_11_12_13_R_W_14,
|
||||
minute, second, frame, lba, area, corruptedPause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_corrupted_pause
|
||||
: pause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_pause
|
||||
: Localization.
|
||||
Subchannel_PrettifyQ_not_pause,
|
||||
controlInfo, copy, adr, DecodeMcn(subBuf), subBuf[9], subBuf[10], subBuf[11],
|
||||
crcOk ? Localization.Subchannel_PrettifyQ_OK
|
||||
: Localization.Subchannel_PrettifyQ_BAD,
|
||||
rwEmpty ? Localization.Subchannel_PrettifyQ_empty
|
||||
: Localization.Subchannel_PrettifyQ_not_empty);
|
||||
}
|
||||
|
||||
if(adr != 5)
|
||||
return $"{minute:D2}:{second:D2}:{frame:D2} - LBA {lba,6}: {area} area, {(corruptedPause
|
||||
? "corrupted pause"
|
||||
: pause
|
||||
? "pause"
|
||||
: "not pause")}, {controlInfo}, {copy}, Q: {subBuf[0]:X2} {subBuf[1]:X2} {
|
||||
subBuf[2]:X2} {subBuf[3]:X2} {subBuf[4]:X2} {subBuf[5]:X2} {subBuf[6]:X2} {
|
||||
subBuf[7]:X2} {subBuf[8]:X2} {subBuf[9]:X2} CRC 0x{subBuf[10]:X2}{subBuf[11]
|
||||
:X2} ({(crcOk ? "OK" : "BAD")}), R-W {(rwEmpty ? "empty" : "not empty")
|
||||
}";
|
||||
return
|
||||
string.Format(Localization.Subchannel_PrettifyQ_0_1_2_LBA_3_4_area_5_6_7_Q_8_9_10_11_12_13_14_15_16_17_CRC_18_19_20_R_W_21,
|
||||
minute, second, frame, lba, area, corruptedPause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_corrupted_pause
|
||||
: pause
|
||||
? Localization.Subchannel_PrettifyQ_pause
|
||||
: Localization.
|
||||
Subchannel_PrettifyQ_not_pause,
|
||||
controlInfo, copy, subBuf[0], subBuf[1], subBuf[2], subBuf[3], subBuf[4], subBuf[5],
|
||||
subBuf[6], subBuf[7], subBuf[8], subBuf[9], subBuf[10], subBuf[11],
|
||||
crcOk ? Localization.Subchannel_PrettifyQ_OK : Localization.Subchannel_PrettifyQ_BAD,
|
||||
rwEmpty ? Localization.Subchannel_PrettifyQ_empty
|
||||
: Localization.Subchannel_PrettifyQ_not_empty);
|
||||
|
||||
switch(subBuf[2])
|
||||
{
|
||||
case <= 0x40:
|
||||
return $"{minute:D2}:{second:D2}:{frame:D2} - LBA {lba,6}: {area} area, {(corruptedPause
|
||||
? "corrupted pause"
|
||||
: pause
|
||||
? "pause"
|
||||
: "not pause")}, {controlInfo}, {copy}, Q mode {adr
|
||||
} skip interval start time {subBuf[7]:X2}{subBuf[8]:X2}{subBuf[9]
|
||||
:X2}, skip interval stop time {subBuf[3]:X2}{subBuf[4]:X2}{subBuf[5]
|
||||
:X2}, CRC 0x{subBuf[10]:X2}{subBuf[11]:X2} ({(crcOk ? "OK" : "BAD")}), R-W {
|
||||
(rwEmpty ? "empty" : "not empty")}";
|
||||
return
|
||||
string.Format(Localization.Subchannel_PrettifyQ_0_1_2_LBA_3_4_area_5_6_7_Q_mode_8_skip_interval_start_time_9_10_11_skip_interval_stop_time_12_13_14_CRC_15_16_17_R_W_18,
|
||||
minute, second, frame, lba, area, corruptedPause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_corrupted_pause
|
||||
: pause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_pause
|
||||
: Localization.
|
||||
Subchannel_PrettifyQ_not_pause,
|
||||
controlInfo, copy, adr, subBuf[7], subBuf[8], subBuf[9], subBuf[3], subBuf[4],
|
||||
subBuf[5], subBuf[10], subBuf[11],
|
||||
crcOk ? Localization.Subchannel_PrettifyQ_OK
|
||||
: Localization.Subchannel_PrettifyQ_BAD,
|
||||
rwEmpty ? Localization.Subchannel_PrettifyQ_empty
|
||||
: Localization.Subchannel_PrettifyQ_not_empty);
|
||||
case 0xB0:
|
||||
return final ? $"{minute:D2}:{second:D2}:{frame:D2} - LBA {lba,6}: {area} area, {(corruptedPause
|
||||
? "corrupted pause"
|
||||
: pause
|
||||
? "pause"
|
||||
: "not pause")}, {controlInfo}, {copy}, Q mode {adr
|
||||
} next program area can start at {subBuf[3]:X2}:{subBuf[4]:X2}:{subBuf[5]
|
||||
:X2} (LBA {nextPos}), last-session, {zero} mode 5 pointers, CRC 0x{
|
||||
subBuf[10]:X2}{subBuf[11]:X2} ({(crcOk ? "OK" : "BAD")}), R-W {
|
||||
(rwEmpty ? "empty" : "not empty")}" : $"{minute:D2}:{second:D2}:{frame
|
||||
:D2} - LBA {lba,6}: {area} area, {(corruptedPause
|
||||
? "corrupted pause"
|
||||
: pause
|
||||
? "pause"
|
||||
: "not pause")}, {controlInfo}, {copy}, Q mode {
|
||||
adr} next program area can start at {subBuf[3]
|
||||
:X2}:{subBuf[4]:X2}:{subBuf[5]:X2} (LBA {
|
||||
nextPos}), maximum Lead-out at {subBuf[7]
|
||||
:X2}:{subBuf[8]:X2}:{subBuf[9]
|
||||
:X2} (LBA {maxOut}), {zero
|
||||
} mode 5 pointers, CRC 0x{subBuf[10]:X2}{
|
||||
subBuf[11]:X2} ({(crcOk ? "OK" : "BAD")
|
||||
}), R-W {(rwEmpty ? "empty"
|
||||
: "not empty")}";
|
||||
return final
|
||||
? string.
|
||||
Format(Localization.Subchannel_PrettifyQ_0_1_2_LBA_3_4_area_5_6_7_Q_mode_8_next_program_area_can_start_at_9_10_11_LBA_12_last_session_13_mode_5_pointers_CRC_14_15_16_R_W_17,
|
||||
minute, second, frame, lba, area, corruptedPause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_corrupted_pause
|
||||
: pause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_pause
|
||||
: Localization.
|
||||
Subchannel_PrettifyQ_not_pause,
|
||||
controlInfo, copy, adr, subBuf[3], subBuf[4], subBuf[5], nextPos, zero,
|
||||
subBuf[10], subBuf[11],
|
||||
crcOk ? Localization.Subchannel_PrettifyQ_OK
|
||||
: Localization.Subchannel_PrettifyQ_BAD,
|
||||
rwEmpty ? Localization.Subchannel_PrettifyQ_empty
|
||||
: Localization.Subchannel_PrettifyQ_not_empty)
|
||||
: string.
|
||||
Format(Localization.Subchannel_PrettifyQ_0_1_2_LBA_3_4_area_5_6_7_Q_mode_8_next_program_area_can_start_at_9_10_11_LBA_12_maximum_Lead_out_at_13_14_15_LBA_16_17_mode_5_pointers_CRC_18_19_20_R_W_21,
|
||||
minute, second, frame, lba, area, corruptedPause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_corrupted_pause
|
||||
: pause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_pause
|
||||
: Localization.
|
||||
Subchannel_PrettifyQ_not_pause,
|
||||
controlInfo, copy, adr, subBuf[3], subBuf[4], subBuf[5], nextPos, subBuf[7],
|
||||
subBuf[8], subBuf[9], maxOut, zero, subBuf[10], subBuf[11],
|
||||
crcOk ? Localization.Subchannel_PrettifyQ_OK
|
||||
: Localization.Subchannel_PrettifyQ_BAD,
|
||||
rwEmpty ? Localization.Subchannel_PrettifyQ_empty
|
||||
: Localization.Subchannel_PrettifyQ_not_empty);
|
||||
case 0xB1:
|
||||
return $"{minute:D2}:{second:D2}:{frame:D2} - LBA {lba,6}: {area} area, {(corruptedPause
|
||||
? "corrupted pause"
|
||||
: pause
|
||||
? "pause"
|
||||
: "not pause")}, {controlInfo}, {copy}, Q mode {adr}, {pmin
|
||||
} skip interval pointers, {psec} skip track assignments, CRC 0x{subBuf[10]:X2}{
|
||||
subBuf[11]:X2} ({(crcOk ? "OK" : "BAD")}), R-W {
|
||||
(rwEmpty ? "empty" : "not empty")}";
|
||||
return
|
||||
string.Format(Localization.Subchannel_PrettifyQ_0_1_2_LBA_3_4_area_5_6_7_Q_mode_8_9_skip_interval_pointers_10_skip_track_assignments_CRC_11_12_13_R_W_14,
|
||||
minute, second, frame, lba, area, corruptedPause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_corrupted_pause
|
||||
: pause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_pause
|
||||
: Localization.
|
||||
Subchannel_PrettifyQ_not_pause,
|
||||
controlInfo, copy, adr, pmin, psec, subBuf[10], subBuf[11],
|
||||
crcOk ? Localization.Subchannel_PrettifyQ_OK
|
||||
: Localization.Subchannel_PrettifyQ_BAD,
|
||||
rwEmpty ? Localization.Subchannel_PrettifyQ_empty
|
||||
: Localization.Subchannel_PrettifyQ_not_empty);
|
||||
}
|
||||
|
||||
if(subBuf[2] != 0xB2 &&
|
||||
subBuf[2] != 0xB3 &&
|
||||
subBuf[2] != 0xB4)
|
||||
return subBuf[2] == 0xC0 ? $"{minute:D2}:{second:D2}:{frame:D2} - LBA {lba,6}: {area} area, {
|
||||
(corruptedPause
|
||||
? "corrupted pause"
|
||||
: pause
|
||||
? "pause"
|
||||
: "not pause")}, {controlInfo}, {copy}, Q mode {adr}, ATIP values {subBuf[3]:X2}, {
|
||||
subBuf[4]:X2}, {subBuf[5]:X2}, first disc Lead-in starts at {subBuf[7]:X2}{subBuf[8]:X2}{
|
||||
subBuf[9]:X2} (LBA {qStart}), CRC 0x{subBuf[10]:X2}{subBuf[11]:X2} ({
|
||||
(crcOk ? "OK" : "BAD")}), R-W {(rwEmpty ? "empty" : "not empty")}" : $"{minute
|
||||
:D2}:{second:D2}:{frame:D2} - LBA {lba,6}: {area} area, {(corruptedPause
|
||||
? "corrupted pause"
|
||||
: pause
|
||||
? "pause"
|
||||
: "not pause")}, {controlInfo}, {copy}, Q: {subBuf[0]:X2} {
|
||||
subBuf[1]:X2} {subBuf[2]:X2} {subBuf[3]:X2} {subBuf[4]
|
||||
:X2} {subBuf[5]:X2} {subBuf[6]:X2} {subBuf[7]:X2} {
|
||||
subBuf[8]:X2} {subBuf[9]:X2} CRC 0x{subBuf[10]:X2}{
|
||||
subBuf[11]:X2} ({(crcOk ? "OK" : "BAD")}), R-W {
|
||||
(rwEmpty ? "empty" : "not empty")}";
|
||||
return subBuf[2] == 0xC0
|
||||
? string.
|
||||
Format(Localization.Subchannel_PrettifyQ_0_1_2_LBA_3_4_area_5_6_7_Q_mode_8_ATIP_values_9_10_11_first_disc_Lead_in_starts_at_12_13_14_LBA_15_CRC_16_17_18_R_W_19,
|
||||
minute, second, frame, lba, area, corruptedPause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_corrupted_pause
|
||||
: pause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_pause
|
||||
: Localization.
|
||||
Subchannel_PrettifyQ_not_pause,
|
||||
controlInfo, copy, adr, subBuf[3], subBuf[4], subBuf[5], subBuf[7], subBuf[8],
|
||||
subBuf[9], qStart, subBuf[10], subBuf[11],
|
||||
crcOk ? Localization.Subchannel_PrettifyQ_OK
|
||||
: Localization.Subchannel_PrettifyQ_BAD,
|
||||
rwEmpty ? Localization.Subchannel_PrettifyQ_empty
|
||||
: Localization.Subchannel_PrettifyQ_not_empty)
|
||||
: string.
|
||||
Format(Localization.Subchannel_PrettifyQ_0_1_2_LBA_3_4_area_5_6_7_Q_8_9_10_11_12_13_14_15_16_17_CRC_18_19_20_R_W_21,
|
||||
minute, second, frame, lba, area, corruptedPause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_corrupted_pause
|
||||
: pause
|
||||
? Localization.
|
||||
Subchannel_PrettifyQ_pause
|
||||
: Localization.
|
||||
Subchannel_PrettifyQ_not_pause,
|
||||
controlInfo, copy, subBuf[0], subBuf[1], subBuf[2], subBuf[3], subBuf[4],
|
||||
subBuf[5], subBuf[6], subBuf[7], subBuf[8], subBuf[9], subBuf[10], subBuf[11],
|
||||
crcOk ? Localization.Subchannel_PrettifyQ_OK
|
||||
: Localization.Subchannel_PrettifyQ_BAD,
|
||||
rwEmpty ? Localization.Subchannel_PrettifyQ_empty
|
||||
: Localization.Subchannel_PrettifyQ_not_empty);
|
||||
|
||||
string skipTracks = $"{subBuf[3]:X2}";
|
||||
|
||||
@@ -534,56 +624,75 @@ public static class Subchannel
|
||||
if(subBuf[9] > 0)
|
||||
skipTracks += $", {subBuf[4]:X2}";
|
||||
|
||||
return $"{minute:D2}:{second:D2}:{frame:D2} - LBA {lba,6}: {area} area, {(corruptedPause
|
||||
? "corrupted pause"
|
||||
: pause
|
||||
? "pause"
|
||||
: "not pause")}, {controlInfo}, {copy}, Q mode {adr}, tracks {skipTracks
|
||||
} to be skipped, CRC 0x{subBuf[10]:X2}{subBuf[11]:X2} ({(crcOk ? "OK" : "BAD")}), R-W {
|
||||
(rwEmpty ? "empty" : "not empty")}";
|
||||
return
|
||||
string.Format(Localization.Subchannel_PrettifyQ_0_1_2_LBA_3_4_area_5_6_7_Q_mode_8_tracks_9_to_be_skipped_CRC_10_11_12_R_W_13,
|
||||
minute, second, frame, lba, area, corruptedPause
|
||||
? Localization.Subchannel_PrettifyQ_corrupted_pause
|
||||
: pause
|
||||
? Localization.Subchannel_PrettifyQ_pause
|
||||
: Localization.Subchannel_PrettifyQ_not_pause,
|
||||
controlInfo, copy, adr, skipTracks, subBuf[10], subBuf[11],
|
||||
crcOk ? Localization.Subchannel_PrettifyQ_OK : Localization.Subchannel_PrettifyQ_BAD,
|
||||
rwEmpty ? Localization.Subchannel_PrettifyQ_empty
|
||||
: Localization.Subchannel_PrettifyQ_not_empty);
|
||||
}
|
||||
|
||||
area = subBuf[1] == 0xAA ? "Lead-out" : "Program";
|
||||
area = subBuf[1] == 0xAA ? Localization.Subchannel_PrettifyQ_Lead_out
|
||||
: Localization.Subchannel_PrettifyQ_Program;
|
||||
|
||||
return adr switch
|
||||
{
|
||||
1 => $"{minute:D2}:{second:D2}:{frame:D2} - LBA {lba,6}: {area} area, {(corruptedPause
|
||||
? "corrupted pause"
|
||||
: pause
|
||||
? "pause"
|
||||
: "not pause")}, {controlInfo}, {copy}, Q mode {adr} position: track {subBuf[1]
|
||||
:X} index {subBuf[2]:X} relative position {subBuf[3]:X2}:{subBuf[4]:X2}:{subBuf[5]
|
||||
:X2} (LBA {qPos + 150}), absolute position {subBuf[7]:X2}:{subBuf[8]:X2}:{subBuf[9]
|
||||
:X2} (LBA {qStart}), Q CRC 0x{subBuf[10]:X2}{subBuf[11]:X2} ({(crcOk ? "OK" : "BAD")
|
||||
}), R-W {(rwEmpty ? "empty" : "not empty")}",
|
||||
2 => $"{minute:D2}:{second:D2}:{frame:D2} - LBA {lba,6}: {area} area, {(corruptedPause
|
||||
? "corrupted pause"
|
||||
: pause
|
||||
? "pause"
|
||||
: "not pause")}, {controlInfo}, {copy}, Q mode {adr} MCN: {DecodeMcn(subBuf)
|
||||
} frame {subBuf[9]:X2} CRC 0x{subBuf[10]:X2}{subBuf[11]:X2} ({(crcOk ? "OK" : "BAD")
|
||||
}), R-W {(rwEmpty ? "empty" : "not empty")}",
|
||||
3 => $"{minute:D2}:{second:D2}:{frame:D2} - LBA {lba,6}: {area} area, {(corruptedPause
|
||||
? "corrupted pause"
|
||||
: pause
|
||||
? "pause"
|
||||
: "not pause")}, {controlInfo}, {copy}, Q mode {adr} ISRC: {DecodeIsrc(subBuf)
|
||||
} frame {subBuf[9]:X2} CRC 0x{subBuf[10]:X2}{subBuf[11]:X2} ({(crcOk ? "OK" : "BAD")
|
||||
}), R-W {(rwEmpty ? "empty" : "not empty")}",
|
||||
_ => $"{minute:D2}:{second:D2}:{frame:D2} - LBA {lba,6}: {area} area, {(corruptedPause
|
||||
? "corrupted pause"
|
||||
: pause
|
||||
? "pause"
|
||||
: "not pause")}, {controlInfo}, {copy}, Q: {subBuf[0]:X2} {subBuf[1]:X2} {subBuf[2]
|
||||
:X2} {subBuf[3]:X2} {subBuf[4]:X2} {subBuf[5]:X2} {subBuf[6]:X2} {subBuf[7]:X2} {
|
||||
subBuf[8]:X2} {subBuf[9]:X2} CRC 0x{subBuf[10]:X2}{subBuf[11]:X2} ({
|
||||
(crcOk ? "OK" : "BAD")}), R-W {(rwEmpty ? "empty" : "not empty")}"
|
||||
1 =>
|
||||
string.Format(Localization.Subchannel_PrettifyQ_0_D2_1_2_LBA_3_4_area_5_6_7_Q_mode_8_position_track_9_index_10_relative_position_11_12_13_LBA_14_absolute_position_15_16_17_LBA_18_Q_CRC_19_20_21_R_W_22,
|
||||
minute, second, frame, lba, area, corruptedPause
|
||||
? Localization.Subchannel_PrettifyQ_corrupted_pause
|
||||
: pause
|
||||
? Localization.Subchannel_PrettifyQ_pause
|
||||
: Localization.Subchannel_PrettifyQ_not_pause,
|
||||
controlInfo, copy, adr, subBuf[1], subBuf[2], subBuf[3], subBuf[4], subBuf[5], qPos + 150,
|
||||
subBuf[7], subBuf[8], subBuf[9], qStart, subBuf[10], subBuf[11],
|
||||
crcOk ? Localization.Subchannel_PrettifyQ_OK : Localization.Subchannel_PrettifyQ_BAD,
|
||||
rwEmpty ? Localization.Subchannel_PrettifyQ_empty
|
||||
: Localization.Subchannel_PrettifyQ_not_empty),
|
||||
2 =>
|
||||
string.Format(Localization.Subchannel_PrettifyQ_0_1_2_LBA_3_4_area_5_6_7_Q_mode_8_MCN_9_frame_10_CRC_11_12_13_R_W_14,
|
||||
minute, second, frame, lba, area, corruptedPause
|
||||
? Localization.Subchannel_PrettifyQ_corrupted_pause
|
||||
: pause
|
||||
? Localization.Subchannel_PrettifyQ_pause
|
||||
: Localization.Subchannel_PrettifyQ_not_pause,
|
||||
controlInfo, copy, adr, DecodeMcn(subBuf), subBuf[9], subBuf[10], subBuf[11],
|
||||
crcOk ? Localization.Subchannel_PrettifyQ_OK : Localization.Subchannel_PrettifyQ_BAD,
|
||||
rwEmpty ? Localization.Subchannel_PrettifyQ_empty
|
||||
: Localization.Subchannel_PrettifyQ_not_empty),
|
||||
3 =>
|
||||
string.Format(Localization.Subchannel_PrettifyQ_0_1_2_LBA_3_4_area_5_6_7_Q_mode_8_ISRC_9_frame_10_CRC_11_12_13_R_W_14,
|
||||
minute, second, frame, lba, area, corruptedPause
|
||||
? Localization.Subchannel_PrettifyQ_corrupted_pause
|
||||
: pause
|
||||
? Localization.Subchannel_PrettifyQ_pause
|
||||
: Localization.Subchannel_PrettifyQ_not_pause,
|
||||
controlInfo, copy, adr, DecodeIsrc(subBuf), subBuf[9], subBuf[10], subBuf[11],
|
||||
crcOk ? Localization.Subchannel_PrettifyQ_OK : Localization.Subchannel_PrettifyQ_BAD,
|
||||
rwEmpty ? Localization.Subchannel_PrettifyQ_empty
|
||||
: Localization.Subchannel_PrettifyQ_not_empty),
|
||||
_ =>
|
||||
string.Format(Localization.Subchannel_PrettifyQ_0_1_2_LBA_3_4_area_5_6_7_Q_8_9_10_11_12_13_14_15_16_17_CRC_18_19_20_R_W_21,
|
||||
minute, second, frame, lba, area, corruptedPause
|
||||
? Localization.Subchannel_PrettifyQ_corrupted_pause
|
||||
: pause
|
||||
? Localization.Subchannel_PrettifyQ_pause
|
||||
: Localization.Subchannel_PrettifyQ_not_pause,
|
||||
controlInfo, copy, subBuf[0], subBuf[1], subBuf[2], subBuf[3], subBuf[4], subBuf[5],
|
||||
subBuf[6], subBuf[7], subBuf[8], subBuf[9], subBuf[10], subBuf[11],
|
||||
crcOk ? Localization.Subchannel_PrettifyQ_OK : Localization.Subchannel_PrettifyQ_BAD,
|
||||
rwEmpty ? Localization.Subchannel_PrettifyQ_empty
|
||||
: Localization.Subchannel_PrettifyQ_not_empty)
|
||||
};
|
||||
}
|
||||
|
||||
public static string DecodeIsrc(byte[] q) => $"{_isrcTable[q[1] / 4]}{_isrcTable[((q[1] & 3) * 16) + (q[2] / 16)]}{
|
||||
_isrcTable[((q[2] & 0xF) * 4) + (q[3] / 64)]}{_isrcTable[q[3] & 0x3F]}{_isrcTable[q[4] / 4]}{q[5]:X2}{q[6]:X2}{
|
||||
q[7]:X2}{q[8] / 16:X1}";
|
||||
public static string DecodeIsrc(byte[] q) =>
|
||||
$"{_isrcTable[q[1] / 4]}{_isrcTable[((q[1] & 3) * 16) + (q[2] / 16)]}{_isrcTable[((q[2] & 0xF) * 4) + (q[3] / 64)]}{_isrcTable[q[3] & 0x3F]}{_isrcTable[q[4] / 4]}{q[5]:X2}{q[6]:X2}{q[7]:X2}{q[8] / 16:X1}";
|
||||
|
||||
public static string DecodeMcn(byte[] q) => $"{q[1]:X2}{q[2]:X2}{q[3]:X2}{q[4]:X2}{q[5]:X2}{q[6]:X2}{q[7] >> 4:X}";
|
||||
|
||||
|
||||
47
CD/TOC.cs
47
CD/TOC.cs
@@ -73,7 +73,8 @@ public static class TOC
|
||||
if(decoded.DataLength + 2 != CDTOCResponse.Length)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("CD TOC decoder",
|
||||
"Expected CD TOC size ({0} bytes) is not received size ({1} bytes), not decoding",
|
||||
Localization.
|
||||
Expected_CD_TOC_size_0_bytes_is_not_received_size_1_bytes_not_decoding,
|
||||
decoded.DataLength + 2, CDTOCResponse.Length);
|
||||
|
||||
return null;
|
||||
@@ -103,17 +104,17 @@ public static class TOC
|
||||
|
||||
var sb = new StringBuilder();
|
||||
|
||||
sb.AppendFormat("First track number in first complete session: {0}", response.FirstTrack).AppendLine();
|
||||
sb.AppendFormat("Last track number in last complete session: {0}", response.LastTrack).AppendLine();
|
||||
sb.AppendFormat(Localization.First_track_number_in_first_complete_session_0, response.FirstTrack).AppendLine();
|
||||
sb.AppendFormat(Localization.Last_track_number_in_last_complete_session_0, response.LastTrack).AppendLine();
|
||||
|
||||
foreach(CDTOCTrackDataDescriptor descriptor in response.TrackDescriptors)
|
||||
{
|
||||
if(descriptor.TrackNumber == 0xAA)
|
||||
sb.AppendLine("Track number: Lead-Out");
|
||||
sb.AppendLine(Localization.Track_number_Lead_Out);
|
||||
else
|
||||
sb.AppendFormat("Track number: {0}", descriptor.TrackNumber).AppendLine();
|
||||
sb.AppendFormat(Localization.Track_number_0, descriptor.TrackNumber).AppendLine();
|
||||
|
||||
sb.AppendFormat("Track starts at LBA {0}, or MSF {1:X2}:{2:X2}:{3:X2}", descriptor.TrackStartAddress,
|
||||
sb.AppendFormat(Localization.Track_starts_at_LBA_0_or_MSF_2_3, descriptor.TrackStartAddress,
|
||||
(descriptor.TrackStartAddress & 0x0000FF00) >> 8,
|
||||
(descriptor.TrackStartAddress & 0x00FF0000) >> 16,
|
||||
(descriptor.TrackStartAddress & 0xFF000000) >> 24).AppendLine();
|
||||
@@ -121,73 +122,73 @@ public static class TOC
|
||||
switch((TocAdr)descriptor.ADR)
|
||||
{
|
||||
case TocAdr.NoInformation:
|
||||
sb.AppendLine("Q subchannel mode not given");
|
||||
sb.AppendLine(Localization.Q_subchannel_mode_not_given);
|
||||
|
||||
break;
|
||||
case TocAdr.TrackPointer:
|
||||
sb.AppendLine("Q subchannel stores track pointer");
|
||||
sb.AppendLine(Localization.Q_subchannel_stores_track_pointer);
|
||||
|
||||
break;
|
||||
case TocAdr.VideoTrackPointer:
|
||||
sb.AppendLine("Q subchannel stores video track pointer");
|
||||
sb.AppendLine(Localization.Q_subchannel_stores_video_track_pointer);
|
||||
|
||||
break;
|
||||
case TocAdr.ISRC:
|
||||
sb.AppendLine("Q subchannel stores ISRC");
|
||||
sb.AppendLine(Localization.Q_subchannel_stores_ISRC);
|
||||
|
||||
break;
|
||||
case TocAdr.MediaCatalogNumber:
|
||||
sb.AppendLine("Q subchannel stores media catalog number");
|
||||
sb.AppendLine(Localization.Q_subchannel_stores_media_catalog_number);
|
||||
|
||||
break;
|
||||
default:
|
||||
sb.AppendFormat("Q subchannel mode {0}", descriptor.ADR).AppendLine();
|
||||
sb.AppendFormat(Localization.Q_subchannel_mode_0, descriptor.ADR).AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if((descriptor.CONTROL & (byte)TocControl.ReservedMask) == (byte)TocControl.ReservedMask)
|
||||
sb.AppendFormat("Reserved flags 0x{0:X2} set", descriptor.CONTROL).AppendLine();
|
||||
sb.AppendFormat(Localization.Reserved_flags_0_set, descriptor.CONTROL).AppendLine();
|
||||
else
|
||||
{
|
||||
switch((TocControl)(descriptor.CONTROL & 0x0D))
|
||||
{
|
||||
case TocControl.TwoChanNoPreEmph:
|
||||
sb.AppendLine("Stereo audio track with no pre-emphasis");
|
||||
sb.AppendLine(Localization.Stereo_audio_track_with_no_pre_emphasis);
|
||||
|
||||
break;
|
||||
case TocControl.TwoChanPreEmph:
|
||||
sb.AppendLine("Stereo audio track with 50/15 μs pre-emphasis");
|
||||
sb.AppendLine(Localization.Stereo_audio_track_with_50_15_us_pre_emphasis);
|
||||
|
||||
break;
|
||||
case TocControl.FourChanNoPreEmph:
|
||||
sb.AppendLine("Quadraphonic audio track with no pre-emphasis");
|
||||
sb.AppendLine(Localization.Quadraphonic_audio_track_with_no_pre_emphasis);
|
||||
|
||||
break;
|
||||
case TocControl.FourChanPreEmph:
|
||||
sb.AppendLine("Quadraphonic audio track with 50/15 μs pre-emphasis");
|
||||
sb.AppendLine(Localization.Quadraphonic_audio_track_with_50_15_us_pre_emphasis);
|
||||
|
||||
break;
|
||||
case TocControl.DataTrack:
|
||||
sb.AppendLine("Data track, recorded uninterrupted");
|
||||
sb.AppendLine(Localization.Data_track_recorded_uninterrupted);
|
||||
|
||||
break;
|
||||
case TocControl.DataTrackIncremental:
|
||||
sb.AppendLine("Data track, recorded incrementally");
|
||||
sb.AppendLine(Localization.Data_track_recorded_incrementally);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
sb.AppendLine((descriptor.CONTROL & (byte)TocControl.CopyPermissionMask) ==
|
||||
(byte)TocControl.CopyPermissionMask ? "Digital copy of track is permitted"
|
||||
: "Digital copy of track is prohibited");
|
||||
(byte)TocControl.CopyPermissionMask ? Localization.Digital_copy_of_track_is_permitted
|
||||
: Localization.Digital_copy_of_track_is_prohibited);
|
||||
|
||||
#if DEBUG
|
||||
if(descriptor.Reserved1 != 0)
|
||||
sb.AppendFormat("Reserved1 = 0x{0:X2}", descriptor.Reserved1).AppendLine();
|
||||
sb.AppendFormat(Localization.Reserved1_equals_0_X8, descriptor.Reserved1).AppendLine();
|
||||
|
||||
if(descriptor.Reserved2 != 0)
|
||||
sb.AppendFormat("Reserved2 = 0x{0:X2}", descriptor.Reserved2).AppendLine();
|
||||
sb.AppendFormat(Localization.Reserved2_equals_0_X8, descriptor.Reserved2).AppendLine();
|
||||
#endif
|
||||
|
||||
sb.AppendLine();
|
||||
|
||||
Reference in New Issue
Block a user