z180: Fix cycle timings for branches not taken (one operand byte is always read)

This commit is contained in:
AJR 2023-05-20 19:14:35 -04:00
parent b2acd13154
commit 2f11144d40

View File

@ -184,7 +184,8 @@ uint32_t z180_device::ARG16()
} \
else \
{ \
_PC += 2; \
(void)ARG(); \
_PC++; \
}
/***************************************************************
@ -200,13 +201,14 @@ uint32_t z180_device::ARG16()
* JR_COND
***************************************************************/
#define JR_COND(cond,opcode) \
{ \
int8_t arg = (int8_t)ARG(); /* ARG() also increments _PC */ \
if( cond ) \
{ \
int8_t arg = (int8_t)ARG(); /* ARG() also increments _PC */ \
_PC += arg; /* so don't do _PC += ARG() */ \
CC(ex,opcode); \
} \
else _PC++;
}
/***************************************************************
* CALL
***************************************************************/
@ -228,7 +230,8 @@ uint32_t z180_device::ARG16()
} \
else \
{ \
_PC+=2; \
(void)ARG(); \
_PC++; \
}
/***************************************************************