Need Help with Script EP64/128

Do you have trouble to set-up your emulator for a platform?, need a script?...ask here, we might be able to help you!
User avatar
Vicman
PLATINUM member
Posts: 1233
Joined: 17 Jun 2007, 16:12
Location: Germany,Bochum

Need Help with Script EP64/128

Unread post by Vicman » 14 Feb 2011, 20:16

The ep128emulator don't find the config-file.....(by using [cfg01] in MetaInfoid)
What's wrong in this Script ? What's the correct commandline ?

; ------------------------------------------------------------------------------
; BEGIN OF SCRIPT
; ------------------------------------------------------------------------------
Dim $CmdParameter = " "

If $eccMetaInfoId = "[cfg01]" then $CmdParameter = "-cfg $eccEmuEmulatorPath\01.cfg -floppy.a.imageFile="" -fileio.workingDirectory="E:\eCC\ecc-user\#_AUTO_UNPACKED\enterprise "
If $eccMetaInfoId = "[02]" then $CmdParameter = " -cfg cfg.02 "
If $eccMetaInfoId = "[03]" then $CmdParameter = " -cfg cfg.03 "
If $eccMetaInfoId = "[04]" then $CmdParameter = " -cfg cfg.04 "
If $eccMetaInfoId = "[05]" then $CmdParameter = " -cfg cfg.05 "
If $eccMetaInfoId = "[06]" then $CmdParameter = " -cfg cfg.06 "
If $eccMetaInfoId = "[07]" then $CmdParameter = " -cfg cfg.07 "
If $eccMetaInfoId = "[08]" then $CmdParameter = " -cfg cfg.08 "

Run($Emulator & " " & $CmdParameter & $RomFile)
EmuWindowControl("ep128emu")
AutoItSetOption("SendKeyDownDelay", 100)
Sleep(3000)
Send("{ENTER}")
Sleep(2000)
Send("{ALT down}")
Send("{f}")
Send("{ALT up}")
Sleep(200)
Send("{TAB}")
Sleep(300)
AutoItSetOption("SendKeyDownDelay", 1)
Send($eccFileRomPath)
Send("{ENTER}")
AutoItSetOption("SendKeyDownDelay", 100)
Send("{F1}")
Sleep(300)
AutoItSetOption("SendKeyDownDelay", 1)
Send($eccFileRomFile)
Send("{ENTER}")
; ------------------------------------------------------------------------------
; END OF SCRIPT
; ------------------------------------------------------------------------------
Exit



This is a part of a GameBase GEMUS-Script.....and it works.....

Add_CLP(-cfg %emupath%\01.cfg -floppy.a.imageFile="" -fileio.workingDirectory="E:\eCC\ecc-user\#_AUTO_UNPACKED\enterprise")
Run_Emulator_Send_Keys([3]{Enter}[2]{F1}[-1][1]%gamepathfile%[-20]{Enter}||50)
imagepacks:
Done: Vic20, N64, Philips VG-5000 G7000 G7400, SordM5, Amstrad GX4000, Enterprise 64/128
Progress: Atari 8bit, Dosbox, Exelvision EXL 100
Vicman's eCC-Clips on You Tube

User avatar
Vicman
PLATINUM member
Posts: 1233
Joined: 17 Jun 2007, 16:12
Location: Germany,Bochum

Re: Need Help with Script EP64/128

Unread post by Vicman » 15 Feb 2011, 07:19

Maybe this helps for making an eCC-Script :

here's my complete GEMUS-Script by using pre-configured *.cfg's :
Spoiler: show
;***************************************
;* GEMUS SCRIPT FOR Enterprise 64/128 *
;* *
;* Version 1.0 *
;* *
;* created by Vicman in Jan.2011 *
;* *
;***************************************



;********************************************************
;* 'cause diff. config.cfg's are needed for the Games, *
;* *
;* i've created 9 cfg's. *
;* *
;* (stored in the Emu-Folder config/gamebase_ep) *
;* *
;* They works fine with this Script. *
;* *
;* Your %gbgamepath% must be Set to C:/GBGame/0 *
;* *
;* (where GameBase extracts and runs game files) *
;* *
;* otherwise you have to edit this script manually *
;********************************************************




; 1.Runs the Emulator with 640k RAM instead 128k (ca. 60 Games)
;--------------------------------------------------------------------
If Key_config CONTAINS(EP640k)
Add_CLP(-cfg %emupath%\config\gamebase_ep\1_EP_640k_Tape_FileIO_TASMON_UK.cfg floppy.a.imageFile="" fileio.workingDirectory="C:/gbgame/0")
Run_Emulator_Send_Keys([4]{Enter}[2]{F1}[-1][1]%gamepathfile%[-20]{Enter}[1]||50)



; 2.Run basic-files wich needs the "zrom" (ca. 35 Games)
;---------------------------------------------------------
ElseIf Key_config CONTAINS(zrom2)
Add_CLP(-cfg %emupath%\config\gamebase_ep\2_EP_128k_Tape_FileIO_TASMON_ZROM.cfg floppy.a.imageFile="" fileio.workingDirectory="C:/gbgame/0")
Run_Emulator_Send_Keys([3]{Enter}[3]{F1}[-1][1]%gamepathfile%[-20]{Enter}[1]||50)



; 3.Run Tapefile with hungarian-config 128k (VIC20-Emulator and Game "Mad Mix 2")
;---------------------------------------------------------------------------------
ElseIf Key_config CONTAINS(128k-Hun)
Add_CLP(-cfg %emupath%\config\gamebase_ep\3_EP_128k_Tape_FileIO_TASMON_HUN.cfg floppy.a.imageFile="" fileio.workingDirectory="C:/gbgame/0")
Run_Emulator_Send_Keys([3]{Enter}[2]{F1}[-1][1]%gamepathfile%[-20]{Enter}[1]||50)



; 4.Run Files wich needs the "brd.rom" (ca. 14 Basic-Games)
;-----------------------------------------------------------
ElseIf Key_config CONTAINS(brd)
Add_CLP(-cfg %emupath%\config\gamebase_ep\4_EP_128k_Tape_FileIO_TASMON_BRD.cfg floppy.a.imageFile="" fileio.workingDirectory="C:/gbgame/0")
Run_Emulator_Send_Keys([3]{Enter}[3]{F1}[-1][1]%gamepathfile%[-20]{Enter}[1]||50)



; 5.Run Files wich needs "EXDOS.rom" (Game Sokoban 1 & Sokoban 2 only)
;---------------------------------------------------------------------
ElseIf Key_config CONTAINS(exdos)
Add_CLP(-cfg %emupath%\config\gamebase_ep\5_EP_128k_Tape_FileIO_TASMON_EXDOS_UK.cfg floppy.a.imageFile="" fileio.workingDirectory="C:/gbgame/0")
Run_Emulator_Send_Keys([3]{Enter}[6]{F1}[-1][1]%gamepathfile%[-20]{Enter}[1]||50)



; 6.Run Emulator with ISDOS (Seastalker, Sokoban 4k)
;---------------------------------------------------------------------
ElseIf Key_config CONTAINS(isdos)
Add_CLP(-cfg %emupath%\config\gamebase_ep\6_EP_128k_Tape_FileIO_TASMON__ISDOS_UK.cfg floppy.a.imageFile="C:/GBGame/0/DISK.IMG" fileio.workingDirectory="C:/gbgame/0")
Run_Emulator_Send_Keys([3]{Enter}[5]äisdos{Enter}[3]%gamename_value%{Enter}[1]||80)



;7.Run Disk-Images (autostart / without Program loader)
; ---------------------------------------------------------
ElseIf Key_auto CONTAINS(yes||1)

Add_CLP(-cfg %emupath%\config\gamebase_ep\7_EP_128k_EXDOS_UK.cfg floppy.a.imageFile="C:/GBGame/0/GAMES_01.IMG" fileio.workingDirectory="C:/gbgame/0")
Run_Emulator_Send_Keys([3]{Enter}[5][-25]load{C34}%gamename_value%{C34}{Enter}||80)



;7.Run Disk-Images (slideshow or with Program loader/menue)
; ---------------------------------------------------------
ElseIf GameType CONTAINS(img)
Add_CLP(-cfg %emupath%\config\gamebase_ep\7_EP_128k_EXDOS_UK.cfg floppy.a.imageFile="C:/GBGame/0/GAMES_01.IMG" fileio.workingDirectory="C:/gbgame/0")
Run_Emulator_Send_Keys([3]{Enter}||80)



;9.Run Game in Enterprise wich needs typing j ""
;----------------------------------------------
ElseIf Key_load CONTAINS(tape)
Add_CLP(-cfg %emupath%\config\gamebase_ep\9_EP_128k_Tape_FileIO_TASMON_UK_swapping_keyboard.cfg floppy.a.imageFile="" fileio.workingDirectory="C:/gbgame/0")
Run_Emulator_Send_Keys([3]{Enter}[2]{F1}[-1][1]%gamepathfile%[-20]{Enter}[-100][4]jPP{Enter}||50)



;********************************************************************************************
;* To Autorun the Games in the 4 Emulators [CPC,VIC20,TVC & ZX81] INSIDE the Emu EP128, *
;* *
;* i have decided to use a "Snapshotfile" of the "Emulated Emulator" *
;* *
;* The Games will be load, by using the %gamename_value% - Feature *
;********************************************************************************************


;Run Game in the Enterprise Amstrad-Emulator
;-------------------------------------------
ElseIf Key_emulator CONTAINS(cpc)
Add_CLP(-cfg %emupath%\config\gamebase_ep\8_EP_128k_Tape_FileIO_TASMON_UK.cfg -snapshot %gamepathfile% floppy.a.imageFile="" fileio.workingDirectory="C:/gbgame/0")
Run_Emulator_Send_Keys([1]%gamename_value%{Enter}||50)



;Run Game in Enterprise Vic20-Emulator
;-------------------------------------
ElseIf Key_emulator CONTAINS(vic20)
Add_CLP(-cfg %emupath%\config\gamebase_ep\8_EP_128k_Tape_FileIO_TASMON_UK.cfg -snapshot %gamepathfile% floppy.a.imageFile="" fileio.workingDirectory="C:/gbgame/0")
Run_Emulator_Send_Keys([1]{F6}[1][-1]%gamename_value%[-50]{Enter}[1]run{Enter}||50)


;Run Game in Enterprise TVC-Emulator
;-----------------------------------
ElseIf Key_emulator CONTAINS(tvc)
Add_CLP(-cfg %emupath%\config\gamebase_ep\8_EP_128k_Tape_FileIO_TASMON_UK.cfg -snapshot %gamepathfile% floppy.a.imageFile="" fileio.workingDirectory="C:/gbgame/0")
Run_Emulator_Send_Keys([1]%gamename_value%{Enter}||80)


;Run Game in Enterprise ZX81-Emulator
;------------------------------------
ElseIf Key_emulator CONTAINS(zx81)
Add_CLP(-cfg %emupath%\config\gamebase_ep\8_EP_128k_Tape_FileIO_TASMON_UK.cfg -snapshot %gamepathfile% floppy.a.imageFile="" fileio.workingDirectory="C:/gbgame/0")
Run_Emulator_Send_Keys([2]{Enter}[2][-1]%gamename_value%[-80]{Enter}[2]r{Enter}||80)



;**********************************************************
;* At last the Standard-Settings for all other files *
;**********************************************************

;8.Run all other files
;--------------------
Else
Add_CLP(-cfg %emupath%\config\gamebase_ep\8_EP_128k_Tape_FileIO_TASMON_UK.cfg floppy.a.imageFile="" fileio.workingDirectory="C:/gbgame/0")
Run_Emulator_Send_Keys([3]{Enter}[2]{F1}[-1][1]%gamepathfile%[-20]{Enter}||50)

