Deleted Added
sdiff udiff text old ( 55849 ) new ( 56043 )
full compact
1/*-
2 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHORS 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 * $FreeBSD: head/sys/dev/syscons/scgfbrndr.c 55849 2000-01-12 12:30:33Z yokota $
27 */
28
29#include "sc.h"
30#include "vga.h"
31#include "opt_syscons.h"
32#include "opt_vga.h"
33
34#if NSC > 0 && NVGA > 0
35
36#include <sys/param.h>
37#include <sys/systm.h>
38#include <sys/kernel.h>
39
40#include <machine/console.h>
41#include <machine/md_var.h>
42
43#include <dev/fb/fbreg.h>
44#include <dev/fb/vgareg.h>
45#include <dev/syscons/syscons.h>
46
47#include <isa/isareg.h>
48
49#ifndef SC_RENDER_DEBUG

--- 28 unchanged lines hidden (view full) ---

78#endif /* SC_PIXEL_MODE */
79
80#ifndef SC_NO_MODE_CHANGE
81static vr_draw_border_t vga_grborder;
82#endif
83
84static void vga_nop(scr_stat *scp, ...);
85
86static sc_rndr_sw_t txtrndrsw = {
87 vga_txtclear,
88 vga_txtborder,
89 vga_txtdraw,
90 vga_txtcursor_shape,
91 vga_txtcursor,
92 vga_txtblink,
93 (vr_set_mouse_t *)vga_nop,
94 vga_txtmouse,
95};
96RENDERER(mda, 0, txtrndrsw);
97RENDERER(cga, 0, txtrndrsw);
98RENDERER(ega, 0, txtrndrsw);
99RENDERER(vga, 0, txtrndrsw);
100
101#ifdef SC_PIXEL_MODE
102static sc_rndr_sw_t egarndrsw = {
103 vga_pxlclear,
104 vga_pxlborder,
105 vga_egadraw,
106 vga_pxlcursor_shape,
107 vga_pxlcursor,
108 vga_pxlblink,
109 (vr_set_mouse_t *)vga_nop,
110 vga_pxlmouse,
111};
112RENDERER(ega, PIXEL_MODE, egarndrsw);
113
114static sc_rndr_sw_t vgarndrsw = {
115 vga_pxlclear,
116 vga_pxlborder,
117 vga_vgadraw,
118 vga_pxlcursor_shape,
119 vga_pxlcursor,
120 vga_pxlblink,
121 (vr_set_mouse_t *)vga_nop,
122 vga_pxlmouse,
123};
124RENDERER(vga, PIXEL_MODE, vgarndrsw);
125#endif /* SC_PIXEL_MODE */
126
127#ifndef SC_NO_MODE_CHANGE
128static sc_rndr_sw_t grrndrsw = {
129 (vr_clear_t *)vga_nop,
130 vga_grborder,
131 (vr_draw_t *)vga_nop,
132 (vr_set_cursor_t *)vga_nop,
133 (vr_draw_cursor_t *)vga_nop,
134 (vr_blink_cursor_t *)vga_nop,
135 (vr_set_mouse_t *)vga_nop,
136 (vr_draw_mouse_t *)vga_nop,
137};
138RENDERER(cga, GRAPHICS_MODE, grrndrsw);
139RENDERER(ega, GRAPHICS_MODE, grrndrsw);
140RENDERER(vga, GRAPHICS_MODE, grrndrsw);
141#endif /* SC_NO_MODE_CHANGE */
142
143#ifndef SC_NO_CUTPASTE
144static u_short mouse_and_mask[16] = {
145 0xc000, 0xe000, 0xf000, 0xf800, 0xfc00, 0xfe00, 0xff00, 0xff80,
146 0xfe00, 0x1e00, 0x1f00, 0x0f00, 0x0f00, 0x0000, 0x0000, 0x0000
147};
148static u_short mouse_or_mask[16] = {
149 0x0000, 0x4000, 0x6000, 0x7000, 0x7800, 0x7c00, 0x7e00, 0x6800,
150 0x0c00, 0x0c00, 0x0600, 0x0600, 0x0000, 0x0000, 0x0000, 0x0000

--- 677 unchanged lines hidden ---