From 412087c64350e1f1ff33ff21a1d93f93e69b99f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9stor=20Soriano?= Date: Wed, 20 Aug 2025 16:43:35 +0900 Subject: [PATCH] Fix EXX and EXA AF,AF' not updating internal flag and JAF and JAR not working --- z280/z280ops.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/z280/z280ops.h b/z280/z280ops.h index 4d0a927..dcda6f7 100644 --- a/z280/z280ops.h +++ b/z280/z280ops.h @@ -915,7 +915,7 @@ INLINE UINT8 DEC(struct z280_state *cpustate, UINT8 value) #define EX_AF { \ union PAIR tmp; \ tmp = cpustate->AF; cpustate->AF = cpustate->AF2; cpustate->AF2 = tmp; \ - cpustate->AF2inuse = !!cpustate->AF2inuse; \ + cpustate->AF2inuse = ~cpustate->AF2inuse; \ } /*************************************************************** @@ -934,7 +934,7 @@ INLINE UINT8 DEC(struct z280_state *cpustate, UINT8 value) tmp = cpustate->BC; cpustate->BC = cpustate->BC2; cpustate->BC2 = tmp; \ tmp = cpustate->DE; cpustate->DE = cpustate->DE2; cpustate->DE2 = tmp; \ tmp = cpustate->HL; cpustate->HL = cpustate->HL2; cpustate->HL2 = tmp; \ - cpustate->BC2inuse = !!cpustate->BC2inuse; \ + cpustate->BC2inuse = ~cpustate->BC2inuse; \ } /***************************************************************