# You can actually use this file as a config file for svgalib by copying
# it to /etc/vga/libvga.config. However this is not recommended
# because of the size of this file. So better remove any unneeded lines
# from this file before using it as config file.

# As you have probably guessed already, everything between '#' and the
# end of the line is ignored. Empty lines are also ignored. Since
# the driver you will use may not know all config options here, unknown
# commands are silently ignored. Please think of that when something
# does not work as you expect. Multiple commands are allowed in one line

# New style options are in general case insensitive whereas the old style
# options are case sensitive. The old style options are included to
# allow for old config files still being used.

# However there is one difference: The new style config expects a blank
# between each command. That is m2M4 won't work anymore. It would be
# parsed as a single config command. You have to specify m2 M4 in this
# situation.

# The environment variable SVGALIB_CONFIG is parsed like a line in this
# file after the real config file is parsed. Note that some config
# commands are disabled in SVGALIB_CONFIG for safety by default.
# Enable them with the command "overrideenable" in the config file.
# WARNING! This allows every user to change the monitor and clocks (and
# other configs) and thus damaging the hardware. I STRONGLY discourage
# use of overrideenable except for debugging/testing purposes.

# Note that you will have to delete the # before the example config commands
# to activate them.

#----------------------------------------------------------------------
# General options (handled by libvga):
#----------------------------------------------------------------------

#----------------------------------------------------------------------
# Mouse setting:
#----------------------------------------------------------------------
# mouse mousetype where mousetype is one of:
# Microsoft, MouseSystems, MMSeries, Logitech, Busmouse, PS2, MouseMan, or none.

# That is for example:

# mouse Microsoft
# mouse MouseSystems
# mouse MMSeries
# mouse Logitech
# mouse Busmouse
# mouse PS2
# mouse MouseMan
# mouse none

# (Obsolete) You can also specify the type by numbers:

# mouse 0 # Microsoft
# mouse 1 # MouseSystems
# mouse 2 # MMSeries
# mouse 3 # Logitech
# mouse 4 # Busmouse
# mouse 5 # PS2
# mouse 6 # MouseMan
# mouse 9 # none

# (Obsolete) Or in old style:

# m0 # Microsoft
# m1 # MouseSystems
# m2 # MMSeries
# m3 # Logitech
# m4 # Busmouse
# m5 # PS2
# m6 # MouseMan
# m9 # none

# cite from ms.c:
#  /*------------------------------------------------------------------*/
#  /* Define ALLOW_MOUSE_OVERRIDE to recognize the SVGA_MOUSE_OVERRIDE */
#  /* environment variable.  If this environment variable is set       */
#  /* then ignore the program's specified mouse type and use           */
#  /* the configuration file's type.                                   */
#  /* In particular, DOOM does not understand "MouseMan" as a valid    */
#  /* mouse type and so defaults the mouse type to "MouseSystems".     */
#  /*------------------------------------------------------------------*/

# Whitespace between m and the digit is allowed.

# Some multiprotocol mice use the state of RTS and DTR to find out which
# protocol.

# setRTS   # set the RTS wire.
# clearRTS # clear the RTS wire.
# leaveRTS # leave the RTS wire alone (default) (Wire is usually set)
# setDTR   # set the DTR wire.
# clearDTR # clear the DTR wire.
# leaveDTR # leave the DTR wire alone (default) (Wire is usually set)

# For example my mouse can emulate Microsoft and MouseSystems.
# It needs a low RTS to go into MouseSystems mode. Thus I use:

# mouse MouseSystems clearRTS

# Still I could just use mouse Microsoft and use the mouse with that
# protocol.. But then only 2 buttons instead of 3 are supported (not
# that I know any svgalib program that uses more than 2 buttons.)

# Other mice might need clearDTR as well or one set and clear.. Try yourself.

# Note: Having crtscts handshake enabled on the mouse tty may interfer with this
# options. Do not do that.

#----------------------------------------------------------------------
# Monitor setting:
#----------------------------------------------------------------------
# HorizSync min_kHz max_kHz
# VertRefresh min_Hz max_Hz
# specifies the range of frequencies acceptable to your monitor.  They
# obsolete the 'monitor' or 'M' settings below, and they shouldn't be
# used if 'HorizSync' and 'VertRefresh' are defined. Examples:

# HorizSync 31.5 35.5
# VertRefresh 50 70

