Skip to content
Snippets Groups Projects
Verified Commit d434b2d8 authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

fix: jump issue

parent 6bc8fc27
No related branches found
No related tags found
No related merge requests found
Pipeline #847 passed
...@@ -96,7 +96,8 @@ impl Cpu { ...@@ -96,7 +96,8 @@ impl Cpu {
let (instruction_fn, instruction_time, instruction_str) = instruction; let (instruction_fn, instruction_time, instruction_str) = instruction;
if !self.mmu.boot_active() || *instruction_str == "! UNIMP !" { // if !self.mmu.boot_active() {
if *instruction_str == "! UNIMP !" {
println!( println!(
"{}\t(0x{:02x})\t${:04x} {}", "{}\t(0x{:02x})\t${:04x} {}",
instruction_str, opcode, pc, is_prefix instruction_str, opcode, pc, is_prefix
......
...@@ -852,7 +852,7 @@ fn ld_sp_u16(cpu: &mut Cpu) { ...@@ -852,7 +852,7 @@ fn ld_sp_u16(cpu: &mut Cpu) {
} }
fn jr_nc_i8(cpu: &mut Cpu) { fn jr_nc_i8(cpu: &mut Cpu) {
let byte = cpu.read_u8(); let byte = cpu.read_u8() as i8;
if cpu.get_carry() { if cpu.get_carry() {
return; return;
...@@ -879,7 +879,7 @@ fn scf(cpu: &mut Cpu) { ...@@ -879,7 +879,7 @@ fn scf(cpu: &mut Cpu) {
} }
fn jr_c_i8(cpu: &mut Cpu) { fn jr_c_i8(cpu: &mut Cpu) {
let byte = cpu.read_u8(); let byte = cpu.read_u8() as i8;
if !cpu.get_carry() { if !cpu.get_carry() {
return; return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment