Class: AtariBinary

Inherits:
NativeFileType show all
Defined in:
lib/native_file_types/atari800/AtariBinary.rb

Instance Attribute Summary

Attributes inherited from NativeFileType

#aux_code, #contents, #file_system_image, #file_type, #filename, #meta_data

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from NativeFileType

#<=>, #==, all_native_file_types, best_fit, code_for_tests, compatability_score, #data_without_header, file_type_matches?, #full_filename, #initialize, is_valid_file_if, load_address, matching_score, native_file_types_possible_on_file_system, non_matching_score, #to_hex_dump, #to_info_dump, #type_description

Methods included from SubclassTracking

extended

Constructor Details

This class inherits a constructor from NativeFileType

Class Method Details

.file_system_file_typesObject



5
6
7
8
9
# File 'lib/native_file_types/atari800/AtariBinary.rb', line 5

def self.file_system_file_types
  {
    AtariDos=>:any
  }
end

Instance Method Details

#header_lengthObject



19
20
21
# File 'lib/native_file_types/atari800/AtariBinary.rb', line 19

def header_length
 6
end

#load_addressObject

Binary Load files have the load address stored in bytes 2 & 3



15
16
17
# File 'lib/native_file_types/atari800/AtariBinary.rb', line 15

def load_address
  contents[2]+contents[3]*256
end

#to_disassemblyObject



23
24
25
# File 'lib/native_file_types/atari800/AtariBinary.rb', line 23

def to_disassembly
    Atari800.disassemble(data_without_header,load_address)
end