home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 10 / mycd10.iso / share / os2 / graficos / matrox / mgax64.os2 / MGA_OS2_MGACONF.CMD < prev    next >
Encoding:
Text File  |  1995-05-03  |  5.1 KB  |  209 lines

  1. /**/
  2.  
  3. call RxFuncAdd 'SysIni', 'RexxUtil', 'SysIni'
  4.  
  5. SYSFILE='USER'
  6. App='MGA32'
  7. Value=''
  8.  
  9. Parse Arg all
  10.  
  11. displayusage=1
  12.  
  13. If words(all) = 0 then signal query
  14. else cmd = translate(word(all,1))
  15.  
  16. displayusage=0
  17.  
  18. select
  19.     when cmd = 'V' then call vsync
  20.     when cmd = 'C' then call scursor
  21.     when cmd = 'F' then call fonts
  22.     when cmd = 'D' then call dive
  23.     otherwise signal usage
  24. end
  25.  
  26. call SysIni SYSFILE, App, AppKey, Value
  27.  
  28. query:
  29. say ''
  30. call SysIni SYSFILE, App, 'All:', 'Keys'
  31. if Result \= 'ERROR:' then
  32.     do j=1 to Keys.0
  33.         val = SysIni(SYSFILE, App, Keys.j)
  34.         say left(Keys.j, 16) left(val, 20)
  35.     end
  36. else do
  37.     say 'Using Default Configurations:'
  38.     say left('WAITVSYNC', 16) left('ON', 20)
  39.     say left('SOFTCURSOR', 16) left('ON', 20)
  40.     end
  41.  
  42. if displayusage=0 then exit
  43. say
  44.  
  45. usage:
  46. say 'usage: mgaconf [v 0/1] / [c 0/1/2] / [f] / [d 0/1]'
  47. say '   v 0  : don t wait for Vsync when change the palette'
  48. say '   v 1  : wait for Vsync when change the palette (default, VP_3026 only)'
  49. say '   c 0  : enable software cursor (default)'
  50. say '   c 1  : disable software cursor'
  51. say '   c 2  : disable software cursor if color count < 4 color'
  52. say '   f    : modify the default system fonts, font resolution and AVIO fonts'
  53. say '   d 0/1: switch OFF/ON DIVE for 24bpp in Warp'
  54. end:
  55.  
  56. exit
  57.  
  58.  
  59. vsync:
  60. AppKey='WAITVSYNC'
  61. If words(all) > 1 then cmd2 = translate(word(all,2))
  62. else do
  63.     say 'for VSYNC ON  press 1'
  64.     say 'for VSYNC OFF press 0'
  65.     pull cmd2
  66. end
  67. select
  68.     when cmd2 = '0' then Value='OFF'
  69.     otherwise nop
  70. end
  71. return
  72.  
  73. scursor:
  74. AppKey='SOFTCURSOR'
  75. If words(all) > 1 then cmd2 = translate(word(all,2))
  76. else do
  77.     say 'for SOFTCURSOR ON                           press 0'
  78.     say 'for SOFTCURSOR OFF                          press 1'
  79.     say 'for SOFTCURSOR OFF if color count < 4 color press 2'
  80.     pull cmd2
  81. end
  82. select
  83.     when cmd2 = '1' then Value='OFF'
  84.     when cmd2 = '2' then Value='4'
  85.     otherwise nop
  86. end
  87. return
  88.  
  89. fonts:
  90. If words(all) > 1 then cmd2 = translate(word(all,2))
  91. else do
  92.     say 'for Resolution  640x480  press 0'
  93.     say 'for Resolution  800x600  press 1'
  94.     say 'for Resolution 1024x768  press 2'
  95.     say 'for Resolution 1152x882  press 3'
  96.     say 'for Resolution 1280x1024 press 4'
  97.     say 'for Resolution 1600x1200 press 5'
  98.     pull cmd2
  99. end
  100. select
  101.     when cmd2 = '1' then RES='0800x0600'
  102.     when cmd2 = '2' then RES='1024x0768'
  103.     when cmd2 = '3' then RES='1152x0882'
  104.     when cmd2 = '4' then RES='1280x1024'
  105.     when cmd2 = '5' then RES='1600x1200'
  106.     otherwise            RES='0640x0480'
  107. end
  108. If words(all) > 2 then cmd3 = translate(word(all,3))
  109. else do
  110.     say 'for Default System font  press 0'
  111.     say 'for Font resolution      press 1'
  112.     say 'for Avio font            press 2'
  113.     pull cmd3
  114. end
  115. select
  116.     when cmd3 = '0' then call SysFont
  117.     when cmd3 = '1' then call ResFont
  118.     otherwise            call VioFont
  119. end
  120. AppKey=RES'_'AltFont
  121. return
  122.  
  123. SysFont:
  124. AltFont='Sys'
  125. If words(all) > 3 then cmd4 = translate(word(all,4))
  126. else do
  127.     say 'for Small  Font (100) press 0'
  128.     say 'for Medium Font (101) press 1'
  129.     say 'for Large  font (102) press 2'
  130.     pull cmd4
  131. end
  132. select
  133.     when cmd4 = '0' then Value='0100'
  134.     when cmd4 = '1' then Value='0101'
  135.     when cmd4 = '2' then Value='0102'
  136.     otherwise nop
  137. end
  138. return
  139.  
  140. ResFont:
  141. AltFont='Res'
  142. If words(all) > 3 then cmd4 = translate(word(all,4))
  143. else do
  144.     say 'for 96  dpi  press 0'
  145.     say 'for 100 dpi  press 1'
  146.     pull cmd4
  147. end
  148. select
  149.     when cmd4 = '0' then Value='0096'
  150.     when cmd4 = '1' then Value='0100'
  151.     otherwise nop
  152. end
  153. return
  154.  
  155. VioFont:
  156. AltFont='Vio'
  157. If words(all) > 3 then cmd4 = translate(word(all,4))
  158. else do
  159.     say 'for  8x8  press 0'
  160.     say 'for 10x6  press 1'
  161.     say 'for 10x8  press 2'
  162.     say 'for 12x8  press 3'
  163.     say 'for 14x6  press 4'
  164.     say 'for 14x8  press 5'
  165.     say 'for 15x7  press 6'
  166.     say 'for 16x8  press 7'
  167.     say 'for 16x12 press 8'
  168.     say 'for 18x8  press 9'
  169.     say 'for 18x10 press a'
  170.     say 'for 20x12 press b'
  171.     say 'for 22x12 press c'
  172.     say 'for 25x7  press d'
  173.     say 'for 30x12 press e'
  174.     pull cmd4
  175. end
  176. select
  177.     when cmd4 = '0' then Value='0808'
  178.     when cmd4 = '1' then Value='1006'
  179.     when cmd4 = '2' then Value='1008'
  180.     when cmd4 = '3' then Value='1208'
  181.     when cmd4 = '4' then Value='1406'
  182.     when cmd4 = '5' then Value='1408'
  183.     when cmd4 = '6' then Value='1507'
  184.     when cmd4 = '7' then Value='1608'
  185.     when cmd4 = '8' then Value='1612'
  186.     when cmd4 = '9' then Value='1808'
  187.     when cmd4 = 'A' then Value='1810'
  188.     when cmd4 = 'B' then Value='2012'
  189.     when cmd4 = 'C' then Value='2212'
  190.     when cmd4 = 'D' then Value='2507'
  191.     when cmd4 = 'E' then Value='3012'
  192.     otherwise nop
  193. end
  194. return
  195.  
  196. dive:
  197. AppKey='DIVE'
  198. If words(all) > 1 then cmd2 = translate(word(all,2))
  199. else do
  200.     say 'for 24 bit per pel DIVE OFF press 0 (default)'
  201.     say 'for 24 bit per pel DIVE ON  press 1'
  202.     pull cmd2
  203. end
  204. select
  205.     when cmd2 = '1' then Value='ON'
  206.     otherwise nop
  207. end
  208. return
  209.