Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/tc - Fix an error in cursor image manipulation. I l...



details:   https://anonhg.NetBSD.org/src/rev/5a254a4a54f4
branches:  trunk
changeset: 475777:5a254a4a54f4
user:      nisimura <nisimura%NetBSD.org@localhost>
date:      Wed Aug 25 07:56:22 1999 +0000

description:
- Fix an error in cursor image manipulation.  I learned a pair of Bt431
were populated in reverse order from PMAG-A MX ...

diffstat:

 sys/dev/tc/tfb.c |  29 ++++++-----------------------
 1 files changed, 6 insertions(+), 23 deletions(-)

diffs (78 lines):

diff -r e23801927754 -r 5a254a4a54f4 sys/dev/tc/tfb.c
--- a/sys/dev/tc/tfb.c  Wed Aug 25 05:17:20 1999 +0000
+++ b/sys/dev/tc/tfb.c  Wed Aug 25 07:56:22 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tfb.c,v 1.16 1999/08/25 02:02:22 nisimura Exp $ */
+/* $NetBSD: tfb.c,v 1.17 1999/08/25 07:56:22 nisimura Exp $ */
 
 /*
  * Copyright (c) 1998, 1999 Tohru Nishimura.  All rights reserved.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: tfb.c,v 1.16 1999/08/25 02:02:22 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tfb.c,v 1.17 1999/08/25 07:56:22 nisimura Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -75,8 +75,8 @@
  * N.B. a pair of Bt431s are located adjascently.
  *     struct bt431twin {
  *             struct {
- *                     u_int8_t u0;    for sprite image
- *                     u_int8_t u1;    for sprite mask
+ *                     u_int8_t u0;    for sprite mask
+ *                     u_int8_t u1;    for sprite image
  *                     unsigned :16;
  *             } bt_lo;
  *             ...
@@ -435,6 +435,7 @@
        switch (cmd) {
        case WSDISPLAYIO_GTYPE:
                *(u_int *)data = /* WSDISPLAY_TYPE_TX */ 0x19980910;
+printf("WSDISPLAYIO_GTYPE: %d\n", *(u_int *)data);
                return (0);
 
        case WSDISPLAYIO_GINFO:
@@ -590,7 +591,6 @@
                u_int8_t *cp = sc->sc_cursor.cc_color;
 
                SELECT463(vdac, BT463_IREG_CURSOR_COLOR_0);
-#if 0
                BYTE(vdac, bt_reg) = cp[1]; tc_wmb();
                BYTE(vdac, bt_reg) = cp[3]; tc_wmb();
                BYTE(vdac, bt_reg) = cp[5]; tc_wmb();
@@ -606,23 +606,6 @@
                BYTE(vdac, bt_reg) = cp[1]; tc_wmb();
                BYTE(vdac, bt_reg) = cp[3]; tc_wmb();
                BYTE(vdac, bt_reg) = cp[5]; tc_wmb();
-#else
-               BYTE(vdac, bt_reg) = cp[0]; tc_wmb();
-               BYTE(vdac, bt_reg) = cp[2]; tc_wmb();
-               BYTE(vdac, bt_reg) = cp[4]; tc_wmb();
-
-               BYTE(vdac, bt_reg) = cp[1]; tc_wmb();
-               BYTE(vdac, bt_reg) = cp[3]; tc_wmb();
-               BYTE(vdac, bt_reg) = cp[5]; tc_wmb();
-
-               BYTE(vdac, bt_reg) = cp[0]; tc_wmb();
-               BYTE(vdac, bt_reg) = cp[2]; tc_wmb();
-               BYTE(vdac, bt_reg) = cp[4]; tc_wmb();
-
-               BYTE(vdac, bt_reg) = cp[0]; tc_wmb();
-               BYTE(vdac, bt_reg) = cp[2]; tc_wmb();
-               BYTE(vdac, bt_reg) = cp[4]; tc_wmb();
-#endif
        }
        if (v & DATA_CURSHAPE_CHANGED) {
                u_int8_t *ip, *mp, img, msk;
@@ -645,7 +628,7 @@
                                msk = *mp++;
                                img &= msk;     /* cookie off image */
                                HALF(curs, bt_ram)
-                                   = (flip[msk] << 8) | flip[img];
+                                   = (flip[img] << 8) | flip[msk];
                                tc_wmb();
                        }
                        bcnt += 2;



Home | Main Index | Thread Index | Old Index