|
|
1.1 root 1: #ifndef lint
2: static char *rcsid_apa8_c = "$Header: apa8.c,v 10.1 86/11/19 10:39:37 jg Exp $";
3: #endif lint
4: /*
5: * apa8.c device initialization
6: *
7: * apa8_init apa8 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 "apa8.h"
32:
33: apa8_init()
34: {
35: u_char tmp;
36:
37: #ifdef TRACE_X
38: fprintf (stderr, "In apa8_init\n");
39: fflush (stderr);
40: #endif TRACE_X
41:
42: /*
43: * Initialize (reset) the APA-8 screen
44: */
45:
46: /*
47: * Set up the write and data mask.
48: */
49:
50: SET_WRITEMASK(NOMASK);
51: SET_DATAMASK(HIDDEN_DM);
52:
53: /*
54: * Set up the APA8 control register to use its system read/write
55: * calls in the X direction.
56: */
57:
58: SET_FC(DCR_VEN | DCR_SEN | DCR_SWR | DCR_X | HIDDEN_FUNC);
59:
60: /*
61: * Test for the APA8 screen.
62: */
63:
64: tmp = *(u_char *)SCREEN_BASE;
65: *(u_char *)SCREEN_BASE = 0x0F;
66: if (*(u_char *)SCREEN_BASE != 0x0F) {
67: DeviceError("apa8 not found !!");
68: exit(2);
69: }
70: *(u_char *)SCREEN_BASE = tmp;
71: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.