Class: BinaryFile
Constant Summary
Constants inherited
from DSKFile
DSKFile::APPLESOFT_TOKENS
Instance Attribute Summary
Attributes inherited from DOSFile
#contents, #filename, #locked
Attributes inherited from DSKFile
#contents, #filename
Instance Method Summary
collapse
Methods inherited from DOSFile
#catalog_filename, catalog_filename, #initialize
Methods inherited from DSKFile
#==, #buffer_as_applesoft_file, #hex_dump, #initialize, #length_in_sectors, #to_ascii, #to_s
Constructor Details
This class inherits a constructor from DOSFile
Instance Method Details
#can_be_picture? ⇒ Boolean
93
94
95
96
|
# File 'lib/DOSFile.rb', line 93
def can_be_picture?
start_address=(@contents[0]+@contents[1]*256)
HGR.can_be_hgr_screen?(,start_address)
end
|
84
85
86
87
|
# File 'lib/DOSFile.rb', line 84
def
file_length=contents[2]+contents[3]*256
@contents[4..file_length+3]
end
|
#disassembly ⇒ Object
88
89
90
91
|
# File 'lib/DOSFile.rb', line 88
def disassembly
start_address=(@contents[0]+@contents[1]*256)
D65.disassemble(,start_address)
end
|
#file_extension ⇒ Object
80
81
82
|
# File 'lib/DOSFile.rb', line 80
def file_extension
".bin"
end
|
#file_type ⇒ Object
72
73
74
|
# File 'lib/DOSFile.rb', line 72
def file_type
"B"
end
|
#file_type_byte ⇒ Object
76
77
78
|
# File 'lib/DOSFile.rb', line 76
def file_type_byte
0x04
end
|
#to_png(pallete_mode = :amber) ⇒ Object
98
99
100
|
# File 'lib/DOSFile.rb', line 98
def to_png(pallete_mode=:amber)
HGR.buffer_to_png(,pallete_mode)
end
|