From 2f8c606f79328212cdeae9a4f8f2f4ec157cec7d Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Wed, 8 Feb 2023 08:58:56 +1100 Subject: [PATCH] keep rom bank in limits --- src/processor/memory/rom/mbcs.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/processor/memory/rom/mbcs.rs b/src/processor/memory/rom/mbcs.rs index 1b5bfea..326fdf2 100644 --- a/src/processor/memory/rom/mbcs.rs +++ b/src/processor/memory/rom/mbcs.rs @@ -105,6 +105,7 @@ impl MBC for MBC1 { } _ => {} } + self.rom_bank = (self.rom_bank as usize % self.num_banks) as u8; return; } }