| plan 9 kernel history: overview | file list | diff list |
1994/0507/pc/devvga.c (diff list | history)
| 1994/0506/sys/src/9/pc/devvga.c:132,140 – 1994/0507/sys/src/9/pc/devvga.c:132,138 (short | long | prev | next) | ||
| 1993/1116 | static void cgascreenputs(char*, int); static void screenputc(char*); static void scroll(void); | |
| 1994/0506 |
| |
| 1994/0507 | static ulong xnto32(uchar, int); | |
| 1994/0415 | static void workinit(Bitmap*, int, int); | |
| 1994/0416 | extern void screenload(Rectangle, uchar*, int, int, int); extern void screenunload(Rectangle, uchar*, int, int, int); | |
| 1994/0506/sys/src/9/pc/devvga.c:309,316 – 1994/0507/sys/src/9/pc/devvga.c:307,312 | ||
| 1994/0503 | cbuf[n] = 0; if(strncmp(cbuf, "hwcursor", 8) == 0) hwcursor = 1; | |
| 1994/0506 |
| |
| 1994/0503 | break; | |
| 1992/0527 | case Qvgasize: | |
| 1992/1119 | if(offset != 0 || n >= sizeof(cbuf)) | |
| 1994/0506/sys/src/9/pc/devvga.c:591,603 – 1994/0507/sys/src/9/pc/devvga.c:587,602 | ||
| 1993/1116 | switch(ldepth){ case 3: for(i = 0; i < 256; i++) | |
| 1994/0506 |
| |
| 1994/0507 | setcolor(i, xnto32(i>>5, 3), xnto32(i>>2, 3), xnto32(i<<1, 2)); setcolor(0x55, xnto32(0x15, 6), xnto32(0x15, 6), xnto32(0x15, 6)); setcolor(0xaa, xnto32(0x2a, 6), xnto32(0x2a, 6), xnto32(0x2a, 6)); setcolor(0xff, xnto32(0x3f, 6), xnto32(0x3f, 6), xnto32(0x3f, 6)); | |
| 1993/1116 | break; case 2: case 1: case 0: for(i = 0; i < 16; i++){ | |
| 1994/0507 | x = xnto32((i*63)/15, 6); | |
| 1993/1116 | setcolor(i, x, x, x); } break; | |
| 1994/0506/sys/src/9/pc/devvga.c:976,1036 – 1994/0507/sys/src/9/pc/devvga.c:975,997 | ||
| 1993/1116 | ||
| 1992/1119 | /* | |
| 1994/0507 | * expand n bits of color to 32 | |
| 1992/1119 | */ static ulong | |
| 1994/0507 | xnto32(uchar x, int n) | |
| 1992/1119 | { | |
| 1994/0507 | int s; | |
| 1992/1119 | ulong y; | |
| 1994/0507 | x &= (1<<n)-1; y = 0; for(s = 32 - n; s > 0; s -= n) y |= x<<s; if(s < 0) y |= x>>(-s); | |
| 1992/1119 | return y; } | |
| 1994/0506 |
| |
| 1992/1119 |
| |
| 1993/1116 | /* | |
| 1992/1119 | * paging routines for different cards */ | |
| 1994/0506/sys/src/9/pc/devvga.c:1364,1370 – 1994/0507/sys/src/9/pc/devvga.c:1325,1331 | ||
| 1994/0414 | void cursoron(int dolock) { | |
| 1994/0416 |
| |
| 1994/0507 | int xoff, yoff, s; | |
| 1994/0414 | Rectangle r; uchar *a; struct { | |
| 1994/0506/sys/src/9/pc/devvga.c:1377,1384 – 1994/0507/sys/src/9/pc/devvga.c:1338,1348 | ||
| 1994/0414 | if(cursor.disable) return; | |
| 1994/0507 | if(dolock){ s = 0; /* to avoid compiler warning */ | |
| 1994/0414 | lock(&cursor); | |
| 1994/0507 | } else s = spllo(); /* to avoid freezing out the eia ports */ | |
| 1994/0414 | ||
| 1994/0503 | if(hwcursor) (*vgacard->mvcursor)(mousexy()); | |
| 1994/0506/sys/src/9/pc/devvga.c:1430,1450 – 1994/0507/sys/src/9/pc/devvga.c:1394,1423 | ||
| 1994/0414 | if(dolock) unlock(&cursor); | |
| 1994/0507 | else splx(s); | |
| 1994/0414 | } void cursoroff(int dolock) { | |
| 1994/0507 | int s; | |
| 1994/0503 | if(hwcursor) return; | |
| 1994/0414 | if(cursor.disable) return; | |
| 1994/0507 | if(dolock){ s = 0; /* to avoid a compiler warning */ | |
| 1994/0414 | lock(&cursor); | |
| 1994/0507 | } else s = spllo(); /* to avoid freezing out the eia ports */ | |
| 1994/0414 | if(--cursor.visible == 0 && cursor.tl > 0) screenload(cursor.clipr, (uchar*)backbits, cursor.tl, cursor.l, 0); if(dolock) unlock(&cursor); | |
| 1994/0507 | else splx(s); | |
| 1994/0414 | } | |
| 1994/0415 | static void | |