Commit | Line | Data |
---|---|---|
60f56dfc KM |
1 | /* |
2 | * Copyright (c) 1988 University of Utah. | |
3 | * Copyright (c) 1990 The Regents of the University of California. | |
4 | * All rights reserved. | |
5 | * | |
6 | * This code is derived from software contributed to Berkeley by | |
7 | * the Systems Programming Group of the University of Utah Computer | |
8 | * Science Department. | |
9 | * | |
10 | * %sccs.include.redist.c% | |
11 | * | |
2f63f82e | 12 | * from: Utah $Hdr: grf_gbreg.h 1.1 90/07/09$ |
60f56dfc | 13 | * |
2f63f82e | 14 | * @(#)grf_gbreg.h 7.2 (Berkeley) %G% |
60f56dfc KM |
15 | */ |
16 | ||
17 | /* | |
18 | * Gatorbox driver regs | |
19 | */ | |
20 | ||
21 | #define TILER_ENABLE 0x80 | |
22 | #define LINE_MOVER_ENABLE 0x80 | |
23 | #define UP_LEFT 0x00 | |
24 | #define DOWN_RIGHT 0x40 | |
25 | #define MOVE_UP_LEFT TILER_ENABLE|UP_LEFT | |
26 | #define MOVE_DOWN_RIGHT TILER_ENABLE|DOWN_RIGHT | |
27 | ||
28 | #define tile_mover_waitbusy(regaddr) \ | |
29 | while (((struct gboxfb *)(regaddr))->sec_interrupt & 0x10) | |
30 | ||
31 | #define line_mover_waitbusy(regaddr) \ | |
32 | while ((((struct gboxfb *)(regaddr))->status & 0x80) == 0) | |
33 | ||
34 | #define gbcm_waitbusy(regaddr) \ | |
35 | while (((struct gboxfb *)(regaddr))->cmap_busy != 0xff) | |
36 | ||
37 | #define vu_char volatile u_char | |
38 | ||
39 | struct gboxfb { | |
40 | u_char :8; | |
41 | vu_char reset; /* reset register 0x01 */ | |
42 | vu_char sec_interrupt; /* Secondary interrupt register 0x03 */ | |
43 | vu_char interrupt; /* interrupt register 0x03 */ | |
44 | u_char :8; | |
45 | vu_char fbwmsb; /* frame buffer width MSB 0x05 */ | |
46 | u_char :8; | |
47 | vu_char fbwlsb; /* frame buffer width MSB 0x07 */ | |
48 | u_char :8; | |
49 | vu_char fbhmsb; /* frame buffer height MSB 0x09 */ | |
50 | u_char :8; | |
51 | vu_char fbhlsb; /* frame buffer height MSB 0x0b */ | |
52 | u_char :8; | |
53 | vu_char dwmsb; /* display width MSB 0x0d */ | |
54 | u_char :8; | |
55 | vu_char dwlsb; /* display width MSB 0x0f */ | |
56 | u_char :8; | |
57 | vu_char dhmsb; /* display height MSB 0x11 */ | |
58 | u_char :8; | |
59 | vu_char dhlsb; /* display height MSB 0x13 */ | |
60 | u_char :8; | |
61 | vu_char fbid; /* Scondary frame buffer id 0x15 */ | |
62 | u_char f1[0x5d-0x15-1]; | |
63 | vu_char fbomsb; /* frame buffer offset MSB 0x5d */ | |
64 | u_char :8; | |
65 | vu_char fbolsb; /* frame buffer offset LSB 0x5f */ | |
66 | u_char f2[0x4000-0x5f-1]; | |
67 | vu_char crtc_address; /* CTR controller address reg 0x4000 */ | |
68 | vu_char status; /* Status register 0x4001 */ | |
69 | vu_char crtc_data; /* CTR controller data reg 0x4002 */ | |
70 | u_char f3[6]; | |
71 | vu_char line_mover_rep_rule; /* Line move rep rule */ | |
72 | u_char :8, :8; | |
73 | vu_char line_mover_width; /* Line move width */ | |
74 | u_char f4[0xff3]; | |
75 | vu_char width; /* width in tiles 0x5001 */ | |
76 | u_char :8; | |
77 | vu_char height; /* height in tiles 0x5003 */ | |
78 | u_char f5[3]; | |
79 | vu_char rep_rule; /* replacement rule 0x5007 */ | |
80 | u_char f6[0x6001-0x5007-1]; | |
81 | vu_char blink1; /* blink 1 0x6001 */ | |
82 | u_char f7[3]; | |
83 | vu_char blink2; /* blink 2 0x6005 */ | |
84 | u_char f8[3]; | |
85 | vu_char write_protect; /* write protect 0x6009 */ | |
86 | u_char f9[0x6803-0x6009-1]; | |
87 | vu_char cmap_busy; /* color map busy 0x6803 */ | |
88 | u_char f10[0x68b9-0x6803-1]; | |
89 | vu_char creg_select; /* color map register select 0x68b8 */ | |
90 | u_char f11[0x68f1-0x68b9-1]; | |
91 | vu_char cmap_write; /* color map write trigger 0x68f1 */ | |
92 | u_char f12[0x69b3-0x68f1-1]; | |
93 | vu_char cmap_red; /* red value register 0x69b3 */ | |
94 | u_char :8; | |
95 | vu_char cmap_grn; /* green value register 0x69b5 */ | |
96 | u_char :8; | |
97 | vu_char cmap_blu; /* blue value register 0x69b6 */ | |
98 | }; |