NAME
	mv, mmv, vbev, vgav - Video mode configurator

SYNOPSYS
	mv [-grab] [-mmv] [-vbev] [-vgav] [-log] [-logsync] [-cfg CFGFILE]

DESCRIPTION
	The `mv', `mmv', `vbev' and `vgav' are the main video
	configuration programs for AdvanceMAME, AdvanceMENU,
	AdvanceVBE and AdvanceVGA.
	They allow to select, create and tweak video modes
	interactively.

	These utilities differ only in the name of configuration file
	used to store the video modes. Respectively they are
	`mame.cfg', `menu.cfg', `vbe.cfg' and `vga.cfg'.

	This document describes `mv' but the same apply to the others.

	When the program start is printed a list of modelines.
	You can walk on the list with the UP and DOWN arrows of
	your keyboard.
	You can select the modelines to use in the emulator
	pressing SPACE.

	With the LEFT and RIGHT arrows you can select the type of video
	mode to test.

	To test a video modes you can press ENTER and ESC to return
	to the list.

	When you have finished the selection press F2 to save video
	modes in the configuration file. At the next run the emulator will
	use one of the modelines that you have chosen.

	You must at least read the VIDEO MODES and CONFIGURATION
	chapters. If you have problem read the TROUBLESHOTTING VIDEO
	MODES chapter.

OPTIONS
	-cfg
		Specify an alternate name of the cfg file.

	-grab
		Grab the current video mode and print a valid
		modeline that you can use in your `cfg' file.

	-log
		A very detailed log of operations is saved in
		a `.log' file. Very useful for debugging problems.

	-logsync
		Like the `-log' option but the log file is not
		buffered. This option must be used to get a complete
		log file in presence of a machine crash.

	-mmv, -vbev, -vgav
		Select the mode of operation for the programs `mm',
		`vbe' and `vga'.

VIDEO DRIVER
	There are 5 types of video drivers. AdvanceMAME uses all of
	them, AdvanceVBE uses only the `vbeline' driver, and
	AdvanceVGA uses only the `vgaline' driver.

	vga - Standard VGA modes
		Video mode obtained from the VGA BIOS. Only the
		resolutions 320x200 and 400x300 (derived
		from the 800x600) at 8 bit color modes.

	vgaline - Tweaked VGA modes
		Video modes obtained tweaking the hardware
		registers of the standard VGA. Usually these modes
		are called Tweaked, XMode, ZMode.
		Only the standard VGA pixel clocks 6.29, 7.08, 12.59,
		14.16 MHz are available. Only 8 bit color modes. Only
		256 kBytes of video memory.

		This driver supports also text modes with pixel clocks
		12.59, 14.16, 25.17, 28.32 MHz.

	svgaline - Tweaked SVGA modes
		Video modes obtained tweaking the hardware
		registers of the recognized SVGA.
		These are the most powerful modes.
		All clocks, all bit depths are available.

		To use these modes your video board must be supported
		by a `svgaline' driver listed in the `card.txt' file.
		The drivers are probed at the startup, and the first
		detected is used. The name of the video driver active
		is displayed in the upper right corner of the first
		screen of the utility `mv'.

		This driver is completly indipendent of the VBE BIOS
		of your board.

	vbe - Default VBE (VESA) modes
		Video modes obtained from your VESA BIOS.
		All the bit depths are supported.

	vbeline - Tweaked VBE (VESA) modes
		Video modes obtained tweaking the standard VBE BIOS mode
		changing the hardware registers of the SVGA.

		To use these modes your video board must be supported
		by a `vbeline' driver listed in the `card.txt' file.
		The drivers are probed at the startup, and the first
		detected is used. The name of the video driver active
		is displayed in the upper right corner of the first
		screen of the utility `mv'.

		These drivers work setting a video mode using the default
		VBE (any version) services and tweak some hardware SVGA
		registers to modify the obtained video mode.

		The driver `vbe3' is an exception. It requires the
		presence of a VBE3 BIOS to change the frequency of the
		desiderated video mode. Unfortunately the standard
		VBE3 services don't support a resolution size change.
		The resolution is changed modifying only the standard
		VGA registers. This hack may or not may works.
		Also the interlaced modes are only rarely supported
		by the various VBE3 BIOS because they are very rarely used
		in the standard PC monitors.

		If your video board isn't supported by any drivers and
		you don't have a VBE3 BIOS you can try installing a
		software VESA BIOS like the SciTech Display Doctor.

	If you have correctly configured the `hclock/vclock' options in
	your configuration file the video modes out of the frequency range
	supported by your monitor are displayed in red, and you are
	prevented to use them.

CREATING VIDEO MODES
	To create a new modeline you should press F5 and you must enter
	the :
		Vertical clock
		Horizontal resolution
		Vertical resolution

	If possible a video mode compatible with your current monitor
	configuration is created.

	If a the `format' option is present in your configuration file
	the video mode is created with this format. Otherwise a generic
	VGA monitor format is used.

