@echo off
echo FLASH Version 1.00    flash utility program for DTL-H2700
if "%1" == "" goto usage
if "%2" == "-p" goto addr
goto exec
:addr
if "%3" == "" goto usage
:exec
echo local mode27 rom >util\init
echo local dipsw 2 >>util\init
echo local reset >>util\init
echo local wait-prompt >>util\init
echo local down2 util\cleanmem >>util\init
echo call >>util\init
echo local wait-prompt >>util\init
echo local bload %1 200000 >>util\init
echo local down2 util\pflash >>util\init
echo call >>util\init
echo local wait-prompt >>util\init
echo local mode27 flash >>util\init
echo local quit >>util\init

util\psxcons %2%3 -h util\init
echo end
goto end
:usage
echo usage: flash filename [-p I/O_adr]
:end
