From 827484f495246e677d658454ae6ee016b95f7d77 Mon Sep 17 00:00:00 2001 From: Mike Pavone Date: Wed, 8 May 2013 23:20:41 -0700 Subject: Set PV flag based on parity, not overflow for XOR --- z80_to_x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'z80_to_x86.c') diff --git a/z80_to_x86.c b/z80_to_x86.c index e89fbae..f568c5a 100644 --- a/z80_to_x86.c +++ b/z80_to_x86.c @@ -736,7 +736,7 @@ uint8_t * translate_z80inst(z80inst * inst, uint8_t * dst, z80_context * context dst = mov_irdisp8(dst, 0, CONTEXT, zf_off(ZF_N), SZ_B); //TODO: Implement half-carry flag if (z80_size(inst) == SZ_B) { - dst = setcc_rdisp8(dst, CC_O, CONTEXT, zf_off(ZF_PV)); + dst = setcc_rdisp8(dst, CC_P, CONTEXT, zf_off(ZF_PV)); dst = setcc_rdisp8(dst, CC_Z, CONTEXT, zf_off(ZF_Z)); dst = setcc_rdisp8(dst, CC_S, CONTEXT, zf_off(ZF_S)); } -- cgit v1.2.3