fixed bug where cartridge was trying to read from nil object

This commit is contained in:
Colby 2016-05-26 21:06:08 +10:00
parent 9531b235c9
commit cfed45e7a1

View file

@ -23,7 +23,7 @@ module Waterfoul
def initialize(rom)
# get cartridge type byte from game program
cartridge_type = $mmu.read_byte CARTRIDGE_TYPE_MEM_LOC
cartridge_type = rom[CARTRIDGE_TYPE_MEM_LOC]
# assign memory bank controller to cartridge
@mbc = cartrdige_controller cartridge_type, rom
end