ADJUSTING MODELINES
	You can modify the modelines in the test screen pressing ENTER
	or in the list screen directly.

	When you are in the test screen, `mv' prevent you to set a
	modeline out of the frequency range supported by your monitor.
	In this cases you can hear a grave long sound. Instead when you
	are in the list screen you don't have this limitation.

	If you request a parameter not supported by your hardware
	you hear an acute short sound.

	You can easily change one of the clock values of your modelines
	pressing F8.

	Finally you can rename the modelines pressing TAB.

	Remember to select the modified modelines with SPACE otherwise
	they aren't saved in your configuration file and will be lost.

TROUBLESHOTTING VIDEO MODES
	You you are using the `vbeline' driver the first thing to try
	is to install the most update VESA BIOS, like the SciTech
	Display Doctor or others utilities.

	If all the `vbeline' modes don't work and you know that your
	current VESA BIOS is version 3.0 or greater you can try to
	force the detection of the `vbe3' driver with the
	`vbeline_driver=vbe3' option.

	If only some vbeline modes don't work try to change
	the `vbeline_mode' option.

	Finally you can run `mv' with the `-log' option, test some
	working and not working modes, and send to me the resulting
	`mv.log' file with a detailed list of which modes work or not.

STARTUP TEXT MODE
	The program at startup tries to set a text mode supported by your
	hardware to show his data.

	If a modelines named `default_text' is present in your
	`mame.cfg' the program use it.

	If correct `hclock/vclock' options are found in your `mame.cfg'
	the program try to use one text mode that match your `hclock/vclock'
	configuration. First are tried modes in the `mame.cfg' file, after
	modes present in a internal list of the program.
	If no one of these modes match your configuration the current text
	mode is used.

	If the program can't found a good text mode for your monitor
	but you know that this mode exists because you can set it in some
	way, you can use the `-grab' option to print the modeline of the
	current video mode.

	When you have the modeline, insert it in the `mame.cfg' file in
	the `[video]' section with a line like this :

	modeline0 = default_text MODELINE

CONFIGURATION (common options)
	The `mv' program uses the configuration options in the `[video]'
	section of the file `mame.cfg'.

    "[video] hclock/vclock"
	Specify the monitor frequency range in term of horizontal and
	vertical clocks. This option is MANDATORY.
	Generally these values are specified in the technical page of 
	your monitor manual. 

	hclock = H_LOW - H_HIGH [, H_LOW - H_HIGH] [, H_FIXED]
	vclock = V_LOW - V_HIGH [, V_LOW - V_HIGH] [, V_FIXED]

	Options:
		H_LOW - H_HIGH - horizontal frequency range in kHz
		V_LOW - V_HIGH - vertical frequency range in Hz
		H_FIXED - horizontal fixed frequency in kHz
		V_FIXED - vertical fixed frequency in Hz

	These are some example:

		Generic PC SVGA multisync monitor :
			[video]
			hclock = 31 - 60
			vclock = 55 - 90

		Generic PC VGA monitor :
			[video]
			hclock = 31.5
			vclock = 55 - 110

		Generic LCD screen :
			[video]
			hclock = 0
			vclock = 0

		PAL/SECAM TV (European) :
			[video]
			hclock = 15.62
			vclock = 50

		PAL/SECAM TV (European) which supports also NTSC 
		modes (very common if you use the SCART input) :
			[video]
			hclock = 15.62, 15.73
			vclock = 50, 60

		NTSC TV (USA) :
			[video]
			hclock = 15.73
			vclock = 59.94

		Generic Arcade Monitor Standard Resolution 15 kHz (CGA) :
			[video]
			hclock = 15.75
			vclock = 50 - 60

		Generic Arcade Monitor Medium Resolution 25 kHz (EGA) :
			[video]
			hclock = 24.84
			vclock = 50 - 60

		Generic Atari Monitor Extended Resolution 16 kHz
			[video]
			hclock = 16.5
			vclock = 53

	The specified values are automatically enlarged by a portion of 2%

    "[video] modelineX"
	Define a modeline, one modeline for every line. These lines can be
	generated with the `mv' or `mg' utilities or written manually.
	The modeline format is compatible with the format used by the
	Linux SVGALIB library and by the XFree window system.

	modelineX = NAME CLOCK HDE HRS HRE HT VDE VRS VRE VT [-hsync] [-vsync] [+hsync] [+vsync] [doublescan] [interlace]

	Options:
		X - number for differentiating the modelines
		NAME - name of the video mode.
			You can use the quotes (") for the names with spaces.
		CLOCK - pixel clock in MHz
		HDE HRS HRE HT - horizontal `Display End', `Retrace Start', 
			`Retrace End', `Total'
		VDE VRS VRE VT - vertical `Display End', `Retrace Start',
			`Retrace End', `Total'
		-hsync -vsync +hsync +vsync - polarization
		doublescan - double scanned mode
		interlace - interlaced mode

	Example:
		modeline3 = tweak320x240 12.59 320 336 356 400 240 249 254 262 doublescan -hsync -vsync

    "[video] formatX"
	Select the format of the video modes to create.
	
	formatX = HCLOCK HDE HRS HRE HT VDE VRS VRE VT

	Options:
		X - number for differentiating the formats, from 0 to 7
		HCLOCK - Horizontal clock in Hz
		HDE HRS HRE HT VDE VRS VRE VT - Like the modeline option

	When a new modeline is created, AdvanceMAME use a linear
	interpolation of the two formats with the nearest horizontal
	clock.

    "[video] default_mode"
	Define how many default modelines to insert in the main list.

	default_mode = smart | all

	Options:
		smart - list only the best modelines. For example
			don't display all the modelines that have the
			hclock value not supported by your monitor.
			(default)
		all - list all the modelines available.

CONFIGURATION (svgaline options)
	These option have effects only on the `svgaline' drivers.

    "[video] svgaline_driver"
	Select the video driver used. The program uses the specified
	driver ONLY if it's correctly detected.
	Generally you should not use this option.

	Syntax:
		svgaline_driver = none | auto | ...

	Options:
		none - don't use any `svgaline' driver
		auto - autodetect (default)
		... - check the `card.txt' file for a complete list of
			the video driver available

	Example:
		svgaline_driver = none

CONFIGURATION (vbeline options)
	These option have effects only on the `vbeline' drivers.

    "[video] vbeline_driver"
	Select the video driver used. The program uses the specified
	driver ONLY if it's correctly detected.
	Generally you should use this option only to force the
	`vbe3' driver.

	Syntax:
		vbeline_driver = none | auto | vbe3 | ...

	Options:
		none - don't use any `vbeline' driver
		auto - autodetect (default)
		vbe3 - use the VBE3 BIOS if available, this is the
			last driver detected
		... - check the `card.txt' file for a complete list of
			the video driver available

	Example:
		vbeline_driver = vbe3

    "[video] vbeline_mode"
	Select which `vbe' mode to use when generating `vbeline' modes

	vbeline_mode = smaller | bigger | ...

	Options:
		smaller - Use the biggest `vbe' mode contained in
			the `vbeline' mode (default)
		bigger - Use the smallest `vbe' mode which contains
			the `vbeline' mode
		smaller_upto640 - Like `smaller' but not
			bigger than 640x480
		bigger_upto640 - Like `bigger' but not
			bigger than 640x480
		320 - Use always the 320x240 mode
		400 - Use always the 400x300 mode
		512 - Use always the 512x384 mode
		640 - Use always the 640x480 mode
		800 - Use always the 800x600 mode

