* 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_tc.c 1.9 89/02/20$
* @(#)ite_tc.c 7.2 (Berkeley) %G%
#include "../dev/itevar.h"
#include "../dev/itereg.h"
#include "../dev/grfvar.h"
#include "../dev/grf_tcreg.h"
#define REGBASE ((struct tcboxfb *)(ip->regbase))
#define WINDOWMOVER topcat_windowmove
register struct ite_softc
*ip
;
* Determine the number of planes by writing to the first frame
* buffer display location, then reading it back.
* Enable reading/writing of all the planes.
REGBASE
->fben
= ip
->planemask
;
REGBASE
->wen
= ip
->planemask
;
REGBASE
->ren
= ip
->planemask
;
* Clear the framebuffer on all planes.
topcat_windowmove(ip
, 0, 0, 0, 0, ip
->fbheight
, ip
->fbwidth
, RR_CLEAR
);
tc_waitbusy(REGADDR
, ip
->planemask
);
* Stash the inverted cursor.
topcat_windowmove(ip
, charY(ip
, ' '), charX(ip
, ' '),
ip
->cblanky
, ip
->cblankx
, ip
->ftheight
,
ip
->ftwidth
, RR_COPYINVERTED
);
topcat_putc(ip
, c
, dy
, dx
, mode
)
register struct ite_softc
*ip
;
topcat_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
) {
topcat_clear(ip
, sy
, sx
, h
, w
)
register int sy
, sx
, h
, w
;
topcat_windowmove(ip
, sy
* ip
->ftheight
, sx
* ip
->ftwidth
,
sy
* ip
->ftheight
, sx
* ip
->ftwidth
,
h
* ip
->ftheight
, w
* ip
->ftwidth
,
topcat_scroll(ip
, sy
, sx
, count
, dir
)
register struct ite_softc
*ip
;
register int dy
= sy
- count
;
register int height
= ip
->rows
- sy
;
topcat_cursor(ip
, ERASE_CURSOR
);
topcat_windowmove(ip
, sy
* ip
->ftheight
, sx
* ip
->ftwidth
,
dy
* ip
->ftheight
, sx
* ip
->ftwidth
,
ip
->cols
* ip
->ftwidth
, RR_COPY
);
topcat_windowmove(ip
, sy
, sx
, dy
, dx
, h
, w
, func
)
int sy
, sx
, dy
, dx
, h
, w
, func
;
register struct tcboxfb
*rp
= REGBASE
;
tc_waitbusy(REGADDR
, ip
->planemask
);
rp
->wmove
= ip
->planemask
;