Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/arch/next68k/dev pullup 1.5, approved by thorpej



details:   https://anonhg.NetBSD.org/src/rev/5b965c06f962
branches:  netbsd-1-5
changeset: 489690:5b965c06f962
user:      deberg <deberg%NetBSD.org@localhost>
date:      Fri Oct 06 23:17:36 2000 +0000

description:
pullup 1.5, approved by thorpej

add support for 12-bit color displays, from Timm Wetzel w/ changes by
me.  closes 10741.

diffstat:

 sys/arch/next68k/dev/nextdisplay.c |  32 +++++++++++++++++++++-----------
 1 files changed, 21 insertions(+), 11 deletions(-)

diffs (92 lines):

diff -r 9e55a4fb4377 -r 5b965c06f962 sys/arch/next68k/dev/nextdisplay.c
--- a/sys/arch/next68k/dev/nextdisplay.c        Fri Oct 06 23:16:52 2000 +0000
+++ b/sys/arch/next68k/dev/nextdisplay.c        Fri Oct 06 23:17:36 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nextdisplay.c,v 1.3.4.1 2000/06/30 16:27:32 simonb Exp $ */
+/* $NetBSD: nextdisplay.c,v 1.3.4.2 2000/10/06 23:17:36 deberg Exp $ */
 
 /*
  * Copyright (c) 1998 Matt DeBergalis
@@ -141,7 +141,9 @@
        void *aux;
 {
        if ((rom_machine_type == NeXT_WARP9)
-           || (rom_machine_type == NeXT_X15))
+           || (rom_machine_type == NeXT_X15)
+           || (rom_machine_type == NeXT_WARP9C)
+           || (rom_machine_type == NeXT_TURBO_COLOR))
                return (1);
        else 
                return (0);
@@ -168,9 +170,9 @@
        dc->dc_paddr = color ? COLORP(addr) : MONOP(addr);
        dc->dc_size = color ? NEXT_P_C16_VIDEOSIZE : NEXT_P_VIDEOSIZE;
 
-       dc->dc_wid = 1152; /* XXX color */
-       dc->dc_ht = 832; /* XXX color */
-       dc->dc_depth = color ? 8 : 2; 
+       dc->dc_wid = color ? 1152 : 1152; 
+       dc->dc_ht = color ? 832 : 832;
+       dc->dc_depth = color ? 16 : 2; 
        dc->dc_rowbytes = dc->dc_wid * dc->dc_depth / 8;
 
        dc->dc_videobase = dc->dc_vaddr;
@@ -194,12 +196,15 @@
 
        /* clear the screen */
        for (i = 0; i < dc->dc_ht * dc->dc_rowbytes; i += sizeof(u_int32_t))
-               *(u_int32_t *)(dc->dc_videobase + i) = 0xffffffff;
+               *(u_int32_t *)(dc->dc_videobase + i) = 
+                       (color ? 0x0 : 0xffffffff);
+
+       printf("done clearing\n", dc->dc_videobase);
 
        rap = &dc->dc_raster;
        rap->width = dc->dc_wid;
        rap->height = dc->dc_ht;
-       rap->depth = color ? 8 : 2;
+       rap->depth = color ? 16 : 2;
        rap->linelongs = dc->dc_rowbytes / sizeof(u_int32_t);
        rap->pixels = (u_int32_t *)dc->dc_videobase;
 
@@ -234,7 +239,8 @@
 
        sc = (struct nextdisplay_softc *)self;
 
-       if (rom_machine_type == NeXT_WARP9C) {
+       if ((rom_machine_type == NeXT_WARP9C) 
+           || (rom_machine_type == NeXT_TURBO_COLOR)) {
                iscolor = 1;
                addr = (paddr_t)colorbase;
        } else {
@@ -338,7 +344,9 @@
        *curxp = 0;
        *curyp = 0;
        rcons_alloc_attr(&sc->sc_dc->dc_rcons, 0, 0, 
-                        WSATTR_REVERSE, &defattr);
+                        (strcmp(type->name, "color") == 0) 
+                        ? 0 
+                        : WSATTR_REVERSE, &defattr);
        *defattrp = defattr;
        sc->nscreens++;
 #if 0
@@ -388,7 +396,8 @@
        long defattr;
        int iscolor;
 
-       if (rom_machine_type == NeXT_WARP9C) {
+       if ((rom_machine_type == NeXT_WARP9C)
+           || (rom_machine_type == NeXT_TURBO_COLOR)) {
                iscolor = 1;
                nextdisplay_consaddr = (paddr_t)colorbase;
        } else {
@@ -399,7 +408,8 @@
        /* set up the display */
        nextdisplay_init(&nextdisplay_console_dc, iscolor);
 
-       rcons_alloc_attr(&dc->dc_rcons, 0, 0, WSATTR_REVERSE, &defattr);
+       rcons_alloc_attr(&dc->dc_rcons, 0, 0, 
+                        iscolor ? 0 : WSATTR_REVERSE, &defattr);
 
        wsdisplay_cnattach(iscolor ? &nextdisplay_color : &nextdisplay_mono,
                           &dc->dc_rcons, 0, 0, defattr);



Home | Main Index | Thread Index | Old Index