End If
and this is a GEMUS-Script by using the "Set_CFG_Item - Function" (made by a GB64-Forum-Member.....much more comfortable)
Spoiler: show
;***************************************
;* GEMUS SCRIPT FOR Enterprise 64/128 *
;* *
;* Version 2.0 *
;* *
;* created by .mad.in Jan.2011 *
;* *
;***************************************

;********************************************************
;* 'cause diff. config.cfg's are needed for the Games, *
;* *
;* this script use the "Set_CFG_Item - Function" *
;* *
;* the gb.cfg will be created in the folder : *
;* *
;* GameBase/Enterprise/Emulator/ep128emu2/gb.cfg *
;* *
;* Your %gbgamepath% must be Set to C:/GBGame/0 *
;* *
;* (where GameBase extracts and runs game files) *
;* *
;* otherwise you have to edit this script manually *
;********************************************************
;---------------------------------------------------------------------------------
;Setup Working Path = Must be Gamebase Unzip Path.
;Alternative commands that work, if you want to move the Gamebase path.
;---------------------------------------------------------------------------------
; Set_CFG_Item(1||fileio.workingDirectory||%tab%||"C:/gbgame/0")
; Add_CLP(-fileio.workingDirectory="C:/GBGame/0")

; Set_CFG_Item(1||floppy.a.imageFile||%tab%||"C:/GBGAME/0/GAMES_01.IMG")
; Add_CLP(-floppy.a.imageFile="C:/GBGame/0/GAMES_01.IMG")

; Set_CFG_Item(%emupath%\config-gb\test.cfg||floppy.a.imageFile||%tab%||%floppy.a.imageFile_value%)
; Set_CFG_Item(%emupath%\config-gb\test.cfg||floppy.a.imageFile||%tab%||"E:/GBGame/0/GAMES_01.IMG")
; Add_CLP(-cfg gb.cfg -fileio.workingDirectory="C:/GBGame/0" -floppy.a.imageFile="C:/GBGame/0/GAMES_01.IMG")

;--------------------------------------------------
;START of SCRIPT - Eject any Floppy before running.
;--------------------------------------------------
Set_CFG_Item(1||floppy.a.imageFile||%tab%||"")

;---------------------------------------------------------------------------------
; Virtual Machine Settings (Clock Speed) ** Future Use **
;---------------------------------------------------------------------------------
;Set_CFG_Item(1||vm.cpuClockFrequency||%tab%||4000000)
;Set_CFG_Item(1||vm.enableFileIO||%tab%||Yes)
;Set_CFG_Item(1||vm.enableMemoryTimingEmulation||%tab%||Yes)
;Set_CFG_Item(1||vm.processPriority||%tab%||0)
;Set_CFG_Item(1||vm.soundClockFrequency||%tab%||500000)
;Set_CFG_Item(1||vm.speedPercentage||%tab%||100)
;Set_CFG_Item(1||vm.videoClockFrequency||%tab%||889846)

;---------------------------------------------------------------------------------
; Default Tape Settings ** Future Use **
;---------------------------------------------------------------------------------
;Set_CFG_Item(1||tape.imageFile||%tab%||"")

;Set_CFG_Item(1||tape.defaultSampleRate||%tab%||24000)
;Set_CFG_Item(1||tape.enableSoundFileFilter||%tab%||No)
;Set_CFG_Item(1||tape.soundFileChannel||%tab%||0)
;Set_CFG_Item(1||tape.soundFileFilterMaxFreq||%tab%||5000)
;Set_CFG_Item(1||tape.soundFileFilterMinFreq||%tab%||500)
;---------------------------------------------------------------------------------
; Floppy /IDE Disk Settings ** Future Use **
;---------------------------------------------------------------------------------
;Set_CFG_Item(1||floppy.a.imageFile||%tab%||"")

;Set_CFG_Item(1||floppy.a.sectorsPerTrack||%tab%||-1)
;Set_CFG_Item(1||floppy.a.sides||%tab%||-1)
;Set_CFG_Item(1||floppy.a.tracks||%tab%||-1)

;Set_CFG_Item(1||floppy.b.imageFile||%tab%||"")
;Set_CFG_Item(1||floppy.b.sectorsPerTrack||%tab%||-1)
;Set_CFG_Item(1||floppy.b.sides||%tab%||-1)
;Set_CFG_Item(1||floppy.b.tracks||%tab%||-1)

;Set_CFG_Item(1||floppy.c.imageFile||%tab%||"")
;Set_CFG_Item(1||floppy.c.sectorsPerTrack||%tab%||-1)
;Set_CFG_Item(1||floppy.c.sides||%tab%||-1)
;Set_CFG_Item(1||floppy.c.tracks||%tab%||-1)

;Set_CFG_Item(1||floppy.d.imageFile||%tab%||"")
;Set_CFG_Item(1||floppy.d.sectorsPerTrack||%tab%||-1)
;Set_CFG_Item(1||floppy.d.sides||%tab%||-1)
;Set_CFG_Item(1||floppy.d.tracks||%tab%||-1)

;Set_CFG_Item(1||ide.imageFile0||%tab%||"")
;Set_CFG_Item(1||ide.imageFile1||%tab%||"")
;Set_CFG_Item(1||ide.imageFile2||%tab%||"")
;Set_CFG_Item(1||ide.imageFile3||%tab%||"")

;---------------------------------------------------------------------------------
; Default Joystick Settings ** Future Use **
;---------------------------------------------------------------------------------
;If Key_Joysick CONTAINS(*)
;Set_CFG_Item(1||joystick.autoFireFrequency||%tab%||8)
;Set_CFG_Item(1||joystick.autoFirePulseWidth||%tab%||0.5)
;Set_CFG_Item(1||joystick.axisThreshold||%tab%||0.5)
;Set_CFG_Item(1||joystick.enableAutoFire||%tab%||No)
;Set_CFG_Item(1||joystick.enableJoystick||%tab%||Yes)
;Set_CFG_Item(1||joystick.enablePWM||%tab%||No)
;Set_CFG_Item(1||joystick.pwmFrequency||%tab%||17.5)
;End IF

;---------------------------------------------------------------------------------
; Joystick (Internal) Mapped to Cursor Keys & SPACE or (Enter for some Games)
;---------------------------------------------------------------------------------
If Control = JoyPort2

Set_CFG_Item(1||keyboard.70.0||%tab%||65465)
Set_CFG_Item(1||keyboard.70.1||%tab%||49153)
Set_CFG_Item(1||keyboard.71.0||%tab%||65463)
Set_CFG_Item(1||keyboard.71.1||%tab%||49152)
Set_CFG_Item(1||keyboard.72.0||%tab%||65461)
Set_CFG_Item(1||keyboard.72.1||%tab%||49155)
Set_CFG_Item(1||keyboard.73.0||%tab%||65455)
Set_CFG_Item(1||keyboard.73.1||%tab%||49154)
Set_CFG_Item(1||keyboard.74.0||%tab%||65451)
Set_CFG_Item(1||keyboard.74.1||%tab%||49168)
Set_CFG_Item(1||keyboard.75.0||%tab%||-1)
Set_CFG_Item(1||keyboard.75.1||%tab%||-1)
Set_CFG_Item(1||keyboard.76.0||%tab%||-1)
Set_CFG_Item(1||keyboard.76.1||%tab%||-1)
Set_CFG_Item(1||keyboard.77.0||%tab%||-1)
Set_CFG_Item(1||keyboard.77.1||%tab%||-1)
Set_CFG_Item(1||keyboard.78.0||%tab%||65462)
Set_CFG_Item(1||keyboard.78.1||%tab%||49157)
Set_CFG_Item(1||keyboard.79.0||%tab%||65460)
Set_CFG_Item(1||keyboard.79.1||%tab%||49156)
Set_CFG_Item(1||keyboard.7A.0||%tab%||65458)
Set_CFG_Item(1||keyboard.7A.1||%tab%||49159)
Set_CFG_Item(1||keyboard.7B.0||%tab%||65464)
Set_CFG_Item(1||keyboard.7B.1||%tab%||49158)
Set_CFG_Item(1||keyboard.7C.0||%tab%||65456)
Set_CFG_Item(1||keyboard.7C.1||%tab%||49169)
Set_CFG_Item(1||keyboard.7D.0||%tab%||-1)
Set_CFG_Item(1||keyboard.7D.1||%tab%||-1)
Set_CFG_Item(1||keyboard.7E.0||%tab%||-1)
Set_CFG_Item(1||keyboard.7E.1||%tab%||-1)
Set_CFG_Item(1||keyboard.7F.0||%tab%||-1)
Set_CFG_Item(1||keyboard.7F.1||%tab%||-1)

;---------------------------------------------------------------------------------
; Joystick External 1/2 USB Competition Pro and Cursor Keys Ctrl=Fire
;---------------------------------------------------------------------------------
ElseIf Key_Joy CONTAINS(EXT1)
Set_CFG_Item(1||joystick.enableJoystick||%tab%||Yes)

Set_CFG_Item(1||keyboard.70.0||%tab%||49153)
Set_CFG_Item(1||keyboard.70.1||%tab%||65363)
Set_CFG_Item(1||keyboard.71.0||%tab%||49152)
Set_CFG_Item(1||keyboard.71.1||%tab%||65361)
Set_CFG_Item(1||keyboard.72.0||%tab%||49155)
Set_CFG_Item(1||keyboard.72.1||%tab%||65364)
Set_CFG_Item(1||keyboard.73.0||%tab%||49154)
Set_CFG_Item(1||keyboard.73.1||%tab%||65362)
Set_CFG_Item(1||keyboard.74.0||%tab%||49168)
Set_CFG_Item(1||keyboard.74.1||%tab%||65508)

ElseIf Key_Joy CONTAINS(EXT2)
Set_CFG_Item(1||joystick.enableJoystick||%tab%||Yes)

Set_CFG_Item(1||keyboard.78.0||%tab%||49153)
Set_CFG_Item(1||keyboard.78.1||%tab%||65363)
Set_CFG_Item(1||keyboard.79.0||%tab%||49152)
Set_CFG_Item(1||keyboard.79.1||%tab%||65361)
Set_CFG_Item(1||keyboard.7A.0||%tab%||49155)
Set_CFG_Item(1||keyboard.7A.1||%tab%||65364)
Set_CFG_Item(1||keyboard.7B.0||%tab%||49154)
Set_CFG_Item(1||keyboard.7B.1||%tab%||65362)
Set_CFG_Item(1||keyboard.7C.0||%tab%||49168)
Set_CFG_Item(1||keyboard.7C.1||%tab%||65508)

End If

;-----------------------------------
;*** Restore SPECIAL Mapped Keys ***
;-----------------------------------
Set_CFG_Item(1||keyboard.07.0||%tab%||65505)
Set_CFG_Item(1||keyboard.07.1||%tab%||-1)
Set_CFG_Item(1||keyboard.35.0||%tab%||39)
Set_CFG_Item(1||keyboard.35.1||%tab%||-1)
Set_CFG_Item(1||keyboard.45.0||%tab%||65506)
Set_CFG_Item(1||keyboard.45.1||%tab%||-1)


;---------------------------------------------------------------------------------
; Hungarian Keyboard Settings
;---------------------------------------------------------------------------------

If Key_Keyboard CONTAINS(HU||Hungarian)

Set_CFG_Item(1||keyboard.06.0||%tab%||121)
Set_CFG_Item(1||keyboard.12.0||%tab%||122)
Set_CFG_Item(1||keyboard.2B.0||%tab%||47)
Set_CFG_Item(1||keyboard.2C.0||%tab%||96)
Set_CFG_Item(1||keyboard.43.0||%tab%||45)
Set_CFG_Item(1||keyboard.4B.0||%tab%||48)

;---------------------------------------------------------------------------------
; Reset ALL Keyboard Maped Keys in Config (USA)
;---------------------------------------------------------------------------------
Else

Set_CFG_Item(1||keyboard.06.0||%tab%||122)
Set_CFG_Item(1||keyboard.12.0||%tab%||121)
Set_CFG_Item(1||keyboard.2B.0||%tab%||45)
Set_CFG_Item(1||keyboard.2C.0||%tab%||48)
Set_CFG_Item(1||keyboard.43.0||%tab%||47)
Set_CFG_Item(1||keyboard.4B.0||%tab%||96)

End If

;---------------------------------------------------------------------------------
; Emulator Window Size small , medium, large
;---------------------------------------------------------------------------------
If Key_window CONTAINS(large)
Set_CFG_Item(1||display.height||%tab%||864)
Set_CFG_Item(1||display.width||%tab%||1152)

ElseIf Key_window CONTAINS(medium)
Set_CFG_Item(1||display.height||%tab%||576)
Set_CFG_Item(1||display.width||%tab%||768)

; set small as default (384x228)
Else
Set_CFG_Item(1||display.height||%tab%||228)
Set_CFG_Item(1||display.width||%tab%||384)
End If

;---------------------------------------------------------------------------------
; Running Tapes in Spectrum Emulator J"" (Zaxxon,Bogaboo,Cavern Fighter)
;---------------------------------------------------------------------------------
If Key_load CONTAINS(Tape)

Set_CFG_Item(1||memory.configFile||%tab%||"")
Set_CFG_Item(1||memory.ram.size||%tab%||128)
Set_CFG_Item(1||memory.rom.00.file||%tab%||"roms\\exos21.rom")
Set_CFG_Item(1||memory.rom.00.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.01.file||%tab%||"roms\\exos21.rom")
Set_CFG_Item(1||memory.rom.01.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.02.file||%tab%||"")
Set_CFG_Item(1||memory.rom.02.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.03.file||%tab%||"")
Set_CFG_Item(1||memory.rom.03.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.04.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.04.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.05.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.05.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.06.file||%tab%||"roms\\basic21.rom")
Set_CFG_Item(1||memory.rom.06.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.07.file||%tab%||"")
Set_CFG_Item(1||memory.rom.07.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.10.file||%tab%||"roms\\epfileio.rom")
Set_CFG_Item(1||memory.rom.10.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.11.file||%tab%||"")
Set_CFG_Item(1||memory.rom.11.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.12.file||%tab%||"")
Set_CFG_Item(1||memory.rom.12.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.13.file||%tab%||"")
Set_CFG_Item(1||memory.rom.13.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.20.file||%tab%||"")
Set_CFG_Item(1||memory.rom.20.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.21.file||%tab%||"")
Set_CFG_Item(1||memory.rom.21.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.22.file||%tab%||"")
Set_CFG_Item(1||memory.rom.22.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.23.file||%tab%||"")
Set_CFG_Item(1||memory.rom.23.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.30.file||%tab%||"")
Set_CFG_Item(1||memory.rom.30.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.31.file||%tab%||"")
Set_CFG_Item(1||memory.rom.31.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.32.file||%tab%||"")
Set_CFG_Item(1||memory.rom.32.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.33.file||%tab%||"")
Set_CFG_Item(1||memory.rom.33.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.40.file||%tab%||"")
Set_CFG_Item(1||memory.rom.40.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.41.file||%tab%||"")
Set_CFG_Item(1||memory.rom.41.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.42.file||%tab%||"")
Set_CFG_Item(1||memory.rom.42.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.43.file||%tab%||"")
Set_CFG_Item(1||memory.rom.43.offset||%tab%||0)

;-------------------------------------
; Swap Left and Right SHIFT Keys
;-------------------------------------
Set_CFG_Item(1||keyboard.07.0||%tab%||65506)
Set_CFG_Item(1||keyboard.45.0||%tab%||65505)

Add_CLP(-cfg gb.cfg)
Run_Emulator_Send_Keys([3]{Enter}[2]{F1}[-1][1]%gamepathfile%[-20]{Enter}[-100][2]jPP{Enter}[1]||50)

;---------------------------------------------------------------------------------
; Running DTF - Files
;---------------------------------------------------------------------------------
ElseIf GameType CONTAINS(dtf)

Set_CFG_Item(1||memory.configFile||%tab%||"")
Set_CFG_Item(1||memory.ram.size||%tab%||640)
Set_CFG_Item(1||memory.rom.00.file||%tab%||"roms\\exos232hun.rom")
Set_CFG_Item(1||memory.rom.00.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.01.file||%tab%||"roms\\exos232hun.rom")
Set_CFG_Item(1||memory.rom.01.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.02.file||%tab%||"roms\\exos232hun.rom")
Set_CFG_Item(1||memory.rom.02.offset||%tab%||32768)
Set_CFG_Item(1||memory.rom.03.file||%tab%||"roms\\exos232hun.rom")
Set_CFG_Item(1||memory.rom.03.offset||%tab%||49152)
Set_CFG_Item(1||memory.rom.04.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.04.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.05.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.05.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.06.file||%tab%||"roms\\epdos_z.rom")
Set_CFG_Item(1||memory.rom.06.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.07.file||%tab%||"roms\\epdos_z.rom")
Set_CFG_Item(1||memory.rom.07.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.10.file||%tab%||"roms\\epfileio.rom")
Set_CFG_Item(1||memory.rom.10.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.11.file||%tab%||"")
Set_CFG_Item(1||memory.rom.11.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.12.file||%tab%||"roms\\fenas12.rom")
Set_CFG_Item(1||memory.rom.12.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.13.file||%tab%||"roms\\fenas12.rom")
Set_CFG_Item(1||memory.rom.13.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.20.file||%tab%||"")
Set_CFG_Item(1||memory.rom.20.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.21.file||%tab%||"")
Set_CFG_Item(1||memory.rom.21.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.22.file||%tab%||"")
Set_CFG_Item(1||memory.rom.22.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.23.file||%tab%||"")
Set_CFG_Item(1||memory.rom.23.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.30.file||%tab%||"roms\\iview.rom")
Set_CFG_Item(1||memory.rom.30.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.31.file||%tab%||"roms\\iview.rom")
Set_CFG_Item(1||memory.rom.31.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.32.file||%tab%||"roms\\tpt.rom")
Set_CFG_Item(1||memory.rom.32.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.33.file||%tab%||"")
Set_CFG_Item(1||memory.rom.33.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.40.file||%tab%||"roms\\zt18hun.rom")
Set_CFG_Item(1||memory.rom.40.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.41.file||%tab%||"roms\\zt18hun.rom")
Set_CFG_Item(1||memory.rom.41.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.42.file||%tab%||"")
Set_CFG_Item(1||memory.rom.42.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.43.file||%tab%||"roms\\hun.rom")
Set_CFG_Item(1||memory.rom.43.offset||%tab%||0)



Add_CLP(-cfg gb.cfg)
Run_Emulator_Send_Keys([4]{Enter}[3]:dl2 %gamefile%{Enter}||50)


;---------------------------------------------------------------------------------
; 1.Runs the Emulator with 640k RAM instead 128k (ca. 60 Games)
;---------------------------------------------------------------------------------

ElseIf Key_config CONTAINS(EP640k)

Set_CFG_Item(1||memory.configFile||%tab%||"")

Set_CFG_Item(1||memory.ram.size||%tab%||640)
Set_CFG_Item(1||memory.rom.00.file||%tab%||"roms\\exos21.rom")
Set_CFG_Item(1||memory.rom.00.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.01.file||%tab%||"roms\\exos21.rom")
Set_CFG_Item(1||memory.rom.01.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.02.file||%tab%||"")
Set_CFG_Item(1||memory.rom.02.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.03.file||%tab%||"")
Set_CFG_Item(1||memory.rom.03.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.04.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.04.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.05.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.05.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.06.file||%tab%||"roms\\basic21.rom")
Set_CFG_Item(1||memory.rom.06.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.07.file||%tab%||"")
Set_CFG_Item(1||memory.rom.07.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.10.file||%tab%||"roms\\epfileio.rom")
Set_CFG_Item(1||memory.rom.10.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.11.file||%tab%||"")
Set_CFG_Item(1||memory.rom.11.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.12.file||%tab%||"")
Set_CFG_Item(1||memory.rom.12.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.13.file||%tab%||"")
Set_CFG_Item(1||memory.rom.13.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.20.file||%tab%||"")
Set_CFG_Item(1||memory.rom.20.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.21.file||%tab%||"")
Set_CFG_Item(1||memory.rom.21.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.22.file||%tab%||"")
Set_CFG_Item(1||memory.rom.22.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.23.file||%tab%||"")
Set_CFG_Item(1||memory.rom.23.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.30.file||%tab%||"")
Set_CFG_Item(1||memory.rom.30.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.31.file||%tab%||"")
Set_CFG_Item(1||memory.rom.31.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.32.file||%tab%||"")
Set_CFG_Item(1||memory.rom.32.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.33.file||%tab%||"")
Set_CFG_Item(1||memory.rom.33.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.40.file||%tab%||"")
Set_CFG_Item(1||memory.rom.40.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.41.file||%tab%||"")
Set_CFG_Item(1||memory.rom.41.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.42.file||%tab%||"")
Set_CFG_Item(1||memory.rom.42.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.43.file||%tab%||"")
Set_CFG_Item(1||memory.rom.43.offset||%tab%||0)

Add_CLP(-cfg gb.cfg)
Run_Emulator_Send_Keys([4]{Enter}[2]{F1}[-1][1]%gamepathfile%[-20]{Enter}[1]||50)

;---------------------------------------------------------------------------------
; 2a.Run basic-files wich needs the "zrom" (ca. 35 Games)
;---------------------------------------------------------------------------------

ElseIf Key_config CONTAINS(zrom2)

Set_CFG_Item(1||memory.configFile||%tab%||"")

Set_CFG_Item(1||memory.ram.size||%tab%||128)
Set_CFG_Item(1||memory.rom.00.file||%tab%||"roms\\exos21.rom")
Set_CFG_Item(1||memory.rom.00.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.01.file||%tab%||"roms\\exos21.rom")
Set_CFG_Item(1||memory.rom.01.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.02.file||%tab%||"")
Set_CFG_Item(1||memory.rom.02.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.03.file||%tab%||"")
Set_CFG_Item(1||memory.rom.03.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.04.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.04.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.05.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.05.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.06.file||%tab%||"roms\\basic21.rom")
Set_CFG_Item(1||memory.rom.06.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.07.file||%tab%||"roms\\epdos_z.rom")
Set_CFG_Item(1||memory.rom.07.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.10.file||%tab%||"roms\\epfileio.rom")
Set_CFG_Item(1||memory.rom.10.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.11.file||%tab%||"")
Set_CFG_Item(1||memory.rom.11.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.12.file||%tab%||"")
Set_CFG_Item(1||memory.rom.12.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.13.file||%tab%||"")
Set_CFG_Item(1||memory.rom.13.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.20.file||%tab%||"roms\\epdos_z.rom")
Set_CFG_Item(1||memory.rom.20.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.21.file||%tab%||"roms\\epdos_z.rom")
Set_CFG_Item(1||memory.rom.21.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.22.file||%tab%||"")
Set_CFG_Item(1||memory.rom.22.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.23.file||%tab%||"")
Set_CFG_Item(1||memory.rom.23.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.30.file||%tab%||"")
Set_CFG_Item(1||memory.rom.30.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.31.file||%tab%||"")
Set_CFG_Item(1||memory.rom.31.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.32.file||%tab%||"")
Set_CFG_Item(1||memory.rom.32.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.33.file||%tab%||"")
Set_CFG_Item(1||memory.rom.33.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.40.file||%tab%||"")
Set_CFG_Item(1||memory.rom.40.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.41.file||%tab%||"")
Set_CFG_Item(1||memory.rom.41.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.42.file||%tab%||"")
Set_CFG_Item(1||memory.rom.42.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.43.file||%tab%||"")
Set_CFG_Item(1||memory.rom.43.offset||%tab%||0)

Add_CLP(-cfg gb.cfg)
Run_Emulator_Send_Keys([3]{Enter}[3]{F1}[-1][1]%gamepathfile%[-20]{Enter}[1]||50)


;---------------------------------------------------------------------------------
;2b.Run Disk-Images (basic prg's wich needs zrom and typing run)
;---------------------------------------------------------------------------------

ElseIf Key_runbasiczrom CONTAINS(1)
Set_CFG_Item(1||floppy.a.imageFile||%tab%||"C:/GBGame/0/Games_01.IMG")

Set_CFG_Item(1||memory.configFile||%tab%||"")
Set_CFG_Item(1||memory.ram.size||%tab%||128)
Set_CFG_Item(1||memory.rom.00.file||%tab%||"roms\\exos21.rom")
Set_CFG_Item(1||memory.rom.00.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.01.file||%tab%||"roms\\exos21.rom")
Set_CFG_Item(1||memory.rom.01.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.02.file||%tab%||"")
Set_CFG_Item(1||memory.rom.02.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.03.file||%tab%||"")
Set_CFG_Item(1||memory.rom.03.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.04.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.04.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.05.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.05.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.06.file||%tab%||"roms\\basic21.rom")
Set_CFG_Item(1||memory.rom.06.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.07.file||%tab%||"")
Set_CFG_Item(1||memory.rom.07.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.10.file||%tab%||"roms\\epdos_z.rom")
Set_CFG_Item(1||memory.rom.10.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.11.file||%tab%||"roms\\epdos_z.rom")
Set_CFG_Item(1||memory.rom.11.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.12.file||%tab%||"")
Set_CFG_Item(1||memory.rom.12.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.13.file||%tab%||"")
Set_CFG_Item(1||memory.rom.13.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.20.file||%tab%||"roms\\exdos13.rom")
Set_CFG_Item(1||memory.rom.20.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.21.file||%tab%||"roms\\exdos13.rom")
Set_CFG_Item(1||memory.rom.21.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.22.file||%tab%||"")
Set_CFG_Item(1||memory.rom.22.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.23.file||%tab%||"")
Set_CFG_Item(1||memory.rom.23.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.30.file||%tab%||"")
Set_CFG_Item(1||memory.rom.30.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.31.file||%tab%||"")
Set_CFG_Item(1||memory.rom.31.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.32.file||%tab%||"")
Set_CFG_Item(1||memory.rom.32.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.33.file||%tab%||"")
Set_CFG_Item(1||memory.rom.33.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.40.file||%tab%||"")
Set_CFG_Item(1||memory.rom.40.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.41.file||%tab%||"")
Set_CFG_Item(1||memory.rom.41.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.42.file||%tab%||"")
Set_CFG_Item(1||memory.rom.42.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.43.file||%tab%||"")
Set_CFG_Item(1||memory.rom.43.offset||%tab%||0)

Add_CLP(-cfg gb.cfg)
Run_Emulator_Send_Keys([3]{Enter}[5][-30]load{C34}%gamename_value%{C34}{Enter}[3]run{Enter}||80)


;---------------------------------------------------------------------------------
; 3.Run Tapefile with hungarian-config 128k (VIC20-Emulator and Game "Mad Mix 2")
;---------------------------------------------------------------------------------

ElseIf Key_config CONTAINS(128k-Hun)

Set_CFG_Item(1||memory.configFile||%tab%||"")

Set_CFG_Item(1||memory.ram.size||%tab%||128)
Set_CFG_Item(1||memory.rom.00.file||%tab%||"roms\\exos21.rom")
Set_CFG_Item(1||memory.rom.00.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.01.file||%tab%||"roms\\exos21.rom")
Set_CFG_Item(1||memory.rom.01.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.02.file||%tab%||"")
Set_CFG_Item(1||memory.rom.02.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.03.file||%tab%||"")
Set_CFG_Item(1||memory.rom.03.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.04.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.04.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.05.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.05.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.06.file||%tab%||"roms\\basic21.rom")
Set_CFG_Item(1||memory.rom.06.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.07.file||%tab%||"roms\\hun.rom")
Set_CFG_Item(1||memory.rom.07.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.10.file||%tab%||"roms\\epfileio.rom")
Set_CFG_Item(1||memory.rom.10.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.11.file||%tab%||"")
Set_CFG_Item(1||memory.rom.11.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.12.file||%tab%||"")
Set_CFG_Item(1||memory.rom.12.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.13.file||%tab%||"")
Set_CFG_Item(1||memory.rom.13.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.20.file||%tab%||"")
Set_CFG_Item(1||memory.rom.20.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.21.file||%tab%||"")
Set_CFG_Item(1||memory.rom.21.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.22.file||%tab%||"")
Set_CFG_Item(1||memory.rom.22.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.23.file||%tab%||"")
Set_CFG_Item(1||memory.rom.23.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.30.file||%tab%||"")
Set_CFG_Item(1||memory.rom.30.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.31.file||%tab%||"")
Set_CFG_Item(1||memory.rom.31.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.32.file||%tab%||"")
Set_CFG_Item(1||memory.rom.32.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.33.file||%tab%||"")
Set_CFG_Item(1||memory.rom.33.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.40.file||%tab%||"")
Set_CFG_Item(1||memory.rom.40.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.41.file||%tab%||"")
Set_CFG_Item(1||memory.rom.41.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.42.file||%tab%||"")
Set_CFG_Item(1||memory.rom.42.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.43.file||%tab%||"")
Set_CFG_Item(1||memory.rom.43.offset||%tab%||0)

Add_CLP(-cfg gb.cfg)
Run_Emulator_Send_Keys([3]{Enter}[2]{F1}[-1][1]%gamepathfile%[-20]{Enter}[1]||50)

;---------------------------------------------------------------------------------
; 4.Run Files wich needs the "brd.rom" (ca. 14 Basic-Games)
;---------------------------------------------------------------------------------

ElseIf Key_config CONTAINS(brd)

Set_CFG_Item(1||memory.configFile||%tab%||"")

Set_CFG_Item(1||memory.ram.size||%tab%||128)
Set_CFG_Item(1||memory.rom.00.file||%tab%||"roms\\exos21.rom")
Set_CFG_Item(1||memory.rom.00.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.01.file||%tab%||"roms\\exos21.rom")
Set_CFG_Item(1||memory.rom.01.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.02.file||%tab%||"")
Set_CFG_Item(1||memory.rom.02.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.03.file||%tab%||"")
Set_CFG_Item(1||memory.rom.03.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.04.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.04.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.05.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.05.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.06.file||%tab%||"roms\\basic21.rom")
Set_CFG_Item(1||memory.rom.06.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.07.file||%tab%||"roms\\brd.rom")
Set_CFG_Item(1||memory.rom.07.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.10.file||%tab%||"roms\\epfileio.rom")
Set_CFG_Item(1||memory.rom.10.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.11.file||%tab%||"")
Set_CFG_Item(1||memory.rom.11.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.12.file||%tab%||"")
Set_CFG_Item(1||memory.rom.12.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.13.file||%tab%||"")
Set_CFG_Item(1||memory.rom.13.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.20.file||%tab%||"")
Set_CFG_Item(1||memory.rom.20.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.21.file||%tab%||"")
Set_CFG_Item(1||memory.rom.21.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.22.file||%tab%||"")
Set_CFG_Item(1||memory.rom.22.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.23.file||%tab%||"")
Set_CFG_Item(1||memory.rom.23.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.30.file||%tab%||"")
Set_CFG_Item(1||memory.rom.30.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.31.file||%tab%||"")
Set_CFG_Item(1||memory.rom.31.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.32.file||%tab%||"")
Set_CFG_Item(1||memory.rom.32.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.33.file||%tab%||"")
Set_CFG_Item(1||memory.rom.33.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.40.file||%tab%||"")
Set_CFG_Item(1||memory.rom.40.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.41.file||%tab%||"")
Set_CFG_Item(1||memory.rom.41.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.42.file||%tab%||"")
Set_CFG_Item(1||memory.rom.42.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.43.file||%tab%||"")
Set_CFG_Item(1||memory.rom.43.offset||%tab%||0)

Add_CLP(-cfg gb.cfg)
Run_Emulator_Send_Keys([3]{Enter}[3]{F1}[-1][1]%gamepathfile%[-20]{Enter}[1]||50)

;---------------------------------------------------------------------------------
; 5.Run Files wich needs "EXDOS.rom" (Game Sokoban 1 & Sokoban 2 only)
;---------------------------------------------------------------------------------

ElseIf Key_config CONTAINS(exdos)

Set_CFG_Item(1||memory.configFile||%tab%||"")

Set_CFG_Item(1||memory.ram.size||%tab%||128)
Set_CFG_Item(1||memory.rom.00.file||%tab%||"roms\\exos21.rom")
Set_CFG_Item(1||memory.rom.00.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.01.file||%tab%||"roms\\exos21.rom")
Set_CFG_Item(1||memory.rom.01.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.02.file||%tab%||"")
Set_CFG_Item(1||memory.rom.02.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.03.file||%tab%||"")
Set_CFG_Item(1||memory.rom.03.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.04.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.04.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.05.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.05.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.06.file||%tab%||"roms\\basic21.rom")
Set_CFG_Item(1||memory.rom.06.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.07.file||%tab%||"")
Set_CFG_Item(1||memory.rom.07.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.10.file||%tab%||"roms\\epfileio.rom")
Set_CFG_Item(1||memory.rom.10.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.11.file||%tab%||"")
Set_CFG_Item(1||memory.rom.11.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.12.file||%tab%||"")
Set_CFG_Item(1||memory.rom.12.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.13.file||%tab%||"")
Set_CFG_Item(1||memory.rom.13.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.20.file||%tab%||"roms\\exdos13.rom")
Set_CFG_Item(1||memory.rom.20.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.21.file||%tab%||"roms\\exdos13.rom")
Set_CFG_Item(1||memory.rom.21.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.22.file||%tab%||"")
Set_CFG_Item(1||memory.rom.22.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.23.file||%tab%||"")
Set_CFG_Item(1||memory.rom.23.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.30.file||%tab%||"")
Set_CFG_Item(1||memory.rom.30.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.31.file||%tab%||"")
Set_CFG_Item(1||memory.rom.31.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.32.file||%tab%||"")
Set_CFG_Item(1||memory.rom.32.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.33.file||%tab%||"")
Set_CFG_Item(1||memory.rom.33.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.40.file||%tab%||"")
Set_CFG_Item(1||memory.rom.40.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.41.file||%tab%||"")
Set_CFG_Item(1||memory.rom.41.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.42.file||%tab%||"")
Set_CFG_Item(1||memory.rom.42.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.43.file||%tab%||"")
Set_CFG_Item(1||memory.rom.43.offset||%tab%||0)

Add_CLP(-cfg gb.cfg)
Run_Emulator_Send_Keys([3]{Enter}[6]{F1}[-1][1]%gamepathfile%[-20]{Enter}[1]||50)

;---------------------------------------------------------------------------------
; 6.Run Emulator with ISDOS (Base, Deadline, Island, Seastalker, Sokoban, Zork 1-3
;---------------------------------------------------------------------------------

ElseIf Key_config CONTAINS(isdos)

Set_CFG_Item(1||memory.configFile||%tab%||"")

Set_CFG_Item(1||memory.ram.size||%tab%||128)
Set_CFG_Item(1||memory.rom.00.file||%tab%||"roms\\exos21.rom")
Set_CFG_Item(1||memory.rom.00.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.01.file||%tab%||"roms\\exos21.rom")
Set_CFG_Item(1||memory.rom.01.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.02.file||%tab%||"")
Set_CFG_Item(1||memory.rom.02.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.03.file||%tab%||"")
Set_CFG_Item(1||memory.rom.03.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.04.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.04.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.05.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.05.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.06.file||%tab%||"roms\\basic21.rom")
Set_CFG_Item(1||memory.rom.06.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.07.file||%tab%||"")
Set_CFG_Item(1||memory.rom.07.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.10.file||%tab%||"roms\\epfileio.rom")
Set_CFG_Item(1||memory.rom.10.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.11.file||%tab%||"")
Set_CFG_Item(1||memory.rom.11.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.12.file||%tab%||"")
Set_CFG_Item(1||memory.rom.12.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.13.file||%tab%||"")
Set_CFG_Item(1||memory.rom.13.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.20.file||%tab%||"roms\\exdos13isdos10hun.rom")
Set_CFG_Item(1||memory.rom.20.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.21.file||%tab%||"roms\\exdos13isdos10hun.rom")
Set_CFG_Item(1||memory.rom.21.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.22.file||%tab%||"")
Set_CFG_Item(1||memory.rom.22.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.23.file||%tab%||"")
Set_CFG_Item(1||memory.rom.23.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.30.file||%tab%||"")
Set_CFG_Item(1||memory.rom.30.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.31.file||%tab%||"")
Set_CFG_Item(1||memory.rom.31.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.32.file||%tab%||"")
Set_CFG_Item(1||memory.rom.32.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.33.file||%tab%||"")
Set_CFG_Item(1||memory.rom.33.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.40.file||%tab%||"")
Set_CFG_Item(1||memory.rom.40.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.41.file||%tab%||"")
Set_CFG_Item(1||memory.rom.41.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.42.file||%tab%||"")
Set_CFG_Item(1||memory.rom.42.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.43.file||%tab%||"")
Set_CFG_Item(1||memory.rom.43.offset||%tab%||0)

Set_CFG_Item(1||floppy.a.imageFile||%tab%||"C:/GBGAME/0/Disk.IMG")

;* Non UK /USA Keyboard setup will flip Z and Y on Keyboard.
;* DIR is typed instead of gamename to avoid loading error York, Zork.

;**********************************************************************
;German keyboard setting
;Run_Emulator_Send_Keys([4]{Enter}[5]äisdos{Enter}[4]dir{Enter}[1]||80)
;
;USA Keyboard - Emulator default Setting
;Run_Emulator_Send_Keys([4]{Enter}[5]#isdos{Enter}[4]dir{Enter}[1]||80)
;
;Real Machine Keyboard Setting
;Run_Emulator_Send_Keys([4]{Enter}[5]:isdos{Enter}[4]dir{Enter}[1]||80)
;**********************************************************************

;-----------------------------------------------------------
; Map Keyboard - Left Shift to :Colon: for universal setting
; settings will reset on next loaded game file.
;-----------------------------------------------------------
Set_CFG_Item(1||keyboard.07.0||%tab%||-1)
Set_CFG_Item(1||keyboard.07.1||%tab%||-1)
Set_CFG_Item(1||keyboard.35.0||%tab%||65505)
Set_CFG_Item(1||keyboard.35.1||%tab%||39)
Set_CFG_Item(1||keyboard.45.0||%tab%||65506)
Set_CFG_Item(1||keyboard.45.1||%tab%||-1)

Add_CLP(-cfg gb.cfg)
Run_Emulator_Send_Keys([4]{Enter}[5]{SHIFT}isdos{Enter}[4]%gamename_value%{Enter}[1]||80)



;---------------------------------------------------------------------------------
;7.Run Disk-Images (slideshow autostart or Program loader/menue)
;---------------------------------------------------------------------------------

ElseIf GameType CONTAINS(img)
Set_CFG_Item(1||floppy.a.imageFile||%tab%||"C:/GBGame/0/Games_01.IMG")

Set_CFG_Item(1||memory.configFile||%tab%||"")
Set_CFG_Item(1||memory.ram.size||%tab%||128)
Set_CFG_Item(1||memory.rom.00.file||%tab%||"roms\\exos21.rom")
Set_CFG_Item(1||memory.rom.00.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.01.file||%tab%||"roms\\exos21.rom")
Set_CFG_Item(1||memory.rom.01.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.02.file||%tab%||"")
Set_CFG_Item(1||memory.rom.02.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.03.file||%tab%||"")
Set_CFG_Item(1||memory.rom.03.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.04.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.04.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.05.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.05.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.06.file||%tab%||"roms\\basic21.rom")
Set_CFG_Item(1||memory.rom.06.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.07.file||%tab%||"")
Set_CFG_Item(1||memory.rom.07.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.10.file||%tab%||"")
Set_CFG_Item(1||memory.rom.10.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.11.file||%tab%||"")
Set_CFG_Item(1||memory.rom.11.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.12.file||%tab%||"")
Set_CFG_Item(1||memory.rom.12.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.13.file||%tab%||"")
Set_CFG_Item(1||memory.rom.13.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.20.file||%tab%||"roms\\exdos13.rom")
Set_CFG_Item(1||memory.rom.20.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.21.file||%tab%||"roms\\exdos13.rom")
Set_CFG_Item(1||memory.rom.21.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.22.file||%tab%||"")
Set_CFG_Item(1||memory.rom.22.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.23.file||%tab%||"")
Set_CFG_Item(1||memory.rom.23.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.30.file||%tab%||"")
Set_CFG_Item(1||memory.rom.30.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.31.file||%tab%||"")
Set_CFG_Item(1||memory.rom.31.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.32.file||%tab%||"")
Set_CFG_Item(1||memory.rom.32.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.33.file||%tab%||"")
Set_CFG_Item(1||memory.rom.33.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.40.file||%tab%||"")
Set_CFG_Item(1||memory.rom.40.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.41.file||%tab%||"")
Set_CFG_Item(1||memory.rom.41.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.42.file||%tab%||"")
Set_CFG_Item(1||memory.rom.42.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.43.file||%tab%||"")
Set_CFG_Item(1||memory.rom.43.offset||%tab%||0)

If Key_load CONTAINS(speccy)
;-------------------------------------
; Swap Left and Right SHIFT Keys
;-------------------------------------
Set_CFG_Item(1||keyboard.07.0||%tab%||65506)
Set_CFG_Item(1||keyboard.45.0||%tab%||65505)

Add_CLP(-cfg gb.cfg)

Run_Emulator_Send_Keys([3]{Enter}[5][-30]load{C34}%gamename_value%{C34}{Enter}[-100][-100][5]jPP{Enter}[1]||50)

ElseIf Key_auto CONTAINS(yes||1)
Add_CLP(-cfg gb.cfg)

Run_Emulator_Send_Keys([3]{Enter}[5][-30]load{C34}%gamename_value%{C34}{Enter}||80)



ElseIf Key_runbasic CONTAINS(yes||1)
Add_CLP(-cfg gb.cfg)

Run_Emulator_Send_Keys([3]{Enter}[5][-30]load{C34}%gamename_value%{C34}{Enter}[3]run{Enter}||80)


Else
Add_CLP(-cfg gb.cfg)
Run_Emulator_Send_Keys([3]{Enter}||80)
End If

;---------------------------------------------------------------------------------
;8.Autorun the Games in the 4 EP128 Emulators [CPC,VIC20,TVC & ZX81]
;---------------------------------------------------------------------------------
;************************************************************************************
;* i have decided to use a "Snapshotfile" of the "Emulated Emulator" *
;* *
;* The Games will be load, by using the %gamename_value% - Function *
;************************************************************************************

;-------------------------------------------
;Run Game in Emulator
;-------------------------------------------
ElseIf Key_emulator CONTAINS(*)

Set_CFG_Item(1||memory.configFile||%tab%||"")

Set_CFG_Item(1||memory.ram.size||%tab%||128)
Set_CFG_Item(1||memory.rom.00.file||%tab%||"roms\\exos21.rom")
Set_CFG_Item(1||memory.rom.00.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.01.file||%tab%||"roms\\exos21.rom")
Set_CFG_Item(1||memory.rom.01.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.02.file||%tab%||"")
Set_CFG_Item(1||memory.rom.02.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.03.file||%tab%||"")
Set_CFG_Item(1||memory.rom.03.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.04.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.04.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.05.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.05.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.06.file||%tab%||"roms\\basic21.rom")
Set_CFG_Item(1||memory.rom.06.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.07.file||%tab%||"")
Set_CFG_Item(1||memory.rom.07.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.10.file||%tab%||"roms\\epfileio.rom")
Set_CFG_Item(1||memory.rom.10.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.11.file||%tab%||"")
Set_CFG_Item(1||memory.rom.11.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.12.file||%tab%||"")
Set_CFG_Item(1||memory.rom.12.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.13.file||%tab%||"")
Set_CFG_Item(1||memory.rom.13.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.20.file||%tab%||"")
Set_CFG_Item(1||memory.rom.20.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.21.file||%tab%||"")
Set_CFG_Item(1||memory.rom.21.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.22.file||%tab%||"")
Set_CFG_Item(1||memory.rom.22.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.23.file||%tab%||"")
Set_CFG_Item(1||memory.rom.23.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.30.file||%tab%||"")
Set_CFG_Item(1||memory.rom.30.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.31.file||%tab%||"")
Set_CFG_Item(1||memory.rom.31.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.32.file||%tab%||"")
Set_CFG_Item(1||memory.rom.32.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.33.file||%tab%||"")
Set_CFG_Item(1||memory.rom.33.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.40.file||%tab%||"")
Set_CFG_Item(1||memory.rom.40.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.41.file||%tab%||"")
Set_CFG_Item(1||memory.rom.41.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.42.file||%tab%||"")
Set_CFG_Item(1||memory.rom.42.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.43.file||%tab%||"")
Set_CFG_Item(1||memory.rom.43.offset||%tab%||0)


;---------------------------------------------------------------------------------
;Run Game in the Enterprise Amstrad-Emulator
;---------------------------------------------------------------------------------

If Key_emulator CONTAINS(cpc)
Add_CLP(-cfg gb.cfg -snapshot %gamepathfile%)
Run_Emulator_Send_Keys([1]%gamename_value%{Enter}||50)
End If
;---------------------------------------------------------------------------------
;Run Game in Enterprise Vic20-Emulator
;---------------------------------------------------------------------------------

If Key_emulator CONTAINS(vic20)
Add_CLP(-cfg gb.cfg -snapshot %gamepathfile%)
Run_Emulator_Send_Keys([1]{F6}[1][-1]%gamename_value%[-50]{Enter}[1]run{Enter}||50)
End If
;---------------------------------------------------------------------------------
;Run Game in Enterprise TVC-Emulator
;---------------------------------------------------------------------------------

If Key_emulator CONTAINS(tvc)
Add_CLP(-cfg gb.cfg -snapshot %gamepathfile%)
Run_Emulator_Send_Keys([1]%gamename_value%{Enter}||80)
End If
;---------------------------------------------------------------------------------
;Run Game in Enterprise ZX81-Emulator
;---------------------------------------------------------------------------------

If Key_emulator CONTAINS(zx81)
Add_CLP(-cfg gb.cfg -snapshot %gamepathfile%)
Run_Emulator_Send_Keys([2]{Enter}[2][-1]%gamename_value%[-80]{Enter}[2]r{Enter}||80)
End If


;---------------------------------------------------------------------------------
;9.Run all other files
;---------------------------------------------------------------------------------

Else
Set_CFG_Item(1||memory.configFile||%tab%||"")
Set_CFG_Item(1||memory.ram.size||%tab%||128)
Set_CFG_Item(1||memory.rom.00.file||%tab%||"roms\\exos21.rom")
Set_CFG_Item(1||memory.rom.00.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.01.file||%tab%||"roms\\exos21.rom")
Set_CFG_Item(1||memory.rom.01.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.02.file||%tab%||"")
Set_CFG_Item(1||memory.rom.02.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.03.file||%tab%||"")
Set_CFG_Item(1||memory.rom.03.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.04.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.04.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.05.file||%tab%||"roms\\asmon15.rom")
Set_CFG_Item(1||memory.rom.05.offset||%tab%||16384)
Set_CFG_Item(1||memory.rom.06.file||%tab%||"roms\\basic21.rom")
Set_CFG_Item(1||memory.rom.06.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.07.file||%tab%||"")
Set_CFG_Item(1||memory.rom.07.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.10.file||%tab%||"roms\\epfileio.rom")
Set_CFG_Item(1||memory.rom.10.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.11.file||%tab%||"")
Set_CFG_Item(1||memory.rom.11.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.12.file||%tab%||"")
Set_CFG_Item(1||memory.rom.12.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.13.file||%tab%||"")
Set_CFG_Item(1||memory.rom.13.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.20.file||%tab%||"")
Set_CFG_Item(1||memory.rom.20.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.21.file||%tab%||"")
Set_CFG_Item(1||memory.rom.21.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.22.file||%tab%||"")
Set_CFG_Item(1||memory.rom.22.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.23.file||%tab%||"")
Set_CFG_Item(1||memory.rom.23.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.30.file||%tab%||"")
Set_CFG_Item(1||memory.rom.30.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.31.file||%tab%||"")
Set_CFG_Item(1||memory.rom.31.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.32.file||%tab%||"")
Set_CFG_Item(1||memory.rom.32.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.33.file||%tab%||"")
Set_CFG_Item(1||memory.rom.33.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.40.file||%tab%||"")
Set_CFG_Item(1||memory.rom.40.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.41.file||%tab%||"")
Set_CFG_Item(1||memory.rom.41.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.42.file||%tab%||"")
Set_CFG_Item(1||memory.rom.42.offset||%tab%||0)
Set_CFG_Item(1||memory.rom.43.file||%tab%||"")
Set_CFG_Item(1||memory.rom.43.offset||%tab%||0)

Add_CLP(-cfg gb.cfg)

Run_Emulator_Send_Keys([3]{Enter}[2]{F1}[-1][1]%gamepathfile%[-20]{Enter}||50)

End If
It would be fine to have this SET_CFG_Item in eCC.... (or something similar)
imagepacks:
Done: Vic20, N64, Philips VG-5000 G7000 G7400, SordM5, Amstrad GX4000, Enterprise 64/128
Progress: Atari 8bit, Dosbox, Exelvision EXL 100
Vicman's eCC-Clips on You Tube

User avatar
Phoenix
ECC Developer 2006-2016
Posts: 9057
Joined: 27 Aug 2006, 01:17
Location: Deventer, The Netherlands
Contact:

Re: Need Help with Script EP64/128

Unread post by Phoenix » 24 Feb 2011, 21:26

Hey Vicman,

I can rather use preconfiged .cfg files instread of creating them on the fly if you don't mind ;-)
Sebastiaan Ebeltjes | ECC Developer 2006-2016 | ECC Forum Admin | Phoenix Interactive WebMaster
[- ECC programs -]
eccUpdate, eccScriptSystem, GtkThemeSelect, DatFileUpdater (DFU), ImagePackCenter (IPC), eccDiagnostics, 3dGallery, iccImageInject
eccKameleonCode, eccCreateStartmenuShotcut, eccThirdPartyConfig (TPC), EmuMoviesDownloader (EMD), eccVideoPlayer
MobyGamesImporter (MGI), ECC Amiga GetGemusConfig.

User avatar
Vicman
PLATINUM member
Posts: 1233
Joined: 17 Jun 2007, 16:12
Location: Germany,Bochum

Re: Need Help with Script EP64/128

Unread post by Vicman » 25 Feb 2011, 22:13

This would be o.k. Phoenix !
Please do it :cool:

btw.
Imagepack is 99,9 % ready. eCC Datfile is in work....70 % finished.

User avatar
Phoenix
ECC Developer 2006-2016
Posts: 9057
Joined: 27 Aug 2006, 01:17
Location: Deventer, The Netherlands
Contact:

Re: Need Help with Script EP64/128

Unread post by Phoenix » 25 Feb 2011, 23:10

Hi Vicman,

Here is a part of the script wich is based on our ideas, it is not finished yet and also not tested, but maybe we can do this together?

need to be implemented:
1. start the emulator with the configured commmandline
2. convert the keystrokes to autoit style
3. what todo with -snapshot %gamepathfile%?
Spoiler: show

Code: Select all

; ------------------------------------------------------------------------------
; Platform               : Enterprise 64/128
; Script for             : EP128Emu
; Script version         : v1.0.0.0 BETA
; Last changed           : 2011.02.25
;
;
; Author: Sebastiaan Ebeltjes (aka Phoenix)
;
; NOTES:
;
; Nothing yet!
;
; ------------------------------------------------------------------------------

; ==============================================================================
; You need to implent this block in every script, this changes the workfolder to
; the folder where this script is executed, and loads the 'eccScriptSystem' script.
FileChangeDir(@ScriptDir)
#include "..\eccScriptSystem.au3"
; ==============================================================================

; ------------------------------------------------------------------------------
; BEGIN OF SCRIPT
; ------------------------------------------------------------------------------
; Define variables
$ep128emuConfigFolder = @Scriptdir & "\ep128-configs\"
$ep128emuConfigFloppy = "floppy.a.imageFile=" & Chr(34) & Chr(34)
$ep128emuConfigDirectory = "fileio.workingDirectory=" & Chr(34) & $eccFileEccUnpackedPath & Chr(34))

; Check if the 'Meta-Info ID' field is filled in.
If $eccMetaInfoString = "" Then
	Msgbox(64, "ECC Script", "This script requires some startup info in the 'MetaInfo' string")
	Exit
EndIf

; Check if user selected the option "unpack all files"
If $enableZipUnpackAll <> 1 Then
	Msgbox(64, "ECC Script", "Please enable the 'Unpack all files' option in the emulator config menu!")
	Exit
EndIf

;Get proper CFG configurationfile from the 'MetaInfo' sting inside the ECC rom properties
$ep128emuConfig = "8_EP_128k_Tape_FileIO_TASMON_UK.cfg" ; Default config

;Change the default config here if one of these strings are set:
If StringInStr($eccMetaInfoString, "EP640k")	Then $ep128emuConfig = "1_EP_640k_Tape_FileIO_TASMON_UK.cfg"		;Runs the Emulator with 640k RAM instead 128k (ca. 60 Games)
If StringInStr($eccMetaInfoString, "zrom2") 	Then $ep128emuConfig = "2_EP_128k_Tape_FileIO_TASMON_ZROM.cfg"		;Run basic-files wich needs the "zrom" (ca. 35 Games)
If StringInStr($eccMetaInfoString, "128k-Hun") 	Then $ep128emuConfig = "3_EP_128k_Tape_FileIO_TASMON_HUN.cfg"		;Run Tapefile with hungarian-config 128k (VIC20-Emulator and Game "Mad Mix 2")
If StringInStr($eccMetaInfoString, "brd") 		Then $ep128emuConfig = "4_EP_128k_Tape_FileIO_TASMON_BRD.cfg"		;Run Files wich needs the "brd.rom" (ca. 14 Basic-Games)
If StringInStr($eccMetaInfoString, "exdos") 	Then $ep128emuConfig = "4_EP_128k_Tape_FileIO_TASMON_EXDOS.cfg"		;Run Files wich needs "EXDOS.rom" (Game Sokoban 1 & Sokoban 2 only)
If StringInStr($eccMetaInfoString, "isdos") 	Then $ep128emuConfig = "6_EP_128k_Tape_FileIO_TASMON_ISDOS_UK.cfg"	;Run Emulator with ISDOS (Seastalker, Sokoban 4k)
If StringInStr($eccMetaInfoString, "autostart") Then $ep128emuConfig = "7_EP_128k_EXDOS_UK.cfg"						;Run Disk-Images (autostart / without Program loader)
If StringInStr($eccMetaInfoString, "img")		Then $ep128emuConfig = "8_EP_128k_Tape_FileIO_TASMON_UK.cfg"		;Run Disk-Images (slideshow or with Program loader/menue)
If StringInStr($eccMetaInfoString, "tape")		Then $ep128emuConfig = "9_EP_128k_Tape_FileIO_TASMON_UK_swapping_keyboard.cfg"	;Run Game in Enterprise wich needs typing j ""

If StringInStr($eccMetaInfoString, "cpc")	Then $ep128emuConfig = "8_EP_128k_Tape_FileIO_TASMON_UK.cfg"	;Run Game in the Enterprise Amstrad-Emulator
If StringInStr($eccMetaInfoString, "vic20")	Then $ep128emuConfig = "8_EP_128k_Tape_FileIO_TASMON_UK.cfg"	;Run Game in Enterprise Vic20-Emulator
If StringInStr($eccMetaInfoString, "tvc")	Then $ep128emuConfig = "8_EP_128k_Tape_FileIO_TASMON_UK.cfg"	;Run Game in Enterprise TVC-Emulator
If StringInStr($eccMetaInfoString, "zx81")	Then $ep128emuConfig = "8_EP_128k_Tape_FileIO_TASMON_UK.cfg"	;Run Game in Enterprise ZX81-Emulator

;********************************************************************************************
;* To Autorun the Games in the 4 Emulators [CPC,VIC20,TVC & ZX81] INSIDE the Emu EP128, *
;* i have decided to use a "Snapshotfile" of the "Emulated Emulator" *
;* The Games will be load, by using the %gamename_value% - Feature *
;********************************************************************************************

; Build the proper commandline
$ep128emuCommandline = " -cfg " & $ep128emuConfigFolder & $ep128emuConfig & " " & $ep128emuConfigFloppy & " " & $ep128emuConfigDirectory)
; Start emulator here....


If StringInStr($eccMetaInfoString, "cpc") Then
	;Run_Emulator_Send_Keys([1]%gamename_value%{Enter}||50)
	Exit
EndIf

If StringInStr($eccMetaInfoString, "vic20")	Then
	;Run_Emulator_Send_Keys([1]{F6}[1][-1]%gamename_value%[-50]{Enter}[1]run{Enter}||50)
	Exit
EndIf

If StringInStr($eccMetaInfoString, "tvc") Then
	;Run_Emulator_Send_Keys([1]%gamename_value%{Enter}||80)
	Exit
EndIf

If StringInStr($eccMetaInfoString, "zx81") Then
	;Run_Emulator_Send_Keys([2]{Enter}[2][-1]%gamename_value%[-80]{Enter}[2]r{Enter}||80)
	Exit
EndIf

;Run all other files here...
;Run_Emulator_Send_Keys([3]{Enter}[2]{F1}[-1][1]%gamepathfile%[-20]{Enter}||50)

; What todo with -snapshot %gamepathfile% ??

 ; ------------------------------------------------------------------------------
; END OF SCRIPT
; ------------------------------------------------------------------------------
Exit
Sebastiaan Ebeltjes | ECC Developer 2006-2016 | ECC Forum Admin | Phoenix Interactive WebMaster
[- ECC programs -]
eccUpdate, eccScriptSystem, GtkThemeSelect, DatFileUpdater (DFU), ImagePackCenter (IPC), eccDiagnostics, 3dGallery, iccImageInject
eccKameleonCode, eccCreateStartmenuShotcut, eccThirdPartyConfig (TPC), EmuMoviesDownloader (EMD), eccVideoPlayer
MobyGamesImporter (MGI), ECC Amiga GetGemusConfig.

User avatar
Vicman
PLATINUM member
Posts: 1233
Joined: 17 Jun 2007, 16:12
Location: Germany,Bochum

Re: Need Help with Script EP64/128

Unread post by Vicman » 26 Feb 2011, 09:00

Hi Phoenix,

I've some questions to the script.
1. You wrote :
; Define variables
$ep128emuConfigFolder = @Scriptdir & "\ep128-configs\"
my configs are in the folder "E:\eCC\ecc-user\enterprise\emus\ep128emu\config\ecc

so, what is then the right variable ?
$ep128emuConfigFolder = @Scriptdir & "\ecc-user\enterprise\emus\ep128emu\config\ecc\" ???
(or is your line above o.k. for my config-paths ? )

EDIT:
o.k. think i have it......the cfg's must be put in E:\eCC\ecc-script\ep128-configs :oops:



2. You wrote :
; Check if the 'Meta-Info ID' field is filled in.
If $eccMetaInfoString = "" Then
Msgbox(64, "ECC Script", "This script requires some startup info in the 'MetaInfo' string")
Exit

If StringInStr($eccMetaInfoString, "EP640k") Then $ep128emuConfig = "1_EP_640k_Tape_FileIO_TASMON_UK.cfg" ;Runs the Emulator with 640k RAM instead 128k (ca. 60 Games)
but i think for the 'Meta-Info ID' field we need this parameter , right ?

; Check if the 'Meta-Info ID' field is filled in.
If $eccMetaInfoId = "" Then
Msgbox(64, "ECC Script", "This script requires some startup info in the 'MetaInfo id' string")
Exit

If StringInStr($eccMetaInfoId, "EP640k") Then $ep128emuConfig = "1_EP_640k_Tape_FileIO_TASMON_UK.cfg" ;Runs the Emulator with 640k RAM instead 128k (ca. 60 Games)

User avatar
Vicman
PLATINUM member
Posts: 1233
Joined: 17 Jun 2007, 16:12
Location: Germany,Bochum

Re: Need Help with Script EP64/128

Unread post by Vicman » 26 Feb 2011, 17:57

sorry Phoenix.....

I've tried the hole day running the script....but i get one error after the other.......

this don't work : error line 29 (error: unbalanced brackets in expression)
$ep128emuConfigDirectory = "fileio.workingDirectory=" & Chr(34) & $eccFileEccUnpackedPath & Chr(34))
when using the script without this line, i get the next error here :
; Check if user selected the option "unpack all files"
If $enableZipUnpackAll <> 1 Then
Msgbox(64, "ECC Script", "Please enable the 'Unpack all files' option in the emulator config menu!")
Exit
EndIf
error line 38 (variable used without being declared)

when then trying it without these 2 commands, i get the next error in line 69.......and so on...... :wacko:

it seems, i haven't the knowledge to help you with the script......i only managed point 2 (convert the keystrokes to autoit style) :

Code: Select all

;Run all other files here...
  EmuWindowControl("ep128emu")
	AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(2000)
	Send("{ENTER}")
	Sleep(1500)
	Send("{F1}")
    Sleep(500)
	AutoItSetOption("SendKeyDownDelay", 2)
	Send($RomFile, 1)
	 Send("{ENTER}")
Is there no way to implement GEMUS in eCC ? 'cause it is much easier and more powerfull in my opinion 8-[

User avatar
Phoenix
ECC Developer 2006-2016
Posts: 9057
Joined: 27 Aug 2006, 01:17
Location: Deventer, The Netherlands
Contact:

Re: Need Help with Script EP64/128

Unread post by Phoenix » 26 Feb 2011, 19:07

Hi Vicman,

1. to solve error line 29 (error: unbalanced brackets in expression), change this line:

Code: Select all

$ep128emuConfigDirectory = "fileio.workingDirectory=" & Chr(34) & $eccFileEccUnpackedPath & Chr(34))
remove the last ' ) ' so it changes into:

Code: Select all

$ep128emuConfigDirectory = "fileio.workingDirectory=" & Chr(34) & $eccFileEccUnpackedPath & Chr(34)
2. error line 38 (variable used without being declared)
Stange....are you sure you got this part also in your script?:

