2 * Copyright (c) 1994, 1995, 1996. FreeBSD(98) porting team.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
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.
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.
29 #ifndef __PC98_PC98_30LINE_H__
30 #define __PC98_PC98_30LINE_H__
32 #include <pc98/pc98/module.h>
58 #define _LF LINE30_ROW*16
60 #define _GDC_RESET 0x00
61 #define _GDC_SYNC 0x0e
62 #define _GDC_MASTER 0x6f
63 #define _GDC_SLAVE 0x6e
64 #define _GDC_START 0x0d
65 #define _GDC_STOP 0x0c
66 #define _GDC_SCROLL 0x70
67 #define _GDC_PITCH 0x47
89 static void master_gdc_cmd(unsigned int);
90 static void master_gdc_prm(unsigned int);
91 static void master_gdc_word_prm(unsigned int);
92 static void master_gdc_fifo_empty(void);
93 static void master_gdc_wait_vsync(void);
95 static void gdc_cmd(unsigned int);
96 static void gdc_prm(unsigned int);
97 static void gdc_word_prm(unsigned int);
98 static void gdc_fifo_empty(void);
99 static void gdc_wait_vsync(void);
101 static int check_gdc_clock(void);
103 static int gdc_INFO = _25L;
104 static void initialize_gdc(unsigned int);
106 static unsigned int master_param[2][8] = {
107 {78, 8, 7, 9, 7, 7, 25, 400},
108 {_CR-2, _VS, _HS-1, _HFP-1, _HBP-1, _VFP, _VBP, _LF}};
110 static unsigned int slave_param[6][8] = {
111 {38, 8, 3, 4, 3, 7, 25, 400}, /* normal */
112 {78, 8, 7, 9, 7, 7, 25, 400},
113 {_CR/2-2, _VS, (_HS)/2-1, (_HFP)/2-1, (_HBP)/2-1,
114 _VFP+(_LF-400)/2+8, _VBP+(_LF-400)/2-8, 400}, /* 30 & 400 */
115 {_CR-2, _VS, _HS-1, _HFP-1, _HBP-1,
116 _VFP+(_LF-400)/2+8, _VBP+(_LF-400)/2-8, 400},
117 {_CR/2-2, _VS, (_HS)/2-1, (_HFP)/2-1, (_HBP)/2-1,
118 _VFP, _VBP, _LF}, /* 30 & 480 */
119 {_CR-2, _VS, _HS-1, _HFP-1, _HBP-1, _VFP, _VBP, _LF}};
121 static int SlavePCH[2] = {40,80};
122 static int MasterPCH = 80;
123 static int SlaveScrlLF[3] = {400,400,_LF};