Deleted Added
full compact
28c28
< * $Id: daemon_saver.c,v 1.14 1999/01/17 14:25:08 yokota Exp $
---
> * $Id: daemon_saver.c,v 1.15 1999/02/05 12:40:15 des Exp $
36a37,38
> #include <sys/consio.h>
> #include <sys/fbio.h>
38d39
< #include <machine/md_var.h>
41c42,44
< #include <saver.h>
---
> #include <dev/fb/fbreg.h>
> #include <dev/fb/splashreg.h>
> #include <dev/syscons/syscons.h>
43,45d45
< #define CONSOLE_VECT(x, y) \
< (window + (y)*cur_console->xsize + (x))
<
51d50
< static u_short *window;
122c121
< clear_daemon(int xpos, int ypos, int dxdir, int xoff, int yoff,
---
> clear_daemon(sc_softc_t *sc, int xpos, int ypos, int dxdir, int xoff, int yoff,
129,131c128,133
< for (y = yoff; y < ylen; y++)
< fillw(((FG_LIGHTGREY|BG_BLACK) << 8) | scr_map[0x20],
< CONSOLE_VECT(xpos + xoff, ypos + y), xlen - xoff);
---
> for (y = yoff; y < ylen; y++) {
> sc_vtb_erase(&sc->cur_scp->scr,
> (ypos + y)*sc->cur_scp->xsize + xpos + xoff,
> xlen - xoff,
> sc->scr_map[0x20], (FG_LIGHTGREY | BG_BLACK) << 8);
> }
135c137
< draw_daemon(int xpos, int ypos, int dxdir, int xoff, int yoff,
---
> draw_daemon(sc_softc_t *sc, int xpos, int ypos, int dxdir, int xoff, int yoff,
150a153
> #ifndef PC98
156a160,167
> #else /* PC98 */
> case 'R': attr = (FG_RED|BG_BLACK)<<8; break;
> case 'Y': attr = (FG_BROWN|BG_BLACK)<<8; break;
> case 'B': attr = (FG_BLUE|BG_BLACK)<<8; break;
> case 'W': attr = (FG_LIGHTGREY|BG_BLACK)<<8; break;
> case 'C': attr = (FG_CYAN|BG_BLACK)<<8; break;
> default: attr = (FG_LIGHTGREY|BG_BLACK)<<8; break;
> #endif /* PC98 */
159,160c170,174
< *CONSOLE_VECT(xpos + x, ypos + y) =
< scr_map[daemon_pic[y][px]]|attr;
---
> sc_vtb_putc(&sc->cur_scp->scr,
> (ypos + y)*sc->cur_scp->xsize
> + xpos + x,
> sc->scr_map[daemon_pic[y][px]],
> attr);
162,163c176,181
< *CONSOLE_VECT(xpos + DAEMON_MAX_WIDTH - px - 1, ypos + y) =
< scr_map[xflip_symbol(daemon_pic[y][px])]|attr;
---
> sc_vtb_putc(&sc->cur_scp->scr,
> (ypos + y)*sc->cur_scp->xsize
> + xpos + DAEMON_MAX_WIDTH
> - px - 1,
> sc->scr_map[xflip_symbol(daemon_pic[y][px])],
> attr);
170c188
< clear_string(int xpos, int ypos, int xoff, char *s, int len)
---
> clear_string(sc_softc_t *sc, int xpos, int ypos, int xoff, char *s, int len)
174,175c192,194
< fillw(((FG_LIGHTGREY|BG_BLACK) << 8) | scr_map[0x20],
< CONSOLE_VECT(xpos + xoff, ypos), len - xoff);
---
> sc_vtb_erase(&sc->cur_scp->scr,
> ypos*sc->cur_scp->xsize + xpos + xoff, len - xoff,
> sc->scr_map[0x20], (FG_LIGHTGREY | BG_BLACK) << 8);
179c198
< draw_string(int xpos, int ypos, int xoff, char *s, int len)
---
> draw_string(sc_softc_t *sc, int xpos, int ypos, int xoff, char *s, int len)
183,185c202,206
< for (x = xoff; x < len; x++)
< *CONSOLE_VECT(xpos + x, ypos) =
< scr_map[s[x]]|(FG_LIGHTGREEN|BG_BLACK)<<8;
---
> for (x = xoff; x < len; x++) {
> sc_vtb_putc(&sc->cur_scp->scr,
> ypos*sc->cur_scp->xsize + xpos + x,
> sc->scr_map[s[x]], (FG_LIGHTGREEN | BG_BLACK) << 8);
> }
198c219,220
< scr_stat *scp = cur_console;
---
> sc_softc_t *sc;
> scr_stat *scp;
200a223,227
> sc = sc_find_softc(adp, NULL);
> if (sc == NULL)
> return EAGAIN;
> scp = sc->cur_scp;
>
205c232,238
< 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 */
207,208c240,242
< 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);
216,217c250,251
< clear_daemon(dxpos, dypos, dxdir, xoff, yoff, xlen, ylen);
< clear_string(txpos, typos, toff, (char *)message, tlen);
---
> clear_daemon(sc, dxpos, dypos, dxdir, xoff, yoff, xlen, ylen);
> clear_string(sc, txpos, typos, toff, (char *)message, tlen);
322,323c356,357
< draw_daemon(dxpos, dypos, dxdir, xoff, yoff, xlen, ylen);
< draw_string(txpos, typos, toff, (char *)message, tlen);
---
> draw_daemon(sc, dxpos, dypos, dxdir, xoff, yoff, xlen, ylen);
> draw_string(sc, txpos, typos, toff, (char *)message, tlen);
324a359,365
> #ifdef PC98
> if (epson_machine_id == 0x20) {
> outb(0x43f, 0x42);
> outb(0x0c17, inb(0xc17) | 0x08);
> outb(0x43f, 0x40);
> }
> #endif /* PC98 */