Code: Select all

FileChangeDir(@ScriptDir)
#include "..\eccScriptSystem.au3"
in here are the variables the script gets from the ecc output

maybe ever i can create a gemus script addon....who knows :surrender: , can you help me convert the rest of the GEMUS keystrokes to autoit?, i work further on the script to make ecc startup ep128 properly ;-)
Sebastiaan Ebeltjes | ECC Developer 2006-2016 | ECC Forum Admin | Phoenix Interactive WebMaster
[- ECC programs -]
eccUpdate, eccScriptSystem, GtkThemeSelect, DatFileUpdater (DFU), ImagePackCenter (IPC), eccDiagnostics, 3dGallery, iccImageInject
eccKameleonCode, eccCreateStartmenuShotcut, eccThirdPartyConfig (TPC), EmuMoviesDownloader (EMD), eccVideoPlayer
MobyGamesImporter (MGI), ECC Amiga GetGemusConfig.

User avatar
Vicman
PLATINUM member
Posts: 1233
Joined: 17 Jun 2007, 16:12
Location: Germany,Bochum

Re: Need Help with Script EP64/128

Unread post by Vicman » 26 Feb 2011, 19:13

o.k.
i will change the lines above and test a little bit again.....
Phoenix wrote: can you help me convert the rest of the GEMUS keystrokes to autoit?, i work further on the script to make ecc startup ep128 properly ;-)
Yes, i will convert the keystrokes :yes_head:

