#############################################################
#                                                           #
#   Configuration file for the "SVGATextMode" program       #
#                                                           #
#############################################################
#
# Created by: Koen Gadeyne (kmg@barco.be)
#
# DISCLAIMER: <include standard disclaimer here>
#  in short: USE AT YOUR OWN RISK!!!
#  This program does some pretty meaty things to your VGA card, and
#  I am ABSOLUTELY sure that there are more bugs in it than in the
#  entire Linux kernel source tree (>8 Mb). So If you have a heart
#  condition: ask for someone else to test it for you. During testing
#  of this piece of sh!t, I got LOTS of surprises (and so did my
#  monitor), and there are many surprises left.
#  I happen to like surprises!
#
#
#
# NOTES:
# 0. Just for safety: use "savetextmode" to save your current textmode
#    before trying anything of this stuff! If you get it wrong, you can
#    always restore your screen with "textmode" (prepare to type that 
#    "blindly": you might need to!). And to be even safer: do your first
#    tests from the standard 80x25 mode, and do your "savetextmode" in
#    that mode. It is not al all a sure thing that savetextmode will
#    enable you to return your screen to its original condition, though...
# 1. In addition to the clocks specified here, the same clocks divided
#    by 2 are ALSO available! (for as far as I know, that is a standard
#    VGA feature...) The drawback is that for a "standard" 80x25
#    mode, 25.175 must be specified as the clock. If you say just "25" MHz,
#    that is what you'll get: 50 MHz divided by 2 = EXACTLY 25 MHz. So be
#    as specific as possible in defining clocks!
# 2. Multiple "clocks" lines are allowed. They will ALL be used!
# 3. Note too that the MAXIMUM total screen size can be 32 Kbytes of data,
#    and since each char needs two bytes: MAX 16384 chars. (If you ask for
#    anything bigger, you will get an "out of memory" error from the kernel!)
#    160x100 is almost that big (imagine : 16000 chars on ONE screen ?!)
#    All of the 16384 chars you DON'T use for the ACTIVE part of the screen,
#    are used as a "scrollback buffer" by the kernel (SHIFT-PgUp/SHIFT_PgDn, 
#    remember?). So at 160x100, only 2 lines of scrollback remain...
# 4. You can use "vgaset" to tune timing parameters, just as in X-Windows.
# 5. WARNING!!!!!!!!!!!
#    Be absolutely sure that the CHIPSET is specified correctly! The code
#    does ABSOLUTELY NO PROBING AT ALL, and will joyfully program your ET4000
#    as an S3 chipset, and even pretend everything went OK. Don't ask me what
#    horrific effects THAT can have... I might include VGA-card checking later.
#
# 6. for unsupported cards, or supported cards with unsupported clock selection 
#    algorithms, use the "ClockProg <path>" statement. The external program
#    MUST take as (only) argument the desired frequency in kHz. If it doesn't, 
#    embed it in a script that converts the syntax, or change the program...
#    This will change in the future (XFREE3.1-style)
#
# 7. If anything goes wrong, and you suspect that the card may not be using the
#    clock you specified, then use "clockprobe" to find out what the REAL
#    clock at this moment is. If the screen is blank, you'll have to type it
#    blindly, redirecting output to a file, so you can check it later, when
#    you got the screen back (either with "textmode", selecting a working
#    text mode with SVGATextMode, or rebooting). 
#
#############################################################
#                                                           #
#   WARNING: Do NOT blindly copy clock values in this file. #
#            They are only an example! Use the REAL ones    #
#            from YOUR video card!                          #
#                                                           #
#############################################################

#Chipset "VGA"     # This is for a "generic" VGA card. It should work on ANY VGA card, but can only use the first 4 clocks
#Clocks  25.175 28.322 0 0


#ChipSet	"S3"
#Clocks   25.175  28.322  40.0  0.00  50.00  77.00  36.00  44.90  130.00  120.00  80.00  31.50  110.00  65.00  75.00  94.50
# For some S3 cards: pick one of the following clock chips (or RAMDAC's with integrated clock chip). 
#ClockChip "icd2061a"
#ClockChip "ics2595"
#ClockChip "s3gendac"
#ClockChip "sc11412"
#ClockChip "ti3025" 

