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