Date: Fri, 13 Jun 1997 09:10:06 +0200 (MET DST)
From: Geert Uytterhoeven <Geert.Uytterhoeven@cs.kuleuven.ac.be>
To: Linux/m68k <linux-m68k@phil.uni-sb.de>
Subject: L68K: Frame buffer patches
Sender: owner-linux-m68k@phil.uni-sb.de
Reply-To: linux-m68k@phil.uni-sb.de


Finally I ported the multiple/loadable frame buffer code to 2.1.42. The patch
should be applied after my abstract console patch.

Most important changes:

  - I moved all frame buffer stuff to drivers/video. The following frame buffer
    devices are available:

      o amifb
      o atafb
      o cyberfb
      o retz3fb
      o vfb: virtual frame buffer device that works on 1MB of memory and thus
	     is invisible. Great for testing and to be used as a base for new
	     frame buffer devices.

    The following frame buffer organizations are supported through low level
    console drivers:

      o fbcon-afb
      o fbcon-cfb8
      o fbcon-cfb16
      o fbcon-ilbm
      o fbcon-iplan2p2
      o fbcon-iplan2p4
      o fbcon-iplan2p8
      o fbcon-mfb

    Accelerated drivers:

      o fbcon-cyber
      o fbcon-retz3fb

  - Frame buffer devices and low level console drivers can be compiled as
    loadable kernel modules and be loaded on demand. But it's strongly
    recommended to put at least one driver in the kernel :-)

  - You can specify multiple `video=' kernel options. Each options should be
    followed by the name of the frame buffer device and a colon, i.e.

	video=amifb:font:PEARL8x8
	
    instead of

	video=font:PEARL8x8

  - The utility `con2fbmap' allows you to dynamically map a virtual console to
    a frame buffer device.

	con2fbmap <con>

    shows the current mapping for VC <con> (count starts at 1).

	con2fbmap <con> <fb>

    maps VC <con> to frame buffer <fb> (count starts at 0). <con>=0 means all
    VCs.

  - You may want to add a line like

        alias fb1 vfb

    to your /etc/conf.modules or /etc/modules.conf.

TODO:

  - Test atafb, cyberfb and retz3fb. I know it compiles, that's all.

  - Split off all common parts of the frame buffer devices (i.e. colormap
    handling).

  - Move the external video driver of atafb to a separate frame buffer device.

  - Include clgen, once Franky is ready for that.

--------------------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <linux/fb.h>


const char *fbpath = "/dev/fb0current";		/* any frame buffer will do */

const char *programname;

void Usage(void)
{
    fprintf(stderr, "\nUsage: %s console [framebuffer]\n\n", programname);
    exit(1);
}

int main(int argc, char *argv[])
{
    int do_write = 0;
    int fd;
    struct fb_con2fbmap map;

    programname = argv[0];
    switch (argc) {
	case 3:
	    do_write = 1;
	    map.framebuffer = atoi(argv[2]);
	case 2:
	    map.console = atoi(argv[1]);
	    break;
	default:
	    Usage();
    }
    if ((fd = open(fbpath, O_RDONLY)) == -1) {
	fprintf(stderr, "open %s: %s\n", fbpath, strerror(errno));
	exit(1);
    }
    if (do_write) {
	if (ioctl(fd, FBIOPUT_CON2FBMAP, &map)) {
	    fprintf(stderr, "ioctl FBIOPUT_CON2FBMAP: %s\n", strerror(errno));
	    exit(1);
	}
    } else {
	if (ioctl(fd, FBIOGET_CON2FBMAP, &map)) {
	    fprintf(stderr, "ioctl FBIOGET_CON2FBMAP: %s\n", strerror(errno));
	    exit(1);
	}
	printf("console %d is mapped to framebuffer %d\n", map.console,
	       map.framebuffer);
    }
    close(fd);
    exit(0);
}
--------------------------------------------------------------------------------

--- linux-2.1.42/arch/m68k/amiga/amifb.c.orig	Mon Jun  2 20:13:24 1997
+++ linux-2.1.42/arch/m68k/amiga/amifb.c	Mon Jun  9 23:03:03 1997
@@ -1,3633 +0,0 @@
-/*
- * linux/arch/m68k/amiga/amifb.c -- Low level implementation of the Amiga frame
- *                                  buffer device
- *
- *    Copyright (C) 1995 Geert Uytterhoeven
- *
- *          with work by Roman Zippel
- *
- *
- * This file is based on the Atari frame buffer device (atafb.c):
- *
- *    Copyright (C) 1994 Martin Schaller
- *                       Roman Hodek
- *
- *          with work by Andreas Schwab
- *                       Guenther Kelleter
- *
- * and on the original Amiga console driver (amicon.c):
- *
- *    Copyright (C) 1993 Hamish Macdonald
- *                       Greg Harp
- *    Copyright (C) 1994 David Carter [carter@compsci.bristol.ac.uk]
- *
- *          with work by William Rucklidge (wjr@cs.cornell.edu)
- *                       Geert Uytterhoeven
- *                       Jes Sorensen (jds@kom.auc.dk)
- *
- *
- * History:
- *
- *   - 24 Jul 96: Copper generates now vblank interrupt and
- *                VESA Power Saving Protocol is fully implemented
- *   - 14 Jul 96: Rework and hopefully last ECS bugs fixed
- *   -  7 Mar 96: Hardware sprite support by Roman Zippel
- *   - 18 Feb 96: OCS and ECS support by Roman Zippel
- *                Hardware functions completely rewritten
- *   -  2 Dec 95: AGA version by Geert Uytterhoeven
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file COPYING in the main directory of this archive
- * for more details.
- */
-
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <linux/tty.h>
-#include <linux/malloc.h>
-#include <linux/delay.h>
-#include <linux/config.h>
-#include <linux/interrupt.h>
-#include <linux/fb.h>
-#include <linux/init.h>
-
-#include <asm/uaccess.h>
-#include <asm/system.h>
-#include <asm/irq.h>
-#include <asm/amigahw.h>
-#include <asm/amigaints.h>
-
-#define DEBUG
-
-#if !defined(CONFIG_AMIFB_OCS) && !defined(CONFIG_AMIFB_ECS) && !defined(CONFIG_AMIFB_AGA)
-#define CONFIG_AMIFB_OCS   /* define at least one fb driver, this will change later */
-#endif
-
-#if !defined(CONFIG_AMIFB_OCS)
-#  define IS_OCS (0)
-#elif defined(CONFIG_AMIFB_ECS) || defined(CONFIG_AMIFB_AGA)
-#  define IS_OCS (chipset == TAG_OCS)
-#else
-#  define CONFIG_AMIFB_OCS_ONLY
-#  define IS_OCS (1)
-#endif
-
-#if !defined(CONFIG_AMIFB_ECS)
-#  define IS_ECS (0)
-#elif defined(CONFIG_AMIFB_OCS) || defined(CONFIG_AMIFB_AGA)
-#  define IS_ECS (chipset == TAG_ECS)
-#else
-#  define CONFIG_AMIFB_ECS_ONLY
-#  define IS_ECS (1)
-#endif
-
-#if !defined(CONFIG_AMIFB_AGA)
-#  define IS_AGA (0)
-#elif defined(CONFIG_AMIFB_OCS) || defined(CONFIG_AMIFB_ECS)
-#  define IS_AGA (chipset == TAG_AGA)
-#else
-#  define CONFIG_AMIFB_AGA_ONLY
-#  define IS_AGA (1)
-#endif
-
-/*******************************************************************************
-
-
-   Generic video timings
-   ---------------------
-
-   Timings used by the frame buffer interface:
-
-   +----------+---------------------------------------------+----------+-------+
-   |          |                ^                            |          |       |
-   |          |                |upper_margin                |          |       |
-   |          |                                            |          |       |
-   +----------###############################################----------+-------+
-   |          #                ^                            #          |       |
-   |          #                |                            #          |       |
-   |          #                |                            #          |       |
-   |          #                |                            #          |       |
-   |   left   #                |                            #  right   | hsync |
-   |  margin  #                |       xres                 #  margin  |  len  |
-   |<-------->#<---------------+--------------------------->#<-------->|<----->|
-   |          #                |                            #          |       |
-   |          #                |                            #          |       |
-   |          #                |                            #          |       |
-   |          #                |yres                        #          |       |
-   |          #                |                            #          |       |
-   |          #                |                            #          |       |
-   |          #                |                            #          |       |
-   |          #                |                            #          |       |
-   |          #                |                            #          |       |
-   |          #                |                            #          |       |
-   |          #                |                            #          |       |
-   |          #                |                            #          |       |
-   |          #                                            #          |       |
-   +----------###############################################----------+-------+
-   |          |                ^                            |          |       |
-   |          |                |lower_margin                |          |       |
-   |          |                                            |          |       |
-   +----------+---------------------------------------------+----------+-------+
-   |          |                ^                            |          |       |
-   |          |                |vsync_len                   |          |       |
-   |          |                                            |          |       |
-   +----------+---------------------------------------------+----------+-------+
-
-
-   Amiga video timings
-   -------------------
-
-   The Amiga native chipsets uses another timing scheme:
-
-      - hsstrt:   Start of horizontal synchronization pulse
-      - hsstop:   End of horizontal synchronization pulse
-      - htotal:   Last value on the line (i.e. line length = htotal+1)
-      - vsstrt:   Start of vertical synchronization pulse
-      - vsstop:   End of vertical synchronization pulse
-      - vtotal:   Last line value (i.e. number of lines = vtotal+1)
-      - hcenter:  Start of vertical retrace for interlace
-
-   You can specify the blanking timings independently. Currently I just set
-   them equal to the respective synchronization values:
-
-      - hbstrt:   Start of horizontal blank
-      - hbstop:   End of horizontal blank
-      - vbstrt:   Start of vertical blank
-      - vbstop:   End of vertical blank
-
-   Horizontal values are in color clock cycles (280 ns), vertical values are in
-   scanlines.
-
-   (0, 0) is somewhere in the upper-left corner :-)
-
-
-   Amiga visible window definitions
-   --------------------------------
-
-   Currently I only have values for AGA, SHRES (28 MHz dotclock). Feel free to
-   make corrections and/or additions.
-
-   Within the above synchronization specifications, the visible window is
-   defined by the following parameters (actual register resolutions may be
-   different; all horizontal values are normalized with respect to the pixel
-   clock):
-
-      - diwstrt_h:   Horizontal start of the visible window
-      - diwstop_h:   Horizontal stop+1(*) of the visible window
-      - diwstrt_v:   Vertical start of the visible window
-      - diwstop_v:   Vertical stop of the visible window
-      - ddfstrt:     Horizontal start of display DMA
-      - ddfstop:     Horizontal stop of display DMA
-      - hscroll:     Horizontal display output delay
-
-   Sprite positioning:
-
-      - sprstrt_h:   Horizontal start-4 of sprite
-      - sprstrt_v:   Vertical start of sprite
-
-   (*) Even Commodore did it wrong in the AGA monitor drivers by not adding 1.
-
-   Horizontal values are in dotclock cycles (35 ns), vertical values are in
-   scanlines.
-
-   (0, 0) is somewhere in the upper-left corner :-)
-
-
-   Dependencies (AGA, SHRES (35 ns dotclock))
-   -------------------------------------------
-
-   Since there are much more parameters for the Amiga display than for the
-   frame buffer interface, there must be some dependencies among the Amiga
-   display parameters. Here's what I found out:
-
-      - ddfstrt and ddfstop are best aligned to 64 pixels.
-      - the chipset needs 64+4 horizontal pixels after the DMA start before the
-        first pixel is output, so diwstrt_h = ddfstrt+64+4 if you want to
-        display the first pixel on the line too. Increase diwstrt_h for virtual
-        screen panning.
-      - the display DMA always fetches 64 pixels at a time (fmode = 3).
-      - ddfstop is ddfstrt+#pixels-64.
-      - diwstop_h = diwstrt_h+xres+1. Because of the additional 1 this can be 1
-        more than htotal.
-      - hscroll simply adds a delay to the display output. Smooth horizontal
-        panning needs an extra 64 pixels on the left to prefetch the pixels that
-        `fall off' on the left.
-      - if ddfstrt < 192, the sprite DMA cycles are all stolen by the bitplane
-        DMA, so it's best to make the DMA start as late as possible.
-      - you really don't want to make ddfstrt < 128, since this will steal DMA
-        cycles from the other DMA channels (audio, floppy and Chip RAM refresh).
-      - I make diwstop_h and diwstop_v as large as possible.
-
-   General dependencies
-   --------------------
-
-      - all values are SHRES pixel (35ns)
-
-                  table 1:fetchstart  table 2:prefetch    table 3:fetchsize
-                  ------------------  ----------------    -----------------
-   Pixclock     # SHRES|HIRES|LORES # SHRES|HIRES|LORES # SHRES|HIRES|LORES
-   -------------#------+-----+------#------+-----+------#------+-----+------
-   Bus width 1x #   16 |  32 |  64  #   16 |  32 |  64  #   64 |  64 |  64
-   Bus width 2x #   32 |  64 | 128  #   32 |  64 |  64  #   64 |  64 | 128
-   Bus width 4x #   64 | 128 | 256  #   64 |  64 |  64  #   64 | 128 | 256
-
-      - chipset needs 4 pixels before the first pixel is output
-      - ddfstrt must be aligned to fetchstart (table 1)
-      - chipset needs also prefetch (table 2) to get first pixel data, so
-        ddfstrt = ((diwstrt_h-4) & -fetchstart) - prefetch
-      - for horizontal panning decrease diwstrt_h
-      - the length of a fetchline must be aligned to fetchsize (table 3)
-      - if fetchstart is smaller than fetchsize, then ddfstrt can a little bit
-        moved to optimize use of dma (usefull for OCS/ECS overscan displays)
-      - ddfstop is ddfstrt+ddfsize-fetchsize
-      - If C= didn't change anything for AGA, then at following positions the
-        dma bus is allready used:
-        ddfstrt <  48 -> memory refresh
-                <  96 -> disk dma
-                < 160 -> audio dma
-                < 192 -> sprite 0 dma
-                < 416 -> sprite dma (32 per sprite)
-      - in accordance with the hardware reference manual a hardware stop is at
-        192, but AGA (ECS?) can go below this.
-
-   DMA priorities
-   --------------
-
-   Since there are limits on the earliest start value for display DMA and the
-   display of sprites, I use the following policy on horizontal panning and
-   the hardware cursor:
-
-      - if you want to start display DMA too early, you loose the ability to
-        do smooth horizontal panning (xpanstep 1 -> 64).
-      - if you want to go even further, you loose the hardware cursor too.
-
-   IMHO a hardware cursor is more important for X than horizontal scrolling,
-   so that's my motivation.
-
-
-   Implementation
-   --------------
-
-   ami_decode_var() converts the frame buffer values to the Amiga values. It's
-   just a `straightforward' implementation of the above rules.
-
-
-   Standard VGA timings
-   --------------------
-
-               xres  yres    left  right  upper  lower    hsync    vsync
-               ----  ----    ----  -----  -----  -----    -----    -----
-      80x25     720   400      27     45     35     12      108        2
-      80x30     720   480      27     45     30      9      108        2
-
-   These were taken from a XFree86 configuration file, recalculated for a 28 MHz
-   dotclock (Amigas don't have a 25 MHz dotclock) and converted to frame buffer
-   generic timings.
-
-   As a comparison, graphics/monitor.h suggests the following:
-
-               xres  yres    left  right  upper  lower    hsync    vsync
-               ----  ----    ----  -----  -----  -----    -----    -----
-
-      VGA       640   480      52    112     24     19    112 -      2 +
-      VGA70     640   400      52    112     27     21    112 -      2 -
-
-
-   Sync polarities
-   ---------------
-
-      VSYNC    HSYNC    Vertical size    Vertical total
-      -----    -----    -------------    --------------
-        +        +           Reserved          Reserved
-        +        -                400               414
-        -        +                350               362
-        -        -                480               496
-
-   Source: CL-GD542X Technical Reference Manual, Cirrus Logic, Oct 1992
-
-
-   Broadcast video timings
-   -----------------------
-
-   According to the CCIR and RETMA specifications, we have the following values:
-
-   CCIR -> PAL
-   -----------
-
-      - a scanline is 64 s long, of which 52.48 s are visible. This is about
-        736 visible 70 ns pixels per line.
-      - we have 625 scanlines, of which 575 are visible (interlaced); after
-        rounding this becomes 576.
-
-   RETMA -> NTSC
-   -------------
-
-      - a scanline is 63.5 s long, of which 53.5 s are visible.  This is about
-        736 visible 70 ns pixels per line.
-      - we have 525 scanlines, of which 485 are visible (interlaced); after
-        rounding this becomes 484.
-
-   Thus if you want a PAL compatible display, you have to do the following:
-
-      - set the FB_SYNC_BROADCAST flag to indicate that standard broadcast
-        timings are to be used.
-      - make sure upper_margin+yres+lower_margin+vsync_len = 625 for an
-        interlaced, 312 for a non-interlaced and 156 for a doublescanned
-        display.
-      - make sure left_margin+xres+right_margin+hsync_len = 1816 for a SHRES,
-        908 for a HIRES and 454 for a LORES display.
-      - the left visible part begins at 360 (SHRES; HIRES:180, LORES:90),
-        left_margin+2*hsync_len must be greater or equal.
-      - the upper visible part begins at 48 (interlaced; non-interlaced:24,
-        doublescanned:12), upper_margin+2*vsync_len must be greater or equal.
-      - ami_encode_var() calculates margins with a hsync of 5320 ns and a vsync
-        of 4 scanlines
-
-   The settings for a NTSC compatible display are straightforward.
-
-   Note that in a strict sense the PAL and NTSC standards only define the
-   encoding of the color part (chrominance) of the video signal and don't say
-   anything about horizontal/vertical synchronization nor refresh rates.
-
-
-                                                            -- Geert --
-
-*******************************************************************************/
-
-
-	/*
-	 * Custom Chipset Definitions
-	 */
-
-#define CUSTOM_OFS(fld) ((long)&((struct CUSTOM*)0)->fld)
-
-	/*
-	 * BPLCON0 -- Bitplane Control Register 0
-	 */
-
-#define BPC0_HIRES	(0x8000)
-#define BPC0_BPU2	(0x4000) /* Bit plane used count */
-#define BPC0_BPU1	(0x2000)
-#define BPC0_BPU0	(0x1000)
-#define BPC0_HAM	(0x0800) /* HAM mode */
-#define BPC0_DPF	(0x0400) /* Double playfield */
-#define BPC0_COLOR	(0x0200) /* Enable colorburst */
-#define BPC0_GAUD	(0x0100) /* Genlock audio enable */
-#define BPC0_UHRES	(0x0080) /* Ultrahi res enable */
-#define BPC0_SHRES	(0x0040) /* Super hi res mode */
-#define BPC0_BYPASS	(0x0020) /* Bypass LUT - AGA */
-#define BPC0_BPU3	(0x0010) /* AGA */
-#define BPC0_LPEN	(0x0008) /* Light pen enable */
-#define BPC0_LACE	(0x0004) /* Interlace */
-#define BPC0_ERSY	(0x0002) /* External resync */
-#define BPC0_ECSENA	(0x0001) /* ECS enable */
-
-	/*
-	 * BPLCON2 -- Bitplane Control Register 2
-	 */
-
-#define BPC2_ZDBPSEL2	(0x4000) /* Bitplane to be used for ZD - AGA */
-#define BPC2_ZDBPSEL1	(0x2000)
-#define BPC2_ZDBPSEL0	(0x1000)
-#define BPC2_ZDBPEN	(0x0800) /* Enable ZD with ZDBPSELx - AGA */
-#define BPC2_ZDCTEN	(0x0400) /* Enable ZD with palette bit #31 - AGA */
-#define BPC2_KILLEHB	(0x0200) /* Kill EHB mode - AGA */
-#define BPC2_RDRAM	(0x0100) /* Color table accesses read, not write - AGA */
-#define BPC2_SOGEN	(0x0080) /* SOG output pin high - AGA */
-#define BPC2_PF2PRI	(0x0040) /* PF2 priority over PF1 */
-#define BPC2_PF2P2	(0x0020) /* PF2 priority wrt sprites */
-#define BPC2_PF2P1	(0x0010)
-#define BPC2_PF2P0	(0x0008)
-#define BPC2_PF1P2	(0x0004) /* ditto PF1 */
-#define BPC2_PF1P1	(0x0002)
-#define BPC2_PF1P0	(0x0001)
-
-	/*
-	 * BPLCON3 -- Bitplane Control Register 3 (AGA)
-	 */
-
-#define BPC3_BANK2	(0x8000) /* Bits to select color register bank */
-#define BPC3_BANK1	(0x4000)
-#define BPC3_BANK0	(0x2000)
-#define BPC3_PF2OF2	(0x1000) /* Bits for color table offset when PF2 */
-#define BPC3_PF2OF1	(0x0800)
-#define BPC3_PF2OF0	(0x0400)
-#define BPC3_LOCT	(0x0200) /* Color register writes go to low bits */
-#define BPC3_SPRES1	(0x0080) /* Sprite resolution bits */
-#define BPC3_SPRES0	(0x0040)
-#define BPC3_BRDRBLNK	(0x0020) /* Border blanked? */
-#define BPC3_BRDRTRAN	(0x0010) /* Border transparent? */
-#define BPC3_ZDCLKEN	(0x0004) /* ZD pin is 14 MHz (HIRES) clock output */
-#define BPC3_BRDRSPRT	(0x0002) /* Sprites in border? */
-#define BPC3_EXTBLKEN	(0x0001) /* BLANK programmable */
-
-	/*
-	 * BPLCON4 -- Bitplane Control Register 4 (AGA)
-	 */
-
-#define BPC4_BPLAM7	(0x8000) /* bitplane color XOR field */
-#define BPC4_BPLAM6	(0x4000)
-#define BPC4_BPLAM5	(0x2000)
-#define BPC4_BPLAM4	(0x1000)
-#define BPC4_BPLAM3	(0x0800)
-#define BPC4_BPLAM2	(0x0400)
-#define BPC4_BPLAM1	(0x0200)
-#define BPC4_BPLAM0	(0x0100)
-#define BPC4_ESPRM7	(0x0080) /* 4 high bits for even sprite colors */
-#define BPC4_ESPRM6	(0x0040)
-#define BPC4_ESPRM5	(0x0020)
-#define BPC4_ESPRM4	(0x0010)
-#define BPC4_OSPRM7	(0x0008) /* 4 high bits for odd sprite colors */
-#define BPC4_OSPRM6	(0x0004)
-#define BPC4_OSPRM5	(0x0002)
-#define BPC4_OSPRM4	(0x0001)
-
-	/*
-	 * BEAMCON0 -- Beam Control Register
-	 */
-
-#define BMC0_HARDDIS	(0x4000) /* Disable hardware limits */
-#define BMC0_LPENDIS	(0x2000) /* Disable light pen latch */
-#define BMC0_VARVBEN	(0x1000) /* Enable variable vertical blank */
-#define BMC0_LOLDIS	(0x0800) /* Disable long/short line toggle */
-#define BMC0_CSCBEN	(0x0400) /* Composite sync/blank */
-#define BMC0_VARVSYEN	(0x0200) /* Enable variable vertical sync */
-#define BMC0_VARHSYEN	(0x0100) /* Enable variable horizontal sync */
-#define BMC0_VARBEAMEN	(0x0080) /* Enable variable beam counters */
-#define BMC0_DUAL	(0x0040) /* Enable alternate horizontal beam counter */
-#define BMC0_PAL	(0x0020) /* Set decodes for PAL */
-#define BMC0_VARCSYEN	(0x0010) /* Enable variable composite sync */
-#define BMC0_BLANKEN	(0x0008) /* Blank enable (no longer used on AGA) */
-#define BMC0_CSYTRUE	(0x0004) /* CSY polarity */
-#define BMC0_VSYTRUE	(0x0002) /* VSY polarity */
-#define BMC0_HSYTRUE	(0x0001) /* HSY polarity */
-
-
-	/*
-	 * FMODE -- Fetch Mode Control Register (AGA)
-	 */
-
-#define FMODE_SSCAN2	(0x8000) /* Sprite scan-doubling */
-#define FMODE_BSCAN2	(0x4000) /* Use PF2 modulus every other line */
-#define FMODE_SPAGEM	(0x0008) /* Sprite page mode */
-#define FMODE_SPR32	(0x0004) /* Sprite 32 bit fetch */
-#define FMODE_BPAGEM	(0x0002) /* Bitplane page mode */
-#define FMODE_BPL32	(0x0001) /* Bitplane 32 bit fetch */
-
-	/*
-	 * Tags used to indicate a specific Pixel Clock
-	 *
-	 * clk_shift is the shift value to get the timings in 35 ns units
-	 */
-
-enum { TAG_SHRES, TAG_HIRES, TAG_LORES };
-
-	/*
-	 * Tags used to indicate the specific chipset
-	 */
-
-enum { TAG_OCS, TAG_ECS, TAG_AGA };
-
-	/*
-	 * Tags used to indicate the memory bandwidth
-	 */
-
-enum { TAG_FMODE_1, TAG_FMODE_2, TAG_FMODE_4 };
-
-
-	/*
-	 * Clock Definitions, Maximum Display Depth
-	 *
-	 * These depend on the E-Clock or the Chipset, so they are filled in
-	 * dynamically
-	 */
-
-static u_long pixclock[3];	/* SHRES/HIRES/LORES: index = clk_shift */
-static u_short maxdepth[3];	/* SHRES/HIRES/LORES: index = clk_shift */
-static u_short maxfmode, chipset;
-
-
-	/*
-	 * Broadcast Video Timings
-	 *
-	 * Horizontal values are in 35 ns (SHRES) units
-	 * Vertical values are in interlaced scanlines
-	 */
-
-#define PAL_DIWSTRT_H	(360)	/* PAL Window Limits */
-#define PAL_DIWSTRT_V	(48)
-#define PAL_HTOTAL	(1816)
-#define PAL_VTOTAL	(625)
-
-#define NTSC_DIWSTRT_H	(360)	/* NTSC Window Limits */
-#define NTSC_DIWSTRT_V	(40)
-#define NTSC_HTOTAL	(1816)
-#define NTSC_VTOTAL	(525)
-
-
-	/*
-	 * Monitor Specifications
-	 *
-	 * These are typical for a `generic' Amiga monitor (e.g. A1960)
-	 */
-
-static long vfmin = 50, vfmax = 90, hfmin = 15000, hfmax = 38000;
-
-
-	/*
-	 * Various macros
-	 */
-
-#define up2(v)		(((v)+1) & -2)
-#define down2(v)	((v) & -2)
-#define div2(v)		((v)>>1)
-#define mod2(v)		((v) & 1)
-
-#define up4(v)		(((v)+3) & -4)
-#define down4(v)	((v) & -4)
-#define mul4(v)		((v)<<2)
-#define div4(v)		((v)>>2)
-#define mod4(v)		((v) & 3)
-
-#define up8(v)		(((v)+7) & -8)
-#define down8(v)	((v) & -8)
-#define div8(v)		((v)>>3)
-#define mod8(v)		((v) & 7)
-
-#define up16(v)		(((v)+15) & -16)
-#define down16(v)	((v) & -16)
-#define div16(v)	((v)>>4)
-#define mod16(v)	((v) & 15)
-
-#define up32(v)		(((v)+31) & -32)
-#define down32(v)	((v) & -32)
-#define div32(v)	((v)>>5)
-#define mod32(v)	((v) & 31)
-
-#define up64(v)		(((v)+63) & -64)
-#define down64(v)	((v) & -64)
-#define div64(v)	((v)>>6)
-#define mod64(v)	((v) & 63)
-
-#define upx(x,v)	(((v)+(x)-1) & -(x))
-#define downx(x,v)	((v) & -(x))
-#define modx(x,v)	((v) & ((x)-1))
-
-/* if x1 is not a constant, this macro won't make real sense :-) */
-#define DIVUL(x1, x2) ({int res; asm("divul %1,%2,%3": "=d" (res): \
-	"d" (x2), "d" ((long)((x1)/0x100000000ULL)), "0" ((long)(x1))); res;})
-
-#define min(a, b)	((a) < (b) ? (a) : (b))
-#define max(a, b)	((a) > (b) ? (a) : (b))
-
-#define highw(x)	((u_long)(x)>>16 & 0xffff)
-#define loww(x)		((u_long)(x) & 0xffff)
-
-#define arraysize(x)	(sizeof(x)/sizeof(*(x)))
-
-#define VBlankOn()	custom.intena = IF_SETCLR|IF_COPER
-#define VBlankOff()	custom.intena = IF_COPER
-
-
-	/*
-	 * Chip RAM we reserve for the Frame Buffer
-	 *
-	 * This defines the Maximum Virtual Screen Size
-	 * (Setable per kernel options?)
-	 */
-
-#define VIDEOMEMSIZE_AGA_2M	(1310720) /* AGA (2MB) : max 1280*1024*256  */
-#define VIDEOMEMSIZE_AGA_1M	(786432)  /* AGA (1MB) : max 1024*768*256   */
-#define VIDEOMEMSIZE_ECS_2M	(655360)  /* ECS (2MB) : max 1280*1024*16   */
-#define VIDEOMEMSIZE_ECS_1M	(393216)  /* ECS (1MB) : max 1024*768*16    */
-#define VIDEOMEMSIZE_OCS	(262144)  /* OCS       : max ca. 800*600*16 */
-
-#define SPRITEMEMSIZE		(64*64/4) /* max 64*64*4 */
-#define DUMMYSPRITEMEMSIZE	(8)
-
-#define CHIPRAM_SAFETY_LIMIT	(16384)
-
-static u_long videomemory, spritememory;
-static u_long videomemorysize;
-
-	/*
-	 * This is the earliest allowed start of fetching display data.
-	 * Only if you really want no hardware cursor and audio,
-	 * set this to 128, but let it better at 192
-	 */
-
-static u_long min_fstrt = 192;
-
-#define assignchunk(name, type, ptr, size) \
-{ \
-	(name) = (type)(ptr); \
-	ptr += size; \
-}
-
-
-	/*
-	 * Copper Instructions
-	 */
-
-#define CMOVE(val, reg)		(CUSTOM_OFS(reg)<<16 | (val))
-#define CMOVE2(val, reg)	((CUSTOM_OFS(reg)+2)<<16 | (val))
-#define CWAIT(x, y)		(((y) & 0x1fe)<<23 | ((x) & 0x7f0)<<13 | 0x0001fffe)
-#define CEND			(0xfffffffe)
-
-
-typedef union {
-	u_long l;
-	u_short w[2];
-} copins;
-
-static struct copdisplay {
-	copins *init;
-	copins *wait;
-	copins *list[2][2];
-	copins *rebuild[2];
-} copdisplay;
-
-static u_short currentcop = 0;
-
-	/*
-	 * Hardware Cursor
-	 */
-
-static int cursorrate = 20;	/* Number of frames/flash toggle */
-static u_short cursorstate = -1;
-static u_short cursormode = FB_CURSOR_OFF;
-
-static u_short *lofsprite, *shfsprite, *dummysprite;
-
-	/*
-	 * Current Video Mode
-	 */
-
-static struct amiga_fb_par {
-
-	/* General Values */
-
-	int xres;		/* vmode */
-	int yres;		/* vmode */
-	int vxres;		/* vmode */
-	int vyres;		/* vmode */
-	int xoffset;		/* vmode */
-	int yoffset;		/* vmode */
-	u_short bpp;		/* vmode */
-	u_short clk_shift;	/* vmode */
-	u_short line_shift;	/* vmode */
-	int vmode;		/* vmode */
-	u_short diwstrt_h;	/* vmode */
-	u_short diwstop_h;	/* vmode */
-	u_short diwstrt_v;	/* vmode */
-	u_short diwstop_v;	/* vmode */
-	u_long next_line;	/* modulo for next line */
-	u_long next_plane;	/* modulo for next plane */
-
-	/* Cursor Values */
-
-	struct {
-		short crsr_x;	/* movecursor */
-		short crsr_y;	/* movecursor */
-		short spot_x;
-		short spot_y;
-		u_short height;
-		u_short width;
-		u_short fmode;
-	} crsr;
-
-	/* OCS Hardware Registers */
-
-	u_long bplpt0;		/* vmode, pan (Note: physical address) */
-	u_long bplpt0wrap;	/* vmode, pan (Note: physical address) */
-	u_short ddfstrt;
-	u_short ddfstop;
-	u_short bpl1mod;
-	u_short bpl2mod;
-	u_short bplcon0;	/* vmode */
-	u_short bplcon1;	/* vmode */
-	u_short htotal;		/* vmode */
-	u_short vtotal;		/* vmode */
-
-	/* Additional ECS Hardware Registers */
-
-	u_short bplcon3;	/* vmode */
-	u_short beamcon0;	/* vmode */
-	u_short hsstrt;		/* vmode */
-	u_short hsstop;		/* vmode */
-	u_short hbstrt;		/* vmode */
-	u_short hbstop;		/* vmode */
-	u_short vsstrt;		/* vmode */
-	u_short vsstop;		/* vmode */
-	u_short vbstrt;		/* vmode */
-	u_short vbstop;		/* vmode */
-	u_short hcenter;	/* vmode */
-
-	/* Additional AGA Hardware Registers */
-
-	u_short fmode;		/* vmode */
-} currentpar;
-
-static int currcon = 0;
-
-static struct display disp[MAX_NR_CONSOLES];
-static struct fb_info fb_info;
-
-static int node;		/* node of the /dev/fb?current file */
-
-	/*
-	 * The minimum period for audio depends on htotal (for OCS/ECS/AGA)
-	 * (Imported from arch/m68k/amiga/amisound.c)
-	 */
-
-extern volatile u_short amiga_audio_min_period;
-
-	/*
-	 * Since we can't read the palette on OCS/ECS, and since reading one
-	 * single color palette entry require 5 expensive custom chip bus accesses
-	 * on AGA, we keep a copy of the current palette.
-	 */
-
-#if defined(CONFIG_AMIFB_AGA)
-static struct { u_char red, green, blue, pad; } palette[256];
-#else
-static struct { u_char red, green, blue, pad; } palette[32];
-#endif
-
-#if defined(CONFIG_AMIFB_ECS)
-static u_short ecs_palette[32];
-#endif
-
-	/*
-	 * Latches for Display Changes during VBlank
-	 */
-
-static u_short do_vmode_full = 0;	/* Change the Video Mode */
-static u_short do_vmode_pan = 0;	/* Update the Video Mode */
-static short do_blank = 0;		/* (Un)Blank the Screen (1) */
-static u_short do_cursor = 0;		/* Move the Cursor */
-
-
-	/*
-	 * Various Flags
-	 */
-
-static u_short is_blanked = 0;		/* Screen is Blanked */
-static u_short is_lace = 0;		/* Screen is laced */
-
-	/*
-	 * Frame Buffer Name
-	 *
-	 * The rest of the name is filled in during initialization
-	 */
-
-static char amiga_fb_name[16] = "Amiga ";
-
-	/*
-	 * Predefined Video Mode Names
-	 *
-	 * The a2024-?? modes don't work yet because there's no A2024 driver.
-	 */
-
-static char *amiga_fb_modenames[] = {
-
-	/*
-	 * Autodetect (Default) Video Mode
-	 */
-
-	"default",
-
-	/*
-	 * AmigaOS Video Modes
-	 */
-
-	"ntsc",			/* 640x200, 15 kHz, 60 Hz (NTSC) */
-	"ntsc-lace",		/* 640x400, 15 kHz, 60 Hz interlaced (NTSC) */
-	"pal",			/* 640x256, 15 kHz, 50 Hz (PAL) */
-	"pal-lace",		/* 640x512, 15 kHz, 50 Hz interlaced (PAL) */
-	"multiscan",		/* 640x480, 29 kHz, 57 Hz */
-	"multiscan-lace",	/* 640x960, 29 kHz, 57 Hz interlaced */
-	"a2024-10",		/* 1024x800, 10 Hz (Not yet supported) */
-	"a2024-15",		/* 1024x800, 15 Hz (Not yet supported) */
-	"euro36",		/* 640x200, 15 kHz, 72 Hz */
-	"euro36-lace",		/* 640x400, 15 kHz, 72 Hz interlaced */
-	"euro72",		/* 640x400, 29 kHz, 68 Hz */
-	"euro72-lace",		/* 640x800, 29 kHz, 68 Hz interlaced */
-	"super72",		/* 800x300, 23 kHz, 70 Hz */
-	"super72-lace",		/* 800x600, 23 kHz, 70 Hz interlaced */
-	"dblntsc",		/* 640x200, 27 kHz, 57 Hz doublescan */
-	"dblntsc-ff",		/* 640x400, 27 kHz, 57 Hz */
-	"dblntsc-lace",		/* 640x800, 27 kHz, 57 Hz interlaced */
-	"dblpal",		/* 640x256, 27 kHz, 47 Hz doublescan */
-	"dblpal-ff",		/* 640x512, 27 kHz, 47 Hz */
-	"dblpal-lace",		/* 640x1024, 27 kHz, 47 Hz interlaced */
-
-	/*
-	 * VGA Video Modes
-	 */
-
-	"vga",			/* 640x480, 31 kHz, 60 Hz (VGA) */
-	"vga70",		/* 640x400, 31 kHz, 70 Hz (VGA) */
-
-	/*
-	 * User Defined Video Modes: to be set after boot up using e.g. fbset
-	 */
-
-	"user0", "user1", "user2", "user3", "user4", "user5", "user6", "user7"
-};
-
-static struct fb_var_screeninfo amiga_fb_predefined[] = {
-
-	/*
-	 * Autodetect (Default) Video Mode
-	 */
-
-	{ 0, },
-
-	/*
-	 * AmigaOS Video Modes
-	 */
-
-	{
-		/* ntsc */
-		640, 200, 640, 200, 0, 0, 4, 0,
-		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-		0, 0, -1, -1, FB_ACCEL_NONE, TAG_HIRES, 106, 86, 44, 16, 76, 2,
-		FB_SYNC_BROADCAST, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
-	}, {
-		/* ntsc-lace */
-		640, 400, 640, 400, 0, 0, 4, 0,
-		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-		0, 0, -1, -1, FB_ACCEL_NONE, TAG_HIRES, 106, 86, 88, 33, 76, 4,
-		FB_SYNC_BROADCAST, FB_VMODE_INTERLACED | FB_VMODE_YWRAP
-	}, {
-		/* pal */
-		640, 256, 640, 256, 0, 0, 4, 0,
-		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-		0, 0, -1, -1, FB_ACCEL_NONE, TAG_HIRES, 106, 86, 40, 14, 76, 2,
-		FB_SYNC_BROADCAST, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
-	}, {
-		/* pal-lace */
-		640, 512, 640, 512, 0, 0, 4, 0,
-		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-		0, 0, -1, -1, FB_ACCEL_NONE, TAG_HIRES, 106, 86, 80, 29, 76, 4,
-		FB_SYNC_BROADCAST, FB_VMODE_INTERLACED | FB_VMODE_YWRAP
-	}, {
-		/* multiscan */
-		640, 480, 640, 480, 0, 0, 4, 0,
-		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 96, 112, 29, 8, 72, 8,
-		0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
-
-	}, {
-		/* multiscan-lace */
-		640, 960, 640, 960, 0, 0, 4, 0,
-		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 96, 112, 58, 16, 72, 16,
-		0, FB_VMODE_INTERLACED | FB_VMODE_YWRAP
-	}, {
-		/* a2024-10 (Not yet supported) */
-		1024, 800, 1024, 800, 0, 0, 2, 0,
-		{0, 2, 0}, {0, 2, 0}, {0, 2, 0}, {0, 0, 0},
-		0, 0, -1, -1, FB_ACCEL_NONE, TAG_HIRES, 0, 0, 0, 0, 0, 0,
-		0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
-	}, {
-		/* a2024-15 (Not yet supported) */
-		1024, 800, 1024, 800, 0, 0, 2, 0,
-		{0, 2, 0}, {0, 2, 0}, {0, 2, 0}, {0, 0, 0},
-		0, 0, -1, -1, FB_ACCEL_NONE, TAG_HIRES, 0, 0, 0, 0, 0, 0,
-		0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
-	}, {
-		/* euro36 */
-		640, 200, 640, 200, 0, 0, 4, 0,
-		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-		0, 0, -1, -1, FB_ACCEL_NONE, TAG_HIRES, 92, 124, 6, 6, 52, 5,
-		0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
-	}, {
-		/* euro36-lace */
-		640, 400, 640, 400, 0, 0, 4, 0,
-		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-		0, 0, -1, -1, FB_ACCEL_NONE, TAG_HIRES, 92, 124, 12, 12, 52, 10,
-		0, FB_VMODE_INTERLACED | FB_VMODE_YWRAP
-	}, {
-		/* euro72 */
-		640, 400, 640, 400, 0, 0, 4, 0,
-		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 164, 92, 9, 9, 80, 8,
-		0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
-	}, {
-		/* euro72-lace */
-		640, 800, 640, 800, 0, 0, 4, 0,
-		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 164, 92, 18, 18, 80, 16,
-		0, FB_VMODE_INTERLACED | FB_VMODE_YWRAP
-	}, {
-		/* super72 */
-		800, 300, 800, 300, 0, 0, 4, 0,
-		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 212, 140, 10, 11, 80, 7,
-		0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
-	}, {
-		/* super72-lace */
-		800, 600, 800, 600, 0, 0, 4, 0,
-		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 212, 140, 20, 22, 80, 14,
-		0, FB_VMODE_INTERLACED | FB_VMODE_YWRAP
-	}, {
-		/* dblntsc */
-		640, 200, 640, 200, 0, 0, 4, 0,
-		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 196, 124, 18, 17, 80, 4,
-		0, FB_VMODE_DOUBLE | FB_VMODE_YWRAP
-	}, {
-		/* dblntsc-ff */
-		640, 400, 640, 400, 0, 0, 4, 0,
-		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 196, 124, 36, 35, 80, 7,
-		0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
-	}, {
-		/* dblntsc-lace */
-		640, 800, 640, 800, 0, 0, 4, 0,
-		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 196, 124, 72, 70, 80, 14,
-		0, FB_VMODE_INTERLACED | FB_VMODE_YWRAP
-	}, {
-		/* dblpal */
-		640, 256, 640, 256, 0, 0, 4, 0,
-		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 196, 124, 14, 13, 80, 4,
-		0, FB_VMODE_DOUBLE | FB_VMODE_YWRAP
-	}, {
-		/* dblpal-ff */
-		640, 512, 640, 512, 0, 0, 4, 0,
-		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 196, 124, 28, 27, 80, 7,
-		0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
-	}, {
-		/* dblpal-lace */
-		640, 1024, 640, 1024, 0, 0, 4, 0,
-		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 196, 124, 56, 54, 80, 14,
-		0, FB_VMODE_INTERLACED | FB_VMODE_YWRAP
-	},
-
-	/*
-	 * VGA Video Modes
-	 */
-
-	{
-		/* vga */
-		640, 480, 640, 480, 0, 0, 4, 0,
-		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 64, 96, 30, 9, 112, 2,
-		0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
-	}, {
-		/* vga70 */
-		640, 400, 640, 400, 0, 0, 4, 0,
-		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 64, 96, 35, 12, 112, 2,
-		FB_SYNC_VERT_HIGH_ACT | FB_SYNC_COMP_HIGH_ACT, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
-	},
-
-	/*
-	 * User Defined Video Modes
-	 */
-
-	{ 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }
-};
-
-#define NUM_USER_MODES   (8)
-#define NUM_TOTAL_MODES  arraysize(amiga_fb_predefined)
-#define NUM_PREDEF_MODES (NUM_TOTAL_MODES-NUM_USER_MODES)
-
-static int amifb_ilbm = 0;	/* interleaved or normal bitplanes */
-
-static int amifb_inverse = 0;
-static int amifb_usermode = 0;
-
-	/*
-	 * Some default modes
-	 */
-
-#define DEFMODE_PAL        "pal"	/* for PAL OCS/ECS */
-#define DEFMODE_NTSC       "ntsc"	/* for NTSC OCS/ECS */
-#define DEFMODE_AMBER_PAL  "pal-lace"	/* for flicker fixed PAL (A3000) */
-#define DEFMODE_AMBER_NTSC "ntsc-lace"	/* for flicker fixed NTSC (A3000) */
-#define DEFMODE_AGA        "vga70"	/* for AGA */
-
-	/*
-	 * Macros for the conversion from real world values to hardware register
-	 * values
-	 *
-	 * This helps us to keep our attention on the real stuff...
-	 *
-	 * Hardware limits for AGA:
-	 *
-	 *	parameter  min    max  step
-	 *	---------  ---   ----  ----
-	 *	diwstrt_h    0   2047     1
-	 *	diwstrt_v    0   2047     1
-	 *	diwstop_h    0   4095     1
-	 *	diwstop_v    0   4095     1
-	 *
-	 *	ddfstrt      0   2032    16
-	 *	ddfstop      0   2032    16
-	 *
-	 *	htotal       8   2048     8
-	 *	hsstrt       0   2040     8
-	 *	hsstop       0   2040     8
-	 *	vtotal       1   4096     1
-	 *	vsstrt       0   4095     1
-	 *	vsstop       0   4095     1
-	 *	hcenter      0   2040     8
-	 *
-	 *	hbstrt       0   2047     1
-	 *	hbstop       0   2047     1
-	 *	vbstrt       0   4095     1
-	 *	vbstop       0   4095     1
-	 *
-	 * Horizontal values are in 35 ns (SHRES) pixels
-	 * Vertical values are in half scanlines
-	 */
-
-/* bplcon1 (smooth scrolling) */
-
-#define hscroll2hw(hscroll) \
-	(((hscroll)<<12 & 0x3000) | ((hscroll)<<8 & 0xc300) | \
-	 ((hscroll)<<4 & 0x0c00) | ((hscroll)<<2 & 0x00f0) | ((hscroll)>>2 & 0x000f))
-
-/* diwstrt/diwstop/diwhigh (visible display window) */
-
-#define diwstrt2hw(diwstrt_h, diwstrt_v) \
-	(((diwstrt_v)<<7 & 0xff00) | ((diwstrt_h)>>2 & 0x00ff))
-#define diwstop2hw(diwstop_h, diwstop_v) \
-	(((diwstop_v)<<7 & 0xff00) | ((diwstop_h)>>2 & 0x00ff))
-#define diwhigh2hw(diwstrt_h, diwstrt_v, diwstop_h, diwstop_v) \
-	(((diwstop_h)<<3 & 0x2000) | ((diwstop_h)<<11 & 0x1800) | \
-	 ((diwstop_v)>>1 & 0x0700) | ((diwstrt_h)>>5 & 0x0020) | \
-	 ((diwstrt_h)<<3 & 0x0018) | ((diwstrt_v)>>9 & 0x0007))
-
-/* ddfstrt/ddfstop (display DMA) */
-
-#define ddfstrt2hw(ddfstrt)	div8(ddfstrt)
-#define ddfstop2hw(ddfstop)	div8(ddfstop)
-
-/* hsstrt/hsstop/htotal/vsstrt/vsstop/vtotal/hcenter (sync timings) */
-
-#define hsstrt2hw(hsstrt)	(div8(hsstrt))
-#define hsstop2hw(hsstop)	(div8(hsstop))
-#define htotal2hw(htotal)	(div8(htotal)-1)
-#define vsstrt2hw(vsstrt)	(div2(vsstrt))
-#define vsstop2hw(vsstop)	(div2(vsstop))
-#define vtotal2hw(vtotal)	(div2(vtotal)-1)
-#define hcenter2hw(htotal)	(div8(htotal))
-
-/* hbstrt/hbstop/vbstrt/vbstop (blanking timings) */
-
-#define hbstrt2hw(hbstrt)	(((hbstrt)<<8 & 0x0700) | ((hbstrt)>>3 & 0x00ff))
-#define hbstop2hw(hbstop)	(((hbstop)<<8 & 0x0700) | ((hbstop)>>3 & 0x00ff))
-#define vbstrt2hw(vbstrt)	(div2(vbstrt))
-#define vbstop2hw(vbstop)	(div2(vbstop))
-
-/* colour */
-
-#define rgb2hw8_high(red, green, blue) \
-	(((red)<<4 & 0xf00) | ((green) & 0x0f0) | ((blue)>>4 & 0x00f))
-#define rgb2hw8_low(red, green, blue) \
-	(((red)<<8 & 0xf00) | ((green)<<4 & 0x0f0) | ((blue) & 0x00f))
-#define rgb2hw4(red, green, blue) \
-	(((red)<<8 & 0xf00) | ((green)<<4 & 0x0f0) | ((blue) & 0x00f))
-#define rgb2hw2(red, green, blue) \
-	(((red)<<10 & 0xc00) | ((green)<<6 & 0x0c0) | ((blue)<<2 & 0x00c))
-
-/* sprpos/sprctl (sprite positioning) */
-
-#define spr2hw_pos(start_v, start_h) \
-	(((start_v)<<7&0xff00) | ((start_h)>>3&0x00ff))
-#define spr2hw_ctl(start_v, start_h, stop_v) \
-	(((stop_v)<<7&0xff00) | ((start_v)>>4&0x0040) | ((stop_v)>>5&0x0020) | \
-	 ((start_h)<<3&0x0018) | ((start_v)>>7&0x0004) | ((stop_v)>>8&0x0002) | \
-	 ((start_h)>>2&0x0001))
-
-/* get current vertical position of beam */
-#define get_vbpos()	((u_short)((*(u_long volatile *)&custom.vposr >> 7) & 0xffe))
-
-	/*
-	 * Copper Initialisation List
-	 */
-
-#define COPINITSIZE (sizeof(copins)*40)
-
-enum {
-	cip_bplcon0
-};
-
-	/*
-	 * Long Frame/Short Frame Copper List
-	 * Don't change the order, build_copper()/rebuild_copper() rely on this
-	 */
-
-#define COPLISTSIZE (sizeof(copins)*64)
-
-enum {
-	cop_wait, cop_bplcon0,
-	cop_spr0ptrh, cop_spr0ptrl,
-	cop_diwstrt, cop_diwstop,
-	cop_diwhigh,
-};
-
-	/*
-	 * Pixel modes for Bitplanes and Sprites
-	 */
-
-static u_short bplpixmode[3] = {
-	BPC0_SHRES,			/*  35 ns */
-	BPC0_HIRES,			/*  70 ns */
-	0				/* 140 ns */
-};
-
-static u_short sprpixmode[3] = {
-	BPC3_SPRES1 | BPC3_SPRES0,	/*  35 ns */
-	BPC3_SPRES1,			/*  70 ns */
-	BPC3_SPRES0			/* 140 ns */
-};
-
-	/*
-	 * Fetch modes for Bitplanes and Sprites
-	 */
-
-static u_short bplfetchmode[3] = {
-	0,				/* 1x */
-	FMODE_BPL32,			/* 2x */
-	FMODE_BPAGEM | FMODE_BPL32	/* 4x */
-};
-
-static u_short sprfetchmode[3] = {
-	0,				/* 1x */
-	FMODE_SPR32,			/* 2x */
-	FMODE_SPAGEM | FMODE_SPR32	/* 4x */
-};
-
-	/*
-	 * Default Colormaps
-	 */
-
-static u_short red2[] =
-	{ 0x0000, 0xc000 };
-static u_short green2[] =
-	{ 0x0000, 0xc000 };
-static u_short blue2[] =
-	{ 0x0000, 0xc000 };
-
-static u_short red4[] =
-	{ 0x0000, 0xc000, 0x8000, 0xffff };
-static u_short green4[] =
-	{ 0x0000, 0xc000, 0x8000, 0xffff };
-static u_short blue4[] =
-	{ 0x0000, 0xc000, 0x8000, 0xffff };
-
-static u_short red8[] =
-	{ 0x0000, 0x0000, 0x0000, 0x0000, 0xc000, 0xc000, 0xc000, 0xc000 };
-static u_short green8[] =
-	{ 0x0000, 0x0000, 0xc000, 0xc000, 0x0000, 0x0000, 0xc000, 0xc000 };
-static u_short blue8[] =
-	{ 0x0000, 0xc000, 0x0000, 0xc000, 0x0000, 0xc000, 0x0000, 0xc000 };
-
-static u_short red16[] =
-	{ 0x0000, 0x0000, 0x0000, 0x0000, 0xc000, 0xc000, 0xc000, 0xc000,
-	  0x8000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff };
-static u_short green16[] =
-	{ 0x0000, 0x0000, 0xc000, 0xc000, 0x0000, 0x0000, 0xc000, 0xc000,
-	  0x8000, 0x0000, 0xffff, 0xffff, 0x0000, 0x0000, 0xffff, 0xffff };
-static u_short blue16[] =
-	{ 0x0000, 0xc000, 0x0000, 0xc000, 0x0000, 0xc000, 0x0000, 0xc000,
-	  0x8000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff };
-
-
-static struct fb_cmap default_2_colors =
-	{ 0, 2, red2, green2, blue2, NULL };
-static struct fb_cmap default_8_colors =
-	{ 0, 8, red8, green8, blue8, NULL };
-static struct fb_cmap default_4_colors =
-	{ 0, 4, red4, green4, blue4, NULL };
-static struct fb_cmap default_16_colors =
-	{ 0, 16, red16, green16, blue16, NULL };
-
-	/*
-	 * Interface used by the world
-	 */
-
-void amiga_video_setup(char *options, int *ints);
-
-static int amiga_fb_get_fix(struct fb_fix_screeninfo *fix, int con);
-static int amiga_fb_get_var(struct fb_var_screeninfo *var, int con);
-static int amiga_fb_set_var(struct fb_var_screeninfo *var, int con);
-static int amiga_fb_pan_display(struct fb_var_screeninfo *var, int con);
-static int amiga_fb_get_cmap(struct fb_cmap *cmap, int kspc, int con);
-static int amiga_fb_set_cmap(struct fb_cmap *cmap, int kspc, int con);
-static int amiga_fb_ioctl(struct inode *inode, struct file *file, u_int cmd,
-                          u_long arg, int con);
-
-static int amiga_fb_get_fix_cursorinfo(struct fb_fix_cursorinfo *fix, int con);
-static int amiga_fb_get_var_cursorinfo(struct fb_var_cursorinfo *var, u_char *data, int con);
-static int amiga_fb_set_var_cursorinfo(struct fb_var_cursorinfo *var, u_char *data, int con);
-static int amiga_fb_get_cursorstate(struct fb_cursorstate *state, int con);
-static int amiga_fb_set_cursorstate(struct fb_cursorstate *state, int con);
-
-	/*
-	 * Interface to the low level console driver
-	 */
-
-struct fb_info *amiga_fb_init(long *mem_start);
-static int amifbcon_switch(int con);
-static int amifbcon_updatevar(int con);
-static void amifbcon_blank(int blank);
-static int amifbcon_setcmap(struct fb_cmap *cmap, int con);
-
-	/*
-	 * Internal routines
-	 */
-
-static struct fb_cmap *get_default_colormap(int bpp);
-static int do_fb_get_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
-                          int kspc);
-static int do_fb_set_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
-                          int kspc);
-static void do_install_cmap(int con);
-static void memcpy_fs(int fsfromto, void *to, void *from, int len);
-static void copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto);
-static int alloc_cmap(struct fb_cmap *cmap, int len, int transp);
-static int flash_cursor(void);
-static void amifb_interrupt(int irq, void *dev_id, struct pt_regs *fp);
-static void get_video_mode(const char *name);
-static void check_default_mode(void);
-static u_long chipalloc(u_long size);
-static char *strtoke(char *s,const char *ct);
-
-	/*
-	 * Hardware routines
-	 */
-
-static int ami_encode_fix(struct fb_fix_screeninfo *fix,
-                          struct amiga_fb_par *par);
-static int ami_decode_var(struct fb_var_screeninfo *var,
-                          struct amiga_fb_par *par);
-static int ami_encode_var(struct fb_var_screeninfo *var,
-                          struct amiga_fb_par *par);
-static void ami_get_par(struct amiga_fb_par *par);
-static void ami_set_var(struct fb_var_screeninfo *var);
-#ifdef DEBUG
-static void ami_set_par(struct amiga_fb_par *par);
-#endif
-static void ami_pan_var(struct fb_var_screeninfo *var);
-static int ami_update_par(void);
-static int ami_getcolreg(u_int regno, u_int *red, u_int *green, u_int *blue,
-                         u_int *transp);
-static int ami_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
-                         u_int transp);
-static void ami_update_display(void);
-static void ami_init_display(void);
-static void ami_do_blank(void);
-static int ami_get_fix_cursorinfo(struct fb_fix_cursorinfo *fix, int con);
-static int ami_get_var_cursorinfo(struct fb_var_cursorinfo *var, u_char *data, int con);
-static int ami_set_var_cursorinfo(struct fb_var_cursorinfo *var, u_char *data, int con);
-static int ami_get_cursorstate(struct fb_cursorstate *state, int con);
-static int ami_set_cursorstate(struct fb_cursorstate *state, int con);
-static void ami_set_sprite(void);
-static void ami_init_copper(void);
-static void ami_reinit_copper(void);
-static void ami_build_copper(void);
-static void ami_rebuild_copper(void);
-
-
-	/*
-	 * External references
-	 */
-
-extern unsigned short ami_intena_vals[];
-
-	/*
-	 * Support for Graphics Boards
-	 */
-
-#ifdef CONFIG_FB_CYBER			/* Cybervision */
-extern int Cyber_probe(void);
-extern void Cyber_video_setup(char *options, int *ints);
-extern struct fb_info *Cyber_fb_init(long *mem_start);
-
-static int amifb_Cyber = 0;
-#endif
-
-#ifdef CONFIG_FB_RETINAZ3			/* RetinaZ3 */
-extern int retz3_probe(void);
-extern void retz3_video_setup(char *options, int *ints);
-extern struct fb_info *retz3_fb_init(long *mem_start);
-
-static int amifb_retz3 = 0;
-#endif
-
-#ifdef CONFIG_GSP_RESOLVER			/* DMI Resolver */
-extern int resolver_probe(void);
-extern void resolver_video_setup(char *options, int *ints);
-extern struct fb_info *resolver_fb_init(long *mem_start);
-
-static int amifb_resolver = 0;
-#endif
-
-static struct fb_ops amiga_fb_ops = {
-	amiga_fb_get_fix, amiga_fb_get_var, amiga_fb_set_var, amiga_fb_get_cmap,
-	amiga_fb_set_cmap, amiga_fb_pan_display, amiga_fb_ioctl
-};
-
-void amiga_video_setup(char *options, int *ints)
-{
-	char *this_opt;
-	int i;
-	char mcap_spec[80];
-
-	/*
-	 * Check for a Graphics Board
-	 */
-
-#ifdef CONFIG_FB_CYBER
-	if (options && *options)
-		if (!strncmp(options, "cyber", 5) && Cyber_probe()) {
-			amifb_Cyber = 1;
-			Cyber_video_setup(options, ints);
-			return;
-		}
-#endif
-#ifdef CONFIG_FB_RETINAZ3
-	if (options && *options)
-		if (!strncmp(options, "retz3", 5) && retz3_probe()) {
-			amifb_retz3 = 1;
-			retz3_video_setup(options, ints);
-			return;
-		}
-#endif
-#ifdef CONFIG_GSP_RESOLVER
-	if (options && *options)
-		if (!strncmp(options, "resolver", 5) && resolver_probe()) {
-			amifb_resolver = 1;
-			resolver_video_setup(options, ints);
-			return;
-		}
-#endif
-
-	mcap_spec[0] = '\0';
-	fb_info.fontname[0] = '\0';
-
-	if (!options || !*options)
-		return;
-
-	for (this_opt = strtok(options, ","); this_opt; this_opt = strtok(NULL, ",")) {
-		char *p;
-
-		if (!strcmp(this_opt, "inverse")) {
-			amifb_inverse = 1;
-			for (i = 0; i < 16; i++) {
-				red16[i] = ~red16[i];
-				green16[i] = ~green16[i];
-				blue16[i] = ~blue16[i];
-			}
-			for (i = 0; i < 8; i++) {
-				red8[i] = ~red8[i];
-				green8[i] = ~green8[i];
-				blue8[i] = ~blue8[i];
-			}
-			for (i = 0; i < 4; i++) {
-				red4[i] = ~red4[i];
-				green4[i] = ~green4[i];
-				blue4[i] = ~blue4[i];
-			}
-			for (i = 0; i < 2; i++) {
-				red2[i] = ~red2[i];
-				green2[i] = ~green2[i];
-				blue2[i] = ~blue2[i];
-			}
-		} else if (!strcmp(this_opt, "ilbm"))
-			amifb_ilbm = 1;
-		else if (!strncmp(this_opt, "monitorcap:", 11))
-			strcpy(mcap_spec, this_opt+11);
-		else if (!strncmp(this_opt, "font:", 5))
-			strcpy(fb_info.fontname, this_opt+5);
-		else if (!strncmp(this_opt, "fstart:", 7))
-			min_fstrt = simple_strtoul(this_opt+7, NULL, 0);
-		else if (!strncmp(this_opt, "depth:", 6))
-			amiga_fb_predefined[0].bits_per_pixel =
-				simple_strtoul(this_opt+6, NULL, 0);
-		else if (!strncmp(this_opt, "size:", 5)) {
-			p = this_opt + 5;
-			if (*p != ';')
-				amiga_fb_predefined[0].xres =
-					simple_strtoul(p, NULL, 0);
-			if (!(p = strchr(p, ';')))
-				continue;
-			if (*++p != ';')
-				amiga_fb_predefined[0].yres =
-					simple_strtoul(p, NULL, 0);
-			if (!(p = strchr(p, ';')))
-				continue;
-			if (*++p != ';')
-				amiga_fb_predefined[0].xres_virtual =
-					simple_strtoul(p, NULL, 0);
-			if (!(p = strchr(p, ';')))
-				continue;
-			if (*++p != ';')
-				amiga_fb_predefined[0].yres_virtual =
-					simple_strtoul(p, NULL, 0);
-			if (!(p = strchr(p, ';')))
-				continue;
-			if (*++p)
-				amiga_fb_predefined[0].bits_per_pixel =
-					simple_strtoul(p, NULL, 0);
-		} else if (!strncmp(this_opt, "timing:", 7)) {
-			p = this_opt + 7;
-			if (*p != ';')
-				amiga_fb_predefined[0].left_margin =
-					simple_strtoul(p, NULL, 0);
-			if (!(p = strchr(p, ';')))
-				continue;
-			if (*++p != ';')
-				amiga_fb_predefined[0].right_margin =
-					simple_strtoul(p, NULL, 0);
-			if (!(p = strchr(p, ';')))
-				continue;
-			if (*++p != ';')
-				amiga_fb_predefined[0].upper_margin =
-					simple_strtoul(p, NULL, 0);
-			if (!(p = strchr(p, ';')))
-				continue;
-			if (*++p)
-				amiga_fb_predefined[0].lower_margin =
-					simple_strtoul(p, NULL, 0);
-		} else if (!strncmp(this_opt, "sync:", 5)) {
-			p = this_opt + 5;
-			if (*p != ';')
-				amiga_fb_predefined[0].hsync_len =
-					simple_strtoul(p, NULL, 0);
-			if (!(p = strchr(p, ';')))
-				continue;
-			if (*++p)
-				amiga_fb_predefined[0].vsync_len =
-					simple_strtoul(p, NULL, 0);
-		} else
-			get_video_mode(this_opt);
-	}
-
-	if (min_fstrt < 48)
-		min_fstrt = 48;
-
-	if (*mcap_spec) {
-		char *p;
-		int vmin, vmax, hmin, hmax;
-
-	/* Format for monitor capabilities is: <Vmin>;<Vmax>;<Hmin>;<Hmax>
-	 * <V*> vertical freq. in Hz
-	 * <H*> horizontal freq. in kHz
-	 */
-
-		if (!(p = strtoke(mcap_spec, ";")) || !*p)
-			goto cap_invalid;
-		vmin = simple_strtoul(p, NULL, 10);
-		if (vmin <= 0)
-			goto cap_invalid;
-		if (!(p = strtoke(NULL, ";")) || !*p)
-			goto cap_invalid;
-		vmax = simple_strtoul(p, NULL, 10);
-		if (vmax <= 0 || vmax <= vmin)
-			goto cap_invalid;
-		if (!(p = strtoke(NULL, ";")) || !*p)
-			goto cap_invalid;
-		hmin = 1000 * simple_strtoul(p, NULL, 10);
-		if (hmin <= 0)
-			goto cap_invalid;
-		if (!(p = strtoke(NULL, "")) || !*p)
-			goto cap_invalid;
-		hmax = 1000 * simple_strtoul(p, NULL, 10);
-		if (hmax <= 0 || hmax <= hmin)
-			goto cap_invalid;
-
-		vfmin = vmin;
-		vfmax = vmax;
-		hfmin = hmin;
-		hfmax = hmax;
-cap_invalid:
-		;
-	}
-}
-
-	/*
-	 * Get the Fixed Part of the Display
-	 */
-
-static int amiga_fb_get_fix(struct fb_fix_screeninfo *fix, int con)
-{
-	struct amiga_fb_par par;
-
-	if (con == -1)
-		ami_get_par(&par);
-	else {
-		int err;
-
-		if ((err = ami_decode_var(&disp[con].var, &par)))
-			return err;
-	}
-	return ami_encode_fix(fix, &par);
-}
-
-	/*
-	 * Get the User Defined Part of the Display
-	 */
-
-static int amiga_fb_get_var(struct fb_var_screeninfo *var, int con)
-{
-	int err = 0;
-
-	if (con == -1) {
-		struct amiga_fb_par par;
-
-		ami_get_par(&par);
-		err = ami_encode_var(var, &par);
-	} else
-		*var = disp[con].var;
-	return err;
-}
-
-	/*
-	 * Set the User Defined Part of the Display
-	 */
-
-static int amiga_fb_set_var(struct fb_var_screeninfo *var, int con)
-{
-	int err, activate = var->activate;
-	int oldxres, oldyres, oldvxres, oldvyres, oldbpp;
-	struct amiga_fb_par par;
-
-
-	/*
-	 * FB_VMODE_CONUPDATE and FB_VMODE_SMOOTH_XPAN are equal!
-	 * as FB_VMODE_SMOOTH_XPAN is only used internally
-	 */
-
-	if (var->vmode & FB_VMODE_CONUPDATE) {
-		var->vmode |= FB_VMODE_YWRAP;
-		var->xoffset = disp[con].var.xoffset;
-		var->yoffset = disp[con].var.yoffset;
-	}
-	if ((err = ami_decode_var(var, &par)))
-		return err;
-	ami_encode_var(var, &par);
-	if ((activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) {
-		oldxres = disp[con].var.xres;
-		oldyres = disp[con].var.yres;
-		oldvxres = disp[con].var.xres_virtual;
-		oldvyres = disp[con].var.yres_virtual;
-		oldbpp = disp[con].var.bits_per_pixel;
-		disp[con].var = *var;
-		if (oldxres != var->xres || oldyres != var->yres ||
-		    oldvxres != var->xres_virtual || oldvyres != var->yres_virtual ||
-		    oldbpp != var->bits_per_pixel) {
-			struct fb_fix_screeninfo fix;
-
-			ami_encode_fix(&fix, &par);
-			disp[con].screen_base = (u_char *)fix.smem_start;
-			disp[con].visual = fix.visual;
-			disp[con].type = fix.type;
-			disp[con].type_aux = fix.type_aux;
-			disp[con].ypanstep = fix.ypanstep;
-			disp[con].ywrapstep = fix.ywrapstep;
-			disp[con].line_length = fix.line_length;
-			disp[con].can_soft_blank = 1;
-			disp[con].inverse = amifb_inverse;
-			if (fb_info.changevar)
-				(*fb_info.changevar)(con);
-		}
-		if (oldbpp != var->bits_per_pixel) {
-			if ((err = alloc_cmap(&disp[con].cmap, 0, 0)))
-				return err;
-			do_install_cmap(con);
-		}
-		if (con == currcon)
-			ami_set_var(&disp[con].var);
-	}
-	return 0;
-}
-
-	/*
-	 * Pan or Wrap the Display
-	 *
-	 * This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
-	 */
-
-static int amiga_fb_pan_display(struct fb_var_screeninfo *var, int con)
-{
-	if (var->vmode & FB_VMODE_YWRAP) {
-		if (var->yoffset<0 || var->yoffset >= disp[con].var.yres_virtual || var->xoffset)
-			return -EINVAL;
-	} else {
-		/*
-		 * TODO: There will be problems when xpan!=1, so some columns
-		 * on the right side will never be seen
-		 */
-		if (var->xoffset+disp[con].var.xres > upx(16<<maxfmode, disp[con].var.xres_virtual) ||
-		    var->yoffset+disp[con].var.yres > disp[con].var.yres_virtual)
-			return -EINVAL;
-	}
-	if (con == currcon)
-		ami_pan_var(var);
-	disp[con].var.xoffset = var->xoffset;
-	disp[con].var.yoffset = var->yoffset;
-	if (var->vmode & FB_VMODE_YWRAP)
-		disp[con].var.vmode |= FB_VMODE_YWRAP;
-	else
-		disp[con].var.vmode &= ~FB_VMODE_YWRAP;
-	return 0;
-}
-
-	/*
-	 * Get the Colormap
-	 */
-
-static int amiga_fb_get_cmap(struct fb_cmap *cmap, int kspc, int con)
-{
-	if (con == currcon) /* current console? */
-		return do_fb_get_cmap(cmap, &disp[con].var, kspc);
-	else if (disp[con].cmap.len) /* non default colormap? */
-		copy_cmap(&disp[con].cmap, cmap, kspc ? 0 : 2);
-	else
-		copy_cmap(get_default_colormap(disp[con].var.bits_per_pixel),
-		          cmap, kspc ? 0 : 2);
-	return 0;
-}
-
-	/*
-	 * Set the Colormap
-	 */
-
-static int amiga_fb_set_cmap(struct fb_cmap *cmap, int kspc, int con)
-{
-	int err;
-
-	if (!disp[con].cmap.len) {		/* no colormap allocated? */
-		if ((err = alloc_cmap(&disp[con].cmap,
-		                      1<<disp[con].var.bits_per_pixel, 0)))
-			return err;
-	}
-	if (con == currcon)			/* current console? */
-		return do_fb_set_cmap(cmap, &disp[con].var, kspc);
-	else
-		copy_cmap(cmap, &disp[con].cmap, kspc ? 0 : 1);
-	return 0;
-}
-
-	/*
-	 * Amiga Frame Buffer Specific ioctls
-	 */
-
-static int amiga_fb_ioctl(struct inode *inode, struct file *file,
-                          u_int cmd, u_long arg, int con)
-{
-	int i;
-
-	switch (cmd) {
-		case FBIOGET_FCURSORINFO : {
-			struct fb_fix_cursorinfo crsrfix;
-			
-			i = verify_area(VERIFY_WRITE, (void *)arg, sizeof(crsrfix));
-			if (!i) {
-				i = amiga_fb_get_fix_cursorinfo(&crsrfix, con);
-				copy_to_user((void *)arg, &crsrfix, sizeof(crsrfix));
-			}
-			return i;
-		}
-		case FBIOGET_VCURSORINFO : {
-			struct fb_var_cursorinfo crsrvar;
-
-			i = verify_area(VERIFY_WRITE, (void *)arg, sizeof(crsrvar));
-			if (!i) {
-				i = amiga_fb_get_var_cursorinfo(&crsrvar,
-					((struct fb_var_cursorinfo *)arg)->data, con);
-				copy_to_user((void *)arg, &crsrvar, sizeof(crsrvar));
-			}
-			return i;
-		}
-		case FBIOPUT_VCURSORINFO : {
-			struct fb_var_cursorinfo crsrvar;
-
-			i = verify_area(VERIFY_READ, (void *)arg, sizeof(crsrvar));
-			if (!i) {
-				copy_from_user(&crsrvar, (void *)arg, sizeof(crsrvar));
-				i = amiga_fb_set_var_cursorinfo(&crsrvar,
-					((struct fb_var_cursorinfo *)arg)->data, con);
-			}
-			return i;
-		}
-		case FBIOGET_CURSORSTATE : {
-			struct fb_cursorstate crsrstate;
-
-			i = verify_area(VERIFY_WRITE, (void *)arg, sizeof(crsrstate));
-			if (!i) {
-				i = amiga_fb_get_cursorstate(&crsrstate, con);
-				copy_to_user((void *)arg, &crsrstate, sizeof(crsrstate));
-			}
-			return i;
-		}
-		case FBIOPUT_CURSORSTATE : {
-			struct fb_cursorstate crsrstate;
-
-			i = verify_area(VERIFY_READ, (void *)arg, sizeof(crsrstate));
-			if (!i) {
-				copy_from_user(&crsrstate, (void *)arg, sizeof(crsrstate));
-				i = amiga_fb_set_cursorstate(&crsrstate, con);
-			}
-			return i;
-		}
-#ifdef DEBUG
-		case FBCMD_GET_CURRENTPAR : {
-			struct amiga_fb_par par;
-
-			i = verify_area(VERIFY_WRITE, (void *)arg, sizeof(struct amiga_fb_par));
-			if (!i) {
-				ami_get_par(&par);
-				copy_to_user((void *)arg, &par, sizeof(struct amiga_fb_par));
-			}
-			return i;
-		}
-		case FBCMD_SET_CURRENTPAR : {
-			struct amiga_fb_par par;
-
-			i = verify_area(VERIFY_READ, (void *)arg, sizeof(struct amiga_fb_par));
-			if (!i) {
-				copy_from_user(&par, (void *)arg, sizeof(struct amiga_fb_par));
-				ami_set_par(&par);
-			}
-			return i;
-		}
-#endif */ DEBUG */
-	}
-	return -EINVAL;
-}
-
-	/*
-	 * Hardware Cursor
-	 */
-
-static int amiga_fb_get_fix_cursorinfo(struct fb_fix_cursorinfo *fix, int con)
-{
-	return ami_get_fix_cursorinfo(fix, con);
-}
-
-static int amiga_fb_get_var_cursorinfo(struct fb_var_cursorinfo *var, u_char *data, int con)
-{
-	return ami_get_var_cursorinfo(var, data, con);
-}
-
-static int amiga_fb_set_var_cursorinfo(struct fb_var_cursorinfo *var, u_char *data, int con)
-{
-	return ami_set_var_cursorinfo(var, data, con);
-}
-
-static int amiga_fb_get_cursorstate(struct fb_cursorstate *state, int con)
-{
-	return ami_get_cursorstate(state, con);
-}
-
-static int amiga_fb_set_cursorstate(struct fb_cursorstate *state, int con)
-{
-	return ami_set_cursorstate(state, con);
-}
-
-	/*
-	 * Initialisation
-	 */
-
-__initfunc(struct fb_info *amiga_fb_init(long *mem_start))
-{
-	int err, tag, i;
-	u_long chipptr;
-
-	/*
-	 * Check for a Graphics Board
-	 */
-
-#ifdef CONFIG_FB_CYBER
-	if (amifb_Cyber)
-		return Cyber_fb_init(mem_start);
-#endif
-#ifdef CONFIG_FB_RETINAZ3
-	if (amifb_retz3){
-		custom.dmacon = DMAF_MASTER | DMAF_RASTER | DMAF_COPPER |
-				DMAF_BLITTER | DMAF_SPRITE;
-		return retz3_fb_init(mem_start);
-	}
-#endif
-#ifdef CONFIG_GSP_RESOLVER
-	if (amifb_resolver){
-		custom.dmacon = DMAF_MASTER | DMAF_RASTER | DMAF_COPPER |
-				DMAF_BLITTER | DMAF_SPRITE;
-		return NULL;
-	}
-#endif
-
-	/*
-	 * Use the Builtin Chipset
-	 */
-
-	if (!AMIGAHW_PRESENT(AMI_VIDEO))
-		return NULL;
-
-	custom.dmacon = DMAF_ALL | DMAF_MASTER;
-
-	switch (amiga_chipset) {
-#ifdef CONFIG_AMIFB_OCS
-		case CS_OCS:
-			strcat(amiga_fb_name, "OCS");
-default_chipset:
-			chipset = TAG_OCS;
-			maxdepth[TAG_SHRES] = 0;	/* OCS means no SHRES */
-			maxdepth[TAG_HIRES] = 4;
-			maxdepth[TAG_LORES] = 6;
-			maxfmode = TAG_FMODE_1;
-			if (!amifb_usermode)		/* Set the Default Video Mode */
-				get_video_mode(amiga_vblank == 50 ?
-				               DEFMODE_PAL : DEFMODE_NTSC);
-			videomemorysize = VIDEOMEMSIZE_OCS;
-			break;
-#endif /* CONFIG_AMIFB_OCS */
-
-#ifdef CONFIG_AMIFB_ECS
-		case CS_ECS:
-			strcat(amiga_fb_name, "ECS");
-			chipset = TAG_ECS;
-			maxdepth[TAG_SHRES] = 2;
-			maxdepth[TAG_HIRES] = 4;
-			maxdepth[TAG_LORES] = 6;
-			maxfmode = TAG_FMODE_1;
-			if (!amifb_usermode) {		/* Set the Default Video Mode */
-				if (AMIGAHW_PRESENT(AMBER_FF))
-					get_video_mode(amiga_vblank == 50 ?
-					               DEFMODE_AMBER_PAL : DEFMODE_AMBER_NTSC);
-				else
-					get_video_mode(amiga_vblank == 50 ?
-					               DEFMODE_PAL : DEFMODE_NTSC);
-			}
-			if (amiga_chip_avail()-CHIPRAM_SAFETY_LIMIT >
-			    VIDEOMEMSIZE_ECS_1M)
-				videomemorysize = VIDEOMEMSIZE_ECS_2M;
-			else
-				videomemorysize = VIDEOMEMSIZE_ECS_1M;
-			break;
-#endif /* CONFIG_AMIFB_ECS */
-
-#ifdef CONFIG_AMIFB_AGA
-		case CS_AGA:
-			strcat(amiga_fb_name, "AGA");
-			chipset = TAG_AGA;
-			maxdepth[TAG_SHRES] = 8;
-			maxdepth[TAG_HIRES] = 8;
-			maxdepth[TAG_LORES] = 8;
-			maxfmode = TAG_FMODE_4;
-			if (!amifb_usermode)		/* Set the Default Video Mode */
-				get_video_mode(DEFMODE_AGA);
-			if (amiga_chip_avail()-CHIPRAM_SAFETY_LIMIT >
-			    VIDEOMEMSIZE_AGA_1M)
-				videomemorysize = VIDEOMEMSIZE_AGA_2M;
-			else
-				videomemorysize = VIDEOMEMSIZE_AGA_1M;
-			break;
-#endif /* CONFIG_AMIFB_AGA */
-
-		default:
-#ifdef CONFIG_AMIFB_OCS
-			printk("Unknown graphics chipset, defaulting to OCS\n");
-			strcat(amiga_fb_name, "Unknown");
-			goto default_chipset;
-#else /* CONFIG_AMIFB_OCS */
-			panic("Unknown graphics chipset, no default driver");
-#endif /* CONFIG_AMIFB_OCS */
-			break;
-	}
-
-	/*
-	 * Calculate the Pixel Clock Values for this Machine
-	 */
-
-	pixclock[TAG_SHRES] = DIVUL(25E9, amiga_eclock);	/* SHRES:  35 ns / 28 MHz */
-	pixclock[TAG_HIRES] = DIVUL(50E9, amiga_eclock);	/* HIRES:  70 ns / 14 MHz */
-	pixclock[TAG_LORES] = DIVUL(100E9, amiga_eclock); 	/* LORES: 140 ns /  7 MHz */
-
-	/*
-	 * Replace the Tag Values with the Real Pixel Clock Values
-	 */
-
-	for (i = 0; i < NUM_PREDEF_MODES; i++) {
-		tag = amiga_fb_predefined[i].pixclock;
-		if (tag == TAG_SHRES || tag == TAG_HIRES || tag == TAG_LORES) {
-			amiga_fb_predefined[i].pixclock = pixclock[tag];
-			if (amiga_fb_predefined[i].bits_per_pixel > maxdepth[tag])
-				amiga_fb_predefined[i].bits_per_pixel = maxdepth[tag];
-		}
-	}
-
-	err = register_framebuffer(amiga_fb_name, &node, &amiga_fb_ops,
-	                           NUM_TOTAL_MODES, amiga_fb_predefined);
-	if (err < 0)
-		panic("Cannot register frame buffer");
-
-	chipptr = chipalloc(videomemorysize+
-	                    SPRITEMEMSIZE+
-	                    DUMMYSPRITEMEMSIZE+
-	                    COPINITSIZE+
-	                    4*COPLISTSIZE);
-
-	assignchunk(videomemory, u_long, chipptr, videomemorysize);
-	assignchunk(spritememory, u_long, chipptr, SPRITEMEMSIZE);
-	assignchunk(dummysprite, u_short *, chipptr, DUMMYSPRITEMEMSIZE);
-	assignchunk(copdisplay.init, copins *, chipptr, COPINITSIZE);
-	assignchunk(copdisplay.list[0][0], copins *, chipptr, COPLISTSIZE);
-	assignchunk(copdisplay.list[0][1], copins *, chipptr, COPLISTSIZE);
-	assignchunk(copdisplay.list[1][0], copins *, chipptr, COPLISTSIZE);
-	assignchunk(copdisplay.list[1][1], copins *, chipptr, COPLISTSIZE);
-
-	memset(dummysprite, 0, DUMMYSPRITEMEMSIZE);
-
-	/*
-	 * Enable Display DMA
-	 */
-
-	custom.dmacon = DMAF_SETCLR | DMAF_MASTER | DMAF_RASTER | DMAF_COPPER |
-	                DMAF_BLITTER | DMAF_SPRITE;
-
-	/*
-	 * Make sure the Copper has something to do
-	 */
-
-	ami_init_copper();
-
-	check_default_mode();
-
-	if (request_irq(IRQ_AMIGA_AUTO_3, amifb_interrupt, IRQ_FLG_LOCK,
-	                "fb vertb handler", NULL))
-		panic("Couldn't add vblank interrupt\n");
-	ami_intena_vals[IRQ_AMIGA_VERTB] = IF_COPER;
-	ami_intena_vals[IRQ_AMIGA_COPPER] = 0;
-	custom.intena = IF_VERTB;
-	custom.intena = IF_SETCLR | IF_COPER;
-
-	strcpy(fb_info.modename, amiga_fb_name);
-	fb_info.changevar = NULL;
-	fb_info.disp = disp;
-	fb_info.switch_con = &amifbcon_switch;
-	fb_info.updatevar = &amifbcon_updatevar;
-	fb_info.blank = &amifbcon_blank;
-	fb_info.setcmap = &amifbcon_setcmap;
-
-	amiga_fb_set_var(&amiga_fb_predefined[0], 0);
-
-	return &fb_info;
-}
-
-static int amifbcon_switch(int con)
-{
-	/* Do we have to save the colormap? */
-	if (disp[currcon].cmap.len)
-		do_fb_get_cmap(&disp[currcon].cmap, &disp[currcon].var, 1);
-
-	currcon = con;
-	ami_set_var(&disp[con].var);
-	/* Install new colormap */
-	do_install_cmap(con);
-	return 0;
-}
-
-	/*
-	 * Update the `var' structure (called by amicon.c)
-	 */
-
-static int amifbcon_updatevar(int con)
-{
-	ami_pan_var(&disp[con].var);
-	return 0;
-}
-
-	/*
-	 * Blank the display.
-	 */
-
-static void amifbcon_blank(int blank)
-{
-	do_blank = blank ? blank : -1;
-}
-
-	/*
-	 * Set the colormap
-	 */
-
-static int amifbcon_setcmap(struct fb_cmap *cmap, int con)
-{
-	return(amiga_fb_set_cmap(cmap, 1, con));
-}
-
-/* ---------------------------- Generic routines ---------------------------- */
-
-static struct fb_cmap *get_default_colormap(int bpp)
-{
-	switch (bpp) {
-		case 1:
-			return &default_2_colors;
-			break;
-		case 2:
-			return &default_4_colors;
-			break;
-		case 3:
-			return &default_8_colors;
-			break;
-		default:
-			return &default_16_colors;
-			break;
-	}
-}
-
-#define CNVT_TOHW(val,width)	((((val)<<(width))+0x7fff-(val))>>16)
-#define CNVT_FROMHW(val,width)	(((width) ? ((((val)<<16)-(val)) / \
-                                            ((1<<(width))-1)) : 0))
-
-static int do_fb_get_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
-                          int kspc)
-{
-	int i, start;
-	u_short *red, *green, *blue, *transp;
-	u_int hred, hgreen, hblue, htransp;
-
-	red = cmap->red;
-	green = cmap->green;
-	blue = cmap->blue;
-	transp = cmap->transp;
-	start = cmap->start;
-	if (start < 0)
-		return -EINVAL;
-	for (i = 0; i < cmap->len; i++) {
-		if (ami_getcolreg(start++, &hred, &hgreen, &hblue, &htransp))
-			return 0;
-		hred = CNVT_FROMHW(hred, var->red.length);
-		hgreen = CNVT_FROMHW(hgreen, var->green.length);
-		hblue = CNVT_FROMHW(hblue, var->blue.length);
-		htransp = CNVT_FROMHW(htransp, var->transp.length);
-		if (kspc) {
-			*red = hred;
-			*green = hgreen;
-			*blue = hblue;
-			if (transp)
-				*transp = htransp;
-		} else {
-			put_user(hred, red);
-			put_user(hgreen, green);
-			put_user(hblue, blue);
-			if (transp)
-				put_user(htransp, transp);
-		}
-		red++;
-		green++;
-		blue++;
-		if (transp)
-			transp++;
-	}
-	return 0;
-}
-
-static int do_fb_set_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
-                          int kspc)
-{
-	int i, start;
-	u_short *red, *green, *blue, *transp;
-	u_int hred, hgreen, hblue, htransp;
-
-	red = cmap->red;
-	green = cmap->green;
-	blue = cmap->blue;
-	transp = cmap->transp;
-	start = cmap->start;
-
-	if (start < 0)
-		return -EINVAL;
-	for (i = 0; i < cmap->len; i++) {
-		if (kspc) {
-			hred = *red;
-			hgreen = *green;
-			hblue = *blue;
-			htransp = transp ? *transp : 0;
-		} else {
-			get_user(hred, red);
-			get_user(hgreen, green);
-			get_user(hblue, blue);
-			if (transp)
-				get_user(htransp, transp);
-			else
-				htransp = 0;
-		}
-		hred = CNVT_TOHW(hred, var->red.length);
-		hgreen = CNVT_TOHW(hgreen, var->green.length);
-		hblue = CNVT_TOHW(hblue, var->blue.length);
-		htransp = CNVT_TOHW(htransp, var->transp.length);
-		red++;
-		green++;
-		blue++;
-		if (transp)
-			transp++;
-		if (ami_setcolreg(start++, hred, hgreen, hblue, htransp))
-			return 0;
-	}
-	return 0;
-}
-
-static void do_install_cmap(int con)
-{
-	if (con != currcon)
-		return;
-	if (disp[con].cmap.len)
-		do_fb_set_cmap(&disp[con].cmap, &disp[con].var, 1);
-	else
-		do_fb_set_cmap(get_default_colormap(disp[con].var.bits_per_pixel),
-		                                    &disp[con].var, 1);
-}
-
-static void memcpy_fs(int fsfromto, void *to, void *from, int len)
-{
-	switch (fsfromto) {
-		case 0:
-			memcpy(to, from, len);
-			return;
-		case 1:
-			copy_from_user(to, from, len);
-			return;
-		case 2:
-			copy_to_user(to, from, len);
-			return;
-	}
-}
-
-static void copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto)
-{
-	int size;
-	int tooff = 0, fromoff = 0;
-
-	if (to->start > from->start)
-		fromoff = to->start-from->start;
-	else
-		tooff = from->start-to->start;
-	size = to->len-tooff;
-	if (size > from->len-fromoff)
-		size = from->len-fromoff;
-	if (size < 0)
-		return;
-	size *= sizeof(u_short);
-	memcpy_fs(fsfromto, to->red+tooff, from->red+fromoff, size);
-	memcpy_fs(fsfromto, to->green+tooff, from->green+fromoff, size);
-	memcpy_fs(fsfromto, to->blue+tooff, from->blue+fromoff, size);
-	if (from->transp && to->transp)
-		memcpy_fs(fsfromto, to->transp+tooff, from->transp+fromoff, size);
-}
-
-static int alloc_cmap(struct fb_cmap *cmap, int len, int transp)
-{
-	int size = len*sizeof(u_short);
-
-	if (cmap->len != len) {
-		if (cmap->red)
-			kfree(cmap->red);
-		if (cmap->green)
-			kfree(cmap->green);
-		if (cmap->blue)
-			kfree(cmap->blue);
-		if (cmap->transp)
-			kfree(cmap->transp);
-		cmap->red = cmap->green = cmap->blue = cmap->transp = NULL;
-		cmap->len = 0;
-		if (!len)
-			return 0;
-		if (!(cmap->red = kmalloc(size, GFP_ATOMIC)))
-			return -1;
-		if (!(cmap->green = kmalloc(size, GFP_ATOMIC)))
-			return -1;
-		if (!(cmap->blue = kmalloc(size, GFP_ATOMIC)))
-			return -1;
-		if (transp) {
-			if (!(cmap->transp = kmalloc(size, GFP_ATOMIC)))
-				return -1;
-		} else
-			cmap->transp = NULL;
-	}
-	cmap->start = 0;
-	cmap->len = len;
-	copy_cmap(get_default_colormap(len), cmap, 0);
-	return 0;
-}
-
-static int flash_cursor(void)
-{
-	static int cursorcount = 1;
-
-	if (cursormode == FB_CURSOR_FLASH) {
-		if (!--cursorcount) {
-			cursorstate = -cursorstate;
-			cursorcount = cursorrate;
-			if (!is_blanked)
-				return 1;
-		}
-	}
-	return 0;
-}
-
-	/*
-	 * VBlank Display Interrupt
-	 */
-
-static void amifb_interrupt(int irq, void *dev_id, struct pt_regs *fp)
-{
-	u_short ints = custom.intreqr & custom.intenar;
-	static struct irq_server server = {0, 0};
-	unsigned long flags;
-
-	if (ints & IF_BLIT) {
-		custom.intreq = IF_BLIT;
-		amiga_do_irq(IRQ_AMIGA_BLIT, fp);
-	}
-
-	if (ints & IF_COPER) {
-		custom.intreq = IF_COPER;
-		if (do_vmode_pan || do_vmode_full)
-			ami_update_display();
-
-		if (do_vmode_full)
-			ami_init_display();
-
-		if (do_vmode_pan) {
-			flash_cursor();
-			ami_rebuild_copper();
-			do_cursor = do_vmode_pan = 0;
-		} else if (do_cursor) {
-			flash_cursor();
-			ami_set_sprite();
-			do_cursor = 0;
-		} else {
-			if (flash_cursor())
-				ami_set_sprite();
-		}
-
-		save_flags(flags);
-		cli();
-		if (get_vbpos() < down2(currentpar.diwstrt_v - 6))
-			custom.copjmp2 = 0;
-		restore_flags(flags);
-
-		if (do_blank) {
-			ami_do_blank();
-			do_blank = 0;
-		}
-
-		if (do_vmode_full) {
-			ami_reinit_copper();
-			do_vmode_full = 0;
-		}
-		amiga_do_irq_list(IRQ_AMIGA_VERTB, fp, &server);
-	}
-
-	if (ints & IF_VERTB) {
-		printk("%s: Warning: IF_VERTB was enabled\n", __FUNCTION__);
-		custom.intena = IF_VERTB;
-	}
-}
-
-	/*
-	 * Get a Video Mode
-	 */
-
-static void get_video_mode(const char *name)
-{
-	int i;
-
-	for (i = 1; i < NUM_PREDEF_MODES; i++) {
-		if (!strcmp(name, amiga_fb_modenames[i])) {
-			amiga_fb_predefined[0] = amiga_fb_predefined[i];
-			amifb_usermode = i;
-			return;
-		}
-	}
-}
-
-	/*
-	 * Probe the  Video Modes
-	 */
-
-static void check_default_mode(void)
-{
-	struct amiga_fb_par par;
-	int mode;
-
-	for (mode = 0; mode < NUM_PREDEF_MODES; mode++) {
-		if (!ami_decode_var(&amiga_fb_predefined[mode], &par)) {
-			if (mode)
-				amiga_fb_predefined[0] = amiga_fb_predefined[mode];
-			return;
-		}
-		if (!mode)
-			printk("Can't use default video mode. Probing video modes...\n");
-	}
-	panic("Can't find any usable video mode");
-}
-
-	/*
-	 * Allocate, Clear and Align a Block of Chip Memory
-	 */
-
-static u_long chipalloc(u_long size)
-{
-	u_long ptr;
-
-	size += PAGE_SIZE-1;
-	if (!(ptr = (u_long)amiga_chip_alloc(size)))
-		panic("No Chip RAM for frame buffer");
-	memset((void *)ptr, 0, size);
-	ptr = PAGE_ALIGN(ptr);
-
-	return ptr;
-}
-
-	/*
-	 * A strtok which returns empty strings, too
-	 */
-
-static char *strtoke(char *s,const char *ct)
-{
-	char *sbegin, *send;
-	static char *ssave = NULL;
-
-	sbegin  = s ? s : ssave;
-	if (!sbegin)
-		return NULL;
-	if (*sbegin == '\0') {
-		ssave = NULL;
-		return NULL;
-	}
-	send = strpbrk(sbegin, ct);
-	if (send && *send != '\0')
-		*send++ = '\0';
-	ssave = send;
-	return sbegin;
-}
-
-/* --------------------------- Hardware routines --------------------------- */
-
-	/*
-	 * This function should fill in the `fix' structure based on the
-	 * values in the `par' structure.
-	 */
-
-static int ami_encode_fix(struct fb_fix_screeninfo *fix,
-                          struct amiga_fb_par *par)
-{
-	int i;
-
-	strcpy(fix->id, amiga_fb_name);
-	fix->smem_start = videomemory;
-	fix->smem_len = videomemorysize;
-
-	if (amifb_ilbm) {
-		fix->type = FB_TYPE_INTERLEAVED_PLANES;
-		fix->type_aux = par->next_line;
-	} else {
-		fix->type = FB_TYPE_PLANES;
-		fix->type_aux = 0;
-	}
-	fix->line_length = div8(upx(16<<maxfmode, par->vxres));
-	fix->visual = FB_VISUAL_PSEUDOCOLOR;
-
-	if (par->vmode & FB_VMODE_YWRAP) {
-		fix->ywrapstep = 1;
-		fix->xpanstep = fix->ypanstep = 0;
-	} else {
-		fix->ywrapstep = 0;
-		if (par->vmode &= FB_VMODE_SMOOTH_XPAN)
-			fix->xpanstep = 1;
-		else
-			fix->xpanstep = 16<<maxfmode;
-		fix->ypanstep = 1;
-	}
-
-	for (i = 0; i < arraysize(fix->reserved); i++)
-		fix->reserved[i] = 0;
-
-	return 0;
-}
-
-	/*
-	 * Get the video params out of `var'. If a value doesn't fit, round
-	 * it up, if it's too big, return -EINVAL.
-	 */
-
-static int ami_decode_var(struct fb_var_screeninfo *var,
-                          struct amiga_fb_par *par)
-{
-	u_short clk_shift, line_shift;
-	u_long maxfetchstop, fstrt, fsize, fconst, xres_n, yres_n;
-	u_long hrate = 0, vrate = 0;
-
-	/*
-	 * Find a matching Pixel Clock
-	 */
-
-	for (clk_shift = TAG_SHRES; clk_shift < TAG_LORES; clk_shift++)
-		if (var->pixclock <= pixclock[clk_shift])
-			break;
-	if (clk_shift >= TAG_LORES)
-		return -EINVAL;
-	par->clk_shift = clk_shift;
-
-	/*
-	 * Check the Geometry Values
-	 */
-
-	if ((par->xres = var->xres) < 64)
-		return -EINVAL;
-	if ((par->yres = var->yres) < 64)
-		return -EINVAL;
-	if ((par->vxres = var->xres_virtual) < 64)
-		return -EINVAL;
-	if ((par->vyres = var->yres_virtual) < 64)
-		return -EINVAL;
-
-	par->bpp = var->bits_per_pixel;
-	if (!var->nonstd) {
-		if (par->bpp <= 0 || par->bpp > maxdepth[clk_shift])
-			return -EINVAL;
-	} else if (var->nonstd == FB_NONSTD_HAM) {
-		if (par->bpp != 6)
-			if (par->bpp != 8 || !IS_AGA)
-				return -EINVAL;
-	} else
-		return -EINVAL;
-
-	/*
-	 * FB_VMODE_SMOOTH_XPAN will be cleared, if one of the folloing
-	 * checks failed and smooth scrolling is not possible
-	 */
-
-	par->vmode = var->vmode | FB_VMODE_SMOOTH_XPAN;
-	switch (par->vmode & FB_VMODE_MASK) {
-		case FB_VMODE_INTERLACED:
-			line_shift = 0;
-			break;
-		case FB_VMODE_NONINTERLACED:
-			line_shift = 1;
-			break;
-		case FB_VMODE_DOUBLE:
-			if (!IS_AGA)
-				return -EINVAL;
-			line_shift = 2;
-			break;
-		default:
-			return -EINVAL;
-			break;
-	}
-	par->line_shift = line_shift;
-
-	/*
-	 * Vertical and Horizontal Timings
-	 */
-
-	xres_n = par->xres<<clk_shift;
-	yres_n = par->yres<<line_shift;
-	par->htotal = down8((var->left_margin+par->xres+var->right_margin+var->hsync_len)<<clk_shift);
-	par->vtotal = down2(((var->upper_margin+par->yres+var->lower_margin+var->vsync_len)<<line_shift)+1);
-
-	if (IS_AGA)
-		par->bplcon3 = sprpixmode[clk_shift];
-	else
-		par->bplcon3 = 0;
-	if (var->sync & FB_SYNC_BROADCAST) {
-		par->diwstop_h = par->htotal-((var->right_margin-var->hsync_len)<<clk_shift);
-		if (IS_AGA)
-			par->diwstop_h += mod4(var->hsync_len);
-		else
-			par->diwstop_h = down4(par->diwstop_h);
-		par->diwstrt_h = par->diwstop_h - xres_n;
-		par->diwstop_v = par->vtotal-((var->lower_margin-var->vsync_len)<<line_shift);
-		par->diwstrt_v = par->diwstop_v - yres_n;
-		if (par->diwstop_h >= par->htotal+8 || par->diwstop_v > par->vtotal)
-			return -EINVAL;
-		if (!IS_OCS) {
-			/* Initialize sync with some reasonable values for pwrsave */
-			par->hsstrt = 160;
-			par->hsstop = 320;
-			par->vsstrt = 30;
-			par->vsstop = 34;
-		} else {
-			par->hsstrt = 0;
-			par->hsstop = 0;
-			par->vsstrt = 0;
-			par->vsstop = 0;
-		}
-		if (par->vtotal > (PAL_VTOTAL+NTSC_VTOTAL)/2) {
-			/* PAL video mode */
-			if (par->htotal != PAL_HTOTAL)
-				return -EINVAL;
-			if (par->diwstrt_h < PAL_DIWSTRT_H)
-				return -EINVAL;
-			if (par->diwstrt_v < PAL_DIWSTRT_V)
-				return -EINVAL;
-			hrate = 15625;
-			vrate = 50;
-			if (!IS_OCS) {
-				par->beamcon0 = BMC0_PAL;
-				par->bplcon3 |= BPC3_BRDRBLNK;
-			} else if (AMIGAHW_PRESENT(AGNUS_HR_PAL) || 
-			           AMIGAHW_PRESENT(AGNUS_HR_NTSC)) {
-				par->beamcon0 = BMC0_PAL;
-				par->hsstop = 1;
-			} else if (amiga_vblank != 50)
-				return -EINVAL;
-		} else {
-			/* NTSC video mode
-			 * In the AGA chipset seems to be hardware bug with BPC3_BRDRBLNK
-			 * and NTSC activated, so than better let diwstop_h <= 1812
-			 */
-			if (par->htotal != NTSC_HTOTAL)
-				return -EINVAL;
-			if (par->diwstrt_h < NTSC_DIWSTRT_H)
-				return -EINVAL;
-			if (par->diwstrt_v < NTSC_DIWSTRT_V)
-				return -EINVAL;
-			hrate = 15750;
-			vrate = 60;
-			if (!IS_OCS) {
-				par->beamcon0 = 0;
-				par->bplcon3 |= BPC3_BRDRBLNK;
-			} else if (AMIGAHW_PRESENT(AGNUS_HR_PAL) || 
-			           AMIGAHW_PRESENT(AGNUS_HR_NTSC)) {
-				par->beamcon0 = 0;
-				par->hsstop = 1;
-			} else if (amiga_vblank != 60)
-				return -EINVAL;
-		}
-		if (IS_OCS) {
-			if (par->diwstrt_h >= 1024 || par->diwstop_h < 1024 ||
-			    par->diwstrt_v >=  512 || par->diwstop_v <  256)
-				return -EINVAL;
-		}
-	} else if (!IS_OCS) {
-		/* Programmable video mode */
-		par->hsstrt = var->right_margin<<clk_shift;
-		par->hsstop = (var->right_margin+var->hsync_len)<<clk_shift;
-		par->diwstop_h = par->htotal - mod8(par->hsstrt) + 8 - (1 << clk_shift);
-		if (!IS_AGA)
-			par->diwstop_h = down4(par->diwstop_h) - 16;
-		par->diwstrt_h = par->diwstop_h - xres_n;
-		par->hbstop = par->diwstrt_h + 4;
-		par->hbstrt = par->diwstop_h + 4;
-		if (par->hbstrt >= par->htotal + 8)
-			par->hbstrt -= par->htotal;
-		par->hcenter = par->hsstrt + (par->htotal >> 1);
-		par->vsstrt = var->lower_margin<<line_shift;
-		par->vsstop = (var->lower_margin+var->vsync_len)<<line_shift;
-		par->diwstop_v = par->vtotal;
-		if ((par->vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED)
-			par->diwstop_v -= 2;
-		par->diwstrt_v = par->diwstop_v - yres_n;
-		par->vbstop = par->diwstrt_v - 2;
-		par->vbstrt = par->diwstop_v - 2;
-		if (par->vtotal > 2048 || par->htotal > 2048)
-			return -EINVAL;
-		par->bplcon3 |= BPC3_EXTBLKEN;
-		par->beamcon0 = BMC0_HARDDIS | BMC0_VARVBEN | BMC0_LOLDIS |
-		                BMC0_VARVSYEN | BMC0_VARHSYEN | BMC0_VARBEAMEN |
-		                BMC0_PAL | BMC0_VARCSYEN;
-		if (var->sync & FB_SYNC_HOR_HIGH_ACT)
-			par->beamcon0 |= BMC0_HSYTRUE;
-		if (var->sync & FB_SYNC_VERT_HIGH_ACT)
-			par->beamcon0 |= BMC0_VSYTRUE;
-		if (var->sync & FB_SYNC_COMP_HIGH_ACT)
-			par->beamcon0 |= BMC0_CSYTRUE;
-		hrate = (amiga_masterclock+par->htotal/2)/par->htotal;
-		vrate = div2(par->vtotal) * par->htotal;
-		vrate = (amiga_masterclock+vrate/2)/vrate;
-	} else
-		return -EINVAL;
-
-	/*
-	 * Checking the DMA timing
-	 */
-
-	fconst = 16<<maxfmode<<clk_shift;
-
-	/*
-	 * smallest window start value without turn off other dma cycles
-	 * than sprite1-7, unless you change min_fstrt
-	 */
-
-
-	fsize = ((maxfmode+clk_shift <= 1) ? fconst : 64);
-	fstrt = downx(fconst, par->diwstrt_h-4) - fsize;
-	if (fstrt < min_fstrt)
-		return -EINVAL;
-
-	/*
-	 * smallest window start value where smooth scrolling is possible
-	 */
-
-	fstrt = downx(fconst, par->diwstrt_h-fconst+(1<<clk_shift)-4) - fsize;
-	if (fstrt < min_fstrt)
-		par->vmode &= ~FB_VMODE_SMOOTH_XPAN;
-
-	maxfetchstop = down16(par->htotal - 80);
-
-	fstrt = downx(fconst, par->diwstrt_h-4) - 64 - fconst;
-	fsize = upx(fconst, xres_n + modx(fconst, downx(1<<clk_shift, par->diwstrt_h-4)));
-	if (fstrt + fsize > maxfetchstop)
-		par->vmode &= ~FB_VMODE_SMOOTH_XPAN;
-
-	fsize = upx(fconst, xres_n);
-	if (fstrt + fsize > maxfetchstop)
-		return -EINVAL;
-
-	if (maxfmode + clk_shift <= 1) {
-		fsize = up64(xres_n + fconst - 1);
-		if (min_fstrt + fsize - 64 > maxfetchstop)
-			par->vmode &= ~FB_VMODE_SMOOTH_XPAN;
-
-		fsize = up64(xres_n);
-		if (min_fstrt + fsize - 64 > maxfetchstop)
-			return -EINVAL;
-
-		fsize -= 64;
-	} else
-		fsize -= fconst;
-
-	/*
-	 * Check if there is enough time to update the bitplane pointers for ywrap
-	 */
-
-	if (par->htotal-fsize-64 < par->bpp*64)
-		par->vmode &= ~FB_VMODE_YWRAP;
-
-	/*
-	 * Bitplane calculations and check the Memory Requirements
-	 */
-
-	if (amifb_ilbm) {
-		par->next_plane = div8(upx(16<<maxfmode, par->vxres));
-		par->next_line = par->bpp*par->next_plane;
-		if (par->next_line * par->vyres > videomemorysize)
-			return -EINVAL;
-	} else {
-		par->next_line = div8(upx(16<<maxfmode, par->vxres));
-		par->next_plane = par->vyres*par->next_line;
-		if (par->next_plane * par->bpp > videomemorysize)
-			return -EINVAL;
-	}
-
-	/*
-	 * Hardware Register Values
-	 */
-
-	par->bplcon0 = BPC0_COLOR | bplpixmode[clk_shift];
-	if (!IS_OCS)
-		par->bplcon0 |= BPC0_ECSENA;
-	if (par->bpp == 8)
-		par->bplcon0 |= BPC0_BPU3;
-	else
-		par->bplcon0 |= par->bpp<<12;
-	if (var->nonstd == FB_NONSTD_HAM)
-		par->bplcon0 |= BPC0_HAM;
-	if (var->sync & FB_SYNC_EXT)
-		par->bplcon0 |= BPC0_ERSY;
-
-	if (IS_AGA)
-		par->fmode = bplfetchmode[maxfmode];
-
-	switch (par->vmode & FB_VMODE_MASK) {
-		case FB_VMODE_INTERLACED:
-			par->bplcon0 |= BPC0_LACE;
-			break;
-		case FB_VMODE_DOUBLE:
-			if (IS_AGA)
-				par->fmode |= FMODE_SSCAN2 | FMODE_BSCAN2;
-			break;
-	}
-
-	if (!((par->vmode ^ var->vmode) & FB_VMODE_YWRAP)) {
-		par->xoffset = var->xoffset;
-		par->yoffset = var->yoffset;
-		if (par->vmode & FB_VMODE_YWRAP) {
-			if (par->xoffset || par->yoffset < 0 || par->yoffset >= par->vyres)
-				par->xoffset = par->yoffset = 0;
-		} else {
-			if (par->xoffset < 0 || par->xoffset > upx(16<<maxfmode, par->vxres-par->xres) ||
-			    par->yoffset < 0 || par->yoffset > par->vyres-par->yres)
-				par->xoffset = par->yoffset = 0;
-		}
-	} else
-		par->xoffset = par->yoffset = 0;
-
-	par->crsr.crsr_x = par->crsr.crsr_y = 0;
-	par->crsr.spot_x = par->crsr.spot_y = 0;
-	par->crsr.height = par->crsr.width = 0;
-
-	if (hrate < hfmin || hrate > hfmax || vrate < vfmin || vrate > vfmax)
-		return -EINVAL;
-
-	return 0;
-}
-
-	/*
-	 * Fill the `var' structure based on the values in `par' and maybe
-	 * other values read out of the hardware.
-	 */
-
-static int ami_encode_var(struct fb_var_screeninfo *var,
-                          struct amiga_fb_par *par)
-{
-	u_short clk_shift, line_shift;
-	int i;
-
-	clk_shift = par->clk_shift;
-	line_shift = par->line_shift;
-
-	var->xres = par->xres;
-	var->yres = par->yres;
-	var->xres_virtual = par->vxres;
-	var->yres_virtual = par->vyres;
-	var->xoffset = par->xoffset;
-	var->yoffset = par->yoffset;
-
-	var->bits_per_pixel = par->bpp;
-	var->grayscale = 0;
-
-	if (IS_AGA) {
-		var->red.offset = 0;
-		var->red.length = 8;
-		var->red.msb_right = 0;
-	} else {
-		if (clk_shift == TAG_SHRES) {
-			var->red.offset = 0;
-			var->red.length = 2;
-			var->red.msb_right = 0;
-		} else {
-			var->red.offset = 0;
-			var->red.length = 4;
-			var->red.msb_right = 0;
-		}
-	}
-	var->blue = var->green = var->red;
-	var->transp.offset = 0;
-	var->transp.length = 0;
-	var->transp.msb_right = 0;
-
-	if (par->bplcon0 & BPC0_HAM)
-		var->nonstd = FB_NONSTD_HAM;
-	else
-		var->nonstd = 0;
-	var->activate = 0;
-
-	var->height = -1;
-	var->width = -1;
-	var->accel = 0;
-
-	var->pixclock = pixclock[clk_shift];
-
-	if (IS_AGA && par->fmode & FMODE_BSCAN2)
-		var->vmode = FB_VMODE_DOUBLE;
-	else if (par->bplcon0 & BPC0_LACE)
-		var->vmode = FB_VMODE_INTERLACED;
-	else
-		var->vmode = FB_VMODE_NONINTERLACED;
-
-	if (!IS_OCS && par->beamcon0 & BMC0_VARBEAMEN) {
-		var->hsync_len = (par->hsstop-par->hsstrt)>>clk_shift;
-		var->right_margin = par->hsstrt>>clk_shift;
-		var->left_margin = (par->htotal>>clk_shift) - var->xres - var->right_margin - var->hsync_len;
-		var->vsync_len = (par->vsstop-par->vsstrt)>>line_shift;
-		var->lower_margin = par->vsstrt>>line_shift;
-		var->upper_margin = (par->vtotal>>line_shift) - var->yres - var->lower_margin - var->vsync_len;
-		var->sync = 0;
-		if (par->beamcon0 & BMC0_HSYTRUE)
-			var->sync |= FB_SYNC_HOR_HIGH_ACT;
-		if (par->beamcon0 & BMC0_VSYTRUE)
-			var->sync |= FB_SYNC_VERT_HIGH_ACT;
-		if (par->beamcon0 & BMC0_CSYTRUE)
-			var->sync |= FB_SYNC_COMP_HIGH_ACT;
-	} else {
-		var->sync = FB_SYNC_BROADCAST;
-		var->hsync_len = (152>>clk_shift) + mod4(par->diwstop_h);
-		var->right_margin = ((par->htotal - down4(par->diwstop_h))>>clk_shift) + var->hsync_len;
-		var->left_margin = (par->htotal>>clk_shift) - var->xres - var->right_margin - var->hsync_len;
-		var->vsync_len = 4>>line_shift;
-		var->lower_margin = ((par->vtotal - par->diwstop_v)>>line_shift) + var->vsync_len;
-		var->upper_margin = (((par->vtotal - 2)>>line_shift) + 1) - var->yres -
-		                    var->lower_margin - var->vsync_len;
-	}
-
-	if (par->bplcon0 & BPC0_ERSY)
-		var->sync |= FB_SYNC_EXT;
-	if (par->vmode & FB_VMODE_YWRAP)
-		var->vmode |= FB_VMODE_YWRAP;
-
-	for (i = 0; i < arraysize(var->reserved); i++)
-		var->reserved[i] = 0;
-
-	return 0;
-}
-
-	/*
-	 * Get current hardware setting
-	 */
-
-static void ami_get_par(struct amiga_fb_par *par)
-{
-	*par = currentpar;
-}
-
-	/*
-	 * Set new videomode
-	 */
-
-static void ami_set_var(struct fb_var_screeninfo *var)
-{
-	do_vmode_pan = 0;
-	do_vmode_full = 0;
-	ami_decode_var(var, &currentpar);
-	ami_build_copper();
-	do_vmode_full = 1;
-}
-
-#ifdef DEBUG
-static void ami_set_par(struct amiga_fb_par *par)
-{
-	do_vmode_pan = 0;
-	do_vmode_full = 0;
-	currentpar = *par;
-	ami_build_copper();
-	do_vmode_full = 1;
-}
-#endif
-
-	/*
-	 * Pan or Wrap the Display
-	 *
-	 * This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
-	 * in `var'.
-	 */
-
-static void ami_pan_var(struct fb_var_screeninfo *var)
-{
-	struct amiga_fb_par *par = &currentpar;
-
-	par->xoffset = var->xoffset;
-	par->yoffset = var->yoffset;
-	if (var->vmode & FB_VMODE_YWRAP)
-		par->vmode |= FB_VMODE_YWRAP;
-	else
-		par->vmode &= ~FB_VMODE_YWRAP;
-
-	do_vmode_pan = 0;
-	ami_update_par();
-	do_vmode_pan = 1;
-}
-
-	/*
-	 * Update hardware
-	 */
-
-static int ami_update_par(void)
-{
-	struct amiga_fb_par *par = &currentpar;
-	short clk_shift, vshift, fstrt, fsize, fstop, fconst,  shift, move, mod;
-
-	clk_shift = par->clk_shift;
-
-	if (!(par->vmode & FB_VMODE_SMOOTH_XPAN))
-		par->xoffset = upx(16<<maxfmode, par->xoffset);
-
-	fconst = 16<<maxfmode<<clk_shift;
-	vshift = modx(16<<maxfmode, par->xoffset);
-	fstrt = par->diwstrt_h - (vshift<<clk_shift) - 4;
-	fsize = (par->xres+vshift)<<clk_shift;
-	shift = modx(fconst, fstrt);
-	move = downx(2<<maxfmode, div8(par->xoffset));
-	if (maxfmode + clk_shift > 1) {
-		fstrt = downx(fconst, fstrt) - 64;
-		fsize = upx(fconst, fsize);
-		fstop = fstrt + fsize - fconst;
-	} else {
-		mod = fstrt = downx(fconst, fstrt) - fconst;
-		fstop = fstrt + upx(fconst, fsize) - 64;
-		fsize = up64(fsize);
-		fstrt = fstop - fsize + 64;
-		if (fstrt < min_fstrt) {
-			fstop += min_fstrt - fstrt;
-			fstrt = min_fstrt;
-		}
-		move = move - div8((mod-fstrt)>>clk_shift);
-	}
-	mod = par->next_line - div8(fsize>>clk_shift);
-	par->ddfstrt = fstrt;
-	par->ddfstop = fstop;
-	par->bplcon1 = hscroll2hw(shift);
-	par->bpl2mod = mod;
-	if (par->bplcon0 & BPC0_LACE)
-		par->bpl2mod += par->next_line;
-	if (IS_AGA && (par->fmode & FMODE_BSCAN2))
-		par->bpl1mod = -div8(fsize>>clk_shift);
-	else
-		par->bpl1mod = par->bpl2mod;
-
-	if (par->yoffset) {
-		par->bplpt0 = ZTWO_PADDR((u_long)videomemory + par->next_line*par->yoffset + move);
-		if (par->vmode & FB_VMODE_YWRAP) {
-			if (par->yoffset > par->vyres-par->yres) {
-				par->bplpt0wrap = ZTWO_PADDR((u_long)videomemory + move);
-				if (par->bplcon0 & BPC0_LACE && mod2(par->diwstrt_v+par->vyres-par->yoffset))
-					par->bplpt0wrap += par->next_line;
-			}
-		}
-	} else
-		par->bplpt0 = ZTWO_PADDR((u_long)videomemory + move);
-
-	if (par->bplcon0 & BPC0_LACE && mod2(par->diwstrt_v))
-		par->bplpt0 += par->next_line;
-
-	return 0;
-}
-
-	/*
-	 * Read a single color register and split it into
-	 * colors/transparent. Return != 0 for invalid regno.
-	 */
-
-static int ami_getcolreg(u_int regno, u_int *red, u_int *green, u_int *blue,
-                         u_int *transp)
-{
-	if (IS_AGA) {
-		if (regno > 255)
-			return 1;
-	} else {
-		if (regno > 31)
-			return 1;
-	}
-
-	*red = palette[regno].red;
-	*green = palette[regno].green;
-	*blue = palette[regno].blue;
-	return 0;
-}
-
-
-	/*
-	 * Set a single color register. The values supplied are already
-	 * rounded down to the hardware's capabilities (according to the
-	 * entries in the var structure). Return != 0 for invalid regno.
-	 */
-
-static int ami_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
-                         u_int transp)
-{
-#if defined(CONFIG_AMIFB_AGA)
-	u_short bplcon3 = currentpar.bplcon3;
-
-	if (IS_AGA) {
-		if (regno > 255)
-			return 1;
-	} else
-#endif
-		if (regno > 31)
-			return 1;
-
-	/*
-	 * Update the corresponding Hardware Color Register, unless it's Color
-	 * Register 0 and the screen is blanked.
-	 *
-	 * VBlank is switched off to protect bplcon3 or ecs_palette[] from
-	 * being changed by ami_do_blank() during the VBlank.
-	 */
-
-	palette[regno].red = red;
-	palette[regno].green = green;
-	palette[regno].blue = blue;
-
-	if (regno || !is_blanked) {
-#if defined(CONFIG_AMIFB_AGA)
-		if (IS_AGA) {
-			VBlankOff();
-			custom.bplcon3 = bplcon3 | (regno<<8 & 0xe000);
-			custom.color[regno&31] = rgb2hw8_high(red, green, blue);
-			custom.bplcon3 = bplcon3 | (regno<<8 & 0xe000) | BPC3_LOCT;
-			custom.color[regno&31] = rgb2hw8_low(red, green, blue);
-			custom.bplcon3 = bplcon3;
-			VBlankOn();
-		} else
-#endif
-		{
-#if defined(CONFIG_AMIFB_ECS)
-			if (currentpar.bplcon0 & BPC0_SHRES) {
-				u_short color, mask;
-				int i;
-
-				mask = 0x3333;
-				color = rgb2hw2(red, green, blue);
-				VBlankOff();
-				for (i = regno+12; i >= (int)regno; i -= 4)
-					custom.color[i] = ecs_palette[i] = (ecs_palette[i] & mask) | color;
-				mask <<=2; color >>= 2;
-				regno = down16(regno)+mul4(mod4(regno));
-				for (i = regno+3; i >= (int)regno; i--)
-					custom.color[i] = ecs_palette[i] = (ecs_palette[i] & mask) | color;
-				VBlankOn();
-			} else
-#endif
-				custom.color[regno] = rgb2hw4(red, green, blue);
-		}
-	}
-	return 0;
-}
-
-static void ami_update_display(void)
-{
-	struct amiga_fb_par *par = &currentpar;
-
-	custom.bplcon1 = par->bplcon1;
-	custom.bpl1mod = par->bpl1mod;
-	custom.bpl2mod = par->bpl2mod;
-	custom.ddfstrt = ddfstrt2hw(par->ddfstrt);
-	custom.ddfstop = ddfstop2hw(par->ddfstop);
-}
-
-	/*
-	 * Change the video mode (called by VBlank interrupt)
-	 */
-
-static void ami_init_display(void)
-{
-	struct amiga_fb_par *par = &currentpar;
-
-	custom.bplcon0 = par->bplcon0 & ~BPC0_LACE;
-	custom.bplcon2 = (IS_OCS ? 0 : BPC2_KILLEHB) | BPC2_PF2P2 | BPC2_PF1P2;
-	if (!IS_OCS) {
-		custom.bplcon3 = par->bplcon3;
-		if (IS_AGA)
-			custom.bplcon4 = BPC4_ESPRM4 | BPC4_OSPRM4;
-		if (par->beamcon0 & BMC0_VARBEAMEN) {
-			custom.htotal = htotal2hw(par->htotal);
-			custom.hbstrt = hbstrt2hw(par->hbstrt);
-			custom.hbstop = hbstop2hw(par->hbstop);
-			custom.hsstrt = hsstrt2hw(par->hsstrt);
-			custom.hsstop = hsstop2hw(par->hsstop);
-			custom.hcenter = hcenter2hw(par->hcenter);
-			custom.vtotal = vtotal2hw(par->vtotal);
-			custom.vbstrt = vbstrt2hw(par->vbstrt);
-			custom.vbstop = vbstop2hw(par->vbstop);
-			custom.vsstrt = vsstrt2hw(par->vsstrt);
-			custom.vsstop = vsstop2hw(par->vsstop);
-		}
-	}
-	if (!IS_OCS || par->hsstop)
-		custom.beamcon0 = par->beamcon0;
-	if (IS_AGA)
-		custom.fmode = par->fmode;
-
-	/*
-	 * The minimum period for audio depends on htotal
-	 */
-
-	amiga_audio_min_period = div16(par->htotal);
-
-	is_lace = par->bplcon0 & BPC0_LACE ? 1 : 0;
-#if 1
-	if (is_lace) {
-		if (custom.vposr & 0x8000)
-			custom.cop2lc = (u_short *)ZTWO_PADDR(copdisplay.list[currentcop][1]);
-		else
-			custom.cop2lc = (u_short *)ZTWO_PADDR(copdisplay.list[currentcop][0]);
-	} else {
-		custom.vposw = custom.vposr | 0x8000;
-		custom.cop2lc = (u_short *)ZTWO_PADDR(copdisplay.list[currentcop][1]);
-	}
-#else
-	custom.vposw = custom.vposr | 0x8000;
-	custom.cop2lc = (u_short *)ZTWO_PADDR(copdisplay.list[currentcop][1]);
-#endif
-}
-
-	/*
-	 * (Un)Blank the screen (called by VBlank interrupt)
-	 */
-
-static void ami_do_blank(void)
-{
-	struct amiga_fb_par *par = &currentpar;
-#if defined(CONFIG_AMIFB_AGA)
-	u_short bplcon3 = par->bplcon3;
-#endif
-	u_char red, green, blue;
-
-	if (do_blank > 0) {
-		custom.dmacon = DMAF_RASTER | DMAF_SPRITE;
-		red = green = blue = 0;
-		if (!IS_OCS && do_blank > 1) {
-			switch (do_blank) {
-				case 2 : /* suspend vsync */
-					custom.hsstrt = hsstrt2hw(par->hsstrt);
-					custom.hsstop = hsstop2hw(par->hsstop);
-					custom.vsstrt = vsstrt2hw(par->vtotal+4);
-					custom.vsstop = vsstop2hw(par->vtotal+4);
-					break;
-				case 3 : /* suspend hsync */
-					custom.hsstrt = hsstrt2hw(par->htotal+16);
-					custom.hsstop = hsstop2hw(par->htotal+16);
-					custom.vsstrt = vsstrt2hw(par->vsstrt);
-					custom.vsstop = vsstrt2hw(par->vsstop);
-					break;
-				case 4 : /* powerdown */
-					custom.hsstrt = hsstrt2hw(par->htotal+16);
-					custom.hsstop = hsstop2hw(par->htotal+16);
-					custom.vsstrt = vsstrt2hw(par->vtotal+4);
-					custom.vsstop = vsstop2hw(par->vtotal+4);
-					break;
-			}
-			if (!(par->beamcon0 & BMC0_VARBEAMEN)) {
-				custom.htotal = htotal2hw(par->htotal);
-				custom.vtotal = vtotal2hw(par->vtotal);
-				custom.beamcon0 = BMC0_HARDDIS | BMC0_VARBEAMEN |
-				                  BMC0_VARVSYEN | BMC0_VARHSYEN | BMC0_VARCSYEN;
-			}
-		}
-	} else {
-		custom.dmacon = DMAF_SETCLR | DMAF_RASTER | DMAF_SPRITE;
-		red = palette[0].red;
-		green = palette[0].green;
-		blue = palette[0].blue;
-		if (!IS_OCS) {
-			custom.hsstrt = hsstrt2hw(par->hsstrt);
-			custom.hsstop = hsstop2hw(par->hsstop);
-			custom.vsstrt = vsstrt2hw(par->vsstrt);
-			custom.vsstop = vsstop2hw(par->vsstop);
-			custom.beamcon0 = par->beamcon0;
-		}
-	}
-#if defined(CONFIG_AMIFB_AGA)
-	if (IS_AGA) {
-		custom.bplcon3 = bplcon3;
-		custom.color[0] = rgb2hw8_high(red, green, blue);
-		custom.bplcon3 = bplcon3 | BPC3_LOCT;
-		custom.color[0] = rgb2hw8_low(red, green, blue);
-		custom.bplcon3 = bplcon3;
-	} else
-#endif
-	{
-#if defined(CONFIG_AMIFB_ECS)
-		if (par->bplcon0 & BPC0_SHRES) {
-			u_short color, mask;
-			int i;
-
-			mask = 0x3333;
-			color = rgb2hw2(red, green, blue);
-			for (i = 12; i >= 0; i -= 4)
-				custom.color[i] = ecs_palette[i] = (ecs_palette[i] & mask) | color;
-			mask <<=2; color >>= 2;
-			for (i = 3; i >= 0; i--)
-				custom.color[i] = ecs_palette[i] = (ecs_palette[i] & mask) | color;
-		} else
-#endif
-			custom.color[0] = rgb2hw4(red, green, blue);
-	}
-	is_blanked = do_blank > 0 ? do_blank : 0;
-}
-
-	/*
-	 * Flash the cursor (called by VBlank interrupt)
-	 */
-
-static int ami_get_fix_cursorinfo(struct fb_fix_cursorinfo *fix, int con)
-{
-	struct amiga_fb_par *par = &currentpar;
-
-	fix->crsr_width = fix->crsr_xsize = par->crsr.width;
-	fix->crsr_height = fix->crsr_ysize = par->crsr.height;
-	fix->crsr_color1 = 17;
-	fix->crsr_color2 = 18;
-	return 0;
-}
-
-static int ami_get_var_cursorinfo(struct fb_var_cursorinfo *var, u_char *data, int con)
-{
-	struct amiga_fb_par *par = &currentpar;
-	register u_short *lspr, *sspr;
-	register u_long datawords asm ("d2");
-	register short delta;
-	register u_char color;
-	short height, width, bits, words;
-	int i, size, alloc;
-
-	size = par->crsr.height*par->crsr.width;
-	alloc = var->height*var->width;
-	var->height = par->crsr.height;
-	var->width = par->crsr.width;
-	var->xspot = par->crsr.spot_x;
-	var->yspot = par->crsr.spot_y;
-	if (size > var->height*var->width)
-		return -ENAMETOOLONG;
-	if ((i = verify_area(VERIFY_WRITE, (void *)data, size)))
-		return i;
-	delta = 1<<par->crsr.fmode;
-	lspr = lofsprite + (delta<<1);
-	if (par->bplcon0 & BPC0_LACE)
-		sspr = shfsprite + (delta<<1);
-	else
-		sspr = 0;
-	for (height = (short)var->height-1; height >= 0; height--) {
-		bits = 0; words = delta; datawords = 0;
-		for (width = (short)var->width-1; width >= 0; width--) {
-			if (bits == 0) {
-				bits = 16; --words;
-				asm volatile ("movew %1@(%3:w:2),%0 ; swap %0 ; movew %1@+,%0"
-					: "=d" (datawords), "=a" (lspr) : "1" (lspr), "d" (delta));
-			}
-			--bits;
-			asm volatile (
-				"clrb %0 ; swap %1 ; lslw #1,%1 ; roxlb #1,%0 ; "
-				"swap %1 ; lslw #1,%1 ; roxlb #1,%0"
-				: "=d" (color), "=d" (datawords) : "1" (datawords));
-			put_user(color, data++);
-		}
-		if (bits > 0) {
-			--words; ++lspr;
-		}
-		while (--words >= 0)
-			++lspr;
-		asm volatile ("lea %0@(%4:w:2),%0 ; tstl %1 ; jeq 1f ; exg %0,%1\n1:"
-			: "=a" (lspr), "=a" (sspr) : "0" (lspr), "1" (sspr), "d" (delta));
-	}
-	return 0;
-}
-
-static int ami_set_var_cursorinfo(struct fb_var_cursorinfo *var, u_char *data, int con)
-{
-	struct amiga_fb_par *par = &currentpar;
-	register u_short *lspr, *sspr;
-	register u_long datawords asm ("d2");
-	register short delta;
-	u_short fmode;
-	short height, width, bits, words;
-	int i;
-
-	if (!var->width)
-		return -EINVAL;
-	else if (var->width <= 16)
-		fmode = TAG_FMODE_1;
-	else if (var->width <= 32)
-		fmode = TAG_FMODE_2;
-	else if (var->width <= 64)
-		fmode = TAG_FMODE_4;
-	else
-		return -EINVAL;
-	if (fmode > maxfmode)
-		return -EINVAL;
-	if (!var->height)
-		return -EINVAL;
-	if ((i = verify_area(VERIFY_READ, (void *)data, var->width*var->height)))
-		return i;
-	delta = 1<<fmode;
-	lofsprite = shfsprite = (u_short *)spritememory;
-	lspr = lofsprite + (delta<<1);
-	if (par->bplcon0 & BPC0_LACE) {
-		if (((var->height+4)<<fmode<<2) > SPRITEMEMSIZE)
-			return -EINVAL;
-		memset(lspr, 0, (var->height+4)<<fmode<<2);
-		shfsprite += ((var->height+5)&-2)<<fmode;
-		sspr = shfsprite + (delta<<1);
-	} else {
-		if (((var->height+2)<<fmode<<2) > SPRITEMEMSIZE)
-			return -EINVAL;
-		memset(lspr, 0, (var->height+2)<<fmode<<2);
-		sspr = 0;
-	}
-	for (height = (short)var->height-1; height >= 0; height--) {
-		bits = 16; words = delta; datawords = 0;
-		for (width = (short)var->width-1; width >= 0; width--) {
-			unsigned long tdata = 0;
-			get_user(tdata, (char *)data);
-			data++;
-			asm volatile (
-				"lsrb #1,%2 ; roxlw #1,%0 ; swap %0 ; "
-				"lsrb #1,%2 ; roxlw #1,%0 ; swap %0"
-				: "=d" (datawords)
-				: "0" (datawords), "d" (tdata));
-			if (--bits == 0) {
-				bits = 16; --words;
-				asm volatile ("swap %2 ; movew %2,%0@(%3:w:2) ; swap %2 ; movew %2,%0@+"
-					: "=a" (lspr) : "0" (lspr), "d" (datawords), "d" (delta));
-			}
-		}
-		if (bits < 16) {
-			--words;
-			asm volatile (
-				"swap %2 ; lslw %4,%2 ; movew %2,%0@(%3:w:2) ; "
-				"swap %2 ; lslw %4,%2 ; movew %2,%0@+"
-				: "=a" (lspr) : "0" (lspr), "d" (datawords), "d" (delta), "d" (bits));
-		}
-		while (--words >= 0)
-			asm volatile ("moveql #0,%%d0 ; movew %%d0,%0@(%2:w:2) ; movew %%d0,%0@+"
-				: "=a" (lspr) : "0" (lspr), "d" (delta) : "d0");
-		asm volatile ("lea %0@(%4:w:2),%0 ; tstl %1 ; jeq 1f ; exg %0,%1\n1:"
-			: "=a" (lspr), "=a" (sspr) : "0" (lspr), "1" (sspr), "d" (delta));
-	}
-	par->crsr.height = var->height;
-	par->crsr.width = var->width;
-	par->crsr.spot_x = var->xspot;
-	par->crsr.spot_y = var->yspot;
-	par->crsr.fmode = fmode;
-	if (IS_AGA) {
-		par->fmode &= ~(FMODE_SPAGEM | FMODE_SPR32);
-		par->fmode |= sprfetchmode[fmode];
-		custom.fmode = par->fmode;
-	}
-	return 0;
-}
-
-static int ami_get_cursorstate(struct fb_cursorstate *state, int con)
-{
-	struct amiga_fb_par *par = &currentpar;
-
-	state->xoffset = par->crsr.crsr_x;
-	state->yoffset = par->crsr.crsr_y;
-	state->mode = cursormode;
-	return 0;
-}
-
-static int ami_set_cursorstate(struct fb_cursorstate *state, int con)
-{
-	struct amiga_fb_par *par = &currentpar;
-
-	par->crsr.crsr_x = state->xoffset;
-	par->crsr.crsr_y = state->yoffset;
-	if ((cursormode = state->mode) == FB_CURSOR_OFF)
-		cursorstate = -1;
-	do_cursor = 1;
-	return 0;
-}
-
-static void ami_set_sprite(void)
-{
-	struct amiga_fb_par *par = &currentpar;
-	copins *copl, *cops;
-	u_short hs, vs, ve;
-	u_long pl, ps, pt;
-	short mx, my;
-
-	cops = copdisplay.list[currentcop][0];
-	copl = copdisplay.list[currentcop][1];
-	ps = pl = ZTWO_PADDR(dummysprite);
-	mx = par->crsr.crsr_x-par->crsr.spot_x;
-	my = par->crsr.crsr_y-par->crsr.spot_y;
-	if (!(par->vmode & FB_VMODE_YWRAP)) {
-		mx -= par->xoffset;
-		my -= par->yoffset;
-	}
-	if (!is_blanked && cursorstate > 0 && par->crsr.height > 0 &&
-	    mx > -(short)par->crsr.width && mx < par->xres &&
-	    my > -(short)par->crsr.height && my < par->yres) {
-		pl = ZTWO_PADDR(lofsprite);
-		hs = par->diwstrt_h + (mx<<par->clk_shift) - 4;
-		vs = par->diwstrt_v + (my<<par->line_shift);
-		ve = vs + (par->crsr.height<<par->line_shift);
-		if (par->bplcon0 & BPC0_LACE) {
-			ps = ZTWO_PADDR(shfsprite);
-			lofsprite[0] = spr2hw_pos(vs, hs);
-			shfsprite[0] = spr2hw_pos(vs+1, hs);
-			if (mod2(vs)) {
-				lofsprite[1<<par->crsr.fmode] = spr2hw_ctl(vs, hs, ve);
-				shfsprite[1<<par->crsr.fmode] = spr2hw_ctl(vs+1, hs, ve+1);
-				pt = pl; pl = ps; ps = pt;
-			} else {
-				lofsprite[1<<par->crsr.fmode] = spr2hw_ctl(vs, hs, ve+1);
-				shfsprite[1<<par->crsr.fmode] = spr2hw_ctl(vs+1, hs, ve);
-			}
-		} else {
-			lofsprite[0] = spr2hw_pos(vs, hs) | (IS_AGA && (par->fmode & FMODE_BSCAN2) ? 0x80 : 0);
-			lofsprite[1<<par->crsr.fmode] = spr2hw_ctl(vs, hs, ve);
-		}
-	}
-	copl[cop_spr0ptrh].w[1] = highw(pl);
-	copl[cop_spr0ptrl].w[1] = loww(pl);
-	if (par->bplcon0 & BPC0_LACE) {
-		cops[cop_spr0ptrh].w[1] = highw(ps);
-		cops[cop_spr0ptrl].w[1] = loww(ps);
-	}
-}
-
-	/*
-	 * Initialise the Copper Initialisation List
-	 */
-
-static void ami_init_copper(void)
-{
-	copins *cop = copdisplay.init;
-	u_long p;
-	int i;
-
-	if (!IS_OCS) {
-		(cop++)->l = CMOVE(BPC0_COLOR | BPC0_SHRES | BPC0_ECSENA, bplcon0);
-		(cop++)->l = CMOVE(0x0181, diwstrt);
-		(cop++)->l = CMOVE(0x0281, diwstop);
-		(cop++)->l = CMOVE(0x0000, diwhigh);
-	} else
-		(cop++)->l = CMOVE(BPC0_COLOR, bplcon0);
-	p = ZTWO_PADDR(dummysprite);
-	for (i = 0; i < 8; i++) {
-		(cop++)->l = CMOVE(0, spr[i].pos);
-		(cop++)->l = CMOVE(highw(p), sprpt[i]);
-		(cop++)->l = CMOVE2(loww(p), sprpt[i]);
-	}
-
-	(cop++)->l = CMOVE(IF_SETCLR | IF_COPER, intreq);
-	copdisplay.wait = cop;
-	(cop++)->l = CEND;
-	(cop++)->l = CMOVE(0, copjmp2);
-	cop->l = CEND;
-
-	custom.cop1lc = (u_short *)ZTWO_PADDR(copdisplay.init);
-	custom.copjmp1 = 0;
-}
-
-static void ami_reinit_copper(void)
-{
-	struct amiga_fb_par *par = &currentpar;
-
-	copdisplay.init[cip_bplcon0].w[1] = ~(BPC0_BPU3 | BPC0_BPU2 | BPC0_BPU1 | BPC0_BPU0) & par->bplcon0;
-	copdisplay.wait->l = CWAIT(32, par->diwstrt_v-4);
-}
-
-	/*
-	 * Build the Copper List
-	 */
-
-static void ami_build_copper(void)
-{
-	struct amiga_fb_par *par = &currentpar;
-	copins *copl, *cops;
-	u_long p;
-
-	currentcop = 1 - currentcop;
-
-	copl = copdisplay.list[currentcop][1];
-
-	(copl++)->l = CWAIT(0, 10);
-	(copl++)->l = CMOVE(par->bplcon0, bplcon0);
-	(copl++)->l = CMOVE(0, sprpt[0]);
-	(copl++)->l = CMOVE2(0, sprpt[0]);
-
-	if (par->bplcon0 & BPC0_LACE) {
-		cops = copdisplay.list[currentcop][0];
-
-		(cops++)->l = CWAIT(0, 10);
-		(cops++)->l = CMOVE(par->bplcon0, bplcon0);
-		(cops++)->l = CMOVE(0, sprpt[0]);
-		(cops++)->l = CMOVE2(0, sprpt[0]);
-
-		(copl++)->l = CMOVE(diwstrt2hw(par->diwstrt_h, par->diwstrt_v+1), diwstrt);
-		(copl++)->l = CMOVE(diwstop2hw(par->diwstop_h, par->diwstop_v+1), diwstop);
-		(cops++)->l = CMOVE(diwstrt2hw(par->diwstrt_h, par->diwstrt_v), diwstrt);
-		(cops++)->l = CMOVE(diwstop2hw(par->diwstop_h, par->diwstop_v), diwstop);
-		if (!IS_OCS) {
-			(copl++)->l = CMOVE(diwhigh2hw(par->diwstrt_h, par->diwstrt_v+1,
-			                    par->diwstop_h, par->diwstop_v+1), diwhigh);
-			(cops++)->l = CMOVE(diwhigh2hw(par->diwstrt_h, par->diwstrt_v,
-			                    par->diwstop_h, par->diwstop_v), diwhigh);
-#if 0
-			if (par->beamcon0 & BMC0_VARBEAMEN) {
-				(copl++)->l = CMOVE(vtotal2hw(par->vtotal), vtotal);
-				(copl++)->l = CMOVE(vbstrt2hw(par->vbstrt+1), vbstrt);
-				(copl++)->l = CMOVE(vbstop2hw(par->vbstop+1), vbstop);
-				(cops++)->l = CMOVE(vtotal2hw(par->vtotal), vtotal);
-				(cops++)->l = CMOVE(vbstrt2hw(par->vbstrt), vbstrt);
-				(cops++)->l = CMOVE(vbstop2hw(par->vbstop), vbstop);
-			}
-#endif
-		}
-		p = ZTWO_PADDR(copdisplay.list[currentcop][0]);
-		(copl++)->l = CMOVE(highw(p), cop2lc);
-		(copl++)->l = CMOVE2(loww(p), cop2lc);
-		p = ZTWO_PADDR(copdisplay.list[currentcop][1]);
-		(cops++)->l = CMOVE(highw(p), cop2lc);
-		(cops++)->l = CMOVE2(loww(p), cop2lc);
-		copdisplay.rebuild[0] = cops;
-	} else {
-		(copl++)->l = CMOVE(diwstrt2hw(par->diwstrt_h, par->diwstrt_v), diwstrt);
-		(copl++)->l = CMOVE(diwstop2hw(par->diwstop_h, par->diwstop_v), diwstop);
-		if (!IS_OCS) {
-			(copl++)->l = CMOVE(diwhigh2hw(par->diwstrt_h, par->diwstrt_v,
-			                    par->diwstop_h, par->diwstop_v), diwhigh);
-#if 0
-			if (par->beamcon0 & BMC0_VARBEAMEN) {
-				(copl++)->l = CMOVE(vtotal2hw(par->vtotal), vtotal);
-				(copl++)->l = CMOVE(vbstrt2hw(par->vbstrt), vbstrt);
-				(copl++)->l = CMOVE(vbstop2hw(par->vbstop), vbstop);
-			}
-#endif
-		}
-	}
-	copdisplay.rebuild[1] = copl;
-
-	ami_update_par();
-	ami_rebuild_copper();
-}
-
-	/*
-	 * Rebuild the Copper List
-	 *
-	 * We only change the things that are not static
-	 */
-
-static void ami_rebuild_copper(void)
-{
-	struct amiga_fb_par *par = &currentpar;
-	copins *copl, *cops;
-	u_short line, h_end1, h_end2;
-	short i;
-	u_long p;
-
-	if (IS_AGA && maxfmode + par->clk_shift == 0)
-		h_end1 = par->diwstrt_h-64;
-	else
-		h_end1 = par->htotal-32;
-	h_end2 = par->ddfstop+64;
-
-	ami_set_sprite();
-
-	copl = copdisplay.rebuild[1];
-	p = par->bplpt0;
-	if (par->vmode & FB_VMODE_YWRAP) {
-		if ((par->vyres-par->yoffset) != 1 || !mod2(par->diwstrt_v)) {
-			if (par->yoffset > par->vyres-par->yres) {
-				for (i = 0; i < (short)par->bpp; i++, p += par->next_plane) {
-					(copl++)->l = CMOVE(highw(p), bplpt[i]);
-					(copl++)->l = CMOVE2(loww(p), bplpt[i]);
-				}
-				line = par->diwstrt_v + ((par->vyres-par->yoffset)<<par->line_shift) - 1;
-				while (line >= 512) {
-					(copl++)->l = CWAIT(h_end1, 510);
-					line -= 512;
-				}
-				if (line >= 510 && IS_AGA && maxfmode + par->clk_shift == 0)
-					(copl++)->l = CWAIT(h_end1, line);
-				else
-					(copl++)->l = CWAIT(h_end2, line);
-				p = par->bplpt0wrap;
-			}
-		} else p = par->bplpt0wrap;
-	}
-	for (i = 0; i < (short)par->bpp; i++, p += par->next_plane) {
-		(copl++)->l = CMOVE(highw(p), bplpt[i]);
-		(copl++)->l = CMOVE2(loww(p), bplpt[i]);
-	}
-	copl->l = CEND;
-
-	if (par->bplcon0 & BPC0_LACE) {
-		cops = copdisplay.rebuild[0];
-		p = par->bplpt0;
-		if (mod2(par->diwstrt_v))
-			p -= par->next_line;
-		else
-			p += par->next_line;
-		if (par->vmode & FB_VMODE_YWRAP) {
-			if ((par->vyres-par->yoffset) != 1 || mod2(par->diwstrt_v)) {
-				if (par->yoffset > par->vyres-par->yres+1) {
-					for (i = 0; i < (short)par->bpp; i++, p += par->next_plane) {
-						(cops++)->l = CMOVE(highw(p), bplpt[i]);
-						(cops++)->l = CMOVE2(loww(p), bplpt[i]);
-					}
-					line = par->diwstrt_v + ((par->vyres-par->yoffset)<<par->line_shift) - 2;
-					while (line >= 512) {
-						(cops++)->l = CWAIT(h_end1, 510);
-						line -= 512;
-					}
-					if (line > 510 && IS_AGA && maxfmode + par->clk_shift == 0)
-						(cops++)->l = CWAIT(h_end1, line);
-					else
-						(cops++)->l = CWAIT(h_end2, line);
-					p = par->bplpt0wrap;
-					if (mod2(par->diwstrt_v+par->vyres-par->yoffset))
-						p -= par->next_line;
-					else
-						p += par->next_line;
-				}
-			} else p = par->bplpt0wrap - par->next_line;
-		}
-		for (i = 0; i < (short)par->bpp; i++, p += par->next_plane) {
-			(cops++)->l = CMOVE(highw(p), bplpt[i]);
-			(cops++)->l = CMOVE2(loww(p), bplpt[i]);
-		}
-		cops->l = CEND;
-	}
-}
--- linux-2.1.42/arch/m68k/amiga/cyberfb.c.orig	Sun May 18 23:08:52 1997
+++ linux-2.1.42/arch/m68k/amiga/cyberfb.c	Mon Jun  9 23:03:04 1997
@@ -1,1253 +0,0 @@
-/*
- * linux/arch/m68k/amiga/cyberfb.c -- Low level implementation of the
- *                                    Cybervision frame buffer device
- *
- *    Copyright (C) 1996 Martin Apel
- *                       Geert Uytterhoeven
- *
- *
- * This file is based on the Amiga frame buffer device (amifb.c):
- *
- *    Copyright (C) 1995 Geert Uytterhoeven
- *
- *
- * History:
- *   - 22 Dec 95: Original version by Martin Apel
- *   - 05 Jan 96: Geert: integration into the current source tree
- *
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file COPYING in the main directory of this archive
- * for more details.
- */
-
-
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <linux/tty.h>
-#include <linux/malloc.h>
-#include <linux/delay.h>
-#include <linux/zorro.h>
-#include <linux/fb.h>
-#include <linux/init.h>
-#include <asm/uaccess.h>
-#include <asm/system.h>
-#include <asm/irq.h>
-#include <asm/pgtable.h>
-#include "s3blit.h"
-
-
-#define arraysize(x)    (sizeof(x)/sizeof(*(x)))
-
-struct Cyber_fb_par {
-   int xres;
-   int yres;
-   int bpp;
-};
-
-static struct Cyber_fb_par current_par;
-
-static int current_par_valid = 0;
-static int currcon = 0;
-
-static struct display disp[MAX_NR_CONSOLES];
-static struct fb_info fb_info;
-
-static int node;        /* node of the /dev/fb?current file */
-
-
-   /*
-    *    Switch for Chipset Independency
-    */
-
-static struct fb_hwswitch {
-
-   /* Initialisation */
-
-   int (*init)(void);
-
-   /* Display Control */
-
-   int (*encode_fix)(struct fb_fix_screeninfo *fix, struct Cyber_fb_par *par);
-   int (*decode_var)(struct fb_var_screeninfo *var, struct Cyber_fb_par *par);
-   int (*encode_var)(struct fb_var_screeninfo *var, struct Cyber_fb_par *par);
-   int (*getcolreg)(u_int regno, u_int *red, u_int *green, u_int *blue,
-                    u_int *transp);
-   int (*setcolreg)(u_int regno, u_int red, u_int green, u_int blue,
-                    u_int transp);
-   void (*blank)(int blank);
-} *fbhw;
-
-
-   /*
-    *    Frame Buffer Name
-    */
-
-static char Cyber_fb_name[16] = "Cybervision";
-
-
-   /*
-    *    Cybervision Graphics Board
-    */
-
-#define CYBER8_WIDTH 1152
-#define CYBER8_HEIGHT 886
-#define CYBER8_PIXCLOCK 12500    /* ++Geert: Just a guess */
-
-#define CYBER16_WIDTH 800
-#define CYBER16_HEIGHT 600
-#define CYBER16_PIXCLOCK 25000   /* ++Geert: Just a guess */
-
-
-static int CyberKey = 0;
-static u_char Cyber_colour_table [256][4];
-static unsigned long CyberMem;
-static unsigned long CyberSize;
-static volatile char *CyberRegs;
-
-static long *memstart;
-
-
-   /*
-    *    Predefined Video Mode Names
-    */
-
-static char *Cyber_fb_modenames[] = {
-
-   /*
-    *    Autodetect (Default) Video Mode
-    */
-
-   "default",
-
-   /*
-    *    Predefined Video Modes
-    */
-    
-   "cyber8",            /* Cybervision 8 bpp */
-   "cyber16",           /* Cybervision 16 bpp */
-
-   /*
-    *    Dummy Video Modes
-    */
-
-   "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy",
-   "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy",
-   "dummy", "dummy", "dummy", "dummy",
-
-   /*
-    *    User Defined Video Modes
-    *
-    *    This doesn't work yet!!
-    */
-
-   "user0", "user1", "user2", "user3", "user4", "user5", "user6", "user7"
-};
-
-
-   /*
-    *    Predefined Video Mode Definitions
-    */
-
-static struct fb_var_screeninfo Cyber_fb_predefined[] = {
-
-   /*
-    *    Autodetect (Default) Video Mode
-    */
-
-   { 0, },
-
-   /*
-    *    Predefined Video Modes
-    */
-    
-   {
-      /* Cybervision 8 bpp */
-      CYBER8_WIDTH, CYBER8_HEIGHT, CYBER8_WIDTH, CYBER8_HEIGHT, 0, 0, 8, 0,
-      {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-      0, 0, -1, -1, FB_ACCEL_NONE, CYBER8_PIXCLOCK, 64, 96, 35, 12, 112, 2,
-      FB_SYNC_COMP_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
-   }, {
-      /* Cybervision 16 bpp */
-      CYBER16_WIDTH, CYBER16_HEIGHT, CYBER16_WIDTH, CYBER16_HEIGHT, 0, 0, 16, 0,
-      {11, 5, 0}, {5, 6, 0}, {0, 5, 0}, {0, 0, 0},
-      0, 0, -1, -1, FB_ACCEL_NONE, CYBER16_PIXCLOCK, 64, 96, 35, 12, 112, 2,
-      FB_SYNC_COMP_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
-   },
-
-   /*
-    *    Dummy Video Modes
-    */
-
-   { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, },
-   { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, },
-   { 0, }, { 0, },
-
-   /*
-    *    User Defined Video Modes
-    */
-
-   { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }
-};
-
-
-#define NUM_TOTAL_MODES    arraysize(Cyber_fb_predefined)
-#define NUM_PREDEF_MODES   (3)
-
-
-static int Cyberfb_inverse = 0;
-static int Cyberfb_Cyber8 = 0;        /* Use Cybervision board */
-static int Cyberfb_Cyber16 = 0;       /* Use Cybervision board */
-static int Cyberfb_mode = 0;
-
-
-   /*
-    *    Some default modes
-    */
-
-#define CYBER8_DEFMODE     (1)
-#define CYBER16_DEFMODE    (2)
-
-
-   /*
-    *    Interface used by the world
-    */
-
-int Cyber_probe(void);
-void Cyber_video_setup(char *options, int *ints);
-
-static int Cyber_fb_get_fix(struct fb_fix_screeninfo *fix, int con);
-static int Cyber_fb_get_var(struct fb_var_screeninfo *var, int con);
-static int Cyber_fb_set_var(struct fb_var_screeninfo *var, int con);
-static int Cyber_fb_get_cmap(struct fb_cmap *cmap, int kspc, int con);
-static int Cyber_fb_set_cmap(struct fb_cmap *cmap, int kspc, int con);
-static int Cyber_fb_pan_display(struct fb_var_screeninfo *var, int con);
-static int Cyber_fb_ioctl(struct inode *inode, struct file *file, u_int cmd,
-                          u_long arg, int con);
-
-
-   /*
-    *    Interface to the low level console driver
-    */
-
-struct fb_info *Cyber_fb_init(long *mem_start); /* Through amiga_fb_init() */
-static int Cyberfb_switch(int con);
-static int Cyberfb_updatevar(int con);
-static void Cyberfb_blank(int blank);
-static int Cyberfb_setcmap(struct fb_cmap *cmap, int con);
-
-
-   /*
-    *    Accelerated Functions used by the low level console driver
-    */
-
-void Cyber_WaitQueue(u_short fifo);
-void Cyber_WaitBlit(void);
-void Cyber_BitBLT(u_short curx, u_short cury, u_short destx, u_short desty,
-                  u_short width, u_short height, u_short mode);
-void Cyber_RectFill(u_short x, u_short y, u_short width, u_short height,
-                    u_short mode, u_short color);
-void Cyber_MoveCursor(u_short x, u_short y);
-
-
-   /*
-    *   Hardware Specific Routines
-    */
-
-static int Cyber_init(void);
-static int Cyber_encode_fix(struct fb_fix_screeninfo *fix,
-                          struct Cyber_fb_par *par);
-static int Cyber_decode_var(struct fb_var_screeninfo *var,
-                          struct Cyber_fb_par *par);
-static int Cyber_encode_var(struct fb_var_screeninfo *var,
-                          struct Cyber_fb_par *par);
-static int Cyber_getcolreg(u_int regno, u_int *red, u_int *green, u_int *blue,
-                         u_int *transp);
-static int Cyber_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
-                         u_int transp);
-static void Cyber_blank(int blank);
-
-
-   /*
-    *    Internal routines
-    */
-
-static void Cyber_fb_get_par(struct Cyber_fb_par *par);
-static void Cyber_fb_set_par(struct Cyber_fb_par *par);
-static int do_fb_set_var(struct fb_var_screeninfo *var, int isactive);
-static struct fb_cmap *get_default_colormap(int bpp);
-static int do_fb_get_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
-                          int kspc);
-static int do_fb_set_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
-                          int kspc);
-static void do_install_cmap(int con);
-static void memcpy_fs(int fsfromto, void *to, void *from, int len);
-static void copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto);
-static int alloc_cmap(struct fb_cmap *cmap, int len, int transp);
-static void Cyber_fb_set_disp(int con);
-static int get_video_mode(const char *name);
-
-
-/* -------------------- Hardware specific routines -------------------------- */
-
-
-   /*
-    *    Initialization
-    *
-    *    Set the default video mode for this chipset. If a video mode was
-    *    specified on the command line, it will override the default mode.
-    */
-
-static int Cyber_init(void)
-{
-int i;
-char size;
-volatile u_long *CursorBase;
-unsigned long board_addr;
-struct ConfigDev *cd;
-
-if (Cyberfb_mode == -1)
-  {
-  if (Cyberfb_Cyber8)
-    Cyberfb_mode = CYBER8_DEFMODE;
-  else
-    Cyberfb_mode = CYBER16_DEFMODE;
-  }
-
-cd = zorro_get_board (CyberKey);
-zorro_config_board (CyberKey, 0);
-board_addr = (unsigned long)cd->cd_BoardAddr;
-
-for (i = 0; i < 256; i++)
-
-for (i = 0; i < 256; i++)
-  {
-  Cyber_colour_table [i][0] = i;
-  Cyber_colour_table [i][1] = i;
-  Cyber_colour_table [i][2] = i;
-  Cyber_colour_table [i][3] = 0;
-  }
-
-*memstart = (*memstart + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1);
-/* This includes the video memory as well as the S3 register set */
-CyberMem = kernel_map (board_addr + 0x01400000, 0x01000000,
-                       KERNELMAP_NOCACHE_SER, memstart);
-
-if (Cyberfb_Cyber8)
-  memset ((char*)CyberMem, 0, CYBER8_WIDTH * CYBER8_HEIGHT);
-else
-  memset ((char*)CyberMem, 0, CYBER16_WIDTH * CYBER16_HEIGHT);
-
-CyberRegs = (char*) (CyberMem + 0x00c00000);
-
-/* Disable hardware cursor */
-*(CyberRegs + S3_CRTC_ADR)  = S3_REG_LOCK2;
-*(CyberRegs + S3_CRTC_DATA) = 0xa0;
-*(CyberRegs + S3_CRTC_ADR)  = S3_HGC_MODE;
-*(CyberRegs + S3_CRTC_DATA) = 0x00;
-*(CyberRegs + S3_CRTC_ADR)  = S3_HWGC_DX;
-*(CyberRegs + S3_CRTC_DATA) = 0x00;
-*(CyberRegs + S3_CRTC_ADR)  = S3_HWGC_DY;
-*(CyberRegs + S3_CRTC_DATA) = 0x00;
-
-/* Set clipping rectangle to current screen size */
-*((u_short volatile *)(CyberRegs + 0xbee8)) = 0x1000;
-*((u_short volatile *)(CyberRegs + 0xbee8)) = 0x2000;
-if (Cyberfb_Cyber8)
-  {
-  *((u_short volatile *)(CyberRegs + 0xbee8)) = 0x3000 | (CYBER8_HEIGHT - 1);
-  *((u_short volatile *)(CyberRegs + 0xbee8)) = 0x4000 | (CYBER8_WIDTH - 1);
-  }
-else
-  {
-  *((u_short volatile *)(CyberRegs + 0xbee8)) = 0x3000 | (CYBER16_HEIGHT - 1);
-  *((u_short volatile *)(CyberRegs + 0xbee8)) = 0x4000 | (CYBER16_WIDTH - 1);
-  }
-
-/* Get memory size (if not 2MB it is 4MB) */
-*(CyberRegs + S3_CRTC_ADR) = S3_LAW_CTL;
-size = *(CyberRegs + S3_CRTC_DATA);
-if ((size & 0x03) == 0x02)
-  CyberSize = 0x00200000; /* 2 MB */
-else
-  CyberSize = 0x00400000; /* 4 MB */
-
-/* Initialize hardware cursor */
-CursorBase = (u_long *)((char *)(CyberMem) + CyberSize - 0x400);
-for (i=0; i < 8; i++)
-  {
-  *(CursorBase  +(i*4)) = 0xffffff00;
-  *(CursorBase+1+(i*4)) = 0xffff0000;
-  *(CursorBase+2+(i*4)) = 0xffff0000;
-  *(CursorBase+3+(i*4)) = 0xffff0000;
-  }
-for (i=8; i < 64; i++)
-  {
-  *(CursorBase  +(i*4)) = 0xffff0000;
-  *(CursorBase+1+(i*4)) = 0xffff0000;
-  *(CursorBase+2+(i*4)) = 0xffff0000;
-  *(CursorBase+3+(i*4)) = 0xffff0000;
-  }
-
-Cyber_setcolreg (255, 56, 100, 160, 0);
-Cyber_setcolreg (254, 0, 0, 0, 0);
-
-return (0);
-}
-
-
-   /*
-    *    This function should fill in the `fix' structure based on the
-    *    values in the `par' structure.
-    */
-
-static int Cyber_encode_fix(struct fb_fix_screeninfo *fix,
-                          struct Cyber_fb_par *par)
-{
-   int i;
-
-   strcpy(fix->id, Cyber_fb_name);
-   fix->smem_start = CyberMem;
-#if 0
-   fix->smem_len = CyberSize;
-#else
-   fix->smem_len = 0x01000000;
-#endif
-
-   fix->type = FB_TYPE_PACKED_PIXELS;
-   fix->type_aux = 0;
-   if (par->bpp == 8)
-      fix->visual = FB_VISUAL_PSEUDOCOLOR;
-   else
-      fix->visual = FB_VISUAL_DIRECTCOLOR;
-
-   fix->xpanstep = 0;
-   fix->ypanstep = 0;
-   fix->ywrapstep = 0;
-   fix->line_length = 0;
-
-   for (i = 0; i < arraysize(fix->reserved); i++)
-      fix->reserved[i] = 0;
-
-   return(0);
-}
-
-
-   /*
-    *    Get the video params out of `var'. If a value doesn't fit, round
-    *    it up, if it's too big, return -EINVAL.
-    */
-
-static int Cyber_decode_var(struct fb_var_screeninfo *var,
-                          struct Cyber_fb_par *par)
-{
-   if (Cyberfb_Cyber8) {
-      par->xres = CYBER8_WIDTH;
-      par->yres = CYBER8_HEIGHT;
-      par->bpp = 8;
-   } else {
-      par->xres = CYBER16_WIDTH;
-      par->yres = CYBER16_HEIGHT;
-      par->bpp = 16;
-   }
-   return(0);
-}
-
-
-   /*
-    *    Fill the `var' structure based on the values in `par' and maybe
-    *    other values read out of the hardware.
-    */
-
-static int Cyber_encode_var(struct fb_var_screeninfo *var,
-                          struct Cyber_fb_par *par)
-{
-   int i;
-
-   var->xres = par->xres;
-   var->yres = par->yres;
-   var->xres_virtual = par->xres;
-   var->yres_virtual = par->yres;
-   var->xoffset = 0;
-   var->yoffset = 0;
-
-   var->bits_per_pixel = par->bpp;
-   var->grayscale = 0;
-
-   if (par->bpp == 8) {
-      var->red.offset = 0;
-      var->red.length = 8;
-      var->red.msb_right = 0;
-      var->blue = var->green = var->red;
-   } else {
-      var->red.offset = 11;
-      var->red.length = 5;
-      var->red.msb_right = 0;
-      var->green.offset = 5;
-      var->green.length = 6;
-      var->green.msb_right = 0;
-      var->blue.offset = 0;
-      var->blue.length = 5;
-      var->blue.msb_right = 0;
-   }
-   var->transp.offset = 0;
-   var->transp.length = 0;
-   var->transp.msb_right = 0;
-
-   var->nonstd = 0;
-   var->activate = 0;
-
-   var->height = -1;
-   var->width = -1;
-   var->accel = FB_ACCEL_CYBERVISION;
-   var->vmode = FB_VMODE_NONINTERLACED;
-
-   /* Dummy values */
-
-   if (par->bpp == 8)
-      var->pixclock = CYBER8_PIXCLOCK;
-   else
-      var->pixclock = CYBER16_PIXCLOCK;
-   var->sync = 0;
-   var->left_margin = 64;
-   var->right_margin = 96;
-   var->upper_margin = 35;
-   var->lower_margin = 12;
-   var->hsync_len = 112;
-   var->vsync_len = 2;
-
-   for (i = 0; i < arraysize(var->reserved); i++)
-      var->reserved[i] = 0;
-
-   return(0);
-}
-
-
-   /*
-    *    Set a single color register. The values supplied are already
-    *    rounded down to the hardware's capabilities (according to the
-    *    entries in the var structure). Return != 0 for invalid regno.
-    */
-
-static int Cyber_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
-                         u_int transp)
-{
-if (regno > 255)
-  return (1);
-
-*(CyberRegs + 0x3c8) = (char)regno;
-Cyber_colour_table [regno][0] = red & 0xff;
-Cyber_colour_table [regno][1] = green & 0xff;
-Cyber_colour_table [regno][2] = blue & 0xff;
-Cyber_colour_table [regno][3] = transp;
-
-*(CyberRegs + 0x3c9) = (red & 0xff) >> 2;
-*(CyberRegs + 0x3c9) = (green & 0xff) >> 2;
-*(CyberRegs + 0x3c9) = (blue & 0xff) >> 2;
-
-return (0);
-}
-
-
-   /*
-    *    Read a single color register and split it into
-    *    colors/transparent. Return != 0 for invalid regno.
-    */
-
-static int Cyber_getcolreg(u_int regno, u_int *red, u_int *green, u_int *blue,
-                         u_int *transp)
-{
-if (regno >= 256)
-  return (1);
-*red    = Cyber_colour_table [regno][0];
-*green  = Cyber_colour_table [regno][1];
-*blue   = Cyber_colour_table [regno][2];
-*transp = Cyber_colour_table [regno][3];
-return (0);
-}
-
-
-   /*
-    *    (Un)Blank the screen
-    */
-
-void Cyber_blank(int blank)
-{
-int i;
-
-if (blank)
-  for (i = 0; i < 256; i++)
-    {
-    *(CyberRegs + 0x3c8) = i;
-    *(CyberRegs + 0x3c9) = 0;
-    *(CyberRegs + 0x3c9) = 0;
-    *(CyberRegs + 0x3c9) = 0;
-    }
-else
-  for (i = 0; i < 256; i++)
-    {
-    *(CyberRegs + 0x3c8) = i;
-    *(CyberRegs + 0x3c9) = Cyber_colour_table [i][0] >> 2;
-    *(CyberRegs + 0x3c9) = Cyber_colour_table [i][1] >> 2;
-    *(CyberRegs + 0x3c9) = Cyber_colour_table [i][2] >> 2;
-    }
-}
-
-
-/**************************************************************
- * We are waiting for "fifo" FIFO-slots empty
- */
-void Cyber_WaitQueue (u_short fifo)
-{
-u_short status;
-
-do
-  {
-  status = *((u_short volatile *)(CyberRegs + S3_GP_STAT));
-  }
-while (status & fifo);
-}
-
-/**************************************************************
- * We are waiting for Hardware (Graphics Engine) not busy
- */
-void Cyber_WaitBlit (void)
-{
-u_short status;
-
-do
-  {
-  status = *((u_short volatile *)(CyberRegs + S3_GP_STAT));
-  }
-while (status & S3_HDW_BUSY);
-}
-
-/**************************************************************
- * BitBLT - Through the Plane
- */
-void Cyber_BitBLT (u_short curx, u_short cury, u_short destx, u_short desty,
-                   u_short width, u_short height, u_short mode)
-{
-u_short blitcmd = S3_BITBLT;
-
-/* Set drawing direction */
-/* -Y, X maj, -X (default) */
-if (curx > destx)
-  blitcmd |= 0x0020;  /* Drawing direction +X */
-else
-  {
-  curx  += (width - 1);
-  destx += (width - 1);
-  }
-
-if (cury > desty)
-  blitcmd |= 0x0080;  /* Drawing direction +Y */
-else
-  {
-  cury  += (height - 1);
-  desty += (height - 1);
-  }
-
-Cyber_WaitQueue (0x8000);
-
-*((u_short volatile *)(CyberRegs + S3_PIXEL_CNTL)) = 0xa000;
-*((u_short volatile *)(CyberRegs + S3_FRGD_MIX)) = (0x0060 | mode);
-
-*((u_short volatile *)(CyberRegs + S3_CUR_X)) = curx;
-*((u_short volatile *)(CyberRegs + S3_CUR_Y)) = cury;
-
-*((u_short volatile *)(CyberRegs + S3_DESTX_DIASTP)) = destx;
-*((u_short volatile *)(CyberRegs + S3_DESTY_AXSTP)) = desty;
-
-*((u_short volatile *)(CyberRegs + S3_MIN_AXIS_PCNT)) = height - 1;
-*((u_short volatile *)(CyberRegs + S3_MAJ_AXIS_PCNT)) = width  - 1;
-
-*((u_short volatile *)(CyberRegs + S3_CMD)) = blitcmd;
-}
-
-/**************************************************************
- * Rectangle Fill Solid
- */
-void Cyber_RectFill (u_short x, u_short y, u_short width, u_short height,
-                     u_short mode, u_short color)
-{
-u_short blitcmd = S3_FILLEDRECT;
-
-Cyber_WaitQueue (0x8000);
-
-*((u_short volatile *)(CyberRegs + S3_PIXEL_CNTL)) = 0xa000;
-*((u_short volatile *)(CyberRegs + S3_FRGD_MIX)) = (0x0020 | mode);
-
-*((u_short volatile *)(CyberRegs + S3_MULT_MISC)) = 0xe000;
-*((u_short volatile *)(CyberRegs + S3_FRGD_COLOR)) = color;
-
-*((u_short volatile *)(CyberRegs + S3_CUR_X)) = x;
-*((u_short volatile *)(CyberRegs + S3_CUR_Y)) = y;
-
-*((u_short volatile *)(CyberRegs + S3_MIN_AXIS_PCNT)) = height - 1;
-*((u_short volatile *)(CyberRegs + S3_MAJ_AXIS_PCNT)) = width  - 1;
-
-*((u_short volatile *)(CyberRegs + S3_CMD)) = blitcmd;
-}
-
-
-/**************************************************************
- * Move cursor to x, y
- */
-void Cyber_MoveCursor (u_short x, u_short y)
-{
-*(CyberRegs + S3_CRTC_ADR)  = 0x39;
-*(CyberRegs + S3_CRTC_DATA) = 0xa0;
-
-*(CyberRegs + S3_CRTC_ADR)  = S3_HWGC_ORGX_H;
-*(CyberRegs + S3_CRTC_DATA) = (char)((x & 0x0700) >> 8);
-*(CyberRegs + S3_CRTC_ADR)  = S3_HWGC_ORGX_L;
-*(CyberRegs + S3_CRTC_DATA) = (char)(x & 0x00ff);
-
-*(CyberRegs + S3_CRTC_ADR)  = S3_HWGC_ORGY_H;
-*(CyberRegs + S3_CRTC_DATA) = (char)((y & 0x0700) >> 8);
-*(CyberRegs + S3_CRTC_ADR)  = S3_HWGC_ORGY_L;
-*(CyberRegs + S3_CRTC_DATA) = (char)(y & 0x00ff);
-}
-
-
-/* -------------------- Interfaces to hardware functions -------------------- */
-
-
-static struct fb_hwswitch Cyber_switch = {
-   Cyber_init, Cyber_encode_fix, Cyber_decode_var, Cyber_encode_var,
-   Cyber_getcolreg, Cyber_setcolreg, Cyber_blank
-};
-
-
-/* -------------------- Generic routines ------------------------------------ */
-
-
-   /*
-    *    Fill the hardware's `par' structure.
-    */
-
-static void Cyber_fb_get_par(struct Cyber_fb_par *par)
-{
-   if (current_par_valid)
-      *par = current_par;
-   else
-      fbhw->decode_var(&Cyber_fb_predefined[Cyberfb_mode], par);
-}
-
-
-static void Cyber_fb_set_par(struct Cyber_fb_par *par)
-{
-   current_par = *par;
-   current_par_valid = 1;
-}
-
-
-static int do_fb_set_var(struct fb_var_screeninfo *var, int isactive)
-{
-   int err, activate;
-   struct Cyber_fb_par par;
-
-   if ((err = fbhw->decode_var(var, &par)))
-      return(err);
-   activate = var->activate;
-   if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW && isactive)
-      Cyber_fb_set_par(&par);
-   fbhw->encode_var(var, &par);
-   var->activate = activate;
-   return(0);
-}
-
-
-   /*
-    *    Default Colormaps
-    */
-
-static u_short red16[] =
-   { 0xc000, 0x0000, 0x0000, 0x0000, 0xc000, 0xc000, 0xc000, 0x0000,
-     0x8000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff};
-static u_short green16[] =
-   { 0xc000, 0x0000, 0xc000, 0xc000, 0x0000, 0x0000, 0xc000, 0x0000,
-     0x8000, 0x0000, 0xffff, 0xffff, 0x0000, 0x0000, 0xffff, 0xffff};
-static u_short blue16[] =
-   { 0xc000, 0x0000, 0x0000, 0xc000, 0x0000, 0xc000, 0x0000, 0x0000,
-     0x8000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff};
-
-
-static struct fb_cmap default_16_colors =
-   { 0, 16, red16, green16, blue16, NULL };
-
-
-static struct fb_cmap *get_default_colormap(int bpp)
-{
-   return(&default_16_colors);
-}
-
-
-#define CNVT_TOHW(val,width)     ((((val)<<(width))+0x7fff-(val))>>16)
-#define CNVT_FROMHW(val,width)   (((width) ? ((((val)<<16)-(val)) / \
-                                              ((1<<(width))-1)) : 0))
-
-static int do_fb_get_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
-                          int kspc)
-{
-   int i, start;
-   u_short *red, *green, *blue, *transp;
-   u_int hred, hgreen, hblue, htransp;
-
-   red = cmap->red;
-   green = cmap->green;
-   blue = cmap->blue;
-   transp = cmap->transp;
-   start = cmap->start;
-   if (start < 0)
-      return(-EINVAL);
-   for (i = 0; i < cmap->len; i++) {
-      if (fbhw->getcolreg(start++, &hred, &hgreen, &hblue, &htransp))
-         return(0);
-      hred = CNVT_FROMHW(hred, var->red.length);
-      hgreen = CNVT_FROMHW(hgreen, var->green.length);
-      hblue = CNVT_FROMHW(hblue, var->blue.length);
-      htransp = CNVT_FROMHW(htransp, var->transp.length);
-      if (kspc) {
-         *red = hred;
-         *green = hgreen;
-         *blue = hblue;
-         if (transp)
-            *transp = htransp;
-      } else {
-         put_user(hred, red);
-         put_user(hgreen, green);
-         put_user(hblue, blue);
-         if (transp)
-            put_user(htransp, transp);
-      }
-      red++;
-      green++;
-      blue++;
-      if (transp)
-         transp++;
-   }
-   return(0);
-}
-
-
-static int do_fb_set_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
-                          int kspc)
-{
-   int i, start;
-   u_short *red, *green, *blue, *transp;
-   u_int hred, hgreen, hblue, htransp;
-
-   red = cmap->red;
-   green = cmap->green;
-   blue = cmap->blue;
-   transp = cmap->transp;
-   start = cmap->start;
-
-   if (start < 0)
-      return(-EINVAL);
-   for (i = 0; i < cmap->len; i++) {
-      if (kspc) {
-         hred = *red;
-         hgreen = *green;
-         hblue = *blue;
-         htransp = transp ? *transp : 0;
-      } else {
-         get_user(hred, red);
-         get_user(hgreen, green);
-         get_user(hblue, blue);
-	 if (transp)
-		 get_user(htransp, transp);
-	 else
-		 htransp = 0;
-      }
-      hred = CNVT_TOHW(hred, var->red.length);
-      hgreen = CNVT_TOHW(hgreen, var->green.length);
-      hblue = CNVT_TOHW(hblue, var->blue.length);
-      htransp = CNVT_TOHW(htransp, var->transp.length);
-      red++;
-      green++;
-      blue++;
-      if (transp)
-         transp++;
-      if (fbhw->setcolreg(start++, hred, hgreen, hblue, htransp))
-         return(0);
-   }
-   return(0);
-}
-
-
-static void do_install_cmap(int con)
-{
-   if (con != currcon)
-      return;
-   if (disp[con].cmap.len)
-      do_fb_set_cmap(&disp[con].cmap, &disp[con].var, 1);
-   else
-      do_fb_set_cmap(get_default_colormap(disp[con].var.bits_per_pixel),
-                                          &disp[con].var, 1);
-}
-
-
-static void memcpy_fs(int fsfromto, void *to, void *from, int len)
-{
-   switch (fsfromto) {
-      case 0:
-         memcpy(to, from, len);
-         return;
-      case 1:
-         copy_from_user(to, from, len);
-         return;
-      case 2:
-         copy_to_user(to, from, len);
-         return;
-   }
-}
-
-
-static void copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto)
-{
-   int size;
-   int tooff = 0, fromoff = 0;
-
-   if (to->start > from->start)
-      fromoff = to->start-from->start;
-   else
-      tooff = from->start-to->start;
-   size = to->len-tooff;
-   if (size > from->len-fromoff)
-      size = from->len-fromoff;
-   if (size < 0)
-      return;
-   size *= sizeof(u_short);
-   memcpy_fs(fsfromto, to->red+tooff, from->red+fromoff, size);
-   memcpy_fs(fsfromto, to->green+tooff, from->green+fromoff, size);
-   memcpy_fs(fsfromto, to->blue+tooff, from->blue+fromoff, size);
-   if (from->transp && to->transp)
-      memcpy_fs(fsfromto, to->transp+tooff, from->transp+fromoff, size);
-}
-
-
-static int alloc_cmap(struct fb_cmap *cmap, int len, int transp)
-{
-   int size = len*sizeof(u_short);
-
-   if (cmap->len != len) {
-      if (cmap->red)
-         kfree(cmap->red);
-      if (cmap->green)
-         kfree(cmap->green);
-      if (cmap->blue)
-         kfree(cmap->blue);
-      if (cmap->transp)
-         kfree(cmap->transp);
-      cmap->red = cmap->green = cmap->blue = cmap->transp = NULL;
-      cmap->len = 0;
-      if (!len)
-         return(0);
-      if (!(cmap->red = kmalloc(size, GFP_ATOMIC)))
-         return(-1);
-      if (!(cmap->green = kmalloc(size, GFP_ATOMIC)))
-         return(-1);
-      if (!(cmap->blue = kmalloc(size, GFP_ATOMIC)))
-         return(-1);
-      if (transp) {
-         if (!(cmap->transp = kmalloc(size, GFP_ATOMIC)))
-            return(-1);
-      } else
-         cmap->transp = NULL;
-   }
-   cmap->start = 0;
-   cmap->len = len;
-   copy_cmap(get_default_colormap(len), cmap, 0);
-   return(0);
-}
-
-
-   /*
-    *    Get the Fixed Part of the Display
-    */
-
-static int Cyber_fb_get_fix(struct fb_fix_screeninfo *fix, int con)
-{
-   struct Cyber_fb_par par;
-   int error = 0;
-
-   if (con == -1)
-      Cyber_fb_get_par(&par);
-   else
-      error = fbhw->decode_var(&disp[con].var, &par);
-   return(error ? error : fbhw->encode_fix(fix, &par));
-}
-
-
-   /*
-    *    Get the User Defined Part of the Display
-    */
-
-static int Cyber_fb_get_var(struct fb_var_screeninfo *var, int con)
-{
-   struct Cyber_fb_par par;
-   int error = 0;
-
-   if (con == -1) {
-      Cyber_fb_get_par(&par);
-      error = fbhw->encode_var(var, &par);
-   } else
-      *var = disp[con].var;
-   return(error);
-}
-
-
-static void Cyber_fb_set_disp(int con)
-{
-   struct fb_fix_screeninfo fix;
-
-   Cyber_fb_get_fix(&fix, con);
-   if (con == -1)
-      con = 0;
-   disp[con].screen_base = (u_char *)fix.smem_start;
-   disp[con].visual = fix.visual;
-   disp[con].type = fix.type;
-   disp[con].type_aux = fix.type_aux;
-   disp[con].ypanstep = fix.ypanstep;
-   disp[con].ywrapstep = fix.ywrapstep;
-   disp[con].can_soft_blank = 1;
-   disp[con].inverse = Cyberfb_inverse;
-}
-
-
-   /*
-    *    Set the User Defined Part of the Display
-    */
-
-static int Cyber_fb_set_var(struct fb_var_screeninfo *var, int con)
-{
-   int err, oldxres, oldyres, oldvxres, oldvyres, oldbpp;
-
-   if ((err = do_fb_set_var(var, con == currcon)))
-      return(err);
-   if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) {
-      oldxres = disp[con].var.xres;
-      oldyres = disp[con].var.yres;
-      oldvxres = disp[con].var.xres_virtual;
-      oldvyres = disp[con].var.yres_virtual;
-      oldbpp = disp[con].var.bits_per_pixel;
-      disp[con].var = *var;
-      if (oldxres != var->xres || oldyres != var->yres ||
-          oldvxres != var->xres_virtual || oldvyres != var->yres_virtual ||
-          oldbpp != var->bits_per_pixel) {
-         Cyber_fb_set_disp(con);
-         (*fb_info.changevar)(con);
-         alloc_cmap(&disp[con].cmap, 0, 0);
-         do_install_cmap(con);
-      }
-   }
-   var->activate = 0;
-   return(0);
-}
-
-
-   /*
-    *    Get the Colormap
-    */
-
-static int Cyber_fb_get_cmap(struct fb_cmap *cmap, int kspc, int con)
-{
-   if (con == currcon) /* current console? */
-      return(do_fb_get_cmap(cmap, &disp[con].var, kspc));
-   else if (disp[con].cmap.len) /* non default colormap? */
-      copy_cmap(&disp[con].cmap, cmap, kspc ? 0 : 2);
-   else
-      copy_cmap(get_default_colormap(disp[con].var.bits_per_pixel), cmap,
-                kspc ? 0 : 2);
-   return(0);
-}
-
-
-   /*
-    *    Set the Colormap
-    */
-
-static int Cyber_fb_set_cmap(struct fb_cmap *cmap, int kspc, int con)
-{
-   int err;
-
-   if (!disp[con].cmap.len) {       /* no colormap allocated? */
-      if ((err = alloc_cmap(&disp[con].cmap, 1<<disp[con].var.bits_per_pixel,
-                            0)))
-         return(err);
-   }
-   if (con == currcon)              /* current console? */
-      return(do_fb_set_cmap(cmap, &disp[con].var, kspc));
-   else
-      copy_cmap(cmap, &disp[con].cmap, kspc ? 0 : 1);
-   return(0);
-}
-
-
-   /*
-    *    Pan or Wrap the Display
-    *
-    *    This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
-    */
-
-static int Cyber_fb_pan_display(struct fb_var_screeninfo *var, int con)
-{
-   return(-EINVAL);
-}
-
-
-   /*
-    *    Cybervision Frame Buffer Specific ioctls
-    */
-
-static int Cyber_fb_ioctl(struct inode *inode, struct file *file,
-                          u_int cmd, u_long arg, int con)
-{
-   return(-EINVAL);
-}
-
-
-static struct fb_ops Cyber_fb_ops = {
-   Cyber_fb_get_fix, Cyber_fb_get_var, Cyber_fb_set_var, Cyber_fb_get_cmap,
-   Cyber_fb_set_cmap, Cyber_fb_pan_display, Cyber_fb_ioctl
-};
-
-
-int Cyber_probe(void)
-{
-   CyberKey = zorro_find(MANUF_PHASE5, PROD_CYBERVISION, 0, 0);
-   return(CyberKey);
-}
-
-
-void Cyber_video_setup(char *options, int *ints)
-{
-   char *this_opt;
-   int i;
-
-   fb_info.fontname[0] = '\0';
-
-   if (!options || !*options)
-      return;
-
-   for (this_opt = strtok(options, ","); this_opt; this_opt = strtok(NULL, ","))
-      if (!strcmp(this_opt, "inverse")) {
-         Cyberfb_inverse = 1;
-         for (i = 0; i < 16; i++) {
-            red16[i] = ~red16[i];
-            green16[i] = ~green16[i];
-            blue16[i] = ~blue16[i];
-         }
-      } else if (!strncmp(this_opt, "font:", 5))
-         strcpy(fb_info.fontname, this_opt+5);
-      else if (!strcmp (this_opt, "cyber8"))
-         Cyberfb_Cyber8 = 1;
-      else if (!strcmp (this_opt, "cyber16"))
-         Cyberfb_Cyber16 = 1;
-      else
-         Cyberfb_mode = get_video_mode(this_opt);
-}
-
-
-   /*
-    *    Initialization
-    */
-
-__initfunc(struct fb_info *Cyber_fb_init(long *mem_start))
-{
-   int err;
-   struct Cyber_fb_par par;
-
-   memstart = mem_start;
-
-   fbhw = &Cyber_switch;
-
-   err = register_framebuffer(Cyber_fb_name, &node, &Cyber_fb_ops,
-                              NUM_TOTAL_MODES, Cyber_fb_predefined);
-   if (err < 0)
-      panic("Cannot register frame buffer\n");
-
-   fbhw->init();
-   fbhw->decode_var(&Cyber_fb_predefined[Cyberfb_mode], &par);
-   fbhw->encode_var(&Cyber_fb_predefined[0], &par);
-
-   strcpy(fb_info.modename, Cyber_fb_name);
-   fb_info.disp = disp;
-   fb_info.switch_con = &Cyberfb_switch;
-   fb_info.updatevar = &Cyberfb_updatevar;
-   fb_info.blank = &Cyberfb_blank;
-   fb_info.setcmap = &Cyberfb_setcmap;
-
-   do_fb_set_var(&Cyber_fb_predefined[0], 1);
-   Cyber_fb_get_var(&disp[0].var, -1);
-   Cyber_fb_set_disp(-1);
-   do_install_cmap(0);
-   return(&fb_info);
-}
-
-
-static int Cyberfb_switch(int con)
-{
-   /* Do we have to save the colormap? */
-   if (disp[currcon].cmap.len)
-      do_fb_get_cmap(&disp[currcon].cmap, &disp[currcon].var, 1);
-
-   do_fb_set_var(&disp[con].var, 1);
-   currcon = con;
-   /* Install new colormap */
-   do_install_cmap(con);
-   return(0);
-}
-
-
-   /*
-    *    Update the `var' structure (called by fbcon.c)
-    *
-    *    This call looks only at yoffset and the FB_VMODE_YWRAP flag in `var'.
-    *    Since it's called by a kernel driver, no range checking is done.
-    */
-
-static int Cyberfb_updatevar(int con)
-{
-   return(0);
-}
-
-
-   /*
-    *    Blank the display.
-    */
-
-static void Cyberfb_blank(int blank)
-{
-   fbhw->blank(blank);
-}
-
-
-   /*
-    *    Set the colormap
-    */
-
-static int Cyberfb_setcmap(struct fb_cmap *cmap, int con)
-{
-   return(Cyber_fb_set_cmap(cmap, 1, con));
-}
-
-
-   /*
-    *    Get a Video Mode
-    */
-
-static int get_video_mode(const char *name)
-{
-   int i;
-
-   for (i = 1; i < NUM_PREDEF_MODES; i++)
-      if (!strcmp(name, Cyber_fb_modenames[i]))
-         return(i);
-   return(0);
-}
--- linux-2.1.42/arch/m68k/amiga/retz3fb.c.orig	Sun Jun  1 21:56:20 1997
+++ linux-2.1.42/arch/m68k/amiga/retz3fb.c	Mon Jun  9 23:03:04 1997
@@ -1,1754 +0,0 @@
-/*
- * Linux/arch/m68k/amiga/retz3fb.c -- Low level implementation of the
- *                                    RetinaZ3 frame buffer device
- *
- *    Copyright (C) 1997 Jes Sorensen
- *
- * This file is based on the CyberVision64 frame buffer device and
- * the generic Cirrus Logic driver.
- *
- * cyberfb.c: Copyright (C) 1996 Martin Apel,
- *                               Geert Uytterhoeven
- * clgen.c:   Copyright (C) 1996 Frank Neumann
- *
- * History:
- *   - 22 Jan 97: Initial work
- *   - 14 Feb 97: Screen initialization works somewhat, still only
- *                8-bit packed pixel is supported.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file COPYING in the main directory of this archive
- * for more details.
- */
-
-
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <linux/tty.h>
-#include <linux/malloc.h>
-#include <linux/delay.h>
-#include <linux/fb.h>
-#include <linux/zorro.h>
-#include <linux/init.h>
-
-#include <asm/uaccess.h>
-#include <asm/system.h>
-#include <asm/irq.h>
-#include <asm/pgtable.h>
-
-#include "retz3fb.h"
-
-/* #define DEBUG if(1) */
-#define DEBUG if(0)
-
-/*
- * Reserve space for one pattern line.
- *
- * For the time being we only support 4MB boards!
- */
-
-#define PAT_MEM_SIZE 16*3
-#define PAT_MEM_OFF  (4*1024*1024 - PAT_MEM_SIZE)
-
-#define arraysize(x)    (sizeof(x)/sizeof(*(x)))
-
-struct retz3_fb_par {
-	int xres;
-	int yres;
-	int xres_vir;
-	int yres_vir;
-	int xoffset;
-	int yoffset;
-	int bpp;
-
-	struct fb_bitfield red;
-	struct fb_bitfield green;
-	struct fb_bitfield blue;
-	struct fb_bitfield transp;
-
-	int pixclock;
-	int left_margin;	/* time from sync to picture	*/
-	int right_margin;	/* time from picture to sync	*/
-	int upper_margin;	/* time from sync to picture	*/
-	int lower_margin;
-	int hsync_len;	/* length of horizontal sync	*/
-	int vsync_len;	/* length of vertical sync	*/
-	int vmode;
-};
-
-struct display_data {
-	long h_total;		/* Horizontal Total */
-	long h_sstart;		/* Horizontal Sync Start */
-	long h_sstop;		/* Horizontal Sync Stop */
-	long h_bstart;		/* Horizontal Blank Start */
-	long h_bstop;		/* Horizontal Blank Stop */
-	long h_dispend;		/* Horizontal Display End */
-	long v_total;		/* Vertical Total */
-	long v_sstart;		/* Vertical Sync Start */
-	long v_sstop;		/* Vertical Sync Stop */
-	long v_bstart;		/* Vertical Blank Start */
-	long v_bstop;		/* Vertical Blank Stop */
-	long v_dispend;		/* Horizontal Display End */
-};
-
-static struct retz3_fb_par current_par;
-
-static int current_par_valid = 0;
-static int currcon = 0;
-
-static struct display disp[MAX_NR_CONSOLES];
-static struct fb_info fb_info;
-
-static int node;        /* node of the /dev/fb?current file */
-
-
-/*
- *    Switch for Chipset Independency
- */
-
-static struct fb_hwswitch {
-
-   /* Initialisation */
-
-   int (*init)(void);
-
-   /* Display Control */
-
-   int (*encode_fix)(struct fb_fix_screeninfo *fix, struct retz3_fb_par *par);
-   int (*decode_var)(struct fb_var_screeninfo *var, struct retz3_fb_par *par);
-   int (*encode_var)(struct fb_var_screeninfo *var, struct retz3_fb_par *par);
-   int (*getcolreg)(unsigned int regno, unsigned int *red, unsigned
-		    int *green, unsigned int *blue, unsigned int *transp);
-   int (*setcolreg)(unsigned int regno, unsigned int red, unsigned int
-		    green, unsigned int blue, unsigned int transp);
-   void (*blank)(int blank);
-} *fbhw;
-
-
-/*
- *    Frame Buffer Name
- */
-
-static char retz3_fb_name[16] = "RetinaZ3";
-
-
-static int z3_key = 0;
-static unsigned char retz3_color_table [256][4];
-static unsigned long z3_mem;
-static unsigned long z3_fbmem;
-static unsigned long z3_size;
-static volatile unsigned char *z3_regs;
-
-static long *memstart;
-
-
-/*
- *    Predefined Video Mode Names
- */
-
-static char *retz3_fb_modenames[] = {
-
-	/*
-	 *    Autodetect (Default) Video Mode
-	 */
-
-	"default",
-
-	/*
-	 *    Predefined Video Modes
-	 */
-
-	"640x480",		/* RetinaZ3 8 bpp */
-	"800x600",		/* RetinaZ3 8 bpp */
-	"1024x768i",
-	"640x480-16",		/* RetinaZ3 16 bpp */
-	"640x480-24",		/* RetinaZ3 24 bpp */
-	
-	/*
-	 *    Dummy Video Modes
-	 */
-
-	"dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy",
-	"dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy",
-	"dummy", "dummy", "dummy", "dummy", "dummy", "dummy",
-
-	/*
-	 *    User Defined Video Modes
-	 *
-	 *    This doesn't work yet!!
-	 */
-
-	"user0", "user1", "user2", "user3",
-	"user4", "user5", "user6", "user7"
-};
-
-/*
- * A small info on how to convert XFree86 timing values into fb
- * timings - by Frank Neumann:
- *
-An XFree86 mode line consists of the following fields:
- "800x600"     50      800  856  976 1040    600  637  643  666
- < name >     DCF       HR  SH1  SH2  HFL     VR  SV1  SV2  VFL
-
-The fields in the fb_var_screeninfo structure are:
-        unsigned long pixclock;         * pixel clock in ps (pico seconds) *
-        unsigned long left_margin;      * time from sync to picture    *
-        unsigned long right_margin;     * time from picture to sync    *
-        unsigned long upper_margin;     * time from sync to picture    *
-        unsigned long lower_margin;
-        unsigned long hsync_len;        * length of horizontal sync    *
-        unsigned long vsync_len;        * length of vertical sync      *
-
-1) Pixelclock:
-   xfree: in MHz
-   fb: In Picoseconds (ps)
-
-   pixclock = 1000000 / DCF
-
-2) horizontal timings:
-   left_margin = HFL - SH2
-   right_margin = SH1 - HR
-   hsync_len = SH2 - SH1
-
-3) vertical timings:
-   upper_margin = VFL - SV2
-   lower_margin = SV1 - VR
-   vsync_len = SV2 - SV1
-
-Good examples for VESA timings can be found in the XFree86 source tree,
-under "programs/Xserver/hw/xfree86/doc/modeDB.txt".
-*/
-
-/*
- *    Predefined Video Mode Definitions
- */
-
-static struct fb_var_screeninfo retz3_fb_predefined[] = {
-
-   /*
-    *    Autodetect (Default) Video Mode
-    */
-
-   { 0, },
-
-   /*
-    *    Predefined Video Modes
-    */
-
-   /*
-    * NB: it is very important to adjust the pixel-clock to the color-depth.
-    */
-
-   {
-	   640, 480, 640, 480, 0, 0, 8, 0,
-	   {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-	   0, 0, -1, -1, FB_ACCEL_RETINAZ3, 38461, 28, 32, 12, 10, 96, 2,
-	   FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
-   },
-   /*
-    ModeLine "800x600" 36 800 824 896 1024 600 601 603 625
-             < name > DCF HR  SH1 SH2  HFL VR  SV1 SV2 VFL
-    */
-   {
-	   /* 800 x 600, 8 bpp */
-	   800, 600, 800, 600, 0, 0, 8, 0,
-	   {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-	   0, 0, -1, -1, FB_ACCEL_RETINAZ3, 27778, 64, 24, 22, 1, 120, 2,
-	   FB_SYNC_COMP_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
-   },
-   /*
-    ModeLine "1024x768i" 45 1024 1064 1224 1264 768 777 785 817 interlace
-              < name >   DCF HR  SH1  SH2  HFL  VR  SV1 SV2 VFL
-    */
-   {
-	   /* 1024 x 768, 8 bpp, interlaced */
-	   1024, 768, 1024, 768, 0, 0, 8, 0,
-	   {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
-	   0, 0, -1, -1, FB_ACCEL_RETINAZ3, 22222, 40, 40, 32, 9, 160, 8,
-	   FB_SYNC_COMP_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_INTERLACED
-   },
-   {
-	   640, 480, 640, 480, 0, 0, 16, 0,
-	   {11, 5, 0}, {5, 6, 0}, {0, 5, 0}, {0, 0, 0},
-	   0, 0, -1, -1, FB_ACCEL_RETINAZ3, 38461/2, 28, 32, 12, 10, 96, 2,
-	   FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
-   },
-   {
-	   640, 480, 640, 480, 0, 0, 24, 0,
-	   {8, 8, 8}, {8, 8, 8}, {8, 8, 8}, {0, 0, 0}, 
-	   0, 0, -1, -1, FB_ACCEL_RETINAZ3, 38461/3, 28, 32, 12, 10, 96, 2,
-	   FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
-   },
-
-   /*
-    *    Dummy Video Modes
-    */
-
-   { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, },
-   { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, },
-   { 0, }, { 0, },
-
-   /*
-    *    User Defined Video Modes
-    */
-
-   { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }
-};
-
-
-#define NUM_TOTAL_MODES    arraysize(retz3_fb_predefined)
-#define NUM_PREDEF_MODES   (5)
-
-
-static int z3fb_inverse = 0;
-static int z3fb_mode = 0;
-
-
-/*
- *    Interface used by the world
- */
-
-int retz3_probe(void);
-void retz3_video_setup(char *options, int *ints);
-
-static int retz3_fb_get_fix(struct fb_fix_screeninfo *fix, int con);
-static int retz3_fb_get_var(struct fb_var_screeninfo *var, int con);
-static int retz3_fb_set_var(struct fb_var_screeninfo *var, int con);
-static int retz3_fb_get_cmap(struct fb_cmap *cmap, int kspc, int con);
-static int retz3_fb_set_cmap(struct fb_cmap *cmap, int kspc, int con);
-static int retz3_fb_pan_display(struct fb_var_screeninfo *var, int con);
-static int retz3_fb_ioctl(struct inode *inode, struct file *file,
-			  unsigned int cmd, unsigned long arg, int con);
-
-
-/*
- *    Interface to the low level console driver
- */
-
-struct fb_info *retz3_fb_init(long *mem_start); /* Through amiga_fb_init() */
-static int z3fb_switch(int con);
-static int z3fb_updatevar(int con);
-static void z3fb_blank(int blank);
-static int z3fb_setcmap(struct fb_cmap *cmap, int con);
-
-
-/*
- *    Accelerated Functions used by the low level console driver
- */
-
-void retz3_bitblt(struct fb_var_screeninfo *scr,
-		  unsigned short curx, unsigned short cury, unsigned
-		  short destx, unsigned short desty, unsigned short
-		  width, unsigned short height, unsigned short cmd,
-		  unsigned short mask);
-void retz3_fill(unsigned short x, unsigned short y, unsigned short
-		width, unsigned short height, unsigned short mode,
-		unsigned short color);
-
-/*
- *   Hardware Specific Routines
- */
-
-static int retz3_init(void);
-static int retz3_encode_fix(struct fb_fix_screeninfo *fix,
-                          struct retz3_fb_par *par);
-static int retz3_decode_var(struct fb_var_screeninfo *var,
-                          struct retz3_fb_par *par);
-static int retz3_encode_var(struct fb_var_screeninfo *var,
-                          struct retz3_fb_par *par);
-static int retz3_getcolreg(unsigned int regno, unsigned int *red,
-			   unsigned int *green, unsigned int *blue,
-			   unsigned int *transp);
-static int retz3_setcolreg(unsigned int regno, unsigned int red,
-			   unsigned int green, unsigned int blue,
-			   unsigned int transp);
-static void retz3_blank(int blank);
-
-
-/*
- *    Internal routines
- */
-
-static void retz3_fb_get_par(struct retz3_fb_par *par);
-static void retz3_fb_set_par(struct retz3_fb_par *par);
-static int do_fb_set_var(struct fb_var_screeninfo *var, int isactive);
-static struct fb_cmap *get_default_colormap(int bpp);
-static int do_fb_get_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
-                          int kspc);
-static int do_fb_set_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
-                          int kspc);
-static void do_install_cmap(int con);
-static void memcpy_fs(int fsfromto, void *to, void *from, int len);
-static void copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto);
-static int alloc_cmap(struct fb_cmap *cmap, int len, int transp);
-static void retz3_fb_set_disp(int con);
-static int get_video_mode(const char *name);
-
-
-/* -------------------- Hardware specific routines -------------------------- */
-
-static unsigned short find_fq(unsigned int freq)
-{
-	unsigned long f;
-	long tmp;
-	long prev = 0x7fffffff;
-	long n2, n1 = 3;
-	unsigned long m;
-	unsigned short res = 0;
-
-	if (freq <= 31250000)
-		n2 = 3;
-	else if (freq <= 62500000)
-		n2 = 2;
-	else if (freq <= 125000000)
-		n2 = 1;
-	else if (freq <= 250000000)
-		n2 = 0;
-	else
-		return(0);
-
-
-	do {
-		f = freq >> (10 - n2);
-
-		m = (f * n1) / (14318180/1024);
-
-		if (m > 129)
-			break;
-
-		tmp =  (((m * 14318180) >> n2) / n1) - freq;
-		if (tmp < 0)
-			tmp = -tmp;
-
-		if (tmp < prev) {
-			prev = tmp;
-			res = (((n2 << 5) | (n1-2)) << 8) | (m-2);
-		}
-
-	} while ( (++n1) <= 21);
-
-	return res;
-}
-
-
-static int retz3_set_video(struct fb_var_screeninfo *var,
-			   struct retz3_fb_par *par)
-{
-	float freq_f;
-	long freq;
-
-	int xres, hfront, hsync, hback;
-	int yres, vfront, vsync, vback;
-	unsigned char tmp;
-	unsigned short best_freq;
-	struct display_data data;
-
-	short clocksel = 0; /* Apparantly this is always zero */
-
-	int bpp = var->bits_per_pixel;
-
-	/*
-	 * XXX
-	 */
-	if (bpp == 24)
-		return 0;
-
-	if ((bpp != 8) && (bpp != 16) && (bpp != 24))
-		return -EFAULT;
-
-	par->xoffset = 0;
-	par->yoffset = 0;
-
-	xres   = var->xres * bpp / 4;
-	hfront = var->right_margin * bpp / 4;
-	hsync  = var->hsync_len * bpp / 4;
-	hback  = var->left_margin * bpp / 4;
-
-	if (var->vmode & FB_VMODE_DOUBLE)
-	{
-		yres = var->yres * 2;
-		vfront = var->lower_margin * 2;
-		vsync  = var->vsync_len * 2;
-		vback  = var->upper_margin * 2;
-	}
-	else if (var->vmode & FB_VMODE_INTERLACED)
-	{
-		yres   = (var->yres + 1) / 2;
-		vfront = (var->lower_margin + 1) / 2;
-		vsync  = (var->vsync_len + 1) / 2;
-		vback  = (var->upper_margin + 1) / 2;
-	}
-	else
-	{
-		yres   = var->yres; /* -1 ? */
-		vfront = var->lower_margin;
-		vsync  = var->vsync_len;
-		vback  = var->upper_margin;
-	}
-
-	data.h_total	= (hback / 8) + (xres / 8) 
-			+ (hfront / 8) + (hsync / 8) - 1 /* + 1 */;
-	data.h_dispend	= ((xres + bpp - 1)/ 8) - 1;
-	data.h_bstart	= xres / 8 /* + 1 */;
-
-	data.h_bstop	= data.h_total+1 + 2 + 1;
-	data.h_sstart	= (xres / 8) + (hfront / 8) + 1;
-	data.h_sstop	= (xres / 8) + (hfront / 8) + (hsync / 8) + 1;
-
-	data.v_total	= yres + vfront + vsync + vback - 1;
-
-	data.v_dispend	= yres - 1;
-	data.v_bstart	= yres;
-
-	data.v_bstop	= data.v_total;
-	data.v_sstart	= yres + vfront - 1 - 2;
-	data.v_sstop	= yres + vfront + vsync - 1;
-
-#if 0 /* testing */
-
-	printk("HBS: %i\n", data.h_bstart);
-	printk("HSS: %i\n", data.h_sstart);
-	printk("HSE: %i\n", data.h_sstop);
-	printk("HBE: %i\n", data.h_bstop);
-	printk("HT: %i\n", data.h_total);
-
-	printk("hsync: %i\n", hsync);
-	printk("hfront: %i\n", hfront);
-	printk("hback: %i\n", hback);
-
-	printk("VBS: %i\n", data.v_bstart);
-	printk("VSS: %i\n", data.v_sstart);
-	printk("VSE: %i\n", data.v_sstop);
-	printk("VBE: %i\n", data.v_bstop);
-	printk("VT: %i\n", data.v_total);
-
-	printk("vsync: %i\n", vsync);
-	printk("vfront: %i\n", vfront);
-	printk("vback: %i\n", vback);
-#endif
-
-	if (data.v_total >= 1024)
-		printk("MAYDAY: v_total >= 1024; bailing out!\n");
-
-	reg_w(GREG_MISC_OUTPUT_W, 0xe3 | ((clocksel & 3) * 0x04));
-	reg_w(GREG_FEATURE_CONTROL_W, 0x00);
-
-	seq_w(SEQ_RESET, 0x00);
-	seq_w(SEQ_RESET, 0x03);	/* reset sequencer logic */
-
-	/*
-	 * CLOCKING_MODE bits:
-	 * 2: This one is only set for certain text-modes, wonder if
-	 *    it may be for EGA-lines? (it was referred to as CLKDIV2)
-	 * (The CL drivers sets it to 0x21 with the comment:
-	 *  FullBandwidth (video off) and 8/9 dot clock)
-	 */
-	seq_w(SEQ_CLOCKING_MODE, 0x01 | 0x00 /* 0x08 */);
-
-	seq_w(SEQ_MAP_MASK, 0x0f);        /* enable writing to plane 0-3 */
-	seq_w(SEQ_CHAR_MAP_SELECT, 0x00); /* doesn't matter in gfx-mode */
-	seq_w(SEQ_MEMORY_MODE, 0x06); /* CL driver says 0x0e for 256 col mode*/
-	seq_w(SEQ_RESET, 0x01);
-	seq_w(SEQ_RESET, 0x03);
-
-	seq_w(SEQ_EXTENDED_ENABLE, 0x05);
-
-	seq_w(SEQ_CURSOR_CONTROL, 0x00);	/* disable cursor */
-	seq_w(SEQ_PRIM_HOST_OFF_HI, 0x00);
-	seq_w(SEQ_PRIM_HOST_OFF_HI, 0x00);
-	seq_w(SEQ_LINEAR_0, 0x4a);
-	seq_w(SEQ_LINEAR_1, 0x00);
-
-	seq_w(SEQ_SEC_HOST_OFF_HI, 0x00);
-	seq_w(SEQ_SEC_HOST_OFF_LO, 0x00);
-	seq_w(SEQ_EXTENDED_MEM_ENA, 0x3 | 0x4 | 0x10 | 0x40);
-
-	/*
-	 * The lower 4 bits (0-3) are used to set the font-width for
-	 * text-mode - DON'T try to set this for gfx-mode.
-	 */
-	seq_w(SEQ_EXT_CLOCK_MODE, 0x10);
-	seq_w(SEQ_EXT_VIDEO_ADDR, 0x03);
-
-	/*
-	 * Extended Pixel Control:
-	 * bit 0:   text-mode=0, gfx-mode=1 (Graphics Byte ?)
-	 * bit 1: (Packed/Nibble Pixel Format ?)
-	 * bit 4-5: depth, 0=1-8bpp, 1=9-16bpp, 2=17-24bpp
-	 */
-	seq_w(SEQ_EXT_PIXEL_CNTL, 0x01 | (((bpp / 8) - 1) << 4));
-
-	seq_w(SEQ_BUS_WIDTH_FEEDB, 0x04);
-	seq_w(SEQ_COLOR_EXP_WFG, 0x01);
-	seq_w(SEQ_COLOR_EXP_WBG, 0x00);
-	seq_w(SEQ_EXT_RW_CONTROL, 0x00);
-	seq_w(SEQ_MISC_FEATURE_SEL, (0x51 | (clocksel & 8)));
-	seq_w(SEQ_COLOR_KEY_CNTL, 0x40);
-	seq_w(SEQ_COLOR_KEY_MATCH0, 0x00);
-	seq_w(SEQ_COLOR_KEY_MATCH1, 0x00);
-	seq_w(SEQ_COLOR_KEY_MATCH2, 0x00);
-	seq_w(SEQ_CRC_CONTROL, 0x00);
-	seq_w(SEQ_PERF_SELECT, 0x10);
-	seq_w(SEQ_ACM_APERTURE_1, 0x00);
-	seq_w(SEQ_ACM_APERTURE_2, 0x30);
-	seq_w(SEQ_ACM_APERTURE_3, 0x00);
-	seq_w(SEQ_MEMORY_MAP_CNTL, 0x03);
-
-
-	/* unlock register CRT0..CRT7 */
-	crt_w(CRT_END_VER_RETR, (data.v_sstop & 0x0f) | 0x20);
-
-	/* Zuerst zu schreibende Werte nur per printk ausgeben */
-	DEBUG printk("CRT_HOR_TOTAL: %ld\n", data.h_total);
-	crt_w(CRT_HOR_TOTAL, data.h_total & 0xff);
-
-	DEBUG printk("CRT_HOR_DISP_ENA_END: %ld\n", data.h_dispend);
-	crt_w(CRT_HOR_DISP_ENA_END, (data.h_dispend) & 0xff);
-
-	DEBUG printk("CRT_START_HOR_BLANK: %ld\n", data.h_bstart);
-	crt_w(CRT_START_HOR_BLANK, data.h_bstart & 0xff);
-
-	DEBUG printk("CRT_END_HOR_BLANK: 128+%ld\n", data.h_bstop % 32);
-	crt_w(CRT_END_HOR_BLANK,  0x80 | (data.h_bstop & 0x1f));
-
-	DEBUG printk("CRT_START_HOR_RETR: %ld\n", data.h_sstart);
-	crt_w(CRT_START_HOR_RETR, data.h_sstart & 0xff);
-
-	tmp = (data.h_sstop & 0x1f);
-	if (data.h_bstop & 0x20)
-		tmp |= 0x80;
-	DEBUG printk("CRT_END_HOR_RETR: %d\n", tmp);
-	crt_w(CRT_END_HOR_RETR, tmp);
-
-	DEBUG printk("CRT_VER_TOTAL: %ld\n", data.v_total & 0xff);
-	crt_w(CRT_VER_TOTAL, (data.v_total & 0xff));
-
-	tmp = 0x10;  /* LineCompare bit #9 */
-	if (data.v_total & 256)
-		tmp |= 0x01;
-	if (data.v_dispend & 256)
-		tmp |= 0x02;
-	if (data.v_sstart & 256)
-		tmp |= 0x04;
-	if (data.v_bstart & 256)
-		tmp |= 0x08;
-	if (data.v_total & 512)
-		tmp |= 0x20;
-	if (data.v_dispend & 512)
-		tmp |= 0x40;
-	if (data.v_sstart & 512)
-		tmp |= 0x80;
-	DEBUG printk("CRT_OVERFLOW: %d\n", tmp);
-	crt_w(CRT_OVERFLOW, tmp);
-
-	crt_w(CRT_PRESET_ROW_SCAN, 0x00); /* not CL !!! */
-
-	tmp = 0x40; /* LineCompare bit #8 */
-	if (data.v_bstart & 512)
-		tmp |= 0x20;
-	if (var->vmode & FB_VMODE_DOUBLE)
-		tmp |= 0x80;
- 	DEBUG printk("CRT_MAX_SCAN_LINE: %d\n", tmp);
-	crt_w(CRT_MAX_SCAN_LINE, tmp);
-
-	crt_w(CRT_CURSOR_START, 0x00);
-	crt_w(CRT_CURSOR_END, 8 & 0x1f); /* font height */
-
-	crt_w(CRT_START_ADDR_HIGH, 0x00);
-	crt_w(CRT_START_ADDR_LOW, 0x00);
-
-	crt_w(CRT_CURSOR_LOC_HIGH, 0x00);
-	crt_w(CRT_CURSOR_LOC_LOW, 0x00);
-
- 	DEBUG printk("CRT_START_VER_RETR: %ld\n", data.v_sstart & 0xff);
-	crt_w(CRT_START_VER_RETR, (data.v_sstart & 0xff));
-
-#if 1
-	/* 5 refresh cycles per scanline */
-	DEBUG printk("CRT_END_VER_RETR: 64+32+%ld\n", data.v_sstop % 16);
-	crt_w(CRT_END_VER_RETR, ((data.v_sstop & 0x0f) | 0x40 | 0x20));
-#else
-	DEBUG printk("CRT_END_VER_RETR: 128+32+%ld\n", data.v_sstop % 16);
-	crt_w(CRT_END_VER_RETR, ((data.v_sstop & 0x0f) | 128 | 32));
-#endif
-	DEBUG printk("CRT_VER_DISP_ENA_END: %ld\n", data.v_dispend & 0xff);
-	crt_w(CRT_VER_DISP_ENA_END, (data.v_dispend & 0xff));
-
-	DEBUG printk("CRT_START_VER_BLANK: %ld\n", data.v_bstart & 0xff);
-	crt_w(CRT_START_VER_BLANK, (data.v_bstart & 0xff));
-
-	DEBUG printk("CRT_END_VER_BLANK: %ld\n", data.v_bstop & 0xff);
-	crt_w(CRT_END_VER_BLANK, (data.v_bstop & 0xff));
-
-	DEBUG printk("CRT_MODE_CONTROL: 0xe3\n");
-	crt_w(CRT_MODE_CONTROL, 0xe3);
-
-	DEBUG printk("CRT_LINE_COMPARE: 0xff\n");
-	crt_w(CRT_LINE_COMPARE, 0xff);
-
-	tmp = (var->xres_virtual / 8) * (bpp / 8);
-	crt_w(CRT_OFFSET, tmp);
-
-	crt_w(CRT_UNDERLINE_LOC, 0x07); /* probably font-height - 1 */
-
-	tmp = 0x20;			/* Enable extended end bits */
-	if (data.h_total & 0x100)
-		tmp |= 0x01;
-	if ((data.h_dispend) & 0x100)
-		tmp |= 0x02;
-	if (data.h_bstart & 0x100)
-		tmp |= 0x04;
-	if (data.h_sstart & 0x100)
-		tmp |= 0x08;
-	if (var->vmode & FB_VMODE_INTERLACED)
-		tmp |= 0x10;
- 	DEBUG printk("CRT_EXT_HOR_TIMING1: %d\n", tmp);
-	crt_w(CRT_EXT_HOR_TIMING1, tmp);
-
-	tmp = 0x00;
-	if (((var->xres_virtual / 8) * (bpp / 8)) & 0x100)
-		tmp |= 0x10;
-	crt_w(CRT_EXT_START_ADDR, tmp);
-
-	tmp = 0x00;
-	if (data.h_total & 0x200)
-		tmp |= 0x01;
-	if ((data.h_dispend) & 0x200)
-		tmp |= 0x02;
-	if (data.h_bstart & 0x200)
-		tmp |= 0x04;
-	if (data.h_sstart & 0x200)
-		tmp |= 0x08;
-	tmp |= ((data.h_bstop & 0xc0) >> 2);
-	tmp |= ((data.h_sstop & 0x60) << 1);
-	crt_w(CRT_EXT_HOR_TIMING2, tmp);
- 	DEBUG printk("CRT_EXT_HOR_TIMING2: %d\n", tmp);
-
-	tmp = 0x10;			/* Line compare bit 10 */
-	if (data.v_total & 0x400)
-		tmp |= 0x01;
-	if ((data.v_dispend) & 0x400)
-		tmp |= 0x02;
-	if (data.v_bstart & 0x400)
-		tmp |= 0x04;
-	if (data.v_sstart & 0x400)
-		tmp |= 0x08;
-	tmp |= ((data.v_bstop & 0x300) >> 3);
-	if (data.v_sstop & 0x10)
-		tmp |= 0x80;
-	crt_w(CRT_EXT_VER_TIMING, tmp);
- 	DEBUG printk("CRT_EXT_VER_TIMING: %d\n", tmp);
-
-	crt_w(CRT_MONITOR_POWER, 0x00);
-
-	/*
-	 * Convert from ps to Hz.
-	 */
-	freq_f = (1.0/(float)var->pixclock) * 1000000000;
-	freq = ((long)freq_f) * 1000;
-
-	best_freq = find_fq(freq);
-	pll_w(0x02, best_freq);
-	best_freq = find_fq(61000000);
-	pll_w(0x0a, best_freq);
-	pll_w(0x0e, 0x22);
-
-	gfx_w(GFX_SET_RESET, 0x00);
-	gfx_w(GFX_ENABLE_SET_RESET, 0x00);
-	gfx_w(GFX_COLOR_COMPARE, 0x00);
-	gfx_w(GFX_DATA_ROTATE, 0x00);
-	gfx_w(GFX_READ_MAP_SELECT, 0x00);
-	gfx_w(GFX_GRAPHICS_MODE, 0x00);
-	gfx_w(GFX_MISC, 0x05);
-	gfx_w(GFX_COLOR_XCARE, 0x0f);
-	gfx_w(GFX_BITMASK, 0xff);
-
-	reg_r(ACT_ADDRESS_RESET);
-	attr_w(ACT_PALETTE0 , 0x00);
-	attr_w(ACT_PALETTE1 , 0x01);
-	attr_w(ACT_PALETTE2 , 0x02);
-	attr_w(ACT_PALETTE3 , 0x03);
-	attr_w(ACT_PALETTE4 , 0x04);
-	attr_w(ACT_PALETTE5 , 0x05);
-	attr_w(ACT_PALETTE6 , 0x06);
-	attr_w(ACT_PALETTE7 , 0x07);
-	attr_w(ACT_PALETTE8 , 0x08);
-	attr_w(ACT_PALETTE9 , 0x09);
-	attr_w(ACT_PALETTE10, 0x0a);
-	attr_w(ACT_PALETTE11, 0x0b);
-	attr_w(ACT_PALETTE12, 0x0c);
-	attr_w(ACT_PALETTE13, 0x0d);
-	attr_w(ACT_PALETTE14, 0x0e);
-	attr_w(ACT_PALETTE15, 0x0f);
-	reg_r(ACT_ADDRESS_RESET);
-
-	attr_w(ACT_ATTR_MODE_CNTL, 0x09); /* 0x01 for CL */
-
-	attr_w(ACT_OVERSCAN_COLOR, 0x00);
-	attr_w(ACT_COLOR_PLANE_ENA, 0x0f);
-	attr_w(ACT_HOR_PEL_PANNING, 0x00);
-	attr_w(ACT_COLOR_SELECT, 0x00);
-
-	reg_r(ACT_ADDRESS_RESET);
-	reg_w(ACT_DATA, 0x20);
-
-	reg_w(VDAC_MASK, 0xff);
-
-	/*
-	 * Extended palette adressing ???
-	 */
-	switch (bpp){
-	case 8:
-		reg_w(0x83c6, 0x00); 
-		break;
-	case 16:
-		reg_w(0x83c6, 0x60);
-		break;
-	case 24:
-		reg_w(0x83c6, 0xe0);
-		break;
-	default:
-		printk("Illegal color-depth: %i\n", bpp);
-	}
-
-	reg_w(VDAC_ADDRESS, 0x00);
-
-	seq_w(SEQ_MAP_MASK, 0x0f );  
-
-	return 0;
-}
-
-/*
- *    Initialization
- *
- *    Set the default video mode for this chipset. If a video mode was
- *    specified on the command line, it will override the default mode.
- */
-
-static int retz3_init(void)
-{
-	int i;
-#if 0
-	volatile unsigned long *CursorBase;
-#endif
-	unsigned long board_addr, board_size;
-	struct ConfigDev *cd;
-
-	cd = zorro_get_board (z3_key);
-	zorro_config_board (z3_key, 0);
-	board_addr = (unsigned long)cd->cd_BoardAddr;
-	board_size = (unsigned long)cd->cd_BoardSize;
-
-	for (i = 0; i < 256; i++){
-		for (i = 0; i < 256; i++){
-			retz3_color_table [i][0] = i;
-			retz3_color_table [i][1] = i;
-			retz3_color_table [i][2] = i;
-			retz3_color_table [i][3] = 0;
-		}
-	}
-
-	*memstart = (*memstart + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1);
-
-	z3_mem = kernel_map (board_addr, board_size,
-			     KERNELMAP_NOCACHE_SER, memstart);
-
-	z3_regs = (char*) z3_mem;
-	z3_fbmem = z3_mem + VIDEO_MEM_OFFSET;
-
-	/* Get memory size - for now we asume its a 4MB board */
-
-	z3_size = 0x00400000; /* 4 MB */
-
-	memset ((char*)z3_fbmem, 0, z3_size);
-
-	/* Disable hardware cursor */
-
-	seq_w(SEQ_CURSOR_Y_INDEX, 0x00);
-
-
-#if 0
-	/* Initialize hardware cursor */
-	CursorBase = (unsigned long *)((char *)(z3_mem) + z3_size - 0x400);
-	for (i=0; i < 8; i++){
-		*(CursorBase  +(i*4)) = 0xffffff00;
-		*(CursorBase+1+(i*4)) = 0xffff0000;
-		*(CursorBase+2+(i*4)) = 0xffff0000;
-		*(CursorBase+3+(i*4)) = 0xffff0000;
-	}
-	for (i=8; i < 64; i++){
-		*(CursorBase  +(i*4)) = 0xffff0000;
-		*(CursorBase+1+(i*4)) = 0xffff0000;
-		*(CursorBase+2+(i*4)) = 0xffff0000;
-		*(CursorBase+3+(i*4)) = 0xffff0000;
-	}
-#endif
-
-	retz3_setcolreg (255, 56, 100, 160, 0);
-	retz3_setcolreg (254, 0, 0, 0, 0);
-
-	return 0;
-}
-
-
-/*
- *    This function should fill in the `fix' structure based on the
- *    values in the `par' structure.
- */
-
-static int retz3_encode_fix(struct fb_fix_screeninfo *fix,
-                          struct retz3_fb_par *par)
-{
-	int i;
-
-	strcpy(fix->id, retz3_fb_name);
-	fix->smem_start = z3_fbmem;
-	fix->smem_len = z3_size;
-
-	fix->type = FB_TYPE_PACKED_PIXELS;
-	fix->type_aux = 0;
-	if (par->bpp == 8)
-		fix->visual = FB_VISUAL_PSEUDOCOLOR;
-	else
-		fix->visual = FB_VISUAL_DIRECTCOLOR;
-
-	fix->xpanstep = 0;
-	fix->ypanstep = 0;
-	fix->ywrapstep = 0;
-	fix->line_length = 0;
-
-	for (i = 0; i < arraysize(fix->reserved); i++)
-		fix->reserved[i] = 0;
-
-	return 0;
-}
-
-
-/*
- *    Get the video params out of `var'. If a value doesn't fit, round
- *    it up, if it's too big, return -EINVAL.
- */
-
-static int retz3_decode_var(struct fb_var_screeninfo *var,
-			    struct retz3_fb_par *par)
-{
-	par->xres = var->xres;
-	par->yres = var->yres;
-	par->xres_vir = var->xres_virtual;
-	par->yres_vir = var->yres_virtual;
-	par->bpp = var->bits_per_pixel;
-	par->pixclock = var->pixclock;
-	par->vmode = var->vmode;
-
-	par->red = var->red;
-	par->green = var->green;
-	par->blue = var->blue;
-	par->transp = var->transp;
-
-	par->left_margin = var->left_margin;
-	par->right_margin = var->right_margin;
-	par->upper_margin = var->upper_margin;
-	par->lower_margin = var->lower_margin;
-	par->hsync_len = var->hsync_len;
-	par->vsync_len = var->vsync_len;
-
-	return 0;
-}
-
-
-/*
- *    Fill the `var' structure based on the values in `par' and maybe
- *    other values read out of the hardware.
- */
-
-static int retz3_encode_var(struct fb_var_screeninfo *var,
-			    struct retz3_fb_par *par)
-{
-	int i;
-
-	var->xres = par->xres;
-	var->yres = par->yres;
-	var->xres_virtual = par->xres_vir;
-	var->yres_virtual = par->yres_vir;
-	var->xoffset = 0;
-	var->yoffset = 0;
-
-	var->bits_per_pixel = par->bpp;
-	var->grayscale = 0;
-
-	var->red = par->red;
-	var->green = par->green;
-	var->blue = par->blue;
-	var->transp = par->transp;
-
-	var->nonstd = 0;
-	var->activate = 0;
-
-	var->height = -1;
-	var->width = -1;
-
-	var->accel = FB_ACCEL_RETINAZ3;
-
-	var->pixclock = par->pixclock;
-
-	var->sync = 0;				/* ??? */
-	var->left_margin = par->left_margin;
-	var->right_margin = par->right_margin;
-	var->upper_margin = par->upper_margin;
-	var->lower_margin = par->lower_margin;
-	var->hsync_len = par->hsync_len;
-	var->vsync_len = par->vsync_len;
-
-	for (i = 0; i < arraysize(var->reserved); i++)
-		var->reserved[i] = 0;
-
-	var->vmode = par->vmode;
-	return 0;
-}
-
-
-/*
- *    Set a single color register. The values supplied are already
- *    rounded down to the hardware's capabilities (according to the
- *    entries in the var structure). Return != 0 for invalid regno.
- */
-
-static int retz3_setcolreg(unsigned int regno, unsigned int red,
-			   unsigned int green, unsigned int blue,
-			   unsigned int transp)
-{
-	/* We'll get to this */
-
-	if (regno > 255)
-		return 1;
-
-	retz3_color_table [regno][0] = red & 0xff;
-	retz3_color_table [regno][1] = green & 0xff;
-	retz3_color_table [regno][2] = blue & 0xff;
-	retz3_color_table [regno][3] = transp;
-
-	reg_w(VDAC_ADDRESS_W, regno);
-	reg_w(VDAC_DATA, (red & 0xff) >> 2);
-	reg_w(VDAC_DATA, (green & 0xff) >> 2);
-	reg_w(VDAC_DATA, (blue & 0xff) >> 2);
-
-	return 0;
-}
-
-
-/*
- *    Read a single color register and split it into
- *    colors/transparent. Return != 0 for invalid regno.
- */
-
-static int retz3_getcolreg(unsigned int regno, unsigned int *red,
-			   unsigned int *green, unsigned int *blue,
-			   unsigned int *transp)
-{
-	if (regno > 255)
-		return 1;
-	*red    = retz3_color_table [regno][0];
-	*green  = retz3_color_table [regno][1];
-	*blue   = retz3_color_table [regno][2];
-	*transp = retz3_color_table [regno][3];
-	return 0;
-}
-
-
-/*
- *    (Un)Blank the screen
- */
-
-void retz3_blank(int blank)
-{
-	int i;
-
-	if (blank)
-		for (i = 0; i < 256; i++){
-			reg_w(VDAC_ADDRESS_W, i);
-			reg_w(VDAC_DATA, 0);
-			reg_w(VDAC_DATA, 0);
-			reg_w(VDAC_DATA, 0);
-		}
-	else
-		for (i = 0; i < 256; i++){
-			reg_w(VDAC_ADDRESS_W, i);
-			reg_w(VDAC_DATA, retz3_color_table [i][0] >> 2);
-			reg_w(VDAC_DATA, retz3_color_table [i][1] >> 2);
-			reg_w(VDAC_DATA, retz3_color_table [i][2] >> 2);
-		}
-}
-
-
-void retz3_bitblt (struct fb_var_screeninfo *var,
-		   unsigned short srcx, unsigned short srcy, unsigned
-		   short destx, unsigned short desty, unsigned short
-		   width, unsigned short height, unsigned short cmd,
-		   unsigned short mask)
-{
-
-	volatile unsigned long *acm = (unsigned long *) (z3_mem + ACM_OFFSET);
-	unsigned long *pattern = (unsigned long *)(z3_fbmem + PAT_MEM_OFF);
-
-	unsigned short mod;
-	unsigned long tmp;
-	unsigned long pat, src, dst;
-	unsigned char blt_status;
-
-	int i, xres_virtual = var->xres_virtual;
-	short bpp = (var->bits_per_pixel & 0xff);
-
-	if (bpp < 8)
-		bpp = 8;
-
-	tmp = mask | (mask << 16);
-
-#if 0
-	/*
-	 * Check for blitter finished before we start messing with the
-	 * pattern.
-	 */
-	do{
-		blt_status = *(((volatile unsigned char *)acm) +
-			       (ACM_START_STATUS + 2));
-	}while ((blt_status & 1) == 0);
-#endif
-
-	i = 0;
-	do{
-		*pattern++ = tmp;
-	}while(i++ < bpp/4);
-
-	tmp = cmd << 8;
-	*(acm + ACM_RASTEROP_ROTATION/4) = tmp;
-
-	mod = 0xc0c2;
-
-	pat = 8 * PAT_MEM_OFF;
-	dst = bpp * (destx + desty * xres_virtual);
-
-	/*
-	 * Source is not set for clear.
-	 */
-	if ((cmd != Z3BLTclear) && (cmd != Z3BLTset)) {
-		src = bpp * (srcx + srcy * xres_virtual);
-
-		if (destx > srcx) {
-			mod &= ~0x8000;
-			src += bpp * (width - 1);
-			dst += bpp * (width - 1);
-			pat += bpp * 2;
-		}
-		if (desty > srcy) {
-			mod &= ~0x4000;
-			src += bpp * (height - 1) * xres_virtual;
-			dst += bpp * (height - 1) * xres_virtual;
-			pat += bpp * 4;
-		}
-
-		*(acm + ACM_SOURCE/4) = cpu_to_le32(src);
-	}
-
-	*(acm + ACM_PATTERN/4) = cpu_to_le32(pat);
-
-	*(acm + ACM_DESTINATION/4) = cpu_to_le32(dst);
-
-	tmp = mod << 16;
-	*(acm + ACM_CONTROL/4) = tmp;
-
-	tmp  = width | (height << 16);
-	
-	*(acm + ACM_BITMAP_DIMENSION/4) = cpu_to_le32(tmp);
-
-	*(((volatile unsigned char *)acm) + ACM_START_STATUS) = 0x00;
-	*(((volatile unsigned char *)acm) + ACM_START_STATUS) = 0x01;
-
-	/*
-	 * No reason to wait for the blitter to finish, it is better
-	 * just to check if it has finished before we use it again.
-	 */
-#if 1
-#if 0
-	while ((*(((volatile unsigned char *)acm) +
-		  (ACM_START_STATUS + 2)) & 1) == 0);
-#else
-	do{
-		blt_status = *(((volatile unsigned char *)acm) +
-			       (ACM_START_STATUS + 2));
-	}
-	while ((blt_status & 1) == 0);
-#endif
-#endif
-}
-
-#if 0
-void retz3_fill (unsigned short x, unsigned short y, unsigned
-		 short width, unsigned short height,
-		 unsigned short mode, unsigned short color)
-{
-
-}
-#endif
-
-
-/**************************************************************
- * Move cursor to x, y
- */
-void retz3_MoveCursor (unsigned short x, unsigned short y)
-{
-	/* Guess we gotta deal with the cursor at some point */
-}
-
-
-/* -------------------- Interfaces to hardware functions -------------------- */
-
-
-static struct fb_hwswitch retz3_switch = {
-	retz3_init, retz3_encode_fix, retz3_decode_var, retz3_encode_var,
-	retz3_getcolreg, retz3_setcolreg, retz3_blank
-};
-
-
-/* -------------------- Generic routines ------------------------------------ */
-
-
-/*
- *    Fill the hardware's `par' structure.
- */
-
-static void retz3_fb_get_par(struct retz3_fb_par *par)
-{
-	if (current_par_valid)
-		*par = current_par;
-	else
-		fbhw->decode_var(&retz3_fb_predefined[z3fb_mode], par);
-}
-
-
-static void retz3_fb_set_par(struct retz3_fb_par *par)
-{
-	current_par = *par;
-	current_par_valid = 1;
-}
-
-
-static int do_fb_set_var(struct fb_var_screeninfo *var, int isactive)
-{
-	int err, activate;
-	struct retz3_fb_par par;
-
-	if ((err = fbhw->decode_var(var, &par)))
-		return err;
-	activate = var->activate;
-	if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW && isactive)
-		retz3_fb_set_par(&par);
-	fbhw->encode_var(var, &par);
-	var->activate = activate;
-
-#if 1
-	retz3_set_video(var, &current_par);
-#endif
-	return 0;
-}
-
-
-/*
- *    Default Colormaps
- */
-
-static unsigned short red16[] =
-	{ 0x0000, 0x0000, 0x0000, 0x0000, 0xc000, 0xc000, 0xc000, 0xc000,
-	  0x8000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff };
-static unsigned short green16[] =
-	{ 0x0000, 0x0000, 0xc000, 0xc000, 0x0000, 0x0000, 0xc000, 0xc000,
-	  0x8000, 0x0000, 0xffff, 0xffff, 0x0000, 0x0000, 0xffff, 0xffff };
-static unsigned short blue16[] =
-	{ 0x0000, 0xc000, 0x0000, 0xc000, 0x0000, 0xc000, 0x0000, 0xc000,
-	  0x8000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff };
-
-
-static struct fb_cmap default_16_colors =
-   { 0, 16, red16, green16, blue16, NULL };
-
-
-static struct fb_cmap *get_default_colormap(int bpp)
-{
-	return &default_16_colors;
-}
-
-
-#define CNVT_TOHW(val,width)     ((((val)<<(width))+0x7fff-(val))>>16)
-#define CNVT_FROMHW(val,width)   (((width) ? ((((val)<<16)-(val)) / \
-                                              ((1<<(width))-1)) : 0))
-
-static int do_fb_get_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
-                          int kspc)
-{
-	int i, start;
-	unsigned short *red, *green, *blue, *transp;
-	unsigned int hred, hgreen, hblue, htransp;
-
-	red = cmap->red;
-	green = cmap->green;
-	blue = cmap->blue;
-	transp = cmap->transp;
-	start = cmap->start;
-
-	if (start < 0)
-		return -EINVAL;
-	for (i = 0; i < cmap->len; i++) {
-		if (fbhw->getcolreg(start++, &hred, &hgreen, &hblue, &htransp))
-			return 0;
-		hred = CNVT_FROMHW(hred, var->red.length);
-		hgreen = CNVT_FROMHW(hgreen, var->green.length);
-		hblue = CNVT_FROMHW(hblue, var->blue.length);
-		htransp = CNVT_FROMHW(htransp, var->transp.length);
-		if (kspc) {
-			*red = hred;
-			*green = hgreen;
-			*blue = hblue;
-			if (transp)
-				*transp = htransp;
-		} else {
-			put_user(hred, red);
-			put_user(hgreen, green);
-			put_user(hblue, blue);
-			if (transp)
-				put_user(htransp, transp);
-		}
-		red++;
-		green++;
-		blue++;
-		if (transp)
-			transp++;
-	}
-	return 0;
-}
-
-
-static int do_fb_set_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
-                          int kspc)
-{
-	int i, start;
-	unsigned short *red, *green, *blue, *transp;
-	unsigned int hred, hgreen, hblue, htransp;
-
-	red = cmap->red;
-	green = cmap->green;
-	blue = cmap->blue;
-	transp = cmap->transp;
-	start = cmap->start;
-
-	if (start < 0)
-		return -EINVAL;
-	for (i = 0; i < cmap->len; i++) {
-		if (kspc) {
-			hred = *red;
-			hgreen = *green;
-			hblue = *blue;
-			htransp = transp ? *transp : 0;
-		} else {
-			get_user(hred, red);
-			get_user(hgreen, green);
-			get_user(hblue, blue);
-			if (transp)
-				get_user(htransp, transp);
-			else
-				htransp = 0;
-		}
-		hred = CNVT_TOHW(hred, var->red.length);
-		hgreen = CNVT_TOHW(hgreen, var->green.length);
-		hblue = CNVT_TOHW(hblue, var->blue.length);
-		htransp = CNVT_TOHW(htransp, var->transp.length);
-		red++;
-		green++;
-		blue++;
-		if (transp)
-			transp++;
-		if (fbhw->setcolreg(start++, hred, hgreen, hblue, htransp))
-			return 0;
-	}
-	return 0;
-}
-
-
-static void do_install_cmap(int con)
-{
-	if (con != currcon)
-		return;
-	if (disp[con].cmap.len)
-		do_fb_set_cmap(&disp[con].cmap, &disp[con].var, 1);
-	else
-		do_fb_set_cmap(get_default_colormap(disp[con].var.bits_per_pixel),
-                                          &disp[con].var, 1);
-}
-
-
-static void memcpy_fs(int fsfromto, void *to, void *from, int len)
-{
-	switch (fsfromto) {
-	case 0:
-		memcpy(to, from, len);
-		return;
-	case 1:
-		copy_from_user(to, from, len);
-		return;
-	case 2:
-		copy_to_user(to, from, len);
-		return;
-	}
-}
-
-
-static void copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto)
-{
-	int size;
-	int tooff = 0, fromoff = 0;
-
-	if (to->start > from->start)
-		fromoff = to->start-from->start;
-	else
-		tooff = from->start-to->start;
-	size = to->len-tooff;
-	if (size > from->len-fromoff)
-		size = from->len-fromoff;
-	if (size < 0)
-		return;
-	size *= sizeof(unsigned short);
-	memcpy_fs(fsfromto, to->red+tooff, from->red+fromoff, size);
-	memcpy_fs(fsfromto, to->green+tooff, from->green+fromoff, size);
-	memcpy_fs(fsfromto, to->blue+tooff, from->blue+fromoff, size);
-	if (from->transp && to->transp)
-		memcpy_fs(fsfromto, to->transp+tooff,
-			  from->transp+fromoff, size);
-}
-
-
-static int alloc_cmap(struct fb_cmap *cmap, int len, int transp)
-{
-	int size = len*sizeof(unsigned short);
-
-	if (cmap->len != len) {
-		if (cmap->red)
-			kfree(cmap->red);
-		if (cmap->green)
-			kfree(cmap->green);
-		if (cmap->blue)
-			kfree(cmap->blue);
-		if (cmap->transp)
-			kfree(cmap->transp);
-		cmap->red = cmap->green = cmap->blue = cmap->transp = NULL;
-		cmap->len = 0;
-		if (!len)
-			return 0;
-		if (!(cmap->red = kmalloc(size, GFP_ATOMIC)))
-			return -1;
-		if (!(cmap->green = kmalloc(size, GFP_ATOMIC)))
-			return -1;
-		if (!(cmap->blue = kmalloc(size, GFP_ATOMIC)))
-			return -1;
-		if (transp) {
-			if (!(cmap->transp = kmalloc(size, GFP_ATOMIC)))
-				return -1;
-		} else
-			cmap->transp = NULL;
-	}
-	cmap->start = 0;
-	cmap->len = len;
-	copy_cmap(get_default_colormap(len), cmap, 0);
-	return 0;
-}
-
-
-/*
- *    Get the Fixed Part of the Display
- */
-
-static int retz3_fb_get_fix(struct fb_fix_screeninfo *fix, int con)
-{
-	struct retz3_fb_par par;
-	int error = 0;
-
-	if (con == -1)
-		retz3_fb_get_par(&par);
-	else
-		error = fbhw->decode_var(&disp[con].var, &par);
-	return(error ? error : fbhw->encode_fix(fix, &par));
-}
-
-
-/*
- *    Get the User Defined Part of the Display
- */
-
-static int retz3_fb_get_var(struct fb_var_screeninfo *var, int con)
-{
-	struct retz3_fb_par par;
-	int error = 0;
-
-	if (con == -1) {
-		retz3_fb_get_par(&par);
-		error = fbhw->encode_var(var, &par);
-	} else
-		*var = disp[con].var;
-	return error;
-}
-
-
-static void retz3_fb_set_disp(int con)
-{
-	struct fb_fix_screeninfo fix;
-
-	retz3_fb_get_fix(&fix, con);
-	if (con == -1)
-		con = 0;
-	disp[con].screen_base = (unsigned char *)fix.smem_start;
-	disp[con].visual = fix.visual;
-	disp[con].type = fix.type;
-	disp[con].type_aux = fix.type_aux;
-	disp[con].ypanstep = fix.ypanstep;
-	disp[con].ywrapstep = fix.ywrapstep;
-	disp[con].can_soft_blank = 1;
-	disp[con].inverse = z3fb_inverse;
-}
-
-
-/*
- *    Set the User Defined Part of the Display
- */
-
-static int retz3_fb_set_var(struct fb_var_screeninfo *var, int con)
-{
-	int err, oldxres, oldyres, oldvxres, oldvyres, oldbpp;
-
-	if ((err = do_fb_set_var(var, con == currcon)))
-		return err;
-	if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) {
-		oldxres = disp[con].var.xres;
-		oldyres = disp[con].var.yres;
-		oldvxres = disp[con].var.xres_virtual;
-		oldvyres = disp[con].var.yres_virtual;
-		oldbpp = disp[con].var.bits_per_pixel;
-		disp[con].var = *var;
-		if (oldxres != var->xres || oldyres != var->yres ||
-		    oldvxres != var->xres_virtual ||
-		    oldvyres != var->yres_virtual ||
-		    oldbpp != var->bits_per_pixel) {
-			retz3_fb_set_disp(con);
-			(*fb_info.changevar)(con);
-			alloc_cmap(&disp[con].cmap, 0, 0);
-			do_install_cmap(con);
-		}
-	}
-	var->activate = 0;
-	return 0;
-}
-
-
-/*
- *    Get the Colormap
- */
-
-static int retz3_fb_get_cmap(struct fb_cmap *cmap, int kspc, int con)
-{
-	if (con == currcon) /* current console? */
-		return(do_fb_get_cmap(cmap, &disp[con].var, kspc));
-	else if (disp[con].cmap.len) /* non default colormap? */
-		copy_cmap(&disp[con].cmap, cmap, kspc ? 0 : 2);
-	else
-		copy_cmap(get_default_colormap(disp[con].var.bits_per_pixel),
-			  cmap, kspc ? 0 : 2);
-	return 0;
-}
-
-
-/*
- *    Set the Colormap
- */
-
-static int retz3_fb_set_cmap(struct fb_cmap *cmap, int kspc, int con)
-{
-	int err;
-
-	if (!disp[con].cmap.len) {       /* no colormap allocated? */
-		if ((err = alloc_cmap(&disp[con].cmap,
-				      1<<disp[con].var.bits_per_pixel, 0)))
-			return err;
-	}
-	if (con == currcon)              /* current console? */
-		return(do_fb_set_cmap(cmap, &disp[con].var, kspc));
-	else
-		copy_cmap(cmap, &disp[con].cmap, kspc ? 0 : 1);
-	return 0;
-}
-
-
-/*
- *    Pan or Wrap the Display
- *
- *    This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
- */
-
-static int retz3_fb_pan_display(struct fb_var_screeninfo *var, int con)
-{
-	return -EINVAL;
-}
-
-
-/*
- *    RetinaZ3 Frame Buffer Specific ioctls
- */
-
-static int retz3_fb_ioctl(struct inode *inode, struct file *file,
-                          unsigned int cmd, unsigned long arg, int con)
-{
-	return -EINVAL;
-}
-
-
-static struct fb_ops retz3_fb_ops = {
-   retz3_fb_get_fix, retz3_fb_get_var, retz3_fb_set_var, retz3_fb_get_cmap,
-   retz3_fb_set_cmap, retz3_fb_pan_display, retz3_fb_ioctl
-};
-
-
-int retz3_probe(void)
-{
-	z3_key = zorro_find(MANUF_MACROSYSTEMS2, PROD_RETINA_Z3, 0, 0);
-	return(z3_key);
-}
-
-
-void retz3_video_setup(char *options, int *ints)
-{
-	char *this_opt;
-	int i;
-
-	fb_info.fontname[0] = '\0';
-
-	if (!options || !*options)
-		return;
-
-	for (this_opt = strtok(options, ","); this_opt; 
-	     this_opt = strtok(NULL, ",")){
-		if (!strcmp(this_opt, "inverse")) {
-			z3fb_inverse = 1;
-			for (i = 0; i < 16; i++) {
-				red16[i] = ~red16[i];
-				green16[i] = ~green16[i];
-				blue16[i] = ~blue16[i];
-			}
-		} else if (!strncmp(this_opt, "font:", 5))
-			strcpy(fb_info.fontname, this_opt+5);
-		else
-			z3fb_mode = get_video_mode(this_opt);
-	}
-}
-
-
-/*
- *    Initialization
- */
-
-__initfunc(struct fb_info *retz3_fb_init(long *mem_start))
-{
-	int err;
-	struct retz3_fb_par par;
-
-	memstart = mem_start;
-
-	fbhw = &retz3_switch;
-
-	err = register_framebuffer(retz3_fb_name, &node, &retz3_fb_ops,
-				   NUM_TOTAL_MODES, retz3_fb_predefined);
-	if (err < 0)
-		panic("Cannot register frame buffer\n");
-
-	fbhw->init();
-
-	if (z3fb_mode == -1)
-		z3fb_mode = 1;
-
-	fbhw->decode_var(&retz3_fb_predefined[z3fb_mode], &par);
-	fbhw->encode_var(&retz3_fb_predefined[0], &par);
-
-	strcpy(fb_info.modename, retz3_fb_name);
-	fb_info.disp = disp;
-	fb_info.switch_con = &z3fb_switch;
-	fb_info.updatevar = &z3fb_updatevar;
-	fb_info.blank = &z3fb_blank;
-	fb_info.setcmap = &z3fb_setcmap;
-
-	do_fb_set_var(&retz3_fb_predefined[0], 0);
-	retz3_fb_get_var(&disp[0].var, -1);
-	retz3_fb_set_disp(-1);
-	do_install_cmap(0);
-
-	return &fb_info;
-}
-
-
-static int z3fb_switch(int con)
-{
-	/* Do we have to save the colormap? */
-	if (disp[currcon].cmap.len)
-		do_fb_get_cmap(&disp[currcon].cmap, &disp[currcon].var, 1);
-
-	do_fb_set_var(&disp[con].var, 1);
-	currcon = con;
-	/* Install new colormap */
-	do_install_cmap(con);
-	return 0;
-}
-
-
-/*
- *    Update the `var' structure (called by fbcon.c)
- *
- *    This call looks only at yoffset and the FB_VMODE_YWRAP flag in `var'.
- *    Since it's called by a kernel driver, no range checking is done.
- */
-
-static int z3fb_updatevar(int con)
-{
-	return 0;
-}
-
-
-/*
- *    Blank the display.
- */
-
-static void z3fb_blank(int blank)
-{
-	fbhw->blank(blank);
-}
-
-
-/*
- *    Set the colormap
- */
-
-static int z3fb_setcmap(struct fb_cmap *cmap, int con)
-{
-	return(retz3_fb_set_cmap(cmap, 1, con));
-}
-
-
-/*
- *    Get a Video Mode
- */
-
-static int get_video_mode(const char *name)
-{
-	int i;
-
-	for (i = 1; i <= NUM_PREDEF_MODES; i++)
-		if (!strcmp(name, retz3_fb_modenames[i])){
-			retz3_fb_predefined[0] = retz3_fb_predefined[i];
-			return i;
-		}
-	return -1;
-}
--- linux-2.1.42/arch/m68k/amiga/retz3fb.h.orig	Sun May 18 23:08:53 1997
+++ linux-2.1.42/arch/m68k/amiga/retz3fb.h	Mon Jun  9 23:03:04 1997
@@ -1,286 +0,0 @@
-/*
- * Linux/arch/m68k/amiga/retz3fb.h -- Defines and macros for the
- *                                    RetinaZ3 frame buffer device
- *
- *    Copyright (C) 1997 Jes Sorensen
- *
- * History:
- *   - 22 Jan 97: Initial work
- *
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file COPYING in the main directory of this archive
- * for more details.
- */
-
-/*
- * Macros to read and write to registers.
- */
-#define reg_w(reg,dat) (*(z3_regs + reg) = dat)
-#define reg_r(reg) (*(z3_regs + reg))
-
-/*
- * Macro to access the sequencer.
- */
-#define seq_w(sreg,sdat) \
-	do{ reg_w(SEQ_IDX, sreg); reg_w(SEQ_DATA, sdat); } while(0)
-
-/*
- * Macro to access the CRT controller.
- */
-#define crt_w(creg,cdat) \
-	do{ reg_w(CRT_IDX, creg); reg_w(CRT_DATA, cdat); } while(0)
-
-/*
- * Macro to access the graphics controller.
- */
-#define gfx_w(greg,gdat) \
-	do{ reg_w(GFX_IDX, greg); reg_w(GFX_DATA, gdat); } while(0)
-
-/*
- * Macro to access the attribute controller.
- */
-#define attr_w(areg,adat) \
-	do{ reg_w(ACT_IDX, areg); reg_w(ACT_DATA, adat); } while(0)
-
-/*
- * Macro to access the pll.
- */
-#define pll_w(preg,pdat) \
-	do{ reg_w(PLL_IDX, preg); \
-	    reg_w(PLL_DATA, (pdat & 0xff)); \
-	    reg_w(PLL_DATA, (pdat >> 8));\
-	} while(0)
-
-/*
- * Offsets
- */
-#define VIDEO_MEM_OFFSET	0x00c00000
-#define ACM_OFFSET		0x00b00000
-
-/*
- * Accelerator Control Menu
- */
-#define ACM_PRIMARY_OFFSET	0x00
-#define ACM_SECONDARY_OFFSET	0x04
-#define ACM_MODE_CONTROL	0x08
-#define ACM_CURSOR_POSITION	0x0c
-#define ACM_START_STATUS	0x30
-#define ACM_CONTROL		0x34
-#define ACM_RASTEROP_ROTATION	0x38
-#define ACM_BITMAP_DIMENSION	0x3c
-#define ACM_DESTINATION		0x40
-#define ACM_SOURCE		0x44
-#define ACM_PATTERN		0x48
-#define ACM_FOREGROUND		0x4c
-#define ACM_BACKGROUND		0x50
-
-/*
- * Video DAC addresses
- */
-#define VDAC_ADDRESS		0x03c8
-#define VDAC_ADDRESS_W		0x03c8
-#define VDAC_ADDRESS_R		0x03c7
-#define VDAC_STATE		0x03c7
-#define VDAC_DATA		0x03c9
-#define VDAC_MASK		0x03c6
-
-/*
- * Sequencer
- */
-#define SEQ_IDX			0x03c4	/* Sequencer Index */
-#define SEQ_DATA		0x03c5
-#define SEQ_RESET		0x00
-#define SEQ_CLOCKING_MODE	0x01
-#define SEQ_MAP_MASK		0x02
-#define SEQ_CHAR_MAP_SELECT	0x03
-#define SEQ_MEMORY_MODE		0x04
-#define SEQ_EXTENDED_ENABLE	0x05	/* NCR extensions */
-#define SEQ_UNKNOWN1         	0x06
-#define SEQ_UNKNOWN2         	0x07
-#define SEQ_CHIP_ID		0x08
-#define SEQ_UNKNOWN3         	0x09
-#define SEQ_CURSOR_COLOR1	0x0a
-#define SEQ_CURSOR_COLOR0	0x0b
-#define SEQ_CURSOR_CONTROL	0x0c
-#define SEQ_CURSOR_X_LOC_HI	0x0d
-#define SEQ_CURSOR_X_LOC_LO	0x0e
-#define SEQ_CURSOR_Y_LOC_HI	0x0f
-#define SEQ_CURSOR_Y_LOC_LO	0x10
-#define SEQ_CURSOR_X_INDEX	0x11
-#define SEQ_CURSOR_Y_INDEX	0x12
-#define SEQ_CURSOR_STORE_HI	0x13
-#define SEQ_CURSOR_STORE_LO	0x14
-#define SEQ_CURSOR_ST_OFF_HI	0x15
-#define SEQ_CURSOR_ST_OFF_LO	0x16
-#define SEQ_CURSOR_PIXELMASK	0x17
-#define SEQ_PRIM_HOST_OFF_HI	0x18
-#define SEQ_PRIM_HOST_OFF_LO	0x19
-#define SEQ_LINEAR_0		0x1a
-#define SEQ_LINEAR_1		0x1b
-#define SEQ_SEC_HOST_OFF_HI	0x1c
-#define SEQ_SEC_HOST_OFF_LO	0x1d
-#define SEQ_EXTENDED_MEM_ENA	0x1e
-#define SEQ_EXT_CLOCK_MODE	0x1f
-#define SEQ_EXT_VIDEO_ADDR	0x20
-#define SEQ_EXT_PIXEL_CNTL	0x21
-#define SEQ_BUS_WIDTH_FEEDB	0x22
-#define SEQ_PERF_SELECT		0x23
-#define SEQ_COLOR_EXP_WFG	0x24
-#define SEQ_COLOR_EXP_WBG	0x25
-#define SEQ_EXT_RW_CONTROL	0x26
-#define SEQ_MISC_FEATURE_SEL	0x27
-#define SEQ_COLOR_KEY_CNTL	0x28
-#define SEQ_COLOR_KEY_MATCH0	0x29
-#define SEQ_COLOR_KEY_MATCH1 	0x2a
-#define SEQ_COLOR_KEY_MATCH2 	0x2b
-#define SEQ_UNKNOWN6         	0x2c
-#define SEQ_CRC_CONTROL		0x2d
-#define SEQ_CRC_DATA_LOW	0x2e
-#define SEQ_CRC_DATA_HIGH	0x2f
-#define SEQ_MEMORY_MAP_CNTL	0x30
-#define SEQ_ACM_APERTURE_1	0x31
-#define SEQ_ACM_APERTURE_2	0x32
-#define SEQ_ACM_APERTURE_3	0x33
-#define SEQ_BIOS_UTILITY_0	0x3e
-#define SEQ_BIOS_UTILITY_1	0x3f
-
-/*
- * Graphics Controller
- */
-#define GFX_IDX			0x03ce
-#define GFX_DATA		0x03cf
-#define GFX_SET_RESET		0x00
-#define GFX_ENABLE_SET_RESET	0x01
-#define GFX_COLOR_COMPARE	0x02
-#define GFX_DATA_ROTATE		0x03
-#define GFX_READ_MAP_SELECT	0x04
-#define GFX_GRAPHICS_MODE	0x05
-#define GFX_MISC		0x06
-#define GFX_COLOR_XCARE		0x07
-#define GFX_BITMASK		0x08
-
-/*
- * CRT Controller
- */
-#define CRT_IDX			0x03d4
-#define CRT_DATA		0x03d5
-#define CRT_HOR_TOTAL		0x00
-#define CRT_HOR_DISP_ENA_END	0x01
-#define CRT_START_HOR_BLANK	0x02
-#define CRT_END_HOR_BLANK	0x03
-#define CRT_START_HOR_RETR	0x04
-#define CRT_END_HOR_RETR	0x05
-#define CRT_VER_TOTAL		0x06
-#define CRT_OVERFLOW		0x07
-#define CRT_PRESET_ROW_SCAN	0x08
-#define CRT_MAX_SCAN_LINE	0x09
-#define CRT_CURSOR_START	0x0a
-#define CRT_CURSOR_END		0x0b
-#define CRT_START_ADDR_HIGH	0x0c
-#define CRT_START_ADDR_LOW	0x0d
-#define CRT_CURSOR_LOC_HIGH	0x0e
-#define CRT_CURSOR_LOC_LOW	0x0f
-#define CRT_START_VER_RETR	0x10
-#define CRT_END_VER_RETR	0x11
-#define CRT_VER_DISP_ENA_END	0x12
-#define CRT_OFFSET		0x13
-#define CRT_UNDERLINE_LOC	0x14
-#define CRT_START_VER_BLANK	0x15
-#define CRT_END_VER_BLANK	0x16
-#define CRT_MODE_CONTROL	0x17
-#define CRT_LINE_COMPARE	0x18
-#define CRT_UNKNOWN1         	0x19
-#define CRT_UNKNOWN2         	0x1a
-#define CRT_UNKNOWN3         	0x1b
-#define CRT_UNKNOWN4         	0x1c
-#define CRT_UNKNOWN5         	0x1d
-#define CRT_UNKNOWN6         	0x1e
-#define CRT_UNKNOWN7         	0x1f
-#define CRT_UNKNOWN8         	0x20
-#define CRT_UNKNOWN9		0x21
-#define CRT_UNKNOWN10		0x22
-#define CRT_UNKNOWN11      	0x23
-#define CRT_UNKNOWN12      	0x24
-#define CRT_UNKNOWN13      	0x25
-#define CRT_UNKNOWN14      	0x26
-#define CRT_UNKNOWN15      	0x27
-#define CRT_UNKNOWN16      	0x28
-#define CRT_UNKNOWN17      	0x29
-#define CRT_UNKNOWN18      	0x2a
-#define CRT_UNKNOWN19      	0x2b
-#define CRT_UNKNOWN20      	0x2c
-#define CRT_UNKNOWN21      	0x2d
-#define CRT_UNKNOWN22      	0x2e
-#define CRT_UNKNOWN23      	0x2f
-#define CRT_EXT_HOR_TIMING1	0x30	/* NCR crt extensions */
-#define CRT_EXT_START_ADDR	0x31
-#define CRT_EXT_HOR_TIMING2	0x32
-#define CRT_EXT_VER_TIMING	0x33
-#define CRT_MONITOR_POWER	0x34
-
-/*
- * General Registers
- */
-#define GREG_STATUS0_R		0x03c2
-#define GREG_STATUS1_R		0x03da
-#define GREG_MISC_OUTPUT_R	0x03cc
-#define GREG_MISC_OUTPUT_W	0x03c2	
-#define GREG_FEATURE_CONTROL_R	0x03ca
-#define GREG_FEATURE_CONTROL_W	0x03da
-#define GREG_POS		0x0102
-
-/*
- * Attribute Controller
- */
-#define ACT_IDX			0x03C0
-#define ACT_ADDRESS_R		0x03C0
-#define ACT_DATA		0x03C0
-#define ACT_ADDRESS_RESET	0x03DA
-#define ACT_PALETTE0		0x00
-#define ACT_PALETTE1		0x01
-#define ACT_PALETTE2		0x02
-#define ACT_PALETTE3		0x03
-#define ACT_PALETTE4		0x04
-#define ACT_PALETTE5		0x05
-#define ACT_PALETTE6		0x06
-#define ACT_PALETTE7		0x07
-#define ACT_PALETTE8		0x08
-#define ACT_PALETTE9		0x09
-#define ACT_PALETTE10		0x0A
-#define ACT_PALETTE11		0x0B
-#define ACT_PALETTE12		0x0C
-#define ACT_PALETTE13		0x0D
-#define ACT_PALETTE14		0x0E
-#define ACT_PALETTE15		0x0F
-#define ACT_ATTR_MODE_CNTL	0x10
-#define ACT_OVERSCAN_COLOR	0x11
-#define ACT_COLOR_PLANE_ENA	0x12
-#define ACT_HOR_PEL_PANNING	0x13
-#define ACT_COLOR_SELECT	0x14
-
-/*
- * PLL
- */
-#define PLL_IDX			0x83c8
-#define PLL_DATA		0x83c9
-
-/*
- * Blitter operations
- */
-#define	Z3BLTclear		0x00	/* 0 */
-#define Z3BLTand		0x80	/* src AND dst */
-#define Z3BLTandReverse		0x40	/* src AND NOT dst */
-#define Z3BLTcopy		0xc0	/* src */
-#define Z3BLTandInverted	0x20	/* NOT src AND dst */
-#define	Z3BLTnoop		0xa0	/* dst */
-#define Z3BLTxor		0x60	/* src XOR dst */
-#define Z3BLTor			0xe0	/* src OR dst */
-#define Z3BLTnor		0x10	/* NOT src AND NOT dst */
-#define Z3BLTequiv		0x90	/* NOT src XOR dst */
-#define Z3BLTinvert		0x50	/* NOT dst */
-#define Z3BLTorReverse		0xd0	/* src OR NOT dst */
-#define Z3BLTcopyInverted	0x30	/* NOT src */
-#define Z3BLTorInverted		0xb0	/* NOT src OR dst */
-#define Z3BLTnand		0x70	/* NOT src OR NOT dst */
-#define Z3BLTset		0xf0	/* 1 */
--- linux-2.1.42/arch/m68k/amiga/s3blit.h.orig	Mon May 20 06:54:25 1996
+++ linux-2.1.42/arch/m68k/amiga/s3blit.h	Mon Jun  9 23:03:04 1997
@@ -1,74 +0,0 @@
-/* s3 commands */
-#define S3_BITBLT       0xc011
-#define S3_TWOPOINTLINE 0x2811
-#define S3_FILLEDRECT   0x40b1
-
-#define S3_FIFO_EMPTY 0x0400
-#define S3_HDW_BUSY   0x0200
-
-/* Enhanced register mapping (MMIO mode) */
-
-#define S3_READ_SEL      0xbee8 /* offset f */
-#define S3_MULT_MISC     0xbee8 /* offset e */
-#define S3_ERR_TERM      0x92e8
-#define S3_FRGD_COLOR    0xa6e8
-#define S3_BKGD_COLOR    0xa2e8
-#define S3_PIXEL_CNTL    0xbee8 /* offset a */
-#define S3_FRGD_MIX      0xbae8
-#define S3_BKGD_MIX      0xb6e8
-#define S3_CUR_Y         0x82e8
-#define S3_CUR_X         0x86e8
-#define S3_DESTY_AXSTP   0x8ae8
-#define S3_DESTX_DIASTP  0x8ee8
-#define S3_MIN_AXIS_PCNT 0xbee8 /* offset 0 */
-#define S3_MAJ_AXIS_PCNT 0x96e8
-#define S3_CMD           0x9ae8
-#define S3_GP_STAT       0x9ae8
-#define S3_ADVFUNC_CNTL  0x4ae8
-#define S3_WRT_MASK      0xaae8
-#define S3_RD_MASK       0xaee8
-
-/* Enhanced register mapping (Packed MMIO mode, write only) */
-#define S3_ALT_CURXY     0x8100
-#define S3_ALT_CURXY2    0x8104
-#define S3_ALT_STEP      0x8108
-#define S3_ALT_STEP2     0x810c
-#define S3_ALT_ERR       0x8110
-#define S3_ALT_CMD       0x8118
-#define S3_ALT_MIX       0x8134
-#define S3_ALT_PCNT      0x8148
-#define S3_ALT_PAT       0x8168
-
-/* Drawing modes */
-#define S3_NOTCUR          0x0000
-#define S3_LOGICALZERO     0x0001
-#define S3_LOGICALONE      0x0002
-#define S3_LEAVEASIS       0x0003
-#define S3_NOTNEW          0x0004
-#define S3_CURXORNEW       0x0005
-#define S3_NOT_CURXORNEW   0x0006
-#define S3_NEW             0x0007
-#define S3_NOTCURORNOTNEW  0x0008
-#define S3_CURORNOTNEW     0x0009
-#define S3_NOTCURORNEW     0x000a
-#define S3_CURORNEW        0x000b
-#define S3_CURANDNEW       0x000c
-#define S3_NOTCURANDNEW    0x000d
-#define S3_CURANDNOTNEW    0x000e
-#define S3_NOTCURANDNOTNEW 0x000f
-
-#define S3_CRTC_ADR    0x03d4
-#define S3_CRTC_DATA   0x03d5
-
-#define S3_REG_LOCK2 0x39
-#define S3_HGC_MODE  0x45
-
-#define S3_HWGC_ORGX_H 0x46
-#define S3_HWGC_ORGX_L 0x47
-#define S3_HWGC_ORGY_H 0x48
-#define S3_HWGC_ORGY_L 0x49
-#define S3_HWGC_DX     0x4e
-#define S3_HWGC_DY     0x4f
-
-
-#define S3_LAW_CTL 0x58
--- linux-2.1.42/arch/m68k/amiga/Makefile.orig	Sun May 18 23:05:04 1997
+++ linux-2.1.42/arch/m68k/amiga/Makefile	Mon Jun  9 23:03:04 1997
@@ -8,16 +8,7 @@
 # Note 2! The CFLAGS definitions are now in the main makefile...
 
 O_TARGET := amiga.o
-O_OBJS   := config.o amikeyb.o amiints.o cia.o \
-            chipram.o amisound.o amifb.o zorro.o
+O_OBJS   := config.o amikeyb.o amiints.o cia.o chipram.o amisound.o zorro.o
 OX_OBJS  := amiga_ksyms.o
-
-ifdef CONFIG_FB_CYBER
-O_OBJS := $(O_OBJS) cyberfb.o
-endif
-
-ifdef CONFIG_FB_RETINAZ3
-O_OBJS := $(O_OBJS) retz3fb.o
-endif
 
 include $(TOPDIR)/Rules.make
--- linux-2.1.42/arch/m68k/amiga/config.c.orig	Mon Jun  2 20:13:24 1997
+++ linux-2.1.42/arch/m68k/amiga/config.c	Mon Jun  9 23:03:05 1997
@@ -76,7 +76,6 @@
 static void amiga_reset (void);
 static void amiga_wait_key(void);
 extern struct consw fb_con;
-extern struct fb_info *amiga_fb_init(long *);
 extern void zorro_init(void);
 extern void amiga_init_sound(void);
 static void amiga_savekmsg_init(void);
@@ -84,7 +83,6 @@
 static void amiga_serial_console_write(const char *s, unsigned int count);
 static void amiga_debug_init(void);
 
-extern void amiga_video_setup(char *, int *);
 extern void amiga_init_sound(void);
 
 static struct console amiga_console_driver = {
@@ -344,8 +342,6 @@
 #endif
   mach_reset           = amiga_reset;
   conswitchp           = &fb_con;
-  mach_fb_init         = amiga_fb_init;
-  mach_video_setup     = amiga_video_setup;
   kd_mksound           = amiga_mksound;
 
   /* Fill in the clock values (based on the 700 kHz E-Clock) */
--- linux-2.1.42/arch/m68k/atari/atafb.c.orig	Sun May 18 23:08:54 1997
+++ linux-2.1.42/arch/m68k/atari/atafb.c	Mon Jun  9 23:03:06 1997
@@ -1,3292 +0,0 @@
-/*
- * atari/atafb.c -- Low level implementation of Atari frame buffer device
- *
- *  Copyright (C) 1994 Martin Schaller & Roman Hodek
- *  
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file COPYING in the main directory of this archive
- * for more details.
- *
- * History:
- *   - 03 Jan 95: Original version by Martin Schaller: The TT driver and
- *                all the device independent stuff
- *   - 09 Jan 95: Roman: I've added the hardware abstraction (hw_switch)
- *                and wrote the Falcon, ST(E), and External drivers
- *                based on the original TT driver.
- *   - 07 May 95: Martin: Added colormap operations for the external driver
- *   - 21 May 95: Martin: Added support for overscan
- *		  Andreas: some bug fixes for this
- *   -    Jul 95: Guenther Kelleter <guenther@pool.informatik.rwth-aachen.de>:
- *                Programmable Falcon video modes
- *                (thanks to Christian Cartus for documentation
- *                of VIDEL registers).
- *   - 27 Dec 95: Guenther: Implemented user definable video modes "user[0-7]"
- *                on minor 24...31. "user0" may be set on commandline by
- *                "R<x>;<y>;<depth>". (Makes sense only on Falcon)
- *                Video mode switch on Falcon now done at next VBL interrupt
- *                to avoid the annoying right shift of the screen.
- *
- *
- * To do:
- *   - For the Falcon it is not possible to set random video modes on
- *     SM124 and SC/TV, only the bootup resolution is supported.
- *
- */
-
-#define ATAFB_TT
-#define ATAFB_STE
-#define ATAFB_EXT
-#define ATAFB_FALCON
-
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/errno.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <linux/tty.h>
-#include <linux/malloc.h>
-#include <linux/delay.h>
-#include <linux/init.h>
-
-#include <asm/setup.h>
-#include <asm/uaccess.h>
-#include <asm/pgtable.h>
-#include <asm/irq.h>
-
-#include <asm/atarihw.h>
-#include <asm/atariints.h>
-
-#include <linux/fb.h>
-#include <asm/atarikb.h>
-
-#define SWITCH_ACIA 0x01		/* modes for switch on OverScan */
-#define SWITCH_SND6 0x40
-#define SWITCH_SND7 0x80
-#define SWITCH_NONE 0x00
-
-
-#define arraysize(x)			(sizeof(x)/sizeof(*(x)))
-
-#define up(x, r) (((x) + (r) - 1) & ~((r)-1))
-
-
-static int default_par=0;	/* default resolution (0=none) */
-
-static int node;		/* node of the /dev/fb?current file */
-
-static unsigned long default_mem_req=0;
-
-static int hwscroll=-1;
-
-static int use_hwscroll = 1;
-
-static int sttt_xres=640,st_yres=400,tt_yres=480;
-static int sttt_xres_virtual=640,sttt_yres_virtual=400;
-static int ovsc_offset=0, ovsc_addlen=0;
-int        ovsc_switchmode=0;
-
-static struct atari_fb_par {
-	unsigned long screen_base;
-	int yres_virtual;
-	union {
-		struct {
-			int mode;
-			int sync;
-		} tt, st;
-		struct falcon_hw {
-			/* Here are fields for storing a video mode, as direct
-			 * parameters for the hardware.
-			 */
-			short sync;
-			short line_width;
-			short line_offset;
-			short st_shift;
-			short f_shift;
-			short vid_control;
-			short vid_mode;
-			short xoffset;
-			short hht, hbb, hbe, hdb, hde, hss;
-			short vft, vbb, vbe, vdb, vde, vss;
-			/* auxiliary information */
-			short mono;
-			short ste_mode;
-			short bpp;
-		} falcon;
-		/* Nothing needed for external mode */
-	} hw;
-} current_par;
-
-/* Don't calculate an own resolution, and thus don't change the one found when
- * booting (currently used for the Falcon to keep settings for internal video
- * hardware extensions (e.g. ScreenBlaster)  */
-static int DontCalcRes = 0; 
-
-#define HHT hw.falcon.hht
-#define HBB hw.falcon.hbb
-#define HBE hw.falcon.hbe
-#define HDB hw.falcon.hdb
-#define HDE hw.falcon.hde
-#define HSS hw.falcon.hss
-#define VFT hw.falcon.vft
-#define VBB hw.falcon.vbb
-#define VBE hw.falcon.vbe
-#define VDB hw.falcon.vdb
-#define VDE hw.falcon.vde
-#define VSS hw.falcon.vss
-#define VCO_CLOCK25		0x04
-#define VCO_CSYPOS		0x10
-#define VCO_VSYPOS		0x20
-#define VCO_HSYPOS		0x40
-#define VCO_SHORTOFFS	0x100
-#define VMO_DOUBLE		0x01
-#define VMO_INTER		0x02
-#define VMO_PREMASK		0x0c
-
-static struct fb_info fb_info;
-
-static unsigned long screen_base;	/* base address of screen */
-static unsigned long real_screen_base;	/* (only for Overscan) */
-
-static int screen_len;
-
-static int current_par_valid=0; 
-
-static int currcon=0;
-
-static int mono_moni=0;
-
-static struct display disp[MAX_NR_CONSOLES];
-
-
-#ifdef ATAFB_EXT
-/* external video handling */
-
-static unsigned			external_xres;
-static unsigned			external_yres;
-static unsigned			external_depth;
-static int				external_pmode;
-static unsigned long	external_addr = 0;
-static unsigned long	external_len;
-static unsigned long	external_vgaiobase = 0;
-static unsigned int		external_bitspercol = 6;
-
-/* 
-++JOE <joe@amber.dinoco.de>: 
-added card type for external driver, is only needed for
-colormap handling.
-*/
-
-enum cardtype { IS_VGA, IS_MV300 };
-static enum cardtype external_card_type = IS_VGA;
-
-/*
-The MV300 mixes the color registers. So we need an array of munged
-indices in order to acces the correct reg.
-*/
-static int MV300_reg_1bit[2]={0,1};
-static int MV300_reg_4bit[16]={
-0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15 };
-static int MV300_reg_8bit[256]={
-0, 128, 64, 192, 32, 160, 96, 224, 16, 144, 80, 208, 48, 176, 112, 240, 
-8, 136, 72, 200, 40, 168, 104, 232, 24, 152, 88, 216, 56, 184, 120, 248, 
-4, 132, 68, 196, 36, 164, 100, 228, 20, 148, 84, 212, 52, 180, 116, 244, 
-12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 
-2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82, 210, 50, 178, 114, 242, 
-10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 
-6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86, 214, 54, 182, 118, 246, 
-14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 
-1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81, 209, 49, 177, 113, 241, 
-9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 
-5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85, 213, 53, 181, 117, 245, 
-13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 
-3, 131, 67, 195, 35, 163, 99, 227, 19, 147, 83, 211, 51, 179, 115, 243, 
-11, 139, 75, 203, 43, 171, 107, 235, 27, 155, 91, 219, 59, 187, 123, 251, 
-7, 135, 71, 199, 39, 167, 103, 231, 23, 151, 87, 215, 55, 183, 119, 247, 
-15, 143, 79, 207, 47, 175, 111, 239, 31, 159, 95, 223, 63, 191, 127, 255 }; 
-
-static int *MV300_reg = MV300_reg_8bit;
-
-/*
-And on the MV300 it's difficult to read out the hardware palette. So we
-just keep track of the set colors in our own array here, and use that!
-*/
-
-static struct { unsigned char red,green,blue,pad; } MV300_color[256];
-#endif /* ATAFB_EXT */
-
-
-static int inverse=0;
-
-extern int fontheight_8x8;
-extern int fontwidth_8x8;
-extern unsigned char fontdata_8x8[];
-
-extern int fontheight_8x16;
-extern int fontwidth_8x16;
-extern unsigned char fontdata_8x16[];
-
-/* import first 16 colors from fbcon.c */
-extern unsigned short packed16_cmap[16];
-
-
-/* ++roman: This structure abstracts from the underlying hardware (ST(e),
- * TT, or Falcon.
- *
- * int (*detect)( void )
- *   This function should detect the current video mode settings and
- *   store them in atari_fb_predefined[0] for later reference by the
- *   user. Return the index+1 of an equivalent predefined mode or 0
- *   if there is no such.
- * 
- * int (*encode_fix)( struct fb_fix_screeninfo *fix,
- *                    struct atari_fb_par *par )
- *   This function should fill in the 'fix' structure based on the
- *   values in the 'par' structure.
- *   
- * int (*decode_var)( struct fb_var_screeninfo *var,
- *                    struct atari_fb_par *par )
- *   Get the video params out of 'var'. If a value doesn't fit, round
- *   it up, if it's too big, return EINVAL.
- *   Round up in the following order: bits_per_pixel, xres, yres, 
- *   xres_virtual, yres_virtual, xoffset, yoffset, grayscale, bitfields, 
- *   horizontal timing, vertical timing.
- *
- * int (*encode_var)( struct fb_var_screeninfo *var,
- *                    struct atari_fb_par *par );
- *   Fill the 'var' structure based on the values in 'par' and maybe
- *   other values read out of the hardware.
- *   
- * void (*get_par)( struct atari_fb_par *par )
- *   Fill the hardware's 'par' structure.
- *   
- * void (*set_par)( struct atari_fb_par *par )
- *   Set the hardware according to 'par'.
- *   
- * int (*setcolreg)( unsigned regno, unsigned red,
- *                   unsigned green, unsigned blue,
- *                   unsigned transp )
- *   Set a single color register. The values supplied are already
- *   rounded down to the hardware's capabilities (according to the
- *   entries in the var structure). Return != 0 for invalid regno.
- *
- * int (*getcolreg)( unsigned regno, unsigned *red,
- *                   unsigned *green, unsigned *blue,
- *                   unsigned *transp )
- *   Read a single color register and split it into
- *   colors/transparent. Return != 0 for invalid regno.
- *
- * void (*set_screen_base)( unsigned long s_base )
- *   Set the base address of the displayed frame buffer. Only called
- *   if yres_virtual > yres or xres_virtual > xres.
- *
- * int (*blank)( int blank_mode )
- *   Blank the screen if blank_mode!=0, else unblank. If blank==NULL then
- *   the caller blanks by setting the CLUT to all black. Return 0 if blanking
- *   succeeded, !=0 if un-/blanking failed due to e.g. a video mode which
- *   doesn't support it. Implements VESA suspend and powerdown modes on
- *   hardware that supports disabling hsync/vsync:
- *       blank_mode==2: suspend vsync, 3:suspend hsync, 4: powerdown.
- */
-
-static struct fb_hwswitch {
-	int  (*detect)( void );
-	int  (*encode_fix)( struct fb_fix_screeninfo *fix,
-						struct atari_fb_par *par );
-	int  (*decode_var)( struct fb_var_screeninfo *var,
-						struct atari_fb_par *par );
-	int  (*encode_var)( struct fb_var_screeninfo *var,
-						struct atari_fb_par *par );
-	void (*get_par)( struct atari_fb_par *par );
-	void (*set_par)( struct atari_fb_par *par );
-	int  (*getcolreg)( unsigned regno, unsigned *red,
-					   unsigned *green, unsigned *blue,
-					   unsigned *transp );
-	int  (*setcolreg)( unsigned regno, unsigned red,
-					   unsigned green, unsigned blue,
-					   unsigned transp );
-	void (*set_screen_base)( unsigned long s_base );
-	int  (*blank)( int blank_mode );
-	int  (*pan_display)( struct fb_var_screeninfo *var,
-						 struct atari_fb_par *par);
-} *fbhw;
-
-static char *autodetect_names[] = {"autodetect", NULL};
-static char *stlow_names[] = {"stlow", NULL};
-static char *stmid_names[] = {"stmid", "default5", NULL};
-static char *sthigh_names[] = {"sthigh", "default4", NULL};
-static char *ttlow_names[] = {"ttlow", NULL};
-static char *ttmid_names[]= {"ttmid", "default1", NULL};
-static char *tthigh_names[]= {"tthigh", "default2", NULL};
-static char *vga2_names[] = {"vga2", NULL};
-static char *vga4_names[] = {"vga4", NULL};
-static char *vga16_names[] = {"vga16", "default3", NULL};
-static char *vga256_names[] = {"vga256", NULL};
-static char *falh2_names[] = {"falh2", NULL};
-static char *falh16_names[] = {"falh16", NULL};
-static char *user0_names[] = {"user0", NULL};
-static char *user1_names[] = {"user1", NULL};
-static char *user2_names[] = {"user2", NULL};
-static char *user3_names[] = {"user3", NULL};
-static char *user4_names[] = {"user4", NULL};
-static char *user5_names[] = {"user5", NULL};
-static char *user6_names[] = {"user6", NULL};
-static char *user7_names[] = {"user7", NULL};
-static char *dummy_names[] = {"dummy", NULL};
-
-static char **fb_var_names[] = {
-	/* Writing the name arrays directly in this array (via "(char *[]){...}")
-	 * crashes gcc 2.5.8 (sigsegv) if the inner array
-	 * contains more than two items. I've also seen that all elements
-	 * were identical to the last (my cross-gcc) :-(*/
-	autodetect_names,
-	stlow_names,
-	stmid_names,
-	sthigh_names,
-	ttlow_names,
-	ttmid_names,
-	tthigh_names,
-	vga2_names,
-	vga4_names,
-	vga16_names,
-	vga256_names,
-	falh2_names,
-	falh16_names,
-	dummy_names, dummy_names, dummy_names, dummy_names,
-	dummy_names, dummy_names, dummy_names, dummy_names,
-	dummy_names, dummy_names,
-	user0_names,
-	user1_names,
-	user2_names,
-	user3_names,
-	user4_names,
-	user5_names,
-	user6_names,
-	user7_names,
-	NULL
-	/* ,NULL */ /* this causes a sigsegv on my gcc-2.5.8 */
-};
-
-static struct fb_var_screeninfo atari_fb_predefined[] = {
- 	/*
- 	 * yres_virtual==0 means use hw-scrolling if possible, else yres
- 	 */
- 	{ /* autodetect */
-	  0, 0, 0, 0, 0, 0, 0, 0,   		/* xres-grayscale */
-	  {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, 	/* red green blue tran*/
-	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
- 	{ /* st low */
-	  320, 200, 320, 0, 0, 0, 4, 0,
-	  {0, 4, 0}, {0, 4, 0}, {0, 4, 0}, {0, 0, 0},
-	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
-	{ /* st mid */
-	  640, 200, 640, 0, 0, 0, 2, 0,
-	  {0, 4, 0}, {0, 4, 0}, {0, 4, 0}, {0, 0, 0},
-	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
-	{ /* st high */
-	  640, 400, 640, 0, 0, 0, 1, 0,
-	  {0, 4, 0}, {0, 4, 0}, {0, 4, 0}, {0, 0, 0},
-	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
-	{ /* tt low */
-	  320, 480, 320, 0, 0, 0, 8, 0,
-	  {0, 4, 0}, {0, 4, 0}, {0, 4, 0}, {0, 0, 0},
-	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
-	{ /* tt mid */
-	  640, 480, 640, 0, 0, 0, 4, 0,
-	  {0, 4, 0}, {0, 4, 0}, {0, 4, 0}, {0, 0, 0},
-	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
-	{ /* tt high */
-	  1280, 960, 1280, 0, 0, 0, 1, 0,
-	  {0, 4, 0}, {0, 4, 0}, {0, 4, 0}, {0, 0, 0},
-	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
-	{ /* vga2 */
-	  640, 480, 640, 0, 0, 0, 1, 0,
-	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
-	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
-	{ /* vga4 */
-	  640, 480, 640, 0, 0, 0, 2, 0,
-	  {0, 4, 0}, {0, 4, 0}, {0, 4, 0}, {0, 0, 0},
-	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
-	{ /* vga16 */
-	  640, 480, 640, 0, 0, 0, 4, 0,
-	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
-	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
-	{ /* vga256 */
-	  640, 480, 640, 0, 0, 0, 8, 0,
-	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
-	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
-	{ /* falh2 */
-	  896, 608, 896, 0, 0, 0, 1, 0,
-	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
-	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
-	{ /* falh16 */
-	  896, 608, 896, 0, 0, 0, 4, 0,
-	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
-	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
-	/* Minor 14..23 free for more standard video modes */
-	{ 0, },
-	{ 0, },
-	{ 0, },
-	{ 0, },
-	{ 0, },
-	{ 0, },
-	{ 0, },
-	{ 0, },
-	{ 0, },
-	{ 0, },
-	/* Minor 24..31 reserved for user defined video modes */
-	{ /* user0, initialized to Rx;y;d from commandline, if supplied */
-	  0, 0, 0, 0, 0, 0, 0, 0,
-	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
-	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
-	{ /* user1 */
-	  0, 0, 0, 0, 0, 0, 0, 0,
-	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
-	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
-	{ /* user2 */
-	  0, 0, 0, 0, 0, 0, 0, 0,
-	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
-	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
-	{ /* user3 */
-	  0, 0, 0, 0, 0, 0, 0, 0,
-	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
-	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
-	{ /* user4 */
-	  0, 0, 0, 0, 0, 0, 0, 0,
-	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
-	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
-	{ /* user5 */
-	  0, 0, 0, 0, 0, 0, 0, 0,
-	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
-	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
-	{ /* user6 */
-	  0, 0, 0, 0, 0, 0, 0, 0,
-	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
-	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
-	{ /* user7 */
-	  0, 0, 0, 0, 0, 0, 0, 0,
-	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
-	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 }
-};
-
-static int num_atari_fb_predefined=arraysize(atari_fb_predefined);
-
-
-static int
-get_video_mode(char *vname)
-{
-    char ***name_list;
-    char **name;
-    int i;
-    name_list=fb_var_names;
-    for (i = 0 ; i < num_atari_fb_predefined ; i++) {
-	name=*(name_list++);
-	if (! name || ! *name)
-	    break;
-	while (*name) {
-	    if (! strcmp(vname, *name))
-		return i+1;
-	    name++;
-	}
-    }
-    return 0;
-}
-
-
-
-/* ------------------- TT specific functions ---------------------- */
-
-#ifdef ATAFB_TT
-
-static int tt_encode_fix( struct fb_fix_screeninfo *fix,
-						  struct atari_fb_par *par )
-
-{
-	int mode, i;
-
-	strcpy(fix->id,"Atari Builtin");
-	fix->smem_start=real_screen_base;
-	fix->smem_len = screen_len;
-	fix->type=FB_TYPE_INTERLEAVED_PLANES;
-	fix->type_aux=2;
-	fix->visual=FB_VISUAL_PSEUDOCOLOR;
-	mode = par->hw.tt.mode & TT_SHIFTER_MODEMASK;
-	if (mode == TT_SHIFTER_TTHIGH || mode == TT_SHIFTER_STHIGH) {
-		fix->type=FB_TYPE_PACKED_PIXELS;
-		fix->type_aux=0;
-		if (mode == TT_SHIFTER_TTHIGH)
-			fix->visual=FB_VISUAL_MONO01;
-	}
-	fix->xpanstep=0;
-	fix->ypanstep=1;
-	fix->ywrapstep=0;
-	fix->line_length = 0;
-	for (i=0; i<arraysize(fix->reserved); i++)
-		fix->reserved[i]=0;
-	return 0;
-}
-
-
-static int tt_decode_var( struct fb_var_screeninfo *var,
-						  struct atari_fb_par *par )
-{
-	int xres=var->xres;
-	int yres=var->yres;
-	int bpp=var->bits_per_pixel;
-	int linelen;
-	int yres_virtual = var->yres_virtual;
-
-	if (mono_moni) {
-		if (bpp > 1 || xres > sttt_xres*2 || yres >tt_yres*2)
-			return -EINVAL;
-		par->hw.tt.mode=TT_SHIFTER_TTHIGH;
-		xres=sttt_xres*2;
-		yres=tt_yres*2;
-		bpp=1;
-	} else {
-		if (bpp > 8 || xres > sttt_xres || yres > tt_yres)
-			return -EINVAL;
-		if (bpp > 4) {
-			if (xres > sttt_xres/2 || yres > tt_yres)
-				return -EINVAL;
-			par->hw.tt.mode=TT_SHIFTER_TTLOW;
-			xres=sttt_xres/2;
-			yres=tt_yres;
-			bpp=8;
-		}
-		else if (bpp > 2) {
-			if (xres > sttt_xres || yres > tt_yres)
-				return -EINVAL;
-			if (xres > sttt_xres/2 || yres > st_yres/2) {
-				par->hw.tt.mode=TT_SHIFTER_TTMID;
-				xres=sttt_xres;
-				yres=tt_yres;
-				bpp=4;
-			}
-			else {
-				par->hw.tt.mode=TT_SHIFTER_STLOW;
-				xres=sttt_xres/2;
-				yres=st_yres/2;
-				bpp=4;
-			}
-		}
-		else if (bpp > 1) {
-			if (xres > sttt_xres || yres > st_yres/2)
-				return -EINVAL;
-			par->hw.tt.mode=TT_SHIFTER_STMID;
-			xres=sttt_xres;
-			yres=st_yres/2;
-			bpp=2;
-		}
-		else if (var->xres > sttt_xres || var->yres > st_yres) {
-			return -EINVAL;
-		}
-		else {
-			par->hw.tt.mode=TT_SHIFTER_STHIGH;
-			xres=sttt_xres;
-			yres=st_yres;
-			bpp=1;
-		}
-	}
-	if (yres_virtual <= 0)
-		yres_virtual = 0;
-	else if (yres_virtual < yres)
-		yres_virtual = yres;
-	if (var->sync & FB_SYNC_EXT)
-		par->hw.tt.sync=0;
-	else
-		par->hw.tt.sync=1;
-	linelen=xres*bpp/8;
-	if (yres_virtual * linelen > screen_len && screen_len)
-		return -EINVAL;
-	if (yres * linelen > screen_len && screen_len)
-		return -EINVAL;
-	if (var->yoffset + yres > yres_virtual && yres_virtual)
-		return -EINVAL;
-	par->yres_virtual = yres_virtual;
-	par->screen_base = screen_base + var->yoffset * linelen;
-	return 0;
-}
-
-static int tt_encode_var( struct fb_var_screeninfo *var,
-						  struct atari_fb_par *par )
-{
-	int linelen, i;
-	var->red.offset=0;
-	var->red.length=4;
-	var->red.msb_right=0;
-	var->grayscale=0;
-
-	var->pixclock=31041;
-	var->left_margin=120;		/* these may be incorrect 	*/
-	var->right_margin=100;
-	var->upper_margin=8;
-	var->lower_margin=16;
-	var->hsync_len=140;
-	var->vsync_len=30;
-
-	var->height=-1;
-	var->width=-1;
-
-	if (par->hw.tt.sync & 1)
-		var->sync=0;
-	else
-		var->sync=FB_SYNC_EXT;
-
-	switch (par->hw.tt.mode & TT_SHIFTER_MODEMASK) {
-	case TT_SHIFTER_STLOW:
-		var->xres=sttt_xres/2;
-		var->xres_virtual=sttt_xres_virtual/2;
-		var->yres=st_yres/2;
-		var->bits_per_pixel=4;
-		break;
-	case TT_SHIFTER_STMID:
-		var->xres=sttt_xres;
-		var->xres_virtual=sttt_xres_virtual;
-		var->yres=st_yres/2;
-		var->bits_per_pixel=2;
-		break;
-	case TT_SHIFTER_STHIGH:
-		var->xres=sttt_xres;
-		var->xres_virtual=sttt_xres_virtual;
-		var->yres=st_yres;
-		var->bits_per_pixel=1;
-		break;
-	case TT_SHIFTER_TTLOW:
-		var->xres=sttt_xres/2;
-		var->xres_virtual=sttt_xres_virtual/2;
-		var->yres=tt_yres;
-		var->bits_per_pixel=8;
-		break;
-	case TT_SHIFTER_TTMID:
-		var->xres=sttt_xres;
-		var->xres_virtual=sttt_xres_virtual;
-		var->yres=tt_yres;
-		var->bits_per_pixel=4;
-		break;
-	case TT_SHIFTER_TTHIGH:
-		var->red.length=0;
-		var->xres=sttt_xres*2;
-		var->xres_virtual=sttt_xres_virtual*2;
-		var->yres=tt_yres*2;
-		var->bits_per_pixel=1;
-		break;
-	}		
-	var->blue=var->green=var->red;
-	var->transp.offset=0;
-	var->transp.length=0;
-	var->transp.msb_right=0;
-	linelen=var->xres_virtual * var->bits_per_pixel / 8;
-	if (! use_hwscroll)
-		var->yres_virtual=var->yres;
-	else if (screen_len)
-		if (par->yres_virtual)
-			var->yres_virtual = par->yres_virtual;
-		else
-			/* yres_virtual==0 means use maximum */
-			var->yres_virtual = screen_len / linelen;
-	else {
-		if (hwscroll < 0)
-			var->yres_virtual = 2 * var->yres;
-		else
-			var->yres_virtual=var->yres+hwscroll * 16;
-	}
-	var->xoffset=0;
-	if (screen_base)
-		var->yoffset=(par->screen_base - screen_base)/linelen;
-	else
-		var->yoffset=0;
-	var->nonstd=0;
-	var->activate=0;
-	var->vmode=FB_VMODE_NONINTERLACED;
-	for (i=0; i<arraysize(var->reserved); i++)
-		var->reserved[i]=0;
-	return 0;
-}
-
-
-static void tt_get_par( struct atari_fb_par *par )
-{
-	unsigned long addr;
-	par->hw.tt.mode=shifter_tt.tt_shiftmode;
-	par->hw.tt.sync=shifter.syncmode;
-	addr = ((shifter.bas_hi & 0xff) << 16) |
-	       ((shifter.bas_md & 0xff) << 8)  |
-	       ((shifter.bas_lo & 0xff));
-	par->screen_base = PTOV(addr);
-}
-
-static void tt_set_par( struct atari_fb_par *par )
-{
-	shifter_tt.tt_shiftmode=par->hw.tt.mode;
-	shifter.syncmode=par->hw.tt.sync;
-	/* only set screen_base if really necessary */
-	if (current_par.screen_base != par->screen_base)
-		fbhw->set_screen_base(par->screen_base);
-}
-
-
-static int tt_getcolreg( unsigned regno, unsigned *red,
-						 unsigned *green, unsigned *blue,
-						 unsigned *transp )
-{
-	if ((shifter_tt.tt_shiftmode & TT_SHIFTER_MODEMASK) == TT_SHIFTER_STHIGH)
-		regno += 254;
-	if (regno > 255)
-		return 1;
-	*blue = tt_palette[regno];
-	*green = (*blue >> 4) & 0xf;
-	*red = (*blue >> 8) & 0xf;
-	*blue &= 0xf;
-	*transp = 0;
-	return 0;
-}
-
-
-static int tt_setcolreg( unsigned regno, unsigned red,
-						 unsigned green, unsigned blue,
-						 unsigned transp )
-{
-	if ((shifter_tt.tt_shiftmode & TT_SHIFTER_MODEMASK) == TT_SHIFTER_STHIGH)
-		regno += 254;
-	if (regno > 255)
-		return 1;
-	tt_palette[regno] = (red << 8) | (green << 4) | blue;
-	if ((shifter_tt.tt_shiftmode & TT_SHIFTER_MODEMASK) ==
-		TT_SHIFTER_STHIGH && regno == 254)
-		tt_palette[0] = 0;
-	return 0;
-}
-
-						  
-static int tt_detect( void )
-
-{	struct atari_fb_par par;
-
-	/* Determine the connected monitor: The DMA sound must be
-	 * disabled before reading the MFP GPIP, because the Sound
-	 * Done Signal and the Monochrome Detect are XORed together!
-	 *
-	 * Even on a TT, we should look if there is a DMA sound. It was
-	 * announced that the Eagle is TT compatible, but only the PCM is
-	 * missing...
-	 */
-	if (ATARIHW_PRESENT(PCM_8BIT)) { 
-		tt_dmasnd.ctrl = DMASND_CTRL_OFF;
-		udelay(20);	/* wait a while for things to settle down */
-	}
-	mono_moni = (mfp.par_dt_reg & 0x80) == 0;
-
-	tt_get_par(&par);
-	tt_encode_var(&atari_fb_predefined[0], &par);
-
-	return 1;
-}
-
-#endif /* ATAFB_TT */
-
-/* ------------------- Falcon specific functions ---------------------- */
-
-#ifdef ATAFB_FALCON
-
-static int mon_type;		/* Falcon connected monitor */
-static int f030_bus_width;	/* Falcon ram bus width (for vid_control) */
-#define F_MON_SM	0
-#define F_MON_SC	1
-#define F_MON_VGA	2
-#define F_MON_TV	3
-
-/* Multisync monitor capabilities */
-/* Atari-TOS defaults if no boot option present */
-static long vfmin=58, vfmax=62, hfmin=31000, hfmax=32000;
-
-static struct pixel_clock {
-	unsigned long f;	/* f/[Hz] */
-	unsigned long t;	/* t/[ps] (=1/f) */
-	int right, hsync, left;	/* standard timing in clock cycles, not pixel */
-		/* hsync initialized in falcon_detect() */
-	int sync_mask;		/* or-mask for hw.falcon.sync to set this clock */
-	int control_mask;	/* ditto, for hw.falcon.vid_control */
-}
-f25  = {25175000, 39721, 18, 0, 42, 0x0, VCO_CLOCK25},
-f32  = {32000000, 31250, 18, 0, 42, 0x0, 0},
-fext = {       0,     0, 18, 0, 42, 0x1, 0};
-
-/* VIDEL-prescale values [mon_type][pixel_length from VCO] */
-static int vdl_prescale[4][3] = {{4,2,1}, {4,2,1}, {4,2,2}, {4,2,1}};
-
-/* Default hsync timing [mon_type] in picoseconds */
-static long h_syncs[4] = {3000000, 4875000, 4000000, 4875000};
-
-
-static inline int hxx_prescale(struct falcon_hw *hw)
-{
-	return hw->ste_mode ? 16 :
-		   vdl_prescale[mon_type][hw->vid_mode >> 2 & 0x3];
-}
-
-static int falcon_encode_fix( struct fb_fix_screeninfo *fix,
-							  struct atari_fb_par *par )
-{
-	int i;
-
-	strcpy(fix->id, "Atari Builtin");
-	fix->smem_start = real_screen_base;
-	fix->smem_len = screen_len;
-	fix->type = FB_TYPE_INTERLEAVED_PLANES;
-	fix->type_aux = 2;
-	fix->visual = FB_VISUAL_PSEUDOCOLOR;
-	fix->xpanstep = 1;
-	fix->ypanstep = 1;
-	fix->ywrapstep = 0;
-	if (par->hw.falcon.mono) {
-		fix->type = FB_TYPE_PACKED_PIXELS;
-		fix->type_aux = 0;
-		/* no smooth scrolling with longword aligned video mem */
-		fix->xpanstep = 32;
-	}
-	else if (par->hw.falcon.f_shift & 0x100) {
-		fix->type = FB_TYPE_PACKED_PIXELS;
-		fix->type_aux = 0;
-		/* Is this ok or should it be DIRECTCOLOR? */
-		fix->visual = FB_VISUAL_TRUECOLOR;
-		fix->xpanstep = 2;
-	}
-	fix->line_length = 0;
-	for (i=0; i<arraysize(fix->reserved); i++)
-		fix->reserved[i]=0;
-	return 0;
-}
-
-
-static int falcon_decode_var( struct fb_var_screeninfo *var,
-							  struct atari_fb_par *par )
-{
-	int bpp = var->bits_per_pixel;
-	int xres = var->xres;
-	int yres = var->yres;
-	int xres_virtual = var->xres_virtual;
-	int yres_virtual = var->yres_virtual;
-	int left_margin, right_margin, hsync_len;
-	int upper_margin, lower_margin, vsync_len;
-	int linelen;
-	int interlace = 0, doubleline = 0;
-	struct pixel_clock *pclock;
-	int plen; /* width of pixel in clock cycles */
-	int xstretch;
-	int prescale;
-	int longoffset = 0;
-	int hfreq, vfreq;
-
-/*
-	Get the video params out of 'var'. If a value doesn't fit, round
-	it up, if it's too big, return EINVAL.
-	Round up in the following order: bits_per_pixel, xres, yres, 
-	xres_virtual, yres_virtual, xoffset, yoffset, grayscale, bitfields, 
-	horizontal timing, vertical timing.
-
-	There is a maximum of screen resolution determined by pixelclock
-	and minimum frame rate -- (X+hmarg.)*(Y+vmarg.)*vfmin <= pixelclock.
-	In interlace mode this is     "     *    "     *vfmin <= pixelclock.
-	Additional constraints: hfreq.
-	Frequency range for multisync monitors is given via command line.
-	For TV and SM124 both frequencies are fixed.
-
-	X % 16 == 0 to fit 8x?? font (except 1 bitplane modes must use X%32==0)
-	Y % 16 == 0 to fit 8x16 font
-	Y % 8 == 0 if Y<400
-
-	Currently interlace and doubleline mode in var are ignored. 
-	On SM124 and TV only the standard resolutions can be used.
-*/
-
-	/* Reject uninitialized mode */
-	if (!xres || !yres || !bpp)
-		return -EINVAL;
-
-	if (mon_type == F_MON_SM && bpp != 1) {
-		return -EINVAL;
-	}
-	else if (bpp <= 1) {
-		bpp = 1;
-		par->hw.falcon.f_shift = 0x400;
-		par->hw.falcon.st_shift = 0x200;
-	}
-	else if (bpp <= 2) {
-		bpp = 2;
-		par->hw.falcon.f_shift = 0x000;
-		par->hw.falcon.st_shift = 0x100;
-	}
-	else if (bpp <= 4) {
-		bpp = 4;
-		par->hw.falcon.f_shift = 0x000;
-		par->hw.falcon.st_shift = 0x000;
-	}
-	else if (bpp <= 8) {
-		bpp = 8;
-		par->hw.falcon.f_shift = 0x010;
-	}
-	else if (bpp <= 16) {
-		bpp = 16; /* packed pixel mode */
-		par->hw.falcon.f_shift = 0x100; /* hicolor, no overlay */
-	}
-	else
-		return -EINVAL;
-	par->hw.falcon.bpp = bpp;
-
-	if (mon_type == F_MON_SM || DontCalcRes) {
-		/* Skip all calculations. VGA/TV/SC1224 only supported. */
-		struct fb_var_screeninfo *myvar = &atari_fb_predefined[0];
-		
-		if (bpp > myvar->bits_per_pixel ||
-			var->xres > myvar->xres ||
-			var->yres > myvar->yres)
-			return -EINVAL;
-		fbhw->get_par(par);	/* Current par will be new par */
-		goto set_screen_base;	/* Don't forget this */
-	}
-
-	/* Only some fixed resolutions < 640x400 */
-	if (xres <= 320)
-		xres = 320;
-	else if (xres <= 640 && bpp != 16)
-		xres = 640;
-	if (yres <= 200)
-		yres = 200;
-	else if (yres <= 240)
-		yres = 240;
-	else if (yres <= 400)
-		yres = 400;
-
-	/* 2 planes must use STE compatibility mode */
-	par->hw.falcon.ste_mode = bpp==2;
-	par->hw.falcon.mono = bpp==1;
-
-	/* Total and visible scanline length must be a multiple of one longword,
-	 * this and the console fontwidth yields the alignment for xres and
-	 * xres_virtual.
-	 * TODO: this way "odd" fontheights are not supported
-	 *
-	 * Special case in STE mode: blank and graphic positions don't align,
-	 * avoid trash at right margin
-	 */
-	if (par->hw.falcon.ste_mode)
-		xres = (xres + 63) & ~63;
-	else if (bpp == 1)
-		xres = (xres + 31) & ~31;
-	else
-		xres = (xres + 15) & ~15;
-	if (yres >= 400)
-		yres = (yres + 15) & ~15;
-	else
-		yres = (yres + 7) & ~7;
-
-	if (xres_virtual < xres)
-		xres_virtual = xres;
-	else if (bpp == 1)
-		xres_virtual = (xres_virtual + 31) & ~31;
-	else
-		xres_virtual = (xres_virtual + 15) & ~15;
-
-	if (yres_virtual <= 0)
-		yres_virtual = 0;
-	else if (yres_virtual < yres)
-		yres_virtual = yres;
-
-	/* backward bug-compatibility */
-	if (var->pixclock > 1)
-		var->pixclock -= 1;
-
-	par->hw.falcon.line_width = bpp * xres / 16;
-	par->hw.falcon.line_offset = bpp * (xres_virtual - xres) / 16;
-
-	/* single or double pixel width */
-	xstretch = (xres < 640) ? 2 : 1;
-
-#if 0 /* SM124 supports only 640x400, this is rejected above */
-	if (mon_type == F_MON_SM) {
-		if (xres != 640 && yres != 400)
-			return -EINVAL;
-		plen = 1;
-		pclock = &f32;
-		/* SM124-mode is special */
-		par->hw.falcon.ste_mode = 1;
-		par->hw.falcon.f_shift = 0x000;
-		par->hw.falcon.st_shift = 0x200;
-		left_margin = hsync_len = 128 / plen;
-		right_margin = 0;
-		/* TODO set all margins */
-	}
-	else
-#endif
-	if (mon_type == F_MON_SC || mon_type == F_MON_TV) {
-		plen = 2 * xstretch;
-		if (var->pixclock > f32.t * plen)
-			return -EINVAL;
-		pclock = &f32;
-		if (yres > 240)
-			interlace = 1;
-		if (var->pixclock == 0) {
-			/* set some minimal margins which center the screen */
-			left_margin = 32;
-			right_margin = 18;
-			hsync_len = pclock->hsync / plen;
-			upper_margin = 31;
-			lower_margin = 14;
-			vsync_len = interlace ? 3 : 4;
-		} else {
-			left_margin = var->left_margin;
-			right_margin = var->right_margin;
-			hsync_len = var->hsync_len;
-			upper_margin = var->upper_margin;
-			lower_margin = var->lower_margin;
-			vsync_len = var->vsync_len;
-			if (var->vmode & FB_VMODE_INTERLACED) {
-				upper_margin = (upper_margin + 1) / 2;
-				lower_margin = (lower_margin + 1) / 2;
-				vsync_len = (vsync_len + 1) / 2;
-			} else if (var->vmode & FB_VMODE_DOUBLE) {
-				upper_margin *= 2;
-				lower_margin *= 2;
-				vsync_len *= 2;
-			}
-		}
-	}
-	else
-	{	/* F_MON_VGA */
-		if (bpp == 16)
-			xstretch = 2; /* Double pixel width only for hicolor */
-		/* Default values are used for vert./hor. timing if no pixelclock given. */
-		if (var->pixclock == 0) {
-			int linesize;
-
-			/* Choose master pixelclock depending on hor. timing */
-			plen = 1 * xstretch;
-			if ((plen * xres + f25.right+f25.hsync+f25.left) * hfmin < f25.f)
-				pclock = &f25;
-			else if ((plen * xres + f32.right+f32.hsync+f32.left) * hfmin < f32.f)
-				pclock = &f32;
-			else if ((plen * xres + fext.right+fext.hsync+fext.left) * hfmin < fext.f
-			         && fext.f)
-				pclock = &fext;
-			else
-				return -EINVAL;
-
-			left_margin = pclock->left / plen;
-			right_margin = pclock->right / plen;
-			hsync_len = pclock->hsync / plen;
-			linesize = left_margin + xres + right_margin + hsync_len;
-			upper_margin = 31;
-			lower_margin = 11;
-			vsync_len = 3;
-		}
-		else {
-			/* Choose largest pixelclock <= wanted clock */
-			int i;
-			unsigned long pcl = ULONG_MAX;
-			pclock = 0;
-			for (i=1; i <= 4; i *= 2) {
-				if (f25.t*i >= var->pixclock && f25.t*i < pcl) {
-					pcl = f25.t * i;
-					pclock = &f25;
-				}
-				if (f32.t*i >= var->pixclock && f32.t*i < pcl) {
-					pcl = f32.t * i;
-					pclock = &f32;
-				}
-				if (fext.t && fext.t*i >= var->pixclock && fext.t*i < pcl) {
-					pcl = fext.t * i;
-					pclock = &fext;
-				}
-			}
-			if (!pclock)
-				return -EINVAL;
-			plen = pcl / pclock->t;
-
-			left_margin = var->left_margin;
-			right_margin = var->right_margin;
-			hsync_len = var->hsync_len;
-			upper_margin = var->upper_margin;
-			lower_margin = var->lower_margin;
-			vsync_len = var->vsync_len;
-			/* Internal unit is [single lines per (half-)frame] */
-			if (var->vmode & FB_VMODE_INTERLACED) {
-				/* # lines in half frame */
-				/* External unit is [lines per full frame] */
-				upper_margin = (upper_margin + 1) / 2;
-				lower_margin = (lower_margin + 1) / 2;
-				vsync_len = (vsync_len + 1) / 2;
-			}
-			else if (var->vmode & FB_VMODE_DOUBLE) {
-				/* External unit is [double lines per frame] */
-				upper_margin *= 2;
-				lower_margin *= 2;
-				vsync_len *= 2;
-			}
-		}
-		if (pclock == &fext)
-			longoffset = 1; /* VIDEL doesn't synchronize on short offset */
-	}
-	/* Is video bus bandwidth (32MB/s) too low for this resolution? */
-	/* this is definitely wrong if bus clock != 32MHz */
-	if (pclock->f / plen / 8 * bpp > 32000000L)
-		return -EINVAL;
-
-	if (vsync_len < 1)
-		vsync_len = 1;
-
-	/* include sync lengths in right/lower margin for all calculations */
-	right_margin += hsync_len;
-	lower_margin += vsync_len;
-
-	/* ! In all calculations of margins we use # of lines in half frame
-	 * (which is a full frame in non-interlace mode), so we can switch
-	 * between interlace and non-interlace without messing around
-	 * with these.
-	 */
-  again:
-	/* Set base_offset 128 and video bus width */
-	par->hw.falcon.vid_control = mon_type | f030_bus_width;
-	if (!longoffset)
-		par->hw.falcon.vid_control |= VCO_SHORTOFFS;	/* base_offset 64 */
-	if (var->sync & FB_SYNC_HOR_HIGH_ACT)
-		par->hw.falcon.vid_control |= VCO_HSYPOS;
-	if (var->sync & FB_SYNC_VERT_HIGH_ACT)
-		par->hw.falcon.vid_control |= VCO_VSYPOS;
-	/* Pixelclock */
-	par->hw.falcon.vid_control |= pclock->control_mask;
-	/* External or internal clock */
-	par->hw.falcon.sync = pclock->sync_mask | 0x2;
-	/* Pixellength and prescale */
-	par->hw.falcon.vid_mode = (2/plen) << 2;
-	if (doubleline)
-		par->hw.falcon.vid_mode |= VMO_DOUBLE;
-	if (interlace)
-		par->hw.falcon.vid_mode |= VMO_INTER;
-
-	/*********************
-	Horizontal timing: unit = [master clock cycles]
-	unit of hxx-registers: [master clock cycles * prescale]
-	Hxx-registers are 9 bit wide
-
-	1 line = ((hht + 2) * 2 * prescale) clock cycles
-
-	graphic output = hdb & 0x200 ?
-	       ((hht+2)*2 - hdb + hde) * prescale - hdboff + hdeoff:
-	       ( hht + 2  - hdb + hde) * prescale - hdboff + hdeoff
-	(this must be a multiple of plen*128/bpp, on VGA pixels
-	 to the right may be cut off with a bigger right margin)
-
-	start of graphics relative to start of 1st halfline = hdb & 0x200 ?
-	       (hdb - hht - 2) * prescale + hdboff :
-	       hdb * prescale + hdboff
-
-	end of graphics relative to start of 1st halfline =
-	       (hde + hht + 2) * prescale + hdeoff
-	*********************/
-	/* Calculate VIDEL registers */
-	{
-	int hdb_off, hde_off, base_off;
-	int gstart, gend1, gend2, align;
-
-	prescale = hxx_prescale(&par->hw.falcon);
-	base_off = par->hw.falcon.vid_control & VCO_SHORTOFFS ? 64 : 128;
-
-	/* Offsets depend on video mode */
-	/* Offsets are in clock cycles, divide by prescale to
-	 * calculate hd[be]-registers
-	 */
-	if (par->hw.falcon.f_shift & 0x100) {
-		align = 1;
-		hde_off = 0;
-		hdb_off = (base_off + 16 * plen) + prescale;
-	}
-	else {
-		align = 128 / bpp;
-		hde_off = ((128 / bpp + 2) * plen);
-		if (par->hw.falcon.ste_mode)
-			hdb_off = (64 + base_off + (128 / bpp + 2) * plen) + prescale;
-		else
-			hdb_off = (base_off + (128 / bpp + 18) * plen) + prescale;
-	}
-
-	gstart = (prescale/2 + plen * left_margin) / prescale;
-	/* gend1 is for hde (gend-gstart multiple of align), shifter's xres */
-	gend1 = gstart + ((xres + align-1) / align)*align * plen / prescale;
-	/* gend2 is for hbb, visible xres (rest to gend1 is cut off by hblank) */
-	gend2 = gstart + xres * plen / prescale;
-	par->HHT = plen * (left_margin + xres + right_margin) /
-			   (2 * prescale) - 2;
-/*	par->HHT = (gend2 + plen * right_margin / prescale) / 2 - 2;*/
-
-	par->HDB = gstart - hdb_off/prescale;
-	par->HBE = gstart;
-	if (par->HDB < 0) par->HDB += par->HHT + 2 + 0x200;
-	par->HDE = gend1 - par->HHT - 2 - hde_off/prescale;
-	par->HBB = gend2 - par->HHT - 2;
-#if 0
-	/* One more Videl constraint: data fetch of two lines must not overlap */
-	if (par->HDB & 0x200  &&  par->HDB & ~0x200 - par->HDE <= 5) {
-		/* if this happens increase margins, decrease hfreq. */
-	}
-#endif
-	if (hde_off % prescale)
-		par->HBB++;		/* compensate for non matching hde and hbb */
-	par->HSS = par->HHT + 2 - plen * hsync_len / prescale;
-	if (par->HSS < par->HBB)
-		par->HSS = par->HBB;
-	}
-
-	/*  check hor. frequency */
-	hfreq = pclock->f / ((par->HHT+2)*prescale*2);
-	if (hfreq > hfmax && mon_type!=F_MON_VGA) {
-		/* ++guenther:   ^^^^^^^^^^^^^^^^^^^ can't remember why I did this */
-		/* Too high -> enlarge margin */
-		left_margin += 1;
-		right_margin += 1;
-		goto again;
-	}
-	if (hfreq > hfmax || hfreq < hfmin)
-		return -EINVAL;
-
-	/* Vxx-registers */
-	/* All Vxx must be odd in non-interlace, since frame starts in the middle
-	 * of the first displayed line!
-	 * One frame consists of VFT+1 half lines. VFT+1 must be even in
-	 * non-interlace, odd in interlace mode for synchronisation.
-	 * Vxx-registers are 11 bit wide
-	 */
-	par->VBE = (upper_margin * 2 + 1); /* must begin on odd halfline */
-	par->VDB = par->VBE;
-	par->VDE = yres;
-	if (!interlace) par->VDE <<= 1;
-	if (doubleline) par->VDE <<= 1;  /* VDE now half lines per (half-)frame */
-	par->VDE += par->VDB;
-	par->VBB = par->VDE;
-	par->VFT = par->VBB + (lower_margin * 2 - 1) - 1;
-	par->VSS = par->VFT+1 - (vsync_len * 2 - 1);
-	/* vbb,vss,vft must be even in interlace mode */
-	if (interlace) {
-		par->VBB++;
-		par->VSS++;
-		par->VFT++;
-	}
-
-	/* V-frequency check, hope I didn't create any loop here. */
-	/* Interlace and doubleline are mutually exclusive. */
-	vfreq = (hfreq * 2) / (par->VFT + 1);
-	if      (vfreq > vfmax && !doubleline && !interlace) {
-		/* Too high -> try again with doubleline */
-		doubleline = 1;
-		goto again;
-	}
-	else if (vfreq < vfmin && !interlace && !doubleline) {
-		/* Too low -> try again with interlace */
-		interlace = 1;
-		goto again;
-	}
-	else if (vfreq < vfmin && doubleline) {
-		/* Doubleline too low -> clear doubleline and enlarge margins */
-		int lines;
-		doubleline = 0;
-		for (lines=0; (hfreq*2)/(par->VFT+1+4*lines-2*yres)>vfmax; lines++)
-			;
-		upper_margin += lines;
-		lower_margin += lines;
-		goto again;
-	}
-	else if (vfreq > vfmax && doubleline) {
-		/* Doubleline too high -> enlarge margins */
-		int lines;
-		for (lines=0; (hfreq*2)/(par->VFT+1+4*lines)>vfmax; lines+=2)
-			;
-		upper_margin += lines;
-		lower_margin += lines;
-		goto again;
-	}
-	else if (vfreq > vfmax && interlace) {
-		/* Interlace, too high -> enlarge margins */
-		int lines;
-		for (lines=0; (hfreq*2)/(par->VFT+1+4*lines)>vfmax; lines++)
-			;
-		upper_margin += lines;
-		lower_margin += lines;
-		goto again;
-	}
-	else if (vfreq < vfmin || vfreq > vfmax)
-		return -EINVAL;
-
-  set_screen_base:
-	linelen = xres_virtual * bpp / 8;
-	if (yres_virtual * linelen > screen_len && screen_len)
-		return -EINVAL;
-	if (yres * linelen > screen_len && screen_len)
-		return -EINVAL;
-	if (var->yoffset + yres > yres_virtual && yres_virtual)
-		return -EINVAL;
-	par->yres_virtual = yres_virtual;
-	par->screen_base = screen_base + var->yoffset * linelen;
-	par->hw.falcon.xoffset = 0;
-
-	return 0;
-}
-
-static int falcon_encode_var( struct fb_var_screeninfo *var,
-							  struct atari_fb_par *par )
-{
-/* !!! only for VGA !!! */
-	int linelen, i;
-	int prescale, plen;
-	int hdb_off, hde_off, base_off;
-	struct falcon_hw *hw = &par->hw.falcon;
-
-	/* possible frequencies: 25.175 or 32MHz */
-	var->pixclock = hw->sync & 0x1 ? fext.t :
-	                hw->vid_control & VCO_CLOCK25 ? f25.t : f32.t;
-
-	var->height=-1;
-	var->width=-1;
-
-	var->sync=0;
-	if (hw->vid_control & VCO_HSYPOS)
-		var->sync |= FB_SYNC_HOR_HIGH_ACT;
-	if (hw->vid_control & VCO_VSYPOS)
-		var->sync |= FB_SYNC_VERT_HIGH_ACT;
-
-	var->vmode = FB_VMODE_NONINTERLACED;
-	if (hw->vid_mode & VMO_INTER)
-		var->vmode |= FB_VMODE_INTERLACED;
-	if (hw->vid_mode & VMO_DOUBLE)
-		var->vmode |= FB_VMODE_DOUBLE;
-	
-	/* visible y resolution:
-	 * Graphics display starts at line VDB and ends at line
-	 * VDE. If interlace mode off unit of VC-registers is
-	 * half lines, else lines.
-	 */
-	var->yres = hw->vde - hw->vdb;
-	if (!(var->vmode & FB_VMODE_INTERLACED))
-		var->yres >>= 1;
-	if (var->vmode & FB_VMODE_DOUBLE)
-		var->yres >>= 1;
-
-	/* to get bpp, we must examine f_shift and st_shift.
-	 * f_shift is valid if any of bits no. 10, 8 or 4
-	 * is set. Priority in f_shift is: 10 ">" 8 ">" 4, i.e.
-	 * if bit 10 set then bit 8 and bit 4 don't care...
-	 * If all these bits are 0 get display depth from st_shift
-	 * (as for ST and STE)
-	 */
-	if (hw->f_shift & 0x400)		/* 2 colors */
-		var->bits_per_pixel = 1;
-	else if (hw->f_shift & 0x100)	/* hicolor */
-		var->bits_per_pixel = 16;
-	else if (hw->f_shift & 0x010)	/* 8 bitplanes */
-		var->bits_per_pixel = 8;
-	else if (hw->st_shift == 0)
-		var->bits_per_pixel = 4;
-	else if (hw->st_shift == 0x100)
-		var->bits_per_pixel = 2;
-	else /* if (hw->st_shift == 0x200) */
-		var->bits_per_pixel = 1;
-
-	var->xres = hw->line_width * 16 / var->bits_per_pixel;
-	var->xres_virtual = var->xres + hw->line_offset * 16 / var->bits_per_pixel;
-	if (hw->xoffset)
-		var->xres_virtual += 16;
-
-	if (var->bits_per_pixel == 16) {
-		var->red.offset=11;
-		var->red.length=5;
-		var->red.msb_right=0;
-		var->green.offset=5;
-		var->green.length=6;
-		var->green.msb_right=0;
-		var->blue.offset=0;
-		var->blue.length=5;
-		var->blue.msb_right=0;
-	}
-	else {
-		var->red.offset=0;
-		var->red.length = hw->ste_mode ? 4 : 6;
-		var->red.msb_right=0;
-		var->grayscale=0;
-		var->blue=var->green=var->red;
-	}
-	var->transp.offset=0;
-	var->transp.length=0;
-	var->transp.msb_right=0;
-
-	linelen = var->xres_virtual * var->bits_per_pixel / 8;
-	if (screen_len)
-		if (par->yres_virtual)
-			var->yres_virtual = par->yres_virtual;
-		else
-			/* yres_virtual==0 means use maximum */
-			var->yres_virtual = screen_len / linelen;
-	else {
-		if (hwscroll < 0)
-			var->yres_virtual = 2 * var->yres;
-		else
-			var->yres_virtual=var->yres+hwscroll * 16;
-	}
-	var->xoffset=0; /* TODO change this */
-
-	/* hdX-offsets */
-	prescale = hxx_prescale(hw);
-	plen = 4 >> (hw->vid_mode >> 2 & 0x3);
-	base_off = hw->vid_control & VCO_SHORTOFFS ? 64 : 128;
-	if (hw->f_shift & 0x100) {
-		hde_off = 0;
-		hdb_off = (base_off + 16 * plen) + prescale;
-	}
-	else {
-		hde_off = ((128 / var->bits_per_pixel + 2) * plen);
-		if (hw->ste_mode)
-			hdb_off = (64 + base_off + (128 / var->bits_per_pixel + 2) * plen)
-					 + prescale;
-		else
-			hdb_off = (base_off + (128 / var->bits_per_pixel + 18) * plen)
-					 + prescale;
-	}
-
-	/* Right margin includes hsync */
-	var->left_margin = hdb_off + prescale * ((hw->hdb & 0x1ff) -
-					   (hw->hdb & 0x200 ? 2+hw->hht : 0));
-	if (hw->ste_mode || mon_type!=F_MON_VGA)
-		var->right_margin = prescale * (hw->hht + 2 - hw->hde) - hde_off;
-	else
-		/* can't use this in ste_mode, because hbb is +1 off */
-		var->right_margin = prescale * (hw->hht + 2 - hw->hbb);
-	var->hsync_len = prescale * (hw->hht + 2 - hw->hss);
-
-	/* Lower margin includes vsync */
-	var->upper_margin = hw->vdb / 2 ;  /* round down to full lines */
-	var->lower_margin = (hw->vft+1 - hw->vde + 1) / 2; /* round up */
-	var->vsync_len    = (hw->vft+1 - hw->vss + 1) / 2; /* round up */
-	if (var->vmode & FB_VMODE_INTERLACED) {
-		var->upper_margin *= 2;
-		var->lower_margin *= 2;
-		var->vsync_len *= 2;
-	}
-	else if (var->vmode & FB_VMODE_DOUBLE) {
-		var->upper_margin = (var->upper_margin + 1) / 2;
-		var->lower_margin = (var->lower_margin + 1) / 2;
-		var->vsync_len = (var->vsync_len + 1) / 2;
-	}
-
-	var->pixclock *= plen;
-	var->left_margin /= plen;
-	var->right_margin /= plen;
-	var->hsync_len /= plen;
-
-	var->right_margin -= var->hsync_len;
-	var->lower_margin -= var->vsync_len;
-
-	if (screen_base)
-		var->yoffset=(par->screen_base - screen_base)/linelen;
-	else
-		var->yoffset=0;
-	var->nonstd=0;	/* what is this for? */
-	var->activate=0;
-	for (i=0; i<arraysize(var->reserved); i++)
-		var->reserved[i]=0;
-	return 0;
-}
-
-
-static int f_change_mode = 0;
-static struct falcon_hw f_new_mode;
-static int f_pan_display = 0;
-
-static void falcon_get_par( struct atari_fb_par *par )
-{
-	unsigned long addr;
-	struct falcon_hw *hw = &par->hw.falcon;
-
-	hw->line_width = shifter_f030.scn_width;
-	hw->line_offset = shifter_f030.off_next;
-	hw->st_shift = videl.st_shift & 0x300;
-	hw->f_shift = videl.f_shift;
-	hw->vid_control = videl.control;
-	hw->vid_mode = videl.mode;
-	hw->sync = shifter.syncmode & 0x1;
-	hw->xoffset = videl.xoffset & 0xf;
-	hw->hht = videl.hht;
-	hw->hbb = videl.hbb;
-	hw->hbe = videl.hbe;
-	hw->hdb = videl.hdb;
-	hw->hde = videl.hde;
-	hw->hss = videl.hss;
-	hw->vft = videl.vft;
-	hw->vbb = videl.vbb;
-	hw->vbe = videl.vbe;
-	hw->vdb = videl.vdb;
-	hw->vde = videl.vde;
-	hw->vss = videl.vss;
-
-	addr = (shifter.bas_hi & 0xff) << 16 |
-	       (shifter.bas_md & 0xff) << 8  |
-	       (shifter.bas_lo & 0xff);
-	par->screen_base = PTOV(addr);
-
-	/* derived parameters */
-	hw->ste_mode = (hw->f_shift & 0x510)==0 && hw->st_shift==0x100;
-	hw->mono = (hw->f_shift & 0x400) ||
-	           ((hw->f_shift & 0x510)==0 && hw->st_shift==0x200);
-}
-
-static void falcon_set_par( struct atari_fb_par *par )
-{
-	f_change_mode = 0;
-
-	/* only set screen_base if really necessary */
-	if (current_par.screen_base != par->screen_base)
-		fbhw->set_screen_base(par->screen_base);
-
-	/* Don't touch any other registers if we keep the default resolution */
-	if (DontCalcRes)
-		return;
-
-	/* Tell vbl-handler to change video mode.
-	 * We change modes only on next VBL, to avoid desynchronisation
-	 * (a shift to the right and wrap around by a random number of pixels
-	 * in all monochrome modes).
-	 * This seems to work on my Falcon.
-	 */
-	f_new_mode = par->hw.falcon;
-	f_change_mode = 1;
-}
-
-
-static void falcon_vbl_switcher( int irq, void *dummy, struct pt_regs *fp )
-{
-	struct falcon_hw *hw = &f_new_mode;
-
-	if (f_change_mode) {
-		f_change_mode = 0;
-
-		if (hw->sync & 0x1) {
-			/* Enable external pixelclock. This code only for ScreenWonder */
-			*(volatile unsigned short*)0xffff9202 = 0xffbf;
-		}
-		else {
-			/* Turn off external clocks. Read sets all output bits to 1. */
-			*(volatile unsigned short*)0xffff9202;
-		}
-		shifter.syncmode = hw->sync;
-
-		videl.hht = hw->hht;
-		videl.hbb = hw->hbb;
-		videl.hbe = hw->hbe;
-		videl.hdb = hw->hdb;
-		videl.hde = hw->hde;
-		videl.hss = hw->hss;
-		videl.vft = hw->vft;
-		videl.vbb = hw->vbb;
-		videl.vbe = hw->vbe;
-		videl.vdb = hw->vdb;
-		videl.vde = hw->vde;
-		videl.vss = hw->vss;
-
-		videl.f_shift = 0; /* write enables Falcon palette, 0: 4 planes */
-		if (hw->ste_mode) {
-			videl.st_shift = hw->st_shift; /* write enables STE palette */
-		}
-		else {
-			/* IMPORTANT:
-			 * set st_shift 0, so we can tell the screen-depth if f_shift==0.
-			 * Writing 0 to f_shift enables 4 plane Falcon mode but
-			 * doesn't set st_shift. st_shift!=0 (!=4planes) is impossible
-			 * with Falcon palette.
-			 */
-			videl.st_shift = 0;
-			/* now back to Falcon palette mode */
-			videl.f_shift = hw->f_shift;
-		}
-		/* writing to st_shift changed scn_width and vid_mode */
-		videl.xoffset = hw->xoffset;
-		shifter_f030.scn_width = hw->line_width;
-		shifter_f030.off_next = hw->line_offset;
-		videl.control = hw->vid_control;
-		videl.mode = hw->vid_mode;
-	}
-	if (f_pan_display) {
-		f_pan_display = 0;
-		videl.xoffset = current_par.hw.falcon.xoffset;
-		shifter_f030.off_next = current_par.hw.falcon.line_offset;
-	}
-}
-
-
-static int falcon_pan_display( struct fb_var_screeninfo *var,
-							   struct atari_fb_par *par )
-{
-	int xoffset;
-	int bpp = disp[currcon].var.bits_per_pixel;
-
-	if (bpp == 1)
-		var->xoffset = up(var->xoffset, 32);
-	if (bpp != 16)
-		par->hw.falcon.xoffset = var->xoffset & 15;
-	else {
-		par->hw.falcon.xoffset = 0;
-		var->xoffset = up(var->xoffset, 2);
-	}
-	par->hw.falcon.line_offset = bpp *
-	       	(disp[currcon].var.xres_virtual - disp[currcon].var.xres) / 16;
-	if (par->hw.falcon.xoffset)
-		par->hw.falcon.line_offset -= bpp;
-	xoffset = var->xoffset - par->hw.falcon.xoffset;
-
-	par->screen_base = screen_base +
-	        (var->yoffset * disp[currcon].var.xres_virtual + xoffset) * bpp / 8;
-	if (fbhw->set_screen_base)
-		fbhw->set_screen_base (par->screen_base);
-	else
-		return -EINVAL; /* shouldn't happen */
-	f_pan_display = 1;
-	return 0;
-}
-
-
-static int falcon_getcolreg( unsigned regno, unsigned *red,
-				 unsigned *green, unsigned *blue,
-				 unsigned *transp )
-{	unsigned long col;
-	
-	if (regno > 255)
-		return 1;
-	/* This works in STE-mode (with 4bit/color) since f030_col-registers
-	 * hold up to 6bit/color.
-	 * Even with hicolor r/g/b=5/6/5 bit!
-	 */
-	col = f030_col[regno];
-	*red = (col >> 26) & 0x3f;
-	*green = (col >> 18) & 0x3f;
-	*blue = (col >> 2) & 0x3f;
-	*transp = 0;
-	return 0;
-}
-
-
-static int falcon_setcolreg( unsigned regno, unsigned red,
-							 unsigned green, unsigned blue,
-							 unsigned transp )
-{
-	if (regno > 255)
-		return 1;
-	f030_col[regno] = (red << 26) | (green << 18) | (blue << 2);
-	if (regno < 16) {
-		shifter_tt.color_reg[regno] =
-			(((red & 0xe) >> 1) | ((red & 1) << 3) << 8) |
-			(((green & 0xe) >> 1) | ((green & 1) << 3) << 4) |
-			((blue & 0xe) >> 1) | ((blue & 1) << 3);
-		packed16_cmap[regno] = (red << 11) | (green << 5) | blue;
-	}
-	return 0;
-}
-
-
-static int falcon_blank( int blank_mode )
-{
-/* ++guenther: we can switch off graphics by changing VDB and VDE,
- * so VIDEL doesn't hog the bus while saving.
- * (this may affect usleep()).
- */
-	int vdb, vss, hbe, hss;
-
-	if (mon_type == F_MON_SM)	/* this doesn't work on SM124 */
-		return 1;
-
-	vdb = current_par.VDB;
-	vss = current_par.VSS;
-	hbe = current_par.HBE;
-	hss = current_par.HSS;
-
-	if (blank_mode >= 1) {
-		/* disable graphics output (this speeds up the CPU) ... */
-		vdb = current_par.VFT + 1;
-		/* ... and blank all lines */
-		hbe = current_par.HHT + 2;
-	}
-	/* use VESA suspend modes on VGA monitors */
-	if (mon_type == F_MON_VGA) {
-		if (blank_mode == 2 || blank_mode == 4)
-			vss = current_par.VFT + 1;
-		if (blank_mode == 3 || blank_mode == 4)
-			hss = current_par.HHT + 2;
-	}
-
-	videl.vdb = vdb;
-	videl.vss = vss;
-	videl.hbe = hbe;
-	videl.hss = hss;
-
-	return 0;
-}
-
- 
-static int falcon_detect( void )
-{
-	struct atari_fb_par par;
-	unsigned char fhw;
-
-	/* Determine connected monitor and set monitor parameters */
-	fhw = *(unsigned char*)0xffff8006;
-	mon_type = fhw >> 6 & 0x3;
-	/* bit 1 of fhw: 1=32 bit ram bus, 0=16 bit */
-	f030_bus_width = fhw << 6 & 0x80;
-	switch (mon_type) {
-	case F_MON_SM:
-		vfmin = 70;
-		vfmax = 72;
-		hfmin = 35713;
-		hfmax = 35715;
-		break;
-	case F_MON_SC:
-	case F_MON_TV:
-		/* PAL...NTSC */
-		vfmin = 49; /* not 50, since TOS defaults to 49.9x Hz */
-		vfmax = 60;
-		hfmin = 15620;
-		hfmax = 15755;
-		break;
-	}
-	/* initialize hsync-len */
-	f25.hsync = h_syncs[mon_type] / f25.t;
-	f32.hsync = h_syncs[mon_type] / f32.t;
-	if (fext.t)
-		fext.hsync = h_syncs[mon_type] / fext.t;
-
-	falcon_get_par(&par);
-	falcon_encode_var(&atari_fb_predefined[0], &par);
-
-	/* Detected mode is always the "autodetect" slot */
-	return 1;
-}
-
-#endif /* ATAFB_FALCON */
-
-/* ------------------- ST(E) specific functions ---------------------- */
-
-#ifdef ATAFB_STE
-
-static int stste_encode_fix( struct fb_fix_screeninfo *fix,
-							 struct atari_fb_par *par )
-
-{
-	int mode, i;
-
-	strcpy(fix->id,"Atari Builtin");
-	fix->smem_start=real_screen_base;
-	fix->smem_len=screen_len;
-	fix->type=FB_TYPE_INTERLEAVED_PLANES;
-	fix->type_aux=2;
-	fix->visual=FB_VISUAL_PSEUDOCOLOR;
-	mode = par->hw.st.mode & 3;
-	if (mode == ST_HIGH) {
-		fix->type=FB_TYPE_PACKED_PIXELS;
-		fix->type_aux=0;
-		fix->visual=FB_VISUAL_MONO10;
-	}
-	if (ATARIHW_PRESENT(EXTD_SHIFTER)) {
-		fix->xpanstep = 16;
-		fix->ypanstep = 1;
-	} else {
-		fix->xpanstep = 0;
-		fix->ypanstep = 0;
-	}
-	fix->ywrapstep = 0;
-	fix->line_length = 0;
-	for (i=0; i<arraysize(fix->reserved); i++)
-		fix->reserved[i]=0;
-	return 0;
-}
-
-
-static int stste_decode_var( struct fb_var_screeninfo *var,
-						  struct atari_fb_par *par )
-{
-	int xres=var->xres;
-	int yres=var->yres;
-	int bpp=var->bits_per_pixel;
-	int linelen;
-	int yres_virtual = var->yres_virtual;
-
-	if (mono_moni) {
-		if (bpp > 1 || xres > sttt_xres || yres > st_yres)
-			return -EINVAL;
-		par->hw.st.mode=ST_HIGH;
-		xres=sttt_xres;
-		yres=st_yres;
-		bpp=1;
-	} else {
-		if (bpp > 4 || xres > sttt_xres || yres > st_yres)
-			return -EINVAL;
-		if (bpp > 2) {
-			if (xres > sttt_xres/2 || yres > st_yres/2)
-				return -EINVAL;
-			par->hw.st.mode=ST_LOW;
-			xres=sttt_xres/2;
-			yres=st_yres/2;
-			bpp=4;
-		}
-		else if (bpp > 1) {
-			if (xres > sttt_xres || yres > st_yres/2)
-				return -EINVAL;
-			par->hw.st.mode=ST_MID;
-			xres=sttt_xres;
-			yres=st_yres/2;
-			bpp=2;
-		}
-		else
-			return -EINVAL;
-	}
-	if (yres_virtual <= 0)
-		yres_virtual = 0;
-	else if (yres_virtual < yres)
-		yres_virtual = yres;
-	if (var->sync & FB_SYNC_EXT)
-		par->hw.st.sync=(par->hw.st.sync & ~1) | 1;
-	else
-		par->hw.st.sync=(par->hw.st.sync & ~1);
-	linelen=xres*bpp/8;
-	if (yres_virtual * linelen > screen_len && screen_len)
-		return -EINVAL;
-	if (yres * linelen > screen_len && screen_len)
-		return -EINVAL;
-	if (var->yoffset + yres > yres_virtual && yres_virtual)
-		return -EINVAL;
-	par->yres_virtual = yres_virtual;
-	par->screen_base=screen_base+ var->yoffset*linelen;
-	return 0;
-}
-
-static int stste_encode_var( struct fb_var_screeninfo *var,
-						  struct atari_fb_par *par )
-{
-	int linelen, i;
-	var->red.offset=0;
-	var->red.length = ATARIHW_PRESENT(EXTD_SHIFTER) ? 4 : 3;
-	var->red.msb_right=0;
-	var->grayscale=0;
-
-	var->pixclock=31041;
-	var->left_margin=120;		/* these are incorrect */
-	var->right_margin=100;
-	var->upper_margin=8;
-	var->lower_margin=16;
-	var->hsync_len=140;
-	var->vsync_len=30;
-
-	var->height=-1;
-	var->width=-1;
-
-	if (!(par->hw.st.sync & 1))
-		var->sync=0;
-	else
-		var->sync=FB_SYNC_EXT;
-
-	switch (par->hw.st.mode & 3) {
-	case ST_LOW:
-		var->xres=sttt_xres/2;
-		var->yres=st_yres/2;
-		var->bits_per_pixel=4;
-		break;
-	case ST_MID:
-		var->xres=sttt_xres;
-		var->yres=st_yres/2;
-		var->bits_per_pixel=2;
-		break;
-	case ST_HIGH:
-		var->xres=sttt_xres;
-		var->yres=st_yres;
-		var->bits_per_pixel=1;
-		break;
-	}		
-	var->blue=var->green=var->red;
-	var->transp.offset=0;
-	var->transp.length=0;
-	var->transp.msb_right=0;
-	var->xres_virtual=sttt_xres_virtual;
-	linelen=var->xres_virtual * var->bits_per_pixel / 8;
-	ovsc_addlen=linelen*(sttt_yres_virtual - st_yres);
-	
-	if (! use_hwscroll)
-		var->yres_virtual=var->yres;
-	else if (screen_len)
-		if (par->yres_virtual)
-			var->yres_virtual = par->yres_virtual;
-		else
-			/* yres_virtual==0 means use maximum */
-			var->yres_virtual = screen_len / linelen;
-	else {
-		if (hwscroll < 0)
-			var->yres_virtual = 2 * var->yres;
-		else
-			var->yres_virtual=var->yres+hwscroll * 16;
-	}
-	var->xoffset=0;
-	if (screen_base)
-		var->yoffset=(par->screen_base - screen_base)/linelen;
-	else
-		var->yoffset=0;
-	var->nonstd=0;
-	var->activate=0;
-	var->vmode=FB_VMODE_NONINTERLACED;
-	for (i=0; i<arraysize(var->reserved); i++)
-		var->reserved[i]=0;
-	return 0;
-}
-
-
-static void stste_get_par( struct atari_fb_par *par )
-{
-	unsigned long addr;
-	par->hw.st.mode=shifter_tt.st_shiftmode;
-	par->hw.st.sync=shifter.syncmode;
-	addr = ((shifter.bas_hi & 0xff) << 16) |
-	       ((shifter.bas_md & 0xff) << 8);
-	if (ATARIHW_PRESENT(EXTD_SHIFTER))
-		addr |= (shifter.bas_lo & 0xff);
-	par->screen_base = PTOV(addr);
-}
-
-static void stste_set_par( struct atari_fb_par *par )
-{
-	shifter_tt.st_shiftmode=par->hw.st.mode;
-	shifter.syncmode=par->hw.st.sync;
-	/* only set screen_base if really necessary */
-	if (current_par.screen_base != par->screen_base)
-		fbhw->set_screen_base(par->screen_base);
-}
-
-
-static int stste_getcolreg( unsigned regno, unsigned *red,
-							unsigned *green, unsigned *blue,
-							unsigned *transp )
-{	unsigned col;
-	
-	if (regno > 15)
-		return 1;
-	col = shifter_tt.color_reg[regno];
-	if (ATARIHW_PRESENT(EXTD_SHIFTER)) {
-		*red = ((col >> 7) & 0xe) | ((col >> 11) & 1);
-		*green = ((col >> 3) & 0xe) | ((col >> 7) & 1);
-		*blue = ((col << 1) & 0xe) | ((col >> 3) & 1);
-	}
-	else {
-		*red = (col >> 8) & 0x7;
-		*green = (col >> 4) & 0x7;
-		*blue = col & 0x7;
-	}
-	*transp = 0;
-	return 0;
-}
-
-
-static int stste_setcolreg( unsigned regno, unsigned red,
-						 unsigned green, unsigned blue,
-						 unsigned transp )
-{
-	if (regno > 15)
-		return 1;
-	if (ATARIHW_PRESENT(EXTD_SHIFTER))
-		shifter_tt.color_reg[regno] =
-			(((red & 0xe) >> 1) | ((red & 1) << 3) << 8) |
-			(((green & 0xe) >> 1) | ((green & 1) << 3) << 4) |
-			((blue & 0xe) >> 1) | ((blue & 1) << 3);
-	else
-		shifter_tt.color_reg[regno] =
-			((red & 0x7) << 8) |
-			((green & 0x7) << 4) |
-			(blue & 0x7);
-	return 0;
-}
-
-						  
-static int stste_detect( void )
-
-{	struct atari_fb_par par;
-
-	/* Determine the connected monitor: The DMA sound must be
-	 * disabled before reading the MFP GPIP, because the Sound
-	 * Done Signal and the Monochrome Detect are XORed together!
-	 */
-	if (ATARIHW_PRESENT(PCM_8BIT)) {
-		tt_dmasnd.ctrl = DMASND_CTRL_OFF;
-		udelay(20);	/* wait a while for things to settle down */
-	}
-	mono_moni = (mfp.par_dt_reg & 0x80) == 0;
-
-	stste_get_par(&par);
-	stste_encode_var(&atari_fb_predefined[0], &par);
-
-	if (!ATARIHW_PRESENT(EXTD_SHIFTER))
-		use_hwscroll = 0;
-	return 1;
-}
-
-static void stste_set_screen_base(unsigned long s_base)
-{
-	unsigned long addr;
-	addr= VTOP(s_base);
-	/* Setup Screen Memory */
-	shifter.bas_hi=(unsigned char) ((addr & 0xff0000) >> 16);
-  	shifter.bas_md=(unsigned char) ((addr & 0x00ff00) >> 8);
-	if (ATARIHW_PRESENT(EXTD_SHIFTER))
-		shifter.bas_lo=(unsigned char)  (addr & 0x0000ff);
-}
-
-#endif /* ATAFB_STE */
-
-/* Switching the screen size should be done during vsync, otherwise
- * the margins may get messed up. This is a well known problem of
- * the ST's video system.
- *
- * Unfortunately there is hardly any way to find the vsync, as the
- * vertical blank interrupt is no longer in time on machines with
- * overscan type modifications.
- *
- * We can, however, use Timer B to safely detect the black shoulder,
- * but then we've got to guess an appropriate delay to find the vsync.
- * This might not work on every machine.
- *
- * martin_rogge @ ki.maus.de, 8th Aug 1995
- */
-
-#define LINE_DELAY  (mono_moni ? 30 : 70)
-#define SYNC_DELAY  (mono_moni ? 1500 : 2000)
-
-/* SWITCH_ACIA may be used for Falcon (ScreenBlaster III internal!) */
-static void st_ovsc_switch(int switchmode)
-{
-    unsigned long flags;
-    register unsigned char old, new;
-
-    if ((switchmode & (SWITCH_ACIA | SWITCH_SND6 | SWITCH_SND7)) == 0)
-	return;
-    save_flags(flags);
-    cli();
-
-    mfp.tim_ct_b = 0x10;
-    mfp.active_edge |= 8;
-    mfp.tim_ct_b = 0;
-    mfp.tim_dt_b = 0xf0;
-    mfp.tim_ct_b = 8;
-    while (mfp.tim_dt_b > 1)	/* TOS does it this way, don't ask why */
-	;
-    new = mfp.tim_dt_b;
-    do {
-	udelay(LINE_DELAY);
-	old = new;
-	new = mfp.tim_dt_b;
-    } while (old != new);
-    mfp.tim_ct_b = 0x10;
-    udelay(SYNC_DELAY);
-
-    if (switchmode == SWITCH_ACIA)
-	acia.key_ctrl = (ACIA_DIV64|ACIA_D8N1S|ACIA_RHTID|ACIA_RIE);
-    else {
-	sound_ym.rd_data_reg_sel = 14;
-	sound_ym.wd_data = sound_ym.rd_data_reg_sel | switchmode;
-    }
-    restore_flags(flags);
-}
-
-/* ------------------- External Video ---------------------- */
-
-#ifdef ATAFB_EXT
-
-static int ext_encode_fix( struct fb_fix_screeninfo *fix,
-						   struct atari_fb_par *par )
-
-{
-	int i;
-
-	strcpy(fix->id,"Unknown Extern");
-	fix->smem_start=external_addr;
-	fix->smem_len=(external_len + PAGE_SIZE -1) & PAGE_MASK;
-	if (external_depth == 1) {
-		fix->type = FB_TYPE_PACKED_PIXELS;
-		/* The letters 'n' and 'i' in the "atavideo=external:" stand
-		 * for "normal" and "inverted", rsp., in the monochrome case */
-		fix->visual =
-			(external_pmode == FB_TYPE_INTERLEAVED_PLANES ||
-			 external_pmode == FB_TYPE_PACKED_PIXELS) ?
-				FB_VISUAL_MONO10 :
-					FB_VISUAL_MONO01;
-	}
-	else {
-		switch (external_pmode) {
-			/* All visuals are STATIC, because we don't know how to change
-			 * colors :-(
-			 */
-		    case -1:              /* truecolor */
-			fix->type=FB_TYPE_PACKED_PIXELS;
-			fix->visual=FB_VISUAL_TRUECOLOR;
-			break;
-		    case FB_TYPE_PACKED_PIXELS:
-			fix->type=FB_TYPE_PACKED_PIXELS;
-			fix->visual=FB_VISUAL_STATIC_PSEUDOCOLOR;
-			break;
-		    case FB_TYPE_PLANES:
-			fix->type=FB_TYPE_PLANES;
-			fix->visual=FB_VISUAL_STATIC_PSEUDOCOLOR;
-			break;
-		    case FB_TYPE_INTERLEAVED_PLANES:
-			fix->type=FB_TYPE_INTERLEAVED_PLANES;
-			fix->type_aux=2;
-			fix->visual=FB_VISUAL_STATIC_PSEUDOCOLOR;
-			break;
-		}
-	}
-	fix->xpanstep = 0;
-	fix->ypanstep = 0;
-	fix->ywrapstep = 0;
-	fix->line_length = 0;
-	for (i=0; i<arraysize(fix->reserved); i++)
-		fix->reserved[i]=0;
-	return 0;
-}
-
-
-static int ext_decode_var( struct fb_var_screeninfo *var,
-						   struct atari_fb_par *par )
-{
-	struct fb_var_screeninfo *myvar = &atari_fb_predefined[0];
-	
-	if (var->bits_per_pixel > myvar->bits_per_pixel ||
-		var->xres > myvar->xres ||
-		var->yres > myvar->yres ||
-		var->xoffset > 0 ||
-		var->yoffset > 0)
-		return -EINVAL;
-	return 0;
-}
-
-
-static int ext_encode_var( struct fb_var_screeninfo *var,
-						   struct atari_fb_par *par )
-{
-	int i;
-
-	var->red.offset=0;
-	var->red.length=(external_pmode == -1) ? external_depth/3 : 
-			(external_vgaiobase ? external_bitspercol : 0);
-	var->red.msb_right=0;
-	var->grayscale=0;
-
-	var->pixclock=31041;
-	var->left_margin=120;		/* these are surely incorrect 	*/
-	var->right_margin=100;
-	var->upper_margin=8;
-	var->lower_margin=16;
-	var->hsync_len=140;
-	var->vsync_len=30;
-
-	var->height=-1;
-	var->width=-1;
-
-	var->sync=0;
-
-	var->xres = external_xres;
-	var->yres = external_yres;
-	var->bits_per_pixel = external_depth;
-	
-	var->blue=var->green=var->red;
-	var->transp.offset=0;
-	var->transp.length=0;
-	var->transp.msb_right=0;
-	var->xres_virtual=var->xres;
-	var->yres_virtual=var->yres;
-	var->xoffset=0;
-	var->yoffset=0;
-	var->nonstd=0;
-	var->activate=0;
-	var->vmode=FB_VMODE_NONINTERLACED;
-	for (i=0; i<arraysize(var->reserved); i++)
-		var->reserved[i]=0;
-	return 0;
-}
-
-
-static void ext_get_par( struct atari_fb_par *par )
-{
-	par->screen_base = external_addr;
-}
-
-static void ext_set_par( struct atari_fb_par *par )
-{
-}
-
-#define OUTB(port,val) \
-	*((unsigned volatile char *) ((port)+external_vgaiobase))=(val)
-#define INB(port) \
-	(*((unsigned volatile char *) ((port)+external_vgaiobase)))
-#define DACDelay 				\
-	do {					\
-		unsigned char tmp=INB(0x3da);	\
-		tmp=INB(0x3da);			\
-	} while (0)
-
-static int ext_getcolreg( unsigned regno, unsigned *red,
-						  unsigned *green, unsigned *blue,
-						  unsigned *transp )
-
-{	unsigned char colmask = (1 << external_bitspercol) - 1;
-		
-	if (! external_vgaiobase)
-		return 1;
-
-	switch (external_card_type) {
-	  case IS_VGA:
-	    OUTB(0x3c7, regno);
-	    DACDelay;
-	    *red=INB(0x3c9) & colmask;
-	    DACDelay;
-	    *green=INB(0x3c9) & colmask;
-	    DACDelay;
-	    *blue=INB(0x3c9) & colmask;
-	    DACDelay;
-	    return 0;
-	    
-	  case IS_MV300:
-	    *red = MV300_color[regno].red;
-	    *green = MV300_color[regno].green;
-	    *blue = MV300_color[regno].blue;
-	    *transp=0;
-	    return 0;
-
-	  default:
-	    return 1;
-	  }
-}
-	
-static int ext_setcolreg( unsigned regno, unsigned red,
-						  unsigned green, unsigned blue,
-						  unsigned transp )
-
-{	unsigned char colmask = (1 << external_bitspercol) - 1;
-
-	if (! external_vgaiobase)
-		return 1;
-
-	switch (external_card_type) {
-	  case IS_VGA:
-	    OUTB(0x3c8, regno);
-	    DACDelay;
-	    OUTB(0x3c9, red & colmask);
-	    DACDelay;
-	    OUTB(0x3c9, green & colmask);
-	    DACDelay;
-	    OUTB(0x3c9, blue & colmask);
-	    DACDelay;
-	    return 0;
-
-	  case IS_MV300:
-	    MV300_color[regno].red = red;
-	    MV300_color[regno].green = green;
-	    MV300_color[regno].blue = blue;
-	    OUTB((MV300_reg[regno] << 2)+1, red);
-	    OUTB((MV300_reg[regno] << 2)+1, green);
-	    OUTB((MV300_reg[regno] << 2)+1, blue);
-	    return 0;
-
-	  default:
-	    return 1;
-	  }
-}
-	
-
-static int ext_detect( void )
-
-{
-	struct fb_var_screeninfo *myvar = &atari_fb_predefined[0];
-	struct atari_fb_par dummy_par;
-
-	myvar->xres = external_xres;
-	myvar->yres = external_yres;
-	myvar->bits_per_pixel = external_depth;
-	ext_encode_var(myvar, &dummy_par);
-	return 1;
-}
-
-#endif /* ATAFB_EXT */
-
-/* ------ This is the same for most hardware types -------- */
-
-static void set_screen_base(unsigned long s_base)
-{
-	unsigned long addr;
-	addr= VTOP(s_base);
-	/* Setup Screen Memory */
-	shifter.bas_hi=(unsigned char) ((addr & 0xff0000) >> 16);
-  	shifter.bas_md=(unsigned char) ((addr & 0x00ff00) >> 8);
-  	shifter.bas_lo=(unsigned char)  (addr & 0x0000ff);
-}
-
-
-static int pan_display( struct fb_var_screeninfo *var,
-                        struct atari_fb_par *par )
-{
-	if (!ATARIHW_PRESENT(EXTD_SHIFTER) && var->xoffset)
-		return -EINVAL;
-	else
-		var->xoffset = up(var->xoffset, 16);
-	par->screen_base = screen_base +
-	        (var->yoffset * disp[currcon].var.xres_virtual + var->xoffset)
-	        * disp[currcon].var.bits_per_pixel / 8;
-	if (fbhw->set_screen_base)
-		fbhw->set_screen_base (par->screen_base);
-	else
-		return -EINVAL;
-	return 0;
-}
-
-
-/* ------------ Interfaces to hardware functions ------------ */
-
-
-#ifdef ATAFB_TT
-static struct fb_hwswitch tt_switch = {
-	tt_detect, tt_encode_fix, tt_decode_var, tt_encode_var,
-	tt_get_par, tt_set_par, tt_getcolreg, tt_setcolreg,
-	set_screen_base, NULL, pan_display
-};
-#endif
-
-#ifdef ATAFB_FALCON
-static struct fb_hwswitch falcon_switch = {
-	falcon_detect, falcon_encode_fix, falcon_decode_var, falcon_encode_var,
-	falcon_get_par, falcon_set_par, falcon_getcolreg,
-	falcon_setcolreg, set_screen_base, falcon_blank, falcon_pan_display
-};
-#endif
-
-#ifdef ATAFB_STE
-static struct fb_hwswitch st_switch = {
-	stste_detect, stste_encode_fix, stste_decode_var, stste_encode_var,
-	stste_get_par, stste_set_par, stste_getcolreg, stste_setcolreg,
-	stste_set_screen_base, NULL, pan_display
-};
-#endif
-
-#ifdef ATAFB_EXT
-static struct fb_hwswitch ext_switch = {
-	ext_detect, ext_encode_fix, ext_decode_var, ext_encode_var,
-	ext_get_par, ext_set_par, ext_getcolreg, ext_setcolreg, NULL, NULL, NULL
-};
-#endif
-
-
-
-static void atari_fb_get_par( struct atari_fb_par *par )
-{
-	if (current_par_valid) {
-		*par=current_par;
-	}
-	else
-		fbhw->get_par(par);
-}
-
-
-static void atari_fb_set_par( struct atari_fb_par *par )
-{
-	fbhw->set_par(par);
-	current_par=*par;
-	current_par_valid=1;
-}
-
-
-
-/* =========================================================== */
-/* ============== Hardware Independent Functions ============= */
-/* =========================================================== */
-
-
-/* used for hardware scrolling */
-
-static int
-fb_update_var(int con)
-{
-	int off=disp[con].var.yoffset*disp[con].var.xres_virtual*
-			disp[con].var.bits_per_pixel>>3;
-
-	current_par.screen_base=screen_base + off;
-
-	if (fbhw->set_screen_base)
-		fbhw->set_screen_base(current_par.screen_base);
-	return 0;
-}
-
-static int
-do_fb_set_var(struct fb_var_screeninfo *var, int isactive)
-{
-	int err,activate;
-	struct atari_fb_par par;
-	if ((err=fbhw->decode_var(var, &par)))
-		return err;
-	activate=var->activate;
-	if (((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) && isactive)
-		atari_fb_set_par(&par);
-	fbhw->encode_var(var, &par);
-	var->activate=activate;
-	return 0;
-}
-
-/* Functions for handling colormap */
-
-/* there seems to be a bug in gcc 2.5.8 which inhibits using an other solution */
-/* I always get a sigsegv */
-
-static short red16[]=
-	{ 0x0000,0x0000,0x0000,0x0000,0xc000,0xc000,0xc000,0xc000,
-	  0x8000,0x0000,0x0000,0x0000,0xffff,0xffff,0xffff,0xffff};
-static short green16[]=
-	{ 0x0000,0x0000,0xc000,0xc000,0x0000,0x0000,0xc000,0xc000,
-	  0x8000,0x0000,0xffff,0xffff,0x0000,0x0000,0xffff,0xffff};
-static short blue16[]=
-	{ 0x0000,0xc000,0x0000,0xc000,0x0000,0xc000,0x0000,0xc000,
-	  0x8000,0xffff,0x0000,0xffff,0x0000,0xffff,0x0000,0xffff};
-
-static short red4[]=
-	{ 0x0000,0xc000,0x8000,0xffff};
-static short green4[]=
-	{ 0x0000,0xc000,0x8000,0xffff};
-static short blue4[]=
-	{ 0x0000,0xc000,0x8000,0xffff};
-
-static short red2[]=
-	{ 0x0000,0xffff};
-static short green2[]=
-	{ 0x0000,0xffff};
-static short blue2[]=
-	{ 0x0000,0xffff};
-
-static struct fb_cmap default_16_colors = {
-    0, 16, red16, green16, blue16, NULL
-};
-static struct fb_cmap default_4_colors = {
-    0, 4, red4, green4, blue4, NULL
-};
-static struct fb_cmap default_2_colors = {
-    0, 2, red2, green2, blue2, NULL
-};
-
-static struct fb_cmap *
-get_default_colormap(int bpp)
-{
-	if (bpp == 1)
-		return &default_2_colors;
-	if (bpp == 2)
-		return &default_4_colors;
-	return &default_16_colors;
-}
-
-#define CNVT_TOHW(val,width)	(((val) << (width)) + 0x7fff - (val)) >> 16
-#define CNVT_FROMHW(val,width) ((width)?((((val) << 16) - (val)) / ((1<<(width))-1)):0)
-
-
-static int
-do_fb_get_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var, int kspc)
-{
-	int i,start;
-	unsigned short *red,*green,*blue,*transp;
-	unsigned int hred,hgreen,hblue,htransp;
-
-	red=cmap->red;
-	green=cmap->green;
-	blue=cmap->blue;
-	transp=cmap->transp;
-	start=cmap->start;
-	if (start < 0)
-		return EINVAL;
-	for (i=0 ; i < cmap->len ; i++) {
-		if (fbhw->getcolreg(start++, &hred, &hgreen, &hblue, &htransp))
-			return 0;
-		hred=CNVT_FROMHW(hred,var->red.length);
-		hgreen=CNVT_FROMHW(hgreen,var->green.length);
-		hblue=CNVT_FROMHW(hblue,var->blue.length);
-		htransp=CNVT_FROMHW(htransp,var->transp.length);
-		if (kspc) {
-			*red=hred;
-			*green=hgreen;
-			*blue=hblue;
-			if (transp) *transp=htransp;
-		}
-		else {
-			put_user(hred, red);
-			put_user(hgreen, green);
-			put_user(hblue, blue);
-			if (transp) put_user(htransp, transp);
-		}
-		red++;
-		green++;
-		blue++;
-		if (transp) transp++;
-	}
-	return 0;
-}
-
-static int
-do_fb_set_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var, int kspc)
-{
-	int i,start;
-	unsigned short *red,*green,*blue,*transp;
-	unsigned int hred,hgreen,hblue,htransp;
-
-	red=cmap->red;
-	green=cmap->green;
-	blue=cmap->blue;
-	transp=cmap->transp;
-	start=cmap->start;
-
-	if (start < 0)
-		return -EINVAL;
-	for (i=0 ; i < cmap->len ; i++) {
-		if (kspc) {
-			hred=*red;
-			hgreen=*green;
-			hblue=*blue;
-			htransp=(transp) ? *transp : 0;
-		}
-		else {
-			get_user(hred, red);
-			get_user(hgreen, green);
-			get_user(hblue, blue);
-			if (transp)
-				get_user(htransp, transp);
-			else
-				htransp = 0;
-		}
-		hred=CNVT_TOHW(hred,var->red.length);
-		hgreen=CNVT_TOHW(hgreen,var->green.length);
-		hblue=CNVT_TOHW(hblue,var->blue.length);
-		htransp=CNVT_TOHW(htransp,var->transp.length);
-		red++;
-		green++;
-		blue++;
-		if (transp) transp++;
-		if (fbhw->setcolreg(start++, hred, hgreen, hblue, htransp))
-			return 0;
-	}
-	return 0;
-}
-
-static void
-do_install_cmap(int con)
-{
-	if (con != currcon)
-		return;
-	if (disp[con].cmap.len)
-		do_fb_set_cmap(&disp[con].cmap, &(disp[con].var), 1);
-	else
-		do_fb_set_cmap(get_default_colormap(
-				disp[con].var.bits_per_pixel), &(disp[con].var), 1);		
-}
-
-static void
-memcpy_fs(int fsfromto, void *to, void *from, int len)
-{
-	switch (fsfromto) {
-	case 0:
-		memcpy(to,from,len);
-		return;
-	case 1:
-		copy_from_user(to,from,len);
-		return;
-	case 2:
-		copy_to_user(to,from,len);
-		return;
-	}
-}
-
-static void
-copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto)
-{
-	int size;
-	int tooff=0, fromoff=0;
-
-	if (to->start > from->start)
-		fromoff=to->start-from->start;
-	else
-		tooff=from->start-to->start;			
-	size=to->len-tooff;
-	if (size > from->len-fromoff)
-		size=from->len-fromoff;
-	if (size < 0)
-		return;
-	size*=sizeof(unsigned short);
-	memcpy_fs(fsfromto, to->red+tooff, from->red+fromoff, size);
-	memcpy_fs(fsfromto, to->green+tooff, from->green+fromoff, size);
-	memcpy_fs(fsfromto, to->blue+tooff, from->blue+fromoff, size);
-	if (from->transp && to->transp)
-		memcpy_fs(fsfromto, to->transp+tooff, from->transp+fromoff, size);
-}
- 
-static int
-alloc_cmap(struct fb_cmap *cmap,int len,int transp)
-{
-	int size=len*sizeof(unsigned short);
-	if (cmap->len != len) {
-		if (cmap->red)
-			kfree(cmap->red);
-		if (cmap->green)
-			kfree(cmap->green);
-		if (cmap->blue)
-			kfree(cmap->blue);
-		if (cmap->transp)
-			kfree(cmap->transp);
-		cmap->red=cmap->green=cmap->blue=cmap->transp=NULL;
-		cmap->len=0;
-		if (! len)
-			return 0;
-		if (! (cmap->red=kmalloc(size, GFP_ATOMIC)))
-			return -1;
-		if (! (cmap->green=kmalloc(size, GFP_ATOMIC)))
-			return -1;
-		if (! (cmap->blue=kmalloc(size, GFP_ATOMIC)))
-			return -1;
-		if (transp) {
-			if (! (cmap->transp=kmalloc(size, GFP_ATOMIC)))
-				return -1;
-		}
-		else
-			cmap->transp=NULL;
-	}
-	cmap->start=0;
-	cmap->len=len;
-	copy_cmap(get_default_colormap(len), cmap, 0);
-	return 0;
-}	
-
-static int
-atari_fb_get_fix(struct fb_fix_screeninfo *fix, int con)
-{
-	struct atari_fb_par par;
-	if (con == -1)
-		atari_fb_get_par(&par);
-	else
-		fbhw->decode_var(&disp[con].var,&par);
-	return fbhw->encode_fix(fix, &par);
-}
-	
-static int
-atari_fb_get_var(struct fb_var_screeninfo *var, int con)
-{
-	struct atari_fb_par par;
-	if (con == -1) {
-		atari_fb_get_par(&par);
-		fbhw->encode_var(var, &par);
-	}
-	else
-		*var=disp[con].var;
-	return 0;
-}
-
-static void
-atari_fb_set_disp(int con)
-{
-	struct fb_fix_screeninfo fix;
-
-	atari_fb_get_fix(&fix, con);
-	if (con == -1)
-		con=0;
-	disp[con].screen_base = (u_char *)fix.smem_start;
-	disp[con].visual = fix.visual;
-	disp[con].type = fix.type;
-	disp[con].type_aux = fix.type_aux;
-	disp[con].ypanstep = fix.ypanstep;
-	disp[con].ywrapstep = fix.ywrapstep;
-	disp[con].line_length = fix.line_length;
-	if (fix.visual != FB_VISUAL_PSEUDOCOLOR &&
-		fix.visual != FB_VISUAL_DIRECTCOLOR)
-		disp[con].can_soft_blank = 0;
-	else
-		disp[con].can_soft_blank = 1;
-	disp[con].inverse =
-	    (fix.visual == FB_VISUAL_MONO01 ? !inverse : inverse);
-}
-
-static int
-atari_fb_set_var(struct fb_var_screeninfo *var, int con)
-{
-	int err,oldxres,oldyres,oldbpp,oldxres_virtual,
-	    oldyres_virtual,oldyoffset;
-	if ((err=do_fb_set_var(var, con==currcon)))
-		return err;
-	if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) {
-		oldxres=disp[con].var.xres;
-		oldyres=disp[con].var.yres;
-		oldxres_virtual=disp[con].var.xres_virtual;
-		oldyres_virtual=disp[con].var.yres_virtual;
-		oldbpp=disp[con].var.bits_per_pixel;
-		oldyoffset=disp[con].var.yoffset;
-		disp[con].var=*var;
-		if (oldxres != var->xres || oldyres != var->yres 
-		    || oldxres_virtual != var->xres_virtual
-		    || oldyres_virtual != var->yres_virtual
-		    || oldbpp != var->bits_per_pixel
-		    || oldyoffset != var->yoffset) {
-			atari_fb_set_disp(con);
-			(*fb_info.changevar)(con);
-			alloc_cmap(&disp[con].cmap, 0, 0);
-			do_install_cmap(con);
-		}
-	}
-	var->activate=0;
-	return 0;
-}
-
-
-
-static int
-atari_fb_get_cmap(struct fb_cmap *cmap, int kspc, int con)
-{
-	if (con == currcon) /* current console ? */
-		return do_fb_get_cmap(cmap, &(disp[con].var), kspc);
-	else
-		if (disp[con].cmap.len) /* non default colormap ? */
-			copy_cmap(&disp[con].cmap, cmap, kspc ? 0 : 2);
-		else
-			copy_cmap(get_default_colormap(
-			    disp[con].var.bits_per_pixel), cmap, kspc ? 0 : 2);
-	return 0;
-}
-
-static int
-atari_fb_set_cmap(struct fb_cmap *cmap, int kspc, int con)
-{
-	int err;
-	if (! disp[con].cmap.len) { /* no colormap allocated ? */
-		if ((err = alloc_cmap(&disp[con].cmap, 
-					1 << disp[con].var.bits_per_pixel, 0)))
-		return err;
-	}
-	if (con == currcon) /* current console ? */
-		return do_fb_set_cmap(cmap, &(disp[con].var), kspc);
-	else
-		copy_cmap(cmap, &disp[con].cmap, kspc ? 0 : 1);
-	return 0;
-}
-
-static int
-atari_fb_pan_display(struct fb_var_screeninfo *var, int con)
-{
-	int xoffset = var->xoffset;
-	int yoffset = var->yoffset;
-	int err;
-
-	if (   xoffset < 0 || xoffset + disp[con].var.xres > disp[con].var.xres_virtual
-	    || yoffset < 0 || yoffset + disp[con].var.yres > disp[con].var.yres_virtual)
-		return -EINVAL;
-
-	if (con == currcon) {
-		if (fbhw->pan_display) {
-			if ((err = fbhw->pan_display(var, &current_par)))
-				return err;
-		}
-		else
-			return -EINVAL;
-	}
-	disp[con].var.xoffset = var->xoffset;
-	disp[con].var.yoffset = var->yoffset;
-	return 0;
-}
-
-static int
-atari_fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
-	       unsigned long arg, int con)
-{
-	switch (cmd) {
-#ifdef FBCMD_GET_CURRENTPAR
-	case FBCMD_GET_CURRENTPAR:
-		if (copy_to_user((void *)arg, (void *)&current_par,
-				 sizeof(struct atari_fb_par)))
-			return -EFAULT;
-		return 0;
-#endif
-#ifdef FBCMD_SET_CURRENTPAR
-	case FBCMD_SET_CURRENTPAR:
-		if (copy_from_user((void *)&current_par, (void *)arg,
-				   sizeof(struct atari_fb_par)))
-			return -EFAULT;
-		atari_fb_set_par(&current_par);
-		return 0;
-#endif
-	}
-	return -EINVAL;
-}
-
-static struct fb_ops atari_fb_ops = {
-	atari_fb_get_fix, atari_fb_get_var, atari_fb_set_var, atari_fb_get_cmap,
-	atari_fb_set_cmap, atari_fb_pan_display, atari_fb_ioctl	
-};
-
-static void
-check_default_par( int detected_mode )
-{
-	char default_name[10];
-	int i;
-	struct fb_var_screeninfo var;
-	unsigned long min_mem;
-
-	/* First try the user supplied mode */
-	if (default_par) {
-		var=atari_fb_predefined[default_par-1];
-		var.activate = FB_ACTIVATE_TEST;
-		if (do_fb_set_var(&var,1))
-			default_par=0;		/* failed */
-	}
-	/* Next is the autodetected one */
-	if (! default_par) {
-		var=atari_fb_predefined[detected_mode-1]; /* autodetect */
-		var.activate = FB_ACTIVATE_TEST;
-		if (!do_fb_set_var(&var,1))
-			default_par=detected_mode;
-	}
-	/* If that also failed, try some default modes... */
-	if (! default_par) {
-		/* try default1, default2... */
-		for (i=1 ; i < 10 ; i++) {
-			sprintf(default_name,"default%d",i);
-			default_par=get_video_mode(default_name);
-			if (! default_par)
-				panic("can't set default video mode\n");
-			var=atari_fb_predefined[default_par-1];
-			var.activate = FB_ACTIVATE_TEST;
-			if (! do_fb_set_var(&var,1))
-				break;	/* ok */
-		}
-	}
-	min_mem=var.xres_virtual * var.yres_virtual * var.bits_per_pixel/8;
-	if (default_mem_req < min_mem)
-		default_mem_req=min_mem;
-}
-
-static int
-atafb_switch(int con)
-{
-	/* Do we have to save the colormap ? */
-	if (disp[currcon].cmap.len)
-		do_fb_get_cmap(&disp[currcon].cmap, &(disp[currcon].var), 1);
-	do_fb_set_var(&disp[con].var,1);
-	currcon=con;
-	/* Install new colormap */
-	do_install_cmap(con);
-	return 0;
-}
-
-/* (un)blank/poweroff
- * 0 = unblank
- * 1 = blank
- * 2 = suspend vsync
- * 3 = suspend hsync
- * 4 = off
- */
-static void
-atafb_blank(int blank)
-{
-	unsigned short black[16];
-	struct fb_cmap cmap;
-	if (fbhw->blank && !fbhw->blank(blank))
-		return;
-	if (blank) {
-		memset(black, 0, 16*sizeof(unsigned short));
-		cmap.red=black;
-		cmap.green=black;
-		cmap.blue=black;
-		cmap.transp=NULL;
-		cmap.start=0;
-		cmap.len=16;
-		do_fb_set_cmap(&cmap, &(disp[currcon].var), 1);
-	}
-	else
-		do_install_cmap(currcon);
-}
-
-static int
-atafb_setcmap(struct fb_cmap *cmap, int con)
-{
-	return(atari_fb_set_cmap(cmap, 1, con));
-}
-
-__initfunc(struct fb_info *
-atari_fb_init(long *mem_start))
-{
-	int err;
-	int pad;
-	int detected_mode;
-	unsigned long mem_req;
-	struct fb_var_screeninfo *var;
-	
-	err=register_framebuffer("Atari Builtin", &node, &atari_fb_ops, 
-			num_atari_fb_predefined, atari_fb_predefined);
-	if (err < 0)
-		panic ("Cannot register frame buffer\n");
-	do {
-#ifdef ATAFB_EXT
-		if (external_addr) {
-			fbhw = &ext_switch;
-			break;
-		}
-#endif
-#ifdef ATAFB_TT
-		if (ATARIHW_PRESENT(TT_SHIFTER)) {
-			fbhw = &tt_switch;
-			break;
-		}
-#endif
-#ifdef ATAFB_FALCON
-		if (ATARIHW_PRESENT(VIDEL_SHIFTER)) {
-			fbhw = &falcon_switch;
-			request_irq(IRQ_AUTO_4, falcon_vbl_switcher, IRQ_TYPE_PRIO,
-			            "framebuffer/modeswitch", falcon_vbl_switcher);
-			break;
-		}
-#endif
-#ifdef ATAFB_STE
-		if (ATARIHW_PRESENT(STND_SHIFTER) ||
-		    ATARIHW_PRESENT(EXTD_SHIFTER)) {
-			fbhw = &st_switch;
-			break;
-		}
-		fbhw = &st_switch;
-		printk("Cannot determine video hardware; defaulting to ST(e)\n");
-#else /* ATAFB_STE */
-		/* no default driver included */
-		/* Nobody will ever see this message :-) */
-		panic("Cannot initialize video hardware\n");
-#endif
-	} while (0);
-	detected_mode = fbhw->detect();
-	check_default_par(detected_mode);
-#ifdef ATAFB_EXT
-	if (!external_addr) {
-#endif /* ATAFB_EXT */
-		mem_req = default_mem_req + ovsc_offset +
-			ovsc_addlen;
-		mem_req = ((mem_req + PAGE_SIZE - 1) & PAGE_MASK) + PAGE_SIZE;
-		screen_base = (unsigned long) atari_stram_alloc(mem_req, mem_start);
-		memset((char *) screen_base, 0, mem_req);
-		pad = ((screen_base + PAGE_SIZE-1) & PAGE_MASK) - screen_base;
-		screen_base+=pad;
-		real_screen_base=screen_base+ovsc_offset;
-		screen_len = (mem_req - pad - ovsc_offset) & PAGE_MASK;
-		st_ovsc_switch(ovsc_switchmode);
-		if (CPU_IS_040_OR_060) {
-			/* On a '040+, the cache mode of video RAM must be set to
-			 * write-through also for internal video hardware! */
-			cache_push( VTOP(screen_base), screen_len );
-			kernel_set_cachemode( screen_base, screen_len,
-								  KERNELMAP_NO_COPYBACK );
-		}
-#ifdef ATAFB_EXT
-	}
-	else {
-		/* Map the video memory (physical address given) to somewhere
-		 * in the kernel address space.
-		 */
-		*mem_start = (*mem_start+PAGE_SIZE-1) & ~(PAGE_SIZE-1);
-		external_addr = kernel_map(external_addr, external_len,
-									KERNELMAP_NO_COPYBACK, mem_start);
-		if (external_vgaiobase)
-			external_vgaiobase = kernel_map(external_vgaiobase,
-				0x10000, KERNELMAP_NOCACHE_SER, mem_start);
-		screen_base      =
-		real_screen_base = external_addr;
-		screen_len       = external_len & PAGE_MASK;
-		memset ((char *) screen_base, 0, external_len);
-	}
-#endif /* ATAFB_EXT */
-
-	strcpy(fb_info.modename, "Atari Builtin ");
-	fb_info.disp=disp;
-	fb_info.switch_con=&atafb_switch;
-	fb_info.updatevar=&fb_update_var;
-	fb_info.blank=&atafb_blank;
-	fb_info.setcmap=&atafb_setcmap;
-	var=atari_fb_predefined+default_par-1;
-	do_fb_set_var(var,1);
-	strcat(fb_info.modename,fb_var_names[default_par-1][0]);
-
-	atari_fb_get_var(&disp[0].var, -1);
-	atari_fb_set_disp(-1);
-	printk("Determined %dx%d, depth %d\n",
-	       disp[0].var.xres, disp[0].var.yres, disp[0].var.bits_per_pixel );
-	do_install_cmap(0);
-	return &fb_info;
-}
-
-/* a strtok which returns empty strings, too */
-
-static char * strtoke(char * s,const char * ct)
-{
-  char *sbegin, *send;
-  static char *ssave = NULL;
-  
-  sbegin  = s ? s : ssave;
-  if (!sbegin) {
-	  return NULL;
-  }
-  if (*sbegin == '\0') {
-    ssave = NULL;
-    return NULL;
-  }
-  send = strpbrk(sbegin, ct);
-  if (send && *send != '\0')
-    *send++ = '\0';
-  ssave = send;
-  return sbegin;
-}
-
-void atari_video_setup( char *options, int *ints )
-{
-    char *this_opt;
-    int temp;
-    char ext_str[80], int_str[100];
-    char mcap_spec[80];
-    char user_mode[80];
-
-	ext_str[0]          =
-	int_str[0]          =
-	mcap_spec[0]        =
-	user_mode[0]        =
-	fb_info.fontname[0] = '\0';
-
-    if (!options || !*options)
-		return;
-     
-    for(this_opt=strtok(options,","); this_opt; this_opt=strtok(NULL,",")) {
-	if (!*this_opt) continue;
-	if ((temp=get_video_mode(this_opt)))
-		default_par=temp;
-	else if (! strcmp(this_opt, "inverse"))
-		inverse=1;
-	else if (!strncmp(this_opt, "font:", 5))
-	   strcpy(fb_info.fontname, this_opt+5);
-	else if (! strncmp(this_opt, "hwscroll_",9)) {
-		hwscroll=simple_strtoul(this_opt+9, NULL, 10);
-		if (hwscroll < 0)
-			hwscroll = 0;
-		if (hwscroll > 200)
-			hwscroll = 200;
-	}
-	else if (! strncmp(this_opt, "sw_",3)) {
-		if (! strcmp(this_opt+3, "acia"))
-			ovsc_switchmode = SWITCH_ACIA;
-		else if (! strcmp(this_opt+3, "snd6"))
-			ovsc_switchmode = SWITCH_SND6;
-		else if (! strcmp(this_opt+3, "snd7"))
-			ovsc_switchmode = SWITCH_SND7;
-		else ovsc_switchmode = SWITCH_NONE;
-	}
-#ifdef ATAFB_EXT
-	else if (!strcmp(this_opt,"mv300")) {
-		external_bitspercol = 8;
-		external_card_type = IS_MV300;
-	}
-	else if (!strncmp(this_opt,"external:",9))
-		strcpy(ext_str, this_opt+9);
-#endif
-	else if (!strncmp(this_opt,"internal:",9))
-		strcpy(int_str, this_opt+9);
-#ifdef ATAFB_FALCON
-	else if (!strncmp(this_opt, "eclock:", 7)) {
-		fext.f = simple_strtoul(this_opt+7, NULL, 10);
-		/* external pixelclock in kHz --> ps */
-		fext.t = 1000000000/fext.f;
-		fext.f *= 1000;
-	}
-	else if (!strncmp(this_opt, "monitorcap:", 11))
-		strcpy(mcap_spec, this_opt+11);
-#endif
-	else if (!strcmp(this_opt, "keep"))
-		DontCalcRes = 1;
-	else if (!strncmp(this_opt, "R", 1))
-		strcpy(user_mode, this_opt+1);
-    }
-
-    if (*int_str) {
-	/* Format to config extended internal video hardware like OverScan:
-	"<switch-type>,internal:<xres>;<yres>;<xres_max>;<yres_max>;<offset>"
-	Explanation:
-	<switch-type> type to switch on higher resolution
-			sw_acia : via keyboard ACIA
-			sw_snd6 : via bit 6 of the soundchip port
-			sw_snd7 : via bit 7 of the soundchip port
-	<xres>: x-resolution 
-	<yres>: y-resolution
-	The following are only needed if you have an overscan which
-	needs a black border:
-	<xres_max>: max. length of a line in pixels your OverScan hardware would allow
-	<yres_max>: max. number of lines your OverScan hardware would allow
-	<offset>: Offset from physical beginning to visible beginning
-		  of screen in bytes
-	*/
-	int xres;
-	char *p;
-
-	if (!(p = strtoke(int_str, ";")) ||!*p) goto int_invalid;
-	xres = simple_strtoul(p, NULL, 10);
-	if (!(p = strtoke(NULL, ";")) || !*p) goto int_invalid;
-	sttt_xres=xres;
-	tt_yres=st_yres=simple_strtoul(p, NULL, 10);
-	if ((p=strtoke(NULL, ";")) && *p) {
-		sttt_xres_virtual=simple_strtoul(p, NULL, 10);
-	}
-	if ((p=strtoke(NULL, ";")) && *p) {
-		sttt_yres_virtual=simple_strtoul(p, NULL, 0);
-	}
-	if ((p=strtoke(NULL, ";")) && *p) {
-		ovsc_offset=simple_strtoul(p, NULL, 0);
-	}
-
-	if (ovsc_offset || (sttt_yres_virtual != st_yres))
-		use_hwscroll=0;
-    }
-    else 
-      int_invalid:	ovsc_switchmode = SWITCH_NONE;
-
-#ifdef ATAFB_EXT
-    if (*ext_str) {
-	int		xres, yres, depth, planes;
-	unsigned long addr, len;
-	char *p;
-
-	/* Format is: <xres>;<yres>;<depth>;<plane organ.>;
-	 *            <screen mem addr>
-	 *	      [;<screen mem length>[;<vgaiobase>[;<colorreg-type>]]]
-	 */
-	if (!(p = strtoke(ext_str, ";")) ||!*p) goto ext_invalid;
-	xres = simple_strtoul(p, NULL, 10);
-	if (xres <= 0) goto ext_invalid;
-
-	if (!(p = strtoke(NULL, ";")) ||!*p) goto ext_invalid;
-	yres = simple_strtoul(p, NULL, 10);
-	if (yres <= 0) goto ext_invalid;
-
-	if (!(p = strtoke(NULL, ";")) ||!*p) goto ext_invalid;
-	depth = simple_strtoul(p, NULL, 10);
-	if (depth != 1 && depth != 2 && depth != 4 && depth != 8 &&
-		depth != 16 && depth != 24) goto ext_invalid;
-
-	if (!(p = strtoke(NULL, ";")) ||!*p) goto ext_invalid;
-	if (*p == 'i')
-		planes = FB_TYPE_INTERLEAVED_PLANES;
-	else if (*p == 'p')
-		planes = FB_TYPE_PACKED_PIXELS;
-	else if (*p == 'n')
-		planes = FB_TYPE_PLANES;
-	else if (*p == 't')
-		planes = -1; /* true color */
-	else
-		goto ext_invalid;
-
-
-	if (!(p = strtoke(NULL, ";")) ||!*p) goto ext_invalid;
-	addr = simple_strtoul(p, NULL, 0);
-
-	if (!(p = strtoke(NULL, ";")) ||!*p)
-		len = xres*yres*depth/8;
-	else
-		len = simple_strtoul(p, NULL, 0);
-
-	if ((p = strtoke(NULL, ";")) && *p)
-		external_vgaiobase=simple_strtoul(p, NULL, 0);
-
-	if ((p = strtoke(NULL, ";")) && *p) {
-		external_bitspercol = simple_strtoul(p, NULL, 0);
-		if (external_bitspercol > 8)
-			external_bitspercol = 8;
-		else if (external_bitspercol < 1)
-			external_bitspercol = 1;
-	}
-	
-	if ((p = strtoke(NULL, ";")) && *p) {
-		if (!strcmp(this_opt, "vga"))
-			external_card_type = IS_VGA;
-		if (!strcmp(this_opt, "mv300"))
-			external_card_type = IS_MV300;
-	}
-
-	external_xres  = xres;
-	external_yres  = yres;
-	external_depth = depth;
-	external_pmode = planes;
-	external_addr  = addr;
-	external_len   = len;
-		
-	if (external_card_type == IS_MV300)
-	  switch (external_depth) {
-	    case 1:
-	      MV300_reg = MV300_reg_1bit;
-	      break;
-	    case 4:
-	      MV300_reg = MV300_reg_4bit;
-	      break;
-	    case 8:
-	      MV300_reg = MV300_reg_8bit;
-	      break;
-	    }
-
-      ext_invalid:
-	;
-    }
-#endif /* ATAFB_EXT */
-
-#ifdef ATAFB_FALCON
-    if (*mcap_spec) {
-	char *p;
-	int vmin, vmax, hmin, hmax;
-
-	/* Format for monitor capabilities is: <Vmin>;<Vmax>;<Hmin>;<Hmax>
-	 * <V*> vertical freq. in Hz
-	 * <H*> horizontal freq. in kHz
-	 */
-	if (!(p = strtoke(mcap_spec, ";")) || !*p) goto cap_invalid;
-	vmin = simple_strtoul(p, NULL, 10);
-	if (vmin <= 0) goto cap_invalid;
-	if (!(p = strtoke(NULL, ";")) || !*p) goto cap_invalid;
-	vmax = simple_strtoul(p, NULL, 10);
-	if (vmax <= 0 || vmax <= vmin) goto cap_invalid;
-	if (!(p = strtoke(NULL, ";")) || !*p) goto cap_invalid;
-	hmin = 1000 * simple_strtoul(p, NULL, 10);
-	if (hmin <= 0) goto cap_invalid;
-	if (!(p = strtoke(NULL, "")) || !*p) goto cap_invalid;
-	hmax = 1000 * simple_strtoul(p, NULL, 10);
-	if (hmax <= 0 || hmax <= hmin) goto cap_invalid;
-
-	vfmin = vmin;
-	vfmax = vmax;
-	hfmin = hmin;
-	hfmax = hmax;
-      cap_invalid:
-	;
-    }
-#endif
-
-	if (*user_mode) {
-		/* Format of user defined video mode is: <xres>;<yres>;<depth>
-		 */
-		char *p;
-		int xres, yres, depth, temp;
-
-		if (!(p = strtoke(user_mode, ";")) || !*p) goto user_invalid;
-		xres = simple_strtoul(p, NULL, 10);
-		if (!(p = strtoke(NULL, ";")) || !*p) goto user_invalid;
-		yres = simple_strtoul(p, NULL, 10);
-		if (!(p = strtoke(NULL, "")) || !*p) goto user_invalid;
-		depth = simple_strtoul(p, NULL, 10);
-		if ((temp=get_video_mode("user0"))) {
-			default_par=temp;
-			atari_fb_predefined[default_par-1].xres = xres;
-			atari_fb_predefined[default_par-1].yres = yres;
-			atari_fb_predefined[default_par-1].bits_per_pixel = depth;
-		}
-
-	  user_invalid:
-		;
-	}
-}
--- linux-2.1.42/arch/m68k/atari/Makefile.orig	Mon Jan 20 19:37:01 1997
+++ linux-2.1.42/arch/m68k/atari/Makefile	Mon Jun  9 23:03:06 1997
@@ -8,8 +8,7 @@
 # Note 2! The CFLAGS definitions are now in the main makefile...
 
 O_TARGET := atari.o
-O_OBJS	 := config.o atakeyb.o ataints.o \
-            stdma.o atasound.o joystick.o stram.o atafb.o
+O_OBJS	 := config.o atakeyb.o ataints.o stdma.o atasound.o joystick.o stram.o
 OX_OBJS  := atari_ksyms.o
 
 include $(TOPDIR)/Rules.make
--- linux-2.1.42/arch/m68k/atari/atafb.h.orig	Wed Dec 27 21:43:49 1995
+++ linux-2.1.42/arch/m68k/atari/atafb.h	Mon Jun  9 23:03:06 1997
@@ -1,48 +0,0 @@
-#include <linux/fb.h>
-#include <linux/console.h>
-
-
-struct display
-{
-    int bytes_per_row;		/* offset to one line below */
-
-    int cursor_x;		/* current cursor position */
-    int cursor_y;
-
-    int fgcol;			/* text colors */
-    int bgcol;
-
-    struct fb_var_screeninfo var;	/* variable infos */
-    struct fb_cmap	cmap;		/* colormap */
-  
-    /* the following three are copies from fb_fix_screeninfo */
-    int visual;
-    int type;
-    int type_aux;
-
-    u_char *bitplane;	        /* pointer to top of physical screen */
-
-    u_char *screen_base;	/* pointer to top of virtual screen */    
-
-    u_char *fontdata;           /* Font associated to this display */
-    int fontheight;
-    int fontwidth;
-
-    int inverse;		/* != 0 text black on white as default */
-    struct vc_data *conp;	/* pointer to console data */
-    struct display_switch *dispsw; /* pointers to depth specific functions */
-}; 
-
-struct fb_info
-{
-    char modename[40];		/* name of the at boottime detected video mode */
-    struct display *disp;	/* pointer to display variables */
-    int (*changevar)(int);	/* tell the console var has changed */
-    int (*switch_con)(int);	/* tell the framebuffer to switch consoles */
-    int (*updatevar)(int);	/* tell the framebuffer to update the vars */
-    void (*blank)(int);		/* tell the framebuffer to (un)blank the screen */
-};
-
-struct fb_info *atafb_init(long *);
-
-
--- linux-2.1.42/arch/m68k/atari/config.c.orig	Sun May 18 23:08:55 1997
+++ linux-2.1.42/arch/m68k/atari/config.c	Mon Jun  9 23:03:06 1997
@@ -85,9 +85,7 @@
 extern void atari_floppy_setup(char *, int *);
 #endif
 extern struct consw fb_con;
-extern struct fb_info *atari_fb_init(long *);
 static void atari_debug_init(void);
-extern void atari_video_setup(char *, int *);
 
 static struct console atari_console_driver;
 
@@ -272,9 +270,7 @@
     mach_floppy_setup	 = atari_floppy_setup;
 #endif
     conswitchp	         = &fb_con;
-    mach_fb_init         = atari_fb_init;
     mach_max_dma_address = 0xffffff;
-    mach_video_setup	 = atari_video_setup;
     kd_mksound		 = atari_mksound;
 
     /* ++bjoern: 
--- linux-2.1.42/arch/m68k/kernel/setup.c.orig	Sun Jun  1 22:04:29 1997
+++ linux-2.1.42/arch/m68k/kernel/setup.c	Mon Jun  9 23:03:06 1997
@@ -74,9 +74,7 @@
 int (*mach_hwclk) (int, struct hwclk_time*) = NULL;
 int (*mach_set_clock_mmss) (unsigned long) = NULL;
 void (*mach_reset)( void );
-struct fb_info *(*mach_fb_init)(long *) __initdata;
 long mach_max_dma_address = 0x00ffffff; /* default set to the lower 16MB */
-void (*mach_video_setup) (char *, int *) __initdata;
 #ifdef CONFIG_BLK_DEV_FD
 int (*mach_floppy_init) (void) __initdata = NULL;
 void (*mach_floppy_setup) (char *, int *) __initdata = NULL;
@@ -371,10 +369,4 @@
 		mach_gettod(year, mon, day, hour, min, sec);
 	else
 		*year = *mon = *day = *hour = *min = *sec = 0;
-}
-
-__initfunc(void video_setup (char *options, int *ints))
-{
-	if (mach_video_setup)
-		mach_video_setup (options, ints);
 }
--- linux-2.1.42/arch/m68k/mm/memory.c.orig	Sun Jun  1 22:04:30 1997
+++ linux-2.1.42/arch/m68k/mm/memory.c	Mon Jun  9 23:03:06 1997
@@ -4,6 +4,7 @@
  *  Copyright (C) 1995  Hamish Macdonald
  */
 
+#include <linux/module.h>
 #include <linux/mm.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
@@ -908,3 +909,4 @@
 }
 
 
+EXPORT_SYMBOL(kernel_map);
--- linux-2.1.42/arch/m68k/mm/Makefile.orig	Thu Jan  9 20:58:23 1997
+++ linux-2.1.42/arch/m68k/mm/Makefile	Mon Jun  9 23:03:06 1997
@@ -8,6 +8,7 @@
 # Note 2! The CFLAGS definition is now in the main makefile...
 
 O_TARGET := mm.o
-O_OBJS	 := init.o fault.o memory.o extable.o
+O_OBJS	 := init.o fault.o extable.o
+OX_OBJS  := memory.o 
 
 include $(TOPDIR)/Rules.make
--- linux-2.1.42/arch/m68k/console/Makefile.orig	Wed Sep 25 09:47:39 1996
+++ linux-2.1.42/arch/m68k/console/Makefile	Mon Jun  9 23:03:07 1997
@@ -10,7 +10,7 @@
 GSPH2C = gspahextoc
 
 L_TARGET = console.a
-L_OBJS = fbcon.o fonts.o font_8x16.o font_8x8.o pearl_8x8.o
+L_OBJS =
 M_OBJS =
 
 ifdef CONFIG_AMIGA_GSP
--- linux-2.1.42/arch/m68k/console/font_8x8.c.orig	Mon Mar  4 21:38:11 1996
+++ linux-2.1.42/arch/m68k/console/font_8x8.c	Mon Jun  9 23:03:11 1997
@@ -1,2577 +0,0 @@
-/**********************************************/
-/*                                            */
-/*       Font file generated by cpi2fnt       */
-/*                                            */
-/**********************************************/
-
-#define FONTDATAMAX 2048
-
-char fontname_8x8[] = "VGA8x8";
-
-int  fontheight_8x8 = 8;
-int  fontwidth_8x8  = 8;
-
-unsigned char fontdata_8x8[FONTDATAMAX] = {
-
-	/* 0 0x00 '^@' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 1 0x01 '^A' */
-	0x7e, /* 01111110 */
-	0x81, /* 10000001 */
-	0xa5, /* 10100101 */
-	0x81, /* 10000001 */
-	0xbd, /* 10111101 */
-	0x99, /* 10011001 */
-	0x81, /* 10000001 */
-	0x7e, /* 01111110 */
-
-	/* 2 0x02 '^B' */
-	0x7e, /* 01111110 */
-	0xff, /* 11111111 */
-	0xdb, /* 11011011 */
-	0xff, /* 11111111 */
-	0xc3, /* 11000011 */
-	0xe7, /* 11100111 */
-	0xff, /* 11111111 */
-	0x7e, /* 01111110 */
-
-	/* 3 0x03 '^C' */
-	0x6c, /* 01101100 */
-	0xfe, /* 11111110 */
-	0xfe, /* 11111110 */
-	0xfe, /* 11111110 */
-	0x7c, /* 01111100 */
-	0x38, /* 00111000 */
-	0x10, /* 00010000 */
-	0x00, /* 00000000 */
-
-	/* 4 0x04 '^D' */
-	0x10, /* 00010000 */
-	0x38, /* 00111000 */
-	0x7c, /* 01111100 */
-	0xfe, /* 11111110 */
-	0x7c, /* 01111100 */
-	0x38, /* 00111000 */
-	0x10, /* 00010000 */
-	0x00, /* 00000000 */
-
-	/* 5 0x05 '^E' */
-	0x38, /* 00111000 */
-	0x7c, /* 01111100 */
-	0x38, /* 00111000 */
-	0xfe, /* 11111110 */
-	0xfe, /* 11111110 */
-	0xd6, /* 11010110 */
-	0x10, /* 00010000 */
-	0x38, /* 00111000 */
-
-	/* 6 0x06 '^F' */
-	0x10, /* 00010000 */
-	0x38, /* 00111000 */
-	0x7c, /* 01111100 */
-	0xfe, /* 11111110 */
-	0xfe, /* 11111110 */
-	0x7c, /* 01111100 */
-	0x10, /* 00010000 */
-	0x38, /* 00111000 */
-
-	/* 7 0x07 '^G' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 8 0x08 '^H' */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xe7, /* 11100111 */
-	0xc3, /* 11000011 */
-	0xc3, /* 11000011 */
-	0xe7, /* 11100111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-
-	/* 9 0x09 '^I' */
-	0x00, /* 00000000 */
-	0x3c, /* 00111100 */
-	0x66, /* 01100110 */
-	0x42, /* 01000010 */
-	0x42, /* 01000010 */
-	0x66, /* 01100110 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-
-	/* 10 0x0a '^J' */
-	0xff, /* 11111111 */
-	0xc3, /* 11000011 */
-	0x99, /* 10011001 */
-	0xbd, /* 10111101 */
-	0xbd, /* 10111101 */
-	0x99, /* 10011001 */
-	0xc3, /* 11000011 */
-	0xff, /* 11111111 */
-
-	/* 11 0x0b '^K' */
-	0x0f, /* 00001111 */
-	0x07, /* 00000111 */
-	0x0f, /* 00001111 */
-	0x7d, /* 01111101 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x78, /* 01111000 */
-
-	/* 12 0x0c '^L' */
-	0x3c, /* 00111100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-	0x7e, /* 01111110 */
-	0x18, /* 00011000 */
-
-	/* 13 0x0d '^M' */
-	0x3f, /* 00111111 */
-	0x33, /* 00110011 */
-	0x3f, /* 00111111 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x70, /* 01110000 */
-	0xf0, /* 11110000 */
-	0xe0, /* 11100000 */
-
-	/* 14 0x0e '^N' */
-	0x7f, /* 01111111 */
-	0x63, /* 01100011 */
-	0x7f, /* 01111111 */
-	0x63, /* 01100011 */
-	0x63, /* 01100011 */
-	0x67, /* 01100111 */
-	0xe6, /* 11100110 */
-	0xc0, /* 11000000 */
-
-	/* 15 0x0f '^O' */
-	0x18, /* 00011000 */
-	0xdb, /* 11011011 */
-	0x3c, /* 00111100 */
-	0xe7, /* 11100111 */
-	0xe7, /* 11100111 */
-	0x3c, /* 00111100 */
-	0xdb, /* 11011011 */
-	0x18, /* 00011000 */
-
-	/* 16 0x10 '^P' */
-	0x80, /* 10000000 */
-	0xe0, /* 11100000 */
-	0xf8, /* 11111000 */
-	0xfe, /* 11111110 */
-	0xf8, /* 11111000 */
-	0xe0, /* 11100000 */
-	0x80, /* 10000000 */
-	0x00, /* 00000000 */
-
-	/* 17 0x11 '^Q' */
-	0x02, /* 00000010 */
-	0x0e, /* 00001110 */
-	0x3e, /* 00111110 */
-	0xfe, /* 11111110 */
-	0x3e, /* 00111110 */
-	0x0e, /* 00001110 */
-	0x02, /* 00000010 */
-	0x00, /* 00000000 */
-
-	/* 18 0x12 '^R' */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x7e, /* 01111110 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x7e, /* 01111110 */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-
-	/* 19 0x13 '^S' */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x00, /* 00000000 */
-	0x66, /* 01100110 */
-	0x00, /* 00000000 */
-
-	/* 20 0x14 '^T' */
-	0x7f, /* 01111111 */
-	0xdb, /* 11011011 */
-	0xdb, /* 11011011 */
-	0x7b, /* 01111011 */
-	0x1b, /* 00011011 */
-	0x1b, /* 00011011 */
-	0x1b, /* 00011011 */
-	0x00, /* 00000000 */
-
-	/* 21 0x15 '^U' */
-	0x3e, /* 00111110 */
-	0x61, /* 01100001 */
-	0x3c, /* 00111100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x3c, /* 00111100 */
-	0x86, /* 10000110 */
-	0x7c, /* 01111100 */
-
-	/* 22 0x16 '^V' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0x7e, /* 01111110 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-
-	/* 23 0x17 '^W' */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x7e, /* 01111110 */
-	0x18, /* 00011000 */
-	0x7e, /* 01111110 */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-	0xff, /* 11111111 */
-
-	/* 24 0x18 '^X' */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x7e, /* 01111110 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-
-	/* 25 0x19 '^Y' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x7e, /* 01111110 */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-
-	/* 26 0x1a '^Z' */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x0c, /* 00001100 */
-	0xfe, /* 11111110 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 27 0x1b '^[' */
-	0x00, /* 00000000 */
-	0x30, /* 00110000 */
-	0x60, /* 01100000 */
-	0xfe, /* 11111110 */
-	0x60, /* 01100000 */
-	0x30, /* 00110000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 28 0x1c '^\' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 29 0x1d '^]' */
-	0x00, /* 00000000 */
-	0x24, /* 00100100 */
-	0x66, /* 01100110 */
-	0xff, /* 11111111 */
-	0x66, /* 01100110 */
-	0x24, /* 00100100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 30 0x1e '^^' */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x7e, /* 01111110 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 31 0x1f '^_' */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0x7e, /* 01111110 */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 32 0x20 ' ' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 33 0x21 '!' */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-
-	/* 34 0x22 '"' */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x24, /* 00100100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 35 0x23 '#' */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0xfe, /* 11111110 */
-	0x6c, /* 01101100 */
-	0xfe, /* 11111110 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0x00, /* 00000000 */
-
-	/* 36 0x24 '$' */
-	0x18, /* 00011000 */
-	0x3e, /* 00111110 */
-	0x60, /* 01100000 */
-	0x3c, /* 00111100 */
-	0x06, /* 00000110 */
-	0x7c, /* 01111100 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-
-	/* 37 0x25 '%' */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0xcc, /* 11001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x66, /* 01100110 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-
-	/* 38 0x26 '&' */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0x38, /* 00111000 */
-	0x76, /* 01110110 */
-	0xdc, /* 11011100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-
-	/* 39 0x27 ''' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 40 0x28 '(' */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x0c, /* 00001100 */
-	0x00, /* 00000000 */
-
-	/* 41 0x29 ')' */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x00, /* 00000000 */
-
-	/* 42 0x2a '*' */
-	0x00, /* 00000000 */
-	0x66, /* 01100110 */
-	0x3c, /* 00111100 */
-	0xff, /* 11111111 */
-	0x3c, /* 00111100 */
-	0x66, /* 01100110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 43 0x2b '+' */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x7e, /* 01111110 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 44 0x2c ',' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-
-	/* 45 0x2d '-' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 46 0x2e '.' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-
-	/* 47 0x2f '/' */
-	0x06, /* 00000110 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x60, /* 01100000 */
-	0xc0, /* 11000000 */
-	0x80, /* 10000000 */
-	0x00, /* 00000000 */
-
-	/* 48 0x30 '0' */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0xc6, /* 11000110 */
-	0xd6, /* 11010110 */
-	0xc6, /* 11000110 */
-	0x6c, /* 01101100 */
-	0x38, /* 00111000 */
-	0x00, /* 00000000 */
-
-	/* 49 0x31 '1' */
-	0x18, /* 00011000 */
-	0x38, /* 00111000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-
-	/* 50 0x32 '2' */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0x06, /* 00000110 */
-	0x1c, /* 00011100 */
-	0x30, /* 00110000 */
-	0x66, /* 01100110 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-
-	/* 51 0x33 '3' */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0x06, /* 00000110 */
-	0x3c, /* 00111100 */
-	0x06, /* 00000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-
-	/* 52 0x34 '4' */
-	0x1c, /* 00011100 */
-	0x3c, /* 00111100 */
-	0x6c, /* 01101100 */
-	0xcc, /* 11001100 */
-	0xfe, /* 11111110 */
-	0x0c, /* 00001100 */
-	0x1e, /* 00011110 */
-	0x00, /* 00000000 */
-
-	/* 53 0x35 '5' */
-	0xfe, /* 11111110 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xfc, /* 11111100 */
-	0x06, /* 00000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-
-	/* 54 0x36 '6' */
-	0x38, /* 00111000 */
-	0x60, /* 01100000 */
-	0xc0, /* 11000000 */
-	0xfc, /* 11111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-
-	/* 55 0x37 '7' */
-	0xfe, /* 11111110 */
-	0xc6, /* 11000110 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x00, /* 00000000 */
-
-	/* 56 0x38 '8' */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-
-	/* 57 0x39 '9' */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7e, /* 01111110 */
-	0x06, /* 00000110 */
-	0x0c, /* 00001100 */
-	0x78, /* 01111000 */
-	0x00, /* 00000000 */
-
-	/* 58 0x3a ':' */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-
-	/* 59 0x3b ';' */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-
-	/* 60 0x3c '<' */
-	0x06, /* 00000110 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x0c, /* 00001100 */
-	0x06, /* 00000110 */
-	0x00, /* 00000000 */
-
-	/* 61 0x3d '=' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 62 0x3e '>' */
-	0x60, /* 01100000 */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x60, /* 01100000 */
-	0x00, /* 00000000 */
-
-	/* 63 0x3f '?' */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-
-	/* 64 0x40 '@' */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xde, /* 11011110 */
-	0xde, /* 11011110 */
-	0xde, /* 11011110 */
-	0xc0, /* 11000000 */
-	0x78, /* 01111000 */
-	0x00, /* 00000000 */
-
-	/* 65 0x41 'A' */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-
-	/* 66 0x42 'B' */
-	0xfc, /* 11111100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x7c, /* 01111100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0xfc, /* 11111100 */
-	0x00, /* 00000000 */
-
-	/* 67 0x43 'C' */
-	0x3c, /* 00111100 */
-	0x66, /* 01100110 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0x66, /* 01100110 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-
-	/* 68 0x44 'D' */
-	0xf8, /* 11111000 */
-	0x6c, /* 01101100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x6c, /* 01101100 */
-	0xf8, /* 11111000 */
-	0x00, /* 00000000 */
-
-	/* 69 0x45 'E' */
-	0xfe, /* 11111110 */
-	0x62, /* 01100010 */
-	0x68, /* 01101000 */
-	0x78, /* 01111000 */
-	0x68, /* 01101000 */
-	0x62, /* 01100010 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-
-	/* 70 0x46 'F' */
-	0xfe, /* 11111110 */
-	0x62, /* 01100010 */
-	0x68, /* 01101000 */
-	0x78, /* 01111000 */
-	0x68, /* 01101000 */
-	0x60, /* 01100000 */
-	0xf0, /* 11110000 */
-	0x00, /* 00000000 */
-
-	/* 71 0x47 'G' */
-	0x3c, /* 00111100 */
-	0x66, /* 01100110 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xce, /* 11001110 */
-	0x66, /* 01100110 */
-	0x3a, /* 00111010 */
-	0x00, /* 00000000 */
-
-	/* 72 0x48 'H' */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-
-	/* 73 0x49 'I' */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-
-	/* 74 0x4a 'J' */
-	0x1e, /* 00011110 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x78, /* 01111000 */
-	0x00, /* 00000000 */
-
-	/* 75 0x4b 'K' */
-	0xe6, /* 11100110 */
-	0x66, /* 01100110 */
-	0x6c, /* 01101100 */
-	0x78, /* 01111000 */
-	0x6c, /* 01101100 */
-	0x66, /* 01100110 */
-	0xe6, /* 11100110 */
-	0x00, /* 00000000 */
-
-	/* 76 0x4c 'L' */
-	0xf0, /* 11110000 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0x62, /* 01100010 */
-	0x66, /* 01100110 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-
-	/* 77 0x4d 'M' */
-	0xc6, /* 11000110 */
-	0xee, /* 11101110 */
-	0xfe, /* 11111110 */
-	0xfe, /* 11111110 */
-	0xd6, /* 11010110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-
-	/* 78 0x4e 'N' */
-	0xc6, /* 11000110 */
-	0xe6, /* 11100110 */
-	0xf6, /* 11110110 */
-	0xde, /* 11011110 */
-	0xce, /* 11001110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-
-	/* 79 0x4f 'O' */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-
-	/* 80 0x50 'P' */
-	0xfc, /* 11111100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x7c, /* 01111100 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0xf0, /* 11110000 */
-	0x00, /* 00000000 */
-
-	/* 81 0x51 'Q' */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xce, /* 11001110 */
-	0x7c, /* 01111100 */
-	0x0e, /* 00001110 */
-
-	/* 82 0x52 'R' */
-	0xfc, /* 11111100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x7c, /* 01111100 */
-	0x6c, /* 01101100 */
-	0x66, /* 01100110 */
-	0xe6, /* 11100110 */
-	0x00, /* 00000000 */
-
-	/* 83 0x53 'S' */
-	0x3c, /* 00111100 */
-	0x66, /* 01100110 */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x0c, /* 00001100 */
-	0x66, /* 01100110 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-
-	/* 84 0x54 'T' */
-	0x7e, /* 01111110 */
-	0x7e, /* 01111110 */
-	0x5a, /* 01011010 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-
-	/* 85 0x55 'U' */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-
-	/* 86 0x56 'V' */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x6c, /* 01101100 */
-	0x38, /* 00111000 */
-	0x00, /* 00000000 */
-
-	/* 87 0x57 'W' */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xd6, /* 11010110 */
-	0xd6, /* 11010110 */
-	0xfe, /* 11111110 */
-	0x6c, /* 01101100 */
-	0x00, /* 00000000 */
-
-	/* 88 0x58 'X' */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x6c, /* 01101100 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-
-	/* 89 0x59 'Y' */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-
-	/* 90 0x5a 'Z' */
-	0xfe, /* 11111110 */
-	0xc6, /* 11000110 */
-	0x8c, /* 10001100 */
-	0x18, /* 00011000 */
-	0x32, /* 00110010 */
-	0x66, /* 01100110 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-
-	/* 91 0x5b '[' */
-	0x3c, /* 00111100 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-
-	/* 92 0x5c '\' */
-	0xc0, /* 11000000 */
-	0x60, /* 01100000 */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x0c, /* 00001100 */
-	0x06, /* 00000110 */
-	0x02, /* 00000010 */
-	0x00, /* 00000000 */
-
-	/* 93 0x5d ']' */
-	0x3c, /* 00111100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-
-	/* 94 0x5e '^' */
-	0x10, /* 00010000 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 95 0x5f '_' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-
-	/* 96 0x60 '`' */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x0c, /* 00001100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 97 0x61 'a' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x78, /* 01111000 */
-	0x0c, /* 00001100 */
-	0x7c, /* 01111100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-
-	/* 98 0x62 'b' */
-	0xe0, /* 11100000 */
-	0x60, /* 01100000 */
-	0x7c, /* 01111100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0xdc, /* 11011100 */
-	0x00, /* 00000000 */
-
-	/* 99 0x63 'c' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc0, /* 11000000 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-
-	/* 100 0x64 'd' */
-	0x1c, /* 00011100 */
-	0x0c, /* 00001100 */
-	0x7c, /* 01111100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-
-	/* 101 0x65 'e' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0xc0, /* 11000000 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-
-	/* 102 0x66 'f' */
-	0x3c, /* 00111100 */
-	0x66, /* 01100110 */
-	0x60, /* 01100000 */
-	0xf8, /* 11111000 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0xf0, /* 11110000 */
-	0x00, /* 00000000 */
-
-	/* 103 0x67 'g' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x76, /* 01110110 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x7c, /* 01111100 */
-	0x0c, /* 00001100 */
-	0xf8, /* 11111000 */
-
-	/* 104 0x68 'h' */
-	0xe0, /* 11100000 */
-	0x60, /* 01100000 */
-	0x6c, /* 01101100 */
-	0x76, /* 01110110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0xe6, /* 11100110 */
-	0x00, /* 00000000 */
-
-	/* 105 0x69 'i' */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x38, /* 00111000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-
-	/* 106 0x6a 'j' */
-	0x06, /* 00000110 */
-	0x00, /* 00000000 */
-	0x06, /* 00000110 */
-	0x06, /* 00000110 */
-	0x06, /* 00000110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x3c, /* 00111100 */
-
-	/* 107 0x6b 'k' */
-	0xe0, /* 11100000 */
-	0x60, /* 01100000 */
-	0x66, /* 01100110 */
-	0x6c, /* 01101100 */
-	0x78, /* 01111000 */
-	0x6c, /* 01101100 */
-	0xe6, /* 11100110 */
-	0x00, /* 00000000 */
-
-	/* 108 0x6c 'l' */
-	0x38, /* 00111000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-
-	/* 109 0x6d 'm' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xec, /* 11101100 */
-	0xfe, /* 11111110 */
-	0xd6, /* 11010110 */
-	0xd6, /* 11010110 */
-	0xd6, /* 11010110 */
-	0x00, /* 00000000 */
-
-	/* 110 0x6e 'n' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xdc, /* 11011100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x00, /* 00000000 */
-
-	/* 111 0x6f 'o' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-
-	/* 112 0x70 'p' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xdc, /* 11011100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x7c, /* 01111100 */
-	0x60, /* 01100000 */
-	0xf0, /* 11110000 */
-
-	/* 113 0x71 'q' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x76, /* 01110110 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x7c, /* 01111100 */
-	0x0c, /* 00001100 */
-	0x1e, /* 00011110 */
-
-	/* 114 0x72 'r' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xdc, /* 11011100 */
-	0x76, /* 01110110 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0xf0, /* 11110000 */
-	0x00, /* 00000000 */
-
-	/* 115 0x73 's' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0xc0, /* 11000000 */
-	0x7c, /* 01111100 */
-	0x06, /* 00000110 */
-	0xfc, /* 11111100 */
-	0x00, /* 00000000 */
-
-	/* 116 0x74 't' */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0xfc, /* 11111100 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x36, /* 00110110 */
-	0x1c, /* 00011100 */
-	0x00, /* 00000000 */
-
-	/* 117 0x75 'u' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-
-	/* 118 0x76 'v' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x6c, /* 01101100 */
-	0x38, /* 00111000 */
-	0x00, /* 00000000 */
-
-	/* 119 0x77 'w' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0xd6, /* 11010110 */
-	0xd6, /* 11010110 */
-	0xfe, /* 11111110 */
-	0x6c, /* 01101100 */
-	0x00, /* 00000000 */
-
-	/* 120 0x78 'x' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0x6c, /* 01101100 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-
-	/* 121 0x79 'y' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7e, /* 01111110 */
-	0x06, /* 00000110 */
-	0xfc, /* 11111100 */
-
-	/* 122 0x7a 'z' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0x4c, /* 01001100 */
-	0x18, /* 00011000 */
-	0x32, /* 00110010 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-
-	/* 123 0x7b '{' */
-	0x0e, /* 00001110 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x70, /* 01110000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x0e, /* 00001110 */
-	0x00, /* 00000000 */
-
-	/* 124 0x7c '|' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-
-	/* 125 0x7d '}' */
-	0x70, /* 01110000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x0e, /* 00001110 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x70, /* 01110000 */
-	0x00, /* 00000000 */
-
-	/* 126 0x7e '~' */
-	0x76, /* 01110110 */
-	0xdc, /* 11011100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 127 0x7f '' */
-	0x00, /* 00000000 */
-	0x10, /* 00010000 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-
-	/* 128 0x80 '' */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x0c, /* 00001100 */
-	0x78, /* 01111000 */
-
-	/* 129 0x81 '' */
-	0xcc, /* 11001100 */
-	0x00, /* 00000000 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-
-	/* 130 0x82 '' */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0xc0, /* 11000000 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-
-	/* 131 0x83 '' */
-	0x7c, /* 01111100 */
-	0x82, /* 10000010 */
-	0x78, /* 01111000 */
-	0x0c, /* 00001100 */
-	0x7c, /* 01111100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-
-	/* 132 0x84 '' */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0x78, /* 01111000 */
-	0x0c, /* 00001100 */
-	0x7c, /* 01111100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-
-	/* 133 0x85 '' */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x78, /* 01111000 */
-	0x0c, /* 00001100 */
-	0x7c, /* 01111100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-
-	/* 134 0x86 '' */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x78, /* 01111000 */
-	0x0c, /* 00001100 */
-	0x7c, /* 01111100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-
-	/* 135 0x87 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0x7e, /* 01111110 */
-	0x0c, /* 00001100 */
-	0x38, /* 00111000 */
-
-	/* 136 0x88 '' */
-	0x7c, /* 01111100 */
-	0x82, /* 10000010 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0xc0, /* 11000000 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-
-	/* 137 0x89 '' */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0xc0, /* 11000000 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-
-	/* 138 0x8a '' */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0xc0, /* 11000000 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-
-	/* 139 0x8b '' */
-	0x66, /* 01100110 */
-	0x00, /* 00000000 */
-	0x38, /* 00111000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-
-	/* 140 0x8c '' */
-	0x7c, /* 01111100 */
-	0x82, /* 10000010 */
-	0x38, /* 00111000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-
-	/* 141 0x8d '' */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x38, /* 00111000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-
-	/* 142 0x8e '' */
-	0xc6, /* 11000110 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-
-	/* 143 0x8f '' */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-
-	/* 144 0x90 '' */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0xfe, /* 11111110 */
-	0xc0, /* 11000000 */
-	0xf8, /* 11111000 */
-	0xc0, /* 11000000 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-
-	/* 145 0x91 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0x18, /* 00011000 */
-	0x7e, /* 01111110 */
-	0xd8, /* 11011000 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-
-	/* 146 0x92 '' */
-	0x3e, /* 00111110 */
-	0x6c, /* 01101100 */
-	0xcc, /* 11001100 */
-	0xfe, /* 11111110 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xce, /* 11001110 */
-	0x00, /* 00000000 */
-
-	/* 147 0x93 '' */
-	0x7c, /* 01111100 */
-	0x82, /* 10000010 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-
-	/* 148 0x94 '' */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-
-	/* 149 0x95 '' */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-
-	/* 150 0x96 '' */
-	0x78, /* 01111000 */
-	0x84, /* 10000100 */
-	0x00, /* 00000000 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-
-	/* 151 0x97 '' */
-	0x60, /* 01100000 */
-	0x30, /* 00110000 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-
-	/* 152 0x98 '' */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7e, /* 01111110 */
-	0x06, /* 00000110 */
-	0xfc, /* 11111100 */
-
-	/* 153 0x99 '' */
-	0xc6, /* 11000110 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x6c, /* 01101100 */
-	0x38, /* 00111000 */
-	0x00, /* 00000000 */
-
-	/* 154 0x9a '' */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-
-	/* 155 0x9b '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x7e, /* 01111110 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0x7e, /* 01111110 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 156 0x9c '' */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0x64, /* 01100100 */
-	0xf0, /* 11110000 */
-	0x60, /* 01100000 */
-	0x66, /* 01100110 */
-	0xfc, /* 11111100 */
-	0x00, /* 00000000 */
-
-	/* 157 0x9d '' */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x3c, /* 00111100 */
-	0x7e, /* 01111110 */
-	0x18, /* 00011000 */
-	0x7e, /* 01111110 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 158 0x9e '' */
-	0xf8, /* 11111000 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xfa, /* 11111010 */
-	0xc6, /* 11000110 */
-	0xcf, /* 11001111 */
-	0xc6, /* 11000110 */
-	0xc7, /* 11000111 */
-
-	/* 159 0x9f '' */
-	0x0e, /* 00001110 */
-	0x1b, /* 00011011 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-	0xd8, /* 11011000 */
-	0x70, /* 01110000 */
-	0x00, /* 00000000 */
-
-	/* 160 0xa0 '' */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x78, /* 01111000 */
-	0x0c, /* 00001100 */
-	0x7c, /* 01111100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-
-	/* 161 0xa1 '' */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x38, /* 00111000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-
-	/* 162 0xa2 '' */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-
-	/* 163 0xa3 '' */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-
-	/* 164 0xa4 '' */
-	0x76, /* 01110110 */
-	0xdc, /* 11011100 */
-	0x00, /* 00000000 */
-	0xdc, /* 11011100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x00, /* 00000000 */
-
-	/* 165 0xa5 '' */
-	0x76, /* 01110110 */
-	0xdc, /* 11011100 */
-	0x00, /* 00000000 */
-	0xe6, /* 11100110 */
-	0xf6, /* 11110110 */
-	0xde, /* 11011110 */
-	0xce, /* 11001110 */
-	0x00, /* 00000000 */
-
-	/* 166 0xa6 '' */
-	0x3c, /* 00111100 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0x3e, /* 00111110 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 167 0xa7 '' */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0x38, /* 00111000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 168 0xa8 '' */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x63, /* 01100011 */
-	0x3e, /* 00111110 */
-	0x00, /* 00000000 */
-
-	/* 169 0xa9 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 170 0xaa '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0x06, /* 00000110 */
-	0x06, /* 00000110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 171 0xab '' */
-	0x63, /* 01100011 */
-	0xe6, /* 11100110 */
-	0x6c, /* 01101100 */
-	0x7e, /* 01111110 */
-	0x33, /* 00110011 */
-	0x66, /* 01100110 */
-	0xcc, /* 11001100 */
-	0x0f, /* 00001111 */
-
-	/* 172 0xac '' */
-	0x63, /* 01100011 */
-	0xe6, /* 11100110 */
-	0x6c, /* 01101100 */
-	0x7a, /* 01111010 */
-	0x36, /* 00110110 */
-	0x6a, /* 01101010 */
-	0xdf, /* 11011111 */
-	0x06, /* 00000110 */
-
-	/* 173 0xad '' */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-
-	/* 174 0xae '' */
-	0x00, /* 00000000 */
-	0x33, /* 00110011 */
-	0x66, /* 01100110 */
-	0xcc, /* 11001100 */
-	0x66, /* 01100110 */
-	0x33, /* 00110011 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 175 0xaf '' */
-	0x00, /* 00000000 */
-	0xcc, /* 11001100 */
-	0x66, /* 01100110 */
-	0x33, /* 00110011 */
-	0x66, /* 01100110 */
-	0xcc, /* 11001100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 176 0xb0 '' */
-	0x22, /* 00100010 */
-	0x88, /* 10001000 */
-	0x22, /* 00100010 */
-	0x88, /* 10001000 */
-	0x22, /* 00100010 */
-	0x88, /* 10001000 */
-	0x22, /* 00100010 */
-	0x88, /* 10001000 */
-
-	/* 177 0xb1 '' */
-	0x55, /* 01010101 */
-	0xaa, /* 10101010 */
-	0x55, /* 01010101 */
-	0xaa, /* 10101010 */
-	0x55, /* 01010101 */
-	0xaa, /* 10101010 */
-	0x55, /* 01010101 */
-	0xaa, /* 10101010 */
-
-	/* 178 0xb2 '' */
-	0x77, /* 01110111 */
-	0xdd, /* 11011101 */
-	0x77, /* 01110111 */
-	0xdd, /* 11011101 */
-	0x77, /* 01110111 */
-	0xdd, /* 11011101 */
-	0x77, /* 01110111 */
-	0xdd, /* 11011101 */
-
-	/* 179 0xb3 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 180 0xb4 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0xf8, /* 11111000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 181 0xb5 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0xf8, /* 11111000 */
-	0x18, /* 00011000 */
-	0xf8, /* 11111000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 182 0xb6 '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0xf6, /* 11110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 183 0xb7 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 184 0xb8 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xf8, /* 11111000 */
-	0x18, /* 00011000 */
-	0xf8, /* 11111000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 185 0xb9 '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0xf6, /* 11110110 */
-	0x06, /* 00000110 */
-	0xf6, /* 11110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 186 0xba '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 187 0xbb '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0x06, /* 00000110 */
-	0xf6, /* 11110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 188 0xbc '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0xf6, /* 11110110 */
-	0x06, /* 00000110 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 189 0xbd '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 190 0xbe '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0xf8, /* 11111000 */
-	0x18, /* 00011000 */
-	0xf8, /* 11111000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 191 0xbf '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xf8, /* 11111000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 192 0xc0 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x1f, /* 00011111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 193 0xc1 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 194 0xc2 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 195 0xc3 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x1f, /* 00011111 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 196 0xc4 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 197 0xc5 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0xff, /* 11111111 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 198 0xc6 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x1f, /* 00011111 */
-	0x18, /* 00011000 */
-	0x1f, /* 00011111 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 199 0xc7 '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x37, /* 00110111 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 200 0xc8 '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x37, /* 00110111 */
-	0x30, /* 00110000 */
-	0x3f, /* 00111111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 201 0xc9 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x3f, /* 00111111 */
-	0x30, /* 00110000 */
-	0x37, /* 00110111 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 202 0xca '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0xf7, /* 11110111 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 203 0xcb '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0xf7, /* 11110111 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 204 0xcc '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x37, /* 00110111 */
-	0x30, /* 00110000 */
-	0x37, /* 00110111 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 205 0xcd '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 206 0xce '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0xf7, /* 11110111 */
-	0x00, /* 00000000 */
-	0xf7, /* 11110111 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 207 0xcf '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 208 0xd0 '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 209 0xd1 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 210 0xd2 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 211 0xd3 '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x3f, /* 00111111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 212 0xd4 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x1f, /* 00011111 */
-	0x18, /* 00011000 */
-	0x1f, /* 00011111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 213 0xd5 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x1f, /* 00011111 */
-	0x18, /* 00011000 */
-	0x1f, /* 00011111 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 214 0xd6 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x3f, /* 00111111 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 215 0xd7 '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0xff, /* 11111111 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 216 0xd8 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0xff, /* 11111111 */
-	0x18, /* 00011000 */
-	0xff, /* 11111111 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 217 0xd9 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0xf8, /* 11111000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 218 0xda '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x1f, /* 00011111 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 219 0xdb '' */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-
-	/* 220 0xdc '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-
-	/* 221 0xdd '' */
-	0xf0, /* 11110000 */
-	0xf0, /* 11110000 */
-	0xf0, /* 11110000 */
-	0xf0, /* 11110000 */
-	0xf0, /* 11110000 */
-	0xf0, /* 11110000 */
-	0xf0, /* 11110000 */
-	0xf0, /* 11110000 */
-
-	/* 222 0xde '' */
-	0x0f, /* 00001111 */
-	0x0f, /* 00001111 */
-	0x0f, /* 00001111 */
-	0x0f, /* 00001111 */
-	0x0f, /* 00001111 */
-	0x0f, /* 00001111 */
-	0x0f, /* 00001111 */
-	0x0f, /* 00001111 */
-
-	/* 223 0xdf '' */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 224 0xe0 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x76, /* 01110110 */
-	0xdc, /* 11011100 */
-	0xc8, /* 11001000 */
-	0xdc, /* 11011100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-
-	/* 225 0xe1 '' */
-	0x78, /* 01111000 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xd8, /* 11011000 */
-	0xcc, /* 11001100 */
-	0xc6, /* 11000110 */
-	0xcc, /* 11001100 */
-	0x00, /* 00000000 */
-
-	/* 226 0xe2 '' */
-	0xfe, /* 11111110 */
-	0xc6, /* 11000110 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0x00, /* 00000000 */
-
-	/* 227 0xe3 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0x00, /* 00000000 */
-
-	/* 228 0xe4 '' */
-	0xfe, /* 11111110 */
-	0xc6, /* 11000110 */
-	0x60, /* 01100000 */
-	0x30, /* 00110000 */
-	0x60, /* 01100000 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-
-	/* 229 0xe5 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0xd8, /* 11011000 */
-	0xd8, /* 11011000 */
-	0xd8, /* 11011000 */
-	0x70, /* 01110000 */
-	0x00, /* 00000000 */
-
-	/* 230 0xe6 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x7c, /* 01111100 */
-	0xc0, /* 11000000 */
-
-	/* 231 0xe7 '' */
-	0x00, /* 00000000 */
-	0x76, /* 01110110 */
-	0xdc, /* 11011100 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-
-	/* 232 0xe8 '' */
-	0x7e, /* 01111110 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-	0x7e, /* 01111110 */
-
-	/* 233 0xe9 '' */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0xc6, /* 11000110 */
-	0x6c, /* 01101100 */
-	0x38, /* 00111000 */
-	0x00, /* 00000000 */
-
-	/* 234 0xea '' */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0xee, /* 11101110 */
-	0x00, /* 00000000 */
-
-	/* 235 0xeb '' */
-	0x0e, /* 00001110 */
-	0x18, /* 00011000 */
-	0x0c, /* 00001100 */
-	0x3e, /* 00111110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-
-	/* 236 0xec '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0xdb, /* 11011011 */
-	0xdb, /* 11011011 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 237 0xed '' */
-	0x06, /* 00000110 */
-	0x0c, /* 00001100 */
-	0x7e, /* 01111110 */
-	0xdb, /* 11011011 */
-	0xdb, /* 11011011 */
-	0x7e, /* 01111110 */
-	0x60, /* 01100000 */
-	0xc0, /* 11000000 */
-
-	/* 238 0xee '' */
-	0x1e, /* 00011110 */
-	0x30, /* 00110000 */
-	0x60, /* 01100000 */
-	0x7e, /* 01111110 */
-	0x60, /* 01100000 */
-	0x30, /* 00110000 */
-	0x1e, /* 00011110 */
-	0x00, /* 00000000 */
-
-	/* 239 0xef '' */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-
-	/* 240 0xf0 '' */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 241 0xf1 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x7e, /* 01111110 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-
-	/* 242 0xf2 '' */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-
-	/* 243 0xf3 '' */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x0c, /* 00001100 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-
-	/* 244 0xf4 '' */
-	0x0e, /* 00001110 */
-	0x1b, /* 00011011 */
-	0x1b, /* 00011011 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 245 0xf5 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0xd8, /* 11011000 */
-	0xd8, /* 11011000 */
-	0x70, /* 01110000 */
-
-	/* 246 0xf6 '' */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 247 0xf7 '' */
-	0x00, /* 00000000 */
-	0x76, /* 01110110 */
-	0xdc, /* 11011100 */
-	0x00, /* 00000000 */
-	0x76, /* 01110110 */
-	0xdc, /* 11011100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 248 0xf8 '' */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0x38, /* 00111000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 249 0xf9 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 250 0xfa '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 251 0xfb '' */
-	0x0f, /* 00001111 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0xec, /* 11101100 */
-	0x6c, /* 01101100 */
-	0x3c, /* 00111100 */
-	0x1c, /* 00011100 */
-
-	/* 252 0xfc '' */
-	0x6c, /* 01101100 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 253 0xfd '' */
-	0x78, /* 01111000 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 254 0xfe '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x3c, /* 00111100 */
-	0x3c, /* 00111100 */
-	0x3c, /* 00111100 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 255 0xff '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-};
-
--- linux-2.1.42/arch/m68k/console/fonts.c.orig	Wed Sep 25 09:47:39 1996
+++ linux-2.1.42/arch/m68k/console/fonts.c	Mon Jun  9 23:03:11 1997
@@ -1,108 +0,0 @@
-
-/*
- * arch/m68k/console/fonts.c -- `Soft' font definitions
- *
- *    Created 1995 by Geert Uytterhoeven
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file COPYING in the main directory of this archive
- * for more details.
- */
-
-
-#include <linux/types.h>
-#include <linux/string.h>
-#include <asm/setup.h>
-#include <asm/font.h>
-
-
-   /*
-    *    External Font Definitions
-    */
-
-/* VGA8x8 */
-extern char fontname_8x8[];
-extern int fontwidth_8x8, fontheight_8x8;
-extern u_char fontdata_8x8[];
-
-/* VGA8x16 */
-extern char fontname_8x16[];
-extern int fontwidth_8x16, fontheight_8x16;
-extern u_char fontdata_8x16[];
-
-/* PEARL8x8 */
-extern char fontname_pearl8x8[];
-extern int fontwidth_pearl8x8, fontheight_pearl8x8;
-extern u_char fontdata_pearl8x8[];
-
-
-   /*
-    *    Font Descriptor Array
-    */
-
-struct softfontdesc {
-   char *name;
-   int *width;
-   int *height;
-   u_char *data;
-};
-
-#define VGA8x8_IDX	0
-#define VGA8x16_IDX	1
-#define PEARL8x8_IDX	2
-
-static struct softfontdesc softfonts[] = {
-   { fontname_8x8, &fontwidth_8x8, &fontheight_8x8, fontdata_8x8 },
-   { fontname_8x16, &fontwidth_8x16, &fontheight_8x16, fontdata_8x16 },
-   { fontname_pearl8x8, &fontwidth_pearl8x8, &fontheight_pearl8x8,
-     fontdata_pearl8x8 },
-};
-
-static u_long numsoftfonts = sizeof(softfonts)/sizeof(*softfonts);
-
-
-   /*
-    *    Find a font with a specific name
-    */
-
-int findsoftfont(char *name, int *width, int *height, u_char *data[])
-{
-   int i;
-
-   for (i = 0; i < numsoftfonts; i++)
-      if (!strcmp(softfonts[i].name, name)) {
-         if (width)
-            *width = *softfonts[i].width;
-         if (height)
-            *height = *softfonts[i].height;
-         if (data)
-            *data = softfonts[i].data;
-			return(1);
-      }
-	return(0);
-}
-
-
-   /*
-    *    Get the default font for a specific screen size
-    */
-
-void getdefaultfont(int xres, int yres, char *name[], int *width, int *height,
-                    u_char *data[])
-{
-    int i;
-    
-    if (yres < 400)
-	i = MACH_IS_AMIGA ? PEARL8x8_IDX : VGA8x8_IDX;
-    else
-	i = VGA8x16_IDX;
-
-    if (name)
-	*name = softfonts[i].name;
-    if (width)
-	*width = *softfonts[i].width;
-    if (height)
-	*height = *softfonts[i].height;
-    if (data)
-	*data = softfonts[i].data;
-}
--- linux-2.1.42/arch/m68k/console/pearl_8x8.c.orig	Mon May 20 06:54:26 1996
+++ linux-2.1.42/arch/m68k/console/pearl_8x8.c	Mon Jun  9 23:03:12 1997
@@ -1,2582 +0,0 @@
-/**********************************************/
-/*                                            */
-/*       Font file generated by cpi2fnt       */
-/*       ------------------------------       */
-/*       Combined with the alpha-numeric      */
-/*       portion of Greg Harp's old PEARL     */
-/*       font (from earlier versions of       */
-/*       linux-m86k) by John Shifflett        */
-/*                                            */
-/**********************************************/
-
-#define FONTDATAMAX 2048
-
-char fontname_pearl8x8[] = "PEARL8x8";
-
-int  fontheight_pearl8x8 = 8;
-int  fontwidth_pearl8x8  = 8;
-
-unsigned char fontdata_pearl8x8[FONTDATAMAX] = {
-
-   /* 0 0x00 '^@' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 1 0x01 '^A' */
-   0x7e, /* 01111110 */
-   0x81, /* 10000001 */
-   0xa5, /* 10100101 */
-   0x81, /* 10000001 */
-   0xbd, /* 10111101 */
-   0x99, /* 10011001 */
-   0x81, /* 10000001 */
-   0x7e, /* 01111110 */
-
-   /* 2 0x02 '^B' */
-   0x7e, /* 01111110 */
-   0xff, /* 11111111 */
-   0xdb, /* 11011011 */
-   0xff, /* 11111111 */
-   0xc3, /* 11000011 */
-   0xe7, /* 11100111 */
-   0xff, /* 11111111 */
-   0x7e, /* 01111110 */
-
-   /* 3 0x03 '^C' */
-   0x6c, /* 01101100 */
-   0xfe, /* 11111110 */
-   0xfe, /* 11111110 */
-   0xfe, /* 11111110 */
-   0x7c, /* 01111100 */
-   0x38, /* 00111000 */
-   0x10, /* 00010000 */
-   0x00, /* 00000000 */
-
-   /* 4 0x04 '^D' */
-   0x10, /* 00010000 */
-   0x38, /* 00111000 */
-   0x7c, /* 01111100 */
-   0xfe, /* 11111110 */
-   0x7c, /* 01111100 */
-   0x38, /* 00111000 */
-   0x10, /* 00010000 */
-   0x00, /* 00000000 */
-
-   /* 5 0x05 '^E' */
-   0x38, /* 00111000 */
-   0x7c, /* 01111100 */
-   0x38, /* 00111000 */
-   0xfe, /* 11111110 */
-   0xfe, /* 11111110 */
-   0xd6, /* 11010110 */
-   0x10, /* 00010000 */
-   0x38, /* 00111000 */
-
-   /* 6 0x06 '^F' */
-   0x10, /* 00010000 */
-   0x38, /* 00111000 */
-   0x7c, /* 01111100 */
-   0xfe, /* 11111110 */
-   0xfe, /* 11111110 */
-   0x7c, /* 01111100 */
-   0x10, /* 00010000 */
-   0x38, /* 00111000 */
-
-   /* 7 0x07 '^G' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x18, /* 00011000 */
-   0x3c, /* 00111100 */
-   0x3c, /* 00111100 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 8 0x08 '^H' */
-   0xff, /* 11111111 */
-   0xff, /* 11111111 */
-   0xe7, /* 11100111 */
-   0xc3, /* 11000011 */
-   0xc3, /* 11000011 */
-   0xe7, /* 11100111 */
-   0xff, /* 11111111 */
-   0xff, /* 11111111 */
-
-   /* 9 0x09 '^I' */
-   0x00, /* 00000000 */
-   0x3c, /* 00111100 */
-   0x66, /* 01100110 */
-   0x42, /* 01000010 */
-   0x42, /* 01000010 */
-   0x66, /* 01100110 */
-   0x3c, /* 00111100 */
-   0x00, /* 00000000 */
-
-   /* 10 0x0a '^J' */
-   0xff, /* 11111111 */
-   0xc3, /* 11000011 */
-   0x99, /* 10011001 */
-   0xbd, /* 10111101 */
-   0xbd, /* 10111101 */
-   0x99, /* 10011001 */
-   0xc3, /* 11000011 */
-   0xff, /* 11111111 */
-
-   /* 11 0x0b '^K' */
-   0x0f, /* 00001111 */
-   0x07, /* 00000111 */
-   0x0f, /* 00001111 */
-   0x7d, /* 01111101 */
-   0xcc, /* 11001100 */
-   0xcc, /* 11001100 */
-   0xcc, /* 11001100 */
-   0x78, /* 01111000 */
-
-   /* 12 0x0c '^L' */
-   0x3c, /* 00111100 */
-   0x66, /* 01100110 */
-   0x66, /* 01100110 */
-   0x66, /* 01100110 */
-   0x3c, /* 00111100 */
-   0x18, /* 00011000 */
-   0x7e, /* 01111110 */
-   0x18, /* 00011000 */
-
-   /* 13 0x0d '^M' */
-   0x3f, /* 00111111 */
-   0x33, /* 00110011 */
-   0x3f, /* 00111111 */
-   0x30, /* 00110000 */
-   0x30, /* 00110000 */
-   0x70, /* 01110000 */
-   0xf0, /* 11110000 */
-   0xe0, /* 11100000 */
-
-   /* 14 0x0e '^N' */
-   0x7f, /* 01111111 */
-   0x63, /* 01100011 */
-   0x7f, /* 01111111 */
-   0x63, /* 01100011 */
-   0x63, /* 01100011 */
-   0x67, /* 01100111 */
-   0xe6, /* 11100110 */
-   0xc0, /* 11000000 */
-
-   /* 15 0x0f '^O' */
-   0x18, /* 00011000 */
-   0xdb, /* 11011011 */
-   0x3c, /* 00111100 */
-   0xe7, /* 11100111 */
-   0xe7, /* 11100111 */
-   0x3c, /* 00111100 */
-   0xdb, /* 11011011 */
-   0x18, /* 00011000 */
-
-   /* 16 0x10 '^P' */
-   0x80, /* 10000000 */
-   0xe0, /* 11100000 */
-   0xf8, /* 11111000 */
-   0xfe, /* 11111110 */
-   0xf8, /* 11111000 */
-   0xe0, /* 11100000 */
-   0x80, /* 10000000 */
-   0x00, /* 00000000 */
-
-   /* 17 0x11 '^Q' */
-   0x02, /* 00000010 */
-   0x0e, /* 00001110 */
-   0x3e, /* 00111110 */
-   0xfe, /* 11111110 */
-   0x3e, /* 00111110 */
-   0x0e, /* 00001110 */
-   0x02, /* 00000010 */
-   0x00, /* 00000000 */
-
-   /* 18 0x12 '^R' */
-   0x18, /* 00011000 */
-   0x3c, /* 00111100 */
-   0x7e, /* 01111110 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x7e, /* 01111110 */
-   0x3c, /* 00111100 */
-   0x18, /* 00011000 */
-
-   /* 19 0x13 '^S' */
-   0x66, /* 01100110 */
-   0x66, /* 01100110 */
-   0x66, /* 01100110 */
-   0x66, /* 01100110 */
-   0x66, /* 01100110 */
-   0x00, /* 00000000 */
-   0x66, /* 01100110 */
-   0x00, /* 00000000 */
-
-   /* 20 0x14 '^T' */
-   0x7f, /* 01111111 */
-   0xdb, /* 11011011 */
-   0xdb, /* 11011011 */
-   0x7b, /* 01111011 */
-   0x1b, /* 00011011 */
-   0x1b, /* 00011011 */
-   0x1b, /* 00011011 */
-   0x00, /* 00000000 */
-
-   /* 21 0x15 '^U' */
-   0x3e, /* 00111110 */
-   0x61, /* 01100001 */
-   0x3c, /* 00111100 */
-   0x66, /* 01100110 */
-   0x66, /* 01100110 */
-   0x3c, /* 00111100 */
-   0x86, /* 10000110 */
-   0x7c, /* 01111100 */
-
-   /* 22 0x16 '^V' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x7e, /* 01111110 */
-   0x7e, /* 01111110 */
-   0x7e, /* 01111110 */
-   0x00, /* 00000000 */
-
-   /* 23 0x17 '^W' */
-   0x18, /* 00011000 */
-   0x3c, /* 00111100 */
-   0x7e, /* 01111110 */
-   0x18, /* 00011000 */
-   0x7e, /* 01111110 */
-   0x3c, /* 00111100 */
-   0x18, /* 00011000 */
-   0xff, /* 11111111 */
-
-   /* 24 0x18 '^X' */
-   0x18, /* 00011000 */
-   0x3c, /* 00111100 */
-   0x7e, /* 01111110 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-
-   /* 25 0x19 '^Y' */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x7e, /* 01111110 */
-   0x3c, /* 00111100 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-
-   /* 26 0x1a '^Z' */
-   0x00, /* 00000000 */
-   0x18, /* 00011000 */
-   0x0c, /* 00001100 */
-   0xfe, /* 11111110 */
-   0x0c, /* 00001100 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 27 0x1b '^[' */
-   0x00, /* 00000000 */
-   0x30, /* 00110000 */
-   0x60, /* 01100000 */
-   0xfe, /* 11111110 */
-   0x60, /* 01100000 */
-   0x30, /* 00110000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 28 0x1c '^\' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0xfe, /* 11111110 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 29 0x1d '^]' */
-   0x00, /* 00000000 */
-   0x24, /* 00100100 */
-   0x66, /* 01100110 */
-   0xff, /* 11111111 */
-   0x66, /* 01100110 */
-   0x24, /* 00100100 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 30 0x1e '^^' */
-   0x00, /* 00000000 */
-   0x18, /* 00011000 */
-   0x3c, /* 00111100 */
-   0x7e, /* 01111110 */
-   0xff, /* 11111111 */
-   0xff, /* 11111111 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 31 0x1f '^_' */
-   0x00, /* 00000000 */
-   0xff, /* 11111111 */
-   0xff, /* 11111111 */
-   0x7e, /* 01111110 */
-   0x3c, /* 00111100 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 32 0x20 ' ' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 33 0x21 '!' */
-   0x18, /* 00011000 */
-   0x3c, /* 00111100 */
-   0x3c, /* 00111100 */
-   0x3c, /* 00111100 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-
-   /* 34 0x22 '"' */
-   0x6c, /* 01101100 */
-   0x6c, /* 01101100 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 35 0x23 '#' */
-   0x6c, /* 01101100 */
-   0x6c, /* 01101100 */
-   0xfe, /* 11111110 */
-   0x6c, /* 01101100 */
-   0xfe, /* 11111110 */
-   0x6c, /* 01101100 */
-   0x6c, /* 01101100 */
-   0x00, /* 00000000 */
-
-   /* 36 0x24 '$' */
-   0x18, /* 00011000 */
-   0x3e, /* 00111110 */
-   0x60, /* 01100000 */
-   0x3c, /* 00111100 */
-   0x06, /* 00000110 */
-   0x7c, /* 01111100 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-
-   /* 37 0x25 '%' */
-   0x00, /* 00000000 */
-   0xc6, /* 11000110 */
-   0xcc, /* 11001100 */
-   0x18, /* 00011000 */
-   0x30, /* 00110000 */
-   0x66, /* 01100110 */
-   0xc6, /* 11000110 */
-   0x00, /* 00000000 */
-
-   /* 38 0x26 '&' */
-   0x38, /* 00111000 */
-   0x6c, /* 01101100 */
-   0x68, /* 01101000 */
-   0x76, /* 01110110 */
-   0xdc, /* 11011100 */
-   0xcc, /* 11001100 */
-   0x76, /* 01110110 */
-   0x00, /* 00000000 */
-
-   /* 39 0x27 ''' */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x30, /* 00110000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 40 0x28 '(' */
-   0x0c, /* 00001100 */
-   0x18, /* 00011000 */
-   0x30, /* 00110000 */
-   0x30, /* 00110000 */
-   0x30, /* 00110000 */
-   0x18, /* 00011000 */
-   0x0c, /* 00001100 */
-   0x00, /* 00000000 */
-
-   /* 41 0x29 ')' */
-   0x30, /* 00110000 */
-   0x18, /* 00011000 */
-   0x0c, /* 00001100 */
-   0x0c, /* 00001100 */
-   0x0c, /* 00001100 */
-   0x18, /* 00011000 */
-   0x30, /* 00110000 */
-   0x00, /* 00000000 */
-
-   /* 42 0x2a '*' */
-   0x00, /* 00000000 */
-   0x66, /* 01100110 */
-   0x3c, /* 00111100 */
-   0xff, /* 11111111 */
-   0x3c, /* 00111100 */
-   0x66, /* 01100110 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 43 0x2b '+' */
-   0x00, /* 00000000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x7e, /* 01111110 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 44 0x2c ',' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x30, /* 00110000 */
-
-   /* 45 0x2d '-' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x7e, /* 01111110 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 46 0x2e '.' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-
-   /* 47 0x2f '/' */
-   0x03, /* 00000011 */
-   0x06, /* 00000110 */
-   0x0c, /* 00001100 */
-   0x18, /* 00011000 */
-   0x30, /* 00110000 */
-   0x60, /* 01100000 */
-   0xc0, /* 11000000 */
-   0x00, /* 00000000 */
-
-   /* 48 0x30 '0' */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0xde, /* 11011110 */
-   0xfe, /* 11111110 */
-   0xf6, /* 11110110 */
-   0xc6, /* 11000110 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 49 0x31 '1' */
-   0x18, /* 00011000 */
-   0x78, /* 01111000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-
-   /* 50 0x32 '2' */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0x0c, /* 00001100 */
-   0x18, /* 00011000 */
-   0x30, /* 00110000 */
-   0x60, /* 01100000 */
-   0xfe, /* 11111110 */
-   0x00, /* 00000000 */
-
-   /* 51 0x33 '3' */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0x06, /* 00000110 */
-   0x1c, /* 00011100 */
-   0x06, /* 00000110 */
-   0xc6, /* 11000110 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 52 0x34 '4' */
-   0x1c, /* 00011100 */
-   0x3c, /* 00111100 */
-   0x6c, /* 01101100 */
-   0xcc, /* 11001100 */
-   0xfe, /* 11111110 */
-   0x0c, /* 00001100 */
-   0x0c, /* 00001100 */
-   0x00, /* 00000000 */
-
-   /* 53 0x35 '5' */
-   0xfe, /* 11111110 */
-   0xc0, /* 11000000 */
-   0xfc, /* 11111100 */
-   0x06, /* 00000110 */
-   0x06, /* 00000110 */
-   0xc6, /* 11000110 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 54 0x36 '6' */
-   0x38, /* 00111000 */
-   0x60, /* 01100000 */
-   0xc0, /* 11000000 */
-   0xfc, /* 11111100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 55 0x37 '7' */
-   0xfe, /* 11111110 */
-   0x06, /* 00000110 */
-   0x0c, /* 00001100 */
-   0x18, /* 00011000 */
-   0x30, /* 00110000 */
-   0x60, /* 01100000 */
-   0x60, /* 01100000 */
-   0x00, /* 00000000 */
-
-   /* 56 0x38 '8' */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 57 0x39 '9' */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x7e, /* 01111110 */
-   0x06, /* 00000110 */
-   0x0c, /* 00001100 */
-   0x38, /* 00111000 */
-   0x00, /* 00000000 */
-
-   /* 58 0x3a ':' */
-   0x00, /* 00000000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-
-   /* 59 0x3b ';' */
-   0x00, /* 00000000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x30, /* 00110000 */
-
-   /* 60 0x3c '<' */
-   0x0c, /* 00001100 */
-   0x18, /* 00011000 */
-   0x30, /* 00110000 */
-   0x60, /* 01100000 */
-   0x30, /* 00110000 */
-   0x18, /* 00011000 */
-   0x0c, /* 00001100 */
-   0x00, /* 00000000 */
-
-   /* 61 0x3d '=' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x7e, /* 01111110 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x7e, /* 01111110 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 62 0x3e '>' */
-   0x30, /* 00110000 */
-   0x18, /* 00011000 */
-   0x0c, /* 00001100 */
-   0x06, /* 00000110 */
-   0x0c, /* 00001100 */
-   0x18, /* 00011000 */
-   0x30, /* 00110000 */
-   0x00, /* 00000000 */
-
-   /* 63 0x3f '?' */
-   0x3c, /* 00111100 */
-   0x66, /* 01100110 */
-   0x06, /* 00000110 */
-   0x0c, /* 00001100 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-
-   /* 64 0x40 '@' */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0xde, /* 11011110 */
-   0xde, /* 11011110 */
-   0xde, /* 11011110 */
-   0xc0, /* 11000000 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 65 0x41 'A' */
-   0x10, /* 00010000 */
-   0x38, /* 00111000 */
-   0x6c, /* 01101100 */
-   0xc6, /* 11000110 */
-   0xfe, /* 11111110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x00, /* 00000000 */
-
-   /* 66 0x42 'B' */
-   0xfc, /* 11111100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xfc, /* 11111100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xfc, /* 11111100 */
-   0x00, /* 00000000 */
-
-   /* 67 0x43 'C' */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0xc6, /* 11000110 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 68 0x44 'D' */
-   0xfc, /* 11111100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xfc, /* 11111100 */
-   0x00, /* 00000000 */
-
-   /* 69 0x45 'E' */
-   0xfe, /* 11111110 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0xf8, /* 11111000 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0xfe, /* 11111110 */
-   0x00, /* 00000000 */
-
-   /* 70 0x46 'F' */
-   0xfe, /* 11111110 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0xf8, /* 11111000 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0x00, /* 00000000 */
-
-   /* 71 0x47 'G' */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0xc0, /* 11000000 */
-   0xce, /* 11001110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 72 0x48 'H' */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xfe, /* 11111110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x00, /* 00000000 */
-
-   /* 73 0x49 'I' */
-   0x7e, /* 01111110 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x7e, /* 01111110 */
-   0x00, /* 00000000 */
-
-   /* 74 0x4a 'J' */
-   0x06, /* 00000110 */
-   0x06, /* 00000110 */
-   0x06, /* 00000110 */
-   0x06, /* 00000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 75 0x4b 'K' */
-   0xc6, /* 11000110 */
-   0xcc, /* 11001100 */
-   0xd8, /* 11011000 */
-   0xf0, /* 11110000 */
-   0xd8, /* 11011000 */
-   0xcc, /* 11001100 */
-   0xc6, /* 11000110 */
-   0x00, /* 00000000 */
-
-   /* 76 0x4c 'L' */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0xfe, /* 11111110 */
-   0x00, /* 00000000 */
-
-   /* 77 0x4d 'M' */
-   0x82, /* 10000010 */
-   0xc6, /* 11000110 */
-   0xee, /* 11101110 */
-   0xfe, /* 11111110 */
-   0xd6, /* 11010110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x00, /* 00000000 */
-
-   /* 78 0x4e 'N' */
-   0xc6, /* 11000110 */
-   0xe6, /* 11100110 */
-   0xf6, /* 11110110 */
-   0xde, /* 11011110 */
-   0xce, /* 11001110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x00, /* 00000000 */
-
-   /* 79 0x4f 'O' */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 80 0x50 'P' */
-   0xfc, /* 11111100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xfc, /* 11111100 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0x00, /* 00000000 */
-
-   /* 81 0x51 'Q' */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xf6, /* 11110110 */
-   0xde, /* 11011110 */
-   0x7c, /* 01111100 */
-   0x06, /* 00000110 */
-
-   /* 82 0x52 'R' */
-   0xfc, /* 11111100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xfc, /* 11111100 */
-   0xd8, /* 11011000 */
-   0xcc, /* 11001100 */
-   0xc6, /* 11000110 */
-   0x00, /* 00000000 */
-
-   /* 83 0x53 'S' */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0x60, /* 01100000 */
-   0x38, /* 00111000 */
-   0x0c, /* 00001100 */
-   0xc6, /* 11000110 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 84 0x54 'T' */
-   0x7e, /* 01111110 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-
-   /* 85 0x55 'U' */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 86 0x56 'V' */
-   0xc3, /* 11000011 */
-   0xc3, /* 11000011 */
-   0x66, /* 01100110 */
-   0x66, /* 01100110 */
-   0x3c, /* 00111100 */
-   0x3c, /* 00111100 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-
-   /* 87 0x57 'W' */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xd6, /* 11010110 */
-   0xfe, /* 11111110 */
-   0xee, /* 11101110 */
-   0xc6, /* 11000110 */
-   0x00, /* 00000000 */
-
-   /* 88 0x58 'X' */
-   0xc3, /* 11000011 */
-   0x66, /* 01100110 */
-   0x3c, /* 00111100 */
-   0x18, /* 00011000 */
-   0x3c, /* 00111100 */
-   0x66, /* 01100110 */
-   0xc3, /* 11000011 */
-   0x00, /* 00000000 */
-
-   /* 89 0x59 'Y' */
-   0xc3, /* 11000011 */
-   0xc3, /* 11000011 */
-   0x66, /* 01100110 */
-   0x3c, /* 00111100 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-
-   /* 90 0x5a 'Z' */
-   0xfe, /* 11111110 */
-   0x06, /* 00000110 */
-   0x0c, /* 00001100 */
-   0x18, /* 00011000 */
-   0x30, /* 00110000 */
-   0x60, /* 01100000 */
-   0xfe, /* 11111110 */
-   0x00, /* 00000000 */
-
-   /* 91 0x5b '[' */
-   0x3c, /* 00111100 */
-   0x30, /* 00110000 */
-   0x30, /* 00110000 */
-   0x30, /* 00110000 */
-   0x30, /* 00110000 */
-   0x30, /* 00110000 */
-   0x3c, /* 00111100 */
-   0x00, /* 00000000 */
-
-   /* 92 0x5c '\' */
-   0xc0, /* 11000000 */
-   0x60, /* 01100000 */
-   0x30, /* 00110000 */
-   0x18, /* 00011000 */
-   0x0c, /* 00001100 */
-   0x06, /* 00000110 */
-   0x03, /* 00000011 */
-   0x00, /* 00000000 */
-
-   /* 93 0x5d ']' */
-   0x3c, /* 00111100 */
-   0x0c, /* 00001100 */
-   0x0c, /* 00001100 */
-   0x0c, /* 00001100 */
-   0x0c, /* 00001100 */
-   0x0c, /* 00001100 */
-   0x3c, /* 00111100 */
-   0x00, /* 00000000 */
-
-   /* 94 0x5e '^' */
-   0x10, /* 00010000 */
-   0x38, /* 00111000 */
-   0x6c, /* 01101100 */
-   0xc6, /* 11000110 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 95 0x5f '_' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xfe, /* 11111110 */
-
-   /* 96 0x60 '`' */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x0c, /* 00001100 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 97 0x61 'a' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x7c, /* 01111100 */
-   0x06, /* 00000110 */
-   0x7e, /* 01111110 */
-   0xc6, /* 11000110 */
-   0x7e, /* 01111110 */
-   0x00, /* 00000000 */
-
-   /* 98 0x62 'b' */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0xfc, /* 11111100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xfc, /* 11111100 */
-   0x00, /* 00000000 */
-
-   /* 99 0x63 'c' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0xc0, /* 11000000 */
-   0xc6, /* 11000110 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 100 0x64 'd' */
-   0x06, /* 00000110 */
-   0x06, /* 00000110 */
-   0x7e, /* 01111110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x7e, /* 01111110 */
-   0x00, /* 00000000 */
-
-   /* 101 0x65 'e' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0xfe, /* 11111110 */
-   0xc0, /* 11000000 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 102 0x66 'f' */
-   0x3c, /* 00111100 */
-   0x66, /* 01100110 */
-   0x60, /* 01100000 */
-   0xf0, /* 11110000 */
-   0x60, /* 01100000 */
-   0x60, /* 01100000 */
-   0x60, /* 01100000 */
-   0x00, /* 00000000 */
-
-   /* 103 0x67 'g' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x7e, /* 01111110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x7e, /* 01111110 */
-   0x06, /* 00000110 */
-   0x7c, /* 01111100 */
-
-   /* 104 0x68 'h' */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0xfc, /* 11111100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x00, /* 00000000 */
-
-   /* 105 0x69 'i' */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-   0x38, /* 00111000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-
-   /* 106 0x6a 'j' */
-   0x06, /* 00000110 */
-   0x00, /* 00000000 */
-   0x06, /* 00000110 */
-   0x06, /* 00000110 */
-   0x06, /* 00000110 */
-   0x06, /* 00000110 */
-   0xc6, /* 11000110 */
-   0x7c, /* 01111100 */
-
-   /* 107 0x6b 'k' */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0xcc, /* 11001100 */
-   0xd8, /* 11011000 */
-   0xf0, /* 11110000 */
-   0xd8, /* 11011000 */
-   0xcc, /* 11001100 */
-   0x00, /* 00000000 */
-
-   /* 108 0x6c 'l' */
-   0x38, /* 00111000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-
-   /* 109 0x6d 'm' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xec, /* 11101100 */
-   0xfe, /* 11111110 */
-   0xd6, /* 11010110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x00, /* 00000000 */
-
-   /* 110 0x6e 'n' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xfc, /* 11111100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x00, /* 00000000 */
-
-   /* 111 0x6f 'o' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 112 0x70 'p' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xfc, /* 11111100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xfc, /* 11111100 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-
-   /* 113 0x71 'q' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x7e, /* 01111110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x7e, /* 01111110 */
-   0x06, /* 00000110 */
-   0x06, /* 00000110 */
-
-   /* 114 0x72 'r' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xdc, /* 11011100 */
-   0xe6, /* 11100110 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0x00, /* 00000000 */
-
-   /* 115 0x73 's' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x7e, /* 01111110 */
-   0xc0, /* 11000000 */
-   0x7c, /* 01111100 */
-   0x06, /* 00000110 */
-   0xfc, /* 11111100 */
-   0x00, /* 00000000 */
-
-   /* 116 0x74 't' */
-   0x30, /* 00110000 */
-   0x30, /* 00110000 */
-   0x7c, /* 01111100 */
-   0x30, /* 00110000 */
-   0x30, /* 00110000 */
-   0x36, /* 00110110 */
-   0x1c, /* 00011100 */
-   0x00, /* 00000000 */
-
-   /* 117 0x75 'u' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 118 0x76 'v' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x6c, /* 01101100 */
-   0x38, /* 00111000 */
-   0x00, /* 00000000 */
-
-   /* 119 0x77 'w' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xd6, /* 11010110 */
-   0xfe, /* 11111110 */
-   0x6c, /* 01101100 */
-   0x00, /* 00000000 */
-
-   /* 120 0x78 'x' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xc6, /* 11000110 */
-   0x6c, /* 01101100 */
-   0x38, /* 00111000 */
-   0x6c, /* 01101100 */
-   0xc6, /* 11000110 */
-   0x00, /* 00000000 */
-
-   /* 121 0x79 'y' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xc3, /* 11000011 */
-   0x66, /* 01100110 */
-   0x3c, /* 00111100 */
-   0x18, /* 00011000 */
-   0x30, /* 00110000 */
-   0x60, /* 01100000 */
-
-   /* 122 0x7a 'z' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xfe, /* 11111110 */
-   0x0c, /* 00001100 */
-   0x38, /* 00111000 */
-   0x60, /* 01100000 */
-   0xfe, /* 11111110 */
-   0x00, /* 00000000 */
-
-   /* 123 0x7b '{' */
-   0x0e, /* 00001110 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x70, /* 01110000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x0e, /* 00001110 */
-   0x00, /* 00000000 */
-
-   /* 124 0x7c '|' */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-
-   /* 125 0x7d '}' */
-   0x70, /* 01110000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x0e, /* 00001110 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x70, /* 01110000 */
-   0x00, /* 00000000 */
-
-   /* 126 0x7e '~' */
-   0x72, /* 01110010 */
-   0x9c, /* 10011100 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 127 0x7f '' */
-   0x00, /* 00000000 */
-   0x10, /* 00010000 */
-   0x38, /* 00111000 */
-   0x6c, /* 01101100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xfe, /* 11111110 */
-   0x00, /* 00000000 */
-
-   /* 128 0x80 '' */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0xc6, /* 11000110 */
-   0x7c, /* 01111100 */
-   0x0c, /* 00001100 */
-   0x78, /* 01111000 */
-
-   /* 129 0x81 '' */
-   0xcc, /* 11001100 */
-   0x00, /* 00000000 */
-   0xcc, /* 11001100 */
-   0xcc, /* 11001100 */
-   0xcc, /* 11001100 */
-   0xcc, /* 11001100 */
-   0x76, /* 01110110 */
-   0x00, /* 00000000 */
-
-   /* 130 0x82 '' */
-   0x0c, /* 00001100 */
-   0x18, /* 00011000 */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0xfe, /* 11111110 */
-   0xc0, /* 11000000 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 131 0x83 '' */
-   0x7c, /* 01111100 */
-   0x82, /* 10000010 */
-   0x78, /* 01111000 */
-   0x0c, /* 00001100 */
-   0x7c, /* 01111100 */
-   0xcc, /* 11001100 */
-   0x76, /* 01110110 */
-   0x00, /* 00000000 */
-
-   /* 132 0x84 '' */
-   0xc6, /* 11000110 */
-   0x00, /* 00000000 */
-   0x78, /* 01111000 */
-   0x0c, /* 00001100 */
-   0x7c, /* 01111100 */
-   0xcc, /* 11001100 */
-   0x76, /* 01110110 */
-   0x00, /* 00000000 */
-
-   /* 133 0x85 '' */
-   0x30, /* 00110000 */
-   0x18, /* 00011000 */
-   0x78, /* 01111000 */
-   0x0c, /* 00001100 */
-   0x7c, /* 01111100 */
-   0xcc, /* 11001100 */
-   0x76, /* 01110110 */
-   0x00, /* 00000000 */
-
-   /* 134 0x86 '' */
-   0x30, /* 00110000 */
-   0x30, /* 00110000 */
-   0x78, /* 01111000 */
-   0x0c, /* 00001100 */
-   0x7c, /* 01111100 */
-   0xcc, /* 11001100 */
-   0x76, /* 01110110 */
-   0x00, /* 00000000 */
-
-   /* 135 0x87 '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x7e, /* 01111110 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0x7e, /* 01111110 */
-   0x0c, /* 00001100 */
-   0x38, /* 00111000 */
-
-   /* 136 0x88 '' */
-   0x7c, /* 01111100 */
-   0x82, /* 10000010 */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0xfe, /* 11111110 */
-   0xc0, /* 11000000 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 137 0x89 '' */
-   0xc6, /* 11000110 */
-   0x00, /* 00000000 */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0xfe, /* 11111110 */
-   0xc0, /* 11000000 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 138 0x8a '' */
-   0x30, /* 00110000 */
-   0x18, /* 00011000 */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0xfe, /* 11111110 */
-   0xc0, /* 11000000 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 139 0x8b '' */
-   0x66, /* 01100110 */
-   0x00, /* 00000000 */
-   0x38, /* 00111000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x3c, /* 00111100 */
-   0x00, /* 00000000 */
-
-   /* 140 0x8c '' */
-   0x7c, /* 01111100 */
-   0x82, /* 10000010 */
-   0x38, /* 00111000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x3c, /* 00111100 */
-   0x00, /* 00000000 */
-
-   /* 141 0x8d '' */
-   0x30, /* 00110000 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-   0x38, /* 00111000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x3c, /* 00111100 */
-   0x00, /* 00000000 */
-
-   /* 142 0x8e '' */
-   0xc6, /* 11000110 */
-   0x38, /* 00111000 */
-   0x6c, /* 01101100 */
-   0xc6, /* 11000110 */
-   0xfe, /* 11111110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x00, /* 00000000 */
-
-   /* 143 0x8f '' */
-   0x38, /* 00111000 */
-   0x6c, /* 01101100 */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0xfe, /* 11111110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x00, /* 00000000 */
-
-   /* 144 0x90 '' */
-   0x18, /* 00011000 */
-   0x30, /* 00110000 */
-   0xfe, /* 11111110 */
-   0xc0, /* 11000000 */
-   0xf8, /* 11111000 */
-   0xc0, /* 11000000 */
-   0xfe, /* 11111110 */
-   0x00, /* 00000000 */
-
-   /* 145 0x91 '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x7e, /* 01111110 */
-   0x18, /* 00011000 */
-   0x7e, /* 01111110 */
-   0xd8, /* 11011000 */
-   0x7e, /* 01111110 */
-   0x00, /* 00000000 */
-
-   /* 146 0x92 '' */
-   0x3e, /* 00111110 */
-   0x6c, /* 01101100 */
-   0xcc, /* 11001100 */
-   0xfe, /* 11111110 */
-   0xcc, /* 11001100 */
-   0xcc, /* 11001100 */
-   0xce, /* 11001110 */
-   0x00, /* 00000000 */
-
-   /* 147 0x93 '' */
-   0x7c, /* 01111100 */
-   0x82, /* 10000010 */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 148 0x94 '' */
-   0xc6, /* 11000110 */
-   0x00, /* 00000000 */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 149 0x95 '' */
-   0x30, /* 00110000 */
-   0x18, /* 00011000 */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 150 0x96 '' */
-   0x78, /* 01111000 */
-   0x84, /* 10000100 */
-   0x00, /* 00000000 */
-   0xcc, /* 11001100 */
-   0xcc, /* 11001100 */
-   0xcc, /* 11001100 */
-   0x76, /* 01110110 */
-   0x00, /* 00000000 */
-
-   /* 151 0x97 '' */
-   0x60, /* 01100000 */
-   0x30, /* 00110000 */
-   0xcc, /* 11001100 */
-   0xcc, /* 11001100 */
-   0xcc, /* 11001100 */
-   0xcc, /* 11001100 */
-   0x76, /* 01110110 */
-   0x00, /* 00000000 */
-
-   /* 152 0x98 '' */
-   0xc6, /* 11000110 */
-   0x00, /* 00000000 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x7e, /* 01111110 */
-   0x06, /* 00000110 */
-   0xfc, /* 11111100 */
-
-   /* 153 0x99 '' */
-   0xc6, /* 11000110 */
-   0x38, /* 00111000 */
-   0x6c, /* 01101100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x6c, /* 01101100 */
-   0x38, /* 00111000 */
-   0x00, /* 00000000 */
-
-   /* 154 0x9a '' */
-   0xc6, /* 11000110 */
-   0x00, /* 00000000 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 155 0x9b '' */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x7e, /* 01111110 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0x7e, /* 01111110 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-
-   /* 156 0x9c '' */
-   0x38, /* 00111000 */
-   0x6c, /* 01101100 */
-   0x64, /* 01100100 */
-   0xf0, /* 11110000 */
-   0x60, /* 01100000 */
-   0x66, /* 01100110 */
-   0xfc, /* 11111100 */
-   0x00, /* 00000000 */
-
-   /* 157 0x9d '' */
-   0x66, /* 01100110 */
-   0x66, /* 01100110 */
-   0x3c, /* 00111100 */
-   0x7e, /* 01111110 */
-   0x18, /* 00011000 */
-   0x7e, /* 01111110 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-
-   /* 158 0x9e '' */
-   0xf8, /* 11111000 */
-   0xcc, /* 11001100 */
-   0xcc, /* 11001100 */
-   0xfa, /* 11111010 */
-   0xc6, /* 11000110 */
-   0xcf, /* 11001111 */
-   0xc6, /* 11000110 */
-   0xc7, /* 11000111 */
-
-   /* 159 0x9f '' */
-   0x0e, /* 00001110 */
-   0x1b, /* 00011011 */
-   0x18, /* 00011000 */
-   0x3c, /* 00111100 */
-   0x18, /* 00011000 */
-   0xd8, /* 11011000 */
-   0x70, /* 01110000 */
-   0x00, /* 00000000 */
-
-   /* 160 0xa0 '' */
-   0x18, /* 00011000 */
-   0x30, /* 00110000 */
-   0x78, /* 01111000 */
-   0x0c, /* 00001100 */
-   0x7c, /* 01111100 */
-   0xcc, /* 11001100 */
-   0x76, /* 01110110 */
-   0x00, /* 00000000 */
-
-   /* 161 0xa1 '' */
-   0x0c, /* 00001100 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-   0x38, /* 00111000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x3c, /* 00111100 */
-   0x00, /* 00000000 */
-
-   /* 162 0xa2 '' */
-   0x0c, /* 00001100 */
-   0x18, /* 00011000 */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-
-   /* 163 0xa3 '' */
-   0x18, /* 00011000 */
-   0x30, /* 00110000 */
-   0xcc, /* 11001100 */
-   0xcc, /* 11001100 */
-   0xcc, /* 11001100 */
-   0xcc, /* 11001100 */
-   0x76, /* 01110110 */
-   0x00, /* 00000000 */
-
-   /* 164 0xa4 '' */
-   0x76, /* 01110110 */
-   0xdc, /* 11011100 */
-   0x00, /* 00000000 */
-   0xdc, /* 11011100 */
-   0x66, /* 01100110 */
-   0x66, /* 01100110 */
-   0x66, /* 01100110 */
-   0x00, /* 00000000 */
-
-   /* 165 0xa5 '' */
-   0x76, /* 01110110 */
-   0xdc, /* 11011100 */
-   0x00, /* 00000000 */
-   0xe6, /* 11100110 */
-   0xf6, /* 11110110 */
-   0xde, /* 11011110 */
-   0xce, /* 11001110 */
-   0x00, /* 00000000 */
-
-   /* 166 0xa6 '' */
-   0x3c, /* 00111100 */
-   0x6c, /* 01101100 */
-   0x6c, /* 01101100 */
-   0x3e, /* 00111110 */
-   0x00, /* 00000000 */
-   0x7e, /* 01111110 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 167 0xa7 '' */
-   0x38, /* 00111000 */
-   0x6c, /* 01101100 */
-   0x6c, /* 01101100 */
-   0x38, /* 00111000 */
-   0x00, /* 00000000 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 168 0xa8 '' */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x30, /* 00110000 */
-   0x63, /* 01100011 */
-   0x3e, /* 00111110 */
-   0x00, /* 00000000 */
-
-   /* 169 0xa9 '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xfe, /* 11111110 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 170 0xaa '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xfe, /* 11111110 */
-   0x06, /* 00000110 */
-   0x06, /* 00000110 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 171 0xab '' */
-   0x63, /* 01100011 */
-   0xe6, /* 11100110 */
-   0x6c, /* 01101100 */
-   0x7e, /* 01111110 */
-   0x33, /* 00110011 */
-   0x66, /* 01100110 */
-   0xcc, /* 11001100 */
-   0x0f, /* 00001111 */
-
-   /* 172 0xac '' */
-   0x63, /* 01100011 */
-   0xe6, /* 11100110 */
-   0x6c, /* 01101100 */
-   0x7a, /* 01111010 */
-   0x36, /* 00110110 */
-   0x6a, /* 01101010 */
-   0xdf, /* 11011111 */
-   0x06, /* 00000110 */
-
-   /* 173 0xad '' */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x3c, /* 00111100 */
-   0x3c, /* 00111100 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-
-   /* 174 0xae '' */
-   0x00, /* 00000000 */
-   0x33, /* 00110011 */
-   0x66, /* 01100110 */
-   0xcc, /* 11001100 */
-   0x66, /* 01100110 */
-   0x33, /* 00110011 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 175 0xaf '' */
-   0x00, /* 00000000 */
-   0xcc, /* 11001100 */
-   0x66, /* 01100110 */
-   0x33, /* 00110011 */
-   0x66, /* 01100110 */
-   0xcc, /* 11001100 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 176 0xb0 '' */
-   0x22, /* 00100010 */
-   0x88, /* 10001000 */
-   0x22, /* 00100010 */
-   0x88, /* 10001000 */
-   0x22, /* 00100010 */
-   0x88, /* 10001000 */
-   0x22, /* 00100010 */
-   0x88, /* 10001000 */
-
-   /* 177 0xb1 '' */
-   0x55, /* 01010101 */
-   0xaa, /* 10101010 */
-   0x55, /* 01010101 */
-   0xaa, /* 10101010 */
-   0x55, /* 01010101 */
-   0xaa, /* 10101010 */
-   0x55, /* 01010101 */
-   0xaa, /* 10101010 */
-
-   /* 178 0xb2 '' */
-   0x77, /* 01110111 */
-   0xdd, /* 11011101 */
-   0x77, /* 01110111 */
-   0xdd, /* 11011101 */
-   0x77, /* 01110111 */
-   0xdd, /* 11011101 */
-   0x77, /* 01110111 */
-   0xdd, /* 11011101 */
-
-   /* 179 0xb3 '' */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-
-   /* 180 0xb4 '' */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0xf8, /* 11111000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-
-   /* 181 0xb5 '' */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0xf8, /* 11111000 */
-   0x18, /* 00011000 */
-   0xf8, /* 11111000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-
-   /* 182 0xb6 '' */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0xf6, /* 11110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-
-   /* 183 0xb7 '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xfe, /* 11111110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-
-   /* 184 0xb8 '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xf8, /* 11111000 */
-   0x18, /* 00011000 */
-   0xf8, /* 11111000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-
-   /* 185 0xb9 '' */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0xf6, /* 11110110 */
-   0x06, /* 00000110 */
-   0xf6, /* 11110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-
-   /* 186 0xba '' */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-
-   /* 187 0xbb '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xfe, /* 11111110 */
-   0x06, /* 00000110 */
-   0xf6, /* 11110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-
-   /* 188 0xbc '' */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0xf6, /* 11110110 */
-   0x06, /* 00000110 */
-   0xfe, /* 11111110 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 189 0xbd '' */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0xfe, /* 11111110 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 190 0xbe '' */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0xf8, /* 11111000 */
-   0x18, /* 00011000 */
-   0xf8, /* 11111000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 191 0xbf '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xf8, /* 11111000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-
-   /* 192 0xc0 '' */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x1f, /* 00011111 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 193 0xc1 '' */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0xff, /* 11111111 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 194 0xc2 '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xff, /* 11111111 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-
-   /* 195 0xc3 '' */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x1f, /* 00011111 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-
-   /* 196 0xc4 '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xff, /* 11111111 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 197 0xc5 '' */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0xff, /* 11111111 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-
-   /* 198 0xc6 '' */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x1f, /* 00011111 */
-   0x18, /* 00011000 */
-   0x1f, /* 00011111 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-
-   /* 199 0xc7 '' */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x37, /* 00110111 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-
-   /* 200 0xc8 '' */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x37, /* 00110111 */
-   0x30, /* 00110000 */
-   0x3f, /* 00111111 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 201 0xc9 '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x3f, /* 00111111 */
-   0x30, /* 00110000 */
-   0x37, /* 00110111 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-
-   /* 202 0xca '' */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0xf7, /* 11110111 */
-   0x00, /* 00000000 */
-   0xff, /* 11111111 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 203 0xcb '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xff, /* 11111111 */
-   0x00, /* 00000000 */
-   0xf7, /* 11110111 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-
-   /* 204 0xcc '' */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x37, /* 00110111 */
-   0x30, /* 00110000 */
-   0x37, /* 00110111 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-
-   /* 205 0xcd '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xff, /* 11111111 */
-   0x00, /* 00000000 */
-   0xff, /* 11111111 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 206 0xce '' */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0xf7, /* 11110111 */
-   0x00, /* 00000000 */
-   0xf7, /* 11110111 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-
-   /* 207 0xcf '' */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0xff, /* 11111111 */
-   0x00, /* 00000000 */
-   0xff, /* 11111111 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 208 0xd0 '' */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0xff, /* 11111111 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 209 0xd1 '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xff, /* 11111111 */
-   0x00, /* 00000000 */
-   0xff, /* 11111111 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-
-   /* 210 0xd2 '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xff, /* 11111111 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-
-   /* 211 0xd3 '' */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x3f, /* 00111111 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 212 0xd4 '' */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x1f, /* 00011111 */
-   0x18, /* 00011000 */
-   0x1f, /* 00011111 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 213 0xd5 '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x1f, /* 00011111 */
-   0x18, /* 00011000 */
-   0x1f, /* 00011111 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-
-   /* 214 0xd6 '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x3f, /* 00111111 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-
-   /* 215 0xd7 '' */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0xff, /* 11111111 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-
-   /* 216 0xd8 '' */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0xff, /* 11111111 */
-   0x18, /* 00011000 */
-   0xff, /* 11111111 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-
-   /* 217 0xd9 '' */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0xf8, /* 11111000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 218 0xda '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x1f, /* 00011111 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-
-   /* 219 0xdb '' */
-   0xff, /* 11111111 */
-   0xff, /* 11111111 */
-   0xff, /* 11111111 */
-   0xff, /* 11111111 */
-   0xff, /* 11111111 */
-   0xff, /* 11111111 */
-   0xff, /* 11111111 */
-   0xff, /* 11111111 */
-
-   /* 220 0xdc '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xff, /* 11111111 */
-   0xff, /* 11111111 */
-   0xff, /* 11111111 */
-   0xff, /* 11111111 */
-
-   /* 221 0xdd '' */
-   0xf0, /* 11110000 */
-   0xf0, /* 11110000 */
-   0xf0, /* 11110000 */
-   0xf0, /* 11110000 */
-   0xf0, /* 11110000 */
-   0xf0, /* 11110000 */
-   0xf0, /* 11110000 */
-   0xf0, /* 11110000 */
-
-   /* 222 0xde '' */
-   0x0f, /* 00001111 */
-   0x0f, /* 00001111 */
-   0x0f, /* 00001111 */
-   0x0f, /* 00001111 */
-   0x0f, /* 00001111 */
-   0x0f, /* 00001111 */
-   0x0f, /* 00001111 */
-   0x0f, /* 00001111 */
-
-   /* 223 0xdf '' */
-   0xff, /* 11111111 */
-   0xff, /* 11111111 */
-   0xff, /* 11111111 */
-   0xff, /* 11111111 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 224 0xe0 '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x76, /* 01110110 */
-   0xdc, /* 11011100 */
-   0xc8, /* 11001000 */
-   0xdc, /* 11011100 */
-   0x76, /* 01110110 */
-   0x00, /* 00000000 */
-
-   /* 225 0xe1 '' */
-   0x78, /* 01111000 */
-   0xcc, /* 11001100 */
-   0xcc, /* 11001100 */
-   0xd8, /* 11011000 */
-   0xcc, /* 11001100 */
-   0xc6, /* 11000110 */
-   0xcc, /* 11001100 */
-   0x00, /* 00000000 */
-
-   /* 226 0xe2 '' */
-   0xfe, /* 11111110 */
-   0xc6, /* 11000110 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0xc0, /* 11000000 */
-   0x00, /* 00000000 */
-
-   /* 227 0xe3 '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0xfe, /* 11111110 */
-   0x6c, /* 01101100 */
-   0x6c, /* 01101100 */
-   0x6c, /* 01101100 */
-   0x6c, /* 01101100 */
-   0x00, /* 00000000 */
-
-   /* 228 0xe4 '' */
-   0xfe, /* 11111110 */
-   0xc6, /* 11000110 */
-   0x60, /* 01100000 */
-   0x30, /* 00110000 */
-   0x60, /* 01100000 */
-   0xc6, /* 11000110 */
-   0xfe, /* 11111110 */
-   0x00, /* 00000000 */
-
-   /* 229 0xe5 '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x7e, /* 01111110 */
-   0xd8, /* 11011000 */
-   0xd8, /* 11011000 */
-   0xd8, /* 11011000 */
-   0x70, /* 01110000 */
-   0x00, /* 00000000 */
-
-   /* 230 0xe6 '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x66, /* 01100110 */
-   0x66, /* 01100110 */
-   0x66, /* 01100110 */
-   0x66, /* 01100110 */
-   0x7c, /* 01111100 */
-   0xc0, /* 11000000 */
-
-   /* 231 0xe7 '' */
-   0x00, /* 00000000 */
-   0x76, /* 01110110 */
-   0xdc, /* 11011100 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-
-   /* 232 0xe8 '' */
-   0x7e, /* 01111110 */
-   0x18, /* 00011000 */
-   0x3c, /* 00111100 */
-   0x66, /* 01100110 */
-   0x66, /* 01100110 */
-   0x3c, /* 00111100 */
-   0x18, /* 00011000 */
-   0x7e, /* 01111110 */
-
-   /* 233 0xe9 '' */
-   0x38, /* 00111000 */
-   0x6c, /* 01101100 */
-   0xc6, /* 11000110 */
-   0xfe, /* 11111110 */
-   0xc6, /* 11000110 */
-   0x6c, /* 01101100 */
-   0x38, /* 00111000 */
-   0x00, /* 00000000 */
-
-   /* 234 0xea '' */
-   0x38, /* 00111000 */
-   0x6c, /* 01101100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x6c, /* 01101100 */
-   0x6c, /* 01101100 */
-   0xee, /* 11101110 */
-   0x00, /* 00000000 */
-
-   /* 235 0xeb '' */
-   0x0e, /* 00001110 */
-   0x18, /* 00011000 */
-   0x0c, /* 00001100 */
-   0x3e, /* 00111110 */
-   0x66, /* 01100110 */
-   0x66, /* 01100110 */
-   0x3c, /* 00111100 */
-   0x00, /* 00000000 */
-
-   /* 236 0xec '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x7e, /* 01111110 */
-   0xdb, /* 11011011 */
-   0xdb, /* 11011011 */
-   0x7e, /* 01111110 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 237 0xed '' */
-   0x06, /* 00000110 */
-   0x0c, /* 00001100 */
-   0x7e, /* 01111110 */
-   0xdb, /* 11011011 */
-   0xdb, /* 11011011 */
-   0x7e, /* 01111110 */
-   0x60, /* 01100000 */
-   0xc0, /* 11000000 */
-
-   /* 238 0xee '' */
-   0x1e, /* 00011110 */
-   0x30, /* 00110000 */
-   0x60, /* 01100000 */
-   0x7e, /* 01111110 */
-   0x60, /* 01100000 */
-   0x30, /* 00110000 */
-   0x1e, /* 00011110 */
-   0x00, /* 00000000 */
-
-   /* 239 0xef '' */
-   0x00, /* 00000000 */
-   0x7c, /* 01111100 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0xc6, /* 11000110 */
-   0x00, /* 00000000 */
-
-   /* 240 0xf0 '' */
-   0x00, /* 00000000 */
-   0xfe, /* 11111110 */
-   0x00, /* 00000000 */
-   0xfe, /* 11111110 */
-   0x00, /* 00000000 */
-   0xfe, /* 11111110 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 241 0xf1 '' */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x7e, /* 01111110 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-   0x7e, /* 01111110 */
-   0x00, /* 00000000 */
-
-   /* 242 0xf2 '' */
-   0x30, /* 00110000 */
-   0x18, /* 00011000 */
-   0x0c, /* 00001100 */
-   0x18, /* 00011000 */
-   0x30, /* 00110000 */
-   0x00, /* 00000000 */
-   0x7e, /* 01111110 */
-   0x00, /* 00000000 */
-
-   /* 243 0xf3 '' */
-   0x0c, /* 00001100 */
-   0x18, /* 00011000 */
-   0x30, /* 00110000 */
-   0x18, /* 00011000 */
-   0x0c, /* 00001100 */
-   0x00, /* 00000000 */
-   0x7e, /* 01111110 */
-   0x00, /* 00000000 */
-
-   /* 244 0xf4 '' */
-   0x0e, /* 00001110 */
-   0x1b, /* 00011011 */
-   0x1b, /* 00011011 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-
-   /* 245 0xf5 '' */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0xd8, /* 11011000 */
-   0xd8, /* 11011000 */
-   0x70, /* 01110000 */
-
-   /* 246 0xf6 '' */
-   0x00, /* 00000000 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-   0x7e, /* 01111110 */
-   0x00, /* 00000000 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 247 0xf7 '' */
-   0x00, /* 00000000 */
-   0x76, /* 01110110 */
-   0xdc, /* 11011100 */
-   0x00, /* 00000000 */
-   0x76, /* 01110110 */
-   0xdc, /* 11011100 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 248 0xf8 '' */
-   0x38, /* 00111000 */
-   0x6c, /* 01101100 */
-   0x6c, /* 01101100 */
-   0x38, /* 00111000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 249 0xf9 '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x18, /* 00011000 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 250 0xfa '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x18, /* 00011000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 251 0xfb '' */
-   0x0f, /* 00001111 */
-   0x0c, /* 00001100 */
-   0x0c, /* 00001100 */
-   0x0c, /* 00001100 */
-   0xec, /* 11101100 */
-   0x6c, /* 01101100 */
-   0x3c, /* 00111100 */
-   0x1c, /* 00011100 */
-
-   /* 252 0xfc '' */
-   0x6c, /* 01101100 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x36, /* 00110110 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 253 0xfd '' */
-   0x78, /* 01111000 */
-   0x0c, /* 00001100 */
-   0x18, /* 00011000 */
-   0x30, /* 00110000 */
-   0x7c, /* 01111100 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 254 0xfe '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x3c, /* 00111100 */
-   0x3c, /* 00111100 */
-   0x3c, /* 00111100 */
-   0x3c, /* 00111100 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-   /* 255 0xff '' */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-   0x00, /* 00000000 */
-
-};
-
--- linux-2.1.42/arch/m68k/console/fbcon.c.orig	Mon Jun  9 20:16:04 1997
+++ linux-2.1.42/arch/m68k/console/fbcon.c	Mon Jun  9 23:08:11 1997
@@ -1,4124 +0,0 @@
-/*
- * linux/arch/m68k/console/fbcon.c -- Low level frame buffer based console
- *                                    driver
- *
- *    Copyright (C) 1995 Geert Uytterhoeven
- *
- *
- * This file is based on the original Amiga console driver (amicon.c):
- *
- *    Copyright (C) 1993 Hamish Macdonald
- *                       Greg Harp
- *    Copyright (C) 1994 David Carter [carter@compsci.bristol.ac.uk]
- *
- *          with work by William Rucklidge (wjr@cs.cornell.edu)
- *                       Geert Uytterhoeven
- *                       Jes Sorensen (jds@kom.auc.dk)
- *                       Martin Apel
- *
- * and on the original Atari console driver (atacon.c):
- *
- *    Copyright (C) 1993 Bjoern Brauel
- *                       Roman Hodek
- *
- *          with work by Guenther Kelleter
- *                       Martin Schaller
- *                       Andreas Schwab
- *
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file COPYING in the main directory of this archive
- * for more details.
- */
-
-/*
- * To do:
- *  - Implement 16 plane mode.
- *  - Add support for 16/24/32 bit packed pixels
- *  - Hardware cursor
- */
-
-
-#include <linux/types.h>
-#include <linux/sched.h>
-#include <linux/fs.h>
-#include <linux/kernel.h>
-#include <linux/tty.h>
-#include <linux/console.h>
-#include <linux/string.h>
-#include <linux/config.h>
-#include <linux/kd.h>
-#include <linux/malloc.h>
-
-#include <asm/setup.h>
-#include <asm/irq.h>
-#ifdef CONFIG_AMIGA
-#include <asm/amigahw.h>
-#include <asm/amigaints.h>
-#endif /* CONFIG_AMIGA */
-#ifdef CONFIG_ATARI
-#include <asm/atariints.h>
-#endif
-#ifdef CONFIG_FB_CYBER
-#include "../amiga/s3blit.h"
-#endif
-#include <linux/fb.h>
-#include <asm/font.h>
-#include <asm/machdep.h>
-
-#include <asm/system.h>
-#include <asm/uaccess.h>
-
-#include "../../../drivers/char/vt_kern.h"   /* vt_cons and vc_resize_con() */
-#include "../../../drivers/char/console_struct.h"
-
-/* Import console_blanked from console.c */
-
-extern int console_blanked;
-
-
-   /*
-    *    The following symbols select what modes are supported. They should
-    *    be settable by the user ("make config") later.
-    */
-
-/* Clear all definitions */
-
-#undef CONFIG_FBCON_MONO
-#undef CONFIG_FBCON_ILBM
-#undef CONFIG_FBCON_PLANES
-#undef CONFIG_FBCON_2PLANE
-#undef CONFIG_FBCON_4PLANE
-#undef CONFIG_FBCON_8PLANE
-#undef CONFIG_FBCON_8PACKED
-#undef CONFIG_FBCON_16PACKED
-#undef CONFIG_FBCON_24PACKED
-#undef CONFIG_FBCON_32PACKED
-#undef CONFIG_FBCON_CYBER
-#undef CONFIG_FBCON_RETINAZ3
-
-
-/* Monochrome is default */
-
-#define CONFIG_FBCON_MONO
-
-/* Amiga support */
-
-#ifdef CONFIG_AMIGA
-#ifndef CONFIG_FBCON_ILBM
-#define CONFIG_FBCON_ILBM
-#endif
-#ifndef CONFIG_FBCON_PLANES
-#define CONFIG_FBCON_PLANES
-#endif
-
-/* Cybervision Graphics Board */
-
-#ifdef CONFIG_FB_CYBER
-#ifndef CONFIG_FBCON_CYBER
-#define CONFIG_FBCON_CYBER
-#endif
-#endif
-
-/* RetinaZ3 Graphics Board */
-
-#ifdef CONFIG_FB_RETINAZ3
-#ifndef CONFIG_FBCON_RETINAZ3
-#define CONFIG_FBCON_RETINAZ3
-#endif
-#ifndef CONFIG_FBCON_8PACKED
-#define CONFIG_FBCON_8PACKED
-#endif
-#endif
-
-#endif /* CONFIG_AMIGA */
-
-/* Atari support */
-
-#ifdef CONFIG_ATARI
-#ifndef CONFIG_FBCON_2PLANE
-#define CONFIG_FBCON_2PLANE
-#endif
-#ifndef CONFIG_FBCON_4PLANE
-#define CONFIG_FBCON_4PLANE
-#endif
-#ifndef CONFIG_FBCON_8PLANE
-#define CONFIG_FBCON_8PLANE
-#endif
-#ifndef CONFIG_FBCON_8PACKED
-#define CONFIG_FBCON_8PACKED
-#endif
-#ifndef CONFIG_FBCON_16PACKED
-#define CONFIG_FBCON_16PACKED
-#endif
-#endif /* CONFIG_ATARI */
-
-
-/* Extra definitions to make the code more readable */
-
-#if defined(CONFIG_FBCON_2PLANE) || defined(CONFIG_FBCON_4PLANE) || \
-    defined(CONFIG_FBCON_8PLANE)
-#define CONFIG_FBCON_IPLAN2
-#else
-#undef CONFIG_FBCON_IPLAN2
-#endif
-
-#if defined(CONFIG_FBCON_CYBER) || defined(CONFIG_FBCON_RETINAZ3) || \
-    defined(CONFIG_FBCON_8PACKED) || defined(CONFIG_FBCON_16PACKED) || \
-    defined(CONFIG_FBCON_24PACKED) || defined(CONFIG_FBCON_32PACKED)
-#define CONFIG_FBCON_PACKED
-#else
-#undef CONFIG_FBCON_PACKED
-#endif
-
-
-static struct fb_info *fb_info;
-static struct display *disp;
-
-
-/* ++Geert: Sorry, no hardware cursor support at the moment;
-   use Atari alike software cursor */
-
-static int cursor_drawn = 0;
-
-#define CURSOR_DRAW_DELAY           (2)
-
-/* # VBL ints between cursor state changes */
-#define AMIGA_CURSOR_BLINK_RATE   (20)
-#define ATARI_CURSOR_BLINK_RATE   (42)
-
-static int vbl_cursor_cnt = 0;
-static int cursor_on = 0;
-static int cursor_blink_rate;
-
-static __inline__ int CURSOR_UNDRAWN(void)
-{
-   int cursor_was_drawn;
-   vbl_cursor_cnt = 0;
-   cursor_was_drawn = cursor_drawn;
-   cursor_drawn = 0;
-   return(cursor_was_drawn);
-}
-
-   /*
-    *    Attribute Decoding
-    */
-
-/* Color */
-#define attr_fgcol(p,conp)    \
-	(((conp)->vc_attr >> ((p)->inverse ? 4 : 0)) & 0x0f)
-#define attr_bgcol(p,conp)    \
-	(((conp)->vc_attr >> ((p)->inverse ? 0 : 4)) & 0x0f)
-#define	attr_bgcol_ec(p,conp) \
-	(((conp)->vc_video_erase_char >> ((p)->inverse ? 8 : 12)) & 0x0f)
-
-/* Monochrome */
-#define attr_bold(p,conp)     \
-	(((conp)->vc_attr & 3) == 2)
-#define attr_reverse(p,conp)  \
-	(((conp)->vc_attr & 8) ^ ((p)->inverse ? 8 : 0))
-#define attr_underline(p,conp) \
-	(((conp)->vc_attr) & 4)
-
-
-   /*
-    *    Scroll Method
-    */
-
-#define SCROLL_YWRAP          (0)
-#define SCROLL_YPAN           (1)
-#define SCROLL_YMOVE          (2)
-
-#define divides(a, b)         ((!(a) || (b)%(a)) ? 0 : 1)
-
-
-   /*
-    *    Interface used by the world
-    */
-
-static int fbcon_startup(u_long *kmem_start, const char **display_desc);
-static void fbcon_init(struct vc_data *conp);
-static int fbcon_deinit(struct vc_data *conp);
-static int fbcon_changevar(int con);
-static int fbcon_clear(struct vc_data *conp, int sy, int sx, int height,
-                       int width);
-static int fbcon_putc(struct vc_data *conp, int c, int yy, int xx);
-static int fbcon_putcs(struct vc_data *conp, const char *s, int count, int yy,
-                       int xx);
-static int fbcon_cursor(struct vc_data *conp, int mode);
-static int fbcon_scroll(struct vc_data *conp, int t, int b, int dir, int count);
-static int fbcon_bmove(struct vc_data *conp, int sy, int sx, int dy, int dx,
-                       int height, int width);
-static int fbcon_switch(struct vc_data *conp);
-static int fbcon_blank(int blank);
-static int fbcon_get_font(struct vc_data *conp, int *w, int *h, char *data);
-static int fbcon_set_font(struct vc_data *conp, int w, int h, char *data);
-static int fbcon_set_palette(struct vc_data *conp, unsigned char *table);
-
-
-   /*
-    *    Internal routines
-    */
-
-static void fbcon_setup(int con, int setcol, int init);
-static __inline__ void *mymemclear_small(void *s, size_t count);
-static __inline__ void *mymemclear(void *s, size_t count);
-static __inline__ void *mymemset(void *s, size_t count);
-static __inline__ void *mymemmove(void *d, void *s, size_t count);
-static __inline__ void fast_memmove(char *dst, char *src, size_t size);
-static __inline__ void memclear_4p_col(void *d, size_t h, u_long val, int bpr);
-static __inline__ void memset_even_4p(void *d, size_t count, u_long val1,
-                                      u_long val2);
-static __inline__ void memmove_4p_col(void *d, void *s, int h, int bpr);
-static __inline__ u_long expand4l(u_char c);
-static __inline__ void expand4dl(u_char c, u_long *ret1, u_long *ret2);
-static __inline__ u_long dup4l(u_char c);
-static __inline__ void memclear_8p_col(void *d, size_t h, u_long val1,
-                                       u_long val2, int bpr);
-static __inline__ void memset_even_8p(void *d, size_t count, u_long val1,
-                                      u_long val2, u_long val3, u_long val4);
-static __inline__ void memmove_8p_col(void *d, void *s, int h, int bpr);
-static __inline__ void expand8dl(u_char c, u_long *ret1, u_long *ret2);
-static __inline__ void memclear_2p_col(void *d, size_t h, u_short val,
-				       int bpr);
-static __inline__ void memset_even_2p(void *d, size_t count, u_long val);
-static __inline__ void memmove_2p_col(void *d, void *s, int h, int bpr);
-static __inline__ u_short expand2w(u_char c);
-static __inline__ u_long expand2l(u_char c);
-static __inline__ u_short dup2w(u_char c);
-static __inline__ int real_y(struct display *p, int yy);
-static void fbcon_vbl_handler(int irq, void *dummy, struct pt_regs *fp);
-static __inline__ void updatescrollmode(struct display *p);
-static __inline__ void ywrap_up(int unit, struct display *p, int count);
-static __inline__ void ywrap_down(int unit, struct display *p, int count);
-static __inline__ void ypan_up(int unit, struct vc_data *conp,
-			       struct display *p, int count);
-static __inline__ void ypan_down(int unit, struct vc_data *conp,
-				 struct display *p, int count);
-static void fbcon_bmove_rec(struct display *p, int sy, int sx, int dy, int dx,
-                            int height, int width, u_int y_break);
-
-
-   /*
-    *    Monochrome
-    */
-
-#ifdef CONFIG_FBCON_MONO
-static void bmove_mono(struct display *p, int sy, int sx, int dy, int dx,
-                       int height, int width);
-static void clear_mono(struct vc_data *conp, struct display *p, int sy, int sx,
-                       int height, int width);
-static void putc_mono(struct vc_data *conp, struct display *p, int c, int yy,
-                      int xx);
-static void putcs_mono(struct vc_data *conp, struct display *p, const char *s,
-                       int count, int yy, int xx);
-static void rev_char_mono(struct display *p, int xx, int yy);
-#endif /* CONFIG_FBCON_MONO */
-
-
-   /*
-    *    Color Interleaved Planes
-    */
-
-#ifdef CONFIG_FBCON_ILBM
-static void bmove_ilbm(struct display *p, int sy, int sx, int dy, int dx,
-                       int height, int width);
-static void clear_ilbm(struct vc_data *conp, struct display *p, int sy, int sx,
-                       int height, int width);
-static void putc_ilbm(struct vc_data *conp, struct display *p, int c, int yy,
-                      int xx);
-static void putcs_ilbm(struct vc_data *conp, struct display *p, const char *s,
-                       int count, int yy, int xx);
-static void rev_char_ilbm(struct display *p, int xx, int yy);
-#endif /* CONFIG_FBCON_ILBM */
-
-
-   /*
-    *    Color Planes
-    */
-
-#ifdef CONFIG_FBCON_PLANES
-static void bmove_plan(struct display *p, int sy, int sx, int dy, int dx,
-                       int height, int width);
-static void clear_plan(struct vc_data *conp, struct display *p, int sy, int sx,
-                       int height, int width);
-static void putc_plan(struct vc_data *conp, struct display *p, int c, int yy,
-                      int xx);
-static void putcs_plan(struct vc_data *conp, struct display *p, const char *s,
-                       int count, int yy, int xx);
-static void rev_char_plan(struct display *p, int xx, int yy);
-#endif /* CONFIG_FBCON_PLANES */
-
-
-   /*
-    *    2 Planes (2-bytes interleave)
-    */
-
-#ifdef CONFIG_FBCON_2PLANE
-static void bmove_2_plane(struct display *p, int sy, int sx, int dy, int dx,
-                          int height, int width);
-static void clear_2_plane(struct vc_data *conp, struct display *p, int sy,
-                          int sx, int height, int width);
-static void putc_2_plane(struct vc_data *conp, struct display *p, int c, int yy,
-                         int xx);
-static void putcs_2_plane(struct vc_data *conp, struct display *p,
-                          const char *s, int count, int yy, int xx);
-static void rev_char_2_plane(struct display *display, int xx, int yy);
-#endif /* CONFIG_FBCON_2PLANE */
-
-
-   /*
-    *    4 Planes (2-bytes interleave)
-    */
-
-#ifdef CONFIG_FBCON_4PLANE
-static void bmove_4_plane(struct display *p, int sy, int sx, int dy, int dx,
-                          int height, int width);
-static void clear_4_plane(struct vc_data *conp, struct display *p, int sy,
-                          int sx, int height, int width);
-static void putc_4_plane(struct vc_data *conp, struct display *p, int c, int yy,
-                         int xx);
-static void putcs_4_plane(struct vc_data *conp, struct display *p,
-                          const char *s, int count, int yy, int xx);
-static void rev_char_4_plane(struct display *p, int xx, int yy);
-#endif /* CONFIG_FBCON_4PLANE */
-
-
-   /*
-    *    8 Planes (2-bytes interleave)
-    */
-
-#ifdef CONFIG_FBCON_8PLANE
-static void bmove_8_plane(struct display *p, int sy, int sx, int dy, int dx,
-                          int height, int width);
-static void clear_8_plane(struct vc_data *conp, struct display *p, int sy,
-                          int sx, int height, int width);
-static void putc_8_plane(struct vc_data *conp, struct display *p, int c, int yy,
-                         int xx);
-static void putcs_8_plane(struct vc_data *conp, struct display *p,
-                          const char *s, int count, int yy, int xx);
-static void rev_char_8_plane(struct display *display, int xx, int yy);
-#endif /* CONFIG_FBCON_8PLANE */
-
-
-   /*
-    *    8 bpp Packed Pixels
-    */
-
-#ifdef CONFIG_FBCON_8PACKED
-static void bmove_8_packed(struct display *p, int sy, int sx, int dy, int dx,
-                           int height, int width);
-static void clear_8_packed(struct vc_data *conp, struct display *p, int sy,
-                           int sx, int height, int width);
-static void putc_8_packed(struct vc_data *conp, struct display *p, int c, int yy,
-                          int xx);
-static void putcs_8_packed(struct vc_data *conp, struct display *p,
-                           const char *s, int count, int yy, int xx);
-static void rev_char_8_packed(struct display *p, int xx, int yy);
-#endif /* CONFIG_FBCON_8PACKED */
-
-
-   /*
-    *    16 bpp Packed Pixels
-    */
-
-#ifdef CONFIG_FBCON_16PACKED
-static void bmove_16_packed(struct display *p, int sy, int sx, int dy, int dx,
-                            int height, int width);
-static void clear_16_packed(struct vc_data *conp, struct display *p, int sy,
-                            int sx, int height, int width);
-static void putc_16_packed(struct vc_data *conp, struct display *p, int c,
-                           int yy, int xx);
-static void putcs_16_packed(struct vc_data *conp, struct display *p,
-                            const char *s, int count, int yy, int xx);
-static void rev_char_16_packed(struct display *p, int xx, int yy);
-#endif */ CONFIG_FBCON_8PACKED */
-
-
-   /*
-    *    Cybervision (accelerated)
-    */
-
-#ifdef CONFIG_FBCON_CYBER
-static void bmove_cyber(struct display *p, int sy, int sx, int dy, int dx,
-                        int height, int width);
-static void clear_cyber(struct vc_data *conp, struct display *p, int sy, int sx,
-                        int height, int width);
-static void putc_cyber(struct vc_data *conp, struct display *p, int c, int yy,
-                       int xx);
-static void putcs_cyber(struct vc_data *conp, struct display *p, const char *s,
-                        int count, int yy, int xx);
-static void rev_char_cyber(struct display *p, int xx, int yy);
-
-extern void Cyber_WaitQueue(u_short fifo);
-extern void Cyber_WaitBlit(void);
-extern void Cyber_BitBLT(u_short curx, u_short cury, u_short destx,
-                         u_short desty, u_short width, u_short height,
-                         u_short mode);
-extern void Cyber_RectFill(u_short xx, u_short yy, u_short width, u_short height,
-                           u_short mode, u_short color);
-extern void Cyber_MoveCursor(u_short xx, u_short yy);
-#endif /* CONFIG_FBCON_CYBER */
-
-#ifdef CONFIG_FBCON_RETINAZ3
-static void clear_retz3(struct vc_data *conp, struct display *p, int
-			sy, int sx, int height, int width);
-static void bmove_retz3(struct display *p, int sy, int sx, int dy, int dx,
-                        int height, int width);
-extern void retz3_bitblt(struct fb_var_screeninfo *scr,
-			 unsigned short srcx, unsigned short srcy, unsigned
-			 short destx, unsigned short desty, unsigned short
-			 width, unsigned short height, unsigned short cmd,
-			 unsigned short mask);
-static void putc_retz3(struct vc_data *conp, struct display *p, int c,
-		       int yy, int xx);
-static void putcs_retz3(struct vc_data *conp, struct display *p, const
-			char *s, int count, int yy, int xx);
-static void rev_char_retz3(struct display *p, int xx, int yy);
-#endif
-
-   /*
-    *    `switch' for the Low Level Operations
-    */
-
-struct display_switch {
-    void (*bmove)(struct display *p, int sy, int sx, int dy, int dx, int height,
-                  int width);
-    void (*clear)(struct vc_data *conp, struct display *p, int sy, int sx,
-                  int height, int width);
-    void (*putc)(struct vc_data *conp, struct display *p, int c, int yy, int xx);
-    void (*putcs)(struct vc_data *conp, struct display *p, const char *s,
-                  int count, int yy, int xx);
-    void (*rev_char)(struct display *p, int xx, int yy);
-};
-
-
-#ifdef CONFIG_FBCON_MONO
-static struct display_switch dispsw_mono = {
-   bmove_mono, clear_mono, putc_mono, putcs_mono, rev_char_mono
-};
-#endif /* CONFIG_FBCON_MONO */
-
-#ifdef CONFIG_FBCON_ILBM
-static struct display_switch dispsw_ilbm = {
-   bmove_ilbm, clear_ilbm, putc_ilbm, putcs_ilbm, rev_char_ilbm
-};
-#endif /* CONFIG_FBCON_ILBM */
-
-#ifdef CONFIG_FBCON_PLANES
-static struct display_switch dispsw_plan = {
-   bmove_plan, clear_plan, putc_plan, putcs_plan, rev_char_plan
-};
-#endif /* CONFIG_FBCON_PLANES */
-
-#ifdef CONFIG_FBCON_2PLANE
-static struct display_switch dispsw_2_plane = {
-   bmove_2_plane, clear_2_plane, putc_2_plane, putcs_2_plane, rev_char_2_plane
-};
-#endif /* CONFIG_FBCON_2PLANE */
-
-#ifdef CONFIG_FBCON_4PLANE
-static struct display_switch dispsw_4_plane = {
-   bmove_4_plane, clear_4_plane, putc_4_plane, putcs_4_plane, rev_char_4_plane
-};
-#endif /* CONFIG_FBCON_4PLANE */
-
-#ifdef CONFIG_FBCON_8PLANE
-static struct display_switch dispsw_8_plane = {
-   bmove_8_plane, clear_8_plane, putc_8_plane, putcs_8_plane, rev_char_8_plane
-};
-#endif /* CONFIG_FBCON_8PLANE */
-
-#ifdef CONFIG_FBCON_8PACKED
-static struct display_switch dispsw_8_packed = {
-   bmove_8_packed, clear_8_packed, putc_8_packed, putcs_8_packed, rev_char_8_packed
-};
-#endif /* CONFIG_FBCON_8PACKED */
-
-#ifdef CONFIG_FBCON_16PACKED
-static struct display_switch dispsw_16_packed = {
-   bmove_16_packed, clear_16_packed, putc_16_packed, putcs_16_packed,
-   rev_char_16_packed
-};
-#endif /* CONFIG_FBCON_16PACKED */
-
-#ifdef CONFIG_FBCON_CYBER
-static struct display_switch dispsw_cyber = {
-   bmove_cyber, clear_cyber, putc_cyber, putcs_cyber, rev_char_cyber
-};
-#endif /* CONFIG_FBCON_CYBER */
-
-#ifdef CONFIG_FBCON_RETINAZ3
-static struct display_switch dispsw_retz3 = {
-   bmove_retz3, clear_retz3, putc_retz3,
-   putcs_retz3, rev_char_retz3
-};
-#endif
-
-
-static int fbcon_startup(u_long *kmem_start, const char **display_desc)
-{
-   int irqres = 0;
-
-   fb_info = mach_fb_init(kmem_start);
-   disp = fb_info->disp;
-   *display_desc = fb_info->modename;
-   fb_info->changevar = &fbcon_changevar;
-
-#ifdef CONFIG_AMIGA
-   if (MACH_IS_AMIGA) {
-      cursor_blink_rate = AMIGA_CURSOR_BLINK_RATE;
-      irqres = request_irq(IRQ_AMIGA_VERTB, fbcon_vbl_handler, 0,
-                           "console/cursor", fbcon_vbl_handler);
-   }
-#endif /* CONFIG_AMIGA */
-#ifdef CONFIG_ATARI
-   if (MACH_IS_ATARI) {
-      cursor_blink_rate = ATARI_CURSOR_BLINK_RATE;
-      irqres = request_irq(IRQ_AUTO_4, fbcon_vbl_handler, IRQ_TYPE_PRIO,
-                           "console/cursor", fbcon_vbl_handler);
-   }
-#endif /* CONFIG_ATARI */
-
-   if (irqres)
-      panic("fbcon_startup: Couldn't add vblank interrupt");
-
-   return(0);
-}
-
-
-static void fbcon_init(struct vc_data *conp)
-{
-   int unit = conp->vc_num;
-
-   if (unit)
-      disp[unit] = disp[0];
-   disp[unit].conp = conp;
-   fbcon_setup(unit, 1, 1);
-}
-
-
-static int fbcon_deinit(struct vc_data *conp)
-{
-   disp[conp->vc_num].conp = 0;
-   return(0);
-}
-
-
-static int fbcon_changevar(int con)
-{
-   fbcon_setup(con, 1, 0);
-   return(0);
-}
-
-
-static __inline__ void updatescrollmode(struct display *p)
-{
-   if (divides(p->ywrapstep, p->fontheight) &&
-       divides(p->fontheight, p->var.yres_virtual))
-      p->scrollmode = SCROLL_YWRAP;
-   else if (divides(p->ypanstep, p->fontheight) &&
-            p->var.yres_virtual >= p->var.yres+p->fontheight)
-      p->scrollmode = SCROLL_YPAN;
-   else
-      p->scrollmode = SCROLL_YMOVE;
-}
-
-
-static void fbcon_setup(int con, int setcol, int init)
-{
-   struct display *p = &disp[con];
-   struct vc_data *conp = p->conp;
-   int nr_rows, nr_cols;
-
-   p->var.xoffset = p->var.yoffset = p->yscroll = 0;  /* reset wrap/pan */
-
-   if (!fb_info->fontname[0] ||
-       !findsoftfont(fb_info->fontname, &p->fontwidth, &p->fontheight,
-                     &p->fontdata) || p->fontwidth != 8)
-	   getdefaultfont(p->var.xres, p->var.yres, NULL, &p->fontwidth,
-	                  &p->fontheight, &p->fontdata);
-   if (p->fontwidth != 8) {
-      /* ++Geert: changed from panic() to `correct and continue' */
-      printk("fbcon_setup: No support for fontwidth != 8");
-      p->fontwidth = 8;
-   }
-   updatescrollmode(p);
-
-   nr_cols = p->var.xres/p->fontwidth;
-   nr_rows = p->var.yres/p->fontheight;
-   /* ++guenther: console.c:vc_allocate() relies on initializing vc_{cols,rows},
-    * but we must not set those if we are only resizing the console.
-    */
-   if (init) {
-      conp->vc_cols = nr_cols;
-      conp->vc_rows = nr_rows;
-   }
-   p->vrows = p->var.yres_virtual/p->fontheight;
-   conp->vc_can_do_color = p->var.bits_per_pixel != 1;
-
-#ifdef CONFIG_FBCON_MONO
-   if (p->var.bits_per_pixel == 1) {
-      if (p->line_length)
-         p->next_line = p->line_length;
-      else
-         p->next_line = p->var.xres_virtual>>3;
-      p->next_plane = 0;
-      p->dispsw = &dispsw_mono;
-   } else
-#endif /* CONFIG_FBCON_MONO */
-#ifdef CONFIG_FBCON_IPLAN2
-   if (p->type == FB_TYPE_INTERLEAVED_PLANES && p->type_aux == 2) {
-      p->next_line = p->var.xres_virtual*p->var.bits_per_pixel>>3;
-      p->next_plane = 0;
-#ifdef CONFIG_FBCON_2PLANE
-      if (p->var.bits_per_pixel == 2)
-         p->dispsw = &dispsw_2_plane;
-      else
-#endif /* CONFIG_FBCON_2PLANE */
-#ifdef CONFIG_FBCON_4PLANE
-      if (p->var.bits_per_pixel == 4)
-         p->dispsw = &dispsw_4_plane;
-      else
-#endif /* CONFIG_FBCON_4PLANE */
-#ifdef CONFIG_FBCON_8PLANE
-      if (p->var.bits_per_pixel == 8)
-         p->dispsw = &dispsw_8_plane;
-      else
-#endif /* CONFIG_FBCON_8PLANE */
-      goto fail;
-   } else
-#endif /* CONFIG_FBCON_IPLAN2 */
-#ifdef CONFIG_FBCON_ILBM
-   if (p->type == FB_TYPE_INTERLEAVED_PLANES && p->type_aux != 2) {
-      if (p->line_length) {
-         p->next_line = p->line_length*p->var.bits_per_pixel;
-         p->next_plane = p->line_length
-;
-      } else {
-         p->next_line = p->type_aux;
-         p->next_plane = p->type_aux/p->var.bits_per_pixel;
-      }
-      p->dispsw = &dispsw_ilbm;
-   } else
-#endif /* CONFIG_FBCON_ILBM */
-#ifdef CONFIG_FBCON_PLANES
-   if (p->type == FB_TYPE_PLANES) {
-      if (p->line_length)
-         p->next_line = p->line_length;
-      else
-         p->next_line = p->var.xres_virtual>>3;
-      p->next_plane = p->var.yres_virtual*p->next_line;
-      p->dispsw = &dispsw_plan;
-   } else
-#endif /* CONFIG_FBCON_PLANES */
-#ifdef CONFIG_FBCON_PACKED
-   if (p->type == FB_TYPE_PACKED_PIXELS) {
-      p->next_line = (p->var.xres_virtual*p->var.bits_per_pixel)>>3;
-      p->next_plane = 0;
-#ifdef CONFIG_FBCON_CYBER
-      if (p->var.accel == FB_ACCEL_CYBERVISION)
-         p->dispsw = &dispsw_cyber;
-      else
-#endif
-#ifdef CONFIG_FBCON_RETINAZ3
-      if (p->var.accel == FB_ACCEL_RETINAZ3)
-         p->dispsw = &dispsw_retz3;
-      else
-#endif
-#ifdef CONFIG_FBCON_8PACKED
-      if (p->var.bits_per_pixel == 8)
-         p->dispsw = &dispsw_8_packed;
-      else
-#endif /* CONFIG_FBCON_8PACKED */
-#ifdef CONFIG_FBCON_16PACKED
-      if (p->var.bits_per_pixel == 16)
-         p->dispsw = &dispsw_16_packed;
-      else
-#endif /* CONFIG_FBCON_16PACKED */
-#ifdef CONFIG_FBCON_24PACKED
-      if (p->var.bits_per_pixel == 24)
-         p->dispsw = &dispsw_24_packed;
-      else
-#endif /* CONFIG_FBCON_24PACKED */
-#ifdef CONFIG_FBCON_32PACKED
-      if (p->var.bits_per_pixel == 32)
-         p->dispsw = &dispsw_32_packed;
-      else
-#endif /* CONFIG_FBCON_32PACKED */
-      goto fail;
-   } else
-#endif /* CONFIG_FBCON_PACKED */
-   {
-fail:
-#ifdef CONFIG_FBCON_MONO
-      printk("fbcon_setup: type %d (aux %d) not supported, trying mono\n",
-             p->type, p->type_aux);
-      if (p->line_length)
-         p->next_line = p->line_length;
-      else
-         p->next_line = p->var.xres_virtual>>3;
-      p->next_plane = 0;
-      p->var.bits_per_pixel = 1;
-      p->dispsw = &dispsw_mono;
-#else /* CONFIG_FBCON_MONO */
-      panic("fbcon_setup: no default driver");
-#endif /* CONFIG_FBCON_MONO */
-   }
-
-   if (setcol) {
-      p->fgcol = p->var.bits_per_pixel > 2 ? 7 : (1<<p->var.bits_per_pixel)-1;
-      p->bgcol = 0;
-   }
-
-   if (!init)
-      vc_resize_con(nr_rows, nr_cols, con);
-}
-
-
-/* ================================================================= */
-/*                      Utility Assembler Functions                  */
-/* ================================================================= */
-
-
-/* ====================================================================== */
-
-/* Those of a delicate disposition might like to skip the next couple of
- * pages.
- *
- * These functions are drop in replacements for memmove and
- * memset(_, 0, _). However their five instances add at least a kilobyte
- * to the object file. You have been warned.
- *
- * Not a great fan of assembler for the sake of it, but I think
- * that these routines are at least 10 times faster than their C
- * equivalents for large blits, and that's important to the lowest level of
- * a graphics driver. Question is whether some scheme with the blitter
- * would be faster. I suspect not for simple text system - not much
- * asynchrony.
- *
- * Code is very simple, just gruesome expansion. Basic strategy is to
- * increase data moved/cleared at each step to 16 bytes to reduce
- * instruction per data move overhead. movem might be faster still
- * For more than 15 bytes, we try to align the write direction on a
- * longword boundary to get maximum speed. This is even more gruesome.
- * Unaligned read/write used requires 68020+ - think this is a problem?
- *
- * Sorry!
- */
-
-
-/* ++roman: I've optimized Robert's original versions in some minor
- * aspects, e.g. moveq instead of movel, let gcc choose the registers,
- * use movem in some places...
- * For other modes than 1 plane, lots of more such assembler functions
- * were needed (e.g. the ones using movep or expanding color values).
- */
-
-/* ++andreas: more optimizations:
-   subl #65536,d0 replaced by clrw d0; subql #1,d0 for dbcc
-   addal is faster than addaw
-   movep is rather expensive compared to ordinary move's
-   some functions rewritten in C for clarity, no speed loss */
-
-static __inline__ void *mymemclear_small(void *s, size_t count)
-{
-   if (!count)
-      return(0);
-
-   __asm__ __volatile__(
-         "lsrl   #1,%1 ; jcc 1f ; moveb %2,%0@-\n\t"
-      "1: lsrl   #1,%1 ; jcc 1f ; movew %2,%0@-\n\t"
-      "1: lsrl   #1,%1 ; jcc 1f ; movel %2,%0@-\n\t"
-      "1: lsrl   #1,%1 ; jcc 1f ; movel %2,%0@- ; movel %2,%0@-\n\t"
-      "1: subql  #1,%1 ; jcs 3f\n\t"
-      "2: moveml %2/%3/%4/%5,%0@-\n\t"
-         "dbra %1,2b\n\t"
-      "3:"
-         : "=a" (s), "=d" (count)
-         :  "d" (0), "d" (0), "d" (0), "d" (0),
-            "0" ((char *)s+count), "1" (count)
-  );
-
-   return(0);
-}
-
-
-static __inline__ void *mymemclear(void *s, size_t count)
-{
-   if (!count)
-      return(0);
-
-   if (count < 16) {
-      __asm__ __volatile__(
-            "lsrl   #1,%1 ; jcc 1f ; clrb %0@+\n\t"
-         "1: lsrl   #1,%1 ; jcc 1f ; clrw %0@+\n\t"
-         "1: lsrl   #1,%1 ; jcc 1f ; clrl %0@+\n\t"
-         "1: lsrl   #1,%1 ; jcc 1f ; clrl %0@+ ; clrl %0@+\n\t"
-         "1:"
-            : "=a" (s), "=d" (count)
-            : "0" (s), "1" (count)
-     );
-   } else {
-      long tmp;
-      __asm__ __volatile__(
-            "movel %1,%2\n\t"
-            "lsrl   #1,%2 ; jcc 1f ; clrb %0@+ ; subqw #1,%1\n\t"
-            "lsrl   #1,%2 ; jcs 2f\n\t"  /* %0 increased=>bit 2 switched*/
-            "clrw   %0@+  ; subqw  #2,%1 ; jra 2f\n\t"
-         "1: lsrl   #1,%2 ; jcc 2f\n\t"
-            "clrw   %0@+  ; subqw  #2,%1\n\t"
-         "2: movew %1,%2; lsrl #2,%1 ; jeq 6f\n\t"
-            "lsrl   #1,%1 ; jcc 3f ; clrl %0@+\n\t"
-         "3: lsrl   #1,%1 ; jcc 4f ; clrl %0@+ ; clrl %0@+\n\t"
-         "4: subql  #1,%1 ; jcs 6f\n\t"
-         "5: clrl %0@+; clrl %0@+ ; clrl %0@+ ; clrl %0@+\n\t"
-            "dbra %1,5b   ; clrw %1; subql #1,%1; jcc 5b\n\t"
-         "6: movew %2,%1; btst #1,%1 ; jeq 7f ; clrw %0@+\n\t"
-         "7:            ; btst #0,%1 ; jeq 8f ; clrb %0@+\n\t"
-         "8:"
-            : "=a" (s), "=d" (count), "=d" (tmp)
-            : "0" (s), "1" (count)
-     );
-   }
-
-   return(0);
-}
-
-
-static __inline__ void *mymemset(void *s, size_t count)
-{
-   if (!count)
-      return(0);
-
-   __asm__ __volatile__(
-         "lsrl   #1,%1 ; jcc 1f ; moveb %2,%0@-\n\t"
-      "1: lsrl   #1,%1 ; jcc 1f ; movew %2,%0@-\n\t"
-      "1: lsrl   #1,%1 ; jcc 1f ; movel %2,%0@-\n\t"
-      "1: lsrl   #1,%1 ; jcc 1f ; movel %2,%0@- ; movel %2,%0@-\n\t"
-      "1: subql  #1,%1 ; jcs 3f\n\t"
-      "2: moveml %2/%3/%4/%5,%0@-\n\t"
-         "dbra %1,2b\n\t"
-      "3:"
-         : "=a" (s), "=d" (count)
-         :  "d" (-1), "d" (-1), "d" (-1), "d" (-1),
-            "0" ((char *) s + count), "1" (count)
-  );
-
-   return(0);
-}
-
-
-static __inline__ void *mymemmove(void *d, void *s, size_t count)
-{
-   if (d < s) {
-      if (count < 16) {
-         __asm__ __volatile__(
-               "lsrl   #1,%2 ; jcc 1f ; moveb %1@+,%0@+\n\t"
-            "1: lsrl   #1,%2 ; jcc 1f ; movew %1@+,%0@+\n\t"
-            "1: lsrl   #1,%2 ; jcc 1f ; movel %1@+,%0@+\n\t"
-            "1: lsrl   #1,%2 ; jcc 1f ; movel %1@+,%0@+ ; movel %1@+,%0@+\n\t"
-            "1:"
-               : "=a" (d), "=a" (s), "=d" (count)
-               : "0" (d), "1" (s), "2" (count)
-        );
-      } else {
-         long tmp;
-         __asm__ __volatile__(
-               "movel  %0,%3\n\t"
-               "lsrl   #1,%3 ; jcc 1f ; moveb %1@+,%0@+ ; subqw #1,%2\n\t"
-               "lsrl   #1,%3 ; jcs 2f\n\t"  /* %0 increased=>bit 2 switched*/
-               "movew  %1@+,%0@+  ; subqw  #2,%2 ; jra 2f\n\t"
-            "1: lsrl   #1,%3 ; jcc 2f\n\t"
-               "movew  %1@+,%0@+  ; subqw  #2,%2\n\t"
-            "2: movew  %2,%-; lsrl #2,%2 ; jeq 6f\n\t"
-               "lsrl   #1,%2 ; jcc 3f ; movel %1@+,%0@+\n\t"
-            "3: lsrl   #1,%2 ; jcc 4f ; movel %1@+,%0@+ ; movel %1@+,%0@+\n\t"
-            "4: subql  #1,%2 ; jcs 6f\n\t"
-            "5: movel  %1@+,%0@+;movel %1@+,%0@+\n\t"
-               "movel  %1@+,%0@+;movel %1@+,%0@+\n\t"
-               "dbra   %2,5b ; clrw %2; subql #1,%2; jcc 5b\n\t"
-            "6: movew  %+,%2; btst #1,%2 ; jeq 7f ; movew %1@+,%0@+\n\t"
-            "7:              ; btst #0,%2 ; jeq 8f ; moveb %1@+,%0@+\n\t"
-            "8:"
-               : "=a" (d), "=a" (s), "=d" (count), "=d" (tmp)
-               : "0" (d), "1" (s), "2" (count)
-        );
-      }
-   } else {
-      if (count < 16) {
-         __asm__ __volatile__(
-               "lsrl   #1,%2 ; jcc 1f ; moveb %1@-,%0@-\n\t"
-            "1: lsrl   #1,%2 ; jcc 1f ; movew %1@-,%0@-\n\t"
-            "1: lsrl   #1,%2 ; jcc 1f ; movel %1@-,%0@-\n\t"
-            "1: lsrl   #1,%2 ; jcc 1f ; movel %1@-,%0@- ; movel %1@-,%0@-\n\t"
-            "1:"
-               : "=a" (d), "=a" (s), "=d" (count)
-               : "0" ((char *) d + count), "1" ((char *) s + count), "2" (count)
-        );
-      } else {
-         long tmp;
-         __asm__ __volatile__(
-               "movel %0,%3\n\t"
-               "lsrl   #1,%3 ; jcc 1f ; moveb %1@-,%0@- ; subqw #1,%2\n\t"
-               "lsrl   #1,%3 ; jcs 2f\n\t"  /* %0 increased=>bit 2 switched*/
-               "movew  %1@-,%0@-  ; subqw  #2,%2 ; jra 2f\n\t"
-            "1: lsrl   #1,%3 ; jcc 2f\n\t"
-               "movew  %1@-,%0@-  ; subqw  #2,%2\n\t"
-            "2: movew %2,%-; lsrl #2,%2 ; jeq 6f\n\t"
-               "lsrl   #1,%2 ; jcc 3f ; movel %1@-,%0@-\n\t"
-            "3: lsrl   #1,%2 ; jcc 4f ; movel %1@-,%0@- ; movel %1@-,%0@-\n\t"
-            "4: subql  #1,%2 ; jcs 6f\n\t"
-            "5: movel %1@-,%0@-;movel %1@-,%0@-\n\t"
-               "movel %1@-,%0@-;movel %1@-,%0@-\n\t"
-               "dbra %2,5b ; clrw %2; subql #1,%2; jcc 5b\n\t"
-            "6: movew %+,%2; btst #1,%2 ; jeq 7f ; movew %1@-,%0@-\n\t"
-            "7:              ; btst #0,%2 ; jeq 8f ; moveb %1@-,%0@-\n\t"
-            "8:"
-               : "=a" (d), "=a" (s), "=d" (count), "=d" (tmp)
-               : "0" ((char *) d + count), "1" ((char *) s + count), "2" (count)
-        );
-      }
-   }
-
-   return(0);
-}
-
-
-/* ++andreas: Simple and fast version of memmove, assumes size is
-   divisible by 16, suitable for moving the whole screen bitplane */
-static __inline__ void fast_memmove(char *dst, char *src, size_t size)
-{
-  if (!size)
-    return;
-  if (dst < src)
-    __asm__ __volatile__
-      ("1:"
-       "  moveml %0@+,%/d0/%/d1/%/a0/%/a1\n"
-       "  moveml %/d0/%/d1/%/a0/%/a1,%1@\n"
-       "  addql #8,%1; addql #8,%1\n"
-       "  dbra %2,1b\n"
-       "  clrw %2; subql #1,%2\n"
-       "  jcc 1b"
-       : "=a" (src), "=a" (dst), "=d" (size)
-       : "0" (src), "1" (dst), "2" (size / 16 - 1)
-       : "d0", "d1", "a0", "a1", "memory");
-  else
-    __asm__ __volatile__
-      ("1:"
-       "  subql #8,%0; subql #8,%0\n"
-       "  moveml %0@,%/d0/%/d1/%/a0/%/a1\n"
-       "  moveml %/d0/%/d1/%/a0/%/a1,%1@-\n"
-       "  dbra %2,1b\n"
-       "  clrw %2; subql #1,%2\n"
-       "  jcc 1b"
-       : "=a" (src), "=a" (dst), "=d" (size)
-       : "0" (src + size), "1" (dst + size), "2" (size / 16 - 1)
-       : "d0", "d1", "a0", "a1", "memory");
-}
-
-
-/* Sets the bytes in the visible column at d, height h, to the value
- * val for a 4 plane screen. The the bis of the color in 'color' are
- * moved (8 times) to the respective bytes. This means:
- *
- * for(h times; d += bpr)
- *   *d     = (color & 1) ? 0xff : 0;
- *   *(d+2) = (color & 2) ? 0xff : 0;
- *   *(d+4) = (color & 4) ? 0xff : 0;
- *   *(d+6) = (color & 8) ? 0xff : 0;
- */
-
-static __inline__ void memclear_4p_col(void *d, size_t h, u_long val, int bpr)
-{
-	__asm__ __volatile__
-		("1: movepl %4,%0@(0)\n\t"
-		  "addal  %5,%0\n\t"
-		  "dbra	  %1,1b"
-		  : "=a" (d), "=d" (h)
-		  : "0" (d), "1" (h - 1), "d" (val), "r" (bpr)
-		);
-}
-
-/* Sets a 4 plane region from 'd', length 'count' bytes, to the color
- * in val1/val2. 'd' has to be an even address and count must be divisible
- * by 8, because only whole words and all planes are accessed. I.e.:
- *
- * for(count/8 times)
- *   *d     = *(d+1) = (color & 1) ? 0xff : 0;
- *   *(d+2) = *(d+3) = (color & 2) ? 0xff : 0;
- *   *(d+4) = *(d+5) = (color & 4) ? 0xff : 0;
- *   *(d+6) = *(d+7) = (color & 8) ? 0xff : 0;
- */
-
-static __inline__ void memset_even_4p(void *d, size_t count, u_long val1,
-                                      u_long val2)
-{
-  u_long *dd = d;
-
-  count /= 8;
-  while (count--)
-    {
-      *dd++ = val1;
-      *dd++ = val2;
-    }
-}
-
-/* Copies a 4 plane column from 's', height 'h', to 'd'. */
-
-static __inline__ void memmove_4p_col (void *d, void *s, int h, int bpr)
-{
-  u_char *dd = d, *ss = s;
-
-  while (h--)
-    {
-      dd[0] = ss[0];
-      dd[2] = ss[2];
-      dd[4] = ss[4];
-      dd[6] = ss[6];
-      dd += bpr;
-      ss += bpr;
-    }
-}
-
-
-/* This expands a 4 bit color into a long for movepl (4 plane) operations. */
-
-static __inline__ u_long expand4l(u_char c)
-{
-	u_long	rv;
-
-	__asm__ __volatile__
-		("lsrb	 #1,%2\n\t"
-		  "scs	 %0\n\t"
-		  "lsll	 #8,%0\n\t"
-		  "lsrb	 #1,%2\n\t"
-		  "scs	 %0\n\t"
-		  "lsll	 #8,%0\n\t"
-		  "lsrb	 #1,%2\n\t"
-		  "scs	 %0\n\t"
-		  "lsll	 #8,%0\n\t"
-		  "lsrb	 #1,%2\n\t"
-		  "scs	 %0\n\t"
-		  : "=&d" (rv), "=d" (c)
-		  : "1" (c)
-		);
-	return(rv);
-}
-
-/* This expands a 4 bit color into two longs for two movel operations
- * (4 planes).
- */
-
-static __inline__ void expand4dl(u_char c, u_long *ret1, u_long *ret2)
-{
-	u_long	rv1, rv2;
-
-	__asm__ __volatile__
-		("lsrb	 #1,%3\n\t"
-		  "scs	 %0\n\t"
-		  "extw	 %0\n\t"
-		  "swap	 %0\n\t"
-		  "lsrb	 #1,%3\n\t"
-		  "scs	 %0\n\t"
-		  "extw	 %0\n\t"
-		  "lsrb	 #1,%3\n\t"
-		  "scs	 %1\n\t"
-		  "extw	 %1\n\t"
-		  "swap	 %1\n\t"
-		  "lsrb	 #1,%3\n\t"
-		  "scs   %1\n\t"
-		  "extw	 %1"
-		  : "=&d" (rv1), "=&d" (rv2), "=d" (c)
-		  : "2" (c)
-		);
-	*ret1 = rv1;
-	*ret2 = rv2;
-}
-
-
-/* This duplicates a byte 4 times into a long. */
-
-static __inline__ u_long dup4l(u_char c)
-{
-	ushort	tmp;
-	ulong	rv;
-
-	__asm__ __volatile__
-		("moveb  %2,%0\n\t"
-		  "lslw   #8,%0\n\t"
-		  "moveb  %2,%0\n\t"
-		  "movew  %0,%1\n\t"
-		  "swap   %0\n\t"
-		  "movew  %1,%0"
-		  : "=&d" (rv), "=d" (tmp)
-		  : "d" (c)
-		);
-
-	return(rv);
-}
-
-
-/* Sets the bytes in the visible column at d, height h, to the value
- * val1,val2 for a 8 plane screen. The the bis of the color in 'color' are
- * moved (8 times) to the respective bytes. This means:
- *
- * for(h times; d += bpr)
- *   *d      = (color & 1) ? 0xff : 0;
- *   *(d+2)  = (color & 2) ? 0xff : 0;
- *   *(d+4)  = (color & 4) ? 0xff : 0;
- *   *(d+6)  = (color & 8) ? 0xff : 0;
- *   *(d+8)  = (color & 16) ? 0xff : 0;
- *   *(d+10) = (color & 32) ? 0xff : 0;
- *   *(d+12) = (color & 64) ? 0xff : 0;
- *   *(d+14) = (color & 128) ? 0xff : 0;
- */
-
-static __inline__ void memclear_8p_col(void *d, size_t h, u_long val1,
-                                       u_long val2, int bpr)
-{
-	__asm__ __volatile__
-		("1: movepl %4,%0@(0)\n\t"
-	      "movepl %5,%0@(8)\n\t"
-		  "addal  %6,%0\n\t"
-		  "dbra	  %1,1b"
-		  : "=a" (d), "=d" (h)
-		  : "0" (d), "1" (h - 1), "d" (val1), "d" (val2), "r" (bpr)
-		);
-}
-
-/* Sets a 8 plane region from 'd', length 'count' bytes, to the color
- * val1..val4. 'd' has to be an even address and count must be divisible
- * by 16, because only whole words and all planes are accessed. I.e.:
- *
- * for(count/16 times)
- *   *d      = *(d+1)  = (color & 1) ? 0xff : 0;
- *   *(d+2)  = *(d+3)  = (color & 2) ? 0xff : 0;
- *   *(d+4)  = *(d+5)  = (color & 4) ? 0xff : 0;
- *   *(d+6)  = *(d+7)  = (color & 8) ? 0xff : 0;
- *   *(d+8)  = *(d+9)  = (color & 16) ? 0xff : 0;
- *   *(d+10) = *(d+11) = (color & 32) ? 0xff : 0;
- *   *(d+12) = *(d+13) = (color & 64) ? 0xff : 0;
- *   *(d+14) = *(d+15) = (color & 128) ? 0xff : 0;
- */
-
-static __inline__ void memset_even_8p(void *d, size_t count, u_long val1,
-                                      u_long val2, u_long val3, u_long val4)
-{
-  u_long *dd = d;
-
-  count /= 16;
-  while (count--)
-    {
-      *dd++ = val1;
-      *dd++ = val2;
-      *dd++ = val3;
-      *dd++ = val4;
-    }
-}
-
-/* Copies a 8 plane column from 's', height 'h', to 'd'. */
-
-static __inline__ void memmove_8p_col (void *d, void *s, int h, int bpr)
-{
-  u_char *dd = d, *ss = s;
-
-  while (h--)
-    {
-      dd[0] = ss[0];
-      dd[2] = ss[2];
-      dd[4] = ss[4];
-      dd[6] = ss[6];
-      dd[8] = ss[8];
-      dd[10] = ss[10];
-      dd[12] = ss[12];
-      dd[14] = ss[14];
-      dd += bpr;
-      ss += bpr;
-    }
-}
-
-
-/* This expands a 8 bit color into two longs for two movepl (8 plane)
- * operations.
- */
-
-static __inline__ void expand8dl(u_char c, u_long *ret1, u_long *ret2)
-{
-	u_long	rv1, rv2;
-
-	__asm__ __volatile__
-		("lsrb	 #1,%3\n\t"
-		  "scs	 %0\n\t"
-		  "lsll	 #8,%0\n\t"
-		  "lsrb	 #1,%3\n\t"
-		  "scs	 %0\n\t"
-		  "lsll	 #8,%0\n\t"
-		  "lsrb	 #1,%3\n\t"
-		  "scs	 %0\n\t"
-		  "lsll	 #8,%0\n\t"
-		  "lsrb	 #1,%3\n\t"
-		  "scs	 %0\n\t"
-		  "lsrb	 #1,%3\n\t"
-		  "scs	 %1\n\t"
-		  "lsll	 #8,%1\n\t"
-		  "lsrb	 #1,%3\n\t"
-		  "scs	 %1\n\t"
-		  "lsll	 #8,%1\n\t"
-		  "lsrb	 #1,%3\n\t"
-		  "scs	 %1\n\t"
-		  "lsll	 #8,%1\n\t"
-		  "lsrb	 #1,%3\n\t"
-		  "scs	 %1"
-		  : "=&d" (rv1), "=&d" (rv2),"=d" (c)
-		  : "2" (c)
-		);
-
-	*ret1 = rv1;
-	*ret2 = rv2;
-}
-
-/* This expands a 8 bit color into four longs for four movel operations
- * (8 planes).
- */
-
-/* ++andreas: use macro to avoid taking address of return values */
-#define expand8ql(c, rv1, rv2, rv3, rv4) \
-do {	u_char tmp = c;						\
-	__asm__ __volatile__					\
-		("lsrb	 #1,%5\n\t"				\
-		  "scs	 %0\n\t"				\
-		  "extw	 %0\n\t"				\
-		  "swap	 %0\n\t"				\
-		  "lsrb	 #1,%5\n\t"				\
-		  "scs	 %0\n\t"				\
-		  "extw	 %0\n\t"				\
-		  "lsrb	 #1,%5\n\t"				\
-		  "scs	 %1\n\t"				\
-		  "extw	 %1\n\t"				\
-		  "swap	 %1\n\t"				\
-		  "lsrb	 #1,%5\n\t"				\
-		  "scs   %1\n\t"				\
-		  "extw	 %1\n\t"				\
-		  "lsrb	 #1,%5\n\t"				\
-		  "scs	 %2\n\t"				\
-		  "extw	 %2\n\t"				\
-		  "swap	 %2\n\t"				\
-		  "lsrb	 #1,%5\n\t"				\
-		  "scs	 %2\n\t"				\
-		  "extw	 %2\n\t"				\
-		  "lsrb	 #1,%5\n\t"				\
-		  "scs	 %3\n\t"				\
-		  "extw	 %3\n\t"				\
-		  "swap	 %3\n\t"				\
-		  "lsrb	 #1,%5\n\t"				\
-		  "scs   %3\n\t"				\
-		  "extw	 %3"					\
-		  : "=&d" (rv1), "=&d" (rv2), "=&d" (rv3),	\
-		    "=&d" (rv4), "=d" (tmp)			\
-		  : "4" (tmp)					\
-		);						\
-} while (0)
-
-
-/* Sets the bytes in the visible column at d, height h, to the value
- * val for a 2 plane screen. The the bis of the color in 'color' are
- * moved (8 times) to the respective bytes. This means:
- *
- * for(h times; d += bpr)
- *   *d     = (color & 1) ? 0xff : 0;
- *   *(d+2) = (color & 2) ? 0xff : 0;
- */
-
-static __inline__ void memclear_2p_col(void *d, size_t h, u_short val, int bpr)
-{
-	__asm__ __volatile__
-		("1: movepw %4,%0@(0)\n\t"
-		  "addal  %5,%0\n\t"
-		  "dbra	  %1,1b"
-		  : "=a" (d), "=d" (h)
-		  : "0" (d), "1" (h - 1), "d" (val), "r" (bpr)
-		);
-}
-
-/* Sets a 2 plane region from 'd', length 'count' bytes, to the color
- * in val1. 'd' has to be an even address and count must be divisible
- * by 8, because only whole words and all planes are accessed. I.e.:
- *
- * for(count/4 times)
- *   *d     = *(d+1) = (color & 1) ? 0xff : 0;
- *   *(d+2) = *(d+3) = (color & 2) ? 0xff : 0;
- */
-
-static __inline__ void memset_even_2p(void *d, size_t count, u_long val)
-{
-  u_long *dd = d;
-
-  count /= 4;
-  while (count--)
-    *dd++ = val;
-}
-
-/* Copies a 2 plane column from 's', height 'h', to 'd'. */
-
-static __inline__ void memmove_2p_col (void *d, void *s, int h, int bpr)
-{
-  u_char *dd = d, *ss = s;
-
-  while (h--)
-    {
-      dd[0] = ss[0];
-      dd[2] = ss[2];
-      dd += bpr;
-      ss += bpr;
-    }
-}
-
-
-/* This expands a 2 bit color into a short for movepw (2 plane) operations. */
-
-static __inline__ u_short expand2w(u_char c)
-{
-	u_short	rv;
-
-	__asm__ __volatile__
-		("lsrb	 #1,%2\n\t"
-		  "scs	 %0\n\t"
-		  "lsll	 #8,%0\n\t"
-		  "lsrb	 #1,%2\n\t"
-		  "scs	 %0\n\t"
-		  : "=&d" (rv), "=d" (c)
-		  : "1" (c)
-		);
-	return(rv);
-}
-
-/* This expands a 2 bit color into one long for a movel operation
- * (2 planes).
- */
-
-static __inline__ u_long expand2l(u_char c)
-{
-	u_long	rv;
-
-	__asm__ __volatile__
-		("lsrb	 #1,%2\n\t"
-		  "scs	 %0\n\t"
-		  "extw	 %0\n\t"
-		  "swap	 %0\n\t"
-		  "lsrb	 #1,%2\n\t"
-		  "scs	 %0\n\t"
-		  "extw	 %0\n\t"
-		  : "=&d" (rv), "=d" (c)
-		  : "1" (c)
-		);
-
-	return rv;
-}
-
-
-/* This duplicates a byte 2 times into a short. */
-
-static __inline__ u_short dup2w(u_char c)
-{
-    ushort  rv;
-
-    __asm__ __volatile__
-        ( "moveb  %1,%0\n\t"
-          "lslw   #8,%0\n\t"
-          "moveb  %1,%0\n\t"
-          : "=&d" (rv)
-          : "d" (c)
-        );
-
-    return( rv );
-}
-
-
-/* ====================================================================== */
-
-/* fbcon_XXX routines - interface used by the world
- *
- * This system is now divided into two levels because of complications
- * caused by hardware scrolling. Top level functions:
- *
- *    fbcon_bmove(), fbcon_clear(), fbcon_putc()
- *
- * handles y values in range [0, scr_height-1] that correspond to real
- * screen positions. y_wrap shift means that first line of bitmap may be
- * anywhere on this display. These functions convert lineoffsets to
- * bitmap offsets and deal with the wrap-around case by splitting blits.
- *
- *    fbcon_bmove_physical_8()   -- These functions fast implementations
- *    fbcon_clear_physical_8()   -- of original fbcon_XXX fns.
- *    fbcon_putc_physical_8()    -- (fontwidth != 8) may be added later
- *
- * WARNING:
- *
- * At the moment fbcon_putc() cannot blit across vertical wrap boundary
- * Implies should only really hardware scroll in rows. Only reason for
- * restriction is simplicity & efficiency at the moment.
- */
-
-static __inline__ int real_y(struct display *p, int yy)
-{
-   int rows = p->vrows;
-
-   yy += p->yscroll;
-   return(yy < rows ? yy : yy-rows);
-}
-
-
-static int fbcon_clear(struct vc_data *conp, int sy, int sx, int height,
-                       int width)
-{
-   int unit = conp->vc_num;
-   struct display *p = &disp[unit];
-   u_int y_break;
-
-   if (!p->can_soft_blank && console_blanked)
-      return(0);
-
-   if ((sy <= p->cursor_y) && (p->cursor_y < sy+height) &&
-       (sx <= p->cursor_x) && (p->cursor_x < sx+width))
-      CURSOR_UNDRAWN();
-
-   /* Split blits that cross physical y_wrap boundary */
-
-   y_break = p->vrows-p->yscroll;
-   if (sy < y_break && sy+height-1 >= y_break) {
-      u_int b = y_break-sy;
-      p->dispsw->clear(conp, p, real_y(p, sy), sx, b, width);
-      p->dispsw->clear(conp, p, real_y(p, sy+b), sx, height-b, width);
-   } else
-      p->dispsw->clear(conp, p, real_y(p, sy), sx, height, width);
-
-   return(0);
-}
-
-
-static int fbcon_putc(struct vc_data *conp, int c, int yy, int xx)
-{
-   int unit = conp->vc_num;
-   struct display *p = &disp[unit];
-
-   if (!p->can_soft_blank && console_blanked)
-      return(0);
-
-   if ((p->cursor_x == xx) && (p->cursor_y == yy))
-       CURSOR_UNDRAWN();
-
-   p->dispsw->putc(conp, p, c, real_y(p, yy), xx);
-
-   return(0);
-}
-
-
-static int fbcon_putcs(struct vc_data *conp, const char *s, int count, int yy,
-                       int xx)
-{
-   int unit = conp->vc_num;
-   struct display *p = &disp[unit];
-
-   if (!p->can_soft_blank && console_blanked)
-      return(0);
-
-   if ((p->cursor_y == yy) && (xx <= p->cursor_x) && (p->cursor_x < xx+count))
-      CURSOR_UNDRAWN();
-
-   p->dispsw->putcs(conp, p, s, count, real_y(p, yy), xx);
-
-   return(0);
-}
-
-
-static int fbcon_cursor(struct vc_data *conp, int mode)
-{
-   int unit = conp->vc_num;
-   struct display *p = &disp[unit];
-
-   /* Avoid flickering if there's no real change. */
-   if (p->cursor_x == conp->vc_x && p->cursor_y == conp->vc_y &&
-       (mode == CM_ERASE) == !cursor_on)
-      return 0;
-   if (CURSOR_UNDRAWN ())
-      p->dispsw->rev_char(p, p->cursor_x, real_y(p, p->cursor_y));
-   p->cursor_x = conp->vc_x;
-   p->cursor_y = conp->vc_y;
-
-   switch (mode) {
-      case CM_ERASE:
-         cursor_on = 0;
-         break;
-
-      case CM_MOVE:
-      case CM_DRAW:
-         vbl_cursor_cnt = CURSOR_DRAW_DELAY;
-         cursor_on = 1;
-         break;
-   }
-
-   return(0);
-}
-
-
-static void fbcon_vbl_handler(int irq, void *dummy, struct pt_regs *fp)
-{
-   struct display *p;
-
-   if (!cursor_on)
-      return;
-
-   if (vbl_cursor_cnt && --vbl_cursor_cnt == 0) {
-      /* Here no check is possible for console changing. The console
-       * switching code should set vbl_cursor_cnt to an appropriate value.
-       */
-      p = &disp[fg_console];
-      p->dispsw->rev_char(p, p->cursor_x, real_y(p, p->cursor_y));
-      cursor_drawn ^= 1;
-      vbl_cursor_cnt = cursor_blink_rate;
-   }
-}
-
-
-static __inline__ void ywrap_up(int unit, struct display *p, int count)
-{
-   p->yscroll += count;
-   if (p->yscroll >= p->vrows)	/* Deal with wrap */
-      p->yscroll -= p->vrows;
-   p->var.xoffset = 0;
-   p->var.yoffset = p->yscroll*p->fontheight;
-   p->var.vmode |= FB_VMODE_YWRAP;
-   fb_info->updatevar(unit);
-}
-
-
-static __inline__ void ywrap_down(int unit, struct display *p, int count)
-{
-   p->yscroll -= count;
-   if (p->yscroll < 0)		/* Deal with wrap */
-      p->yscroll += p->vrows;
-   p->var.xoffset = 0;
-   p->var.yoffset = p->yscroll*p->fontheight;
-   p->var.vmode |= FB_VMODE_YWRAP;
-   fb_info->updatevar(unit);
-}
-
-
-static __inline__ void ypan_up(int unit, struct vc_data *conp,
-			       struct display *p, int count)
-{
-   p->yscroll += count;
-   if (p->yscroll+conp->vc_rows > p->vrows) {
-      p->dispsw->bmove(p, p->yscroll, 0, 0, 0, conp->vc_rows-count,
-		       conp->vc_cols);
-      p->yscroll = 0;
-   }
-   p->var.xoffset = 0;
-   p->var.yoffset = p->yscroll*p->fontheight;
-   p->var.vmode &= ~FB_VMODE_YWRAP;
-   fb_info->updatevar(unit);
-}
-
-
-static __inline__ void ypan_down(int unit, struct vc_data *conp,
-				 struct display *p, int count)
-{
-   p->yscroll -= count;
-   if (p->yscroll < 0) {
-      p->yscroll = p->vrows-conp->vc_rows;
-      p->dispsw->bmove(p, 0, 0, p->yscroll+count, 0, conp->vc_rows-count,
-		       conp->vc_cols);
-   }
-   p->var.xoffset = 0;
-   p->var.yoffset = p->yscroll*p->fontheight;
-   p->var.vmode &= ~FB_VMODE_YWRAP;
-   fb_info->updatevar(unit);
-}
-
-
-static int fbcon_scroll(struct vc_data *conp, int t, int b, int dir, int count)
-{
-   int unit = conp->vc_num;
-   struct display *p = &disp[unit];
-
-   if (!p->can_soft_blank && console_blanked)
-      return(0);
-
-   fbcon_cursor(conp, CM_ERASE);
-
-   /*
-    * ++Geert: Only use ywrap/ypan if the console is in text mode
-    */
-
-   switch (dir) {
-      case SM_UP:
-	 if (count > conp->vc_rows)	/* Maximum realistic size */
-	    count = conp->vc_rows;
-	 if (vt_cons[unit]->vc_mode == KD_TEXT)
-	    switch (p->scrollmode) {
-	       case SCROLL_YWRAP:
-		  if (b-t-count > 3*conp->vc_rows>>2) {
-		     if (t > 0)
-			fbcon_bmove(conp, 0, 0, count, 0, t, conp->vc_cols);
-		     ywrap_up(unit, p, count);
-		     if (conp->vc_rows-b > 0)
-			fbcon_bmove(conp, b-count, 0, b, 0, conp->vc_rows-b,
-				    conp->vc_cols);
-		  } else
-		     fbcon_bmove(conp, t+count, 0, t, 0, b-t-count,
-				 conp->vc_cols);
-		  fbcon_clear(conp, b-count, 0, count, conp->vc_cols);
-		  break;
-
-	       case SCROLL_YPAN:
-		  if (b-t-count > 3*conp->vc_rows>>2) {
-		     if (t > 0)
-			fbcon_bmove(conp, 0, 0, count, 0, t, conp->vc_cols);
-		     ypan_up(unit, conp, p, count);
-		     if (conp->vc_rows-b > 0)
-			fbcon_bmove(conp, b-count, 0, b, 0, conp->vc_rows-b,
-				    conp->vc_cols);
-		  } else
-		     fbcon_bmove(conp, t+count, 0, t, 0, b-t-count,
-				 conp->vc_cols);
-		  fbcon_clear(conp, b-count, 0, count, conp->vc_cols);
-		  break;
-
-	       case SCROLL_YMOVE:
-		  p->dispsw->bmove(p, t+count, 0, t, 0, b-t-count,
-				   conp->vc_cols);
-		  p->dispsw->clear(conp, p, b-count, 0, count, conp->vc_cols);
-		  break;
-	    }
-	 else {
-	    fbcon_bmove(conp, t+count, 0, t, 0, b-t-count, conp->vc_cols);
-	    fbcon_clear(conp, b-count, 0, count, conp->vc_cols);
-	 }
-         break;
-
-      case SM_DOWN:
-	 if (count > conp->vc_rows)	/* Maximum realistic size */
-	    count = conp->vc_rows;
-	 if (vt_cons[unit]->vc_mode == KD_TEXT)
-	    switch (p->scrollmode) {
-	       case SCROLL_YWRAP:
-		  if (b-t-count > 3*conp->vc_rows>>2) {
-		     if (conp->vc_rows-b > 0)
-			fbcon_bmove(conp, b, 0, b-count, 0, conp->vc_rows-b,
-				    conp->vc_cols);
-		     ywrap_down(unit, p, count);
-		     if (t > 0)
-			fbcon_bmove(conp, count, 0, 0, 0, t, conp->vc_cols);
-		  } else
-		     fbcon_bmove(conp, t, 0, t+count, 0, b-t-count,
-				 conp->vc_cols);
-		  fbcon_clear(conp, t, 0, count, conp->vc_cols);
-		  break;
-
-	       case SCROLL_YPAN:
-		  if (b-t-count > 3*conp->vc_rows>>2) {
-		     if (conp->vc_rows-b > 0)
-			fbcon_bmove(conp, b, 0, b-count, 0, conp->vc_rows-b,
-				    conp->vc_cols);
-		     ypan_down(unit, conp, p, count);
-		     if (t > 0)
-			fbcon_bmove(conp, count, 0, 0, 0, t, conp->vc_cols);
-		  } else
-		     fbcon_bmove(conp, t, 0, t+count, 0, b-t-count,
-				 conp->vc_cols);
-		  fbcon_clear(conp, t, 0, count, conp->vc_cols);
-		  break;
-
-	       case SCROLL_YMOVE:
-		  p->dispsw->bmove(p, t, 0, t+count, 0, b-t-count,
-				   conp->vc_cols);
-		  p->dispsw->clear(conp, p, t, 0, count, conp->vc_cols);
-		  break;
-	    }
-	 else {
-	    /*
-	     * Fixed bmove() should end Arno's frustration with copying?
-	     * Confucius says:
-	     *    Man who copies in wrong direction, end up with trashed data
-	     */
-	    fbcon_bmove(conp, t, 0, t+count, 0, b-t-count, conp->vc_cols);
-	    fbcon_clear(conp, t, 0, count, conp->vc_cols);
-	 }
-         break;
-
-      case SM_LEFT:
-         fbcon_bmove(conp, 0, t+count, 0, t, conp->vc_rows, b-t-count);
-         fbcon_clear(conp, 0, b-count, conp->vc_rows, count);
-         break;
-
-      case SM_RIGHT:
-         fbcon_bmove(conp, 0, t, 0, t+count, conp->vc_rows, b-t-count);
-         fbcon_clear(conp, 0, t, conp->vc_rows, count);
-         break;
-   }
-
-   return(0);
-}
-
-
-static int fbcon_bmove(struct vc_data *conp, int sy, int sx, int dy, int dx,
-                       int height, int width)
-{
-   int unit = conp->vc_num;
-   struct display *p = &disp[unit];
-
-   if (!p->can_soft_blank && console_blanked)
-      return(0);
-
-   if (((sy <= p->cursor_y) && (p->cursor_y < sy+height) &&
-        (sx <= p->cursor_x) && (p->cursor_x < sx+width)) ||
-       ((dy <= p->cursor_y) && (p->cursor_y < dy+height) &&
-        (dx <= p->cursor_x) && (p->cursor_x < dx+width)))
-      fbcon_cursor(conp, CM_ERASE);
-
-   /* Split blits that cross physical y_wrap case.
-    * Pathological case involves 4 blits, better to use recursive
-    * code rather than unrolled case
-    *
-    * Recursive invocations don't need to erase the cursor over and
-    * over again, so we use fbcon_bmove_rec()
-    */
-   fbcon_bmove_rec(p, sy, sx, dy, dx, height, width, p->vrows-p->yscroll);
-
-   return(0);
-}
-
-
-static void fbcon_bmove_rec(struct display *p, int sy, int sx, int dy, int dx,
-                            int height, int width, u_int y_break)
-{
-   u_int b;
-
-   if (sy < y_break && sy+height > y_break) {
-      b = y_break-sy;
-      if (dy < sy) {       /* Avoid trashing self */
-         fbcon_bmove_rec(p, sy, sx, dy, dx, b, width, y_break);
-         fbcon_bmove_rec(p, sy+b, sx, dy+b, dx, height-b, width, y_break);
-      } else {
-         fbcon_bmove_rec(p, sy+b, sx, dy+b, dx, height-b, width, y_break);
-         fbcon_bmove_rec(p, sy, sx, dy, dx, b, width, y_break);
-      }
-      return;
-   }
-
-   if (dy < y_break && dy+height > y_break) {
-      b = y_break-dy;
-      if (dy < sy) {       /* Avoid trashing self */
-         fbcon_bmove_rec(p, sy, sx, dy, dx, b, width, y_break);
-         fbcon_bmove_rec(p, sy+b, sx, dy+b, dx, height-b, width, y_break);
-      } else {
-         fbcon_bmove_rec(p, sy+b, sx, dy+b, dx, height-b, width, y_break);
-         fbcon_bmove_rec(p, sy, sx, dy, dx, b, width, y_break);
-      }
-      return;
-   }
-   p->dispsw->bmove(p, real_y(p, sy), sx, real_y(p, dy), dx, height, width);
-}
-
-
-static int fbcon_switch(struct vc_data *conp)
-{
-   if (fb_info && fb_info->switch_con)
-      (*fb_info->switch_con)(conp->vc_num);
-   return(0);
-}
-
-
-static int fbcon_blank(int blank)
-{
-   struct display *p = &disp[fg_console];
-
-   fbcon_cursor(p->conp, blank ? CM_ERASE : CM_DRAW);
-
-   if (!p->can_soft_blank)
-      if (blank) {
-         if (p->visual == FB_VISUAL_MONO01)
-             mymemset(p->screen_base, p->var.xres_virtual*p->var.yres_virtual*
-                                      p->var.bits_per_pixel>>3);
-          else
-             mymemclear(p->screen_base, p->var.xres_virtual*p->var.yres_virtual*
-                                        p->var.bits_per_pixel>>3);
-         return(0);
-      } else {
-         /* Tell console.c that it has to restore the screen itself */
-         return(1);
-      }
-   (*fb_info->blank)(blank);
-   return(0);
-}
-
-
-static int fbcon_get_font(struct vc_data *conp, int *w, int *h, char *data)
-{
-	int unit = conp->vc_num;
-	struct display *p = &disp[unit];
-	int i, j, size, alloc;
-
-	size = (p->fontwidth+7)/8 * p->fontheight * 256;
-	alloc = (*w+7)/8 * *h * 256;
-	*w = p->fontwidth;
-	*h = p->fontheight;
-   
-	if (alloc < size)
-		/* allocation length not sufficient */
-		return( -ENAMETOOLONG );
-
-	for (i = 0; i < 256; i++)
-		for (j = 0; j < p->fontheight; j++)
-			data[i*32+j] = p->fontdata[i*p->fontheight+j];
-	return( 0 );
-}
-
-
-#define REFCOUNT(fd)	(((int *)(fd))[-1])
-
-static int fbcon_set_font(struct vc_data *conp, int w, int h, char *data)
-{
-	int unit = conp->vc_num;
-	struct display *p = &disp[unit];
-	int i, j, size, userspace = 1, resize;
-	char *old_data = NULL, *new_data;
-
-	if (w < 0)
-		w = p->fontwidth;
-	if (h < 0)
-		h = p->fontheight;
-	
-	if (w == 0) {
-		/* engage predefined font, name in 'data' */
-		char name[MAX_FONT_NAME+1];
-	   
-		if ((i = verify_area( VERIFY_READ, (void *)data, MAX_FONT_NAME )))
-			return i;
-		copy_from_user( name, data, MAX_FONT_NAME );
-		name[sizeof(name)-1] = 0;
-		
-		if (!findsoftfont( name, &w, &h, (u_char **)&data ))
-			return( -ENOENT );
-		userspace = 0;
-	}
-	else if (w == 1) {
-		/* copy font from some other console in 'h'*/
-		struct display *op;
-
-		if (h < 0 || !vc_cons_allocated( h ))
-			return( -ENOTTY );
-		if (h == unit)
-			return( 0 ); /* nothing to do */
-		op = &disp[h];
-		if (op->fontdata == p->fontdata)
-			return( 0 ); /* already the same font... */
-
-		resize = (op->fontwidth != p->fontwidth) ||
-			     (op->fontheight != p->fontheight);
-		if (p->userfont)
-			old_data = p->fontdata;
-		p->fontdata = op->fontdata;
-		w = p->fontwidth = op->fontwidth;
-		h = p->fontheight = op->fontheight;
-		if ((p->userfont = op->userfont))
-			REFCOUNT(p->fontdata)++; /* increment usage counter */
-		goto activate;
-	}
-
-	if (w != 8)
-		/* Currently only fontwidth == 8 supported */
-		return( -ENXIO );
-	
-	resize = (w != p->fontwidth) || (h != p->fontheight);
-	size = (w+7)/8 * h * 256;
-	
-	if (p->userfont)
-		old_data = p->fontdata;
-	
-	if (userspace) {
-		if (!(new_data = kmalloc( sizeof(int)+size, GFP_USER )))
-			return( -ENOMEM );
-		new_data += sizeof(int);
-		REFCOUNT(new_data) = 1; /* usage counter */
-
-		for (i = 0; i < 256; i++)
-			for (j = 0; j < h; j++)
-				new_data[i*h+j] = data[i*32+j];
-
-		p->fontdata = new_data;
-		p->userfont = 1;
-	}
-	else {
-		p->fontdata = data;
-		p->userfont = 0;
-	}
-	p->fontwidth = w;
-	p->fontheight = h;
-
-  activate:
-	if (resize) {
-		p->var.xoffset = p->var.yoffset = p->yscroll = 0;  /* reset wrap/pan */
-		/* Adjust the virtual screen-size to fontheight*rows */
-		p->var.yres_virtual = (p->var.yres/h)*h;
-		p->vrows = p->var.yres_virtual/h;
-		updatescrollmode(p);
-		vc_resize_con( p->var.yres/h, p->var.xres/w, unit );
-	}
-	else if (unit == fg_console)
-		update_screen( unit );
-	
-	if (old_data) {
-		if (--REFCOUNT(old_data) == 0) {
-			kfree( old_data - sizeof(int) );
-		}
-	}
-	
-	return( 0 );
-}
-
-static unsigned short palette_red[16];
-static unsigned short palette_green[16];
-static unsigned short palette_blue[16];
-
-static struct fb_cmap palette_cmap  = {
-    0, 16, palette_red, palette_green, palette_blue, NULL
-};
-
-static int fbcon_set_palette(struct vc_data *conp, unsigned char *table)
-{
-    int unit = conp->vc_num;
-    struct display *p = &disp[unit];
-    int i, j, k;
-    u_char val;
-
-    if (!conp->vc_can_do_color || (!p->can_soft_blank && console_blanked))
-	return(-EINVAL);
-    for (i = j = 0; i < 16; i++) {
-	k = table[i];
-	val = conp->vc_palette[j++];
-	palette_red[k] = (val<<8)|val;
-	val = conp->vc_palette[j++];
-	palette_green[k] = (val<<8)|val;
-	val = conp->vc_palette[j++];
-	palette_blue[k] = (val<<8)|val;
-    }
-    palette_cmap.len = 1<<p->var.bits_per_pixel;
-    if (palette_cmap.len > 16)
-	palette_cmap.len = 16;
-    return(fb_info->setcmap(&palette_cmap, unit));
-}
-
-
-/* ====================================================================== */
-
-/*
- *    Low Level Operations for the various display memory organizations.
- *
- *    Currently only the following organizations are supported here:
- *
- *      - Monochrome
- *      - Color Interleaved Planes  la Amiga
- *      - Color Normal Planes
- *      - Color Interleaved Planes  la Atari (2, 4 and 8 planes)
- *      - Color Packed Pixels (8 and 16 bpp)
- *      - Cybervision Color Packed Pixels (accelerated)
- */
-
-#ifdef CONFIG_FBCON_MONO
-
-   /*
-    *    Monochrome
-    */
-
-static void bmove_mono(struct display *p, int sy, int sx, int dy, int dx,
-                       int height, int width)
-{
-   u_char *src, *dest;
-   u_int rows;
-
-   if (sx == 0 && dx == 0 && width == p->next_line) {
-      src = p->screen_base+sy*p->fontheight*width;
-      dest = p->screen_base+dy*p->fontheight*width;
-      mymemmove(dest, src, height*p->fontheight*width);
-   } else if (dy <= sy) {
-      src = p->screen_base+sy*p->fontheight*p->next_line+sx;
-      dest = p->screen_base+dy*p->fontheight*p->next_line+dx;
-      for (rows = height*p->fontheight; rows--;) {
-         mymemmove(dest, src, width);
-         src += p->next_line;
-         dest += p->next_line;
-      }
-   } else {
-      src = p->screen_base+((sy+height)*p->fontheight-1)*p->next_line+sx;
-      dest = p->screen_base+((dy+height)*p->fontheight-1)*p->next_line+dx;
-      for (rows = height*p->fontheight; rows--;) {
-         mymemmove(dest, src, width);
-         src -= p->next_line;
-         dest -= p->next_line;
-      }
-   }
-}
-
-
-static void clear_mono(struct vc_data *conp, struct display *p, int sy, int sx,
-                       int height, int width)
-{
-   u_char *dest;
-   u_int rows;
-
-   dest = p->screen_base+sy*p->fontheight*p->next_line+sx;
-
-   if (sx == 0 && width == p->next_line)
-      if (attr_reverse(p,conp))
-         mymemset(dest, height*p->fontheight*width);
-      else
-         mymemclear(dest, height*p->fontheight*width);
-   else
-      for (rows = height*p->fontheight; rows--; dest += p->next_line)
-         if (attr_reverse(p,conp))
-            mymemset(dest, width);
-         else
-            mymemclear_small(dest, width);
-}
-
-
-static void putc_mono(struct vc_data *conp, struct display *p, int c, int yy,
-                      int xx)
-{
-   u_char *dest, *cdat;
-   u_int rows, bold, revs, underl;
-   u_char d;
-
-   c &= 0xff;
-
-   dest = p->screen_base + yy*p->fontheight*p->next_line + xx;
-   cdat = p->fontdata+c*p->fontheight;
-   bold = attr_bold(p,conp);
-   revs = attr_reverse(p,conp);
-   underl = attr_underline(p,conp);
-
-   for (rows = p->fontheight; rows--; dest += p->next_line) {
-      d = *cdat++;
-      if (underl && !rows)
-         d = 0xff;
-      else if (bold)
-         d |= d>>1;
-      if (revs)
-         d = ~d;
-      *dest = d;
-   }
-}
-
-
-static void putcs_mono(struct vc_data *conp, struct display *p, const char *s,
-                       int count, int yy, int xx)
-{
-   u_char *dest, *dest0, *cdat;
-   u_int rows, bold, revs, underl;
-   u_char c, d;
-
-   dest0 = p->screen_base + yy*p->fontheight*p->next_line + xx;
-   bold = attr_bold(p,conp);
-   revs = attr_reverse(p,conp);
-   underl = attr_underline(p,conp);
-
-   while (count--) {
-      c = *s++;
-      dest = dest0++;
-      cdat = p->fontdata+c*p->fontheight;
-      for (rows = p->fontheight; rows--; dest += p->next_line) {
-         d = *cdat++;
-         if (underl && !rows)
-            d = 0xff;
-         else if (bold)
-            d |= d>>1;
-         if (revs)
-            d = ~d;
-         *dest = d;
-      }
-   }
-}
-
-
-static void rev_char_mono(struct display *p, int xx, int yy)
-{
-   u_char *dest;
-   u_int rows;
-
-   dest = p->screen_base + yy*p->fontheight*p->next_line + xx;
-   for (rows = p->fontheight; rows--; dest += p->next_line)
-      *dest = ~*dest;
-}
-
-#endif /* CONFIG_FBCON_MONO */
-
-
-/* ====================================================================== */
-
-#ifdef CONFIG_FBCON_ILBM
-
-   /*
-    *    Color Interleaved Planes
-    *
-    *    This code heavily relies on the fact that
-    *
-    *       next_line == interleave == next_plane*bits_per_pixel
-    *
-    *    But maybe it can be merged with the code for normal bitplanes without
-    *    much performance loss?
-    */
-
-static void bmove_ilbm(struct display *p, int sy, int sx, int dy, int dx,
-                       int height, int width)
-{
-   if (sx == 0 && dx == 0 && width == p->next_plane)
-      mymemmove(p->screen_base+dy*p->fontheight*p->next_line,
-		p->screen_base+sy*p->fontheight*p->next_line,
-                height*p->fontheight*p->next_line);
-   else {
-      u_char *src, *dest;
-      u_int i;
-
-      if (dy <= sy) {
-         src = p->screen_base+sy*p->fontheight*p->next_line+sx;
-         dest = p->screen_base+dy*p->fontheight*p->next_line+dx;
-         for (i = p->var.bits_per_pixel*height*p->fontheight; i--;) {
-            mymemmove(dest, src, width);
-            src += p->next_plane;
-            dest += p->next_plane;
-         }
-      } else {
-         src = p->screen_base+(sy+height)*p->fontheight*p->next_line+sx;
-         dest = p->screen_base+(dy+height)*p->fontheight*p->next_line+dx;
-         for (i = p->var.bits_per_pixel*height*p->fontheight; i--;) {
-            src -= p->next_plane;
-            dest -= p->next_plane;
-            mymemmove(dest, src, width);
-         }
-      }
-   }
-}
-
-
-static void clear_ilbm(struct vc_data *conp, struct display *p, int sy, int sx,
-                       int height, int width)
-{
-   u_char *dest;
-   u_int i, rows;
-   int bg, bg0;
-
-   dest = p->screen_base+sy*p->fontheight*p->next_line+sx;
-
-   bg0 = attr_bgcol_ec(p,conp);
-   for (rows = height*p->fontheight; rows--;) {
-      bg = bg0;
-      for (i = p->var.bits_per_pixel; i--; dest += p->next_plane) {
-         if (bg & 1)
-            mymemset(dest, width);
-         else
-            mymemclear(dest, width);
-         bg >>= 1;
-      }
-   }
-}
-
-
-static void putc_ilbm(struct vc_data *conp, struct display *p, int c, int yy,
-                      int xx)
-{
-   u_char *dest, *cdat;
-   u_int rows, i;
-   u_char d;
-   int fg0, bg0, fg, bg;
-
-   c &= 0xff;
-
-   dest = p->screen_base + yy*p->fontheight*p->next_line + xx;
-   cdat = p->fontdata+c*p->fontheight;
-   fg0 = attr_fgcol(p,conp);
-   bg0 = attr_bgcol(p,conp);
-
-   for (rows = p->fontheight; rows--;) {
-      d = *cdat++;
-      fg = fg0;
-      bg = bg0;
-      for (i = p->var.bits_per_pixel; i--; dest += p->next_plane) {
-         if (bg & 1)
-            if (fg & 1)
-               *dest = 0xff;
-            else
-               *dest = ~d;
-         else
-            if (fg & 1)
-               *dest = d;
-            else
-               *dest = 0x00;
-         bg >>= 1;
-         fg >>= 1;
-      }
-   }
-}
-
-
-/*
- *    I split the console character loop in two parts:
- *
- *      - slow version: this blits one character at a time
- *
- *      - fast version: this blits 4 characters at a time at a longword aligned
- *                      address, to reduce the number of expensive Chip RAM
- *                      accesses.
- *
- *    Experiments on my A4000/040 revealed that this makes a console
- *    switch on a 640x400 screen with 256 colors about 3 times faster.
- *
- *                                                                Geert
- */
-
-static void putcs_ilbm(struct vc_data *conp, struct display *p, const char *s,
-                       int count, int yy, int xx)
-{
-   u_char *dest0, *dest, *cdat1, *cdat2, *cdat3, *cdat4;
-   u_int rows, i;
-   u_char c1, c2, c3, c4;
-   u_long d;
-   int fg0, bg0, fg, bg;
-
-   dest0 = p->screen_base + yy*p->fontheight*p->next_line + xx;
-   fg0 = attr_fgcol(p,conp);
-   bg0 = attr_bgcol(p,conp);
-
-   while (count--)
-      if (xx & 3 || count < 3) {   /* Slow version */
-         c1 = *s++;
-         dest = dest0++;
-         xx++;
-
-         cdat1 = p->fontdata+c1*p->fontheight;
-         for (rows = p->fontheight; rows--;) {
-            d = *cdat1++;
-            fg = fg0;
-            bg = bg0;
-            for (i = p->var.bits_per_pixel; i--; dest += p->next_plane) {
-               if (bg & 1)
-                  if (fg & 1)
-                     *dest = 0xff;
-                  else
-                     *dest = ~d;
-               else
-                  if (fg & 1)
-                     *dest = d;
-                  else
-                     *dest = 0x00;
-               bg >>= 1;
-               fg >>= 1;
-            }
-         }
-      } else {                      /* Fast version */
-         c1 = s[0];
-         c2 = s[1];
-         c3 = s[2];
-         c4 = s[3];
-
-         dest = dest0;
-         cdat1 = p->fontdata+c1*p->fontheight;
-         cdat2 = p->fontdata+c2*p->fontheight;
-         cdat3 = p->fontdata+c3*p->fontheight;
-         cdat4 = p->fontdata+c4*p->fontheight;
-         for (rows = p->fontheight; rows--;) {
-            d = *cdat1++<<24 | *cdat2++<<16 | *cdat3++<<8 | *cdat4++;
-            fg = fg0;
-            bg = bg0;
-            for (i = p->var.bits_per_pixel; i--; dest += p->next_plane) {
-               if (bg & 1)
-                  if (fg & 1)
-                     *(u_long *)dest = 0xffffffff;
-                  else
-                     *(u_long *)dest = ~d;
-               else
-                  if (fg & 1)
-                     *(u_long *)dest = d;
-                  else
-                     *(u_long *)dest = 0x00000000;
-               bg >>= 1;
-               fg >>= 1;
-            }
-         }
-         s += 4;
-         dest0 += 4;
-         xx += 4;
-         count -= 3;
-      }
-}
-
-
-static void rev_char_ilbm(struct display *p, int xx, int yy)
-{
-   u_char *dest, *dest0;
-   u_int rows, i;
-   int mask;
-
-   dest0 = p->screen_base + yy*p->fontheight*p->next_line + xx;
-   mask = p->fgcol ^ p->bgcol;
-
-   /*
-    *    This should really obey the individual character's
-    *    background and foreground colors instead of simply
-    *    inverting.
-    */
-
-   for (i = p->var.bits_per_pixel; i--; dest0 += p->next_plane) {
-      if (mask & 1) {
-         dest = dest0;
-         for (rows = p->fontheight; rows--; dest += p->next_line)
-            *dest = ~*dest;
-      }
-      mask >>= 1;
-   }
-}
-
-#endif /* CONFIG_FBCON_ILBM */
-
-
-/* ====================================================================== */
-
-#ifdef CONFIG_FBCON_PLANES
-
-   /*
-    *    Color Planes
-    */
-
-static void bmove_plan(struct display *p, int sy, int sx, int dy, int dx,
-                       int height, int width)
-{
-   u_char *src, *dest, *src0, *dest0;
-   u_int i, rows;
-
-   if (sx == 0 && dx == 0 && width == p->next_line) {
-      src = p->screen_base+sy*p->fontheight*width;
-      dest = p->screen_base+dy*p->fontheight*width;
-      for (i = p->var.bits_per_pixel; i--;) {
-         mymemmove(dest, src, height*p->fontheight*width);
-         src += p->next_plane;
-         dest += p->next_plane;
-      }
-   } else if (dy <= sy) {
-      src0 = p->screen_base+sy*p->fontheight*p->next_line+sx;
-      dest0 = p->screen_base+dy*p->fontheight*p->next_line+dx;
-      for (i = p->var.bits_per_pixel; i--;) {
-         src = src0;
-         dest = dest0;
-         for (rows = height*p->fontheight; rows--;) {
-            mymemmove(dest, src, width);
-            src += p->next_line;
-            dest += p->next_line;
-         }
-         src0 += p->next_plane;
-         dest0 += p->next_plane;
-      }
-   } else {
-      src0 = p->screen_base+(sy+height)*p->fontheight*p->next_line+sx;
-      dest0 = p->screen_base+(dy+height)*p->fontheight*p->next_line+dx;
-      for (i = p->var.bits_per_pixel; i--;) {
-         src = src0;
-         dest = dest0;
-         for (rows = height*p->fontheight; rows--;) {
-            src -= p->next_line;
-            dest -= p->next_line;
-            mymemmove(dest, src, width);
-         }
-         src0 += p->next_plane;
-         dest0 += p->next_plane;
-      }
-   }
-}
-
-
-static void clear_plan(struct vc_data *conp, struct display *p, int sy, int sx,
-                       int height, int width)
-{
-   u_char *dest, *dest0;
-   u_int i, rows;
-   int bg;
-
-   dest0 = p->screen_base+sy*p->fontheight*p->next_line+sx;
-
-   bg = attr_bgcol_ec(p,conp);
-   for (i = p->var.bits_per_pixel; i--; dest0 += p->next_plane) {
-      dest = dest0;
-      for (rows = height*p->fontheight; rows--; dest += p->next_line)
-         if (bg & 1)
-            mymemset(dest, width);
-         else
-            mymemclear(dest, width);
-      bg >>= 1;
-   }
-}
-
-
-static void putc_plan(struct vc_data *conp, struct display *p, int c, int yy,
-                      int xx)
-{
-   u_char *dest, *dest0, *cdat, *cdat0;
-   u_int rows, i;
-   u_char d;
-   int fg, bg;
-
-   c &= 0xff;
-
-   dest0 = p->screen_base + yy*p->fontheight*p->next_line + xx;
-   cdat0 = p->fontdata+c*p->fontheight;
-   fg = attr_fgcol(p,conp);
-   bg = attr_bgcol(p,conp);
-
-   for (i = p->var.bits_per_pixel; i--; dest0 += p->next_plane) {
-      dest = dest0;
-      cdat = cdat0;
-      for (rows = p->fontheight; rows--; dest += p->next_line) {
-         d = *cdat++;
-         if (bg & 1)
-            if (fg & 1)
-               *dest = 0xff;
-            else
-               *dest = ~d;
-         else
-            if (fg & 1)
-               *dest = d;
-            else
-               *dest = 0x00;
-      }
-      bg >>= 1;
-      fg >>= 1;
-   }
-}
-
-
-/*
- *    I split the console character loop in two parts
- *    (cfr. fbcon_putcs_ilbm())
- */
-
-static void putcs_plan(struct vc_data *conp, struct display *p, const char *s,
-                       int count, int yy, int xx)
-{
-   u_char *dest, *dest0, *dest1;
-   u_char *cdat1, *cdat2, *cdat3, *cdat4, *cdat10, *cdat20, *cdat30, *cdat40;
-   u_int rows, i;
-   u_char c1, c2, c3, c4;
-   u_long d;
-   int fg0, bg0, fg, bg;
-
-   dest0 = p->screen_base + yy*p->fontheight*p->next_line + xx;
-   fg0 = attr_fgcol(p,conp);
-   bg0 = attr_bgcol(p,conp);
-
-   while (count--)
-      if (xx & 3 || count < 3) {   /* Slow version */
-         c1 = *s++;
-         dest1 = dest0++;
-         xx++;
-
-         cdat10 = p->fontdata+c1*p->fontheight;
-         fg = fg0;
-         bg = bg0;
-
-         for (i = p->var.bits_per_pixel; i--; dest1 += p->next_plane) {
-            dest = dest1;
-            cdat1 = cdat10;
-            for (rows = p->fontheight; rows--; dest += p->next_line) {
-               d = *cdat1++;
-               if (bg & 1)
-                  if (fg & 1)
-                     *dest = 0xff;
-                  else
-                     *dest = ~d;
-               else
-                  if (fg & 1)
-                     *dest = d;
-                  else
-                     *dest = 0x00;
-            }
-            bg >>= 1;
-            fg >>= 1;
-         }
-      } else {                      /* Fast version */
-         c1 = s[0];
-         c2 = s[1];
-         c3 = s[2];
-         c4 = s[3];
-
-         dest1 = dest0;
-         cdat10 = p->fontdata+c1*p->fontheight;
-         cdat20 = p->fontdata+c2*p->fontheight;
-         cdat30 = p->fontdata+c3*p->fontheight;
-         cdat40 = p->fontdata+c4*p->fontheight;
-         fg = fg0;
-         bg = bg0;
-
-         for (i = p->var.bits_per_pixel; i--; dest1 += p->next_plane) {
-            dest = dest1;
-            cdat1 = cdat10;
-            cdat2 = cdat20;
-            cdat3 = cdat30;
-            cdat4 = cdat40;
-            for (rows = p->fontheight; rows--; dest += p->next_line) {
-               d = *cdat1++<<24 | *cdat2++<<16 | *cdat3++<<8 | *cdat4++;
-               if (bg & 1)
-                  if (fg & 1)
-                     *(u_long *)dest = 0xffffffff;
-                  else
-                     *(u_long *)dest = ~d;
-               else
-                  if (fg & 1)
-                     *(u_long *)dest = d;
-                  else
-                     *(u_long *)dest = 0x00000000;
-            }
-            bg >>= 1;
-            fg >>= 1;
-         }
-         s += 4;
-         dest0 += 4;
-         xx += 4;
-         count -= 3;
-      }
-}
-
-
-static void rev_char_plan(struct display *p, int xx, int yy)
-{
-   u_char *dest, *dest0;
-   u_int rows, i;
-   int mask;
-
-   dest0 = p->screen_base + yy*p->fontheight*p->next_line + xx;
-   mask = p->fgcol ^ p->bgcol;
-
-   /*
-    *    This should really obey the individual character's
-    *    background and foreground colors instead of simply
-    *    inverting.
-    */
-
-   for (i = p->var.bits_per_pixel; i--; dest0 += p->next_plane) {
-      if (mask & 1) {
-         dest = dest0;
-         for (rows = p->fontheight; rows--; dest += p->next_line)
-            *dest = ~*dest;
-      }
-      mask >>= 1;
-   }
-}
-
-#endif /* CONFIG_FBCON_PLANES */
-
-
-/* ====================================================================== */
-
-#ifdef CONFIG_FBCON_2PLANE
-
-   /*
-    *    2 Planes (2-bytes interleave)
-    */
-
-/* Increment/decrement 2 plane addresses */
-
-#define	INC_2P(p)	do { if (!((long)(++(p)) & 1)) (p) += 2; } while(0)
-#define	DEC_2P(p)	do { if ((long)(--(p)) & 1) (p) -= 2; } while(0)
-
-/* Convert a standard 4 bit color to our 2 bit color assignment:
- * If at least two RGB channels are active, the low bit is turned on;
- * The intensity bit (b3) is shifted into b1.
- */
-
-#define	COLOR_2P(c)	(((c & 7) >= 3 && (c & 7) != 4) | (c & 8) >> 2)
-
-
-static void bmove_2_plane(struct display *p, int sy, int sx, int dy, int dx,
-                          int height, int width)
-{
-	/* bmove() has to distinguish two major cases: If both, source and
-	 * destination, start at even addresses or both are at odd
-	 * addresses, just the first odd and last even column (if present)
-	 * require special treatment (memmove_col()). The rest between
-	 * then can be copied by normal operations, because all adjacent
-	 * bytes are affected and are to be stored in the same order.
-	 *   The pathological case is when the move should go from an odd
-	 * address to an even or vice versa. Since the bytes in the plane
-	 * words must be assembled in new order, it seems wisest to make
-	 * all movements by memmove_col().
-	 */
-
-    if (sx == 0 && dx == 0 && width == p->next_line/2) {
-		/* Special (but often used) case: Moving whole lines can be
-		 * done with memmove()
-		 */
-		mymemmove(p->screen_base + dy * p->next_line * p->fontheight,
-			  p->screen_base + sy * p->next_line * p->fontheight,
-			  p->next_line * height * p->fontheight);
-    } else {
-        int rows, cols;
-        u_char *src;
-        u_char *dst;
-        int bytes = p->next_line;
-        int linesize = bytes * p->fontheight;
-		       u_int colsize  = height * p->fontheight;
-		       u_int upwards  = (dy < sy) || (dy == sy && dx < sx);
-
-		if ((sx & 1) == (dx & 1)) {
-			/* odd->odd or even->even */
-
-			if (upwards) {
-
-				src = p->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1);
-				dst = p->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1);
-
-				if (sx & 1) {
-					memmove_2p_col(dst, src, colsize, bytes);
-					src += 3;
-					dst += 3;
-					--width;
-				}
-
-				if (width > 1) {
-					for(rows = colsize; rows > 0; --rows) {
-						mymemmove(dst, src, (width>>1)*4);
-						src += bytes;
-						dst += bytes;
-					}
-				}
-
-				if (width & 1) {
-					src -= colsize * bytes;
-					dst -= colsize * bytes;
-					memmove_2p_col(dst + (width>>1)*4, src + (width>>1)*4,
-									colsize, bytes);
-				}
-			}
-			else {
-
-				if (!((sx+width-1) & 1)) {
-					src = p->screen_base + sy * linesize + ((sx+width-1)>>1)*4;
-					dst = p->screen_base + dy * linesize + ((dx+width-1)>>1)*4;
-					memmove_2p_col(dst, src, colsize, bytes);
-					--width;
-				}
-
-				src = p->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1);
-				dst = p->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1);
-
-				if (width > 1) {
-					src += colsize * bytes + (sx & 1)*3;
-					dst += colsize * bytes + (sx & 1)*3;
-					for(rows = colsize; rows > 0; --rows) {
-						src -= bytes;
-						dst -= bytes;
-						mymemmove(dst, src, (width>>1)*4);
-					}
-				}
-
-				if (width & 1) {
-					memmove_2p_col(dst-3, src-3, colsize, bytes);
-				}
-
-			}
-		}
-		else {
-			/* odd->even or even->odd */
-
-			if (upwards) {
-				src = p->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1);
-				dst = p->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1);
-				for(cols = width; cols > 0; --cols) {
-					memmove_2p_col(dst, src, colsize, bytes);
-					INC_2P(src);
-					INC_2P(dst);
-				}
-			}
-			else {
-				sx += width-1;
-				dx += width-1;
-				src = p->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1);
-				dst = p->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1);
-				for(cols = width; cols > 0; --cols) {
-					memmove_2p_col(dst, src, colsize, bytes);
-					DEC_2P(src);
-					DEC_2P(dst);
-				}
-			}
-		}
-
-
-    }
-}
-
-
-static void clear_2_plane(struct vc_data *conp, struct display *p, int sy,
-                          int sx, int height, int width)
-{
-    ulong offset;
-    u_char *start;
-    int rows;
-    int bytes = p->next_line;
-    int lines = height * p->fontheight;
-    ulong  size;
-    u_long          cval;
-    u_short			pcval;
-
-    cval = expand2l (COLOR_2P (attr_bgcol_ec(p,conp)));
-
-    if (sx == 0 && width == bytes/2) {
-
-        offset = sy * bytes * p->fontheight;
-        size   = lines * bytes;
-		memset_even_2p(p->screen_base+offset, size, cval);
-
-    } else {
-
-        offset = (sy * bytes * p->fontheight) + (sx>>1)*4 + (sx & 1);
-		start = p->screen_base + offset;
-		pcval = expand2w(COLOR_2P(attr_bgcol_ec(p,conp)));
-
-		/* Clears are split if the region starts at an odd column or
-		 * end at an even column. These extra columns are spread
-		 * across the interleaved planes. All in between can be
-		 * cleared by normal mymemclear_small(), because both bytes of
-		 * the single plane words are affected.
-		 */
-
-		if (sx & 1) {
-			memclear_2p_col(start, lines, pcval, bytes);
-			start += 3;
-			width--;
-		}
-
-		if (width & 1) {
-			memclear_2p_col(start + (width>>1)*4, lines, pcval, bytes);
-			width--;
-		}
-
-		if (width) {
-			for(rows = lines; rows-- ; start += bytes)
-				memset_even_2p(start, width*2, cval);
-		}
-    }
-}
-
-
-static void putc_2_plane(struct vc_data *conp, struct display *p, int
-			 c, int yy, int xx)
-{
-	u_char   *dest;
-	u_char   *cdat;
-	int rows;
-	int bytes = p->next_line;
-	ulong    eorx, fgx, bgx, fdx;
-
-	c &= 0xff;
-
-	dest  = p->screen_base + yy * p->fontheight * bytes +
-		(xx >> 1)*4 + (xx & 1);
-	cdat  = p->fontdata + (c * p->fontheight);
-
-	fgx   = expand2w(COLOR_2P(attr_fgcol(p,conp)));
-	bgx   = expand2w(COLOR_2P(attr_bgcol(p,conp)));
-	eorx  = fgx ^ bgx;
-
-	for(rows = p->fontheight ; rows-- ; dest += bytes) {
-		fdx = dup2w(*cdat++);
-		__asm__ __volatile__ ("movepw %1,%0@(0)" : /* no outputs */
-				      : "a" (dest), "d" ((fdx & eorx) ^ bgx));
-	}
-}
-
-
-static void putcs_2_plane(struct vc_data *conp, struct display *p,
-                          const char *s, int count, int yy, int xx)
-{
-	u_char   *dest, *dest0;
-	u_char   *cdat, c;
-	int rows;
-	int bytes;
-	ulong    eorx, fgx, bgx, fdx;
-
-	bytes = p->next_line;
-	dest0 = p->screen_base + yy * p->fontheight * bytes
-		+ (xx >> 1)*4 + (xx & 1);
-	fgx   = expand2w(COLOR_2P(attr_fgcol(p,conp)));
-	bgx   = expand2w(COLOR_2P(attr_bgcol(p,conp)));
-	eorx  = fgx ^ bgx;
-
-	while (count--) {
-
-		c = *s++;
-		cdat  = p->fontdata + (c * p->fontheight);
-
-		for(rows = p->fontheight, dest = dest0; rows-- ; dest += bytes) {
-			fdx = dup2w(*cdat++);
-			__asm__ __volatile__ ("movepw %1,%0@(0)" : /* no outputs */
-					      : "a" (dest), "d" ((fdx & eorx) ^ bgx));
-		}
-		INC_2P(dest0);
-	}
-}
-
-
-static void rev_char_2_plane(struct display *p, int xx, int yy)
-{
-	u_char *dest;
-	int j;
-	int bytes;
-
-	dest = p->screen_base + yy * p->fontheight * p->next_line +
-		(xx >> 1)*4 + (xx & 1);
-	j = p->fontheight;
-	bytes = p->next_line;
-	while (j--)
-	{
-		/* This should really obey the individual character's
-		 * background and foreground colors instead of simply
-		 * inverting.
-		 */
-		dest[0] = ~dest[0];
-		dest[2] = ~dest[2];
-		dest += bytes;
-	}
-}
-#endif /* CONFIG_FBCON_2PLANE */
-
-
-/* ====================================================================== */
-
-#ifdef CONFIG_FBCON_4PLANE
-
-   /*
-    *    4 Planes (2-bytes interleave)
-    */
-
-/* Increment/decrement 4 plane addresses */
-
-#define	INC_4P(p)	do { if (!((long)(++(p)) & 1)) (p) += 6; } while(0)
-#define	DEC_4P(p)	do { if ((long)(--(p)) & 1) (p) -= 6; } while(0)
-
-
-static void bmove_4_plane(struct display *p, int sy, int sx, int dy, int dx,
-                          int height, int width)
-{
-	/* bmove() has to distinguish two major cases: If both, source and
-	 * destination, start at even addresses or both are at odd
-	 * addresses, just the first odd and last even column (if present)
-	 * require special treatment (memmove_col()). The rest between
-	 * then can be copied by normal operations, because all adjacent
-	 * bytes are affected and are to be stored in the same order.
-	 *   The pathological case is when the move should go from an odd
-	 * address to an even or vice versa. Since the bytes in the plane
-	 * words must be assembled in new order, it seems wisest to make
-	 * all movements by memmove_col().
-	 */
-
-    if (sx == 0 && dx == 0 && width == p->next_line/4) {
-		/* Special (but often used) case: Moving whole lines can be
-		 * done with memmove()
-		 */
-		mymemmove(p->screen_base + dy * p->next_line * p->fontheight,
-			  p->screen_base + sy * p->next_line * p->fontheight,
-			  p->next_line * height * p->fontheight);
-    } else {
-        int rows, cols;
-        u_char *src;
-        u_char *dst;
-        int bytes = p->next_line;
-        int linesize = bytes * p->fontheight;
-		       u_int colsize  = height * p->fontheight;
-		       u_int upwards  = (dy < sy) || (dy == sy && dx < sx);
-
-		if ((sx & 1) == (dx & 1)) {
-			/* odd->odd or even->even */
-
-			if (upwards) {
-
-				src = p->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1);
-				dst = p->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1);
-
-				if (sx & 1) {
-					memmove_4p_col(dst, src, colsize, bytes);
-					src += 7;
-					dst += 7;
-					--width;
-				}
-
-				if (width > 1) {
-					for(rows = colsize; rows > 0; --rows) {
-						mymemmove(dst, src, (width>>1)*8);
-						src += bytes;
-						dst += bytes;
-					}
-				}
-
-				if (width & 1) {
-					src -= colsize * bytes;
-					dst -= colsize * bytes;
-					memmove_4p_col(dst + (width>>1)*8, src + (width>>1)*8,
-									colsize, bytes);
-				}
-			}
-			else {
-
-				if (!((sx+width-1) & 1)) {
-					src = p->screen_base + sy * linesize + ((sx+width-1)>>1)*8;
-					dst = p->screen_base + dy * linesize + ((dx+width-1)>>1)*8;
-					memmove_4p_col(dst, src, colsize, bytes);
-					--width;
-				}
-
-				src = p->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1);
-				dst = p->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1);
-
-				if (width > 1) {
-					src += colsize * bytes + (sx & 1)*7;
-					dst += colsize * bytes + (sx & 1)*7;
-					for(rows = colsize; rows > 0; --rows) {
-						src -= bytes;
-						dst -= bytes;
-						mymemmove(dst, src, (width>>1)*8);
-					}
-				}
-
-				if (width & 1) {
-					memmove_4p_col(dst-7, src-7, colsize, bytes);
-				}
-
-			}
-		}
-		else {
-			/* odd->even or even->odd */
-
-			if (upwards) {
-				src = p->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1);
-				dst = p->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1);
-				for(cols = width; cols > 0; --cols) {
-					memmove_4p_col(dst, src, colsize, bytes);
-					INC_4P(src);
-					INC_4P(dst);
-				}
-			}
-			else {
-				sx += width-1;
-				dx += width-1;
-				src = p->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1);
-				dst = p->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1);
-				for(cols = width; cols > 0; --cols) {
-					memmove_4p_col(dst, src, colsize, bytes);
-					DEC_4P(src);
-					DEC_4P(dst);
-				}
-			}
-		}
-
-
-    }
-}
-
-
-static void clear_4_plane(struct vc_data *conp, struct display *p, int sy,
-                          int sx, int height, int width)
-{
-    ulong offset;
-    u_char *start;
-    int rows;
-    int bytes = p->next_line;
-    int lines = height * p->fontheight;
-    ulong  size;
-    u_long          cval1, cval2, pcval;
-
-    expand4dl(attr_bgcol_ec(p,conp), &cval1, &cval2);
-
-    if (sx == 0 && width == bytes/4) {
-
-	offset = sy * bytes * p->fontheight;
-        size   = lines * bytes;
-		memset_even_4p(p->screen_base+offset, size, cval1, cval2);
-
-    } else {
-
-        offset = (sy * bytes * p->fontheight) + (sx>>1)*8 + (sx & 1);
-		start = p->screen_base + offset;
-		pcval = expand4l(attr_bgcol_ec(p,conp));
-
-		/* Clears are split if the region starts at an odd column or
-		 * end at an even column. These extra columns are spread
-		 * across the interleaved planes. All in between can be
-		 * cleared by normal mymemclear_small(), because both bytes of
-		 * the single plane words are affected.
-		 */
-
-		if (sx & 1) {
-			memclear_4p_col(start, lines, pcval, bytes);
-			start += 7;
-			width--;
-		}
-
-		if (width & 1) {
-			memclear_4p_col(start + (width>>1)*8, lines, pcval, bytes);
-			width--;
-		}
-
-		if (width) {
-			for(rows = lines; rows-- ; start += bytes)
-				memset_even_4p(start, width*4, cval1, cval2);
-		}
-    }
-}
-
-
-static void putc_4_plane(struct vc_data *conp, struct display *p, int
-			 c, int yy, int xx)
-{
-	u_char   *dest;
-	u_char   *cdat;
-	int rows;
-	int bytes = p->next_line;
-	ulong	  eorx, fgx, bgx, fdx;
-
-	c &= 0xff;
-
-	dest  = p->screen_base + yy * p->fontheight * bytes +
-		(xx >> 1)*8 + (xx & 1);
-	cdat  = p->fontdata + (c * p->fontheight);
-
-	fgx   = expand4l(attr_fgcol(p,conp));
-	bgx   = expand4l(attr_bgcol(p,conp));
-	eorx  = fgx ^ bgx;
-
-	for(rows = p->fontheight ; rows-- ; dest += bytes) {
-		fdx = dup4l(*cdat++);
-		__asm__ __volatile__ ("movepl %1,%0@(0)" : /* no outputs */
-				      : "a" (dest), "d" ((fdx & eorx) ^ bgx));
-	}
-}
-
-
-static void putcs_4_plane(struct vc_data *conp, struct display *p,
-                          const char *s, int count, int yy, int xx)
-{
-	u_char   *dest, *dest0;
-	u_char   *cdat, c;
-	int rows;
-	int bytes;
-	ulong	  eorx, fgx, bgx, fdx;
-
-	bytes = p->next_line;
-	dest0 = p->screen_base + yy * p->fontheight * bytes
-		+ (xx >> 1)*8 + (xx & 1);
-	fgx   = expand4l(attr_fgcol(p,conp));
-	bgx   = expand4l(attr_bgcol(p,conp));
-	eorx  = fgx ^ bgx;
-
-	while (count--) {
-
-		/* I think, unrolling the loops like in the 1 plane case isn't
-		 * practicable here, because the body is much longer for 4
-		 * planes (mostly the dup4l()). I guess, unrolling this would
-		 * need more than 256 bytes and so exceed the instruction
-		 * cache :-(
-		 */
-
-		c = *s++;
-		cdat  = p->fontdata + (c * p->fontheight);
-
-		for(rows = p->fontheight, dest = dest0; rows-- ; dest += bytes) {
-			fdx = dup4l(*cdat++);
-			__asm__ __volatile__ ("movepl %1,%0@(0)" : /* no outputs */
-					      : "a" (dest), "d" ((fdx & eorx) ^ bgx));
-		}
-		INC_4P(dest0);
-	}
-}
-
-
-static void rev_char_4_plane(struct display *p, int xx, int yy)
-{
-   u_char *dest;
-   int j;
-   int bytes;
-
-   dest = p->screen_base + yy * p->fontheight * p->next_line +
-	   (xx >> 1)*8 + (xx & 1);
-   j = p->fontheight;
-   bytes = p->next_line;
-
-   while (j--)
-     {
-      /* This should really obey the individual character's
-       * background and foreground colors instead of simply
-       * inverting.
-       */
-       dest[0] = ~dest[0];
-       dest[2] = ~dest[2];
-       dest[4] = ~dest[4];
-       dest[6] = ~dest[6];
-       dest += bytes;
-     }
-}
-#endif /* CONFIG_FBCON_4PLANE */
-
-
-/* ====================================================================== */
-
-#ifdef CONFIG_FBCON_8PLANE
-
-   /*
-    *    8 Planes (2-bytes interleave)
-    */
-
-/* In 8 plane mode, 256 colors would be possible, but only the first
- * 16 are used by the console code (the upper 4 bits are
- * background/unused). For that, the following functions mask off the
- * higher 4 bits of each color.
- */
-
-/* Increment/decrement 8 plane addresses */
-
-#define	INC_8P(p)	do { if (!((long)(++(p)) & 1)) (p) += 14; } while(0)
-#define	DEC_8P(p)	do { if ((long)(--(p)) & 1) (p) -= 14; } while(0)
-
-
-static void bmove_8_plane(struct display *p, int sy, int sx, int dy, int dx,
-                          int height, int width)
-{
-	/* bmove() has to distinguish two major cases: If both, source and
-	 * destination, start at even addresses or both are at odd
-	 * addresses, just the first odd and last even column (if present)
-	 * require special treatment (memmove_col()). The rest between
-	 * then can be copied by normal operations, because all adjacent
-	 * bytes are affected and are to be stored in the same order.
-	 *   The pathological case is when the move should go from an odd
-	 * address to an even or vice versa. Since the bytes in the plane
-	 * words must be assembled in new order, it seems wisest to make
-	 * all movements by memmove_col().
-	 */
-
-    if (sx == 0 && dx == 0 && width == p->next_line/8) {
-		/* Special (but often used) case: Moving whole lines can be
-		 * done with memmove()
-		 */
-      fast_memmove (p->screen_base + dy * p->next_line * p->fontheight,
-		    p->screen_base + sy * p->next_line * p->fontheight,
-		    p->next_line * height * p->fontheight);
-    } else {
-        int rows, cols;
-        u_char *src;
-        u_char *dst;
-        int bytes = p->next_line;
-        int linesize = bytes * p->fontheight;
-		       u_int colsize  = height * p->fontheight;
-		       u_int upwards  = (dy < sy) || (dy == sy && dx < sx);
-
-		if ((sx & 1) == (dx & 1)) {
-			/* odd->odd or even->even */
-
-			if (upwards) {
-
-				src = p->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1);
-				dst = p->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1);
-
-				if (sx & 1) {
-					memmove_8p_col(dst, src, colsize, bytes);
-					src += 15;
-					dst += 15;
-					--width;
-				}
-
-				if (width > 1) {
-					for(rows = colsize; rows > 0; --rows) {
-						fast_memmove (dst, src, (width >> 1) * 16);
-						src += bytes;
-						dst += bytes;
-					}
-				}
-
-				if (width & 1) {
-					src -= colsize * bytes;
-					dst -= colsize * bytes;
-					memmove_8p_col(dst + (width>>1)*16, src + (width>>1)*16,
-									colsize, bytes);
-				}
-			}
-			else {
-
-				if (!((sx+width-1) & 1)) {
-					src = p->screen_base + sy * linesize + ((sx+width-1)>>1)*16;
-					dst = p->screen_base + dy * linesize + ((dx+width-1)>>1)*16;
-					memmove_8p_col(dst, src, colsize, bytes);
-					--width;
-				}
-
-				src = p->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1);
-				dst = p->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1);
-
-				if (width > 1) {
-					src += colsize * bytes + (sx & 1)*15;
-					dst += colsize * bytes + (sx & 1)*15;
-					for(rows = colsize; rows > 0; --rows) {
-						src -= bytes;
-						dst -= bytes;
-						fast_memmove (dst, src, (width>>1)*16);
-					}
-				}
-
-				if (width & 1) {
-					memmove_8p_col(dst-15, src-15, colsize, bytes);
-				}
-
-			}
-		}
-		else {
-			/* odd->even or even->odd */
-
-			if (upwards) {
-				src = p->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1);
-				dst = p->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1);
-				for(cols = width; cols > 0; --cols) {
-					memmove_8p_col(dst, src, colsize, bytes);
-					INC_8P(src);
-					INC_8P(dst);
-				}
-			}
-			else {
-				sx += width-1;
-				dx += width-1;
-				src = p->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1);
-				dst = p->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1);
-				for(cols = width; cols > 0; --cols) {
-					memmove_8p_col(dst, src, colsize, bytes);
-					DEC_8P(src);
-					DEC_8P(dst);
-				}
-			}
-		}
-
-
-    }
-}
-
-
-static void clear_8_plane(struct vc_data *conp, struct display *p, int sy,
-                          int sx, int height, int width)
-{
-    ulong offset;
-    u_char *start;
-    int rows;
-    int bytes = p->next_line;
-    int lines = height * p->fontheight;
-    ulong  size;
-    u_long          cval1, cval2, cval3, cval4, pcval1, pcval2;
-
-    expand8ql(attr_bgcol_ec(p,conp), cval1, cval2, cval3, cval4);
-
-    if (sx == 0 && width == bytes/8) {
-
-        offset = sy * bytes * p->fontheight;
-        size   = lines * bytes;
-		memset_even_8p(p->screen_base+offset, size, cval1,
-			       cval2, cval3, cval4);
-
-    } else {
-
-        offset = (sy * bytes * p->fontheight) + (sx>>1)*16 + (sx & 1);
-		start = p->screen_base + offset;
-		expand8dl(attr_bgcol_ec(p,conp), &pcval1, &pcval2);
-
-		/* Clears are split if the region starts at an odd column or
-		 * end at an even column. These extra columns are spread
-		 * across the interleaved planes. All in between can be
-		 * cleared by normal mymemclear_small(), because both bytes of
-		 * the single plane words are affected.
-		 */
-
-		if (sx & 1) {
-			memclear_8p_col(start, lines, pcval1, pcval2, bytes);
-			start += 7;
-			width--;
-		}
-
-		if (width & 1) {
-			memclear_8p_col(start + (width>>1)*16, lines, pcval1,
-							 pcval2, bytes);
-			width--;
-		}
-
-		if (width) {
-			for(rows = lines; rows-- ; start += bytes)
-				memset_even_8p(start, width*8, cval1, cval2, cval3, cval4);
-		}
-    }
-}
-
-
-static void putc_8_plane(struct vc_data *conp, struct display *p, int c, int yy,
-                         int xx)
-{
-	u_char   *dest;
-	u_char   *cdat;
-	int rows;
-	int bytes = p->next_line;
-	ulong	  eorx1, eorx2, fgx1, fgx2, bgx1, bgx2, fdx;
-
-	c &= 0xff;
-
-	dest  = p->screen_base + yy * p->fontheight * bytes +
-		(xx >> 1)*16 + (xx & 1);
-	cdat  = p->fontdata + (c * p->fontheight);
-
-	expand8dl(attr_fgcol(p,conp), &fgx1, &fgx2);
-	expand8dl(attr_bgcol(p,conp), &bgx1, &bgx2);
-	eorx1  = fgx1 ^ bgx1; eorx2  = fgx2 ^ bgx2;
-
-	for(rows = p->fontheight ; rows-- ; dest += bytes) {
-		fdx = dup4l(*cdat++);
-		__asm__ __volatile__
-			("movepl %1,%0@(0)\n\t"
-			 "movepl %2,%0@(8)"
-			 : /* no outputs */
-			 : "a" (dest), "d" ((fdx & eorx1) ^ bgx1),
-			 "d" ((fdx & eorx2) ^ bgx2)
-			);
-	}
-}
-
-
-static void putcs_8_plane(struct vc_data *conp, struct display *p,
-                          const char *s, int count, int yy, int xx)
-{
-	u_char   *dest, *dest0;
-	u_char   *cdat, c;
-	int rows;
-	int bytes;
-	ulong	  eorx1, eorx2, fgx1, fgx2, bgx1, bgx2, fdx;
-
-	bytes = p->next_line;
-	dest0 = p->screen_base + yy * p->fontheight * bytes
-		+ (xx >> 1)*16 + (xx & 1);
-
-	expand8dl(attr_fgcol(p,conp), &fgx1, &fgx2);
-	expand8dl(attr_bgcol(p,conp), &bgx1, &bgx2);
-	eorx1  = fgx1 ^ bgx1; eorx2  = fgx2 ^ bgx2;
-
-	while (count--) {
-
-		/* I think, unrolling the loops like in the 1 plane case isn't
-		 * practicable here, because the body is much longer for 4
-		 * planes (mostly the dup4l()). I guess, unrolling this would
-		 * need more than 256 bytes and so exceed the instruction
-		 * cache :-(
-		 */
-
-		c = *s++;
-		cdat  = p->fontdata + (c * p->fontheight);
-
-		for(rows = p->fontheight, dest = dest0; rows-- ; dest += bytes) {
-			fdx = dup4l(*cdat++);
-			__asm__ __volatile__
-				("movepl %1,%0@(0)\n\t"
-				  "movepl %2,%0@(8)"
-				  : /* no outputs */
-				  : "a" (dest), "d" ((fdx & eorx1) ^ bgx1),
-				  "d" ((fdx & eorx2) ^ bgx2)
-				);
-		}
-		INC_8P(dest0);
-	}
-}
-
-
-static void rev_char_8_plane(struct display *p, int xx, int yy)
-{
-	u_char *dest;
-	int j;
-	int bytes;
-
-	dest = p->screen_base + yy * p->fontheight * p->next_line
-		+ (xx >> 1)*16 + (xx & 1);
-	j = p->fontheight;
-	bytes = p->next_line;
-
-	while (j--)
-	{
-		/* This should really obey the individual character's
-		 * background and foreground colors instead of simply
-		 * inverting. For 8 plane mode, only the lower 4 bits of the
-		 * color are inverted, because only that color registers have
-		 * been set up.
-		 */
-		dest[0] = ~dest[0];
-		dest[2] = ~dest[2];
-		dest[4] = ~dest[4];
-		dest[6] = ~dest[6];
-		dest += bytes;
-	}
-}
-#endif /* CONFIG_FBCON_8PLANE */
-
-
-/* ====================================================================== */
-
-#ifdef CONFIG_FBCON_8PACKED
-
-   /*
-    *    8 bpp Packed Pixels
-    */
-
-static u_long nibbletab_8_packed[]={
-0x00000000,0x000000ff,0x0000ff00,0x0000ffff,
-0x00ff0000,0x00ff00ff,0x00ffff00,0x00ffffff,
-0xff000000,0xff0000ff,0xff00ff00,0xff00ffff,
-0xffff0000,0xffff00ff,0xffffff00,0xffffffff};
-
-static void bmove_8_packed(struct display *p, int sy, int sx, int dy, int dx,
-                           int height, int width)
-{
-	int bytes = p->next_line, linesize = bytes * p->fontheight, rows;
-	u_char *src,*dst;
-
-	if (sx == 0 && dx == 0 && width * 8 == bytes) {
-		mymemmove(p->screen_base + dy * linesize,
-			  p->screen_base + sy * linesize,
-			  height * linesize);
-	}
-	else {
-		if (dy < sy || (dy == sy && dx < sx)) {
-			src = p->screen_base + sy * linesize + sx * 8;
-			dst = p->screen_base + dy * linesize + dx * 8;
-			for (rows = height * p->fontheight ; rows-- ;) {
-				mymemmove(dst, src, width * 8);
-				src += bytes;
-				dst += bytes;
-			}
-		}
-		else {
-			src = p->screen_base + (sy+height) * linesize + sx * 8
-				- bytes;
-			dst = p->screen_base + (dy+height) * linesize + dx * 8
-				- bytes;
-			for (rows = height * p->fontheight ; rows-- ;) {
-				mymemmove(dst, src, width * 8);
-				src -= bytes;
-				dst -= bytes;
-			}
-		}
-	}
-}
-
-
-static void clear_8_packed(struct vc_data *conp, struct display *p, int sy,
-                           int sx, int height, int width)
-{
-	u_char *dest0,*dest;
-	int bytes=p->next_line,lines=height * p->fontheight, rows, i;
-	u_long bgx;
-
-	dest = p->screen_base + sy * p->fontheight * bytes + sx * 8;
-
-	bgx=attr_bgcol_ec(p,conp);
-	bgx |= (bgx << 8);
-	bgx |= (bgx << 16);
-
-	if (sx == 0 && width * 8 == bytes) {
-		for (i = 0 ; i < lines * width ; i++) {
-			((u_long *)dest)[0]=bgx;
-			((u_long *)dest)[1]=bgx;
-			dest+=8;
-		}
-	} else {
-		dest0=dest;
-		for (rows = lines; rows-- ; dest0 += bytes) {
-			dest=dest0;
-			for (i = 0 ; i < width ; i++) {
-				((u_long *)dest)[0]=bgx;
-				((u_long *)dest)[1]=bgx;
-				dest+=8;
-			}
-		}
-	}
-}
-
-
-static void putc_8_packed(struct vc_data *conp, struct display *p, int c,
-			  int yy, int xx)
-{
-	u_char *dest,*cdat;
-	int bytes=p->next_line,rows;
-	ulong eorx,fgx,bgx;
-
-	c &= 0xff;
-
-	dest = p->screen_base + yy * p->fontheight * bytes + xx * 8;
-	cdat = p->fontdata + c * p->fontheight;
-
-	fgx=attr_fgcol(p,conp);
-	bgx=attr_bgcol(p,conp);
-	fgx |= (fgx << 8);
-	fgx |= (fgx << 16);
-	bgx |= (bgx << 8);
-	bgx |= (bgx << 16);
-	eorx = fgx ^ bgx;
-
-	for (rows = p->fontheight ; rows-- ; dest += bytes) {
-		((u_long *)dest)[0]=
-			(nibbletab_8_packed[*cdat >> 4] & eorx) ^ bgx;
-		((u_long *)dest)[1]=
-			(nibbletab_8_packed[*cdat++ & 0xf] & eorx) ^ bgx;
-	}
-}
-
-
-static void putcs_8_packed(struct vc_data *conp, struct display *p,
-                           const char *s, int count, int yy, int xx)
-{
-	u_char *cdat, c, *dest, *dest0;
-	int rows,bytes=p->next_line;
-	u_long eorx, fgx, bgx;
-
-	dest0 = p->screen_base + yy * p->fontheight * bytes + xx * 8;
-	fgx=attr_fgcol(p,conp);
-	bgx=attr_bgcol(p,conp);
-	fgx |= (fgx << 8);
-	fgx |= (fgx << 16);
-	bgx |= (bgx << 8);
-	bgx |= (bgx << 16);
-	eorx = fgx ^ bgx;
-	while (count--) {
-		c = *s++;
-		cdat = p->fontdata + c * p->fontheight;
-
-		for (rows = p->fontheight, dest = dest0; rows-- ; dest += bytes) {
-			((u_long *)dest)[0]=
-			(nibbletab_8_packed[*cdat >> 4] & eorx) ^ bgx;
-			((u_long *)dest)[1]=
-			(nibbletab_8_packed[*cdat++ & 0xf] & eorx) ^ bgx;
-		}
-		dest0+=8;
-	}
-}
-
-
-static void rev_char_8_packed(struct display *p, int xx, int yy)
-{
-	u_char *dest;
-	int bytes=p->next_line, rows;
-
-	dest = p->screen_base + yy * p->fontheight * bytes + xx * 8;
-	for (rows = p->fontheight ; rows-- ; dest += bytes) {
-		((u_long *)dest)[0] ^= 0x0f0f0f0f;
-		((u_long *)dest)[1] ^= 0x0f0f0f0f;
-	}
-}
-
-#endif /* CONFIG_FBCON_8PACKED */
-
-
-/* ====================================================================== */
-
-#ifdef CONFIG_FBCON_16PACKED
-
-   /*
-    *    16 bpp Packed Pixels
-    */
-
-u_short packed16_cmap[16];
-
-static u_long tab_16_packed[]={
-0x00000000,0x0000ffff,0xffff0000,0xffffffff};
-
-static void bmove_16_packed(struct display *p, int sy, int sx, int dy, int dx,
-                            int height, int width)
-{
-	int bytes = p->next_line, linesize = bytes * p->fontheight, rows;
-	u_char *src,*dst;
-
-	if (sx == 0 && dx == 0 && width * 16 == bytes) {
-		mymemmove(p->screen_base + dy * linesize,
-			  p->screen_base + sy * linesize,
-			  height * linesize);
-	}
-	else {
-		if (dy < sy || (dy == sy && dx < sx)) {
-			src = p->screen_base + sy * linesize + sx * 16;
-			dst = p->screen_base + dy * linesize + dx * 16;
-			for (rows = height * p->fontheight ; rows-- ;) {
-				mymemmove(dst, src, width * 16);
-				src += bytes;
-				dst += bytes;
-			}
-		}
-		else {
-			src = p->screen_base + (sy+height) * linesize + sx * 16
-				- bytes;
-			dst = p->screen_base + (dy+height) * linesize + dx * 16
-				- bytes;
-			for (rows = height * p->fontheight ; rows-- ;) {
-				mymemmove(dst, src, width * 16);
-				src -= bytes;
-				dst -= bytes;
-			}
-		}
-	}
-}
-
-
-static void clear_16_packed(struct vc_data *conp, struct display *p, int sy,
-                            int sx, int height, int width)
-{
-	u_char *dest0,*dest;
-	int bytes=p->next_line,lines=height * p->fontheight, rows, i;
-	u_long bgx;
-
-	dest = p->screen_base + sy * p->fontheight * bytes + sx * 16;
-
-	bgx = attr_bgcol_ec(p,conp);
-	bgx = packed16_cmap[bgx];
-	bgx |= (bgx << 16);
-
-	if (sx == 0 && width * 16 == bytes) {
-		for (i = 0 ; i < lines * width ; i++) {
-			((u_long *)dest)[0]=bgx;
-			((u_long *)dest)[1]=bgx;
-			((u_long *)dest)[2]=bgx;
-			((u_long *)dest)[3]=bgx;
-			dest+=16;
-		}
-	} else {
-		dest0=dest;
-		for (rows = lines; rows-- ; dest0 += bytes) {
-			dest=dest0;
-			for (i = 0 ; i < width ; i++) {
-				((u_long *)dest)[0]=bgx;
-				((u_long *)dest)[1]=bgx;
-				((u_long *)dest)[2]=bgx;
-				((u_long *)dest)[3]=bgx;
-				dest+=16;
-			}
-		}
-	}
-}
-
-
-static void putc_16_packed(struct vc_data *conp, struct display *p, int c,
-                           int yy, int xx)
-{
-	u_char *dest,*cdat;
-	int bytes=p->next_line,rows;
-	ulong eorx,fgx,bgx;
-
-	c &= 0xff;
-
-	dest = p->screen_base + yy * p->fontheight * bytes + xx * 16;
-	cdat = p->fontdata + c * p->fontheight;
-
-	fgx = attr_fgcol(p,conp);
-	fgx = packed16_cmap[fgx];
-	bgx = attr_bgcol(p,conp);
-	bgx = packed16_cmap[bgx];
-	fgx |= (fgx << 16);
-	bgx |= (bgx << 16);
-	eorx = fgx ^ bgx;
-
-	for (rows = p->fontheight ; rows-- ; dest += bytes) {
-		((u_long *)dest)[0]=
-			(tab_16_packed[*cdat >> 6] & eorx) ^ bgx;
-		((u_long *)dest)[1]=
-			(tab_16_packed[*cdat >> 4 & 0x3] & eorx) ^ bgx;
-		((u_long *)dest)[2]=
-			(tab_16_packed[*cdat >> 2 & 0x3] & eorx) ^ bgx;
-		((u_long *)dest)[3]=
-			(tab_16_packed[*cdat++ & 0x3] & eorx) ^ bgx;
-	}
-}
-
-
-/* TODO */
-static void putcs_16_packed(struct vc_data *conp, struct display *p,
-                            const char *s, int count, int yy, int xx)
-{
-	u_char *cdat, c, *dest, *dest0;
-	int rows,bytes=p->next_line;
-	u_long eorx, fgx, bgx;
-
-	dest0 = p->screen_base + yy * p->fontheight * bytes + xx * 16;
-	fgx = attr_fgcol(p,conp);
-	fgx = packed16_cmap[fgx];
-	bgx = attr_bgcol(p,conp);
-	bgx = packed16_cmap[bgx];
-	fgx |= (fgx << 16);
-	bgx |= (bgx << 16);
-	eorx = fgx ^ bgx;
-	while (count--) {
-		c = *s++;
-		cdat = p->fontdata + c * p->fontheight;
-
-		for (rows = p->fontheight, dest = dest0; rows-- ; dest += bytes) {
-			((u_long *)dest)[0]=
-				(tab_16_packed[*cdat >> 6] & eorx) ^ bgx;
-			((u_long *)dest)[1]=
-				(tab_16_packed[*cdat >> 4 & 0x3] & eorx) ^ bgx;
-			((u_long *)dest)[2]=
-				(tab_16_packed[*cdat >> 2 & 0x3] & eorx) ^ bgx;
-			((u_long *)dest)[3]=
-				(tab_16_packed[*cdat++ & 0x3] & eorx) ^ bgx;
-		}
-		dest0+=16;
-	}
-}
-
-
-static void rev_char_16_packed(struct display *p, int xx, int yy)
-{
-	u_char *dest;
-	int bytes=p->next_line, rows;
-
-	dest = p->screen_base + yy * p->fontheight * bytes + xx * 16;
-	for (rows = p->fontheight ; rows-- ; dest += bytes) {
-		((u_long *)dest)[0] ^= 0xffffffff;
-		((u_long *)dest)[1] ^= 0xffffffff;
-		((u_long *)dest)[2] ^= 0xffffffff;
-		((u_long *)dest)[3] ^= 0xffffffff;
-	}
-}
-
-#endif /* CONFIG_FBCON_16PACKED */
-
-
-/* ====================================================================== */
-
-#ifdef CONFIG_FBCON_CYBER
-
-   /*
-    *    Cybervision (accelerated)
-    */
-
-static void bmove_cyber(struct display *p, int sy, int sx, int dy, int dx,
-                        int height, int width)
-{
-	sx *= 8; dx *= 8; width *= 8;
-	Cyber_BitBLT((u_short)sx, (u_short)(sy*p->fontheight), (u_short)dx,
-                (u_short)(dy*p->fontheight), (u_short)width,
-                (u_short)(height*p->fontheight), (u_short)S3_NEW);
-}
-
-
-static void clear_cyber(struct vc_data *conp, struct display *p, int
-			sy, int sx, int height, int width)
-{
-	unsigned char bg;
-        
-	sx *= 8; width *= 8;
-	bg = attr_bgcol_ec(p,conp);
-	Cyber_RectFill((u_short)sx,
-		       (u_short)(sy*p->fontheight),
-		       (u_short)width,
-		       (u_short)(height*p->fontheight),
-		       (u_short)S3_NEW, 
-		       (u_short)bg); 
-}
-
-
-static void putc_cyber(struct vc_data *conp, struct display *p, int c, int yy,
-                       int xx)
-{
-	u_char *dest, *cdat;
-	u_long tmp;
-	u_int rows, revs, underl; 
-	u_char d;
-	u_char fg, bg;
-
-	c &= 0xff;
-
-	dest = p->screen_base+y*p->fontheight*p->next_line+8*x;
-	cdat = p->fontdata+(c*p->fontheight);
-	fg = disp->fgcol;
-	bg = disp->bgcol;
-	revs = conp->vc_reverse;
-	underl = conp->vc_underline;
-
-   Cyber_WaitBlit();
-	for (rows = p->fontheight; rows--; dest += p->next_line) {
-  		d = *cdat++;
-
-		if (underl && !rows)
-			d = 0xff;
-		if (revs)
-			d = ~d;
-
-		tmp =  ((d & 0x80) ? fg : bg) << 24;
-		tmp |= ((d & 0x40) ? fg : bg) << 16;
-		tmp |= ((d & 0x20) ? fg : bg) << 8;
-		tmp |= ((d & 0x10) ? fg : bg);
-		*((u_long*) dest) = tmp;
-		tmp =  ((d & 0x8) ? fg : bg) << 24;
-		tmp |= ((d & 0x4) ? fg : bg) << 16;
-		tmp |= ((d & 0x2) ? fg : bg) << 8;
-		tmp |= ((d & 0x1) ? fg : bg);
-		*((u_long*) dest + 1) = tmp;
-	}
-}
-
-
-static void putcs_cyber(struct vc_data *conp, struct display *p, const char *s,
-                        int count, int yy, int xx)
-{
-	u_char *dest, *dest0, *cdat;
-	u_long tmp;
-	u_int rows, revs, underl;
-	u_char c, d;
-	u_char fg, bg;
-
-	dest0 = p->screen_base+y*p->fontheight*p->next_line+8*x;
-	fg = disp->fgcol;
-	bg = disp->bgcol;
-	revs = conp->vc_reverse;
-	underl = conp->vc_underline;
-
-   Cyber_WaitBlit();
-	while (count--) {
-		c = *s++;
-		dest = dest0;
-		dest0 += 8;
-		cdat = p->fontdata+(c*p->fontheight);
-		for (rows = p->fontheight; rows--; dest += p->next_line) {
- 			d = *cdat++;
-
-			if (underl && !rows)
-				d = 0xff;
-			if (revs)
-				d = ~d;
-
-         tmp =  ((d & 0x80) ? fg : bg) << 24;
-         tmp |= ((d & 0x40) ? fg : bg) << 16;
-         tmp |= ((d & 0x20) ? fg : bg) << 8;
-         tmp |= ((d & 0x10) ? fg : bg);
-         *((u_long*) dest) = tmp;
-         tmp =  ((d & 0x8) ? fg : bg) << 24;
-         tmp |= ((d & 0x4) ? fg : bg) << 16;
-         tmp |= ((d & 0x2) ? fg : bg) << 8;
-         tmp |= ((d & 0x1) ? fg : bg);
-         *((u_long*) dest + 1) = tmp;
-		}
-	}
-}
-
-
-static void rev_char_cyber(struct display *p, int xx, int yy)
-{
-	unsigned char *dest;
-	unsigned int rows;
-	unsigned char fg, bg;
-
-	fg = disp->fgcol;
-	bg = disp->bgcol;
-
-	dest = p->screen_base+y*p->fontheight*p->next_line+8*x;
-   Cyber_WaitBlit();
-	for (rows = p->fontheight; rows--; dest += p->next_line) {
-		*dest = (*dest == fg) ? bg : fg;
-		*(dest+1) = (*(dest + 1) == fg) ? bg : fg;
-		*(dest+2) = (*(dest + 2) == fg) ? bg : fg;
-		*(dest+3) = (*(dest + 3) == fg) ? bg : fg;
-		*(dest+4) = (*(dest + 4) == fg) ? bg : fg;
-		*(dest+5) = (*(dest + 5) == fg) ? bg : fg;
-		*(dest+6) = (*(dest + 6) == fg) ? bg : fg;
-		*(dest+7) = (*(dest + 7) == fg) ? bg : fg;
-	}
-}
-
-#endif /* CONFIG_FBCON_CYBER */
-
-
-#ifdef CONFIG_FBCON_RETINAZ3
-
-/*
- *    RetinaZ3 (accelerated)
- */
-
-#define Z3BLTcopy		0xc0
-#define Z3BLTset		0xf0
-
-static void clear_retz3(struct vc_data *conp, struct display *p, int
-			sy, int sx, int height, int width)
-{
-	unsigned short col;
-	int fontwidth = p->fontwidth;
-
-	sx *= fontwidth;
-	width *= fontwidth;
-
-	col = attr_bgcol_ec(p, conp);
-	col &= 0xff;
-	col |= (col << 8);
-
-	retz3_bitblt(&p->var,
-		     (unsigned short)sx,
-		     (unsigned short)(sy*p->fontheight),
-		     (unsigned short)sx,
-		     (unsigned short)(sy*p->fontheight),
-		     (unsigned short)width,
-		     (unsigned short)(height*p->fontheight),
-		     Z3BLTset,
-		     col); 
-}
-
-static void bmove_retz3(struct display *p, int sy, int sx, int dy, int dx,
-                        int height, int width)
-{
-	int fontwidth = p->fontwidth;
-
-	sx *= fontwidth;
-	dx *= fontwidth;
-	width *= fontwidth;
-
-	retz3_bitblt(&p->var,
-		     (unsigned short)sx,
-		     (unsigned short)(sy*p->fontheight),
-		     (unsigned short)dx,
-		     (unsigned short)(dy*p->fontheight),
-		     (unsigned short)width,
-		     (unsigned short)(height*p->fontheight),
-		     Z3BLTcopy,
-		     0xffff);
-}
-
-static void putc_retz3(struct vc_data *conp, struct display *p,
-		       int c, int yy, int xx)
-{
-	unsigned char *dest, *cdat;
-	unsigned long tmp;
-	unsigned int rows, revs, underl, bytes;
-	unsigned char d;
-	unsigned char fg, bg;
-   
-	c &= 0xff;
-
-	bytes = p->next_line;
-
-	dest = p->screen_base + yy*p->fontheight*bytes
-		+ xx*p->var.bits_per_pixel;
-	cdat = p->fontdata + c * p->fontheight;
-
-	fg = disp->fgcol;
-	bg = disp->bgcol;
-	revs = conp->vc_reverse;
-	underl = conp->vc_underline;
-
-	for (rows = p->fontheight; rows--; dest += bytes) {
-		d = *cdat++;
-
-		if (underl && !rows)
-			d = 0xff;
-		if (revs)
-			d = ~d;
-
-		tmp =  ((d & 0x80) ? fg : bg) << 24;
-		tmp |= ((d & 0x40) ? fg : bg) << 16;
-		tmp |= ((d & 0x20) ? fg : bg) << 8;
-		tmp |= ((d & 0x10) ? fg : bg);
-		*((unsigned long*) dest) = tmp;
-		tmp =  ((d & 0x8) ? fg : bg) << 24;
-		tmp |= ((d & 0x4) ? fg : bg) << 16;
-		tmp |= ((d & 0x2) ? fg : bg) << 8;
-		tmp |= ((d & 0x1) ? fg : bg);
-		*((unsigned long*) dest + 1) = tmp;
-	}
-}
-
-
-static void putcs_retz3(struct vc_data *conp, struct display *p,
-			const char *s, int count, int yy, int xx)
-{
-	unsigned char *dest, *dest0, *cdat;
-	unsigned long tmp;
-	unsigned int rows, revs, underl, bytes;
-	unsigned char c, d;
-	unsigned char fg, bg;
-
-	bytes = p->next_line;
-
-	dest0 = p->screen_base + yy*p->fontheight*bytes
-		+ xx * p->var.bits_per_pixel;
-	fg = disp->fgcol;
-	bg = disp->bgcol;
-	revs = conp->vc_reverse;
-	underl = conp->vc_underline;
-
-	while (count--) {
-		c = *s++;
-		dest = dest0;
-		dest0 += 8;
-
-		cdat = p->fontdata + c * p->fontheight;
-		for (rows = p->fontheight; rows--; dest += bytes) {
- 			d = *cdat++;
-
-			if (underl && !rows)
-				d = 0xff;
-			if (revs)
-				d = ~d;
-
-			tmp =  ((d & 0x80) ? fg : bg) << 24;
-			tmp |= ((d & 0x40) ? fg : bg) << 16;
-			tmp |= ((d & 0x20) ? fg : bg) << 8;
-			tmp |= ((d & 0x10) ? fg : bg);
-			*((unsigned long*) dest) = tmp;
-			tmp =  ((d & 0x8) ? fg : bg) << 24;
-			tmp |= ((d & 0x4) ? fg : bg) << 16;
-			tmp |= ((d & 0x2) ? fg : bg) << 8;
-			tmp |= ((d & 0x1) ? fg : bg);
-			*((unsigned long*) dest + 1) = tmp;
-		}
-	}
-}
-
-static void rev_char_retz3(struct display *p, int xx, int yy)
-{
-	unsigned char *dest;
-	int bytes=p->next_line, rows;
-	unsigned int bpp, mask;
-
-	bpp = p->var.bits_per_pixel;
-
-	switch (bpp){
-	case 8:
-		mask = 0x0f0f0f0f;
-		break;
-	case 16:
-		mask = 0xffffffff;
-		break;
-	case 24:
-		mask = 0xffffffff; /* ??? */
-		break;
-	default:
-		printk("illegal depth for rev_char_retz3(), bpp = %i\n", bpp);
-		return;
-	}
-
-	dest = p->screen_base + yy * p->fontheight * bytes + xx * bpp;
-
-	for (rows = p->fontheight ; rows-- ; dest += bytes) {
-		((unsigned long *)dest)[0] ^= mask;
-		((unsigned long *)dest)[1] ^= mask;
-	}
-}
-
-#endif
-
-/* ====================================================================== */
-
-   /*
-    *    The console `switch' structure for the frame buffer based console
-    */
-
-struct consw fb_con = {
-   fbcon_startup, fbcon_init, fbcon_deinit, fbcon_clear, fbcon_putc,
-   fbcon_putcs, fbcon_cursor, fbcon_scroll, fbcon_bmove, fbcon_switch,
-   fbcon_blank, fbcon_get_font, fbcon_set_font, fbcon_set_palette
-};
--- linux-2.1.42/arch/m68k/console/font_8x16.c.orig	Mon Mar  4 21:38:11 1996
+++ linux-2.1.42/arch/m68k/console/font_8x16.c	Mon Jun  9 23:03:15 1997
@@ -1,4625 +0,0 @@
-/**********************************************/
-/*                                            */
-/*       Font file generated by cpi2fnt       */
-/*                                            */
-/**********************************************/
-
-#define FONTDATAMAX 4096
-
-char fontname_8x16[] = "VGA8x16";
-
-int  fontheight_8x16 = 16;
-int  fontwidth_8x16  = 8;
-
-unsigned char fontdata_8x16[FONTDATAMAX] = {
-
-	/* 0 0x00 '^@' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 1 0x01 '^A' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0x81, /* 10000001 */
-	0xa5, /* 10100101 */
-	0x81, /* 10000001 */
-	0x81, /* 10000001 */
-	0xbd, /* 10111101 */
-	0x99, /* 10011001 */
-	0x81, /* 10000001 */
-	0x81, /* 10000001 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 2 0x02 '^B' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0xff, /* 11111111 */
-	0xdb, /* 11011011 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xc3, /* 11000011 */
-	0xe7, /* 11100111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 3 0x03 '^C' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x6c, /* 01101100 */
-	0xfe, /* 11111110 */
-	0xfe, /* 11111110 */
-	0xfe, /* 11111110 */
-	0xfe, /* 11111110 */
-	0x7c, /* 01111100 */
-	0x38, /* 00111000 */
-	0x10, /* 00010000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 4 0x04 '^D' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x10, /* 00010000 */
-	0x38, /* 00111000 */
-	0x7c, /* 01111100 */
-	0xfe, /* 11111110 */
-	0x7c, /* 01111100 */
-	0x38, /* 00111000 */
-	0x10, /* 00010000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 5 0x05 '^E' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x3c, /* 00111100 */
-	0xe7, /* 11100111 */
-	0xe7, /* 11100111 */
-	0xe7, /* 11100111 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 6 0x06 '^F' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x7e, /* 01111110 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0x7e, /* 01111110 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 7 0x07 '^G' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 8 0x08 '^H' */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xe7, /* 11100111 */
-	0xc3, /* 11000011 */
-	0xc3, /* 11000011 */
-	0xe7, /* 11100111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-
-	/* 9 0x09 '^I' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x3c, /* 00111100 */
-	0x66, /* 01100110 */
-	0x42, /* 01000010 */
-	0x42, /* 01000010 */
-	0x66, /* 01100110 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 10 0x0a '^J' */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xc3, /* 11000011 */
-	0x99, /* 10011001 */
-	0xbd, /* 10111101 */
-	0xbd, /* 10111101 */
-	0x99, /* 10011001 */
-	0xc3, /* 11000011 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-
-	/* 11 0x0b '^K' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x1e, /* 00011110 */
-	0x0e, /* 00001110 */
-	0x1a, /* 00011010 */
-	0x32, /* 00110010 */
-	0x78, /* 01111000 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x78, /* 01111000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 12 0x0c '^L' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x3c, /* 00111100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-	0x7e, /* 01111110 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 13 0x0d '^M' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x3f, /* 00111111 */
-	0x33, /* 00110011 */
-	0x3f, /* 00111111 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x70, /* 01110000 */
-	0xf0, /* 11110000 */
-	0xe0, /* 11100000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 14 0x0e '^N' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7f, /* 01111111 */
-	0x63, /* 01100011 */
-	0x7f, /* 01111111 */
-	0x63, /* 01100011 */
-	0x63, /* 01100011 */
-	0x63, /* 01100011 */
-	0x63, /* 01100011 */
-	0x67, /* 01100111 */
-	0xe7, /* 11100111 */
-	0xe6, /* 11100110 */
-	0xc0, /* 11000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 15 0x0f '^O' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0xdb, /* 11011011 */
-	0x3c, /* 00111100 */
-	0xe7, /* 11100111 */
-	0x3c, /* 00111100 */
-	0xdb, /* 11011011 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 16 0x10 '^P' */
-	0x00, /* 00000000 */
-	0x80, /* 10000000 */
-	0xc0, /* 11000000 */
-	0xe0, /* 11100000 */
-	0xf0, /* 11110000 */
-	0xf8, /* 11111000 */
-	0xfe, /* 11111110 */
-	0xf8, /* 11111000 */
-	0xf0, /* 11110000 */
-	0xe0, /* 11100000 */
-	0xc0, /* 11000000 */
-	0x80, /* 10000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 17 0x11 '^Q' */
-	0x00, /* 00000000 */
-	0x02, /* 00000010 */
-	0x06, /* 00000110 */
-	0x0e, /* 00001110 */
-	0x1e, /* 00011110 */
-	0x3e, /* 00111110 */
-	0xfe, /* 11111110 */
-	0x3e, /* 00111110 */
-	0x1e, /* 00011110 */
-	0x0e, /* 00001110 */
-	0x06, /* 00000110 */
-	0x02, /* 00000010 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 18 0x12 '^R' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x7e, /* 01111110 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x7e, /* 01111110 */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 19 0x13 '^S' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x00, /* 00000000 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 20 0x14 '^T' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7f, /* 01111111 */
-	0xdb, /* 11011011 */
-	0xdb, /* 11011011 */
-	0xdb, /* 11011011 */
-	0x7b, /* 01111011 */
-	0x1b, /* 00011011 */
-	0x1b, /* 00011011 */
-	0x1b, /* 00011011 */
-	0x1b, /* 00011011 */
-	0x1b, /* 00011011 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 21 0x15 '^U' */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0x60, /* 01100000 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x6c, /* 01101100 */
-	0x38, /* 00111000 */
-	0x0c, /* 00001100 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 22 0x16 '^V' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0xfe, /* 11111110 */
-	0xfe, /* 11111110 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 23 0x17 '^W' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x7e, /* 01111110 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x7e, /* 01111110 */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 24 0x18 '^X' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x7e, /* 01111110 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 25 0x19 '^Y' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x7e, /* 01111110 */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 26 0x1a '^Z' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x0c, /* 00001100 */
-	0xfe, /* 11111110 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 27 0x1b '^[' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x30, /* 00110000 */
-	0x60, /* 01100000 */
-	0xfe, /* 11111110 */
-	0x60, /* 01100000 */
-	0x30, /* 00110000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 28 0x1c '^\' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 29 0x1d '^]' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x28, /* 00101000 */
-	0x6c, /* 01101100 */
-	0xfe, /* 11111110 */
-	0x6c, /* 01101100 */
-	0x28, /* 00101000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 30 0x1e '^^' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x10, /* 00010000 */
-	0x38, /* 00111000 */
-	0x38, /* 00111000 */
-	0x7c, /* 01111100 */
-	0x7c, /* 01111100 */
-	0xfe, /* 11111110 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 31 0x1f '^_' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0xfe, /* 11111110 */
-	0x7c, /* 01111100 */
-	0x7c, /* 01111100 */
-	0x38, /* 00111000 */
-	0x38, /* 00111000 */
-	0x10, /* 00010000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 32 0x20 ' ' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 33 0x21 '!' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x3c, /* 00111100 */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 34 0x22 '"' */
-	0x00, /* 00000000 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x24, /* 00100100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 35 0x23 '#' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0xfe, /* 11111110 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0xfe, /* 11111110 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 36 0x24 '$' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc2, /* 11000010 */
-	0xc0, /* 11000000 */
-	0x7c, /* 01111100 */
-	0x06, /* 00000110 */
-	0x06, /* 00000110 */
-	0x86, /* 10000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 37 0x25 '%' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xc2, /* 11000010 */
-	0xc6, /* 11000110 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x60, /* 01100000 */
-	0xc6, /* 11000110 */
-	0x86, /* 10000110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 38 0x26 '&' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0x38, /* 00111000 */
-	0x76, /* 01110110 */
-	0xdc, /* 11011100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 39 0x27 ''' */
-	0x00, /* 00000000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x60, /* 01100000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 40 0x28 '(' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x0c, /* 00001100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 41 0x29 ')' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 42 0x2a '*' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x66, /* 01100110 */
-	0x3c, /* 00111100 */
-	0xff, /* 11111111 */
-	0x3c, /* 00111100 */
-	0x66, /* 01100110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 43 0x2b '+' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x7e, /* 01111110 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 44 0x2c ',' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 45 0x2d '-' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 46 0x2e '.' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 47 0x2f '/' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x02, /* 00000010 */
-	0x06, /* 00000110 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x60, /* 01100000 */
-	0xc0, /* 11000000 */
-	0x80, /* 10000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 48 0x30 '0' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xd6, /* 11010110 */
-	0xd6, /* 11010110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x6c, /* 01101100 */
-	0x38, /* 00111000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 49 0x31 '1' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x38, /* 00111000 */
-	0x78, /* 01111000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 50 0x32 '2' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0x06, /* 00000110 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x60, /* 01100000 */
-	0xc0, /* 11000000 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 51 0x33 '3' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0x06, /* 00000110 */
-	0x06, /* 00000110 */
-	0x3c, /* 00111100 */
-	0x06, /* 00000110 */
-	0x06, /* 00000110 */
-	0x06, /* 00000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 52 0x34 '4' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x0c, /* 00001100 */
-	0x1c, /* 00011100 */
-	0x3c, /* 00111100 */
-	0x6c, /* 01101100 */
-	0xcc, /* 11001100 */
-	0xfe, /* 11111110 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x1e, /* 00011110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 53 0x35 '5' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xfc, /* 11111100 */
-	0x06, /* 00000110 */
-	0x06, /* 00000110 */
-	0x06, /* 00000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 54 0x36 '6' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x38, /* 00111000 */
-	0x60, /* 01100000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xfc, /* 11111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 55 0x37 '7' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0xc6, /* 11000110 */
-	0x06, /* 00000110 */
-	0x06, /* 00000110 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 56 0x38 '8' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 57 0x39 '9' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7e, /* 01111110 */
-	0x06, /* 00000110 */
-	0x06, /* 00000110 */
-	0x06, /* 00000110 */
-	0x0c, /* 00001100 */
-	0x78, /* 01111000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 58 0x3a ':' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 59 0x3b ';' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 60 0x3c '<' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x06, /* 00000110 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x60, /* 01100000 */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x0c, /* 00001100 */
-	0x06, /* 00000110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 61 0x3d '=' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 62 0x3e '>' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x60, /* 01100000 */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x0c, /* 00001100 */
-	0x06, /* 00000110 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x60, /* 01100000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 63 0x3f '?' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 64 0x40 '@' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xde, /* 11011110 */
-	0xde, /* 11011110 */
-	0xde, /* 11011110 */
-	0xdc, /* 11011100 */
-	0xc0, /* 11000000 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 65 0x41 'A' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x10, /* 00010000 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 66 0x42 'B' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfc, /* 11111100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x7c, /* 01111100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0xfc, /* 11111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 67 0x43 'C' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x3c, /* 00111100 */
-	0x66, /* 01100110 */
-	0xc2, /* 11000010 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc2, /* 11000010 */
-	0x66, /* 01100110 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 68 0x44 'D' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xf8, /* 11111000 */
-	0x6c, /* 01101100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x6c, /* 01101100 */
-	0xf8, /* 11111000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 69 0x45 'E' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0x66, /* 01100110 */
-	0x62, /* 01100010 */
-	0x68, /* 01101000 */
-	0x78, /* 01111000 */
-	0x68, /* 01101000 */
-	0x60, /* 01100000 */
-	0x62, /* 01100010 */
-	0x66, /* 01100110 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 70 0x46 'F' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0x66, /* 01100110 */
-	0x62, /* 01100010 */
-	0x68, /* 01101000 */
-	0x78, /* 01111000 */
-	0x68, /* 01101000 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0xf0, /* 11110000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 71 0x47 'G' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x3c, /* 00111100 */
-	0x66, /* 01100110 */
-	0xc2, /* 11000010 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xde, /* 11011110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x66, /* 01100110 */
-	0x3a, /* 00111010 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 72 0x48 'H' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 73 0x49 'I' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 74 0x4a 'J' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x1e, /* 00011110 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x78, /* 01111000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 75 0x4b 'K' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xe6, /* 11100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x6c, /* 01101100 */
-	0x78, /* 01111000 */
-	0x78, /* 01111000 */
-	0x6c, /* 01101100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0xe6, /* 11100110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 76 0x4c 'L' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xf0, /* 11110000 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0x62, /* 01100010 */
-	0x66, /* 01100110 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 77 0x4d 'M' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0xee, /* 11101110 */
-	0xfe, /* 11111110 */
-	0xfe, /* 11111110 */
-	0xd6, /* 11010110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 78 0x4e 'N' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0xe6, /* 11100110 */
-	0xf6, /* 11110110 */
-	0xfe, /* 11111110 */
-	0xde, /* 11011110 */
-	0xce, /* 11001110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 79 0x4f 'O' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 80 0x50 'P' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfc, /* 11111100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x7c, /* 01111100 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0xf0, /* 11110000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 81 0x51 'Q' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xd6, /* 11010110 */
-	0xde, /* 11011110 */
-	0x7c, /* 01111100 */
-	0x0c, /* 00001100 */
-	0x0e, /* 00001110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 82 0x52 'R' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfc, /* 11111100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x7c, /* 01111100 */
-	0x6c, /* 01101100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0xe6, /* 11100110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 83 0x53 'S' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x60, /* 01100000 */
-	0x38, /* 00111000 */
-	0x0c, /* 00001100 */
-	0x06, /* 00000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 84 0x54 'T' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0x7e, /* 01111110 */
-	0x5a, /* 01011010 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 85 0x55 'U' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 86 0x56 'V' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x6c, /* 01101100 */
-	0x38, /* 00111000 */
-	0x10, /* 00010000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 87 0x57 'W' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xd6, /* 11010110 */
-	0xd6, /* 11010110 */
-	0xd6, /* 11010110 */
-	0xfe, /* 11111110 */
-	0xee, /* 11101110 */
-	0x6c, /* 01101100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 88 0x58 'X' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x6c, /* 01101100 */
-	0x7c, /* 01111100 */
-	0x38, /* 00111000 */
-	0x38, /* 00111000 */
-	0x7c, /* 01111100 */
-	0x6c, /* 01101100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 89 0x59 'Y' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 90 0x5a 'Z' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0xc6, /* 11000110 */
-	0x86, /* 10000110 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x60, /* 01100000 */
-	0xc2, /* 11000010 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 91 0x5b '[' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x3c, /* 00111100 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 92 0x5c '\' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x80, /* 10000000 */
-	0xc0, /* 11000000 */
-	0xe0, /* 11100000 */
-	0x70, /* 01110000 */
-	0x38, /* 00111000 */
-	0x1c, /* 00011100 */
-	0x0e, /* 00001110 */
-	0x06, /* 00000110 */
-	0x02, /* 00000010 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 93 0x5d ']' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x3c, /* 00111100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 94 0x5e '^' */
-	0x10, /* 00010000 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 95 0x5f '_' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 96 0x60 '`' */
-	0x00, /* 00000000 */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x0c, /* 00001100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 97 0x61 'a' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x78, /* 01111000 */
-	0x0c, /* 00001100 */
-	0x7c, /* 01111100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 98 0x62 'b' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xe0, /* 11100000 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0x78, /* 01111000 */
-	0x6c, /* 01101100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 99 0x63 'c' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 100 0x64 'd' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x1c, /* 00011100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x3c, /* 00111100 */
-	0x6c, /* 01101100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 101 0x65 'e' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 102 0x66 'f' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x1c, /* 00011100 */
-	0x36, /* 00110110 */
-	0x32, /* 00110010 */
-	0x30, /* 00110000 */
-	0x78, /* 01111000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x78, /* 01111000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 103 0x67 'g' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x76, /* 01110110 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x7c, /* 01111100 */
-	0x0c, /* 00001100 */
-	0xcc, /* 11001100 */
-	0x78, /* 01111000 */
-	0x00, /* 00000000 */
-
-	/* 104 0x68 'h' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xe0, /* 11100000 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0x6c, /* 01101100 */
-	0x76, /* 01110110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0xe6, /* 11100110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 105 0x69 'i' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x38, /* 00111000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 106 0x6a 'j' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x06, /* 00000110 */
-	0x06, /* 00000110 */
-	0x00, /* 00000000 */
-	0x0e, /* 00001110 */
-	0x06, /* 00000110 */
-	0x06, /* 00000110 */
-	0x06, /* 00000110 */
-	0x06, /* 00000110 */
-	0x06, /* 00000110 */
-	0x06, /* 00000110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-
-	/* 107 0x6b 'k' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xe0, /* 11100000 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0x66, /* 01100110 */
-	0x6c, /* 01101100 */
-	0x78, /* 01111000 */
-	0x78, /* 01111000 */
-	0x6c, /* 01101100 */
-	0x66, /* 01100110 */
-	0xe6, /* 11100110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 108 0x6c 'l' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x38, /* 00111000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 109 0x6d 'm' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xec, /* 11101100 */
-	0xfe, /* 11111110 */
-	0xd6, /* 11010110 */
-	0xd6, /* 11010110 */
-	0xd6, /* 11010110 */
-	0xd6, /* 11010110 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 110 0x6e 'n' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xdc, /* 11011100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 111 0x6f 'o' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 112 0x70 'p' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xdc, /* 11011100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x7c, /* 01111100 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0xf0, /* 11110000 */
-	0x00, /* 00000000 */
-
-	/* 113 0x71 'q' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x76, /* 01110110 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x7c, /* 01111100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x1e, /* 00011110 */
-	0x00, /* 00000000 */
-
-	/* 114 0x72 'r' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xdc, /* 11011100 */
-	0x76, /* 01110110 */
-	0x66, /* 01100110 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0xf0, /* 11110000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 115 0x73 's' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0x60, /* 01100000 */
-	0x38, /* 00111000 */
-	0x0c, /* 00001100 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 116 0x74 't' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x10, /* 00010000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0xfc, /* 11111100 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x36, /* 00110110 */
-	0x1c, /* 00011100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 117 0x75 'u' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 118 0x76 'v' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x6c, /* 01101100 */
-	0x38, /* 00111000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 119 0x77 'w' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xd6, /* 11010110 */
-	0xd6, /* 11010110 */
-	0xd6, /* 11010110 */
-	0xfe, /* 11111110 */
-	0x6c, /* 01101100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 120 0x78 'x' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0x6c, /* 01101100 */
-	0x38, /* 00111000 */
-	0x38, /* 00111000 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 121 0x79 'y' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7e, /* 01111110 */
-	0x06, /* 00000110 */
-	0x0c, /* 00001100 */
-	0xf8, /* 11111000 */
-	0x00, /* 00000000 */
-
-	/* 122 0x7a 'z' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0xcc, /* 11001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x60, /* 01100000 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 123 0x7b '{' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x0e, /* 00001110 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x70, /* 01110000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x0e, /* 00001110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 124 0x7c '|' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 125 0x7d '}' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x70, /* 01110000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x0e, /* 00001110 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x70, /* 01110000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 126 0x7e '~' */
-	0x00, /* 00000000 */
-	0x76, /* 01110110 */
-	0xdc, /* 11011100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 127 0x7f '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x10, /* 00010000 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 128 0x80 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x3c, /* 00111100 */
-	0x66, /* 01100110 */
-	0xc2, /* 11000010 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc2, /* 11000010 */
-	0x66, /* 01100110 */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-	0x70, /* 01110000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 129 0x81 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xcc, /* 11001100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 130 0x82 '' */
-	0x00, /* 00000000 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 131 0x83 '' */
-	0x00, /* 00000000 */
-	0x10, /* 00010000 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0x00, /* 00000000 */
-	0x78, /* 01111000 */
-	0x0c, /* 00001100 */
-	0x7c, /* 01111100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 132 0x84 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xcc, /* 11001100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x78, /* 01111000 */
-	0x0c, /* 00001100 */
-	0x7c, /* 01111100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 133 0x85 '' */
-	0x00, /* 00000000 */
-	0x60, /* 01100000 */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x78, /* 01111000 */
-	0x0c, /* 00001100 */
-	0x7c, /* 01111100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 134 0x86 '' */
-	0x00, /* 00000000 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0x38, /* 00111000 */
-	0x00, /* 00000000 */
-	0x78, /* 01111000 */
-	0x0c, /* 00001100 */
-	0x7c, /* 01111100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 135 0x87 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x18, /* 00011000 */
-	0x70, /* 01110000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 136 0x88 '' */
-	0x00, /* 00000000 */
-	0x10, /* 00010000 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 137 0x89 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 138 0x8a '' */
-	0x00, /* 00000000 */
-	0x60, /* 01100000 */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 139 0x8b '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x66, /* 01100110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x38, /* 00111000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 140 0x8c '' */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x66, /* 01100110 */
-	0x00, /* 00000000 */
-	0x38, /* 00111000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 141 0x8d '' */
-	0x00, /* 00000000 */
-	0x60, /* 01100000 */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x38, /* 00111000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 142 0x8e '' */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0x10, /* 00010000 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 143 0x8f '' */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0x38, /* 00111000 */
-	0x10, /* 00010000 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 144 0x90 '' */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0x66, /* 01100110 */
-	0x62, /* 01100010 */
-	0x68, /* 01101000 */
-	0x78, /* 01111000 */
-	0x68, /* 01101000 */
-	0x62, /* 01100010 */
-	0x66, /* 01100110 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 145 0x91 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xec, /* 11101100 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x7e, /* 01111110 */
-	0xd8, /* 11011000 */
-	0xd8, /* 11011000 */
-	0x6e, /* 01101110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 146 0x92 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x3e, /* 00111110 */
-	0x6c, /* 01101100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xfe, /* 11111110 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xce, /* 11001110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 147 0x93 '' */
-	0x00, /* 00000000 */
-	0x10, /* 00010000 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 148 0x94 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 149 0x95 '' */
-	0x00, /* 00000000 */
-	0x60, /* 01100000 */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 150 0x96 '' */
-	0x00, /* 00000000 */
-	0x30, /* 00110000 */
-	0x78, /* 01111000 */
-	0xcc, /* 11001100 */
-	0x00, /* 00000000 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 151 0x97 '' */
-	0x00, /* 00000000 */
-	0x60, /* 01100000 */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 152 0x98 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7e, /* 01111110 */
-	0x06, /* 00000110 */
-	0x0c, /* 00001100 */
-	0x78, /* 01111000 */
-	0x00, /* 00000000 */
-
-	/* 153 0x99 '' */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 154 0x9a '' */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 155 0x9b '' */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 156 0x9c '' */
-	0x00, /* 00000000 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0x64, /* 01100100 */
-	0x60, /* 01100000 */
-	0xf0, /* 11110000 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0xe6, /* 11100110 */
-	0xfc, /* 11111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 157 0x9d '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-	0x7e, /* 01111110 */
-	0x18, /* 00011000 */
-	0x7e, /* 01111110 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 158 0x9e '' */
-	0x00, /* 00000000 */
-	0xf8, /* 11111000 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xf8, /* 11111000 */
-	0xc4, /* 11000100 */
-	0xcc, /* 11001100 */
-	0xde, /* 11011110 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 159 0x9f '' */
-	0x00, /* 00000000 */
-	0x0e, /* 00001110 */
-	0x1b, /* 00011011 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x7e, /* 01111110 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0xd8, /* 11011000 */
-	0x70, /* 01110000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 160 0xa0 '' */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x60, /* 01100000 */
-	0x00, /* 00000000 */
-	0x78, /* 01111000 */
-	0x0c, /* 00001100 */
-	0x7c, /* 01111100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 161 0xa1 '' */
-	0x00, /* 00000000 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x00, /* 00000000 */
-	0x38, /* 00111000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 162 0xa2 '' */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x60, /* 01100000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 163 0xa3 '' */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x60, /* 01100000 */
-	0x00, /* 00000000 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 164 0xa4 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x76, /* 01110110 */
-	0xdc, /* 11011100 */
-	0x00, /* 00000000 */
-	0xdc, /* 11011100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 165 0xa5 '' */
-	0x76, /* 01110110 */
-	0xdc, /* 11011100 */
-	0x00, /* 00000000 */
-	0xc6, /* 11000110 */
-	0xe6, /* 11100110 */
-	0xf6, /* 11110110 */
-	0xfe, /* 11111110 */
-	0xde, /* 11011110 */
-	0xce, /* 11001110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 166 0xa6 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x3c, /* 00111100 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0x3e, /* 00111110 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 167 0xa7 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0x38, /* 00111000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 168 0xa8 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x00, /* 00000000 */
-	0x30, /* 00110000 */
-	0x30, /* 00110000 */
-	0x60, /* 01100000 */
-	0xc0, /* 11000000 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x7c, /* 01111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 169 0xa9 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 170 0xaa '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0x06, /* 00000110 */
-	0x06, /* 00000110 */
-	0x06, /* 00000110 */
-	0x06, /* 00000110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 171 0xab '' */
-	0x00, /* 00000000 */
-	0x60, /* 01100000 */
-	0xe0, /* 11100000 */
-	0x62, /* 01100010 */
-	0x66, /* 01100110 */
-	0x6c, /* 01101100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x60, /* 01100000 */
-	0xdc, /* 11011100 */
-	0x86, /* 10000110 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x3e, /* 00111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 172 0xac '' */
-	0x00, /* 00000000 */
-	0x60, /* 01100000 */
-	0xe0, /* 11100000 */
-	0x62, /* 01100010 */
-	0x66, /* 01100110 */
-	0x6c, /* 01101100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x66, /* 01100110 */
-	0xce, /* 11001110 */
-	0x9a, /* 10011010 */
-	0x3f, /* 00111111 */
-	0x06, /* 00000110 */
-	0x06, /* 00000110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 173 0xad '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x3c, /* 00111100 */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 174 0xae '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x36, /* 00110110 */
-	0x6c, /* 01101100 */
-	0xd8, /* 11011000 */
-	0x6c, /* 01101100 */
-	0x36, /* 00110110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 175 0xaf '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xd8, /* 11011000 */
-	0x6c, /* 01101100 */
-	0x36, /* 00110110 */
-	0x6c, /* 01101100 */
-	0xd8, /* 11011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 176 0xb0 '' */
-	0x11, /* 00010001 */
-	0x44, /* 01000100 */
-	0x11, /* 00010001 */
-	0x44, /* 01000100 */
-	0x11, /* 00010001 */
-	0x44, /* 01000100 */
-	0x11, /* 00010001 */
-	0x44, /* 01000100 */
-	0x11, /* 00010001 */
-	0x44, /* 01000100 */
-	0x11, /* 00010001 */
-	0x44, /* 01000100 */
-	0x11, /* 00010001 */
-	0x44, /* 01000100 */
-	0x11, /* 00010001 */
-	0x44, /* 01000100 */
-
-	/* 177 0xb1 '' */
-	0x55, /* 01010101 */
-	0xaa, /* 10101010 */
-	0x55, /* 01010101 */
-	0xaa, /* 10101010 */
-	0x55, /* 01010101 */
-	0xaa, /* 10101010 */
-	0x55, /* 01010101 */
-	0xaa, /* 10101010 */
-	0x55, /* 01010101 */
-	0xaa, /* 10101010 */
-	0x55, /* 01010101 */
-	0xaa, /* 10101010 */
-	0x55, /* 01010101 */
-	0xaa, /* 10101010 */
-	0x55, /* 01010101 */
-	0xaa, /* 10101010 */
-
-	/* 178 0xb2 '' */
-	0xdd, /* 11011101 */
-	0x77, /* 01110111 */
-	0xdd, /* 11011101 */
-	0x77, /* 01110111 */
-	0xdd, /* 11011101 */
-	0x77, /* 01110111 */
-	0xdd, /* 11011101 */
-	0x77, /* 01110111 */
-	0xdd, /* 11011101 */
-	0x77, /* 01110111 */
-	0xdd, /* 11011101 */
-	0x77, /* 01110111 */
-	0xdd, /* 11011101 */
-	0x77, /* 01110111 */
-	0xdd, /* 11011101 */
-	0x77, /* 01110111 */
-
-	/* 179 0xb3 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 180 0xb4 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0xf8, /* 11111000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 181 0xb5 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0xf8, /* 11111000 */
-	0x18, /* 00011000 */
-	0xf8, /* 11111000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 182 0xb6 '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0xf6, /* 11110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 183 0xb7 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 184 0xb8 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xf8, /* 11111000 */
-	0x18, /* 00011000 */
-	0xf8, /* 11111000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 185 0xb9 '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0xf6, /* 11110110 */
-	0x06, /* 00000110 */
-	0xf6, /* 11110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 186 0xba '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 187 0xbb '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0x06, /* 00000110 */
-	0xf6, /* 11110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 188 0xbc '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0xf6, /* 11110110 */
-	0x06, /* 00000110 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 189 0xbd '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 190 0xbe '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0xf8, /* 11111000 */
-	0x18, /* 00011000 */
-	0xf8, /* 11111000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 191 0xbf '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xf8, /* 11111000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 192 0xc0 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x1f, /* 00011111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 193 0xc1 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 194 0xc2 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 195 0xc3 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x1f, /* 00011111 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 196 0xc4 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 197 0xc5 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0xff, /* 11111111 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 198 0xc6 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x1f, /* 00011111 */
-	0x18, /* 00011000 */
-	0x1f, /* 00011111 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 199 0xc7 '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x37, /* 00110111 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 200 0xc8 '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x37, /* 00110111 */
-	0x30, /* 00110000 */
-	0x3f, /* 00111111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 201 0xc9 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x3f, /* 00111111 */
-	0x30, /* 00110000 */
-	0x37, /* 00110111 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 202 0xca '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0xf7, /* 11110111 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 203 0xcb '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0xf7, /* 11110111 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 204 0xcc '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x37, /* 00110111 */
-	0x30, /* 00110000 */
-	0x37, /* 00110111 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 205 0xcd '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 206 0xce '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0xf7, /* 11110111 */
-	0x00, /* 00000000 */
-	0xf7, /* 11110111 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 207 0xcf '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 208 0xd0 '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 209 0xd1 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 210 0xd2 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 211 0xd3 '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x3f, /* 00111111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 212 0xd4 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x1f, /* 00011111 */
-	0x18, /* 00011000 */
-	0x1f, /* 00011111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 213 0xd5 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x1f, /* 00011111 */
-	0x18, /* 00011000 */
-	0x1f, /* 00011111 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 214 0xd6 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x3f, /* 00111111 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 215 0xd7 '' */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0xff, /* 11111111 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-
-	/* 216 0xd8 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0xff, /* 11111111 */
-	0x18, /* 00011000 */
-	0xff, /* 11111111 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 217 0xd9 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0xf8, /* 11111000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 218 0xda '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x1f, /* 00011111 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 219 0xdb '' */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-
-	/* 220 0xdc '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-
-	/* 221 0xdd '' */
-	0xf0, /* 11110000 */
-	0xf0, /* 11110000 */
-	0xf0, /* 11110000 */
-	0xf0, /* 11110000 */
-	0xf0, /* 11110000 */
-	0xf0, /* 11110000 */
-	0xf0, /* 11110000 */
-	0xf0, /* 11110000 */
-	0xf0, /* 11110000 */
-	0xf0, /* 11110000 */
-	0xf0, /* 11110000 */
-	0xf0, /* 11110000 */
-	0xf0, /* 11110000 */
-	0xf0, /* 11110000 */
-	0xf0, /* 11110000 */
-	0xf0, /* 11110000 */
-
-	/* 222 0xde '' */
-	0x0f, /* 00001111 */
-	0x0f, /* 00001111 */
-	0x0f, /* 00001111 */
-	0x0f, /* 00001111 */
-	0x0f, /* 00001111 */
-	0x0f, /* 00001111 */
-	0x0f, /* 00001111 */
-	0x0f, /* 00001111 */
-	0x0f, /* 00001111 */
-	0x0f, /* 00001111 */
-	0x0f, /* 00001111 */
-	0x0f, /* 00001111 */
-	0x0f, /* 00001111 */
-	0x0f, /* 00001111 */
-	0x0f, /* 00001111 */
-	0x0f, /* 00001111 */
-
-	/* 223 0xdf '' */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0xff, /* 11111111 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 224 0xe0 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x76, /* 01110110 */
-	0xdc, /* 11011100 */
-	0xd8, /* 11011000 */
-	0xd8, /* 11011000 */
-	0xd8, /* 11011000 */
-	0xdc, /* 11011100 */
-	0x76, /* 01110110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 225 0xe1 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x78, /* 01111000 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xcc, /* 11001100 */
-	0xd8, /* 11011000 */
-	0xcc, /* 11001100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xcc, /* 11001100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 226 0xe2 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0xc0, /* 11000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 227 0xe3 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 228 0xe4 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0xc6, /* 11000110 */
-	0x60, /* 01100000 */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x60, /* 01100000 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 229 0xe5 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0xd8, /* 11011000 */
-	0xd8, /* 11011000 */
-	0xd8, /* 11011000 */
-	0xd8, /* 11011000 */
-	0xd8, /* 11011000 */
-	0x70, /* 01110000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 230 0xe6 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x7c, /* 01111100 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0xc0, /* 11000000 */
-	0x00, /* 00000000 */
-
-	/* 231 0xe7 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x76, /* 01110110 */
-	0xdc, /* 11011100 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 232 0xe8 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0x18, /* 00011000 */
-	0x3c, /* 00111100 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x3c, /* 00111100 */
-	0x18, /* 00011000 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 233 0xe9 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xfe, /* 11111110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x6c, /* 01101100 */
-	0x38, /* 00111000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 234 0xea '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0xee, /* 11101110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 235 0xeb '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x1e, /* 00011110 */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x0c, /* 00001100 */
-	0x3e, /* 00111110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x66, /* 01100110 */
-	0x3c, /* 00111100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 236 0xec '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0xdb, /* 11011011 */
-	0xdb, /* 11011011 */
-	0xdb, /* 11011011 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 237 0xed '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x03, /* 00000011 */
-	0x06, /* 00000110 */
-	0x7e, /* 01111110 */
-	0xdb, /* 11011011 */
-	0xdb, /* 11011011 */
-	0xf3, /* 11110011 */
-	0x7e, /* 01111110 */
-	0x60, /* 01100000 */
-	0xc0, /* 11000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 238 0xee '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x1c, /* 00011100 */
-	0x30, /* 00110000 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0x7c, /* 01111100 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0x60, /* 01100000 */
-	0x30, /* 00110000 */
-	0x1c, /* 00011100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 239 0xef '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7c, /* 01111100 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0xc6, /* 11000110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 240 0xf0 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0xfe, /* 11111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 241 0xf1 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x7e, /* 01111110 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 242 0xf2 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x0c, /* 00001100 */
-	0x06, /* 00000110 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 243 0xf3 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x30, /* 00110000 */
-	0x60, /* 01100000 */
-	0x30, /* 00110000 */
-	0x18, /* 00011000 */
-	0x0c, /* 00001100 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 244 0xf4 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x0e, /* 00001110 */
-	0x1b, /* 00011011 */
-	0x1b, /* 00011011 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-
-	/* 245 0xf5 '' */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0xd8, /* 11011000 */
-	0xd8, /* 11011000 */
-	0xd8, /* 11011000 */
-	0x70, /* 01110000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 246 0xf6 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 247 0xf7 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x76, /* 01110110 */
-	0xdc, /* 11011100 */
-	0x00, /* 00000000 */
-	0x76, /* 01110110 */
-	0xdc, /* 11011100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 248 0xf8 '' */
-	0x00, /* 00000000 */
-	0x38, /* 00111000 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0x38, /* 00111000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 249 0xf9 '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 250 0xfa '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x18, /* 00011000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 251 0xfb '' */
-	0x00, /* 00000000 */
-	0x0f, /* 00001111 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0x0c, /* 00001100 */
-	0xec, /* 11101100 */
-	0x6c, /* 01101100 */
-	0x6c, /* 01101100 */
-	0x3c, /* 00111100 */
-	0x1c, /* 00011100 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 252 0xfc '' */
-	0x00, /* 00000000 */
-	0x6c, /* 01101100 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x36, /* 00110110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 253 0xfd '' */
-	0x00, /* 00000000 */
-	0x3c, /* 00111100 */
-	0x66, /* 01100110 */
-	0x0c, /* 00001100 */
-	0x18, /* 00011000 */
-	0x32, /* 00110010 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 254 0xfe '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x7e, /* 01111110 */
-	0x7e, /* 01111110 */
-	0x7e, /* 01111110 */
-	0x7e, /* 01111110 */
-	0x7e, /* 01111110 */
-	0x7e, /* 01111110 */
-	0x7e, /* 01111110 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-	/* 255 0xff '' */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-	0x00, /* 00000000 */
-
-};
-
--- linux-2.1.42/arch/m68k/config.in.orig	Sun May 18 23:05:12 1997
+++ linux-2.1.42/arch/m68k/config.in	Mon Jun  9 23:03:16 1997
@@ -54,13 +54,6 @@
 tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
 if [ "$CONFIG_AMIGA" = "y" ]; then
   bool 'Amiga AutoConfig Identification' CONFIG_ZORRO
-  bool 'Amiga OCS chipset support' CONFIG_AMIFB_OCS
-  bool 'Amiga ECS chipset support' CONFIG_AMIFB_ECS
-  bool 'Amiga AGA chipset support' CONFIG_AMIFB_AGA
-  bool 'Amiga Cybervision support' CONFIG_FB_CYBER
-  if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-    bool 'Amiga RetinaZ3 support' CONFIG_FB_RETINAZ3
-  fi
 #  bool 'Amiga GSP (TMS340x0) support' CONFIG_AMIGA_GSP
 #  if [ "$CONFIG_AMIGA_GSP" = "y" ]; then
 #    bool 'DMI Resolver support' CONFIG_GSP_RESOLVER
@@ -206,12 +199,18 @@
 
 source fs/Config.in
 
-mainmenu_option next_comment
-comment 'Character devices'
-
 define_bool CONFIG_VT y
 define_bool CONFIG_VT_CONSOLE y
 define_bool CONFIG_FB_CONSOLE y
+
+mainmenu_option next_comment
+comment 'Frame buffer devices'
+
+define_bool CONFIG_FB y
+source drivers/video/Config.in
+
+mainmenu_option next_comment
+comment 'Character devices'
 
 tristate 'Parallel printer support' CONFIG_PRINTER
 if [ "$CONFIG_AMIGA" = "y" ]; then
--- linux-2.1.42/arch/m68k/defconfig.orig	Sun May 18 23:05:14 1997
+++ linux-2.1.42/arch/m68k/defconfig	Mon Jun  9 23:03:16 1997
@@ -42,11 +42,6 @@
 CONFIG_BINFMT_AOUT=y
 CONFIG_BINFMT_ELF=y
 CONFIG_ZORRO=y
-CONFIG_AMIFB_OCS=y
-CONFIG_AMIFB_ECS=y
-CONFIG_AMIFB_AGA=y
-# CONFIG_FB_CYBER is not set
-# CONFIG_FB_RETINAZ3 is not set
 # CONFIG_AMIGA_GSP is not set
 # CONFIG_GSP_RESOLVER is not set
 # CONFIG_GSP_A2410 is not set
@@ -169,6 +164,19 @@
 # CONFIG_AFFS_FS is not set
 # CONFIG_ROMFS_FS is not set
 # CONFIG_UFS_FS is not set
+
+#
+# Frame buffer devices
+#
+CONFIG_FB_AMIGA=y
+CONFIG_FB_AMIGA_OCS=y
+CONFIG_FB_AMIGA_ECS=y
+CONFIG_FB_AMIGA_AGA=y
+# CONFIG_FB_CYBER is not set
+# CONFIG_FB_RETINAZ3 is not set
+CONFIG_FB_ATARI=y
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FBCON_ADVANCED is not set
 
 #
 # Character devices
--- linux-2.1.42/drivers/char/Makefile.orig	Sun Jun  8 22:58:36 1997
+++ linux-2.1.42/drivers/char/Makefile	Mon Jun  9 23:02:48 1997
@@ -29,8 +29,8 @@
 L_OBJS += abscon.o
 endif
 
-ifdef CONFIG_FB_CONSOLE
-L_OBJS += fbmem.o
+ifdef CONFIG_FB
+LX_OBJS += fbmem.o
 endif
 endif
 
--- linux-2.1.42/drivers/char/fbmem.c.orig	Sun May 18 23:09:24 1997
+++ linux-2.1.42/drivers/char/fbmem.c	Thu Jun 12 22:27:39 1997
@@ -8,6 +8,8 @@
  * for more details.
  */
 
+#include <linux/config.h>
+#include <linux/module.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/sched.h>
@@ -17,6 +19,9 @@
 #include <linux/mman.h>
 #include <linux/tty.h>
 #include <linux/init.h>
+#ifdef CONFIG_KERNELD
+#include <linux/kerneld.h>
+#endif
 
 #include <asm/setup.h>
 #include <asm/uaccess.h>
@@ -25,22 +30,50 @@
 
 #include <linux/fb.h>
 
-#define FB_MAJOR	29
 
-#define FB_MODES_SHIFT    5	/* 32 modes per framebuffer */
-#define FB_NUM_MINORS 	256	/* 256 Minors		    */
-#define FB_MAX		(FB_NUM_MINORS / (1 << FB_MODES_SHIFT))
+    /*
+     *  Frame buffer device initialization routines
+     */
+
+#ifdef CONFIG_FB_AMIGA
+extern int amiga_fb_init(u_long *mem_start);
+extern void amiga_video_setup(char *options, int *ints);
+#endif
+#ifdef CONFIG_FB_ATARI
+extern int atari_fb_init(u_long *mem_start);
+extern void atari_video_setup(char *options, int *ints);
+#endif
+#ifdef CONFIG_FB_CYBER
+extern int Cyber_fb_init(u_long *mem_start);
+extern void Cyber_video_setup(char *options, int *ints);
+#endif
+#ifdef CONFIG_FB_RETINAZ3
+extern int retz3_fb_init(u_long *mem_start);
+extern void retz3_video_setup(char *options, int *ints);
+#endif
+#ifdef CONFIG_FB_CLGEN
+extern int clgen_fb_init(u_long *mem_start);
+extern void clgen_video_setup(char *options, int *ints);
+#endif
+#ifdef CONFIG_FB_VIRTUAL
+extern int vfb_fb_init(u_long *mem_start);
+extern void vfb_video_setup(char *options, int *ints);
+#endif
+#ifdef CONFIG_GSP_RESOLVER
+extern void resolver_video_setup(char *options, int *ints);
+#endif
 
 #define GET_INODE(i) MKDEV(FB_MAJOR, (i) << FB_MODES_SHIFT)
 #define GET_FB_IDX(node) (MINOR(node) >> FB_MODES_SHIFT)
 #define GET_FB_VAR_IDX(node) (MINOR(node) & ((1 << FB_MODES_SHIFT)-1)) 
 
-struct fb_ops *registered_fb[FB_MAX];
-struct fb_var_screeninfo *registered_fb_var[FB_MAX];
-int registered_fb_var_num[FB_MAX];
+struct fb_info *registered_fb[FB_MAX];
+static int num_registered_fb = 0;
 int fb_curr_open[FB_MAX];
 int fb_open_count[FB_MAX];
 
+char con2fb_map[MAX_NR_CONSOLES];
+
 static inline int PROC_CONSOLE(void)
 {
 	if (!current->tty)
@@ -60,7 +93,7 @@
 fb_read(struct inode *inode, struct file *file, char *buf, unsigned long count)
 {
 	unsigned long p = file->f_pos;
-	struct fb_ops *fb = registered_fb[GET_FB_IDX(inode->i_rdev)];
+	struct fb_ops *fb = registered_fb[GET_FB_IDX(inode->i_rdev)]->fbops;
 	struct fb_fix_screeninfo fix;
 	char *base_addr;
 	int copy_size;
@@ -81,7 +114,7 @@
 	 unsigned long count)
 {
 	unsigned long p = file->f_pos;
-	struct fb_ops *fb = registered_fb[GET_FB_IDX(inode->i_rdev)];
+	struct fb_ops *fb = registered_fb[GET_FB_IDX(inode->i_rdev)]->fbops;
 	struct fb_fix_screeninfo fix;
 	char *base_addr;
 	int copy_size;
@@ -97,16 +130,51 @@
 }
 
 
+static void set_con2fb_map(int unit, int newidx)
+{
+    int oldidx = con2fb_map[unit];
+    struct fb_info *oldfb, *newfb;
+    struct vc_data *conp;
+
+    if (newidx != con2fb_map[unit]) {
+       oldfb = registered_fb[oldidx];
+       newfb = registered_fb[newidx];
+       if (newfb->fbops->fb_open(newidx))
+	   return;
+       oldfb->fbops->fb_release(oldidx);
+       conp = fb_display[unit].conp;
+       con2fb_map[unit] = newidx;
+       fb_display[unit] = *(newfb->disp);
+       fb_display[unit].conp = conp;
+       fb_display[unit].fb_info = newfb;
+       if (!newfb->changevar)
+	   newfb->changevar = oldfb->changevar;
+       /* tell console var has changed */
+       if (newfb->changevar)
+	   newfb->changevar(unit);
+    }
+}
+
+#ifdef CONFIG_KERNELD
+static void try_to_load(int fb)
+{
+    char modname[16];
+
+    sprintf(modname, "fb%d", fb);
+    request_module(modname);
+}
+#endif
+
 static int 
 fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
 	 unsigned long arg)
 {
-	struct fb_ops *fb = registered_fb[GET_FB_IDX(inode->i_rdev)];
+	struct fb_ops *fb = registered_fb[GET_FB_IDX(inode->i_rdev)]->fbops;
 	struct fb_cmap cmap;
 	struct fb_var_screeninfo var;
 	struct fb_fix_screeninfo fix;
-
-	int i,fbidx,vidx;
+	struct fb_con2fbmap con2fb;
+	int i, fbidx, vidx;
 	
 	if (! fb)
 		return -ENODEV;
@@ -120,7 +188,7 @@
 		if (! vidx) /* ask device driver for current */
 			i=fb->fb_get_var(&var, PROC_CONSOLE());
 		else
-			var=registered_fb_var[fbidx][vidx-1];
+			var=registered_fb[fbidx]->fbvar[vidx-1];
 		copy_to_user((void *) arg, &var, sizeof(var));
 		return i;
 	case FBIOPUT_VSCREENINFO:
@@ -133,7 +201,7 @@
 		fbidx=GET_FB_IDX(inode->i_rdev);
 		vidx=GET_FB_VAR_IDX(inode->i_rdev);
 		if (! i && vidx)
-			registered_fb_var[fbidx][vidx-1]=var;
+			registered_fb[fbidx]->fbvar[vidx-1]=var;
 		return i;
 	case FBIOGET_FSCREENINFO:
 		i = verify_area(VERIFY_WRITE, (void *) arg, 
@@ -192,8 +260,40 @@
 		fbidx=GET_FB_IDX(inode->i_rdev);
 		vidx=GET_FB_VAR_IDX(inode->i_rdev);
 		if (! i && vidx)
-			registered_fb_var[fbidx][vidx-1]=var;
+			registered_fb[fbidx]->fbvar[vidx-1]=var;
 		return i;
+	case FBIOGET_CON2FBMAP:
+		i = verify_area(VERIFY_WRITE, (void *)arg,
+				sizeof(struct fb_con2fbmap));
+		if (i) return i;
+		copy_from_user(&con2fb, (void *)arg, sizeof(con2fb));
+		if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES)
+		    return -EINVAL;
+		con2fb.framebuffer = con2fb_map[con2fb.console-1];
+		copy_to_user((void *)arg, &con2fb, sizeof(con2fb));
+		return 0;
+	case FBIOPUT_CON2FBMAP:
+		i = verify_area(VERIFY_READ, (void *)arg,
+				sizeof(struct fb_con2fbmap));
+		if (i) return i;
+		copy_from_user(&con2fb, (void *)arg, sizeof(con2fb));
+		if (con2fb.console < 0 || con2fb.console > MAX_NR_CONSOLES)
+		    return -EINVAL;
+		if (con2fb.framebuffer < 0 || con2fb.framebuffer >= FB_MAX)
+		    return -EINVAL;
+#ifdef CONFIG_KERNELD
+		if (!registered_fb[con2fb.framebuffer])
+		    try_to_load(con2fb.framebuffer);
+#endif
+		if (!registered_fb[con2fb.framebuffer])
+		    return -EINVAL;
+		if (con2fb.console != 0)
+		    set_con2fb_map(con2fb.console-1, con2fb.framebuffer);
+		else
+		    /* set them all */
+		    for (i = 0; i < MAX_NR_CONSOLES; i++)
+			set_con2fb_map(i, con2fb.framebuffer);
+		return 0;
 	default:
 		return (fb->fb_ioctl(inode, file, cmd, arg, PROC_CONSOLE()));
 	}
@@ -202,7 +302,7 @@
 static int 
 fb_mmap(struct inode *inode, struct file *file, struct vm_area_struct * vma)
 {
-	struct fb_ops *fb = registered_fb[GET_FB_IDX(inode->i_rdev)];
+	struct fb_ops *fb = registered_fb[GET_FB_IDX(inode->i_rdev)]->fbops;
 	struct fb_fix_screeninfo fix;
 
 	if (! fb)
@@ -231,17 +331,28 @@
 {
 	int fbidx=GET_FB_IDX(inode->i_rdev);
 	int vidx=GET_FB_VAR_IDX(inode->i_rdev);
-	struct fb_ops *fb = registered_fb[fbidx];
+	struct fb_ops *fb;
 	int err;
-	
+
+#ifdef CONFIG_KERNELD
+	if (!registered_fb[fbidx])
+		try_to_load(fbidx);
+#endif
+	if (!registered_fb[fbidx])
+		return -ENODEV;
+	fb = registered_fb[fbidx]->fbops;
+
 	if (! vidx)		/* fb?current always succeeds */ 
 		return 0;
-	if (vidx > registered_fb_var_num[fbidx])
+	if (vidx > registered_fb[fbidx]->fbvar_num)
 		return -EINVAL;
 	if (fb_curr_open[fbidx] && fb_curr_open[fbidx] != vidx)
 		return -EBUSY;
+	if ((err = fb->fb_open(fbidx)))
+		return(err);
  	if (file->f_mode & 2) /* only set parameters if opened writeable */
-		if ((err=fb->fb_set_var(registered_fb_var[fbidx] + vidx-1, PROC_CONSOLE())))
+		if ((err=fb->fb_set_var(&registered_fb[fbidx]->fbvar[vidx-1],
+					PROC_CONSOLE())))
 			return err;
 	fb_curr_open[fbidx] = vidx;
 	fb_open_count[fbidx]++;
@@ -257,6 +368,7 @@
 		return 0;
 	if (! (--fb_open_count[fbidx]))
 		fb_curr_open[fbidx]=0;
+	registered_fb[fbidx]->fbops->fb_release(fbidx);
 	return 0;
 }
 
@@ -274,30 +386,45 @@
 };
 
 int
-register_framebuffer(char *id, int *node, struct fb_ops *fbops, int fbvar_num, 
-		     struct fb_var_screeninfo *fbvar)
+register_framebuffer(struct fb_info *fb_info)
 {
-	int i;
+	int i, j;
+	static int fb_ever_opened[FB_MAX];
+
+	if (num_registered_fb == FB_MAX)
+		return -ENXIO;
+	num_registered_fb++;
 	for (i = 0 ; i < FB_MAX; i++)
-		if (! registered_fb[i])
+		if (!registered_fb[i])
 			break;
-	if (i == FB_MAX)
-		return -ENXIO;
-	registered_fb[i]=fbops;
-	registered_fb_var[i]=fbvar;
-	registered_fb_var_num[i]=fbvar_num;
-	*node=GET_INODE(i);
+	fb_info->node=GET_INODE(i);
+	registered_fb[i] = fb_info;
+	if (!fb_ever_opened[i]) {
+		/*
+		 *  We assume initial frame buffer devices can be opened this
+		 *  many times
+		 */
+		for (j = 0; j < MAX_NR_CONSOLES; j++)
+			if (con2fb_map[j] == i)
+				fb_info->fbops->fb_open(i);
+		fb_ever_opened[i] = 1;
+	}
 	return 0;
 }
 
 int
-unregister_framebuffer(int node)
+unregister_framebuffer(const struct fb_info *fb_info)
 {
-	int i=GET_FB_IDX(node);
-	if (! registered_fb[i])
+	int i, j;
+
+	i = GET_FB_IDX(fb_info->node);
+	for (j = 0; j < MAX_NR_CONSOLES; j++)
+		if (con2fb_map[j] == i)
+			return -EBUSY;
+	if (!registered_fb[i])
 		return -EINVAL; 
 	registered_fb[i]=NULL;
-	registered_fb_var[i]=NULL;
+	num_registered_fb--;
 	return 0;
 }
 
@@ -308,3 +435,106 @@
 		printk("unable to get major %d for fb devs\n", FB_MAJOR);
 }
 
+
+    /*
+     *  Probe for all builtin frame buffer devices
+     */
+
+int probe_framebuffers(u_long *kmem_start)
+{
+#ifdef CONFIG_FB_AMIGA
+    amiga_fb_init(kmem_start);
+#endif
+#ifdef CONFIG_FB_ATARI
+    atari_fb_init(kmem_start);
+#endif
+#ifdef CONFIG_FB_CYBER
+    Cyber_fb_init(kmem_start);
+#endif
+#ifdef CONFIG_FB_RETINAZ3
+    retz3_fb_init(kmem_start);
+#endif
+#ifdef CONFIG_FB_CLGEN
+    clgen_fb_init(kmem_start);
+#endif
+#ifdef CONFIG_FB_VIRTUAL
+    virtual_fb_init(kmem_start);
+#endif
+    return(num_registered_fb);
+}
+
+
+    /*
+     *  Command line options
+     */
+
+__initfunc(void video_setup(char *options, int *ints))
+{
+    if (!options || !*options)
+	return;
+
+    if (!strncmp(options, "map:", 4)) {
+	int i, j;
+	options += 4;
+	if (*options)
+	    for (i = 0, j = 0; i < MAX_NR_CONSOLES; i++) {
+		if (!options[j])
+		    j = 0;
+		con2fb_map[i] = (options[j++]-'0') % FB_MAX;
+	    }
+	return;
+    }
+
+#ifdef CONFIG_FB_AMIGA
+    if (!strncmp(options, "amifb:", 6)) {
+	amiga_video_setup(options+6, ints);
+	return;
+    }
+#endif
+#ifdef CONFIG_FB_ATARI
+    if (!strncmp(options, "atafb:", 6)) {
+	atari_video_setup(options+6, ints);
+	return;
+    }
+#endif
+#ifdef CONFIG_FB_CYBER
+    if (!strncmp(options, "cyber:", 6)) {
+	Cyber_video_setup(options+6, ints);
+	return;
+    }
+#endif
+#ifdef CONFIG_FB_RETINAZ3
+    if (!strncmp(options, "retz3:", 6)) {
+	retz3_video_setup(options+6, ints);
+	return;
+    }
+#endif
+#ifdef CONFIG_FB_CLGEN
+    if (!strncmp(options, "clgen:", 6)) {
+	clgen_video_setup(options+6, ints);
+	return;
+    }
+#endif
+#ifdef CONFIG_FB_VIRTUAL
+    if (!strncmp(options, "vfb:", 4)) {
+	vfb_video_setup(options+4, ints);
+	return;
+    }
+#endif
+
+    /* Not a real frame buffer device... */
+#ifdef CONFIG_GSP_RESOLVER
+    if (!strncmp(options, "resolver:", 9)) {
+	resolver_video_setup(options+9, ints);
+	return;
+    }
+#endif
+}
+
+
+    /*
+     *  Visible symbols for modules
+     */
+
+EXPORT_SYMBOL(register_framebuffer);
+EXPORT_SYMBOL(unregister_framebuffer);
--- linux-2.1.42/drivers/video/amifb.c.orig	Mon Jun  9 23:02:49 1997
+++ linux-2.1.42/drivers/video/amifb.c	Thu Jun 12 22:48:03 1997
@@ -0,0 +1,3613 @@
+/*
+ * linux/drivers/video/amifb.c -- Amiga builtin chipset frame buffer device
+ *
+ *    Copyright (C) 1995 Geert Uytterhoeven
+ *
+ *          with work by Roman Zippel
+ *
+ *
+ * This file is based on the Atari frame buffer device (atafb.c):
+ *
+ *    Copyright (C) 1994 Martin Schaller
+ *                       Roman Hodek
+ *
+ *          with work by Andreas Schwab
+ *                       Guenther Kelleter
+ *
+ * and on the original Amiga console driver (amicon.c):
+ *
+ *    Copyright (C) 1993 Hamish Macdonald
+ *                       Greg Harp
+ *    Copyright (C) 1994 David Carter [carter@compsci.bristol.ac.uk]
+ *
+ *          with work by William Rucklidge (wjr@cs.cornell.edu)
+ *                       Geert Uytterhoeven
+ *                       Jes Sorensen (jds@kom.auc.dk)
+ *
+ *
+ * History:
+ *
+ *   - 24 Jul 96: Copper generates now vblank interrupt and
+ *                VESA Power Saving Protocol is fully implemented
+ *   - 14 Jul 96: Rework and hopefully last ECS bugs fixed
+ *   -  7 Mar 96: Hardware sprite support by Roman Zippel
+ *   - 18 Feb 96: OCS and ECS support by Roman Zippel
+ *                Hardware functions completely rewritten
+ *   -  2 Dec 95: AGA version by Geert Uytterhoeven
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file COPYING in the main directory of this archive
+ * for more details.
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/string.h>
+#include <linux/mm.h>
+#include <linux/tty.h>
+#include <linux/malloc.h>
+#include <linux/delay.h>
+#include <linux/config.h>
+#include <linux/interrupt.h>
+#include <linux/fb.h>
+#include <linux/init.h>
+
+#include <asm/uaccess.h>
+#include <asm/system.h>
+#include <asm/irq.h>
+#include <asm/amigahw.h>
+#include <asm/amigaints.h>
+#include <asm/setup.h>
+
+#define DEBUG
+
+#if !defined(CONFIG_FB_AMIGA_OCS) && !defined(CONFIG_FB_AMIGA_ECS) && !defined(CONFIG_FB_AMIGA_AGA)
+#define CONFIG_FB_AMIGA_OCS   /* define at least one fb driver, this will change later */
+#endif
+
+#if !defined(CONFIG_FB_AMIGA_OCS)
+#  define IS_OCS (0)
+#elif defined(CONFIG_FB_AMIGA_ECS) || defined(CONFIG_FB_AMIGA_AGA)
+#  define IS_OCS (chipset == TAG_OCS)
+#else
+#  define CONFIG_FB_AMIGA_OCS_ONLY
+#  define IS_OCS (1)
+#endif
+
+#if !defined(CONFIG_FB_AMIGA_ECS)
+#  define IS_ECS (0)
+#elif defined(CONFIG_FB_AMIGA_OCS) || defined(CONFIG_FB_AMIGA_AGA)
+#  define IS_ECS (chipset == TAG_ECS)
+#else
+#  define CONFIG_FB_AMIGA_ECS_ONLY
+#  define IS_ECS (1)
+#endif
+
+#if !defined(CONFIG_FB_AMIGA_AGA)
+#  define IS_AGA (0)
+#elif defined(CONFIG_FB_AMIGA_OCS) || defined(CONFIG_FB_AMIGA_ECS)
+#  define IS_AGA (chipset == TAG_AGA)
+#else
+#  define CONFIG_FB_AMIGA_AGA_ONLY
+#  define IS_AGA (1)
+#endif
+
+/*******************************************************************************
+
+
+   Generic video timings
+   ---------------------
+
+   Timings used by the frame buffer interface:
+
+   +----------+---------------------------------------------+----------+-------+
+   |          |                ^                            |          |       |
+   |          |                |upper_margin                |          |       |
+   |          |                                            |          |       |
+   +----------###############################################----------+-------+
+   |          #                ^                            #          |       |
+   |          #                |                            #          |       |
+   |          #                |                            #          |       |
+   |          #                |                            #          |       |
+   |   left   #                |                            #  right   | hsync |
+   |  margin  #                |       xres                 #  margin  |  len  |
+   |<-------->#<---------------+--------------------------->#<-------->|<----->|
+   |          #                |                            #          |       |
+   |          #                |                            #          |       |
+   |          #                |                            #          |       |
+   |          #                |yres                        #          |       |
+   |          #                |                            #          |       |
+   |          #                |                            #          |       |
+   |          #                |                            #          |       |
+   |          #                |                            #          |       |
+   |          #                |                            #          |       |
+   |          #                |                            #          |       |
+   |          #                |                            #          |       |
+   |          #                |                            #          |       |
+   |          #                                            #          |       |
+   +----------###############################################----------+-------+
+   |          |                ^                            |          |       |
+   |          |                |lower_margin                |          |       |
+   |          |                                            |          |       |
+   +----------+---------------------------------------------+----------+-------+
+   |          |                ^                            |          |       |
+   |          |                |vsync_len                   |          |       |
+   |          |                                            |          |       |
+   +----------+---------------------------------------------+----------+-------+
+
+
+   Amiga video timings
+   -------------------
+
+   The Amiga native chipsets uses another timing scheme:
+
+      - hsstrt:   Start of horizontal synchronization pulse
+      - hsstop:   End of horizontal synchronization pulse
+      - htotal:   Last value on the line (i.e. line length = htotal+1)
+      - vsstrt:   Start of vertical synchronization pulse
+      - vsstop:   End of vertical synchronization pulse
+      - vtotal:   Last line value (i.e. number of lines = vtotal+1)
+      - hcenter:  Start of vertical retrace for interlace
+
+   You can specify the blanking timings independently. Currently I just set
+   them equal to the respective synchronization values:
+
+      - hbstrt:   Start of horizontal blank
+      - hbstop:   End of horizontal blank
+      - vbstrt:   Start of vertical blank
+      - vbstop:   End of vertical blank
+
+   Horizontal values are in color clock cycles (280 ns), vertical values are in
+   scanlines.
+
+   (0, 0) is somewhere in the upper-left corner :-)
+
+
+   Amiga visible window definitions
+   --------------------------------
+
+   Currently I only have values for AGA, SHRES (28 MHz dotclock). Feel free to
+   make corrections and/or additions.
+
+   Within the above synchronization specifications, the visible window is
+   defined by the following parameters (actual register resolutions may be
+   different; all horizontal values are normalized with respect to the pixel
+   clock):
+
+      - diwstrt_h:   Horizontal start of the visible window
+      - diwstop_h:   Horizontal stop+1(*) of the visible window
+      - diwstrt_v:   Vertical start of the visible window
+      - diwstop_v:   Vertical stop of the visible window
+      - ddfstrt:     Horizontal start of display DMA
+      - ddfstop:     Horizontal stop of display DMA
+      - hscroll:     Horizontal display output delay
+
+   Sprite positioning:
+
+      - sprstrt_h:   Horizontal start-4 of sprite
+      - sprstrt_v:   Vertical start of sprite
+
+   (*) Even Commodore did it wrong in the AGA monitor drivers by not adding 1.
+
+   Horizontal values are in dotclock cycles (35 ns), vertical values are in
+   scanlines.
+
+   (0, 0) is somewhere in the upper-left corner :-)
+
+
+   Dependencies (AGA, SHRES (35 ns dotclock))
+   -------------------------------------------
+
+   Since there are much more parameters for the Amiga display than for the
+   frame buffer interface, there must be some dependencies among the Amiga
+   display parameters. Here's what I found out:
+
+      - ddfstrt and ddfstop are best aligned to 64 pixels.
+      - the chipset needs 64+4 horizontal pixels after the DMA start before the
+        first pixel is output, so diwstrt_h = ddfstrt+64+4 if you want to
+        display the first pixel on the line too. Increase diwstrt_h for virtual
+        screen panning.
+      - the display DMA always fetches 64 pixels at a time (fmode = 3).
+      - ddfstop is ddfstrt+#pixels-64.
+      - diwstop_h = diwstrt_h+xres+1. Because of the additional 1 this can be 1
+        more than htotal.
+      - hscroll simply adds a delay to the display output. Smooth horizontal
+        panning needs an extra 64 pixels on the left to prefetch the pixels that
+        `fall off' on the left.
+      - if ddfstrt < 192, the sprite DMA cycles are all stolen by the bitplane
+        DMA, so it's best to make the DMA start as late as possible.
+      - you really don't want to make ddfstrt < 128, since this will steal DMA
+        cycles from the other DMA channels (audio, floppy and Chip RAM refresh).
+      - I make diwstop_h and diwstop_v as large as possible.
+
+   General dependencies
+   --------------------
+
+      - all values are SHRES pixel (35ns)
+
+                  table 1:fetchstart  table 2:prefetch    table 3:fetchsize
+                  ------------------  ----------------    -----------------
+   Pixclock     # SHRES|HIRES|LORES # SHRES|HIRES|LORES # SHRES|HIRES|LORES
+   -------------#------+-----+------#------+-----+------#------+-----+------
+   Bus width 1x #   16 |  32 |  64  #   16 |  32 |  64  #   64 |  64 |  64
+   Bus width 2x #   32 |  64 | 128  #   32 |  64 |  64  #   64 |  64 | 128
+   Bus width 4x #   64 | 128 | 256  #   64 |  64 |  64  #   64 | 128 | 256
+
+      - chipset needs 4 pixels before the first pixel is output
+      - ddfstrt must be aligned to fetchstart (table 1)
+      - chipset needs also prefetch (table 2) to get first pixel data, so
+        ddfstrt = ((diwstrt_h-4) & -fetchstart) - prefetch
+      - for horizontal panning decrease diwstrt_h
+      - the length of a fetchline must be aligned to fetchsize (table 3)
+      - if fetchstart is smaller than fetchsize, then ddfstrt can a little bit
+        moved to optimize use of dma (usefull for OCS/ECS overscan displays)
+      - ddfstop is ddfstrt+ddfsize-fetchsize
+      - If C= didn't change anything for AGA, then at following positions the
+        dma bus is allready used:
+        ddfstrt <  48 -> memory refresh
+                <  96 -> disk dma
+                < 160 -> audio dma
+                < 192 -> sprite 0 dma
+                < 416 -> sprite dma (32 per sprite)
+      - in accordance with the hardware reference manual a hardware stop is at
+        192, but AGA (ECS?) can go below this.
+
+   DMA priorities
+   --------------
+
+   Since there are limits on the earliest start value for display DMA and the
+   display of sprites, I use the following policy on horizontal panning and
+   the hardware cursor:
+
+      - if you want to start display DMA too early, you loose the ability to
+        do smooth horizontal panning (xpanstep 1 -> 64).
+      - if you want to go even further, you loose the hardware cursor too.
+
+   IMHO a hardware cursor is more important for X than horizontal scrolling,
+   so that's my motivation.
+
+
+   Implementation
+   --------------
+
+   ami_decode_var() converts the frame buffer values to the Amiga values. It's
+   just a `straightforward' implementation of the above rules.
+
+
+   Standard VGA timings
+   --------------------
+
+               xres  yres    left  right  upper  lower    hsync    vsync
+               ----  ----    ----  -----  -----  -----    -----    -----
+      80x25     720   400      27     45     35     12      108        2
+      80x30     720   480      27     45     30      9      108        2
+
+   These were taken from a XFree86 configuration file, recalculated for a 28 MHz
+   dotclock (Amigas don't have a 25 MHz dotclock) and converted to frame buffer
+   generic timings.
+
+   As a comparison, graphics/monitor.h suggests the following:
+
+               xres  yres    left  right  upper  lower    hsync    vsync
+               ----  ----    ----  -----  -----  -----    -----    -----
+
+      VGA       640   480      52    112     24     19    112 -      2 +
+      VGA70     640   400      52    112     27     21    112 -      2 -
+
+
+   Sync polarities
+   ---------------
+
+      VSYNC    HSYNC    Vertical size    Vertical total
+      -----    -----    -------------    --------------
+        +        +           Reserved          Reserved
+        +        -                400               414
+        -        +                350               362
+        -        -                480               496
+
+   Source: CL-GD542X Technical Reference Manual, Cirrus Logic, Oct 1992
+
+
+   Broadcast video timings
+   -----------------------
+
+   According to the CCIR and RETMA specifications, we have the following values:
+
+   CCIR -> PAL
+   -----------
+
+      - a scanline is 64 s long, of which 52.48 s are visible. This is about
+        736 visible 70 ns pixels per line.
+      - we have 625 scanlines, of which 575 are visible (interlaced); after
+        rounding this becomes 576.
+
+   RETMA -> NTSC
+   -------------
+
+      - a scanline is 63.5 s long, of which 53.5 s are visible.  This is about
+        736 visible 70 ns pixels per line.
+      - we have 525 scanlines, of which 485 are visible (interlaced); after
+        rounding this becomes 484.
+
+   Thus if you want a PAL compatible display, you have to do the following:
+
+      - set the FB_SYNC_BROADCAST flag to indicate that standard broadcast
+        timings are to be used.
+      - make sure upper_margin+yres+lower_margin+vsync_len = 625 for an
+        interlaced, 312 for a non-interlaced and 156 for a doublescanned
+        display.
+      - make sure left_margin+xres+right_margin+hsync_len = 1816 for a SHRES,
+        908 for a HIRES and 454 for a LORES display.
+      - the left visible part begins at 360 (SHRES; HIRES:180, LORES:90),
+        left_margin+2*hsync_len must be greater or equal.
+      - the upper visible part begins at 48 (interlaced; non-interlaced:24,
+        doublescanned:12), upper_margin+2*vsync_len must be greater or equal.
+      - ami_encode_var() calculates margins with a hsync of 5320 ns and a vsync
+        of 4 scanlines
+
+   The settings for a NTSC compatible display are straightforward.
+
+   Note that in a strict sense the PAL and NTSC standards only define the
+   encoding of the color part (chrominance) of the video signal and don't say
+   anything about horizontal/vertical synchronization nor refresh rates.
+
+
+                                                            -- Geert --
+
+*******************************************************************************/
+
+
+	/*
+	 * Custom Chipset Definitions
+	 */
+
+#define CUSTOM_OFS(fld) ((long)&((struct CUSTOM*)0)->fld)
+
+	/*
+	 * BPLCON0 -- Bitplane Control Register 0
+	 */
+
+#define BPC0_HIRES	(0x8000)
+#define BPC0_BPU2	(0x4000) /* Bit plane used count */
+#define BPC0_BPU1	(0x2000)
+#define BPC0_BPU0	(0x1000)
+#define BPC0_HAM	(0x0800) /* HAM mode */
+#define BPC0_DPF	(0x0400) /* Double playfield */
+#define BPC0_COLOR	(0x0200) /* Enable colorburst */
+#define BPC0_GAUD	(0x0100) /* Genlock audio enable */
+#define BPC0_UHRES	(0x0080) /* Ultrahi res enable */
+#define BPC0_SHRES	(0x0040) /* Super hi res mode */
+#define BPC0_BYPASS	(0x0020) /* Bypass LUT - AGA */
+#define BPC0_BPU3	(0x0010) /* AGA */
+#define BPC0_LPEN	(0x0008) /* Light pen enable */
+#define BPC0_LACE	(0x0004) /* Interlace */
+#define BPC0_ERSY	(0x0002) /* External resync */
+#define BPC0_ECSENA	(0x0001) /* ECS enable */
+
+	/*
+	 * BPLCON2 -- Bitplane Control Register 2
+	 */
+
+#define BPC2_ZDBPSEL2	(0x4000) /* Bitplane to be used for ZD - AGA */
+#define BPC2_ZDBPSEL1	(0x2000)
+#define BPC2_ZDBPSEL0	(0x1000)
+#define BPC2_ZDBPEN	(0x0800) /* Enable ZD with ZDBPSELx - AGA */
+#define BPC2_ZDCTEN	(0x0400) /* Enable ZD with palette bit #31 - AGA */
+#define BPC2_KILLEHB	(0x0200) /* Kill EHB mode - AGA */
+#define BPC2_RDRAM	(0x0100) /* Color table accesses read, not write - AGA */
+#define BPC2_SOGEN	(0x0080) /* SOG output pin high - AGA */
+#define BPC2_PF2PRI	(0x0040) /* PF2 priority over PF1 */
+#define BPC2_PF2P2	(0x0020) /* PF2 priority wrt sprites */
+#define BPC2_PF2P1	(0x0010)
+#define BPC2_PF2P0	(0x0008)
+#define BPC2_PF1P2	(0x0004) /* ditto PF1 */
+#define BPC2_PF1P1	(0x0002)
+#define BPC2_PF1P0	(0x0001)
+
+	/*
+	 * BPLCON3 -- Bitplane Control Register 3 (AGA)
+	 */
+
+#define BPC3_BANK2	(0x8000) /* Bits to select color register bank */
+#define BPC3_BANK1	(0x4000)
+#define BPC3_BANK0	(0x2000)
+#define BPC3_PF2OF2	(0x1000) /* Bits for color table offset when PF2 */
+#define BPC3_PF2OF1	(0x0800)
+#define BPC3_PF2OF0	(0x0400)
+#define BPC3_LOCT	(0x0200) /* Color register writes go to low bits */
+#define BPC3_SPRES1	(0x0080) /* Sprite resolution bits */
+#define BPC3_SPRES0	(0x0040)
+#define BPC3_BRDRBLNK	(0x0020) /* Border blanked? */
+#define BPC3_BRDRTRAN	(0x0010) /* Border transparent? */
+#define BPC3_ZDCLKEN	(0x0004) /* ZD pin is 14 MHz (HIRES) clock output */
+#define BPC3_BRDRSPRT	(0x0002) /* Sprites in border? */
+#define BPC3_EXTBLKEN	(0x0001) /* BLANK programmable */
+
+	/*
+	 * BPLCON4 -- Bitplane Control Register 4 (AGA)
+	 */
+
+#define BPC4_BPLAM7	(0x8000) /* bitplane color XOR field */
+#define BPC4_BPLAM6	(0x4000)
+#define BPC4_BPLAM5	(0x2000)
+#define BPC4_BPLAM4	(0x1000)
+#define BPC4_BPLAM3	(0x0800)
+#define BPC4_BPLAM2	(0x0400)
+#define BPC4_BPLAM1	(0x0200)
+#define BPC4_BPLAM0	(0x0100)
+#define BPC4_ESPRM7	(0x0080) /* 4 high bits for even sprite colors */
+#define BPC4_ESPRM6	(0x0040)
+#define BPC4_ESPRM5	(0x0020)
+#define BPC4_ESPRM4	(0x0010)
+#define BPC4_OSPRM7	(0x0008) /* 4 high bits for odd sprite colors */
+#define BPC4_OSPRM6	(0x0004)
+#define BPC4_OSPRM5	(0x0002)
+#define BPC4_OSPRM4	(0x0001)
+
+	/*
+	 * BEAMCON0 -- Beam Control Register
+	 */
+
+#define BMC0_HARDDIS	(0x4000) /* Disable hardware limits */
+#define BMC0_LPENDIS	(0x2000) /* Disable light pen latch */
+#define BMC0_VARVBEN	(0x1000) /* Enable variable vertical blank */
+#define BMC0_LOLDIS	(0x0800) /* Disable long/short line toggle */
+#define BMC0_CSCBEN	(0x0400) /* Composite sync/blank */
+#define BMC0_VARVSYEN	(0x0200) /* Enable variable vertical sync */
+#define BMC0_VARHSYEN	(0x0100) /* Enable variable horizontal sync */
+#define BMC0_VARBEAMEN	(0x0080) /* Enable variable beam counters */
+#define BMC0_DUAL	(0x0040) /* Enable alternate horizontal beam counter */
+#define BMC0_PAL	(0x0020) /* Set decodes for PAL */
+#define BMC0_VARCSYEN	(0x0010) /* Enable variable composite sync */
+#define BMC0_BLANKEN	(0x0008) /* Blank enable (no longer used on AGA) */
+#define BMC0_CSYTRUE	(0x0004) /* CSY polarity */
+#define BMC0_VSYTRUE	(0x0002) /* VSY polarity */
+#define BMC0_HSYTRUE	(0x0001) /* HSY polarity */
+
+
+	/*
+	 * FMODE -- Fetch Mode Control Register (AGA)
+	 */
+
+#define FMODE_SSCAN2	(0x8000) /* Sprite scan-doubling */
+#define FMODE_BSCAN2	(0x4000) /* Use PF2 modulus every other line */
+#define FMODE_SPAGEM	(0x0008) /* Sprite page mode */
+#define FMODE_SPR32	(0x0004) /* Sprite 32 bit fetch */
+#define FMODE_BPAGEM	(0x0002) /* Bitplane page mode */
+#define FMODE_BPL32	(0x0001) /* Bitplane 32 bit fetch */
+
+	/*
+	 * Tags used to indicate a specific Pixel Clock
+	 *
+	 * clk_shift is the shift value to get the timings in 35 ns units
+	 */
+
+enum { TAG_SHRES, TAG_HIRES, TAG_LORES };
+
+	/*
+	 * Tags used to indicate the specific chipset
+	 */
+
+enum { TAG_OCS, TAG_ECS, TAG_AGA };
+
+	/*
+	 * Tags used to indicate the memory bandwidth
+	 */
+
+enum { TAG_FMODE_1, TAG_FMODE_2, TAG_FMODE_4 };
+
+
+	/*
+	 * Clock Definitions, Maximum Display Depth
+	 *
+	 * These depend on the E-Clock or the Chipset, so they are filled in
+	 * dynamically
+	 */
+
+static u_long pixclock[3];	/* SHRES/HIRES/LORES: index = clk_shift */
+static u_short maxdepth[3];	/* SHRES/HIRES/LORES: index = clk_shift */
+static u_short maxfmode, chipset;
+
+
+	/*
+	 * Broadcast Video Timings
+	 *
+	 * Horizontal values are in 35 ns (SHRES) units
+	 * Vertical values are in interlaced scanlines
+	 */
+
+#define PAL_DIWSTRT_H	(360)	/* PAL Window Limits */
+#define PAL_DIWSTRT_V	(48)
+#define PAL_HTOTAL	(1816)
+#define PAL_VTOTAL	(625)
+
+#define NTSC_DIWSTRT_H	(360)	/* NTSC Window Limits */
+#define NTSC_DIWSTRT_V	(40)
+#define NTSC_HTOTAL	(1816)
+#define NTSC_VTOTAL	(525)
+
+
+	/*
+	 * Monitor Specifications
+	 *
+	 * These are typical for a `generic' Amiga monitor (e.g. A1960)
+	 */
+
+static long vfmin = 50, vfmax = 90, hfmin = 15000, hfmax = 38000;
+
+
+	/*
+	 * Various macros
+	 */
+
+#define up2(v)		(((v)+1) & -2)
+#define down2(v)	((v) & -2)
+#define div2(v)		((v)>>1)
+#define mod2(v)		((v) & 1)
+
+#define up4(v)		(((v)+3) & -4)
+#define down4(v)	((v) & -4)
+#define mul4(v)		((v)<<2)
+#define div4(v)		((v)>>2)
+#define mod4(v)		((v) & 3)
+
+#define up8(v)		(((v)+7) & -8)
+#define down8(v)	((v) & -8)
+#define div8(v)		((v)>>3)
+#define mod8(v)		((v) & 7)
+
+#define up16(v)		(((v)+15) & -16)
+#define down16(v)	((v) & -16)
+#define div16(v)	((v)>>4)
+#define mod16(v)	((v) & 15)
+
+#define up32(v)		(((v)+31) & -32)
+#define down32(v)	((v) & -32)
+#define div32(v)	((v)>>5)
+#define mod32(v)	((v) & 31)
+
+#define up64(v)		(((v)+63) & -64)
+#define down64(v)	((v) & -64)
+#define div64(v)	((v)>>6)
+#define mod64(v)	((v) & 63)
+
+#define upx(x,v)	(((v)+(x)-1) & -(x))
+#define downx(x,v)	((v) & -(x))
+#define modx(x,v)	((v) & ((x)-1))
+
+/* if x1 is not a constant, this macro won't make real sense :-) */
+#define DIVUL(x1, x2) ({int res; asm("divul %1,%2,%3": "=d" (res): \
+	"d" (x2), "d" ((long)((x1)/0x100000000ULL)), "0" ((long)(x1))); res;})
+
+#define min(a, b)	((a) < (b) ? (a) : (b))
+#define max(a, b)	((a) > (b) ? (a) : (b))
+
+#define highw(x)	((u_long)(x)>>16 & 0xffff)
+#define loww(x)		((u_long)(x) & 0xffff)
+
+#define arraysize(x)	(sizeof(x)/sizeof(*(x)))
+
+#define VBlankOn()	custom.intena = IF_SETCLR|IF_COPER
+#define VBlankOff()	custom.intena = IF_COPER
+
+
+	/*
+	 * Chip RAM we reserve for the Frame Buffer
+	 *
+	 * This defines the Maximum Virtual Screen Size
+	 * (Setable per kernel options?)
+	 */
+
+#define VIDEOMEMSIZE_AGA_2M	(1310720) /* AGA (2MB) : max 1280*1024*256  */
+#define VIDEOMEMSIZE_AGA_1M	(786432)  /* AGA (1MB) : max 1024*768*256   */
+#define VIDEOMEMSIZE_ECS_2M	(655360)  /* ECS (2MB) : max 1280*1024*16   */
+#define VIDEOMEMSIZE_ECS_1M	(393216)  /* ECS (1MB) : max 1024*768*16    */
+#define VIDEOMEMSIZE_OCS	(262144)  /* OCS       : max ca. 800*600*16 */
+
+#define SPRITEMEMSIZE		(64*64/4) /* max 64*64*4 */
+#define DUMMYSPRITEMEMSIZE	(8)
+
+#define CHIPRAM_SAFETY_LIMIT	(16384)
+
+static u_long videomemory, spritememory;
+static u_long videomemorysize;
+
+	/*
+	 * This is the earliest allowed start of fetching display data.
+	 * Only if you really want no hardware cursor and audio,
+	 * set this to 128, but let it better at 192
+	 */
+
+static u_long min_fstrt = 192;
+
+#define assignchunk(name, type, ptr, size) \
+{ \
+	(name) = (type)(ptr); \
+	ptr += size; \
+}
+
+
+	/*
+	 * Copper Instructions
+	 */
+
+#define CMOVE(val, reg)		(CUSTOM_OFS(reg)<<16 | (val))
+#define CMOVE2(val, reg)	((CUSTOM_OFS(reg)+2)<<16 | (val))
+#define CWAIT(x, y)		(((y) & 0x1fe)<<23 | ((x) & 0x7f0)<<13 | 0x0001fffe)
+#define CEND			(0xfffffffe)
+
+
+typedef union {
+	u_long l;
+	u_short w[2];
+} copins;
+
+static struct copdisplay {
+	copins *init;
+	copins *wait;
+	copins *list[2][2];
+	copins *rebuild[2];
+} copdisplay;
+
+static u_short currentcop = 0;
+
+	/*
+	 * Hardware Cursor
+	 */
+
+static int cursorrate = 20;	/* Number of frames/flash toggle */
+static u_short cursorstate = -1;
+static u_short cursormode = FB_CURSOR_OFF;
+
+static u_short *lofsprite, *shfsprite, *dummysprite;
+
+	/*
+	 * Current Video Mode
+	 */
+
+static struct amiga_fb_par {
+
+	/* General Values */
+
+	int xres;		/* vmode */
+	int yres;		/* vmode */
+	int vxres;		/* vmode */
+	int vyres;		/* vmode */
+	int xoffset;		/* vmode */
+	int yoffset;		/* vmode */
+	u_short bpp;		/* vmode */
+	u_short clk_shift;	/* vmode */
+	u_short line_shift;	/* vmode */
+	int vmode;		/* vmode */
+	u_short diwstrt_h;	/* vmode */
+	u_short diwstop_h;	/* vmode */
+	u_short diwstrt_v;	/* vmode */
+	u_short diwstop_v;	/* vmode */
+	u_long next_line;	/* modulo for next line */
+	u_long next_plane;	/* modulo for next plane */
+
+	/* Cursor Values */
+
+	struct {
+		short crsr_x;	/* movecursor */
+		short crsr_y;	/* movecursor */
+		short spot_x;
+		short spot_y;
+		u_short height;
+		u_short width;
+		u_short fmode;
+	} crsr;
+
+	/* OCS Hardware Registers */
+
+	u_long bplpt0;		/* vmode, pan (Note: physical address) */
+	u_long bplpt0wrap;	/* vmode, pan (Note: physical address) */
+	u_short ddfstrt;
+	u_short ddfstop;
+	u_short bpl1mod;
+	u_short bpl2mod;
+	u_short bplcon0;	/* vmode */
+	u_short bplcon1;	/* vmode */
+	u_short htotal;		/* vmode */
+	u_short vtotal;		/* vmode */
+
+	/* Additional ECS Hardware Registers */
+
+	u_short bplcon3;	/* vmode */
+	u_short beamcon0;	/* vmode */
+	u_short hsstrt;		/* vmode */
+	u_short hsstop;		/* vmode */
+	u_short hbstrt;		/* vmode */
+	u_short hbstop;		/* vmode */
+	u_short vsstrt;		/* vmode */
+	u_short vsstop;		/* vmode */
+	u_short vbstrt;		/* vmode */
+	u_short vbstop;		/* vmode */
+	u_short hcenter;	/* vmode */
+
+	/* Additional AGA Hardware Registers */
+
+	u_short fmode;		/* vmode */
+} currentpar;
+
+static int currcon = 0;
+
+static struct display disp;
+static struct fb_info fb_info;
+
+
+	/*
+	 * The minimum period for audio depends on htotal (for OCS/ECS/AGA)
+	 * (Imported from arch/m68k/amiga/amisound.c)
+	 */
+
+extern volatile u_short amiga_audio_min_period;
+
+	/*
+	 * Since we can't read the palette on OCS/ECS, and since reading one
+	 * single color palette entry require 5 expensive custom chip bus accesses
+	 * on AGA, we keep a copy of the current palette.
+	 */
+
+#if defined(CONFIG_FB_AMIGA_AGA)
+static struct { u_char red, green, blue, pad; } palette[256];
+#else
+static struct { u_char red, green, blue, pad; } palette[32];
+#endif
+
+#if defined(CONFIG_FB_AMIGA_ECS)
+static u_short ecs_palette[32];
+#endif
+
+	/*
+	 * Latches for Display Changes during VBlank
+	 */
+
+static u_short do_vmode_full = 0;	/* Change the Video Mode */
+static u_short do_vmode_pan = 0;	/* Update the Video Mode */
+static short do_blank = 0;		/* (Un)Blank the Screen (1) */
+static u_short do_cursor = 0;		/* Move the Cursor */
+
+
+	/*
+	 * Various Flags
+	 */
+
+static u_short is_blanked = 0;		/* Screen is Blanked */
+static u_short is_lace = 0;		/* Screen is laced */
+
+	/*
+	 * Frame Buffer Name
+	 *
+	 * The rest of the name is filled in during initialization
+	 */
+
+static char amiga_fb_name[16] = "Amiga ";
+
+	/*
+	 * Predefined Video Mode Names
+	 *
+	 * The a2024-?? modes don't work yet because there's no A2024 driver.
+	 */
+
+static char *amiga_fb_modenames[] = {
+
+	/*
+	 * Autodetect (Default) Video Mode
+	 */
+
+	"default",
+
+	/*
+	 * AmigaOS Video Modes
+	 */
+
+	"ntsc",			/* 640x200, 15 kHz, 60 Hz (NTSC) */
+	"ntsc-lace",		/* 640x400, 15 kHz, 60 Hz interlaced (NTSC) */
+	"pal",			/* 640x256, 15 kHz, 50 Hz (PAL) */
+	"pal-lace",		/* 640x512, 15 kHz, 50 Hz interlaced (PAL) */
+	"multiscan",		/* 640x480, 29 kHz, 57 Hz */
+	"multiscan-lace",	/* 640x960, 29 kHz, 57 Hz interlaced */
+	"a2024-10",		/* 1024x800, 10 Hz (Not yet supported) */
+	"a2024-15",		/* 1024x800, 15 Hz (Not yet supported) */
+	"euro36",		/* 640x200, 15 kHz, 72 Hz */
+	"euro36-lace",		/* 640x400, 15 kHz, 72 Hz interlaced */
+	"euro72",		/* 640x400, 29 kHz, 68 Hz */
+	"euro72-lace",		/* 640x800, 29 kHz, 68 Hz interlaced */
+	"super72",		/* 800x300, 23 kHz, 70 Hz */
+	"super72-lace",		/* 800x600, 23 kHz, 70 Hz interlaced */
+	"dblntsc",		/* 640x200, 27 kHz, 57 Hz doublescan */
+	"dblntsc-ff",		/* 640x400, 27 kHz, 57 Hz */
+	"dblntsc-lace",		/* 640x800, 27 kHz, 57 Hz interlaced */
+	"dblpal",		/* 640x256, 27 kHz, 47 Hz doublescan */
+	"dblpal-ff",		/* 640x512, 27 kHz, 47 Hz */
+	"dblpal-lace",		/* 640x1024, 27 kHz, 47 Hz interlaced */
+
+	/*
+	 * VGA Video Modes
+	 */
+
+	"vga",			/* 640x480, 31 kHz, 60 Hz (VGA) */
+	"vga70",		/* 640x400, 31 kHz, 70 Hz (VGA) */
+
+	/*
+	 * User Defined Video Modes: to be set after boot up using e.g. fbset
+	 */
+
+	"user0", "user1", "user2", "user3", "user4", "user5", "user6", "user7"
+};
+
+static struct fb_var_screeninfo amiga_fb_predefined[] = {
+
+	/*
+	 * Autodetect (Default) Video Mode
+	 */
+
+	{ 0, },
+
+	/*
+	 * AmigaOS Video Modes
+	 */
+
+	{
+		/* ntsc */
+		640, 200, 640, 200, 0, 0, 4, 0,
+		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
+		0, 0, -1, -1, FB_ACCEL_NONE, TAG_HIRES, 106, 86, 44, 16, 76, 2,
+		FB_SYNC_BROADCAST, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
+	}, {
+		/* ntsc-lace */
+		640, 400, 640, 400, 0, 0, 4, 0,
+		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
+		0, 0, -1, -1, FB_ACCEL_NONE, TAG_HIRES, 106, 86, 88, 33, 76, 4,
+		FB_SYNC_BROADCAST, FB_VMODE_INTERLACED | FB_VMODE_YWRAP
+	}, {
+		/* pal */
+		640, 256, 640, 256, 0, 0, 4, 0,
+		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
+		0, 0, -1, -1, FB_ACCEL_NONE, TAG_HIRES, 106, 86, 40, 14, 76, 2,
+		FB_SYNC_BROADCAST, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
+	}, {
+		/* pal-lace */
+		640, 512, 640, 512, 0, 0, 4, 0,
+		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
+		0, 0, -1, -1, FB_ACCEL_NONE, TAG_HIRES, 106, 86, 80, 29, 76, 4,
+		FB_SYNC_BROADCAST, FB_VMODE_INTERLACED | FB_VMODE_YWRAP
+	}, {
+		/* multiscan */
+		640, 480, 640, 480, 0, 0, 4, 0,
+		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
+		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 96, 112, 29, 8, 72, 8,
+		0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
+
+	}, {
+		/* multiscan-lace */
+		640, 960, 640, 960, 0, 0, 4, 0,
+		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
+		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 96, 112, 58, 16, 72, 16,
+		0, FB_VMODE_INTERLACED | FB_VMODE_YWRAP
+	}, {
+		/* a2024-10 (Not yet supported) */
+		1024, 800, 1024, 800, 0, 0, 2, 0,
+		{0, 2, 0}, {0, 2, 0}, {0, 2, 0}, {0, 0, 0},
+		0, 0, -1, -1, FB_ACCEL_NONE, TAG_HIRES, 0, 0, 0, 0, 0, 0,
+		0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
+	}, {
+		/* a2024-15 (Not yet supported) */
+		1024, 800, 1024, 800, 0, 0, 2, 0,
+		{0, 2, 0}, {0, 2, 0}, {0, 2, 0}, {0, 0, 0},
+		0, 0, -1, -1, FB_ACCEL_NONE, TAG_HIRES, 0, 0, 0, 0, 0, 0,
+		0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
+	}, {
+		/* euro36 */
+		640, 200, 640, 200, 0, 0, 4, 0,
+		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
+		0, 0, -1, -1, FB_ACCEL_NONE, TAG_HIRES, 92, 124, 6, 6, 52, 5,
+		0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
+	}, {
+		/* euro36-lace */
+		640, 400, 640, 400, 0, 0, 4, 0,
+		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
+		0, 0, -1, -1, FB_ACCEL_NONE, TAG_HIRES, 92, 124, 12, 12, 52, 10,
+		0, FB_VMODE_INTERLACED | FB_VMODE_YWRAP
+	}, {
+		/* euro72 */
+		640, 400, 640, 400, 0, 0, 4, 0,
+		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
+		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 164, 92, 9, 9, 80, 8,
+		0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
+	}, {
+		/* euro72-lace */
+		640, 800, 640, 800, 0, 0, 4, 0,
+		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
+		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 164, 92, 18, 18, 80, 16,
+		0, FB_VMODE_INTERLACED | FB_VMODE_YWRAP
+	}, {
+		/* super72 */
+		800, 300, 800, 300, 0, 0, 4, 0,
+		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
+		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 212, 140, 10, 11, 80, 7,
+		0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
+	}, {
+		/* super72-lace */
+		800, 600, 800, 600, 0, 0, 4, 0,
+		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
+		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 212, 140, 20, 22, 80, 14,
+		0, FB_VMODE_INTERLACED | FB_VMODE_YWRAP
+	}, {
+		/* dblntsc */
+		640, 200, 640, 200, 0, 0, 4, 0,
+		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
+		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 196, 124, 18, 17, 80, 4,
+		0, FB_VMODE_DOUBLE | FB_VMODE_YWRAP
+	}, {
+		/* dblntsc-ff */
+		640, 400, 640, 400, 0, 0, 4, 0,
+		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
+		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 196, 124, 36, 35, 80, 7,
+		0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
+	}, {
+		/* dblntsc-lace */
+		640, 800, 640, 800, 0, 0, 4, 0,
+		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
+		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 196, 124, 72, 70, 80, 14,
+		0, FB_VMODE_INTERLACED | FB_VMODE_YWRAP
+	}, {
+		/* dblpal */
+		640, 256, 640, 256, 0, 0, 4, 0,
+		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
+		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 196, 124, 14, 13, 80, 4,
+		0, FB_VMODE_DOUBLE | FB_VMODE_YWRAP
+	}, {
+		/* dblpal-ff */
+		640, 512, 640, 512, 0, 0, 4, 0,
+		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
+		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 196, 124, 28, 27, 80, 7,
+		0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
+	}, {
+		/* dblpal-lace */
+		640, 1024, 640, 1024, 0, 0, 4, 0,
+		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
+		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 196, 124, 56, 54, 80, 14,
+		0, FB_VMODE_INTERLACED | FB_VMODE_YWRAP
+	},
+
+	/*
+	 * VGA Video Modes
+	 */
+
+	{
+		/* vga */
+		640, 480, 640, 480, 0, 0, 4, 0,
+		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
+		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 64, 96, 30, 9, 112, 2,
+		0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
+	}, {
+		/* vga70 */
+		640, 400, 640, 400, 0, 0, 4, 0,
+		{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
+		0, 0, -1, -1, FB_ACCEL_NONE, TAG_SHRES, 64, 96, 35, 12, 112, 2,
+		FB_SYNC_VERT_HIGH_ACT | FB_SYNC_COMP_HIGH_ACT, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
+	},
+
+	/*
+	 * User Defined Video Modes
+	 */
+
+	{ 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }
+};
+
+#define NUM_USER_MODES   (8)
+#define NUM_TOTAL_MODES  arraysize(amiga_fb_predefined)
+#define NUM_PREDEF_MODES (NUM_TOTAL_MODES-NUM_USER_MODES)
+
+static int amifb_ilbm = 0;	/* interleaved or normal bitplanes */
+
+static int amifb_inverse = 0;
+static int amifb_usermode = 0;
+
+	/*
+	 * Some default modes
+	 */
+
+#define DEFMODE_PAL        "pal"	/* for PAL OCS/ECS */
+#define DEFMODE_NTSC       "ntsc"	/* for NTSC OCS/ECS */
+#define DEFMODE_AMBER_PAL  "pal-lace"	/* for flicker fixed PAL (A3000) */
+#define DEFMODE_AMBER_NTSC "ntsc-lace"	/* for flicker fixed NTSC (A3000) */
+#define DEFMODE_AGA        "vga70"	/* for AGA */
+
+	/*
+	 * Macros for the conversion from real world values to hardware register
+	 * values
+	 *
+	 * This helps us to keep our attention on the real stuff...
+	 *
+	 * Hardware limits for AGA:
+	 *
+	 *	parameter  min    max  step
+	 *	---------  ---   ----  ----
+	 *	diwstrt_h    0   2047     1
+	 *	diwstrt_v    0   2047     1
+	 *	diwstop_h    0   4095     1
+	 *	diwstop_v    0   4095     1
+	 *
+	 *	ddfstrt      0   2032    16
+	 *	ddfstop      0   2032    16
+	 *
+	 *	htotal       8   2048     8
+	 *	hsstrt       0   2040     8
+	 *	hsstop       0   2040     8
+	 *	vtotal       1   4096     1
+	 *	vsstrt       0   4095     1
+	 *	vsstop       0   4095     1
+	 *	hcenter      0   2040     8
+	 *
+	 *	hbstrt       0   2047     1
+	 *	hbstop       0   2047     1
+	 *	vbstrt       0   4095     1
+	 *	vbstop       0   4095     1
+	 *
+	 * Horizontal values are in 35 ns (SHRES) pixels
+	 * Vertical values are in half scanlines
+	 */
+
+/* bplcon1 (smooth scrolling) */
+
+#define hscroll2hw(hscroll) \
+	(((hscroll)<<12 & 0x3000) | ((hscroll)<<8 & 0xc300) | \
+	 ((hscroll)<<4 & 0x0c00) | ((hscroll)<<2 & 0x00f0) | ((hscroll)>>2 & 0x000f))
+
+/* diwstrt/diwstop/diwhigh (visible display window) */
+
+#define diwstrt2hw(diwstrt_h, diwstrt_v) \
+	(((diwstrt_v)<<7 & 0xff00) | ((diwstrt_h)>>2 & 0x00ff))
+#define diwstop2hw(diwstop_h, diwstop_v) \
+	(((diwstop_v)<<7 & 0xff00) | ((diwstop_h)>>2 & 0x00ff))
+#define diwhigh2hw(diwstrt_h, diwstrt_v, diwstop_h, diwstop_v) \
+	(((diwstop_h)<<3 & 0x2000) | ((diwstop_h)<<11 & 0x1800) | \
+	 ((diwstop_v)>>1 & 0x0700) | ((diwstrt_h)>>5 & 0x0020) | \
+	 ((diwstrt_h)<<3 & 0x0018) | ((diwstrt_v)>>9 & 0x0007))
+
+/* ddfstrt/ddfstop (display DMA) */
+
+#define ddfstrt2hw(ddfstrt)	div8(ddfstrt)
+#define ddfstop2hw(ddfstop)	div8(ddfstop)
+
+/* hsstrt/hsstop/htotal/vsstrt/vsstop/vtotal/hcenter (sync timings) */
+
+#define hsstrt2hw(hsstrt)	(div8(hsstrt))
+#define hsstop2hw(hsstop)	(div8(hsstop))
+#define htotal2hw(htotal)	(div8(htotal)-1)
+#define vsstrt2hw(vsstrt)	(div2(vsstrt))
+#define vsstop2hw(vsstop)	(div2(vsstop))
+#define vtotal2hw(vtotal)	(div2(vtotal)-1)
+#define hcenter2hw(htotal)	(div8(htotal))
+
+/* hbstrt/hbstop/vbstrt/vbstop (blanking timings) */
+
+#define hbstrt2hw(hbstrt)	(((hbstrt)<<8 & 0x0700) | ((hbstrt)>>3 & 0x00ff))
+#define hbstop2hw(hbstop)	(((hbstop)<<8 & 0x0700) | ((hbstop)>>3 & 0x00ff))
+#define vbstrt2hw(vbstrt)	(div2(vbstrt))
+#define vbstop2hw(vbstop)	(div2(vbstop))
+
+/* colour */
+
+#define rgb2hw8_high(red, green, blue) \
+	(((red)<<4 & 0xf00) | ((green) & 0x0f0) | ((blue)>>4 & 0x00f))
+#define rgb2hw8_low(red, green, blue) \
+	(((red)<<8 & 0xf00) | ((green)<<4 & 0x0f0) | ((blue) & 0x00f))
+#define rgb2hw4(red, green, blue) \
+	(((red)<<8 & 0xf00) | ((green)<<4 & 0x0f0) | ((blue) & 0x00f))
+#define rgb2hw2(red, green, blue) \
+	(((red)<<10 & 0xc00) | ((green)<<6 & 0x0c0) | ((blue)<<2 & 0x00c))
+
+/* sprpos/sprctl (sprite positioning) */
+
+#define spr2hw_pos(start_v, start_h) \
+	(((start_v)<<7&0xff00) | ((start_h)>>3&0x00ff))
+#define spr2hw_ctl(start_v, start_h, stop_v) \
+	(((stop_v)<<7&0xff00) | ((start_v)>>4&0x0040) | ((stop_v)>>5&0x0020) | \
+	 ((start_h)<<3&0x0018) | ((start_v)>>7&0x0004) | ((stop_v)>>8&0x0002) | \
+	 ((start_h)>>2&0x0001))
+
+/* get current vertical position of beam */
+#define get_vbpos()	((u_short)((*(u_long volatile *)&custom.vposr >> 7) & 0xffe))
+
+	/*
+	 * Copper Initialisation List
+	 */
+
+#define COPINITSIZE (sizeof(copins)*40)
+
+enum {
+	cip_bplcon0
+};
+
+	/*
+	 * Long Frame/Short Frame Copper List
+	 * Don't change the order, build_copper()/rebuild_copper() rely on this
+	 */
+
+#define COPLISTSIZE (sizeof(copins)*64)
+
+enum {
+	cop_wait, cop_bplcon0,
+	cop_spr0ptrh, cop_spr0ptrl,
+	cop_diwstrt, cop_diwstop,
+	cop_diwhigh,
+};
+
+	/*
+	 * Pixel modes for Bitplanes and Sprites
+	 */
+
+static u_short bplpixmode[3] = {
+	BPC0_SHRES,			/*  35 ns */
+	BPC0_HIRES,			/*  70 ns */
+	0				/* 140 ns */
+};
+
+static u_short sprpixmode[3] = {
+	BPC3_SPRES1 | BPC3_SPRES0,	/*  35 ns */
+	BPC3_SPRES1,			/*  70 ns */
+	BPC3_SPRES0			/* 140 ns */
+};
+
+	/*
+	 * Fetch modes for Bitplanes and Sprites
+	 */
+
+static u_short bplfetchmode[3] = {
+	0,				/* 1x */
+	FMODE_BPL32,			/* 2x */
+	FMODE_BPAGEM | FMODE_BPL32	/* 4x */
+};
+
+static u_short sprfetchmode[3] = {
+	0,				/* 1x */
+	FMODE_SPR32,			/* 2x */
+	FMODE_SPAGEM | FMODE_SPR32	/* 4x */
+};
+
+	/*
+	 * Default Colormaps
+	 */
+
+static u_short red2[] =
+	{ 0x0000, 0xc000 };
+static u_short green2[] =
+	{ 0x0000, 0xc000 };
+static u_short blue2[] =
+	{ 0x0000, 0xc000 };
+
+static u_short red4[] =
+	{ 0x0000, 0xc000, 0x8000, 0xffff };
+static u_short green4[] =
+	{ 0x0000, 0xc000, 0x8000, 0xffff };
+static u_short blue4[] =
+	{ 0x0000, 0xc000, 0x8000, 0xffff };
+
+static u_short red8[] =
+	{ 0x0000, 0x0000, 0x0000, 0x0000, 0xc000, 0xc000, 0xc000, 0xc000 };
+static u_short green8[] =
+	{ 0x0000, 0x0000, 0xc000, 0xc000, 0x0000, 0x0000, 0xc000, 0xc000 };
+static u_short blue8[] =
+	{ 0x0000, 0xc000, 0x0000, 0xc000, 0x0000, 0xc000, 0x0000, 0xc000 };
+
+static u_short red16[] =
+	{ 0x0000, 0x0000, 0x0000, 0x0000, 0xc000, 0xc000, 0xc000, 0xc000,
+	  0x8000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff };
+static u_short green16[] =
+	{ 0x0000, 0x0000, 0xc000, 0xc000, 0x0000, 0x0000, 0xc000, 0xc000,
+	  0x8000, 0x0000, 0xffff, 0xffff, 0x0000, 0x0000, 0xffff, 0xffff };
+static u_short blue16[] =
+	{ 0x0000, 0xc000, 0x0000, 0xc000, 0x0000, 0xc000, 0x0000, 0xc000,
+	  0x8000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff };
+
+
+static struct fb_cmap default_2_colors =
+	{ 0, 2, red2, green2, blue2, NULL };
+static struct fb_cmap default_8_colors =
+	{ 0, 8, red8, green8, blue8, NULL };
+static struct fb_cmap default_4_colors =
+	{ 0, 4, red4, green4, blue4, NULL };
+static struct fb_cmap default_16_colors =
+	{ 0, 16, red16, green16, blue16, NULL };
+
+	/*
+	 * Interface used by the world
+	 */
+
+void amiga_video_setup(char *options, int *ints);
+
+static int amiga_fb_open(int fbidx);
+static int amiga_fb_release(int fbidx);
+static int amiga_fb_get_fix(struct fb_fix_screeninfo *fix, int con);
+static int amiga_fb_get_var(struct fb_var_screeninfo *var, int con);
+static int amiga_fb_set_var(struct fb_var_screeninfo *var, int con);
+static int amiga_fb_pan_display(struct fb_var_screeninfo *var, int con);
+static int amiga_fb_get_cmap(struct fb_cmap *cmap, int kspc, int con);
+static int amiga_fb_set_cmap(struct fb_cmap *cmap, int kspc, int con);
+static int amiga_fb_ioctl(struct inode *inode, struct file *file, u_int cmd,
+                          u_long arg, int con);
+
+static int amiga_fb_get_fix_cursorinfo(struct fb_fix_cursorinfo *fix, int con);
+static int amiga_fb_get_var_cursorinfo(struct fb_var_cursorinfo *var, u_char *data, int con);
+static int amiga_fb_set_var_cursorinfo(struct fb_var_cursorinfo *var, u_char *data, int con);
+static int amiga_fb_get_cursorstate(struct fb_cursorstate *state, int con);
+static int amiga_fb_set_cursorstate(struct fb_cursorstate *state, int con);
+
+	/*
+	 * Interface to the low level console driver
+	 */
+
+int amiga_fb_init(u_long *mem_start);
+static int amifbcon_switch(int con);
+static int amifbcon_updatevar(int con);
+static void amifbcon_blank(int blank);
+static int amifbcon_setcmap(struct fb_cmap *cmap, int con);
+
+	/*
+	 * Internal routines
+	 */
+
+static struct fb_cmap *get_default_colormap(int bpp);
+static int do_fb_get_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
+                          int kspc);
+static int do_fb_set_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
+                          int kspc);
+static void do_install_cmap(int con);
+static void memcpy_fs(int fsfromto, void *to, void *from, int len);
+static void copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto);
+static int alloc_cmap(struct fb_cmap *cmap, int len, int transp);
+static int flash_cursor(void);
+static void amifb_interrupt(int irq, void *dev_id, struct pt_regs *fp);
+static void get_video_mode(const char *name);
+static void check_default_mode(void);
+static u_long chipalloc(u_long size);
+static char *strtoke(char *s,const char *ct);
+
+	/*
+	 * Hardware routines
+	 */
+
+static int ami_encode_fix(struct fb_fix_screeninfo *fix,
+                          struct amiga_fb_par *par);
+static int ami_decode_var(struct fb_var_screeninfo *var,
+                          struct amiga_fb_par *par);
+static int ami_encode_var(struct fb_var_screeninfo *var,
+                          struct amiga_fb_par *par);
+static void ami_get_par(struct amiga_fb_par *par);
+static void ami_set_var(struct fb_var_screeninfo *var);
+#ifdef DEBUG
+static void ami_set_par(struct amiga_fb_par *par);
+#endif
+static void ami_pan_var(struct fb_var_screeninfo *var);
+static int ami_update_par(void);
+static int ami_getcolreg(u_int regno, u_int *red, u_int *green, u_int *blue,
+                         u_int *transp);
+static int ami_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
+                         u_int transp);
+static void ami_update_display(void);
+static void ami_init_display(void);
+static void ami_do_blank(void);
+static int ami_get_fix_cursorinfo(struct fb_fix_cursorinfo *fix, int con);
+static int ami_get_var_cursorinfo(struct fb_var_cursorinfo *var, u_char *data, int con);
+static int ami_set_var_cursorinfo(struct fb_var_cursorinfo *var, u_char *data, int con);
+static int ami_get_cursorstate(struct fb_cursorstate *state, int con);
+static int ami_set_cursorstate(struct fb_cursorstate *state, int con);
+static void ami_set_sprite(void);
+static void ami_init_copper(void);
+static void ami_reinit_copper(void);
+static void ami_build_copper(void);
+static void ami_rebuild_copper(void);
+
+
+	/*
+	 * External references
+	 */
+
+extern unsigned short ami_intena_vals[];
+
+
+static struct fb_ops amiga_fb_ops = {
+	amiga_fb_open, amiga_fb_release, amiga_fb_get_fix, amiga_fb_get_var,
+	amiga_fb_set_var, amiga_fb_get_cmap, amiga_fb_set_cmap,
+	amiga_fb_pan_display, amiga_fb_ioctl
+};
+
+__initfunc(void amiga_video_setup(char *options, int *ints))
+{
+	char *this_opt;
+	int i;
+	char mcap_spec[80];
+
+	mcap_spec[0] = '\0';
+	fb_info.fontname[0] = '\0';
+
+	if (!options || !*options)
+		return;
+
+	for (this_opt = strtok(options, ","); this_opt; this_opt = strtok(NULL, ",")) {
+		char *p;
+
+		if (!strcmp(this_opt, "inverse")) {
+			amifb_inverse = 1;
+			for (i = 0; i < 16; i++) {
+				red16[i] = ~red16[i];
+				green16[i] = ~green16[i];
+				blue16[i] = ~blue16[i];
+			}
+			for (i = 0; i < 8; i++) {
+				red8[i] = ~red8[i];
+				green8[i] = ~green8[i];
+				blue8[i] = ~blue8[i];
+			}
+			for (i = 0; i < 4; i++) {
+				red4[i] = ~red4[i];
+				green4[i] = ~green4[i];
+				blue4[i] = ~blue4[i];
+			}
+			for (i = 0; i < 2; i++) {
+				red2[i] = ~red2[i];
+				green2[i] = ~green2[i];
+				blue2[i] = ~blue2[i];
+			}
+		} else if (!strcmp(this_opt, "ilbm"))
+			amifb_ilbm = 1;
+		else if (!strncmp(this_opt, "monitorcap:", 11))
+			strcpy(mcap_spec, this_opt+11);
+		else if (!strncmp(this_opt, "font:", 5))
+			strcpy(fb_info.fontname, this_opt+5);
+		else if (!strncmp(this_opt, "fstart:", 7))
+			min_fstrt = simple_strtoul(this_opt+7, NULL, 0);
+		else if (!strncmp(this_opt, "depth:", 6))
+			amiga_fb_predefined[0].bits_per_pixel =
+				simple_strtoul(this_opt+6, NULL, 0);
+		else if (!strncmp(this_opt, "size:", 5)) {
+			p = this_opt + 5;
+			if (*p != ';')
+				amiga_fb_predefined[0].xres =
+					simple_strtoul(p, NULL, 0);
+			if (!(p = strchr(p, ';')))
+				continue;
+			if (*++p != ';')
+				amiga_fb_predefined[0].yres =
+					simple_strtoul(p, NULL, 0);
+			if (!(p = strchr(p, ';')))
+				continue;
+			if (*++p != ';')
+				amiga_fb_predefined[0].xres_virtual =
+					simple_strtoul(p, NULL, 0);
+			if (!(p = strchr(p, ';')))
+				continue;
+			if (*++p != ';')
+				amiga_fb_predefined[0].yres_virtual =
+					simple_strtoul(p, NULL, 0);
+			if (!(p = strchr(p, ';')))
+				continue;
+			if (*++p)
+				amiga_fb_predefined[0].bits_per_pixel =
+					simple_strtoul(p, NULL, 0);
+		} else if (!strncmp(this_opt, "timing:", 7)) {
+			p = this_opt + 7;
+			if (*p != ';')
+				amiga_fb_predefined[0].left_margin =
+					simple_strtoul(p, NULL, 0);
+			if (!(p = strchr(p, ';')))
+				continue;
+			if (*++p != ';')
+				amiga_fb_predefined[0].right_margin =
+					simple_strtoul(p, NULL, 0);
+			if (!(p = strchr(p, ';')))
+				continue;
+			if (*++p != ';')
+				amiga_fb_predefined[0].upper_margin =
+					simple_strtoul(p, NULL, 0);
+			if (!(p = strchr(p, ';')))
+				continue;
+			if (*++p)
+				amiga_fb_predefined[0].lower_margin =
+					simple_strtoul(p, NULL, 0);
+		} else if (!strncmp(this_opt, "sync:", 5)) {
+			p = this_opt + 5;
+			if (*p != ';')
+				amiga_fb_predefined[0].hsync_len =
+					simple_strtoul(p, NULL, 0);
+			if (!(p = strchr(p, ';')))
+				continue;
+			if (*++p)
+				amiga_fb_predefined[0].vsync_len =
+					simple_strtoul(p, NULL, 0);
+		} else
+			get_video_mode(this_opt);
+	}
+
+	if (min_fstrt < 48)
+		min_fstrt = 48;
+
+	if (*mcap_spec) {
+		char *p;
+		int vmin, vmax, hmin, hmax;
+
+	/* Format for monitor capabilities is: <Vmin>;<Vmax>;<Hmin>;<Hmax>
+	 * <V*> vertical freq. in Hz
+	 * <H*> horizontal freq. in kHz
+	 */
+
+		if (!(p = strtoke(mcap_spec, ";")) || !*p)
+			goto cap_invalid;
+		vmin = simple_strtoul(p, NULL, 10);
+		if (vmin <= 0)
+			goto cap_invalid;
+		if (!(p = strtoke(NULL, ";")) || !*p)
+			goto cap_invalid;
+		vmax = simple_strtoul(p, NULL, 10);
+		if (vmax <= 0 || vmax <= vmin)
+			goto cap_invalid;
+		if (!(p = strtoke(NULL, ";")) || !*p)
+			goto cap_invalid;
+		hmin = 1000 * simple_strtoul(p, NULL, 10);
+		if (hmin <= 0)
+			goto cap_invalid;
+		if (!(p = strtoke(NULL, "")) || !*p)
+			goto cap_invalid;
+		hmax = 1000 * simple_strtoul(p, NULL, 10);
+		if (hmax <= 0 || hmax <= hmin)
+			goto cap_invalid;
+
+		vfmin = vmin;
+		vfmax = vmax;
+		hfmin = hmin;
+		hfmax = hmax;
+cap_invalid:
+		;
+	}
+}
+
+	/*
+	 * Open/Release the frame buffer device
+	 */
+
+static int amiga_fb_open(int fbidx)
+{
+	/*
+	 * Nothing, only a usage count for the moment
+	 */
+
+	MOD_INC_USE_COUNT;
+	return(0);
+}
+
+static int amiga_fb_release(int fbidx)
+{
+	MOD_DEC_USE_COUNT;
+	return(0);
+}
+
+
+	/*
+	 * Get the Fixed Part of the Display
+	 */
+
+static int amiga_fb_get_fix(struct fb_fix_screeninfo *fix, int con)
+{
+	struct amiga_fb_par par;
+
+	if (con == -1)
+		ami_get_par(&par);
+	else {
+		int err;
+
+		if ((err = ami_decode_var(&fb_display[con].var, &par)))
+			return err;
+	}
+	return ami_encode_fix(fix, &par);
+}
+
+	/*
+	 * Get the User Defined Part of the Display
+	 */
+
+static int amiga_fb_get_var(struct fb_var_screeninfo *var, int con)
+{
+	int err = 0;
+
+	if (con == -1) {
+		struct amiga_fb_par par;
+
+		ami_get_par(&par);
+		err = ami_encode_var(var, &par);
+	} else
+		*var = fb_display[con].var;
+	return err;
+}
+
+	/*
+	 * Set the User Defined Part of the Display
+	 */
+
+static int amiga_fb_set_var(struct fb_var_screeninfo *var, int con)
+{
+	int err, activate = var->activate;
+	int oldxres, oldyres, oldvxres, oldvyres, oldbpp;
+	struct amiga_fb_par par;
+
+	struct display *display;
+	if (con >= 0)
+		display = &fb_display[con];
+	else
+		display = &disp;	/* used during initialization */
+
+	/*
+	 * FB_VMODE_CONUPDATE and FB_VMODE_SMOOTH_XPAN are equal!
+	 * as FB_VMODE_SMOOTH_XPAN is only used internally
+	 */
+
+	if (var->vmode & FB_VMODE_CONUPDATE) {
+		var->vmode |= FB_VMODE_YWRAP;
+		var->xoffset = display->var.xoffset;
+		var->yoffset = display->var.yoffset;
+	}
+	if ((err = ami_decode_var(var, &par)))
+		return err;
+	ami_encode_var(var, &par);
+	if ((activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) {
+		oldxres = display->var.xres;
+		oldyres = display->var.yres;
+		oldvxres = display->var.xres_virtual;
+		oldvyres = display->var.yres_virtual;
+		oldbpp = display->var.bits_per_pixel;
+		display->var = *var;
+		if (oldxres != var->xres || oldyres != var->yres ||
+		    oldvxres != var->xres_virtual || oldvyres != var->yres_virtual ||
+		    oldbpp != var->bits_per_pixel) {
+			struct fb_fix_screeninfo fix;
+
+			ami_encode_fix(&fix, &par);
+			display->screen_base = (u_char *)fix.smem_start;
+			display->visual = fix.visual;
+			display->type = fix.type;
+			display->type_aux = fix.type_aux;
+			display->ypanstep = fix.ypanstep;
+			display->ywrapstep = fix.ywrapstep;
+			display->line_length = fix.line_length;
+			display->can_soft_blank = 1;
+			display->inverse = amifb_inverse;
+			if (fb_info.changevar)
+				(*fb_info.changevar)(con);
+		}
+		if (oldbpp != var->bits_per_pixel) {
+			if ((err = alloc_cmap(&display->cmap, 0, 0)))
+				return err;
+			do_install_cmap(con);
+		}
+		if (con == currcon)
+			ami_set_var(&display->var);
+	}
+	return 0;
+}
+
+	/*
+	 * Pan or Wrap the Display
+	 *
+	 * This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
+	 */
+
+static int amiga_fb_pan_display(struct fb_var_screeninfo *var, int con)
+{
+	if (var->vmode & FB_VMODE_YWRAP) {
+		if (var->yoffset<0 || var->yoffset >= fb_display[con].var.yres_virtual || var->xoffset)
+			return -EINVAL;
+	} else {
+		/*
+		 * TODO: There will be problems when xpan!=1, so some columns
+		 * on the right side will never be seen
+		 */
+		if (var->xoffset+fb_display[con].var.xres > upx(16<<maxfmode, fb_display[con].var.xres_virtual) ||
+		    var->yoffset+fb_display[con].var.yres > fb_display[con].var.yres_virtual)
+			return -EINVAL;
+	}
+	if (con == currcon)
+		ami_pan_var(var);
+	fb_display[con].var.xoffset = var->xoffset;
+	fb_display[con].var.yoffset = var->yoffset;
+	if (var->vmode & FB_VMODE_YWRAP)
+		fb_display[con].var.vmode |= FB_VMODE_YWRAP;
+	else
+		fb_display[con].var.vmode &= ~FB_VMODE_YWRAP;
+	return 0;
+}
+
+	/*
+	 * Get the Colormap
+	 */
+
+static int amiga_fb_get_cmap(struct fb_cmap *cmap, int kspc, int con)
+{
+	if (con == currcon) /* current console? */
+		return do_fb_get_cmap(cmap, &fb_display[con].var, kspc);
+	else if (fb_display[con].cmap.len) /* non default colormap? */
+		copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
+	else
+		copy_cmap(get_default_colormap(fb_display[con].var.bits_per_pixel),
+		          cmap, kspc ? 0 : 2);
+	return 0;
+}
+
+	/*
+	 * Set the Colormap
+	 */
+
+static int amiga_fb_set_cmap(struct fb_cmap *cmap, int kspc, int con)
+{
+	int err;
+
+	if (!fb_display[con].cmap.len) {		/* no colormap allocated? */
+		if ((err = alloc_cmap(&fb_display[con].cmap,
+		                      1<<fb_display[con].var.bits_per_pixel, 0)))
+			return err;
+	}
+	if (con == currcon)			/* current console? */
+		return do_fb_set_cmap(cmap, &fb_display[con].var, kspc);
+	else
+		copy_cmap(cmap, &fb_display[con].cmap, kspc ? 0 : 1);
+	return 0;
+}
+
+	/*
+	 * Amiga Frame Buffer Specific ioctls
+	 */
+
+static int amiga_fb_ioctl(struct inode *inode, struct file *file,
+                          u_int cmd, u_long arg, int con)
+{
+	int i;
+
+	switch (cmd) {
+		case FBIOGET_FCURSORINFO : {
+			struct fb_fix_cursorinfo crsrfix;
+			
+			i = verify_area(VERIFY_WRITE, (void *)arg, sizeof(crsrfix));
+			if (!i) {
+				i = amiga_fb_get_fix_cursorinfo(&crsrfix, con);
+				copy_to_user((void *)arg, &crsrfix, sizeof(crsrfix));
+			}
+			return i;
+		}
+		case FBIOGET_VCURSORINFO : {
+			struct fb_var_cursorinfo crsrvar;
+
+			i = verify_area(VERIFY_WRITE, (void *)arg, sizeof(crsrvar));
+			if (!i) {
+				i = amiga_fb_get_var_cursorinfo(&crsrvar,
+					((struct fb_var_cursorinfo *)arg)->data, con);
+				copy_to_user((void *)arg, &crsrvar, sizeof(crsrvar));
+			}
+			return i;
+		}
+		case FBIOPUT_VCURSORINFO : {
+			struct fb_var_cursorinfo crsrvar;
+
+			i = verify_area(VERIFY_READ, (void *)arg, sizeof(crsrvar));
+			if (!i) {
+				copy_from_user(&crsrvar, (void *)arg, sizeof(crsrvar));
+				i = amiga_fb_set_var_cursorinfo(&crsrvar,
+					((struct fb_var_cursorinfo *)arg)->data, con);
+			}
+			return i;
+		}
+		case FBIOGET_CURSORSTATE : {
+			struct fb_cursorstate crsrstate;
+
+			i = verify_area(VERIFY_WRITE, (void *)arg, sizeof(crsrstate));
+			if (!i) {
+				i = amiga_fb_get_cursorstate(&crsrstate, con);
+				copy_to_user((void *)arg, &crsrstate, sizeof(crsrstate));
+			}
+			return i;
+		}
+		case FBIOPUT_CURSORSTATE : {
+			struct fb_cursorstate crsrstate;
+
+			i = verify_area(VERIFY_READ, (void *)arg, sizeof(crsrstate));
+			if (!i) {
+				copy_from_user(&crsrstate, (void *)arg, sizeof(crsrstate));
+				i = amiga_fb_set_cursorstate(&crsrstate, con);
+			}
+			return i;
+		}
+#ifdef DEBUG
+		case FBCMD_GET_CURRENTPAR : {
+			struct amiga_fb_par par;
+
+			i = verify_area(VERIFY_WRITE, (void *)arg, sizeof(struct amiga_fb_par));
+			if (!i) {
+				ami_get_par(&par);
+				copy_to_user((void *)arg, &par, sizeof(struct amiga_fb_par));
+			}
+			return i;
+		}
+		case FBCMD_SET_CURRENTPAR : {
+			struct amiga_fb_par par;
+
+			i = verify_area(VERIFY_READ, (void *)arg, sizeof(struct amiga_fb_par));
+			if (!i) {
+				copy_from_user(&par, (void *)arg, sizeof(struct amiga_fb_par));
+				ami_set_par(&par);
+			}
+			return i;
+		}
+#endif */ DEBUG */
+	}
+	return -EINVAL;
+}
+
+	/*
+	 * Hardware Cursor
+	 */
+
+static int amiga_fb_get_fix_cursorinfo(struct fb_fix_cursorinfo *fix, int con)
+{
+	return ami_get_fix_cursorinfo(fix, con);
+}
+
+static int amiga_fb_get_var_cursorinfo(struct fb_var_cursorinfo *var, u_char *data, int con)
+{
+	return ami_get_var_cursorinfo(var, data, con);
+}
+
+static int amiga_fb_set_var_cursorinfo(struct fb_var_cursorinfo *var, u_char *data, int con)
+{
+	return ami_set_var_cursorinfo(var, data, con);
+}
+
+static int amiga_fb_get_cursorstate(struct fb_cursorstate *state, int con)
+{
+	return ami_get_cursorstate(state, con);
+}
+
+static int amiga_fb_set_cursorstate(struct fb_cursorstate *state, int con)
+{
+	return ami_set_cursorstate(state, con);
+}
+
+	/*
+	 * Initialisation
+	 */
+
+__initfunc(int amiga_fb_init(u_long *mem_start))
+{
+	int err, tag, i;
+	u_long chipptr;
+
+	if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(AMI_VIDEO))
+		return -ENODEV;
+
+	/*
+	 * TODO: where should we put this? The DMI Resolver doesn't have a
+	 *	 frame buffer accessible by the CPU
+	 */
+
+#ifdef CONFIG_GSP_RESOLVER
+	if (amifb_resolver){
+		custom.dmacon = DMAF_MASTER | DMAF_RASTER | DMAF_COPPER |
+				DMAF_BLITTER | DMAF_SPRITE;
+		return NULL;
+	}
+#endif
+
+	custom.dmacon = DMAF_ALL | DMAF_MASTER;
+
+	switch (amiga_chipset) {
+#ifdef CONFIG_FB_AMIGA_OCS
+		case CS_OCS:
+			strcat(amiga_fb_name, "OCS");
+default_chipset:
+			chipset = TAG_OCS;
+			maxdepth[TAG_SHRES] = 0;	/* OCS means no SHRES */
+			maxdepth[TAG_HIRES] = 4;
+			maxdepth[TAG_LORES] = 6;
+			maxfmode = TAG_FMODE_1;
+			if (!amifb_usermode)		/* Set the Default Video Mode */
+				get_video_mode(amiga_vblank == 50 ?
+				               DEFMODE_PAL : DEFMODE_NTSC);
+			videomemorysize = VIDEOMEMSIZE_OCS;
+			break;
+#endif /* CONFIG_FB_AMIGA_OCS */
+
+#ifdef CONFIG_FB_AMIGA_ECS
+		case CS_ECS:
+			strcat(amiga_fb_name, "ECS");
+			chipset = TAG_ECS;
+			maxdepth[TAG_SHRES] = 2;
+			maxdepth[TAG_HIRES] = 4;
+			maxdepth[TAG_LORES] = 6;
+			maxfmode = TAG_FMODE_1;
+			if (!amifb_usermode) {		/* Set the Default Video Mode */
+				if (AMIGAHW_PRESENT(AMBER_FF))
+					get_video_mode(amiga_vblank == 50 ?
+					               DEFMODE_AMBER_PAL : DEFMODE_AMBER_NTSC);
+				else
+					get_video_mode(amiga_vblank == 50 ?
+					               DEFMODE_PAL : DEFMODE_NTSC);
+			}
+			if (amiga_chip_avail()-CHIPRAM_SAFETY_LIMIT >
+			    VIDEOMEMSIZE_ECS_1M)
+				videomemorysize = VIDEOMEMSIZE_ECS_2M;
+			else
+				videomemorysize = VIDEOMEMSIZE_ECS_1M;
+			break;
+#endif /* CONFIG_FB_AMIGA_ECS */
+
+#ifdef CONFIG_FB_AMIGA_AGA
+		case CS_AGA:
+			strcat(amiga_fb_name, "AGA");
+			chipset = TAG_AGA;
+			maxdepth[TAG_SHRES] = 8;
+			maxdepth[TAG_HIRES] = 8;
+			maxdepth[TAG_LORES] = 8;
+			maxfmode = TAG_FMODE_4;
+			if (!amifb_usermode)		/* Set the Default Video Mode */
+				get_video_mode(DEFMODE_AGA);
+			if (amiga_chip_avail()-CHIPRAM_SAFETY_LIMIT >
+			    VIDEOMEMSIZE_AGA_1M)
+				videomemorysize = VIDEOMEMSIZE_AGA_2M;
+			else
+				videomemorysize = VIDEOMEMSIZE_AGA_1M;
+			break;
+#endif /* CONFIG_FB_AMIGA_AGA */
+
+		default:
+#ifdef CONFIG_FB_AMIGA_OCS
+			printk("Unknown graphics chipset, defaulting to OCS\n");
+			strcat(amiga_fb_name, "Unknown");
+			goto default_chipset;
+#else /* CONFIG_FB_AMIGA_OCS */
+			return -ENODEV;
+#endif /* CONFIG_FB_AMIGA_OCS */
+			break;
+	}
+
+	/*
+	 * Calculate the Pixel Clock Values for this Machine
+	 */
+
+	pixclock[TAG_SHRES] = DIVUL(25E9, amiga_eclock);	/* SHRES:  35 ns / 28 MHz */
+	pixclock[TAG_HIRES] = DIVUL(50E9, amiga_eclock);	/* HIRES:  70 ns / 14 MHz */
+	pixclock[TAG_LORES] = DIVUL(100E9, amiga_eclock); 	/* LORES: 140 ns /  7 MHz */
+
+	/*
+	 * Replace the Tag Values with the Real Pixel Clock Values
+	 */
+
+	for (i = 0; i < NUM_PREDEF_MODES; i++) {
+		tag = amiga_fb_predefined[i].pixclock;
+		if (tag == TAG_SHRES || tag == TAG_HIRES || tag == TAG_LORES) {
+			amiga_fb_predefined[i].pixclock = pixclock[tag];
+			if (amiga_fb_predefined[i].bits_per_pixel > maxdepth[tag])
+				amiga_fb_predefined[i].bits_per_pixel = maxdepth[tag];
+		}
+	}
+
+	strcpy(fb_info.modename, amiga_fb_name);
+	fb_info.changevar = NULL;
+	fb_info.node = -1;
+	fb_info.fbops = &amiga_fb_ops;
+	fb_info.fbvar_num = NUM_TOTAL_MODES;
+	fb_info.fbvar = amiga_fb_predefined;
+	fb_info.disp = &disp;
+	fb_info.switch_con = &amifbcon_switch;
+	fb_info.updatevar = &amifbcon_updatevar;
+	fb_info.blank = &amifbcon_blank;
+	fb_info.setcmap = &amifbcon_setcmap;
+
+	err = register_framebuffer(&fb_info);
+	if (err < 0)
+		return(err);
+
+	chipptr = chipalloc(videomemorysize+
+	                    SPRITEMEMSIZE+
+	                    DUMMYSPRITEMEMSIZE+
+	                    COPINITSIZE+
+	                    4*COPLISTSIZE);
+
+	assignchunk(videomemory, u_long, chipptr, videomemorysize);
+	assignchunk(spritememory, u_long, chipptr, SPRITEMEMSIZE);
+	assignchunk(dummysprite, u_short *, chipptr, DUMMYSPRITEMEMSIZE);
+	assignchunk(copdisplay.init, copins *, chipptr, COPINITSIZE);
+	assignchunk(copdisplay.list[0][0], copins *, chipptr, COPLISTSIZE);
+	assignchunk(copdisplay.list[0][1], copins *, chipptr, COPLISTSIZE);
+	assignchunk(copdisplay.list[1][0], copins *, chipptr, COPLISTSIZE);
+	assignchunk(copdisplay.list[1][1], copins *, chipptr, COPLISTSIZE);
+
+	memset(dummysprite, 0, DUMMYSPRITEMEMSIZE);
+
+	/*
+	 * Enable Display DMA
+	 */
+
+	custom.dmacon = DMAF_SETCLR | DMAF_MASTER | DMAF_RASTER | DMAF_COPPER |
+	                DMAF_BLITTER | DMAF_SPRITE;
+
+	/*
+	 * Make sure the Copper has something to do
+	 */
+
+	ami_init_copper();
+
+	check_default_mode();
+
+	if (request_irq(IRQ_AMIGA_AUTO_3, amifb_interrupt, IRQ_FLG_LOCK,
+	                "fb vertb handler", NULL))
+		panic("Couldn't add vblank interrupt\n");
+	ami_intena_vals[IRQ_AMIGA_VERTB] = IF_COPER;
+	ami_intena_vals[IRQ_AMIGA_COPPER] = 0;
+	custom.intena = IF_VERTB;
+	custom.intena = IF_SETCLR | IF_COPER;
+
+	amiga_fb_set_var(&amiga_fb_predefined[0], -1);
+
+	printk("%s frame buffer device, using %ldK of video memory\n",
+	       fb_info.modename, videomemorysize>>10);
+	return 0;
+}
+
+static int amifbcon_switch(int con)
+{
+	/* Do we have to save the colormap? */
+	if (fb_display[currcon].cmap.len)
+		do_fb_get_cmap(&fb_display[currcon].cmap, &fb_display[currcon].var, 1);
+
+	currcon = con;
+	ami_set_var(&fb_display[con].var);
+	/* Install new colormap */
+	do_install_cmap(con);
+	return 0;
+}
+
+	/*
+	 * Update the `var' structure (called by fbcon.c)
+	 */
+
+static int amifbcon_updatevar(int con)
+{
+	ami_pan_var(&fb_display[con].var);
+	return 0;
+}
+
+	/*
+	 * Blank the display.
+	 */
+
+static void amifbcon_blank(int blank)
+{
+	do_blank = blank ? blank : -1;
+}
+
+	/*
+	 * Set the colormap
+	 */
+
+static int amifbcon_setcmap(struct fb_cmap *cmap, int con)
+{
+	return(amiga_fb_set_cmap(cmap, 1, con));
+}
+
+/* ---------------------------- Generic routines ---------------------------- */
+
+static struct fb_cmap *get_default_colormap(int bpp)
+{
+	switch (bpp) {
+		case 1:
+			return &default_2_colors;
+			break;
+		case 2:
+			return &default_4_colors;
+			break;
+		case 3:
+			return &default_8_colors;
+			break;
+		default:
+			return &default_16_colors;
+			break;
+	}
+}
+
+#define CNVT_TOHW(val,width)	((((val)<<(width))+0x7fff-(val))>>16)
+#define CNVT_FROMHW(val,width)	(((width) ? ((((val)<<16)-(val)) / \
+                                            ((1<<(width))-1)) : 0))
+
+static int do_fb_get_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
+                          int kspc)
+{
+	int i, start;
+	u_short *red, *green, *blue, *transp;
+	u_int hred, hgreen, hblue, htransp;
+
+	red = cmap->red;
+	green = cmap->green;
+	blue = cmap->blue;
+	transp = cmap->transp;
+	start = cmap->start;
+	if (start < 0)
+		return -EINVAL;
+	for (i = 0; i < cmap->len; i++) {
+		if (ami_getcolreg(start++, &hred, &hgreen, &hblue, &htransp))
+			return 0;
+		hred = CNVT_FROMHW(hred, var->red.length);
+		hgreen = CNVT_FROMHW(hgreen, var->green.length);
+		hblue = CNVT_FROMHW(hblue, var->blue.length);
+		htransp = CNVT_FROMHW(htransp, var->transp.length);
+		if (kspc) {
+			*red = hred;
+			*green = hgreen;
+			*blue = hblue;
+			if (transp)
+				*transp = htransp;
+		} else {
+			put_user(hred, red);
+			put_user(hgreen, green);
+			put_user(hblue, blue);
+			if (transp)
+				put_user(htransp, transp);
+		}
+		red++;
+		green++;
+		blue++;
+		if (transp)
+			transp++;
+	}
+	return 0;
+}
+
+static int do_fb_set_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
+                          int kspc)
+{
+	int i, start;
+	u_short *red, *green, *blue, *transp;
+	u_int hred, hgreen, hblue, htransp;
+
+	red = cmap->red;
+	green = cmap->green;
+	blue = cmap->blue;
+	transp = cmap->transp;
+	start = cmap->start;
+
+	if (start < 0)
+		return -EINVAL;
+	for (i = 0; i < cmap->len; i++) {
+		if (kspc) {
+			hred = *red;
+			hgreen = *green;
+			hblue = *blue;
+			htransp = transp ? *transp : 0;
+		} else {
+			get_user(hred, red);
+			get_user(hgreen, green);
+			get_user(hblue, blue);
+			if (transp)
+				get_user(htransp, transp);
+			else
+				htransp = 0;
+		}
+		hred = CNVT_TOHW(hred, var->red.length);
+		hgreen = CNVT_TOHW(hgreen, var->green.length);
+		hblue = CNVT_TOHW(hblue, var->blue.length);
+		htransp = CNVT_TOHW(htransp, var->transp.length);
+		red++;
+		green++;
+		blue++;
+		if (transp)
+			transp++;
+		if (ami_setcolreg(start++, hred, hgreen, hblue, htransp))
+			return 0;
+	}
+	return 0;
+}
+
+static void do_install_cmap(int con)
+{
+	if (con != currcon)
+		return;
+	if (fb_display[con].cmap.len)
+		do_fb_set_cmap(&fb_display[con].cmap, &fb_display[con].var, 1);
+	else
+		do_fb_set_cmap(get_default_colormap(fb_display[con].var.bits_per_pixel),
+		                                    &fb_display[con].var, 1);
+}
+
+static void memcpy_fs(int fsfromto, void *to, void *from, int len)
+{
+	switch (fsfromto) {
+		case 0:
+			memcpy(to, from, len);
+			return;
+		case 1:
+			copy_from_user(to, from, len);
+			return;
+		case 2:
+			copy_to_user(to, from, len);
+			return;
+	}
+}
+
+static void copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto)
+{
+	int size;
+	int tooff = 0, fromoff = 0;
+
+	if (to->start > from->start)
+		fromoff = to->start-from->start;
+	else
+		tooff = from->start-to->start;
+	size = to->len-tooff;
+	if (size > from->len-fromoff)
+		size = from->len-fromoff;
+	if (size < 0)
+		return;
+	size *= sizeof(u_short);
+	memcpy_fs(fsfromto, to->red+tooff, from->red+fromoff, size);
+	memcpy_fs(fsfromto, to->green+tooff, from->green+fromoff, size);
+	memcpy_fs(fsfromto, to->blue+tooff, from->blue+fromoff, size);
+	if (from->transp && to->transp)
+		memcpy_fs(fsfromto, to->transp+tooff, from->transp+fromoff, size);
+}
+
+static int alloc_cmap(struct fb_cmap *cmap, int len, int transp)
+{
+	int size = len*sizeof(u_short);
+
+	if (cmap->len != len) {
+		if (cmap->red)
+			kfree(cmap->red);
+		if (cmap->green)
+			kfree(cmap->green);
+		if (cmap->blue)
+			kfree(cmap->blue);
+		if (cmap->transp)
+			kfree(cmap->transp);
+		cmap->red = cmap->green = cmap->blue = cmap->transp = NULL;
+		cmap->len = 0;
+		if (!len)
+			return 0;
+		if (!(cmap->red = kmalloc(size, GFP_ATOMIC)))
+			return -1;
+		if (!(cmap->green = kmalloc(size, GFP_ATOMIC)))
+			return -1;
+		if (!(cmap->blue = kmalloc(size, GFP_ATOMIC)))
+			return -1;
+		if (transp) {
+			if (!(cmap->transp = kmalloc(size, GFP_ATOMIC)))
+				return -1;
+		} else
+			cmap->transp = NULL;
+	}
+	cmap->start = 0;
+	cmap->len = len;
+	copy_cmap(get_default_colormap(len), cmap, 0);
+	return 0;
+}
+
+static int flash_cursor(void)
+{
+	static int cursorcount = 1;
+
+	if (cursormode == FB_CURSOR_FLASH) {
+		if (!--cursorcount) {
+			cursorstate = -cursorstate;
+			cursorcount = cursorrate;
+			if (!is_blanked)
+				return 1;
+		}
+	}
+	return 0;
+}
+
+	/*
+	 * VBlank Display Interrupt
+	 */
+
+static void amifb_interrupt(int irq, void *dev_id, struct pt_regs *fp)
+{
+	u_short ints = custom.intreqr & custom.intenar;
+	static struct irq_server server = {0, 0};
+	unsigned long flags;
+
+	if (ints & IF_BLIT) {
+		custom.intreq = IF_BLIT;
+		amiga_do_irq(IRQ_AMIGA_BLIT, fp);
+	}
+
+	if (ints & IF_COPER) {
+		custom.intreq = IF_COPER;
+		if (do_vmode_pan || do_vmode_full)
+			ami_update_display();
+
+		if (do_vmode_full)
+			ami_init_display();
+
+		if (do_vmode_pan) {
+			flash_cursor();
+			ami_rebuild_copper();
+			do_cursor = do_vmode_pan = 0;
+		} else if (do_cursor) {
+			flash_cursor();
+			ami_set_sprite();
+			do_cursor = 0;
+		} else {
+			if (flash_cursor())
+				ami_set_sprite();
+		}
+
+		save_flags(flags);
+		cli();
+		if (get_vbpos() < down2(currentpar.diwstrt_v - 6))
+			custom.copjmp2 = 0;
+		restore_flags(flags);
+
+		if (do_blank) {
+			ami_do_blank();
+			do_blank = 0;
+		}
+
+		if (do_vmode_full) {
+			ami_reinit_copper();
+			do_vmode_full = 0;
+		}
+		amiga_do_irq_list(IRQ_AMIGA_VERTB, fp, &server);
+	}
+
+	if (ints & IF_VERTB) {
+		printk("%s: Warning: IF_VERTB was enabled\n", __FUNCTION__);
+		custom.intena = IF_VERTB;
+	}
+}
+
+	/*
+	 * Get a Video Mode
+	 */
+
+static void get_video_mode(const char *name)
+{
+	int i;
+
+	for (i = 1; i < NUM_PREDEF_MODES; i++) {
+		if (!strcmp(name, amiga_fb_modenames[i])) {
+			amiga_fb_predefined[0] = amiga_fb_predefined[i];
+			amifb_usermode = i;
+			return;
+		}
+	}
+}
+
+	/*
+	 * Probe the  Video Modes
+	 */
+
+static void check_default_mode(void)
+{
+	struct amiga_fb_par par;
+	int mode;
+
+	for (mode = 0; mode < NUM_PREDEF_MODES; mode++) {
+		if (!ami_decode_var(&amiga_fb_predefined[mode], &par)) {
+			if (mode)
+				amiga_fb_predefined[0] = amiga_fb_predefined[mode];
+			return;
+		}
+		if (!mode)
+			printk("Can't use default video mode. Probing video modes...\n");
+	}
+	panic("Can't find any usable video mode");
+}
+
+	/*
+	 * Allocate, Clear and Align a Block of Chip Memory
+	 */
+
+static u_long chipalloc(u_long size)
+{
+	u_long ptr;
+
+	size += PAGE_SIZE-1;
+	if (!(ptr = (u_long)amiga_chip_alloc(size)))
+		panic("No Chip RAM for frame buffer");
+	memset((void *)ptr, 0, size);
+	ptr = PAGE_ALIGN(ptr);
+
+	return ptr;
+}
+
+	/*
+	 * A strtok which returns empty strings, too
+	 */
+
+static char *strtoke(char *s,const char *ct)
+{
+	char *sbegin, *send;
+	static char *ssave = NULL;
+
+	sbegin  = s ? s : ssave;
+	if (!sbegin)
+		return NULL;
+	if (*sbegin == '\0') {
+		ssave = NULL;
+		return NULL;
+	}
+	send = strpbrk(sbegin, ct);
+	if (send && *send != '\0')
+		*send++ = '\0';
+	ssave = send;
+	return sbegin;
+}
+
+/* --------------------------- Hardware routines --------------------------- */
+
+	/*
+	 * This function should fill in the `fix' structure based on the
+	 * values in the `par' structure.
+	 */
+
+static int ami_encode_fix(struct fb_fix_screeninfo *fix,
+                          struct amiga_fb_par *par)
+{
+	int i;
+
+	strcpy(fix->id, amiga_fb_name);
+	fix->smem_start = videomemory;
+	fix->smem_len = videomemorysize;
+
+	if (amifb_ilbm) {
+		fix->type = FB_TYPE_INTERLEAVED_PLANES;
+		fix->type_aux = par->next_line;
+	} else {
+		fix->type = FB_TYPE_PLANES;
+		fix->type_aux = 0;
+	}
+	fix->line_length = div8(upx(16<<maxfmode, par->vxres));
+	fix->visual = FB_VISUAL_PSEUDOCOLOR;
+
+	if (par->vmode & FB_VMODE_YWRAP) {
+		fix->ywrapstep = 1;
+		fix->xpanstep = fix->ypanstep = 0;
+	} else {
+		fix->ywrapstep = 0;
+		if (par->vmode &= FB_VMODE_SMOOTH_XPAN)
+			fix->xpanstep = 1;
+		else
+			fix->xpanstep = 16<<maxfmode;
+		fix->ypanstep = 1;
+	}
+
+	for (i = 0; i < arraysize(fix->reserved); i++)
+		fix->reserved[i] = 0;
+
+	return 0;
+}
+
+	/*
+	 * Get the video params out of `var'. If a value doesn't fit, round
+	 * it up, if it's too big, return -EINVAL.
+	 */
+
+static int ami_decode_var(struct fb_var_screeninfo *var,
+                          struct amiga_fb_par *par)
+{
+	u_short clk_shift, line_shift;
+	u_long maxfetchstop, fstrt, fsize, fconst, xres_n, yres_n;
+	u_long hrate = 0, vrate = 0;
+
+	/*
+	 * Find a matching Pixel Clock
+	 */
+
+	for (clk_shift = TAG_SHRES; clk_shift < TAG_LORES; clk_shift++)
+		if (var->pixclock <= pixclock[clk_shift])
+			break;
+	if (clk_shift >= TAG_LORES)
+		return -EINVAL;
+	par->clk_shift = clk_shift;
+
+	/*
+	 * Check the Geometry Values
+	 */
+
+	if ((par->xres = var->xres) < 64)
+		return -EINVAL;
+	if ((par->yres = var->yres) < 64)
+		return -EINVAL;
+	if ((par->vxres = var->xres_virtual) < 64)
+		return -EINVAL;
+	if ((par->vyres = var->yres_virtual) < 64)
+		return -EINVAL;
+
+	par->bpp = var->bits_per_pixel;
+	if (!var->nonstd) {
+		if (par->bpp <= 0 || par->bpp > maxdepth[clk_shift])
+			return -EINVAL;
+	} else if (var->nonstd == FB_NONSTD_HAM) {
+		if (par->bpp != 6)
+			if (par->bpp != 8 || !IS_AGA)
+				return -EINVAL;
+	} else
+		return -EINVAL;
+
+	/*
+	 * FB_VMODE_SMOOTH_XPAN will be cleared, if one of the folloing
+	 * checks failed and smooth scrolling is not possible
+	 */
+
+	par->vmode = var->vmode | FB_VMODE_SMOOTH_XPAN;
+	switch (par->vmode & FB_VMODE_MASK) {
+		case FB_VMODE_INTERLACED:
+			line_shift = 0;
+			break;
+		case FB_VMODE_NONINTERLACED:
+			line_shift = 1;
+			break;
+		case FB_VMODE_DOUBLE:
+			if (!IS_AGA)
+				return -EINVAL;
+			line_shift = 2;
+			break;
+		default:
+			return -EINVAL;
+			break;
+	}
+	par->line_shift = line_shift;
+
+	/*
+	 * Vertical and Horizontal Timings
+	 */
+
+	xres_n = par->xres<<clk_shift;
+	yres_n = par->yres<<line_shift;
+	par->htotal = down8((var->left_margin+par->xres+var->right_margin+var->hsync_len)<<clk_shift);
+	par->vtotal = down2(((var->upper_margin+par->yres+var->lower_margin+var->vsync_len)<<line_shift)+1);
+
+	if (IS_AGA)
+		par->bplcon3 = sprpixmode[clk_shift];
+	else
+		par->bplcon3 = 0;
+	if (var->sync & FB_SYNC_BROADCAST) {
+		par->diwstop_h = par->htotal-((var->right_margin-var->hsync_len)<<clk_shift);
+		if (IS_AGA)
+			par->diwstop_h += mod4(var->hsync_len);
+		else
+			par->diwstop_h = down4(par->diwstop_h);
+		par->diwstrt_h = par->diwstop_h - xres_n;
+		par->diwstop_v = par->vtotal-((var->lower_margin-var->vsync_len)<<line_shift);
+		par->diwstrt_v = par->diwstop_v - yres_n;
+		if (par->diwstop_h >= par->htotal+8 || par->diwstop_v > par->vtotal)
+			return -EINVAL;
+		if (!IS_OCS) {
+			/* Initialize sync with some reasonable values for pwrsave */
+			par->hsstrt = 160;
+			par->hsstop = 320;
+			par->vsstrt = 30;
+			par->vsstop = 34;
+		} else {
+			par->hsstrt = 0;
+			par->hsstop = 0;
+			par->vsstrt = 0;
+			par->vsstop = 0;
+		}
+		if (par->vtotal > (PAL_VTOTAL+NTSC_VTOTAL)/2) {
+			/* PAL video mode */
+			if (par->htotal != PAL_HTOTAL)
+				return -EINVAL;
+			if (par->diwstrt_h < PAL_DIWSTRT_H)
+				return -EINVAL;
+			if (par->diwstrt_v < PAL_DIWSTRT_V)
+				return -EINVAL;
+			hrate = 15625;
+			vrate = 50;
+			if (!IS_OCS) {
+				par->beamcon0 = BMC0_PAL;
+				par->bplcon3 |= BPC3_BRDRBLNK;
+			} else if (AMIGAHW_PRESENT(AGNUS_HR_PAL) || 
+			           AMIGAHW_PRESENT(AGNUS_HR_NTSC)) {
+				par->beamcon0 = BMC0_PAL;
+				par->hsstop = 1;
+			} else if (amiga_vblank != 50)
+				return -EINVAL;
+		} else {
+			/* NTSC video mode
+			 * In the AGA chipset seems to be hardware bug with BPC3_BRDRBLNK
+			 * and NTSC activated, so than better let diwstop_h <= 1812
+			 */
+			if (par->htotal != NTSC_HTOTAL)
+				return -EINVAL;
+			if (par->diwstrt_h < NTSC_DIWSTRT_H)
+				return -EINVAL;
+			if (par->diwstrt_v < NTSC_DIWSTRT_V)
+				return -EINVAL;
+			hrate = 15750;
+			vrate = 60;
+			if (!IS_OCS) {
+				par->beamcon0 = 0;
+				par->bplcon3 |= BPC3_BRDRBLNK;
+			} else if (AMIGAHW_PRESENT(AGNUS_HR_PAL) || 
+			           AMIGAHW_PRESENT(AGNUS_HR_NTSC)) {
+				par->beamcon0 = 0;
+				par->hsstop = 1;
+			} else if (amiga_vblank != 60)
+				return -EINVAL;
+		}
+		if (IS_OCS) {
+			if (par->diwstrt_h >= 1024 || par->diwstop_h < 1024 ||
+			    par->diwstrt_v >=  512 || par->diwstop_v <  256)
+				return -EINVAL;
+		}
+	} else if (!IS_OCS) {
+		/* Programmable video mode */
+		par->hsstrt = var->right_margin<<clk_shift;
+		par->hsstop = (var->right_margin+var->hsync_len)<<clk_shift;
+		par->diwstop_h = par->htotal - mod8(par->hsstrt) + 8 - (1 << clk_shift);
+		if (!IS_AGA)
+			par->diwstop_h = down4(par->diwstop_h) - 16;
+		par->diwstrt_h = par->diwstop_h - xres_n;
+		par->hbstop = par->diwstrt_h + 4;
+		par->hbstrt = par->diwstop_h + 4;
+		if (par->hbstrt >= par->htotal + 8)
+			par->hbstrt -= par->htotal;
+		par->hcenter = par->hsstrt + (par->htotal >> 1);
+		par->vsstrt = var->lower_margin<<line_shift;
+		par->vsstop = (var->lower_margin+var->vsync_len)<<line_shift;
+		par->diwstop_v = par->vtotal;
+		if ((par->vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED)
+			par->diwstop_v -= 2;
+		par->diwstrt_v = par->diwstop_v - yres_n;
+		par->vbstop = par->diwstrt_v - 2;
+		par->vbstrt = par->diwstop_v - 2;
+		if (par->vtotal > 2048 || par->htotal > 2048)
+			return -EINVAL;
+		par->bplcon3 |= BPC3_EXTBLKEN;
+		par->beamcon0 = BMC0_HARDDIS | BMC0_VARVBEN | BMC0_LOLDIS |
+		                BMC0_VARVSYEN | BMC0_VARHSYEN | BMC0_VARBEAMEN |
+		                BMC0_PAL | BMC0_VARCSYEN;
+		if (var->sync & FB_SYNC_HOR_HIGH_ACT)
+			par->beamcon0 |= BMC0_HSYTRUE;
+		if (var->sync & FB_SYNC_VERT_HIGH_ACT)
+			par->beamcon0 |= BMC0_VSYTRUE;
+		if (var->sync & FB_SYNC_COMP_HIGH_ACT)
+			par->beamcon0 |= BMC0_CSYTRUE;
+		hrate = (amiga_masterclock+par->htotal/2)/par->htotal;
+		vrate = div2(par->vtotal) * par->htotal;
+		vrate = (amiga_masterclock+vrate/2)/vrate;
+	} else
+		return -EINVAL;
+
+	/*
+	 * Checking the DMA timing
+	 */
+
+	fconst = 16<<maxfmode<<clk_shift;
+
+	/*
+	 * smallest window start value without turn off other dma cycles
+	 * than sprite1-7, unless you change min_fstrt
+	 */
+
+
+	fsize = ((maxfmode+clk_shift <= 1) ? fconst : 64);
+	fstrt = downx(fconst, par->diwstrt_h-4) - fsize;
+	if (fstrt < min_fstrt)
+		return -EINVAL;
+
+	/*
+	 * smallest window start value where smooth scrolling is possible
+	 */
+
+	fstrt = downx(fconst, par->diwstrt_h-fconst+(1<<clk_shift)-4) - fsize;
+	if (fstrt < min_fstrt)
+		par->vmode &= ~FB_VMODE_SMOOTH_XPAN;
+
+	maxfetchstop = down16(par->htotal - 80);
+
+	fstrt = downx(fconst, par->diwstrt_h-4) - 64 - fconst;
+	fsize = upx(fconst, xres_n + modx(fconst, downx(1<<clk_shift, par->diwstrt_h-4)));
+	if (fstrt + fsize > maxfetchstop)
+		par->vmode &= ~FB_VMODE_SMOOTH_XPAN;
+
+	fsize = upx(fconst, xres_n);
+	if (fstrt + fsize > maxfetchstop)
+		return -EINVAL;
+
+	if (maxfmode + clk_shift <= 1) {
+		fsize = up64(xres_n + fconst - 1);
+		if (min_fstrt + fsize - 64 > maxfetchstop)
+			par->vmode &= ~FB_VMODE_SMOOTH_XPAN;
+
+		fsize = up64(xres_n);
+		if (min_fstrt + fsize - 64 > maxfetchstop)
+			return -EINVAL;
+
+		fsize -= 64;
+	} else
+		fsize -= fconst;
+
+	/*
+	 * Check if there is enough time to update the bitplane pointers for ywrap
+	 */
+
+	if (par->htotal-fsize-64 < par->bpp*64)
+		par->vmode &= ~FB_VMODE_YWRAP;
+
+	/*
+	 * Bitplane calculations and check the Memory Requirements
+	 */
+
+	if (amifb_ilbm) {
+		par->next_plane = div8(upx(16<<maxfmode, par->vxres));
+		par->next_line = par->bpp*par->next_plane;
+		if (par->next_line * par->vyres > videomemorysize)
+			return -EINVAL;
+	} else {
+		par->next_line = div8(upx(16<<maxfmode, par->vxres));
+		par->next_plane = par->vyres*par->next_line;
+		if (par->next_plane * par->bpp > videomemorysize)
+			return -EINVAL;
+	}
+
+	/*
+	 * Hardware Register Values
+	 */
+
+	par->bplcon0 = BPC0_COLOR | bplpixmode[clk_shift];
+	if (!IS_OCS)
+		par->bplcon0 |= BPC0_ECSENA;
+	if (par->bpp == 8)
+		par->bplcon0 |= BPC0_BPU3;
+	else
+		par->bplcon0 |= par->bpp<<12;
+	if (var->nonstd == FB_NONSTD_HAM)
+		par->bplcon0 |= BPC0_HAM;
+	if (var->sync & FB_SYNC_EXT)
+		par->bplcon0 |= BPC0_ERSY;
+
+	if (IS_AGA)
+		par->fmode = bplfetchmode[maxfmode];
+
+	switch (par->vmode & FB_VMODE_MASK) {
+		case FB_VMODE_INTERLACED:
+			par->bplcon0 |= BPC0_LACE;
+			break;
+		case FB_VMODE_DOUBLE:
+			if (IS_AGA)
+				par->fmode |= FMODE_SSCAN2 | FMODE_BSCAN2;
+			break;
+	}
+
+	if (!((par->vmode ^ var->vmode) & FB_VMODE_YWRAP)) {
+		par->xoffset = var->xoffset;
+		par->yoffset = var->yoffset;
+		if (par->vmode & FB_VMODE_YWRAP) {
+			if (par->xoffset || par->yoffset < 0 || par->yoffset >= par->vyres)
+				par->xoffset = par->yoffset = 0;
+		} else {
+			if (par->xoffset < 0 || par->xoffset > upx(16<<maxfmode, par->vxres-par->xres) ||
+			    par->yoffset < 0 || par->yoffset > par->vyres-par->yres)
+				par->xoffset = par->yoffset = 0;
+		}
+	} else
+		par->xoffset = par->yoffset = 0;
+
+	par->crsr.crsr_x = par->crsr.crsr_y = 0;
+	par->crsr.spot_x = par->crsr.spot_y = 0;
+	par->crsr.height = par->crsr.width = 0;
+
+	if (hrate < hfmin || hrate > hfmax || vrate < vfmin || vrate > vfmax)
+		return -EINVAL;
+
+	return 0;
+}
+
+	/*
+	 * Fill the `var' structure based on the values in `par' and maybe
+	 * other values read out of the hardware.
+	 */
+
+static int ami_encode_var(struct fb_var_screeninfo *var,
+                          struct amiga_fb_par *par)
+{
+	u_short clk_shift, line_shift;
+	int i;
+
+	clk_shift = par->clk_shift;
+	line_shift = par->line_shift;
+
+	var->xres = par->xres;
+	var->yres = par->yres;
+	var->xres_virtual = par->vxres;
+	var->yres_virtual = par->vyres;
+	var->xoffset = par->xoffset;
+	var->yoffset = par->yoffset;
+
+	var->bits_per_pixel = par->bpp;
+	var->grayscale = 0;
+
+	if (IS_AGA) {
+		var->red.offset = 0;
+		var->red.length = 8;
+		var->red.msb_right = 0;
+	} else {
+		if (clk_shift == TAG_SHRES) {
+			var->red.offset = 0;
+			var->red.length = 2;
+			var->red.msb_right = 0;
+		} else {
+			var->red.offset = 0;
+			var->red.length = 4;
+			var->red.msb_right = 0;
+		}
+	}
+	var->blue = var->green = var->red;
+	var->transp.offset = 0;
+	var->transp.length = 0;
+	var->transp.msb_right = 0;
+
+	if (par->bplcon0 & BPC0_HAM)
+		var->nonstd = FB_NONSTD_HAM;
+	else
+		var->nonstd = 0;
+	var->activate = 0;
+
+	var->height = -1;
+	var->width = -1;
+	var->accel = 0;
+
+	var->pixclock = pixclock[clk_shift];
+
+	if (IS_AGA && par->fmode & FMODE_BSCAN2)
+		var->vmode = FB_VMODE_DOUBLE;
+	else if (par->bplcon0 & BPC0_LACE)
+		var->vmode = FB_VMODE_INTERLACED;
+	else
+		var->vmode = FB_VMODE_NONINTERLACED;
+
+	if (!IS_OCS && par->beamcon0 & BMC0_VARBEAMEN) {
+		var->hsync_len = (par->hsstop-par->hsstrt)>>clk_shift;
+		var->right_margin = par->hsstrt>>clk_shift;
+		var->left_margin = (par->htotal>>clk_shift) - var->xres - var->right_margin - var->hsync_len;
+		var->vsync_len = (par->vsstop-par->vsstrt)>>line_shift;
+		var->lower_margin = par->vsstrt>>line_shift;
+		var->upper_margin = (par->vtotal>>line_shift) - var->yres - var->lower_margin - var->vsync_len;
+		var->sync = 0;
+		if (par->beamcon0 & BMC0_HSYTRUE)
+			var->sync |= FB_SYNC_HOR_HIGH_ACT;
+		if (par->beamcon0 & BMC0_VSYTRUE)
+			var->sync |= FB_SYNC_VERT_HIGH_ACT;
+		if (par->beamcon0 & BMC0_CSYTRUE)
+			var->sync |= FB_SYNC_COMP_HIGH_ACT;
+	} else {
+		var->sync = FB_SYNC_BROADCAST;
+		var->hsync_len = (152>>clk_shift) + mod4(par->diwstop_h);
+		var->right_margin = ((par->htotal - down4(par->diwstop_h))>>clk_shift) + var->hsync_len;
+		var->left_margin = (par->htotal>>clk_shift) - var->xres - var->right_margin - var->hsync_len;
+		var->vsync_len = 4>>line_shift;
+		var->lower_margin = ((par->vtotal - par->diwstop_v)>>line_shift) + var->vsync_len;
+		var->upper_margin = (((par->vtotal - 2)>>line_shift) + 1) - var->yres -
+		                    var->lower_margin - var->vsync_len;
+	}
+
+	if (par->bplcon0 & BPC0_ERSY)
+		var->sync |= FB_SYNC_EXT;
+	if (par->vmode & FB_VMODE_YWRAP)
+		var->vmode |= FB_VMODE_YWRAP;
+
+	for (i = 0; i < arraysize(var->reserved); i++)
+		var->reserved[i] = 0;
+
+	return 0;
+}
+
+	/*
+	 * Get current hardware setting
+	 */
+
+static void ami_get_par(struct amiga_fb_par *par)
+{
+	*par = currentpar;
+}
+
+	/*
+	 * Set new videomode
+	 */
+
+static void ami_set_var(struct fb_var_screeninfo *var)
+{
+	do_vmode_pan = 0;
+	do_vmode_full = 0;
+	ami_decode_var(var, &currentpar);
+	ami_build_copper();
+	do_vmode_full = 1;
+}
+
+#ifdef DEBUG
+static void ami_set_par(struct amiga_fb_par *par)
+{
+	do_vmode_pan = 0;
+	do_vmode_full = 0;
+	currentpar = *par;
+	ami_build_copper();
+	do_vmode_full = 1;
+}
+#endif
+
+	/*
+	 * Pan or Wrap the Display
+	 *
+	 * This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
+	 * in `var'.
+	 */
+
+static void ami_pan_var(struct fb_var_screeninfo *var)
+{
+	struct amiga_fb_par *par = &currentpar;
+
+	par->xoffset = var->xoffset;
+	par->yoffset = var->yoffset;
+	if (var->vmode & FB_VMODE_YWRAP)
+		par->vmode |= FB_VMODE_YWRAP;
+	else
+		par->vmode &= ~FB_VMODE_YWRAP;
+
+	do_vmode_pan = 0;
+	ami_update_par();
+	do_vmode_pan = 1;
+}
+
+	/*
+	 * Update hardware
+	 */
+
+static int ami_update_par(void)
+{
+	struct amiga_fb_par *par = &currentpar;
+	short clk_shift, vshift, fstrt, fsize, fstop, fconst,  shift, move, mod;
+
+	clk_shift = par->clk_shift;
+
+	if (!(par->vmode & FB_VMODE_SMOOTH_XPAN))
+		par->xoffset = upx(16<<maxfmode, par->xoffset);
+
+	fconst = 16<<maxfmode<<clk_shift;
+	vshift = modx(16<<maxfmode, par->xoffset);
+	fstrt = par->diwstrt_h - (vshift<<clk_shift) - 4;
+	fsize = (par->xres+vshift)<<clk_shift;
+	shift = modx(fconst, fstrt);
+	move = downx(2<<maxfmode, div8(par->xoffset));
+	if (maxfmode + clk_shift > 1) {
+		fstrt = downx(fconst, fstrt) - 64;
+		fsize = upx(fconst, fsize);
+		fstop = fstrt + fsize - fconst;
+	} else {
+		mod = fstrt = downx(fconst, fstrt) - fconst;
+		fstop = fstrt + upx(fconst, fsize) - 64;
+		fsize = up64(fsize);
+		fstrt = fstop - fsize + 64;
+		if (fstrt < min_fstrt) {
+			fstop += min_fstrt - fstrt;
+			fstrt = min_fstrt;
+		}
+		move = move - div8((mod-fstrt)>>clk_shift);
+	}
+	mod = par->next_line - div8(fsize>>clk_shift);
+	par->ddfstrt = fstrt;
+	par->ddfstop = fstop;
+	par->bplcon1 = hscroll2hw(shift);
+	par->bpl2mod = mod;
+	if (par->bplcon0 & BPC0_LACE)
+		par->bpl2mod += par->next_line;
+	if (IS_AGA && (par->fmode & FMODE_BSCAN2))
+		par->bpl1mod = -div8(fsize>>clk_shift);
+	else
+		par->bpl1mod = par->bpl2mod;
+
+	if (par->yoffset) {
+		par->bplpt0 = ZTWO_PADDR((u_long)videomemory + par->next_line*par->yoffset + move);
+		if (par->vmode & FB_VMODE_YWRAP) {
+			if (par->yoffset > par->vyres-par->yres) {
+				par->bplpt0wrap = ZTWO_PADDR((u_long)videomemory + move);
+				if (par->bplcon0 & BPC0_LACE && mod2(par->diwstrt_v+par->vyres-par->yoffset))
+					par->bplpt0wrap += par->next_line;
+			}
+		}
+	} else
+		par->bplpt0 = ZTWO_PADDR((u_long)videomemory + move);
+
+	if (par->bplcon0 & BPC0_LACE && mod2(par->diwstrt_v))
+		par->bplpt0 += par->next_line;
+
+	return 0;
+}
+
+	/*
+	 * Read a single color register and split it into
+	 * colors/transparent. Return != 0 for invalid regno.
+	 */
+
+static int ami_getcolreg(u_int regno, u_int *red, u_int *green, u_int *blue,
+                         u_int *transp)
+{
+	if (IS_AGA) {
+		if (regno > 255)
+			return 1;
+	} else {
+		if (regno > 31)
+			return 1;
+	}
+
+	*red = palette[regno].red;
+	*green = palette[regno].green;
+	*blue = palette[regno].blue;
+	return 0;
+}
+
+
+	/*
+	 * Set a single color register. The values supplied are already
+	 * rounded down to the hardware's capabilities (according to the
+	 * entries in the var structure). Return != 0 for invalid regno.
+	 */
+
+static int ami_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
+                         u_int transp)
+{
+#if defined(CONFIG_FB_AMIGA_AGA)
+	u_short bplcon3 = currentpar.bplcon3;
+
+	if (IS_AGA) {
+		if (regno > 255)
+			return 1;
+	} else
+#endif
+		if (regno > 31)
+			return 1;
+
+	/*
+	 * Update the corresponding Hardware Color Register, unless it's Color
+	 * Register 0 and the screen is blanked.
+	 *
+	 * VBlank is switched off to protect bplcon3 or ecs_palette[] from
+	 * being changed by ami_do_blank() during the VBlank.
+	 */
+
+	palette[regno].red = red;
+	palette[regno].green = green;
+	palette[regno].blue = blue;
+
+	if (regno || !is_blanked) {
+#if defined(CONFIG_FB_AMIGA_AGA)
+		if (IS_AGA) {
+			VBlankOff();
+			custom.bplcon3 = bplcon3 | (regno<<8 & 0xe000);
+			custom.color[regno&31] = rgb2hw8_high(red, green, blue);
+			custom.bplcon3 = bplcon3 | (regno<<8 & 0xe000) | BPC3_LOCT;
+			custom.color[regno&31] = rgb2hw8_low(red, green, blue);
+			custom.bplcon3 = bplcon3;
+			VBlankOn();
+		} else
+#endif
+		{
+#if defined(CONFIG_FB_AMIGA_ECS)
+			if (currentpar.bplcon0 & BPC0_SHRES) {
+				u_short color, mask;
+				int i;
+
+				mask = 0x3333;
+				color = rgb2hw2(red, green, blue);
+				VBlankOff();
+				for (i = regno+12; i >= (int)regno; i -= 4)
+					custom.color[i] = ecs_palette[i] = (ecs_palette[i] & mask) | color;
+				mask <<=2; color >>= 2;
+				regno = down16(regno)+mul4(mod4(regno));
+				for (i = regno+3; i >= (int)regno; i--)
+					custom.color[i] = ecs_palette[i] = (ecs_palette[i] & mask) | color;
+				VBlankOn();
+			} else
+#endif
+				custom.color[regno] = rgb2hw4(red, green, blue);
+		}
+	}
+	return 0;
+}
+
+static void ami_update_display(void)
+{
+	struct amiga_fb_par *par = &currentpar;
+
+	custom.bplcon1 = par->bplcon1;
+	custom.bpl1mod = par->bpl1mod;
+	custom.bpl2mod = par->bpl2mod;
+	custom.ddfstrt = ddfstrt2hw(par->ddfstrt);
+	custom.ddfstop = ddfstop2hw(par->ddfstop);
+}
+
+	/*
+	 * Change the video mode (called by VBlank interrupt)
+	 */
+
+static void ami_init_display(void)
+{
+	struct amiga_fb_par *par = &currentpar;
+
+	custom.bplcon0 = par->bplcon0 & ~BPC0_LACE;
+	custom.bplcon2 = (IS_OCS ? 0 : BPC2_KILLEHB) | BPC2_PF2P2 | BPC2_PF1P2;
+	if (!IS_OCS) {
+		custom.bplcon3 = par->bplcon3;
+		if (IS_AGA)
+			custom.bplcon4 = BPC4_ESPRM4 | BPC4_OSPRM4;
+		if (par->beamcon0 & BMC0_VARBEAMEN) {
+			custom.htotal = htotal2hw(par->htotal);
+			custom.hbstrt = hbstrt2hw(par->hbstrt);
+			custom.hbstop = hbstop2hw(par->hbstop);
+			custom.hsstrt = hsstrt2hw(par->hsstrt);
+			custom.hsstop = hsstop2hw(par->hsstop);
+			custom.hcenter = hcenter2hw(par->hcenter);
+			custom.vtotal = vtotal2hw(par->vtotal);
+			custom.vbstrt = vbstrt2hw(par->vbstrt);
+			custom.vbstop = vbstop2hw(par->vbstop);
+			custom.vsstrt = vsstrt2hw(par->vsstrt);
+			custom.vsstop = vsstop2hw(par->vsstop);
+		}
+	}
+	if (!IS_OCS || par->hsstop)
+		custom.beamcon0 = par->beamcon0;
+	if (IS_AGA)
+		custom.fmode = par->fmode;
+
+	/*
+	 * The minimum period for audio depends on htotal
+	 */
+
+	amiga_audio_min_period = div16(par->htotal);
+
+	is_lace = par->bplcon0 & BPC0_LACE ? 1 : 0;
+#if 1
+	if (is_lace) {
+		if (custom.vposr & 0x8000)
+			custom.cop2lc = (u_short *)ZTWO_PADDR(copdisplay.list[currentcop][1]);
+		else
+			custom.cop2lc = (u_short *)ZTWO_PADDR(copdisplay.list[currentcop][0]);
+	} else {
+		custom.vposw = custom.vposr | 0x8000;
+		custom.cop2lc = (u_short *)ZTWO_PADDR(copdisplay.list[currentcop][1]);
+	}
+#else
+	custom.vposw = custom.vposr | 0x8000;
+	custom.cop2lc = (u_short *)ZTWO_PADDR(copdisplay.list[currentcop][1]);
+#endif
+}
+
+	/*
+	 * (Un)Blank the screen (called by VBlank interrupt)
+	 */
+
+static void ami_do_blank(void)
+{
+	struct amiga_fb_par *par = &currentpar;
+#if defined(CONFIG_FB_AMIGA_AGA)
+	u_short bplcon3 = par->bplcon3;
+#endif
+	u_char red, green, blue;
+
+	if (do_blank > 0) {
+		custom.dmacon = DMAF_RASTER | DMAF_SPRITE;
+		red = green = blue = 0;
+		if (!IS_OCS && do_blank > 1) {
+			switch (do_blank) {
+				case 2 : /* suspend vsync */
+					custom.hsstrt = hsstrt2hw(par->hsstrt);
+					custom.hsstop = hsstop2hw(par->hsstop);
+					custom.vsstrt = vsstrt2hw(par->vtotal+4);
+					custom.vsstop = vsstop2hw(par->vtotal+4);
+					break;
+				case 3 : /* suspend hsync */
+					custom.hsstrt = hsstrt2hw(par->htotal+16);
+					custom.hsstop = hsstop2hw(par->htotal+16);
+					custom.vsstrt = vsstrt2hw(par->vsstrt);
+					custom.vsstop = vsstrt2hw(par->vsstop);
+					break;
+				case 4 : /* powerdown */
+					custom.hsstrt = hsstrt2hw(par->htotal+16);
+					custom.hsstop = hsstop2hw(par->htotal+16);
+					custom.vsstrt = vsstrt2hw(par->vtotal+4);
+					custom.vsstop = vsstop2hw(par->vtotal+4);
+					break;
+			}
+			if (!(par->beamcon0 & BMC0_VARBEAMEN)) {
+				custom.htotal = htotal2hw(par->htotal);
+				custom.vtotal = vtotal2hw(par->vtotal);
+				custom.beamcon0 = BMC0_HARDDIS | BMC0_VARBEAMEN |
+				                  BMC0_VARVSYEN | BMC0_VARHSYEN | BMC0_VARCSYEN;
+			}
+		}
+	} else {
+		custom.dmacon = DMAF_SETCLR | DMAF_RASTER | DMAF_SPRITE;
+		red = palette[0].red;
+		green = palette[0].green;
+		blue = palette[0].blue;
+		if (!IS_OCS) {
+			custom.hsstrt = hsstrt2hw(par->hsstrt);
+			custom.hsstop = hsstop2hw(par->hsstop);
+			custom.vsstrt = vsstrt2hw(par->vsstrt);
+			custom.vsstop = vsstop2hw(par->vsstop);
+			custom.beamcon0 = par->beamcon0;
+		}
+	}
+#if defined(CONFIG_FB_AMIGA_AGA)
+	if (IS_AGA) {
+		custom.bplcon3 = bplcon3;
+		custom.color[0] = rgb2hw8_high(red, green, blue);
+		custom.bplcon3 = bplcon3 | BPC3_LOCT;
+		custom.color[0] = rgb2hw8_low(red, green, blue);
+		custom.bplcon3 = bplcon3;
+	} else
+#endif
+	{
+#if defined(CONFIG_FB_AMIGA_ECS)
+		if (par->bplcon0 & BPC0_SHRES) {
+			u_short color, mask;
+			int i;
+
+			mask = 0x3333;
+			color = rgb2hw2(red, green, blue);
+			for (i = 12; i >= 0; i -= 4)
+				custom.color[i] = ecs_palette[i] = (ecs_palette[i] & mask) | color;
+			mask <<=2; color >>= 2;
+			for (i = 3; i >= 0; i--)
+				custom.color[i] = ecs_palette[i] = (ecs_palette[i] & mask) | color;
+		} else
+#endif
+			custom.color[0] = rgb2hw4(red, green, blue);
+	}
+	is_blanked = do_blank > 0 ? do_blank : 0;
+}
+
+	/*
+	 * Flash the cursor (called by VBlank interrupt)
+	 */
+
+static int ami_get_fix_cursorinfo(struct fb_fix_cursorinfo *fix, int con)
+{
+	struct amiga_fb_par *par = &currentpar;
+
+	fix->crsr_width = fix->crsr_xsize = par->crsr.width;
+	fix->crsr_height = fix->crsr_ysize = par->crsr.height;
+	fix->crsr_color1 = 17;
+	fix->crsr_color2 = 18;
+	return 0;
+}
+
+static int ami_get_var_cursorinfo(struct fb_var_cursorinfo *var, u_char *data, int con)
+{
+	struct amiga_fb_par *par = &currentpar;
+	register u_short *lspr, *sspr;
+	register u_long datawords asm ("d2");
+	register short delta;
+	register u_char color;
+	short height, width, bits, words;
+	int i, size, alloc;
+
+	size = par->crsr.height*par->crsr.width;
+	alloc = var->height*var->width;
+	var->height = par->crsr.height;
+	var->width = par->crsr.width;
+	var->xspot = par->crsr.spot_x;
+	var->yspot = par->crsr.spot_y;
+	if (size > var->height*var->width)
+		return -ENAMETOOLONG;
+	if ((i = verify_area(VERIFY_WRITE, (void *)data, size)))
+		return i;
+	delta = 1<<par->crsr.fmode;
+	lspr = lofsprite + (delta<<1);
+	if (par->bplcon0 & BPC0_LACE)
+		sspr = shfsprite + (delta<<1);
+	else
+		sspr = 0;
+	for (height = (short)var->height-1; height >= 0; height--) {
+		bits = 0; words = delta; datawords = 0;
+		for (width = (short)var->width-1; width >= 0; width--) {
+			if (bits == 0) {
+				bits = 16; --words;
+				asm volatile ("movew %1@(%3:w:2),%0 ; swap %0 ; movew %1@+,%0"
+					: "=d" (datawords), "=a" (lspr) : "1" (lspr), "d" (delta));
+			}
+			--bits;
+			asm volatile (
+				"clrb %0 ; swap %1 ; lslw #1,%1 ; roxlb #1,%0 ; "
+				"swap %1 ; lslw #1,%1 ; roxlb #1,%0"
+				: "=d" (color), "=d" (datawords) : "1" (datawords));
+			put_user(color, data++);
+		}
+		if (bits > 0) {
+			--words; ++lspr;
+		}
+		while (--words >= 0)
+			++lspr;
+		asm volatile ("lea %0@(%4:w:2),%0 ; tstl %1 ; jeq 1f ; exg %0,%1\n1:"
+			: "=a" (lspr), "=a" (sspr) : "0" (lspr), "1" (sspr), "d" (delta));
+	}
+	return 0;
+}
+
+static int ami_set_var_cursorinfo(struct fb_var_cursorinfo *var, u_char *data, int con)
+{
+	struct amiga_fb_par *par = &currentpar;
+	register u_short *lspr, *sspr;
+	register u_long datawords asm ("d2");
+	register short delta;
+	u_short fmode;
+	short height, width, bits, words;
+	int i;
+
+	if (!var->width)
+		return -EINVAL;
+	else if (var->width <= 16)
+		fmode = TAG_FMODE_1;
+	else if (var->width <= 32)
+		fmode = TAG_FMODE_2;
+	else if (var->width <= 64)
+		fmode = TAG_FMODE_4;
+	else
+		return -EINVAL;
+	if (fmode > maxfmode)
+		return -EINVAL;
+	if (!var->height)
+		return -EINVAL;
+	if ((i = verify_area(VERIFY_READ, (void *)data, var->width*var->height)))
+		return i;
+	delta = 1<<fmode;
+	lofsprite = shfsprite = (u_short *)spritememory;
+	lspr = lofsprite + (delta<<1);
+	if (par->bplcon0 & BPC0_LACE) {
+		if (((var->height+4)<<fmode<<2) > SPRITEMEMSIZE)
+			return -EINVAL;
+		memset(lspr, 0, (var->height+4)<<fmode<<2);
+		shfsprite += ((var->height+5)&-2)<<fmode;
+		sspr = shfsprite + (delta<<1);
+	} else {
+		if (((var->height+2)<<fmode<<2) > SPRITEMEMSIZE)
+			return -EINVAL;
+		memset(lspr, 0, (var->height+2)<<fmode<<2);
+		sspr = 0;
+	}
+	for (height = (short)var->height-1; height >= 0; height--) {
+		bits = 16; words = delta; datawords = 0;
+		for (width = (short)var->width-1; width >= 0; width--) {
+			unsigned long tdata = 0;
+			get_user(tdata, (char *)data);
+			data++;
+			asm volatile (
+				"lsrb #1,%2 ; roxlw #1,%0 ; swap %0 ; "
+				"lsrb #1,%2 ; roxlw #1,%0 ; swap %0"
+				: "=d" (datawords)
+				: "0" (datawords), "d" (tdata));
+			if (--bits == 0) {
+				bits = 16; --words;
+				asm volatile ("swap %2 ; movew %2,%0@(%3:w:2) ; swap %2 ; movew %2,%0@+"
+					: "=a" (lspr) : "0" (lspr), "d" (datawords), "d" (delta));
+			}
+		}
+		if (bits < 16) {
+			--words;
+			asm volatile (
+				"swap %2 ; lslw %4,%2 ; movew %2,%0@(%3:w:2) ; "
+				"swap %2 ; lslw %4,%2 ; movew %2,%0@+"
+				: "=a" (lspr) : "0" (lspr), "d" (datawords), "d" (delta), "d" (bits));
+		}
+		while (--words >= 0)
+			asm volatile ("moveql #0,%%d0 ; movew %%d0,%0@(%2:w:2) ; movew %%d0,%0@+"
+				: "=a" (lspr) : "0" (lspr), "d" (delta) : "d0");
+		asm volatile ("lea %0@(%4:w:2),%0 ; tstl %1 ; jeq 1f ; exg %0,%1\n1:"
+			: "=a" (lspr), "=a" (sspr) : "0" (lspr), "1" (sspr), "d" (delta));
+	}
+	par->crsr.height = var->height;
+	par->crsr.width = var->width;
+	par->crsr.spot_x = var->xspot;
+	par->crsr.spot_y = var->yspot;
+	par->crsr.fmode = fmode;
+	if (IS_AGA) {
+		par->fmode &= ~(FMODE_SPAGEM | FMODE_SPR32);
+		par->fmode |= sprfetchmode[fmode];
+		custom.fmode = par->fmode;
+	}
+	return 0;
+}
+
+static int ami_get_cursorstate(struct fb_cursorstate *state, int con)
+{
+	struct amiga_fb_par *par = &currentpar;
+
+	state->xoffset = par->crsr.crsr_x;
+	state->yoffset = par->crsr.crsr_y;
+	state->mode = cursormode;
+	return 0;
+}
+
+static int ami_set_cursorstate(struct fb_cursorstate *state, int con)
+{
+	struct amiga_fb_par *par = &currentpar;
+
+	par->crsr.crsr_x = state->xoffset;
+	par->crsr.crsr_y = state->yoffset;
+	if ((cursormode = state->mode) == FB_CURSOR_OFF)
+		cursorstate = -1;
+	do_cursor = 1;
+	return 0;
+}
+
+static void ami_set_sprite(void)
+{
+	struct amiga_fb_par *par = &currentpar;
+	copins *copl, *cops;
+	u_short hs, vs, ve;
+	u_long pl, ps, pt;
+	short mx, my;
+
+	cops = copdisplay.list[currentcop][0];
+	copl = copdisplay.list[currentcop][1];
+	ps = pl = ZTWO_PADDR(dummysprite);
+	mx = par->crsr.crsr_x-par->crsr.spot_x;
+	my = par->crsr.crsr_y-par->crsr.spot_y;
+	if (!(par->vmode & FB_VMODE_YWRAP)) {
+		mx -= par->xoffset;
+		my -= par->yoffset;
+	}
+	if (!is_blanked && cursorstate > 0 && par->crsr.height > 0 &&
+	    mx > -(short)par->crsr.width && mx < par->xres &&
+	    my > -(short)par->crsr.height && my < par->yres) {
+		pl = ZTWO_PADDR(lofsprite);
+		hs = par->diwstrt_h + (mx<<par->clk_shift) - 4;
+		vs = par->diwstrt_v + (my<<par->line_shift);
+		ve = vs + (par->crsr.height<<par->line_shift);
+		if (par->bplcon0 & BPC0_LACE) {
+			ps = ZTWO_PADDR(shfsprite);
+			lofsprite[0] = spr2hw_pos(vs, hs);
+			shfsprite[0] = spr2hw_pos(vs+1, hs);
+			if (mod2(vs)) {
+				lofsprite[1<<par->crsr.fmode] = spr2hw_ctl(vs, hs, ve);
+				shfsprite[1<<par->crsr.fmode] = spr2hw_ctl(vs+1, hs, ve+1);
+				pt = pl; pl = ps; ps = pt;
+			} else {
+				lofsprite[1<<par->crsr.fmode] = spr2hw_ctl(vs, hs, ve+1);
+				shfsprite[1<<par->crsr.fmode] = spr2hw_ctl(vs+1, hs, ve);
+			}
+		} else {
+			lofsprite[0] = spr2hw_pos(vs, hs) | (IS_AGA && (par->fmode & FMODE_BSCAN2) ? 0x80 : 0);
+			lofsprite[1<<par->crsr.fmode] = spr2hw_ctl(vs, hs, ve);
+		}
+	}
+	copl[cop_spr0ptrh].w[1] = highw(pl);
+	copl[cop_spr0ptrl].w[1] = loww(pl);
+	if (par->bplcon0 & BPC0_LACE) {
+		cops[cop_spr0ptrh].w[1] = highw(ps);
+		cops[cop_spr0ptrl].w[1] = loww(ps);
+	}
+}
+
+	/*
+	 * Initialise the Copper Initialisation List
+	 */
+
+static void ami_init_copper(void)
+{
+	copins *cop = copdisplay.init;
+	u_long p;
+	int i;
+
+	if (!IS_OCS) {
+		(cop++)->l = CMOVE(BPC0_COLOR | BPC0_SHRES | BPC0_ECSENA, bplcon0);
+		(cop++)->l = CMOVE(0x0181, diwstrt);
+		(cop++)->l = CMOVE(0x0281, diwstop);
+		(cop++)->l = CMOVE(0x0000, diwhigh);
+	} else
+		(cop++)->l = CMOVE(BPC0_COLOR, bplcon0);
+	p = ZTWO_PADDR(dummysprite);
+	for (i = 0; i < 8; i++) {
+		(cop++)->l = CMOVE(0, spr[i].pos);
+		(cop++)->l = CMOVE(highw(p), sprpt[i]);
+		(cop++)->l = CMOVE2(loww(p), sprpt[i]);
+	}
+
+	(cop++)->l = CMOVE(IF_SETCLR | IF_COPER, intreq);
+	copdisplay.wait = cop;
+	(cop++)->l = CEND;
+	(cop++)->l = CMOVE(0, copjmp2);
+	cop->l = CEND;
+
+	custom.cop1lc = (u_short *)ZTWO_PADDR(copdisplay.init);
+	custom.copjmp1 = 0;
+}
+
+static void ami_reinit_copper(void)
+{
+	struct amiga_fb_par *par = &currentpar;
+
+	copdisplay.init[cip_bplcon0].w[1] = ~(BPC0_BPU3 | BPC0_BPU2 | BPC0_BPU1 | BPC0_BPU0) & par->bplcon0;
+	copdisplay.wait->l = CWAIT(32, par->diwstrt_v-4);
+}
+
+	/*
+	 * Build the Copper List
+	 */
+
+static void ami_build_copper(void)
+{
+	struct amiga_fb_par *par = &currentpar;
+	copins *copl, *cops;
+	u_long p;
+
+	currentcop = 1 - currentcop;
+
+	copl = copdisplay.list[currentcop][1];
+
+	(copl++)->l = CWAIT(0, 10);
+	(copl++)->l = CMOVE(par->bplcon0, bplcon0);
+	(copl++)->l = CMOVE(0, sprpt[0]);
+	(copl++)->l = CMOVE2(0, sprpt[0]);
+
+	if (par->bplcon0 & BPC0_LACE) {
+		cops = copdisplay.list[currentcop][0];
+
+		(cops++)->l = CWAIT(0, 10);
+		(cops++)->l = CMOVE(par->bplcon0, bplcon0);
+		(cops++)->l = CMOVE(0, sprpt[0]);
+		(cops++)->l = CMOVE2(0, sprpt[0]);
+
+		(copl++)->l = CMOVE(diwstrt2hw(par->diwstrt_h, par->diwstrt_v+1), diwstrt);
+		(copl++)->l = CMOVE(diwstop2hw(par->diwstop_h, par->diwstop_v+1), diwstop);
+		(cops++)->l = CMOVE(diwstrt2hw(par->diwstrt_h, par->diwstrt_v), diwstrt);
+		(cops++)->l = CMOVE(diwstop2hw(par->diwstop_h, par->diwstop_v), diwstop);
+		if (!IS_OCS) {
+			(copl++)->l = CMOVE(diwhigh2hw(par->diwstrt_h, par->diwstrt_v+1,
+			                    par->diwstop_h, par->diwstop_v+1), diwhigh);
+			(cops++)->l = CMOVE(diwhigh2hw(par->diwstrt_h, par->diwstrt_v,
+			                    par->diwstop_h, par->diwstop_v), diwhigh);
+#if 0
+			if (par->beamcon0 & BMC0_VARBEAMEN) {
+				(copl++)->l = CMOVE(vtotal2hw(par->vtotal), vtotal);
+				(copl++)->l = CMOVE(vbstrt2hw(par->vbstrt+1), vbstrt);
+				(copl++)->l = CMOVE(vbstop2hw(par->vbstop+1), vbstop);
+				(cops++)->l = CMOVE(vtotal2hw(par->vtotal), vtotal);
+				(cops++)->l = CMOVE(vbstrt2hw(par->vbstrt), vbstrt);
+				(cops++)->l = CMOVE(vbstop2hw(par->vbstop), vbstop);
+			}
+#endif
+		}
+		p = ZTWO_PADDR(copdisplay.list[currentcop][0]);
+		(copl++)->l = CMOVE(highw(p), cop2lc);
+		(copl++)->l = CMOVE2(loww(p), cop2lc);
+		p = ZTWO_PADDR(copdisplay.list[currentcop][1]);
+		(cops++)->l = CMOVE(highw(p), cop2lc);
+		(cops++)->l = CMOVE2(loww(p), cop2lc);
+		copdisplay.rebuild[0] = cops;
+	} else {
+		(copl++)->l = CMOVE(diwstrt2hw(par->diwstrt_h, par->diwstrt_v), diwstrt);
+		(copl++)->l = CMOVE(diwstop2hw(par->diwstop_h, par->diwstop_v), diwstop);
+		if (!IS_OCS) {
+			(copl++)->l = CMOVE(diwhigh2hw(par->diwstrt_h, par->diwstrt_v,
+			                    par->diwstop_h, par->diwstop_v), diwhigh);
+#if 0
+			if (par->beamcon0 & BMC0_VARBEAMEN) {
+				(copl++)->l = CMOVE(vtotal2hw(par->vtotal), vtotal);
+				(copl++)->l = CMOVE(vbstrt2hw(par->vbstrt), vbstrt);
+				(copl++)->l = CMOVE(vbstop2hw(par->vbstop), vbstop);
+			}
+#endif
+		}
+	}
+	copdisplay.rebuild[1] = copl;
+
+	ami_update_par();
+	ami_rebuild_copper();
+}
+
+	/*
+	 * Rebuild the Copper List
+	 *
+	 * We only change the things that are not static
+	 */
+
+static void ami_rebuild_copper(void)
+{
+	struct amiga_fb_par *par = &currentpar;
+	copins *copl, *cops;
+	u_short line, h_end1, h_end2;
+	short i;
+	u_long p;
+
+	if (IS_AGA && maxfmode + par->clk_shift == 0)
+		h_end1 = par->diwstrt_h-64;
+	else
+		h_end1 = par->htotal-32;
+	h_end2 = par->ddfstop+64;
+
+	ami_set_sprite();
+
+	copl = copdisplay.rebuild[1];
+	p = par->bplpt0;
+	if (par->vmode & FB_VMODE_YWRAP) {
+		if ((par->vyres-par->yoffset) != 1 || !mod2(par->diwstrt_v)) {
+			if (par->yoffset > par->vyres-par->yres) {
+				for (i = 0; i < (short)par->bpp; i++, p += par->next_plane) {
+					(copl++)->l = CMOVE(highw(p), bplpt[i]);
+					(copl++)->l = CMOVE2(loww(p), bplpt[i]);
+				}
+				line = par->diwstrt_v + ((par->vyres-par->yoffset)<<par->line_shift) - 1;
+				while (line >= 512) {
+					(copl++)->l = CWAIT(h_end1, 510);
+					line -= 512;
+				}
+				if (line >= 510 && IS_AGA && maxfmode + par->clk_shift == 0)
+					(copl++)->l = CWAIT(h_end1, line);
+				else
+					(copl++)->l = CWAIT(h_end2, line);
+				p = par->bplpt0wrap;
+			}
+		} else p = par->bplpt0wrap;
+	}
+	for (i = 0; i < (short)par->bpp; i++, p += par->next_plane) {
+		(copl++)->l = CMOVE(highw(p), bplpt[i]);
+		(copl++)->l = CMOVE2(loww(p), bplpt[i]);
+	}
+	copl->l = CEND;
+
+	if (par->bplcon0 & BPC0_LACE) {
+		cops = copdisplay.rebuild[0];
+		p = par->bplpt0;
+		if (mod2(par->diwstrt_v))
+			p -= par->next_line;
+		else
+			p += par->next_line;
+		if (par->vmode & FB_VMODE_YWRAP) {
+			if ((par->vyres-par->yoffset) != 1 || mod2(par->diwstrt_v)) {
+				if (par->yoffset > par->vyres-par->yres+1) {
+					for (i = 0; i < (short)par->bpp; i++, p += par->next_plane) {
+						(cops++)->l = CMOVE(highw(p), bplpt[i]);
+						(cops++)->l = CMOVE2(loww(p), bplpt[i]);
+					}
+					line = par->diwstrt_v + ((par->vyres-par->yoffset)<<par->line_shift) - 2;
+					while (line >= 512) {
+						(cops++)->l = CWAIT(h_end1, 510);
+						line -= 512;
+					}
+					if (line > 510 && IS_AGA && maxfmode + par->clk_shift == 0)
+						(cops++)->l = CWAIT(h_end1, line);
+					else
+						(cops++)->l = CWAIT(h_end2, line);
+					p = par->bplpt0wrap;
+					if (mod2(par->diwstrt_v+par->vyres-par->yoffset))
+						p -= par->next_line;
+					else
+						p += par->next_line;
+				}
+			} else p = par->bplpt0wrap - par->next_line;
+		}
+		for (i = 0; i < (short)par->bpp; i++, p += par->next_plane) {
+			(cops++)->l = CMOVE(highw(p), bplpt[i]);
+			(cops++)->l = CMOVE2(loww(p), bplpt[i]);
+		}
+		cops->l = CEND;
+	}
+}
+
+
+#ifdef MODULE
+int init_module(void)
+{
+    return(amiga_fb_init(NULL));
+}
+
+void cleanup_module(void)
+{
+#if 0
+    /* Not yet supported */
+    unregister_framebuffer(&fb_info);
+#endif
+}
+#endif /* MODULE */
--- linux-2.1.42/drivers/video/atafb.c.orig	Mon Jun  9 23:02:51 1997
+++ linux-2.1.42/drivers/video/atafb.c	Thu Jun 12 22:48:11 1997
@@ -0,0 +1,3329 @@
+/*
+ * linux/drivers/video/atafb.c -- Atari builtin chipset frame buffer device
+ *
+ *  Copyright (C) 1994 Martin Schaller & Roman Hodek
+ *  
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file COPYING in the main directory of this archive
+ * for more details.
+ *
+ * History:
+ *   - 03 Jan 95: Original version by Martin Schaller: The TT driver and
+ *                all the device independent stuff
+ *   - 09 Jan 95: Roman: I've added the hardware abstraction (hw_switch)
+ *                and wrote the Falcon, ST(E), and External drivers
+ *                based on the original TT driver.
+ *   - 07 May 95: Martin: Added colormap operations for the external driver
+ *   - 21 May 95: Martin: Added support for overscan
+ *		  Andreas: some bug fixes for this
+ *   -    Jul 95: Guenther Kelleter <guenther@pool.informatik.rwth-aachen.de>:
+ *                Programmable Falcon video modes
+ *                (thanks to Christian Cartus for documentation
+ *                of VIDEL registers).
+ *   - 27 Dec 95: Guenther: Implemented user definable video modes "user[0-7]"
+ *                on minor 24...31. "user0" may be set on commandline by
+ *                "R<x>;<y>;<depth>". (Makes sense only on Falcon)
+ *                Video mode switch on Falcon now done at next VBL interrupt
+ *                to avoid the annoying right shift of the screen.
+ *
+ *
+ * To do:
+ *   - For the Falcon it is not possible to set random video modes on
+ *     SM124 and SC/TV, only the bootup resolution is supported.
+ *
+ */
+
+#define ATAFB_TT
+#define ATAFB_STE
+#define ATAFB_EXT
+#define ATAFB_FALCON
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/errno.h>
+#include <linux/string.h>
+#include <linux/mm.h>
+#include <linux/tty.h>
+#include <linux/malloc.h>
+#include <linux/delay.h>
+#include <linux/init.h>
+
+#include <asm/setup.h>
+#include <asm/uaccess.h>
+#include <asm/pgtable.h>
+#include <asm/irq.h>
+
+#include <asm/atarihw.h>
+#include <asm/atariints.h>
+
+#include <linux/fb.h>
+#include <asm/atarikb.h>
+
+#define SWITCH_ACIA 0x01		/* modes for switch on OverScan */
+#define SWITCH_SND6 0x40
+#define SWITCH_SND7 0x80
+#define SWITCH_NONE 0x00
+
+
+#define arraysize(x)			(sizeof(x)/sizeof(*(x)))
+
+#define up(x, r) (((x) + (r) - 1) & ~((r)-1))
+
+
+static int default_par=0;	/* default resolution (0=none) */
+
+static unsigned long default_mem_req=0;
+
+static int hwscroll=-1;
+
+static int use_hwscroll = 1;
+
+static int sttt_xres=640,st_yres=400,tt_yres=480;
+static int sttt_xres_virtual=640,sttt_yres_virtual=400;
+static int ovsc_offset=0, ovsc_addlen=0;
+int        ovsc_switchmode=0;
+
+static struct atari_fb_par {
+	unsigned long screen_base;
+	int yres_virtual;
+	union {
+		struct {
+			int mode;
+			int sync;
+		} tt, st;
+		struct falcon_hw {
+			/* Here are fields for storing a video mode, as direct
+			 * parameters for the hardware.
+			 */
+			short sync;
+			short line_width;
+			short line_offset;
+			short st_shift;
+			short f_shift;
+			short vid_control;
+			short vid_mode;
+			short xoffset;
+			short hht, hbb, hbe, hdb, hde, hss;
+			short vft, vbb, vbe, vdb, vde, vss;
+			/* auxiliary information */
+			short mono;
+			short ste_mode;
+			short bpp;
+		} falcon;
+		/* Nothing needed for external mode */
+	} hw;
+} current_par;
+
+/* Don't calculate an own resolution, and thus don't change the one found when
+ * booting (currently used for the Falcon to keep settings for internal video
+ * hardware extensions (e.g. ScreenBlaster)  */
+static int DontCalcRes = 0; 
+
+#define HHT hw.falcon.hht
+#define HBB hw.falcon.hbb
+#define HBE hw.falcon.hbe
+#define HDB hw.falcon.hdb
+#define HDE hw.falcon.hde
+#define HSS hw.falcon.hss
+#define VFT hw.falcon.vft
+#define VBB hw.falcon.vbb
+#define VBE hw.falcon.vbe
+#define VDB hw.falcon.vdb
+#define VDE hw.falcon.vde
+#define VSS hw.falcon.vss
+#define VCO_CLOCK25		0x04
+#define VCO_CSYPOS		0x10
+#define VCO_VSYPOS		0x20
+#define VCO_HSYPOS		0x40
+#define VCO_SHORTOFFS	0x100
+#define VMO_DOUBLE		0x01
+#define VMO_INTER		0x02
+#define VMO_PREMASK		0x0c
+
+static struct fb_info fb_info;
+
+static unsigned long screen_base;	/* base address of screen */
+static unsigned long real_screen_base;	/* (only for Overscan) */
+
+static int screen_len;
+
+static int current_par_valid=0; 
+
+static int currcon=0;
+
+static int mono_moni=0;
+
+static struct display disp;
+
+
+#ifdef ATAFB_EXT
+/* external video handling */
+
+static unsigned			external_xres;
+static unsigned			external_yres;
+static unsigned			external_depth;
+static int				external_pmode;
+static unsigned long	external_addr = 0;
+static unsigned long	external_len;
+static unsigned long	external_vgaiobase = 0;
+static unsigned int		external_bitspercol = 6;
+
+/* 
+JOE <joe@amber.dinoco.de>: 
+added card type for external driver, is only needed for
+colormap handling.
+*/
+
+enum cardtype { IS_VGA, IS_MV300 };
+static enum cardtype external_card_type = IS_VGA;
+
+/*
+The MV300 mixes the color registers. So we need an array of munged
+indices in order to acces the correct reg.
+*/
+static int MV300_reg_1bit[2]={0,1};
+static int MV300_reg_4bit[16]={
+0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15 };
+static int MV300_reg_8bit[256]={
+0, 128, 64, 192, 32, 160, 96, 224, 16, 144, 80, 208, 48, 176, 112, 240, 
+8, 136, 72, 200, 40, 168, 104, 232, 24, 152, 88, 216, 56, 184, 120, 248, 
+4, 132, 68, 196, 36, 164, 100, 228, 20, 148, 84, 212, 52, 180, 116, 244, 
+12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 
+2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82, 210, 50, 178, 114, 242, 
+10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 
+6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86, 214, 54, 182, 118, 246, 
+14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 
+1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81, 209, 49, 177, 113, 241, 
+9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 
+5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85, 213, 53, 181, 117, 245, 
+13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 
+3, 131, 67, 195, 35, 163, 99, 227, 19, 147, 83, 211, 51, 179, 115, 243, 
+11, 139, 75, 203, 43, 171, 107, 235, 27, 155, 91, 219, 59, 187, 123, 251, 
+7, 135, 71, 199, 39, 167, 103, 231, 23, 151, 87, 215, 55, 183, 119, 247, 
+15, 143, 79, 207, 47, 175, 111, 239, 31, 159, 95, 223, 63, 191, 127, 255 }; 
+
+static int *MV300_reg = MV300_reg_8bit;
+
+/*
+And on the MV300 it's difficult to read out the hardware palette. So we
+just keep track of the set colors in our own array here, and use that!
+*/
+
+static struct { unsigned char red,green,blue,pad; } MV300_color[256];
+#endif /* ATAFB_EXT */
+
+
+static int inverse=0;
+
+extern int fontheight_8x8;
+extern int fontwidth_8x8;
+extern unsigned char fontdata_8x8[];
+
+extern int fontheight_8x16;
+extern int fontwidth_8x16;
+extern unsigned char fontdata_8x16[];
+
+/* import first 16 colors from fbcon.c */
+extern unsigned short packed16_cmap[16];
+
+
+/* ++roman: This structure abstracts from the underlying hardware (ST(e),
+ * TT, or Falcon.
+ *
+ * int (*detect)( void )
+ *   This function should detect the current video mode settings and
+ *   store them in atari_fb_predefined[0] for later reference by the
+ *   user. Return the index+1 of an equivalent predefined mode or 0
+ *   if there is no such.
+ * 
+ * int (*encode_fix)( struct fb_fix_screeninfo *fix,
+ *                    struct atari_fb_par *par )
+ *   This function should fill in the 'fix' structure based on the
+ *   values in the 'par' structure.
+ *   
+ * int (*decode_var)( struct fb_var_screeninfo *var,
+ *                    struct atari_fb_par *par )
+ *   Get the video params out of 'var'. If a value doesn't fit, round
+ *   it up, if it's too big, return EINVAL.
+ *   Round up in the following order: bits_per_pixel, xres, yres, 
+ *   xres_virtual, yres_virtual, xoffset, yoffset, grayscale, bitfields, 
+ *   horizontal timing, vertical timing.
+ *
+ * int (*encode_var)( struct fb_var_screeninfo *var,
+ *                    struct atari_fb_par *par );
+ *   Fill the 'var' structure based on the values in 'par' and maybe
+ *   other values read out of the hardware.
+ *   
+ * void (*get_par)( struct atari_fb_par *par )
+ *   Fill the hardware's 'par' structure.
+ *   
+ * void (*set_par)( struct atari_fb_par *par )
+ *   Set the hardware according to 'par'.
+ *   
+ * int (*setcolreg)( unsigned regno, unsigned red,
+ *                   unsigned green, unsigned blue,
+ *                   unsigned transp )
+ *   Set a single color register. The values supplied are already
+ *   rounded down to the hardware's capabilities (according to the
+ *   entries in the var structure). Return != 0 for invalid regno.
+ *
+ * int (*getcolreg)( unsigned regno, unsigned *red,
+ *                   unsigned *green, unsigned *blue,
+ *                   unsigned *transp )
+ *   Read a single color register and split it into
+ *   colors/transparent. Return != 0 for invalid regno.
+ *
+ * void (*set_screen_base)( unsigned long s_base )
+ *   Set the base address of the displayed frame buffer. Only called
+ *   if yres_virtual > yres or xres_virtual > xres.
+ *
+ * int (*blank)( int blank_mode )
+ *   Blank the screen if blank_mode!=0, else unblank. If blank==NULL then
+ *   the caller blanks by setting the CLUT to all black. Return 0 if blanking
+ *   succeeded, !=0 if un-/blanking failed due to e.g. a video mode which
+ *   doesn't support it. Implements VESA suspend and powerdown modes on
+ *   hardware that supports disabling hsync/vsync:
+ *       blank_mode==2: suspend vsync, 3:suspend hsync, 4: powerdown.
+ */
+
+static struct fb_hwswitch {
+	int  (*detect)( void );
+	int  (*encode_fix)( struct fb_fix_screeninfo *fix,
+						struct atari_fb_par *par );
+	int  (*decode_var)( struct fb_var_screeninfo *var,
+						struct atari_fb_par *par );
+	int  (*encode_var)( struct fb_var_screeninfo *var,
+						struct atari_fb_par *par );
+	void (*get_par)( struct atari_fb_par *par );
+	void (*set_par)( struct atari_fb_par *par );
+	int  (*getcolreg)( unsigned regno, unsigned *red,
+					   unsigned *green, unsigned *blue,
+					   unsigned *transp );
+	int  (*setcolreg)( unsigned regno, unsigned red,
+					   unsigned green, unsigned blue,
+					   unsigned transp );
+	void (*set_screen_base)( unsigned long s_base );
+	int  (*blank)( int blank_mode );
+	int  (*pan_display)( struct fb_var_screeninfo *var,
+						 struct atari_fb_par *par);
+} *fbhw;
+
+static char *autodetect_names[] = {"autodetect", NULL};
+static char *stlow_names[] = {"stlow", NULL};
+static char *stmid_names[] = {"stmid", "default5", NULL};
+static char *sthigh_names[] = {"sthigh", "default4", NULL};
+static char *ttlow_names[] = {"ttlow", NULL};
+static char *ttmid_names[]= {"ttmid", "default1", NULL};
+static char *tthigh_names[]= {"tthigh", "default2", NULL};
+static char *vga2_names[] = {"vga2", NULL};
+static char *vga4_names[] = {"vga4", NULL};
+static char *vga16_names[] = {"vga16", "default3", NULL};
+static char *vga256_names[] = {"vga256", NULL};
+static char *falh2_names[] = {"falh2", NULL};
+static char *falh16_names[] = {"falh16", NULL};
+static char *user0_names[] = {"user0", NULL};
+static char *user1_names[] = {"user1", NULL};
+static char *user2_names[] = {"user2", NULL};
+static char *user3_names[] = {"user3", NULL};
+static char *user4_names[] = {"user4", NULL};
+static char *user5_names[] = {"user5", NULL};
+static char *user6_names[] = {"user6", NULL};
+static char *user7_names[] = {"user7", NULL};
+static char *dummy_names[] = {"dummy", NULL};
+
+static char **fb_var_names[] = {
+	/* Writing the name arrays directly in this array (via "(char *[]){...}")
+	 * crashes gcc 2.5.8 (sigsegv) if the inner array
+	 * contains more than two items. I've also seen that all elements
+	 * were identical to the last (my cross-gcc) :-(*/
+	autodetect_names,
+	stlow_names,
+	stmid_names,
+	sthigh_names,
+	ttlow_names,
+	ttmid_names,
+	tthigh_names,
+	vga2_names,
+	vga4_names,
+	vga16_names,
+	vga256_names,
+	falh2_names,
+	falh16_names,
+	dummy_names, dummy_names, dummy_names, dummy_names,
+	dummy_names, dummy_names, dummy_names, dummy_names,
+	dummy_names, dummy_names,
+	user0_names,
+	user1_names,
+	user2_names,
+	user3_names,
+	user4_names,
+	user5_names,
+	user6_names,
+	user7_names,
+	NULL
+	/* ,NULL */ /* this causes a sigsegv on my gcc-2.5.8 */
+};
+
+static struct fb_var_screeninfo atari_fb_predefined[] = {
+ 	/*
+ 	 * yres_virtual==0 means use hw-scrolling if possible, else yres
+ 	 */
+ 	{ /* autodetect */
+	  0, 0, 0, 0, 0, 0, 0, 0,   		/* xres-grayscale */
+	  {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, 	/* red green blue tran*/
+	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
+ 	{ /* st low */
+	  320, 200, 320, 0, 0, 0, 4, 0,
+	  {0, 4, 0}, {0, 4, 0}, {0, 4, 0}, {0, 0, 0},
+	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
+	{ /* st mid */
+	  640, 200, 640, 0, 0, 0, 2, 0,
+	  {0, 4, 0}, {0, 4, 0}, {0, 4, 0}, {0, 0, 0},
+	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
+	{ /* st high */
+	  640, 400, 640, 0, 0, 0, 1, 0,
+	  {0, 4, 0}, {0, 4, 0}, {0, 4, 0}, {0, 0, 0},
+	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
+	{ /* tt low */
+	  320, 480, 320, 0, 0, 0, 8, 0,
+	  {0, 4, 0}, {0, 4, 0}, {0, 4, 0}, {0, 0, 0},
+	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
+	{ /* tt mid */
+	  640, 480, 640, 0, 0, 0, 4, 0,
+	  {0, 4, 0}, {0, 4, 0}, {0, 4, 0}, {0, 0, 0},
+	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
+	{ /* tt high */
+	  1280, 960, 1280, 0, 0, 0, 1, 0,
+	  {0, 4, 0}, {0, 4, 0}, {0, 4, 0}, {0, 0, 0},
+	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
+	{ /* vga2 */
+	  640, 480, 640, 0, 0, 0, 1, 0,
+	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
+	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
+	{ /* vga4 */
+	  640, 480, 640, 0, 0, 0, 2, 0,
+	  {0, 4, 0}, {0, 4, 0}, {0, 4, 0}, {0, 0, 0},
+	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
+	{ /* vga16 */
+	  640, 480, 640, 0, 0, 0, 4, 0,
+	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
+	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
+	{ /* vga256 */
+	  640, 480, 640, 0, 0, 0, 8, 0,
+	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
+	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
+	{ /* falh2 */
+	  896, 608, 896, 0, 0, 0, 1, 0,
+	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
+	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
+	{ /* falh16 */
+	  896, 608, 896, 0, 0, 0, 4, 0,
+	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
+	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
+	/* Minor 14..23 free for more standard video modes */
+	{ 0, },
+	{ 0, },
+	{ 0, },
+	{ 0, },
+	{ 0, },
+	{ 0, },
+	{ 0, },
+	{ 0, },
+	{ 0, },
+	{ 0, },
+	/* Minor 24..31 reserved for user defined video modes */
+	{ /* user0, initialized to Rx;y;d from commandline, if supplied */
+	  0, 0, 0, 0, 0, 0, 0, 0,
+	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
+	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
+	{ /* user1 */
+	  0, 0, 0, 0, 0, 0, 0, 0,
+	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
+	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
+	{ /* user2 */
+	  0, 0, 0, 0, 0, 0, 0, 0,
+	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
+	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
+	{ /* user3 */
+	  0, 0, 0, 0, 0, 0, 0, 0,
+	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
+	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
+	{ /* user4 */
+	  0, 0, 0, 0, 0, 0, 0, 0,
+	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
+	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
+	{ /* user5 */
+	  0, 0, 0, 0, 0, 0, 0, 0,
+	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
+	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
+	{ /* user6 */
+	  0, 0, 0, 0, 0, 0, 0, 0,
+	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
+	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
+	{ /* user7 */
+	  0, 0, 0, 0, 0, 0, 0, 0,
+	  {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
+	  0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 }
+};
+
+static int num_atari_fb_predefined=arraysize(atari_fb_predefined);
+
+
+static int
+get_video_mode(char *vname)
+{
+    char ***name_list;
+    char **name;
+    int i;
+    name_list=fb_var_names;
+    for (i = 0 ; i < num_atari_fb_predefined ; i++) {
+	name=*(name_list++);
+	if (! name || ! *name)
+	    break;
+	while (*name) {
+	    if (! strcmp(vname, *name))
+		return i+1;
+	    name++;
+	}
+    }
+    return 0;
+}
+
+
+
+/* ------------------- TT specific functions ---------------------- */
+
+#ifdef ATAFB_TT
+
+static int tt_encode_fix( struct fb_fix_screeninfo *fix,
+						  struct atari_fb_par *par )
+
+{
+	int mode, i;
+
+	strcpy(fix->id,"Atari Builtin");
+	fix->smem_start=real_screen_base;
+	fix->smem_len = screen_len;
+	fix->type=FB_TYPE_INTERLEAVED_PLANES;
+	fix->type_aux=2;
+	fix->visual=FB_VISUAL_PSEUDOCOLOR;
+	mode = par->hw.tt.mode & TT_SHIFTER_MODEMASK;
+	if (mode == TT_SHIFTER_TTHIGH || mode == TT_SHIFTER_STHIGH) {
+		fix->type=FB_TYPE_PACKED_PIXELS;
+		fix->type_aux=0;
+		if (mode == TT_SHIFTER_TTHIGH)
+			fix->visual=FB_VISUAL_MONO01;
+	}
+	fix->xpanstep=0;
+	fix->ypanstep=1;
+	fix->ywrapstep=0;
+	fix->line_length = 0;
+	for (i=0; i<arraysize(fix->reserved); i++)
+		fix->reserved[i]=0;
+	return 0;
+}
+
+
+static int tt_decode_var( struct fb_var_screeninfo *var,
+						  struct atari_fb_par *par )
+{
+	int xres=var->xres;
+	int yres=var->yres;
+	int bpp=var->bits_per_pixel;
+	int linelen;
+	int yres_virtual = var->yres_virtual;
+
+	if (mono_moni) {
+		if (bpp > 1 || xres > sttt_xres*2 || yres >tt_yres*2)
+			return -EINVAL;
+		par->hw.tt.mode=TT_SHIFTER_TTHIGH;
+		xres=sttt_xres*2;
+		yres=tt_yres*2;
+		bpp=1;
+	} else {
+		if (bpp > 8 || xres > sttt_xres || yres > tt_yres)
+			return -EINVAL;
+		if (bpp > 4) {
+			if (xres > sttt_xres/2 || yres > tt_yres)
+				return -EINVAL;
+			par->hw.tt.mode=TT_SHIFTER_TTLOW;
+			xres=sttt_xres/2;
+			yres=tt_yres;
+			bpp=8;
+		}
+		else if (bpp > 2) {
+			if (xres > sttt_xres || yres > tt_yres)
+				return -EINVAL;
+			if (xres > sttt_xres/2 || yres > st_yres/2) {
+				par->hw.tt.mode=TT_SHIFTER_TTMID;
+				xres=sttt_xres;
+				yres=tt_yres;
+				bpp=4;
+			}
+			else {
+				par->hw.tt.mode=TT_SHIFTER_STLOW;
+				xres=sttt_xres/2;
+				yres=st_yres/2;
+				bpp=4;
+			}
+		}
+		else if (bpp > 1) {
+			if (xres > sttt_xres || yres > st_yres/2)
+				return -EINVAL;
+			par->hw.tt.mode=TT_SHIFTER_STMID;
+			xres=sttt_xres;
+			yres=st_yres/2;
+			bpp=2;
+		}
+		else if (var->xres > sttt_xres || var->yres > st_yres) {
+			return -EINVAL;
+		}
+		else {
+			par->hw.tt.mode=TT_SHIFTER_STHIGH;
+			xres=sttt_xres;
+			yres=st_yres;
+			bpp=1;
+		}
+	}
+	if (yres_virtual <= 0)
+		yres_virtual = 0;
+	else if (yres_virtual < yres)
+		yres_virtual = yres;
+	if (var->sync & FB_SYNC_EXT)
+		par->hw.tt.sync=0;
+	else
+		par->hw.tt.sync=1;
+	linelen=xres*bpp/8;
+	if (yres_virtual * linelen > screen_len && screen_len)
+		return -EINVAL;
+	if (yres * linelen > screen_len && screen_len)
+		return -EINVAL;
+	if (var->yoffset + yres > yres_virtual && yres_virtual)
+		return -EINVAL;
+	par->yres_virtual = yres_virtual;
+	par->screen_base = screen_base + var->yoffset * linelen;
+	return 0;
+}
+
+static int tt_encode_var( struct fb_var_screeninfo *var,
+						  struct atari_fb_par *par )
+{
+	int linelen, i;
+	var->red.offset=0;
+	var->red.length=4;
+	var->red.msb_right=0;
+	var->grayscale=0;
+
+	var->pixclock=31041;
+	var->left_margin=120;		/* these may be incorrect 	*/
+	var->right_margin=100;
+	var->upper_margin=8;
+	var->lower_margin=16;
+	var->hsync_len=140;
+	var->vsync_len=30;
+
+	var->height=-1;
+	var->width=-1;
+
+	if (par->hw.tt.sync & 1)
+		var->sync=0;
+	else
+		var->sync=FB_SYNC_EXT;
+
+	switch (par->hw.tt.mode & TT_SHIFTER_MODEMASK) {
+	case TT_SHIFTER_STLOW:
+		var->xres=sttt_xres/2;
+		var->xres_virtual=sttt_xres_virtual/2;
+		var->yres=st_yres/2;
+		var->bits_per_pixel=4;
+		break;
+	case TT_SHIFTER_STMID:
+		var->xres=sttt_xres;
+		var->xres_virtual=sttt_xres_virtual;
+		var->yres=st_yres/2;
+		var->bits_per_pixel=2;
+		break;
+	case TT_SHIFTER_STHIGH:
+		var->xres=sttt_xres;
+		var->xres_virtual=sttt_xres_virtual;
+		var->yres=st_yres;
+		var->bits_per_pixel=1;
+		break;
+	case TT_SHIFTER_TTLOW:
+		var->xres=sttt_xres/2;
+		var->xres_virtual=sttt_xres_virtual/2;
+		var->yres=tt_yres;
+		var->bits_per_pixel=8;
+		break;
+	case TT_SHIFTER_TTMID:
+		var->xres=sttt_xres;
+		var->xres_virtual=sttt_xres_virtual;
+		var->yres=tt_yres;
+		var->bits_per_pixel=4;
+		break;
+	case TT_SHIFTER_TTHIGH:
+		var->red.length=0;
+		var->xres=sttt_xres*2;
+		var->xres_virtual=sttt_xres_virtual*2;
+		var->yres=tt_yres*2;
+		var->bits_per_pixel=1;
+		break;
+	}		
+	var->blue=var->green=var->red;
+	var->transp.offset=0;
+	var->transp.length=0;
+	var->transp.msb_right=0;
+	linelen=var->xres_virtual * var->bits_per_pixel / 8;
+	if (! use_hwscroll)
+		var->yres_virtual=var->yres;
+	else if (screen_len)
+		if (par->yres_virtual)
+			var->yres_virtual = par->yres_virtual;
+		else
+			/* yres_virtual==0 means use maximum */
+			var->yres_virtual = screen_len / linelen;
+	else {
+		if (hwscroll < 0)
+			var->yres_virtual = 2 * var->yres;
+		else
+			var->yres_virtual=var->yres+hwscroll * 16;
+	}
+	var->xoffset=0;
+	if (screen_base)
+		var->yoffset=(par->screen_base - screen_base)/linelen;
+	else
+		var->yoffset=0;
+	var->nonstd=0;
+	var->activate=0;
+	var->vmode=FB_VMODE_NONINTERLACED;
+	for (i=0; i<arraysize(var->reserved); i++)
+		var->reserved[i]=0;
+	return 0;
+}
+
+
+static void tt_get_par( struct atari_fb_par *par )
+{
+	unsigned long addr;
+	par->hw.tt.mode=shifter_tt.tt_shiftmode;
+	par->hw.tt.sync=shifter.syncmode;
+	addr = ((shifter.bas_hi & 0xff) << 16) |
+	       ((shifter.bas_md & 0xff) << 8)  |
+	       ((shifter.bas_lo & 0xff));
+	par->screen_base = PTOV(addr);
+}
+
+static void tt_set_par( struct atari_fb_par *par )
+{
+	shifter_tt.tt_shiftmode=par->hw.tt.mode;
+	shifter.syncmode=par->hw.tt.sync;
+	/* only set screen_base if really necessary */
+	if (current_par.screen_base != par->screen_base)
+		fbhw->set_screen_base(par->screen_base);
+}
+
+
+static int tt_getcolreg( unsigned regno, unsigned *red,
+						 unsigned *green, unsigned *blue,
+						 unsigned *transp )
+{
+	if ((shifter_tt.tt_shiftmode & TT_SHIFTER_MODEMASK) == TT_SHIFTER_STHIGH)
+		regno += 254;
+	if (regno > 255)
+		return 1;
+	*blue = tt_palette[regno];
+	*green = (*blue >> 4) & 0xf;
+	*red = (*blue >> 8) & 0xf;
+	*blue &= 0xf;
+	*transp = 0;
+	return 0;
+}
+
+
+static int tt_setcolreg( unsigned regno, unsigned red,
+						 unsigned green, unsigned blue,
+						 unsigned transp )
+{
+	if ((shifter_tt.tt_shiftmode & TT_SHIFTER_MODEMASK) == TT_SHIFTER_STHIGH)
+		regno += 254;
+	if (regno > 255)
+		return 1;
+	tt_palette[regno] = (red << 8) | (green << 4) | blue;
+	if ((shifter_tt.tt_shiftmode & TT_SHIFTER_MODEMASK) ==
+		TT_SHIFTER_STHIGH && regno == 254)
+		tt_palette[0] = 0;
+	return 0;
+}
+
+						  
+static int tt_detect( void )
+
+{	struct atari_fb_par par;
+
+	/* Determine the connected monitor: The DMA sound must be
+	 * disabled before reading the MFP GPIP, because the Sound
+	 * Done Signal and the Monochrome Detect are XORed together!
+	 *
+	 * Even on a TT, we should look if there is a DMA sound. It was
+	 * announced that the Eagle is TT compatible, but only the PCM is
+	 * missing...
+	 */
+	if (ATARIHW_PRESENT(PCM_8BIT)) { 
+		tt_dmasnd.ctrl = DMASND_CTRL_OFF;
+		udelay(20);	/* wait a while for things to settle down */
+	}
+	mono_moni = (mfp.par_dt_reg & 0x80) == 0;
+
+	tt_get_par(&par);
+	tt_encode_var(&atari_fb_predefined[0], &par);
+
+	return 1;
+}
+
+#endif /* ATAFB_TT */
+
+/* ------------------- Falcon specific functions ---------------------- */
+
+#ifdef ATAFB_FALCON
+
+static int mon_type;		/* Falcon connected monitor */
+static int f030_bus_width;	/* Falcon ram bus width (for vid_control) */
+#define F_MON_SM	0
+#define F_MON_SC	1
+#define F_MON_VGA	2
+#define F_MON_TV	3
+
+/* Multisync monitor capabilities */
+/* Atari-TOS defaults if no boot option present */
+static long vfmin=58, vfmax=62, hfmin=31000, hfmax=32000;
+
+static struct pixel_clock {
+	unsigned long f;	/* f/[Hz] */
+	unsigned long t;	/* t/[ps] (=1/f) */
+	int right, hsync, left;	/* standard timing in clock cycles, not pixel */
+		/* hsync initialized in falcon_detect() */
+	int sync_mask;		/* or-mask for hw.falcon.sync to set this clock */
+	int control_mask;	/* ditto, for hw.falcon.vid_control */
+}
+f25  = {25175000, 39721, 18, 0, 42, 0x0, VCO_CLOCK25},
+f32  = {32000000, 31250, 18, 0, 42, 0x0, 0},
+fext = {       0,     0, 18, 0, 42, 0x1, 0};
+
+/* VIDEL-prescale values [mon_type][pixel_length from VCO] */
+static int vdl_prescale[4][3] = {{4,2,1}, {4,2,1}, {4,2,2}, {4,2,1}};
+
+/* Default hsync timing [mon_type] in picoseconds */
+static long h_syncs[4] = {3000000, 4875000, 4000000, 4875000};
+
+
+static inline int hxx_prescale(struct falcon_hw *hw)
+{
+	return hw->ste_mode ? 16 :
+		   vdl_prescale[mon_type][hw->vid_mode >> 2 & 0x3];
+}
+
+static int falcon_encode_fix( struct fb_fix_screeninfo *fix,
+							  struct atari_fb_par *par )
+{
+	int i;
+
+	strcpy(fix->id, "Atari Builtin");
+	fix->smem_start = real_screen_base;
+	fix->smem_len = screen_len;
+	fix->type = FB_TYPE_INTERLEAVED_PLANES;
+	fix->type_aux = 2;
+	fix->visual = FB_VISUAL_PSEUDOCOLOR;
+	fix->xpanstep = 1;
+	fix->ypanstep = 1;
+	fix->ywrapstep = 0;
+	if (par->hw.falcon.mono) {
+		fix->type = FB_TYPE_PACKED_PIXELS;
+		fix->type_aux = 0;
+		/* no smooth scrolling with longword aligned video mem */
+		fix->xpanstep = 32;
+	}
+	else if (par->hw.falcon.f_shift & 0x100) {
+		fix->type = FB_TYPE_PACKED_PIXELS;
+		fix->type_aux = 0;
+		/* Is this ok or should it be DIRECTCOLOR? */
+		fix->visual = FB_VISUAL_TRUECOLOR;
+		fix->xpanstep = 2;
+	}
+	fix->line_length = 0;
+	for (i=0; i<arraysize(fix->reserved); i++)
+		fix->reserved[i]=0;
+	return 0;
+}
+
+
+static int falcon_decode_var( struct fb_var_screeninfo *var,
+							  struct atari_fb_par *par )
+{
+	int bpp = var->bits_per_pixel;
+	int xres = var->xres;
+	int yres = var->yres;
+	int xres_virtual = var->xres_virtual;
+	int yres_virtual = var->yres_virtual;
+	int left_margin, right_margin, hsync_len;
+	int upper_margin, lower_margin, vsync_len;
+	int linelen;
+	int interlace = 0, doubleline = 0;
+	struct pixel_clock *pclock;
+	int plen; /* width of pixel in clock cycles */
+	int xstretch;
+	int prescale;
+	int longoffset = 0;
+	int hfreq, vfreq;
+
+/*
+	Get the video params out of 'var'. If a value doesn't fit, round
+	it up, if it's too big, return EINVAL.
+	Round up in the following order: bits_per_pixel, xres, yres, 
+	xres_virtual, yres_virtual, xoffset, yoffset, grayscale, bitfields, 
+	horizontal timing, vertical timing.
+
+	There is a maximum of screen resolution determined by pixelclock
+	and minimum frame rate -- (X+hmarg.)*(Y+vmarg.)*vfmin <= pixelclock.
+	In interlace mode this is     "     *    "     *vfmin <= pixelclock.
+	Additional constraints: hfreq.
+	Frequency range for multisync monitors is given via command line.
+	For TV and SM124 both frequencies are fixed.
+
+	X % 16 == 0 to fit 8x?? font (except 1 bitplane modes must use X%32==0)
+	Y % 16 == 0 to fit 8x16 font
+	Y % 8 == 0 if Y<400
+
+	Currently interlace and doubleline mode in var are ignored. 
+	On SM124 and TV only the standard resolutions can be used.
+*/
+
+	/* Reject uninitialized mode */
+	if (!xres || !yres || !bpp)
+		return -EINVAL;
+
+	if (mon_type == F_MON_SM && bpp != 1) {
+		return -EINVAL;
+	}
+	else if (bpp <= 1) {
+		bpp = 1;
+		par->hw.falcon.f_shift = 0x400;
+		par->hw.falcon.st_shift = 0x200;
+	}
+	else if (bpp <= 2) {
+		bpp = 2;
+		par->hw.falcon.f_shift = 0x000;
+		par->hw.falcon.st_shift = 0x100;
+	}
+	else if (bpp <= 4) {
+		bpp = 4;
+		par->hw.falcon.f_shift = 0x000;
+		par->hw.falcon.st_shift = 0x000;
+	}
+	else if (bpp <= 8) {
+		bpp = 8;
+		par->hw.falcon.f_shift = 0x010;
+	}
+	else if (bpp <= 16) {
+		bpp = 16; /* packed pixel mode */
+		par->hw.falcon.f_shift = 0x100; /* hicolor, no overlay */
+	}
+	else
+		return -EINVAL;
+	par->hw.falcon.bpp = bpp;
+
+	if (mon_type == F_MON_SM || DontCalcRes) {
+		/* Skip all calculations. VGA/TV/SC1224 only supported. */
+		struct fb_var_screeninfo *myvar = &atari_fb_predefined[0];
+		
+		if (bpp > myvar->bits_per_pixel ||
+			var->xres > myvar->xres ||
+			var->yres > myvar->yres)
+			return -EINVAL;
+		fbhw->get_par(par);	/* Current par will be new par */
+		goto set_screen_base;	/* Don't forget this */
+	}
+
+	/* Only some fixed resolutions < 640x400 */
+	if (xres <= 320)
+		xres = 320;
+	else if (xres <= 640 && bpp != 16)
+		xres = 640;
+	if (yres <= 200)
+		yres = 200;
+	else if (yres <= 240)
+		yres = 240;
+	else if (yres <= 400)
+		yres = 400;
+
+	/* 2 planes must use STE compatibility mode */
+	par->hw.falcon.ste_mode = bpp==2;
+	par->hw.falcon.mono = bpp==1;
+
+	/* Total and visible scanline length must be a multiple of one longword,
+	 * this and the console fontwidth yields the alignment for xres and
+	 * xres_virtual.
+	 * TODO: this way "odd" fontheights are not supported
+	 *
+	 * Special case in STE mode: blank and graphic positions don't align,
+	 * avoid trash at right margin
+	 */
+	if (par->hw.falcon.ste_mode)
+		xres = (xres + 63) & ~63;
+	else if (bpp == 1)
+		xres = (xres + 31) & ~31;
+	else
+		xres = (xres + 15) & ~15;
+	if (yres >= 400)
+		yres = (yres + 15) & ~15;
+	else
+		yres = (yres + 7) & ~7;
+
+	if (xres_virtual < xres)
+		xres_virtual = xres;
+	else if (bpp == 1)
+		xres_virtual = (xres_virtual + 31) & ~31;
+	else
+		xres_virtual = (xres_virtual + 15) & ~15;
+
+	if (yres_virtual <= 0)
+		yres_virtual = 0;
+	else if (yres_virtual < yres)
+		yres_virtual = yres;
+
+	/* backward bug-compatibility */
+	if (var->pixclock > 1)
+		var->pixclock -= 1;
+
+	par->hw.falcon.line_width = bpp * xres / 16;
+	par->hw.falcon.line_offset = bpp * (xres_virtual - xres) / 16;
+
+	/* single or double pixel width */
+	xstretch = (xres < 640) ? 2 : 1;
+
+#if 0 /* SM124 supports only 640x400, this is rejected above */
+	if (mon_type == F_MON_SM) {
+		if (xres != 640 && yres != 400)
+			return -EINVAL;
+		plen = 1;
+		pclock = &f32;
+		/* SM124-mode is special */
+		par->hw.falcon.ste_mode = 1;
+		par->hw.falcon.f_shift = 0x000;
+		par->hw.falcon.st_shift = 0x200;
+		left_margin = hsync_len = 128 / plen;
+		right_margin = 0;
+		/* TODO set all margins */
+	}
+	else
+#endif
+	if (mon_type == F_MON_SC || mon_type == F_MON_TV) {
+		plen = 2 * xstretch;
+		if (var->pixclock > f32.t * plen)
+			return -EINVAL;
+		pclock = &f32;
+		if (yres > 240)
+			interlace = 1;
+		if (var->pixclock == 0) {
+			/* set some minimal margins which center the screen */
+			left_margin = 32;
+			right_margin = 18;
+			hsync_len = pclock->hsync / plen;
+			upper_margin = 31;
+			lower_margin = 14;
+			vsync_len = interlace ? 3 : 4;
+		} else {
+			left_margin = var->left_margin;
+			right_margin = var->right_margin;
+			hsync_len = var->hsync_len;
+			upper_margin = var->upper_margin;
+			lower_margin = var->lower_margin;
+			vsync_len = var->vsync_len;
+			if (var->vmode & FB_VMODE_INTERLACED) {
+				upper_margin = (upper_margin + 1) / 2;
+				lower_margin = (lower_margin + 1) / 2;
+				vsync_len = (vsync_len + 1) / 2;
+			} else if (var->vmode & FB_VMODE_DOUBLE) {
+				upper_margin *= 2;
+				lower_margin *= 2;
+				vsync_len *= 2;
+			}
+		}
+	}
+	else
+	{	/* F_MON_VGA */
+		if (bpp == 16)
+			xstretch = 2; /* Double pixel width only for hicolor */
+		/* Default values are used for vert./hor. timing if no pixelclock given. */
+		if (var->pixclock == 0) {
+			int linesize;
+
+			/* Choose master pixelclock depending on hor. timing */
+			plen = 1 * xstretch;
+			if ((plen * xres + f25.right+f25.hsync+f25.left) * hfmin < f25.f)
+				pclock = &f25;
+			else if ((plen * xres + f32.right+f32.hsync+f32.left) * hfmin < f32.f)
+				pclock = &f32;
+			else if ((plen * xres + fext.right+fext.hsync+fext.left) * hfmin < fext.f
+			         && fext.f)
+				pclock = &fext;
+			else
+				return -EINVAL;
+
+			left_margin = pclock->left / plen;
+			right_margin = pclock->right / plen;
+			hsync_len = pclock->hsync / plen;
+			linesize = left_margin + xres + right_margin + hsync_len;
+			upper_margin = 31;
+			lower_margin = 11;
+			vsync_len = 3;
+		}
+		else {
+			/* Choose largest pixelclock <= wanted clock */
+			int i;
+			unsigned long pcl = ULONG_MAX;
+			pclock = 0;
+			for (i=1; i <= 4; i *= 2) {
+				if (f25.t*i >= var->pixclock && f25.t*i < pcl) {
+					pcl = f25.t * i;
+					pclock = &f25;
+				}
+				if (f32.t*i >= var->pixclock && f32.t*i < pcl) {
+					pcl = f32.t * i;
+					pclock = &f32;
+				}
+				if (fext.t && fext.t*i >= var->pixclock && fext.t*i < pcl) {
+					pcl = fext.t * i;
+					pclock = &fext;
+				}
+			}
+			if (!pclock)
+				return -EINVAL;
+			plen = pcl / pclock->t;
+
+			left_margin = var->left_margin;
+			right_margin = var->right_margin;
+			hsync_len = var->hsync_len;
+			upper_margin = var->upper_margin;
+			lower_margin = var->lower_margin;
+			vsync_len = var->vsync_len;
+			/* Internal unit is [single lines per (half-)frame] */
+			if (var->vmode & FB_VMODE_INTERLACED) {
+				/* # lines in half frame */
+				/* External unit is [lines per full frame] */
+				upper_margin = (upper_margin + 1) / 2;
+				lower_margin = (lower_margin + 1) / 2;
+				vsync_len = (vsync_len + 1) / 2;
+			}
+			else if (var->vmode & FB_VMODE_DOUBLE) {
+				/* External unit is [double lines per frame] */
+				upper_margin *= 2;
+				lower_margin *= 2;
+				vsync_len *= 2;
+			}
+		}
+		if (pclock == &fext)
+			longoffset = 1; /* VIDEL doesn't synchronize on short offset */
+	}
+	/* Is video bus bandwidth (32MB/s) too low for this resolution? */
+	/* this is definitely wrong if bus clock != 32MHz */
+	if (pclock->f / plen / 8 * bpp > 32000000L)
+		return -EINVAL;
+
+	if (vsync_len < 1)
+		vsync_len = 1;
+
+	/* include sync lengths in right/lower margin for all calculations */
+	right_margin += hsync_len;
+	lower_margin += vsync_len;
+
+	/* ! In all calculations of margins we use # of lines in half frame
+	 * (which is a full frame in non-interlace mode), so we can switch
+	 * between interlace and non-interlace without messing around
+	 * with these.
+	 */
+  again:
+	/* Set base_offset 128 and video bus width */
+	par->hw.falcon.vid_control = mon_type | f030_bus_width;
+	if (!longoffset)
+		par->hw.falcon.vid_control |= VCO_SHORTOFFS;	/* base_offset 64 */
+	if (var->sync & FB_SYNC_HOR_HIGH_ACT)
+		par->hw.falcon.vid_control |= VCO_HSYPOS;
+	if (var->sync & FB_SYNC_VERT_HIGH_ACT)
+		par->hw.falcon.vid_control |= VCO_VSYPOS;
+	/* Pixelclock */
+	par->hw.falcon.vid_control |= pclock->control_mask;
+	/* External or internal clock */
+	par->hw.falcon.sync = pclock->sync_mask | 0x2;
+	/* Pixellength and prescale */
+	par->hw.falcon.vid_mode = (2/plen) << 2;
+	if (doubleline)
+		par->hw.falcon.vid_mode |= VMO_DOUBLE;
+	if (interlace)
+		par->hw.falcon.vid_mode |= VMO_INTER;
+
+	/*********************
+	Horizontal timing: unit = [master clock cycles]
+	unit of hxx-registers: [master clock cycles * prescale]
+	Hxx-registers are 9 bit wide
+
+	1 line = ((hht + 2) * 2 * prescale) clock cycles
+
+	graphic output = hdb & 0x200 ?
+	       ((hht+2)*2 - hdb + hde) * prescale - hdboff + hdeoff:
+	       ( hht + 2  - hdb + hde) * prescale - hdboff + hdeoff
+	(this must be a multiple of plen*128/bpp, on VGA pixels
+	 to the right may be cut off with a bigger right margin)
+
+	start of graphics relative to start of 1st halfline = hdb & 0x200 ?
+	       (hdb - hht - 2) * prescale + hdboff :
+	       hdb * prescale + hdboff
+
+	end of graphics relative to start of 1st halfline =
+	       (hde + hht + 2) * prescale + hdeoff
+	*********************/
+	/* Calculate VIDEL registers */
+	{
+	int hdb_off, hde_off, base_off;
+	int gstart, gend1, gend2, align;
+
+	prescale = hxx_prescale(&par->hw.falcon);
+	base_off = par->hw.falcon.vid_control & VCO_SHORTOFFS ? 64 : 128;
+
+	/* Offsets depend on video mode */
+	/* Offsets are in clock cycles, divide by prescale to
+	 * calculate hd[be]-registers
+	 */
+	if (par->hw.falcon.f_shift & 0x100) {
+		align = 1;
+		hde_off = 0;
+		hdb_off = (base_off + 16 * plen) + prescale;
+	}
+	else {
+		align = 128 / bpp;
+		hde_off = ((128 / bpp + 2) * plen);
+		if (par->hw.falcon.ste_mode)
+			hdb_off = (64 + base_off + (128 / bpp + 2) * plen) + prescale;
+		else
+			hdb_off = (base_off + (128 / bpp + 18) * plen) + prescale;
+	}
+
+	gstart = (prescale/2 + plen * left_margin) / prescale;
+	/* gend1 is for hde (gend-gstart multiple of align), shifter's xres */
+	gend1 = gstart + ((xres + align-1) / align)*align * plen / prescale;
+	/* gend2 is for hbb, visible xres (rest to gend1 is cut off by hblank) */
+	gend2 = gstart + xres * plen / prescale;
+	par->HHT = plen * (left_margin + xres + right_margin) /
+			   (2 * prescale) - 2;
+/*	par->HHT = (gend2 + plen * right_margin / prescale) / 2 - 2;*/
+
+	par->HDB = gstart - hdb_off/prescale;
+	par->HBE = gstart;
+	if (par->HDB < 0) par->HDB += par->HHT + 2 + 0x200;
+	par->HDE = gend1 - par->HHT - 2 - hde_off/prescale;
+	par->HBB = gend2 - par->HHT - 2;
+#if 0
+	/* One more Videl constraint: data fetch of two lines must not overlap */
+	if (par->HDB & 0x200  &&  par->HDB & ~0x200 - par->HDE <= 5) {
+		/* if this happens increase margins, decrease hfreq. */
+	}
+#endif
+	if (hde_off % prescale)
+		par->HBB++;		/* compensate for non matching hde and hbb */
+	par->HSS = par->HHT + 2 - plen * hsync_len / prescale;
+	if (par->HSS < par->HBB)
+		par->HSS = par->HBB;
+	}
+
+	/*  check hor. frequency */
+	hfreq = pclock->f / ((par->HHT+2)*prescale*2);
+	if (hfreq > hfmax && mon_type!=F_MON_VGA) {
+		/* ++guenther:   ^^^^^^^^^^^^^^^^^^^ can't remember why I did this */
+		/* Too high -> enlarge margin */
+		left_margin += 1;
+		right_margin += 1;
+		goto again;
+	}
+	if (hfreq > hfmax || hfreq < hfmin)
+		return -EINVAL;
+
+	/* Vxx-registers */
+	/* All Vxx must be odd in non-interlace, since frame starts in the middle
+	 * of the first displayed line!
+	 * One frame consists of VFT+1 half lines. VFT+1 must be even in
+	 * non-interlace, odd in interlace mode for synchronisation.
+	 * Vxx-registers are 11 bit wide
+	 */
+	par->VBE = (upper_margin * 2 + 1); /* must begin on odd halfline */
+	par->VDB = par->VBE;
+	par->VDE = yres;
+	if (!interlace) par->VDE <<= 1;
+	if (doubleline) par->VDE <<= 1;  /* VDE now half lines per (half-)frame */
+	par->VDE += par->VDB;
+	par->VBB = par->VDE;
+	par->VFT = par->VBB + (lower_margin * 2 - 1) - 1;
+	par->VSS = par->VFT+1 - (vsync_len * 2 - 1);
+	/* vbb,vss,vft must be even in interlace mode */
+	if (interlace) {
+		par->VBB++;
+		par->VSS++;
+		par->VFT++;
+	}
+
+	/* V-frequency check, hope I didn't create any loop here. */
+	/* Interlace and doubleline are mutually exclusive. */
+	vfreq = (hfreq * 2) / (par->VFT + 1);
+	if      (vfreq > vfmax && !doubleline && !interlace) {
+		/* Too high -> try again with doubleline */
+		doubleline = 1;
+		goto again;
+	}
+	else if (vfreq < vfmin && !interlace && !doubleline) {
+		/* Too low -> try again with interlace */
+		interlace = 1;
+		goto again;
+	}
+	else if (vfreq < vfmin && doubleline) {
+		/* Doubleline too low -> clear doubleline and enlarge margins */
+		int lines;
+		doubleline = 0;
+		for (lines=0; (hfreq*2)/(par->VFT+1+4*lines-2*yres)>vfmax; lines++)
+			;
+		upper_margin += lines;
+		lower_margin += lines;
+		goto again;
+	}
+	else if (vfreq > vfmax && doubleline) {
+		/* Doubleline too high -> enlarge margins */
+		int lines;
+		for (lines=0; (hfreq*2)/(par->VFT+1+4*lines)>vfmax; lines+=2)
+			;
+		upper_margin += lines;
+		lower_margin += lines;
+		goto again;
+	}
+	else if (vfreq > vfmax && interlace) {
+		/* Interlace, too high -> enlarge margins */
+		int lines;
+		for (lines=0; (hfreq*2)/(par->VFT+1+4*lines)>vfmax; lines++)
+			;
+		upper_margin += lines;
+		lower_margin += lines;
+		goto again;
+	}
+	else if (vfreq < vfmin || vfreq > vfmax)
+		return -EINVAL;
+
+  set_screen_base:
+	linelen = xres_virtual * bpp / 8;
+	if (yres_virtual * linelen > screen_len && screen_len)
+		return -EINVAL;
+	if (yres * linelen > screen_len && screen_len)
+		return -EINVAL;
+	if (var->yoffset + yres > yres_virtual && yres_virtual)
+		return -EINVAL;
+	par->yres_virtual = yres_virtual;
+	par->screen_base = screen_base + var->yoffset * linelen;
+	par->hw.falcon.xoffset = 0;
+
+	return 0;
+}
+
+static int falcon_encode_var( struct fb_var_screeninfo *var,
+							  struct atari_fb_par *par )
+{
+/* !!! only for VGA !!! */
+	int linelen, i;
+	int prescale, plen;
+	int hdb_off, hde_off, base_off;
+	struct falcon_hw *hw = &par->hw.falcon;
+
+	/* possible frequencies: 25.175 or 32MHz */
+	var->pixclock = hw->sync & 0x1 ? fext.t :
+	                hw->vid_control & VCO_CLOCK25 ? f25.t : f32.t;
+
+	var->height=-1;
+	var->width=-1;
+
+	var->sync=0;
+	if (hw->vid_control & VCO_HSYPOS)
+		var->sync |= FB_SYNC_HOR_HIGH_ACT;
+	if (hw->vid_control & VCO_VSYPOS)
+		var->sync |= FB_SYNC_VERT_HIGH_ACT;
+
+	var->vmode = FB_VMODE_NONINTERLACED;
+	if (hw->vid_mode & VMO_INTER)
+		var->vmode |= FB_VMODE_INTERLACED;
+	if (hw->vid_mode & VMO_DOUBLE)
+		var->vmode |= FB_VMODE_DOUBLE;
+	
+	/* visible y resolution:
+	 * Graphics display starts at line VDB and ends at line
+	 * VDE. If interlace mode off unit of VC-registers is
+	 * half lines, else lines.
+	 */
+	var->yres = hw->vde - hw->vdb;
+	if (!(var->vmode & FB_VMODE_INTERLACED))
+		var->yres >>= 1;
+	if (var->vmode & FB_VMODE_DOUBLE)
+		var->yres >>= 1;
+
+	/* to get bpp, we must examine f_shift and st_shift.
+	 * f_shift is valid if any of bits no. 10, 8 or 4
+	 * is set. Priority in f_shift is: 10 ">" 8 ">" 4, i.e.
+	 * if bit 10 set then bit 8 and bit 4 don't care...
+	 * If all these bits are 0 get display depth from st_shift
+	 * (as for ST and STE)
+	 */
+	if (hw->f_shift & 0x400)		/* 2 colors */
+		var->bits_per_pixel = 1;
+	else if (hw->f_shift & 0x100)	/* hicolor */
+		var->bits_per_pixel = 16;
+	else if (hw->f_shift & 0x010)	/* 8 bitplanes */
+		var->bits_per_pixel = 8;
+	else if (hw->st_shift == 0)
+		var->bits_per_pixel = 4;
+	else if (hw->st_shift == 0x100)
+		var->bits_per_pixel = 2;
+	else /* if (hw->st_shift == 0x200) */
+		var->bits_per_pixel = 1;
+
+	var->xres = hw->line_width * 16 / var->bits_per_pixel;
+	var->xres_virtual = var->xres + hw->line_offset * 16 / var->bits_per_pixel;
+	if (hw->xoffset)
+		var->xres_virtual += 16;
+
+	if (var->bits_per_pixel == 16) {
+		var->red.offset=11;
+		var->red.length=5;
+		var->red.msb_right=0;
+		var->green.offset=5;
+		var->green.length=6;
+		var->green.msb_right=0;
+		var->blue.offset=0;
+		var->blue.length=5;
+		var->blue.msb_right=0;
+	}
+	else {
+		var->red.offset=0;
+		var->red.length = hw->ste_mode ? 4 : 6;
+		var->red.msb_right=0;
+		var->grayscale=0;
+		var->blue=var->green=var->red;
+	}
+	var->transp.offset=0;
+	var->transp.length=0;
+	var->transp.msb_right=0;
+
+	linelen = var->xres_virtual * var->bits_per_pixel / 8;
+	if (screen_len)
+		if (par->yres_virtual)
+			var->yres_virtual = par->yres_virtual;
+		else
+			/* yres_virtual==0 means use maximum */
+			var->yres_virtual = screen_len / linelen;
+	else {
+		if (hwscroll < 0)
+			var->yres_virtual = 2 * var->yres;
+		else
+			var->yres_virtual=var->yres+hwscroll * 16;
+	}
+	var->xoffset=0; /* TODO change this */
+
+	/* hdX-offsets */
+	prescale = hxx_prescale(hw);
+	plen = 4 >> (hw->vid_mode >> 2 & 0x3);
+	base_off = hw->vid_control & VCO_SHORTOFFS ? 64 : 128;
+	if (hw->f_shift & 0x100) {
+		hde_off = 0;
+		hdb_off = (base_off + 16 * plen) + prescale;
+	}
+	else {
+		hde_off = ((128 / var->bits_per_pixel + 2) * plen);
+		if (hw->ste_mode)
+			hdb_off = (64 + base_off + (128 / var->bits_per_pixel + 2) * plen)
+					 + prescale;
+		else
+			hdb_off = (base_off + (128 / var->bits_per_pixel + 18) * plen)
+					 + prescale;
+	}
+
+	/* Right margin includes hsync */
+	var->left_margin = hdb_off + prescale * ((hw->hdb & 0x1ff) -
+					   (hw->hdb & 0x200 ? 2+hw->hht : 0));
+	if (hw->ste_mode || mon_type!=F_MON_VGA)
+		var->right_margin = prescale * (hw->hht + 2 - hw->hde) - hde_off;
+	else
+		/* can't use this in ste_mode, because hbb is +1 off */
+		var->right_margin = prescale * (hw->hht + 2 - hw->hbb);
+	var->hsync_len = prescale * (hw->hht + 2 - hw->hss);
+
+	/* Lower margin includes vsync */
+	var->upper_margin = hw->vdb / 2 ;  /* round down to full lines */
+	var->lower_margin = (hw->vft+1 - hw->vde + 1) / 2; /* round up */
+	var->vsync_len    = (hw->vft+1 - hw->vss + 1) / 2; /* round up */
+	if (var->vmode & FB_VMODE_INTERLACED) {
+		var->upper_margin *= 2;
+		var->lower_margin *= 2;
+		var->vsync_len *= 2;
+	}
+	else if (var->vmode & FB_VMODE_DOUBLE) {
+		var->upper_margin = (var->upper_margin + 1) / 2;
+		var->lower_margin = (var->lower_margin + 1) / 2;
+		var->vsync_len = (var->vsync_len + 1) / 2;
+	}
+
+	var->pixclock *= plen;
+	var->left_margin /= plen;
+	var->right_margin /= plen;
+	var->hsync_len /= plen;
+
+	var->right_margin -= var->hsync_len;
+	var->lower_margin -= var->vsync_len;
+
+	if (screen_base)
+		var->yoffset=(par->screen_base - screen_base)/linelen;
+	else
+		var->yoffset=0;
+	var->nonstd=0;	/* what is this for? */
+	var->activate=0;
+	for (i=0; i<arraysize(var->reserved); i++)
+		var->reserved[i]=0;
+	return 0;
+}
+
+
+static int f_change_mode = 0;
+static struct falcon_hw f_new_mode;
+static int f_pan_display = 0;
+
+static void falcon_get_par( struct atari_fb_par *par )
+{
+	unsigned long addr;
+	struct falcon_hw *hw = &par->hw.falcon;
+
+	hw->line_width = shifter_f030.scn_width;
+	hw->line_offset = shifter_f030.off_next;
+	hw->st_shift = videl.st_shift & 0x300;
+	hw->f_shift = videl.f_shift;
+	hw->vid_control = videl.control;
+	hw->vid_mode = videl.mode;
+	hw->sync = shifter.syncmode & 0x1;
+	hw->xoffset = videl.xoffset & 0xf;
+	hw->hht = videl.hht;
+	hw->hbb = videl.hbb;
+	hw->hbe = videl.hbe;
+	hw->hdb = videl.hdb;
+	hw->hde = videl.hde;
+	hw->hss = videl.hss;
+	hw->vft = videl.vft;
+	hw->vbb = videl.vbb;
+	hw->vbe = videl.vbe;
+	hw->vdb = videl.vdb;
+	hw->vde = videl.vde;
+	hw->vss = videl.vss;
+
+	addr = (shifter.bas_hi & 0xff) << 16 |
+	       (shifter.bas_md & 0xff) << 8  |
+	       (shifter.bas_lo & 0xff);
+	par->screen_base = PTOV(addr);
+
+	/* derived parameters */
+	hw->ste_mode = (hw->f_shift & 0x510)==0 && hw->st_shift==0x100;
+	hw->mono = (hw->f_shift & 0x400) ||
+	           ((hw->f_shift & 0x510)==0 && hw->st_shift==0x200);
+}
+
+static void falcon_set_par( struct atari_fb_par *par )
+{
+	f_change_mode = 0;
+
+	/* only set screen_base if really necessary */
+	if (current_par.screen_base != par->screen_base)
+		fbhw->set_screen_base(par->screen_base);
+
+	/* Don't touch any other registers if we keep the default resolution */
+	if (DontCalcRes)
+		return;
+
+	/* Tell vbl-handler to change video mode.
+	 * We change modes only on next VBL, to avoid desynchronisation
+	 * (a shift to the right and wrap around by a random number of pixels
+	 * in all monochrome modes).
+	 * This seems to work on my Falcon.
+	 */
+	f_new_mode = par->hw.falcon;
+	f_change_mode = 1;
+}
+
+
+static void falcon_vbl_switcher( int irq, void *dummy, struct pt_regs *fp )
+{
+	struct falcon_hw *hw = &f_new_mode;
+
+	if (f_change_mode) {
+		f_change_mode = 0;
+
+		if (hw->sync & 0x1) {
+			/* Enable external pixelclock. This code only for ScreenWonder */
+			*(volatile unsigned short*)0xffff9202 = 0xffbf;
+		}
+		else {
+			/* Turn off external clocks. Read sets all output bits to 1. */
+			*(volatile unsigned short*)0xffff9202;
+		}
+		shifter.syncmode = hw->sync;
+
+		videl.hht = hw->hht;
+		videl.hbb = hw->hbb;
+		videl.hbe = hw->hbe;
+		videl.hdb = hw->hdb;
+		videl.hde = hw->hde;
+		videl.hss = hw->hss;
+		videl.vft = hw->vft;
+		videl.vbb = hw->vbb;
+		videl.vbe = hw->vbe;
+		videl.vdb = hw->vdb;
+		videl.vde = hw->vde;
+		videl.vss = hw->vss;
+
+		videl.f_shift = 0; /* write enables Falcon palette, 0: 4 planes */
+		if (hw->ste_mode) {
+			videl.st_shift = hw->st_shift; /* write enables STE palette */
+		}
+		else {
+			/* IMPORTANT:
+			 * set st_shift 0, so we can tell the screen-depth if f_shift==0.
+			 * Writing 0 to f_shift enables 4 plane Falcon mode but
+			 * doesn't set st_shift. st_shift!=0 (!=4planes) is impossible
+			 * with Falcon palette.
+			 */
+			videl.st_shift = 0;
+			/* now back to Falcon palette mode */
+			videl.f_shift = hw->f_shift;
+		}
+		/* writing to st_shift changed scn_width and vid_mode */
+		videl.xoffset = hw->xoffset;
+		shifter_f030.scn_width = hw->line_width;
+		shifter_f030.off_next = hw->line_offset;
+		videl.control = hw->vid_control;
+		videl.mode = hw->vid_mode;
+	}
+	if (f_pan_display) {
+		f_pan_display = 0;
+		videl.xoffset = current_par.hw.falcon.xoffset;
+		shifter_f030.off_next = current_par.hw.falcon.line_offset;
+	}
+}
+
+
+static int falcon_pan_display( struct fb_var_screeninfo *var,
+							   struct atari_fb_par *par )
+{
+	int xoffset;
+	int bpp = fb_display[currcon].var.bits_per_pixel;
+
+	if (bpp == 1)
+		var->xoffset = up(var->xoffset, 32);
+	if (bpp != 16)
+		par->hw.falcon.xoffset = var->xoffset & 15;
+	else {
+		par->hw.falcon.xoffset = 0;
+		var->xoffset = up(var->xoffset, 2);
+	}
+	par->hw.falcon.line_offset = bpp *
+	       	(fb_display[currcon].var.xres_virtual - fb_display[currcon].var.xres) / 16;
+	if (par->hw.falcon.xoffset)
+		par->hw.falcon.line_offset -= bpp;
+	xoffset = var->xoffset - par->hw.falcon.xoffset;
+
+	par->screen_base = screen_base +
+	        (var->yoffset * fb_display[currcon].var.xres_virtual + xoffset) * bpp / 8;
+	if (fbhw->set_screen_base)
+		fbhw->set_screen_base (par->screen_base);
+	else
+		return -EINVAL; /* shouldn't happen */
+	f_pan_display = 1;
+	return 0;
+}
+
+
+static int falcon_getcolreg( unsigned regno, unsigned *red,
+				 unsigned *green, unsigned *blue,
+				 unsigned *transp )
+{	unsigned long col;
+	
+	if (regno > 255)
+		return 1;
+	/* This works in STE-mode (with 4bit/color) since f030_col-registers
+	 * hold up to 6bit/color.
+	 * Even with hicolor r/g/b=5/6/5 bit!
+	 */
+	col = f030_col[regno];
+	*red = (col >> 26) & 0x3f;
+	*green = (col >> 18) & 0x3f;
+	*blue = (col >> 2) & 0x3f;
+	*transp = 0;
+	return 0;
+}
+
+
+static int falcon_setcolreg( unsigned regno, unsigned red,
+							 unsigned green, unsigned blue,
+							 unsigned transp )
+{
+	if (regno > 255)
+		return 1;
+	f030_col[regno] = (red << 26) | (green << 18) | (blue << 2);
+	if (regno < 16) {
+		shifter_tt.color_reg[regno] =
+			(((red & 0xe) >> 1) | ((red & 1) << 3) << 8) |
+			(((green & 0xe) >> 1) | ((green & 1) << 3) << 4) |
+			((blue & 0xe) >> 1) | ((blue & 1) << 3);
+		packed16_cmap[regno] = (red << 11) | (green << 5) | blue;
+	}
+	return 0;
+}
+
+
+static int falcon_blank( int blank_mode )
+{
+/* ++guenther: we can switch off graphics by changing VDB and VDE,
+ * so VIDEL doesn't hog the bus while saving.
+ * (this may affect usleep()).
+ */
+	int vdb, vss, hbe, hss;
+
+	if (mon_type == F_MON_SM)	/* this doesn't work on SM124 */
+		return 1;
+
+	vdb = current_par.VDB;
+	vss = current_par.VSS;
+	hbe = current_par.HBE;
+	hss = current_par.HSS;
+
+	if (blank_mode >= 1) {
+		/* disable graphics output (this speeds up the CPU) ... */
+		vdb = current_par.VFT + 1;
+		/* ... and blank all lines */
+		hbe = current_par.HHT + 2;
+	}
+	/* use VESA suspend modes on VGA monitors */
+	if (mon_type == F_MON_VGA) {
+		if (blank_mode == 2 || blank_mode == 4)
+			vss = current_par.VFT + 1;
+		if (blank_mode == 3 || blank_mode == 4)
+			hss = current_par.HHT + 2;
+	}
+
+	videl.vdb = vdb;
+	videl.vss = vss;
+	videl.hbe = hbe;
+	videl.hss = hss;
+
+	return 0;
+}
+
+ 
+static int falcon_detect( void )
+{
+	struct atari_fb_par par;
+	unsigned char fhw;
+
+	/* Determine connected monitor and set monitor parameters */
+	fhw = *(unsigned char*)0xffff8006;
+	mon_type = fhw >> 6 & 0x3;
+	/* bit 1 of fhw: 1=32 bit ram bus, 0=16 bit */
+	f030_bus_width = fhw << 6 & 0x80;
+	switch (mon_type) {
+	case F_MON_SM:
+		vfmin = 70;
+		vfmax = 72;
+		hfmin = 35713;
+		hfmax = 35715;
+		break;
+	case F_MON_SC:
+	case F_MON_TV:
+		/* PAL...NTSC */
+		vfmin = 49; /* not 50, since TOS defaults to 49.9x Hz */
+		vfmax = 60;
+		hfmin = 15620;
+		hfmax = 15755;
+		break;
+	}
+	/* initialize hsync-len */
+	f25.hsync = h_syncs[mon_type] / f25.t;
+	f32.hsync = h_syncs[mon_type] / f32.t;
+	if (fext.t)
+		fext.hsync = h_syncs[mon_type] / fext.t;
+
+	falcon_get_par(&par);
+	falcon_encode_var(&atari_fb_predefined[0], &par);
+
+	/* Detected mode is always the "autodetect" slot */
+	return 1;
+}
+
+#endif /* ATAFB_FALCON */
+
+/* ------------------- ST(E) specific functions ---------------------- */
+
+#ifdef ATAFB_STE
+
+static int stste_encode_fix( struct fb_fix_screeninfo *fix,
+							 struct atari_fb_par *par )
+
+{
+	int mode, i;
+
+	strcpy(fix->id,"Atari Builtin");
+	fix->smem_start=real_screen_base;
+	fix->smem_len=screen_len;
+	fix->type=FB_TYPE_INTERLEAVED_PLANES;
+	fix->type_aux=2;
+	fix->visual=FB_VISUAL_PSEUDOCOLOR;
+	mode = par->hw.st.mode & 3;
+	if (mode == ST_HIGH) {
+		fix->type=FB_TYPE_PACKED_PIXELS;
+		fix->type_aux=0;
+		fix->visual=FB_VISUAL_MONO10;
+	}
+	if (ATARIHW_PRESENT(EXTD_SHIFTER)) {
+		fix->xpanstep = 16;
+		fix->ypanstep = 1;
+	} else {
+		fix->xpanstep = 0;
+		fix->ypanstep = 0;
+	}
+	fix->ywrapstep = 0;
+	fix->line_length = 0;
+	for (i=0; i<arraysize(fix->reserved); i++)
+		fix->reserved[i]=0;
+	return 0;
+}
+
+
+static int stste_decode_var( struct fb_var_screeninfo *var,
+						  struct atari_fb_par *par )
+{
+	int xres=var->xres;
+	int yres=var->yres;
+	int bpp=var->bits_per_pixel;
+	int linelen;
+	int yres_virtual = var->yres_virtual;
+
+	if (mono_moni) {
+		if (bpp > 1 || xres > sttt_xres || yres > st_yres)
+			return -EINVAL;
+		par->hw.st.mode=ST_HIGH;
+		xres=sttt_xres;
+		yres=st_yres;
+		bpp=1;
+	} else {
+		if (bpp > 4 || xres > sttt_xres || yres > st_yres)
+			return -EINVAL;
+		if (bpp > 2) {
+			if (xres > sttt_xres/2 || yres > st_yres/2)
+				return -EINVAL;
+			par->hw.st.mode=ST_LOW;
+			xres=sttt_xres/2;
+			yres=st_yres/2;
+			bpp=4;
+		}
+		else if (bpp > 1) {
+			if (xres > sttt_xres || yres > st_yres/2)
+				return -EINVAL;
+			par->hw.st.mode=ST_MID;
+			xres=sttt_xres;
+			yres=st_yres/2;
+			bpp=2;
+		}
+		else
+			return -EINVAL;
+	}
+	if (yres_virtual <= 0)
+		yres_virtual = 0;
+	else if (yres_virtual < yres)
+		yres_virtual = yres;
+	if (var->sync & FB_SYNC_EXT)
+		par->hw.st.sync=(par->hw.st.sync & ~1) | 1;
+	else
+		par->hw.st.sync=(par->hw.st.sync & ~1);
+	linelen=xres*bpp/8;
+	if (yres_virtual * linelen > screen_len && screen_len)
+		return -EINVAL;
+	if (yres * linelen > screen_len && screen_len)
+		return -EINVAL;
+	if (var->yoffset + yres > yres_virtual && yres_virtual)
+		return -EINVAL;
+	par->yres_virtual = yres_virtual;
+	par->screen_base=screen_base+ var->yoffset*linelen;
+	return 0;
+}
+
+static int stste_encode_var( struct fb_var_screeninfo *var,
+						  struct atari_fb_par *par )
+{
+	int linelen, i;
+	var->red.offset=0;
+	var->red.length = ATARIHW_PRESENT(EXTD_SHIFTER) ? 4 : 3;
+	var->red.msb_right=0;
+	var->grayscale=0;
+
+	var->pixclock=31041;
+	var->left_margin=120;		/* these are incorrect */
+	var->right_margin=100;
+	var->upper_margin=8;
+	var->lower_margin=16;
+	var->hsync_len=140;
+	var->vsync_len=30;
+
+	var->height=-1;
+	var->width=-1;
+
+	if (!(par->hw.st.sync & 1))
+		var->sync=0;
+	else
+		var->sync=FB_SYNC_EXT;
+
+	switch (par->hw.st.mode & 3) {
+	case ST_LOW:
+		var->xres=sttt_xres/2;
+		var->yres=st_yres/2;
+		var->bits_per_pixel=4;
+		break;
+	case ST_MID:
+		var->xres=sttt_xres;
+		var->yres=st_yres/2;
+		var->bits_per_pixel=2;
+		break;
+	case ST_HIGH:
+		var->xres=sttt_xres;
+		var->yres=st_yres;
+		var->bits_per_pixel=1;
+		break;
+	}		
+	var->blue=var->green=var->red;
+	var->transp.offset=0;
+	var->transp.length=0;
+	var->transp.msb_right=0;
+	var->xres_virtual=sttt_xres_virtual;
+	linelen=var->xres_virtual * var->bits_per_pixel / 8;
+	ovsc_addlen=linelen*(sttt_yres_virtual - st_yres);
+	
+	if (! use_hwscroll)
+		var->yres_virtual=var->yres;
+	else if (screen_len)
+		if (par->yres_virtual)
+			var->yres_virtual = par->yres_virtual;
+		else
+			/* yres_virtual==0 means use maximum */
+			var->yres_virtual = screen_len / linelen;
+	else {
+		if (hwscroll < 0)
+			var->yres_virtual = 2 * var->yres;
+		else
+			var->yres_virtual=var->yres+hwscroll * 16;
+	}
+	var->xoffset=0;
+	if (screen_base)
+		var->yoffset=(par->screen_base - screen_base)/linelen;
+	else
+		var->yoffset=0;
+	var->nonstd=0;
+	var->activate=0;
+	var->vmode=FB_VMODE_NONINTERLACED;
+	for (i=0; i<arraysize(var->reserved); i++)
+		var->reserved[i]=0;
+	return 0;
+}
+
+
+static void stste_get_par( struct atari_fb_par *par )
+{
+	unsigned long addr;
+	par->hw.st.mode=shifter_tt.st_shiftmode;
+	par->hw.st.sync=shifter.syncmode;
+	addr = ((shifter.bas_hi & 0xff) << 16) |
+	       ((shifter.bas_md & 0xff) << 8);
+	if (ATARIHW_PRESENT(EXTD_SHIFTER))
+		addr |= (shifter.bas_lo & 0xff);
+	par->screen_base = PTOV(addr);
+}
+
+static void stste_set_par( struct atari_fb_par *par )
+{
+	shifter_tt.st_shiftmode=par->hw.st.mode;
+	shifter.syncmode=par->hw.st.sync;
+	/* only set screen_base if really necessary */
+	if (current_par.screen_base != par->screen_base)
+		fbhw->set_screen_base(par->screen_base);
+}
+
+
+static int stste_getcolreg( unsigned regno, unsigned *red,
+							unsigned *green, unsigned *blue,
+							unsigned *transp )
+{	unsigned col;
+	
+	if (regno > 15)
+		return 1;
+	col = shifter_tt.color_reg[regno];
+	if (ATARIHW_PRESENT(EXTD_SHIFTER)) {
+		*red = ((col >> 7) & 0xe) | ((col >> 11) & 1);
+		*green = ((col >> 3) & 0xe) | ((col >> 7) & 1);
+		*blue = ((col << 1) & 0xe) | ((col >> 3) & 1);
+	}
+	else {
+		*red = (col >> 8) & 0x7;
+		*green = (col >> 4) & 0x7;
+		*blue = col & 0x7;
+	}
+	*transp = 0;
+	return 0;
+}
+
+
+static int stste_setcolreg( unsigned regno, unsigned red,
+						 unsigned green, unsigned blue,
+						 unsigned transp )
+{
+	if (regno > 15)
+		return 1;
+	if (ATARIHW_PRESENT(EXTD_SHIFTER))
+		shifter_tt.color_reg[regno] =
+			(((red & 0xe) >> 1) | ((red & 1) << 3) << 8) |
+			(((green & 0xe) >> 1) | ((green & 1) << 3) << 4) |
+			((blue & 0xe) >> 1) | ((blue & 1) << 3);
+	else
+		shifter_tt.color_reg[regno] =
+			((red & 0x7) << 8) |
+			((green & 0x7) << 4) |
+			(blue & 0x7);
+	return 0;
+}
+
+						  
+static int stste_detect( void )
+
+{	struct atari_fb_par par;
+
+	/* Determine the connected monitor: The DMA sound must be
+	 * disabled before reading the MFP GPIP, because the Sound
+	 * Done Signal and the Monochrome Detect are XORed together!
+	 */
+	if (ATARIHW_PRESENT(PCM_8BIT)) {
+		tt_dmasnd.ctrl = DMASND_CTRL_OFF;
+		udelay(20);	/* wait a while for things to settle down */
+	}
+	mono_moni = (mfp.par_dt_reg & 0x80) == 0;
+
+	stste_get_par(&par);
+	stste_encode_var(&atari_fb_predefined[0], &par);
+
+	if (!ATARIHW_PRESENT(EXTD_SHIFTER))
+		use_hwscroll = 0;
+	return 1;
+}
+
+static void stste_set_screen_base(unsigned long s_base)
+{
+	unsigned long addr;
+	addr= VTOP(s_base);
+	/* Setup Screen Memory */
+	shifter.bas_hi=(unsigned char) ((addr & 0xff0000) >> 16);
+  	shifter.bas_md=(unsigned char) ((addr & 0x00ff00) >> 8);
+	if (ATARIHW_PRESENT(EXTD_SHIFTER))
+		shifter.bas_lo=(unsigned char)  (addr & 0x0000ff);
+}
+
+#endif /* ATAFB_STE */
+
+/* Switching the screen size should be done during vsync, otherwise
+ * the margins may get messed up. This is a well known problem of
+ * the ST's video system.
+ *
+ * Unfortunately there is hardly any way to find the vsync, as the
+ * vertical blank interrupt is no longer in time on machines with
+ * overscan type modifications.
+ *
+ * We can, however, use Timer B to safely detect the black shoulder,
+ * but then we've got to guess an appropriate delay to find the vsync.
+ * This might not work on every machine.
+ *
+ * martin_rogge @ ki.maus.de, 8th Aug 1995
+ */
+
+#define LINE_DELAY  (mono_moni ? 30 : 70)
+#define SYNC_DELAY  (mono_moni ? 1500 : 2000)
+
+/* SWITCH_ACIA may be used for Falcon (ScreenBlaster III internal!) */
+static void st_ovsc_switch(int switchmode)
+{
+    unsigned long flags;
+    register unsigned char old, new;
+
+    if ((switchmode & (SWITCH_ACIA | SWITCH_SND6 | SWITCH_SND7)) == 0)
+	return;
+    save_flags(flags);
+    cli();
+
+    mfp.tim_ct_b = 0x10;
+    mfp.active_edge |= 8;
+    mfp.tim_ct_b = 0;
+    mfp.tim_dt_b = 0xf0;
+    mfp.tim_ct_b = 8;
+    while (mfp.tim_dt_b > 1)	/* TOS does it this way, don't ask why */
+	;
+    new = mfp.tim_dt_b;
+    do {
+	udelay(LINE_DELAY);
+	old = new;
+	new = mfp.tim_dt_b;
+    } while (old != new);
+    mfp.tim_ct_b = 0x10;
+    udelay(SYNC_DELAY);
+
+    if (switchmode == SWITCH_ACIA)
+	acia.key_ctrl = (ACIA_DIV64|ACIA_D8N1S|ACIA_RHTID|ACIA_RIE);
+    else {
+	sound_ym.rd_data_reg_sel = 14;
+	sound_ym.wd_data = sound_ym.rd_data_reg_sel | switchmode;
+    }
+    restore_flags(flags);
+}
+
+/* ------------------- External Video ---------------------- */
+
+#ifdef ATAFB_EXT
+
+static int ext_encode_fix( struct fb_fix_screeninfo *fix,
+						   struct atari_fb_par *par )
+
+{
+	int i;
+
+	strcpy(fix->id,"Unknown Extern");
+	fix->smem_start=external_addr;
+	fix->smem_len=(external_len + PAGE_SIZE -1) & PAGE_MASK;
+	if (external_depth == 1) {
+		fix->type = FB_TYPE_PACKED_PIXELS;
+		/* The letters 'n' and 'i' in the "atavideo=external:" stand
+		 * for "normal" and "inverted", rsp., in the monochrome case */
+		fix->visual =
+			(external_pmode == FB_TYPE_INTERLEAVED_PLANES ||
+			 external_pmode == FB_TYPE_PACKED_PIXELS) ?
+				FB_VISUAL_MONO10 :
+					FB_VISUAL_MONO01;
+	}
+	else {
+		switch (external_pmode) {
+			/* All visuals are STATIC, because we don't know how to change
+			 * colors :-(
+			 */
+		    case -1:              /* truecolor */
+			fix->type=FB_TYPE_PACKED_PIXELS;
+			fix->visual=FB_VISUAL_TRUECOLOR;
+			break;
+		    case FB_TYPE_PACKED_PIXELS:
+			fix->type=FB_TYPE_PACKED_PIXELS;
+			fix->visual=FB_VISUAL_STATIC_PSEUDOCOLOR;
+			break;
+		    case FB_TYPE_PLANES:
+			fix->type=FB_TYPE_PLANES;
+			fix->visual=FB_VISUAL_STATIC_PSEUDOCOLOR;
+			break;
+		    case FB_TYPE_INTERLEAVED_PLANES:
+			fix->type=FB_TYPE_INTERLEAVED_PLANES;
+			fix->type_aux=2;
+			fix->visual=FB_VISUAL_STATIC_PSEUDOCOLOR;
+			break;
+		}
+	}
+	fix->xpanstep = 0;
+	fix->ypanstep = 0;
+	fix->ywrapstep = 0;
+	fix->line_length = 0;
+	for (i=0; i<arraysize(fix->reserved); i++)
+		fix->reserved[i]=0;
+	return 0;
+}
+
+
+static int ext_decode_var( struct fb_var_screeninfo *var,
+						   struct atari_fb_par *par )
+{
+	struct fb_var_screeninfo *myvar = &atari_fb_predefined[0];
+	
+	if (var->bits_per_pixel > myvar->bits_per_pixel ||
+		var->xres > myvar->xres ||
+		var->yres > myvar->yres ||
+		var->xoffset > 0 ||
+		var->yoffset > 0)
+		return -EINVAL;
+	return 0;
+}
+
+
+static int ext_encode_var( struct fb_var_screeninfo *var,
+						   struct atari_fb_par *par )
+{
+	int i;
+
+	var->red.offset=0;
+	var->red.length=(external_pmode == -1) ? external_depth/3 : 
+			(external_vgaiobase ? external_bitspercol : 0);
+	var->red.msb_right=0;
+	var->grayscale=0;
+
+	var->pixclock=31041;
+	var->left_margin=120;		/* these are surely incorrect 	*/
+	var->right_margin=100;
+	var->upper_margin=8;
+	var->lower_margin=16;
+	var->hsync_len=140;
+	var->vsync_len=30;
+
+	var->height=-1;
+	var->width=-1;
+
+	var->sync=0;
+
+	var->xres = external_xres;
+	var->yres = external_yres;
+	var->bits_per_pixel = external_depth;
+	
+	var->blue=var->green=var->red;
+	var->transp.offset=0;
+	var->transp.length=0;
+	var->transp.msb_right=0;
+	var->xres_virtual=var->xres;
+	var->yres_virtual=var->yres;
+	var->xoffset=0;
+	var->yoffset=0;
+	var->nonstd=0;
+	var->activate=0;
+	var->vmode=FB_VMODE_NONINTERLACED;
+	for (i=0; i<arraysize(var->reserved); i++)
+		var->reserved[i]=0;
+	return 0;
+}
+
+
+static void ext_get_par( struct atari_fb_par *par )
+{
+	par->screen_base = external_addr;
+}
+
+static void ext_set_par( struct atari_fb_par *par )
+{
+}
+
+#define OUTB(port,val) \
+	*((unsigned volatile char *) ((port)+external_vgaiobase))=(val)
+#define INB(port) \
+	(*((unsigned volatile char *) ((port)+external_vgaiobase)))
+#define DACDelay 				\
+	do {					\
+		unsigned char tmp=INB(0x3da);	\
+		tmp=INB(0x3da);			\
+	} while (0)
+
+static int ext_getcolreg( unsigned regno, unsigned *red,
+						  unsigned *green, unsigned *blue,
+						  unsigned *transp )
+
+{	unsigned char colmask = (1 << external_bitspercol) - 1;
+		
+	if (! external_vgaiobase)
+		return 1;
+
+	switch (external_card_type) {
+	  case IS_VGA:
+	    OUTB(0x3c7, regno);
+	    DACDelay;
+	    *red=INB(0x3c9) & colmask;
+	    DACDelay;
+	    *green=INB(0x3c9) & colmask;
+	    DACDelay;
+	    *blue=INB(0x3c9) & colmask;
+	    DACDelay;
+	    return 0;
+	    
+	  case IS_MV300:
+	    *red = MV300_color[regno].red;
+	    *green = MV300_color[regno].green;
+	    *blue = MV300_color[regno].blue;
+	    *transp=0;
+	    return 0;
+
+	  default:
+	    return 1;
+	  }
+}
+	
+static int ext_setcolreg( unsigned regno, unsigned red,
+						  unsigned green, unsigned blue,
+						  unsigned transp )
+
+{	unsigned char colmask = (1 << external_bitspercol) - 1;
+
+	if (! external_vgaiobase)
+		return 1;
+
+	switch (external_card_type) {
+	  case IS_VGA:
+	    OUTB(0x3c8, regno);
+	    DACDelay;
+	    OUTB(0x3c9, red & colmask);
+	    DACDelay;
+	    OUTB(0x3c9, green & colmask);
+	    DACDelay;
+	    OUTB(0x3c9, blue & colmask);
+	    DACDelay;
+	    return 0;
+
+	  case IS_MV300:
+	    MV300_color[regno].red = red;
+	    MV300_color[regno].green = green;
+	    MV300_color[regno].blue = blue;
+	    OUTB((MV300_reg[regno] << 2)+1, red);
+	    OUTB((MV300_reg[regno] << 2)+1, green);
+	    OUTB((MV300_reg[regno] << 2)+1, blue);
+	    return 0;
+
+	  default:
+	    return 1;
+	  }
+}
+	
+
+static int ext_detect( void )
+
+{
+	struct fb_var_screeninfo *myvar = &atari_fb_predefined[0];
+	struct atari_fb_par dummy_par;
+
+	myvar->xres = external_xres;
+	myvar->yres = external_yres;
+	myvar->bits_per_pixel = external_depth;
+	ext_encode_var(myvar, &dummy_par);
+	return 1;
+}
+
+#endif /* ATAFB_EXT */
+
+/* ------ This is the same for most hardware types -------- */
+
+static void set_screen_base(unsigned long s_base)
+{
+	unsigned long addr;
+	addr= VTOP(s_base);
+	/* Setup Screen Memory */
+	shifter.bas_hi=(unsigned char) ((addr & 0xff0000) >> 16);
+  	shifter.bas_md=(unsigned char) ((addr & 0x00ff00) >> 8);
+  	shifter.bas_lo=(unsigned char)  (addr & 0x0000ff);
+}
+
+
+static int pan_display( struct fb_var_screeninfo *var,
+                        struct atari_fb_par *par )
+{
+	if (!ATARIHW_PRESENT(EXTD_SHIFTER) && var->xoffset)
+		return -EINVAL;
+	else
+		var->xoffset = up(var->xoffset, 16);
+	par->screen_base = screen_base +
+	        (var->yoffset * fb_display[currcon].var.xres_virtual + var->xoffset)
+	        * fb_display[currcon].var.bits_per_pixel / 8;
+	if (fbhw->set_screen_base)
+		fbhw->set_screen_base (par->screen_base);
+	else
+		return -EINVAL;
+	return 0;
+}
+
+
+/* ------------ Interfaces to hardware functions ------------ */
+
+
+#ifdef ATAFB_TT
+static struct fb_hwswitch tt_switch = {
+	tt_detect, tt_encode_fix, tt_decode_var, tt_encode_var,
+	tt_get_par, tt_set_par, tt_getcolreg, tt_setcolreg,
+	set_screen_base, NULL, pan_display
+};
+#endif
+
+#ifdef ATAFB_FALCON
+static struct fb_hwswitch falcon_switch = {
+	falcon_detect, falcon_encode_fix, falcon_decode_var, falcon_encode_var,
+	falcon_get_par, falcon_set_par, falcon_getcolreg,
+	falcon_setcolreg, set_screen_base, falcon_blank, falcon_pan_display
+};
+#endif
+
+#ifdef ATAFB_STE
+static struct fb_hwswitch st_switch = {
+	stste_detect, stste_encode_fix, stste_decode_var, stste_encode_var,
+	stste_get_par, stste_set_par, stste_getcolreg, stste_setcolreg,
+	stste_set_screen_base, NULL, pan_display
+};
+#endif
+
+#ifdef ATAFB_EXT
+static struct fb_hwswitch ext_switch = {
+	ext_detect, ext_encode_fix, ext_decode_var, ext_encode_var,
+	ext_get_par, ext_set_par, ext_getcolreg, ext_setcolreg, NULL, NULL, NULL
+};
+#endif
+
+
+
+static void atari_fb_get_par( struct atari_fb_par *par )
+{
+	if (current_par_valid) {
+		*par=current_par;
+	}
+	else
+		fbhw->get_par(par);
+}
+
+
+static void atari_fb_set_par( struct atari_fb_par *par )
+{
+	fbhw->set_par(par);
+	current_par=*par;
+	current_par_valid=1;
+}
+
+
+
+/* =========================================================== */
+/* ============== Hardware Independent Functions ============= */
+/* =========================================================== */
+
+
+/* used for hardware scrolling */
+
+static int
+fb_update_var(int con)
+{
+	int off=fb_display[con].var.yoffset*fb_display[con].var.xres_virtual*
+			fb_display[con].var.bits_per_pixel>>3;
+
+	current_par.screen_base=screen_base + off;
+
+	if (fbhw->set_screen_base)
+		fbhw->set_screen_base(current_par.screen_base);
+	return 0;
+}
+
+static int
+do_fb_set_var(struct fb_var_screeninfo *var, int isactive)
+{
+	int err,activate;
+	struct atari_fb_par par;
+	if ((err=fbhw->decode_var(var, &par)))
+		return err;
+	activate=var->activate;
+	if (((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) && isactive)
+		atari_fb_set_par(&par);
+	fbhw->encode_var(var, &par);
+	var->activate=activate;
+	return 0;
+}
+
+/* Functions for handling colormap */
+
+/* there seems to be a bug in gcc 2.5.8 which inhibits using an other solution */
+/* I always get a sigsegv */
+
+static short red16[]=
+	{ 0x0000,0x0000,0x0000,0x0000,0xc000,0xc000,0xc000,0xc000,
+	  0x8000,0x0000,0x0000,0x0000,0xffff,0xffff,0xffff,0xffff};
+static short green16[]=
+	{ 0x0000,0x0000,0xc000,0xc000,0x0000,0x0000,0xc000,0xc000,
+	  0x8000,0x0000,0xffff,0xffff,0x0000,0x0000,0xffff,0xffff};
+static short blue16[]=
+	{ 0x0000,0xc000,0x0000,0xc000,0x0000,0xc000,0x0000,0xc000,
+	  0x8000,0xffff,0x0000,0xffff,0x0000,0xffff,0x0000,0xffff};
+
+static short red4[]=
+	{ 0x0000,0xc000,0x8000,0xffff};
+static short green4[]=
+	{ 0x0000,0xc000,0x8000,0xffff};
+static short blue4[]=
+	{ 0x0000,0xc000,0x8000,0xffff};
+
+static short red2[]=
+	{ 0x0000,0xffff};
+static short green2[]=
+	{ 0x0000,0xffff};
+static short blue2[]=
+	{ 0x0000,0xffff};
+
+static struct fb_cmap default_16_colors = {
+    0, 16, red16, green16, blue16, NULL
+};
+static struct fb_cmap default_4_colors = {
+    0, 4, red4, green4, blue4, NULL
+};
+static struct fb_cmap default_2_colors = {
+    0, 2, red2, green2, blue2, NULL
+};
+
+static struct fb_cmap *
+get_default_colormap(int bpp)
+{
+	if (bpp == 1)
+		return &default_2_colors;
+	if (bpp == 2)
+		return &default_4_colors;
+	return &default_16_colors;
+}
+
+#define CNVT_TOHW(val,width)	(((val) << (width)) + 0x7fff - (val)) >> 16
+#define CNVT_FROMHW(val,width) ((width)?((((val) << 16) - (val)) / ((1<<(width))-1)):0)
+
+
+static int
+do_fb_get_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var, int kspc)
+{
+	int i,start;
+	unsigned short *red,*green,*blue,*transp;
+	unsigned int hred,hgreen,hblue,htransp;
+
+	red=cmap->red;
+	green=cmap->green;
+	blue=cmap->blue;
+	transp=cmap->transp;
+	start=cmap->start;
+	if (start < 0)
+		return EINVAL;
+	for (i=0 ; i < cmap->len ; i++) {
+		if (fbhw->getcolreg(start++, &hred, &hgreen, &hblue, &htransp))
+			return 0;
+		hred=CNVT_FROMHW(hred,var->red.length);
+		hgreen=CNVT_FROMHW(hgreen,var->green.length);
+		hblue=CNVT_FROMHW(hblue,var->blue.length);
+		htransp=CNVT_FROMHW(htransp,var->transp.length);
+		if (kspc) {
+			*red=hred;
+			*green=hgreen;
+			*blue=hblue;
+			if (transp) *transp=htransp;
+		}
+		else {
+			put_user(hred, red);
+			put_user(hgreen, green);
+			put_user(hblue, blue);
+			if (transp) put_user(htransp, transp);
+		}
+		red++;
+		green++;
+		blue++;
+		if (transp) transp++;
+	}
+	return 0;
+}
+
+static int
+do_fb_set_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var, int kspc)
+{
+	int i,start;
+	unsigned short *red,*green,*blue,*transp;
+	unsigned int hred,hgreen,hblue,htransp;
+
+	red=cmap->red;
+	green=cmap->green;
+	blue=cmap->blue;
+	transp=cmap->transp;
+	start=cmap->start;
+
+	if (start < 0)
+		return -EINVAL;
+	for (i=0 ; i < cmap->len ; i++) {
+		if (kspc) {
+			hred=*red;
+			hgreen=*green;
+			hblue=*blue;
+			htransp=(transp) ? *transp : 0;
+		}
+		else {
+			get_user(hred, red);
+			get_user(hgreen, green);
+			get_user(hblue, blue);
+			if (transp)
+				get_user(htransp, transp);
+			else
+				htransp = 0;
+		}
+		hred=CNVT_TOHW(hred,var->red.length);
+		hgreen=CNVT_TOHW(hgreen,var->green.length);
+		hblue=CNVT_TOHW(hblue,var->blue.length);
+		htransp=CNVT_TOHW(htransp,var->transp.length);
+		red++;
+		green++;
+		blue++;
+		if (transp) transp++;
+		if (fbhw->setcolreg(start++, hred, hgreen, hblue, htransp))
+			return 0;
+	}
+	return 0;
+}
+
+static void
+do_install_cmap(int con)
+{
+	if (con != currcon)
+		return;
+	if (fb_display[con].cmap.len)
+		do_fb_set_cmap(&fb_display[con].cmap, &(fb_display[con].var), 1);
+	else
+		do_fb_set_cmap(get_default_colormap(
+				fb_display[con].var.bits_per_pixel), &(fb_display[con].var), 1);		
+}
+
+static void
+memcpy_fs(int fsfromto, void *to, void *from, int len)
+{
+	switch (fsfromto) {
+	case 0:
+		memcpy(to,from,len);
+		return;
+	case 1:
+		copy_from_user(to,from,len);
+		return;
+	case 2:
+		copy_to_user(to,from,len);
+		return;
+	}
+}
+
+static void
+copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto)
+{
+	int size;
+	int tooff=0, fromoff=0;
+
+	if (to->start > from->start)
+		fromoff=to->start-from->start;
+	else
+		tooff=from->start-to->start;			
+	size=to->len-tooff;
+	if (size > from->len-fromoff)
+		size=from->len-fromoff;
+	if (size < 0)
+		return;
+	size*=sizeof(unsigned short);
+	memcpy_fs(fsfromto, to->red+tooff, from->red+fromoff, size);
+	memcpy_fs(fsfromto, to->green+tooff, from->green+fromoff, size);
+	memcpy_fs(fsfromto, to->blue+tooff, from->blue+fromoff, size);
+	if (from->transp && to->transp)
+		memcpy_fs(fsfromto, to->transp+tooff, from->transp+fromoff, size);
+}
+ 
+static int
+alloc_cmap(struct fb_cmap *cmap,int len,int transp)
+{
+	int size=len*sizeof(unsigned short);
+	if (cmap->len != len) {
+		if (cmap->red)
+			kfree(cmap->red);
+		if (cmap->green)
+			kfree(cmap->green);
+		if (cmap->blue)
+			kfree(cmap->blue);
+		if (cmap->transp)
+			kfree(cmap->transp);
+		cmap->red=cmap->green=cmap->blue=cmap->transp=NULL;
+		cmap->len=0;
+		if (! len)
+			return 0;
+		if (! (cmap->red=kmalloc(size, GFP_ATOMIC)))
+			return -1;
+		if (! (cmap->green=kmalloc(size, GFP_ATOMIC)))
+			return -1;
+		if (! (cmap->blue=kmalloc(size, GFP_ATOMIC)))
+			return -1;
+		if (transp) {
+			if (! (cmap->transp=kmalloc(size, GFP_ATOMIC)))
+				return -1;
+		}
+		else
+			cmap->transp=NULL;
+	}
+	cmap->start=0;
+	cmap->len=len;
+	copy_cmap(get_default_colormap(len), cmap, 0);
+	return 0;
+}	
+
+
+	/*
+	 * Open/Release the frame buffer device
+	 */
+
+static int atari_fb_open(int fbidx)
+{
+	/*
+	 * Nothing, only a usage count for the moment
+	 */
+
+	MOD_INC_USE_COUNT;
+	return(0);
+}
+
+static int atari_fb_release(int fbidx)
+{
+	MOD_DEC_USE_COUNT;
+	return(0);
+}
+
+
+static int
+atari_fb_get_fix(struct fb_fix_screeninfo *fix, int con)
+{
+	struct atari_fb_par par;
+	if (con == -1)
+		atari_fb_get_par(&par);
+	else
+		fbhw->decode_var(&fb_display[con].var,&par);
+	return fbhw->encode_fix(fix, &par);
+}
+	
+static int
+atari_fb_get_var(struct fb_var_screeninfo *var, int con)
+{
+	struct atari_fb_par par;
+	if (con == -1) {
+		atari_fb_get_par(&par);
+		fbhw->encode_var(var, &par);
+	}
+	else
+		*var=fb_display[con].var;
+	return 0;
+}
+
+static void
+atari_fb_set_disp(int con)
+{
+	struct fb_fix_screeninfo fix;
+	struct display *display;
+
+	if (con >= 0)
+		display = &fb_display[con];
+	else
+		display = &disp;	/* used during initialization */
+
+	atari_fb_get_fix(&fix, con);
+	if (con == -1)
+		con=0;
+	display->screen_base = (u_char *)fix.smem_start;
+	display->visual = fix.visual;
+	display->type = fix.type;
+	display->type_aux = fix.type_aux;
+	display->ypanstep = fix.ypanstep;
+	display->ywrapstep = fix.ywrapstep;
+	display->line_length = fix.line_length;
+	if (fix.visual != FB_VISUAL_PSEUDOCOLOR &&
+		fix.visual != FB_VISUAL_DIRECTCOLOR)
+		display->can_soft_blank = 0;
+	else
+		display->can_soft_blank = 1;
+	display->inverse =
+	    (fix.visual == FB_VISUAL_MONO01 ? !inverse : inverse);
+}
+
+static int
+atari_fb_set_var(struct fb_var_screeninfo *var, int con)
+{
+	int err,oldxres,oldyres,oldbpp,oldxres_virtual,
+	    oldyres_virtual,oldyoffset;
+	if ((err=do_fb_set_var(var, con==currcon)))
+		return err;
+	if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) {
+		oldxres=fb_display[con].var.xres;
+		oldyres=fb_display[con].var.yres;
+		oldxres_virtual=fb_display[con].var.xres_virtual;
+		oldyres_virtual=fb_display[con].var.yres_virtual;
+		oldbpp=fb_display[con].var.bits_per_pixel;
+		oldyoffset=fb_display[con].var.yoffset;
+		fb_display[con].var=*var;
+		if (oldxres != var->xres || oldyres != var->yres 
+		    || oldxres_virtual != var->xres_virtual
+		    || oldyres_virtual != var->yres_virtual
+		    || oldbpp != var->bits_per_pixel
+		    || oldyoffset != var->yoffset) {
+			atari_fb_set_disp(con);
+			(*fb_info.changevar)(con);
+			alloc_cmap(&fb_display[con].cmap, 0, 0);
+			do_install_cmap(con);
+		}
+	}
+	var->activate=0;
+	return 0;
+}
+
+
+
+static int
+atari_fb_get_cmap(struct fb_cmap *cmap, int kspc, int con)
+{
+	if (con == currcon) /* current console ? */
+		return do_fb_get_cmap(cmap, &(fb_display[con].var), kspc);
+	else
+		if (fb_display[con].cmap.len) /* non default colormap ? */
+			copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
+		else
+			copy_cmap(get_default_colormap(
+			    fb_display[con].var.bits_per_pixel), cmap, kspc ? 0 : 2);
+	return 0;
+}
+
+static int
+atari_fb_set_cmap(struct fb_cmap *cmap, int kspc, int con)
+{
+	int err;
+	if (! fb_display[con].cmap.len) { /* no colormap allocated ? */
+		if ((err = alloc_cmap(&fb_display[con].cmap, 
+					1 << fb_display[con].var.bits_per_pixel, 0)))
+		return err;
+	}
+	if (con == currcon) /* current console ? */
+		return do_fb_set_cmap(cmap, &(fb_display[con].var), kspc);
+	else
+		copy_cmap(cmap, &fb_display[con].cmap, kspc ? 0 : 1);
+	return 0;
+}
+
+static int
+atari_fb_pan_display(struct fb_var_screeninfo *var, int con)
+{
+	int xoffset = var->xoffset;
+	int yoffset = var->yoffset;
+	int err;
+
+	if (   xoffset < 0 || xoffset + fb_display[con].var.xres > fb_display[con].var.xres_virtual
+	    || yoffset < 0 || yoffset + fb_display[con].var.yres > fb_display[con].var.yres_virtual)
+		return -EINVAL;
+
+	if (con == currcon) {
+		if (fbhw->pan_display) {
+			if ((err = fbhw->pan_display(var, &current_par)))
+				return err;
+		}
+		else
+			return -EINVAL;
+	}
+	fb_display[con].var.xoffset = var->xoffset;
+	fb_display[con].var.yoffset = var->yoffset;
+	return 0;
+}
+
+static int
+atari_fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
+	       unsigned long arg, int con)
+{
+	switch (cmd) {
+#ifdef FBCMD_GET_CURRENTPAR
+	case FBCMD_GET_CURRENTPAR:
+		if (copy_to_user((void *)arg, (void *)&current_par,
+				 sizeof(struct atari_fb_par)))
+			return -EFAULT;
+		return 0;
+#endif
+#ifdef FBCMD_SET_CURRENTPAR
+	case FBCMD_SET_CURRENTPAR:
+		if (copy_from_user((void *)&current_par, (void *)arg,
+				   sizeof(struct atari_fb_par)))
+			return -EFAULT;
+		atari_fb_set_par(&current_par);
+		return 0;
+#endif
+	}
+	return -EINVAL;
+}
+
+static struct fb_ops atari_fb_ops = {
+	atari_fb_open, atari_fb_release, atari_fb_get_fix, atari_fb_get_var,
+	atari_fb_set_var, atari_fb_get_cmap, atari_fb_set_cmap,
+	atari_fb_pan_display, atari_fb_ioctl	
+};
+
+static void
+check_default_par( int detected_mode )
+{
+	char default_name[10];
+	int i;
+	struct fb_var_screeninfo var;
+	unsigned long min_mem;
+
+	/* First try the user supplied mode */
+	if (default_par) {
+		var=atari_fb_predefined[default_par-1];
+		var.activate = FB_ACTIVATE_TEST;
+		if (do_fb_set_var(&var,1))
+			default_par=0;		/* failed */
+	}
+	/* Next is the autodetected one */
+	if (! default_par) {
+		var=atari_fb_predefined[detected_mode-1]; /* autodetect */
+		var.activate = FB_ACTIVATE_TEST;
+		if (!do_fb_set_var(&var,1))
+			default_par=detected_mode;
+	}
+	/* If that also failed, try some default modes... */
+	if (! default_par) {
+		/* try default1, default2... */
+		for (i=1 ; i < 10 ; i++) {
+			sprintf(default_name,"default%d",i);
+			default_par=get_video_mode(default_name);
+			if (! default_par)
+				panic("can't set default video mode\n");
+			var=atari_fb_predefined[default_par-1];
+			var.activate = FB_ACTIVATE_TEST;
+			if (! do_fb_set_var(&var,1))
+				break;	/* ok */
+		}
+	}
+	min_mem=var.xres_virtual * var.yres_virtual * var.bits_per_pixel/8;
+	if (default_mem_req < min_mem)
+		default_mem_req=min_mem;
+}
+
+static int
+atafb_switch(int con)
+{
+	/* Do we have to save the colormap ? */
+	if (fb_display[currcon].cmap.len)
+		do_fb_get_cmap(&fb_display[currcon].cmap, &(fb_display[currcon].var), 1);
+	do_fb_set_var(&fb_display[con].var,1);
+	currcon=con;
+	/* Install new colormap */
+	do_install_cmap(con);
+	return 0;
+}
+
+/* (un)blank/poweroff
+ * 0 = unblank
+ * 1 = blank
+ * 2 = suspend vsync
+ * 3 = suspend hsync
+ * 4 = off
+ */
+static void
+atafb_blank(int blank)
+{
+	unsigned short black[16];
+	struct fb_cmap cmap;
+	if (fbhw->blank && !fbhw->blank(blank))
+		return;
+	if (blank) {
+		memset(black, 0, 16*sizeof(unsigned short));
+		cmap.red=black;
+		cmap.green=black;
+		cmap.blue=black;
+		cmap.transp=NULL;
+		cmap.start=0;
+		cmap.len=16;
+		do_fb_set_cmap(&cmap, &(fb_display[currcon].var), 1);
+	}
+	else
+		do_install_cmap(currcon);
+}
+
+static int
+atafb_setcmap(struct fb_cmap *cmap, int con)
+{
+	return(atari_fb_set_cmap(cmap, 1, con));
+}
+
+__initfunc(int
+atari_fb_init(u_long *mem_start))
+{
+	int err;
+	int pad;
+	int detected_mode;
+	unsigned long mem_req;
+	struct fb_var_screeninfo *var;
+
+	if (!MACH_IS_ATARI)
+	        return -ENODEV;
+
+	strcpy(fb_info.modename, "Atari Builtin ");
+	fb_info.changevar = NULL;
+	fb_info.node = -1;
+	fb_info.fbops = &atari_fb_ops;
+	fb_info.fbvar_num = num_atari_fb_predefined;
+	fb_info.fbvar = atari_fb_predefined;
+	fb_info.disp=&disp;
+	fb_info.switch_con=&atafb_switch;
+	fb_info.updatevar=&fb_update_var;
+	fb_info.blank=&atafb_blank;
+	fb_info.setcmap=&atafb_setcmap;
+	var=atari_fb_predefined+default_par-1;
+	do_fb_set_var(var,1);
+	strcat(fb_info.modename,fb_var_names[default_par-1][0]);
+
+	err=register_framebuffer(&fb_info);
+	if (err < 0)
+		return(err);
+	do {
+#ifdef ATAFB_EXT
+		if (external_addr) {
+			fbhw = &ext_switch;
+			break;
+		}
+#endif
+#ifdef ATAFB_TT
+		if (ATARIHW_PRESENT(TT_SHIFTER)) {
+			fbhw = &tt_switch;
+			break;
+		}
+#endif
+#ifdef ATAFB_FALCON
+		if (ATARIHW_PRESENT(VIDEL_SHIFTER)) {
+			fbhw = &falcon_switch;
+			request_irq(IRQ_AUTO_4, falcon_vbl_switcher, IRQ_TYPE_PRIO,
+			            "framebuffer/modeswitch", falcon_vbl_switcher);
+			break;
+		}
+#endif
+#ifdef ATAFB_STE
+		if (ATARIHW_PRESENT(STND_SHIFTER) ||
+		    ATARIHW_PRESENT(EXTD_SHIFTER)) {
+			fbhw = &st_switch;
+			break;
+		}
+		fbhw = &st_switch;
+		printk("Cannot determine video hardware; defaulting to ST(e)\n");
+#else /* ATAFB_STE */
+		/* no default driver included */
+		/* Nobody will ever see this message :-) */
+		panic("Cannot initialize video hardware\n");
+#endif
+	} while (0);
+	detected_mode = fbhw->detect();
+	check_default_par(detected_mode);
+#ifdef ATAFB_EXT
+	if (!external_addr) {
+#endif /* ATAFB_EXT */
+		mem_req = default_mem_req + ovsc_offset +
+			ovsc_addlen;
+		mem_req = ((mem_req + PAGE_SIZE - 1) & PAGE_MASK) + PAGE_SIZE;
+		screen_base = (unsigned long) atari_stram_alloc(mem_req, mem_start);
+		memset((char *) screen_base, 0, mem_req);
+		pad = ((screen_base + PAGE_SIZE-1) & PAGE_MASK) - screen_base;
+		screen_base+=pad;
+		real_screen_base=screen_base+ovsc_offset;
+		screen_len = (mem_req - pad - ovsc_offset) & PAGE_MASK;
+		st_ovsc_switch(ovsc_switchmode);
+		if (CPU_IS_040_OR_060) {
+			/* On a '040+, the cache mode of video RAM must be set to
+			 * write-through also for internal video hardware! */
+			cache_push( VTOP(screen_base), screen_len );
+			kernel_set_cachemode( screen_base, screen_len,
+								  KERNELMAP_NO_COPYBACK );
+		}
+#ifdef ATAFB_EXT
+	}
+	else {
+		/* Map the video memory (physical address given) to somewhere
+		 * in the kernel address space.
+		 */
+		*mem_start = (*mem_start+PAGE_SIZE-1) & ~(PAGE_SIZE-1);
+		external_addr = kernel_map(external_addr, external_len,
+									KERNELMAP_NO_COPYBACK, mem_start);
+		if (external_vgaiobase)
+			external_vgaiobase = kernel_map(external_vgaiobase,
+				0x10000, KERNELMAP_NOCACHE_SER, mem_start);
+		screen_base      =
+		real_screen_base = external_addr;
+		screen_len       = external_len & PAGE_MASK;
+		memset ((char *) screen_base, 0, external_len);
+	}
+#endif /* ATAFB_EXT */
+
+	atari_fb_get_var(&fb_display[0].var, -1);
+	atari_fb_set_disp(-1);
+	printk("Determined %dx%d, depth %d\n",
+	       fb_display[0].var.xres, fb_display[0].var.yres, fb_display[0].var.bits_per_pixel );
+	do_install_cmap(0);
+	printk("%s frame buffer device, using %dK of video memory\n",
+	       fb_info.modename, screen_len>>10);
+	return 0;
+}
+
+/* a strtok which returns empty strings, too */
+
+static char * strtoke(char * s,const char * ct)
+{
+  char *sbegin, *send;
+  static char *ssave = NULL;
+  
+  sbegin  = s ? s : ssave;
+  if (!sbegin) {
+	  return NULL;
+  }
+  if (*sbegin == '\0') {
+    ssave = NULL;
+    return NULL;
+  }
+  send = strpbrk(sbegin, ct);
+  if (send && *send != '\0')
+    *send++ = '\0';
+  ssave = send;
+  return sbegin;
+}
+
+__initfunc(void atari_video_setup( char *options, int *ints ))
+{
+    char *this_opt;
+    int temp;
+    char ext_str[80], int_str[100];
+    char mcap_spec[80];
+    char user_mode[80];
+
+	ext_str[0]          =
+	int_str[0]          =
+	mcap_spec[0]        =
+	user_mode[0]        =
+	fb_info.fontname[0] = '\0';
+
+    if (!options || !*options)
+		return;
+     
+    for(this_opt=strtok(options,","); this_opt; this_opt=strtok(NULL,",")) {
+	if (!*this_opt) continue;
+	if ((temp=get_video_mode(this_opt)))
+		default_par=temp;
+	else if (! strcmp(this_opt, "inverse"))
+		inverse=1;
+	else if (!strncmp(this_opt, "font:", 5))
+	   strcpy(fb_info.fontname, this_opt+5);
+	else if (! strncmp(this_opt, "hwscroll_",9)) {
+		hwscroll=simple_strtoul(this_opt+9, NULL, 10);
+		if (hwscroll < 0)
+			hwscroll = 0;
+		if (hwscroll > 200)
+			hwscroll = 200;
+	}
+	else if (! strncmp(this_opt, "sw_",3)) {
+		if (! strcmp(this_opt+3, "acia"))
+			ovsc_switchmode = SWITCH_ACIA;
+		else if (! strcmp(this_opt+3, "snd6"))
+			ovsc_switchmode = SWITCH_SND6;
+		else if (! strcmp(this_opt+3, "snd7"))
+			ovsc_switchmode = SWITCH_SND7;
+		else ovsc_switchmode = SWITCH_NONE;
+	}
+#ifdef ATAFB_EXT
+	else if (!strcmp(this_opt,"mv300")) {
+		external_bitspercol = 8;
+		external_card_type = IS_MV300;
+	}
+	else if (!strncmp(this_opt,"external:",9))
+		strcpy(ext_str, this_opt+9);
+#endif
+	else if (!strncmp(this_opt,"internal:",9))
+		strcpy(int_str, this_opt+9);
+#ifdef ATAFB_FALCON
+	else if (!strncmp(this_opt, "eclock:", 7)) {
+		fext.f = simple_strtoul(this_opt+7, NULL, 10);
+		/* external pixelclock in kHz --> ps */
+		fext.t = 1000000000/fext.f;
+		fext.f *= 1000;
+	}
+	else if (!strncmp(this_opt, "monitorcap:", 11))
+		strcpy(mcap_spec, this_opt+11);
+#endif
+	else if (!strcmp(this_opt, "keep"))
+		DontCalcRes = 1;
+	else if (!strncmp(this_opt, "R", 1))
+		strcpy(user_mode, this_opt+1);
+    }
+
+    if (*int_str) {
+	/* Format to config extended internal video hardware like OverScan:
+	"<switch-type>,internal:<xres>;<yres>;<xres_max>;<yres_max>;<offset>"
+	Explanation:
+	<switch-type> type to switch on higher resolution
+			sw_acia : via keyboard ACIA
+			sw_snd6 : via bit 6 of the soundchip port
+			sw_snd7 : via bit 7 of the soundchip port
+	<xres>: x-resolution 
+	<yres>: y-resolution
+	The following are only needed if you have an overscan which
+	needs a black border:
+	<xres_max>: max. length of a line in pixels your OverScan hardware would allow
+	<yres_max>: max. number of lines your OverScan hardware would allow
+	<offset>: Offset from physical beginning to visible beginning
+		  of screen in bytes
+	*/
+	int xres;
+	char *p;
+
+	if (!(p = strtoke(int_str, ";")) ||!*p) goto int_invalid;
+	xres = simple_strtoul(p, NULL, 10);
+	if (!(p = strtoke(NULL, ";")) || !*p) goto int_invalid;
+	sttt_xres=xres;
+	tt_yres=st_yres=simple_strtoul(p, NULL, 10);
+	if ((p=strtoke(NULL, ";")) && *p) {
+		sttt_xres_virtual=simple_strtoul(p, NULL, 10);
+	}
+	if ((p=strtoke(NULL, ";")) && *p) {
+		sttt_yres_virtual=simple_strtoul(p, NULL, 0);
+	}
+	if ((p=strtoke(NULL, ";")) && *p) {
+		ovsc_offset=simple_strtoul(p, NULL, 0);
+	}
+
+	if (ovsc_offset || (sttt_yres_virtual != st_yres))
+		use_hwscroll=0;
+    }
+    else 
+      int_invalid:	ovsc_switchmode = SWITCH_NONE;
+
+#ifdef ATAFB_EXT
+    if (*ext_str) {
+	int		xres, yres, depth, planes;
+	unsigned long addr, len;
+	char *p;
+
+	/* Format is: <xres>;<yres>;<depth>;<plane organ.>;
+	 *            <screen mem addr>
+	 *	      [;<screen mem length>[;<vgaiobase>[;<colorreg-type>]]]
+	 */
+	if (!(p = strtoke(ext_str, ";")) ||!*p) goto ext_invalid;
+	xres = simple_strtoul(p, NULL, 10);
+	if (xres <= 0) goto ext_invalid;
+
+	if (!(p = strtoke(NULL, ";")) ||!*p) goto ext_invalid;
+	yres = simple_strtoul(p, NULL, 10);
+	if (yres <= 0) goto ext_invalid;
+
+	if (!(p = strtoke(NULL, ";")) ||!*p) goto ext_invalid;
+	depth = simple_strtoul(p, NULL, 10);
+	if (depth != 1 && depth != 2 && depth != 4 && depth != 8 &&
+		depth != 16 && depth != 24) goto ext_invalid;
+
+	if (!(p = strtoke(NULL, ";")) ||!*p) goto ext_invalid;
+	if (*p == 'i')
+		planes = FB_TYPE_INTERLEAVED_PLANES;
+	else if (*p == 'p')
+		planes = FB_TYPE_PACKED_PIXELS;
+	else if (*p == 'n')
+		planes = FB_TYPE_PLANES;
+	else if (*p == 't')
+		planes = -1; /* true color */
+	else
+		goto ext_invalid;
+
+
+	if (!(p = strtoke(NULL, ";")) ||!*p) goto ext_invalid;
+	addr = simple_strtoul(p, NULL, 0);
+
+	if (!(p = strtoke(NULL, ";")) ||!*p)
+		len = xres*yres*depth/8;
+	else
+		len = simple_strtoul(p, NULL, 0);
+
+	if ((p = strtoke(NULL, ";")) && *p)
+		external_vgaiobase=simple_strtoul(p, NULL, 0);
+
+	if ((p = strtoke(NULL, ";")) && *p) {
+		external_bitspercol = simple_strtoul(p, NULL, 0);
+		if (external_bitspercol > 8)
+			external_bitspercol = 8;
+		else if (external_bitspercol < 1)
+			external_bitspercol = 1;
+	}
+	
+	if ((p = strtoke(NULL, ";")) && *p) {
+		if (!strcmp(this_opt, "vga"))
+			external_card_type = IS_VGA;
+		if (!strcmp(this_opt, "mv300"))
+			external_card_type = IS_MV300;
+	}
+
+	external_xres  = xres;
+	external_yres  = yres;
+	external_depth = depth;
+	external_pmode = planes;
+	external_addr  = addr;
+	external_len   = len;
+		
+	if (external_card_type == IS_MV300)
+	  switch (external_depth) {
+	    case 1:
+	      MV300_reg = MV300_reg_1bit;
+	      break;
+	    case 4:
+	      MV300_reg = MV300_reg_4bit;
+	      break;
+	    case 8:
+	      MV300_reg = MV300_reg_8bit;
+	      break;
+	    }
+
+      ext_invalid:
+	;
+    }
+#endif /* ATAFB_EXT */
+
+#ifdef ATAFB_FALCON
+    if (*mcap_spec) {
+	char *p;
+	int vmin, vmax, hmin, hmax;
+
+	/* Format for monitor capabilities is: <Vmin>;<Vmax>;<Hmin>;<Hmax>
+	 * <V*> vertical freq. in Hz
+	 * <H*> horizontal freq. in kHz
+	 */
+	if (!(p = strtoke(mcap_spec, ";")) || !*p) goto cap_invalid;
+	vmin = simple_strtoul(p, NULL, 10);
+	if (vmin <= 0) goto cap_invalid;
+	if (!(p = strtoke(NULL, ";")) || !*p) goto cap_invalid;
+	vmax = simple_strtoul(p, NULL, 10);
+	if (vmax <= 0 || vmax <= vmin) goto cap_invalid;
+	if (!(p = strtoke(NULL, ";")) || !*p) goto cap_invalid;
+	hmin = 1000 * simple_strtoul(p, NULL, 10);
+	if (hmin <= 0) goto cap_invalid;
+	if (!(p = strtoke(NULL, "")) || !*p) goto cap_invalid;
+	hmax = 1000 * simple_strtoul(p, NULL, 10);
+	if (hmax <= 0 || hmax <= hmin) goto cap_invalid;
+
+	vfmin = vmin;
+	vfmax = vmax;
+	hfmin = hmin;
+	hfmax = hmax;
+      cap_invalid:
+	;
+    }
+#endif
+
+	if (*user_mode) {
+		/* Format of user defined video mode is: <xres>;<yres>;<depth>
+		 */
+		char *p;
+		int xres, yres, depth, temp;
+
+		if (!(p = strtoke(user_mode, ";")) || !*p) goto user_invalid;
+		xres = simple_strtoul(p, NULL, 10);
+		if (!(p = strtoke(NULL, ";")) || !*p) goto user_invalid;
+		yres = simple_strtoul(p, NULL, 10);
+		if (!(p = strtoke(NULL, "")) || !*p) goto user_invalid;
+		depth = simple_strtoul(p, NULL, 10);
+		if ((temp=get_video_mode("user0"))) {
+			default_par=temp;
+			atari_fb_predefined[default_par-1].xres = xres;
+			atari_fb_predefined[default_par-1].yres = yres;
+			atari_fb_predefined[default_par-1].bits_per_pixel = depth;
+		}
+
+	  user_invalid:
+		;
+	}
+}
--- linux-2.1.42/drivers/video/cyberfb.c.orig	Mon Jun  9 23:02:52 1997
+++ linux-2.1.42/drivers/video/cyberfb.c	Thu Jun 12 22:48:22 1997
@@ -0,0 +1,1309 @@
+/*
+ * linux/drivers/video/cyberfb.c -- CyberVision64 frame buffer device
+ *
+ *    Copyright (C) 1996 Martin Apel
+ *                       Geert Uytterhoeven
+ *
+ *
+ * This file is based on the Amiga frame buffer device (amifb.c):
+ *
+ *    Copyright (C) 1995 Geert Uytterhoeven
+ *
+ *
+ * History:
+ *   - 22 Dec 95: Original version by Martin Apel
+ *   - 05 Jan 96: Geert: integration into the current source tree
+ *
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file COPYING in the main directory of this archive
+ * for more details.
+ */
+
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/string.h>
+#include <linux/mm.h>
+#include <linux/tty.h>
+#include <linux/malloc.h>
+#include <linux/delay.h>
+#include <linux/zorro.h>
+#include <linux/fb.h>
+#include <linux/init.h>
+#include <asm/uaccess.h>
+#include <asm/system.h>
+#include <asm/irq.h>
+#include <asm/pgtable.h>
+#include "s3blit.h"
+
+
+#define arraysize(x)    (sizeof(x)/sizeof(*(x)))
+
+struct Cyber_fb_par {
+   int xres;
+   int yres;
+   int bpp;
+};
+
+static struct Cyber_fb_par current_par;
+
+static int current_par_valid = 0;
+static int currcon = 0;
+
+static struct display disp;
+static struct fb_info fb_info;
+
+
+   /*
+    *    Switch for Chipset Independency
+    */
+
+static struct fb_hwswitch {
+
+   /* Initialisation */
+
+   int (*init)(void);
+
+   /* Display Control */
+
+   int (*encode_fix)(struct fb_fix_screeninfo *fix, struct Cyber_fb_par *par);
+   int (*decode_var)(struct fb_var_screeninfo *var, struct Cyber_fb_par *par);
+   int (*encode_var)(struct fb_var_screeninfo *var, struct Cyber_fb_par *par);
+   int (*getcolreg)(u_int regno, u_int *red, u_int *green, u_int *blue,
+                    u_int *transp);
+   int (*setcolreg)(u_int regno, u_int red, u_int green, u_int blue,
+                    u_int transp);
+   void (*blank)(int blank);
+} *fbhw;
+
+
+   /*
+    *    Frame Buffer Name
+    */
+
+static char Cyber_fb_name[16] = "Cybervision";
+
+
+   /*
+    *    Cybervision Graphics Board
+    */
+
+#define CYBER8_WIDTH 1152
+#define CYBER8_HEIGHT 886
+#define CYBER8_PIXCLOCK 12500    /* ++Geert: Just a guess */
+
+#define CYBER16_WIDTH 800
+#define CYBER16_HEIGHT 600
+#define CYBER16_PIXCLOCK 25000   /* ++Geert: Just a guess */
+
+
+static int CyberKey = 0;
+static u_char Cyber_colour_table [256][4];
+static unsigned long CyberMem;
+static unsigned long CyberSize;
+static volatile char *CyberRegs;
+
+static long *memstart;
+
+
+   /*
+    *    Predefined Video Mode Names
+    */
+
+static char *Cyber_fb_modenames[] = {
+
+   /*
+    *    Autodetect (Default) Video Mode
+    */
+
+   "default",
+
+   /*
+    *    Predefined Video Modes
+    */
+    
+   "cyber8",            /* Cybervision 8 bpp */
+   "cyber16",           /* Cybervision 16 bpp */
+
+   /*
+    *    Dummy Video Modes
+    */
+
+   "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy",
+   "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy",
+   "dummy", "dummy", "dummy", "dummy",
+
+   /*
+    *    User Defined Video Modes
+    *
+    *    This doesn't work yet!!
+    */
+
+   "user0", "user1", "user2", "user3", "user4", "user5", "user6", "user7"
+};
+
+
+   /*
+    *    Predefined Video Mode Definitions
+    */
+
+static struct fb_var_screeninfo Cyber_fb_predefined[] = {
+
+   /*
+    *    Autodetect (Default) Video Mode
+    */
+
+   { 0, },
+
+   /*
+    *    Predefined Video Modes
+    */
+    
+   {
+      /* Cybervision 8 bpp */
+      CYBER8_WIDTH, CYBER8_HEIGHT, CYBER8_WIDTH, CYBER8_HEIGHT, 0, 0, 8, 0,
+      {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
+      0, 0, -1, -1, FB_ACCEL_NONE, CYBER8_PIXCLOCK, 64, 96, 35, 12, 112, 2,
+      FB_SYNC_COMP_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
+   }, {
+      /* Cybervision 16 bpp */
+      CYBER16_WIDTH, CYBER16_HEIGHT, CYBER16_WIDTH, CYBER16_HEIGHT, 0, 0, 16, 0,
+      {11, 5, 0}, {5, 6, 0}, {0, 5, 0}, {0, 0, 0},
+      0, 0, -1, -1, FB_ACCEL_NONE, CYBER16_PIXCLOCK, 64, 96, 35, 12, 112, 2,
+      FB_SYNC_COMP_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
+   },
+
+   /*
+    *    Dummy Video Modes
+    */
+
+   { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, },
+   { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, },
+   { 0, }, { 0, },
+
+   /*
+    *    User Defined Video Modes
+    */
+
+   { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }
+};
+
+
+#define NUM_TOTAL_MODES    arraysize(Cyber_fb_predefined)
+#define NUM_PREDEF_MODES   (3)
+
+
+static int Cyberfb_inverse = 0;
+static int Cyberfb_Cyber8 = 0;        /* Use Cybervision board */
+static int Cyberfb_Cyber16 = 0;       /* Use Cybervision board */
+static int Cyberfb_mode = 0;
+
+
+   /*
+    *    Some default modes
+    */
+
+#define CYBER8_DEFMODE     (1)
+#define CYBER16_DEFMODE    (2)
+
+
+   /*
+    *    Interface used by the world
+    */
+
+void Cyber_video_setup(char *options, int *ints);
+
+static int Cyber_fb_open(int fbidx);
+static int Cyber_fb_release(int fbidx);
+static int Cyber_fb_get_fix(struct fb_fix_screeninfo *fix, int con);
+static int Cyber_fb_get_var(struct fb_var_screeninfo *var, int con);
+static int Cyber_fb_set_var(struct fb_var_screeninfo *var, int con);
+static int Cyber_fb_get_cmap(struct fb_cmap *cmap, int kspc, int con);
+static int Cyber_fb_set_cmap(struct fb_cmap *cmap, int kspc, int con);
+static int Cyber_fb_pan_display(struct fb_var_screeninfo *var, int con);
+static int Cyber_fb_ioctl(struct inode *inode, struct file *file, u_int cmd,
+                          u_long arg, int con);
+
+
+   /*
+    *    Interface to the low level console driver
+    */
+
+int Cyber_fb_init(u_long *mem_start);
+static int Cyberfb_switch(int con);
+static int Cyberfb_updatevar(int con);
+static void Cyberfb_blank(int blank);
+static int Cyberfb_setcmap(struct fb_cmap *cmap, int con);
+
+
+   /*
+    *    Accelerated Functions used by the low level console driver
+    */
+
+void Cyber_WaitQueue(u_short fifo);
+void Cyber_WaitBlit(void);
+void Cyber_BitBLT(u_short curx, u_short cury, u_short destx, u_short desty,
+                  u_short width, u_short height, u_short mode);
+void Cyber_RectFill(u_short x, u_short y, u_short width, u_short height,
+                    u_short mode, u_short color);
+void Cyber_MoveCursor(u_short x, u_short y);
+
+
+   /*
+    *   Hardware Specific Routines
+    */
+
+static int Cyber_init(void);
+static int Cyber_encode_fix(struct fb_fix_screeninfo *fix,
+                          struct Cyber_fb_par *par);
+static int Cyber_decode_var(struct fb_var_screeninfo *var,
+                          struct Cyber_fb_par *par);
+static int Cyber_encode_var(struct fb_var_screeninfo *var,
+                          struct Cyber_fb_par *par);
+static int Cyber_getcolreg(u_int regno, u_int *red, u_int *green, u_int *blue,
+                         u_int *transp);
+static int Cyber_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
+                         u_int transp);
+static void Cyber_blank(int blank);
+
+
+   /*
+    *    Internal routines
+    */
+
+static void Cyber_fb_get_par(struct Cyber_fb_par *par);
+static void Cyber_fb_set_par(struct Cyber_fb_par *par);
+static int do_fb_set_var(struct fb_var_screeninfo *var, int isactive);
+static struct fb_cmap *get_default_colormap(int bpp);
+static int do_fb_get_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
+                          int kspc);
+static int do_fb_set_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
+                          int kspc);
+static void do_install_cmap(int con);
+static void memcpy_fs(int fsfromto, void *to, void *from, int len);
+static void copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto);
+static int alloc_cmap(struct fb_cmap *cmap, int len, int transp);
+static void Cyber_fb_set_disp(int con);
+static int get_video_mode(const char *name);
+
+
+/* -------------------- Hardware specific routines -------------------------- */
+
+
+   /*
+    *    Initialization
+    *
+    *    Set the default video mode for this chipset. If a video mode was
+    *    specified on the command line, it will override the default mode.
+    */
+
+static int Cyber_init(void)
+{
+int i;
+char size;
+volatile u_long *CursorBase;
+unsigned long board_addr;
+struct ConfigDev *cd;
+
+if (Cyberfb_mode == -1)
+  {
+  if (Cyberfb_Cyber8)
+    Cyberfb_mode = CYBER8_DEFMODE;
+  else
+    Cyberfb_mode = CYBER16_DEFMODE;
+  }
+
+cd = zorro_get_board (CyberKey);
+zorro_config_board (CyberKey, 0);
+board_addr = (unsigned long)cd->cd_BoardAddr;
+
+for (i = 0; i < 256; i++)
+
+for (i = 0; i < 256; i++)
+  {
+  Cyber_colour_table [i][0] = i;
+  Cyber_colour_table [i][1] = i;
+  Cyber_colour_table [i][2] = i;
+  Cyber_colour_table [i][3] = 0;
+  }
+
+if (memstart)
+    *memstart = (*memstart + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1);
+/* This includes the video memory as well as the S3 register set */
+CyberMem = kernel_map (board_addr + 0x01400000, 0x01000000,
+                       KERNELMAP_NOCACHE_SER, memstart);
+
+if (Cyberfb_Cyber8)
+  memset ((char*)CyberMem, 0, CYBER8_WIDTH * CYBER8_HEIGHT);
+else
+  memset ((char*)CyberMem, 0, CYBER16_WIDTH * CYBER16_HEIGHT);
+
+CyberRegs = (char*) (CyberMem + 0x00c00000);
+
+/* Disable hardware cursor */
+*(CyberRegs + S3_CRTC_ADR)  = S3_REG_LOCK2;
+*(CyberRegs + S3_CRTC_DATA) = 0xa0;
+*(CyberRegs + S3_CRTC_ADR)  = S3_HGC_MODE;
+*(CyberRegs + S3_CRTC_DATA) = 0x00;
+*(CyberRegs + S3_CRTC_ADR)  = S3_HWGC_DX;
+*(CyberRegs + S3_CRTC_DATA) = 0x00;
+*(CyberRegs + S3_CRTC_ADR)  = S3_HWGC_DY;
+*(CyberRegs + S3_CRTC_DATA) = 0x00;
+
+/* Set clipping rectangle to current screen size */
+*((u_short volatile *)(CyberRegs + 0xbee8)) = 0x1000;
+*((u_short volatile *)(CyberRegs + 0xbee8)) = 0x2000;
+if (Cyberfb_Cyber8)
+  {
+  *((u_short volatile *)(CyberRegs + 0xbee8)) = 0x3000 | (CYBER8_HEIGHT - 1);
+  *((u_short volatile *)(CyberRegs + 0xbee8)) = 0x4000 | (CYBER8_WIDTH - 1);
+  }
+else
+  {
+  *((u_short volatile *)(CyberRegs + 0xbee8)) = 0x3000 | (CYBER16_HEIGHT - 1);
+  *((u_short volatile *)(CyberRegs + 0xbee8)) = 0x4000 | (CYBER16_WIDTH - 1);
+  }
+
+/* Get memory size (if not 2MB it is 4MB) */
+*(CyberRegs + S3_CRTC_ADR) = S3_LAW_CTL;
+size = *(CyberRegs + S3_CRTC_DATA);
+if ((size & 0x03) == 0x02)
+  CyberSize = 0x00200000; /* 2 MB */
+else
+  CyberSize = 0x00400000; /* 4 MB */
+
+/* Initialize hardware cursor */
+CursorBase = (u_long *)((char *)(CyberMem) + CyberSize - 0x400);
+for (i=0; i < 8; i++)
+  {
+  *(CursorBase  +(i*4)) = 0xffffff00;
+  *(CursorBase+1+(i*4)) = 0xffff0000;
+  *(CursorBase+2+(i*4)) = 0xffff0000;
+  *(CursorBase+3+(i*4)) = 0xffff0000;
+  }
+for (i=8; i < 64; i++)
+  {
+  *(CursorBase  +(i*4)) = 0xffff0000;
+  *(CursorBase+1+(i*4)) = 0xffff0000;
+  *(CursorBase+2+(i*4)) = 0xffff0000;
+  *(CursorBase+3+(i*4)) = 0xffff0000;
+  }
+
+Cyber_setcolreg (255, 56, 100, 160, 0);
+Cyber_setcolreg (254, 0, 0, 0, 0);
+
+return (0);
+}
+
+
+   /*
+    *    This function should fill in the `fix' structure based on the
+    *    values in the `par' structure.
+    */
+
+static int Cyber_encode_fix(struct fb_fix_screeninfo *fix,
+                          struct Cyber_fb_par *par)
+{
+   int i;
+
+   strcpy(fix->id, Cyber_fb_name);
+   fix->smem_start = CyberMem;
+#if 0
+   fix->smem_len = CyberSize;
+#else
+   fix->smem_len = 0x01000000;
+#endif
+
+   fix->type = FB_TYPE_PACKED_PIXELS;
+   fix->type_aux = 0;
+   if (par->bpp == 8)
+      fix->visual = FB_VISUAL_PSEUDOCOLOR;
+   else
+      fix->visual = FB_VISUAL_DIRECTCOLOR;
+
+   fix->xpanstep = 0;
+   fix->ypanstep = 0;
+   fix->ywrapstep = 0;
+   fix->line_length = 0;
+
+   for (i = 0; i < arraysize(fix->reserved); i++)
+      fix->reserved[i] = 0;
+
+   return(0);
+}
+
+
+   /*
+    *    Get the video params out of `var'. If a value doesn't fit, round
+    *    it up, if it's too big, return -EINVAL.
+    */
+
+static int Cyber_decode_var(struct fb_var_screeninfo *var,
+                          struct Cyber_fb_par *par)
+{
+   if (Cyberfb_Cyber8) {
+      par->xres = CYBER8_WIDTH;
+      par->yres = CYBER8_HEIGHT;
+      par->bpp = 8;
+   } else {
+      par->xres = CYBER16_WIDTH;
+      par->yres = CYBER16_HEIGHT;
+      par->bpp = 16;
+   }
+   return(0);
+}
+
+
+   /*
+    *    Fill the `var' structure based on the values in `par' and maybe
+    *    other values read out of the hardware.
+    */
+
+static int Cyber_encode_var(struct fb_var_screeninfo *var,
+                          struct Cyber_fb_par *par)
+{
+   int i;
+
+   var->xres = par->xres;
+   var->yres = par->yres;
+   var->xres_virtual = par->xres;
+   var->yres_virtual = par->yres;
+   var->xoffset = 0;
+   var->yoffset = 0;
+
+   var->bits_per_pixel = par->bpp;
+   var->grayscale = 0;
+
+   if (par->bpp == 8) {
+      var->red.offset = 0;
+      var->red.length = 8;
+      var->red.msb_right = 0;
+      var->blue = var->green = var->red;
+   } else {
+      var->red.offset = 11;
+      var->red.length = 5;
+      var->red.msb_right = 0;
+      var->green.offset = 5;
+      var->green.length = 6;
+      var->green.msb_right = 0;
+      var->blue.offset = 0;
+      var->blue.length = 5;
+      var->blue.msb_right = 0;
+   }
+   var->transp.offset = 0;
+   var->transp.length = 0;
+   var->transp.msb_right = 0;
+
+   var->nonstd = 0;
+   var->activate = 0;
+
+   var->height = -1;
+   var->width = -1;
+   var->accel = FB_ACCEL_CYBERVISION;
+   var->vmode = FB_VMODE_NONINTERLACED;
+
+   /* Dummy values */
+
+   if (par->bpp == 8)
+      var->pixclock = CYBER8_PIXCLOCK;
+   else
+      var->pixclock = CYBER16_PIXCLOCK;
+   var->sync = 0;
+   var->left_margin = 64;
+   var->right_margin = 96;
+   var->upper_margin = 35;
+   var->lower_margin = 12;
+   var->hsync_len = 112;
+   var->vsync_len = 2;
+
+   for (i = 0; i < arraysize(var->reserved); i++)
+      var->reserved[i] = 0;
+
+   return(0);
+}
+
+
+   /*
+    *    Set a single color register. The values supplied are already
+    *    rounded down to the hardware's capabilities (according to the
+    *    entries in the var structure). Return != 0 for invalid regno.
+    */
+
+static int Cyber_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
+                         u_int transp)
+{
+if (regno > 255)
+  return (1);
+
+*(CyberRegs + 0x3c8) = (char)regno;
+Cyber_colour_table [regno][0] = red & 0xff;
+Cyber_colour_table [regno][1] = green & 0xff;
+Cyber_colour_table [regno][2] = blue & 0xff;
+Cyber_colour_table [regno][3] = transp;
+
+*(CyberRegs + 0x3c9) = (red & 0xff) >> 2;
+*(CyberRegs + 0x3c9) = (green & 0xff) >> 2;
+*(CyberRegs + 0x3c9) = (blue & 0xff) >> 2;
+
+return (0);
+}
+
+
+   /*
+    *    Read a single color register and split it into
+    *    colors/transparent. Return != 0 for invalid regno.
+    */
+
+static int Cyber_getcolreg(u_int regno, u_int *red, u_int *green, u_int *blue,
+                         u_int *transp)
+{
+if (regno >= 256)
+  return (1);
+*red    = Cyber_colour_table [regno][0];
+*green  = Cyber_colour_table [regno][1];
+*blue   = Cyber_colour_table [regno][2];
+*transp = Cyber_colour_table [regno][3];
+return (0);
+}
+
+
+   /*
+    *    (Un)Blank the screen
+    */
+
+void Cyber_blank(int blank)
+{
+int i;
+
+if (blank)
+  for (i = 0; i < 256; i++)
+    {
+    *(CyberRegs + 0x3c8) = i;
+    *(CyberRegs + 0x3c9) = 0;
+    *(CyberRegs + 0x3c9) = 0;
+    *(CyberRegs + 0x3c9) = 0;
+    }
+else
+  for (i = 0; i < 256; i++)
+    {
+    *(CyberRegs + 0x3c8) = i;
+    *(CyberRegs + 0x3c9) = Cyber_colour_table [i][0] >> 2;
+    *(CyberRegs + 0x3c9) = Cyber_colour_table [i][1] >> 2;
+    *(CyberRegs + 0x3c9) = Cyber_colour_table [i][2] >> 2;
+    }
+}
+
+
+/**************************************************************
+ * We are waiting for "fifo" FIFO-slots empty
+ */
+void Cyber_WaitQueue (u_short fifo)
+{
+u_short status;
+
+do
+  {
+  status = *((u_short volatile *)(CyberRegs + S3_GP_STAT));
+  }
+while (status & fifo);
+}
+
+/**************************************************************
+ * We are waiting for Hardware (Graphics Engine) not busy
+ */
+void Cyber_WaitBlit (void)
+{
+u_short status;
+
+do
+  {
+  status = *((u_short volatile *)(CyberRegs + S3_GP_STAT));
+  }
+while (status & S3_HDW_BUSY);
+}
+
+/**************************************************************
+ * BitBLT - Through the Plane
+ */
+void Cyber_BitBLT (u_short curx, u_short cury, u_short destx, u_short desty,
+                   u_short width, u_short height, u_short mode)
+{
+u_short blitcmd = S3_BITBLT;
+
+/* Set drawing direction */
+/* -Y, X maj, -X (default) */
+if (curx > destx)
+  blitcmd |= 0x0020;  /* Drawing direction +X */
+else
+  {
+  curx  += (width - 1);
+  destx += (width - 1);
+  }
+
+if (cury > desty)
+  blitcmd |= 0x0080;  /* Drawing direction +Y */
+else
+  {
+  cury  += (height - 1);
+  desty += (height - 1);
+  }
+
+Cyber_WaitQueue (0x8000);
+
+*((u_short volatile *)(CyberRegs + S3_PIXEL_CNTL)) = 0xa000;
+*((u_short volatile *)(CyberRegs + S3_FRGD_MIX)) = (0x0060 | mode);
+
+*((u_short volatile *)(CyberRegs + S3_CUR_X)) = curx;
+*((u_short volatile *)(CyberRegs + S3_CUR_Y)) = cury;
+
+*((u_short volatile *)(CyberRegs + S3_DESTX_DIASTP)) = destx;
+*((u_short volatile *)(CyberRegs + S3_DESTY_AXSTP)) = desty;
+
+*((u_short volatile *)(CyberRegs + S3_MIN_AXIS_PCNT)) = height - 1;
+*((u_short volatile *)(CyberRegs + S3_MAJ_AXIS_PCNT)) = width  - 1;
+
+*((u_short volatile *)(CyberRegs + S3_CMD)) = blitcmd;
+}
+
+/**************************************************************
+ * Rectangle Fill Solid
+ */
+void Cyber_RectFill (u_short x, u_short y, u_short width, u_short height,
+                     u_short mode, u_short color)
+{
+u_short blitcmd = S3_FILLEDRECT;
+
+Cyber_WaitQueue (0x8000);
+
+*((u_short volatile *)(CyberRegs + S3_PIXEL_CNTL)) = 0xa000;
+*((u_short volatile *)(CyberRegs + S3_FRGD_MIX)) = (0x0020 | mode);
+
+*((u_short volatile *)(CyberRegs + S3_MULT_MISC)) = 0xe000;
+*((u_short volatile *)(CyberRegs + S3_FRGD_COLOR)) = color;
+
+*((u_short volatile *)(CyberRegs + S3_CUR_X)) = x;
+*((u_short volatile *)(CyberRegs + S3_CUR_Y)) = y;
+
+*((u_short volatile *)(CyberRegs + S3_MIN_AXIS_PCNT)) = height - 1;
+*((u_short volatile *)(CyberRegs + S3_MAJ_AXIS_PCNT)) = width  - 1;
+
+*((u_short volatile *)(CyberRegs + S3_CMD)) = blitcmd;
+}
+
+
+/**************************************************************
+ * Move cursor to x, y
+ */
+void Cyber_MoveCursor (u_short x, u_short y)
+{
+*(CyberRegs + S3_CRTC_ADR)  = 0x39;
+*(CyberRegs + S3_CRTC_DATA) = 0xa0;
+
+*(CyberRegs + S3_CRTC_ADR)  = S3_HWGC_ORGX_H;
+*(CyberRegs + S3_CRTC_DATA) = (char)((x & 0x0700) >> 8);
+*(CyberRegs + S3_CRTC_ADR)  = S3_HWGC_ORGX_L;
+*(CyberRegs + S3_CRTC_DATA) = (char)(x & 0x00ff);
+
+*(CyberRegs + S3_CRTC_ADR)  = S3_HWGC_ORGY_H;
+*(CyberRegs + S3_CRTC_DATA) = (char)((y & 0x0700) >> 8);
+*(CyberRegs + S3_CRTC_ADR)  = S3_HWGC_ORGY_L;
+*(CyberRegs + S3_CRTC_DATA) = (char)(y & 0x00ff);
+}
+
+
+/* -------------------- Interfaces to hardware functions -------------------- */
+
+
+static struct fb_hwswitch Cyber_switch = {
+   Cyber_init, Cyber_encode_fix, Cyber_decode_var, Cyber_encode_var,
+   Cyber_getcolreg, Cyber_setcolreg, Cyber_blank
+};
+
+
+/* -------------------- Generic routines ------------------------------------ */
+
+
+   /*
+    *    Fill the hardware's `par' structure.
+    */
+
+static void Cyber_fb_get_par(struct Cyber_fb_par *par)
+{
+   if (current_par_valid)
+      *par = current_par;
+   else
+      fbhw->decode_var(&Cyber_fb_predefined[Cyberfb_mode], par);
+}
+
+
+static void Cyber_fb_set_par(struct Cyber_fb_par *par)
+{
+   current_par = *par;
+   current_par_valid = 1;
+}
+
+
+static int do_fb_set_var(struct fb_var_screeninfo *var, int isactive)
+{
+   int err, activate;
+   struct Cyber_fb_par par;
+
+   if ((err = fbhw->decode_var(var, &par)))
+      return(err);
+   activate = var->activate;
+   if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW && isactive)
+      Cyber_fb_set_par(&par);
+   fbhw->encode_var(var, &par);
+   var->activate = activate;
+   return(0);
+}
+
+
+   /*
+    *    Default Colormaps
+    */
+
+static u_short red16[] =
+   { 0xc000, 0x0000, 0x0000, 0x0000, 0xc000, 0xc000, 0xc000, 0x0000,
+     0x8000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff};
+static u_short green16[] =
+   { 0xc000, 0x0000, 0xc000, 0xc000, 0x0000, 0x0000, 0xc000, 0x0000,
+     0x8000, 0x0000, 0xffff, 0xffff, 0x0000, 0x0000, 0xffff, 0xffff};
+static u_short blue16[] =
+   { 0xc000, 0x0000, 0x0000, 0xc000, 0x0000, 0xc000, 0x0000, 0x0000,
+     0x8000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff};
+
+
+static struct fb_cmap default_16_colors =
+   { 0, 16, red16, green16, blue16, NULL };
+
+
+static struct fb_cmap *get_default_colormap(int bpp)
+{
+   return(&default_16_colors);
+}
+
+
+#define CNVT_TOHW(val,width)     ((((val)<<(width))+0x7fff-(val))>>16)
+#define CNVT_FROMHW(val,width)   (((width) ? ((((val)<<16)-(val)) / \
+                                              ((1<<(width))-1)) : 0))
+
+static int do_fb_get_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
+                          int kspc)
+{
+   int i, start;
+   u_short *red, *green, *blue, *transp;
+   u_int hred, hgreen, hblue, htransp;
+
+   red = cmap->red;
+   green = cmap->green;
+   blue = cmap->blue;
+   transp = cmap->transp;
+   start = cmap->start;
+   if (start < 0)
+      return(-EINVAL);
+   for (i = 0; i < cmap->len; i++) {
+      if (fbhw->getcolreg(start++, &hred, &hgreen, &hblue, &htransp))
+         return(0);
+      hred = CNVT_FROMHW(hred, var->red.length);
+      hgreen = CNVT_FROMHW(hgreen, var->green.length);
+      hblue = CNVT_FROMHW(hblue, var->blue.length);
+      htransp = CNVT_FROMHW(htransp, var->transp.length);
+      if (kspc) {
+         *red = hred;
+         *green = hgreen;
+         *blue = hblue;
+         if (transp)
+            *transp = htransp;
+      } else {
+         put_user(hred, red);
+         put_user(hgreen, green);
+         put_user(hblue, blue);
+         if (transp)
+            put_user(htransp, transp);
+      }
+      red++;
+      green++;
+      blue++;
+      if (transp)
+         transp++;
+   }
+   return(0);
+}
+
+
+static int do_fb_set_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
+                          int kspc)
+{
+   int i, start;
+   u_short *red, *green, *blue, *transp;
+   u_int hred, hgreen, hblue, htransp;
+
+   red = cmap->red;
+   green = cmap->green;
+   blue = cmap->blue;
+   transp = cmap->transp;
+   start = cmap->start;
+
+   if (start < 0)
+      return(-EINVAL);
+   for (i = 0; i < cmap->len; i++) {
+      if (kspc) {
+         hred = *red;
+         hgreen = *green;
+         hblue = *blue;
+         htransp = transp ? *transp : 0;
+      } else {
+         get_user(hred, red);
+         get_user(hgreen, green);
+         get_user(hblue, blue);
+	 if (transp)
+		 get_user(htransp, transp);
+	 else
+		 htransp = 0;
+      }
+      hred = CNVT_TOHW(hred, var->red.length);
+      hgreen = CNVT_TOHW(hgreen, var->green.length);
+      hblue = CNVT_TOHW(hblue, var->blue.length);
+      htransp = CNVT_TOHW(htransp, var->transp.length);
+      red++;
+      green++;
+      blue++;
+      if (transp)
+         transp++;
+      if (fbhw->setcolreg(start++, hred, hgreen, hblue, htransp))
+         return(0);
+   }
+   return(0);
+}
+
+
+static void do_install_cmap(int con)
+{
+   if (con != currcon)
+      return;
+   if (fb_display[con].cmap.len)
+      do_fb_set_cmap(&fb_display[con].cmap, &fb_display[con].var, 1);
+   else
+      do_fb_set_cmap(get_default_colormap(fb_display[con].var.bits_per_pixel),
+                                          &fb_display[con].var, 1);
+}
+
+
+static void memcpy_fs(int fsfromto, void *to, void *from, int len)
+{
+   switch (fsfromto) {
+      case 0:
+         memcpy(to, from, len);
+         return;
+      case 1:
+         copy_from_user(to, from, len);
+         return;
+      case 2:
+         copy_to_user(to, from, len);
+         return;
+   }
+}
+
+
+static void copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto)
+{
+   int size;
+   int tooff = 0, fromoff = 0;
+
+   if (to->start > from->start)
+      fromoff = to->start-from->start;
+   else
+      tooff = from->start-to->start;
+   size = to->len-tooff;
+   if (size > from->len-fromoff)
+      size = from->len-fromoff;
+   if (size < 0)
+      return;
+   size *= sizeof(u_short);
+   memcpy_fs(fsfromto, to->red+tooff, from->red+fromoff, size);
+   memcpy_fs(fsfromto, to->green+tooff, from->green+fromoff, size);
+   memcpy_fs(fsfromto, to->blue+tooff, from->blue+fromoff, size);
+   if (from->transp && to->transp)
+      memcpy_fs(fsfromto, to->transp+tooff, from->transp+fromoff, size);
+}
+
+
+static int alloc_cmap(struct fb_cmap *cmap, int len, int transp)
+{
+   int size = len*sizeof(u_short);
+
+   if (cmap->len != len) {
+      if (cmap->red)
+         kfree(cmap->red);
+      if (cmap->green)
+         kfree(cmap->green);
+      if (cmap->blue)
+         kfree(cmap->blue);
+      if (cmap->transp)
+         kfree(cmap->transp);
+      cmap->red = cmap->green = cmap->blue = cmap->transp = NULL;
+      cmap->len = 0;
+      if (!len)
+         return(0);
+      if (!(cmap->red = kmalloc(size, GFP_ATOMIC)))
+         return(-1);
+      if (!(cmap->green = kmalloc(size, GFP_ATOMIC)))
+         return(-1);
+      if (!(cmap->blue = kmalloc(size, GFP_ATOMIC)))
+         return(-1);
+      if (transp) {
+         if (!(cmap->transp = kmalloc(size, GFP_ATOMIC)))
+            return(-1);
+      } else
+         cmap->transp = NULL;
+   }
+   cmap->start = 0;
+   cmap->len = len;
+   copy_cmap(get_default_colormap(len), cmap, 0);
+   return(0);
+}
+
+
+   /*
+    *  Open/Release the frame buffer device
+    */
+
+static int Cyber_fb_open(int fbidx)
+{
+   /*
+    * Nothing, only a usage count for the moment
+    */
+
+   MOD_INC_USE_COUNT;
+   return(0);
+}
+
+static int Cyber_fb_release(int fbidx)
+{
+   MOD_DEC_USE_COUNT;
+   return(0);
+}
+
+
+   /*
+    *    Get the Fixed Part of the Display
+    */
+
+static int Cyber_fb_get_fix(struct fb_fix_screeninfo *fix, int con)
+{
+   struct Cyber_fb_par par;
+   int error = 0;
+
+   if (con == -1)
+      Cyber_fb_get_par(&par);
+   else
+      error = fbhw->decode_var(&fb_display[con].var, &par);
+   return(error ? error : fbhw->encode_fix(fix, &par));
+}
+
+
+   /*
+    *    Get the User Defined Part of the Display
+    */
+
+static int Cyber_fb_get_var(struct fb_var_screeninfo *var, int con)
+{
+   struct Cyber_fb_par par;
+   int error = 0;
+
+   if (con == -1) {
+      Cyber_fb_get_par(&par);
+      error = fbhw->encode_var(var, &par);
+   } else
+      *var = fb_display[con].var;
+   return(error);
+}
+
+
+static void Cyber_fb_set_disp(int con)
+{
+   struct fb_fix_screeninfo fix;
+   struct display *display;
+
+   if (con >= 0)
+      display = &fb_display[con];
+   else
+      display = &disp;		/* used during initialization */
+
+   Cyber_fb_get_fix(&fix, con);
+   if (con == -1)
+      con = 0;
+   display->screen_base = (u_char *)fix.smem_start;
+   display->visual = fix.visual;
+   display->type = fix.type;
+   display->type_aux = fix.type_aux;
+   display->ypanstep = fix.ypanstep;
+   display->ywrapstep = fix.ywrapstep;
+   display->can_soft_blank = 1;
+   display->inverse = Cyberfb_inverse;
+}
+
+
+   /*
+    *    Set the User Defined Part of the Display
+    */
+
+static int Cyber_fb_set_var(struct fb_var_screeninfo *var, int con)
+{
+   int err, oldxres, oldyres, oldvxres, oldvyres, oldbpp;
+
+   if ((err = do_fb_set_var(var, con == currcon)))
+      return(err);
+   if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) {
+      oldxres = fb_display[con].var.xres;
+      oldyres = fb_display[con].var.yres;
+      oldvxres = fb_display[con].var.xres_virtual;
+      oldvyres = fb_display[con].var.yres_virtual;
+      oldbpp = fb_display[con].var.bits_per_pixel;
+      fb_display[con].var = *var;
+      if (oldxres != var->xres || oldyres != var->yres ||
+          oldvxres != var->xres_virtual || oldvyres != var->yres_virtual ||
+          oldbpp != var->bits_per_pixel) {
+         Cyber_fb_set_disp(con);
+         (*fb_info.changevar)(con);
+         alloc_cmap(&fb_display[con].cmap, 0, 0);
+         do_install_cmap(con);
+      }
+   }
+   var->activate = 0;
+   return(0);
+}
+
+
+   /*
+    *    Get the Colormap
+    */
+
+static int Cyber_fb_get_cmap(struct fb_cmap *cmap, int kspc, int con)
+{
+   if (con == currcon) /* current console? */
+      return(do_fb_get_cmap(cmap, &fb_display[con].var, kspc));
+   else if (fb_display[con].cmap.len) /* non default colormap? */
+      copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
+   else
+      copy_cmap(get_default_colormap(fb_display[con].var.bits_per_pixel), cmap,
+                kspc ? 0 : 2);
+   return(0);
+}
+
+
+   /*
+    *    Set the Colormap
+    */
+
+static int Cyber_fb_set_cmap(struct fb_cmap *cmap, int kspc, int con)
+{
+   int err;
+
+   if (!fb_display[con].cmap.len) {       /* no colormap allocated? */
+      if ((err = alloc_cmap(&fb_display[con].cmap, 1<<fb_display[con].var.bits_per_pixel,
+                            0)))
+         return(err);
+   }
+   if (con == currcon)              /* current console? */
+      return(do_fb_set_cmap(cmap, &fb_display[con].var, kspc));
+   else
+      copy_cmap(cmap, &fb_display[con].cmap, kspc ? 0 : 1);
+   return(0);
+}
+
+
+   /*
+    *    Pan or Wrap the Display
+    *
+    *    This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
+    */
+
+static int Cyber_fb_pan_display(struct fb_var_screeninfo *var, int con)
+{
+   return(-EINVAL);
+}
+
+
+   /*
+    *    Cybervision Frame Buffer Specific ioctls
+    */
+
+static int Cyber_fb_ioctl(struct inode *inode, struct file *file,
+                          u_int cmd, u_long arg, int con)
+{
+   return(-EINVAL);
+}
+
+
+static struct fb_ops Cyber_fb_ops = {
+   Cyber_fb_open, Cyber_fb_release, Cyber_fb_get_fix, Cyber_fb_get_var,
+   Cyber_fb_set_var, Cyber_fb_get_cmap, Cyber_fb_set_cmap,
+   Cyber_fb_pan_display, Cyber_fb_ioctl
+};
+
+
+__initfunc(void Cyber_video_setup(char *options, int *ints))
+{
+   char *this_opt;
+   int i;
+
+   fb_info.fontname[0] = '\0';
+
+   if (!options || !*options)
+      return;
+
+   for (this_opt = strtok(options, ","); this_opt; this_opt = strtok(NULL, ","))
+      if (!strcmp(this_opt, "inverse")) {
+         Cyberfb_inverse = 1;
+         for (i = 0; i < 16; i++) {
+            red16[i] = ~red16[i];
+            green16[i] = ~green16[i];
+            blue16[i] = ~blue16[i];
+         }
+      } else if (!strncmp(this_opt, "font:", 5))
+         strcpy(fb_info.fontname, this_opt+5);
+      else if (!strcmp (this_opt, "cyber8"))
+         Cyberfb_Cyber8 = 1;
+      else if (!strcmp (this_opt, "cyber16"))
+         Cyberfb_Cyber16 = 1;
+      else
+         Cyberfb_mode = get_video_mode(this_opt);
+}
+
+
+   /*
+    *    Initialization
+    */
+
+__initfunc(int Cyber_fb_init(u_long *mem_start))
+{
+   int err;
+   struct Cyber_fb_par par;
+
+   if (!(CyberKey = zorro_find(MANUF_PHASE5, PROD_CYBERVISION, 0, 0)))
+      return -ENODEV;
+
+   memstart = mem_start;
+
+   fbhw = &Cyber_switch;
+
+   strcpy(fb_info.modename, Cyber_fb_name);
+   fb_info.changevar = NULL;
+   fb_info.node = -1;
+   fb_info.fbops = &Cyber_fb_ops;
+   fb_info.fbvar_num = NUM_TOTAL_MODES;
+   fb_info.fbvar = Cyber_fb_predefined;
+   fb_info.disp = &disp;
+   fb_info.switch_con = &Cyberfb_switch;
+   fb_info.updatevar = &Cyberfb_updatevar;
+   fb_info.blank = &Cyberfb_blank;
+   fb_info.setcmap = &Cyberfb_setcmap;
+
+   err = register_framebuffer(&fb_info);
+   if (err < 0)
+      return err;
+
+   fbhw->init();
+   fbhw->decode_var(&Cyber_fb_predefined[Cyberfb_mode], &par);
+   fbhw->encode_var(&Cyber_fb_predefined[0], &par);
+
+   do_fb_set_var(&Cyber_fb_predefined[0], 1);
+   Cyber_fb_get_var(&fb_display[0].var, -1);
+   Cyber_fb_set_disp(-1);
+   do_install_cmap(0);
+
+   printk("%s frame buffer device, using %ldK of video memory\n",
+	  fb_info.modename, CyberSize>>10);
+   return(0);
+}
+
+
+static int Cyberfb_switch(int con)
+{
+   /* Do we have to save the colormap? */
+   if (fb_display[currcon].cmap.len)
+      do_fb_get_cmap(&fb_display[currcon].cmap, &fb_display[currcon].var, 1);
+
+   do_fb_set_var(&fb_display[con].var, 1);
+   currcon = con;
+   /* Install new colormap */
+   do_install_cmap(con);
+   return(0);
+}
+
+
+   /*
+    *    Update the `var' structure (called by fbcon.c)
+    *
+    *    This call looks only at yoffset and the FB_VMODE_YWRAP flag in `var'.
+    *    Since it's called by a kernel driver, no range checking is done.
+    */
+
+static int Cyberfb_updatevar(int con)
+{
+   return(0);
+}
+
+
+   /*
+    *    Blank the display.
+    */
+
+static void Cyberfb_blank(int blank)
+{
+   fbhw->blank(blank);
+}
+
+
+   /*
+    *    Set the colormap
+    */
+
+static int Cyberfb_setcmap(struct fb_cmap *cmap, int con)
+{
+   return(Cyber_fb_set_cmap(cmap, 1, con));
+}
+
+
+   /*
+    *    Get a Video Mode
+    */
+
+static int get_video_mode(const char *name)
+{
+   int i;
+
+   for (i = 1; i < NUM_PREDEF_MODES; i++)
+      if (!strcmp(name, Cyber_fb_modenames[i]))
+         return(i);
+   return(0);
+}
+
+
+#ifdef MODULE
+int init_module(void)
+{
+    return(Cyber_fb_init(NULL));
+}
+
+void cleanup_module(void)
+{
+#if 0
+    /* Not yet supported */
+    unregister_framebuffer(&fb_info);
+#endif
+}
+#endif /* MODULE */
+
+
+    /*
+     *  Visible symbols for modules
+     */
+
+EXPORT_SYMBOL(Cyber_BitBLT);
+EXPORT_SYMBOL(Cyber_RectFill);
+EXPORT_SYMBOL(Cyber_WaitBlit);
--- linux-2.1.42/drivers/video/retz3fb.h.orig	Mon Jun  9 23:02:57 1997
+++ linux-2.1.42/drivers/video/retz3fb.h	Mon Jun  9 23:02:57 1997
@@ -0,0 +1,286 @@
+/*
+ * Linux/drivers/video/retz3fb.h -- Defines and macros for the RetinaZ3 frame
+ *				    buffer device
+ *
+ *    Copyright (C) 1997 Jes Sorensen
+ *
+ * History:
+ *   - 22 Jan 97: Initial work
+ *
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file COPYING in the main directory of this archive
+ * for more details.
+ */
+
+/*
+ * Macros to read and write to registers.
+ */
+#define reg_w(reg,dat) (*(z3_regs + reg) = dat)
+#define reg_r(reg) (*(z3_regs + reg))
+
+/*
+ * Macro to access the sequencer.
+ */
+#define seq_w(sreg,sdat) \
+	do{ reg_w(SEQ_IDX, sreg); reg_w(SEQ_DATA, sdat); } while(0)
+
+/*
+ * Macro to access the CRT controller.
+ */
+#define crt_w(creg,cdat) \
+	do{ reg_w(CRT_IDX, creg); reg_w(CRT_DATA, cdat); } while(0)
+
+/*
+ * Macro to access the graphics controller.
+ */
+#define gfx_w(greg,gdat) \
+	do{ reg_w(GFX_IDX, greg); reg_w(GFX_DATA, gdat); } while(0)
+
+/*
+ * Macro to access the attribute controller.
+ */
+#define attr_w(areg,adat) \
+	do{ reg_w(ACT_IDX, areg); reg_w(ACT_DATA, adat); } while(0)
+
+/*
+ * Macro to access the pll.
+ */
+#define pll_w(preg,pdat) \
+	do{ reg_w(PLL_IDX, preg); \
+	    reg_w(PLL_DATA, (pdat & 0xff)); \
+	    reg_w(PLL_DATA, (pdat >> 8));\
+	} while(0)
+
+/*
+ * Offsets
+ */
+#define VIDEO_MEM_OFFSET	0x00c00000
+#define ACM_OFFSET		0x00b00000
+
+/*
+ * Accelerator Control Menu
+ */
+#define ACM_PRIMARY_OFFSET	0x00
+#define ACM_SECONDARY_OFFSET	0x04
+#define ACM_MODE_CONTROL	0x08
+#define ACM_CURSOR_POSITION	0x0c
+#define ACM_START_STATUS	0x30
+#define ACM_CONTROL		0x34
+#define ACM_RASTEROP_ROTATION	0x38
+#define ACM_BITMAP_DIMENSION	0x3c
+#define ACM_DESTINATION		0x40
+#define ACM_SOURCE		0x44
+#define ACM_PATTERN		0x48
+#define ACM_FOREGROUND		0x4c
+#define ACM_BACKGROUND		0x50
+
+/*
+ * Video DAC addresses
+ */
+#define VDAC_ADDRESS		0x03c8
+#define VDAC_ADDRESS_W		0x03c8
+#define VDAC_ADDRESS_R		0x03c7
+#define VDAC_STATE		0x03c7
+#define VDAC_DATA		0x03c9
+#define VDAC_MASK		0x03c6
+
+/*
+ * Sequencer
+ */
+#define SEQ_IDX			0x03c4	/* Sequencer Index */
+#define SEQ_DATA		0x03c5
+#define SEQ_RESET		0x00
+#define SEQ_CLOCKING_MODE	0x01
+#define SEQ_MAP_MASK		0x02
+#define SEQ_CHAR_MAP_SELECT	0x03
+#define SEQ_MEMORY_MODE		0x04
+#define SEQ_EXTENDED_ENABLE	0x05	/* NCR extensions */
+#define SEQ_UNKNOWN1         	0x06
+#define SEQ_UNKNOWN2         	0x07
+#define SEQ_CHIP_ID		0x08
+#define SEQ_UNKNOWN3         	0x09
+#define SEQ_CURSOR_COLOR1	0x0a
+#define SEQ_CURSOR_COLOR0	0x0b
+#define SEQ_CURSOR_CONTROL	0x0c
+#define SEQ_CURSOR_X_LOC_HI	0x0d
+#define SEQ_CURSOR_X_LOC_LO	0x0e
+#define SEQ_CURSOR_Y_LOC_HI	0x0f
+#define SEQ_CURSOR_Y_LOC_LO	0x10
+#define SEQ_CURSOR_X_INDEX	0x11
+#define SEQ_CURSOR_Y_INDEX	0x12
+#define SEQ_CURSOR_STORE_HI	0x13
+#define SEQ_CURSOR_STORE_LO	0x14
+#define SEQ_CURSOR_ST_OFF_HI	0x15
+#define SEQ_CURSOR_ST_OFF_LO	0x16
+#define SEQ_CURSOR_PIXELMASK	0x17
+#define SEQ_PRIM_HOST_OFF_HI	0x18
+#define SEQ_PRIM_HOST_OFF_LO	0x19
+#define SEQ_LINEAR_0		0x1a
+#define SEQ_LINEAR_1		0x1b
+#define SEQ_SEC_HOST_OFF_HI	0x1c
+#define SEQ_SEC_HOST_OFF_LO	0x1d
+#define SEQ_EXTENDED_MEM_ENA	0x1e
+#define SEQ_EXT_CLOCK_MODE	0x1f
+#define SEQ_EXT_VIDEO_ADDR	0x20
+#define SEQ_EXT_PIXEL_CNTL	0x21
+#define SEQ_BUS_WIDTH_FEEDB	0x22
+#define SEQ_PERF_SELECT		0x23
+#define SEQ_COLOR_EXP_WFG	0x24
+#define SEQ_COLOR_EXP_WBG	0x25
+#define SEQ_EXT_RW_CONTROL	0x26
+#define SEQ_MISC_FEATURE_SEL	0x27
+#define SEQ_COLOR_KEY_CNTL	0x28
+#define SEQ_COLOR_KEY_MATCH0	0x29
+#define SEQ_COLOR_KEY_MATCH1 	0x2a
+#define SEQ_COLOR_KEY_MATCH2 	0x2b
+#define SEQ_UNKNOWN6         	0x2c
+#define SEQ_CRC_CONTROL		0x2d
+#define SEQ_CRC_DATA_LOW	0x2e
+#define SEQ_CRC_DATA_HIGH	0x2f
+#define SEQ_MEMORY_MAP_CNTL	0x30
+#define SEQ_ACM_APERTURE_1	0x31
+#define SEQ_ACM_APERTURE_2	0x32
+#define SEQ_ACM_APERTURE_3	0x33
+#define SEQ_BIOS_UTILITY_0	0x3e
+#define SEQ_BIOS_UTILITY_1	0x3f
+
+/*
+ * Graphics Controller
+ */
+#define GFX_IDX			0x03ce
+#define GFX_DATA		0x03cf
+#define GFX_SET_RESET		0x00
+#define GFX_ENABLE_SET_RESET	0x01
+#define GFX_COLOR_COMPARE	0x02
+#define GFX_DATA_ROTATE		0x03
+#define GFX_READ_MAP_SELECT	0x04
+#define GFX_GRAPHICS_MODE	0x05
+#define GFX_MISC		0x06
+#define GFX_COLOR_XCARE		0x07
+#define GFX_BITMASK		0x08
+
+/*
+ * CRT Controller
+ */
+#define CRT_IDX			0x03d4
+#define CRT_DATA		0x03d5
+#define CRT_HOR_TOTAL		0x00
+#define CRT_HOR_DISP_ENA_END	0x01
+#define CRT_START_HOR_BLANK	0x02
+#define CRT_END_HOR_BLANK	0x03
+#define CRT_START_HOR_RETR	0x04
+#define CRT_END_HOR_RETR	0x05
+#define CRT_VER_TOTAL		0x06
+#define CRT_OVERFLOW		0x07
+#define CRT_PRESET_ROW_SCAN	0x08
+#define CRT_MAX_SCAN_LINE	0x09
+#define CRT_CURSOR_START	0x0a
+#define CRT_CURSOR_END		0x0b
+#define CRT_START_ADDR_HIGH	0x0c
+#define CRT_START_ADDR_LOW	0x0d
+#define CRT_CURSOR_LOC_HIGH	0x0e
+#define CRT_CURSOR_LOC_LOW	0x0f
+#define CRT_START_VER_RETR	0x10
+#define CRT_END_VER_RETR	0x11
+#define CRT_VER_DISP_ENA_END	0x12
+#define CRT_OFFSET		0x13
+#define CRT_UNDERLINE_LOC	0x14
+#define CRT_START_VER_BLANK	0x15
+#define CRT_END_VER_BLANK	0x16
+#define CRT_MODE_CONTROL	0x17
+#define CRT_LINE_COMPARE	0x18
+#define CRT_UNKNOWN1         	0x19
+#define CRT_UNKNOWN2         	0x1a
+#define CRT_UNKNOWN3         	0x1b
+#define CRT_UNKNOWN4         	0x1c
+#define CRT_UNKNOWN5         	0x1d
+#define CRT_UNKNOWN6         	0x1e
+#define CRT_UNKNOWN7         	0x1f
+#define CRT_UNKNOWN8         	0x20
+#define CRT_UNKNOWN9		0x21
+#define CRT_UNKNOWN10		0x22
+#define CRT_UNKNOWN11      	0x23
+#define CRT_UNKNOWN12      	0x24
+#define CRT_UNKNOWN13      	0x25
+#define CRT_UNKNOWN14      	0x26
+#define CRT_UNKNOWN15      	0x27
+#define CRT_UNKNOWN16      	0x28
+#define CRT_UNKNOWN17      	0x29
+#define CRT_UNKNOWN18      	0x2a
+#define CRT_UNKNOWN19      	0x2b
+#define CRT_UNKNOWN20      	0x2c
+#define CRT_UNKNOWN21      	0x2d
+#define CRT_UNKNOWN22      	0x2e
+#define CRT_UNKNOWN23      	0x2f
+#define CRT_EXT_HOR_TIMING1	0x30	/* NCR crt extensions */
+#define CRT_EXT_START_ADDR	0x31
+#define CRT_EXT_HOR_TIMING2	0x32
+#define CRT_EXT_VER_TIMING	0x33
+#define CRT_MONITOR_POWER	0x34
+
+/*
+ * General Registers
+ */
+#define GREG_STATUS0_R		0x03c2
+#define GREG_STATUS1_R		0x03da
+#define GREG_MISC_OUTPUT_R	0x03cc
+#define GREG_MISC_OUTPUT_W	0x03c2	
+#define GREG_FEATURE_CONTROL_R	0x03ca
+#define GREG_FEATURE_CONTROL_W	0x03da
+#define GREG_POS		0x0102
+
+/*
+ * Attribute Controller
+ */
+#define ACT_IDX			0x03C0
+#define ACT_ADDRESS_R		0x03C0
+#define ACT_DATA		0x03C0
+#define ACT_ADDRESS_RESET	0x03DA
+#define ACT_PALETTE0		0x00
+#define ACT_PALETTE1		0x01
+#define ACT_PALETTE2		0x02
+#define ACT_PALETTE3		0x03
+#define ACT_PALETTE4		0x04
+#define ACT_PALETTE5		0x05
+#define ACT_PALETTE6		0x06
+#define ACT_PALETTE7		0x07
+#define ACT_PALETTE8		0x08
+#define ACT_PALETTE9		0x09
+#define ACT_PALETTE10		0x0A
+#define ACT_PALETTE11		0x0B
+#define ACT_PALETTE12		0x0C
+#define ACT_PALETTE13		0x0D
+#define ACT_PALETTE14		0x0E
+#define ACT_PALETTE15		0x0F
+#define ACT_ATTR_MODE_CNTL	0x10
+#define ACT_OVERSCAN_COLOR	0x11
+#define ACT_COLOR_PLANE_ENA	0x12
+#define ACT_HOR_PEL_PANNING	0x13
+#define ACT_COLOR_SELECT	0x14
+
+/*
+ * PLL
+ */
+#define PLL_IDX			0x83c8
+#define PLL_DATA		0x83c9
+
+/*
+ * Blitter operations
+ */
+#define	Z3BLTclear		0x00	/* 0 */
+#define Z3BLTand		0x80	/* src AND dst */
+#define Z3BLTandReverse		0x40	/* src AND NOT dst */
+#define Z3BLTcopy		0xc0	/* src */
+#define Z3BLTandInverted	0x20	/* NOT src AND dst */
+#define	Z3BLTnoop		0xa0	/* dst */
+#define Z3BLTxor		0x60	/* src XOR dst */
+#define Z3BLTor			0xe0	/* src OR dst */
+#define Z3BLTnor		0x10	/* NOT src AND NOT dst */
+#define Z3BLTequiv		0x90	/* NOT src XOR dst */
+#define Z3BLTinvert		0x50	/* NOT dst */
+#define Z3BLTorReverse		0xd0	/* src OR NOT dst */
+#define Z3BLTcopyInverted	0x30	/* NOT src */
+#define Z3BLTorInverted		0xb0	/* NOT src OR dst */
+#define Z3BLTnand		0x70	/* NOT src OR NOT dst */
+#define Z3BLTset		0xf0	/* 1 */
--- linux-2.1.42/drivers/video/s3blit.h.orig	Mon Jun  9 23:02:57 1997
+++ linux-2.1.42/drivers/video/s3blit.h	Mon Jun  9 23:02:57 1997
@@ -0,0 +1,74 @@
+/* s3 commands */
+#define S3_BITBLT       0xc011
+#define S3_TWOPOINTLINE 0x2811
+#define S3_FILLEDRECT   0x40b1
+
+#define S3_FIFO_EMPTY 0x0400
+#define S3_HDW_BUSY   0x0200
+
+/* Enhanced register mapping (MMIO mode) */
+
+#define S3_READ_SEL      0xbee8 /* offset f */
+#define S3_MULT_MISC     0xbee8 /* offset e */
+#define S3_ERR_TERM      0x92e8
+#define S3_FRGD_COLOR    0xa6e8
+#define S3_BKGD_COLOR    0xa2e8
+#define S3_PIXEL_CNTL    0xbee8 /* offset a */
+#define S3_FRGD_MIX      0xbae8
+#define S3_BKGD_MIX      0xb6e8
+#define S3_CUR_Y         0x82e8
+#define S3_CUR_X         0x86e8
+#define S3_DESTY_AXSTP   0x8ae8
+#define S3_DESTX_DIASTP  0x8ee8
+#define S3_MIN_AXIS_PCNT 0xbee8 /* offset 0 */
+#define S3_MAJ_AXIS_PCNT 0x96e8
+#define S3_CMD           0x9ae8
+#define S3_GP_STAT       0x9ae8
+#define S3_ADVFUNC_CNTL  0x4ae8
+#define S3_WRT_MASK      0xaae8
+#define S3_RD_MASK       0xaee8
+
+/* Enhanced register mapping (Packed MMIO mode, write only) */
+#define S3_ALT_CURXY     0x8100
+#define S3_ALT_CURXY2    0x8104
+#define S3_ALT_STEP      0x8108
+#define S3_ALT_STEP2     0x810c
+#define S3_ALT_ERR       0x8110
+#define S3_ALT_CMD       0x8118
+#define S3_ALT_MIX       0x8134
+#define S3_ALT_PCNT      0x8148
+#define S3_ALT_PAT       0x8168
+
+/* Drawing modes */
+#define S3_NOTCUR          0x0000
+#define S3_LOGICALZERO     0x0001
+#define S3_LOGICALONE      0x0002
+#define S3_LEAVEASIS       0x0003
+#define S3_NOTNEW          0x0004
+#define S3_CURXORNEW       0x0005
+#define S3_NOT_CURXORNEW   0x0006
+#define S3_NEW             0x0007
+#define S3_NOTCURORNOTNEW  0x0008
+#define S3_CURORNOTNEW     0x0009
+#define S3_NOTCURORNEW     0x000a
+#define S3_CURORNEW        0x000b
+#define S3_CURANDNEW       0x000c
+#define S3_NOTCURANDNEW    0x000d
+#define S3_CURANDNOTNEW    0x000e
+#define S3_NOTCURANDNOTNEW 0x000f
+
+#define S3_CRTC_ADR    0x03d4
+#define S3_CRTC_DATA   0x03d5
+
+#define S3_REG_LOCK2 0x39
+#define S3_HGC_MODE  0x45
+
+#define S3_HWGC_ORGX_H 0x46
+#define S3_HWGC_ORGX_L 0x47
+#define S3_HWGC_ORGY_H 0x48
+#define S3_HWGC_ORGY_L 0x49
+#define S3_HWGC_DX     0x4e
+#define S3_HWGC_DY     0x4f
+
+
+#define S3_LAW_CTL 0x58
--- linux-2.1.42/drivers/video/atafb.h.orig	Mon Jun  9 23:02:57 1997
+++ linux-2.1.42/drivers/video/atafb.h	Mon Jun  9 23:02:57 1997
@@ -0,0 +1,48 @@
+#include <linux/fb.h>
+#include <linux/console.h>
+
+
+struct display
+{
+    int bytes_per_row;		/* offset to one line below */
+
+    int cursor_x;		/* current cursor position */
+    int cursor_y;
+
+    int fgcol;			/* text colors */
+    int bgcol;
+
+    struct fb_var_screeninfo var;	/* variable infos */
+    struct fb_cmap	cmap;		/* colormap */
+  
+    /* the following three are copies from fb_fix_screeninfo */
+    int visual;
+    int type;
+    int type_aux;
+
+    u_char *bitplane;	        /* pointer to top of physical screen */
+
+    u_char *screen_base;	/* pointer to top of virtual screen */    
+
+    u_char *fontdata;           /* Font associated to this display */
+    int fontheight;
+    int fontwidth;
+
+    int inverse;		/* != 0 text black on white as default */
+    struct vc_data *conp;	/* pointer to console data */
+    struct display_switch *dispsw; /* pointers to depth specific functions */
+}; 
+
+struct fb_info
+{
+    char modename[40];		/* name of the at boottime detected video mode */
+    struct display *disp;	/* pointer to display variables */
+    int (*changevar)(int);	/* tell the console var has changed */
+    int (*switch_con)(int);	/* tell the framebuffer to switch consoles */
+    int (*updatevar)(int);	/* tell the framebuffer to update the vars */
+    void (*blank)(int);		/* tell the framebuffer to (un)blank the screen */
+};
+
+struct fb_info *atafb_init(long *);
+
+
--- linux-2.1.42/drivers/video/Config.in.orig	Mon Jun  9 23:02:57 1997
+++ linux-2.1.42/drivers/video/Config.in	Mon Jun  9 23:02:57 1997
@@ -0,0 +1,63 @@
+#
+# Video configuration
+#
+
+if [ "$CONFIG_FB" = "y" ]; then
+  if [ "$CONFIG_AMIGA" = "y" ]; then
+    bool 'Amiga native chipset support' CONFIG_FB_AMIGA
+    if [ "$CONFIG_FB_AMIGA" != "n" ]; then
+      bool 'Amiga OCS chipset support' CONFIG_FB_AMIGA_OCS
+      bool 'Amiga ECS chipset support' CONFIG_FB_AMIGA_ECS
+      bool 'Amiga AGA chipset support' CONFIG_FB_AMIGA_AGA
+    fi
+    tristate 'Amiga Cybervision support' CONFIG_FB_CYBER
+    if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
+      tristate 'Amiga RetinaZ3 support' CONFIG_FB_RETINAZ3
+    fi
+  fi
+  if [ "$CONFIG_ATARI" = "y" ]; then
+    bool 'Atari native chipset support' CONFIG_FB_ATARI
+  fi 
+  tristate 'Virtual Frame Buffer support' CONFIG_FB_VIRTUAL
+
+  bool 'Advanced low level driver options' CONFIG_FBCON_ADVANCED
+  if [ "$CONFIG_FBCON_ADVANCED" = "y" ]; then
+    tristate 'Monochrome support' CONFIG_FBCON_MFB
+    tristate 'Interleaved bitplanes support' CONFIG_FBCON_ILBM
+    tristate 'Normal bitplanes support' CONFIG_FBCON_AFB
+    tristate 'Atari interleaved bitplanes (2 planes) support' CONFIG_FBCON_IPLAN2P2
+    tristate 'Atari interleaved bitplanes (4 planes) support' CONFIG_FBCON_IPLAN2P4
+    tristate 'Atari interleaved bitplanes (8 planes) support' CONFIG_FBCON_IPLAN2P8
+    tristate '8 bpp packed pixel support' CONFIG_FBCON_CFB8
+    tristate '16 bpp packed pixel support' CONFIG_FBCON_CFB16
+    tristate 'Cybervision support (accelerated)' CONFIG_FBCON_CYBER
+    tristate 'RetinaZ3 support (accelerated)' CONFIG_FBCON_RETINAZ3
+  else
+    if [ "$CONFIG_FB_AMIGA" != "n" -o "$CONFIG_FB_ATARI" != "n" -o \
+	 "$CONFIG_FB_CYBER" != "n" -o "$CONFIG_FB_RETINAZ3" != "n" -o \
+	 "$CONFIG_FB_VIRTUAL" != "n" ]; then
+      define_bool CONFIG_FBCON_MFB y
+    fi
+    if [ "$CONFIG_FB_AMIGA" != "n" ]; then
+      define_bool CONFIG_FBCON_ILBM y
+      define_bool CONFIG_FBCON_AFB y
+    fi
+    if [ "$CONFIG_FB_ATARI" != "n" ]; then
+      define_bool CONFIG_FBCON_IPLAN2P2 y
+      define_bool CONFIG_FBCON_IPLAN2P4 y
+      define_bool CONFIG_FBCON_IPLAN2P8 y
+    fi
+    if [ "$CONFIG_FB_ATARI" != "n" -o "$CONFIG_FB_VIRTUAL" != "n" ]; then
+      define_bool CONFIG_FBCON_CFB8 y
+      define_bool CONFIG_FBCON_CFB16 y
+    fi
+    if [ "$CONFIG_FB_CYBER" != "n" ]; then
+      define_bool CONFIG_FBCON_CYBER y
+    fi
+    if [ "$CONFIG_FB_RETINAZ3" != "n" ]; then
+      define_bool CONFIG_FBCON_RETINAZ3 y
+    fi
+  fi
+fi
+
+endmenu
--- linux-2.1.42/drivers/video/Makefile.orig	Mon Jun  9 23:02:57 1997
+++ linux-2.1.42/drivers/video/Makefile	Mon Jun  9 23:02:57 1997
@@ -0,0 +1,144 @@
+#
+# Makefile for the kernel video drivers.
+#
+# Note! Dependencies are done automagically by 'make dep', which also
+# removes any old dependencies. DON'T put your own dependencies here
+# unless it's something special (ie not a .c file).
+#
+# Note 2! The CFLAGS definitions are now inherited from the
+# parent makes..
+#
+
+L_TARGET := video.a
+L_OBJS   := fonts.o font_8x8.o font_8x16.o pearl_8x8.o
+M_OBJS   :=
+MOD_LIST_NAME := VIDEO_MODULES
+LX_OBJS  := fbcon.o
+MX_OBJS  :=
+
+# Frame buffer devices
+
+ifeq ($(CONFIG_FB_AMIGA),y)
+L_OBJS += amifb.o
+else
+  ifeq ($(CONFIG_FB_AMIGA),m)
+  M_OBJS += amifb.o
+  endif
+endif
+
+ifeq ($(CONFIG_FB_ATARI),y)
+L_OBJS += atafb.o
+else
+  ifeq ($(CONFIG_FB_ATARI),m)
+  M_OBJS += atafb.o
+  endif
+endif
+
+ifeq ($(CONFIG_FB_CYBER),y)
+LX_OBJS += cyberfb.o
+else
+  ifeq ($(CONFIG_FB_CYBER),m)
+  MX_OBJS += cyberfb.o
+  endif
+endif
+
+ifeq ($(CONFIG_FB_RETINAZ3),y)
+LX_OBJS += retz3fb.o
+else
+  ifeq ($(CONFIG_FB_RETINAZ3),m)
+  MX_OBJS += retz3fb.o
+  endif
+endif
+
+ifeq ($(CONFIG_FB_VIRTUAL),y)
+L_OBJS += vfb.o
+else
+  ifeq ($(CONFIG_FB_VIRTUAL),m)
+  M_OBJS += vfb.o
+  endif
+endif
+
+# Low level drivers
+
+ifeq ($(CONFIG_FBCON_AFB),y)
+L_OBJS += fbcon-afb.o
+else
+  ifeq ($(CONFIG_FBCON_AFB),m)
+  M_OBJS += fbcon-afb.o
+  endif
+endif
+
+ifeq ($(CONFIG_FBCON_CFB8),y)
+L_OBJS += fbcon-cfb8.o
+else
+  ifeq ($(CONFIG_FBCON_CFB8),m)
+  M_OBJS += fbcon-cfb8.o
+  endif
+endif
+
+ifeq ($(CONFIG_FBCON_CFB16),y)
+LX_OBJS += fbcon-cfb16.o
+else
+  ifeq ($(CONFIG_FBCON_CFB16),m)
+  MX_OBJS += fbcon-cfb16.o
+  endif
+endif
+
+ifeq ($(CONFIG_FBCON_ILBM),y)
+L_OBJS += fbcon-ilbm.o
+else
+  ifeq ($(CONFIG_FBCON_ILBM),m)
+  M_OBJS += fbcon-ilbm.o
+  endif
+endif
+
+ifeq ($(CONFIG_FBCON_IPLAN2P2),y)
+L_OBJS += fbcon-iplan2p2.o
+else
+  ifeq ($(CONFIG_FBCON_IPLAN2P2),m)
+  M_OBJS += fbcon-iplan2p2.o
+  endif
+endif
+
+ifeq ($(CONFIG_FBCON_IPLAN2P4),y)
+L_OBJS += fbcon-iplan2p4.o
+else
+  ifeq ($(CONFIG_FBCON_IPLAN2P4),m)
+  M_OBJS += fbcon-iplan2p4.o
+  endif
+endif
+
+ifeq ($(CONFIG_FBCON_IPLAN2P8),y)
+L_OBJS += fbcon-iplan2p8.o
+else
+  ifeq ($(CONFIG_FBCON_IPLAN2P8),m)
+  M_OBJS += fbcon-iplan2p8.o
+  endif
+endif
+
+ifeq ($(CONFIG_FBCON_MFB),y)
+L_OBJS += fbcon-mfb.o
+else
+  ifeq ($(CONFIG_FBCON_MFB),m)
+  M_OBJS += fbcon-mfb.o
+  endif
+endif
+
+ifeq ($(CONFIG_FBCON_CYBER),y)
+L_OBJS += fbcon-cyber.o
+else
+  ifeq ($(CONFIG_FBCON_CYBER),m)
+  M_OBJS += fbcon-cyber.o
+  endif
+endif
+
+ifeq ($(CONFIG_FBCON_RETINAZ3),y)
+L_OBJS += fbcon-retz3.o
+else
+  ifeq ($(CONFIG_FBCON_RETINAZ3),m)
+  M_OBJS += fbcon-retz3.o
+  endif
+endif
+
+include $(TOPDIR)/Rules.make
+
--- linux-2.1.42/drivers/video/fbcon-afb.c.orig	Mon Jun  9 23:02:57 1997
+++ linux-2.1.42/drivers/video/fbcon-afb.c	Mon Jun  9 23:02:57 1997
@@ -0,0 +1,305 @@
+/*
+ *  linux/drivers/video/afb.c -- Low level frame buffer operations for
+ *				 bitplanes  la Amiga
+ *
+ *	Created 5 Apr 1997 by Geert Uytterhoeven
+ *
+ *  This file is subject to the terms and conditions of the GNU General Public
+ *  License.  See the file COPYING in the main directory of this archive for
+ *  more details.
+ */
+
+#include <linux/module.h>
+#include <linux/tty.h>
+#include <linux/console.h>
+#include <linux/string.h>
+#include <linux/config.h>
+#include <linux/fb.h>
+
+#include "fbcon.h"
+#include "../char/console_struct.h"
+
+
+    /*
+     *  Prototypes
+     */
+
+static int open_afb(struct display *p);
+static void release_afb(void);
+static void bmove_afb(struct display *p, int sy, int sx, int dy, int dx,
+	              int height, int width);
+static void clear_afb(struct vc_data *conp, struct display *p, int sy, int sx,
+	              int height, int width);
+static void putc_afb(struct vc_data *conp, struct display *p, int c, int yy,
+	             int xx);
+static void putcs_afb(struct vc_data *conp, struct display *p, const char *s,
+	              int count, int yy, int xx);
+static void rev_char_afb(struct display *p, int xx, int yy);
+
+
+    /*
+     *  `switch' for the low level operations
+     */
+
+static struct display_switch dispsw_afb = {
+    open_afb, release_afb, bmove_afb, clear_afb, putc_afb, putcs_afb,
+    rev_char_afb
+};
+
+    /*
+     *  Bitplanes  la Amiga
+     */
+
+static int open_afb(struct display *p)
+{
+    if (p->type != FB_TYPE_PLANES)
+	return -EINVAL;
+
+    if (p->line_length)
+	p->next_line = p->line_length;
+    else
+	p->next_line = p->var.xres_virtual>>3;
+    p->next_plane = p->var.yres_virtual*p->next_line;
+    MOD_INC_USE_COUNT;
+    return 0;
+}
+
+static void release_afb(void)
+{
+    MOD_DEC_USE_COUNT;
+}
+
+static void bmove_afb(struct display *p, int sy, int sx, int dy, int dx,
+	              int height, int width)
+{
+    u_char *src, *dest, *src0, *dest0;
+    u_int i, rows;
+
+    if (sx == 0 && dx == 0 && width == p->next_line) {
+	src = p->screen_base+sy*p->fontheight*width;
+	dest = p->screen_base+dy*p->fontheight*width;
+	for (i = p->var.bits_per_pixel; i--;) {
+	    mymemmove(dest, src, height*p->fontheight*width);
+	    src += p->next_plane;
+	    dest += p->next_plane;
+	}
+    } else if (dy <= sy) {
+	src0 = p->screen_base+sy*p->fontheight*p->next_line+sx;
+	dest0 = p->screen_base+dy*p->fontheight*p->next_line+dx;
+	for (i = p->var.bits_per_pixel; i--;) {
+	    src = src0;
+	    dest = dest0;
+	    for (rows = height*p->fontheight; rows--;) {
+	        mymemmove(dest, src, width);
+	        src += p->next_line;
+	        dest += p->next_line;
+	    }
+	    src0 += p->next_plane;
+	    dest0 += p->next_plane;
+	}
+    } else {
+	src0 = p->screen_base+(sy+height)*p->fontheight*p->next_line+sx;
+	dest0 = p->screen_base+(dy+height)*p->fontheight*p->next_line+dx;
+	for (i = p->var.bits_per_pixel; i--;) {
+	    src = src0;
+	    dest = dest0;
+	    for (rows = height*p->fontheight; rows--;) {
+	        src -= p->next_line;
+	        dest -= p->next_line;
+	        mymemmove(dest, src, width);
+	    }
+	    src0 += p->next_plane;
+	    dest0 += p->next_plane;
+	}
+    }
+}
+
+static void clear_afb(struct vc_data *conp, struct display *p, int sy, int sx,
+	              int height, int width)
+{
+    u_char *dest, *dest0;
+    u_int i, rows;
+    int bg;
+
+    dest0 = p->screen_base+sy*p->fontheight*p->next_line+sx;
+
+    bg = attr_bgcol_ec(p,conp);
+    for (i = p->var.bits_per_pixel; i--; dest0 += p->next_plane) {
+	dest = dest0;
+	for (rows = height*p->fontheight; rows--; dest += p->next_line)
+	    if (bg & 1)
+	        mymemset(dest, width);
+	    else
+	        mymemclear(dest, width);
+	bg >>= 1;
+    }
+}
+
+static void putc_afb(struct vc_data *conp, struct display *p, int c, int yy,
+	             int xx)
+{
+    u_char *dest, *dest0, *cdat, *cdat0;
+    u_int rows, i;
+    u_char d;
+    int fg, bg;
+
+    c &= 0xff;
+
+    dest0 = p->screen_base+yy*p->fontheight*p->next_line+xx;
+    cdat0 = p->fontdata+c*p->fontheight;
+    fg = attr_fgcol(p,conp);
+    bg = attr_bgcol(p,conp);
+
+    for (i = p->var.bits_per_pixel; i--; dest0 += p->next_plane) {
+	dest = dest0;
+	cdat = cdat0;
+	for (rows = p->fontheight; rows--; dest += p->next_line) {
+	    d = *cdat++;
+	    if (bg & 1)
+	        if (fg & 1)
+	            *dest = 0xff;
+	        else
+	            *dest = ~d;
+	    else
+	        if (fg & 1)
+	            *dest = d;
+	        else
+	            *dest = 0x00;
+	}
+	bg >>= 1;
+	fg >>= 1;
+    }
+}
+
+    /*
+     *  I've split the console character loop in two parts
+     *  (cfr. fbcon_putcs_ilbm())
+     */
+
+static void putcs_afb(struct vc_data *conp, struct display *p, const char *s,
+	              int count, int yy, int xx)
+{
+    u_char *dest, *dest0, *dest1;
+    u_char *cdat1, *cdat2, *cdat3, *cdat4, *cdat10, *cdat20, *cdat30, *cdat40;
+    u_int rows, i;
+    u_char c1, c2, c3, c4;
+    u_long d;
+    int fg0, bg0, fg, bg;
+
+    dest0 = p->screen_base+yy*p->fontheight*p->next_line+xx;
+    fg0 = attr_fgcol(p,conp);
+    bg0 = attr_bgcol(p,conp);
+
+    while (count--)
+	if (xx&3 || count < 3) {	/* Slow version */
+	    c1 = *s++;
+	    dest1 = dest0++;
+	    xx++;
+
+	    cdat10 = p->fontdata+c1*p->fontheight;
+	    fg = fg0;
+	    bg = bg0;
+
+	    for (i = p->var.bits_per_pixel; i--; dest1 += p->next_plane) {
+	        dest = dest1;
+	        cdat1 = cdat10;
+	        for (rows = p->fontheight; rows--; dest += p->next_line) {
+	            d = *cdat1++;
+	            if (bg & 1)
+	                if (fg & 1)
+	                    *dest = 0xff;
+	                else
+	                    *dest = ~d;
+	            else
+	                if (fg & 1)
+	                    *dest = d;
+	                else
+	                    *dest = 0x00;
+	        }
+	        bg >>= 1;
+	        fg >>= 1;
+	    }
+	} else {	/* Fast version */
+	    c1 = s[0];
+	    c2 = s[1];
+	    c3 = s[2];
+	    c4 = s[3];
+
+	    dest1 = dest0;
+	    cdat10 = p->fontdata+c1*p->fontheight;
+	    cdat20 = p->fontdata+c2*p->fontheight;
+	    cdat30 = p->fontdata+c3*p->fontheight;
+	    cdat40 = p->fontdata+c4*p->fontheight;
+	    fg = fg0;
+	    bg = bg0;
+
+	    for (i = p->var.bits_per_pixel; i--; dest1 += p->next_plane) {
+	        dest = dest1;
+	        cdat1 = cdat10;
+	        cdat2 = cdat20;
+	        cdat3 = cdat30;
+	        cdat4 = cdat40;
+	        for (rows = p->fontheight; rows--; dest += p->next_line) {
+	            d = *cdat1++<<24 | *cdat2++<<16 | *cdat3++<<8 | *cdat4++;
+	            if (bg & 1)
+	                if (fg & 1)
+	                    *(u_long *)dest = 0xffffffff;
+	                else
+	                    *(u_long *)dest = ~d;
+	            else
+	                if (fg & 1)
+	                    *(u_long *)dest = d;
+	                else
+	                    *(u_long *)dest = 0x00000000;
+	        }
+	        bg >>= 1;
+	        fg >>= 1;
+	    }
+	    s += 4;
+	    dest0 += 4;
+	    xx += 4;
+	    count -= 3;
+	}
+}
+
+static void rev_char_afb(struct display *p, int xx, int yy)
+{
+    u_char *dest, *dest0;
+    u_int rows, i;
+    int mask;
+
+    dest0 = p->screen_base+yy*p->fontheight*p->next_line+xx;
+    mask = p->fgcol ^ p->bgcol;
+
+    /*
+     *  This should really obey the individual character's
+     *  background and foreground colors instead of simply
+     *  inverting.
+     */
+
+    for (i = p->var.bits_per_pixel; i--; dest0 += p->next_plane) {
+	if (mask & 1) {
+	    dest = dest0;
+	    for (rows = p->fontheight; rows--; dest += p->next_line)
+	        *dest = ~*dest;
+	}
+	mask >>= 1;
+    }
+}
+
+
+#ifdef MODULE
+int init_module(void)
+#else
+int fbcon_init_afb(void)
+#endif
+{
+    return(fbcon_register_driver(&dispsw_afb, 0));
+}
+
+#ifdef MODULE
+void cleanup_module(void)
+{
+    fbcon_unregister_driver(&dispsw_afb);
+}
+#endif /* MODULE */
--- linux-2.1.42/drivers/video/fbcon-cfb16.c.orig	Mon Jun  9 23:02:57 1997
+++ linux-2.1.42/drivers/video/fbcon-cfb16.c	Mon Jun  9 23:02:57 1997
@@ -0,0 +1,234 @@
+/*
+ *  linux/drivers/video/cfb16.c -- Low level frame buffer operations for 16 bpp
+ *				   packed pixels
+ *
+ *	Created 5 Apr 1997 by Geert Uytterhoeven
+ *
+ *  This file is subject to the terms and conditions of the GNU General Public
+ *  License.  See the file COPYING in the main directory of this archive for
+ *  more details.
+ */
+
+#include <linux/module.h>
+#include <linux/tty.h>
+#include <linux/console.h>
+#include <linux/string.h>
+#include <linux/config.h>
+#include <linux/fb.h>
+
+#include "fbcon.h"
+#include "../char/console_struct.h"
+
+
+    /*
+     *  Prototypes
+     */
+
+static int open_cfb16(struct display *p);
+static void release_cfb16(void);
+static void bmove_cfb16(struct display *p, int sy, int sx, int dy, int dx,
+			int height, int width);
+static void clear_cfb16(struct vc_data *conp, struct display *p, int sy,
+			int sx, int height, int width);
+static void putc_cfb16(struct vc_data *conp, struct display *p, int c,
+		       int yy, int xx);
+static void putcs_cfb16(struct vc_data *conp, struct display *p,
+			const char *s, int count, int yy, int xx);
+static void rev_char_cfb16(struct display *p, int xx, int yy);
+
+
+    /*
+     *  `switch' for the low level operations
+     */
+
+static struct display_switch dispsw_cfb16 = {
+    open_cfb16, release_cfb16, bmove_cfb16, clear_cfb16, putc_cfb16,
+    putcs_cfb16, rev_char_cfb16
+};
+
+
+    /*
+     *  16 bpp packed pixels
+     */
+
+u_short packed16_cmap[16];
+
+static u_long tab_cfb16[] = {
+    0x00000000,0x0000ffff,0xffff0000,0xffffffff
+};
+
+static int open_cfb16(struct display *p)
+{
+    if (p->type != FB_TYPE_PACKED_PIXELS || p->var.bits_per_pixel != 16)
+	return -EINVAL;
+
+    p->next_line = p->var.xres_virtual<<1;
+    p->next_plane = 0;
+    MOD_INC_USE_COUNT;
+    return 0;
+}
+
+static void release_cfb16(void)
+{
+    MOD_DEC_USE_COUNT;
+}
+
+static void bmove_cfb16(struct display *p, int sy, int sx, int dy, int dx,
+			int height, int width)
+{
+    int bytes = p->next_line, linesize = bytes * p->fontheight, rows;
+    u_char *src,*dst;
+
+    if (sx == 0 && dx == 0 && width * 16 == bytes)
+	mymemmove(p->screen_base + dy * linesize,
+		  p->screen_base + sy * linesize,
+		  height * linesize);
+    else if (dy < sy || (dy == sy && dx < sx)) {
+	src = p->screen_base + sy * linesize + sx * 16;
+	dst = p->screen_base + dy * linesize + dx * 16;
+	for (rows = height * p->fontheight ; rows-- ;) {
+	    mymemmove(dst, src, width * 16);
+	    src += bytes;
+	    dst += bytes;
+	}
+    } else {
+	src = p->screen_base + (sy+height) * linesize + sx * 16 - bytes;
+	dst = p->screen_base + (dy+height) * linesize + dx * 16 - bytes;
+	for (rows = height * p->fontheight ; rows-- ;) {
+	    mymemmove(dst, src, width * 16);
+	    src -= bytes;
+	    dst -= bytes;
+	}
+    }
+}
+
+static void clear_cfb16(struct vc_data *conp, struct display *p, int sy,
+			int sx, int height, int width)
+{
+    u_char *dest0,*dest;
+    int bytes=p->next_line,lines=height * p->fontheight, rows, i;
+    u_long bgx;
+
+    dest = p->screen_base + sy * p->fontheight * bytes + sx * 16;
+
+    bgx = attr_bgcol_ec(p,conp);
+    bgx = packed16_cmap[bgx];
+    bgx |= (bgx << 16);
+
+    if (sx == 0 && width * 16 == bytes)
+	for (i = 0 ; i < lines * width ; i++) {
+	    ((u_long *)dest)[0]=bgx;
+	    ((u_long *)dest)[1]=bgx;
+	    ((u_long *)dest)[2]=bgx;
+	    ((u_long *)dest)[3]=bgx;
+	    dest+=16;
+	}
+    else {
+	dest0=dest;
+	for (rows = lines; rows-- ; dest0 += bytes) {
+	    dest=dest0;
+	    for (i = 0 ; i < width ; i++) {
+		((u_long *)dest)[0]=bgx;
+		((u_long *)dest)[1]=bgx;
+		((u_long *)dest)[2]=bgx;
+		((u_long *)dest)[3]=bgx;
+		dest+=16;
+	    }
+	}
+    }
+}
+
+static void putc_cfb16(struct vc_data *conp, struct display *p, int c, int yy,
+		       int xx)
+{
+    u_char *dest,*cdat;
+    int bytes=p->next_line,rows;
+    ulong eorx,fgx,bgx;
+
+    c &= 0xff;
+
+    dest = p->screen_base + yy * p->fontheight * bytes + xx * 16;
+    cdat = p->fontdata + c * p->fontheight;
+
+    fgx = attr_fgcol(p,conp);
+    fgx = packed16_cmap[fgx];
+    bgx = attr_bgcol(p,conp);
+    bgx = packed16_cmap[bgx];
+    fgx |= (fgx << 16);
+    bgx |= (bgx << 16);
+    eorx = fgx ^ bgx;
+
+    for (rows = p->fontheight ; rows-- ; dest += bytes) {
+	((u_long *)dest)[0]= (tab_cfb16[*cdat >> 6] & eorx) ^ bgx;
+	((u_long *)dest)[1]= (tab_cfb16[*cdat >> 4 & 0x3] & eorx) ^ bgx;
+	((u_long *)dest)[2]= (tab_cfb16[*cdat >> 2 & 0x3] & eorx) ^ bgx;
+	((u_long *)dest)[3]= (tab_cfb16[*cdat++ & 0x3] & eorx) ^ bgx;
+    }
+}
+
+static void putcs_cfb16(struct vc_data *conp, struct display *p, const char *s,
+			int count, int yy, int xx)
+{
+    u_char *cdat, c, *dest, *dest0;
+    int rows,bytes=p->next_line;
+    u_long eorx, fgx, bgx;
+
+    dest0 = p->screen_base + yy * p->fontheight * bytes + xx * 16;
+    fgx = attr_fgcol(p,conp);
+    fgx = packed16_cmap[fgx];
+    bgx = attr_bgcol(p,conp);
+    bgx = packed16_cmap[bgx];
+    fgx |= (fgx << 16);
+    bgx |= (bgx << 16);
+    eorx = fgx ^ bgx;
+    while (count--) {
+	c = *s++;
+	cdat = p->fontdata + c * p->fontheight;
+
+	for (rows = p->fontheight, dest = dest0; rows-- ; dest += bytes) {
+	    ((u_long *)dest)[0]= (tab_cfb16[*cdat >> 6] & eorx) ^ bgx;
+	    ((u_long *)dest)[1]= (tab_cfb16[*cdat >> 4 & 0x3] & eorx) ^ bgx;
+	    ((u_long *)dest)[2]= (tab_cfb16[*cdat >> 2 & 0x3] & eorx) ^ bgx;
+	    ((u_long *)dest)[3]= (tab_cfb16[*cdat++ & 0x3] & eorx) ^ bgx;
+	}
+	dest0+=16;
+    }
+}
+
+static void rev_char_cfb16(struct display *p, int xx, int yy)
+{
+    u_char *dest;
+    int bytes=p->next_line, rows;
+
+    dest = p->screen_base + yy * p->fontheight * bytes + xx * 16;
+    for (rows = p->fontheight ; rows-- ; dest += bytes) {
+	((u_long *)dest)[0] ^= 0xffffffff;
+	((u_long *)dest)[1] ^= 0xffffffff;
+	((u_long *)dest)[2] ^= 0xffffffff;
+	((u_long *)dest)[3] ^= 0xffffffff;
+    }
+}
+
+
+#ifdef MODULE
+int init_module(void)
+#else
+int fbcon_init_cfb16(void)
+#endif
+{
+    return(fbcon_register_driver(&dispsw_cfb16, 0));
+}
+
+#ifdef MODULE
+void cleanup_module(void)
+{
+    fbcon_unregister_driver(&dispsw_cfb16);
+}
+#endif /* MODULE */
+
+
+    /*
+     *  Visible symbols for modules
+     */
+
+EXPORT_SYMBOL(packed16_cmap);
--- linux-2.1.42/drivers/video/fbcon.c.orig	Mon Jun  9 23:02:57 1997
+++ linux-2.1.42/drivers/video/fbcon.c	Thu Jun 12 23:28:12 1997
@@ -0,0 +1,1143 @@
+/*
+ *  linux/drivers/video/fbcon.c -- Low level frame buffer based console driver
+ *
+ *	Copyright (C) 1995 Geert Uytterhoeven
+ *
+ *
+ *  This file is based on the original Amiga console driver (amicon.c):
+ *
+ *	Copyright (C) 1993 Hamish Macdonald
+ *			   Greg Harp
+ *	Copyright (C) 1994 David Carter [carter@compsci.bristol.ac.uk]
+ *
+ *	      with work by William Rucklidge (wjr@cs.cornell.edu)
+ *			   Geert Uytterhoeven
+ *			   Jes Sorensen (jds@kom.auc.dk)
+ *			   Martin Apel
+ *
+ *  and on the original Atari console driver (atacon.c):
+ *
+ *	Copyright (C) 1993 Bjoern Brauel
+ *			   Roman Hodek
+ *
+ *	      with work by Guenther Kelleter
+ *			   Martin Schaller
+ *			   Andreas Schwab
+ *
+ *
+ *  The low level operations for the various display memory organizations are
+ *  now in separate source files.
+ *
+ *  Currently only the following organizations are supported:
+ *
+ *    - non-accelerated:
+ *
+ *	  o mfb		 Monochrome
+ *	  o ilbm	 Interleaved bitplanes  la Amiga
+ *	  o afb		 Bitplanes  la Amiga
+ *	  o iplan2p[248] Interleaved bitplanes  la Atari (2, 4 and 8 planes)
+ *	  o cfb{8,16}    Packed pixels (8 and 16 bpp)
+ *
+ *    - accelerated:
+ *
+ *	  o cyber	 CyberVision64 packed pixels (accelerated)
+ *	  o retz3	 Retina Z3 packed pixels (accelerated)
+ *
+ *  To do:
+ *
+ *    - Get rid of the m68k specific inline assembler
+ *    - Implement 16 plane mode (iplan2p16)
+ *    - Add support for 24/32 bit packed pixels (cfb{24,32})
+ *    - Hardware cursor
+ *
+ *
+ *  This file is subject to the terms and conditions of the GNU General Public
+ *  License.  See the file COPYING in the main directory of this archive for
+ *  more details.
+ */
+
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/sched.h>
+#include <linux/fs.h>
+#include <linux/kernel.h>
+#include <linux/tty.h>
+#include <linux/console.h>
+#include <linux/string.h>
+#include <linux/kd.h>
+#include <linux/malloc.h>
+#ifdef CONFIG_KERNELD
+#include <linux/kerneld.h>
+#endif
+
+#include <asm/setup.h>
+#include <asm/irq.h>
+#ifdef CONFIG_AMIGA
+#include <asm/amigahw.h>
+#include <asm/amigaints.h>
+#endif /* CONFIG_AMIGA */
+#ifdef CONFIG_ATARI
+#include <asm/atariints.h>
+#endif
+#include <linux/fb.h>
+#include <asm/font.h>
+#include <asm/machdep.h>
+
+#include <asm/system.h>
+#include <asm/uaccess.h>
+
+#include "fbcon.h"
+
+#include "../char/vt_kern.h"		/* vt_cons and vc_resize_con() */
+#include "../char/console_struct.h"
+
+extern int console_blanked;		/* Imported from console.c */
+
+
+struct display fb_display[MAX_NR_CONSOLES];
+
+
+/* ++Geert: Sorry, no hardware cursor support at the moment;
+   use Atari alike software cursor */
+
+static int cursor_drawn = 0;
+
+#define CURSOR_DRAW_DELAY		(2)
+
+/* # VBL ints between cursor state changes */
+#define AMIGA_CURSOR_BLINK_RATE		(20)
+#define ATARI_CURSOR_BLINK_RATE		(42)
+
+static int vbl_cursor_cnt = 0;
+static int cursor_on = 0;
+static int cursor_blink_rate;
+
+static __inline__ int CURSOR_UNDRAWN(void)
+{
+    int cursor_was_drawn;
+    vbl_cursor_cnt = 0;
+    cursor_was_drawn = cursor_drawn;
+    cursor_drawn = 0;
+    return(cursor_was_drawn);
+}
+
+    /*
+     *  Scroll Method
+     */
+
+#define SCROLL_YWRAP	(0)
+#define SCROLL_YPAN	(1)
+#define SCROLL_YMOVE	(2)
+
+#define divides(a, b)	((!(a) || (b)%(a)) ? 0 : 1)
+
+
+    /*
+     *  Interface used by the world
+     */
+
+static int fbcon_startup(u_long *kmem_start, const char **display_desc);
+static void fbcon_init(struct vc_data *conp);
+static int fbcon_deinit(struct vc_data *conp);
+static int fbcon_changevar(int con);
+static int fbcon_clear(struct vc_data *conp, int sy, int sx, int height,
+		       int width);
+static int fbcon_putc(struct vc_data *conp, int c, int yy, int xx);
+static int fbcon_putcs(struct vc_data *conp, const char *s, int count, int yy,
+		       int xx);
+static int fbcon_cursor(struct vc_data *conp, int mode);
+static int fbcon_scroll(struct vc_data *conp, int t, int b, int dir, int count);
+static int fbcon_bmove(struct vc_data *conp, int sy, int sx, int dy, int dx,
+		       int height, int width);
+static int fbcon_switch(struct vc_data *conp);
+static int fbcon_blank(int blank);
+static int fbcon_get_font(struct vc_data *conp, int *w, int *h, char *data);
+static int fbcon_set_font(struct vc_data *conp, int w, int h, char *data);
+static int fbcon_set_palette(struct vc_data *conp, unsigned char *table);
+
+int fbcon_register_driver(struct display_switch *dispsw, int is_accel);
+int fbcon_unregister_driver(struct display_switch *dispsw);
+
+
+    /*
+     *  Internal routines
+     */
+
+static void fbcon_setup(int con, int setcol, int init);
+static __inline__ int real_y(struct display *p, int yy);
+static void fbcon_vbl_handler(int irq, void *dummy, struct pt_regs *fp);
+static __inline__ void updatescrollmode(struct display *p);
+static __inline__ void ywrap_up(int unit, struct display *p, int count);
+static __inline__ void ywrap_down(int unit, struct display *p, int count);
+static __inline__ void ypan_up(int unit, struct vc_data *conp,
+			       struct display *p, int count);
+static __inline__ void ypan_down(int unit, struct vc_data *conp,
+				 struct display *p, int count);
+static void fbcon_bmove_rec(struct display *p, int sy, int sx, int dy, int dx,
+			    int height, int width, u_int y_break);
+static struct display_switch *probe_list(struct display_switch *dispsw,
+					 struct display *disp);
+
+static void request_driver(struct display *disp, int is_accel);
+static struct display_switch *fbcon_get_driver(struct display *disp);
+
+
+    /*
+     *  Low Level Operations
+     */
+
+static struct display_switch dispsw_dummy;
+
+#ifdef CONFIG_FBCON_MFB
+extern int fbcon_init_mfb(void);
+#endif /* CONFIG_FBCON_MFB */
+#ifdef CONFIG_FBCON_ILBM
+extern int fbcon_init_ilbm(void);
+#endif /* CONFIG_FBCON_ILBM */
+#ifdef CONFIG_FBCON_AFB
+extern int fbcon_init_afb(void);
+#endif /* CONFIG_FBCON_AFB */
+#ifdef CONFIG_FBCON_IPLAN2P2
+extern int fbcon_init_iplan2p2(void);
+#endif /* CONFIG_FBCON_IPLAN2P2 */
+#ifdef CONFIG_FBCON_IPLAN2P4
+extern int fbcon_init_iplan2p4(void);
+#endif /* CONFIG_FBCON_IPLAN2P4 */
+#ifdef CONFIG_FBCON_IPLAN2P8
+extern int fbcon_init_iplan2p8(void);
+#endif /* CONFIG_FBCON_IPLAN2P8 */
+#ifdef CONFIG_FBCON_CFB8
+extern int fbcon_init_cfb8(void);
+#endif /* CONFIG_FBCON_CFB8 */
+#ifdef CONFIG_FBCON_CFB16
+extern int fbcon_init_cfb16(void);
+#endif /* CONFIG_FBCON_CFB16 */
+#ifdef CONFIG_FBCON_CYBER
+extern int fbcon_init_cyber(void);
+#endif /* CONFIG_FBCON_CYBER */
+#ifdef CONFIG_FBCON_RETINAZ3
+extern int fbcon_init_retz3(void);
+#endif
+
+
+static int fbcon_startup(u_long *kmem_start, const char **display_desc)
+{
+    int irqres = 1;
+
+    /* Probe all frame buffer devices */
+    if (!probe_framebuffers(kmem_start))
+	return -ENODEV;
+
+    /* Initialize all built-in low level drivers */
+#ifdef CONFIG_FBCON_MFB
+    fbcon_init_mfb();
+#endif /* CONFIG_FBCON_MFB */
+#ifdef CONFIG_FBCON_IPLAN2P2
+    fbcon_init_iplan2p2();
+#endif /* CONFIG_FBCON_IPLAN2P2 */
+#ifdef CONFIG_FBCON_IPLAN2P4
+    fbcon_init_iplan2p4();
+#endif /* CONFIG_FBCON_IPLAN2P4 */
+#ifdef CONFIG_FBCON_IPLAN2P8
+    fbcon_init_iplan2p8();
+#endif /* CONFIG_FBCON_IPLAN2P8 */
+#ifdef CONFIG_FBCON_ILBM
+    fbcon_init_ilbm();
+#endif /* CONFIG_FBCON_ILBM */
+#ifdef CONFIG_FBCON_AFB
+    fbcon_init_afb();
+#endif /* CONFIG_FBCON_AFB */
+#ifdef CONFIG_FBCON_CFB8
+    fbcon_init_cfb8();
+#endif /* CONFIG_FBCON_CFB8 */
+#ifdef CONFIG_FBCON_CFB16
+    fbcon_init_cfb16();
+#endif /* CONFIG_FBCON_CFB16 */
+#ifdef CONFIG_FBCON_CFB24
+    /* Not yet implemented */
+    fbcon_init_24_packed();
+#endif /* CONFIG_FBCON_CFB24 */
+#ifdef CONFIG_FBCON_CFB32
+    /* Not yet implemented */
+    fbcon_init_32_packed();
+#endif /* CONFIG_FBCON_CFB32 */
+#ifdef CONFIG_FBCON_CYBER
+    fbcon_init_cyber();
+#endif /* CONFIG_FBCON_CYBER */
+#ifdef CONFIG_FBCON_RETINAZ3
+    fbcon_init_retz3();
+#endif /* CONFIG_FBCON_RETINAZ3 */
+
+    *display_desc = "frame buffer device";
+
+#ifdef CONFIG_AMIGA
+    if (MACH_IS_AMIGA) {
+	cursor_blink_rate = AMIGA_CURSOR_BLINK_RATE;
+	irqres = request_irq(IRQ_AMIGA_VERTB, fbcon_vbl_handler, 0,
+			     "console/cursor", fbcon_vbl_handler);
+    }
+#endif /* CONFIG_AMIGA */
+#ifdef CONFIG_ATARI
+    if (MACH_IS_ATARI) {
+	cursor_blink_rate = ATARI_CURSOR_BLINK_RATE;
+	irqres = request_irq(IRQ_AUTO_4, fbcon_vbl_handler, IRQ_TYPE_PRIO,
+			     "console/cursor", fbcon_vbl_handler);
+    }
+#endif /* CONFIG_ATARI */
+
+    if (irqres)
+	panic("fbcon_startup: Couldn't add vblank interrupt");
+
+    return(0);
+}
+
+
+static void fbcon_init(struct vc_data *conp)
+{
+    int unit = conp->vc_num;
+    struct fb_info *info;
+
+    /* on which frame buffer will we open this console? */
+    info = registered_fb[(int)con2fb_map[unit]];
+
+    info->changevar = &fbcon_changevar;
+    fb_display[unit] = *(info->disp);	/* copy from default */
+    fb_display[unit].conp = conp;
+    fb_display[unit].fb_info = info;
+    fbcon_setup(unit, 1, 1);
+}
+
+
+static int fbcon_deinit(struct vc_data *conp)
+{
+    int unit = conp->vc_num;
+
+    fb_display[unit].conp = 0;
+    return(0);
+}
+
+
+static int fbcon_changevar(int con)
+{
+    if (fb_display[con].conp)
+	 fbcon_setup(con, 1, 0);
+    return(0);
+}
+
+
+static __inline__ void updatescrollmode(struct display *p)
+{
+    if (divides(p->ywrapstep, p->fontheight) &&
+	divides(p->fontheight, p->var.yres_virtual))
+	p->scrollmode = SCROLL_YWRAP;
+    else if (divides(p->ypanstep, p->fontheight) &&
+	     p->var.yres_virtual >= p->var.yres+p->fontheight)
+	p->scrollmode = SCROLL_YPAN;
+    else
+	p->scrollmode = SCROLL_YMOVE;
+}
+
+
+static void fbcon_setup(int con, int setcol, int init)
+{
+    struct display *p = &fb_display[con];
+    struct vc_data *conp = p->conp;
+    int nr_rows, nr_cols;
+
+    p->var.xoffset = p->var.yoffset = p->yscroll = 0;  /* reset wrap/pan */
+
+    if (!p->fb_info->fontname[0] ||
+	!findsoftfont(p->fb_info->fontname, &p->fontwidth, &p->fontheight,
+		      &p->fontdata) || p->fontwidth != 8)
+	getdefaultfont(p->var.xres, p->var.yres, NULL, &p->fontwidth,
+		       &p->fontheight, &p->fontdata);
+    if (p->fontwidth != 8) {
+	/* ++Geert: changed from panic() to `correct and continue' */
+	printk(KERN_ERR "fbcon_setup: No support for fontwidth != 8");
+	p->fontwidth = 8;
+    }
+    updatescrollmode(p);
+
+    nr_cols = p->var.xres/p->fontwidth;
+    nr_rows = p->var.yres/p->fontheight;
+    /*  ++guenther: console.c:vc_allocate() relies on initializing
+     *  vc_{cols,rows}, but we must not set those if we are only resizing the
+     *  console.
+     */
+    if (init) {
+	conp->vc_cols = nr_cols;
+	conp->vc_rows = nr_rows;
+    }
+    p->vrows = p->var.yres_virtual/p->fontheight;
+    conp->vc_can_do_color = p->var.bits_per_pixel != 1;
+
+    if (p->dispsw)
+	p->dispsw->release();
+    if (!(p->dispsw = fbcon_get_driver(p))) {
+	printk(KERN_WARNING "fbcon_setup: type %d (aux %d, depth %d) not "
+	       "supported\n", p->type, p->type_aux, p->var.bits_per_pixel);
+	dispsw_dummy.open(p);
+	p->dispsw = &dispsw_dummy;
+    }
+
+    if (setcol) {
+	p->fgcol = p->var.bits_per_pixel > 2 ? 7 : (1<<p->var.bits_per_pixel)-1;
+	p->bgcol = 0;
+    }
+
+    if (!init)
+	vc_resize_con(nr_rows, nr_cols, con);
+}
+
+
+/* ====================================================================== */
+
+/*  fbcon_XXX routines - interface used by the world
+ *
+ *  This system is now divided into two levels because of complications
+ *  caused by hardware scrolling. Top level functions:
+ *
+ *	fbcon_bmove(), fbcon_clear(), fbcon_putc()
+ *
+ *  handles y values in range [0, scr_height-1] that correspond to real
+ *  screen positions. y_wrap shift means that first line of bitmap may be
+ *  anywhere on this display. These functions convert lineoffsets to
+ *  bitmap offsets and deal with the wrap-around case by splitting blits.
+ *
+ *	fbcon_bmove_physical_8()    -- These functions fast implementations
+ *	fbcon_clear_physical_8()    -- of original fbcon_XXX fns.
+ *	fbcon_putc_physical_8()	    -- (fontwidth != 8) may be added later
+ *
+ *  WARNING:
+ *
+ *  At the moment fbcon_putc() cannot blit across vertical wrap boundary
+ *  Implies should only really hardware scroll in rows. Only reason for
+ *  restriction is simplicity & efficiency at the moment.
+ */
+
+static __inline__ int real_y(struct display *p, int yy)
+{
+    int rows = p->vrows;
+
+    yy += p->yscroll;
+    return(yy < rows ? yy : yy-rows);
+}
+
+
+static int fbcon_clear(struct vc_data *conp, int sy, int sx, int height,
+			      int width)
+{
+    int unit = conp->vc_num;
+    struct display *p = &fb_display[unit];
+    u_int y_break;
+
+    if (!p->can_soft_blank && console_blanked)
+	return(0);
+
+    if ((sy <= p->cursor_y) && (p->cursor_y < sy+height) &&
+	(sx <= p->cursor_x) && (p->cursor_x < sx+width))
+	CURSOR_UNDRAWN();
+
+    /* Split blits that cross physical y_wrap boundary */
+
+    y_break = p->vrows-p->yscroll;
+    if (sy < y_break && sy+height-1 >= y_break) {
+	u_int b = y_break-sy;
+	p->dispsw->clear(conp, p, real_y(p, sy), sx, b, width);
+	p->dispsw->clear(conp, p, real_y(p, sy+b), sx, height-b, width);
+    } else
+	p->dispsw->clear(conp, p, real_y(p, sy), sx, height, width);
+
+    return(0);
+}
+
+
+static int fbcon_putc(struct vc_data *conp, int c, int yy, int xx)
+{
+    int unit = conp->vc_num;
+    struct display *p = &fb_display[unit];
+
+    if (!p->can_soft_blank && console_blanked)
+	return(0);
+
+    if ((p->cursor_x == xx) && (p->cursor_y == yy))
+	 CURSOR_UNDRAWN();
+
+    p->dispsw->putc(conp, p, c, real_y(p, yy), xx);
+
+    return(0);
+}
+
+
+static int fbcon_putcs(struct vc_data *conp, const char *s, int count, int yy,
+		       int xx)
+{
+    int unit = conp->vc_num;
+    struct display *p = &fb_display[unit];
+
+    if (!p->can_soft_blank && console_blanked)
+	return(0);
+
+    if ((p->cursor_y == yy) && (xx <= p->cursor_x) && (p->cursor_x < xx+count))
+	CURSOR_UNDRAWN();
+
+    p->dispsw->putcs(conp, p, s, count, real_y(p, yy), xx);
+
+    return(0);
+}
+
+
+static int fbcon_cursor(struct vc_data *conp, int mode)
+{
+    int unit = conp->vc_num;
+    struct display *p = &fb_display[unit];
+
+    /* Avoid flickering if there's no real change. */
+    if (p->cursor_x == conp->vc_x && p->cursor_y == conp->vc_y &&
+	(mode == CM_ERASE) == !cursor_on)
+	return 0;
+    if (CURSOR_UNDRAWN ())
+	p->dispsw->rev_char(p, p->cursor_x, real_y(p, p->cursor_y));
+    p->cursor_x = conp->vc_x;
+    p->cursor_y = conp->vc_y;
+
+    switch (mode) {
+	case CM_ERASE:
+	    cursor_on = 0;
+	    break;
+
+	case CM_MOVE:
+	case CM_DRAW:
+	    vbl_cursor_cnt = CURSOR_DRAW_DELAY;
+	    cursor_on = 1;
+	    break;
+    }
+
+    return(0);
+}
+
+
+static void fbcon_vbl_handler(int irq, void *dummy, struct pt_regs *fp)
+{
+    struct display *p;
+
+    if (!cursor_on)
+	return;
+
+    if (vbl_cursor_cnt && --vbl_cursor_cnt == 0) {
+	/* Here no check is possible for console changing. The console
+	 * switching code should set vbl_cursor_cnt to an appropriate value.
+	 */
+	p = &fb_display[fg_console];
+	p->dispsw->rev_char(p, p->cursor_x, real_y(p, p->cursor_y));
+	cursor_drawn ^= 1;
+	vbl_cursor_cnt = cursor_blink_rate;
+    }
+}
+
+
+static __inline__ void ywrap_up(int unit, struct display *p, int count)
+{
+    p->yscroll += count;
+    if (p->yscroll >= p->vrows)	/* Deal with wrap */
+	p->yscroll -= p->vrows;
+    p->var.xoffset = 0;
+    p->var.yoffset = p->yscroll*p->fontheight;
+    p->var.vmode |= FB_VMODE_YWRAP;
+    p->fb_info->updatevar(unit);
+}
+
+
+static __inline__ void ywrap_down(int unit, struct display *p, int count)
+{
+    p->yscroll -= count;
+    if (p->yscroll < 0)		/* Deal with wrap */
+	p->yscroll += p->vrows;
+    p->var.xoffset = 0;
+    p->var.yoffset = p->yscroll*p->fontheight;
+    p->var.vmode |= FB_VMODE_YWRAP;
+    p->fb_info->updatevar(unit);
+}
+
+
+static __inline__ void ypan_up(int unit, struct vc_data *conp,
+			       struct display *p, int count)
+{
+    p->yscroll += count;
+    if (p->yscroll+conp->vc_rows > p->vrows) {
+	p->dispsw->bmove(p, p->yscroll, 0, 0, 0, conp->vc_rows-count,
+			 conp->vc_cols);
+	p->yscroll = 0;
+    }
+    p->var.xoffset = 0;
+    p->var.yoffset = p->yscroll*p->fontheight;
+    p->var.vmode &= ~FB_VMODE_YWRAP;
+    p->fb_info->updatevar(unit);
+}
+
+
+static __inline__ void ypan_down(int unit, struct vc_data *conp,
+				 struct display *p, int count)
+{
+    p->yscroll -= count;
+    if (p->yscroll < 0) {
+	p->yscroll = p->vrows-conp->vc_rows;
+	p->dispsw->bmove(p, 0, 0, p->yscroll+count, 0, conp->vc_rows-count,
+			 conp->vc_cols);
+    }
+    p->var.xoffset = 0;
+    p->var.yoffset = p->yscroll*p->fontheight;
+    p->var.vmode &= ~FB_VMODE_YWRAP;
+    p->fb_info->updatevar(unit);
+}
+
+
+static int fbcon_scroll(struct vc_data *conp, int t, int b, int dir, int count)
+{
+    int unit = conp->vc_num;
+    struct display *p = &fb_display[unit];
+
+    if (!p->can_soft_blank && console_blanked)
+	return(0);
+
+    fbcon_cursor(conp, CM_ERASE);
+
+    /*
+     * ++Geert: Only use ywrap/ypan if the console is in text mode
+     */
+
+    switch (dir) {
+	case SM_UP:
+	    if (count > conp->vc_rows)	/* Maximum realistic size */
+		count = conp->vc_rows;
+	    if (vt_cons[unit]->vc_mode == KD_TEXT)
+		switch (p->scrollmode) {
+		    case SCROLL_YWRAP:
+			if (b-t-count > 3*conp->vc_rows>>2) {
+			    if (t > 0)
+				fbcon_bmove(conp, 0, 0, count, 0, t,
+					    conp->vc_cols);
+			    ywrap_up(unit, p, count);
+			    if (conp->vc_rows-b > 0)
+				fbcon_bmove(conp, b-count, 0, b, 0,
+					    conp->vc_rows-b, conp->vc_cols);
+			} else
+			    fbcon_bmove(conp, t+count, 0, t, 0, b-t-count,
+					conp->vc_cols);
+			fbcon_clear(conp, b-count, 0, count, conp->vc_cols);
+			break;
+
+		    case SCROLL_YPAN:
+			if (b-t-count > 3*conp->vc_rows>>2) {
+			    if (t > 0)
+				fbcon_bmove(conp, 0, 0, count, 0, t,
+					    conp->vc_cols);
+			    ypan_up(unit, conp, p, count);
+			    if (conp->vc_rows-b > 0)
+				fbcon_bmove(conp, b-count, 0, b, 0,
+					    conp->vc_rows-b, conp->vc_cols);
+			} else
+			    fbcon_bmove(conp, t+count, 0, t, 0, b-t-count,
+					conp->vc_cols);
+			fbcon_clear(conp, b-count, 0, count, conp->vc_cols);
+			break;
+
+		    case SCROLL_YMOVE:
+			p->dispsw->bmove(p, t+count, 0, t, 0, b-t-count,
+			conp->vc_cols);
+			p->dispsw->clear(conp, p, b-count, 0, count,
+					 conp->vc_cols);
+			break;
+		}
+	    else {
+		fbcon_bmove(conp, t+count, 0, t, 0, b-t-count, conp->vc_cols);
+		fbcon_clear(conp, b-count, 0, count, conp->vc_cols);
+	    }
+	    break;
+
+	case SM_DOWN:
+	    if (count > conp->vc_rows)	/* Maximum realistic size */
+		count = conp->vc_rows;
+	    if (vt_cons[unit]->vc_mode == KD_TEXT)
+		switch (p->scrollmode) {
+		    case SCROLL_YWRAP:
+			if (b-t-count > 3*conp->vc_rows>>2) {
+			    if (conp->vc_rows-b > 0)
+				fbcon_bmove(conp, b, 0, b-count, 0,
+					    conp->vc_rows-b, conp->vc_cols);
+			    ywrap_down(unit, p, count);
+			    if (t > 0)
+				fbcon_bmove(conp, count, 0, 0, 0, t,
+					    conp->vc_cols);
+			} else
+			    fbcon_bmove(conp, t, 0, t+count, 0, b-t-count,
+					conp->vc_cols);
+			fbcon_clear(conp, t, 0, count, conp->vc_cols);
+			break;
+
+		    case SCROLL_YPAN:
+			if (b-t-count > 3*conp->vc_rows>>2) {
+			    if (conp->vc_rows-b > 0)
+				fbcon_bmove(conp, b, 0, b-count, 0,
+					    conp->vc_rows-b, conp->vc_cols);
+			    ypan_down(unit, conp, p, count);
+			    if (t > 0)
+				fbcon_bmove(conp, count, 0, 0, 0, t,
+					    conp->vc_cols);
+			} else
+			    fbcon_bmove(conp, t, 0, t+count, 0, b-t-count,
+					conp->vc_cols);
+			fbcon_clear(conp, t, 0, count, conp->vc_cols);
+			break;
+
+		    case SCROLL_YMOVE:
+			p->dispsw->bmove(p, t, 0, t+count, 0, b-t-count,
+					 conp->vc_cols);
+			p->dispsw->clear(conp, p, t, 0, count, conp->vc_cols);
+			break;
+		}
+	    else {
+		/*
+		 *  Fixed bmove() should end Arno's frustration with copying?
+		 *  Confucius says:
+		 *	Man who copies in wrong direction, end up with trashed
+		 *	data
+		 */
+		fbcon_bmove(conp, t, 0, t+count, 0, b-t-count, conp->vc_cols);
+		fbcon_clear(conp, t, 0, count, conp->vc_cols);
+	    }
+	    break;
+
+	case SM_LEFT:
+	    fbcon_bmove(conp, 0, t+count, 0, t, conp->vc_rows, b-t-count);
+	    fbcon_clear(conp, 0, b-count, conp->vc_rows, count);
+	    break;
+
+	case SM_RIGHT:
+	    fbcon_bmove(conp, 0, t, 0, t+count, conp->vc_rows, b-t-count);
+	    fbcon_clear(conp, 0, t, conp->vc_rows, count);
+	    break;
+    }
+
+    return(0);
+}
+
+
+static int fbcon_bmove(struct vc_data *conp, int sy, int sx, int dy, int dx,
+		       int height, int width)
+{
+    int unit = conp->vc_num;
+    struct display *p = &fb_display[unit];
+
+    if (!p->can_soft_blank && console_blanked)
+	return(0);
+
+    if (((sy <= p->cursor_y) && (p->cursor_y < sy+height) &&
+	 (sx <= p->cursor_x) && (p->cursor_x < sx+width)) ||
+	((dy <= p->cursor_y) && (p->cursor_y < dy+height) &&
+	 (dx <= p->cursor_x) && (p->cursor_x < dx+width)))
+	fbcon_cursor(conp, CM_ERASE);
+
+    /*  Split blits that cross physical y_wrap case.
+     *  Pathological case involves 4 blits, better to use recursive
+     *  code rather than unrolled case
+     *
+     *  Recursive invocations don't need to erase the cursor over and
+     *  over again, so we use fbcon_bmove_rec()
+     */
+    fbcon_bmove_rec(p, sy, sx, dy, dx, height, width, p->vrows-p->yscroll);
+
+    return(0);
+}
+
+
+static void fbcon_bmove_rec(struct display *p, int sy, int sx, int dy, int dx,
+			    int height, int width, u_int y_break)
+{
+    u_int b;
+
+    if (sy < y_break && sy+height > y_break) {
+	b = y_break-sy;
+	if (dy < sy) {	/* Avoid trashing self */
+	    fbcon_bmove_rec(p, sy, sx, dy, dx, b, width, y_break);
+	    fbcon_bmove_rec(p, sy+b, sx, dy+b, dx, height-b, width, y_break);
+	} else {
+	    fbcon_bmove_rec(p, sy+b, sx, dy+b, dx, height-b, width, y_break);
+	    fbcon_bmove_rec(p, sy, sx, dy, dx, b, width, y_break);
+	}
+	return;
+    }
+
+    if (dy < y_break && dy+height > y_break) {
+	b = y_break-dy;
+	if (dy < sy) {	/* Avoid trashing self */
+	    fbcon_bmove_rec(p, sy, sx, dy, dx, b, width, y_break);
+	    fbcon_bmove_rec(p, sy+b, sx, dy+b, dx, height-b, width, y_break);
+	} else {
+	    fbcon_bmove_rec(p, sy+b, sx, dy+b, dx, height-b, width, y_break);
+	    fbcon_bmove_rec(p, sy, sx, dy, dx, b, width, y_break);
+	}
+	return;
+    }
+    p->dispsw->bmove(p, real_y(p, sy), sx, real_y(p, dy), dx, height, width);
+}
+
+
+static int fbcon_switch(struct vc_data *conp)
+{
+    int unit = conp->vc_num;
+    struct display *p = &fb_display[unit];
+    struct fb_info *info = p->fb_info;
+
+    if (info && info->switch_con)
+	(*info->switch_con)(conp->vc_num);
+    return(0);
+}
+
+
+static int fbcon_blank(int blank)
+{
+    struct display *p = &fb_display[fg_console];
+
+    fbcon_cursor(p->conp, blank ? CM_ERASE : CM_DRAW);
+
+    if (!p->can_soft_blank)
+	if (blank) {
+	    if (p->visual == FB_VISUAL_MONO01)
+		mymemset(p->screen_base,
+			 p->var.xres_virtual*p->var.yres_virtual*
+			 p->var.bits_per_pixel>>3);
+	     else
+		 mymemclear(p->screen_base,
+			    p->var.xres_virtual*p->var.yres_virtual*
+			    p->var.bits_per_pixel>>3);
+	    return(0);
+	} else {
+	    /* Tell console.c that it has to restore the screen itself */
+	    return(1);
+	}
+    (*p->fb_info->blank)(blank);
+    return(0);
+}
+
+
+static int fbcon_get_font(struct vc_data *conp, int *w, int *h, char *data)
+{
+    int unit = conp->vc_num;
+    struct display *p = &fb_display[unit];
+    int i, j, size, alloc;
+
+    size = (p->fontwidth+7)/8 * p->fontheight * 256;
+    alloc = (*w+7)/8 * *h * 256;
+    *w = p->fontwidth;
+    *h = p->fontheight;
+
+    if (alloc < size)
+	/* allocation length not sufficient */
+	return( -ENAMETOOLONG );
+
+    for (i = 0; i < 256; i++)
+	for (j = 0; j < p->fontheight; j++)
+	    data[i*32+j] = p->fontdata[i*p->fontheight+j];
+    return( 0 );
+}
+
+
+#define REFCOUNT(fd)	(((int *)(fd))[-1])
+
+static int fbcon_set_font(struct vc_data *conp, int w, int h, char *data)
+{
+    int unit = conp->vc_num;
+    struct display *p = &fb_display[unit];
+    int i, j, size, userspace = 1, resize;
+    char *old_data = NULL, *new_data;
+
+    if (w < 0)
+	w = p->fontwidth;
+    if (h < 0)
+	h = p->fontheight;
+
+    if (w == 0) {
+	/* engage predefined font, name in 'data' */
+	char name[MAX_FONT_NAME+1];
+
+	if ((i = verify_area( VERIFY_READ, (void *)data, MAX_FONT_NAME )))
+	    return i;
+	copy_from_user( name, data, MAX_FONT_NAME );
+	name[sizeof(name)-1] = 0;
+
+	if (!findsoftfont( name, &w, &h, (u_char **)&data ))
+	    return( -ENOENT );
+	userspace = 0;
+    } else if (w == 1) {
+	/* copy font from some other console in 'h'*/
+	struct display *op;
+
+	if (h < 0 || !vc_cons_allocated( h ))
+	    return( -ENOTTY );
+	if (h == unit)
+	    return( 0 ); /* nothing to do */
+	op = &fb_display[h];
+	if (op->fontdata == p->fontdata)
+	    return( 0 ); /* already the same font... */
+
+	resize = (op->fontwidth != p->fontwidth) ||
+		 (op->fontheight != p->fontheight);
+	if (p->userfont)
+	    old_data = p->fontdata;
+	p->fontdata = op->fontdata;
+	w = p->fontwidth = op->fontwidth;
+	h = p->fontheight = op->fontheight;
+	if ((p->userfont = op->userfont))
+	    REFCOUNT(p->fontdata)++;	/* increment usage counter */
+	goto activate;
+    }
+
+    if (w != 8)
+	/* Currently only fontwidth == 8 supported */
+	return( -ENXIO );
+
+    resize = (w != p->fontwidth) || (h != p->fontheight);
+    size = (w+7)/8 * h * 256;
+
+    if (p->userfont)
+	old_data = p->fontdata;
+
+    if (userspace) {
+	if (!(new_data = kmalloc( sizeof(int)+size, GFP_USER )))
+	    return( -ENOMEM );
+	new_data += sizeof(int);
+	REFCOUNT(new_data) = 1; /* usage counter */
+
+	for (i = 0; i < 256; i++)
+	    for (j = 0; j < h; j++)
+		new_data[i*h+j] = data[i*32+j];
+
+	p->fontdata = new_data;
+	p->userfont = 1;
+    } else {
+	p->fontdata = data;
+	p->userfont = 0;
+    }
+    p->fontwidth = w;
+    p->fontheight = h;
+
+activate:
+    if (resize) {
+	/* reset wrap/pan */
+	p->var.xoffset = p->var.yoffset = p->yscroll = 0;
+	/* Adjust the virtual screen-size to fontheight*rows */
+	p->var.yres_virtual = (p->var.yres/h)*h;
+	p->vrows = p->var.yres_virtual/h;
+	updatescrollmode(p);
+	vc_resize_con( p->var.yres/h, p->var.xres/w, unit );
+    } else if (unit == fg_console)
+	update_screen( unit );
+
+    if (old_data && (--REFCOUNT(old_data) == 0))
+	kfree( old_data - sizeof(int) );
+
+    return( 0 );
+}
+
+static unsigned short palette_red[16];
+static unsigned short palette_green[16];
+static unsigned short palette_blue[16];
+
+static struct fb_cmap palette_cmap  = {
+    0, 16, palette_red, palette_green, palette_blue, NULL
+};
+
+static int fbcon_set_palette(struct vc_data *conp, unsigned char *table)
+{
+    int unit = conp->vc_num;
+    struct display *p = &fb_display[unit];
+    int i, j, k;
+    u_char val;
+
+    if (!conp->vc_can_do_color || (!p->can_soft_blank && console_blanked))
+	return(-EINVAL);
+    for (i = j = 0; i < 16; i++) {
+	k = table[i];
+	val = conp->vc_palette[j++];
+	palette_red[k] = (val<<8)|val;
+	val = conp->vc_palette[j++];
+	palette_green[k] = (val<<8)|val;
+	val = conp->vc_palette[j++];
+	palette_blue[k] = (val<<8)|val;
+    }
+    palette_cmap.len = 1<<p->var.bits_per_pixel;
+    if (palette_cmap.len > 16)
+	palette_cmap.len = 16;
+    return(p->fb_info->setcmap(&palette_cmap, unit));
+}
+
+
+/* ====================================================================== */
+
+    /*
+     *  The console `switch' structure for the frame buffer based console
+     */
+
+struct consw fb_con = {
+    fbcon_startup, fbcon_init, fbcon_deinit, fbcon_clear, fbcon_putc,
+    fbcon_putcs, fbcon_cursor, fbcon_scroll, fbcon_bmove, fbcon_switch,
+    fbcon_blank, fbcon_get_font, fbcon_set_font, fbcon_set_palette
+};
+
+
+/* ====================================================================== */
+
+    /*
+     *  Driver registration
+     */
+
+static struct display_switch *drivers = NULL, *accel_drivers = NULL;
+
+int fbcon_register_driver(struct display_switch *dispsw, int is_accel)
+{
+    struct display_switch **list;
+
+    list = is_accel ? &accel_drivers : &drivers;
+    dispsw->next = *list;
+    *list = dispsw;
+    return 0;
+}
+
+int fbcon_unregister_driver(struct display_switch *dispsw)
+{
+    struct display_switch **list;
+
+    for (list = &accel_drivers; *list; list = &(*list)->next)
+	if (*list == dispsw) {
+	    *list = dispsw->next;
+	    dispsw->next = NULL;
+	    return 0;
+	}
+    for (list = &drivers; *list; list = &(*list)->next)
+	if (*list == dispsw) {
+	    *list = dispsw->next;
+	    dispsw->next = NULL;
+	    return 0;
+	}
+    return -EINVAL;
+}
+
+
+static struct display_switch *probe_list(struct display_switch *dispsw,
+					 struct display *disp)
+{
+    while (dispsw) {
+	if (!dispsw->open(disp))
+	    return(dispsw);
+	dispsw = dispsw->next;
+    }
+    return(NULL);
+}
+
+#ifdef CONFIG_KERNELD
+static void request_driver(struct display *disp, int is_accel)
+{
+    char modname[30];
+    int len;
+    const char *type;
+
+    if (disp->var.bits_per_pixel == 1)
+	type = "mfb";
+    else
+	switch (disp->type) {
+	    case FB_TYPE_INTERLEAVED_PLANES:
+		if (disp->type_aux == 2)
+		    type = "iplan2p%d";
+		else
+		    type = "ilbm";
+		break;
+	    case FB_TYPE_PLANES:
+		type = "afb";
+		break;
+	    case FB_TYPE_PACKED_PIXELS:
+		type = "cfb%d";
+		break;
+	    default:
+		return;
+	}
+    len = sprintf(modname, "fbcon-");
+    len += sprintf(modname+len, type, disp->var.bits_per_pixel);
+    if (is_accel)
+	len += sprintf(modname+len, "-%d", disp->var.accel);
+    request_module(modname);
+}
+#endif /* CONFIG_KERNELD */
+
+static struct display_switch *fbcon_get_driver(struct display *disp)
+{
+    struct display_switch *dispsw;
+
+    if (disp->var.accel != FB_ACCEL_NONE) {
+	/* First try an accelerated driver */
+	dispsw = probe_list(accel_drivers, disp);
+#ifdef CONFIG_KERNELD
+	if (!dispsw) {
+	    request_driver(disp, 1);
+	    dispsw = probe_list(accel_drivers, disp);
+	}
+#endif
+	if (dispsw)
+	    return(dispsw);
+    }
+
+    /* Then try an unaccelerated driver */
+    dispsw = probe_list(drivers, disp);
+#ifdef CONFIG_KERNELD
+    if (!dispsw) {
+	request_driver(disp, 0);
+	dispsw = probe_list(drivers, disp);
+    }
+#endif
+    return(dispsw);
+}
+
+
+    /*
+     *  Dummy Low Level Operations
+     */
+
+static int open_dummy(struct display *p)
+{
+    if (p->line_length)
+	p->next_line = p->line_length;
+    else
+	p->next_line = p->var.xres_virtual>>3;
+    p->next_plane = 0;
+    p->var.bits_per_pixel = 1;
+    return 0;
+}
+
+static void misc_dummy(void) {}
+
+static struct display_switch dispsw_dummy = {
+    open_dummy,
+    /* release_dummy */
+    misc_dummy,
+    /* bmove_dummy */
+    (void (*)(struct display *, int, int, int, int, int, int))misc_dummy,
+    /* clear_dummy */
+    (void (*)(struct vc_data *, struct display *, int, int, int, int))misc_dummy,
+    /* putc_dummy */
+    (void (*)(struct vc_data *, struct display *, int, int, int))misc_dummy,
+    /* putcs_dummy */
+    (void (*)(struct vc_data *, struct display *, const char *, int, int, int))misc_dummy,
+    /* rev_char_dummy */
+    (void (*)(struct display *, int, int))misc_dummy,
+};
+
+
+    /*
+     *  Visible symbols for modules
+     */
+
+EXPORT_SYMBOL(fb_display);
+EXPORT_SYMBOL(fbcon_register_driver);
+EXPORT_SYMBOL(fbcon_unregister_driver);
--- linux-2.1.42/drivers/video/fbcon-mfb.c.orig	Mon Jun  9 23:02:58 1997
+++ linux-2.1.42/drivers/video/fbcon-mfb.c	Mon Jun  9 23:02:58 1997
@@ -0,0 +1,204 @@
+/*
+ *  linux/drivers/video/mfb.c -- Low level frame buffer operations for
+ *				 monochrome
+ *
+ *	Created 5 Apr 1997 by Geert Uytterhoeven
+ *
+ *  This file is subject to the terms and conditions of the GNU General Public
+ *  License.  See the file COPYING in the main directory of this archive for
+ *  more details.
+ */
+
+#include <linux/module.h>
+#include <linux/tty.h>
+#include <linux/console.h>
+#include <linux/string.h>
+#include <linux/config.h>
+#include <linux/fb.h>
+
+#include "fbcon.h"
+#include "../char/console_struct.h"
+
+
+    /*
+     *  Prototypes
+     */
+
+static int open_mfb(struct display *p);
+static void release_mfb(void);
+static void bmove_mfb(struct display *p, int sy, int sx, int dy, int dx,
+		      int height, int width);
+static void clear_mfb(struct vc_data *conp, struct display *p, int sy, int sx,
+		      int height, int width);
+static void putc_mfb(struct vc_data *conp, struct display *p, int c, int yy,
+		      int xx);
+static void putcs_mfb(struct vc_data *conp, struct display *p, const char *s,
+		      int count, int yy, int xx);
+static void rev_char_mfb(struct display *p, int xx, int yy);
+
+
+    /*
+     *  `switch' for the low level operations
+     */
+
+static struct display_switch dispsw_mfb = {
+    open_mfb, release_mfb, bmove_mfb, clear_mfb, putc_mfb, putcs_mfb,
+    rev_char_mfb
+};
+
+
+    /*
+     *  Monochrome
+     */
+
+static int open_mfb(struct display *p)
+{
+    if (p->var.bits_per_pixel != 1)
+	return -EINVAL;
+
+    if (p->line_length)
+	p->next_line = p->line_length;
+    else
+	p->next_line = p->var.xres_virtual>>3;
+    p->next_plane = 0;
+    MOD_INC_USE_COUNT;
+    return 0;
+}
+
+static void release_mfb(void)
+{
+    MOD_DEC_USE_COUNT;
+}
+
+static void bmove_mfb(struct display *p, int sy, int sx, int dy, int dx,
+		      int height, int width)
+{
+    u_char *src, *dest;
+    u_int rows;
+
+    if (sx == 0 && dx == 0 && width == p->next_line) {
+	src = p->screen_base+sy*p->fontheight*width;
+	dest = p->screen_base+dy*p->fontheight*width;
+	mymemmove(dest, src, height*p->fontheight*width);
+    } else if (dy <= sy) {
+	src = p->screen_base+sy*p->fontheight*p->next_line+sx;
+	dest = p->screen_base+dy*p->fontheight*p->next_line+dx;
+	for (rows = height*p->fontheight; rows--;) {
+	    mymemmove(dest, src, width);
+	    src += p->next_line;
+	    dest += p->next_line;
+	}
+    } else {
+	src = p->screen_base+((sy+height)*p->fontheight-1)*p->next_line+sx;
+	dest = p->screen_base+((dy+height)*p->fontheight-1)*p->next_line+dx;
+	for (rows = height*p->fontheight; rows--;) {
+	    mymemmove(dest, src, width);
+	    src -= p->next_line;
+	    dest -= p->next_line;
+	}
+    }
+}
+
+static void clear_mfb(struct vc_data *conp, struct display *p, int sy, int sx,
+		      int height, int width)
+{
+    u_char *dest;
+    u_int rows;
+
+    dest = p->screen_base+sy*p->fontheight*p->next_line+sx;
+
+    if (sx == 0 && width == p->next_line)
+	if (attr_reverse(p,conp))
+	    mymemset(dest, height*p->fontheight*width);
+	else
+	    mymemclear(dest, height*p->fontheight*width);
+    else
+	for (rows = height*p->fontheight; rows--; dest += p->next_line)
+	    if (attr_reverse(p,conp))
+		mymemset(dest, width);
+	    else
+		mymemclear_small(dest, width);
+}
+
+static void putc_mfb(struct vc_data *conp, struct display *p, int c, int yy,
+		     int xx)
+{
+    u_char *dest, *cdat;
+    u_int rows, bold, revs, underl;
+    u_char d;
+
+    c &= 0xff;
+
+    dest = p->screen_base+yy*p->fontheight*p->next_line+xx;
+    cdat = p->fontdata+c*p->fontheight;
+    bold = attr_bold(p,conp);
+    revs = attr_reverse(p,conp);
+    underl = attr_underline(p,conp);
+
+    for (rows = p->fontheight; rows--; dest += p->next_line) {
+	d = *cdat++;
+	if (underl && !rows)
+	    d = 0xff;
+	else if (bold)
+	    d |= d>>1;
+	if (revs)
+	    d = ~d;
+	*dest = d;
+    }
+}
+
+static void putcs_mfb(struct vc_data *conp, struct display *p, const char *s,
+		      int count, int yy, int xx)
+{
+    u_char *dest, *dest0, *cdat;
+    u_int rows, bold, revs, underl;
+    u_char c, d;
+
+    dest0 = p->screen_base+yy*p->fontheight*p->next_line+xx;
+    bold = attr_bold(p,conp);
+    revs = attr_reverse(p,conp);
+    underl = attr_underline(p,conp);
+
+    while (count--) {
+	c = *s++;
+	dest = dest0++;
+	cdat = p->fontdata+c*p->fontheight;
+	for (rows = p->fontheight; rows--; dest += p->next_line) {
+	    d = *cdat++;
+	    if (underl && !rows)
+		d = 0xff;
+	    else if (bold)
+		d |= d>>1;
+	    if (revs)
+		d = ~d;
+	    *dest = d;
+	}
+    }
+}
+
+static void rev_char_mfb(struct display *p, int xx, int yy)
+{
+    u_char *dest;
+    u_int rows;
+
+    dest = p->screen_base+yy*p->fontheight*p->next_line+xx;
+    for (rows = p->fontheight; rows--; dest += p->next_line)
+	*dest = ~*dest;
+}
+
+
+#ifdef MODULE
+int init_module(void)
+#else
+int fbcon_init_mfb(void)
+#endif
+{
+    return(fbcon_register_driver(&dispsw_mfb, 0));
+}
+
+#ifdef MODULE
+void cleanup_module(void)
+{
+    fbcon_unregister_driver(&dispsw_mfb);
+}
+#endif /* MODULE */
--- linux-2.1.42/drivers/video/fbcon.h.orig	Mon Jun  9 23:02:58 1997
+++ linux-2.1.42/drivers/video/fbcon.h	Mon Jun  9 23:02:58 1997
@@ -0,0 +1,334 @@
+/*
+ *  linux/drivers/video/fbcon.h -- Low level frame buffer based console driver
+ *
+ *	Copyright (C) 1997 Geert Uytterhoeven
+ *
+ *  This file is subject to the terms and conditions of the GNU General Public
+ *  License.  See the file COPYING in the main directory of this archive
+ *  for more details.
+ */
+
+
+    /*                                  
+     *  `switch' for the Low Level Operations
+     */
+ 
+struct display_switch {                                                
+    int (*open)(struct display *p);
+    void (*release)(void);
+    void (*bmove)(struct display *p, int sy, int sx, int dy, int dx,
+		  int height, int width);
+    void (*clear)(struct vc_data *conp, struct display *p, int sy, int sx,
+		  int height, int width);
+    void (*putc)(struct vc_data *conp, struct display *p, int c, int y, int x);
+    void (*putcs)(struct vc_data *conp, struct display *p, const char *s,
+		  int count, int y, int x);     
+    void (*rev_char)(struct display *p, int x, int y);
+    struct display_switch *next;
+}; 
+
+
+    /*
+     *  Driver registration
+     */
+
+extern int fbcon_register_driver(struct display_switch *sw, int is_accel);
+int fbcon_unregister_driver(struct display_switch *sw);
+
+
+    /*
+     *  Attribute Decoding
+     */
+
+/* Color */
+#define attr_fgcol(p,conp)    \
+	(((conp)->vc_attr >> ((p)->inverse ? 4 : 0)) & 0x0f)
+#define attr_bgcol(p,conp)    \
+	(((conp)->vc_attr >> ((p)->inverse ? 0 : 4)) & 0x0f)
+#define	attr_bgcol_ec(p,conp) \
+	(((conp)->vc_video_erase_char >> ((p)->inverse ? 8 : 12)) & 0x0f)
+
+/* Monochrome */
+#define attr_bold(p,conp)     \
+	(((conp)->vc_attr & 3) == 2)
+#define attr_reverse(p,conp)  \
+	(((conp)->vc_attr & 8) ^ ((p)->inverse ? 8 : 0))
+#define attr_underline(p,conp) \
+	(((conp)->vc_attr) & 4)
+
+
+/* ================================================================= */
+/*                      Utility Assembler Functions                  */
+/* ================================================================= */
+
+
+#ifdef __mc68000__
+
+/* ====================================================================== */
+
+/* Those of a delicate disposition might like to skip the next couple of
+ * pages.
+ *
+ * These functions are drop in replacements for memmove and
+ * memset(_, 0, _). However their five instances add at least a kilobyte
+ * to the object file. You have been warned.
+ *
+ * Not a great fan of assembler for the sake of it, but I think
+ * that these routines are at least 10 times faster than their C
+ * equivalents for large blits, and that's important to the lowest level of
+ * a graphics driver. Question is whether some scheme with the blitter
+ * would be faster. I suspect not for simple text system - not much
+ * asynchrony.
+ *
+ * Code is very simple, just gruesome expansion. Basic strategy is to
+ * increase data moved/cleared at each step to 16 bytes to reduce
+ * instruction per data move overhead. movem might be faster still
+ * For more than 15 bytes, we try to align the write direction on a
+ * longword boundary to get maximum speed. This is even more gruesome.
+ * Unaligned read/write used requires 68020+ - think this is a problem?
+ *
+ * Sorry!
+ */
+
+
+/* ++roman: I've optimized Robert's original versions in some minor
+ * aspects, e.g. moveq instead of movel, let gcc choose the registers,
+ * use movem in some places...
+ * For other modes than 1 plane, lots of more such assembler functions
+ * were needed (e.g. the ones using movep or expanding color values).
+ */
+
+/* ++andreas: more optimizations:
+   subl #65536,d0 replaced by clrw d0; subql #1,d0 for dbcc
+   addal is faster than addaw
+   movep is rather expensive compared to ordinary move's
+   some functions rewritten in C for clarity, no speed loss */
+
+static __inline__ void *mymemclear_small(void *s, size_t count)
+{
+   if (!count)
+      return(0);
+
+   __asm__ __volatile__(
+         "lsrl   #1,%1 ; jcc 1f ; moveb %2,%0@-\n\t"
+      "1: lsrl   #1,%1 ; jcc 1f ; movew %2,%0@-\n\t"
+      "1: lsrl   #1,%1 ; jcc 1f ; movel %2,%0@-\n\t"
+      "1: lsrl   #1,%1 ; jcc 1f ; movel %2,%0@- ; movel %2,%0@-\n\t"
+      "1: subql  #1,%1 ; jcs 3f\n\t"
+      "2: moveml %2/%3/%4/%5,%0@-\n\t"
+         "dbra %1,2b\n\t"
+      "3:"
+         : "=a" (s), "=d" (count)
+         :  "d" (0), "d" (0), "d" (0), "d" (0),
+            "0" ((char *)s+count), "1" (count)
+  );
+
+   return(0);
+}
+
+
+static __inline__ void *mymemclear(void *s, size_t count)
+{
+   if (!count)
+      return(0);
+
+   if (count < 16) {
+      __asm__ __volatile__(
+            "lsrl   #1,%1 ; jcc 1f ; clrb %0@+\n\t"
+         "1: lsrl   #1,%1 ; jcc 1f ; clrw %0@+\n\t"
+         "1: lsrl   #1,%1 ; jcc 1f ; clrl %0@+\n\t"
+         "1: lsrl   #1,%1 ; jcc 1f ; clrl %0@+ ; clrl %0@+\n\t"
+         "1:"
+            : "=a" (s), "=d" (count)
+            : "0" (s), "1" (count)
+     );
+   } else {
+      long tmp;
+      __asm__ __volatile__(
+            "movel %1,%2\n\t"
+            "lsrl   #1,%2 ; jcc 1f ; clrb %0@+ ; subqw #1,%1\n\t"
+            "lsrl   #1,%2 ; jcs 2f\n\t"  /* %0 increased=>bit 2 switched*/
+            "clrw   %0@+  ; subqw  #2,%1 ; jra 2f\n\t"
+         "1: lsrl   #1,%2 ; jcc 2f\n\t"
+            "clrw   %0@+  ; subqw  #2,%1\n\t"
+         "2: movew %1,%2; lsrl #2,%1 ; jeq 6f\n\t"
+            "lsrl   #1,%1 ; jcc 3f ; clrl %0@+\n\t"
+         "3: lsrl   #1,%1 ; jcc 4f ; clrl %0@+ ; clrl %0@+\n\t"
+         "4: subql  #1,%1 ; jcs 6f\n\t"
+         "5: clrl %0@+; clrl %0@+ ; clrl %0@+ ; clrl %0@+\n\t"
+            "dbra %1,5b   ; clrw %1; subql #1,%1; jcc 5b\n\t"
+         "6: movew %2,%1; btst #1,%1 ; jeq 7f ; clrw %0@+\n\t"
+         "7:            ; btst #0,%1 ; jeq 8f ; clrb %0@+\n\t"
+         "8:"
+            : "=a" (s), "=d" (count), "=d" (tmp)
+            : "0" (s), "1" (count)
+     );
+   }
+
+   return(0);
+}
+
+
+static __inline__ void *mymemset(void *s, size_t count)
+{
+   if (!count)
+      return(0);
+
+   __asm__ __volatile__(
+         "lsrl   #1,%1 ; jcc 1f ; moveb %2,%0@-\n\t"
+      "1: lsrl   #1,%1 ; jcc 1f ; movew %2,%0@-\n\t"
+      "1: lsrl   #1,%1 ; jcc 1f ; movel %2,%0@-\n\t"
+      "1: lsrl   #1,%1 ; jcc 1f ; movel %2,%0@- ; movel %2,%0@-\n\t"
+      "1: subql  #1,%1 ; jcs 3f\n\t"
+      "2: moveml %2/%3/%4/%5,%0@-\n\t"
+         "dbra %1,2b\n\t"
+      "3:"
+         : "=a" (s), "=d" (count)
+         :  "d" (-1), "d" (-1), "d" (-1), "d" (-1),
+            "0" ((char *) s + count), "1" (count)
+  );
+
+   return(0);
+}
+
+
+static __inline__ void *mymemmove(void *d, const void *s, size_t count)
+{
+   if (d < s) {
+      if (count < 16) {
+         __asm__ __volatile__(
+               "lsrl   #1,%2 ; jcc 1f ; moveb %1@+,%0@+\n\t"
+            "1: lsrl   #1,%2 ; jcc 1f ; movew %1@+,%0@+\n\t"
+            "1: lsrl   #1,%2 ; jcc 1f ; movel %1@+,%0@+\n\t"
+            "1: lsrl   #1,%2 ; jcc 1f ; movel %1@+,%0@+ ; movel %1@+,%0@+\n\t"
+            "1:"
+               : "=a" (d), "=a" (s), "=d" (count)
+               : "0" (d), "1" (s), "2" (count)
+        );
+      } else {
+         long tmp;
+         __asm__ __volatile__(
+               "movel  %0,%3\n\t"
+               "lsrl   #1,%3 ; jcc 1f ; moveb %1@+,%0@+ ; subqw #1,%2\n\t"
+               "lsrl   #1,%3 ; jcs 2f\n\t"  /* %0 increased=>bit 2 switched*/
+               "movew  %1@+,%0@+  ; subqw  #2,%2 ; jra 2f\n\t"
+            "1: lsrl   #1,%3 ; jcc 2f\n\t"
+               "movew  %1@+,%0@+  ; subqw  #2,%2\n\t"
+            "2: movew  %2,%-; lsrl #2,%2 ; jeq 6f\n\t"
+               "lsrl   #1,%2 ; jcc 3f ; movel %1@+,%0@+\n\t"
+            "3: lsrl   #1,%2 ; jcc 4f ; movel %1@+,%0@+ ; movel %1@+,%0@+\n\t"
+            "4: subql  #1,%2 ; jcs 6f\n\t"
+            "5: movel  %1@+,%0@+;movel %1@+,%0@+\n\t"
+               "movel  %1@+,%0@+;movel %1@+,%0@+\n\t"
+               "dbra   %2,5b ; clrw %2; subql #1,%2; jcc 5b\n\t"
+            "6: movew  %+,%2; btst #1,%2 ; jeq 7f ; movew %1@+,%0@+\n\t"
+            "7:              ; btst #0,%2 ; jeq 8f ; moveb %1@+,%0@+\n\t"
+            "8:"
+               : "=a" (d), "=a" (s), "=d" (count), "=d" (tmp)
+               : "0" (d), "1" (s), "2" (count)
+        );
+      }
+   } else {
+      if (count < 16) {
+         __asm__ __volatile__(
+               "lsrl   #1,%2 ; jcc 1f ; moveb %1@-,%0@-\n\t"
+            "1: lsrl   #1,%2 ; jcc 1f ; movew %1@-,%0@-\n\t"
+            "1: lsrl   #1,%2 ; jcc 1f ; movel %1@-,%0@-\n\t"
+            "1: lsrl   #1,%2 ; jcc 1f ; movel %1@-,%0@- ; movel %1@-,%0@-\n\t"
+            "1:"
+               : "=a" (d), "=a" (s), "=d" (count)
+               : "0" ((char *) d + count), "1" ((char *) s + count), "2" (count)
+        );
+      } else {
+         long tmp;
+         __asm__ __volatile__(
+               "movel %0,%3\n\t"
+               "lsrl   #1,%3 ; jcc 1f ; moveb %1@-,%0@- ; subqw #1,%2\n\t"
+               "lsrl   #1,%3 ; jcs 2f\n\t"  /* %0 increased=>bit 2 switched*/
+               "movew  %1@-,%0@-  ; subqw  #2,%2 ; jra 2f\n\t"
+            "1: lsrl   #1,%3 ; jcc 2f\n\t"
+               "movew  %1@-,%0@-  ; subqw  #2,%2\n\t"
+            "2: movew %2,%-; lsrl #2,%2 ; jeq 6f\n\t"
+               "lsrl   #1,%2 ; jcc 3f ; movel %1@-,%0@-\n\t"
+            "3: lsrl   #1,%2 ; jcc 4f ; movel %1@-,%0@- ; movel %1@-,%0@-\n\t"
+            "4: subql  #1,%2 ; jcs 6f\n\t"
+            "5: movel %1@-,%0@-;movel %1@-,%0@-\n\t"
+               "movel %1@-,%0@-;movel %1@-,%0@-\n\t"
+               "dbra %2,5b ; clrw %2; subql #1,%2; jcc 5b\n\t"
+            "6: movew %+,%2; btst #1,%2 ; jeq 7f ; movew %1@-,%0@-\n\t"
+            "7:              ; btst #0,%2 ; jeq 8f ; moveb %1@-,%0@-\n\t"
+            "8:"
+               : "=a" (d), "=a" (s), "=d" (count), "=d" (tmp)
+               : "0" ((char *) d + count), "1" ((char *) s + count), "2" (count)
+        );
+      }
+   }
+
+   return(0);
+}
+
+
+/* ++andreas: Simple and fast version of memmove, assumes size is
+   divisible by 16, suitable for moving the whole screen bitplane */
+static __inline__ void fast_memmove(char *dst, const char *src, size_t size)
+{
+  if (!size)
+    return;
+  if (dst < src)
+    __asm__ __volatile__
+      ("1:"
+       "  moveml %0@+,%/d0/%/d1/%/a0/%/a1\n"
+       "  moveml %/d0/%/d1/%/a0/%/a1,%1@\n"
+       "  addql #8,%1; addql #8,%1\n"
+       "  dbra %2,1b\n"
+       "  clrw %2; subql #1,%2\n"
+       "  jcc 1b"
+       : "=a" (src), "=a" (dst), "=d" (size)
+       : "0" (src), "1" (dst), "2" (size / 16 - 1)
+       : "d0", "d1", "a0", "a1", "memory");
+  else
+    __asm__ __volatile__
+      ("1:"
+       "  subql #8,%0; subql #8,%0\n"
+       "  moveml %0@,%/d0/%/d1/%/a0/%/a1\n"
+       "  moveml %/d0/%/d1/%/a0/%/a1,%1@-\n"
+       "  dbra %2,1b\n"
+       "  clrw %2; subql #1,%2\n"
+       "  jcc 1b"
+       : "=a" (src), "=a" (dst), "=d" (size)
+       : "0" (src + size), "1" (dst + size), "2" (size / 16 - 1)
+       : "d0", "d1", "a0", "a1", "memory");
+}
+
+#else /* !m68k */
+
+    /*
+     *  Anyone who'd like to write asm functions for other CPUs?
+     */
+
+static __inline__ void *mymemclear_small(void *s, size_t count)
+{
+    return(memset(s, 0, count);
+}
+
+static __inline__ void *mymemclear(void *s, size_t count)
+{
+    return(memset(s, 0, count);
+}
+
+static __inline__ void *mymemset(void *s, size_t count)
+{
+    return(memset(s, 255, count);
+}
+
+static __inline__ void *mymemmove(void *d, const void *s, size_t count)
+{
+    return(memmove(d, s, count);
+}
+
+static __inline__ void fast_memmove(char *dst, const char *src, size_t size)
+{
+    return(memmove(dst, src, size);
+}
+
+#endif /* !m68k */
--- linux-2.1.42/drivers/video/fonts.c.orig	Mon Jun  9 23:02:58 1997
+++ linux-2.1.42/drivers/video/fonts.c	Mon Jun  9 23:02:58 1997
@@ -0,0 +1,108 @@
+
+/*
+ * linux/drivers/fb/fonts.c -- `Soft' font definitions
+ *
+ *    Created 1995 by Geert Uytterhoeven
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file COPYING in the main directory of this archive
+ * for more details.
+ */
+
+
+#include <linux/types.h>
+#include <linux/string.h>
+#include <asm/setup.h>
+#include <asm/font.h>
+
+
+   /*
+    *    External Font Definitions
+    */
+
+/* VGA8x8 */
+extern char fontname_8x8[];
+extern int fontwidth_8x8, fontheight_8x8;
+extern u_char fontdata_8x8[];
+
+/* VGA8x16 */
+extern char fontname_8x16[];
+extern int fontwidth_8x16, fontheight_8x16;
+extern u_char fontdata_8x16[];
+
+/* PEARL8x8 */
+extern char fontname_pearl8x8[];
+extern int fontwidth_pearl8x8, fontheight_pearl8x8;
+extern u_char fontdata_pearl8x8[];
+
+
+   /*
+    *    Font Descriptor Array
+    */
+
+struct softfontdesc {
+   char *name;
+   int *width;
+   int *height;
+   u_char *data;
+};
+
+#define VGA8x8_IDX	0
+#define VGA8x16_IDX	1
+#define PEARL8x8_IDX	2
+
+static struct softfontdesc softfonts[] = {
+   { fontname_8x8, &fontwidth_8x8, &fontheight_8x8, fontdata_8x8 },
+   { fontname_8x16, &fontwidth_8x16, &fontheight_8x16, fontdata_8x16 },
+   { fontname_pearl8x8, &fontwidth_pearl8x8, &fontheight_pearl8x8,
+     fontdata_pearl8x8 },
+};
+
+static u_long numsoftfonts = sizeof(softfonts)/sizeof(*softfonts);
+
+
+   /*
+    *    Find a font with a specific name
+    */
+
+int findsoftfont(char *name, int *width, int *height, u_char *data[])
+{
+   int i;
+
+   for (i = 0; i < numsoftfonts; i++)
+      if (!strcmp(softfonts[i].name, name)) {
+         if (width)
+            *width = *softfonts[i].width;
+         if (height)
+            *height = *softfonts[i].height;
+         if (data)
+            *data = softfonts[i].data;
+			return(1);
+      }
+	return(0);
+}
+
+
+   /*
+    *    Get the default font for a specific screen size
+    */
+
+void getdefaultfont(int xres, int yres, char *name[], int *width, int *height,
+                    u_char *data[])
+{
+    int i;
+    
+    if (yres < 400)
+	i = MACH_IS_AMIGA ? PEARL8x8_IDX : VGA8x8_IDX;
+    else
+	i = VGA8x16_IDX;
+
+    if (name)
+	*name = softfonts[i].name;
+    if (width)
+	*width = *softfonts[i].width;
+    if (height)
+	*height = *softfonts[i].height;
+    if (data)
+	*data = softfonts[i].data;
+}
--- linux-2.1.42/drivers/video/vfb.c.orig	Mon Jun  9 23:02:58 1997
+++ linux-2.1.42/drivers/video/vfb.c	Thu Jun 12 22:48:44 1997
@@ -0,0 +1,808 @@
+/*
+ *  linux/drivers/fb/vfb.c -- Virtual frame buffer device
+ *
+ *	Copyright (C) 1997 Geert Uytterhoeven
+ *
+ *  This file is subject to the terms and conditions of the GNU General Public
+ *  License. See the file COPYING in the main directory of this archive for
+ *  more details.
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/string.h>
+#include <linux/mm.h>
+#include <linux/tty.h>
+#include <linux/malloc.h>
+#include <linux/vmalloc.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <asm/uaccess.h>
+#include <linux/fb.h>
+
+
+#define arraysize(x)	(sizeof(x)/sizeof(*(x)))
+
+
+    /*
+     *  RAM we reserve for the frame buffer. This defines the maximum screen
+     *  size
+     *
+     *  This can be overridden if the driver is compiled as a module
+     *  (Grrr... doesn't work yet :-(
+     */
+
+#define VIDEOMEMSIZE	(1*1024*1024)	/* 1 MB */
+
+static u_long videomemory, videomemorysize = VIDEOMEMSIZE;
+static int currcon = 0;
+static struct display disp;
+static struct fb_info fb_info;
+static struct { u_char red, green, blue, pad; } palette[256];
+static char virtual_fb_name[16] = "Virtual FB";
+
+static struct fb_var_screeninfo virtual_fb_predefined[] = {
+
+    /*
+     *  Autodetect (Default) Video Mode
+     */
+
+    {
+	/* 640x480, 8 bpp */
+	640, 480, 640, 480, 0, 0, 8, 0,
+	{0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
+	0, 0, -1, -1, FB_ACCEL_NONE, 20000, 64, 64, 32, 32, 64, 2,
+	0, FB_VMODE_NONINTERLACED
+    },
+
+    /*
+     *  User Defined Video Modes (8)
+     */
+
+    { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }
+};
+
+#define NUM_USER_MODES		(8)
+#define NUM_TOTAL_MODES		arraysize(virtual_fb_predefined)
+#define NUM_PREDEF_MODES	(1)
+
+
+    /*
+     *  Default Colormaps
+     */
+
+static u_short red2[] =
+    { 0x0000, 0xc000 };
+static u_short green2[] =
+    { 0x0000, 0xc000 };
+static u_short blue2[] =
+    { 0x0000, 0xc000 };
+
+static u_short red16[] =
+    { 0x0000, 0x0000, 0x0000, 0x0000, 0xc000, 0xc000, 0xc000, 0xc000,
+      0x8000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff };
+static u_short green16[] =
+    { 0x0000, 0x0000, 0xc000, 0xc000, 0x0000, 0x0000, 0xc000, 0xc000,
+      0x8000, 0x0000, 0xffff, 0xffff, 0x0000, 0x0000, 0xffff, 0xffff };
+static u_short blue16[] =
+    { 0x0000, 0xc000, 0x0000, 0xc000, 0x0000, 0xc000, 0x0000, 0xc000,
+      0x8000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff };
+
+
+static struct fb_cmap default_2_colors =
+    { 0, 2, red2, green2, blue2, NULL };
+static struct fb_cmap default_16_colors =
+    { 0, 16, red16, green16, blue16, NULL };
+
+
+    /*
+     *  Interface used by the world
+     */
+
+void vfb_video_setup(char *options, int *ints);
+
+static int virtual_fb_open(int fbidx);
+static int virtual_fb_release(int fbidx);
+static int virtual_fb_get_fix(struct fb_fix_screeninfo *fix, int con);
+static int virtual_fb_get_var(struct fb_var_screeninfo *var, int con);
+static int virtual_fb_set_var(struct fb_var_screeninfo *var, int con);
+static int virtual_fb_pan_display(struct fb_var_screeninfo *var, int con);
+static int virtual_fb_get_cmap(struct fb_cmap *cmap, int kspc, int con);
+static int virtual_fb_set_cmap(struct fb_cmap *cmap, int kspc, int con);
+static int virtual_fb_ioctl(struct inode *inode, struct file *file, u_int cmd,
+			    u_long arg, int con);
+
+
+    /*
+     *  Interface to the low level console driver
+     */
+
+int vfb_fb_init(u_long *mem_start);
+static int vfbcon_switch(int con);
+static int vfbcon_updatevar(int con);
+static void vfbcon_blank(int blank);
+static int vfbcon_setcmap(struct fb_cmap *cmap, int con);
+
+
+    /*
+     *  Internal routines
+     */
+
+static u_long get_line_length(int xres_virtual, int bpp);
+static void vfb_encode_fix(struct fb_fix_screeninfo *fix,
+			   struct fb_var_screeninfo *var);
+static void set_color_bitfields(struct fb_var_screeninfo *var);
+static struct fb_cmap *get_default_colormap(int bpp);
+static int do_fb_get_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
+                          int kspc);
+static int do_fb_set_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
+                          int kspc);
+static void do_install_cmap(int con);
+static void memcpy_fs(int fsfromto, void *to, void *from, int len);
+static void copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto);
+static int alloc_cmap(struct fb_cmap *cmap, int len, int transp);
+
+
+static struct fb_ops virtual_fb_ops = {
+    virtual_fb_open, virtual_fb_release, virtual_fb_get_fix,
+    virtual_fb_get_var, virtual_fb_set_var, virtual_fb_get_cmap,
+    virtual_fb_set_cmap, virtual_fb_pan_display, virtual_fb_ioctl
+};
+
+
+    /*
+     *  Open/Release the frame buffer device
+     */
+
+static int virtual_fb_open(int fbidx)                                       
+{
+    /*                                                                     
+     *  Nothing, only a usage count for the moment                          
+     */                                                                    
+
+    MOD_INC_USE_COUNT;
+    return(0);                              
+}
+        
+static int virtual_fb_release(int fbidx)
+{
+    MOD_DEC_USE_COUNT;
+    return(0);                                                    
+}
+
+
+    /*
+     *  Get the Fixed Part of the Display
+     */
+
+static int virtual_fb_get_fix(struct fb_fix_screeninfo *fix, int con)
+{
+    struct fb_var_screeninfo *var;
+
+    if (con == -1)
+	var = &virtual_fb_predefined[0];
+    else
+	var = &fb_display[con].var;
+    vfb_encode_fix(fix, var);
+    return 0;
+}
+
+
+    /*
+     *  Get the User Defined Part of the Display
+     */
+
+static int virtual_fb_get_var(struct fb_var_screeninfo *var, int con)
+{
+    if (con == -1)
+	*var = virtual_fb_predefined[0];
+    else
+	*var = fb_display[con].var;
+    set_color_bitfields(var);
+    return 0;
+}
+
+
+    /*
+     *  Set the User Defined Part of the Display
+     */
+
+static int virtual_fb_set_var(struct fb_var_screeninfo *var, int con)
+{
+    int err, activate = var->activate;
+    int oldxres, oldyres, oldvxres, oldvyres, oldbpp;
+    u_long line_length;
+
+    struct display *display;
+    if (con >= 0)
+	display = &fb_display[con];
+    else
+	display = &disp;	/* used during initialization */
+
+    /*
+     *  FB_VMODE_CONUPDATE and FB_VMODE_SMOOTH_XPAN are equal!
+     *  as FB_VMODE_SMOOTH_XPAN is only used internally
+     */
+
+    if (var->vmode & FB_VMODE_CONUPDATE) {
+	var->vmode |= FB_VMODE_YWRAP;
+	var->xoffset = display->var.xoffset;
+	var->yoffset = display->var.yoffset;
+    }
+
+    /*
+     *  Some very basic checks
+     */
+    if (!var->xres)
+	var->xres = 1;
+    if (!var->yres)
+	var->yres = 1;
+    if (var->xres > var->xres_virtual)
+	var->xres_virtual = var->xres;
+    if (var->yres > var->yres_virtual)
+	var->yres_virtual = var->yres;
+    if (var->bits_per_pixel <= 1)
+	var->bits_per_pixel = 1;
+    else if (var->bits_per_pixel <= 8)
+	var->bits_per_pixel = 8;
+    else if (var->bits_per_pixel <= 16)
+	var->bits_per_pixel = 16;
+#if 0
+    /* fbcon doesn't support this (yet) */
+    else if (var->bits_per_pixel <= 24)
+	var->bits_per_pixel = 24;
+    else if (var->bits_per_pixel <= 32)
+	var->bits_per_pixel = 32;
+#endif
+    else
+	return -EINVAL;
+
+    /*
+     *  Memory limit
+     */
+    line_length = get_line_length(var->xres_virtual, var->bits_per_pixel);
+    if (line_length*var->yres_virtual > videomemorysize)
+	return -ENOMEM;
+
+    set_color_bitfields(var);
+
+    if ((activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) {
+	oldxres = display->var.xres;
+	oldyres = display->var.yres;
+	oldvxres = display->var.xres_virtual;
+	oldvyres = display->var.yres_virtual;
+	oldbpp = display->var.bits_per_pixel;
+	display->var = *var;
+	if (oldxres != var->xres || oldyres != var->yres ||
+	    oldvxres != var->xres_virtual || oldvyres != var->yres_virtual ||
+	    oldbpp != var->bits_per_pixel) {
+	    struct fb_fix_screeninfo fix;
+
+	    vfb_encode_fix(&fix, var);
+	    display->screen_base = (u_char *)fix.smem_start;
+	    display->visual = fix.visual;
+	    display->type = fix.type;
+	    display->type_aux = fix.type_aux;
+	    display->ypanstep = fix.ypanstep;
+	    display->ywrapstep = fix.ywrapstep;
+	    display->line_length = fix.line_length;
+	    display->can_soft_blank = 1;
+	    display->inverse = 0;
+	    if (fb_info.changevar)
+		(*fb_info.changevar)(con);
+	}
+	if (oldbpp != var->bits_per_pixel) {
+	    if ((err = alloc_cmap(&display->cmap, 0, 0)))
+		return err;
+	    do_install_cmap(con);
+	}
+    }
+    return 0;
+}
+
+
+    /*
+     *  Pan or Wrap the Display
+     *
+     *  This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
+     */
+
+static int virtual_fb_pan_display(struct fb_var_screeninfo *var, int con)
+{
+    if (var->vmode & FB_VMODE_YWRAP) {
+	if (var->yoffset < 0 ||
+	    var->yoffset >= fb_display[con].var.yres_virtual ||
+	    var->xoffset)
+	    return -EINVAL;
+    } else {
+	if (var->xoffset+fb_display[con].var.xres >
+	    fb_display[con].var.xres_virtual ||
+	    var->yoffset+fb_display[con].var.yres >
+	    fb_display[con].var.yres_virtual)
+	    return -EINVAL;
+    }
+    fb_display[con].var.xoffset = var->xoffset;
+    fb_display[con].var.yoffset = var->yoffset;
+    if (var->vmode & FB_VMODE_YWRAP)
+	fb_display[con].var.vmode |= FB_VMODE_YWRAP;
+    else
+	fb_display[con].var.vmode &= ~FB_VMODE_YWRAP;
+    return 0;
+}
+
+    /*
+     *  Get the Colormap
+     */
+
+static int virtual_fb_get_cmap(struct fb_cmap *cmap, int kspc, int con)
+{
+    if (con == currcon) /* current console? */
+	return do_fb_get_cmap(cmap, &fb_display[con].var, kspc);
+    else if (fb_display[con].cmap.len) /* non default colormap? */
+	copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
+    else
+	copy_cmap(get_default_colormap(fb_display[con].var.bits_per_pixel),
+		  cmap, kspc ? 0 : 2);
+    return 0;
+}
+
+    /*
+     *  Set the Colormap
+     */
+
+static int virtual_fb_set_cmap(struct fb_cmap *cmap, int kspc, int con)
+{
+    int err;
+
+    if (!fb_display[con].cmap.len) {	/* no colormap allocated? */
+	if ((err = alloc_cmap(&fb_display[con].cmap,
+			      1<<fb_display[con].var.bits_per_pixel, 0)))
+	    return err;
+    }
+    if (con == currcon)			/* current console? */
+	return do_fb_set_cmap(cmap, &fb_display[con].var, kspc);
+    else
+	copy_cmap(cmap, &fb_display[con].cmap, kspc ? 0 : 1);
+    return 0;
+}
+
+
+    /*
+     *  Virtual Frame Buffer Specific ioctls
+     */
+
+static int virtual_fb_ioctl(struct inode *inode, struct file *file, u_int cmd,
+			    u_long arg, int con)
+{
+    return -EINVAL;
+}
+
+
+void vfb_video_setup(char *options, int *ints)
+{
+    char *this_opt;
+
+    fb_info.fontname[0] = '\0';
+
+    if (!options || !*options)
+	return;
+
+    for (this_opt = strtok(options, ","); this_opt;
+	 this_opt = strtok(NULL, ",")) {
+	if (!strncmp(this_opt, "font:", 5))
+	    strcpy(fb_info.fontname, this_opt+5);
+    }
+}
+
+
+    /*
+     *  Initialisation
+     */
+
+int vfb_fb_init(u_long *mem_start)
+{
+    int err;
+
+    if (mem_start) {
+	videomemory = *mem_start;
+	*mem_start += videomemorysize;
+    } else
+	videomemory = (u_long)vmalloc(videomemorysize);
+
+    if (!videomemory)
+	return -ENOMEM;
+
+    strcpy(fb_info.modename, virtual_fb_name);
+    fb_info.changevar = NULL;
+    fb_info.node = -1;
+    fb_info.fbops = &virtual_fb_ops;
+    fb_info.fbvar_num = NUM_TOTAL_MODES;
+    fb_info.fbvar = virtual_fb_predefined;
+    fb_info.disp = &disp;
+    fb_info.switch_con = &vfbcon_switch;
+    fb_info.updatevar = &vfbcon_updatevar;
+    fb_info.blank = &vfbcon_blank;
+    fb_info.setcmap = &vfbcon_setcmap;
+
+    err = register_framebuffer(&fb_info);
+    if (err < 0)
+	return(err);
+
+    virtual_fb_set_var(&virtual_fb_predefined[0], -1);
+
+    printk("Virtual frame buffer device, using %ldK of video memory\n",
+	   videomemorysize>>10);
+    return 0;
+}
+
+
+static int vfbcon_switch(int con)
+{
+    /* Do we have to save the colormap? */
+    if (fb_display[currcon].cmap.len)
+	    do_fb_get_cmap(&fb_display[currcon].cmap, &fb_display[currcon].var, 1);
+
+    currcon = con;
+    /* Install new colormap */
+    do_install_cmap(con);
+    return 0;
+}
+
+    /*
+     *  Update the `var' structure (called by fbcon.c)
+     */
+
+static int vfbcon_updatevar(int con)
+{
+    /* Nothing */
+    return 0;
+}
+
+    /*
+     *  Blank the display.
+     */
+
+static void vfbcon_blank(int blank)
+{
+    /* Nothing */
+}
+
+    /*
+     *  Set the colormap
+     */
+
+static int vfbcon_setcmap(struct fb_cmap *cmap, int con)
+{
+    return(virtual_fb_set_cmap(cmap, 1, con));
+}
+
+
+static u_long get_line_length(int xres_virtual, int bpp)
+{
+    u_long length;
+    
+    length = (xres_virtual+bpp-1)/bpp;
+    length = (length+31)&-32;
+    length >>= 3;
+    return(length);
+}
+
+static void vfb_encode_fix(struct fb_fix_screeninfo *fix,
+			   struct fb_var_screeninfo *var)
+{
+    strcpy(fix->id, virtual_fb_name);
+    fix->smem_start = videomemory;
+    fix->smem_len = videomemorysize;
+    fix->type = FB_TYPE_PACKED_PIXELS;
+    fix->type_aux = 0;
+    switch (var->bits_per_pixel) {
+	case 1:
+	    fix->visual = FB_VISUAL_MONO01;
+	    break;
+	case 8:
+	    fix->visual = FB_VISUAL_PSEUDOCOLOR;
+	    break;
+	case 16:
+	case 24:
+	case 32:
+	    fix->visual = FB_VISUAL_TRUECOLOR;
+	    break;
+    }
+    fix->ywrapstep = 1;
+    fix->xpanstep = 1;
+    fix->ypanstep = 1;
+    fix->line_length = get_line_length(var->xres_virtual, var->bits_per_pixel);
+    memset(fix->reserved, 0, sizeof(fix->reserved));
+}
+
+static void set_color_bitfields(struct fb_var_screeninfo *var)
+{
+    switch (var->bits_per_pixel) {
+	case 1:
+	case 8:
+	    var->red.offset = 0;
+	    var->red.length = 8;
+	    var->green.offset = 0;
+	    var->green.length = 8;
+	    var->blue.offset = 0;
+	    var->blue.length = 8;
+	    var->transp.offset = 0;
+	    var->transp.length = 0;
+	    break;
+	case 16:	/* RGB 565 */
+	    var->red.offset = 0;
+	    var->red.length = 5;
+	    var->green.offset = 5;
+	    var->green.length = 6;
+	    var->blue.offset = 11;
+	    var->blue.length = 5;
+	    var->transp.offset = 0;
+	    var->transp.length = 0;
+	    break;
+	case 24:	/* RGB 888 */
+	    var->red.offset = 0;
+	    var->red.length = 8;
+	    var->green.offset = 8;
+	    var->green.length = 8;
+	    var->blue.offset = 16;
+	    var->blue.length = 8;
+	    var->transp.offset = 0;
+	    var->transp.length = 0;
+	    break;
+	case 32:	/* RGBA 8888 */
+	    var->red.offset = 0;
+	    var->red.length = 8;
+	    var->green.offset = 8;
+	    var->green.length = 8;
+	    var->blue.offset = 16;
+	    var->blue.length = 8;
+	    var->transp.offset = 24;
+	    var->transp.length = 8;
+	    break;
+    }
+    var->red.msb_right = 0;
+    var->green.msb_right = 0;
+    var->blue.msb_right = 0;
+    var->transp.msb_right = 0;
+}
+
+
+static struct fb_cmap *get_default_colormap(int bpp)
+{
+    switch (bpp) {
+	case 1:
+	    return &default_2_colors;
+	    break;
+	default:
+	    return &default_16_colors;
+	    break;
+    }
+}
+
+#define CNVT_TOHW(val,width)	((((val)<<(width))+0x7fff-(val))>>16)
+#define CNVT_FROMHW(val,width)	(((width) ? ((((val)<<16)-(val)) / \
+                                            ((1<<(width))-1)) : 0))
+
+    /*
+     *  Read a single color register and split it into
+     *  colors/transparent. Return != 0 for invalid regno.
+     */
+
+static int vfb_getcolreg(u_int regno, u_int *red, u_int *green, u_int *blue,
+                         u_int *transp)
+{
+    if (regno > 255)
+	return 1;
+    *red = palette[regno].red;
+    *green = palette[regno].green;
+    *blue = palette[regno].blue;
+    return 0;
+}
+
+
+    /*
+     *  Set a single color register. The values supplied are already
+     *  rounded down to the hardware's capabilities (according to the
+     *  entries in the var structure). Return != 0 for invalid regno.
+     */
+
+static int vfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
+                         u_int transp)
+{
+    if (regno > 255)
+	return 1;
+    palette[regno].red = red;
+    palette[regno].green = green;
+    palette[regno].blue = blue;
+    return 0;
+}
+
+
+static int do_fb_get_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
+                          int kspc)
+{
+    int i, start;
+    u_short *red, *green, *blue, *transp;
+    u_int hred, hgreen, hblue, htransp;
+
+    red = cmap->red;
+    green = cmap->green;
+    blue = cmap->blue;
+    transp = cmap->transp;
+    start = cmap->start;
+    if (start < 0)
+	    return -EINVAL;
+    for (i = 0; i < cmap->len; i++) {
+	if (vfb_getcolreg(start++, &hred, &hgreen, &hblue, &htransp))
+	    return 0;
+	hred = CNVT_FROMHW(hred, var->red.length);
+	hgreen = CNVT_FROMHW(hgreen, var->green.length);
+	hblue = CNVT_FROMHW(hblue, var->blue.length);
+	htransp = CNVT_FROMHW(htransp, var->transp.length);
+	if (kspc) {
+	    *red = hred;
+	    *green = hgreen;
+	    *blue = hblue;
+	    if (transp)
+		*transp = htransp;
+	} else {
+	    put_user(hred, red);
+	    put_user(hgreen, green);
+	    put_user(hblue, blue);
+	    if (transp)
+		put_user(htransp, transp);
+	}
+	red++;
+	green++;
+	blue++;
+	if (transp)
+	    transp++;
+    }
+    return 0;
+}
+
+static int do_fb_set_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
+                          int kspc)
+{
+    int i, start;
+    u_short *red, *green, *blue, *transp;
+    u_int hred, hgreen, hblue, htransp;
+
+    red = cmap->red;
+    green = cmap->green;
+    blue = cmap->blue;
+    transp = cmap->transp;
+    start = cmap->start;
+
+    if (start < 0)
+	return -EINVAL;
+    for (i = 0; i < cmap->len; i++) {
+	if (kspc) {
+	    hred = *red;
+	    hgreen = *green;
+	    hblue = *blue;
+	    htransp = transp ? *transp : 0;
+	} else {
+	    get_user(hred, red);
+	    get_user(hgreen, green);
+	    get_user(hblue, blue);
+	    if (transp)
+		get_user(htransp, transp);
+	    else
+		htransp = 0;
+	}
+	hred = CNVT_TOHW(hred, var->red.length);
+	hgreen = CNVT_TOHW(hgreen, var->green.length);
+	hblue = CNVT_TOHW(hblue, var->blue.length);
+	htransp = CNVT_TOHW(htransp, var->transp.length);
+	red++;
+	green++;
+	blue++;
+	if (transp)
+	    transp++;
+	if (vfb_setcolreg(start++, hred, hgreen, hblue, htransp))
+	    return 0;
+    }
+    return 0;
+}
+
+static void do_install_cmap(int con)
+{
+    if (con != currcon)
+	return;
+    if (fb_display[con].cmap.len)
+	do_fb_set_cmap(&fb_display[con].cmap, &fb_display[con].var, 1);
+    else
+	do_fb_set_cmap(get_default_colormap(fb_display[con].var.bits_per_pixel),
+					    &fb_display[con].var, 1);
+}
+
+static void memcpy_fs(int fsfromto, void *to, void *from, int len)
+{
+    switch (fsfromto) {
+	case 0:
+	    memcpy(to, from, len);
+	    return;
+	case 1:
+	    copy_from_user(to, from, len);
+	    return;
+	case 2:
+	    copy_to_user(to, from, len);
+	    return;
+    }
+}
+
+static void copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto)
+{
+    int size;
+    int tooff = 0, fromoff = 0;
+
+    if (to->start > from->start)
+	fromoff = to->start-from->start;
+    else
+	tooff = from->start-to->start;
+    size = to->len-tooff;
+    if (size > from->len-fromoff)
+	size = from->len-fromoff;
+    if (size < 0)
+	return;
+    size *= sizeof(u_short);
+    memcpy_fs(fsfromto, to->red+tooff, from->red+fromoff, size);
+    memcpy_fs(fsfromto, to->green+tooff, from->green+fromoff, size);
+    memcpy_fs(fsfromto, to->blue+tooff, from->blue+fromoff, size);
+    if (from->transp && to->transp)
+	memcpy_fs(fsfromto, to->transp+tooff, from->transp+fromoff, size);
+}
+
+static int alloc_cmap(struct fb_cmap *cmap, int len, int transp)
+{
+    int size = len*sizeof(u_short);
+
+    if (cmap->len != len) {
+	if (cmap->red)
+	    kfree(cmap->red);
+	if (cmap->green)
+	    kfree(cmap->green);
+	if (cmap->blue)
+	    kfree(cmap->blue);
+	if (cmap->transp)
+	    kfree(cmap->transp);
+	cmap->red = cmap->green = cmap->blue = cmap->transp = NULL;
+	cmap->len = 0;
+	if (!len)
+	    return 0;
+	if (!(cmap->red = kmalloc(size, GFP_ATOMIC)))
+	    return -1;
+	if (!(cmap->green = kmalloc(size, GFP_ATOMIC)))
+	    return -1;
+	if (!(cmap->blue = kmalloc(size, GFP_ATOMIC)))
+	    return -1;
+	if (transp) {
+	    if (!(cmap->transp = kmalloc(size, GFP_ATOMIC)))
+		return -1;
+	} else
+	    cmap->transp = NULL;
+    }
+    cmap->start = 0;
+    cmap->len = len;
+    copy_cmap(get_default_colormap(len), cmap, 0);
+    return 0;
+}
+
+
+#ifdef MODULE
+int init_module(void)
+{
+    return(vfb_fb_init(NULL));
+}
+
+void cleanup_module(void)
+{
+#if 0
+    /* Not yet supported */
+    unregister_framebuffer(&fb_info);
+#endif
+}
+
+#endif /* MODULE */
--- linux-2.1.42/drivers/video/fbcon-cfb8.c.orig	Mon Jun  9 23:02:58 1997
+++ linux-2.1.42/drivers/video/fbcon-cfb8.c	Mon Jun  9 23:02:58 1997
@@ -0,0 +1,219 @@
+/*
+ *  linux/drivers/video/cfb8.c -- Low level frame buffer operations for 8 bpp
+ *				  packed pixels
+ *
+ *	Created 5 Apr 1997 by Geert Uytterhoeven
+ *
+ *  This file is subject to the terms and conditions of the GNU General Public
+ *  License.  See the file COPYING in the main directory of this archive for
+ *  more details.
+ */
+
+#include <linux/module.h>
+#include <linux/tty.h>
+#include <linux/console.h>
+#include <linux/string.h>
+#include <linux/config.h>
+#include <linux/fb.h>
+
+#include "fbcon.h"
+#include "../char/console_struct.h"
+
+
+    /*
+     *  Prototypes
+     */
+
+static int open_cfb8(struct display *p);
+static void release_cfb8(void);
+static void bmove_cfb8(struct display *p, int sy, int sx, int dy, int dx,
+		       int height, int width);
+static void clear_cfb8(struct vc_data *conp, struct display *p, int sy,
+		       int sx, int height, int width);
+static void putc_cfb8(struct vc_data *conp, struct display *p, int c, int yy,
+		      int xx);
+static void putcs_cfb8(struct vc_data *conp, struct display *p,
+		       const char *s, int count, int yy, int xx);
+static void rev_char_cfb8(struct display *p, int xx, int yy);
+
+
+    /*
+     *  `switch' for the low level operations
+     */
+
+static struct display_switch dispsw_cfb8 = {
+    open_cfb8, release_cfb8, bmove_cfb8, clear_cfb8, putc_cfb8, putcs_cfb8,
+    rev_char_cfb8
+};
+
+
+    /*
+     *  8 bpp packed pixels
+     */
+
+static u_long nibbletab_cfb8[] = {
+    0x00000000,0x000000ff,0x0000ff00,0x0000ffff,
+    0x00ff0000,0x00ff00ff,0x00ffff00,0x00ffffff,
+    0xff000000,0xff0000ff,0xff00ff00,0xff00ffff,
+    0xffff0000,0xffff00ff,0xffffff00,0xffffffff
+};
+
+static int open_cfb8(struct display *p)
+{
+    if (p->type != FB_TYPE_PACKED_PIXELS || p->var.bits_per_pixel != 8)
+	return -EINVAL;
+
+    p->next_line = p->var.xres_virtual;
+    p->next_plane = 0;
+    MOD_INC_USE_COUNT;
+    return 0;
+}
+
+static void release_cfb8(void)
+{
+    MOD_DEC_USE_COUNT;
+}
+
+static void bmove_cfb8(struct display *p, int sy, int sx, int dy, int dx,
+		       int height, int width)
+{
+    int bytes = p->next_line, linesize = bytes * p->fontheight, rows;
+    u_char *src,*dst;
+
+    if (sx == 0 && dx == 0 && width * 8 == bytes)
+	mymemmove(p->screen_base + dy * linesize,
+		  p->screen_base + sy * linesize,
+		  height * linesize);
+    else if (dy < sy || (dy == sy && dx < sx)) {
+	src = p->screen_base + sy * linesize + sx * 8;
+	dst = p->screen_base + dy * linesize + dx * 8;
+	for (rows = height * p->fontheight ; rows-- ;) {
+	    mymemmove(dst, src, width * 8);
+	    src += bytes;
+	    dst += bytes;
+	}
+    } else {
+	src = p->screen_base + (sy+height) * linesize + sx * 8 - bytes;
+	dst = p->screen_base + (dy+height) * linesize + dx * 8 - bytes;
+	for (rows = height * p->fontheight ; rows-- ;) {
+	    mymemmove(dst, src, width * 8);
+	    src -= bytes;
+	    dst -= bytes;
+	}
+    }
+}
+
+static void clear_cfb8(struct vc_data *conp, struct display *p, int sy, int sx,
+		       int height, int width)
+{
+    u_char *dest0,*dest;
+    int bytes=p->next_line,lines=height * p->fontheight, rows, i;
+    u_long bgx;
+
+    dest = p->screen_base + sy * p->fontheight * bytes + sx * 8;
+
+    bgx=attr_bgcol_ec(p,conp);
+    bgx |= (bgx << 8);
+    bgx |= (bgx << 16);
+
+    if (sx == 0 && width * 8 == bytes)
+	for (i = 0 ; i < lines * width ; i++) {
+	    ((u_long *)dest)[0]=bgx;
+	    ((u_long *)dest)[1]=bgx;
+	    dest+=8;
+	}
+    else {
+	dest0=dest;
+	for (rows = lines; rows-- ; dest0 += bytes) {
+	    dest=dest0;
+	    for (i = 0 ; i < width ; i++) {
+		((u_long *)dest)[0]=bgx;
+		((u_long *)dest)[1]=bgx;
+		dest+=8;
+	    }
+	}
+    }
+}
+
+static void putc_cfb8(struct vc_data *conp, struct display *p, int c, int yy,
+		      int xx)
+{
+    u_char *dest,*cdat;
+    int bytes=p->next_line,rows;
+    ulong eorx,fgx,bgx;
+
+    c &= 0xff;
+
+    dest = p->screen_base + yy * p->fontheight * bytes + xx * 8;
+    cdat = p->fontdata + c * p->fontheight;
+
+    fgx=attr_fgcol(p,conp);
+    bgx=attr_bgcol(p,conp);
+    fgx |= (fgx << 8);
+    fgx |= (fgx << 16);
+    bgx |= (bgx << 8);
+    bgx |= (bgx << 16);
+    eorx = fgx ^ bgx;
+
+    for (rows = p->fontheight ; rows-- ; dest += bytes) {
+	((u_long *)dest)[0]= (nibbletab_cfb8[*cdat >> 4] & eorx) ^ bgx;
+	((u_long *)dest)[1]= (nibbletab_cfb8[*cdat++ & 0xf] & eorx) ^ bgx;
+    }
+}
+
+static void putcs_cfb8(struct vc_data *conp, struct display *p, const char *s,
+		       int count, int yy, int xx)
+{
+    u_char *cdat, c, *dest, *dest0;
+    int rows,bytes=p->next_line;
+    u_long eorx, fgx, bgx;
+
+    dest0 = p->screen_base + yy * p->fontheight * bytes + xx * 8;
+    fgx=attr_fgcol(p,conp);
+    bgx=attr_bgcol(p,conp);
+    fgx |= (fgx << 8);
+    fgx |= (fgx << 16);
+    bgx |= (bgx << 8);
+    bgx |= (bgx << 16);
+    eorx = fgx ^ bgx;
+    while (count--) {
+	c = *s++;
+	cdat = p->fontdata + c * p->fontheight;
+
+	for (rows = p->fontheight, dest = dest0; rows-- ; dest += bytes) {
+	    ((u_long *)dest)[0]= (nibbletab_cfb8[*cdat >> 4] & eorx) ^ bgx;
+	    ((u_long *)dest)[1]= (nibbletab_cfb8[*cdat++ & 0xf] & eorx) ^
+				 bgx;
+	}
+	dest0+=8;
+    }
+}
+
+static void rev_char_cfb8(struct display *p, int xx, int yy)
+{
+    u_char *dest;
+    int bytes=p->next_line, rows;
+
+    dest = p->screen_base + yy * p->fontheight * bytes + xx * 8;
+    for (rows = p->fontheight ; rows-- ; dest += bytes) {
+	((u_long *)dest)[0] ^= 0x0f0f0f0f;
+	((u_long *)dest)[1] ^= 0x0f0f0f0f;
+    }
+}
+
+
+#ifdef MODULE
+int init_module(void)
+#else
+int fbcon_init_cfb8(void)
+#endif
+{
+    return(fbcon_register_driver(&dispsw_cfb8, 0));
+}
+
+#ifdef MODULE
+void cleanup_module(void)
+{
+    fbcon_unregister_driver(&dispsw_cfb8);
+}
+#endif /* MODULE */
--- linux-2.1.42/drivers/video/fbcon-cyber.c.orig	Mon Jun  9 23:02:58 1997
+++ linux-2.1.42/drivers/video/fbcon-cyber.c	Mon Jun  9 23:02:58 1997
@@ -0,0 +1,229 @@
+/*
+ *  linux/drivers/video/cyber.c -- Low level frame buffer operations for the
+ *				   CyberVision64 (accelerated)
+ *
+ *	Created 5 Apr 1997 by Geert Uytterhoeven
+ *
+ *  This file is subject to the terms and conditions of the GNU General Public
+ *  License.  See the file COPYING in the main directory of this archive for
+ *  more details.
+ */
+
+#include <linux/module.h>
+#include <linux/tty.h>
+#include <linux/console.h>
+#include <linux/string.h>
+#include <linux/config.h>
+#include <linux/fb.h>
+
+#include "fbcon.h"
+#include "../char/console_struct.h"
+#include "s3blit.h"
+
+
+    /*
+     *  Prototypes
+     */
+
+static int open_cyber(struct display *p);
+static void release_cyber(void);
+static void bmove_cyber(struct display *p, int sy, int sx, int dy, int dx,
+	                int height, int width);
+static void clear_cyber(struct vc_data *conp, struct display *p, int sy, int sx,
+	                int height, int width);
+static void putc_cyber(struct vc_data *conp, struct display *p, int c, int yy,
+	               int xx);
+static void putcs_cyber(struct vc_data *conp, struct display *p, const char *s,
+	                int count, int yy, int xx);
+static void rev_char_cyber(struct display *p, int xx, int yy);
+
+
+    /*
+     *  Acceleration functions in cyberfb.c
+     */
+
+extern void Cyber_WaitQueue(u_short fifo);
+extern void Cyber_WaitBlit(void);
+extern void Cyber_BitBLT(u_short curx, u_short cury, u_short destx,
+	                 u_short desty, u_short width, u_short height,
+	                 u_short mode);
+extern void Cyber_RectFill(u_short xx, u_short yy, u_short width,
+			   u_short height, u_short mode, u_short fillcolor);
+extern void Cyber_MoveCursor(u_short xx, u_short yy);
+
+
+    /*
+     *  `switch' for the low level operations
+     */
+
+static struct display_switch dispsw_cyber = {
+   open_cyber, release_cyber, bmove_cyber, clear_cyber, putc_cyber,
+   putcs_cyber, rev_char_cyber
+};
+
+
+    /*
+     *  CyberVision64 (accelerated)
+     */
+
+static int open_cyber(struct display *p)
+{
+    if (p->type != FB_TYPE_PACKED_PIXELS ||
+	p->var.accel != FB_ACCEL_CYBERVISION)
+	return -EINVAL;
+
+    p->next_line = p->var.xres_virtual*p->var.bits_per_pixel>>3;
+    p->next_plane = 0;
+    MOD_INC_USE_COUNT;
+    return 0;
+}
+
+static void release_cyber(void)
+{
+    MOD_DEC_USE_COUNT;
+}
+
+static void bmove_cyber(struct display *p, int sy, int sx, int dy, int dx,
+	                int height, int width)
+{
+    sx *= 8; dx *= 8; width *= 8;
+    Cyber_BitBLT((u_short)sx, (u_short)(sy*p->fontheight), (u_short)dx,
+		 (u_short)(dy*p->fontheight), (u_short)width,
+		 (u_short)(height*p->fontheight), (u_short)S3_NEW);
+}
+
+static void clear_cyber(struct vc_data *conp, struct display *p, int
+			sy, int sx, int height, int width)
+{
+    unsigned char bg;
+
+    sx *= 8; width *= 8;
+    bg = attr_bgcol_ec(p,conp);
+    Cyber_RectFill((u_short)sx,
+		   (u_short)(sy*p->fontheight),
+		   (u_short)width,
+		   (u_short)(height*p->fontheight),
+		   (u_short)S3_NEW,
+		   (u_short)bg);
+}
+
+static void putc_cyber(struct vc_data *conp, struct display *p, int c, int yy,
+	               int xx)
+{
+    u_char *dest, *cdat;
+    u_long tmp;
+    u_int rows, revs, underl;
+    u_char d;
+    u_char fg, bg;
+
+    c &= 0xff;
+
+    dest = p->screen_base+yy*p->fontheight*p->next_line+8*xx;
+    cdat = p->fontdata+(c*p->fontheight);
+    fg = p->fgcol;
+    bg = p->bgcol;
+    revs = conp->vc_reverse;
+    underl = conp->vc_underline;
+
+    Cyber_WaitBlit();
+    for (rows = p->fontheight; rows--; dest += p->next_line) {
+	d = *cdat++;
+
+	if (underl && !rows)
+	    d = 0xff;
+	if (revs)
+	    d = ~d;
+
+	tmp =  ((d & 0x80) ? fg : bg) << 24;
+	tmp |= ((d & 0x40) ? fg : bg) << 16;
+	tmp |= ((d & 0x20) ? fg : bg) << 8;
+	tmp |= ((d & 0x10) ? fg : bg);
+	*((u_long*) dest) = tmp;
+	tmp =  ((d & 0x8) ? fg : bg) << 24;
+	tmp |= ((d & 0x4) ? fg : bg) << 16;
+	tmp |= ((d & 0x2) ? fg : bg) << 8;
+	tmp |= ((d & 0x1) ? fg : bg);
+	*((u_long*) dest + 1) = tmp;
+    }
+}
+
+static void putcs_cyber(struct vc_data *conp, struct display *p, const char *s,
+	                int count, int yy, int xx)
+{
+    u_char *dest, *dest0, *cdat;
+    u_long tmp;
+    u_int rows, underl;
+    u_char c, d;
+    u_char fg, bg;
+
+    dest0 = p->screen_base+yy*p->fontheight*p->next_line+8*xx;
+    fg = p->fgcol;
+    bg = p->bgcol;
+    underl = conp->vc_underline;
+
+    Cyber_WaitBlit();
+    while (count--) {
+	c = *s++;
+	dest = dest0;
+	dest0 += 8;
+	cdat = p->fontdata+(c*p->fontheight);
+	for (rows = p->fontheight; rows--; dest += p->next_line) {
+	    d = *cdat++;
+
+	    if (underl && !rows)
+		d = 0xff;
+
+	    tmp =  ((d & 0x80) ? fg : bg) << 24;
+	    tmp |= ((d & 0x40) ? fg : bg) << 16;
+	    tmp |= ((d & 0x20) ? fg : bg) << 8;
+	    tmp |= ((d & 0x10) ? fg : bg);
+	    *((u_long*) dest) = tmp;
+	    tmp =  ((d & 0x8) ? fg : bg) << 24;
+	    tmp |= ((d & 0x4) ? fg : bg) << 16;
+	    tmp |= ((d & 0x2) ? fg : bg) << 8;
+	    tmp |= ((d & 0x1) ? fg : bg);
+	    *((u_long*) dest + 1) = tmp;
+	}
+    }
+}
+
+
+static void rev_char_cyber(struct display *p, int xx, int yy)
+{
+    unsigned char *dest;
+    unsigned int rows;
+    unsigned char fg, bg;
+
+    fg = p->fgcol;
+    bg = p->bgcol;
+
+    dest = p->screen_base+yy*p->fontheight*p->next_line+8*xx;
+    Cyber_WaitBlit();
+    for (rows = p->fontheight; rows--; dest += p->next_line) {
+	*dest = (*dest == fg) ? bg : fg;
+	*(dest+1) = (*(dest + 1) == fg) ? bg : fg;
+	*(dest+2) = (*(dest + 2) == fg) ? bg : fg;
+	*(dest+3) = (*(dest + 3) == fg) ? bg : fg;
+	*(dest+4) = (*(dest + 4) == fg) ? bg : fg;
+	*(dest+5) = (*(dest + 5) == fg) ? bg : fg;
+	*(dest+6) = (*(dest + 6) == fg) ? bg : fg;
+	*(dest+7) = (*(dest + 7) == fg) ? bg : fg;
+    }
+}
+
+
+#ifdef MODULE
+int init_module(void)
+#else
+int fbcon_init_cyber(void)
+#endif
+{
+    return(fbcon_register_driver(&dispsw_cyber, 1));
+}
+
+#ifdef MODULE
+void cleanup_module(void)
+{
+    fbcon_unregister_driver(&dispsw_cyber);
+}
+#endif /* MODULE */
--- linux-2.1.42/drivers/video/fbcon-ilbm.c.orig	Mon Jun  9 23:02:58 1997
+++ linux-2.1.42/drivers/video/fbcon-ilbm.c	Mon Jun  9 23:02:58 1997
@@ -0,0 +1,302 @@
+/*
+ *  linux/drivers/video/ilbm.c -- Low level frame buffer operations for
+ *				  interleaved bitplanes  la Amiga
+ *
+ *	Created 5 Apr 1997 by Geert Uytterhoeven
+ *
+ *  This file is subject to the terms and conditions of the GNU General Public
+ *  License.  See the file COPYING in the main directory of this archive for
+ *  more details.
+ */
+
+#include <linux/module.h>
+#include <linux/tty.h>
+#include <linux/console.h>
+#include <linux/string.h>
+#include <linux/config.h>
+#include <linux/fb.h>
+
+#include "fbcon.h"
+#include "../char/console_struct.h"
+
+
+    /*
+     *  Prototypes
+     */
+
+static int open_ilbm(struct display *p);
+static void release_ilbm(void);
+static void bmove_ilbm(struct display *p, int sy, int sx, int dy, int dx,
+		       int height, int width);
+static void clear_ilbm(struct vc_data *conp, struct display *p, int sy, int sx,
+		       int height, int width);
+static void putc_ilbm(struct vc_data *conp, struct display *p, int c, int yy,
+		      int xx);
+static void putcs_ilbm(struct vc_data *conp, struct display *p, const char *s,
+		       int count, int yy, int xx);
+static void rev_char_ilbm(struct display *p, int xx, int yy);
+
+
+    /*
+     *  `switch' for the low level operations
+     */
+
+static struct display_switch dispsw_ilbm = {
+    open_ilbm, release_ilbm, bmove_ilbm, clear_ilbm, putc_ilbm, putcs_ilbm,
+    rev_char_ilbm
+};
+
+
+    /*
+     *  Interleaved bitplanes  la Amiga
+     *
+     *  This code heavily relies on the fact that
+     *
+     *      next_line == interleave == next_plane*bits_per_pixel
+     *
+     *  But maybe it can be merged with the code for normal bitplanes without
+     *  much performance loss?
+     */
+
+static int open_ilbm(struct display *p)
+{
+    if (p->type != FB_TYPE_INTERLEAVED_PLANES || p->type_aux == 2)
+	return -EINVAL;
+
+    if (p->line_length) {
+	p->next_line = p->line_length*p->var.bits_per_pixel;
+	p->next_plane = p->line_length;
+    } else {
+	p->next_line = p->type_aux;
+	p->next_plane = p->type_aux/p->var.bits_per_pixel;
+    }
+    MOD_INC_USE_COUNT;
+    return 0;
+}
+
+static void release_ilbm(void)
+{
+    MOD_DEC_USE_COUNT;
+}
+
+static void bmove_ilbm(struct display *p, int sy, int sx, int dy, int dx,
+		       int height, int width)
+{
+    if (sx == 0 && dx == 0 && width == p->next_plane)
+	mymemmove(p->screen_base+dy*p->fontheight*p->next_line,
+		  p->screen_base+sy*p->fontheight*p->next_line,
+		  height*p->fontheight*p->next_line);
+    else {
+	u_char *src, *dest;
+	u_int i;
+
+	if (dy <= sy) {
+	    src = p->screen_base+sy*p->fontheight*p->next_line+sx;
+	    dest = p->screen_base+dy*p->fontheight*p->next_line+dx;
+	    for (i = p->var.bits_per_pixel*height*p->fontheight; i--;) {
+		mymemmove(dest, src, width);
+		src += p->next_plane;
+		dest += p->next_plane;
+	    }
+	} else {
+	    src = p->screen_base+(sy+height)*p->fontheight*p->next_line+sx;
+	    dest = p->screen_base+(dy+height)*p->fontheight*p->next_line+dx;
+	    for (i = p->var.bits_per_pixel*height*p->fontheight; i--;) {
+		src -= p->next_plane;
+		dest -= p->next_plane;
+		mymemmove(dest, src, width);
+	    }
+	}
+    }
+}
+
+static void clear_ilbm(struct vc_data *conp, struct display *p, int sy, int sx,
+		       int height, int width)
+{
+    u_char *dest;
+    u_int i, rows;
+    int bg, bg0;
+
+    dest = p->screen_base+sy*p->fontheight*p->next_line+sx;
+
+    bg0 = attr_bgcol_ec(p,conp);
+    for (rows = height*p->fontheight; rows--;) {
+	bg = bg0;
+	for (i = p->var.bits_per_pixel; i--; dest += p->next_plane) {
+	    if (bg & 1)
+		mymemset(dest, width);
+	    else
+		mymemclear(dest, width);
+	    bg >>= 1;
+	}
+    }
+}
+
+static void putc_ilbm(struct vc_data *conp, struct display *p, int c, int yy,
+			     int xx)
+{
+    u_char *dest, *cdat;
+    u_int rows, i;
+    u_char d;
+    int fg0, bg0, fg, bg;
+
+    c &= 0xff;
+
+    dest = p->screen_base+yy*p->fontheight*p->next_line+xx;
+    cdat = p->fontdata+c*p->fontheight;
+    fg0 = attr_fgcol(p,conp);
+    bg0 = attr_bgcol(p,conp);
+
+    for (rows = p->fontheight; rows--;) {
+	d = *cdat++;
+	fg = fg0;
+	bg = bg0;
+	for (i = p->var.bits_per_pixel; i--; dest += p->next_plane) {
+	    if (bg & 1)
+		if (fg & 1)
+		    *dest = 0xff;
+		else
+		    *dest = ~d;
+	    else
+		if (fg & 1)
+		    *dest = d;
+		else
+		    *dest = 0x00;
+	    bg >>= 1;
+	    fg >>= 1;
+	}
+    }
+}
+
+    /*
+     *  I've split the console character loop in two parts:
+     *
+     *      - slow version: this blits one character at a time
+     *
+     *      - fast version: this blits 4 characters at a time at a longword
+     *			    aligned address, to reduce the number of expensive
+     *			    Chip RAM accesses.
+     *
+     *  Experiments on my A4000/040 revealed that this makes a console switch
+     *  on a 640x400 screen with 256 colors about 3 times faster.
+     *
+     *  -- Geert
+     */
+
+static void putcs_ilbm(struct vc_data *conp, struct display *p, const char *s,
+		       int count, int yy, int xx)
+{
+    u_char *dest0, *dest, *cdat1, *cdat2, *cdat3, *cdat4;
+    u_int rows, i;
+    u_char c1, c2, c3, c4;
+    u_long d;
+    int fg0, bg0, fg, bg;
+
+    dest0 = p->screen_base+yy*p->fontheight*p->next_line+xx;
+    fg0 = attr_fgcol(p,conp);
+    bg0 = attr_bgcol(p,conp);
+
+    while (count--)
+	if (xx&3 || count < 3) {	/* Slow version */
+	    c1 = *s++;
+	    dest = dest0++;
+	    xx++;
+
+	    cdat1 = p->fontdata+c1*p->fontheight;
+	    for (rows = p->fontheight; rows--;) {
+		d = *cdat1++;
+		fg = fg0;
+		bg = bg0;
+		for (i = p->var.bits_per_pixel; i--; dest += p->next_plane) {
+		    if (bg & 1)
+			if (fg & 1)
+			    *dest = 0xff;
+			else
+			    *dest = ~d;
+		    else
+			if (fg & 1)
+			    *dest = d;
+			else
+			    *dest = 0x00;
+		    bg >>= 1;
+		    fg >>= 1;
+		}
+	    }
+	} else {		/* Fast version */
+	    c1 = s[0];
+	    c2 = s[1];
+	    c3 = s[2];
+	    c4 = s[3];
+
+	    dest = dest0;
+	    cdat1 = p->fontdata+c1*p->fontheight;
+	    cdat2 = p->fontdata+c2*p->fontheight;
+	    cdat3 = p->fontdata+c3*p->fontheight;
+	    cdat4 = p->fontdata+c4*p->fontheight;
+	    for (rows = p->fontheight; rows--;) {
+		d = *cdat1++<<24 | *cdat2++<<16 | *cdat3++<<8 | *cdat4++;
+		fg = fg0;
+		bg = bg0;
+		for (i = p->var.bits_per_pixel; i--; dest += p->next_plane) {
+		    if (bg & 1)
+			if (fg & 1)
+			    *(u_long *)dest = 0xffffffff;
+			else
+			    *(u_long *)dest = ~d;
+		    else
+			if (fg & 1)
+			    *(u_long *)dest = d;
+			else
+			    *(u_long *)dest = 0x00000000;
+		    bg >>= 1;
+		    fg >>= 1;
+		}
+	    }
+	    s += 4;
+	    dest0 += 4;
+	    xx += 4;
+	    count -= 3;
+	}
+}
+
+static void rev_char_ilbm(struct display *p, int xx, int yy)
+{
+    u_char *dest, *dest0;
+    u_int rows, i;
+    int mask;
+
+    dest0 = p->screen_base+yy*p->fontheight*p->next_line+xx;
+    mask = p->fgcol ^ p->bgcol;
+
+    /*
+     *  This should really obey the individual character's
+     *  background and foreground colors instead of simply
+     *  inverting.
+     */
+
+    for (i = p->var.bits_per_pixel; i--; dest0 += p->next_plane) {
+	if (mask & 1) {
+	    dest = dest0;
+	    for (rows = p->fontheight; rows--; dest += p->next_line)
+		*dest = ~*dest;
+	}
+	mask >>= 1;
+    }
+}
+
+
+#ifdef MODULE
+int init_module(void)
+#else
+int fbcon_init_ilbm(void)
+#endif
+{
+    return(fbcon_register_driver(&dispsw_ilbm, 0));
+}
+
+#ifdef MODULE
+void cleanup_module(void)
+{
+    fbcon_unregister_driver(&dispsw_ilbm);
+}
+#endif /* MODULE */
--- linux-2.1.42/drivers/video/fbcon-iplan2p2.c.orig	Mon Jun  9 23:02:59 1997
+++ linux-2.1.42/drivers/video/fbcon-iplan2p2.c	Mon Jun  9 23:02:59 1997
@@ -0,0 +1,444 @@
+/*
+ *  linux/drivers/video/iplan2p2.c -- Low level frame buffer operations for
+ *				      interleaved bitplanes  la Atari (2
+ *				      planes, 2 bytes interleave)
+ *
+ *	Created 5 Apr 1997 by Geert Uytterhoeven
+ *
+ *  This file is subject to the terms and conditions of the GNU General Public
+ *  License.  See the file COPYING in the main directory of this archive for
+ *  more details.
+ */
+
+#include <linux/module.h>
+#include <linux/tty.h>
+#include <linux/console.h>
+#include <linux/string.h>
+#include <linux/config.h>
+#include <linux/fb.h>
+
+#include "fbcon.h"
+#include "../char/console_struct.h"
+
+
+#ifndef __mc68000__
+#error No support for non-m68k yet
+#endif
+
+
+    /*
+     *  Prototypes
+     */
+
+static int open_iplan2p2(struct display *p);
+static void release_iplan2p2(void);
+static void bmove_iplan2p2(struct display *p, int sy, int sx, int dy, int dx,
+			   int height, int width);
+static void clear_iplan2p2(struct vc_data *conp, struct display *p, int sy,
+			   int sx, int height, int width);
+static void putc_iplan2p2(struct vc_data *conp, struct display *p, int c,
+			  int yy, int xx);
+static void putcs_iplan2p2(struct vc_data *conp, struct display *p,
+			   const char *s, int count, int yy, int xx);
+static void rev_char_iplan2p2(struct display *display, int xx, int yy);
+
+
+    /*
+     *  `switch' for the low level operations
+     */
+
+static struct display_switch dispsw_iplan2p2 = {
+    open_iplan2p2, release_iplan2p2, bmove_iplan2p2, clear_iplan2p2,
+    putc_iplan2p2, putcs_iplan2p2, rev_char_iplan2p2
+};
+
+
+    /*
+     *  Interleaved bitplanes  la Atari (2 planes, 2 bytes interleave)
+     */
+
+/* Increment/decrement 2 plane addresses */
+
+#define	INC_2P(p)	do { if (!((long)(++(p)) & 1)) (p) += 2; } while(0)
+#define	DEC_2P(p)	do { if ((long)(--(p)) & 1) (p) -= 2; } while(0)
+
+    /*  Convert a standard 4 bit color to our 2 bit color assignment:
+     *  If at least two RGB channels are active, the low bit is turned on;
+     *  The intensity bit (b3) is shifted into b1.
+     */
+
+#define	COLOR_2P(c)	(((c & 7) >= 3 && (c & 7) != 4) | (c & 8) >> 2)
+
+
+/* Sets the bytes in the visible column at d, height h, to the value
+ * val for a 2 plane screen. The the bis of the color in 'color' are
+ * moved (8 times) to the respective bytes. This means:
+ *
+ * for(h times; d += bpr)
+ *   *d     = (color & 1) ? 0xff : 0;
+ *   *(d+2) = (color & 2) ? 0xff : 0;
+ */
+
+static __inline__ void memclear_2p_col(void *d, size_t h, u_short val, int bpr)
+{
+#ifdef __mc68000__
+    __asm__ __volatile__ ("1: movepw %4,%0@(0)\n\t"
+			  "addal  %5,%0\n\t"
+			  "dbra	  %1,1b"
+			  : "=a" (d), "=d" (h)
+			  : "0" (d), "1" (h - 1), "d" (val), "r" (bpr));
+#else /* !m68k */
+#endif /* !m68k */
+}
+
+/* Sets a 2 plane region from 'd', length 'count' bytes, to the color
+ * in val1. 'd' has to be an even address and count must be divisible
+ * by 8, because only whole words and all planes are accessed. I.e.:
+ *
+ * for(count/4 times)
+ *   *d     = *(d+1) = (color & 1) ? 0xff : 0;
+ *   *(d+2) = *(d+3) = (color & 2) ? 0xff : 0;
+ */
+
+static __inline__ void memset_even_2p(void *d, size_t count, u_long val)
+{
+    u_long *dd = d;
+
+    count /= 4;
+    while (count--)
+	*dd++ = val;
+}
+
+/* Copies a 2 plane column from 's', height 'h', to 'd'. */
+
+static __inline__ void memmove_2p_col (void *d, void *s, int h, int bpr)
+{
+    u_char *dd = d, *ss = s;
+
+    while (h--) {
+	dd[0] = ss[0];
+	dd[2] = ss[2];
+	dd += bpr;
+	ss += bpr;
+    }
+}
+
+
+/* This expands a 2 bit color into a short for movepw (2 plane) operations. */
+
+static __inline__ u_short expand2w(u_char c)
+{
+    u_short	rv;
+
+#ifdef __mc68000__
+    __asm__ __volatile__ ("lsrb	 #1,%2\n\t"
+			  "scs	 %0\n\t"
+			  "lsll	 #8,%0\n\t"
+			  "lsrb	 #1,%2\n\t"
+			  "scs	 %0\n\t"
+			  : "=&d" (rv), "=d" (c)
+			  : "1" (c));
+#endif /* !m68k */
+    return(rv);
+}
+
+/* This expands a 2 bit color into one long for a movel operation
+ * (2 planes).
+ */
+
+static __inline__ u_long expand2l(u_char c)
+{
+    u_long	rv;
+
+#ifdef __mc68000__
+    __asm__ __volatile__ ("lsrb	 #1,%2\n\t"
+			  "scs	 %0\n\t"
+			  "extw	 %0\n\t"
+			  "swap	 %0\n\t"
+			  "lsrb	 #1,%2\n\t"
+			  "scs	 %0\n\t"
+			  "extw	 %0\n\t"
+			  : "=&d" (rv), "=d" (c)
+			  : "1" (c));
+#endif /* !m68k */
+    return rv;
+}
+
+
+/* This duplicates a byte 2 times into a short. */
+
+static __inline__ u_short dup2w(u_char c)
+{
+    ushort  rv;
+
+#ifdef __mc68000__
+    __asm__ __volatile__ ("moveb  %1,%0\n\t"
+			  "lslw   #8,%0\n\t"
+			  "moveb  %1,%0\n\t"
+			  : "=&d" (rv)
+			  : "d" (c));
+#endif /* !m68k */
+    return( rv );
+}
+
+
+static int open_iplan2p2(struct display *p)
+{
+    if (p->type != FB_TYPE_INTERLEAVED_PLANES || p->type_aux != 2 ||
+	p->var.bits_per_pixel != 2)
+	return -EINVAL;
+
+    p->next_line = p->var.xres_virtual>>2;
+    p->next_plane = 0;
+    MOD_INC_USE_COUNT;
+    return 0;
+}
+
+static void release_iplan2p2(void)
+{
+    MOD_DEC_USE_COUNT;
+}
+
+static void bmove_iplan2p2(struct display *p, int sy, int sx, int dy, int dx,
+			   int height, int width)
+{
+    /*  bmove() has to distinguish two major cases: If both, source and
+     *  destination, start at even addresses or both are at odd
+     *  addresses, just the first odd and last even column (if present)
+     *  require special treatment (memmove_col()). The rest between
+     *  then can be copied by normal operations, because all adjacent
+     *  bytes are affected and are to be stored in the same order.
+     *    The pathological case is when the move should go from an odd
+     *  address to an even or vice versa. Since the bytes in the plane
+     *  words must be assembled in new order, it seems wisest to make
+     *  all movements by memmove_col().
+     */
+
+    if (sx == 0 && dx == 0 && width == p->next_line/2) {
+	/*  Special (but often used) case: Moving whole lines can be
+	 *  done with memmove()
+	 */
+	mymemmove(p->screen_base + dy * p->next_line * p->fontheight,
+		  p->screen_base + sy * p->next_line * p->fontheight,
+		  p->next_line * height * p->fontheight);
+    } else {
+	int rows, cols;
+	u_char *src;
+	u_char *dst;
+	int bytes = p->next_line;
+	int linesize = bytes * p->fontheight;
+	u_int colsize  = height * p->fontheight;
+	u_int upwards  = (dy < sy) || (dy == sy && dx < sx);
+
+	if ((sx & 1) == (dx & 1)) {
+	    /* odd->odd or even->even */
+	    if (upwards) {
+		src = p->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1);
+		dst = p->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1);
+		if (sx & 1) {
+		    memmove_2p_col(dst, src, colsize, bytes);
+		    src += 3;
+		    dst += 3;
+		    --width;
+		}
+		if (width > 1) {
+		    for (rows = colsize; rows > 0; --rows) {
+			mymemmove(dst, src, (width>>1)*4);
+			src += bytes;
+			dst += bytes;
+		    }
+		}
+		if (width & 1) {
+		    src -= colsize * bytes;
+		    dst -= colsize * bytes;
+		    memmove_2p_col(dst + (width>>1)*4, src + (width>>1)*4,
+				   colsize, bytes);
+		}
+	    } else {
+		if (!((sx+width-1) & 1)) {
+		    src = p->screen_base + sy * linesize + ((sx+width-1)>>1)*4;
+		    dst = p->screen_base + dy * linesize + ((dx+width-1)>>1)*4;
+		    memmove_2p_col(dst, src, colsize, bytes);
+		    --width;
+		}
+		src = p->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1);
+		dst = p->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1);
+		if (width > 1) {
+		    src += colsize * bytes + (sx & 1)*3;
+		    dst += colsize * bytes + (sx & 1)*3;
+		    for(rows = colsize; rows > 0; --rows) {
+			src -= bytes;
+			dst -= bytes;
+			mymemmove(dst, src, (width>>1)*4);
+		    }
+		}
+		if (width & 1)
+		    memmove_2p_col(dst-3, src-3, colsize, bytes);
+	    }
+	} else {
+	    /* odd->even or even->odd */
+	    if (upwards) {
+		src = p->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1);
+		dst = p->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1);
+		for (cols = width; cols > 0; --cols) {
+		    memmove_2p_col(dst, src, colsize, bytes);
+		    INC_2P(src);
+		    INC_2P(dst);
+		}
+	    } else {
+		sx += width-1;
+		dx += width-1;
+		src = p->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1);
+		dst = p->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1);
+		for(cols = width; cols > 0; --cols) {
+		    memmove_2p_col(dst, src, colsize, bytes);
+		    DEC_2P(src);
+		    DEC_2P(dst);
+		}
+	    }
+	}
+    }
+}
+
+static void clear_iplan2p2(struct vc_data *conp, struct display *p, int sy,
+			   int sx, int height, int width)
+{
+    ulong offset;
+    u_char *start;
+    int rows;
+    int bytes = p->next_line;
+    int lines = height * p->fontheight;
+    ulong size;
+    u_long cval;
+    u_short pcval;
+
+    cval = expand2l (COLOR_2P (attr_bgcol_ec(p,conp)));
+
+    if (sx == 0 && width == bytes/2) {
+	offset = sy * bytes * p->fontheight;
+	size = lines * bytes;
+	memset_even_2p(p->screen_base+offset, size, cval);
+    } else {
+	offset = (sy * bytes * p->fontheight) + (sx>>1)*4 + (sx & 1);
+	start = p->screen_base + offset;
+	pcval = expand2w(COLOR_2P(attr_bgcol_ec(p,conp)));
+
+	/*  Clears are split if the region starts at an odd column or
+	 *  end at an even column. These extra columns are spread
+	 *  across the interleaved planes. All in between can be
+	 *  cleared by normal mymemclear_small(), because both bytes of
+	 *  the single plane words are affected.
+	 */
+
+	if (sx & 1) {
+	    memclear_2p_col(start, lines, pcval, bytes);
+	    start += 3;
+	    width--;
+	}
+	if (width & 1) {
+	    memclear_2p_col(start + (width>>1)*4, lines, pcval, bytes);
+	    width--;
+	}
+	if (width) {
+	    for (rows = lines; rows-- ; start += bytes)
+	    memset_even_2p(start, width*2, cval);
+	}
+    }
+}
+
+static void putc_iplan2p2(struct vc_data *conp, struct display *p, int c,
+			  int yy, int xx)
+{
+    u_char *dest;
+    u_char *cdat;
+    int rows;
+    int bytes = p->next_line;
+    ulong eorx, fgx, bgx, fdx;
+
+    c &= 0xff;
+
+    dest = p->screen_base + yy * p->fontheight * bytes + (xx>>1)*4 + (xx & 1);
+    cdat = p->fontdata + (c * p->fontheight);
+
+    fgx = expand2w(COLOR_2P(attr_fgcol(p,conp)));
+    bgx = expand2w(COLOR_2P(attr_bgcol(p,conp)));
+    eorx = fgx ^ bgx;
+
+    for (rows = p->fontheight ; rows-- ; dest += bytes) {
+	fdx = dup2w(*cdat++);
+#ifdef __mc68000__
+	__asm__ __volatile__ ("movepw %1,%0@(0)"
+			      : /* no outputs */
+			      : "a" (dest), "d" ((fdx & eorx) ^ bgx));
+#endif /* !m68k */
+    }
+}
+
+static void putcs_iplan2p2(struct vc_data *conp, struct display *p,
+			   const char *s, int count, int yy, int xx)
+{
+    u_char *dest, *dest0;
+    u_char *cdat, c;
+    int rows;
+    int bytes;
+    ulong eorx, fgx, bgx, fdx;
+
+    bytes = p->next_line;
+    dest0 = p->screen_base + yy * p->fontheight * bytes + (xx>>1)*4 + (xx & 1);
+    fgx = expand2w(COLOR_2P(attr_fgcol(p,conp)));
+    bgx = expand2w(COLOR_2P(attr_bgcol(p,conp)));
+    eorx = fgx ^ bgx;
+
+    while (count--) {
+	c = *s++;
+	cdat  = p->fontdata + (c * p->fontheight);
+
+	for (rows = p->fontheight, dest = dest0; rows-- ; dest += bytes) {
+	    fdx = dup2w(*cdat++);
+#ifdef __mc68000__
+	    __asm__ __volatile__ ("movepw %1,%0@(0)"
+				  : /* no outputs */
+				  : "a" (dest), "d" ((fdx & eorx) ^ bgx));
+#endif /* !m68k */
+	}
+	INC_2P(dest0);
+    }
+}
+
+static void rev_char_iplan2p2(struct display *p, int xx, int yy)
+{
+    u_char *dest;
+    int j;
+    int bytes;
+
+    dest = p->screen_base + yy * p->fontheight * p->next_line + (xx>>1)*4 +
+	   (xx & 1);
+    j = p->fontheight;
+    bytes = p->next_line;
+    while (j--) {
+	/*  This should really obey the individual character's
+	 *  background and foreground colors instead of simply
+	 *  inverting.
+	 */
+	dest[0] = ~dest[0];
+	dest[2] = ~dest[2];
+	dest += bytes;
+    }
+}
+
+
+#ifdef MODULE
+int init_module(void)
+#else
+int fbcon_init_iplan2p2(void)
+#endif
+{
+    return(fbcon_register_driver(&dispsw_iplan2p2, 0));
+}
+
+#ifdef MODULE
+void cleanup_module(void)
+{
+    fbcon_unregister_driver(&dispsw_iplan2p2);
+}
+#endif /* MODULE */
--- linux-2.1.42/drivers/video/fbcon-iplan2p4.c.orig	Mon Jun  9 23:02:59 1997
+++ linux-2.1.42/drivers/video/fbcon-iplan2p4.c	Mon Jun  9 23:02:59 1997
@@ -0,0 +1,475 @@
+/*
+ *  linux/drivers/video/iplan2p4.c -- Low level frame buffer operations for
+ *				      interleaved bitplanes  la Atari (4
+ *				      planes, 2 bytes interleave)
+ *
+ *	Created 5 Apr 1997 by Geert Uytterhoeven
+ *
+ *  This file is subject to the terms and conditions of the GNU General Public
+ *  License.  See the file COPYING in the main directory of this archive for
+ *  more details.
+ */
+
+#include <linux/module.h>
+#include <linux/tty.h>
+#include <linux/console.h>
+#include <linux/string.h>
+#include <linux/config.h>
+#include <linux/fb.h>
+
+#include "fbcon.h"
+#include "../char/console_struct.h"
+
+
+#ifndef __mc68000__
+#error No support for non-m68k yet
+#endif
+
+
+    /*
+     *  Prototypes
+     */
+
+static int open_iplan2p4(struct display *p);
+static void release_iplan2p4(void);
+static void bmove_iplan2p4(struct display *p, int sy, int sx, int dy, int dx,
+			   int height, int width);
+static void clear_iplan2p4(struct vc_data *conp, struct display *p, int sy,
+			   int sx, int height, int width);
+static void putc_iplan2p4(struct vc_data *conp, struct display *p, int c,
+			  int yy, int xx);
+static void putcs_iplan2p4(struct vc_data *conp, struct display *p,
+			   const char *s, int count, int yy, int xx);
+static void rev_char_iplan2p4(struct display *p, int xx, int yy);
+
+
+    /*
+     *  `switch' for the low level operations
+     */
+
+static struct display_switch dispsw_iplan2p4 = {
+    open_iplan2p4, release_iplan2p4, bmove_iplan2p4, clear_iplan2p4,
+    putc_iplan2p4, putcs_iplan2p4, rev_char_iplan2p4
+};
+
+
+    /*
+     *  Interleaved bitplanes  la Atari (4 planes, 2 bytes interleave)
+     */
+
+/* Increment/decrement 4 plane addresses */
+
+#define	INC_4P(p)	do { if (!((long)(++(p)) & 1)) (p) += 6; } while(0)
+#define	DEC_4P(p)	do { if ((long)(--(p)) & 1) (p) -= 6; } while(0)
+
+
+/* Sets the bytes in the visible column at d, height h, to the value
+ * val for a 4 plane screen. The the bis of the color in 'color' are
+ * moved (8 times) to the respective bytes. This means:
+ *
+ * for(h times; d += bpr)
+ *   *d     = (color & 1) ? 0xff : 0;
+ *   *(d+2) = (color & 2) ? 0xff : 0;
+ *   *(d+4) = (color & 4) ? 0xff : 0;
+ *   *(d+6) = (color & 8) ? 0xff : 0;
+ */
+
+static __inline__ void memclear_4p_col(void *d, size_t h, u_long val, int bpr)
+{
+#ifdef __mc68000__
+    __asm__ __volatile__ ("1: movepl %4,%0@(0)\n\t"
+			  "addal  %5,%0\n\t"
+			  "dbra	  %1,1b"
+			  : "=a" (d), "=d" (h)
+			  : "0" (d), "1" (h - 1), "d" (val), "r" (bpr));
+#endif /* !m68k */
+}
+
+/* Sets a 4 plane region from 'd', length 'count' bytes, to the color
+ * in val1/val2. 'd' has to be an even address and count must be divisible
+ * by 8, because only whole words and all planes are accessed. I.e.:
+ *
+ * for(count/8 times)
+ *   *d     = *(d+1) = (color & 1) ? 0xff : 0;
+ *   *(d+2) = *(d+3) = (color & 2) ? 0xff : 0;
+ *   *(d+4) = *(d+5) = (color & 4) ? 0xff : 0;
+ *   *(d+6) = *(d+7) = (color & 8) ? 0xff : 0;
+ */
+
+static __inline__ void memset_even_4p(void *d, size_t count, u_long val1,
+                                      u_long val2)
+{
+    u_long *dd = d;
+
+    count /= 8;
+    while (count--) {
+	*dd++ = val1;
+	*dd++ = val2;
+    }
+}
+
+/* Copies a 4 plane column from 's', height 'h', to 'd'. */
+
+static __inline__ void memmove_4p_col (void *d, void *s, int h, int bpr)
+{
+    u_char *dd = d, *ss = s;
+
+    while (h--) {
+	dd[0] = ss[0];
+	dd[2] = ss[2];
+	dd[4] = ss[4];
+	dd[6] = ss[6];
+	dd += bpr;
+	ss += bpr;
+    }
+}
+
+
+/* This expands a 4 bit color into a long for movepl (4 plane) operations. */
+
+static __inline__ u_long expand4l(u_char c)
+{
+    u_long rv;
+
+#ifdef __mc68000__
+    __asm__ __volatile__ ("lsrb	 #1,%2\n\t"
+			  "scs	 %0\n\t"
+			  "lsll	 #8,%0\n\t"
+			  "lsrb	 #1,%2\n\t"
+			  "scs	 %0\n\t"
+			  "lsll	 #8,%0\n\t"
+			  "lsrb	 #1,%2\n\t"
+			  "scs	 %0\n\t"
+			  "lsll	 #8,%0\n\t"
+			  "lsrb	 #1,%2\n\t"
+			  "scs	 %0\n\t"
+			  : "=&d" (rv), "=d" (c)
+			  : "1" (c));
+#endif /* !m68k */
+    return(rv);
+}
+
+/* This expands a 4 bit color into two longs for two movel operations
+ * (4 planes).
+ */
+
+static __inline__ void expand4dl(u_char c, u_long *ret1, u_long *ret2)
+{
+    u_long	rv1, rv2;
+
+#ifdef __mc68000__
+    __asm__ __volatile__ ("lsrb	 #1,%3\n\t"
+			  "scs	 %0\n\t"
+			  "extw	 %0\n\t"
+			  "swap	 %0\n\t"
+			  "lsrb	 #1,%3\n\t"
+			  "scs	 %0\n\t"
+			  "extw	 %0\n\t"
+			  "lsrb	 #1,%3\n\t"
+			  "scs	 %1\n\t"
+			  "extw	 %1\n\t"
+			  "swap	 %1\n\t"
+			  "lsrb	 #1,%3\n\t"
+			  "scs   %1\n\t"
+			  "extw	 %1"
+			  : "=&d" (rv1), "=&d" (rv2), "=d" (c)
+			  : "2" (c));
+#endif /* !m68k */
+    *ret1 = rv1;
+    *ret2 = rv2;
+}
+
+
+/* This duplicates a byte 4 times into a long. */
+
+static __inline__ u_long dup4l(u_char c)
+{
+    ushort	tmp;
+    ulong	rv;
+
+#ifdef __mc68000__
+    __asm__ __volatile__ ("moveb  %2,%0\n\t"
+			  "lslw   #8,%0\n\t"
+			  "moveb  %2,%0\n\t"
+			  "movew  %0,%1\n\t"
+			  "swap   %0\n\t"
+			  "movew  %1,%0"
+			  : "=&d" (rv), "=d" (tmp)
+			  : "d" (c));
+#endif /* !m68k */
+    return(rv);
+}
+
+
+static int open_iplan2p4(struct display *p)
+{
+    if (p->type != FB_TYPE_INTERLEAVED_PLANES || p->type_aux != 2 ||
+	p->var.bits_per_pixel != 4)
+	return -EINVAL;
+
+    p->next_line = p->var.xres_virtual>>1;
+    p->next_plane = 0;
+    MOD_INC_USE_COUNT;
+    return 0;
+}
+
+static void release_iplan2p4(void)
+{
+    MOD_DEC_USE_COUNT;
+}
+
+static void bmove_iplan2p4(struct display *p, int sy, int sx, int dy, int dx,
+			   int height, int width)
+{
+    /*  bmove() has to distinguish two major cases: If both, source and
+     *  destination, start at even addresses or both are at odd
+     *  addresses, just the first odd and last even column (if present)
+     *  require special treatment (memmove_col()). The rest between
+     *  then can be copied by normal operations, because all adjacent
+     *  bytes are affected and are to be stored in the same order.
+     *    The pathological case is when the move should go from an odd
+     *  address to an even or vice versa. Since the bytes in the plane
+     *  words must be assembled in new order, it seems wisest to make
+     *  all movements by memmove_col().
+     */
+
+    if (sx == 0 && dx == 0 && width == p->next_line/4) {
+	/*  Special (but often used) case: Moving whole lines can be
+	 *done with memmove()
+	 */
+	mymemmove(p->screen_base + dy * p->next_line * p->fontheight,
+		  p->screen_base + sy * p->next_line * p->fontheight,
+		  p->next_line * height * p->fontheight);
+    } else {
+	int rows, cols;
+	u_char *src;
+	u_char *dst;
+	int bytes = p->next_line;
+	int linesize = bytes * p->fontheight;
+	u_int colsize  = height * p->fontheight;
+	u_int upwards  = (dy < sy) || (dy == sy && dx < sx);
+
+	if ((sx & 1) == (dx & 1)) {
+	    /* odd->odd or even->even */
+
+	    if (upwards) {
+		src = p->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1);
+		dst = p->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1);
+		if (sx & 1) {
+		    memmove_4p_col(dst, src, colsize, bytes);
+		    src += 7;
+		    dst += 7;
+		    --width;
+		}
+		if (width > 1) {
+		    for(rows = colsize; rows > 0; --rows) {
+			mymemmove(dst, src, (width>>1)*8);
+			src += bytes;
+			dst += bytes;
+		    }
+		}
+		if (width & 1) {
+		    src -= colsize * bytes;
+		    dst -= colsize * bytes;
+		    memmove_4p_col(dst + (width>>1)*8, src + (width>>1)*8,
+		    colsize, bytes);
+		}
+	    } else {
+		if (!((sx+width-1) & 1)) {
+		    src = p->screen_base + sy * linesize + ((sx+width-1)>>1)*8;
+		    dst = p->screen_base + dy * linesize + ((dx+width-1)>>1)*8;
+		    memmove_4p_col(dst, src, colsize, bytes);
+		    --width;
+		}
+		src = p->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1);
+		dst = p->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1);
+		if (width > 1) {
+		    src += colsize * bytes + (sx & 1)*7;
+		    dst += colsize * bytes + (sx & 1)*7;
+		    for(rows = colsize; rows > 0; --rows) {
+			src -= bytes;
+			dst -= bytes;
+			mymemmove(dst, src, (width>>1)*8);
+		    }
+		}
+		if (width & 1) {
+		memmove_4p_col(dst-7, src-7, colsize, bytes);
+		}
+	    }
+	} else {
+	/* odd->even or even->odd */
+
+	    if (upwards) {
+		src = p->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1);
+		dst = p->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1);
+		for(cols = width; cols > 0; --cols) {
+		    memmove_4p_col(dst, src, colsize, bytes);
+		    INC_4P(src);
+		    INC_4P(dst);
+		}
+	    } else {
+		sx += width-1;
+		dx += width-1;
+		src = p->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1);
+		dst = p->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1);
+		for(cols = width; cols > 0; --cols) {
+		    memmove_4p_col(dst, src, colsize, bytes);
+		    DEC_4P(src);
+		    DEC_4P(dst);
+		}
+	    }
+	}
+    }
+}
+
+static void clear_iplan2p4(struct vc_data *conp, struct display *p, int sy,
+			   int sx, int height, int width)
+{
+    ulong offset;
+    u_char *start;
+    int rows;
+    int bytes = p->next_line;
+    int lines = height * p->fontheight;
+    ulong size;
+    u_long cval1, cval2, pcval;
+
+    expand4dl(attr_bgcol_ec(p,conp), &cval1, &cval2);
+
+    if (sx == 0 && width == bytes/4) {
+	offset = sy * bytes * p->fontheight;
+	size = lines * bytes;
+	memset_even_4p(p->screen_base+offset, size, cval1, cval2);
+    } else {
+	offset = (sy * bytes * p->fontheight) + (sx>>1)*8 + (sx & 1);
+	start = p->screen_base + offset;
+	pcval = expand4l(attr_bgcol_ec(p,conp));
+
+	/*  Clears are split if the region starts at an odd column or
+	 *  end at an even column. These extra columns are spread
+	 *  across the interleaved planes. All in between can be
+	 *  cleared by normal mymemclear_small(), because both bytes of
+	 *  the single plane words are affected.
+	 */
+
+	if (sx & 1) {
+	    memclear_4p_col(start, lines, pcval, bytes);
+	    start += 7;
+	    width--;
+	}
+	if (width & 1) {
+	    memclear_4p_col(start + (width>>1)*8, lines, pcval, bytes);
+	    width--;
+	}
+	if (width) {
+	    for(rows = lines; rows-- ; start += bytes)
+		memset_even_4p(start, width*4, cval1, cval2);
+	}
+    }
+}
+
+static void putc_iplan2p4(struct vc_data *conp, struct display *p, int c,
+			  int yy, int xx)
+{
+    u_char *dest;
+    u_char *cdat;
+    int rows;
+    int bytes = p->next_line;
+    ulong eorx, fgx, bgx, fdx;
+
+    c &= 0xff;
+
+    dest = p->screen_base + yy * p->fontheight * bytes + (xx>>1)*8 + (xx & 1);
+    cdat = p->fontdata + (c * p->fontheight);
+
+    fgx = expand4l(attr_fgcol(p,conp));
+    bgx = expand4l(attr_bgcol(p,conp));
+    eorx = fgx ^ bgx;
+
+    for(rows = p->fontheight ; rows-- ; dest += bytes) {
+	fdx = dup4l(*cdat++);
+#ifdef __mc68000__
+	__asm__ __volatile__ ("movepl %1,%0@(0)"
+			      : /* no outputs */
+			      : "a" (dest), "d" ((fdx & eorx) ^ bgx));
+#endif /* !m68k */
+    }
+}
+
+static void putcs_iplan2p4(struct vc_data *conp, struct display *p,
+			   const char *s, int count, int yy, int xx)
+{
+    u_char *dest, *dest0;
+    u_char *cdat, c;
+    int rows;
+    int bytes;
+    ulong eorx, fgx, bgx, fdx;
+
+    bytes = p->next_line;
+    dest0 = p->screen_base + yy * p->fontheight * bytes + (xx>>1)*8 + (xx & 1);
+    fgx = expand4l(attr_fgcol(p,conp));
+    bgx = expand4l(attr_bgcol(p,conp));
+    eorx = fgx ^ bgx;
+
+    while (count--) {
+	/* I think, unrolling the loops like in the 1 plane case isn't
+	* practicable here, because the body is much longer for 4
+	* planes (mostly the dup4l()). I guess, unrolling this would
+	* need more than 256 bytes and so exceed the instruction
+	* cache :-(
+	*/
+
+	c = *s++;
+	cdat  = p->fontdata + (c * p->fontheight);
+
+	for(rows = p->fontheight, dest = dest0; rows-- ; dest += bytes) {
+	    fdx = dup4l(*cdat++);
+#ifdef __mc68000__
+	    __asm__ __volatile__ ("movepl %1,%0@(0)"
+				  : /* no outputs */
+				  : "a" (dest), "d" ((fdx & eorx) ^ bgx));
+#endif /* !m68k */
+	}
+	INC_4P(dest0);
+    }
+}
+
+static void rev_char_iplan2p4(struct display *p, int xx, int yy)
+{
+    u_char *dest;
+    int j;
+    int bytes;
+
+    dest = p->screen_base + yy * p->fontheight * p->next_line + (xx>>1)*8 +
+	   (xx & 1);
+    j = p->fontheight;
+    bytes = p->next_line;
+
+    while (j--) {
+	/*  This should really obey the individual character's
+	 *  background and foreground colors instead of simply
+	 *  inverting.
+	 */
+	dest[0] = ~dest[0];
+	dest[2] = ~dest[2];
+	dest[4] = ~dest[4];
+	dest[6] = ~dest[6];
+	dest += bytes;
+    }
+}
+
+
+#ifdef MODULE
+int init_module(void)
+#else
+int fbcon_init_iplan2p4(void)
+#endif
+{
+    return(fbcon_register_driver(&dispsw_iplan2p4, 0));
+}
+
+#ifdef MODULE
+void cleanup_module(void)
+{
+    fbcon_unregister_driver(&dispsw_iplan2p4);
+}
+#endif /* MODULE */
--- linux-2.1.42/drivers/video/fbcon-iplan2p8.c.orig	Mon Jun  9 23:02:59 1997
+++ linux-2.1.42/drivers/video/fbcon-iplan2p8.c	Mon Jun  9 23:02:59 1997
@@ -0,0 +1,533 @@
+/*
+ *  linux/drivers/video/iplan2p8.c -- Low level frame buffer operations for
+ *				      interleaved bitplanes  la Atari (8
+ *				      planes, 2 bytes interleave)
+ *
+ *	Created 5 Apr 1997 by Geert Uytterhoeven
+ *
+ *  This file is subject to the terms and conditions of the GNU General Public
+ *  License.  See the file COPYING in the main directory of this archive for
+ *  more details.
+ */
+
+#include <linux/module.h>
+#include <linux/tty.h>
+#include <linux/console.h>
+#include <linux/string.h>
+#include <linux/config.h>
+#include <linux/fb.h>
+
+#include "fbcon.h"
+#include "../char/console_struct.h"
+
+
+#ifndef __mc68000__
+#error No support for non-m68k yet
+#endif
+
+
+    /*
+     *  Prototypes
+     */
+
+static int open_iplan2p8(struct display *p);
+static void release_iplan2p8(void);
+static void bmove_iplan2p8(struct display *p, int sy, int sx, int dy, int dx,
+			   int height, int width);
+static void clear_iplan2p8(struct vc_data *conp, struct display *p, int sy,
+			   int sx, int height, int width);
+static void putc_iplan2p8(struct vc_data *conp, struct display *p, int c,
+			  int yy, int xx);
+static void putcs_iplan2p8(struct vc_data *conp, struct display *p,
+			   const char *s, int count, int yy, int xx);
+static void rev_char_iplan2p8(struct display *display, int xx, int yy);
+
+
+    /*
+     *  `switch' for the low level operations
+     */
+
+static struct display_switch dispsw_iplan2p8 = {
+    open_iplan2p8, release_iplan2p8, bmove_iplan2p8, clear_iplan2p8,
+    putc_iplan2p8, putcs_iplan2p8, rev_char_iplan2p8
+};
+
+
+    /*
+     *  Interleaved bitplanes  la Atari (8 planes, 2 bytes interleave)
+     *
+     *  In 8 plane mode, 256 colors would be possible, but only the first
+     *  16 are used by the console code (the upper 4 bits are
+     *  background/unused). For that, the following functions mask off the
+     *  higher 4 bits of each color.
+     */
+
+/* Increment/decrement 8 plane addresses */
+
+#define	INC_8P(p)	do { if (!((long)(++(p)) & 1)) (p) += 14; } while(0)
+#define	DEC_8P(p)	do { if ((long)(--(p)) & 1) (p) -= 14; } while(0)
+
+
+/* Sets the bytes in the visible column at d, height h, to the value
+ * val1,val2 for a 8 plane screen. The the bis of the color in 'color' are
+ * moved (8 times) to the respective bytes. This means:
+ *
+ * for(h times; d += bpr)
+ *   *d      = (color & 1) ? 0xff : 0;
+ *   *(d+2)  = (color & 2) ? 0xff : 0;
+ *   *(d+4)  = (color & 4) ? 0xff : 0;
+ *   *(d+6)  = (color & 8) ? 0xff : 0;
+ *   *(d+8)  = (color & 16) ? 0xff : 0;
+ *   *(d+10) = (color & 32) ? 0xff : 0;
+ *   *(d+12) = (color & 64) ? 0xff : 0;
+ *   *(d+14) = (color & 128) ? 0xff : 0;
+ */
+
+static __inline__ void memclear_8p_col(void *d, size_t h, u_long val1,
+                                       u_long val2, int bpr)
+{
+#ifdef __mc68000__
+    __asm__ __volatile__ ("1: movepl %4,%0@(0)\n\t"
+			  "movepl %5,%0@(8)\n\t"
+			  "addal  %6,%0\n\t"
+			  "dbra	  %1,1b"
+			  : "=a" (d), "=d" (h)
+			  : "0" (d), "1" (h - 1), "d" (val1), "d" (val2),
+			    "r" (bpr));
+#endif /* !m68k */
+}
+
+/* Sets a 8 plane region from 'd', length 'count' bytes, to the color
+ * val1..val4. 'd' has to be an even address and count must be divisible
+ * by 16, because only whole words and all planes are accessed. I.e.:
+ *
+ * for(count/16 times)
+ *   *d      = *(d+1)  = (color & 1) ? 0xff : 0;
+ *   *(d+2)  = *(d+3)  = (color & 2) ? 0xff : 0;
+ *   *(d+4)  = *(d+5)  = (color & 4) ? 0xff : 0;
+ *   *(d+6)  = *(d+7)  = (color & 8) ? 0xff : 0;
+ *   *(d+8)  = *(d+9)  = (color & 16) ? 0xff : 0;
+ *   *(d+10) = *(d+11) = (color & 32) ? 0xff : 0;
+ *   *(d+12) = *(d+13) = (color & 64) ? 0xff : 0;
+ *   *(d+14) = *(d+15) = (color & 128) ? 0xff : 0;
+ */
+
+static __inline__ void memset_even_8p(void *d, size_t count, u_long val1,
+                                      u_long val2, u_long val3, u_long val4)
+{
+    u_long *dd = d;
+
+    count /= 16;
+    while (count--) {
+	*dd++ = val1;
+	*dd++ = val2;
+	*dd++ = val3;
+	*dd++ = val4;
+    }
+}
+
+/* Copies a 8 plane column from 's', height 'h', to 'd'. */
+
+static __inline__ void memmove_8p_col (void *d, void *s, int h, int bpr)
+{
+    u_char *dd = d, *ss = s;
+
+    while (h--) {
+	dd[0] = ss[0];
+	dd[2] = ss[2];
+	dd[4] = ss[4];
+	dd[6] = ss[6];
+	dd[8] = ss[8];
+	dd[10] = ss[10];
+	dd[12] = ss[12];
+	dd[14] = ss[14];
+	dd += bpr;
+	ss += bpr;
+    }
+}
+
+
+/* This expands a 8 bit color into two longs for two movepl (8 plane)
+ * operations.
+ */
+
+static __inline__ void expand8dl(u_char c, u_long *ret1, u_long *ret2)
+{
+    u_long	rv1, rv2;
+
+#ifdef __mc68000__
+    __asm__ __volatile__ ("lsrb	 #1,%3\n\t"
+			  "scs	 %0\n\t"
+			  "lsll	 #8,%0\n\t"
+			  "lsrb	 #1,%3\n\t"
+			  "scs	 %0\n\t"
+			  "lsll	 #8,%0\n\t"
+			  "lsrb	 #1,%3\n\t"
+			  "scs	 %0\n\t"
+			  "lsll	 #8,%0\n\t"
+			  "lsrb	 #1,%3\n\t"
+			  "scs	 %0\n\t"
+			  "lsrb	 #1,%3\n\t"
+			  "scs	 %1\n\t"
+			  "lsll	 #8,%1\n\t"
+			  "lsrb	 #1,%3\n\t"
+			  "scs	 %1\n\t"
+			  "lsll	 #8,%1\n\t"
+			  "lsrb	 #1,%3\n\t"
+			  "scs	 %1\n\t"
+			  "lsll	 #8,%1\n\t"
+			  "lsrb	 #1,%3\n\t"
+			  "scs	 %1"
+			  : "=&d" (rv1), "=&d" (rv2),"=d" (c)
+			  : "2" (c));
+#endif /* !m68k */
+    *ret1 = rv1;
+    *ret2 = rv2;
+}
+
+/* This expands a 8 bit color into four longs for four movel operations
+ * (8 planes).
+ */
+
+#ifdef __mc68000__
+/* ++andreas: use macro to avoid taking address of return values */
+#define expand8ql(c, rv1, rv2, rv3, rv4) \
+    do {								\
+	u_char tmp = c;							\
+	__asm__ __volatile__ ("lsrb  #1,%5\n\t"				\
+			      "scs   %0\n\t"				\
+			      "extw  %0\n\t"				\
+			      "swap  %0\n\t"				\
+			      "lsrb  #1,%5\n\t"				\
+			      "scs   %0\n\t"				\
+			      "extw  %0\n\t"				\
+			      "lsrb  #1,%5\n\t"				\
+			      "scs   %1\n\t"				\
+			      "extw  %1\n\t"				\
+			      "swap  %1\n\t"				\
+			      "lsrb  #1,%5\n\t"				\
+			      "scs   %1\n\t"				\
+			      "extw  %1\n\t"				\
+			      "lsrb  #1,%5\n\t"				\
+			      "scs   %2\n\t"				\
+			      "extw  %2\n\t"				\
+			      "swap  %2\n\t"				\
+			      "lsrb  #1,%5\n\t"				\
+			      "scs   %2\n\t"				\
+			      "extw  %2\n\t"				\
+			      "lsrb  #1,%5\n\t"				\
+			      "scs   %3\n\t"				\
+			      "extw  %3\n\t"				\
+			      "swap  %3\n\t"				\
+			      "lsrb  #1,%5\n\t"				\
+			      "scs   %3\n\t"				\
+			      "extw  %3"				\
+			      : "=&d" (rv1), "=&d" (rv2), "=&d" (rv3),	\
+				"=&d" (rv4), "=d" (tmp)			\
+			      : "4" (tmp));				\
+    } while (0)
+#endif /* !m68k */
+
+
+/* This duplicates a byte 4 times into a long. */
+
+static __inline__ u_long dup4l(u_char c)
+{
+    ushort	tmp;
+    ulong	rv;
+
+#ifdef __mc68000__
+    __asm__ __volatile__ ("moveb  %2,%0\n\t"
+			  "lslw   #8,%0\n\t"
+			  "moveb  %2,%0\n\t"
+			  "movew  %0,%1\n\t"
+			  "swap   %0\n\t"
+			  "movew  %1,%0"
+			  : "=&d" (rv), "=d" (tmp)
+			  : "d" (c));
+#endif /* !m68k */
+    return(rv);
+}
+
+
+static int open_iplan2p8(struct display *p)
+{
+    if (p->type != FB_TYPE_INTERLEAVED_PLANES || p->type_aux != 2 ||
+	p->var.bits_per_pixel != 8)
+	return -EINVAL;
+
+    p->next_line = p->var.xres_virtual;
+    p->next_plane = 0;
+    MOD_INC_USE_COUNT;
+    return 0;
+}
+
+static void release_iplan2p8(void)
+{
+    MOD_DEC_USE_COUNT;
+}
+
+static void bmove_iplan2p8(struct display *p, int sy, int sx, int dy, int dx,
+			   int height, int width)
+{
+    /*  bmove() has to distinguish two major cases: If both, source and
+     *  destination, start at even addresses or both are at odd
+     *  addresses, just the first odd and last even column (if present)
+     *  require special treatment (memmove_col()). The rest between
+     *  then can be copied by normal operations, because all adjacent
+     *  bytes are affected and are to be stored in the same order.
+     *    The pathological case is when the move should go from an odd
+     *  address to an even or vice versa. Since the bytes in the plane
+     *  words must be assembled in new order, it seems wisest to make
+     *  all movements by memmove_col().
+     */
+
+     if (sx == 0 && dx == 0 && width == p->next_line/8) {
+	/*  Special (but often used) case: Moving whole lines can be
+	 *  done with memmove()
+	 */
+	fast_memmove(p->screen_base + dy * p->next_line * p->fontheight,
+		     p->screen_base + sy * p->next_line * p->fontheight,
+		     p->next_line * height * p->fontheight);
+     } else {
+	int rows, cols;
+	u_char *src;
+	u_char *dst;
+	int bytes = p->next_line;
+	int linesize = bytes * p->fontheight;
+	u_int colsize = height * p->fontheight;
+	u_int upwards = (dy < sy) || (dy == sy && dx < sx);
+
+	if ((sx & 1) == (dx & 1)) {
+	    /* odd->odd or even->even */
+
+	    if (upwards) {
+		src = p->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1);
+		dst = p->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1);
+		if (sx & 1) {
+		    memmove_8p_col(dst, src, colsize, bytes);
+		    src += 15;
+		    dst += 15;
+		    --width;
+		}
+		if (width > 1) {
+		    for(rows = colsize; rows > 0; --rows) {
+			fast_memmove (dst, src, (width >> 1) * 16);
+			src += bytes;
+			dst += bytes;
+		    }
+		}
+
+		if (width & 1) {
+		    src -= colsize * bytes;
+		    dst -= colsize * bytes;
+		    memmove_8p_col(dst + (width>>1)*16, src + (width>>1)*16,
+		    colsize, bytes);
+		}
+	    } else {
+		if (!((sx+width-1) & 1)) {
+		    src = p->screen_base + sy * linesize + ((sx+width-1)>>1)*16;
+		    dst = p->screen_base + dy * linesize + ((dx+width-1)>>1)*16;
+		    memmove_8p_col(dst, src, colsize, bytes);
+		    --width;
+		}
+		src = p->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1);
+		dst = p->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1);
+		if (width > 1) {
+		    src += colsize * bytes + (sx & 1)*15;
+		    dst += colsize * bytes + (sx & 1)*15;
+		    for(rows = colsize; rows > 0; --rows) {
+			src -= bytes;
+			dst -= bytes;
+			fast_memmove (dst, src, (width>>1)*16);
+		    }
+		}
+		if (width & 1)
+		    memmove_8p_col(dst-15, src-15, colsize, bytes);
+	    }
+	} else {
+	/* odd->even or even->odd */
+
+	    if (upwards) {
+		src = p->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1);
+		dst = p->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1);
+		for(cols = width; cols > 0; --cols) {
+		    memmove_8p_col(dst, src, colsize, bytes);
+		    INC_8P(src);
+		    INC_8P(dst);
+		}
+	    } else {
+		sx += width-1;
+		dx += width-1;
+		src = p->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1);
+		dst = p->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1);
+		for(cols = width; cols > 0; --cols) {
+		    memmove_8p_col(dst, src, colsize, bytes);
+		    DEC_8P(src);
+		    DEC_8P(dst);
+		}
+	    }
+	}
+    }
+}
+
+static void clear_iplan2p8(struct vc_data *conp, struct display *p, int sy,
+			   int sx, int height, int width)
+{
+    ulong offset;
+    u_char *start;
+    int rows;
+    int bytes = p->next_line;
+    int lines = height * p->fontheight;
+    ulong size;
+    u_long cval1, cval2, cval3, cval4, pcval1, pcval2;
+
+    expand8ql(attr_bgcol_ec(p,conp), cval1, cval2, cval3, cval4);
+
+    if (sx == 0 && width == bytes/8) {
+	offset = sy * bytes * p->fontheight;
+	size    = lines * bytes;
+	memset_even_8p(p->screen_base+offset, size, cval1, cval2, cval3, cval4);
+    } else {
+	offset = (sy * bytes * p->fontheight) + (sx>>1)*16 + (sx & 1);
+	start = p->screen_base + offset;
+	expand8dl(attr_bgcol_ec(p,conp), &pcval1, &pcval2);
+
+	/* Clears are split if the region starts at an odd column or
+	* end at an even column. These extra columns are spread
+	* across the interleaved planes. All in between can be
+	* cleared by normal mymemclear_small(), because both bytes of
+	* the single plane words are affected.
+	*/
+
+	if (sx & 1) {
+	    memclear_8p_col(start, lines, pcval1, pcval2, bytes);
+	    start += 7;
+	    width--;
+	}
+	if (width & 1) {
+	    memclear_8p_col(start + (width>>1)*16, lines, pcval1,
+	    pcval2, bytes);
+	    width--;
+	}
+	if (width)
+	    for(rows = lines; rows-- ; start += bytes)
+		memset_even_8p(start, width*8, cval1, cval2, cval3, cval4);
+	}
+}
+
+static void putc_iplan2p8(struct vc_data *conp, struct display *p, int c,
+			  int yy, int xx)
+{
+    u_char *dest;
+    u_char *cdat;
+    int rows;
+    int bytes = p->next_line;
+    ulong eorx1, eorx2, fgx1, fgx2, bgx1, bgx2, fdx;
+
+    c &= 0xff;
+
+    dest = p->screen_base + yy * p->fontheight * bytes + (xx>>1)*16 + (xx & 1);
+    cdat = p->fontdata + (c * p->fontheight);
+
+    expand8dl(attr_fgcol(p,conp), &fgx1, &fgx2);
+    expand8dl(attr_bgcol(p,conp), &bgx1, &bgx2);
+    eorx1 = fgx1 ^ bgx1; eorx2  = fgx2 ^ bgx2;
+
+    for(rows = p->fontheight ; rows-- ; dest += bytes) {
+	fdx = dup4l(*cdat++);
+#ifdef __mc68000__
+	__asm__ __volatile__ ("movepl %1,%0@(0)\n\t"
+			      "movepl %2,%0@(8)"
+			      : /* no outputs */
+			      : "a" (dest), "d" ((fdx & eorx1) ^ bgx1),
+				"d" ((fdx & eorx2) ^ bgx2) );
+#endif /* !m68k */
+    }
+}
+
+static void putcs_iplan2p8(struct vc_data *conp, struct display *p,
+			   const char *s, int count, int yy, int xx)
+{
+    u_char *dest, *dest0;
+    u_char *cdat, c;
+    int rows;
+    int bytes;
+    ulong eorx1, eorx2, fgx1, fgx2, bgx1, bgx2, fdx;
+
+    bytes = p->next_line;
+    dest0 = p->screen_base + yy * p->fontheight * bytes + (xx>>1)*16 +
+	    (xx & 1);
+
+    expand8dl(attr_fgcol(p,conp), &fgx1, &fgx2);
+    expand8dl(attr_bgcol(p,conp), &bgx1, &bgx2);
+    eorx1 = fgx1 ^ bgx1; eorx2  = fgx2 ^ bgx2;
+
+    while (count--) {
+
+	/* I think, unrolling the loops like in the 1 plane case isn't
+	* practicable here, because the body is much longer for 4
+	* planes (mostly the dup4l()). I guess, unrolling this would
+	* need more than 256 bytes and so exceed the instruction
+	* cache :-(
+	*/
+
+	c = *s++;
+	cdat  = p->fontdata + (c * p->fontheight);
+
+	for(rows = p->fontheight, dest = dest0; rows-- ; dest += bytes) {
+	    fdx = dup4l(*cdat++);
+#ifdef __mc68000__
+	    __asm__ __volatile__ ("movepl %1,%0@(0)\n\t"
+				  "movepl %2,%0@(8)"
+				  : /* no outputs */
+				  : "a" (dest), "d" ((fdx & eorx1) ^ bgx1),
+				    "d" ((fdx & eorx2) ^ bgx2));
+#endif /* !m68k */
+	}
+	INC_8P(dest0);
+    }
+}
+
+static void rev_char_iplan2p8(struct display *p, int xx, int yy)
+{
+    u_char *dest;
+    int j;
+    int bytes;
+
+    dest = p->screen_base + yy * p->fontheight * p->next_line + (xx>>1)*16 +
+	   (xx & 1);
+    j = p->fontheight;
+    bytes = p->next_line;
+
+    while (j--) {
+	/*  This should really obey the individual character's
+	 *  background and foreground colors instead of simply
+	 *  inverting. For 8 plane mode, only the lower 4 bits of the
+	 *  color are inverted, because only that color registers have
+	 *  been set up.
+	 */
+	dest[0] = ~dest[0];
+	dest[2] = ~dest[2];
+	dest[4] = ~dest[4];
+	dest[6] = ~dest[6];
+	dest += bytes;
+    }
+}
+
+
+#ifdef MODULE
+int init_module(void)
+#else
+int fbcon_init_iplan2p8(void)
+#endif
+{
+    return(fbcon_register_driver(&dispsw_iplan2p8, 0));
+}
+
+#ifdef MODULE
+void cleanup_module(void)
+{
+    fbcon_unregister_driver(&dispsw_iplan2p8);
+}
+#endif /* MODULE */
--- linux-2.1.42/drivers/video/fbcon-retz3.c.orig	Mon Jun  9 23:02:59 1997
+++ linux-2.1.42/drivers/video/fbcon-retz3.c	Mon Jun  9 23:02:59 1997
@@ -0,0 +1,258 @@
+/*
+ *  linux/drivers/video/retz3.c -- Low level frame buffer operations for the
+ *				   RetinaZ3 (accelerated)
+ *
+ *	Created 5 Apr 1997 by Geert Uytterhoeven
+ *
+ *  This file is subject to the terms and conditions of the GNU General Public
+ *  License.  See the file COPYING in the main directory of this archive for
+ *  more details.
+ */
+
+#include <linux/module.h>
+#include <linux/tty.h>
+#include <linux/console.h>
+#include <linux/string.h>
+#include <linux/config.h>
+#include <linux/fb.h>
+
+#include "fbcon.h"
+#include "../char/console_struct.h"
+
+
+    /*
+     *  Prototypes
+     */
+
+static int open_retz3(struct display *p);
+static void release_retz3(void);
+static void bmove_retz3(struct display *p, int sy, int sx, int dy, int dx,
+	                int height, int width);
+static void clear_retz3(struct vc_data *conp, struct display *p, int
+			sy, int sx, int height, int width);
+static void putc_retz3(struct vc_data *conp, struct display *p, int c,
+		       int yy, int xx);
+static void putcs_retz3(struct vc_data *conp, struct display *p, const
+			char *s, int count, int yy, int xx);
+static void rev_char_retz3(struct display *p, int xx, int yy);
+
+
+    /*
+     *  Acceleration functions in retz3fb.c
+     */
+
+extern void retz3_bitblt(struct fb_var_screeninfo *scr,
+			 unsigned short srcx, unsigned short srcy, unsigned
+			 short destx, unsigned short desty, unsigned short
+			 width, unsigned short height, unsigned short cmd,
+			 unsigned short mask);
+
+#define Z3BLTcopy		0xc0
+#define Z3BLTset		0xf0
+
+
+    /*
+     *  `switch' for the low level operations
+     */
+
+static struct display_switch dispsw_retz3 = {
+   open_retz3, release_retz3, bmove_retz3, clear_retz3, putc_retz3,
+   putcs_retz3, rev_char_retz3
+};
+
+
+    /*
+     *  RetinaZ3 (accelerated)
+     */
+
+static int open_retz3(struct display *p)
+{
+    if (p->type != FB_TYPE_PACKED_PIXELS ||
+	p->var.accel != FB_ACCEL_RETINAZ3)
+	return -EINVAL;
+
+    p->next_line = p->var.xres_virtual*p->var.bits_per_pixel>>3;
+    p->next_plane = 0;
+    MOD_INC_USE_COUNT;
+    return 0;
+}
+
+static void release_retz3(void)
+{
+    MOD_DEC_USE_COUNT;
+}
+
+static void bmove_retz3(struct display *p, int sy, int sx, int dy, int dx,
+	                int height, int width)
+{
+    int fontwidth = p->fontwidth;
+
+    sx *= fontwidth;
+    dx *= fontwidth;
+    width *= fontwidth;
+
+    retz3_bitblt(&p->var,
+		 (unsigned short)sx,
+		 (unsigned short)(sy*p->fontheight),
+		 (unsigned short)dx,
+		 (unsigned short)(dy*p->fontheight),
+		 (unsigned short)width,
+		 (unsigned short)(height*p->fontheight),
+		 Z3BLTcopy,
+		 0xffff);
+}
+
+static void clear_retz3(struct vc_data *conp, struct display *p, int
+			sy, int sx, int height, int width)
+{
+    unsigned short col;
+    int fontwidth = p->fontwidth;
+
+    sx *= fontwidth;
+    width *= fontwidth;
+
+    col = attr_bgcol_ec(p, conp);
+    col &= 0xff;
+    col |= (col << 8);
+
+    retz3_bitblt(&p->var,
+		 (unsigned short)sx,
+		 (unsigned short)(sy*p->fontheight),
+		 (unsigned short)sx,
+		 (unsigned short)(sy*p->fontheight),
+		 (unsigned short)width,
+		 (unsigned short)(height*p->fontheight),
+		 Z3BLTset,
+		 col);
+}
+
+static void putc_retz3(struct vc_data *conp, struct display *p,
+		       int c, int yy, int xx)
+{
+    unsigned char *dest, *cdat;
+    unsigned long tmp;
+    unsigned int rows, revs, underl;
+    unsigned char d;
+    unsigned char fg, bg;
+
+    c &= 0xff;
+
+    dest = p->screen_base + yy*p->fontheight*p->next_line + xx*p->fontwidth;
+    cdat = p->fontdata + c * p->fontheight;
+
+    fg = p->fgcol;
+    bg = p->bgcol;
+    revs = conp->vc_reverse;
+    underl = conp->vc_underline;
+
+    for (rows = p->fontheight; rows--; dest += p->next_line) {
+	d = *cdat++;
+
+	if (underl && !rows)
+	    d = 0xff;
+	if (revs)
+	    d = ~d;
+
+	tmp =  ((d & 0x80) ? fg : bg) << 24;
+	tmp |= ((d & 0x40) ? fg : bg) << 16;
+	tmp |= ((d & 0x20) ? fg : bg) << 8;
+	tmp |= ((d & 0x10) ? fg : bg);
+	*((unsigned long*) dest) = tmp;
+	tmp =  ((d & 0x8) ? fg : bg) << 24;
+	tmp |= ((d & 0x4) ? fg : bg) << 16;
+	tmp |= ((d & 0x2) ? fg : bg) << 8;
+	tmp |= ((d & 0x1) ? fg : bg);
+	*((unsigned long*) dest + 1) = tmp;
+    }
+}
+
+static void putcs_retz3(struct vc_data *conp, struct display *p,
+			const char *s, int count, int yy, int xx)
+{
+    unsigned char *dest, *dest0, *cdat;
+    unsigned long tmp;
+    unsigned int rows, revs, underl;
+    unsigned char c, d;
+    unsigned char fg, bg;
+
+    dest0 = p->screen_base + yy*p->fontheight*p->next_line + xx*p->fontwidth;
+    fg = p->fgcol;
+    bg = p->bgcol;
+    revs = conp->vc_reverse;
+    underl = conp->vc_underline;
+
+    while (count--) {
+	c = *s++;
+	dest = dest0;
+	dest0 += 8;
+
+	cdat = p->fontdata + c * p->fontheight;
+	for (rows = p->fontheight; rows--; dest += p->next_line) {
+	    d = *cdat++;
+
+	    if (underl && !rows)
+		d = 0xff;
+	    if (revs)
+		d = ~d;
+
+	    tmp =  ((d & 0x80) ? fg : bg) << 24;
+	    tmp |= ((d & 0x40) ? fg : bg) << 16;
+	    tmp |= ((d & 0x20) ? fg : bg) << 8;
+	    tmp |= ((d & 0x10) ? fg : bg);
+	    *((unsigned long*) dest) = tmp;
+	    tmp =  ((d & 0x8) ? fg : bg) << 24;
+	    tmp |= ((d & 0x4) ? fg : bg) << 16;
+	    tmp |= ((d & 0x2) ? fg : bg) << 8;
+	    tmp |= ((d & 0x1) ? fg : bg);
+	    *((unsigned long*) dest + 1) = tmp;
+	}
+    }
+}
+
+static void rev_char_retz3(struct display *p, int xx, int yy)
+{
+    unsigned char *dest;
+    int bytes=p->next_line, rows;
+    unsigned int bpp, mask;
+
+    bpp = p->var.bits_per_pixel;
+
+    switch (bpp){
+	case 8:
+	    mask = 0x0f0f0f0f;
+	    break;
+	case 16:
+	    mask = 0xffffffff;
+	    break;
+	case 24:
+	    mask = 0xffffffff; /* ??? */
+	    break;
+	default:
+	    printk("illegal depth for rev_char_retz3(), bpp = %i\n", bpp);
+	    return;
+    }
+
+    dest = p->screen_base + yy * p->fontheight * bytes + xx * p->fontwidth;
+
+    for (rows = p->fontheight ; rows-- ; dest += bytes) {
+	((unsigned long *)dest)[0] ^= mask;
+	((unsigned long *)dest)[1] ^= mask;
+    }
+}
+
+
+#ifdef MODULE
+int init_module(void)
+#else
+int fbcon_init_retz3(void)
+#endif
+{
+    return(fbcon_register_driver(&dispsw_retz3, 1));
+}
+
+#ifdef MODULE
+void cleanup_module(void)
+{
+    fbcon_unregister_driver(&dispsw_retz3);
+}
+#endif /* MODULE */
--- linux-2.1.42/drivers/video/font_8x16.c.orig	Mon Jun  9 23:02:59 1997
+++ linux-2.1.42/drivers/video/font_8x16.c	Mon Jun  9 23:03:01 1997
@@ -0,0 +1,4625 @@
+/**********************************************/
+/*                                            */
+/*       Font file generated by cpi2fnt       */
+/*                                            */
+/**********************************************/
+
+#define FONTDATAMAX 4096
+
+char fontname_8x16[] = "VGA8x16";
+
+int  fontheight_8x16 = 16;
+int  fontwidth_8x16  = 8;
+
+unsigned char fontdata_8x16[FONTDATAMAX] = {
+
+	/* 0 0x00 '^@' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 1 0x01 '^A' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0x81, /* 10000001 */
+	0xa5, /* 10100101 */
+	0x81, /* 10000001 */
+	0x81, /* 10000001 */
+	0xbd, /* 10111101 */
+	0x99, /* 10011001 */
+	0x81, /* 10000001 */
+	0x81, /* 10000001 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 2 0x02 '^B' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0xff, /* 11111111 */
+	0xdb, /* 11011011 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xc3, /* 11000011 */
+	0xe7, /* 11100111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 3 0x03 '^C' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x6c, /* 01101100 */
+	0xfe, /* 11111110 */
+	0xfe, /* 11111110 */
+	0xfe, /* 11111110 */
+	0xfe, /* 11111110 */
+	0x7c, /* 01111100 */
+	0x38, /* 00111000 */
+	0x10, /* 00010000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 4 0x04 '^D' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x10, /* 00010000 */
+	0x38, /* 00111000 */
+	0x7c, /* 01111100 */
+	0xfe, /* 11111110 */
+	0x7c, /* 01111100 */
+	0x38, /* 00111000 */
+	0x10, /* 00010000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 5 0x05 '^E' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x3c, /* 00111100 */
+	0xe7, /* 11100111 */
+	0xe7, /* 11100111 */
+	0xe7, /* 11100111 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 6 0x06 '^F' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x7e, /* 01111110 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0x7e, /* 01111110 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 7 0x07 '^G' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 8 0x08 '^H' */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xe7, /* 11100111 */
+	0xc3, /* 11000011 */
+	0xc3, /* 11000011 */
+	0xe7, /* 11100111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+
+	/* 9 0x09 '^I' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x3c, /* 00111100 */
+	0x66, /* 01100110 */
+	0x42, /* 01000010 */
+	0x42, /* 01000010 */
+	0x66, /* 01100110 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 10 0x0a '^J' */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xc3, /* 11000011 */
+	0x99, /* 10011001 */
+	0xbd, /* 10111101 */
+	0xbd, /* 10111101 */
+	0x99, /* 10011001 */
+	0xc3, /* 11000011 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+
+	/* 11 0x0b '^K' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x1e, /* 00011110 */
+	0x0e, /* 00001110 */
+	0x1a, /* 00011010 */
+	0x32, /* 00110010 */
+	0x78, /* 01111000 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x78, /* 01111000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 12 0x0c '^L' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x3c, /* 00111100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+	0x7e, /* 01111110 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 13 0x0d '^M' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x3f, /* 00111111 */
+	0x33, /* 00110011 */
+	0x3f, /* 00111111 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x70, /* 01110000 */
+	0xf0, /* 11110000 */
+	0xe0, /* 11100000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 14 0x0e '^N' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7f, /* 01111111 */
+	0x63, /* 01100011 */
+	0x7f, /* 01111111 */
+	0x63, /* 01100011 */
+	0x63, /* 01100011 */
+	0x63, /* 01100011 */
+	0x63, /* 01100011 */
+	0x67, /* 01100111 */
+	0xe7, /* 11100111 */
+	0xe6, /* 11100110 */
+	0xc0, /* 11000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 15 0x0f '^O' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0xdb, /* 11011011 */
+	0x3c, /* 00111100 */
+	0xe7, /* 11100111 */
+	0x3c, /* 00111100 */
+	0xdb, /* 11011011 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 16 0x10 '^P' */
+	0x00, /* 00000000 */
+	0x80, /* 10000000 */
+	0xc0, /* 11000000 */
+	0xe0, /* 11100000 */
+	0xf0, /* 11110000 */
+	0xf8, /* 11111000 */
+	0xfe, /* 11111110 */
+	0xf8, /* 11111000 */
+	0xf0, /* 11110000 */
+	0xe0, /* 11100000 */
+	0xc0, /* 11000000 */
+	0x80, /* 10000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 17 0x11 '^Q' */
+	0x00, /* 00000000 */
+	0x02, /* 00000010 */
+	0x06, /* 00000110 */
+	0x0e, /* 00001110 */
+	0x1e, /* 00011110 */
+	0x3e, /* 00111110 */
+	0xfe, /* 11111110 */
+	0x3e, /* 00111110 */
+	0x1e, /* 00011110 */
+	0x0e, /* 00001110 */
+	0x06, /* 00000110 */
+	0x02, /* 00000010 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 18 0x12 '^R' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x7e, /* 01111110 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x7e, /* 01111110 */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 19 0x13 '^S' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x00, /* 00000000 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 20 0x14 '^T' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7f, /* 01111111 */
+	0xdb, /* 11011011 */
+	0xdb, /* 11011011 */
+	0xdb, /* 11011011 */
+	0x7b, /* 01111011 */
+	0x1b, /* 00011011 */
+	0x1b, /* 00011011 */
+	0x1b, /* 00011011 */
+	0x1b, /* 00011011 */
+	0x1b, /* 00011011 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 21 0x15 '^U' */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0x60, /* 01100000 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x6c, /* 01101100 */
+	0x38, /* 00111000 */
+	0x0c, /* 00001100 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 22 0x16 '^V' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0xfe, /* 11111110 */
+	0xfe, /* 11111110 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 23 0x17 '^W' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x7e, /* 01111110 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x7e, /* 01111110 */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 24 0x18 '^X' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x7e, /* 01111110 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 25 0x19 '^Y' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x7e, /* 01111110 */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 26 0x1a '^Z' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x0c, /* 00001100 */
+	0xfe, /* 11111110 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 27 0x1b '^[' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x30, /* 00110000 */
+	0x60, /* 01100000 */
+	0xfe, /* 11111110 */
+	0x60, /* 01100000 */
+	0x30, /* 00110000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 28 0x1c '^\' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 29 0x1d '^]' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x28, /* 00101000 */
+	0x6c, /* 01101100 */
+	0xfe, /* 11111110 */
+	0x6c, /* 01101100 */
+	0x28, /* 00101000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 30 0x1e '^^' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x10, /* 00010000 */
+	0x38, /* 00111000 */
+	0x38, /* 00111000 */
+	0x7c, /* 01111100 */
+	0x7c, /* 01111100 */
+	0xfe, /* 11111110 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 31 0x1f '^_' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0xfe, /* 11111110 */
+	0x7c, /* 01111100 */
+	0x7c, /* 01111100 */
+	0x38, /* 00111000 */
+	0x38, /* 00111000 */
+	0x10, /* 00010000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 32 0x20 ' ' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 33 0x21 '!' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x3c, /* 00111100 */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 34 0x22 '"' */
+	0x00, /* 00000000 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x24, /* 00100100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 35 0x23 '#' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0xfe, /* 11111110 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0xfe, /* 11111110 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 36 0x24 '$' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc2, /* 11000010 */
+	0xc0, /* 11000000 */
+	0x7c, /* 01111100 */
+	0x06, /* 00000110 */
+	0x06, /* 00000110 */
+	0x86, /* 10000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 37 0x25 '%' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xc2, /* 11000010 */
+	0xc6, /* 11000110 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x60, /* 01100000 */
+	0xc6, /* 11000110 */
+	0x86, /* 10000110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 38 0x26 '&' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0x38, /* 00111000 */
+	0x76, /* 01110110 */
+	0xdc, /* 11011100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 39 0x27 ''' */
+	0x00, /* 00000000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x60, /* 01100000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 40 0x28 '(' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x0c, /* 00001100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 41 0x29 ')' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 42 0x2a '*' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x66, /* 01100110 */
+	0x3c, /* 00111100 */
+	0xff, /* 11111111 */
+	0x3c, /* 00111100 */
+	0x66, /* 01100110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 43 0x2b '+' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x7e, /* 01111110 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 44 0x2c ',' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 45 0x2d '-' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 46 0x2e '.' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 47 0x2f '/' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x02, /* 00000010 */
+	0x06, /* 00000110 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x60, /* 01100000 */
+	0xc0, /* 11000000 */
+	0x80, /* 10000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 48 0x30 '0' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xd6, /* 11010110 */
+	0xd6, /* 11010110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x6c, /* 01101100 */
+	0x38, /* 00111000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 49 0x31 '1' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x38, /* 00111000 */
+	0x78, /* 01111000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 50 0x32 '2' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0x06, /* 00000110 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x60, /* 01100000 */
+	0xc0, /* 11000000 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 51 0x33 '3' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0x06, /* 00000110 */
+	0x06, /* 00000110 */
+	0x3c, /* 00111100 */
+	0x06, /* 00000110 */
+	0x06, /* 00000110 */
+	0x06, /* 00000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 52 0x34 '4' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x0c, /* 00001100 */
+	0x1c, /* 00011100 */
+	0x3c, /* 00111100 */
+	0x6c, /* 01101100 */
+	0xcc, /* 11001100 */
+	0xfe, /* 11111110 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x1e, /* 00011110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 53 0x35 '5' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xfc, /* 11111100 */
+	0x06, /* 00000110 */
+	0x06, /* 00000110 */
+	0x06, /* 00000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 54 0x36 '6' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x38, /* 00111000 */
+	0x60, /* 01100000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xfc, /* 11111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 55 0x37 '7' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0xc6, /* 11000110 */
+	0x06, /* 00000110 */
+	0x06, /* 00000110 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 56 0x38 '8' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 57 0x39 '9' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7e, /* 01111110 */
+	0x06, /* 00000110 */
+	0x06, /* 00000110 */
+	0x06, /* 00000110 */
+	0x0c, /* 00001100 */
+	0x78, /* 01111000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 58 0x3a ':' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 59 0x3b ';' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 60 0x3c '<' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x06, /* 00000110 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x60, /* 01100000 */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x0c, /* 00001100 */
+	0x06, /* 00000110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 61 0x3d '=' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 62 0x3e '>' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x60, /* 01100000 */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x0c, /* 00001100 */
+	0x06, /* 00000110 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x60, /* 01100000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 63 0x3f '?' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 64 0x40 '@' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xde, /* 11011110 */
+	0xde, /* 11011110 */
+	0xde, /* 11011110 */
+	0xdc, /* 11011100 */
+	0xc0, /* 11000000 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 65 0x41 'A' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x10, /* 00010000 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 66 0x42 'B' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfc, /* 11111100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x7c, /* 01111100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0xfc, /* 11111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 67 0x43 'C' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x3c, /* 00111100 */
+	0x66, /* 01100110 */
+	0xc2, /* 11000010 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc2, /* 11000010 */
+	0x66, /* 01100110 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 68 0x44 'D' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xf8, /* 11111000 */
+	0x6c, /* 01101100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x6c, /* 01101100 */
+	0xf8, /* 11111000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 69 0x45 'E' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0x66, /* 01100110 */
+	0x62, /* 01100010 */
+	0x68, /* 01101000 */
+	0x78, /* 01111000 */
+	0x68, /* 01101000 */
+	0x60, /* 01100000 */
+	0x62, /* 01100010 */
+	0x66, /* 01100110 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 70 0x46 'F' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0x66, /* 01100110 */
+	0x62, /* 01100010 */
+	0x68, /* 01101000 */
+	0x78, /* 01111000 */
+	0x68, /* 01101000 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0xf0, /* 11110000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 71 0x47 'G' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x3c, /* 00111100 */
+	0x66, /* 01100110 */
+	0xc2, /* 11000010 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xde, /* 11011110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x66, /* 01100110 */
+	0x3a, /* 00111010 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 72 0x48 'H' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 73 0x49 'I' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 74 0x4a 'J' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x1e, /* 00011110 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x78, /* 01111000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 75 0x4b 'K' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xe6, /* 11100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x6c, /* 01101100 */
+	0x78, /* 01111000 */
+	0x78, /* 01111000 */
+	0x6c, /* 01101100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0xe6, /* 11100110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 76 0x4c 'L' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xf0, /* 11110000 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0x62, /* 01100010 */
+	0x66, /* 01100110 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 77 0x4d 'M' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0xee, /* 11101110 */
+	0xfe, /* 11111110 */
+	0xfe, /* 11111110 */
+	0xd6, /* 11010110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 78 0x4e 'N' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0xe6, /* 11100110 */
+	0xf6, /* 11110110 */
+	0xfe, /* 11111110 */
+	0xde, /* 11011110 */
+	0xce, /* 11001110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 79 0x4f 'O' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 80 0x50 'P' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfc, /* 11111100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x7c, /* 01111100 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0xf0, /* 11110000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 81 0x51 'Q' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xd6, /* 11010110 */
+	0xde, /* 11011110 */
+	0x7c, /* 01111100 */
+	0x0c, /* 00001100 */
+	0x0e, /* 00001110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 82 0x52 'R' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfc, /* 11111100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x7c, /* 01111100 */
+	0x6c, /* 01101100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0xe6, /* 11100110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 83 0x53 'S' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x60, /* 01100000 */
+	0x38, /* 00111000 */
+	0x0c, /* 00001100 */
+	0x06, /* 00000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 84 0x54 'T' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0x7e, /* 01111110 */
+	0x5a, /* 01011010 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 85 0x55 'U' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 86 0x56 'V' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x6c, /* 01101100 */
+	0x38, /* 00111000 */
+	0x10, /* 00010000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 87 0x57 'W' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xd6, /* 11010110 */
+	0xd6, /* 11010110 */
+	0xd6, /* 11010110 */
+	0xfe, /* 11111110 */
+	0xee, /* 11101110 */
+	0x6c, /* 01101100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 88 0x58 'X' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x6c, /* 01101100 */
+	0x7c, /* 01111100 */
+	0x38, /* 00111000 */
+	0x38, /* 00111000 */
+	0x7c, /* 01111100 */
+	0x6c, /* 01101100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 89 0x59 'Y' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 90 0x5a 'Z' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0xc6, /* 11000110 */
+	0x86, /* 10000110 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x60, /* 01100000 */
+	0xc2, /* 11000010 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 91 0x5b '[' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x3c, /* 00111100 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 92 0x5c '\' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x80, /* 10000000 */
+	0xc0, /* 11000000 */
+	0xe0, /* 11100000 */
+	0x70, /* 01110000 */
+	0x38, /* 00111000 */
+	0x1c, /* 00011100 */
+	0x0e, /* 00001110 */
+	0x06, /* 00000110 */
+	0x02, /* 00000010 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 93 0x5d ']' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x3c, /* 00111100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 94 0x5e '^' */
+	0x10, /* 00010000 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 95 0x5f '_' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 96 0x60 '`' */
+	0x00, /* 00000000 */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x0c, /* 00001100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 97 0x61 'a' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x78, /* 01111000 */
+	0x0c, /* 00001100 */
+	0x7c, /* 01111100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 98 0x62 'b' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xe0, /* 11100000 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0x78, /* 01111000 */
+	0x6c, /* 01101100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 99 0x63 'c' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 100 0x64 'd' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x1c, /* 00011100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x3c, /* 00111100 */
+	0x6c, /* 01101100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 101 0x65 'e' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 102 0x66 'f' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x1c, /* 00011100 */
+	0x36, /* 00110110 */
+	0x32, /* 00110010 */
+	0x30, /* 00110000 */
+	0x78, /* 01111000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x78, /* 01111000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 103 0x67 'g' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x76, /* 01110110 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x7c, /* 01111100 */
+	0x0c, /* 00001100 */
+	0xcc, /* 11001100 */
+	0x78, /* 01111000 */
+	0x00, /* 00000000 */
+
+	/* 104 0x68 'h' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xe0, /* 11100000 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0x6c, /* 01101100 */
+	0x76, /* 01110110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0xe6, /* 11100110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 105 0x69 'i' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x38, /* 00111000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 106 0x6a 'j' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x06, /* 00000110 */
+	0x06, /* 00000110 */
+	0x00, /* 00000000 */
+	0x0e, /* 00001110 */
+	0x06, /* 00000110 */
+	0x06, /* 00000110 */
+	0x06, /* 00000110 */
+	0x06, /* 00000110 */
+	0x06, /* 00000110 */
+	0x06, /* 00000110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+
+	/* 107 0x6b 'k' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xe0, /* 11100000 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0x66, /* 01100110 */
+	0x6c, /* 01101100 */
+	0x78, /* 01111000 */
+	0x78, /* 01111000 */
+	0x6c, /* 01101100 */
+	0x66, /* 01100110 */
+	0xe6, /* 11100110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 108 0x6c 'l' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x38, /* 00111000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 109 0x6d 'm' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xec, /* 11101100 */
+	0xfe, /* 11111110 */
+	0xd6, /* 11010110 */
+	0xd6, /* 11010110 */
+	0xd6, /* 11010110 */
+	0xd6, /* 11010110 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 110 0x6e 'n' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xdc, /* 11011100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 111 0x6f 'o' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 112 0x70 'p' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xdc, /* 11011100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x7c, /* 01111100 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0xf0, /* 11110000 */
+	0x00, /* 00000000 */
+
+	/* 113 0x71 'q' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x76, /* 01110110 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x7c, /* 01111100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x1e, /* 00011110 */
+	0x00, /* 00000000 */
+
+	/* 114 0x72 'r' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xdc, /* 11011100 */
+	0x76, /* 01110110 */
+	0x66, /* 01100110 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0xf0, /* 11110000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 115 0x73 's' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0x60, /* 01100000 */
+	0x38, /* 00111000 */
+	0x0c, /* 00001100 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 116 0x74 't' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x10, /* 00010000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0xfc, /* 11111100 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x36, /* 00110110 */
+	0x1c, /* 00011100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 117 0x75 'u' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 118 0x76 'v' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x6c, /* 01101100 */
+	0x38, /* 00111000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 119 0x77 'w' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xd6, /* 11010110 */
+	0xd6, /* 11010110 */
+	0xd6, /* 11010110 */
+	0xfe, /* 11111110 */
+	0x6c, /* 01101100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 120 0x78 'x' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0x6c, /* 01101100 */
+	0x38, /* 00111000 */
+	0x38, /* 00111000 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 121 0x79 'y' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7e, /* 01111110 */
+	0x06, /* 00000110 */
+	0x0c, /* 00001100 */
+	0xf8, /* 11111000 */
+	0x00, /* 00000000 */
+
+	/* 122 0x7a 'z' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0xcc, /* 11001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x60, /* 01100000 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 123 0x7b '{' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x0e, /* 00001110 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x70, /* 01110000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x0e, /* 00001110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 124 0x7c '|' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 125 0x7d '}' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x70, /* 01110000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x0e, /* 00001110 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x70, /* 01110000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 126 0x7e '~' */
+	0x00, /* 00000000 */
+	0x76, /* 01110110 */
+	0xdc, /* 11011100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 127 0x7f '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x10, /* 00010000 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 128 0x80 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x3c, /* 00111100 */
+	0x66, /* 01100110 */
+	0xc2, /* 11000010 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc2, /* 11000010 */
+	0x66, /* 01100110 */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+	0x70, /* 01110000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 129 0x81 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xcc, /* 11001100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 130 0x82 '' */
+	0x00, /* 00000000 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 131 0x83 '' */
+	0x00, /* 00000000 */
+	0x10, /* 00010000 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0x00, /* 00000000 */
+	0x78, /* 01111000 */
+	0x0c, /* 00001100 */
+	0x7c, /* 01111100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 132 0x84 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xcc, /* 11001100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x78, /* 01111000 */
+	0x0c, /* 00001100 */
+	0x7c, /* 01111100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 133 0x85 '' */
+	0x00, /* 00000000 */
+	0x60, /* 01100000 */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x78, /* 01111000 */
+	0x0c, /* 00001100 */
+	0x7c, /* 01111100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 134 0x86 '' */
+	0x00, /* 00000000 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0x38, /* 00111000 */
+	0x00, /* 00000000 */
+	0x78, /* 01111000 */
+	0x0c, /* 00001100 */
+	0x7c, /* 01111100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 135 0x87 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x18, /* 00011000 */
+	0x70, /* 01110000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 136 0x88 '' */
+	0x00, /* 00000000 */
+	0x10, /* 00010000 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 137 0x89 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 138 0x8a '' */
+	0x00, /* 00000000 */
+	0x60, /* 01100000 */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 139 0x8b '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x66, /* 01100110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x38, /* 00111000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 140 0x8c '' */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x66, /* 01100110 */
+	0x00, /* 00000000 */
+	0x38, /* 00111000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 141 0x8d '' */
+	0x00, /* 00000000 */
+	0x60, /* 01100000 */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x38, /* 00111000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 142 0x8e '' */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0x10, /* 00010000 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 143 0x8f '' */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0x38, /* 00111000 */
+	0x10, /* 00010000 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 144 0x90 '' */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0x66, /* 01100110 */
+	0x62, /* 01100010 */
+	0x68, /* 01101000 */
+	0x78, /* 01111000 */
+	0x68, /* 01101000 */
+	0x62, /* 01100010 */
+	0x66, /* 01100110 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 145 0x91 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xec, /* 11101100 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x7e, /* 01111110 */
+	0xd8, /* 11011000 */
+	0xd8, /* 11011000 */
+	0x6e, /* 01101110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 146 0x92 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x3e, /* 00111110 */
+	0x6c, /* 01101100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xfe, /* 11111110 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xce, /* 11001110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 147 0x93 '' */
+	0x00, /* 00000000 */
+	0x10, /* 00010000 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 148 0x94 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 149 0x95 '' */
+	0x00, /* 00000000 */
+	0x60, /* 01100000 */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 150 0x96 '' */
+	0x00, /* 00000000 */
+	0x30, /* 00110000 */
+	0x78, /* 01111000 */
+	0xcc, /* 11001100 */
+	0x00, /* 00000000 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 151 0x97 '' */
+	0x00, /* 00000000 */
+	0x60, /* 01100000 */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 152 0x98 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7e, /* 01111110 */
+	0x06, /* 00000110 */
+	0x0c, /* 00001100 */
+	0x78, /* 01111000 */
+	0x00, /* 00000000 */
+
+	/* 153 0x99 '' */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 154 0x9a '' */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 155 0x9b '' */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 156 0x9c '' */
+	0x00, /* 00000000 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0x64, /* 01100100 */
+	0x60, /* 01100000 */
+	0xf0, /* 11110000 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0xe6, /* 11100110 */
+	0xfc, /* 11111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 157 0x9d '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+	0x7e, /* 01111110 */
+	0x18, /* 00011000 */
+	0x7e, /* 01111110 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 158 0x9e '' */
+	0x00, /* 00000000 */
+	0xf8, /* 11111000 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xf8, /* 11111000 */
+	0xc4, /* 11000100 */
+	0xcc, /* 11001100 */
+	0xde, /* 11011110 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 159 0x9f '' */
+	0x00, /* 00000000 */
+	0x0e, /* 00001110 */
+	0x1b, /* 00011011 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x7e, /* 01111110 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0xd8, /* 11011000 */
+	0x70, /* 01110000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 160 0xa0 '' */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x60, /* 01100000 */
+	0x00, /* 00000000 */
+	0x78, /* 01111000 */
+	0x0c, /* 00001100 */
+	0x7c, /* 01111100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 161 0xa1 '' */
+	0x00, /* 00000000 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x00, /* 00000000 */
+	0x38, /* 00111000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 162 0xa2 '' */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x60, /* 01100000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 163 0xa3 '' */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x60, /* 01100000 */
+	0x00, /* 00000000 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 164 0xa4 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x76, /* 01110110 */
+	0xdc, /* 11011100 */
+	0x00, /* 00000000 */
+	0xdc, /* 11011100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 165 0xa5 '' */
+	0x76, /* 01110110 */
+	0xdc, /* 11011100 */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0xe6, /* 11100110 */
+	0xf6, /* 11110110 */
+	0xfe, /* 11111110 */
+	0xde, /* 11011110 */
+	0xce, /* 11001110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 166 0xa6 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x3c, /* 00111100 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0x3e, /* 00111110 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 167 0xa7 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0x38, /* 00111000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 168 0xa8 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x00, /* 00000000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x60, /* 01100000 */
+	0xc0, /* 11000000 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 169 0xa9 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 170 0xaa '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0x06, /* 00000110 */
+	0x06, /* 00000110 */
+	0x06, /* 00000110 */
+	0x06, /* 00000110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 171 0xab '' */
+	0x00, /* 00000000 */
+	0x60, /* 01100000 */
+	0xe0, /* 11100000 */
+	0x62, /* 01100010 */
+	0x66, /* 01100110 */
+	0x6c, /* 01101100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x60, /* 01100000 */
+	0xdc, /* 11011100 */
+	0x86, /* 10000110 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x3e, /* 00111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 172 0xac '' */
+	0x00, /* 00000000 */
+	0x60, /* 01100000 */
+	0xe0, /* 11100000 */
+	0x62, /* 01100010 */
+	0x66, /* 01100110 */
+	0x6c, /* 01101100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x66, /* 01100110 */
+	0xce, /* 11001110 */
+	0x9a, /* 10011010 */
+	0x3f, /* 00111111 */
+	0x06, /* 00000110 */
+	0x06, /* 00000110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 173 0xad '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x3c, /* 00111100 */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 174 0xae '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x36, /* 00110110 */
+	0x6c, /* 01101100 */
+	0xd8, /* 11011000 */
+	0x6c, /* 01101100 */
+	0x36, /* 00110110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 175 0xaf '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xd8, /* 11011000 */
+	0x6c, /* 01101100 */
+	0x36, /* 00110110 */
+	0x6c, /* 01101100 */
+	0xd8, /* 11011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 176 0xb0 '' */
+	0x11, /* 00010001 */
+	0x44, /* 01000100 */
+	0x11, /* 00010001 */
+	0x44, /* 01000100 */
+	0x11, /* 00010001 */
+	0x44, /* 01000100 */
+	0x11, /* 00010001 */
+	0x44, /* 01000100 */
+	0x11, /* 00010001 */
+	0x44, /* 01000100 */
+	0x11, /* 00010001 */
+	0x44, /* 01000100 */
+	0x11, /* 00010001 */
+	0x44, /* 01000100 */
+	0x11, /* 00010001 */
+	0x44, /* 01000100 */
+
+	/* 177 0xb1 '' */
+	0x55, /* 01010101 */
+	0xaa, /* 10101010 */
+	0x55, /* 01010101 */
+	0xaa, /* 10101010 */
+	0x55, /* 01010101 */
+	0xaa, /* 10101010 */
+	0x55, /* 01010101 */
+	0xaa, /* 10101010 */
+	0x55, /* 01010101 */
+	0xaa, /* 10101010 */
+	0x55, /* 01010101 */
+	0xaa, /* 10101010 */
+	0x55, /* 01010101 */
+	0xaa, /* 10101010 */
+	0x55, /* 01010101 */
+	0xaa, /* 10101010 */
+
+	/* 178 0xb2 '' */
+	0xdd, /* 11011101 */
+	0x77, /* 01110111 */
+	0xdd, /* 11011101 */
+	0x77, /* 01110111 */
+	0xdd, /* 11011101 */
+	0x77, /* 01110111 */
+	0xdd, /* 11011101 */
+	0x77, /* 01110111 */
+	0xdd, /* 11011101 */
+	0x77, /* 01110111 */
+	0xdd, /* 11011101 */
+	0x77, /* 01110111 */
+	0xdd, /* 11011101 */
+	0x77, /* 01110111 */
+	0xdd, /* 11011101 */
+	0x77, /* 01110111 */
+
+	/* 179 0xb3 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 180 0xb4 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0xf8, /* 11111000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 181 0xb5 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0xf8, /* 11111000 */
+	0x18, /* 00011000 */
+	0xf8, /* 11111000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 182 0xb6 '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0xf6, /* 11110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 183 0xb7 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 184 0xb8 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xf8, /* 11111000 */
+	0x18, /* 00011000 */
+	0xf8, /* 11111000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 185 0xb9 '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0xf6, /* 11110110 */
+	0x06, /* 00000110 */
+	0xf6, /* 11110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 186 0xba '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 187 0xbb '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0x06, /* 00000110 */
+	0xf6, /* 11110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 188 0xbc '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0xf6, /* 11110110 */
+	0x06, /* 00000110 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 189 0xbd '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 190 0xbe '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0xf8, /* 11111000 */
+	0x18, /* 00011000 */
+	0xf8, /* 11111000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 191 0xbf '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xf8, /* 11111000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 192 0xc0 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x1f, /* 00011111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 193 0xc1 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 194 0xc2 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 195 0xc3 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x1f, /* 00011111 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 196 0xc4 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 197 0xc5 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0xff, /* 11111111 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 198 0xc6 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x1f, /* 00011111 */
+	0x18, /* 00011000 */
+	0x1f, /* 00011111 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 199 0xc7 '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x37, /* 00110111 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 200 0xc8 '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x37, /* 00110111 */
+	0x30, /* 00110000 */
+	0x3f, /* 00111111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 201 0xc9 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x3f, /* 00111111 */
+	0x30, /* 00110000 */
+	0x37, /* 00110111 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 202 0xca '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0xf7, /* 11110111 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 203 0xcb '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0xf7, /* 11110111 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 204 0xcc '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x37, /* 00110111 */
+	0x30, /* 00110000 */
+	0x37, /* 00110111 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 205 0xcd '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 206 0xce '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0xf7, /* 11110111 */
+	0x00, /* 00000000 */
+	0xf7, /* 11110111 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 207 0xcf '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 208 0xd0 '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 209 0xd1 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 210 0xd2 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 211 0xd3 '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x3f, /* 00111111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 212 0xd4 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x1f, /* 00011111 */
+	0x18, /* 00011000 */
+	0x1f, /* 00011111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 213 0xd5 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x1f, /* 00011111 */
+	0x18, /* 00011000 */
+	0x1f, /* 00011111 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 214 0xd6 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x3f, /* 00111111 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 215 0xd7 '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0xff, /* 11111111 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 216 0xd8 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0xff, /* 11111111 */
+	0x18, /* 00011000 */
+	0xff, /* 11111111 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 217 0xd9 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0xf8, /* 11111000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 218 0xda '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x1f, /* 00011111 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 219 0xdb '' */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+
+	/* 220 0xdc '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+
+	/* 221 0xdd '' */
+	0xf0, /* 11110000 */
+	0xf0, /* 11110000 */
+	0xf0, /* 11110000 */
+	0xf0, /* 11110000 */
+	0xf0, /* 11110000 */
+	0xf0, /* 11110000 */
+	0xf0, /* 11110000 */
+	0xf0, /* 11110000 */
+	0xf0, /* 11110000 */
+	0xf0, /* 11110000 */
+	0xf0, /* 11110000 */
+	0xf0, /* 11110000 */
+	0xf0, /* 11110000 */
+	0xf0, /* 11110000 */
+	0xf0, /* 11110000 */
+	0xf0, /* 11110000 */
+
+	/* 222 0xde '' */
+	0x0f, /* 00001111 */
+	0x0f, /* 00001111 */
+	0x0f, /* 00001111 */
+	0x0f, /* 00001111 */
+	0x0f, /* 00001111 */
+	0x0f, /* 00001111 */
+	0x0f, /* 00001111 */
+	0x0f, /* 00001111 */
+	0x0f, /* 00001111 */
+	0x0f, /* 00001111 */
+	0x0f, /* 00001111 */
+	0x0f, /* 00001111 */
+	0x0f, /* 00001111 */
+	0x0f, /* 00001111 */
+	0x0f, /* 00001111 */
+	0x0f, /* 00001111 */
+
+	/* 223 0xdf '' */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 224 0xe0 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x76, /* 01110110 */
+	0xdc, /* 11011100 */
+	0xd8, /* 11011000 */
+	0xd8, /* 11011000 */
+	0xd8, /* 11011000 */
+	0xdc, /* 11011100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 225 0xe1 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x78, /* 01111000 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xd8, /* 11011000 */
+	0xcc, /* 11001100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xcc, /* 11001100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 226 0xe2 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 227 0xe3 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 228 0xe4 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0xc6, /* 11000110 */
+	0x60, /* 01100000 */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x60, /* 01100000 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 229 0xe5 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0xd8, /* 11011000 */
+	0xd8, /* 11011000 */
+	0xd8, /* 11011000 */
+	0xd8, /* 11011000 */
+	0xd8, /* 11011000 */
+	0x70, /* 01110000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 230 0xe6 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x7c, /* 01111100 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0xc0, /* 11000000 */
+	0x00, /* 00000000 */
+
+	/* 231 0xe7 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x76, /* 01110110 */
+	0xdc, /* 11011100 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 232 0xe8 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 233 0xe9 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x6c, /* 01101100 */
+	0x38, /* 00111000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 234 0xea '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0xee, /* 11101110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 235 0xeb '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x1e, /* 00011110 */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x0c, /* 00001100 */
+	0x3e, /* 00111110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 236 0xec '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0xdb, /* 11011011 */
+	0xdb, /* 11011011 */
+	0xdb, /* 11011011 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 237 0xed '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x03, /* 00000011 */
+	0x06, /* 00000110 */
+	0x7e, /* 01111110 */
+	0xdb, /* 11011011 */
+	0xdb, /* 11011011 */
+	0xf3, /* 11110011 */
+	0x7e, /* 01111110 */
+	0x60, /* 01100000 */
+	0xc0, /* 11000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 238 0xee '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x1c, /* 00011100 */
+	0x30, /* 00110000 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0x7c, /* 01111100 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0x30, /* 00110000 */
+	0x1c, /* 00011100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 239 0xef '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 240 0xf0 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 241 0xf1 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x7e, /* 01111110 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 242 0xf2 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x0c, /* 00001100 */
+	0x06, /* 00000110 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 243 0xf3 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x60, /* 01100000 */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x0c, /* 00001100 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 244 0xf4 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x0e, /* 00001110 */
+	0x1b, /* 00011011 */
+	0x1b, /* 00011011 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 245 0xf5 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0xd8, /* 11011000 */
+	0xd8, /* 11011000 */
+	0xd8, /* 11011000 */
+	0x70, /* 01110000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 246 0xf6 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 247 0xf7 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x76, /* 01110110 */
+	0xdc, /* 11011100 */
+	0x00, /* 00000000 */
+	0x76, /* 01110110 */
+	0xdc, /* 11011100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 248 0xf8 '' */
+	0x00, /* 00000000 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0x38, /* 00111000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 249 0xf9 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 250 0xfa '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 251 0xfb '' */
+	0x00, /* 00000000 */
+	0x0f, /* 00001111 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0xec, /* 11101100 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0x3c, /* 00111100 */
+	0x1c, /* 00011100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 252 0xfc '' */
+	0x00, /* 00000000 */
+	0x6c, /* 01101100 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 253 0xfd '' */
+	0x00, /* 00000000 */
+	0x3c, /* 00111100 */
+	0x66, /* 01100110 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x32, /* 00110010 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 254 0xfe '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0x7e, /* 01111110 */
+	0x7e, /* 01111110 */
+	0x7e, /* 01111110 */
+	0x7e, /* 01111110 */
+	0x7e, /* 01111110 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 255 0xff '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+};
+
--- linux-2.1.42/drivers/video/font_8x8.c.orig	Mon Jun  9 23:03:01 1997
+++ linux-2.1.42/drivers/video/font_8x8.c	Mon Jun  9 23:03:02 1997
@@ -0,0 +1,2577 @@
+/**********************************************/
+/*                                            */
+/*       Font file generated by cpi2fnt       */
+/*                                            */
+/**********************************************/
+
+#define FONTDATAMAX 2048
+
+char fontname_8x8[] = "VGA8x8";
+
+int  fontheight_8x8 = 8;
+int  fontwidth_8x8  = 8;
+
+unsigned char fontdata_8x8[FONTDATAMAX] = {
+
+	/* 0 0x00 '^@' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 1 0x01 '^A' */
+	0x7e, /* 01111110 */
+	0x81, /* 10000001 */
+	0xa5, /* 10100101 */
+	0x81, /* 10000001 */
+	0xbd, /* 10111101 */
+	0x99, /* 10011001 */
+	0x81, /* 10000001 */
+	0x7e, /* 01111110 */
+
+	/* 2 0x02 '^B' */
+	0x7e, /* 01111110 */
+	0xff, /* 11111111 */
+	0xdb, /* 11011011 */
+	0xff, /* 11111111 */
+	0xc3, /* 11000011 */
+	0xe7, /* 11100111 */
+	0xff, /* 11111111 */
+	0x7e, /* 01111110 */
+
+	/* 3 0x03 '^C' */
+	0x6c, /* 01101100 */
+	0xfe, /* 11111110 */
+	0xfe, /* 11111110 */
+	0xfe, /* 11111110 */
+	0x7c, /* 01111100 */
+	0x38, /* 00111000 */
+	0x10, /* 00010000 */
+	0x00, /* 00000000 */
+
+	/* 4 0x04 '^D' */
+	0x10, /* 00010000 */
+	0x38, /* 00111000 */
+	0x7c, /* 01111100 */
+	0xfe, /* 11111110 */
+	0x7c, /* 01111100 */
+	0x38, /* 00111000 */
+	0x10, /* 00010000 */
+	0x00, /* 00000000 */
+
+	/* 5 0x05 '^E' */
+	0x38, /* 00111000 */
+	0x7c, /* 01111100 */
+	0x38, /* 00111000 */
+	0xfe, /* 11111110 */
+	0xfe, /* 11111110 */
+	0xd6, /* 11010110 */
+	0x10, /* 00010000 */
+	0x38, /* 00111000 */
+
+	/* 6 0x06 '^F' */
+	0x10, /* 00010000 */
+	0x38, /* 00111000 */
+	0x7c, /* 01111100 */
+	0xfe, /* 11111110 */
+	0xfe, /* 11111110 */
+	0x7c, /* 01111100 */
+	0x10, /* 00010000 */
+	0x38, /* 00111000 */
+
+	/* 7 0x07 '^G' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 8 0x08 '^H' */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xe7, /* 11100111 */
+	0xc3, /* 11000011 */
+	0xc3, /* 11000011 */
+	0xe7, /* 11100111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+
+	/* 9 0x09 '^I' */
+	0x00, /* 00000000 */
+	0x3c, /* 00111100 */
+	0x66, /* 01100110 */
+	0x42, /* 01000010 */
+	0x42, /* 01000010 */
+	0x66, /* 01100110 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+
+	/* 10 0x0a '^J' */
+	0xff, /* 11111111 */
+	0xc3, /* 11000011 */
+	0x99, /* 10011001 */
+	0xbd, /* 10111101 */
+	0xbd, /* 10111101 */
+	0x99, /* 10011001 */
+	0xc3, /* 11000011 */
+	0xff, /* 11111111 */
+
+	/* 11 0x0b '^K' */
+	0x0f, /* 00001111 */
+	0x07, /* 00000111 */
+	0x0f, /* 00001111 */
+	0x7d, /* 01111101 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x78, /* 01111000 */
+
+	/* 12 0x0c '^L' */
+	0x3c, /* 00111100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+	0x7e, /* 01111110 */
+	0x18, /* 00011000 */
+
+	/* 13 0x0d '^M' */
+	0x3f, /* 00111111 */
+	0x33, /* 00110011 */
+	0x3f, /* 00111111 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x70, /* 01110000 */
+	0xf0, /* 11110000 */
+	0xe0, /* 11100000 */
+
+	/* 14 0x0e '^N' */
+	0x7f, /* 01111111 */
+	0x63, /* 01100011 */
+	0x7f, /* 01111111 */
+	0x63, /* 01100011 */
+	0x63, /* 01100011 */
+	0x67, /* 01100111 */
+	0xe6, /* 11100110 */
+	0xc0, /* 11000000 */
+
+	/* 15 0x0f '^O' */
+	0x18, /* 00011000 */
+	0xdb, /* 11011011 */
+	0x3c, /* 00111100 */
+	0xe7, /* 11100111 */
+	0xe7, /* 11100111 */
+	0x3c, /* 00111100 */
+	0xdb, /* 11011011 */
+	0x18, /* 00011000 */
+
+	/* 16 0x10 '^P' */
+	0x80, /* 10000000 */
+	0xe0, /* 11100000 */
+	0xf8, /* 11111000 */
+	0xfe, /* 11111110 */
+	0xf8, /* 11111000 */
+	0xe0, /* 11100000 */
+	0x80, /* 10000000 */
+	0x00, /* 00000000 */
+
+	/* 17 0x11 '^Q' */
+	0x02, /* 00000010 */
+	0x0e, /* 00001110 */
+	0x3e, /* 00111110 */
+	0xfe, /* 11111110 */
+	0x3e, /* 00111110 */
+	0x0e, /* 00001110 */
+	0x02, /* 00000010 */
+	0x00, /* 00000000 */
+
+	/* 18 0x12 '^R' */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x7e, /* 01111110 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x7e, /* 01111110 */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+
+	/* 19 0x13 '^S' */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x00, /* 00000000 */
+	0x66, /* 01100110 */
+	0x00, /* 00000000 */
+
+	/* 20 0x14 '^T' */
+	0x7f, /* 01111111 */
+	0xdb, /* 11011011 */
+	0xdb, /* 11011011 */
+	0x7b, /* 01111011 */
+	0x1b, /* 00011011 */
+	0x1b, /* 00011011 */
+	0x1b, /* 00011011 */
+	0x00, /* 00000000 */
+
+	/* 21 0x15 '^U' */
+	0x3e, /* 00111110 */
+	0x61, /* 01100001 */
+	0x3c, /* 00111100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x3c, /* 00111100 */
+	0x86, /* 10000110 */
+	0x7c, /* 01111100 */
+
+	/* 22 0x16 '^V' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0x7e, /* 01111110 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+
+	/* 23 0x17 '^W' */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x7e, /* 01111110 */
+	0x18, /* 00011000 */
+	0x7e, /* 01111110 */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+	0xff, /* 11111111 */
+
+	/* 24 0x18 '^X' */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x7e, /* 01111110 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+
+	/* 25 0x19 '^Y' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x7e, /* 01111110 */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+
+	/* 26 0x1a '^Z' */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x0c, /* 00001100 */
+	0xfe, /* 11111110 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 27 0x1b '^[' */
+	0x00, /* 00000000 */
+	0x30, /* 00110000 */
+	0x60, /* 01100000 */
+	0xfe, /* 11111110 */
+	0x60, /* 01100000 */
+	0x30, /* 00110000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 28 0x1c '^\' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 29 0x1d '^]' */
+	0x00, /* 00000000 */
+	0x24, /* 00100100 */
+	0x66, /* 01100110 */
+	0xff, /* 11111111 */
+	0x66, /* 01100110 */
+	0x24, /* 00100100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 30 0x1e '^^' */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x7e, /* 01111110 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 31 0x1f '^_' */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0x7e, /* 01111110 */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 32 0x20 ' ' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 33 0x21 '!' */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+
+	/* 34 0x22 '"' */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x24, /* 00100100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 35 0x23 '#' */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0xfe, /* 11111110 */
+	0x6c, /* 01101100 */
+	0xfe, /* 11111110 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0x00, /* 00000000 */
+
+	/* 36 0x24 '$' */
+	0x18, /* 00011000 */
+	0x3e, /* 00111110 */
+	0x60, /* 01100000 */
+	0x3c, /* 00111100 */
+	0x06, /* 00000110 */
+	0x7c, /* 01111100 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+
+	/* 37 0x25 '%' */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0xcc, /* 11001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x66, /* 01100110 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+
+	/* 38 0x26 '&' */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0x38, /* 00111000 */
+	0x76, /* 01110110 */
+	0xdc, /* 11011100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+
+	/* 39 0x27 ''' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 40 0x28 '(' */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x0c, /* 00001100 */
+	0x00, /* 00000000 */
+
+	/* 41 0x29 ')' */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x00, /* 00000000 */
+
+	/* 42 0x2a '*' */
+	0x00, /* 00000000 */
+	0x66, /* 01100110 */
+	0x3c, /* 00111100 */
+	0xff, /* 11111111 */
+	0x3c, /* 00111100 */
+	0x66, /* 01100110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 43 0x2b '+' */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x7e, /* 01111110 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 44 0x2c ',' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+
+	/* 45 0x2d '-' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 46 0x2e '.' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+
+	/* 47 0x2f '/' */
+	0x06, /* 00000110 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x60, /* 01100000 */
+	0xc0, /* 11000000 */
+	0x80, /* 10000000 */
+	0x00, /* 00000000 */
+
+	/* 48 0x30 '0' */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0xc6, /* 11000110 */
+	0xd6, /* 11010110 */
+	0xc6, /* 11000110 */
+	0x6c, /* 01101100 */
+	0x38, /* 00111000 */
+	0x00, /* 00000000 */
+
+	/* 49 0x31 '1' */
+	0x18, /* 00011000 */
+	0x38, /* 00111000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+
+	/* 50 0x32 '2' */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0x06, /* 00000110 */
+	0x1c, /* 00011100 */
+	0x30, /* 00110000 */
+	0x66, /* 01100110 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+
+	/* 51 0x33 '3' */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0x06, /* 00000110 */
+	0x3c, /* 00111100 */
+	0x06, /* 00000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+
+	/* 52 0x34 '4' */
+	0x1c, /* 00011100 */
+	0x3c, /* 00111100 */
+	0x6c, /* 01101100 */
+	0xcc, /* 11001100 */
+	0xfe, /* 11111110 */
+	0x0c, /* 00001100 */
+	0x1e, /* 00011110 */
+	0x00, /* 00000000 */
+
+	/* 53 0x35 '5' */
+	0xfe, /* 11111110 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xfc, /* 11111100 */
+	0x06, /* 00000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+
+	/* 54 0x36 '6' */
+	0x38, /* 00111000 */
+	0x60, /* 01100000 */
+	0xc0, /* 11000000 */
+	0xfc, /* 11111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+
+	/* 55 0x37 '7' */
+	0xfe, /* 11111110 */
+	0xc6, /* 11000110 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x00, /* 00000000 */
+
+	/* 56 0x38 '8' */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+
+	/* 57 0x39 '9' */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7e, /* 01111110 */
+	0x06, /* 00000110 */
+	0x0c, /* 00001100 */
+	0x78, /* 01111000 */
+	0x00, /* 00000000 */
+
+	/* 58 0x3a ':' */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+
+	/* 59 0x3b ';' */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+
+	/* 60 0x3c '<' */
+	0x06, /* 00000110 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x0c, /* 00001100 */
+	0x06, /* 00000110 */
+	0x00, /* 00000000 */
+
+	/* 61 0x3d '=' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 62 0x3e '>' */
+	0x60, /* 01100000 */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x60, /* 01100000 */
+	0x00, /* 00000000 */
+
+	/* 63 0x3f '?' */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+
+	/* 64 0x40 '@' */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xde, /* 11011110 */
+	0xde, /* 11011110 */
+	0xde, /* 11011110 */
+	0xc0, /* 11000000 */
+	0x78, /* 01111000 */
+	0x00, /* 00000000 */
+
+	/* 65 0x41 'A' */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+
+	/* 66 0x42 'B' */
+	0xfc, /* 11111100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x7c, /* 01111100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0xfc, /* 11111100 */
+	0x00, /* 00000000 */
+
+	/* 67 0x43 'C' */
+	0x3c, /* 00111100 */
+	0x66, /* 01100110 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0x66, /* 01100110 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+
+	/* 68 0x44 'D' */
+	0xf8, /* 11111000 */
+	0x6c, /* 01101100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x6c, /* 01101100 */
+	0xf8, /* 11111000 */
+	0x00, /* 00000000 */
+
+	/* 69 0x45 'E' */
+	0xfe, /* 11111110 */
+	0x62, /* 01100010 */
+	0x68, /* 01101000 */
+	0x78, /* 01111000 */
+	0x68, /* 01101000 */
+	0x62, /* 01100010 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+
+	/* 70 0x46 'F' */
+	0xfe, /* 11111110 */
+	0x62, /* 01100010 */
+	0x68, /* 01101000 */
+	0x78, /* 01111000 */
+	0x68, /* 01101000 */
+	0x60, /* 01100000 */
+	0xf0, /* 11110000 */
+	0x00, /* 00000000 */
+
+	/* 71 0x47 'G' */
+	0x3c, /* 00111100 */
+	0x66, /* 01100110 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xce, /* 11001110 */
+	0x66, /* 01100110 */
+	0x3a, /* 00111010 */
+	0x00, /* 00000000 */
+
+	/* 72 0x48 'H' */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+
+	/* 73 0x49 'I' */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+
+	/* 74 0x4a 'J' */
+	0x1e, /* 00011110 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x78, /* 01111000 */
+	0x00, /* 00000000 */
+
+	/* 75 0x4b 'K' */
+	0xe6, /* 11100110 */
+	0x66, /* 01100110 */
+	0x6c, /* 01101100 */
+	0x78, /* 01111000 */
+	0x6c, /* 01101100 */
+	0x66, /* 01100110 */
+	0xe6, /* 11100110 */
+	0x00, /* 00000000 */
+
+	/* 76 0x4c 'L' */
+	0xf0, /* 11110000 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0x62, /* 01100010 */
+	0x66, /* 01100110 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+
+	/* 77 0x4d 'M' */
+	0xc6, /* 11000110 */
+	0xee, /* 11101110 */
+	0xfe, /* 11111110 */
+	0xfe, /* 11111110 */
+	0xd6, /* 11010110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+
+	/* 78 0x4e 'N' */
+	0xc6, /* 11000110 */
+	0xe6, /* 11100110 */
+	0xf6, /* 11110110 */
+	0xde, /* 11011110 */
+	0xce, /* 11001110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+
+	/* 79 0x4f 'O' */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+
+	/* 80 0x50 'P' */
+	0xfc, /* 11111100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x7c, /* 01111100 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0xf0, /* 11110000 */
+	0x00, /* 00000000 */
+
+	/* 81 0x51 'Q' */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xce, /* 11001110 */
+	0x7c, /* 01111100 */
+	0x0e, /* 00001110 */
+
+	/* 82 0x52 'R' */
+	0xfc, /* 11111100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x7c, /* 01111100 */
+	0x6c, /* 01101100 */
+	0x66, /* 01100110 */
+	0xe6, /* 11100110 */
+	0x00, /* 00000000 */
+
+	/* 83 0x53 'S' */
+	0x3c, /* 00111100 */
+	0x66, /* 01100110 */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x0c, /* 00001100 */
+	0x66, /* 01100110 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+
+	/* 84 0x54 'T' */
+	0x7e, /* 01111110 */
+	0x7e, /* 01111110 */
+	0x5a, /* 01011010 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+
+	/* 85 0x55 'U' */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+
+	/* 86 0x56 'V' */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x6c, /* 01101100 */
+	0x38, /* 00111000 */
+	0x00, /* 00000000 */
+
+	/* 87 0x57 'W' */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xd6, /* 11010110 */
+	0xd6, /* 11010110 */
+	0xfe, /* 11111110 */
+	0x6c, /* 01101100 */
+	0x00, /* 00000000 */
+
+	/* 88 0x58 'X' */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x6c, /* 01101100 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+
+	/* 89 0x59 'Y' */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+
+	/* 90 0x5a 'Z' */
+	0xfe, /* 11111110 */
+	0xc6, /* 11000110 */
+	0x8c, /* 10001100 */
+	0x18, /* 00011000 */
+	0x32, /* 00110010 */
+	0x66, /* 01100110 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+
+	/* 91 0x5b '[' */
+	0x3c, /* 00111100 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+
+	/* 92 0x5c '\' */
+	0xc0, /* 11000000 */
+	0x60, /* 01100000 */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x0c, /* 00001100 */
+	0x06, /* 00000110 */
+	0x02, /* 00000010 */
+	0x00, /* 00000000 */
+
+	/* 93 0x5d ']' */
+	0x3c, /* 00111100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+
+	/* 94 0x5e '^' */
+	0x10, /* 00010000 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 95 0x5f '_' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+
+	/* 96 0x60 '`' */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x0c, /* 00001100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 97 0x61 'a' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x78, /* 01111000 */
+	0x0c, /* 00001100 */
+	0x7c, /* 01111100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+
+	/* 98 0x62 'b' */
+	0xe0, /* 11100000 */
+	0x60, /* 01100000 */
+	0x7c, /* 01111100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0xdc, /* 11011100 */
+	0x00, /* 00000000 */
+
+	/* 99 0x63 'c' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc0, /* 11000000 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+
+	/* 100 0x64 'd' */
+	0x1c, /* 00011100 */
+	0x0c, /* 00001100 */
+	0x7c, /* 01111100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+
+	/* 101 0x65 'e' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0xc0, /* 11000000 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+
+	/* 102 0x66 'f' */
+	0x3c, /* 00111100 */
+	0x66, /* 01100110 */
+	0x60, /* 01100000 */
+	0xf8, /* 11111000 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0xf0, /* 11110000 */
+	0x00, /* 00000000 */
+
+	/* 103 0x67 'g' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x76, /* 01110110 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x7c, /* 01111100 */
+	0x0c, /* 00001100 */
+	0xf8, /* 11111000 */
+
+	/* 104 0x68 'h' */
+	0xe0, /* 11100000 */
+	0x60, /* 01100000 */
+	0x6c, /* 01101100 */
+	0x76, /* 01110110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0xe6, /* 11100110 */
+	0x00, /* 00000000 */
+
+	/* 105 0x69 'i' */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x38, /* 00111000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+
+	/* 106 0x6a 'j' */
+	0x06, /* 00000110 */
+	0x00, /* 00000000 */
+	0x06, /* 00000110 */
+	0x06, /* 00000110 */
+	0x06, /* 00000110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x3c, /* 00111100 */
+
+	/* 107 0x6b 'k' */
+	0xe0, /* 11100000 */
+	0x60, /* 01100000 */
+	0x66, /* 01100110 */
+	0x6c, /* 01101100 */
+	0x78, /* 01111000 */
+	0x6c, /* 01101100 */
+	0xe6, /* 11100110 */
+	0x00, /* 00000000 */
+
+	/* 108 0x6c 'l' */
+	0x38, /* 00111000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+
+	/* 109 0x6d 'm' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xec, /* 11101100 */
+	0xfe, /* 11111110 */
+	0xd6, /* 11010110 */
+	0xd6, /* 11010110 */
+	0xd6, /* 11010110 */
+	0x00, /* 00000000 */
+
+	/* 110 0x6e 'n' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xdc, /* 11011100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x00, /* 00000000 */
+
+	/* 111 0x6f 'o' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+
+	/* 112 0x70 'p' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xdc, /* 11011100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x7c, /* 01111100 */
+	0x60, /* 01100000 */
+	0xf0, /* 11110000 */
+
+	/* 113 0x71 'q' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x76, /* 01110110 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x7c, /* 01111100 */
+	0x0c, /* 00001100 */
+	0x1e, /* 00011110 */
+
+	/* 114 0x72 'r' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xdc, /* 11011100 */
+	0x76, /* 01110110 */
+	0x60, /* 01100000 */
+	0x60, /* 01100000 */
+	0xf0, /* 11110000 */
+	0x00, /* 00000000 */
+
+	/* 115 0x73 's' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0xc0, /* 11000000 */
+	0x7c, /* 01111100 */
+	0x06, /* 00000110 */
+	0xfc, /* 11111100 */
+	0x00, /* 00000000 */
+
+	/* 116 0x74 't' */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0xfc, /* 11111100 */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x36, /* 00110110 */
+	0x1c, /* 00011100 */
+	0x00, /* 00000000 */
+
+	/* 117 0x75 'u' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+
+	/* 118 0x76 'v' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x6c, /* 01101100 */
+	0x38, /* 00111000 */
+	0x00, /* 00000000 */
+
+	/* 119 0x77 'w' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0xd6, /* 11010110 */
+	0xd6, /* 11010110 */
+	0xfe, /* 11111110 */
+	0x6c, /* 01101100 */
+	0x00, /* 00000000 */
+
+	/* 120 0x78 'x' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0x6c, /* 01101100 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+
+	/* 121 0x79 'y' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7e, /* 01111110 */
+	0x06, /* 00000110 */
+	0xfc, /* 11111100 */
+
+	/* 122 0x7a 'z' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0x4c, /* 01001100 */
+	0x18, /* 00011000 */
+	0x32, /* 00110010 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+
+	/* 123 0x7b '{' */
+	0x0e, /* 00001110 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x70, /* 01110000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x0e, /* 00001110 */
+	0x00, /* 00000000 */
+
+	/* 124 0x7c '|' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+
+	/* 125 0x7d '}' */
+	0x70, /* 01110000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x0e, /* 00001110 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x70, /* 01110000 */
+	0x00, /* 00000000 */
+
+	/* 126 0x7e '~' */
+	0x76, /* 01110110 */
+	0xdc, /* 11011100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 127 0x7f '' */
+	0x00, /* 00000000 */
+	0x10, /* 00010000 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+
+	/* 128 0x80 '' */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x0c, /* 00001100 */
+	0x78, /* 01111000 */
+
+	/* 129 0x81 '' */
+	0xcc, /* 11001100 */
+	0x00, /* 00000000 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+
+	/* 130 0x82 '' */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0xc0, /* 11000000 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+
+	/* 131 0x83 '' */
+	0x7c, /* 01111100 */
+	0x82, /* 10000010 */
+	0x78, /* 01111000 */
+	0x0c, /* 00001100 */
+	0x7c, /* 01111100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+
+	/* 132 0x84 '' */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0x78, /* 01111000 */
+	0x0c, /* 00001100 */
+	0x7c, /* 01111100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+
+	/* 133 0x85 '' */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x78, /* 01111000 */
+	0x0c, /* 00001100 */
+	0x7c, /* 01111100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+
+	/* 134 0x86 '' */
+	0x30, /* 00110000 */
+	0x30, /* 00110000 */
+	0x78, /* 01111000 */
+	0x0c, /* 00001100 */
+	0x7c, /* 01111100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+
+	/* 135 0x87 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0x7e, /* 01111110 */
+	0x0c, /* 00001100 */
+	0x38, /* 00111000 */
+
+	/* 136 0x88 '' */
+	0x7c, /* 01111100 */
+	0x82, /* 10000010 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0xc0, /* 11000000 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+
+	/* 137 0x89 '' */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0xc0, /* 11000000 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+
+	/* 138 0x8a '' */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0xc0, /* 11000000 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+
+	/* 139 0x8b '' */
+	0x66, /* 01100110 */
+	0x00, /* 00000000 */
+	0x38, /* 00111000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+
+	/* 140 0x8c '' */
+	0x7c, /* 01111100 */
+	0x82, /* 10000010 */
+	0x38, /* 00111000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+
+	/* 141 0x8d '' */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x38, /* 00111000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+
+	/* 142 0x8e '' */
+	0xc6, /* 11000110 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+
+	/* 143 0x8f '' */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+
+	/* 144 0x90 '' */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0xfe, /* 11111110 */
+	0xc0, /* 11000000 */
+	0xf8, /* 11111000 */
+	0xc0, /* 11000000 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+
+	/* 145 0x91 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0x18, /* 00011000 */
+	0x7e, /* 01111110 */
+	0xd8, /* 11011000 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+
+	/* 146 0x92 '' */
+	0x3e, /* 00111110 */
+	0x6c, /* 01101100 */
+	0xcc, /* 11001100 */
+	0xfe, /* 11111110 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xce, /* 11001110 */
+	0x00, /* 00000000 */
+
+	/* 147 0x93 '' */
+	0x7c, /* 01111100 */
+	0x82, /* 10000010 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+
+	/* 148 0x94 '' */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+
+	/* 149 0x95 '' */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+
+	/* 150 0x96 '' */
+	0x78, /* 01111000 */
+	0x84, /* 10000100 */
+	0x00, /* 00000000 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+
+	/* 151 0x97 '' */
+	0x60, /* 01100000 */
+	0x30, /* 00110000 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+
+	/* 152 0x98 '' */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7e, /* 01111110 */
+	0x06, /* 00000110 */
+	0xfc, /* 11111100 */
+
+	/* 153 0x99 '' */
+	0xc6, /* 11000110 */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x6c, /* 01101100 */
+	0x38, /* 00111000 */
+	0x00, /* 00000000 */
+
+	/* 154 0x9a '' */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+
+	/* 155 0x9b '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x7e, /* 01111110 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0x7e, /* 01111110 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 156 0x9c '' */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0x64, /* 01100100 */
+	0xf0, /* 11110000 */
+	0x60, /* 01100000 */
+	0x66, /* 01100110 */
+	0xfc, /* 11111100 */
+	0x00, /* 00000000 */
+
+	/* 157 0x9d '' */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x3c, /* 00111100 */
+	0x7e, /* 01111110 */
+	0x18, /* 00011000 */
+	0x7e, /* 01111110 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 158 0x9e '' */
+	0xf8, /* 11111000 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xfa, /* 11111010 */
+	0xc6, /* 11000110 */
+	0xcf, /* 11001111 */
+	0xc6, /* 11000110 */
+	0xc7, /* 11000111 */
+
+	/* 159 0x9f '' */
+	0x0e, /* 00001110 */
+	0x1b, /* 00011011 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+	0xd8, /* 11011000 */
+	0x70, /* 01110000 */
+	0x00, /* 00000000 */
+
+	/* 160 0xa0 '' */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x78, /* 01111000 */
+	0x0c, /* 00001100 */
+	0x7c, /* 01111100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+
+	/* 161 0xa1 '' */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x38, /* 00111000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+
+	/* 162 0xa2 '' */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+
+	/* 163 0xa3 '' */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+
+	/* 164 0xa4 '' */
+	0x76, /* 01110110 */
+	0xdc, /* 11011100 */
+	0x00, /* 00000000 */
+	0xdc, /* 11011100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x00, /* 00000000 */
+
+	/* 165 0xa5 '' */
+	0x76, /* 01110110 */
+	0xdc, /* 11011100 */
+	0x00, /* 00000000 */
+	0xe6, /* 11100110 */
+	0xf6, /* 11110110 */
+	0xde, /* 11011110 */
+	0xce, /* 11001110 */
+	0x00, /* 00000000 */
+
+	/* 166 0xa6 '' */
+	0x3c, /* 00111100 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0x3e, /* 00111110 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 167 0xa7 '' */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0x38, /* 00111000 */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 168 0xa8 '' */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x63, /* 01100011 */
+	0x3e, /* 00111110 */
+	0x00, /* 00000000 */
+
+	/* 169 0xa9 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 170 0xaa '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0x06, /* 00000110 */
+	0x06, /* 00000110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 171 0xab '' */
+	0x63, /* 01100011 */
+	0xe6, /* 11100110 */
+	0x6c, /* 01101100 */
+	0x7e, /* 01111110 */
+	0x33, /* 00110011 */
+	0x66, /* 01100110 */
+	0xcc, /* 11001100 */
+	0x0f, /* 00001111 */
+
+	/* 172 0xac '' */
+	0x63, /* 01100011 */
+	0xe6, /* 11100110 */
+	0x6c, /* 01101100 */
+	0x7a, /* 01111010 */
+	0x36, /* 00110110 */
+	0x6a, /* 01101010 */
+	0xdf, /* 11011111 */
+	0x06, /* 00000110 */
+
+	/* 173 0xad '' */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+
+	/* 174 0xae '' */
+	0x00, /* 00000000 */
+	0x33, /* 00110011 */
+	0x66, /* 01100110 */
+	0xcc, /* 11001100 */
+	0x66, /* 01100110 */
+	0x33, /* 00110011 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 175 0xaf '' */
+	0x00, /* 00000000 */
+	0xcc, /* 11001100 */
+	0x66, /* 01100110 */
+	0x33, /* 00110011 */
+	0x66, /* 01100110 */
+	0xcc, /* 11001100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 176 0xb0 '' */
+	0x22, /* 00100010 */
+	0x88, /* 10001000 */
+	0x22, /* 00100010 */
+	0x88, /* 10001000 */
+	0x22, /* 00100010 */
+	0x88, /* 10001000 */
+	0x22, /* 00100010 */
+	0x88, /* 10001000 */
+
+	/* 177 0xb1 '' */
+	0x55, /* 01010101 */
+	0xaa, /* 10101010 */
+	0x55, /* 01010101 */
+	0xaa, /* 10101010 */
+	0x55, /* 01010101 */
+	0xaa, /* 10101010 */
+	0x55, /* 01010101 */
+	0xaa, /* 10101010 */
+
+	/* 178 0xb2 '' */
+	0x77, /* 01110111 */
+	0xdd, /* 11011101 */
+	0x77, /* 01110111 */
+	0xdd, /* 11011101 */
+	0x77, /* 01110111 */
+	0xdd, /* 11011101 */
+	0x77, /* 01110111 */
+	0xdd, /* 11011101 */
+
+	/* 179 0xb3 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 180 0xb4 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0xf8, /* 11111000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 181 0xb5 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0xf8, /* 11111000 */
+	0x18, /* 00011000 */
+	0xf8, /* 11111000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 182 0xb6 '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0xf6, /* 11110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 183 0xb7 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 184 0xb8 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xf8, /* 11111000 */
+	0x18, /* 00011000 */
+	0xf8, /* 11111000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 185 0xb9 '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0xf6, /* 11110110 */
+	0x06, /* 00000110 */
+	0xf6, /* 11110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 186 0xba '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 187 0xbb '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0x06, /* 00000110 */
+	0xf6, /* 11110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 188 0xbc '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0xf6, /* 11110110 */
+	0x06, /* 00000110 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 189 0xbd '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 190 0xbe '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0xf8, /* 11111000 */
+	0x18, /* 00011000 */
+	0xf8, /* 11111000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 191 0xbf '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xf8, /* 11111000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 192 0xc0 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x1f, /* 00011111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 193 0xc1 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 194 0xc2 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 195 0xc3 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x1f, /* 00011111 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 196 0xc4 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 197 0xc5 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0xff, /* 11111111 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 198 0xc6 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x1f, /* 00011111 */
+	0x18, /* 00011000 */
+	0x1f, /* 00011111 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 199 0xc7 '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x37, /* 00110111 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 200 0xc8 '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x37, /* 00110111 */
+	0x30, /* 00110000 */
+	0x3f, /* 00111111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 201 0xc9 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x3f, /* 00111111 */
+	0x30, /* 00110000 */
+	0x37, /* 00110111 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 202 0xca '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0xf7, /* 11110111 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 203 0xcb '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0xf7, /* 11110111 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 204 0xcc '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x37, /* 00110111 */
+	0x30, /* 00110000 */
+	0x37, /* 00110111 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 205 0xcd '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 206 0xce '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0xf7, /* 11110111 */
+	0x00, /* 00000000 */
+	0xf7, /* 11110111 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 207 0xcf '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 208 0xd0 '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 209 0xd1 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 210 0xd2 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 211 0xd3 '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x3f, /* 00111111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 212 0xd4 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x1f, /* 00011111 */
+	0x18, /* 00011000 */
+	0x1f, /* 00011111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 213 0xd5 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x1f, /* 00011111 */
+	0x18, /* 00011000 */
+	0x1f, /* 00011111 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 214 0xd6 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x3f, /* 00111111 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 215 0xd7 '' */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0xff, /* 11111111 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+
+	/* 216 0xd8 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0xff, /* 11111111 */
+	0x18, /* 00011000 */
+	0xff, /* 11111111 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 217 0xd9 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0xf8, /* 11111000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 218 0xda '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x1f, /* 00011111 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 219 0xdb '' */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+
+	/* 220 0xdc '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+
+	/* 221 0xdd '' */
+	0xf0, /* 11110000 */
+	0xf0, /* 11110000 */
+	0xf0, /* 11110000 */
+	0xf0, /* 11110000 */
+	0xf0, /* 11110000 */
+	0xf0, /* 11110000 */
+	0xf0, /* 11110000 */
+	0xf0, /* 11110000 */
+
+	/* 222 0xde '' */
+	0x0f, /* 00001111 */
+	0x0f, /* 00001111 */
+	0x0f, /* 00001111 */
+	0x0f, /* 00001111 */
+	0x0f, /* 00001111 */
+	0x0f, /* 00001111 */
+	0x0f, /* 00001111 */
+	0x0f, /* 00001111 */
+
+	/* 223 0xdf '' */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0xff, /* 11111111 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 224 0xe0 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x76, /* 01110110 */
+	0xdc, /* 11011100 */
+	0xc8, /* 11001000 */
+	0xdc, /* 11011100 */
+	0x76, /* 01110110 */
+	0x00, /* 00000000 */
+
+	/* 225 0xe1 '' */
+	0x78, /* 01111000 */
+	0xcc, /* 11001100 */
+	0xcc, /* 11001100 */
+	0xd8, /* 11011000 */
+	0xcc, /* 11001100 */
+	0xc6, /* 11000110 */
+	0xcc, /* 11001100 */
+	0x00, /* 00000000 */
+
+	/* 226 0xe2 '' */
+	0xfe, /* 11111110 */
+	0xc6, /* 11000110 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0xc0, /* 11000000 */
+	0x00, /* 00000000 */
+
+	/* 227 0xe3 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0x00, /* 00000000 */
+
+	/* 228 0xe4 '' */
+	0xfe, /* 11111110 */
+	0xc6, /* 11000110 */
+	0x60, /* 01100000 */
+	0x30, /* 00110000 */
+	0x60, /* 01100000 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+
+	/* 229 0xe5 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0xd8, /* 11011000 */
+	0xd8, /* 11011000 */
+	0xd8, /* 11011000 */
+	0x70, /* 01110000 */
+	0x00, /* 00000000 */
+
+	/* 230 0xe6 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x7c, /* 01111100 */
+	0xc0, /* 11000000 */
+
+	/* 231 0xe7 '' */
+	0x00, /* 00000000 */
+	0x76, /* 01110110 */
+	0xdc, /* 11011100 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+
+	/* 232 0xe8 '' */
+	0x7e, /* 01111110 */
+	0x18, /* 00011000 */
+	0x3c, /* 00111100 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x3c, /* 00111100 */
+	0x18, /* 00011000 */
+	0x7e, /* 01111110 */
+
+	/* 233 0xe9 '' */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0xc6, /* 11000110 */
+	0xfe, /* 11111110 */
+	0xc6, /* 11000110 */
+	0x6c, /* 01101100 */
+	0x38, /* 00111000 */
+	0x00, /* 00000000 */
+
+	/* 234 0xea '' */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0xee, /* 11101110 */
+	0x00, /* 00000000 */
+
+	/* 235 0xeb '' */
+	0x0e, /* 00001110 */
+	0x18, /* 00011000 */
+	0x0c, /* 00001100 */
+	0x3e, /* 00111110 */
+	0x66, /* 01100110 */
+	0x66, /* 01100110 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+
+	/* 236 0xec '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0xdb, /* 11011011 */
+	0xdb, /* 11011011 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 237 0xed '' */
+	0x06, /* 00000110 */
+	0x0c, /* 00001100 */
+	0x7e, /* 01111110 */
+	0xdb, /* 11011011 */
+	0xdb, /* 11011011 */
+	0x7e, /* 01111110 */
+	0x60, /* 01100000 */
+	0xc0, /* 11000000 */
+
+	/* 238 0xee '' */
+	0x1e, /* 00011110 */
+	0x30, /* 00110000 */
+	0x60, /* 01100000 */
+	0x7e, /* 01111110 */
+	0x60, /* 01100000 */
+	0x30, /* 00110000 */
+	0x1e, /* 00011110 */
+	0x00, /* 00000000 */
+
+	/* 239 0xef '' */
+	0x00, /* 00000000 */
+	0x7c, /* 01111100 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0xc6, /* 11000110 */
+	0x00, /* 00000000 */
+
+	/* 240 0xf0 '' */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+	0xfe, /* 11111110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 241 0xf1 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x7e, /* 01111110 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+
+	/* 242 0xf2 '' */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+
+	/* 243 0xf3 '' */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x18, /* 00011000 */
+	0x0c, /* 00001100 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+
+	/* 244 0xf4 '' */
+	0x0e, /* 00001110 */
+	0x1b, /* 00011011 */
+	0x1b, /* 00011011 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+
+	/* 245 0xf5 '' */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0xd8, /* 11011000 */
+	0xd8, /* 11011000 */
+	0x70, /* 01110000 */
+
+	/* 246 0xf6 '' */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x7e, /* 01111110 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 247 0xf7 '' */
+	0x00, /* 00000000 */
+	0x76, /* 01110110 */
+	0xdc, /* 11011100 */
+	0x00, /* 00000000 */
+	0x76, /* 01110110 */
+	0xdc, /* 11011100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 248 0xf8 '' */
+	0x38, /* 00111000 */
+	0x6c, /* 01101100 */
+	0x6c, /* 01101100 */
+	0x38, /* 00111000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 249 0xf9 '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 250 0xfa '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x18, /* 00011000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 251 0xfb '' */
+	0x0f, /* 00001111 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0x0c, /* 00001100 */
+	0xec, /* 11101100 */
+	0x6c, /* 01101100 */
+	0x3c, /* 00111100 */
+	0x1c, /* 00011100 */
+
+	/* 252 0xfc '' */
+	0x6c, /* 01101100 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x36, /* 00110110 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 253 0xfd '' */
+	0x78, /* 01111000 */
+	0x0c, /* 00001100 */
+	0x18, /* 00011000 */
+	0x30, /* 00110000 */
+	0x7c, /* 01111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 254 0xfe '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x3c, /* 00111100 */
+	0x3c, /* 00111100 */
+	0x3c, /* 00111100 */
+	0x3c, /* 00111100 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+	/* 255 0xff '' */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+	0x00, /* 00000000 */
+
+};
+
--- linux-2.1.42/drivers/video/pearl_8x8.c.orig	Mon Jun  9 23:03:02 1997
+++ linux-2.1.42/drivers/video/pearl_8x8.c	Mon Jun  9 23:03:02 1997
@@ -0,0 +1,2582 @@
+/**********************************************/
+/*                                            */
+/*       Font file generated by cpi2fnt       */
+/*       ------------------------------       */
+/*       Combined with the alpha-numeric      */
+/*       portion of Greg Harp's old PEARL     */
+/*       font (from earlier versions of       */
+/*       linux-m86k) by John Shifflett        */
+/*                                            */
+/**********************************************/
+
+#define FONTDATAMAX 2048
+
+char fontname_pearl8x8[] = "PEARL8x8";
+
+int  fontheight_pearl8x8 = 8;
+int  fontwidth_pearl8x8  = 8;
+
+unsigned char fontdata_pearl8x8[FONTDATAMAX] = {
+
+   /* 0 0x00 '^@' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 1 0x01 '^A' */
+   0x7e, /* 01111110 */
+   0x81, /* 10000001 */
+   0xa5, /* 10100101 */
+   0x81, /* 10000001 */
+   0xbd, /* 10111101 */
+   0x99, /* 10011001 */
+   0x81, /* 10000001 */
+   0x7e, /* 01111110 */
+
+   /* 2 0x02 '^B' */
+   0x7e, /* 01111110 */
+   0xff, /* 11111111 */
+   0xdb, /* 11011011 */
+   0xff, /* 11111111 */
+   0xc3, /* 11000011 */
+   0xe7, /* 11100111 */
+   0xff, /* 11111111 */
+   0x7e, /* 01111110 */
+
+   /* 3 0x03 '^C' */
+   0x6c, /* 01101100 */
+   0xfe, /* 11111110 */
+   0xfe, /* 11111110 */
+   0xfe, /* 11111110 */
+   0x7c, /* 01111100 */
+   0x38, /* 00111000 */
+   0x10, /* 00010000 */
+   0x00, /* 00000000 */
+
+   /* 4 0x04 '^D' */
+   0x10, /* 00010000 */
+   0x38, /* 00111000 */
+   0x7c, /* 01111100 */
+   0xfe, /* 11111110 */
+   0x7c, /* 01111100 */
+   0x38, /* 00111000 */
+   0x10, /* 00010000 */
+   0x00, /* 00000000 */
+
+   /* 5 0x05 '^E' */
+   0x38, /* 00111000 */
+   0x7c, /* 01111100 */
+   0x38, /* 00111000 */
+   0xfe, /* 11111110 */
+   0xfe, /* 11111110 */
+   0xd6, /* 11010110 */
+   0x10, /* 00010000 */
+   0x38, /* 00111000 */
+
+   /* 6 0x06 '^F' */
+   0x10, /* 00010000 */
+   0x38, /* 00111000 */
+   0x7c, /* 01111100 */
+   0xfe, /* 11111110 */
+   0xfe, /* 11111110 */
+   0x7c, /* 01111100 */
+   0x10, /* 00010000 */
+   0x38, /* 00111000 */
+
+   /* 7 0x07 '^G' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x18, /* 00011000 */
+   0x3c, /* 00111100 */
+   0x3c, /* 00111100 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 8 0x08 '^H' */
+   0xff, /* 11111111 */
+   0xff, /* 11111111 */
+   0xe7, /* 11100111 */
+   0xc3, /* 11000011 */
+   0xc3, /* 11000011 */
+   0xe7, /* 11100111 */
+   0xff, /* 11111111 */
+   0xff, /* 11111111 */
+
+   /* 9 0x09 '^I' */
+   0x00, /* 00000000 */
+   0x3c, /* 00111100 */
+   0x66, /* 01100110 */
+   0x42, /* 01000010 */
+   0x42, /* 01000010 */
+   0x66, /* 01100110 */
+   0x3c, /* 00111100 */
+   0x00, /* 00000000 */
+
+   /* 10 0x0a '^J' */
+   0xff, /* 11111111 */
+   0xc3, /* 11000011 */
+   0x99, /* 10011001 */
+   0xbd, /* 10111101 */
+   0xbd, /* 10111101 */
+   0x99, /* 10011001 */
+   0xc3, /* 11000011 */
+   0xff, /* 11111111 */
+
+   /* 11 0x0b '^K' */
+   0x0f, /* 00001111 */
+   0x07, /* 00000111 */
+   0x0f, /* 00001111 */
+   0x7d, /* 01111101 */
+   0xcc, /* 11001100 */
+   0xcc, /* 11001100 */
+   0xcc, /* 11001100 */
+   0x78, /* 01111000 */
+
+   /* 12 0x0c '^L' */
+   0x3c, /* 00111100 */
+   0x66, /* 01100110 */
+   0x66, /* 01100110 */
+   0x66, /* 01100110 */
+   0x3c, /* 00111100 */
+   0x18, /* 00011000 */
+   0x7e, /* 01111110 */
+   0x18, /* 00011000 */
+
+   /* 13 0x0d '^M' */
+   0x3f, /* 00111111 */
+   0x33, /* 00110011 */
+   0x3f, /* 00111111 */
+   0x30, /* 00110000 */
+   0x30, /* 00110000 */
+   0x70, /* 01110000 */
+   0xf0, /* 11110000 */
+   0xe0, /* 11100000 */
+
+   /* 14 0x0e '^N' */
+   0x7f, /* 01111111 */
+   0x63, /* 01100011 */
+   0x7f, /* 01111111 */
+   0x63, /* 01100011 */
+   0x63, /* 01100011 */
+   0x67, /* 01100111 */
+   0xe6, /* 11100110 */
+   0xc0, /* 11000000 */
+
+   /* 15 0x0f '^O' */
+   0x18, /* 00011000 */
+   0xdb, /* 11011011 */
+   0x3c, /* 00111100 */
+   0xe7, /* 11100111 */
+   0xe7, /* 11100111 */
+   0x3c, /* 00111100 */
+   0xdb, /* 11011011 */
+   0x18, /* 00011000 */
+
+   /* 16 0x10 '^P' */
+   0x80, /* 10000000 */
+   0xe0, /* 11100000 */
+   0xf8, /* 11111000 */
+   0xfe, /* 11111110 */
+   0xf8, /* 11111000 */
+   0xe0, /* 11100000 */
+   0x80, /* 10000000 */
+   0x00, /* 00000000 */
+
+   /* 17 0x11 '^Q' */
+   0x02, /* 00000010 */
+   0x0e, /* 00001110 */
+   0x3e, /* 00111110 */
+   0xfe, /* 11111110 */
+   0x3e, /* 00111110 */
+   0x0e, /* 00001110 */
+   0x02, /* 00000010 */
+   0x00, /* 00000000 */
+
+   /* 18 0x12 '^R' */
+   0x18, /* 00011000 */
+   0x3c, /* 00111100 */
+   0x7e, /* 01111110 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x7e, /* 01111110 */
+   0x3c, /* 00111100 */
+   0x18, /* 00011000 */
+
+   /* 19 0x13 '^S' */
+   0x66, /* 01100110 */
+   0x66, /* 01100110 */
+   0x66, /* 01100110 */
+   0x66, /* 01100110 */
+   0x66, /* 01100110 */
+   0x00, /* 00000000 */
+   0x66, /* 01100110 */
+   0x00, /* 00000000 */
+
+   /* 20 0x14 '^T' */
+   0x7f, /* 01111111 */
+   0xdb, /* 11011011 */
+   0xdb, /* 11011011 */
+   0x7b, /* 01111011 */
+   0x1b, /* 00011011 */
+   0x1b, /* 00011011 */
+   0x1b, /* 00011011 */
+   0x00, /* 00000000 */
+
+   /* 21 0x15 '^U' */
+   0x3e, /* 00111110 */
+   0x61, /* 01100001 */
+   0x3c, /* 00111100 */
+   0x66, /* 01100110 */
+   0x66, /* 01100110 */
+   0x3c, /* 00111100 */
+   0x86, /* 10000110 */
+   0x7c, /* 01111100 */
+
+   /* 22 0x16 '^V' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x7e, /* 01111110 */
+   0x7e, /* 01111110 */
+   0x7e, /* 01111110 */
+   0x00, /* 00000000 */
+
+   /* 23 0x17 '^W' */
+   0x18, /* 00011000 */
+   0x3c, /* 00111100 */
+   0x7e, /* 01111110 */
+   0x18, /* 00011000 */
+   0x7e, /* 01111110 */
+   0x3c, /* 00111100 */
+   0x18, /* 00011000 */
+   0xff, /* 11111111 */
+
+   /* 24 0x18 '^X' */
+   0x18, /* 00011000 */
+   0x3c, /* 00111100 */
+   0x7e, /* 01111110 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+
+   /* 25 0x19 '^Y' */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x7e, /* 01111110 */
+   0x3c, /* 00111100 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+
+   /* 26 0x1a '^Z' */
+   0x00, /* 00000000 */
+   0x18, /* 00011000 */
+   0x0c, /* 00001100 */
+   0xfe, /* 11111110 */
+   0x0c, /* 00001100 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 27 0x1b '^[' */
+   0x00, /* 00000000 */
+   0x30, /* 00110000 */
+   0x60, /* 01100000 */
+   0xfe, /* 11111110 */
+   0x60, /* 01100000 */
+   0x30, /* 00110000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 28 0x1c '^\' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0xfe, /* 11111110 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 29 0x1d '^]' */
+   0x00, /* 00000000 */
+   0x24, /* 00100100 */
+   0x66, /* 01100110 */
+   0xff, /* 11111111 */
+   0x66, /* 01100110 */
+   0x24, /* 00100100 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 30 0x1e '^^' */
+   0x00, /* 00000000 */
+   0x18, /* 00011000 */
+   0x3c, /* 00111100 */
+   0x7e, /* 01111110 */
+   0xff, /* 11111111 */
+   0xff, /* 11111111 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 31 0x1f '^_' */
+   0x00, /* 00000000 */
+   0xff, /* 11111111 */
+   0xff, /* 11111111 */
+   0x7e, /* 01111110 */
+   0x3c, /* 00111100 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 32 0x20 ' ' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 33 0x21 '!' */
+   0x18, /* 00011000 */
+   0x3c, /* 00111100 */
+   0x3c, /* 00111100 */
+   0x3c, /* 00111100 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+
+   /* 34 0x22 '"' */
+   0x6c, /* 01101100 */
+   0x6c, /* 01101100 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 35 0x23 '#' */
+   0x6c, /* 01101100 */
+   0x6c, /* 01101100 */
+   0xfe, /* 11111110 */
+   0x6c, /* 01101100 */
+   0xfe, /* 11111110 */
+   0x6c, /* 01101100 */
+   0x6c, /* 01101100 */
+   0x00, /* 00000000 */
+
+   /* 36 0x24 '$' */
+   0x18, /* 00011000 */
+   0x3e, /* 00111110 */
+   0x60, /* 01100000 */
+   0x3c, /* 00111100 */
+   0x06, /* 00000110 */
+   0x7c, /* 01111100 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+
+   /* 37 0x25 '%' */
+   0x00, /* 00000000 */
+   0xc6, /* 11000110 */
+   0xcc, /* 11001100 */
+   0x18, /* 00011000 */
+   0x30, /* 00110000 */
+   0x66, /* 01100110 */
+   0xc6, /* 11000110 */
+   0x00, /* 00000000 */
+
+   /* 38 0x26 '&' */
+   0x38, /* 00111000 */
+   0x6c, /* 01101100 */
+   0x68, /* 01101000 */
+   0x76, /* 01110110 */
+   0xdc, /* 11011100 */
+   0xcc, /* 11001100 */
+   0x76, /* 01110110 */
+   0x00, /* 00000000 */
+
+   /* 39 0x27 ''' */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x30, /* 00110000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 40 0x28 '(' */
+   0x0c, /* 00001100 */
+   0x18, /* 00011000 */
+   0x30, /* 00110000 */
+   0x30, /* 00110000 */
+   0x30, /* 00110000 */
+   0x18, /* 00011000 */
+   0x0c, /* 00001100 */
+   0x00, /* 00000000 */
+
+   /* 41 0x29 ')' */
+   0x30, /* 00110000 */
+   0x18, /* 00011000 */
+   0x0c, /* 00001100 */
+   0x0c, /* 00001100 */
+   0x0c, /* 00001100 */
+   0x18, /* 00011000 */
+   0x30, /* 00110000 */
+   0x00, /* 00000000 */
+
+   /* 42 0x2a '*' */
+   0x00, /* 00000000 */
+   0x66, /* 01100110 */
+   0x3c, /* 00111100 */
+   0xff, /* 11111111 */
+   0x3c, /* 00111100 */
+   0x66, /* 01100110 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 43 0x2b '+' */
+   0x00, /* 00000000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x7e, /* 01111110 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 44 0x2c ',' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x30, /* 00110000 */
+
+   /* 45 0x2d '-' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x7e, /* 01111110 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 46 0x2e '.' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+
+   /* 47 0x2f '/' */
+   0x03, /* 00000011 */
+   0x06, /* 00000110 */
+   0x0c, /* 00001100 */
+   0x18, /* 00011000 */
+   0x30, /* 00110000 */
+   0x60, /* 01100000 */
+   0xc0, /* 11000000 */
+   0x00, /* 00000000 */
+
+   /* 48 0x30 '0' */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0xde, /* 11011110 */
+   0xfe, /* 11111110 */
+   0xf6, /* 11110110 */
+   0xc6, /* 11000110 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 49 0x31 '1' */
+   0x18, /* 00011000 */
+   0x78, /* 01111000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+
+   /* 50 0x32 '2' */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0x0c, /* 00001100 */
+   0x18, /* 00011000 */
+   0x30, /* 00110000 */
+   0x60, /* 01100000 */
+   0xfe, /* 11111110 */
+   0x00, /* 00000000 */
+
+   /* 51 0x33 '3' */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0x06, /* 00000110 */
+   0x1c, /* 00011100 */
+   0x06, /* 00000110 */
+   0xc6, /* 11000110 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 52 0x34 '4' */
+   0x1c, /* 00011100 */
+   0x3c, /* 00111100 */
+   0x6c, /* 01101100 */
+   0xcc, /* 11001100 */
+   0xfe, /* 11111110 */
+   0x0c, /* 00001100 */
+   0x0c, /* 00001100 */
+   0x00, /* 00000000 */
+
+   /* 53 0x35 '5' */
+   0xfe, /* 11111110 */
+   0xc0, /* 11000000 */
+   0xfc, /* 11111100 */
+   0x06, /* 00000110 */
+   0x06, /* 00000110 */
+   0xc6, /* 11000110 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 54 0x36 '6' */
+   0x38, /* 00111000 */
+   0x60, /* 01100000 */
+   0xc0, /* 11000000 */
+   0xfc, /* 11111100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 55 0x37 '7' */
+   0xfe, /* 11111110 */
+   0x06, /* 00000110 */
+   0x0c, /* 00001100 */
+   0x18, /* 00011000 */
+   0x30, /* 00110000 */
+   0x60, /* 01100000 */
+   0x60, /* 01100000 */
+   0x00, /* 00000000 */
+
+   /* 56 0x38 '8' */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 57 0x39 '9' */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x7e, /* 01111110 */
+   0x06, /* 00000110 */
+   0x0c, /* 00001100 */
+   0x38, /* 00111000 */
+   0x00, /* 00000000 */
+
+   /* 58 0x3a ':' */
+   0x00, /* 00000000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+
+   /* 59 0x3b ';' */
+   0x00, /* 00000000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x30, /* 00110000 */
+
+   /* 60 0x3c '<' */
+   0x0c, /* 00001100 */
+   0x18, /* 00011000 */
+   0x30, /* 00110000 */
+   0x60, /* 01100000 */
+   0x30, /* 00110000 */
+   0x18, /* 00011000 */
+   0x0c, /* 00001100 */
+   0x00, /* 00000000 */
+
+   /* 61 0x3d '=' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x7e, /* 01111110 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x7e, /* 01111110 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 62 0x3e '>' */
+   0x30, /* 00110000 */
+   0x18, /* 00011000 */
+   0x0c, /* 00001100 */
+   0x06, /* 00000110 */
+   0x0c, /* 00001100 */
+   0x18, /* 00011000 */
+   0x30, /* 00110000 */
+   0x00, /* 00000000 */
+
+   /* 63 0x3f '?' */
+   0x3c, /* 00111100 */
+   0x66, /* 01100110 */
+   0x06, /* 00000110 */
+   0x0c, /* 00001100 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+
+   /* 64 0x40 '@' */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0xde, /* 11011110 */
+   0xde, /* 11011110 */
+   0xde, /* 11011110 */
+   0xc0, /* 11000000 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 65 0x41 'A' */
+   0x10, /* 00010000 */
+   0x38, /* 00111000 */
+   0x6c, /* 01101100 */
+   0xc6, /* 11000110 */
+   0xfe, /* 11111110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x00, /* 00000000 */
+
+   /* 66 0x42 'B' */
+   0xfc, /* 11111100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xfc, /* 11111100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xfc, /* 11111100 */
+   0x00, /* 00000000 */
+
+   /* 67 0x43 'C' */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0xc6, /* 11000110 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 68 0x44 'D' */
+   0xfc, /* 11111100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xfc, /* 11111100 */
+   0x00, /* 00000000 */
+
+   /* 69 0x45 'E' */
+   0xfe, /* 11111110 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0xf8, /* 11111000 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0xfe, /* 11111110 */
+   0x00, /* 00000000 */
+
+   /* 70 0x46 'F' */
+   0xfe, /* 11111110 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0xf8, /* 11111000 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0x00, /* 00000000 */
+
+   /* 71 0x47 'G' */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0xc0, /* 11000000 */
+   0xce, /* 11001110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 72 0x48 'H' */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xfe, /* 11111110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x00, /* 00000000 */
+
+   /* 73 0x49 'I' */
+   0x7e, /* 01111110 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x7e, /* 01111110 */
+   0x00, /* 00000000 */
+
+   /* 74 0x4a 'J' */
+   0x06, /* 00000110 */
+   0x06, /* 00000110 */
+   0x06, /* 00000110 */
+   0x06, /* 00000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 75 0x4b 'K' */
+   0xc6, /* 11000110 */
+   0xcc, /* 11001100 */
+   0xd8, /* 11011000 */
+   0xf0, /* 11110000 */
+   0xd8, /* 11011000 */
+   0xcc, /* 11001100 */
+   0xc6, /* 11000110 */
+   0x00, /* 00000000 */
+
+   /* 76 0x4c 'L' */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0xfe, /* 11111110 */
+   0x00, /* 00000000 */
+
+   /* 77 0x4d 'M' */
+   0x82, /* 10000010 */
+   0xc6, /* 11000110 */
+   0xee, /* 11101110 */
+   0xfe, /* 11111110 */
+   0xd6, /* 11010110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x00, /* 00000000 */
+
+   /* 78 0x4e 'N' */
+   0xc6, /* 11000110 */
+   0xe6, /* 11100110 */
+   0xf6, /* 11110110 */
+   0xde, /* 11011110 */
+   0xce, /* 11001110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x00, /* 00000000 */
+
+   /* 79 0x4f 'O' */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 80 0x50 'P' */
+   0xfc, /* 11111100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xfc, /* 11111100 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0x00, /* 00000000 */
+
+   /* 81 0x51 'Q' */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xf6, /* 11110110 */
+   0xde, /* 11011110 */
+   0x7c, /* 01111100 */
+   0x06, /* 00000110 */
+
+   /* 82 0x52 'R' */
+   0xfc, /* 11111100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xfc, /* 11111100 */
+   0xd8, /* 11011000 */
+   0xcc, /* 11001100 */
+   0xc6, /* 11000110 */
+   0x00, /* 00000000 */
+
+   /* 83 0x53 'S' */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0x60, /* 01100000 */
+   0x38, /* 00111000 */
+   0x0c, /* 00001100 */
+   0xc6, /* 11000110 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 84 0x54 'T' */
+   0x7e, /* 01111110 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+
+   /* 85 0x55 'U' */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 86 0x56 'V' */
+   0xc3, /* 11000011 */
+   0xc3, /* 11000011 */
+   0x66, /* 01100110 */
+   0x66, /* 01100110 */
+   0x3c, /* 00111100 */
+   0x3c, /* 00111100 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+
+   /* 87 0x57 'W' */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xd6, /* 11010110 */
+   0xfe, /* 11111110 */
+   0xee, /* 11101110 */
+   0xc6, /* 11000110 */
+   0x00, /* 00000000 */
+
+   /* 88 0x58 'X' */
+   0xc3, /* 11000011 */
+   0x66, /* 01100110 */
+   0x3c, /* 00111100 */
+   0x18, /* 00011000 */
+   0x3c, /* 00111100 */
+   0x66, /* 01100110 */
+   0xc3, /* 11000011 */
+   0x00, /* 00000000 */
+
+   /* 89 0x59 'Y' */
+   0xc3, /* 11000011 */
+   0xc3, /* 11000011 */
+   0x66, /* 01100110 */
+   0x3c, /* 00111100 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+
+   /* 90 0x5a 'Z' */
+   0xfe, /* 11111110 */
+   0x06, /* 00000110 */
+   0x0c, /* 00001100 */
+   0x18, /* 00011000 */
+   0x30, /* 00110000 */
+   0x60, /* 01100000 */
+   0xfe, /* 11111110 */
+   0x00, /* 00000000 */
+
+   /* 91 0x5b '[' */
+   0x3c, /* 00111100 */
+   0x30, /* 00110000 */
+   0x30, /* 00110000 */
+   0x30, /* 00110000 */
+   0x30, /* 00110000 */
+   0x30, /* 00110000 */
+   0x3c, /* 00111100 */
+   0x00, /* 00000000 */
+
+   /* 92 0x5c '\' */
+   0xc0, /* 11000000 */
+   0x60, /* 01100000 */
+   0x30, /* 00110000 */
+   0x18, /* 00011000 */
+   0x0c, /* 00001100 */
+   0x06, /* 00000110 */
+   0x03, /* 00000011 */
+   0x00, /* 00000000 */
+
+   /* 93 0x5d ']' */
+   0x3c, /* 00111100 */
+   0x0c, /* 00001100 */
+   0x0c, /* 00001100 */
+   0x0c, /* 00001100 */
+   0x0c, /* 00001100 */
+   0x0c, /* 00001100 */
+   0x3c, /* 00111100 */
+   0x00, /* 00000000 */
+
+   /* 94 0x5e '^' */
+   0x10, /* 00010000 */
+   0x38, /* 00111000 */
+   0x6c, /* 01101100 */
+   0xc6, /* 11000110 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 95 0x5f '_' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xfe, /* 11111110 */
+
+   /* 96 0x60 '`' */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x0c, /* 00001100 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 97 0x61 'a' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x7c, /* 01111100 */
+   0x06, /* 00000110 */
+   0x7e, /* 01111110 */
+   0xc6, /* 11000110 */
+   0x7e, /* 01111110 */
+   0x00, /* 00000000 */
+
+   /* 98 0x62 'b' */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0xfc, /* 11111100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xfc, /* 11111100 */
+   0x00, /* 00000000 */
+
+   /* 99 0x63 'c' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0xc0, /* 11000000 */
+   0xc6, /* 11000110 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 100 0x64 'd' */
+   0x06, /* 00000110 */
+   0x06, /* 00000110 */
+   0x7e, /* 01111110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x7e, /* 01111110 */
+   0x00, /* 00000000 */
+
+   /* 101 0x65 'e' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0xfe, /* 11111110 */
+   0xc0, /* 11000000 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 102 0x66 'f' */
+   0x3c, /* 00111100 */
+   0x66, /* 01100110 */
+   0x60, /* 01100000 */
+   0xf0, /* 11110000 */
+   0x60, /* 01100000 */
+   0x60, /* 01100000 */
+   0x60, /* 01100000 */
+   0x00, /* 00000000 */
+
+   /* 103 0x67 'g' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x7e, /* 01111110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x7e, /* 01111110 */
+   0x06, /* 00000110 */
+   0x7c, /* 01111100 */
+
+   /* 104 0x68 'h' */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0xfc, /* 11111100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x00, /* 00000000 */
+
+   /* 105 0x69 'i' */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+   0x38, /* 00111000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+
+   /* 106 0x6a 'j' */
+   0x06, /* 00000110 */
+   0x00, /* 00000000 */
+   0x06, /* 00000110 */
+   0x06, /* 00000110 */
+   0x06, /* 00000110 */
+   0x06, /* 00000110 */
+   0xc6, /* 11000110 */
+   0x7c, /* 01111100 */
+
+   /* 107 0x6b 'k' */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0xcc, /* 11001100 */
+   0xd8, /* 11011000 */
+   0xf0, /* 11110000 */
+   0xd8, /* 11011000 */
+   0xcc, /* 11001100 */
+   0x00, /* 00000000 */
+
+   /* 108 0x6c 'l' */
+   0x38, /* 00111000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+
+   /* 109 0x6d 'm' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xec, /* 11101100 */
+   0xfe, /* 11111110 */
+   0xd6, /* 11010110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x00, /* 00000000 */
+
+   /* 110 0x6e 'n' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xfc, /* 11111100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x00, /* 00000000 */
+
+   /* 111 0x6f 'o' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 112 0x70 'p' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xfc, /* 11111100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xfc, /* 11111100 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+
+   /* 113 0x71 'q' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x7e, /* 01111110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x7e, /* 01111110 */
+   0x06, /* 00000110 */
+   0x06, /* 00000110 */
+
+   /* 114 0x72 'r' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xdc, /* 11011100 */
+   0xe6, /* 11100110 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0x00, /* 00000000 */
+
+   /* 115 0x73 's' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x7e, /* 01111110 */
+   0xc0, /* 11000000 */
+   0x7c, /* 01111100 */
+   0x06, /* 00000110 */
+   0xfc, /* 11111100 */
+   0x00, /* 00000000 */
+
+   /* 116 0x74 't' */
+   0x30, /* 00110000 */
+   0x30, /* 00110000 */
+   0x7c, /* 01111100 */
+   0x30, /* 00110000 */
+   0x30, /* 00110000 */
+   0x36, /* 00110110 */
+   0x1c, /* 00011100 */
+   0x00, /* 00000000 */
+
+   /* 117 0x75 'u' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 118 0x76 'v' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x6c, /* 01101100 */
+   0x38, /* 00111000 */
+   0x00, /* 00000000 */
+
+   /* 119 0x77 'w' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xd6, /* 11010110 */
+   0xfe, /* 11111110 */
+   0x6c, /* 01101100 */
+   0x00, /* 00000000 */
+
+   /* 120 0x78 'x' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xc6, /* 11000110 */
+   0x6c, /* 01101100 */
+   0x38, /* 00111000 */
+   0x6c, /* 01101100 */
+   0xc6, /* 11000110 */
+   0x00, /* 00000000 */
+
+   /* 121 0x79 'y' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xc3, /* 11000011 */
+   0x66, /* 01100110 */
+   0x3c, /* 00111100 */
+   0x18, /* 00011000 */
+   0x30, /* 00110000 */
+   0x60, /* 01100000 */
+
+   /* 122 0x7a 'z' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xfe, /* 11111110 */
+   0x0c, /* 00001100 */
+   0x38, /* 00111000 */
+   0x60, /* 01100000 */
+   0xfe, /* 11111110 */
+   0x00, /* 00000000 */
+
+   /* 123 0x7b '{' */
+   0x0e, /* 00001110 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x70, /* 01110000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x0e, /* 00001110 */
+   0x00, /* 00000000 */
+
+   /* 124 0x7c '|' */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+
+   /* 125 0x7d '}' */
+   0x70, /* 01110000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x0e, /* 00001110 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x70, /* 01110000 */
+   0x00, /* 00000000 */
+
+   /* 126 0x7e '~' */
+   0x72, /* 01110010 */
+   0x9c, /* 10011100 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 127 0x7f '' */
+   0x00, /* 00000000 */
+   0x10, /* 00010000 */
+   0x38, /* 00111000 */
+   0x6c, /* 01101100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xfe, /* 11111110 */
+   0x00, /* 00000000 */
+
+   /* 128 0x80 '' */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0xc6, /* 11000110 */
+   0x7c, /* 01111100 */
+   0x0c, /* 00001100 */
+   0x78, /* 01111000 */
+
+   /* 129 0x81 '' */
+   0xcc, /* 11001100 */
+   0x00, /* 00000000 */
+   0xcc, /* 11001100 */
+   0xcc, /* 11001100 */
+   0xcc, /* 11001100 */
+   0xcc, /* 11001100 */
+   0x76, /* 01110110 */
+   0x00, /* 00000000 */
+
+   /* 130 0x82 '' */
+   0x0c, /* 00001100 */
+   0x18, /* 00011000 */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0xfe, /* 11111110 */
+   0xc0, /* 11000000 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 131 0x83 '' */
+   0x7c, /* 01111100 */
+   0x82, /* 10000010 */
+   0x78, /* 01111000 */
+   0x0c, /* 00001100 */
+   0x7c, /* 01111100 */
+   0xcc, /* 11001100 */
+   0x76, /* 01110110 */
+   0x00, /* 00000000 */
+
+   /* 132 0x84 '' */
+   0xc6, /* 11000110 */
+   0x00, /* 00000000 */
+   0x78, /* 01111000 */
+   0x0c, /* 00001100 */
+   0x7c, /* 01111100 */
+   0xcc, /* 11001100 */
+   0x76, /* 01110110 */
+   0x00, /* 00000000 */
+
+   /* 133 0x85 '' */
+   0x30, /* 00110000 */
+   0x18, /* 00011000 */
+   0x78, /* 01111000 */
+   0x0c, /* 00001100 */
+   0x7c, /* 01111100 */
+   0xcc, /* 11001100 */
+   0x76, /* 01110110 */
+   0x00, /* 00000000 */
+
+   /* 134 0x86 '' */
+   0x30, /* 00110000 */
+   0x30, /* 00110000 */
+   0x78, /* 01111000 */
+   0x0c, /* 00001100 */
+   0x7c, /* 01111100 */
+   0xcc, /* 11001100 */
+   0x76, /* 01110110 */
+   0x00, /* 00000000 */
+
+   /* 135 0x87 '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x7e, /* 01111110 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0x7e, /* 01111110 */
+   0x0c, /* 00001100 */
+   0x38, /* 00111000 */
+
+   /* 136 0x88 '' */
+   0x7c, /* 01111100 */
+   0x82, /* 10000010 */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0xfe, /* 11111110 */
+   0xc0, /* 11000000 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 137 0x89 '' */
+   0xc6, /* 11000110 */
+   0x00, /* 00000000 */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0xfe, /* 11111110 */
+   0xc0, /* 11000000 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 138 0x8a '' */
+   0x30, /* 00110000 */
+   0x18, /* 00011000 */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0xfe, /* 11111110 */
+   0xc0, /* 11000000 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 139 0x8b '' */
+   0x66, /* 01100110 */
+   0x00, /* 00000000 */
+   0x38, /* 00111000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x3c, /* 00111100 */
+   0x00, /* 00000000 */
+
+   /* 140 0x8c '' */
+   0x7c, /* 01111100 */
+   0x82, /* 10000010 */
+   0x38, /* 00111000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x3c, /* 00111100 */
+   0x00, /* 00000000 */
+
+   /* 141 0x8d '' */
+   0x30, /* 00110000 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+   0x38, /* 00111000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x3c, /* 00111100 */
+   0x00, /* 00000000 */
+
+   /* 142 0x8e '' */
+   0xc6, /* 11000110 */
+   0x38, /* 00111000 */
+   0x6c, /* 01101100 */
+   0xc6, /* 11000110 */
+   0xfe, /* 11111110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x00, /* 00000000 */
+
+   /* 143 0x8f '' */
+   0x38, /* 00111000 */
+   0x6c, /* 01101100 */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0xfe, /* 11111110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x00, /* 00000000 */
+
+   /* 144 0x90 '' */
+   0x18, /* 00011000 */
+   0x30, /* 00110000 */
+   0xfe, /* 11111110 */
+   0xc0, /* 11000000 */
+   0xf8, /* 11111000 */
+   0xc0, /* 11000000 */
+   0xfe, /* 11111110 */
+   0x00, /* 00000000 */
+
+   /* 145 0x91 '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x7e, /* 01111110 */
+   0x18, /* 00011000 */
+   0x7e, /* 01111110 */
+   0xd8, /* 11011000 */
+   0x7e, /* 01111110 */
+   0x00, /* 00000000 */
+
+   /* 146 0x92 '' */
+   0x3e, /* 00111110 */
+   0x6c, /* 01101100 */
+   0xcc, /* 11001100 */
+   0xfe, /* 11111110 */
+   0xcc, /* 11001100 */
+   0xcc, /* 11001100 */
+   0xce, /* 11001110 */
+   0x00, /* 00000000 */
+
+   /* 147 0x93 '' */
+   0x7c, /* 01111100 */
+   0x82, /* 10000010 */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 148 0x94 '' */
+   0xc6, /* 11000110 */
+   0x00, /* 00000000 */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 149 0x95 '' */
+   0x30, /* 00110000 */
+   0x18, /* 00011000 */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 150 0x96 '' */
+   0x78, /* 01111000 */
+   0x84, /* 10000100 */
+   0x00, /* 00000000 */
+   0xcc, /* 11001100 */
+   0xcc, /* 11001100 */
+   0xcc, /* 11001100 */
+   0x76, /* 01110110 */
+   0x00, /* 00000000 */
+
+   /* 151 0x97 '' */
+   0x60, /* 01100000 */
+   0x30, /* 00110000 */
+   0xcc, /* 11001100 */
+   0xcc, /* 11001100 */
+   0xcc, /* 11001100 */
+   0xcc, /* 11001100 */
+   0x76, /* 01110110 */
+   0x00, /* 00000000 */
+
+   /* 152 0x98 '' */
+   0xc6, /* 11000110 */
+   0x00, /* 00000000 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x7e, /* 01111110 */
+   0x06, /* 00000110 */
+   0xfc, /* 11111100 */
+
+   /* 153 0x99 '' */
+   0xc6, /* 11000110 */
+   0x38, /* 00111000 */
+   0x6c, /* 01101100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x6c, /* 01101100 */
+   0x38, /* 00111000 */
+   0x00, /* 00000000 */
+
+   /* 154 0x9a '' */
+   0xc6, /* 11000110 */
+   0x00, /* 00000000 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 155 0x9b '' */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x7e, /* 01111110 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0x7e, /* 01111110 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+
+   /* 156 0x9c '' */
+   0x38, /* 00111000 */
+   0x6c, /* 01101100 */
+   0x64, /* 01100100 */
+   0xf0, /* 11110000 */
+   0x60, /* 01100000 */
+   0x66, /* 01100110 */
+   0xfc, /* 11111100 */
+   0x00, /* 00000000 */
+
+   /* 157 0x9d '' */
+   0x66, /* 01100110 */
+   0x66, /* 01100110 */
+   0x3c, /* 00111100 */
+   0x7e, /* 01111110 */
+   0x18, /* 00011000 */
+   0x7e, /* 01111110 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+
+   /* 158 0x9e '' */
+   0xf8, /* 11111000 */
+   0xcc, /* 11001100 */
+   0xcc, /* 11001100 */
+   0xfa, /* 11111010 */
+   0xc6, /* 11000110 */
+   0xcf, /* 11001111 */
+   0xc6, /* 11000110 */
+   0xc7, /* 11000111 */
+
+   /* 159 0x9f '' */
+   0x0e, /* 00001110 */
+   0x1b, /* 00011011 */
+   0x18, /* 00011000 */
+   0x3c, /* 00111100 */
+   0x18, /* 00011000 */
+   0xd8, /* 11011000 */
+   0x70, /* 01110000 */
+   0x00, /* 00000000 */
+
+   /* 160 0xa0 '' */
+   0x18, /* 00011000 */
+   0x30, /* 00110000 */
+   0x78, /* 01111000 */
+   0x0c, /* 00001100 */
+   0x7c, /* 01111100 */
+   0xcc, /* 11001100 */
+   0x76, /* 01110110 */
+   0x00, /* 00000000 */
+
+   /* 161 0xa1 '' */
+   0x0c, /* 00001100 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+   0x38, /* 00111000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x3c, /* 00111100 */
+   0x00, /* 00000000 */
+
+   /* 162 0xa2 '' */
+   0x0c, /* 00001100 */
+   0x18, /* 00011000 */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+
+   /* 163 0xa3 '' */
+   0x18, /* 00011000 */
+   0x30, /* 00110000 */
+   0xcc, /* 11001100 */
+   0xcc, /* 11001100 */
+   0xcc, /* 11001100 */
+   0xcc, /* 11001100 */
+   0x76, /* 01110110 */
+   0x00, /* 00000000 */
+
+   /* 164 0xa4 '' */
+   0x76, /* 01110110 */
+   0xdc, /* 11011100 */
+   0x00, /* 00000000 */
+   0xdc, /* 11011100 */
+   0x66, /* 01100110 */
+   0x66, /* 01100110 */
+   0x66, /* 01100110 */
+   0x00, /* 00000000 */
+
+   /* 165 0xa5 '' */
+   0x76, /* 01110110 */
+   0xdc, /* 11011100 */
+   0x00, /* 00000000 */
+   0xe6, /* 11100110 */
+   0xf6, /* 11110110 */
+   0xde, /* 11011110 */
+   0xce, /* 11001110 */
+   0x00, /* 00000000 */
+
+   /* 166 0xa6 '' */
+   0x3c, /* 00111100 */
+   0x6c, /* 01101100 */
+   0x6c, /* 01101100 */
+   0x3e, /* 00111110 */
+   0x00, /* 00000000 */
+   0x7e, /* 01111110 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 167 0xa7 '' */
+   0x38, /* 00111000 */
+   0x6c, /* 01101100 */
+   0x6c, /* 01101100 */
+   0x38, /* 00111000 */
+   0x00, /* 00000000 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 168 0xa8 '' */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x30, /* 00110000 */
+   0x63, /* 01100011 */
+   0x3e, /* 00111110 */
+   0x00, /* 00000000 */
+
+   /* 169 0xa9 '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xfe, /* 11111110 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 170 0xaa '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xfe, /* 11111110 */
+   0x06, /* 00000110 */
+   0x06, /* 00000110 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 171 0xab '' */
+   0x63, /* 01100011 */
+   0xe6, /* 11100110 */
+   0x6c, /* 01101100 */
+   0x7e, /* 01111110 */
+   0x33, /* 00110011 */
+   0x66, /* 01100110 */
+   0xcc, /* 11001100 */
+   0x0f, /* 00001111 */
+
+   /* 172 0xac '' */
+   0x63, /* 01100011 */
+   0xe6, /* 11100110 */
+   0x6c, /* 01101100 */
+   0x7a, /* 01111010 */
+   0x36, /* 00110110 */
+   0x6a, /* 01101010 */
+   0xdf, /* 11011111 */
+   0x06, /* 00000110 */
+
+   /* 173 0xad '' */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x3c, /* 00111100 */
+   0x3c, /* 00111100 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+
+   /* 174 0xae '' */
+   0x00, /* 00000000 */
+   0x33, /* 00110011 */
+   0x66, /* 01100110 */
+   0xcc, /* 11001100 */
+   0x66, /* 01100110 */
+   0x33, /* 00110011 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 175 0xaf '' */
+   0x00, /* 00000000 */
+   0xcc, /* 11001100 */
+   0x66, /* 01100110 */
+   0x33, /* 00110011 */
+   0x66, /* 01100110 */
+   0xcc, /* 11001100 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 176 0xb0 '' */
+   0x22, /* 00100010 */
+   0x88, /* 10001000 */
+   0x22, /* 00100010 */
+   0x88, /* 10001000 */
+   0x22, /* 00100010 */
+   0x88, /* 10001000 */
+   0x22, /* 00100010 */
+   0x88, /* 10001000 */
+
+   /* 177 0xb1 '' */
+   0x55, /* 01010101 */
+   0xaa, /* 10101010 */
+   0x55, /* 01010101 */
+   0xaa, /* 10101010 */
+   0x55, /* 01010101 */
+   0xaa, /* 10101010 */
+   0x55, /* 01010101 */
+   0xaa, /* 10101010 */
+
+   /* 178 0xb2 '' */
+   0x77, /* 01110111 */
+   0xdd, /* 11011101 */
+   0x77, /* 01110111 */
+   0xdd, /* 11011101 */
+   0x77, /* 01110111 */
+   0xdd, /* 11011101 */
+   0x77, /* 01110111 */
+   0xdd, /* 11011101 */
+
+   /* 179 0xb3 '' */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+
+   /* 180 0xb4 '' */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0xf8, /* 11111000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+
+   /* 181 0xb5 '' */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0xf8, /* 11111000 */
+   0x18, /* 00011000 */
+   0xf8, /* 11111000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+
+   /* 182 0xb6 '' */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0xf6, /* 11110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+
+   /* 183 0xb7 '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xfe, /* 11111110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+
+   /* 184 0xb8 '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xf8, /* 11111000 */
+   0x18, /* 00011000 */
+   0xf8, /* 11111000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+
+   /* 185 0xb9 '' */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0xf6, /* 11110110 */
+   0x06, /* 00000110 */
+   0xf6, /* 11110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+
+   /* 186 0xba '' */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+
+   /* 187 0xbb '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xfe, /* 11111110 */
+   0x06, /* 00000110 */
+   0xf6, /* 11110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+
+   /* 188 0xbc '' */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0xf6, /* 11110110 */
+   0x06, /* 00000110 */
+   0xfe, /* 11111110 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 189 0xbd '' */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0xfe, /* 11111110 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 190 0xbe '' */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0xf8, /* 11111000 */
+   0x18, /* 00011000 */
+   0xf8, /* 11111000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 191 0xbf '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xf8, /* 11111000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+
+   /* 192 0xc0 '' */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x1f, /* 00011111 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 193 0xc1 '' */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0xff, /* 11111111 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 194 0xc2 '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xff, /* 11111111 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+
+   /* 195 0xc3 '' */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x1f, /* 00011111 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+
+   /* 196 0xc4 '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xff, /* 11111111 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 197 0xc5 '' */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0xff, /* 11111111 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+
+   /* 198 0xc6 '' */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x1f, /* 00011111 */
+   0x18, /* 00011000 */
+   0x1f, /* 00011111 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+
+   /* 199 0xc7 '' */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x37, /* 00110111 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+
+   /* 200 0xc8 '' */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x37, /* 00110111 */
+   0x30, /* 00110000 */
+   0x3f, /* 00111111 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 201 0xc9 '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x3f, /* 00111111 */
+   0x30, /* 00110000 */
+   0x37, /* 00110111 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+
+   /* 202 0xca '' */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0xf7, /* 11110111 */
+   0x00, /* 00000000 */
+   0xff, /* 11111111 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 203 0xcb '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xff, /* 11111111 */
+   0x00, /* 00000000 */
+   0xf7, /* 11110111 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+
+   /* 204 0xcc '' */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x37, /* 00110111 */
+   0x30, /* 00110000 */
+   0x37, /* 00110111 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+
+   /* 205 0xcd '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xff, /* 11111111 */
+   0x00, /* 00000000 */
+   0xff, /* 11111111 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 206 0xce '' */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0xf7, /* 11110111 */
+   0x00, /* 00000000 */
+   0xf7, /* 11110111 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+
+   /* 207 0xcf '' */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0xff, /* 11111111 */
+   0x00, /* 00000000 */
+   0xff, /* 11111111 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 208 0xd0 '' */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0xff, /* 11111111 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 209 0xd1 '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xff, /* 11111111 */
+   0x00, /* 00000000 */
+   0xff, /* 11111111 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+
+   /* 210 0xd2 '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xff, /* 11111111 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+
+   /* 211 0xd3 '' */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x3f, /* 00111111 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 212 0xd4 '' */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x1f, /* 00011111 */
+   0x18, /* 00011000 */
+   0x1f, /* 00011111 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 213 0xd5 '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x1f, /* 00011111 */
+   0x18, /* 00011000 */
+   0x1f, /* 00011111 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+
+   /* 214 0xd6 '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x3f, /* 00111111 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+
+   /* 215 0xd7 '' */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0xff, /* 11111111 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+
+   /* 216 0xd8 '' */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0xff, /* 11111111 */
+   0x18, /* 00011000 */
+   0xff, /* 11111111 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+
+   /* 217 0xd9 '' */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0xf8, /* 11111000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 218 0xda '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x1f, /* 00011111 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+
+   /* 219 0xdb '' */
+   0xff, /* 11111111 */
+   0xff, /* 11111111 */
+   0xff, /* 11111111 */
+   0xff, /* 11111111 */
+   0xff, /* 11111111 */
+   0xff, /* 11111111 */
+   0xff, /* 11111111 */
+   0xff, /* 11111111 */
+
+   /* 220 0xdc '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xff, /* 11111111 */
+   0xff, /* 11111111 */
+   0xff, /* 11111111 */
+   0xff, /* 11111111 */
+
+   /* 221 0xdd '' */
+   0xf0, /* 11110000 */
+   0xf0, /* 11110000 */
+   0xf0, /* 11110000 */
+   0xf0, /* 11110000 */
+   0xf0, /* 11110000 */
+   0xf0, /* 11110000 */
+   0xf0, /* 11110000 */
+   0xf0, /* 11110000 */
+
+   /* 222 0xde '' */
+   0x0f, /* 00001111 */
+   0x0f, /* 00001111 */
+   0x0f, /* 00001111 */
+   0x0f, /* 00001111 */
+   0x0f, /* 00001111 */
+   0x0f, /* 00001111 */
+   0x0f, /* 00001111 */
+   0x0f, /* 00001111 */
+
+   /* 223 0xdf '' */
+   0xff, /* 11111111 */
+   0xff, /* 11111111 */
+   0xff, /* 11111111 */
+   0xff, /* 11111111 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 224 0xe0 '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x76, /* 01110110 */
+   0xdc, /* 11011100 */
+   0xc8, /* 11001000 */
+   0xdc, /* 11011100 */
+   0x76, /* 01110110 */
+   0x00, /* 00000000 */
+
+   /* 225 0xe1 '' */
+   0x78, /* 01111000 */
+   0xcc, /* 11001100 */
+   0xcc, /* 11001100 */
+   0xd8, /* 11011000 */
+   0xcc, /* 11001100 */
+   0xc6, /* 11000110 */
+   0xcc, /* 11001100 */
+   0x00, /* 00000000 */
+
+   /* 226 0xe2 '' */
+   0xfe, /* 11111110 */
+   0xc6, /* 11000110 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0xc0, /* 11000000 */
+   0x00, /* 00000000 */
+
+   /* 227 0xe3 '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0xfe, /* 11111110 */
+   0x6c, /* 01101100 */
+   0x6c, /* 01101100 */
+   0x6c, /* 01101100 */
+   0x6c, /* 01101100 */
+   0x00, /* 00000000 */
+
+   /* 228 0xe4 '' */
+   0xfe, /* 11111110 */
+   0xc6, /* 11000110 */
+   0x60, /* 01100000 */
+   0x30, /* 00110000 */
+   0x60, /* 01100000 */
+   0xc6, /* 11000110 */
+   0xfe, /* 11111110 */
+   0x00, /* 00000000 */
+
+   /* 229 0xe5 '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x7e, /* 01111110 */
+   0xd8, /* 11011000 */
+   0xd8, /* 11011000 */
+   0xd8, /* 11011000 */
+   0x70, /* 01110000 */
+   0x00, /* 00000000 */
+
+   /* 230 0xe6 '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x66, /* 01100110 */
+   0x66, /* 01100110 */
+   0x66, /* 01100110 */
+   0x66, /* 01100110 */
+   0x7c, /* 01111100 */
+   0xc0, /* 11000000 */
+
+   /* 231 0xe7 '' */
+   0x00, /* 00000000 */
+   0x76, /* 01110110 */
+   0xdc, /* 11011100 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+
+   /* 232 0xe8 '' */
+   0x7e, /* 01111110 */
+   0x18, /* 00011000 */
+   0x3c, /* 00111100 */
+   0x66, /* 01100110 */
+   0x66, /* 01100110 */
+   0x3c, /* 00111100 */
+   0x18, /* 00011000 */
+   0x7e, /* 01111110 */
+
+   /* 233 0xe9 '' */
+   0x38, /* 00111000 */
+   0x6c, /* 01101100 */
+   0xc6, /* 11000110 */
+   0xfe, /* 11111110 */
+   0xc6, /* 11000110 */
+   0x6c, /* 01101100 */
+   0x38, /* 00111000 */
+   0x00, /* 00000000 */
+
+   /* 234 0xea '' */
+   0x38, /* 00111000 */
+   0x6c, /* 01101100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x6c, /* 01101100 */
+   0x6c, /* 01101100 */
+   0xee, /* 11101110 */
+   0x00, /* 00000000 */
+
+   /* 235 0xeb '' */
+   0x0e, /* 00001110 */
+   0x18, /* 00011000 */
+   0x0c, /* 00001100 */
+   0x3e, /* 00111110 */
+   0x66, /* 01100110 */
+   0x66, /* 01100110 */
+   0x3c, /* 00111100 */
+   0x00, /* 00000000 */
+
+   /* 236 0xec '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x7e, /* 01111110 */
+   0xdb, /* 11011011 */
+   0xdb, /* 11011011 */
+   0x7e, /* 01111110 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 237 0xed '' */
+   0x06, /* 00000110 */
+   0x0c, /* 00001100 */
+   0x7e, /* 01111110 */
+   0xdb, /* 11011011 */
+   0xdb, /* 11011011 */
+   0x7e, /* 01111110 */
+   0x60, /* 01100000 */
+   0xc0, /* 11000000 */
+
+   /* 238 0xee '' */
+   0x1e, /* 00011110 */
+   0x30, /* 00110000 */
+   0x60, /* 01100000 */
+   0x7e, /* 01111110 */
+   0x60, /* 01100000 */
+   0x30, /* 00110000 */
+   0x1e, /* 00011110 */
+   0x00, /* 00000000 */
+
+   /* 239 0xef '' */
+   0x00, /* 00000000 */
+   0x7c, /* 01111100 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0xc6, /* 11000110 */
+   0x00, /* 00000000 */
+
+   /* 240 0xf0 '' */
+   0x00, /* 00000000 */
+   0xfe, /* 11111110 */
+   0x00, /* 00000000 */
+   0xfe, /* 11111110 */
+   0x00, /* 00000000 */
+   0xfe, /* 11111110 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 241 0xf1 '' */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x7e, /* 01111110 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+   0x7e, /* 01111110 */
+   0x00, /* 00000000 */
+
+   /* 242 0xf2 '' */
+   0x30, /* 00110000 */
+   0x18, /* 00011000 */
+   0x0c, /* 00001100 */
+   0x18, /* 00011000 */
+   0x30, /* 00110000 */
+   0x00, /* 00000000 */
+   0x7e, /* 01111110 */
+   0x00, /* 00000000 */
+
+   /* 243 0xf3 '' */
+   0x0c, /* 00001100 */
+   0x18, /* 00011000 */
+   0x30, /* 00110000 */
+   0x18, /* 00011000 */
+   0x0c, /* 00001100 */
+   0x00, /* 00000000 */
+   0x7e, /* 01111110 */
+   0x00, /* 00000000 */
+
+   /* 244 0xf4 '' */
+   0x0e, /* 00001110 */
+   0x1b, /* 00011011 */
+   0x1b, /* 00011011 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+
+   /* 245 0xf5 '' */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0xd8, /* 11011000 */
+   0xd8, /* 11011000 */
+   0x70, /* 01110000 */
+
+   /* 246 0xf6 '' */
+   0x00, /* 00000000 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+   0x7e, /* 01111110 */
+   0x00, /* 00000000 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 247 0xf7 '' */
+   0x00, /* 00000000 */
+   0x76, /* 01110110 */
+   0xdc, /* 11011100 */
+   0x00, /* 00000000 */
+   0x76, /* 01110110 */
+   0xdc, /* 11011100 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 248 0xf8 '' */
+   0x38, /* 00111000 */
+   0x6c, /* 01101100 */
+   0x6c, /* 01101100 */
+   0x38, /* 00111000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 249 0xf9 '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x18, /* 00011000 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 250 0xfa '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x18, /* 00011000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 251 0xfb '' */
+   0x0f, /* 00001111 */
+   0x0c, /* 00001100 */
+   0x0c, /* 00001100 */
+   0x0c, /* 00001100 */
+   0xec, /* 11101100 */
+   0x6c, /* 01101100 */
+   0x3c, /* 00111100 */
+   0x1c, /* 00011100 */
+
+   /* 252 0xfc '' */
+   0x6c, /* 01101100 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x36, /* 00110110 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 253 0xfd '' */
+   0x78, /* 01111000 */
+   0x0c, /* 00001100 */
+   0x18, /* 00011000 */
+   0x30, /* 00110000 */
+   0x7c, /* 01111100 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 254 0xfe '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x3c, /* 00111100 */
+   0x3c, /* 00111100 */
+   0x3c, /* 00111100 */
+   0x3c, /* 00111100 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+   /* 255 0xff '' */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+   0x00, /* 00000000 */
+
+};
+
--- linux-2.1.42/drivers/video/retz3fb.c.orig	Mon Jun  9 23:09:53 1997
+++ linux-2.1.42/drivers/video/retz3fb.c	Thu Jun 12 22:51:11 1997
@@ -1,6 +1,5 @@
 /*
- * Linux/arch/m68k/amiga/retz3fb.c -- Low level implementation of the
- *                                    RetinaZ3 frame buffer device
+ * Linux/drivers/video/retz3fb.c -- RetinaZ3 frame buffer device
  *
  *    Copyright (C) 1997 Jes Sorensen
  *
@@ -22,6 +21,7 @@
  */
 
 
+#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/string.h>
@@ -98,11 +98,9 @@
 static int current_par_valid = 0;
 static int currcon = 0;
 
-static struct display disp[MAX_NR_CONSOLES];
+static struct display disp;
 static struct fb_info fb_info;
 
-static int node;        /* node of the /dev/fb?current file */
-
 
 /*
  *    Switch for Chipset Independency
@@ -310,9 +308,10 @@
  *    Interface used by the world
  */
 
-int retz3_probe(void);
 void retz3_video_setup(char *options, int *ints);
 
+static int retz3_fb_open(int fbidx);
+static int retz3_fb_release(int fbidx);
 static int retz3_fb_get_fix(struct fb_fix_screeninfo *fix, int con);
 static int retz3_fb_get_var(struct fb_var_screeninfo *var, int con);
 static int retz3_fb_set_var(struct fb_var_screeninfo *var, int con);
@@ -327,7 +326,7 @@
  *    Interface to the low level console driver
  */
 
-struct fb_info *retz3_fb_init(long *mem_start); /* Through amiga_fb_init() */
+int retz3_fb_init(u_long *mem_start);
 static int z3fb_switch(int con);
 static int z3fb_updatevar(int con);
 static void z3fb_blank(int blank);
@@ -850,7 +849,8 @@
 		}
 	}
 
-	*memstart = (*memstart + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1);
+	if (memstart)
+	    *memstart = (*memstart + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1);
 
 	z3_mem = kernel_map (board_addr, board_size,
 			     KERNELMAP_NOCACHE_SER, memstart);
@@ -1378,11 +1378,11 @@
 {
 	if (con != currcon)
 		return;
-	if (disp[con].cmap.len)
-		do_fb_set_cmap(&disp[con].cmap, &disp[con].var, 1);
+	if (fb_display[con].cmap.len)
+		do_fb_set_cmap(&fb_display[con].cmap, &fb_display[con].var, 1);
 	else
-		do_fb_set_cmap(get_default_colormap(disp[con].var.bits_per_pixel),
-                                          &disp[con].var, 1);
+		do_fb_set_cmap(get_default_colormap(fb_display[con].var.bits_per_pixel),
+                                          &fb_display[con].var, 1);
 }
 
 
@@ -1462,6 +1462,27 @@
 }
 
 
+ /*
+ *    Open/Release the frame buffer device
+ */
+
+static int retz3_fb_open(int fbidx)
+{
+	/*
+	 * Nothing, only a usage count for the moment
+	 */
+
+	MOD_INC_USE_COUNT;
+	return(0);
+}
+
+static int retz3_fb_release(int fbidx)
+{
+	MOD_DEC_USE_COUNT;
+	return(0);
+}
+
+
 /*
  *    Get the Fixed Part of the Display
  */
@@ -1474,7 +1495,7 @@
 	if (con == -1)
 		retz3_fb_get_par(&par);
 	else
-		error = fbhw->decode_var(&disp[con].var, &par);
+		error = fbhw->decode_var(&fb_display[con].var, &par);
 	return(error ? error : fbhw->encode_fix(fix, &par));
 }
 
@@ -1492,7 +1513,7 @@
 		retz3_fb_get_par(&par);
 		error = fbhw->encode_var(var, &par);
 	} else
-		*var = disp[con].var;
+		*var = fb_display[con].var;
 	return error;
 }
 
@@ -1500,18 +1521,24 @@
 static void retz3_fb_set_disp(int con)
 {
 	struct fb_fix_screeninfo fix;
+	struct display *display;
+
+	if (con >= 0)
+		display = &fb_display[con];
+	else
+		display = &disp;	/* used during initialization */
 
 	retz3_fb_get_fix(&fix, con);
 	if (con == -1)
 		con = 0;
-	disp[con].screen_base = (unsigned char *)fix.smem_start;
-	disp[con].visual = fix.visual;
-	disp[con].type = fix.type;
-	disp[con].type_aux = fix.type_aux;
-	disp[con].ypanstep = fix.ypanstep;
-	disp[con].ywrapstep = fix.ywrapstep;
-	disp[con].can_soft_blank = 1;
-	disp[con].inverse = z3fb_inverse;
+	display->screen_base = (unsigned char *)fix.smem_start;
+	display->visual = fix.visual;
+	display->type = fix.type;
+	display->type_aux = fix.type_aux;
+	display->ypanstep = fix.ypanstep;
+	display->ywrapstep = fix.ywrapstep;
+	display->can_soft_blank = 1;
+	display->inverse = z3fb_inverse;
 }
 
 
@@ -1526,19 +1553,19 @@
 	if ((err = do_fb_set_var(var, con == currcon)))
 		return err;
 	if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) {
-		oldxres = disp[con].var.xres;
-		oldyres = disp[con].var.yres;
-		oldvxres = disp[con].var.xres_virtual;
-		oldvyres = disp[con].var.yres_virtual;
-		oldbpp = disp[con].var.bits_per_pixel;
-		disp[con].var = *var;
+		oldxres = fb_display[con].var.xres;
+		oldyres = fb_display[con].var.yres;
+		oldvxres = fb_display[con].var.xres_virtual;
+		oldvyres = fb_display[con].var.yres_virtual;
+		oldbpp = fb_display[con].var.bits_per_pixel;
+		fb_display[con].var = *var;
 		if (oldxres != var->xres || oldyres != var->yres ||
 		    oldvxres != var->xres_virtual ||
 		    oldvyres != var->yres_virtual ||
 		    oldbpp != var->bits_per_pixel) {
 			retz3_fb_set_disp(con);
 			(*fb_info.changevar)(con);
-			alloc_cmap(&disp[con].cmap, 0, 0);
+			alloc_cmap(&fb_display[con].cmap, 0, 0);
 			do_install_cmap(con);
 		}
 	}
@@ -1554,11 +1581,11 @@
 static int retz3_fb_get_cmap(struct fb_cmap *cmap, int kspc, int con)
 {
 	if (con == currcon) /* current console? */
-		return(do_fb_get_cmap(cmap, &disp[con].var, kspc));
-	else if (disp[con].cmap.len) /* non default colormap? */
-		copy_cmap(&disp[con].cmap, cmap, kspc ? 0 : 2);
+		return(do_fb_get_cmap(cmap, &fb_display[con].var, kspc));
+	else if (fb_display[con].cmap.len) /* non default colormap? */
+		copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
 	else
-		copy_cmap(get_default_colormap(disp[con].var.bits_per_pixel),
+		copy_cmap(get_default_colormap(fb_display[con].var.bits_per_pixel),
 			  cmap, kspc ? 0 : 2);
 	return 0;
 }
@@ -1572,15 +1599,15 @@
 {
 	int err;
 
-	if (!disp[con].cmap.len) {       /* no colormap allocated? */
-		if ((err = alloc_cmap(&disp[con].cmap,
-				      1<<disp[con].var.bits_per_pixel, 0)))
+	if (!fb_display[con].cmap.len) {       /* no colormap allocated? */
+		if ((err = alloc_cmap(&fb_display[con].cmap,
+				      1<<fb_display[con].var.bits_per_pixel, 0)))
 			return err;
 	}
 	if (con == currcon)              /* current console? */
-		return(do_fb_set_cmap(cmap, &disp[con].var, kspc));
+		return(do_fb_set_cmap(cmap, &fb_display[con].var, kspc));
 	else
-		copy_cmap(cmap, &disp[con].cmap, kspc ? 0 : 1);
+		copy_cmap(cmap, &fb_display[con].cmap, kspc ? 0 : 1);
 	return 0;
 }
 
@@ -1609,19 +1636,13 @@
 
 
 static struct fb_ops retz3_fb_ops = {
-   retz3_fb_get_fix, retz3_fb_get_var, retz3_fb_set_var, retz3_fb_get_cmap,
-   retz3_fb_set_cmap, retz3_fb_pan_display, retz3_fb_ioctl
+   retz3_fb_open, retz3_fb_release, retz3_fb_get_fix, retz3_fb_get_var,
+   retz3_fb_set_var, retz3_fb_get_cmap, retz3_fb_set_cmap,
+   retz3_fb_pan_display, retz3_fb_ioctl
 };
 
 
-int retz3_probe(void)
-{
-	z3_key = zorro_find(MANUF_MACROSYSTEMS2, PROD_RETINA_Z3, 0, 0);
-	return(z3_key);
-}
-
-
-void retz3_video_setup(char *options, int *ints)
+__initfunc(void retz3_video_setup(char *options, int *ints))
 {
 	char *this_opt;
 	int i;
@@ -1652,19 +1673,33 @@
  *    Initialization
  */
 
-__initfunc(struct fb_info *retz3_fb_init(long *mem_start))
+__initfunc(int retz3_fb_init(u_long *mem_start))
 {
 	int err;
 	struct retz3_fb_par par;
 
+	if (!(z3_key = zorro_find(MANUF_MACROSYSTEMS2, PROD_RETINA_Z3, 0, 0)))
+		return -ENODEV;
+
 	memstart = mem_start;
 
 	fbhw = &retz3_switch;
 
-	err = register_framebuffer(retz3_fb_name, &node, &retz3_fb_ops,
-				   NUM_TOTAL_MODES, retz3_fb_predefined);
+	strcpy(fb_info.modename, retz3_fb_name);
+	fb_info.changevar = NULL;
+	fb_info.node = -1;
+	fb_info.fbops = &retz3_fb_ops;
+	fb_info.fbvar_num = NUM_TOTAL_MODES;
+	fb_info.fbvar = retz3_fb_predefined;
+	fb_info.disp = &disp;
+	fb_info.switch_con = &z3fb_switch;
+	fb_info.updatevar = &z3fb_updatevar;
+	fb_info.blank = &z3fb_blank;
+	fb_info.setcmap = &z3fb_setcmap;
+
+	err = register_framebuffer(&fb_info);
 	if (err < 0)
-		panic("Cannot register frame buffer\n");
+		return err;
 
 	fbhw->init();
 
@@ -1674,29 +1709,25 @@
 	fbhw->decode_var(&retz3_fb_predefined[z3fb_mode], &par);
 	fbhw->encode_var(&retz3_fb_predefined[0], &par);
 
-	strcpy(fb_info.modename, retz3_fb_name);
-	fb_info.disp = disp;
-	fb_info.switch_con = &z3fb_switch;
-	fb_info.updatevar = &z3fb_updatevar;
-	fb_info.blank = &z3fb_blank;
-	fb_info.setcmap = &z3fb_setcmap;
-
 	do_fb_set_var(&retz3_fb_predefined[0], 0);
-	retz3_fb_get_var(&disp[0].var, -1);
+	retz3_fb_get_var(&fb_display[0].var, -1);
 	retz3_fb_set_disp(-1);
 	do_install_cmap(0);
 
-	return &fb_info;
+	printk("%s frame buffer device, using %ldK of video memory\n",
+	       fb_info.modename, z3_size>>10);
+
+	return 0;
 }
 
 
 static int z3fb_switch(int con)
 {
 	/* Do we have to save the colormap? */
-	if (disp[currcon].cmap.len)
-		do_fb_get_cmap(&disp[currcon].cmap, &disp[currcon].var, 1);
+	if (fb_display[currcon].cmap.len)
+		do_fb_get_cmap(&fb_display[currcon].cmap, &fb_display[currcon].var, 1);
 
-	do_fb_set_var(&disp[con].var, 1);
+	do_fb_set_var(&fb_display[con].var, 1);
 	currcon = con;
 	/* Install new colormap */
 	do_install_cmap(con);
@@ -1752,3 +1783,28 @@
 		}
 	return -1;
 }
+
+
+
+
+#ifdef MODULE
+int init_module(void)
+{
+    return(retz3_fb_init(NULL));
+}
+
+void cleanup_module(void)
+{
+#if 0
+    /* Not yet supported */
+    unregister_framebuffer(&fb_info);
+#endif
+}
+#endif /* MODULE */
+
+
+    /*
+     *  Visible symbols for modules
+     */
+
+EXPORT_SYMBOL(retz3_bitblt);
--- linux-2.1.42/drivers/Makefile.orig	Sun May 18 23:05:26 1997
+++ linux-2.1.42/drivers/Makefile	Mon Jun  9 23:03:02 1997
@@ -9,7 +9,7 @@
 
 SUB_DIRS     := block char net pnp #streams
 MOD_SUB_DIRS := $(SUB_DIRS) sbus
-ALL_SUB_DIRS := $(SUB_DIRS) pci scsi sbus sound cdrom isdn pnp
+ALL_SUB_DIRS := $(SUB_DIRS) pci scsi sbus sound cdrom isdn pnp video
 
 ifdef CONFIG_PCI
 SUB_DIRS += pci
@@ -17,6 +17,11 @@
 
 ifdef CONFIG_SBUS
 SUB_DIRS += sbus
+endif
+
+ifdef CONFIG_VT
+SUB_DIRS += video
+MOD_SUB_DIRS += video
 endif
 
 # If CONFIG_SCSI is set, the core of scsi support will be added to the kernel,
--- linux-2.1.42/include/linux/fb.h.orig	Sun Jun  1 23:50:45 1997
+++ linux-2.1.42/include/linux/fb.h	Mon Jun  9 23:36:53 1997
@@ -3,6 +3,12 @@
 
 /* Definitions of frame buffers						*/
 
+#define FB_MAJOR	29
+
+#define FB_MODES_SHIFT	5	/* 32 modes per framebuffer */
+#define FB_NUM_MINORS	256	/* 256 Minors               */
+#define FB_MAX		(FB_NUM_MINORS / (1 << FB_MODES_SHIFT))
+
 /* ioctls
    0x46 is 'F'								*/
 #define FBIOGET_VSCREENINFO 	0x4600
@@ -11,6 +17,12 @@
 #define FBIOGETCMAP		0x4604
 #define FBIOPUTCMAP		0x4605
 #define FBIOPAN_DISPLAY         0x4606
+/* #define FBIOGET_MONITORSPEC	0x4607 */
+/* #define FBIOPUT_MONITORSPEC	0x4608 */
+/* #define FBIOSWITCH_MONIBIT	0x4609 */
+#define FBIOGET_CON2FBMAP	0x460A
+#define FBIOPUT_CON2FBMAP	0x460B
+/* 0x460C-0x4610 are defined below */
 
 #define FB_TYPE_PACKED_PIXELS		0	/* Packed Pixels	*/
 #define FB_TYPE_PLANES			1	/* Non interleaved planes */
@@ -125,11 +137,19 @@
 	unsigned short *transp;		/* transparency, can be NULL */
 };
 
+struct fb_con2fbmap {
+        int console;
+	int framebuffer;
+};
+
 #ifdef __KERNEL__
 
 #include <linux/fs.h>
 
 struct fb_ops {
+	/* open/release and usage marking */
+	int (*fb_open) (int);
+	int (*fb_release) (int);
 	/* get non settable parameters	*/
 	int (*fb_get_fix) (struct fb_fix_screeninfo *, int); 
 	/* get settable parameters	*/
@@ -147,9 +167,6 @@
 			unsigned long, int);
 };
 
-int register_framebuffer(char *, int *, struct fb_ops *, int, 
-			 struct fb_var_screeninfo *);
-int unregister_framebuffer(int);
 
    /*
     *    This is the interface between the low-level console driver and the
@@ -181,6 +198,7 @@
    /* Filled in by the low-level console driver */
 
    struct vc_data *conp;            /* pointer to console data */
+   struct fb_info *fb_info;         /* frame buffer for this console */
    int vrows;                       /* number of virtual rows */
    int cursor_x;                    /* current cursor position */
    int cursor_y;
@@ -200,7 +218,11 @@
 
 struct fb_info {
    char modename[40];               /* at boottime detected video mode */
-   struct display *disp;            /* pointer to display variables */
+   int node;
+   struct fb_ops *fbops;
+   int fbvar_num;
+   struct fb_var_screeninfo *fbvar;
+   struct display *disp;            /* initial display variable */
    char fontname[40];               /* default font name */
    int (*changevar)(int);           /* tell console var has changed */
    int (*switch_con)(int);          /* tell fb to switch consoles */
@@ -209,6 +231,14 @@
    int (*setcmap)(struct fb_cmap *, int); /* tell fb to set the colormap */
 };
 
+int register_framebuffer(struct fb_info *fb_info);
+int unregister_framebuffer(const struct fb_info *fb_info);
+extern int probe_framebuffers(u_long *kmem_start);
+
+extern struct display fb_display[MAX_NR_CONSOLES];	/* fbcon.c */
+extern struct fb_info *registered_fb[FB_MAX];		/* fbmem.c */
+extern char con2fb_map[MAX_NR_CONSOLES];		/* fbmem.c */
+
 #endif /* __KERNEL__ */
 
 #if 1
@@ -225,11 +255,11 @@
     *    Hardware Cursor
     */
 
-#define FBIOGET_FCURSORINFO     0x4607
-#define FBIOGET_VCURSORINFO     0x4608
-#define FBIOPUT_VCURSORINFO     0x4609
-#define FBIOGET_CURSORSTATE     0x460A
-#define FBIOPUT_CURSORSTATE     0x460B
+#define FBIOGET_FCURSORINFO     0x460C
+#define FBIOGET_VCURSORINFO     0x460D
+#define FBIOPUT_VCURSORINFO     0x460E
+#define FBIOGET_CURSORSTATE     0x460F
+#define FBIOPUT_CURSORSTATE     0x4610
 
 
 struct fb_fix_cursorinfo {
--- linux-2.1.42/include/asm-m68k/machdep.h.orig	Sun May 18 23:06:53 1997
+++ linux-2.1.42/include/asm-m68k/machdep.h	Mon Jun  9 23:02:47 1997
@@ -33,9 +33,7 @@
 extern int (*mach_floppy_init) (void);
 extern unsigned long (*mach_hd_init) (unsigned long, unsigned long);
 extern void (*mach_hd_setup)(char *, int *);
-extern struct fb_info *(*mach_fb_init)(long *);
 extern long mach_max_dma_address;
-extern void (*mach_video_setup)(char *, int *);
 extern void (*mach_floppy_setup)(char *, int *);
 extern void (*mach_floppy_eject)(void);
 
--- linux-2.1.42/init/main.c.orig	Sun Jun  1 22:04:47 1997
+++ linux-2.1.42/init/main.c	Mon Jun  9 23:02:43 1997
@@ -317,7 +317,7 @@
 	{ "noinitrd", no_initrd },
 #endif
 #endif
-#if defined (CONFIG_AMIGA) || defined (CONFIG_ATARI)
+#ifdef CONFIG_FB
 	{ "video=", video_setup },
 #endif
 	{ "swap=", swap_setup },
--- linux-2.1.42/Makefile.orig	Thu Apr 17 17:36:55 1997
+++ linux-2.1.42/Makefile	Mon Jun  9 23:03:16 1997
@@ -149,6 +149,10 @@
 DRIVERS := $(DRIVERS) drivers/sbus/sbus.a
 endif
 
+ifdef CONFIG_VT
+DRIVERS := $(DRIVERS) drivers/video/video.a
+endif
+
 include arch/$(ARCH)/Makefile
 
 ifdef SMP
@@ -310,6 +314,7 @@
 	if [ -f SCSI_MODULES  ]; then inst_mod SCSI_MODULES  scsi;  fi; \
 	if [ -f FS_MODULES    ]; then inst_mod FS_MODULES    fs;    fi; \
 	if [ -f CDROM_MODULES ]; then inst_mod CDROM_MODULES cdrom; fi; \
+	if [ -f VIDEO_MODULES ]; then inst_mod VIDEO_MODULES video; fi; \
 	\
 	ls *.o > .allmods; \
 	echo $$MODULES | tr ' ' '\n' | sort | comm -23 .allmods - > .misc; \

Greetings,

						Geert

--
Geert Uytterhoeven                     Geert.Uytterhoeven@cs.kuleuven.ac.be
Wavelets, Linux/m68k on Amiga          http://www.cs.kuleuven.ac.be/~geert/
Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium

