|
Ключевые слова: freebsd, console, patch, video, (найти похожие документы)
From : Mike E. Matsnev Subj : [FreeBSD] Патч для увеличения частоты регенерации консоли до 100Hz ------------------------------------------------------------------------------- freebsd-console-vesa-100x37-800x600-100Hz.patch This patch changes the refresh rate of the VESA 800x600x4 mode to 98Hz, should hopefully work on all cards with VESA bios. Remember, the 60Hz refresh rate no longer works. The second part changes the default width and height of the SC_PIXEL_MODE in vidcontrol to 100x37 from 80x25 (dunno why they use 80x25 anyway, when the hardware is set to a much better mode, the small active rectangle in the middle of the screen looks really ugly). Mike E. Matsnev --- src,orig/sys/i386/isa/vesa.c Sat Jan 29 18:08:40 2000 +++ src/sys/i386/isa/vesa.c Thu Mar 16 11:44:31 2000 @@ -1016,7 +1016,25 @@ if (!(info.vi_flags & V_INFO_GRAPHICS)) info.vi_flags &= ~V_INFO_LINEAR; - if (vesa_bios_set_mode(mode | ((info.vi_flags & V_INFO_LINEAR) ? 0x4000 : 0))) + if (mode == M_VESA_800x600) { /* XXX ignores V_INFO_LINEAR */ + unsigned char crtc[0x19]; + unsigned char reg; + if (vesa_bios_set_mode(mode)) + return 1; + for (reg=0;reg<0x19;++reg) { + outb(0x3d4,reg); + crtc[reg]=inb(0x3d5); + } + if (!vesa_bios_set_mode(M_VESA_1024x768)) { + outb(0x3d4,0x11); + outb(0x3d5,crtc[0x11]&0x7f); + for (reg=0;reg<0x19;++reg) { + outb(0x3d4,reg); + outb(0x3d5,crtc[reg]); + } + } + } else + if (vesa_bios_set_mode(mode | ((info.vi_flags & V_INFO_LINEAR) ? 0x4000 : 0))) return 1; if (adp->va_info.vi_flags & V_INFO_LINEAR) --- src,orig/usr.sbin/vidcontrol/vidcontrol.c Wed Jan 12 15:30:33 2000 +++ src/usr.sbin/vidcontrol/vidcontrol.c Thu Mar 16 11:51:48 2000 @@ -317,8 +317,11 @@ if (ioctl(0, mode, NULL) < 0) warn("cannot set videomode"); if (mode == SW_VESA_800x600) { - size[0] = 80; /* columns */ - size[1] = 25; /* rows */ + /* changed by Mike */ + size[0] = 100; /* columns */ + size[1] = 37; /* rows */ + /*size[0] = 80;*/ /* columns */ + /*size[1] = 25;*/ /* rows */ size[2] = 16; /* font size */ if (ioctl(0, KDRASTER, size)) { ioerr = errno;
|
Обсуждение | [ RSS ] |
|
Добавить комментарий |
Закладки на сайте Проследить за страницей |
Created 1996-2025 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |