@echo --------------------------------------------------------------------------
@echo 	Keith's Z80 Dev Toolkit - Please see the Readme for instructions!
@echo --------------------------------------------------------------------------
@echo 			Start Ti-83 Calculator V1.0
@echo. 			
@echo 		This tool loads your program on the TI calculator
@echo       Due to licensing you must have the correct rom and set up 
@echo                         the emulator with it
@echo --------------------------------------------------------------------------

cd BldTi
..\Utils\bin28xp.exe program.bin --unprotected --nocomment
copy program.8xp ..\RelTi

if not exist ..\Emu\LaunchWabbitemu.sav goto Setup

cd ..\Emu\Wabbitemu\
copy ..\LaunchWabbitemu.sav ..\Wabbitemuwabbitemu.sav
Wabbitemu.exe ..\Wabbitemuwabbitemu.sav  ..\..\RelTi\program.8xp
..\..\utils\sleep 60
goto end

:Setup
@echo off
cls
Echo *** Set up WabbitEmu with a rom - and save a savestate to...  ***
echo *** \Emu\LaunchWabbitemu.sav ***
pause
cd ..\Emu\Wabbitemu\
Wabbitemu.exe
..\utils\sleep 60
:end