Class: Rubyboy::Cartridge::Nombc

Inherits:
Object
  • Object
show all
Defined in:
lib/rubyboy/cartridge/nombc.rb

Instance Method Summary collapse

Constructor Details

#initialize(rom) ⇒ Nombc

Returns a new instance of Nombc.



6
7
8
# File 'lib/rubyboy/cartridge/nombc.rb', line 6

def initialize(rom)
  @rom = rom
end

Instance Method Details

#read_byte(addr) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/rubyboy/cartridge/nombc.rb', line 10

def read_byte(addr)
  case addr
  when 0x0000..0x7fff
    @rom.data[addr]
  else
    raise "not implemented: read_byte #{addr}"
  end
end

#write_byte(_addr, _value) ⇒ Object



19
20
21
# File 'lib/rubyboy/cartridge/nombc.rb', line 19

def write_byte(_addr, _value)
  # do nothing
end