mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
z180: Fix cycle timings for branches not taken (one operand byte is always read)
This commit is contained in:
parent
b2acd13154
commit
2f11144d40
@ -184,7 +184,8 @@ uint32_t z180_device::ARG16()
|
|||||||
} \
|
} \
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
_PC += 2; \
|
(void)ARG(); \
|
||||||
|
_PC++; \
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************
|
/***************************************************************
|
||||||
@ -200,13 +201,14 @@ uint32_t z180_device::ARG16()
|
|||||||
* JR_COND
|
* JR_COND
|
||||||
***************************************************************/
|
***************************************************************/
|
||||||
#define JR_COND(cond,opcode) \
|
#define JR_COND(cond,opcode) \
|
||||||
|
{ \
|
||||||
|
int8_t arg = (int8_t)ARG(); /* ARG() also increments _PC */ \
|
||||||
if( cond ) \
|
if( cond ) \
|
||||||
{ \
|
{ \
|
||||||
int8_t arg = (int8_t)ARG(); /* ARG() also increments _PC */ \
|
|
||||||
_PC += arg; /* so don't do _PC += ARG() */ \
|
_PC += arg; /* so don't do _PC += ARG() */ \
|
||||||
CC(ex,opcode); \
|
CC(ex,opcode); \
|
||||||
} \
|
} \
|
||||||
else _PC++;
|
}
|
||||||
/***************************************************************
|
/***************************************************************
|
||||||
* CALL
|
* CALL
|
||||||
***************************************************************/
|
***************************************************************/
|
||||||
@ -228,7 +230,8 @@ uint32_t z180_device::ARG16()
|
|||||||
} \
|
} \
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
_PC+=2; \
|
(void)ARG(); \
|
||||||
|
_PC++; \
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************
|
/***************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user