Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src amidisplaycc.c:



details:   https://anonhg.NetBSD.org/src/rev/d758146213f5
branches:  trunk
changeset: 555250:d758146213f5
user:      jandberg <jandberg%NetBSD.org@localhost>
date:      Wed Nov 12 17:42:40 2003 +0000

description:
amidisplaycc.c:
        Add screen types suitable for PAL displays, and fix typos
        in older screen type names; reported by Gunther Nikl.
amidisplay.4:
        Document the new screen types and add some misc information.

diffstat:

 share/man/man4/man4.amiga/amidisplaycc.4 |  41 +++++++++++++++++++++++--------
 sys/arch/amiga/dev/amidisplaycc.c        |  41 ++++++++++++++++++++++++-------
 2 files changed, 62 insertions(+), 20 deletions(-)

diffs (178 lines):

diff -r 6fc1d6579d91 -r d758146213f5 share/man/man4/man4.amiga/amidisplaycc.4
--- a/share/man/man4/man4.amiga/amidisplaycc.4  Wed Nov 12 17:26:36 2003 +0000
+++ b/share/man/man4/man4.amiga/amidisplaycc.4  Wed Nov 12 17:42:40 2003 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: amidisplaycc.4,v 1.7 2002/03/13 21:44:48 wiz Exp $
+.\" $NetBSD: amidisplaycc.4,v 1.8 2003/11/12 17:42:40 jandberg Exp $
 .Dd February 4, 2002
 .Dt AMIDISPLAYCC 4 amiga
 .Sh NAME
@@ -15,10 +15,11 @@
 .Xr wsdisplay 4
 interface and contains the necessary rendering functions to
 operate a text terminal with virtual screens. It uses the
-Amiga abstract graphic driver functions for the low-level
+Amiga abstract graphic driver (grfabs) functions for the low-level
 display management.
 .Pp
-Currently it does not support running X. You can still run
+Currently it does not support running X. 
+It can however coexist well enough with grf0 to make possible running
 X the old way, but be warned, you cannot switch screens while
 in X and when quitting it, it seems to hang. Switching a screen
 then will bring up the text console. As always, we apologise for
@@ -26,27 +27,45 @@
 .Pp
 What it does support is hilite (bold), underline, reverse and
 foreground/background colors.
+.Ss Virtual terminals and screen types
 .Pp
 The number of virtual screens is limited only by
 the available chip memory.
-Each virtual screen can have a different display mode.
-A display mode defines the following things: height and width
-in pixels, number of colors, and the size of the font.
-The predefined modes are listed below.
+.Pp
+Each virtual screen can have a different screen type.
+A screen type defines the following things: height and width
+in pixels, number of colors, and font size.
+The supported screen types are listed below.
 .Bl -bullet -offset indent -compact
 .It
+80x64 - display size 640x512 with 8 colors, font size 8x8
+.It
+80x51 - display size 640x510 with 8 colors, font size 8x10
+.It
 80x50 - display size 640x400 with 8 colors, font size 8x8
 .It
 80x40 - display size 640x400 with 8 colors, font size 8x10
 .It
+80x32 - display size 640x512 with 8 colors, font size 8x16
+.It
+80x31 - display size 640x248 with 8 colors, font size 8x8
+.It
 80x25 - display size 640x400 with 8 colors, font size 8x16
 .It
-80x24 - display size 640x384 with 8 colors, font size 8x16
+80x24 - display size 640x192 with 8 colors, font size 8x8
+.It
+default - same as either 80x64 or 80x50, depending on the presence
+of GRF_NTSC and GRF_PAL in the kernel configuration.
 .El
 .Pp
-Fonts of width 8 are supported. Fonts can be compiled into the kernel
-by specifying "options FONT_[fontname]" in the configuration file,
-or loaded with the
+The grfabs code determines the actual screen mode that is used.
+The config options GRF_NTSC, GRF_PAL, GRF_AGA, etc. determine
+what kind of chipsets/modes are available.
+.Ss Fonts
+.Pp
+Fonts of width 8 and any height are supported. 
+Fonts can be compiled into the kernel by specifying "options FONT_[fontname]" 
+in the configuration file, or loaded with the
 .Xr wsfontload 8
 utility runtime.
 .Sh SEE ALSO