User avatar
Phoenix
ECC Developer 2006-2016
Posts: 9057
Joined: 27 Aug 2006, 01:17
Location: Deventer, The Netherlands
Contact:

Re: Need Help with Script EP64/128

Unread post by Phoenix » 26 Feb 2011, 19:16

Oh and place the CFG's here ;-)
Attachments
ecc_ep128_01.png
ecc_ep128_01.png (3.71 KiB) Viewed 2241 times
Sebastiaan Ebeltjes | ECC Developer 2006-2016 | ECC Forum Admin | Phoenix Interactive WebMaster
[- ECC programs -]
eccUpdate, eccScriptSystem, GtkThemeSelect, DatFileUpdater (DFU), ImagePackCenter (IPC), eccDiagnostics, 3dGallery, iccImageInject
eccKameleonCode, eccCreateStartmenuShotcut, eccThirdPartyConfig (TPC), EmuMoviesDownloader (EMD), eccVideoPlayer
MobyGamesImporter (MGI), ECC Amiga GetGemusConfig.

User avatar
Vicman
PLATINUM member
Posts: 1233
Joined: 17 Jun 2007, 16:12
Location: Germany,Bochum

Re: Need Help with Script EP64/128

Unread post by Vicman » 26 Feb 2011, 19:19

Phoenix wrote:Oh and place the CFG's here ;-)
ok ;)
imagepacks:
Done: Vic20, N64, Philips VG-5000 G7000 G7400, SordM5, Amstrad GX4000, Enterprise 64/128
Progress: Atari 8bit, Dosbox, Exelvision EXL 100
Vicman's eCC-Clips on You Tube

User avatar
Phoenix
ECC Developer 2006-2016
Posts: 9057
Joined: 27 Aug 2006, 01:17
Location: Deventer, The Netherlands
Contact:

Re: Need Help with Script EP64/128

Unread post by Phoenix » 26 Feb 2011, 19:32

Also, it's better to use the $eccMetaInfoString value, because that one is used in more scripts :smartass: , in the ID field goes some other info...
Sebastiaan Ebeltjes | ECC Developer 2006-2016 | ECC Forum Admin | Phoenix Interactive WebMaster
[- ECC programs -]
eccUpdate, eccScriptSystem, GtkThemeSelect, DatFileUpdater (DFU), ImagePackCenter (IPC), eccDiagnostics, 3dGallery, iccImageInject
eccKameleonCode, eccCreateStartmenuShotcut, eccThirdPartyConfig (TPC), EmuMoviesDownloader (EMD), eccVideoPlayer
MobyGamesImporter (MGI), ECC Amiga GetGemusConfig.

User avatar
Vicman
PLATINUM member
Posts: 1233
Joined: 17 Jun 2007, 16:12
Location: Germany,Bochum

Re: Need Help with Script EP64/128

Unread post by Vicman » 26 Feb 2011, 19:37

Phoenix wrote:Also, it's better to use the $eccMetaInfoString value, because that one is used in more scripts :smartass: , in the ID field goes some other info...
ok !?

btw.
still error in line 38
Attachments
error38.jpg
imagepacks:
Done: Vic20, N64, Philips VG-5000 G7000 G7400, SordM5, Amstrad GX4000, Enterprise 64/128
Progress: Atari 8bit, Dosbox, Exelvision EXL 100
Vicman's eCC-Clips on You Tube

User avatar
Phoenix
ECC Developer 2006-2016
Posts: 9057
Joined: 27 Aug 2006, 01:17
Location: Deventer, The Netherlands
Contact:

Re: Need Help with Script EP64/128

Unread post by Phoenix » 26 Feb 2011, 19:39

Error in line 38 i have found it was a typo from me :sweatdrop:

Just change:

Code: Select all

If $enableZipUnpackAll <> 1 Then
into:

Code: Select all

If $eccEmuEnableZipUnpackAll <> 1 Then
Sebastiaan Ebeltjes | ECC Developer 2006-2016 | ECC Forum Admin | Phoenix Interactive WebMaster
[- ECC programs -]
eccUpdate, eccScriptSystem, GtkThemeSelect, DatFileUpdater (DFU), ImagePackCenter (IPC), eccDiagnostics, 3dGallery, iccImageInject
eccKameleonCode, eccCreateStartmenuShotcut, eccThirdPartyConfig (TPC), EmuMoviesDownloader (EMD), eccVideoPlayer
MobyGamesImporter (MGI), ECC Amiga GetGemusConfig.

User avatar
Phoenix
ECC Developer 2006-2016
Posts: 9057
Joined: 27 Aug 2006, 01:17
Location: Deventer, The Netherlands
Contact:

Re: Need Help with Script EP64/128

Unread post by Phoenix » 26 Feb 2011, 19:41

lol after this you get another error @ line 69,

just remove again the last " ) " here:

Code: Select all

$ep128emuCommandline = " -cfg " & $ep128emuConfigFolder & $ep128emuConfig & " " & $ep128emuConfigFloppy & " " & $ep128emuConfigDirectory)
so it will be:

Code: Select all

$ep128emuCommandline = " -cfg " & $ep128emuConfigFolder & $ep128emuConfig & " " & $ep128emuConfigFloppy & " " & $ep128emuConfigDirectory
:lmfao:
Sebastiaan Ebeltjes | ECC Developer 2006-2016 | ECC Forum Admin | Phoenix Interactive WebMaster
[- ECC programs -]
eccUpdate, eccScriptSystem, GtkThemeSelect, DatFileUpdater (DFU), ImagePackCenter (IPC), eccDiagnostics, 3dGallery, iccImageInject
eccKameleonCode, eccCreateStartmenuShotcut, eccThirdPartyConfig (TPC), EmuMoviesDownloader (EMD), eccVideoPlayer
MobyGamesImporter (MGI), ECC Amiga GetGemusConfig.

User avatar
Phoenix
ECC Developer 2006-2016
Posts: 9057
Joined: 27 Aug 2006, 01:17
Location: Deventer, The Netherlands
Contact:

Re: Need Help with Script EP64/128

Unread post by Phoenix » 26 Feb 2011, 19:49

I added the emulator startup to the script now... so it also startup the emulator ;-) please update "eccScriptSystem.au3" to v1.1.0.6 wich includes emulator windowcontrol without starting the emulator (in plain mode).

replace your existing file with this one:
*EDIT: File removed, has been updated in update 00455
Spoiler: show

Code: Select all

