home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-04-03 | 37.3 KB | 1,218 lines |
- include tcdglb.dat
-
- menu ReadCDROMConfiguration dims 25,80 bc bla tc wh bo do na " Read CDROM Configuration "
- item script ReadCDROMConfiguration
-
- script ReadCDROMConfiguration
- set var_CDROMReady ""
-
- display "Searching for CDROM Driver in CONFIG.SYS" at 2,2 dims 1,65 bc bla tc wh
- runscript FindCDROMConfig
-
- display "Searching for CDROM Driver in AUTOEXEC.BAT" at 3,2 dims 1,65 bc bla tc wh
- runscript FindCDROMAutoex
-
- if issame "${lin_CONFIGCDROM}" "" goto needCONFIGCDROM
- if issame "${v_namcdromd1}" "" goto needCONFIGCDROM
- if not isfile $v_namcdromd1 goto failCONFIGCDROM
- goto okayCONFIGCDROM
-
- :needCONFIGCDROM
- set var_CDROMReady "Unavailable"
- runmenu needCONFIGCDROM
- goto okayCONFIGCDROM
- :failCONFIGCDROM
- set var_CDROMReady "Unavailable"
- if issame "${v_namcdromd1}" "" set v_namcdromd1 "${nam_AUTOEXcddev1}"
- runmenu failCONFIGCDROM
- goto okayCONFIGCDROM
- :okayCONFIGCDROM
-
- if issame "${lin_AUTOEXCDROM}" "" goto needAUTOEXCDROM
- if issame "${v_namcdromd1}" "" goto okayAUTOEXCDROM
-
- if not isfile ${v_namcdromd1} goto okayAUTOEXCDROM
- set x type int 0
- interrupt 2Fh ax 1500h bx 0 return bx x
- if isequal $x 0 goto failAUTOEXCDROM
- goto okayAUTOEXCDROM
- :needAUTOEXCDROM
- set var_CDROMReady "Unavailable"
- runmenu needAUTOEXCDROM
- goto okayAUTOEXCDROM
- :failAUTOEXCDROM
- set var_CDROMReady "Unavailable"
- runmenu failAUTOEXCDROM
- goto okayAUTOEXCDROM
- :okayAUTOEXCDROM
-
- runmenu dspCDROMlines${v_namcdrom}:r
-
- if issame "${v_namcdrom}" "fdcd.sys" sedit -awnqI $v_winpath system.ini 386Enh EMMExclude=CA00-CBFF "CA00-CBFF" substitute
-
- return
-
- menu dspCDROMlines at -1,-1 bc wh tc bla bo do sh name " CDROM System Configuration "
- text at ,2
- text "The following lines were found in your system configuration files:"
- text
- display v_namcdrom dims 1,13 at ,-1
- text at ,2
- text "CONFIG.SYS:"
- display lin_CONFIGCDROM dims 2,65 bc blu tc wh
- text
- display lin_CONFIGJAZZ dims 2,65 bc blue tc wh
- text
- text "AUTOEXEC.BAT"
- display lin_AUTOEXCDROM dims 2,65 bc blu tc wh
- text
- text "Press ENTER to Continue..."
- text
- text
- text
-
- menu dspCDROMlinesSJCD at -1,-1 bc wh tc bla bo do sh name " CDROM System Configuration "
- text at ,2
- text "The following lines were found in your system configuration files:"
- text
- display v_namcdrom dims 1,13 at ,-1
- text at ,2
- text "CONFIG.SYS:"
- display lin_CONFIGCDROM dims 2,65 bc blu tc wh
- text
- display lin_CONFIGJAZZ dims 2,65 bc blue tc wh
- text
- text "AUTOEXEC.BAT"
- display lin_AUTOEXCDROM dims 2,65 bc blu tc wh
- text
- text "Press ENTER to Continue..."
- text
- text
- text
-
- menu dspCDROMlinesFDATACD at -1,-1 bc wh tc bla bo do sh name " CDROM System Configuration "
- text at ,2
- text "The following lines were found in your system configuration files:"
- text
- display v_namcdrom dims 1,13 at ,-1
- text at ,2
- text "CONFIG.SYS:"
- display lin_CONFIGMCAM dims 2,65 bc blu tc wh
- text
- display lin_CONFIGCDROM dims 2,65 bc blue tc wh
- text
- text "AUTOEXEC.BAT"
- display lin_AUTOEXCDROM dims 2,65 bc blu tc wh
- text
- text "Press ENTER to Continue..."
- text
- text
- text
-
-
- menu dspCDROMlinesD011V109 at -1,-1 bc wh tc bla bo do sh name " CDROM System Configuration "
- text at ,2
- text "The following lines were found in your system configuration files:"
- text
- display v_namcdrom dims 1,13 at ,-1
- text at ,2
- text "CONFIG.SYS:"
- display lin_CONFIGMCAM dims 2,65 bc blu tc wh
- text
- display lin_CONFIGCDROM dims 2,65 bc blue tc wh
- text
- text "AUTOEXEC.BAT"
- display lin_AUTOEXCDROM dims 2,65 bc blu tc wh
- text
- text "Press ENTER to Continue..."
- text
- text
- text
-
-
-
-
- menu dspCDROMlinesMTMCDAI at -1,-1 bc wh tc bla bo do sh name " CDROM System Configuration "
- text at ,2
- text "The following lines were found in your system configuration files:"
- text
- display v_namcdrom dims 1,13 at ,-1
- text at ,2
- text "CONFIG.SYS:"
- display lin_CONFIGMCAM dims 2,65 bc blu tc wh
- text
- display lin_CONFIGCDROM dims 2,65 bc blue tc wh
- text
- text "AUTOEXEC.BAT"
- display lin_AUTOEXCDROM dims 2,65 bc blu tc wh
- text
- text "Press ENTER to Continue..."
- text
- text
- text
-
-
-
- menu dspCDROMlinesCDROM at -1,-1 bc wh tc bla bo do sh name " CDROM System Configuration "
- text at ,2
- text "The following lines were found in your system configuration files:"
- text
- display v_namcdrom dims 1,13 at ,-1
- text at ,2
- text "CONFIG.SYS:"
- display lin_CONFIGCDROM dims 2,65 bc blue tc wh
- text
- text "AUTOEXEC.BAT"
- display lin_AUTOEXCDROM dims 2,65 bc blu tc wh
- text
- text "Press ENTER to Continue..."
- text
- text
- text
-
-
- script FindCDROMConfig
- local buf type str " "
- local ptr type ptr &buf
-
- if issame "${v_namconfig}" "" then
- if isfile ${cwd:h}\pa3d.sys set v_namconfig "pa3d.sys"
- if isfile ${cwd:h}\pros.sys set v_namconfig "pros.sys"
- if isfile ${cwd:h}\jazz.sys set v_namconfig "jazz.sys"
- endif
- nullit buf
- sedit -C ${v_bootdrv}${v_bootdir} config.sys device=+$v_namconfig d put $ptr
- trim buf
- set lin_CONFIGJAZZ "$buf"
-
- if issame "${v_namcdrom}" "" then
- ##AS
- ##AS if isfile ${cwd}:h\mtmcdai.sys set v_namcdrom "mtmcdai.sys"
- if isfile ${cwd}:h\FDATACD.SYS set v_namcdrom "FDATACD.SYS"
-
- if isfile ${cwd}:h\cdrom.sys set v_namcdrom "cdrom.sys"
- if isfile ${cwd}:h\sjcd.sys set v_namcdrom "sjcd.sys"
- if isfile ${cwd}:h\fdcd.sys set v_namcdrom "fdcd.sys"
- ##AS if isfile mtmcdai.sys set v_namcdrom "mtmcdai.sys"
- if isfile FDATACD.SYS set v_namcdrom "FDATACD.SYS"
- if isfile cdrom.sys set v_namcdrom "cdrom.sys"
- if isfile sjcd.sys set v_namcdrom "sjcd.sys"
- if isfile fdcd.sys set v_namcdrom "fdcd.sys"
- endif
- if issame "${v_namcdrom}" "sjcd.sys" then
- if issame "$v_inifile" "" set v_inifile "QCFG.INI"
-
- nullit buf
- sedit -I . $v_inifile config cdrport dummy put $ptr
- set c_cdrport "$buf" - "^*=" - "\w*$$"
- endif
-
- nullit buf
- sedit -C ${v_bootdrv}${v_bootdir} config.sys lastdrive= dummy put $ptr
- trim buf
- set lin_CONFIGLASTDRIVE "${buf}"
- if ! issame "${buf}" "" set var_CONFIGLASTDRIVEfound 1
-
- nullit buf
- sedit -C ${v_bootdrv}${v_bootdir} config.sys device=+$v_mcamname dummy put $ptr
- trim buf
- set lin_CONFIGMCAM "${buf}"
- if ! issame "${buf}" "" set var_CONFIGMCAMfound 1
-
- nullit buf
- sedit -C ${v_bootdrv}${v_bootdir} config.sys device=+$v_namcdrom dummy put $ptr
-
- trim buf
- set lin_CONFIGCDROM "${buf}"
-
- set var_CONFIGCDROMfound 0
- if issame "${buf}" "" return
- set var_CONFIGCDROMfound 1
-
-
- if $var_CONFIGMCAMfound runscript parseCONFIGMCAM
- if $var_CONFIGCDROMfound runscript parseCONFIGCDROM
- if $var_CONFIGLASTDRIVEfound runscript parseCONFIGLASTDRIVE
-
- return
-
- script parseCONFIGLASTDRIVE
- set v_lastdrive "${lin_CONFIGLASTDRIVE}" - "*="
- trim v_lastdrive
- return
-
- script parseCONFIGCDROM
- local x type str "${lin_CONFIGCDROM}"
- local y type str ""
-
- set y "${x}" - "/d:"
- if $_strop set v_namcdromd1 "${x}" - "*/d:" - "\w*$$"
-
- set y "${x}" - "*/e"
- if $_strop set opt_CONFIGCDROMslashe "/E"
-
- set y "${x}" - "*/f"
- if $_strop set opt_CONFIGCDROMslashf "/F" + "${y}" - "\w*$$"
-
- return
-
- script parseCONFIGMCAM
- local x type str "${lin_CONFIGMCAM}"
- local y type str ""
-
- set y "${x}" - "^*${v_mcamname}"
- trim y
- set opt_CONFIGMCAM "${y}"
- return
-
- script FindCDROMAutoex
- local buf type str " "
- local ptr type ptr &buf
- local name type str ""
- local count type int 0
-
- set name "mscdex"
- sedit -B ${v_bootdrv}${v_bootdir} autoexec.bat $name dummy locate
- if ! $errorlevel == 0 then
- set count ++
- set v_mscdex "mscdex.exe"
- endif
- set name "corelcdx"
- sedit -B ${v_bootdrv}${v_bootdir} autoexec.bat $name dummy locate
- if ! $errorlevel == 0 then
- set count ++
- set v_mscdex "corelcdx.com"
- endif
-
- set var_AUTOEXCDROMfound 0
- set lin_AUTOEXCDROM ""
- if $count == 0 goto return
- if $count == 1 goto parseline
-
- runmenu MultipleAUTOEXCDROM
- set lin_AUTOEXCDROM ""
- set v_mscdex ""
- :return
- return
-
- :parseline
- set var_AUTOEXCDROMfound 1
- set name "${v_mscdex}:r"
- sedit -B ${v_bootdrv}${v_bootdir} autoexec.bat $name dummy put $ptr
- set lin_AUTOEXCDROM "${buf}"
-
- local x type str "${buf}"
- local y type str ""
- local c type int 0
-
- set y "${x}" - "/d:"
- if not issame "${y}" "${x}" set c ++
- set x "${y}"
- set y "${x}" - "/d:"
- if not issame "${y}" "${x}" set c ++
- set x "${y}"
- set y "${x}" - "/d:"
- if not issame "${y}" "${x}" set c ++
- set x "${y}"
- set y "${x}" - "/d:"
- if not issame "${y}" "${x}" set c ++
-
- if $c == 0 goto gotnames
- set nam_AUTOEXcddev1 "${buf}" - "*/d:" - "\w*$$"
- trim nam_AUTOEXcddev1
- if $c == 1 goto gotnames
- set nam_AUTOEXcddev2 "${buf}" - "*/d:*\w" - "*/d:" - "\w*$$"
- trim nam_AUTOEXcddev2
- if $c == 2 goto gotnames
- set nam_AUTOEXcddev3 "${buf}" - "*/d:*\w" - "*/d:*\w" - "*/d:" - "\w*$$"
- trim nam_AUTOEXcddev3
- if $c == 3 goto gotnames
- set nam_AUTOEXcddev4 "${buf}" - "*/d:*\w" - "*/d:*\w" - "*/d:*\w" - "*/d:" - "\w*$$"
- trim nam_AUTOEXcddev4
- :gotnames
-
- local m type str ""
- set m "${buf}" - "*/m:"
- if not issame "${m}" "${buf}" set opt_AUTOEXCDROMslashm "${m}" - "\w*$$"
- return
-
- ########################################################################
- ### FindMEMMGRConfig - find the DEVICE=memorymanager
- ### then, parse that line to find the INCLUDE/EXCLUDE status of CA00-CBFF
- script FindMEMMGRConfig
- local buf type str " "
- local ptr type ptr &buf
- local name type str ""
- local count type int 0
-
- set name "emm386"
- sedit -C ${v_bootdrv}${v_bootdir} config.sys device=+$name dummy put $ptr
- trim buf
- if not issame "${buf}" "" then
- set count ++
- set nam_CONFIGMEMMGR "emm386.exe"
- set lin_CONFIGMEMMGR "${buf}"
- endif
-
- set name "qemm"
- sedit -C ${v_bootdrv}${v_bootdir} config.sys device=+$name dummy put $ptr
- trim buf
- if not issame "${buf}" "" then
- set count ++
- set nam_CONFIGMEMMGR "qemm.sys"
- set lin_CONFIGMEMMGR "${buf}"
- endif
-
- if $count == 0 return
- if $count == 1 goto parseline
- runmenu MultipleCONFIGMEMMGR
- set lin_CONFIGMEMMGR ""
- set nam_CONFIGMEMMGR ""
- return
-
- :parseline
- if issame "${nam_CONFIGMEMMGR}" "emm386.exe" runscript parseEMM386
- if issame "${nam_CONFIGMEMMGR}" "qemm.sys" runscript parseQEMM
-
- return
-
- script parseQEMM
- local x type str ""
- local y type str ""
- local z type str ""
- local lorange type int hex 0
- local hirange type int hex 0
-
- set x "${lin_CONFIGMEMMGR}"
- :checkinclude
- breakpoint
- set y "${x}" - "*i="
- if ! $_strop goto noinclude
-
- set z "${y}" - "-*$$"
- set lorange $z
-
- set x "${y}" - "*-" - "\w*$$"
- set hirange $z
-
- if $lorange <= CBFFh if $hirange >= CA00h set var_MemIsIncluded 1
- set x "${y}"
- goto checkinclude
-
- :noinclude
-
- set x "${lin_CONFIGMEMMGR}"
-
- :checkexclude
- set y "${x}" - "*x="
- if issame "${y}" "${x}" goto noexclude
-
- set z "${y}" - "-*$$"
- set lorange $z
-
- set z "${y}" - "*-" - "\w*$$"
- set hirange $z
-
- if $lorange <= CA00h if $hirange >= CB00h set var_MemIsExcluded 1
-
- set x "${y}"
- goto checkexclude
-
- :noexclude
- return
-
- script parseEMM386
- local x type str ""
- local y type str ""
- local z type str ""
- local lorange type int hex 0
- local hirange type int hex 0
-
- set x "${lin_CONFIGMEMMGR}"
- :checkinclude
- breakpoint
- set y "${x}" - "*i="
- if issame "${y}" "${x}" goto noinclude
-
- set z "${y}" - "-*$$"
- set lorange $z
-
- set z "${y}" - "*-" - "\w*$$"
- set hirange $z
-
- if $lorange <= CBFFh if $hirange >= CA00h set var_MemIsIncluded 1
- set x "${y}"
- goto checkinclude
-
- :noinclude
-
- set x "${lin_CONFIGMEMMGR}"
-
- :checkexclude
- set y "${x}" - "*x="
- if issame "${y}" "${x}" goto noexclude
-
- set z "${y}" - "-*$$"
- set lorange $z
-
- set z "${y}" - "*-" - "\w*$$"
- set hirange $z
-
- if $lorange <= CA00h if $hirange >= CB00h set var_MemIsExcluded 1
-
- set x "${y}"
- goto checkexclude
-
- :noexclude
- return
-
-
-
- script getTextLine
- set x type str ""
- getstring x length 65
- return "${x}"
-
- #############################################################
- ### LookCDROMConfig - look at the CDROM CONFIG.SYS line
-
- menu LookCDROMConfig dims 25,80 bc bla tc wh bo do name " Manually Verify CONFIG.SYS "
- runscript FindCDROMConfig
- item at -1,-1 " Edit the CDROM Driver Line in CONFIG.SYS " script MakeCONFIGCDROM
- item at ,-1 " Diagnose CDROM Driver CONFIG.SYS Problems " script diagCONFIGCDROM
-
-
- #############################################################
- menu needCONFIGCDROM at -1,-1 dims 15,70 bc re tc wh na " CONFIG.SYS missing CDROM Driver "
- text
- text "Unable to locate the CDROM Driver in CONFIG.SYS"
- text
- text "A line must be added to CONFIG.SYS to load the CDROM driver."
- text "
- text "Would you like to do this now? "
- text
- box at 10,8 dims 3,60
- item " Yes, show me... " at 11,10 return 1 script makeCONFIGCDROM
- item " No, thank you. " at 11,40 return 1
-
- script buildCONFIGCDROMline
- if issame "${v_namcdrom}" "" runmenu GetV_NAMCDROM
-
- set sedit_CONFIGCDROM "substitute"
-
- local x type str "${nam_AUTOEXcddev1}"
- if issame "${x}" "" set x "$def_devcdrom"
- if issame "${v_namcdromd1}" "" set v_namcdromd1 "${x}"
- if issame "${lin_CONFIGCDROM}" "" then
- set lin_CONFIGCDROM `pwd
- set lin_CONFIGCDROM ${lin_CONFIGCDROM}:h
- set lin_CONFIGCDROM "device=${lin_CONFIGCDROM}\${v_namcdrom} /D:${v_namcdromd1}"
- if not issame "${opt_CONFIGCDROMslashe}" "" set lin_CONFIGCDROM "${lin_CONFIGCDROM} ${opt_CONFIGCDROMslashe}"
- if issame "${v_namcdrom}" "sjcd.sys" set lin_CONFIGCDROM "$lin_CONFIGCDROM /b:$c_cdrport"
- endif
-
- return
-
- script buildCONFIGlineFDCD
- if issame "${v_namcdrom}" "" runmenu GetV_NAMCDROM
-
- set sedit_CONFIGCDROM "substitute"
-
- local x type str "${nam_AUTOEXcddev1}"
- if issame "${x}" "" set x "$def_devcdrom"
- if issame "${v_namcdromd1}" "" set v_namcdromd1 "${x}"
-
- if issame "${lin_CONFIGCDROM}" "" then
- set lin_CONFIGCDROM `pwd
- set lin_CONFIGCDROM ${lin_CONFIGCDROM}:h
- set lin_CONFIGCDROM "device=${lin_CONFIGCDROM}\${v_namcdrom} /D:${v_namcdromd1}"
- if not issame "${opt_CONFIGCDROMslashe}" "" set lin_CONFIGCDROM "${lin_CONFIGCDROM} ${opt_CONFIGCDROMslashe}"
- endif
- return
-
- script buildCONFIGlineSJCD
- if issame "${v_namcdrom}" "" runmenu GetV_NAMCDROM
-
- set sedit_CONFIGCDROM "substitute"
-
- local x type str "${nam_AUTOEXcddev1}"
- if issame "${x}" "" set x "$def_devcdrom"
- if issame "${v_namcdromd1}" "" set v_namcdromd1 "${x}"
- if issame "${lin_CONFIGCDROM}" "" then
- set lin_CONFIGCDROM `pwd
- set lin_CONFIGCDROM ${lin_CONFIGCDROM}:h
- set lin_CONFIGCDROM "device=${lin_CONFIGCDROM}\${v_namcdrom} /D:${v_namcdromd1}"
- if not issame "${opt_CONFIGCDROMslashe}" "" set lin_CONFIGCDROM "${lin_CONFIGCDROM} ${opt_CONFIGCDROMslashe}"
- endif
- set lin_CONFIGCDROM "$lin_CONFIGCDROM /B:$c_cdrport"
- return
-
- script makeCONFIGCDROM
- runscript buildCONFIGCDROMline
- runmenu makeCONFIGCDROM
- runmenu addCONFIGCDROM
-
- if issame "${lin_CONFIGCDROM}" "" return
-
- if $v_usemcam runscript InsertCONFIGMCAM
-
- runmenu Delay5Warmboot
-
- return
-
- menu makeCONFIGCDROM at -1,-1 dims 7,75 bc bla tc wh na " Build CONFIG.SYS CDROM Driver Line " noescape
- text
- text "Edit the line below, until you are satisfied, then continue:"
- text
- item $lin_CONFIGCDROM dims 1,70 onkey script "getTextLine lin_CONFIGCDROM"
- text
-
- menu addCONFIGCDROM at -1,-1 dims 9,75 bc bla tc wh na " Add CDROM Driver Line to CONFIG.SYS " noescape
- text
- display lin_CONFIGCDROM dims 2,65 bc blu tc wh
- text
- text
- item at ,-1 " Yes, add to CONFIG.SYS... " script addCONFIGCDROM return 1
- item at ,-1 " No, I'll do it myself! " script clrCONFIGCDROM return 1
- text
-
- script addCONFIGCDROM
- if $v_usemcam then
- runscript InsertCONFIGMCAM
- else
- local name type str ""
- set name ${v_namcdrom}:r
- sedit -awnqC ${v_bootdrv}${v_bootdir} config.sys device=+$name "${lin_CONFIGCDROM}" $sedit_CONFIGCDROM
- interrupt 2Fh ax 4A10h bx 1 # flush smartdrv
- endif
- return
-
- script InsertCONFIGMCAM
- local buf type str " "
- local ptr type ptr &buf
- local name type str ""
-
- if issame "${lin_CONFIGMCAM}" "" set lin_CONFIGMCAM "device=${cwd}:h\${v_mcamname}"
-
- set name "${v_mcamname}:r"
- sedit -C ${v_bootdrv}${v_bootdir} config.sys device=+$name d put $ptr
- sedit -wnqC ${v_bootdrv}${v_bootdir} config.sys device=+$name d erase
- sedit -wnqC ${v_bootdrv}${v_bootdir} config.sys device=+$name "${lin_CONFIGMCAM}" substitute
-
- set name "${v_namcdrom}:r"
- sedit -C ${v_bootdrv}${v_bootdir} config.sys device=+$name d put $ptr
- sedit -wnqC ${v_bootdrv}${v_bootdir} config.sys device=+$name d erase
- sedit -wnqC ${v_bootdrv}${v_bootdir} config.sys device=+$name "${lin_CONFIGCDROM}" substitute
- interrupt 2Fh ax 4A10h bx 1 # flush smartdrv
- return
-
-
- script clrCONFIGCDROM
- set lin_CONFIGCDROM ""
- set v_namcdromd1 ""
- set v_namcdromd2 ""
- set v_namcdromd3 ""
- set v_namcdromd4 ""
- return
-
- #############################################################
- ### failCONFIGCDROM - CDROM DEVICE= line found in CONFIG.SYS, but no driver
- menu failCONFIGCDROM at 0,0 dims 25,80 bc re tc wh na " CDROM Driver Not Loaded "
- text
- text "Found CDROM Driver in CONFIG.SYS, but driver not loaded."
- text
- text "Either the machine was not rebooted after updating CONFIG.SYS,"
- text "or there is some other conflict with your system resources."
- text "
- text "Would you like to diagnose the problem?"
- text
-
- box at ,-1 dims 4,40
- item at ,-1 " Yes, figure it out... " script diagCONFIGCDROM return 1
- item at ,-1 " No, thank you. " return 1
-
- ####################################################################
- ### diagCONFIGCDROM - diagnose why CDROM Driver is in CONFIG, but not resident
- script diagCONFIGCDROM
- if issame "${lin_CONFIGCDROM}" "" runscript FindCDROMConfig
-
- if ! issame "${v_namcdrom}" "fdcd.sys" goto skipchkmem
- execute -eo chkmem CA
- local statusCA type int $errorlevel
- execute -eo chkmem CB
- local statusCB type int $errorlevel
-
- if isequal $statusCA 0 then
- runmenu statFDOMAINmemIsUnknown
- goto skipchkmem
- endif
- if isequal $statusCB 0 then
- runmenu statFDOMAINmemIsUnknown
- goto skipchkmem
- endif
-
- if isequal $statusCA 1 then
- runscript FindMEMMGRConfig
- if not issame "${lin_CONFIGMEMMGR}" "" runmenu statFDOMAINMem${var_MemIsIncluded}${var_MemIsExcluded}
- goto skipchkmem
- endif
- if isequal $statusCB 2 then
- runscript FindMEMMGRConfig
- runmenu statFDOMAINmemIsEms
- goto skipchkmem
- endif
- if isequal $statusCB 3 then
- runmenu statFDOMAINmemIsRom
- goto skipchkmem
- endif
- :skipchkmem
-
- local buf type str " "
- local ptr type ptr &buf
- local new type str ""
- if ! issame "${v_namcdrom}" "sjcd.sys" goto skipchkport
- local cdrport type str ""
- local jazzcdrport type str ""
-
- nullit buf
- sedit -C ${v_bootdrv}${v_bootdir} config.sys device=+$v_namconfig d put $ptr
- set lin_CONFIGJAZZ "$buf"
- set new "$buf" - "*="
- if ! $_strop then
- runmenu MissingJAZZ
- else
- set new "$new" - "*b" - "\w*$$"
- trim new
- set jazzcdrport "$new"
- if ! issame "$new" "310" if ! issame "$new" "300" if ! issame "$new" "320" if ! issame "$new" "330" if ! issame "$new" "340" runmenu badJAZZCDROMPORT
- endif
- nullit buf
- sedit -C ${v_bootdrv}${v_bootdir} config.sys device=+$v_namcdrom d put $ptr
- set new "$buf" - "^*="
- if ! $_strop then
- runmenu MissingSJCDCDROMPORT
- else
- set new "$new" - "*b:" - "\w*$$"
- trim new
- set cdrport "$new"
- if ! issame "$new" "310" if ! issame "$new" "300" if ! issame "$new" "390" runmenu badSJCDCDROMPORT
- endif
-
- if ! issame "$cdrport" "$jazzcdrport" runmenu JAZZCDRPORTMISMATCH
- :skipchkport
-
-
- nullit buf
- sedit -C ${v_bootdrv}${v_bootdir} config.sys device=+$v_namcdrom d put $ptr
- set new "$buf" - "^*="
- :stripleadingspace
- set new "$new" - "^\w"
- if $_strop goto stripleadingspace
- set new "$new" - "\w*$$"
- if ! issame "$new" "" if ! isfile $new runmenu MissingCDROMFILE
-
- # if ! $var_CONFIGLASTDRIVEfound goto skiplastdrive
- # runscript chkCONFIGLASTDRIVE
- # :skiplastdrive
-
- runmenu statFailUnknown
-
- :nextstep
- return
-
-
- script chkCONFIGLASTDRIVE
- local oldnodiskerror $nodiskerror
- set nodiskerror 1
- set a type int $nodiskerror
-
- local dir type str ""
- set dir "${v_lastdrive}" + ":" + "\"
- if ! isdir $dir goto return
-
- set x type ptr &v_lastdrive
- set y type byte *v_lastdrive
-
- :checkdrive
- set y --
- set dir "$y" + ":" + "\"
- if ! isdir $dir goto return
-
- if issame "$y" "c" goto getnextdrive
- if issame "$y" "C" goto getnextdrive
- goto checkdrive
-
- :getnextdrive
- runmenu FixLASTDRIVE
-
- :return
- set nodiskerror $oldnodiskerror
- return
-
- menu FixLASTDRIVE at 0,0 dims 25,80 bc re tc wh bo do sh na " Uh, oh! "
- text
- text "The CDROM system requires another Drive Letter, but CONFIG.SYS"
- text "specifies a LASTDRIVE."
- text
- text "The 'LASTDRIVE=' line in CONFIG.SYS must be updated to make room"
- text "for your new CDROM drive."
- text
- text "If you use the SUBST command, or use a NETWORK, then this change may"
- text "affect those configurations."
- text
- text "The LASTDRIVE setting is currently at 'X', and this will be changed to"
- text "the next drive letter if you select 'Change LASTDRIVE=', below:"
- text
- box at ,-1 dims 4,40 bo do sh
- item at ,-1 " Change LASTDRIVE= " script FixLASTDRIVE return 1
- item at ,-1 " Let me figure this out! " return 1
- text
- display v_lastdrive at 11,41 bc bla tc btw
-
- script FixLASTDRIVE
- local dir type str " "
- set x type ptr &v_lastdrive
- set y type byte *v_lastdrive
-
- set y ++
- if issame "$y" "{" goto nolastdriveleft
- if issame "$y" "[" goto nolastdriveleft
- set v_lastdrive "$y"
- runmenu NewLASTDRIVE
- sedit -wnqC ${v_bootdrv}${v_bootdir} config.sys lastdrive $v_lastdrive substitute
- return
-
- :nolastdriveleft
- runmenu NoLASTDRIVELeft
- return
-
- menu NewLASTDRIVE at -1,-1 bc wh tc bla bo do sh na " Got it! "
- text at ,2
- text "The new LASTDRIVE letter is: "
- text
- text "The Machine will now reboot to make the CDROM Drive available..."
- item $v_lastdrive at 2,30 using " %s " script delay5warmboot
-
- menu NoLASTDRIVELeft at -1,-1 bc re tc wh bo do sh na " Uh, oh! "
- text
- text "Your system is already configured with LASTDRIVE=Z."
- text
- text "The CDROM Driver will automatically set the CDROM Drive Letter"
- text "to the next disk drive after any other disk drivers found in CONFIG.SYS"
- text "(such as RAMDRIVE.SYS, a removable hard disk, or another CDROM drive)."
- text
-
- menu JAZZCDRPORTMISMATCH at -1,-1 dims 10,70 bc re tc wh bo do sh na " Uh, oh! "
- text "The CDROM Port parameters differ between the" at ,-1
- text "Sound Board Driver and the CDROM Driver." at ,-1
- text
- display lin_CONFIGCDROM dims 2,65 bc bla tc wh
- text
- display lin_CONFIGJAZZ dims 2,65 bc bla tc wh
- text
-
- menu MissingCDROMFILE at -1,-1 dims 6,70 bc re tc wh bo do sh na " Uh, oh! "
- text "The CDROM Driver FILE is missing!"
- display lin_CONFIGCDROM dims 2,65 bc bla tc wh
- text
-
- menu BadJAZZCDROMPORT at -1,-1 dims 6,70 bc re tc wh bo do sh na " Uh, oh! "
- text "The Sound Board Driver has a bad 'B###' option.
- display lin_CONFIGJAZZ dims 2,65 bc bla tc wh
- text
- menu BadSJCDCDROMPORT at -1,-1 dims 6,70 bc re tc wh bo do sh na " Uh, oh! "
- text "The CDROM Driver has a bad 'B###' option.
- display lin_CONFIGCDROM dims 2,65 bc bla tc wh
- text
- menu MissingJAZZCDROMPORT at -1,-1 dims 6,70 bc re tc wh bo do sh na " Uh, oh! "
- text "The Sound Board Driver has no 'B###' option."
- display lin_CONFIGJAZZ dims 2,65 bc bla tc wh
- text
- menu MissingJAZZ at -1,-1 dims 5,70 bc re tc wh bo do sh na " Uh, oh! "
- text "The Sound Board Driver is not in CONFIG.SYS"
- display v_namconfig dims 1,40 bc bla tc wh
- text
- menu MissingSJCDCDROMPORT at -1,-1 dims 6,70 bc re tc wh bo do sh na " Uh, oh! "
- text "The CDROM Driver has no 'B:###' option."
- display lin_CONFIGCDROM dims 2,65 bc bla tc wh
- text
-
- menu diagCONFIGCDROMOkay at -1,-1 dims 10,70 bc wh tc bla bo do sh na " Okay "
- text at ,-1 "The CONFIG.SYS CDROM Driver is Okay!"
- text at ,2
- display lin_CONFIGCDROM dims 2,65 bc bla tc wh
- text
- display lin_CONFIGJAZZ dims 2,65 bc bla tc wh
- text
-
- script UpdateCDROMConfiguration
- local tmp type str ""
-
- ##AS sedit -wnqC ${v_bootdrv}${v_bootdir} config.sys device=+$v_namcdrom d erase
- ##AS sedit -wnqC ${v_bootdrv}${v_bootdir} config.sys device=+$v_mcamname d erase
-
- set tmp "$lin_CONFIGJAZZ" - "^*="
- if $_strop sedit -wnqC ${v_bootdrv}${v_bootdir} config.sys device=+$v_namconfig "$tmp" substitute
-
- if isequal $v_usemcam 1 then
- if issame "$lin_CONFIGMCAM" "" set lin_CONFIGMCAM "device=${cwd}:h\${v_mcamname}"
- set tmp "$lin_CONFIGMCAM" - "^*="
- if $_strop sedit -wnqC ${v_bootdrv}${v_bootdir} config.sys device=+$v_mcamname "$tmp" substitute
- endif
-
- set tmp "$lin_CONFIGCDROM" - "^*="
- if $_strop sedit -wnqC ${v_bootdrv}${v_bootdir} config.sys device=+$v_namcdrom "$tmp" substitute
-
- interrupt 2Fh ax 4A10h bx 1 # flush smartdrv
-
- runscript delay5warmboot
- return
-
- menu statFailUnknown at 0,0 dims 25,80 bc bla tc wh bo do sh na " Hmm... "
- text at ,2
- text "Use the Arrow Keys to Highlight a Line and press ENTER to edit."
- text "Press the <ESC> key to see the CDROM settings from config.sys file"
- text "Then highlight 'Update Configuration' and press ENTER. The changes"
- text "will be made and the computer will restart."
- text
- box at ,-1 dims 8,76
- item at ,-1 $lin_CONFIGCDROM script "getTextLine lin_CONFIGCDROM" dims 1,70 bc bla tc wh
- separator at ,-1 dims 1,70
- item at ,-1 $lin_CONFIGJAZZ script "getTextLine lin_CONFIGJAZZ" dims 1,70 bc bla tc wh
- separator at ,-1 dims 1,70
- item at ,-1 " Update Configuration " script UpdateCDROMConfiguration return 1
- item at ,-1 " Ignore Changes " script delay5warmboot return 1
- text
- text at ,2
- text "Perhaps the machine was not rebooted after the line was added to CONFIG.SYS?"
- text "If so, select 'Ignore Changes' and press ENTER, and the machine will reboot."
- text
- text "Otherwise, perhaps the cable connecting the CDROM drive to the sound board"
- text "is not installed correctly. Select 'Ignore Changes' to reboot the computer,"
- text "then depower the machine and verify the cable attachment."
- text
- text "Or, you may want to disable your Memory Manager and try again."
- text
- menu statFDOMAINmemIsUnknown at 0,0 dims 25,80 bc re tc wh bo do sh na " Hmm... "
- text
- text "The memory required by the Future Domain driver appears 'okay'."
- text
- text "Examine more closely the CONFIG.SYS DEVICE= line, below: "
- text
- display lin_CONFIGCDROM dims 2,65 bc bla tc wh
- text
- text
- text "If the above appears correct, then perhaps the machine was"
- text "not rebooted after the line was added to CONFIG.SYS, so exit"
- text "this program, then reboot the machine and run this program again."
- text
- text "Otherwise, perhaps the cable connecting the CDROM drive to the"
- text "sound board is not installed correctly. Please verify that the"
- text "cable is attached firmly, and is not backwards."
- text
-
- menu statFDOMAINmem00 at 0,0 dims 25,80 bc re tc wh bo do sh na " Hmm... "
- text
- text "The CONFIG.SYS Memory Manager is neither INCLUDING nor EXCLUDING"
- text "the memory range from CA00 to CBFF."
- text
- text "Perhaps we should add the EXCLUDE option, then reboot the machine"
- text "and run this program again."
- text
- display lin_CONFIGMEMMGR dims 2,65 bc wh tc bla
- text
- text
-
- menu statFDOMAINmem01 at 0,0 dims 25,80 bc re tc wh bo do sh na " Hmm... "
- text
- text "The CONFIG.SYS Memory Manager has excluded the memory range CA00 to CBFF."
- text
- text "This should allow the CDROM driver to locate the hardware."
- text
- text "Perhaps the machine has not been rebooted since the Memory Manager"
- text "'DEVICE=' line in CONFIG.SYS was added (or modified)."
- text
- text "Exit this program, then reboot the computer and run this program again."
- text
- display lin_CONFIGMEMMGR dims 2,65 bc wh tc bla
- text
- text
- text "There is the possibility that your computer system's BIOS has specified"
- text "that this area of memory (CA00-CBFF) is to be 'SHADOWED', which requires"
- text "that you update your CMOS and disable 'shadowing' of this range."
- text
- text "This is usually accomplished by following the instructions on your "
- text "screen that appear when you first power-on your computer, like:"
- text "'Press DEL to run SETUP, or 'Press F1 to run SETUP'"
- text
-
- menu statFDOMAINmem10 at 0,0 dims 25,80 bc re tc wh bo do sh na " Hmm... "
- text
- text "The CONFIG.SYS Memory Manager has INCLUDED the memory range CA00 to CBFF."
- text
- text "This is probably the reason why the CDROM driver will not load."
- text
- text "An EXCLUDE option should be added to the DEVICE= line in CONFIG.SYS,"
- text "then the machine should be rebooted and this program run again."
- text
- display lin_CONFIGMEMMGR dims 2,65 bc wh tc bla
- text
- text
-
- menu statFDOMAINmem11 at 0,0 dims 25,80 bc re tc wh bo do sh na " Hmm... "
- text
- text "The CONFIG.SYS Memory Manager has INCLUDED and EXCLUDED the"
- text "memory range CA00 to CBFF. This should be changed so that there"
- text "are no overlapping INCLUDE and EXCLUDE regions."
- text
- display lin_CONFIGMEMMGR dims 2,65 bc wh tc bla
- text
- text
-
- COMMENT
- menu statFDOMAINmemIsRam at 0,0 dims 25,80 bc re tc wh bo do sh na " Hmm... "
- text
- text "The memory required by the Future Domain driver is RAM."
- text
- text "This could cause a conflict preventing the driver from loading."
- text
- text "Either a Memory Manager is controlling this area of memory,"
- text "or the BIOS has 'Enabled Shadow Ram'."
- text
- text "This program has attempted to determine if a CONFIG.SYS Memory "
- text "Manager has INCLUDED the CA00-CBFF memory range, but was unable"
- text "to locate a recognized memory manager (EMM386.EXE, QEMM.EXE)."
- text
- text "Please examine CONFIG.SYS, looking for a 'DEVICE=' line that"
- text "specifies a 'Memory Manager'; look for a string like this:"
- text
- text "DEVICE=C:\MEMMGR.SYS /I=CA00-CBFF"
- text
-
- menu statFDOMAINmemIsEms at 0,0 dims 25,80 bc re tc wh bo do sh na " Hmm... "
- text
- text "The memory required by the Future Domain driver is being used "
- text "as an EMS Page Frame."
- text
- text "This would cause a conflict preventing the driver from loading."
- text
- text "The CONFIG.SYS Memory Manager must be updated to either move the"
- text "EMS Page Frame to another location, or remove it entirely if EMS"
- text "is not required on your system."
- text
- text "Please examine CONFIG.SYS, looking for a 'DEVICE=' line that"
- text "specifies a 'Memory Manager'; look for a string like this:"
- text
- text "DEVICE=C:\MEMMGR.SYS /I=CA00-CBFF"
- text
-
- menu statFDOMAINmemIsRom at 0,0 dims 25,80 bc re tc wh bo do sh na " Hmm... "
- text
- text "The memory required by the Future Domain driver is already used"
- text "by a peripheral device (such as a scanner, or other non-standard "
- text "device); a ROM chip was detected in the CA00-CBFF range."
- text
- text "This would cause a conflict preventing the driver from loading."
- text
- text "There is little that can be done about this, short of removing"
- text "the conflicting card from the system."
- text
-
- ENDCOMM
-
- #############################################################
- ### LookCDROMAutoex - look at the CDROM CONFIG.SYS line
-
- menu LookCDROMAutoex dims 25,80 bc bla tc wh bo do name " Manually Verify AUTOEXEC.BAT "
- runscript FindCDROMAutoex
- item at -1,-1 " Edit the CDROM Driver Line in AUTOEXEC.BAT " script MakeAUTOEXCDROM
- item at ,-1 " Diagnose CDROM Driver AUTOEXEC.BAT Problems " script diagAUTOEXCDROM
-
- menu needAUTOEXCDROM at -1,-1 bc re tc wh na " AUTOEXEC.BAT missing MSCDEX Driver "
- text
- text "Unable to locate the MSCDEX Driver in AUTOEXEC.BAT"
- text
- text "A line must be added to AUTOEXEC.BAT to load the CDROM driver."
- text
- text "Would you like to do this now? "
- text
- item " Yes, show me... " at 8,10 return 1 script makeAUTOEXCDROM
- item " No, thank you. " at 8,40 return 1
-
- script buildAUTOEXCDROMline
- if issame "${v_mscdex}" "" set v_mscdex "mscdex.exe"
- # if isequal $var_AUTOEXCDROMfound 0 then
- set sedit_AUTOEXCDROM "modify"
- # else
- # set sedit_AUTOEXCDROM "substitute"
- # endif
- local x type str "${v_namcdromd1}"
- if issame "${x}" "" set x "$def_devcdrom"
- set nam_AUTOEXcddev1 "${x}"
- if issame "${lin_AUTOEXCDROM}" "" then
- set lin_AUTOEXCDROM `pwd
- set lin_AUTOEXCDROM ${lin_AUTOEXCDROM}:h
- set lin_AUTOEXCDROM "${lin_AUTOEXCDROM}\${v_mscdex} /D:${nam_AUTOEXcddev1} /M:10 /V /E"
- endif
-
- script makeAUTOEXCDROM
- runscript buildAUTOEXCDROMline
- runmenu makeAUTOEXCDROM
- runmenu addAUTOEXCDROM
- return
-
- menu makeAUTOEXCDROM at -1,-1 dims 7,75 bc bla tc wh na " Build AUTOEXEC.BAT CDROM Driver Line " noescape
- text
- text "Edit the line below, until you are satisfied, then continue:"
- text
- item $lin_AUTOEXCDROM dims 1,70 onkey script "getTextLine lin_AUTOEXCDROM"
- text
-
- menu addAUTOEXCDROM at -1,-1 dims 9,75 bc bla tc wh na " Add CDROM Driver Line to AUTOEXEC.BAT " noescape
- text
- display lin_AUTOEXCDROM dims 2,65 bc blu tc wh
- text
- text
- item at ,-1 " Yes, add to AUTOEXEC.BAT... " script addAUTOEXCDROM return 1
- item at ,-1 " No, I'll do it myself! " script clrAUTOEXCDROM return 1
- text
-
- script addAUTOEXCDROM
- local name type str ""
- set name ${v_mscdex}:r
- sedit -awnqB ${v_bootdrv}${v_bootdir} autoexec.bat $name "${lin_AUTOEXCDROM}" disable
- sedit -awnqB ${v_bootdrv}${v_bootdir} autoexec.bat $name "${lin_AUTOEXCDROM}" $sedit_AUTOEXCDROM
- interrupt 2Fh ax 4A10h bx 1 # flush smartdrv
- return
-
- script clrAUTOEXCDROM
- set lin_AUTOEXCDROM ""
- set nam_AUTOEXcddev1 ""
- set nam_AUTOEXcddev2 ""
- set nam_AUTOEXcddev3 ""
- set nam_AUTOEXcddev4 ""
- return
-
- #################################################################
- ### failAUTOEXCDROM - MSCDEX program found in AUTOEXEC.BAT, but driver not loaded
- menu failAUTOEXCDROM dims 25,80 bc re tc wh na " CDROM Driver Failed in AUTOEXEC.BAT "
- text
- text "Found MSCDEX Driver in AUTOEXEC.BAT, but driver not loaded."
- text
- text "Either the machine was not rebooted after updating AUTOEXEC.BAT,"
- text "or there is some other conflict with your system resources."
- text "
- text "Would you like to diagnose the problem?"
- text
- box at -1,-1 dims 4,30
- item " Yes, figure it out... " at ,-1 return 1 script diagAUTOEXCDROM
- item " No, thank you. " at ,-1 return 1
-
- script diagAUTOEXCDROM
- if ! $var_CONFIGLASTDRIVEfound goto skiplastdrive
- runscript chkCONFIGLASTDRIVE
- :skiplastdrive
-
- if issame "${lin_CONFIGCDROM}" "" runscript FindCDROMConfig
- if issame "${lin_AUTOEXCDROM}" "" runscript FindCDROMAutoex
- if issame "${nam_AUTOEXcddev1}" "" then
- runmenu needAUTOEXCDROMdevice
- goto nextstep
- endif
- if issame "${nam_AUTOEXcddev1}" "${v_namcdromd1}" then
- runmenu diagAUTOEXCDROMOkay
- goto nextstep
- endif
- if issame "${nam_AUTOEXcddev2}" "" then
- runmenu needAUTOEXCDROMdevice
- goto nextstep
- endif
- if issame "${nam_AUTOEXcddev2}" "${v_namcdromd1}" then
- runmenu diagAUTOEXCDROMOkay
- goto nextstep
- endif
- if issame "${nam_AUTOEXcddev3}" "" then
- runmenu needAUTOEXCDROMdevice
- goto nextstep
- endif
- if issame "${nam_AUTOEXcddev3}" "${v_namcdromd1}" then
- runmenu diagAUTOEXCDROMOkay
- goto nextstep
- endif
- if issame "${nam_AUTOEXcddev4}" "" then
- runmenu needAUTOEXCDROMdevice
- goto nextstep
- endif
- if issame "${nam_AUTOEXcddev4}" "${v_namcdromd1}" then
- runmenu diagAUTOEXCDROMOkay
- goto nextstep
- endif
-
- runmenu needAUTOEXCDROMdevice
- goto nextstep
-
- :nextstep
- return
-
- menu diagAUTOEXCDROMOkay at -1,-1 bc wh tc bla bo do sh na " Okay "
- text "The AUTOEXEC.BAT CDROM Driver is Okay!"
-
- menu needAUTOEXCDROMdevice at 0,0 dims 25,80 bc re tc wh bo do sh name " Hmm... "
- text
- text "Unable to match the CONFIG.SYS and AUTOEXEC.BAT 'device names'."
- text
- text "The DEVICE= line in CONFIG.SYS and the MSCDEX line in AUTOEXEC.BAT"
- text "both require matching '/D:XXXXXXXX' names."
- text
- text "It is possible for the MSCDEX program to have multiple /D: names,"
- text "but no match was found with the /D: name in CONFIG.SYS."
- text
- text "CONFIG.SYS:"
- display lin_CONFIGCDROM dims 2,65 bc blu tc wh
- text
- text
- text "AUTOEXEC.BAT:"
- display lin_AUTOEXCDROM dims 2,65 bc blu tc wh
- text
- text
- text "Would you like to do this now? "
- text
- item "Yes, show me... " at 22,10 return 1 script makeAUTOEXCDROM
- item "No, thank you. " at 22,40 return 1
- text
-
- menu GetV_NAMCDROM at -1,-1 bc wh tc blu bo do sh na " Get CDROM Driver Name "
- text
- text "Highlight the name of the CDROM Driver you need, and press ENTER."
- text
- item " FDCD.SYS " set "v_namcdrom fdcd.sys" return 1
- item " SJCD.SYS " set "v_namcdrom sjcd.sys" return 1
- item " CDROM.SYS " set "v_namcdrom cdrom.sys" return 1
- text
-
- menu Delay5Warmboot at -1,-1 bc wh tc blu bo do sh na " System Needs Reset "
- text
- text "Changes were made to your System Configuration Files."
- text
- text "In order for these changes to take effect, the computer must be restarted."
- text
- text "Press any key to Not Reboot."
- text
- item script delay5warmboot
-
- script delay5warmboot
- outp 381h 0
- outp 305h 4Dh
- outp 306h 00h
- outp 300h FFh
-
- local x_delay type long 91
- set x_delay $x_delay + $tics
- :again
- if iskey return
- if isless $tics $x_delay goto again
- interrupt 2Fh ax 4A10h bx 1 # flush smartdrv
- warmboot
- return
-
-