2 #include "../port/lib.h"
7 #include "../port/error.h"
16 ct65545page(VGAscr*, int page)
23 ct65545disable(VGAscr*)
29 ct65545enable(VGAscr* scr)
34 * Find a place for the cursor data in display memory.
35 * Must be on a 1024-byte boundary.
37 storage = ROUND(scr->gscreen->width*BY2WD*scr->gscreen->r.max.y, 1024);
38 outl(0xB3D0, storage);
39 scr->storage = storage;
45 outl(0xA7D0, 0xFFFF0000);
50 ct65545initcursor(VGAscr* scr, int xo, int yo, int index)
53 uint and, clr, set, xor;
57 mem += scr->storage + index*1024;
59 for(y = yo; y < 16; y++){
60 clr = (scr->clr[2*y]<<8)|scr->clr[2*y+1];
61 set = (scr->set[2*y]<<8)|scr->set[2*y+1];
69 for(i = 0; i < 16; i++){
83 for(x = 16; x < 64; x += 8){
89 for(x = 0; x < 64; x += 8){
98 ct65545load(VGAscr* scr, Cursor* curs)
100 memmove(&scr->Cursor, curs, sizeof(Cursor));
101 ct65545initcursor(scr, 0, 0, 0);
105 ct65545move(VGAscr* scr, Point p)
107 int index, x, xo, y, yo;
110 if((x = p.x+scr->offset.x) < 0){
116 if((y = p.y+scr->offset.y) < 0){
124 ct65545initcursor(scr, xo, yo, 1);
127 outl(0xB3D0, scr->storage + index*1024);
129 outl(0xAFD0, (y<<16)|x);
134 VGAdev vgact65545dev = {
135 "ct65540", /* BUG: really 65545 */
143 VGAcur vgact65545cur = {