# for the really unsupported cards, or others using a special clock chip (but first try the "Clockchip" option !)
#ClockProg "/home/kmg/SVGATextMode/contrib/v7mercury/freq" 2


#ChipSet	"ET4000"
#Option "hibit_high"         # This option MUST be in your XF86Config file, too!!!
#Option ET4000_AltClockSel   # some VERY rare ET4000's need this for correct clock selection. See the appropriate README!
#Option "Legend"             # Sigma Legend ET4000 boards need this.
#Clocks 25.1  28.3  32.5  36  40  44.9  31.5  37.6  50  56.6  65  72  80  90  63  75 

#Chipset	"TVGA8900"
#Clocks 25.175 28.3 45 36 58 65 50 40     

#Chipset	"TVGA8900"    # this is for a 8900CL card, it has 16 clocks.
#Clocks 25.175 28.3 45 36 57 64 50 40 75 108 110 107 72 61 79 74

#Chipset	"WDC90C3x"
#Clocks 25.175 28.3 65 36 40 50 32 45 31.5 35.5 74.5 72 30 77 86 80 60
#Option swap_hibit  #Some WDC's need this, but most don't. This inverts clock selection bit 2 (=the third bit)

#Chipset	"WDC90C0x"
#clocks  25.19  28.32  22.63  22.69  25.16  28.31  22.64  23.59  44.93

#Chipset	"ATI"
# following 8 lines are for ATI 28800-5 with 1Mb RAM, and ATI 68830 15/16-bit HiColor DAC (according to SuperProbe)
#Clocks  30.27  31.91 109.96  79.82  42.73  48.72  91.97  37.81
#Clocks  39.70  44.66  75.00  64.93  50.27  56.37   0.00  44.66
#Clocks  15.13  15.96  54.95  32.78  21.37  24.30  46.09  17.99
#Clocks  19.87  22.33  37.49  32.45  25.14  28.18   0.00  22.35
#Clocks  10.08  10.71  36.69  26.59  14.25  16.38  32.17  12.30
#Clocks  13.25  15.07  24.99  21.63  16.77  18.78   0.00  14.90
#Clocks   7.60   7.98  27.47  19.96  10.77  12.15  22.99   9.05
#Clocks   9.93  11.17  18.74  16.22  12.57  14.10   0.00  11.17

#Chipset	"CLGD542x"
#no clocks needed: freely programmable!
#Option "SLOW_DRAM"   #use one of these options to set DRAM speed. The faster the better, but the more dangerous...
#Option "MED_DRAM"
#Option "FAST_DRAM"
#Option "XFAST_DRAM"
### Cirrus: clocks above 56 MHz are no good. If you still want to read some text...

#Chipset	"Video7"    # HeadLand technologies chips only. NOT Video7 S3, Cirrus or C&T based cards
#Clocks   25.175 28.322 30.000 32.514 34.000 36.000 38.000 40.000
         


#############################################################################
#
# The "Terminals" line tells SVGATextMode which terminals to resize together
# with the screen. 
# The terminals line should (in most cases) contain all the terminal devices 
# that are affected by SVGATextMode resizing. Normally they are the ones you
# switch with ALT-F1...ALT-F8. 
# Just type the device name WITHOUT the "/dev/" prefix.
#
Terminals tty8 tty7 tty6 tty5 tty4 tty3 tty2 tty1


#############################################################################
#
# The "ResetProg" line defines a program that will be called after
# SVGATextMode has succesfully finished its job. The primary use would be 
# to let some applications know what happened (i.e. send them an appropriate
# signal, or bluntly restart them), if they don't resize automatically 
# after SVGATextMode finishes. e.g. selection.
#
# It will be called with TWO arguments: the H and V size of the new text 
# mode. Example: SVGATextMode 100x37 will call
#
#      /home/root/some_script 100 37
# Your reset program NEED not use those two arguments, but it could be useful
# for some applications. 
#

#ResetProg /usr/sbin/SVGA_reset


#############################################################################
#
# The following lines are about automatic font loading:
#  - 'Option LoadFont' enables the automatic font loading.
#       If this line is commented out, no font loading will be done, 
#       independent of the presence of "FontProg", "FontPath" or "FontSelect"
#       lines.
#  - 'FontProg ...' tells SVGATextMode where to find the font loading program
#  - 'FontPath ...' will tell the font program where the fonts are located.
#       the defaults for these two last ones are set in SVGATextMode.c, 
#       and are as shown below in the commented lines (if these lines are
#       commented out, the default paths will be used).
#  - 'FontSelect ... ...' tells the font loading program what font to use
#       for which font character cell sizes.
#       I've pointed 4 different font sizes to the same font each time. This
#       is not a requirement, but it's convenient (not much fonts for 9-pixel
#       wide characters around, and the same goes for odd-sized font heights)
#

#Option LoadFont
FontProg "/usr/bin/setfont"
FontPath "/usr/lib/kbd/consolefonts"
FontSelect 8x16 9x16 8x15 9x15  "Cyr_a8x16"
FontSelect 8x14 9x14 8x13 9x13  "Cyr_a8x14"
FontSelect 8x12 9x12 8x11 9x11  "8x12alt.psf"
FontSelect 8x8  9x8  8x7  9x7   "Cyr_a8x8" 
FontSelect 8x32 9x32 8x31 9x31  "Cyr_a8x32" 

#############################################################################
#
# For those not sattisfied with the default cursor look: here's a way to change
# it. syntax is 'Cursor <start>-<stop>'. Cursor size is always relative to a
# 32-pixel high font! (see TextConfig.doc). So '0-31' will be scaled to '0-7'
# when selecting an 8-pixel font size.

#Cursor 0-31     # block cursor
#Cursor 28-31     # underline cursor: the default.

#############################################################################
#
# The lines shown here are the default built into SVGATextMode. Most monitors
# are capable of a lot more than that. Enable and change these to use the full 
# capabilities of your monitor.
# The syntax is similar to the one used in XF86Config.
#
# Changing these BEYOND what your monitor can handle, COULD result in damage
# to the monitor! See your monitor's user's manual for details.
#

#HorizSync 30-32
#VertRefresh 50-80


#############################################################################
#############################################################################
#
# Standard 80x25 text mode: this should ALWAYS work (i.e. no timing problems
# because of a too large pixel clock)
# If this works, then at least PART of the program works fine... 
#
"80x25"  25.175      640 680 776 800      400 412 414 449   font 8x16

#
# The following should work too, but at 25.0 instead of 25.175 MHz.
# it can be used to check if the "divide by 2" feature
# works for your VGA chip. If you have a 50 MHz dot clock at hand...
#
"80x25b"  25    640 680 776 800      400 412 414 449  font 8x16

#
# The next two modes can be used to check if the selection of 8- and 9-pixel
# wide character sizes work. Both modes look exactly the same to the monitor
# as the standard 80x25 modes. But if you watch closely, you'll see the spacing
# between characters is slightly larger for the 9x16 font than for the 8x16 font.
#
# ======> VERY IMPORTANT NOTE : <=======
# NOTE that the timing parameters are the same for both 8 and 9-pixel wide
# fonts (except for the clock)!!! Horizontal timings in VGA cards are
# specified in 8-bit wide CHARACTERS, not in PIXELS. Hence the restriction
# that horizontal timings should be a multiple of 8 (if they're not, they will be
# rounded down). Although the character width is 9 in the second case,
# horizontal timings are still in 8-bit characters. So both modes will result
# in 80 chars per line (640/8), but the VGA chip will count 8 pixels per
# character in the first case, and 9 in the second case. That means that the
# total pixel-count at the end of the video-line is (800/8)*8 in the first
# example, 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 ;-)
#

