home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / sys / hp300 / dev / grf_tcreg.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-05-08  |  6.1 KB  |  146 lines

  1. /*
  2.  * Copyright (c) 1988 University of Utah.
  3.  * Copyright (c) 1990 The Regents of the University of California.
  4.  * All rights reserved.
  5.  *
  6.  * This code is derived from software contributed to Berkeley by
  7.  * the Systems Programming Group of the University of Utah Computer
  8.  * Science Department.
  9.  *
  10.  * Redistribution and use in source and binary forms, with or without
  11.  * modification, are permitted provided that the following conditions
  12.  * are met:
  13.  * 1. Redistributions of source code must retain the above copyright
  14.  *    notice, this list of conditions and the following disclaimer.
  15.  * 2. Redistributions in binary form must reproduce the above copyright
  16.  *    notice, this list of conditions and the following disclaimer in the
  17.  *    documentation and/or other materials provided with the distribution.
  18.  * 3. All advertising materials mentioning features or use of this software
  19.  *    must display the following acknowledgement:
  20.  *    This product includes software developed by the University of
  21.  *    California, Berkeley and its contributors.
  22.  * 4. Neither the name of the University nor the names of its contributors
  23.  *    may be used to endorse or promote products derived from this software
  24.  *    without specific prior written permission.
  25.  *
  26.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  27.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  28.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  29.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  30.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  31.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  32.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  33.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  34.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  35.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  36.  * SUCH DAMAGE.
  37.  *
  38.  * from: Utah $Hdr: grf_tcreg.h 1.10 91/03/25$
  39.  *
  40.  *    @(#)grf_tcreg.h    7.3 (Berkeley) 5/7/91
  41.  */
  42.  
  43. #define tccm_waitbusy(regaddr) \
  44.     while (((struct tcboxfb *)(regaddr))->cmap_busy & 0x04) DELAY(100)
  45.  
  46. #define tc_waitbusy(regaddr,planes) \
  47.     while (((struct tcboxfb *)(regaddr))->busy & planes) DELAY(100)
  48.  
  49. #define    vu_char        volatile u_char
  50. #define    vu_short    volatile u_short
  51.  
  52. struct tcboxfb {
  53.   u_char     :8;
  54.   vu_char     reset;            /* reset register        0x01 */
  55.   vu_char    fb_address;        /* frame buffer address     0x02 */
  56.   vu_char    interrupt;        /* interrupt register        0x03 */
  57.   u_char    :8;
  58.   vu_char    fbwmsb;            /* frame buffer width MSB    0x05 */
  59.   u_char    :8;
  60.   vu_char    fbwlsb;            /* frame buffer width MSB    0x07 */
  61.   u_char    :8;
  62.   vu_char    fbhmsb;            /* frame buffer height MSB    0x09 */
  63.   u_char    :8;
  64.   vu_char    fbhlsb;            /* frame buffer height MSB    0x0b */
  65.   u_char    :8;
  66.   vu_char    dwmsb;            /* display width MSB        0x0d */
  67.   u_char    :8;
  68.   vu_char    dwlsb;            /* display width MSB        0x0f */
  69.   u_char    :8;
  70.   vu_char    dhmsb;            /* display height MSB        0x11 */
  71.   u_char    :8;
  72.   vu_char    dhlsb;            /* display height MSB        0x13 */
  73.   u_char    :8;
  74.   vu_char    fbid;            /* Scondary frame buffer id    0x15 */
  75.   u_char    :8;
  76.   vu_char    bits;            /* square(0)/double-high(1)     0x17 */
  77.   u_char    f1[0x5b-0x17-1];
  78.   vu_char    num_planes;        /* number of color planes       0x5b */
  79.   u_char    :8;
  80.   vu_char    fbomsb;            /* frame buffer offset MSB    0x5d */
  81.   u_char    :8;
  82.   vu_char    fbolsb;            /* frame buffer offset LSB    0x5f */
  83.   u_char    f2[0x4040-0x5f-1];
  84.   vu_char     vblank;            /* vertical blanking          0x4040 */
  85.   u_char    :8,:8,:8;
  86.   vu_char    busy;            /* window move active          0x4044 */
  87.   u_char    :8,:8,:8;
  88.   vu_char     vtrace_request;        /* vert retrace intr request  0x4048 */
  89.   u_char    :8,:8,:8;
  90.   vu_char    move_request;        /* window move intr request   0x404C */
  91.   u_char    f3[0x4080-0x404c-1];
  92.   vu_char    nblank;            /* display enable planes      0x4080 */
  93.   u_char     f4[0x4088-0x4080-1];
  94.   vu_char    wen;            /* write enable plane           0x4088 */
  95.   u_char     f5[0x408c-0x4088-1];
  96.   vu_char    ren;            /* read enable plane          0x408c */
  97.   u_char     f6[0x4090-0x408c-1];
  98.   vu_char    fben;            /* frame buffer write enable  0x4090 */
  99.   u_char     f7[0x409c-0x4090-1];
  100.   vu_char    wmove;            /* start window move           0x409c */
  101.   u_char     f8[0x40a0-0x409c-1];
  102.   vu_char    blink;            /* enable blink planes           0x40a0 */
  103.   u_char     f9[0x40a8-0x40a0-1];
  104.   vu_char    altframe;        /* enable alternate frame     0x40a8 */
  105.   u_char     f10[0x40ac-0x40a8-1];
  106.   vu_char    curon;            /* cursor control register    0x40ac */
  107.   u_char    f11[0x40ea-0x40ac-1];
  108.   vu_char    prr;            /* pixel replacement rule     0x40ea */
  109.   u_char    f12[0x40ef-0x40ea-1];
  110.   vu_char    wmrr;            /* move replacement rule      0x40ef */
  111.   u_char     f13[0x40f2-0x40ef-1];
  112.   vu_short     source_x;        /* source x pixel #           0x40f2 */
  113.   u_char     f14[0x40f6-0x40f2-2];
  114.   vu_short     source_y;        /* source y pixel #           0x40f6 */
  115.   u_char     f15[0x40fa-0x40f6-2];
  116.   vu_short    dest_x;            /* dest x pixel #           0x40fa */
  117.   u_char     f16[0x40fe-0x40fa-2];
  118.   vu_short    dest_y;            /* dest y pixel #           0x40fe */
  119.   u_char     f17[0x4102-0x40fe-2];
  120.   vu_short    wwidth;            /* block mover pixel width    0x4102 */
  121.   u_char    f18[0x4106-0x4102-2];
  122.   vu_short     wheight;        /* block mover pixel height   0x4106 */
  123.   /* Catseye */
  124.   u_char    f19[0x4206-0x4106-2];
  125.   vu_short    rug_cmdstat;        /* RUG Command/Staus          0x4206 */
  126.   u_char    f20[0x4510-0x4206-2];
  127.   vu_short    vb_select;        /* Vector/BitBlt Select          0x4510 */
  128.   vu_short    tcntrl;            /* Three Operand Control      0x4512 */
  129.   vu_short    acntrl;            /* BitBlt Mode              0x4514 */
  130.   vu_short    pncntrl;        /* Plane Control          0x4516 */
  131.   u_char    f21[0x4800-0x4516-2];
  132.   vu_short    catseye_status;        /* Catseye Status          0x4800 */
  133.   /* End of Catseye */
  134.   u_char     f22[0x6002-0x4800-2];
  135.   vu_short    cmap_busy;        /* Color Ram busy          0x6002 */
  136.   u_char     f23[0x60b2-0x6002-2];
  137.   vu_short    rdata;            /* color map red data           0x60b2 */
  138.   vu_short     gdata;            /* color map green data       0x60b4 */
  139.   vu_short    bdata;            /* color map blue data           0x60b6 */
  140.   vu_short    cindex;            /* color map index           0x60b8 */
  141.   vu_short    plane_mask;        /* plane mask select          0x60ba */
  142.   u_char     f24[0x60f0-0x60ba-2];
  143.   vu_short     strobe;            /* color map trigger           0x60f0 */
  144. };
  145.  
  146.