diff options
author | yokota <yokota@FreeBSD.org> | 1999-06-22 14:14:06 +0000 |
---|---|---|
committer | yokota <yokota@FreeBSD.org> | 1999-06-22 14:14:06 +0000 |
commit | 4f4eb0cfe54e001639240b3b63551c42280cdcc0 (patch) | |
tree | 75738e04df5c55c7d14fd6fb083ab1062bd92a85 /sys/modules/syscons/star | |
parent | d252fb51781d3bcdc1697ebd89678c9a00d94124 (diff) | |
download | FreeBSD-src-4f4eb0cfe54e001639240b3b63551c42280cdcc0.zip FreeBSD-src-4f4eb0cfe54e001639240b3b63551c42280cdcc0.tar.gz |
The second phase of syscons reorganization.
- Split syscons source code into manageable chunks and reorganize
some of complicated functions.
- Many static variables are moved to the softc structure.
- Added a new key function, PREV. When this key is pressed, the vty
immediately before the current vty will become foreground. Analogue
to PREV, which is usually assigned to the PrntScrn key.
PR: kern/10113
Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de>
- Modified the kernel console input function sccngetc() so that it
handles function keys properly.
- Reorganized the screen update routine.
- VT switching code is reorganized. It now should be slightly more
robust than before.
- Added the DEVICE_RESUME function so that syscons no longer hooks the
APM resume event directly.
- New kernel configuration options: SC_NO_CUTPASTE, SC_NO_FONT_LOADING,
SC_NO_HISTORY and SC_NO_SYSMOUSE.
Various parts of syscons can be omitted so that the kernel size is
reduced.
SC_PIXEL_MODE
Made the VESA 800x600 mode an option, rather than a standard part of
syscons.
SC_DISABLE_DDBKEY
Disables the `debug' key combination.
SC_ALT_MOUSE_IMAGE
Inverse the character cell at the mouse cursor position in the text
console, rather than drawing an arrow on the screen.
Submitted by: Nick Hibma (n_hibma@FreeBSD.ORG)
SC_DFLT_FONT
makeoptions "SC_DFLT_FONT=_font_name_"
Include the named font as the default font of syscons. 16-line,
14-line and 8-line font data will be compiled in. This option replaces
the existing STD8X16FONT option, which loads 16-line font data only.
- The VGA driver is split into /sys/dev/fb/vga.c and /sys/isa/vga_isa.c.
- The video driver provides a set of ioctl commands to manipulate the
frame buffer.
- New kernel configuration option: VGA_WIDTH90
Enables 90 column modes: 90x25, 90x30, 90x43, 90x50, 90x60. These
modes are mot always supported by the video card.
PR: i386/7510
Submitted by: kbyanc@freedomnet.com and alexv@sui.gda.itesm.mx.
- The header file machine/console.h is reorganized; its contents is now
split into sys/fbio.h, sys/kbio.h (a new file) and sys/consio.h
(another new file). machine/console.h is still maintained for
compatibility reasons.
- Kernel console selection/installation routines are fixed and
slightly rebumped so that it should now be possible to switch between
the interanl kernel console (sc or vt) and a remote kernel console
(sio) again, as it was in 2.x, 3.0 and 3.1.
- Screen savers and splash screen decoders
Because of the header file reorganization described above, screen
savers and splash screen decoders are slightly modified. After this
update, /sys/modules/syscons/saver.h is no longer necessary and is
removed.
Diffstat (limited to 'sys/modules/syscons/star')
-rw-r--r-- | sys/modules/syscons/star/star_saver.c | 49 |
1 files changed, 38 insertions, 11 deletions
diff --git a/sys/modules/syscons/star/star_saver.c b/sys/modules/syscons/star/star_saver.c index aaa23fb..56408dc 100644 --- a/sys/modules/syscons/star/star_saver.c +++ b/sys/modules/syscons/star/star_saver.c @@ -25,22 +25,24 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: star_saver.c,v 1.19 1999/01/17 14:25:19 yokota Exp $ + * $Id: star_saver.c,v 1.20 1999/02/05 12:40:16 des Exp $ */ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> #include <sys/module.h> +#include <sys/consio.h> +#include <sys/fbio.h> -#include <machine/md_var.h> #include <machine/pc/display.h> -#include <saver.h> +#include <dev/fb/fbreg.h> +#include <dev/fb/splashreg.h> +#include <dev/syscons/syscons.h> #define NUM_STARS 50 -static u_short *window; static int blanked; /* @@ -50,21 +52,39 @@ static int blanked; static int star_saver(video_adapter_t *adp, int blank) { - scr_stat *scp = cur_console; + sc_softc_t *sc; + scr_stat *scp; int cell, i; char pattern[] = {"...........++++*** "}; +#ifndef PC98 char colors[] = {FG_DARKGREY, FG_LIGHTGREY, FG_WHITE, FG_LIGHTCYAN}; +#else + char colors[] = {FG_BLUE, FG_LIGHTGREY, + FG_LIGHTGREY, FG_CYAN}; +#endif /* PC98 */ static u_short stars[NUM_STARS][2]; + sc = sc_find_softc(adp, NULL); + if (sc == NULL) + return EAGAIN; + scp = sc->cur_scp; + if (blank) { if (adp->va_info.vi_flags & V_INFO_GRAPHICS) return EAGAIN; if (!blanked) { - window = (u_short *)adp->va_window; +#ifdef PC98 + if (epson_machine_id == 0x20) { + outb(0x43f, 0x42); + outb(0x0c17, inb(0xc17) & ~0x08); + outb(0x43f, 0x40); + } +#endif /* PC98 */ /* clear the screen and set the border color */ - fillw(((FG_LIGHTGREY|BG_BLACK) << 8) | scr_map[0x20], - window, scp->xsize * scp->ysize); + sc_vtb_clear(&scp->scr, sc->scr_map[0x20], + (FG_LIGHTGREY | BG_BLACK) << 8); + (*vidsw[adp->va_index]->set_hw_cursor)(adp, -1, -1); set_border(scp, 0); blanked = TRUE; for(i=0; i<NUM_STARS; i++) { @@ -74,15 +94,22 @@ star_saver(video_adapter_t *adp, int blank) } } cell = random() % NUM_STARS; - *((u_short*)(window + stars[cell][0])) = - scr_map[pattern[stars[cell][1]]] | - colors[random()%sizeof(colors)] << 8; + sc_vtb_putc(&scp->scr, stars[cell][0], + sc->scr_map[pattern[stars[cell][1]]], + colors[random()%sizeof(colors)] << 8); if ((stars[cell][1]+=(random()%4)) >= sizeof(pattern)-1) { stars[cell][0] = random() % (scp->xsize*scp->ysize); stars[cell][1] = 0; } } else { +#ifdef PC98 + if (epson_machine_id == 0x20) { + outb(0x43f, 0x42); + outb(0x0c17, inb(0xc17) | 0x08); + outb(0x43f, 0x40); + } +#endif /* PC98 */ blanked = FALSE; } return 0; |