@REM Windows Start Script for Altirra
@ECHO OFF
setlocal
set RELEASE=SillyPack2k17
if exist Altirra\Altirra.exe goto :demo
ECHO Unpack the contents of the archive to a folder and run %RELEASE%.bat from there.
pause
goto :EOF

:demo
cd >%TEMP%\cwd.txt
set /P IMG_PATH=<%TEMP%\cwd.txt
set IMG_PATH=%IMG_PATH:\=\\\\%
copy /Y Altirra\Altirra-Original.ini Altirra\Altirra.ini
echo "Devices" = "[{\"tag\": \"side2\",\"children\": [{\"tag\": \"hdrawimage\",\"params\": {\"write_enabled\": false,\"cylinders\": 133,\"sectors_per_track\": 63,\"sectors\": 125685,\"heads\": 15,\"solid_state\": true,\"path\": \"%IMG_PATH%\\\\SillyPack2k17-WePlash.img\"}}]}]" >>Altirra\Altirra.ini

start Altirra\Altirra.exe /portable /f /run:SillyPack2k17-WePlash.xex
exit
