diff options
author | Mike Pavone <pavone@retrodev.com> | 2013-05-08 23:29:21 -0700 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2013-05-08 23:29:21 -0700 |
commit | 9378eb782ae7c636455912c5d6c778b3618dd3fa (patch) | |
tree | 840829903306b405473b3d6464b6a74e1faa88a2 | |
parent | 827484f495246e677d658454ae6ee016b95f7d77 (diff) |
Contrary to the official documenation, OR and AND also set PV based on parity instead of overflow
-rw-r--r-- | z80_to_x86.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/z80_to_x86.c b/z80_to_x86.c index f568c5a..b02df09 100644 --- a/z80_to_x86.c +++ b/z80_to_x86.c @@ -678,7 +678,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)); } @@ -707,7 +707,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)); } |