From 112e462685d5fa9ef57fc3d8a59b4f67a4473b61 Mon Sep 17 00:00:00 2001 From: Raphael Amorim Date: Wed, 25 Dec 2024 20:25:41 -0300 Subject: [PATCH] remove bit rotation manually --- src/cpu/misc.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cpu/misc.rs b/src/cpu/misc.rs index c77f3aa..9d16426 100644 --- a/src/cpu/misc.rs +++ b/src/cpu/misc.rs @@ -78,7 +78,8 @@ fn alu_swap(cpu: &mut Cpu, a: u8) -> u8 { cpu.registers.flag(C, false); cpu.registers.flag(H, false); cpu.registers.flag(N, false); - (a >> 4) | (a << 4) + a.rotate_left(4) + // (a >> 4) | (a << 4) } fn alu_sla(cpu: &mut Cpu, a: u8) -> u8 {