1
0

vga 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. .TH VGA 8
  2. .SH NAME
  3. vga \- configure a VGA card
  4. .SH SYNOPSIS
  5. .B aux/vga
  6. [
  7. .B -BcdilpvV
  8. ]
  9. [
  10. .B -b
  11. .I bios-string
  12. ]
  13. [
  14. .B -m
  15. .I monitor
  16. ]
  17. [
  18. .B -x
  19. .I file
  20. ]
  21. [
  22. .I mode
  23. [
  24. .I size
  25. ]
  26. ]
  27. .SH DESCRIPTION
  28. .B Aux/vga
  29. configures a VGA controller for various display sizes and depths.
  30. Using the monitor type specified in
  31. .B /env/monitor
  32. (default
  33. .BR vga )
  34. and the
  35. .I mode
  36. given as argument
  37. (default
  38. .BR 640x480x1 ),
  39. .B aux/vga
  40. uses the database of known VGA controllers and monitors in
  41. .B /lib/vgadb
  42. (see
  43. .IR vgadb (6))
  44. to configure
  45. the display via the devices provided by
  46. .IR vga (3).
  47. The options are:
  48. .TP
  49. .BI -b " bios-string"
  50. use the VGA database entry corresponding to
  51. .I bios-string
  52. (e.g.
  53. \fL0xC0045="Stealth 64 DRAM Vers. 2.02"\fR)
  54. rather than looking for identifying strings in the BIOS
  55. memory.
  56. .TP
  57. .B -B
  58. dump the BIOS memory (in hex) to standard output and exit.
  59. .TP
  60. .B -c
  61. disable the use of the hardware graphics cursor.
  62. (Since there is no software cursor, this disables the cursor entirely.)
  63. .TP
  64. .B -d
  65. include the color palette in whatever actions are performed,
  66. usually printing the contents.
  67. .TP
  68. .B -i
  69. when used with
  70. .B -p
  71. display the register values that will be loaded.
  72. .TP
  73. .B -l
  74. load the desired mode.
  75. .TP
  76. .BI -m " monitor"
  77. override the
  78. .B /env/monitor
  79. value.
  80. .B /env/monitor
  81. is usually set by including it in the
  82. .B plan9.ini
  83. file read by the PC boot program
  84. .IR 9load (8).
  85. .TP
  86. .B -p
  87. print the current or expected register values at appropriate points depending on
  88. other options.
  89. .TP
  90. .B -v
  91. print a trace of the functions called.
  92. .TP
  93. .B -V
  94. print a verbose trace of the functions called.
  95. .TP
  96. .B -x " file"
  97. use
  98. .I file
  99. as the VGA database rather than
  100. .BR /lib/vgadb .
  101. .PP
  102. .I Mode
  103. is of the form
  104. .IB X x Y x Z
  105. , where
  106. .IR X ,
  107. .IR Y ,
  108. and
  109. .I Z
  110. are numbers specifying the display height, width, and depth respectively.
  111. The mode must appear in
  112. .B /lib/vgadb
  113. as a value for one of the monitor entries.
  114. The usual modes are
  115. .BR 640x480x[18] ,
  116. .BR 800x600x[18] ,
  117. .BR 1024x768x[18][i] ,
  118. .BR 1280x1024x[18][i] ,
  119. .BR 1376x1024x8 ,
  120. and
  121. .BR 1600x1200x8 .
  122. A trailing
  123. .L i
  124. indicates interlaced operation.
  125. The default mode is
  126. .BR 640x480x8 .
  127. .I Size
  128. is of the form
  129. .I X x Y
  130. and configures the display to have a virtual
  131. screen of the given size.
  132. The physical screen will pan to follow the mouse.
  133. This is useful on displays with small screens,
  134. such as laptops, but can be confusing.
  135. .SH EXAMPLES
  136. Change the display resolution:
  137. .IP
  138. .EX
  139. aux/vga -l 1600x1200x8
  140. .EE
  141. .PP
  142. Print the current VGA controller registers.
  143. It is usually best to redirect the output of a
  144. .B -p
  145. command to a file to prevent confusion caused by using the VGA
  146. controller while trying to dump its state:
  147. .IP
  148. .EX
  149. aux/vga -p >/tmp/x
  150. .EE
  151. .PP
  152. Force the VGA controller to a known state:
  153. .IP
  154. .EX
  155. aux/vga -m vga -l
  156. .EE
  157. .PP
  158. Print the current VGA controller state and what would be loaded
  159. into it for a new resolution, but don't do the load:
  160. .IP
  161. .EX
  162. aux/vga -ip 1376x1024x8 >/tmp/x
  163. .EE
  164. .PP
  165. .SH FILES
  166. .TF /env/monitor
  167. .TP
  168. .B /env/monitor
  169. display type (default
  170. .IR vga ).
  171. .TP
  172. .B /lib/vgadb
  173. VGA configuration file.
  174. .SH SOURCE
  175. .B /sys/src/cmd/aux/vga
  176. .SH SEE ALSO
  177. .IR vga (3),
  178. .IR vgadb (6),
  179. .IR 9load (8)
  180. .SH BUGS
  181. .B Aux/vga
  182. makes every effort possible to verify that the mode it is about
  183. to load is valid and will bail out with an error message
  184. before setting any registers if it encounters a problem.
  185. However, things can go wrong, especially when playing with a
  186. new VGA controller or monitor setting.
  187. It is useful in such cases to have
  188. the above command for setting the controller to a known state
  189. at your fingertips.