Class: Rubyboy::Rom

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_typeObject (readonly)

Returns the value of attribute cartridge_type.



5
6
7
# File 'lib/rubyboy/rom.rb', line 5

def cartridge_type
  @cartridge_type
end

#dataObject (readonly)

Returns the value of attribute data.



5
6
7
# File 'lib/rubyboy/rom.rb', line 5

def data
  @data
end

#destination_codeObject (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_pointObject (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_checksumObject (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_checksumObject (readonly)

Returns the value of attribute header_checksum.



5
6
7
# File 'lib/rubyboy/rom.rb', line 5

def header_checksum
  @header_checksum
end

#logoObject (readonly)

Returns the value of attribute logo.



5
6
7
# File 'lib/rubyboy/rom.rb', line 5

def 
  @logo
end

#mask_rom_version_numberObject (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_codeObject (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_codeObject (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_sizeObject (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_sizeObject (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_flagObject (readonly)

Returns the value of attribute sgb_flag.



5
6
7
# File 'lib/rubyboy/rom.rb', line 5

def sgb_flag
  @sgb_flag
end

#titleObject (readonly)

Returns the value of attribute title.



5
6
7
# File 'lib/rubyboy/rom.rb', line 5

def title
  @title
end