From 18d15758f562386e35ee5df0ba64ff82b22dd2e7 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Sun, 4 Sep 2022 00:27:05 +0600 Subject: [PATCH] Don't set ZF on MUL/MULU operations on NEC V20/V30 (#2) --- src/cpu/808x.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/cpu/808x.c b/src/cpu/808x.c index a762fdae0..0ab969fe5 100644 --- a/src/cpu/808x.c +++ b/src/cpu/808x.c @@ -1451,9 +1451,7 @@ set_co_mul(int bits, int carry) { set_cf(carry); set_of(carry); - /* NOTE: When implementing the V20, care should be taken to not change - the zero flag. */ - set_zf_ex(!carry); + if (!is_nec) set_zf_ex(!carry); if (!carry) wait(1, 0); }