diff -r 6fc1d6579d91 -r d758146213f5 sys/arch/amiga/dev/amidisplaycc.c
--- a/sys/arch/amiga/dev/amidisplaycc.c Wed Nov 12 17:26:36 2003 +0000
+++ b/sys/arch/amiga/dev/amidisplaycc.c Wed Nov 12 17:42:40 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amidisplaycc.c,v 1.13 2003/11/12 17:26:36 jandberg Exp $ */
+/*     $NetBSD: amidisplaycc.c,v 1.14 2003/11/12 17:42:40 jandberg Exp $ */
 
 /*-
  * Copyright (c) 2000 Jukka Andberg.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amidisplaycc.c,v 1.13 2003/11/12 17:26:36 jandberg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amidisplaycc.c,v 1.14 2003/11/12 17:42:40 jandberg Exp $");
 
 /*
  * wscons interface to amiga custom chips. Contains the necessary functions
@@ -71,7 +71,6 @@
 /* These can be lowered if you are sure you dont need that much colors. */
 #define MAXDEPTH 8
 #define MAXROWS 128
-#define MAXCOLUMNS 80
 
 #define ADJUSTCOLORS
 
@@ -190,7 +189,6 @@
 struct amidisplaycc_screen_descr {
        struct wsscreen_descr  wsdescr;
        int                    depth;
-       char                   name[16];
 };
 
 /*
@@ -208,20 +206,38 @@
     WSSCREEN_HILIT | WSSCREEN_UNDERLINE }, \
     depth }
 
+/*
+ * Screen types.
+ *
+ * The first in list is used for the console screen.
+ * A suitable screen mode is guessed for it by looking
+ * at the GRF_* options.
+ */
 struct amidisplaycc_screen_descr amidisplaycc_screentab[] = {
        /* name, width, height, depth, fontwidth==8, fontheight */
+
+#if defined(GRF_PAL) && !defined(GRF_NTSC)
+       ADCC_SCREEN("default", 640, 512, 3, 8, 8),
+#else
+       ADCC_SCREEN("default", 640, 400, 3, 8, 8),
+#endif
        ADCC_SCREEN("80x50", 640, 400, 3, 8, 8),
        ADCC_SCREEN("80x40", 640, 400, 3, 8, 10),
        ADCC_SCREEN("80x25", 640, 400, 3, 8, 16),
-       ADCC_SCREEN("80x24", 640, 384, 3, 8, 16),
+       ADCC_SCREEN("80x24", 640, 192, 3, 8, 8),
+
+       ADCC_SCREEN("80x64", 640, 512, 3, 8, 8),
+       ADCC_SCREEN("80x51", 640, 510, 3, 8, 10),
+       ADCC_SCREEN("80x32", 640, 512, 3, 8, 16),
+       ADCC_SCREEN("80x31", 640, 248, 3, 8, 8),
 
        ADCC_SCREEN("640x400x1", 640, 400, 1, 8, 8),
        ADCC_SCREEN("640x400x2", 640, 400, 2, 8, 8),
        ADCC_SCREEN("640x400x3", 640, 400, 3, 8, 8),
 
        ADCC_SCREEN("640x200x1", 640, 200, 1, 8, 8),
-       ADCC_SCREEN("640x200x1", 640, 200, 2, 8, 8),
-       ADCC_SCREEN("640x200x1", 640, 200, 3, 8, 8),
+       ADCC_SCREEN("640x200x2", 640, 200, 2, 8, 8),
+       ADCC_SCREEN("640x200x3", 640, 200, 3, 8, 8),
 };
 
 #define ADCC_SCREENPTR(index) &amidisplaycc_screentab[index].wsdescr
@@ -236,6 +252,11 @@
        ADCC_SCREENPTR(7),
        ADCC_SCREENPTR(8),
        ADCC_SCREENPTR(9),
+       ADCC_SCREENPTR(10),
+       ADCC_SCREENPTR(11),
+       ADCC_SCREENPTR(12),
+       ADCC_SCREENPTR(13),
+       ADCC_SCREENPTR(14),
 };
 
 #define NELEMS(arr) (sizeof(arr)/sizeof((arr)[0]))
@@ -460,8 +481,10 @@
                 */
                adp->gfxview = NULL;
                adp->gfxon = 0;
-               adp->gfxwidth = 640;
-               adp->gfxheight = 480;
+               adp->gfxwidth = amidisplaycc_screentab[0].wsdescr.ncols *
+                       amidisplaycc_screentab[0].wsdescr.fontwidth;
+               adp->gfxheight = amidisplaycc_screentab[0].wsdescr.nrows *
+                       amidisplaycc_screentab[0].wsdescr.fontheight;
 
                if (aga_enable)
                        adp->gfxdepth = 8;



Home | Main Index | Thread Index | Old Index