home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 April / Chip_1997-04_cd.bin / ovladace / xdiag / mvdxdiag.exe / QCFGJAZZ.DAT < prev    next >
Encoding:
Text File  |  1995-03-30  |  14.4 KB  |  475 lines

  1. include qcfgglb.dat
  2. set v_qafile    type str "scandos.txt"
  3. ## Other parameters
  4. set wav_welcome08        type str "pcm0811m.wav"
  5. set wav_welcome16        type str "pcm1611m.wav"
  6.  
  7. set v_Board    type str ""
  8. set v_BoardStr    type str "PROSONIC 16"
  9.  
  10. set prg_record    type str "trec.exe"
  11. set prg_play    type str "tplay.exe"
  12. set v_testwave    type str "nul."
  13.  
  14. ## JAZZ parameters from CONFIG.SYS
  15. set c_pcmport    type str ""
  16. set c_pcmdma    type str ""
  17. set c_pcmirq    type str ""
  18. set c_pcmhdma    type str ""
  19. set c_mpuport    type str ""
  20. set c_mpuirq    type str ""
  21. set c_icsport    type str ""
  22.  
  23. set c_mixcompat    type str "0"
  24. set c_lopt    type str ""
  25. set c_mixtype    type str "0"
  26. set c_verbose    type str "v"
  27. set c_unload    type str ""
  28.  
  29. ## JAZZ parameters from JAZZ.SYS
  30. set d_pcmport    type str ""
  31. set d_pcmdma    type str ""
  32. set d_pcmirq    type str ""
  33. set d_pcmhdma    type str ""
  34.  
  35. set d_mpuport    type str ""
  36. set d_mpuirq    type str ""
  37.  
  38. set d_mixcompat    type str "0"
  39.  
  40. ## JAZZ parameters from HARDWARE
  41. set b_BoardStr    type str ""
  42. set b_pcmport    type str ""
  43. set b_pcmdma    type str ""
  44. set b_pcmirq    type str ""
  45. set b_pcmhdma    type str ""
  46.  
  47. set b_mpuport    type str ""
  48. set b_mpuirq    type str ""
  49.  
  50. # our .ini file stuff
  51. set i_pcmport    type str ""
  52. set i_pcmdma    type str ""
  53. set i_pcmirq    type str ""
  54. set i_pcmhdma    type str ""
  55. set i_mpuport    type str ""
  56. set i_mpuirq    type str ""
  57. set i_cdrport    type str ""
  58. set i_cdrtype    type str ""
  59.  
  60. ## others
  61. set v_JAZZString255    "PROSONIC16"
  62. set v_JAZZString0    "<None>
  63. set v_JAZZString1    "PRO3D"
  64. set v_JAZZString2    "MultiCD"
  65. set v_JAZZString3    "DLX94A"
  66. set v_JAZZString4    "Future"
  67. set v_JAZZString5    "Future"
  68. set v_JAZZString6    "ProWaveTable"
  69. set v_JAZZString7    "Future"
  70.  
  71. set c_vollvl    type str "50"
  72.  
  73.  
  74. #############################################################################
  75. ### JAZZ Configuration Operations
  76.  
  77. menu PWAnalyzeDisplayConfigJAZZ    at -1,-1 bc blu tc wh bo do sh nosave item " Please Wait..." script AnalyzeDisplayConfigJAZZ
  78. menu PWAnalyzeDisplayDriverJAZZ    at -1,-1 bc blu tc wh bo do sh nosave item " Please Wait..." script AnalyzeDisplayDriverJAZZ
  79. menu PWAnalyzeDisplayBoardJAZZ    at -1,-1 bc blu tc wh bo do sh nosave item " Please Wait..." script AnalyzeDisplayBoardJAZZ
  80. menu PWAnalyzeJAZZ    at -1,-1 bc blu tc wh bo do sh item " Please Wait..." script AnalyzeJAZZ
  81. menu PWResetConfigJAZZ    at -1,-1 bc blu tc wh bo do sh item " Please Wait..." script ResetConfigJAZZ
  82. menu PWConfigJAZZ    at -1,-1 bc blu tc wh bo do sh item " Please Wait..." script ConfigJAZZ
  83. menu PWTestJAZZ            at -1,-1 bc blu tc wh bo do sh item " Please Wait..." script TestJAZZ
  84.  
  85. script AnalyzeDisplayBoardJAZZ
  86.     runscript AnalyzeBoardJAZZ
  87.     runmenu DisplayBoardJAZZ
  88.     return
  89.  
  90. script AnalyzeDisplayDriverJAZZ
  91.     runscript AnalyzeDriverJAZZ
  92.     runmenu DisplayDriverJAZZ
  93.     return
  94.  
  95. script AnalyzeDisplayConfigJAZZ
  96.     runscript AnalyzeConfigJAZZ
  97.     runmenu DisplayConfigJAZZ
  98.     return
  99.  
  100. script AnalyzeConfigJAZZ
  101.     local buf type str "                                                                                                                                     "
  102.     local ptr type ptr &buf
  103.     local tmp type str ""
  104.  
  105.     sedit -C ${v_bootdrv}$v_bootdir $v_bootfil device=+$v_namconfig dummy put $ptr
  106.     set buf "$buf" - "*=*$v_namconfig\w"
  107.     trim buf
  108.     if issame "${buf}" ""        runscript ClearConfigJAZZ
  109.  
  110.     set tmp " $buf" - "*\wb"        if $$_strop set c_cdrport *tmp - "\w*$$"
  111.     set tmp " $buf" - "*\ws"        if $$_strop set c_cdrtype *tmp - "\w*$$"
  112.     set tmp " $buf" - "*\wa"        if $$_strop set c_pcmport *tmp - "\w*$$"
  113.     set tmp " $buf" - "*\wd"        if $$_strop set c_pcmdma  *tmp - "\w*$$"
  114.     set tmp " $buf" - "*\wi"        if $$_strop set c_pcmirq  *tmp - "\w*$$"
  115.     set tmp " $buf" - "*\wh"        if $$_strop set c_pcmhdma *tmp - "\w*$$"
  116.     set tmp " $buf" - "*\wp"        if $$_strop set c_mpuport *tmp - "\w*$$"
  117.     set tmp " $buf" - "*\wq"        if $$_strop set c_mpuirq  *tmp - "\w*$$"
  118.     set tmp " $buf" - "*\wv"        if $$_strop set c_verbose "v"
  119.     set tmp " $buf" - "*\wc"        if $$_strop set c_mixcompat *tmp - "\w*$$"
  120.     set tmp " $buf" - "*\wl"        if $$_strop set c_lopt    *tmp - "\w*$$"
  121.     set tmp " $buf" - "*\wr"        if $$_strop set c_ropt    *tmp - "\w*$$"
  122.     set tmp " $buf" - "*\wz"        if $$_strop set c_mixtype *tmp - "\w*$$"
  123.  
  124.     sedit -C ${v_bootdrv}${v_bootdir} $v_bootfil device=+$v_namcdrom dummy put $ptr
  125.     trim buf
  126.  
  127. ##AS    set c_cdrport "170"
  128.     set tmp " $buf" - "*\wb"        if $$_strop set c_cdrport *tmp - "\w*$$"
  129.  
  130.     return
  131. menu DisplayConfigJAZZ at 0,0 dims 6,38 bc wh tc bla bo do sh nosave name " System Configuration "
  132.     display v_namconfig at 0,-1 dims 1,30 using " CONFIG.SYS Driver: %s"
  133.  
  134.     text     at 1,8  "PORT"
  135.     text    at 1,15 "DMA"
  136.     text     at 1,22 "IRQ"
  137.     text     at 1,29 "HiDMA"
  138.  
  139.     text     at 2,2 "JAZZ"
  140.     display at 2,8     c_pcmport 
  141.     display at 2,15 c_pcmdma  
  142.     display at 2,22 c_pcmirq  
  143.     display at 2,29 c_pcmhdma 
  144.  
  145.     text     at 3,2 "MPU"      
  146.     display at 3,8  c_mpuport 
  147.     display at 3,22 c_mpuirq  
  148.  
  149. ##    text     at 4,2 "MWT"
  150. ##    display at 4,8  c_icsport 
  151.  
  152.     item return 1
  153.  
  154. script ClearConfigJAZZ
  155.         set c_pcmport     ""
  156.         set c_pcmdma      ""
  157.         set c_pcmirq      ""
  158.         set c_pcmhdma     ""
  159.         set c_mpuport     ""
  160.         set c_mpuirq      ""
  161.         set c_cdrport     ""
  162.         set c_cdrtype     ""
  163.         set c_verbose     ""
  164.         set c_mixcompat ""
  165.         set c_lopt     ""
  166.         set c_ropt     ""
  167.         set c_mixtype     ""
  168.         return
  169. script AnalyzeDriverJAZZ
  170.     set b type int hex 0
  171.     set c type int hex 0
  172.     set d type int hex 0
  173.     interrupt 2Fh ax BC00h bx 3F3Fh return bx b cx c dx d
  174.     set b $b ^ $c ^ $d
  175.     if ! isequal $b 6D76h    goto nodriver
  176.  
  177.     interrupt 2Fh ax BC0Ch return dx d
  178.     set d_pcmport  "${d}" - "h"
  179.  
  180.     interrupt 2Fh ax BC04h return bx b cx c dx d
  181.     set d_pcmdma  "${b}" - "h"
  182.     set d_pcmirq  "${c}" - "h"
  183.     set d_pcmhdma "${d}" - "h"
  184.  
  185.     interrupt 2Fh ax BC08h return bx b cx c
  186.     set d_mpuport "${b}" - "h"
  187.     set d_mpuirq  "${c}" - "h"
  188.  
  189.     interrupt 2Fh ax BC20h bx 0 return bx b
  190.     set d_mixtype "${b}" - "h"
  191.  
  192.     :nodriver
  193.     return
  194. menu DisplayDriverJAZZ at 0,40 dims 5,38 bc wh tc bla bo do sh nosave name " Driver Configuration "
  195.     display v_BoardStr at 0,-1 dims 1,28 using " Product Name: %s "
  196.  
  197.     text     at 1,8  "PORT"
  198.     text    at 1,15 "DMA"
  199.     text     at 1,22 "IRQ"
  200.     text     at 1,29 "HiDMA"
  201.  
  202.     text     at 2,2 "JAZZ"
  203.     display at 2,8     d_pcmport
  204.     display at 2,15 d_pcmdma
  205.     display at 2,22 d_pcmirq
  206.     display at 2,29 d_pcmhdma
  207.  
  208.     text     at 3,2 "MPU"
  209.     display at 3,8  d_mpuport
  210.     display at 3,22 d_mpuirq
  211.  
  212.     item return 1
  213.  
  214. script CompareConfigDriverJAZZ
  215.     local x type str ""
  216.  
  217.     set s_comparemsg "${x}"
  218.  
  219.     set x ""
  220.     if issame "${c_pcmport}" ""    then
  221.         set x "${x}" + "No CONFIG.SYS Entry.  "
  222.     else
  223.         if issame "${c_pcmport}" ""    set x "${x}" + "'A###', "
  224.         if issame "${c_pcmdma}" ""    set x "${x}" + "'D#', "
  225.         if issame "${c_pcmirq}" ""    set x "${x}" + "'I#', "
  226.         if issame "${c_pcmhdma}" ""    set x "${x}" + "'H#', "
  227.         if issame "${c_mpuport}" ""    set x "${x}" + "'P#', "
  228.         if issame "${c_mpuirq}" ""    set x "${x}" + "'Q#', "
  229.         if issame "${c_cdrport}" ""    set x "${x}" + "'B#', "
  230.         if issame "${c_cdrtype}" ""    set x "${x}" + "'S#', "
  231.     endif
  232.     if ! issame "${x}" ""    set s_comparemsg "${s_comparemsg}  CONFIG.SYS: missing ${x}." - ", ." + "."
  233.  
  234.     set x ""
  235.     if issame "${d_pcmport}" ""    then
  236.         set x "${x}" + "No DRIVER Loaded.  "
  237.     else
  238.         if not issame "${c_pcmport}"  ""    if not issame "${c_pcmport}"  "${d_pcmport}"     set x "${x}" + "PORT, "
  239.         if not issame "${c_pcmdma}"   ""    if not issame "${c_pcmdma}"   "${d_pcmdma}"     set x "${x}" + "DMA, "
  240.         if not issame "${c_pcmirq}"   ""    if not issame "${c_pcmirq}"   "${d_pcmirq}"     set x "${x}" + "IRQ, "
  241.         if not issame "${c_pcmhdma}"  ""    if not issame "${c_pcmhdma}"  "${d_pcmhdma}"     set x "${x}" + "HiDMA, "
  242.         if not issame "${c_mpuport}" ""    if not issame "${c_mpuport}" "${d_mpuport}"     set x "${x}" + "MPU PORT, "
  243.         if not issame "${c_mpuirq}"  ""    if not issame "${c_mpuirq}"  "${d_mpuirq}"     set x "${x}" + "MPU IRQ, "
  244.     endif
  245.     if ! issame "${x}" ""    set s_comparemsg "${s_comparemsg}  DRIVER needs reboot: ${x}." - ", ." + "."
  246.  
  247.     set x ""
  248.     if issame "${b_pcmport}" ""    then
  249.         set x "${x}" + "Board Not Found.  "
  250.     else
  251.         if not issame "${d_pcmport}"  ""    if not issame "${d_pcmport}" "${b_pcmport}"    set x "${x}" + "PORT, "
  252.         if not issame "${d_pcmdma}"   ""    if not issame "${d_pcmdma}"  "${b_pcmdma}"    set x "${x}" + "DMA, "
  253.         if not issame "${d_pcmirq}"   ""    if not issame "${d_pcmirq}"  "${b_pcmirq}"    set x "${x}" + "IRQ, "
  254.         if not issame "${d_pcmhdma}"  ""    if not issame "${d_pcmhdma}" "${b_pcmhdma}"    set x "${x}" + "HiDMA, "
  255.     endif
  256.     if ! issame "${x}" ""    set s_comparemsg "${s_comparemsg}  BOARD out of sync with DRIVER: ${x}." - ", ." + "."
  257.  
  258.     return
  259.  
  260. menu DisplayCompareJAZZ at 13,28 dims 8,48 bc wh tc bla bo do sh nosave name " Compare Configurations "
  261.     display s_comparemsg dims 6,44
  262.     item return 1
  263.     
  264.  
  265. script AnalyzeBoardJAZZ
  266.     execute $prg_board 
  267.     if ! $errorlevel         goto noboard
  268. ##    if $DEBUGMODE set errorlevel 6
  269.     set b_BoardStr *v_${v_Board}String${errorlevel}
  270.  
  271.     execute $prg_board r1
  272.     set b_pcmport     "2${errorlevel}0"
  273.     execute $prg_board r2
  274.     set b_pcmdma    "${errorlevel}"
  275.     execute $prg_board r3
  276.     set b_pcmirq    "${errorlevel}"
  277.     execute $prg_board r4
  278.     set b_pcmhdma    "${errorlevel}"
  279. #    execute $prg_board r5
  280. #    set b_mpuport    ""
  281. #    execute $prg_board r6
  282. #    set b_mpuirq    "${errorlevel}"
  283.  
  284.     return
  285.  
  286.     :noboard
  287.     return
  288.  
  289. menu DisplayBoardJAZZ at 12,0 dims 8,18 bc wh tc bla bo do sh nosave name " Board "
  290.     display b_BoardStr using " %s "
  291.     text at ,2 
  292.     separator     at 2,2 dims ,14
  293.     text     " PCM "    at 2,-1
  294.     display b_pcmport    using "PORT: %4s "
  295.     display b_pcmdma    using " DMA: %3s "
  296.     display b_pcmirq    using " IRQ: %3s "
  297.     display b_pcmhdma    using "HDMA: %3s "
  298.     item return 1
  299.  
  300. script ResetConfigJAZZ
  301.     set i_pcmport "$c_pcmport"
  302.     set i_pcmdma  "$c_pcmdma"
  303.     set i_pcmirq  "$c_pcmirq"
  304.     set i_pcmhdma "$c_pcmhdma"
  305.     set i_mpuport "$c_mpuport"
  306.     set i_mpuirq  "$c_mpuirq"
  307.     set i_cdrport "$c_cdrport"
  308.     set i_cdrtype "$c_cdrtype"
  309.     runscript ConfigJAZZ
  310.     return
  311.  
  312. script ConfigJAZZ
  313.     execute $prg_board A$i_pcmport D$i_pcmdma I$i_pcmirq H$i_pcmhdma P$i_mpuport Q$i_mpuirq G$c_vollvl
  314.     return
  315.  
  316. script ConfigJAZZTest08
  317.     execute $prg_board A$i_pcmport D$i_pcmdma I$i_pcmirq             
  318.     return
  319.  
  320. script ConfigJAZZTest16
  321.     execute $prg_board A$i_pcmport            I$i_pcmirq H$i_pcmhdma 
  322.     return
  323.  
  324. script ConfigJAZZTestMIDI
  325.     execute $prg_board A$i_pcmport                                    P$i_mpuport Q$i_mpuirq
  326.     return
  327.  
  328. script TestJAZZ
  329.     local port type int 0
  330.     local dma  type int 0
  331.     local irq  type int 0
  332.     local hdma type int 0
  333.     local status type int 0
  334.     local errjmp type str ""
  335.     local testtodo type str ""
  336.     local a_testtodo type str " Test08 Test16 TestMIDI "
  337.  
  338.     :nexttest
  339.     set testtodo "${a_testtodo}" - "*${testtodo}\w" - "\w*$$"
  340.     if issame "${testtodo}" ""    goto testdone
  341.  
  342.     if issame "$i_pcmport" ""    runscript GetNextINIFILEPORT
  343.     if issame "$i_pcmdma"  ""    runscript GetNextINIFILEDMA
  344.     if issame "$i_pcmirq"  ""    runscript GetNextINIFILEIRQ
  345.     if issame "$i_pcmhdma" ""    runscript GetNextINIFILEHDMA
  346.  
  347.     :testagain
  348.     if issame "$i_pcmport" ""    set errjmp "${errjmp}" + "_PORT"
  349.     if issame "$i_pcmdma"  ""    set errjmp "${errjmp}" + "_DMA"
  350.     if issame "$i_pcmirq"  ""    set errjmp "${errjmp}" + "_IRQ"
  351.     if issame "$i_pcmhdma" ""    set errjmp "${errjmp}" + "_HDMA"
  352.     goto jmp${errjmp}
  353.  
  354.     :jmp
  355.     runscript WriteINIFILE${testtodo}
  356.     runscript ConfigJAZZ${testtodo}
  357.  
  358.     if issame "${testtodo}" "Test08"    then
  359.         set testbuf type str "Testing Digital Audio using Port:$i_pcmport DMA:$i_pcmdma IRQ:$i_pcmirq  "
  360.         display testbuf at 23,1 using " %-76s " background green textcolor btwhite
  361.  
  362.         execute $prg_play $wav_welcome08 Q B$i_pcmport D$i_pcmdma I$i_pcmirq H$i_pcmhdma 
  363.         set status $errorlevel
  364.         runscript WriteINIFILEOkay${testtodo}
  365.  
  366.         if iskey return            # for debug only
  367.         if $status == 255    runmenu LaunchError
  368.         if $status > 18     runscript GetNextINIFILEIRQ
  369.         if $status < 18    set status 0
  370.     endif
  371.     if issame "${testtodo}" "Test16"    then
  372.         set testbuf type str "Testing Digital Audio using Port:$i_pcmport HiDMA:$i_pcmhdma IRQ:$i_pcmirq  "
  373.         display testbuf at 23,1 using " %-76s " background green textcolor btwhite
  374.  
  375.         execute $prg_play $wav_welcome16 Q B$i_pcmport D$i_pcmdma I$i_pcmirq H$i_pcmhdma 
  376.         set status $errorlevel
  377.         runscript WriteINIFILEOkay${testtodo}
  378.  
  379.         if iskey return            # for debug only
  380.         if $status == 255    runmenu LaunchError
  381.         if $status > 18     runscript GetNextINIFILEHDMA
  382.         if $status < 18    set status 0
  383.     endif
  384.     if issame "${testtodo}" "TestMIDI"    then
  385.         set status 0
  386.     #    set testbuf type str "Testing B$c_mpuport I$c_mpuirq "
  387.     #    display testbuf at 23,1 using " %-76s " background green textcolor btwhite
  388.     #
  389.     #    execute $prg_midiplay $mid_welcome 
  390.     #    set status $errorlevel
  391.         runscript WriteINIFILEOkay${testtodo}
  392.     #    set i_mpuirq 2
  393.         if isequal $i_mpuirq $i_pcmirq    runscript GetNextINIFILEMPUIRQ
  394.         if isequal $i_mpuport $i_icsport    runscript GetNextINIFILEMPUPORT
  395.         if iskey return            # for debug only
  396.         if $status == 255    runmenu LaunchError
  397.     endif
  398.  
  399.     if iskey return            # for debug only
  400.     if $status                 goto testagain
  401.     goto nexttest
  402.  
  403.     :testdone
  404.     runmenu TestJAZZ0
  405.  
  406.     return
  407.  
  408.     :jmp_port 
  409.     :jmp_dma 
  410.     :jmp_port_dma 
  411.     :jmp_irq 
  412.     :jmp_port_irq 
  413.     :jmp_dma_irq 
  414.     :jmp_port_dma_irq 
  415.     :jmp_hdma 
  416.     :jmp_port_hdma 
  417.     :jmp_dma_hdma 
  418.     :jmp_port_dma_hdma 
  419.     :jmp_irq_hdma 
  420.     :jmp_port_irq_hdma 
  421.     :jmp_dma_irq_hdma 
  422.         runmenu TestJAZZ2
  423.         return
  424.     :jmp_port_dma_irq_hdma 
  425.         runmenu TestJAZZBadConfig
  426.         return
  427.  
  428. menu TestJAZZBadConfig at -1,-1 background red textcolor btwhite border double shadow name " Warning! "
  429.     text
  430.     text "No Valid Board Parameters in CONFIG.SYS!"
  431.     text
  432.  
  433. menu TestJAZZ0 at -1,-1 bc wh tc bla bo do sh name " Passed! "
  434.     text
  435.     text "The Test was Successful."
  436.     item script delay5secs
  437.  
  438. menu TestJAZZ2 at -1,-1 bc wh tc bla bo do sh name " Failed! "
  439.     text
  440.     text at ,-1 "The Test was Not Successful."
  441.     text
  442.     text at ,-1 "The Test was unable to find any valid resources."
  443.     text
  444.     text at ,-1 "Please reset your computer and try the Test again."
  445.     item script delay5secs
  446.  
  447. menu TestJAZZ1 at -1,-1 bc wh tc bla bo do sh name " Whoops! "
  448.     text
  449.     text "The Test was Interrupted."
  450.     item script delay5secs
  451.     
  452.  
  453. script delay5secs
  454.     set starttime type long $tics
  455.     set endtime type long $starttime + 91
  456.  
  457.     :delay
  458.     set curtime type long $tics
  459.     if iskey            goto break
  460.     if isless $curtime $endtime    goto delay
  461.     :break
  462.     if iskey flushkeys
  463.     return
  464.  
  465. menu LaunchError at -1,-1 bc re tc btw bo do sh na " System Error! "
  466.     text at ,2
  467.     text at ,-1 "Unable to Launch External Application!"
  468.     text at ,2
  469.     text "The most likely causes of this error are:"
  470.     text 
  471.     text "Not Enough Memory.  Quit this program, then type 'EXIT'."
  472.     text 
  473.     text "Missing Software.  Run the original INSTALL program again."
  474.     text
  475.