Home | History | Annotate | Line # | Download | only in dev
grfabs_ccglb.c revision 1.9.26.1
      1  1.9.26.1  nathanw /*	$NetBSD: grfabs_ccglb.c,v 1.9.26.1 2002/02/28 04:06:43 nathanw Exp $ */
      2       1.6      cgd 
      3       1.1   chopps /*
      4       1.1   chopps  * Copyright (c) 1994 Christian E. Hopps
      5       1.1   chopps  * All rights reserved.
      6       1.1   chopps  *
      7       1.1   chopps  * Redistribution and use in source and binary forms, with or without
      8       1.1   chopps  * modification, are permitted provided that the following conditions
      9       1.1   chopps  * are met:
     10       1.1   chopps  * 1. Redistributions of source code must retain the above copyright
     11       1.1   chopps  *    notice, this list of conditions and the following disclaimer.
     12       1.1   chopps  * 2. Redistributions in binary form must reproduce the above copyright
     13       1.1   chopps  *    notice, this list of conditions and the following disclaimer in the
     14       1.1   chopps  *    documentation and/or other materials provided with the distribution.
     15       1.1   chopps  * 3. All advertising materials mentioning features or use of this software
     16       1.1   chopps  *    must display the following acknowledgement:
     17       1.1   chopps  *      This product includes software developed by Christian E. Hopps.
     18       1.1   chopps  * 4. The name of the author may not be used to endorse or promote products
     19       1.1   chopps  *    derived from this software without specific prior written permission
     20       1.1   chopps  *
     21       1.1   chopps  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     22       1.1   chopps  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     23       1.1   chopps  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     24       1.1   chopps  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     25       1.1   chopps  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     26       1.1   chopps  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     27       1.1   chopps  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     28       1.1   chopps  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     29       1.1   chopps  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     30       1.1   chopps  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     31       1.1   chopps  */
     32       1.9       is 
     33       1.9       is #include "opt_amigaccgrf.h"
     34       1.1   chopps 
     35  1.9.26.1  nathanw #include <sys/cdefs.h>
     36  1.9.26.1  nathanw __KERNEL_RCSID(0, "$NetBSD: grfabs_ccglb.c,v 1.9.26.1 2002/02/28 04:06:43 nathanw Exp $");
     37  1.9.26.1  nathanw 
     38       1.1   chopps #include <sys/types.h>
     39       1.3   chopps #include <sys/queue.h>
     40       1.3   chopps 
     41       1.1   chopps #include <amiga/amiga/cc.h>
     42       1.1   chopps #include <amiga/dev/grfabs_reg.h>
     43       1.1   chopps #include <amiga/dev/grfabs_ccreg.h>
     44       1.1   chopps 
     45       1.1   chopps /* the custom thips monitor */
     46       1.1   chopps monitor_t *cc_monitor;
     47       1.1   chopps 
     48       1.1   chopps cop_t std_copper_list[] = {
     49       1.8   mhitch     {{{ CI_WAIT (0, 12), 0xfffe }}},
     50       1.7   chopps #if defined (GRF_ECS) || defined (GRF_AGA)
     51       1.4   chopps #if defined (GRF_AGA)
     52       1.8   mhitch     {{{ R_FMODE, 0x0000 }}},
     53       1.4   chopps #endif
     54       1.8   mhitch     {{{ R_BEAMCON0, 0x0000 }}},
     55       1.8   mhitch     {{{ R_BPLCON3, 0x0020 }}},			  /* enable border blank */
     56       1.1   chopps #endif
     57       1.1   chopps     /* bit plane pointers */
     58       1.8   mhitch     {{{ R_BPL0PTH, 0x0000 }}},    {{{ R_BPL0PTL, 0x0000 }}},
     59       1.8   mhitch     {{{ R_BPL1PTH, 0x0000 }}},    {{{ R_BPL1PTL, 0x0000 }}},
     60       1.8   mhitch     {{{ R_BPL2PTH, 0x0000 }}},    {{{ R_BPL2PTL, 0x0000 }}},
     61       1.8   mhitch     {{{ R_BPL3PTH, 0x0000 }}},    {{{ R_BPL3PTL, 0x0000 }}},
     62       1.8   mhitch     {{{ R_BPL4PTH, 0x0000 }}},    {{{ R_BPL4PTL, 0x0000 }}},
     63       1.8   mhitch     {{{ R_BPL5PTH, 0x0000 }}},    {{{ R_BPL5PTL, 0x0000 }}},
     64       1.8   mhitch     {{{ R_BPL6PTH, 0x0000 }}},    {{{ R_BPL6PTL, 0x0000 }}},
     65       1.8   mhitch     {{{ R_BPL7PTH, 0x0000 }}},    {{{ R_BPL7PTL, 0x0000 }}},
     66       1.1   chopps     /* view specific stuff. */
     67       1.8   mhitch     {{{ R_BPL1MOD, 0x0000 }}},
     68       1.8   mhitch     {{{ R_BPL2MOD, 0x0000 }}},
     69       1.8   mhitch     {{{ R_DIWSTRT, 0xffff }}},
     70       1.8   mhitch     {{{ R_BPLCON0, 0x0000 }}},
     71       1.8   mhitch     {{{ R_DIWSTOP, 0x0000 }}},
     72       1.7   chopps #if defined (GRF_ECS) || defined (GRF_AGA)
     73       1.8   mhitch     {{{ R_DIWHIGH, 0x0000 }}},
     74  1.9.26.1  nathanw #endif
     75       1.8   mhitch     {{{ R_DDFSTRT, 0x0000 }}},
     76       1.8   mhitch     {{{ R_DDFSTOP, 0x0000 }}},
     77       1.8   mhitch     {{{ R_BPLCON1, 0x0000 }}},
     78       1.1   chopps     /* colors */
     79       1.8   mhitch     {{{ R_COLOR00, 0x0779 }}},    {{{ R_COLOR01, 0x0000 }}},
     80       1.8   mhitch     {{{ R_COLOR02, 0x0FFF }}},    {{{ R_COLOR03, 0x068B }}},
     81       1.8   mhitch     {{{ R_COLOR04, 0x000f }}},    {{{ R_COLOR05, 0x0f0f }}},
     82       1.8   mhitch     {{{ R_COLOR06, 0x00ff }}},    {{{ R_COLOR07, 0x0fff }}},
     83       1.8   mhitch     {{{ R_COLOR08, 0x0620 }}},    {{{ R_COLOR09, 0x0e50 }}},
     84       1.8   mhitch     {{{ R_COLOR0A, 0x09f1 }}},    {{{ R_COLOR0B, 0x0eb0 }}},
     85       1.8   mhitch     {{{ R_COLOR0C, 0x055f }}},    {{{ R_COLOR0D, 0x092f }}},
     86       1.8   mhitch     {{{ R_COLOR0E, 0x00f8 }}},    {{{ R_COLOR0F, 0x0ccc }}},
     87       1.8   mhitch     {{{ R_COLOR10, 0x0e44 }}},    {{{ R_COLOR11, 0x0e44 }}},
     88       1.8   mhitch     {{{ R_COLOR12, 0x0000 }}},    {{{ R_COLOR13, 0x0eec }}},
     89       1.8   mhitch     {{{ R_COLOR14, 0x0444 }}},    {{{ R_COLOR15, 0x0555 }}},
     90       1.8   mhitch     {{{ R_COLOR16, 0x0666 }}},    {{{ R_COLOR17, 0x0777 }}},
     91       1.8   mhitch     {{{ R_COLOR18, 0x0888 }}},    {{{ R_COLOR19, 0x0999 }}},
     92       1.8   mhitch     {{{ R_COLOR1A, 0x0aaa }}},    {{{ R_COLOR1B, 0x0bbb }}},
     93       1.8   mhitch     {{{ R_COLOR1C, 0x0ccc }}},    {{{ R_COLOR1D, 0x0ddd }}},
     94       1.8   mhitch     {{{ R_COLOR1E, 0x0eee }}},    {{{ R_COLOR1F, 0x0fff }}},
     95       1.8   mhitch     {{{ R_COP1LCH, 0x0000 }}},    {{{ R_COP1LCL, 0x0000 }}},
     96       1.8   mhitch     {{{ 0xffff, 0xfffe }}},       {{{ 0xffff, 0xfffe }}}  /* COPEND, COPEND */
     97       1.1   chopps };
     98       1.1   chopps 
     99       1.1   chopps /* standard custom chips copper list. */
    100       1.1   chopps int std_copper_list_len = sizeof (std_copper_list) / sizeof (cop_t);
    101       1.1   chopps int std_copper_list_size = sizeof (std_copper_list);
    102       1.1   chopps 
    103       1.1   chopps 
    104       1.4   chopps #ifdef GRF_AGA
    105       1.4   chopps cop_t aga_copper_list[] = {
    106       1.8   mhitch     {{{ CI_WAIT (0, 12), 0xfffe }}},
    107       1.8   mhitch     {{{ R_FMODE, 0x0000 }}},
    108       1.8   mhitch     {{{ R_HTOTAL, 0x0071 }}},
    109       1.8   mhitch     {{{ R_HBSTRT, 0x0008 }}},
    110       1.8   mhitch     {{{ R_HBSTOP, 0x001c }}},
    111       1.8   mhitch     {{{ R_HSSTRT, 0x000c }}},
    112       1.8   mhitch     {{{ R_HSSTOP, 0x001e }}},
    113       1.8   mhitch     {{{ R_HCENTER, 0x0046 }}},
    114       1.8   mhitch     {{{ R_VSSTRT, 0x0001 }}},
    115       1.8   mhitch     {{{ R_VSSTOP, 0x0003 }}},
    116       1.8   mhitch     {{{ R_VBSTRT, 0x0000 }}},
    117       1.8   mhitch     {{{ R_VBSTOP, 0x000f }}},
    118       1.8   mhitch     {{{ R_VTOTAL, 0x020c }}},
    119       1.8   mhitch     {{{ R_BEAMCON0, 0x0000 }}},
    120       1.5   chopps     /* bit plane pointers */
    121       1.8   mhitch     {{{ R_BPL0PTH, 0x0000 }}},    {{{ R_BPL0PTL, 0x0000 }}},
    122       1.8   mhitch     {{{ R_BPL1PTH, 0x0000 }}},    {{{ R_BPL1PTL, 0x0000 }}},
    123       1.8   mhitch     {{{ R_BPL2PTH, 0x0000 }}},    {{{ R_BPL2PTL, 0x0000 }}},
    124       1.8   mhitch     {{{ R_BPL3PTH, 0x0000 }}},    {{{ R_BPL3PTL, 0x0000 }}},
    125       1.8   mhitch     {{{ R_BPL4PTH, 0x0000 }}},    {{{ R_BPL4PTL, 0x0000 }}},
    126       1.8   mhitch     {{{ R_BPL5PTH, 0x0000 }}},    {{{ R_BPL5PTL, 0x0000 }}},
    127       1.8   mhitch     {{{ R_BPL6PTH, 0x0000 }}},    {{{ R_BPL6PTL, 0x0000 }}},
    128       1.8   mhitch     {{{ R_BPL7PTH, 0x0000 }}},    {{{ R_BPL7PTL, 0x0000 }}},
    129       1.5   chopps     /* view specific stuff. */
    130       1.8   mhitch     {{{ R_BPL1MOD, 0x0000 }}},
    131       1.8   mhitch     {{{ R_BPL2MOD, 0x0000 }}},
    132       1.8   mhitch     {{{ R_DIWSTRT, 0xffff }}},
    133       1.8   mhitch     {{{ R_BPLCON0, 0x0000 }}},
    134       1.8   mhitch     {{{ R_DIWSTOP, 0x0000 }}},
    135       1.8   mhitch     {{{ R_DIWHIGH, 0x0000 }}},
    136       1.8   mhitch     {{{ R_DDFSTRT, 0x0000 }}},
    137       1.8   mhitch     {{{ R_DDFSTOP, 0x0000 }}},
    138       1.8   mhitch     {{{ R_BPLCON1, 0x0000 }}},
    139       1.4   chopps      /* colors - bank 0 high */
    140       1.8   mhitch     {{{ R_BPLCON3, 0x0020 }}},
    141       1.8   mhitch     {{{ R_COLOR00, 0x0779 }}},    {{{ R_COLOR01, 0x0000 }}},
    142       1.8   mhitch     {{{ R_COLOR02, 0x0FFF }}},    {{{ R_COLOR03, 0x068B }}},
    143       1.8   mhitch     {{{ R_COLOR04, 0x000f }}},    {{{ R_COLOR05, 0x0f0f }}},
    144       1.8   mhitch     {{{ R_COLOR06, 0x00ff }}},    {{{ R_COLOR07, 0x0fff }}},
    145       1.8   mhitch     {{{ R_COLOR08, 0x0620 }}},    {{{ R_COLOR09, 0x0e50 }}},
    146       1.8   mhitch     {{{ R_COLOR0A, 0x09f1 }}},    {{{ R_COLOR0B, 0x0eb0 }}},
    147       1.8   mhitch     {{{ R_COLOR0C, 0x055f }}},    {{{ R_COLOR0D, 0x092f }}},
    148       1.8   mhitch     {{{ R_COLOR0E, 0x00f8 }}},    {{{ R_COLOR0F, 0x0ccc }}},
    149       1.8   mhitch     {{{ R_COLOR10, 0x0e44 }}},    {{{ R_COLOR11, 0x0e44 }}},
    150       1.8   mhitch     {{{ R_COLOR12, 0x0000 }}},    {{{ R_COLOR13, 0x0eec }}},
    151       1.8   mhitch     {{{ R_COLOR14, 0x0444 }}},    {{{ R_COLOR15, 0x0555 }}},
    152       1.8   mhitch     {{{ R_COLOR16, 0x0666 }}},    {{{ R_COLOR17, 0x0777 }}},
    153       1.8   mhitch     {{{ R_COLOR18, 0x0888 }}},    {{{ R_COLOR19, 0x0999 }}},
    154       1.8   mhitch     {{{ R_COLOR1A, 0x0aaa }}},    {{{ R_COLOR1B, 0x0bbb }}},
    155       1.8   mhitch     {{{ R_COLOR1C, 0x0ccc }}},    {{{ R_COLOR1D, 0x0ddd }}},
    156       1.8   mhitch     {{{ R_COLOR1E, 0x0eee }}},    {{{ R_COLOR1F, 0x0fff }}},
    157       1.4   chopps     /* colors - bank 0 low */
    158       1.8   mhitch     {{{ R_BPLCON3, 0x0220 }}},
    159       1.8   mhitch     {{{ R_COLOR00, 0x0779 }}},    {{{ R_COLOR01, 0x0000 }}},
    160       1.8   mhitch     {{{ R_COLOR02, 0x0FFF }}},    {{{ R_COLOR03, 0x068B }}},
    161       1.8   mhitch     {{{ R_COLOR04, 0x000f }}},    {{{ R_COLOR05, 0x0f0f }}},
    162       1.8   mhitch     {{{ R_COLOR06, 0x00ff }}},    {{{ R_COLOR07, 0x0fff }}},
    163       1.8   mhitch     {{{ R_COLOR08, 0x0620 }}},    {{{ R_COLOR09, 0x0e50 }}},
    164       1.8   mhitch     {{{ R_COLOR0A, 0x09f1 }}},    {{{ R_COLOR0B, 0x0eb0 }}},
    165       1.8   mhitch     {{{ R_COLOR0C, 0x055f }}},    {{{ R_COLOR0D, 0x092f }}},
    166       1.8   mhitch     {{{ R_COLOR0E, 0x00f8 }}},    {{{ R_COLOR0F, 0x0ccc }}},
    167       1.8   mhitch     {{{ R_COLOR10, 0x0e44 }}},    {{{ R_COLOR11, 0x0e44 }}},
    168       1.8   mhitch     {{{ R_COLOR12, 0x0000 }}},    {{{ R_COLOR13, 0x0eec }}},
    169       1.8   mhitch     {{{ R_COLOR14, 0x0444 }}},    {{{ R_COLOR15, 0x0555 }}},
    170       1.8   mhitch     {{{ R_COLOR16, 0x0666 }}},    {{{ R_COLOR17, 0x0777 }}},
    171       1.8   mhitch     {{{ R_COLOR18, 0x0888 }}},    {{{ R_COLOR19, 0x0999 }}},
    172       1.8   mhitch     {{{ R_COLOR1A, 0x0aaa }}},    {{{ R_COLOR1B, 0x0bbb }}},
    173       1.8   mhitch     {{{ R_COLOR1C, 0x0ccc }}},    {{{ R_COLOR1D, 0x0ddd }}},
    174       1.8   mhitch     {{{ R_COLOR1E, 0x0eee }}},    {{{ R_COLOR1F, 0x0fff }}},
    175       1.4   chopps     /* colors - bank 1 high */
    176       1.8   mhitch     {{{ R_BPLCON3, 0x2020 }}},
    177       1.8   mhitch     {{{ R_COLOR00, 0x0779 }}},    {{{ R_COLOR01, 0x0000 }}},
    178       1.8   mhitch     {{{ R_COLOR02, 0x0FFF }}},    {{{ R_COLOR03, 0x068B }}},
    179       1.8   mhitch     {{{ R_COLOR04, 0x000f }}},    {{{ R_COLOR05, 0x0f0f }}},
    180       1.8   mhitch     {{{ R_COLOR06, 0x00ff }}},    {{{ R_COLOR07, 0x0fff }}},
    181       1.8   mhitch     {{{ R_COLOR08, 0x0620 }}},    {{{ R_COLOR09, 0x0e50 }}},
    182       1.8   mhitch     {{{ R_COLOR0A, 0x09f1 }}},    {{{ R_COLOR0B, 0x0eb0 }}},
    183       1.8   mhitch     {{{ R_COLOR0C, 0x055f }}},    {{{ R_COLOR0D, 0x092f }}},
    184       1.8   mhitch     {{{ R_COLOR0E, 0x00f8 }}},    {{{ R_COLOR0F, 0x0ccc }}},
    185       1.8   mhitch     {{{ R_COLOR10, 0x0e44 }}},    {{{ R_COLOR11, 0x0e44 }}},
    186       1.8   mhitch     {{{ R_COLOR12, 0x0000 }}},    {{{ R_COLOR13, 0x0eec }}},
    187       1.8   mhitch     {{{ R_COLOR14, 0x0444 }}},    {{{ R_COLOR15, 0x0555 }}},
    188       1.8   mhitch     {{{ R_COLOR16, 0x0666 }}},    {{{ R_COLOR17, 0x0777 }}},
    189       1.8   mhitch     {{{ R_COLOR18, 0x0888 }}},    {{{ R_COLOR19, 0x0999 }}},
    190       1.8   mhitch     {{{ R_COLOR1A, 0x0aaa }}},    {{{ R_COLOR1B, 0x0bbb }}},
    191       1.8   mhitch     {{{ R_COLOR1C, 0x0ccc }}},    {{{ R_COLOR1D, 0x0ddd }}},
    192       1.8   mhitch     {{{ R_COLOR1E, 0x0eee }}},    {{{ R_COLOR1F, 0x0fff }}},
    193       1.4   chopps     /* colors - bank 1 low */
    194       1.8   mhitch     {{{ R_BPLCON3, 0x2220 }}},
    195       1.8   mhitch     {{{ R_COLOR00, 0x0779 }}},    {{{ R_COLOR01, 0x0000 }}},
    196       1.8   mhitch     {{{ R_COLOR02, 0x0FFF }}},    {{{ R_COLOR03, 0x068B }}},
    197       1.8   mhitch     {{{ R_COLOR04, 0x000f }}},    {{{ R_COLOR05, 0x0f0f }}},
    198       1.8   mhitch     {{{ R_COLOR06, 0x00ff }}},    {{{ R_COLOR07, 0x0fff }}},
    199       1.8   mhitch     {{{ R_COLOR08, 0x0620 }}},    {{{ R_COLOR09, 0x0e50 }}},
    200       1.8   mhitch     {{{ R_COLOR0A, 0x09f1 }}},    {{{ R_COLOR0B, 0x0eb0 }}},
    201       1.8   mhitch     {{{ R_COLOR0C, 0x055f }}},    {{{ R_COLOR0D, 0x092f }}},
    202       1.8   mhitch     {{{ R_COLOR0E, 0x00f8 }}},    {{{ R_COLOR0F, 0x0ccc }}},
    203       1.8   mhitch     {{{ R_COLOR10, 0x0e44 }}},    {{{ R_COLOR11, 0x0e44 }}},
    204       1.8   mhitch     {{{ R_COLOR12, 0x0000 }}},    {{{ R_COLOR13, 0x0eec }}},
    205       1.8   mhitch     {{{ R_COLOR14, 0x0444 }}},    {{{ R_COLOR15, 0x0555 }}},
    206       1.8   mhitch     {{{ R_COLOR16, 0x0666 }}},    {{{ R_COLOR17, 0x0777 }}},
    207       1.8   mhitch     {{{ R_COLOR18, 0x0888 }}},    {{{ R_COLOR19, 0x0999 }}},
    208       1.8   mhitch     {{{ R_COLOR1A, 0x0aaa }}},    {{{ R_COLOR1B, 0x0bbb }}},
    209       1.8   mhitch     {{{ R_COLOR1C, 0x0ccc }}},    {{{ R_COLOR1D, 0x0ddd }}},
    210       1.8   mhitch     {{{ R_COLOR1E, 0x0eee }}},    {{{ R_COLOR1F, 0x0fff }}},
    211       1.4   chopps     /* colors - bank 2 high */
    212       1.8   mhitch     {{{ R_BPLCON3, 0x4020 }}},
    213       1.8   mhitch     {{{ R_COLOR00, 0x0779 }}},    {{{ R_COLOR01, 0x0000 }}},
    214       1.8   mhitch     {{{ R_COLOR02, 0x0FFF }}},    {{{ R_COLOR03, 0x068B }}},
    215       1.8   mhitch     {{{ R_COLOR04, 0x000f }}},    {{{ R_COLOR05, 0x0f0f }}},
    216       1.8   mhitch     {{{ R_COLOR06, 0x00ff }}},    {{{ R_COLOR07, 0x0fff }}},
    217       1.8   mhitch     {{{ R_COLOR08, 0x0620 }}},    {{{ R_COLOR09, 0x0e50 }}},
    218       1.8   mhitch     {{{ R_COLOR0A, 0x09f1 }}},    {{{ R_COLOR0B, 0x0eb0 }}},
    219       1.8   mhitch     {{{ R_COLOR0C, 0x055f }}},    {{{ R_COLOR0D, 0x092f }}},
    220       1.8   mhitch     {{{ R_COLOR0E, 0x00f8 }}},    {{{ R_COLOR0F, 0x0ccc }}},
    221       1.8   mhitch     {{{ R_COLOR10, 0x0e44 }}},    {{{ R_COLOR11, 0x0e44 }}},
    222       1.8   mhitch     {{{ R_COLOR12, 0x0000 }}},    {{{ R_COLOR13, 0x0eec }}},
    223       1.8   mhitch     {{{ R_COLOR14, 0x0444 }}},    {{{ R_COLOR15, 0x0555 }}},
    224       1.8   mhitch     {{{ R_COLOR16, 0x0666 }}},    {{{ R_COLOR17, 0x0777 }}},
    225       1.8   mhitch     {{{ R_COLOR18, 0x0888 }}},    {{{ R_COLOR19, 0x0999 }}},
    226       1.8   mhitch     {{{ R_COLOR1A, 0x0aaa }}},    {{{ R_COLOR1B, 0x0bbb }}},
    227       1.8   mhitch     {{{ R_COLOR1C, 0x0ccc }}},    {{{ R_COLOR1D, 0x0ddd }}},
    228       1.8   mhitch     {{{ R_COLOR1E, 0x0eee }}},    {{{ R_COLOR1F, 0x0fff }}},
    229       1.4   chopps     /* colors - bank 2 low */
    230       1.8   mhitch     {{{ R_BPLCON3, 0x4220 }}},
    231       1.8   mhitch     {{{ R_COLOR00, 0x0779 }}},    {{{ R_COLOR01, 0x0000 }}},
    232       1.8   mhitch     {{{ R_COLOR02, 0x0FFF }}},    {{{ R_COLOR03, 0x068B }}},
    233       1.8   mhitch     {{{ R_COLOR04, 0x000f }}},    {{{ R_COLOR05, 0x0f0f }}},
    234       1.8   mhitch     {{{ R_COLOR06, 0x00ff }}},    {{{ R_COLOR07, 0x0fff }}},
    235       1.8   mhitch     {{{ R_COLOR08, 0x0620 }}},    {{{ R_COLOR09, 0x0e50 }}},
    236       1.8   mhitch     {{{ R_COLOR0A, 0x09f1 }}},    {{{ R_COLOR0B, 0x0eb0 }}},
    237       1.8   mhitch     {{{ R_COLOR0C, 0x055f }}},    {{{ R_COLOR0D, 0x092f }}},
    238       1.8   mhitch     {{{ R_COLOR0E, 0x00f8 }}},    {{{ R_COLOR0F, 0x0ccc }}},
    239       1.8   mhitch     {{{ R_COLOR10, 0x0e44 }}},    {{{ R_COLOR11, 0x0e44 }}},
    240       1.8   mhitch     {{{ R_COLOR12, 0x0000 }}},    {{{ R_COLOR13, 0x0eec }}},
    241       1.8   mhitch     {{{ R_COLOR14, 0x0444 }}},    {{{ R_COLOR15, 0x0555 }}},
    242       1.8   mhitch     {{{ R_COLOR16, 0x0666 }}},    {{{ R_COLOR17, 0x0777 }}},
    243       1.8   mhitch     {{{ R_COLOR18, 0x0888 }}},    {{{ R_COLOR19, 0x0999 }}},
    244       1.8   mhitch     {{{ R_COLOR1A, 0x0aaa }}},    {{{ R_COLOR1B, 0x0bbb }}},
    245       1.8   mhitch     {{{ R_COLOR1C, 0x0ccc }}},    {{{ R_COLOR1D, 0x0ddd }}},
    246       1.8   mhitch     {{{ R_COLOR1E, 0x0eee }}},    {{{ R_COLOR1F, 0x0fff }}},
    247       1.4   chopps     /* colors - bank 3 high */
    248       1.8   mhitch     {{{ R_BPLCON3, 0x6020 }}},
    249       1.8   mhitch     {{{ R_COLOR00, 0x0779 }}},    {{{ R_COLOR01, 0x0000 }}},
    250       1.8   mhitch     {{{ R_COLOR02, 0x0FFF }}},    {{{ R_COLOR03, 0x068B }}},
    251       1.8   mhitch     {{{ R_COLOR04, 0x000f }}},    {{{ R_COLOR05, 0x0f0f }}},
    252       1.8   mhitch     {{{ R_COLOR06, 0x00ff }}},    {{{ R_COLOR07, 0x0fff }}},
    253       1.8   mhitch     {{{ R_COLOR08, 0x0620 }}},    {{{ R_COLOR09, 0x0e50 }}},
    254       1.8   mhitch     {{{ R_COLOR0A, 0x09f1 }}},    {{{ R_COLOR0B, 0x0eb0 }}},
    255       1.8   mhitch     {{{ R_COLOR0C, 0x055f }}},    {{{ R_COLOR0D, 0x092f }}},
    256       1.8   mhitch     {{{ R_COLOR0E, 0x00f8 }}},    {{{ R_COLOR0F, 0x0ccc }}},
    257       1.8   mhitch     {{{ R_COLOR10, 0x0e44 }}},    {{{ R_COLOR11, 0x0e44 }}},
    258       1.8   mhitch     {{{ R_COLOR12, 0x0000 }}},    {{{ R_COLOR13, 0x0eec }}},
    259       1.8   mhitch     {{{ R_COLOR14, 0x0444 }}},    {{{ R_COLOR15, 0x0555 }}},
    260       1.8   mhitch     {{{ R_COLOR16, 0x0666 }}},    {{{ R_COLOR17, 0x0777 }}},
    261       1.8   mhitch     {{{ R_COLOR18, 0x0888 }}},    {{{ R_COLOR19, 0x0999 }}},
    262       1.8   mhitch     {{{ R_COLOR1A, 0x0aaa }}},    {{{ R_COLOR1B, 0x0bbb }}},
    263       1.8   mhitch     {{{ R_COLOR1C, 0x0ccc }}},    {{{ R_COLOR1D, 0x0ddd }}},
    264       1.8   mhitch     {{{ R_COLOR1E, 0x0eee }}},    {{{ R_COLOR1F, 0x0fff }}},
    265       1.4   chopps     /* colors - bank 3 low */
    266       1.8   mhitch     {{{ R_BPLCON3, 0x6220 }}},
    267       1.8   mhitch     {{{ R_COLOR00, 0x0779 }}},    {{{ R_COLOR01, 0x0000 }}},
    268       1.8   mhitch     {{{ R_COLOR02, 0x0FFF }}},    {{{ R_COLOR03, 0x068B }}},
    269       1.8   mhitch     {{{ R_COLOR04, 0x000f }}},    {{{ R_COLOR05, 0x0f0f }}},
    270       1.8   mhitch     {{{ R_COLOR06, 0x00ff }}},    {{{ R_COLOR07, 0x0fff }}},
    271       1.8   mhitch     {{{ R_COLOR08, 0x0620 }}},    {{{ R_COLOR09, 0x0e50 }}},
    272       1.8   mhitch     {{{ R_COLOR0A, 0x09f1 }}},    {{{ R_COLOR0B, 0x0eb0 }}},
    273       1.8   mhitch     {{{ R_COLOR0C, 0x055f }}},    {{{ R_COLOR0D, 0x092f }}},
    274       1.8   mhitch     {{{ R_COLOR0E, 0x00f8 }}},    {{{ R_COLOR0F, 0x0ccc }}},
    275       1.8   mhitch     {{{ R_COLOR10, 0x0e44 }}},    {{{ R_COLOR11, 0x0e44 }}},
    276       1.8   mhitch     {{{ R_COLOR12, 0x0000 }}},    {{{ R_COLOR13, 0x0eec }}},
    277       1.8   mhitch     {{{ R_COLOR14, 0x0444 }}},    {{{ R_COLOR15, 0x0555 }}},
    278       1.8   mhitch     {{{ R_COLOR16, 0x0666 }}},    {{{ R_COLOR17, 0x0777 }}},
    279       1.8   mhitch     {{{ R_COLOR18, 0x0888 }}},    {{{ R_COLOR19, 0x0999 }}},
    280       1.8   mhitch     {{{ R_COLOR1A, 0x0aaa }}},    {{{ R_COLOR1B, 0x0bbb }}},
    281       1.8   mhitch     {{{ R_COLOR1C, 0x0ccc }}},    {{{ R_COLOR1D, 0x0ddd }}},
    282       1.8   mhitch     {{{ R_COLOR1E, 0x0eee }}},    {{{ R_COLOR1F, 0x0fff }}},
    283       1.4   chopps     /* colors - bank 4 high */
    284       1.8   mhitch     {{{ R_BPLCON3, 0x8020 }}},
    285       1.8   mhitch     {{{ R_COLOR00, 0x0779 }}},    {{{ R_COLOR01, 0x0000 }}},
    286       1.8   mhitch     {{{ R_COLOR02, 0x0FFF }}},    {{{ R_COLOR03, 0x068B }}},
    287       1.8   mhitch     {{{ R_COLOR04, 0x000f }}},    {{{ R_COLOR05, 0x0f0f }}},
    288       1.8   mhitch     {{{ R_COLOR06, 0x00ff }}},    {{{ R_COLOR07, 0x0fff }}},
    289       1.8   mhitch     {{{ R_COLOR08, 0x0620 }}},    {{{ R_COLOR09, 0x0e50 }}},
    290       1.8   mhitch     {{{ R_COLOR0A, 0x09f1 }}},    {{{ R_COLOR0B, 0x0eb0 }}},
    291       1.8   mhitch     {{{ R_COLOR0C, 0x055f }}},    {{{ R_COLOR0D, 0x092f }}},
    292       1.8   mhitch     {{{ R_COLOR0E, 0x00f8 }}},    {{{ R_COLOR0F, 0x0ccc }}},
    293       1.8   mhitch     {{{ R_COLOR10, 0x0e44 }}},    {{{ R_COLOR11, 0x0e44 }}},
    294       1.8   mhitch     {{{ R_COLOR12, 0x0000 }}},    {{{ R_COLOR13, 0x0eec }}},
    295       1.8   mhitch     {{{ R_COLOR14, 0x0444 }}},    {{{ R_COLOR15, 0x0555 }}},
    296       1.8   mhitch     {{{ R_COLOR16, 0x0666 }}},    {{{ R_COLOR17, 0x0777 }}},
    297       1.8   mhitch     {{{ R_COLOR18, 0x0888 }}},    {{{ R_COLOR19, 0x0999 }}},
    298       1.8   mhitch     {{{ R_COLOR1A, 0x0aaa }}},    {{{ R_COLOR1B, 0x0bbb }}},
    299       1.8   mhitch     {{{ R_COLOR1C, 0x0ccc }}},    {{{ R_COLOR1D, 0x0ddd }}},
    300       1.8   mhitch     {{{ R_COLOR1E, 0x0eee }}},    {{{ R_COLOR1F, 0x0fff }}},
    301       1.4   chopps     /* colors - bank 4 low */
    302       1.8   mhitch     {{{ R_BPLCON3, 0x8220 }}},
    303       1.8   mhitch     {{{ R_COLOR00, 0x0779 }}},    {{{ R_COLOR01, 0x0000 }}},
    304       1.8   mhitch     {{{ R_COLOR02, 0x0FFF }}},    {{{ R_COLOR03, 0x068B }}},
    305       1.8   mhitch     {{{ R_COLOR04, 0x000f }}},    {{{ R_COLOR05, 0x0f0f }}},
    306       1.8   mhitch     {{{ R_COLOR06, 0x00ff }}},    {{{ R_COLOR07, 0x0fff }}},
    307       1.8   mhitch     {{{ R_COLOR08, 0x0620 }}},    {{{ R_COLOR09, 0x0e50 }}},
    308       1.8   mhitch     {{{ R_COLOR0A, 0x09f1 }}},    {{{ R_COLOR0B, 0x0eb0 }}},
    309       1.8   mhitch     {{{ R_COLOR0C, 0x055f }}},    {{{ R_COLOR0D, 0x092f }}},
    310       1.8   mhitch     {{{ R_COLOR0E, 0x00f8 }}},    {{{ R_COLOR0F, 0x0ccc }}},
    311       1.8   mhitch     {{{ R_COLOR10, 0x0e44 }}},    {{{ R_COLOR11, 0x0e44 }}},
    312       1.8   mhitch     {{{ R_COLOR12, 0x0000 }}},    {{{ R_COLOR13, 0x0eec }}},
    313       1.8   mhitch     {{{ R_COLOR14, 0x0444 }}},    {{{ R_COLOR15, 0x0555 }}},
    314       1.8   mhitch     {{{ R_COLOR16, 0x0666 }}},    {{{ R_COLOR17, 0x0777 }}},
    315       1.8   mhitch     {{{ R_COLOR18, 0x0888 }}},    {{{ R_COLOR19, 0x0999 }}},
    316       1.8   mhitch     {{{ R_COLOR1A, 0x0aaa }}},    {{{ R_COLOR1B, 0x0bbb }}},
    317       1.8   mhitch     {{{ R_COLOR1C, 0x0ccc }}},    {{{ R_COLOR1D, 0x0ddd }}},
    318       1.8   mhitch     {{{ R_COLOR1E, 0x0eee }}},    {{{ R_COLOR1F, 0x0fff }}},
    319       1.4   chopps     /* colors - bank 5 high */
    320       1.8   mhitch     {{{ R_BPLCON3, 0xa020 }}},
    321       1.8   mhitch     {{{ R_COLOR00, 0x0779 }}},    {{{ R_COLOR01, 0x0000 }}},
    322       1.8   mhitch     {{{ R_COLOR02, 0x0FFF }}},    {{{ R_COLOR03, 0x068B }}},
    323       1.8   mhitch     {{{ R_COLOR04, 0x000f }}},    {{{ R_COLOR05, 0x0f0f }}},
    324       1.8   mhitch     {{{ R_COLOR06, 0x00ff }}},    {{{ R_COLOR07, 0x0fff }}},
    325       1.8   mhitch     {{{ R_COLOR08, 0x0620 }}},    {{{ R_COLOR09, 0x0e50 }}},
    326       1.8   mhitch     {{{ R_COLOR0A, 0x09f1 }}},    {{{ R_COLOR0B, 0x0eb0 }}},
    327       1.8   mhitch     {{{ R_COLOR0C, 0x055f }}},    {{{ R_COLOR0D, 0x092f }}},
    328       1.8   mhitch     {{{ R_COLOR0E, 0x00f8 }}},    {{{ R_COLOR0F, 0x0ccc }}},
    329       1.8   mhitch     {{{ R_COLOR10, 0x0e44 }}},    {{{ R_COLOR11, 0x0e44 }}},
    330       1.8   mhitch     {{{ R_COLOR12, 0x0000 }}},    {{{ R_COLOR13, 0x0eec }}},
    331       1.8   mhitch     {{{ R_COLOR14, 0x0444 }}},    {{{ R_COLOR15, 0x0555 }}},
    332       1.8   mhitch     {{{ R_COLOR16, 0x0666 }}},    {{{ R_COLOR17, 0x0777 }}},
    333       1.8   mhitch     {{{ R_COLOR18, 0x0888 }}},    {{{ R_COLOR19, 0x0999 }}},
    334       1.8   mhitch     {{{ R_COLOR1A, 0x0aaa }}},    {{{ R_COLOR1B, 0x0bbb }}},
    335       1.8   mhitch     {{{ R_COLOR1C, 0x0ccc }}},    {{{ R_COLOR1D, 0x0ddd }}},
    336       1.8   mhitch     {{{ R_COLOR1E, 0x0eee }}},    {{{ R_COLOR1F, 0x0fff }}},
    337       1.4   chopps     /* colors - bank 5 low */
    338       1.8   mhitch     {{{ R_BPLCON3, 0xa220 }}},
    339       1.8   mhitch     {{{ R_COLOR00, 0x0779 }}},    {{{ R_COLOR01, 0x0000 }}},
    340       1.8   mhitch     {{{ R_COLOR02, 0x0FFF }}},    {{{ R_COLOR03, 0x068B }}},
    341       1.8   mhitch     {{{ R_COLOR04, 0x000f }}},    {{{ R_COLOR05, 0x0f0f }}},
    342       1.8   mhitch     {{{ R_COLOR06, 0x00ff }}},    {{{ R_COLOR07, 0x0fff }}},
    343       1.8   mhitch     {{{ R_COLOR08, 0x0620 }}},    {{{ R_COLOR09, 0x0e50 }}},
    344       1.8   mhitch     {{{ R_COLOR0A, 0x09f1 }}},    {{{ R_COLOR0B, 0x0eb0 }}},
    345       1.8   mhitch     {{{ R_COLOR0C, 0x055f }}},    {{{ R_COLOR0D, 0x092f }}},
    346       1.8   mhitch     {{{ R_COLOR0E, 0x00f8 }}},    {{{ R_COLOR0F, 0x0ccc }}},
    347       1.8   mhitch     {{{ R_COLOR10, 0x0e44 }}},    {{{ R_COLOR11, 0x0e44 }}},
    348       1.8   mhitch     {{{ R_COLOR12, 0x0000 }}},    {{{ R_COLOR13, 0x0eec }}},
    349       1.8   mhitch     {{{ R_COLOR14, 0x0444 }}},    {{{ R_COLOR15, 0x0555 }}},
    350       1.8   mhitch     {{{ R_COLOR16, 0x0666 }}},    {{{ R_COLOR17, 0x0777 }}},
    351       1.8   mhitch     {{{ R_COLOR18, 0x0888 }}},    {{{ R_COLOR19, 0x0999 }}},
    352       1.8   mhitch     {{{ R_COLOR1A, 0x0aaa }}},    {{{ R_COLOR1B, 0x0bbb }}},
    353       1.8   mhitch     {{{ R_COLOR1C, 0x0ccc }}},    {{{ R_COLOR1D, 0x0ddd }}},
    354       1.8   mhitch     {{{ R_COLOR1E, 0x0eee }}},    {{{ R_COLOR1F, 0x0fff }}},
    355       1.4   chopps     /* colors - bank 6 high */
    356       1.8   mhitch     {{{ R_BPLCON3, 0xc020 }}},
    357       1.8   mhitch     {{{ R_COLOR00, 0x0779 }}},    {{{ R_COLOR01, 0x0000 }}},
    358       1.8   mhitch     {{{ R_COLOR02, 0x0FFF }}},    {{{ R_COLOR03, 0x068B }}},
    359       1.8   mhitch     {{{ R_COLOR04, 0x000f }}},    {{{ R_COLOR05, 0x0f0f }}},
    360       1.8   mhitch     {{{ R_COLOR06, 0x00ff }}},    {{{ R_COLOR07, 0x0fff }}},
    361       1.8   mhitch     {{{ R_COLOR08, 0x0620 }}},    {{{ R_COLOR09, 0x0e50 }}},
    362       1.8   mhitch     {{{ R_COLOR0A, 0x09f1 }}},    {{{ R_COLOR0B, 0x0eb0 }}},
    363       1.8   mhitch     {{{ R_COLOR0C, 0x055f }}},    {{{ R_COLOR0D, 0x092f }}},
    364       1.8   mhitch     {{{ R_COLOR0E, 0x00f8 }}},    {{{ R_COLOR0F, 0x0ccc }}},
    365       1.8   mhitch     {{{ R_COLOR10, 0x0e44 }}},    {{{ R_COLOR11, 0x0e44 }}},
    366       1.8   mhitch     {{{ R_COLOR12, 0x0000 }}},    {{{ R_COLOR13, 0x0eec }}},
    367       1.8   mhitch     {{{ R_COLOR14, 0x0444 }}},    {{{ R_COLOR15, 0x0555 }}},
    368       1.8   mhitch     {{{ R_COLOR16, 0x0666 }}},    {{{ R_COLOR17, 0x0777 }}},
    369       1.8   mhitch     {{{ R_COLOR18, 0x0888 }}},    {{{ R_COLOR19, 0x0999 }}},
    370       1.8   mhitch     {{{ R_COLOR1A, 0x0aaa }}},    {{{ R_COLOR1B, 0x0bbb }}},
    371       1.8   mhitch     {{{ R_COLOR1C, 0x0ccc }}},    {{{ R_COLOR1D, 0x0ddd }}},
    372       1.8   mhitch     {{{ R_COLOR1E, 0x0eee }}},    {{{ R_COLOR1F, 0x0fff }}},
    373       1.4   chopps     /* colors - bank 6 low */
    374       1.8   mhitch     {{{ R_BPLCON3, 0xc220 }}},
    375       1.8   mhitch     {{{ R_COLOR00, 0x0779 }}},    {{{ R_COLOR01, 0x0000 }}},
    376       1.8   mhitch     {{{ R_COLOR02, 0x0FFF }}},    {{{ R_COLOR03, 0x068B }}},
    377       1.8   mhitch     {{{ R_COLOR04, 0x000f }}},    {{{ R_COLOR05, 0x0f0f }}},
    378       1.8   mhitch     {{{ R_COLOR06, 0x00ff }}},    {{{ R_COLOR07, 0x0fff }}},
    379       1.8   mhitch     {{{ R_COLOR08, 0x0620 }}},    {{{ R_COLOR09, 0x0e50 }}},
    380       1.8   mhitch     {{{ R_COLOR0A, 0x09f1 }}},    {{{ R_COLOR0B, 0x0eb0 }}},
    381       1.8   mhitch     {{{ R_COLOR0C, 0x055f }}},    {{{ R_COLOR0D, 0x092f }}},
    382       1.8   mhitch     {{{ R_COLOR0E, 0x00f8 }}},    {{{ R_COLOR0F, 0x0ccc }}},
    383       1.8   mhitch     {{{ R_COLOR10, 0x0e44 }}},    {{{ R_COLOR11, 0x0e44 }}},
    384       1.8   mhitch     {{{ R_COLOR12, 0x0000 }}},    {{{ R_COLOR13, 0x0eec }}},
    385       1.8   mhitch     {{{ R_COLOR14, 0x0444 }}},    {{{ R_COLOR15, 0x0555 }}},
    386       1.8   mhitch     {{{ R_COLOR16, 0x0666 }}},    {{{ R_COLOR17, 0x0777 }}},
    387       1.8   mhitch     {{{ R_COLOR18, 0x0888 }}},    {{{ R_COLOR19, 0x0999 }}},
    388       1.8   mhitch     {{{ R_COLOR1A, 0x0aaa }}},    {{{ R_COLOR1B, 0x0bbb }}},
    389       1.8   mhitch     {{{ R_COLOR1C, 0x0ccc }}},    {{{ R_COLOR1D, 0x0ddd }}},
    390       1.8   mhitch     {{{ R_COLOR1E, 0x0eee }}},    {{{ R_COLOR1F, 0x0fff }}},
    391       1.4   chopps     /* colors - bank 7 high */
    392       1.8   mhitch     {{{ R_BPLCON3, 0xe020 }}},
    393       1.8   mhitch     {{{ R_COLOR00, 0x0779 }}},    {{{ R_COLOR01, 0x0000 }}},
    394       1.8   mhitch     {{{ R_COLOR02, 0x0FFF }}},    {{{ R_COLOR03, 0x068B }}},
    395       1.8   mhitch     {{{ R_COLOR04, 0x000f }}},    {{{ R_COLOR05, 0x0f0f }}},
    396       1.8   mhitch     {{{ R_COLOR06, 0x00ff }}},    {{{ R_COLOR07, 0x0fff }}},
    397       1.8   mhitch     {{{ R_COLOR08, 0x0620 }}},    {{{ R_COLOR09, 0x0e50 }}},
    398       1.8   mhitch     {{{ R_COLOR0A, 0x09f1 }}},    {{{ R_COLOR0B, 0x0eb0 }}},
    399       1.8   mhitch     {{{ R_COLOR0C, 0x055f }}},    {{{ R_COLOR0D, 0x092f }}},
    400       1.8   mhitch     {{{ R_COLOR0E, 0x00f8 }}},    {{{ R_COLOR0F, 0x0ccc }}},
    401       1.8   mhitch     {{{ R_COLOR10, 0x0e44 }}},    {{{ R_COLOR11, 0x0e44 }}},
    402       1.8   mhitch     {{{ R_COLOR12, 0x0000 }}},    {{{ R_COLOR13, 0x0eec }}},
    403       1.8   mhitch     {{{ R_COLOR14, 0x0444 }}},    {{{ R_COLOR15, 0x0555 }}},
    404       1.8   mhitch     {{{ R_COLOR16, 0x0666 }}},    {{{ R_COLOR17, 0x0777 }}},
    405       1.8   mhitch     {{{ R_COLOR18, 0x0888 }}},    {{{ R_COLOR19, 0x0999 }}},
    406       1.8   mhitch     {{{ R_COLOR1A, 0x0aaa }}},    {{{ R_COLOR1B, 0x0bbb }}},
    407       1.8   mhitch     {{{ R_COLOR1C, 0x0ccc }}},    {{{ R_COLOR1D, 0x0ddd }}},
    408       1.8   mhitch     {{{ R_COLOR1E, 0x0eee }}},    {{{ R_COLOR1F, 0x0fff }}},
    409       1.4   chopps     /* colors - bank 7 low */
    410       1.8   mhitch     {{{ R_BPLCON3, 0xe220 }}},
    411       1.8   mhitch     {{{ R_COLOR00, 0x0779 }}},    {{{ R_COLOR01, 0x0000 }}},
    412       1.8   mhitch     {{{ R_COLOR02, 0x0FFF }}},    {{{ R_COLOR03, 0x068B }}},
    413       1.8   mhitch     {{{ R_COLOR04, 0x000f }}},    {{{ R_COLOR05, 0x0f0f }}},
    414       1.8   mhitch     {{{ R_COLOR06, 0x00ff }}},    {{{ R_COLOR07, 0x0fff }}},
    415       1.8   mhitch     {{{ R_COLOR08, 0x0620 }}},    {{{ R_COLOR09, 0x0e50 }}},
    416       1.8   mhitch     {{{ R_COLOR0A, 0x09f1 }}},    {{{ R_COLOR0B, 0x0eb0 }}},
    417       1.8   mhitch     {{{ R_COLOR0C, 0x055f }}},    {{{ R_COLOR0D, 0x092f }}},
    418       1.8   mhitch     {{{ R_COLOR0E, 0x00f8 }}},    {{{ R_COLOR0F, 0x0ccc }}},
    419       1.8   mhitch     {{{ R_COLOR10, 0x0e44 }}},    {{{ R_COLOR11, 0x0e44 }}},
    420       1.8   mhitch     {{{ R_COLOR12, 0x0000 }}},    {{{ R_COLOR13, 0x0eec }}},
    421       1.8   mhitch     {{{ R_COLOR14, 0x0444 }}},    {{{ R_COLOR15, 0x0555 }}},
    422       1.8   mhitch     {{{ R_COLOR16, 0x0666 }}},    {{{ R_COLOR17, 0x0777 }}},
    423       1.8   mhitch     {{{ R_COLOR18, 0x0888 }}},    {{{ R_COLOR19, 0x0999 }}},
    424       1.8   mhitch     {{{ R_COLOR1A, 0x0aaa }}},    {{{ R_COLOR1B, 0x0bbb }}},
    425       1.8   mhitch     {{{ R_COLOR1C, 0x0ccc }}},    {{{ R_COLOR1D, 0x0ddd }}},
    426       1.8   mhitch     {{{ R_COLOR1E, 0x0eee }}},    {{{ R_COLOR1F, 0x0fff }}},
    427       1.4   chopps     /* colors - whew! */
    428       1.8   mhitch     {{{ R_BPLCON3, 0x0020 }}},			  /* enable border blank */
    429       1.8   mhitch     {{{ R_COP1LCH, 0x0000 }}},    {{{ R_COP1LCL, 0x0000 }}},
    430       1.8   mhitch     {{{ 0xffff, 0xfffe }}},       {{{ 0xffff, 0xfffe }}}  /* COPEND, COPEND */
    431       1.4   chopps };
    432       1.4   chopps 
    433       1.4   chopps /* AGA custom chips copper list. */
    434       1.4   chopps int aga_copper_list_len = sizeof (aga_copper_list) / sizeof (cop_t);
    435       1.4   chopps int aga_copper_list_size = sizeof (aga_copper_list);
    436       1.4   chopps #endif
    437       1.4   chopps 
    438       1.1   chopps #if defined (GRF_A2024)
    439       1.1   chopps cop_t std_dlace_copper_list[] = {
    440       1.8   mhitch     {{{ CI_WAIT(0,12), 0xfffe }}},			  /* WAIT (0, 12) */
    441       1.7   chopps #if defined (GRF_ECS) || defined (GRF_AGA)
    442       1.8   mhitch     {{{ R_BEAMCON0, 0x0000 }}},
    443       1.8   mhitch     {{{ R_BPLCON3, 0x0020 }}},			  /* enable border blank */
    444       1.1   chopps #endif
    445       1.1   chopps     /* colors */
    446       1.8   mhitch     {{{ R_COLOR00, 0x0000 }}},    {{{ R_COLOR01, 0x0000 }}},
    447       1.8   mhitch     {{{ R_COLOR02, 0x0000 }}},    {{{ R_COLOR03, 0x0000 }}},
    448       1.8   mhitch     {{{ R_COLOR04, 0x0000 }}},    {{{ R_COLOR05, 0x0000 }}},
    449       1.8   mhitch     {{{ R_COLOR06, 0x0000 }}},    {{{ R_COLOR07, 0x0000 }}},
    450       1.8   mhitch     {{{ R_COLOR08, 0x0000 }}},    {{{ R_COLOR09, 0x0000 }}},
    451       1.8   mhitch     {{{ R_COLOR0A, 0x0000 }}},    {{{ R_COLOR0B, 0x0000 }}},
    452       1.8   mhitch     {{{ R_COLOR0C, 0x0000 }}},    {{{ R_COLOR0D, 0x0000 }}},
    453       1.8   mhitch     {{{ R_COLOR0E, 0x0000 }}},    {{{ R_COLOR0F, 0x0000 }}},
    454       1.8   mhitch     {{{ R_COLOR10, 0x0009 }}},    {{{ R_COLOR11, 0x0009 }}},
    455       1.8   mhitch     {{{ R_COLOR12, 0x0001 }}},    {{{ R_COLOR13, 0x0809 }}},
    456       1.8   mhitch     {{{ R_COLOR14, 0x0009 }}},    {{{ R_COLOR15, 0x0009 }}},
    457       1.8   mhitch     {{{ R_COLOR16, 0x0001 }}},    {{{ R_COLOR17, 0x0809 }}},
    458       1.8   mhitch     {{{ R_COLOR18, 0x0008 }}},    {{{ R_COLOR19, 0x0008 }}},
    459       1.8   mhitch     {{{ R_COLOR1A, 0x0000 }}},    {{{ R_COLOR1B, 0x0808 }}},
    460       1.8   mhitch     {{{ R_COLOR1C, 0x0089 }}},    {{{ R_COLOR1D, 0x0089 }}},
    461       1.8   mhitch     {{{ R_COLOR1E, 0x0081 }}},    {{{ R_COLOR1F, 0x0889 }}},
    462       1.1   chopps     /* set the registers up. */
    463       1.8   mhitch     {{{ R_DIWSTRT, 0xffff }}},
    464       1.8   mhitch     {{{ R_BPLCON0, 0x0000 }}},
    465       1.8   mhitch     {{{ R_DIWSTOP, 0x0000 }}},
    466       1.7   chopps #if defined (GRF_ECS) || defined (GRF_AGA)
    467       1.8   mhitch     {{{ R_DIWHIGH, 0x0000 }}},
    468  1.9.26.1  nathanw #endif
    469       1.8   mhitch     {{{ R_DDFSTRT, 0x0000 }}},
    470       1.8   mhitch     {{{ R_DDFSTOP, 0x0000 }}},
    471       1.8   mhitch     {{{ R_BPLCON1, 0x0000 }}},
    472       1.1   chopps     /* view specific stuff. */
    473       1.8   mhitch     {{{ R_BPL1MOD, 0x0000 }}},
    474       1.8   mhitch     {{{ R_BPL2MOD, 0x0000 }}},
    475       1.1   chopps     /* bit plane pointers */
    476       1.8   mhitch     {{{ R_BPL0PTH, 0x0000 }}},    {{{ R_BPL0PTL, 0x0000 }}},
    477       1.8   mhitch     {{{ R_BPL1PTH, 0x0000 }}},    {{{ R_BPL1PTL, 0x0000 }}},
    478       1.8   mhitch     {{{ R_BPL2PTH, 0x0000 }}},    {{{ R_BPL2PTL, 0x0000 }}},
    479       1.8   mhitch     {{{ R_BPL3PTH, 0x0000 }}},    {{{ R_BPL3PTL, 0x0000 }}},
    480       1.4   chopps #if defined (GRF_AGA)
    481       1.8   mhitch     {{{ R_FMODE, 0x0000}}},
    482       1.4   chopps #endif
    483       1.8   mhitch     {{{ R_COP1LCH, 0x0000 }}},    {{{ R_COP1LCL, 0x0000 }}},
    484       1.8   mhitch     {{{ 0xffff, 0xfffe }}},       {{{ 0xffff, 0xfffe }}}  /* COPEND, COPEND */
    485       1.1   chopps };
    486       1.1   chopps int std_dlace_copper_list_len = sizeof (std_dlace_copper_list) / sizeof (cop_t);
    487       1.1   chopps int std_dlace_copper_list_size = sizeof (std_dlace_copper_list);
    488       1.1   chopps 
    489       1.1   chopps cop_t std_a2024_copper_list[] = {
    490       1.8   mhitch     {{{ CI_WAIT(0,12), 0xfffe }}},			  /* WAIT (0, 12) */
    491       1.7   chopps #if defined (GRF_ECS) || defined (GRF_AGA)
    492       1.8   mhitch     {{{ R_BEAMCON0, 0x0000 }}},
    493       1.1   chopps #endif
    494       1.1   chopps     /* hedley card init setup section */
    495       1.8   mhitch     {{{ R_COLOR00, 0x0f00 }}},
    496       1.8   mhitch     {{{ R_BPL0PTH, 0x0000 }}}, {{{ R_BPL0PTL, 0x0000 }}}, /* init plane of 1's with first set for centering */
    497       1.8   mhitch     {{{ R_DIWSTRT, 0x1561 }}}, {{{ R_DIWSTOP, 0x16d1 }}},
    498       1.7   chopps #if defined (GRF_ECS) || defined (GRF_AGA)
    499       1.8   mhitch     {{{ R_DIWHIGH, 0x2000 }}},
    500       1.1   chopps #endif
    501       1.8   mhitch     {{{ R_DDFSTRT, 0x0040 }}}, {{{ R_DDFSTOP, 0x00d0 }}},
    502       1.8   mhitch     {{{ R_BPLCON0, 0x9200 }}},
    503       1.1   chopps     /* actual data that will be latched by hedley card. */
    504       1.8   mhitch     {{{ R_COLOR01, 0x0001 }}},			  /* Stuff1 */
    505       1.8   mhitch     {{{ CI_WAIT(126,21), 0xfffe }}}, {{{ R_COLOR01, 0x0001 }}}, /* Display Quadrent */
    506       1.8   mhitch     {{{ CI_WAIT(158,21), 0xfffe }}}, {{{ R_COLOR01, 0x08f0 }}}, /* Stuff */
    507       1.8   mhitch     {{{ CI_WAIT(190,21), 0xfffe }}}, {{{ R_COLOR01, 0x0ff1 }}}, /* Stuff2 */
    508  1.9.26.1  nathanw     {{{ CI_WAIT(0,22), 0xfffe }}},
    509  1.9.26.1  nathanw     {{{ R_COLOR00, 0x0000 }}}, {{{ R_BPLCON0, 0x0000 }}},
    510  1.9.26.1  nathanw     {{{ CI_WAIT(0,43), 0xfffe }}},
    511       1.1   chopps     /* set the registers up. */
    512       1.8   mhitch     {{{ R_COLOR00, 0x0009 }}}, {{{ R_COLOR01, 0x0001 }}},
    513       1.8   mhitch     {{{ R_COLOR02, 0x0008 }}}, {{{ R_COLOR03, 0x0000 }}},
    514       1.8   mhitch     {{{ R_COLOR04, 0x0809 }}}, {{{ R_COLOR05, 0x0801 }}},
    515       1.8   mhitch     {{{ R_COLOR06, 0x0808 }}}, {{{ R_COLOR07, 0x0800 }}},
    516       1.8   mhitch     {{{ R_COLOR08, 0x0089 }}}, {{{ R_COLOR09, 0x0081 }}},
    517       1.8   mhitch     {{{ R_COLOR0A, 0x0088 }}}, {{{ R_COLOR0B, 0x0080 }}},
    518       1.8   mhitch     {{{ R_COLOR0C, 0x0889 }}}, {{{ R_COLOR0D, 0x0881 }}},
    519       1.8   mhitch     {{{ R_COLOR0E, 0x0888 }}}, {{{ R_COLOR0F, 0x0880 }}},
    520       1.8   mhitch     {{{ R_COLOR10, 0x0009 }}}, {{{ R_COLOR11, 0x0009 }}},
    521       1.8   mhitch     {{{ R_COLOR12, 0x0001 }}}, {{{ R_COLOR13, 0x0809 }}},
    522       1.8   mhitch     {{{ R_COLOR14, 0x0009 }}}, {{{ R_COLOR15, 0x0009 }}},
    523       1.8   mhitch     {{{ R_COLOR16, 0x0001 }}}, {{{ R_COLOR17, 0x0809 }}},
    524       1.8   mhitch     {{{ R_COLOR18, 0x0008 }}}, {{{ R_COLOR19, 0x0008 }}},
    525       1.8   mhitch     {{{ R_COLOR1A, 0x0000 }}}, {{{ R_COLOR1B, 0x0808 }}},
    526       1.8   mhitch     {{{ R_COLOR1C, 0x0089 }}}, {{{ R_COLOR1D, 0x0089 }}},
    527       1.8   mhitch     {{{ R_COLOR1E, 0x0081 }}}, {{{ R_COLOR1F, 0x0889 }}},
    528       1.1   chopps     /* window size. */
    529       1.8   mhitch     {{{ R_DIWSTRT, 0x2c81 }}}, {{{ R_BPLCON0, 0x0000 }}},
    530       1.8   mhitch     {{{ R_DIWSTOP, 0xf481 }}},
    531       1.1   chopps     /* datafetch */
    532       1.8   mhitch     {{{ R_DDFSTRT, 0x0038 }}}, {{{ R_DDFSTOP, 0x00b8 }}},
    533       1.8   mhitch     {{{ R_BPLCON1, 0x0000 }}},
    534       1.8   mhitch     {{{ R_BPL1MOD, 0x00bc }}}, {{{ R_BPL2MOD, 0x00bc }}},
    535       1.1   chopps     /* bitplanes */
    536       1.8   mhitch     {{{ R_BPL0PTH, 0x0000 }}}, {{{ R_BPL0PTL, 0x0000 }}},
    537       1.8   mhitch     {{{ R_BPL1PTH, 0x0000 }}}, {{{ R_BPL1PTL, 0x0000 }}},
    538       1.8   mhitch     {{{ R_BPL2PTH, 0x0000 }}}, {{{ R_BPL2PTL, 0x0000 }}},
    539  1.9.26.1  nathanw     {{{ R_BPL3PTH, 0x0000 }}}, {{{ R_BPL3PTL, 0x0000 }}},
    540       1.7   chopps #if defined (GRF_ECS) || defined (GRF_AGA)
    541       1.8   mhitch     {{{ R_DIWHIGH, 0x2000 }}},
    542       1.4   chopps #if defined (GRF_AGA)
    543       1.8   mhitch     {{{ R_FMODE, 0x0000}}},
    544       1.4   chopps #endif
    545       1.1   chopps #endif
    546       1.8   mhitch     {{{ R_COP1LCH, 0x0000 }}}, {{{ R_COP1LCL, 0x0000 }}},
    547       1.8   mhitch     {{{ 0xffff, 0xfffe }}}, {{{ 0xffff, 0xfffe }}}  /* COPEND, COPEND */
    548       1.1   chopps };
    549       1.1   chopps int std_a2024_copper_list_len = sizeof (std_a2024_copper_list) / sizeof (cop_t);
    550       1.1   chopps int std_a2024_copper_list_size = sizeof (std_a2024_copper_list);
    551       1.1   chopps 
    552       1.1   chopps cop_t std_pal_a2024_copper_list[] = {
    553       1.8   mhitch     {{{ CI_WAIT(0,20), 0xfffe }}},			  /* WAIT (0, 12) */
    554       1.7   chopps #if defined (GRF_ECS) || defined (GRF_AGA)
    555       1.8   mhitch     {{{ R_BEAMCON0, STANDARD_PAL_BEAMCON }}},
    556       1.1   chopps #endif
    557       1.1   chopps     /* hedley card init setup section */
    558       1.8   mhitch     {{{ R_COLOR00, 0x0f00 }}},
    559       1.8   mhitch     {{{ R_BPL0PTH, 0x0000 }}}, {{{ R_BPL0PTL, 0x0000 }}}, /* init plane of 1's with first set for centering */
    560       1.8   mhitch     {{{ R_DIWSTRT, 0x1d61 }}}, {{{ R_DIWSTOP, 0x1ed1 }}},
    561       1.7   chopps #if defined (GRF_ECS) || defined (GRF_AGA)
    562       1.8   mhitch     {{{ R_DIWHIGH, 0x2000 }}},
    563       1.1   chopps #endif
    564       1.8   mhitch     {{{ R_DDFSTRT, 0x0040 }}}, {{{ R_DDFSTOP, 0x00d0 }}},
    565       1.8   mhitch     {{{ R_BPLCON0, 0x9200 }}},
    566       1.1   chopps     /* actual data that will be latched by hedley card. */
    567       1.8   mhitch     {{{ R_COLOR01, 0x0001 }}},			  /* Stuff1 */
    568       1.8   mhitch     {{{ CI_WAIT(126,29), 0xfffe }}}, {{{ R_COLOR01, 0x0001 }}}, /* Display Quadrent */
    569       1.8   mhitch     {{{ CI_WAIT(158,29), 0xfffe }}}, {{{ R_COLOR01, 0x08f0 }}}, /* Stuff */
    570       1.8   mhitch     {{{ CI_WAIT(190,29), 0xfffe }}}, {{{ R_COLOR01, 0x0ff1 }}}, /* Stuff2 */
    571  1.9.26.1  nathanw     {{{ CI_WAIT(0,30), 0xfffe }}},
    572       1.8   mhitch     {{{ R_COLOR00, 0x0000 }}}, {{{ R_BPLCON0, 0x0000 }}},
    573       1.8   mhitch     {{{ CI_WAIT(0,43), 0xfffe }}},
    574       1.1   chopps 
    575       1.1   chopps     /* set the registers up. */
    576       1.8   mhitch     {{{ R_COLOR00, 0x0009 }}}, {{{ R_COLOR01, 0x0001 }}},
    577       1.8   mhitch     {{{ R_COLOR02, 0x0008 }}}, {{{ R_COLOR03, 0x0000 }}},
    578       1.8   mhitch     {{{ R_COLOR04, 0x0809 }}}, {{{ R_COLOR05, 0x0801 }}},
    579       1.8   mhitch     {{{ R_COLOR06, 0x0808 }}}, {{{ R_COLOR07, 0x0800 }}},
    580       1.8   mhitch     {{{ R_COLOR08, 0x0089 }}}, {{{ R_COLOR09, 0x0081 }}},
    581       1.8   mhitch     {{{ R_COLOR0A, 0x0088 }}}, {{{ R_COLOR0B, 0x0080 }}},
    582       1.8   mhitch     {{{ R_COLOR0C, 0x0889 }}}, {{{ R_COLOR0D, 0x0881 }}},
    583       1.8   mhitch     {{{ R_COLOR0E, 0x0888 }}}, {{{ R_COLOR0F, 0x0880 }}},
    584       1.8   mhitch     {{{ R_COLOR10, 0x0009 }}}, {{{ R_COLOR11, 0x0009 }}},
    585       1.8   mhitch     {{{ R_COLOR12, 0x0001 }}}, {{{ R_COLOR13, 0x0809 }}},
    586       1.8   mhitch     {{{ R_COLOR14, 0x0009 }}}, {{{ R_COLOR15, 0x0009 }}},
    587       1.8   mhitch     {{{ R_COLOR16, 0x0001 }}}, {{{ R_COLOR17, 0x0809 }}},
    588       1.8   mhitch     {{{ R_COLOR18, 0x0008 }}}, {{{ R_COLOR19, 0x0008 }}},
    589       1.8   mhitch     {{{ R_COLOR1A, 0x0000 }}}, {{{ R_COLOR1B, 0x0808 }}},
    590       1.8   mhitch     {{{ R_COLOR1C, 0x0089 }}}, {{{ R_COLOR1D, 0x0089 }}},
    591       1.8   mhitch     {{{ R_COLOR1E, 0x0081 }}}, {{{ R_COLOR1F, 0x0889 }}},
    592       1.1   chopps     /* window size. */
    593       1.8   mhitch     {{{ R_DIWSTRT, 0x2c81 }}}, {{{ R_BPLCON0, 0x0000 }}},
    594       1.8   mhitch     {{{ R_DIWSTOP, 0x2c81 }}},
    595       1.1   chopps     /* datafetch */
    596       1.8   mhitch     {{{ R_DDFSTRT, 0x0038 }}}, {{{ R_DDFSTOP, 0x00b8 }}},
    597       1.8   mhitch     {{{ R_BPLCON1, 0x0000 }}},
    598       1.8   mhitch     {{{ R_BPL1MOD, 0x00bc }}}, {{{ R_BPL2MOD, 0x00bc }}},
    599       1.1   chopps     /* bitplanes */
    600       1.8   mhitch     {{{ R_BPL0PTH, 0x0000 }}}, {{{ R_BPL0PTL, 0x0000 }}},
    601       1.8   mhitch     {{{ R_BPL1PTH, 0x0000 }}}, {{{ R_BPL1PTL, 0x0000 }}},
    602       1.8   mhitch     {{{ R_BPL2PTH, 0x0000 }}}, {{{ R_BPL2PTL, 0x0000 }}},
    603  1.9.26.1  nathanw     {{{ R_BPL3PTH, 0x0000 }}}, {{{ R_BPL3PTL, 0x0000 }}},
    604       1.7   chopps #if defined (GRF_ECS) || defined (GRF_AGA)
    605       1.8   mhitch     {{{ R_DIWHIGH, 0x2100 }}},
    606       1.4   chopps #if defined (GRF_AGA)
    607       1.8   mhitch     {{{ R_FMODE, 0x0000}}},
    608       1.4   chopps #endif
    609       1.1   chopps #endif
    610       1.8   mhitch     {{{ R_COP1LCH, 0x0000 }}}, {{{ R_COP1LCL, 0x0000 }}},
    611       1.8   mhitch     {{{ 0xffff, 0xfffe }}}, {{{ 0xffff, 0xfffe }}}  /* COPEND, COPEND */
    612       1.1   chopps };
    613       1.1   chopps int std_pal_a2024_copper_list_len = sizeof (std_pal_a2024_copper_list) / sizeof (cop_t);
    614       1.1   chopps int std_pal_a2024_copper_list_size = sizeof (std_pal_a2024_copper_list);
    615       1.1   chopps 
    616       1.1   chopps /* color tables for figuring color regs for 2024 */
    617       1.1   chopps u_short a2024_color_value_line0[4] = {
    618       1.1   chopps     A2024_L0_BLACK,
    619       1.1   chopps     A2024_L0_DGREY,
    620       1.1   chopps     A2024_L0_LGREY,
    621       1.1   chopps     A2024_L0_WHITE
    622       1.1   chopps };
    623       1.1   chopps 
    624       1.1   chopps u_short a2024_color_value_line1[4] = {
    625       1.1   chopps     A2024_L1_BLACK,
    626       1.1   chopps     A2024_L1_DGREY,
    627       1.1   chopps     A2024_L1_LGREY,
    628       1.1   chopps     A2024_L1_WHITE
    629       1.1   chopps };
    630       1.1   chopps 
    631       1.1   chopps #endif /* GRF_A2024 */
    632       1.1   chopps 
    633       1.1   chopps u_short cc_default_colors[32] = {
    634       1.1   chopps 	0xAAA, 0x000, 0x68B, 0xFFF,
    635       1.1   chopps 	0x369, 0x963, 0x639, 0x936,
    636       1.1   chopps 	0x000, 0x00F, 0x0F0, 0xF00,
    637       1.1   chopps 	0x0FF, 0xFF0, 0xF0F, 0xFFF,
    638       1.1   chopps 	0x000, 0x111, 0x222, 0x333,
    639       1.1   chopps 	0x444, 0x555, 0x666, 0x777,
    640       1.1   chopps 	0x888, 0x999, 0xAAA, 0xBBB,
    641       1.1   chopps 	0xCCC, 0xDDD, 0xEEE, 0xFFF
    642       1.1   chopps };
    643       1.1   chopps #if defined (GRF_A2024)
    644       1.1   chopps u_short cc_a2024_default_colors[4] = {
    645       1.2   chopps 	0x2,			/* LGREY */
    646       1.1   chopps 	0x0,			/* BLACK */
    647       1.1   chopps 	0x3,			/* WHITE */
    648       1.1   chopps 	0x1			/* DGREY */
    649       1.1   chopps };
    650       1.1   chopps #endif /* GRF_A2024 */
    651