1/* $NetBSD: x68kReg.h,v 1.4 2020/11/05 16:06:08 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 volatile uint16_t r00, r01, r02, r03, r04, r05, r06, r07; 32 volatile uint16_t r08, r09, r10, r11, r12, r13, r14, r15; 33 volatile uint16_t r16, r17, r18, r19, r20, r21, r22, r23; 34 uint8_t pad0[0x450]; 35 volatile uint16_t ctrl; 36 uint8_t pad1[0x1b7e]; 37} Crtc; 38 39typedef struct { 40 uint16_t r00, r01, r02, r03, r04, r05, r06, r07; 41 uint16_t r08, r09, r10, r11, r12, r13, r14, r15; 42 uint16_t r16, r17, r18, r19, r20, r21, r22, r23; 43 uint16_t ctrl; 44} X68kCrtc; 45 46/* 47 * video controller 48 */ 49typedef struct { 50 volatile uint16_t r0; 51 uint8_t pad0[0xfe]; 52 volatile uint16_t r1; 53 uint8_t pad1[0xfe]; 54 volatile uint16_t r2; 55 uint8_t pad2[0x19fe]; 56} Videoc; 57 58typedef struct { 59 uint16_t r0; 60 uint16_t r1; 61 uint16_t r2; 62} X68kVideoc; 63 64/* system port */ 65typedef struct { 66 volatile uint16_t r1, r2, r3, r4; 67 uint16_t pad0[2]; 68 volatile uint16_t r5, r6; 69 uint16_t pad[0x1ff0]; 70} Sysport; 71 72/* 73 * control registers 74 */ 75typedef struct { 76 Crtc crtc; 77 volatile uint16_t gpal[256]; /* graphic palette */ 78 volatile uint16_t tpal[256]; /* text palette */ 79 Videoc videoc; 80 uint16_t 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