x68kReg.h revision ab290810
1/* $NetBSD: x68kReg.h,v 1.3 2020/08/01 20:09:03 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 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *-----------------------------------------------------------------------*/
26
27/*
28 * CRT controller
29 */
30typedef struct {
31    u_short r00, r01, r02, r03, r04, r05, r06, r07;
32    u_short r08, r09, r10, r11, r12, r13, r14, r15;
33    u_short r16, r17, r18, r19, r20, r21, r22, r23;
34    char pad0[0x450];
35    u_short ctrl;
36    char pad1[0x1b7e];
37} Crtc;
38
39typedef struct {
40    u_short r00, r01, r02, r03, r04, r05, r06, r07;
41    u_short r08, r09, r10, r11, r12, r13, r14, r15;
42    u_short r16, r17, r18, r19, r20, r21, r22, r23;
43    u_short ctrl;
44} X68kCrtc;
45
46/*
47 * video controller
48 */
49typedef struct {
50    u_short r0;
51    char pad0[0xfe];
52    u_short r1;
53    char pad1[0xfe];
54    u_short r2;
55    char pad2[0x19fe];
56} Videoc;
57
58typedef struct {
59    u_short r0;
60    u_short r1;
61    u_short r2;
62} X68kVideoc;
63
64/* system port */
65typedef struct {
66    u_short r1, r2, r3, r4;
67    u_short pad0[2];
68    u_short r5, r6;
69    u_short pad[0x1ff0];
70} Sysport;
71
72/*
73 * control registers
74 */
75typedef struct {
76    Crtc crtc;
77    u_short gpal[256];    /* graphic palette */
78    u_short tpal[256];     /* text palette */
79    Videoc videoc;
80    u_short pad0[0xa000];
81    Sysport sysport;
82} FbReg;
83
84typedef struct {
85    X68kCrtc crtc;
86    X68kVideoc videoc;
87    char dotClock;
88} X68kFbReg;
89
90/* EOF x68kReg.h */
91