home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 33 VDrivers / 33-VDrivers.zip / s3rset.cmd < prev    next >
OS/2 REXX Batch file  |  1994-05-19  |  2KB  |  60 lines

  1. /*
  2. **  S3 Reset
  3. **
  4. **  This program resets your S3 display driver to 640x480, 256
  5. **  color operation.  It's especially handy if you accidentally
  6. **  set the driver for a resolution unsuppoted by your monitor.
  7. **
  8. **  This is a Rexx program, and it cannot be run from a floppy-
  9. **  booted system.  If you are expecting display trouble, make
  10. **  a "shadow" of your OS/2 Full Screen Command icon and place
  11. **  in your Startup Folder.  That will assure you of getting an
  12. **  OS/2 command window from which you can run this program.
  13. **
  14. **  This program was created by Rich Wooley [73354,473]
  15. **  of Binar Graphics.  It was uploaded to CIS by
  16. **  Joe Barnhart [76174,1573].
  17. */
  18.  
  19. '@echo off' 
  20. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  21. call SysLoadFuncs
  22.  
  23. width   = 640 
  24. height  = 480 
  25. colors  = 256 
  26. planes  = 1 
  27. options = 64
  28.  
  29. resstring = "" 
  30. say "Setting the resolution set to "width" x "height" x "colors" colors"
  31.  
  32. do i=1 to 4
  33.     char = width // 256
  34.     width = width % 256
  35.     resstring = resstring || D2C(char) end
  36.  
  37. do i=1 to 4
  38.     char = height // 256
  39.     height = height % 256
  40.     resstring = resstring || D2C(char) end
  41.  
  42. do i=1 to 4
  43.     char = colors // 256
  44.     colors = colors % 256
  45.     resstring = resstring || D2C(char) end
  46.  
  47. do i=1 to 4
  48.     char = planes // 256
  49.     planes = planes % 256
  50.     resstring = resstring || D2C(char) end
  51.  
  52. do i=1 to 4
  53.     char = options // 256
  54.     options = options % 256
  55.     resstring = resstring || D2C(char) end
  56.  
  57. call SysIni 'USER', 'PM_DISPLAYDRIVERS', 'DEFAULTSYSTEMRESOLUTION',resstring
  58. say "Resolution change complete.  Reboot when ready."
  59. exit
  60.