vga 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  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. .I 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. .I 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. .TP
  63. .B -d
  64. include the color palette in whatever actions are performed,
  65. usually printing the contents.
  66. .TP
  67. .B -i
  68. when used with
  69. .B -p
  70. display the register values that will be loaded.
  71. .TP
  72. .B -l
  73. load the desired mode.
  74. .TP
  75. .BI -m " monitor"
  76. override the
  77. .B /env/monitor
  78. value.
  79. .B /env/monitor
  80. is usually set by including it in the
  81. .B plan9.ini
  82. file read by the PC boot program
  83. .IR 9load (8).
  84. .TP
  85. .B -p
  86. print the current or expected register values at appropriate points depending on
  87. other options.
  88. .TP
  89. .B -v
  90. print a trace of the functions called.
  91. .TP
  92. .B -V
  93. print a verbose trace of the functions called.
  94. .TP
  95. .BI -x " file"
  96. use
  97. .I file
  98. as the VGA database rather than
  99. .BR /lib/vgadb .
  100. .PP
  101. .I Mode
  102. is of the form
  103. .IB X x Y x Z
  104. , where
  105. .IR X ,
  106. .IR Y ,
  107. and
  108. .I Z
  109. are numbers specifying the display height, width, and depth respectively.
  110. The mode must appear in
  111. .B /lib/vgadb
  112. as a value for one of the monitor entries.
  113. The usual modes are
  114. .BR 640x480x[18] ,
  115. .BR 800x600x[18] ,
  116. .BR 1024x768x[18][i] ,
  117. .BR 1280x1024x[18][i] ,
  118. .BR 1376x1024x8 ,
  119. and
  120. .BR 1600x1200x8 .
  121. A trailing
  122. .L i
  123. indicates interlaced operation.
  124. The default mode is
  125. .BR 640x480x8 .
  126. .I Size
  127. is of the form
  128. .I X x Y
  129. and configures the display to have a virtual
  130. screen of the given size.
  131. The physical screen will pan to follow the mouse.
  132. This is useful on displays with small screens,
  133. such as laptops, but can be confusing.
  134. .PP
  135. Using the monitor name
  136. .B vesa
  137. instructs
  138. .I vga
  139. to use VESA BIOS calls to configure the display.
  140. Also, if our VGA controller can't be found in
  141. .IR vgadb ,
  142. .I vga
  143. will try the VESA calls.
  144. There are no entries for the
  145. .B vesa
  146. monitor in
  147. .IR vgadb .
  148. For a list of available VESA modes, use
  149. .IP
  150. .EX
  151. aux/vga -m vesa -p
  152. .EE
  153. .PP
  154. Loading the special mode
  155. .BR text :
  156. .IP
  157. .EX
  158. aux/vga -l text
  159. .EE
  160. .PP
  161. switches out of graphics mode back into text mode.
  162. It uses the VESA BIOS.
  163. .SH EXAMPLES
  164. Change the display resolution:
  165. .IP
  166. .EX
  167. aux/vga -l 1600x1200x8
  168. .EE
  169. .PP
  170. Print the current VGA controller registers.
  171. It is usually best to redirect the output of a
  172. .B -p
  173. command to a file to prevent confusion caused by using the VGA
  174. controller while trying to dump its state:
  175. .IP
  176. .EX
  177. aux/vga -p >/tmp/x
  178. .EE
  179. .PP
  180. Force the VGA controller to a known state:
  181. .IP
  182. .EX
  183. aux/vga -m vga -l
  184. .EE
  185. .PP
  186. Print the current VGA controller state and what would be loaded
  187. into it for a new resolution, but don't do the load:
  188. .IP
  189. .EX
  190. aux/vga -ip 1376x1024x8 >/tmp/x
  191. .EE
  192. .PP
  193. .SH FILES
  194. .TF /env/monitor
  195. .TP
  196. .B /env/monitor
  197. display type (default
  198. .IR vga ).
  199. .TP
  200. .B /lib/vgadb
  201. VGA configuration file.
  202. .SH SOURCE
  203. .B /sys/src/cmd/aux/vga
  204. .SH SEE ALSO
  205. .IR vga (3),
  206. .IR vgadb (6),
  207. .IR 9load (8)
  208. .SH BUGS
  209. .B Aux/vga
  210. makes every effort possible to verify that the mode it is about
  211. to load is valid and will bail out with an error message
  212. before setting any registers if it encounters a problem.
  213. However, things can go wrong, especially when playing with a
  214. new VGA controller or monitor setting.
  215. It is useful in such cases to have
  216. the above command for setting the controller to a known state
  217. at your fingertips.
  218. .PP
  219. Due to the current implementation of access to the PC's
  220. `real mode',
  221. the VESA BIOS calls will only work on
  222. uniprocessors or on multiprocessors with
  223. .B *nomp=1
  224. in
  225. .IR plan9.ini .