vga 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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. .PP
  136. Using the monitor name
  137. .B vesa
  138. instructs
  139. .I vga
  140. to use VESA BIOS calls to configure the display.
  141. There are no entries for the
  142. .B vesa
  143. monitor in
  144. .IR vgadb .
  145. For a list of available VESA modes, use
  146. .IP
  147. .EX
  148. aux/vga -m vesa -p
  149. .EE
  150. .PP
  151. Loading the special mode
  152. .BR text :
  153. .IP
  154. .EX
  155. aux/vga -l text
  156. .EE
  157. .PP
  158. switches out of graphics mode back into text mode.
  159. It uses the VESA BIOS.
  160. .SH EXAMPLES
  161. Change the display resolution:
  162. .IP
  163. .EX
  164. aux/vga -l 1600x1200x8
  165. .EE
  166. .PP
  167. Print the current VGA controller registers.
  168. It is usually best to redirect the output of a
  169. .B -p
  170. command to a file to prevent confusion caused by using the VGA
  171. controller while trying to dump its state:
  172. .IP
  173. .EX
  174. aux/vga -p >/tmp/x
  175. .EE
  176. .PP
  177. Force the VGA controller to a known state:
  178. .IP
  179. .EX
  180. aux/vga -m vga -l
  181. .EE
  182. .PP
  183. Print the current VGA controller state and what would be loaded
  184. into it for a new resolution, but don't do the load:
  185. .IP
  186. .EX
  187. aux/vga -ip 1376x1024x8 >/tmp/x
  188. .EE
  189. .PP
  190. .SH FILES
  191. .TF /env/monitor
  192. .TP
  193. .B /env/monitor
  194. display type (default
  195. .IR vga ).
  196. .TP
  197. .B /lib/vgadb
  198. VGA configuration file.
  199. .SH SOURCE
  200. .B /sys/src/cmd/aux/vga
  201. .SH SEE ALSO
  202. .IR vga (3),
  203. .IR vgadb (6),
  204. .IR 9load (8)
  205. .SH BUGS
  206. .B Aux/vga
  207. makes every effort possible to verify that the mode it is about
  208. to load is valid and will bail out with an error message
  209. before setting any registers if it encounters a problem.
  210. However, things can go wrong, especially when playing with a
  211. new VGA controller or monitor setting.
  212. It is useful in such cases to have
  213. the above command for setting the controller to a known state
  214. at your fingertips.