@echo off
if "%1"=="" goto noinput
del BIOS.*
romchk %1
IF ERRORLEVEL 1 GOTO SPI
copy /b %1+flashint.1mb BIOS.1mb
phlash16 /mfg /mode=3 /s /x /BBL /C BIOS.1mb %2 %3
goto end

:SPI
copy /b %1+%1+flashint.2mb BIOS.2mb
phlash16 /mfg /mode=3 /s /x /BBL /C BIOS.2mb %2 %3
goto end

:noinput
echo Please input the ROM file name!

:end
