@echo off
echo ---- Sound card setup for the demo version of Nomad ----
echo.
if "empty"%1=="empty" goto usage
if "empty"%2=="empty" goto usage
set parm1=
set parm2=
if %1 == 2 set parm1=2
if %1 == 3 set parm1=3
if %1 == 5 set parm1=5
if %1 == 7 set parm1=7
if %1 == 10 set parm1=1
if %2 == 210 set parm2=1
if %2 == 220 set parm2=2
if %2 == 230 set parm2=3
if %2 == 240 set parm2=4
if %2 == 250 set parm2=5
if %2 == 260 set parm2=6
if "empty"%parm1%=="empty" goto intusage
if "empty"%parm2%=="empty" goto portusage
echo sb%parm2%%parm1% > nomad.cfg
echo Setup Successful
goto end
:intusage
echo You did not enter a valid interrupt number
goto valid
:portusage
echo You did not enter a valid port address
goto valid
:usage
echo If you have a Sound Blaster or compatible sound card,
echo you can use this batch file to setup your sound card for
echo use with this demo.
echo.
echo To use this batch file, invoke it with the following
echo parameters :
echo.
echo setup [interrupt number] [port address]
:valid
echo.
echo Valid interrupt numbers are 2, 3, 5, 7, 10.
echo  (the default interrupt number for most cards is 7)
echo Valid port addresses are 210, 220, 230, 240, 250, 260.
echo  (the default port address for most cars is 220)
:end