# (Obsolete) monitor monitor class where monitor class is a digit
# from 0 to 6 or the horizontal frequency in kHz. Examples:

# monitor 0 # Max horizontal sync is 31.5 kHz
# monitor 1 # Max horizontal sync is 35.1 kHz
# monitor 2 # Max horizontal sync is 35.5 kHz
# monitor 3 # Max horizontal sync is 37.9 kHz
# monitor 4 # Max horizontal sync is 48.3 kHz
# monitor 5 # Max horizontal sync is 56.0 kHz
# monitor 6 # No restrictions.

# For your convenience you may specify the max horizontal sync explicitly. The
# correct class will the be chosen. You may use floats consisting of digits
# and a decimal point for this too:

# monitor 40.0 # equivalent to monitor 3
# Everything above 59 is considered as monitor 6.
# For compatibility the following are also supported:

# M0 # Max horizontal sync is 31.5 kHz
# M1 # Max horizontal sync is 35.1 kHz
# M2 # Max horizontal sync is 35.5 kHz
# M3 # Max horizontal sync is 37.9 kHz
# M4 # Max horizontal sync is 48.3 kHz
# M5 # Max horizontal sync is 56.0 kHz
# M6 # No restrictions.

# Whitespace between M and the digit is allowed.
# This command is not allowed in SVGALIB_CONFIG by default.

#----------------------------------------------------------------------
# Mode timings:
#----------------------------------------------------------------------
# It is now possible to define modetimings for some cards, the syntax is:

# modeline <label> <pxcl> <HDsp> <HSS> <HSE> <HTot> <VDsp> <VSS> <VSE> <VTot> <flags>

#   label   string
#           (ignored by vgalib)
#           mainly there to be compatible with XF86Config.
#           I use the format "Width x Height @ Vert.Refresh", but that's
#           just personal taste...

#   pxcl    float
#           the pixel clock in MHz

#   HDsp
#   VDsp    integer
#           size of the visible area (horizontal/vertical)

#   HSS
#   VSS     integer
#           Sync start (horizontal/vertical)

#   HSE
#   VSE     integer
#           Sync end (horizontal/vertical)

#   HTot
#   VTot    integer
#           Total width/height (end of back porch)

#   flags   +/-hsync, +/-vsync, interlace(d)
#           Sync polarity, interlace mode

# Everything should be on one line.
# The value for the horizontal timings must be multiples of eight.

# These are prefered over the default timings (if monitor and chipset
# can handle them).
# The format is identical to the one used by XFree86, but the label
# following the modeline keyword is ignored by vgalib.
#
# Here some examples:

# modeline "640x480@100"  43  640  664  824  848   480  483  490  504
# modeline "800x600@73"   50  800  856  976 1024   600  637  643  666
# modeline "1024x768@75"  85 1024 1048 1376 1400   768  771  780  806

# IMPORTANT! Not all drivers, that is SVGA cards, use the values. Only
# drivers using timing.c. Drivers using this feature are: S3, Cirrus, Ark.
# The Mach32 driver provides a similar feature seperately, you have to use
# the define command described far below.

# ET4000 (and to some extent EGA) allow to use a binary file created by some
# utility. All other chipset driver use predefined timings that are hardcoded
# in register dumps within the drivers.

# To add a user timing (from a device driver or from vga.c), just a fill
# a MonitorModeTiming structure and call addusertiming with a pointer to it.

#----------------------------------------------------------------------
# Chipset enforcement:
#----------------------------------------------------------------------

# If auto detection fails, you may force detection of your chipset with
# "chipset type" where type is (currently ;) ) one of:
# VGA, ET4000, Cirrus, TVGA, Oak, EGA, S3, ET3000, or Mach32
# Examples:

# chipset VGA
# chipset ET4000
# chipset Cirrus
# chipset TVGA
# chipset Oak
# chipset EGA
# chipset S3
# chipset ET3000
# chipset Mach32

# (Obsolete) There is also an old style way for this:

# C1 # chipset VGA
# C2 # chipset ET4000
# C3 # chipset Cirrus
# C4 # chipset TVGA
# C5 # chipset Oak
# C6 # chipset EGA
# C7 # chipset S3
# C8 # chipset ET3000
# C9 # chipset Mach32

# C0 # Auto-detect.

# Warning, incorrect settings may damage your hardware.
# No whitespace is allowed between the C and the digit.
# This command is not allowed in SVGALIB_CONFIG by default.

