19b65525fStsutsui/* $NetBSD: x68kReg.h,v 1.5 2020/11/04 17:16:13 tsutsui Exp $ */ 2ba64b02eStsutsui/*------------------------------------------------------------------------- 3ba64b02eStsutsui * Copyright (c) 1996 Yasushi Yamasaki 4ba64b02eStsutsui * All rights reserved. 5ba64b02eStsutsui * 6ba64b02eStsutsui * Redistribution and use in source and binary forms, with or without 7ba64b02eStsutsui * modification, are permitted provided that the following conditions 8ba64b02eStsutsui * are met: 9ba64b02eStsutsui * 1. Redistributions of source code must retain the above copyright 10ba64b02eStsutsui * notice, this list of conditions and the following disclaimer. 11ba64b02eStsutsui * 2. Redistributions in binary form must reproduce the above copyright 12ba64b02eStsutsui * notice, this list of conditions and the following disclaimer in the 13ba64b02eStsutsui * documentation and/or other materials provided with the distribution. 14ba64b02eStsutsui * 15ba64b02eStsutsui * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16ba64b02eStsutsui * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17ba64b02eStsutsui * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18ba64b02eStsutsui * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19ba64b02eStsutsui * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20ba64b02eStsutsui * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21ba64b02eStsutsui * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22ba64b02eStsutsui * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23ba64b02eStsutsui * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24ba64b02eStsutsui * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25ba64b02eStsutsui *-----------------------------------------------------------------------*/ 26ba64b02eStsutsui 27ba64b02eStsutsui/* 28ba64b02eStsutsui * CRT controller 29ba64b02eStsutsui */ 30ba64b02eStsutsuitypedef struct { 319b65525fStsutsui volatile uint16_t r00, r01, r02, r03, r04, r05, r06, r07; 329b65525fStsutsui volatile uint16_t r08, r09, r10, r11, r12, r13, r14, r15; 339b65525fStsutsui volatile uint16_t r16, r17, r18, r19, r20, r21, r22, r23; 349b65525fStsutsui uint8_t pad0[0x450]; 359b65525fStsutsui volatile uint16_t ctrl; 369b65525fStsutsui uint8_t pad1[0x1b7e]; 37ba64b02eStsutsui} Crtc; 38ba64b02eStsutsui 39ba64b02eStsutsuitypedef struct { 409b65525fStsutsui uint16_t r00, r01, r02, r03, r04, r05, r06, r07; 419b65525fStsutsui uint16_t r08, r09, r10, r11, r12, r13, r14, r15; 429b65525fStsutsui uint16_t r16, r17, r18, r19, r20, r21, r22, r23; 439b65525fStsutsui uint16_t ctrl; 44ba64b02eStsutsui} X68kCrtc; 45ab290810Stsutsui 46ba64b02eStsutsui/* 47ba64b02eStsutsui * video controller 48ba64b02eStsutsui */ 49ba64b02eStsutsuitypedef struct { 509b65525fStsutsui volatile uint16_t r0; 519b65525fStsutsui uint8_t pad0[0xfe]; 529b65525fStsutsui volatile uint16_t r1; 539b65525fStsutsui uint8_t pad1[0xfe]; 549b65525fStsutsui volatile uint16_t r2; 559b65525fStsutsui uint8_t pad2[0x19fe]; 56ba64b02eStsutsui} Videoc; 57ba64b02eStsutsui 58ba64b02eStsutsuitypedef struct { 599b65525fStsutsui uint16_t r0; 609b65525fStsutsui uint16_t r1; 619b65525fStsutsui uint16_t r2; 62ba64b02eStsutsui} X68kVideoc; 63ba64b02eStsutsui 64ba64b02eStsutsui/* system port */ 65ba64b02eStsutsuitypedef struct { 669b65525fStsutsui volatile uint16_t r1, r2, r3, r4; 679b65525fStsutsui uint16_t pad0[2]; 689b65525fStsutsui volatile uint16_t r5, r6; 699b65525fStsutsui uint16_t pad[0x1ff0]; 70ba64b02eStsutsui} Sysport; 71ba64b02eStsutsui 72ba64b02eStsutsui/* 73ba64b02eStsutsui * control registers 74ba64b02eStsutsui */ 75ba64b02eStsutsuitypedef struct { 76ba64b02eStsutsui Crtc crtc; 779b65525fStsutsui volatile uint16_t gpal[256]; /* graphic palette */ 789b65525fStsutsui volatile uint16_t tpal[256]; /* text palette */ 79ba64b02eStsutsui Videoc videoc; 809b65525fStsutsui uint16_t pad0[0xa000]; 81ba64b02eStsutsui Sysport sysport; 82ba64b02eStsutsui} FbReg; 83ba64b02eStsutsui 84ba64b02eStsutsuitypedef struct { 85ba64b02eStsutsui X68kCrtc crtc; 86ba64b02eStsutsui X68kVideoc videoc; 87ba64b02eStsutsui char dotClock; 88ba64b02eStsutsui} X68kFbReg; 89ba64b02eStsutsui 90ba64b02eStsutsui/* EOF x68kReg.h */ 91