Browse Source

Emulator: Fix swap opcodes

master
Riyyi 2 years ago
parent
commit
d33de14694
  1. 3
      src/cpu-prefix.cpp

3
src/cpu-prefix.cpp

@ -365,8 +365,7 @@ void CPU::swap()
m_wait_cycles += 8; m_wait_cycles += 8;
// Swap upper 4 bits in register r8 with lower 4 bits // Swap upper 4 bits in register r8 with lower 4 bits
register_ = register_ & 0xff; register_ = ((register_ >> 4) | (register_ << 4)) & 0xff;
register_ = (register_ >> 4) | (register_ << 4);
// Set flags // Set flags
m_zf = (register_ == 0); m_zf = (register_ == 0);

Loading…
Cancel
Save