From cfed45e7a1454da46eae55a087fa19ab9ed76321 Mon Sep 17 00:00:00 2001 From: Colby Date: Thu, 26 May 2016 21:06:08 +1000 Subject: [PATCH] fixed bug where cartridge was trying to read from nil object --- lib/waterfoul/cartridge.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/waterfoul/cartridge.rb b/lib/waterfoul/cartridge.rb index 8b22f88..5eee3d1 100644 --- a/lib/waterfoul/cartridge.rb +++ b/lib/waterfoul/cartridge.rb @@ -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