"80x25x8" 25.175    640 680 776 800      400 412 414 449   font 8x16
"80x25x9" 28.3      640 680 776 800      400 412 414 449   font 9x16


#
# Another standard mode for most VGA cards. This SHOULD work for you.
# (It was grabbed from a Trident card)
#
"132x43x8"  40.00 1056 1072 1232 1280     473 485 487 521   font 8x11
"132x43x9"  45.00 1056 1072 1232 1280     473 485 487 521   font 9x11

#
# This is a standard mode on some cards (Trident and some ET4000's)
# (Again, from a Trident)
#
"132x60"  40.00 1056 1072 1232 1280     480 489 491 521   font 8x8

###############################################################################
# It's time to try some more exotic (= non-standard) modes...
#
# This is my favourite for a 14" monitor. A bit more than the IMMENSELY
# BIG characters at 80x25, but still very readable. Most cards support 
# 132x43 as a standard mode as well, but that is rather "small print" 
# then. At 50 MHz, needs a 48 kHz monitor (VESA 800x600 @ 70 Hz standard).
# Low-end SVGA screens will need to lower the clock to 40 MHz (for 38 kHz
# @ 60 Hz) or even 36 MHz (for 35.5 kHz @ 50 Hz).
#
"100x37"  50   800  872  976 1040   600 632 638 670   font 8x16

# If your monitor can take 70 kHz (!) and 110 Hz, this one could make for a
# VERY stable, eye-friendly resolution.
"100x37+"   72   800  848  952 1032  600 600 606 630   font 8x16

#
# If you can't handle 48 kHz, try this: It's only 38 kHz/55 Hz, but almost all 
# VGA cards should work with this. And cheapo monitors too.
#
"100x37_low"  40   800  864  968 1056   600 605 607 628  font 8x16

#
# This has the same frequencies as a standard VGA text mode (31.5 kHz/60 Hz)
#
"100x37_VGA"  36   800  864  968 1016   518 522 525 545  font 9x14

#
# This is an enhancement to the standard 132x43 resolution. It uses a 16-pixel 
# font height instead of just 8. In combination with an appropriate font, this 
# is NOT bad at all.
#
"132x43_16"  65  1056 1096 1216 1336  688 688 694 714  font 8x16

#
# If you need BIG letters, try this one. You have to have a 32-pixel high font
# file somewhere (it is NOT included in the "keytbls" package in e.g. Slackware)
# Such a font is included with this package in the "setfont" directory.
# This needs a 49kHz/96Hz screen.
"50x15"  25.175  400 424 488 512  480 481 482 512  font 8x32

#
# If your monitor cannot handle that, use a 18 MHz clock. But that needs the
# "divide-by-two" feature (which should work on all VGA cards), dividing the
# (almost standard) 36 MHz clock down to 18 MHz, yielding 35kHz/68Hz, which
# should work on almost any screen, even the cheapest.
"50x15_low"  18  400 424 488 512  480 481 482 512  font 8x32

# The next one should work on ALL VGA monitors. 
# But only on cards that can divide their clocks by 2...
# It has standard VGA 31.25 kHz / 60 Hz timings
"50x15_VGA"  16  400 456 488 512  480 481 482 512  font 8x32

###############################################################################
# Some VESA compliant very-high resolution modes. Don't try this on Trident 
# or Cirrus cards. S3's can handle it, although you might notice some garbage
# while scrolling. This should be of no concern. I can live with that. ET4000's
# REALLY show off on these. Epensive cards too, but that's what you paid for.
# These modes have the same timings as a VESA 1024x768 mode at 70 Hz under
# X-windows. If you happen to own a single frequency monitor at 56 kHz, this
# is your ticket to paradise!
#
"v132x43" 75 1056 1096 1248 1336 774 783 784 800 +hsync +vsync font 8x18
"v132x48" 75 1056 1096 1248 1336 768 783 784 800  font 8x16
"v132x55" 75 1056 1096 1248 1336 770 783 784 800  font 8x14
"v132x60" 75 1056 1096 1248 1336 780 783 784 800  font 8x13
"v132x64" 75 1056 1096 1248 1336 768 783 784 800  font 8x12
"v132x70" 75 1056 1096 1248 1336 770 783 784 800  font 8x11

