x68kReg.h revision ba64b02e
1/* $NetBSD: x68kReg.h,v 1.1 2014/03/01 19:34:47 tsutsui Exp $ */
2/*-------------------------------------------------------------------------
3 * Copyright (c) 1996 Yasushi Yamasaki
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 *    notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 *    notice, this list of conditions and the following disclaimer in the
13 *    documentation and/or other materials provided with the distribution.
14 * 3. All advertising materials mentioning features or use of this software
15 *    must display the following acknowledgement:
16 *      This product includes software developed by Yasushi Yamasaki
17 * 4. The name of the author may not be used to endorse or promote products
18 *    derived from this software without specific prior written permission
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 *-----------------------------------------------------------------------*/
31
32/*
33 * CRT controller
34 */
35typedef struct {
36    u_short r00, r01, r02, r03, r04, r05, r06, r07;
37    u_short r08, r09, r10, r11, r12, r13, r14, r15;
38    u_short r16, r17, r18, r19, r20, r21, r22, r23;
39    char pad0[0x450];
40    u_short ctrl;
41    char pad1[0x1b7e];
42} Crtc;
43
44typedef struct {
45    u_short r00, r01, r02, r03, r04, r05, r06, r07;
46    u_short r08, r09, r10, r11, r12, r13, r14, r15;
47    u_short r16, r17, r18, r19, r20, r21, r22, r23;
48    u_short ctrl;
49} X68kCrtc;
50
51/*
52 * video controller
53 */
54typedef struct {
55    u_short r0;
56    char pad0[0xfe];
57    u_short r1;
58    char pad1[0xfe];
59    u_short r2;
60    char pad2[0x19fe];
61} Videoc;
62
63typedef struct {
64    u_short r0;
65    u_short r1;
66    u_short r2;
67} X68kVideoc;
68
69/* system port */
70typedef struct {
71    u_short r1, r2, r3, r4;
72    u_short pad0[2];
73    u_short r5, r6;
74    u_short pad[0x1ff0];
75} Sysport;
76
77/*
78 * control registers
79 */
80typedef struct {
81    Crtc crtc;
82    u_short gpal[256];    /* graphic palette */
83    u_short tpal[256];     /* text palette */
84    Videoc videoc;
85    u_short pad0[0xa000];
86    Sysport sysport;
87} FbReg;
88
89typedef struct {
90    X68kCrtc crtc;
91    X68kVideoc videoc;
92    char dotClock;
93} X68kFbReg;
94
95/* EOF x68kReg.h */
96