home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 April (Special) / Chip-Special_1997-04_cd.bin / mediavis / xdiag / mvdxdiag.exe / QCFGINI.DAT < prev    next >
Encoding:
Text File  |  1995-04-05  |  25.2 KB  |  711 lines

  1. include qcfgglb.dat
  2. set prg_qainfo    type str "qainfo.exe"
  3.  
  4. # our .ini file stuff
  5. set i_pcmport    type str ""
  6. set i_pcmdma    type str ""
  7. set i_pcmirq    type str ""
  8. set i_pcmhdma    type str ""
  9. set i_mpuport    type str ""
  10. set i_mpuirq    type str ""
  11. set i_cdrport    type str ""
  12. set i_cdrtype    type str ""
  13. set i_icsport    type str ""
  14.  
  15. set a_pcmport    type str " 220 210 230 240 250 "
  16. set a_pcmdma    type str " 1 3 "
  17. set a_pcmirq    type str " 5 7 2 3 10 15 "
  18. set a_pcmhdma    type str " 5 7 1 3 "
  19.  
  20. set a_mpuport    type str " 320 300 310 330 "
  21. set a_mpuirq    type str " 5 7 2 3 "
  22. set a_cdrport    type str " 300 310 320 330 340 "
  23. set a_icsport    type str " 330 320 300 "
  24. set a_cdrtype   type str " P M S T "
  25.  
  26. script ReadINIFILE
  27.     local buf type str "                                                                                    "
  28.     local ptr type ptr &buf
  29.     local tmp type str ""
  30.     nullit buf
  31.  
  32.     if not isfile $v_inifile    runscript BackupSystemFiles
  33.     if not isfile $v_inifile     runscript CreateINIFILE
  34.  
  35.     sedit -I . $v_inifile test status dummy put $ptr
  36.     trim buf
  37.     if issame "$buf" "status=Test08"    then
  38.         nullit buf
  39.         sedit -I . $v_inifile test dma dummy put $ptr
  40.         trim buf
  41.         set tmp "$buf" - "^*="
  42.         sedit -wnqI . $v_inifile bad dma=$tmp "$tmp" substitute
  43.         sedit -wnqI . $v_inifile test status "" substitute
  44.         nullit buf
  45.         interrupt 2Fh ax 4A10h bx 1    # flush SMARTDRV
  46.     endif
  47.     if issame "$buf" "status=Test16"    then
  48.         nullit buf
  49.         sedit -I . $v_inifile test dma dummy put $ptr
  50.         trim buf
  51.         set tmp "$buf" - "^*="
  52.         sedit -wnqI . $v_inifile bad dma=$tmp "$tmp" substitute
  53.         sedit -wnqI . $v_inifile test status "" substitute
  54.         nullit buf
  55.         interrupt 2Fh ax 4A10h bx 1    # flush SMARTDRV
  56.     endif
  57.     if issame "$buf" "status=TestMidi"    then
  58.         nullit buf
  59.         sedit -I . $v_inifile test port dummy put $ptr
  60.         trim buf
  61.         set tmp "$buf" - "^*="
  62.         sedit -wnqI . $v_inifile bad port=$tmp "$tmp" substitute
  63.         sedit -wnqI . $v_inifile test status "" substitute
  64.         nullit buf
  65.         interrupt 2Fh ax 4A10h bx 1     # flush SMARTDRV
  66.     endif
  67.     if issame "$buf" "status=Okay"        then
  68.         sedit -wnqI . $v_inifile test port   "" substitute
  69.         sedit -wnqI . $v_inifile test dma    "" substitute
  70.         sedit -wnqI . $v_inifile test irq    "" substitute
  71.         sedit -wnqI . $v_inifile test status "" substitute
  72.     endif
  73.     nullit buf
  74.     sedit -I . $v_inifile config port dummy put $ptr
  75.     trim buf
  76.     set i_pcmport "$buf" - "^*="
  77.     nullit buf
  78.     sedit -I . $v_inifile config dma  dummy put $ptr
  79.     trim buf
  80.     set i_pcmdma  "$buf" - "^*="
  81.     nullit buf
  82.     sedit -I . $v_inifile config irq  dummy put $ptr
  83.     trim buf
  84.     set i_pcmirq  "$buf" - "^*="
  85.     nullit buf
  86.     sedit -I . $v_inifile config hdma dummy put $ptr
  87.     trim buf
  88.     set i_pcmhdma "$buf" - "^*="
  89.     nullit buf
  90.     sedit -I . $v_inifile config mpuport dummy put $ptr
  91.     trim buf
  92.     set i_mpuport "$buf" - "^*="
  93.     nullit buf
  94.     sedit -I . $v_inifile config mpuirq  dummy put $ptr
  95.     trim buf
  96.     set i_mpuirq  "$buf" - "^*="
  97. #    if issame "${v_namcdrom}" "sjcd.sys"     then
  98.         nullit buf
  99.         sedit -I . $v_inifile config cdrport  dummy put $ptr
  100.         trim buf
  101.         set i_cdrport  "$buf" - "^*="
  102.         nullit buf
  103.         sedit -I . $v_inifile config cdrtype dummy put $ptr
  104.         trim buf
  105.         set i_cdrtype  "$buf" - "^*="
  106. #    endif
  107.     nullit buf
  108.     sedit -I . $v_inifile config icsport dummy put $ptr
  109.     trim buf
  110.     set i_icsport "$buf" - "^*="
  111.     return
  112.  
  113. script BackupSystemFiles
  114.     sedit -wB ${v_bootdrv}${v_bootdir}     config.sys   "rem"  "rem Backed up by 'Quick Config' on $date at $time " modify
  115.     sedit -wB ${v_bootdrv}${v_bootdir}     autoexec.bat "rem"  "rem Backed up by 'Quick Config' on $date at $time " modify
  116.     sedit -wB ${v_winpath}             system.ini   "rem " ";;; Backed up by 'Quick Config' on $date at $time "                    modify
  117.     return
  118.  
  119. script CreateINIFILE     
  120.     execute $comspec /c    echo [config]>  $v_inifile
  121.     execute $comspec /c    echo port=>> $v_inifile
  122.     execute $comspec /c       echo dma=>> $v_inifile
  123.     execute $comspec /c       echo irq=>> $v_inifile
  124.     execute $comspec /c      echo hdma=>> $v_inifile
  125.  
  126.     execute $comspec /c echo mpuport=320>> $v_inifile
  127.  
  128.     execute $comspec /c    echo mpuirq=2>> $v_inifile
  129.  
  130.     execute $comspec /c echo cdrport=340>> $v_inifile
  131.  
  132.     execute $comspec /c   echo cdrtype=T>> $v_inifile
  133.     execute $comspec /c echo icsport=330>> $v_inifile
  134.  
  135.     execute $comspec /c      echo [test]>> $v_inifile
  136.     execute $comspec /c       echo port=>> $v_inifile
  137.     execute $comspec /c        echo dma=>> $v_inifile
  138.     execute $comspec /c        echo irq=>> $v_inifile
  139.     execute $comspec /c     echo status=>> $v_inifile
  140.     execute $comspec /c     echo qainfo=>> $v_inifile
  141.     execute $comspec /c       echo [bad]>> $v_inifile
  142.     execute $comspec /c        echo dma=>> $v_inifile
  143.     execute $comspec /c        echo irq=>> $v_inifile
  144.     execute $comspec /c       echo port=>> $v_inifile
  145.     interrupt 2Fh ax 4A10h bx 1    # flush SMARTDRV
  146.     return
  147.  
  148. script WriteINIFILETest08
  149.     if not isfile $v_inifile     runscript CreateINIFILE
  150.  
  151.     sedit -wnqI . $v_inifile test port "$i_pcmport" substitute
  152.     sedit -wnqI . $v_inifile test irq  "$i_pcmirq"  substitute
  153.     sedit -wnqI . $v_inifile test dma  "$i_pcmdma"  substitute
  154.     sedit -wnqI . $v_inifile test status "Test08" substitute
  155.  
  156.     interrupt 2Fh ax 4A10h bx 1    # flush SMARTDRV
  157.     return
  158.  
  159. script WriteINIFILETest16
  160.     if not isfile $v_inifile     runscript CreateINIFILE
  161.  
  162.     sedit -wnqI . $v_inifile test port "$i_pcmport" substitute
  163.     sedit -wnqI . $v_inifile test irq  "$i_pcmirq"  substitute
  164.     sedit -wnqI . $v_inifile test dma  "$i_pcmhdma"  substitute
  165.     sedit -wnqI . $v_inifile test status "Test16" substitute
  166.  
  167.     interrupt 2Fh ax 4A10h bx 1    # flush SMARTDRV
  168.     return
  169.  
  170. script WriteINIFILETestMidi
  171.     if not isfile $v_inifile     runscript CreateINIFILE
  172.  
  173.     sedit -wnqI . $v_inifile test port "$i_mpuport" substitute
  174.     sedit -wnqI . $v_inifile test irq  "$i_mpuirq"  substitute
  175.     sedit -wnqI . $v_inifile test status "TestMidi" substitute
  176.  
  177.     interrupt 2Fh ax 4A10h bx 1    # flush SMARTDRV
  178.     return
  179.  
  180. script WriteINIFILEOkayTest08
  181.     if not isfile $v_inifile     runscript CreateINIFILE
  182.  
  183.     sedit -wnqI . $v_inifile config port "$i_pcmport" substitute
  184.     sedit -wnqI . $v_inifile config irq  "$i_pcmirq"  substitute
  185.     sedit -wnqI . $v_inifile config dma  "$i_pcmdma"  substitute
  186.     sedit -wnqI . $v_inifile test port "" substitute
  187.     sedit -wnqI . $v_inifile test irq  "" substitute
  188.     sedit -wnqI . $v_inifile test dma  "" substitute
  189.     sedit -wnqI . $v_inifile test status "" substitute
  190.  
  191.     interrupt 2Fh ax 4A10h bx 1    # flush SMARTDRV
  192.     return
  193.  
  194. script WriteINIFILEOkayTest16
  195.     if not isfile $v_inifile     runscript CreateINIFILE
  196.  
  197.     sedit -wnqI . $v_inifile config port "$i_pcmport" substitute
  198.     sedit -wnqI . $v_inifile config irq  "$i_pcmirq"  substitute
  199.     sedit -wnqI . $v_inifile config hdma "$i_pcmhdma" substitute
  200.     sedit -wnqI . $v_inifile test port "" substitute
  201.     sedit -wnqI . $v_inifile test irq  "" substitute
  202.     sedit -wnqI . $v_inifile test dma "" substitute
  203.     sedit -wnqI . $v_inifile test status "" substitute
  204.  
  205.     interrupt 2Fh ax 4A10h bx 1    # flush SMARTDRV
  206.     return
  207.  
  208. script WriteINIFILEOkayTestMidi
  209.     if not isfile $v_inifile     runscript CreateINIFILE
  210.  
  211.     sedit -wnqI . $v_inifile config mpuport "$i_mpuport" substitute
  212.     sedit -wnqI . $v_inifile config mpuirq  "$i_mpuirq"  substitute
  213.     sedit -wnqI . $v_inifile test port "" substitute
  214.     sedit -wnqI . $v_inifile test irq  "" substitute
  215.     sedit -wnqI . $v_inifile test status "" substitute
  216.  
  217.     interrupt 2Fh ax 4A10h bx 1    # flush SMARTDRV
  218.     return
  219.  
  220. script WriteINIFILEConfig
  221.     if not isfile $v_inifile     runscript CreateINIFILE
  222.     sedit -wnqI . $v_inifile config port "$i_pcmport" substitute
  223.     sedit -wnqI . $v_inifile config dma  "$i_pcmdma"  substitute
  224.     sedit -wnqI . $v_inifile config irq  "$i_pcmirq"  substitute
  225.     sedit -wnqI . $v_inifile config hdma "$i_pcmhdma" substitute
  226.     sedit -wnqI . $v_inifile config mpuport "$i_mpuport" substitute
  227.     sedit -wnqI . $v_inifile config mpuirq  "$i_mpuirq"  substitute
  228.     sedit -wnqI . $v_inifile config cdrport "$i_cdrport" substitute
  229.     sedit -wnqI . $v_inifile config cdrtype "$i_cdrtype" substitute
  230.     sedit -wnqI . $v_inifile config icsport "$i_icsport" substitute
  231.  
  232.     interrupt 2Fh ax 4A10h bx 1    # flush SMARTDRV
  233.     return
  234.     
  235. script GetNextINIFILEPORT
  236.     :next
  237.     set i_pcmport "$a_pcmport" - "*${i_pcmport} " - "\w*$$"
  238.     if issame "${i_pcmport}"    ""    return
  239.     sedit -I . $v_inifile bad port=${i_pcmport} dummy locate
  240.     if $errorlevel goto next
  241.     return
  242. script GetNextINIFILEDMA
  243.     :next
  244.     set i_pcmdma  "$a_pcmdma"  - "*${i_pcmdma} "  - "\w*$$"
  245.     if issame "${i_pcmdma}" ""    then
  246.         runscript GetNextINIFILEPORT
  247.         set i_pcmdma "${a_pcmdma}" - "\w*$$"
  248.     endif
  249.     sedit -I . $v_inifile bad dma=${i_pcmdma}   dummy locate
  250.     if $errorlevel goto next
  251.     return
  252. script GetNextINIFILEIRQ
  253.     :next
  254.     set i_pcmirq  "$a_pcmirq"  - "*${i_pcmirq} "  - "\w*$$"
  255.     if issame "${i_pcmirq}" ""    then
  256.         runscript GetNextINIFILEDMA
  257.         set i_pcmirq "${a_pcmirq}" - "\w*$$"
  258.     endif
  259.     sedit -I . $v_inifile bad irq=${i_pcmirq}   dummy locate
  260.     if $errorlevel goto next
  261.     return
  262. script GetNextINIFILEHDMA
  263.     :next
  264.     set i_pcmhdma  "$a_pcmhdma"  - "*${i_pcmhdma} "  - "\w*$$"
  265.     if issame "${i_pcmhdma}" ""    set i_pcmhdma "${i_pcmdma}" return
  266.     sedit -I . $v_inifile bad dma=${i_pcmhdma}   dummy locate
  267.     if $errorlevel goto next
  268.     return
  269. script GetNextINIFILEMPUPORT
  270.     :next
  271.     set i_mpuport "$a_mpuport" - "*${i_mpuport} " - "\w*$$"
  272.     if issame "${i_mpuport}"    ""    return
  273.     sedit -I . $v_inifile bad port=${i_mpuport} dummy locate
  274.     if $errorlevel goto next
  275.     return
  276. script GetNextINIFILEMPUIRQ
  277.     :next
  278.     set i_mpuirq  "$a_mpuirq"  - "*${i_mpuirq} "  - "\w*$$"
  279.     if issame "${i_mpuirq}" ""    then
  280.         runscript GetNextINIFILEMPUPORT
  281.         set i_mpuirq "${a_mpuirq}" - "\w*$$"
  282.     endif
  283.     sedit -I . $v_inifile bad irq=${i_mpuirq}   dummy locate
  284.     if $errorlevel goto next
  285.     return
  286. script GetNextINIFILECDRPORT
  287.     :next
  288.     set i_cdrport "$a_cdrport" - "*${i_cdrport} " - "\w*$$"
  289.     if issame "${i_cdrport}" ""    return
  290.     sedit -I . $v_inifile bad port=${i_cdrport} " dummy locate
  291.     if $errorlevel goto next
  292.     return
  293. script GetNextINIFILECDRTYPE
  294.     :next
  295.     set i_cdrtype "$a_cdrtype" - "*${i_cdrtype} " - "\w*$$"
  296.     if issame "${i_cdrtype}" ""    return
  297.     return
  298.  
  299. script GetNextINIFILEICSPORT
  300.     :next
  301.     set i_icsport "$a_icsport" - "*${i_icsport} " - "\w*$$"
  302.     if issame "${i_icsport}"    ""    return
  303.     sedit -I . $v_inifile bad port=${i_icsport} dummy locate
  304.     if $errorlevel goto next
  305.     return
  306.         
  307.  
  308. script RunQAINFO
  309.     local buf type str "                                                                     "
  310.     local ptr type ptr &buf
  311.  
  312.     sedit -I . $v_inifile test qainfo d put $ptr
  313.     trim buf
  314.  
  315.     execute $comspec /c echo QAINFO Failed> $v_qafile
  316. #    if not issame "$buf" "" if not issame "${buf}" "qainfo="    runmenu CrashedQAINFO return
  317.     if not issame "$buf" "" if not issame "${buf}" "qainfo="    return
  318.  
  319.     sedit -wnqI . $v_inifile test qainfo Running substitute
  320.     execute $prg_qainfo -t204 -t205 -f$v_qafile
  321.     sedit -wnqI . $v_inifile test qainfo "" substitute
  322.  
  323.     sedit -B . $v_qafile "DMA 1: Available" d locate
  324.     if $errorlevel    goto dma1okay
  325.     sedit -B . $v_qafile "DMA 1: Sound Blaster" d locate
  326.     if $errorlevel    goto dma1okay
  327.         sedit -wnqI . $v_inifile bad dma=1 1 substitute
  328.     :dma1okay
  329.  
  330.     sedit -B . $v_qafile "DMA 3: Available" d locate
  331.     if $errorlevel    goto dma3okay
  332.     sedit -B . $v_qafile "DMA 3: Sound Blaster" d locate
  333.     if $errorlevel    goto dma3okay
  334.         sedit -wnqI . $v_inifile bad dma=3 3 substitute
  335.     :dma3okay
  336.  
  337.     sedit -B . $v_qafile "DMA 5: Available" d locate
  338.     if $errorlevel    then
  339. #        sedit -wnqI . $v_inifile bad dma=5 d disable
  340.     else
  341.         sedit -wnqI . $v_inifile bad dma=5 5 substitute
  342.     endif
  343.  
  344.     sedit -B . $v_qafile "DMA 7: Available" d locate
  345.     if $errorlevel    then
  346. #        sedit -wnqI . $v_inifile bad dma=7 d disable
  347.     else
  348.         sedit -wnqI . $v_inifile bad dma=7 7 substitute
  349.     endif
  350.  
  351.     sedit -B . $v_qafile "IRQ 02: Available" d locate
  352.     if $errorlevel    goto irq02okay
  353.     sedit -B . $v_qafile "IRQ 02: Sound Blaster" d locate
  354.     if $errorlevel    goto irq02okay
  355.     sedit -B . $v_qafile "IRQ 02: [CASCADE]" d locate
  356.     if $errorlevel    goto irq02okay
  357.     sedit -B . $v_qafile "IRQ 02: COM"       d locate
  358.     if $errorlevel    goto irq02okay
  359.     sedit -B . $v_qafile "IRQ 02: LPT"       d locate
  360.     if $errorlevel    goto irq02okay
  361.     sedit -wnqI . $v_inifile bad irq=2 2 substitute
  362.     :irq02okay
  363.  
  364.     sedit -B . $v_qafile "IRQ 03: Available" d locate
  365.     if $errorlevel    goto irq03okay
  366.     sedit -B . $v_qafile "IRQ 03: Sound Blaster" d locate
  367.     if $errorlevel    goto irq03okay
  368.     sedit -B . $v_qafile "IRQ 03: [CASCADE]" d locate
  369.     if $errorlevel    goto irq03okay
  370.     sedit -B . $v_qafile "IRQ 03: COM"       d locate
  371.     if $errorlevel    goto irq03okay
  372.     sedit -B . $v_qafile "IRQ 03: LPT"       d locate
  373.     if $errorlevel    goto irq03okay
  374.     sedit -wnqI . $v_inifile bad irq=3 3 substitute
  375.     :irq03okay
  376.  
  377.     sedit -B . $v_qafile "IRQ 05: Available" d locate
  378.     if $errorlevel    goto irq05okay
  379.     sedit -B . $v_qafile "IRQ 05: Sound Blaster" d locate
  380.     if $errorlevel    goto irq05okay
  381.     sedit -B . $v_qafile "IRQ 05: [CASCADE]" d locate
  382.     if $errorlevel    goto irq05okay
  383.     sedit -B . $v_qafile "IRQ 05: COM"       d locate
  384.     if $errorlevel    goto irq05okay
  385.     sedit -B . $v_qafile "IRQ 05: LPT"       d locate
  386.     if $errorlevel    goto irq05okay
  387.     sedit -wnqI . $v_inifile bad irq=5 5 substitute
  388.     :irq05okay
  389.  
  390.     sedit -B . $v_qafile "IRQ 07: Available" d locate
  391.     if $errorlevel    goto irq07okay
  392.     sedit -B . $v_qafile "IRQ 07: Sound Blaster" d locate
  393.     if $errorlevel    goto irq07okay
  394.     sedit -B . $v_qafile "IRQ 07: [CASCADE]" d locate
  395.     if $errorlevel    goto irq07okay
  396.     sedit -B . $v_qafile "IRQ 07: COM"       d locate
  397.     if $errorlevel    goto irq07okay
  398.     sedit -B . $v_qafile "IRQ 07: LPT"       d locate
  399.     if $errorlevel    goto irq07okay
  400.     sedit -wnqI . $v_inifile bad irq=7 7 substitute
  401.     :irq07okay
  402.  
  403.     sedit -B . $v_qafile "IRQ 10: Available" d locate
  404.     if $errorlevel    goto irq10okay
  405.     sedit -B . $v_qafile "IRQ 10: Sound Blaster" d locate
  406.     if $errorlevel    goto irq10okay
  407.     sedit -B . $v_qafile "IRQ 10: [CASCADE]" d locate
  408.     if $errorlevel    goto irq10okay
  409.     sedit -B . $v_qafile "IRQ 10: COM"       d locate
  410.     if $errorlevel    goto irq10okay
  411.     sedit -B . $v_qafile "IRQ 10: LPT"       d locate
  412.     if $errorlevel    goto irq10okay
  413.     sedit -wnqI . $v_inifile bad irq=10 10 substitute
  414.     :irq10okay
  415.  
  416.     sedit -B . $v_qafile "IRQ 15: Available" d locate
  417.     if $errorlevel    goto irq15okay
  418.     sedit -B . $v_qafile "IRQ 15: Sound Blaster" d locate
  419.     if $errorlevel    goto irq15okay
  420.     sedit -B . $v_qafile "IRQ 15: [CASCADE]" d locate
  421.     if $errorlevel    goto irq15okay
  422.     sedit -B . $v_qafile "IRQ 15: COM"       d locate
  423.     if $errorlevel    goto irq15okay
  424.     sedit -B . $v_qafile "IRQ 15: LPT"       d locate
  425.     if $errorlevel    goto irq15okay
  426.     sedit -wnqI . $v_inifile bad irq=15 15 substitute
  427.     :irq15okay
  428.     return
  429.  
  430. menu CrashedQAINFO at -1,-1 bc red tc white bo do sh na " Uh, oh! "
  431.     text
  432.     text "The attempt to read your system hardware configuration failed."
  433.     text
  434.     text "The program 'XXXXXXXX.XXX' was not compatible with your computer."
  435.     text
  436.     text "This program will not be run in order to eliminate this problem."
  437.     text
  438.     text "Remove the 'xxxxxxxx.xxx' file to retry the procedure."
  439.     display v_qainfo at 4,15 using "%-12s"
  440.     display v_qafile at 8,14 using "%-12s"
  441.  
  442. script TestINIFILE
  443.     if issame "${v_Board}"    ""        runscript FigureBoard
  444.     if issame "${v_Board}"    "Unknown"    runscript FigureBoard
  445.     if issame "${v_Board}"    ""        return
  446.     if issame "${v_Board}"    "Unknown"    return
  447.     runscript Test${v_Board}
  448.     return
  449.         
  450. menu EditINIFILE at 0,0 dims 25,80 bc bla tc wh bo no na " Edit Sound Board Settings "
  451.     runscript ReadINIFILE
  452.  
  453.     text at ,2 
  454. #MA     text "This screen allows you to update the INI File settings, manually,"
  455. #MA     text "before running the 'Automatic' or 'Custom' screens."
  456.         text "This screen allows you to test and update the INI file settings."
  457.         text
  458.  
  459.     text at 5
  460.     box at ,-1 dims 16,40 bo do sh 
  461.     item at ,-1 dims 1,36 using "   Base Port: %3s "   $i_pcmport    menu GetSBPORT
  462.     item at ,-1 dims 1,36 using "   8-bit DMA: %1s "   $i_pcmdma    menu getSBDMA
  463.     item at ,-1 dims 1,36 using " IRQ Channel: %1s "   $i_pcmirq    menu getSBIRQ
  464.     item at ,-1 dims 1,36 using "  16-bit DMA: %1s "   $i_pcmhdma    menu getSBHDMA
  465.     separator at ,-1 dims 1,38
  466.     item at ,-1 dims 1,36 using "    MPU Port: %3s "   $i_mpuport    menu GetMPUPORT
  467.     item at ,-1 dims 1,36 using "     MPU IRQ: %3s "   $i_mpuirq    menu GetMPUIRQ
  468.     separator at ,-1 dims 1,38
  469.     item at ,-1 dims 1,36 using "  CDROM Port: %3s "   $i_cdrport    menu GetCDRPORT
  470. #    item at ,-1 dims 1,36 using "  CDROM Type: %3s "   $i_cdrtype    menu GetCDRTYPE
  471.     separator at ,-1 dims 1,38
  472. ##    item at ,-1 dims 1,36 " Update INIFILE without Testing      "    script WriteINIFILEConfig
  473.     item at ,-1 dims 1,36 " Test New Settings                   "     script TestINIFILE runscript WriteINIFILEConfig
  474.     item at ,-1 dims 1,36 " Save New Settings, Restart Computer "    script WriteINIFILEConfig menu PWUpdateDOSWINConfig
  475.     item at ,-1 dims 1,36 " Exit This Screen "             return 1
  476.  
  477.     text at ,2
  478.     text "Press F1 for Help"
  479.     hotkey F1 helpEditINIFILE
  480.  
  481. ##ASmenu EditINIFILESJCD at 0,0 dims 25,80 bc bla tc wh bo no na " Edit INI File Settings for SJCD "
  482. ##AS see the end of the next line
  483.  
  484.  
  485. menu getSBPORT at -1,-1 bc blu tc wh name " Get PORT " match $i_pcmport
  486.     text "Please select a PORT Address below, and press ENTER."
  487.     text "Press ESCAPE to Cancel."
  488.     text
  489.     box at ,-1 dims 8,7
  490.     item at ,-1 210 set "i_pcmport 210" return 1 
  491.     item at ,-1 220 set "i_pcmport 220" return 1 
  492.     item at ,-1 230 set "i_pcmport 230" return 1 
  493.     item at ,-1 240 set "i_pcmport 240" return 1 
  494.     item at ,-1 250 set "i_pcmport 250" return 1 
  495.     item at ,-1 260 set "i_pcmport 260" return 1 
  496.     text
  497.     text
  498.  
  499.  
  500. menu getSBDMA at -1,-1 bc blu tc wh name " Get DMA " match $i_pcmdma
  501.     text "Please select a DMA Channel for 8-bit Digital Audio below,"
  502.     text "and press ENTER.  Press ESCAPE to Cancel."
  503.     text
  504.     box at ,-1 dims 4,7
  505.     item at ,-1 1 set "i_pcmdma 1" return 1 
  506.     item at ,-1 3 set "i_pcmdma 3" return 1 
  507.     text
  508.     text
  509.  
  510.  
  511.  
  512. menu getSBIRQ at -1,-1 bc blu tc wh name " Get IRQ " match $i_pcmirq
  513.     set tmpirq type int 0
  514.     text "Please select an IRQ Channel for Digital Audio below,"
  515.     text "and press ENTER.  Press ESCAPE to Cancel."
  516.     text
  517.     box at ,-1 dims 8,7
  518.     item at ,-1 2  set "tmpirq 2"  script "checkPCMIRQwithMPU i_pcmirq" return 1 
  519.     item at ,-1 3  set "tmpirq 3"  script "checkPCMIRQwithMPU i_pcmirq" return 1 
  520.     item at ,-1 5  set "tmpirq 5"  script "checkPCMIRQwithMPU i_pcmirq" return 1 
  521.     item at ,-1 7  set "tmpirq 7"  script "checkPCMIRQwithMPU i_pcmirq" return 1 
  522.     item at ,-1 10 set "tmpirq 10" script "checkPCMIRQwithMPU i_pcmirq" return 1 
  523.     item at ,-1 15 set "tmpirq 15" script "checkPCMIRQwithMPU i_pcmirq" return 1 
  524.     text
  525.     text
  526.  
  527.  
  528. menu getSBHDMA at -1,-1 bc blu tc wh name " Get HiDMA " match $i_pcmhdma
  529.     text "Please select a DMA Channel for 16-bit Digital Audio below,"
  530.     text "and press ENTER. Press ESCAPE to Cancel."
  531.     text
  532.     box at ,-1 dims 6,7
  533.     item at ,-1 1 set "i_pcmhdma 1" return 1 
  534.     item at ,-1 3 set "i_pcmhdma 3" return 1 
  535.     item at ,-1 5 set "i_pcmhdma 5" return 1 
  536.     item at ,-1 7 set "i_pcmhdma 7" return 1 
  537.     text
  538.     text
  539.  
  540.  
  541. menu getMPUPORT at -1,-1 bc blu tc wh name " Get MPU PORT " match $i_mpuport
  542.     set tmpport type int 0
  543.     text "Please select a PORT Address for MIDI below, and press ENTER."
  544.     text "Press ESCAPE to Cancel."
  545.     text
  546.     box at ,-1 dims 6,7
  547.     item at ,-1 330 set "tmpport 330" script "checkMPUPORTwithCDR i_mpuport" return 1 
  548.     item at ,-1 320 set "tmpport 320" script "checkMPUPORTwithCDR i_mpuport" return 1 
  549.     item at ,-1 310 set "tmpport 310" script "checkMPUPORTwithCDR i_mpuport" return 1 
  550.     item at ,-1 300 set "tmpport 300" script "checkMPUPORTwithCDR i_mpuport" return 1 
  551.     text
  552.     text
  553.  
  554. menu getMPUIRQ at -1,-1 bc blu tc wh name " Get MPU IRQ " match $i_mpuirq
  555.     set tmpirq type int 0
  556.     text "Please select an IRQ Channel for MIDI below, and press ENTER."
  557.     text "Press ESCAPE to Cancel."
  558.     text
  559.     box at ,-1 dims 6,7
  560.     item at ,-1 2  set "tmpirq 2"  script "checkMPUIRQwithPCM i_mpuirq" return 1 
  561.     item at ,-1 3  set "tmpirq 3"  script "checkMPUIRQwithPCM i_mpuirq" return 1 
  562.     item at ,-1 5  set "tmpirq 5"  script "checkMPUIRQwithPCM i_mpuirq" return 1 
  563.     item at ,-1 7  set "tmpirq 7"  script "checkMPUIRQwithPCM i_mpuirq" return 1 
  564.     text
  565.     text
  566.  
  567. menu getCDRPORT at -1,-1 bc blu tc wh name " Get CDROM PORT " match $i_cdrport
  568.     set tmpport type int 0
  569.     text "Please select a PORT Address for the CDROM below, and press ENTER."
  570.     text "Press ESCAPE to Cancel."
  571.     text
  572.         box at ,-1 dims 6,7
  573.  
  574.     item at ,-1 300 set "tmpport 300" script "checkCDRPORTwithMPU i_cdrport" return 1 
  575.     item at ,-1 310 set "tmpport 310" script "checkCDRPORTwithMPU i_cdrport" return 1 
  576.     item at ,-1 320 set "tmpport 320" script "checkCDRPORTwithMPU i_cdrport" return 1 
  577.     item at ,-1 340 set "tmpport 340" script "checkCDRPORTwithMPU i_cdrport" return 1 
  578.  
  579.     text
  580.         text
  581.         text at 11,-1 "Warning: Please make sure jumper J6 matches your CD ROM port setting."
  582.         text
  583.  
  584. menu getCDRTYPE at -1,-1 bc blu tc wh name " Get CDROM TYPE " match $i_cdrtype
  585.     set tmpport type int 0
  586.     text "Please select a TYPE for the CDROM below, and press ENTER."
  587.     text "Press ESCAPE to Cancel."
  588.     text
  589.     box at ,-1 dims 5,7
  590.     item at ,-1 P set "i_cdrtype P" return 1
  591.     item at ,-1 M set "i_cdrtype M" return 1
  592.     item at ,-1 S set "i_cdrtype S" return 1
  593.     item at ,-1 T set "i_cdrtype T" return 1
  594.     text
  595.     text
  596.  
  597. ##ASmenu getMPUPORTICS at -1,-1 bc blu tc wh name " Get MPU PORT " match $i_mpuport
  598. ##AS    set tmpport type int 0
  599. ##AS    text "Please select a PORT Address for MIDI below, and press ENTER."
  600. ##AS    text "Press ESCAPE to Cancel."
  601. ##AS    text
  602. ##AS    box at ,-1 dims 6,7
  603. ##AS    item at ,-1 330 set "tmpport 330" script "checkMPUPORTwithICS i_mpuport" return 1 
  604. ##AS    item at ,-1 320 set "tmpport 320" script "checkMPUPORTwithICS i_mpuport" return 1 
  605. ##AS    item at ,-1 310 set "tmpport 310" script "checkMPUPORTwithICS i_mpuport" return 1 
  606. ##AS    item at ,-1 300 set "tmpport 300" script "checkMPUPORTwithICS i_mpuport" return 1 
  607. ##AS    text
  608. ##AS    text
  609.  
  610. menu getICSPORT at -1,-1 bc blu tc wh name " Get ICS PORT " match $i_icsport
  611.     set tmpport type int 0
  612.     text "Please select a PORT Address for WaveFront MIDI below, and press ENTER."
  613.     text "Press ESCAPE to Cancel."
  614.     text
  615.     box at ,-1 dims 5,7
  616.     item at ,-1 330 set "tmpport 330" script "checkICSPORTwithMPUCDR i_icsport" return 1 
  617.     item at ,-1 320 set "tmpport 320" script "checkICSPORTwithMPUCDR i_icsport" return 1 
  618. ##AS    item at ,-1 310 set "tmpport 310" script "checkICSPORTwithMPUCDR i_icsport" return 1 
  619.     item at ,-1 300 set "tmpport 300" script "checkICSPORTwithMPUCDR i_icsport" return 1 
  620.     text
  621.     text
  622.  
  623.  
  624. script checkMPUIRQwithPCM
  625.     if ! isequal ${tmpirq} ${i_pcmirq}    return ${tmpirq}
  626.     runmenu MPUIRQCollides
  627.     return $i_mpuirq
  628. script checkPCMIRQwithMPU
  629.     if ! isequal ${tmpirq} ${i_mpuirq}    return ${tmpirq}
  630.     runmenu PCMIRQCollides
  631.     return $i_pcmirq
  632. menu PCMIRQCollides at -1,-1 bc red tc wh name " Resource Conflict "
  633.     text
  634.     text "This IRQ is assigned to the MPU Device."
  635.     text
  636. menu MPUIRQCollides at -1,-1 bc red tc wh name " Resource Conflict "
  637.     text
  638.     text "This IRQ is assigned to the PCM Device."
  639.     text
  640.  
  641.  
  642. ##see if it conflicts with CDR and ICS
  643. script checkMPUPORTwithCDRICS
  644.     if isequal ${tmpport} ${i_icsport}    runmenu MPUPORTCollidesICS    return ${i_mpuport}
  645.     if isequal ${tmpport} ${i_cdrport}    runmenu MPUPORTCollidesCDR    return ${i_mpuport}
  646.       return ${tmpport}
  647. script checkMPUPORTwithCDR
  648.     if isequal ${tmpport} ${i_cdrport}    runmenu MPUPORTCollidesCDR    return ${i_mpuport}
  649.       return ${tmpport}
  650. ##see if it conflicts with MPU and CDR
  651. script checkICSPORTwithMPUCDR
  652.     if isequal ${tmpport} ${i_mpuport}    runmenu ICSPORTCollidesMPU    return ${i_icsport}
  653.     if isequal ${tmpport} ${i_cdrport}    runmenu ICSPORTCollidesCDR    return ${i_icsport}
  654.     return ${tmpport}
  655. ##see if it conflicts with MPU and ICS
  656. script checkCDRPORTwithMPUICS
  657.     if isequal ${tmpport} ${i_mpuport}    runmenu CDRPORTCollidesMPU    return ${i_cdrport}
  658.     if isequal ${tmpport} ${i_icsport}    runmenu CDRPORTCollidesICS    return ${i_cdrport}
  659.     return ${tmpport}
  660. script checkCDRPORTwithMPU
  661.     if isequal ${tmpport} ${i_mpuport}    runmenu CDRPORTCollidesMPU    return ${i_cdrport}
  662.     return ${tmpport}
  663.  
  664.  
  665.  
  666. menu CDRPORTCollidesMPU at -1,-1 bc red tc wh name " Resource Conflict "
  667.     text
  668.     text "This PORT is assigned to the MPU Device."
  669.     text
  670. menu CDRPORTCollidesICS at -1,-1 bc red tc wh name " Resource Conflict "
  671.     text
  672.     text "This PORT is assigned to the WaveTable Device."
  673.     text
  674.  
  675. menu ICSPORTCollidesMPU at -1,-1 bc red tc wh name " Resource Conflict "
  676.     text
  677.     text "This PORT is assigned to the MPU Device."
  678.     text
  679. menu ICSPORTCollidesICS at -1,-1 bc red tc wh name " Resource Conflict "
  680.     text
  681.     text "This PORT is assigned to the CDROM Device."
  682.     text
  683.  
  684. menu MPUPORTCollidesICS at -1,-1 bc red tc wh name " Resource Conflict "
  685.     text
  686.     text "This PORT is assigned to the WaveFront Device."
  687.     text
  688. menu MPUPORTCollidesCDR at -1,-1 bc red tc wh name " Resource Conflict "
  689.     text
  690.     text "This PORT is assigned to the CDROM Device."
  691.     text
  692.  
  693.  
  694.  
  695. menu helpEditINIFILE dims 25,80 bc bla tc wh bo do na " Media Vision Diagnostics Help "
  696.     item at 0,0 execute "pg qcfgc.hlp"
  697.  
  698. #    runscript loadEditINIFILEHelp
  699. #    display at ,2 dims 20,70 textEditINIFILEHelp
  700. #    item at 23,1 " Press ENTER to Return To Main Program " set "textEditINIFILEHelp" return 1
  701. #    item "" Return 1
  702.  
  703.  
  704. script loadEditINIFILEHelp
  705.     if isfile QCFGC.hlp then
  706.         set textEditINIFILEHelp type str `file QCFGC.HLP
  707.     else
  708.         set textEditINIFILEHelp type str "Sorry: missing QCFGC.HLP, can not provide help."
  709.     endif
  710.     return
  711.