From 6220948f30b0abe230ed9f93491bd7b83fba5246 Mon Sep 17 00:00:00 2001 From: Ian C Date: Sun, 25 Dec 2022 08:50:46 +0000 Subject: Fixed BIT documented. Still not passing undocumented. --- z80_decode.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'z80_decode.c') diff --git a/z80_decode.c b/z80_decode.c index 0a9ba00..f675fc5 100644 --- a/z80_decode.c +++ b/z80_decode.c @@ -443,14 +443,14 @@ do { \ cpu->AF.b.lo&=C_Z80; \ if ((REG)&(1<AF.b.lo|=S_Z80; \ - cpu->AF.b.lo|=(REG & (B3_Z80|B5_Z80)); \ + cpu->AF.b.lo|=S_Z80® \ } \ else \ { \ - cpu->AF.b.lo|=Z_Z80; \ - cpu->AF.b.lo|=P_Z80; \ + cpu->AF.b.lo|=Z_Z80|P_Z80; \ } \ + cpu->AF.b.lo|=H_Z80; \ + SETHIDDEN(REG); \ } while(0) #define BIT_MEMPTR(REG,B) \ @@ -458,14 +458,14 @@ do { \ cpu->AF.b.lo&=C_Z80; \ if ((REG)&(1<AF.b.lo|=S_Z80; \ - cpu->AF.b.lo|=(PRIV->memptr.b.hi & (B3_Z80|B5_Z80)); \ + cpu->AF.b.lo|=S_Z80® \ } \ else \ { \ - cpu->AF.b.lo|=Z_Z80; \ - cpu->AF.b.lo|=P_Z80; \ + cpu->AF.b.lo|=Z_Z80|P_Z80; \ } \ + cpu->AF.b.lo|=H_Z80; \ + SETHIDDEN(PRIV->memptr.b.hi); \ } while(0) #define BIT_SET(REG,B) (REG)|=(1<