Class: Badline::Storage::CRTFile

Inherits:
Object
  • Object
show all
Defined in:
lib/badline/storage/crt_file.rb

Defined Under Namespace

Classes: Chip, FormatError

Constant Summary collapse

SIGNATURE =
"C64 CARTRIDGE   ".b
CHIP_SIGNATURE =
"CHIP".b
CHIP_HEADER_SIZE =
0x10
RAM_CHIP =
1

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ CRTFile

Returns a new instance of CRTFile.



17
18
19
# File 'lib/badline/storage/crt_file.rb', line 17

def initialize(path)
  parse(File.binread(path))
end

Instance Attribute Details

#chipsObject (readonly)

Returns the value of attribute chips.



15
16
17
# File 'lib/badline/storage/crt_file.rb', line 15

def chips
  @chips
end

#exromObject (readonly)

Returns the value of attribute exrom.



15
16
17
# File 'lib/badline/storage/crt_file.rb', line 15

def exrom
  @exrom
end

#gameObject (readonly)

Returns the value of attribute game.



15
16
17
# File 'lib/badline/storage/crt_file.rb', line 15

def game
  @game
end

#hardware_typeObject (readonly)

Returns the value of attribute hardware_type.



15
16
17
# File 'lib/badline/storage/crt_file.rb', line 15

def hardware_type
  @hardware_type
end

#nameObject (readonly)

Returns the value of attribute name.



15
16
17
# File 'lib/badline/storage/crt_file.rb', line 15

def name
  @name
end