TextConfig
5
October 1998
Version 1.9
The timing parameters are the same for both 8 and 9-pixel wide fonts, except for the clock. Horizontal timings in VGA cards are _always_ specified in 8-bit wide CHARACTERS, not in PIXELS, although the TextConfig file format uses pixels. Hence the restriction that horizontal timings should be a multiple of 8 (if they're not, they will be rounded down). When setting the character width of an existing 8-pixel wide mode to 9, horizontal timings are still in 8-bit characters. So both modes will result in the SAME amount of characters per line, but the VGA chip will count 8 pixels per character in the first case, and 9 in the second case. Take for example a standard 80x25 mode: "80x25x8" 25.175 640 680 776 800 400 412 414 449 font 8x16 and its 9-pixel wide derivative: "80x25x9" 28.3 640 680 776 800 400 412 414 449 font 9x16 Both modes produce the same screen size (80x25), using the same display refresh frequencies (31.5 kHz, 70 Hz). But in the first case, the total _actual_ pixel-count at the end of the video-line is (800/8)*8, and (800/8)*9 in the second case !!! To achieve the same horizontal frequency of 31.5 kHz, the second mode needs a higher clock: (9/8)*25.175 MHz = 28.3 MHz and that happens to be the second standard VGA clock, which is available on ALL VGA cards. Now you know why they added it in the first place ;-) This example should warn you about changing modes from 8-wide to 9-wide or vice-versa: if you don't change the clock with the same 8/9 ratio, the display refresh rates will change, and they might fall outside the allowable range for the monitor (i.e. it will not synchronize to the new frequency, or SVGATextMode will suddenly not allow the mode anymore). HShift <shift_amount> This is an optional parameter that requests an additional shift of the display to the left. The <shift_amount> can be any value between 0 and 3. It shifts the screen to the left with an equal amount of character cells (i.e. "HShift 0" doesn't do anything). This parameter is useful for modelines where you can't get the display to move to the left side enough by changing the sync position. Take for example this modeline: "40x15x9" 14.15 320 376 400 400 240 241 242 25 font 9x16 DoubleScan If this mode is still too much to the right of the monitor instead of nicely centered, there is not much you can do to fix this: the sync is already moved the the extreme end, and making it shorter (by moving the second number (376) closer to the third (400) will probably make your monitor go out of sync. Enter the HShift parameter: with the same sync position, it moves the screen 0, 1, 2 or 3 characters to the left. This has the same effect as adding 0, 8, 16 or 24 to the HSYNC position numbers, except that it still works if that would place the sync BEYOND the end of the maximum sync position. There is another reason to use this parameter. Some VGA chips seem to have problems with very-low-resolution modes (like the 40x15 one above). If you put the sync too much to the right (but still "legal"), you get lots of "snow" on the screen; almost the same stuff you get when using a clock that is too high. In this case, putting the sync close to the end of the active video instead of close to the other end solves that problem. You can then use the HShift parameter to get the display nicely centered again. The S3 BIOS uses this exact method for their standard VGA low-res text modes.
There are a few limitations. One of them being the 16K (16384) characters-per-screen limit. This is a limit imposed by the way the kernel sets up VGA textmode memory, and can be doubled if required (see below). You would need to define an awesome screen size before running into that limit: 160x100 or 180x80 characters per screen is still possible... Increasing the number of characters on the screen reduces the size of the scroll-back buffer: since there are always (?) 16k chars on one screen, the scroll-back buffer will get the remainder of the 16k. If you have a screen size with 16k chars, there will be no scroll-back buffer... The more hacker-minded among you might want to experiment with a special #define in the kernel sources (VGA_CAN_DO_64KB, in /usr/src/linux/drivers/char/vga.c), that allows more (32K) characters per screen. This requires recompiling both the kernel and SVGATextMode (and the latter needs the same define in the Makefile). Another limit is the maximum amount of clocks in all the clocks lines together: 64.
The XFree86 configuration file (Xconfig, XF86Config) has been the main guideline in creating the TextConfig format.
|
||||||||||