home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / d / ddx-mips.zip / MIPS2030.H < prev    next >
C/C++ Source or Header  |  1992-07-31  |  3KB  |  80 lines

  1. /*
  2.  * $XConsortium$
  3.  *
  4.  * Copyright 1991 MIPS Computer Systems, Inc.
  5.  *
  6.  * Permission to use, copy, modify, distribute, and sell this software and its
  7.  * documentation for any purpose is hereby granted without fee, provided that
  8.  * the above copyright notice appear in all copies and that both that
  9.  * copyright notice and this permission notice appear in supporting
  10.  * documentation, and that the name of MIPS not be used in advertising or
  11.  * publicity pertaining to distribution of the software without specific,
  12.  * written prior permission.  MIPS makes no representations about the
  13.  * suitability of this software for any purpose.  It is provided "as is"
  14.  * without express or implied warranty.
  15.  *
  16.  * MIPS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  17.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL MIPS
  18.  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  19.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  20.  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
  21.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  22.  */
  23. /* $Header: mips2030.h,v 1.3 91/09/18 17:50:32 dd Exp $ */
  24. #ifndef __DDX_MIPS2030_H
  25. #define    __DDX_MIPS2030_H
  26.  
  27. /*
  28.  * RS2030 frame buffer description
  29.  */
  30.  
  31. /* Brooktree Bt458 RAMDAC registers */
  32. struct bt458 {
  33.     char pad0[3];
  34.     volatile unsigned char addr;
  35.     char pad1[3];
  36.     volatile unsigned char cmap;
  37.     char pad2[3];
  38.     volatile unsigned char ctrl;
  39.     char pad3[3];
  40.     volatile unsigned char omap;
  41. };
  42.  
  43. /* Bt458 addresses */
  44. #define    BT458_READMASK    4
  45. #define    BT458_BLINKMASK    5
  46. #define    BT458_CMD    6
  47. #define        BT458_CMD_MUX5    0x80    /* enable 5:1 multiplexing */
  48. #define        BT458_CMD_RAMEN    0x40    /* enable color map RAM */
  49. #define        BT458_CMD_BR1    0x20    /* blink rate */
  50. #define        BT458_CMD_BR0    0x10    /* blink rate */
  51. #define        BT458_CMD_BE1    0x08    /* OL1 blink enable */
  52. #define        BT458_CMD_BE0    0x04    /* OL0 blink enable */
  53. #define        BT458_CMD_OL1    0x02    /* OL1 display enable */
  54. #define        BT458_CMD_OL0    0x01    /* OL0 display enable */
  55. #define    BT458_TEST    7
  56.  
  57. /* frame buffer registers */
  58. struct rs2030_reg {
  59.     short intclr;        /* 0x0000 retrace interrupt clear */
  60.     char pad0[0x80 - 2];
  61.     short blank;        /* 0x0080 blank screen */
  62.     char pad1[0x1000 - 0x80 - 2];
  63.     short unblank;        /* 0x1000 unblank screen */
  64.     char pad2[0xff00 - 0x1000 - 2];
  65.     struct bt458 ramdac;    /* 0xff00 RAMDAC */
  66. };
  67.  
  68. #define    RS2030_VISW    1280    /* visible pixels per scan line */
  69. #define    RS2030_VISH    1024    /* scan lines */
  70. #define    RS2030_BPSL    2048    /* bytes per scan line */
  71.  
  72. struct rs2030_fb {
  73.     struct rs2030_line {
  74.         char vis[RS2030_VISW];
  75.         char invis[RS2030_BPSL - RS2030_VISW];
  76.     } line[RS2030_VISH];
  77. };
  78.  
  79. #endif /* __DDX_MIPS2030_H */
  80.