2011-03-30 13:49:47 +00:00
|
|
|
.TH VGA 8
|
|
|
|
.SH NAME
|
|
|
|
vga \- configure a VGA card
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B aux/vga
|
|
|
|
[
|
|
|
|
.B -BcdilpvV
|
|
|
|
]
|
|
|
|
[
|
|
|
|
.B -b
|
|
|
|
.I bios-string
|
|
|
|
]
|
|
|
|
[
|
|
|
|
.B -m
|
|
|
|
.I monitor
|
|
|
|
]
|
|
|
|
[
|
2020-12-27 22:10:39 +00:00
|
|
|
.B -t
|
|
|
|
.I tilt
|
|
|
|
]
|
|
|
|
[
|
2011-03-30 13:49:47 +00:00
|
|
|
.B -x
|
|
|
|
.I file
|
|
|
|
]
|
|
|
|
[
|
|
|
|
.I mode
|
|
|
|
[
|
|
|
|
.I size
|
|
|
|
]
|
|
|
|
]
|
|
|
|
.SH DESCRIPTION
|
|
|
|
.I Vga
|
|
|
|
configures a VGA controller for various display sizes and depths.
|
|
|
|
Using the monitor type specified in
|
|
|
|
.B /env/monitor
|
|
|
|
(default
|
|
|
|
.BR vga )
|
|
|
|
and the
|
|
|
|
.I mode
|
|
|
|
given as argument
|
|
|
|
(default
|
|
|
|
.BR 640x480x1 ),
|
|
|
|
.I vga
|
|
|
|
uses the database of known VGA controllers and monitors in
|
|
|
|
.B /lib/vgadb
|
|
|
|
(see
|
|
|
|
.IR vgadb (6))
|
|
|
|
to configure
|
|
|
|
the display via the devices provided by
|
|
|
|
.IR vga (3).
|
|
|
|
The options are:
|
|
|
|
.TP
|
|
|
|
.BI -b " bios-string"
|
|
|
|
use the VGA database entry corresponding to
|
|
|
|
.I bios-string
|
|
|
|
(e.g.
|
|
|
|
\fL0xC0045="Stealth 64 DRAM Vers. 2.02"\fR)
|
|
|
|
rather than looking for identifying strings in the BIOS
|
|
|
|
memory.
|
|
|
|
.TP
|
|
|
|
.B -B
|
|
|
|
dump the BIOS memory (in hex) to standard output and exit.
|
|
|
|
.TP
|
|
|
|
.B -c
|
|
|
|
disable the use of the hardware graphics cursor.
|
|
|
|
.TP
|
|
|
|
.B -d
|
|
|
|
include the color palette in whatever actions are performed,
|
|
|
|
usually printing the contents.
|
|
|
|
.TP
|
|
|
|
.B -i
|
|
|
|
when used with
|
|
|
|
.B -p
|
|
|
|
display the register values that will be loaded.
|
|
|
|
.TP
|
|
|
|
.B -l
|
|
|
|
load the desired mode.
|
|
|
|
.TP
|
|
|
|
.BI -m " monitor"
|
|
|
|
override the
|
|
|
|
.B /env/monitor
|
|
|
|
value.
|
|
|
|
.B /env/monitor
|
|
|
|
is usually set by including it in the
|
|
|
|
.B plan9.ini
|
2011-04-13 02:58:33 +00:00
|
|
|
file read by the PC boot program.
|
2011-03-30 13:49:47 +00:00
|
|
|
.TP
|
|
|
|
.B -p
|
|
|
|
print the current or expected register values at appropriate points depending on
|
|
|
|
other options.
|
|
|
|
.TP
|
|
|
|
.B -v
|
|
|
|
print a trace of the functions called.
|
|
|
|
.TP
|
|
|
|
.B -V
|
|
|
|
print a verbose trace of the functions called.
|
|
|
|
.TP
|
2020-12-27 22:10:39 +00:00
|
|
|
.B -t
|
|
|
|
can be used to change the tilt of the screen.
|
|
|
|
The value is one of
|
|
|
|
.BR none ,
|
|
|
|
.BR left ,
|
|
|
|
.B inverted
|
|
|
|
and
|
|
|
|
.BR right .
|
|
|
|
See
|
|
|
|
.IR vga (3).
|
|
|
|
.TP
|
2011-03-30 13:49:47 +00:00
|
|
|
.BI -x " file"
|
|
|
|
use
|
|
|
|
.I file
|
|
|
|
as the VGA database rather than
|
|
|
|
.BR /lib/vgadb .
|
|
|
|
.PP
|
|
|
|
.I Mode
|
|
|
|
is of the form
|
2015-01-01 15:19:24 +00:00
|
|
|
.IB X x Y x Z[,S][,#N]
|
2011-03-30 13:49:47 +00:00
|
|
|
, where
|
|
|
|
.IR X ,
|
|
|
|
.IR Y ,
|
|
|
|
and
|
|
|
|
.I Z
|
|
|
|
are numbers specifying the display height, width, and depth respectively.
|
2014-12-28 16:42:38 +00:00
|
|
|
.I S
|
|
|
|
is scaling mode, either
|
|
|
|
.I scalefull
|
|
|
|
or
|
|
|
|
.IR scaleaspect ;
|
|
|
|
not specifying it disables scaling altogether.
|
2015-01-01 15:19:24 +00:00
|
|
|
.I #N
|
|
|
|
is used to switch to a specific display using its index
|
|
|
|
.IR N .
|
|
|
|
.PP
|
2011-03-30 13:49:47 +00:00
|
|
|
The mode must appear in
|
|
|
|
.B /lib/vgadb
|
|
|
|
as a value for one of the monitor entries.
|
|
|
|
The usual modes are
|
|
|
|
.BR 640x480x[18] ,
|
|
|
|
.BR 800x600x[18] ,
|
|
|
|
.BR 1024x768x[18][i] ,
|
|
|
|
.BR 1280x1024x[18][i] ,
|
|
|
|
.BR 1376x1024x8 ,
|
|
|
|
and
|
|
|
|
.BR 1600x1200x8 .
|
|
|
|
A trailing
|
|
|
|
.L i
|
|
|
|
indicates interlaced operation.
|
|
|
|
The default mode is
|
|
|
|
.BR 640x480x8 .
|
|
|
|
.I Size
|
|
|
|
is of the form
|
|
|
|
.I X x Y
|
|
|
|
and configures the display to have a virtual
|
|
|
|
screen of the given size.
|
|
|
|
.PP
|
|
|
|
Using the monitor name
|
|
|
|
.B vesa
|
|
|
|
instructs
|
|
|
|
.I vga
|
|
|
|
to use VESA BIOS calls to configure the display.
|
|
|
|
Also, if our VGA controller can't be found in
|
|
|
|
.IR vgadb ,
|
|
|
|
.I vga
|
|
|
|
will try the VESA calls.
|
|
|
|
There are no entries for the
|
|
|
|
.B vesa
|
|
|
|
monitor in
|
|
|
|
.IR vgadb .
|
2015-01-01 15:19:24 +00:00
|
|
|
For a list of available VESA modes and connected displays, use
|
2011-03-30 13:49:47 +00:00
|
|
|
.IP
|
|
|
|
.EX
|
|
|
|
aux/vga -m vesa -p
|
|
|
|
.EE
|
|
|
|
.PP
|
|
|
|
Loading the special mode
|
|
|
|
.BR text :
|
|
|
|
.IP
|
|
|
|
.EX
|
|
|
|
aux/vga -l text
|
|
|
|
.EE
|
|
|
|
.PP
|
|
|
|
switches out of graphics mode back into text mode.
|
|
|
|
It uses the VESA BIOS.
|
|
|
|
.SH EXAMPLES
|
|
|
|
Change the display resolution:
|
|
|
|
.IP
|
|
|
|
.EX
|
|
|
|
aux/vga -l 1600x1200x8
|
|
|
|
.EE
|
|
|
|
.PP
|
2015-01-01 15:19:24 +00:00
|
|
|
Show connected and active displays:
|
|
|
|
.IP
|
|
|
|
.EX
|
|
|
|
aux/vga -m vesa -p | grep dsp
|
|
|
|
.EE
|
|
|
|
.PP
|
|
|
|
Switch to display
|
|
|
|
.I 4
|
|
|
|
and load a specific mode:
|
|
|
|
.IP
|
|
|
|
.EX
|
|
|
|
aux/vga -m vesa -l '1920x1080x16,#4'
|
|
|
|
.EE
|
|
|
|
.PP
|
2011-03-30 13:49:47 +00:00
|
|
|
Print the current VGA controller registers.
|
|
|
|
It is usually best to redirect the output of a
|
|
|
|
.B -p
|
|
|
|
command to a file to prevent confusion caused by using the VGA
|
|
|
|
controller while trying to dump its state:
|
|
|
|
.IP
|
|
|
|
.EX
|
|
|
|
aux/vga -p >/tmp/x
|
|
|
|
.EE
|
|
|
|
.PP
|
|
|
|
Force the VGA controller to a known state:
|
|
|
|
.IP
|
|
|
|
.EX
|
|
|
|
aux/vga -m vga -l
|
|
|
|
.EE
|
|
|
|
.PP
|
|
|
|
Print the current VGA controller state and what would be loaded
|
|
|
|
into it for a new resolution, but don't do the load:
|
|
|
|
.IP
|
|
|
|
.EX
|
|
|
|
aux/vga -ip 1376x1024x8 >/tmp/x
|
|
|
|
.EE
|
|
|
|
.PP
|
|
|
|
.SH FILES
|
|
|
|
.TF /env/monitor
|
|
|
|
.TP
|
|
|
|
.B /env/monitor
|
|
|
|
display type (default
|
|
|
|
.IR vga ).
|
|
|
|
.TP
|
|
|
|
.B /lib/vgadb
|
|
|
|
VGA configuration file.
|
|
|
|
.SH SOURCE
|
|
|
|
.B /sys/src/cmd/aux/vga
|
|
|
|
.SH SEE ALSO
|
|
|
|
.IR vga (3),
|
|
|
|
.IR vgadb (6),
|
|
|
|
.SH BUGS
|
|
|
|
.B Aux/vga
|
|
|
|
makes every effort possible to verify that the mode it is about
|
|
|
|
to load is valid and will bail out with an error message
|
|
|
|
before setting any registers if it encounters a problem.
|
|
|
|
However, things can go wrong, especially when playing with a
|
|
|
|
new VGA controller or monitor setting.
|
|
|
|
It is useful in such cases to have
|
|
|
|
the above command for setting the controller to a known state
|
|
|
|
at your fingertips.
|
2015-01-01 15:19:24 +00:00
|
|
|
.PP
|
2014-12-28 16:42:38 +00:00
|
|
|
Scaling modes currently work with Intel and NVIDIA video
|
|
|
|
adapters only, using VESA. Intel doesn't support
|
|
|
|
.I scaleaspect
|
|
|
|
mode.
|
2015-01-01 15:19:24 +00:00
|
|
|
.PP
|
|
|
|
Display switching currently works with Intel video adapters
|
|
|
|
only, using VESA.
|