fixed incorrect behavior of mbc1 ram access

gameboy will simply not write to memory if memory is not enabled.
This commit is contained in:
Colby 2016-08-08 22:06:10 +10:00
parent e729181763
commit 4ccb749957

View file

@ -55,7 +55,7 @@ module Waterfoul
when 0x6000...0x8000
@mode = v & 0x1
when 0xA000...0xC000
fail 'trying to write invalid ram' unless @ram_enabled
return unless @ram_enabled
addr = i - 0xA000
if @mode == 0
@ram[addr] = v