plan 9 kernel history: overview | file list | diff list

1992/0603/pc/vga.c (diff list | history)

1992/0528/sys/src/9/pc/vga.c:26,351992/0603/sys/src/9/pc/vga.c:26,31 (short | long | prev | next)
1992/0502    
 
#define MAXX	640 
#define MAXY	480 
1992/0527    
/* 
1992/0520    
#define MAXX	800 
#define MAXY	600 
1992/0527    
*/ 
1991/0730    
 
#define SCREENMEM	(0xA0000 | KZERO) 
 
1992/0528/sys/src/9/pc/vga.c:76,1031992/0603/sys/src/9/pc/vga.c:72,77
1992/0418    
	0x01, 0x10, 0x0f, 0x00, 0x00, 
1992/0414    
}; 
1992/0418    
 
1992/0430    
/* 
1992/0527    
 *  cardinal (tseng labs) 800x600 display, 16 bit color.  
1992/0430    
 */ 
1992/0527    
VGAmode mode25 =  
1992/0430    
{ 
	/* general */ 
1992/0527    
	0xe3, 0x00,  /* 0x70, 0x04, these are read-only */ 
1992/0430    
	/* sequence */ 
	0x03, 0x01, 0x0f, 0x00, 0x06, 
	/* crt */ 
1992/0527    
	0x5f, 0x4f, 0x50, 0x02, 0x54, 0x80, 0x0b, 0x3e, 
	0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 
	0xea, 0x8c, 0xdf, 0x28, 0x00, 0xe7, 0x04, 0xe3, 
1992/0520    
	0xff, 
	/* graphics */ 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 
	0xff, 
	/* attribute */ 
	0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 
	0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x3f, 
	0x01, 0x10, 0x0f, 0x00, 0x00, 
1992/0430    
}; 
 
1991/0724    
void 
1991/1113    
genout(int reg, int val) 
1992/0528/sys/src/9/pc/vga.c:141,1671992/0603/sys/src/9/pc/vga.c:115,120
1991/0727    
	outb(CR, val); 
} 
1991/1107    
 
1991/0723    
/* 
1991/0727    
 *  m is a bit mask of planes to be affected by CPU writes 
1991/0723    
 */ 
1991/0727    
vgawrmask(int m) 
{ 
	srout(Smmask, m&0xf); 
} 
                 
/* 
 *  p is the plane that will respond to CPU reads 
 */ 
vgardplane(int p) 
{ 
	grout(Grms, p&3); 
} 
                 
1991/1112    
vgadump(void) 
{ 
	print("misc is 0x%ux fc is 0x%ux\n", inb(EMISCR), inb(EFCR)); 
} 
                 
1991/1113    
void 
setmode(VGAmode *v) 
1991/1112    
{ 
1992/0528/sys/src/9/pc/vga.c:272,2771992/0603/sys/src/9/pc/vga.c:225,241
1992/0423    
#endif 
 
void 
1992/0603    
setscreen(int maxx, int maxy, int bpp) { 
	gbitblt(&gscreen, Pt(0, 0), &gscreen, gscreen.r, flipD[S]); 
	gscreen.width = maxx/32; 
	gscreen.r.max = Pt(maxx, maxy); 
	gbitblt(&gscreen, Pt(0, 0), &gscreen, gscreen.r, flipD[0]); 
	out.pos.x = MINX; 
	out.pos.y = 0; 
	out.bwid = defont0.info[' '].width; 
} 
 
void 
1991/0730    
screeninit(void) 
1991/0723    
{ 
1991/0727    
	int i, j, k; 
1992/0528/sys/src/9/pc/vga.c:290,3001992/0603/sys/src/9/pc/vga.c:254,260
1991/0801    
	l = defont->bits->base; 
	for(i = defont->bits->width*Dy(defont->bits->r); i > 0; i--, l++) 
		*l = (*l<<24) | ((*l>>8)&0x0000ff00) | ((*l<<8)&0x00ff0000) | (*l>>24); 
                 
	gbitblt(&gscreen, Pt(0, 0), &gscreen, gscreen.r, flipD[0]); 
1991/0730    
	out.pos.x = MINX; 
	out.pos.y = 0; 
	out.bwid = defont0.info[' '].width; 
1992/0603    
	setscreen(MAXX, MAXY, 1); 
1991/0723    
} 
1991/0727    
 
1991/0730    
void 
1992/0528/sys/src/9/pc/vga.c:394,4271992/0603/sys/src/9/pc/vga.c:354,359
1991/0730    
{ 
	mouseupdate(1); 
1991/0927    
} 
                 
vgaset(char *cmd) 
{ 
	int set; 
	int reg; 
	int val; 
                 
	set = *cmd++; 
	cmd++; 
	reg = strtoul(cmd, &cmd, 0); 
	cmd++; 
	val = strtoul(cmd, &cmd, 0); 
	switch(set){ 
	case 'a': 
		arout(reg, val); 
		break; 
	case 'g': 
		grout(reg, val); 
		break; 
	case 'c': 
		crout(reg, val); 
		break; 
	case 's': 
		srout(reg, val); 
		break; 
	} 
1991/1113    
} 
                 
 
/* 
 *  a fatter than usual cursor for the safari 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)