* 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
* %sccs.include.redist.c%
* from: Utah $Hdr: ite_dv.c 1.1 89/02/28$
* @(#)ite_dv.c 7.2 (Berkeley) %G%
#include "../dev/itevar.h"
#include "../dev/itereg.h"
#include "../dev/grfvar.h"
#include "../dev/grf_dvreg.h"
#define REGBASE ((struct dvboxfb *)(ip->regbase))
#define WINDOWMOVER dvbox_windowmove
* 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_putc(ip
, c
, dy
, dx
, mode
)
register struct ite_softc
*ip
;
dvbox_windowmove(ip
, charY(ip
, c
), charX(ip
, c
),
dy
* ip
->ftheight
, dx
* ip
->ftwidth
,
ip
->ftheight
, ip
->ftwidth
, RR_COPY
);
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 dy
= sy
- count
;
register int height
= ip
->rows
- sy
;
dvbox_cursor(ip
, ERASE_CURSOR
);
dvbox_windowmove(ip
, sy
* ip
->ftheight
, sx
* ip
->ftwidth
,
dy
* ip
->ftheight
, sx
* ip
->ftwidth
,
ip
->cols
* 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
;
register struct dvboxfb
*dbp
;
while (dbp
->wbusy
& 0x01)
* Start of missing ROM code.
* End of missing ROM code.