/* ADPro ARexx script to show current pic on OpalVision board without * having to reset the save format everytime you want to see the pic. *** Brian Wind, November 27, 1992 *** *** adjusted for new Screen_type parameters in MorphPlus 2/12/93 *** * Install in your REXX: directory along with the other ADPro rexx function * key scripts. Currently set for F6 key however, you can change the name * to F1.ADPro through F9.ADPro depending on what you need. */ OPTIONS RESULTS ADDRESS "ADPro" /* Gotta use ADPro */ ADPRO_TO_FRONT /* Just in case you run this from cli or elsewhere */ SFORMAT /* Get current save format */ currentsformat=ADPRO_RESULT /* store it */ /* Set your desired screen type in ADPro using the Screen Controls in the * lower right hand corner of the screen (i.e. hires, overscan etc.) and * the OpalVision Saver will be adjusted to it or just modify this script * to make it always display in a certain format. However, PAL, VGA and * SuperHiRes are ignored */ SCREEN_TYPE /* get current screen type */ cst=ADPRO_RESULT /* store current screen type */ /* This is ugly, but I tried just testing for the correct bits, however the * number given back by ADPro is a character string (as usual with ARexx) * and changing that to binary just gave me the ASCII value for each char. * So I wrote this little routine to give me the correct bitmask but then I * still couldn't test it correctly as a bitmask. Therefore, I ended up * just checking the string for 'bits" using SUBSTR. If anyone has any * better suggestions please implement them, otherwise this does work even * though it gave me a headache doing it. :) */ bitmasktest = "" DO tst=15 TO 0 BY -1 if (cst-2**tst)<0 then bitmasktest = bitmasktest || 0 else do bitmasktest = bitmasktest || 1 cst=cst-2**tst end END currentscreen_type=bitmasktest opalst=0 /* clear opal screentype to lores default */ if substr(currentscreen_type,16,1)==1 then opalst=opalst+1 /* hires */ if substr(currentscreen_type,15,1)==1 then opalst=opalst+2 /* lace */ if substr(currentscreen_type,13,1)==1 then opalst=opalst+8 /* horiz. oscan */ if substr(currentscreen_type,12,1)==1 then opalst=opalst+16 /* vert. oscan */ /* just a debug statement for checking that i have the right mask */ /* OKAY1 currentscreen_type opalst */ SFORMAT "OpalVision" /* set to opalvision save format */ /* Save 24 bit pic to opalvision board, if you need a rendered image shown * then change "RAW" to "IMAGE" in the next line. If you need both, make * 2 scripts with different function key prefixes for RAW and IMAGE */ SAVE "X" IMAGE SCREEN_TYPE opalst SFORMAT currentsformat /* reset save format to last used */ /* For future reference. OpalVision saver ARexx command (as of 11/26/92): SAVE FILENAME TYPE SCREEN_TYPE STYPE DURATION TICKS i.e. Display Rendered image data in lores-overscan for 2 seconds. SAVE "X" IMAGE SCREEN_TYPE 8 DURATION 100 TYPE = RAW or IMAGE SCREEN_TYPE Hires=1:InterLace=2:Horizontal Overscan=8:Vertical Overscan=16 */