* 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.22 89/04/11$
* @(#)ite_tc.c 7.3 (Berkeley) %G%
#define REGBASE ((struct tcboxfb *)(ip->regbase))
#define WINDOWMOVER topcat_windowmove
register struct ite_softc
*ip
;
if (ip
->regbase
== NULL
) {
struct grfinfo
*gi
= &grf_softc
[ip
- ite_softc
].g_display
;
ip
->regbase
= IOV(gi
->gd_regaddr
);
ip
->fbbase
= IOV(gi
->gd_fbaddr
);
* 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
);
* Initialize color map for color displays
if (ip
->planemask
!= 1) {
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
);
register struct ite_softc
*ip
;
topcat_windowmove(ip
, 0, 0, 0, 0, ip
->fbheight
, ip
->fbwidth
, RR_CLEAR
);
tc_waitbusy(REGADDR
, ip
->planemask
);
ip
->flags
&= ~ITE_INITED
;
topcat_putc(ip
, c
, dy
, dx
, mode
)
register struct ite_softc
*ip
;
int wmrr
= ((mode
== ATTR_INV
) ? RR_COPYINVERTED
: RR_COPY
);
topcat_windowmove(ip
, charY(ip
, c
), charX(ip
, c
),
dy
* ip
->ftheight
, dx
* ip
->ftwidth
,
ip
->ftheight
, ip
->ftwidth
, wmrr
);
register struct ite_softc
*ip
;
else if (flag
== MOVE_CURSOR
) {
topcat_clear(ip
, sy
, sx
, h
, w
)
register struct ite_softc
*ip
;
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 width
= ip
->cols
;
topcat_cursor(ip
, ERASE_CURSOR
);
else if (dir
== SCROLL_DOWN
) {
height
= ip
->rows
- dy
- 1;
else if (dir
== SCROLL_RIGHT
) {
topcat_windowmove(ip
, sy
* ip
->ftheight
, sx
* ip
->ftwidth
,
dy
* ip
->ftheight
, dx
* ip
->ftwidth
,
width
* 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
;