@echo off
if %3x == x goto USAGE
if %2 == 1 goto EGA
if %2 == 5 goto UGA
if %2 == 6 goto UGABW
if %2 == 7 goto VIDEO7
if %2 == 16 goto VMI

goto VGA800

:USAGE
echo.
echo USAGE : vga8 config_file_name parameter config.sc
echo.
echo     where parameter is as follows
echo          1 -- EGA
echo          5 -- Metheus
echo          6 -- Metheus (Gray Scale)
echo          7 -- Video 7 800x600
echo         xx -- number to switch that card into 800x600 mode
echo.

goto  EXIT

:EGA
sed -e "s/vga_e   /ega350_e/" %1 > edc.$$$
goto DONE

:UGA
sed -e "s/vga_e/uga  /" %1 > edc.$$$
goto DONE

:UGABW
sed -e "s/vga_e  /uga_b&w/" %1 > edc.$$$
goto DONE

:VIDEO7
sed -e "s/vga_e   /vga8v7_e/" %1 > edc.$$$
goto DONE

:VMI
sed -e "s/vga_e/vmi  /" %1 > edc.$$$
goto DONE

:VGA800
sed -e "s/vga_e      /vga800_e %2/" %1 > edc.$$$
goto DONE


:DONE
mv edc.$$$  %3
goto EXIT


:EXIT


