@echo on
cd %2
\Utils\spasm\spasm32 -T -E %1 \BuildT84\prog.8xp
if not "%errorlevel%"=="0" goto Abandon

cd \Emu\CEmu\

copy \Emu\CEmu\settings\cemu_image.ce \Emu\CEmu\cemu_image.ce
copy \Emu\CEmu\settings\cemu_config.ini \Emu\CEmu\cemu_config.ini

Cemu.exe -r ti-84ce.rom -g %cd:~0,1%:\Emu\CEmu\cemu_config.ini -m \BuildT84\prog.8xp --no-reset
:Abandon
if "%3"=="nopause" exit
pause
