Skip to contentSkip to conversation

Console Rotation

PATCH New Antonino Daplas 1 participant 1 message Sep 9, 2002 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Console Rotation

The patch (fbset_rotate.diff), which is against fbset-2.1, adds 3 new options to set the rotation:

fbset -{cw|ccw|ud} {true|false}

Try this with the modified vesafb.

Tony

<<------------------------------------------------------------------>>

fb.h +5 -0
diff -Naur fbset-orig/fb.h fbset-2.1/fb.h
@@ -137,6 +137,11 @@
 #define FB_VMODE_DOUBLE		2	/* double scan */
 #define FB_VMODE_MASK		255
 
+#define FB_VMODE_ROTATE_CW      0x010000
+#define FB_VMODE_ROTATE_CCW     0x020000
+#define FB_VMODE_ROTATE_UD      0x040000
+#define FB_ROTATE_MASK          0xFF0000
+
 #define FB_VMODE_YWRAP		256	/* ywrap instead of panning     */
 #define FB_VMODE_SMOOTH_XPAN	512	/* smooth xpan possible (internally used) */
 #define FB_VMODE_CONUPDATE	512	/* don't update x/yoffset	*/
fbset.c +51 -0

99 lines not on this page · raw message

fbset.h +3 -0
diff -Naur fbset-orig/fbset.h fbset-2.1/fbset.h
@@ -62,6 +62,9 @@
     unsigned extsync : 1;
     unsigned bcast : 1;
     unsigned laced : 1;
+    unsigned cw    : 1;
+    unsigned ccw   : 1;
+    unsigned ud    : 1;
     unsigned dblscan : 1;
     unsigned grayscale : 1;
     /* scanrates */
modes.l +3 -0
diff -Naur fbset-orig/modes.l fbset-2.1/modes.l
@@ -41,6 +41,9 @@
     { "bcast", BCAST, 0 },
     { "laced", LACED, 0 },
     { "double", DOUBLE, 0 },
+    { "cw", CW, 0 }, 
+    { "ccw", CCW, 0 }, 
+    { "ud", UD, 0 }, 
     { "rgba", RGBA, 0 },
     { "nonstd", NONSTD, 0 },
     { "accel", ACCEL, 0 },
modes.y +22 -1
diff -Naur fbset-orig/modes.y fbset-2.1/modes.y
@@ -41,7 +41,7 @@
 %start file
 
 %token MODE GEOMETRY TIMINGS HSYNC VSYNC CSYNC GSYNC EXTSYNC BCAST LACED DOUBLE
-       RGBA NONSTD ACCEL GRAYSCALE
+       CW CCW UD RGBA NONSTD ACCEL GRAYSCALE
        ENDMODE POLARITY BOOLEAN STRING NUMBER 
 
 %%
@@ -94,6 +94,9 @@
 	  | options bcast
 	  | options laced
 	  | options double
+          | options cw
+          | options ccw
+          | options ud
 	  | options rgba
 	  | options nonstd
 	  | options accel
@@ -145,6 +148,24 @@
 double	  : DOUBLE BOOLEAN
 	    {
 		VideoMode.dblscan = $2;
+	    }
+	  ;
+
+cw	  : DOUBLE CW
+	    {
+		VideoMode.cw = $2;
+	    }
+	  ;
+
+ccw	  : DOUBLE CCW
+	    {
+		VideoMode.ccw = $2;
+	    }
+	  ;
+
+ud	  : DOUBLE UD
+	    {
+		VideoMode.ud = $2;
 	    }
 	  ;
 

-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390