Annotation of 43BSDTahoe/new/X/libibm/libsrc/pqd.c, revision 1.1

1.1     ! root        1: #ifndef lint
        !             2: static char *rcsid_pqd_c = "$Header: pqd.c,v 10.1 86/11/19 10:43:30 jg Exp $";
        !             3: #endif lint
        !             4: /*
        !             5:  * pqd.c               device initialization
        !             6:  *
        !             7:  *     pqd_init        pqd initialization routine
        !             8:  *
        !             9:  *     Author:
        !            10:  *             Scott Bates
        !            11:  *             Brown University
        !            12:  *             IRIS, Box 1946
        !            13:  *             Providence, RI 02912
        !            14:  *
        !            15:  *
        !            16:  *             Copyright (c) 1986 Brown University
        !            17:  *
        !            18:  * Permission to use, copy, modify and distribute this software and its
        !            19:  * documentation for any purpose and without fee is hereby granted, provided
        !            20:  * that the above copyright notice appear in all copies, and that both
        !            21:  * that copyright notice and this permission notice appear in supporting
        !            22:  * documentation, and that the name of Brown University not be used in
        !            23:  * advertising or publicity pertaining to distribution of the software
        !            24:  * without specific, written prior permission. Brown University makes no
        !            25:  * representations about the suitability of this software for any purpose.
        !            26:  * It is provided "as-is" without express or implied warranty.
        !            27:  */
        !            28: 
        !            29: #include "private.h"
        !            30: #include "bitblt.h"
        !            31: #include "pqd.h"
        !            32: 
        !            33: /*
        !            34:  * This routine resets and then tests for the PQD screen.
        !            35:  */
        !            36: 
        !            37: pqd_init()
        !            38: {
        !            39:        register unsigned short *screen;
        !            40:        register i,j;
        !            41: 
        !            42: #ifdef TRACE_X
        !            43:         fprintf (stderr, "In pqd_init\n");
        !            44:         fflush (stderr);
        !            45: #endif TRACE_X
        !            46: 
        !            47:        /*
        !            48:         * Initialize all registers then clear (or set) each plane not to be
        !            49:         * used.
        !            50:         */
        !            51: 
        !            52:        *(u_short *)PQD_WM1 = 0xFFFF;
        !            53:        *(u_short *)PQD_WM0 = 0xFFFF;
        !            54:        *(u_short *)PQD_VCR = 0x1F00;
        !            55:        *(u_short *)PQD_WCR = 0x8000;
        !            56:  
        !            57:        SET_PLANE(RW_PLANE2 | RW_PLANE3);
        !            58: 
        !            59:        /*
        !            60:         * Test for the screen.
        !            61:         */
        !            62: 
        !            63:        *(u_short *)SCREEN_BASE = 0x0F0F;
        !            64:        if (*(u_short *)SCREEN_BASE != 0x0F0F) {
        !            65:                 DeviceError("pqd not found !!");
        !            66:                exit(2);
        !            67:        } else {
        !            68:                /*
        !            69:                 * Clear every plane.
        !            70:                 */
        !            71: 
        !            72:                for (i = 0; i < 4; i++) {
        !            73:                        SELECT_PLANE(i);
        !            74:                        screen = (u_short *)SCREEN_BASE;
        !            75:                        j = (REAL_SCREEN_WIDTH >> 4) * REAL_SCREEN_HEIGHT;
        !            76:                        for (; j > 0; j--)
        !            77:                                *screen++ = 0;
        !            78:                }
        !            79:                SET_PLANE(RW_PLANE2 | RW_PLANE3);
        !            80:        }
        !            81: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.