diff options
| author | tsutsui <tsutsui@NetBSD.org> | 2023-02-11 05:59:39 +0000 |
|---|---|---|
| committer | tsutsui <tsutsui@NetBSD.org> | 2023-02-11 05:59:39 +0000 |
| commit | 9bba62688c832f5dd55b2a833cb0fe3444fe12f3 (patch) | |
| tree | 4614125135bb5609080b0631ba1e6c404d35a0f3 /sys/dev/ic | |
| parent | 148817f17e484e4bcd1515c03c885114d4c14087 (diff) | |
Port rasops'fied smg(4) framebuffer driver for VS3100 from OpenBSD/vax.
This allows using more fonts other than 8x15 pixels on smg(4).
Tested on my VAXstation 3100/m30.
Note the bitorder of smg(4) VRAM is LSB first (i.e. LSBit is the
most left side pixel) and this requires more complicated changes
to bitmask ops in MI rasops(9) because several LE machines have
VRAMs whose MSBit is connected to the most left side pixel,
but for now I prepared smg(4) specific putchar and cursor ops
based on old luna68k omrasops.
Diffstat (limited to 'sys/dev/ic')
| -rw-r--r-- | sys/dev/ic/dc503reg.h | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/sys/dev/ic/dc503reg.h b/sys/dev/ic/dc503reg.h new file mode 100644 index 00000000000..63d7e7b4bef --- /dev/null +++ b/sys/dev/ic/dc503reg.h @@ -0,0 +1,100 @@ +/* $NetBSD: dc503reg.h,v 1.1 2023/02/11 05:59:39 tsutsui Exp $ */ +/* $OpenBSD: dc503reg.h,v 1.1 2006/07/23 19:17:23 miod Exp $ */ +/* NetBSD: pmreg.h,v 1.7 2005/12/11 12:18:36 christos Exp */ + +/* + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Ralph Campbell. + * + * 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. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)pmreg.h 8.1 (Berkeley) 6/10/93 + */ + +/* + * Layout of the programmable cursor chip (DC503) registers. + * All registers are 16 bit wide. + */ + +#define PCC_CMD 0x00 /* cursor command register */ +#define PCCCMD_TEST 0x8000 +#define PCCCMD_HSHI 0x4000 +#define PCCCMD_VBHI 0x2000 +#define PCCCMD_LODSA 0x1000 +#define PCCCMD_FORG2 0x0800 +#define PCCCMD_ENRG2 0x0400 +#define PCCCMD_FORG1 0x0200 +#define PCCCMD_ENRG1 0x0100 +#define PCCCMD_XHWID 0x0080 +#define PCCCMD_XHCL1 0x0040 +#define PCCCMD_XHCLP 0x0020 +#define PCCCMD_XHAIR 0x0010 +#define PCCCMD_FOPB 0x0008 +#define PCCCMD_ENPB 0x0004 +#define PCCCMD_FOPA 0x0002 +#define PCCCMD_ENPA 0x0001 + +#define PCC_XPOS 0x04 /* cursor X position */ +#define PCC_YPOS 0x08 /* cursor Y position */ +#define PCC_XMIN_1 0x0c /* region 1 left edge */ +#define PCC_XMAX_1 0x10 /* region 1 right edge */ +#define PCC_YMIN_1 0x14 /* region 1 top edge */ +#define PCC_YMAX_1 0x18 /* region 1 bottom edge */ +#define PCC_XMIN_2 0x1c /* region 2 left edge */ +#define PCC_XMAX_2 0x20 /* region 2 right edge */ +#define PCC_YMIN_2 0x24 /* region 2 top edge */ +#define PCC_YMAX_2 0x28 /* region 2 bottom edge */ +#define PCC_LOAD 0x2c /* cursor pattern load */ + +struct dc503reg { + volatile uint16_t cmdr; + int16_t pad1; + volatile uint16_t xpos; + int16_t pad2; + volatile uint16_t ypos; + int16_t pad3; + volatile uint16_t xmin1; + int16_t pad4; + volatile uint16_t xmax1; + int16_t pad5; + volatile uint16_t ymin1; + int16_t pad6; + volatile uint16_t ymax1; + int16_t pad7[9]; + volatile uint16_t xmin2; + int16_t pad8; + volatile uint16_t xmax2; + int16_t pad9; + volatile uint16_t ymin2; + int16_t pad10; + volatile uint16_t ymax2; + int16_t pad11; + volatile uint16_t load; +}; + +#define PCC_CURSOR_SIZE 16 |
