-/**********************************************************************
-*
-* ldcursor()... load the mouse cursor's template RAM bitmap
-*
-*********************************************************************
-*
-* calling convention:
-*
-* ldcursor(unit, bitmap);
-* u_int unit;
-* short *bitmap;
-*
-****************/
-
-ldcursor(unit, bitmap)
-u_int unit;
-short *bitmap;
-{
- register struct dga *dga;
- register short *temp;
- register int i;
-
- int cursor;
-
- dga = (struct dga *) qdmap[unit].dga;
- temp = (short *) qdmap[unit].template;
-
- if (dga->csr & CURS_ENB) { /* if the cursor is enabled.. */
- cursor = -1; /* ..note that.. */
- dga->csr &= ~CURS_ENB; /* ..and shut it off */
- }
- else {
- cursor = 0;
- }
-
- dga->csr &= ~CURS_ENB; /* shut off the cursor */
-
- temp += (8 * 1024) - 32; /* cursor is 32 WORDS from the end */
- /* ..of the 8k WORD template space */
- for (i = 0; i < 32; ++i)
- *temp++ = *bitmap++;
-
- if (cursor) { /* if cursor was enabled.. */
- dga->csr |= CURS_ENB; /* ..turn it back on */
- }
-
- return(0);
-
-} /* ldcursor */
-
-/**********************************************************************
-*
-* ldfont()... put the console font in the QDSS off-screen memory
-*
-***********************************************************************
-*
-* calling convention:
-*
-* ldfont(unit);
-* u_int unit; ;QDSS unit number
-*
-****************/
-
-ldfont(unit)
-u_int unit;
-{
- register struct adder *adder;
-
- int i; /* scratch variables */
- int j;
- int k;
- short packed;
-
- adder = (struct adder *) qdmap[unit].adder;
-
- /*------------------------------------------
- * setup VIPER operand control registers */
-
- write_ID(adder, MASK_1, 0xFFFF);
- write_ID(adder, VIPER_Z_LOAD | FOREGROUND_COLOR_Z, 255);
- write_ID(adder, VIPER_Z_LOAD | BACKGROUND_COLOR_Z, 0);
-
- write_ID(adder, SRC1_OCR_B,
- EXT_NONE | INT_NONE | ID | BAR_SHIFT_DELAY);
- write_ID(adder, SRC2_OCR_B,
- EXT_NONE | INT_NONE | ID | BAR_SHIFT_DELAY);
- write_ID(adder, DST_OCR_B,
- EXT_SOURCE | INT_NONE | NO_ID | NO_BAR_SHIFT_DELAY);
-
- adder->rasterop_mode = DST_WRITE_ENABLE | DST_INDEX_ENABLE | NORMAL;
-
- /*--------------------------
- * load destination data */
-
- wait_status(adder, RASTEROP_COMPLETE);
-
- adder->destination_x = FONT_X;
- adder->destination_y = FONT_Y;
- adder->fast_dest_dx = FONT_WIDTH;
- adder->slow_dest_dy = CHAR_HEIGHT;
-
- /*---------------------------------------
- * setup for processor to bitmap xfer */
-
- write_ID(adder, CS_UPDATE_MASK, 0x0001);
- adder->cmd = PBT | OCRB | 2 | DTE | 2;
-
- /*-----------------------------------------------
- * iteratively do the processor to bitmap xfer */
-
- for (i = 0; i < ROWS; ++i) {
-
- /* PTOB a scan line */
-
- for (j = 0, k = i; j < 48; ++j) {
-
- /* PTOB one scan of a char cell */
-
- packed = q_font[k];
- k += ROWS;
- packed |= ((short)q_font[k] << 8);
- k += ROWS;
-
- wait_status(adder, TX_READY);
- adder->id_data = packed;
- }
- }
-
-} /* ldfont */
-
-/*********************************************************************
-*
-* led_control()... twiddle LK-201 LED's
-*
-**********************************************************************
-*
-* led_control(unit, cmd, led_mask);
-* u_int unit; QDSS number
-* int cmd; LED enable/disable command
-* int led_mask; which LED(s) to twiddle
-*
-*************/
-