@echo Converting %1.PSC to %1.PSB
@echo >\temp.txt dw %1_background_coll-pt,%1_background_ladder-pt,%1_polypoints-pt,%1_behind-pt
@echo >\temp1.txt dw %1_sprite_coll-pt,%1_gens-pt,%1_track-pt,%1_pickups-pt,%1_firostart-pt
@echo >\temp2.txt dw %1_klawdstart-pt,%1_scits-pt
@copy %1.psc \

@if not exist %1.txt echo >\overlays.txt ;
@if exist %1.txt copy %1.txt \overlays.txt

@if not exist %1.s echo >\trail.txt ;
@if exist %1.s echo >\trail.txt include "%1.s"

echo >\temp3.txt #include "/%1.psc"
copy c:\psx\firo\source\psc2psb.h \
asmpsx /l /o c+ /x c:\psx\firo\source\psc2psb.s,psc2psb.obj
ccpsx -O2 -Xo$0 -comments-c++ psc2psb.obj c:\psx\firo\source\psc2psb.c -opsc2psb.cpe
echo All Compiling Done!
REM pause
erase \%1.psc
erase \overlays.txt
erase \psc2psb.h
erase \temp.txt
erase \temp1.txt
erase \temp2.txt
erase \temp3.txt
erase \trail.txt
REM pause
erase psc2psb.obj
erase %1.psb
cpe2x psc2psb.cpe
erase psc2psb.cpe
REM pause
echo Now clipping front and back of binary
chopfile psc2psb.exe  /SSTARTOFFILE /EENDOFFILE
rename psc2psb!.exe %1.psb
erase psc2psb.exe
echo %1.PSB  all done!

