Class: Badline::Storage::CRTFile
- Inherits:
-
Object
- Object
- Badline::Storage::CRTFile
- 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
-
#chips ⇒ Object
readonly
Returns the value of attribute chips.
-
#exrom ⇒ Object
readonly
Returns the value of attribute exrom.
-
#game ⇒ Object
readonly
Returns the value of attribute game.
-
#hardware_type ⇒ Object
readonly
Returns the value of attribute hardware_type.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(path) ⇒ CRTFile
constructor
A new instance of CRTFile.
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
#chips ⇒ Object (readonly)
Returns the value of attribute chips.
15 16 17 |
# File 'lib/badline/storage/crt_file.rb', line 15 def chips @chips end |
#exrom ⇒ Object (readonly)
Returns the value of attribute exrom.
15 16 17 |
# File 'lib/badline/storage/crt_file.rb', line 15 def exrom @exrom end |
#game ⇒ Object (readonly)
Returns the value of attribute game.
15 16 17 |
# File 'lib/badline/storage/crt_file.rb', line 15 def game @game end |
#hardware_type ⇒ Object (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 |
#name ⇒ Object (readonly)
Returns the value of attribute name.
15 16 17 |
# File 'lib/badline/storage/crt_file.rb', line 15 def name @name end |