

@echo off
cls
echo Cassini Game Data Entry Tool
echo.

if exist input.bat del input.bat
set ID                =Error
set GameName          =Error
set PriorityMode      =0
set EdsrShift         =1      
set VSync             =40     
set MaxTexCnt         =1000   
set BankChck          =1      
set CDWait            =1
set ADXStream         =0
set OneSectorWait     =0
set NormalSpriteCheck =0
set CharPtnChck       =0
set ScaleSpriteCheck  =0
set DistSpriteCheck   =0
set FrameWait         =150

:ID
echo Enter the Sega Saturn ISO2352 Unique CD I.D. e.g. GS-1000
input ID
wait 2
call input.bat
echo.
if exist DAT\%ID%.dat goto EXISTS

:GameName
cls
echo Enter the Sega Saturn game name. (64 characters max.)
input GameName
wait 2
call input.bat
echo.

:PriorityMode
cls
echo Enter the graphic priority mode. (0 or 1, 1 normal)
input PriorityMode
wait 2
call input.bat
echo.

:EdsrShift
cls
echo EDSR pixel Shift. (1-6, 0 normal)
input EdsrShift
wait 2
call input.bat
echo.

:VSync
cls
echo Enter the Vertical Synch. (0-9999, 40 normal)
input VSync
wait 2
call input.bat
echo.

:MaxTexCnt
cls
echo Enter the graphic textures level. (0-9999, 1000 normal)
input MaxTexCnt
wait 2
call input.bat
echo.

:BankChck
cls
echo Enter Bank Checking. (0 or 1, 1 normal)
input BankChck
wait 2
call input.bat
echo.

:CDWait
cls
echo Enter the CD mode. (0-12, 1 normal)
input CDWait
wait 2
call input.bat
echo.

:ADXStream
cls
echo Enter ADX Stream mode. (0 or 1, 0 normal)
input ADXStream
wait 2
call input.bat
echo.

:OneSectorWait
cls
echo Enter the One Sector Wait mode. ((0 or 1, 0 normal)
input OneSectorWait
wait 2
call input.bat
echo.

:NormalSpriteCheck
cls
echo Enter the Normal Sprite Check mode. (0 or 1, 0 normal)
input NormalSpriteCheck
wait 2
call input.bat
echo.

:CharPtnChck
cls
echo Enter the Character Position Check mode. (0 or 1, 0 normal)
input CharPtnChck
wait 2
call input.bat
echo.

:ScaleSpriteCheck
cls
echo Enter the Scale Sprite Check mode. (0 or 1, 0 normal)
input ScaleSpriteCheck
wait 2
call input.bat
echo.

:DistSpriteCheck
cls
echo Enter the Distance Sprite Check mode. (0 or 1, 0 normal)
input DistSpriteCheck
wait 2
call input.bat
echo.

:FrameWait
cls
echo Enter the Frame Wait. (0-166, 150 normal)
input FrameWait
wait 2
call input.bat
echo.
 

goto PROCESS


:EXISTS
echo You have selected a game ID that already has an entry.
echo Check the unique I.D. or
echo use the EDIT EXISTING option instead.
goto EXIT

:PROCESS
cls
echo All information needed for a new game entry ready.
echo Please review this information.
echo If correct, proceed with saving, otherwise edit.
echo.
echo.

echo ;%GameName%
echo [%ID%]
echo PriorityMode      =%PriorityMode%
echo EdsrShift         =%EdsrShift%          
echo VSync             =%VSync%              
echo MaxTexCnt         =%MaxTexCnt%          
echo BankChck          =%BankChck%           
echo CDWait            =%CDWait%            
echo ADXStream         =%ADXStream%         
echo OneSectorWait     =%OneSectorWait%     
echo NormalSpriteCheck =%NormalSpriteCheck% 
echo CharPtnChck       =%CharPtnChck%       
echo ScaleSpriteCheck  =%ScaleSpriteCheck%  
echo DistSpriteCheck   =%DistSpriteCheck%   
echo FrameWait         =%FrameWait%          
echo.

Choice Create this game entry
IF ERRORLEVEL 2 goto ABORT
IF ERRORLEVEL 1 goto CREATE
echo %errorlevel%
pause
goto PROCESS

:ABORT
echo You have chosen to abandon this entry.
Choice ABANDON this game entry 
IF ERRORLEVEL 2 goto PROCESS
IF ERRORLEVEL 1 goto EXIT
echo %errorlevel%
pause
goto PROCESS

:CREATE

echo ;%GameName% > DAT\%ID%.dat
echo [%ID%] >> DAT\%ID%.dat
echo PriorityMode      =%PriorityMode% >> DAT\%ID%.dat
echo EdsrShift         =%EdsrShift% >> DAT\%ID%.dat          
echo VSync             =%VSync% >> DAT\%ID%.dat              
echo MaxTexCnt         =%MaxTexCnt% >> DAT\%ID%.dat          
echo BankChck          =%BankChck% >> DAT\%ID%.dat           
echo CDWait            =%CDWait% >> DAT\%ID%.dat            
echo ADXStream         =%ADXStream% >> DAT\%ID%.dat         
echo OneSectorWait     =%OneSectorWait% >> DAT\%ID%.dat     
echo NormalSpriteCheck =%NormalSpriteCheck% >> DAT\%ID%.dat 
echo CharPtnChck       =%CharPtnChck% >> DAT\%ID%.dat       
echo ScaleSpriteCheck  =%ScaleSpriteCheck% >> DAT\%ID%.dat  
echo DistSpriteCheck   =%DistSpriteCheck% >> DAT\%ID%.dat   
echo FrameWait         =%FrameWait% >> DAT\%ID%.dat          
echo. >> DAT\%ID%.dat

echo The new game entry has been created.
echo Don't forget to COMPILE the entries to create the new GAMES.DAT

:EXIT
pause
