mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
General cleanup and refactor.
This commit is contained in:
816
.editorconfig
816
.editorconfig
@@ -1,632 +1,216 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
next_line = crlf
|
||||
end_of_line = lf
|
||||
trim_trailing_whitespace = false
|
||||
insert_final_newline = false
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
# Generic non-language specific ones for Resharper and friends
|
||||
brace_style = next_line
|
||||
int_align = true
|
||||
keep_existing_arrangement = false
|
||||
place_simple_blocks_on_single_line = true
|
||||
place_simple_declaration_blocks_on_single_line = true
|
||||
place_attribute_on_same_line = false
|
||||
space_after_unary_operator = false
|
||||
space_after_comma = true
|
||||
space_around_ternary_operator = true
|
||||
space_around_binary_operator = true
|
||||
space_around_member_access_operator = false
|
||||
space_before_open_square_brackets = false
|
||||
space_after_keywords_in_control_flow_statements = true
|
||||
space_before_comma = false
|
||||
space_between_method_call_name_and_opening_parenthesis = false
|
||||
space_between_method_declaration_name_and_open_parenthesis = false
|
||||
space_between_square_brackets = false
|
||||
space_between_parentheses_of_control_flow_statements = false
|
||||
accessor_owner_declaration_braces = next_line
|
||||
accessor_declaration_braces = next_line
|
||||
case_block_braces = next_line
|
||||
initializer_braces = next_line
|
||||
other_braces = next_line
|
||||
allow_comment_after_lbrace = false
|
||||
empty_block_style = together_same_line
|
||||
braces_for_ifelse = not_required
|
||||
braces_for_for = not_required
|
||||
braces_for_foreach = not_required
|
||||
braces_for_while = not_required
|
||||
braces_for_dowhile = not_required
|
||||
braces_for_using = not_required
|
||||
braces_for_lock = not_required
|
||||
braces_for_fixed = not_required
|
||||
method_or_operator_body = expression_body
|
||||
local_function_body = expression_body
|
||||
constructor_or_destructor_body = expression_body
|
||||
accessor_owner_body = expression_body
|
||||
force_attribute_style = join
|
||||
function_braces = next_line
|
||||
force_control_statements_braces = always_remove
|
||||
space_in_singleline_accessorholder = true
|
||||
type_declaration_braces = next_line
|
||||
invocable_declaration_braces = next_line
|
||||
anonymous_method_declaration_braces = next_line
|
||||
space_between_accessors_in_singleline_property = true
|
||||
indent_nested_usings_stmt = true
|
||||
space_within_empty_braces = false
|
||||
indent_nested_fixed_stmt = true
|
||||
indent_nested_lock_stmt = true
|
||||
indent_nested_for_stmt = true
|
||||
indent_nested_foreach_stmt = true
|
||||
indent_nested_while_stmt = true
|
||||
use_continuous_indent_inside_parens = true
|
||||
indent_method_decl_pars = inside
|
||||
indent_invocation_pars = inside
|
||||
indent_statement_pars = inside
|
||||
indent_typeparam_angles = inside
|
||||
indent_typearg_angles = inside
|
||||
indent_pars = inside
|
||||
indent_preprocessor_if = outdent
|
||||
indent_preprocessor_region = usual_indent
|
||||
indent_preprocessor_other = usual_indent
|
||||
indent_switch_labels = true
|
||||
indent_type_constraints = true
|
||||
stick_comment = false
|
||||
alignment_tab_fill_style = use_spaces
|
||||
align_multiline_parameter = true
|
||||
align_multiline_extends_list = true
|
||||
align_linq_query = true
|
||||
align_multiline_binary_expressions_chain = true
|
||||
outdent_binary_ops = true
|
||||
align_multiline_calls_chain = true
|
||||
outdent_dots = true
|
||||
align_multiline_array_and_object_initializer = false
|
||||
indent_anonymous_method_block = false
|
||||
align_first_arg_by_paren = true
|
||||
align_multiline_argument = true
|
||||
align_tuple_components = true
|
||||
align_multiline_expression = true
|
||||
align_multiline_for_stmt = true
|
||||
align_multiple_declaration = true
|
||||
align_multline_type_parameter_list = true
|
||||
align_multline_type_parameter_constrains = true
|
||||
int_align_fields = true
|
||||
int_align_properties = true
|
||||
int_align_methods = true
|
||||
int_align_parameters = false
|
||||
int_align_variables = true
|
||||
int_align_assignments = true
|
||||
int_align_nested_ternary = true
|
||||
int_align_invocations = false
|
||||
int_align_binary_expressions = true
|
||||
int_align_comments = true
|
||||
int_align_switch_sections = true
|
||||
keep_user_linebreaks = false
|
||||
keep_existing_arrangement = false
|
||||
keep_existing_linebreaks = false
|
||||
max_line_length = 120
|
||||
wrap_before_comma = false
|
||||
special_else_if_treatment = true
|
||||
place_type_attribute_on_same_line = never
|
||||
place_method_attribute_on_same_line = never
|
||||
place_accessorholder_attribute_on_same_line = never
|
||||
place_attribute_on_same_line = never
|
||||
place_accessor_attribute_on_same_line = never
|
||||
place_attribute_on_same_line = never
|
||||
place_field_attribute_on_same_line = never
|
||||
place_attribute_on_same_line = never
|
||||
wrap_parameters_style = wrap_if_long
|
||||
keep_existing_declaration_parens_arrangement = false
|
||||
wrap_before_declaration_lpar = false
|
||||
wrap_after_declaration_lpar = false
|
||||
wrap_before_declaration_rpar = false
|
||||
place_constructor_initializer_on_same_line = true
|
||||
keep_existing_expr_member_arrangement = false
|
||||
place_expr_method_on_single_line = true
|
||||
place_expr_property_on_single_line = true
|
||||
place_expr_accessor_on_single_line = true
|
||||
wrap_before_arrow_with_expressions = false
|
||||
place_type_constraints_on_same_line = true
|
||||
wrap_before_first_type_parameter_constraint = true
|
||||
wrap_multiple_type_parameter_constraints_style = wrap_if_long
|
||||
wrap_before_type_parameter_langle = true
|
||||
wrap_before_extends_colon = false
|
||||
wrap_extends_list_style = wrap_if_long
|
||||
keep_existing_declaration_block_arrangement = false
|
||||
place_abstract_accessorholder_on_single_line = true
|
||||
place_simple_accessorholder_on_single_line = false
|
||||
place_accessor_with_attrs_holder_on_single_line = false
|
||||
place_simple_accessor_on_single_line = true
|
||||
place_simple_method_on_single_line = false
|
||||
keep_existing_enum_arrangement = false
|
||||
place_simple_enum_on_single_line = false
|
||||
wrap_enum_declaration = wrap_if_long
|
||||
new_line_before_else = true
|
||||
new_line_before_while = false
|
||||
wrap_for_stmt_header_style = wrap_if_long
|
||||
wrap_multiple_declaration_style = wrap_if_long
|
||||
keep_existing_embedded_arrangement = false
|
||||
place_simple_embedded_statement_on_same_line = false
|
||||
place_simple_case_statement_on_same_line = true
|
||||
keep_existing_embedded_block_arrangement = false
|
||||
place_simple_embedded_block_on_same_line = false
|
||||
place_simple_anonymousmethod_on_single_line = false
|
||||
keep_existing_initializer_arrangement = false
|
||||
place_simple_initializer_on_single_line = false
|
||||
wrap_object_and_collection_initializer_style = chop_always
|
||||
wrap_array_initializer_style = wrap_if_long
|
||||
wrap_arguments_style = wrap_if_long
|
||||
keep_existing_invocation_parens_arrangement = false
|
||||
wrap_after_invocation_lpar = false
|
||||
wrap_before_invocation_rpar = false
|
||||
wrap_after_dot_in_method_calls = true
|
||||
wrap_chained_method_calls = wrap_if_long
|
||||
wrap_before_binary_opsign = false
|
||||
wrap_chained_binary_expressions = wrap_if_long
|
||||
force_chop_compound_if_expression = true
|
||||
force_chop_compound_while_expression = true
|
||||
force_chop_compound_do_expression = true
|
||||
wrap_before_ternary_opsigns = true
|
||||
wrap_ternary_expr_style = wrap_if_long
|
||||
nested_ternary_style = expanded
|
||||
wrap_linq_expressions = wrap_if_long
|
||||
wrap_before_linq_expression = false
|
||||
place_linq_into_on_new_line = false
|
||||
wrap_verbatim_interpolated_strings = wrap_if_long
|
||||
extra_spaces = remove_all
|
||||
space_after_keywords_in_control_flow_statements = false
|
||||
space_between_method_call_name_and_opening_parenthesis = false
|
||||
space_between_method_declaration_name_and_open_parenthesis = false
|
||||
space_before_typeof_parentheses = false
|
||||
space_before_checked_parentheses = false
|
||||
space_before_sizeof_parentheses = false
|
||||
space_before_nameof_parentheses = false
|
||||
space_between_keyword_and_expression = true
|
||||
space_between_keyword_and_type = true
|
||||
space_around_assignment_op = true
|
||||
space_around_logical_op = true
|
||||
space_around_binary_operator = true
|
||||
space_around_equality_op = true
|
||||
space_around_relational_op = true
|
||||
space_around_bitwise_op = true
|
||||
space_around_additive_op = true
|
||||
space_around_multiplicative_op = true
|
||||
space_around_shift_op = true
|
||||
space_around_nullcoalescing_op = true
|
||||
space_around_arrow_op = false
|
||||
space_after_logical_not_op = false
|
||||
space_after_unary_operator = false
|
||||
space_after_cast = false
|
||||
space_around_dot = false
|
||||
space_around_lambda_arrow = true
|
||||
space_before_pointer_asterik_declaration = false
|
||||
space_before_nullable_mark = false
|
||||
blank_lines_around_class_definition = 1
|
||||
namespace_indentation = all
|
||||
space_within_template_argument = false
|
||||
align_union_type_usage = true
|
||||
space_in_singleline_method = true
|
||||
space_in_singleline_anonymous_method = true
|
||||
space_within_single_line_array_initializer_braces = true
|
||||
space_around_arrow_op = false
|
||||
|
||||
# These are for markup languages (HTML, XML, etc)
|
||||
spaces_around_eq_in_pi_attribute = false
|
||||
space_after_last_pi_attribute = true
|
||||
pi_attributes_indent = align_by_first_attribute
|
||||
blank_line_after_pi = true
|
||||
spaces_around_eq_in_attribute = false
|
||||
space_after_last_attribute = false
|
||||
space_before_self_closing = true
|
||||
attribute_style = on_single_line
|
||||
attribute_indent = align_by_first_attribute
|
||||
sort_attributes = true
|
||||
sort_class_selectors = true
|
||||
max_blank_lines_between_tags = 0
|
||||
linebreak_before_all_elements = true
|
||||
linebreak_before_multiline_elements = true
|
||||
quote_style = doublequoted
|
||||
delete_quotes_from_solid_values = false
|
||||
normalize_tag_names = true
|
||||
|
||||
|
||||
[{.babelrc,.stylelintrc,jest.config,.eslintrc,.prettierrc,*.json,*.jsb3,*.jsb2,*.bowerrc}]
|
||||
indent_size = 2
|
||||
|
||||
[*.js.map]
|
||||
indent_size = 2
|
||||
|
||||
[*.{css,scss}]
|
||||
indent_size = 2
|
||||
declarations_style = separate_lines_for_nonsingle
|
||||
media_query_style = separate_lines
|
||||
selector_style = same_line
|
||||
properties_style = separate_lines_for_nonsingle
|
||||
brace_style = next_line
|
||||
|
||||
[{.analysis_options,*.yml,*.yaml}]
|
||||
indent_size = 2
|
||||
|
||||
# Xml project files
|
||||
[*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]
|
||||
indent_size = 2
|
||||
|
||||
# Xml files
|
||||
[*.{xml,stylecop,resx,ruleset}]
|
||||
indent_size = 2
|
||||
|
||||
# Xml config files
|
||||
[*.{props,targets,config,nuspec}]
|
||||
indent_size = 2
|
||||
|
||||
# .net files
|
||||
[*.{cs,vb}]
|
||||
# These set the this. / Me.
|
||||
dotnet_style_qualification_for_field = false:warning
|
||||
dotnet_style_qualification_for_property = false:warning
|
||||
dotnet_style_qualification_for_method = false:warning
|
||||
dotnet_style_qualification_for_event = false:warning
|
||||
|
||||
# These make it suggest Int32 instead of int, etc.
|
||||
# Microsoft .NET properties
|
||||
csharp_new_line_between_query_expression_clauses = false
|
||||
csharp_preferred_modifier_order = public, private, protected, internal, new, static, abstract, virtual, sealed, readonly, override, extern, unsafe, volatile, async:suggestion
|
||||
csharp_prefer_braces = false:warning
|
||||
csharp_space_after_keywords_in_control_flow_statements = false
|
||||
csharp_style_var_elsewhere = false:suggestion
|
||||
csharp_style_var_for_built_in_types = false:suggestion
|
||||
csharp_style_var_when_type_is_apparent = true:suggestion
|
||||
csharp_using_directive_placement = inside_namespace:silent
|
||||
dotnet_naming_rule.unity_serialized_field_rule.import_to_resharper = True
|
||||
dotnet_naming_rule.unity_serialized_field_rule.resharper_description = Unity serialized field
|
||||
dotnet_naming_rule.unity_serialized_field_rule.resharper_guid = 5f0fdb63-c892-4d2c-9324-15c80b22a7ef
|
||||
dotnet_naming_rule.unity_serialized_field_rule.severity = warning
|
||||
dotnet_naming_rule.unity_serialized_field_rule.style = lower_camel_case_style
|
||||
dotnet_naming_rule.unity_serialized_field_rule.symbols = unity_serialized_field_symbols
|
||||
dotnet_naming_rule.unity_serialized_field_rule_1.import_to_resharper = True
|
||||
dotnet_naming_rule.unity_serialized_field_rule_1.resharper_description = Unity serialized field
|
||||
dotnet_naming_rule.unity_serialized_field_rule_1.resharper_guid = 5f0fdb63-c892-4d2c-9324-15c80b22a7ef
|
||||
dotnet_naming_rule.unity_serialized_field_rule_1.severity = warning
|
||||
dotnet_naming_rule.unity_serialized_field_rule_1.style = lower_camel_case_style
|
||||
dotnet_naming_rule.unity_serialized_field_rule_1.symbols = unity_serialized_field_symbols_1
|
||||
dotnet_naming_style.lower_camel_case_style.capitalization = camel_case
|
||||
dotnet_naming_symbols.unity_serialized_field_symbols.applicable_accessibilities = *
|
||||
dotnet_naming_symbols.unity_serialized_field_symbols.applicable_kinds =
|
||||
dotnet_naming_symbols.unity_serialized_field_symbols.resharper_applicable_kinds = unity_serialised_field
|
||||
dotnet_naming_symbols.unity_serialized_field_symbols.resharper_required_modifiers = instance
|
||||
dotnet_naming_symbols.unity_serialized_field_symbols_1.applicable_accessibilities = *
|
||||
dotnet_naming_symbols.unity_serialized_field_symbols_1.applicable_kinds =
|
||||
dotnet_naming_symbols.unity_serialized_field_symbols_1.resharper_applicable_kinds = unity_serialised_field
|
||||
dotnet_naming_symbols.unity_serialized_field_symbols_1.resharper_required_modifiers = instance
|
||||
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:warning
|
||||
dotnet_style_parentheses_in_other_binary_operators = never_if_unnecessary:warning
|
||||
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:warning
|
||||
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
|
||||
dotnet_style_predefined_type_for_member_access = true:suggestion
|
||||
|
||||
# This controls implicit access modifiers
|
||||
dotnet_style_qualification_for_event = false:suggestion
|
||||
dotnet_style_qualification_for_field = false:suggestion
|
||||
dotnet_style_qualification_for_method = false:suggestion
|
||||
dotnet_style_qualification_for_property = false:suggestion
|
||||
dotnet_style_require_accessibility_modifiers = never:suggestion
|
||||
|
||||
# Prefer non modified fields to be marked readonly
|
||||
dotnet_style_readonly_field = true:warning
|
||||
# ReSharper properties
|
||||
resharper_align_first_arg_by_paren = true
|
||||
resharper_align_linq_query = true
|
||||
resharper_align_multiline_argument = true
|
||||
resharper_align_multiline_binary_expressions_chain = true
|
||||
resharper_align_multiline_binary_patterns = true
|
||||
resharper_align_multiline_calls_chain = true
|
||||
resharper_align_multiline_expression = true
|
||||
resharper_align_multiline_extends_list = true
|
||||
resharper_align_multiline_for_stmt = true
|
||||
resharper_align_multiline_parameter = true
|
||||
resharper_align_multiline_property_pattern = true
|
||||
resharper_align_multiline_switch_expression = true
|
||||
resharper_align_multiple_declaration = true
|
||||
resharper_align_multline_type_parameter_constrains = true
|
||||
resharper_align_multline_type_parameter_list = true
|
||||
resharper_align_tuple_components = true
|
||||
resharper_attribute_indent = align_by_first_attribute
|
||||
resharper_attribute_style = on_single_line
|
||||
resharper_autodetect_indent_settings = true
|
||||
resharper_constructor_or_destructor_body = expression_body
|
||||
resharper_cpp_brace_style = next_line
|
||||
resharper_csharp_outdent_commas = true
|
||||
resharper_default_value_when_type_not_evident = default_expression
|
||||
resharper_empty_block_style = together_same_line
|
||||
resharper_force_attribute_style = join
|
||||
resharper_force_chop_compound_do_expression = true
|
||||
resharper_force_chop_compound_if_expression = true
|
||||
resharper_force_chop_compound_while_expression = true
|
||||
resharper_for_built_in_types = use_var_when_evident
|
||||
resharper_fsharp_type_declaration_braces = next_line
|
||||
resharper_indent_nested_fixed_stmt = true
|
||||
resharper_indent_nested_foreach_stmt = true
|
||||
resharper_indent_nested_for_stmt = true
|
||||
resharper_indent_nested_lock_stmt = true
|
||||
resharper_indent_nested_usings_stmt = true
|
||||
resharper_indent_nested_while_stmt = true
|
||||
resharper_indent_preprocessor_if = outdent
|
||||
resharper_indent_preprocessor_other = usual_indent
|
||||
resharper_indent_switch_labels = true
|
||||
resharper_int_align_assignments = true
|
||||
resharper_int_align_binary_expressions = true
|
||||
resharper_int_align_comments = true
|
||||
resharper_int_align_fields = true
|
||||
resharper_int_align_methods = true
|
||||
resharper_int_align_nested_ternary = true
|
||||
resharper_int_align_properties = true
|
||||
resharper_int_align_property_patterns = true
|
||||
resharper_int_align_switch_expressions = true
|
||||
resharper_int_align_switch_sections = true
|
||||
resharper_int_align_variables = true
|
||||
resharper_keep_existing_arrangement = false
|
||||
resharper_keep_user_linebreaks = false
|
||||
resharper_linebreak_before_all_elements = true
|
||||
resharper_local_function_body = expression_body
|
||||
resharper_max_blank_lines_between_tags = 0
|
||||
resharper_max_enum_members_on_line = 1
|
||||
resharper_method_or_operator_body = expression_body
|
||||
resharper_nested_ternary_style = expanded
|
||||
resharper_new_line_before_while = false
|
||||
resharper_normalize_tag_names = true
|
||||
resharper_outdent_binary_ops = true
|
||||
resharper_outdent_binary_pattern_ops = true
|
||||
resharper_outdent_dots = true
|
||||
resharper_outdent_statement_labels = true
|
||||
resharper_place_attribute_on_same_line = false
|
||||
resharper_place_expr_accessor_on_single_line = true
|
||||
resharper_place_expr_method_on_single_line = true
|
||||
resharper_place_expr_property_on_single_line = true
|
||||
resharper_place_linq_into_on_new_line = false
|
||||
resharper_place_simple_anonymousmethod_on_single_line = false
|
||||
resharper_place_simple_case_statement_on_same_line = true
|
||||
resharper_place_simple_embedded_statement_on_same_line = false
|
||||
resharper_place_simple_initializer_on_single_line = false
|
||||
resharper_place_simple_switch_expression_on_single_line = true
|
||||
resharper_prefer_explicit_discard_declaration = true
|
||||
resharper_qualified_using_at_nested_scope = true
|
||||
resharper_show_autodetect_configure_formatting_tip = false
|
||||
resharper_sort_attributes = true
|
||||
resharper_sort_class_selectors = true
|
||||
resharper_space_after_keywords_in_control_flow_statements = false
|
||||
resharper_space_after_last_pi_attribute = true
|
||||
resharper_space_after_unary_operator = false
|
||||
resharper_space_around_binary_operator = true
|
||||
resharper_space_before_self_closing = true
|
||||
resharper_space_within_empty_braces = false
|
||||
resharper_stick_comment = false
|
||||
resharper_use_indent_from_vs = false
|
||||
resharper_wrap_after_dot_in_method_calls = true
|
||||
resharper_wrap_before_first_type_parameter_constraint = true
|
||||
resharper_wrap_before_type_parameter_langle = true
|
||||
resharper_wrap_enum_declaration = wrap_if_long
|
||||
resharper_wrap_for_stmt_header_style = wrap_if_long
|
||||
resharper_wrap_lines = true
|
||||
resharper_wrap_multiple_declaration_style = wrap_if_long
|
||||
resharper_wrap_multiple_type_parameter_constraints_style = wrap_if_long
|
||||
resharper_wrap_object_and_collection_initializer_style = chop_always
|
||||
resharper_wrap_ternary_expr_style = wrap_if_long
|
||||
resharper_wrap_verbatim_interpolated_strings = wrap_if_long
|
||||
|
||||
# Parenthesis settings
|
||||
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning
|
||||
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning
|
||||
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning
|
||||
dotnet_style_parentheses_in_other_operators = always_for_clarity:warning
|
||||
# ReSharper inspection severities
|
||||
resharper_annotate_can_be_null_parameter_highlighting = warning
|
||||
resharper_annotate_can_be_null_type_member_highlighting = warning
|
||||
resharper_annotate_not_null_parameter_highlighting = warning
|
||||
resharper_annotate_not_null_type_member_highlighting = warning
|
||||
resharper_arrange_attributes_highlighting = hint
|
||||
resharper_arrange_constructor_or_destructor_body_highlighting = warning
|
||||
resharper_arrange_default_value_when_type_evident_highlighting = warning
|
||||
resharper_arrange_default_value_when_type_not_evident_highlighting = warning
|
||||
resharper_arrange_local_function_body_highlighting = warning
|
||||
resharper_arrange_method_or_operator_body_highlighting = warning
|
||||
resharper_arrange_object_creation_when_type_evident_highlighting = warning
|
||||
resharper_arrange_object_creation_when_type_not_evident_highlighting = warning
|
||||
resharper_arrange_redundant_parentheses_highlighting = hint
|
||||
resharper_arrange_this_qualifier_highlighting = hint
|
||||
resharper_arrange_type_member_modifiers_highlighting = hint
|
||||
resharper_arrange_type_modifiers_highlighting = hint
|
||||
resharper_async_void_method_highlighting = warning
|
||||
resharper_built_in_type_reference_style_for_member_access_highlighting = hint
|
||||
resharper_built_in_type_reference_style_highlighting = hint
|
||||
resharper_compare_non_constrained_generic_with_null_highlighting = warning
|
||||
resharper_heap_view_boxing_allocation_highlighting = none
|
||||
resharper_heap_view_delegate_allocation_highlighting = none
|
||||
resharper_heap_view_object_allocation_evident_highlighting = none
|
||||
resharper_heap_view_object_allocation_highlighting = none
|
||||
resharper_inheritdoc_consider_usage_highlighting = warning
|
||||
resharper_local_function_can_be_made_static_highlighting = warning
|
||||
resharper_loop_can_be_partly_converted_to_query_highlighting = warning
|
||||
resharper_member_can_be_internal_highlighting = warning
|
||||
resharper_nullable_warning_suppression_is_used_highlighting = warning
|
||||
resharper_redundant_base_qualifier_highlighting = warning
|
||||
resharper_remove_constructor_invocation_highlighting = warning
|
||||
resharper_separate_control_transfer_statement_highlighting = warning
|
||||
resharper_string_ends_with_is_culture_specific_highlighting = warning
|
||||
resharper_string_starts_with_is_culture_specific_highlighting = warning
|
||||
resharper_struct_member_can_be_made_read_only_highlighting = warning
|
||||
resharper_suggest_var_or_type_built_in_types_highlighting = hint
|
||||
resharper_suggest_var_or_type_elsewhere_highlighting = hint
|
||||
resharper_suggest_var_or_type_simple_types_highlighting = hint
|
||||
resharper_tabs_are_disallowed_highlighting = warning
|
||||
resharper_unnecessary_whitespace_highlighting = warning
|
||||
resharper_use_nameof_expression_for_part_of_the_string_highlighting = warning
|
||||
resharper_use_positional_deconstruction_pattern_highlighting = warning
|
||||
resharper_web_config_module_not_resolved_highlighting = warning
|
||||
resharper_web_config_type_not_resolved_highlighting = warning
|
||||
resharper_web_config_wrong_module_highlighting = warning
|
||||
|
||||
dotnet_style_object_initializer = true:suggestion
|
||||
dotnet_style_collection_initializer = true:suggestion
|
||||
dotnet_style_explicit_tuple_names = true:error
|
||||
dotnet_style_prefer_inferred_tuple_names = true:warning
|
||||
dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning
|
||||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
|
||||
dotnet_style_prefer_conditional_expression_over_return = true:warning
|
||||
dotnet_style_coalesce_expression = true:warning
|
||||
dotnet_style_null_propagation = true:error
|
||||
[{*.har,*.inputactions,*.jsb2,*.jsb3,*.json,.babelrc,.eslintrc,.stylelintrc,bowerrc,jest.config}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
dotnet_sort_system_directives_first = true
|
||||
[{*.yaml,*.yml,.analysis_options}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
# Constants in C style, all-caps
|
||||
dotnet_naming_rule.constant_fields_caps.symbols = constant_fields
|
||||
dotnet_naming_rule.constant_fields_caps.severity = warning
|
||||
dotnet_naming_rule.constant_fields_caps.style = caps_style
|
||||
dotnet_naming_symbols.constant_fields.applicable_kinds = field
|
||||
dotnet_naming_symbols.constant_fields.required_modifiers = const
|
||||
dotnet_naming_style.caps_style.capitalization = all_upper
|
||||
[*.csv]
|
||||
indent_style = tab
|
||||
tab_width = 1
|
||||
|
||||
# interfaces should be prefixed with I
|
||||
dotnet_naming_rule.pascal_case_for_interface.severity = error
|
||||
dotnet_naming_rule.pascal_case_for_interface.symbols = interfaces_fields
|
||||
dotnet_naming_rule.pascal_case_for_interface.style = pascal_case_interface_style
|
||||
dotnet_naming_symbols.interfaces_fields.applicable_kinds = interface
|
||||
dotnet_naming_style.pascal_case_interface_style.required_prefix = I
|
||||
dotnet_naming_style.pascal_case_interface_style.capitalization = pascal_case
|
||||
[{*.bash,*.sh,*.tool,*.zsh}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
## internal and private fields should be _camelCase
|
||||
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = warning
|
||||
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
|
||||
dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
|
||||
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
|
||||
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
|
||||
dotnet_naming_style.camel_case_underscore_style.required_prefix = _
|
||||
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
|
||||
|
||||
# 2018-12-07 NP: This is not yet working in VS2017
|
||||
# local variables should be camelCase
|
||||
#dotnet_naming_rule.camel_case_for_locals.severity = suggestion
|
||||
#dotnet_naming_rule.camel_case_for_locals.symbols = local_fields
|
||||
#dotnet_naming_rule.camel_case_for_locals.style = camel_case_style
|
||||
#dotnet_naming_symbols.local_fields.applicable_kinds = local
|
||||
#dotnet_naming_style.camel_case_style.capitalization = camel_case
|
||||
|
||||
[*.cs]
|
||||
# var var var
|
||||
csharp_style_var_for_built_in_types = false:warning
|
||||
csharp_style_var_when_type_is_apparent = true:suggestion
|
||||
csharp_style_var_elsewhere = false:warning
|
||||
|
||||
csharp_style_expression_bodied_methods = when_on_single_line:suggestion
|
||||
csharp_style_expression_bodied_constructors = when_on_single_line:suggestion
|
||||
csharp_style_expression_bodied_operators = when_on_single_line:suggestion
|
||||
csharp_style_expression_bodied_properties = when_on_single_line:suggestion
|
||||
csharp_style_expression_bodied_indexers = when_on_single_line:suggestion
|
||||
csharp_style_expression_bodied_accessors = when_on_single_line:suggestion
|
||||
|
||||
csharp_style_pattern_matching_over_is_with_cast_check = true:warning
|
||||
csharp_style_pattern_matching_over_as_with_null_check = when_on_single_line:warning
|
||||
|
||||
csharp_style_inlined_variable_declaration = true:warning
|
||||
|
||||
csharp_prefer_simple_default_expression = true:warning
|
||||
csharp_style_deconstructed_variable_declaration = false:warning
|
||||
|
||||
csharp_style_throw_expression = true:warning
|
||||
csharp_style_conditional_delegate_call = true:warning
|
||||
|
||||
csharp_prefer_braces = false
|
||||
|
||||
csharp_new_line_before_open_brace = all
|
||||
csharp_new_line_before_else = true
|
||||
csharp_new_line_before_catch = true
|
||||
csharp_new_line_before_finally = true
|
||||
csharp_new_line_before_members_in_object_initializers = true
|
||||
csharp_new_line_before_members_in_anonymous_types = true
|
||||
csharp_new_line_between_query_expression_clauses = true
|
||||
|
||||
csharp_indent_case_contents = true
|
||||
csharp_indent_switch_labels = true
|
||||
csharp_indent_labels = flush_left
|
||||
|
||||
csharp_space_after_cast = false
|
||||
csharp_space_after_keywords_in_control_flow_statements = false
|
||||
csharp_space_between_method_declaration_parameter_list_parentheses = false
|
||||
csharp_space_between_parentheses = none
|
||||
csharp_space_before_colon_in_inheritance_clause = true
|
||||
csharp_space_after_colon_in_inheritance_clause = true
|
||||
csharp_space_around_binary_operators = before_and_after
|
||||
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
|
||||
csharp_space_between_method_call_name_and_opening_parenthesis = false
|
||||
csharp_space_between_method_call_empty_parameter_list_parentheses = false
|
||||
|
||||
csharp_preserve_single_line_statements = false
|
||||
csharp_preserve_single_line_blocks = true
|
||||
|
||||
csharp_blank_lines_around_region = 0
|
||||
csharp_blank_lines_inside_region = 0
|
||||
csharp_blank_lines_before_single_line_comment = 1
|
||||
csharp_keep_blank_lines_in_declarations = 1
|
||||
csharp_remove_blank_lines_near_braces_in_declarations = true
|
||||
csharp_blank_lines_after_start_comment = false
|
||||
csharp_blank_lines_between_using_groups = 0
|
||||
csharp_blank_lines_after_using_list = 1
|
||||
csharp_blank_lines_around_namespace = 1
|
||||
csharp_blank_lines_inside_namespace = 0
|
||||
csharp_blank_lines_around_type = 1
|
||||
csharp_blank_lines_inside_type = 0
|
||||
csharp_blank_lines_around_field = 0
|
||||
csharp_blank_lines_around_single_line_field = 0
|
||||
csharp_blank_lines_around_property = 1
|
||||
csharp_blank_lines_around_single_line_property = 0
|
||||
csharp_blank_lines_around_auto_property = 0
|
||||
csharp_blank_lines_around_single_line_auto_property = 0
|
||||
csharp_blank_lines_around_invocable = 1
|
||||
csharp_blank_lines_around_single_line_invocable = 1
|
||||
csharp_keep_blank_lines_in_code = 1
|
||||
csharp_remove_blank_lines_near_braces_in_code = true
|
||||
csharp_blank_lines_around_local_method = 1
|
||||
csharp_blank_lines_around_single_line_local_method = 1
|
||||
csharp_blank_lines_before_control_transfer_statements = 1
|
||||
csharp_blank_lines_after_control_transfer_statements = 1
|
||||
csharp_blank_lines_before_block_statements = 1
|
||||
csharp_blank_lines_after_block_statements = 1
|
||||
csharp_blank_lines_before_multiline_statements = 1
|
||||
csharp_blank_lines_after_multiline_statements = 1
|
||||
|
||||
csharp_type_declaration_braces = next_line
|
||||
csharp_brace_style = next_line
|
||||
csharp_indent_inside_namespace = true
|
||||
csharp_invocable_declaration_braces = next_line
|
||||
csharp_anonymous_method_declaration_braces = next_line
|
||||
csharp_accessor_owner_declaration_braces = next_line
|
||||
csharp_accessor_declaration_braces = next_line
|
||||
csharp_case_block_braces = next_line
|
||||
csharp_initializer_braces = next_line
|
||||
csharp_other_braces = next_line
|
||||
csharp_allow_comment_after_lbrace = false
|
||||
csharp_empty_block_style = together_same_line
|
||||
|
||||
csharp_for_built_in_types = use_explicit_type
|
||||
csharp_for_simple_types = use_var_when_evident
|
||||
csharp_for_other_types = use_explicit_type
|
||||
csharp_prefer_separate_deconstructed_variables_declaration = true
|
||||
csharp_prefer_explicit_discard_declaration = false
|
||||
|
||||
csharp_instance_members_qualify_members = none
|
||||
csharp_builtin_type_reference_style = use_keyword
|
||||
csharp_prefer_qualified_reference = false
|
||||
csharp_add_imports_to_deepest_scope = false
|
||||
csharp_allow_alias = true
|
||||
csharp_default_private_modifier = implicit
|
||||
csharp_default_internal_modifier = explicit
|
||||
csharp_arguments_literal = positional
|
||||
csharp_arguments_string_literal = positional
|
||||
csharp_arguments_named = positional
|
||||
csharp_arguments_anonymous_function = positional
|
||||
csharp_arguments_other = positional
|
||||
csharp_braces_for_ifelse = not_required
|
||||
csharp_braces_for_for = not_required
|
||||
csharp_braces_for_foreach = not_required
|
||||
csharp_braces_for_while = not_required
|
||||
csharp_braces_for_dowhile = not_required
|
||||
csharp_braces_for_using = not_required
|
||||
csharp_braces_for_lock = not_required
|
||||
csharp_braces_for_fixed = not_required
|
||||
csharp_method_or_operator_body = expression_body
|
||||
csharp_local_function_body = expression_body
|
||||
csharp_constructor_or_destructor_body = expression_body
|
||||
csharp_accessor_owner_body = expression_body
|
||||
csharp_force_attribute_style = join
|
||||
csharp_indent_nested_usings_stmt = true
|
||||
|
||||
csharp_builtin_type_reference_for_member_access_style = use_keyword
|
||||
csharp_indent_nested_fixed_stmt = true
|
||||
csharp_indent_nested_lock_stmt = true
|
||||
csharp_indent_nested_for_stmt = true
|
||||
csharp_indent_nested_foreach_stmt = true
|
||||
csharp_indent_nested_while_stmt = true
|
||||
csharp_use_continuous_indent_inside_parens = true
|
||||
csharp_indent_method_decl_pars = inside
|
||||
csharp_indent_invocation_pars = inside
|
||||
csharp_indent_statement_pars = inside
|
||||
csharp_indent_typeparam_angles = inside
|
||||
csharp_indent_typearg_angles = inside
|
||||
csharp_indent_pars = inside
|
||||
csharp_indent_preprocessor_if = outdent
|
||||
csharp_indent_preprocessor_region = usual_indent
|
||||
csharp_indent_preprocessor_other = usual_indent
|
||||
csharp_indent_switch_labels = true
|
||||
csharp_indent_type_constraints = true
|
||||
csharp_stick_comment = false
|
||||
csharp_alignment_tab_fill_style = use_spaces
|
||||
csharp_align_multiline_parameter = true
|
||||
csharp_align_multiline_extends_list = true
|
||||
csharp_align_linq_query = true
|
||||
csharp_align_multiline_binary_expressions_chain = true
|
||||
csharp_outdent_binary_ops = true
|
||||
csharp_align_multiline_calls_chain = true
|
||||
csharp_outdent_dots = true
|
||||
csharp_align_multiline_array_and_object_initializer = false
|
||||
csharp_indent_anonymous_method_block = false
|
||||
csharp_align_first_arg_by_paren = true
|
||||
csharp_align_multiline_argument = true
|
||||
csharp_align_tuple_components = true
|
||||
csharp_align_multiline_expression = true
|
||||
csharp_align_multiline_for_stmt = true
|
||||
csharp_align_multiple_declaration = true
|
||||
csharp_align_multline_type_parameter_list = true
|
||||
csharp_align_multline_type_parameter_constrains = true
|
||||
csharp_int_align_fields = true
|
||||
csharp_int_align_properties = true
|
||||
csharp_int_align_methods = true
|
||||
csharp_int_align_parameters = false
|
||||
csharp_int_align_variables = true
|
||||
csharp_int_align_assignments = true
|
||||
csharp_int_align_nested_ternary = true
|
||||
csharp_int_align_invocations = false
|
||||
csharp_int_align_binary_expressions = true
|
||||
csharp_int_align_comments = true
|
||||
csharp_int_align_switch_sections = true
|
||||
csharp_int_align = true
|
||||
csharp_keep_user_linebreaks = false
|
||||
csharp_keep_existing_arrangement = false
|
||||
csharp_keep_existing_linebreaks = false
|
||||
csharp_max_line_length = 120
|
||||
csharp_wrap_before_comma = false
|
||||
csharp_special_else_if_treatment = true
|
||||
csharp_insert_final_newline = false
|
||||
csharp_place_type_attribute_on_same_line = never
|
||||
csharp_place_method_attribute_on_same_line = never
|
||||
csharp_place_accessorholder_attribute_on_same_line = never
|
||||
csharp_place_attribute_on_same_line = never
|
||||
csharp_place_accessor_attribute_on_same_line = never
|
||||
csharp_place_attribute_on_same_line = never
|
||||
csharp_place_field_attribute_on_same_line = never
|
||||
csharp_place_attribute_on_same_line = never
|
||||
csharp_wrap_parameters_style = wrap_if_long
|
||||
csharp_keep_existing_declaration_parens_arrangement = false
|
||||
csharp_wrap_before_declaration_lpar = false
|
||||
csharp_wrap_after_declaration_lpar = false
|
||||
csharp_wrap_before_declaration_rpar = false
|
||||
csharp_place_constructor_initializer_on_same_line = true
|
||||
csharp_keep_existing_expr_member_arrangement = false
|
||||
csharp_place_expr_method_on_single_line = true
|
||||
csharp_place_expr_property_on_single_line = true
|
||||
csharp_place_expr_accessor_on_single_line = true
|
||||
csharp_wrap_before_arrow_with_expressions = false
|
||||
csharp_place_type_constraints_on_same_line = true
|
||||
csharp_wrap_before_first_type_parameter_constraint = true
|
||||
csharp_wrap_multiple_type_parameter_constraints_style = wrap_if_long
|
||||
csharp_wrap_before_type_parameter_langle = true
|
||||
csharp_wrap_before_extends_colon = false
|
||||
csharp_wrap_extends_list_style = wrap_if_long
|
||||
csharp_keep_existing_declaration_block_arrangement = false
|
||||
csharp_place_abstract_accessorholder_on_single_line = true
|
||||
csharp_place_simple_accessorholder_on_single_line = false
|
||||
csharp_place_accessor_with_attrs_holder_on_single_line = false
|
||||
csharp_place_simple_accessor_on_single_line = true
|
||||
csharp_place_simple_method_on_single_line = false
|
||||
csharp_keep_existing_enum_arrangement = false
|
||||
csharp_place_simple_enum_on_single_line = false
|
||||
csharp_wrap_enum_declaration = wrap_if_long
|
||||
csharp_new_line_before_else = true
|
||||
csharp_new_line_before_while = false
|
||||
csharp_wrap_for_stmt_header_style = wrap_if_long
|
||||
csharp_wrap_multiple_declaration_style = wrap_if_long
|
||||
csharp_keep_existing_embedded_arrangement = false
|
||||
csharp_place_simple_embedded_statement_on_same_line = false
|
||||
csharp_place_simple_case_statement_on_same_line = true
|
||||
csharp_keep_existing_embedded_block_arrangement = false
|
||||
csharp_place_simple_embedded_block_on_same_line = false
|
||||
csharp_place_simple_anonymousmethod_on_single_line = false
|
||||
csharp_keep_existing_initializer_arrangement = false
|
||||
csharp_place_simple_initializer_on_single_line = false
|
||||
csharp_wrap_object_and_collection_initializer_style = chop_always
|
||||
csharp_wrap_array_initializer_style = wrap_if_long
|
||||
csharp_wrap_arguments_style = wrap_if_long
|
||||
csharp_keep_existing_invocation_parens_arrangement = false
|
||||
csharp_wrap_after_invocation_lpar = false
|
||||
csharp_wrap_before_invocation_rpar = false
|
||||
csharp_wrap_after_dot_in_method_calls = true
|
||||
csharp_wrap_chained_method_calls = wrap_if_long
|
||||
csharp_wrap_before_binary_opsign = false
|
||||
csharp_wrap_chained_binary_expressions = wrap_if_long
|
||||
csharp_force_chop_compound_if_expression = true
|
||||
csharp_force_chop_compound_while_expression = true
|
||||
csharp_force_chop_compound_do_expression = true
|
||||
csharp_wrap_before_ternary_opsigns = true
|
||||
csharp_wrap_ternary_expr_style = wrap_if_long
|
||||
csharp_nested_ternary_style = expanded
|
||||
csharp_wrap_linq_expressions = wrap_if_long
|
||||
csharp_wrap_before_linq_expression = false
|
||||
csharp_place_linq_into_on_new_line = false
|
||||
csharp_wrap_verbatim_interpolated_strings = wrap_if_long
|
||||
csharp_extra_spaces = remove_all
|
||||
csharp_space_after_keywords_in_control_flow_statements = false
|
||||
csharp_space_between_method_call_name_and_opening_parenthesis = false
|
||||
csharp_space_between_method_declaration_name_and_open_parenthesis = false
|
||||
csharp_space_before_typeof_parentheses = false
|
||||
csharp_space_before_checked_parentheses = false
|
||||
csharp_space_before_sizeof_parentheses = false
|
||||
csharp_space_before_nameof_parentheses = false
|
||||
csharp_space_between_keyword_and_expression = true
|
||||
csharp_space_between_keyword_and_type = true
|
||||
csharp_space_around_assignment_op = true
|
||||
csharp_space_around_logical_op = true
|
||||
csharp_space_around_binary_operator = true
|
||||
csharp_space_around_equality_op = true
|
||||
csharp_space_around_relational_op = true
|
||||
csharp_space_around_bitwise_op = true
|
||||
csharp_space_around_additive_op = true
|
||||
csharp_space_around_multiplicative_op = true
|
||||
csharp_space_around_shift_op = true
|
||||
csharp_space_around_nullcoalescing_op = true
|
||||
csharp_space_around_arrow_op = false
|
||||
csharp_space_after_logical_not_op = false
|
||||
csharp_space_after_unary_operator = false
|
||||
csharp_space_after_cast = false
|
||||
csharp_space_around_dot = false
|
||||
csharp_space_around_lambda_arrow = true
|
||||
csharp_space_before_pointer_asterik_declaration = false
|
||||
csharp_space_before_nullable_mark = false
|
||||
|
||||
[*.cshtml]
|
||||
linebreaks_around_razor_statements = true
|
||||
blank_lines_around_razor_functions = true
|
||||
blank_lines_around_razor_helpers = true
|
||||
blank_lines_around_razor_sections = true
|
||||
|
||||
# C++
|
||||
[*.{cc,cpp,cxx,h,hpp,hxx}]
|
||||
cpp_indent_access_specifiers_from_class = true
|
||||
cpp_indent_wrapped_function_names = false
|
||||
cpp_align_multiline_type_argument = true
|
||||
|
||||
# C, C++ and ObjectiveC
|
||||
[*.{c,h,cc,cpp,cxx,m,hpp,hxx}]
|
||||
indent_preprocessor_directives = normal
|
||||
indent_type_constraints = true
|
||||
|
||||
# Javascript and Typescript
|
||||
[*.{js,js.map,ts}]
|
||||
quote_style = doublequoted
|
||||
termination_style = ensure_semicolon
|
||||
[*.{appxmanifest,asax,ascx,aspx,axaml,build,cg,cginc,compute,cs,cshtml,dtd,fs,fsi,fsscript,fsx,hlsl,hlsli,hlslinc,master,ml,mli,nuspec,paml,razor,resw,resx,shader,skin,usf,ush,vb,xaml,xamlx,xoml,xsd}]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
tab_width = 4
|
||||
|
||||
219
ATA/Identify.cs
219
ATA/Identify.cs
@@ -30,13 +30,13 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.ATA;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Aaru.CommonTypes.Structs.Devices.SCSI;
|
||||
|
||||
namespace Aaru.Decoders.ATA;
|
||||
|
||||
// Information from following standards:
|
||||
// T10-791D rev. 4c (ATA)
|
||||
// T10-948D rev. 4c (ATA-2)
|
||||
@@ -71,8 +71,8 @@ public static class Identify
|
||||
|
||||
var sb = new StringBuilder();
|
||||
|
||||
bool atapi = false;
|
||||
bool cfa = false;
|
||||
var atapi = false;
|
||||
var cfa = false;
|
||||
|
||||
CommonTypes.Structs.Devices.ATA.Identify.IdentifyDevice ATAID = IdentifyDeviceResponse.Value;
|
||||
|
||||
@@ -105,8 +105,7 @@ public static class Identify
|
||||
if(ATAID.CommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.MustBeSet) &&
|
||||
!ATAID.CommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.MustBeClear))
|
||||
{
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.
|
||||
MediaSerial))
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.MediaSerial))
|
||||
{
|
||||
if(ATAID.MediaManufacturer != "")
|
||||
sb.AppendFormat("Media manufacturer: {0}", ATAID.MediaManufacturer).AppendLine();
|
||||
@@ -169,8 +168,8 @@ public static class Identify
|
||||
acs4 |= ATAID.MajorVersion.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.MajorVersionBit.ACS4);
|
||||
}
|
||||
|
||||
int maxatalevel = 0;
|
||||
int minatalevel = 255;
|
||||
var maxatalevel = 0;
|
||||
var minatalevel = 255;
|
||||
sb.Append("Supported ATA versions: ");
|
||||
|
||||
if(ata1)
|
||||
@@ -654,8 +653,8 @@ public static class Identify
|
||||
|
||||
break;
|
||||
default:
|
||||
sb.AppendFormat("Unknown ATAPI packet size code {0}",
|
||||
(ushort)ATAID.GeneralConfiguration & 0x03).AppendLine();
|
||||
sb.AppendFormat("Unknown ATAPI packet size code {0}", (ushort)ATAID.GeneralConfiguration & 0x03).
|
||||
AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -663,8 +662,8 @@ public static class Identify
|
||||
else if(!cfa)
|
||||
{
|
||||
if(minatalevel >= 5)
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
GeneralConfigurationBit.IncompleteResponse))
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
IncompleteResponse))
|
||||
sb.AppendLine("Incomplete identify response");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
@@ -676,58 +675,58 @@ public static class Identify
|
||||
sb.AppendLine("Device is removable");
|
||||
|
||||
if(minatalevel <= 5)
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
GeneralConfigurationBit.Fixed))
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
Fixed))
|
||||
sb.AppendLine("Device is fixed");
|
||||
|
||||
if(ata1)
|
||||
{
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
GeneralConfigurationBit.SlowIDE))
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
SlowIDE))
|
||||
sb.AppendLine("Device transfer rate is <= 5 Mb/s");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
GeneralConfigurationBit.FastIDE))
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
FastIDE))
|
||||
sb.AppendLine("Device transfer rate is > 5 Mb/s but <= 10 Mb/s");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
GeneralConfigurationBit.UltraFastIDE))
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
UltraFastIDE))
|
||||
sb.AppendLine("Device transfer rate is > 10 Mb/s");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
GeneralConfigurationBit.SoftSector))
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
SoftSector))
|
||||
sb.AppendLine("Device is soft sectored");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
GeneralConfigurationBit.HardSector))
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
HardSector))
|
||||
sb.AppendLine("Device is hard sectored");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
GeneralConfigurationBit.NotMFM))
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
NotMFM))
|
||||
sb.AppendLine("Device is not MFM encoded");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
GeneralConfigurationBit.FormatGapReq))
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
FormatGapReq))
|
||||
sb.AppendLine("Format speed tolerance gap is required");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
GeneralConfigurationBit.TrackOffset))
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
TrackOffset))
|
||||
sb.AppendLine("Track offset option is available");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
GeneralConfigurationBit.DataStrobeOffset))
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
DataStrobeOffset))
|
||||
sb.AppendLine("Data strobe offset option is available");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
GeneralConfigurationBit.RotationalSpeedTolerance))
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
RotationalSpeedTolerance))
|
||||
sb.AppendLine("Rotational speed tolerance is higher than 0,5%");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
GeneralConfigurationBit.SpindleControl))
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
SpindleControl))
|
||||
sb.AppendLine("Spindle motor control is implemented");
|
||||
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
GeneralConfigurationBit.HighHeadSwitch))
|
||||
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
||||
HighHeadSwitch))
|
||||
sb.AppendLine("Head switch time is bigger than 15 µs.");
|
||||
}
|
||||
}
|
||||
@@ -818,7 +817,7 @@ public static class Identify
|
||||
(ulong)ATAID.CurrentSectors * 512 / 1024 / 1024).AppendLine();
|
||||
else
|
||||
{
|
||||
ulong currentSectors = (ulong)(ATAID.Cylinders * ATAID.Heads * ATAID.SectorsPerTrack);
|
||||
var currentSectors = (ulong)(ATAID.Cylinders * ATAID.Heads * ATAID.SectorsPerTrack);
|
||||
|
||||
sb.AppendFormat("Device size in CHS mode: {0} bytes, {1} Mb, {2} MiB",
|
||||
currentSectors * logicalSectorSize,
|
||||
@@ -899,8 +898,7 @@ public static class Identify
|
||||
(ushort)ATAID.SpecificConfiguration != 0xFFFF)
|
||||
switch(ATAID.SpecificConfiguration)
|
||||
{
|
||||
case CommonTypes.Structs.Devices.ATA.Identify.SpecificConfigurationEnum.
|
||||
RequiresSetIncompleteResponse:
|
||||
case CommonTypes.Structs.Devices.ATA.Identify.SpecificConfigurationEnum.RequiresSetIncompleteResponse:
|
||||
sb.AppendLine("Device requires SET FEATURES to spin up and IDENTIFY DEVICE response is incomplete.");
|
||||
|
||||
break;
|
||||
@@ -913,8 +911,7 @@ public static class Identify
|
||||
sb.AppendLine("Device does not require SET FEATURES to spin up and IDENTIFY DEVICE response is incomplete.");
|
||||
|
||||
break;
|
||||
case CommonTypes.Structs.Devices.ATA.Identify.SpecificConfigurationEnum.
|
||||
NotRequiresSetCompleteResponse:
|
||||
case CommonTypes.Structs.Devices.ATA.Identify.SpecificConfigurationEnum.NotRequiresSetCompleteResponse:
|
||||
sb.AppendLine("Device does not require SET FEATURES to spin up and IDENTIFY DEVICE response is complete.");
|
||||
|
||||
break;
|
||||
@@ -962,8 +959,7 @@ public static class Identify
|
||||
|
||||
sb.Append("Device capabilities:");
|
||||
|
||||
if(ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.
|
||||
StandardStandbyTimer))
|
||||
if(ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.StandardStandbyTimer))
|
||||
sb.AppendLine().Append("Standby time values are standard");
|
||||
|
||||
if(ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.IORDY))
|
||||
@@ -989,15 +985,12 @@ public static class Identify
|
||||
AppendFormat("A maximum of {0} sectors can be transferred per interrupt on READ/WRITE MULTIPLE",
|
||||
ATAID.MultipleSectorNumber);
|
||||
|
||||
sb.AppendLine().AppendFormat("Device supports setting a maximum of {0} sectors",
|
||||
ATAID.MultipleMaxSectors);
|
||||
sb.AppendLine().AppendFormat("Device supports setting a maximum of {0} sectors", ATAID.MultipleMaxSectors);
|
||||
}
|
||||
|
||||
if(ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.
|
||||
PhysicalAlignment1) ||
|
||||
if(ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.PhysicalAlignment1) ||
|
||||
ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.PhysicalAlignment0))
|
||||
sb.AppendLine().AppendFormat("Long Physical Alignment setting is {0}",
|
||||
(ushort)ATAID.Capabilities & 0x03);
|
||||
sb.AppendLine().AppendFormat("Long Physical Alignment setting is {0}", (ushort)ATAID.Capabilities & 0x03);
|
||||
|
||||
if(ata1)
|
||||
if(ATAID.TrustedComputing.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TrustedComputingBit.
|
||||
@@ -1012,8 +1005,7 @@ public static class Identify
|
||||
if(ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.CommandQueue))
|
||||
sb.AppendLine().Append("ATAPI device supports command queueing");
|
||||
|
||||
if(ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.
|
||||
OverlapOperation))
|
||||
if(ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.OverlapOperation))
|
||||
sb.AppendLine().Append("ATAPI device supports overlapped operations");
|
||||
|
||||
if(ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.
|
||||
@@ -1332,30 +1324,29 @@ public static class Identify
|
||||
}
|
||||
}
|
||||
|
||||
if(!ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit2.
|
||||
Clear))
|
||||
if(!ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit2.Clear))
|
||||
{
|
||||
if(!ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.
|
||||
Clear) &&
|
||||
ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.NCQ))
|
||||
{
|
||||
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
SATACapabilitiesBit2.NCQMgmt))
|
||||
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit2.
|
||||
NCQMgmt))
|
||||
sb.AppendLine().Append("NCQ queue management is supported");
|
||||
|
||||
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
SATACapabilitiesBit2.NCQStream))
|
||||
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit2.
|
||||
NCQStream))
|
||||
sb.AppendLine().Append("NCQ streaming is supported");
|
||||
}
|
||||
|
||||
if(atapi)
|
||||
{
|
||||
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
SATACapabilitiesBit2.HostEnvDetect))
|
||||
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit2.
|
||||
HostEnvDetect))
|
||||
sb.AppendLine().Append("ATAPI device supports host environment detection");
|
||||
|
||||
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
SATACapabilitiesBit2.DevAttSlimline))
|
||||
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit2.
|
||||
DevAttSlimline))
|
||||
sb.AppendLine().Append("ATAPI device supports attention on slimline connected devices");
|
||||
}
|
||||
|
||||
@@ -1506,8 +1497,7 @@ public static class Identify
|
||||
{
|
||||
sb.AppendLine().Append("Power management is supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.
|
||||
PowerManagement))
|
||||
if(ATAID.EnabledCommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.PowerManagement))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1515,8 +1505,7 @@ public static class Identify
|
||||
{
|
||||
sb.AppendLine().Append("Removable media feature set is supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.
|
||||
RemovableMedia))
|
||||
if(ATAID.EnabledCommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.RemovableMedia))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1546,8 +1535,7 @@ public static class Identify
|
||||
{
|
||||
sb.AppendLine().Append("FLUSH CACHE is supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.
|
||||
FlushCache))
|
||||
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.FlushCache))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1595,8 +1583,7 @@ public static class Identify
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.
|
||||
SetFeaturesRequired))
|
||||
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.SetFeaturesRequired))
|
||||
sb.AppendLine().Append("SET FEATURES is required before spin-up");
|
||||
|
||||
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.PowerUpInStandby))
|
||||
@@ -1608,8 +1595,7 @@ public static class Identify
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.
|
||||
RemovableNotification))
|
||||
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.RemovableNotification))
|
||||
{
|
||||
sb.AppendLine().Append("Removable Media Status Notification is supported");
|
||||
|
||||
@@ -1662,8 +1648,7 @@ public static class Identify
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
if(ATAID.SCTCommandTransport.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SCTCommandTransportBit.
|
||||
Supported))
|
||||
if(ATAID.SCTCommandTransport.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SCTCommandTransportBit.Supported))
|
||||
sb.AppendLine().Append("S.M.A.R.T. Command Transport is supported");
|
||||
|
||||
if(ATAID.CommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.MustBeSet) &&
|
||||
@@ -1682,8 +1667,7 @@ public static class Identify
|
||||
{
|
||||
sb.AppendLine().Append("S.M.A.R.T. error logging is supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.
|
||||
SMARTLog))
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.SMARTLog))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1709,8 +1693,7 @@ public static class Identify
|
||||
{
|
||||
sb.AppendLine().Append("WRITE DMA QUEUED FUA EXT is supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.
|
||||
FUAWriteQ))
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.FUAWriteQ))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1718,8 +1701,7 @@ public static class Identify
|
||||
{
|
||||
sb.AppendLine().Append("WRITE DMA FUA EXT and WRITE MULTIPLE FUA EXT are supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.
|
||||
FUAWrite))
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.FUAWrite))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1735,8 +1717,7 @@ public static class Identify
|
||||
{
|
||||
sb.AppendLine().Append("Streaming feature set is supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.
|
||||
Streaming))
|
||||
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.Streaming))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1827,8 +1808,7 @@ public static class Identify
|
||||
{
|
||||
sb.AppendLine().Append("WRITE UNCORRECTABLE is supported");
|
||||
|
||||
if(ATAID.EnabledCommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.
|
||||
WriteUnc))
|
||||
if(ATAID.EnabledCommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.WriteUnc))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -1865,8 +1845,7 @@ public static class Identify
|
||||
sb.AppendLine().Append("CRYPTO SCRAMBLE EXT is supported");
|
||||
|
||||
if(ATAID.CommandSet5.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit5.DeviceConfDMA))
|
||||
sb.AppendLine().
|
||||
Append("DEVICE CONFIGURATION IDENTIFY DMA and DEVICE CONFIGURATION SET DMA are supported");
|
||||
sb.AppendLine().Append("DEVICE CONFIGURATION IDENTIFY DMA and DEVICE CONFIGURATION SET DMA are supported");
|
||||
|
||||
if(ATAID.CommandSet5.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit5.ReadBufferDMA))
|
||||
sb.AppendLine().Append("READ BUFFER DMA is supported");
|
||||
@@ -1897,8 +1876,7 @@ public static class Identify
|
||||
sb.AppendLine().Append("Read after TRIM returns empty data");
|
||||
}
|
||||
|
||||
if(ATAID.CommandSet5.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit5.
|
||||
LongPhysSectorAligError))
|
||||
if(ATAID.CommandSet5.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit5.LongPhysSectorAligError))
|
||||
sb.AppendLine().Append("Device supports Long Physical Sector Alignment Error Reporting Control");
|
||||
|
||||
if(ATAID.CommandSet5.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit5.Encrypted))
|
||||
@@ -1928,9 +1906,8 @@ public static class Identify
|
||||
|
||||
if(!ata1 &&
|
||||
maxatalevel >= 8)
|
||||
if(ATAID.TrustedComputing.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TrustedComputingBit.Set) &&
|
||||
!ATAID.TrustedComputing.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TrustedComputingBit.
|
||||
Clear) &&
|
||||
if(ATAID.TrustedComputing.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TrustedComputingBit.Set) &&
|
||||
!ATAID.TrustedComputing.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TrustedComputingBit.Clear) &&
|
||||
ATAID.TrustedComputing.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TrustedComputingBit.
|
||||
TrustedComputing))
|
||||
sb.AppendLine().Append("Trusted Computing feature set is supported");
|
||||
@@ -1943,8 +1920,7 @@ public static class Identify
|
||||
ReadLogDMAExt))
|
||||
sb.AppendLine().Append("READ LOG DMA EXT is supported");
|
||||
|
||||
if(!ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit2.
|
||||
Clear))
|
||||
if(!ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit2.Clear))
|
||||
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit2.
|
||||
FPDMAQ))
|
||||
sb.AppendLine().Append("RECEIVE FPDMA QUEUED and SEND FPDMA QUEUED are supported");
|
||||
@@ -1970,8 +1946,7 @@ public static class Identify
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
if(ATAID.SATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.
|
||||
InitPowerMgmt))
|
||||
if(ATAID.SATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.InitPowerMgmt))
|
||||
{
|
||||
sb.AppendLine().Append("Device-initiated power management is supported");
|
||||
|
||||
@@ -1995,8 +1970,8 @@ public static class Identify
|
||||
{
|
||||
sb.AppendLine().Append("Hardware Feature Control is supported");
|
||||
|
||||
if(ATAID.EnabledSATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
SATAFeaturesBit.HardwareFeatureControl))
|
||||
if(ATAID.EnabledSATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.
|
||||
HardwareFeatureControl))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -2006,8 +1981,8 @@ public static class Identify
|
||||
{
|
||||
sb.AppendLine().Append("Asynchronous notification is supported");
|
||||
|
||||
if(ATAID.EnabledSATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
SATAFeaturesBit.AsyncNotification))
|
||||
if(ATAID.EnabledSATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.
|
||||
AsyncNotification))
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
@@ -2021,8 +1996,7 @@ public static class Identify
|
||||
sb.Append(" and enabled");
|
||||
}
|
||||
|
||||
if(ATAID.SATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.
|
||||
NCQAutoSense))
|
||||
if(ATAID.SATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.NCQAutoSense))
|
||||
sb.AppendLine().Append("NCQ Autosense is supported");
|
||||
|
||||
if(ATAID.EnabledSATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.
|
||||
@@ -2055,21 +2029,21 @@ public static class Identify
|
||||
{
|
||||
sb.AppendLine("Security is enabled");
|
||||
|
||||
sb.AppendLine(ATAID.SecurityStatus.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
SecurityStatusBit.Locked)
|
||||
? "Security is locked" : "Security is not locked");
|
||||
sb.AppendLine(ATAID.SecurityStatus.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SecurityStatusBit.
|
||||
Locked) ? "Security is locked"
|
||||
: "Security is not locked");
|
||||
|
||||
sb.AppendLine(ATAID.SecurityStatus.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
SecurityStatusBit.Frozen)
|
||||
? "Security is frozen" : "Security is not frozen");
|
||||
sb.AppendLine(ATAID.SecurityStatus.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SecurityStatusBit.
|
||||
Frozen) ? "Security is frozen"
|
||||
: "Security is not frozen");
|
||||
|
||||
sb.AppendLine(ATAID.SecurityStatus.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
SecurityStatusBit.Expired)
|
||||
? "Security count has expired" : "Security count has not expired");
|
||||
sb.AppendLine(ATAID.SecurityStatus.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SecurityStatusBit.
|
||||
Expired) ? "Security count has expired"
|
||||
: "Security count has not expired");
|
||||
|
||||
sb.AppendLine(ATAID.SecurityStatus.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
||||
SecurityStatusBit.Maximum)
|
||||
? "Security level is maximum" : "Security level is high");
|
||||
sb.AppendLine(ATAID.SecurityStatus.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SecurityStatusBit.
|
||||
Maximum) ? "Security level is maximum"
|
||||
: "Security level is high");
|
||||
}
|
||||
else
|
||||
sb.AppendLine("Security is not enabled");
|
||||
@@ -2080,8 +2054,8 @@ public static class Identify
|
||||
sb.AppendFormat("{0} minutes to complete secure erase", ATAID.SecurityEraseTime * 2).AppendLine();
|
||||
|
||||
if(ATAID.SecurityStatus.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SecurityStatusBit.Enhanced))
|
||||
sb.AppendFormat("{0} minutes to complete enhanced secure erase",
|
||||
ATAID.EnhancedSecurityEraseTime * 2).AppendLine();
|
||||
sb.AppendFormat("{0} minutes to complete enhanced secure erase", ATAID.EnhancedSecurityEraseTime * 2).
|
||||
AppendLine();
|
||||
|
||||
sb.AppendFormat("Master password revision code: {0}", ATAID.MasterPasswordRevisionCode).AppendLine();
|
||||
}
|
||||
@@ -2098,8 +2072,7 @@ public static class Identify
|
||||
sb.AppendFormat("Streaming performance granularity is {0}", ATAID.StreamPerformanceGranularity);
|
||||
}
|
||||
|
||||
if(ATAID.SCTCommandTransport.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SCTCommandTransportBit.
|
||||
Supported))
|
||||
if(ATAID.SCTCommandTransport.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SCTCommandTransportBit.Supported))
|
||||
{
|
||||
sb.AppendLine().AppendLine("S.M.A.R.T. Command Transport (SCT):");
|
||||
|
||||
@@ -2184,17 +2157,17 @@ public static class Identify
|
||||
ATAID.ReservedWord116 != 0xFFFF)
|
||||
sb.AppendFormat("Word 116: 0x{0:X4}", ATAID.ReservedWord116).AppendLine();
|
||||
|
||||
for(int i = 0; i < ATAID.ReservedWords121.Length; i++)
|
||||
for(var i = 0; i < ATAID.ReservedWords121.Length; i++)
|
||||
if(ATAID.ReservedWords121[i] != 0x0000 &&
|
||||
ATAID.ReservedWords121[i] != 0xFFFF)
|
||||
sb.AppendFormat("Word {1}: 0x{0:X4}", ATAID.ReservedWords121[i], 121 + i).AppendLine();
|
||||
|
||||
for(int i = 0; i < ATAID.ReservedWords129.Length; i++)
|
||||
for(var i = 0; i < ATAID.ReservedWords129.Length; i++)
|
||||
if(ATAID.ReservedWords129[i] != 0x0000 &&
|
||||
ATAID.ReservedWords129[i] != 0xFFFF)
|
||||
sb.AppendFormat("Word {1}: 0x{0:X4}", ATAID.ReservedWords129[i], 129 + i).AppendLine();
|
||||
|
||||
for(int i = 0; i < ATAID.ReservedCFA.Length; i++)
|
||||
for(var i = 0; i < ATAID.ReservedCFA.Length; i++)
|
||||
if(ATAID.ReservedCFA[i] != 0x0000 &&
|
||||
ATAID.ReservedCFA[i] != 0xFFFF)
|
||||
sb.AppendFormat("Word {1} (CFA): 0x{0:X4}", ATAID.ReservedCFA[i], 161 + i).AppendLine();
|
||||
@@ -2227,12 +2200,12 @@ public static class Identify
|
||||
ATAID.ReservedWord221 != 0xFFFF)
|
||||
sb.AppendFormat("Word 221: 0x{0:X4}", ATAID.ReservedWord221).AppendLine();
|
||||
|
||||
for(int i = 0; i < ATAID.ReservedCEATA224.Length; i++)
|
||||
for(var i = 0; i < ATAID.ReservedCEATA224.Length; i++)
|
||||
if(ATAID.ReservedCEATA224[i] != 0x0000 &&
|
||||
ATAID.ReservedCEATA224[i] != 0xFFFF)
|
||||
sb.AppendFormat("Word {1} (CE-ATA): 0x{0:X4}", ATAID.ReservedCEATA224[i], 224 + i).AppendLine();
|
||||
|
||||
for(int i = 0; i < ATAID.ReservedWords.Length; i++)
|
||||
for(var i = 0; i < ATAID.ReservedWords.Length; i++)
|
||||
if(ATAID.ReservedWords[i] != 0x0000 &&
|
||||
ATAID.ReservedWords[i] != 0xFFFF)
|
||||
sb.AppendFormat("Word {1}: 0x{0:X4}", ATAID.ReservedWords[i], 236 + i).AppendLine();
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Aaru.Decoders.ATA;
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
|
||||
public struct AtaRegistersChs
|
||||
{
|
||||
|
||||
@@ -1,244 +1,242 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{0BEB3088-B634-4289-AE17-CDF2D25D00D5}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Aaru.Decoders</RootNamespace>
|
||||
<AssemblyName>Aaru.Decoders</AssemblyName>
|
||||
<ReleaseVersion>$(Version)</ReleaseVersion>
|
||||
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
|
||||
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
||||
<Version>6.0.0-alpha8</Version>
|
||||
<Company>Claunia.com</Company>
|
||||
<Copyright>Copyright © 2011-2022 Natalia Portillo</Copyright>
|
||||
<Product>Aaru Data Preservation Suite</Product>
|
||||
<Title>Aaru.Decoders</Title>
|
||||
<ApplicationVersion>$(Version)</ApplicationVersion>
|
||||
<TargetFramework>net6</TargetFramework>
|
||||
<LangVersion>10</LangVersion>
|
||||
<Description>Binary structure decoders used by the Aaru Data Preservation Suite.</Description>
|
||||
<PackageProjectUrl>https://github.com/aaru-dps/</PackageProjectUrl>
|
||||
<PackageLicenseExpression>LGPL-2.1-only</PackageLicenseExpression>
|
||||
<RepositoryUrl>https://github.com/aaru-dps/Aaru</RepositoryUrl>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<NeutralLanguage>en-US</NeutralLanguage>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||
<Authors>Natalia Portillo <claunia@claunia.com></Authors>
|
||||
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<NrtRevisionFormat>$(Version)+{chash:8}</NrtRevisionFormat>
|
||||
<NrtResolveSimpleAttributes>true</NrtResolveSimpleAttributes>
|
||||
<NrtShowRevision>true</NrtShowRevision>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\net6</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\net6</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Bluray\BCA.cs" />
|
||||
<Compile Include="Bluray\Cartridge.cs" />
|
||||
<Compile Include="Bluray\DDS.cs" />
|
||||
<Compile Include="Bluray\DI.cs" />
|
||||
<Compile Include="Bluray\Spare.cs" />
|
||||
<Compile Include="CD\SectorBuilder.cs" />
|
||||
<Compile Include="CD\Subchannel.cs" />
|
||||
<Compile Include="SCSI\Inquiry.cs" />
|
||||
<Compile Include="Floppy\Enums.cs" />
|
||||
<Compile Include="Floppy\System3740.cs" />
|
||||
<Compile Include="Floppy\System34.cs" />
|
||||
<Compile Include="Floppy\Perpendicular.cs" />
|
||||
<Compile Include="Floppy\ISO.cs" />
|
||||
<Compile Include="Floppy\Apple2.cs" />
|
||||
<Compile Include="Floppy\AppleSony.cs" />
|
||||
<Compile Include="Floppy\Commodore.cs" />
|
||||
<Compile Include="Floppy\Amiga.cs" />
|
||||
<Compile Include="DVD\Enums.cs" />
|
||||
<Compile Include="DVD\PFI.cs" />
|
||||
<Compile Include="DVD\DMI.cs" />
|
||||
<Compile Include="DVD\BCA.cs" />
|
||||
<Compile Include="DVD\DDS.cs" />
|
||||
<Compile Include="DVD\RMD.cs" />
|
||||
<Compile Include="DVD\Spare.cs" />
|
||||
<Compile Include="DVD\PRI.cs" />
|
||||
<Compile Include="DVD\UDI.cs" />
|
||||
<Compile Include="DVD\ADIP.cs" />
|
||||
<Compile Include="DVD\Layers.cs" />
|
||||
<Compile Include="DVD\AACS.cs" />
|
||||
<Compile Include="DVD\CSS&CPRM.cs" />
|
||||
<Compile Include="DVD\CPRM.cs" />
|
||||
<Compile Include="DVD\Cartridge.cs" />
|
||||
<Compile Include="CD\TOC.cs" />
|
||||
<Compile Include="CD\Session.cs" />
|
||||
<Compile Include="CD\FullTOC.cs" />
|
||||
<Compile Include="CD\PMA.cs" />
|
||||
<Compile Include="CD\ATIP.cs" />
|
||||
<Compile Include="CD\Enums.cs" />
|
||||
<Compile Include="CD\CDTextOnLeadIn.cs" />
|
||||
<Compile Include="SCSI\MMC\AACS.cs" />
|
||||
<Compile Include="SCSI\MMC\CPRM.cs" />
|
||||
<Compile Include="SCSI\MMC\Enums.cs" />
|
||||
<Compile Include="SCSI\MMC\Hybrid.cs" />
|
||||
<Compile Include="SCSI\MMC\TrackInformation.cs" />
|
||||
<Compile Include="SCSI\MMC\WriteProtect.cs" />
|
||||
<Compile Include="SCSI\MMC\DiscInformation.cs" />
|
||||
<Compile Include="SCSI\Modes\00_SFF.cs" />
|
||||
<Compile Include="SCSI\Modes\01.cs" />
|
||||
<Compile Include="SCSI\Modes\01_MMC.cs" />
|
||||
<Compile Include="SCSI\Modes\02.cs" />
|
||||
<Compile Include="SCSI\Modes\03.cs" />
|
||||
<Compile Include="SCSI\Modes\04.cs" />
|
||||
<Compile Include="SCSI\Modes\05.cs" />
|
||||
<Compile Include="SCSI\Modes\06.cs" />
|
||||
<Compile Include="SCSI\Modes\07.cs" />
|
||||
<Compile Include="SCSI\Modes\07_MMC.cs" />
|
||||
<Compile Include="SCSI\Modes\08.cs" />
|
||||
<Compile Include="SCSI\Modes\0A.cs" />
|
||||
<Compile Include="SCSI\Modes\0B.cs" />
|
||||
<Compile Include="SCSI\Modes\0C.cs" />
|
||||
<Compile Include="SCSI\Modes\0D.cs" />
|
||||
<Compile Include="SCSI\Modes\0E.cs" />
|
||||
<Compile Include="SCSI\Modes\0F.cs" />
|
||||
<Compile Include="SCSI\Modes\10.cs" />
|
||||
<Compile Include="SCSI\Modes\10_SSC.cs" />
|
||||
<Compile Include="SCSI\Modes\11.cs" />
|
||||
<Compile Include="SCSI\Modes\12_13_14.cs" />
|
||||
<Compile Include="SCSI\Modes\1A.cs" />
|
||||
<Compile Include="SCSI\Modes\1B.cs" />
|
||||
<Compile Include="SCSI\Modes\1C.cs" />
|
||||
<Compile Include="SCSI\Modes\1C_SFF.cs" />
|
||||
<Compile Include="SCSI\Modes\1D.cs" />
|
||||
<Compile Include="SCSI\Modes\21_Certance.cs" />
|
||||
<Compile Include="SCSI\Modes\22_Certance.cs" />
|
||||
<Compile Include="SCSI\Modes\24_IBM.cs" />
|
||||
<Compile Include="SCSI\Modes\2A.cs" />
|
||||
<Compile Include="SCSI\Modes\2F_IBM.cs" />
|
||||
<Compile Include="SCSI\Modes\30_Apple.cs" />
|
||||
<Compile Include="SCSI\Modes\3B_HP.cs" />
|
||||
<Compile Include="SCSI\Modes\3C_HP.cs" />
|
||||
<Compile Include="SCSI\Modes\3D_HP.cs" />
|
||||
<Compile Include="SCSI\Modes\3D_IBM.cs" />
|
||||
<Compile Include="SCSI\Modes\3E_Fujitsu.cs" />
|
||||
<Compile Include="SCSI\Modes\3E_HP.cs" />
|
||||
<Compile Include="SCSI\Modes\Headers.cs" />
|
||||
<Compile Include="SCSI\Modes\Mode10.cs" />
|
||||
<Compile Include="SCSI\Modes\Mode6.cs" />
|
||||
<Compile Include="SCSI\Modes\Structs.cs" />
|
||||
<Compile Include="SCSI\VendorString.cs" />
|
||||
<Compile Include="ATA\Identify.cs" />
|
||||
<Compile Include="SCSI\EVPD.cs" />
|
||||
<Compile Include="SCSI\MMC\Features.cs" />
|
||||
<Compile Include="SCSI\DiscStructureCapabilities.cs" />
|
||||
<Compile Include="SCSI\Sense.cs" />
|
||||
<Compile Include="ATA\Registers.cs" />
|
||||
<Compile Include="Xbox\DMI.cs" />
|
||||
<Compile Include="SCSI\SSC\BlockLimits.cs" />
|
||||
<Compile Include="SCSI\SSC\DensitySupport.cs" />
|
||||
<Compile Include="SCSI\Types.cs" />
|
||||
<Compile Include="LisaTag.cs" />
|
||||
<Compile Include="CD\Sector.cs" />
|
||||
<Compile Include="PCMCIA\Enums.cs" />
|
||||
<Compile Include="PCMCIA\Types.cs" />
|
||||
<Compile Include="PCMCIA\CIS.cs" />
|
||||
<Compile Include="PCMCIA\VendorCode.cs" />
|
||||
<Compile Include="MMC\CSD.cs" />
|
||||
<Compile Include="MMC\CID.cs" />
|
||||
<Compile Include="MMC\ExtendedCSD.cs" />
|
||||
<Compile Include="MMC\OCR.cs" />
|
||||
<Compile Include="MMC\VendorString.cs" />
|
||||
<Compile Include="SecureDigital\CID.cs" />
|
||||
<Compile Include="SecureDigital\CSD.cs" />
|
||||
<Compile Include="SecureDigital\SCR.cs" />
|
||||
<Compile Include="SecureDigital\OCR.cs" />
|
||||
<Compile Include="SecureDigital\VendorString.cs" />
|
||||
<Compile Include="Xbox\SS.cs" />
|
||||
<Compile Include="Sega\CD.cs" />
|
||||
<Compile Include="Sega\Saturn.cs" />
|
||||
<Compile Include="Sega\Dreamcast.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Aaru.Checksums\Aaru.Checksums.csproj" />
|
||||
<ProjectReference Include="..\Aaru.CommonTypes\Aaru.CommonTypes.csproj" />
|
||||
<ProjectReference Include="..\Aaru.Helpers\Aaru.Helpers.csproj">
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Aaru.Console\Aaru.Console.csproj">
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Bluray" />
|
||||
<Folder Include="SCSI\" />
|
||||
<Folder Include="ATA\" />
|
||||
<Folder Include="DVD\" />
|
||||
<Folder Include="SCSI\MMC\" />
|
||||
<Folder Include="CD\" />
|
||||
<Folder Include="Floppy\" />
|
||||
<Folder Include="Xbox\" />
|
||||
<Folder Include="SCSI\SSC\" />
|
||||
<Folder Include="PCMCIA\" />
|
||||
<Folder Include="MMC\" />
|
||||
<Folder Include="SecureDigital\" />
|
||||
<Folder Include="Sega\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="..\LICENSE.LGPL">
|
||||
<Link>LICENSE.LGPL</Link>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="System.ComponentModel.Annotations" Version="6.0.0-preview.4.21253.7" />
|
||||
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.4.2" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<MonoDevelop>
|
||||
<Properties>
|
||||
<Policies>
|
||||
<DotNetNamingPolicy DirectoryNamespaceAssociation="PrefixedHierarchical" ResourceNamePolicy="MSBuild" />
|
||||
<StandardHeader IncludeInNewFiles="True" Text="/***************************************************************************
Aaru Data Preservation Suite
----------------------------------------------------------------------------
 
Filename : ${FileName}
Author(s) : ${AuthorName} <${AuthorEmail}>

Component : Component
 
--[ Description ] ----------------------------------------------------------
 
 Description
 
--[ License ] --------------------------------------------------------------
 
 This library is free software; you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as
 published by the Free Software Foundation; either version 2.1 of the
 License, or (at your option) any later version.

 This library is distributed in the hope that it will be useful, but
 WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General Public
 License along with this library; if not, see <http://www.gnu.org/licenses/>.

----------------------------------------------------------------------------
Copyright © 2011-${Year} ${CopyrightHolder}
****************************************************************************/" />
|
||||
<TextStylePolicy FileWidth="120" TabWidth="4" IndentWidth="4" RemoveTrailingWhitespace="True" NoTabsAfterNonTabs="False" EolMarker="Native" TabsToSpaces="True" scope="text/x-csharp" />
|
||||
<CSharpFormattingPolicy IndentBlock="True" IndentBraces="False" IndentSwitchSection="True" IndentSwitchCaseSection="True" LabelPositioning="OneLess" NewLinesForBracesInTypes="True" NewLinesForBracesInMethods="True" NewLinesForBracesInProperties="True" NewLinesForBracesInAccessors="True" NewLinesForBracesInAnonymousMethods="True" NewLinesForBracesInControlBlocks="True" NewLinesForBracesInAnonymousTypes="True" NewLinesForBracesInObjectCollectionArrayInitializers="True" NewLinesForBracesInLambdaExpressionBody="True" NewLineForElse="True" NewLineForCatch="True" NewLineForFinally="True" NewLineForMembersInObjectInit="True" NewLineForMembersInAnonymousTypes="True" NewLineForClausesInQuery="True" SpacingAfterMethodDeclarationName="False" SpaceWithinMethodDeclarationParenthesis="False" SpaceBetweenEmptyMethodDeclarationParentheses="False" SpaceAfterMethodCallName="False" SpaceWithinMethodCallParentheses="False" SpaceBetweenEmptyMethodCallParentheses="False" SpaceWithinExpressionParentheses="False" SpaceWithinCastParentheses="False" SpaceWithinOtherParentheses="False" SpaceAfterCast="False" SpacesIgnoreAroundVariableDeclaration="False" SpaceBeforeOpenSquareBracket="False" SpaceBetweenEmptySquareBrackets="False" SpaceWithinSquareBrackets="False" SpaceAfterColonInBaseTypeDeclaration="True" SpaceAfterComma="True" SpaceAfterDot="False" SpaceAfterSemicolonsInForStatement="True" SpaceBeforeColonInBaseTypeDeclaration="True" SpaceBeforeComma="False" SpaceBeforeDot="False" SpaceBeforeSemicolonsInForStatement="False" SpacingAroundBinaryOperator="Single" WrappingPreserveSingleLine="True" WrappingKeepStatementsOnSingleLine="True" SpaceAfterControlFlowStatementKeyword="False" scope="text/x-csharp" />
|
||||
</Policies>
|
||||
</Properties>
|
||||
</MonoDevelop>
|
||||
</ProjectExtensions>
|
||||
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4')) and '$(OS)' == 'Unix'">
|
||||
<!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
|
||||
<!-- have to teach MSBuild where the Mono copy of the reference asssemblies is -->
|
||||
<!-- Look in the standard install locations -->
|
||||
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
|
||||
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
|
||||
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>
|
||||
<!-- If we found Mono reference assemblies, then use them -->
|
||||
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net40'">$(BaseFrameworkPathOverrideForMono)/4.0-api</FrameworkPathOverride>
|
||||
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
|
||||
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
|
||||
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
|
||||
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
|
||||
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
|
||||
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
|
||||
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
|
||||
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
|
||||
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>
|
||||
<!-- Add the Facades directory. Not sure how else to do this. Necessary at least for .NET 4.5 -->
|
||||
<AssemblySearchPaths Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{0BEB3088-B634-4289-AE17-CDF2D25D00D5}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Aaru.Decoders</RootNamespace>
|
||||
<AssemblyName>Aaru.Decoders</AssemblyName>
|
||||
<ReleaseVersion>$(Version)</ReleaseVersion>
|
||||
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
|
||||
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
||||
<Version>6.0.0-alpha8</Version>
|
||||
<Company>Claunia.com</Company>
|
||||
<Copyright>Copyright © 2011-2022 Natalia Portillo</Copyright>
|
||||
<Product>Aaru Data Preservation Suite</Product>
|
||||
<Title>Aaru.Decoders</Title>
|
||||
<ApplicationVersion>$(Version)</ApplicationVersion>
|
||||
<TargetFramework>net6</TargetFramework>
|
||||
<LangVersion>10</LangVersion>
|
||||
<Description>Binary structure decoders used by the Aaru Data Preservation Suite.</Description>
|
||||
<PackageProjectUrl>https://github.com/aaru-dps/</PackageProjectUrl>
|
||||
<PackageLicenseExpression>LGPL-2.1-only</PackageLicenseExpression>
|
||||
<RepositoryUrl>https://github.com/aaru-dps/Aaru</RepositoryUrl>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<NeutralLanguage>en-US</NeutralLanguage>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||
<Authors>Natalia Portillo <claunia@claunia.com></Authors>
|
||||
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<NrtRevisionFormat>$(Version)+{chash:8}</NrtRevisionFormat>
|
||||
<NrtResolveSimpleAttributes>true</NrtResolveSimpleAttributes>
|
||||
<NrtShowRevision>true</NrtShowRevision>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\net6</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\net6</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Bluray\BCA.cs"/>
|
||||
<Compile Include="Bluray\Cartridge.cs"/>
|
||||
<Compile Include="Bluray\DDS.cs"/>
|
||||
<Compile Include="Bluray\DI.cs"/>
|
||||
<Compile Include="Bluray\Spare.cs"/>
|
||||
<Compile Include="CD\SectorBuilder.cs"/>
|
||||
<Compile Include="CD\Subchannel.cs"/>
|
||||
<Compile Include="SCSI\Inquiry.cs"/>
|
||||
<Compile Include="Floppy\Enums.cs"/>
|
||||
<Compile Include="Floppy\System3740.cs"/>
|
||||
<Compile Include="Floppy\System34.cs"/>
|
||||
<Compile Include="Floppy\Perpendicular.cs"/>
|
||||
<Compile Include="Floppy\ISO.cs"/>
|
||||
<Compile Include="Floppy\Apple2.cs"/>
|
||||
<Compile Include="Floppy\AppleSony.cs"/>
|
||||
<Compile Include="Floppy\Commodore.cs"/>
|
||||
<Compile Include="Floppy\Amiga.cs"/>
|
||||
<Compile Include="DVD\Enums.cs"/>
|
||||
<Compile Include="DVD\PFI.cs"/>
|
||||
<Compile Include="DVD\DMI.cs"/>
|
||||
<Compile Include="DVD\BCA.cs"/>
|
||||
<Compile Include="DVD\DDS.cs"/>
|
||||
<Compile Include="DVD\RMD.cs"/>
|
||||
<Compile Include="DVD\Spare.cs"/>
|
||||
<Compile Include="DVD\PRI.cs"/>
|
||||
<Compile Include="DVD\UDI.cs"/>
|
||||
<Compile Include="DVD\ADIP.cs"/>
|
||||
<Compile Include="DVD\Layers.cs"/>
|
||||
<Compile Include="DVD\AACS.cs"/>
|
||||
<Compile Include="DVD\CSS&CPRM.cs"/>
|
||||
<Compile Include="DVD\CPRM.cs"/>
|
||||
<Compile Include="DVD\Cartridge.cs"/>
|
||||
<Compile Include="CD\TOC.cs"/>
|
||||
<Compile Include="CD\Session.cs"/>
|
||||
<Compile Include="CD\FullTOC.cs"/>
|
||||
<Compile Include="CD\PMA.cs"/>
|
||||
<Compile Include="CD\ATIP.cs"/>
|
||||
<Compile Include="CD\Enums.cs"/>
|
||||
<Compile Include="CD\CDTextOnLeadIn.cs"/>
|
||||
<Compile Include="SCSI\MMC\AACS.cs"/>
|
||||
<Compile Include="SCSI\MMC\CPRM.cs"/>
|
||||
<Compile Include="SCSI\MMC\Enums.cs"/>
|
||||
<Compile Include="SCSI\MMC\Hybrid.cs"/>
|
||||
<Compile Include="SCSI\MMC\TrackInformation.cs"/>
|
||||
<Compile Include="SCSI\MMC\WriteProtect.cs"/>
|
||||
<Compile Include="SCSI\MMC\DiscInformation.cs"/>
|
||||
<Compile Include="SCSI\Modes\00_SFF.cs"/>
|
||||
<Compile Include="SCSI\Modes\01.cs"/>
|
||||
<Compile Include="SCSI\Modes\01_MMC.cs"/>
|
||||
<Compile Include="SCSI\Modes\02.cs"/>
|
||||
<Compile Include="SCSI\Modes\03.cs"/>
|
||||
<Compile Include="SCSI\Modes\04.cs"/>
|
||||
<Compile Include="SCSI\Modes\05.cs"/>
|
||||
<Compile Include="SCSI\Modes\06.cs"/>
|
||||
<Compile Include="SCSI\Modes\07.cs"/>
|
||||
<Compile Include="SCSI\Modes\07_MMC.cs"/>
|
||||
<Compile Include="SCSI\Modes\08.cs"/>
|
||||
<Compile Include="SCSI\Modes\0A.cs"/>
|
||||
<Compile Include="SCSI\Modes\0B.cs"/>
|
||||
<Compile Include="SCSI\Modes\0C.cs"/>
|
||||
<Compile Include="SCSI\Modes\0D.cs"/>
|
||||
<Compile Include="SCSI\Modes\0E.cs"/>
|
||||
<Compile Include="SCSI\Modes\0F.cs"/>
|
||||
<Compile Include="SCSI\Modes\10.cs"/>
|
||||
<Compile Include="SCSI\Modes\10_SSC.cs"/>
|
||||
<Compile Include="SCSI\Modes\11.cs"/>
|
||||
<Compile Include="SCSI\Modes\12_13_14.cs"/>
|
||||
<Compile Include="SCSI\Modes\1A.cs"/>
|
||||
<Compile Include="SCSI\Modes\1B.cs"/>
|
||||
<Compile Include="SCSI\Modes\1C.cs"/>
|
||||
<Compile Include="SCSI\Modes\1C_SFF.cs"/>
|
||||
<Compile Include="SCSI\Modes\1D.cs"/>
|
||||
<Compile Include="SCSI\Modes\21_Certance.cs"/>
|
||||
<Compile Include="SCSI\Modes\22_Certance.cs"/>
|
||||
<Compile Include="SCSI\Modes\24_IBM.cs"/>
|
||||
<Compile Include="SCSI\Modes\2A.cs"/>
|
||||
<Compile Include="SCSI\Modes\2F_IBM.cs"/>
|
||||
<Compile Include="SCSI\Modes\30_Apple.cs"/>
|
||||
<Compile Include="SCSI\Modes\3B_HP.cs"/>
|
||||
<Compile Include="SCSI\Modes\3C_HP.cs"/>
|
||||
<Compile Include="SCSI\Modes\3D_HP.cs"/>
|
||||
<Compile Include="SCSI\Modes\3D_IBM.cs"/>
|
||||
<Compile Include="SCSI\Modes\3E_Fujitsu.cs"/>
|
||||
<Compile Include="SCSI\Modes\3E_HP.cs"/>
|
||||
<Compile Include="SCSI\Modes\Headers.cs"/>
|
||||
<Compile Include="SCSI\Modes\Mode10.cs"/>
|
||||
<Compile Include="SCSI\Modes\Mode6.cs"/>
|
||||
<Compile Include="SCSI\Modes\Structs.cs"/>
|
||||
<Compile Include="SCSI\VendorString.cs"/>
|
||||
<Compile Include="ATA\Identify.cs"/>
|
||||
<Compile Include="SCSI\EVPD.cs"/>
|
||||
<Compile Include="SCSI\MMC\Features.cs"/>
|
||||
<Compile Include="SCSI\DiscStructureCapabilities.cs"/>
|
||||
<Compile Include="SCSI\Sense.cs"/>
|
||||
<Compile Include="ATA\Registers.cs"/>
|
||||
<Compile Include="Xbox\DMI.cs"/>
|
||||
<Compile Include="SCSI\SSC\BlockLimits.cs"/>
|
||||
<Compile Include="SCSI\SSC\DensitySupport.cs"/>
|
||||
<Compile Include="SCSI\Types.cs"/>
|
||||
<Compile Include="LisaTag.cs"/>
|
||||
<Compile Include="CD\Sector.cs"/>
|
||||
<Compile Include="PCMCIA\Enums.cs"/>
|
||||
<Compile Include="PCMCIA\Types.cs"/>
|
||||
<Compile Include="PCMCIA\CIS.cs"/>
|
||||
<Compile Include="PCMCIA\VendorCode.cs"/>
|
||||
<Compile Include="MMC\CSD.cs"/>
|
||||
<Compile Include="MMC\CID.cs"/>
|
||||
<Compile Include="MMC\ExtendedCSD.cs"/>
|
||||
<Compile Include="MMC\OCR.cs"/>
|
||||
<Compile Include="MMC\VendorString.cs"/>
|
||||
<Compile Include="SecureDigital\CID.cs"/>
|
||||
<Compile Include="SecureDigital\CSD.cs"/>
|
||||
<Compile Include="SecureDigital\SCR.cs"/>
|
||||
<Compile Include="SecureDigital\OCR.cs"/>
|
||||
<Compile Include="SecureDigital\VendorString.cs"/>
|
||||
<Compile Include="Xbox\SS.cs"/>
|
||||
<Compile Include="Sega\CD.cs"/>
|
||||
<Compile Include="Sega\Saturn.cs"/>
|
||||
<Compile Include="Sega\Dreamcast.cs"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Aaru.Checksums\Aaru.Checksums.csproj"/>
|
||||
<ProjectReference Include="..\Aaru.CommonTypes\Aaru.CommonTypes.csproj"/>
|
||||
<ProjectReference Include="..\Aaru.Helpers\Aaru.Helpers.csproj"></ProjectReference>
|
||||
<ProjectReference Include="..\Aaru.Console\Aaru.Console.csproj"></ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Bluray"/>
|
||||
<Folder Include="SCSI\"/>
|
||||
<Folder Include="ATA\"/>
|
||||
<Folder Include="DVD\"/>
|
||||
<Folder Include="SCSI\MMC\"/>
|
||||
<Folder Include="CD\"/>
|
||||
<Folder Include="Floppy\"/>
|
||||
<Folder Include="Xbox\"/>
|
||||
<Folder Include="SCSI\SSC\"/>
|
||||
<Folder Include="PCMCIA\"/>
|
||||
<Folder Include="MMC\"/>
|
||||
<Folder Include="SecureDigital\"/>
|
||||
<Folder Include="Sega\"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="..\LICENSE.LGPL">
|
||||
<Link>LICENSE.LGPL</Link>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1"/>
|
||||
<PackageReference Include="System.ComponentModel.Annotations" Version="6.0.0-preview.4.21253.7"/>
|
||||
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.4.2" PrivateAssets="all"/>
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<MonoDevelop>
|
||||
<Properties>
|
||||
<Policies>
|
||||
<DotNetNamingPolicy DirectoryNamespaceAssociation="PrefixedHierarchical" ResourceNamePolicy="MSBuild"/>
|
||||
<StandardHeader IncludeInNewFiles="True" Text="/***************************************************************************
Aaru Data Preservation Suite
----------------------------------------------------------------------------
 
Filename : ${FileName}
Author(s) : ${AuthorName} <${AuthorEmail}>

Component : Component
 
--[ Description ] ----------------------------------------------------------
 
 Description
 
--[ License ] --------------------------------------------------------------
 
 This library is free software; you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as
 published by the Free Software Foundation; either version 2.1 of the
 License, or (at your option) any later version.

 This library is distributed in the hope that it will be useful, but
 WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General Public
 License along with this library; if not, see <http://www.gnu.org/licenses/>.

----------------------------------------------------------------------------
Copyright © 2011-${Year} ${CopyrightHolder}
****************************************************************************/"/>
|
||||
<TextStylePolicy FileWidth="120" TabWidth="4" IndentWidth="4" RemoveTrailingWhitespace="True" NoTabsAfterNonTabs="False" EolMarker="Native" TabsToSpaces="True" scope="text/x-csharp"/>
|
||||
<CSharpFormattingPolicy IndentBlock="True" IndentBraces="False" IndentSwitchSection="True" IndentSwitchCaseSection="True" LabelPositioning="OneLess" NewLinesForBracesInTypes="True" NewLinesForBracesInMethods="True" NewLinesForBracesInProperties="True" NewLinesForBracesInAccessors="True" NewLinesForBracesInAnonymousMethods="True" NewLinesForBracesInControlBlocks="True" NewLinesForBracesInAnonymousTypes="True" NewLinesForBracesInObjectCollectionArrayInitializers="True" NewLinesForBracesInLambdaExpressionBody="True" NewLineForElse="True" NewLineForCatch="True" NewLineForFinally="True" NewLineForMembersInObjectInit="True" NewLineForMembersInAnonymousTypes="True" NewLineForClausesInQuery="True" SpacingAfterMethodDeclarationName="False" SpaceWithinMethodDeclarationParenthesis="False" SpaceBetweenEmptyMethodDeclarationParentheses="False" SpaceAfterMethodCallName="False" SpaceWithinMethodCallParentheses="False" SpaceBetweenEmptyMethodCallParentheses="False" SpaceWithinExpressionParentheses="False" SpaceWithinCastParentheses="False" SpaceWithinOtherParentheses="False" SpaceAfterCast="False" SpacesIgnoreAroundVariableDeclaration="False" SpaceBeforeOpenSquareBracket="False" SpaceBetweenEmptySquareBrackets="False" SpaceWithinSquareBrackets="False" SpaceAfterColonInBaseTypeDeclaration="True" SpaceAfterComma="True" SpaceAfterDot="False" SpaceAfterSemicolonsInForStatement="True" SpaceBeforeColonInBaseTypeDeclaration="True" SpaceBeforeComma="False" SpaceBeforeDot="False" SpaceBeforeSemicolonsInForStatement="False" SpacingAroundBinaryOperator="Single" WrappingPreserveSingleLine="True" WrappingKeepStatementsOnSingleLine="True" SpaceAfterControlFlowStatementKeyword="False" scope="text/x-csharp"/>
|
||||
</Policies>
|
||||
</Properties>
|
||||
</MonoDevelop>
|
||||
</ProjectExtensions>
|
||||
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4')) and '$(OS)' == 'Unix'">
|
||||
<!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
|
||||
<!-- have to teach MSBuild where the Mono copy of the reference asssemblies is -->
|
||||
<!-- Look in the standard install locations -->
|
||||
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
|
||||
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
|
||||
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>
|
||||
<!-- If we found Mono reference assemblies, then use them -->
|
||||
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net40'">$(BaseFrameworkPathOverrideForMono)/4.0-api</FrameworkPathOverride>
|
||||
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
|
||||
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
|
||||
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
|
||||
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
|
||||
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
|
||||
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
|
||||
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
|
||||
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
|
||||
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>
|
||||
<!-- Add the Facades directory. Not sure how else to do this. Necessary at least for .NET 4.5 -->
|
||||
<AssemblySearchPaths Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -30,14 +30,14 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.Bluray;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Aaru.Console;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.Bluray;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
|
||||
@@ -30,14 +30,14 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.Bluray;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Aaru.Console;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.Bluray;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
@@ -92,8 +92,7 @@ public static class Cartridge
|
||||
if(CSResponse.Length != 8)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("BD Cartridge Status decoder",
|
||||
"Found incorrect Blu-ray Cartridge Status size ({0} bytes)",
|
||||
CSResponse.Length);
|
||||
"Found incorrect Blu-ray Cartridge Status size ({0} bytes)", CSResponse.Length);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -30,14 +30,14 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.Bluray;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Aaru.Console;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.Bluray;
|
||||
|
||||
/// Information from the following standards:
|
||||
/// ANSI X3.304-1997
|
||||
/// T10/1048-D revision 9.0
|
||||
@@ -132,8 +132,7 @@ public static class DDS
|
||||
|
||||
if(decoded.Signature != DDSIdentifier)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("BD DDS decoder", "Found incorrect DDS signature (0x{0:X4})",
|
||||
decoded.Signature);
|
||||
AaruConsole.DebugWriteLine("BD DDS decoder", "Found incorrect DDS signature (0x{0:X4})", decoded.Signature);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
21
Bluray/DI.cs
21
Bluray/DI.cs
@@ -30,6 +30,8 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.Bluray;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
@@ -37,8 +39,6 @@ using System.Text;
|
||||
using Aaru.Console;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.Bluray;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
@@ -102,8 +102,7 @@ public static class DI
|
||||
if(DIResponse.Length != 4100)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("BD Disc Information decoder",
|
||||
"Found incorrect Blu-ray Disc Information size ({0} bytes)",
|
||||
DIResponse.Length);
|
||||
"Found incorrect Blu-ray Disc Information size ({0} bytes)", DIResponse.Length);
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -115,8 +114,8 @@ public static class DI
|
||||
Reserved2 = DIResponse[3]
|
||||
};
|
||||
|
||||
int offset = 4;
|
||||
List<DiscInformationUnits> units = new List<DiscInformationUnits>();
|
||||
var offset = 4;
|
||||
var units = new List<DiscInformationUnits>();
|
||||
|
||||
while(true)
|
||||
{
|
||||
@@ -210,7 +209,7 @@ public static class DI
|
||||
|
||||
decoded.Units = new DiscInformationUnits[units.Count];
|
||||
|
||||
for(int i = 0; i < units.Count; i++)
|
||||
for(var i = 0; i < units.Count; i++)
|
||||
decoded.Units[i] = units[i];
|
||||
|
||||
return decoded;
|
||||
@@ -375,8 +374,7 @@ public static class DI
|
||||
|
||||
sb.AppendFormat("Last user data PSN for disc: {0}", unit.LastPsn).AppendLine();
|
||||
|
||||
sb.AppendFormat("First address unit number of data zone in this layer: {0}", unit.FirstAun).
|
||||
AppendLine();
|
||||
sb.AppendFormat("First address unit number of data zone in this layer: {0}", unit.FirstAun).AppendLine();
|
||||
|
||||
sb.AppendFormat("Last address unit number of data zone in this layer: {0}", unit.LastAun).AppendLine();
|
||||
|
||||
@@ -386,8 +384,7 @@ public static class DI
|
||||
sb.AppendFormat("Disc manufacturer ID: \"{0}\"", Encoding.ASCII.GetString(unit.ManufacturerID)).
|
||||
AppendLine();
|
||||
|
||||
sb.AppendFormat("Disc media type ID: \"{0}\"", Encoding.ASCII.GetString(unit.MediaTypeID)).
|
||||
AppendLine();
|
||||
sb.AppendFormat("Disc media type ID: \"{0}\"", Encoding.ASCII.GetString(unit.MediaTypeID)).AppendLine();
|
||||
|
||||
sb.AppendFormat("Disc timestamp: 0x{0:X2}", unit.TimeStamp).AppendLine();
|
||||
sb.AppendFormat("Disc product revison number: {0}", unit.ProductRevisionNumber).AppendLine();
|
||||
@@ -404,7 +401,7 @@ public static class DI
|
||||
|
||||
public static string ManufacturerFromDI(string manufacturerId)
|
||||
{
|
||||
string manufacturer = "";
|
||||
var manufacturer = "";
|
||||
|
||||
switch(manufacturerId)
|
||||
{
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.Bluray;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Aaru.Console;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.Bluray;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
|
||||
12
CD/ATIP.cs
12
CD/ATIP.cs
@@ -30,14 +30,14 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.CD;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Aaru.Console;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.CD;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
@@ -215,8 +215,7 @@ public static class ATIP
|
||||
|
||||
break;
|
||||
default:
|
||||
sb.AppendFormat("Reference speed set is unknown: {0}", response.ReferenceSpeed).
|
||||
AppendLine();
|
||||
sb.AppendFormat("Reference speed set is unknown: {0}", response.ReferenceSpeed).AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -271,9 +270,8 @@ public static class ATIP
|
||||
sb.AppendFormat("ATIP Start time of Lead-in: {0}:{1:D2}:{2:D2}", response.LeadInStartMin,
|
||||
response.LeadInStartSec, response.LeadInStartFrame).AppendLine();
|
||||
|
||||
sb.AppendFormat("ATIP Last possible start time of Lead-out: {0}:{1:D2}:{2:D2}",
|
||||
response.LeadOutStartMin, response.LeadOutStartSec, response.LeadOutStartFrame).
|
||||
AppendLine();
|
||||
sb.AppendFormat("ATIP Last possible start time of Lead-out: {0}:{1:D2}:{2:D2}", response.LeadOutStartMin,
|
||||
response.LeadOutStartSec, response.LeadOutStartFrame).AppendLine();
|
||||
|
||||
if(response.A1Valid)
|
||||
sb.AppendFormat("A1 value: 0x{0:X6}",
|
||||
|
||||
@@ -30,14 +30,14 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.CD;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Aaru.Console;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.CD;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
@@ -118,17 +118,17 @@ public static class CDTextOnLeadIn
|
||||
return null;
|
||||
}
|
||||
|
||||
for(int i = 0; i < (decoded.DataLength - 2) / 18; i++)
|
||||
for(var i = 0; i < (decoded.DataLength - 2) / 18; i++)
|
||||
{
|
||||
decoded.DataPacks[i].HeaderID1 = CDTextResponse[0 + (i * 18) + 4];
|
||||
decoded.DataPacks[i].HeaderID2 = CDTextResponse[1 + (i * 18) + 4];
|
||||
decoded.DataPacks[i].HeaderID3 = CDTextResponse[2 + (i * 18) + 4];
|
||||
decoded.DataPacks[i].DBCC = Convert.ToBoolean(CDTextResponse[3 + (i * 18) + 4] & 0x80);
|
||||
decoded.DataPacks[i].BlockNumber = (byte)((CDTextResponse[3 + (i * 18) + 4] & 0x70) >> 4);
|
||||
decoded.DataPacks[i].CharacterPosition = (byte)(CDTextResponse[3 + (i * 18) + 4] & 0x0F);
|
||||
decoded.DataPacks[i].HeaderID1 = CDTextResponse[0 + i * 18 + 4];
|
||||
decoded.DataPacks[i].HeaderID2 = CDTextResponse[1 + i * 18 + 4];
|
||||
decoded.DataPacks[i].HeaderID3 = CDTextResponse[2 + i * 18 + 4];
|
||||
decoded.DataPacks[i].DBCC = Convert.ToBoolean(CDTextResponse[3 + i * 18 + 4] & 0x80);
|
||||
decoded.DataPacks[i].BlockNumber = (byte)((CDTextResponse[3 + i * 18 + 4] & 0x70) >> 4);
|
||||
decoded.DataPacks[i].CharacterPosition = (byte)(CDTextResponse[3 + i * 18 + 4] & 0x0F);
|
||||
decoded.DataPacks[i].TextDataField = new byte[12];
|
||||
Array.Copy(CDTextResponse, 4 + (i * 18) + 4, decoded.DataPacks[i].TextDataField, 0, 12);
|
||||
decoded.DataPacks[i].CRC = BigEndianBitConverter.ToUInt16(CDTextResponse, 16 + (i * 18) + 4);
|
||||
Array.Copy(CDTextResponse, 4 + i * 18 + 4, decoded.DataPacks[i].TextDataField, 0, 12);
|
||||
decoded.DataPacks[i].CRC = BigEndianBitConverter.ToUInt16(CDTextResponse, 16 + i * 18 + 4);
|
||||
}
|
||||
|
||||
return decoded;
|
||||
@@ -155,8 +155,7 @@ 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("Incorrect CD-Text pack type {0}, not decoding", descriptor.HeaderID1).AppendLine();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -322,8 +321,7 @@ public static class CDTextOnLeadIn
|
||||
default:
|
||||
{
|
||||
sb.AppendFormat("Binary contents: {0}",
|
||||
PrintHex.ByteArrayToHexArrayString(descriptor.TextDataField, 28)).
|
||||
AppendLine();
|
||||
PrintHex.ByteArrayToHexArrayString(descriptor.TextDataField, 28)).AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Aaru.Decoders.CD;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
public enum TocAdr : byte
|
||||
{
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.CD;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
@@ -39,8 +41,6 @@ using Aaru.CommonTypes.Structs;
|
||||
using Aaru.Console;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.CD;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
@@ -91,22 +91,22 @@ public static class FullTOC
|
||||
return null;
|
||||
}
|
||||
|
||||
for(int i = 0; i < (decoded.DataLength - 2) / 11; i++)
|
||||
for(var i = 0; i < (decoded.DataLength - 2) / 11; i++)
|
||||
{
|
||||
decoded.TrackDescriptors[i].SessionNumber = CDFullTOCResponse[0 + (i * 11) + 4];
|
||||
decoded.TrackDescriptors[i].ADR = (byte)((CDFullTOCResponse[1 + (i * 11) + 4] & 0xF0) >> 4);
|
||||
decoded.TrackDescriptors[i].CONTROL = (byte)(CDFullTOCResponse[1 + (i * 11) + 4] & 0x0F);
|
||||
decoded.TrackDescriptors[i].TNO = CDFullTOCResponse[2 + (i * 11) + 4];
|
||||
decoded.TrackDescriptors[i].POINT = CDFullTOCResponse[3 + (i * 11) + 4];
|
||||
decoded.TrackDescriptors[i].Min = CDFullTOCResponse[4 + (i * 11) + 4];
|
||||
decoded.TrackDescriptors[i].Sec = CDFullTOCResponse[5 + (i * 11) + 4];
|
||||
decoded.TrackDescriptors[i].Frame = CDFullTOCResponse[6 + (i * 11) + 4];
|
||||
decoded.TrackDescriptors[i].Zero = CDFullTOCResponse[7 + (i * 11) + 4];
|
||||
decoded.TrackDescriptors[i].HOUR = (byte)((CDFullTOCResponse[7 + (i * 11) + 4] & 0xF0) >> 4);
|
||||
decoded.TrackDescriptors[i].PHOUR = (byte)(CDFullTOCResponse[7 + (i * 11) + 4] & 0x0F);
|
||||
decoded.TrackDescriptors[i].PMIN = CDFullTOCResponse[8 + (i * 11) + 4];
|
||||
decoded.TrackDescriptors[i].PSEC = CDFullTOCResponse[9 + (i * 11) + 4];
|
||||
decoded.TrackDescriptors[i].PFRAME = CDFullTOCResponse[10 + (i * 11) + 4];
|
||||
decoded.TrackDescriptors[i].SessionNumber = CDFullTOCResponse[0 + i * 11 + 4];
|
||||
decoded.TrackDescriptors[i].ADR = (byte)((CDFullTOCResponse[1 + i * 11 + 4] & 0xF0) >> 4);
|
||||
decoded.TrackDescriptors[i].CONTROL = (byte)(CDFullTOCResponse[1 + i * 11 + 4] & 0x0F);
|
||||
decoded.TrackDescriptors[i].TNO = CDFullTOCResponse[2 + i * 11 + 4];
|
||||
decoded.TrackDescriptors[i].POINT = CDFullTOCResponse[3 + i * 11 + 4];
|
||||
decoded.TrackDescriptors[i].Min = CDFullTOCResponse[4 + i * 11 + 4];
|
||||
decoded.TrackDescriptors[i].Sec = CDFullTOCResponse[5 + i * 11 + 4];
|
||||
decoded.TrackDescriptors[i].Frame = CDFullTOCResponse[6 + i * 11 + 4];
|
||||
decoded.TrackDescriptors[i].Zero = CDFullTOCResponse[7 + i * 11 + 4];
|
||||
decoded.TrackDescriptors[i].HOUR = (byte)((CDFullTOCResponse[7 + i * 11 + 4] & 0xF0) >> 4);
|
||||
decoded.TrackDescriptors[i].PHOUR = (byte)(CDFullTOCResponse[7 + i * 11 + 4] & 0x0F);
|
||||
decoded.TrackDescriptors[i].PMIN = CDFullTOCResponse[8 + i * 11 + 4];
|
||||
decoded.TrackDescriptors[i].PSEC = CDFullTOCResponse[9 + i * 11 + 4];
|
||||
decoded.TrackDescriptors[i].PFRAME = CDFullTOCResponse[10 + i * 11 + 4];
|
||||
}
|
||||
|
||||
return decoded;
|
||||
@@ -121,14 +121,14 @@ public static class FullTOC
|
||||
|
||||
var sb = new StringBuilder();
|
||||
|
||||
int lastSession = 0;
|
||||
var lastSession = 0;
|
||||
|
||||
sb.AppendFormat("First complete session number: {0}", response.FirstCompleteSession).AppendLine();
|
||||
sb.AppendFormat("Last complete session number: {0}", response.LastCompleteSession).AppendLine();
|
||||
|
||||
foreach(TrackDataDescriptor descriptor in response.TrackDescriptors)
|
||||
if((descriptor.CONTROL & 0x08) == 0x08 ||
|
||||
(descriptor.ADR != 1 && descriptor.ADR != 5 && descriptor.ADR != 4 && descriptor.ADR != 6) ||
|
||||
if((descriptor.CONTROL & 0x08) == 0x08 ||
|
||||
descriptor.ADR != 1 && descriptor.ADR != 5 && descriptor.ADR != 4 && descriptor.ADR != 6 ||
|
||||
descriptor.TNO != 0)
|
||||
{
|
||||
sb.AppendLine("Unknown TOC entry format, printing values as-is");
|
||||
@@ -292,9 +292,8 @@ public static class FullTOC
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME,
|
||||
descriptor.PHOUR).AppendLine();
|
||||
else
|
||||
sb.AppendFormat("Lead-out start position: {0:D2}:{1:D2}:{2:D2}",
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME).
|
||||
AppendLine();
|
||||
sb.AppendFormat("Lead-out start position: {0:D2}:{1:D2}:{2:D2}", 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();
|
||||
|
||||
@@ -343,11 +342,10 @@ public static class FullTOC
|
||||
descriptor.POINT).AppendLine();
|
||||
else
|
||||
{
|
||||
string type = "Audio";
|
||||
var type = "Audio";
|
||||
|
||||
if((TocControl)(descriptor.CONTROL & 0x0D) == TocControl.DataTrack ||
|
||||
(TocControl)(descriptor.CONTROL & 0x0D) ==
|
||||
TocControl.DataTrackIncremental)
|
||||
(TocControl)(descriptor.CONTROL & 0x0D) == TocControl.DataTrackIncremental)
|
||||
type = "Data";
|
||||
|
||||
if(descriptor.PHOUR > 0)
|
||||
@@ -422,8 +420,8 @@ public static class FullTOC
|
||||
{
|
||||
sb.
|
||||
AppendFormat("Start of next possible program in the recordable area of the disc: {3:D2}:{0:D2}:{1:D2}:{2:D2}",
|
||||
descriptor.Min, descriptor.Sec, descriptor.Frame,
|
||||
descriptor.HOUR).AppendLine();
|
||||
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}",
|
||||
@@ -438,8 +436,7 @@ public static class FullTOC
|
||||
|
||||
sb.
|
||||
AppendFormat("Maximum start of outermost Lead-out in the recordable area of the disc: {0:D2}:{1:D2}:{2:D2}",
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME).
|
||||
AppendLine();
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME).AppendLine();
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -447,8 +444,7 @@ public static class FullTOC
|
||||
|
||||
case 0xB1:
|
||||
{
|
||||
sb.AppendFormat("Number of skip interval pointers: {0}", descriptor.PMIN).
|
||||
AppendLine();
|
||||
sb.AppendFormat("Number of skip interval pointers: {0}", descriptor.PMIN).AppendLine();
|
||||
|
||||
sb.AppendFormat("Number of skip track pointers: {0}", descriptor.PSEC).AppendLine();
|
||||
|
||||
@@ -482,8 +478,7 @@ public static class FullTOC
|
||||
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();
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME).AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -513,19 +508,16 @@ public static class FullTOC
|
||||
|
||||
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();
|
||||
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}",
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME).
|
||||
AppendLine();
|
||||
sb.AppendFormat("Start position of outer part lead-in area: {0:D2}:{1:D2}:{2:D2}",
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME).AppendLine();
|
||||
|
||||
sb.
|
||||
AppendFormat("Stop position of inner part lead-out area: {0:D2}:{1:D2}:{2:D2}",
|
||||
descriptor.Min, descriptor.Sec, descriptor.Frame).AppendLine();
|
||||
sb.AppendFormat("Stop position of inner part lead-out area: {0:D2}:{1:D2}:{2:D2}",
|
||||
descriptor.Min, descriptor.Sec, descriptor.Frame).AppendLine();
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -538,8 +530,7 @@ public static class FullTOC
|
||||
{
|
||||
sb.
|
||||
AppendFormat("Start time for interval that should be skipped: {0:D2}:{1:D2}:{2:D2}",
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME).
|
||||
AppendLine();
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME).AppendLine();
|
||||
|
||||
sb.
|
||||
AppendFormat("Ending time for interval that should be skipped: {0:D2}:{1:D2}:{2:D2}",
|
||||
@@ -570,7 +561,7 @@ public static class FullTOC
|
||||
|
||||
case 6:
|
||||
{
|
||||
uint id = (uint)((descriptor.Min << 16) + (descriptor.Sec << 8) + descriptor.Frame);
|
||||
var id = (uint)((descriptor.Min << 16) + (descriptor.Sec << 8) + descriptor.Frame);
|
||||
sb.AppendFormat("Disc ID: {0:X6}", id & 0x00FFFFFF).AppendLine();
|
||||
|
||||
break;
|
||||
@@ -632,8 +623,7 @@ public static class FullTOC
|
||||
public byte PFRAME;
|
||||
}
|
||||
|
||||
public static CDFullTOC Create(List<Track> tracks, Dictionary<byte, byte> trackFlags,
|
||||
bool createC0Entry = false)
|
||||
public static CDFullTOC Create(List<Track> tracks, Dictionary<byte, byte> trackFlags, bool createC0Entry = false)
|
||||
{
|
||||
var toc = new CDFullTOC();
|
||||
Dictionary<byte, byte> sessionEndingTrack = new();
|
||||
|
||||
42
CD/PMA.cs
42
CD/PMA.cs
@@ -30,13 +30,13 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.CD;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Aaru.Console;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.CD;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
@@ -81,21 +81,21 @@ public static class PMA
|
||||
return null;
|
||||
}
|
||||
|
||||
for(int i = 0; i < (decoded.DataLength - 2) / 11; i++)
|
||||
for(var i = 0; i < (decoded.DataLength - 2) / 11; i++)
|
||||
{
|
||||
decoded.PMADescriptors[i].Reserved = CDPMAResponse[0 + (i * 11) + 4];
|
||||
decoded.PMADescriptors[i].ADR = (byte)((CDPMAResponse[1 + (i * 11) + 4] & 0xF0) >> 4);
|
||||
decoded.PMADescriptors[i].CONTROL = (byte)(CDPMAResponse[1 + (i * 11) + 4] & 0x0F);
|
||||
decoded.PMADescriptors[i].TNO = CDPMAResponse[2 + (i * 11) + 4];
|
||||
decoded.PMADescriptors[i].POINT = CDPMAResponse[3 + (i * 11) + 4];
|
||||
decoded.PMADescriptors[i].Min = CDPMAResponse[4 + (i * 11) + 4];
|
||||
decoded.PMADescriptors[i].Sec = CDPMAResponse[5 + (i * 11) + 4];
|
||||
decoded.PMADescriptors[i].Frame = CDPMAResponse[6 + (i * 11) + 4];
|
||||
decoded.PMADescriptors[i].HOUR = (byte)((CDPMAResponse[7 + (i * 11) + 4] & 0xF0) >> 4);
|
||||
decoded.PMADescriptors[i].PHOUR = (byte)(CDPMAResponse[7 + (i * 11) + 4] & 0x0F);
|
||||
decoded.PMADescriptors[i].PMIN = CDPMAResponse[8 + (i * 11) + 4];
|
||||
decoded.PMADescriptors[i].PSEC = CDPMAResponse[9 + (i * 11) + 4];
|
||||
decoded.PMADescriptors[i].PFRAME = CDPMAResponse[10 + (i * 11) + 4];
|
||||
decoded.PMADescriptors[i].Reserved = CDPMAResponse[0 + i * 11 + 4];
|
||||
decoded.PMADescriptors[i].ADR = (byte)((CDPMAResponse[1 + i * 11 + 4] & 0xF0) >> 4);
|
||||
decoded.PMADescriptors[i].CONTROL = (byte)(CDPMAResponse[1 + i * 11 + 4] & 0x0F);
|
||||
decoded.PMADescriptors[i].TNO = CDPMAResponse[2 + i * 11 + 4];
|
||||
decoded.PMADescriptors[i].POINT = CDPMAResponse[3 + i * 11 + 4];
|
||||
decoded.PMADescriptors[i].Min = CDPMAResponse[4 + i * 11 + 4];
|
||||
decoded.PMADescriptors[i].Sec = CDPMAResponse[5 + i * 11 + 4];
|
||||
decoded.PMADescriptors[i].Frame = CDPMAResponse[6 + i * 11 + 4];
|
||||
decoded.PMADescriptors[i].HOUR = (byte)((CDPMAResponse[7 + i * 11 + 4] & 0xF0) >> 4);
|
||||
decoded.PMADescriptors[i].PHOUR = (byte)(CDPMAResponse[7 + i * 11 + 4] & 0x0F);
|
||||
decoded.PMADescriptors[i].PMIN = CDPMAResponse[8 + i * 11 + 4];
|
||||
decoded.PMADescriptors[i].PSEC = CDPMAResponse[9 + i * 11 + 4];
|
||||
decoded.PMADescriptors[i].PFRAME = CDPMAResponse[10 + i * 11 + 4];
|
||||
}
|
||||
|
||||
return decoded;
|
||||
@@ -181,7 +181,7 @@ public static class PMA
|
||||
|
||||
break;
|
||||
case 2:
|
||||
uint id = (uint)((descriptor.Min << 16) + (descriptor.Sec << 8) + descriptor.Frame);
|
||||
var id = (uint)((descriptor.Min << 16) + (descriptor.Sec << 8) + descriptor.Frame);
|
||||
sb.AppendFormat("Disc ID: {0:X6}", id & 0x00FFFFFF).AppendLine();
|
||||
|
||||
break;
|
||||
@@ -244,8 +244,8 @@ public static class PMA
|
||||
descriptor.PFRAME);
|
||||
|
||||
if(descriptor.PHOUR > 0)
|
||||
sb.AppendFormat("{3}:{0:D2}:{1:D2}:{2:D2} ", descriptor.Min, descriptor.Sec,
|
||||
descriptor.Frame, descriptor.HOUR);
|
||||
sb.AppendFormat("{3}:{0:D2}:{1:D2}:{2:D2} ", descriptor.Min, descriptor.Sec, descriptor.Frame,
|
||||
descriptor.HOUR);
|
||||
else
|
||||
sb.AppendFormat("{0:D2}:{1:D2}:{2:D2} ", descriptor.Min, descriptor.Sec, descriptor.Frame);
|
||||
|
||||
@@ -263,8 +263,8 @@ public static class PMA
|
||||
descriptor.PFRAME);
|
||||
|
||||
if(descriptor.PHOUR > 0)
|
||||
sb.AppendFormat("{3}:{0:D2}:{1:D2}:{2:D2} ", descriptor.Min, descriptor.Sec,
|
||||
descriptor.Frame, descriptor.HOUR);
|
||||
sb.AppendFormat("{3}:{0:D2}:{1:D2}:{2:D2} ", descriptor.Min, descriptor.Sec, descriptor.Frame,
|
||||
descriptor.HOUR);
|
||||
else
|
||||
sb.AppendFormat("{0:D2}:{1:D2}:{2:D2} ", descriptor.Min, descriptor.Sec, descriptor.Frame);
|
||||
|
||||
|
||||
38
CD/Sector.cs
38
CD/Sector.cs
@@ -30,6 +30,8 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.CD;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
@@ -37,8 +39,6 @@ using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using Aaru.Checksums;
|
||||
|
||||
namespace Aaru.Decoders.CD;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static class Sector
|
||||
@@ -189,21 +189,21 @@ public static class Sector
|
||||
sector.Length < 2352)
|
||||
return sector;
|
||||
|
||||
byte[] sync = new byte[12];
|
||||
var sync = new byte[12];
|
||||
Array.Copy(sector, 0, sync, 0, 12);
|
||||
|
||||
if(!SyncMark.SequenceEqual(sync))
|
||||
return sector;
|
||||
|
||||
byte[] scrambled = new byte[sector.Length];
|
||||
var scrambled = new byte[sector.Length];
|
||||
|
||||
for(int i = 0; i < 2352; i++)
|
||||
for(var i = 0; i < 2352; i++)
|
||||
scrambled[i] = (byte)(sector[i] ^ ScrambleTable[i]);
|
||||
|
||||
if(sector.Length <= 2352)
|
||||
return scrambled;
|
||||
|
||||
for(int i = 2352; i < sector.Length; i++)
|
||||
for(var i = 2352; i < sector.Length; i++)
|
||||
scrambled[i] = sector[i];
|
||||
|
||||
return scrambled;
|
||||
@@ -222,7 +222,7 @@ public static class Sector
|
||||
{
|
||||
case 0: return new byte[2048];
|
||||
case 1:
|
||||
byte[] sector = new byte[2048];
|
||||
var sector = new byte[2048];
|
||||
Array.Copy(data, 16, sector, 0, 2048);
|
||||
|
||||
return sector;
|
||||
@@ -241,7 +241,7 @@ public static class Sector
|
||||
data.Length != 2336)
|
||||
return data;
|
||||
|
||||
int pos = 0;
|
||||
var pos = 0;
|
||||
|
||||
if(data.Length == 2352)
|
||||
{
|
||||
@@ -270,7 +270,7 @@ public static class Sector
|
||||
int len = (data[pos + 2] & 0x20) == 0x20 ? 2324 : 2048;
|
||||
pos += 8;
|
||||
|
||||
byte[] sector = new byte[len];
|
||||
var sector = new byte[len];
|
||||
Array.Copy(data, pos, sector, 0, len);
|
||||
|
||||
return sector;
|
||||
@@ -303,8 +303,8 @@ public static class Sector
|
||||
byte min = buffer[12];
|
||||
byte sec = buffer[13];
|
||||
byte frame = buffer[14];
|
||||
int lba = 0;
|
||||
bool moreThan90 = false;
|
||||
var lba = 0;
|
||||
var moreThan90 = false;
|
||||
|
||||
if(min > 0x90)
|
||||
{
|
||||
@@ -313,9 +313,9 @@ public static class Sector
|
||||
moreThan90 = true;
|
||||
}
|
||||
|
||||
lba += (((min >> 4) * 10) + (min & 0x0F)) * 75 * 60;
|
||||
lba += (((sec >> 4) * 10) + (sec & 0x0F)) * 75;
|
||||
lba += ((frame >> 4) * 10) + (frame & 0x0F);
|
||||
lba += ((min >> 4) * 10 + (min & 0x0F)) * 75 * 60;
|
||||
lba += ((sec >> 4) * 10 + (sec & 0x0F)) * 75;
|
||||
lba += (frame >> 4) * 10 + (frame & 0x0F);
|
||||
lba -= 150;
|
||||
|
||||
if(moreThan90)
|
||||
@@ -381,21 +381,19 @@ public static class Sector
|
||||
|
||||
CdChecksums.CheckCdSector(buffer, out bool? correctEccP, out bool? correctEccQ, out bool? correctEdc);
|
||||
|
||||
bool empty = true;
|
||||
var empty = true;
|
||||
|
||||
switch(buffer[15] & 0x03)
|
||||
{
|
||||
case 0:
|
||||
|
||||
for(int i = 16; i < 2352; i++)
|
||||
{
|
||||
for(var i = 16; i < 2352; i++)
|
||||
if(buffer[i] != 0x00)
|
||||
{
|
||||
empty = false;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
sb.AppendLine(empty ? "Correct sector contents." : "Incorrect sector contents.");
|
||||
|
||||
@@ -405,15 +403,13 @@ public static class Sector
|
||||
sb.AppendLine(correctEccP == true ? "Correct ECC P." : "Incorrect ECC P.");
|
||||
sb.AppendLine(correctEccQ == true ? "Correct ECC Q." : "Incorrect ECC Q.");
|
||||
|
||||
for(int i = 2068; i < 2076; i++)
|
||||
{
|
||||
for(var i = 2068; i < 2076; i++)
|
||||
if(buffer[i] != 0x00)
|
||||
{
|
||||
empty = false;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
sb.AppendLine(empty ? "Correct zero fill." : "Incorrect zero fill.");
|
||||
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.CD;
|
||||
|
||||
using System;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
|
||||
namespace Aaru.Decoders.CD;
|
||||
|
||||
public class SectorBuilder
|
||||
{
|
||||
readonly byte[] _eccBTable;
|
||||
@@ -46,7 +46,7 @@ public class SectorBuilder
|
||||
for(uint i = 0; i < 256; i++)
|
||||
{
|
||||
uint edc = i;
|
||||
uint j = (uint)((i << 1) ^ ((i & 0x80) == 0x80 ? 0x11D : 0));
|
||||
var j = (uint)((i << 1) ^ ((i & 0x80) == 0x80 ? 0x11D : 0));
|
||||
_eccFTable[i] = (byte)j;
|
||||
_eccBTable[i ^ j] = (byte)i;
|
||||
|
||||
@@ -81,9 +81,9 @@ public class SectorBuilder
|
||||
|
||||
(byte minute, byte second, byte frame) msf = LbaToMsf(lba);
|
||||
|
||||
sector[0x00C] = (byte)(((msf.minute / 10) << 4) + (msf.minute % 10));
|
||||
sector[0x00D] = (byte)(((msf.second / 10) << 4) + (msf.second % 10));
|
||||
sector[0x00E] = (byte)(((msf.frame / 10) << 4) + (msf.frame % 10));
|
||||
sector[0x00C] = (byte)(((msf.minute / 10) << 4) + msf.minute % 10);
|
||||
sector[0x00D] = (byte)(((msf.second / 10) << 4) + msf.second % 10);
|
||||
sector[0x00E] = (byte)(((msf.frame / 10) << 4) + msf.frame % 10);
|
||||
|
||||
switch(type)
|
||||
{
|
||||
@@ -162,7 +162,7 @@ public class SectorBuilder
|
||||
default: return;
|
||||
}
|
||||
|
||||
byte[] zeroaddress = new byte[4];
|
||||
var zeroaddress = new byte[4];
|
||||
|
||||
switch(type)
|
||||
{
|
||||
@@ -196,8 +196,7 @@ public class SectorBuilder
|
||||
//
|
||||
}
|
||||
|
||||
void EccWriteSector(byte[] address, byte[] data, ref byte[] ecc, int addressOffset, int dataOffset,
|
||||
int eccOffset)
|
||||
void EccWriteSector(byte[] address, byte[] data, ref byte[] ecc, int addressOffset, int dataOffset, int eccOffset)
|
||||
{
|
||||
WriteEcc(address, data, 86, 24, 2, 86, ref ecc, addressOffset, dataOffset, eccOffset); // P
|
||||
WriteEcc(address, data, 52, 43, 86, 88, ref ecc, addressOffset, dataOffset, eccOffset + 0xAC); // Q
|
||||
@@ -211,7 +210,7 @@ public class SectorBuilder
|
||||
|
||||
for(major = 0; major < majorCount; major++)
|
||||
{
|
||||
uint idx = ((major >> 1) * majorMult) + (major & 1);
|
||||
uint idx = (major >> 1) * majorMult + (major & 1);
|
||||
byte eccA = 0;
|
||||
byte eccB = 0;
|
||||
uint minor;
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.CD;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Aaru.Console;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.CD;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
@@ -77,16 +77,16 @@ public static class Session
|
||||
return null;
|
||||
}
|
||||
|
||||
for(int i = 0; i < (decoded.DataLength - 2) / 8; i++)
|
||||
for(var i = 0; i < (decoded.DataLength - 2) / 8; i++)
|
||||
{
|
||||
decoded.TrackDescriptors[i].Reserved1 = CDSessionInfoResponse[0 + (i * 8) + 4];
|
||||
decoded.TrackDescriptors[i].ADR = (byte)((CDSessionInfoResponse[1 + (i * 8) + 4] & 0xF0) >> 4);
|
||||
decoded.TrackDescriptors[i].CONTROL = (byte)(CDSessionInfoResponse[1 + (i * 8) + 4] & 0x0F);
|
||||
decoded.TrackDescriptors[i].TrackNumber = CDSessionInfoResponse[2 + (i * 8) + 4];
|
||||
decoded.TrackDescriptors[i].Reserved2 = CDSessionInfoResponse[3 + (i * 8) + 4];
|
||||
decoded.TrackDescriptors[i].Reserved1 = CDSessionInfoResponse[0 + i * 8 + 4];
|
||||
decoded.TrackDescriptors[i].ADR = (byte)((CDSessionInfoResponse[1 + i * 8 + 4] & 0xF0) >> 4);
|
||||
decoded.TrackDescriptors[i].CONTROL = (byte)(CDSessionInfoResponse[1 + i * 8 + 4] & 0x0F);
|
||||
decoded.TrackDescriptors[i].TrackNumber = CDSessionInfoResponse[2 + i * 8 + 4];
|
||||
decoded.TrackDescriptors[i].Reserved2 = CDSessionInfoResponse[3 + i * 8 + 4];
|
||||
|
||||
decoded.TrackDescriptors[i].TrackStartAddress =
|
||||
BigEndianBitConverter.ToUInt32(CDSessionInfoResponse, 4 + (i * 8) + 4);
|
||||
BigEndianBitConverter.ToUInt32(CDSessionInfoResponse, 4 + i * 8 + 4);
|
||||
}
|
||||
|
||||
return decoded;
|
||||
@@ -106,8 +106,7 @@ public static class Session
|
||||
|
||||
foreach(TrackDataDescriptor descriptor in response.TrackDescriptors)
|
||||
{
|
||||
sb.AppendFormat("First track number in last complete session: {0}", descriptor.TrackNumber).
|
||||
AppendLine();
|
||||
sb.AppendFormat("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,
|
||||
(descriptor.TrackStartAddress & 0x0000FF00) >> 8,
|
||||
|
||||
160
CD/Subchannel.cs
160
CD/Subchannel.cs
@@ -26,11 +26,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.CD;
|
||||
|
||||
using System;
|
||||
using Aaru.Checksums;
|
||||
|
||||
namespace Aaru.Decoders.CD;
|
||||
|
||||
public static class Subchannel
|
||||
{
|
||||
static readonly string[] _isrcTable =
|
||||
@@ -53,17 +53,17 @@ public static class Subchannel
|
||||
if((q[0] & 0xF) == 1 ||
|
||||
(q[0] & 0xF) == 5)
|
||||
{
|
||||
q[1] = (byte)(((q[1] / 10) << 4) + (q[1] % 10));
|
||||
q[2] = (byte)(((q[2] / 10) << 4) + (q[2] % 10));
|
||||
q[3] = (byte)(((q[3] / 10) << 4) + (q[3] % 10));
|
||||
q[4] = (byte)(((q[4] / 10) << 4) + (q[4] % 10));
|
||||
q[5] = (byte)(((q[5] / 10) << 4) + (q[5] % 10));
|
||||
q[6] = (byte)(((q[6] / 10) << 4) + (q[6] % 10));
|
||||
q[7] = (byte)(((q[7] / 10) << 4) + (q[7] % 10));
|
||||
q[8] = (byte)(((q[8] / 10) << 4) + (q[8] % 10));
|
||||
q[1] = (byte)(((q[1] / 10) << 4) + q[1] % 10);
|
||||
q[2] = (byte)(((q[2] / 10) << 4) + q[2] % 10);
|
||||
q[3] = (byte)(((q[3] / 10) << 4) + q[3] % 10);
|
||||
q[4] = (byte)(((q[4] / 10) << 4) + q[4] % 10);
|
||||
q[5] = (byte)(((q[5] / 10) << 4) + q[5] % 10);
|
||||
q[6] = (byte)(((q[6] / 10) << 4) + q[6] % 10);
|
||||
q[7] = (byte)(((q[7] / 10) << 4) + q[7] % 10);
|
||||
q[8] = (byte)(((q[8] / 10) << 4) + q[8] % 10);
|
||||
}
|
||||
|
||||
q[9] = (byte)(((q[9] / 10) << 4) + (q[9] % 10));
|
||||
q[9] = (byte)(((q[9] / 10) << 4) + q[9] % 10);
|
||||
}
|
||||
|
||||
public static void BcdToBinaryQ(byte[] q)
|
||||
@@ -71,31 +71,29 @@ public static class Subchannel
|
||||
if((q[0] & 0xF) == 1 ||
|
||||
(q[0] & 0xF) == 5)
|
||||
{
|
||||
q[1] = (byte)((q[1] / 16 * 10) + (q[1] & 0x0F));
|
||||
q[2] = (byte)((q[2] / 16 * 10) + (q[2] & 0x0F));
|
||||
q[3] = (byte)((q[3] / 16 * 10) + (q[3] & 0x0F));
|
||||
q[4] = (byte)((q[4] / 16 * 10) + (q[4] & 0x0F));
|
||||
q[5] = (byte)((q[5] / 16 * 10) + (q[5] & 0x0F));
|
||||
q[6] = (byte)((q[6] / 16 * 10) + (q[6] & 0x0F));
|
||||
q[7] = (byte)((q[7] / 16 * 10) + (q[7] & 0x0F));
|
||||
q[8] = (byte)((q[8] / 16 * 10) + (q[8] & 0x0F));
|
||||
q[1] = (byte)(q[1] / 16 * 10 + (q[1] & 0x0F));
|
||||
q[2] = (byte)(q[2] / 16 * 10 + (q[2] & 0x0F));
|
||||
q[3] = (byte)(q[3] / 16 * 10 + (q[3] & 0x0F));
|
||||
q[4] = (byte)(q[4] / 16 * 10 + (q[4] & 0x0F));
|
||||
q[5] = (byte)(q[5] / 16 * 10 + (q[5] & 0x0F));
|
||||
q[6] = (byte)(q[6] / 16 * 10 + (q[6] & 0x0F));
|
||||
q[7] = (byte)(q[7] / 16 * 10 + (q[7] & 0x0F));
|
||||
q[8] = (byte)(q[8] / 16 * 10 + (q[8] & 0x0F));
|
||||
}
|
||||
|
||||
q[9] = (byte)((q[9] / 16 * 10) + (q[9] & 0x0F));
|
||||
q[9] = (byte)(q[9] / 16 * 10 + (q[9] & 0x0F));
|
||||
}
|
||||
|
||||
public static byte[] ConvertQToRaw(byte[] subchannel)
|
||||
{
|
||||
int pos = 0;
|
||||
byte[] subBuf = new byte[subchannel.Length * 6];
|
||||
var pos = 0;
|
||||
var subBuf = new byte[subchannel.Length * 6];
|
||||
|
||||
for(int i = 0; i < subchannel.Length; i += 16)
|
||||
for(var i = 0; i < subchannel.Length; i += 16)
|
||||
{
|
||||
// P
|
||||
if((subchannel[i + 15] & 0x80) <= 0)
|
||||
{
|
||||
pos += 12;
|
||||
}
|
||||
else
|
||||
{
|
||||
subBuf[pos++] = 0xFF;
|
||||
@@ -135,13 +133,13 @@ public static class Subchannel
|
||||
|
||||
public static byte[] Interleave(byte[] subchannel)
|
||||
{
|
||||
byte[] subBuf = new byte[subchannel.Length];
|
||||
var subBuf = new byte[subchannel.Length];
|
||||
|
||||
int outPos = 0;
|
||||
var outPos = 0;
|
||||
|
||||
for(int inPos = 0; inPos < subchannel.Length; inPos += 96)
|
||||
for(var inPos = 0; inPos < subchannel.Length; inPos += 96)
|
||||
{
|
||||
for(int i = 0; i < 12; i++)
|
||||
for(var i = 0; i < 12; i++)
|
||||
{
|
||||
// P
|
||||
subBuf[outPos + 0] += (byte)(subchannel[inPos + i + 0] & 0x80);
|
||||
@@ -231,12 +229,12 @@ public static class Subchannel
|
||||
|
||||
public static byte[] Deinterleave(byte[] subchannel)
|
||||
{
|
||||
byte[] subBuf = new byte[subchannel.Length];
|
||||
int inPos = 0;
|
||||
var subBuf = new byte[subchannel.Length];
|
||||
var inPos = 0;
|
||||
|
||||
for(int outPos = 0; outPos < subchannel.Length; outPos += 96)
|
||||
for(var outPos = 0; outPos < subchannel.Length; outPos += 96)
|
||||
{
|
||||
for(int i = 0; i < 12; i++)
|
||||
for(var i = 0; i < 12; i++)
|
||||
{
|
||||
// P
|
||||
subBuf[outPos + i + 0] += (byte)((subchannel[inPos + 0] & 0x80) >> 0);
|
||||
@@ -338,26 +336,26 @@ public static class Subchannel
|
||||
int adr = subBuf[0] & 0x0F;
|
||||
|
||||
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 => $"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}"
|
||||
};
|
||||
|
||||
string copy = (control & 0x02) > 0 ? "copy permitted" : "copy prohibited";
|
||||
|
||||
if(bcd)
|
||||
BcdToBinaryQ(subBuf);
|
||||
|
||||
int qPos = (subBuf[3] * 60 * 75) + (subBuf[4] * 75) + subBuf[5] - 150;
|
||||
int qPos = subBuf[3] * 60 * 75 + subBuf[4] * 75 + subBuf[5] - 150;
|
||||
byte pmin = subBuf[7];
|
||||
byte psec = subBuf[8];
|
||||
|
||||
int qStart = (subBuf[7] * 60 * 75) + (subBuf[8] * 75) + subBuf[9] - 150;
|
||||
int nextPos = (subBuf[3] * 60 * 75) + (subBuf[4] * 75) + subBuf[5] - 150;
|
||||
int qStart = subBuf[7] * 60 * 75 + subBuf[8] * 75 + subBuf[9] - 150;
|
||||
int nextPos = subBuf[3] * 60 * 75 + subBuf[4] * 75 + subBuf[5] - 150;
|
||||
byte zero = subBuf[6];
|
||||
int maxOut = (subBuf[7] * 60 * 75) + (subBuf[8] * 75) + subBuf[9] - 150;
|
||||
int maxOut = subBuf[7] * 60 * 75 + subBuf[8] * 75 + subBuf[9] - 150;
|
||||
bool final = subBuf[3] == 0xFF && subBuf[4] == 0xFF && subBuf[5] == 0xFF;
|
||||
|
||||
BinaryToBcdQ(subBuf);
|
||||
@@ -374,12 +372,12 @@ public static class Subchannel
|
||||
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 => "CD-DA / CD-ROM",
|
||||
0x10 => "CD-i",
|
||||
0x20 => "CD-ROM XA",
|
||||
_ => $"unknown {subBuf[0]: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} 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")}";
|
||||
@@ -401,23 +399,17 @@ public static class Subchannel
|
||||
$"{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")}";
|
||||
|
||||
if(subBuf[2] <= 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")}";
|
||||
}
|
||||
|
||||
if(subBuf[2] == 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")}";
|
||||
}
|
||||
|
||||
if(subBuf[2] == 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")}";
|
||||
}
|
||||
|
||||
if(subBuf[2] != 0xB2 &&
|
||||
subBuf[2] != 0xB3 &&
|
||||
@@ -450,23 +442,22 @@ public static class Subchannel
|
||||
area = subBuf[1] == 0xAA ? "Lead-out" : "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 =>
|
||||
$"{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")}"
|
||||
};
|
||||
}
|
||||
|
||||
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}";
|
||||
$"{_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}";
|
||||
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}";
|
||||
|
||||
public static byte GetIsrcCode(char c)
|
||||
{
|
||||
@@ -512,15 +503,14 @@ public static class Subchannel
|
||||
}
|
||||
}
|
||||
|
||||
public static byte[] Generate(int sector, uint trackSequence, int pregap, int trackStart, byte flags,
|
||||
byte index)
|
||||
public static byte[] Generate(int sector, uint trackSequence, int pregap, int trackStart, byte flags, byte index)
|
||||
{
|
||||
bool isPregap = sector < 0 || sector <= trackStart + pregap;
|
||||
|
||||
if(index == 0)
|
||||
index = (byte)(isPregap ? 0 : 1);
|
||||
|
||||
byte[] sub = new byte[96];
|
||||
var sub = new byte[96];
|
||||
|
||||
// P
|
||||
if(isPregap)
|
||||
@@ -540,7 +530,7 @@ public static class Subchannel
|
||||
}
|
||||
|
||||
// Q
|
||||
byte[] q = new byte[12];
|
||||
var q = new byte[12];
|
||||
|
||||
q[0] = (byte)((flags << 4) + 1);
|
||||
q[1] = (byte)trackSequence;
|
||||
@@ -556,12 +546,12 @@ public static class Subchannel
|
||||
sector += 150;
|
||||
|
||||
int min = relative / 60 / 75;
|
||||
int sec = (relative / 75) - (min * 60);
|
||||
int frame = relative - (min * 60 * 75) - (sec * 75);
|
||||
int sec = relative / 75 - min * 60;
|
||||
int frame = relative - min * 60 * 75 - sec * 75;
|
||||
|
||||
int amin = sector / 60 / 75;
|
||||
int asec = (sector / 75) - (amin * 60);
|
||||
int aframe = sector - (amin * 60 * 75) - (asec * 75);
|
||||
int asec = sector / 75 - amin * 60;
|
||||
int aframe = sector - amin * 60 * 75 - asec * 75;
|
||||
|
||||
q[3] = (byte)min;
|
||||
q[4] = (byte)sec;
|
||||
@@ -571,16 +561,16 @@ public static class Subchannel
|
||||
q[8] = (byte)asec;
|
||||
q[9] = (byte)aframe;
|
||||
|
||||
q[1] = (byte)(((q[1] / 10) << 4) + (q[1] % 10));
|
||||
q[2] = (byte)(((q[2] / 10) << 4) + (q[2] % 10));
|
||||
q[3] = (byte)(((q[3] / 10) << 4) + (q[3] % 10));
|
||||
q[4] = (byte)(((q[4] / 10) << 4) + (q[4] % 10));
|
||||
q[5] = (byte)(((q[5] / 10) << 4) + (q[5] % 10));
|
||||
q[6] = (byte)(((q[6] / 10) << 4) + (q[6] % 10));
|
||||
q[7] = (byte)(((q[7] / 10) << 4) + (q[7] % 10));
|
||||
q[8] = (byte)(((q[8] / 10) << 4) + (q[8] % 10));
|
||||
q[1] = (byte)(((q[1] / 10) << 4) + q[1] % 10);
|
||||
q[2] = (byte)(((q[2] / 10) << 4) + q[2] % 10);
|
||||
q[3] = (byte)(((q[3] / 10) << 4) + q[3] % 10);
|
||||
q[4] = (byte)(((q[4] / 10) << 4) + q[4] % 10);
|
||||
q[5] = (byte)(((q[5] / 10) << 4) + q[5] % 10);
|
||||
q[6] = (byte)(((q[6] / 10) << 4) + q[6] % 10);
|
||||
q[7] = (byte)(((q[7] / 10) << 4) + q[7] % 10);
|
||||
q[8] = (byte)(((q[8] / 10) << 4) + q[8] % 10);
|
||||
|
||||
q[9] = (byte)(((q[9] / 10) << 4) + (q[9] % 10));
|
||||
q[9] = (byte)(((q[9] / 10) << 4) + q[9] % 10);
|
||||
|
||||
CRC16CCITTContext.Data(q, 10, out byte[] qCrc);
|
||||
q[10] = qCrc[0];
|
||||
|
||||
18
CD/TOC.cs
18
CD/TOC.cs
@@ -30,13 +30,13 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.CD;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Aaru.Console;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.CD;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
@@ -80,16 +80,16 @@ public static class TOC
|
||||
return null;
|
||||
}
|
||||
|
||||
for(int i = 0; i < (decoded.DataLength - 2) / 8; i++)
|
||||
for(var i = 0; i < (decoded.DataLength - 2) / 8; i++)
|
||||
{
|
||||
decoded.TrackDescriptors[i].Reserved1 = CDTOCResponse[0 + (i * 8) + 4];
|
||||
decoded.TrackDescriptors[i].ADR = (byte)((CDTOCResponse[1 + (i * 8) + 4] & 0xF0) >> 4);
|
||||
decoded.TrackDescriptors[i].CONTROL = (byte)(CDTOCResponse[1 + (i * 8) + 4] & 0x0F);
|
||||
decoded.TrackDescriptors[i].TrackNumber = CDTOCResponse[2 + (i * 8) + 4];
|
||||
decoded.TrackDescriptors[i].Reserved2 = CDTOCResponse[3 + (i * 8) + 4];
|
||||
decoded.TrackDescriptors[i].Reserved1 = CDTOCResponse[0 + i * 8 + 4];
|
||||
decoded.TrackDescriptors[i].ADR = (byte)((CDTOCResponse[1 + i * 8 + 4] & 0xF0) >> 4);
|
||||
decoded.TrackDescriptors[i].CONTROL = (byte)(CDTOCResponse[1 + i * 8 + 4] & 0x0F);
|
||||
decoded.TrackDescriptors[i].TrackNumber = CDTOCResponse[2 + i * 8 + 4];
|
||||
decoded.TrackDescriptors[i].Reserved2 = CDTOCResponse[3 + i * 8 + 4];
|
||||
|
||||
decoded.TrackDescriptors[i].TrackStartAddress =
|
||||
BigEndianBitConverter.ToUInt32(CDTOCResponse, 4 + (i * 8) + 4);
|
||||
BigEndianBitConverter.ToUInt32(CDTOCResponse, 4 + i * 8 + 4);
|
||||
}
|
||||
|
||||
return decoded;
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Aaru.Decoders.DVD;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Aaru.Decoders.DVD;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Aaru.Decoders.DVD;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Aaru.Decoders.DVD;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
// Copyright © 2020-2022 Rebecca Wallander
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.DVD;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.DVD;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
@@ -91,15 +91,12 @@ public static class CSS_CPRM
|
||||
public static string PrettifyRegionalPlaybackControlState(RegionalPlaybackControlState? rpc)
|
||||
{
|
||||
if(rpc == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
RegionalPlaybackControlState decoded = rpc.Value;
|
||||
var sb = new StringBuilder();
|
||||
|
||||
var typeCode =
|
||||
(TypeCode)((decoded.TypeCode_VendorResetsAvailable_UserControlledChangesAvailable & 0xc0) >> 6);
|
||||
var typeCode = (TypeCode)((decoded.TypeCode_VendorResetsAvailable_UserControlledChangesAvailable & 0xc0) >> 6);
|
||||
|
||||
int vendorResets = (decoded.TypeCode_VendorResetsAvailable_UserControlledChangesAvailable & 0x38) >> 3;
|
||||
|
||||
@@ -345,7 +342,9 @@ public static class CSS_CPRM
|
||||
|
||||
enum TypeCode
|
||||
{
|
||||
None = 0, Set = 1, LastChance = 2,
|
||||
Perm = 3
|
||||
None = 0,
|
||||
Set = 1,
|
||||
LastChance = 2,
|
||||
Perm = 3
|
||||
}
|
||||
}
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.DVD;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.DVD;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
|
||||
16
DVD/DDS.cs
16
DVD/DDS.cs
@@ -30,12 +30,12 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.DVD;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.DVD;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
@@ -91,7 +91,7 @@ public static class DDS
|
||||
Array.Copy(response, 14, dds.Reserved, 0, 6);
|
||||
dds.GroupCertificationFlags = new GroupCertificationFlag[24];
|
||||
|
||||
for(int i = 0; i < 24; i++)
|
||||
for(var i = 0; i < 24; i++)
|
||||
{
|
||||
dds.GroupCertificationFlags[i].InProcess |= (response[20 + i] & 0x80) == 0x80;
|
||||
dds.GroupCertificationFlags[i].PartialCertification |= (response[20 + i] & 0x40) == 0x40;
|
||||
@@ -115,9 +115,9 @@ public static class DDS
|
||||
dds.LSN0Location = (uint)((response[93] << 16) + (response[94] << 8) + response[95]);
|
||||
dds.StartLSNForZone = new uint[dds.Zones];
|
||||
|
||||
for(int i = 0; i < dds.Zones; i++)
|
||||
dds.StartLSNForZone[i] = (uint)((response[260 + (i * 4) + 1] << 16) +
|
||||
(response[260 + (i * 4) + 2] << 8) + response[260 + (i * 4) + 3]);
|
||||
for(var i = 0; i < dds.Zones; i++)
|
||||
dds.StartLSNForZone[i] = (uint)((response[260 + i * 4 + 1] << 16) + (response[260 + i * 4 + 2] << 8) +
|
||||
response[260 + i * 4 + 3]);
|
||||
}
|
||||
|
||||
return dds;
|
||||
@@ -154,7 +154,7 @@ public static class DDS
|
||||
sb.AppendFormat("DDS has been updated {0} times", decoded.UpdateCount).AppendLine();
|
||||
|
||||
if(decoded.Groups == 24)
|
||||
for(int i = 0; i < decoded.GroupCertificationFlags.Length; i++)
|
||||
for(var i = 0; i < decoded.GroupCertificationFlags.Length; i++)
|
||||
{
|
||||
if(decoded.GroupCertificationFlags[i].InProcess)
|
||||
{
|
||||
@@ -179,7 +179,7 @@ public static class DDS
|
||||
|
||||
sb.AppendFormat("LSN 0 is at PSN {0:X}h", decoded.LSN0Location).AppendLine();
|
||||
|
||||
for(int i = 0; i < decoded.StartLSNForZone.Length; i++)
|
||||
for(var i = 0; i < decoded.StartLSNForZone.Length; i++)
|
||||
sb.AppendFormat("Zone {0} starts at LSN {1}", i, decoded.StartLSNForZone[i]).AppendLine();
|
||||
}
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Aaru.Decoders.DVD;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
|
||||
27
DVD/Enums.cs
27
DVD/Enums.cs
@@ -30,10 +30,10 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Aaru.Decoders.DVD;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
#region Public enumerations
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum DiskCategory : byte
|
||||
@@ -86,8 +86,10 @@ public enum MaximumRateField : byte
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum LayerTypeFieldMask : byte
|
||||
{
|
||||
Embossed = 0x01, Recordable = 0x02, Rewritable = 0x04,
|
||||
Reserved = 0x08
|
||||
Embossed = 0x01,
|
||||
Recordable = 0x02,
|
||||
Rewritable = 0x04,
|
||||
Reserved = 0x08
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
@@ -143,7 +145,8 @@ public enum WPDiscTypes : byte
|
||||
/// <summary>Should not write without a cartridge</summary>
|
||||
DoNotWrite = 0x00,
|
||||
/// <summary>Can write without a cartridge</summary>
|
||||
CanWrite = 0x01, Reserved1 = 0x02, Reserved2 = 0x03
|
||||
CanWrite = 0x01, Reserved1 = 0x02,
|
||||
Reserved2 = 0x03
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
@@ -167,15 +170,21 @@ public enum DVDRAMDiscType
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum DVDLayerStructure
|
||||
{
|
||||
Unspecified = 0, InvertedStack = 1, TwoP = 2,
|
||||
Reserved = 3
|
||||
Unspecified = 0,
|
||||
InvertedStack = 1,
|
||||
TwoP = 2,
|
||||
Reserved = 3
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum DVDRecordingSpeed
|
||||
{
|
||||
None = 0, Two = 0, Four = 0x10,
|
||||
Six = 0x20, Eight = 0x30, Ten = 0x40,
|
||||
None = 0,
|
||||
Two = 0,
|
||||
Four = 0x10,
|
||||
Six = 0x20,
|
||||
Eight = 0x30,
|
||||
Ten = 0x40,
|
||||
Twelve = 0x50
|
||||
}
|
||||
#endregion
|
||||
@@ -30,10 +30,10 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Aaru.Decoders.DVD;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
|
||||
29
DVD/PFI.cs
29
DVD/PFI.cs
@@ -30,14 +30,14 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.DVD;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Aaru.CommonTypes;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.DVD;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
@@ -78,7 +78,7 @@ public static class PFI
|
||||
|
||||
if(response.Length == 2048)
|
||||
{
|
||||
byte[] tmp2 = new byte[2052];
|
||||
var tmp2 = new byte[2052];
|
||||
Array.Copy(response, 0, tmp2, 4, 2048);
|
||||
response = tmp2;
|
||||
}
|
||||
@@ -105,11 +105,9 @@ public static class PFI
|
||||
pfi.LinearDensity = (LinearDensityField)((response[7] & 0xF0) >> 4);
|
||||
pfi.TrackDensity = (TrackDensityField)(response[7] & 0x0F);
|
||||
|
||||
pfi.DataAreaStartPSN =
|
||||
(uint)((response[8] << 24) + (response[9] << 16) + (response[10] << 8) + response[11]);
|
||||
pfi.DataAreaStartPSN = (uint)((response[8] << 24) + (response[9] << 16) + (response[10] << 8) + response[11]);
|
||||
|
||||
pfi.DataAreaEndPSN =
|
||||
(uint)((response[12] << 24) + (response[13] << 16) + (response[14] << 8) + response[15]);
|
||||
pfi.DataAreaEndPSN = (uint)((response[12] << 24) + (response[13] << 16) + (response[14] << 8) + response[15]);
|
||||
|
||||
pfi.Layer0EndPSN = (uint)((response[16] << 24) + (response[17] << 16) + (response[18] << 8) + response[19]);
|
||||
|
||||
@@ -118,7 +116,6 @@ public static class PFI
|
||||
pfi.RecordedBookType = pfi.DiskCategory;
|
||||
|
||||
if(mediaType != MediaType.DVDROM)
|
||||
{
|
||||
switch(mediaType)
|
||||
{
|
||||
case MediaType.DVDPR:
|
||||
@@ -201,7 +198,6 @@ public static class PFI
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch(pfi.DiskCategory)
|
||||
{
|
||||
@@ -360,8 +356,7 @@ public static class PFI
|
||||
Array.Copy(response, 31, tmp, 0, 3);
|
||||
pfi.MediaTypeID = StringHandlers.CToString(tmp);
|
||||
|
||||
pfi.ProductRevision = pfi.DiskCategory == DiskCategory.DVDPRDL ? (byte)(response[34] & 0x3F)
|
||||
: response[34];
|
||||
pfi.ProductRevision = pfi.DiskCategory == DiskCategory.DVDPRDL ? (byte)(response[34] & 0x3F) : response[34];
|
||||
|
||||
pfi.PFIUsedInADIP = response[35];
|
||||
}
|
||||
@@ -499,7 +494,7 @@ public static class PFI
|
||||
break;
|
||||
}
|
||||
|
||||
string categorySentence = "Disc is a {0} {1} version {2}";
|
||||
var categorySentence = "Disc is a {0} {1} version {2}";
|
||||
|
||||
switch(decoded.DiskCategory)
|
||||
{
|
||||
@@ -677,15 +672,14 @@ public static class PFI
|
||||
|
||||
break;
|
||||
default:
|
||||
sb.AppendFormat(categorySentence, sizeString, "unknown disc type", decoded.PartVersion).
|
||||
AppendLine();
|
||||
sb.AppendFormat(categorySentence, sizeString, "unknown disc type", decoded.PartVersion).AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if(decoded.RecordedBookType != decoded.DiskCategory)
|
||||
{
|
||||
string bookTypeSentence = "Disc book type is {0}";
|
||||
var bookTypeSentence = "Disc book type is {0}";
|
||||
|
||||
switch(decoded.RecordedBookType)
|
||||
{
|
||||
@@ -916,8 +910,7 @@ public static class PFI
|
||||
sb.AppendFormat("Current Border-Out first sector is PSN {0:X}h", decoded.CurrentBorderOutSector).
|
||||
AppendLine();
|
||||
|
||||
sb.AppendFormat("Next Border-In first sector is PSN {0:X}h", decoded.NextBorderInSector).
|
||||
AppendLine();
|
||||
sb.AppendFormat("Next Border-In first sector is PSN {0:X}h", decoded.NextBorderInSector).AppendLine();
|
||||
|
||||
break;
|
||||
case DiskCategory.DVDPR:
|
||||
@@ -971,7 +964,7 @@ public static class PFI
|
||||
|
||||
public static string ManufacturerFromDVDPlusID(string manufacturerId)
|
||||
{
|
||||
string manufacturer = "";
|
||||
var manufacturer = "";
|
||||
|
||||
switch(manufacturerId)
|
||||
{
|
||||
|
||||
15
DVD/PRI.cs
15
DVD/PRI.cs
@@ -30,13 +30,13 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.DVD;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.DVD;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
@@ -157,8 +157,7 @@ public static class PRI
|
||||
sb.AppendLine("General purpose disc for use in general purpose drives");
|
||||
}
|
||||
|
||||
sb.AppendLine((decoded.DiscPhysicalCode & 0x80) > 0 ? "Disc track pitch is 0,74 μm"
|
||||
: "Unknown track pitch");
|
||||
sb.AppendLine((decoded.DiscPhysicalCode & 0x80) > 0 ? "Disc track pitch is 0,74 μm" : "Unknown track pitch");
|
||||
|
||||
sb.AppendLine((decoded.DiscPhysicalCode & 0x40) > 0 ? "Reference velocity is 3,49 m/s"
|
||||
: "Unknown reference velocity");
|
||||
@@ -255,9 +254,7 @@ public static class PRI
|
||||
sb.AppendFormat("Recommended recording power is {0} mW", recordingPower).AppendLine();
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendLine("Recording power is not specified");
|
||||
}
|
||||
|
||||
if((decoded.WaveLengthCode & 0xF) > 0)
|
||||
{
|
||||
@@ -330,9 +327,7 @@ public static class PRI
|
||||
sb.AppendFormat("Recommended erasing power ratio is {0} ε", erasingPower).AppendLine();
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendLine("Erasing power ratio is not specified");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -401,7 +396,7 @@ public static class PRI
|
||||
|
||||
if(decoded.WaveLengthCode > 0)
|
||||
{
|
||||
int wavelength = 0;
|
||||
var wavelength = 0;
|
||||
|
||||
switch(decoded.WaveLengthCode)
|
||||
{
|
||||
@@ -484,7 +479,7 @@ public static class PRI
|
||||
|
||||
public static string ManufacturerFromPrePit(string manufacturerId)
|
||||
{
|
||||
string manufacturer = "";
|
||||
var manufacturer = "";
|
||||
|
||||
// Bad thing is that it also includes a media code...
|
||||
if(manufacturerId.StartsWith("RITEK", StringComparison.Ordinal))
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Aaru.Decoders.DVD;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
|
||||
16
DVD/Spare.cs
16
DVD/Spare.cs
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.DVD;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.DVD;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
@@ -59,11 +59,10 @@ public static class Spare
|
||||
|
||||
return new SpareAreaInformation
|
||||
{
|
||||
DataLength = (ushort)((response[0] << 8) + response[1]),
|
||||
Reserved1 = response[2],
|
||||
Reserved2 = response[3],
|
||||
UnusedPrimaryBlocks =
|
||||
(uint)((response[4] << 24) + (response[5] << 16) + (response[6] << 8) + response[7]),
|
||||
DataLength = (ushort)((response[0] << 8) + response[1]),
|
||||
Reserved1 = response[2],
|
||||
Reserved2 = response[3],
|
||||
UnusedPrimaryBlocks = (uint)((response[4] << 24) + (response[5] << 16) + (response[6] << 8) + response[7]),
|
||||
UnusedSupplementaryBlocks =
|
||||
(uint)((response[8] << 24) + (response[9] << 16) + (response[10] << 8) + response[11]),
|
||||
AllocatedSupplementaryBlocks =
|
||||
@@ -82,8 +81,7 @@ public static class Spare
|
||||
sb.AppendFormat("{0} unused primary spare blocks", decoded.UnusedPrimaryBlocks).AppendLine();
|
||||
sb.AppendFormat("{0} unused supplementary spare blocks", decoded.UnusedSupplementaryBlocks).AppendLine();
|
||||
|
||||
sb.AppendFormat("{0} allocated supplementary spare blocks", decoded.AllocatedSupplementaryBlocks).
|
||||
AppendLine();
|
||||
sb.AppendFormat("{0} allocated supplementary spare blocks", decoded.AllocatedSupplementaryBlocks).AppendLine();
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Aaru.Decoders.DVD;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.Floppy;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Aaru.Decoders.Floppy;
|
||||
|
||||
/// <summary>Methods and structures for Commodore Amiga decoding</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.Floppy;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
@@ -38,8 +40,6 @@ using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using Aaru.Console;
|
||||
|
||||
namespace Aaru.Decoders.Floppy;
|
||||
|
||||
/// <summary>Methods and structures for Apple ][ floppy decoding</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
@@ -155,29 +155,29 @@ public static class Apple2
|
||||
data.Length != 410)
|
||||
return null;
|
||||
|
||||
byte[] buffer = new byte[data.Length];
|
||||
byte carry = 0;
|
||||
var buffer = new byte[data.Length];
|
||||
byte carry = 0;
|
||||
|
||||
for(int i = 0; i < data.Length; i++)
|
||||
for(var i = 0; i < data.Length; i++)
|
||||
{
|
||||
carry ^= ReadTable5and3[data[i]];
|
||||
buffer[i] = carry;
|
||||
}
|
||||
|
||||
byte[] output = new byte[256];
|
||||
var output = new byte[256];
|
||||
|
||||
for(int i = 0; i < 51; i++)
|
||||
for(var i = 0; i < 51; i++)
|
||||
{
|
||||
byte b1 = buffer[(51 * 3) - i];
|
||||
byte b2 = buffer[(51 * 2) - i];
|
||||
byte b1 = buffer[51 * 3 - i];
|
||||
byte b2 = buffer[51 * 2 - i];
|
||||
byte b3 = buffer[51 - i];
|
||||
byte b4 = (byte)((((b1 & 2) << 1) | (b2 & 2) | ((b3 & 2) >> 1)) & 0xFF);
|
||||
byte b5 = (byte)((((b1 & 1) << 2) | ((b2 & 1) << 1) | (b3 & 1)) & 0xFF);
|
||||
output[250 - (5 * i)] = (byte)(((buffer[i + (51 * 3) + 1] << 3) | ((b1 >> 2) & 0x7)) & 0xFF);
|
||||
output[251 - (5 * i)] = (byte)(((buffer[i + (51 * 4) + 1] << 3) | ((b2 >> 2) & 0x7)) & 0xFF);
|
||||
output[252 - (5 * i)] = (byte)(((buffer[i + (51 * 5) + 1] << 3) | ((b3 >> 2) & 0x7)) & 0xFF);
|
||||
output[253 - (5 * i)] = (byte)(((buffer[i + (51 * 6) + 1] << 3) | b4) & 0xFF);
|
||||
output[254 - (5 * i)] = (byte)(((buffer[i + (51 * 7) + 1] << 3) | b5) & 0xFF);
|
||||
var b4 = (byte)((((b1 & 2) << 1) | (b2 & 2) | ((b3 & 2) >> 1)) & 0xFF);
|
||||
var b5 = (byte)((((b1 & 1) << 2) | ((b2 & 1) << 1) | (b3 & 1)) & 0xFF);
|
||||
output[250 - 5 * i] = (byte)(((buffer[i + 51 * 3 + 1] << 3) | ((b1 >> 2) & 0x7)) & 0xFF);
|
||||
output[251 - 5 * i] = (byte)(((buffer[i + 51 * 4 + 1] << 3) | ((b2 >> 2) & 0x7)) & 0xFF);
|
||||
output[252 - 5 * i] = (byte)(((buffer[i + 51 * 5 + 1] << 3) | ((b3 >> 2) & 0x7)) & 0xFF);
|
||||
output[253 - 5 * i] = (byte)(((buffer[i + 51 * 6 + 1] << 3) | b4) & 0xFF);
|
||||
output[254 - 5 * i] = (byte)(((buffer[i + 51 * 7 + 1] << 3) | b5) & 0xFF);
|
||||
}
|
||||
|
||||
output[255] = (byte)(((buffer[409] << 3) | (buffer[0] & 0x7)) & 0xFF);
|
||||
@@ -193,16 +193,16 @@ public static class Apple2
|
||||
data.Length != 342)
|
||||
return null;
|
||||
|
||||
byte[] buffer = new byte[data.Length];
|
||||
byte carry = 0;
|
||||
var buffer = new byte[data.Length];
|
||||
byte carry = 0;
|
||||
|
||||
for(int i = 0; i < data.Length; i++)
|
||||
for(var i = 0; i < data.Length; i++)
|
||||
{
|
||||
carry ^= ReadTable6and2[data[i]];
|
||||
buffer[i] = carry;
|
||||
}
|
||||
|
||||
byte[] output = new byte[256];
|
||||
var output = new byte[256];
|
||||
|
||||
for(uint i = 0; i < 256; i++)
|
||||
{
|
||||
@@ -220,8 +220,8 @@ public static class Apple2
|
||||
}
|
||||
else
|
||||
{
|
||||
output[i] |= (byte)(((buffer[i - (86 * 2)] & 0x10) >> 3) & 0xFF);
|
||||
output[i] |= (byte)(((buffer[i - (86 * 2)] & 0x20) >> 5) & 0xFF);
|
||||
output[i] |= (byte)(((buffer[i - 86 * 2] & 0x10) >> 3) & 0xFF);
|
||||
output[i] |= (byte)(((buffer[i - 86 * 2] & 0x20) >> 5) & 0xFF);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -326,9 +326,9 @@ public static class Apple2
|
||||
sector.addressField.epilogue[2]);
|
||||
|
||||
position += 14;
|
||||
int syncCount = 0;
|
||||
bool onSync = false;
|
||||
var gaps = new MemoryStream();
|
||||
var syncCount = 0;
|
||||
var onSync = false;
|
||||
var gaps = new MemoryStream();
|
||||
|
||||
while(data[position] == 0xFF)
|
||||
{
|
||||
@@ -471,13 +471,13 @@ public static class Apple2
|
||||
|
||||
public static RawTrack MarshalTrack(byte[] data, out int endOffset, int offset = 0)
|
||||
{
|
||||
int position = offset;
|
||||
bool firstSector = true;
|
||||
bool onSync = false;
|
||||
var gaps = new MemoryStream();
|
||||
int count = 0;
|
||||
List<RawSector> sectors = new List<RawSector>();
|
||||
byte[] trackNumber = new byte[2];
|
||||
int position = offset;
|
||||
var firstSector = true;
|
||||
var onSync = false;
|
||||
var gaps = new MemoryStream();
|
||||
var count = 0;
|
||||
var sectors = new List<RawSector>();
|
||||
var trackNumber = new byte[2];
|
||||
endOffset = offset;
|
||||
|
||||
while(position < data.Length &&
|
||||
@@ -560,8 +560,8 @@ public static class Apple2
|
||||
public static List<RawTrack> MarshalDisk(byte[] data, out int endOffset, int offset = 0)
|
||||
{
|
||||
endOffset = offset;
|
||||
List<RawTrack> tracks = new List<RawTrack>();
|
||||
int position = offset;
|
||||
var tracks = new List<RawTrack>();
|
||||
int position = offset;
|
||||
|
||||
RawTrack track = MarshalTrack(data, out position, position);
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.Floppy;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
@@ -37,7 +39,6 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Aaru.Decoders.Floppy;
|
||||
// Information from:
|
||||
// Inside Macintosh, Volume II, ISBN 0-201-17732-3
|
||||
|
||||
@@ -53,16 +54,16 @@ public static class AppleSony
|
||||
sector.addressField.prologue[2] != 0x96)
|
||||
return null;
|
||||
|
||||
byte[] bf1 = new byte[175];
|
||||
byte[] bf2 = new byte[175];
|
||||
byte[] bf3 = new byte[175];
|
||||
var bf1 = new byte[175];
|
||||
var bf2 = new byte[175];
|
||||
var bf3 = new byte[175];
|
||||
byte[] nib_data = sector.dataField.data;
|
||||
var ms = new MemoryStream();
|
||||
|
||||
int j = 0;
|
||||
var j = 0;
|
||||
byte w3 = 0;
|
||||
|
||||
for(int i = 0; i <= 174; i++)
|
||||
for(var i = 0; i <= 174; i++)
|
||||
{
|
||||
byte w4 = nib_data[j++];
|
||||
byte w1 = nib_data[j++];
|
||||
@@ -88,7 +89,7 @@ public static class AppleSony
|
||||
if((ck1 & 0x0100) > 0)
|
||||
ck1++;
|
||||
|
||||
byte carry = (byte)((bf1[j] ^ ck1) & 0xFF);
|
||||
var carry = (byte)((bf1[j] ^ ck1) & 0xFF);
|
||||
ck3 += carry;
|
||||
|
||||
if((ck1 & 0x0100) > 0)
|
||||
@@ -179,9 +180,9 @@ public static class AppleSony
|
||||
};
|
||||
|
||||
position += 10;
|
||||
int syncCount = 0;
|
||||
bool onSync = false;
|
||||
var gaps = new MemoryStream();
|
||||
var syncCount = 0;
|
||||
var onSync = false;
|
||||
var gaps = new MemoryStream();
|
||||
|
||||
while(data[position] == 0xFF)
|
||||
{
|
||||
@@ -323,14 +324,14 @@ public static class AppleSony
|
||||
|
||||
public static RawTrack MarshalTrack(byte[] data, out int endOffset, int offset = 0)
|
||||
{
|
||||
int position = offset;
|
||||
bool firstSector = true;
|
||||
bool onSync = false;
|
||||
var gaps = new MemoryStream();
|
||||
int count = 0;
|
||||
List<RawSector> sectors = new List<RawSector>();
|
||||
byte trackNumber = 0;
|
||||
byte sideNumber = 0;
|
||||
int position = offset;
|
||||
var firstSector = true;
|
||||
var onSync = false;
|
||||
var gaps = new MemoryStream();
|
||||
var count = 0;
|
||||
var sectors = new List<RawSector>();
|
||||
byte trackNumber = 0;
|
||||
byte sideNumber = 0;
|
||||
endOffset = offset;
|
||||
|
||||
while(position < data.Length &&
|
||||
@@ -407,8 +408,8 @@ public static class AppleSony
|
||||
public static List<RawTrack> MarshalDisk(byte[] data, out int endOffset, int offset = 0)
|
||||
{
|
||||
endOffset = offset;
|
||||
List<RawTrack> tracks = new List<RawTrack>();
|
||||
int position = offset;
|
||||
var tracks = new List<RawTrack>();
|
||||
int position = offset;
|
||||
|
||||
RawTrack track = MarshalTrack(data, out position, position);
|
||||
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.Floppy;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Aaru.Decoders.Floppy;
|
||||
|
||||
/// <summary>Methods and structures for Commodore GCR floppy decoding</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Aaru.Decoders.Floppy;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
/// <summary>In-sector code for sector size</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum IBMSectorSizeCode : byte
|
||||
@@ -59,7 +59,9 @@ public enum IBMSectorSizeCode : byte
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum IBMIdType : byte
|
||||
{
|
||||
IndexMark = 0xFC, AddressMark = 0xFE, DataMark = 0xFB,
|
||||
IndexMark = 0xFC,
|
||||
AddressMark = 0xFE,
|
||||
DataMark = 0xFB,
|
||||
DeletedDataMark = 0xF8
|
||||
}
|
||||
|
||||
|
||||
@@ -30,10 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.Floppy;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Aaru.Decoders.Floppy;
|
||||
// Information from:
|
||||
// National Semiconductor PC87332VLJ datasheet
|
||||
// SMsC FDC37C78 datasheet
|
||||
|
||||
@@ -30,10 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.Floppy;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Aaru.Decoders.Floppy;
|
||||
// Information from:
|
||||
// National Semiconductor PC87332VLJ datasheet
|
||||
// SMsC FDC37C78 datasheet
|
||||
|
||||
@@ -30,10 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.Floppy;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Aaru.Decoders.Floppy;
|
||||
// Information from:
|
||||
// National Semiconductor PC87332VLJ datasheet
|
||||
// SMsC FDC37C78 datasheet
|
||||
|
||||
@@ -30,10 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.Floppy;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Aaru.Decoders.Floppy;
|
||||
// Information from:
|
||||
// National Semiconductor PC87332VLJ datasheet
|
||||
// SMsC FDC37C78 datasheet
|
||||
|
||||
26
LisaTag.cs
26
LisaTag.cs
@@ -30,12 +30,12 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders;
|
||||
|
||||
/// <summary>Represents a Lisa Office 7/7 sector tag</summary>
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal"), SuppressMessage("ReSharper", "NotAccessedField.Global"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global"),
|
||||
@@ -80,7 +80,7 @@ public static class LisaTag
|
||||
|
||||
var phTag = new ProfileTag();
|
||||
|
||||
byte[] tmp = new byte[4];
|
||||
var tmp = new byte[4];
|
||||
|
||||
phTag.Version = BigEndianBitConverter.ToUInt16(tag, 0);
|
||||
phTag.Kind = (byte)((tag[2] & 0xC0) >> 6);
|
||||
@@ -128,7 +128,7 @@ public static class LisaTag
|
||||
|
||||
var pmTag = new PriamTag();
|
||||
|
||||
byte[] tmp = new byte[4];
|
||||
var tmp = new byte[4];
|
||||
|
||||
pmTag.Version = BigEndianBitConverter.ToUInt16(tag, 0);
|
||||
pmTag.Kind = (byte)((tag[2] & 0xC0) >> 6);
|
||||
@@ -266,7 +266,7 @@ public static class LisaTag
|
||||
public bool IsLast;
|
||||
|
||||
/// <summary>Converts this tag to Priam DataTower format</summary>
|
||||
public PriamTag ToPriam() => new PriamTag
|
||||
public PriamTag ToPriam() => new()
|
||||
{
|
||||
AbsPage = AbsPage,
|
||||
Checksum = Checksum,
|
||||
@@ -284,7 +284,7 @@ public static class LisaTag
|
||||
};
|
||||
|
||||
/// <summary>Converts this tag to Sony format</summary>
|
||||
public SonyTag ToSony() => new SonyTag
|
||||
public SonyTag ToSony() => new()
|
||||
{
|
||||
FileId = FileId,
|
||||
IsFirst = IsFirst,
|
||||
@@ -300,7 +300,7 @@ public static class LisaTag
|
||||
/// <summary>Gets a byte array representation of this tag</summary>
|
||||
public byte[] GetBytes()
|
||||
{
|
||||
byte[] tagBytes = new byte[20];
|
||||
var tagBytes = new byte[20];
|
||||
|
||||
byte[] tmp = BigEndianBitConverter.GetBytes(Version);
|
||||
Array.Copy(tmp, 0, tagBytes, 0, 2);
|
||||
@@ -364,7 +364,7 @@ public static class LisaTag
|
||||
public bool IsLast;
|
||||
|
||||
/// <summary>Converts this tag to Apple Profile format</summary>
|
||||
public ProfileTag ToProfile() => new ProfileTag
|
||||
public ProfileTag ToProfile() => new()
|
||||
{
|
||||
AbsPage = AbsPage,
|
||||
Checksum = Checksum,
|
||||
@@ -382,7 +382,7 @@ public static class LisaTag
|
||||
};
|
||||
|
||||
/// <summary>Converts this tag to Sony format</summary>
|
||||
public SonyTag ToSony() => new SonyTag
|
||||
public SonyTag ToSony() => new()
|
||||
{
|
||||
FileId = FileId,
|
||||
IsFirst = IsFirst,
|
||||
@@ -398,7 +398,7 @@ public static class LisaTag
|
||||
/// <summary>Gets a byte array representation of this tag</summary>
|
||||
public byte[] GetBytes()
|
||||
{
|
||||
byte[] tagBytes = new byte[24];
|
||||
var tagBytes = new byte[24];
|
||||
|
||||
byte[] tmp = BigEndianBitConverter.GetBytes(Version);
|
||||
Array.Copy(tmp, 0, tagBytes, 0, 2);
|
||||
@@ -454,7 +454,7 @@ public static class LisaTag
|
||||
public bool IsLast;
|
||||
|
||||
/// <summary>Converts this tag to Apple Profile format</summary>
|
||||
public ProfileTag ToProfile() => new ProfileTag
|
||||
public ProfileTag ToProfile() => new()
|
||||
{
|
||||
FileId = FileId,
|
||||
IsFirst = IsFirst,
|
||||
@@ -468,7 +468,7 @@ public static class LisaTag
|
||||
};
|
||||
|
||||
/// <summary>Converts this tag to Priam DataTower format</summary>
|
||||
public PriamTag ToPriam() => new PriamTag
|
||||
public PriamTag ToPriam() => new()
|
||||
{
|
||||
FileId = FileId,
|
||||
IsFirst = IsFirst,
|
||||
@@ -484,7 +484,7 @@ public static class LisaTag
|
||||
/// <summary>Gets a byte array representation of this tag</summary>
|
||||
public byte[] GetBytes()
|
||||
{
|
||||
byte[] tagBytes = new byte[12];
|
||||
var tagBytes = new byte[12];
|
||||
|
||||
byte[] tmp = BigEndianBitConverter.GetBytes(Version);
|
||||
Array.Copy(tmp, 0, tagBytes, 0, 2);
|
||||
|
||||
10
MMC/CID.cs
10
MMC/CID.cs
@@ -30,13 +30,13 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.MMC;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.MMC;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global"), SuppressMessage("ReSharper", "UnassignedField.Global")]
|
||||
public class CID
|
||||
@@ -60,7 +60,7 @@ public static partial class Decoders
|
||||
if(response?.Length != 4)
|
||||
return null;
|
||||
|
||||
byte[] data = new byte[16];
|
||||
var data = new byte[16];
|
||||
|
||||
byte[] tmp = BitConverter.GetBytes(response[0]);
|
||||
Array.Copy(tmp, 0, data, 0, 4);
|
||||
@@ -89,7 +89,7 @@ public static partial class Decoders
|
||||
CRC = (byte)((response[15] & 0xFE) >> 1)
|
||||
};
|
||||
|
||||
byte[] tmp = new byte[6];
|
||||
var tmp = new byte[6];
|
||||
Array.Copy(response, 3, tmp, 0, 6);
|
||||
cid.ProductName = StringHandlers.CToString(tmp);
|
||||
|
||||
@@ -129,7 +129,7 @@ public static partial class Decoders
|
||||
cid.ProductRevision & 0x0F).AppendLine();
|
||||
|
||||
sb.AppendFormat("\tProduct serial number: {0}", cid.ProductSerialNumber).AppendLine();
|
||||
string year = "";
|
||||
var year = "";
|
||||
|
||||
switch(cid.ManufacturingDate & 0x0F)
|
||||
{
|
||||
|
||||
11
MMC/CSD.cs
11
MMC/CSD.cs
@@ -30,12 +30,12 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.MMC;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.MMC;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global"), SuppressMessage("ReSharper", "NotAccessedField.Global")]
|
||||
public class CSD
|
||||
@@ -84,7 +84,7 @@ public static partial class Decoders
|
||||
if(response?.Length != 4)
|
||||
return null;
|
||||
|
||||
byte[] data = new byte[16];
|
||||
var data = new byte[16];
|
||||
|
||||
byte[] tmp = BitConverter.GetBytes(response[0]);
|
||||
Array.Copy(tmp, 0, data, 0, 4);
|
||||
@@ -148,7 +148,7 @@ public static partial class Decoders
|
||||
|
||||
double unitFactor = 0;
|
||||
double multiplier = 0;
|
||||
string unit = "";
|
||||
var unit = "";
|
||||
|
||||
var sb = new StringBuilder();
|
||||
sb.AppendLine("MultiMediaCard Device Specific Data Register:");
|
||||
@@ -609,8 +609,7 @@ public static partial class Decoders
|
||||
break;
|
||||
}
|
||||
|
||||
sb.AppendFormat("\tWriting is {0} times slower than reading", Math.Pow(2, csd.WriteSpeedFactor)).
|
||||
AppendLine();
|
||||
sb.AppendFormat("\tWriting is {0} times slower than reading", Math.Pow(2, csd.WriteSpeedFactor)).AppendLine();
|
||||
|
||||
if(csd.WriteBlockLength == 15)
|
||||
sb.AppendLine("\tWrite block length size is defined in extended CSD");
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.MMC;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.MMC;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global"), SuppressMessage("ReSharper", "UnassignedField.Global"),
|
||||
StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
@@ -219,7 +219,8 @@ public enum DeviceSupportedCommandSets : byte
|
||||
[Flags]
|
||||
public enum HPIFeatures : byte
|
||||
{
|
||||
Supported = 1 << 0, CMD12 = 1 << 1
|
||||
Supported = 1 << 0,
|
||||
CMD12 = 1 << 1
|
||||
}
|
||||
|
||||
[Flags]
|
||||
@@ -237,13 +238,15 @@ public enum DataTagSupport : byte
|
||||
[Flags]
|
||||
public enum ExtendedPartitionsSupport : byte
|
||||
{
|
||||
SystemCode = 1 << 0, NonPersistent = 1 << 1
|
||||
SystemCode = 1 << 0,
|
||||
NonPersistent = 1 << 1
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum SupportedModes : byte
|
||||
{
|
||||
FFU = 1 << 0, VendorSpecific = 1 << 1
|
||||
FFU = 1 << 0,
|
||||
VendorSpecific = 1 << 1
|
||||
}
|
||||
|
||||
[Flags]
|
||||
@@ -267,41 +270,55 @@ public enum CacheFlushingPolicy : byte
|
||||
[Flags]
|
||||
public enum SecureFeatureSupport : byte
|
||||
{
|
||||
Purge = 1 << 0, Defective = 1 << 2, Trim = 1 << 4,
|
||||
Sanitize = 1 << 6
|
||||
Purge = 1 << 0,
|
||||
Defective = 1 << 2,
|
||||
Trim = 1 << 4,
|
||||
Sanitize = 1 << 6
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum BootInformation : byte
|
||||
{
|
||||
Alternative = 1 << 0, DDR = 1 << 1, HighSpeed = 1 << 2
|
||||
Alternative = 1 << 0,
|
||||
DDR = 1 << 1,
|
||||
HighSpeed = 1 << 2
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum SecureWriteProtectInformation : byte
|
||||
{
|
||||
Supported = 1 << 0, Enabled = 1 << 1
|
||||
Supported = 1 << 0,
|
||||
Enabled = 1 << 1
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum DriverStrength : byte
|
||||
{
|
||||
Type0 = 1 << 0, Type1 = 1 << 1, Type2 = 1 << 2,
|
||||
Type3 = 1 << 3, Type4 = 1 << 4
|
||||
Type0 = 1 << 0,
|
||||
Type1 = 1 << 1,
|
||||
Type2 = 1 << 2,
|
||||
Type3 = 1 << 3,
|
||||
Type4 = 1 << 4
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum DeviceType : byte
|
||||
{
|
||||
HS_26 = 1 << 0, HS_52 = 1 << 1, HS_DDR_52 = 1 << 2,
|
||||
HS_DDR_52_LV = 1 << 3, HS200_18 = 1 << 4, HS200_12 = 1 << 5,
|
||||
HS400_18 = 1 << 6, HS400_12 = 1 << 7
|
||||
HS_26 = 1 << 0,
|
||||
HS_52 = 1 << 1,
|
||||
HS_DDR_52 = 1 << 2,
|
||||
HS_DDR_52_LV = 1 << 3,
|
||||
HS200_18 = 1 << 4,
|
||||
HS200_12 = 1 << 5,
|
||||
HS400_18 = 1 << 6,
|
||||
HS400_12 = 1 << 7
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum BootConfigProtection : byte
|
||||
{
|
||||
PowerCycle = 1 << 0, Permanent = 1 << 4
|
||||
PowerCycle = 1 << 0,
|
||||
Permanent = 1 << 4
|
||||
}
|
||||
|
||||
[Flags]
|
||||
@@ -313,22 +330,32 @@ public enum HighCapacityEraseGroupDefinition : byte
|
||||
[Flags]
|
||||
public enum BootAreaWriteProtectionRegister : byte
|
||||
{
|
||||
PowerOn = 1 << 0, PowerOnArea2 = 1 << 1, Permanent = 1 << 2,
|
||||
PermanentArea2 = 1 << 3, PermanentDisable = 1 << 4, PowerOnDisable = 1 << 6,
|
||||
Selected = 1 << 7
|
||||
PowerOn = 1 << 0,
|
||||
PowerOnArea2 = 1 << 1,
|
||||
Permanent = 1 << 2,
|
||||
PermanentArea2 = 1 << 3,
|
||||
PermanentDisable = 1 << 4,
|
||||
PowerOnDisable = 1 << 6,
|
||||
Selected = 1 << 7
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum UserAreaWriteProtectionRegister : byte
|
||||
{
|
||||
ApplyPowerOn = 1 << 0, ApplyPermanent = 1 << 2, DisablePowerOn = 1 << 3,
|
||||
DisablePermanent = 1 << 4, DisableWriteProtect = 1 << 6, DisablePassword = 1 << 7
|
||||
ApplyPowerOn = 1 << 0,
|
||||
ApplyPermanent = 1 << 2,
|
||||
DisablePowerOn = 1 << 3,
|
||||
DisablePermanent = 1 << 4,
|
||||
DisableWriteProtect = 1 << 6,
|
||||
DisablePassword = 1 << 7
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum PartitioningSupport : byte
|
||||
{
|
||||
Supported = 1 << 0, Enhanced = 1 << 1, Extended = 1 << 2
|
||||
Supported = 1 << 0,
|
||||
Enhanced = 1 << 1,
|
||||
Extended = 1 << 2
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
@@ -358,8 +385,7 @@ public static partial class Decoders
|
||||
double unit;
|
||||
|
||||
if(csd.ExtendedSecurityCommandsError != 0)
|
||||
sb.AppendFormat("\tLast extended security error was {0}", csd.ExtendedSecurityCommandsError).
|
||||
AppendLine();
|
||||
sb.AppendFormat("\tLast extended security error was {0}", csd.ExtendedSecurityCommandsError).AppendLine();
|
||||
|
||||
if(csd.SupportedCommandSets.HasFlag(DeviceSupportedCommandSets.Standard))
|
||||
sb.AppendLine("\tDevice supports standard MMC command set");
|
||||
@@ -388,8 +414,8 @@ public static partial class Decoders
|
||||
{
|
||||
sb.AppendFormat("\tMax context ID is {0}.", csd.ContextManagementCaps & 0xF).AppendLine();
|
||||
|
||||
sb.AppendFormat("\tLarge unit maximum multiplier is {0}.",
|
||||
((csd.ContextManagementCaps & 0x70) >> 4) + 1).AppendLine();
|
||||
sb.AppendFormat("\tLarge unit maximum multiplier is {0}.", ((csd.ContextManagementCaps & 0x70) >> 4) + 1).
|
||||
AppendLine();
|
||||
}
|
||||
|
||||
sb.AppendFormat("\tLarge unit size is {0} MiB", csd.LargeUnitSize + 1).AppendLine();
|
||||
@@ -405,7 +431,7 @@ public static partial class Decoders
|
||||
sb.AppendLine("\tDevice supports FFU");
|
||||
|
||||
if(csd.FFUFeatures.HasFlag(FFUFeatures.SupportedModeOperationCodes))
|
||||
{
|
||||
|
||||
// todo public byte ModeOperationCodes
|
||||
|
||||
if(csd.OperationCodesTimeout > 0)
|
||||
@@ -425,16 +451,13 @@ public static partial class Decoders
|
||||
AppendFormat("\tMaximum timeout for switch command when setting a value to the mode operation codes field is {0:D2}µs",
|
||||
unit).AppendLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(csd.SupportedModes.HasFlag(SupportedModes.VendorSpecific))
|
||||
sb.AppendLine("\tDevice supports Vendor Specific Mode");
|
||||
|
||||
if(csd.BarrierSupport == 0x01)
|
||||
{
|
||||
sb.AppendLine("\tDevice supports the barrier command");
|
||||
}
|
||||
|
||||
if(csd.CMDQueuingSupport.HasFlag(CMDQueuingSupport.Supported))
|
||||
sb.AppendFormat("\tDevice supports command queuing with a depth of {0}", csd.CMDQueuingDepth + 1).
|
||||
@@ -697,8 +720,8 @@ public static partial class Decoders
|
||||
sb.AppendFormat("\tDevice takes a maximum of {0} s to switch production state awareness",
|
||||
unit / 1000000).AppendLine();
|
||||
else if(unit > 1000)
|
||||
sb.AppendFormat("\tDevice takes a maximum of {0} ms to switch production state awareness",
|
||||
unit / 1000).AppendLine();
|
||||
sb.AppendFormat("\tDevice takes a maximum of {0} ms to switch production state awareness", unit / 1000).
|
||||
AppendLine();
|
||||
else
|
||||
sb.AppendFormat("\tDevice takes a maximum of {0} μs to switch production state awareness", unit).
|
||||
AppendLine();
|
||||
@@ -727,8 +750,7 @@ public static partial class Decoders
|
||||
sb.AppendFormat("\tDevice takes a maximum of {0} s to move to sleep state", unit / 1000000).
|
||||
AppendLine();
|
||||
else if(unit > 1000)
|
||||
sb.AppendFormat("\tDevice takes a maximum of {0} ms to move to sleep state", unit / 1000).
|
||||
AppendLine();
|
||||
sb.AppendFormat("\tDevice takes a maximum of {0} ms to move to sleep state", unit / 1000).AppendLine();
|
||||
else
|
||||
sb.AppendFormat("\tDevice takes a maximum of {0} μs to move to sleep state", unit).AppendLine();
|
||||
}
|
||||
@@ -756,8 +778,8 @@ public static partial class Decoders
|
||||
if(csd.MinimumReadPerformance26_4 == 0)
|
||||
sb.AppendLine("\tDevice cannot achieve 2.4MB/s reading in SDR 26Mhz 4-bit mode");
|
||||
else
|
||||
sb.AppendFormat("\tDevice can achieve a minimum of {0}MB/s reading in SDR 26Mhz 4-bit mode",
|
||||
unit / 1000).AppendLine();
|
||||
sb.AppendFormat("\tDevice can achieve a minimum of {0}MB/s reading in SDR 26Mhz 4-bit mode", unit / 1000).
|
||||
AppendLine();
|
||||
|
||||
unit = csd.MinimumReadPerformance52 * 300;
|
||||
|
||||
@@ -788,8 +810,8 @@ public static partial class Decoders
|
||||
if(csd.MinimumWritePerformance26_4 == 0)
|
||||
sb.AppendLine("\tDevice cannot achieve 2.4MB/s writing in SDR 26Mhz 4-bit mode");
|
||||
else
|
||||
sb.AppendFormat("\tDevice can achieve a minimum of {0}MB/s writing in SDR 26Mhz 4-bit mode",
|
||||
unit / 1000).AppendLine();
|
||||
sb.AppendFormat("\tDevice can achieve a minimum of {0}MB/s writing in SDR 26Mhz 4-bit mode", unit / 1000).
|
||||
AppendLine();
|
||||
|
||||
unit = csd.MinimumWritePerformance52 * 300;
|
||||
|
||||
@@ -913,8 +935,7 @@ public static partial class Decoders
|
||||
{
|
||||
sb.AppendLine("\tDevice supports enhanced strobe mode");
|
||||
|
||||
sb.AppendLine((csd.BusWidth & 0x80) == 0x80
|
||||
? "\tDevice uses strobe during Data Out, CRC and CMD responses"
|
||||
sb.AppendLine((csd.BusWidth & 0x80) == 0x80 ? "\tDevice uses strobe during Data Out, CRC and CMD responses"
|
||||
: "\tDevice uses strobe during Data Out and CRC responses");
|
||||
}
|
||||
|
||||
@@ -981,8 +1002,8 @@ public static partial class Decoders
|
||||
|
||||
break;
|
||||
default:
|
||||
sb.AppendFormat("\tUnknown enabled boot partition code {0}",
|
||||
(csd.PartitionConfiguration & 0x38) >> 3).AppendLine();
|
||||
sb.AppendFormat("\tUnknown enabled boot partition code {0}", (csd.PartitionConfiguration & 0x38) >> 3).
|
||||
AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -1037,8 +1058,7 @@ public static partial class Decoders
|
||||
break;
|
||||
}
|
||||
|
||||
sb.AppendLine((csd.BootBusConditions & 4) == 4
|
||||
? "\tDevice will retain boot conditions after boot operation."
|
||||
sb.AppendLine((csd.BootBusConditions & 4) == 4 ? "\tDevice will retain boot conditions after boot operation."
|
||||
: "\tDevice will reset boot conditions to compatibility mode after boot operation.");
|
||||
|
||||
switch((csd.BootBusConditions & 0x24) >> 3)
|
||||
@@ -1099,24 +1119,19 @@ public static partial class Decoders
|
||||
if(csd.BootAreaWriteProtectionRegister.HasFlag(BootAreaWriteProtectionRegister.Permanent))
|
||||
{
|
||||
if(csd.BootAreaWriteProtectionRegister.HasFlag(BootAreaWriteProtectionRegister.Selected))
|
||||
{
|
||||
sb.AppendLine(csd.BootAreaWriteProtectionRegister.HasFlag(BootAreaWriteProtectionRegister.
|
||||
PermanentArea2)
|
||||
? "\tBoot area 2 is permanently write protected."
|
||||
: "\tBoot area 1 is permanently write protected.");
|
||||
}
|
||||
else
|
||||
sb.AppendLine("\tBoth boot areas are permanently write protected.");
|
||||
}
|
||||
else if(csd.BootAreaWriteProtectionRegister.HasFlag(BootAreaWriteProtectionRegister.PowerOn))
|
||||
{
|
||||
if(csd.BootAreaWriteProtectionRegister.HasFlag(BootAreaWriteProtectionRegister.Selected))
|
||||
{
|
||||
sb.AppendLine(csd.BootAreaWriteProtectionRegister.HasFlag(BootAreaWriteProtectionRegister.
|
||||
PowerOnArea2)
|
||||
sb.AppendLine(csd.BootAreaWriteProtectionRegister.HasFlag(BootAreaWriteProtectionRegister.PowerOnArea2)
|
||||
? "\tBoot area 2 is write protected until next power cycle."
|
||||
: "\tBoot area 1 is write protected until next power cycle.");
|
||||
}
|
||||
else
|
||||
sb.AppendLine("\tBoth boot areas are write protected until next power cycle.");
|
||||
}
|
||||
@@ -1149,8 +1164,7 @@ public static partial class Decoders
|
||||
sb.AppendLine("\tFirmware updates are permanently disabled");
|
||||
|
||||
if(csd.RPMBSize > 0)
|
||||
sb.AppendFormat("\tDevice has a {0} KiB replay protected memory block", csd.RPMBSize * 128).
|
||||
AppendLine();
|
||||
sb.AppendFormat("\tDevice has a {0} KiB replay protected memory block", csd.RPMBSize * 128).AppendLine();
|
||||
|
||||
if(csd.PartitioningSupport.HasFlag(PartitioningSupport.Supported))
|
||||
{
|
||||
@@ -1191,8 +1205,8 @@ public static partial class Decoders
|
||||
|
||||
break;
|
||||
default:
|
||||
sb.AppendFormat("\tDevice emulates unknown sector size indicated by code {0}",
|
||||
csd.NativeSectorSize).AppendLine();
|
||||
sb.AppendFormat("\tDevice emulates unknown sector size indicated by code {0}", csd.NativeSectorSize).
|
||||
AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.MMC;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.MMC;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global"), SuppressMessage("ReSharper", "NotAccessedField.Global")]
|
||||
public class OCR
|
||||
|
||||
@@ -39,10 +39,10 @@ public static class VendorString
|
||||
/// <param name="mmcVendorId">MMC vendor ID</param>
|
||||
/// <returns>Manufacturer</returns>
|
||||
public static string Prettify(byte mmcVendorId) => mmcVendorId switch
|
||||
{
|
||||
0x07 => "Nokia",
|
||||
0x15 => "Samsung",
|
||||
0x2C => "extreMEmory",
|
||||
_ => $"Unknown manufacturer ID 0x{mmcVendorId:X2}"
|
||||
};
|
||||
{
|
||||
0x07 => "Nokia",
|
||||
0x15 => "Samsung",
|
||||
0x2C => "extreMEmory",
|
||||
_ => $"Unknown manufacturer ID 0x{mmcVendorId:X2}"
|
||||
};
|
||||
}
|
||||
@@ -30,6 +30,8 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.PCMCIA;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
@@ -37,8 +39,6 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.PCMCIA;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static class CIS
|
||||
@@ -46,8 +46,8 @@ public static class CIS
|
||||
// TODO: Handle links? Or are they removed in lower layers of the operating system drivers?
|
||||
public static Tuple[] GetTuples(byte[] data)
|
||||
{
|
||||
List<Tuple> tuples = new List<Tuple>();
|
||||
int position = 0;
|
||||
var tuples = new List<Tuple>();
|
||||
var position = 0;
|
||||
|
||||
while(position < data.Length)
|
||||
{
|
||||
@@ -94,10 +94,10 @@ public static class CIS
|
||||
if((data?.Length - 2) % 6 != 0)
|
||||
return null;
|
||||
|
||||
var tuple = new DeviceGeometryTuple();
|
||||
List<DeviceGeometry> geometries = new List<DeviceGeometry>();
|
||||
var tuple = new DeviceGeometryTuple();
|
||||
var geometries = new List<DeviceGeometry>();
|
||||
|
||||
for(int position = 2; position < data.Length; position += 6)
|
||||
for(var position = 2; position < data.Length; position += 6)
|
||||
{
|
||||
var geometry = new DeviceGeometry
|
||||
{
|
||||
@@ -219,10 +219,10 @@ public static class CIS
|
||||
if(data.Length < 4)
|
||||
return null;
|
||||
|
||||
List<byte> buffer = new List<byte>();
|
||||
var buffer = new List<byte>();
|
||||
List<string> strings = null;
|
||||
bool firstString = false;
|
||||
bool secondString = false;
|
||||
var firstString = false;
|
||||
var secondString = false;
|
||||
|
||||
var tuple = new Level1VersionTuple
|
||||
{
|
||||
@@ -232,7 +232,7 @@ public static class CIS
|
||||
MinorVersion = data[3]
|
||||
};
|
||||
|
||||
for(int position = 4; position < data.Length; position++)
|
||||
for(var position = 4; position < data.Length; position++)
|
||||
{
|
||||
if(data[position] == 0xFF)
|
||||
break;
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Aaru.Decoders.PCMCIA;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
/// <summary>Tuple codes.</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum TupleCodes : byte
|
||||
@@ -165,9 +165,17 @@ public enum DeviceSpeedCodes : byte
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum FunctionCodes : byte
|
||||
{
|
||||
MultiFunction = 0x00, Memory = 0x01, Serial = 0x02,
|
||||
Parallel = 0x03, FixedDisk = 0x04, Video = 0x05,
|
||||
Network = 0x06, AIMS = 0x07, SCSI = 0x08,
|
||||
Security = 0x09, Instrument = 0x0A, HighSpeedSerial = 0x0B,
|
||||
VendorSpecific = 0xFE
|
||||
MultiFunction = 0x00,
|
||||
Memory = 0x01,
|
||||
Serial = 0x02,
|
||||
Parallel = 0x03,
|
||||
FixedDisk = 0x04,
|
||||
Video = 0x05,
|
||||
Network = 0x06,
|
||||
AIMS = 0x07,
|
||||
SCSI = 0x08,
|
||||
Security = 0x09,
|
||||
Instrument = 0x0A,
|
||||
HighSpeedSerial = 0x0B,
|
||||
VendorSpecific = 0xFE
|
||||
}
|
||||
@@ -30,10 +30,10 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Aaru.Decoders.PCMCIA;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
/// <summary>Basic classure of a PCMCIA tuple</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Aaru.Decoders.PCMCIA;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
public static class VendorCode
|
||||
{
|
||||
|
||||
@@ -30,23 +30,23 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global"), SuppressMessage("ReSharper", "NotAccessedField.Global")]
|
||||
public static class DiscStructureCapabilities
|
||||
{
|
||||
public static Capability[] Decode(byte[] response)
|
||||
{
|
||||
ushort len = (ushort)((response[0] << 8) + response[1]);
|
||||
var len = (ushort)((response[0] << 8) + response[1]);
|
||||
|
||||
if(len + 2 != response.Length)
|
||||
return null;
|
||||
|
||||
List<Capability> caps = new List<Capability>();
|
||||
var caps = new List<Capability>();
|
||||
|
||||
uint offset = 4;
|
||||
|
||||
|
||||
112
SCSI/EVPD.cs
112
SCSI/EVPD.cs
@@ -30,6 +30,8 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
@@ -40,8 +42,6 @@ using Aaru.CommonTypes.Structs.Devices.ATA;
|
||||
using Aaru.CommonTypes.Structs.Devices.SCSI;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global"), SuppressMessage("ReSharper", "NotAccessedField.Global"),
|
||||
SuppressMessage("ReSharper", "UnassignedField.Global")]
|
||||
@@ -58,7 +58,7 @@ public static class EVPD
|
||||
if(page.Length != page[3] + 4)
|
||||
return null;
|
||||
|
||||
byte[] decoded = new byte[page.Length - 4];
|
||||
var decoded = new byte[page.Length - 4];
|
||||
|
||||
Array.Copy(page, 4, decoded, 0, page.Length - 4);
|
||||
|
||||
@@ -80,7 +80,7 @@ public static class EVPD
|
||||
if(page.Length != page[3] + 4)
|
||||
return null;
|
||||
|
||||
byte[] ascii = new byte[page[4]];
|
||||
var ascii = new byte[page[4]];
|
||||
|
||||
Array.Copy(page, 5, ascii, 0, page[4]);
|
||||
|
||||
@@ -98,11 +98,11 @@ public static class EVPD
|
||||
if(page.Length != page[3] + 4)
|
||||
return null;
|
||||
|
||||
byte[] ascii = new byte[page.Length - 4];
|
||||
var ascii = new byte[page.Length - 4];
|
||||
|
||||
Array.Copy(page, 4, ascii, 0, page.Length - 4);
|
||||
|
||||
for(int i = 0; i < ascii.Length - 1; i++)
|
||||
for(var i = 0; i < ascii.Length - 1; i++)
|
||||
if(ascii[i] < 0x20)
|
||||
return null;
|
||||
|
||||
@@ -120,7 +120,7 @@ public static class EVPD
|
||||
if(page.Length != page[3] + 4)
|
||||
return null;
|
||||
|
||||
byte[] ascii = new byte[page.Length - 4];
|
||||
var ascii = new byte[page.Length - 4];
|
||||
|
||||
Array.Copy(page, 4, ascii, 0, page.Length - 4);
|
||||
|
||||
@@ -136,7 +136,7 @@ public static class EVPD
|
||||
if(page.Length != page[3] + 4)
|
||||
return null;
|
||||
|
||||
byte[] ascii = new byte[page.Length - 4];
|
||||
var ascii = new byte[page.Length - 4];
|
||||
|
||||
Array.Copy(page, 4, ascii, 0, page.Length - 4);
|
||||
|
||||
@@ -153,7 +153,7 @@ public static class EVPD
|
||||
if(page.Length != 12)
|
||||
return 0;
|
||||
|
||||
byte[] bitmap = new byte[8];
|
||||
var bitmap = new byte[8];
|
||||
|
||||
Array.Copy(page, 4, bitmap, 0, 8);
|
||||
|
||||
@@ -170,7 +170,7 @@ public static class EVPD
|
||||
if(page.Length != page[3] + 4)
|
||||
return null;
|
||||
|
||||
byte[] ascii = new byte[page.Length - 4];
|
||||
var ascii = new byte[page.Length - 4];
|
||||
|
||||
Array.Copy(page, 4, ascii, 0, page.Length - 4);
|
||||
|
||||
@@ -187,8 +187,8 @@ public static class EVPD
|
||||
if(page.Length != page[3] + 4)
|
||||
return null;
|
||||
|
||||
byte[] element = new byte[page.Length - 4];
|
||||
var sb = new StringBuilder();
|
||||
var element = new byte[page.Length - 4];
|
||||
var sb = new StringBuilder();
|
||||
|
||||
foreach(byte b in element)
|
||||
sb.AppendFormat("{0:X2}", b);
|
||||
@@ -237,8 +237,8 @@ public static class EVPD
|
||||
Default = (ScsiDefinitions)(pageResponse[5] & 0x7F)
|
||||
};
|
||||
|
||||
int position = 6;
|
||||
List<ScsiDefinitions> definitions = new List<ScsiDefinitions>();
|
||||
var position = 6;
|
||||
var definitions = new List<ScsiDefinitions>();
|
||||
|
||||
while(position < pageResponse.Length)
|
||||
{
|
||||
@@ -394,8 +394,8 @@ public static class EVPD
|
||||
PageLength = (byte)(pageResponse[3] + 4)
|
||||
};
|
||||
|
||||
int position = 4;
|
||||
List<IdentificatonDescriptor> descriptors = new List<IdentificatonDescriptor>();
|
||||
var position = 4;
|
||||
var descriptors = new List<IdentificatonDescriptor>();
|
||||
|
||||
while(position < pageResponse.Length)
|
||||
{
|
||||
@@ -604,7 +604,7 @@ public static class EVPD
|
||||
{
|
||||
sb.AppendFormat("\tIEEE EUI-64: {0:X2}", descriptor.Binary[0]);
|
||||
|
||||
for(int i = 1; i < descriptor.Binary.Length; i++)
|
||||
for(var i = 1; i < descriptor.Binary.Length; i++)
|
||||
sb.AppendFormat(":{0:X2}", descriptor.Binary[i]);
|
||||
|
||||
sb.AppendLine();
|
||||
@@ -619,7 +619,7 @@ public static class EVPD
|
||||
{
|
||||
sb.AppendFormat("\tNAA: {0:X2}", descriptor.Binary[0]);
|
||||
|
||||
for(int i = 1; i < descriptor.Binary.Length; i++)
|
||||
for(var i = 1; i < descriptor.Binary.Length; i++)
|
||||
sb.AppendFormat(":{0:X2}", descriptor.Binary[i]);
|
||||
|
||||
sb.AppendLine();
|
||||
@@ -661,7 +661,7 @@ public static class EVPD
|
||||
{
|
||||
sb.AppendFormat("\tMD5 logical unit identifier: {0:x2}", descriptor.Binary[0]);
|
||||
|
||||
for(int i = 1; i < descriptor.Binary.Length; i++)
|
||||
for(var i = 1; i < descriptor.Binary.Length; i++)
|
||||
sb.AppendFormat("{0:x2}", descriptor.Binary[i]);
|
||||
|
||||
sb.AppendLine();
|
||||
@@ -753,10 +753,8 @@ public static class EVPD
|
||||
|
||||
break;
|
||||
case ProtocolIdentifiers.SSA:
|
||||
sb.
|
||||
AppendFormat("\tProtocol (SSA) specific descriptor with unknown format (hex): {0}",
|
||||
PrintHex.ByteArrayToHexArrayString(descriptor.Binary, 40)).
|
||||
AppendLine();
|
||||
sb.AppendFormat("\tProtocol (SSA) specific descriptor with unknown format (hex): {0}",
|
||||
PrintHex.ByteArrayToHexArrayString(descriptor.Binary, 40)).AppendLine();
|
||||
|
||||
break;
|
||||
case ProtocolIdentifiers.SCSIe:
|
||||
@@ -765,9 +763,8 @@ public static class EVPD
|
||||
|
||||
break;
|
||||
case ProtocolIdentifiers.UAS:
|
||||
sb.
|
||||
AppendFormat("\tProtocol (UAS) specific descriptor: USB address {0} interface {1}",
|
||||
descriptor.Binary[0] & 0x7F, descriptor.Binary[2]).AppendLine();
|
||||
sb.AppendFormat("\tProtocol (UAS) specific descriptor: USB address {0} interface {1}",
|
||||
descriptor.Binary[0] & 0x7F, descriptor.Binary[2]).AppendLine();
|
||||
|
||||
break;
|
||||
default:
|
||||
@@ -798,10 +795,9 @@ public static class EVPD
|
||||
|
||||
break;
|
||||
default:
|
||||
sb.
|
||||
AppendFormat("Inquiry descriptor type {2} contains unknown kind {1} of data (hex): {0}",
|
||||
PrintHex.ByteArrayToHexArrayString(descriptor.Binary, 40),
|
||||
(byte)descriptor.CodeSet, (byte)descriptor.Type).AppendLine();
|
||||
sb.AppendFormat("Inquiry descriptor type {2} contains unknown kind {1} of data (hex): {0}",
|
||||
PrintHex.ByteArrayToHexArrayString(descriptor.Binary, 40),
|
||||
(byte)descriptor.CodeSet, (byte)descriptor.Type).AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -854,8 +850,8 @@ public static class EVPD
|
||||
PageLength = (byte)(pageResponse[3] + 4)
|
||||
};
|
||||
|
||||
int position = 4;
|
||||
List<SoftwareIdentifier> identifiers = new List<SoftwareIdentifier>();
|
||||
var position = 4;
|
||||
var identifiers = new List<SoftwareIdentifier>();
|
||||
|
||||
while(position < pageResponse.Length)
|
||||
{
|
||||
@@ -897,7 +893,7 @@ public static class EVPD
|
||||
{
|
||||
sb.AppendFormat("\t{0:X2}", identifier.Identifier[0]);
|
||||
|
||||
for(int i = 1; i < identifier.Identifier.Length; i++)
|
||||
for(var i = 1; i < identifier.Identifier.Length; i++)
|
||||
sb.AppendFormat(":{0:X2}", identifier.Identifier[i]);
|
||||
|
||||
sb.AppendLine();
|
||||
@@ -910,9 +906,14 @@ public static class EVPD
|
||||
#region EVPD Page 0x85: Management Network Addresses page
|
||||
public enum NetworkServiceTypes : byte
|
||||
{
|
||||
Unspecified = 0, StorageConf = 1, Diagnostics = 2,
|
||||
Status = 3, Logging = 4, CodeDownload = 5,
|
||||
CopyService = 6, Administrative = 7
|
||||
Unspecified = 0,
|
||||
StorageConf = 1,
|
||||
Diagnostics = 2,
|
||||
Status = 3,
|
||||
Logging = 4,
|
||||
CodeDownload = 5,
|
||||
CopyService = 6,
|
||||
Administrative = 7
|
||||
}
|
||||
|
||||
public struct NetworkDescriptor
|
||||
@@ -960,8 +961,8 @@ public static class EVPD
|
||||
PageLength = (ushort)((pageResponse[2] << 8) + pageResponse[3] + 4)
|
||||
};
|
||||
|
||||
int position = 4;
|
||||
List<NetworkDescriptor> descriptors = new List<NetworkDescriptor>();
|
||||
var position = 4;
|
||||
var descriptors = new List<NetworkDescriptor>();
|
||||
|
||||
while(position < pageResponse.Length)
|
||||
{
|
||||
@@ -1069,9 +1070,8 @@ public static class EVPD
|
||||
|
||||
break;
|
||||
default:
|
||||
sb.AppendFormat("Address of unknown type {1}: {0}",
|
||||
StringHandlers.CToString(descriptor.Address), (byte)descriptor.Type).
|
||||
AppendLine();
|
||||
sb.AppendFormat("Address of unknown type {1}: {0}", StringHandlers.CToString(descriptor.Address),
|
||||
(byte)descriptor.Type).AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -1322,8 +1322,8 @@ public static class EVPD
|
||||
sb.AppendLine("Device supports vendor specific activation for new microcode");
|
||||
|
||||
if(page.ExtendedTestMinutes > 0)
|
||||
sb.AppendFormat("Extended self-test takes {0} to complete",
|
||||
TimeSpan.FromMinutes(page.ExtendedTestMinutes)).AppendLine();
|
||||
sb.AppendFormat("Extended self-test takes {0} to complete", TimeSpan.FromMinutes(page.ExtendedTestMinutes)).
|
||||
AppendLine();
|
||||
|
||||
if(page.MaximumSenseLength > 0)
|
||||
sb.AppendFormat("Device supports a maximum of {0} bytes for sense data", page.MaximumSenseLength).
|
||||
@@ -1406,11 +1406,10 @@ public static class EVPD
|
||||
sb.AppendLine("SCSI to ATA Translation Layer Data:");
|
||||
|
||||
sb.AppendFormat("\tTranslation layer vendor: {0}",
|
||||
VendorString.Prettify(StringHandlers.CToString(page.VendorIdentification).Trim())).
|
||||
AppendLine();
|
||||
VendorString.Prettify(StringHandlers.CToString(page.VendorIdentification).Trim())).AppendLine();
|
||||
|
||||
sb.AppendFormat("\tTranslation layer name: {0}",
|
||||
StringHandlers.CToString(page.ProductIdentification).Trim()).AppendLine();
|
||||
sb.AppendFormat("\tTranslation layer name: {0}", StringHandlers.CToString(page.ProductIdentification).Trim()).
|
||||
AppendLine();
|
||||
|
||||
sb.AppendFormat("\tTranslation layer release level: {0}",
|
||||
StringHandlers.CToString(page.ProductRevisionLevel).Trim()).AppendLine();
|
||||
@@ -1686,13 +1685,12 @@ public static class EVPD
|
||||
|
||||
break;
|
||||
case 0xC5:
|
||||
sb.AppendFormat("\tBoard Serial Number: {0}", StringHandlers.CToString(page.SerialNumber)).
|
||||
AppendLine();
|
||||
sb.AppendFormat("\tBoard Serial Number: {0}", StringHandlers.CToString(page.SerialNumber)).AppendLine();
|
||||
|
||||
break;
|
||||
case 0xC6:
|
||||
sb.AppendFormat("\tBase Mechanical Serial Number: {0}",
|
||||
StringHandlers.CToString(page.SerialNumber)).AppendLine();
|
||||
sb.AppendFormat("\tBase Mechanical Serial Number: {0}", StringHandlers.CToString(page.SerialNumber)).
|
||||
AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -1781,7 +1779,7 @@ public static class EVPD
|
||||
CartridgeSerialNumber = new byte[32]
|
||||
};
|
||||
|
||||
byte[] buf = new byte[8];
|
||||
var buf = new byte[8];
|
||||
Array.Copy(pageResponse, 24, buf, 0, 8);
|
||||
decoded.InitiatorID = BitConverter.ToUInt64(buf.Reverse().ToArray(), 0);
|
||||
Array.Copy(pageResponse, 32, decoded.CartridgeSerialNumber, 0, 32);
|
||||
@@ -2068,8 +2066,7 @@ public static class EVPD
|
||||
sb.AppendFormat("\tManufacturing serial number: {0}", StringHandlers.CToString(page.ManufacturingSerial)).
|
||||
AppendLine();
|
||||
|
||||
sb.AppendFormat("\tReported serial number: {0}", StringHandlers.CToString(page.ReportedSerial)).
|
||||
AppendLine();
|
||||
sb.AppendFormat("\tReported serial number: {0}", StringHandlers.CToString(page.ReportedSerial)).AppendLine();
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
@@ -2198,10 +2195,9 @@ public static class EVPD
|
||||
if(pageResponse[4] != pageResponse[3] - 1)
|
||||
return null;
|
||||
|
||||
List<byte> array = new List<byte>();
|
||||
var array = new List<byte>();
|
||||
|
||||
const string fwRegExStr =
|
||||
@"Firmware Rev\s+=\s+(?<fw>\d+\.\d+)\s+Build date\s+=\s+(?<date>(\w|\d|\s*.)*)\s*$";
|
||||
const string fwRegExStr = @"Firmware Rev\s+=\s+(?<fw>\d+\.\d+)\s+Build date\s+=\s+(?<date>(\w|\d|\s*.)*)\s*$";
|
||||
|
||||
const string fwcRegExStr = @"FW_CONF\s+=\s+(?<value>0x[0-9A-Fa-f]{8})\s*$";
|
||||
const string servoRegExStr = @"Servo\s+Rev\s+=\s+(?<version>\d+\.\d+)\s*$";
|
||||
@@ -2209,7 +2205,7 @@ public static class EVPD
|
||||
var fwcRegEx = new Regex(fwcRegExStr);
|
||||
var servoRegEx = new Regex(servoRegExStr);
|
||||
|
||||
for(int pos = 5; pos < pageResponse.Length; pos++)
|
||||
for(var pos = 5; pos < pageResponse.Length; pos++)
|
||||
if(pageResponse[pos] == 0x00)
|
||||
{
|
||||
string str = StringHandlers.CToString(array.ToArray());
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
@@ -37,8 +39,6 @@ using System.Text;
|
||||
using Aaru.CommonTypes.Structs.Devices.SCSI;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
// Information from the following standards:
|
||||
// T9/375-D revision 10l
|
||||
// T10/995-D revision 10
|
||||
@@ -68,8 +68,8 @@ public static class Inquiry
|
||||
sb.AppendFormat("Device name: {0}", StringHandlers.CToString(response.ProductIdentification).Trim()).
|
||||
AppendLine();
|
||||
|
||||
sb.AppendFormat("Device release level: {0}",
|
||||
StringHandlers.CToString(response.ProductRevisionLevel).Trim()).AppendLine();
|
||||
sb.AppendFormat("Device release level: {0}", StringHandlers.CToString(response.ProductRevisionLevel).Trim()).
|
||||
AppendLine();
|
||||
|
||||
switch((PeripheralQualifiers)response.PeripheralQualifier)
|
||||
{
|
||||
@@ -90,8 +90,8 @@ public static class Inquiry
|
||||
|
||||
break;
|
||||
default:
|
||||
sb.AppendFormat("Vendor value {0} set in Peripheral Qualifier field.",
|
||||
response.PeripheralQualifier).AppendLine();
|
||||
sb.AppendFormat("Vendor value {0} set in Peripheral Qualifier field.", response.PeripheralQualifier).
|
||||
AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -191,8 +191,7 @@ public static class Inquiry
|
||||
|
||||
break;
|
||||
default:
|
||||
sb.AppendFormat("Unknown device type field value 0x{0:X2}", response.PeripheralDeviceType).
|
||||
AppendLine();
|
||||
sb.AppendFormat("Unknown device type field value 0x{0:X2}", response.PeripheralDeviceType).AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -2323,18 +2322,15 @@ public static class Inquiry
|
||||
sb.AppendFormat("Firmware personality: {0}", response.Qt_FirmwarePersonality).AppendLine();
|
||||
sb.AppendFormat("Firmware subpersonality: {0}", response.Qt_FirmwareSubPersonality).AppendLine();
|
||||
|
||||
sb.AppendFormat("Tape directory format version: {0}", response.Qt_TapeDirectoryFormatVersion).
|
||||
AppendLine();
|
||||
sb.AppendFormat("Tape directory format version: {0}", response.Qt_TapeDirectoryFormatVersion).AppendLine();
|
||||
|
||||
sb.AppendFormat("Controller hardware version: {0}", response.Qt_ControllerHardwareVersion).AppendLine();
|
||||
sb.AppendFormat("Drive EEPROM version: {0}", response.Qt_DriveEEPROMVersion).AppendLine();
|
||||
sb.AppendFormat("Drive hardware version: {0}", response.Qt_DriveHardwareVersion).AppendLine();
|
||||
|
||||
sb.AppendFormat("Media loader firmware version: {0}", response.Qt_MediaLoaderFirmwareVersion).
|
||||
AppendLine();
|
||||
sb.AppendFormat("Media loader firmware version: {0}", response.Qt_MediaLoaderFirmwareVersion).AppendLine();
|
||||
|
||||
sb.AppendFormat("Media loader hardware version: {0}", response.Qt_MediaLoaderHardwareVersion).
|
||||
AppendLine();
|
||||
sb.AppendFormat("Media loader hardware version: {0}", response.Qt_MediaLoaderHardwareVersion).AppendLine();
|
||||
|
||||
sb.AppendFormat("Media loader mechanical version: {0}", response.Qt_MediaLoaderMechanicalVersion).
|
||||
AppendLine();
|
||||
@@ -2345,8 +2341,7 @@ public static class Inquiry
|
||||
if(response.Qt_MediaLoaderPresent)
|
||||
sb.AppendLine("Media loader is present");
|
||||
|
||||
sb.AppendFormat("Module revision: {0}", StringHandlers.CToString(response.Qt_ModuleRevision)).
|
||||
AppendLine();
|
||||
sb.AppendFormat("Module revision: {0}", StringHandlers.CToString(response.Qt_ModuleRevision)).AppendLine();
|
||||
}
|
||||
#endregion Quantum vendor prettifying
|
||||
|
||||
@@ -2403,8 +2398,7 @@ public static class Inquiry
|
||||
|
||||
if(response.Seagate3Present)
|
||||
sb.AppendFormat("Drive servo part number: {0}",
|
||||
PrintHex.ByteArrayToHexArrayString(response.Seagate_ServoPROMPartNo, 40)).
|
||||
AppendLine();
|
||||
PrintHex.ByteArrayToHexArrayString(response.Seagate_ServoPROMPartNo, 40)).AppendLine();
|
||||
}
|
||||
#endregion Seagate vendor prettifying
|
||||
|
||||
@@ -2439,7 +2433,7 @@ public static class Inquiry
|
||||
response.IsHiMD)
|
||||
if(response.KreonPresent)
|
||||
{
|
||||
byte[] vendor = new byte[7];
|
||||
var vendor = new byte[7];
|
||||
Array.Copy(response.VendorSpecific, 11, vendor, 0, 7);
|
||||
sb.AppendLine("Vendor-specific bytes 47 to 55");
|
||||
sb.AppendLine("============================================================");
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI.MMC;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.SCSI.MMC;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
@@ -222,8 +222,7 @@ public static class AACS
|
||||
if(response.Reserved != 0)
|
||||
sb.AppendFormat("Reserved = 0x{0:X2}", response.Reserved).AppendLine();
|
||||
#endif
|
||||
sb.AppendFormat("Total number of media key blocks available to transfer {0}", response.TotalPacks).
|
||||
AppendLine();
|
||||
sb.AppendFormat("Total number of media key blocks available to transfer {0}", response.TotalPacks).AppendLine();
|
||||
|
||||
sb.AppendFormat("AACS Media Key Blocks in hex follows:");
|
||||
sb.AppendLine(PrintHex.ByteArrayToHexArrayString(response.MediaKeyBlockPacks, 80));
|
||||
@@ -301,12 +300,12 @@ public static class AACS
|
||||
|
||||
decoded.Extents = new AACSLBAExtent[(AACSLBAExtsResponse.Length - 4) / 16];
|
||||
|
||||
for(int i = 0; i < (AACSLBAExtsResponse.Length - 4) / 16; i++)
|
||||
for(var i = 0; i < (AACSLBAExtsResponse.Length - 4) / 16; i++)
|
||||
{
|
||||
decoded.Extents[i].Reserved = new byte[8];
|
||||
Array.Copy(AACSLBAExtsResponse, 0 + (i * 16) + 4, decoded.Extents[i].Reserved, 0, 8);
|
||||
decoded.Extents[i].StartLBA = BigEndianBitConverter.ToUInt32(AACSLBAExtsResponse, 8 + (i * 16) + 4);
|
||||
decoded.Extents[i].LBACount = BigEndianBitConverter.ToUInt32(AACSLBAExtsResponse, 12 + (i * 16) + 4);
|
||||
Array.Copy(AACSLBAExtsResponse, 0 + i * 16 + 4, decoded.Extents[i].Reserved, 0, 8);
|
||||
decoded.Extents[i].StartLBA = BigEndianBitConverter.ToUInt32(AACSLBAExtsResponse, 8 + i * 16 + 4);
|
||||
decoded.Extents[i].LBACount = BigEndianBitConverter.ToUInt32(AACSLBAExtsResponse, 12 + i * 16 + 4);
|
||||
}
|
||||
|
||||
return decoded;
|
||||
@@ -327,7 +326,7 @@ public static class AACS
|
||||
else
|
||||
sb.AppendFormat("Drive can store {0} LBA Extents", response.MaxLBAExtents).AppendLine();
|
||||
|
||||
for(int i = 0; i < response.Extents.Length; i++)
|
||||
for(var i = 0; i < response.Extents.Length; i++)
|
||||
sb.AppendFormat("LBA Extent {0} starts at LBA {1} and goes for {2} sectors", i,
|
||||
response.Extents[i].StartLBA, response.Extents[i].LBACount);
|
||||
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI.MMC;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.SCSI.MMC;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
|
||||
@@ -30,12 +30,12 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI.MMC;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI.MMC;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
@@ -95,7 +95,7 @@ public static class DiscInformation
|
||||
decoded.LastPossibleLeadOutStartLBA =
|
||||
(uint)((response[20] << 24) + (response[21] << 16) + (response[22] << 8) + response[23]);
|
||||
|
||||
byte[] temp = new byte[8];
|
||||
var temp = new byte[8];
|
||||
Array.Copy(response, 24, temp, 0, 8);
|
||||
Array.Reverse(temp);
|
||||
decoded.DiscBarcode = BitConverter.ToUInt64(temp, 0);
|
||||
@@ -107,17 +107,17 @@ public static class DiscInformation
|
||||
decoded.OPCTablesNumber = response[33];
|
||||
|
||||
if(decoded.OPCTablesNumber <= 0 ||
|
||||
response.Length != (decoded.OPCTablesNumber * 8) + 34)
|
||||
response.Length != decoded.OPCTablesNumber * 8 + 34)
|
||||
return decoded;
|
||||
|
||||
decoded.OPCTables = new OPCTable[decoded.OPCTablesNumber];
|
||||
|
||||
for(int i = 0; i < decoded.OPCTablesNumber; i++)
|
||||
for(var i = 0; i < decoded.OPCTablesNumber; i++)
|
||||
{
|
||||
decoded.OPCTables[i].Speed = (ushort)((response[34 + (i * 8) + 0] << 16) + response[34 + (i * 8) + 1]);
|
||||
decoded.OPCTables[i].Speed = (ushort)((response[34 + i * 8 + 0] << 16) + response[34 + i * 8 + 1]);
|
||||
|
||||
decoded.OPCTables[i].OPCValues = new byte[6];
|
||||
Array.Copy(response, 34 + (i * 8) + 2, decoded.OPCTables[i].OPCValues, 0, 6);
|
||||
Array.Copy(response, 34 + i * 8 + 2, decoded.OPCTables[i].OPCValues, 0, 6);
|
||||
}
|
||||
|
||||
return decoded;
|
||||
@@ -218,8 +218,7 @@ public static class DiscInformation
|
||||
sb.AppendFormat("First track in last session is track {0}", information.Value.FirstTrackLastSession).
|
||||
AppendLine();
|
||||
|
||||
sb.AppendFormat("Last track in last session is track {0}", information.Value.LastTrackLastSession).
|
||||
AppendLine();
|
||||
sb.AppendFormat("Last track in last session is track {0}", information.Value.LastTrackLastSession).AppendLine();
|
||||
|
||||
sb.AppendFormat("Last session Lead-In address is {0} (as LBA) or {1:X2}:{2:X2}:{3:X2}",
|
||||
information.Value.LastSessionLeadInStartLBA,
|
||||
|
||||
@@ -30,47 +30,59 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Aaru.Decoders.SCSI.MMC;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
public enum FormatLayerTypeCodes : ushort
|
||||
{
|
||||
CDLayer = 0x0008, DVDLayer = 0x0010, BDLayer = 0x0040,
|
||||
CDLayer = 0x0008,
|
||||
DVDLayer = 0x0010,
|
||||
BDLayer = 0x0040,
|
||||
HDDVDLayer = 0x0050
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
public enum SessionStatusCodes : byte
|
||||
{
|
||||
Empty = 0x00, Incomplete = 0x01, ReservedOrDamaged = 0x02,
|
||||
Complete = 0x03
|
||||
Empty = 0x00,
|
||||
Incomplete = 0x01,
|
||||
ReservedOrDamaged = 0x02,
|
||||
Complete = 0x03
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
public enum DiscStatusCodes : byte
|
||||
{
|
||||
Empty = 0x00, Incomplete = 0x01, Finalized = 0x02,
|
||||
Others = 0x03
|
||||
Empty = 0x00,
|
||||
Incomplete = 0x01,
|
||||
Finalized = 0x02,
|
||||
Others = 0x03
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
public enum BGFormatStatusCodes : byte
|
||||
{
|
||||
NoFormattable = 0x00, IncompleteBackgroundFormat = 0x01, BackgroundFormatInProgress = 0x02,
|
||||
FormatComplete = 0x03
|
||||
NoFormattable = 0x00,
|
||||
IncompleteBackgroundFormat = 0x01,
|
||||
BackgroundFormatInProgress = 0x02,
|
||||
FormatComplete = 0x03
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
||||
public enum DiscTypeCodes : byte
|
||||
{
|
||||
/// <summary>Also valid for CD-DA, DVD and BD</summary>
|
||||
CDROM = 0x00, CDi = 0x10, CDROMXA = 0x20, Undefined = 0xFF
|
||||
CDROM = 0x00, CDi = 0x10,
|
||||
CDROMXA = 0x20,
|
||||
Undefined = 0xFF
|
||||
}
|
||||
|
||||
public enum LayerJumpRecordingStatus : byte
|
||||
{
|
||||
Incremental = 0, Unspecified = 1, Manual = 2,
|
||||
Incremental = 0,
|
||||
Unspecified = 1,
|
||||
Manual = 2,
|
||||
RegularInterval = 3
|
||||
}
|
||||
@@ -30,6 +30,12 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
|
||||
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
|
||||
namespace Aaru.Decoders.SCSI.MMC;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
@@ -37,10 +43,6 @@ using System.Text;
|
||||
using Aaru.CommonTypes.Structs.Devices.SCSI;
|
||||
using Aaru.Helpers;
|
||||
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
|
||||
namespace Aaru.Decoders.SCSI.MMC;
|
||||
|
||||
/// <summary>MMC Feature enumeration</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum FeatureNumber : ushort
|
||||
@@ -1307,7 +1309,7 @@ public static class Features
|
||||
if(feature.Length < 4)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0000)
|
||||
return null;
|
||||
@@ -1321,8 +1323,8 @@ public static class Features
|
||||
decoded.Persistent |= (feature[2] & 0x02) == 0x02;
|
||||
decoded.Version = (byte)((feature[2] & 0x3C) >> 2);
|
||||
|
||||
int offset = 4;
|
||||
List<Profile> listProfiles = new List<Profile>();
|
||||
var offset = 4;
|
||||
var listProfiles = new List<Profile>();
|
||||
|
||||
while(offset < feature.Length)
|
||||
{
|
||||
@@ -1349,7 +1351,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0001)
|
||||
return null;
|
||||
@@ -1385,7 +1387,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0002)
|
||||
return null;
|
||||
@@ -1415,7 +1417,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0003)
|
||||
return null;
|
||||
@@ -1451,7 +1453,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0004)
|
||||
return null;
|
||||
@@ -1485,7 +1487,7 @@ public static class Features
|
||||
if(feature.Length < 12)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0010)
|
||||
return null;
|
||||
@@ -1516,7 +1518,7 @@ public static class Features
|
||||
if(feature.Length < 4)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x001D)
|
||||
return null;
|
||||
@@ -1541,7 +1543,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x001E)
|
||||
return null;
|
||||
@@ -1575,7 +1577,7 @@ public static class Features
|
||||
if(feature.Length < 4)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x001F)
|
||||
return null;
|
||||
@@ -1612,7 +1614,7 @@ public static class Features
|
||||
if(feature.Length < 16)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0020)
|
||||
return null;
|
||||
@@ -1631,8 +1633,7 @@ public static class Features
|
||||
|
||||
decoded.LastLBA = (uint)((feature[4] << 24) + (feature[5] << 16) + (feature[6] << 8) + feature[7]);
|
||||
|
||||
decoded.LogicalBlockSize =
|
||||
(uint)((feature[8] << 24) + (feature[9] << 16) + (feature[10] << 8) + feature[11]);
|
||||
decoded.LogicalBlockSize = (uint)((feature[8] << 24) + (feature[9] << 16) + (feature[10] << 8) + feature[11]);
|
||||
|
||||
decoded.Blocking = (ushort)((feature[12] << 8) + feature[13]);
|
||||
decoded.PP |= (feature[14] & 0x01) == 0x01;
|
||||
@@ -1648,7 +1649,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0021)
|
||||
return null;
|
||||
@@ -1689,7 +1690,7 @@ public static class Features
|
||||
if(feature.Length < 4)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0022)
|
||||
return null;
|
||||
@@ -1714,7 +1715,7 @@ public static class Features
|
||||
if(feature.Length < 4)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0023)
|
||||
return null;
|
||||
@@ -1753,7 +1754,7 @@ public static class Features
|
||||
if(feature.Length < 4)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0024)
|
||||
return null;
|
||||
@@ -1782,7 +1783,7 @@ public static class Features
|
||||
if(feature.Length < 12)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0025)
|
||||
return null;
|
||||
@@ -1813,7 +1814,7 @@ public static class Features
|
||||
if(feature.Length < 4)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0026)
|
||||
return null;
|
||||
@@ -1838,7 +1839,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0027)
|
||||
return null;
|
||||
@@ -1863,7 +1864,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0028)
|
||||
return null;
|
||||
@@ -1896,7 +1897,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0029)
|
||||
return null;
|
||||
@@ -1925,7 +1926,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x002A)
|
||||
return null;
|
||||
@@ -1956,7 +1957,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x002B)
|
||||
return null;
|
||||
@@ -1983,7 +1984,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x002C)
|
||||
return null;
|
||||
@@ -2013,7 +2014,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x002D)
|
||||
return null;
|
||||
@@ -2050,7 +2051,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x002E)
|
||||
return null;
|
||||
@@ -2086,7 +2087,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x002F)
|
||||
return null;
|
||||
@@ -2120,7 +2121,7 @@ public static class Features
|
||||
if(feature.Length < 4)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0030)
|
||||
return null;
|
||||
@@ -2145,7 +2146,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0031)
|
||||
return null;
|
||||
@@ -2172,7 +2173,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0032)
|
||||
return null;
|
||||
@@ -2200,7 +2201,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0033)
|
||||
return null;
|
||||
@@ -2232,7 +2233,7 @@ public static class Features
|
||||
if(feature.Length < 4)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0035)
|
||||
return null;
|
||||
@@ -2257,7 +2258,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0037)
|
||||
return null;
|
||||
@@ -2284,7 +2285,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0038)
|
||||
return null;
|
||||
@@ -2309,7 +2310,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x003A)
|
||||
return null;
|
||||
@@ -2338,7 +2339,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x003B)
|
||||
return null;
|
||||
@@ -2365,7 +2366,7 @@ public static class Features
|
||||
if(feature.Length < 32)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0040)
|
||||
return null;
|
||||
@@ -2403,7 +2404,7 @@ public static class Features
|
||||
if(feature.Length < 24)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0041)
|
||||
return null;
|
||||
@@ -2439,7 +2440,7 @@ public static class Features
|
||||
if(feature.Length < 4)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0042)
|
||||
return null;
|
||||
@@ -2464,7 +2465,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0050)
|
||||
return null;
|
||||
@@ -2492,7 +2493,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0051)
|
||||
return null;
|
||||
@@ -2520,7 +2521,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0080)
|
||||
return null;
|
||||
@@ -2547,7 +2548,7 @@ public static class Features
|
||||
if(feature.Length < 4)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0100)
|
||||
return null;
|
||||
@@ -2572,7 +2573,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0101)
|
||||
return null;
|
||||
@@ -2599,7 +2600,7 @@ public static class Features
|
||||
if(feature.Length < 4)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0102)
|
||||
return null;
|
||||
@@ -2628,7 +2629,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0103)
|
||||
return null;
|
||||
@@ -2658,7 +2659,7 @@ public static class Features
|
||||
if(feature.Length < 4)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0104)
|
||||
return null;
|
||||
@@ -2687,7 +2688,7 @@ public static class Features
|
||||
if(feature.Length < 4)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0105)
|
||||
return null;
|
||||
@@ -2719,7 +2720,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0106)
|
||||
return null;
|
||||
@@ -2746,7 +2747,7 @@ public static class Features
|
||||
if(feature.Length < 4)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0107)
|
||||
return null;
|
||||
@@ -2788,7 +2789,7 @@ public static class Features
|
||||
if(feature.Length < 4)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0108)
|
||||
return null;
|
||||
@@ -2802,7 +2803,7 @@ public static class Features
|
||||
decoded.Persistent |= (feature[2] & 0x02) == 0x02;
|
||||
decoded.Version = (byte)((feature[2] & 0x3C) >> 2);
|
||||
|
||||
byte[] serial = new byte[feature.Length];
|
||||
var serial = new byte[feature.Length];
|
||||
Array.Copy(feature, 4, serial, 0, feature.Length - 4);
|
||||
decoded.Serial = StringHandlers.CToString(serial).Trim();
|
||||
|
||||
@@ -2817,7 +2818,7 @@ public static class Features
|
||||
if(feature.Length < 4)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0109)
|
||||
return null;
|
||||
@@ -2842,7 +2843,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x010A)
|
||||
return null;
|
||||
@@ -2858,9 +2859,9 @@ public static class Features
|
||||
|
||||
decoded.DCBs = new uint[feature[3] / 4];
|
||||
|
||||
for(int i = 0; i < decoded.DCBs.Length; i++)
|
||||
decoded.DCBs[i] = (uint)((feature[0 + 4 + (i * 4)] << 24) + (feature[1 + 4 + (i * 4)] << 16) +
|
||||
(feature[2 + 4 + (i * 4)] << 8) + feature[3 + 4 + (i * 4)]);
|
||||
for(var i = 0; i < decoded.DCBs.Length; i++)
|
||||
decoded.DCBs[i] = (uint)((feature[0 + 4 + i * 4] << 24) + (feature[1 + 4 + i * 4] << 16) +
|
||||
(feature[2 + 4 + i * 4] << 8) + feature[3 + 4 + i * 4]);
|
||||
|
||||
return decoded;
|
||||
}
|
||||
@@ -2873,7 +2874,7 @@ public static class Features
|
||||
if(feature.Length < 4)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x010B)
|
||||
return null;
|
||||
@@ -2900,7 +2901,7 @@ public static class Features
|
||||
if(feature.Length < 20)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x010C)
|
||||
return null;
|
||||
@@ -2933,7 +2934,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x010D)
|
||||
return null;
|
||||
@@ -2971,7 +2972,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x010E)
|
||||
return null;
|
||||
@@ -2998,7 +2999,7 @@ public static class Features
|
||||
if(feature.Length < 8)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0110)
|
||||
return null;
|
||||
@@ -3023,7 +3024,7 @@ public static class Features
|
||||
if(feature.Length < 4)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0113)
|
||||
return null;
|
||||
@@ -3048,7 +3049,7 @@ public static class Features
|
||||
if(feature.Length < 6)
|
||||
return null;
|
||||
|
||||
ushort number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
var number = (ushort)((feature[0] << 8) + feature[1]);
|
||||
|
||||
if(number != 0x0142)
|
||||
return null;
|
||||
@@ -3067,11 +3068,11 @@ public static class Features
|
||||
decoded.ME |= (feature[4] & 0x01) == 0x01;
|
||||
decoded.Profiles = new ushort[feature[5]];
|
||||
|
||||
if((feature[5] * 2) + 6 != feature.Length)
|
||||
if(feature[5] * 2 + 6 != feature.Length)
|
||||
return decoded;
|
||||
|
||||
for(int i = 0; i < feature[5]; i++)
|
||||
decoded.Profiles[i] = (ushort)((feature[0 + 6 + (2 * i)] << 8) + feature[1 + 6 + (2 * i)]);
|
||||
for(var i = 0; i < feature[5]; i++)
|
||||
decoded.Profiles[i] = (ushort)((feature[0 + 6 + 2 * i] << 8) + feature[1 + 6 + 2 * i]);
|
||||
|
||||
return decoded;
|
||||
}
|
||||
@@ -3318,8 +3319,7 @@ public static class Features
|
||||
|
||||
break;
|
||||
default:
|
||||
sb.AppendFormat("an unknown interface with code {0}", (uint)ftr.PhysicalInterfaceStandard).
|
||||
AppendLine();
|
||||
sb.AppendFormat("an unknown interface with code {0}", (uint)ftr.PhysicalInterfaceStandard).AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -4029,8 +4029,7 @@ public static class Features
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public static string Prettify_0030(Feature_0030? feature) =>
|
||||
!feature.HasValue ? null : "Drive can read DDCDs\n";
|
||||
public static string Prettify_0030(Feature_0030? feature) => !feature.HasValue ? null : "Drive can read DDCDs\n";
|
||||
|
||||
public static string Prettify_0031(Feature_0031? feature)
|
||||
{
|
||||
@@ -4273,8 +4272,7 @@ public static class Features
|
||||
}
|
||||
|
||||
public static string Prettify_0042(Feature_0042? feature) =>
|
||||
!feature.HasValue ? null
|
||||
: "Drive is able to detect and report defective writable unit and behave accordinly\n";
|
||||
!feature.HasValue ? null : "Drive is able to detect and report defective writable unit and behave accordinly\n";
|
||||
|
||||
public static string Prettify_0050(Feature_0050? feature)
|
||||
{
|
||||
@@ -4558,7 +4556,7 @@ public static class Features
|
||||
Feature_010C ftr = feature.Value;
|
||||
var sb = new StringBuilder();
|
||||
|
||||
byte[] temp = new byte[4];
|
||||
var temp = new byte[4];
|
||||
temp[0] = (byte)((ftr.Century & 0xFF00) >> 8);
|
||||
temp[1] = (byte)(ftr.Century & 0xFF);
|
||||
temp[2] = (byte)((ftr.Year & 0xFF00) >> 8);
|
||||
@@ -4660,8 +4658,7 @@ public static class Features
|
||||
sb.AppendLine();
|
||||
|
||||
if(ftr.MaxScrambleExtent > 0)
|
||||
sb.AppendFormat("\tMaximum {0} scranble extent information entries", ftr.MaxScrambleExtent).
|
||||
AppendLine();
|
||||
sb.AppendFormat("\tMaximum {0} scranble extent information entries", ftr.MaxScrambleExtent).AppendLine();
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
@@ -4718,7 +4715,7 @@ public static class Features
|
||||
if(ftr.Profiles == null)
|
||||
return sb.ToString();
|
||||
|
||||
for(int i = 0; i < ftr.Profiles.Length; i++)
|
||||
for(var i = 0; i < ftr.Profiles.Length; i++)
|
||||
sb.AppendFormat("\tProfile {0}: {1}", i, ftr.Profiles[i]).AppendLine();
|
||||
|
||||
return sb.ToString();
|
||||
@@ -4848,8 +4845,8 @@ public static class Features
|
||||
CurrentProfile = (ushort)((response[6] << 8) + response[7])
|
||||
};
|
||||
|
||||
uint offset = 8;
|
||||
List<FeatureDescriptor> descLst = new List<FeatureDescriptor>();
|
||||
uint offset = 8;
|
||||
var descLst = new List<FeatureDescriptor>();
|
||||
|
||||
while(offset + 4 < response.Length)
|
||||
{
|
||||
|
||||
@@ -30,12 +30,12 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI.MMC;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.SCSI.MMC;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
@@ -74,8 +74,8 @@ public static class Hybrid
|
||||
FormatLayers = new ushort[(FormatLayersResponse.Length - 6) / 2]
|
||||
};
|
||||
|
||||
for(int i = 0; i < (FormatLayersResponse.Length - 6) / 2; i++)
|
||||
decoded.FormatLayers[i] = BigEndianBitConverter.ToUInt16(FormatLayersResponse, (i * 2) + 6);
|
||||
for(var i = 0; i < (FormatLayersResponse.Length - 6) / 2; i++)
|
||||
decoded.FormatLayers[i] = BigEndianBitConverter.ToUInt16(FormatLayersResponse, i * 2 + 6);
|
||||
|
||||
return decoded;
|
||||
}
|
||||
@@ -91,7 +91,7 @@ public static class Hybrid
|
||||
|
||||
sb.AppendFormat("{0} format layers recognized", response.NumberOfLayers);
|
||||
|
||||
for(int i = 0; i < response.FormatLayers.Length; i++)
|
||||
for(var i = 0; i < response.FormatLayers.Length; i++)
|
||||
switch(response.FormatLayers[i])
|
||||
{
|
||||
case (ushort)FormatLayerTypeCodes.BDLayer:
|
||||
@@ -148,8 +148,7 @@ public static class Hybrid
|
||||
|
||||
default:
|
||||
{
|
||||
sb.AppendFormat("Layer {0} is of unknown type 0x{1:X4}", i, response.FormatLayers[i]).
|
||||
AppendLine();
|
||||
sb.AppendFormat("Layer {0} is of unknown type 0x{1:X4}", i, response.FormatLayers[i]).AppendLine();
|
||||
|
||||
if(response.DefaultFormatLayer == i)
|
||||
sb.AppendLine("This is the default layer.");
|
||||
|
||||
@@ -79,11 +79,9 @@ public class TrackInformation
|
||||
(uint)((response[8] << 24) + (response[9] << 16) + (response[10] << 8) + response[11]),
|
||||
NextWritableAddress =
|
||||
(uint)((response[12] << 24) + (response[13] << 16) + (response[14] << 8) + response[15]),
|
||||
FreeBlocks = (uint)((response[16] << 24) + (response[17] << 16) + (response[18] << 8) + response[19]),
|
||||
FixedPacketSize =
|
||||
(uint)((response[20] << 24) + (response[21] << 16) + (response[22] << 8) + response[23]),
|
||||
LogicalTrackSize =
|
||||
(uint)((response[24] << 24) + (response[25] << 16) + (response[26] << 8) + response[27]),
|
||||
FreeBlocks = (uint)((response[16] << 24) + (response[17] << 16) + (response[18] << 8) + response[19]),
|
||||
FixedPacketSize = (uint)((response[20] << 24) + (response[21] << 16) + (response[22] << 8) + response[23]),
|
||||
LogicalTrackSize = (uint)((response[24] << 24) + (response[25] << 16) + (response[26] << 8) + response[27]),
|
||||
LastRecordedAddress =
|
||||
(uint)((response[28] << 24) + (response[29] << 16) + (response[30] << 8) + response[31])
|
||||
};
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI.MMC;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.SCSI.MMC;
|
||||
|
||||
// Information from the following standards:
|
||||
// ANSI X3.304-1997
|
||||
// T10/1048-D revision 9.0
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
|
||||
@@ -30,18 +30,18 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
{
|
||||
public static byte[] EncodeModePage_01(ModePage_01 page)
|
||||
{
|
||||
byte[] pg = new byte[8];
|
||||
var pg = new byte[8];
|
||||
|
||||
pg[0] = 0x01;
|
||||
pg[1] = 6;
|
||||
|
||||
@@ -30,18 +30,18 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
{
|
||||
public static byte[] EncodeModePage_01_MMC(ModePage_01_MMC page)
|
||||
{
|
||||
byte[] pg = new byte[12];
|
||||
var pg = new byte[12];
|
||||
|
||||
pg[0] = 0x01;
|
||||
pg[1] = 10;
|
||||
@@ -128,21 +128,20 @@ public static partial class Modes
|
||||
if(page.ReadRetryCount > 0)
|
||||
sb.AppendFormat("\tDrive will repeat read operations {0} times", page.ReadRetryCount).AppendLine();
|
||||
|
||||
string AllUsed = "\tAll available recovery procedures will be used.\n";
|
||||
string CIRCRetriesUsed = "\tOnly retries and CIRC are used.\n";
|
||||
string RetriesUsed = "\tOnly retries are used.\n";
|
||||
string RecoveredNotReported = "\tRecovered errors will not be reported.\n";
|
||||
string RecoveredReported = "\tRecovered errors will be reported.\n";
|
||||
string RecoveredAbort = "\tRecovered errors will be reported and aborted with CHECK CONDITION.\n";
|
||||
string UnrecECCAbort = "\tUnrecovered ECC errors will return CHECK CONDITION.";
|
||||
string UnrecCIRCAbort = "\tUnrecovered CIRC errors will return CHECK CONDITION.";
|
||||
string UnrecECCNotAbort = "\tUnrecovered ECC errors will not abort the transfer.";
|
||||
string UnrecCIRCNotAbort = "\tUnrecovered CIRC errors will not abort the transfer.";
|
||||
var AllUsed = "\tAll available recovery procedures will be used.\n";
|
||||
var CIRCRetriesUsed = "\tOnly retries and CIRC are used.\n";
|
||||
var RetriesUsed = "\tOnly retries are used.\n";
|
||||
var RecoveredNotReported = "\tRecovered errors will not be reported.\n";
|
||||
var RecoveredReported = "\tRecovered errors will be reported.\n";
|
||||
var RecoveredAbort = "\tRecovered errors will be reported and aborted with CHECK CONDITION.\n";
|
||||
var UnrecECCAbort = "\tUnrecovered ECC errors will return CHECK CONDITION.";
|
||||
var UnrecCIRCAbort = "\tUnrecovered CIRC errors will return CHECK CONDITION.";
|
||||
var UnrecECCNotAbort = "\tUnrecovered ECC errors will not abort the transfer.";
|
||||
var UnrecCIRCNotAbort = "\tUnrecovered CIRC errors will not abort the transfer.";
|
||||
|
||||
string UnrecECCAbortData = "\tUnrecovered ECC errors will return CHECK CONDITION and the uncorrected data.";
|
||||
var UnrecECCAbortData = "\tUnrecovered ECC errors will return CHECK CONDITION and the uncorrected data.";
|
||||
|
||||
string UnrecCIRCAbortData =
|
||||
"\tUnrecovered CIRC errors will return CHECK CONDITION and the uncorrected data.";
|
||||
var UnrecCIRCAbortData = "\tUnrecovered CIRC errors will return CHECK CONDITION and the uncorrected data.";
|
||||
|
||||
switch(page.Parameter)
|
||||
{
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
@@ -153,9 +153,8 @@ public static partial class Modes
|
||||
AppendLine();
|
||||
|
||||
if(page.FirstBurstSize > 0)
|
||||
sb.
|
||||
AppendFormat("\t{0} bytes maximum can be transferred for a command along with the disconnect command",
|
||||
page.FirstBurstSize * 512).AppendLine();
|
||||
sb.AppendFormat("\t{0} bytes maximum can be transferred for a command along with the disconnect command",
|
||||
page.FirstBurstSize * 512).AppendLine();
|
||||
|
||||
if(page.DIMM)
|
||||
sb.AppendLine("\tTarget shall not transfer data for a command during the same interconnect tenancy");
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
@@ -130,8 +130,8 @@ public static partial class Modes
|
||||
AppendFormat("\t{0} tracks per zone to use in dividing the capacity for the purpose of allocating alternate sectors",
|
||||
page.TracksPerZone).AppendLine();
|
||||
|
||||
sb.AppendFormat("\t{0} sectors per zone that shall be reserved for defect handling",
|
||||
page.AltSectorsPerZone).AppendLine();
|
||||
sb.AppendFormat("\t{0} sectors per zone that shall be reserved for defect handling", page.AltSectorsPerZone).
|
||||
AppendLine();
|
||||
|
||||
sb.AppendFormat("\t{0} tracks per zone that shall be reserved for defect handling", page.AltTracksPerZone).
|
||||
AppendLine();
|
||||
@@ -143,8 +143,8 @@ public static partial class Modes
|
||||
sb.AppendFormat("\t{0} Bytes per physical sector", page.BytesPerSector).AppendLine();
|
||||
sb.AppendFormat("\tTarget-dependent interleave value is {0}", page.Interleave).AppendLine();
|
||||
|
||||
sb.AppendFormat("\t{0} sectors between last block of one track and first block of the next",
|
||||
page.TrackSkew).AppendLine();
|
||||
sb.AppendFormat("\t{0} sectors between last block of one track and first block of the next", page.TrackSkew).
|
||||
AppendLine();
|
||||
|
||||
sb.AppendFormat("\t{0} sectors between last block of a cylinder and first block of the next one",
|
||||
page.CylinderSkew).AppendLine();
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
@@ -120,12 +120,10 @@ public static partial class Modes
|
||||
sb.AppendFormat("\t{0} cylinders", page.Cylinders).AppendLine();
|
||||
|
||||
if(page.WritePrecompCylinder < page.Cylinders)
|
||||
sb.AppendFormat("\tWrite pre-compensation starts at cylinder {0}", page.WritePrecompCylinder).
|
||||
AppendLine();
|
||||
sb.AppendFormat("\tWrite pre-compensation starts at cylinder {0}", page.WritePrecompCylinder).AppendLine();
|
||||
|
||||
if(page.WriteReduceCylinder < page.Cylinders)
|
||||
sb.AppendFormat("\tWrite current reduction starts at cylinder {0}", page.WriteReduceCylinder).
|
||||
AppendLine();
|
||||
sb.AppendFormat("\tWrite current reduction starts at cylinder {0}", page.WriteReduceCylinder).AppendLine();
|
||||
|
||||
if(page.DriveStepRate > 0)
|
||||
sb.AppendFormat("\tDrive steps in {0} ns", (uint)page.DriveStepRate * 100).AppendLine();
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
@@ -169,12 +169,10 @@ public static partial class Modes
|
||||
sb.AppendFormat("\t{0} bytes per sector", page.BytesPerSector).AppendLine();
|
||||
|
||||
if(page.WritePrecompCylinder < page.Cylinders)
|
||||
sb.AppendFormat("\tWrite pre-compensation starts at cylinder {0}", page.WritePrecompCylinder).
|
||||
AppendLine();
|
||||
sb.AppendFormat("\tWrite pre-compensation starts at cylinder {0}", page.WritePrecompCylinder).AppendLine();
|
||||
|
||||
if(page.WriteReduceCylinder < page.Cylinders)
|
||||
sb.AppendFormat("\tWrite current reduction starts at cylinder {0}", page.WriteReduceCylinder).
|
||||
AppendLine();
|
||||
sb.AppendFormat("\tWrite current reduction starts at cylinder {0}", page.WriteReduceCylinder).AppendLine();
|
||||
|
||||
if(page.DriveStepRate > 0)
|
||||
sb.AppendFormat("\tDrive steps in {0} μs", (uint)page.DriveStepRate * 100).AppendLine();
|
||||
@@ -195,9 +193,8 @@ public static partial class Modes
|
||||
(double)page.MotorOnDelay * 10).AppendLine();
|
||||
|
||||
if(page.MotorOffDelay != 0xFF)
|
||||
sb.
|
||||
AppendFormat("\tTarget shall wait {0} seconds before releasing the motor on signal after becoming idle",
|
||||
(double)page.MotorOffDelay * 10).AppendLine();
|
||||
sb.AppendFormat("\tTarget shall wait {0} seconds before releasing the motor on signal after becoming idle",
|
||||
(double)page.MotorOffDelay * 10).AppendLine();
|
||||
else
|
||||
sb.AppendLine("\tTarget shall never release the motor on signal");
|
||||
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global"), SuppressMessage("ReSharper", "NotAccessedField.Global")]
|
||||
public static partial class Modes
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
@@ -93,21 +93,20 @@ public static partial class Modes
|
||||
if(page.VerifyRetryCount > 0)
|
||||
sb.AppendFormat("\tDrive will repeat verify operations {0} times", page.VerifyRetryCount).AppendLine();
|
||||
|
||||
string AllUsed = "\tAll available recovery procedures will be used.\n";
|
||||
string CIRCRetriesUsed = "\tOnly retries and CIRC are used.\n";
|
||||
string RetriesUsed = "\tOnly retries are used.\n";
|
||||
string RecoveredNotReported = "\tRecovered errors will not be reported.\n";
|
||||
string RecoveredReported = "\tRecovered errors will be reported.\n";
|
||||
string RecoveredAbort = "\tRecovered errors will be reported and aborted with CHECK CONDITION.\n";
|
||||
string UnrecECCAbort = "\tUnrecovered ECC errors will return CHECK CONDITION.";
|
||||
string UnrecCIRCAbort = "\tUnrecovered CIRC errors will return CHECK CONDITION.";
|
||||
string UnrecECCNotAbort = "\tUnrecovered ECC errors will not abort the transfer.";
|
||||
string UnrecCIRCNotAbort = "\tUnrecovered CIRC errors will not abort the transfer.";
|
||||
var AllUsed = "\tAll available recovery procedures will be used.\n";
|
||||
var CIRCRetriesUsed = "\tOnly retries and CIRC are used.\n";
|
||||
var RetriesUsed = "\tOnly retries are used.\n";
|
||||
var RecoveredNotReported = "\tRecovered errors will not be reported.\n";
|
||||
var RecoveredReported = "\tRecovered errors will be reported.\n";
|
||||
var RecoveredAbort = "\tRecovered errors will be reported and aborted with CHECK CONDITION.\n";
|
||||
var UnrecECCAbort = "\tUnrecovered ECC errors will return CHECK CONDITION.";
|
||||
var UnrecCIRCAbort = "\tUnrecovered CIRC errors will return CHECK CONDITION.";
|
||||
var UnrecECCNotAbort = "\tUnrecovered ECC errors will not abort the transfer.";
|
||||
var UnrecCIRCNotAbort = "\tUnrecovered CIRC errors will not abort the transfer.";
|
||||
|
||||
string UnrecECCAbortData = "\tUnrecovered ECC errors will return CHECK CONDITION and the uncorrected data.";
|
||||
var UnrecECCAbortData = "\tUnrecovered ECC errors will return CHECK CONDITION and the uncorrected data.";
|
||||
|
||||
string UnrecCIRCAbortData =
|
||||
"\tUnrecovered CIRC errors will return CHECK CONDITION and the uncorrected data.";
|
||||
var UnrecCIRCAbortData = "\tUnrecovered CIRC errors will return CHECK CONDITION and the uncorrected data.";
|
||||
|
||||
switch(page.Parameter)
|
||||
{
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
@@ -198,8 +198,8 @@ public static partial class Modes
|
||||
|
||||
break;
|
||||
default:
|
||||
sb.AppendFormat("\tUnknown demand write retention priority value {0}",
|
||||
page.DemandReadRetentionPrio).AppendLine();
|
||||
sb.AppendFormat("\tUnknown demand write retention priority value {0}", page.DemandReadRetentionPrio).
|
||||
AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -223,8 +223,7 @@ public static partial class Modes
|
||||
AppendLine();
|
||||
|
||||
if(page.MaximumPreFetch > 0)
|
||||
sb.AppendFormat("\tA maximum of {0} blocks will be pre-fetched", page.MaximumPreFetch).
|
||||
AppendLine();
|
||||
sb.AppendFormat("\tA maximum of {0} blocks will be pre-fetched", page.MaximumPreFetch).AppendLine();
|
||||
|
||||
if(page.MaximumPreFetchCeiling > 0)
|
||||
sb.
|
||||
@@ -265,9 +264,8 @@ public static partial class Modes
|
||||
}
|
||||
|
||||
if(page.NonCacheSegmentSize > 0)
|
||||
sb.
|
||||
AppendFormat("\tDrive shall allocate {0} bytes to buffer even when all cached data cannot be evicted",
|
||||
page.NonCacheSegmentSize).AppendLine();
|
||||
sb.AppendFormat("\tDrive shall allocate {0} bytes to buffer even when all cached data cannot be evicted",
|
||||
page.NonCacheSegmentSize).AppendLine();
|
||||
|
||||
if(page.NV_DIS)
|
||||
sb.AppendLine("\tNon-Volatile cache is disabled");
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
@@ -93,20 +93,17 @@ public static partial class Modes
|
||||
sb.AppendLine("\tParameters can be saved");
|
||||
|
||||
if(page.MediumType1 != MediumTypes.Default)
|
||||
sb.AppendFormat("Supported medium type one: {0}", GetMediumTypeDescription(page.MediumType1)).
|
||||
AppendLine();
|
||||
sb.AppendFormat("Supported medium type one: {0}", GetMediumTypeDescription(page.MediumType1)).AppendLine();
|
||||
|
||||
if(page.MediumType2 != MediumTypes.Default)
|
||||
sb.AppendFormat("Supported medium type two: {0}", GetMediumTypeDescription(page.MediumType2)).
|
||||
AppendLine();
|
||||
sb.AppendFormat("Supported medium type two: {0}", GetMediumTypeDescription(page.MediumType2)).AppendLine();
|
||||
|
||||
if(page.MediumType3 != MediumTypes.Default)
|
||||
sb.AppendFormat("Supported medium type three: {0}", GetMediumTypeDescription(page.MediumType3)).
|
||||
AppendLine();
|
||||
|
||||
if(page.MediumType4 != MediumTypes.Default)
|
||||
sb.AppendFormat("Supported medium type four: {0}", GetMediumTypeDescription(page.MediumType4)).
|
||||
AppendLine();
|
||||
sb.AppendFormat("Supported medium type four: {0}", GetMediumTypeDescription(page.MediumType4)).AppendLine();
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
@@ -82,11 +82,11 @@ public static partial class Modes
|
||||
decoded.DDE |= (pageResponse[3] & 0x80) == 0x80;
|
||||
decoded.RED = (byte)((pageResponse[3] & 0x60) >> 5);
|
||||
|
||||
decoded.CompressionAlgo = (uint)((pageResponse[4] << 24) + (pageResponse[5] << 16) +
|
||||
(pageResponse[6] << 8) + pageResponse[7]);
|
||||
decoded.CompressionAlgo = (uint)((pageResponse[4] << 24) + (pageResponse[5] << 16) + (pageResponse[6] << 8) +
|
||||
pageResponse[7]);
|
||||
|
||||
decoded.DecompressionAlgo = (uint)((pageResponse[8] << 24) + (pageResponse[9] << 16) +
|
||||
(pageResponse[10] << 8) + pageResponse[11]);
|
||||
decoded.DecompressionAlgo = (uint)((pageResponse[8] << 24) + (pageResponse[9] << 16) + (pageResponse[10] << 8) +
|
||||
pageResponse[11]);
|
||||
|
||||
return decoded;
|
||||
}
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
@@ -80,11 +80,11 @@ public static partial class Modes
|
||||
decoded.MaxXorWrite = (uint)((pageResponse[4] << 24) + (pageResponse[5] << 16) + (pageResponse[6] << 8) +
|
||||
pageResponse[7]);
|
||||
|
||||
decoded.MaxRegenSize = (uint)((pageResponse[12] << 24) + (pageResponse[13] << 16) +
|
||||
(pageResponse[14] << 8) + pageResponse[15]);
|
||||
decoded.MaxRegenSize = (uint)((pageResponse[12] << 24) + (pageResponse[13] << 16) + (pageResponse[14] << 8) +
|
||||
pageResponse[15]);
|
||||
|
||||
decoded.MaxRebuildRead = (uint)((pageResponse[16] << 24) + (pageResponse[17] << 16) +
|
||||
(pageResponse[18] << 8) + pageResponse[19]);
|
||||
decoded.MaxRebuildRead = (uint)((pageResponse[16] << 24) + (pageResponse[17] << 16) + (pageResponse[18] << 8) +
|
||||
pageResponse[19]);
|
||||
|
||||
decoded.RebuildDelay = (ushort)((pageResponse[22] << 8) + pageResponse[23]);
|
||||
|
||||
@@ -116,8 +116,8 @@ public static partial class Modes
|
||||
page.MaxXorWrite).AppendLine();
|
||||
|
||||
if(page.MaxRegenSize > 0)
|
||||
sb.AppendFormat("\tDrive accepts a maximum of {0} blocks in a REGENERATE command",
|
||||
page.MaxRegenSize).AppendLine();
|
||||
sb.AppendFormat("\tDrive accepts a maximum of {0} blocks in a REGENERATE command", page.MaxRegenSize).
|
||||
AppendLine();
|
||||
|
||||
if(page.MaxRebuildRead > 0)
|
||||
sb.AppendFormat("\tDrive accepts a maximum of {0} blocks in a READ command during rebuild",
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
@@ -139,8 +139,7 @@ public static partial class Modes
|
||||
decoded.SEW |= (pageResponse[10] & 0x08) == 0x08;
|
||||
decoded.SOCF = (byte)((pageResponse[8] & 0x0C) >> 2);
|
||||
|
||||
decoded.BufferSizeEarlyWarning =
|
||||
(uint)((pageResponse[11] << 16) + (pageResponse[12] << 8) + pageResponse[13]);
|
||||
decoded.BufferSizeEarlyWarning = (uint)((pageResponse[11] << 16) + (pageResponse[12] << 8) + pageResponse[13]);
|
||||
|
||||
decoded.SelectedCompression = pageResponse[14];
|
||||
|
||||
|
||||
@@ -30,12 +30,12 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
@@ -123,7 +123,7 @@ public static partial class Modes
|
||||
decoded.MediumFormatRecognition = (MediumFormatRecognitionValues)pageResponse[5];
|
||||
decoded.PartitionSizes = new ushort[(pageResponse.Length - 8) / 2];
|
||||
|
||||
for(int i = 8; i < pageResponse.Length; i += 2)
|
||||
for(var i = 8; i < pageResponse.Length; i += 2)
|
||||
{
|
||||
decoded.PartitionSizes[(i - 8) / 2] = (ushort)(pageResponse[i] << 8);
|
||||
decoded.PartitionSizes[(i - 8) / 2] += pageResponse[i + 1];
|
||||
@@ -194,8 +194,8 @@ public static partial class Modes
|
||||
|
||||
break;
|
||||
case PartitionSizeUnitOfMeasures.Exponential:
|
||||
sb.AppendFormat("\tPartitions are defined in units of {0} bytes",
|
||||
Math.Pow(10, page.PartitionUnits)).AppendLine();
|
||||
sb.AppendFormat("\tPartitions are defined in units of {0} bytes", Math.Pow(10, page.PartitionUnits)).
|
||||
AppendLine();
|
||||
|
||||
measure = $"units of {Math.Pow(10, page.PartitionUnits)} bytes";
|
||||
|
||||
@@ -234,7 +234,7 @@ public static partial class Modes
|
||||
|
||||
sb.AppendFormat("\tMedium has defined {0} partitions", page.PartitionSizes.Length).AppendLine();
|
||||
|
||||
for(int i = 0; i < page.PartitionSizes.Length; i++)
|
||||
for(var i = 0; i < page.PartitionSizes.Length; i++)
|
||||
if(page.PartitionSizes[i] == 0)
|
||||
if(page.PartitionSizes.Length == 1)
|
||||
sb.AppendLine("\tDevice recognizes one single partition spanning whole medium");
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
@@ -74,7 +74,7 @@ public static partial class Modes
|
||||
|
||||
decoded.PartitionSizes = new ushort[(pageResponse.Length - 2) / 2];
|
||||
|
||||
for(int i = 2; i < pageResponse.Length; i += 2)
|
||||
for(var i = 2; i < pageResponse.Length; i += 2)
|
||||
{
|
||||
decoded.PartitionSizes[(i - 2) / 2] = (ushort)(pageResponse[i] << 8);
|
||||
decoded.PartitionSizes[(i - 2) / 2] += pageResponse[i + 1];
|
||||
@@ -101,7 +101,7 @@ public static partial class Modes
|
||||
|
||||
sb.AppendFormat("\tMedium has defined {0} partitions", page.PartitionSizes.Length).AppendLine();
|
||||
|
||||
for(int i = 0; i < page.PartitionSizes.Length; i++)
|
||||
for(var i = 0; i < page.PartitionSizes.Length; i++)
|
||||
sb.AppendFormat("\tPartition {0} is {1} units long", i, page.PartitionSizes[i]).AppendLine();
|
||||
|
||||
return sb.ToString();
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
@@ -114,8 +114,8 @@ public static partial class Modes
|
||||
decoded.IdleTimer_C = (uint)((pageResponse[16] << 24) + (pageResponse[17] << 16) + (pageResponse[18] << 8) +
|
||||
pageResponse[19]);
|
||||
|
||||
decoded.StandbyTimer_Y = (uint)((pageResponse[20] << 24) + (pageResponse[21] << 16) +
|
||||
(pageResponse[22] << 8) + pageResponse[23]);
|
||||
decoded.StandbyTimer_Y = (uint)((pageResponse[20] << 24) + (pageResponse[21] << 16) + (pageResponse[22] << 8) +
|
||||
pageResponse[23]);
|
||||
|
||||
decoded.CCF_Idle = (byte)((pageResponse[39] & 0xC0) >> 6);
|
||||
decoded.CCF_Standby = (byte)((pageResponse[39] & 0x30) >> 4);
|
||||
@@ -140,8 +140,8 @@ public static partial class Modes
|
||||
if(page.PS)
|
||||
sb.AppendLine("\tParameters can be saved");
|
||||
|
||||
if((page.Standby && page.StandbyTimer > 0) ||
|
||||
(page.Standby_Y && page.StandbyTimer_Y > 0))
|
||||
if(page.Standby && page.StandbyTimer > 0 ||
|
||||
page.Standby_Y && page.StandbyTimer_Y > 0)
|
||||
{
|
||||
if(page.Standby &&
|
||||
page.StandbyTimer > 0)
|
||||
@@ -154,9 +154,9 @@ public static partial class Modes
|
||||
else
|
||||
sb.AppendLine("\tDrive will not enter standy mode");
|
||||
|
||||
if((page.Idle && page.IdleTimer > 0) ||
|
||||
(page.Idle_B && page.IdleTimer_B > 0) ||
|
||||
(page.Idle_C && page.IdleTimer_C > 0))
|
||||
if(page.Idle && page.IdleTimer > 0 ||
|
||||
page.Idle_B && page.IdleTimer_B > 0 ||
|
||||
page.Idle_C && page.IdleTimer_C > 0)
|
||||
{
|
||||
if(page.Idle &&
|
||||
page.IdleTimer > 0)
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
@@ -103,8 +103,8 @@ public static partial class Modes
|
||||
decoded.EBACKERR |= (pageResponse[2] & 0x02) == 0x02;
|
||||
|
||||
if(pageResponse.Length >= 12)
|
||||
decoded.ReportCount = (uint)((pageResponse[8] << 24) + (pageResponse[9] << 16) +
|
||||
(pageResponse[10] << 8) + pageResponse[11]);
|
||||
decoded.ReportCount = (uint)((pageResponse[8] << 24) + (pageResponse[9] << 16) + (pageResponse[10] << 8) +
|
||||
pageResponse[11]);
|
||||
|
||||
return decoded;
|
||||
}
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
@@ -124,8 +124,8 @@ public static partial class Modes
|
||||
|
||||
break;
|
||||
default:
|
||||
sb.AppendFormat("\tUnknown WORM mode filemark restrictions code {0}",
|
||||
page.WormModeLabelRestrictions).AppendLine();
|
||||
sb.AppendFormat("\tUnknown WORM mode filemark restrictions code {0}", page.WormModeLabelRestrictions).
|
||||
AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global"), SuppressMessage("ReSharper", "NotAccessedField.Global")]
|
||||
public static partial class Modes
|
||||
@@ -173,8 +173,7 @@ public static partial class Modes
|
||||
if(page.PortATransportType > 0)
|
||||
sb.AppendFormat("\tDrive responds to SCSI ID {0}", page.PortAPresentSelectionID).AppendLine();
|
||||
|
||||
sb.AppendFormat("\tDrive will respond to SCSI ID {0} on Port A enabling", page.NextSelectionID).
|
||||
AppendLine();
|
||||
sb.AppendFormat("\tDrive will respond to SCSI ID {0} on Port A enabling", page.NextSelectionID).AppendLine();
|
||||
|
||||
sb.AppendFormat("\tDrive jumpers choose SCSI ID {0}", page.JumperedSelectionID).AppendLine();
|
||||
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Aaru.CommonTypes.Structs.Devices.SCSI.Modes;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global"), SuppressMessage("ReSharper", "NotAccessedField.Global")]
|
||||
public static partial class Modes
|
||||
@@ -114,8 +114,7 @@ public static partial class Modes
|
||||
|
||||
break;
|
||||
default:
|
||||
sb.AppendFormat("\tDrive uses unknown loading mechanism type {0}", page.LoadingMechanism).
|
||||
AppendLine();
|
||||
sb.AppendFormat("\tDrive uses unknown loading mechanism type {0}", page.LoadingMechanism).AppendLine();
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -131,8 +130,7 @@ public static partial class Modes
|
||||
: "\tDrive is not locked, media can be ejected and inserted");
|
||||
}
|
||||
else
|
||||
sb.AppendLine(page.LockState
|
||||
? "\tDrive is locked, media cannot be ejected, but if empty, can be inserted"
|
||||
sb.AppendLine(page.LockState ? "\tDrive is locked, media cannot be ejected, but if empty, can be inserted"
|
||||
: "\tDrive is not locked, media can be ejected and inserted");
|
||||
|
||||
if(page.Eject)
|
||||
@@ -200,8 +198,7 @@ public static partial class Modes
|
||||
else
|
||||
{
|
||||
if(page.MaxWriteSpeed > 0)
|
||||
sb.AppendFormat("\tDrive's maximum writing speed is {0} Kbyte/sec.", page.MaxWriteSpeed).
|
||||
AppendLine();
|
||||
sb.AppendFormat("\tDrive's maximum writing speed is {0} Kbyte/sec.", page.MaxWriteSpeed).AppendLine();
|
||||
|
||||
if(page.CurrentWriteSpeed > 0)
|
||||
sb.AppendFormat("\tDrive's current writing speed is {0} Kbyte/sec.", page.CurrentWriteSpeed).
|
||||
@@ -209,11 +206,11 @@ public static partial class Modes
|
||||
}
|
||||
|
||||
if(page.WriteSpeedPerformanceDescriptors != null)
|
||||
foreach(ModePage_2A_WriteDescriptor descriptor in
|
||||
page.WriteSpeedPerformanceDescriptors.Where(descriptor => descriptor.WriteSpeed > 0))
|
||||
foreach(ModePage_2A_WriteDescriptor descriptor in page.WriteSpeedPerformanceDescriptors.Where(descriptor =>
|
||||
descriptor.WriteSpeed > 0))
|
||||
if(descriptor.RotationControl == 0)
|
||||
sb.AppendFormat("\tDrive supports writing at {0} Kbyte/sec. in CLV mode",
|
||||
descriptor.WriteSpeed).AppendLine();
|
||||
sb.AppendFormat("\tDrive supports writing at {0} Kbyte/sec. in CLV mode", descriptor.WriteSpeed).
|
||||
AppendLine();
|
||||
else if(descriptor.RotationControl == 1)
|
||||
sb.AppendFormat("\tDrive supports writing at is {0} Kbyte/sec. in pure CAV mode",
|
||||
descriptor.WriteSpeed).AppendLine();
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global"), SuppressMessage("ReSharper", "UnassignedField.Global")]
|
||||
public static partial class Modes
|
||||
|
||||
@@ -30,12 +30,12 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
@@ -61,7 +61,7 @@ public static partial class Modes
|
||||
if(pageResponse.Length != 30)
|
||||
return false;
|
||||
|
||||
byte[] str = new byte[20];
|
||||
var str = new byte[20];
|
||||
Array.Copy(pageResponse, 10, str, 0, 20);
|
||||
|
||||
return AppleOEMString.SequenceEqual(str);
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
@@ -121,11 +121,11 @@ public static partial class Modes
|
||||
{
|
||||
sb.AppendFormat("\tDrive has been powered up {0} times", page.CurrentPowerOn);
|
||||
|
||||
sb.AppendFormat("\tDrive has been powered up since {0} this time",
|
||||
TimeSpan.FromSeconds(page.PowerOnTime)).AppendLine();
|
||||
sb.AppendFormat("\tDrive has been powered up since {0} this time", TimeSpan.FromSeconds(page.PowerOnTime)).
|
||||
AppendLine();
|
||||
|
||||
sb.AppendFormat("\tDrive has been powered up a total of {0}",
|
||||
TimeSpan.FromSeconds(page.CumulativePowerOn)).AppendLine();
|
||||
sb.AppendFormat("\tDrive has been powered up a total of {0}", TimeSpan.FromSeconds(page.CumulativePowerOn)).
|
||||
AppendLine();
|
||||
}
|
||||
|
||||
if(page.WT)
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static partial class Modes
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Aaru.CommonTypes.Structs.Devices.SCSI;
|
||||
|
||||
namespace Aaru.Decoders.SCSI;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global"), SuppressMessage("ReSharper", "NotAccessedField.Global")]
|
||||
public static partial class Modes
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user