From 3a4d6ed1b5fe86a7a47fa75ed9330cc454ad9ae8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= <joamag@gmail.com>
Date: Mon, 11 Jul 2022 04:33:56 +0100
Subject: [PATCH] feat: made PC counter optional

---
 src/cpu.rs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/cpu.rs b/src/cpu.rs
index d0bf0d41..b6b0a32f 100644
--- a/src/cpu.rs
+++ b/src/cpu.rs
@@ -106,8 +106,7 @@ impl Cpu {
         // is going to be used in the fetching phase
         let pc = self.pc;
 
-        //@todo maybe remove this option as it may
-        // spend valuable resources
+        #[cfg(feature = "debug")]
         if pc >= 0x8000 && pc < 0x9fff {
             panic!("Invalid PC area at 0x{:04x}", pc);
         }
-- 
GitLab