| plan 9 kernel history: overview | file list | diff list |
1995/0126/pc/vgabt485.c (diff list | history)
| 1995/0126/sys/src/9/pc/vgabt485.c:5,13 – 1997/1101/sys/src/9/pc/vgabt485.c:5,14 (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" | |
| 1995/0126/sys/src/9/pc/vgabt485.c:103,120 – 1997/1101/sys/src/9/pc/vgabt485.c:104,176 | ||
| 1994/0624 | vgaxo(Crtx, 0x55, crt55); } | |
| 1997/1101 | static void bt485disable(VGAscr*) { uchar r; | |
| 1994/0624 | ||
| 1997/1101 | /* * Disable * cursor mode 3; * cursor control enable for Bt485 DAC; * the hardware cursor external operation mode. */ r = bt485i(Cmd2) & ~0x03; bt485o(Cmd2, r); r = vgaxi(Crtx, 0x45) & ~0x20; vgaxo(Crtx, 0x45, r); r = vgaxi(Crtx, 0x55) & ~0x20; vgaxo(Crtx, 0x55, r); } | |
| 1994/0624 | static void | |
| 1997/1101 | bt485enable(VGAscr*) | |
| 1994/0624 | { uchar r; | |
| 1997/1101 | /* * Turn cursor off. */ r = bt485i(Cmd2) & 0xFC; bt485o(Cmd2, r); | |
| 1994/0624 | ||
| 1994/0729 |
| |
| 1997/1101 | /* * Overscan colour, * cursor colour 1 (white), * cursor colour 2, 3 (black). */ bt485o(ColorW, 0x00); bt485o(Color, Pwhite); bt485o(Color, Pwhite); bt485o(Color, Pwhite); | |
| 1994/0624 | ||
| 1997/1101 | bt485o(Color, Pwhite); bt485o(Color, Pwhite); bt485o(Color, Pwhite); bt485o(Color, Pblack); bt485o(Color, Pblack); bt485o(Color, Pblack); bt485o(Color, Pblack); bt485o(Color, Pblack); bt485o(Color, Pblack); | |
| 1994/0624 | /* | |
| 1997/1101 | * Finally, enable * the hardware cursor external operation mode; * cursor control enable for Bt485 DAC. * The #9GXE cards seem to need the 86C928 Bt485 support * enabled in order to work at all in enhanced mode. */ r = vgaxi(Crtx, 0x55)|0x20; vgaxo(Crtx, 0x55, r); r = vgaxi(Crtx, 0x45)|0x20; vgaxo(Crtx, 0x45, r); } static void bt485load(VGAscr* scr, Cursor* curs) { uchar r; int x, y; /* | |
| 1994/0624 | * Turn cursor off; * put cursor into 64x64x2 mode and clear MSBs of address; * clear LSBs of address; | |
| 1995/0126/sys/src/9/pc/vgabt485.c:137,143 – 1997/1101/sys/src/9/pc/vgabt485.c:193,199 | ||
| 1994/0624 | for(y = 0; y < 64; y++){ for(x = 0; x < 64/8; x++){ if(x < 16/8 && y < 16) | |
| 1997/1101 | bt485o(Cram, curs->clr[x+y*2]); | |
| 1994/0624 | else bt485o(Cram, 0x00); } | |
| 1995/0126/sys/src/9/pc/vgabt485.c:145,151 – 1997/1101/sys/src/9/pc/vgabt485.c:201,207 | ||
| 1994/0624 | for(y = 0; y < 64; y++){ for(x = 0; x < 64/8; x++){ if(x < 16/8 && y < 16) | |
| 1997/1101 | bt485o(Cram, curs->set[x+y*2]); | |
| 1994/0624 | else bt485o(Cram, 0x00); } | |
| 1995/0126/sys/src/9/pc/vgabt485.c:155,267 – 1997/1101/sys/src/9/pc/vgabt485.c:211,244 | ||
| 1994/0624 | * Initialise the cursor hot-point * and enable the cursor. */ | |
| 1997/1101 | scr->offset.x = 64+curs->offset.x; scr->offset.y = 64+curs->offset.y; | |
| 1994/0624 | r = (bt485i(Cmd2) & 0xFC)|0x01; bt485o(Cmd2, r); | |
| 1994/0729 |
| |
| 1994/0624 | } | |
| 1994/0729 |
| |
| 1994/0624 |
| |
| 1995/0126 |
| |
| 1994/0624 | ||
| 1995/0126 |
| |
| 1994/0624 | ||
| 1995/0126 |
| |
| 1994/0624 | ||
| 1994/0729 |
| |
| 1994/0624 |
| |
| 1997/1101 | bt485move(VGAscr* scr, Point p) | |
| 1994/0624 | { int x, y; | |
| 1994/0729 |
| |
| 1994/0624 |
| |
| 1997/1101 | x = p.x+scr->offset.x; y = p.y+scr->offset.y; | |
| 1994/0624 |
| |
| 1994/0729 |
| |
| 1994/0624 | return 0; } | |
| 1994/0729 |
| |
| 1994/0624 |
| |
| 1994/0729 |
| |
| 1994/0624 |
| |
| 1997/1101 | VGAcur vgabt485cur = { | |
| 1994/0624 | "bt485hwgc", | |
| 1995/0126 |
| |
| 1997/1101 | bt485enable, bt485disable, bt485load, bt485move, | |
| 1994/0624 | }; | |
| 1995/0126 |
| |