diff --git a/Cargo.lock b/Cargo.lock index 8c57fed..9a22ad7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -216,7 +216,7 @@ checksum = "d63556a25bae6ea31b52e640d7c41d1ab27faba4ccb600013837a3d0b3994ca1" [[package]] name = "vines" -version = "0.0.1" +version = "0.0.2" dependencies = [ "bitflags 2.6.0", "json", diff --git a/Cargo.toml b/Cargo.toml index c765753..b73afb9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vines" -version = "0.0.1" +version = "0.0.2" edition = "2021" license-file = "LICENSE" description = "NES emulator library" diff --git a/src/cpu/mod.rs b/src/cpu/mod.rs index b7f8a30..f57bed6 100644 --- a/src/cpu/mod.rs +++ b/src/cpu/mod.rs @@ -53,22 +53,6 @@ impl CPU { self.program_counter = self.mapper.borrow().read_u16(0xFFFC); } - pub fn run(&mut self) { - loop { - self.execute_next_instruction(); - } - } - - pub fn run_with_callback(&mut self, mut callback: F) - where - F: FnMut(&mut CPU), - { - loop { - callback(self); - self.execute_next_instruction(); - } - } - pub fn execute_next_instruction(&mut self) -> InstructionResult { let mut instruction_result = InstructionResult { executed_cycles: 0 }; instruction_result.executed_cycles += self.handle_nmi_interrupt();