Lines Matching defs:regp
1175 vgaRegPtr regp;
1184 regp = &hwp->ModeReg;
1191 regp->MiscOutReg = 0x23;
1193 regp->MiscOutReg |= 0x40;
1195 regp->MiscOutReg |= 0x80;
1205 regp->MiscOutReg = 0xA3; /* +hsync -vsync */
1207 regp->MiscOutReg = 0x63; /* -hsync +vsync */
1209 regp->MiscOutReg = 0xE3; /* -hsync -vsync */
1211 regp->MiscOutReg = 0x23; /* +hsync +vsync */
1214 regp->MiscOutReg |= (mode->ClockIndex & 0x03) << 2;
1220 regp->Sequencer[0] = 0x02;
1222 regp->Sequencer[0] = 0x00;
1224 regp->Sequencer[1] = 0x09;
1226 regp->Sequencer[1] = 0x01;
1228 regp->Sequencer[2] = 1 << BIT_PLANE;
1230 regp->Sequencer[2] = 0x0F;
1231 regp->Sequencer[3] = 0x00; /* Font select */
1233 regp->Sequencer[4] = 0x06; /* Misc */
1235 regp->Sequencer[4] = 0x0E; /* Misc */
1240 regp->CRTC[0] = (mode->CrtcHTotal >> 3) - 5;
1241 regp->CRTC[1] = (mode->CrtcHDisplay >> 3) - 1;
1242 regp->CRTC[2] = (mode->CrtcHBlankStart >> 3) - 1;
1243 regp->CRTC[3] = (((mode->CrtcHBlankEnd >> 3) - 1) & 0x1F) | 0x80;
1246 regp->CRTC[3] |= i;
1247 regp->CRTC[4] = (mode->CrtcHSyncStart >> 3);
1248 regp->CRTC[5] = ((((mode->CrtcHBlankEnd >> 3) - 1) & 0x20) << 2)
1250 regp->CRTC[6] = (mode->CrtcVTotal - 2) & 0xFF;
1251 regp->CRTC[7] = (((mode->CrtcVTotal - 2) & 0x100) >> 8)
1258 regp->CRTC[8] = 0x00;
1259 regp->CRTC[9] = (((mode->CrtcVBlankStart - 1) & 0x200) >> 4) | 0x40;
1261 regp->CRTC[9] |= 0x80;
1263 regp->CRTC[9] |= 0x1F;
1265 regp->CRTC[9] |= mode->VScan - 1;
1266 regp->CRTC[10] = 0x00;
1267 regp->CRTC[11] = 0x00;
1268 regp->CRTC[12] = 0x00;
1269 regp->CRTC[13] = 0x00;
1270 regp->CRTC[14] = 0x00;
1271 regp->CRTC[15] = 0x00;
1272 regp->CRTC[16] = mode->CrtcVSyncStart & 0xFF;
1273 regp->CRTC[17] = (mode->CrtcVSyncEnd & 0x0F) | 0x20;
1274 regp->CRTC[18] = (mode->CrtcVDisplay - 1) & 0xFF;
1275 regp->CRTC[19] = scrninfp->displayWidth >> 4; /* just a guess */
1276 regp->CRTC[20] = 0x00;
1277 regp->CRTC[21] = (mode->CrtcVBlankStart - 1) & 0xFF;
1278 regp->CRTC[22] = (mode->CrtcVBlankEnd - 1) & 0xFF;
1280 regp->CRTC[23] = 0xE3;
1282 regp->CRTC[23] = 0xC3;
1283 regp->CRTC[24] = 0xFF;
1285 vgaHWHBlankKGA(mode, regp, 0, KGA_FIX_OVERSCAN | KGA_ENABLE_ON_ZERO);
1286 vgaHWVBlankKGA(mode, regp, 0, KGA_FIX_OVERSCAN | KGA_ENABLE_ON_ZERO);
1295 regp->Graphics[0] = 0x00;
1296 regp->Graphics[1] = 0x00;
1297 regp->Graphics[2] = 0x00;
1298 regp->Graphics[3] = 0x00;
1300 regp->Graphics[4] = BIT_PLANE;
1301 regp->Graphics[5] = 0x00;
1304 regp->Graphics[4] = 0x00;
1306 regp->Graphics[5] = 0x02;
1308 regp->Graphics[5] = 0x40;
1310 regp->Graphics[6] = 0x05; /* only map 64k VGA memory !!!! */
1311 regp->Graphics[7] = 0x0F;
1312 regp->Graphics[8] = 0xFF;
1321 regp->Attribute[i] = WHITE_VALUE;
1323 regp->Attribute[i] = BLACK_VALUE;
1325 regp->Attribute[16] = 0x01; /* -VGA2- *//* wrong for the ET4000 */
1327 regp->Attribute[OVERSCAN] = OVERSCAN_VALUE; /* -VGA2- */
1330 regp->Attribute[0] = 0x00; /* standard colormap translation */
1331 regp->Attribute[1] = 0x01;
1332 regp->Attribute[2] = 0x02;
1333 regp->Attribute[3] = 0x03;
1334 regp->Attribute[4] = 0x04;
1335 regp->Attribute[5] = 0x05;
1336 regp->Attribute[6] = 0x06;
1337 regp->Attribute[7] = 0x07;
1338 regp->Attribute[8] = 0x08;
1339 regp->Attribute[9] = 0x09;
1340 regp->Attribute[10] = 0x0A;
1341 regp->Attribute[11] = 0x0B;
1342 regp->Attribute[12] = 0x0C;
1343 regp->Attribute[13] = 0x0D;
1344 regp->Attribute[14] = 0x0E;
1345 regp->Attribute[15] = 0x0F;
1347 regp->Attribute[16] = 0x81; /* wrong for the ET4000 */
1349 regp->Attribute[16] = 0x41; /* wrong for the ET4000 */
1352 regp->Attribute[18] = 0x0F;
1353 regp->Attribute[19] = 0x00;
1354 regp->Attribute[20] = 0x00;
1393 vgaHWHBlankKGA(DisplayModePtr mode, vgaRegPtr regp, int nBits,
1400 regp->CRTC[3] = (regp->CRTC[3] & ~0x1F)
1402 regp->CRTC[5] = (regp->CRTC[5] & ~0x80)
1409 int i = (regp->CRTC[3] & 0x1F)
1410 | ((regp->CRTC[5] & 0x80) >> 2)
1421 regp->CRTC[3] = (regp->CRTC[3] & ~0x1F) | (i & 0x1F);
1422 regp->CRTC[5] = (regp->CRTC[5] & ~0x80) | ((i << 2) & 0x80);
1435 vgaHWVBlankKGA(DisplayModePtr mode, vgaRegPtr regp, int nBits,
1447 regp->CRTC[22] = (mode->CrtcVBlankEnd - 1) & 0xFF;
1454 int i = regp->CRTC[22] | ExtBits;
1460 !(regp->CRTC[9] & 0x9F)) /* 1 scanline/row */
1468 regp->CRTC[22] = i & 0xFF;
1486 vgaHWFreeRegs(vgaRegPtr regp)
1488 free(regp->CRTC);
1490 regp->CRTC = regp->Sequencer = regp->Graphics = regp->Attribute = NULL;
1492 regp->numCRTC =
1493 regp->numSequencer = regp->numGraphics = regp->numAttribute = 0;
1497 vgaHWAllocRegs(vgaRegPtr regp)
1501 if ((regp->numCRTC + regp->numSequencer + regp->numGraphics +
1502 regp->numAttribute) == 0)
1505 buf = calloc(regp->numCRTC +
1506 regp->numSequencer +
1507 regp->numGraphics + regp->numAttribute, 1);
1511 regp->CRTC = buf;
1512 regp->Sequencer = regp->CRTC + regp->numCRTC;
1513 regp->Graphics = regp->Sequencer + regp->numSequencer;
1514 regp->Attribute = regp->Graphics + regp->numGraphics;
1520 vgaHWAllocDefaultRegs(vgaRegPtr regp)
1522 regp->numCRTC = VGA_NUM_CRTC;
1523 regp->numSequencer = VGA_NUM_SEQ;
1524 regp->numGraphics = VGA_NUM_GFX;
1525 regp->numAttribute = VGA_NUM_ATTR;
1527 return vgaHWAllocRegs(regp);
1535 ((newMode.num##regtype < regp->num##regtype) ? \
1536 (newMode.num##regtype) : (regp->num##regtype))
1538 memcpy (newMode.regtype, regp->regtype, VGAHWMINNUM(regtype))
1541 vgaRegPtr regp;
1543 regp = &VGAHWPTR(scrp)->ModeReg;
1544 memcpy(&newMode, regp, sizeof(vgaRegRec));
1548 regp = &newMode;
1549 regp->numCRTC = numCRTC;
1550 regp->numSequencer = numSequencer;
1551 regp->numGraphics = numGraphics;
1552 regp->numAttribute = numAttribute;
1553 if (!vgaHWAllocRegs(regp))
1556 regp = &VGAHWPTR(scrp)->SavedReg;
1557 memcpy(&newSaved, regp, sizeof(vgaRegRec));
1559 regp = &newSaved;
1560 regp->numCRTC = numCRTC;
1561 regp->numSequencer = numSequencer;
1562 regp->numGraphics = numGraphics;
1563 regp->numAttribute = numAttribute;
1564 if (!vgaHWAllocRegs(regp)) {
1571 regp = &VGAHWPTR(scrp)->ModeReg;
1577 regp = &VGAHWPTR(scrp)->SavedReg;
1585 regp = &VGAHWPTR(scrp)->ModeReg;
1586 vgaHWFreeRegs(regp);
1587 memcpy(regp, &newMode, sizeof(vgaRegRec));
1589 regp = &VGAHWPTR(scrp)->SavedReg;
1590 vgaHWFreeRegs(regp);
1591 memcpy(regp, &newSaved, sizeof(vgaRegRec));
1620 vgaRegPtr regp;
1635 regp = &VGAHWPTR(scrp)->ModeReg;
1673 regp->DAC[i] = 0x00;
1675 regp->DAC[i] = 0x3F;
1677 regp->DAC[i++] = blackColour.red;
1678 regp->DAC[i++] = blackColour.green;
1679 regp->DAC[i] = blackColour.blue;
1681 regp->DAC[i++] = whiteColour.red;
1682 regp->DAC[i++] = whiteColour.green;
1683 regp->DAC[i] = whiteColour.blue;
1685 regp->DAC[i++] = 0x00;
1686 regp->DAC[i++] = 0x00;
1687 regp->DAC[i] = 0x00;
1692 regp->DAC[i] = 0x00;
1695 regp->Attribute[OVERSCAN] = 0xFF;
1700 regp->DAC[765] = 0x3F;
1701 regp->DAC[766] = 0x00;
1702 regp->DAC[767] = 0x3F;
1703 regp->Attribute[OVERSCAN] = 0xFF;