1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34#ifndef _SMI_LYNX_EM_H_
35#define _SMI_LYNX_EM_H_
36
37
38
39
40#define VIDEO_MEM_SIZE 0x400000
41
42
43
44
45#define VIDEO_MODES 7
46#define DUAL_800_600 0
47
48
49
50#define DUAL_1024_768 1
51#define SINGLE_800_600 2
52#define SINGLE_1024_768 3
53#define SINGLE_1280_1024 4
54#define TV_MODE_CCIR 5
55#define TV_MODE_EIA 6
56
57
58
59
60
61#define SMI_INDX_C4 (pGD->isaBase + 0x03c4)
62#define SMI_DATA_C5 (pGD->isaBase + 0x03c5)
63#define SMI_INDX_D4 (pGD->isaBase + 0x03d4)
64#define SMI_DATA_D5 (pGD->isaBase + 0x03d5)
65#define SMI_INDX_CE (pGD->isaBase + 0x03ce)
66#define SMI_DATA_CF (pGD->isaBase + 0x03cf)
67#define SMI_LOCK_REG (pGD->isaBase + 0x03c3)
68#define SMI_MISC_REG (pGD->isaBase + 0x03c2)
69#define SMI_LUT_MASK (pGD->isaBase + 0x03c6)
70#define SMI_LUT_START (pGD->isaBase + 0x03c8)
71#define SMI_LUT_RGB (pGD->isaBase + 0x03c9)
72
73
74
75
76
77typedef struct {
78 unsigned int control;
79 unsigned int colorKey;
80 unsigned int colorKeyMask;
81 unsigned int start;
82 unsigned short offset;
83 unsigned short width;
84 unsigned int fifoPrio;
85 unsigned int fifoERL;
86 unsigned int YUVtoRGB;
87} SmiVideoProc;
88
89
90
91
92typedef struct {
93 unsigned short top;
94 unsigned short left;
95 unsigned short bottom;
96 unsigned short right;
97 unsigned int srcStart;
98 unsigned short width;
99 unsigned short offset;
100 unsigned char hStretch;
101 unsigned char vStretch;
102} SmiVideoWin;
103
104
105
106
107typedef struct {
108 unsigned int control;
109 unsigned short topClip;
110 unsigned short leftClip;
111 unsigned short srcHeight;
112 unsigned short srcWidth;
113 unsigned int srcBufStart1;
114 unsigned int srcBufStart2;
115 unsigned short srcOffset;
116 unsigned short fifoControl;
117} SmiCapturePort;
118
119
120
121
122
123
124typedef struct {
125 unsigned int isaBase;
126 unsigned int pciBase;
127 unsigned int dprBase;
128 unsigned int vprBase;
129 unsigned int cprBase;
130 unsigned int frameAdrs;
131 unsigned int memSize;
132 unsigned int mode;
133 unsigned int gdfIndex;
134 unsigned int gdfBytesPP;
135 unsigned int fg;
136 unsigned int bg;
137 unsigned int plnSizeX;
138 unsigned int plnSizeY;
139 unsigned int winSizeX;
140 unsigned int winSizeY;
141 char modeIdent[80];
142} GraphicDevice;
143
144extern GraphicDevice smi;
145
146
147
148
149
150
151void *video_hw_init (void);
152
153void video_hw_bitblt (
154 unsigned int bpp,
155 unsigned int src_x,
156 unsigned int src_y,
157 unsigned int dst_x,
158 unsigned int dst_y,
159 unsigned int dim_x,
160 unsigned int dim_y
161 );
162
163void video_hw_rectfill (
164 unsigned int bpp,
165 unsigned int dst_x,
166 unsigned int dst_y,
167 unsigned int dim_x,
168 unsigned int dim_y,
169 unsigned int color
170 );
171
172void video_set_lut (
173 unsigned int index,
174 unsigned char r,
175 unsigned char g,
176 unsigned char b
177 );
178
179#endif
180