mirror of
https://github.com/aaru-dps/Aaru.git
synced 2026-02-04 00:54:33 +00:00
Colorify SCSI MODE PAGE 2Ah
This commit is contained in:
@@ -54,166 +54,179 @@ public static partial class Modes
|
||||
|
||||
var sb = new StringBuilder();
|
||||
|
||||
sb.AppendLine(Localization.SCSI_CD_ROM_capabilities_page);
|
||||
sb.AppendLine($"[bold][blue]{Localization.SCSI_CD_ROM_capabilities_page}[/][/]");
|
||||
|
||||
if(modePage.PS) sb.AppendLine("\t" + Localization.Parameters_can_be_saved);
|
||||
if(modePage.PS) sb.AppendLine($"\t[green]{Localization.Parameters_can_be_saved}[/]");
|
||||
|
||||
if(modePage.AudioPlay) sb.AppendLine("\t" + Localization.Drive_can_play_audio);
|
||||
if(modePage.AudioPlay) sb.AppendLine($"\t[green]{Localization.Drive_can_play_audio}[/]");
|
||||
|
||||
if(modePage.Mode2Form1) sb.AppendLine("\t" + Localization.Drive_can_read_sectors_in_Mode_2_Form_1_format);
|
||||
if(modePage.Mode2Form1)
|
||||
sb.AppendLine($"\t[green]{Localization.Drive_can_read_sectors_in_Mode_2_Form_1_format}[/]");
|
||||
|
||||
if(modePage.Mode2Form2) sb.AppendLine("\t" + Localization.Drive_can_read_sectors_in_Mode_2_Form_2_format);
|
||||
if(modePage.Mode2Form2)
|
||||
sb.AppendLine($"\t[green]{Localization.Drive_can_read_sectors_in_Mode_2_Form_2_format}[/]");
|
||||
|
||||
if(modePage.MultiSession) sb.AppendLine("\t" + Localization.Drive_supports_multi_session_discs_and_or_Photo_CD);
|
||||
if(modePage.MultiSession)
|
||||
sb.AppendLine($"\t[green]{Localization.Drive_supports_multi_session_discs_and_or_Photo_CD}[/]");
|
||||
|
||||
if(modePage.CDDACommand) sb.AppendLine("\t" + Localization.Drive_can_read_digital_audio);
|
||||
if(modePage.CDDACommand) sb.AppendLine($"\t[green]{Localization.Drive_can_read_digital_audio}[/]");
|
||||
|
||||
if(modePage.AccurateCDDA) sb.AppendLine("\t" + Localization.Drive_can_continue_from_streaming_loss);
|
||||
if(modePage.AccurateCDDA) sb.AppendLine($"\t[green]{Localization.Drive_can_continue_from_streaming_loss}[/]");
|
||||
|
||||
if(modePage.Subchannel)
|
||||
sb.AppendLine("\t" + Localization.Drive_can_read_uncorrected_and_interleaved_R_W_subchannels);
|
||||
sb.AppendLine($"\t[green]{Localization.Drive_can_read_uncorrected_and_interleaved_R_W_subchannels}[/]");
|
||||
|
||||
if(modePage.DeinterlaveSubchannel)
|
||||
sb.AppendLine("\t" + Localization.Drive_can_read__deinterleave_and_correct_R_W_subchannels);
|
||||
sb.AppendLine($"\t[green]{Localization.Drive_can_read__deinterleave_and_correct_R_W_subchannels}[/]");
|
||||
|
||||
if(modePage.C2Pointer) sb.AppendLine("\t" + Localization.Drive_supports_C2_pointers);
|
||||
if(modePage.C2Pointer) sb.AppendLine($"\t[green]{Localization.Drive_supports_C2_pointers}[/]");
|
||||
|
||||
if(modePage.UPC) sb.AppendLine("\t" + Localization.Drive_can_read_Media_Catalogue_Number);
|
||||
if(modePage.UPC) sb.AppendLine($"\t[green]{Localization.Drive_can_read_Media_Catalogue_Number}[/]");
|
||||
|
||||
if(modePage.ISRC) sb.AppendLine("\t" + Localization.Drive_can_read_ISRC);
|
||||
if(modePage.ISRC) sb.AppendLine($"\t[green]{Localization.Drive_can_read_ISRC}[/]");
|
||||
|
||||
switch(modePage.LoadingMechanism)
|
||||
{
|
||||
case 0:
|
||||
sb.AppendLine("\t" + Localization.Drive_uses_media_caddy);
|
||||
sb.AppendLine($"\t[slateblue1]{Localization.Drive_uses_media_caddy}[/]");
|
||||
|
||||
break;
|
||||
case 1:
|
||||
sb.AppendLine("\t" + Localization.Drive_uses_a_tray);
|
||||
sb.AppendLine($"\t[slateblue1]{Localization.Drive_uses_a_tray}[/]");
|
||||
|
||||
break;
|
||||
case 2:
|
||||
sb.AppendLine("\t" + Localization.Drive_is_pop_up);
|
||||
sb.AppendLine($"\t[slateblue1]{Localization.Drive_is_pop_up}[/]");
|
||||
|
||||
break;
|
||||
case 4:
|
||||
sb.AppendLine("\t" + Localization.Drive_is_a_changer_with_individually_changeable_discs);
|
||||
sb.AppendLine($"\t[slateblue1]{Localization.Drive_is_a_changer_with_individually_changeable_discs}[/]");
|
||||
|
||||
break;
|
||||
case 5:
|
||||
sb.AppendLine("\t" + Localization.Drive_is_a_changer_using_cartridges);
|
||||
sb.AppendLine($"\t[slateblue1]{Localization.Drive_is_a_changer_using_cartridges}[/]");
|
||||
|
||||
break;
|
||||
default:
|
||||
sb.AppendFormat("\t" + Localization.Drive_uses_unknown_loading_mechanism_type__0_,
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization.Drive_uses_unknown_loading_mechanism_type__0_}[/]",
|
||||
modePage.LoadingMechanism)
|
||||
.AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if(modePage.Lock) sb.AppendLine("\t" + Localization.Drive_can_lock_media);
|
||||
if(modePage.Lock) sb.AppendLine($"\t[green]{Localization.Drive_can_lock_media}[/]");
|
||||
|
||||
if(modePage.PreventJumper)
|
||||
{
|
||||
sb.AppendLine("\t" + Localization.Drive_power_ups_locked);
|
||||
sb.AppendLine($"\t[slateblue1]{Localization.Drive_power_ups_locked}[/]");
|
||||
|
||||
sb.AppendLine(modePage.LockState
|
||||
? "\t" + Localization.Drive_is_locked__media_cannot_be_ejected_or_inserted
|
||||
: "\t" + Localization.Drive_is_not_locked__media_can_be_ejected_and_inserted);
|
||||
? $"\t[slateblue1]{Localization.Drive_is_locked__media_cannot_be_ejected_or_inserted}[/]"
|
||||
: $"\t[slateblue1]{Localization.Drive_is_not_locked__media_can_be_ejected_and_inserted}[/]");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendLine(modePage.LockState
|
||||
? "\t" +
|
||||
Localization.Drive_is_locked__media_cannot_be_ejected__but_if_empty__can_be_inserted
|
||||
: "\t" + Localization.Drive_is_not_locked__media_can_be_ejected_and_inserted);
|
||||
? $"\t[slateblue1]{
|
||||
Localization.Drive_is_locked__media_cannot_be_ejected__but_if_empty__can_be_inserted}[/]"
|
||||
: $"\t[slateblue1]{Localization.Drive_is_not_locked__media_can_be_ejected_and_inserted}[/]");
|
||||
}
|
||||
|
||||
if(modePage.Eject) sb.AppendLine("\t" + Localization.Drive_can_eject_media);
|
||||
if(modePage.Eject) sb.AppendLine($"\t[green]{Localization.Drive_can_eject_media}[/]");
|
||||
|
||||
if(modePage.SeparateChannelMute) sb.AppendLine("\t" + Localization.Each_channel_can_be_muted_independently);
|
||||
if(modePage.SeparateChannelMute)
|
||||
sb.AppendLine($"\t[green]{Localization.Each_channel_can_be_muted_independently}[/]");
|
||||
|
||||
if(modePage.SeparateChannelVolume)
|
||||
sb.AppendLine("\t" + Localization.Each_channel_s_volume_can_be_controlled_independently);
|
||||
sb.AppendLine($"\t[green]{Localization.Each_channel_s_volume_can_be_controlled_independently}[/]");
|
||||
|
||||
if(modePage.SupportedVolumeLevels > 0)
|
||||
{
|
||||
sb.AppendFormat("\t" + Localization.Drive_supports_0_volume_levels, modePage.SupportedVolumeLevels)
|
||||
sb.AppendFormat($"\t[green]{Localization.Drive_supports_0_volume_levels}[/]",
|
||||
$"[teal]{modePage.SupportedVolumeLevels}[/]")
|
||||
.AppendLine();
|
||||
}
|
||||
|
||||
if(modePage.BufferSize > 0)
|
||||
sb.AppendFormat("\t" + Localization.Drive_has_0_Kbyte_of_buffer, modePage.BufferSize).AppendLine();
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization.Drive_has_0_Kbyte_of_buffer}[/]",
|
||||
$"[aqua]{modePage.BufferSize}[/]")
|
||||
.AppendLine();
|
||||
|
||||
if(modePage.MaximumSpeed > 0)
|
||||
{
|
||||
sb.AppendFormat("\t" + Localization.Drive_maximum_reading_speed_is_0_Kbyte_sec, modePage.MaximumSpeed)
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization.Drive_maximum_reading_speed_is_0_Kbyte_sec}[/]",
|
||||
$"[lime]{modePage.MaximumSpeed}[/]")
|
||||
.AppendLine();
|
||||
}
|
||||
|
||||
if(modePage.CurrentSpeed > 0)
|
||||
{
|
||||
sb.AppendFormat("\t" + Localization.Drive_current_reading_speed_is_0_Kbyte_sec, modePage.CurrentSpeed)
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization.Drive_current_reading_speed_is_0_Kbyte_sec}[/]",
|
||||
$"[lime]{modePage.CurrentSpeed}[/]")
|
||||
.AppendLine();
|
||||
}
|
||||
|
||||
if(modePage.ReadCDR)
|
||||
{
|
||||
sb.AppendLine(modePage.WriteCDR
|
||||
? "\t" + Localization.Drive_can_read_and_write_CD_R
|
||||
: "\t" + Localization.Drive_can_read_CD_R);
|
||||
? $"\t[green]{Localization.Drive_can_read_and_write_CD_R}[/]"
|
||||
: $"\t[green]{Localization.Drive_can_read_CD_R}[/]");
|
||||
|
||||
if(modePage.Method2) sb.AppendLine("\t" + Localization.Drive_supports_reading_CD_R_packet_media);
|
||||
if(modePage.Method2) sb.AppendLine($"\t[green]{Localization.Drive_supports_reading_CD_R_packet_media}[/]");
|
||||
}
|
||||
|
||||
if(modePage.ReadCDRW)
|
||||
{
|
||||
sb.AppendLine(modePage.WriteCDRW
|
||||
? "\t" + Localization.Drive_can_read_and_write_CD_RW
|
||||
: "\t" + Localization.Drive_can_read_CD_RW);
|
||||
? $"\t[green]{Localization.Drive_can_read_and_write_CD_RW}[/]"
|
||||
: $"\t[green]{Localization.Drive_can_read_CD_RW}[/]");
|
||||
}
|
||||
|
||||
if(modePage.ReadDVDROM) sb.AppendLine("\t" + Localization.Drive_can_read_DVD_ROM);
|
||||
if(modePage.ReadDVDROM) sb.AppendLine($"\t[green]{Localization.Drive_can_read_DVD_ROM}[/]");
|
||||
|
||||
if(modePage.ReadDVDR)
|
||||
{
|
||||
sb.AppendLine(modePage.WriteDVDR
|
||||
? "\t" + Localization.Drive_can_read_and_write_DVD_R
|
||||
: "\t" + Localization.Drive_can_read_DVD_R);
|
||||
? $"\t[green]{Localization.Drive_can_read_and_write_DVD_R}[/]"
|
||||
: $"\t[green]{Localization.Drive_can_read_DVD_R}[/]");
|
||||
}
|
||||
|
||||
if(modePage.ReadDVDRAM)
|
||||
{
|
||||
sb.AppendLine(modePage.WriteDVDRAM
|
||||
? "\t" + Localization.Drive_can_read_and_write_DVD_RAM
|
||||
: "\t" + Localization.Drive_can_read_DVD_RAM);
|
||||
? $"\t[green]{Localization.Drive_can_read_and_write_DVD_RAM}[/]"
|
||||
: $"\t[green]{Localization.Drive_can_read_DVD_RAM}[/]");
|
||||
}
|
||||
|
||||
if(modePage.Composite)
|
||||
sb.AppendLine("\t" + Localization.Drive_can_deliver_a_composite_audio_and_video_data_stream);
|
||||
sb.AppendLine($"\t[green]{Localization.Drive_can_deliver_a_composite_audio_and_video_data_stream}[/]");
|
||||
|
||||
if(modePage.DigitalPort1) sb.AppendLine("\t" + Localization.Drive_supports_IEC_958_digital_output_on_port_1);
|
||||
if(modePage.DigitalPort1)
|
||||
sb.AppendLine($"\t[green]{Localization.Drive_supports_IEC_958_digital_output_on_port_1}[/]");
|
||||
|
||||
if(modePage.DigitalPort2) sb.AppendLine("\t" + Localization.Drive_supports_IEC_958_digital_output_on_port_2);
|
||||
if(modePage.DigitalPort2)
|
||||
sb.AppendLine($"\t[green]{Localization.Drive_supports_IEC_958_digital_output_on_port_2}[/]");
|
||||
|
||||
if(modePage.SDP)
|
||||
sb.AppendLine("\t" + Localization.Drive_contains_a_changer_that_can_report_the_exact_contents_of_the_slots);
|
||||
sb.AppendLine($"\t[slateblue1]{Localization.Drive_contains_a_changer_that_can_report_the_exact_contents_of_the_slots}[/]");
|
||||
|
||||
if(modePage.CurrentWriteSpeedSelected > 0)
|
||||
{
|
||||
switch(modePage.RotationControlSelected)
|
||||
{
|
||||
case 0:
|
||||
sb.AppendFormat("\t" + Localization.Drive_current_writing_speed_is_0_Kbyte_sec_in_CLV_mode,
|
||||
modePage.CurrentWriteSpeedSelected)
|
||||
.AppendLine();
|
||||
sb
|
||||
.AppendFormat($"\t[slateblue1]{Localization.Drive_current_writing_speed_is_0_Kbyte_sec_in_CLV_mode}[/]",
|
||||
$"[lime]{modePage.CurrentWriteSpeedSelected}[/]")
|
||||
.AppendLine();
|
||||
|
||||
break;
|
||||
case 1:
|
||||
sb.AppendFormat("\t" + Localization.Drive_current_writing_speed_is_0_Kbyte_sec_in_pure_CAV_mode,
|
||||
modePage.CurrentWriteSpeedSelected)
|
||||
.AppendLine();
|
||||
sb
|
||||
.AppendFormat($"\t[slateblue1]{Localization.Drive_current_writing_speed_is_0_Kbyte_sec_in_pure_CAV_mode}[/]",
|
||||
$"[lime]{modePage.CurrentWriteSpeedSelected}[/]")
|
||||
.AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -222,14 +235,15 @@ public static partial class Modes
|
||||
{
|
||||
if(modePage.MaxWriteSpeed > 0)
|
||||
{
|
||||
sb.AppendFormat("\t" + Localization.Drive_maximum_writing_speed_is_0_Kbyte_sec, modePage.MaxWriteSpeed)
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization.Drive_maximum_writing_speed_is_0_Kbyte_sec}[/]",
|
||||
$"[lime]{modePage.MaxWriteSpeed}[/]")
|
||||
.AppendLine();
|
||||
}
|
||||
|
||||
if(modePage.CurrentWriteSpeed > 0)
|
||||
{
|
||||
sb.AppendFormat("\t" + Localization.Drive_current_writing_speed_is_0_Kbyte_sec,
|
||||
modePage.CurrentWriteSpeed)
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization.Drive_current_writing_speed_is_0_Kbyte_sec}[/]",
|
||||
$"[lime]{modePage.CurrentWriteSpeed}[/]")
|
||||
.AppendLine();
|
||||
}
|
||||
}
|
||||
@@ -242,32 +256,36 @@ public static partial class Modes
|
||||
switch(descriptor.RotationControl)
|
||||
{
|
||||
case 0:
|
||||
sb.AppendFormat("\t" + Localization.Drive_supports_writing_at_0_Kbyte_sec_in_CLV_mode,
|
||||
descriptor.WriteSpeed)
|
||||
.AppendLine();
|
||||
sb
|
||||
.AppendFormat($"\t[slateblue1]{Localization.Drive_supports_writing_at_0_Kbyte_sec_in_CLV_mode}[/]",
|
||||
$"[lime]{descriptor.WriteSpeed}[/]")
|
||||
.AppendLine();
|
||||
|
||||
break;
|
||||
case 1:
|
||||
sb.AppendFormat("\t" + Localization.Drive_supports_writing_at_is_0_Kbyte_sec_in_pure_CAV_mode,
|
||||
descriptor.WriteSpeed)
|
||||
.AppendLine();
|
||||
sb
|
||||
.AppendFormat($"\t[slateblue1]{Localization.Drive_supports_writing_at_is_0_Kbyte_sec_in_pure_CAV_mode}[/]",
|
||||
$"[lime]{descriptor.WriteSpeed}[/]")
|
||||
.AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(modePage.TestWrite) sb.AppendLine("\t" + Localization.Drive_supports_test_writing);
|
||||
if(modePage.TestWrite) sb.AppendLine($"\t[green]{Localization.Drive_supports_test_writing}[/]");
|
||||
|
||||
if(modePage.ReadBarcode) sb.AppendLine("\t" + Localization.Drive_can_read_barcode);
|
||||
if(modePage.ReadBarcode) sb.AppendLine($"\t[green]{Localization.Drive_can_read_barcode}[/]");
|
||||
|
||||
if(modePage.SCC) sb.AppendLine("\t" + Localization.Drive_can_read_both_sides_of_a_disc);
|
||||
if(modePage.SCC) sb.AppendLine($"\t[green]{Localization.Drive_can_read_both_sides_of_a_disc}[/]");
|
||||
|
||||
if(modePage.LeadInPW) sb.AppendLine("\t" + Localization.Drive_an_read_raw_R_W_subchannel_from_the_Lead_In);
|
||||
if(modePage.LeadInPW)
|
||||
sb.AppendLine($"\t[green]{Localization.Drive_an_read_raw_R_W_subchannel_from_the_Lead_In}[/]");
|
||||
|
||||
if(modePage.CMRSupported == 1) sb.AppendLine("\t" + Localization.Drive_supports_DVD_CSS_and_or_DVD_CPPM);
|
||||
if(modePage.CMRSupported == 1)
|
||||
sb.AppendLine($"\t[green]{Localization.Drive_supports_DVD_CSS_and_or_DVD_CPPM}[/]");
|
||||
|
||||
if(modePage.BUF) sb.AppendLine("\t" + Localization.Drive_supports_buffer_under_run_free_recording);
|
||||
if(modePage.BUF) sb.AppendLine($"\t[green]{Localization.Drive_supports_buffer_under_run_free_recording}[/]");
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user