|
|
@ -548,6 +548,8 @@ void CPU::daa() |
|
|
|
if (!m_nf) { |
|
|
|
if (!m_nf) { |
|
|
|
if (m_cf || m_a > 0x99) { |
|
|
|
if (m_cf || m_a > 0x99) { |
|
|
|
m_a += 0x60; |
|
|
|
m_a += 0x60; |
|
|
|
|
|
|
|
// Carry flag
|
|
|
|
|
|
|
|
m_cf = 1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (m_hf || (m_a & 0xf) > 0x9) { |
|
|
|
if (m_hf || (m_a & 0xf) > 0x9) { |
|
|
@ -564,9 +566,6 @@ void CPU::daa() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Carry flag
|
|
|
|
|
|
|
|
m_cf = (m_a & 0x100) == 0x100; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m_a = m_a & 0xff; |
|
|
|
m_a = m_a & 0xff; |
|
|
|
|
|
|
|
|
|
|
|
// Set flags
|
|
|
|
// Set flags
|
|
|
|