Class: Rubyboy::Rom
- Inherits:
-
Object
- Object
- Rubyboy::Rom
- Defined in:
- lib/rubyboy/rom.rb
Constant Summary collapse
- LOGO_DUMP =
%w[ CE ED 66 66 CC 0D 00 0B 03 73 00 83 00 0C 00 0D 00 08 11 1F 88 89 00 0E DC CC 6E E6 DD DD D9 99 BB BB 67 63 6E 0E EC CC DD DC 99 9F BB B9 33 3E ].map(&:hex).freeze
Instance Attribute Summary collapse
-
#cartridge_type ⇒ Object
readonly
Returns the value of attribute cartridge_type.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#destination_code ⇒ Object
readonly
Returns the value of attribute destination_code.
-
#entroy_point ⇒ Object
readonly
Returns the value of attribute entroy_point.
-
#global_checksum ⇒ Object
readonly
Returns the value of attribute global_checksum.
-
#header_checksum ⇒ Object
readonly
Returns the value of attribute header_checksum.
-
#logo ⇒ Object
readonly
Returns the value of attribute logo.
-
#mask_rom_version_number ⇒ Object
readonly
Returns the value of attribute mask_rom_version_number.
-
#new_licensee_code ⇒ Object
readonly
Returns the value of attribute new_licensee_code.
-
#old_licensee_code ⇒ Object
readonly
Returns the value of attribute old_licensee_code.
-
#ram_size ⇒ Object
readonly
Returns the value of attribute ram_size.
-
#rom_size ⇒ Object
readonly
Returns the value of attribute rom_size.
-
#sgb_flag ⇒ Object
readonly
Returns the value of attribute sgb_flag.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(data) ⇒ Rom
constructor
A new instance of Rom.
Constructor Details
#initialize(data) ⇒ Rom
Returns a new instance of Rom.
13 14 15 16 |
# File 'lib/rubyboy/rom.rb', line 13 def initialize(data) @data = data load_data end |
Instance Attribute Details
#cartridge_type ⇒ Object (readonly)
Returns the value of attribute cartridge_type.
5 6 7 |
# File 'lib/rubyboy/rom.rb', line 5 def cartridge_type @cartridge_type end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
5 6 7 |
# File 'lib/rubyboy/rom.rb', line 5 def data @data end |
#destination_code ⇒ Object (readonly)
Returns the value of attribute destination_code.
5 6 7 |
# File 'lib/rubyboy/rom.rb', line 5 def destination_code @destination_code end |
#entroy_point ⇒ Object (readonly)
Returns the value of attribute entroy_point.
5 6 7 |
# File 'lib/rubyboy/rom.rb', line 5 def entroy_point @entroy_point end |
#global_checksum ⇒ Object (readonly)
Returns the value of attribute global_checksum.
5 6 7 |
# File 'lib/rubyboy/rom.rb', line 5 def global_checksum @global_checksum end |
#header_checksum ⇒ Object (readonly)
Returns the value of attribute header_checksum.
5 6 7 |
# File 'lib/rubyboy/rom.rb', line 5 def header_checksum @header_checksum end |
#logo ⇒ Object (readonly)
Returns the value of attribute logo.
5 6 7 |
# File 'lib/rubyboy/rom.rb', line 5 def logo @logo end |
#mask_rom_version_number ⇒ Object (readonly)
Returns the value of attribute mask_rom_version_number.
5 6 7 |
# File 'lib/rubyboy/rom.rb', line 5 def mask_rom_version_number @mask_rom_version_number end |
#new_licensee_code ⇒ Object (readonly)
Returns the value of attribute new_licensee_code.
5 6 7 |
# File 'lib/rubyboy/rom.rb', line 5 def new_licensee_code @new_licensee_code end |
#old_licensee_code ⇒ Object (readonly)
Returns the value of attribute old_licensee_code.
5 6 7 |
# File 'lib/rubyboy/rom.rb', line 5 def old_licensee_code @old_licensee_code end |
#ram_size ⇒ Object (readonly)
Returns the value of attribute ram_size.
5 6 7 |
# File 'lib/rubyboy/rom.rb', line 5 def ram_size @ram_size end |
#rom_size ⇒ Object (readonly)
Returns the value of attribute rom_size.
5 6 7 |
# File 'lib/rubyboy/rom.rb', line 5 def rom_size @rom_size end |
#sgb_flag ⇒ Object (readonly)
Returns the value of attribute sgb_flag.
5 6 7 |
# File 'lib/rubyboy/rom.rb', line 5 def sgb_flag @sgb_flag end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
5 6 7 |
# File 'lib/rubyboy/rom.rb', line 5 def title @title end |