; ------------------------------------------------------------------------------
; Platform               : Enterprise 64/128
; Script for             : EP128Emu
; Script version         : v1.0.0.0 BETA
; Last changed           : 2011.02.25
;
;
; Author: Sebastiaan Ebeltjes (aka Phoenix)
;
; NOTES:
;
; Nothing yet!
;
; ------------------------------------------------------------------------------

; ==============================================================================
; You need to implent this block in every script, this changes the workfolder to
; the folder where this script is executed, and loads the 'eccScriptSystem' script.
FileChangeDir(@ScriptDir)
#include "..\eccScriptSystem.au3"
; ==============================================================================

; ------------------------------------------------------------------------------
; BEGIN OF SCRIPT
; ------------------------------------------------------------------------------
; Define variables
$ep128emuConfigFolder = @Scriptdir & "\ep128-configs\"
$ep128emuConfigFloppy = "floppy.a.imageFile=" & Chr(34) & Chr(34)
$ep128emuConfigDirectory = "fileio.workingDirectory=" & Chr(34) & $eccFileEccUnpackedPath & Chr(34)

; Check if the 'Meta-Info ID' field is filled in.
If $eccMetaInfoString = "" Then
	Msgbox(64, "ECC Script", "This script requires some startup info in the 'MetaInfo' string")
	Exit
EndIf

; Check if user selected the option "unpack all files"
If $eccEmuEnableZipUnpackAll <> 1 Then
	Msgbox(64, "ECC Script", "Please enable the 'Unpack all files' option in the emulator config menu!")
	Exit
EndIf

;Get proper CFG configurationfile from the 'MetaInfo' sting inside the ECC rom properties
$ep128emuConfig = "8_EP_128k_Tape_FileIO_TASMON_UK.cfg" ; Default config

;Change the default config here if one of these strings are set:
If StringInStr($eccMetaInfoString, "EP640k")	Then $ep128emuConfig = "1_EP_640k_Tape_FileIO_TASMON_UK.cfg"		;Runs the Emulator with 640k RAM instead 128k (ca. 60 Games)
If StringInStr($eccMetaInfoString, "zrom2") 	Then $ep128emuConfig = "2_EP_128k_Tape_FileIO_TASMON_ZROM.cfg"		;Run basic-files wich needs the "zrom" (ca. 35 Games)
If StringInStr($eccMetaInfoString, "128k-Hun") 	Then $ep128emuConfig = "3_EP_128k_Tape_FileIO_TASMON_HUN.cfg"		;Run Tapefile with hungarian-config 128k (VIC20-Emulator and Game "Mad Mix 2")
If StringInStr($eccMetaInfoString, "brd") 		Then $ep128emuConfig = "4_EP_128k_Tape_FileIO_TASMON_BRD.cfg"		;Run Files wich needs the "brd.rom" (ca. 14 Basic-Games)
If StringInStr($eccMetaInfoString, "exdos") 	Then $ep128emuConfig = "4_EP_128k_Tape_FileIO_TASMON_EXDOS.cfg"		;Run Files wich needs "EXDOS.rom" (Game Sokoban 1 & Sokoban 2 only)
If StringInStr($eccMetaInfoString, "isdos") 	Then $ep128emuConfig = "6_EP_128k_Tape_FileIO_TASMON_ISDOS_UK.cfg"	;Run Emulator with ISDOS (Seastalker, Sokoban 4k)
If StringInStr($eccMetaInfoString, "autostart") Then $ep128emuConfig = "7_EP_128k_EXDOS_UK.cfg"						;Run Disk-Images (autostart / without Program loader)
If StringInStr($eccMetaInfoString, "img")		Then $ep128emuConfig = "8_EP_128k_Tape_FileIO_TASMON_UK.cfg"		;Run Disk-Images (slideshow or with Program loader/menue)
If StringInStr($eccMetaInfoString, "tape")		Then $ep128emuConfig = "9_EP_128k_Tape_FileIO_TASMON_UK_swapping_keyboard.cfg"	;Run Game in Enterprise wich needs typing j ""

If StringInStr($eccMetaInfoString, "cpc")	Then $ep128emuConfig = "8_EP_128k_Tape_FileIO_TASMON_UK.cfg"	;Run Game in the Enterprise Amstrad-Emulator
If StringInStr($eccMetaInfoString, "vic20")	Then $ep128emuConfig = "8_EP_128k_Tape_FileIO_TASMON_UK.cfg"	;Run Game in Enterprise Vic20-Emulator
If StringInStr($eccMetaInfoString, "tvc")	Then $ep128emuConfig = "8_EP_128k_Tape_FileIO_TASMON_UK.cfg"	;Run Game in Enterprise TVC-Emulator
If StringInStr($eccMetaInfoString, "zx81")	Then $ep128emuConfig = "8_EP_128k_Tape_FileIO_TASMON_UK.cfg"	;Run Game in Enterprise ZX81-Emulator

;********************************************************************************************
;* To Autorun the Games in the 4 Emulators [CPC,VIC20,TVC & ZX81] INSIDE the Emu EP128, *
;* i have decided to use a "Snapshotfile" of the "Emulated Emulator" *
;* The Games will be load, by using the %gamename_value% - Feature *
;********************************************************************************************

; Build the proper commandline
$ep128emuCommandline = " -cfg " & $ep128emuConfigFolder & $ep128emuConfig & " " & $ep128emuConfigFloppy & " " & $ep128emuConfigDirectory
; Start emulator here....
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)

If StringInStr($eccMetaInfoString, "cpc") Then
	;Run_Emulator_Send_Keys([1]%gamename_value%{Enter}||50)
	Exit
EndIf

If StringInStr($eccMetaInfoString, "vic20")	Then
	;Run_Emulator_Send_Keys([1]{F6}[1][-1]%gamename_value%[-50]{Enter}[1]run{Enter}||50)
	Exit
EndIf

If StringInStr($eccMetaInfoString, "tvc") Then
	;Run_Emulator_Send_Keys([1]%gamename_value%{Enter}||80)
	Exit
EndIf

If StringInStr($eccMetaInfoString, "zx81") Then
	;Run_Emulator_Send_Keys([2]{Enter}[2][-1]%gamename_value%[-80]{Enter}[2]r{Enter}||80)
	Exit
EndIf

;Run all other files here...
;Run_Emulator_Send_Keys([3]{Enter}[2]{F1}[-1][1]%gamepathfile%[-20]{Enter}||50)

; What todo with -snapshot %gamepathfile% ??

 ; ------------------------------------------------------------------------------
; END OF SCRIPT
; ------------------------------------------------------------------------------
Exit
Sebastiaan Ebeltjes | ECC Developer 2006-2016 | ECC Forum Admin | Phoenix Interactive WebMaster
[- ECC programs -]
eccUpdate, eccScriptSystem, GtkThemeSelect, DatFileUpdater (DFU), ImagePackCenter (IPC), eccDiagnostics, 3dGallery, iccImageInject
eccKameleonCode, eccCreateStartmenuShotcut, eccThirdPartyConfig (TPC), EmuMoviesDownloader (EMD), eccVideoPlayer
MobyGamesImporter (MGI), ECC Amiga GetGemusConfig.

User avatar
Phoenix
ECC Developer 2006-2016
Posts: 9057
Joined: 27 Aug 2006, 01:17
Location: Deventer, The Netherlands
Contact:

Re: Need Help with Script EP64/128

Unread post by Phoenix » 26 Feb 2011, 19:50

@Vicman,

Is this also nessesary to be in the commandline?

-snapshot %gamepathfile%
Sebastiaan Ebeltjes | ECC Developer 2006-2016 | ECC Forum Admin | Phoenix Interactive WebMaster
[- ECC programs -]
eccUpdate, eccScriptSystem, GtkThemeSelect, DatFileUpdater (DFU), ImagePackCenter (IPC), eccDiagnostics, 3dGallery, iccImageInject
eccKameleonCode, eccCreateStartmenuShotcut, eccThirdPartyConfig (TPC), EmuMoviesDownloader (EMD), eccVideoPlayer
MobyGamesImporter (MGI), ECC Amiga GetGemusConfig.

User avatar
Vicman
PLATINUM member
Posts: 1233
Joined: 17 Jun 2007, 16:12
Location: Germany,Bochum

Re: Need Help with Script EP64/128

Unread post by Vicman » 26 Feb 2011, 20:48

Phoenix wrote:@Vicman,

Is this also nessesary to be in the commandline?

-snapshot %gamepathfile%
well, the snapshotfiles are the "savefiles" for the "emulated emulators" vic20, cpc, zx81 & tvc .

The snapshotfile (Vic20-Emulator.ep128s) and the gamefiles (*.prg's for the vic20) are packed in one zip-file.

so, the emulator ep128emu loads the file i.e. : Vic20-Emulator.ep128s with the command "-snapshot Vic20-Emulator.ep128s"
Note: we need the 3_EP_128k_Tape_FileIO_TASMON_HUN.cfg to start the Vic20-Snapshotfile correctly !

after this, it needs to load the vic20 gamefile (.prg) [btw. for this , you have to add *.prg to the parsing-option in ecc....i've made it on my ecc]

Code: Select all

 EmuWindowControl("ep128emu")
   AutoItSetOption("SendKeyDownDelay", 100)
   Sleep(2000)  ; let ep128emu some time to load the snapshotfile "Vic20-Emulator.ep128s"
   Send("{F6}") ; opens the file directory
   Sleep(1000)
   AutoItSetOption("SendKeyDownDelay", 2)
   Send($RomFile, 1) ; select the the vic20-game *.prg
   AutoItSetOption("SendKeyDownDelay", 100)
   Send("{ENTER}")
   Sleep(1000) give some time to load the *.prg
   Send("RUN")
   Send("{ENTER}")

User avatar
Vicman
PLATINUM member
Posts: 1233
Joined: 17 Jun 2007, 16:12
Location: Germany,Bochum

Re: Need Help with Script EP64/128

Unread post by Vicman » 26 Feb 2011, 22:05

Hi again,

i've tested the new script.
It works so far, but.....

the commandline for the working directory has an type-error..... (double " on the end of the line)
so, the *.cfg is misspelled.

fileio.workingDirectory "E:\\eCC\\ecc-user\\#_AUTO_UNPACKED\\enterprise\""

must be "E:\\eCC\\ecc-user\\#_AUTO_UNPACKED\\enterprise\"

so, the emulator can't find the Game.
imagepacks:
Done: Vic20, N64, Philips VG-5000 G7000 G7400, SordM5, Amstrad GX4000, Enterprise 64/128
Progress: Atari 8bit, Dosbox, Exelvision EXL 100
Vicman's eCC-Clips on You Tube

User avatar
Phoenix
ECC Developer 2006-2016
Posts: 9057
Joined: 27 Aug 2006, 01:17
Location: Deventer, The Netherlands
Contact:

Re: Need Help with Script EP64/128

Unread post by Phoenix » 27 Feb 2011, 10:22

Hi Viman,

I don't have the problem you describe above :shifty: , if you just put these 'debug' lines before the RUN command...you can see the output :smartass:

Code: Select all

; Start emulator
msgbox(64,"test", $eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
exit
let me know what your output is, on my computer it is:
ecc_ep128_02.png
ecc_ep128_02.png (8.15 KiB) Viewed 2216 times
Sebastiaan Ebeltjes | ECC Developer 2006-2016 | ECC Forum Admin | Phoenix Interactive WebMaster
[- ECC programs -]
eccUpdate, eccScriptSystem, GtkThemeSelect, DatFileUpdater (DFU), ImagePackCenter (IPC), eccDiagnostics, 3dGallery, iccImageInject
eccKameleonCode, eccCreateStartmenuShotcut, eccThirdPartyConfig (TPC), EmuMoviesDownloader (EMD), eccVideoPlayer
MobyGamesImporter (MGI), ECC Amiga GetGemusConfig.

Locked

Who is online

Users browsing this forum: No registered users and 1 guest