Change 3 glyphs according to SRAM flags (0xed0059),

when ITELOADFONT ioctl is issued.
This commit is contained in:
isaki 2001-10-21 03:46:30 +00:00
parent 74242463f6
commit 3c63a64cab
3 changed files with 22 additions and 11 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ite.c,v 1.25 2001/05/02 10:32:21 scw Exp $ */
/* $NetBSD: ite.c,v 1.26 2001/10/21 03:46:30 isaki Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -521,6 +521,7 @@ iteioctl(dev, cmd, addr, flag, p)
case ITELOADFONT:
if (addr) {
bcopy(addr, kern_font, 4096 /*sizeof (kernel_font)*/);
ite_set_glyph();
return 0;
} else
return EFAULT;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ite_tv.c,v 1.7 1999/06/27 14:14:30 minoura Exp $ */
/* $NetBSD: ite_tv.c,v 1.8 2001/10/21 03:46:31 isaki Exp $ */
/*
* Copyright (c) 1997 Masaru Oki.
@ -136,6 +136,22 @@ txrascpy (src, dst, size, mode)
CRTC.r21 = saved_r21;
}
/*
* Change glyphs from SRAM switch.
*/
void
ite_set_glyph(void)
{
u_char glyph = IODEVbase->io_sram[0x59];
if (glyph & 4)
SETGLYPH(0x82, '|');
if (glyph & 2)
SETGLYPH(0x81, '~');
if (glyph & 1)
SETGLYPH(0x80, '\\');
}
/*
* Initialize
*/
@ -144,7 +160,6 @@ tv_init(ip)
struct ite_softc *ip;
{
short i;
u_char glyph = IODEVbase->io_sram[0x59];
/*
* initialize private variables
@ -154,13 +169,7 @@ tv_init(ip)
tv_row[i] = (void *)&IODEVbase->tvram[ROWOFFSET(i)];
/* shadow ANK font */
bcopy((void *)&IODEVbase->cgrom0_8x16, kern_font, 256 * FONTHEIGHT);
/* glyph */
if (glyph & 4)
SETGLYPH(0x82, '|');
if (glyph & 2)
SETGLYPH(0x81, '~');
if (glyph & 1)
SETGLYPH(0x80, '\\');
ite_set_glyph();
/* set font address cache */
for (i = 0; i < 256; i++)
tv_font[i] = &kern_font[i * FONTHEIGHT];

View File

@ -1,4 +1,4 @@
/* $NetBSD: itevar.h,v 1.5 1999/03/24 14:11:47 minoura Exp $ */
/* $NetBSD: itevar.h,v 1.6 2001/10/21 03:46:31 isaki Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -263,5 +263,6 @@ extern unsigned char kern_font[];
/* keyboard LED status variable */
extern unsigned char kbdled;
void ite_set_glyph __P((void));
void kbd_setLED __P((void));
#endif