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