diff options
Diffstat (limited to 'sys/dev/fb')
-rw-r--r-- | sys/dev/fb/boot_font.c | 4678 | ||||
-rw-r--r-- | sys/dev/fb/gfb.c | 948 | ||||
-rw-r--r-- | sys/dev/fb/gfb.h | 172 | ||||
-rw-r--r-- | sys/dev/fb/tga.c | 2431 | ||||
-rw-r--r-- | sys/dev/fb/tga.h | 155 |
5 files changed, 8384 insertions, 0 deletions
diff --git a/sys/dev/fb/boot_font.c b/sys/dev/fb/boot_font.c new file mode 100644 index 0000000..db82efc --- /dev/null +++ b/sys/dev/fb/boot_font.c @@ -0,0 +1,4678 @@ +/*- + * 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_memio.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 <pci/pcireg.h> +#include <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/gfb.c b/sys/dev/fb/gfb.c new file mode 100644 index 0000000..f7c377c --- /dev/null +++ b/sys/dev/fb/gfb.c @@ -0,0 +1,948 @@ +/*- + * 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_memio.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 <pci/pcireg.h> +#include <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.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, 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 != 8)) + 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, 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 = 8; + + 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, int prot) +{ + int error; + + if(offset > adp->va_window_size - PAGE_SIZE) + error = ENXIO; +#ifdef __i386__ + error = i386_btop(adp->va_info.vi_window + offset); +#elsif defined(__alpha__) + error = alpha_btop(adp->va_info.vi_window + offset); +#else + error = ENXIO; +#endif + return(error); +} + +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) + 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) +{ + 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 0000000..07ee5c9 --- /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; + dev_t devt; +} *gfb_softc_t; + +#endif /* _FB_GFB_H_ */ diff --git a/sys/dev/fb/tga.c b/sys/dev/fb/tga.c new file mode 100644 index 0000000..08fcac8 --- /dev/null +++ b/sys/dev/fb/tga.c @@ -0,0 +1,2431 @@ +/*- + * 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/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_memio.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 <pci/pcireg.h> +#include <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; +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; +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 *); +static gfb_ramdac_save_palette_t bt463_save_palette; +static gfb_ramdac_load_palette_t bt463_load_palette; +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; +static vi_ioctl_t tga_ioctl; +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(video_adapter_t *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(video_adapter_t *adp, TGA_REG_GDER, + gder & vgae_mask); + adp->va_mode = mode; + break; + case TGA2_VGA_MODE: + vgae_mask = 0x00400000; + WRITE_GFB_REGISTER(video_adapter_t *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); +} + +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); +} + +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) +{ + 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); +} + +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); +} + +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 + } +} + +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); +} + +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 bfcmap *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 0000000..2830248 --- /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_ */ |