changeset 4865:a132d4d40ce2

OVERLAY_KEY_CNTL values
author michael
date Mon, 25 Feb 2002 16:16:44 +0000
parents 6434171a8f35
children 550e86ba0390
files vidix/drivers/mach64.h vidix/drivers/mach64_vid.c
diffstat 2 files changed, 19 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vidix/drivers/mach64.h	Mon Feb 25 15:04:09 2002 +0000
+++ b/vidix/drivers/mach64.h	Mon Feb 25 16:16:44 2002 +0000
@@ -1559,6 +1559,19 @@
 #define OVERLAY_GRAPHICS_KEY_CLR BlockIOTag(0x104u)
 #define OVERLAY_GRAPHICS_KEY_MSK BlockIOTag(0x105u)
 #define OVERLAY_KEY_CNTL	BlockIOTag(0x106u)
+#	define VIDEO_KEY_FN_MASK		0x00000007L
+#	define VIDEO_KEY_FN_FALSE		0x00000000L
+#	define VIDEO_KEY_FN_TRUE		0x00000001L
+#	define VIDEO_KEY_FN_NE			0x00000004L
+#	define VIDEO_KEY_FN_EQ			0x00000005L // EQ and NE are exchanged relative to radeon
+#	define GRAPHIC_KEY_FN_MASK		0x00000070L
+#	define GRAPHIC_KEY_FN_FALSE		0x00000000L
+#	define GRAPHIC_KEY_FN_TRUE		0x00000010L
+#	define GRAPHIC_KEY_FN_NE		0x00000040L
+#	define GRAPHIC_KEY_FN_EQ		0x00000050L // EQ and NE are exchanged relative to radeon
+#	define CMP_MIX_MASK			0x00000100L
+#	define CMP_MIX_OR			0x00000000L
+#	define CMP_MIX_AND			0x00000100L   
 /*	?			BlockIOTag(0x107u) */
 #define OVERLAY_SCALE_INC	BlockIOTag(0x108u)
 #define OVERLAY_SCALE_CNTL	BlockIOTag(0x109u)
--- a/vidix/drivers/mach64_vid.c	Mon Feb 25 15:04:09 2002 +0000
+++ b/vidix/drivers/mach64_vid.c	Mon Feb 25 16:16:44 2002 +0000
@@ -577,7 +577,12 @@
     mach64_fifo_wait(3);
     OUTREG(OVERLAY_GRAPHICS_KEY_MSK, besr.graphics_key_msk);
     OUTREG(OVERLAY_GRAPHICS_KEY_CLR, besr.graphics_key_clr);
-    OUTREG(OVERLAY_KEY_CNTL,0x50);
+//    OUTREG(OVERLAY_VIDEO_KEY_MSK, 0x80);
+//    OUTREG(OVERLAY_VIDEO_KEY_CLR, 0x80);
+    if(besr.ckey_on)
+    	OUTREG(OVERLAY_KEY_CNTL,VIDEO_KEY_FN_TRUE|GRAPHIC_KEY_FN_EQ|CMP_MIX_AND);
+    else
+    	OUTREG(OVERLAY_KEY_CNTL,VIDEO_KEY_FN_TRUE|GRAPHIC_KEY_FN_TRUE|CMP_MIX_AND);
 
     mach64_wait_for_idle();
     vf = INREG(VIDEO_FORMAT);