# If the size of memory or additional info is misdetected use this form:

# chipset Mach32 0 2048

# Note that always two integers have to be specified. Usually (mach32)
# the second parameter is the memory amount. Look at the *_init function
# of the specific device driver. Values you have to specify to force dac type
# and type of memory-aperture for mach32 can be found in mach32.h
# Note that there is a more convenient command (setuplinear) for enforcing
# specific memory-aperture configurations.

# This form is also not allowed in SVGALIB_CONFIG by default.

#----------------------------------------------------------------------
# Specific options required for the EGA-driver:
#----------------------------------------------------------------------
# monotext  # Card is in monochrome emulation mode
# colortext # Card is in color emulation mode

# Old style form:

# c0 # Card is in monochrome emulation mode
# c1 # Card is in color emulation mode
# No whitespace is allowed between the c and the digit.
# This command is not allowed in SVGALIB_CONFIG by default.

#----------------------------------------------------------------------
# RAMDAC support:
#----------------------------------------------------------------------
# Some chipsets (e.g. S3 and ARK) allows specifying a RAMDAC type.  If
# your RAMDAC is not autodetected, you can try specifying it:

# Ramdac Sierra32K
# Ramdac SC15025
# Ramdac SDAC         # S3 SDAC
# Ramdac GenDAC       # S3 GenDAC
# Ramdac ATT20C490    # AT&T 20C490, 491, 492 (and compatibles)
# Ramdac ATT20C498    # AT&T 20C498
# Ramdac IBMRGB52x    # IBM RGB524, 526, 528 (and compatibles)

#----------------------------------------------------------------------
# Dotclocks:
#----------------------------------------------------------------------
# Some chipsets needs a list of dot clocks for optimum operation.  Some
# includes or supports a programmable clock chip.  You'll need to specify
# them here.

# Fixed clocks example:
# (The following is just an example, get the values for your card from
#  you X setup)

# Clocks 25.175 28.3 40 70 50 75 36 44.9 0 118 77 31.5 110 65 72 93.5

# Programmable clockchip example:

# Clockchip ICD2061A  # The only one supported right now

#----------------------------------------------------------------------
# Miscanellous options:
#----------------------------------------------------------------------

# verbose  # Mach32: show messages while processing all info to build up a
# mode table.
# quiet    # Turn verbose messages off (default)

# nolinear # Inhibit use of a linear mmaped frame buffer.
# linear   # Allow (not enforce!) use of a linear mmaped frame buffer.

# overrideenable # Allow "dangerous" commands in SVGALIB_CONFIG.

#----------------------------------------------------------------------
# Options that may be useful for all drivers, but currently are only supported
# by Mach32 (Please read README.mach32 if you use one):
#----------------------------------------------------------------------

# maxclock16 maxclk # The maximal pixel clock to use for 16bpp modes. This is
# used by mach32 to find out which settings may be used for 16bpp modes.
# the mach32 default for this is 2000, thus it is effectively switched off.

# maxclock16 2000

# maxclock24 maxclk # The maximal clock to use for 24bpp modes. (see above)
# Experience showed that the mach32 default 49 is good for my 2MB VRAM card.

# maxclock24 49

# maxclock32 maxclk # The same for 32bpp modes (24bpp with one fill byte for
# faster memory access (not fully implemented (esp. for Mach32) yet).
# mach32 default (good for my VRAM card) is:

# maxclock32 39

# maxclock8 maxclk # Just for completeness the same for 8bpp modes.
# default is:

# maxclock8 2000

# The maxclock commands are usually not allowed in the environment variable.

# Thus you can consider it switched off.

# clocks list of clocks # Sets the frequencies of the clocks the chips can
# generate. Exactly 16 values have to be specified for mach32.
# Use 0 to disable a specific clock.
# Note that the mach32 can divide clocks by 2. Thus there are actually 32 clocks
# And you can also use the divided clocks in a define command.
# In difference to Xconfig only integers are allowed.
# This line is mandatory for Mach32. If it is not there it will be auto detected
# and added at the beginning of the config file.

# Values for Mach32:

# clock chip 18811-0:
# clocks 43 49 92 36 50 56 0 45 30 32 110 80 40 45 75 65

