;********************************
;* CCS64 v1.09 DOS GEMUS Script *
;*       by James Burrows       *
;*         25 July 2001         *
;********************************
;
; Emulator File:	CCSDPMI.EXE
; Associated File (1):	C64.CFG
; Use Short Filenames:	YES
; File Types:           D64;T64;PRG;P00


If GameType CONTAINS(t64||prg||p00||d64)

	;load the selected game image
	Add_CLP(ccs64.exe %gamepathfile%)
	If GameType CONTAINS(t64||d64)
		Add_CLP(,%imageindex%)
	End If

	;set the game control options
	Set_CFG_Value(1||$LOADPATH||%gamepath%)
	If Control = JoyPort1
		Set_CFG_Value(1||$JOYSTICK1PC||0)
		Set_CFG_Value(1||$JOYSTICK2PC||1)
		Set_CFG_Value(1||$JOYSTICK1KEY||2)
		Set_CFG_Value(1||$JOYSTICK2KEY||1)
	Else
		Set_CFG_Value(1||$JOYSTICK1PC||1)
		Set_CFG_Value(1||$JOYSTICK2PC||0)
		Set_CFG_Value(1||$JOYSTICK1KEY||1)
		Set_CFG_Value(1||$JOYSTICK2KEY||2)
	End If

	;run the emulator
	Run_Emulator(DOSCLOSE)
Else
	;invalid game file type
	Show_Message(GAME_NOT_SUPPORTED%crlfx2%Supported types: D64, T64, P00, PRG)
End If
