| plan 9 kernel history: overview | file list | diff list |
1997/1101/pc/vgatvp3020.c (diff list | history)
| 1995/0126/sys/src/9/pc/vgatvp3020.c:5,28 – 1997/1101/sys/src/9/pc/vgatvp3020.c:5,22 (short | long | prev | next) | ||
| 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 |
| |