Permalink
Browse files

Fix wrong sign condition check

Fix wrong sign condition check (C_P) in condition() function. The condition only depends on the sign flag (F_S).
  • Loading branch information...
1 parent 1bdc39f commit 382e5f52a67f481664ce247781ad2628808f87d2 @cloose cloose committed Aug 19, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 z80.c
View
@@ -298,7 +298,7 @@ static int condition(Z80Context* ctx, Z80Condition cond)
return GETFLAG(F_S);
if (cond == C_P)
- return !GETFLAG(F_S | F_Z);
+ return !GETFLAG(F_S);
if (cond == C_PE)
return GETFLAG(F_PV);

0 comments on commit 382e5f5

Please sign in to comment.