- [FIX] gestió incorrecta del carry en ADC8()

This commit is contained in:
2024-04-22 10:02:28 +02:00
parent 917531b60d
commit 9c2bf54c83

View File

@@ -338,7 +338,7 @@ namespace z80
rF=0;
FLAGS_SZXY(res);
if ( (res & 0x0f) <= (rA & 0x0f) ) SET_FLAGS(fH);
if ( res <= rA ) SET_FLAGS(fC);
if ( res > 255 ) SET_FLAGS(fC);
if ( (b^rA^0x80) & (b^res) & 0x80 ) SET_FLAGS(fV);
rA = (uint8_t)res;
}