diff options
| author | KATO Takenori <kato@FreeBSD.org> | 1997-01-18 10:26:43 +0000 |
|---|---|---|
| committer | KATO Takenori <kato@FreeBSD.org> | 1997-01-18 10:26:43 +0000 |
| commit | 58e44cc813a64b16279b6fe8f99118af705a6b16 (patch) | |
| tree | 6766d75a8944808625ebbe2f86133260754892b4 /sys | |
| parent | b1c7657eef5c21f584540122ae7fbaa302a257ad (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/pc98/pc98/syscons.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/sys/pc98/pc98/syscons.c b/sys/pc98/pc98/syscons.c index f81d6e4c9e0e..5061b04a0d82 100644 --- a/sys/pc98/pc98/syscons.c +++ b/sys/pc98/pc98/syscons.c @@ -3096,10 +3096,10 @@ scinit(void) * can't be statically initialized. XXX. */ #ifdef PC98 - Crtat = (u_short *)TEXT_VRAM; - Atrat = (u_short *)TEXT_VRAM + ATTR_OFFSET; + Crtat = (u_short *)TEXT_VRAM; + Atrat = (u_short *)TEXT_VRAM + ATTR_OFFSET; #else - Crtat = (u_short *)MONO_BUF; + Crtat = (u_short *)MONO_BUF; /* * If CGA memory seems to work, switch to color. */ @@ -3191,6 +3191,7 @@ scinit(void) current_default = &user_default; console[0] = &main_console; init_scp(console[0]); + cur_console = console[0]; /* copy screen to temporary buffer */ bcopyw(Crtat, sc_buffer, @@ -3211,7 +3212,6 @@ scinit(void) #endif console[0]->xpos = hw_cursor % COL; console[0]->ypos = hw_cursor / COL; - cur_console = console[0]; for (i=1; i<MAXCONS; i++) console[i] = NULL; kernel_console.esc = 0; @@ -3276,7 +3276,7 @@ init_scp(scr_stat *scp) if (crtc_addr == MONO_BASE) scp->mode = M_VGA_M80x25; else - scp->mode = M_VGA_C80x25; + scp->mode = M_VGA_C80x25; else if (crtc_addr == MONO_BASE) scp->mode = M_B80x25; @@ -4242,11 +4242,14 @@ set_vgaregs(char *modetable) static void set_font_mode() { + int s = splhigh(); + /* setup vga for loading fonts (graphics plane mode) */ inb(crtc_addr+6); /* reset flip-flop */ outb(ATC, 0x10); outb(ATC, 0x01); inb(crtc_addr+6); /* reset flip-flop */ outb(ATC, 0x20); /* enable palette */ + #if SLOW_VGA outb(TSIDX, 0x02); outb(TSREG, 0x04); outb(TSIDX, 0x04); outb(TSREG, 0x06); @@ -4260,6 +4263,7 @@ set_font_mode() outw(GDCIDX, 0x0005); outw(GDCIDX, 0x0506); /* addr = a0000, 64kb */ #endif + splx(s); } static void @@ -4422,7 +4426,9 @@ set_destructive_cursor(scr_stat *scp) if ((i >= scp->cursor_start && i <= scp->cursor_end) || (scp->cursor_start >= scp->font_size && i == scp->font_size - 1)) cursor[i] |= 0xff; +#if 0 while (!(inb(crtc_addr+6) & 0x08)) /* wait for vertical retrace */ ; +#endif set_font_mode(); bcopy(cursor, (char *)pa_to_va(address) + DEAD_CHAR * 32, 32); set_normal_mode(); @@ -4590,7 +4596,9 @@ draw_mouse_image(scr_stat *scp) scp->mouse_oldpos = scp->mouse_pos; /* wait for vertical retrace to avoid jitter on some videocards */ +#if 0 while (!(inb(crtc_addr+6) & 0x08)) /* idle */ ; +#endif set_font_mode(); bcopy(scp->mouse_cursor, (char *)pa_to_va(address) + 0xd0 * 32, 128); set_normal_mode(); |
