summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/wscons
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/alpha/wscons')
-rw-r--r--sys/arch/alpha/wscons/ascii.h10
-rw-r--r--sys/arch/alpha/wscons/event.c172
-rw-r--r--sys/arch/alpha/wscons/event_var.h87
-rw-r--r--sys/arch/alpha/wscons/kbd.c334
-rw-r--r--sys/arch/alpha/wscons/ms.c285
-rw-r--r--sys/arch/alpha/wscons/wscons.c495
-rw-r--r--sys/arch/alpha/wscons/wscons_emul.c416
-rw-r--r--sys/arch/alpha/wscons/wscons_emul.h50
-rw-r--r--sys/arch/alpha/wscons/wscons_raster.h93
-rw-r--r--sys/arch/alpha/wscons/wscons_rfont.h1010
-rw-r--r--sys/arch/alpha/wscons/wscons_rinit.c134
-rw-r--r--sys/arch/alpha/wscons/wscons_rops.c217
-rw-r--r--sys/arch/alpha/wscons/wsconsvar.h111
13 files changed, 3414 insertions, 0 deletions
diff --git a/sys/arch/alpha/wscons/ascii.h b/sys/arch/alpha/wscons/ascii.h
new file mode 100644
index 00000000000..dc4775022c9
--- /dev/null
+++ b/sys/arch/alpha/wscons/ascii.h
@@ -0,0 +1,10 @@
+/* $NetBSD: ascii.h,v 1.1 1996/04/12 02:00:42 cgd Exp $ */
+
+#define ASCII_BEL 0x07 /* bell */
+#define ASCII_BS 0x08 /* backspace */
+#define ASCII_HT 0x09 /* horizontal tab */
+#define ASCII_LF 0x0a /* line feed */
+#define ASCII_VT 0x0b /* vertical tab(?); up one line */
+#define ASCII_NP 0x0c /* next page; form feed */
+#define ASCII_CR 0x0d /* carriage return */
+#define ASCII_ESC 0x1b /* escape */
diff --git a/sys/arch/alpha/wscons/event.c b/sys/arch/alpha/wscons/event.c
new file mode 100644
index 00000000000..3c34d962c83
--- /dev/null
+++ b/sys/arch/alpha/wscons/event.c
@@ -0,0 +1,172 @@
+/* $NetBSD: event.c,v 1.1.4.1 1996/05/29 22:26:54 cgd Exp $ */
+
+/*
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This software was developed by the Computer Systems Engineering group
+ * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+ * contributed to Berkeley.
+ *
+ * All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Lawrence Berkeley Laboratory.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)event.c 8.1 (Berkeley) 6/11/93
+ */
+
+/*
+ * Internal `Firm_event' interface for the keyboard and mouse drivers.
+ */
+
+#include <sys/param.h>
+#include <sys/fcntl.h>
+#include <sys/malloc.h>
+#include <sys/proc.h>
+#include <sys/systm.h>
+#include <sys/vnode.h>
+
+#include <machine/vuid_event.h>
+#include <alpha/wscons/event_var.h>
+
+/*
+ * Initialize a firm_event queue.
+ */
+void
+ev_init(ev)
+ register struct evvar *ev;
+{
+
+ ev->ev_get = ev->ev_put = 0;
+ ev->ev_q = malloc((u_long)EV_QSIZE * sizeof(struct firm_event),
+ M_DEVBUF, M_WAITOK);
+ bzero((caddr_t)ev->ev_q, EV_QSIZE * sizeof(struct firm_event));
+}
+
+/*
+ * Tear down a firm_event queue.
+ */
+void
+ev_fini(ev)
+ register struct evvar *ev;
+{
+
+ free(ev->ev_q, M_DEVBUF);
+}
+
+/*
+ * User-level interface: read, select.
+ * (User cannot write an event queue.)
+ */
+int
+ev_read(ev, uio, flags)
+ register struct evvar *ev;
+ struct uio *uio;
+ int flags;
+{
+ int s, n, cnt, error;
+
+ /*
+ * Make sure we can return at least 1.
+ */
+ if (uio->uio_resid < sizeof(struct firm_event))
+ return (EMSGSIZE); /* ??? */
+ s = splev();
+ while (ev->ev_get == ev->ev_put) {
+ if (flags & IO_NDELAY) {
+ splx(s);
+ return (EWOULDBLOCK);
+ }
+ ev->ev_wanted = 1;
+ error = tsleep((caddr_t)ev, PEVENT | PCATCH, "firm_event", 0);
+ if (error) {
+ splx(s);
+ return (error);
+ }
+ }
+ /*
+ * Move firm_events from tail end of queue (there is at least one
+ * there).
+ */
+ if (ev->ev_put < ev->ev_get)
+ cnt = EV_QSIZE - ev->ev_get; /* events in [get..QSIZE) */
+ else
+ cnt = ev->ev_put - ev->ev_get; /* events in [get..put) */
+ splx(s);
+ n = howmany(uio->uio_resid, sizeof(struct firm_event));
+ if (cnt > n)
+ cnt = n;
+ error = uiomove((caddr_t)&ev->ev_q[ev->ev_get],
+ cnt * sizeof(struct firm_event), uio);
+ n -= cnt;
+ /*
+ * If we do not wrap to 0, used up all our space, or had an error,
+ * stop. Otherwise move from front of queue to put index, if there
+ * is anything there to move.
+ */
+ if ((ev->ev_get = (ev->ev_get + cnt) % EV_QSIZE) != 0 ||
+ n == 0 || error || (cnt = ev->ev_put) == 0)
+ return (error);
+ if (cnt > n)
+ cnt = n;
+ error = uiomove((caddr_t)&ev->ev_q[0],
+ cnt * sizeof(struct firm_event), uio);
+ ev->ev_get = cnt;
+ return (error);
+}
+
+int
+ev_select(ev, rw, p)
+ register struct evvar *ev;
+ int rw;
+ struct proc *p;
+{
+ int s = splev();
+
+ switch (rw) {
+
+ case FREAD:
+ /* succeed if there is something to read */
+ if (ev->ev_get != ev->ev_put) {
+ splx(s);
+ return (1);
+ }
+ selrecord(p, &ev->ev_sel);
+ break;
+
+ case FWRITE:
+ splx(s);
+ return (1); /* always fails => never blocks */
+ }
+ splx(s);
+ return (0);
+}
diff --git a/sys/arch/alpha/wscons/event_var.h b/sys/arch/alpha/wscons/event_var.h
new file mode 100644
index 00000000000..b63213d315f
--- /dev/null
+++ b/sys/arch/alpha/wscons/event_var.h
@@ -0,0 +1,87 @@
+/* $NetBSD: event_var.h,v 1.1 1996/04/12 02:00:45 cgd Exp $ */
+
+/*
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This software was developed by the Computer Systems Engineering group
+ * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+ * contributed to Berkeley.
+ *
+ * All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Lawrence Berkeley Laboratory.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)event_var.h 8.1 (Berkeley) 6/11/93
+ */
+
+/*
+ * Internal `Firm_event' interface for the keyboard and mouse drivers.
+ * The drivers are expected not to place events in the queue above spltty(),
+ * i.e., are expected to run off serial ports.
+ */
+
+/* EV_QSIZE should be a power of two so that `%' is fast */
+#define EV_QSIZE 256 /* may need tuning; this uses 2k */
+
+struct evvar {
+ u_int ev_get; /* get (read) index (modified synchronously) */
+ volatile u_int ev_put; /* put (write) index (modified by interrupt) */
+ struct selinfo ev_sel; /* process selecting */
+ struct proc *ev_io; /* process that opened queue (can get SIGIO) */
+ char ev_wanted; /* wake up on input ready */
+ char ev_async; /* send SIGIO on input ready */
+ struct firm_event *ev_q;/* circular buffer (queue) of events */
+};
+
+#define splev() spltty()
+
+#define EV_WAKEUP(ev) { \
+ selwakeup(&(ev)->ev_sel); \
+ if ((ev)->ev_wanted) { \
+ (ev)->ev_wanted = 0; \
+ wakeup((caddr_t)(ev)); \
+ } \
+ if ((ev)->ev_async) \
+ psignal((ev)->ev_io, SIGIO); \
+}
+
+void ev_init __P((struct evvar *));
+void ev_fini __P((struct evvar *));
+int ev_read __P((struct evvar *, struct uio *, int));
+int ev_select __P((struct evvar *, int, struct proc *));
+
+/*
+ * PEVENT is set just above PSOCK, which is just above TTIPRI, on the
+ * theory that mouse and keyboard `user' input should be quick.
+ */
+#define PEVENT 23
diff --git a/sys/arch/alpha/wscons/kbd.c b/sys/arch/alpha/wscons/kbd.c
new file mode 100644
index 00000000000..67cd26fcee5
--- /dev/null
+++ b/sys/arch/alpha/wscons/kbd.c
@@ -0,0 +1,334 @@
+/* $NetBSD: kbd.c,v 1.1 1996/04/12 02:00:46 cgd Exp $ */
+
+/*
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This software was developed by the Computer Systems Engineering group
+ * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+ * contributed to Berkeley.
+ *
+ * All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Lawrence Berkeley Laboratory.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)kbd.c 8.2 (Berkeley) 10/30/93
+ */
+
+/*
+ * Keyboard driver (/dev/kbd -- note that we do not have minor numbers
+ * [yet?]). Translates incoming bytes to ASCII or to `firm_events' and
+ * passes them up to the appropriate reader.
+ */
+
+#include <sys/param.h>
+#include <sys/conf.h>
+#include <sys/device.h>
+#include <sys/ioctl.h>
+#include <sys/kernel.h>
+#include <sys/proc.h>
+#include <sys/syslog.h>
+#include <sys/systm.h>
+#include <sys/tty.h>
+
+#include <machine/autoconf.h>
+
+#include <machine/vuid_event.h>
+#include <machine/kbio.h> /* XXX FOR KIOCSDIRECT */
+#include <machine/wsconsio.h> /* XXX for bell ioctls */
+#include <alpha/wscons/event_var.h>
+#include <alpha/wscons/wsconsvar.h>
+
+struct kbd_softc {
+ struct device *k_idev; /* the input device */
+ struct wscons_idev_spec k_ispec; /* the input device information */
+
+ int k_evmode; /* set if we should produce events */
+ struct evvar k_events; /* event queue state */
+ char *k_repeatcp; /* repeated character (string) */
+ int k_repeating; /* we've called timeout() */
+ int k_repeat_start; /* how long (ms) until repeat */
+ int k_repeat_step; /* how long (ms) until more repeats */
+
+ struct wsconsio_bell_data k_belldata;
+} kbd_softc;
+
+void
+kbdattach(idev, ispec)
+ struct device *idev;
+ struct wscons_idev_spec *ispec;
+{
+ register struct kbd_softc *k = &kbd_softc;
+
+ /*
+ * It would be nice if the repeat rates were in ticks.
+ * However, if they were, we couldn't set them here, as
+ * hz might not be set up yet!
+ */
+ k->k_repeat_start = 200;
+ k->k_repeat_step = 50;
+
+ k->k_belldata.wbd_pitch = 1500; /* 1500 Hz */
+ k->k_belldata.wbd_period = 100; /* 100 ms */
+ k->k_belldata.wbd_volume = 50; /* 50% volume */
+
+ k->k_idev = idev;
+ k->k_ispec = *ispec;
+}
+
+void
+kbd_repeat(void *arg)
+{
+ struct kbd_softc *k = (struct kbd_softc *)arg;
+ int s = spltty();
+
+ if (k->k_repeating && k->k_repeatcp != NULL) {
+ wscons_input(k->k_repeatcp);
+ timeout(kbd_repeat, k, (hz * k->k_repeat_step) / 1000);
+ }
+ splx(s);
+}
+
+void
+kbd_input(register int c)
+{
+ register struct kbd_softc *k = &kbd_softc;
+ register struct firm_event *fe;
+ register int put;
+ char *cp;
+
+ if (k->k_repeating) {
+ k->k_repeating = 0;
+ untimeout(kbd_repeat, k);
+ }
+
+ /*
+ * If /dev/kbd is not connected in event mode translate and
+ * send upstream.
+ */
+ if (!k->k_evmode) {
+ cp = (*k->k_ispec.wi_translate)(k->k_idev, c);
+ if (cp != NULL) {
+ wscons_input(cp);
+ k->k_repeating = 1;
+ k->k_repeatcp = cp;
+ timeout(kbd_repeat, k, (hz * k->k_repeat_start) / 1000);
+ }
+ return;
+ }
+
+ /*
+ * Keyboard is generating events. Turn this keystroke into an
+ * event and put it in the queue. If the queue is full, the
+ * keystroke is lost (sorry!).
+ */
+ put = k->k_events.ev_put;
+ fe = &k->k_events.ev_q[put];
+ put = (put + 1) % EV_QSIZE;
+ if (put == k->k_events.ev_get) {
+ log(LOG_WARNING, "keyboard event queue overflow\n"); /* ??? */
+ return;
+ }
+ fe->id = c & k->k_ispec.wi_keymask;
+ fe->value = (c & k->k_ispec.wi_keyupmask) != 0 ? VKEY_UP : VKEY_DOWN;
+ microtime(&fe->time);
+ k->k_events.ev_put = put;
+ EV_WAKEUP(&k->k_events);
+}
+
+int
+kbdopen(dev_t dev, int flags, int mode, struct proc *p)
+{
+ int s;
+ struct tty *tp;
+
+ if (kbd_softc.k_events.ev_io)
+ return (EBUSY);
+ kbd_softc.k_events.ev_io = p;
+ ev_init(&kbd_softc.k_events);
+ kbd_softc.k_evmode = 1;
+ return (0);
+}
+
+int
+kbdclose(dev_t dev, int flags, int mode, struct proc *p)
+{
+
+ /*
+ * Turn off event mode, dump the queue, and close the keyboard
+ * unless it is supplying console input.
+ */
+ kbd_softc.k_evmode = 0;
+ ev_fini(&kbd_softc.k_events);
+ kbd_softc.k_events.ev_io = NULL;
+ return (0);
+}
+
+int
+kbdread(dev_t dev, struct uio *uio, int flags)
+{
+
+ return (ev_read(&kbd_softc.k_events, uio, flags));
+}
+
+/* this routine should not exist, but is convenient to write here for now */
+int
+kbdwrite(dev_t dev, struct uio *uio, int flags)
+{
+
+ return (EOPNOTSUPP);
+}
+
+int
+kbdioctl(dev_t dev, u_long cmd, register caddr_t data, int flag, struct proc *p)
+{
+ struct kbd_softc *k = &kbd_softc;
+ struct wsconsio_bell_data *wbd;
+ int rv;
+
+ rv = ENOTTY;
+ switch (cmd) {
+#if 0
+ case KIOCSDIRECT:
+ k->k_evmode = *(int *)data;
+ return (0);
+#endif
+
+ case FIONBIO: /* we will remove this someday (soon???) */
+ return (0);
+
+ case FIOASYNC:
+ k->k_events.ev_async = *(int *)data != 0;
+ return (0);
+
+ case TIOCSPGRP:
+ if (*(int *)data != k->k_events.ev_io->p_pgid)
+ return (EPERM);
+ return (0);
+
+ case WSCONSIO_BELL:
+ if (k->k_ispec.wi_bell != NULL)
+ (*k->k_ispec.wi_bell)(k->k_idev, &k->k_belldata);
+ return (0);
+
+ case WSCONSIO_COMPLEXBELL:
+ if (k->k_ispec.wi_bell != NULL) {
+ wbd = (struct wsconsio_bell_data *)data;
+ if ((wbd->wbd_flags & WSCONSIO_BELLDATA_PITCH) == 0)
+ wbd->wbd_pitch = k->k_belldata.wbd_pitch;
+ if ((wbd->wbd_flags & WSCONSIO_BELLDATA_PERIOD) == 0)
+ wbd->wbd_period = k->k_belldata.wbd_period;
+ if ((wbd->wbd_flags & WSCONSIO_BELLDATA_VOLUME) == 0)
+ wbd->wbd_volume = k->k_belldata.wbd_volume;
+
+ (*k->k_ispec.wi_bell)(k->k_idev, wbd);
+ }
+ return (0);
+
+ case WSCONSIO_SETBELL:
+ wbd = (struct wsconsio_bell_data *)data;
+ if ((wbd->wbd_flags & WSCONSIO_BELLDATA_PITCH) != 0)
+ k->k_belldata.wbd_pitch = wbd->wbd_pitch;
+ if ((wbd->wbd_flags & WSCONSIO_BELLDATA_PERIOD) != 0)
+ k->k_belldata.wbd_period = wbd->wbd_period;
+ if ((wbd->wbd_flags & WSCONSIO_BELLDATA_VOLUME) != 0)
+ k->k_belldata.wbd_volume = wbd->wbd_volume;
+ return (0);
+
+ case WSCONSIO_GETBELL:
+ wbd = (struct wsconsio_bell_data *)data;
+ wbd->wbd_flags = WSCONSIO_BELLDATA_PITCH |
+ WSCONSIO_BELLDATA_PERIOD | WSCONSIO_BELLDATA_VOLUME;
+ wbd->wbd_pitch = k->k_belldata.wbd_pitch;
+ wbd->wbd_period = k->k_belldata.wbd_period;
+ wbd->wbd_volume = k->k_belldata.wbd_volume ;
+ return (0);
+
+#if 0 /* XXX */
+ /* XXX KEY-REPEAT RATE SETTING */
+#endif /* XXX */
+
+ default:
+ if (k->k_ispec.wi_ioctl != NULL)
+ rv = (*k->k_ispec.wi_ioctl)(k->k_idev, cmd, data,
+ flag, p);
+ }
+ return (rv);
+}
+
+int
+kbdselect(dev_t dev, int rw, struct proc *p)
+{
+
+ return (ev_select(&kbd_softc.k_events, rw, p));
+}
+
+/* Ring the console bell. (For wscons terminal emulator and other code) */
+void
+wscons_kbd_bell()
+{
+ struct kbd_softc *k = &kbd_softc;
+
+ if (k->k_ispec.wi_bell != NULL)
+ (*k->k_ispec.wi_bell)(k->k_idev, &k->k_belldata);
+}
+
+/*
+ * Console handling functions.
+ */
+
+int
+kbd_cngetc(dev)
+ dev_t dev;
+{
+ struct kbd_softc *k = &kbd_softc;
+
+ if (kbd_softc.k_evmode) /* XXX? */
+ return 0;
+ if (k->k_ispec.wi_getc != NULL)
+ return (*k->k_ispec.wi_getc)(k->k_idev);
+ else
+ return 0;
+}
+
+void
+kbd_cnpollc(dev, on)
+ dev_t dev;
+ int on;
+{
+ struct kbd_softc *k = &kbd_softc;
+
+ if (kbd_softc.k_evmode) /* XXX? */
+ return;
+ if (k->k_ispec.wi_pollc != NULL)
+ (*k->k_ispec.wi_pollc)(k->k_idev, on);
+}
diff --git a/sys/arch/alpha/wscons/ms.c b/sys/arch/alpha/wscons/ms.c
new file mode 100644
index 00000000000..240a0b4bfd6
--- /dev/null
+++ b/sys/arch/alpha/wscons/ms.c
@@ -0,0 +1,285 @@
+/* $NetBSD: ms.c,v 1.1 1996/04/12 02:00:47 cgd Exp $ */
+
+/*
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This software was developed by the Computer Systems Engineering group
+ * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+ * contributed to Berkeley.
+ *
+ * All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Lawrence Berkeley Laboratory.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)ms.c 8.1 (Berkeley) 6/11/93
+ */
+
+/*
+ * Mouse driver.
+ */
+
+#include <sys/param.h>
+#include <sys/conf.h>
+#include <sys/ioctl.h>
+#include <sys/kernel.h>
+#include <sys/proc.h>
+#include <sys/syslog.h>
+#include <sys/systm.h>
+#include <sys/tty.h>
+
+#include <machine/vuid_event.h>
+#include <alpha/wscons/event_var.h>
+#include <alpha/wscons/wsconsvar.h>
+
+struct ms_softc {
+ struct device *ms_dev;
+ struct wscons_mdev_spec ms_spec;
+ char ms_mb; /* mouse button state */
+ char ms_ub; /* user button state */
+ int ms_dx; /* delta-x */
+ int ms_dy; /* delta-y */
+ volatile int ms_ready; /* event queue is ready */
+ struct evvar ms_events; /* event queue state */
+} ms_softc;
+
+void
+msattach(mdev, mspec)
+ struct device *mdev;
+ struct wscons_mdev_spec *mspec;
+{
+ register struct ms_softc *m = &ms_softc;
+
+ m->ms_dev = mdev;
+ m->ms_spec = *mspec;
+}
+
+void
+ms_event(buttons, dx, dy)
+ char buttons; /* 0 is up */
+ int dx, dy;
+{
+ register struct firm_event *fe;
+ register struct ms_softc *ms = &ms_softc;
+ register int mb, ub, d, get, put, any;
+ static const char to_one[] = { 1, 2, 2, 4, 4, 4, 4 };
+ static const int to_id[] = { MS_RIGHT, MS_MIDDLE, 0, MS_LEFT };
+
+ /*
+ * Discard input if not ready.
+ */
+ if (ms->ms_ready == 0)
+ return;
+
+ ms->ms_mb = (buttons) & 0x7;
+ ms->ms_dx += dx;
+ ms->ms_dy += dy;
+
+ /*
+ * We have at least one event (mouse button, delta-X, or
+ * delta-Y; possibly all three, and possibly three separate
+ * button events). Deliver these events until we are out
+ * of changes or out of room. As events get delivered,
+ * mark them `unchanged'.
+ */
+ any = 0;
+ get = ms->ms_events.ev_get;
+ put = ms->ms_events.ev_put;
+ fe = &ms->ms_events.ev_q[put];
+
+ /* NEXT prepares to put the next event, backing off if necessary */
+#define NEXT \
+ if ((++put) % EV_QSIZE == get) { \
+ put--; \
+ goto out; \
+ }
+ /* ADVANCE completes the `put' of the event */
+#define ADVANCE \
+ fe++; \
+ if (put >= EV_QSIZE) { \
+ put = 0; \
+ fe = &ms->ms_events.ev_q[0]; \
+ } \
+ any = 1
+
+ mb = ms->ms_mb;
+ ub = ms->ms_ub;
+ while ((d = mb ^ ub) != 0) {
+ /*
+ * Mouse button change. Convert up to three changes
+ * to the `first' change, and drop it into the event queue.
+ */
+ NEXT;
+ d = to_one[d - 1]; /* from 1..7 to {1,2,4} */
+ fe->id = to_id[d - 1]; /* from {1,2,4} to ID */
+ fe->value = mb & d ? VKEY_DOWN : VKEY_UP;
+ fe->time = time;
+ ADVANCE;
+ ub ^= d;
+ }
+ if (ms->ms_dx) {
+ NEXT;
+ fe->id = LOC_X_DELTA;
+ fe->value = ms->ms_dx;
+ fe->time = time;
+ ADVANCE;
+ ms->ms_dx = 0;
+ }
+ if (ms->ms_dy) {
+ NEXT;
+ fe->id = LOC_Y_DELTA;
+ fe->value = ms->ms_dy;
+ fe->time = time;
+ ADVANCE;
+ ms->ms_dy = 0;
+ }
+out:
+ if (any) {
+ ms->ms_ub = ub;
+ ms->ms_events.ev_put = put;
+ EV_WAKEUP(&ms->ms_events);
+ }
+}
+
+int
+msopen(dev, flags, mode, p)
+ dev_t dev;
+ int flags, mode;
+ struct proc *p;
+{
+ int s, error;
+
+ if (ms_softc.ms_dev == NULL) /* never attached! */
+ return (ENXIO);
+
+ if (ms_softc.ms_events.ev_io)
+ return (EBUSY);
+
+ ms_softc.ms_events.ev_io = p;
+ ev_init(&ms_softc.ms_events); /* may cause sleep */
+
+ ms_softc.ms_ready = 1; /* start accepting events */
+
+ error = (*ms_softc.ms_spec.wm_enable)(ms_softc.ms_dev);
+
+ if (error) {
+ ms_softc.ms_ready = 0; /* stop accepting events */
+ ev_fini(&ms_softc.ms_events);
+ ms_softc.ms_events.ev_io = NULL;
+ return (error);
+ }
+
+ return (0);
+}
+
+int
+msclose(dev, flags, mode, p)
+ dev_t dev;
+ int flags, mode;
+ struct proc *p;
+{
+
+ (*ms_softc.ms_spec.wm_disable)(ms_softc.ms_dev);
+
+ ms_softc.ms_ready = 0; /* stop accepting events */
+ ev_fini(&ms_softc.ms_events);
+ ms_softc.ms_events.ev_io = NULL;
+ return (0);
+}
+
+int
+msread(dev, uio, flags)
+ dev_t dev;
+ struct uio *uio;
+ int flags;
+{
+
+ return (ev_read(&ms_softc.ms_events, uio, flags));
+}
+
+/* this routine should not exist, but is convenient to write here for now */
+int
+mswrite(dev, uio, flags)
+ dev_t dev;
+ struct uio *uio;
+ int flags;
+{
+
+ return (EOPNOTSUPP);
+}
+
+int
+msioctl(dev, cmd, data, flag, p)
+ dev_t dev;
+ u_long cmd;
+ register caddr_t data;
+ int flag;
+ struct proc *p;
+{
+ int s;
+
+ switch (cmd) {
+
+ case FIONBIO: /* we will remove this someday (soon???) */
+ return (0);
+
+ case FIOASYNC:
+ ms_softc.ms_events.ev_async = *(int *)data != 0;
+ return (0);
+
+ case TIOCSPGRP:
+ if (*(int *)data != ms_softc.ms_events.ev_io->p_pgid)
+ return (EPERM);
+ return (0);
+
+ case VUIDGFORMAT:
+ /* we only do firm_events */
+ *(int *)data = VUID_FIRM_EVENT;
+ return (0);
+
+ case VUIDSFORMAT:
+ if (*(int *)data != VUID_FIRM_EVENT)
+ return (EINVAL);
+ return (0);
+ }
+ return (ENOTTY);
+}
+
+int
+msselect(dev, rw, p)
+ dev_t dev;
+ int rw;
+ struct proc *p;
+{
+
+ return (ev_select(&ms_softc.ms_events, rw, p));
+}
diff --git a/sys/arch/alpha/wscons/wscons.c b/sys/arch/alpha/wscons/wscons.c
new file mode 100644
index 00000000000..2845895227d
--- /dev/null
+++ b/sys/arch/alpha/wscons/wscons.c
@@ -0,0 +1,495 @@
+/* $NetBSD: wscons.c,v 1.3.4.1 1996/06/03 18:54:35 cgd Exp $ */
+
+/*
+ * Copyright (c) 1995, 1996 Carnegie-Mellon University.
+ * All rights reserved.
+ *
+ * Author: Chris G. Demetriou
+ *
+ * Permission to use, copy, modify and distribute this software and
+ * its documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
+ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+#include <sys/param.h>
+#include <sys/device.h>
+#include <sys/kernel.h>
+#include <sys/conf.h>
+#include <sys/systm.h>
+#include <sys/malloc.h>
+#include <sys/ioctl.h>
+#include <sys/proc.h>
+#include <sys/tty.h>
+#include <sys/termios.h>
+
+#include <dev/cons.h>
+#include <alpha/wscons/wsconsvar.h>
+#include <alpha/wscons/wscons_emul.h>
+#include <machine/wsconsio.h>
+
+cdev_decl(wscons);
+
+/* Macros to clear/set/test flags. */
+#define SET(t, f) (t) |= (f)
+#define CLR(t, f) (t) &= ~(f)
+#define ISSET(t, f) ((t) & (f))
+
+/*
+ * Autoconfiguration glue.
+ */
+struct wscons_softc {
+ struct device sc_dev;
+
+ struct wscons_emul_data *sc_emul_data;
+ struct tty *sc_tty;
+
+ wscons_ioctl_t sc_ioctl;
+ wscons_mmap_t sc_mmap;
+};
+
+int wsconsmatch __P((struct device *, void *, void *));
+void wsconsattach __P((struct device *, struct device *, void *));
+
+struct cfattach wscons_ca = {
+ sizeof (struct wscons_softc), wsconsmatch, wsconsattach,
+};
+
+struct cfdriver wscons_cd = {
+ NULL, "wscons", DV_TTY,
+};
+
+/*
+ * Console handing functions and variables.
+ */
+int wscons_console_attached; /* polled console fns attached */
+int wscons_console_unit = -1;
+struct wscons_emul_data wscons_console_emul_data;
+
+int wscons_cngetc __P((dev_t));
+void wscons_cnputc __P((dev_t, int));
+void wscons_cnpollc __P((dev_t, int));
+
+struct consdev wscons_consdev =
+ { NULL, NULL, wscons_cngetc, wscons_cnputc, wscons_cnpollc, NODEV, 1 };
+
+/*
+ * Input focus handling: where characters from the keyboard are sent.
+ */
+int wscons_input_focus = -1;
+
+/*
+ * TTY interface helpers.
+ */
+
+#define WSCUNIT(dev) minor(dev)
+
+void wsconsstart __P((struct tty *));
+int wsconsparam __P((struct tty *, struct termios *));
+
+
+/*
+ * Output device selection and attachment.
+ */
+
+int
+wsconsmatch(parent, cfdata, aux)
+ struct device *parent;
+ void *cfdata;
+ void *aux;
+{
+ struct wscons_attach_args *waa = aux;
+ struct cfdata *cf = cfdata;
+
+ if (waa->waa_isconsole && wscons_console_unit != -1)
+ panic("wsconsmatch: multiple consoles?");
+
+ /* If console-ness specified... */
+ if (cf->wsconscf_console != -1) {
+ /*
+ * If exact match, return match with high priority,
+ * else return don't match.
+ */
+ if ((cf->wsconscf_console && waa->waa_isconsole) ||
+ (!cf->wsconscf_console && !waa->waa_isconsole))
+ return (10);
+ else
+ return (0);
+ }
+
+ /* Otherwise match with low priority. */
+ return (1);
+}
+
+void
+wsconsattach(parent, self, aux)
+ struct device *parent, *self;
+ void *aux;
+{
+ struct wscons_attach_args *waa = aux;
+ struct wscons_softc *sc = (struct wscons_softc *)self;
+ int console;
+
+ console = waa->waa_isconsole;
+ if (console)
+ printf(": console");
+
+ /*
+ * If output has already been set up, record it now. Otherwise,
+ * do the setup.
+ */
+ if (console) {
+ sc->sc_emul_data = &wscons_console_emul_data;
+ wscons_console_unit = sc->sc_dev.dv_unit;
+ wscons_consdev.cn_dev =
+ makedev(25, wscons_console_unit); /* XXX */
+ } else {
+ sc->sc_emul_data = malloc(sizeof(*sc->sc_emul_data), M_DEVBUF,
+ M_WAITOK);
+ wscons_emul_attach(sc->sc_emul_data, &waa->waa_odev_spec);
+ }
+
+ /*
+ * Set wscons input focus if this is the console device,
+ * or if we've not yet set the input focus.
+ */
+ if (console || wscons_input_focus == -1)
+ wscons_input_focus = sc->sc_dev.dv_unit;
+
+ /*
+ * Set up the device's tty structure.
+ */
+ sc->sc_tty = ttymalloc();
+ tty_attach(sc->sc_tty);
+
+ /*
+ * Record other relevant information: ioctl and mmap functions.
+ */
+ sc->sc_ioctl = waa->waa_odev_spec.wo_ioctl;
+ sc->sc_mmap = waa->waa_odev_spec.wo_mmap;
+
+ printf("\n");
+}
+
+
+/*
+ * Keyboard input handling.
+ */
+
+void
+wscons_input(cp)
+ char *cp;
+{
+ struct wscons_softc *sc;
+ struct tty *tp;
+
+ if (wscons_input_focus == -1)
+ return;
+
+#ifdef DIAGNOSTIC
+ if (wscons_input_focus >= wscons_cd.cd_ndevs)
+ panic("wscons_input: bogus input focus");
+ sc = wscons_cd.cd_devs[wscons_input_focus];
+ if (sc == NULL)
+ panic("wscons_input: null input device");
+ tp = sc->sc_tty;
+ if (tp == NULL)
+ panic("wscons_input: no tty");
+#else
+ sc = wscons_cd.cd_devs[wscons_input_focus];
+ tp = sc->sc_tty;
+#endif
+
+ while (*cp)
+ (*linesw[tp->t_line].l_rint)(*cp++, tp);
+}
+
+
+/*
+ * Console (output) tty-handling functions.
+ */
+
+int
+wsconsopen(dev, flag, mode, p)
+ dev_t dev;
+ int flag, mode;
+ struct proc *p;
+{
+ struct wscons_softc *sc;
+ int unit = WSCUNIT(dev), newopen, rv;
+ struct tty *tp;
+
+ if (unit >= wscons_cd.cd_ndevs)
+ return ENXIO;
+ sc = wscons_cd.cd_devs[unit];
+ if (sc == NULL)
+ return ENXIO;
+
+#ifdef DIAGNOSTIC
+ if (!sc->sc_tty)
+ panic("wscopen: no tty!");
+#endif
+ tp = sc->sc_tty;
+
+ tp->t_oproc = wsconsstart;
+ tp->t_param = wsconsparam;
+ tp->t_dev = dev;
+ newopen = (tp->t_state & TS_ISOPEN) == 0;
+ if (newopen) {
+ tp->t_state |= TS_WOPEN;
+ ttychars(tp);
+ tp->t_iflag = TTYDEF_IFLAG;
+ tp->t_oflag = TTYDEF_OFLAG;
+ tp->t_cflag = TTYDEF_CFLAG;
+ tp->t_lflag = TTYDEF_LFLAG;
+ tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
+ wsconsparam(tp, &tp->t_termios);
+ ttsetwater(tp);
+ } else if ((tp->t_state & TS_XCLUDE) != 0 && p->p_ucred->cr_uid != 0)
+ return EBUSY;
+ tp->t_state |= TS_CARR_ON;
+
+ rv = ((*linesw[tp->t_line].l_open)(dev, tp));
+ if (newopen && (rv == 0)) {
+ /* set window sizes to be correct */
+ tp->t_winsize.ws_row = sc->sc_emul_data->ac_nrow;
+ tp->t_winsize.ws_col = sc->sc_emul_data->ac_ncol;
+ }
+ return (rv);
+}
+
+int
+wsconsclose(dev, flag, mode, p)
+ dev_t dev;
+ int flag, mode;
+ struct proc *p;
+{
+ struct wscons_softc *sc = wscons_cd.cd_devs[WSCUNIT(dev)];
+ struct tty *tp = sc->sc_tty;
+
+ (*linesw[tp->t_line].l_close)(tp, flag);
+ ttyclose(tp);
+ return(0);
+}
+
+int
+wsconsread(dev, uio, flag)
+ dev_t dev;
+ struct uio *uio;
+ int flag;
+{
+ struct wscons_softc *sc = wscons_cd.cd_devs[WSCUNIT(dev)];
+ struct tty *tp = sc->sc_tty;
+
+ return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
+}
+
+int
+wsconswrite(dev, uio, flag)
+ dev_t dev;
+ struct uio *uio;
+ int flag;
+{
+ struct wscons_softc *sc = wscons_cd.cd_devs[WSCUNIT(dev)];
+ struct tty *tp = sc->sc_tty;
+
+ return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
+}
+
+struct tty *
+wsconstty(dev)
+ dev_t dev;
+{
+ struct wscons_softc *sc = wscons_cd.cd_devs[WSCUNIT(dev)];
+ struct tty *tp = sc->sc_tty;
+
+ return (tp);
+}
+
+int
+wsconsioctl(dev, cmd, data, flag, p)
+ dev_t dev;
+ u_long cmd;
+ caddr_t data;
+ int flag;
+ struct proc *p;
+{
+ struct wscons_softc *sc = wscons_cd.cd_devs[WSCUNIT(dev)];
+ struct tty *tp = sc->sc_tty;
+ int error;
+
+ /* do the line discipline ioctls first */
+ error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
+ if (error >= 0)
+ return error;
+
+ /* then the tty ioctls */
+ error = ttioctl(tp, cmd, data, flag, p);
+ if (error >= 0)
+ return error;
+
+ /* then the underlying frame buffer device ioctls */
+ if (sc->sc_ioctl != NULL)
+ error = (*sc->sc_ioctl)(sc->sc_dev.dv_parent, cmd, data,
+ flag, p);
+ if (error >= 0)
+ return error;
+
+ /*
+ * then the keyboard ioctls, if we have input focus.
+ * This is done last because it's a special case: it will
+ * return ENOTTY (not -1) if it can't figure out what
+ * to do with the request.
+ */
+ if (WSCUNIT(dev) == wscons_input_focus)
+ error = kbdioctl(0, cmd, data, flag, p); /* XXX dev */
+ else
+ error = ENOTTY;
+
+ return (error);
+}
+
+int
+wsconsmmap(dev, offset, prot)
+ dev_t dev;
+ int offset; /* XXX */
+ int prot;
+{
+ struct wscons_softc *sc = wscons_cd.cd_devs[WSCUNIT(dev)];
+
+ if (sc->sc_ioctl != NULL)
+ return (*sc->sc_mmap)(sc->sc_dev.dv_parent, offset, prot);
+ else
+ return -1;
+}
+
+void
+wsconsstart(tp)
+ register struct tty *tp;
+{
+ struct wscons_softc *sc;
+ register int s, n, i;
+ char buf[OBUFSIZ];
+
+ s = spltty();
+ if (tp->t_state & (TS_TIMEOUT | TS_BUSY | TS_TTSTOP)) {
+ splx(s);
+ return;
+ }
+ tp->t_state |= TS_BUSY;
+ splx(s);
+
+ n = q_to_b(&tp->t_outq, buf, sizeof(buf));
+ for (i = 0; i < n; ++i)
+ buf[i] &= 0177; /* strip parity (argh) */
+
+ sc = wscons_cd.cd_devs[WSCUNIT(tp->t_dev)];
+ wscons_emul_input(sc->sc_emul_data, buf, n);
+
+ s = spltty();
+ tp->t_state &= ~TS_BUSY;
+ /* Come back if there's more to do */
+ if (tp->t_outq.c_cc) {
+ tp->t_state |= TS_TIMEOUT;
+ timeout(ttrstrt, tp, 1);
+ }
+ if (tp->t_outq.c_cc <= tp->t_lowat) {
+ if (tp->t_state&TS_ASLEEP) {
+ tp->t_state &= ~TS_ASLEEP;
+ wakeup((caddr_t)&tp->t_outq);
+ }
+ selwakeup(&tp->t_wsel);
+ }
+ splx(s);
+}
+
+int
+wsconsstop(tp, flag)
+ struct tty *tp;
+ int flag;
+{
+ int s;
+
+ /* XXX ??? */
+ s = spltty();
+ if (ISSET(tp->t_state, TS_BUSY))
+ if (!ISSET(tp->t_state, TS_TTSTOP))
+ SET(tp->t_state, TS_FLUSH);
+ splx(s);
+}
+
+/*
+ * Set line parameters.
+ */
+int
+wsconsparam(tp, t)
+ struct tty *tp;
+ struct termios *t;
+{
+
+ tp->t_ispeed = t->c_ispeed;
+ tp->t_ospeed = t->c_ospeed;
+ tp->t_cflag = t->c_cflag;
+ return 0;
+}
+
+
+/*
+ * Polled-console handing setup and manipulation.
+ */
+
+void
+wscons_attach_console(wo)
+ const struct wscons_odev_spec *wo;
+{
+
+ if (wscons_console_attached)
+ panic("wscons_attach_console: multiple times");
+
+ wscons_emul_attach(&wscons_console_emul_data, wo);
+ cn_tab = &wscons_consdev;
+ wscons_console_attached = 1;
+}
+
+void
+wscons_cnputc(dev, ic)
+ dev_t dev;
+ int ic;
+{
+ char c = ic;
+
+ if (wscons_console_attached)
+ wscons_emul_input(&wscons_console_emul_data, &c, 1);
+}
+
+int
+wscons_cngetc(dev)
+ dev_t dev;
+{
+
+ return kbd_cngetc(dev); /* XXX XXX */
+}
+
+void
+wscons_cnpollc(dev, i)
+ dev_t dev;
+ int i;
+{
+
+ kbd_cngetc(dev, i); /* XXX XXX */
+}
diff --git a/sys/arch/alpha/wscons/wscons_emul.c b/sys/arch/alpha/wscons/wscons_emul.c
new file mode 100644
index 00000000000..cb218fd5cd0
--- /dev/null
+++ b/sys/arch/alpha/wscons/wscons_emul.c
@@ -0,0 +1,416 @@
+/* $NetBSD: wscons_emul.c,v 1.2 1996/04/12 06:10:29 cgd Exp $ */
+
+/*
+ * Copyright (c) 1995, 1996 Carnegie-Mellon University.
+ * All rights reserved.
+ *
+ * Author: Chris G. Demetriou
+ *
+ * Permission to use, copy, modify and distribute this software and
+ * its documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
+ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+/*
+ * Console emulator for a 'generic' ANSI X3.64 console.
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <alpha/wscons/wsconsvar.h>
+#include <alpha/wscons/wscons_emul.h>
+#include <alpha/wscons/ascii.h>
+
+void
+wscons_emul_attach(we, wo)
+ struct wscons_emul_data *we;
+ const struct wscons_odev_spec *wo;
+{
+ int i;
+
+#ifdef DIAGNOSTIC
+ if (we == NULL || wo == NULL)
+ panic("wscons_emul_attach: bogus args");
+ if (wo->wo_ef == NULL)
+ panic("wscons_emul_attach: bogus emul functions");
+#endif
+ if (wo->wo_nrows < 0 || wo->wo_ncols < 0)
+ panic("wscons_emul_attach: bogus size");
+ if (wo->wo_crow < 0 || wo->wo_ccol < 0 ||
+ wo->wo_crow >= wo->wo_nrows || wo->wo_ccol >= wo->wo_ncols)
+ panic("wscons_emul_attach: bogus location (n: %d/%d, c: %d/%d",
+ wo->wo_nrows, wo->wo_ncols, wo->wo_crow, wo->wo_ccol);
+
+ we->ac_state = ANSICONS_STATE_NORMAL;
+ we->ac_ef = wo->wo_ef;
+ we->ac_efa = wo->wo_efa;
+
+ we->ac_nrow = wo->wo_nrows;
+ we->ac_ncol = wo->wo_ncols;
+
+ we->ac_crow = wo->wo_crow;
+ we->ac_ccol = wo->wo_ccol;
+
+ for (i = 0; i < ANSICONS_NARGS; i++)
+ we->ac_args[i] = 0;
+
+ (*we->ac_ef->wef_cursor)(we->ac_efa, 1, we->ac_crow, we->ac_ccol);
+}
+
+static inline int
+wscons_emul_input_normal(we, c)
+ struct wscons_emul_data *we;
+ char c;
+{
+ int newstate = ANSICONS_STATE_NORMAL;
+ int n;
+
+ switch (c) {
+ case ASCII_BEL:
+ wscons_kbd_bell();
+ break;
+
+ case ASCII_BS:
+ if (we->ac_ccol > 0)
+ we->ac_ccol--;
+ break;
+
+ case ASCII_HT:
+ n = 8 - (we->ac_ccol & 7);
+ if (we->ac_ccol + n >= we->ac_ncol)
+ n = we->ac_ncol - we->ac_ccol - 1;
+
+ (*we->ac_ef->wef_erasecols)(we->ac_efa, we->ac_crow,
+ we->ac_ccol, we->ac_ccol + n);
+
+ we->ac_ccol += n;
+ break;
+
+ case ASCII_LF:
+ if (we->ac_crow < we->ac_nrow - 1) {
+ we->ac_crow++;
+ break;
+ }
+
+#ifdef DIAGNOSTIC
+ if (we->ac_crow >= we->ac_nrow)
+ panic("wscons_emul: didn't scroll (1)");
+#endif
+
+#if 0
+ (*we->ac_ef->wef_copyrows)(we->ac_efa, 1, 0,
+ we->ac_nrow - 1);
+ (*we->ac_ef->wef_eraserows)(we->ac_efa,
+ we->ac_nrow - 1, 1);
+#else
+ (*we->ac_ef->wef_copyrows)(we->ac_efa, 10, 0,
+ we->ac_nrow - 10);
+ (*we->ac_ef->wef_eraserows)(we->ac_efa,
+ we->ac_nrow - 10, 10);
+ we->ac_crow -= 10 - 1;
+#endif
+ break;
+
+ case ASCII_VT:
+ if (we->ac_crow > 0)
+ we->ac_crow--;
+ break;
+
+ case ASCII_NP:
+ (*we->ac_ef->wef_eraserows)(we->ac_efa,
+ 0, we->ac_nrow - 1);
+
+ we->ac_ccol = 0;
+ we->ac_crow = 0;
+ break;
+
+ case ASCII_CR:
+ we->ac_ccol = 0;
+ break;
+
+ case ASCII_ESC:
+ if (we->ac_state == ANSICONS_STATE_NORMAL) {
+ newstate = ANSICONS_STATE_HAVEESC;
+ break;
+ }
+ /* else fall through; we're printing one out */
+
+ default:
+ (*we->ac_ef->wef_putstr)(we->ac_efa,
+ we->ac_crow, we->ac_ccol, &c, 1);
+ we->ac_ccol++;
+
+ /* if the current column is still on the current line, done. */
+ if (we->ac_ccol < we->ac_ncol)
+ break;
+
+ /* wrap the column around. */
+ we->ac_ccol = 0;
+
+ /* if the current row isn't the last, increment and leave. */
+ if (we->ac_crow < we->ac_nrow - 1) {
+ we->ac_crow++;
+ break;
+ }
+
+#ifdef DIAGNOSTIC
+ /* check against row overflow */
+ if (we->ac_crow >= we->ac_nrow)
+ panic("wscons_emul: didn't scroll (2)");
+#endif
+
+#if 0
+ /* scroll all of the rows up one; leave current row # alone */
+ (*we->ac_ef->wef_copyrows)(we->ac_efa, 1, 0,
+ we->ac_nrow - 1);
+ (*we->ac_ef->wef_eraserows)(we->ac_efa,
+ we->ac_nrow - 1, 1);
+#else
+ (*we->ac_ef->wef_copyrows)(we->ac_efa, 10, 0,
+ we->ac_nrow - 10);
+ (*we->ac_ef->wef_eraserows)(we->ac_efa,
+ we->ac_nrow - 10, 10);
+ we->ac_crow -= 10 - 1;
+#endif
+ break;
+ }
+
+ return newstate;
+}
+
+static inline int
+wscons_emul_input_haveesc(we, c)
+ struct wscons_emul_data *we;
+ char c;
+{
+ int newstate = ANSICONS_STATE_NORMAL;
+ int i;
+
+ switch (c) {
+ case '[':
+ for (i = 0; i < ANSICONS_NARGS; i++)
+ we->ac_args[i] = 0;
+ newstate = ANSICONS_STATE_CONTROL;
+ break;
+
+ default:
+ wscons_emul_input_normal(we, ASCII_ESC); /* special cased */
+ newstate = wscons_emul_input_normal(we, c);
+ break;
+ }
+
+ return newstate;
+}
+
+static inline void
+wscons_emul_docontrol(we, c)
+ struct wscons_emul_data *we;
+ char c;
+{
+ int n, m;
+
+#if 0
+ printf("control: %c: %d, %d\n", c, we->ac_args[0], we->ac_args[1]);
+#endif
+ switch (c) {
+ case 'A': /* Cursor Up */
+ n = we->ac_args[0] ? we->ac_args[0] : 1;
+ n = min(n, we->ac_crow);
+ we->ac_crow -= n;
+ break;
+
+ case 'B': /* Cursor Down */
+ n = we->ac_args[0] ? we->ac_args[0] : 1;
+ n = min(n, we->ac_nrow - we->ac_crow - 1);
+ we->ac_crow += n;
+ break;
+
+ case 'C': /* Cursor Forward */
+ n = we->ac_args[0] ? we->ac_args[0] : 1;
+ n = min(n, we->ac_ncol - we->ac_ccol - 1);
+ we->ac_ccol += n;
+ break;
+
+ case 'D': /* Cursor Backward */
+ n = we->ac_args[0] ? we->ac_args[0] : 1;
+ n = min(n, we->ac_ccol);
+ we->ac_ccol -= n;
+ break;
+
+ case 'E': /* Cursor Next Line */
+ n = we->ac_args[0] ? we->ac_args[0] : 1;
+ n = min(n, we->ac_nrow - we->ac_crow - 1);
+ we->ac_crow += n;
+ we->ac_ccol = 0;
+ break;
+
+ case 'f': /* Horizontal and Vertical Position */
+ case 'H': /* Cursor Position */
+ m = we->ac_args[1] ? we->ac_args[1] : 1; /* arg 1 */
+ m = min(m, we->ac_nrow);
+
+ n = we->ac_args[0] ? we->ac_args[0] : 1; /* arg 2 */
+ n = min(n, we->ac_ncol);
+
+ we->ac_crow = m - 1;
+ we->ac_ccol = n - 1;
+ break;
+
+ case 'J': /* Erase in Display */
+ (*we->ac_ef->wef_erasecols)(we->ac_efa, we->ac_crow,
+ we->ac_ccol, we->ac_ncol - we->ac_ccol);
+ if (we->ac_crow + 1 < we->ac_nrow)
+ (*we->ac_ef->wef_eraserows)(we->ac_efa,
+ we->ac_crow + 1, we->ac_nrow - we->ac_crow - 1);
+ break;
+
+ case 'K': /* Erase in Line */
+ (*we->ac_ef->wef_erasecols)(we->ac_efa, we->ac_crow,
+ we->ac_ccol, we->ac_ncol - we->ac_ccol);
+ break;
+
+ case 'L': /* Insert Line */
+ {
+ int copy_src, copy_dst, copy_nlines;
+
+ n = we->ac_args[0] ? we->ac_args[0] : 1;
+ n = min(n, we->ac_nrow - we->ac_crow);
+
+ copy_src = we->ac_crow;
+ copy_dst = we->ac_crow + n;
+ copy_nlines = we->ac_nrow - copy_dst;
+ if (copy_nlines > 0)
+ (*we->ac_ef->wef_copyrows)(we->ac_efa,
+ copy_src, copy_dst, copy_nlines);
+
+ (*we->ac_ef->wef_eraserows)(we->ac_efa,
+ we->ac_crow, n);
+ }
+ break;
+
+ case 'M': /* Delete Line */
+ {
+ int copy_src, copy_dst, copy_nlines;
+
+ n = we->ac_args[0] ? we->ac_args[0] : 1;
+ n = min(n, we->ac_nrow - we->ac_crow);
+
+ copy_src = we->ac_crow + n;
+ copy_dst = we->ac_crow;
+ copy_nlines = we->ac_nrow - copy_src;
+ if (copy_nlines > 0)
+ (*we->ac_ef->wef_copyrows)(we->ac_efa,
+ copy_src, copy_dst, copy_nlines);
+
+ (*we->ac_ef->wef_eraserows)(we->ac_efa,
+ we->ac_crow + copy_nlines,
+ we->ac_nrow - (we->ac_crow + copy_nlines));
+ }
+ break;
+
+ case 'P': /* Delete Character */
+ {
+ int copy_src, copy_dst, copy_ncols;
+
+ n = we->ac_args[0] ? we->ac_args[0] : 1;
+ n = min(n, we->ac_ncol - we->ac_ccol);
+
+ copy_src = we->ac_ccol + n;
+ copy_dst = we->ac_ccol;
+ copy_ncols = we->ac_ncol - copy_src;
+ if (copy_ncols > 0)
+ (*we->ac_ef->wef_copycols)(we->ac_efa,
+ we->ac_crow, copy_src, copy_dst,
+ copy_ncols);
+
+ (*we->ac_ef->wef_erasecols)(we->ac_efa,
+ we->ac_crow, we->ac_ccol + copy_ncols,
+ we->ac_ncol - (we->ac_ccol + copy_ncols));
+ break;
+ }
+ break;
+ }
+}
+
+static inline int
+wscons_emul_input_control(we, c)
+ struct wscons_emul_data *we;
+ char c;
+{
+ int newstate = ANSICONS_STATE_CONTROL;
+ int i;
+
+ switch (c) {
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ we->ac_args[0] *= 10;
+ we->ac_args[0] += c - '0';
+ break;
+
+ case ';':
+ for (i = 0; i < ANSICONS_NARGS - 1; i++)
+ we->ac_args[i + 1] = we->ac_args[i];
+ we->ac_args[0] = 0;
+ break;
+
+ default:
+ wscons_emul_docontrol(we, c);
+ newstate = ANSICONS_STATE_NORMAL;
+ break;
+ }
+
+ return newstate;
+}
+
+void
+wscons_emul_input(we, cp, n)
+ struct wscons_emul_data *we;
+ char *cp;
+ int n;
+{
+ int newstate;
+
+ (*we->ac_ef->wef_cursor)(we->ac_efa, 0, we->ac_crow, we->ac_ccol);
+ for (; n; n--, cp++) {
+ switch (we->ac_state) {
+ case ANSICONS_STATE_NORMAL:
+ newstate = wscons_emul_input_normal(we, *cp);
+ break;
+
+ case ANSICONS_STATE_HAVEESC:
+ newstate = wscons_emul_input_haveesc(we, *cp);
+ break;
+
+ case ANSICONS_STATE_CONTROL:
+ newstate = wscons_emul_input_control(we, *cp);
+ break;
+
+ default:
+#ifdef DIAGNOSTIC
+ panic("wscons_emul: invalid state %d\n", we->ac_state);
+#endif
+ /* try to recover, if things get screwed up... */
+ newstate = ANSICONS_STATE_NORMAL;
+ break;
+ }
+
+ we->ac_state = newstate;
+ }
+ (*we->ac_ef->wef_cursor)(we->ac_efa, 1, we->ac_crow, we->ac_ccol);
+}
diff --git a/sys/arch/alpha/wscons/wscons_emul.h b/sys/arch/alpha/wscons/wscons_emul.h
new file mode 100644
index 00000000000..acae6a9b158
--- /dev/null
+++ b/sys/arch/alpha/wscons/wscons_emul.h
@@ -0,0 +1,50 @@
+/* $NetBSD: wscons_emul.h,v 1.2 1996/04/12 06:10:32 cgd Exp $ */
+
+/*
+ * Copyright (c) 1995, 1996 Carnegie-Mellon University.
+ * All rights reserved.
+ *
+ * Author: Chris G. Demetriou
+ *
+ * Permission to use, copy, modify and distribute this software and
+ * its documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
+ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+#define ANSICONS_NARGS 4
+
+struct wscons_emul_data {
+ int ac_state; /* current state; see below */
+
+ const struct wscons_emulfuncs *ac_ef; /* emul. callback functions */
+ void *ac_efa; /* arg. for callbacks */
+
+ int ac_nrow, ac_ncol; /* number of rows/columns */
+ int ac_crow, ac_ccol; /* current row/column */
+
+ u_int ac_args[ANSICONS_NARGS]; /* emulation args */
+};
+
+#define ANSICONS_STATE_NORMAL 0 /* normal processing */
+#define ANSICONS_STATE_HAVEESC 1 /* seen start of ctl seq */
+#define ANSICONS_STATE_CONTROL 2 /* processing ctl seq */
+
+void wscons_emul_attach __P((struct wscons_emul_data *,
+ const struct wscons_odev_spec *));
+void wscons_emul_input __P((struct wscons_emul_data *, char *, int));
diff --git a/sys/arch/alpha/wscons/wscons_raster.h b/sys/arch/alpha/wscons/wscons_raster.h
new file mode 100644
index 00000000000..33edc0cab95
--- /dev/null
+++ b/sys/arch/alpha/wscons/wscons_raster.h
@@ -0,0 +1,93 @@
+/* $NetBSD: wscons_raster.h,v 1.1 1996/04/12 02:00:51 cgd Exp $ */
+
+/*
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This software was developed by the Computer Systems Engineering group
+ * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+ * contributed to Berkeley.
+ *
+ * All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Lawrence Berkeley Laboratory.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)fbvar.h 8.1 (Berkeley) 6/11/93
+ */
+
+#ifndef _DEV_PSEUDO_RCONS_H_
+#define _DEV_PSEUDO_RCONS_H_
+
+struct rcons {
+ /* Console raster. Filled in before rcons_init(). */
+ struct raster *rc_sp; /* frame buffer raster */
+ int *rc_crowp; /* ptr to cursror row */
+ int *rc_ccolp; /* ptr to cursror column */
+
+ /* Number of rows/columns on raster. Filled in by rcons_init(). */
+ int rc_maxrow; /* emulator height of screen */
+ int rc_maxcol; /* emulator width of screen */
+
+ /* Font information. Filled in by rcons_init(). */
+ struct raster_font *rc_font; /* font and related info */
+ int rc_font_ascent; /* distance from font to char origin */
+
+ /* Raster console state. Filled in by rcons_init(). */
+ u_int rc_bits; /* see defines below */
+ int rc_xorigin; /* x origin for first column */
+ int rc_yorigin; /* y origin for first row */
+ int rc_raswidth; /* raster width for row copies */
+ int rc_ras_blank; /* current screen blank raster op */
+
+ /* Internal cursor row and column. XXX Weird Sun cursor pointers. */
+ int rc_crow; /* internal cursror row */
+ int rc_ccol; /* ptr to cursror column */
+};
+
+#define RC_STANDOUT 0x001 /* standout mode */
+/* #define RC_BOLD 0x? /* boldface mode */
+#define RC_INVERT 0x002 /* inverted screen colors */
+#define RC_CURSOR 0x004 /* cursor currently displayed */
+
+/* Initialization functions. */
+void rcons_init __P((struct rcons *rc, int mrow, int mcol));
+
+/* Console emulation interface functions. See ansicons.h for more info. */
+void rcons_cursor __P((void *, int, int, int));
+void rcons_invert __P((void *, int));
+void rcons_putstr __P((void *, int, int, char *, int));
+void rcons_copycols __P((void *, int, int, int, int));
+void rcons_erasecols __P((void *, int, int, int));
+void rcons_copyrows __P((void *, int, int, int));
+void rcons_eraserows __P((void *, int, int));
+
+#endif /* _DEV_PSEUDO_RCONS_H_ */
diff --git a/sys/arch/alpha/wscons/wscons_rfont.h b/sys/arch/alpha/wscons/wscons_rfont.h
new file mode 100644
index 00000000000..c836524b372
--- /dev/null
+++ b/sys/arch/alpha/wscons/wscons_rfont.h
@@ -0,0 +1,1010 @@
+/* $NetBSD: wscons_rfont.h,v 1.1 1996/04/12 02:00:52 cgd Exp $ */
+
+/*
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to the Computer Systems
+ * Engineering Group at Lawrence Berkeley Laboratory and to the University
+ * of California at Berkeley by Jef Poskanzer.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)gallant19.h 8.1 (Berkeley) 6/11/93
+ */
+
+static u_int32_t gallant19_32_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x000018c0, 0x000003c0, 0x000030c0,
+ 0x000030c0, 0x00001ee0, 0x00000000, 0x00000000, 0x00002000, 0x0000e000,
+ 0x00006000, 0x00006fc0, 0x00006060, 0x00006060, 0x00007060, 0x00004f80,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_32 = { 12, 22, 1, 1, gallant19_32_pixels, 0 };
+
+static u_int32_t gallant19_33_pixels[] = {
+ 0x00000000,
+ 0x06000000, 0x06000000, 0x06000060, 0x06000060, 0x06000060, 0x060031e0,
+ 0x06006060, 0x06006060, 0x060070e0, 0x06001e70, 0x06000000, 0x00000000,
+ 0x00000000, 0x06000000, 0x06000000, 0x000030c0, 0x00006060, 0x00006000,
+ 0x00003000, 0x00000f80, 0x00000000
+};
+static struct raster gallant19_33 = { 12, 22, 1, 1, gallant19_33_pixels, 0 };
+
+static u_int32_t gallant19_34_pixels[] = {
+ 0x00000000,
+ 0x19800c00, 0x19801e00, 0x19800000, 0x19800000, 0x19800000, 0x19800000,
+ 0x00000000, 0x000031e0, 0x000060c0, 0x00003180, 0x00006000, 0x00003fe0,
+ 0x00004020, 0x00007fc0, 0x00001000, 0x00007000, 0x00003000, 0x000039c0,
+ 0x000030c0, 0x000030c0, 0x00000000
+};
+static struct raster gallant19_34 = { 12, 22, 1, 1, gallant19_34_pixels, 0 };
+
+static u_int32_t gallant19_35_pixels[] = {
+ 0x00000000,
+ 0x03300600, 0x03300600, 0x03300600, 0x06601f80, 0x1ff00000, 0x1ff00000,
+ 0x0cc00000, 0x0cc000c0, 0x19800000, 0x198000c0, 0x7fc000c0, 0x7fc000c0,
+ 0x330000c0, 0x660000c0, 0x660030c0, 0x00001f00, 0x00006000, 0x00006000,
+ 0x00006000, 0x00006300, 0x00000000
+};
+static struct raster gallant19_35 = { 12, 22, 1, 1, gallant19_35_pixels, 0 };
+
+static u_int32_t gallant19_36_pixels[] = {
+ 0x00000000,
+ 0x06000600, 0x1f800600, 0x3fc00600, 0x66e00600, 0x66600600, 0x66001f80,
+ 0x3e000000, 0x1f800000, 0x07c00000, 0x06600000, 0x06600000, 0x66606ee0,
+ 0x7fc06660, 0x3f806660, 0x06006660, 0x0000ef70, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_36 = { 12, 22, 1, 1, gallant19_36_pixels, 0 };
+
+static u_int32_t gallant19_37_pixels[] = {
+ 0x00000000,
+ 0x38600000, 0x44c00000, 0x44c00000, 0x458011c0, 0x39806060, 0x03006060,
+ 0x03007040, 0x06001f00, 0x0c000000, 0x0c000000, 0x19c00000, 0x1a200000,
+ 0x32200000, 0x322071c0, 0x61c06060, 0x00006060, 0x00006040, 0x00007f00,
+ 0x00006000, 0x00006000, 0x00000000
+};
+static struct raster gallant19_37 = { 12, 22, 1, 1, gallant19_37_pixels, 0 };
+
+static u_int32_t gallant19_38_pixels[] = {
+ 0x00000000,
+ 0x07000060, 0x0f800060, 0x18c00000, 0x18c00000, 0x18c00000, 0x0f8034c0,
+ 0x1e003000, 0x3e003000, 0x77003000, 0x63607800, 0x61e00000, 0x61c00000,
+ 0x61800000, 0x3fe00000, 0x1e600000, 0x000030c0, 0x00003800, 0x00000780,
+ 0x000020c0, 0x00003f80, 0x00000000
+};
+static struct raster gallant19_38 = { 12, 22, 1, 1, gallant19_38_pixels, 0 };
+
+static u_int32_t gallant19_39_pixels[] = {
+ 0x00000000,
+ 0x0c000c20, 0x1e000780, 0x1e000000, 0x06000000, 0x06000000, 0x0c000000,
+ 0x18000000, 0x100030c0, 0x000030c0, 0x000030c0, 0x000030c0, 0x00001e60,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00006020,
+ 0x00003040, 0x00001880, 0x00000000
+};
+static struct raster gallant19_39 = { 12, 22, 1, 1, gallant19_39_pixels, 0 };
+
+static u_int32_t gallant19_40_pixels[] = {
+ 0x00000000,
+ 0x00c06620, 0x01803b40, 0x03801980, 0x03001980, 0x07000000, 0x06000000,
+ 0x06000000, 0x06000000, 0x06000000, 0x06007040, 0x07001d00, 0x03000700,
+ 0x038011c0, 0x0180f1f0, 0x00c00000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00006020, 0x00000000
+};
+static struct raster gallant19_40 = { 12, 22, 1, 1, gallant19_40_pixels, 0 };
+
+static u_int32_t gallant19_41_pixels[] = {
+ 0x00000000,
+ 0x30000000, 0x180060e0, 0x1c000380, 0x0c000e00, 0x0e003820, 0x06007fe0,
+ 0x06000000, 0x06000000, 0x060001c0, 0x06000300, 0x0e000180, 0x0c000300,
+ 0x1c000300, 0x18000180, 0x30000300, 0x000001c0, 0x00000000, 0x00000000,
+ 0x00000600, 0x00000600, 0x00000000
+};
+static struct raster gallant19_41 = { 12, 22, 1, 1, gallant19_41_pixels, 0 };
+
+static u_int32_t gallant19_42_pixels[] = {
+ 0x00000000,
+ 0x00003800, 0x00000c00, 0x00001800, 0x00000c00, 0x0f000c00, 0x06001800,
+ 0x66600c00, 0x76e03800, 0x19800000, 0x00000000, 0x19800000, 0x76e00000,
+ 0x66600000, 0x06000000, 0x0f001c20, 0x000036c0, 0x00004380, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_42 = { 12, 22, 1, 1, gallant19_42_pixels, 0 };
+
+static u_int32_t gallant19_43_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x06000000,
+ 0x06000000, 0x06000000, 0x06000000, 0x7fe00000, 0x7fe00000, 0x06000000,
+ 0x06000000, 0x06000000, 0x06000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_43 = { 12, 22, 1, 1, gallant19_43_pixels, 0 };
+
+static u_int32_t gallant19_44_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x0c000000, 0x1e000000, 0x1e000000, 0x06000000, 0x06000000, 0x0c000000,
+ 0x18000000, 0x10000000, 0x00000000
+};
+static struct raster gallant19_44 = { 12, 22, 1, 1, gallant19_44_pixels, 0 };
+
+static u_int32_t gallant19_45_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x7fe00000, 0x7fe00000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_45 = { 12, 22, 1, 1, gallant19_45_pixels, 0 };
+
+static u_int32_t gallant19_46_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0c000000,
+ 0x1e000000, 0x1e000000, 0x0c000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_46 = { 12, 22, 1, 1, gallant19_46_pixels, 0 };
+
+static u_int32_t gallant19_47_pixels[] = {
+ 0x00000000,
+ 0x00600000, 0x00c00000, 0x00c00000, 0x01800000, 0x01800000, 0x03000000,
+ 0x03000000, 0x06000000, 0x0c000000, 0x0c000000, 0x18000000, 0x18000000,
+ 0x30000000, 0x30000000, 0x60000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_47 = { 12, 22, 1, 1, gallant19_47_pixels, 0 };
+
+static u_int32_t gallant19_48_pixels[] = {
+ 0x00000000,
+ 0x07000000, 0x0f800000, 0x11800000, 0x10c00000, 0x30c00000, 0x30c00000,
+ 0x30c00000, 0x30c00000, 0x30c00000, 0x30c00000, 0x30c00000, 0x30800000,
+ 0x18800000, 0x1f000000, 0x0e000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_48 = { 12, 22, 1, 1, gallant19_48_pixels, 0 };
+
+static u_int32_t gallant19_49_pixels[] = {
+ 0x00000000,
+ 0x02000000, 0x06000000, 0x0e000000, 0x1e000000, 0x36000000, 0x06000000,
+ 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000,
+ 0x06000000, 0x06000000, 0x3fc00000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_49 = { 12, 22, 1, 1, gallant19_49_pixels, 0 };
+
+static u_int32_t gallant19_50_pixels[] = {
+ 0x00000000,
+ 0x1f000000, 0x3f800000, 0x61c00000, 0x40c00000, 0x00c00000, 0x00c00000,
+ 0x00c00000, 0x01800000, 0x03000000, 0x06000000, 0x0c000000, 0x18000000,
+ 0x30200000, 0x7fe00000, 0x7fe00000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_50 = { 12, 22, 1, 1, gallant19_50_pixels, 0 };
+
+static u_int32_t gallant19_51_pixels[] = {
+ 0x00000000,
+ 0x0f800000, 0x1fc00000, 0x20e00000, 0x40600000, 0x00600000, 0x00e00000,
+ 0x07c00000, 0x0fc00000, 0x00e00000, 0x00600000, 0x00600000, 0x40600000,
+ 0x60400000, 0x3f800000, 0x1f000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_51 = { 12, 22, 1, 1, gallant19_51_pixels, 0 };
+
+static u_int32_t gallant19_52_pixels[] = {
+ 0x00000000,
+ 0x01800000, 0x03800000, 0x03800000, 0x05800000, 0x05800000, 0x09800000,
+ 0x09800000, 0x11800000, 0x11800000, 0x21800000, 0x3fe00000, 0x7fe00000,
+ 0x01800000, 0x01800000, 0x01800000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_52 = { 12, 22, 1, 1, gallant19_52_pixels, 0 };
+
+static u_int32_t gallant19_53_pixels[] = {
+ 0x00000000,
+ 0x0fc00000, 0x0fc00000, 0x10000000, 0x10000000, 0x20000000, 0x3f800000,
+ 0x31c00000, 0x00e00000, 0x00600000, 0x00600000, 0x00600000, 0x40600000,
+ 0x60600000, 0x30c00000, 0x1f800000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_53 = { 12, 22, 1, 1, gallant19_53_pixels, 0 };
+
+static u_int32_t gallant19_54_pixels[] = {
+ 0x00000000,
+ 0x07000000, 0x0c000000, 0x18000000, 0x30000000, 0x30000000, 0x60000000,
+ 0x67800000, 0x6fc00000, 0x70e00000, 0x60600000, 0x60600000, 0x60600000,
+ 0x70400000, 0x3f800000, 0x1f000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_54 = { 12, 22, 1, 1, gallant19_54_pixels, 0 };
+
+static u_int32_t gallant19_55_pixels[] = {
+ 0x00000000,
+ 0x1fe00000, 0x3fe00000, 0x60400000, 0x00400000, 0x00c00000, 0x00800000,
+ 0x00800000, 0x01800000, 0x01000000, 0x01000000, 0x03000000, 0x02000000,
+ 0x02000000, 0x06000000, 0x04000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_55 = { 12, 22, 1, 1, gallant19_55_pixels, 0 };
+
+static u_int32_t gallant19_56_pixels[] = {
+ 0x00000000,
+ 0x0f000000, 0x11800000, 0x30c00000, 0x30c00000, 0x30c00000, 0x18800000,
+ 0x0d000000, 0x06000000, 0x0b000000, 0x11800000, 0x30c00000, 0x30c00000,
+ 0x30c00000, 0x18800000, 0x0f000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_56 = { 12, 22, 1, 1, gallant19_56_pixels, 0 };
+
+static u_int32_t gallant19_57_pixels[] = {
+ 0x00000000,
+ 0x0f800000, 0x11c00000, 0x20e00000, 0x60600000, 0x60600000, 0x60600000,
+ 0x70e00000, 0x3f600000, 0x1e600000, 0x00600000, 0x00c00000, 0x00c00000,
+ 0x01800000, 0x07000000, 0x3c000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_57 = { 12, 22, 1, 1, gallant19_57_pixels, 0 };
+
+static u_int32_t gallant19_58_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0c000000,
+ 0x1e000000, 0x1e000000, 0x0c000000, 0x00000000, 0x00000000, 0x0c000000,
+ 0x1e000000, 0x1e000000, 0x0c000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_58 = { 12, 22, 1, 1, gallant19_58_pixels, 0 };
+
+static u_int32_t gallant19_59_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x0c000000, 0x1e000000, 0x1e000000, 0x0c000000, 0x00000000, 0x00000000,
+ 0x0c000000, 0x1e000000, 0x1e000000, 0x06000000, 0x06000000, 0x0c000000,
+ 0x18000000, 0x10000000, 0x00000000
+};
+static struct raster gallant19_59 = { 12, 22, 1, 1, gallant19_59_pixels, 0 };
+
+static u_int32_t gallant19_60_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00600000,
+ 0x01c00000, 0x07000000, 0x1e000000, 0x78000000, 0x78000000, 0x1e000000,
+ 0x07000000, 0x01c00000, 0x00600000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_60 = { 12, 22, 1, 1, gallant19_60_pixels, 0 };
+
+static u_int32_t gallant19_61_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x7fc00000, 0x7fc00000, 0x00000000, 0x00000000, 0x7fc00000,
+ 0x7fc00000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_61 = { 12, 22, 1, 1, gallant19_61_pixels, 0 };
+
+static u_int32_t gallant19_62_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x60000000,
+ 0x38000000, 0x1e000000, 0x07800000, 0x01e00000, 0x01e00000, 0x07800000,
+ 0x1e000000, 0x38000000, 0x60000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_62 = { 12, 22, 1, 1, gallant19_62_pixels, 0 };
+
+static u_int32_t gallant19_63_pixels[] = {
+ 0x00000000,
+ 0x0f000000, 0x1f800000, 0x39c00000, 0x20c00000, 0x00c00000, 0x00c00000,
+ 0x01800000, 0x03000000, 0x06000000, 0x0c000000, 0x0c000000, 0x00000000,
+ 0x00000000, 0x0c000000, 0x0c000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_63 = { 12, 22, 1, 1, gallant19_63_pixels, 0 };
+
+static u_int32_t gallant19_64_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x0f800000, 0x3fc00000, 0x30600000,
+ 0x60600000, 0x67200000, 0x6fa00000, 0x6ca00000, 0x6ca00000, 0x67e00000,
+ 0x60000000, 0x30000000, 0x3fe00000, 0x0fe00000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_64 = { 12, 22, 1, 1, gallant19_64_pixels, 0 };
+
+static u_int32_t gallant19_65_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x06000000, 0x06000000, 0x0b000000, 0x0b000000, 0x09000000,
+ 0x11800000, 0x11800000, 0x10800000, 0x3fc00000, 0x20c00000, 0x20400000,
+ 0x40600000, 0x40600000, 0xe0f00000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_65 = { 12, 22, 1, 1, gallant19_65_pixels, 0 };
+
+static u_int32_t gallant19_66_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0xff000000, 0x60800000, 0x60c00000, 0x60c00000, 0x60c00000,
+ 0x61800000, 0x7f800000, 0x60c00000, 0x60600000, 0x60600000, 0x60600000,
+ 0x60600000, 0x60c00000, 0xff800000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_66 = { 12, 22, 1, 1, gallant19_66_pixels, 0 };
+
+static u_int32_t gallant19_67_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x0fc00000, 0x10600000, 0x20200000, 0x20000000, 0x60000000,
+ 0x60000000, 0x60000000, 0x60000000, 0x60000000, 0x60000000, 0x20000000,
+ 0x30200000, 0x18400000, 0x0f800000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_67 = { 12, 22, 1, 1, gallant19_67_pixels, 0 };
+
+static u_int32_t gallant19_68_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0xff000000, 0x61c00000, 0x60c00000, 0x60600000, 0x60600000,
+ 0x60600000, 0x60600000, 0x60600000, 0x60600000, 0x60600000, 0x60600000,
+ 0x60400000, 0x61800000, 0xfe000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_68 = { 12, 22, 1, 1, gallant19_68_pixels, 0 };
+
+static u_int32_t gallant19_69_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x7fc00000, 0x30400000, 0x30400000, 0x30000000, 0x30000000,
+ 0x30800000, 0x3f800000, 0x30800000, 0x30000000, 0x30000000, 0x30000000,
+ 0x30200000, 0x30200000, 0x7fe00000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_69 = { 12, 22, 1, 1, gallant19_69_pixels, 0 };
+
+static u_int32_t gallant19_70_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x7fc00000, 0x30400000, 0x30400000, 0x30000000, 0x30000000,
+ 0x30800000, 0x3f800000, 0x30800000, 0x30000000, 0x30000000, 0x30000000,
+ 0x30000000, 0x30000000, 0x78000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_70 = { 12, 22, 1, 1, gallant19_70_pixels, 0 };
+
+static u_int32_t gallant19_71_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x0fc00000, 0x10600000, 0x20200000, 0x20000000, 0x60000000,
+ 0x60000000, 0x60000000, 0x60000000, 0x61f00000, 0x60600000, 0x20600000,
+ 0x30600000, 0x18600000, 0x0f800000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_71 = { 12, 22, 1, 1, gallant19_71_pixels, 0 };
+
+static u_int32_t gallant19_72_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0xf0f00000, 0x60600000, 0x60600000, 0x60600000, 0x60600000,
+ 0x60600000, 0x7fe00000, 0x60600000, 0x60600000, 0x60600000, 0x60600000,
+ 0x60600000, 0x60600000, 0xf0f00000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_72 = { 12, 22, 1, 1, gallant19_72_pixels, 0 };
+
+static u_int32_t gallant19_73_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x1f800000, 0x06000000, 0x06000000, 0x06000000, 0x06000000,
+ 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000,
+ 0x06000000, 0x06000000, 0x1f800000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_73 = { 12, 22, 1, 1, gallant19_73_pixels, 0 };
+
+static u_int32_t gallant19_74_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x1f800000, 0x06000000, 0x06000000, 0x06000000, 0x06000000,
+ 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000,
+ 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x04000000,
+ 0x38000000, 0x30000000, 0x00000000
+};
+static struct raster gallant19_74 = { 12, 22, 1, 1, gallant19_74_pixels, 0 };
+
+static u_int32_t gallant19_75_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0xf0e00000, 0x61800000, 0x63000000, 0x66000000, 0x6c000000,
+ 0x78000000, 0x78000000, 0x7c000000, 0x6e000000, 0x67000000, 0x63800000,
+ 0x61c00000, 0x60e00000, 0xf0700000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_75 = { 12, 22, 1, 1, gallant19_75_pixels, 0 };
+
+static u_int32_t gallant19_76_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x78000000, 0x30000000, 0x30000000, 0x30000000, 0x30000000,
+ 0x30000000, 0x30000000, 0x30000000, 0x30000000, 0x30000000, 0x30000000,
+ 0x30200000, 0x30200000, 0x7fe00000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_76 = { 12, 22, 1, 1, gallant19_76_pixels, 0 };
+
+static u_int32_t gallant19_77_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0xe0700000, 0x60e00000, 0x70e00000, 0x70e00000, 0x70e00000,
+ 0x59600000, 0x59600000, 0x59600000, 0x4d600000, 0x4e600000, 0x4e600000,
+ 0x44600000, 0x44600000, 0xe4f00000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_77 = { 12, 22, 1, 1, gallant19_77_pixels, 0 };
+
+static u_int32_t gallant19_78_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0xc0700000, 0x60200000, 0x70200000, 0x78200000, 0x58200000,
+ 0x4c200000, 0x46200000, 0x47200000, 0x43200000, 0x41a00000, 0x40e00000,
+ 0x40e00000, 0x40600000, 0xe0300000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_78 = { 12, 22, 1, 1, gallant19_78_pixels, 0 };
+
+static u_int32_t gallant19_79_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x0f000000, 0x11c00000, 0x20c00000, 0x20600000, 0x60600000,
+ 0x60600000, 0x60600000, 0x60600000, 0x60600000, 0x60600000, 0x20400000,
+ 0x30400000, 0x18800000, 0x0f000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_79 = { 12, 22, 1, 1, gallant19_79_pixels, 0 };
+
+static u_int32_t gallant19_80_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x7f800000, 0x30c00000, 0x30600000, 0x30600000, 0x30600000,
+ 0x30c00000, 0x37800000, 0x30000000, 0x30000000, 0x30000000, 0x30000000,
+ 0x30000000, 0x30000000, 0x78000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_80 = { 12, 22, 1, 1, gallant19_80_pixels, 0 };
+
+static u_int32_t gallant19_81_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x0f000000, 0x11c00000, 0x20c00000, 0x20600000, 0x60600000,
+ 0x60600000, 0x60600000, 0x60600000, 0x60600000, 0x60600000, 0x30400000,
+ 0x38400000, 0x1f800000, 0x0e000000, 0x1f000000, 0x23900000, 0x01e00000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_81 = { 12, 22, 1, 1, gallant19_81_pixels, 0 };
+
+static u_int32_t gallant19_82_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0xff000000, 0x61800000, 0x60c00000, 0x60c00000, 0x60c00000,
+ 0x60800000, 0x7f000000, 0x7c000000, 0x6e000000, 0x67000000, 0x63800000,
+ 0x61c00000, 0x60e00000, 0xf0700000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_82 = { 12, 22, 1, 1, gallant19_82_pixels, 0 };
+
+static u_int32_t gallant19_83_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x1fe00000, 0x30600000, 0x60200000, 0x60200000, 0x70000000,
+ 0x3c000000, 0x1e000000, 0x07800000, 0x01c00000, 0x00e00000, 0x40600000,
+ 0x40600000, 0x60c00000, 0x7f800000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_83 = { 12, 22, 1, 1, gallant19_83_pixels, 0 };
+
+static u_int32_t gallant19_84_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x7fe00000, 0x46200000, 0x06000000, 0x06000000, 0x06000000,
+ 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000,
+ 0x06000000, 0x06000000, 0x1f800000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_84 = { 12, 22, 1, 1, gallant19_84_pixels, 0 };
+
+static u_int32_t gallant19_85_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0xf0700000, 0x60200000, 0x60200000, 0x60200000, 0x60200000,
+ 0x60200000, 0x60200000, 0x60200000, 0x60200000, 0x60200000, 0x60200000,
+ 0x70400000, 0x3fc00000, 0x1f800000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_85 = { 12, 22, 1, 1, gallant19_85_pixels, 0 };
+
+static u_int32_t gallant19_86_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0xe0e00000, 0x60400000, 0x30800000, 0x30800000, 0x30800000,
+ 0x19000000, 0x19000000, 0x19000000, 0x0c000000, 0x0e000000, 0x0e000000,
+ 0x04000000, 0x04000000, 0x04000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_86 = { 12, 22, 1, 1, gallant19_86_pixels, 0 };
+
+static u_int32_t gallant19_87_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0xfef00000, 0x66200000, 0x66200000, 0x66200000, 0x76200000,
+ 0x77400000, 0x33400000, 0x37400000, 0x3bc00000, 0x3b800000, 0x19800000,
+ 0x19800000, 0x19800000, 0x19800000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_87 = { 12, 22, 1, 1, gallant19_87_pixels, 0 };
+
+static u_int32_t gallant19_88_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0xf0700000, 0x60200000, 0x30400000, 0x38800000, 0x18800000,
+ 0x0d000000, 0x06000000, 0x06000000, 0x0b000000, 0x11800000, 0x11c00000,
+ 0x20c00000, 0x40600000, 0xe0f00000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_88 = { 12, 22, 1, 1, gallant19_88_pixels, 0 };
+
+static u_int32_t gallant19_89_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0xf0700000, 0x60200000, 0x30400000, 0x18800000, 0x18800000,
+ 0x0d000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000,
+ 0x06000000, 0x06000000, 0x0f000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_89 = { 12, 22, 1, 1, gallant19_89_pixels, 0 };
+
+static u_int32_t gallant19_90_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x3fe00000, 0x20c00000, 0x00c00000, 0x01800000, 0x01800000,
+ 0x03000000, 0x03000000, 0x06000000, 0x06000000, 0x0c000000, 0x0c000000,
+ 0x18000000, 0x18200000, 0x3fe00000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_90 = { 12, 22, 1, 1, gallant19_90_pixels, 0 };
+
+static u_int32_t gallant19_91_pixels[] = {
+ 0x00000000,
+ 0x07c00000, 0x07c00000, 0x06000000, 0x06000000, 0x06000000, 0x06000000,
+ 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000,
+ 0x06000000, 0x07c00000, 0x07c00000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_91 = { 12, 22, 1, 1, gallant19_91_pixels, 0 };
+
+static u_int32_t gallant19_92_pixels[] = {
+ 0x00000000,
+ 0x60000000, 0x60000000, 0x30000000, 0x30000000, 0x18000000, 0x18000000,
+ 0x0c000000, 0x0c000000, 0x06000000, 0x03000000, 0x03000000, 0x01800000,
+ 0x01800000, 0x00c00000, 0x00c00000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_92 = { 12, 22, 1, 1, gallant19_92_pixels, 0 };
+
+static u_int32_t gallant19_93_pixels[] = {
+ 0x00000000,
+ 0x7c000000, 0x7c000000, 0x0c000000, 0x0c000000, 0x0c000000, 0x0c000000,
+ 0x0c000000, 0x0c000000, 0x0c000000, 0x0c000000, 0x0c000000, 0x0c000000,
+ 0x0c000000, 0x7c000000, 0x7c000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_93 = { 12, 22, 1, 1, gallant19_93_pixels, 0 };
+
+static u_int32_t gallant19_94_pixels[] = {
+ 0x00000000,
+ 0x04000000, 0x0e000000, 0x1b000000, 0x31800000, 0x60c00000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_94 = { 12, 22, 1, 1, gallant19_94_pixels, 0 };
+
+static u_int32_t gallant19_95_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xfff00000, 0xfff00000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_95 = { 12, 22, 1, 1, gallant19_95_pixels, 0 };
+
+static u_int32_t gallant19_96_pixels[] = {
+ 0x00000000,
+ 0x01000000, 0x03000000, 0x06000000, 0x06000000, 0x07800000, 0x07800000,
+ 0x03000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_96 = { 12, 22, 1, 1, gallant19_96_pixels, 0 };
+
+static u_int32_t gallant19_97_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0f800000,
+ 0x18c00000, 0x10c00000, 0x03c00000, 0x1cc00000, 0x30c00000, 0x30c00000,
+ 0x30c00000, 0x39c00000, 0x1ee00000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_97 = { 12, 22, 1, 1, gallant19_97_pixels, 0 };
+
+static u_int32_t gallant19_98_pixels[] = {
+ 0x00000000,
+ 0x20000000, 0x60000000, 0xe0000000, 0x60000000, 0x60000000, 0x67800000,
+ 0x6fc00000, 0x70e00000, 0x60600000, 0x60600000, 0x60600000, 0x60600000,
+ 0x70600000, 0x78c00000, 0x4f800000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_98 = { 12, 22, 1, 1, gallant19_98_pixels, 0 };
+
+static u_int32_t gallant19_99_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x1f800000,
+ 0x31c00000, 0x20c00000, 0x60000000, 0x60000000, 0x60000000, 0x60000000,
+ 0x70400000, 0x30c00000, 0x1f800000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_99 = { 12, 22, 1, 1, gallant19_99_pixels, 0 };
+
+static u_int32_t gallant19_100_pixels[] = {
+ 0x00000000,
+ 0x00600000, 0x00e00000, 0x00600000, 0x00600000, 0x00600000, 0x0f600000,
+ 0x31e00000, 0x20e00000, 0x60600000, 0x60600000, 0x60600000, 0x60600000,
+ 0x70e00000, 0x39600000, 0x1e700000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_100 = { 12, 22, 1, 1, gallant19_100_pixels, 0 };
+
+static u_int32_t gallant19_101_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0f000000,
+ 0x30c00000, 0x60600000, 0x60600000, 0x7fe00000, 0x60000000, 0x60000000,
+ 0x30000000, 0x18600000, 0x0f800000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_101 = { 12, 22, 1, 1, gallant19_101_pixels, 0 };
+
+static u_int32_t gallant19_102_pixels[] = {
+ 0x00000000,
+ 0x03800000, 0x04c00000, 0x04c00000, 0x0c000000, 0x0c000000, 0x0c000000,
+ 0x0c000000, 0x1f800000, 0x0c000000, 0x0c000000, 0x0c000000, 0x0c000000,
+ 0x0c000000, 0x0c000000, 0x1e000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_102 = { 12, 22, 1, 1, gallant19_102_pixels, 0 };
+
+static u_int32_t gallant19_103_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x1f200000,
+ 0x31e00000, 0x60c00000, 0x60c00000, 0x60c00000, 0x31800000, 0x3f000000,
+ 0x60000000, 0x7fc00000, 0x3fe00000, 0x20600000, 0x40200000, 0x40200000,
+ 0x7fc00000, 0x3f800000, 0x00000000
+};
+static struct raster gallant19_103 = { 12, 22, 1, 1, gallant19_103_pixels, 0 };
+
+static u_int32_t gallant19_104_pixels[] = {
+ 0x00000000,
+ 0x10000000, 0x30000000, 0x70000000, 0x30000000, 0x30000000, 0x37800000,
+ 0x39c00000, 0x30c00000, 0x30c00000, 0x30c00000, 0x30c00000, 0x30c00000,
+ 0x30c00000, 0x30c00000, 0x79e00000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_104 = { 12, 22, 1, 1, gallant19_104_pixels, 0 };
+
+static u_int32_t gallant19_105_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x06000000, 0x06000000, 0x00000000, 0x00000000, 0x1e000000,
+ 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000,
+ 0x06000000, 0x06000000, 0x1f800000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_105 = { 12, 22, 1, 1, gallant19_105_pixels, 0 };
+
+static u_int32_t gallant19_106_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00c00000, 0x00c00000, 0x00000000, 0x00000000, 0x03c00000,
+ 0x00c00000, 0x00c00000, 0x00c00000, 0x00c00000, 0x00c00000, 0x00c00000,
+ 0x00c00000, 0x00c00000, 0x00c00000, 0x20c00000, 0x30c00000, 0x38800000,
+ 0x1f000000, 0x0e000000, 0x00000000
+};
+static struct raster gallant19_106 = { 12, 22, 1, 1, gallant19_106_pixels, 0 };
+
+static u_int32_t gallant19_107_pixels[] = {
+ 0x00000000,
+ 0x60000000, 0xe0000000, 0x60000000, 0x60000000, 0x60000000, 0x61c00000,
+ 0x63000000, 0x66000000, 0x7c000000, 0x78000000, 0x7c000000, 0x6e000000,
+ 0x67000000, 0x63800000, 0xf1e00000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_107 = { 12, 22, 1, 1, gallant19_107_pixels, 0 };
+
+static u_int32_t gallant19_108_pixels[] = {
+ 0x00000000,
+ 0x1e000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000,
+ 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000,
+ 0x06000000, 0x06000000, 0x1f800000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_108 = { 12, 22, 1, 1, gallant19_108_pixels, 0 };
+
+static u_int32_t gallant19_109_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xddc00000,
+ 0x6ee00000, 0x66600000, 0x66600000, 0x66600000, 0x66600000, 0x66600000,
+ 0x66600000, 0x66600000, 0xef700000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_109 = { 12, 22, 1, 1, gallant19_109_pixels, 0 };
+
+static u_int32_t gallant19_110_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x27800000,
+ 0x79c00000, 0x30c00000, 0x30c00000, 0x30c00000, 0x30c00000, 0x30c00000,
+ 0x30c00000, 0x30c00000, 0x79e00000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_110 = { 12, 22, 1, 1, gallant19_110_pixels, 0 };
+
+static u_int32_t gallant19_111_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0f800000,
+ 0x11c00000, 0x20e00000, 0x60600000, 0x60600000, 0x60600000, 0x60600000,
+ 0x70400000, 0x38800000, 0x1f000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_111 = { 12, 22, 1, 1, gallant19_111_pixels, 0 };
+
+static u_int32_t gallant19_112_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xef800000,
+ 0x71c00000, 0x60e00000, 0x60600000, 0x60600000, 0x60600000, 0x60600000,
+ 0x60400000, 0x70800000, 0x7f000000, 0x60000000, 0x60000000, 0x60000000,
+ 0x60000000, 0xf0000000, 0x00000000
+};
+static struct raster gallant19_112 = { 12, 22, 1, 1, gallant19_112_pixels, 0 };
+
+static u_int32_t gallant19_113_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0f200000,
+ 0x11e00000, 0x20e00000, 0x60600000, 0x60600000, 0x60600000, 0x60600000,
+ 0x70600000, 0x38e00000, 0x1fe00000, 0x00600000, 0x00600000, 0x00600000,
+ 0x00600000, 0x00f00000, 0x00000000
+};
+static struct raster gallant19_113 = { 12, 22, 1, 1, gallant19_113_pixels, 0 };
+
+static u_int32_t gallant19_114_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x73800000,
+ 0x34c00000, 0x38c00000, 0x30000000, 0x30000000, 0x30000000, 0x30000000,
+ 0x30000000, 0x30000000, 0x78000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_114 = { 12, 22, 1, 1, gallant19_114_pixels, 0 };
+
+static u_int32_t gallant19_115_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x1fc00000,
+ 0x30c00000, 0x30400000, 0x38000000, 0x1e000000, 0x07800000, 0x01c00000,
+ 0x20c00000, 0x30c00000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_115 = { 12, 22, 1, 1, gallant19_115_pixels, 0 };
+
+static u_int32_t gallant19_116_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x04000000, 0x04000000, 0x0c000000, 0x7fc00000,
+ 0x0c000000, 0x0c000000, 0x0c000000, 0x0c000000, 0x0c000000, 0x0c000000,
+ 0x0c200000, 0x0e400000, 0x07800000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_116 = { 12, 22, 1, 1, gallant19_116_pixels, 0 };
+
+static u_int32_t gallant19_117_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x79e00000,
+ 0x30c00000, 0x30c00000, 0x30c00000, 0x30c00000, 0x30c00000, 0x30c00000,
+ 0x30c00000, 0x39c00000, 0x1e600000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_117 = { 12, 22, 1, 1, gallant19_117_pixels, 0 };
+
+static u_int32_t gallant19_118_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xf0700000,
+ 0x60200000, 0x30400000, 0x30400000, 0x18800000, 0x18800000, 0x0d000000,
+ 0x0d000000, 0x06000000, 0x06000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_118 = { 12, 22, 1, 1, gallant19_118_pixels, 0 };
+
+static u_int32_t gallant19_119_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff700000,
+ 0x66200000, 0x66200000, 0x66200000, 0x37400000, 0x3b400000, 0x3b400000,
+ 0x19800000, 0x19800000, 0x19800000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_119 = { 12, 22, 1, 1, gallant19_119_pixels, 0 };
+
+static u_int32_t gallant19_120_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xf8f00000,
+ 0x70400000, 0x38800000, 0x1d000000, 0x0e000000, 0x07000000, 0x0b800000,
+ 0x11c00000, 0x20e00000, 0xf1f00000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_120 = { 12, 22, 1, 1, gallant19_120_pixels, 0 };
+
+static u_int32_t gallant19_121_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xf0f00000,
+ 0x60200000, 0x30400000, 0x30400000, 0x18800000, 0x18800000, 0x0d000000,
+ 0x0d000000, 0x06000000, 0x06000000, 0x04000000, 0x0c000000, 0x08000000,
+ 0x78000000, 0x70000000, 0x00000000
+};
+static struct raster gallant19_121 = { 12, 22, 1, 1, gallant19_121_pixels, 0 };
+
+static u_int32_t gallant19_122_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7fe00000,
+ 0x60e00000, 0x41c00000, 0x03800000, 0x07000000, 0x0e000000, 0x1c000000,
+ 0x38200000, 0x70600000, 0x7fe00000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_122 = { 12, 22, 1, 1, gallant19_122_pixels, 0 };
+
+static u_int32_t gallant19_123_pixels[] = {
+ 0x00000000,
+ 0x01c00000, 0x03000000, 0x03000000, 0x01800000, 0x01800000, 0x01800000,
+ 0x03000000, 0x07000000, 0x03000000, 0x01800000, 0x01800000, 0x01800000,
+ 0x03000000, 0x03000000, 0x01c00000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_123 = { 12, 22, 1, 1, gallant19_123_pixels, 0 };
+
+static u_int32_t gallant19_124_pixels[] = {
+ 0x00000000,
+ 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000,
+ 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000,
+ 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000,
+ 0x06000000, 0x06000000, 0x00000000
+};
+static struct raster gallant19_124 = { 12, 22, 1, 1, gallant19_124_pixels, 0 };
+
+static u_int32_t gallant19_125_pixels[] = {
+ 0x00000000,
+ 0x38000000, 0x0c000000, 0x0c000000, 0x18000000, 0x18000000, 0x18000000,
+ 0x0c000000, 0x0e000000, 0x0c000000, 0x18000000, 0x18000000, 0x18000000,
+ 0x0c000000, 0x0c000000, 0x38000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_125 = { 12, 22, 1, 1, gallant19_125_pixels, 0 };
+
+static u_int32_t gallant19_126_pixels[] = {
+ 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x1c200000, 0x3e600000, 0x36c00000, 0x67c00000,
+ 0x43800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000
+};
+static struct raster gallant19_126 = { 12, 22, 1, 1, gallant19_126_pixels, 0 };
+
+#define null2 {0}, {0}
+#define null4 null2, null2
+#define null8 null4, null4
+#define null16 null8, null8
+#define null32 null16, null16
+#define null64 null32, null32
+#define null128 null64, null64
+
+struct raster_font gallant19 = {
+ 12, 22, 15, RASFONT_FIXEDWIDTH|RASFONT_NOVERTICALMOVEMENT,
+ {
+ null32,
+ { &gallant19_32, 0, -15, 12, 0 },
+ { &gallant19_33, 0, -15, 12, 0 },
+ { &gallant19_34, 0, -15, 12, 0 },
+ { &gallant19_35, 0, -15, 12, 0 },
+ { &gallant19_36, 0, -15, 12, 0 },
+ { &gallant19_37, 0, -15, 12, 0 },
+ { &gallant19_38, 0, -15, 12, 0 },
+ { &gallant19_39, 0, -15, 12, 0 },
+ { &gallant19_40, 0, -15, 12, 0 },
+ { &gallant19_41, 0, -15, 12, 0 },
+ { &gallant19_42, 0, -15, 12, 0 },
+ { &gallant19_43, 0, -15, 12, 0 },
+ { &gallant19_44, 0, -15, 12, 0 },
+ { &gallant19_45, 0, -15, 12, 0 },
+ { &gallant19_46, 0, -15, 12, 0 },
+ { &gallant19_47, 0, -15, 12, 0 },
+ { &gallant19_48, 0, -15, 12, 0 },
+ { &gallant19_49, 0, -15, 12, 0 },
+ { &gallant19_50, 0, -15, 12, 0 },
+ { &gallant19_51, 0, -15, 12, 0 },
+ { &gallant19_52, 0, -15, 12, 0 },
+ { &gallant19_53, 0, -15, 12, 0 },
+ { &gallant19_54, 0, -15, 12, 0 },
+ { &gallant19_55, 0, -15, 12, 0 },
+ { &gallant19_56, 0, -15, 12, 0 },
+ { &gallant19_57, 0, -15, 12, 0 },
+ { &gallant19_58, 0, -15, 12, 0 },
+ { &gallant19_59, 0, -15, 12, 0 },
+ { &gallant19_60, 0, -15, 12, 0 },
+ { &gallant19_61, 0, -15, 12, 0 },
+ { &gallant19_62, 0, -15, 12, 0 },
+ { &gallant19_63, 0, -15, 12, 0 },
+ { &gallant19_64, 0, -15, 12, 0 },
+ { &gallant19_65, 0, -15, 12, 0 },
+ { &gallant19_66, 0, -15, 12, 0 },
+ { &gallant19_67, 0, -15, 12, 0 },
+ { &gallant19_68, 0, -15, 12, 0 },
+ { &gallant19_69, 0, -15, 12, 0 },
+ { &gallant19_70, 0, -15, 12, 0 },
+ { &gallant19_71, 0, -15, 12, 0 },
+ { &gallant19_72, 0, -15, 12, 0 },
+ { &gallant19_73, 0, -15, 12, 0 },
+ { &gallant19_74, 0, -15, 12, 0 },
+ { &gallant19_75, 0, -15, 12, 0 },
+ { &gallant19_76, 0, -15, 12, 0 },
+ { &gallant19_77, 0, -15, 12, 0 },
+ { &gallant19_78, 0, -15, 12, 0 },
+ { &gallant19_79, 0, -15, 12, 0 },
+ { &gallant19_80, 0, -15, 12, 0 },
+ { &gallant19_81, 0, -15, 12, 0 },
+ { &gallant19_82, 0, -15, 12, 0 },
+ { &gallant19_83, 0, -15, 12, 0 },
+ { &gallant19_84, 0, -15, 12, 0 },
+ { &gallant19_85, 0, -15, 12, 0 },
+ { &gallant19_86, 0, -15, 12, 0 },
+ { &gallant19_87, 0, -15, 12, 0 },
+ { &gallant19_88, 0, -15, 12, 0 },
+ { &gallant19_89, 0, -15, 12, 0 },
+ { &gallant19_90, 0, -15, 12, 0 },
+ { &gallant19_91, 0, -15, 12, 0 },
+ { &gallant19_92, 0, -15, 12, 0 },
+ { &gallant19_93, 0, -15, 12, 0 },
+ { &gallant19_94, 0, -15, 12, 0 },
+ { &gallant19_95, 0, -15, 12, 0 },
+ { &gallant19_96, 0, -15, 12, 0 },
+ { &gallant19_97, 0, -15, 12, 0 },
+ { &gallant19_98, 0, -15, 12, 0 },
+ { &gallant19_99, 0, -15, 12, 0 },
+ { &gallant19_100, 0, -15, 12, 0 },
+ { &gallant19_101, 0, -15, 12, 0 },
+ { &gallant19_102, 0, -15, 12, 0 },
+ { &gallant19_103, 0, -15, 12, 0 },
+ { &gallant19_104, 0, -15, 12, 0 },
+ { &gallant19_105, 0, -15, 12, 0 },
+ { &gallant19_106, 0, -15, 12, 0 },
+ { &gallant19_107, 0, -15, 12, 0 },
+ { &gallant19_108, 0, -15, 12, 0 },
+ { &gallant19_109, 0, -15, 12, 0 },
+ { &gallant19_110, 0, -15, 12, 0 },
+ { &gallant19_111, 0, -15, 12, 0 },
+ { &gallant19_112, 0, -15, 12, 0 },
+ { &gallant19_113, 0, -15, 12, 0 },
+ { &gallant19_114, 0, -15, 12, 0 },
+ { &gallant19_115, 0, -15, 12, 0 },
+ { &gallant19_116, 0, -15, 12, 0 },
+ { &gallant19_117, 0, -15, 12, 0 },
+ { &gallant19_118, 0, -15, 12, 0 },
+ { &gallant19_119, 0, -15, 12, 0 },
+ { &gallant19_120, 0, -15, 12, 0 },
+ { &gallant19_121, 0, -15, 12, 0 },
+ { &gallant19_122, 0, -15, 12, 0 },
+ { &gallant19_123, 0, -15, 12, 0 },
+ { &gallant19_124, 0, -15, 12, 0 },
+ { &gallant19_125, 0, -15, 12, 0 },
+ { &gallant19_126, 0, -15, 12, 0 },
+ { 0 },
+ null128
+ },
+#ifdef COLORFONT_CACHE
+ (struct raster_fontcache*) -1
+#endif /*COLORFONT_CACHE*/
+};
diff --git a/sys/arch/alpha/wscons/wscons_rinit.c b/sys/arch/alpha/wscons/wscons_rinit.c
new file mode 100644
index 00000000000..7b7348a3746
--- /dev/null
+++ b/sys/arch/alpha/wscons/wscons_rinit.c
@@ -0,0 +1,134 @@
+/* $NetBSD: wscons_rinit.c,v 1.1 1996/04/12 02:00:54 cgd Exp $ */
+
+/*
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This software was developed by the Computer Systems Engineering group
+ * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+ * contributed to Berkeley.
+ *
+ * All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Lawrence Berkeley Laboratory.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)rcons_font.c 8.1 (Berkeley) 6/11/93
+ */
+
+#include <sys/param.h>
+#include <sys/kernel.h>
+#include <sys/device.h>
+
+#include <dev/rcons/raster.h>
+#include <alpha/wscons/wscons_raster.h>
+
+#include <alpha/wscons/wscons_rfont.h>
+
+void
+rcons_initfont(rc, fp)
+ struct rcons *rc;
+ struct raster_font *fp;
+{
+ static int initfontdone;
+
+ rc->rc_font = fp;
+
+ /* Get distance to top and bottom of font from font origin */
+ rc->rc_font_ascent = -(rc->rc_font->chars)['a'].homey;
+
+#if !defined(MSBYTE_FIRST) && !defined(MSBIT_FIRST) /* XXX other cases */
+ /* swap byte order on font data. ick. */
+ if (!initfontdone) {
+ int ch, i, n, bit;
+ u_int32_t *pix, npix;
+
+ for (ch = 0; ch < 256; ch++) {
+ if (rc->rc_font->chars[ch].r == 0)
+ continue;
+
+ n = rc->rc_font->chars[ch].r->linelongs *
+ rc->rc_font->chars[ch].r->height;
+ pix = rc->rc_font->chars[ch].r->pixels;
+
+ for (i = 0; i < n; i++) {
+ npix = 0;
+ for (bit = 0; bit < 32; bit++)
+ if (pix[i] & (1 << bit))
+ npix |= (1 << (31 - bit));
+ pix[i] = npix;
+ }
+ }
+ }
+#endif
+
+ initfontdone = 1;
+}
+
+void
+rcons_init(rc, mrow, mcol)
+ struct rcons *rc;
+ int mrow, mcol;
+{
+ struct raster *rp = rc->rc_sp;
+ int i;
+
+ rcons_initfont(rc, &gallant19);
+
+ i = rp->height / rc->rc_font->height;
+ rc->rc_maxrow = min(i, mrow);
+
+ i = rp->width / rc->rc_font->width;
+ rc->rc_maxcol = min(i, mcol);
+
+ /* Center emulator screen (but align x origin to 32 bits) */
+ rc->rc_xorigin =
+ ((rp->width - rc->rc_maxcol * rc->rc_font->width) / 2) & ~0x1f;
+ rc->rc_yorigin =
+ (rp->height - rc->rc_maxrow * rc->rc_font->height) / 2;
+
+ /* Raster width used for row copies */
+ rc->rc_raswidth = rc->rc_maxcol * rc->rc_font->width;
+ if (rc->rc_raswidth & 0x1f) {
+ /* Pad to 32 bits */
+ i = (rc->rc_raswidth + 0x1f) & ~0x1f;
+ /* Make sure width isn't too wide */
+ if (rc->rc_xorigin + i <= rp->width)
+ rc->rc_raswidth = i;
+ }
+
+ rc->rc_ras_blank = RAS_CLEAR;
+ rc->rc_bits = 0;
+
+ /* If cursor position given, assume it's there and drawn. */
+ if (*rc->rc_crowp != -1 && *rc->rc_ccolp != -1)
+ rc->rc_bits |= RC_CURSOR;
+}
diff --git a/sys/arch/alpha/wscons/wscons_rops.c b/sys/arch/alpha/wscons/wscons_rops.c
new file mode 100644
index 00000000000..f571bf184d3
--- /dev/null
+++ b/sys/arch/alpha/wscons/wscons_rops.c
@@ -0,0 +1,217 @@
+/* $NetBSD: wscons_rops.c,v 1.1 1996/04/12 02:00:55 cgd Exp $ */
+
+/*
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This software was developed by the Computer Systems Engineering group
+ * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+ * contributed to Berkeley.
+ *
+ * All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Lawrence Berkeley Laboratory.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)rcons_subr.c 8.1 (Berkeley) 6/11/93
+ */
+
+#include <sys/param.h>
+#include <sys/device.h>
+
+#include <dev/rcons/raster.h>
+#include <alpha/wscons/wscons_raster.h>
+
+/*
+ * Paint (or unpaint) the cursor.
+ * Pays no lip service to hardware cursors.
+ */
+void
+rcons_cursor(id, on, row, col)
+ void *id;
+ int on, row, col;
+{
+ register struct rcons *rc = id;
+ register int x, y;
+
+ /* turn the cursor off */
+ if (!on) {
+ /* make sure it's on */
+ if ((rc->rc_bits & RC_CURSOR) == 0)
+ return;
+
+ row = *rc->rc_crowp;
+ col = *rc->rc_ccolp;
+ } else {
+ /* unpaint the old copy. */
+ *rc->rc_crowp = row;
+ *rc->rc_ccolp = col;
+ }
+
+ x = col * rc->rc_font->width + rc->rc_xorigin;
+ y = row * rc->rc_font->height + rc->rc_yorigin;
+
+ raster_op(rc->rc_sp, x, y,
+#ifdef notdef
+ /* XXX This is the right way but too slow */
+ rc->rc_font->chars[(int)' '].r->width,
+ rc->rc_font->chars[(int)' '].r->height,
+#else
+ rc->rc_font->width, rc->rc_font->height,
+#endif
+ RAS_INVERT,
+ (struct raster *) 0, 0, 0);
+
+ rc->rc_bits ^= RC_CURSOR;
+}
+
+/*
+ * Actually write a string to the frame buffer.
+ */
+void
+rcons_putstr(id, row, col, str, n)
+ void *id;
+ int row, col, n;
+ char *str;
+{
+ struct rcons *rc = id;
+ register int x, y, op;
+
+ x = col * rc->rc_font->width + rc->rc_xorigin;
+ y = row * rc->rc_font->height + rc->rc_font_ascent + rc->rc_yorigin;
+
+ op = RAS_SRC;
+ if (((rc->rc_bits & RC_STANDOUT) != 0) ^
+ ((rc->rc_bits & RC_INVERT) != 0))
+ op = RAS_NOT(op);
+ raster_textn(rc->rc_sp, x, y, op, rc->rc_font, str, n);
+}
+
+/*
+ * Possibly change to white-on-black or black-on-white modes.
+ */
+void
+rcons_invert(id, inverted)
+ void *id;
+ int inverted;
+{
+ struct rcons *rc = id;
+
+ if (((rc->rc_bits & RC_INVERT) != 0) ^ inverted) {
+ /* Invert the display */
+ raster_op(rc->rc_sp, 0, 0, rc->rc_sp->width, rc->rc_sp->height,
+ RAS_INVERT, (struct raster *) 0, 0, 0);
+
+ /* Swap things around */
+ rc->rc_ras_blank = RAS_NOT(rc->rc_ras_blank);
+ rc->rc_bits ^= RC_INVERT;
+ }
+}
+
+/*
+ * Copy columns (characters) in a row (line).
+ */
+void
+rcons_copycols(id, row, srccol, dstcol, ncols)
+ void *id;
+ int row, srccol, dstcol, ncols;
+{
+ struct rcons *rc = id;
+ int y, srcx, dstx, nx;
+
+ y = rc->rc_yorigin + rc->rc_font->height * row;
+ srcx = rc->rc_xorigin + rc->rc_font->width * srccol;
+ dstx = rc->rc_xorigin + rc->rc_font->width * dstcol;
+ nx = rc->rc_font->width * ncols;
+
+ raster_op(rc->rc_sp, dstx, y,
+ nx, rc->rc_font->height, RAS_SRC,
+ rc->rc_sp, srcx, y);
+}
+
+/*
+ * Clear columns (characters) in a row (line).
+ */
+void
+rcons_erasecols(id, row, startcol, ncols)
+ void *id;
+ int row, startcol, ncols;
+{
+ struct rcons *rc = id;
+ int y, startx, nx;
+
+ y = rc->rc_yorigin + rc->rc_font->height * row;
+ startx = rc->rc_xorigin + rc->rc_font->width * startcol;
+ nx = rc->rc_font->width * ncols;
+
+ raster_op(rc->rc_sp, startx, y,
+ nx, rc->rc_font->height, rc->rc_ras_blank,
+ (struct raster *) 0, 0, 0);
+}
+
+/*
+ * Copy rows (lines).
+ */
+void
+rcons_copyrows(id, srcrow, dstrow, nrows)
+ void *id;
+ int srcrow, dstrow, nrows;
+{
+ struct rcons *rc = id;
+ int srcy, dsty, ny;
+
+ srcy = rc->rc_yorigin + rc->rc_font->height * srcrow;
+ dsty = rc->rc_yorigin + rc->rc_font->height * dstrow;
+ ny = rc->rc_font->height * nrows;
+
+ raster_op(rc->rc_sp, rc->rc_xorigin, dsty,
+ rc->rc_raswidth, ny, RAS_SRC,
+ rc->rc_sp, rc->rc_xorigin, srcy);
+}
+
+/*
+ * Erase rows (lines).
+ */
+void
+rcons_eraserows(id, startrow, nrows)
+ void *id;
+ int startrow, nrows;
+{
+ struct rcons *rc = id;
+ int starty, ny;
+
+ starty = rc->rc_yorigin + rc->rc_font->height * startrow;
+ ny = rc->rc_font->height * nrows;
+
+ raster_op(rc->rc_sp, rc->rc_xorigin, starty,
+ rc->rc_raswidth, ny, rc->rc_ras_blank,
+ (struct raster *) 0, 0, 0);
+}
diff --git a/sys/arch/alpha/wscons/wsconsvar.h b/sys/arch/alpha/wscons/wsconsvar.h
new file mode 100644
index 00000000000..433480d52ea
--- /dev/null
+++ b/sys/arch/alpha/wscons/wsconsvar.h
@@ -0,0 +1,111 @@
+/* $NetBSD: wsconsvar.h,v 1.2 1996/04/12 06:10:36 cgd Exp $ */
+
+/*
+ * Copyright (c) 1995, 1996 Carnegie-Mellon University.
+ * All rights reserved.
+ *
+ * Author: Chris G. Demetriou
+ *
+ * Permission to use, copy, modify and distribute this software and
+ * its documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
+ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+#ifndef _ALPHA_WSCONS_WSCONSVAR_H_
+#define _ALPHA_WSCONS_WSCONSVAR_H_
+
+struct device;
+
+typedef int (*wscons_ioctl_t) __P((struct device *dev, u_long cmd,
+ caddr_t data, int flag, struct proc *p));
+typedef int (*wscons_mmap_t) __P((struct device *dev, off_t off,
+ int prot));
+
+struct wscons_emulfuncs {
+ void (*wef_cursor) __P((void *c, int on, int row, int col));
+ void (*wef_putstr) __P((void *c, int row, int col, char *cp,
+ int n));
+
+ void (*wef_copycols) __P((void *c, int row, int srccol, int dstcol,
+ int ncols));
+ void (*wef_erasecols) __P((void *c, int row, int startcol,
+ int ncols));
+
+ void (*wef_copyrows) __P((void *c, int srcrow, int dstrow,
+ int nrows));
+ void (*wef_eraserows) __P((void *c, int row, int nrows));
+};
+
+struct wscons_odev_spec {
+ const struct wscons_emulfuncs *wo_ef; /* emulation functions */
+ void *wo_efa; /* emulation function cookie */
+
+ int wo_nrows, wo_ncols; /* number of rows & cols */
+ int wo_crow, wo_ccol; /* current row & col */
+
+ wscons_ioctl_t wo_ioctl;
+ wscons_mmap_t wo_mmap;
+};
+
+struct wsconsio_bell_data;
+
+struct wscons_idev_spec {
+ int (*wi_getc) __P((struct device *c));
+ void (*wi_pollc) __P((struct device *c, int on));
+ void (*wi_bell) __P((struct device *c, struct wsconsio_bell_data *));
+ wscons_ioctl_t wi_ioctl;
+ char *(*wi_translate) __P((struct device *c, int code));
+ int wi_keymask; /* keyboard code mask */
+ int wi_keyupmask; /* key went up (vs. down) */
+};
+
+struct wscons_mdev_spec {
+ int (*wm_enable) __P((struct device *));
+ int (*wm_disable) __P((struct device *));
+};
+
+struct wscons_attach_args { /* attaches output device */
+ int waa_isconsole; /* is it the console unit? */
+ struct wscons_odev_spec waa_odev_spec; /* mostly ignored if cons. */
+};
+
+#define wsconscf_console cf_loc[0] /* spec'd to be console? */
+
+/*
+ * Attach the console output device. This is called _very_ early
+ * on in the boot process.
+ */
+void wscons_attach_console __P((const struct wscons_odev_spec *));
+
+/*
+ * Attach the console input device. At this point, it's assumed
+ * that there can be only one. This happens after the input device
+ * has been probed. (XXX boot -d won't work...)
+ */
+void wscons_attach_input __P((struct device *,
+ const struct wscons_idev_spec *));
+
+/*
+ * Transfer a string of characters from the console input device to
+ * the wscons buffer. (XXX raw scancodes? pass ioctl, or something?
+ * then need length.)
+ */
+void wscons_input __P((char *));
+
+#endif /* _ALPHA_WSCONS_WSCONSVAR_H_ */