summaryrefslogtreecommitdiff
path: root/sys/dev/fb
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/fb')
-rw-r--r--sys/dev/fb/boot_font.c4675
-rw-r--r--sys/dev/fb/creator.c780
-rw-r--r--sys/dev/fb/fb.c762
-rw-r--r--sys/dev/fb/fbreg.h278
-rw-r--r--sys/dev/fb/gallant12x22.h6185
-rw-r--r--sys/dev/fb/gfb.c940
-rw-r--r--sys/dev/fb/gfb.h172
-rw-r--r--sys/dev/fb/machfb.c1584
-rw-r--r--sys/dev/fb/machfbreg.h458
-rw-r--r--sys/dev/fb/s3_pci.c568
-rw-r--r--sys/dev/fb/splash.c213
-rw-r--r--sys/dev/fb/splash_bmp.c643
-rw-r--r--sys/dev/fb/splash_pcx.c271
-rw-r--r--sys/dev/fb/splashreg.h107
-rw-r--r--sys/dev/fb/tga.c2447
-rw-r--r--sys/dev/fb/tga.h155
-rw-r--r--sys/dev/fb/vga.c3065
-rw-r--r--sys/dev/fb/vgareg.h98
18 files changed, 23401 insertions, 0 deletions
diff --git a/sys/dev/fb/boot_font.c b/sys/dev/fb/boot_font.c
new file mode 100644
index 000000000000..f1636577364b
--- /dev/null
+++ b/sys/dev/fb/boot_font.c
@@ -0,0 +1,4675 @@
+/*-
+ * Copyright (c) 1999 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Andrew Doran.
+ *
+ * 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 NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ */
+/*-
+ * This font lives in the public domain. It it a PC font, IBM encoding,
+ * which was designed for use with syscons.
+ *
+ * Copyright (c) 2000 Andrew Miklic
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/conf.h>
+#include <sys/proc.h>
+#include <sys/fcntl.h>
+#include <sys/malloc.h>
+#include <sys/fbio.h>
+
+#include <isa/isareg.h>
+#include <dev/fb/vgareg.h>
+
+#include <vm/vm.h>
+#include <vm/vm_param.h>
+#include <vm/pmap.h>
+
+#include <machine/md_var.h>
+#include <machine/pc/bios.h>
+#include <machine/clock.h>
+#include <machine/bus.h>
+#include <machine/pc/vesa.h>
+#include <machine/resource.h>
+
+#include <sys/bus.h>
+#include <sys/rman.h>
+
+#include <dev/pci/pcireg.h>
+#include <dev/pci/pcivar.h>
+
+#include <dev/fb/fbreg.h>
+#include <dev/fb/gfb.h>
+#include <dev/gfb/gfb_pci.h>
+
+#include "opt_fb.h"
+
+struct gfb_font bold8x16 = {
+ 8,
+ 16,
+ {
+ /* \00 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \01 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x3c, /* ..****.. */
+ 0x42, /* .*....*. */
+ 0x81, /* *......* */
+ 0xe7, /* ***..*** */
+ 0xa5, /* *.*..*.* */
+ 0x99, /* *..**..* */
+ 0x81, /* *......* */
+ 0x99, /* *..**..* */
+ 0x42, /* .*....*. */
+ 0x3c, /* ..****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \02 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x3c, /* ..****.. */
+ 0x7e, /* .******. */
+ 0xff, /* ******** */
+ 0x99, /* *..**..* */
+ 0xdb, /* **.**.** */
+ 0xe7, /* ***..*** */
+ 0xff, /* ******** */
+ 0xe7, /* ***..*** */
+ 0x7e, /* .******. */
+ 0x3c, /* ..****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \03 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x6c, /* .**.**.. */
+ 0xfe, /* *******. */
+ 0xfe, /* *******. */
+ 0xfe, /* *******. */
+ 0xfe, /* *******. */
+ 0xfe, /* *******. */
+ 0x7c, /* .*****.. */
+ 0x38, /* ..***... */
+ 0x10, /* ...*.... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \04 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x10, /* ...*.... */
+ 0x38, /* ..***... */
+ 0x7c, /* .*****.. */
+ 0xfe, /* *******. */
+ 0x7c, /* .*****.. */
+ 0x38, /* ..***... */
+ 0x10, /* ...*.... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \05 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x10, /* ...*.... */
+ 0xd6, /* **.*.**. */
+ 0xfe, /* *******. */
+ 0xd6, /* **.*.**. */
+ 0x10, /* ...*.... */
+ 0x38, /* ..***... */
+ 0x7c, /* .*****.. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \06 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x10, /* ...*.... */
+ 0x38, /* ..***... */
+ 0x7c, /* .*****.. */
+ 0xfe, /* *******. */
+ 0xfe, /* *******. */
+ 0x54, /* .*.*.*.. */
+ 0x10, /* ...*.... */
+ 0x38, /* ..***... */
+ 0x7c, /* .*****.. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \07 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \010 */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xe7, /* ***..*** */
+ 0xc3, /* **....** */
+ 0xc3, /* **....** */
+ 0xe7, /* ***..*** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+
+ /* \011 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x3c, /* ..****.. */
+ 0x66, /* .**..**. */
+ 0x42, /* .*....*. */
+ 0x42, /* .*....*. */
+ 0x66, /* .**..**. */
+ 0x3c, /* ..****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \012 */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xc3, /* **....** */
+ 0x99, /* *..**..* */
+ 0xbd, /* *.****.* */
+ 0xbd, /* *.****.* */
+ 0x99, /* *..**..* */
+ 0xc3, /* **....** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+
+ /* \013 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x1e, /* ...****. */
+ 0x0e, /* ....***. */
+ 0x1a, /* ...**.*. */
+ 0x30, /* ..**.... */
+ 0x78, /* .****... */
+ 0xcc, /* **..**.. */
+ 0xcc, /* **..**.. */
+ 0xcc, /* **..**.. */
+ 0xcc, /* **..**.. */
+ 0x78, /* .****... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \014 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x3c, /* ..****.. */
+ 0x66, /* .**..**. */
+ 0x66, /* .**..**. */
+ 0x66, /* .**..**. */
+ 0x3c, /* ..****.. */
+ 0x18, /* ...**... */
+ 0x7e, /* .******. */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \015 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x10, /* ...*.... */
+ 0x18, /* ...**... */
+ 0x14, /* ...*.*.. */
+ 0x14, /* ...*.*.. */
+ 0x14, /* ...*.*.. */
+ 0x10, /* ...*.... */
+ 0x10, /* ...*.... */
+ 0x30, /* ..**.... */
+ 0x70, /* .***.... */
+ 0x20, /* ..*..... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \016 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x3e, /* ..*****. */
+ 0x22, /* ..*...*. */
+ 0x3e, /* ..*****. */
+ 0x22, /* ..*...*. */
+ 0x22, /* ..*...*. */
+ 0x22, /* ..*...*. */
+ 0x22, /* ..*...*. */
+ 0x26, /* ..*..**. */
+ 0x6e, /* .**.***. */
+ 0xe4, /* ***..*.. */
+ 0x40, /* .*...... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \017 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x10, /* ...*.... */
+ 0x92, /* *..*..*. */
+ 0x54, /* .*.*.*.. */
+ 0x28, /* ..*.*... */
+ 0xc6, /* **...**. */
+ 0x28, /* ..*.*... */
+ 0x54, /* .*.*.*.. */
+ 0x92, /* *..*..*. */
+ 0x10, /* ...*.... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \020 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x60, /* .**..... */
+ 0x70, /* .***.... */
+ 0x78, /* .****... */
+ 0x7c, /* .*****.. */
+ 0x7e, /* .******. */
+ 0x7e, /* .******. */
+ 0x7c, /* .*****.. */
+ 0x78, /* .****... */
+ 0x70, /* .***.... */
+ 0x60, /* .**..... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \021 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x06, /* .....**. */
+ 0x0e, /* ....***. */
+ 0x1e, /* ...****. */
+ 0x3e, /* ..*****. */
+ 0x7e, /* .******. */
+ 0x7e, /* .******. */
+ 0x3e, /* ..*****. */
+ 0x1e, /* ...****. */
+ 0x0e, /* ....***. */
+ 0x06, /* .....**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \022 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x10, /* ...*.... */
+ 0x38, /* ..***... */
+ 0x7c, /* .*****.. */
+ 0xfe, /* *******. */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0xfe, /* *******. */
+ 0x7c, /* .*****.. */
+ 0x38, /* ..***... */
+ 0x10, /* ...*.... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \023 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x66, /* .**..**. */
+ 0x66, /* .**..**. */
+ 0x66, /* .**..**. */
+ 0x66, /* .**..**. */
+ 0x66, /* .**..**. */
+ 0x66, /* .**..**. */
+ 0x66, /* .**..**. */
+ 0x00, /* ........ */
+ 0x66, /* .**..**. */
+ 0x66, /* .**..**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \024 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7e, /* .******. */
+ 0xf4, /* ****.*.. */
+ 0xf4, /* ****.*.. */
+ 0xf4, /* ****.*.. */
+ 0x74, /* .***.*.. */
+ 0x14, /* ...*.*.. */
+ 0x14, /* ...*.*.. */
+ 0x14, /* ...*.*.. */
+ 0x14, /* ...*.*.. */
+ 0x14, /* ...*.*.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \025 */
+ 0x00, /* ........ */
+ 0x1e, /* ...****. */
+ 0x30, /* ..**.... */
+ 0x78, /* .****... */
+ 0xdc, /* **.***.. */
+ 0xce, /* **..***. */
+ 0xe7, /* ***..*** */
+ 0x73, /* .***..** */
+ 0x3b, /* ..***.** */
+ 0x1e, /* ...****. */
+ 0x0c, /* ....**.. */
+ 0x78, /* .****... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \026 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfe, /* *******. */
+ 0xfe, /* *******. */
+ 0xfe, /* *******. */
+ 0xfe, /* *******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \027 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x10, /* ...*.... */
+ 0x38, /* ..***... */
+ 0x7c, /* .*****.. */
+ 0xfe, /* *******. */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0xfe, /* *******. */
+ 0x7c, /* .*****.. */
+ 0x38, /* ..***... */
+ 0x10, /* ...*.... */
+ 0xfe, /* *******. */
+ 0x00, /* ........ */
+
+ /* \030 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x10, /* ...*.... */
+ 0x38, /* ..***... */
+ 0x7c, /* .*****.. */
+ 0xfe, /* *******. */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \031 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0xfe, /* *******. */
+ 0x7c, /* .*****.. */
+ 0x38, /* ..***... */
+ 0x10, /* ...*.... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \032 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x08, /* ....*... */
+ 0x0c, /* ....**.. */
+ 0xfe, /* *******. */
+ 0xff, /* ******** */
+ 0xfe, /* *******. */
+ 0x0c, /* ....**.. */
+ 0x08, /* ....*... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \033 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x10, /* ...*.... */
+ 0x30, /* ..**.... */
+ 0x7f, /* .******* */
+ 0xff, /* ******** */
+ 0x7f, /* .******* */
+ 0x30, /* ..**.... */
+ 0x10, /* ...*.... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \034 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x33, /* ..**..** */
+ 0x66, /* .**..**. */
+ 0xee, /* ***.***. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \035 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x24, /* ..*..*.. */
+ 0x66, /* .**..**. */
+ 0xff, /* ******** */
+ 0x66, /* .**..**. */
+ 0x24, /* ..*..*.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \036 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x3c, /* ..****.. */
+ 0x7e, /* .******. */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \037 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0x7e, /* .******. */
+ 0x3c, /* ..****.. */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ! */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* " */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x77, /* .***.*** */
+ 0x66, /* .**..**. */
+ 0xcc, /* **..**.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* # */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0xfe, /* *******. */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0xfe, /* *******. */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* $ */
+ 0x00, /* ........ */
+ 0x10, /* ...*.... */
+ 0x10, /* ...*.... */
+ 0x7c, /* .*****.. */
+ 0xd6, /* **.*.**. */
+ 0xd0, /* **.*.... */
+ 0xd0, /* **.*.... */
+ 0x7c, /* .*****.. */
+ 0x16, /* ...*.**. */
+ 0x16, /* ...*.**. */
+ 0xd6, /* **.*.**. */
+ 0x7c, /* .*****.. */
+ 0x10, /* ...*.... */
+ 0x10, /* ...*.... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* % */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xc6, /* **...**. */
+ 0xc4, /* **...*.. */
+ 0x0c, /* ....**.. */
+ 0x08, /* ....*... */
+ 0x18, /* ...**... */
+ 0x30, /* ..**.... */
+ 0x20, /* ..*..... */
+ 0x60, /* .**..... */
+ 0x46, /* .*...**. */
+ 0xc6, /* **...**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* & */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x38, /* ..***... */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x38, /* ..***... */
+ 0x76, /* .***.**. */
+ 0xdc, /* **.***.. */
+ 0xcc, /* **..**.. */
+ 0xcc, /* **..**.. */
+ 0xcc, /* **..**.. */
+ 0x76, /* .***.**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ' */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x1c, /* ...***.. */
+ 0x18, /* ...**... */
+ 0x30, /* ..**.... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ( */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x0c, /* ....**.. */
+ 0x18, /* ...**... */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0x18, /* ...**... */
+ 0x0c, /* ....**.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ) */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x30, /* ..**.... */
+ 0x18, /* ...**... */
+ 0x0c, /* ....**.. */
+ 0x0c, /* ....**.. */
+ 0x0c, /* ....**.. */
+ 0x0c, /* ....**.. */
+ 0x0c, /* ....**.. */
+ 0x0c, /* ....**.. */
+ 0x18, /* ...**... */
+ 0x30, /* ..**.... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* * */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x66, /* .**..**. */
+ 0x3c, /* ..****.. */
+ 0xff, /* ******** */
+ 0x3c, /* ..****.. */
+ 0x66, /* .**..**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* + */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x7e, /* .******. */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* , */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x1c, /* ...***.. */
+ 0x18, /* ...**... */
+ 0x30, /* ..**.... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* - */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7e, /* .******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* . */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* / */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x06, /* .....**. */
+ 0x04, /* .....*.. */
+ 0x0c, /* ....**.. */
+ 0x08, /* ....*... */
+ 0x18, /* ...**... */
+ 0x10, /* ...*.... */
+ 0x30, /* ..**.... */
+ 0x20, /* ..*..... */
+ 0x60, /* .**..... */
+ 0x40, /* .*...... */
+ 0xc0, /* **...... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* 0 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xd6, /* **.*.**. */
+ 0xd6, /* **.*.**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* 1 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x38, /* ..***... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x7e, /* .******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* 2 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x0c, /* ....**.. */
+ 0x18, /* ...**... */
+ 0x30, /* ..**.... */
+ 0x60, /* .**..... */
+ 0xc0, /* **...... */
+ 0xfe, /* *******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* 3 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x3c, /* ..****.. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* 4 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x0c, /* ....**.. */
+ 0x1c, /* ...***.. */
+ 0x3c, /* ..****.. */
+ 0x6c, /* .**.**.. */
+ 0xcc, /* **..**.. */
+ 0xfe, /* *******. */
+ 0x0c, /* ....**.. */
+ 0x0c, /* ....**.. */
+ 0x0c, /* ....**.. */
+ 0x0c, /* ....**.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* 5 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfe, /* *******. */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xfc, /* ******.. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* 6 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x3c, /* ..****.. */
+ 0x60, /* .**..... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xfc, /* ******.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* 7 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfe, /* *******. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x0c, /* ....**.. */
+ 0x18, /* ...**... */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* 8 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* 9 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7e, /* .******. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x0c, /* ....**.. */
+ 0x78, /* .****... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* : */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ; */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x30, /* ..**.... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* < */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x06, /* .....**. */
+ 0x0c, /* ....**.. */
+ 0x18, /* ...**... */
+ 0x30, /* ..**.... */
+ 0x60, /* .**..... */
+ 0x60, /* .**..... */
+ 0x30, /* ..**.... */
+ 0x18, /* ...**... */
+ 0x0c, /* ....**.. */
+ 0x06, /* .....**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* = */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7e, /* .******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7e, /* .******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* > */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x60, /* .**..... */
+ 0x30, /* ..**.... */
+ 0x18, /* ...**... */
+ 0x0c, /* ....**.. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x0c, /* ....**.. */
+ 0x18, /* ...**... */
+ 0x30, /* ..**.... */
+ 0x60, /* .**..... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ? */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x1c, /* ...***.. */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0x00, /* ........ */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* @ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xde, /* **.****. */
+ 0xde, /* **.****. */
+ 0xde, /* **.****. */
+ 0xde, /* **.****. */
+ 0xdc, /* **.***.. */
+ 0xc0, /* **...... */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* A */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* B */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfc, /* ******.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xfc, /* ******.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xfc, /* ******.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* C */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x3c, /* ..****.. */
+ 0x66, /* .**..**. */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0x66, /* .**..**. */
+ 0x3c, /* ..****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* D */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xf8, /* *****... */
+ 0xcc, /* **..**.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xcc, /* **..**.. */
+ 0xf8, /* *****... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* E */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfe, /* *******. */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xfc, /* ******.. */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xfe, /* *******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* F */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfe, /* *******. */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xfc, /* ******.. */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* G */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x3c, /* ..****.. */
+ 0x66, /* .**..**. */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xce, /* **..***. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x66, /* .**..**. */
+ 0x3c, /* ..****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* H */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xfe, /* *******. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* I */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x3c, /* ..****.. */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x3c, /* ..****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* J */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x1e, /* ...****. */
+ 0x0c, /* ....**.. */
+ 0x0c, /* ....**.. */
+ 0x0c, /* ....**.. */
+ 0x0c, /* ....**.. */
+ 0x0c, /* ....**.. */
+ 0x0c, /* ....**.. */
+ 0xcc, /* **..**.. */
+ 0xcc, /* **..**.. */
+ 0x78, /* .****... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* K */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xc6, /* **...**. */
+ 0xcc, /* **..**.. */
+ 0xd8, /* **.**... */
+ 0xf0, /* ****.... */
+ 0xe0, /* ***..... */
+ 0xe0, /* ***..... */
+ 0xf0, /* ****.... */
+ 0xd8, /* **.**... */
+ 0xcc, /* **..**.. */
+ 0xc6, /* **...**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* L */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xfe, /* *******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* M */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xc6, /* **...**. */
+ 0xee, /* ***.***. */
+ 0xfe, /* *******. */
+ 0xfe, /* *******. */
+ 0xd6, /* **.*.**. */
+ 0xd6, /* **.*.**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* N */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xc6, /* **...**. */
+ 0xe6, /* ***..**. */
+ 0xf6, /* ****.**. */
+ 0xfe, /* *******. */
+ 0xde, /* **.****. */
+ 0xce, /* **..***. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* O */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* P */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfc, /* ******.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xfc, /* ******.. */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* Q */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xf6, /* ****.**. */
+ 0xde, /* **.****. */
+ 0x7c, /* .*****.. */
+ 0x0c, /* ....**.. */
+ 0x06, /* .....**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* R */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfc, /* ******.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xfc, /* ******.. */
+ 0xd8, /* **.**... */
+ 0xcc, /* **..**.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* S */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xc0, /* **...... */
+ 0x60, /* .**..... */
+ 0x38, /* ..***... */
+ 0x0c, /* ....**.. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* T */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7e, /* .******. */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* U */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* V */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x10, /* ...*.... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* W */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xd6, /* **.*.**. */
+ 0xd6, /* **.*.**. */
+ 0xfe, /* *******. */
+ 0xee, /* ***.***. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* X */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* Y */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x66, /* .**..**. */
+ 0x66, /* .**..**. */
+ 0x66, /* .**..**. */
+ 0x66, /* .**..**. */
+ 0x3c, /* ..****.. */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* Z */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfe, /* *******. */
+ 0x0c, /* ....**.. */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0x60, /* .**..... */
+ 0x60, /* .**..... */
+ 0xc0, /* **...... */
+ 0xfe, /* *******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* [ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x3c, /* ..****.. */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0x3c, /* ..****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xc0, /* **...... */
+ 0x40, /* .*...... */
+ 0x60, /* .**..... */
+ 0x20, /* ..*..... */
+ 0x30, /* ..**.... */
+ 0x10, /* ...*.... */
+ 0x18, /* ...**... */
+ 0x08, /* ....*... */
+ 0x0c, /* ....**.. */
+ 0x04, /* .....*.. */
+ 0x06, /* .....**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ] */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x3c, /* ..****.. */
+ 0x0c, /* ....**.. */
+ 0x0c, /* ....**.. */
+ 0x0c, /* ....**.. */
+ 0x0c, /* ....**.. */
+ 0x0c, /* ....**.. */
+ 0x0c, /* ....**.. */
+ 0x0c, /* ....**.. */
+ 0x0c, /* ....**.. */
+ 0x3c, /* ..****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ^ */
+ 0x00, /* ........ */
+ 0x10, /* ...*.... */
+ 0x38, /* ..***... */
+ 0x6c, /* .**.**.. */
+ 0xc6, /* **...**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* _ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xff, /* ******** */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ` */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x38, /* ..***... */
+ 0x18, /* ...**... */
+ 0x0c, /* ....**.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* a */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0x06, /* .....**. */
+ 0x7e, /* .******. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7e, /* .******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* b */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xfc, /* ******.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xfc, /* ******.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* c */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* d */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x7e, /* .******. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7e, /* .******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* e */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xfe, /* *******. */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* f */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x3c, /* ..****.. */
+ 0x66, /* .**..**. */
+ 0x60, /* .**..... */
+ 0x60, /* .**..... */
+ 0xf0, /* ****.... */
+ 0x60, /* .**..... */
+ 0x60, /* .**..... */
+ 0x60, /* .**..... */
+ 0x60, /* .**..... */
+ 0x60, /* .**..... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* g */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7e, /* .******. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7e, /* .******. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+
+ /* h */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xfc, /* ******.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* i */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* j */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x00, /* ........ */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x66, /* .**..**. */
+ 0x3c, /* ..****.. */
+ 0x00, /* ........ */
+
+ /* k */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc6, /* **...**. */
+ 0xcc, /* **..**.. */
+ 0xd8, /* **.**... */
+ 0xf0, /* ****.... */
+ 0xd8, /* **.**... */
+ 0xcc, /* **..**.. */
+ 0xc6, /* **...**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* l */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x38, /* ..***... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x3c, /* ..****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* m */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xec, /* ***.**.. */
+ 0xd6, /* **.*.**. */
+ 0xd6, /* **.*.**. */
+ 0xd6, /* **.*.**. */
+ 0xd6, /* **.*.**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* n */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfc, /* ******.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* o */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* p */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfc, /* ******.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xfc, /* ******.. */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0x00, /* ........ */
+
+ /* q */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7e, /* .******. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7e, /* .******. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x00, /* ........ */
+
+ /* r */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfc, /* ******.. */
+ 0xc6, /* **...**. */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* s */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc0, /* **...... */
+ 0x70, /* .***.... */
+ 0x1c, /* ...***.. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* t */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x10, /* ...*.... */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0xfc, /* ******.. */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0x30, /* ..**.... */
+ 0x1c, /* ...***.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* u */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* v */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x6c, /* .**.**.. */
+ 0x38, /* ..***... */
+ 0x10, /* ...*.... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* w */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xd6, /* **.*.**. */
+ 0xd6, /* **.*.**. */
+ 0xfe, /* *******. */
+ 0xc6, /* **...**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* x */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xc6, /* **...**. */
+ 0x6c, /* .**.**.. */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x38, /* ..***... */
+ 0x6c, /* .**.**.. */
+ 0xc6, /* **...**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* y */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7e, /* .******. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+
+ /* z */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfe, /* *******. */
+ 0x06, /* .....**. */
+ 0x0c, /* ....**.. */
+ 0x18, /* ...**... */
+ 0x30, /* ..**.... */
+ 0x60, /* .**..... */
+ 0xfe, /* *******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* { */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x0e, /* ....***. */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x60, /* .**..... */
+ 0x60, /* .**..... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x0e, /* ....***. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* | */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* } */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x70, /* .***.... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x70, /* .***.... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ~ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x76, /* .***.**. */
+ 0xdc, /* **.***.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0177 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x10, /* ...*.... */
+ 0x38, /* ..***... */
+ 0x6c, /* .**.**.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xfe, /* *******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0200 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x3c, /* ..****.. */
+ 0x66, /* .**..**. */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0x66, /* .**..**. */
+ 0x3c, /* ..****.. */
+ 0x18, /* ...**... */
+ 0x98, /* *..**... */
+ 0x70, /* .***.... */
+ 0x00, /* ........ */
+
+ /* \0201 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x00, /* ........ */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0202 */
+ 0x00, /* ........ */
+ 0x06, /* .....**. */
+ 0x0c, /* ....**.. */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xfe, /* *******. */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0203 */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x3c, /* ..****.. */
+ 0x66, /* .**..**. */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0x06, /* .....**. */
+ 0x7e, /* .******. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7e, /* .******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0204 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0x06, /* .....**. */
+ 0x7e, /* .******. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7e, /* .******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0205 */
+ 0x00, /* ........ */
+ 0x60, /* .**..... */
+ 0x30, /* ..**.... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0x06, /* .....**. */
+ 0x7e, /* .******. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7e, /* .******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0206 */
+ 0x38, /* ..***... */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x38, /* ..***... */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0x06, /* .....**. */
+ 0x7e, /* .******. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7e, /* .******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0207 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x38, /* ..***... */
+ 0x98, /* *..**... */
+ 0x70, /* .***.... */
+ 0x00, /* ........ */
+
+ /* \0210 */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x3c, /* ..****.. */
+ 0x66, /* .**..**. */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xfe, /* *******. */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0211 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xfe, /* *******. */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0212 */
+ 0x00, /* ........ */
+ 0x60, /* .**..... */
+ 0x30, /* ..**.... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xfe, /* *******. */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0213 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x66, /* .**..**. */
+ 0x66, /* .**..**. */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0214 */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x3c, /* ..****.. */
+ 0x66, /* .**..**. */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0215 */
+ 0x00, /* ........ */
+ 0x60, /* .**..... */
+ 0x30, /* ..**.... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0216 */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x10, /* ...*.... */
+ 0x38, /* ..***... */
+ 0x6c, /* .**.**.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xfe, /* *******. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0217 */
+ 0x38, /* ..***... */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x38, /* ..***... */
+ 0x6c, /* .**.**.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xfe, /* *******. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0220 */
+ 0x0c, /* ....**.. */
+ 0x18, /* ...**... */
+ 0x30, /* ..**.... */
+ 0xfe, /* *******. */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xfc, /* ******.. */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xfe, /* *******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0221 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7e, /* .******. */
+ 0xdb, /* **.**.** */
+ 0x1b, /* ...**.** */
+ 0x7f, /* .******* */
+ 0xd8, /* **.**... */
+ 0xdb, /* **.**.** */
+ 0x6e, /* .**.***. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0222 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x3f, /* ..****** */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x6c, /* .**.**.. */
+ 0x6f, /* .**.**** */
+ 0x6c, /* .**.**.. */
+ 0x7c, /* .*****.. */
+ 0xcc, /* **..**.. */
+ 0xcc, /* **..**.. */
+ 0xcf, /* **..**** */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0223 */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x3c, /* ..****.. */
+ 0x66, /* .**..**. */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0224 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0225 */
+ 0x00, /* ........ */
+ 0x60, /* .**..... */
+ 0x30, /* ..**.... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0226 */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x3c, /* ..****.. */
+ 0x66, /* .**..**. */
+ 0x00, /* ........ */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0227 */
+ 0x00, /* ........ */
+ 0x60, /* .**..... */
+ 0x30, /* ..**.... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0230 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x00, /* ........ */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7e, /* .******. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+
+ /* \0231 */
+ 0x6c, /* .**.**.. */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0232 */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x00, /* ........ */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0233 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x7e, /* .******. */
+ 0xc3, /* **....** */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc3, /* **....** */
+ 0x7e, /* .******. */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0234 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x38, /* ..***... */
+ 0x6c, /* .**.**.. */
+ 0x60, /* .**..... */
+ 0xf0, /* ****.... */
+ 0x60, /* .**..... */
+ 0xf0, /* ****.... */
+ 0x60, /* .**..... */
+ 0x60, /* .**..... */
+ 0x66, /* .**..**. */
+ 0xfc, /* ******.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0235 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x66, /* .**..**. */
+ 0x66, /* .**..**. */
+ 0x66, /* .**..**. */
+ 0x3c, /* ..****.. */
+ 0x18, /* ...**... */
+ 0x7e, /* .******. */
+ 0x18, /* ...**... */
+ 0x7e, /* .******. */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0236 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfc, /* ******.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xfc, /* ******.. */
+ 0xc6, /* **...**. */
+ 0xcf, /* **..**** */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x07, /* .....*** */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* \0237 */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x0e, /* ....***. */
+ 0x1b, /* ...**.** */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x3c, /* ..****.. */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0xd8, /* **.**... */
+ 0x70, /* .***.... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /*   */
+ 0x00, /* ........ */
+ 0x06, /* .....**. */
+ 0x0c, /* ....**.. */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0x06, /* .....**. */
+ 0x7e, /* .******. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7e, /* .******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ¡ */
+ 0x00, /* ........ */
+ 0x06, /* .....**. */
+ 0x0c, /* ....**.. */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ¢ */
+ 0x00, /* ........ */
+ 0x06, /* .....**. */
+ 0x0c, /* ....**.. */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* £ */
+ 0x00, /* ........ */
+ 0x0c, /* ....**.. */
+ 0x18, /* ...**... */
+ 0x30, /* ..**.... */
+ 0x00, /* ........ */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ¤ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x76, /* .***.**. */
+ 0xdc, /* **.***.. */
+ 0x00, /* ........ */
+ 0xfc, /* ******.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ¥ */
+ 0x76, /* .***.**. */
+ 0xdc, /* **.***.. */
+ 0x00, /* ........ */
+ 0xc6, /* **...**. */
+ 0xe6, /* ***..**. */
+ 0xf6, /* ****.**. */
+ 0xfe, /* *******. */
+ 0xde, /* **.****. */
+ 0xce, /* **..***. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ¦ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0x06, /* .....**. */
+ 0x7e, /* .******. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7e, /* .******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfe, /* *******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* § */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfe, /* *******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ¨ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x70, /* .***.... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc6, /* **...**. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* © */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfe, /* *******. */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ª */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfe, /* *******. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x06, /* .....**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* « */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x38, /* ..***... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0xff, /* ******** */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x2c, /* ..*.**.. */
+ 0x18, /* ...**... */
+ 0x30, /* ..**.... */
+ 0x3c, /* ..****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ¬ */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x38, /* ..***... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0xff, /* ******** */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x38, /* ..***... */
+ 0x68, /* .**.*... */
+ 0x7c, /* .*****.. */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ­ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ® */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x36, /* ..**.**. */
+ 0x6c, /* .**.**.. */
+ 0xd8, /* **.**... */
+ 0xd8, /* **.**... */
+ 0x6c, /* .**.**.. */
+ 0x36, /* ..**.**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ¯ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xd8, /* **.**... */
+ 0x6c, /* .**.**.. */
+ 0x36, /* ..**.**. */
+ 0x36, /* ..**.**. */
+ 0x6c, /* .**.**.. */
+ 0xd8, /* **.**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ° */
+ 0x82, /* *.....*. */
+ 0x10, /* ...*.... */
+ 0x82, /* *.....*. */
+ 0x10, /* ...*.... */
+ 0x82, /* *.....*. */
+ 0x10, /* ...*.... */
+ 0x82, /* *.....*. */
+ 0x10, /* ...*.... */
+ 0x82, /* *.....*. */
+ 0x10, /* ...*.... */
+ 0x82, /* *.....*. */
+ 0x10, /* ...*.... */
+ 0x82, /* *.....*. */
+ 0x10, /* ...*.... */
+ 0x82, /* *.....*. */
+ 0x10, /* ...*.... */
+
+ /* ± */
+ 0x00, /* ........ */
+ 0x95, /* *..*.*.* */
+ 0x00, /* ........ */
+ 0xa9, /* *.*.*..* */
+ 0x00, /* ........ */
+ 0x95, /* *..*.*.* */
+ 0x00, /* ........ */
+ 0xa9, /* *.*.*..* */
+ 0x00, /* ........ */
+ 0x95, /* *..*.*.* */
+ 0x00, /* ........ */
+ 0xa9, /* *.*.*..* */
+ 0x00, /* ........ */
+ 0x95, /* *..*.*.* */
+ 0x00, /* ........ */
+ 0xa9, /* *.*.*..* */
+
+ /* ² */
+ 0x92, /* *..*..*. */
+ 0x49, /* .*..*..* */
+ 0x92, /* *..*..*. */
+ 0x49, /* .*..*..* */
+ 0x92, /* *..*..*. */
+ 0x49, /* .*..*..* */
+ 0x92, /* *..*..*. */
+ 0x49, /* .*..*..* */
+ 0x92, /* *..*..*. */
+ 0x49, /* .*..*..* */
+ 0x92, /* *..*..*. */
+ 0x49, /* .*..*..* */
+ 0x92, /* *..*..*. */
+ 0x49, /* .*..*..* */
+ 0x92, /* *..*..*. */
+ 0x49, /* .*..*..* */
+
+ /* ³ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+
+ /* ´ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0xf8, /* *****... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+
+ /* µ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0xf8, /* *****... */
+ 0xf8, /* *****... */
+ 0xf8, /* *****... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+
+ /* ¶ */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0xfc, /* ******.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+
+ /* · */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfc, /* ******.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+
+ /* ¸ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xf8, /* *****... */
+ 0xf8, /* *****... */
+ 0xf8, /* *****... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+
+ /* ¹ */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0xfc, /* ******.. */
+ 0xfc, /* ******.. */
+ 0xfc, /* ******.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+
+ /* º */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+
+ /* » */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfc, /* ******.. */
+ 0xfc, /* ******.. */
+ 0xfc, /* ******.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+
+ /* ¼ */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0xfc, /* ******.. */
+ 0xfc, /* ******.. */
+ 0xfc, /* ******.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ½ */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0xfc, /* ******.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ¾ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0xf8, /* *****... */
+ 0xf8, /* *****... */
+ 0xf8, /* *****... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ¿ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xf8, /* *****... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+
+ /* À */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x1f, /* ...***** */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* Á */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0xff, /* ******** */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* Â */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xff, /* ******** */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+
+ /* Ã */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x1f, /* ...***** */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+
+ /* Ä */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xff, /* ******** */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* Å */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0xff, /* ******** */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+
+ /* Æ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x1f, /* ...***** */
+ 0x1f, /* ...***** */
+ 0x1f, /* ...***** */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+
+ /* Ç */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3f, /* ..****** */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+
+ /* È */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3f, /* ..****** */
+ 0x3f, /* ..****** */
+ 0x3f, /* ..****** */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* É */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x3f, /* ..****** */
+ 0x3f, /* ..****** */
+ 0x3f, /* ..****** */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+
+ /* Ê */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* Ë */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+
+ /* Ì */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3f, /* ..****** */
+ 0x3f, /* ..****** */
+ 0x3f, /* ..****** */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+
+ /* Í */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* Î */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+
+ /* Ï */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* Ð */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0xff, /* ******** */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* Ñ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+
+ /* Ò */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xff, /* ******** */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+
+ /* Ó */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3f, /* ..****** */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* Ô */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x1f, /* ...***** */
+ 0x1f, /* ...***** */
+ 0x1f, /* ...***** */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* Õ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x1f, /* ...***** */
+ 0x1f, /* ...***** */
+ 0x1f, /* ...***** */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+
+ /* Ö */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x3f, /* ..****** */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+
+ /* × */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0xff, /* ******** */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+ 0x3c, /* ..****.. */
+
+ /* Ø */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+
+ /* Ù */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0xf8, /* *****... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* Ú */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x1f, /* ...***** */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+
+ /* Û */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+
+ /* Ü */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+
+ /* Ý */
+ 0xf0, /* ****.... */
+ 0xf0, /* ****.... */
+ 0xf0, /* ****.... */
+ 0xf0, /* ****.... */
+ 0xf0, /* ****.... */
+ 0xf0, /* ****.... */
+ 0xf0, /* ****.... */
+ 0xf0, /* ****.... */
+ 0xf0, /* ****.... */
+ 0xf0, /* ****.... */
+ 0xf0, /* ****.... */
+ 0xf0, /* ****.... */
+ 0xf0, /* ****.... */
+ 0xf0, /* ****.... */
+ 0xf0, /* ****.... */
+ 0xf0, /* ****.... */
+
+ /* Þ */
+ 0x0f, /* ....**** */
+ 0x0f, /* ....**** */
+ 0x0f, /* ....**** */
+ 0x0f, /* ....**** */
+ 0x0f, /* ....**** */
+ 0x0f, /* ....**** */
+ 0x0f, /* ....**** */
+ 0x0f, /* ....**** */
+ 0x0f, /* ....**** */
+ 0x0f, /* ....**** */
+ 0x0f, /* ....**** */
+ 0x0f, /* ....**** */
+ 0x0f, /* ....**** */
+ 0x0f, /* ....**** */
+ 0x0f, /* ....**** */
+ 0x0f, /* ....**** */
+
+ /* ß */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0xff, /* ******** */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* à */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x77, /* .***.*** */
+ 0xcc, /* **..**.. */
+ 0xcc, /* **..**.. */
+ 0xcc, /* **..**.. */
+ 0xde, /* **.****. */
+ 0x73, /* .***..** */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* á */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc4, /* **...*.. */
+ 0xc8, /* **..*... */
+ 0xc4, /* **...*.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xdc, /* **.***.. */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* â */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfe, /* *******. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0xc0, /* **...... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ã */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x03, /* ......** */
+ 0x7e, /* .******. */
+ 0xec, /* ***.**.. */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x68, /* .**.*... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ä */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfe, /* *******. */
+ 0xc6, /* **...**. */
+ 0x60, /* .**..... */
+ 0x30, /* ..**.... */
+ 0x18, /* ...**... */
+ 0x30, /* ..**.... */
+ 0x60, /* .**..... */
+ 0xc0, /* **...... */
+ 0xc6, /* **...**. */
+ 0xfe, /* *******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* å */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7f, /* .******* */
+ 0xf0, /* ****.... */
+ 0xd8, /* **.**... */
+ 0xd8, /* **.**... */
+ 0xd8, /* **.**... */
+ 0xd8, /* **.**... */
+ 0x70, /* .***.... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* æ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x66, /* .**..**. */
+ 0x66, /* .**..**. */
+ 0x66, /* .**..**. */
+ 0x66, /* .**..**. */
+ 0x66, /* .**..**. */
+ 0x66, /* .**..**. */
+ 0x7c, /* .*****.. */
+ 0x60, /* .**..... */
+ 0x60, /* .**..... */
+ 0xc0, /* **...... */
+ 0x00, /* ........ */
+
+ /* ç */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x76, /* .***.**. */
+ 0xdc, /* **.***.. */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* è */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x7e, /* .******. */
+ 0xdb, /* **.**.** */
+ 0xdb, /* **.**.** */
+ 0xdb, /* **.**.** */
+ 0xdb, /* **.**.** */
+ 0x7e, /* .******. */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* é */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x38, /* ..***... */
+ 0x6c, /* .**.**.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xfe, /* *******. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x6c, /* .**.**.. */
+ 0x38, /* ..***... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ê */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x3c, /* ..****.. */
+ 0x66, /* .**..**. */
+ 0xc3, /* **....** */
+ 0xc3, /* **....** */
+ 0xc3, /* **....** */
+ 0xc3, /* **....** */
+ 0x66, /* .**..**. */
+ 0x24, /* ..*..*.. */
+ 0xa5, /* *.*..*.* */
+ 0xe7, /* ***..*** */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ë */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x1e, /* ...****. */
+ 0x30, /* ..**.... */
+ 0x18, /* ...**... */
+ 0x0c, /* ....**.. */
+ 0x3e, /* ..*****. */
+ 0x66, /* .**..**. */
+ 0x66, /* .**..**. */
+ 0x66, /* .**..**. */
+ 0x66, /* .**..**. */
+ 0x3c, /* ..****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ì */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7e, /* .******. */
+ 0xdb, /* **.**.** */
+ 0xdb, /* **.**.** */
+ 0xdb, /* **.**.** */
+ 0x7e, /* .******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* í */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x03, /* ......** */
+ 0x06, /* .....**. */
+ 0x7e, /* .******. */
+ 0xcf, /* **..**** */
+ 0xdb, /* **.**.** */
+ 0xf3, /* ****..** */
+ 0x7e, /* .******. */
+ 0x60, /* .**..... */
+ 0xc0, /* **...... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* î */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x1c, /* ...***.. */
+ 0x30, /* ..**.... */
+ 0x60, /* .**..... */
+ 0x60, /* .**..... */
+ 0x7c, /* .*****.. */
+ 0x60, /* .**..... */
+ 0x60, /* .**..... */
+ 0x60, /* .**..... */
+ 0x30, /* ..**.... */
+ 0x1c, /* ...***.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ï */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0xc6, /* **...**. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ð */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfe, /* *******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xfe, /* *******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ñ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x7e, /* .******. */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7e, /* .******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ò */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x30, /* ..**.... */
+ 0x18, /* ...**... */
+ 0x0c, /* ....**.. */
+ 0x06, /* .....**. */
+ 0x0c, /* ....**.. */
+ 0x18, /* ...**... */
+ 0x30, /* ..**.... */
+ 0x00, /* ........ */
+ 0x7e, /* .******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ó */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x0c, /* ....**.. */
+ 0x18, /* ...**... */
+ 0x30, /* ..**.... */
+ 0x60, /* .**..... */
+ 0x30, /* ..**.... */
+ 0x18, /* ...**... */
+ 0x0c, /* ....**.. */
+ 0x00, /* ........ */
+ 0x7e, /* .******. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ô */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x0e, /* ....***. */
+ 0x1b, /* ...**.** */
+ 0x1b, /* ...**.** */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+
+ /* õ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0xd8, /* **.**... */
+ 0xd8, /* **.**... */
+ 0x70, /* .***.... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ö */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x7e, /* .******. */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ÷ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x76, /* .***.**. */
+ 0xdc, /* **.***.. */
+ 0x00, /* ........ */
+ 0x76, /* .***.**. */
+ 0xdc, /* **.***.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ø */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x38, /* ..***... */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x38, /* ..***... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ù */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ú */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x18, /* ...**... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* û */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x03, /* ......** */
+ 0x02, /* ......*. */
+ 0x06, /* .....**. */
+ 0x04, /* .....*.. */
+ 0x0c, /* ....**.. */
+ 0x08, /* ....*... */
+ 0xd8, /* **.**... */
+ 0x50, /* .*.*.... */
+ 0x70, /* .***.... */
+ 0x20, /* ..*..... */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ü */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0xd8, /* **.**... */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x6c, /* .**.**.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* ý */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x78, /* .****... */
+ 0xcc, /* **..**.. */
+ 0x18, /* ...**... */
+ 0x30, /* ..**.... */
+ 0x60, /* .**..... */
+ 0xfc, /* ******.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+
+ /* þ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x7c, /* .*****.. */
+ 0x7c, /* .*****.. */
+ 0x7c, /* .*****.. */
+ 0x7c, /* .*****.. */
+ 0x7c, /* .*****.. */
+ 0x7c, /* .*****.. */
+ 0x7c, /* .*****.. */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ 0x00, /* ........ */
+ }
+};
diff --git a/sys/dev/fb/creator.c b/sys/dev/fb/creator.c
new file mode 100644
index 000000000000..bfcf2bc76050
--- /dev/null
+++ b/sys/dev/fb/creator.c
@@ -0,0 +1,780 @@
+/*-
+ * Copyright (c) 2003 Jake Burkholder.
+ * All rights reserved.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/consio.h>
+#include <sys/fbio.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+
+#include <machine/bus.h>
+#include <machine/ofw_upa.h>
+#include <machine/sc_machdep.h>
+
+#include <dev/fb/fbreg.h>
+#include <dev/fb/gallant12x22.h>
+#include <dev/syscons/syscons.h>
+
+#include <dev/ofw/openfirm.h>
+
+#include <sparc64/creator/creator.h>
+
+static int creator_configure(int flags);
+
+static vi_probe_t creator_probe;
+static vi_init_t creator_init;
+static vi_get_info_t creator_get_info;
+static vi_query_mode_t creator_query_mode;
+static vi_set_mode_t creator_set_mode;
+static vi_save_font_t creator_save_font;
+static vi_load_font_t creator_load_font;
+static vi_show_font_t creator_show_font;
+static vi_save_palette_t creator_save_palette;
+static vi_load_palette_t creator_load_palette;
+static vi_set_border_t creator_set_border;
+static vi_save_state_t creator_save_state;
+static vi_load_state_t creator_load_state;
+static vi_set_win_org_t creator_set_win_org;
+static vi_read_hw_cursor_t creator_read_hw_cursor;
+static vi_set_hw_cursor_t creator_set_hw_cursor;
+static vi_set_hw_cursor_shape_t creator_set_hw_cursor_shape;
+static vi_blank_display_t creator_blank_display;
+static vi_mmap_t creator_mmap;
+static vi_ioctl_t creator_ioctl;
+static vi_clear_t creator_clear;
+static vi_fill_rect_t creator_fill_rect;
+static vi_bitblt_t creator_bitblt;
+static vi_diag_t creator_diag;
+static vi_save_cursor_palette_t creator_save_cursor_palette;
+static vi_load_cursor_palette_t creator_load_cursor_palette;
+static vi_copy_t creator_copy;
+static vi_putp_t creator_putp;
+static vi_putc_t creator_putc;
+static vi_puts_t creator_puts;
+static vi_putm_t creator_putm;
+
+static void creator_cursor_enable(struct creator_softc *sc, int onoff);
+static void creator_cursor_install(struct creator_softc *sc);
+
+static video_switch_t creatorvidsw = {
+ .probe = creator_probe,
+ .init = creator_init,
+ .get_info = creator_get_info,
+ .query_mode = creator_query_mode,
+ .set_mode = creator_set_mode,
+ .save_font = creator_save_font,
+ .load_font = creator_load_font,
+ .show_font = creator_show_font,
+ .save_palette = creator_save_palette,
+ .load_palette = creator_load_palette,
+ .set_border = creator_set_border,
+ .save_state = creator_save_state,
+ .load_state = creator_load_state,
+ .set_win_org = creator_set_win_org,
+ .read_hw_cursor = creator_read_hw_cursor,
+ .set_hw_cursor = creator_set_hw_cursor,
+ .set_hw_cursor_shape = creator_set_hw_cursor_shape,
+ .blank_display = creator_blank_display,
+ .mmap = creator_mmap,
+ .ioctl = creator_ioctl,
+ .clear = creator_clear,
+ .fill_rect = creator_fill_rect,
+ .bitblt = creator_bitblt,
+ NULL, /* XXX brain damage */
+ NULL, /* XXX brain damage */
+ .diag = creator_diag,
+ .save_cursor_palette = creator_save_cursor_palette,
+ .load_cursor_palette = creator_load_cursor_palette,
+ .copy = creator_copy,
+ .putp = creator_putp,
+ .putc = creator_putc,
+ .puts = creator_puts,
+ .putm = creator_putm
+};
+
+VIDEO_DRIVER(creator, creatorvidsw, creator_configure);
+
+extern sc_rndr_sw_t txtrndrsw;
+RENDERER(creator, 0, txtrndrsw, gfb_set);
+
+RENDERER_MODULE(creator, gfb_set);
+
+extern struct bus_space_tag nexus_bustag;
+
+#define C(r, g, b) ((b << 16) | (g << 8) | (r))
+static const int cmap[] = {
+ C(0x00, 0x00, 0x00), /* black */
+ C(0x00, 0x00, 0xff), /* blue */
+ C(0x00, 0xff, 0x00), /* green */
+ C(0x00, 0xc0, 0xc0), /* cyan */
+ C(0xff, 0x00, 0x00), /* red */
+ C(0xc0, 0x00, 0xc0), /* magenta */
+ C(0xc0, 0xc0, 0x00), /* brown */
+ C(0xc0, 0xc0, 0xc0), /* light grey */
+ C(0x80, 0x80, 0x80), /* dark grey */
+ C(0x80, 0x80, 0xff), /* light blue */
+ C(0x80, 0xff, 0x80), /* light green */
+ C(0x80, 0xff, 0xff), /* light cyan */
+ C(0xff, 0x80, 0x80), /* light red */
+ C(0xff, 0x80, 0xff), /* light magenta */
+ C(0xff, 0xff, 0x80), /* yellow */
+ C(0xff, 0xff, 0xff), /* white */
+};
+
+static const u_char creator_mouse_pointer[64][8] __aligned(8) = {
+ { 0x00, 0x00, }, /* ............ */
+ { 0x80, 0x00, }, /* *........... */
+ { 0xc0, 0x00, }, /* **.......... */
+ { 0xe0, 0x00, }, /* ***......... */
+ { 0xf0, 0x00, }, /* ****........ */
+ { 0xf8, 0x00, }, /* *****....... */
+ { 0xfc, 0x00, }, /* ******...... */
+ { 0xfe, 0x00, }, /* *******..... */
+ { 0xff, 0x00, }, /* ********.... */
+ { 0xff, 0x80, }, /* *********... */
+ { 0xfc, 0xc0, }, /* ******..**.. */
+ { 0xdc, 0x00, }, /* **.***...... */
+ { 0x8e, 0x00, }, /* *...***..... */
+ { 0x0e, 0x00, }, /* ....***..... */
+ { 0x07, 0x00, }, /* .....***.... */
+ { 0x04, 0x00, }, /* .....*...... */
+ { 0x00, 0x00, }, /* ............ */
+ { 0x00, 0x00, }, /* ............ */
+ { 0x00, 0x00, }, /* ............ */
+ { 0x00, 0x00, }, /* ............ */
+ { 0x00, 0x00, }, /* ............ */
+ { 0x00, 0x00, }, /* ............ */
+};
+
+static struct creator_softc creator_softc;
+
+static inline void creator_ras_fifo_wait(struct creator_softc *sc, int n);
+static inline void creator_ras_setfontinc(struct creator_softc *sc, int fontinc);
+static inline void creator_ras_setfontw(struct creator_softc *sc, int fontw);
+static inline void creator_ras_setbg(struct creator_softc *sc, int bg);
+static inline void creator_ras_setfg(struct creator_softc *sc, int fg);
+static inline void creator_ras_setpmask(struct creator_softc *sc, int pmask);
+static inline void creator_ras_wait(struct creator_softc *sc);
+
+static inline void
+creator_ras_wait(struct creator_softc *sc)
+{
+ int ucsr;
+ int r;
+
+ for (;;) {
+ ucsr = FFB_READ(sc, FFB_FBC, FFB_FBC_UCSR);
+ if ((ucsr & (FBC_UCSR_FB_BUSY | FBC_UCSR_RP_BUSY)) == 0)
+ break;
+ r = ucsr & (FBC_UCSR_READ_ERR | FBC_UCSR_FIFO_OVFL);
+ if (r != 0)
+ FFB_WRITE(sc, FFB_FBC, FFB_FBC_UCSR, r);
+ }
+}
+
+static inline void
+creator_ras_fifo_wait(struct creator_softc *sc, int n)
+{
+ int cache;
+
+ cache = sc->sc_fifo_cache;
+ while (cache < n)
+ cache = (FFB_READ(sc, FFB_FBC, FFB_FBC_UCSR) &
+ FBC_UCSR_FIFO_MASK) - 8;
+ sc->sc_fifo_cache = cache - n;
+}
+
+static inline void
+creator_ras_setfontinc(struct creator_softc *sc, int fontinc)
+{
+
+ if (fontinc == sc->sc_fontinc_cache)
+ return;
+ sc->sc_fontinc_cache = fontinc;
+ creator_ras_fifo_wait(sc, 1);
+ FFB_WRITE(sc, FFB_FBC, FFB_FBC_FONTINC, fontinc);
+ creator_ras_wait(sc);
+}
+
+static inline void
+creator_ras_setfontw(struct creator_softc *sc, int fontw)
+{
+
+ if (fontw == sc->sc_fontw_cache)
+ return;
+ sc->sc_fontw_cache = fontw;
+ creator_ras_fifo_wait(sc, 1);
+ FFB_WRITE(sc, FFB_FBC, FFB_FBC_FONTW, fontw);
+ creator_ras_wait(sc);
+}
+
+static inline void
+creator_ras_setbg(struct creator_softc *sc, int bg)
+{
+
+ if (bg == sc->sc_bg_cache)
+ return;
+ sc->sc_bg_cache = bg;
+ creator_ras_fifo_wait(sc, 1);
+ FFB_WRITE(sc, FFB_FBC, FFB_FBC_BG, bg);
+ creator_ras_wait(sc);
+}
+
+static inline void
+creator_ras_setfg(struct creator_softc *sc, int fg)
+{
+
+ if (fg == sc->sc_fg_cache)
+ return;
+ sc->sc_fg_cache = fg;
+ creator_ras_fifo_wait(sc, 1);
+ FFB_WRITE(sc, FFB_FBC, FFB_FBC_FG, fg);
+ creator_ras_wait(sc);
+}
+
+static inline void
+creator_ras_setpmask(struct creator_softc *sc, int pmask)
+{
+
+ if (pmask == sc->sc_pmask_cache)
+ return;
+ sc->sc_pmask_cache = pmask;
+ creator_ras_fifo_wait(sc, 1);
+ FFB_WRITE(sc, FFB_FBC, FFB_FBC_PMASK, pmask);
+ creator_ras_wait(sc);
+}
+
+static int
+creator_configure(int flags)
+{
+ struct upa_regs reg[FFB_NREG];
+ struct creator_softc *sc;
+ phandle_t chosen;
+ phandle_t output;
+ ihandle_t stdout;
+ char buf[32];
+ int i;
+
+ /*
+ * For the high-level console probing return the number of
+ * registered adapters.
+ */
+ if (!(flags & VIO_PROBE_ONLY)) {
+ for (i = 0; vid_find_adapter(CREATOR_DRIVER_NAME, i) >= 0; i++)
+ ;
+ return (i);
+ }
+
+ /* Low-level console probing and initialization. */
+
+ sc = &creator_softc;
+ if (sc->sc_va.va_flags & V_ADP_REGISTERED)
+ goto found;
+
+ if ((chosen = OF_finddevice("/chosen")) == -1)
+ return (0);
+ if (OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)) == -1)
+ return (0);
+ if ((output = OF_instance_to_package(stdout)) == -1)
+ return (0);
+ if (OF_getprop(output, "name", buf, sizeof(buf)) == -1)
+ return (0);
+ if (strcmp(buf, "SUNW,ffb") == 0 || strcmp(buf, "SUNW,afb") == 0) {
+ sc->sc_flags = CREATOR_CONSOLE;
+ if (strcmp(buf, "SUNW,afb") == 0)
+ sc->sc_flags |= CREATOR_AFB;
+ sc->sc_node = output;
+ } else
+ return (0);
+
+ if (OF_getprop(output, "reg", reg, sizeof(reg)) == -1)
+ return (0);
+ for (i = 0; i < FFB_NREG; i++) {
+ sc->sc_bt[i] = &nexus_bustag;
+ sc->sc_bh[i] = UPA_REG_PHYS(reg + i);
+ }
+
+ if (creator_init(0, &sc->sc_va, 0) < 0)
+ return (0);
+
+ found:
+ /* Return number of found adapters. */
+ return (1);
+}
+
+static int
+creator_probe(int unit, video_adapter_t **adpp, void *arg, int flags)
+{
+
+ return (0);
+}
+
+static int
+creator_init(int unit, video_adapter_t *adp, int flags)
+{
+ struct creator_softc *sc;
+ phandle_t options;
+ video_info_t *vi;
+ char buf[32];
+
+ sc = (struct creator_softc *)adp;
+ vi = &adp->va_info;
+
+ vid_init_struct(adp, CREATOR_DRIVER_NAME, -1, unit);
+
+ if (OF_getprop(sc->sc_node, "height", &sc->sc_height,
+ sizeof(sc->sc_height)) == -1)
+ return (ENXIO);
+ if (OF_getprop(sc->sc_node, "width", &sc->sc_width,
+ sizeof(sc->sc_width)) == -1)
+ return (ENXIO);
+ if ((options = OF_finddevice("/options")) == -1)
+ return (ENXIO);
+ if (OF_getprop(options, "screen-#rows", buf, sizeof(buf)) == -1)
+ return (ENXIO);
+ vi->vi_height = strtol(buf, NULL, 10);
+ if (OF_getprop(options, "screen-#columns", buf, sizeof(buf)) == -1)
+ return (ENXIO);
+ vi->vi_width = strtol(buf, NULL, 10);
+ vi->vi_cwidth = 12;
+ vi->vi_cheight = 22;
+ vi->vi_flags = V_INFO_COLOR;
+ vi->vi_mem_model = V_INFO_MM_OTHER;
+
+ sc->sc_font = gallant12x22_data;
+ sc->sc_xmargin = (sc->sc_width - (vi->vi_width * vi->vi_cwidth)) / 2;
+ sc->sc_ymargin = (sc->sc_height - (vi->vi_height * vi->vi_cheight)) / 2;
+
+ creator_set_mode(adp, 0);
+
+ if (!(sc->sc_flags & CREATOR_AFB)) {
+ FFB_WRITE(sc, FFB_DAC, FFB_DAC_TYPE, FFB_DAC_CFG_DID);
+ if (((FFB_READ(sc, FFB_DAC, FFB_DAC_VALUE) &
+ FFB_DAC_CFG_DID_PNUM) >> 12) != 0x236e) {
+ sc->sc_flags |= CREATOR_PAC1;
+ FFB_WRITE(sc, FFB_DAC, FFB_DAC_TYPE, FFB_DAC_CFG_UCTRL);
+ if (((FFB_READ(sc, FFB_DAC, FFB_DAC_VALUE) &
+ FFB_DAC_UCTRL_MANREV) >> 8) <= 2)
+ sc->sc_flags |= CREATOR_CURINV;
+ }
+ }
+
+ creator_blank_display(adp, V_DISPLAY_ON);
+ creator_clear(adp);
+
+ /*
+ * Setting V_ADP_MODECHANGE serves as hack so creator_set_mode()
+ * (which will invalidate our caches and restore our settings) is
+ * called when the X server shuts down. Otherwise screen corruption
+ * happens most of the time.
+ */
+ adp->va_flags |= V_ADP_COLOR | V_ADP_MODECHANGE | V_ADP_BORDER |
+ V_ADP_INITIALIZED;
+ if (vid_register(adp) < 0)
+ return (ENXIO);
+ adp->va_flags |= V_ADP_REGISTERED;
+
+ return (0);
+}
+
+static int
+creator_get_info(video_adapter_t *adp, int mode, video_info_t *info)
+{
+
+ bcopy(&adp->va_info, info, sizeof(*info));
+ return (0);
+}
+
+static int
+creator_query_mode(video_adapter_t *adp, video_info_t *info)
+{
+
+ return (ENODEV);
+}
+
+static int
+creator_set_mode(video_adapter_t *adp, int mode)
+{
+ struct creator_softc *sc;
+
+ sc = (struct creator_softc *)adp;
+ sc->sc_bg_cache = -1;
+ sc->sc_fg_cache = -1;
+ sc->sc_fontinc_cache = -1;
+ sc->sc_fontw_cache = -1;
+ sc->sc_pmask_cache = -1;
+
+ creator_ras_wait(sc);
+ sc->sc_fifo_cache = 0;
+ creator_ras_fifo_wait(sc, 2);
+ FFB_WRITE(sc, FFB_FBC, FFB_FBC_PPC, FBC_PPC_VCE_DIS |
+ FBC_PPC_TBE_OPAQUE | FBC_PPC_APE_DIS | FBC_PPC_CS_CONST);
+ FFB_WRITE(sc, FFB_FBC, FFB_FBC_FBC, FFB_FBC_WB_A | FFB_FBC_RB_A |
+ FFB_FBC_SB_BOTH | FFB_FBC_XE_OFF | FFB_FBC_RGBE_MASK);
+ return (0);
+}
+
+static int
+creator_save_font(video_adapter_t *adp, int page, int size, int width,
+ u_char *data, int c, int count)
+{
+
+ return (ENODEV);
+}
+
+static int
+creator_load_font(video_adapter_t *adp, int page, int size, int width,
+ u_char *data, int c, int count)
+{
+
+ return (ENODEV);
+}
+
+static int
+creator_show_font(video_adapter_t *adp, int page)
+{
+
+ return (ENODEV);
+}
+
+static int
+creator_save_palette(video_adapter_t *adp, u_char *palette)
+{
+
+ return (ENODEV);
+}
+
+static int
+creator_load_palette(video_adapter_t *adp, u_char *palette)
+{
+
+ return (ENODEV);
+}
+
+static int
+creator_set_border(video_adapter_t *adp, int border)
+{
+ struct creator_softc *sc;
+
+ sc = (struct creator_softc *)adp;
+ creator_fill_rect(adp, border, 0, 0, sc->sc_width, sc->sc_ymargin);
+ creator_fill_rect(adp, border, 0, sc->sc_height - sc->sc_ymargin,
+ sc->sc_width, sc->sc_ymargin);
+ creator_fill_rect(adp, border, 0, 0, sc->sc_xmargin, sc->sc_height);
+ creator_fill_rect(adp, border, sc->sc_width - sc->sc_xmargin, 0,
+ sc->sc_xmargin, sc->sc_height);
+ return (0);
+}
+
+static int
+creator_save_state(video_adapter_t *adp, void *p, size_t size)
+{
+
+ return (ENODEV);
+}
+
+static int
+creator_load_state(video_adapter_t *adp, void *p)
+{
+
+ return (ENODEV);
+}
+
+static int
+creator_set_win_org(video_adapter_t *adp, off_t offset)
+{
+
+ return (ENODEV);
+}
+
+static int
+creator_read_hw_cursor(video_adapter_t *adp, int *col, int *row)
+{
+
+ *col = 0;
+ *row = 0;
+ return (0);
+}
+
+static int
+creator_set_hw_cursor(video_adapter_t *adp, int col, int row)
+{
+
+ return (ENODEV);
+}
+
+static int
+creator_set_hw_cursor_shape(video_adapter_t *adp, int base, int height,
+ int celsize, int blink)
+{
+
+ return (ENODEV);
+}
+
+static int
+creator_blank_display(video_adapter_t *adp, int mode)
+{
+ struct creator_softc *sc;
+ uint32_t v;
+ int i;
+
+ sc = (struct creator_softc *)adp;
+ FFB_WRITE(sc, FFB_DAC, FFB_DAC_TYPE, FFB_DAC_CFG_TGEN);
+ v = FFB_READ(sc, FFB_DAC, FFB_DAC_VALUE);
+ switch (mode) {
+ case V_DISPLAY_ON:
+ v |= FFB_DAC_CFG_TGEN_VIDE;
+ break;
+ case V_DISPLAY_BLANK:
+ case V_DISPLAY_STAND_BY:
+ case V_DISPLAY_SUSPEND:
+ v &= ~FFB_DAC_CFG_TGEN_VIDE;
+ break;
+ }
+ FFB_WRITE(sc, FFB_DAC, FFB_DAC_TYPE, FFB_DAC_CFG_TGEN);
+ FFB_WRITE(sc, FFB_DAC, FFB_DAC_VALUE, v);
+ for (i = 0; i < 10; i++) {
+ FFB_WRITE(sc, FFB_DAC, FFB_DAC_TYPE, FFB_DAC_CFG_TGEN);
+ (void)FFB_READ(sc, FFB_DAC, FFB_DAC_VALUE);
+ }
+ return (0);
+}
+
+static int
+creator_mmap(video_adapter_t *adp, vm_offset_t offset, vm_paddr_t *paddr,
+ int prot)
+{
+
+ return (EINVAL);
+}
+
+static int
+creator_ioctl(video_adapter_t *adp, u_long cmd, caddr_t data)
+{
+ struct creator_softc *sc;
+ struct fbcursor *fbc;
+ struct fbtype *fb;
+
+ sc = (struct creator_softc *)adp;
+ switch (cmd) {
+ case FBIOGTYPE:
+ fb = (struct fbtype *)data;
+ fb->fb_type = FBTYPE_CREATOR;
+ fb->fb_height = sc->sc_height;
+ fb->fb_width = sc->sc_width;
+ fb->fb_depth = fb->fb_cmsize = fb->fb_size = 0;
+ break;
+ case FBIOSCURSOR:
+ fbc = (struct fbcursor *)data;
+ if (fbc->set & FB_CUR_SETCUR && fbc->enable == 0) {
+ creator_cursor_enable(sc, 0);
+ sc->sc_flags &= ~CREATOR_CUREN;
+ } else
+ return (ENODEV);
+ break;
+ break;
+ default:
+ return (fb_commonioctl(adp, cmd, data));
+ }
+ return (0);
+}
+
+static int
+creator_clear(video_adapter_t *adp)
+{
+ struct creator_softc *sc;
+
+ sc = (struct creator_softc *)adp;
+ creator_fill_rect(adp, (SC_NORM_ATTR >> 4) & 0xf, 0, 0, sc->sc_width,
+ sc->sc_height);
+ return (0);
+}
+
+static int
+creator_fill_rect(video_adapter_t *adp, int val, int x, int y, int cx, int cy)
+{
+ struct creator_softc *sc;
+
+ sc = (struct creator_softc *)adp;
+ creator_ras_setpmask(sc, 0xffffffff);
+ creator_ras_fifo_wait(sc, 2);
+ FFB_WRITE(sc, FFB_FBC, FFB_FBC_ROP, FBC_ROP_NEW);
+ FFB_WRITE(sc, FFB_FBC, FFB_FBC_DRAWOP, FBC_DRAWOP_RECTANGLE);
+ creator_ras_setfg(sc, cmap[val & 0xf]);
+ /*
+ * Note that at least the Elite3D cards are sensitive to the order
+ * of operations here.
+ */
+ creator_ras_fifo_wait(sc, 4);
+ FFB_WRITE(sc, FFB_FBC, FFB_FBC_BY, y);
+ FFB_WRITE(sc, FFB_FBC, FFB_FBC_BX, x);
+ FFB_WRITE(sc, FFB_FBC, FFB_FBC_BH, cy);
+ FFB_WRITE(sc, FFB_FBC, FFB_FBC_BW, cx);
+ creator_ras_wait(sc);
+ return (0);
+}
+
+static int
+creator_bitblt(video_adapter_t *adp, ...)
+{
+
+ return (ENODEV);
+}
+
+static int
+creator_diag(video_adapter_t *adp, int level)
+{
+ video_info_t info;
+
+ fb_dump_adp_info(adp->va_name, adp, level);
+ creator_get_info(adp, 0, &info);
+ fb_dump_mode_info(adp->va_name, adp, &info, level);
+ return (0);
+}
+
+static int
+creator_save_cursor_palette(video_adapter_t *adp, u_char *palette)
+{
+
+ return (ENODEV);
+}
+
+static int
+creator_load_cursor_palette(video_adapter_t *adp, u_char *palette)
+{
+
+ return (ENODEV);
+}
+
+static int
+creator_copy(video_adapter_t *adp, vm_offset_t src, vm_offset_t dst, int n)
+{
+
+ return (ENODEV);
+}
+
+static int
+creator_putp(video_adapter_t *adp, vm_offset_t off, u_int32_t p, u_int32_t a,
+ int size, int bpp, int bit_ltor, int byte_ltor)
+{
+
+ return (ENODEV);
+}
+
+static int
+creator_putc(video_adapter_t *adp, vm_offset_t off, u_int8_t c, u_int8_t a)
+{
+ struct creator_softc *sc;
+ uint16_t *p;
+ int row;
+ int col;
+ int i;
+
+ sc = (struct creator_softc *)adp;
+ row = (off / adp->va_info.vi_width) * adp->va_info.vi_cheight;
+ col = (off % adp->va_info.vi_width) * adp->va_info.vi_cwidth;
+ p = (uint16_t *)sc->sc_font + (c * adp->va_info.vi_cheight);
+ creator_ras_setfg(sc, cmap[a & 0xf]);
+ creator_ras_setbg(sc, cmap[(a >> 4) & 0xf]);
+ creator_ras_fifo_wait(sc, 1 + adp->va_info.vi_cheight);
+ FFB_WRITE(sc, FFB_FBC, FFB_FBC_FONTXY,
+ ((row + sc->sc_ymargin) << 16) | (col + sc->sc_xmargin));
+ creator_ras_setfontw(sc, adp->va_info.vi_cwidth);
+ creator_ras_setfontinc(sc, 0x10000);
+ for (i = 0; i < adp->va_info.vi_cheight; i++) {
+ FFB_WRITE(sc, FFB_FBC, FFB_FBC_FONT, *p++ << 16);
+ }
+ return (0);
+}
+
+static int
+creator_puts(video_adapter_t *adp, vm_offset_t off, u_int16_t *s, int len)
+{
+ int i;
+
+ for (i = 0; i < len; i++) {
+ (*vidsw[adp->va_index]->putc)(adp, off + i, s[i] & 0xff,
+ (s[i] & 0xff00) >> 8);
+ }
+ return (0);
+}
+
+static int
+creator_putm(video_adapter_t *adp, int x, int y, u_int8_t *pixel_image,
+ u_int32_t pixel_mask, int size, int width)
+{
+ struct creator_softc *sc;
+
+ sc = (struct creator_softc *)adp;
+ if (!(sc->sc_flags & CREATOR_CUREN)) {
+ creator_cursor_install(sc);
+ creator_cursor_enable(sc, 1);
+ sc->sc_flags |= CREATOR_CUREN;
+ }
+ FFB_WRITE(sc, FFB_DAC, FFB_DAC_TYPE2, FFB_DAC_CUR_POS);
+ FFB_WRITE(sc, FFB_DAC, FFB_DAC_VALUE2,
+ ((y + sc->sc_ymargin) << 16) | (x + sc->sc_xmargin));
+ return (0);
+}
+
+static void
+creator_cursor_enable(struct creator_softc *sc, int onoff)
+{
+ int v;
+
+ FFB_WRITE(sc, FFB_DAC, FFB_DAC_TYPE2, FFB_DAC_CUR_CTRL);
+ if (sc->sc_flags & CREATOR_CURINV)
+ v = onoff ? FFB_DAC_CUR_CTRL_P0 | FFB_DAC_CUR_CTRL_P1 : 0;
+ else
+ v = onoff ? 0 : FFB_DAC_CUR_CTRL_P0 | FFB_DAC_CUR_CTRL_P1;
+ FFB_WRITE(sc, FFB_DAC, FFB_DAC_VALUE2, v);
+}
+
+static void
+creator_cursor_install(struct creator_softc *sc)
+{
+ int i, j;
+
+ creator_cursor_enable(sc, 0);
+ FFB_WRITE(sc, FFB_DAC, FFB_DAC_TYPE2, FFB_DAC_CUR_COLOR1);
+ FFB_WRITE(sc, FFB_DAC, FFB_DAC_VALUE2, 0xffffff);
+ FFB_WRITE(sc, FFB_DAC, FFB_DAC_VALUE2, 0x0);
+ for (i = 0; i < 2; i++) {
+ FFB_WRITE(sc, FFB_DAC, FFB_DAC_TYPE2,
+ i ? FFB_DAC_CUR_BITMAP_P0 : FFB_DAC_CUR_BITMAP_P1);
+ for (j = 0; j < 64; j++) {
+ FFB_WRITE(sc, FFB_DAC, FFB_DAC_VALUE2,
+ *(const uint32_t *)(&creator_mouse_pointer[j][0]));
+ FFB_WRITE(sc, FFB_DAC, FFB_DAC_VALUE2,
+ *(const uint32_t *)(&creator_mouse_pointer[j][4]));
+ }
+ }
+}
diff --git a/sys/dev/fb/fb.c b/sys/dev/fb/fb.c
new file mode 100644
index 000000000000..0878feb299d0
--- /dev/null
+++ b/sys/dev/fb/fb.c
@@ -0,0 +1,762 @@
+/*-
+ * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
+ * All rights reserved.
+ *
+ * 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 as
+ * the first lines of this file unmodified.
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``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 AUTHORS 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include "opt_fb.h"
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/conf.h>
+#include <sys/bus.h>
+#include <sys/kernel.h>
+#include <sys/malloc.h>
+#include <sys/module.h>
+#include <sys/uio.h>
+#include <sys/fbio.h>
+#include <sys/linker_set.h>
+
+#include <vm/vm.h>
+#include <vm/pmap.h>
+
+#include <dev/fb/fbreg.h>
+
+SET_DECLARE(videodriver_set, const video_driver_t);
+
+/* local arrays */
+
+/*
+ * We need at least one entry each in order to initialize a video card
+ * for the kernel console. The arrays will be increased dynamically
+ * when necessary.
+ */
+
+static int vid_malloc;
+static int adapters = 1;
+static video_adapter_t *adp_ini;
+static video_adapter_t **adapter = &adp_ini;
+static video_switch_t *vidsw_ini;
+ video_switch_t **vidsw = &vidsw_ini;
+
+#ifdef FB_INSTALL_CDEV
+static struct cdevsw *vidcdevsw_ini;
+static struct cdevsw **vidcdevsw = &vidcdevsw_ini;
+#endif
+
+#define ARRAY_DELTA 4
+
+static int
+vid_realloc_array(void)
+{
+ video_adapter_t **new_adp;
+ video_switch_t **new_vidsw;
+#ifdef FB_INSTALL_CDEV
+ struct cdevsw **new_cdevsw;
+#endif
+ int newsize;
+ int s;
+
+ if (!vid_malloc)
+ return ENOMEM;
+
+ s = spltty();
+ newsize = ((adapters + ARRAY_DELTA)/ARRAY_DELTA)*ARRAY_DELTA;
+ new_adp = malloc(sizeof(*new_adp)*newsize, M_DEVBUF, M_WAITOK | M_ZERO);
+ new_vidsw = malloc(sizeof(*new_vidsw)*newsize, M_DEVBUF,
+ M_WAITOK | M_ZERO);
+#ifdef FB_INSTALL_CDEV
+ new_cdevsw = malloc(sizeof(*new_cdevsw)*newsize, M_DEVBUF,
+ M_WAITOK | M_ZERO);
+#endif
+ bcopy(adapter, new_adp, sizeof(*adapter)*adapters);
+ bcopy(vidsw, new_vidsw, sizeof(*vidsw)*adapters);
+#ifdef FB_INSTALL_CDEV
+ bcopy(vidcdevsw, new_cdevsw, sizeof(*vidcdevsw)*adapters);
+#endif
+ if (adapters > 1) {
+ free(adapter, M_DEVBUF);
+ free(vidsw, M_DEVBUF);
+#ifdef FB_INSTALL_CDEV
+ free(vidcdevsw, M_DEVBUF);
+#endif
+ }
+ adapter = new_adp;
+ vidsw = new_vidsw;
+#ifdef FB_INSTALL_CDEV
+ vidcdevsw = new_cdevsw;
+#endif
+ adapters = newsize;
+ splx(s);
+
+ if (bootverbose)
+ printf("fb: new array size %d\n", adapters);
+
+ return 0;
+}
+
+static void
+vid_malloc_init(void *arg)
+{
+ vid_malloc = TRUE;
+}
+
+SYSINIT(vid_mem, SI_SUB_KMEM, SI_ORDER_ANY, vid_malloc_init, NULL);
+
+/*
+ * Low-level frame buffer driver functions
+ * frame buffer subdrivers, such as the VGA driver, call these functions
+ * to initialize the video_adapter structure and register it to the virtual
+ * frame buffer driver `fb'.
+ */
+
+/* initialize the video_adapter_t structure */
+void
+vid_init_struct(video_adapter_t *adp, char *name, int type, int unit)
+{
+ adp->va_flags = 0;
+ adp->va_name = name;
+ adp->va_type = type;
+ adp->va_unit = unit;
+}
+
+/* Register a video adapter */
+int
+vid_register(video_adapter_t *adp)
+{
+ const video_driver_t **list;
+ const video_driver_t *p;
+ int index;
+
+ for (index = 0; index < adapters; ++index) {
+ if (adapter[index] == NULL)
+ break;
+ }
+ if (index >= adapters) {
+ if (vid_realloc_array())
+ return -1;
+ }
+
+ adp->va_index = index;
+ adp->va_token = NULL;
+ SET_FOREACH(list, videodriver_set) {
+ p = *list;
+ if (strcmp(p->name, adp->va_name) == 0) {
+ adapter[index] = adp;
+ vidsw[index] = p->vidsw;
+ return index;
+ }
+ }
+
+ return -1;
+}
+
+int
+vid_unregister(video_adapter_t *adp)
+{
+ if ((adp->va_index < 0) || (adp->va_index >= adapters))
+ return ENOENT;
+ if (adapter[adp->va_index] != adp)
+ return ENOENT;
+
+ adapter[adp->va_index] = NULL;
+ vidsw[adp->va_index] = NULL;
+ return 0;
+}
+
+/* Get video I/O function table */
+video_switch_t
+*vid_get_switch(char *name)
+{
+ const video_driver_t **list;
+ const video_driver_t *p;
+
+ SET_FOREACH(list, videodriver_set) {
+ p = *list;
+ if (strcmp(p->name, name) == 0)
+ return p->vidsw;
+ }
+
+ return NULL;
+}
+
+/*
+ * Video card client functions
+ * Video card clients, such as the console driver `syscons' and the frame
+ * buffer cdev driver, use these functions to claim and release a card for
+ * exclusive use.
+ */
+
+/* find the video card specified by a driver name and a unit number */
+int
+vid_find_adapter(char *driver, int unit)
+{
+ int i;
+
+ for (i = 0; i < adapters; ++i) {
+ if (adapter[i] == NULL)
+ continue;
+ if (strcmp("*", driver) && strcmp(adapter[i]->va_name, driver))
+ continue;
+ if ((unit != -1) && (adapter[i]->va_unit != unit))
+ continue;
+ return i;
+ }
+ return -1;
+}
+
+/* allocate a video card */
+int
+vid_allocate(char *driver, int unit, void *id)
+{
+ int index;
+ int s;
+
+ s = spltty();
+ index = vid_find_adapter(driver, unit);
+ if (index >= 0) {
+ if (adapter[index]->va_token) {
+ splx(s);
+ return -1;
+ }
+ adapter[index]->va_token = id;
+ }
+ splx(s);
+ return index;
+}
+
+int
+vid_release(video_adapter_t *adp, void *id)
+{
+ int error;
+ int s;
+
+ s = spltty();
+ if (adp->va_token == NULL) {
+ error = EINVAL;
+ } else if (adp->va_token != id) {
+ error = EPERM;
+ } else {
+ adp->va_token = NULL;
+ error = 0;
+ }
+ splx(s);
+ return error;
+}
+
+/* Get a video adapter structure */
+video_adapter_t
+*vid_get_adapter(int index)
+{
+ if ((index < 0) || (index >= adapters))
+ return NULL;
+ return adapter[index];
+}
+
+/* Configure drivers: this is a backdoor for the console driver XXX */
+int
+vid_configure(int flags)
+{
+ const video_driver_t **list;
+ const video_driver_t *p;
+
+ SET_FOREACH(list, videodriver_set) {
+ p = *list;
+ if (p->configure != NULL)
+ (*p->configure)(flags);
+ }
+
+ return 0;
+}
+
+/*
+ * Virtual frame buffer cdev driver functions
+ * The virtual frame buffer driver dispatches driver functions to
+ * appropriate subdrivers.
+ */
+
+#define FB_DRIVER_NAME "fb"
+
+#ifdef FB_INSTALL_CDEV
+
+#if experimental
+
+static devclass_t fb_devclass;
+
+static int fbprobe(device_t dev);
+static int fbattach(device_t dev);
+
+static device_method_t fb_methods[] = {
+ DEVMETHOD(device_probe, fbprobe),
+ DEVMETHOD(device_attach, fbattach),
+
+ DEVMETHOD(bus_print_child, bus_generic_print_child),
+ { 0, 0 }
+};
+
+static driver_t fb_driver = {
+ FB_DRIVER_NAME,
+ fb_methods,
+ 0,
+};
+
+static int
+fbprobe(device_t dev)
+{
+ int unit;
+
+ unit = device_get_unit(dev);
+ if (unit >= adapters)
+ return ENXIO;
+ if (adapter[unit] == NULL)
+ return ENXIO;
+
+ device_set_desc(dev, "generic frame buffer");
+ return 0;
+}
+
+static int
+fbattach(device_t dev)
+{
+ printf("fbattach: about to attach children\n");
+ bus_generic_attach(dev);
+ return 0;
+}
+
+#endif /* experimental */
+
+#define FB_UNIT(dev) minor(dev)
+#define FB_MKMINOR(unit) (u)
+
+#if experimental
+static d_open_t fbopen;
+static d_close_t fbclose;
+static d_read_t fbread;
+static d_write_t fbwrite;
+static d_ioctl_t fbioctl;
+static d_mmap_t fbmmap;
+
+
+static struct cdevsw fb_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
+ .d_open = fbopen,
+ .d_close = fbclose,
+ .d_read = fbread,
+ .d_write = fbwrite,
+ .d_ioctl = fbioctl,
+ .d_mmap = fbmmap,
+ .d_name = FB_DRIVER_NAME,
+};
+#endif
+
+
+static int
+fb_modevent(module_t mod, int type, void *data)
+{
+
+ switch (type) {
+ case MOD_LOAD:
+ break;
+ case MOD_UNLOAD:
+ printf("fb module unload - not possible for this module type\n");
+ return EINVAL;
+ default:
+ return EOPNOTSUPP;
+ }
+ return 0;
+}
+
+static moduledata_t fb_mod = {
+ "fb",
+ fb_modevent,
+ NULL
+};
+
+DECLARE_MODULE(fb, fb_mod, SI_SUB_PSEUDO, SI_ORDER_ANY);
+
+int
+fb_attach(int unit, video_adapter_t *adp, struct cdevsw *cdevsw)
+{
+ int s;
+
+ if (adp->va_index >= adapters)
+ return EINVAL;
+ if (adapter[adp->va_index] != adp)
+ return EINVAL;
+
+ s = spltty();
+ adp->va_minor = unit;
+ vidcdevsw[adp->va_index] = cdevsw;
+ splx(s);
+
+ printf("fb%d at %s%d\n", adp->va_index, adp->va_name, adp->va_unit);
+ return 0;
+}
+
+int
+fb_detach(int unit, video_adapter_t *adp, struct cdevsw *cdevsw)
+{
+ int s;
+
+ if (adp->va_index >= adapters)
+ return EINVAL;
+ if (adapter[adp->va_index] != adp)
+ return EINVAL;
+ if (vidcdevsw[adp->va_index] != cdevsw)
+ return EINVAL;
+
+ s = spltty();
+ vidcdevsw[adp->va_index] = NULL;
+ splx(s);
+ return 0;
+}
+
+/*
+ * Generic frame buffer cdev driver functions
+ * Frame buffer subdrivers may call these functions to implement common
+ * driver functions.
+ */
+
+int genfbopen(genfb_softc_t *sc, video_adapter_t *adp, int flag, int mode,
+ struct thread *td)
+{
+ int s;
+
+ s = spltty();
+ if (!(sc->gfb_flags & FB_OPEN))
+ sc->gfb_flags |= FB_OPEN;
+ splx(s);
+ return 0;
+}
+
+int genfbclose(genfb_softc_t *sc, video_adapter_t *adp, int flag, int mode,
+ struct thread *td)
+{
+ int s;
+
+ s = spltty();
+ sc->gfb_flags &= ~FB_OPEN;
+ splx(s);
+ return 0;
+}
+
+int genfbread(genfb_softc_t *sc, video_adapter_t *adp, struct uio *uio,
+ int flag)
+{
+ int size;
+ int offset;
+ int error;
+ int len;
+
+ error = 0;
+ size = adp->va_buffer_size/adp->va_info.vi_planes;
+ while (uio->uio_resid > 0) {
+ if (uio->uio_offset >= size)
+ break;
+ offset = uio->uio_offset%adp->va_window_size;
+ len = imin(uio->uio_resid, size - uio->uio_offset);
+ len = imin(len, adp->va_window_size - offset);
+ if (len <= 0)
+ break;
+ (*vidsw[adp->va_index]->set_win_org)(adp, uio->uio_offset);
+ error = uiomove((caddr_t)(adp->va_window + offset), len, uio);
+ if (error)
+ break;
+ }
+ return error;
+}
+
+int genfbwrite(genfb_softc_t *sc, video_adapter_t *adp, struct uio *uio,
+ int flag)
+{
+ return ENODEV;
+}
+
+int genfbioctl(genfb_softc_t *sc, video_adapter_t *adp, u_long cmd,
+ caddr_t arg, int flag, struct thread *td)
+{
+ int error;
+
+ if (adp == NULL) /* XXX */
+ return ENXIO;
+ error = (*vidsw[adp->va_index]->ioctl)(adp, cmd, arg);
+ if (error == ENOIOCTL)
+ error = ENODEV;
+ return error;
+}
+
+int genfbmmap(genfb_softc_t *sc, video_adapter_t *adp, vm_offset_t offset,
+ vm_offset_t *paddr, int prot)
+{
+ return (*vidsw[adp->va_index]->mmap)(adp, offset, paddr, prot);
+}
+
+#endif /* FB_INSTALL_CDEV */
+
+static char
+*adapter_name(int type)
+{
+ static struct {
+ int type;
+ char *name;
+ } names[] = {
+ { KD_MONO, "MDA" },
+ { KD_HERCULES, "Hercules" },
+ { KD_CGA, "CGA" },
+ { KD_EGA, "EGA" },
+ { KD_VGA, "VGA" },
+ { KD_PC98, "PC-98x1" },
+ { KD_TGA, "TGA" },
+ { -1, "Unknown" },
+ };
+ int i;
+
+ for (i = 0; names[i].type != -1; ++i)
+ if (names[i].type == type)
+ break;
+ return names[i].name;
+}
+
+/*
+ * Generic low-level frame buffer functions
+ * The low-level functions in the frame buffer subdriver may use these
+ * functions.
+ */
+
+void
+fb_dump_adp_info(char *driver, video_adapter_t *adp, int level)
+{
+ if (level <= 0)
+ return;
+
+ printf("%s%d: %s%d, %s, type:%s (%d), flags:0x%x\n",
+ FB_DRIVER_NAME, adp->va_index, driver, adp->va_unit, adp->va_name,
+ adapter_name(adp->va_type), adp->va_type, adp->va_flags);
+ printf("%s%d: port:0x%lx-0x%lx, crtc:0x%lx, mem:0x%lx 0x%x\n",
+ FB_DRIVER_NAME, adp->va_index, (u_long)adp->va_io_base,
+ (u_long)adp->va_io_base + adp->va_io_size - 1,
+ (u_long)adp->va_crtc_addr, (u_long)adp->va_mem_base,
+ adp->va_mem_size);
+ printf("%s%d: init mode:%d, bios mode:%d, current mode:%d\n",
+ FB_DRIVER_NAME, adp->va_index,
+ adp->va_initial_mode, adp->va_initial_bios_mode, adp->va_mode);
+ printf("%s%d: window:%p size:%dk gran:%dk, buf:%p size:%dk\n",
+ FB_DRIVER_NAME, adp->va_index,
+ (void *)adp->va_window, (int)adp->va_window_size/1024,
+ (int)adp->va_window_gran/1024, (void *)adp->va_buffer,
+ (int)adp->va_buffer_size/1024);
+}
+
+void
+fb_dump_mode_info(char *driver, video_adapter_t *adp, video_info_t *info,
+ int level)
+{
+ if (level <= 0)
+ return;
+
+ printf("%s%d: %s, mode:%d, flags:0x%x ",
+ driver, adp->va_unit, adp->va_name, info->vi_mode, info->vi_flags);
+ if (info->vi_flags & V_INFO_GRAPHICS)
+ printf("G %dx%dx%d, %d plane(s), font:%dx%d, ",
+ info->vi_width, info->vi_height,
+ info->vi_depth, info->vi_planes,
+ info->vi_cwidth, info->vi_cheight);
+ else
+ printf("T %dx%d, font:%dx%d, ",
+ info->vi_width, info->vi_height,
+ info->vi_cwidth, info->vi_cheight);
+ printf("win:0x%lx\n", (u_long)info->vi_window);
+}
+
+int
+fb_type(int adp_type)
+{
+ static struct {
+ int fb_type;
+ int va_type;
+ } types[] = {
+ { FBTYPE_MDA, KD_MONO },
+ { FBTYPE_HERCULES, KD_HERCULES },
+ { FBTYPE_CGA, KD_CGA },
+ { FBTYPE_EGA, KD_EGA },
+ { FBTYPE_VGA, KD_VGA },
+ { FBTYPE_PC98, KD_PC98 },
+ { FBTYPE_TGA, KD_TGA },
+ };
+ int i;
+
+ for (i = 0; i < sizeof(types)/sizeof(types[0]); ++i) {
+ if (types[i].va_type == adp_type)
+ return types[i].fb_type;
+ }
+ return -1;
+}
+
+int
+fb_commonioctl(video_adapter_t *adp, u_long cmd, caddr_t arg)
+{
+ int error;
+ int s;
+
+ /* assert(adp != NULL) */
+
+ error = 0;
+ s = spltty();
+
+ switch (cmd) {
+
+ case FBIO_ADAPTER: /* get video adapter index */
+ *(int *)arg = adp->va_index;
+ break;
+
+ case FBIO_ADPTYPE: /* get video adapter type */
+ *(int *)arg = adp->va_type;
+ break;
+
+ case FBIO_ADPINFO: /* get video adapter info */
+ ((video_adapter_info_t *)arg)->va_index = adp->va_index;
+ ((video_adapter_info_t *)arg)->va_type = adp->va_type;
+ bcopy(adp->va_name, ((video_adapter_info_t *)arg)->va_name,
+ imin(strlen(adp->va_name) + 1,
+ sizeof(((video_adapter_info_t *)arg)->va_name)));
+ ((video_adapter_info_t *)arg)->va_unit = adp->va_unit;
+ ((video_adapter_info_t *)arg)->va_flags = adp->va_flags;
+ ((video_adapter_info_t *)arg)->va_io_base = adp->va_io_base;
+ ((video_adapter_info_t *)arg)->va_io_size = adp->va_io_size;
+ ((video_adapter_info_t *)arg)->va_crtc_addr = adp->va_crtc_addr;
+ ((video_adapter_info_t *)arg)->va_mem_base = adp->va_mem_base;
+ ((video_adapter_info_t *)arg)->va_mem_size = adp->va_mem_size;
+ ((video_adapter_info_t *)arg)->va_window
+#ifdef __i386__
+ = vtophys(adp->va_window);
+#else
+ = adp->va_window;
+#endif
+ ((video_adapter_info_t *)arg)->va_window_size
+ = adp->va_window_size;
+ ((video_adapter_info_t *)arg)->va_window_gran
+ = adp->va_window_gran;
+ ((video_adapter_info_t *)arg)->va_window_orig
+ = adp->va_window_orig;
+ ((video_adapter_info_t *)arg)->va_unused0
+#ifdef __i386__
+ = (adp->va_buffer) ? vtophys(adp->va_buffer) : 0;
+#else
+ = adp->va_buffer;
+#endif
+ ((video_adapter_info_t *)arg)->va_buffer_size
+ = adp->va_buffer_size;
+ ((video_adapter_info_t *)arg)->va_mode = adp->va_mode;
+ ((video_adapter_info_t *)arg)->va_initial_mode
+ = adp->va_initial_mode;
+ ((video_adapter_info_t *)arg)->va_initial_bios_mode
+ = adp->va_initial_bios_mode;
+ ((video_adapter_info_t *)arg)->va_line_width
+ = adp->va_line_width;
+ ((video_adapter_info_t *)arg)->va_disp_start.x
+ = adp->va_disp_start.x;
+ ((video_adapter_info_t *)arg)->va_disp_start.y
+ = adp->va_disp_start.y;
+ break;
+
+ case FBIO_MODEINFO: /* get mode information */
+ error = (*vidsw[adp->va_index]->get_info)(adp,
+ ((video_info_t *)arg)->vi_mode,
+ (video_info_t *)arg);
+ if (error)
+ error = ENODEV;
+ break;
+
+ case FBIO_FINDMODE: /* find a matching video mode */
+ error = (*vidsw[adp->va_index]->query_mode)(adp,
+ (video_info_t *)arg);
+ break;
+
+ case FBIO_GETMODE: /* get video mode */
+ *(int *)arg = adp->va_mode;
+ break;
+
+ case FBIO_SETMODE: /* set video mode */
+ error = (*vidsw[adp->va_index]->set_mode)(adp, *(int *)arg);
+ if (error)
+ error = ENODEV; /* EINVAL? */
+ break;
+
+ case FBIO_GETWINORG: /* get frame buffer window origin */
+ *(u_int *)arg = adp->va_window_orig;
+ break;
+
+ case FBIO_GETDISPSTART: /* get display start address */
+ ((video_display_start_t *)arg)->x = adp->va_disp_start.x;
+ ((video_display_start_t *)arg)->y = adp->va_disp_start.y;
+ break;
+
+ case FBIO_GETLINEWIDTH: /* get scan line width in bytes */
+ *(u_int *)arg = adp->va_line_width;
+ break;
+
+ case FBIO_BLANK: /* blank display */
+ error = (*vidsw[adp->va_index]->blank_display)(adp, *(int *)arg);
+ break;
+
+ case FBIO_GETPALETTE: /* get color palette */
+ case FBIO_SETPALETTE: /* set color palette */
+ /* XXX */
+
+ case FBIOPUTCMAP:
+ case FBIOGETCMAP:
+ case FBIOPUTCMAPI:
+ case FBIOGETCMAPI:
+ /* XXX */
+
+ case FBIO_SETWINORG: /* set frame buffer window origin */
+ case FBIO_SETDISPSTART: /* set display start address */
+ case FBIO_SETLINEWIDTH: /* set scan line width in pixel */
+
+ case FBIOGTYPE:
+ case FBIOGATTR:
+ case FBIOSVIDEO:
+ case FBIOGVIDEO:
+ case FBIOVERTICAL:
+ case FBIOSCURSOR:
+ case FBIOGCURSOR:
+ case FBIOSCURPOS:
+ case FBIOGCURPOS:
+ case FBIOGCURMAX:
+ case FBIOMONINFO:
+ case FBIOGXINFO:
+
+ default:
+ error = ENODEV;
+ break;
+ }
+
+ splx(s);
+ return error;
+}
diff --git a/sys/dev/fb/fbreg.h b/sys/dev/fb/fbreg.h
new file mode 100644
index 000000000000..1e829460de34
--- /dev/null
+++ b/sys/dev/fb/fbreg.h
@@ -0,0 +1,278 @@
+/*-
+ * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
+ * All rights reserved.
+ *
+ * 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 as
+ * the first lines of this file unmodified.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _DEV_FB_FBREG_H_
+#define _DEV_FB_FBREG_H_
+
+#ifdef _KERNEL
+
+#define V_MAX_ADAPTERS 8 /* XXX */
+
+/* some macros */
+#ifdef __i386__
+#define bcopy_io(s, d, c) generic_bcopy((void *)(s), (void *)(d), (c))
+#define bcopy_toio(s, d, c) generic_bcopy((void *)(s), (void *)(d), (c))
+#define bcopy_fromio(s, d, c) generic_bcopy((void *)(s), (void *)(d), (c))
+#define bzero_io(d, c) generic_bzero((void *)(d), (c))
+#define fill_io(p, d, c) fill((p), (void *)(d), (c))
+#define fillw_io(p, d, c) fillw((p), (void *)(d), (c))
+void generic_bcopy(const void *s, void *d, size_t c);
+void generic_bzero(void *d, size_t c);
+#elif __amd64__
+#define bcopy_io(s, d, c) bcopy((void *)(s), (void *)(d), (c))
+#define bcopy_toio(s, d, c) bcopy((void *)(s), (void *)(d), (c))
+#define bcopy_fromio(s, d, c) bcopy((void *)(s), (void *)(d), (c))
+#define bzero_io(d, c) bzero((void *)(d), (c))
+#define fill_io(p, d, c) fill((p), (void *)(d), (c))
+#define fillw_io(p, d, c) fillw((p), (void *)(d), (c))
+#elif __ia64__
+#include <machine/bus.h>
+#define bcopy_fromio(s, d, c) \
+ bus_space_read_region_1(IA64_BUS_SPACE_MEM, s, 0, (void*)(d), c)
+#define bcopy_io(s, d, c) \
+ bus_space_copy_region_1(IA64_BUS_SPACE_MEM, s, 0, d, 0, c)
+#define bcopy_toio(s, d, c) \
+ bus_space_write_region_1(IA64_BUS_SPACE_MEM, d, 0, (void*)(s), c)
+#define bzero_io(d, c) \
+ bus_space_set_region_1(IA64_BUS_SPACE_MEM, (intptr_t)(d), 0, 0, c)
+#define fill_io(p, d, c) \
+ bus_space_set_region_1(IA64_BUS_SPACE_MEM, (intptr_t)(d), 0, p, c)
+#define fillw_io(p, d, c) \
+ bus_space_set_region_2(IA64_BUS_SPACE_MEM, (intptr_t)(d), 0, p, c)
+#define readb(a) bus_space_read_1(IA64_BUS_SPACE_MEM, a, 0)
+#define readw(a) bus_space_read_2(IA64_BUS_SPACE_MEM, a, 0)
+#define writeb(a, v) bus_space_write_1(IA64_BUS_SPACE_MEM, a, 0, v)
+#define writew(a, v) bus_space_write_2(IA64_BUS_SPACE_MEM, a, 0, v)
+#define writel(a, v) bus_space_write_4(IA64_BUS_SPACE_MEM, a, 0, v)
+static __inline void
+fillw(int val, uint16_t *buf, size_t size)
+{
+ while (size--)
+ *buf++ = val;
+}
+#elif __powerpc__
+
+#define bcopy_io(s, d, c) ofwfb_bcopy((void *)(s), (void *)(d), (c))
+#define bcopy_toio(s, d, c) ofwfb_bcopy((void *)(s), (void *)(d), (c))
+#define bcopy_fromio(s, d, c) ofwfb_bcopy((void *)(s), (void *)(d), (c))
+#define bzero_io(d, c) ofwfb_bzero((void *)(d), (c))
+#define fillw(p, d, c) ofwfb_fillw((p), (void *)(d), (c))
+#define fillw_io(p, d, c) ofwfb_fillw((p), (void *)(d), (c))
+#define readw(a) ofwfb_readw((u_int16_t *)(a))
+#define writew(a, v) ofwfb_writew((u_int16_t *)(a), (v))
+void ofwfb_bcopy(const void *s, void *d, size_t c);
+void ofwfb_bzero(void *d, size_t c);
+void ofwfb_fillw(int pat, void *base, size_t cnt);
+u_int16_t ofwfb_readw(u_int16_t *addr);
+void ofwfb_writew(u_int16_t *addr, u_int16_t val);
+
+#else /* !__i386__ && !__ia64__ && !__amd64__ && !__powerpc__ */
+#define bcopy_io(s, d, c) memcpy_io((d), (s), (c))
+#define bcopy_toio(s, d, c) memcpy_toio((d), (void *)(s), (c))
+#define bcopy_fromio(s, d, c) memcpy_fromio((void *)(d), (s), (c))
+#define bzero_io(d, c) memset_io((d), 0, (c))
+#define fill_io(p, d, c) memset_io((d), (p), (c))
+#define fillw(p, d, c) memsetw((d), (p), (c))
+#define fillw_io(p, d, c) memsetw_io((d), (p), (c))
+#endif /* !__i386__ */
+
+/* video function table */
+typedef int vi_probe_t(int unit, video_adapter_t **adpp, void *arg, int flags);
+typedef int vi_init_t(int unit, video_adapter_t *adp, int flags);
+typedef int vi_get_info_t(video_adapter_t *adp, int mode, video_info_t *info);
+typedef int vi_query_mode_t(video_adapter_t *adp, video_info_t *info);
+typedef int vi_set_mode_t(video_adapter_t *adp, int mode);
+typedef int vi_save_font_t(video_adapter_t *adp, int page, int size, int width,
+ u_char *data, int c, int count);
+typedef int vi_load_font_t(video_adapter_t *adp, int page, int size, int width,
+ u_char *data, int c, int count);
+typedef int vi_show_font_t(video_adapter_t *adp, int page);
+typedef int vi_save_palette_t(video_adapter_t *adp, u_char *palette);
+typedef int vi_load_palette_t(video_adapter_t *adp, u_char *palette);
+typedef int vi_set_border_t(video_adapter_t *adp, int border);
+typedef int vi_save_state_t(video_adapter_t *adp, void *p, size_t size);
+typedef int vi_load_state_t(video_adapter_t *adp, void *p);
+typedef int vi_set_win_org_t(video_adapter_t *adp, off_t offset);
+typedef int vi_read_hw_cursor_t(video_adapter_t *adp, int *col, int *row);
+typedef int vi_set_hw_cursor_t(video_adapter_t *adp, int col, int row);
+typedef int vi_set_hw_cursor_shape_t(video_adapter_t *adp, int base,
+ int height, int celsize, int blink);
+typedef int vi_blank_display_t(video_adapter_t *adp, int mode);
+/* defined in sys/fbio.h
+#define V_DISPLAY_ON 0
+#define V_DISPLAY_BLANK 1
+#define V_DISPLAY_STAND_BY 2
+#define V_DISPLAY_SUSPEND 3
+*/
+typedef int vi_mmap_t(video_adapter_t *adp, vm_offset_t offset,
+ vm_paddr_t *paddr, int prot);
+typedef int vi_ioctl_t(video_adapter_t *adp, u_long cmd, caddr_t data);
+typedef int vi_clear_t(video_adapter_t *adp);
+typedef int vi_fill_rect_t(video_adapter_t *adp, int val, int x, int y,
+ int cx, int cy);
+typedef int vi_bitblt_t(video_adapter_t *adp, ...);
+typedef int vi_diag_t(video_adapter_t *adp, int level);
+typedef int vi_save_cursor_palette_t(video_adapter_t *adp, u_char *palette);
+typedef int vi_load_cursor_palette_t(video_adapter_t *adp, u_char *palette);
+typedef int vi_copy_t(video_adapter_t *adp, vm_offset_t src, vm_offset_t dst,
+ int n);
+typedef int vi_putp_t(video_adapter_t *adp, vm_offset_t off, u_int32_t p,
+ u_int32_t a, int size, int bpp, int bit_ltor,
+ int byte_ltor);
+typedef int vi_putc_t(video_adapter_t *adp, vm_offset_t off, u_int8_t c,
+ u_int8_t a);
+typedef int vi_puts_t(video_adapter_t *adp, vm_offset_t off, u_int16_t *s,
+ int len);
+typedef int vi_putm_t(video_adapter_t *adp, int x, int y, u_int8_t *pixel_image,
+ u_int32_t pixel_mask, int size, int width);
+
+typedef struct video_switch {
+ vi_probe_t *probe;
+ vi_init_t *init;
+ vi_get_info_t *get_info;
+ vi_query_mode_t *query_mode;
+ vi_set_mode_t *set_mode;
+ vi_save_font_t *save_font;
+ vi_load_font_t *load_font;
+ vi_show_font_t *show_font;
+ vi_save_palette_t *save_palette;
+ vi_load_palette_t *load_palette;
+ vi_set_border_t *set_border;
+ vi_save_state_t *save_state;
+ vi_load_state_t *load_state;
+ vi_set_win_org_t *set_win_org;
+ vi_read_hw_cursor_t *read_hw_cursor;
+ vi_set_hw_cursor_t *set_hw_cursor;
+ vi_set_hw_cursor_shape_t *set_hw_cursor_shape;
+ vi_blank_display_t *blank_display;
+ vi_mmap_t *mmap;
+ vi_ioctl_t *ioctl;
+ vi_clear_t *clear;
+ vi_fill_rect_t *fill_rect;
+ vi_bitblt_t *bitblt;
+ int (*reserved1)(void);
+ int (*reserved2)(void);
+ vi_diag_t *diag;
+ vi_save_cursor_palette_t *save_cursor_palette;
+ vi_load_cursor_palette_t *load_cursor_palette;
+ vi_copy_t *copy;
+ vi_putp_t *putp;
+ vi_putc_t *putc;
+ vi_puts_t *puts;
+ vi_putm_t *putm;
+} video_switch_t;
+
+#define save_palette(adp, pal) \
+ (*vidsw[(adp)->va_index]->save_palette)((adp), (pal))
+#define load_palette(adp, pal) \
+ (*vidsw[(adp)->va_index]->load_palette)((adp), (pal))
+#define get_mode_info(adp, mode, buf) \
+ (*vidsw[(adp)->va_index]->get_info)((adp), (mode), (buf))
+#define set_video_mode(adp, mode) \
+ (*vidsw[(adp)->va_index]->set_mode)((adp), (mode))
+#define set_border(adp, border) \
+ (*vidsw[(adp)->va_index]->set_border)((adp), (border))
+#define set_origin(adp, o) \
+ (*vidsw[(adp)->va_index]->set_win_org)(adp, o)
+
+/* XXX - add more macros */
+
+/* video driver */
+typedef struct video_driver {
+ char *name;
+ video_switch_t *vidsw;
+ int (*configure)(int); /* backdoor for the console driver */
+} video_driver_t;
+
+#define VIDEO_DRIVER(name, sw, config) \
+ static struct video_driver name##_driver = { \
+ #name, &sw, config \
+ }; \
+ DATA_SET(videodriver_set, name##_driver);
+
+/* global variables */
+extern struct video_switch **vidsw;
+
+/* functions for the video card driver */
+int vid_register(video_adapter_t *adp);
+int vid_unregister(video_adapter_t *adp);
+video_switch_t *vid_get_switch(char *name);
+void vid_init_struct(video_adapter_t *adp, char *name, int type,
+ int unit);
+
+/* functions for the video card client */
+int vid_allocate(char *driver, int unit, void *id);
+int vid_release(video_adapter_t *adp, void *id);
+int vid_find_adapter(char *driver, int unit);
+video_adapter_t *vid_get_adapter(int index);
+
+/* a backdoor for the console driver to tickle the video driver XXX */
+int vid_configure(int flags);
+#define VIO_PROBE_ONLY (1 << 0) /* probe only, don't initialize */
+
+#ifdef FB_INSTALL_CDEV
+
+/* virtual frame buffer driver functions */
+int fb_attach(int unit, video_adapter_t *adp,
+ struct cdevsw *cdevsw);
+int fb_detach(int unit, video_adapter_t *adp,
+ struct cdevsw *cdevsw);
+
+/* generic frame buffer cdev driver functions */
+
+typedef struct genfb_softc {
+ int gfb_flags; /* flag/status bits */
+#define FB_OPEN (1 << 0)
+} genfb_softc_t;
+
+int genfbopen(genfb_softc_t *sc, video_adapter_t *adp,
+ int flag, int mode, struct thread *td);
+int genfbclose(genfb_softc_t *sc, video_adapter_t *adp,
+ int flag, int mode, struct thread *td);
+int genfbread(genfb_softc_t *sc, video_adapter_t *adp,
+ struct uio *uio, int flag);
+int genfbwrite(genfb_softc_t *sc, video_adapter_t *adp,
+ struct uio *uio, int flag);
+int genfbioctl(genfb_softc_t *sc, video_adapter_t *adp,
+ u_long cmd, caddr_t arg, int flag, struct thread *td);
+int genfbmmap(genfb_softc_t *sc, video_adapter_t *adp,
+ vm_offset_t offset, vm_offset_t *paddr, int prot);
+
+#endif /* FB_INSTALL_CDEV */
+
+/* generic low-level driver functions */
+
+void fb_dump_adp_info(char *driver, video_adapter_t *adp, int level);
+void fb_dump_mode_info(char *driver, video_adapter_t *adp,
+ video_info_t *info, int level);
+int fb_type(int adp_type);
+int fb_commonioctl(video_adapter_t *adp, u_long cmd, caddr_t arg);
+
+#endif /* _KERNEL */
+
+#endif /* !_DEV_FB_FBREG_H_ */
diff --git a/sys/dev/fb/gallant12x22.h b/sys/dev/fb/gallant12x22.h
new file mode 100644
index 000000000000..a089f6a2ec46
--- /dev/null
+++ b/sys/dev/fb/gallant12x22.h
@@ -0,0 +1,6185 @@
+/* $OpenBSD: gallant12x22.h,v 1.2 2002/05/09 08:59:03 maja Exp $ */
+/* $NetBSD: gallant12x22.h,v 1.2 1999/05/18 21:51:58 ad 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.
+ * 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.
+ *
+ * Derived from: @(#)gallant19.h 8.1 (Berkeley) 6/11/93
+ *
+ * $FreeBSD$
+ */
+
+static u_char gallant12x22_data[] = {
+ /* 0 0x00 '^@' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 1 0x01 '^A' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 2 0x02 '^B' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 3 0x03 '^C' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 4 0x04 '^D' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 5 0x05 '^E' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 6 0x06 '^F' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 7 0x07 '^G' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 8 0x08 '^H' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 9 0x09 '^I' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 10 0x0a '^J' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 11 0x0b '^K' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 12 0x0c '^L' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 13 0x0d '^M' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 14 0x0e '^N' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 15 0x0f '^O' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 16 0x10 '^P' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 17 0x11 '^Q' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 18 0x12 '^R' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 19 0x13 '^S' */
+ 0x00, 0x00, /* ............ */
+ 0x31, 0x80, /* ..**...**... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x31, 0x80, /* ..**...**... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 20 0x14 '^T' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x1f, 0xf0, /* ...********* */
+ 0x3c, 0xc0, /* ..****..**.. */
+ 0x7c, 0xc0, /* .*****..**.. */
+ 0x7c, 0xc0, /* .*****..**.. */
+ 0x7c, 0xc0, /* .*****..**.. */
+ 0x3c, 0xc0, /* ..****..**.. */
+ 0x1c, 0xc0, /* ...***..**.. */
+ 0x0c, 0xc0, /* ....**..**.. */
+ 0x0c, 0xc0, /* ....**..**.. */
+ 0x0c, 0xc0, /* ....**..**.. */
+ 0x0c, 0xc0, /* ....**..**.. */
+ 0x0c, 0xc0, /* ....**..**.. */
+ 0x0c, 0xc0, /* ....**..**.. */
+ 0x1c, 0xe0, /* ...***..***. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 21 0x15 '^U' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x1f, 0x00, /* ...*****.... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x1f, 0x00, /* ...*****.... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x1f, 0x00, /* ...*****.... */
+ 0x01, 0x80, /* .......**... */
+ 0x01, 0x80, /* .......**... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x1f, 0x00, /* ...*****.... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 22 0x16 '^V' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 23 0x17 '^W' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 24 0x18 '^X' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 25 0x19 '^Y' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 26 0x1a '^Z' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 27 0x1b '^[' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 28 0x1c '^\' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 29 0x1d '^]' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 30 0x1e '^^' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 31 0x1f '^_' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 32 0x20 ' ' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 33 0x21 '!' */
+ 0x00, 0x00, /* ............ */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 34 0x22 '"' */
+ 0x00, 0x00, /* ............ */
+ 0x19, 0x80, /* ...**..**... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 35 0x23 '#' */
+ 0x00, 0x00, /* ............ */
+ 0x03, 0x30, /* ......**..** */
+ 0x03, 0x30, /* ......**..** */
+ 0x03, 0x30, /* ......**..** */
+ 0x06, 0x60, /* .....**..**. */
+ 0x1f, 0xf0, /* ...********* */
+ 0x1f, 0xf0, /* ...********* */
+ 0x0c, 0xc0, /* ....**..**.. */
+ 0x0c, 0xc0, /* ....**..**.. */
+ 0x19, 0x80, /* ...**..**... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x7f, 0xc0, /* .*********.. */
+ 0x7f, 0xc0, /* .*********.. */
+ 0x33, 0x00, /* ..**..**.... */
+ 0x66, 0x00, /* .**..**..... */
+ 0x66, 0x00, /* .**..**..... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 36 0x24 '$' */
+ 0x00, 0x00, /* ............ */
+ 0x06, 0x00, /* .....**..... */
+ 0x1f, 0x80, /* ...******... */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x66, 0xe0, /* .**..**.***. */
+ 0x66, 0x60, /* .**..**..**. */
+ 0x66, 0x00, /* .**..**..... */
+ 0x3e, 0x00, /* ..*****..... */
+ 0x1f, 0x80, /* ...******... */
+ 0x07, 0xc0, /* .....*****.. */
+ 0x06, 0x60, /* .....**..**. */
+ 0x06, 0x60, /* .....**..**. */
+ 0x66, 0x60, /* .**..**..**. */
+ 0x7f, 0xc0, /* .*********.. */
+ 0x3f, 0x80, /* ..*******... */
+ 0x06, 0x00, /* .....**..... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 37 0x25 '%' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x38, 0xc0, /* ..***...**.. */
+ 0x4c, 0xc0, /* .*..**..**.. */
+ 0x45, 0x80, /* .*...*.**... */
+ 0x65, 0x80, /* .**..*.**... */
+ 0x3b, 0x00, /* ..***.**.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0d, 0xc0, /* ....**.***.. */
+ 0x1a, 0x60, /* ...**.*..**. */
+ 0x1a, 0x20, /* ...**.*...*. */
+ 0x33, 0x20, /* ..**..**..*. */
+ 0x31, 0xc0, /* ..**...***.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 38 0x26 '&' */
+ 0x00, 0x00, /* ............ */
+ 0x07, 0x00, /* .....***.... */
+ 0x0f, 0x80, /* ....*****... */
+ 0x18, 0xc0, /* ...**...**.. */
+ 0x18, 0xc0, /* ...**...**.. */
+ 0x18, 0xc0, /* ...**...**.. */
+ 0x0f, 0x80, /* ....*****... */
+ 0x1e, 0x00, /* ...****..... */
+ 0x3e, 0x00, /* ..*****..... */
+ 0x77, 0x00, /* .***.***.... */
+ 0x63, 0x60, /* .**...**.**. */
+ 0x61, 0xe0, /* .**....****. */
+ 0x61, 0xc0, /* .**....***.. */
+ 0x61, 0x80, /* .**....**... */
+ 0x3f, 0xe0, /* ..*********. */
+ 0x1e, 0x60, /* ...****..**. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 39 0x27 ''' */
+ 0x00, 0x00, /* ............ */
+ 0x0c, 0x00, /* ....**...... */
+ 0x1e, 0x00, /* ...****..... */
+ 0x1e, 0x00, /* ...****..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x18, 0x00, /* ...**....... */
+ 0x10, 0x00, /* ...*........ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 40 0x28 '(' */
+ 0x00, 0x00, /* ............ */
+ 0x01, 0x80, /* .......**... */
+ 0x03, 0x00, /* ......**.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x03, 0x00, /* ......**.... */
+ 0x01, 0x80, /* .......**... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 41 0x29 ')' */
+ 0x00, 0x00, /* ............ */
+ 0x18, 0x00, /* ...**....... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x03, 0x00, /* ......**.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x18, 0x00, /* ...**....... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 42 0x2a '*' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x00, /* ....****.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x66, 0x60, /* .**..**..**. */
+ 0x76, 0xe0, /* .***.**.***. */
+ 0x19, 0x80, /* ...**..**... */
+ 0x00, 0x00, /* ............ */
+ 0x19, 0x80, /* ...**..**... */
+ 0x76, 0xe0, /* .***.**.***. */
+ 0x66, 0x60, /* .**..**..**. */
+ 0x06, 0x00, /* .....**..... */
+ 0x0f, 0x00, /* ....****.... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 43 0x2b '+' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x7f, 0xe0, /* .**********. */
+ 0x7f, 0xe0, /* .**********. */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 44 0x2c ',' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0c, 0x00, /* ....**...... */
+ 0x1e, 0x00, /* ...****..... */
+ 0x1e, 0x00, /* ...****..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x18, 0x00, /* ...**....... */
+ 0x10, 0x00, /* ...*........ */
+ 0x00, 0x00, /* ............ */
+
+ /* 45 0x2d '-' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x7f, 0xe0, /* .**********. */
+ 0x7f, 0xe0, /* .**********. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 46 0x2e '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0c, 0x00, /* ....**...... */
+ 0x1e, 0x00, /* ...****..... */
+ 0x1e, 0x00, /* ...****..... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 47 0x2f '/' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x60, /* .........**. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x01, 0x80, /* .......**... */
+ 0x01, 0x80, /* .......**... */
+ 0x03, 0x00, /* ......**.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x18, 0x00, /* ...**....... */
+ 0x18, 0x00, /* ...**....... */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x60, 0x00, /* .**......... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 48 0x30 '0' */
+ 0x00, 0x00, /* ............ */
+ 0x07, 0x00, /* .....***.... */
+ 0x0f, 0x80, /* ....*****... */
+ 0x11, 0x80, /* ...*...**... */
+ 0x10, 0xc0, /* ...*....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0x80, /* ..**....*... */
+ 0x18, 0x80, /* ...**...*... */
+ 0x1f, 0x00, /* ...*****.... */
+ 0x0e, 0x00, /* ....***..... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 49 0x31 '1' */
+ 0x00, 0x00, /* ............ */
+ 0x02, 0x00, /* ......*..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x0e, 0x00, /* ....***..... */
+ 0x1e, 0x00, /* ...****..... */
+ 0x36, 0x00, /* ..**.**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 50 0x32 '2' */
+ 0x00, 0x00, /* ............ */
+ 0x1f, 0x00, /* ...*****.... */
+ 0x3f, 0x80, /* ..*******... */
+ 0x61, 0xc0, /* .**....***.. */
+ 0x40, 0xc0, /* .*......**.. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x01, 0x80, /* .......**... */
+ 0x03, 0x00, /* ......**.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x18, 0x00, /* ...**....... */
+ 0x30, 0x20, /* ..**......*. */
+ 0x7f, 0xe0, /* .**********. */
+ 0x7f, 0xe0, /* .**********. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 51 0x33 '3' */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x80, /* ....*****... */
+ 0x1f, 0xc0, /* ...*******.. */
+ 0x20, 0xe0, /* ..*.....***. */
+ 0x40, 0x60, /* .*.......**. */
+ 0x00, 0x60, /* .........**. */
+ 0x00, 0xe0, /* ........***. */
+ 0x07, 0xc0, /* .....*****.. */
+ 0x0f, 0xc0, /* ....******.. */
+ 0x00, 0xe0, /* ........***. */
+ 0x00, 0x60, /* .........**. */
+ 0x00, 0x60, /* .........**. */
+ 0x40, 0x60, /* .*.......**. */
+ 0x60, 0x40, /* .**......*.. */
+ 0x3f, 0x80, /* ..*******... */
+ 0x1f, 0x00, /* ...*****.... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 52 0x34 '4' */
+ 0x00, 0x00, /* ............ */
+ 0x01, 0x80, /* .......**... */
+ 0x03, 0x80, /* ......***... */
+ 0x03, 0x80, /* ......***... */
+ 0x05, 0x80, /* .....*.**... */
+ 0x05, 0x80, /* .....*.**... */
+ 0x09, 0x80, /* ....*..**... */
+ 0x09, 0x80, /* ....*..**... */
+ 0x11, 0x80, /* ...*...**... */
+ 0x11, 0x80, /* ...*...**... */
+ 0x21, 0x80, /* ..*....**... */
+ 0x3f, 0xe0, /* ..*********. */
+ 0x7f, 0xe0, /* .**********. */
+ 0x01, 0x80, /* .......**... */
+ 0x01, 0x80, /* .......**... */
+ 0x01, 0x80, /* .......**... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 53 0x35 '5' */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0xc0, /* ....******.. */
+ 0x0f, 0xc0, /* ....******.. */
+ 0x10, 0x00, /* ...*........ */
+ 0x10, 0x00, /* ...*........ */
+ 0x20, 0x00, /* ..*......... */
+ 0x3f, 0x80, /* ..*******... */
+ 0x31, 0xc0, /* ..**...***.. */
+ 0x00, 0xe0, /* ........***. */
+ 0x00, 0x60, /* .........**. */
+ 0x00, 0x60, /* .........**. */
+ 0x00, 0x60, /* .........**. */
+ 0x40, 0x60, /* .*.......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x1f, 0x80, /* ...******... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 54 0x36 '6' */
+ 0x00, 0x00, /* ............ */
+ 0x07, 0x00, /* .....***.... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x18, 0x00, /* ...**....... */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x60, 0x00, /* .**......... */
+ 0x67, 0x80, /* .**..****... */
+ 0x6f, 0xc0, /* .**.******.. */
+ 0x70, 0xe0, /* .***....***. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x70, 0x40, /* .***.....*.. */
+ 0x3f, 0x80, /* ..*******... */
+ 0x1f, 0x00, /* ...*****.... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 55 0x37 '7' */
+ 0x00, 0x00, /* ............ */
+ 0x1f, 0xe0, /* ...********. */
+ 0x3f, 0xe0, /* ..*********. */
+ 0x60, 0x40, /* .**......*.. */
+ 0x00, 0x40, /* .........*.. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x00, 0x80, /* ........*... */
+ 0x00, 0x80, /* ........*... */
+ 0x01, 0x80, /* .......**... */
+ 0x01, 0x00, /* .......*.... */
+ 0x01, 0x00, /* .......*.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x02, 0x00, /* ......*..... */
+ 0x02, 0x00, /* ......*..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x04, 0x00, /* .....*...... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 56 0x38 '8' */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x00, /* ....****.... */
+ 0x11, 0x80, /* ...*...**... */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x18, 0x80, /* ...**...*... */
+ 0x0d, 0x00, /* ....**.*.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x0b, 0x00, /* ....*.**.... */
+ 0x11, 0x80, /* ...*...**... */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x18, 0x80, /* ...**...*... */
+ 0x0f, 0x00, /* ....****.... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 57 0x39 '9' */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x80, /* ....*****... */
+ 0x11, 0xc0, /* ...*...***.. */
+ 0x20, 0xe0, /* ..*.....***. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x70, 0xe0, /* .***....***. */
+ 0x3f, 0x60, /* ..******.**. */
+ 0x1e, 0x60, /* ...****..**. */
+ 0x00, 0x60, /* .........**. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x01, 0x80, /* .......**... */
+ 0x07, 0x00, /* .....***.... */
+ 0x3c, 0x00, /* ..****...... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 58 0x3a ':' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0c, 0x00, /* ....**...... */
+ 0x1e, 0x00, /* ...****..... */
+ 0x1e, 0x00, /* ...****..... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0c, 0x00, /* ....**...... */
+ 0x1e, 0x00, /* ...****..... */
+ 0x1e, 0x00, /* ...****..... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 59 0x3b ';' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0c, 0x00, /* ....**...... */
+ 0x1e, 0x00, /* ...****..... */
+ 0x1e, 0x00, /* ...****..... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0c, 0x00, /* ....**...... */
+ 0x1e, 0x00, /* ...****..... */
+ 0x1e, 0x00, /* ...****..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x18, 0x00, /* ...**....... */
+ 0x10, 0x00, /* ...*........ */
+ 0x00, 0x00, /* ............ */
+
+ /* 60 0x3c '<' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x60, /* .........**. */
+ 0x01, 0xc0, /* .......***.. */
+ 0x07, 0x00, /* .....***.... */
+ 0x1c, 0x00, /* ...***...... */
+ 0x70, 0x00, /* .***........ */
+ 0x70, 0x00, /* .***........ */
+ 0x1c, 0x00, /* ...***...... */
+ 0x07, 0x00, /* .....***.... */
+ 0x01, 0xc0, /* .......***.. */
+ 0x00, 0x60, /* .........**. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 61 0x3d '=' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x7f, 0xe0, /* .**********. */
+ 0x7f, 0xe0, /* .**********. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x7f, 0xe0, /* .**********. */
+ 0x7f, 0xe0, /* .**********. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 62 0x3e '>' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x60, 0x00, /* .**......... */
+ 0x38, 0x00, /* ..***....... */
+ 0x0e, 0x00, /* ....***..... */
+ 0x03, 0x80, /* ......***... */
+ 0x00, 0xe0, /* ........***. */
+ 0x00, 0xe0, /* ........***. */
+ 0x03, 0x80, /* ......***... */
+ 0x0e, 0x00, /* ....***..... */
+ 0x38, 0x00, /* ..***....... */
+ 0x60, 0x00, /* .**......... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 63 0x3f '?' */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x00, /* ....****.... */
+ 0x1f, 0x80, /* ...******... */
+ 0x39, 0xc0, /* ..***..***.. */
+ 0x20, 0xc0, /* ..*.....**.. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x01, 0x80, /* .......**... */
+ 0x03, 0x00, /* ......**.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 64 0x40 '@' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x80, /* ....*****... */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x30, 0x60, /* ..**.....**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x67, 0x20, /* .**..***..*. */
+ 0x6f, 0xa0, /* .**.*****.*. */
+ 0x6c, 0xa0, /* .**.**..*.*. */
+ 0x6c, 0xa0, /* .**.**..*.*. */
+ 0x67, 0xe0, /* .**..******. */
+ 0x60, 0x00, /* .**......... */
+ 0x30, 0x00, /* ..**........ */
+ 0x3f, 0xe0, /* ..*********. */
+ 0x0f, 0xe0, /* ....*******. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 65 0x41 'A' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x0b, 0x00, /* ....*.**.... */
+ 0x0b, 0x00, /* ....*.**.... */
+ 0x09, 0x00, /* ....*..*.... */
+ 0x11, 0x80, /* ...*...**... */
+ 0x11, 0x80, /* ...*...**... */
+ 0x10, 0x80, /* ...*....*... */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x20, 0xc0, /* ..*.....**.. */
+ 0x20, 0x40, /* ..*......*.. */
+ 0x40, 0x60, /* .*.......**. */
+ 0x40, 0x60, /* .*.......**. */
+ 0xe0, 0xf0, /* ***.....**** */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 66 0x42 'B' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xff, 0x00, /* ********.... */
+ 0x60, 0x80, /* .**.....*... */
+ 0x60, 0xc0, /* .**.....**.. */
+ 0x60, 0xc0, /* .**.....**.. */
+ 0x60, 0xc0, /* .**.....**.. */
+ 0x61, 0x80, /* .**....**... */
+ 0x7f, 0x80, /* .********... */
+ 0x60, 0xc0, /* .**.....**.. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0xc0, /* .**.....**.. */
+ 0xff, 0x80, /* *********... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 67 0x43 'C' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0xc0, /* ....******.. */
+ 0x10, 0x60, /* ...*.....**. */
+ 0x20, 0x20, /* ..*.......*. */
+ 0x20, 0x00, /* ..*......... */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x20, 0x00, /* ..*......... */
+ 0x30, 0x20, /* ..**......*. */
+ 0x18, 0x40, /* ...**....*.. */
+ 0x0f, 0x80, /* ....*****... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 68 0x44 'D' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xff, 0x00, /* ********.... */
+ 0x61, 0xc0, /* .**....***.. */
+ 0x60, 0xc0, /* .**.....**.. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x40, /* .**......*.. */
+ 0x61, 0x80, /* .**....**... */
+ 0xfe, 0x00, /* *******..... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 69 0x45 'E' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x7f, 0xc0, /* .*********.. */
+ 0x30, 0x40, /* ..**.....*.. */
+ 0x30, 0x40, /* ..**.....*.. */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x80, /* ..**....*... */
+ 0x3f, 0x80, /* ..*******... */
+ 0x30, 0x80, /* ..**....*... */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x20, /* ..**......*. */
+ 0x30, 0x20, /* ..**......*. */
+ 0x7f, 0xe0, /* .**********. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 70 0x46 'F' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x7f, 0xc0, /* .*********.. */
+ 0x30, 0x40, /* ..**.....*.. */
+ 0x30, 0x40, /* ..**.....*.. */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x80, /* ..**....*... */
+ 0x3f, 0x80, /* ..*******... */
+ 0x30, 0x80, /* ..**....*... */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x78, 0x00, /* .****....... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 71 0x47 'G' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0xc0, /* ....******.. */
+ 0x10, 0x60, /* ...*.....**. */
+ 0x20, 0x20, /* ..*.......*. */
+ 0x20, 0x00, /* ..*......... */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x61, 0xf0, /* .**....***** */
+ 0x60, 0x60, /* .**......**. */
+ 0x20, 0x60, /* ..*......**. */
+ 0x30, 0x60, /* ..**.....**. */
+ 0x18, 0x60, /* ...**....**. */
+ 0x0f, 0x80, /* ....*****... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 72 0x48 'H' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xf0, 0xf0, /* ****....**** */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x7f, 0xe0, /* .**********. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0xf0, 0xf0, /* ****....**** */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 73 0x49 'I' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x1f, 0x80, /* ...******... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x1f, 0x80, /* ...******... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 74 0x4a 'J' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x1f, 0x80, /* ...******... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x04, 0x00, /* .....*...... */
+ 0x38, 0x00, /* ..***....... */
+ 0x30, 0x00, /* ..**........ */
+ 0x00, 0x00, /* ............ */
+
+ /* 75 0x4b 'K' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xf0, 0xe0, /* ****....***. */
+ 0x61, 0x80, /* .**....**... */
+ 0x63, 0x00, /* .**...**.... */
+ 0x66, 0x00, /* .**..**..... */
+ 0x6c, 0x00, /* .**.**...... */
+ 0x78, 0x00, /* .****....... */
+ 0x78, 0x00, /* .****....... */
+ 0x7c, 0x00, /* .*****...... */
+ 0x6e, 0x00, /* .**.***..... */
+ 0x67, 0x00, /* .**..***.... */
+ 0x63, 0x80, /* .**...***... */
+ 0x61, 0xc0, /* .**....***.. */
+ 0x60, 0xe0, /* .**.....***. */
+ 0xf0, 0x70, /* ****.....*** */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 76 0x4c 'L' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x78, 0x00, /* .****....... */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x20, /* ..**......*. */
+ 0x30, 0x20, /* ..**......*. */
+ 0x7f, 0xe0, /* .**********. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 77 0x4d 'M' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xe0, 0x70, /* ***......*** */
+ 0x60, 0xe0, /* .**.....***. */
+ 0x70, 0xe0, /* .***....***. */
+ 0x70, 0xe0, /* .***....***. */
+ 0x70, 0xe0, /* .***....***. */
+ 0x59, 0x60, /* .*.**..*.**. */
+ 0x59, 0x60, /* .*.**..*.**. */
+ 0x59, 0x60, /* .*.**..*.**. */
+ 0x4d, 0x60, /* .*..**.*.**. */
+ 0x4e, 0x60, /* .*..***..**. */
+ 0x4e, 0x60, /* .*..***..**. */
+ 0x44, 0x60, /* .*...*...**. */
+ 0x44, 0x60, /* .*...*...**. */
+ 0xe4, 0xf0, /* ***..*..**** */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 78 0x4e 'N' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xc0, 0x70, /* **.......*** */
+ 0x60, 0x20, /* .**.......*. */
+ 0x70, 0x20, /* .***......*. */
+ 0x78, 0x20, /* .****.....*. */
+ 0x58, 0x20, /* .*.**.....*. */
+ 0x4c, 0x20, /* .*..**....*. */
+ 0x46, 0x20, /* .*...**...*. */
+ 0x47, 0x20, /* .*...***..*. */
+ 0x43, 0x20, /* .*....**..*. */
+ 0x41, 0xa0, /* .*.....**.*. */
+ 0x40, 0xe0, /* .*......***. */
+ 0x40, 0xe0, /* .*......***. */
+ 0x40, 0x60, /* .*.......**. */
+ 0xe0, 0x30, /* ***.......** */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 79 0x4f 'O' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x00, /* ....****.... */
+ 0x11, 0xc0, /* ...*...***.. */
+ 0x20, 0xc0, /* ..*.....**.. */
+ 0x20, 0x60, /* ..*......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x20, 0x40, /* ..*......*.. */
+ 0x30, 0x40, /* ..**.....*.. */
+ 0x18, 0x80, /* ...**...*... */
+ 0x0f, 0x00, /* ....****.... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 80 0x50 'P' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x7f, 0x80, /* .********... */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0x60, /* ..**.....**. */
+ 0x30, 0x60, /* ..**.....**. */
+ 0x30, 0x60, /* ..**.....**. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x37, 0x80, /* ..**.****... */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x78, 0x00, /* .****....... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 81 0x51 'Q' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x00, /* ....****.... */
+ 0x11, 0xc0, /* ...*...***.. */
+ 0x20, 0xc0, /* ..*.....**.. */
+ 0x20, 0x60, /* ..*......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x30, 0x40, /* ..**.....*.. */
+ 0x38, 0x40, /* ..***....*.. */
+ 0x1f, 0x80, /* ...******... */
+ 0x0e, 0x00, /* ....***..... */
+ 0x1f, 0x00, /* ...*****.... */
+ 0x23, 0x90, /* ..*...***..* */
+ 0x01, 0xe0, /* .......****. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 82 0x52 'R' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xff, 0x00, /* ********.... */
+ 0x61, 0x80, /* .**....**... */
+ 0x60, 0xc0, /* .**.....**.. */
+ 0x60, 0xc0, /* .**.....**.. */
+ 0x60, 0xc0, /* .**.....**.. */
+ 0x60, 0x80, /* .**.....*... */
+ 0x7f, 0x00, /* .*******.... */
+ 0x7c, 0x00, /* .*****...... */
+ 0x6e, 0x00, /* .**.***..... */
+ 0x67, 0x00, /* .**..***.... */
+ 0x63, 0x80, /* .**...***... */
+ 0x61, 0xc0, /* .**....***.. */
+ 0x60, 0xe0, /* .**.....***. */
+ 0xf0, 0x70, /* ****.....*** */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 83 0x53 'S' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x1f, 0xe0, /* ...********. */
+ 0x30, 0x60, /* ..**.....**. */
+ 0x60, 0x20, /* .**.......*. */
+ 0x60, 0x20, /* .**.......*. */
+ 0x70, 0x00, /* .***........ */
+ 0x3c, 0x00, /* ..****...... */
+ 0x1e, 0x00, /* ...****..... */
+ 0x07, 0x80, /* .....****... */
+ 0x01, 0xc0, /* .......***.. */
+ 0x00, 0xe0, /* ........***. */
+ 0x40, 0x60, /* .*.......**. */
+ 0x40, 0x60, /* .*.......**. */
+ 0x60, 0xc0, /* .**.....**.. */
+ 0x7f, 0x80, /* .********... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 84 0x54 'T' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x7f, 0xe0, /* .**********. */
+ 0x46, 0x20, /* .*...**...*. */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x1f, 0x80, /* ...******... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 85 0x55 'U' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xf0, 0x70, /* ****.....*** */
+ 0x60, 0x20, /* .**.......*. */
+ 0x60, 0x20, /* .**.......*. */
+ 0x60, 0x20, /* .**.......*. */
+ 0x60, 0x20, /* .**.......*. */
+ 0x60, 0x20, /* .**.......*. */
+ 0x60, 0x20, /* .**.......*. */
+ 0x60, 0x20, /* .**.......*. */
+ 0x60, 0x20, /* .**.......*. */
+ 0x60, 0x20, /* .**.......*. */
+ 0x60, 0x20, /* .**.......*. */
+ 0x70, 0x40, /* .***.....*.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x1f, 0x80, /* ...******... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 86 0x56 'V' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xe0, 0xe0, /* ***.....***. */
+ 0x60, 0x40, /* .**......*.. */
+ 0x30, 0x80, /* ..**....*... */
+ 0x30, 0x80, /* ..**....*... */
+ 0x30, 0x80, /* ..**....*... */
+ 0x19, 0x00, /* ...**..*.... */
+ 0x19, 0x00, /* ...**..*.... */
+ 0x19, 0x00, /* ...**..*.... */
+ 0x0a, 0x00, /* ....*.*..... */
+ 0x0e, 0x00, /* ....***..... */
+ 0x0e, 0x00, /* ....***..... */
+ 0x04, 0x00, /* .....*...... */
+ 0x04, 0x00, /* .....*...... */
+ 0x04, 0x00, /* .....*...... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 87 0x57 'W' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xfe, 0xf0, /* *******.**** */
+ 0x66, 0x20, /* .**..**...*. */
+ 0x66, 0x20, /* .**..**...*. */
+ 0x66, 0x20, /* .**..**...*. */
+ 0x76, 0x20, /* .***.**...*. */
+ 0x77, 0x40, /* .***.***.*.. */
+ 0x33, 0x40, /* ..**..**.*.. */
+ 0x37, 0x40, /* ..**.***.*.. */
+ 0x3b, 0xc0, /* ..***.****.. */
+ 0x3b, 0x80, /* ..***.***... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 88 0x58 'X' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xf0, 0x70, /* ****.....*** */
+ 0x60, 0x20, /* .**.......*. */
+ 0x30, 0x40, /* ..**.....*.. */
+ 0x38, 0x80, /* ..***...*... */
+ 0x18, 0x80, /* ...**...*... */
+ 0x0d, 0x00, /* ....**.*.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x0b, 0x00, /* ....*.**.... */
+ 0x11, 0x80, /* ...*...**... */
+ 0x11, 0xc0, /* ...*...***.. */
+ 0x20, 0xc0, /* ..*.....**.. */
+ 0x40, 0x60, /* .*.......**. */
+ 0xe0, 0xf0, /* ***.....**** */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 89 0x59 'Y' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xf0, 0x70, /* ****.....*** */
+ 0x60, 0x20, /* .**.......*. */
+ 0x30, 0x40, /* ..**.....*.. */
+ 0x18, 0x80, /* ...**...*... */
+ 0x18, 0x80, /* ...**...*... */
+ 0x0d, 0x00, /* ....**.*.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x0f, 0x00, /* ....****.... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 90 0x5a 'Z' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xe0, /* ..*********. */
+ 0x20, 0xc0, /* ..*.....**.. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x01, 0x80, /* .......**... */
+ 0x01, 0x80, /* .......**... */
+ 0x03, 0x00, /* ......**.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x18, 0x00, /* ...**....... */
+ 0x18, 0x20, /* ...**.....*. */
+ 0x3f, 0xe0, /* ..*********. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 91 0x5b '[' */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x80, /* ....*****... */
+ 0x0f, 0x80, /* ....*****... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0f, 0x80, /* ....*****... */
+ 0x0f, 0x80, /* ....*****... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 92 0x5c '\' */
+ 0x00, 0x00, /* ............ */
+ 0x60, 0x00, /* .**......... */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x18, 0x00, /* ...**....... */
+ 0x18, 0x00, /* ...**....... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x03, 0x00, /* ......**.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x01, 0x80, /* .......**... */
+ 0x01, 0x80, /* .......**... */
+ 0x00, 0xc0, /* ........**.. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x00, 0x60, /* .........**. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 93 0x5d ']' */
+ 0x00, 0x00, /* ............ */
+ 0x1f, 0x00, /* ...*****.... */
+ 0x1f, 0x00, /* ...*****.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x1f, 0x00, /* ...*****.... */
+ 0x1f, 0x00, /* ...*****.... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 94 0x5e '^' */
+ 0x00, 0x00, /* ............ */
+ 0x04, 0x00, /* .....*...... */
+ 0x0e, 0x00, /* ....***..... */
+ 0x1b, 0x00, /* ...**.**.... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x60, 0xc0, /* .**.....**.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 95 0x5f '_' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 96 0x60 '`' */
+ 0x00, 0x00, /* ............ */
+ 0x01, 0x00, /* .......*.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x07, 0x80, /* .....****... */
+ 0x07, 0x80, /* .....****... */
+ 0x03, 0x00, /* ......**.... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 97 0x61 'a' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x80, /* ....*****... */
+ 0x18, 0xc0, /* ...**...**.. */
+ 0x10, 0xc0, /* ...*....**.. */
+ 0x03, 0xc0, /* ......****.. */
+ 0x1c, 0xc0, /* ...***..**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x39, 0xc0, /* ..***..***.. */
+ 0x1e, 0xe0, /* ...****.***. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 98 0x62 'b' */
+ 0x00, 0x00, /* ............ */
+ 0x20, 0x00, /* ..*......... */
+ 0x60, 0x00, /* .**......... */
+ 0xe0, 0x00, /* ***......... */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x67, 0x80, /* .**..****... */
+ 0x6f, 0xc0, /* .**.******.. */
+ 0x70, 0xe0, /* .***....***. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x70, 0x60, /* .***.....**. */
+ 0x78, 0xc0, /* .****...**.. */
+ 0x4f, 0x80, /* .*..*****... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 99 0x63 'c' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x1f, 0x80, /* ...******... */
+ 0x31, 0xc0, /* ..**...***.. */
+ 0x20, 0xc0, /* ..*.....**.. */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x70, 0x40, /* .***.....*.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x1f, 0x80, /* ...******... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 100 0x64 'd' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x60, /* .........**. */
+ 0x00, 0xe0, /* ........***. */
+ 0x00, 0x60, /* .........**. */
+ 0x00, 0x60, /* .........**. */
+ 0x00, 0x60, /* .........**. */
+ 0x0f, 0x60, /* ....****.**. */
+ 0x31, 0xe0, /* ..**...****. */
+ 0x20, 0xe0, /* ..*.....***. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x70, 0xe0, /* .***....***. */
+ 0x39, 0x60, /* ..***..*.**. */
+ 0x1e, 0x70, /* ...****..*** */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 101 0x65 'e' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x00, /* ....****.... */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x7f, 0xe0, /* .**********. */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x30, 0x00, /* ..**........ */
+ 0x18, 0x60, /* ...**....**. */
+ 0x0f, 0x80, /* ....*****... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 102 0x66 'f' */
+ 0x00, 0x00, /* ............ */
+ 0x03, 0x80, /* ......***... */
+ 0x04, 0xc0, /* .....*..**.. */
+ 0x04, 0xc0, /* .....*..**.. */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x3f, 0x80, /* ..*******... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x1e, 0x00, /* ...****..... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 103 0x67 'g' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x1f, 0x20, /* ...*****..*. */
+ 0x31, 0xe0, /* ..**...****. */
+ 0x60, 0xc0, /* .**.....**.. */
+ 0x60, 0xc0, /* .**.....**.. */
+ 0x60, 0xc0, /* .**.....**.. */
+ 0x31, 0x80, /* ..**...**... */
+ 0x3f, 0x00, /* ..******.... */
+ 0x60, 0x00, /* .**......... */
+ 0x7f, 0xc0, /* .*********.. */
+ 0x3f, 0xe0, /* ..*********. */
+ 0x20, 0x60, /* ..*......**. */
+ 0x40, 0x20, /* .*........*. */
+ 0x40, 0x20, /* .*........*. */
+ 0x7f, 0xc0, /* .*********.. */
+ 0x3f, 0x80, /* ..*******... */
+ 0x00, 0x00, /* ............ */
+
+ /* 104 0x68 'h' */
+ 0x00, 0x00, /* ............ */
+ 0x10, 0x00, /* ...*........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x70, 0x00, /* .***........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x37, 0x80, /* ..**.****... */
+ 0x39, 0xc0, /* ..***..***.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x79, 0xe0, /* .****..****. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 105 0x69 'i' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x1e, 0x00, /* ...****..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x1f, 0x80, /* ...******... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 106 0x6a 'j' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0xc0, /* ........**.. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x03, 0xc0, /* ......****.. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x20, 0xc0, /* ..*.....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x38, 0x80, /* ..***...*... */
+ 0x1f, 0x00, /* ...*****.... */
+ 0x0e, 0x00, /* ....***..... */
+ 0x00, 0x00, /* ............ */
+
+ /* 107 0x6b 'k' */
+ 0x00, 0x00, /* ............ */
+ 0x60, 0x00, /* .**......... */
+ 0xe0, 0x00, /* ***......... */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x61, 0xc0, /* .**....***.. */
+ 0x63, 0x00, /* .**...**.... */
+ 0x66, 0x00, /* .**..**..... */
+ 0x7c, 0x00, /* .*****...... */
+ 0x78, 0x00, /* .****....... */
+ 0x7c, 0x00, /* .*****...... */
+ 0x6e, 0x00, /* .**.***..... */
+ 0x67, 0x00, /* .**..***.... */
+ 0x63, 0x80, /* .**...***... */
+ 0xf1, 0xe0, /* ****...****. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 108 0x6c 'l' */
+ 0x00, 0x00, /* ............ */
+ 0x1e, 0x00, /* ...****..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x1f, 0x80, /* ...******... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 109 0x6d 'm' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xdd, 0xc0, /* **.***.***.. */
+ 0x6e, 0xe0, /* .**.***.***. */
+ 0x66, 0x60, /* .**..**..**. */
+ 0x66, 0x60, /* .**..**..**. */
+ 0x66, 0x60, /* .**..**..**. */
+ 0x66, 0x60, /* .**..**..**. */
+ 0x66, 0x60, /* .**..**..**. */
+ 0x66, 0x60, /* .**..**..**. */
+ 0x66, 0x60, /* .**..**..**. */
+ 0xef, 0x70, /* ***.****.*** */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 110 0x6e 'n' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x27, 0x80, /* ..*..****... */
+ 0x79, 0xc0, /* .****..***.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x79, 0xe0, /* .****..****. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 111 0x6f 'o' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x80, /* ....*****... */
+ 0x11, 0xc0, /* ...*...***.. */
+ 0x20, 0xe0, /* ..*.....***. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x70, 0x40, /* .***.....*.. */
+ 0x38, 0x80, /* ..***...*... */
+ 0x1f, 0x00, /* ...*****.... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 112 0x70 'p' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xef, 0x80, /* ***.*****... */
+ 0x71, 0xc0, /* .***...***.. */
+ 0x60, 0xe0, /* .**.....***. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x40, /* .**......*.. */
+ 0x70, 0x80, /* .***....*... */
+ 0x7f, 0x00, /* .*******.... */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0xf0, 0x00, /* ****........ */
+ 0x00, 0x00, /* ............ */
+
+ /* 113 0x71 'q' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x20, /* ....****..*. */
+ 0x11, 0xe0, /* ...*...****. */
+ 0x20, 0xe0, /* ..*.....***. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x70, 0x60, /* .***.....**. */
+ 0x38, 0xe0, /* ..***...***. */
+ 0x1f, 0xe0, /* ...********. */
+ 0x00, 0x60, /* .........**. */
+ 0x00, 0x60, /* .........**. */
+ 0x00, 0x60, /* .........**. */
+ 0x00, 0x60, /* .........**. */
+ 0x00, 0xf0, /* ........**** */
+ 0x00, 0x00, /* ............ */
+
+ /* 114 0x72 'r' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x73, 0x80, /* .***..***... */
+ 0x34, 0xc0, /* ..**.*..**.. */
+ 0x38, 0xc0, /* ..***...**.. */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x78, 0x00, /* .****....... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 115 0x73 's' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x1f, 0xc0, /* ...*******.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0x40, /* ..**.....*.. */
+ 0x38, 0x00, /* ..***....... */
+ 0x1e, 0x00, /* ...****..... */
+ 0x07, 0x80, /* .....****... */
+ 0x01, 0xc0, /* .......***.. */
+ 0x20, 0xc0, /* ..*.....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x3f, 0x80, /* ..*******... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 116 0x74 't' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x04, 0x00, /* .....*...... */
+ 0x04, 0x00, /* .....*...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x7f, 0xc0, /* .*********.. */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0c, 0x20, /* ....**....*. */
+ 0x0e, 0x40, /* ....***..*.. */
+ 0x07, 0x80, /* .....****... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 117 0x75 'u' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x79, 0xe0, /* .****..****. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x39, 0xc0, /* ..***..***.. */
+ 0x1e, 0x60, /* ...****..**. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 118 0x76 'v' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xf0, 0x70, /* ****.....*** */
+ 0x60, 0x20, /* .**.......*. */
+ 0x30, 0x40, /* ..**.....*.. */
+ 0x30, 0x40, /* ..**.....*.. */
+ 0x18, 0x80, /* ...**...*... */
+ 0x18, 0x80, /* ...**...*... */
+ 0x0d, 0x00, /* ....**.*.... */
+ 0x0d, 0x00, /* ....**.*.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 119 0x77 'w' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xff, 0x70, /* ********.*** */
+ 0x66, 0x20, /* .**..**...*. */
+ 0x66, 0x20, /* .**..**...*. */
+ 0x66, 0x20, /* .**..**...*. */
+ 0x37, 0x40, /* ..**.***.*.. */
+ 0x3b, 0x40, /* ..***.**.*.. */
+ 0x3b, 0x40, /* ..***.**.*.. */
+ 0x19, 0x80, /* ...**..**... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 120 0x78 'x' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xf8, 0xf0, /* *****...**** */
+ 0x70, 0x40, /* .***.....*.. */
+ 0x38, 0x80, /* ..***...*... */
+ 0x1d, 0x00, /* ...***.*.... */
+ 0x0e, 0x00, /* ....***..... */
+ 0x07, 0x00, /* .....***.... */
+ 0x0b, 0x80, /* ....*.***... */
+ 0x11, 0xc0, /* ...*...***.. */
+ 0x20, 0xe0, /* ..*.....***. */
+ 0xf1, 0xf0, /* ****...***** */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 121 0x79 'y' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xf0, 0xf0, /* ****....**** */
+ 0x60, 0x20, /* .**.......*. */
+ 0x30, 0x40, /* ..**.....*.. */
+ 0x30, 0x40, /* ..**.....*.. */
+ 0x18, 0x80, /* ...**...*... */
+ 0x18, 0x80, /* ...**...*... */
+ 0x0d, 0x00, /* ....**.*.... */
+ 0x0d, 0x00, /* ....**.*.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x04, 0x00, /* .....*...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x08, 0x00, /* ....*....... */
+ 0x78, 0x00, /* .****....... */
+ 0x70, 0x00, /* .***........ */
+ 0x00, 0x00, /* ............ */
+
+ /* 122 0x7a 'z' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x7f, 0xe0, /* .**********. */
+ 0x60, 0xe0, /* .**.....***. */
+ 0x41, 0xc0, /* .*.....***.. */
+ 0x03, 0x80, /* ......***... */
+ 0x07, 0x00, /* .....***.... */
+ 0x0e, 0x00, /* ....***..... */
+ 0x1c, 0x00, /* ...***...... */
+ 0x38, 0x20, /* ..***.....*. */
+ 0x70, 0x60, /* .***.....**. */
+ 0x7f, 0xe0, /* .**********. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 123 0x7b '{' */
+ 0x00, 0x00, /* ............ */
+ 0x03, 0x80, /* ......***... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x38, 0x00, /* ..***....... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x03, 0x80, /* ......***... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 124 0x7c '|' */
+ 0x00, 0x00, /* ............ */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x00, 0x00, /* ............ */
+
+ /* 125 0x7d '}' */
+ 0x00, 0x00, /* ............ */
+ 0x1c, 0x00, /* ...***...... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x03, 0x00, /* ......**.... */
+ 0x01, 0xc0, /* .......***.. */
+ 0x03, 0x00, /* ......**.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x1c, 0x00, /* ...***...... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 126 0x7e '~' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x1c, 0x20, /* ...***....*. */
+ 0x3e, 0x60, /* ..*****..**. */
+ 0x67, 0xc0, /* .**..*****.. */
+ 0x43, 0x80, /* .*....***... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 127 0x7f '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 128 0x80 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0xc0, /* ....******.. */
+ 0x10, 0x60, /* ...*.....**. */
+ 0x20, 0x20, /* ..*.......*. */
+ 0x20, 0x00, /* ..*......... */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x20, 0x00, /* ..*......... */
+ 0x30, 0x20, /* ..**......*. */
+ 0x18, 0x40, /* ...**....*.. */
+ 0x0f, 0x80, /* ....*****... */
+ 0x06, 0x00, /* .....**..... */
+ 0x03, 0x00, /* ......**.... */
+ 0x01, 0x80, /* .......**... */
+ 0x0f, 0x00, /* ....****.... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 129 0x81 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x19, 0x80, /* ...**..**... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x79, 0xe0, /* .****..****. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x39, 0xc0, /* ..***..***.. */
+ 0x1e, 0x60, /* ...****..**. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 130 0x82 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x01, 0x80, /* .......**... */
+ 0x03, 0x00, /* ......**.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x00, /* ....****.... */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x7f, 0xe0, /* .**********. */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x30, 0x00, /* ..**........ */
+ 0x18, 0x60, /* ...**....**. */
+ 0x0f, 0x80, /* ....*****... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 131 0x83 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x02, 0x00, /* ......*..... */
+ 0x07, 0x00, /* .....***.... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x18, 0xc0, /* ...**...**.. */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x80, /* ....*****... */
+ 0x18, 0xc0, /* ...**...**.. */
+ 0x10, 0xc0, /* ...*....**.. */
+ 0x03, 0xc0, /* ......****.. */
+ 0x1c, 0xc0, /* ...***..**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x39, 0xc0, /* ..***..***.. */
+ 0x1e, 0xe0, /* ...****.***. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 132 0x84 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x19, 0x80, /* ...**..**... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x80, /* ....*****... */
+ 0x18, 0xc0, /* ...**...**.. */
+ 0x10, 0xc0, /* ...*....**.. */
+ 0x03, 0xc0, /* ......****.. */
+ 0x1c, 0xc0, /* ...***..**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x39, 0xc0, /* ..***..***.. */
+ 0x1e, 0xe0, /* ...****.***. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 133 0x85 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0c, 0x00, /* ....**...... */
+ 0x06, 0x00, /* .....**..... */
+ 0x03, 0x00, /* ......**.... */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x80, /* ....*****... */
+ 0x18, 0xc0, /* ...**...**.. */
+ 0x10, 0xc0, /* ...*....**.. */
+ 0x03, 0xc0, /* ......****.. */
+ 0x1c, 0xc0, /* ...***..**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x39, 0xc0, /* ..***..***.. */
+ 0x1e, 0xe0, /* ...****.***. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 134 0x86 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x07, 0x00, /* .....***.... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x07, 0x00, /* .....***.... */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x80, /* ....*****... */
+ 0x18, 0xc0, /* ...**...**.. */
+ 0x10, 0xc0, /* ...*....**.. */
+ 0x03, 0xc0, /* ......****.. */
+ 0x1c, 0xc0, /* ...***..**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x39, 0xc0, /* ..***..***.. */
+ 0x1e, 0xe0, /* ...****.***. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 135 0x87 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x1f, 0x80, /* ...******... */
+ 0x31, 0xc0, /* ..**...***.. */
+ 0x20, 0xc0, /* ..*.....**.. */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x70, 0x40, /* .***.....*.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x1f, 0x80, /* ...******... */
+ 0x06, 0x00, /* .....**..... */
+ 0x03, 0x00, /* ......**.... */
+ 0x01, 0x80, /* .......**... */
+ 0x0f, 0x00, /* ....****.... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 136 0x88 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x02, 0x00, /* ......*..... */
+ 0x07, 0x00, /* .....***.... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x18, 0xc0, /* ...**...**.. */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x00, /* ....****.... */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x7f, 0xe0, /* .**********. */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x30, 0x00, /* ..**........ */
+ 0x18, 0x60, /* ...**....**. */
+ 0x0f, 0x80, /* ....*****... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 137 0x89 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x19, 0x80, /* ...**..**... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x00, /* ....****.... */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x7f, 0xe0, /* .**********. */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x30, 0x00, /* ..**........ */
+ 0x18, 0x60, /* ...**....**. */
+ 0x0f, 0x80, /* ....*****... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 138 0x8a '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0c, 0x00, /* ....**...... */
+ 0x06, 0x00, /* .....**..... */
+ 0x03, 0x00, /* ......**.... */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x00, /* ....****.... */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x7f, 0xe0, /* .**********. */
+ 0x60, 0x00, /* .**......... */
+ 0x60, 0x00, /* .**......... */
+ 0x30, 0x00, /* ..**........ */
+ 0x18, 0x60, /* ...**....**. */
+ 0x0f, 0x80, /* ....*****... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 139 0x8b '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x19, 0x80, /* ...**..**... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x1e, 0x00, /* ...****..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x1f, 0x80, /* ...******... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 140 0x8c '.' */
+ 0x00, 0x00, /* ............ */
+ 0x04, 0x00, /* .....*...... */
+ 0x0e, 0x00, /* ....***..... */
+ 0x1b, 0x00, /* ...**.**.... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x00, 0x00, /* ............ */
+ 0x1e, 0x00, /* ...****..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x1f, 0x80, /* ...******... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 141 0x8d '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x18, 0x00, /* ...**....... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x06, 0x00, /* .....**..... */
+ 0x00, 0x00, /* ............ */
+ 0x1e, 0x00, /* ...****..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x1f, 0x80, /* ...******... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 142 0x8e '.' */
+ 0x00, 0x00, /* ............ */
+ 0x19, 0x80, /* ...**..**... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x00, 0x00, /* ............ */
+ 0x04, 0x00, /* .....*...... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x0b, 0x00, /* ....*.**.... */
+ 0x0b, 0x00, /* ....*.**.... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x11, 0x80, /* ...*...**... */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x20, 0xc0, /* ..*.....**.. */
+ 0x60, 0x60, /* .**......**. */
+ 0x40, 0x60, /* .*.......**. */
+ 0xe0, 0xf0, /* ***.....**** */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 143 0x8f '.' */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x00, /* ....****.... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x0f, 0x00, /* ....****.... */
+ 0x04, 0x00, /* .....*...... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x0b, 0x00, /* ....*.**.... */
+ 0x0b, 0x00, /* ....*.**.... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x11, 0x80, /* ...*...**... */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x20, 0xc0, /* ..*.....**.. */
+ 0x60, 0x60, /* .**......**. */
+ 0x40, 0x60, /* .*.......**. */
+ 0xe0, 0xf0, /* ***.....**** */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 144 0x90 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x03, 0x00, /* ......**.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x08, 0x00, /* ....*....... */
+ 0x7f, 0xe0, /* .**********. */
+ 0x30, 0x20, /* ..**......*. */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x80, /* ..**....*... */
+ 0x3f, 0x80, /* ..*******... */
+ 0x30, 0x80, /* ..**....*... */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x20, /* ..**......*. */
+ 0x30, 0x20, /* ..**......*. */
+ 0x7f, 0xe0, /* .**********. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 145 0x91 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3d, 0xe0, /* ..****.****. */
+ 0x66, 0x30, /* .**..**...** */
+ 0x46, 0x30, /* .*...**...** */
+ 0x06, 0x30, /* .....**...** */
+ 0x3f, 0xf0, /* ..********** */
+ 0x66, 0x00, /* .**..**..... */
+ 0xc6, 0x00, /* **...**..... */
+ 0xc6, 0x00, /* **...**..... */
+ 0xe7, 0x30, /* ***..***..** */
+ 0x7d, 0xe0, /* .*****.****. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 146 0x92 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x03, 0xf0, /* ......****** */
+ 0x07, 0x10, /* .....***...* */
+ 0x07, 0x10, /* .....***...* */
+ 0x0b, 0x00, /* ....*.**.... */
+ 0x0b, 0x00, /* ....*.**.... */
+ 0x0b, 0x20, /* ....*.**..*. */
+ 0x13, 0xe0, /* ...*..*****. */
+ 0x13, 0x20, /* ...*..**..*. */
+ 0x3f, 0x00, /* ..******.... */
+ 0x23, 0x00, /* ..*...**.... */
+ 0x23, 0x00, /* ..*...**.... */
+ 0x43, 0x10, /* .*....**...* */
+ 0x43, 0x10, /* .*....**...* */
+ 0xe7, 0xf0, /* ***..******* */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 147 0x93 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x02, 0x00, /* ......*..... */
+ 0x07, 0x00, /* .....***.... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x18, 0xc0, /* ...**...**.. */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x80, /* ....*****... */
+ 0x11, 0xc0, /* ...*...***.. */
+ 0x20, 0xe0, /* ..*.....***. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x70, 0x40, /* .***.....*.. */
+ 0x38, 0x80, /* ..***...*... */
+ 0x1f, 0x00, /* ...*****.... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 148 0x94 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x19, 0x80, /* ...**..**... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x80, /* ....*****... */
+ 0x11, 0xc0, /* ...*...***.. */
+ 0x20, 0xe0, /* ..*.....***. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x70, 0x40, /* .***.....*.. */
+ 0x38, 0x80, /* ..***...*... */
+ 0x1f, 0x00, /* ...*****.... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 149 0x95 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0c, 0x00, /* ....**...... */
+ 0x06, 0x00, /* .....**..... */
+ 0x03, 0x00, /* ......**.... */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x80, /* ....*****... */
+ 0x11, 0xc0, /* ...*...***.. */
+ 0x20, 0xe0, /* ..*.....***. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x70, 0x40, /* .***.....*.. */
+ 0x38, 0x80, /* ..***...*... */
+ 0x1f, 0x00, /* ...*****.... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 150 0x96 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x02, 0x00, /* ......*..... */
+ 0x07, 0x00, /* .....***.... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x18, 0xc0, /* ...**...**.. */
+ 0x00, 0x00, /* ............ */
+ 0x79, 0xe0, /* .****..****. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x39, 0xc0, /* ..***..***.. */
+ 0x1e, 0x60, /* ...****..**. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 151 0x97 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x18, 0x00, /* ...**....... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x06, 0x00, /* .....**..... */
+ 0x00, 0x00, /* ............ */
+ 0x79, 0xe0, /* .****..****. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x39, 0xc0, /* ..***..***.. */
+ 0x1e, 0x60, /* ...****..**. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 152 0x98 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x19, 0x80, /* ...**..**... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xf0, 0xf0, /* ****....**** */
+ 0x60, 0x20, /* .**.......*. */
+ 0x30, 0x40, /* ..**.....*.. */
+ 0x30, 0x40, /* ..**.....*.. */
+ 0x18, 0x80, /* ...**...*... */
+ 0x18, 0x80, /* ...**...*... */
+ 0x0d, 0x00, /* ....**.*.... */
+ 0x0d, 0x00, /* ....**.*.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x04, 0x00, /* .....*...... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x08, 0x00, /* ....*....... */
+ 0x78, 0x00, /* .****....... */
+ 0x70, 0x00, /* .***........ */
+ 0x00, 0x00, /* ............ */
+
+ /* 153 0x99 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x19, 0x80, /* ...**..**... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x80, /* ....*****... */
+ 0x11, 0xc0, /* ...*...***.. */
+ 0x20, 0xc0, /* ..*.....**.. */
+ 0x20, 0x60, /* ..*......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x20, 0x40, /* ..*......*.. */
+ 0x30, 0x40, /* ..**.....*.. */
+ 0x18, 0x80, /* ...**...*... */
+ 0x0f, 0x00, /* ....****.... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 154 0x9a '.' */
+ 0x00, 0x00, /* ............ */
+ 0x19, 0x80, /* ...**..**... */
+ 0x19, 0x80, /* ...**..**... */
+ 0xe0, 0x30, /* ***.......** */
+ 0x60, 0x20, /* .**.......*. */
+ 0x60, 0x20, /* .**.......*. */
+ 0x60, 0x20, /* .**.......*. */
+ 0x60, 0x20, /* .**.......*. */
+ 0x60, 0x20, /* .**.......*. */
+ 0x60, 0x20, /* .**.......*. */
+ 0x60, 0x20, /* .**.......*. */
+ 0x60, 0x20, /* .**.......*. */
+ 0x60, 0x20, /* .**.......*. */
+ 0x70, 0x40, /* .***.....*.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x1f, 0x80, /* ...******... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 155 0x9b '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x1f, 0x80, /* ...******... */
+ 0x36, 0xc0, /* ..**.**.**.. */
+ 0x26, 0xc0, /* ..*..**.**.. */
+ 0x66, 0x00, /* .**..**..... */
+ 0x66, 0x00, /* .**..**..... */
+ 0x66, 0x00, /* .**..**..... */
+ 0x66, 0x00, /* .**..**..... */
+ 0x76, 0x40, /* .***.**..*.. */
+ 0x36, 0xc0, /* ..**.**.**.. */
+ 0x1f, 0x80, /* ...******... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 156 0x9c '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x80, /* ....*****... */
+ 0x1c, 0xc0, /* ...***..**.. */
+ 0x18, 0xc0, /* ...**...**.. */
+ 0x18, 0x00, /* ...**....... */
+ 0x18, 0x00, /* ...**....... */
+ 0x18, 0x00, /* ...**....... */
+ 0x7e, 0x00, /* .******..... */
+ 0x7e, 0x00, /* .******..... */
+ 0x18, 0x00, /* ...**....... */
+ 0x18, 0x00, /* ...**....... */
+ 0x18, 0x00, /* ...**....... */
+ 0x18, 0x00, /* ...**....... */
+ 0x3e, 0x20, /* ..*****...*. */
+ 0x7f, 0xe0, /* .**********. */
+ 0x61, 0xc0, /* .**....***.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 157 0x9d '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x19, 0x80, /* ...**..**... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x0f, 0x00, /* ....****.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x1f, 0x80, /* ...******... */
+ 0x06, 0x00, /* .....**..... */
+ 0x1f, 0x80, /* ...******... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 158 0x9e '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 159 0x9f '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 160 0xa0 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x01, 0x80, /* .......**... */
+ 0x03, 0x00, /* ......**.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x80, /* ....*****... */
+ 0x18, 0xc0, /* ...**...**.. */
+ 0x10, 0xc0, /* ...*....**.. */
+ 0x03, 0xc0, /* ......****.. */
+ 0x1c, 0xc0, /* ...***..**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x39, 0xc0, /* ..***..***.. */
+ 0x1e, 0xe0, /* ...****.***. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 161 0xa1 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x01, 0x80, /* .......**... */
+ 0x03, 0x00, /* ......**.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x00, 0x00, /* ............ */
+ 0x1e, 0x00, /* ...****..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x1f, 0x80, /* ...******... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 162 0xa2 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x01, 0x80, /* .......**... */
+ 0x03, 0x00, /* ......**.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x80, /* ....*****... */
+ 0x11, 0xc0, /* ...*...***.. */
+ 0x20, 0xe0, /* ..*.....***. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x60, 0x60, /* .**......**. */
+ 0x70, 0x40, /* .***.....*.. */
+ 0x38, 0x80, /* ..***...*... */
+ 0x1f, 0x00, /* ...*****.... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 163 0xa3 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x01, 0x80, /* .......**... */
+ 0x03, 0x00, /* ......**.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x00, 0x00, /* ............ */
+ 0x79, 0xe0, /* .****..****. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x39, 0xc0, /* ..***..***.. */
+ 0x1e, 0x60, /* ...****..**. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 164 0xa4 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x1c, 0x40, /* ...***...*.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x23, 0x80, /* ..*...***... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x27, 0x80, /* ..*..****... */
+ 0x79, 0xc0, /* .****..***.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x79, 0xe0, /* .****..****. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 165 0xa5 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x1c, 0x40, /* ...***...*.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x23, 0x80, /* ..*...***... */
+ 0xc0, 0x70, /* **.......*** */
+ 0x60, 0x20, /* .**.......*. */
+ 0x70, 0x20, /* .***......*. */
+ 0x78, 0x20, /* .****.....*. */
+ 0x5c, 0x20, /* .*.***....*. */
+ 0x4e, 0x20, /* .*..***...*. */
+ 0x47, 0x20, /* .*...***..*. */
+ 0x43, 0xa0, /* .*....***.*. */
+ 0x41, 0xe0, /* .*.....****. */
+ 0x40, 0xe0, /* .*......***. */
+ 0x40, 0x60, /* .*.......**. */
+ 0xe0, 0x30, /* ***.......** */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 166 0xa6 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x1f, 0x00, /* ...*****.... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x01, 0x80, /* .......**... */
+ 0x07, 0x80, /* .....****... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x33, 0x80, /* ..**..***... */
+ 0x1d, 0xc0, /* ...***.***.. */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 167 0xa7 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x07, 0x00, /* .....***.... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x10, 0xc0, /* ...*....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0x80, /* ..**....*... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x0e, 0x00, /* ....***..... */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 168 0xa8 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x03, 0x00, /* ......**.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x03, 0x00, /* ......**.... */
+ 0x03, 0x00, /* ......**.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x18, 0x00, /* ...**....... */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x40, /* ..**.....*.. */
+ 0x39, 0xc0, /* ..***..***.. */
+ 0x1f, 0x80, /* ...******... */
+ 0x0f, 0x00, /* ....****.... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 169 0xa9 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 170 0xaa '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x00, 0xc0, /* ........**.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 171 0xab '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x10, 0x00, /* ...*........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x10, 0x00, /* ...*........ */
+ 0x10, 0x40, /* ...*.....*.. */
+ 0x10, 0x80, /* ...*....*... */
+ 0x11, 0x00, /* ...*...*.... */
+ 0x3a, 0x00, /* ..***.*..... */
+ 0x05, 0xc0, /* .....*.***.. */
+ 0x0a, 0x20, /* ....*.*...*. */
+ 0x10, 0x20, /* ...*......*. */
+ 0x20, 0xc0, /* ..*.....**.. */
+ 0x41, 0x00, /* .*.....*.... */
+ 0x02, 0x00, /* ......*..... */
+ 0x03, 0xe0, /* ......*****. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 172 0xac '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x10, 0x00, /* ...*........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x10, 0x00, /* ...*........ */
+ 0x10, 0x40, /* ...*.....*.. */
+ 0x10, 0x80, /* ...*....*... */
+ 0x11, 0x00, /* ...*...*.... */
+ 0x3a, 0x40, /* ..***.*..*.. */
+ 0x04, 0xc0, /* .....*..**.. */
+ 0x09, 0x40, /* ....*..*.*.. */
+ 0x12, 0x40, /* ...*..*..*.. */
+ 0x24, 0x40, /* ..*..*...*.. */
+ 0x47, 0xe0, /* .*...******. */
+ 0x00, 0x40, /* .........*.. */
+ 0x00, 0x40, /* .........*.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 173 0xad '.' */
+ 0x00, 0x00, /* ............ */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 174 0xae '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x06, 0x60, /* .....**..**. */
+ 0x0c, 0xc0, /* ....**..**.. */
+ 0x19, 0x80, /* ...**..**... */
+ 0x33, 0x00, /* ..**..**.... */
+ 0x66, 0x00, /* .**..**..... */
+ 0x33, 0x00, /* ..**..**.... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x0c, 0xc0, /* ....**..**.. */
+ 0x06, 0x60, /* .....**..**. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 175 0xaf '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x66, 0x00, /* .**..**..... */
+ 0x33, 0x00, /* ..**..**.... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x0c, 0xc0, /* ....**..**.. */
+ 0x06, 0x60, /* .....**..**. */
+ 0x0c, 0xc0, /* ....**..**.. */
+ 0x19, 0x80, /* ...**..**... */
+ 0x33, 0x00, /* ..**..**.... */
+ 0x66, 0x00, /* .**..**..... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 176 0xb0 '.' */
+ 0x0c, 0x30, /* ....**....** */
+ 0x08, 0x20, /* ....*.....*. */
+ 0x61, 0x80, /* .**....**... */
+ 0x20, 0x80, /* ..*.....*... */
+ 0x0c, 0x30, /* ....**....** */
+ 0x08, 0x20, /* ....*.....*. */
+ 0x61, 0x80, /* .**....**... */
+ 0x20, 0x80, /* ..*.....*... */
+ 0x0c, 0x30, /* ....**....** */
+ 0x08, 0x20, /* ....*.....*. */
+ 0x61, 0x80, /* .**....**... */
+ 0x20, 0x80, /* ..*.....*... */
+ 0x0c, 0x30, /* ....**....** */
+ 0x08, 0x20, /* ....*.....*. */
+ 0x61, 0x80, /* .**....**... */
+ 0x20, 0x80, /* ..*.....*... */
+ 0x0c, 0x30, /* ....**....** */
+ 0x08, 0x20, /* ....*.....*. */
+ 0x61, 0x80, /* .**....**... */
+ 0x20, 0x80, /* ..*.....*... */
+ 0x0c, 0x30, /* ....**....** */
+ 0x08, 0x20, /* ....*.....*. */
+
+ /* 177 0xb1 '.' */
+ 0x77, 0x70, /* .***.***.*** */
+ 0x22, 0x20, /* ..*...*...*. */
+ 0x88, 0x80, /* *...*...*... */
+ 0xdd, 0xd0, /* **.***.***.* */
+ 0x88, 0x80, /* *...*...*... */
+ 0x22, 0x20, /* ..*...*...*. */
+ 0x77, 0x70, /* .***.***.*** */
+ 0x22, 0x20, /* ..*...*...*. */
+ 0x88, 0x80, /* *...*...*... */
+ 0xdd, 0xd0, /* **.***.***.* */
+ 0x88, 0x80, /* *...*...*... */
+ 0x22, 0x20, /* ..*...*...*. */
+ 0x77, 0x70, /* .***.***.*** */
+ 0x22, 0x20, /* ..*...*...*. */
+ 0x88, 0x80, /* *...*...*... */
+ 0xdd, 0xd0, /* **.***.***.* */
+ 0x88, 0x80, /* *...*...*... */
+ 0x22, 0x20, /* ..*...*...*. */
+ 0x77, 0x70, /* .***.***.*** */
+ 0x22, 0x20, /* ..*...*...*. */
+ 0x88, 0x80, /* *...*...*... */
+ 0xdd, 0xd0, /* **.***.***.* */
+
+ /* 178 0xb2 '.' */
+ 0xf3, 0xc0, /* ****..****.. */
+ 0xf7, 0xd0, /* ****.*****.* */
+ 0x9e, 0x70, /* *..****..*** */
+ 0xdf, 0x70, /* **.*****.*** */
+ 0xf3, 0xc0, /* ****..****.. */
+ 0xf7, 0xd0, /* ****.*****.* */
+ 0x9e, 0x70, /* *..****..*** */
+ 0xdf, 0x70, /* **.*****.*** */
+ 0xf3, 0xc0, /* ****..****.. */
+ 0xf7, 0xd0, /* ****.*****.* */
+ 0x9e, 0x70, /* *..****..*** */
+ 0xdf, 0x70, /* **.*****.*** */
+ 0xf3, 0xc0, /* ****..****.. */
+ 0xf7, 0xd0, /* ****.*****.* */
+ 0x9e, 0x70, /* *..****..*** */
+ 0xdf, 0x70, /* **.*****.*** */
+ 0xf3, 0xc0, /* ****..****.. */
+ 0xf7, 0xd0, /* ****.*****.* */
+ 0x9e, 0x70, /* *..****..*** */
+ 0xdf, 0x70, /* **.*****.*** */
+ 0xf3, 0xc0, /* ****..****.. */
+ 0xf7, 0xd0, /* ****.*****.* */
+
+ /* 179 0xb3 '.' */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+
+ /* 180 0xb4 '.' */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0xfe, 0x00, /* *******..... */
+ 0xfe, 0x00, /* *******..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+
+ /* 181 0xb5 '.' */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0xfe, 0x00, /* *******..... */
+ 0xfe, 0x00, /* *******..... */
+ 0x06, 0x00, /* .....**..... */
+ 0xfe, 0x00, /* *******..... */
+ 0xfe, 0x00, /* *******..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+
+ /* 182 0xb6 '.' */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0xfd, 0x80, /* ******.**... */
+ 0xfd, 0x80, /* ******.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+
+ /* 183 0xb7 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xff, 0x80, /* *********... */
+ 0xff, 0x80, /* *********... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+
+ /* 184 0xb8 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xfe, 0x00, /* *******..... */
+ 0xfe, 0x00, /* *******..... */
+ 0x06, 0x00, /* .....**..... */
+ 0xfe, 0x00, /* *******..... */
+ 0xfe, 0x00, /* *******..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+
+ /* 185 0xb9 '.' */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0xfd, 0x80, /* ******.**... */
+ 0xfd, 0x80, /* ******.**... */
+ 0x01, 0x80, /* .......**... */
+ 0xfd, 0x80, /* ******.**... */
+ 0xfd, 0x80, /* ******.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+
+ /* 186 0xba '.' */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+
+ /* 187 0xbb '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xff, 0x80, /* *********... */
+ 0xff, 0x80, /* *********... */
+ 0x01, 0x80, /* .......**... */
+ 0xfd, 0x80, /* ******.**... */
+ 0xfd, 0x80, /* ******.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+
+ /* 188 0xbc '.' */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0xfd, 0x80, /* ******.**... */
+ 0xfd, 0x80, /* ******.**... */
+ 0x01, 0x80, /* .......**... */
+ 0xff, 0x80, /* *********... */
+ 0xff, 0x80, /* *********... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 189 0xbd '.' */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0xff, 0x80, /* *********... */
+ 0xff, 0x80, /* *********... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 190 0xbe '.' */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0xfe, 0x00, /* *******..... */
+ 0xfe, 0x00, /* *******..... */
+ 0x06, 0x00, /* .....**..... */
+ 0xfe, 0x00, /* *******..... */
+ 0xfe, 0x00, /* *******..... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 191 0xbf '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xfe, 0x00, /* *******..... */
+ 0xfe, 0x00, /* *******..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+
+ /* 192 0xc0 '.' */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x07, 0xf0, /* .....******* */
+ 0x07, 0xf0, /* .....******* */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 193 0xc1 '.' */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 194 0xc2 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+
+ /* 195 0xc3 '.' */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x07, 0xf0, /* .....******* */
+ 0x07, 0xf0, /* .....******* */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+
+ /* 196 0xc4 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 197 0xc5 '.' */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+
+ /* 198 0xc6 '.' */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x07, 0xf0, /* .....******* */
+ 0x07, 0xf0, /* .....******* */
+ 0x06, 0x00, /* .....**..... */
+ 0x07, 0xf0, /* .....******* */
+ 0x07, 0xf0, /* .....******* */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+
+ /* 199 0xc7 '.' */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0xf0, /* ....**.***** */
+ 0x0d, 0xf0, /* ....**.***** */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+
+ /* 200 0xc8 '.' */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0xf0, /* ....**.***** */
+ 0x0d, 0xf0, /* ....**.***** */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0f, 0xf0, /* ....******** */
+ 0x0f, 0xf0, /* ....******** */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 201 0xc9 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0xf0, /* ....******** */
+ 0x0f, 0xf0, /* ....******** */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0d, 0xf0, /* ....**.***** */
+ 0x0d, 0xf0, /* ....**.***** */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+
+ /* 202 0xca '.' */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0xfd, 0xf0, /* ******.***** */
+ 0xfd, 0xf0, /* ******.***** */
+ 0x00, 0x00, /* ............ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 203 0xcb '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0x00, 0x00, /* ............ */
+ 0xfd, 0xf0, /* ******.***** */
+ 0xfd, 0xf0, /* ******.***** */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+
+ /* 204 0xcc '.' */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0xf0, /* ....**.***** */
+ 0x0d, 0xf0, /* ....**.***** */
+ 0x0c, 0x00, /* ....**...... */
+ 0x0d, 0xf0, /* ....**.***** */
+ 0x0d, 0xf0, /* ....**.***** */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+
+ /* 205 0xcd '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0x00, 0x00, /* ............ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 206 0xce '.' */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0xfd, 0xf0, /* ******.***** */
+ 0xfd, 0xf0, /* ******.***** */
+ 0x00, 0x00, /* ............ */
+ 0xfd, 0xf0, /* ******.***** */
+ 0xfd, 0xf0, /* ******.***** */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+
+ /* 207 0xcf '.' */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0x00, 0x00, /* ............ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 208 0xd0 '.' */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 209 0xd1 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0x00, 0x00, /* ............ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+
+ /* 210 0xd2 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+
+ /* 211 0xd3 '.' */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0f, 0xf0, /* ....******** */
+ 0x0f, 0xf0, /* ....******** */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 212 0xd4 '.' */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x07, 0xf0, /* .....******* */
+ 0x07, 0xf0, /* .....******* */
+ 0x06, 0x00, /* .....**..... */
+ 0x07, 0xf0, /* .....******* */
+ 0x07, 0xf0, /* .....******* */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 213 0xd5 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x07, 0xf0, /* .....******* */
+ 0x07, 0xf0, /* .....******* */
+ 0x06, 0x00, /* .....**..... */
+ 0x07, 0xf0, /* .....******* */
+ 0x07, 0xf0, /* .....******* */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+
+ /* 214 0xd6 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0xf0, /* ....******** */
+ 0x0f, 0xf0, /* ....******** */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+
+ /* 215 0xd7 '.' */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+ 0x0d, 0x80, /* ....**.**... */
+
+ /* 216 0xd8 '.' */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0x06, 0x00, /* .....**..... */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+
+ /* 217 0xd9 '.' */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0xfe, 0x00, /* *******..... */
+ 0xfe, 0x00, /* *******..... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 218 0xda '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x07, 0xf0, /* .....******* */
+ 0x07, 0xf0, /* .....******* */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+
+ /* 219 0xdb '.' */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+
+ /* 220 0xdc '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+
+ /* 221 0xdd '.' */
+ 0xfc, 0x00, /* ******...... */
+ 0xfc, 0x00, /* ******...... */
+ 0xfc, 0x00, /* ******...... */
+ 0xfc, 0x00, /* ******...... */
+ 0xfc, 0x00, /* ******...... */
+ 0xfc, 0x00, /* ******...... */
+ 0xfc, 0x00, /* ******...... */
+ 0xfc, 0x00, /* ******...... */
+ 0xfc, 0x00, /* ******...... */
+ 0xfc, 0x00, /* ******...... */
+ 0xfc, 0x00, /* ******...... */
+ 0xfc, 0x00, /* ******...... */
+ 0xfc, 0x00, /* ******...... */
+ 0xfc, 0x00, /* ******...... */
+ 0xfc, 0x00, /* ******...... */
+ 0xfc, 0x00, /* ******...... */
+ 0xfc, 0x00, /* ******...... */
+ 0xfc, 0x00, /* ******...... */
+ 0xfc, 0x00, /* ******...... */
+ 0xfc, 0x00, /* ******...... */
+ 0xfc, 0x00, /* ******...... */
+ 0xfc, 0x00, /* ******...... */
+
+ /* 222 0xde '.' */
+ 0x03, 0xf0, /* ......****** */
+ 0x03, 0xf0, /* ......****** */
+ 0x03, 0xf0, /* ......****** */
+ 0x03, 0xf0, /* ......****** */
+ 0x03, 0xf0, /* ......****** */
+ 0x03, 0xf0, /* ......****** */
+ 0x03, 0xf0, /* ......****** */
+ 0x03, 0xf0, /* ......****** */
+ 0x03, 0xf0, /* ......****** */
+ 0x03, 0xf0, /* ......****** */
+ 0x03, 0xf0, /* ......****** */
+ 0x03, 0xf0, /* ......****** */
+ 0x03, 0xf0, /* ......****** */
+ 0x03, 0xf0, /* ......****** */
+ 0x03, 0xf0, /* ......****** */
+ 0x03, 0xf0, /* ......****** */
+ 0x03, 0xf0, /* ......****** */
+ 0x03, 0xf0, /* ......****** */
+ 0x03, 0xf0, /* ......****** */
+ 0x03, 0xf0, /* ......****** */
+ 0x03, 0xf0, /* ......****** */
+ 0x03, 0xf0, /* ......****** */
+
+ /* 223 0xdf '.' */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0xff, 0xf0, /* ************ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 224 0xe0 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 225 0xe1 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x00, /* ....****.... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x31, 0x80, /* ..**...**... */
+ 0x37, 0x80, /* ..**.****... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x31, 0x80, /* ..**...**... */
+ 0x77, 0x00, /* .***.***.... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 226 0xe2 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 227 0xe3 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 228 0xe4 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 229 0xe5 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 230 0xe6 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x30, 0xc0, /* ..**....**.. */
+ 0x39, 0xc0, /* ..***..***.. */
+ 0x36, 0xe0, /* ..**.**.***. */
+ 0x30, 0x00, /* ..**........ */
+ 0x30, 0x00, /* ..**........ */
+ 0x60, 0x00, /* .**......... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 231 0xe7 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 232 0xe8 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 233 0xe9 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 234 0xea '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 235 0xeb '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 236 0xec '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 237 0xed '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 238 0xee '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 239 0xef '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 240 0xf0 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 241 0xf1 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x7f, 0xe0, /* .**********. */
+ 0x7f, 0xe0, /* .**********. */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x00, 0x00, /* ............ */
+ 0x7f, 0xe0, /* .**********. */
+ 0x7f, 0xe0, /* .**********. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 242 0xf2 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 243 0xf3 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 244 0xf4 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 245 0xf5 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 246 0xf6 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x7f, 0xe0, /* .**********. */
+ 0x7f, 0xe0, /* .**********. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x06, 0x00, /* .....**..... */
+ 0x06, 0x00, /* .....**..... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 247 0xf7 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 248 0xf8 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x00, /* ....****.... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x19, 0x80, /* ...**..**... */
+ 0x0f, 0x00, /* ....****.... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 249 0xf9 '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 250 0xfa '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x06, 0x00, /* .....**..... */
+ 0x0f, 0x00, /* ....****.... */
+ 0x0f, 0x00, /* ....****.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 251 0xfb '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 252 0xfc '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 253 0xfd '.' */
+ 0x00, 0x00, /* ............ */
+ 0x0f, 0x00, /* ....****.... */
+ 0x1f, 0x80, /* ...******... */
+ 0x31, 0x80, /* ..**...**... */
+ 0x21, 0x80, /* ..*....**... */
+ 0x03, 0x00, /* ......**.... */
+ 0x06, 0x00, /* .....**..... */
+ 0x0c, 0x00, /* ....**...... */
+ 0x18, 0x40, /* ...**....*.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 254 0xfe '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x3f, 0xc0, /* ..********.. */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+
+ /* 255 0xff '.' */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+};
diff --git a/sys/dev/fb/gfb.c b/sys/dev/fb/gfb.c
new file mode 100644
index 000000000000..c3c8ef9d22cf
--- /dev/null
+++ b/sys/dev/fb/gfb.c
@@ -0,0 +1,940 @@
+/*-
+ * Copyright (c) 2001 Andrew Miklic
+ * All rights reserved.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+/*-
+ * 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/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <machine/stdarg.h>
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/conf.h>
+#include <sys/proc.h>
+#include <sys/fcntl.h>
+#include <sys/malloc.h>
+#include <sys/fbio.h>
+
+#include <vm/vm.h>
+#include <vm/vm_param.h>
+#include <vm/pmap.h>
+
+#include <machine/md_var.h>
+#include <machine/pc/bios.h>
+#include <machine/clock.h>
+#include <machine/bus.h>
+#include <machine/pc/vesa.h>
+#include <machine/resource.h>
+#include <machine/rpb.h>
+
+#include <sys/bus.h>
+#include <sys/rman.h>
+
+#include <dev/pci/pcireg.h>
+#include <dev/pci/pcivar.h>
+
+#include <dev/fb/fbreg.h>
+#include <dev/fb/gfb.h>
+#include <dev/gfb/gfb_pci.h>
+
+#include "opt_gfb.h"
+
+struct gfb_softc *gfb_device_softcs[2][MAX_NUM_GFB_CARDS] = {
+ {
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
+ },
+ {
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
+ },
+};
+
+/*
+ The following 9 variables exist only because we need statically
+ allocated structures very early in boot to support gfb_configure()...
+*/
+struct gfb_softc console;
+video_adapter_t console_adp;
+struct gfb_conf console_gfbc;
+u_char console_palette_red[256];
+u_char console_palette_green[256];
+u_char console_palette_blue[256];
+u_char console_cursor_palette_red[3];
+u_char console_cursor_palette_green[3];
+u_char console_cursor_palette_blue[3];
+
+extern struct gfb_font bold8x16;
+
+/*****************************************************************************
+ *
+ * FB-generic functions
+ *
+ ****************************************************************************/
+
+int
+gfb_probe(int unit, video_adapter_t **adpp, void *arg, int flags)
+{
+ int error;
+
+ /* Assume the best... */
+ error = 0;
+
+ if((*adpp = vid_get_adapter(vid_find_adapter((char *)arg, unit))) == NULL)
+ error = ENODEV;
+ else
+ (*adpp)->va_flags |= V_ADP_PROBED;
+
+ return(error);
+}
+
+int
+gfb_init(int unit, video_adapter_t *adp, int flags)
+{
+ struct gfb_softc *sc;
+ struct gfb_conf *gfbc;
+ int error;
+
+ /* Assume the best... */
+ error = 0;
+
+ if(!init_done(adp)) {
+ sc = gfb_device_softcs[adp->va_model][unit];
+ gfbc = sc->gfbc;
+
+ /* Initialize the RAMDAC... */
+ (*gfbc->ramdac_init)(sc);
+
+ /* Initialize the palettes... */
+ (*gfbc->ramdac_load_palette)(sc->adp, &sc->gfbc->palette);
+ (*gfbc->ramdac_load_cursor_palette)(sc->adp,
+ &sc->gfbc->cursor_palette);
+
+ /* Prepare the default font... */
+ (*vidsw[adp->va_index]->load_font)(adp, 0, bold8x16.height,
+ bold8x16.width, bold8x16.data, 0, 256);
+ adp->va_info.vi_cwidth = gfbc->fonts[0].width;
+ adp->va_info.vi_cheight = gfbc->fonts[0].height;
+
+ /*
+ Normalize vi_width and vi_height to be in terms of
+ on-screen characters, rather than pixels (*_init()
+ leaves them in terms of pixels...
+ */
+ adp->va_info.vi_width /= adp->va_info.vi_cwidth;
+ adp->va_info.vi_height /= adp->va_info.vi_cheight;
+
+ /* Enable the default font... */
+ (*vidsw[adp->va_index]->show_font)(adp, 0);
+
+ /* Enable future font-loading... */
+ adp->va_flags |= V_ADP_FONT;
+
+ /* Flag this initialization for this adapter... */
+ adp->va_flags |= V_ADP_INITIALIZED;
+ }
+ return(error);
+}
+
+int
+gfb_get_info(video_adapter_t *adp, int mode, video_info_t *info)
+{
+ int error;
+
+ /* Assume the best... */
+ error = 0;
+
+ /*
+ The info for GFB adapters does not depend on its mode,
+ so just copy it indiscriminantly (actually, we originally
+ checked the mode, but the current fb framework is somewhat
+ sloppily done in places, and assumes VGA in several places,
+ which makes such checks always fail for such GFBs as TGA)...
+ */
+ bcopy(&adp->va_info, info, sizeof(video_info_t));
+ return(error);
+}
+
+int
+gfb_set_mode(video_adapter_t *adp, int mode)
+{
+
+ adp->va_mode = mode;
+ return(0);
+}
+
+int
+gfb_save_font(video_adapter_t *adp, int page, int fontsize, int fontwidth,
+ u_char *data, int ch, int count)
+{
+ struct gfb_softc *sc;
+ int error;
+ int i;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ /* Check the font information... */
+ if((sc->gfbc->fonts[page].height != fontsize) ||
+ (sc->gfbc->fonts[page].width != fontwidth))
+ error = EINVAL;
+ else
+
+ /*
+ Copy the character pixel array from our
+ very own private cache...
+ */
+ for(i = ch; i < count * fontsize; i++)
+ data[i] = adp->va_little_bitian ?
+ BIT_REVERSE(sc->gfbc->fonts[page].data[i]) :
+ sc->gfbc->fonts[page].data[i];
+
+ return(error);
+}
+
+int
+gfb_load_font(video_adapter_t *adp, int page, int fontsize, int fontwidth,
+ u_char *data, int ch, int count)
+{
+ struct gfb_softc *sc;
+ int error;
+ int i;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ /* Copy the character pixel array into our very own private cache... */
+ for(i = ch; i < count * fontsize; i++)
+ sc->gfbc->fonts[page].data[i] = adp->va_little_bitian ?
+ BIT_REVERSE(data[i]) : data[i];
+
+ /* Save the font information... */
+ sc->gfbc->fonts[page].height = fontsize;
+ sc->gfbc->fonts[page].width = fontwidth;
+
+ return(error);
+}
+
+int
+gfb_show_font(video_adapter_t *adp, int page)
+{
+ struct gfb_softc *sc;
+ int error;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ /* Normalize adapter values... */
+ adp->va_info.vi_height *= adp->va_info.vi_cheight;
+ adp->va_info.vi_width *= adp->va_info.vi_cwidth;
+
+ /* Set the current font pixels... */
+ sc->gfbc->font = sc->gfbc->fonts[page].data;
+
+ /* Set the current font width... */
+ adp->va_info.vi_cwidth = sc->gfbc->fonts[page].width;
+
+ /* Set the current font height... */
+ adp->va_info.vi_cheight = sc->gfbc->fonts[page].height;
+
+ /* Recompute adapter values... */
+ adp->va_info.vi_height /= adp->va_info.vi_cheight;
+ adp->va_info.vi_width /= adp->va_info.vi_cwidth;
+
+ return(error);
+}
+
+int
+gfb_save_palette(video_adapter_t *adp, u_char *palette)
+{
+ struct gfb_softc *sc;
+ int error;
+ int i;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+#if 0
+ /* If we have a RAMDAC-specific counterpart, use it... */
+ if(sc->gfbc->ramdac_save_palette)
+ error = sc->gfbc->ramdac_save_palette(adp, &sc->gfbc->palette);
+
+ else
+ /* Otherwise, use the built-in functionality... */
+ error = sc->gfbc->builtin_save_palette(adp, &sc->gfbc->palette);
+#endif
+
+ for(i = 0; i < sc->gfbc->palette.count; i++) {
+ palette[(3 * i)] = sc->gfbc->palette.red[i];
+ palette[(3 * i) + 1] = sc->gfbc->palette.green[i];
+ palette[(3 * i) + 2] = sc->gfbc->palette.blue[i];
+ }
+ return(error);
+}
+
+int
+gfb_load_palette(video_adapter_t *adp, u_char *palette)
+{
+ struct gfb_softc *sc;
+ int error;
+ int i;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ for(i = 0; i < sc->gfbc->palette.count; i++) {
+ sc->gfbc->palette.red[i] = palette[(3 * i)];
+ sc->gfbc->palette.green[i] = palette[(3 * i) + 1];
+ sc->gfbc->palette.blue[i] = palette[(3 * i) + 2];
+ }
+
+ /* If we have a RAMDAC-specific counterpart, use it... */
+ if(sc->gfbc->ramdac_load_palette)
+ error = sc->gfbc->ramdac_load_palette(adp, &sc->gfbc->palette);
+ else
+ /* Otherwise, use the built-in functionality... */
+ error = sc->gfbc->builtin_load_palette(adp, &sc->gfbc->palette);
+
+ return(error);
+}
+
+int
+gfb_set_border(video_adapter_t *adp, int color)
+{
+
+ return(ENODEV);
+}
+
+int
+gfb_save_state(video_adapter_t *adp, void *p, size_t size)
+{
+ int i;
+ u_int32_t *regs;
+
+ regs = (u_int32_t *)p;
+ regs[0] = size;
+ for(i = 1; i <= size; i++)
+ regs[i] = READ_GFB_REGISTER(adp, i);
+ return(0);
+}
+
+int
+gfb_load_state(video_adapter_t *adp, void *p)
+{
+ size_t size;
+ int i;
+ u_int32_t *regs;
+
+ regs = (u_int32_t *)p;
+ size = regs[0];
+ for(i = 1; i <= size; i++)
+ WRITE_GFB_REGISTER(adp, i, regs[i]);
+ return(0);
+}
+
+int
+gfb_set_win_org(video_adapter_t *adp, off_t offset)
+{
+
+ adp->va_window_orig = offset;
+ return(0);
+}
+
+int
+gfb_read_hw_cursor(video_adapter_t *adp, int *col, int *row)
+{
+ struct gfb_softc *sc;
+ int error;
+
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ /* If we have a RAMDAC-specific counterpart, use it... */
+ if(sc->gfbc->ramdac_read_hw_cursor)
+ error = sc->gfbc->ramdac_read_hw_cursor(adp, col, row);
+ else
+ /* Otherwise, use the built-in functionality... */
+ error = sc->gfbc->builtin_read_hw_cursor(adp, col, row);
+
+ return(error);
+}
+
+int
+gfb_set_hw_cursor(adp, col, row)
+ video_adapter_t *adp;
+ int col;
+ int row;
+{
+ int error;
+ struct gfb_softc *sc;
+
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ /* If we have a RAMDAC-specific counterpart, use it... */
+ if(sc->gfbc->ramdac_set_hw_cursor)
+ error = sc->gfbc->ramdac_set_hw_cursor(adp, col, row);
+
+ /* Otherwise, use the built-in functionality... */
+ else
+ error = sc->gfbc->builtin_set_hw_cursor(adp, col, row);
+ return(error);
+}
+
+int
+gfb_set_hw_cursor_shape(video_adapter_t *adp, int base, int height,
+ int cellsize, int blink)
+{
+ struct gfb_softc *sc;
+ int error;
+
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ /* If we have a RAMDAC-specific counterpart, use it... */
+ if(sc->gfbc->ramdac_set_hw_cursor_shape)
+ error = sc->gfbc->ramdac_set_hw_cursor_shape(adp, base, height,
+ cellsize, blink);
+ else
+ /* Otherwise, use the built-in functionality... */
+ error = sc->gfbc->builtin_set_hw_cursor_shape(adp, base,
+ height, cellsize, blink);
+
+ return(error);
+}
+
+int
+gfb_mmap(video_adapter_t *adp, vm_offset_t offset, vm_offset_t *paddr, int prot)
+{
+
+ /* XXX */
+ if(offset > adp->va_window_size - PAGE_SIZE)
+ return(ENXIO);
+ *paddr = adp->va_info.vi_window + offset;
+ return(0);
+}
+
+int
+gfb_ioctl(video_adapter_t *adp, u_long cmd, caddr_t arg)
+{
+ struct gfb_softc *sc;
+ int error;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ switch (cmd) {
+ case FBIOPUTCMAP:
+ /* FALLTHROUGH */
+ case FBIO_GETWINORG:
+ /* FALLTHROUGH */
+ case FBIO_SETWINORG:
+ /* FALLTHROUGH */
+ case FBIO_SETDISPSTART:
+ /* FALLTHROUGH */
+ case FBIO_SETLINEWIDTH:
+ /* FALLTHROUGH */
+ case FBIO_GETPALETTE:
+ /* FALLTHROUGH */
+ case FBIOGTYPE:
+ /* FALLTHROUGH */
+ case FBIOGETCMAP:
+ /* FALLTHROUGH */
+ default:
+ error = fb_commonioctl(adp, cmd, arg);
+ }
+ return(error);
+}
+
+int
+gfb_fill_rect(video_adapter_t *adp, int val, int x, int y, int cx, int cy)
+{
+ int off;
+
+ /*
+ Just traverse the buffer, one pixel span at a time, setting
+ each pixel to the block-color...
+ */
+ for(off = (x * y); off < ((x + cx) * (y + cy)); off++)
+ (*vidsw[adp->va_index]->putp)(adp, off, 0x000007ff, 0xffffffff,
+ sizeof(u_int32_t), 1, 0, 0);
+
+ return(0);
+}
+
+int
+gfb_bitblt(video_adapter_t *adp, ...)
+{
+ va_list args;
+ vm_offset_t src, dst;
+ int count, i;
+ u_int32_t val;
+
+ va_start(args, adp);
+
+ src = (va_arg(args, vm_offset_t) + adp->va_window_orig) &
+ 0x0000000000fffff8;
+ dst = (va_arg(args, vm_offset_t) + adp->va_window_orig) &
+ 0x0000000000fffff8;
+ count = va_arg(args, int);
+ for(i = 0; i < count; i++, src++, dst++) {
+ val = READ_GFB_BUFFER(adp, src);
+ WRITE_GFB_BUFFER(adp, dst, val);
+ }
+ va_end(args);
+ return(0);
+}
+
+int
+/*gfb_clear(video_adapter_t *adp, int n)*/
+gfb_clear(video_adapter_t *adp)
+{
+ int off;
+
+#if 0
+ if(n == 0)
+ return(0);
+#endif
+
+ /*
+ Just traverse the buffer, one 2K-pixel span at a time, clearing
+ each pixel...
+ */
+ /* for(off = 0; off < (n * adp->va_line_width); off += (2 KB)) */
+ for(off = 0; off < adp->va_window_size; off++)
+ (*vidsw[adp->va_index]->putp)(adp, off, 0x000007ff, 0xffffffff,
+ sizeof(u_int32_t), 1, 0, 0);
+
+ return(0);
+}
+
+int
+gfb_diag(video_adapter_t *adp, int level)
+{
+ video_info_t info;
+ struct gfb_softc *sc;
+ int error;
+
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ /* Just dump everything we know about the adapter to the screen... */
+ fb_dump_adp_info(sc->driver_name, adp, level);
+
+ /* Try to get the info on this adapter... */
+ if(!(error = (*vidsw[adp->va_index]->get_info)(adp,
+ adp->va_initial_mode, &info)))
+ /*
+ Just dump everything we know about the adapter's mode
+ to the screen...
+ */
+ fb_dump_mode_info(sc->driver_name, adp, &info, level);
+
+ return(error);
+}
+
+int
+gfb_save_cursor_palette(video_adapter_t *adp, u_char *palette)
+{
+ struct gfb_softc *sc;
+ int error, i;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+#if 0
+ /* If we have a RAMDAC-specific counterpart, use it... */
+ if(sc->gfbc->ramdac_save_cursor_palette)
+ error = sc->gfbc->ramdac_save_cursor_palette(adp,
+ &sc->gfbc->cursor_palette);
+
+ else
+ /* Otherwise, use the built-in functionality... */
+ error = sc->gfbc->builtin_save_cursor_palette(adp,
+ &sc->gfbc->cursor_palette);
+#endif
+
+ for(i = 0; i < sc->gfbc->cursor_palette.count; i++) {
+ palette[(3 * i)] = sc->gfbc->cursor_palette.red[i];
+ palette[(3 * i) + 1] = sc->gfbc->cursor_palette.green[i];
+ palette[(3 * i) + 2] = sc->gfbc->cursor_palette.blue[i];
+ }
+ return(error);
+}
+
+int
+gfb_load_cursor_palette(video_adapter_t *adp, u_char *palette)
+{
+ struct gfb_softc *sc;
+ int error, i;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ for(i = 0; i < sc->gfbc->cursor_palette.count; i++) {
+ sc->gfbc->cursor_palette.red[i] = palette[(3 * i)];
+ sc->gfbc->cursor_palette.green[i] = palette[(3 * i) + 1];
+ sc->gfbc->cursor_palette.blue[i] = palette[(3 * i) + 2];
+ }
+
+ /* If we have a RAMDAC-specific counterpart, use it... */
+ if(sc->gfbc->ramdac_load_cursor_palette)
+ error = sc->gfbc->ramdac_load_cursor_palette(adp,
+ &sc->gfbc->cursor_palette);
+ else
+ /* Otherwise, use the built-in functionality... */
+ error = sc->gfbc->builtin_load_cursor_palette(adp,
+ &sc->gfbc->cursor_palette);
+
+ return(error);
+}
+
+int
+gfb_copy(video_adapter_t *adp, vm_offset_t src, vm_offset_t dst, int n)
+{
+ int error, num_pixels;
+
+ if(n == 0)
+ return(0);
+ num_pixels = adp->va_info.vi_cheight * adp->va_line_width;
+ error = (*vidsw[adp->va_index]->bitblt)(adp, src * num_pixels,
+ dst * num_pixels, n * num_pixels);
+ return(error);
+}
+
+int
+gfb_putp(video_adapter_t *adp, vm_offset_t off, u_int32_t p, u_int32_t a,
+ int size, int bpp, int bit_ltor, int byte_ltor)
+{
+ int i, j, k, num_shifts;
+ u_int32_t _p, val[32];
+
+ if(bpp < 1)
+ return(-1);
+
+ /*
+ If we don't display bits right-to-left (little-bitian?),
+ then perform a bit-swap on p...
+ */
+ if(bit_ltor) {
+ num_shifts = 8 * size;
+ for(i = 0, _p = 0; i < num_shifts; i++, p >>= 1) {
+ _p <<= 1;
+ _p |= (p & 0x00000001);
+ }
+ } else
+ _p = p;
+
+ switch(bpp) {
+ /* Accelerate the simplest cases... */
+ case 1:
+ if((a & 0x00000001) == 0)
+ val[0] = 0;
+ else if(size <= 0)
+ val[0] = 0;
+ else if(size == 1)
+ val[0] = _p & 0x000000ff;
+ else if(size == 2)
+ val[0] = _p & 0x0000ffff;
+ else if(size == 3)
+ val[0] = _p & 0x00ffffff;
+ else if(size == 4)
+ val[0] = _p & 0xffffffff;
+ break;
+
+ /* Only do the following if we are not a simple case... */
+ case 8:
+ if(size > 0) {
+ a &= 0x000000ff;
+ val[0] = 0;
+ if(_p & 0x00000001) val[0] |= (a);
+ if(_p & 0x00000002) val[0] |= (a << 8);
+ if(_p & 0x00000004) val[0] |= (a << 16);
+ if(_p & 0x00000008) val[0] |= (a << 24);
+ val[1] = 0;
+ if(_p & 0x00000010) val[1] |= (a);
+ if(_p & 0x00000020) val[1] |= (a << 8);
+ if(_p & 0x00000040) val[1] |= (a << 16);
+ if(_p & 0x00000080) val[1] |= (a << 24);
+ }
+ if(size > 1) {
+ val[2] = 0;
+ if(_p & 0x00000100) val[2] |= (a);
+ if(_p & 0x00000200) val[2] |= (a << 8);
+ if(_p & 0x00000400) val[2] |= (a << 16);
+ if(_p & 0x00000800) val[2] |= (a << 24);
+ val[3] = 0;
+ if(_p & 0x00001000) val[3] |= (a);
+ if(_p & 0x00002000) val[3] |= (a << 8);
+ if(_p & 0x00004000) val[3] |= (a << 16);
+ if(_p & 0x00008000) val[3] |= (a << 24);
+ }
+ if(size > 2) {
+ val[4] = 0;
+ if(_p & 0x00010000) val[4] |= (a);
+ if(_p & 0x00020000) val[4] |= (a << 8);
+ if(_p & 0x00040000) val[4] |= (a << 16);
+ if(_p & 0x00080000) val[4] |= (a << 24);
+ val[5] = 0;
+ if(_p & 0x00100000) val[5] |= (a);
+ if(_p & 0x00200000) val[5] |= (a << 8);
+ if(_p & 0x00400000) val[5] |= (a << 16);
+ if(_p & 0x00800080) val[5] |= (a << 24);
+ }
+ if(size > 3) {
+ val[6] = 0;
+ if(_p & 0x01000000) val[6] |= (a);
+ if(_p & 0x02000000) val[6] |= (a << 8);
+ if(_p & 0x04000000) val[6] |= (a << 16);
+ if(_p & 0x08000000) val[6] |= (a << 24);
+ val[7] = 0;
+ if(_p & 0x10000000) val[7] |= (a);
+ if(_p & 0x20000000) val[7] |= (a << 8);
+ if(_p & 0x40000000) val[7] |= (a << 16);
+ if(_p & 0x80000000) val[7] |= (a << 24);
+ }
+ break;
+ case 16:
+ if(size > 0) {
+ a &= 0x0000ffff;
+ if(_p & 0x00000001) val[0] |= (a);
+ if(_p & 0x00000002) val[0] |= (a << 16);
+ if(_p & 0x00000004) val[1] |= (a);
+ if(_p & 0x00000008) val[1] |= (a << 16);
+ if(_p & 0x00000010) val[2] |= (a);
+ if(_p & 0x00000020) val[2] |= (a << 16);
+ if(_p & 0x00000040) val[3] |= (a);
+ if(_p & 0x00000080) val[3] |= (a << 16);
+ }
+ if(size > 1) {
+ if(_p & 0x00000100) val[4] |= (a);
+ if(_p & 0x00000200) val[4] |= (a << 16);
+ if(_p & 0x00000400) val[5] |= (a);
+ if(_p & 0x00000800) val[5] |= (a << 16);
+ if(_p & 0x00001000) val[6] |= (a);
+ if(_p & 0x00002000) val[6] |= (a << 16);
+ if(_p & 0x00004000) val[7] |= (a);
+ if(_p & 0x00008000) val[7] |= (a << 16);
+ }
+ if(size > 2) {
+ if(_p & 0x00010000) val[8] |= (a);
+ if(_p & 0x00020000) val[8] |= (a << 16);
+ if(_p & 0x00040000) val[9] |= (a);
+ if(_p & 0x00080000) val[9] |= (a << 16);
+ if(_p & 0x00100000) val[10] |= (a);
+ if(_p & 0x00200000) val[10] |= (a << 16);
+ if(_p & 0x00400000) val[11] |= (a);
+ if(_p & 0x00800000) val[11] |= (a << 16);
+ }
+ if(size > 3) {
+ if(_p & 0x01000000) val[12] |= (a);
+ if(_p & 0x02000000) val[12] |= (a << 16);
+ if(_p & 0x04000000) val[13] |= (a);
+ if(_p & 0x08000000) val[13] |= (a << 16);
+ if(_p & 0x10000000) val[14] |= (a);
+ if(_p & 0x20000000) val[14] |= (a << 16);
+ if(_p & 0x40000000) val[15] |= (a);
+ if(_p & 0x80000000) val[15] |= (a << 16);
+ }
+ break;
+ case 32:
+ if(size > 0) {
+ a &= 0xffffffff;
+ if(_p & 0x00000001) val[0] = (a);
+ if(_p & 0x00000002) val[1] = (a);
+ if(_p & 0x00000004) val[2] = (a);
+ if(_p & 0x00000008) val[3] = (a);
+ if(_p & 0x00000010) val[4] = (a);
+ if(_p & 0x00000020) val[5] = (a);
+ if(_p & 0x00000040) val[6] = (a);
+ if(_p & 0x00000080) val[7] = (a);
+ }
+ if(size > 1) {
+ if(_p & 0x00000100) val[8] = (a);
+ if(_p & 0x00000200) val[9] = (a);
+ if(_p & 0x00000400) val[10] = (a);
+ if(_p & 0x00000800) val[11] = (a);
+ if(_p & 0x00001000) val[12] = (a);
+ if(_p & 0x00002000) val[13] = (a);
+ if(_p & 0x00004000) val[14] = (a);
+ if(_p & 0x00008000) val[15] = (a);
+ }
+ if(size > 2) {
+ if(_p & 0x00010000) val[16] = (a);
+ if(_p & 0x00020000) val[17] = (a);
+ if(_p & 0x00040000) val[18] = (a);
+ if(_p & 0x00080000) val[19] = (a);
+ if(_p & 0x00100000) val[20] = (a);
+ if(_p & 0x00200000) val[21] = (a);
+ if(_p & 0x00400000) val[22] = (a);
+ if(_p & 0x00800000) val[23] = (a);
+ }
+ if(size > 3) {
+ if(_p & 0x01000000) val[24] = (a);
+ if(_p & 0x02000000) val[25] = (a);
+ if(_p & 0x04000000) val[26] = (a);
+ if(_p & 0x08000000) val[27] = (a);
+ if(_p & 0x10000000) val[28] = (a);
+ if(_p & 0x20000000) val[29] = (a);
+ if(_p & 0x40000000) val[30] = (a);
+ if(_p & 0x80000000) val[31] = (a);
+ }
+ break;
+ default:
+ break;
+ }
+ j = (bpp == 1) ? 1 : bpp * size / sizeof(u_int32_t);
+
+ /*
+ If we don't display bytes right-to-left (little-endian),
+ then perform a byte-swap on p (we don't have to swap if
+ bpp == 1 and val[0] == 0)...
+ */
+ if((byte_ltor) && (j > 1) && (val[j] != 0)) {
+ for(i = 0; i < (j - i); i++) {
+ _p = val[j - i];
+ val[j - i] = val[i];
+ val[i] = _p;
+ }
+ for(i = 0; i < j; i++) {
+ _p = val[i];
+ for(k = 0, val[i] = 0; k < sizeof(u_int32_t);
+ k++, _p >>= 8) {
+ val[i] <<= 8;
+ val[i] |= (_p & 0xff);
+ }
+ }
+ }
+
+ for(i = 0; i < j; i++) {
+ /* Write the pixel-row... */
+ WRITE_GFB_BUFFER(adp, (off + i), val[i]);
+ }
+ return(0);
+}
+
+int
+gfb_putc(video_adapter_t *adp, vm_offset_t off, u_int8_t c, u_int8_t a)
+{
+ vm_offset_t poff;
+ struct gfb_softc *sc;
+ int i, pixel_size;
+ u_int row, col;
+ u_int8_t *pixel;
+
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+ pixel_size = adp->va_info.vi_depth / 8;
+
+ /* Get the start of the array of pixels rows for this character... */
+ pixel = sc->gfbc->font + (c * adp->va_info.vi_cheight);
+
+ /* Calculate the new cursor position... */
+ row = off / adp->va_info.vi_width;
+ col = off % adp->va_info.vi_width;
+
+ /* Iterate over all the pixel rows for this character... */
+ for(i = 0; i < adp->va_info.vi_cheight; i++) {
+ /* Get the address of the character's pixel-row... */
+ poff = ((col * adp->va_info.vi_cwidth * pixel_size) +
+ (((row * adp->va_info.vi_cheight) + i) *
+ adp->va_line_width)) / sizeof(u_int32_t);
+
+ /* Now display the current pixel row... */
+ (*vidsw[adp->va_index]->putp)(adp, poff, pixel[i], a,
+ sizeof(u_int8_t), 1, 1, 0);
+ }
+ return(0);
+}
+
+int
+gfb_puts(video_adapter_t *adp, vm_offset_t off, u_int16_t *s, int len)
+{
+ struct gfb_softc *sc;
+ int i;
+
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ /* If the string in empty, just return now... */
+ if(len == 0)
+ return(0);
+
+ for(i = 0; i < len; i++)
+ (*vidsw[adp->va_index]->putc)(adp, off + i, s[i] & 0x00ff,
+ (s[i] & 0xff00) >> 8);
+
+ return(0);
+}
+
+int
+gfb_putm(video_adapter_t *adp, int x, int y, u_int8_t *pixel_image,
+ u_int32_t pixel_mask, int size, int width)
+{
+ vm_offset_t poff;
+ int i, pixel_size;
+
+ pixel_size = adp->va_info.vi_depth / 8;
+
+ /* Iterate over all the pixel rows for the mouse pointer... */
+ for(i = 0; i < size; i++) {
+ /* Get the address of the mouse pointer's pixel-row... */
+ poff = ((x * pixel_size) + ((y + i) * adp->va_line_width)) /
+ sizeof(u_int32_t);
+ /* Now display the current pixel-row... */
+ (*vidsw[adp->va_index]->putp)(adp, poff, pixel_image[i],
+ pixel_mask, sizeof(u_int8_t), 1, 1, 0);
+ }
+
+ return(0);
+}
+
+int
+gfb_error(void)
+{
+
+ return(0);
+}
diff --git a/sys/dev/fb/gfb.h b/sys/dev/fb/gfb.h
new file mode 100644
index 000000000000..89ead2e3a225
--- /dev/null
+++ b/sys/dev/fb/gfb.h
@@ -0,0 +1,172 @@
+/*-
+ * 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.
+ *
+ * Copyright (c) 2000 Andrew Miklic
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _FB_GFB_H_
+#define _FB_GFB_H_
+
+#define MAX_NUM_GFB_CARDS 16
+
+#define GFB_UNIT(dev) minor(dev)
+#define GFB_MKMINOR(unit) (unit)
+#define BIT_REVERSE(byte) \
+ ((((byte) & 0x01) << 7) | \
+ (((byte) & 0x02) << 5) | \
+ (((byte) & 0x04) << 3) | \
+ (((byte) & 0x08) << 1) | \
+ (((byte) & 0x10) >> 1) | \
+ (((byte) & 0x20) >> 3) | \
+ (((byte) & 0x40) >> 5) | \
+ (((byte) & 0x80) >> 7))
+#define probe_done(adp) ((adp)->va_flags & V_ADP_PROBED)
+#define init_done(adp) ((adp)->va_flags & V_ADP_INITIALIZED)
+#define config_done(adp) ((adp)->va_flags & V_ADP_REGISTERED)
+
+struct gfb_softc;
+
+int gfb_error(void);
+vi_probe_t gfb_probe;
+vi_init_t gfb_init;
+
+vi_get_info_t gfb_get_info;
+/*vi_query_mode_t gfb_query_mode;*/
+vi_set_mode_t gfb_set_mode;
+vi_save_font_t gfb_save_font;
+vi_load_font_t gfb_load_font;
+vi_show_font_t gfb_show_font;
+vi_save_palette_t gfb_save_palette;
+vi_load_palette_t gfb_load_palette;
+vi_save_state_t gfb_save_state;
+vi_load_state_t gfb_load_state;
+vi_read_hw_cursor_t gfb_read_hw_cursor;
+vi_set_hw_cursor_t gfb_set_hw_cursor;
+vi_set_hw_cursor_shape_t gfb_set_hw_cursor_shape;
+vi_mmap_t gfb_mmap;
+vi_ioctl_t gfb_ioctl;
+vi_set_border_t gfb_set_border;
+vi_set_win_org_t gfb_set_win_org;
+vi_fill_rect_t gfb_fill_rect;
+vi_bitblt_t gfb_bitblt;
+vi_clear_t gfb_clear;
+vi_diag_t gfb_diag;
+vi_save_cursor_palette_t gfb_save_cursor_palette;
+vi_load_cursor_palette_t gfb_load_cursor_palette;
+vi_copy_t gfb_copy;
+vi_putp_t gfb_putp;
+vi_putc_t gfb_putc;
+vi_puts_t gfb_puts;
+vi_putm_t gfb_putm;
+
+typedef void gfb_ramdac_init_t(struct gfb_softc *);
+typedef u_int8_t gfb_ramdac_rd_t(struct gfb_softc *, u_int);
+typedef void gfb_ramdac_wr_t(struct gfb_softc *, u_int, u_int8_t);
+typedef void gfb_ramdac_intr_t(struct gfb_softc *);
+typedef int gfb_ramdac_save_palette_t(video_adapter_t *, video_color_palette_t *);
+typedef int gfb_ramdac_load_palette_t(video_adapter_t *, video_color_palette_t *);
+typedef int gfb_ramdac_save_cursor_palette_t(video_adapter_t *, struct fbcmap *);
+typedef int gfb_ramdac_load_cursor_palette_t(video_adapter_t *, struct fbcmap *);
+typedef int gfb_ramdac_read_hw_cursor_t(video_adapter_t *, int *, int *);
+typedef int gfb_ramdac_set_hw_cursor_t(video_adapter_t *, int, int);
+typedef int gfb_ramdac_set_hw_cursor_shape_t(video_adapter_t *, int, int, int, int);
+typedef int gfb_builtin_save_palette_t(video_adapter_t *, video_color_palette_t *);
+typedef int gfb_builtin_load_palette_t(video_adapter_t *, video_color_palette_t *);
+typedef int gfb_builtin_save_cursor_palette_t(video_adapter_t *, struct fbcmap *);
+typedef int gfb_builtin_load_cursor_palette_t(video_adapter_t *, struct fbcmap *);
+typedef int gfb_builtin_read_hw_cursor_t(video_adapter_t *, int *, int *);
+typedef int gfb_builtin_set_hw_cursor_t(video_adapter_t *, int, int);
+typedef int gfb_builtin_set_hw_cursor_shape_t(video_adapter_t *, int, int, int, int);
+
+struct monitor {
+ u_int16_t cols; /* Columns */
+ u_int16_t hfp; /* Horizontal Front Porch */
+ u_int16_t hsync; /* Horizontal Sync */
+ u_int16_t hbp; /* Horizontal Back Porch */
+ u_int16_t rows; /* Rows */
+ u_int16_t vfp; /* Vertical Front Porch */
+ u_int16_t vsync; /* Vertical Sync */
+ u_int16_t vbp; /* Vertical Back Porch */
+ u_int32_t dotclock; /* Dot Clock */
+};
+
+struct gfb_font {
+ int width;
+ int height;
+ u_char data[256 * 32];
+};
+
+struct gfb_conf {
+ char *name; /* name for this board type */
+ char *ramdac_name; /* name for this RAMDAC */
+ u_char *font;
+ struct gfb_font fonts[4];
+ video_color_palette_t palette;
+ struct fbcmap cursor_palette;
+ gfb_ramdac_init_t *ramdac_init;
+ gfb_ramdac_rd_t *ramdac_rd;
+ gfb_ramdac_wr_t *ramdac_wr;
+ gfb_ramdac_intr_t *ramdac_intr;
+ gfb_ramdac_save_palette_t *ramdac_save_palette;
+ gfb_ramdac_load_palette_t *ramdac_load_palette;
+ gfb_ramdac_save_cursor_palette_t *ramdac_save_cursor_palette;
+ gfb_ramdac_load_cursor_palette_t *ramdac_load_cursor_palette;
+ gfb_ramdac_read_hw_cursor_t *ramdac_read_hw_cursor;
+ gfb_ramdac_set_hw_cursor_t *ramdac_set_hw_cursor;
+ gfb_ramdac_set_hw_cursor_shape_t *ramdac_set_hw_cursor_shape;
+ gfb_builtin_save_palette_t *builtin_save_palette;
+ gfb_builtin_load_palette_t *builtin_load_palette;
+ gfb_builtin_save_cursor_palette_t *builtin_save_cursor_palette;
+ gfb_builtin_load_cursor_palette_t *builtin_load_cursor_palette;
+ gfb_builtin_read_hw_cursor_t *builtin_read_hw_cursor;
+ gfb_builtin_set_hw_cursor_t *builtin_set_hw_cursor;
+ gfb_builtin_set_hw_cursor_shape_t *builtin_set_hw_cursor_shape;
+};
+
+struct video_adapter;
+struct genfb_softc;
+
+typedef struct gfb_softc {
+ char *driver_name; /* name for this driver */
+ struct video_adapter *adp;
+ struct genfb_softc *gensc;
+ struct gfb_conf *gfbc;
+ bus_space_handle_t bhandle;
+ bus_space_tag_t btag;
+ bus_space_handle_t regs;
+ void *intrhand;
+ struct resource *irq;
+ struct resource *res;
+ u_int8_t rev; /* GFB revision */
+ int type;
+ int model;
+ struct cdevsw *cdevsw;
+ struct cdev *devt;
+} *gfb_softc_t;
+
+#endif /* _FB_GFB_H_ */
diff --git a/sys/dev/fb/machfb.c b/sys/dev/fb/machfb.c
new file mode 100644
index 000000000000..31b22ab26137
--- /dev/null
+++ b/sys/dev/fb/machfb.c
@@ -0,0 +1,1584 @@
+/*-
+ * Copyright (c) 2002 Bang Jun-Young
+ * All rights reserved.
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ *
+ * from: NetBSD: machfb.c,v 1.23 2005/03/07 21:45:24 martin Exp
+ */
+/*-
+ * Copyright (c) 2005 Marius Strobl <marius@FreeBSD.org>
+ * All rights reserved.
+ *
+ * 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,
+ * without modification, immediately at the beginning of the file.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+/*
+ * Driver for ATI Mach64 graphics chips. Some code is derived from the
+ * ATI Rage Pro and Derivatives Programmer's Guide.
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/consio.h>
+#include <sys/eventhandler.h>
+#include <sys/fbio.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+#include <sys/resource.h>
+
+#include <dev/ofw/ofw_bus.h>
+#include <dev/ofw/openfirm.h>
+
+#include <machine/bus.h>
+#include <machine/bus_private.h>
+#include <machine/ofw_machdep.h>
+#include <machine/resource.h>
+#include <machine/sc_machdep.h>
+
+#include <sys/rman.h>
+
+#include <dev/fb/fbreg.h>
+#include <dev/fb/gallant12x22.h>
+#include <dev/fb/machfbreg.h>
+#include <dev/pci/pcivar.h>
+#include <dev/pci/pcireg.h>
+#include <dev/syscons/syscons.h>
+
+/* #define MACHFB_DEBUG */
+
+#define MACHFB_DRIVER_NAME "machfb"
+
+#define MACH64_REG_OFF 0x7ffc00
+#define MACH64_REG_SIZE 1024
+
+struct machfb_softc {
+ video_adapter_t sc_va; /* must be first */
+
+ phandle_t sc_node;
+ uint16_t sc_chip_id;
+ uint8_t sc_chip_rev;
+
+ int sc_memrid;
+ int sc_viorid;
+ int sc_vmemrid;
+ struct resource *sc_memres;
+ struct resource *sc_viores;
+ struct resource *sc_vmemres;
+ bus_space_tag_t sc_memt;
+ bus_space_tag_t sc_regt;
+ bus_space_tag_t sc_viot;
+ bus_space_tag_t sc_vmemt;
+ bus_space_handle_t sc_memh;
+ bus_space_handle_t sc_regh;
+ bus_space_handle_t sc_vioh;
+ bus_space_handle_t sc_vmemh;
+
+ int sc_height;
+ int sc_width;
+ int sc_depth;
+ int sc_xmargin;
+ int sc_ymargin;
+
+ size_t sc_memsize;
+ int sc_memtype;
+ int sc_mem_freq;
+ int sc_ramdac_freq;
+ int sc_ref_freq;
+
+ int sc_ref_div;
+ int sc_mclk_post_div;
+ int sc_mclk_fb_div;
+
+ u_char *sc_font;
+ int sc_cbwidth;
+ vm_offset_t sc_curoff;
+
+ int sc_bg_cache;
+ int sc_fg_cache;
+ int sc_draw_cache;
+#define MACHFB_DRAW_CHAR (1 << 0)
+#define MACHFB_DRAW_FILLRECT (1 << 1)
+
+ int sc_flags;
+#define MACHFB_CONSOLE (1 << 0)
+#define MACHFB_CUREN (1 << 1)
+#define MACHFB_DSP (1 << 2)
+};
+
+static const struct {
+ uint16_t chip_id;
+ const char *name;
+ uint32_t ramdac_freq;
+} machfb_info[] = {
+ { ATI_MACH64_CT, "ATI Mach64 CT", 135000 },
+ { ATI_RAGE_PRO_AGP, "ATI 3D Rage Pro (AGP)", 230000 },
+ { ATI_RAGE_PRO_AGP1X, "ATI 3D Rage Pro (AGP 1x)", 230000 },
+ { ATI_RAGE_PRO_PCI_B, "ATI 3D Rage Pro Turbo", 230000 },
+ { ATI_RAGE_XC_PCI66, "ATI Rage XL (PCI66)", 230000 },
+ { ATI_RAGE_XL_AGP, "ATI Rage XL (AGP)", 230000 },
+ { ATI_RAGE_XC_AGP, "ATI Rage XC (AGP)", 230000 },
+ { ATI_RAGE_XL_PCI66, "ATI Rage XL (PCI66)", 230000 },
+ { ATI_RAGE_PRO_PCI_P, "ATI 3D Rage Pro", 230000 },
+ { ATI_RAGE_PRO_PCI_L, "ATI 3D Rage Pro (limited 3D)", 230000 },
+ { ATI_RAGE_XL_PCI, "ATI Rage XL", 230000 },
+ { ATI_RAGE_XC_PCI, "ATI Rage XC", 230000 },
+ { ATI_RAGE_II, "ATI 3D Rage I/II", 135000 },
+ { ATI_RAGE_IIP, "ATI 3D Rage II+", 200000 },
+ { ATI_RAGE_IIC_PCI, "ATI 3D Rage IIC", 230000 },
+ { ATI_RAGE_IIC_AGP_B, "ATI 3D Rage IIC (AGP)", 230000 },
+ { ATI_RAGE_IIC_AGP_P, "ATI 3D Rage IIC (AGP)", 230000 },
+ { ATI_RAGE_LT_PRO_AGP, "ATI 3D Rage LT Pro (AGP 133MHz)", 230000 },
+ { ATI_RAGE_MOB_M3_PCI, "ATI Rage Mobility M3", 230000 },
+ { ATI_RAGE_MOB_M3_AGP, "ATI Rage Mobility M3 (AGP)", 230000 },
+ { ATI_RAGE_LT, "ATI 3D Rage LT", 230000 },
+ { ATI_RAGE_LT_PRO_PCI, "ATI 3D Rage LT Pro", 230000 },
+ { ATI_RAGE_MOBILITY, "ATI Rage Mobility", 230000 },
+ { ATI_RAGE_L_MOBILITY, "ATI Rage L Mobility", 230000 },
+ { ATI_RAGE_LT_PRO, "ATI 3D Rage LT Pro", 230000 },
+ { ATI_RAGE_LT_PRO2, "ATI 3D Rage LT Pro", 230000 },
+ { ATI_RAGE_MOB_M1_PCI, "ATI Rage Mobility M1 (PCI)", 230000 },
+ { ATI_RAGE_L_MOB_M1_PCI, "ATI Rage L Mobility (PCI)", 230000 },
+ { ATI_MACH64_VT, "ATI Mach64 VT", 170000 },
+ { ATI_MACH64_VTB, "ATI Mach64 VTB", 200000 },
+ { ATI_MACH64_VT4, "ATI Mach64 VT4", 230000 }
+};
+
+static const struct machfb_cmap {
+ uint8_t red;
+ uint8_t green;
+ uint8_t blue;
+} machfb_default_cmap[16] = {
+ {0x00, 0x00, 0x00}, /* black */
+ {0x00, 0x00, 0xff}, /* blue */
+ {0x00, 0xff, 0x00}, /* green */
+ {0x00, 0xc0, 0xc0}, /* cyan */
+ {0xff, 0x00, 0x00}, /* red */
+ {0xc0, 0x00, 0xc0}, /* magenta */
+ {0xc0, 0xc0, 0x00}, /* brown */
+ {0xc0, 0xc0, 0xc0}, /* light grey */
+ {0x80, 0x80, 0x80}, /* dark grey */
+ {0x80, 0x80, 0xff}, /* light blue */
+ {0x80, 0xff, 0x80}, /* light green */
+ {0x80, 0xff, 0xff}, /* light cyan */
+ {0xff, 0x80, 0x80}, /* light red */
+ {0xff, 0x80, 0xff}, /* light magenta */
+ {0xff, 0xff, 0x80}, /* yellow */
+ {0xff, 0xff, 0xff} /* white */
+};
+
+#define MACHFB_CMAP_OFF 16
+
+static const u_char machfb_mouse_pointer_bits[64][8] = {
+ { 0x00, 0x00, }, /* ............ */
+ { 0x80, 0x00, }, /* *........... */
+ { 0xc0, 0x00, }, /* **.......... */
+ { 0xe0, 0x00, }, /* ***......... */
+ { 0xf0, 0x00, }, /* ****........ */
+ { 0xf8, 0x00, }, /* *****....... */
+ { 0xfc, 0x00, }, /* ******...... */
+ { 0xfe, 0x00, }, /* *******..... */
+ { 0xff, 0x00, }, /* ********.... */
+ { 0xff, 0x80, }, /* *********... */
+ { 0xfc, 0xc0, }, /* ******..**.. */
+ { 0xdc, 0x00, }, /* **.***...... */
+ { 0x8e, 0x00, }, /* *...***..... */
+ { 0x0e, 0x00, }, /* ....***..... */
+ { 0x07, 0x00, }, /* .....***.... */
+ { 0x04, 0x00, }, /* .....*...... */
+ { 0x00, 0x00, }, /* ............ */
+ { 0x00, 0x00, }, /* ............ */
+ { 0x00, 0x00, }, /* ............ */
+ { 0x00, 0x00, }, /* ............ */
+ { 0x00, 0x00, }, /* ............ */
+ { 0x00, 0x00, }, /* ............ */
+};
+
+/*
+ * Lookup table to perform a bit-swap of the mouse pointer bits,
+ * map set bits to CUR_CLR0 and unset bits to transparent.
+ */
+static const u_char machfb_mouse_pointer_lut[] = {
+ 0xaa, 0x2a, 0x8a, 0x0a, 0xa2, 0x22, 0x82, 0x02,
+ 0xa8, 0x28, 0x88, 0x08, 0xa0, 0x20, 0x80, 0x00
+};
+
+static const char *machfb_memtype_names[] = {
+ "(N/A)", "DRAM", "EDO DRAM", "EDO DRAM", "SDRAM", "SGRAM", "WRAM",
+ "(unknown type)"
+};
+
+static struct machfb_softc machfb_softc;
+static struct bus_space_tag machfb_bst_store[1];
+
+static device_probe_t machfb_pci_probe;
+static device_attach_t machfb_pci_attach;
+static device_detach_t machfb_pci_detach;
+
+static device_method_t machfb_methods[] = {
+ /* Device interface */
+ DEVMETHOD(device_probe, machfb_pci_probe),
+ DEVMETHOD(device_attach, machfb_pci_attach),
+ DEVMETHOD(device_detach, machfb_pci_detach),
+
+ { 0, 0 }
+};
+
+static driver_t machfb_pci_driver = {
+ MACHFB_DRIVER_NAME,
+ machfb_methods,
+ sizeof(struct machfb_softc),
+};
+
+static devclass_t machfb_devclass;
+
+DRIVER_MODULE(machfb, pci, machfb_pci_driver, machfb_devclass, 0, 0);
+MODULE_DEPEND(machfb, pci, 1, 1, 1);
+
+static void machfb_cursor_enable(struct machfb_softc *, int);
+static int machfb_cursor_install(struct machfb_softc *);
+static int machfb_get_memsize(struct machfb_softc *);
+static void machfb_reset_engine(struct machfb_softc *);
+static void machfb_init_engine(struct machfb_softc *);
+#if 0
+static void machfb_adjust_frame(struct machfb_softc *, int, int);
+#endif
+static void machfb_shutdown_final(void *);
+static void machfb_shutdown_reset(void *);
+
+static int machfb_configure(int);
+
+static vi_probe_t machfb_probe;
+static vi_init_t machfb_init;
+static vi_get_info_t machfb_get_info;
+static vi_query_mode_t machfb_query_mode;
+static vi_set_mode_t machfb_set_mode;
+static vi_save_font_t machfb_save_font;
+static vi_load_font_t machfb_load_font;
+static vi_show_font_t machfb_show_font;
+static vi_save_palette_t machfb_save_palette;
+static vi_load_palette_t machfb_load_palette;
+static vi_set_border_t machfb_set_border;
+static vi_save_state_t machfb_save_state;
+static vi_load_state_t machfb_load_state;
+static vi_set_win_org_t machfb_set_win_org;
+static vi_read_hw_cursor_t machfb_read_hw_cursor;
+static vi_set_hw_cursor_t machfb_set_hw_cursor;
+static vi_set_hw_cursor_shape_t machfb_set_hw_cursor_shape;
+static vi_blank_display_t machfb_blank_display;
+static vi_mmap_t machfb_mmap;
+static vi_ioctl_t machfb_ioctl;
+static vi_clear_t machfb_clear;
+static vi_fill_rect_t machfb_fill_rect;
+static vi_bitblt_t machfb_bitblt;
+static vi_diag_t machfb_diag;
+static vi_save_cursor_palette_t machfb_save_cursor_palette;
+static vi_load_cursor_palette_t machfb_load_cursor_palette;
+static vi_copy_t machfb_copy;
+static vi_putp_t machfb_putp;
+static vi_putc_t machfb_putc;
+static vi_puts_t machfb_puts;
+static vi_putm_t machfb_putm;
+
+static video_switch_t machfbvidsw = {
+ .probe = machfb_probe,
+ .init = machfb_init,
+ .get_info = machfb_get_info,
+ .query_mode = machfb_query_mode,
+ .set_mode = machfb_set_mode,
+ .save_font = machfb_save_font,
+ .load_font = machfb_load_font,
+ .show_font = machfb_show_font,
+ .save_palette = machfb_save_palette,
+ .load_palette = machfb_load_palette,
+ .set_border = machfb_set_border,
+ .save_state = machfb_save_state,
+ .load_state = machfb_load_state,
+ .set_win_org = machfb_set_win_org,
+ .read_hw_cursor = machfb_read_hw_cursor,
+ .set_hw_cursor = machfb_set_hw_cursor,
+ .set_hw_cursor_shape = machfb_set_hw_cursor_shape,
+ .blank_display = machfb_blank_display,
+ .mmap = machfb_mmap,
+ .ioctl = machfb_ioctl,
+ .clear = machfb_clear,
+ .fill_rect = machfb_fill_rect,
+ .bitblt = machfb_bitblt,
+ NULL,
+ NULL,
+ .diag = machfb_diag,
+ .save_cursor_palette = machfb_save_cursor_palette,
+ .load_cursor_palette = machfb_load_cursor_palette,
+ .copy = machfb_copy,
+ .putp = machfb_putp,
+ .putc = machfb_putc,
+ .puts = machfb_puts,
+ .putm = machfb_putm
+};
+
+VIDEO_DRIVER(machfb, machfbvidsw, machfb_configure);
+
+extern sc_rndr_sw_t txtrndrsw;
+RENDERER(machfb, 0, txtrndrsw, gfb_set);
+
+RENDERER_MODULE(machfb, gfb_set);
+
+/*
+ * Inline functions for getting access to register aperture.
+ */
+static inline uint32_t regr(struct machfb_softc *, uint32_t);
+static inline uint8_t regrb(struct machfb_softc *, uint32_t);
+static inline void regw(struct machfb_softc *, uint32_t, uint32_t);
+static inline void regwb(struct machfb_softc *, uint32_t, uint8_t);
+static inline void regwb_pll(struct machfb_softc *, uint32_t, uint8_t);
+
+static inline uint32_t
+regr(struct machfb_softc *sc, uint32_t index)
+{
+
+ return bus_space_read_4(sc->sc_regt, sc->sc_regh, index);
+}
+
+static inline uint8_t
+regrb(struct machfb_softc *sc, uint32_t index)
+{
+
+ return bus_space_read_1(sc->sc_regt, sc->sc_regh, index);
+}
+
+static inline void
+regw(struct machfb_softc *sc, uint32_t index, uint32_t data)
+{
+
+ bus_space_write_4(sc->sc_regt, sc->sc_regh, index, data);
+ bus_space_barrier(sc->sc_regt, sc->sc_regh, index, 4,
+ BUS_SPACE_BARRIER_WRITE);
+}
+
+static inline void
+regwb(struct machfb_softc *sc, uint32_t index, uint8_t data)
+{
+
+ bus_space_write_1(sc->sc_regt, sc->sc_regh, index, data);
+ bus_space_barrier(sc->sc_regt, sc->sc_regh, index, 1,
+ BUS_SPACE_BARRIER_WRITE);
+}
+
+static inline void
+regwb_pll(struct machfb_softc *sc, uint32_t index, uint8_t data)
+{
+
+ regwb(sc, CLOCK_CNTL + 1, (index << 2) | PLL_WR_EN);
+ regwb(sc, CLOCK_CNTL + 2, data);
+ regwb(sc, CLOCK_CNTL + 1, (index << 2) & ~PLL_WR_EN);
+}
+
+static inline void
+wait_for_fifo(struct machfb_softc *sc, uint8_t v)
+{
+
+ while ((regr(sc, FIFO_STAT) & 0xffff) > (0x8000 >> v))
+ ;
+}
+
+static inline void
+wait_for_idle(struct machfb_softc *sc)
+{
+
+ wait_for_fifo(sc, 16);
+ while ((regr(sc, GUI_STAT) & 1) != 0)
+ ;
+}
+
+/*
+ * Inline functions for setting the background and foreground colors.
+ */
+static inline void machfb_setbg(struct machfb_softc *sc, int bg);
+static inline void machfb_setfg(struct machfb_softc *sc, int fg);
+
+static inline void
+machfb_setbg(struct machfb_softc *sc, int bg)
+{
+
+ if (bg == sc->sc_bg_cache)
+ return;
+ sc->sc_bg_cache = bg;
+ wait_for_fifo(sc, 1);
+ regw(sc, DP_BKGD_CLR, bg + MACHFB_CMAP_OFF);
+}
+
+static inline void
+machfb_setfg(struct machfb_softc *sc, int fg)
+{
+
+ if (fg == sc->sc_fg_cache)
+ return;
+ sc->sc_fg_cache = fg;
+ wait_for_fifo(sc, 1);
+ regw(sc, DP_FRGD_CLR, fg + MACHFB_CMAP_OFF);
+}
+
+/*
+ * video driver interface
+ */
+static int
+machfb_configure(int flags)
+{
+ struct machfb_softc *sc;
+ phandle_t chosen, output;
+ ihandle_t stdout;
+ bus_addr_t addr;
+ uint32_t id;
+ int i, space;
+
+ /*
+ * For the high-level console probing return the number of
+ * registered adapters.
+ */
+ if (!(flags & VIO_PROBE_ONLY)) {
+ for (i = 0; vid_find_adapter(MACHFB_DRIVER_NAME, i) >= 0; i++)
+ ;
+ return (i);
+ }
+
+ /* Low-level console probing and initialization. */
+
+ sc = &machfb_softc;
+ if (sc->sc_va.va_flags & V_ADP_REGISTERED)
+ goto found;
+
+ if ((chosen = OF_finddevice("/chosen")) == -1) /* Quis contra nos? */
+ return (0);
+ if (OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)) == -1)
+ return (0);
+ if ((output = OF_instance_to_package(stdout)) == -1)
+ return (0);
+ if ((OF_getprop(output, "vendor-id", &id, sizeof(id)) == -1) ||
+ id != ATI_VENDOR)
+ return (0);
+ if (OF_getprop(output, "device-id", &id, sizeof(id)) == -1)
+ return (0);
+ for (i = 0; i < sizeof(machfb_info) / sizeof(machfb_info[0]); i++) {
+ if (id == machfb_info[i].chip_id) {
+ sc->sc_flags = MACHFB_CONSOLE;
+ sc->sc_node = output;
+ sc->sc_chip_id = id;
+ break;
+ }
+ }
+ if (!(sc->sc_flags & MACHFB_CONSOLE))
+ return (0);
+
+ if (OF_getprop(output, "revision-id", &sc->sc_chip_rev,
+ sizeof(sc->sc_chip_rev)) == -1)
+ return (0);
+ if (OF_decode_addr(output, 0, &space, &addr) != 0)
+ return (0);
+ sc->sc_memt = &machfb_bst_store[0];
+ sc->sc_memh = sparc64_fake_bustag(space, addr, sc->sc_memt);
+ sc->sc_regt = sc->sc_memt;
+ bus_space_subregion(sc->sc_regt, sc->sc_memh, MACH64_REG_OFF,
+ MACH64_REG_SIZE, &sc->sc_regh);
+
+ if (machfb_init(0, &sc->sc_va, 0) < 0)
+ return (0);
+
+ found:
+ /* Return number of found adapters. */
+ return (1);
+}
+
+static int
+machfb_probe(int unit, video_adapter_t **adpp, void *arg, int flags)
+{
+
+ return (0);
+}
+
+static int
+machfb_init(int unit, video_adapter_t *adp, int flags)
+{
+ struct machfb_softc *sc;
+ phandle_t options;
+ video_info_t *vi;
+ char buf[32];
+ int i;
+ uint8_t dac_mask, dac_rindex, dac_windex;
+
+ sc = (struct machfb_softc *)adp;
+ vi = &adp->va_info;
+
+ if ((regr(sc, CONFIG_CHIP_ID) & 0xffff) != sc->sc_chip_id)
+ return (ENXIO);
+
+ sc->sc_ramdac_freq = 0;
+ for (i = 0; i < sizeof(machfb_info) / sizeof(machfb_info[0]); i++) {
+ if (sc->sc_chip_id == machfb_info[i].chip_id) {
+ sc->sc_ramdac_freq = machfb_info[i].ramdac_freq;
+ break;
+ }
+ }
+ if (sc->sc_ramdac_freq == 0)
+ return (ENXIO);
+ if (sc->sc_chip_id == ATI_RAGE_II && sc->sc_chip_rev & 0x07)
+ sc->sc_ramdac_freq = 170000;
+
+ vid_init_struct(adp, MACHFB_DRIVER_NAME, -1, unit);
+
+ if (OF_getprop(sc->sc_node, "height", &sc->sc_height,
+ sizeof(sc->sc_height)) == -1)
+ return (ENXIO);
+ if (OF_getprop(sc->sc_node, "width", &sc->sc_width,
+ sizeof(sc->sc_width)) == -1)
+ return (ENXIO);
+ if (OF_getprop(sc->sc_node, "depth", &sc->sc_depth,
+ sizeof(sc->sc_depth)) == -1)
+ return (ENXIO);
+ if ((options = OF_finddevice("/options")) == -1)
+ return (ENXIO);
+ if (OF_getprop(options, "screen-#rows", buf, sizeof(buf)) == -1)
+ return (ENXIO);
+ vi->vi_height = strtol(buf, NULL, 10);
+ if (OF_getprop(options, "screen-#columns", buf, sizeof(buf)) == -1)
+ return (ENXIO);
+ vi->vi_width = strtol(buf, NULL, 10);
+ vi->vi_cwidth = 12;
+ vi->vi_cheight = 22;
+ vi->vi_flags = V_INFO_COLOR;
+ vi->vi_mem_model = V_INFO_MM_OTHER;
+
+ sc->sc_font = gallant12x22_data;
+ sc->sc_cbwidth = howmany(vi->vi_cwidth, 8); /* width in bytes */
+ sc->sc_xmargin = (sc->sc_width - (vi->vi_width * vi->vi_cwidth)) / 2;
+ sc->sc_ymargin = (sc->sc_height - (vi->vi_height * vi->vi_cheight)) / 2;
+
+ if (sc->sc_chip_id != ATI_MACH64_CT &&
+ !((sc->sc_chip_id == ATI_MACH64_VT ||
+ sc->sc_chip_id == ATI_RAGE_II) &&
+ (sc->sc_chip_rev & 0x07) == 0))
+ sc->sc_flags |= MACHFB_DSP;
+
+ sc->sc_memsize = machfb_get_memsize(sc);
+ if (sc->sc_memsize == 8192)
+ /* The last page is used as register aperture. */
+ sc->sc_memsize -= 4;
+ sc->sc_memtype = regr(sc, CONFIG_STAT0) & 0x07;
+
+ if ((sc->sc_chip_id >= ATI_RAGE_XC_PCI66 &&
+ sc->sc_chip_id <= ATI_RAGE_XL_PCI66) ||
+ (sc->sc_chip_id >= ATI_RAGE_XL_PCI &&
+ sc->sc_chip_id <= ATI_RAGE_XC_PCI))
+ sc->sc_ref_freq = 29498;
+ else
+ sc->sc_ref_freq = 14318;
+
+ regwb(sc, CLOCK_CNTL + 1, PLL_REF_DIV << 2);
+ sc->sc_ref_div = regrb(sc, CLOCK_CNTL + 2);
+ regwb(sc, CLOCK_CNTL + 1, MCLK_FB_DIV << 2);
+ sc->sc_mclk_fb_div = regrb(sc, CLOCK_CNTL + 2);
+ sc->sc_mem_freq = (2 * sc->sc_ref_freq * sc->sc_mclk_fb_div) /
+ (sc->sc_ref_div * 2);
+ sc->sc_mclk_post_div = (sc->sc_mclk_fb_div * 2 * sc->sc_ref_freq) /
+ (sc->sc_mem_freq * sc->sc_ref_div);
+
+ machfb_init_engine(sc);
+#if 0
+ mach64_adjust_frame(0, 0);
+#endif
+ machfb_set_mode(adp, 0);
+
+ /*
+ * Install our 16-color color map. This is done only once and with
+ * an offset of 16 on sparc64 as there the OBP driver expects white
+ * to be at index 0 and black at 255 (some versions also use 1 - 8
+ * for color text support or the full palette for the boot banner
+ * logo but no versions seems to use the ISO 6429-1983 color map).
+ * Otherwise the colors are inverted when back in the OFW.
+ */
+ dac_rindex = regrb(sc, DAC_RINDEX);
+ dac_windex = regrb(sc, DAC_WINDEX);
+ dac_mask = regrb(sc, DAC_MASK);
+ regwb(sc, DAC_MASK, 0xff);
+ regwb(sc, DAC_WINDEX, MACHFB_CMAP_OFF);
+ for (i = 0; i < 16; i++) {
+ regwb(sc, DAC_DATA, machfb_default_cmap[i].red);
+ regwb(sc, DAC_DATA, machfb_default_cmap[i].green);
+ regwb(sc, DAC_DATA, machfb_default_cmap[i].blue);
+ }
+ regwb(sc, DAC_MASK, dac_mask);
+ regwb(sc, DAC_RINDEX, dac_rindex);
+ regwb(sc, DAC_WINDEX, dac_windex);
+
+ machfb_blank_display(adp, V_DISPLAY_ON);
+ machfb_clear(adp);
+
+ /*
+ * Setting V_ADP_MODECHANGE serves as hack so machfb_set_mode()
+ * (which will invalidate our caches) is called as a precaution
+ * when the X server shuts down.
+ */
+ adp->va_flags |= V_ADP_COLOR | V_ADP_MODECHANGE | V_ADP_PALETTE |
+ V_ADP_BORDER | V_ADP_INITIALIZED;
+ if (vid_register(adp) < 0)
+ return (ENXIO);
+ adp->va_flags |= V_ADP_REGISTERED;
+
+ return (0);
+}
+
+static int
+machfb_get_info(video_adapter_t *adp, int mode, video_info_t *info)
+{
+
+ bcopy(&adp->va_info, info, sizeof(*info));
+
+ return (0);
+}
+
+static int
+machfb_query_mode(video_adapter_t *adp, video_info_t *info)
+{
+
+ return (ENODEV);
+}
+
+static int
+machfb_set_mode(video_adapter_t *adp, int mode)
+{
+ struct machfb_softc *sc;
+
+ sc = (struct machfb_softc *)adp;
+
+ sc->sc_bg_cache = -1;
+ sc->sc_fg_cache = -1;
+ sc->sc_draw_cache = -1;
+
+ return (0);
+}
+
+static int
+machfb_save_font(video_adapter_t *adp, int page, int size, int width,
+ u_char *data, int c, int count)
+{
+
+ return (ENODEV);
+}
+
+static int
+machfb_load_font(video_adapter_t *adp, int page, int size, int width,
+ u_char *data, int c, int count)
+{
+
+ return (ENODEV);
+}
+
+static int
+machfb_show_font(video_adapter_t *adp, int page)
+{
+
+ return (ENODEV);
+}
+
+static int
+machfb_save_palette(video_adapter_t *adp, u_char *palette)
+{
+ struct machfb_softc *sc;
+ int i;
+ uint8_t dac_mask, dac_rindex, dac_windex;
+
+ sc = (struct machfb_softc *)adp;
+
+ dac_rindex = regrb(sc, DAC_RINDEX);
+ dac_windex = regrb(sc, DAC_WINDEX);
+ dac_mask = regrb(sc, DAC_MASK);
+ regwb(sc, DAC_MASK, 0xff);
+ regwb(sc, DAC_RINDEX, 0x0);
+ for (i = 0; i < 256 * 3; i++)
+ palette[i] = regrb(sc, DAC_DATA);
+ regwb(sc, DAC_MASK, dac_mask);
+ regwb(sc, DAC_RINDEX, dac_rindex);
+ regwb(sc, DAC_WINDEX, dac_windex);
+
+ return (0);
+}
+
+static int
+machfb_load_palette(video_adapter_t *adp, u_char *palette)
+{
+ struct machfb_softc *sc;
+ int i;
+ uint8_t dac_mask, dac_rindex, dac_windex;
+
+ sc = (struct machfb_softc *)adp;
+
+ dac_rindex = regrb(sc, DAC_RINDEX);
+ dac_windex = regrb(sc, DAC_WINDEX);
+ dac_mask = regrb(sc, DAC_MASK);
+ regwb(sc, DAC_MASK, 0xff);
+ regwb(sc, DAC_WINDEX, 0x0);
+ for (i = 0; i < 256 * 3; i++)
+ regwb(sc, DAC_DATA, palette[i]);
+ regwb(sc, DAC_MASK, dac_mask);
+ regwb(sc, DAC_RINDEX, dac_rindex);
+ regwb(sc, DAC_WINDEX, dac_windex);
+
+ return (0);
+}
+
+static int
+machfb_set_border(video_adapter_t *adp, int border)
+{
+ struct machfb_softc *sc;
+
+ sc = (struct machfb_softc *)adp;
+
+ machfb_fill_rect(adp, border, 0, 0, sc->sc_width, sc->sc_ymargin);
+ machfb_fill_rect(adp, border, 0, sc->sc_height - sc->sc_ymargin,
+ sc->sc_width, sc->sc_ymargin);
+ machfb_fill_rect(adp, border, 0, 0, sc->sc_xmargin, sc->sc_height);
+ machfb_fill_rect(adp, border, sc->sc_width - sc->sc_xmargin, 0,
+ sc->sc_xmargin, sc->sc_height);
+
+ return (0);
+}
+
+static int
+machfb_save_state(video_adapter_t *adp, void *p, size_t size)
+{
+
+ return (ENODEV);
+}
+
+static int
+machfb_load_state(video_adapter_t *adp, void *p)
+{
+
+ return (ENODEV);
+}
+
+static int
+machfb_set_win_org(video_adapter_t *adp, off_t offset)
+{
+
+ return (ENODEV);
+}
+
+static int
+machfb_read_hw_cursor(video_adapter_t *adp, int *col, int *row)
+{
+
+ *col = 0;
+ *row = 0;
+
+ return (0);
+}
+
+static int
+machfb_set_hw_cursor(video_adapter_t *adp, int col, int row)
+{
+
+ return (ENODEV);
+}
+
+static int
+machfb_set_hw_cursor_shape(video_adapter_t *adp, int base, int height,
+ int celsize, int blink)
+{
+
+ return (ENODEV);
+}
+
+static int
+machfb_blank_display(video_adapter_t *adp, int mode)
+{
+ struct machfb_softc *sc;
+ uint32_t crtc_gen_cntl;
+
+ sc = (struct machfb_softc *)adp;
+
+ crtc_gen_cntl = (regr(sc, CRTC_GEN_CNTL) | CRTC_EXT_DISP_EN | CRTC_EN) &
+ ~(CRTC_HSYNC_DIS | CRTC_VSYNC_DIS | CRTC_DISPLAY_DIS);
+ switch (mode) {
+ case V_DISPLAY_ON:
+ break;
+ case V_DISPLAY_BLANK:
+ crtc_gen_cntl |= CRTC_HSYNC_DIS | CRTC_VSYNC_DIS |
+ CRTC_DISPLAY_DIS;
+ break;
+ case V_DISPLAY_STAND_BY:
+ crtc_gen_cntl |= CRTC_HSYNC_DIS | CRTC_DISPLAY_DIS;
+ break;
+ case V_DISPLAY_SUSPEND:
+ crtc_gen_cntl |= CRTC_VSYNC_DIS | CRTC_DISPLAY_DIS;
+ break;
+ }
+ regw(sc, CRTC_GEN_CNTL, crtc_gen_cntl);
+
+ return (0);
+}
+
+static int
+machfb_mmap(video_adapter_t *adp, vm_offset_t offset, vm_paddr_t *paddr,
+ int prot)
+{
+ struct machfb_softc *sc;
+
+ sc = (struct machfb_softc *)adp;
+
+ if (adp->va_io_base != 0 && offset >= adp->va_io_base &&
+ offset < adp->va_io_base + adp->va_io_size) {
+ *paddr = sc->sc_vioh + offset - adp->va_io_size;
+ return (0);
+ }
+
+ if (adp->va_mem_base != 0 && offset >= adp->va_mem_base &&
+ offset < adp->va_mem_base + adp->va_mem_size) {
+ *paddr = sc->sc_vmemh + offset - adp->va_mem_base;
+ return (0);
+ }
+
+ if (offset >= adp->va_registers &&
+ offset < adp->va_registers + adp->va_registers_size) {
+ *paddr = sc->sc_memh + offset - adp->va_registers;
+ return (0);
+ }
+
+ /* 'regular' framebuffer mmap()ing */
+ if (offset < adp->va_window_size) {
+ *paddr = adp->va_window + offset;
+ return (0);
+ }
+
+ return (EINVAL);
+}
+
+static int
+machfb_ioctl(video_adapter_t *adp, u_long cmd, caddr_t data)
+{
+ struct machfb_softc *sc;
+ struct fbcursor *fbc;
+ struct fbtype *fb;
+
+ sc = (struct machfb_softc *)adp;
+
+ switch (cmd) {
+ case FBIOGTYPE:
+ fb = (struct fbtype *)data;
+ fb->fb_type = FBTYPE_PCIMISC;
+ fb->fb_height = sc->sc_height;
+ fb->fb_width = sc->sc_width;
+ fb->fb_depth = sc->sc_depth;
+ if (sc->sc_depth <= 1 || sc->sc_depth > 8)
+ fb->fb_cmsize = 0;
+ else
+ fb->fb_cmsize = 1 << sc->sc_depth;
+ fb->fb_size = adp->va_buffer_size;
+ break;
+ case FBIOSCURSOR:
+ fbc = (struct fbcursor *)data;
+ if (fbc->set & FB_CUR_SETCUR && fbc->enable == 0) {
+ machfb_cursor_enable(sc, 0);
+ sc->sc_flags &= ~MACHFB_CUREN;
+ } else
+ return (ENODEV);
+ break;
+ default:
+ return (fb_commonioctl(adp, cmd, data));
+ }
+
+ return (0);
+}
+
+static int
+machfb_clear(video_adapter_t *adp)
+{
+ struct machfb_softc *sc;
+
+ sc = (struct machfb_softc *)adp;
+
+ machfb_fill_rect(adp, (SC_NORM_ATTR >> 4) & 0xf, 0, 0, sc->sc_width,
+ sc->sc_height);
+
+ return (0);
+}
+
+static int
+machfb_fill_rect(video_adapter_t *adp, int val, int x, int y, int cx, int cy)
+{
+ struct machfb_softc *sc;
+
+ sc = (struct machfb_softc *)adp;
+
+ if (sc->sc_draw_cache != MACHFB_DRAW_FILLRECT) {
+ wait_for_fifo(sc, 7);
+ regw(sc, DP_WRITE_MASK, 0xff);
+ regw(sc, DP_PIX_WIDTH, DST_8BPP | SRC_8BPP | HOST_8BPP);
+ regw(sc, DP_SRC, FRGD_SRC_FRGD_CLR);
+ regw(sc, DP_MIX, MIX_SRC << 16);
+ regw(sc, CLR_CMP_CNTL, 0); /* no transparency */
+ regw(sc, SRC_CNTL, SRC_LINE_X_LEFT_TO_RIGHT);
+ regw(sc, DST_CNTL, DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM);
+ sc->sc_draw_cache = MACHFB_DRAW_FILLRECT;
+ }
+ machfb_setfg(sc, val);
+ wait_for_fifo(sc, 4);
+ regw(sc, SRC_Y_X, (x << 16) | y);
+ regw(sc, SRC_WIDTH1, cx);
+ regw(sc, DST_Y_X, (x << 16) | y);
+ regw(sc, DST_HEIGHT_WIDTH, (cx << 16) | cy);
+
+ return (0);
+}
+
+static int
+machfb_bitblt(video_adapter_t *adp, ...)
+{
+
+ return (ENODEV);
+}
+
+static int
+machfb_diag(video_adapter_t *adp, int level)
+{
+ video_info_t info;
+
+ fb_dump_adp_info(adp->va_name, adp, level);
+ machfb_get_info(adp, 0, &info);
+ fb_dump_mode_info(adp->va_name, adp, &info, level);
+
+ return (0);
+}
+
+static int
+machfb_save_cursor_palette(video_adapter_t *adp, u_char *palette)
+{
+
+ return (ENODEV);
+}
+
+static int
+machfb_load_cursor_palette(video_adapter_t *adp, u_char *palette)
+{
+
+ return (ENODEV);
+}
+
+static int
+machfb_copy(video_adapter_t *adp, vm_offset_t src, vm_offset_t dst, int n)
+{
+
+ return (ENODEV);
+}
+
+static int
+machfb_putp(video_adapter_t *adp, vm_offset_t off, uint32_t p, uint32_t a,
+ int size, int bpp, int bit_ltor, int byte_ltor)
+{
+
+ return (ENODEV);
+}
+
+static int
+machfb_putc(video_adapter_t *adp, vm_offset_t off, uint8_t c, uint8_t a)
+{
+ struct machfb_softc *sc;
+ uint8_t *p;
+ int i;
+
+ sc = (struct machfb_softc *)adp;
+
+ if (sc->sc_draw_cache != MACHFB_DRAW_CHAR) {
+ wait_for_fifo(sc, 8);
+ regw(sc, DP_WRITE_MASK, 0xff); /* XXX only good for 8 bit */
+ regw(sc, DP_PIX_WIDTH, DST_8BPP | SRC_1BPP | HOST_1BPP);
+ regw(sc, DP_SRC, MONO_SRC_HOST | BKGD_SRC_BKGD_CLR |
+ FRGD_SRC_FRGD_CLR);
+ regw(sc, DP_MIX ,((MIX_SRC & 0xffff) << 16) | MIX_SRC);
+ regw(sc, CLR_CMP_CNTL, 0); /* no transparency */
+ regw(sc, SRC_CNTL, SRC_LINE_X_LEFT_TO_RIGHT);
+ regw(sc, DST_CNTL, DST_Y_TOP_TO_BOTTOM | DST_X_LEFT_TO_RIGHT);
+ regw(sc, HOST_CNTL, HOST_BYTE_ALIGN);
+ sc->sc_draw_cache = MACHFB_DRAW_CHAR;
+ }
+ machfb_setbg(sc, (a >> 4) & 0xf);
+ machfb_setfg(sc, a & 0xf);
+ wait_for_fifo(sc, 4 + (adp->va_info.vi_cheight / sc->sc_cbwidth));
+ regw(sc, SRC_Y_X, 0);
+ regw(sc, SRC_WIDTH1, adp->va_info.vi_cwidth);
+ regw(sc, DST_Y_X, ((((off % adp->va_info.vi_width) *
+ adp->va_info.vi_cwidth) + sc->sc_xmargin) << 16) |
+ (((off / adp->va_info.vi_width) * adp->va_info.vi_cheight) +
+ sc->sc_ymargin));
+ regw(sc, DST_HEIGHT_WIDTH, (adp->va_info.vi_cwidth << 16) |
+ adp->va_info.vi_cheight);
+ p = sc->sc_font + (c * adp->va_info.vi_cheight * sc->sc_cbwidth);
+ for (i = 0; i < adp->va_info.vi_cheight * sc->sc_cbwidth; i += 4)
+ regw(sc, HOST_DATA0 + i, (p[i + 3] << 24 | p[i + 2] << 16 |
+ p[i + 1] << 8 | p[i]));
+
+ return (0);
+}
+
+static int
+machfb_puts(video_adapter_t *adp, vm_offset_t off, uint16_t *s, int len)
+{
+ struct machfb_softc *sc;
+ int blanks, i, x1, x2, y1, y2;
+ uint8_t a, c, color1, color2;
+
+ sc = (struct machfb_softc *)adp;
+
+#define MACHFB_BLANK machfb_fill_rect(adp, color1, x1, y1, \
+ blanks * adp->va_info.vi_cwidth, \
+ adp->va_info.vi_cheight)
+
+ blanks = color1 = x1 = y1 = 0;
+ for (i = 0; i < len; i++) {
+ /*
+ * Accelerate continuous blanks by drawing a respective
+ * rectangle instead. Drawing a rectangle of any size
+ * takes about the same number of operations as drawing
+ * a single character.
+ */
+ c = s[i] & 0xff;
+ a = (s[i] & 0xff00) >> 8;
+ if (c == 0x00 || c == 0x20 || c == 0xdb || c == 0xff) {
+ color2 = (a >> (c == 0xdb ? 0 : 4) & 0xf);
+ x2 = (((off + i) % adp->va_info.vi_width) *
+ adp->va_info.vi_cwidth) + sc->sc_xmargin;
+ y2 = (((off + i) / adp->va_info.vi_width) *
+ adp->va_info.vi_cheight) + sc->sc_ymargin;
+ if (blanks == 0) {
+ color1 = color2;
+ x1 = x2;
+ y1 = y2;
+ blanks++;
+ } else if (color1 != color2 || y1 != y2) {
+ MACHFB_BLANK;
+ color1 = color2;
+ x1 = x2;
+ y1 = y2;
+ blanks = 1;
+ } else
+ blanks++;
+ } else {
+ if (blanks != 0) {
+ MACHFB_BLANK;
+ blanks = 0;
+ }
+ (*vidsw[adp->va_index]->putc)(adp, off + i, c, a);
+ }
+ }
+ if (blanks != 0)
+ MACHFB_BLANK;
+
+#undef MACHFB_BLANK
+
+ return (0);
+}
+
+static int
+machfb_putm(video_adapter_t *adp, int x, int y, uint8_t *pixel_image,
+ uint32_t pixel_mask, int size, int width)
+{
+ struct machfb_softc *sc;
+ int error;
+
+ sc = (struct machfb_softc *)adp;
+
+ if ((!(sc->sc_flags & MACHFB_CUREN)) &&
+ (error = machfb_cursor_install(sc)) < 0)
+ return (error);
+ else {
+ /*
+ * The hardware cursor always must be disabled when
+ * fiddling with its bits otherwise some artifacts
+ * may appear on the screen.
+ */
+ machfb_cursor_enable(sc, 0);
+ }
+
+ regw(sc, CUR_HORZ_VERT_OFF, 0);
+ if ((regr(sc, GEN_TEST_CNTL) & CRTC_DBL_SCAN_EN) != 0)
+ y <<= 1;
+ regw(sc, CUR_HORZ_VERT_POSN, ((y + sc->sc_ymargin) << 16) |
+ (x + sc->sc_xmargin));
+ machfb_cursor_enable(sc, 1);
+ sc->sc_flags |= MACHFB_CUREN;
+
+ return (0);
+}
+
+/*
+ * PCI bus interface
+ */
+static int
+machfb_pci_probe(device_t dev)
+{
+ int i;
+
+ if (pci_get_class(dev) != PCIC_DISPLAY ||
+ pci_get_subclass(dev) != PCIS_DISPLAY_VGA)
+ return (ENXIO);
+
+ for (i = 0; i < sizeof(machfb_info) / sizeof(machfb_info[0]); i++) {
+ if (pci_get_device(dev) == machfb_info[i].chip_id) {
+ device_set_desc(dev, machfb_info[i].name);
+ return (BUS_PROBE_DEFAULT);
+ }
+ }
+
+ return (ENXIO);
+}
+
+static int
+machfb_pci_attach(device_t dev)
+{
+ struct machfb_softc *sc;
+ video_adapter_t *adp;
+ video_switch_t *sw;
+ phandle_t node;
+ uint32_t *p32, saved_value;
+ uint8_t *p;
+ int error, i;
+
+ node = ofw_bus_get_node(dev);
+ if ((sc = (struct machfb_softc *)vid_get_adapter(vid_find_adapter(
+ MACHFB_DRIVER_NAME, 0))) != NULL && sc->sc_node == node) {
+ device_printf(dev, "console\n");
+ device_set_softc(dev, sc);
+ } else {
+ sc = device_get_softc(dev);
+ bzero(sc, sizeof(struct machfb_softc));
+
+ sc->sc_node = node;
+ sc->sc_chip_id = pci_get_device(dev);
+ sc->sc_chip_rev = pci_get_revid(dev);
+ }
+ adp = &sc->sc_va;
+
+ /*
+ * Regardless whether we are the console and already allocated
+ * resources in machfb_configure() or not we have to allocate
+ * them here (again) in order for rman_get_virtual() to work.
+ */
+
+ /* Enable memory and IO access. */
+ pci_write_config(dev, PCIR_COMMAND,
+ pci_read_config(dev, PCIR_COMMAND, 2) | PCIM_CMD_PORTEN |
+ PCIM_CMD_MEMEN, 2);
+
+ sc->sc_memrid = PCIR_BAR(0);
+ if ((sc->sc_memres = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
+ &sc->sc_memrid, RF_ACTIVE)) == NULL) {
+ device_printf(dev, "cannot allocate memory resources\n");
+ return (ENXIO);
+ }
+ sc->sc_memt = rman_get_bustag(sc->sc_memres);
+ sc->sc_memh = rman_get_bushandle(sc->sc_memres);
+ adp->va_registers = rman_get_start(sc->sc_memres);
+ adp->va_registers_size = rman_get_size(sc->sc_memres);
+ sc->sc_regt = sc->sc_memt;
+ bus_space_subregion(sc->sc_regt, sc->sc_memh, MACH64_REG_OFF,
+ MACH64_REG_SIZE, &sc->sc_regh);
+ adp->va_buffer = (vm_offset_t)rman_get_virtual(sc->sc_memres);
+ adp->va_buffer_size = rman_get_size(sc->sc_memres);
+
+ /*
+ * Depending on the firmware version the VGA I/O and/or memory
+ * resources of the Mach64 chips come up disabled. We generally
+ * enable them above (pci(4) actually already did this unless
+ * pci_enable_io_modes is not set) but this doesn't necessarily
+ * mean that we get valid ones. Invalid resources seem to have
+ * in common that they start at address 0. We don't allocate
+ * them in this case in order to avoid warnings in apb(4) and
+ * crashes when using these invalid resources. Xorg is aware
+ * of this and doesn't use the VGA resources in this case (but
+ * demands them if they are valid).
+ */
+ sc->sc_viorid = PCIR_BAR(1);
+ if (bus_get_resource_start(dev, SYS_RES_IOPORT, sc->sc_viorid) != 0) {
+ if ((sc->sc_viores = bus_alloc_resource_any(dev,
+ SYS_RES_IOPORT, &sc->sc_viorid, RF_ACTIVE)) == NULL) {
+ device_printf(dev,
+ "cannot allocate VGA I/O resources\n");
+ error = ENXIO;
+ goto fail_memres;
+ }
+ sc->sc_viot = rman_get_bustag(sc->sc_viores);
+ sc->sc_vioh = rman_get_bushandle(sc->sc_viores);
+ adp->va_io_base = rman_get_start(sc->sc_viores);
+ adp->va_io_size = rman_get_size(sc->sc_viores);
+ }
+
+ sc->sc_vmemrid = PCIR_BAR(2);
+ if (bus_get_resource_start(dev, SYS_RES_MEMORY, sc->sc_vmemrid) != 0) {
+ if ((sc->sc_vmemres = bus_alloc_resource_any(dev,
+ SYS_RES_MEMORY, &sc->sc_vmemrid, RF_ACTIVE)) == NULL) {
+ device_printf(dev,
+ "cannot allocate VGA memory resources\n");
+ error = ENXIO;
+ goto fail_viores;
+ }
+ sc->sc_vmemt = rman_get_bustag(sc->sc_vmemres);
+ sc->sc_vmemh = rman_get_bushandle(sc->sc_vmemres);
+ adp->va_mem_base = rman_get_start(sc->sc_vmemres);
+ adp->va_mem_size = rman_get_size(sc->sc_vmemres);
+ }
+
+ device_printf(dev,
+ "%d MB aperture at 0x%08x, %d KB registers at 0x%08x\n",
+ (u_int)(adp->va_buffer_size / (1024 * 1024)),
+ (u_int)adp->va_buffer, MACH64_REG_SIZE / 1024,
+ (u_int)sc->sc_regh);
+
+ if (!(sc->sc_flags & MACHFB_CONSOLE)) {
+ if ((sw = vid_get_switch(MACHFB_DRIVER_NAME)) == NULL) {
+ device_printf(dev, "cannot get video switch\n");
+ error = ENODEV;
+ goto fail_vmemres;
+ }
+ /*
+ * During device configuration we don't necessarily probe
+ * the adapter which is the console first so we can't use
+ * the device unit number for the video adapter unit. The
+ * worst case would be that we use the video adapter unit
+ * 0 twice. As it doesn't really matter which unit number
+ * the corresponding video adapter has just use the next
+ * unused one.
+ */
+ for (i = 0; i < devclass_get_maxunit(machfb_devclass); i++)
+ if (vid_find_adapter(MACHFB_DRIVER_NAME, i) < 0)
+ break;
+ if ((error = sw->init(i, adp, 0)) != 0) {
+ device_printf(dev, "cannot initialize adapter\n");
+ goto fail_vmemres;
+ }
+ }
+
+ device_printf(dev,
+ "%ld KB %s %d.%d MHz, maximum RAMDAC clock %d MHz, %sDSP\n",
+ (u_long)sc->sc_memsize, machfb_memtype_names[sc->sc_memtype],
+ sc->sc_mem_freq / 1000, sc->sc_mem_freq % 1000,
+ sc->sc_ramdac_freq / 1000,
+ (sc->sc_flags & MACHFB_DSP) ? "" : "no ");
+ device_printf(dev, "resolution %dx%d at %d bpp\n",
+ sc->sc_width, sc->sc_height, sc->sc_depth);
+
+ /*
+ * Test whether the aperture is byte swapped or not, set
+ * va_window and va_window_size as appropriate.
+ */
+ p32 = (uint32_t *)adp->va_buffer;
+ saved_value = *p32;
+ p = (uint8_t *)adp->va_buffer;
+ *p32 = 0x12345678;
+ if (!(p[0] == 0x12 && p[1] == 0x34 && p[2] == 0x56 && p[3] == 0x78)) {
+ adp->va_window = adp->va_buffer + 0x800000;
+ adp->va_window_size = adp->va_buffer_size - 0x800000;
+ } else {
+ adp->va_window = adp->va_buffer;
+ adp->va_window_size = adp->va_buffer_size;
+ }
+ *p32 = saved_value;
+ adp->va_window_gran = adp->va_window_size;
+
+ /*
+ * Allocate one page for the mouse pointer image at the end of
+ * the little endian aperture, right before the memory mapped
+ * registers that might also reside there. Must be done after
+ * sc_memsize was set and possibly adjusted to account for the
+ * memory mapped registers.
+ */
+ sc->sc_curoff = (sc->sc_memsize * 1024) - PAGE_SIZE;
+ sc->sc_memsize -= PAGE_SIZE / 1024;
+ machfb_cursor_enable(sc, 0);
+ /* Initialize with an all transparent image. */
+ memset((void *)(adp->va_buffer + sc->sc_curoff), 0xaa, PAGE_SIZE);
+
+ /*
+ * Register a handler that performs some cosmetic surgery like
+ * turning off the mouse pointer on halt in preparation for
+ * handing the screen over to the OFW. Register another handler
+ * that turns off the CRTC when resetting, otherwise the OFW
+ * boot command issued by cpu_reset() just doesn't work.
+ */
+ EVENTHANDLER_REGISTER(shutdown_final, machfb_shutdown_final, sc,
+ SHUTDOWN_PRI_DEFAULT);
+ EVENTHANDLER_REGISTER(shutdown_reset, machfb_shutdown_reset, sc,
+ SHUTDOWN_PRI_DEFAULT);
+
+ return (0);
+
+ fail_vmemres:
+ if (sc->sc_vmemres != NULL)
+ bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_vmemrid,
+ sc->sc_vmemres);
+ fail_viores:
+ if (sc->sc_viores != NULL)
+ bus_release_resource(dev, SYS_RES_IOPORT, sc->sc_viorid,
+ sc->sc_viores);
+ fail_memres:
+ bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_memrid, sc->sc_memres);
+
+ return (error);
+}
+
+static int
+machfb_pci_detach(device_t dev)
+{
+
+ return (EINVAL);
+}
+
+/*
+ * internal functions
+ */
+static void
+machfb_cursor_enable(struct machfb_softc *sc, int onoff)
+{
+
+ if (onoff)
+ regw(sc, GEN_TEST_CNTL,
+ regr(sc, GEN_TEST_CNTL) | HWCURSOR_ENABLE);
+ else
+ regw(sc, GEN_TEST_CNTL,
+ regr(sc, GEN_TEST_CNTL) &~ HWCURSOR_ENABLE);
+}
+
+static int
+machfb_cursor_install(struct machfb_softc *sc)
+{
+ uint16_t *p;
+ uint8_t fg;
+ int i, j;
+
+ if (sc->sc_curoff == 0)
+ return (ENODEV);
+
+ machfb_cursor_enable(sc, 0);
+ regw(sc, CUR_OFFSET, sc->sc_curoff >> 3);
+ fg = SC_NORM_ATTR & 0xf;
+ regw(sc, CUR_CLR0, machfb_default_cmap[fg].red << 24 |
+ machfb_default_cmap[fg].green << 16 |
+ machfb_default_cmap[fg].blue << 8);
+ p = (uint16_t *)(sc->sc_va.va_buffer + sc->sc_curoff);
+ for (i = 0; i < 64; i++)
+ for (j = 0; j < 8; j++)
+ *(p++) = machfb_mouse_pointer_lut[
+ machfb_mouse_pointer_bits[i][j] >> 4] |
+ machfb_mouse_pointer_lut[
+ machfb_mouse_pointer_bits[i][j] & 0x0f] << 8;
+
+ return (0);
+}
+
+static int
+machfb_get_memsize(struct machfb_softc *sc)
+{
+ int tmp, memsize;
+ int mem_tab[] = {
+ 512, 1024, 2048, 4096, 6144, 8192, 12288, 16384
+ };
+
+ tmp = regr(sc, MEM_CNTL);
+#ifdef MACHFB_DEBUG
+ printf("memcntl=0x%08x\n", tmp);
+#endif
+ if (sc->sc_flags & MACHFB_DSP) {
+ tmp &= 0x0000000f;
+ if (tmp < 8)
+ memsize = (tmp + 1) * 512;
+ else if (tmp < 12)
+ memsize = (tmp - 3) * 1024;
+ else
+ memsize = (tmp - 7) * 2048;
+ } else
+ memsize = mem_tab[tmp & 0x07];
+
+ return (memsize);
+}
+
+static void
+machfb_reset_engine(struct machfb_softc *sc)
+{
+
+ /* Reset engine.*/
+ regw(sc, GEN_TEST_CNTL, regr(sc, GEN_TEST_CNTL) & ~GUI_ENGINE_ENABLE);
+
+ /* Enable engine. */
+ regw(sc, GEN_TEST_CNTL, regr(sc, GEN_TEST_CNTL) | GUI_ENGINE_ENABLE);
+
+ /*
+ * Ensure engine is not locked up by clearing any FIFO or
+ * host errors.
+ */
+ regw(sc, BUS_CNTL, regr(sc, BUS_CNTL) | BUS_HOST_ERR_ACK |
+ BUS_FIFO_ERR_ACK);
+}
+
+static void
+machfb_init_engine(struct machfb_softc *sc)
+{
+ uint32_t pitch_value;
+
+ pitch_value = sc->sc_width;
+
+ if (sc->sc_depth == 24)
+ pitch_value *= 3;
+
+ machfb_reset_engine(sc);
+
+ wait_for_fifo(sc, 14);
+
+ regw(sc, CONTEXT_MASK, 0xffffffff);
+
+ regw(sc, DST_OFF_PITCH, (pitch_value / 8) << 22);
+
+ regw(sc, DST_Y_X, 0);
+ regw(sc, DST_HEIGHT, 0);
+ regw(sc, DST_BRES_ERR, 0);
+ regw(sc, DST_BRES_INC, 0);
+ regw(sc, DST_BRES_DEC, 0);
+
+ regw(sc, DST_CNTL, DST_LAST_PEL | DST_X_LEFT_TO_RIGHT |
+ DST_Y_TOP_TO_BOTTOM);
+
+ regw(sc, SRC_OFF_PITCH, (pitch_value / 8) << 22);
+
+ regw(sc, SRC_Y_X, 0);
+ regw(sc, SRC_HEIGHT1_WIDTH1, 1);
+ regw(sc, SRC_Y_X_START, 0);
+ regw(sc, SRC_HEIGHT2_WIDTH2, 1);
+
+ regw(sc, SRC_CNTL, SRC_LINE_X_LEFT_TO_RIGHT);
+
+ wait_for_fifo(sc, 13);
+ regw(sc, HOST_CNTL, 0);
+
+ regw(sc, PAT_REG0, 0);
+ regw(sc, PAT_REG1, 0);
+ regw(sc, PAT_CNTL, 0);
+
+ regw(sc, SC_LEFT, 0);
+ regw(sc, SC_TOP, 0);
+ regw(sc, SC_BOTTOM, sc->sc_height - 1);
+ regw(sc, SC_RIGHT, pitch_value - 1);
+
+ regw(sc, DP_BKGD_CLR, 0);
+ regw(sc, DP_FRGD_CLR, 0xffffffff);
+ regw(sc, DP_WRITE_MASK, 0xffffffff);
+ regw(sc, DP_MIX, (MIX_SRC << 16) | MIX_DST);
+
+ regw(sc, DP_SRC, FRGD_SRC_FRGD_CLR);
+
+ wait_for_fifo(sc, 3);
+ regw(sc, CLR_CMP_CLR, 0);
+ regw(sc, CLR_CMP_MASK, 0xffffffff);
+ regw(sc, CLR_CMP_CNTL, 0);
+
+ wait_for_fifo(sc, 2);
+ switch (sc->sc_depth) {
+ case 8:
+ regw(sc, DP_PIX_WIDTH, HOST_8BPP | SRC_8BPP | DST_8BPP);
+ regw(sc, DP_CHAIN_MASK, DP_CHAIN_8BPP);
+ regw(sc, DAC_CNTL, regr(sc, DAC_CNTL) | DAC_8BIT_EN);
+ break;
+#if 0
+ case 32:
+ regw(sc, DP_PIX_WIDTH, HOST_32BPP | SRC_32BPP | DST_32BPP);
+ regw(sc, DP_CHAIN_MASK, DP_CHAIN_32BPP);
+ regw(sc, DAC_CNTL, regr(sc, DAC_CNTL) | DAC_8BIT_EN);
+ break;
+#endif
+ }
+
+ wait_for_fifo(sc, 2);
+ regw(sc, CRTC_INT_CNTL, regr(sc, CRTC_INT_CNTL) & ~0x20);
+ regw(sc, GUI_TRAJ_CNTL, DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM);
+
+ wait_for_idle(sc);
+}
+
+#if 0
+static void
+machfb_adjust_frame(struct machfb_softc *sc, int x, int y)
+{
+ int offset;
+
+ offset = ((x + y * sc->sc_width) * (sc->sc_depth >> 3)) >> 3;
+
+ regw(sc, CRTC_OFF_PITCH, (regr(sc, CRTC_OFF_PITCH) & 0xfff00000) |
+ offset);
+}
+#endif
+
+static void
+machfb_shutdown_final(void *v)
+{
+ struct machfb_softc *sc = v;
+
+ machfb_cursor_enable(sc, 0);
+ /*
+ * In case this is the console set the cursor of the stdout
+ * instance to the start of the last line so OFW output ends
+ * up beneath what FreeBSD left on the screen.
+ */
+ if (sc->sc_flags & MACHFB_CONSOLE) {
+ OF_interpret("stdout @ is my-self 0 to column#", 0);
+ OF_interpret("stdout @ is my-self #lines 1 - to line#", 0);
+ }
+}
+
+static void
+machfb_shutdown_reset(void *v)
+{
+ struct machfb_softc *sc = v;
+
+ machfb_blank_display(&sc->sc_va, V_DISPLAY_STAND_BY);
+}
diff --git a/sys/dev/fb/machfbreg.h b/sys/dev/fb/machfbreg.h
new file mode 100644
index 000000000000..8990a4e3993a
--- /dev/null
+++ b/sys/dev/fb/machfbreg.h
@@ -0,0 +1,458 @@
+/*-
+ * Copyright 1992,1993,1994,1995,1996,1997 by Kevin E. Martin, Chapel Hill, North Carolina.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation, and that the name of Kevin E. Martin not be
+ * used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. Kevin E. Martin
+ * makes no representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ * KEVIN E. MARTIN, RICKARD E. FAITH, AND TIAGO GONS DISCLAIM ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE
+ * AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ *
+ * Modified for the Mach-8 by Rickard E. Faith (faith@cs.unc.edu)
+ * Modified for the Mach32 by Kevin E. Martin (martin@cs.unc.edu)
+ * Modified for the Mach64 by Kevin E. Martin (martin@cs.unc.edu)
+ *
+ * from: NetBSD: machfbreg.h,v 1.1 2002/10/24 18:15:57 junyoung Exp
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _DEV_FB_MACHFB_H_
+#define _DEV_FB_MACHFB_H_
+
+/* NON-GUI MEMORY MAPPED Registers - expressed in BYTE offsets */
+
+#define CRTC_H_TOTAL_DISP 0x0000 /* Dword offset 00 */
+#define CRTC_H_SYNC_STRT_WID 0x0004 /* Dword offset 01 */
+#define CRTC_V_TOTAL_DISP 0x0008 /* Dword offset 02 */
+#define CRTC_V_SYNC_STRT_WID 0x000C /* Dword offset 03 */
+#define CRTC_VLINE_CRNT_VLINE 0x0010 /* Dword offset 04 */
+#define CRTC_OFF_PITCH 0x0014 /* Dword offset 05 */
+#define CRTC_INT_CNTL 0x0018 /* Dword offset 06 */
+#define CRTC_GEN_CNTL 0x001C /* Dword offset 07 */
+
+#define DSP_CONFIG 0x0020 /* Dword offset 08 */
+#define DSP_ON_OFF 0x0024 /* Dword offset 09 */
+
+#define SHARED_CNTL 0x0038 /* Dword offset 0E */
+
+#define OVR_CLR 0x0040 /* Dword offset 10 */
+#define OVR_WID_LEFT_RIGHT 0x0044 /* Dword offset 11 */
+#define OVR_WID_TOP_BOTTOM 0x0048 /* Dword offset 12 */
+
+#define CUR_CLR0 0x0060 /* Dword offset 18 */
+#define CUR_CLR1 0x0064 /* Dword offset 19 */
+#define CUR_OFFSET 0x0068 /* Dword offset 1A */
+#define CUR_HORZ_VERT_POSN 0x006C /* Dword offset 1B */
+#define CUR_HORZ_VERT_OFF 0x0070 /* Dword offset 1C */
+
+#define HW_DEBUG 0x007C /* Dword offset 1F */
+
+#define SCRATCH_REG0 0x0080 /* Dword offset 20 */
+#define SCRATCH_REG1 0x0084 /* Dword offset 21 */
+
+#define CLOCK_CNTL 0x0090 /* Dword offset 24 */
+
+#define BUS_CNTL 0x00A0 /* Dword offset 28 */
+
+#define LCD_INDEX 0x00A4 /* Dword offset 29 (LTPro) */
+#define LCD_DATA 0x00A8 /* Dword offset 2A (LTPro) */
+
+#define MEM_CNTL 0x00B0 /* Dword offset 2C */
+
+#define MEM_VGA_WP_SEL 0x00B4 /* Dword offset 2D */
+#define MEM_VGA_RP_SEL 0x00B8 /* Dword offset 2E */
+
+#define DAC_REGS 0x00C0 /* Dword offset 30 */
+#define DAC_WINDEX 0x00C0 /* Dword offset 30 */
+#define DAC_DATA 0x00C1 /* Dword offset 30 */
+#define DAC_MASK 0x00C2 /* Dword offset 30 */
+#define DAC_RINDEX 0x00C3 /* Dword offset 30 */
+#define DAC_CNTL 0x00C4 /* Dword offset 31 */
+
+#define HORZ_STRETCHING 0x00C8 /* Dword offset 32 (LT) */
+#define VERT_STRETCHING 0x00CC /* Dword offset 33 (LT) */
+
+#define GEN_TEST_CNTL 0x00D0 /* Dword offset 34 */
+
+#define LCD_GEN_CNTL 0x00D4 /* Dword offset 35 (LT) */
+#define POWER_MANAGEMENT 0x00D8 /* Dword offset 36 (LT) */
+
+#define CONFIG_CNTL 0x00DC /* Dword offset 37 (CT, ET, VT) */
+#define CONFIG_CHIP_ID 0x00E0 /* Dword offset 38 */
+#define CONFIG_STAT0 0x00E4 /* Dword offset 39 */
+#define CONFIG_STAT1 0x00E8 /* Dword offset 3A */
+
+
+/* GUI MEMORY MAPPED Registers */
+
+#define DST_OFF_PITCH 0x0100 /* Dword offset 40 */
+#define DST_X 0x0104 /* Dword offset 41 */
+#define DST_Y 0x0108 /* Dword offset 42 */
+#define DST_Y_X 0x010C /* Dword offset 43 */
+#define DST_WIDTH 0x0110 /* Dword offset 44 */
+#define DST_HEIGHT 0x0114 /* Dword offset 45 */
+#define DST_HEIGHT_WIDTH 0x0118 /* Dword offset 46 */
+#define DST_X_WIDTH 0x011C /* Dword offset 47 */
+#define DST_BRES_LNTH 0x0120 /* Dword offset 48 */
+#define DST_BRES_ERR 0x0124 /* Dword offset 49 */
+#define DST_BRES_INC 0x0128 /* Dword offset 4A */
+#define DST_BRES_DEC 0x012C /* Dword offset 4B */
+#define DST_CNTL 0x0130 /* Dword offset 4C */
+
+#define SRC_OFF_PITCH 0x0180 /* Dword offset 60 */
+#define SRC_X 0x0184 /* Dword offset 61 */
+#define SRC_Y 0x0188 /* Dword offset 62 */
+#define SRC_Y_X 0x018C /* Dword offset 63 */
+#define SRC_WIDTH1 0x0190 /* Dword offset 64 */
+#define SRC_HEIGHT1 0x0194 /* Dword offset 65 */
+#define SRC_HEIGHT1_WIDTH1 0x0198 /* Dword offset 66 */
+#define SRC_X_START 0x019C /* Dword offset 67 */
+#define SRC_Y_START 0x01A0 /* Dword offset 68 */
+#define SRC_Y_X_START 0x01A4 /* Dword offset 69 */
+#define SRC_WIDTH2 0x01A8 /* Dword offset 6A */
+#define SRC_HEIGHT2 0x01AC /* Dword offset 6B */
+#define SRC_HEIGHT2_WIDTH2 0x01B0 /* Dword offset 6C */
+#define SRC_CNTL 0x01B4 /* Dword offset 6D */
+
+#define HOST_DATA0 0x0200 /* Dword offset 80 */
+#define HOST_DATA1 0x0204 /* Dword offset 81 */
+#define HOST_DATA2 0x0208 /* Dword offset 82 */
+#define HOST_DATA3 0x020C /* Dword offset 83 */
+#define HOST_DATA4 0x0210 /* Dword offset 84 */
+#define HOST_DATA5 0x0214 /* Dword offset 85 */
+#define HOST_DATA6 0x0218 /* Dword offset 86 */
+#define HOST_DATA7 0x021C /* Dword offset 87 */
+#define HOST_DATA8 0x0220 /* Dword offset 88 */
+#define HOST_DATA9 0x0224 /* Dword offset 89 */
+#define HOST_DATAA 0x0228 /* Dword offset 8A */
+#define HOST_DATAB 0x022C /* Dword offset 8B */
+#define HOST_DATAC 0x0230 /* Dword offset 8C */
+#define HOST_DATAD 0x0234 /* Dword offset 8D */
+#define HOST_DATAE 0x0238 /* Dword offset 8E */
+#define HOST_DATAF 0x023C /* Dword offset 8F */
+#define HOST_CNTL 0x0240 /* Dword offset 90 */
+
+#define PAT_REG0 0x0280 /* Dword offset A0 */
+#define PAT_REG1 0x0284 /* Dword offset A1 */
+#define PAT_CNTL 0x0288 /* Dword offset A2 */
+
+#define SC_LEFT 0x02A0 /* Dword offset A8 */
+#define SC_RIGHT 0x02A4 /* Dword offset A9 */
+#define SC_LEFT_RIGHT 0x02A8 /* Dword offset AA */
+#define SC_TOP 0x02AC /* Dword offset AB */
+#define SC_BOTTOM 0x02B0 /* Dword offset AC */
+#define SC_TOP_BOTTOM 0x02B4 /* Dword offset AD */
+
+#define DP_BKGD_CLR 0x02C0 /* Dword offset B0 */
+#define DP_FRGD_CLR 0x02C4 /* Dword offset B1 */
+#define DP_WRITE_MASK 0x02C8 /* Dword offset B2 */
+#define DP_CHAIN_MASK 0x02CC /* Dword offset B3 */
+#define DP_PIX_WIDTH 0x02D0 /* Dword offset B4 */
+#define DP_MIX 0x02D4 /* Dword offset B5 */
+#define DP_SRC 0x02D8 /* Dword offset B6 */
+
+#define CLR_CMP_CLR 0x0300 /* Dword offset C0 */
+#define CLR_CMP_MASK 0x0304 /* Dword offset C1 */
+#define CLR_CMP_CNTL 0x0308 /* Dword offset C2 */
+
+#define FIFO_STAT 0x0310 /* Dword offset C4 */
+
+#define CONTEXT_MASK 0x0320 /* Dword offset C8 */
+#define CONTEXT_LOAD_CNTL 0x032C /* Dword offset CB */
+
+#define GUI_TRAJ_CNTL 0x0330 /* Dword offset CC */
+#define GUI_STAT 0x0338 /* Dword offset CE */
+
+
+/* CRTC control values */
+
+#define CRTC_HSYNC_NEG 0x00200000
+#define CRTC_VSYNC_NEG 0x00200000
+
+#define CRTC_DBL_SCAN_EN 0x00000001
+#define CRTC_INTERLACE_EN 0x00000002
+#define CRTC_HSYNC_DIS 0x00000004
+#define CRTC_VSYNC_DIS 0x00000008
+#define CRTC_CSYNC_EN 0x00000010
+#define CRTC_PIX_BY_2_EN 0x00000020
+#define CRTC_DISPLAY_DIS 0x00000040
+#define CRTC_VGA_XOVERSCAN 0x00000080
+
+#define CRTC_PIX_WIDTH 0x00000700
+#define CRTC_PIX_WIDTH_4BPP 0x00000100
+#define CRTC_PIX_WIDTH_8BPP 0x00000200
+#define CRTC_PIX_WIDTH_15BPP 0x00000300
+#define CRTC_PIX_WIDTH_16BPP 0x00000400
+#define CRTC_PIX_WIDTH_24BPP 0x00000500
+#define CRTC_PIX_WIDTH_32BPP 0x00000600
+
+#define CRTC_BYTE_PIX_ORDER 0x00000800
+#define CRTC_PIX_ORDER_MSN_LSN 0x00000000
+#define CRTC_PIX_ORDER_LSN_MSN 0x00000800
+
+#define CRTC_FIFO_LWM 0x000f0000
+#define CRTC_LOCK_REGS 0x00400000
+#define CRTC_EXT_DISP_EN 0x01000000
+#define CRTC_EN 0x02000000
+#define CRTC_DISP_REQ_EN 0x04000000
+#define CRTC_VGA_LINEAR 0x08000000
+#define CRTC_VSYNC_FALL_EDGE 0x10000000
+#define CRTC_VGA_TEXT_132 0x20000000
+#define CRTC_CNT_EN 0x40000000
+#define CRTC_CUR_B_TEST 0x80000000
+
+#define CRTC_CRNT_VLINE 0x07f00000
+#define CRTC_VBLANK 0x00000001
+
+/* DAC control values */
+
+#define DAC_EXT_SEL_RS2 0x01
+#define DAC_EXT_SEL_RS3 0x02
+#define DAC_8BIT_EN 0x00000100
+#define DAC_PIX_DLY_MASK 0x00000600
+#define DAC_PIX_DLY_0NS 0x00000000
+#define DAC_PIX_DLY_2NS 0x00000200
+#define DAC_PIX_DLY_4NS 0x00000400
+#define DAC_BLANK_ADJ_MASK 0x00001800
+#define DAC_BLANK_ADJ_0 0x00000000
+#define DAC_BLANK_ADJ_1 0x00000800
+#define DAC_BLANK_ADJ_2 0x00001000
+
+
+/* Mix control values */
+
+#define MIX_NOT_DST 0x0000
+#define MIX_0 0x0001
+#define MIX_1 0x0002
+#define MIX_DST 0x0003
+#define MIX_NOT_SRC 0x0004
+#define MIX_XOR 0x0005
+#define MIX_XNOR 0x0006
+#define MIX_SRC 0x0007
+#define MIX_NAND 0x0008
+#define MIX_NOT_SRC_OR_DST 0x0009
+#define MIX_SRC_OR_NOT_DST 0x000a
+#define MIX_OR 0x000b
+#define MIX_AND 0x000c
+#define MIX_SRC_AND_NOT_DST 0x000d
+#define MIX_NOT_SRC_AND_DST 0x000e
+#define MIX_NOR 0x000f
+
+/* Maximum engine dimensions */
+#define ENGINE_MIN_X 0
+#define ENGINE_MIN_Y 0
+#define ENGINE_MAX_X 4095
+#define ENGINE_MAX_Y 16383
+
+/* Mach64 engine bit constants - these are typically ORed together */
+
+/* HW_DEBUG register constants */
+/* For RagePro only... */
+#define AUTO_FF_DIS 0x000001000
+#define AUTO_BLKWRT_DIS 0x000002000
+
+/* BUS_CNTL register constants */
+#define BUS_FIFO_ERR_ACK 0x00200000
+#define BUS_HOST_ERR_ACK 0x00800000
+#define BUS_APER_REG_DIS 0x00000010
+
+/* GEN_TEST_CNTL register constants */
+#define GEN_OVR_OUTPUT_EN 0x20
+#define HWCURSOR_ENABLE 0x80
+#define GUI_ENGINE_ENABLE 0x100
+#define BLOCK_WRITE_ENABLE 0x200
+
+/* DSP_CONFIG register constants */
+#define DSP_XCLKS_PER_QW 0x00003fff
+#define DSP_LOOP_LATENCY 0x000f0000
+#define DSP_PRECISION 0x00700000
+
+/* DSP_ON_OFF register constants */
+#define DSP_OFF 0x000007ff
+#define DSP_ON 0x07ff0000
+
+/* SHARED_CNTL register constants */
+#define CTD_FIFO5 0x01000000
+
+/* CLOCK_CNTL register constants */
+#define CLOCK_SEL 0x0f
+#define CLOCK_DIV 0x30
+#define CLOCK_DIV1 0x00
+#define CLOCK_DIV2 0x10
+#define CLOCK_DIV4 0x20
+#define CLOCK_STROBE 0x40
+#define PLL_WR_EN 0x02
+
+/* PLL registers */
+#define PLL_MACRO_CNTL 0x01
+#define PLL_REF_DIV 0x02
+#define PLL_GEN_CNTL 0x03
+#define MCLK_FB_DIV 0x04
+#define PLL_VCLK_CNTL 0x05
+#define VCLK_POST_DIV 0x06
+#define VCLK0_FB_DIV 0x07
+#define VCLK1_FB_DIV 0x08
+#define VCLK2_FB_DIV 0x09
+#define VCLK3_FB_DIV 0x0A
+#define PLL_XCLK_CNTL 0x0B
+#define PLL_TEST_CTRL 0x0E
+#define PLL_TEST_COUNT 0x0F
+
+/* Memory types for CT, ET, VT, GT */
+#define DRAM 1
+#define EDO_DRAM 2
+#define PSEUDO_EDO 3
+#define SDRAM 4
+#define SGRAM 5
+#define SGRAM32 6
+
+#define DAC_INTERNAL 0x00
+#define DAC_IBMRGB514 0x01
+#define DAC_ATI68875 0x02
+#define DAC_TVP3026_A 0x72
+#define DAC_BT476 0x03
+#define DAC_BT481 0x04
+#define DAC_ATT20C491 0x14
+#define DAC_SC15026 0x24
+#define DAC_MU9C1880 0x34
+#define DAC_IMSG174 0x44
+#define DAC_ATI68860_B 0x05
+#define DAC_ATI68860_C 0x15
+#define DAC_TVP3026_B 0x75
+#define DAC_STG1700 0x06
+#define DAC_ATT498 0x16
+#define DAC_STG1702 0x07
+#define DAC_SC15021 0x17
+#define DAC_ATT21C498 0x27
+#define DAC_STG1703 0x37
+#define DAC_CH8398 0x47
+#define DAC_ATT20C408 0x57
+
+#define CLK_ATI18818_0 0
+#define CLK_ATI18818_1 1
+#define CLK_STG1703 2
+#define CLK_CH8398 3
+#define CLK_INTERNAL 4
+#define CLK_ATT20C408 5
+#define CLK_IBMRGB514 6
+
+/* DST_CNTL register constants */
+#define DST_X_RIGHT_TO_LEFT 0
+#define DST_X_LEFT_TO_RIGHT 1
+#define DST_Y_BOTTOM_TO_TOP 0
+#define DST_Y_TOP_TO_BOTTOM 2
+#define DST_X_MAJOR 0
+#define DST_Y_MAJOR 4
+#define DST_X_TILE 8
+#define DST_Y_TILE 0x10
+#define DST_LAST_PEL 0x20
+#define DST_POLYGON_ENABLE 0x40
+#define DST_24_ROTATION_ENABLE 0x80
+
+/* SRC_CNTL register constants */
+#define SRC_PATTERN_ENABLE 1
+#define SRC_ROTATION_ENABLE 2
+#define SRC_LINEAR_ENABLE 4
+#define SRC_BYTE_ALIGN 8
+#define SRC_LINE_X_RIGHT_TO_LEFT 0
+#define SRC_LINE_X_LEFT_TO_RIGHT 0x10
+
+/* HOST_CNTL register constants */
+#define HOST_BYTE_ALIGN 1
+
+/* DP_CHAIN_MASK register constants */
+#define DP_CHAIN_4BPP 0x8888
+#define DP_CHAIN_7BPP 0xD2D2
+#define DP_CHAIN_8BPP 0x8080
+#define DP_CHAIN_8BPP_RGB 0x9292
+#define DP_CHAIN_15BPP 0x4210
+#define DP_CHAIN_16BPP 0x8410
+#define DP_CHAIN_24BPP 0x8080
+#define DP_CHAIN_32BPP 0x8080
+
+/* DP_PIX_WIDTH register constants */
+#define DST_1BPP 0
+#define DST_4BPP 1
+#define DST_8BPP 2
+#define DST_15BPP 3
+#define DST_16BPP 4
+#define DST_32BPP 6
+#define SRC_1BPP 0
+#define SRC_4BPP 0x100
+#define SRC_8BPP 0x200
+#define SRC_15BPP 0x300
+#define SRC_16BPP 0x400
+#define SRC_32BPP 0x600
+#define HOST_1BPP 0
+#define HOST_4BPP 0x10000
+#define HOST_8BPP 0x20000
+#define HOST_15BPP 0x30000
+#define HOST_16BPP 0x40000
+#define HOST_32BPP 0x60000
+#define BYTE_ORDER_MSB_TO_LSB 0
+#define BYTE_ORDER_LSB_TO_MSB 0x1000000
+
+/* DP_SRC register constants */
+#define BKGD_SRC_BKGD_CLR 0
+#define BKGD_SRC_FRGD_CLR 1
+#define BKGD_SRC_HOST 2
+#define BKGD_SRC_BLIT 3
+#define BKGD_SRC_PATTERN 4
+#define FRGD_SRC_BKGD_CLR 0
+#define FRGD_SRC_FRGD_CLR 0x100
+#define FRGD_SRC_HOST 0x200
+#define FRGD_SRC_BLIT 0x300
+#define FRGD_SRC_PATTERN 0x400
+#define MONO_SRC_ONE 0
+#define MONO_SRC_PATTERN 0x10000
+#define MONO_SRC_HOST 0x20000
+#define MONO_SRC_BLIT 0x30000
+
+/* PCI IDs */
+#define ATI_VENDOR 0x1002
+#define ATI_MACH64_CT 0x4354 /* Mach64 CT */
+#define ATI_RAGE_PRO_AGP 0x4742 /* 3D Rage Pro (AGP) */
+#define ATI_RAGE_PRO_AGP1X 0x4744 /* 3D Rage Pro (AGP 1x) */
+#define ATI_RAGE_PRO_PCI_B 0x4749 /* 3D Rage Pro Turbo */
+#define ATI_RAGE_XC_PCI66 0x474c /* Rage XC (PCI66) */
+#define ATI_RAGE_XL_AGP 0x474d /* Rage XL (AGP) */
+#define ATI_RAGE_XC_AGP 0x474e /* Rage XC (AGP) */
+#define ATI_RAGE_XL_PCI66 0x474f /* Rage XL (PCI66) */
+#define ATI_RAGE_PRO_PCI_P 0x4750 /* 3D Rage Pro */
+#define ATI_RAGE_PRO_PCI_L 0x4751 /* 3D Rage Pro (limited 3D) */
+#define ATI_RAGE_XL_PCI 0x4752 /* Rage XL */
+#define ATI_RAGE_XC_PCI 0x4753 /* Rage XC */
+#define ATI_RAGE_II 0x4754 /* 3D Rage I/II */
+#define ATI_RAGE_IIP 0x4755 /* 3D Rage II+ */
+#define ATI_RAGE_IIC_PCI 0x4756 /* 3D Rage IIC */
+#define ATI_RAGE_IIC_AGP_B 0x4757 /* 3D Rage IIC (AGP) */
+#define ATI_RAGE_IIC_AGP_P 0x475a /* 3D Rage IIC (AGP) */
+#define ATI_RAGE_LT_PRO_AGP 0x4c42 /* 3D Rage LT Pro (AGP 133MHz) */
+#define ATI_RAGE_MOB_M3_PCI 0x4c45 /* Rage Mobility M3 */
+#define ATI_RAGE_MOB_M3_AGP 0x4c46 /* Rage Mobility M3 (AGP) */
+#define ATI_RAGE_LT 0x4c47 /* 3D Rage LT */
+#define ATI_RAGE_LT_PRO_PCI 0x4c49 /* 3D Rage LT Pro */
+#define ATI_RAGE_MOBILITY 0x4c4d /* Rage Mobility */
+#define ATI_RAGE_L_MOBILITY 0x4c4e /* Rage L Mobility */
+#define ATI_RAGE_LT_PRO 0x4c50 /* 3D Rage LT Pro */
+#define ATI_RAGE_LT_PRO2 0x4c51 /* 3D Rage LT Pro */
+#define ATI_RAGE_MOB_M1_PCI 0x4c52 /* Rage Mobility M1 (PCI) */
+#define ATI_RAGE_L_MOB_M1_PCI 0x4c53 /* Rage L Mobility (PCI) */
+#define ATI_MACH64_VT 0x5654 /* Mach64 VT */
+#define ATI_MACH64_VTB 0x5655 /* Mach64 VTB */
+#define ATI_MACH64_VT4 0x5656 /* Mach64 VT4 */
+
+#endif /* !_DEV_FB_MACHFB_H_ */
diff --git a/sys/dev/fb/s3_pci.c b/sys/dev/fb/s3_pci.c
new file mode 100644
index 000000000000..9935b9e414cd
--- /dev/null
+++ b/sys/dev/fb/s3_pci.c
@@ -0,0 +1,568 @@
+/*-
+ * Copyright (c) 2000 Alcove - Nicolas Souchu <nsouch@freebsd.org>
+ * All rights reserved.
+ *
+ * Code based on Peter Horton <pdh@colonel-panic.com> patch.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+/* Enable LFB on S3 cards that has only VESA 1.2 BIOS */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <machine/bus.h>
+
+#include <vm/vm.h>
+#include <vm/vm_extern.h>
+#include <vm/vm_kern.h>
+#include <vm/pmap.h>
+
+#include <sys/uio.h>
+#include <sys/module.h>
+#include <sys/bus.h>
+#include <sys/rman.h>
+#include <machine/resource.h>
+
+#include <sys/malloc.h>
+#include <sys/fbio.h>
+
+#include <dev/pci/pcireg.h>
+#include <dev/pci/pcivar.h>
+
+#include <machine/md_var.h>
+#include <machine/vm86.h>
+#include <machine/pc/bios.h>
+#include <machine/pc/vesa.h>
+
+#include <dev/fb/fbreg.h>
+#include <dev/fb/vgareg.h>
+
+#define S3PCI_DEBUG 1
+
+#define PCI_S3_VENDOR_ID 0x5333
+
+#define S3_CONFIG_IO 0x3c0 /* VGA standard config io ports */
+#define S3_CONFIG_IO_SIZE 0x20
+
+#define S3_ENHANCED_IO 0x4ae8 /* Extended config register */
+#define S3_ENHANCED_IO_SIZE 1
+
+#define S3_CRTC_ADDR 0x14
+#define S3_CRTC_VALUE 0x15
+
+#define PCI_BASE_MEMORY 0x10
+
+#define outb_p(value, offset) bus_space_write_1(sc->st, sc->sh, offset, value)
+#define inb_p(offset) (bus_space_read_1(sc->st, sc->sh, offset))
+#define outb_enh(value, offset) bus_space_write_1(sc->enh_st, sc->enh_sh, \
+ offset, value)
+#define inb_enh(offset) (bus_space_read_1(sc->enh_st, sc->enh_sh, offset))
+
+struct s3pci_softc {
+ bus_space_tag_t st;
+ bus_space_handle_t sh;
+ bus_space_tag_t enh_st;
+ bus_space_handle_t enh_sh;
+ struct resource *port_res;
+ struct resource *enh_res;
+ struct resource *mem_res;
+ u_long mem_base;
+ u_long mem_size;
+};
+
+static int s3lfb_error(void);
+static vi_probe_t s3lfb_probe;
+static vi_init_t s3lfb_init;
+static vi_get_info_t s3lfb_get_info;
+static vi_query_mode_t s3lfb_query_mode;
+static vi_set_mode_t s3lfb_set_mode;
+static vi_save_font_t s3lfb_save_font;
+static vi_load_font_t s3lfb_load_font;
+static vi_show_font_t s3lfb_show_font;
+static vi_save_palette_t s3lfb_save_palette;
+static vi_load_palette_t s3lfb_load_palette;
+static vi_set_border_t s3lfb_set_border;
+static vi_save_state_t s3lfb_save_state;
+static vi_load_state_t s3lfb_load_state;
+static vi_set_win_org_t s3lfb_set_origin;
+static vi_read_hw_cursor_t s3lfb_read_hw_cursor;
+static vi_set_hw_cursor_t s3lfb_set_hw_cursor;
+static vi_set_hw_cursor_shape_t s3lfb_set_hw_cursor_shape;
+static vi_blank_display_t s3lfb_blank_display;
+static vi_mmap_t s3lfb_mmap;
+static vi_ioctl_t s3lfb_ioctl;
+static vi_clear_t s3lfb_clear;
+static vi_fill_rect_t s3lfb_fill_rect;
+static vi_bitblt_t s3lfb_bitblt;
+static vi_diag_t s3lfb_diag;
+
+static video_switch_t s3lfbvidsw = {
+ s3lfb_probe,
+ s3lfb_init,
+ s3lfb_get_info,
+ s3lfb_query_mode,
+ s3lfb_set_mode,
+ s3lfb_save_font,
+ s3lfb_load_font,
+ s3lfb_show_font,
+ s3lfb_save_palette,
+ s3lfb_load_palette,
+ s3lfb_set_border,
+ s3lfb_save_state,
+ s3lfb_load_state,
+ s3lfb_set_origin,
+ s3lfb_read_hw_cursor,
+ s3lfb_set_hw_cursor,
+ s3lfb_set_hw_cursor_shape,
+ s3lfb_blank_display,
+ s3lfb_mmap,
+ s3lfb_ioctl,
+ s3lfb_clear,
+ s3lfb_fill_rect,
+ s3lfb_bitblt,
+ s3lfb_error,
+ s3lfb_error,
+ s3lfb_diag,
+};
+
+static video_switch_t *prevvidsw;
+static device_t s3pci_dev = NULL;
+
+static int
+s3lfb_probe(int unit, video_adapter_t **adpp, void *arg, int flags)
+{
+ return (*prevvidsw->probe)(unit, adpp, arg, flags);
+}
+
+static int
+s3lfb_init(int unit, video_adapter_t *adp, int flags)
+{
+ return (*prevvidsw->init)(unit, adp, flags);
+}
+
+static int
+s3lfb_get_info(video_adapter_t *adp, int mode, video_info_t *info)
+{
+#if 0
+ device_t dev = s3pci_dev; /* XXX */
+ struct s3pci_softc *sc = (struct s3pci_softc *)device_get_softc(dev);
+#endif
+ int error;
+
+ if ((error = (*prevvidsw->get_info)(adp, mode, info)))
+ return error;
+
+#if 0
+ /* Don't use linear addressing with text modes
+ */
+ if ((mode > M_VESA_BASE) &&
+ (info->vi_flags & V_INFO_GRAPHICS) &&
+ !(info->vi_flags & V_INFO_LINEAR)) {
+
+ info->vi_flags |= V_INFO_LINEAR;
+ info->vi_buffer = sc->mem_base;
+
+ } else {
+ info->vi_buffer = 0;
+ }
+#endif
+
+ return 0;
+}
+
+static int
+s3lfb_query_mode(video_adapter_t *adp, video_info_t *info)
+{
+ return (*prevvidsw->query_mode)(adp, info);
+}
+
+static vm_offset_t
+s3lfb_map_buffer(u_int paddr, size_t size)
+{
+ vm_offset_t vaddr;
+ u_int off;
+
+ off = paddr - trunc_page(paddr);
+ vaddr = (vm_offset_t)pmap_mapdev(paddr - off, size + off);
+
+ return (vaddr + off);
+}
+
+static int
+s3lfb_set_mode(video_adapter_t *adp, int mode)
+{
+ device_t dev = s3pci_dev; /* XXX */
+ struct s3pci_softc *sc = (struct s3pci_softc *)device_get_softc(dev);
+#if 0
+ unsigned char tmp;
+#endif
+ int error;
+
+ /* First, set the mode as if it was a classic VESA card
+ */
+ if ((error = (*prevvidsw->set_mode)(adp, mode)))
+ return error;
+
+ /* If not in a linear mode (according to s3lfb_get_info() called
+ * by vesa_set_mode in the (*vidsw[adp->va_index]->get_info)...
+ * sequence, return with no error
+ */
+#if 0
+ if (!(adp->va_info.vi_flags & V_INFO_LINEAR))
+ return 0;
+#endif
+
+ if ((mode <= M_VESA_BASE) ||
+ !(adp->va_info.vi_flags & V_INFO_GRAPHICS) ||
+ (adp->va_info.vi_flags & V_INFO_LINEAR))
+ return 0;
+
+ /* Ok, now apply the configuration to the card */
+
+ outb_p(0x38, S3_CRTC_ADDR); outb_p(0x48, S3_CRTC_VALUE);
+ outb_p(0x39, S3_CRTC_ADDR); outb_p(0xa5, S3_CRTC_VALUE);
+
+ /* check that CR47 is read/write */
+
+#if 0
+ outb_p(0x47, S3_CRTC_ADDR); outb_p(0xff, S3_CRTC_VALUE);
+ tmp = inb_p(S3_CRTC_VALUE);
+ outb_p(0x00, S3_CRTC_VALUE);
+ if ((tmp != 0xff) || (inb_p(S3_CRTC_VALUE)))
+ {
+ /* lock S3 registers */
+
+ outb_p(0x39, S3_CRTC_ADDR); outb_p(0x5a, S3_CRTC_VALUE);
+ outb_p(0x38, S3_CRTC_ADDR); outb_p(0x00, S3_CRTC_VALUE);
+
+ return ENXIO;
+ }
+#endif
+
+ /* enable enhanced register access */
+
+ outb_p(0x40, S3_CRTC_ADDR);
+ outb_p(inb_p(S3_CRTC_VALUE) | 1, S3_CRTC_VALUE);
+
+ /* enable enhanced functions */
+
+ outb_enh(inb_enh(0) | 1, 0x0);
+
+ /* enable enhanced mode memory mapping */
+
+ outb_p(0x31, S3_CRTC_ADDR);
+ outb_p(inb_p(S3_CRTC_VALUE) | 8, S3_CRTC_VALUE);
+
+ /* enable linear frame buffer and set address window to max */
+
+ outb_p(0x58, S3_CRTC_ADDR);
+ outb_p(inb_p(S3_CRTC_VALUE) | 0x13, S3_CRTC_VALUE);
+
+ /* disabled enhanced register access */
+
+ outb_p(0x40, S3_CRTC_ADDR);
+ outb_p(inb_p(S3_CRTC_VALUE) & ~1, S3_CRTC_VALUE);
+
+ /* lock S3 registers */
+
+ outb_p(0x39, S3_CRTC_ADDR); outb_p(0x5a, S3_CRTC_VALUE);
+ outb_p(0x38, S3_CRTC_ADDR); outb_p(0x00, S3_CRTC_VALUE);
+
+ adp->va_info.vi_flags |= V_INFO_LINEAR;
+ adp->va_info.vi_buffer = sc->mem_base;
+ adp->va_buffer = s3lfb_map_buffer(adp->va_info.vi_buffer,
+ adp->va_info.vi_buffer_size);
+ adp->va_buffer_size = adp->va_info.vi_buffer_size;
+ adp->va_window = adp->va_buffer;
+ adp->va_window_size = adp->va_info.vi_buffer_size/adp->va_info.vi_planes;
+ adp->va_window_gran = adp->va_info.vi_buffer_size/adp->va_info.vi_planes;
+
+ return 0;
+}
+
+static int
+s3lfb_save_font(video_adapter_t *adp, int page, int fontsize, int fontwidth,
+ u_char *data, int ch, int count)
+{
+ return (*prevvidsw->save_font)(adp, page, fontsize, fontwidth, data,
+ ch, count);
+}
+
+static int
+s3lfb_load_font(video_adapter_t *adp, int page, int fontsize, int fontwidth,
+ u_char *data, int ch, int count)
+{
+ return (*prevvidsw->load_font)(adp, page, fontsize, fontwidth, data,
+ ch, count);
+}
+
+static int
+s3lfb_show_font(video_adapter_t *adp, int page)
+{
+ return (*prevvidsw->show_font)(adp, page);
+}
+
+static int
+s3lfb_save_palette(video_adapter_t *adp, u_char *palette)
+{
+ return (*prevvidsw->save_palette)(adp, palette);
+}
+
+static int
+s3lfb_load_palette(video_adapter_t *adp, u_char *palette)
+{
+ return (*prevvidsw->load_palette)(adp, palette);
+}
+
+static int
+s3lfb_set_border(video_adapter_t *adp, int color)
+{
+ return (*prevvidsw->set_border)(adp, color);
+}
+
+static int
+s3lfb_save_state(video_adapter_t *adp, void *p, size_t size)
+{
+ return (*prevvidsw->save_state)(adp, p, size);
+}
+
+static int
+s3lfb_load_state(video_adapter_t *adp, void *p)
+{
+ return (*prevvidsw->load_state)(adp, p);
+}
+
+static int
+s3lfb_set_origin(video_adapter_t *adp, off_t offset)
+{
+ return (*prevvidsw->set_win_org)(adp, offset);
+}
+
+static int
+s3lfb_read_hw_cursor(video_adapter_t *adp, int *col, int *row)
+{
+ return (*prevvidsw->read_hw_cursor)(adp, col, row);
+}
+
+static int
+s3lfb_set_hw_cursor(video_adapter_t *adp, int col, int row)
+{
+ return (*prevvidsw->set_hw_cursor)(adp, col, row);
+}
+
+static int
+s3lfb_set_hw_cursor_shape(video_adapter_t *adp, int base, int height,
+ int celsize, int blink)
+{
+ return (*prevvidsw->set_hw_cursor_shape)(adp, base, height,
+ celsize, blink);
+}
+
+static int
+s3lfb_blank_display(video_adapter_t *adp, int mode)
+{
+ return (*prevvidsw->blank_display)(adp, mode);
+}
+
+static int
+s3lfb_mmap(video_adapter_t *adp, vm_offset_t offset, vm_offset_t *paddr,
+ int prot)
+{
+ return (*prevvidsw->mmap)(adp, offset, paddr, prot);
+}
+
+static int
+s3lfb_clear(video_adapter_t *adp)
+{
+ return (*prevvidsw->clear)(adp);
+}
+
+static int
+s3lfb_fill_rect(video_adapter_t *adp, int val, int x, int y, int cx, int cy)
+{
+ return (*prevvidsw->fill_rect)(adp, val, x, y, cx, cy);
+}
+
+static int
+s3lfb_bitblt(video_adapter_t *adp,...)
+{
+ return (*prevvidsw->bitblt)(adp); /* XXX */
+}
+
+static int
+s3lfb_ioctl(video_adapter_t *adp, u_long cmd, caddr_t arg)
+{
+ return (*prevvidsw->ioctl)(adp, cmd, arg);
+}
+
+static int
+s3lfb_diag(video_adapter_t *adp, int level)
+{
+ return (*prevvidsw->diag)(adp, level);
+}
+
+static int
+s3lfb_error(void)
+{
+ return 1;
+}
+
+/***********************************/
+/* PCI detection/attachement stuff */
+/***********************************/
+
+static int
+s3pci_probe(device_t dev)
+{
+ u_int32_t vendor, class, subclass, device_id;
+
+ device_id = pci_get_devid(dev);
+ vendor = device_id & 0xffff;
+ class = pci_get_class(dev);
+ subclass = pci_get_subclass(dev);
+
+ if ((class != PCIC_DISPLAY) || (subclass != PCIS_DISPLAY_VGA) ||
+ (vendor != PCI_S3_VENDOR_ID))
+ return ENXIO;
+
+ device_set_desc(dev, "S3 graphic card");
+
+ bus_set_resource(dev, SYS_RES_IOPORT, 0,
+ S3_CONFIG_IO, S3_CONFIG_IO_SIZE);
+ bus_set_resource(dev, SYS_RES_IOPORT, 1,
+ S3_ENHANCED_IO, S3_ENHANCED_IO_SIZE);
+
+ return BUS_PROBE_DEFAULT;
+
+};
+
+static int
+s3pci_attach(device_t dev)
+{
+ struct s3pci_softc* sc = (struct s3pci_softc*)device_get_softc(dev);
+ video_adapter_t *adp;
+
+#if 0
+ unsigned char tmp;
+#endif
+ int rid, i;
+
+ if (s3pci_dev) {
+ printf("%s: driver already attached!\n", __func__);
+ goto error;
+ }
+
+ /* Allocate resources
+ */
+ rid = 0;
+ if (!(sc->port_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
+ 0ul, ~0ul, 0, RF_ACTIVE | RF_SHAREABLE))) {
+ printf("%s: port resource allocation failed!\n", __func__);
+ goto error;
+ }
+ sc->st = rman_get_bustag(sc->port_res);
+ sc->sh = rman_get_bushandle(sc->port_res);
+
+ rid = 1;
+ if (!(sc->enh_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
+ 0ul, ~0ul, 0, RF_ACTIVE | RF_SHAREABLE))) {
+ printf("%s: enhanced port resource allocation failed!\n",
+ __func__);
+ goto error;
+ }
+ sc->enh_st = rman_get_bustag(sc->enh_res);
+ sc->enh_sh = rman_get_bushandle(sc->enh_res);
+
+ rid = PCI_BASE_MEMORY;
+ if (!(sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
+ RF_ACTIVE))) {
+
+ printf("%s: mem resource allocation failed!\n", __func__);
+ goto error;
+ }
+
+ /* The memory base address will be our LFB base address
+ */
+ /* sc->mem_base = (u_long)rman_get_virtual(sc->mem_res); */
+ sc->mem_base = bus_get_resource_start(dev, SYS_RES_MEMORY, rid);
+ sc->mem_size = bus_get_resource_count(dev, SYS_RES_MEMORY, rid);
+
+ /* Attach the driver to the VGA/VESA framework
+ */
+ for (i = 0; (adp = vid_get_adapter(i)) != NULL; ++i) {
+ if ((adp->va_type == KD_VGA))
+ break;
+ }
+
+ /* If the VESA module hasn't been loaded, or VGA doesn't
+ * exist, abort
+ */
+ if ((adp == NULL) || !(adp->va_flags & V_ADP_VESA)) {
+ printf("%s: VGA adapter not found or VESA module not loaded!\n",
+ __func__);
+ goto error;
+ }
+
+ /* Replace the VESA video switch by owers
+ */
+ prevvidsw = vidsw[adp->va_index];
+ vidsw[adp->va_index] = &s3lfbvidsw;
+
+ /* Remember who we are on the bus */
+ s3pci_dev = (void *)dev; /* XXX */
+
+ return 0;
+
+error:
+ if (sc->mem_res)
+ bus_release_resource(dev, SYS_RES_MEMORY, PCI_BASE_MEMORY, sc->mem_res);
+
+ if (sc->enh_res)
+ bus_release_resource(dev, SYS_RES_IOPORT, 1, sc->enh_res);
+
+ if (sc->port_res)
+ bus_release_resource(dev, SYS_RES_IOPORT, 0, sc->port_res);
+
+ return ENXIO;
+};
+
+static device_method_t s3pci_methods[] = {
+
+ DEVMETHOD(device_probe, s3pci_probe),
+ DEVMETHOD(device_attach, s3pci_attach),
+ {0,0}
+};
+
+static driver_t s3pci_driver = {
+ "s3pci",
+ s3pci_methods,
+ sizeof(struct s3pci_softc),
+};
+
+static devclass_t s3pci_devclass;
+
+DRIVER_MODULE(s3pci, pci, s3pci_driver, s3pci_devclass, 0, 0);
diff --git a/sys/dev/fb/splash.c b/sys/dev/fb/splash.c
new file mode 100644
index 000000000000..ec25d1cf03a4
--- /dev/null
+++ b/sys/dev/fb/splash.c
@@ -0,0 +1,213 @@
+/*-
+ * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
+ * All rights reserved.
+ *
+ * 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 as
+ * the first lines of this file unmodified.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ *
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include "opt_splash.h"
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/malloc.h>
+#include <sys/linker.h>
+#include <sys/fbio.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+
+#include <dev/fb/fbreg.h>
+#include <dev/fb/splashreg.h>
+
+MODULE_VERSION(splash, 1);
+
+/* video adapter and image decoder */
+static video_adapter_t *splash_adp;
+static splash_decoder_t *splash_decoder;
+
+/* decoder candidates */
+static int decoders;
+static splash_decoder_t **decoder_set;
+#define DECODER_ARRAY_DELTA 4
+
+/* console driver callback */
+static int (*splash_callback)(int, void *);
+static void *splash_arg;
+
+static int
+splash_find_data(splash_decoder_t *decoder)
+{
+ caddr_t image_module;
+ caddr_t p;
+
+ if (decoder->data_type == NULL)
+ return 0;
+ image_module = preload_search_by_type(decoder->data_type);
+ if (image_module == NULL)
+ return ENOENT;
+ p = preload_search_info(image_module, MODINFO_ADDR);
+ if (p == NULL)
+ return ENOENT;
+ decoder->data = *(void **)p;
+ p = preload_search_info(image_module, MODINFO_SIZE);
+ if (p == NULL)
+ return ENOENT;
+ decoder->data_size = *(size_t *)p;
+ if (bootverbose)
+ printf("splash: image@%p, size:%lu\n",
+ (void *)decoder->data, (long)decoder->data_size);
+ return 0;
+}
+
+static int
+splash_test(splash_decoder_t *decoder)
+{
+ if (splash_find_data(decoder))
+ return ENOENT; /* XXX */
+ if (*decoder->init && (*decoder->init)(splash_adp)) {
+ decoder->data = NULL;
+ decoder->data_size = 0;
+ return ENODEV; /* XXX */
+ }
+ if (bootverbose)
+ printf("splash: image decoder found: %s\n", decoder->name);
+ return 0;
+}
+
+static void
+splash_new(splash_decoder_t *decoder)
+{
+ splash_decoder = decoder;
+ if (splash_callback != NULL)
+ (*splash_callback)(SPLASH_INIT, splash_arg);
+}
+
+int
+splash_register(splash_decoder_t *decoder)
+{
+ splash_decoder_t **p;
+ int error;
+ int i;
+
+ if (splash_adp != NULL) {
+ /*
+ * If the video card has aleady been initialized, test
+ * this decoder immediately.
+ */
+ error = splash_test(decoder);
+ if (error == 0) {
+ /* replace the current decoder with new one */
+ if (splash_decoder != NULL)
+ error = splash_term(splash_adp);
+ if (error == 0)
+ splash_new(decoder);
+ }
+ return error;
+ } else {
+ /* register the decoder for later use */
+ for (i = 0; i < decoders; ++i) {
+ if (decoder_set[i] == NULL)
+ break;
+ }
+ if ((i >= decoders) && (decoders % DECODER_ARRAY_DELTA) == 0) {
+ p = malloc(sizeof(*p)*(decoders + DECODER_ARRAY_DELTA),
+ M_DEVBUF, M_NOWAIT);
+ if (p == NULL)
+ return ENOMEM;
+ if (decoder_set != NULL) {
+ bcopy(decoder_set, p, sizeof(*p)*decoders);
+ free(decoder_set, M_DEVBUF);
+ }
+ decoder_set = p;
+ i = decoders++;
+ }
+ decoder_set[i] = decoder;
+ }
+
+ return 0;
+}
+
+int
+splash_unregister(splash_decoder_t *decoder)
+{
+ int error;
+
+ if (splash_decoder == decoder) {
+ if ((error = splash_term(splash_adp)) != 0)
+ return error;
+ }
+ return 0;
+}
+
+int
+splash_init(video_adapter_t *adp, int (*callback)(int, void *), void *arg)
+{
+ int i;
+
+ splash_adp = adp;
+ splash_callback = callback;
+ splash_arg = arg;
+
+ splash_decoder = NULL;
+ for (i = 0; i < decoders; ++i) {
+ if (decoder_set[i] == NULL)
+ continue;
+ if (splash_test(decoder_set[i]) == 0) {
+ splash_new(decoder_set[i]);
+ break;
+ }
+ decoder_set[i] = NULL;
+ }
+ for (++i; i < decoders; ++i) {
+ decoder_set[i] = NULL;
+ }
+ return 0;
+}
+
+int
+splash_term(video_adapter_t *adp)
+{
+ int error = 0;
+
+ if (splash_adp != adp)
+ return EINVAL;
+ if (splash_decoder != NULL) {
+ if (splash_callback != NULL)
+ error = (*splash_callback)(SPLASH_TERM, splash_arg);
+ if (error == 0 && splash_decoder->term)
+ error = (*splash_decoder->term)(adp);
+ if (error == 0)
+ splash_decoder = NULL;
+ }
+ return error;
+}
+
+int
+splash(video_adapter_t *adp, int on)
+{
+ if (splash_decoder != NULL)
+ return (*splash_decoder->splash)(adp, on);
+ return ENODEV;
+}
diff --git a/sys/dev/fb/splash_bmp.c b/sys/dev/fb/splash_bmp.c
new file mode 100644
index 000000000000..ca4885c63ebb
--- /dev/null
+++ b/sys/dev/fb/splash_bmp.c
@@ -0,0 +1,643 @@
+/*-
+ * Copyright (c) 1999 Michael Smith <msmith@freebsd.org>
+ * Copyright (c) 1999 Kazutaka YOKOTA <yokota@freebsd.org>
+ * All rights reserved.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS 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 AUTHORS 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+#include <sys/linker.h>
+#include <sys/fbio.h>
+
+#include <dev/fb/fbreg.h>
+#include <dev/fb/splashreg.h>
+#ifndef PC98
+#include <dev/fb/vgareg.h>
+
+#include <isa/isareg.h>
+#endif
+
+#define FADE_TIMEOUT 15 /* sec */
+#define FADE_LEVELS 10
+
+static int splash_mode = -1;
+static int splash_on = FALSE;
+
+static int bmp_start(video_adapter_t *adp);
+static int bmp_end(video_adapter_t *adp);
+static int bmp_splash(video_adapter_t *adp, int on);
+static int bmp_Init(char *data, int swidth, int sheight, int sdepth);
+static int bmp_Draw(video_adapter_t *adp);
+
+static splash_decoder_t bmp_decoder = {
+ "splash_bmp", bmp_start, bmp_end, bmp_splash, SPLASH_IMAGE,
+};
+
+SPLASH_DECODER(splash_bmp, bmp_decoder);
+
+static int
+bmp_start(video_adapter_t *adp)
+{
+ /* currently only 256-color modes are supported XXX */
+ static int modes[] = {
+#ifdef PC98
+ /*
+ * As 640x400 doesn't generally look great,
+ * it's least preferred here.
+ */
+ M_PC98_PEGC640x400,
+ M_PC98_PEGC640x480,
+ M_PC98_EGC640x400,
+#else
+ M_VESA_CG640x480,
+ M_VESA_CG800x600,
+ M_VESA_CG1024x768,
+ M_CG640x480,
+ /*
+ * As 320x200 doesn't generally look great,
+ * it's least preferred here.
+ */
+ M_VGA_CG320,
+#endif
+ -1,
+ };
+ video_info_t info;
+ int i;
+
+ if ((bmp_decoder.data == NULL) || (bmp_decoder.data_size <= 0)) {
+ printf("splash_bmp: No bitmap file found\n");
+ return ENODEV;
+ }
+ for (i = 0; modes[i] >= 0; ++i) {
+ if (((*vidsw[adp->va_index]->get_info)(adp, modes[i], &info) == 0)
+ && (bmp_Init((u_char *)bmp_decoder.data,
+ info.vi_width, info.vi_height, info.vi_depth) == 0))
+ break;
+ }
+ splash_mode = modes[i];
+ if (splash_mode < 0)
+ printf("splash_bmp: No appropriate video mode found\n");
+ if (bootverbose)
+ printf("bmp_start(): splash_mode:%d\n", splash_mode);
+ return ((splash_mode < 0) ? ENODEV : 0);
+}
+
+static int
+bmp_end(video_adapter_t *adp)
+{
+ /* nothing to do */
+ return 0;
+}
+
+static int
+bmp_splash(video_adapter_t *adp, int on)
+{
+ static u_char pal[256*3];
+ static long time_stamp;
+ u_char tpal[256*3];
+ static int fading = TRUE, brightness = FADE_LEVELS;
+ struct timeval tv;
+ int i;
+
+ if (on) {
+ if (!splash_on) {
+ /* set up the video mode and draw something */
+ if ((*vidsw[adp->va_index]->set_mode)(adp, splash_mode))
+ return 1;
+ if (bmp_Draw(adp))
+ return 1;
+ (*vidsw[adp->va_index]->save_palette)(adp, pal);
+ time_stamp = 0;
+ splash_on = TRUE;
+ }
+ /*
+ * This is a kludge to fade the image away. This section of the
+ * code takes effect only after the system is completely up.
+ * FADE_TIMEOUT should be configurable.
+ */
+ if (!cold) {
+ getmicrotime(&tv);
+ if (time_stamp == 0)
+ time_stamp = tv.tv_sec;
+ if (tv.tv_sec > time_stamp + FADE_TIMEOUT) {
+ if (fading)
+ if (brightness == 0) {
+ fading = FALSE;
+ brightness++;
+ }
+ else brightness--;
+ else
+ if (brightness == FADE_LEVELS) {
+ fading = TRUE;
+ brightness--;
+ }
+ else brightness++;
+ for (i = 0; i < sizeof(pal); ++i) {
+ tpal[i] = pal[i] * brightness / FADE_LEVELS;
+ }
+ (*vidsw[adp->va_index]->load_palette)(adp, tpal);
+ time_stamp = tv.tv_sec;
+ }
+ }
+ return 0;
+ } else {
+ /* the video mode will be restored by the caller */
+ splash_on = FALSE;
+ return 0;
+ }
+}
+
+/*
+** Code to handle Microsoft DIB (".BMP") format images.
+**
+** Blame me (msmith@freebsd.org) if this is broken, not Soren.
+*/
+
+typedef struct tagBITMAPFILEHEADER { /* bmfh */
+ u_short bfType __packed;
+ int bfSize __packed;
+ u_short bfReserved1 __packed;
+ u_short bfReserved2 __packed;
+ int bfOffBits __packed;
+} BITMAPFILEHEADER;
+
+typedef struct tagBITMAPINFOHEADER { /* bmih */
+ int biSize __packed;
+ int biWidth __packed;
+ int biHeight __packed;
+ short biPlanes __packed;
+ short biBitCount __packed;
+ int biCompression __packed;
+ int biSizeImage __packed;
+ int biXPelsPerMeter __packed;
+ int biYPelsPerMeter __packed;
+ int biClrUsed __packed;
+ int biClrImportant __packed;
+} BITMAPINFOHEADER;
+
+typedef struct tagRGBQUAD { /* rgbq */
+ u_char rgbBlue __packed;
+ u_char rgbGreen __packed;
+ u_char rgbRed __packed;
+ u_char rgbReserved __packed;
+} RGBQUAD;
+
+typedef struct tagBITMAPINFO { /* bmi */
+ BITMAPINFOHEADER bmiHeader __packed;
+ RGBQUAD bmiColors[256] __packed;
+} BITMAPINFO;
+
+typedef struct tagBITMAPF
+{
+ BITMAPFILEHEADER bmfh __packed;
+ BITMAPINFO bmfi __packed;
+} BITMAPF;
+
+#define BI_RGB 0
+#define BI_RLE8 1
+#define BI_RLE4 2
+
+/*
+** all we actually care about the image
+*/
+typedef struct
+{
+ int width,height; /* image dimensions */
+ int swidth,sheight; /* screen dimensions for the current mode */
+ u_char depth; /* image depth (1, 4, 8, 24 bits) */
+ u_char sdepth; /* screen depth (1, 4, 8 bpp) */
+ int ncols; /* number of colours */
+ u_char palette[256][3]; /* raw palette data */
+ u_char format; /* one of the BI_* constants above */
+ u_char *data; /* pointer to the raw data */
+ u_char *index; /* running pointer to the data while drawing */
+ u_char *vidmem; /* video memory allocated for drawing */
+ video_adapter_t *adp;
+ int bank;
+#ifdef PC98
+ u_char prev_val;
+#endif
+} BMP_INFO;
+
+static BMP_INFO bmp_info;
+
+/*
+** bmp_SetPix
+**
+** Given (info), set the pixel at (x),(y) to (val)
+**
+*/
+static void
+bmp_SetPix(BMP_INFO *info, int x, int y, u_char val)
+{
+ int sofs, bofs;
+ int newbank;
+
+ /*
+ * range check to avoid explosions
+ */
+ if ((x < 0) || (x >= info->swidth) || (y < 0) || (y >= info->sheight))
+ return;
+
+ /*
+ * calculate offset into video memory;
+ * because 0,0 is bottom-left for DIB, we have to convert.
+ */
+ sofs = ((info->height - (y+1) + (info->sheight - info->height) / 2)
+ * info->adp->va_line_width);
+ x += (info->swidth - info->width) / 2;
+
+ switch(info->sdepth) {
+#ifdef PC98
+ case 4:
+ sofs += (x >> 3);
+ bofs = x & 0x7; /* offset within byte */
+
+ outb(0x7c, 0x80 | 0x40); /* GRCG on & RMW mode */
+ if (val != info->prev_val) {
+ outb(0x7e, (val & 1) ? 0xff : 0); /* tile B */
+ outb(0x7e, (val & 2) ? 0xff : 0); /* tile R */
+ outb(0x7e, (val & 4) ? 0xff : 0); /* tile G */
+ outb(0x7e, (val & 8) ? 0xff : 0); /* tile I */
+
+ info->prev_val = val;
+ }
+
+ *(info->vidmem+sofs) = (0x80 >> bofs); /* write new bit */
+ outb(0x7c, 0); /* GRCG off */
+ break;
+#else
+ case 4:
+ case 1:
+ /* EGA/VGA planar modes */
+ sofs += (x >> 3);
+ newbank = sofs/info->adp->va_window_size;
+ if (info->bank != newbank) {
+ (*vidsw[info->adp->va_index]->set_win_org)(info->adp, newbank*info->adp->va_window_size);
+ info->bank = newbank;
+ }
+ sofs %= info->adp->va_window_size;
+ bofs = x & 0x7; /* offset within byte */
+ outw(GDCIDX, (0x8000 >> bofs) | 0x08); /* bit mask */
+ outw(GDCIDX, (val << 8) | 0x00); /* set/reset */
+ *(info->vidmem + sofs) ^= 0xff; /* read-modify-write */
+ break;
+#endif
+
+ case 8:
+ sofs += x;
+ newbank = sofs/info->adp->va_window_size;
+ if (info->bank != newbank) {
+ (*vidsw[info->adp->va_index]->set_win_org)(info->adp, newbank*info->adp->va_window_size);
+ info->bank = newbank;
+ }
+ sofs %= info->adp->va_window_size;
+ *(info->vidmem+sofs) = val;
+ break;
+ }
+}
+
+/*
+** bmp_DecodeRLE4
+**
+** Given (data) pointing to a line of RLE4-format data and (line) being the starting
+** line onscreen, decode the line.
+*/
+static void
+bmp_DecodeRLE4(BMP_INFO *info, int line)
+{
+ int count; /* run count */
+ u_char val;
+ int x,y; /* screen position */
+
+ x = 0; /* starting position */
+ y = line;
+
+ /* loop reading data */
+ for (;;) {
+ /*
+ * encoded mode starts with a run length, and then a byte with
+ * two colour indexes to alternate between for the run
+ */
+ if (*info->index) {
+ for (count = 0; count < *info->index; count++, x++) {
+ if (count & 1) { /* odd count, low nybble */
+ bmp_SetPix(info, x, y, *(info->index+1) & 0x0f);
+ } else { /* even count, high nybble */
+ bmp_SetPix(info, x, y, (*(info->index+1) >>4) & 0x0f);
+ }
+ }
+ info->index += 2;
+ /*
+ * A leading zero is an escape; it may signal the end of the
+ * bitmap, a cursor move, or some absolute data.
+ */
+ } else { /* zero tag may be absolute mode or an escape */
+ switch (*(info->index+1)) {
+ case 0: /* end of line */
+ info->index += 2;
+ return;
+ case 1: /* end of bitmap */
+ info->index = NULL;
+ return;
+ case 2: /* move */
+ x += *(info->index + 2); /* new coords */
+ y += *(info->index + 3);
+ info->index += 4;
+ break;
+ default: /* literal bitmap data */
+ for (count = 0; count < *(info->index + 1); count++, x++) {
+ val = *(info->index + 2 + (count / 2)); /* byte with nybbles */
+ if (count & 1) {
+ val &= 0xf; /* get low nybble */
+ } else {
+ val = (val >> 4); /* get high nybble */
+ }
+ bmp_SetPix(info, x, y, val);
+ }
+ /* warning, this depends on integer truncation, do not hand-optimise! */
+ info->index += 2 + ((count + 3) / 4) * 2;
+ break;
+ }
+ }
+ }
+}
+
+/*
+** bmp_DecodeRLE8
+** Given (data) pointing to a line of RLE8-format data and (line) being the starting
+** line onscreen, decode the line.
+*/
+static void
+bmp_DecodeRLE8(BMP_INFO *info, int line)
+{
+ int count; /* run count */
+ int x,y; /* screen position */
+
+ x = 0; /* starting position */
+ y = line;
+
+ /* loop reading data */
+ for(;;) {
+ /*
+ * encoded mode starts with a run length, and then a byte with
+ * two colour indexes to alternate between for the run
+ */
+ if (*info->index) {
+ for (count = 0; count < *info->index; count++, x++)
+ bmp_SetPix(info, x, y, *(info->index+1));
+ info->index += 2;
+ /*
+ * A leading zero is an escape; it may signal the end of the
+ * bitmap, a cursor move, or some absolute data.
+ */
+ } else { /* zero tag may be absolute mode or an escape */
+ switch(*(info->index+1)) {
+ case 0: /* end of line */
+ info->index += 2;
+ return;
+ case 1: /* end of bitmap */
+ info->index = NULL;
+ return;
+ case 2: /* move */
+ x += *(info->index + 2); /* new coords */
+ y += *(info->index + 3);
+ info->index += 4;
+ break;
+ default: /* literal bitmap data */
+ for (count = 0; count < *(info->index + 1); count++, x++)
+ bmp_SetPix(info, x, y, *(info->index + 2 + count));
+ /* must be an even count */
+ info->index += 2 + count + (count & 1);
+ break;
+ }
+ }
+ }
+}
+
+/*
+** bmp_DecodeLine
+**
+** Given (info) pointing to an image being decoded, (line) being the line currently
+** being displayed, decode a line of data.
+*/
+static void
+bmp_DecodeLine(BMP_INFO *info, int line)
+{
+ int x;
+ u_char val, mask, *p;
+
+ switch(info->format) {
+ case BI_RGB:
+ switch(info->depth) {
+ case 8:
+ for (x = 0; x < info->width; x++, info->index++)
+ bmp_SetPix(info, x, line, *info->index);
+ info->index += 3 - (--x % 4);
+ break;
+ case 4:
+ p = info->index;
+ for (x = 0; x < info->width; x++) {
+ if (x & 1) {
+ val = *p & 0xf; /* get low nybble */
+ p++;
+ } else {
+ val = *p >> 4; /* get high nybble */
+ }
+ bmp_SetPix(info, x, line, val);
+ }
+ /* warning, this depends on integer truncation, do not hand-optimise! */
+ info->index += ((x + 7) / 8) * 4;
+ break;
+ case 1:
+ p = info->index;
+ mask = 0x80;
+ for (x = 0; x < info->width; x++) {
+ val = (*p & mask) ? 1 : 0;
+ mask >>= 1;
+ if (mask == 0) {
+ mask = 0x80;
+ p++;
+ }
+ bmp_SetPix(info, x, line, val);
+ }
+ /* warning, this depends on integer truncation, do not hand-optimise! */
+ info->index += ((x + 31) / 32) * 4;
+ break;
+ }
+ break;
+ case BI_RLE4:
+ bmp_DecodeRLE4(info, line);
+ break;
+ case BI_RLE8:
+ bmp_DecodeRLE8(info, line);
+ break;
+ }
+}
+
+/*
+** bmp_Init
+**
+** Given a pointer (data) to the image of a BMP file, fill in bmp_info with what
+** can be learnt from it. Return nonzero if the file isn't usable.
+**
+** Take screen dimensions (swidth), (sheight) and (sdepth) and make sure we
+** can work with these.
+*/
+static int
+bmp_Init(char *data, int swidth, int sheight, int sdepth)
+{
+ BITMAPF *bmf = (BITMAPF *)data;
+ int pind;
+
+ bmp_info.data = NULL; /* assume setup failed */
+
+ /* check file ID */
+ if (bmf->bmfh.bfType != 0x4d42) {
+ printf("splash_bmp: not a BMP file\n");
+ return(1); /* XXX check word ordering for big-endian ports? */
+ }
+
+ /* do we understand this bitmap format? */
+ if (bmf->bmfi.bmiHeader.biSize > sizeof(bmf->bmfi.bmiHeader)) {
+ printf("splash_bmp: unsupported BMP format (size=%d)\n",
+ bmf->bmfi.bmiHeader.biSize);
+ return(1);
+ }
+
+ /* save what we know about the screen */
+ bmp_info.swidth = swidth;
+ bmp_info.sheight = sheight;
+ bmp_info.sdepth = sdepth;
+
+ /* where's the data? */
+ bmp_info.data = (u_char *)data + bmf->bmfh.bfOffBits;
+
+ /* image parameters */
+ bmp_info.width = bmf->bmfi.bmiHeader.biWidth;
+ bmp_info.height = bmf->bmfi.bmiHeader.biHeight;
+ bmp_info.depth = bmf->bmfi.bmiHeader.biBitCount;
+ bmp_info.format = bmf->bmfi.bmiHeader.biCompression;
+
+ switch(bmp_info.format) { /* check compression format */
+ case BI_RGB:
+ case BI_RLE4:
+ case BI_RLE8:
+ break;
+ default:
+ printf("splash_bmp: unsupported compression format\n");
+ return(1); /* unsupported compression format */
+ }
+
+ /* palette details */
+ bmp_info.ncols = (bmf->bmfi.bmiHeader.biClrUsed);
+ bzero(bmp_info.palette,sizeof(bmp_info.palette));
+ if (bmp_info.ncols == 0) { /* uses all of them */
+ bmp_info.ncols = 1 << bmf->bmfi.bmiHeader.biBitCount;
+ }
+ if ((bmp_info.height > bmp_info.sheight) ||
+ (bmp_info.width > bmp_info.swidth) ||
+ (bmp_info.ncols > (1 << sdepth))) {
+ if (bootverbose)
+ printf("splash_bmp: beyond screen capacity (%dx%d, %d colors)\n",
+ bmp_info.width, bmp_info.height, bmp_info.ncols);
+ return(1);
+ }
+
+ /* read palette */
+ for (pind = 0; pind < bmp_info.ncols; pind++) {
+ bmp_info.palette[pind][0] = bmf->bmfi.bmiColors[pind].rgbRed;
+ bmp_info.palette[pind][1] = bmf->bmfi.bmiColors[pind].rgbGreen;
+ bmp_info.palette[pind][2] = bmf->bmfi.bmiColors[pind].rgbBlue;
+ }
+ return(0);
+}
+
+/*
+** bmp_Draw
+**
+** Render the image. Return nonzero if that's not possible.
+**
+*/
+static int
+bmp_Draw(video_adapter_t *adp)
+{
+ int line;
+#if 0
+#ifndef PC98
+ int i;
+#endif
+#endif
+
+ if (bmp_info.data == NULL) { /* init failed, do nothing */
+ return(1);
+ }
+
+ /* clear the screen */
+ bmp_info.vidmem = (u_char *)adp->va_window;
+ bmp_info.adp = adp;
+ (*vidsw[adp->va_index]->clear)(adp);
+ (*vidsw[adp->va_index]->set_win_org)(adp, 0);
+ bmp_info.bank = 0;
+
+ /* initialise the info structure for drawing */
+ bmp_info.index = bmp_info.data;
+#ifdef PC98
+ bmp_info.prev_val = 255;
+#endif
+
+ /* set the palette for our image */
+ (*vidsw[adp->va_index]->load_palette)(adp, (u_char *)&bmp_info.palette);
+
+#if 0
+#ifndef PC98
+ /* XXX: this is ugly, but necessary for EGA/VGA 1bpp/4bpp modes */
+ if ((adp->va_type == KD_EGA) || (adp->va_type == KD_VGA)) {
+ inb(adp->va_crtc_addr + 6); /* reset flip-flop */
+ outb(ATC, 0x14);
+ outb(ATC, 0);
+ for (i = 0; i < 16; ++i) {
+ outb(ATC, i);
+ outb(ATC, i);
+ }
+ inb(adp->va_crtc_addr + 6); /* reset flip-flop */
+ outb(ATC, 0x20); /* enable palette */
+
+ outw(GDCIDX, 0x0f01); /* set/reset enable */
+
+ if (bmp_info.sdepth == 1)
+ outw(TSIDX, 0x0102); /* unmask plane #0 */
+ }
+#endif
+#endif
+
+ for (line = 0; (line < bmp_info.height) && bmp_info.index; line++) {
+ bmp_DecodeLine(&bmp_info, line);
+ }
+ return(0);
+}
diff --git a/sys/dev/fb/splash_pcx.c b/sys/dev/fb/splash_pcx.c
new file mode 100644
index 000000000000..e67bb244e4a1
--- /dev/null
+++ b/sys/dev/fb/splash_pcx.c
@@ -0,0 +1,271 @@
+/*-
+ * Copyright (c) 1999 Michael Smith <msmith@freebsd.org>
+ * Copyright (c) 1999 Kazutaka YOKOTA <yokota@freebsd.org>
+ * Copyright (c) 1999 Dag-Erling Coïdan Smørgrav
+ * All rights reserved.
+ *
+ * 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
+ * in this position and unchanged.
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/linker.h>
+#include <sys/module.h>
+#include <sys/fbio.h>
+
+#include <dev/fb/fbreg.h>
+#include <dev/fb/splashreg.h>
+
+static int splash_mode = -1;
+static int splash_on = FALSE;
+
+static int pcx_start(video_adapter_t *adp);
+static int pcx_end(video_adapter_t *adp);
+static int pcx_splash(video_adapter_t *adp, int on);
+static int pcx_init(void *data, int sdepth);
+static int pcx_draw(video_adapter_t *adp);
+
+static splash_decoder_t pcx_decoder = {
+ .name = "splash_pcx",
+ .init = pcx_start,
+ .term = pcx_end,
+ .splash = pcx_splash,
+ .data_type = SPLASH_IMAGE,
+};
+
+SPLASH_DECODER(splash_pcx, pcx_decoder);
+
+static struct {
+ int width;
+ int height;
+ int bpsl;
+ int bpp;
+ int planes;
+ int zlen;
+ const uint8_t *zdata;
+ uint8_t *palette;
+} pcx_info;
+
+static int
+pcx_start(video_adapter_t *adp)
+{
+ static int modes[] = {
+ M_VGA_CG320,
+ M_VESA_CG640x480,
+ M_VESA_CG800x600,
+ M_VESA_CG1024x768,
+ -1,
+ };
+ video_info_t info;
+ int i;
+
+ if (pcx_decoder.data == NULL ||
+ pcx_decoder.data_size <= 0 ||
+ pcx_init(pcx_decoder.data, pcx_decoder.data_size))
+ return (ENODEV);
+
+ if (bootverbose)
+ printf("splash_pcx: image good:\n"
+ " width = %d\n"
+ " height = %d\n"
+ " depth = %d\n"
+ " planes = %d\n",
+ pcx_info.width, pcx_info.height,
+ pcx_info.bpp, pcx_info.planes);
+
+ for (i = 0; modes[i] >= 0; ++i) {
+ if (get_mode_info(adp, modes[i], &info) != 0)
+ continue;
+ if (bootverbose)
+ printf("splash_pcx: considering mode %d:\n"
+ " vi_width = %d\n"
+ " vi_height = %d\n"
+ " vi_depth = %d\n"
+ " vi_planes = %d\n",
+ modes[i],
+ info.vi_width, info.vi_height,
+ info.vi_depth, info.vi_planes);
+ if (info.vi_width >= pcx_info.width
+ && info.vi_height >= pcx_info.height
+ && info.vi_depth == pcx_info.bpp
+ && info.vi_planes == pcx_info.planes)
+ break;
+ }
+
+ splash_mode = modes[i];
+ if (splash_mode == -1)
+ return (ENODEV);
+ if (bootverbose)
+ printf("splash_pcx: selecting mode %d\n", splash_mode);
+ return (0);
+}
+
+static int
+pcx_end(video_adapter_t *adp)
+{
+ /* nothing to do */
+ return (0);
+}
+
+static int
+pcx_splash(video_adapter_t *adp, int on)
+{
+ if (on) {
+ if (!splash_on) {
+ if (set_video_mode(adp, splash_mode) || pcx_draw(adp))
+ return 1;
+ splash_on = TRUE;
+ }
+ return (0);
+ } else {
+ splash_on = FALSE;
+ return (0);
+ }
+}
+
+struct pcx_header {
+ uint8_t manufactor;
+ uint8_t version;
+ uint8_t encoding;
+ uint8_t bpp;
+ uint16_t xmin;
+ uint16_t ymin;
+ uint16_t xmax;
+ uint16_t ymax;
+ uint16_t hres;
+ uint16_t vres;
+ uint8_t colormap[48];
+ uint8_t rsvd;
+ uint8_t nplanes;
+ uint16_t bpsl;
+ uint16_t palinfo;
+ uint16_t hsize;
+ uint16_t vsize;
+};
+
+#define MAXSCANLINE 1024
+
+static int
+pcx_init(void *data, int size)
+{
+ const struct pcx_header *hdr = data;
+
+ if (size < 128 + 1 + 1 + 768 ||
+ hdr->manufactor != 10 ||
+ hdr->version != 5 ||
+ hdr->encoding != 1 ||
+ hdr->nplanes != 1 ||
+ hdr->bpp != 8 ||
+ hdr->bpsl > MAXSCANLINE ||
+ ((uint8_t *)data)[size - 769] != 12) {
+ printf("splash_pcx: invalid PCX image\n");
+ return (1);
+ }
+ pcx_info.width = hdr->xmax - hdr->xmin + 1;
+ pcx_info.height = hdr->ymax - hdr->ymin + 1;
+ pcx_info.bpsl = hdr->bpsl;
+ pcx_info.bpp = hdr->bpp;
+ pcx_info.planes = hdr->nplanes;
+ pcx_info.zlen = size - (128 + 1 + 768);
+ pcx_info.zdata = (uint8_t *)data + 128;
+ pcx_info.palette = (uint8_t *)data + size - 768;
+ return (0);
+}
+
+static int
+pcx_draw(video_adapter_t *adp)
+{
+ uint8_t *vidmem;
+ int swidth, sheight, sbpsl, sdepth, splanes;
+ int banksize, origin;
+ int c, i, j, pos, scan, x, y;
+ uint8_t line[MAXSCANLINE];
+
+ if (pcx_info.zlen < 1)
+ return (1);
+
+ load_palette(adp, pcx_info.palette);
+
+ vidmem = (uint8_t *)adp->va_window;
+ swidth = adp->va_info.vi_width;
+ sheight = adp->va_info.vi_height;
+ sbpsl = adp->va_line_width;
+ sdepth = adp->va_info.vi_depth;
+ splanes = adp->va_info.vi_planes;
+ banksize = adp->va_window_size;
+
+ for (origin = 0; origin < sheight*sbpsl; origin += banksize) {
+ set_origin(adp, origin);
+ bzero(vidmem, banksize);
+ }
+
+ x = (swidth - pcx_info.width) / 2;
+ y = (sheight - pcx_info.height) / 2;
+ origin = 0;
+ pos = y * sbpsl + x;
+ while (pos > banksize) {
+ pos -= banksize;
+ origin += banksize;
+ }
+ set_origin(adp, origin);
+
+ for (scan = i = 0; scan < pcx_info.height; ++scan, ++y, pos += sbpsl) {
+ for (j = 0; j < pcx_info.bpsl && i < pcx_info.zlen; ++i) {
+ if ((pcx_info.zdata[i] & 0xc0) == 0xc0) {
+ c = pcx_info.zdata[i++] & 0x3f;
+ if (i >= pcx_info.zlen)
+ return (1);
+ } else {
+ c = 1;
+ }
+ if (j + c > pcx_info.bpsl)
+ return (1);
+ while (c--)
+ line[j++] = pcx_info.zdata[i];
+ }
+
+ if (pos > banksize) {
+ origin += banksize;
+ pos -= banksize;
+ set_origin(adp, origin);
+ }
+
+ if (pos + pcx_info.width > banksize) {
+ /* scanline crosses bank boundary */
+ j = banksize - pos;
+ bcopy(line, vidmem + pos, j);
+ origin += banksize;
+ pos -= banksize;
+ set_origin(adp, origin);
+ bcopy(line + j, vidmem, pcx_info.width - j);
+ } else {
+ bcopy(line, vidmem + pos, pcx_info.width);
+ }
+ }
+
+ return (0);
+}
diff --git a/sys/dev/fb/splashreg.h b/sys/dev/fb/splashreg.h
new file mode 100644
index 000000000000..36ba9a708d89
--- /dev/null
+++ b/sys/dev/fb/splashreg.h
@@ -0,0 +1,107 @@
+/*-
+ * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
+ * All rights reserved.
+ *
+ * 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 as
+ * the first lines of this file unmodified.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _DEV_FB_SPLASHREG_H_
+#define _DEV_FB_SPLASHREG_H_
+
+#define SPLASH_IMAGE "splash_image_data"
+
+struct video_adapter;
+
+struct image_decoder {
+ char *name;
+ int (*init)(struct video_adapter *adp);
+ int (*term)(struct video_adapter *adp);
+ int (*splash)(struct video_adapter *adp, int on);
+ char *data_type;
+ void *data;
+ size_t data_size;
+};
+
+typedef struct image_decoder splash_decoder_t;
+typedef struct image_decoder scrn_saver_t;
+
+#define SPLASH_DECODER(name, sw) \
+ static int name##_modevent(module_t mod, int type, void *data) \
+ { \
+ switch ((modeventtype_t)type) { \
+ case MOD_LOAD: \
+ return splash_register(&sw); \
+ case MOD_UNLOAD: \
+ return splash_unregister(&sw); \
+ default: \
+ return EOPNOTSUPP; \
+ break; \
+ } \
+ return 0; \
+ } \
+ static moduledata_t name##_mod = { \
+ #name, \
+ name##_modevent, \
+ NULL \
+ }; \
+ DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_ANY); \
+ MODULE_DEPEND(name, splash, 1, 1, 1)
+
+#define SAVER_MODULE(name, sw) \
+ static int name##_modevent(module_t mod, int type, void *data) \
+ { \
+ switch ((modeventtype_t)type) { \
+ case MOD_LOAD: \
+ return splash_register(&sw); \
+ case MOD_UNLOAD: \
+ return splash_unregister(&sw); \
+ default: \
+ return EOPNOTSUPP; \
+ break; \
+ } \
+ return 0; \
+ } \
+ static moduledata_t name##_mod = { \
+ #name, \
+ name##_modevent, \
+ NULL \
+ }; \
+ DECLARE_MODULE(name, name##_mod, SI_SUB_PSEUDO, SI_ORDER_MIDDLE); \
+ MODULE_DEPEND(name, splash, 1, 1, 1)
+
+/* entry point for the splash image decoder */
+int splash_register(splash_decoder_t *decoder);
+int splash_unregister(splash_decoder_t *decoder);
+
+/* entry points for the console driver */
+int splash_init(video_adapter_t *adp, int (*callback)(int, void *),
+ void *arg);
+int splash_term(video_adapter_t *adp);
+int splash(video_adapter_t *adp, int on);
+
+/* event types for the callback function */
+#define SPLASH_INIT 0
+#define SPLASH_TERM 1
+
+#endif /* _DEV_FB_SPLASHREG_H_ */
diff --git a/sys/dev/fb/tga.c b/sys/dev/fb/tga.c
new file mode 100644
index 000000000000..bfd7ce4c4e29
--- /dev/null
+++ b/sys/dev/fb/tga.c
@@ -0,0 +1,2447 @@
+/*-
+ * Copyright (c) 2000, 2001 Andrew Miklic, Andrew Gallatin, Peter Jeremy,
+ * and Thomas V. Crimi
+ * All rights reserved.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+/*-
+ * 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/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <machine/stdarg.h>
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+#include <sys/conf.h>
+#include <sys/proc.h>
+#include <sys/fcntl.h>
+#include <sys/malloc.h>
+#include <sys/fbio.h>
+#include <sys/consio.h>
+
+#include <isa/isareg.h>
+#include <dev/fb/vgareg.h>
+
+#include <vm/vm.h>
+#include <vm/vm_param.h>
+#include <vm/pmap.h>
+
+#include <machine/md_var.h>
+#include <machine/pc/bios.h>
+#include <machine/clock.h>
+#include <machine/bus.h>
+#include <machine/pc/vesa.h>
+#include <machine/resource.h>
+#include <machine/rpb.h>
+
+#include <sys/bus.h>
+#include <sys/rman.h>
+
+#include <dev/pci/pcireg.h>
+#include <dev/pci/pcivar.h>
+
+#include <dev/fb/fbreg.h>
+#include <dev/syscons/syscons.h>
+#include <dev/fb/gfb.h>
+#include <dev/gfb/gfb_pci.h>
+#include <dev/fb/tga.h>
+#include <dev/tga/tga_pci.h>
+
+#include "opt_fb.h"
+
+/* TGA-specific FB video driver function declarations */
+static int tga_error(void);
+static vi_init_t tga_init;
+static void tga2_init(struct gfb_softc *, int);
+
+/* TGA-specific functionality. */
+static gfb_builtin_save_palette_t tga_builtin_save_palette;
+static gfb_builtin_load_palette_t tga_builtin_load_palette;
+#ifdef TGA2
+static gfb_builtin_save_palette_t tga2_builtin_save_palette;
+static gfb_builtin_load_palette_t tga2_builtin_load_palette;
+static gfb_builtin_save_cursor_palette_t tga2_builtin_save_cursor_palette;
+static gfb_builtin_load_cursor_palette_t tga2_builtin_load_cursor_palette;
+#endif
+static gfb_builtin_read_hw_cursor_t tga_builtin_read_hw_cursor;
+static gfb_builtin_set_hw_cursor_t tga_builtin_set_hw_cursor;
+static gfb_builtin_set_hw_cursor_shape_t tga_builtin_set_hw_cursor_shape;
+static void bt463_load_palette_intr(struct gfb_softc *);
+static void bt463_load_cursor_palette_intr(struct gfb_softc *);
+static int tga_schedule_intr(struct gfb_softc *, void (*)(struct gfb_softc *));
+
+/* RAMDAC interface functions */
+static gfb_ramdac_wr_t tga_bt485_wr;
+static gfb_ramdac_rd_t tga_bt485_rd;
+static gfb_ramdac_wr_t tga_bt463_wr;
+static gfb_ramdac_rd_t tga_bt463_rd;
+static gfb_ramdac_wr_t tga2_ibm561_wr;
+static gfb_ramdac_rd_t tga2_ibm561_rd;
+static void tga2_ics9110_wr(struct gfb_softc *, int);
+
+/* RAMDAC-specific functions */
+static gfb_ramdac_init_t bt463_init;
+static void bt463_update_window_type(struct gfb_softc *);
+#if 0
+static gfb_ramdac_save_palette_t bt463_save_palette;
+static gfb_ramdac_load_palette_t bt463_load_palette;
+#endif
+static gfb_ramdac_save_cursor_palette_t bt463_save_cursor_palette;
+static gfb_ramdac_load_cursor_palette_t bt463_load_cursor_palette;
+static gfb_ramdac_init_t bt485_init;
+static gfb_ramdac_save_palette_t bt485_save_palette;
+static gfb_ramdac_load_palette_t bt485_load_palette;
+static gfb_ramdac_save_cursor_palette_t bt485_save_cursor_palette;
+static gfb_ramdac_load_cursor_palette_t bt485_load_cursor_palette;
+static gfb_ramdac_read_hw_cursor_t bt485_read_hw_cursor;
+static gfb_ramdac_set_hw_cursor_t bt485_set_hw_cursor;
+static gfb_ramdac_set_hw_cursor_shape_t bt485_set_hw_cursor_shape;
+static gfb_ramdac_init_t ibm561_init;
+static gfb_ramdac_save_palette_t ibm561_save_palette;
+static gfb_ramdac_load_palette_t ibm561_load_palette;
+static gfb_ramdac_save_cursor_palette_t ibm561_save_cursor_palette;
+static gfb_ramdac_load_cursor_palette_t ibm561_load_cursor_palette;
+
+/* Video Driver-generic functions */
+static vi_query_mode_t tga_query_mode;
+static vi_set_mode_t tga_set_mode;
+static vi_blank_display_t tga_blank_display;
+#if 0
+static vi_ioctl_t tga_ioctl;
+#endif
+static vi_set_border_t tga_set_border;
+static vi_set_win_org_t tga_set_win_org;
+static vi_fill_rect_t tga_fill_rect;
+static vi_bitblt_t tga_bitblt;
+static vi_clear_t tga_clear;
+static vi_putc_t tga_putc;
+static vi_puts_t tga_puts;
+static vi_putm_t tga_putm;
+
+static video_switch_t tgavidsw = {
+ gfb_probe,
+ tga_init,
+ gfb_get_info,
+ tga_query_mode,
+ tga_set_mode,
+ gfb_save_font,
+ gfb_load_font,
+ gfb_show_font,
+ gfb_save_palette,
+ gfb_load_palette,
+ tga_set_border,
+ gfb_save_state,
+ gfb_load_state,
+ tga_set_win_org,
+ gfb_read_hw_cursor,
+ gfb_set_hw_cursor,
+ gfb_set_hw_cursor_shape,
+ tga_blank_display,
+ gfb_mmap,
+ gfb_ioctl,
+ tga_clear,
+ tga_fill_rect,
+ tga_bitblt,
+ tga_error,
+ tga_error,
+ gfb_diag,
+ gfb_save_cursor_palette,
+ gfb_load_cursor_palette,
+ gfb_copy,
+ gfb_putp,
+ tga_putc,
+ tga_puts,
+ tga_putm,
+};
+
+VIDEO_DRIVER(tga, tgavidsw, NULL);
+
+extern sc_rndr_sw_t txtrndrsw;
+RENDERER(tga, 0, txtrndrsw, gfb_set);
+
+#ifdef SC_PIXEL_MODE
+extern sc_rndr_sw_t gfbrndrsw;
+RENDERER(tga, PIXEL_MODE, gfbrndrsw, gfb_set);
+#endif /* SC_PIXEL_MODE */
+
+#ifndef SC_NO_MODE_CHANGE
+extern sc_rndr_sw_t grrndrsw;
+RENDERER(tga, GRAPHICS_MODE, grrndrsw, gfb_set);
+#endif /* SC_NO_MODE_CHANGE */
+
+RENDERER_MODULE(tga, gfb_set);
+
+#define MHz * 1000000
+#define KHz * 1000
+
+extern struct gfb_softc *gfb_device_softcs[2][MAX_NUM_GFB_CARDS];
+
+/*
+ The following 3 variables exist only because we need statically
+ allocated structures very early in boot to support tga_configure()...
+*/
+extern struct gfb_softc console;
+extern video_adapter_t console_adp;
+extern struct gfb_conf console_gfbc;
+extern u_char console_palette_red[256];
+extern u_char console_palette_green[256];
+extern u_char console_palette_blue[256];
+extern u_char console_cursor_palette_red[3];
+extern u_char console_cursor_palette_green[3];
+extern u_char console_cursor_palette_blue[3];
+
+static struct monitor decmonitors[] = {
+ /* 0x0: 1280 x 1024 @ 72Hz */
+ { 1280, 32, 160, 232,
+ 1024, 3, 3, 33,
+ 130808 KHz },
+
+ /* 0x1: 1280 x 1024 @ 66Hz */
+ { 1280, 32, 160, 232,
+ 1024, 3, 3, 33,
+ 119840 KHz },
+
+ /* 0x2: 1280 x 1024 @ 60Hz */
+ { 1280, 44, 184, 200,
+ 1024, 3, 3, 26,
+ 108180 KHz },
+
+ /* 0x3: 1152 x 900 @ 72Hz */
+ { 1152, 64, 112, 176,
+ 900, 6, 10, 44,
+ 103994 KHz },
+
+ /* 0x4: 1600 x 1200 @ 65Hz */
+ { 1600, 32, 192, 336,
+ 1200, 1, 3, 46,
+ 175 MHz },
+
+ /* 0x5: 1024 x 768 @ 70Hz */
+ { 1024, 24, 136, 144,
+ 768, 3, 6, 29,
+ 75 MHz },
+
+ /* 0x6: 1024 x 768 @ 72Hz */
+ { 1024, 16, 128, 128,
+ 768, 1, 6, 22,
+ 74 MHz },
+
+ /* 0x7: 1024 x 864 @ 60Hz */
+ { 1024, 12, 128, 116,
+ 864, 0, 3, 34,
+ 69 MHz },
+
+ /* 0x8: 1024 x 768 @ 60Hz */
+ { 1024, 56, 64, 200,
+ 768, 7, 9, 26,
+ 65 MHz },
+
+ /* 0x9: 800 x 600 @ 72Hz */
+ { 800, 56, 120, 64,
+ 600, 37, 6, 23,
+ 50 MHz },
+
+ /* 0xa: 800 x 600 @ 60Hz */
+ { 800, 40, 128, 88,
+ 600, 1, 4, 23,
+ 40 MHz },
+
+ /* 0xb: 640 x 480 @ 72Hz */
+ { 640, 24, 40, 128,
+ 480, 9, 3, 28,
+ 31500 KHz },
+
+ /* 0xc: 640 x 480 @ 60Hz */
+ { 640, 16, 96, 48,
+ 480, 10, 2, 33,
+ 25175 KHz },
+
+ /* 0xd: 1280 x 1024 @ 75Hz */
+ { 1280, 16, 144, 248,
+ 1024, 1, 3, 38,
+ 135 MHz },
+
+ /* 0xe: 1280 x 1024 @ 60Hz */
+ { 1280, 19, 163, 234,
+ 1024, 6, 7, 44,
+ 110 MHz },
+
+ /* 0xf: 1600 x 1200 @ 75Hz */
+ /* XXX -- this one's weird. rcd */
+ { 1600, 32, 192, 336,
+ 1200, 1, 3, 46,
+ 202500 KHz }
+};
+
+#undef MHz
+#undef KHz
+
+#undef KB
+#define KB * 1024
+#undef MB
+#define MB * 1024 * 1024
+
+/*
+ * These are the 16 default VGA colors--these are replicated 16 times as the
+ * initial (default) color-map. The text rendering functions use entries
+ * 0..15 for normal foreground/background colors. The entries 128..255 are
+ * used for blinking entries--when "on," they contain the foreground color
+ * entries; when "off," they contain the background color entries...
+ */
+static const struct cmap {
+ u_char red;
+ u_char green;
+ u_char blue;
+} default_cmap[16] = {
+ {0x00, 0x00, 0x00}, /* Black */
+ {0x00, 0x00, 0xff}, /* Blue */
+ {0x00, 0xff, 0x00}, /* Green */
+ {0x00, 0xc0, 0xc0}, /* Cyan */
+ {0xff, 0x00, 0x00}, /* Red */
+ {0xc0, 0x00, 0xc0}, /* Magenta */
+ {0xc0, 0xc0, 0x00}, /* Brown */
+ {0xc0, 0xc0, 0xc0}, /* Light Grey */
+ {0x80, 0x80, 0x80}, /* Dark Grey */
+ {0x80, 0x80, 0xff}, /* Light Blue */
+ {0x80, 0xff, 0x80}, /* Light Green */
+ {0x80, 0xff, 0xff}, /* Light Cyan */
+ {0xff, 0x80, 0x80}, /* Light Red */
+ {0xff, 0x80, 0xff}, /* Light Magenta */
+ {0xff, 0xff, 0x80}, /* Yellow */
+ {0xff, 0xff, 0xff} /* White */
+};
+
+extern struct gfb_font bold8x16;
+
+/*****************************************************************************
+ *
+ * FB-generic functions
+ *
+ ****************************************************************************/
+
+static int
+tga_init(int unit, video_adapter_t *adp, int flags)
+{
+ struct gfb_softc *sc;
+ struct gfb_conf *gfbc;
+ unsigned int monitor;
+ int card_type;
+ int gder;
+ int deep;
+ int addrmask;
+ int cs;
+ int error;
+ gfb_reg_t ccbr;
+
+ /* Assume the best... */
+ error = 0;
+
+ sc = gfb_device_softcs[adp->va_model][unit];
+ gfbc = sc->gfbc;
+
+ /* Initialize palette counts... */
+ gfbc->palette.count = 256;
+ gfbc->cursor_palette.count = 3;
+
+ /* Initialize the adapter... */
+ gder = BASIC_READ_TGA_REGISTER(adp, TGA_REG_GDER);
+ addrmask = (gder & GDER_ADDR_MASK) >> GDER_ADDR_SHIFT;
+ deep = (gder & GDER_DEEP) != 0;
+ cs = (gder & GDER_CS) == 0;
+ card_type = TGA_TYPE_UNKNOWN;
+ adp->va_little_bitian = 1;
+ adp->va_little_endian = 0;
+ adp->va_initial_mode = 0;
+ adp->va_initial_bios_mode = 0;
+ adp->va_mode = 0;
+ adp->va_info.vi_mem_model = V_INFO_MM_TEXT;
+ adp->va_info.vi_mode = M_VGA_M80x30;
+ adp->va_info.vi_flags = V_INFO_COLOR;
+ adp->va_buffer = adp->va_mem_base;
+ adp->va_buffer_size = 4 MB * (1 + addrmask);
+ adp->va_registers = adp->va_buffer + TGA_REG_SPACE_OFFSET;
+ adp->va_registers_size = 2 KB;
+ adp->va_window = adp->va_buffer + (adp->va_buffer_size / 2);
+ adp->va_info.vi_window = vtophys(adp->va_window);
+ adp->va_window_size = (deep ? 4 MB : 2 MB);
+ adp->va_info.vi_window_size = adp->va_window_size;
+ adp->va_window_gran = adp->va_window_size;
+ adp->va_info.vi_window_gran = adp->va_window_gran;
+ adp->va_info.vi_buffer = vtophys(adp->va_buffer);
+ adp->va_info.vi_buffer_size = adp->va_buffer_size;
+ adp->va_disp_start.x = 0;
+ adp->va_disp_start.y = 0;
+ adp->va_info.vi_depth = (deep ? 32 : 8);
+ adp->va_info.vi_planes = adp->va_info.vi_depth / 8;
+ adp->va_info.vi_width = (READ_GFB_REGISTER(adp, TGA_REG_VHCR) &
+ VHCR_ACTIVE_MASK);
+ adp->va_info.vi_width |= (READ_GFB_REGISTER(adp, TGA_REG_VHCR) &
+ 0x30000000) >> 19;
+ switch(adp->va_info.vi_width) {
+ case 0:
+ adp->va_info.vi_width = 8192;
+ break;
+ case 1:
+ adp->va_info.vi_width = 8196;
+ break;
+ default:
+ adp->va_info.vi_width *= 4;
+ break;
+ }
+ adp->va_info.vi_height = (READ_GFB_REGISTER(adp, TGA_REG_VVCR) &
+ VVCR_ACTIVE_MASK);
+ adp->va_line_width = adp->va_info.vi_width * adp->va_info.vi_depth / 8;
+ if(READ_GFB_REGISTER(adp, TGA_REG_VHCR) & VHCR_ODD)
+ adp->va_info.vi_width -= 4;
+
+ /*
+ Set the video base address and the cursor base address to
+ something known such that the video base address is at
+ least 1 KB past the cursor base address (the cursor is 1 KB
+ in size, so leave room for it)...we pick 4 KB and 0 KB,
+ respectively, since they begin at the top of the framebuffer
+ for minimal fragmentation of the address space, and this will
+ always leave enough room for the cursor for all implementations...
+ */
+
+ /* Set the video base address... */
+ tga_set_win_org(sc->adp, 4 KB);
+
+ /* Set the cursor base address... */
+ ccbr = READ_GFB_REGISTER(sc->adp, TGA_REG_CCBR);
+ ccbr = (ccbr & 0xfffffc0f) | (0 << 4);
+ WRITE_GFB_REGISTER(sc->adp, TGA_REG_CCBR, ccbr);
+
+ /* Type the card... */
+ if(adp->va_type == KD_TGA) {
+ if(!deep) {
+
+ /* 8bpp frame buffer */
+ gfbc->ramdac_name = "BT485";
+ gfbc->ramdac_init = bt485_init;
+ gfbc->ramdac_rd = tga_bt485_rd;
+ gfbc->ramdac_wr = tga_bt485_wr;
+ gfbc->ramdac_save_palette = bt485_save_palette;
+ gfbc->ramdac_load_palette = bt485_load_palette;
+ gfbc->ramdac_save_cursor_palette =
+ bt485_save_cursor_palette;
+ gfbc->ramdac_load_cursor_palette =
+ bt485_load_cursor_palette;
+ gfbc->ramdac_read_hw_cursor = bt485_read_hw_cursor;
+ gfbc->ramdac_set_hw_cursor = bt485_set_hw_cursor;
+ gfbc->ramdac_set_hw_cursor_shape =
+ bt485_set_hw_cursor_shape;
+
+ if(addrmask == GDER_ADDR_4MB) {
+
+ /* 4MB core map; T8-01 or T8-02 */
+ if(!cs) {
+ card_type = TGA_TYPE_T8_01;
+ gfbc->name = "T8-01";
+ } else {
+ card_type = TGA_TYPE_T8_02;
+ gfbc->name = "T8-02";
+ }
+ } else if(addrmask == GDER_ADDR_8MB) {
+
+ /* 8MB core map; T8-22 */
+ if(cs) {/* sanity */
+ card_type = TGA_TYPE_T8_22;
+ gfbc->name = "T8-22";
+ }
+ } else if(addrmask == GDER_ADDR_16MB) {
+
+ /* 16MB core map; T8-44 */
+ if(cs) {/* sanity */
+ card_type = TGA_TYPE_T8_44;
+ gfbc->name = "T8-44";
+ }
+ } else if(addrmask == GDER_ADDR_32MB) {
+
+ /* 32MB core map; ??? */
+ card_type = TGA_TYPE_UNKNOWN;
+ }
+ } else {
+
+ /* 32bpp frame buffer */
+ gfbc->ramdac_name = "BT463";
+ gfbc->ramdac_init = bt463_init;
+ gfbc->ramdac_rd = tga_bt463_rd;
+ gfbc->ramdac_wr = tga_bt463_wr;
+ gfbc->builtin_save_palette = tga_builtin_save_palette;
+ gfbc->builtin_load_palette = tga_builtin_load_palette;
+ gfbc->ramdac_save_cursor_palette =
+ bt463_save_cursor_palette;
+ gfbc->ramdac_load_cursor_palette =
+ bt463_load_cursor_palette;
+ gfbc->builtin_read_hw_cursor =
+ tga_builtin_read_hw_cursor;
+ gfbc->builtin_set_hw_cursor = tga_builtin_set_hw_cursor;
+ gfbc->builtin_set_hw_cursor_shape =
+ tga_builtin_set_hw_cursor_shape;
+
+ /* 32bpp frame buffer */
+ if(addrmask == GDER_ADDR_4MB) {
+
+ /* 4MB core map; ??? */
+ card_type = TGA_TYPE_UNKNOWN;
+ } else if(addrmask == GDER_ADDR_8MB) {
+
+ /* 8MB core map; ??? */
+ card_type = TGA_TYPE_UNKNOWN;
+ } else if(addrmask == GDER_ADDR_16MB) {
+
+ /* 16MB core map; T32-04 or T32-08 */
+ if(!cs) {
+ card_type = TGA_TYPE_T32_04;
+ gfbc->name = "T32-04";
+ } else {
+ card_type = TGA_TYPE_T32_08;
+ gfbc->name = "T32-08";
+ }
+ } else if(addrmask == GDER_ADDR_32MB) {
+
+ /* 32MB core map; T32-88 */
+ if(cs) {/* sanity */
+ card_type = TGA_TYPE_T32_88;
+ gfbc->name = "T32-88";
+ }
+ }
+ }
+ }
+ else if(adp->va_type == KD_TGA2) {
+ gfbc->ramdac_name = "IBM561";
+ gfbc->ramdac_init = ibm561_init;
+ gfbc->ramdac_rd = tga2_ibm561_rd;
+ gfbc->ramdac_wr = tga2_ibm561_wr;
+ gfbc->ramdac_save_palette = ibm561_save_palette;
+ gfbc->ramdac_load_palette = ibm561_load_palette;
+ gfbc->ramdac_save_cursor_palette = ibm561_save_cursor_palette;
+ gfbc->ramdac_load_cursor_palette = ibm561_load_cursor_palette;
+ gfbc->builtin_read_hw_cursor = tga_builtin_read_hw_cursor;
+ gfbc->builtin_set_hw_cursor = tga_builtin_set_hw_cursor;
+ gfbc->builtin_set_hw_cursor_shape =
+ tga_builtin_set_hw_cursor_shape;
+
+ /* 4MB core map */
+ if(addrmask == GDER_ADDR_4MB)
+ card_type = TGA_TYPE_UNKNOWN;
+
+ /* 8MB core map */
+ else if(addrmask == GDER_ADDR_8MB) {
+ card_type = TGA2_TYPE_3D30;
+ gfbc->name = "3D30";
+ }
+
+ /* 16MB core map */
+ else if(addrmask == GDER_ADDR_16MB) {
+ card_type = TGA2_TYPE_4D20;
+ gfbc->name = "4D20";
+ }
+ else if(addrmask == GDER_ADDR_32MB)
+ card_type = TGA_TYPE_UNKNOWN;
+ }
+
+ /*
+ For now, just return for TGA2 cards (i.e.,
+ allow syscons to treat this device as a normal
+ VGA device, and don't do anything TGA2-specific,
+ e.g., only use the TGA2 card in VGA mode for now
+ as opposed to 2DA mode...
+ */
+ if(adp->va_type == KD_TGA2)
+ return(error);
+
+ /* If we couldn't identify the card, err-out... */
+ if(card_type == TGA_TYPE_UNKNOWN) {
+ printf("tga%d: Unknown TGA type\n", unit);
+ error = ENODEV;
+ goto done;
+ }
+
+ /* Clear and disable interrupts... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_SISR, 0x00000001);
+
+ /* Perform TGA2-specific initialization, if necessary... */
+ if(adp->va_type == KD_TGA2) {
+ monitor = (~READ_GFB_REGISTER(adp, TGA_REG_GREV) >> 16 ) & 0x0f;
+ tga2_init(sc, monitor);
+ }
+done:
+ return(error);
+}
+
+static void
+tga2_init(sc, monitor)
+ struct gfb_softc *sc;
+ int monitor;
+{
+ return;
+ tga2_ics9110_wr(sc, decmonitors[monitor].dotclock);
+ WRITE_GFB_REGISTER(sc->adp, TGA_REG_VHCR,
+ ((decmonitors[monitor].hbp / 4) << VHCR_BPORCH_SHIFT) |
+ ((decmonitors[monitor].hsync / 4) << VHCR_HSYNC_SHIFT) |
+ (((decmonitors[monitor].hfp) / 4) << VHCR_FPORCH_SHIFT) |
+ ((decmonitors[monitor].cols) / 4));
+ WRITE_GFB_REGISTER(sc->adp, TGA_REG_VVCR,
+ (decmonitors[monitor].vbp << VVCR_BPORCH_SHIFT) |
+ (decmonitors[monitor].vsync << VVCR_VSYNC_SHIFT) |
+ (decmonitors[monitor].vfp << VVCR_FPORCH_SHIFT) |
+ (decmonitors[monitor].rows));
+ WRITE_GFB_REGISTER(sc->adp, TGA_REG_VVBR, 1);
+ GFB_REGISTER_READWRITE_BARRIER(sc, TGA_REG_VHCR, 3);
+ WRITE_GFB_REGISTER(sc->adp, TGA_REG_VVVR,
+ READ_GFB_REGISTER(sc->adp, TGA_REG_VVVR) | 1);
+ GFB_REGISTER_READWRITE_BARRIER(sc, TGA_REG_VVVR, 1);
+ WRITE_GFB_REGISTER(sc->adp, TGA_REG_GPMR, 0xffffffff);
+ GFB_REGISTER_READWRITE_BARRIER(sc, TGA_REG_GPMR, 1);
+}
+
+static int
+tga_query_mode(video_adapter_t *adp, video_info_t *info)
+{
+ int error;
+
+ /* Assume the best... */
+ error = 0;
+
+ /* Verify that this mode is supported on this adapter... */
+ if(adp->va_type == KD_TGA2) {
+ if((info->vi_mode != TGA2_2DA_MODE) &&
+ (info->vi_mode != TGA2_VGA_MODE))
+ error = ENODEV;
+ }
+ else {
+ if(info->vi_mode != 0)
+ error = ENODEV;
+ }
+ return(error);
+}
+
+static int
+tga_set_mode(video_adapter_t *adp, int mode)
+{
+ int error;
+ gfb_reg_t gder;
+ gfb_reg_t vgae_mask;
+
+ /* Assume the best... */
+ error = 0;
+
+ gder = READ_GFB_REGISTER(adp, TGA_REG_GDER);
+
+ /*
+ Determine the adapter type first
+ so we know which modes are valid for it...
+ */
+ switch(adp->va_type) {
+ case KD_TGA2:
+
+ /*
+ Verify that this mode is supported
+ on this adapter...
+ */
+ switch(mode) {
+ case TGA2_2DA_MODE:
+ vgae_mask = ~0x00400000;
+ WRITE_GFB_REGISTER(adp, TGA_REG_GDER,
+ gder & vgae_mask);
+ adp->va_mode = mode;
+ break;
+ case TGA2_VGA_MODE:
+ vgae_mask = 0x00400000;
+ WRITE_GFB_REGISTER(adp, TGA_REG_GDER,
+ gder | vgae_mask);
+ adp->va_mode = mode;
+ break;
+ default:
+ error = ENODEV;
+ }
+ break;
+ case KD_TGA:
+
+ /*
+ Verify that this mode is supported
+ on this adapter...
+ */
+ switch(mode) {
+ case 0:
+ break;
+ default:
+ error = ENXIO;
+ }
+ break;
+ default:
+ error = ENODEV;
+ }
+ return(error);
+}
+
+static int
+tga_blank_display(video_adapter_t *adp, int mode)
+{
+ gfb_reg_t blanked;
+ int error;
+
+ /* Assume the best... */
+ error = 0;
+
+ blanked = READ_GFB_REGISTER(adp, TGA_REG_VVVR) &
+ (VVR_BLANK | VVR_VIDEOVALID | VVR_CURSOR);
+
+ /* If we're not already blanked, then blank...*/
+ switch(mode) {
+ case V_DISPLAY_BLANK:
+ if(blanked != (VVR_VIDEOVALID | VVR_BLANK)) {
+ blanked = VVR_VIDEOVALID | VVR_BLANK;
+ WRITE_GFB_REGISTER(adp, TGA_REG_VVVR, blanked);
+ }
+ break;
+ case V_DISPLAY_STAND_BY:
+ if(blanked != VVR_BLANK) {
+ blanked = VVR_BLANK;
+ WRITE_GFB_REGISTER(adp, TGA_REG_VVVR, blanked);
+ }
+ break;
+ case V_DISPLAY_ON:
+ if(blanked != (VVR_VIDEOVALID | VVR_CURSOR)) {
+ blanked = VVR_VIDEOVALID | VVR_CURSOR;
+ WRITE_GFB_REGISTER(adp, TGA_REG_VVVR, blanked);
+ }
+ break;
+ default:
+ break;
+ }
+ return(0);
+}
+
+#if 0
+
+static int
+tga_ioctl(video_adapter_t *adp, u_long cmd, caddr_t arg)
+{
+ struct gfb_softc *sc;
+ int error;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+ switch (cmd) {
+ case FBIOPUTCMAP:
+#if 0
+ tga_schedule_intr(sc, bt463_load_palette_intr);
+ break;
+#endif
+ case FBIO_GETWINORG:
+ case FBIO_SETWINORG:
+ case FBIO_SETDISPSTART:
+ case FBIO_SETLINEWIDTH:
+ case FBIO_GETPALETTE:
+ case FBIOGTYPE:
+ case FBIOGETCMAP:
+ default:
+ error = fb_commonioctl(adp, cmd, arg);
+ }
+ return(error);
+}
+
+#endif /* 0 */
+
+static int
+tga_set_border(video_adapter_t *adp, int color) {
+ return(ENODEV);
+}
+
+static int
+tga_set_win_org(video_adapter_t *adp, off_t offset) {
+ gfb_reg_t vvbr;
+ u_int16_t window_orig;
+ int gder;
+ int deep;
+ int cs;
+
+ /* Get the adapter's parameters... */
+ gder = BASIC_READ_TGA_REGISTER(adp, TGA_REG_GDER);
+ deep = (gder & 0x1) != 0;
+ cs = (gder & 0x200) == 0;
+
+ /*
+ Set the window (framebuffer) origin according to the video
+ base address...
+ */
+ window_orig = offset / ((1 + cs) * (1 + deep) * (1 + deep) * 2 KB);
+ adp->va_window_orig = window_orig * ((1 + cs) * (1 + deep) *
+ (1 + deep) * 2 KB);
+
+ /* Set the video base address... */
+ vvbr = READ_GFB_REGISTER(adp, TGA_REG_VVBR);
+ vvbr = (vvbr & 0xfffffe00) | window_orig;
+ WRITE_GFB_REGISTER(adp, TGA_REG_VVBR, vvbr);
+ return(0);
+}
+
+static int
+tga_fill_rect(video_adapter_t *adp, int val, int x, int y, int cx, int cy) {
+ int off;
+ gfb_reg_t gpxr;
+ gfb_reg_t gmor;
+ gfb_reg_t gbcr0;
+ gfb_reg_t gbcr1;
+ gfb_reg_t color;
+
+ /* Save the pixel mode... */
+ gmor = READ_GFB_REGISTER(adp, TGA_REG_GMOR);
+
+ /* Save the pixel mask... */
+ gpxr = READ_GFB_REGISTER(adp, TGA_REG_GPXR_P);
+
+ /* Save the block-color... */
+ gbcr0 = READ_GFB_REGISTER(adp, TGA_REG_GBCR0);
+ gbcr1 = READ_GFB_REGISTER(adp, TGA_REG_GBCR1);
+
+ /* Set the pixel mode (block-fill)... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GMOR,
+ (gmor & ~GMOR_MODE_MASK) | GMOR_MODE_BLK_FILL);
+
+ /* Set the pixel mask (enable writes to all pixels)... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GPXR_P, 0xffffffff);
+
+ color = ((val & 0xff00) << 24) || ((val & 0xff00) << 16) ||
+ ((val & 0xff00) << 8) || ((val & 0xff00) << 0);
+
+ /* Set the color for the block-fill... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GBCR0, color);
+ WRITE_GFB_REGISTER(adp, TGA_REG_GBCR1, color);
+
+ /*
+ Just traverse the buffer, one 2K-pixel span at a time, setting
+ each pixel to the bolck-color...
+ */
+ for(off = (x * y); off < ((x + cx) * (y + cy)); off += (2 KB))
+ WRITE_GFB_BUFFER(adp, off >> 2L, 0x000007ff);
+
+ /* Restore the pixel mode... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GPXR_P, gpxr);
+
+ /* Restore the pixel mask... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GMOR, gmor);
+
+ /* Restore the block-color... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GBCR0, gbcr0);
+ WRITE_GFB_REGISTER(adp, TGA_REG_GBCR1, gbcr1);
+
+ return(0);
+}
+
+static int
+tga_bitblt(video_adapter_t *adp, ...) {
+ va_list args;
+ int i, count;
+ gfb_reg_t gmor;
+ gfb_reg_t gopr;
+ vm_offset_t src, dst;
+
+ va_start(args, adp);
+
+ /* Save the pixel mode... */
+ gmor = READ_GFB_REGISTER(adp, TGA_REG_GMOR);
+
+ /* Save the raster op... */
+ gopr = READ_GFB_REGISTER(adp, TGA_REG_GOPR);
+
+ /* Set the pixel mode (copy)... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GMOR,
+ (gmor & ~GMOR_MODE_MASK) | GMOR_MODE_COPY);
+
+ /* Set the raster op (src)... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GOPR, (gopr & 0xfffffff0) | 0x3);
+
+ src = (va_arg(args, vm_offset_t) + adp->va_window_orig) &
+ 0x0000000000fffff8;
+ dst = (va_arg(args, vm_offset_t) + adp->va_window_orig) &
+ 0x0000000000fffff8;
+ count = va_arg(args, int);
+ for(i = 0; i < count; i+= 64, src += 64, dst += 64) {
+ WRITE_GFB_REGISTER(adp, TGA_REG_GCSR, src);
+ WRITE_GFB_REGISTER(adp, TGA_REG_GCDR, dst);
+ }
+
+ /* Restore the raster op... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GOPR, gopr);
+
+ /* Restore the pixel mode... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GMOR, gmor);
+
+ va_end(args);
+ return(0);
+}
+
+static int
+#if 0
+tga_clear(video_adapter_t *adp, int n)
+#else
+tga_clear(video_adapter_t *adp)
+#endif
+{
+ int off;
+ gfb_reg_t gpxr;
+ gfb_reg_t gmor;
+ gfb_reg_t gopr;
+
+#if 0
+ if(n == 0) return(0);
+#endif
+
+ /* Save the pixel mode... */
+ gmor = READ_GFB_REGISTER(adp, TGA_REG_GMOR);
+
+ /* Save the pixel mask... */
+ gpxr = READ_GFB_REGISTER(adp, TGA_REG_GPXR_P);
+
+ /* Save the raster op... */
+ gopr = READ_GFB_REGISTER(adp, TGA_REG_GOPR);
+
+ /* Set the pixel mode (opaque-fill)... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GMOR,
+ (gmor & ~GMOR_MODE_MASK) | GMOR_MODE_OPQ_FILL);
+
+ /* Set the pixel mask (enable writes to all pixels)... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GPXR_P, 0xffffffff);
+
+ /* Set the raster op (clear)... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GOPR, (gopr & 0xfffffff0) | 0x00);
+
+ /*
+ Just traverse the buffer, one 2K-pixel span at a time, clearing
+ each pixel...
+ */
+#if 0
+ for(off = 0; off < (n * adp->va_line_width); off += (2 KB))
+#endif
+ for(off = 0; off < adp->va_window_size; off += (2 KB))
+ WRITE_GFB_BUFFER(adp, off >> 2L, 0x000007ff);
+
+ /* Restore the pixel mask... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GPXR_P, gpxr);
+
+ /* Restore the raster op... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GOPR, gopr);
+
+ /* Restore the pixel mode... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GMOR, gmor);
+
+ return(0);
+}
+
+int
+tga_putc(video_adapter_t *adp, vm_offset_t off, u_int8_t c, u_int8_t a)
+{
+ int i;
+ gfb_reg_t gpxr;
+ gfb_reg_t gmor;
+ gfb_reg_t gopr;
+ gfb_reg_t gbgr;
+ gfb_reg_t gfgr;
+ gfb_reg_t mask;
+ int row, col;
+ u_int8_t *pixel;
+ vm_offset_t poff;
+ struct gfb_softc *sc;
+ int pixel_size;
+
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+ pixel_size = adp->va_info.vi_depth / 8;
+
+ /* Save the pixel mode... */
+ gmor = READ_GFB_REGISTER(adp, TGA_REG_GMOR);
+
+ /* Save the pixel mask... */
+ gpxr = READ_GFB_REGISTER(adp, TGA_REG_GPXR_P);
+
+ /* Save the raster op... */
+ gopr = READ_GFB_REGISTER(adp, TGA_REG_GOPR);
+
+ /* Save the background color... */
+ gbgr = READ_GFB_REGISTER(adp, TGA_REG_GBGR);
+
+ /* Save the foreground color... */
+ gfgr = READ_GFB_REGISTER(adp, TGA_REG_GFGR);
+
+ /* Set the pixel mode (opaque-stipple)... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GMOR,
+ (gmor & ~GMOR_MODE_MASK) | GMOR_MODE_OPQ_STPL);
+
+ /* Set the pixel mask (enable writes to the first cwidth pixels)... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GPXR_P,
+ (1 << adp->va_info.vi_cwidth) - 1);
+
+ /* Set the raster op (src)... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GOPR, (gopr & 0xfffffff0) | 0x3);
+
+ /* Set the foreground color mask from the attribute byte... */
+ mask = (a & 0x80) ? a : (a & 0x0f);
+
+ /* Propagate the 8-bit mask across the full 32 bits... */
+ mask |= (mask << 24) | (mask << 16) | (mask << 8);
+
+ /* Set the foreground color... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GFGR, mask);
+
+ /* Set the background color mask from the attribute byte... */
+ mask = (a >> 4) & 0x07;
+
+ /* Propagate the 8-bit mask across the full 32 bits... */
+ mask |= (mask << 24) | (mask << 16) | (mask << 8);
+
+ /* Set the background color... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GBGR, mask);
+
+ /* Get the start of the array of pixels rows for this character... */
+ pixel = sc->gfbc->font + (c * adp->va_info.vi_cheight);
+
+ /* Calculate the new cursor position... */
+ row = off / adp->va_info.vi_width;
+ col = off % adp->va_info.vi_width;
+
+ /* Iterate over all the pixel rows for this character... */
+ for(i = 0; i < adp->va_info.vi_cheight; i++) {
+
+ /* Get the address of the character's pixel-row... */
+ poff = ((col * adp->va_info.vi_cwidth * pixel_size) +
+ (((row * adp->va_info.vi_cheight) + i) *
+ adp->va_line_width)) / sizeof(gfb_reg_t);
+
+ /* Now display the current pixel row... */
+ WRITE_GFB_BUFFER(adp, poff, pixel[i]);
+ }
+
+ /* Restore the foreground color... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GFGR, gfgr);
+
+ /* Restore the background color... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GBGR, gbgr);
+
+ /* Restore the pixel mode... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GPXR_P, gpxr);
+
+ /* Restore the pixel mask... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GMOR, gmor);
+
+ /* Restore the raster op... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GOPR, gopr);
+
+ return(0);
+}
+
+int
+tga_puts(video_adapter_t *adp, vm_offset_t off, u_int16_t *s, int len)
+{
+ int i, j, k;
+ gfb_reg_t gpxr;
+ gfb_reg_t gmor;
+ gfb_reg_t gopr;
+ gfb_reg_t row, col;
+ u_int8_t *pixel;
+ u_int8_t c;
+ u_int8_t a;
+ gfb_reg_t p;
+ vm_offset_t poff;
+ struct gfb_softc *sc;
+ int pixel_size;
+
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+ pixel_size = adp->va_info.vi_depth / 8;
+
+ /* If the string in empty, just return now... */
+ if(len == 0) return(0);
+
+ for(i = 0; i < len; i++)
+ tga_putc(adp, off + i, s[i] & 0x00ff, (s[i] & 0xff00) >> 8);
+ return(0);
+
+ /* Save the pixel mode... */
+ gmor = READ_GFB_REGISTER(adp, TGA_REG_GMOR);
+
+ /* Save the pixel mask... */
+ gpxr = READ_GFB_REGISTER(adp, TGA_REG_GPXR_P);
+
+ /* Save the raster op... */
+ gopr = READ_GFB_REGISTER(adp, TGA_REG_GOPR);
+
+ /* Set the pixel mode (simple)... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GMOR, (gmor & 0xffffffc0) | 0x00);
+
+ /* Set the pixel mask (enable writes to all 32 pixels)... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GPXR_P, (gpxr & 0xfffffff0) | 0xf);
+
+ /* Set the raster op (src)... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GOPR, (gopr & 0xfffffff0) | 0x03);
+
+ /*
+ First, do as many characters-rows at a time as possible (as exist)...
+ */
+ for(i = 0; (len - i) > adp->va_info.vi_width;
+ i += adp->va_info.vi_width) {
+
+ /*
+ Iterate over all the pixels for each character in the
+ character-row, doing a scan-line at-a-time, rather than
+ a character at-a-time (like tga_putc())...
+ */
+ for(j = 0; j < adp->va_info.vi_cheight; j++) {
+ p = 0;
+ for(k = 0; k < adp->va_info.vi_width; k++) {
+
+ /*
+ Get this character...
+ */
+ c = s[i + k] & 0x00ff;
+
+ /*
+ Get the attribute for this character...
+ */
+ a = (s[i + k] & 0xff00) >> 8;
+
+ /*
+ Get the start of the array of pixels rows for
+ this character...
+ */
+ pixel = sc->gfbc->font +
+ (c * adp->va_info.vi_cheight);
+
+ /* Shift the other pre-existing pixel rows... */
+ p <<= 8;
+
+ /*
+ Get the first pixel row for
+ this character...
+ */
+ p |= pixel[j];
+
+ if (((k + 1) % sizeof(gfb_reg_t)) == 0) {
+
+ /*
+ Calculate the new cursor
+ position...
+ */
+ row = (off + i + (k -
+ (sizeof(gfb_reg_t) - 1))) /
+ adp->va_info.vi_width;
+ col = (off + i + (k -
+ (sizeof(gfb_reg_t) - 1))) %
+ adp->va_info.vi_width;
+
+ /*
+ Get the address of the current
+ character's pixel-row...
+ */
+ poff = ((col * adp->va_info.vi_cwidth *
+ pixel_size) + (((row *
+ adp->va_info.vi_cheight) + j) *
+ adp->va_line_width)) /
+ sizeof(gfb_reg_t);
+
+ /*
+ Now display the current
+ pixel row...
+ */
+ (*vidsw[adp->va_index]->putp)(adp, poff,
+ p, a, sizeof(gfb_reg_t),
+ adp->va_info.vi_depth, 1, 0);
+
+ /* Reset (clear) p... */
+ p = 0;
+ }
+ }
+ }
+ }
+
+ /*
+ Next, do as many character-sets at a time as possible (as exist)...
+ */
+ for(; (len - i) > sizeof(gfb_reg_t); i += sizeof(gfb_reg_t)) {
+
+ /*
+ Iterate over all the pixels for each character in the
+ character-row, doing a scan-line at-a-time, rather than
+ a character at-a-time (like tga_putc())...
+ */
+ for(j = 0; j < adp->va_info.vi_cheight; j++) {
+ p = 0;
+ for(k = 0; k < sizeof(gfb_reg_t); k++) {
+
+ /*
+ Get this character...
+ */
+ c = s[i + k] & 0x00ff;
+
+ /*
+ Get the attribute for this character...
+ */
+ a = (s[i + k] & 0xff00) >> 8;
+
+ /*
+ Get the start of the array of pixels rows for
+ this character...
+ */
+ pixel = sc->gfbc->font +
+ (c * adp->va_info.vi_cheight);
+
+ /* Shift the other pre-existing pixel rows... */
+ p <<= 8;
+
+ /*
+ Get the first pixel row for
+ this character...
+ */
+ p |= pixel[j];
+
+ if (((k + 1) % sizeof(gfb_reg_t)) == 0) {
+
+ /*
+ Calculate the new cursor
+ position...
+ */
+ row = (off + i) / adp->va_info.vi_width;
+ col = (off + i) % adp->va_info.vi_width;
+
+ /*
+ Get the address of the current
+ character's pixel-row...
+ */
+ poff = ((col * adp->va_info.vi_cwidth *
+ pixel_size) + (((row *
+ adp->va_info.vi_cheight) + j) *
+ adp->va_line_width)) /
+ sizeof(gfb_reg_t);
+
+ /*
+ Now display the current
+ pixel row...
+ */
+ (*vidsw[adp->va_index]->putp)(adp, poff,
+ p, a, sizeof(gfb_reg_t),
+ adp->va_info.vi_depth, 1, 0);
+
+ /* Reset (clear) p... */
+ p = 0;
+ }
+ }
+ }
+ }
+
+ /* Restore the pixel mode... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GPXR_P, gpxr);
+
+ /* Restore the pixel mask... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GMOR, gmor);
+
+ /* Restore the raster op... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GOPR, gopr);
+
+ /* Finally, do the remaining characters a character at-a-time... */
+ for(; i < len; i++) {
+ /*
+ Get this character...
+ */
+ c = s[i] & 0x00ff;
+
+ /*
+ Get the attribute for this character...
+ */
+ a = (s[i] & 0xff00) >> 8;
+
+ /*
+ Display this character...
+ */
+ tga_putc(adp, off + i, c, a);
+ }
+ return(0);
+}
+
+int
+tga_putm(video_adapter_t *adp, int x, int y, u_int8_t *pixel_image,
+ gfb_reg_t pixel_mask, int size, int width)
+{
+ gfb_reg_t gpxr;
+ gfb_reg_t gmor;
+ gfb_reg_t gopr;
+ int i, pixel_size;
+ vm_offset_t poff;
+
+ pixel_size = adp->va_info.vi_depth / 8;
+
+ /* Save the pixel mode... */
+ gmor = READ_GFB_REGISTER(adp, TGA_REG_GMOR);
+
+ /* Save the pixel mask... */
+ gpxr = READ_GFB_REGISTER(adp, TGA_REG_GPXR_P);
+
+ /* Save the raster op... */
+ gopr = READ_GFB_REGISTER(adp, TGA_REG_GOPR);
+
+ /* Set the pixel mode (simple)... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GMOR,
+ (gmor & ~GMOR_MODE_MASK) | GMOR_MODE_SIMPLE);
+
+ /* Set the pixel mask (enable writes to the first 8 pixels)... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GPXR_P, (gpxr & 0xfffffff0) | 0xf);
+
+ /* Set the raster op (src)... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GOPR, (gopr & 0xfffffff0) | 0x3);
+
+ /* Iterate over all the pixel rows for the mouse pointer... */
+ for(i = 0; i < size; i++) {
+
+ /* Get the address of the mouse pointer's pixel-row... */
+ poff = ((x * pixel_size) + ((y + i) * adp->va_line_width)) /
+ sizeof(gfb_reg_t);
+
+ /* Now display the current pixel-row... */
+ (*vidsw[adp->va_index]->putp)(adp, poff, pixel_image[i],
+ pixel_mask, sizeof(u_int8_t), adp->va_info.vi_depth, 1, 0);
+ }
+
+ /* Restore the pixel mode... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GPXR_P, gpxr);
+
+ /* Restore the pixel mask... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GMOR, gmor);
+
+ /* Restore the raster op... */
+ WRITE_GFB_REGISTER(adp, TGA_REG_GOPR, gopr);
+
+ return(0);
+}
+
+static int
+tga_error(void)
+{
+ return(0);
+}
+
+/*****************************************************************************
+ *
+ * TGA-specific functions
+ *
+ ****************************************************************************/
+
+static int
+tga_builtin_save_palette(video_adapter_t *adp, video_color_palette_t *palette)
+{
+ int i;
+ int error;
+ struct gfb_softc *sc;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ /*
+ * We store 8 bit values in the palette buffer, while the standard
+ * VGA has 6 bit DAC .
+ */
+ outb(PALRADR, 0x00);
+ for(i = 0; i < palette->count; ++i) {
+ palette->red[i] = inb(PALDATA) << 2;
+ palette->green[i] = inb(PALDATA) << 2;
+ palette->blue[i] = inb(PALDATA) << 2;
+ }
+ return(error);
+}
+
+static int
+tga_builtin_load_palette(video_adapter_t *adp, video_color_palette_t *palette)
+{
+ int i;
+ int error;
+ struct gfb_softc *sc;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ /*
+ * We store 8 bit values in the palette buffer, while the standard
+ * VGA has 6 bit DAC .
+ */
+ outb(PIXMASK, 0xff);
+ outb(PALWADR, 0x00);
+ for(i = 0; i < palette->count; ++i) {
+ outb(PALDATA, palette->red[i] >> 2);
+ outb(PALDATA, palette->green[i] >> 2);
+ outb(PALDATA, palette->blue[i] >> 2);
+ }
+ return(error);
+}
+
+#ifdef TGA2
+static int
+tga2_builtin_save_palette(video_adapter_t *adp, video_color_palette_t *palette)
+{
+ int i;
+ int error;
+ struct gfb_softc *sc;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ sc->gfbc->ramdac_wr(sc, BT463_REG_ADDR_LOW,
+ BT463_IREG_CPALETTE_RAM & 0xff);
+ sc->gfbc->ramdac_wr(sc, BT463_REG_ADDR_HIGH,
+ (BT463_IREG_CPALETTE_RAM >> 8) & 0xff);
+
+ /* spit out the colormap data */
+ for(i = 0; i < palette->count; i++) {
+ sc->gfbc->ramdac_wr(sc, BT463_REG_CMAP_DATA,
+ palette->red[i]);
+ sc->gfbc->ramdac_wr(sc, BT463_REG_CMAP_DATA,
+ palette->green[i]);
+ sc->gfbc->ramdac_wr(sc, BT463_REG_CMAP_DATA,
+ palette->blue[i]);
+ }
+ return(error);
+}
+
+static int
+tga2_builtin_load_palette(video_adapter_t *adp, video_color_palette_t *palette)
+{
+ int i;
+ int error;
+ struct gfb_softc *sc;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ sc->gfbc->ramdac_wr(sc, BT463_REG_ADDR_LOW,
+ BT463_IREG_CPALETTE_RAM & 0xff);
+ sc->gfbc->ramdac_wr(sc, BT463_REG_ADDR_HIGH,
+ (BT463_IREG_CPALETTE_RAM >> 8) & 0xff);
+
+ /* spit out the colormap data */
+ for(i = 0; i < palette->count; i++) {
+ sc->gfbc->ramdac_wr(sc, BT463_REG_CMAP_DATA,
+ palette->red[i]);
+ sc->gfbc->ramdac_wr(sc, BT463_REG_CMAP_DATA,
+ palette->green[i]);
+ sc->gfbc->ramdac_wr(sc, BT463_REG_CMAP_DATA,
+ palette->blue[i]);
+ }
+ return(error);
+}
+
+static int
+tga2_builtin_save_cursor_palette(video_adapter_t *adp, struct fbcmap *palette)
+{
+ int i;
+ int error;
+ struct gfb_softc *sc;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ sc->gfbc->ramdac_wr(sc, BT463_REG_ADDR_LOW,
+ BT463_IREG_CURSOR_COLOR_0 & 0xff);
+ sc->gfbc->ramdac_wr(sc, BT463_REG_ADDR_HIGH,
+ (BT463_IREG_CURSOR_COLOR_0 >> 8) & 0xff);
+
+ /* spit out the cursor data */
+ for(i = 0; i < palette->count; i++) {
+ BTWNREG(sc, palette->red[i]);
+ BTWNREG(sc, palette->green[i]);
+ BTWNREG(sc, palette->blue[i]);
+ }
+ return(error);
+}
+
+static int
+tga2_builtin_load_cursor_palette(video_adapter_t *adp, struct fbcmap *palette)
+{
+ int i;
+ int error;
+ struct gfb_softc *sc;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ sc->gfbc->ramdac_wr(sc, BT463_REG_ADDR_LOW,
+ BT463_IREG_CURSOR_COLOR_0 & 0xff);
+ sc->gfbc->ramdac_wr(sc, BT463_REG_ADDR_HIGH,
+ (BT463_IREG_CURSOR_COLOR_0 >> 8) & 0xff);
+
+ /* spit out the cursor data */
+ for(i = 0; i < palette->count; i++) {
+ BTWNREG(sc, palette->red[i]);
+ BTWNREG(sc, palette->green[i]);
+ BTWNREG(sc, palette->blue[i]);
+ }
+ return(error);
+}
+
+#endif /* TGA2 */
+
+static int
+tga_builtin_read_hw_cursor(video_adapter_t *adp, int *col, int *row)
+{
+ gfb_reg_t cxyr;
+ int error;
+
+ /* Assume the best... */
+ error = 0;
+
+ cxyr = READ_GFB_REGISTER(adp, TGA_REG_CXYR) | 0x00ffffff;
+ *col = (cxyr & 0x00000fff) / adp->va_info.vi_cwidth;
+ *row = ((cxyr & 0x00fff000) >> 12) / adp->va_info.vi_cheight;
+ return(error);
+}
+
+static int
+tga_builtin_set_hw_cursor(video_adapter_t *adp, int col, int row)
+{
+ int error;
+ gfb_reg_t cxyr;
+ gfb_reg_t vvvr;
+
+ /* Assume the best... */
+ error = 0;
+
+ vvvr = READ_GFB_REGISTER(adp, TGA_REG_VVVR);
+
+ /*
+ Make sure the parameters are in range for the screen
+ size...
+ */
+ if((row > adp->va_info.vi_height) ||
+ (col > adp->va_info.vi_width))
+ error = EINVAL;
+ else if(((row * adp->va_info.vi_cheight) > 0x0fff) ||
+ ((col * adp->va_info.vi_cwidth) > 0x0fff))
+ error = EINVAL;
+ /*
+ If either of the parameters is less than 0,
+ then hide the cursor...
+ */
+ else if((row < 0) || (col < 0)) {
+ if((vvvr & 0x00000004) != 0) {
+ vvvr &= 0xfffffffb;
+ WRITE_GFB_REGISTER(adp, TGA_REG_VVVR, vvvr);
+ }
+ }
+
+ /* Otherwise, just move the cursor as requested... */
+ else {
+ cxyr = READ_GFB_REGISTER(adp, TGA_REG_CXYR) & 0xff000000;
+ cxyr |= ((row * adp->va_info.vi_cheight) << 12);
+ cxyr |= (col * adp->va_info.vi_cwidth);
+ WRITE_GFB_REGISTER(adp, TGA_REG_CXYR, cxyr);
+ if((vvvr & 0x00000004) == 0) {
+ vvvr |= 0x00000004;
+ WRITE_GFB_REGISTER(adp, TGA_REG_VVVR, vvvr);
+ }
+ }
+ return(error);
+}
+
+static int
+tga_builtin_set_hw_cursor_shape(video_adapter_t *adp, int base, int height,
+ int cellsize, int blink)
+{
+ int i, j;
+ vm_offset_t cba;
+ gfb_reg_t window_orig;
+ gfb_reg_t ccbr;
+ gfb_reg_t vvvr;
+ int error;
+
+ /* Assume the best... */
+ error = 0;
+
+ vvvr = READ_GFB_REGISTER(adp, TGA_REG_VVVR);
+
+ /*
+ Make sure the parameters are in range for the cursor
+ (it's a 64x64 cursor)...
+ */
+ if(height > 64)
+ error = EINVAL;
+
+ /* If height is less than or equal to 0, then hide the cursor... */
+ else if(height <= 0) {
+ if((vvvr & 0x00000004) != 0) {
+ vvvr &= 0xfffffffb;
+ WRITE_GFB_REGISTER(adp, TGA_REG_VVVR, vvvr);
+ }
+ }
+
+ /* Otherwise, just resize the cursor as requested... */
+ else {
+ ccbr = READ_GFB_REGISTER(adp, TGA_REG_CCBR);
+ ccbr &= 0xffff03ff;
+ ccbr |= ((height - 1) << 10);
+ WRITE_GFB_REGISTER(adp, TGA_REG_CCBR, ccbr);
+ if((vvvr & 0x00000004) == 0) {
+ vvvr |= 0x00000004;
+ WRITE_GFB_REGISTER(adp, TGA_REG_VVVR, vvvr);
+ }
+
+ /* Save the window origin... */
+ window_orig = adp->va_window_orig;
+
+ /*
+ Fill in the cursor image (64 rows of 64 pixels per cursor
+ row at 2 bits-per-pixel, so 64 rows of 16 bytes each)--we
+ set va_window_orig to the cursor base address temporarily
+ so that we can write to the cursor image...
+ */
+ cba = (READ_GFB_REGISTER(adp, TGA_REG_CCBR) & 0xfffffc0f) >> 4;
+ adp->va_window_orig = cba;
+ for(i = 0; i < (64 - height); i++) {
+ WRITE_GFB_BUFFER(adp, cba++, 0x00000000);
+ WRITE_GFB_BUFFER(adp, cba++, 0x00000000);
+ }
+ for(; i < 64; i++) {
+ for(j = 0; j < (((64 - cellsize) / 8) /
+ sizeof(gfb_reg_t)); j++)
+ WRITE_GFB_BUFFER(adp, cba++, 0x00000000);
+ for(; j < ((64 / 8) / sizeof(gfb_reg_t)); j++)
+ WRITE_GFB_BUFFER(adp, cba++, 0xffffffff);
+ }
+
+ /* Restore the window origin... */
+ adp->va_window_orig = window_orig;
+
+ }
+ return(error);
+}
+
+static void
+bt463_load_palette_intr(struct gfb_softc *sc)
+{
+ sc->gfbc->ramdac_save_palette(sc->adp, &sc->gfbc->palette);
+}
+
+static void
+bt463_load_cursor_palette_intr(struct gfb_softc *sc)
+{
+ sc->gfbc->ramdac_load_cursor_palette(sc->adp, &sc->gfbc->cursor_palette);
+}
+
+static int
+tga_schedule_intr(struct gfb_softc *sc, void (*f)(struct gfb_softc *))
+{
+ /* Busy-wait for the previous interrupt to complete... */
+ while((READ_GFB_REGISTER(sc->adp, TGA_REG_SISR) & 0x00000001) != 0);
+
+ /* Arrange for f to be called at the next end-of-frame interrupt... */
+ sc->gfbc->ramdac_intr = f;
+
+ /* Enable the interrupt... */
+ WRITE_GFB_REGISTER(sc->adp, TGA_REG_SISR, 0x00010000);
+ return(0);
+}
+
+static u_int8_t
+tga_bt485_rd(struct gfb_softc *sc, u_int btreg)
+{
+ gfb_reg_t rdval;
+
+ if(btreg > BT485_REG_MAX)
+ panic("tga_ramdac_rd: reg %d out of range\n", btreg);
+ WRITE_GFB_REGISTER(sc->adp, TGA_REG_EPSR, (btreg << 1) | 0x1);
+ GFB_REGISTER_WRITE_BARRIER(sc, TGA_REG_EPSR, 1);
+ rdval = READ_GFB_REGISTER(sc->adp, TGA_REG_EPDR);
+ return((rdval >> 16) & 0xff);
+}
+
+static void
+tga_bt485_wr(struct gfb_softc *sc, u_int btreg, u_int8_t val)
+{
+ if(btreg > BT485_REG_MAX)
+ panic("tga_ramdac_wr: reg %d out of range\n", btreg);
+ WRITE_GFB_REGISTER(sc->adp, TGA_REG_EPDR,
+ (btreg << 9) | (0 << 8 ) | val);
+ GFB_REGISTER_WRITE_BARRIER(sc, TGA_REG_EPDR, 1);
+}
+
+static u_int8_t
+tga2_ibm561_rd(struct gfb_softc *sc, u_int btreg)
+{
+ bus_space_handle_t ramdac;
+ u_int8_t retval;
+
+ if(btreg > BT485_REG_MAX)
+ panic("tga_ramdac_rd: reg %d out of range\n", btreg);
+ ramdac = sc->bhandle + TGA2_MEM_RAMDAC + (0xe << 12) + (btreg << 8);
+ retval = bus_space_read_4(sc->btag, ramdac, 0) & 0xff;
+ bus_space_barrier(sc->btag, ramdac, 0, 4, BUS_SPACE_BARRIER_READ);
+ return(retval);
+}
+
+static void
+tga2_ibm561_wr(struct gfb_softc *sc, u_int btreg, u_int8_t val)
+{
+ bus_space_handle_t ramdac;
+
+ if(btreg > BT485_REG_MAX)
+ panic("tga_ramdac_wr: reg %d out of range\n", btreg);
+ ramdac = sc->bhandle + TGA2_MEM_RAMDAC + (0xe << 12) + (btreg << 8);
+ bus_space_write_4(sc->btag, ramdac, 0, val & 0xff);
+ bus_space_barrier(sc->btag, ramdac, 0, 4, BUS_SPACE_BARRIER_WRITE);
+}
+
+static u_int8_t
+tga_bt463_rd(struct gfb_softc *sc, u_int btreg)
+{
+ gfb_reg_t rdval;
+
+ /*
+ * Strobe CE# (high->low->high) since status and data are latched on
+ * the falling and rising edges (repsectively) of this active-low
+ * signal.
+ */
+
+ GFB_REGISTER_WRITE_BARRIER(sc, TGA_REG_EPSR, 1);
+ WRITE_GFB_REGISTER(sc->adp, TGA_REG_EPSR, (btreg << 2) | 2 | 1);
+ GFB_REGISTER_WRITE_BARRIER(sc, TGA_REG_EPSR, 1);
+ WRITE_GFB_REGISTER(sc->adp, TGA_REG_EPSR, (btreg << 2) | 2 | 0);
+ GFB_REGISTER_READ_BARRIER(sc, TGA_REG_EPSR, 1);
+ rdval = READ_GFB_REGISTER(sc->adp, TGA_REG_EPDR);
+ GFB_REGISTER_WRITE_BARRIER(sc, TGA_REG_EPSR, 1);
+ WRITE_GFB_REGISTER(sc->adp, TGA_REG_EPSR, (btreg << 2) | 2 | 1);
+ return((rdval >> 16) & 0xff);
+}
+
+static void
+tga_bt463_wr(struct gfb_softc *sc, u_int btreg, u_int8_t val)
+{
+ /*
+ * In spite of the 21030 documentation, to set the MPU bus bits for
+ * a write, you set them in the upper bits of EPDR, not EPSR.
+ */
+
+ /*
+ * Strobe CE# (high->low->high) since status and data are latched on
+ * the falling and rising edges of this active-low signal.
+ */
+
+ GFB_REGISTER_WRITE_BARRIER(sc, TGA_REG_EPDR, 1);
+ WRITE_GFB_REGISTER(sc->adp, TGA_REG_EPDR, (btreg << 10) | 0x100 | val);
+ GFB_REGISTER_WRITE_BARRIER(sc, TGA_REG_EPDR, 1);
+ WRITE_GFB_REGISTER(sc->adp, TGA_REG_EPDR, (btreg << 10) | 0x000 | val);
+ GFB_REGISTER_WRITE_BARRIER(sc, TGA_REG_EPDR, 1);
+ WRITE_GFB_REGISTER(sc->adp, TGA_REG_EPDR, (btreg << 10) | 0x100 | val);
+}
+
+static void
+tga2_ics9110_wr(struct gfb_softc *sc, int dotclock)
+{
+ bus_space_handle_t clock;
+ gfb_reg_t valU;
+ int N, M, R, V, X;
+ int i;
+
+ switch(dotclock) {
+ case 130808000:
+ N = 0x40; M = 0x7; V = 0x0; X = 0x1; R = 0x1; break;
+ case 119840000:
+ N = 0x2d; M = 0x2b; V = 0x1; X = 0x1; R = 0x1; break;
+ case 108180000:
+ N = 0x11; M = 0x9; V = 0x1; X = 0x1; R = 0x2; break;
+ case 103994000:
+ N = 0x6d; M = 0xf; V = 0x0; X = 0x1; R = 0x1; break;
+ case 175000000:
+ N = 0x5F; M = 0x3E; V = 0x1; X = 0x1; R = 0x1; break;
+ case 75000000:
+ N = 0x6e; M = 0x15; V = 0x0; X = 0x1; R = 0x1; break;
+ case 74000000:
+ N = 0x2a; M = 0x41; V = 0x1; X = 0x1; R = 0x1; break;
+ case 69000000:
+ N = 0x35; M = 0xb; V = 0x0; X = 0x1; R = 0x1; break;
+ case 65000000:
+ N = 0x6d; M = 0x0c; V = 0x0; X = 0x1; R = 0x2; break;
+ case 50000000:
+ N = 0x37; M = 0x3f; V = 0x1; X = 0x1; R = 0x2; break;
+ case 40000000:
+ N = 0x5f; M = 0x11; V = 0x0; X = 0x1; R = 0x2; break;
+ case 31500000:
+ N = 0x16; M = 0x05; V = 0x0; X = 0x1; R = 0x2; break;
+ case 25175000:
+ N = 0x66; M = 0x1d; V = 0x0; X = 0x1; R = 0x2; break;
+ case 135000000:
+ N = 0x42; M = 0x07; V = 0x0; X = 0x1; R = 0x1; break;
+ case 110000000:
+ N = 0x60; M = 0x32; V = 0x1; X = 0x1; R = 0x2; break;
+ case 202500000:
+ N = 0x60; M = 0x32; V = 0x1; X = 0x1; R = 0x2; break;
+ default:
+ panic("unrecognized clock rate %d\n", dotclock);
+ }
+
+ /* XXX -- hard coded, bad */
+ valU = N | ( M << 7 ) | (V << 14);
+ valU |= (X << 15) | (R << 17);
+ valU |= 0x17 << 19;
+ clock = sc->bhandle + TGA2_MEM_EXTDEV + TGA2_MEM_CLOCK + (0xe << 12);
+ for(i = 24; i > 0; i--) {
+ gfb_reg_t writeval;
+
+ writeval = valU & 0x1;
+ if (i == 1)
+ writeval |= 0x2;
+ valU >>= 1;
+ bus_space_write_4(sc->btag, clock, 0, writeval);
+ bus_space_barrier(sc->btag, clock, 0, 4,
+ BUS_SPACE_BARRIER_WRITE);
+ }
+ clock = sc->bhandle + TGA2_MEM_EXTDEV + TGA2_MEM_CLOCK + (0xe << 12) +
+ (0x1 << 11) + (0x1 << 11);
+ bus_space_write_4(sc->btag, clock, 0, 0x0);
+ bus_space_barrier(sc->btag, clock, 0, 0, BUS_SPACE_BARRIER_WRITE);
+}
+
+/*****************************************************************************
+ *
+ * BrookTree RAMDAC-specific functions
+ *
+ ****************************************************************************/
+
+static void
+bt463_init(struct gfb_softc *sc)
+{
+ int i;
+
+ return;
+
+ /*
+ * Init the BT463 for normal operation.
+ */
+
+ /*
+ * Setup:
+ * reg 0: 4:1 multiplexing, 25/75 blink.
+ * reg 1: Overlay mapping: mapped to common palette,
+ * 14 window type entries, 24-plane configuration mode,
+ * 4 overlay planes, underlays disabled, no cursor.
+ * reg 2: sync-on-green enabled, pedestal enabled.
+ */
+
+ BTWREG(sc, BT463_IREG_COMMAND_0, 0x40);
+ BTWREG(sc, BT463_IREG_COMMAND_1, 0x48);
+ BTWREG(sc, BT463_IREG_COMMAND_2, 0xC0);
+
+ /*
+ * Initialize the read mask.
+ */
+ sc->gfbc->ramdac_wr(sc, BT463_REG_ADDR_LOW,
+ BT463_IREG_READ_MASK_P0_P7 & 0xff);
+ sc->gfbc->ramdac_wr(sc, BT463_REG_ADDR_HIGH,
+ (BT463_IREG_READ_MASK_P0_P7 >> 8) & 0xff);
+ for(i = 0; i < 4; i++)
+ BTWNREG(sc, 0xff);
+
+ /*
+ * Initialize the blink mask.
+ */
+ sc->gfbc->ramdac_wr(sc, BT463_REG_ADDR_LOW,
+ BT463_IREG_READ_MASK_P0_P7 & 0xff);
+ sc->gfbc->ramdac_wr(sc, BT463_REG_ADDR_HIGH,
+ (BT463_IREG_READ_MASK_P0_P7 >> 8) & 0xff);
+ for(i = 0; i < 4; i++)
+ BTWNREG(sc, 0);
+
+ /*
+ * Clear test register
+ */
+ BTWREG(sc, BT463_IREG_TEST, 0);
+
+ /*
+ * Initalize the RAMDAC info struct to hold all of our
+ * data, and fill it in.
+ */
+
+ /* Initialize the window type table:
+ *
+ * Entry 0: 24-plane truecolor, overlays enabled, bypassed.
+ *
+ * Lookup table bypass: yes ( 1 << 23 & 0x800000) 800000
+ * Colormap address: 0x000 (0x000 << 17 & 0x7e0000) 0
+ * Overlay mask: 0xf ( 0xf << 13 & 0x01e000) 1e000
+ * Overlay location: P<27:24> ( 0 << 12 & 0x001000) 0
+ * Display mode: Truecolor ( 0 << 9 & 0x000e00) 000
+ * Number of planes: 8 ( 8 << 5 & 0x0001e0) 100
+ * Plane shift: 0 ( 0 << 0 & 0x00001f) 0
+ * --------
+ * 0x81e100
+ */
+#if 0
+ data->window_type[0] = 0x81e100;
+#endif
+
+ /* Entry 1: 8-plane pseudocolor in the bottom 8 bits,
+ * overlays enabled, colormap starting at 0.
+ *
+ * Lookup table bypass: no ( 0 << 23 & 0x800000) 0
+ * Colormap address: 0x000 (0x000 << 17 & 0x7e0000) 0
+ * Overlay mask: 0xf ( 0xf << 13 & 0x01e000) 0x1e000
+ * Overlay location: P<27:24> ( 0 << 12 & 0x001000) 0
+ * Display mode: Pseudocolor ( 1 << 9 & 0x000e00) 0x200
+ * Number of planes: 8 ( 8 << 5 & 0x0001e0) 0x100
+ * Plane shift: 16 ( 0x10 << 0 & 0x00001f) 10
+ * --------
+ * 0x01e310
+ */
+#if 0
+ data->window_type[1] = 0x01e310;
+#endif
+ /* The colormap interface to the world only supports one colormap,
+ * so having an entry for the 'alternate' colormap in the bt463
+ * probably isn't useful.
+ */
+
+ /* Fill the remaining table entries with clones of entry 0 until we
+ * figure out a better use for them.
+ */
+#if 0
+ for(i = 2; i < BT463_NWTYPE_ENTRIES; i++) {
+ data->window_type[i] = 0x81e100;
+ }
+#endif
+
+ tga_schedule_intr(sc, bt463_update_window_type);
+ tga_schedule_intr(sc, bt463_load_cursor_palette_intr);
+ tga_schedule_intr(sc, bt463_load_palette_intr);
+}
+
+static void
+bt463_update_window_type(struct gfb_softc *sc)
+{
+ int i;
+
+ /* The Bt463 won't accept window type data except during a blanking
+ * interval, so we do this early in the interrupt.
+ * Blanking the screen might also be a good idea, but it can cause
+ * unpleasant flashing and is hard to do from this side of the
+ * ramdac interface.
+ */
+ /* spit out the window type data */
+ for(i = 0; i < BT463_NWTYPE_ENTRIES; i++) {
+#if 0
+ sc->gfbc->ramdac_wr(sc, BT463_REG_ADDR_LOW,
+ (BT463_IREG_WINDOW_TYPE_TABLE + i) & 0xff);
+ sc->gfbc->ramdac_wr(sc, BT463_REG_ADDR_HIGH,
+ ((BT463_IREG_WINDOW_TYPE_TABLE + i) >> 8) & 0xff);
+ BTWNREG(sc, (data->window_type[i]) & 0xff);
+ BTWNREG(sc, (data->window_type[i] >> 8) & 0xff);
+ BTWNREG(sc, (data->window_type[i] >> 16) & 0xff);
+#endif
+ }
+}
+
+#if 0
+static int
+bt463_save_palette(video_adapter_t *adp, video_color_palette_t *palette)
+{
+ struct gfb_softc *sc;
+ int error, i;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ sc->gfbc->ramdac_wr(sc, BT463_REG_ADDR_LOW,
+ BT463_IREG_CPALETTE_RAM & 0xff);
+ sc->gfbc->ramdac_wr(sc, BT463_REG_ADDR_HIGH,
+ (BT463_IREG_CPALETTE_RAM >> 8) & 0xff);
+
+ /* get the colormap data */
+ for(i = 0; i < palette->count; i++) {
+ palette->red[i] = sc->gfbc->ramdac_rd(sc, BT463_REG_CMAP_DATA);
+ palette->green[i] = sc->gfbc->ramdac_rd(sc,
+ BT463_REG_CMAP_DATA);
+ palette->blue[i] = sc->gfbc->ramdac_rd(sc, BT463_REG_CMAP_DATA);
+ }
+ return(error);
+}
+
+static int
+bt463_load_palette(video_adapter_t *adp, video_color_palette_t *palette)
+{
+ struct gfb_softc *sc;
+ int error, i;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ sc->gfbc->ramdac_wr(sc, BT463_REG_ADDR_LOW,
+ BT463_IREG_CPALETTE_RAM & 0xff);
+ sc->gfbc->ramdac_wr(sc, BT463_REG_ADDR_HIGH,
+ (BT463_IREG_CPALETTE_RAM >> 8) & 0xff);
+
+ /* spit out the colormap data */
+ for(i = 0; i < palette->count; i++) {
+ sc->gfbc->ramdac_wr(sc, BT463_REG_CMAP_DATA, palette->red[i]);
+ sc->gfbc->ramdac_wr(sc, BT463_REG_CMAP_DATA, palette->green[i]);
+ sc->gfbc->ramdac_wr(sc, BT463_REG_CMAP_DATA, palette->blue[i]);
+ }
+ return(error);
+}
+
+#endif /* 0 */
+
+static int
+bt463_save_cursor_palette(video_adapter_t *adp, struct fbcmap *palette)
+{
+ struct gfb_softc *sc;
+ int error, i;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ sc->gfbc->ramdac_wr(sc, BT463_REG_ADDR_LOW,
+ BT463_IREG_CURSOR_COLOR_0 & 0xff);
+ sc->gfbc->ramdac_wr(sc, BT463_REG_ADDR_HIGH,
+ (BT463_IREG_CURSOR_COLOR_0 >> 8) & 0xff);
+
+ /* spit out the cursor data */
+ for(i = 0; i < palette->count; i++) {
+ palette->red[i] = BTRNREG(sc);
+ palette->green[i] = BTRNREG(sc);
+ palette->blue[i] = BTRNREG(sc);
+ }
+ return(error);
+}
+
+static int
+bt463_load_cursor_palette(video_adapter_t *adp, struct fbcmap *palette)
+{
+ struct gfb_softc *sc;
+ int error, i;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ sc->gfbc->ramdac_wr(sc, BT463_REG_ADDR_LOW,
+ BT463_IREG_CURSOR_COLOR_0 & 0xff);
+ sc->gfbc->ramdac_wr(sc, BT463_REG_ADDR_HIGH,
+ (BT463_IREG_CURSOR_COLOR_0 >> 8) & 0xff);
+
+ /* spit out the cursor data */
+ for(i = 0; i < palette->count; i++) {
+ BTWNREG(sc, palette->red[i]);
+ BTWNREG(sc, palette->green[i]);
+ BTWNREG(sc, palette->blue[i]);
+ }
+ return(error);
+}
+
+static void
+bt485_init(struct gfb_softc *sc)
+{
+ int i, j, num_cmap_entries;
+ u_int8_t regval;
+
+ regval = sc->gfbc->ramdac_rd(sc, BT485_REG_COMMAND_0);
+
+ /*
+ * Set the RAMDAC to 8 bit resolution, rather than 6 bit
+ * resolution.
+ */
+ regval |= 0x02;
+
+ /*
+ * Set the RAMDAC to sync-on-green.
+ */
+ regval |= 0x08;
+ sc->gfbc->ramdac_wr(sc, BT485_REG_COMMAND_0, regval);
+
+#if 0
+ /* Set the RAMDAC to 8BPP (no interesting options). */
+ sc->gfbc->ramdac_wr(sc, BT485_REG_COMMAND_1, 0x40);
+
+ /* Disable the cursor (for now) */
+ regval = sc->gfbc->ramdac_rd(sc, BT485_REG_COMMAND_2);
+ regval &= ~0x03;
+ regval |= 0x24;
+ sc->gfbc->ramdac_wr(sc, BT485_REG_COMMAND_2, regval);
+
+ /* Use a 64x64x2 cursor */
+ sc->gfbc->ramdac_wr(sc, BT485_REG_PCRAM_WRADDR, BT485_IREG_COMMAND_3);
+ regval = sc->gfbc->ramdac_rd(sc, BT485_REG_EXTENDED);
+ regval |= 0x04;
+ regval |= 0x08;
+ sc->gfbc->ramdac_wr(sc, BT485_REG_PCRAM_WRADDR, BT485_IREG_COMMAND_3);
+ sc->gfbc->ramdac_wr(sc, BT485_REG_EXTENDED, regval);
+
+ /* Set the Pixel Mask to something useful */
+ sc->gfbc->ramdac_wr(sc, BT485_REG_PIXMASK, 0xff);
+#endif
+
+ /* Generate the cursor color map (Light-Grey)... */
+ for(i = 0; i < sc->gfbc->cursor_palette.count; i++) {
+ sc->gfbc->cursor_palette.red[i] = default_cmap[7].red;
+ sc->gfbc->cursor_palette.green[i] = default_cmap[7].green;
+ sc->gfbc->cursor_palette.blue[i] = default_cmap[7].blue;
+ }
+
+#if 0
+ /* Enable cursor... */
+ regval = sc->gfbc->ramdac_rd(sc, BT485_REG_COMMAND_2);
+ if(!(regval & 0x01)) {
+ regval |= 0x01;
+ sc->gfbc->ramdac_wr(sc, BT485_REG_COMMAND_2, regval);
+ }
+ else if(regval & 0x03) {
+ regval &= ~0x03;
+ sc->gfbc->ramdac_wr(sc, BT485_REG_COMMAND_2, regval);
+ }
+#endif
+
+ /* Generate the screen color map... */
+ num_cmap_entries = sizeof(default_cmap) / sizeof(struct cmap);
+ for(i = 0; i < sc->gfbc->palette.count / num_cmap_entries; i++)
+ for(j = 0; j < num_cmap_entries; j++) {
+ sc->gfbc->palette.red[(num_cmap_entries * i) + j] =
+ default_cmap[j].red;
+ sc->gfbc->palette.green[(num_cmap_entries * i) + j] =
+ default_cmap[j].green;
+ sc->gfbc->palette.blue[(num_cmap_entries * i) + j] =
+ default_cmap[j].blue;
+ }
+}
+
+static int
+bt485_save_palette(video_adapter_t *adp, video_color_palette_t *palette)
+{
+ struct gfb_softc *sc;
+ int error, i;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ /* addr[9:0] assumed to be 0 */
+ /* set addr[7:0] to 0 */
+ sc->gfbc->ramdac_wr(sc, BT485_REG_PCRAM_WRADDR, 0x00);
+
+ /* spit out the color data */
+ for(i = 0; i < palette->count; i++) {
+ palette->red[i] = sc->gfbc->ramdac_rd(sc, BT485_REG_PALETTE);
+ palette->green[i] = sc->gfbc->ramdac_rd(sc, BT485_REG_PALETTE);
+ palette->blue[i] = sc->gfbc->ramdac_rd(sc, BT485_REG_PALETTE);
+ }
+ return(error);
+}
+
+static int
+bt485_load_palette(video_adapter_t *adp, video_color_palette_t *palette)
+{
+ struct gfb_softc *sc;
+ int error, i;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ /* addr[9:0] assumed to be 0 */
+ /* set addr[7:0] to 0 */
+ sc->gfbc->ramdac_wr(sc, BT485_REG_PCRAM_WRADDR, 0x00);
+
+ /* spit out the color data */
+ for(i = 0; i < palette->count; i++) {
+ sc->gfbc->ramdac_wr(sc, BT485_REG_PALETTE, palette->red[i]);
+ sc->gfbc->ramdac_wr(sc, BT485_REG_PALETTE, palette->green[i]);
+ sc->gfbc->ramdac_wr(sc, BT485_REG_PALETTE, palette->blue[i]);
+ }
+ return(error);
+}
+
+static int
+bt485_save_cursor_palette(video_adapter_t *adp, struct fbcmap *palette)
+{
+ struct gfb_softc *sc;
+ int error, i;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ /* addr[9:0] assumed to be 0 */
+ /* set addr[7:0] to 1 */
+ sc->gfbc->ramdac_wr(sc, BT485_REG_COC_WRADDR, 0x01);
+
+ /* spit out the cursor color data */
+ for(i = 0; i < palette->count; i++) {
+ palette->red[i] = sc->gfbc->ramdac_rd(sc, BT485_REG_COCDATA);
+ palette->green[i] = sc->gfbc->ramdac_rd(sc, BT485_REG_COCDATA);
+ palette->blue[i] = sc->gfbc->ramdac_rd(sc, BT485_REG_COCDATA);
+ }
+ return(error);
+}
+
+static int
+bt485_load_cursor_palette(video_adapter_t *adp, struct fbcmap *palette)
+{
+ struct gfb_softc *sc;
+ int error, i;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ /* addr[9:0] assumed to be 0 */
+ /* set addr[7:0] to 1 */
+ sc->gfbc->ramdac_wr(sc, BT485_REG_COC_WRADDR, 0x01);
+
+ /* spit out the cursor color data */
+ for(i = 0; i < palette->count; i++) {
+ sc->gfbc->ramdac_wr(sc, BT485_REG_COCDATA, palette->red[i]);
+ sc->gfbc->ramdac_wr(sc, BT485_REG_COCDATA, palette->green[i]);
+ sc->gfbc->ramdac_wr(sc, BT485_REG_COCDATA, palette->blue[i]);
+ }
+ return(error);
+}
+
+static int
+bt485_read_hw_cursor(video_adapter_t *adp, int *col, int *row)
+{
+ struct gfb_softc *sc;
+ int error, s;
+
+ error = 0;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+ s = spltty();
+ *col = (sc->gfbc->ramdac_rd(sc, BT485_REG_CURSOR_X_HIGH) & 0x0f) << 8;
+ *col |= sc->gfbc->ramdac_rd(sc, BT485_REG_CURSOR_X_LOW) & 0xff;
+ *col /= adp->va_info.vi_cwidth;
+ *col -= 8;
+ *row = (sc->gfbc->ramdac_rd(sc, BT485_REG_CURSOR_Y_HIGH) & 0x0f) << 8;
+ *row |= sc->gfbc->ramdac_rd(sc, BT485_REG_CURSOR_Y_LOW) & 0xff;
+ *row /= adp->va_info.vi_cheight;
+ *row -= 4;
+ splx(s);
+ return(error);
+}
+
+static int
+bt485_set_hw_cursor(video_adapter_t *adp, int col, int row)
+{
+ struct gfb_softc *sc;
+ int error, s;
+
+ error = 0;
+
+ /* Make sure the parameters are in range for the screen
+ size... */
+ if((row > adp->va_info.vi_height) || (col > adp->va_info.vi_width))
+ error = EINVAL;
+ else if(((row * adp->va_info.vi_cheight) > 0x0fff) ||
+ ((col * adp->va_info.vi_cwidth) > 0x0fff))
+ error = EINVAL;
+ else if((row < 0) || (col < 0)) {
+ /* If either of the parameters is less than 0, then hide the
+ cursor... */
+ col = -8;
+ row = -4;
+ } else {
+ /* Otherwise, just move the cursor as requested... */
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+ s = spltty();
+ sc->gfbc->ramdac_wr(sc, BT485_REG_CURSOR_X_LOW,
+ ((col + 8) * adp->va_info.vi_cwidth) & 0xff);
+ sc->gfbc->ramdac_wr(sc, BT485_REG_CURSOR_X_HIGH,
+ (((col + 8) * adp->va_info.vi_cwidth) >> 8) & 0x0f);
+ sc->gfbc->ramdac_wr(sc, BT485_REG_CURSOR_Y_LOW,
+ ((row + 4) * adp->va_info.vi_cheight) & 0xff);
+ sc->gfbc->ramdac_wr(sc, BT485_REG_CURSOR_Y_HIGH,
+ (((row + 4) * adp->va_info.vi_cheight) >> 8) & 0x0f);
+ splx(s);
+ }
+ return(error);
+}
+
+static int
+bt485_set_hw_cursor_shape(video_adapter_t *adp, int base, int height,
+ int cellsize, int blink)
+{
+ struct gfb_softc *sc;
+ int error, cell_count, count, i, j;
+ u_int8_t regval;
+
+ error = 0;
+ cellsize /= 2;
+ sc = gfb_device_softcs[adp->va_model][adp->va_unit];
+
+ /*
+ Make sure the parameters are in range for the cursor
+ (it's a 64x64 cursor)...
+ */
+ if(height > 64)
+ error = EINVAL;
+ else if(height <= 0) {
+ /* If height is less than or equal to 0, then hide the
+ cursor... */
+ } else {
+ /* Otherwise, just resize the cursor as requested... */
+
+ /* 64 pixels per cursor-row, 2 bits-per-pixel, so counts in
+ bytes... */
+ cell_count = cellsize / 8;
+ count = 64 / 8;
+
+ /*
+ * Write the cursor image data:
+ * set addr[9:8] to 0,
+ * set addr[7:0] to 0,
+ * spit it all out.
+ */
+ sc->gfbc->ramdac_wr(sc, BT485_REG_PCRAM_WRADDR,
+ BT485_IREG_COMMAND_3);
+ regval = sc->gfbc->ramdac_rd(sc, BT485_REG_EXTENDED);
+ regval &= ~0x03;
+ sc->gfbc->ramdac_wr(sc, BT485_REG_PCRAM_WRADDR,
+ BT485_IREG_COMMAND_3);
+ sc->gfbc->ramdac_wr(sc, BT485_REG_EXTENDED, regval);
+ sc->gfbc->ramdac_wr(sc, BT485_REG_PCRAM_WRADDR, 0);
+
+ /* Fill-in the desired pixels in the specified pixel-rows... */
+ for(i = 0; i < height; i++) {
+ for(j = 0; j < cell_count; j++)
+ sc->gfbc->ramdac_wr(sc, BT485_REG_CURSOR_RAM,
+ 0xff);
+ for(j = 0; j < count - cell_count; j++)
+ sc->gfbc->ramdac_wr(sc, BT485_REG_CURSOR_RAM,
+ 0x00);
+ }
+
+ /* Clear the remaining pixel rows... */
+ for(; i < 64; i++)
+ for(j = 0; j < count; j++)
+ sc->gfbc->ramdac_wr(sc, BT485_REG_CURSOR_RAM,
+ 0x00);
+
+ /*
+ * Write the cursor mask data:
+ * set addr[9:8] to 2,
+ * set addr[7:0] to 0,
+ * spit it all out.
+ */
+ sc->gfbc->ramdac_wr(sc, BT485_REG_PCRAM_WRADDR,
+ BT485_IREG_COMMAND_3);
+ regval = sc->gfbc->ramdac_rd(sc, BT485_REG_EXTENDED);
+ regval &= ~0x03; regval |= 0x02;
+ sc->gfbc->ramdac_wr(sc, BT485_REG_PCRAM_WRADDR,
+ BT485_IREG_COMMAND_3);
+ sc->gfbc->ramdac_wr(sc, BT485_REG_EXTENDED, regval);
+ sc->gfbc->ramdac_wr(sc, BT485_REG_PCRAM_WRADDR, 0);
+
+ /* Fill-in the desired pixels in the specified pixel-rows... */
+ for(i = 0; i < height; i++) {
+ for(j = 0; j < cell_count; j++)
+ sc->gfbc->ramdac_wr(sc, BT485_REG_CURSOR_RAM,
+ 0xff);
+ for(j = 0; j < count - cell_count; j++)
+ sc->gfbc->ramdac_wr(sc, BT485_REG_CURSOR_RAM,
+ 0x00);
+ }
+
+ /* Clear the remaining pixel rows... */
+ for(; i < 64; i++)
+ for(j = 0; j < count; j++)
+ sc->gfbc->ramdac_wr(sc, BT485_REG_CURSOR_RAM,
+ 0x00);
+
+ /* set addr[9:0] back to 0 */
+ sc->gfbc->ramdac_wr(sc, BT485_REG_PCRAM_WRADDR,
+ BT485_IREG_COMMAND_3);
+ regval = sc->gfbc->ramdac_rd(sc, BT485_REG_EXTENDED);
+ regval &= ~0x03;
+ sc->gfbc->ramdac_wr(sc, BT485_REG_PCRAM_WRADDR,
+ BT485_IREG_COMMAND_3);
+ sc->gfbc->ramdac_wr(sc, BT485_REG_EXTENDED, regval);
+ }
+ return(error);
+}
+
+static void
+ibm561_init(struct gfb_softc *sc)
+{
+}
+
+static int
+ibm561_save_palette(video_adapter_t *adp, video_color_palette_t *palette)
+{
+ int error;
+
+ error = 0;
+ return(error);
+}
+
+static int
+ibm561_load_palette(video_adapter_t *adp, video_color_palette_t *palette)
+{
+ int error;
+
+ error = 0;
+ return(error);
+}
+
+static int
+ibm561_save_cursor_palette(video_adapter_t *adp, struct fbcmap *palette)
+{
+ int error;
+
+ error = 0;
+ return(error);
+}
+
+static int
+ibm561_load_cursor_palette(video_adapter_t *adp, struct fbcmap *palette)
+{
+ int error;
+
+ error = 0;
+ return(error);
+}
+
+#undef MB
+#undef KB
diff --git a/sys/dev/fb/tga.h b/sys/dev/fb/tga.h
new file mode 100644
index 000000000000..3616b61bd04c
--- /dev/null
+++ b/sys/dev/fb/tga.h
@@ -0,0 +1,155 @@
+/*-
+ * 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.
+ *
+ * Copyright (c) 2000 Andrew Miklic
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _FB_TGA_H_
+#define _FB_TGA_H_
+
+/* TGA-specific FB stuff */
+
+struct gfb_softc;
+struct video_adapter;
+
+/*
+ * Register definitions for the Brooktree Bt463 135MHz Monolithic
+ * CMOS TrueVu RAMDAC.
+ */
+
+/*
+ * Directly-accessible registers. Note the address register is
+ * auto-incrementing.
+ */
+#define BT463_REG_ADDR_LOW 0x00 /* C1,C0 == 0,0 */
+#define BT463_REG_ADDR_HIGH 0x01 /* C1,C0 == 0,1 */
+#define BT463_REG_IREG_DATA 0x02 /* C1,C0 == 1,0 */
+#define BT463_REG_CMAP_DATA 0x03 /* C1,C0 == 1,1 */
+
+#define BT463_REG_MAX BT463_REG_CMAP_DATA
+
+/*
+ * All internal register access to the Bt463 is done indirectly via the
+ * Address Register (mapped into the host bus in a device-specific
+ * fashion). The following register definitions are in terms of
+ * their address register address values.
+ */
+
+/* C1,C0 must be 1,0 */
+#define BT463_IREG_CURSOR_COLOR_0 0x0100 /* 3 r/w cycles */
+#define BT463_IREG_CURSOR_COLOR_1 0x0101 /* 3 r/w cycles */
+#define BT463_IREG_ID 0x0200
+#define BT463_IREG_COMMAND_0 0x0201
+#define BT463_IREG_COMMAND_1 0x0202
+#define BT463_IREG_COMMAND_2 0x0203
+#define BT463_IREG_READ_MASK_P0_P7 0x0205
+#define BT463_IREG_READ_MASK_P8_P15 0x0206
+#define BT463_IREG_READ_MASK_P16_P23 0x0207
+#define BT463_IREG_READ_MASK_P24_P27 0x0208
+#define BT463_IREG_BLINK_MASK_P0_P7 0x0209
+#define BT463_IREG_BLINK_MASK_P8_P15 0x020a
+#define BT463_IREG_BLINK_MASK_P16_P23 0x020b
+#define BT463_IREG_BLINK_MASK_P24_P27 0x020c
+#define BT463_IREG_TEST 0x020d
+#define BT463_IREG_INPUT_SIG 0x020e /* 2 of 3 r/w cycles */
+#define BT463_IREG_OUTPUT_SIG 0x020f /* 3 r/w cycles */
+#define BT463_IREG_REVISION 0x0220
+#define BT463_IREG_WINDOW_TYPE_TABLE 0x0300 /* 3 r/w cycles */
+
+#define BT463_NWTYPE_ENTRIES 0x10 /* 16 window type entries */
+
+/* C1,C0 must be 1,1 */
+#define BT463_IREG_CPALETTE_RAM 0x0000 /* 3 r/w cycles */
+
+#define BT463_NCMAP_ENTRIES 0x210 /* 528 CMAP entries */
+
+#define BT463_DATA_CURCMAP_CHANGED 0x01 /* cursor colormap changed */
+#define BT463_DATA_CMAP_CHANGED 0x02 /* colormap changed */
+#define BT463_DATA_WTYPE_CHANGED 0x04 /* window type table changed */
+#define BT463_DATA_ALL_CHANGED 0x07
+
+/*
+ * Register definitions for the Brooktree Bt485A 170MHz Monolithic
+ * CMOS True-Color RAMDAC.
+ */
+
+/*
+ * Directly-addressed registers.
+ */
+
+#define BT485_REG_PCRAM_WRADDR 0x00
+#define BT485_REG_PALETTE 0x01
+#define BT485_REG_PIXMASK 0x02
+#define BT485_REG_PCRAM_RDADDR 0x03
+#define BT485_REG_COC_WRADDR 0x04
+#define BT485_REG_COCDATA 0x05
+#define BT485_REG_COMMAND_0 0x06
+#define BT485_REG_COC_RDADDR 0x07
+#define BT485_REG_COMMAND_1 0x08
+#define BT485_REG_COMMAND_2 0x09
+#define BT485_REG_STATUS 0x0a
+#define BT485_REG_EXTENDED BT485_REG_STATUS
+#define BT485_REG_CURSOR_RAM 0x0b
+#define BT485_REG_CURSOR_X_LOW 0x0c
+#define BT485_REG_CURSOR_X_HIGH 0x0d
+#define BT485_REG_CURSOR_Y_LOW 0x0e
+#define BT485_REG_CURSOR_Y_HIGH 0x0f
+
+#define BT485_REG_MAX 0x0f
+
+#define BT485_IREG_STATUS 0x00
+#define BT485_IREG_COMMAND_3 0x01
+#define BT485_IREG_COMMAND_4 0x02
+#define BT485_IREG_RSA 0x20
+#define BT485_IREG_GSA 0x21
+#define BT485_IREG_BSA 0x22
+
+#define BT485_DATA_ENB_CHANGED 0x01 /* cursor enable changed */
+#define BT485_DATA_CURCMAP_CHANGED 0x02 /* cursor colormap changed */
+#define BT485_DATA_CURSHAPE_CHANGED 0x04 /* cursor size, image, mask changed */
+#define BT485_DATA_CMAP_CHANGED 0x08 /* colormap changed */
+#define BT485_DATA_ALL_CHANGED 0x0f
+#define CURSOR_MAX_SIZE 64
+
+#define TGA_DRIVER_NAME "tga"
+#define TGA2_DRIVER_NAME "tga2"
+
+#define BTWREG(sc, addr, val) \
+ sc->gfbc->ramdac_wr((sc), BT463_REG_ADDR_LOW, (addr) & 0xff); \
+ sc->gfbc->ramdac_wr((sc), BT463_REG_ADDR_HIGH, ((addr) >> 8) & 0xff);\
+ (sc)->gfbc->ramdac_wr((sc), BT463_REG_IREG_DATA, (val))
+#define BTWNREG(sc, val) \
+ (sc)->gfbc->ramdac_wr((sc), BT463_REG_IREG_DATA, (val))
+#define BTRREG(sc, addr) \
+ sc->gfbc->ramdac_wr((sc), BT463_REG_ADDR_LOW, (addr) & 0xff); \
+ sc->gfbc->ramdac_wr((sc), BT463_REG_ADDR_HIGH, ((addr) >> 8) & 0xff);\
+ (sc)->gfbc->ramdac_rd((sc), BT463_REG_IREG_DATA)
+#define BTRNREG(sc) \
+ (sc)->gfbc->ramdac_rd((sc), BT463_REG_IREG_DATA)
+
+#endif /* _FB_TGA_H_ */
diff --git a/sys/dev/fb/vga.c b/sys/dev/fb/vga.c
new file mode 100644
index 000000000000..62ba23559fe9
--- /dev/null
+++ b/sys/dev/fb/vga.c
@@ -0,0 +1,3065 @@
+/*-
+ * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
+ * Copyright (c) 1992-1998 Søren Schmidt
+ * All rights reserved.
+ *
+ * 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 as
+ * the first lines of this file unmodified.
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``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 AUTHORS 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.
+ *
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include "opt_vga.h"
+#include "opt_fb.h"
+#include "opt_syscons.h" /* should be removed in the future, XXX */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/conf.h>
+#include <sys/fcntl.h>
+#include <sys/malloc.h>
+#include <sys/fbio.h>
+
+#include <vm/vm.h>
+#include <vm/vm_param.h>
+#include <vm/pmap.h>
+
+#include <machine/md_var.h>
+#if defined(__i386__) || defined(__amd64__)
+#include <machine/pc/bios.h>
+#endif
+#include <machine/bus.h>
+
+#include <dev/fb/fbreg.h>
+#include <dev/fb/vgareg.h>
+
+#include <isa/isareg.h>
+
+#ifndef VGA_DEBUG
+#define VGA_DEBUG 0
+#endif
+
+/* XXX machine/pc/bios.h has got too much i386-specific stuff in it */
+#ifndef BIOS_PADDRTOVADDR
+#define BIOS_PADDRTOVADDR(x) (x)
+#endif
+
+int
+vga_probe_unit(int unit, video_adapter_t *buf, int flags)
+{
+ video_adapter_t *adp;
+ video_switch_t *sw;
+ int error;
+
+ sw = vid_get_switch(VGA_DRIVER_NAME);
+ if (sw == NULL)
+ return 0;
+ error = (*sw->probe)(unit, &adp, NULL, flags);
+ if (error)
+ return error;
+ bcopy(adp, buf, sizeof(*buf));
+ return 0;
+}
+
+int
+vga_attach_unit(int unit, vga_softc_t *sc, int flags)
+{
+ video_switch_t *sw;
+ int error;
+
+ sw = vid_get_switch(VGA_DRIVER_NAME);
+ if (sw == NULL)
+ return ENXIO;
+
+ error = (*sw->probe)(unit, &sc->adp, NULL, flags);
+ if (error)
+ return error;
+ return (*sw->init)(unit, sc->adp, flags);
+}
+
+/* cdev driver functions */
+
+#ifdef FB_INSTALL_CDEV
+
+int
+vga_open(struct cdev *dev, vga_softc_t *sc, int flag, int mode, struct thread *td)
+{
+ if (sc == NULL)
+ return ENXIO;
+ if (mode & (O_CREAT | O_APPEND | O_TRUNC))
+ return ENODEV;
+
+ return genfbopen(&sc->gensc, sc->adp, flag, mode, td);
+}
+
+int
+vga_close(struct cdev *dev, vga_softc_t *sc, int flag, int mode, struct thread *td)
+{
+ return genfbclose(&sc->gensc, sc->adp, flag, mode, td);
+}
+
+int
+vga_read(struct cdev *dev, vga_softc_t *sc, struct uio *uio, int flag)
+{
+ return genfbread(&sc->gensc, sc->adp, uio, flag);
+}
+
+int
+vga_write(struct cdev *dev, vga_softc_t *sc, struct uio *uio, int flag)
+{
+ return genfbread(&sc->gensc, sc->adp, uio, flag);
+}
+
+int
+vga_ioctl(struct cdev *dev, vga_softc_t *sc, u_long cmd, caddr_t arg, int flag,
+ struct thread *td)
+{
+ return genfbioctl(&sc->gensc, sc->adp, cmd, arg, flag, td);
+}
+
+int
+vga_mmap(struct cdev *dev, vga_softc_t *sc, vm_offset_t offset, vm_offset_t *paddr,
+ int prot)
+{
+ return genfbmmap(&sc->gensc, sc->adp, offset, paddr, prot);
+}
+
+#endif /* FB_INSTALL_CDEV */
+
+/* LOW-LEVEL */
+
+#include <machine/clock.h>
+#ifdef __i386__
+#include <machine/pc/vesa.h>
+#endif
+
+#define probe_done(adp) ((adp)->va_flags & V_ADP_PROBED)
+#define init_done(adp) ((adp)->va_flags & V_ADP_INITIALIZED)
+#define config_done(adp) ((adp)->va_flags & V_ADP_REGISTERED)
+
+/* for compatibility with old kernel options */
+#ifdef SC_ALT_SEQACCESS
+#undef SC_ALT_SEQACCESS
+#undef VGA_ALT_SEQACCESS
+#define VGA_ALT_SEQACCESS 1
+#endif
+
+#ifdef SLOW_VGA
+#undef SLOW_VGA
+#undef VGA_SLOW_IOACCESS
+#define VGA_SLOW_IOACCESS 1
+#endif
+
+/* architecture dependent option */
+#ifndef __i386__
+#define VGA_NO_BIOS 1
+#endif
+
+/* this should really be in `rtc.h' */
+#define RTC_EQUIPMENT 0x14
+
+/* various sizes */
+#define V_MODE_MAP_SIZE (M_VGA_CG320 + 1)
+#define V_MODE_PARAM_SIZE 64
+
+/* video adapter state buffer */
+struct adp_state {
+ int sig;
+#define V_STATE_SIG 0x736f6962
+ u_char regs[V_MODE_PARAM_SIZE];
+};
+typedef struct adp_state adp_state_t;
+
+/* video adapter information */
+#define DCC_MONO 0
+#define DCC_CGA40 1
+#define DCC_CGA80 2
+#define DCC_EGAMONO 3
+#define DCC_EGA40 4
+#define DCC_EGA80 5
+
+/*
+ * NOTE: `va_window' should have a virtual address, but is initialized
+ * with a physical address in the following table, as verify_adapter()
+ * will perform address conversion at run-time.
+ */
+static video_adapter_t adapter_init_value[] = {
+ /* DCC_MONO */
+ { 0, KD_MONO, "mda", 0, 0, 0, IO_MDA, IO_MDASIZE, MONO_CRTC,
+ MDA_BUF_BASE, MDA_BUF_SIZE, MDA_BUF_BASE, MDA_BUF_SIZE, MDA_BUF_SIZE,
+ 0, 0, 0, 0, 7, 0, },
+ /* DCC_CGA40 */
+ { 0, KD_CGA, "cga", 0, 0, V_ADP_COLOR, IO_CGA, IO_CGASIZE, COLOR_CRTC,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE,
+ 0, 0, 0, 0, 3, 0, },
+ /* DCC_CGA80 */
+ { 0, KD_CGA, "cga", 0, 0, V_ADP_COLOR, IO_CGA, IO_CGASIZE, COLOR_CRTC,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE,
+ 0, 0, 0, 0, 3, 0, },
+ /* DCC_EGAMONO */
+ { 0, KD_EGA, "ega", 0, 0, 0, IO_MDA, 48, MONO_CRTC,
+ EGA_BUF_BASE, EGA_BUF_SIZE, MDA_BUF_BASE, MDA_BUF_SIZE, MDA_BUF_SIZE,
+ 0, 0, 0, 0, 7, 0, },
+ /* DCC_EGA40 */
+ { 0, KD_EGA, "ega", 0, 0, V_ADP_COLOR, IO_MDA, 48, COLOR_CRTC,
+ EGA_BUF_BASE, EGA_BUF_SIZE, CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE,
+ 0, 0, 0, 0, 3, 0, },
+ /* DCC_EGA80 */
+ { 0, KD_EGA, "ega", 0, 0, V_ADP_COLOR, IO_MDA, 48, COLOR_CRTC,
+ EGA_BUF_BASE, EGA_BUF_SIZE, CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE,
+ 0, 0, 0, 0, 3, 0, },
+};
+
+static video_adapter_t biosadapter[2];
+static int biosadapters = 0;
+
+/* video driver declarations */
+static int vga_configure(int flags);
+ int (*vga_sub_configure)(int flags);
+#if 0
+static int vga_nop(void);
+#endif
+static int vga_error(void);
+static vi_probe_t vga_probe;
+static vi_init_t vga_init;
+static vi_get_info_t vga_get_info;
+static vi_query_mode_t vga_query_mode;
+static vi_set_mode_t vga_set_mode;
+static vi_save_font_t vga_save_font;
+static vi_load_font_t vga_load_font;
+static vi_show_font_t vga_show_font;
+static vi_save_palette_t vga_save_palette;
+static vi_load_palette_t vga_load_palette;
+static vi_set_border_t vga_set_border;
+static vi_save_state_t vga_save_state;
+static vi_load_state_t vga_load_state;
+static vi_set_win_org_t vga_set_origin;
+static vi_read_hw_cursor_t vga_read_hw_cursor;
+static vi_set_hw_cursor_t vga_set_hw_cursor;
+static vi_set_hw_cursor_shape_t vga_set_hw_cursor_shape;
+static vi_blank_display_t vga_blank_display;
+static vi_mmap_t vga_mmap_buf;
+static vi_ioctl_t vga_dev_ioctl;
+#ifndef VGA_NO_MODE_CHANGE
+static vi_clear_t vga_clear;
+static vi_fill_rect_t vga_fill_rect;
+static vi_bitblt_t vga_bitblt;
+#else /* VGA_NO_MODE_CHANGE */
+#define vga_clear (vi_clear_t *)vga_error
+#define vga_fill_rect (vi_fill_rect_t *)vga_error
+#define vga_bitblt (vi_bitblt_t *)vga_error
+#endif
+static vi_diag_t vga_diag;
+
+static video_switch_t vgavidsw = {
+ vga_probe,
+ vga_init,
+ vga_get_info,
+ vga_query_mode,
+ vga_set_mode,
+ vga_save_font,
+ vga_load_font,
+ vga_show_font,
+ vga_save_palette,
+ vga_load_palette,
+ vga_set_border,
+ vga_save_state,
+ vga_load_state,
+ vga_set_origin,
+ vga_read_hw_cursor,
+ vga_set_hw_cursor,
+ vga_set_hw_cursor_shape,
+ vga_blank_display,
+ vga_mmap_buf,
+ vga_dev_ioctl,
+ vga_clear,
+ vga_fill_rect,
+ vga_bitblt,
+ vga_error,
+ vga_error,
+ vga_diag,
+};
+
+VIDEO_DRIVER(mda, vgavidsw, NULL);
+VIDEO_DRIVER(cga, vgavidsw, NULL);
+VIDEO_DRIVER(ega, vgavidsw, NULL);
+VIDEO_DRIVER(vga, vgavidsw, vga_configure);
+
+/* VGA BIOS standard video modes */
+#define EOT (-1)
+#define NA (-2)
+
+static video_info_t bios_vmode[] = {
+ /* CGA */
+ { M_B40x25, V_INFO_COLOR, 40, 25, 8, 8, 2, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ { M_C40x25, V_INFO_COLOR, 40, 25, 8, 8, 4, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ { M_B80x25, V_INFO_COLOR, 80, 25, 8, 8, 2, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ { M_C80x25, V_INFO_COLOR, 80, 25, 8, 8, 4, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ /* EGA */
+ { M_ENH_B40x25, V_INFO_COLOR, 40, 25, 8, 14, 2, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ { M_ENH_C40x25, V_INFO_COLOR, 40, 25, 8, 14, 4, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ { M_ENH_B80x25, V_INFO_COLOR, 80, 25, 8, 14, 2, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ { M_ENH_C80x25, V_INFO_COLOR, 80, 25, 8, 14, 4, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ /* VGA */
+ { M_VGA_C40x25, V_INFO_COLOR, 40, 25, 8, 16, 4, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ { M_VGA_M80x25, 0, 80, 25, 8, 16, 2, 1,
+ MDA_BUF_BASE, MDA_BUF_SIZE, MDA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ { M_VGA_C80x25, V_INFO_COLOR, 80, 25, 8, 16, 4, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ /* MDA */
+ { M_EGAMONO80x25, 0, 80, 25, 8, 14, 2, 1,
+ MDA_BUF_BASE, MDA_BUF_SIZE, MDA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ /* EGA */
+ { M_ENH_B80x43, 0, 80, 43, 8, 8, 2, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ { M_ENH_C80x43, V_INFO_COLOR, 80, 43, 8, 8, 4, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ /* VGA */
+ { M_VGA_M80x30, 0, 80, 30, 8, 16, 2, 1,
+ MDA_BUF_BASE, MDA_BUF_SIZE, MDA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ { M_VGA_C80x30, V_INFO_COLOR, 80, 30, 8, 16, 4, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ { M_VGA_M80x50, 0, 80, 50, 8, 8, 2, 1,
+ MDA_BUF_BASE, MDA_BUF_SIZE, MDA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ { M_VGA_C80x50, V_INFO_COLOR, 80, 50, 8, 8, 4, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ { M_VGA_M80x60, 0, 80, 60, 8, 8, 2, 1,
+ MDA_BUF_BASE, MDA_BUF_SIZE, MDA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ { M_VGA_C80x60, V_INFO_COLOR, 80, 60, 8, 8, 4, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+
+#ifndef VGA_NO_MODE_CHANGE
+
+#ifdef VGA_WIDTH90
+ { M_VGA_M90x25, 0, 90, 25, 8, 16, 2, 1,
+ MDA_BUF_BASE, MDA_BUF_SIZE, MDA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ { M_VGA_C90x25, V_INFO_COLOR, 90, 25, 8, 16, 4, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ { M_VGA_M90x30, 0, 90, 30, 8, 16, 2, 1,
+ MDA_BUF_BASE, MDA_BUF_SIZE, MDA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ { M_VGA_C90x30, V_INFO_COLOR, 90, 30, 8, 16, 4, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ { M_VGA_M90x43, 0, 90, 43, 8, 8, 2, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ { M_VGA_C90x43, V_INFO_COLOR, 90, 43, 8, 8, 4, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ { M_VGA_M90x50, 0, 90, 50, 8, 8, 2, 1,
+ MDA_BUF_BASE, MDA_BUF_SIZE, MDA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ { M_VGA_C90x50, V_INFO_COLOR, 90, 50, 8, 8, 4, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ { M_VGA_M90x60, 0, 90, 60, 8, 8, 2, 1,
+ MDA_BUF_BASE, MDA_BUF_SIZE, MDA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+ { M_VGA_C90x60, V_INFO_COLOR, 90, 60, 8, 8, 4, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+#endif /* VGA_WIDTH90 */
+
+ /* CGA */
+ { M_BG320, V_INFO_COLOR | V_INFO_GRAPHICS, 320, 200, 8, 8, 2, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_CGA },
+ { M_CG320, V_INFO_COLOR | V_INFO_GRAPHICS, 320, 200, 8, 8, 2, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_CGA },
+ { M_BG640, V_INFO_COLOR | V_INFO_GRAPHICS, 640, 200, 8, 8, 1, 1,
+ CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_CGA },
+ /* EGA */
+ { M_CG320_D, V_INFO_COLOR | V_INFO_GRAPHICS, 320, 200, 8, 8, 4, 4,
+ GRAPHICS_BUF_BASE, GRAPHICS_BUF_SIZE, GRAPHICS_BUF_SIZE, 0, 0,
+ V_INFO_MM_PLANAR },
+ { M_CG640_E, V_INFO_COLOR | V_INFO_GRAPHICS, 640, 200, 8, 8, 4, 4,
+ GRAPHICS_BUF_BASE, GRAPHICS_BUF_SIZE, GRAPHICS_BUF_SIZE, 0, 0 ,
+ V_INFO_MM_PLANAR },
+ { M_EGAMONOAPA, V_INFO_GRAPHICS, 640, 350, 8, 14, 4, 4,
+ GRAPHICS_BUF_BASE, GRAPHICS_BUF_SIZE, 64*1024, 0, 0 ,
+ V_INFO_MM_PLANAR },
+ { M_ENHMONOAPA2,V_INFO_GRAPHICS, 640, 350, 8, 14, 4, 4,
+ GRAPHICS_BUF_BASE, GRAPHICS_BUF_SIZE, GRAPHICS_BUF_SIZE, 0, 0 ,
+ V_INFO_MM_PLANAR },
+ { M_CG640x350, V_INFO_COLOR | V_INFO_GRAPHICS, 640, 350, 8, 14, 2, 2,
+ GRAPHICS_BUF_BASE, GRAPHICS_BUF_SIZE, GRAPHICS_BUF_SIZE, 0, 0 ,
+ V_INFO_MM_PLANAR },
+ { M_ENH_CG640, V_INFO_COLOR | V_INFO_GRAPHICS, 640, 350, 8, 14, 4, 4,
+ GRAPHICS_BUF_BASE, GRAPHICS_BUF_SIZE, GRAPHICS_BUF_SIZE, 0, 0 ,
+ V_INFO_MM_PLANAR },
+ /* VGA */
+ { M_BG640x480, V_INFO_COLOR | V_INFO_GRAPHICS, 640, 480, 8, 16, 4, 4,
+ GRAPHICS_BUF_BASE, GRAPHICS_BUF_SIZE, GRAPHICS_BUF_SIZE, 0, 0 ,
+ V_INFO_MM_PLANAR },
+ { M_CG640x480, V_INFO_COLOR | V_INFO_GRAPHICS, 640, 480, 8, 16, 4, 4,
+ GRAPHICS_BUF_BASE, GRAPHICS_BUF_SIZE, GRAPHICS_BUF_SIZE, 0, 0 ,
+ V_INFO_MM_PLANAR },
+ { M_VGA_CG320, V_INFO_COLOR | V_INFO_GRAPHICS, 320, 200, 8, 8, 8, 1,
+ GRAPHICS_BUF_BASE, GRAPHICS_BUF_SIZE, GRAPHICS_BUF_SIZE, 0, 0,
+ V_INFO_MM_PACKED, 1 },
+ { M_VGA_MODEX, V_INFO_COLOR | V_INFO_GRAPHICS, 320, 240, 8, 8, 8, 4,
+ GRAPHICS_BUF_BASE, GRAPHICS_BUF_SIZE, GRAPHICS_BUF_SIZE, 0, 0,
+ V_INFO_MM_VGAX, 1 },
+#endif /* VGA_NO_MODE_CHANGE */
+
+ { EOT },
+};
+
+static int vga_init_done = FALSE;
+#if !defined(VGA_NO_BIOS) && !defined(VGA_NO_MODE_CHANGE)
+static u_char *video_mode_ptr = NULL; /* EGA/VGA */
+static u_char *video_mode_ptr2 = NULL; /* CGA/MDA */
+#endif
+static u_char *mode_map[V_MODE_MAP_SIZE];
+static adp_state_t adpstate;
+static adp_state_t adpstate2;
+static int rows_offset = 1;
+
+/* local macros and functions */
+#define BIOS_SADDRTOLADDR(p) ((((p) & 0xffff0000) >> 12) + ((p) & 0x0000ffff))
+
+#if !defined(VGA_NO_BIOS) && !defined(VGA_NO_MODE_CHANGE)
+static void map_mode_table(u_char *map[], u_char *table, int max);
+#endif
+static void clear_mode_map(video_adapter_t *adp, u_char *map[], int max,
+ int color);
+#if !defined(VGA_NO_BIOS) && !defined(VGA_NO_MODE_CHANGE)
+static int map_mode_num(int mode);
+#endif
+static int map_gen_mode_num(int type, int color, int mode);
+static int map_bios_mode_num(int type, int color, int bios_mode);
+static u_char *get_mode_param(int mode);
+#ifndef VGA_NO_BIOS
+static void fill_adapter_param(int code, video_adapter_t *adp);
+#endif
+static int verify_adapter(video_adapter_t *adp);
+static void update_adapter_info(video_adapter_t *adp, video_info_t *info);
+#if !defined(VGA_NO_BIOS) && !defined(VGA_NO_MODE_CHANGE)
+#define COMP_IDENTICAL 0
+#define COMP_SIMILAR 1
+#define COMP_DIFFERENT 2
+static int comp_adpregs(u_char *buf1, u_char *buf2);
+#endif
+static int probe_adapters(void);
+static int set_line_length(video_adapter_t *adp, int pixel);
+static int set_display_start(video_adapter_t *adp, int x, int y);
+
+#ifndef VGA_NO_MODE_CHANGE
+#ifdef VGA_WIDTH90
+static void set_width90(adp_state_t *params);
+#endif
+#endif /* !VGA_NO_MODE_CHANGE */
+
+#ifndef VGA_NO_FONT_LOADING
+#define PARAM_BUFSIZE 6
+static void set_font_mode(video_adapter_t *adp, u_char *buf);
+static void set_normal_mode(video_adapter_t *adp, u_char *buf);
+#endif
+
+#ifndef VGA_NO_MODE_CHANGE
+static void filll_io(int val, vm_offset_t d, size_t size);
+static void planar_fill(video_adapter_t *adp, int val);
+static void packed_fill(video_adapter_t *adp, int val);
+static void direct_fill(video_adapter_t *adp, int val);
+#ifdef notyet
+static void planar_fill_rect(video_adapter_t *adp, int val, int x, int y,
+ int cx, int cy);
+static void packed_fill_rect(video_adapter_t *adp, int val, int x, int y,
+ int cx, int cy);
+static void direct_fill_rect16(video_adapter_t *adp, int val, int x, int y,
+ int cx, int cy);
+static void direct_fill_rect24(video_adapter_t *adp, int val, int x, int y,
+ int cx, int cy);
+static void direct_fill_rect32(video_adapter_t *adp, int val, int x, int y,
+ int cx, int cy);
+#endif /* notyet */
+#endif /* !VGA_NO_MODE_CHANGE */
+
+static void dump_buffer(u_char *buf, size_t len);
+
+#define ISMAPPED(pa, width) \
+ (((pa) <= (u_long)0x1000 - (width)) \
+ || ((pa) >= ISA_HOLE_START && (pa) <= 0x100000 - (width)))
+
+#define prologue(adp, flag, err) \
+ if (!vga_init_done || !((adp)->va_flags & (flag))) \
+ return (err)
+
+/* a backdoor for the console driver */
+static int
+vga_configure(int flags)
+{
+ int i;
+
+ probe_adapters();
+ for (i = 0; i < biosadapters; ++i) {
+ if (!probe_done(&biosadapter[i]))
+ continue;
+ biosadapter[i].va_flags |= V_ADP_INITIALIZED;
+ if (!config_done(&biosadapter[i])) {
+ if (vid_register(&biosadapter[i]) < 0)
+ continue;
+ biosadapter[i].va_flags |= V_ADP_REGISTERED;
+ }
+ }
+ if (vga_sub_configure != NULL)
+ (*vga_sub_configure)(flags);
+
+ return biosadapters;
+}
+
+/* local subroutines */
+
+#if !defined(VGA_NO_BIOS) && !defined(VGA_NO_MODE_CHANGE)
+/* construct the mode parameter map */
+static void
+map_mode_table(u_char *map[], u_char *table, int max)
+{
+ int i;
+
+ for(i = 0; i < max; ++i)
+ map[i] = table + i*V_MODE_PARAM_SIZE;
+ for(; i < V_MODE_MAP_SIZE; ++i)
+ map[i] = NULL;
+}
+#endif /* !VGA_NO_BIOS && !VGA_NO_MODE_CHANGE */
+
+static void
+clear_mode_map(video_adapter_t *adp, u_char *map[], int max, int color)
+{
+ video_info_t info;
+ int i;
+
+ /*
+ * NOTE: we don't touch `bios_vmode[]' because it is shared
+ * by all adapters.
+ */
+ for(i = 0; i < max; ++i) {
+ if (vga_get_info(adp, i, &info))
+ continue;
+ if ((info.vi_flags & V_INFO_COLOR) != color)
+ map[i] = NULL;
+ }
+}
+
+#if !defined(VGA_NO_BIOS) && !defined(VGA_NO_MODE_CHANGE)
+/* map the non-standard video mode to a known mode number */
+static int
+map_mode_num(int mode)
+{
+ static struct {
+ int from;
+ int to;
+ } mode_map[] = {
+ { M_ENH_B80x43, M_ENH_B80x25 },
+ { M_ENH_C80x43, M_ENH_C80x25 },
+ { M_VGA_M80x30, M_VGA_M80x25 },
+ { M_VGA_C80x30, M_VGA_C80x25 },
+ { M_VGA_M80x50, M_VGA_M80x25 },
+ { M_VGA_C80x50, M_VGA_C80x25 },
+ { M_VGA_M80x60, M_VGA_M80x25 },
+ { M_VGA_C80x60, M_VGA_C80x25 },
+#ifdef VGA_WIDTH90
+ { M_VGA_M90x25, M_VGA_M80x25 },
+ { M_VGA_C90x25, M_VGA_C80x25 },
+ { M_VGA_M90x30, M_VGA_M80x25 },
+ { M_VGA_C90x30, M_VGA_C80x25 },
+ { M_VGA_M90x43, M_ENH_B80x25 },
+ { M_VGA_C90x43, M_ENH_C80x25 },
+ { M_VGA_M90x50, M_VGA_M80x25 },
+ { M_VGA_C90x50, M_VGA_C80x25 },
+ { M_VGA_M90x60, M_VGA_M80x25 },
+ { M_VGA_C90x60, M_VGA_C80x25 },
+#endif
+ { M_VGA_MODEX, M_VGA_CG320 },
+ };
+ int i;
+
+ for (i = 0; i < sizeof(mode_map)/sizeof(mode_map[0]); ++i) {
+ if (mode_map[i].from == mode)
+ return mode_map[i].to;
+ }
+ return mode;
+}
+#endif /* !VGA_NO_BIOS && !VGA_NO_MODE_CHANGE */
+
+/* map a generic video mode to a known mode number */
+static int
+map_gen_mode_num(int type, int color, int mode)
+{
+ static struct {
+ int from;
+ int to_color;
+ int to_mono;
+ } mode_map[] = {
+ { M_TEXT_80x30, M_VGA_C80x30, M_VGA_M80x30, },
+ { M_TEXT_80x43, M_ENH_C80x43, M_ENH_B80x43, },
+ { M_TEXT_80x50, M_VGA_C80x50, M_VGA_M80x50, },
+ { M_TEXT_80x60, M_VGA_C80x60, M_VGA_M80x60, },
+ };
+ int i;
+
+ if (mode == M_TEXT_80x25) {
+ switch (type) {
+
+ case KD_VGA:
+ if (color)
+ return M_VGA_C80x25;
+ else
+ return M_VGA_M80x25;
+ break;
+
+ case KD_EGA:
+ if (color)
+ return M_ENH_C80x25;
+ else
+ return M_EGAMONO80x25;
+ break;
+
+ case KD_CGA:
+ return M_C80x25;
+
+ case KD_MONO:
+ case KD_HERCULES:
+ return M_EGAMONO80x25; /* XXX: this name is confusing */
+
+ default:
+ return -1;
+ }
+ }
+
+ for (i = 0; i < sizeof(mode_map)/sizeof(mode_map[0]); ++i) {
+ if (mode_map[i].from == mode)
+ return ((color) ? mode_map[i].to_color : mode_map[i].to_mono);
+ }
+ return mode;
+}
+
+/* turn the BIOS video number into our video mode number */
+static int
+map_bios_mode_num(int type, int color, int bios_mode)
+{
+ static int cga_modes[7] = {
+ M_B40x25, M_C40x25, /* 0, 1 */
+ M_B80x25, M_C80x25, /* 2, 3 */
+ M_BG320, M_CG320,
+ M_BG640,
+ };
+ static int ega_modes[17] = {
+ M_ENH_B40x25, M_ENH_C40x25, /* 0, 1 */
+ M_ENH_B80x25, M_ENH_C80x25, /* 2, 3 */
+ M_BG320, M_CG320,
+ M_BG640,
+ M_EGAMONO80x25, /* 7 */
+ 8, 9, 10, 11, 12,
+ M_CG320_D,
+ M_CG640_E,
+ M_ENHMONOAPA2, /* XXX: video momery > 64K */
+ M_ENH_CG640, /* XXX: video momery > 64K */
+ };
+ static int vga_modes[20] = {
+ M_VGA_C40x25, M_VGA_C40x25, /* 0, 1 */
+ M_VGA_C80x25, M_VGA_C80x25, /* 2, 3 */
+ M_BG320, M_CG320,
+ M_BG640,
+ M_VGA_M80x25, /* 7 */
+ 8, 9, 10, 11, 12,
+ M_CG320_D,
+ M_CG640_E,
+ M_ENHMONOAPA2,
+ M_ENH_CG640,
+ M_BG640x480, M_CG640x480,
+ M_VGA_CG320,
+ };
+
+ switch (type) {
+
+ case KD_VGA:
+ if (bios_mode < sizeof(vga_modes)/sizeof(vga_modes[0]))
+ return vga_modes[bios_mode];
+ else if (color)
+ return M_VGA_C80x25;
+ else
+ return M_VGA_M80x25;
+ break;
+
+ case KD_EGA:
+ if (bios_mode < sizeof(ega_modes)/sizeof(ega_modes[0]))
+ return ega_modes[bios_mode];
+ else if (color)
+ return M_ENH_C80x25;
+ else
+ return M_EGAMONO80x25;
+ break;
+
+ case KD_CGA:
+ if (bios_mode < sizeof(cga_modes)/sizeof(cga_modes[0]))
+ return cga_modes[bios_mode];
+ else
+ return M_C80x25;
+ break;
+
+ case KD_MONO:
+ case KD_HERCULES:
+ return M_EGAMONO80x25; /* XXX: this name is confusing */
+
+ default:
+ break;
+ }
+ return -1;
+}
+
+/* look up a parameter table entry */
+static u_char
+*get_mode_param(int mode)
+{
+#if !defined(VGA_NO_BIOS) && !defined(VGA_NO_MODE_CHANGE)
+ if (mode >= V_MODE_MAP_SIZE)
+ mode = map_mode_num(mode);
+#endif
+ if ((mode >= 0) && (mode < V_MODE_MAP_SIZE))
+ return mode_map[mode];
+ else
+ return NULL;
+}
+
+#ifndef VGA_NO_BIOS
+static void
+fill_adapter_param(int code, video_adapter_t *adp)
+{
+ static struct {
+ int primary;
+ int secondary;
+ } dcc[] = {
+ { DCC_MONO, DCC_EGA40 /* CGA monitor */ },
+ { DCC_MONO, DCC_EGA80 /* CGA monitor */ },
+ { DCC_MONO, DCC_EGA80 },
+ { DCC_MONO, DCC_EGA80 },
+ { DCC_CGA40, DCC_EGAMONO },
+ { DCC_CGA80, DCC_EGAMONO },
+ { DCC_EGA40 /* CGA monitor */, DCC_MONO},
+ { DCC_EGA80 /* CGA monitor */, DCC_MONO},
+ { DCC_EGA80, DCC_MONO },
+ { DCC_EGA80, DCC_MONO },
+ { DCC_EGAMONO, DCC_CGA40 },
+ { DCC_EGAMONO, DCC_CGA80 },
+ };
+
+ if ((code < 0) || (code >= sizeof(dcc)/sizeof(dcc[0]))) {
+ adp[V_ADP_PRIMARY] = adapter_init_value[DCC_MONO];
+ adp[V_ADP_SECONDARY] = adapter_init_value[DCC_CGA80];
+ } else {
+ adp[V_ADP_PRIMARY] = adapter_init_value[dcc[code].primary];
+ adp[V_ADP_SECONDARY] = adapter_init_value[dcc[code].secondary];
+ }
+}
+#endif /* VGA_NO_BIOS */
+
+static int
+verify_adapter(video_adapter_t *adp)
+{
+ vm_offset_t buf;
+ u_int16_t v;
+#if !defined(VGA_NO_BIOS) && !defined(VGA_NO_MODE_CHANGE)
+ u_int32_t p;
+#endif
+
+ buf = BIOS_PADDRTOVADDR(adp->va_window);
+ v = readw(buf);
+ writew(buf, 0xA55A);
+ if (readw(buf) != 0xA55A)
+ return ENXIO;
+ writew(buf, v);
+
+ switch (adp->va_type) {
+
+ case KD_EGA:
+ outb(adp->va_crtc_addr, 7);
+ if (inb(adp->va_crtc_addr) == 7) {
+ adp->va_type = KD_VGA;
+ adp->va_name = "vga";
+ adp->va_flags |= V_ADP_STATESAVE | V_ADP_PALETTE;
+ }
+ adp->va_flags |= V_ADP_STATELOAD | V_ADP_BORDER;
+ /* the color adapter may be in the 40x25 mode... XXX */
+
+#if !defined(VGA_NO_BIOS) && !defined(VGA_NO_MODE_CHANGE)
+ /* get the BIOS video mode pointer */
+ p = *(u_int32_t *)BIOS_PADDRTOVADDR(0x4a8);
+ p = BIOS_SADDRTOLADDR(p);
+ if (ISMAPPED(p, sizeof(u_int32_t))) {
+ p = *(u_int32_t *)BIOS_PADDRTOVADDR(p);
+ p = BIOS_SADDRTOLADDR(p);
+ if (ISMAPPED(p, V_MODE_PARAM_SIZE))
+ video_mode_ptr = (u_char *)BIOS_PADDRTOVADDR(p);
+ }
+#endif
+ break;
+
+ case KD_CGA:
+ adp->va_flags |= V_ADP_COLOR | V_ADP_BORDER;
+ /* may be in the 40x25 mode... XXX */
+#if !defined(VGA_NO_BIOS) && !defined(VGA_NO_MODE_CHANGE)
+ /* get the BIOS video mode pointer */
+ p = *(u_int32_t *)BIOS_PADDRTOVADDR(0x1d*4);
+ p = BIOS_SADDRTOLADDR(p);
+ video_mode_ptr2 = (u_char *)BIOS_PADDRTOVADDR(p);
+#endif
+ break;
+
+ case KD_MONO:
+#if !defined(VGA_NO_BIOS) && !defined(VGA_NO_MODE_CHANGE)
+ /* get the BIOS video mode pointer */
+ p = *(u_int32_t *)BIOS_PADDRTOVADDR(0x1d*4);
+ p = BIOS_SADDRTOLADDR(p);
+ video_mode_ptr2 = (u_char *)BIOS_PADDRTOVADDR(p);
+#endif
+ break;
+ }
+
+ return 0;
+}
+
+static void
+update_adapter_info(video_adapter_t *adp, video_info_t *info)
+{
+ adp->va_flags &= ~V_ADP_COLOR;
+ adp->va_flags |=
+ (info->vi_flags & V_INFO_COLOR) ? V_ADP_COLOR : 0;
+ adp->va_crtc_addr =
+ (adp->va_flags & V_ADP_COLOR) ? COLOR_CRTC : MONO_CRTC;
+ adp->va_window = BIOS_PADDRTOVADDR(info->vi_window);
+ adp->va_window_size = info->vi_window_size;
+ adp->va_window_gran = info->vi_window_gran;
+ adp->va_window_orig = 0;
+ /* XXX */
+ adp->va_buffer = info->vi_buffer;
+ adp->va_buffer_size = info->vi_buffer_size;
+ if (info->vi_mem_model == V_INFO_MM_VGAX) {
+ adp->va_line_width = info->vi_width/2;
+ } else if (info->vi_flags & V_INFO_GRAPHICS) {
+ switch (info->vi_depth/info->vi_planes) {
+ case 1:
+ adp->va_line_width = info->vi_width/8;
+ break;
+ case 2:
+ adp->va_line_width = info->vi_width/4;
+ break;
+ case 4:
+ adp->va_line_width = info->vi_width/2;
+ break;
+ case 8:
+ default: /* shouldn't happen */
+ adp->va_line_width = info->vi_width;
+ break;
+ }
+ } else {
+ adp->va_line_width = info->vi_width;
+ }
+ adp->va_disp_start.x = 0;
+ adp->va_disp_start.y = 0;
+ bcopy(info, &adp->va_info, sizeof(adp->va_info));
+}
+
+#if !defined(VGA_NO_BIOS) && !defined(VGA_NO_MODE_CHANGE)
+/* compare two parameter table entries */
+static int
+comp_adpregs(u_char *buf1, u_char *buf2)
+{
+ static struct {
+ u_char mask;
+ } params[V_MODE_PARAM_SIZE] = {
+ {0xff}, {0x00}, {0xff}, /* COLS}, ROWS}, POINTS */
+ {0x00}, {0x00}, /* page length */
+ {0xfe}, {0xff}, {0xff}, {0xff}, /* sequencer registers */
+ {0xf3}, /* misc register */
+ {0xff}, {0xff}, {0xff}, {0x7f}, {0xff}, /* CRTC */
+ {0xff}, {0xff}, {0xff}, {0x7f}, {0xff},
+ {0x00}, {0x00}, {0x00}, {0x00}, {0x00},
+ {0x00}, {0xff}, {0x7f}, {0xff}, {0xff},
+ {0x7f}, {0xff}, {0xff}, {0xef}, {0xff},
+ {0xff}, {0xff}, {0xff}, {0xff}, {0xff}, /* attribute controller regs */
+ {0xff}, {0xff}, {0xff}, {0xff}, {0xff},
+ {0xff}, {0xff}, {0xff}, {0xff}, {0xff},
+ {0xff}, {0xff}, {0xff}, {0xff}, {0xf0},
+ {0xff}, {0xff}, {0xff}, {0xff}, {0xff}, /* GDC register */
+ {0xff}, {0xff}, {0xff}, {0xff},
+ };
+ int identical = TRUE;
+ int i;
+
+ if ((buf1 == NULL) || (buf2 == NULL))
+ return COMP_DIFFERENT;
+
+ for (i = 0; i < sizeof(params)/sizeof(params[0]); ++i) {
+ if (params[i].mask == 0) /* don't care */
+ continue;
+ if ((buf1[i] & params[i].mask) != (buf2[i] & params[i].mask))
+ return COMP_DIFFERENT;
+ if (buf1[i] != buf2[i])
+ identical = FALSE;
+ }
+ return (identical) ? COMP_IDENTICAL : COMP_SIMILAR;
+}
+#endif /* !VGA_NO_BIOS && !VGA_NO_MODE_CHANGE */
+
+/* probe video adapters and return the number of detected adapters */
+static int
+probe_adapters(void)
+{
+ video_adapter_t *adp;
+ video_info_t info;
+#if !defined(VGA_NO_BIOS) && !defined(VGA_NO_MODE_CHANGE)
+ u_char *mp;
+#endif
+ int i;
+
+ /* do this test only once */
+ if (vga_init_done)
+ return biosadapters;
+ vga_init_done = TRUE;
+
+ /*
+ * Locate display adapters.
+ * The AT architecture supports upto two adapters. `syscons' allows
+ * the following combinations of adapters:
+ * 1) MDA + CGA
+ * 2) MDA + EGA/VGA color
+ * 3) CGA + EGA/VGA mono
+ * Note that `syscons' doesn't bother with MCGA as it is only
+ * avaiable for low end PS/2 models which has 80286 or earlier CPUs,
+ * thus, they are not running FreeBSD!
+ * When there are two adapaters in the system, one becomes `primary'
+ * and the other `secondary'. The EGA adapter has a set of DIP
+ * switches on board for this information and the EGA BIOS copies
+ * it in the BIOS data area BIOSDATA_VIDEOSWITCH (40:88).
+ * The VGA BIOS has more sophisticated mechanism and has this
+ * information in BIOSDATA_DCCINDEX (40:8a), but it also maintains
+ * compatibility with the EGA BIOS by updating BIOSDATA_VIDEOSWITCH.
+ */
+
+ /*
+ * Check rtc and BIOS data area.
+ * XXX: we don't use BIOSDATA_EQUIPMENT, since it is not a dead
+ * copy of RTC_EQUIPMENT. Bits 4 and 5 of ETC_EQUIPMENT are
+ * zeros for EGA and VGA. However, the EGA/VGA BIOS sets
+ * these bits in BIOSDATA_EQUIPMENT according to the monitor
+ * type detected.
+ */
+#ifndef VGA_NO_BIOS
+ if (*(u_int32_t *)BIOS_PADDRTOVADDR(0x4a8)) {
+ /* EGA/VGA BIOS is present */
+ fill_adapter_param(readb(BIOS_PADDRTOVADDR(0x488)) & 0x0f,
+ biosadapter);
+ } else {
+ switch ((rtcin(RTC_EQUIPMENT) >> 4) & 3) { /* bit 4 and 5 */
+ case 0:
+ /* EGA/VGA: shouldn't be happening */
+ fill_adapter_param(readb(BIOS_PADDRTOVADDR(0x488)) & 0x0f,
+ biosadapter);
+ break;
+ case 1:
+ /* CGA 40x25 */
+ /* FIXME: switch to the 80x25 mode? XXX */
+ biosadapter[V_ADP_PRIMARY] = adapter_init_value[DCC_CGA40];
+ biosadapter[V_ADP_SECONDARY] = adapter_init_value[DCC_MONO];
+ break;
+ case 2:
+ /* CGA 80x25 */
+ biosadapter[V_ADP_PRIMARY] = adapter_init_value[DCC_CGA80];
+ biosadapter[V_ADP_SECONDARY] = adapter_init_value[DCC_MONO];
+ break;
+ case 3:
+ /* MDA */
+ biosadapter[V_ADP_PRIMARY] = adapter_init_value[DCC_MONO];
+ biosadapter[V_ADP_SECONDARY] = adapter_init_value[DCC_CGA80];
+ break;
+ }
+ }
+#else
+ /* assume EGA/VGA? XXX */
+ biosadapter[V_ADP_PRIMARY] = adapter_init_value[DCC_EGA80];
+ biosadapter[V_ADP_SECONDARY] = adapter_init_value[DCC_MONO];
+#endif /* VGA_NO_BIOS */
+
+ biosadapters = 0;
+ if (verify_adapter(&biosadapter[V_ADP_SECONDARY]) == 0) {
+ ++biosadapters;
+ biosadapter[V_ADP_SECONDARY].va_flags |= V_ADP_PROBED;
+ biosadapter[V_ADP_SECONDARY].va_mode =
+ biosadapter[V_ADP_SECONDARY].va_initial_mode =
+ map_bios_mode_num(biosadapter[V_ADP_SECONDARY].va_type,
+ biosadapter[V_ADP_SECONDARY].va_flags
+ & V_ADP_COLOR,
+ biosadapter[V_ADP_SECONDARY].va_initial_bios_mode);
+ } else {
+ biosadapter[V_ADP_SECONDARY].va_type = -1;
+ }
+ if (verify_adapter(&biosadapter[V_ADP_PRIMARY]) == 0) {
+ ++biosadapters;
+ biosadapter[V_ADP_PRIMARY].va_flags |= V_ADP_PROBED;
+#ifndef VGA_NO_BIOS
+ biosadapter[V_ADP_PRIMARY].va_initial_bios_mode =
+ readb(BIOS_PADDRTOVADDR(0x449));
+#else
+ biosadapter[V_ADP_PRIMARY].va_initial_bios_mode = 3; /* XXX */
+#endif
+ biosadapter[V_ADP_PRIMARY].va_mode =
+ biosadapter[V_ADP_PRIMARY].va_initial_mode =
+ map_bios_mode_num(biosadapter[V_ADP_PRIMARY].va_type,
+ biosadapter[V_ADP_PRIMARY].va_flags & V_ADP_COLOR,
+ biosadapter[V_ADP_PRIMARY].va_initial_bios_mode);
+ } else {
+ biosadapter[V_ADP_PRIMARY] = biosadapter[V_ADP_SECONDARY];
+ biosadapter[V_ADP_SECONDARY].va_type = -1;
+ }
+ if (biosadapters == 0)
+ return biosadapters;
+ biosadapter[V_ADP_PRIMARY].va_unit = V_ADP_PRIMARY;
+ biosadapter[V_ADP_SECONDARY].va_unit = V_ADP_SECONDARY;
+
+#if 0 /* we don't need these... */
+ fb_init_struct(&biosadapter[V_ADP_PRIMARY], ...);
+ fb_init_struct(&biosadapter[V_ADP_SECONDARY], ...);
+#endif
+
+#if notyet
+ /*
+ * We cannot have two video adapter of the same type; there must be
+ * only one of color or mono adapter, or one each of them.
+ */
+ if (biosadapters > 1) {
+ if (!((biosadapter[0].va_flags ^ biosadapter[1].va_flags)
+ & V_ADP_COLOR))
+ /* we have two mono or color adapters!! */
+ return (biosadapters = 0);
+ }
+#endif
+
+ /*
+ * Ensure a zero start address. The registers are w/o
+ * for old hardware so it's too hard to relocate the active screen
+ * memory.
+ * This must be done before vga_save_state() for VGA.
+ */
+ outb(biosadapter[V_ADP_PRIMARY].va_crtc_addr, 12);
+ outb(biosadapter[V_ADP_PRIMARY].va_crtc_addr + 1, 0);
+ outb(biosadapter[V_ADP_PRIMARY].va_crtc_addr, 13);
+ outb(biosadapter[V_ADP_PRIMARY].va_crtc_addr + 1, 0);
+
+ /* the video mode parameter table in EGA/VGA BIOS */
+ /* NOTE: there can be only one EGA/VGA, wheather color or mono,
+ * recognized by the video BIOS.
+ */
+ if ((biosadapter[V_ADP_PRIMARY].va_type == KD_EGA) ||
+ (biosadapter[V_ADP_PRIMARY].va_type == KD_VGA)) {
+ adp = &biosadapter[V_ADP_PRIMARY];
+ } else if ((biosadapter[V_ADP_SECONDARY].va_type == KD_EGA) ||
+ (biosadapter[V_ADP_SECONDARY].va_type == KD_VGA)) {
+ adp = &biosadapter[V_ADP_SECONDARY];
+ } else {
+ adp = NULL;
+ }
+ bzero(mode_map, sizeof(mode_map));
+ if (adp != NULL) {
+ if (adp->va_type == KD_VGA) {
+ vga_save_state(adp, &adpstate, sizeof(adpstate));
+#if defined(VGA_NO_BIOS) || defined(VGA_NO_MODE_CHANGE)
+ mode_map[adp->va_initial_mode] = adpstate.regs;
+ rows_offset = 1;
+#else /* VGA_NO_BIOS || VGA_NO_MODE_CHANGE */
+ if (video_mode_ptr == NULL) {
+ mode_map[adp->va_initial_mode] = adpstate.regs;
+ rows_offset = 1;
+ } else {
+ /* discard the table if we are not familiar with it... */
+ map_mode_table(mode_map, video_mode_ptr, M_VGA_CG320 + 1);
+ mp = get_mode_param(adp->va_initial_mode);
+ if (mp != NULL)
+ bcopy(mp, adpstate2.regs, sizeof(adpstate2.regs));
+ switch (comp_adpregs(adpstate.regs, mp)) {
+ case COMP_IDENTICAL:
+ /*
+ * OK, this parameter table looks reasonably familiar
+ * to us...
+ */
+ /*
+ * This is a kludge for Toshiba DynaBook SS433
+ * whose BIOS video mode table entry has the actual #
+ * of rows at the offset 1; BIOSes from other
+ * manufacturers store the # of rows - 1 there. XXX
+ */
+ rows_offset = adpstate.regs[1] + 1 - mp[1];
+ break;
+
+ case COMP_SIMILAR:
+ /*
+ * Not exactly the same, but similar enough to be
+ * trusted. However, use the saved register values
+ * for the initial mode and other modes which are
+ * based on the initial mode.
+ */
+ mode_map[adp->va_initial_mode] = adpstate.regs;
+ rows_offset = adpstate.regs[1] + 1 - mp[1];
+ adpstate.regs[1] -= rows_offset - 1;
+ break;
+
+ case COMP_DIFFERENT:
+ default:
+ /*
+ * Don't use the paramter table in BIOS. It doesn't
+ * look familiar to us. Video mode switching is allowed
+ * only if the new mode is the same as or based on
+ * the initial mode.
+ */
+ video_mode_ptr = NULL;
+ bzero(mode_map, sizeof(mode_map));
+ mode_map[adp->va_initial_mode] = adpstate.regs;
+ rows_offset = 1;
+ break;
+ }
+ }
+#endif /* VGA_NO_BIOS || VGA_NO_MODE_CHANGE */
+
+#ifndef VGA_NO_MODE_CHANGE
+ adp->va_flags |= V_ADP_MODECHANGE;
+#endif
+#ifndef VGA_NO_FONT_LOADING
+ adp->va_flags |= V_ADP_FONT;
+#endif
+ } else if (adp->va_type == KD_EGA) {
+#if defined(VGA_NO_BIOS) || defined(VGA_NO_MODE_CHANGE)
+ rows_offset = 1;
+#else /* VGA_NO_BIOS || VGA_NO_MODE_CHANGE */
+ if (video_mode_ptr == NULL) {
+ rows_offset = 1;
+ } else {
+ map_mode_table(mode_map, video_mode_ptr, M_ENH_C80x25 + 1);
+ /* XXX how can one validate the EGA table... */
+ mp = get_mode_param(adp->va_initial_mode);
+ if (mp != NULL) {
+ adp->va_flags |= V_ADP_MODECHANGE;
+#ifndef VGA_NO_FONT_LOADING
+ adp->va_flags |= V_ADP_FONT;
+#endif
+ rows_offset = 1;
+ } else {
+ /*
+ * This is serious. We will not be able to switch video
+ * modes at all...
+ */
+ video_mode_ptr = NULL;
+ bzero(mode_map, sizeof(mode_map));
+ rows_offset = 1;
+ }
+ }
+#endif /* VGA_NO_BIOS || VGA_NO_MODE_CHANGE */
+ }
+ }
+
+ /* remove conflicting modes if we have more than one adapter */
+ if (biosadapters > 0) {
+ for (i = 0; i < biosadapters; ++i) {
+ if (!(biosadapter[i].va_flags & V_ADP_MODECHANGE))
+ continue;
+ clear_mode_map(&biosadapter[i], mode_map, M_VGA_CG320 + 1,
+ (biosadapter[i].va_flags & V_ADP_COLOR) ?
+ V_INFO_COLOR : 0);
+ if ((biosadapter[i].va_type == KD_VGA)
+ || (biosadapter[i].va_type == KD_EGA)) {
+ biosadapter[i].va_io_base =
+ (biosadapter[i].va_flags & V_ADP_COLOR) ?
+ IO_VGA : IO_MDA;
+ biosadapter[i].va_io_size = 32;
+ }
+ }
+ }
+
+ /* buffer address */
+ vga_get_info(&biosadapter[V_ADP_PRIMARY],
+ biosadapter[V_ADP_PRIMARY].va_initial_mode, &info);
+ info.vi_flags &= ~V_INFO_LINEAR; /* XXX */
+ update_adapter_info(&biosadapter[V_ADP_PRIMARY], &info);
+
+ if (biosadapters > 1) {
+ vga_get_info(&biosadapter[V_ADP_SECONDARY],
+ biosadapter[V_ADP_SECONDARY].va_initial_mode, &info);
+ info.vi_flags &= ~V_INFO_LINEAR; /* XXX */
+ update_adapter_info(&biosadapter[V_ADP_SECONDARY], &info);
+ }
+
+ /*
+ * XXX: we should verify the following values for the primary adapter...
+ * crtc I/O port address: *(u_int16_t *)BIOS_PADDRTOVADDR(0x463);
+ * color/mono display: (*(u_int8_t *)BIOS_PADDRTOVADDR(0x487) & 0x02)
+ * ? 0 : V_ADP_COLOR;
+ * columns: *(u_int8_t *)BIOS_PADDRTOVADDR(0x44a);
+ * rows: *(u_int8_t *)BIOS_PADDRTOVADDR(0x484);
+ * font size: *(u_int8_t *)BIOS_PADDRTOVADDR(0x485);
+ * buffer size: *(u_int16_t *)BIOS_PADDRTOVADDR(0x44c);
+ */
+
+ return biosadapters;
+}
+
+/* set the scan line length in pixel */
+static int
+set_line_length(video_adapter_t *adp, int pixel)
+{
+ u_char *mp;
+ int ppw; /* pixels per word */
+ int bpl; /* bytes per line */
+ int count;
+
+ if ((adp->va_type != KD_VGA) && (adp->va_type != KD_EGA))
+ return ENODEV;
+ mp = get_mode_param(adp->va_mode);
+ if (mp == NULL)
+ return EINVAL;
+
+ switch (adp->va_info.vi_mem_model) {
+ case V_INFO_MM_PLANAR:
+ ppw = 16/(adp->va_info.vi_depth/adp->va_info.vi_planes);
+ count = (pixel + ppw - 1)/ppw/2;
+ bpl = ((pixel + ppw - 1)/ppw/2)*4;
+ break;
+ case V_INFO_MM_PACKED:
+ count = (pixel + 7)/8;
+ bpl = ((pixel + 7)/8)*8;
+ break;
+ case V_INFO_MM_TEXT:
+ count = (pixel + 7)/8; /* columns */
+ bpl = (pixel + 7)/8; /* columns */
+ break;
+ default:
+ return ENODEV;
+ }
+
+ if (mp[10 + 0x17] & 0x40) /* CRTC mode control reg */
+ count *= 2; /* byte mode */
+ outb(adp->va_crtc_addr, 0x13);
+ outb(adp->va_crtc_addr + 1, count);
+ adp->va_line_width = bpl;
+
+ return 0;
+}
+
+static int
+set_display_start(video_adapter_t *adp, int x, int y)
+{
+ int off; /* byte offset (graphics mode)/word offset (text mode) */
+ int poff; /* pixel offset */
+ int roff; /* row offset */
+ int ppb; /* pixels per byte */
+
+ if ((adp->va_type != KD_VGA) && (adp->va_type != KD_EGA))
+ x &= ~7;
+ if (adp->va_info.vi_flags & V_INFO_GRAPHICS) {
+ ppb = 8/(adp->va_info.vi_depth/adp->va_info.vi_planes);
+ off = y*adp->va_line_width + x/ppb;
+ roff = 0;
+ poff = x%ppb;
+ } else {
+ if ((adp->va_type == KD_VGA) || (adp->va_type == KD_EGA)) {
+ outb(TSIDX, 1);
+ if (inb(TSREG) & 1)
+ ppb = 9;
+ else
+ ppb = 8;
+ } else {
+ ppb = 8;
+ }
+ off = y/adp->va_info.vi_cheight*adp->va_line_width + x/ppb;
+ roff = y%adp->va_info.vi_cheight;
+ /* FIXME: is this correct? XXX */
+ if (ppb == 8)
+ poff = x%ppb;
+ else
+ poff = (x + 8)%ppb;
+ }
+
+ /* start address */
+ outb(adp->va_crtc_addr, 0xc); /* high */
+ outb(adp->va_crtc_addr + 1, off >> 8);
+ outb(adp->va_crtc_addr, 0xd); /* low */
+ outb(adp->va_crtc_addr + 1, off & 0xff);
+
+ /* horizontal pel pan */
+ if ((adp->va_type == KD_VGA) || (adp->va_type == KD_EGA)) {
+ inb(adp->va_crtc_addr + 6);
+ outb(ATC, 0x13 | 0x20);
+ outb(ATC, poff);
+ inb(adp->va_crtc_addr + 6);
+ outb(ATC, 0x20);
+ }
+
+ /* preset raw scan */
+ outb(adp->va_crtc_addr, 8);
+ outb(adp->va_crtc_addr + 1, roff);
+
+ adp->va_disp_start.x = x;
+ adp->va_disp_start.y = y;
+ return 0;
+}
+
+#ifndef VGA_NO_MODE_CHANGE
+#if defined(__i386__) || defined(__amd64__) /* XXX */
+static void
+fill(int val, void *d, size_t size)
+{
+ u_char *p = d;
+
+ while (size-- > 0)
+ *p++ = val;
+}
+#endif /* __i386__ */
+
+static void
+filll_io(int val, vm_offset_t d, size_t size)
+{
+ while (size-- > 0) {
+ writel(d, val);
+ d += sizeof(u_int32_t);
+ }
+}
+#endif /* !VGA_NO_MODE_CHANGE */
+
+/* entry points */
+
+#if 0
+static int
+vga_nop(void)
+{
+ return 0;
+}
+#endif
+
+static int
+vga_error(void)
+{
+ return ENODEV;
+}
+
+static int
+vga_probe(int unit, video_adapter_t **adpp, void *arg, int flags)
+{
+ probe_adapters();
+ if (unit >= biosadapters)
+ return ENXIO;
+
+ *adpp = &biosadapter[unit];
+
+ return 0;
+}
+
+static int
+vga_init(int unit, video_adapter_t *adp, int flags)
+{
+ if ((unit >= biosadapters) || (adp == NULL) || !probe_done(adp))
+ return ENXIO;
+
+ if (!init_done(adp)) {
+ /* nothing to do really... */
+ adp->va_flags |= V_ADP_INITIALIZED;
+ }
+
+ if (!config_done(adp)) {
+ if (vid_register(adp) < 0)
+ return ENXIO;
+ adp->va_flags |= V_ADP_REGISTERED;
+ }
+ if (vga_sub_configure != NULL)
+ (*vga_sub_configure)(0);
+
+ return 0;
+}
+
+/*
+ * get_info():
+ * Return the video_info structure of the requested video mode.
+ *
+ * all adapters
+ */
+static int
+vga_get_info(video_adapter_t *adp, int mode, video_info_t *info)
+{
+ int i;
+
+ if (!vga_init_done)
+ return ENXIO;
+
+ mode = map_gen_mode_num(adp->va_type, adp->va_flags & V_ADP_COLOR, mode);
+#ifndef VGA_NO_MODE_CHANGE
+ if (adp->va_flags & V_ADP_MODECHANGE) {
+ /*
+ * If the parameter table entry for this mode is not found,
+ * the mode is not supported...
+ */
+ if (get_mode_param(mode) == NULL)
+ return EINVAL;
+ } else
+#endif /* VGA_NO_MODE_CHANGE */
+ {
+ /*
+ * Even if we don't support video mode switching on this adapter,
+ * the information on the initial (thus current) video mode
+ * should be made available.
+ */
+ if (mode != adp->va_initial_mode)
+ return EINVAL;
+ }
+
+ for (i = 0; bios_vmode[i].vi_mode != EOT; ++i) {
+ if (bios_vmode[i].vi_mode == NA)
+ continue;
+ if (mode == bios_vmode[i].vi_mode) {
+ *info = bios_vmode[i];
+ /* XXX */
+ info->vi_buffer_size = info->vi_window_size*info->vi_planes;
+ return 0;
+ }
+ }
+ return EINVAL;
+}
+
+/*
+ * query_mode():
+ * Find a video mode matching the requested parameters.
+ * Fields filled with 0 are considered "don't care" fields and
+ * match any modes.
+ *
+ * all adapters
+ */
+static int
+vga_query_mode(video_adapter_t *adp, video_info_t *info)
+{
+ int i;
+
+ if (!vga_init_done)
+ return ENXIO;
+
+ for (i = 0; bios_vmode[i].vi_mode != EOT; ++i) {
+ if (bios_vmode[i].vi_mode == NA)
+ continue;
+
+ if ((info->vi_width != 0)
+ && (info->vi_width != bios_vmode[i].vi_width))
+ continue;
+ if ((info->vi_height != 0)
+ && (info->vi_height != bios_vmode[i].vi_height))
+ continue;
+ if ((info->vi_cwidth != 0)
+ && (info->vi_cwidth != bios_vmode[i].vi_cwidth))
+ continue;
+ if ((info->vi_cheight != 0)
+ && (info->vi_cheight != bios_vmode[i].vi_cheight))
+ continue;
+ if ((info->vi_depth != 0)
+ && (info->vi_depth != bios_vmode[i].vi_depth))
+ continue;
+ if ((info->vi_planes != 0)
+ && (info->vi_planes != bios_vmode[i].vi_planes))
+ continue;
+ /* XXX: should check pixel format, memory model */
+ if ((info->vi_flags != 0)
+ && (info->vi_flags != bios_vmode[i].vi_flags))
+ continue;
+
+ /* verify if this mode is supported on this adapter */
+ if (vga_get_info(adp, bios_vmode[i].vi_mode, info))
+ continue;
+ return 0;
+ }
+ return ENODEV;
+}
+
+/*
+ * set_mode():
+ * Change the video mode.
+ *
+ * EGA/VGA
+ */
+
+#ifndef VGA_NO_MODE_CHANGE
+#ifdef VGA_WIDTH90
+static void
+set_width90(adp_state_t *params)
+{
+ /*
+ * Based on code submitted by Kelly Yancey (kbyanc@freedomnet.com)
+ * and alexv@sui.gda.itesm.mx.
+ */
+ params->regs[5] |= 1; /* toggle 8 pixel wide fonts */
+ params->regs[10+0x0] = 0x6b;
+ params->regs[10+0x1] = 0x59;
+ params->regs[10+0x2] = 0x5a;
+ params->regs[10+0x3] = 0x8e;
+ params->regs[10+0x4] = 0x5e;
+ params->regs[10+0x5] = 0x8a;
+ params->regs[10+0x13] = 45;
+ params->regs[35+0x13] = 0;
+}
+#endif /* VGA_WIDTH90 */
+#endif /* !VGA_NO_MODE_CHANGE */
+
+static int
+vga_set_mode(video_adapter_t *adp, int mode)
+{
+#ifndef VGA_NO_MODE_CHANGE
+ video_info_t info;
+ adp_state_t params;
+
+ prologue(adp, V_ADP_MODECHANGE, ENODEV);
+
+ mode = map_gen_mode_num(adp->va_type,
+ adp->va_flags & V_ADP_COLOR, mode);
+ if (vga_get_info(adp, mode, &info))
+ return EINVAL;
+
+#if VGA_DEBUG > 1
+ printf("vga_set_mode(): setting mode %d\n", mode);
+#endif
+
+ params.sig = V_STATE_SIG;
+ bcopy(get_mode_param(mode), params.regs, sizeof(params.regs));
+
+ switch (mode) {
+#ifdef VGA_WIDTH90
+ case M_VGA_C90x60: case M_VGA_M90x60:
+ set_width90(&params);
+ /* FALLTHROUGH */
+#endif
+ case M_VGA_C80x60: case M_VGA_M80x60:
+ params.regs[2] = 0x08;
+ params.regs[19] = 0x47;
+ goto special_480l;
+
+#ifdef VGA_WIDTH90
+ case M_VGA_C90x30: case M_VGA_M90x30:
+ set_width90(&params);
+ /* FALLTHROUGH */
+#endif
+ case M_VGA_C80x30: case M_VGA_M80x30:
+ params.regs[19] = 0x4f;
+special_480l:
+ params.regs[9] |= 0xc0;
+ params.regs[16] = 0x08;
+ params.regs[17] = 0x3e;
+ params.regs[26] = 0xea;
+ params.regs[28] = 0xdf;
+ params.regs[31] = 0xe7;
+ params.regs[32] = 0x04;
+ goto setup_mode;
+
+#ifdef VGA_WIDTH90
+ case M_VGA_C90x43: case M_VGA_M90x43:
+ set_width90(&params);
+ /* FALLTHROUGH */
+#endif
+ case M_ENH_C80x43: case M_ENH_B80x43:
+ params.regs[28] = 87;
+ goto special_80x50;
+
+#ifdef VGA_WIDTH90
+ case M_VGA_C90x50: case M_VGA_M90x50:
+ set_width90(&params);
+ /* FALLTHROUGH */
+#endif
+ case M_VGA_C80x50: case M_VGA_M80x50:
+special_80x50:
+ params.regs[2] = 8;
+ params.regs[19] = 7;
+ goto setup_mode;
+
+#ifdef VGA_WIDTH90
+ case M_VGA_C90x25: case M_VGA_M90x25:
+ set_width90(&params);
+ /* FALLTHROUGH */
+#endif
+ case M_VGA_C40x25: case M_VGA_C80x25:
+ case M_VGA_M80x25:
+ case M_B40x25: case M_C40x25:
+ case M_B80x25: case M_C80x25:
+ case M_ENH_B40x25: case M_ENH_C40x25:
+ case M_ENH_B80x25: case M_ENH_C80x25:
+ case M_EGAMONO80x25:
+
+setup_mode:
+ vga_load_state(adp, &params);
+ break;
+
+ case M_VGA_MODEX:
+ /* "unchain" the VGA mode */
+ params.regs[5-1+0x04] &= 0xf7;
+ params.regs[5-1+0x04] |= 0x04;
+ /* turn off doubleword mode */
+ params.regs[10+0x14] &= 0xbf;
+ /* turn off word addressing */
+ params.regs[10+0x17] |= 0x40;
+ /* set logical screen width */
+ params.regs[10+0x13] = 80;
+ /* set 240 lines */
+ params.regs[10+0x11] = 0x2c;
+ params.regs[10+0x06] = 0x0d;
+ params.regs[10+0x07] = 0x3e;
+ params.regs[10+0x10] = 0xea;
+ params.regs[10+0x11] = 0xac;
+ params.regs[10+0x12] = 0xdf;
+ params.regs[10+0x15] = 0xe7;
+ params.regs[10+0x16] = 0x06;
+ /* set vertical sync polarity to reflect aspect ratio */
+ params.regs[9] = 0xe3;
+ goto setup_grmode;
+
+ case M_BG320: case M_CG320: case M_BG640:
+ case M_CG320_D: case M_CG640_E:
+ case M_CG640x350: case M_ENH_CG640:
+ case M_BG640x480: case M_CG640x480: case M_VGA_CG320:
+
+setup_grmode:
+ vga_load_state(adp, &params);
+ break;
+
+ default:
+ return EINVAL;
+ }
+
+ adp->va_mode = mode;
+ info.vi_flags &= ~V_INFO_LINEAR; /* XXX */
+ update_adapter_info(adp, &info);
+
+ /* move hardware cursor out of the way */
+ (*vidsw[adp->va_index]->set_hw_cursor)(adp, -1, -1);
+
+ return 0;
+#else /* VGA_NO_MODE_CHANGE */
+ return ENODEV;
+#endif /* VGA_NO_MODE_CHANGE */
+}
+
+#ifndef VGA_NO_FONT_LOADING
+
+static void
+set_font_mode(video_adapter_t *adp, u_char *buf)
+{
+ u_char *mp;
+ int s;
+
+ s = splhigh();
+
+ /* save register values */
+ if (adp->va_type == KD_VGA) {
+ outb(TSIDX, 0x02); buf[0] = inb(TSREG);
+ outb(TSIDX, 0x04); buf[1] = inb(TSREG);
+ outb(GDCIDX, 0x04); buf[2] = inb(GDCREG);
+ outb(GDCIDX, 0x05); buf[3] = inb(GDCREG);
+ outb(GDCIDX, 0x06); buf[4] = inb(GDCREG);
+ inb(adp->va_crtc_addr + 6);
+ outb(ATC, 0x10); buf[5] = inb(ATC + 1);
+ } else /* if (adp->va_type == KD_EGA) */ {
+ /*
+ * EGA cannot be read; copy parameters from the mode parameter
+ * table.
+ */
+ mp = get_mode_param(adp->va_mode);
+ buf[0] = mp[5 + 0x02 - 1];
+ buf[1] = mp[5 + 0x04 - 1];
+ buf[2] = mp[55 + 0x04];
+ buf[3] = mp[55 + 0x05];
+ buf[4] = mp[55 + 0x06];
+ buf[5] = mp[35 + 0x10];
+ }
+
+ /* setup vga for loading fonts */
+ inb(adp->va_crtc_addr + 6); /* reset flip-flop */
+ outb(ATC, 0x10); outb(ATC, buf[5] & ~0x01);
+ inb(adp->va_crtc_addr + 6); /* reset flip-flop */
+ outb(ATC, 0x20); /* enable palette */
+
+#if VGA_SLOW_IOACCESS
+#ifdef VGA_ALT_SEQACCESS
+ outb(TSIDX, 0x00); outb(TSREG, 0x01);
+#endif
+ outb(TSIDX, 0x02); outb(TSREG, 0x04);
+ outb(TSIDX, 0x04); outb(TSREG, 0x07);
+#ifdef VGA_ALT_SEQACCESS
+ outb(TSIDX, 0x00); outb(TSREG, 0x03);
+#endif
+ outb(GDCIDX, 0x04); outb(GDCREG, 0x02);
+ outb(GDCIDX, 0x05); outb(GDCREG, 0x00);
+ outb(GDCIDX, 0x06); outb(GDCREG, 0x04);
+#else /* VGA_SLOW_IOACCESS */
+#ifdef VGA_ALT_SEQACCESS
+ outw(TSIDX, 0x0100);
+#endif
+ outw(TSIDX, 0x0402);
+ outw(TSIDX, 0x0704);
+#ifdef VGA_ALT_SEQACCESS
+ outw(TSIDX, 0x0300);
+#endif
+ outw(GDCIDX, 0x0204);
+ outw(GDCIDX, 0x0005);
+ outw(GDCIDX, 0x0406); /* addr = a0000, 64kb */
+#endif /* VGA_SLOW_IOACCESS */
+
+ splx(s);
+}
+
+static void
+set_normal_mode(video_adapter_t *adp, u_char *buf)
+{
+ int s;
+
+ s = splhigh();
+
+ /* setup vga for normal operation mode again */
+ inb(adp->va_crtc_addr + 6); /* reset flip-flop */
+ outb(ATC, 0x10); outb(ATC, buf[5]);
+ inb(adp->va_crtc_addr + 6); /* reset flip-flop */
+ outb(ATC, 0x20); /* enable palette */
+
+#if VGA_SLOW_IOACCESS
+#ifdef VGA_ALT_SEQACCESS
+ outb(TSIDX, 0x00); outb(TSREG, 0x01);
+#endif
+ outb(TSIDX, 0x02); outb(TSREG, buf[0]);
+ outb(TSIDX, 0x04); outb(TSREG, buf[1]);
+#ifdef VGA_ALT_SEQACCESS
+ outb(TSIDX, 0x00); outb(TSREG, 0x03);
+#endif
+ outb(GDCIDX, 0x04); outb(GDCREG, buf[2]);
+ outb(GDCIDX, 0x05); outb(GDCREG, buf[3]);
+ if (adp->va_crtc_addr == MONO_CRTC) {
+ outb(GDCIDX, 0x06); outb(GDCREG,(buf[4] & 0x03) | 0x08);
+ } else {
+ outb(GDCIDX, 0x06); outb(GDCREG,(buf[4] & 0x03) | 0x0c);
+ }
+#else /* VGA_SLOW_IOACCESS */
+#ifdef VGA_ALT_SEQACCESS
+ outw(TSIDX, 0x0100);
+#endif
+ outw(TSIDX, 0x0002 | (buf[0] << 8));
+ outw(TSIDX, 0x0004 | (buf[1] << 8));
+#ifdef VGA_ALT_SEQACCESS
+ outw(TSIDX, 0x0300);
+#endif
+ outw(GDCIDX, 0x0004 | (buf[2] << 8));
+ outw(GDCIDX, 0x0005 | (buf[3] << 8));
+ if (adp->va_crtc_addr == MONO_CRTC)
+ outw(GDCIDX, 0x0006 | (((buf[4] & 0x03) | 0x08)<<8));
+ else
+ outw(GDCIDX, 0x0006 | (((buf[4] & 0x03) | 0x0c)<<8));
+#endif /* VGA_SLOW_IOACCESS */
+
+ splx(s);
+}
+
+#endif /* VGA_NO_FONT_LOADING */
+
+/*
+ * save_font():
+ * Read the font data in the requested font page from the video adapter.
+ *
+ * EGA/VGA
+ */
+static int
+vga_save_font(video_adapter_t *adp, int page, int fontsize, int fontwidth,
+ u_char *data, int ch, int count)
+{
+#ifndef VGA_NO_FONT_LOADING
+ u_char buf[PARAM_BUFSIZE];
+ vm_offset_t segment;
+ int c;
+#ifdef VGA_ALT_SEQACCESS
+ int s;
+ u_char val = 0;
+#endif
+
+ prologue(adp, V_ADP_FONT, ENODEV);
+
+ if (fontsize < 14) {
+ /* FONT_8 */
+ fontsize = 8;
+ } else if (fontsize >= 32) {
+ fontsize = 32;
+ } else if (fontsize >= 16) {
+ /* FONT_16 */
+ fontsize = 16;
+ } else {
+ /* FONT_14 */
+ fontsize = 14;
+ }
+
+ if (page < 0 || page >= 8 || fontwidth != 8)
+ return EINVAL;
+ segment = FONT_BUF + 0x4000*page;
+ if (page > 3)
+ segment -= 0xe000;
+
+#ifdef VGA_ALT_SEQACCESS
+ if (adp->va_type == KD_VGA) { /* what about EGA? XXX */
+ s = splhigh();
+ outb(TSIDX, 0x00); outb(TSREG, 0x01);
+ outb(TSIDX, 0x01); val = inb(TSREG); /* disable screen */
+ outb(TSIDX, 0x01); outb(TSREG, val | 0x20);
+ outb(TSIDX, 0x00); outb(TSREG, 0x03);
+ splx(s);
+ }
+#endif
+
+ set_font_mode(adp, buf);
+ if (fontsize == 32) {
+ bcopy_fromio((uintptr_t)segment + ch*32, data, fontsize*count);
+ } else {
+ for (c = ch; count > 0; ++c, --count) {
+ bcopy_fromio((uintptr_t)segment + c*32, data, fontsize);
+ data += fontsize;
+ }
+ }
+ set_normal_mode(adp, buf);
+
+#ifdef VGA_ALT_SEQACCESS
+ if (adp->va_type == KD_VGA) {
+ s = splhigh();
+ outb(TSIDX, 0x00); outb(TSREG, 0x01);
+ outb(TSIDX, 0x01); outb(TSREG, val & 0xdf); /* enable screen */
+ outb(TSIDX, 0x00); outb(TSREG, 0x03);
+ splx(s);
+ }
+#endif
+
+ return 0;
+#else /* VGA_NO_FONT_LOADING */
+ return ENODEV;
+#endif /* VGA_NO_FONT_LOADING */
+}
+
+/*
+ * load_font():
+ * Set the font data in the requested font page.
+ * NOTE: it appears that some recent video adapters do not support
+ * the font page other than 0... XXX
+ *
+ * EGA/VGA
+ */
+static int
+vga_load_font(video_adapter_t *adp, int page, int fontsize, int fontwidth,
+ u_char *data, int ch, int count)
+{
+#ifndef VGA_NO_FONT_LOADING
+ u_char buf[PARAM_BUFSIZE];
+ vm_offset_t segment;
+ int c;
+#ifdef VGA_ALT_SEQACCESS
+ int s;
+ u_char val = 0;
+#endif
+
+ prologue(adp, V_ADP_FONT, ENODEV);
+
+ if (fontsize < 14) {
+ /* FONT_8 */
+ fontsize = 8;
+ } else if (fontsize >= 32) {
+ fontsize = 32;
+ } else if (fontsize >= 16) {
+ /* FONT_16 */
+ fontsize = 16;
+ } else {
+ /* FONT_14 */
+ fontsize = 14;
+ }
+
+ if (page < 0 || page >= 8 || fontwidth != 8)
+ return EINVAL;
+ segment = FONT_BUF + 0x4000*page;
+ if (page > 3)
+ segment -= 0xe000;
+
+#ifdef VGA_ALT_SEQACCESS
+ if (adp->va_type == KD_VGA) { /* what about EGA? XXX */
+ s = splhigh();
+ outb(TSIDX, 0x00); outb(TSREG, 0x01);
+ outb(TSIDX, 0x01); val = inb(TSREG); /* disable screen */
+ outb(TSIDX, 0x01); outb(TSREG, val | 0x20);
+ outb(TSIDX, 0x00); outb(TSREG, 0x03);
+ splx(s);
+ }
+#endif
+
+ set_font_mode(adp, buf);
+ if (fontsize == 32) {
+ bcopy_toio(data, (uintptr_t)segment + ch*32, fontsize*count);
+ } else {
+ for (c = ch; count > 0; ++c, --count) {
+ bcopy_toio(data, (uintptr_t)segment + c*32, fontsize);
+ data += fontsize;
+ }
+ }
+ set_normal_mode(adp, buf);
+
+#ifdef VGA_ALT_SEQACCESS
+ if (adp->va_type == KD_VGA) {
+ s = splhigh();
+ outb(TSIDX, 0x00); outb(TSREG, 0x01);
+ outb(TSIDX, 0x01); outb(TSREG, val & 0xdf); /* enable screen */
+ outb(TSIDX, 0x00); outb(TSREG, 0x03);
+ splx(s);
+ }
+#endif
+
+ return 0;
+#else /* VGA_NO_FONT_LOADING */
+ return ENODEV;
+#endif /* VGA_NO_FONT_LOADING */
+}
+
+/*
+ * show_font():
+ * Activate the requested font page.
+ * NOTE: it appears that some recent video adapters do not support
+ * the font page other than 0... XXX
+ *
+ * EGA/VGA
+ */
+static int
+vga_show_font(video_adapter_t *adp, int page)
+{
+#ifndef VGA_NO_FONT_LOADING
+ static u_char cg[] = { 0x00, 0x05, 0x0a, 0x0f, 0x30, 0x35, 0x3a, 0x3f };
+ int s;
+
+ prologue(adp, V_ADP_FONT, ENODEV);
+ if (page < 0 || page >= 8)
+ return EINVAL;
+
+ s = splhigh();
+ outb(TSIDX, 0x03); outb(TSREG, cg[page]);
+ splx(s);
+
+ return 0;
+#else /* VGA_NO_FONT_LOADING */
+ return ENODEV;
+#endif /* VGA_NO_FONT_LOADING */
+}
+
+/*
+ * save_palette():
+ * Read DAC values. The values have expressed in 8 bits.
+ *
+ * VGA
+ */
+static int
+vga_save_palette(video_adapter_t *adp, u_char *palette)
+{
+ int i;
+
+ prologue(adp, V_ADP_PALETTE, ENODEV);
+
+ /*
+ * We store 8 bit values in the palette buffer, while the standard
+ * VGA has 6 bit DAC .
+ */
+ outb(PALRADR, 0x00);
+ for (i = 0; i < 256*3; ++i)
+ palette[i] = inb(PALDATA) << 2;
+ inb(adp->va_crtc_addr + 6); /* reset flip/flop */
+ return 0;
+}
+
+static int
+vga_save_palette2(video_adapter_t *adp, int base, int count,
+ u_char *r, u_char *g, u_char *b)
+{
+ int i;
+
+ prologue(adp, V_ADP_PALETTE, ENODEV);
+
+ outb(PALRADR, base);
+ for (i = 0; i < count; ++i) {
+ r[i] = inb(PALDATA) << 2;
+ g[i] = inb(PALDATA) << 2;
+ b[i] = inb(PALDATA) << 2;
+ }
+ inb(adp->va_crtc_addr + 6); /* reset flip/flop */
+ return 0;
+}
+
+/*
+ * load_palette():
+ * Set DAC values.
+ *
+ * VGA
+ */
+static int
+vga_load_palette(video_adapter_t *adp, u_char *palette)
+{
+ int i;
+
+ prologue(adp, V_ADP_PALETTE, ENODEV);
+
+ outb(PIXMASK, 0xff); /* no pixelmask */
+ outb(PALWADR, 0x00);
+ for (i = 0; i < 256*3; ++i)
+ outb(PALDATA, palette[i] >> 2);
+ inb(adp->va_crtc_addr + 6); /* reset flip/flop */
+ outb(ATC, 0x20); /* enable palette */
+ return 0;
+}
+
+static int
+vga_load_palette2(video_adapter_t *adp, int base, int count,
+ u_char *r, u_char *g, u_char *b)
+{
+ int i;
+
+ prologue(adp, V_ADP_PALETTE, ENODEV);
+
+ outb(PIXMASK, 0xff); /* no pixelmask */
+ outb(PALWADR, base);
+ for (i = 0; i < count; ++i) {
+ outb(PALDATA, r[i] >> 2);
+ outb(PALDATA, g[i] >> 2);
+ outb(PALDATA, b[i] >> 2);
+ }
+ inb(adp->va_crtc_addr + 6); /* reset flip/flop */
+ outb(ATC, 0x20); /* enable palette */
+ return 0;
+}
+
+/*
+ * set_border():
+ * Change the border color.
+ *
+ * CGA/EGA/VGA
+ */
+static int
+vga_set_border(video_adapter_t *adp, int color)
+{
+ prologue(adp, V_ADP_BORDER, ENODEV);
+
+ switch (adp->va_type) {
+ case KD_EGA:
+ case KD_VGA:
+ inb(adp->va_crtc_addr + 6); /* reset flip-flop */
+ outb(ATC, 0x31); outb(ATC, color & 0xff);
+ break;
+ case KD_CGA:
+ outb(adp->va_crtc_addr + 5, color & 0x0f); /* color select register */
+ break;
+ case KD_MONO:
+ case KD_HERCULES:
+ default:
+ break;
+ }
+ return 0;
+}
+
+/*
+ * save_state():
+ * Read video register values.
+ * NOTE: this function only reads the standard EGA/VGA registers.
+ * any extra/extended registers of SVGA adapters are not saved.
+ *
+ * VGA
+ */
+static int
+vga_save_state(video_adapter_t *adp, void *p, size_t size)
+{
+ video_info_t info;
+ u_char *buf;
+ int crtc_addr;
+ int i, j;
+ int s;
+
+ if (size == 0) {
+ /* return the required buffer size */
+ prologue(adp, V_ADP_STATESAVE, 0);
+ return sizeof(adp_state_t);
+ } else {
+ prologue(adp, V_ADP_STATESAVE, ENODEV);
+ if (size < sizeof(adp_state_t))
+ return EINVAL;
+ }
+
+ ((adp_state_t *)p)->sig = V_STATE_SIG;
+ buf = ((adp_state_t *)p)->regs;
+ bzero(buf, V_MODE_PARAM_SIZE);
+ crtc_addr = adp->va_crtc_addr;
+
+ s = splhigh();
+
+ outb(TSIDX, 0x00); outb(TSREG, 0x01); /* stop sequencer */
+ for (i = 0, j = 5; i < 4; i++) {
+ outb(TSIDX, i + 1);
+ buf[j++] = inb(TSREG);
+ }
+ buf[9] = inb(MISC + 10); /* dot-clock */
+ outb(TSIDX, 0x00); outb(TSREG, 0x03); /* start sequencer */
+
+ for (i = 0, j = 10; i < 25; i++) { /* crtc */
+ outb(crtc_addr, i);
+ buf[j++] = inb(crtc_addr + 1);
+ }
+ for (i = 0, j = 35; i < 20; i++) { /* attribute ctrl */
+ inb(crtc_addr + 6); /* reset flip-flop */
+ outb(ATC, i);
+ buf[j++] = inb(ATC + 1);
+ }
+ for (i = 0, j = 55; i < 9; i++) { /* graph data ctrl */
+ outb(GDCIDX, i);
+ buf[j++] = inb(GDCREG);
+ }
+ inb(crtc_addr + 6); /* reset flip-flop */
+ outb(ATC, 0x20); /* enable palette */
+
+ splx(s);
+
+#if 1
+ if (vga_get_info(adp, adp->va_mode, &info) == 0) {
+ if (info.vi_flags & V_INFO_GRAPHICS) {
+ buf[0] = info.vi_width/info.vi_cwidth; /* COLS */
+ buf[1] = info.vi_height/info.vi_cheight - 1; /* ROWS */
+ } else {
+ buf[0] = info.vi_width; /* COLS */
+ buf[1] = info.vi_height - 1; /* ROWS */
+ }
+ buf[2] = info.vi_cheight; /* POINTS */
+ } else {
+ /* XXX: shouldn't be happening... */
+ printf("vga%d: %s: failed to obtain mode info. (vga_save_state())\n",
+ adp->va_unit, adp->va_name);
+ }
+#else
+ buf[0] = readb(BIOS_PADDRTOVADDR(0x44a)); /* COLS */
+ buf[1] = readb(BIOS_PADDRTOVADDR(0x484)); /* ROWS */
+ buf[2] = readb(BIOS_PADDRTOVADDR(0x485)); /* POINTS */
+ buf[3] = readb(BIOS_PADDRTOVADDR(0x44c));
+ buf[4] = readb(BIOS_PADDRTOVADDR(0x44d));
+#endif
+
+ return 0;
+}
+
+/*
+ * load_state():
+ * Set video registers at once.
+ * NOTE: this function only updates the standard EGA/VGA registers.
+ * any extra/extended registers of SVGA adapters are not changed.
+ *
+ * EGA/VGA
+ */
+static int
+vga_load_state(video_adapter_t *adp, void *p)
+{
+ u_char *buf;
+ int crtc_addr;
+ int s;
+ int i;
+
+ prologue(adp, V_ADP_STATELOAD, ENODEV);
+ if (((adp_state_t *)p)->sig != V_STATE_SIG)
+ return EINVAL;
+
+ buf = ((adp_state_t *)p)->regs;
+ crtc_addr = adp->va_crtc_addr;
+
+#if VGA_DEBUG > 1
+ dump_buffer(buf, V_MODE_PARAM_SIZE);
+#endif
+
+ s = splhigh();
+
+ outb(TSIDX, 0x00); outb(TSREG, 0x01); /* stop sequencer */
+ for (i = 0; i < 4; ++i) { /* program sequencer */
+ outb(TSIDX, i + 1);
+ outb(TSREG, buf[i + 5]);
+ }
+ outb(MISC, buf[9]); /* set dot-clock */
+ outb(TSIDX, 0x00); outb(TSREG, 0x03); /* start sequencer */
+ outb(crtc_addr, 0x11);
+ outb(crtc_addr + 1, inb(crtc_addr + 1) & 0x7F);
+ for (i = 0; i < 25; ++i) { /* program crtc */
+ outb(crtc_addr, i);
+ outb(crtc_addr + 1, buf[i + 10]);
+ }
+ inb(crtc_addr+6); /* reset flip-flop */
+ for (i = 0; i < 20; ++i) { /* program attribute ctrl */
+ outb(ATC, i);
+ outb(ATC, buf[i + 35]);
+ }
+ for (i = 0; i < 9; ++i) { /* program graph data ctrl */
+ outb(GDCIDX, i);
+ outb(GDCREG, buf[i + 55]);
+ }
+ inb(crtc_addr + 6); /* reset flip-flop */
+ outb(ATC, 0x20); /* enable palette */
+
+#if notyet /* a temporary workaround for kernel panic, XXX */
+#ifndef VGA_NO_BIOS
+ if (adp->va_unit == V_ADP_PRIMARY) {
+ writeb(BIOS_PADDRTOVADDR(0x44a), buf[0]); /* COLS */
+ writeb(BIOS_PADDRTOVADDR(0x484), buf[1] + rows_offset - 1); /* ROWS */
+ writeb(BIOS_PADDRTOVADDR(0x485), buf[2]); /* POINTS */
+#if 0
+ writeb(BIOS_PADDRTOVADDR(0x44c), buf[3]);
+ writeb(BIOS_PADDRTOVADDR(0x44d), buf[4]);
+#endif
+ }
+#endif /* VGA_NO_BIOS */
+#endif /* notyet */
+
+ splx(s);
+ return 0;
+}
+
+/*
+ * set_origin():
+ * Change the origin (window mapping) of the banked frame buffer.
+ */
+static int
+vga_set_origin(video_adapter_t *adp, off_t offset)
+{
+ /*
+ * The standard video modes do not require window mapping;
+ * always return error.
+ */
+ return ENODEV;
+}
+
+/*
+ * read_hw_cursor():
+ * Read the position of the hardware text cursor.
+ *
+ * all adapters
+ */
+static int
+vga_read_hw_cursor(video_adapter_t *adp, int *col, int *row)
+{
+ u_int16_t off;
+ int s;
+
+ if (!vga_init_done)
+ return ENXIO;
+
+ if (adp->va_info.vi_flags & V_INFO_GRAPHICS)
+ return ENODEV;
+
+ s = spltty();
+ outb(adp->va_crtc_addr, 14);
+ off = inb(adp->va_crtc_addr + 1);
+ outb(adp->va_crtc_addr, 15);
+ off = (off << 8) | inb(adp->va_crtc_addr + 1);
+ splx(s);
+
+ *row = off / adp->va_info.vi_width;
+ *col = off % adp->va_info.vi_width;
+
+ return 0;
+}
+
+/*
+ * set_hw_cursor():
+ * Move the hardware text cursor. If col and row are both -1,
+ * the cursor won't be shown.
+ *
+ * all adapters
+ */
+static int
+vga_set_hw_cursor(video_adapter_t *adp, int col, int row)
+{
+ u_int16_t off;
+ int s;
+
+ if (!vga_init_done)
+ return ENXIO;
+
+ if ((col == -1) && (row == -1)) {
+ off = -1;
+ } else {
+ if (adp->va_info.vi_flags & V_INFO_GRAPHICS)
+ return ENODEV;
+ off = row*adp->va_info.vi_width + col;
+ }
+
+ s = spltty();
+ outb(adp->va_crtc_addr, 14);
+ outb(adp->va_crtc_addr + 1, off >> 8);
+ outb(adp->va_crtc_addr, 15);
+ outb(adp->va_crtc_addr + 1, off & 0x00ff);
+ splx(s);
+
+ return 0;
+}
+
+/*
+ * set_hw_cursor_shape():
+ * Change the shape of the hardware text cursor. If the height is
+ * zero or negative, the cursor won't be shown.
+ *
+ * all adapters
+ */
+static int
+vga_set_hw_cursor_shape(video_adapter_t *adp, int base, int height,
+ int celsize, int blink)
+{
+ int s;
+
+ if (!vga_init_done)
+ return ENXIO;
+
+ s = spltty();
+ switch (adp->va_type) {
+ case KD_VGA:
+ case KD_CGA:
+ case KD_MONO:
+ case KD_HERCULES:
+ default:
+ if (height <= 0) {
+ /* make the cursor invisible */
+ outb(adp->va_crtc_addr, 10);
+ outb(adp->va_crtc_addr + 1, 32);
+ outb(adp->va_crtc_addr, 11);
+ outb(adp->va_crtc_addr + 1, 0);
+ } else {
+ outb(adp->va_crtc_addr, 10);
+ outb(adp->va_crtc_addr + 1, celsize - base - height);
+ outb(adp->va_crtc_addr, 11);
+ outb(adp->va_crtc_addr + 1, celsize - base - 1);
+ }
+ break;
+ case KD_EGA:
+ if (height <= 0) {
+ /* make the cursor invisible */
+ outb(adp->va_crtc_addr, 10);
+ outb(adp->va_crtc_addr + 1, celsize);
+ outb(adp->va_crtc_addr, 11);
+ outb(adp->va_crtc_addr + 1, 0);
+ } else {
+ outb(adp->va_crtc_addr, 10);
+ outb(adp->va_crtc_addr + 1, celsize - base - height);
+ outb(adp->va_crtc_addr, 11);
+ outb(adp->va_crtc_addr + 1, celsize - base);
+ }
+ break;
+ }
+ splx(s);
+
+ return 0;
+}
+
+/*
+ * blank_display()
+ * Put the display in power save/power off mode.
+ *
+ * all adapters
+ */
+static int
+vga_blank_display(video_adapter_t *adp, int mode)
+{
+ u_char val;
+ int s;
+
+ s = splhigh();
+ switch (adp->va_type) {
+ case KD_VGA:
+ switch (mode) {
+ case V_DISPLAY_SUSPEND:
+ case V_DISPLAY_STAND_BY:
+ outb(TSIDX, 0x01);
+ val = inb(TSREG);
+ outb(TSIDX, 0x01);
+ outb(TSREG, val | 0x20);
+ outb(adp->va_crtc_addr, 0x17);
+ val = inb(adp->va_crtc_addr + 1);
+ outb(adp->va_crtc_addr + 1, val & ~0x80);
+ break;
+ case V_DISPLAY_BLANK:
+ outb(TSIDX, 0x01);
+ val = inb(TSREG);
+ outb(TSIDX, 0x01);
+ outb(TSREG, val | 0x20);
+ break;
+ case V_DISPLAY_ON:
+ outb(TSIDX, 0x01);
+ val = inb(TSREG);
+ outb(TSIDX, 0x01);
+ outb(TSREG, val & 0xDF);
+ outb(adp->va_crtc_addr, 0x17);
+ val = inb(adp->va_crtc_addr + 1);
+ outb(adp->va_crtc_addr + 1, val | 0x80);
+ break;
+ }
+ break;
+
+ case KD_EGA:
+ /* no support yet */
+ splx(s);
+ return ENODEV;
+
+ case KD_CGA:
+ switch (mode) {
+ case V_DISPLAY_SUSPEND:
+ case V_DISPLAY_STAND_BY:
+ case V_DISPLAY_BLANK:
+ outb(adp->va_crtc_addr + 4, 0x25);
+ break;
+ case V_DISPLAY_ON:
+ outb(adp->va_crtc_addr + 4, 0x2d);
+ break;
+ }
+ break;
+
+ case KD_MONO:
+ case KD_HERCULES:
+ switch (mode) {
+ case V_DISPLAY_SUSPEND:
+ case V_DISPLAY_STAND_BY:
+ case V_DISPLAY_BLANK:
+ outb(adp->va_crtc_addr + 4, 0x21);
+ break;
+ case V_DISPLAY_ON:
+ outb(adp->va_crtc_addr + 4, 0x29);
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+ splx(s);
+
+ return 0;
+}
+
+/*
+ * mmap():
+ * Mmap frame buffer.
+ *
+ * all adapters
+ */
+static int
+vga_mmap_buf(video_adapter_t *adp, vm_offset_t offset, vm_paddr_t *paddr,
+ int prot)
+{
+ if (adp->va_info.vi_flags & V_INFO_LINEAR)
+ return -1;
+
+#if VGA_DEBUG > 0
+ printf("vga_mmap_buf(): window:0x%jx, offset:0x%jx\n",
+ (uintmax_t)adp->va_info.vi_window, (uintmax_t)offset);
+#endif
+
+ /* XXX: is this correct? */
+ if (offset > adp->va_window_size - PAGE_SIZE)
+ return -1;
+
+ *paddr = adp->va_info.vi_window + offset;
+ return 0;
+}
+
+#ifndef VGA_NO_MODE_CHANGE
+
+static void
+planar_fill(video_adapter_t *adp, int val)
+{
+ int length;
+ int at; /* position in the frame buffer */
+ int l;
+
+ outw(GDCIDX, 0x0005); /* read mode 0, write mode 0 */
+ outw(GDCIDX, 0x0003); /* data rotate/function select */
+ outw(GDCIDX, 0x0f01); /* set/reset enable */
+ outw(GDCIDX, 0xff08); /* bit mask */
+ outw(GDCIDX, (val << 8) | 0x00); /* set/reset */
+ at = 0;
+ length = adp->va_line_width*adp->va_info.vi_height;
+ while (length > 0) {
+ l = imin(length, adp->va_window_size);
+ (*vidsw[adp->va_index]->set_win_org)(adp, at);
+ bzero_io(adp->va_window, l);
+ length -= l;
+ at += l;
+ }
+ outw(GDCIDX, 0x0000); /* set/reset */
+ outw(GDCIDX, 0x0001); /* set/reset enable */
+}
+
+static void
+packed_fill(video_adapter_t *adp, int val)
+{
+ int length;
+ int at; /* position in the frame buffer */
+ int l;
+
+ at = 0;
+ length = adp->va_line_width*adp->va_info.vi_height;
+ while (length > 0) {
+ l = imin(length, adp->va_window_size);
+ (*vidsw[adp->va_index]->set_win_org)(adp, at);
+ fill_io(val, adp->va_window, l);
+ length -= l;
+ at += l;
+ }
+}
+
+static void
+direct_fill(video_adapter_t *adp, int val)
+{
+ int length;
+ int at; /* position in the frame buffer */
+ int l;
+
+ at = 0;
+ length = adp->va_line_width*adp->va_info.vi_height;
+ while (length > 0) {
+ l = imin(length, adp->va_window_size);
+ (*vidsw[adp->va_index]->set_win_org)(adp, at);
+ switch (adp->va_info.vi_pixel_size) {
+ case sizeof(u_int16_t):
+ fillw_io(val, adp->va_window, l/sizeof(u_int16_t));
+ break;
+ case 3:
+ /* FIXME */
+ break;
+ case sizeof(u_int32_t):
+ filll_io(val, adp->va_window, l/sizeof(u_int32_t));
+ break;
+ }
+ length -= l;
+ at += l;
+ }
+}
+
+static int
+vga_clear(video_adapter_t *adp)
+{
+ switch (adp->va_info.vi_mem_model) {
+ case V_INFO_MM_TEXT:
+ /* do nothing? XXX */
+ break;
+ case V_INFO_MM_PLANAR:
+ planar_fill(adp, 0);
+ break;
+ case V_INFO_MM_PACKED:
+ packed_fill(adp, 0);
+ break;
+ case V_INFO_MM_DIRECT:
+ direct_fill(adp, 0);
+ break;
+ }
+ return 0;
+}
+
+#ifdef notyet
+static void
+planar_fill_rect(video_adapter_t *adp, int val, int x, int y, int cx, int cy)
+{
+ int banksize;
+ int bank;
+ int pos;
+ int offset; /* offset within window */
+ int bx;
+ int l;
+
+ outw(GDCIDX, 0x0005); /* read mode 0, write mode 0 */
+ outw(GDCIDX, 0x0003); /* data rotate/function select */
+ outw(GDCIDX, 0x0f01); /* set/reset enable */
+ outw(GDCIDX, 0xff08); /* bit mask */
+ outw(GDCIDX, (val << 8) | 0x00); /* set/reset */
+
+ banksize = adp->va_window_size;
+ bank = -1;
+ while (cy > 0) {
+ pos = adp->va_line_width*y + x/8;
+ if (bank != pos/banksize) {
+ (*vidsw[adp->va_index]->set_win_org)(adp, pos);
+ bank = pos/banksize;
+ }
+ offset = pos%banksize;
+ bx = (x + cx)/8 - x/8;
+ if (x % 8) {
+ outw(GDCIDX, ((0xff00 >> (x % 8)) & 0xff00) | 0x08);
+ writeb(adp->va_window + offset, 0);
+ ++offset;
+ --bx;
+ if (offset >= banksize) {
+ offset = 0;
+ ++bank; /* next bank */
+ (*vidsw[adp->va_index]->set_win_org)(adp, bank*banksize);
+ }
+ outw(GDCIDX, 0xff08); /* bit mask */
+ }
+ while (bx > 0) {
+ l = imin(bx, banksize);
+ bzero_io(adp->va_window + offset, l);
+ offset += l;
+ bx -= l;
+ if (offset >= banksize) {
+ offset = 0;
+ ++bank; /* next bank */
+ (*vidsw[adp->va_index]->set_win_org)(adp, bank*banksize);
+ }
+ }
+ if ((x + cx) % 8) {
+ outw(GDCIDX, (~(0xff00 >> ((x + cx) % 8)) & 0xff00) | 0x08);
+ writeb(adp->va_window + offset, 0);
+ ++offset;
+ if (offset >= banksize) {
+ offset = 0;
+ ++bank; /* next bank */
+ (*vidsw[adp->va_index]->set_win_org)(adp, bank*banksize);
+ }
+ outw(GDCIDX, 0xff08); /* bit mask */
+ }
+ ++y;
+ --cy;
+ }
+
+ outw(GDCIDX, 0xff08); /* bit mask */
+ outw(GDCIDX, 0x0000); /* set/reset */
+ outw(GDCIDX, 0x0001); /* set/reset enable */
+}
+
+static void
+packed_fill_rect(video_adapter_t *adp, int val, int x, int y, int cx, int cy)
+{
+ int banksize;
+ int bank;
+ int pos;
+ int offset; /* offset within window */
+ int end;
+
+ banksize = adp->va_window_size;
+ bank = -1;
+ cx *= adp->va_info.vi_pixel_size;
+ while (cy > 0) {
+ pos = adp->va_line_width*y + x*adp->va_info.vi_pixel_size;
+ if (bank != pos/banksize) {
+ (*vidsw[adp->va_index]->set_win_org)(adp, pos);
+ bank = pos/banksize;
+ }
+ offset = pos%banksize;
+ end = imin(offset + cx, banksize);
+ fill_io(val, adp->va_window + offset,
+ (end - offset)/adp->va_info.vi_pixel_size);
+ /* the line may cross the window boundary */
+ if (offset + cx > banksize) {
+ ++bank; /* next bank */
+ (*vidsw[adp->va_index]->set_win_org)(adp, bank*banksize);
+ end = offset + cx - banksize;
+ fill_io(val, adp->va_window, end/adp->va_info.vi_pixel_size);
+ }
+ ++y;
+ --cy;
+ }
+}
+
+static void
+direct_fill_rect16(video_adapter_t *adp, int val, int x, int y, int cx, int cy)
+{
+ int banksize;
+ int bank;
+ int pos;
+ int offset; /* offset within window */
+ int end;
+
+ /*
+ * XXX: the function assumes that banksize is a muliple of
+ * sizeof(u_int16_t).
+ */
+ banksize = adp->va_window_size;
+ bank = -1;
+ cx *= sizeof(u_int16_t);
+ while (cy > 0) {
+ pos = adp->va_line_width*y + x*sizeof(u_int16_t);
+ if (bank != pos/banksize) {
+ (*vidsw[adp->va_index]->set_win_org)(adp, pos);
+ bank = pos/banksize;
+ }
+ offset = pos%banksize;
+ end = imin(offset + cx, banksize);
+ fillw_io(val, adp->va_window + offset,
+ (end - offset)/sizeof(u_int16_t));
+ /* the line may cross the window boundary */
+ if (offset + cx > banksize) {
+ ++bank; /* next bank */
+ (*vidsw[adp->va_index]->set_win_org)(adp, bank*banksize);
+ end = offset + cx - banksize;
+ fillw_io(val, adp->va_window, end/sizeof(u_int16_t));
+ }
+ ++y;
+ --cy;
+ }
+}
+
+static void
+direct_fill_rect24(video_adapter_t *adp, int val, int x, int y, int cx, int cy)
+{
+ int banksize;
+ int bank;
+ int pos;
+ int offset; /* offset within window */
+ int end;
+ int i;
+ int j;
+ u_int8_t b[3];
+
+ b[0] = val & 0x0000ff;
+ b[1] = (val >> 8) & 0x0000ff;
+ b[2] = (val >> 16) & 0x0000ff;
+ banksize = adp->va_window_size;
+ bank = -1;
+ cx *= 3;
+ while (cy > 0) {
+ pos = adp->va_line_width*y + x*3;
+ if (bank != pos/banksize) {
+ (*vidsw[adp->va_index]->set_win_org)(adp, pos);
+ bank = pos/banksize;
+ }
+ offset = pos%banksize;
+ end = imin(offset + cx, banksize);
+ for (i = 0, j = offset; j < end; i = (++i)%3, ++j) {
+ writeb(adp->va_window + j, b[i]);
+ }
+ /* the line may cross the window boundary */
+ if (offset + cx >= banksize) {
+ ++bank; /* next bank */
+ (*vidsw[adp->va_index]->set_win_org)(adp, bank*banksize);
+ j = 0;
+ end = offset + cx - banksize;
+ for (; j < end; i = (++i)%3, ++j) {
+ writeb(adp->va_window + j, b[i]);
+ }
+ }
+ ++y;
+ --cy;
+ }
+}
+
+static void
+direct_fill_rect32(video_adapter_t *adp, int val, int x, int y, int cx, int cy)
+{
+ int banksize;
+ int bank;
+ int pos;
+ int offset; /* offset within window */
+ int end;
+
+ /*
+ * XXX: the function assumes that banksize is a muliple of
+ * sizeof(u_int32_t).
+ */
+ banksize = adp->va_window_size;
+ bank = -1;
+ cx *= sizeof(u_int32_t);
+ while (cy > 0) {
+ pos = adp->va_line_width*y + x*sizeof(u_int32_t);
+ if (bank != pos/banksize) {
+ (*vidsw[adp->va_index]->set_win_org)(adp, pos);
+ bank = pos/banksize;
+ }
+ offset = pos%banksize;
+ end = imin(offset + cx, banksize);
+ filll_io(val, adp->va_window + offset,
+ (end - offset)/sizeof(u_int32_t));
+ /* the line may cross the window boundary */
+ if (offset + cx > banksize) {
+ ++bank; /* next bank */
+ (*vidsw[adp->va_index]->set_win_org)(adp, bank*banksize);
+ end = offset + cx - banksize;
+ filll_io(val, adp->va_window, end/sizeof(u_int32_t));
+ }
+ ++y;
+ --cy;
+ }
+}
+
+static int
+vga_fill_rect(video_adapter_t *adp, int val, int x, int y, int cx, int cy)
+{
+ switch (adp->va_info.vi_mem_model) {
+ case V_INFO_MM_TEXT:
+ /* do nothing? XXX */
+ break;
+ case V_INFO_MM_PLANAR:
+ planar_fill_rect(adp, val, x, y, cx, cy);
+ break;
+ case V_INFO_MM_PACKED:
+ packed_fill_rect(adp, val, x, y, cx, cy);
+ break;
+ case V_INFO_MM_DIRECT:
+ switch (adp->va_info.vi_pixel_size) {
+ case sizeof(u_int16_t):
+ direct_fill_rect16(adp, val, x, y, cx, cy);
+ break;
+ case 3:
+ direct_fill_rect24(adp, val, x, y, cx, cy);
+ break;
+ case sizeof(u_int32_t):
+ direct_fill_rect32(adp, val, x, y, cx, cy);
+ break;
+ }
+ break;
+ }
+ return 0;
+}
+#else /* !notyet */
+static int
+vga_fill_rect(video_adapter_t *adp, int val, int x, int y, int cx, int cy)
+{
+ return ENODEV;
+}
+#endif /* notyet */
+
+static int
+vga_bitblt(video_adapter_t *adp,...)
+{
+ /* FIXME */
+ return ENODEV;
+}
+
+#endif /* !VGA_NO_MODE_CHANGE */
+
+static int
+get_palette(video_adapter_t *adp, int base, int count,
+ u_char *red, u_char *green, u_char *blue, u_char *trans)
+{
+ u_char *r;
+ u_char *g;
+ u_char *b;
+
+ if (count < 0 || base < 0 || count > 256 || base > 256 ||
+ base + count > 256)
+ return EINVAL;
+
+ r = malloc(count*3, M_DEVBUF, M_WAITOK);
+ g = r + count;
+ b = g + count;
+ if (vga_save_palette2(adp, base, count, r, g, b)) {
+ free(r, M_DEVBUF);
+ return ENODEV;
+ }
+ copyout(r, red, count);
+ copyout(g, green, count);
+ copyout(b, blue, count);
+ if (trans != NULL) {
+ bzero(r, count);
+ copyout(r, trans, count);
+ }
+ free(r, M_DEVBUF);
+
+ return 0;
+}
+
+static int
+set_palette(video_adapter_t *adp, int base, int count,
+ u_char *red, u_char *green, u_char *blue, u_char *trans)
+{
+ u_char *r;
+ u_char *g;
+ u_char *b;
+ int err;
+
+ if (count < 0 || base < 0 || count > 256 || base > 256 ||
+ base + count > 256)
+ return EINVAL;
+
+ r = malloc(count*3, M_DEVBUF, M_WAITOK);
+ g = r + count;
+ b = g + count;
+ err = copyin(red, r, count);
+ if (!err)
+ err = copyin(green, g, count);
+ if (!err)
+ err = copyin(blue, b, count);
+ if (!err)
+ err = vga_load_palette2(adp, base, count, r, g, b);
+ free(r, M_DEVBUF);
+
+ return (err ? ENODEV : 0);
+}
+
+static int
+vga_dev_ioctl(video_adapter_t *adp, u_long cmd, caddr_t arg)
+{
+ switch (cmd) {
+ case FBIO_GETWINORG: /* get frame buffer window origin */
+ *(u_int *)arg = 0;
+ return 0;
+
+ case FBIO_SETWINORG: /* set frame buffer window origin */
+ return ENODEV;
+
+ case FBIO_SETDISPSTART: /* set display start address */
+ return (set_display_start(adp,
+ ((video_display_start_t *)arg)->x,
+ ((video_display_start_t *)arg)->y)
+ ? ENODEV : 0);
+
+ case FBIO_SETLINEWIDTH: /* set scan line length in pixel */
+ return (set_line_length(adp, *(u_int *)arg) ? ENODEV : 0);
+
+ case FBIO_GETPALETTE: /* get color palette */
+ return get_palette(adp, ((video_color_palette_t *)arg)->index,
+ ((video_color_palette_t *)arg)->count,
+ ((video_color_palette_t *)arg)->red,
+ ((video_color_palette_t *)arg)->green,
+ ((video_color_palette_t *)arg)->blue,
+ ((video_color_palette_t *)arg)->transparent);
+
+ case FBIO_SETPALETTE: /* set color palette */
+ return set_palette(adp, ((video_color_palette_t *)arg)->index,
+ ((video_color_palette_t *)arg)->count,
+ ((video_color_palette_t *)arg)->red,
+ ((video_color_palette_t *)arg)->green,
+ ((video_color_palette_t *)arg)->blue,
+ ((video_color_palette_t *)arg)->transparent);
+
+ case FBIOGTYPE: /* get frame buffer type info. */
+ ((struct fbtype *)arg)->fb_type = fb_type(adp->va_type);
+ ((struct fbtype *)arg)->fb_height = adp->va_info.vi_height;
+ ((struct fbtype *)arg)->fb_width = adp->va_info.vi_width;
+ ((struct fbtype *)arg)->fb_depth = adp->va_info.vi_depth;
+ if ((adp->va_info.vi_depth <= 1) || (adp->va_info.vi_depth > 8))
+ ((struct fbtype *)arg)->fb_cmsize = 0;
+ else
+ ((struct fbtype *)arg)->fb_cmsize = 1 << adp->va_info.vi_depth;
+ ((struct fbtype *)arg)->fb_size = adp->va_buffer_size;
+ return 0;
+
+ case FBIOGETCMAP: /* get color palette */
+ return get_palette(adp, ((struct fbcmap *)arg)->index,
+ ((struct fbcmap *)arg)->count,
+ ((struct fbcmap *)arg)->red,
+ ((struct fbcmap *)arg)->green,
+ ((struct fbcmap *)arg)->blue, NULL);
+
+ case FBIOPUTCMAP: /* set color palette */
+ return set_palette(adp, ((struct fbcmap *)arg)->index,
+ ((struct fbcmap *)arg)->count,
+ ((struct fbcmap *)arg)->red,
+ ((struct fbcmap *)arg)->green,
+ ((struct fbcmap *)arg)->blue, NULL);
+
+ default:
+ return fb_commonioctl(adp, cmd, arg);
+ }
+}
+
+static void
+dump_buffer(u_char *buf, size_t len)
+{
+ int i;
+
+ for(i = 0; i < len;) {
+ printf("%02x ", buf[i]);
+ if ((++i % 16) == 0)
+ printf("\n");
+ }
+}
+
+/*
+ * diag():
+ * Print some information about the video adapter and video modes,
+ * with requested level of details.
+ *
+ * all adapters
+ */
+static int
+vga_diag(video_adapter_t *adp, int level)
+{
+ u_char *mp;
+#if FB_DEBUG > 1
+ video_info_t info;
+ int i;
+#endif
+
+ if (!vga_init_done)
+ return ENXIO;
+
+#if FB_DEBUG > 1
+#ifndef VGA_NO_BIOS
+ printf("vga: RTC equip. code:0x%02x, DCC code:0x%02x\n",
+ rtcin(RTC_EQUIPMENT), readb(BIOS_PADDRTOVADDR(0x488)));
+ printf("vga: CRTC:0x%x, video option:0x%02x, ",
+ readw(BIOS_PADDRTOVADDR(0x463)),
+ readb(BIOS_PADDRTOVADDR(0x487)));
+ printf("rows:%d, cols:%d, font height:%d\n",
+ readb(BIOS_PADDRTOVADDR(0x44a)),
+ readb(BIOS_PADDRTOVADDR(0x484)) + 1,
+ readb(BIOS_PADDRTOVADDR(0x485)));
+#endif /* VGA_NO_BIOS */
+#if !defined(VGA_NO_BIOS) && !defined(VGA_NO_MODE_CHANGE)
+ printf("vga: param table EGA/VGA:%p", video_mode_ptr);
+ printf(", CGA/MDA:%p\n", video_mode_ptr2);
+ printf("vga: rows_offset:%d\n", rows_offset);
+#endif
+#endif /* FB_DEBUG > 1 */
+
+ fb_dump_adp_info(VGA_DRIVER_NAME, adp, level);
+
+#if FB_DEBUG > 1
+ if (adp->va_flags & V_ADP_MODECHANGE) {
+ for (i = 0; bios_vmode[i].vi_mode != EOT; ++i) {
+ if (bios_vmode[i].vi_mode == NA)
+ continue;
+ if (get_mode_param(bios_vmode[i].vi_mode) == NULL)
+ continue;
+ fb_dump_mode_info(VGA_DRIVER_NAME, adp, &bios_vmode[i], level);
+ }
+ } else {
+ vga_get_info(adp, adp->va_initial_mode, &info); /* shouldn't fail */
+ fb_dump_mode_info(VGA_DRIVER_NAME, adp, &info, level);
+ }
+#endif /* FB_DEBUG > 1 */
+
+ if ((adp->va_type != KD_EGA) && (adp->va_type != KD_VGA))
+ return 0;
+#if !defined(VGA_NO_BIOS) && !defined(VGA_NO_MODE_CHANGE)
+ if (video_mode_ptr == NULL)
+ printf("vga%d: %s: WARNING: video mode switching is not "
+ "fully supported on this adapter\n",
+ adp->va_unit, adp->va_name);
+#endif
+ if (level <= 0)
+ return 0;
+
+ if (adp->va_type == KD_VGA) {
+ printf("VGA parameters upon power-up\n");
+ dump_buffer(adpstate.regs, sizeof(adpstate.regs));
+ printf("VGA parameters in BIOS for mode %d\n", adp->va_initial_mode);
+ dump_buffer(adpstate2.regs, sizeof(adpstate2.regs));
+ }
+
+ mp = get_mode_param(adp->va_initial_mode);
+ if (mp == NULL) /* this shouldn't be happening */
+ return 0;
+ printf("EGA/VGA parameters to be used for mode %d\n", adp->va_initial_mode);
+ dump_buffer(mp, V_MODE_PARAM_SIZE);
+
+ return 0;
+}
diff --git a/sys/dev/fb/vgareg.h b/sys/dev/fb/vgareg.h
new file mode 100644
index 000000000000..4ccef40d616f
--- /dev/null
+++ b/sys/dev/fb/vgareg.h
@@ -0,0 +1,98 @@
+/*-
+ * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
+ * All rights reserved.
+ *
+ * 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 as
+ * the first lines of this file unmodified.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _DEV_FB_VGAREG_H_
+#define _DEV_FB_VGAREG_H_
+
+/* physical addresses */
+#define MDA_BUF_BASE 0xb0000
+#define MDA_BUF_SIZE 0x08000
+#define MDA_BUF BIOS_PADDRTOVADDR(MDA_BUF_BASE)
+#define CGA_BUF_BASE 0xb8000
+#define CGA_BUF_SIZE 0x08000
+#define CGA_BUF BIOS_PADDRTOVADDR(CGA_BUF_BASE)
+#define EGA_BUF_BASE 0xa0000
+#define EGA_BUF_SIZE 0x20000
+#define EGA_BUF BIOS_PADDRTOVADDR(EGA_BUF_BASE)
+#define GRAPHICS_BUF_BASE 0xa0000
+#define GRAPHICS_BUF_SIZE 0x10000
+#define GRAPHICS_BUF BIOS_PADDRTOVADDR(GRAPHICS_BUF_BASE)
+#define FONT_BUF BIOS_PADDRTOVADDR(GRAPHICS_BUF_BASE)
+#define VIDEO_BUF_BASE 0xa0000
+#define VIDEO_BUF_SIZE 0x20000
+
+/* I/O port addresses */
+#define MONO_CRTC (IO_MDA + 0x04) /* crt controller base mono */
+#define COLOR_CRTC (IO_CGA + 0x04) /* crt controller base color */
+#define MISC (IO_VGA + 0x02) /* misc output register */
+#define ATC (IO_VGA + 0x00) /* attribute controller */
+#define TSIDX (IO_VGA + 0x04) /* timing sequencer idx */
+#define TSREG (IO_VGA + 0x05) /* timing sequencer data */
+#define PIXMASK (IO_VGA + 0x06) /* pixel write mask */
+#define PALRADR (IO_VGA + 0x07) /* palette read address */
+#define PALWADR (IO_VGA + 0x08) /* palette write address */
+#define PALDATA (IO_VGA + 0x09) /* palette data register */
+#define GDCIDX (IO_VGA + 0x0E) /* graph data controller idx */
+#define GDCREG (IO_VGA + 0x0F) /* graph data controller data */
+
+#define VGA_DRIVER_NAME "vga"
+#define VGA_UNIT(dev) minor(dev)
+#define VGA_MKMINOR(unit) (unit)
+
+#ifdef _KERNEL
+
+struct video_adapter;
+typedef struct vga_softc {
+ struct video_adapter *adp;
+ void *state_buf;
+#ifdef FB_INSTALL_CDEV
+ genfb_softc_t gensc;
+#endif
+} vga_softc_t;
+
+int vga_probe_unit(int unit, struct video_adapter *adp, int flags);
+int vga_attach_unit(int unit, vga_softc_t *sc, int flags);
+
+#ifdef FB_INSTALL_CDEV
+int vga_open(struct cdev *dev, vga_softc_t *sc, int flag, int mode,
+ struct thread *td);
+int vga_close(struct cdev *dev, vga_softc_t *sc, int flag, int mode,
+ struct thread *td);
+int vga_read(struct cdev *dev, vga_softc_t *sc, struct uio *uio, int flag);
+int vga_write(struct cdev *dev, vga_softc_t *sc, struct uio *uio, int flag);
+int vga_ioctl(struct cdev *dev, vga_softc_t *sc, u_long cmd, caddr_t arg,
+ int flag, struct thread *td);
+int vga_mmap(struct cdev *dev, vga_softc_t *sc, vm_offset_t offset,
+ vm_offset_t *paddr, int prot);
+#endif
+
+extern int (*vga_sub_configure)(int flags);
+
+#endif /* _KERNEL */
+
+#endif /* _DEV_FB_VGAREG_H_ */