Lines Matching defs:hwp
22 vgaHWPtr hwp = VGAHWPTR(scrninfp);
30 if (!hwp->FontInfo1 && !hwp->FontInfo2 && !hwp->TextInfo)
33 if (hwp->Base == NULL) {
43 miscOut = hwp->readMiscOut(hwp);
44 attr10 = hwp->readAttr(hwp, 0x10);
45 gr1 = hwp->readGr(hwp, 0x01);
46 gr3 = hwp->readGr(hwp, 0x03);
47 gr4 = hwp->readGr(hwp, 0x04);
48 gr5 = hwp->readGr(hwp, 0x05);
49 gr6 = hwp->readGr(hwp, 0x06);
50 gr8 = hwp->readGr(hwp, 0x08);
51 seq2 = hwp->readSeq(hwp, 0x02);
52 seq4 = hwp->readSeq(hwp, 0x04);
54 /* save hwp->IOBase and temporarily set it for colour mode */
55 savedIOBase = hwp->IOBase;
56 hwp->IOBase = VGA_IOBASE_COLOR;
59 hwp->writeMiscOut(hwp, miscOut | 0x01);
61 scrn = hwp->readSeq(hwp, 0x01);
63 vgaHWSeqReset(hwp, TRUE);
66 hwp->writeSeq(hwp, 0x01, scrn);/* change mode */
68 vgaHWSeqReset(hwp, FALSE);
77 hwp->writeAttr(hwp, 0x10, 0x01); /* graphics mode */
81 hwp->writeGr(hwp, 0x03, 0x00); /* don't rotate, write unmodified */
82 hwp->writeGr(hwp, 0x08, 0xFF); /* write all bits in a byte */
83 hwp->writeGr(hwp, 0x01, 0x00); /* all planes come from CPU */
86 hwp->writeSeq(hwp, 0x04, 0x06); /* enable plane graphics */
87 hwp->writeGr(hwp, 0x05, 0x00); /* write mode 0, read mode 0 */
88 hwp->writeGr(hwp, 0x06, 0x05); /* set graphics */
90 if (hwp->FontInfo1) {
91 hwp->writeSeq(hwp, 0x02, 0x04); /* write to plane 2 */
92 hwp->writeGr(hwp, 0x04, 0x02); /* read plane 2 */
93 slowbcopy_tobus(hwp->FontInfo1, hwp->Base, FONT_AMOUNT);
96 if (hwp->FontInfo2) {
97 hwp->writeSeq(hwp, 0x02, 0x08); /* write to plane 3 */
98 hwp->writeGr(hwp, 0x04, 0x03); /* read plane 3 */
99 slowbcopy_tobus(hwp->FontInfo2, hwp->Base, FONT_AMOUNT);
102 if (hwp->TextInfo) {
103 hwp->writeSeq(hwp, 0x02, 0x01); /* write to plane 0 */
104 hwp->writeGr(hwp, 0x04, 0x00); /* read plane 0 */
105 slowbcopy_tobus(hwp->TextInfo, hwp->Base, TEXT_AMOUNT);
106 hwp->writeSeq(hwp, 0x02, 0x02); /* write to plane 1 */
107 hwp->writeGr(hwp, 0x04, 0x01); /* read plane 1 */
108 slowbcopy_tobus((unsigned char *)hwp->TextInfo + TEXT_AMOUNT,
109 hwp->Base, TEXT_AMOUNT);
113 hwp->writeMiscOut(hwp, miscOut);
114 hwp->writeAttr(hwp, 0x10, attr10);
115 hwp->writeGr(hwp, 0x01, gr1);
116 hwp->writeGr(hwp, 0x03, gr3);
117 hwp->writeGr(hwp, 0x04, gr4);
118 hwp->writeGr(hwp, 0x05, gr5);
119 hwp->writeGr(hwp, 0x06, gr6);
120 hwp->writeGr(hwp, 0x08, gr8);
121 hwp->writeSeq(hwp, 0x02, seq2);
122 hwp->writeSeq(hwp, 0x04, seq4);
123 hwp->IOBase = savedIOBase;
125 scrn = hwp->readSeq(hwp, 0x01);
127 vgaHWSeqReset(hwp, TRUE);
130 hwp->writeSeq(hwp, 0x01, scrn);/* change mode */
132 vgaHWSeqReset(hwp, FALSE);
142 vgaHWPtr hwp = VGAHWPTR(scrninfp);
149 if (hwp->Base == NULL) {
159 attr10 = hwp->readAttr(hwp, 0x10);
164 miscOut = hwp->readMiscOut(hwp);
165 gr4 = hwp->readGr(hwp, 0x04);
166 gr5 = hwp->readGr(hwp, 0x05);
167 gr6 = hwp->readGr(hwp, 0x06);
168 seq2 = hwp->readSeq(hwp, 0x02);
169 seq4 = hwp->readSeq(hwp, 0x04);
171 /* save hwp->IOBase and temporarily set it for colour mode */
172 savedIOBase = hwp->IOBase;
173 hwp->IOBase = VGA_IOBASE_COLOR;
176 hwp->writeMiscOut(hwp, miscOut | 0x01);
178 scrn = hwp->readSeq(hwp, 0x01);
180 vgaHWSeqReset(hwp, TRUE);
183 hwp->writeSeq(hwp, 0x01, scrn);/* change mode */
185 vgaHWSeqReset(hwp, FALSE);
197 hwp->writeAttr(hwp, 0x10, 0x01); /* graphics mode */
199 hwp->writeSeq(hwp, 0x04, 0x06); /* enable plane graphics */
200 hwp->writeGr(hwp, 0x05, 0x00); /* write mode 0, read mode 0 */
201 hwp->writeGr(hwp, 0x06, 0x05); /* set graphics */
202 if (hwp->FontInfo1 || (hwp->FontInfo1 = malloc(FONT_AMOUNT))) {
203 hwp->writeSeq(hwp, 0x02, 0x04); /* write to plane 2 */
204 hwp->writeGr(hwp, 0x04, 0x02); /* read plane 2 */
205 slowbcopy_frombus(hwp->Base, hwp->FontInfo1, FONT_AMOUNT);
207 if (hwp->FontInfo2 || (hwp->FontInfo2 = malloc(FONT_AMOUNT))) {
208 hwp->writeSeq(hwp, 0x02, 0x08); /* write to plane 3 */
209 hwp->writeGr(hwp, 0x04, 0x03); /* read plane 3 */
210 slowbcopy_frombus(hwp->Base, hwp->FontInfo2, FONT_AMOUNT);
212 if (hwp->TextInfo || (hwp->TextInfo = malloc(2 * TEXT_AMOUNT))) {
213 hwp->writeSeq(hwp, 0x02, 0x01); /* write to plane 0 */
214 hwp->writeGr(hwp, 0x04, 0x00); /* read plane 0 */
215 slowbcopy_frombus(hwp->Base, hwp->TextInfo, TEXT_AMOUNT);
216 hwp->writeSeq(hwp, 0x02, 0x02); /* write to plane 1 */
217 hwp->writeGr(hwp, 0x04, 0x01); /* read plane 1 */
218 slowbcopy_frombus(hwp->Base,
219 (unsigned char *)hwp->TextInfo + TEXT_AMOUNT, TEXT_AMOUNT);
223 hwp->writeAttr(hwp, 0x10, attr10);
224 hwp->writeGr(hwp, 0x04, gr4);
225 hwp->writeGr(hwp, 0x05, gr5);
226 hwp->writeGr(hwp, 0x06, gr6);
227 hwp->writeSeq(hwp, 0x02, seq2);
228 hwp->writeSeq(hwp, 0x04, seq4);
229 hwp->writeMiscOut(hwp, miscOut);
230 hwp->IOBase = savedIOBase;
232 scrn = hwp->readSeq(hwp, 0x01);
234 vgaHWSeqReset(hwp, TRUE);
237 hwp->writeSeq(hwp, 0x01, scrn);/* change mode */
239 vgaHWSeqReset(hwp, FALSE);
248 vgaHWPtr hwp = VGAHWPTR(scrninfp);
254 hwp->IOBase = VGA_IOBASE_COLOR;
256 hwp->IOBase = VGA_IOBASE_MONO;
258 hwp->writeMiscOut(hwp, restore->MiscOutReg);
265 hwp->writeSeq(hwp, i, restore->Sequencer[i]);
269 scrn = hwp->readSeq(hwp, 0x01);
271 vgaHWSeqReset(hwp, TRUE);
274 hwp->writeSeq(hwp, 0x01, scrn);/* change mode */
278 hwp->writeCrtc(hwp, 17, restore->CRTC[17] & ~0x80);
281 hwp->writeCrtc(hwp, i, restore->CRTC[i]);
284 hwp->writeGr(hwp, i, restore->Graphics[i]);
286 hwp->enablePalette(hwp);
288 hwp->writeAttr(hwp, i, restore->Attribute[i]);
289 hwp->disablePalette(hwp);
293 hwp->writeSeq(hwp, 1, restore->Sequencer[1]);
300 vgaHWPtr hwp = VGAHWPTR(scrninfp);
303 save->MiscOutReg = hwp->readMiscOut(hwp);
305 hwp->IOBase = VGA_IOBASE_COLOR;
307 hwp->IOBase = VGA_IOBASE_MONO;
310 save->CRTC[i] = hwp->readCrtc(hwp, i);
316 hwp->enablePalette(hwp);
318 save->Attribute[i] = hwp->readAttr(hwp, i);
323 hwp->disablePalette(hwp);
326 save->Graphics[i] = hwp->readGr(hwp, i);
333 save->Sequencer[i] = hwp->readSeq(hwp, i);
343 vgaHWPtr hwp = VGAHWPTR(pScrn);
353 tmp = hwp->readSeq(hwp, 0x01);
355 vgaHWSeqReset(hwp, TRUE); /* start synchronous reset */
358 hwp->writeSeq(hwp, 0x01, tmp | 0x20); /* disable the display */
360 hwp->enablePalette(hwp);
366 tmp = hwp->readSeq(hwp, 0x01);
370 hwp->writeSeq(hwp, 0x01, tmp & ~0x20); /* re-enable display */
372 vgaHWSeqReset(hwp, FALSE); /* clear synchronousreset */
374 hwp->disablePalette(hwp);