# clock chip 18811-1:
# due to Xfree86 info valid for: Ultra pro ISA, Ultra pro EISA,
# Ultra pro VLB(68800-3)
# clocks 100 126 92 36 50 56 0 45 135 32 110 80 40 45 75 65

# clock chip 1881 (ICS2494):
# due to Xfree86 info valid for: Ultra pro VLB (6880006)
# clocks 18 22 25 28 36 44 50 56 30 32 37 39 40 0 75 65

# In my own correspondence with ATI they say every Mach32 would have a
# 18811-1, so it may be possible just to take the 18811-1 line.
# However I have now reports of third party cards and motherboards with
# on board Mach32 chips, so be careful.
# Please have a look at README.mach32 for additional info on clocks.

# The clocks command is usually not allowed in the environment variable.

# Sometimes a mode cannot be realized with the logical linelength = pixels in
# a row * bytes per pixel. (true for Mach32 800x600). The default behavior
# of mach32 is to adjust xbytes in the info table appropriate, but you can
# select:

# variablelinelength # Adjust xbytes appropriate, thus overriding the standard
# svgalib mode. This may yield to problems with ..umm.. not well designed
# applications. This is the mach32 default.

# duplicatelinelength # Don't touch the standard mode but create an exact
# copy, a dynamic mode, with the adjusted xbytes value.  Expect noise at some
# pixels in 800x600 for more than 256 colors on mach32 when not using the dynamic
# mode.

# strictlinelength # Same as above but delete the standard mode thus creating
# the non conforming xbytes modes only as dynamic modes.

# To enforce the standard linelength for non-conforming modes use setlinelength
# below.

# All linelength commands are always allowed in the environment variable.

# In the following commands a mode is specified with horzXvertXcolors.
# Valid settings for colors in the mach32 driver are: 256, 32K, 64K, 16M, 16M4.
# 16M4 is for the 16M colors with 32bpp modes. These are expected to support
# slightly faster drawing.

# Examples: 640x480x256, 1024x768x64K, etc..

# inhibit mode1 [mode2 mode3...] # Switch the specified SVGA-Modes of:

# inhibit 800x600x32K 800x600x64K 800x600x16M # Disallow the maybe toasted
# mach32 800x600 modes.

# The inhibit command is always allowed in the environment variable.

# setlinelength length mode1 [mode2 mode3...] # Force the logical line length
# (xbytes) in the given modes to length pixels (not bytes!)
# see also variablelinelength, strictlinelength, duplicatelinelength above.

# setlinelength 800 800x600x32K 800x600x64K 800x600x16M

# The setlinelength command is always allowed in the environment variable.

# define mode1 [mode2 mode3 .... ] clock horz_timing vert_timing flags
# where clock is a clock in MHz (in integer! Has to be known by the driver.
# (one of the set clocks, or the exact half of them) only clocks in a clocks
# before the define can be used.
# You may use :n to specify the n-th clock (n=0..31 for mach32).
# horz_timing are four ints: hdisp h_sync_strt h_sync_wid h_total.
# vert_timing has the same format but for vertical. You may specify one or
# more flags out of: Interlace, +vsync, -vsync, +hsync, -hsync, to select
# interlace mode and polarity of sync signals. This format is almost the same
# Xfree uses, s.t. you may use their mode table and the modegen spreadsheet
# package for mode creation. Here is a 1024x768x256 mode as example:

#define 1024x768x256 80 1024 1024 1184 1312 768 768 772 791 +vsync -hsync

# or

#define 1024x768x256 1024x768x32K 1024x768x64K
#		:11 1024 1024 1184 1312 768 768 772 791

# (yes any whitespace in a command is allowed, even \n !)

# The define command is usually not allowed in the environment variable.

# There is one really dangerous option (except faking clocks). Please
# use it only if you are sure what you are doing. Wrong setup will
# lead to multiple components accessing your bus at once and thus
# to probable hardware damage.

# setuplinear address size

# Sets up a linear frame buffer at address of size size (both are given
# in MB). If the values make sense (for example address <16MB for ISA cards)
# the linear aperture is setup. Since the mach32-driver auto detects configured
# address itself, I strongly discourage use of this command. However I was
# asked for it as some PCI mach32-cards didn't setup the linear aperture correctly.
# Please ensure that the address range from address to address+size is free
# in your system. Obey that due to memory remapping for example 16MB Ram may
# exceed the 16MB address limit.

