The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/pc98/pc98/30line.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * Copyright (c) 1994, 1995, 1996.  FreeBSD(98) porting team.
    3  * All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  * 1. Redistributions of source code must retain the above copyright
    9  *    notice, this list of conditions and the following disclaimer as
   10  *    the first lines of this file unmodified.
   11  * 2. Redistributions in binary form must reproduce the above copyright
   12  *    notice, this list of conditions and the following disclaimer in the
   13  *    documentation and/or other materials provided with the distribution.
   14  * 3. The name of the author may not be used to endorse or promote products
   15  *    derived from this software without specific prior written permission.
   16  * 
   17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   19  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   20  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
   21  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   22  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   26  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   27  *
   28  * $FreeBSD: releng/5.0/sys/pc98/pc98/30line.h 67142 2000-10-15 04:54:17Z nyan $
   29  */
   30 
   31 #ifndef __PC98_PC98_30LINE_H__
   32 #define __PC98_PC98_30LINE_H__
   33 
   34 #include <pc98/pc98/module.h>
   35 
   36 #ifndef LINE30_ROW
   37 #define LINE30_ROW      30
   38 #endif
   39 
   40 #define _CR     80
   41 #ifndef _VS
   42 #define _VS     2
   43 #endif
   44 #ifndef _HS
   45 #define _HS     1 + 1
   46 #endif
   47 #ifndef _HFP
   48 #define _HFP    3 + 1
   49 #endif
   50 #ifndef _HBP
   51 #define _HBP    14 + 1
   52 #endif
   53 #ifndef _VFP
   54 #define _VFP    11
   55 #endif
   56 #ifndef _VBP
   57 #define _VBP    44
   58 #endif
   59 
   60 #define _LF     LINE30_ROW*16
   61 
   62 #define _GDC_RESET      0x00
   63 #define _GDC_SYNC       0x0e
   64 #define _GDC_MASTER     0x6f
   65 #define _GDC_SLAVE      0x6e
   66 #define _GDC_START      0x0d
   67 #define _GDC_STOP       0x0c
   68 #define _GDC_SCROLL     0x70
   69 #define _GDC_PITCH      0x47
   70 
   71 #define GDC_CR  0
   72 #define GDC_VS  1
   73 #define GDC_HS  2
   74 #define GDC_HFP 3
   75 #define GDC_HBP 4
   76 #define GDC_VFP 5
   77 #define GDC_VBP 6
   78 #define GDC_LF  7
   79 
   80 
   81 #define _24KHZ  0
   82 #define _31KHZ  1
   83 
   84 #define _2_5MHZ 0
   85 #define _5MHZ   1
   86 
   87 #define _25L            0
   88 #define _30L            1
   89 
   90 #define T25_G400        0
   91 #define T30_G400        1
   92 #define T30_G480        2
   93 
   94 static void master_gdc_cmd(unsigned int);
   95 static void master_gdc_prm(unsigned int);
   96 static void master_gdc_word_prm(unsigned int);
   97 #ifdef LINE30
   98 static void master_gdc_fifo_empty(void);
   99 #endif
  100 static void master_gdc_wait_vsync(void);
  101 
  102 static void gdc_cmd(unsigned int);
  103 #ifdef LINE30
  104 static void gdc_prm(unsigned int);
  105 static void gdc_word_prm(unsigned int);
  106 static void gdc_fifo_empty(void);
  107 #endif
  108 static void gdc_wait_vsync(void);
  109 
  110 #ifdef LINE30
  111 static int check_gdc_clock(void);
  112 
  113 static int gdc_INFO = _25L;
  114 #endif
  115 static int gdc_FH = _24KHZ;
  116 static void initialize_gdc(unsigned int, int);
  117 
  118 #ifdef LINE30
  119 static unsigned int master_param[2][2][8] = {
  120 {{78,    8,     7,      9,      7,      7,      25,     400},   /* 400/24k */
  121  {_CR-2, _VS,   _HS-1,  _HFP-1, _HBP-1, _VFP,   _VBP,   _LF}},  /* 480/24k */
  122 {{78,    2,     7,      3,      7,      13,     34,     400},   /* 400/31k */
  123  {78,    2,     11,     3,      3,      6,      37,     480}}}; /* 480/31k */
  124 
  125 static unsigned int slave_param[2][6][8] = {
  126 {{38,   8,      3,      4,      3,      7,      25,     400},   /* normal */
  127  {78,   8,      7,      9,      7,      7,      25,     400},
  128  {_CR/2-2,      _VS,    (_HS)/2-1,      (_HFP)/2-1,     (_HBP)/2-1,
  129   _VFP+(_LF-400)/2+8,   _VBP+(_LF-400)/2-8,     400},           /* 30 & 400 */
  130  {_CR-2,        _VS,    _HS-1,  _HFP-1, _HBP-1,
  131   _VFP+(_LF-400)/2+8,   _VBP+(_LF-400)/2-8,     400},
  132  {_CR/2-2,      _VS,    (_HS)/2-1,      (_HFP)/2-1,     (_HBP)/2-1,
  133   _VFP, _VBP,   _LF},                                           /* 30 & 480 */
  134  {_CR-2,        _VS,    _HS-1,  _HFP-1, _HBP-1, _VFP,   _VBP,   _LF}},
  135 {{38,   2,      3,      1,      3,      13,     34,     400},   /* normal */
  136  {78,   2,      7,      3,      7,      13,     34,     400},
  137  {38,   2,      5,      1,      1,      6+48,   37+32,  400},   /* 30 & 400 */
  138  {78,   2,      11,     3,      3,      6+48,   37+32,  400},
  139  {38,   2,      5,      1,      1,      6,      37,     480},   /* 30 & 480 */
  140  {78,   2,      11,     3,      3,      6,      37,     480}}};
  141 
  142 static int SlavePCH[2] = {40,80};
  143 static int MasterPCH = 80;
  144 static int SlaveScrlLF[3] = {400,400,_LF};
  145 #endif
  146 
  147 #endif /* __PC98_PC98_30LINE_H__ */

Cache object: 4a8779b660e600159092c96ea6d8a38d


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.