From 0fde806f62b184548a74043152ef6dccbaf37717 Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Sun, 12 Feb 2023 19:15:05 +1100 Subject: [PATCH] mbc bugfix --- src/processor/memory/rom/mbcs.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/processor/memory/rom/mbcs.rs b/src/processor/memory/rom/mbcs.rs index 2b22087..f867123 100644 --- a/src/processor/memory/rom/mbcs.rs +++ b/src/processor/memory/rom/mbcs.rs @@ -143,12 +143,10 @@ impl Mbc for Mbc1 { } 0x6000..0x8000 => { // mode select - self.bank_mode = if data == 0x1 { + self.bank_mode = if (data & 0x1) == 0x1 { BankingMode::Advanced - } else if data == 0x0 { - BankingMode::Simple } else { - self.bank_mode + BankingMode::Simple }; } _ => {}