- [FIX] gestió incorrecta del carry en ADC8()
This commit is contained in:
2
z80.cpp
2
z80.cpp
@@ -338,7 +338,7 @@ namespace z80
|
|||||||
rF=0;
|
rF=0;
|
||||||
FLAGS_SZXY(res);
|
FLAGS_SZXY(res);
|
||||||
if ( (res & 0x0f) <= (rA & 0x0f) ) SET_FLAGS(fH);
|
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);
|
if ( (b^rA^0x80) & (b^res) & 0x80 ) SET_FLAGS(fV);
|
||||||
rA = (uint8_t)res;
|
rA = (uint8_t)res;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user