* Copyright (c) 1988 University of Utah.
* Copyright (c) 1990 The Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* the Systems Programming Group of the University of Utah Computer
* Redistribution is only permitted until one year after the first shipment
* of 4.4BSD by the Regents. Otherwise, redistribution and use in source and
* binary forms are permitted provided that: (1) source distributions retain
* this entire copyright notice and comment, and (2) distributions including
* binaries display the following acknowledgement: This product includes
* software developed by the University of California, Berkeley and its
* contributors'' in the documentation or other materials provided with the
* distribution and in all advertising materials mentioning features or use
* of this software. Neither the name of the University nor the names of
* its contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
* from: Utah $Hdr: ite_dv.c 1.5 89/04/11$
* @(#)ite_dv.c 7.1 (Berkeley) 5/8/90
#define REGBASE ((struct dvboxfb *)(ip->regbase))
#define WINDOWMOVER dvbox_windowmove
struct grfinfo
*gi
= &grf_softc
[ip
- ite_softc
].g_display
;
ip
->regbase
= IOV(gi
->gd_regaddr
);
ip
->fbbase
= IOV(gi
->gd_fbaddr
);
* Turn on frame buffer, turn on overlay planes, set replacement
* rule, enable top overlay plane writes for ite, disable all frame
* buffer planes, set byte per pixel, and display frame buffer 0.
* Lastly, turn on the box.
REGBASE
->interrupt
= 0x04;
REGBASE
->rep_rule
= RR_COPY
<< 4 | RR_COPY
;
* Video enable top overlay plane.
* Make sure that overlay planes override frame buffer planes.
* Setup the overlay colormaps. Need to set the 0,1 (black/white)
for (i
= 0; i
<= 1; i
++) {
REGBASE
->rgb
[0].red
= 0x00;
REGBASE
->rgb
[0].green
= 0x00;
REGBASE
->rgb
[0].blue
= 0x00;
REGBASE
->rgb
[1].red
= 0xFF;
REGBASE
->rgb
[1].green
= 0xFF;
REGBASE
->rgb
[1].blue
= 0xFF;
* Clear the (visible) framebuffer.
dvbox_windowmove(ip
, 0, 0, 0, 0, ip
->dheight
, ip
->dwidth
, RR_CLEAR
);
* Stash the inverted cursor.
dvbox_windowmove(ip
, charY(ip
, ' '), charX(ip
, ' '),
ip
->cblanky
, ip
->cblankx
, ip
->ftheight
,
ip
->ftwidth
, RR_COPYINVERTED
);
dvbox_windowmove(ip
, 0, 0, 0, 0, ip
->fbheight
, ip
->fbwidth
, RR_CLEAR
);
ip
->flags
&= ~ITE_INITED
;
dvbox_putc(ip
, c
, dy
, dx
, mode
)
register struct ite_softc
*ip
;
register int wrr
= ((mode
== ATTR_INV
) ? RR_COPYINVERTED
: RR_COPY
);
dvbox_windowmove(ip
, charY(ip
, c
), charX(ip
, c
),
dy
* ip
->ftheight
, dx
* ip
->ftwidth
,
ip
->ftheight
, ip
->ftwidth
, wrr
);
register struct ite_softc
*ip
;
else if (flag
== MOVE_CURSOR
) {
dvbox_clear(ip
, sy
, sx
, h
, w
)
register int sy
, sx
, h
, w
;
dvbox_windowmove(ip
, sy
* ip
->ftheight
, sx
* ip
->ftwidth
,
sy
* ip
->ftheight
, sx
* ip
->ftwidth
,
h
* ip
->ftheight
, w
* ip
->ftwidth
,
dvbox_scroll(ip
, sy
, sx
, count
, dir
)
register struct ite_softc
*ip
;
register int width
= ip
->cols
;
dvbox_cursor(ip
, ERASE_CURSOR
);
else if (dir
== SCROLL_DOWN
) {
height
= ip
->rows
- dy
- 1;
else if (dir
== SCROLL_RIGHT
) {
dvbox_windowmove(ip
, sy
* ip
->ftheight
, sx
* ip
->ftwidth
,
dy
* ip
->ftheight
, dx
* ip
->ftwidth
,
width
* ip
->ftwidth
, RR_COPY
);
dvbox_windowmove(ip
, sy
, sx
, dy
, dx
, h
, w
, func
)
int sy
, sx
, dy
, dx
, h
, w
, func
;
register struct dvboxfb
*dp
= REGBASE
;
dp
->rep_rule
= func
<< 4 | func
;