# Valid mach32-values for size are 1 and 4 (only 4 in PCI configurations),
# address + size have to be below 16MB for ISA, 4GB for multiplexed PCI,
# and 128MB else. Example: (my setup)

# setuplinear 64 4 # 4MB linear frame buffer at 0x4000000

# It is also valid to specify:
# setuplinear 0 0 # This will actually disable/de-configure any linear
# frame buffer. Useful to disable mach32 aperture even if it is enabled
# in the EEPROM.

# The setuplinear command is usually not allowed in the environment variable.

# There is one additional option that makes only sense for mach32:

# mach32eeprom filename
# The filename has to begin with a "/" .

# The mach32 has an EEPROM that is filled with predefined modes that can be
# set very convenient with a config utility from ATI. These settings will
# be used by svgalib. Unfortunately reading the mach32eeprom causes noise
# on the video signal. If the resulting flicker annoys you or screws your
# monitor up, specify a filename from which to read the contents of the
# EEPROM. If the file cannot be read, the EEPROM is read out and the file
# is created. There is a very simple checksum put into this file. Although
# it can easily fooled, don't change the file except you know very very
# well what you are doing. Also as long as the file exists changes in the
# mach32 EEPROM have no effect.. delete the file to recreate an updated
# version on next use of svgalib. You should ensure that the permissions of
# the file don't allow normal users to change it. (This may happen if umask
# has a bad value when svgalib creates the file)

# Example:

# mach32eeprom /etc/vga/mach32.eeprom

# Due to problems with some boards (See MACH32.readme) this command got
# heavily expanded:
#
# mach32eeprom subcommand1 [subcommand2 ....] (at least one subcommand needed)

# Valid subcommands are:
# ignore		- Don't complain about checksum and don't use any
#			  EEPROM contents.
# useaperture		- use the configuration for the memoryaperture
#			  given in the EEPROM.
# usetimings		- use videomodes found in the EEPROM of the board.
# nofile		- Forget about any filename that maybe was already
#			- configured. Don't read a file, don't create one.
# file filename		- Newstyle to specify the filename; this one can
#			- can be mixed with any eeprom subcommands.
# updatefile		- Don't read the file, always read the EEPROM
#			  (except when ignore is given) and create an
#			  uptodate image of the eeprom.
# keepfile		- disable all previous updatefile commands.
# compatible		- fall back to default behavior:
#			  If checksum is ok, use nothing. If it is ok,
#			  everything configure in the EEPROM.

# The subcommands are intended to be used together. For example:
# mach32eeprom ignore useaperture usetimings

# will ignore the checksum of your EEPROM, but use its contents.

# Order is vital! So:

# mach32eeprom useaperture usetimings ignore

# won't use any configuration from your EEPROM. Be careful with the useaperture
# subcommand. Please see "EEPROM woes in README.mach32. Note that any non
# understood subcommand will terminate the mach32eeprom command silently!
# Use only one subcommand per mach32eeprom command to avoid this.

# The mach32eeprom command is usually not allowed in the environment variable.

# There is a command to control Mach32 accelerated features:

# blit subcommand1 subcommand2 ...
#
# Valid subcommands are bit, fill, image, hlinelist. They enable support for the
# corresponding blit functions. Preceed them with no to turn the off (no space
# after no). Use "memimage" to emulate "image" blit using a linearframebuffer,
# which is usually much faster. Use "nomemimage" to never use this emulation.
# The emulation can be used in more resolutions than "image".
# Again order is vital! (esp. for the image commands)
# Use:

# blit image nomemimage # to use IO-style imageblt where possible. Don't
#			  emulate it in any resolution.
# blit image memimage   # to use emulated imageblt where possible.
# blit memimage image	# to use IO-style imageblt where possible, and
#			  the emulation where possible in the remaining modes.
# blit noimage		# Disable support for imageblt.

# Default is:
# blit bit fill image hlinelist memimage.

# The blit command is always allowed in the environment variable.

# The mach32 has also a few intermediate options for low level timing adjust.
# These are:

# vfifo8 number
# vfifo16 number
# vfifo24 number
# vfifo32 number
# blank number
# latch number

# They are not allowed in the environment variable by default.

# For details about these options see README.Mach32, they may be helpful for
# (non original ATI) Mach32 cards:

# vendor ati
# svgaclocks 9
# ramdac auto

# They are not allowed in the environment variable by default.

# See README.mach32 for details
