| plan 9 kernel history: overview | file list | diff list |
1997/1101/pc/vgatvp3020.c (diff list | history)
| 1994/0624/sys/src/9/pc/vgatvp3020.c:59,65 – 1994/0729/sys/src/9/pc/vgatvp3020.c:59,65 (short | long) | ||
| 1994/0624 | uchar p, p0, p1; int x, y; | |
| 1994/0729 | lock(&palettelock); | |
| 1994/0624 | /* * Make sure cursor is off by initialising the cursor | |
| 1994/0624/sys/src/9/pc/vgatvp3020.c:147,153 – 1994/0729/sys/src/9/pc/vgatvp3020.c:147,153 | ||
| 1994/0624 | tvp3020xo(0x06, 0x40|0x10); /* Cursor Control Register */ | |
| 1994/0729 | unlock(&palettelock); | |
| 1994/0624 | } static void | |
| 1994/0624/sys/src/9/pc/vgatvp3020.c:155,161 – 1994/0729/sys/src/9/pc/vgatvp3020.c:155,161 | ||
| 1994/0624 | { uchar r; | |
| 1994/0729 | lock(&palettelock); | |
| 1994/0624 | /* * Make sure cursor is off by initialising the cursor | |
| 1994/0624/sys/src/9/pc/vgatvp3020.c:172,178 – 1994/0729/sys/src/9/pc/vgatvp3020.c:172,178 | ||
| 1994/0624 | tvp3020xo(0x23, 0xFF); tvp3020xo(0x24, 0xFF); tvp3020xo(0x25, 0xFF); tvp3020xo(0x26, 0x00); tvp3020xo(0x27, 0x00); tvp3020xo(0x28, 0x00); | |
| 1994/0729 | unlock(&palettelock); | |
| 1994/0624 | /* * Finally, enable | |
| 1994/0624/sys/src/9/pc/vgatvp3020.c:189,195 – 1994/0729/sys/src/9/pc/vgatvp3020.c:189,195 | ||
| 1994/0624 | static int move(Point p) { | |
| 1994/0729 | if(canlock(&palettelock) == 0) | |
| 1994/0624 | return 1; tvp3020xo(0x00, p.x & 0xFF); /* Cursor Position X LSB */ | |
| 1994/0624/sys/src/9/pc/vgatvp3020.c:197,203 – 1994/0729/sys/src/9/pc/vgatvp3020.c:197,203 | ||
| 1994/0624 | tvp3020xo(0x02, p.y & 0xFF); /* Cursor Position Y LSB */ tvp3020xo(0x03, (p.y>>8) & 0x0F); /* Cursor Position Y MSB */ | |
| 1994/0729 | unlock(&palettelock); | |
| 1994/0624 | return 0; } | |
| 1994/0624/sys/src/9/pc/vgatvp3020.c:212,220 – 1994/0729/sys/src/9/pc/vgatvp3020.c:212,220 | ||
| 1994/0624 | * cursor control enable for Bt485 DAC (!); * the hardware cursor external operation mode. */ | |
| 1994/0729 | lock(&palettelock); | |
| 1994/0624 | tvp3020xo(0x06, 0x10); /* Cursor Control Register */ | |
| 1994/0729 | unlock(&palettelock); | |
| 1994/0624 | r = vgaxi(Crtx, 0x45) & ~0x20; vgaxo(Crtx, 0x45, r); | |
| 1994/0729/sys/src/9/pc/vgatvp3020.c:9,14 – 1994/0810/sys/src/9/pc/vgatvp3020.c:9,16 (short | long) | ||
| 1994/0624 | #include "screen.h" #include "vga.h" | |
| 1994/0810 | extern Cursor curcursor; | |
| 1994/0624 | /* * TVP3020 Viewpoint Video Interface Pallette. * Assumes hooked up to an S3 86C928. | |
| 1994/0729/sys/src/9/pc/vgatvp3020.c:59,65 – 1994/0810/sys/src/9/pc/vgatvp3020.c:61,79 | ||
| 1994/0624 | uchar p, p0, p1; int x, y; | |
| 1994/0810 | /* * Lock the DAC registers so we can update the * cursor bitmap if necessary. * If it's the same as the last cursor we loaded, * just make sure it's enabled. */ | |
| 1994/0729 | lock(&palettelock); | |
| 1994/0810 | if(memcmp(c, &curcursor, sizeof(Cursor)) == 0){ tvp3020xo(0x06, 0x40|0x10); /* Cursor Control Register */ unlock(&palettelock); return; } memmove(&curcursor, c, sizeof(Cursor)); | |
| 1994/0624 | /* * Make sure cursor is off by initialising the cursor | |
| 1994/0810/sys/src/9/pc/vgatvp3020.c:30,36 – 1995/0126/sys/src/9/pc/vgatvp3020.c:30,36 (short | long) | ||
| 1994/0624 | * addressing. */ static ushort dacxreg[4] = { | |
| 1995/0126 | PaddrW, Pdata, Pixmask, PaddrR | |
| 1994/0624 | }; static uchar | |
| 1994/0810/sys/src/9/pc/vgatvp3020.c:182,190 – 1995/0126/sys/src/9/pc/vgatvp3020.c:182,190 | ||
| 1994/0624 | * cursor colour 1 (white), * cursor colour 2 (black). */ | |
| 1995/0126 | tvp3020xo(0x20, Pwhite); tvp3020xo(0x21, Pwhite); tvp3020xo(0x22, Pwhite); tvp3020xo(0x23, Pwhite); tvp3020xo(0x24, Pwhite); tvp3020xo(0x25, Pwhite); tvp3020xo(0x26, Pblack); tvp3020xo(0x27, Pblack); tvp3020xo(0x28, Pblack); | |
| 1994/0624 | ||
| 1994/0729 | unlock(&palettelock); | |
| 1994/0624 | ||
| 1994/0810/sys/src/9/pc/vgatvp3020.c:243,246 – 1995/0126/sys/src/9/pc/vgatvp3020.c:243,254 | ||
| 1994/0624 | load, move, disable, | |
| 1995/0126 | 0, | |
| 1994/0624 | }; | |
| 1995/0126 | void vgatvp3020link(void) { addhwgclink(&tvp3020hwgc); } | |
| 1995/0126/sys/src/9/pc/vgatvp3020.c:5,28 – 1997/1101/sys/src/9/pc/vgatvp3020.c:5,22 (short | long) | ||
| 1994/0624 | #include "fns.h" #include "../port/error.h" | |
| 1997/1101 | #define Image IMAGE #include <draw.h> #include <memdraw.h> | |
| 1994/0624 | #include "screen.h" | |
| 1994/0810 |
| |
| 1994/0624 | /* * TVP3020 Viewpoint Video Interface Pallette. * Assumes hooked up to an S3 86C928. */ enum { | |
| 1997/1101 | Index = 0x06, /* Index register */ Data = 0x07, /* Data register */ | |
| 1994/0624 | }; /* | |
| 1995/0126/sys/src/9/pc/vgatvp3020.c:56,80 – 1997/1101/sys/src/9/pc/vgatvp3020.c:50,79 | ||
| 1994/0624 | } static void | |
| 1997/1101 | tvp3020disable(VGAscr*) | |
| 1994/0624 | { | |
| 1997/1101 | uchar r; | |
| 1994/0624 | ||
| 1994/0810 | /* | |
| 1997/1101 | * Disable * cursor; * cursor control enable for Bt485 DAC (!); * the hardware cursor external operation mode. | |
| 1994/0810 | */ | |
| 1994/0729 |
| |
| 1994/0810 |
| |
| 1997/1101 | tvp3020xo(0x06, 0x10); /* Cursor Control Register */ | |
| 1994/0624 | ||
| 1997/1101 | r = vgaxi(Crtx, 0x45) & ~0x20; vgaxo(Crtx, 0x45, r); r = vgaxi(Crtx, 0x55) & ~0x20; vgaxo(Crtx, 0x55, r); } static void tvp3020enable(VGAscr*) { uchar r; | |
| 1994/0624 | /* * Make sure cursor is off by initialising the cursor * control to defaults + X-Windows cursor mode. | |
| 1995/0126/sys/src/9/pc/vgatvp3020.c:82,87 – 1997/1101/sys/src/9/pc/vgatvp3020.c:81,119 | ||
| 1994/0624 | tvp3020xo(0x06, 0x10); /* Cursor Control Register */ /* | |
| 1997/1101 | * Overscan colour, * cursor colour 1 (white), * cursor colour 2 (black). */ tvp3020xo(0x20, Pwhite); tvp3020xo(0x21, Pwhite); tvp3020xo(0x22, Pwhite); tvp3020xo(0x23, Pwhite); tvp3020xo(0x24, Pwhite); tvp3020xo(0x25, Pwhite); tvp3020xo(0x26, Pblack); tvp3020xo(0x27, Pblack); tvp3020xo(0x28, Pblack); /* * Finally, enable * the hardware cursor external operation mode; * cursor control enable for Bt485 DAC (!). */ r = vgaxi(Crtx, 0x55)|0x20; vgaxo(Crtx, 0x55, r); r = vgaxi(Crtx, 0x45)|0x20; vgaxo(Crtx, 0x45, r); } static void tvp3020load(VGAscr*, Cursor* curs) { uchar p, p0, p1; int x, y; /* * Make sure cursor is off by initialising the cursor * control to defaults + X-Windows cursor mode. */ tvp3020xo(0x06, 0x10); /* Cursor Control Register */ /* | |
| 1994/0624 | * Initialise the cursor RAM LS and MS address * (LS must be first). */ | |
| 1995/0126/sys/src/9/pc/vgatvp3020.c:104,111 – 1997/1101/sys/src/9/pc/vgatvp3020.c:136,143 | ||
| 1994/0624 | for(y = 0; y < 64; y++){ for(x = 0; x < 64/8; x++){ if(x < 16/8 && y < 16){ | |
| 1997/1101 | p0 = curs->clr[x+y*2]; p1 = curs->set[x+y*2]; | |
| 1994/0624 | p = 0x00; if(p1 & 0x10) | |
| 1995/0126/sys/src/9/pc/vgatvp3020.c:153,254 – 1997/1101/sys/src/9/pc/vgatvp3020.c:185,215 | ||
| 1994/0624 | } /* | |
| 1997/1101 | * Initialise the cursor hotpoint | |
| 1994/0624 | * and enable the cursor. */ | |
| 1997/1101 | tvp3020xo(0x04, -curs->offset.x); /* Sprite Origin X */ tvp3020xo(0x05, -curs->offset.y); /* Sprite Origin Y */ | |
| 1994/0624 | tvp3020xo(0x06, 0x40|0x10); /* Cursor Control Register */ | |
| 1994/0729 |
| |
| 1994/0624 | } | |
| 1994/0729 |
| |
| 1994/0624 |
| |
| 1995/0126 |
| |
| 1994/0624 | ||
| 1994/0729 |
| |
| 1994/0624 |
| |
| 1997/1101 | tvp3020move(VGAscr*, Point p) | |
| 1994/0624 | { | |
| 1994/0729 |
| |
| 1994/0624 |
| |
| 1994/0729 |
| |
| 1994/0624 | return 0; } | |
| 1994/0729 |
| |
| 1994/0624 |
| |
| 1994/0729 |
| |
| 1994/0624 |
| |
| 1997/1101 | VGAcur vgatvp3020cur = { | |
| 1994/0624 | "tvp3020hwgc", | |
| 1995/0126 |
| |
| 1997/1101 | tvp3020enable, tvp3020disable, tvp3020load, tvp3020move, | |
| 1994/0624 | }; | |
| 1995/0126 |
| |
| 1997/1101/sys/src/9/pc/vgatvp3020.c:8,13 – 1999/0119/sys/src/9/pc/vgatvp3020.c:8,14 (short | long) | ||
| 1997/1101 | #define Image IMAGE #include <draw.h> #include <memdraw.h> | |
| 1999/0119 | #include <cursor.h> | |
| 1994/0624 | #include "screen.h" /* | |