#
# For as far as I know, of all the "cheap" cards, only ET4000 can handle clocks
# this big... But be warned: This program does NOT (yet) take the safe limits
# for each card into account. An ET4000 is spec'ced to MAX 86 MHZ. Which is
# the limit for XFREE3. I don't see why 90 MHZ (4 above spec) would do any 
# damage, but you never know. Worst case, it just won't work properly.
# But WHAT A RESULT!!! Once you've seen this, you're hooked!
# You will need at least a 17" screen for the 160 char wide modes!
#
"ET132x66"   90  1056 1088 1240 1336  800 820 830 850   font 8x12
"ET160x100"  90  1280 1312 1480 1560  800 820 830 850   font 8x8
"ET160x66"   90  1280 1312 1480 1560  800 820 830 850   font 8x12
"ET132x43"   90  1056 1096 1216 1336  688 688 694 714   font 8x16

#
# If you want to get a taste of a 160-wide mode, try this one. It runs on 
# standard VGA frequencies, so any monitor should at least sync on it.
#
"160x60"   49  1280 1312 1480 1560  480 489 491 521   font 8x8

#
# Who says exagerating isn't fun ? 
# Can your monitor handle this? If you are afraid of damaging it: DON'T TRY THIS!
#
"80x25_160HZ"  56      640 680 776 800      400 412 414 449  font 8x16

#
# A little more moderate, but usefull: high-refresh 80x25.
#
"80x25_100Hz"  36      640 680 776 800      400 412 414 449  font 8x16

###############################################################################
#
# Following are some user-contributed text modes.
# If they don't work: complain to the respective authors, not me ;-)
#
###############################################################################
# User contributed modes: The Standard Ones
# These modes are more or less "standard" in that they should work on standard (low-end)
# (S)VGA screens. Some of them are grabbed from a DOS (BIOS) text mode.
#
# Russell Marks (mr216@greenwich.ac.uk)
"80x60"  28.3  640 680 776 800     480 489 491 521  font 9x8
"80x30"  28.3  640 680 776 800     480 489 491 521  font 9x16
"80x40"  28.3  640 680 776 800     480 489 491 521  font 9x12 
#
# Alexander JOLK (p6mqt001@cicrp.jussieu.fr)
"132x30x8"  40.00 1056 1072 1232 1280  480 489 491 521  font 8x16 # Grabbed from Trident Card
"132x30"    45.00 1056 1072 1232 1280  480 489 491 521  font 9x16 # Same, only with 9x16 character cell and higher clock
#
# Alessandro Rubini (rubini@ipvvis.UNIPV.IT)
"80x50"   25.175   640  680  776  810   400 420 430 460  font 8x8

