| plan 9 kernel history: overview | file list | diff list |
2001/0527/pc/vgacyber938x.c (diff list | history)
| 1998/0205/sys/src/9/pc/vgacyber938x.c:71,109 – 1998/0209/sys/src/9/pc/vgacyber938x.c:71,76 (short | long) | ||
| 1998/0205 | } static void | |
| 1998/0205/sys/src/9/pc/vgacyber938x.c:207,212 – 1998/0209/sys/src/9/pc/vgacyber938x.c:174,214 | ||
| 1998/0205 | vgaxo(Crtx, 0x43, (y>>8) & 0xFF); return 0; | |
| 1998/0209 | } static void cyber938xcurenable(VGAscr* scr) { int i; ulong storage; cyber938xcurdisable(scr); /* * Cursor colours. */ for(i = 0x48; i < 0x4C; i++) vgaxo(Crtx, i, Pwhite); for(i = 0x4C; i < 0x50; i++) vgaxo(Crtx, i, Pblack); /* * Find a place for the cursor data in display memory. */ storage = ((scr->gscreen->width*BY2WD*scr->gscreen->r.max.y+1023)/1024)*2; vgaxo(Crtx, 0x44, storage & 0xFF); vgaxo(Crtx, 0x45, (storage>>8) & 0xFF); storage *= 512; scr->storage = storage; /* * Load, locate and enable the 32x32 cursor. * (64x64 is bit 0, X11 format is bit 6 and cursor * enable is bit 7). */ cyber938xcurload(scr, &arrow); cyber938xcurmove(scr, ZP); vgaxo(Crtx, 0x50, 0xC0); | |
| 1998/0205 | } VGAdev vgacyber938xdev = { | |
| 1998/0209/sys/src/9/pc/vgacyber938x.c:137,143 – 1998/0214/sys/src/9/pc/vgacyber938x.c:137,143 (short | long) | ||
| 1998/0205 | * Save the cursor hotpoint and enable the cursor. */ scr->offset = curs->offset; | |
| 1998/0214 | vgaxo(Crtx, 0x50, 0xC8); | |
| 1998/0205 | } static int | |
| 1998/0209/sys/src/9/pc/vgacyber938x.c:204,214 – 1998/0214/sys/src/9/pc/vgacyber938x.c:204,215 | ||
| 1998/0209 | /* * Load, locate and enable the 32x32 cursor. * (64x64 is bit 0, X11 format is bit 6 and cursor | |
| 1998/0214 | * enable is bit 7). Bit 3 needs to be set on 9382 * chips otherwise even the white bits are black. | |
| 1998/0209 | */ cyber938xcurload(scr, &arrow); cyber938xcurmove(scr, ZP); | |
| 1998/0214 | vgaxo(Crtx, 0x50, 0xC8); | |
| 1998/0205 | } VGAdev vgacyber938xdev = { | |
| 1998/0214/sys/src/9/pc/vgacyber938x.c:108,114 – 1998/0522/sys/src/9/pc/vgacyber938x.c:108,114 (short | long) | ||
|
Comment edit.
rsc Fri Mar 4 12:44:25 2005 | ||
| 1998/0205 | * without a proper datasheet this is what binary search * through the display memory gives as the place for the * pattern. | |
| 1998/0522 | * Note also that it seems the cursor image offset (CRT44 | |
| 1998/0205 | * and CRT45) cannot be set above 512KB. * This will do for now as the ThinkPad 560E has 1MB and * can only manage 800x600x8. | |
| 1998/0522/sys/src/9/pc/vgacyber938x.c:11,16 – 1998/0829/sys/src/9/pc/vgacyber938x.c:11,21 (short | long) | ||
| 1998/0205 | #include <memdraw.h> #include "screen.h" | |
| 1998/0829 | enum { CursorON = 0xC8, CursorOFF = 0x00, }; | |
| 1998/0205 | static int cyber938xpageset(VGAscr*, int page) { | |
| 1998/0522/sys/src/9/pc/vgacyber938x.c:67,73 – 1998/0829/sys/src/9/pc/vgacyber938x.c:72,78 | ||
| 1998/0205 | static void cyber938xcurdisable(VGAscr*) { | |
| 1998/0829 | vgaxo(Crtx, 0x50, CursorOFF); | |
| 1998/0205 | } static void | |
| 1998/0522/sys/src/9/pc/vgacyber938x.c:94,132 – 1998/0829/sys/src/9/pc/vgacyber938x.c:99,110 | ||
| 1998/0205 | *p++ = curs->set[2*y + 1]|curs->clr[2*y + 1]; *p++ = 0x00; *p++ = 0x00; | |
| 1998/0522 |
| |
| 1998/0205 |
| |
| 1998/0829 | memset(p, 0, (32-y)*8); | |
| 1998/0205 | if(!islinear){ cyber938xpageset(scr, opage); | |
| 1998/0522/sys/src/9/pc/vgacyber938x.c:137,143 – 1998/0829/sys/src/9/pc/vgacyber938x.c:115,121 | ||
| 1998/0205 | * Save the cursor hotpoint and enable the cursor. */ scr->offset = curs->offset; | |
| 1998/0214 |
| |
| 1998/0829 | vgaxo(Crtx, 0x50, CursorON); | |
| 1998/0205 | } static int | |
| 1998/0522/sys/src/9/pc/vgacyber938x.c:195,204 – 1998/0829/sys/src/9/pc/vgacyber938x.c:173,182 | ||
| 1998/0209 | /* * Find a place for the cursor data in display memory. */ | |
| 1998/0829 | storage = ((scr->gscreen->width*BY2WD*scr->gscreen->r.max.y+1023)/1024); | |
| 1998/0209 | vgaxo(Crtx, 0x44, storage & 0xFF); vgaxo(Crtx, 0x45, (storage>>8) & 0xFF); | |
| 1998/0829 | storage *= 1024; | |
| 1998/0209 | scr->storage = storage; /* | |
| 1998/0522/sys/src/9/pc/vgacyber938x.c:209,215 – 1998/0829/sys/src/9/pc/vgacyber938x.c:187,193 | ||
| 1998/0209 | */ cyber938xcurload(scr, &arrow); cyber938xcurmove(scr, ZP); | |
| 1998/0214 |
| |
| 1998/0829 | vgaxo(Crtx, 0x50, CursorON); | |
| 1998/0205 | } VGAdev vgacyber938xdev = { | |
| 1998/0829/sys/src/9/pc/vgacyber938x.c:9,14 – 1999/0119/sys/src/9/pc/vgacyber938x.c:9,15 (short | long) | ||
| 1998/0205 | #define Image IMAGE #include <draw.h> #include <memdraw.h> | |
| 1999/0119 | #include <cursor.h> | |
| 1998/0205 | #include "screen.h" | |
| 1998/0829 | enum { | |
| 1999/0119/sys/src/9/pc/vgacyber938x.c:167,175 – 1999/1005/sys/src/9/pc/vgacyber938x.c:167,175 (short | long) | ||
| 1998/0209 | * Cursor colours. */ for(i = 0x48; i < 0x4C; i++) | |
| 1999/1005 | vgaxo(Crtx, i, 0x00); | |
| 1998/0209 | for(i = 0x4C; i < 0x50; i++) | |
| 1999/1005 | vgaxo(Crtx, i, 0xFF); | |
| 1998/0209 | /* * Find a place for the cursor data in display memory. | |
| 1999/1005/sys/src/9/pc/vgacyber938x.c:43,50 – 2001/0410/sys/src/9/pc/vgacyber938x.c:43,52 (short | long) | ||
| 1998/0205 | { ulong aperture, oaperture; int oapsize, wasupamem; | |
| 2001/0410 | int osize; | |
| 1998/0205 | Pcidev *p; | |
| 2001/0410 | osize = *size; | |
| 1998/0205 | oaperture = scr->aperture; oapsize = scr->apsize; wasupamem = scr->isupamem; | |
| 1999/1005/sys/src/9/pc/vgacyber938x.c:51,60 – 2001/0410/sys/src/9/pc/vgacyber938x.c:53,69 | ||
| 1998/0205 | if(wasupamem) upafree(oaperture, oapsize); scr->isupamem = 0; | |
| 2001/0410 | scr->mmio = 0; | |
| 1998/0205 | if(p = pcimatch(nil, 0x1023, 0)){ aperture = p->mem[0].bar & ~0x0F; *size = p->mem[0].size; | |
| 2001/0410 | /* * Heuristic to detect the MMIO space. We're flying blind * here, with only the XFree86 source to guide us. */ if(p->mem[1].size == 0x20000) scr->mmio = (ulong*)(p->mem[1].bar & ~0x0F); | |
| 1998/0205 | } else aperture = 0; | |
| 1999/1005/sys/src/9/pc/vgacyber938x.c:67,72 – 2001/0410/sys/src/9/pc/vgacyber938x.c:76,86 | ||
| 1998/0205 | else scr->isupamem = 1; | |
| 2001/0410 | if(aperture) addvgaseg("cyber938xscreen", aperture, osize); if(scr->mmio) addvgaseg("cyber938xmmio", (ulong)scr->mmio, 0x20000); | |
| 1998/0205 | return aperture; } | |
| 1999/1005/sys/src/9/pc/vgacyber938x.c:191,196 – 2001/0410/sys/src/9/pc/vgacyber938x.c:205,215 | ||
| 1998/0829 | vgaxo(Crtx, 0x50, CursorON); | |
| 1998/0205 | } | |
| 2001/0410 | static void cyber938xdrawinit(VGAscr *scr) { } | |
| 1998/0205 | VGAdev vgacyber938xdev = { "cyber938x", | |
| 1999/1005/sys/src/9/pc/vgacyber938x.c:198,203 – 2001/0410/sys/src/9/pc/vgacyber938x.c:217,223 | ||
| 1998/0205 | 0, /* disable */ cyber938xpage, /* page */ cyber938xlinear, /* linear */ | |
| 2001/0410 | cyber938xdrawinit, /* drawinit */ | |
| 1998/0205 | }; VGAcur vgacyber938xcur = { | |
| 2001/0410/sys/src/9/pc/vgacyber938x.c:205,223 – 2001/0430/sys/src/9/pc/vgacyber938x.c:205,218 (short | long) | ||
| 1998/0829 | vgaxo(Crtx, 0x50, CursorON); | |
| 1998/0205 | } | |
| 2001/0410 |
| |
| 1998/0205 | VGAdev vgacyber938xdev = { "cyber938x", | |
| 2001/0430 | nil, /* enable */ nil, /* disable */ | |
| 1998/0205 | cyber938xpage, /* page */ cyber938xlinear, /* linear */ | |
| 2001/0410 |
| |
| 2001/0430 | nil, /* drawinit */ | |
| 1998/0205 | }; VGAcur vgacyber938xcur = { | |
| 2001/0430/sys/src/9/pc/vgacyber938x.c:43,52 – 2001/0527/sys/src/9/pc/vgacyber938x.c:43,50 (short | long) | ||
| 1998/0205 | { ulong aperture, oaperture; int oapsize, wasupamem; | |
| 2001/0410 |
| |
| 1998/0205 | Pcidev *p; | |
| 2001/0410 |
| |
| 1998/0205 | oaperture = scr->aperture; oapsize = scr->apsize; wasupamem = scr->isupamem; | |
| 2001/0430/sys/src/9/pc/vgacyber938x.c:53,69 – 2001/0527/sys/src/9/pc/vgacyber938x.c:51,60 | ||
| 1998/0205 | if(wasupamem) upafree(oaperture, oapsize); scr->isupamem = 0; | |
| 2001/0410 |
| |
| 1998/0205 | if(p = pcimatch(nil, 0x1023, 0)){ aperture = p->mem[0].bar & ~0x0F; *size = p->mem[0].size; | |
| 2001/0410 |
| |
| 1998/0205 | } else aperture = 0; | |
| 2001/0430/sys/src/9/pc/vgacyber938x.c:76,86 – 2001/0527/sys/src/9/pc/vgacyber938x.c:67,72 | ||
| 1998/0205 | else scr->isupamem = 1; | |
| 2001/0410 |
| |
| 1998/0205 | return aperture; } | |
| 2001/0430/sys/src/9/pc/vgacyber938x.c:208,218 – 2001/0527/sys/src/9/pc/vgacyber938x.c:194,203 | ||
| 1998/0205 | VGAdev vgacyber938xdev = { "cyber938x", | |
| 2001/0430 |
| |
| 2001/0527 | 0, /* enable */ 0, /* disable */ | |
| 1998/0205 | cyber938xpage, /* page */ cyber938xlinear, /* linear */ | |
| 2001/0430 |
| |
| 1998/0205 | }; VGAcur vgacyber938xcur = { | |
| 2001/0527/sys/src/9/pc/vgacyber938x.c:43,50 – 2001/0908/sys/src/9/pc/vgacyber938x.c:43,52 (short | long) | ||
| 1998/0205 | { ulong aperture, oaperture; int oapsize, wasupamem; | |
| 2001/0908 | int osize; | |
| 1998/0205 | Pcidev *p; | |
| 2001/0908 | osize = *size; | |
| 1998/0205 | oaperture = scr->aperture; oapsize = scr->apsize; wasupamem = scr->isupamem; | |
| 2001/0527/sys/src/9/pc/vgacyber938x.c:51,60 – 2001/0908/sys/src/9/pc/vgacyber938x.c:53,69 | ||
| 1998/0205 | if(wasupamem) upafree(oaperture, oapsize); scr->isupamem = 0; | |
| 2001/0908 | scr->mmio = 0; | |
| 1998/0205 | if(p = pcimatch(nil, 0x1023, 0)){ aperture = p->mem[0].bar & ~0x0F; *size = p->mem[0].size; | |
| 2001/0908 | /* * Heuristic to detect the MMIO space. We're flying blind * here, with only the XFree86 source to guide us. */ if(p->mem[1].size == 0x20000) scr->mmio = (ulong*)(p->mem[1].bar & ~0x0F); | |
| 1998/0205 | } else aperture = 0; | |
| 2001/0527/sys/src/9/pc/vgacyber938x.c:67,72 – 2001/0908/sys/src/9/pc/vgacyber938x.c:76,86 | ||
| 1998/0205 | else scr->isupamem = 1; | |
| 2001/0908 | if(aperture) addvgaseg("cyber938xscreen", aperture, osize); if(scr->mmio) addvgaseg("cyber938xmmio", (ulong)scr->mmio, 0x20000); | |
| 1998/0205 | return aperture; } | |
| 2001/0527/sys/src/9/pc/vgacyber938x.c:194,203 – 2001/0908/sys/src/9/pc/vgacyber938x.c:208,218 | ||
| 1998/0205 | VGAdev vgacyber938xdev = { "cyber938x", | |
| 2001/0527 |
| |
| 2001/0908 | nil, /* enable */ nil, /* disable */ | |
| 1998/0205 | cyber938xpage, /* page */ cyber938xlinear, /* linear */ | |
| 2001/0908 | nil, /* drawinit */ | |
| 1998/0205 | }; VGAcur vgacyber938xcur = { | |