Lines Matching +full:0 +full:x3c8

44 #define ABS(a)		(((a)<0) ? -(a) : (a))
45 #define SGN(a) (((a)<0) ? -1 : 1)
55 if (x>=0 && x<object->VXsize && y>=0 && y<object->VYsize) { in VGLSetXY()
62 undermouse = 0; in VGLSetXY()
112 outb(0x3c4, 0x02); in VGLSetXY()
113 outb(0x3c5, 0x01 << (x&0x3)); in VGLSetXY()
122 outb(0x3c4, 0x02); outb(0x3c5, 0x0f); in VGLSetXY()
123 outb(0x3ce, 0x00); outb(0x3cf, (byte)color & 0x0f); /* set/reset */ in VGLSetXY()
124 outb(0x3ce, 0x01); outb(0x3cf, 0x0f); /* set/reset enable */ in VGLSetXY()
125 outb(0x3ce, 0x08); outb(0x3cf, 0x80 >> (x%8)); /* bit mask */ in VGLSetXY()
141 if (x<0 || x>=object->VXsize || y<0 || y>=object->VYsize) in VGLGetXY()
142 return 0; in VGLGetXY()
146 return 0; /* invalid */ in VGLGetXY()
151 return le32toh(color) & 0xff; in VGLGetXY()
154 return le32toh(color) & 0xffff; in VGLGetXY()
157 return le32toh(color) & 0xffffff; in VGLGetXY()
162 return 0; /* invalid */ in VGLGetXY()
171 #define SL_ABSOLUTE(i,j,k) ( (i-j)*(k = ( (i-j)<0 ? -1 : 1)))
204 reverse = 0; in VGLLine()
205 /* note error check for dx==0 should be included here */ in VGLLine()
219 /* Note dx=n implies 0 - n or (dx+1) pixels to be set */ in VGLLine()
220 /* Go round loop dx/4 times then plot last 0,1,2 or 3 pixels */ in VGLLine()
226 if (pixels_left < 0) in VGLLine()
231 if (incr2 < 0) { /* slope less than 1/2 */ in VGLLine()
236 for (i = 0; i < xend; i++) { /* plotting loop */ in VGLLine()
239 if (D < 0) { in VGLLine()
272 if (D < 0) { in VGLLine()
301 for (i = 0; i < xend; i++) { in VGLLine()
304 if (D > 0) { in VGLLine()
336 if (D > 0) { in VGLLine()
388 if (x!=0) { in set4pixels()
391 if (y!=0) { in set4pixels()
398 if (y!=0) in set4pixels()
406 int x = 0, y = b, asq = a*a, asq2 = a*a*2, bsq = b*b; in VGLEllipse()
407 int bsq2 = b*b*2, d = bsq-asq*b+asq/4, dx = 0, dy = asq2*b; in VGLEllipse()
411 if (d>0) { in VGLEllipse()
417 while (y>=0) { in VGLEllipse()
419 if (d<0) { in VGLEllipse()
429 if (x!=0) { in set2lines()
431 if (y!=0) in set2lines()
442 int x = 0, y = b, asq = a*a, asq2 = a*a*2, bsq = b*b; in VGLFilledEllipse()
443 int bsq2 = b*b*2, d = bsq-asq*b+asq/4, dx = 0, dy = asq2*b; in VGLFilledEllipse()
447 if (d>0) { in VGLFilledEllipse()
453 while (y>=0) { in VGLFilledEllipse()
455 if (d<0) { in VGLFilledEllipse()
489 src.Xorigin = 0; in VGLClear()
490 src.Yorigin = 0; in VGLClear()
494 for (i = 0; i < object->VXsize; i++) in VGLClear()
496 for (i = 0; i < object->VYsize; i++) in VGLClear()
497 __VGLBitmapCopy(&src, 0, 0, object, 0, i, object->VXsize, -1); in VGLClear()
502 /* XXX works only for Xsize % 4 = 0 */ in VGLClear()
503 outb(0x3c6, 0xff); in VGLClear()
504 outb(0x3c4, 0x02); outb(0x3c5, 0x0f); in VGLClear()
512 /* XXX works only for Xsize % 8 = 0 */ in VGLClear()
513 outb(0x3c4, 0x02); outb(0x3c5, 0x0f); in VGLClear()
514 outb(0x3ce, 0x05); outb(0x3cf, 0x02); /* mode 2 */ in VGLClear()
515 outb(0x3ce, 0x01); outb(0x3cf, 0x00); /* set/reset enable */ in VGLClear()
516 outb(0x3ce, 0x08); outb(0x3cf, 0xff); /* bit mask */ in VGLClear()
517 for (offset = 0; offset < VGLAdpInfo.va_line_width*object->VYsize; ) { in VGLClear()
524 outb(0x3ce, 0x05); outb(0x3cf, 0x00); in VGLClear()
539 nb = VGLModeInfo.vi_pixel_fsizes[0]; in VGLrgbToNative()
541 (b >> (16 - nb) << 0); in VGLrgbToNative()
550 r = ((c & 0xe0) >> 5) * 0xffff / 7; in VGLrgb332ToNative()
551 g = ((c & 0x1c) >> 2) * 0xffff / 7; in VGLrgb332ToNative()
552 b = ((c & 0x03) >> 0) * 0xffff / 3; in VGLrgb332ToNative()
564 outb(0x3C6, 0xFF); in VGLRestorePalette()
565 inb(0x3DA); in VGLRestorePalette()
566 outb(0x3C8, 0x00); in VGLRestorePalette()
567 for (i=0; i<256; i++) { in VGLRestorePalette()
568 outb(0x3C9, VGLSavePaletteRed[i]); in VGLRestorePalette()
569 inb(0x84); in VGLRestorePalette()
570 outb(0x3C9, VGLSavePaletteGreen[i]); in VGLRestorePalette()
571 inb(0x84); in VGLRestorePalette()
572 outb(0x3C9, VGLSavePaletteBlue[i]); in VGLRestorePalette()
573 inb(0x84); in VGLRestorePalette()
575 inb(0x3DA); in VGLRestorePalette()
576 outb(0x3C0, 0x20); in VGLRestorePalette()
586 outb(0x3C6, 0xFF); in VGLSavePalette()
587 inb(0x3DA); in VGLSavePalette()
588 outb(0x3C7, 0x00); in VGLSavePalette()
589 for (i=0; i<256; i++) { in VGLSavePalette()
590 VGLSavePaletteRed[i] = inb(0x3C9); in VGLSavePalette()
591 inb(0x84); in VGLSavePalette()
592 VGLSavePaletteGreen[i] = inb(0x3C9); in VGLSavePalette()
593 inb(0x84); in VGLSavePalette()
594 VGLSavePaletteBlue[i] = inb(0x3C9); in VGLSavePalette()
595 inb(0x84); in VGLSavePalette()
597 inb(0x3DA); in VGLSavePalette()
598 outb(0x3C0, 0x20); in VGLSavePalette()
608 for (i=0; i<256; i++) { in VGLSetPalette()
614 outb(0x3C6, 0xFF); in VGLSetPalette()
615 inb(0x3DA); in VGLSetPalette()
616 outb(0x3C8, 0x00); in VGLSetPalette()
617 for (i=0; i<256; i++) { in VGLSetPalette()
618 outb(0x3C9, VGLSavePaletteRed[i]); in VGLSetPalette()
619 inb(0x84); in VGLSetPalette()
620 outb(0x3C9, VGLSavePaletteGreen[i]); in VGLSetPalette()
621 inb(0x84); in VGLSetPalette()
622 outb(0x3C9, VGLSavePaletteBlue[i]); in VGLSetPalette()
623 inb(0x84); in VGLSetPalette()
625 inb(0x3DA); in VGLSetPalette()
626 outb(0x3C0, 0x20); in VGLSetPalette()
638 outb(0x3C6, 0xFF); in VGLSetPaletteIndex()
639 inb(0x3DA); in VGLSetPaletteIndex()
640 outb(0x3C8, color); in VGLSetPaletteIndex()
641 outb(0x3C9, red); outb(0x3C9, green); outb(0x3C9, blue); in VGLSetPaletteIndex()
642 inb(0x3DA); in VGLSetPaletteIndex()
643 outb(0x3C0, 0x20); in VGLSetPaletteIndex()
655 if (VGLModeInfo.vi_mem_model == V_INFO_MM_DIRECT && ioctl(0, KDENABIO, 0)) in VGLSetBorder()
658 inb(0x3DA); in VGLSetBorder()
659 outb(0x3C0,0x11); outb(0x3C0, color); in VGLSetBorder()
660 inb(0x3DA); in VGLSetBorder()
661 outb(0x3C0, 0x20); in VGLSetBorder()
664 ioctl(0, KDDISABIO, 0); in VGLSetBorder()
678 if (VGLModeInfo.vi_mem_model == V_INFO_MM_DIRECT && ioctl(0, KDENABIO, 0)) in VGLBlankDisplay()
681 outb(0x3C4, 0x01); val = inb(0x3C5); outb(0x3C4, 0x01); in VGLBlankDisplay()
682 outb(0x3C5, ((blank) ? (val |= 0x20) : (val &= 0xDF))); in VGLBlankDisplay()
685 ioctl(0, KDDISABIO, 0); in VGLBlankDisplay()