/* * Copyright (c) 2013 Yasushi Oshima, All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY YASUSHI OSHIMA ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. */ #ifndef CRTMOD_H #define CRTMOD_H 1 #include typedef struct { /* 0x2000 */ u_short r00, r01, r02, r03, r04, r05, r06, r07; /* 0x10 */ u_short r08, r09, r10, r11, r12, r13, r14, r15; /* 0x10 */ u_short r16, r17, r18, r19, r20, r21, r22, r23; /* 0x10 */ char pad0[0x450]; /* 0x450 */ u_short ctrl; /* 0x02 */ char pad1[0x1b7e]; /* 0x1b7e */ } Crtc; typedef struct { /* 0x1c00 */ u_short r0; char pad0[0xfe]; /* 0x100 */ u_short r1; char pad1[0xfe]; /* 0x100 */ u_short r2; char pad2[0x19fe]; /* 0x1a00 */ } Videoc; /* typedef struct { u_short r1, r2, r3, r4; u_short pad0[2]; u_short r5, r6; u_short pad[0x1ff0]; } Sysport; */ typedef struct { Crtc crtc; /* 0x2000 */ u_short gpal[256]; /* 0x0200 graphic palette */ u_short tpal[256]; /* 0x0200 text palette */ Videoc videoc; /* 0x1c00 */ #if 0 char pad0[0xa000]; /* 0xa000 */ Sysport sysport; /* 0x2000 */ #endif } FbReg; typedef struct { u_short r00, r01, r02, r03, r04, r05, r06, r07, r08, r20; } SetRegs; #endif