1/*-
2 * Copyright (c) 1998 Dag-Erling Co�dan Sm�rgrav
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
--- 11 unchanged lines hidden (view full) ---
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $Id: logo_saver.c,v 1.5 1999/02/05 12:40:15 des Exp $
29 */
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/kernel.h>
34#include <sys/module.h>
35#include <sys/syslog.h>
36
37#include <saver.h>
38
39static u_char *vid;
40static int banksize, scrmode, bpsl, scrw, scrh;
41static int blanked;
42
43#include "logo.c"
44
45static void
--- 53 unchanged lines hidden (view full) ---
99 pl = splhigh();
100 set_video_mode(adp, scrmode);
101 load_palette(adp, logo_pal);
102#if 0 /* XXX conflict */
103 set_border(adp, 0);
104#endif
105 blanked++;
106 vid = (u_char *)adp->va_window;
107 bpsl = adp->va_line_width;
108 splx(pl);
109 for (i = 0; i < bpsl*scrh; i += banksize) {
110 set_origin(adp, i);
111 bzero(vid, banksize);
112 }
113 }
114 logo_update(adp);
--- 12 unchanged lines hidden (view full) ---
127 scrmode = M_VESA_CG800x600;
128 } else if (!get_mode_info(adp, M_VGA_CG320, &info)) {
129 scrmode = M_VGA_CG320;
130 } else {
131 log(LOG_NOTICE, "logo_saver: no suitable graphics mode\n");
132 return ENODEV;
133 }
134
135 banksize = info.vi_window_size;
136 scrw = info.vi_width;
137 scrh = info.vi_height;
138 blanked = 0;
139
140 return 0;
141}
142
143static int
144logo_term(video_adapter_t *adp)
145{
146 return 0;
147}
148
149static scrn_saver_t logo_module = {
150 "logo_saver", logo_init, logo_term, logo_saver, NULL,
151};
152
153SAVER_MODULE(logo_saver, logo_module);
2 * Copyright (c) 1998 Dag-Erling Co�dan Sm�rgrav
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
--- 11 unchanged lines hidden (view full) ---
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $Id: logo_saver.c,v 1.5 1999/02/05 12:40:15 des Exp $
29 */
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/kernel.h>
34#include <sys/module.h>
35#include <sys/syslog.h>
36
37#include <saver.h>
38
39static u_char *vid;
40static int banksize, scrmode, bpsl, scrw, scrh;
41static int blanked;
42
43#include "logo.c"
44
45static void
--- 53 unchanged lines hidden (view full) ---
99 pl = splhigh();
100 set_video_mode(adp, scrmode);
101 load_palette(adp, logo_pal);
102#if 0 /* XXX conflict */
103 set_border(adp, 0);
104#endif
105 blanked++;
106 vid = (u_char *)adp->va_window;
107 bpsl = adp->va_line_width;
108 splx(pl);
109 for (i = 0; i < bpsl*scrh; i += banksize) {
110 set_origin(adp, i);
111 bzero(vid, banksize);
112 }
113 }
114 logo_update(adp);
--- 12 unchanged lines hidden (view full) ---
127 scrmode = M_VESA_CG800x600;
128 } else if (!get_mode_info(adp, M_VGA_CG320, &info)) {
129 scrmode = M_VGA_CG320;
130 } else {
131 log(LOG_NOTICE, "logo_saver: no suitable graphics mode\n");
132 return ENODEV;
133 }
134
135 banksize = info.vi_window_size;
136 scrw = info.vi_width;
137 scrh = info.vi_height;
138 blanked = 0;
139
140 return 0;
141}
142
143static int
144logo_term(video_adapter_t *adp)
145{
146 return 0;
147}
148
149static scrn_saver_t logo_module = {
150 "logo_saver", logo_init, logo_term, logo_saver, NULL,
151};
152
153SAVER_MODULE(logo_saver, logo_module);