- [FIX] Si no hi havia coincidencia la busqueda no paraba mai

- [FIX] RLCA i RRCA sempre activaben el flag de carry, independentment del valor
This commit is contained in:
2024-12-17 09:32:55 +01:00
parent 83b6782078
commit 620cd8d88c
2 changed files with 4 additions and 4 deletions

View File

@@ -485,7 +485,7 @@ namespace z80
const bool should_carry = rA & 0x80; const bool should_carry = rA & 0x80;
rA = (rA>>7) | (rA<<1); rA = (rA>>7) | (rA<<1);
KEEP_FLAGS(fS | fZ | fP); KEEP_FLAGS(fS | fZ | fP);
SET_FLAGS(rA & (fX | fY | fC)); SET_FLAGS(rA & (fX | fY));
if (should_carry) SET_FLAGS(fC); if (should_carry) SET_FLAGS(fC);
} }
@@ -494,7 +494,7 @@ namespace z80
const bool should_carry = rA & 0x01; const bool should_carry = rA & 0x01;
rA = (rA<<7) | (rA>>1); rA = (rA<<7) | (rA>>1);
KEEP_FLAGS(fS | fZ | fP); KEEP_FLAGS(fS | fZ | fP);
SET_FLAGS(rA & (fX | fY | fC)); SET_FLAGS(rA & (fX | fY));
if (should_carry) SET_FLAGS(fC); if (should_carry) SET_FLAGS(fC);
} }

View File

@@ -71,7 +71,7 @@ namespace z80debug
uint8_t search_sequence[32]; uint8_t search_sequence[32];
int search_sequence_len=0; int search_sequence_len=0;
uint16_t search_pos=0; int search_pos=0;
uint16_t inspected_value = 255; uint16_t inspected_value = 255;
@@ -1132,7 +1132,7 @@ namespace z80debug
num_found=0; search_pos++; num_found=0; search_pos++;
} }
} }
sendToConsole("Sequence not found."); sendToConsoleLog("Sequence not found.");
} }