From 7cc10fb89494a0cdfdef67d0d2b241e322fb89c5 Mon Sep 17 00:00:00 2001 From: nick_westgate Date: Tue, 30 Dec 2008 16:40:05 +0000 Subject: [PATCH] Oops. Better FB version with minor optimizations. --- AppleWin/source/Video.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/AppleWin/source/Video.cpp b/AppleWin/source/Video.cpp index ffc3cf68..c62ad006 100644 --- a/AppleWin/source/Video.cpp +++ b/AppleWin/source/Video.cpp @@ -2370,8 +2370,8 @@ WORD VideoGetScannerAddress(bool* pbVblBar_OUT, const DWORD uExecutedCycles) nAddress |= v_1 << 8; // a8 nAddress |= v_2 << 9; // a9 - int p2a = 1 ^ (nPage2 & (1 ^ n80Store)); - int p2b = nPage2 & (1 ^ n80Store); + int p2a = !(nPage2 && !n80Store); + int p2b = nPage2 && !n80Store; if (nHires) // hires? { @@ -2393,9 +2393,9 @@ WORD VideoGetScannerAddress(bool* pbVblBar_OUT, const DWORD uExecutedCycles) // Apple ][ (not //e) and HBL? // if (IS_APPLE2 && // Apple II only (UTAIIe:I-4,#5) - ((1 ^ h_5) & ((1 ^ h_3) | (1 ^ h_4)))) // HBL (UTAIIe:8-10,F8.5) + !h_5 && (!h_4 || !h_3)) // HBL (UTAIIe:8-10,F8.5) { - nAddress |= 1 << 12; // Y: a12 (add $1000; ) + nAddress |= 1 << 12; // Y: a12 (add $1000 to address!) } } @@ -2403,7 +2403,7 @@ WORD VideoGetScannerAddress(bool* pbVblBar_OUT, const DWORD uExecutedCycles) // if (pbVblBar_OUT != NULL) { - *pbVblBar_OUT = ((v_4 & v_3) == 0); // VBL' = (v_4 & v_3)' (UTAIIe:5-10,#3) + *pbVblBar_OUT = !v_4 || !v_3; // VBL' = (v_4 & v_3)' (UTAIIe:5-10,#3) } return static_cast(nAddress); }