###############################################################################
# User contributed modes: The Special Ones
# These modes need a multisync monitor. Most will NOT work on "standard" SVGA screens
# Use the "-n" option to see if your monitor supports them
#
# Carsten Zimmermann (zimmermann@zimnet.hanse.de)
"132x43_hi"     50.00 1056 1104 1264 1320   344 387 389 449  font 8x8
"132x43_semihi" 45.00 1056 1104 1264 1320   344 387 389 449  font 8x8
"132x43_14"     50.00 1056 1096 1216 1336   688 688 694 714  font 8x14
"160x60"        58.00 1280 1312 1432 1560   480 489 491 521  font 8x8
#
# Alexander JOLK (p6mqt001@cicrp.jussieu.fr)
"100x30x8"  36     800  864  896 1016  480 481 483 500  font 8x16
"100x30x9"  40     800  840  872 1016  480 481 483 500  font 9x16
#
# Andy Beck (becka@hp817s.rz.uni-duesseldorf.de)
"A55x41"     25.175  440  464  536  560   328  339  341  380  font 8x8
"A55x33"     25.175  440  464  536  560   330  339  341  380  font 8x10
"A55x27"     25.175  440  464  536  560   324  339  341  380  font 8x12
"A55x23"     25.175  440  464  536  560   322  339  341  380  font 8x14
"A55x20"     25.175  440  464  536  560   320  339  341  380  font 8x16
#
"A65x48"     25.175  520  544  616  640   384  399  401  440  font 8x8
"A65x38"     25.175  520  544  616  640   380  399  401  440  font 8x10
"A65x32"     25.175  520  544  616  640   384  399  401  440  font 8x12
"A65x27"     25.175  520  544  616  640   378  399  401  440  font 8x14
"A65x24"     25.175  520  544  616  640   384  399  401  440  font 8x16
#
"A80x60"     40      640  664  736  824   480  489  491  530  font 8x8
"A80x48"     40      640  664  736  824   480  489  491  530  font 8x10
"A80x40"     40      640  664  736  824   480  489  491  530  font 8x12
"A80x34"     40      640  664  736  824   476  489  491  530  font 8x14
"A80x30"     40      640  664  736  824   480  489  491  530  font 8x16
#
"A100x75"    70      800  856  936 1096   600  637  643  666  font 8x8
"A100x60"    70      800  856  936 1096   600  637  643  666  font 8x10
"A100x50"    70      800  856  936 1096   600  637  643  666  font 8x12
"A100x43"    70      800  856  936 1096   602  637  643  666  font 8x14
"A100x37"    70      800  856  936 1096   592  637  643  666  font 8x16
#
"A104x78"    70      832  888  968 1128   624  661  667  690  font 8x8
"A104x62"    70      832  888  968 1128   620  661  667  690  font 8x10
"A104x52"    70      832  888  968 1128   624  661  667  690  font 8x12
"A104x44"    70      832  888  968 1128   616  661  667  690  font 8x14
"A104x39"    70      832  888  968 1128   624  661  667  690  font 8x16
#
"A128x96"    70     1024 1072 1152 1360   768  784  787  810  font 8x8
"A128x77"    70     1024 1072 1152 1360   770  784  787  810  font 8x10
"A128x64"    70     1024 1072 1152 1360   768  784  787  810  font 8x12
"A128x54"    70     1024 1072 1152 1360   756  784  787  810  font 8x14
"A128x48"    70     1024 1072 1152 1360   768  784  787  810  font 8x16
#
"A145x109"   70     1160 1208 1280 1536   872  886  889  912  font 8x8
"A145x87"    70     1160 1208 1280 1536   870  886  889  912  font 8x10
"A145x72"    70     1160 1208 1280 1536   864  886  889  912  font 8x12
"A145x62"    70     1160 1208 1280 1536   868  886  889  912  font 8x14
"A145x54"    70     1160 1208 1280 1536   864  886  889  912  font 8x16
#
"A150x108"   70     1200 1248 1312 1560   864  916  919  942  font 8x8
"A150x86"    70     1200 1248 1312 1560   860  916  919  942  font 8x10
"A150x72"    70     1200 1248 1312 1560   864  916  919  942  font 8x12
"A150x61"    70     1200 1248 1312 1560   854  916  919  942  font 8x14
"A150x54"    70     1200 1248 1312 1560   864  916  919  942  font 8x16
#
"A150x89"    70     1200 1248 1312 1560   890  916  919  942  font 8x10
"A150x74"    70     1200 1248 1312 1560   888  916  919  942  font 8x12
"A150x63"    70     1200 1248 1312 1560   882  916  919  942  font 8x14
"A150x55"    70     1200 1248 1312 1560   880  916  919  942  font 8x16
#
# Ulrich Dessauer (ud@nitmar.muc.de)
"90x30"   40   720  790  840 930    420 425 433 455   font 8x14



###############################################################################
# CUSTOM modes: put your own modes (new or adapted from above) here.
#               You don't HAVE to rename them, since SVGATextMode will
#               take the LAST line it finds with the same name.
#
