From 48ac8317a8897c753ffcd1dfbfa8aa2f52872516 Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Tue, 23 Mar 2021 21:01:33 -0500 Subject: [PATCH] fix(bus): fix off by one error when reading from boot rom --- src/bus.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bus.rs b/src/bus.rs index 2260238..290fdb4 100644 --- a/src/bus.rs +++ b/src/bus.rs @@ -79,7 +79,7 @@ impl Bus { match addr { 0x0000..=0x3FFF => { // 16KB ROM bank 00 - if addr < 0x00FF { + if addr < 0x100 { if let Some(boot) = self.boot { return boot[addr as usize]; }