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

Re: Need Help with Script EP64/128

Unread post by Vicman » 27 Feb 2011, 10:35

Yes, you are right with the message. I get the same.

But if you start the Game with the emulator, you have the GUI-Option there : File/Configuration/Save as ASCII file
and this is the output :
Spoiler: show

Code: Select all

debug.bpPriorityThreshold	0
display.blendScale	1
display.blue.brightness	0
display.blue.contrast	1
display.blue.gamma	1
display.brightness	0
display.bufferingMode	0
display.contrast	1
display.enabled	Yes
display.gamma	1.9679176
display.green.brightness	0
display.green.contrast	1
display.green.gamma	1
display.height	576
display.hueShift	0
display.lineShade	0.75
display.motionBlur	0.17
display.pixelAspectRatio	1
display.quality	1
display.red.brightness	0
display.red.contrast	1
display.red.gamma	1
display.saturation	1
display.width	768
fileio.workingDirectory	"E:\\eCC\\ecc-user\\#_AUTO_UNPACKED\\enterprise\""
floppy.a.imageFile	""
floppy.a.sectorsPerTrack	-1
floppy.a.sides	-1
floppy.a.tracks	-1
floppy.b.imageFile	""
floppy.b.sectorsPerTrack	-1
floppy.b.sides	-1
floppy.b.tracks	-1
floppy.c.imageFile	""
floppy.c.sectorsPerTrack	-1
floppy.c.sides	-1
floppy.c.tracks	-1
floppy.d.imageFile	""
floppy.d.sectorsPerTrack	-1
floppy.d.sides	-1
floppy.d.tracks	-1
ide.imageFile0	""
ide.imageFile1	""
ide.imageFile2	""
ide.imageFile3	""
joystick.autoFireFrequency	8
joystick.autoFirePulseWidth	0.5
joystick.axisThreshold	0.5
joystick.enableAutoFire	No
joystick.enableJoystick	Yes
joystick.enablePWM	No
joystick.pwmFrequency	17.5
keyboard.00.0	110
keyboard.00.1	-1
keyboard.01.0	92
keyboard.01.1	-1
keyboard.02.0	98
keyboard.02.1	-1
keyboard.03.0	99
keyboard.03.1	-1
keyboard.04.0	118
keyboard.04.1	-1
keyboard.05.0	120
keyboard.05.1	-1
keyboard.06.0	122
keyboard.06.1	-1
keyboard.07.0	65505
keyboard.07.1	-1
keyboard.08.0	104
keyboard.08.1	-1
keyboard.09.0	65509
keyboard.09.1	-1
keyboard.0A.0	103
keyboard.0A.1	-1
keyboard.0B.0	100
keyboard.0B.1	-1
keyboard.0C.0	102
keyboard.0C.1	-1
keyboard.0D.0	115
keyboard.0D.1	-1
keyboard.0E.0	97
keyboard.0E.1	-1
keyboard.0F.0	65507
keyboard.0F.1	65508
keyboard.10.0	117
keyboard.10.1	-1
keyboard.11.0	113
keyboard.11.1	-1
keyboard.12.0	121
keyboard.12.1	-1
keyboard.13.0	114
keyboard.13.1	-1
keyboard.14.0	116
keyboard.14.1	-1
keyboard.15.0	101
keyboard.15.1	-1
keyboard.16.0	119
keyboard.16.1	-1
keyboard.17.0	65289
keyboard.17.1	-1
keyboard.18.0	55
keyboard.18.1	-1
keyboard.19.0	49
keyboard.19.1	-1
keyboard.1A.0	54
keyboard.1A.1	-1
keyboard.1B.0	52
keyboard.1B.1	-1
keyboard.1C.0	53
keyboard.1C.1	-1
keyboard.1D.0	51
keyboard.1D.1	-1
keyboard.1E.0	50
keyboard.1E.1	-1
keyboard.1F.0	65307
keyboard.1F.1	-1
keyboard.20.0	65473
keyboard.20.1	-1
keyboard.21.0	65477
keyboard.21.1	-1
keyboard.22.0	65472
keyboard.22.1	-1
keyboard.23.0	65475
keyboard.23.1	-1
keyboard.24.0	65474
keyboard.24.1	-1
keyboard.25.0	65476
keyboard.25.1	-1
keyboard.26.0	65471
keyboard.26.1	-1
keyboard.27.0	65470
keyboard.27.1	-1
keyboard.28.0	56
keyboard.28.1	-1
keyboard.29.0	-1
keyboard.29.1	-1
keyboard.2A.0	57
keyboard.2A.1	-1
keyboard.2B.0	45
keyboard.2B.1	-1
keyboard.2C.0	48
keyboard.2C.1	-1
keyboard.2D.0	61
keyboard.2D.1	-1
keyboard.2E.0	65288
keyboard.2E.1	-1
keyboard.2F.0	-1
keyboard.2F.1	-1
keyboard.30.0	106
keyboard.30.1	-1
keyboard.31.0	-1
keyboard.31.1	-1
keyboard.32.0	107
keyboard.32.1	-1
keyboard.33.0	59
keyboard.33.1	-1
keyboard.34.0	108
keyboard.34.1	-1
keyboard.35.0	39
keyboard.35.1	-1
keyboard.36.0	93
keyboard.36.1	-1
keyboard.37.0	-1
keyboard.37.1	-1
keyboard.38.0	65377
keyboard.38.1	65367
keyboard.39.0	65364
keyboard.39.1	-1
keyboard.3A.0	65363
keyboard.3A.1	-1
keyboard.3B.0	65362
keyboard.3B.1	-1
keyboard.3C.0	65299
keyboard.3C.1	65360
keyboard.3D.0	65361
keyboard.3D.1	-1
keyboard.3E.0	65293
keyboard.3E.1	-1
keyboard.3F.0	65514
keyboard.3F.1	65383
keyboard.40.0	109
keyboard.40.1	-1
keyboard.41.0	65535
keyboard.41.1	-1
keyboard.42.0	44
keyboard.42.1	-1
keyboard.43.0	47
keyboard.43.1	-1
keyboard.44.0	46
keyboard.44.1	-1
keyboard.45.0	65506
keyboard.45.1	-1
keyboard.46.0	32
keyboard.46.1	-1
keyboard.47.0	65379
keyboard.47.1	-1
keyboard.48.0	105
keyboard.48.1	-1
keyboard.49.0	-1
keyboard.49.1	-1
keyboard.4A.0	111
keyboard.4A.1	-1
keyboard.4B.0	96
keyboard.4B.1	-1
keyboard.4C.0	112
keyboard.4C.1	-1
keyboard.4D.0	91
keyboard.4D.1	-1
keyboard.4E.0	-1
keyboard.4E.1	-1
keyboard.4F.0	-1
keyboard.4F.1	-1
keyboard.50.0	-1
keyboard.50.1	-1
keyboard.51.0	-1
keyboard.51.1	-1
keyboard.52.0	-1
keyboard.52.1	-1
keyboard.53.0	-1
keyboard.53.1	-1
keyboard.54.0	-1
keyboard.54.1	-1
keyboard.55.0	-1
keyboard.55.1	-1
keyboard.56.0	-1
keyboard.56.1	-1
keyboard.57.0	-1
keyboard.57.1	-1
keyboard.58.0	-1
keyboard.58.1	-1
keyboard.59.0	-1
keyboard.59.1	-1
keyboard.5A.0	-1
keyboard.5A.1	-1
keyboard.5B.0	-1
keyboard.5B.1	-1
keyboard.5C.0	-1
keyboard.5C.1	-1
keyboard.5D.0	-1
keyboard.5D.1	-1
keyboard.5E.0	-1
keyboard.5E.1	-1
keyboard.5F.0	-1
keyboard.5F.1	-1
keyboard.60.0	-1
keyboard.60.1	-1
keyboard.61.0	-1
keyboard.61.1	-1
keyboard.62.0	-1
keyboard.62.1	-1
keyboard.63.0	-1
keyboard.63.1	-1
keyboard.64.0	-1
keyboard.64.1	-1
keyboard.65.0	-1
keyboard.65.1	-1
keyboard.66.0	-1
keyboard.66.1	-1
keyboard.67.0	-1
keyboard.67.1	-1
keyboard.68.0	-1
keyboard.68.1	-1
keyboard.69.0	-1
keyboard.69.1	-1
keyboard.6A.0	-1
keyboard.6A.1	-1
keyboard.6B.0	-1
keyboard.6B.1	-1
keyboard.6C.0	-1
keyboard.6C.1	-1
keyboard.6D.0	-1
keyboard.6D.1	-1
keyboard.6E.0	-1
keyboard.6E.1	-1
keyboard.6F.0	-1
keyboard.6F.1	-1
keyboard.70.0	65465
keyboard.70.1	49153
keyboard.71.0	65463
keyboard.71.1	49152
keyboard.72.0	65461
keyboard.72.1	49155
keyboard.73.0	65455
keyboard.73.1	49154
keyboard.74.0	65451
keyboard.74.1	49168
keyboard.75.0	-1
keyboard.75.1	-1
keyboard.76.0	-1
keyboard.76.1	-1
keyboard.77.0	-1
keyboard.77.1	-1
keyboard.78.0	65462
keyboard.78.1	49157
keyboard.79.0	65460
keyboard.79.1	49156
keyboard.7A.0	65458
keyboard.7A.1	49159
keyboard.7B.0	65464
keyboard.7B.1	49158
keyboard.7C.0	65456
keyboard.7C.1	49169
keyboard.7D.0	-1
keyboard.7D.1	-1
keyboard.7E.0	-1
keyboard.7E.1	-1
keyboard.7F.0	-1
keyboard.7F.1	-1
memory.configFile	""
memory.ram.size	128
memory.rom.00.file	"roms\\exos21.rom"
memory.rom.00.offset	0
memory.rom.01.file	"roms\\exos21.rom"
memory.rom.01.offset	16384
memory.rom.02.file	""
memory.rom.02.offset	0
memory.rom.03.file	""
memory.rom.03.offset	0
memory.rom.04.file	"roms\\asmon15.rom"
memory.rom.04.offset	0
memory.rom.05.file	"roms\\asmon15.rom"
memory.rom.05.offset	16384
memory.rom.06.file	"roms\\basic21.rom"
memory.rom.06.offset	0
memory.rom.07.file	""
memory.rom.07.offset	0
memory.rom.10.file	"roms\\epfileio.rom"
memory.rom.10.offset	0
memory.rom.11.file	""
memory.rom.11.offset	0
memory.rom.12.file	""
memory.rom.12.offset	0
memory.rom.13.file	""
memory.rom.13.offset	0
memory.rom.20.file	""
memory.rom.20.offset	0
memory.rom.21.file	""
memory.rom.21.offset	0
memory.rom.22.file	""
memory.rom.22.offset	0
memory.rom.23.file	""
memory.rom.23.offset	0
memory.rom.30.file	""
memory.rom.30.offset	0
memory.rom.31.file	""
memory.rom.31.offset	0
memory.rom.32.file	""
memory.rom.32.offset	0
memory.rom.33.file	""
memory.rom.33.offset	0
memory.rom.40.file	""
memory.rom.40.offset	0
memory.rom.41.file	""
memory.rom.41.offset	0
memory.rom.42.file	""
memory.rom.42.offset	0
memory.rom.43.file	""
memory.rom.43.offset	0
sound.dcBlockFilter1Freq	10
sound.dcBlockFilter2Freq	10
sound.device	0
sound.enabled	Yes
sound.equalizer.frequency	1000
sound.equalizer.level	1
sound.equalizer.mode	-1
sound.equalizer.q	0.7071
sound.file	""
sound.highQuality	Yes
sound.hwPeriods	16
sound.latency	0.0700000001
sound.sampleRate	48000
sound.swPeriods	3
sound.volume	0.7071
tape.defaultSampleRate	24000
tape.enableSoundFileFilter	No
tape.forceMotorOn	No
tape.imageFile	""
tape.soundFileChannel	0
tape.soundFileFilterMaxFreq	5000
tape.soundFileFilterMinFreq	500
videoCapture.frameRate	50
videoCapture.yuvFormat	No
vm.cpuClockFrequency	4000000
vm.enableFileIO	Yes
vm.enableMemoryTimingEmulation	Yes
vm.processPriority	0
vm.soundClockFrequency	500000
vm.speedPercentage	100
vm.videoClockFrequency	889846
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 » 27 Feb 2011, 11:08

But if you don't find a solution for this, it would be not a big problem :
We can delete the line 29 $ep128emuConfigDirectory = "fileio.workingDirectory=" & Chr(34) & $eccFileEccUnpackedPath & Chr(34) from the script,
and the end-user has then to set the working directory manually one time on the emu-GUI. ;)

another "problem" is the line 28 : $ep128emuConfigFloppy = "floppy.a.imageFile=" & Chr(34) & Chr(34)
For "isdos" "autostart" and "img" we need : floppy.a.imageFile="E:\eCC\ecc-user\#_AUTO_UNPACKED\enterprise\GAMES_01.IMG"

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 » 27 Feb 2011, 20:54

Here is a new Beta - Script

- working directory is "disabled" in this script
- updated & renamed cfg's
- updated ecc-datfile
- working cfg's : 00-default.cfg, 01-ep640k.cfg, 02-zrom.cfg, 03-hun.cfg 04-brd.cfg, 05-exdos.cfg, 08-img.cfg
- added to script 10-dtf.cfg
- to do : 06-isdos.cfg, 07-autostart.cfg, 09-tape.cfg, 10-dtf.cfg, the 4 Snapshotfiles for the emulators [amstrad][vic20][videoton][zx81]
Spoiler: show

Code: Select all

; ------------------------------------------------------------------------------
; Platform               : Enterprise 64/128
; Script for             : EP128Emu
; Script version         : v1.0.0.1 BETA
; Last changed           : 2011.02.27
;
;
; 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 = "00-default.cfg" ; Default config

;Change the default config here if one of these strings are set:
If StringInStr($eccMetaInfoString, "[EP640k]")   Then $ep128emuConfig = "01-ep640k.cfg"      ;Runs the Emulator with 640k RAM instead 128k (ca. 7 Games)
If StringInStr($eccMetaInfoString, "[zrom]")    Then $ep128emuConfig = "02-zrom.cfg"      ;Run basic-files wich needs the "zrom" (ca. 35 Games)
If StringInStr($eccMetaInfoString, "[hun]")    Then $ep128emuConfig = "03-hun.cfg"      ;Run Tapefile with hungarian-config 128k (VIC20-Emulator and Game "Mad Mix 2")
If StringInStr($eccMetaInfoString, "[brd]")       Then $ep128emuConfig = "04-brd.cfg"      ;Run Files wich needs the "brd.rom" (ca. 14 Basic-Games)
If StringInStr($eccMetaInfoString, "[exdos]")    Then $ep128emuConfig = "05-exdos.cfg"      ;Run Files wich needs "EXDOS.rom" (Game Sokoban 1 & Sokoban 2 only)
If StringInStr($eccMetaInfoString, "[isdos]")    Then $ep128emuConfig = "06-isdos.cfg"   ;Run Emulator with ISDOS (Seastalker, Sokoban 4k)
If StringInStr($eccMetaInfoString, "[autostart]") Then $ep128emuConfig = "07-autostart.cfg"                  ;Run Disk-Images (autostart / without Program loader)
If StringInStr($eccMetaInfoString, "[img]")      Then $ep128emuConfig = "08-img.cfg"      ;Run Disk-Images (slideshow or with Program loader/menue)
If StringInStr($eccMetaInfoString, "[tape]")      Then $ep128emuConfig = "09-tape.cfg"   ;Run Game in Enterprise wich needs typing j ""
If StringInStr($eccMetaInfoString, "[dtf]")      Then $ep128emuConfig = "10-dtf.cfg"   ;Run Games wich are converted as *.dtf file 


If StringInStr($eccMetaInfoString, "[amstrad]")   Then $ep128emuConfig = "00-default.cfg"   ;Run Game in the Enterprise Amstrad-Emulator
If StringInStr($eccMetaInfoString, "[vic20]")   Then $ep128emuConfig = "00-default.cfg"   ;Run Game in Enterprise Vic20-Emulator
If StringInStr($eccMetaInfoString, "[videoton]")   Then $ep128emuConfig = "00-default.cfg"   ;Run Game in Enterprise TVC-Emulator
If StringInStr($eccMetaInfoString, "[zx81]")   Then $ep128emuConfig = "00-default.cfg"   ;Run Game in Enterprise ZX81-Emulator

If StringInStr($eccMetaInfoString, "[exdos]") Then
$ep128emuCommandline = " -cfg " & $ep128emuConfigFolder & $ep128emuConfig & " " & $ep128emuConfigFloppy & " "
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(3000)
   Send("{ENTER}")
   Sleep(7000)
   Send("{F1}")
    Sleep(500)
   AutoItSetOption("SendKeyDownDelay", 2)
   Send($RomFile, 1)
    Send("{ENTER}")
	exit
EndIf

If StringInStr($eccMetaInfoString, "[img]") Then
$ep128emuCommandline = " -cfg " & $ep128emuConfigFolder & $ep128emuConfig
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(4000)
   Send("{ENTER}")
   exit
EndIf

;********************************************************************************************
;* 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 & " "
; Start emulator here....
; Start emulator
;msgbox(64,"test", $eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
;exit
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(4000)
   Send("{ENTER}")
   Sleep(1500)
   Send("{F1}")
    Sleep(500)
   AutoItSetOption("SendKeyDownDelay", 2)
   Send($RomFile, 1)
    Send("{ENTER}")
	


If StringInStr($eccMetaInfoString, "[amstrad]") 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, "[videoton]") 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
EDIT : just renamed 08-default.cfg in 00-Default.cfg ........sorry :oops:
Attachments
ep128-configs.zip
The Updated configs
(19.44 KiB) Downloaded 41 times
eccdat_enterprise_complete.20110227_2020.eccDat.zip
Latest *.eccDat file
(48.23 KiB) Downloaded 41 times
15 for testing - Part I.zip
15 Test-Games Part I
(1013.81 KiB) Downloaded 42 times
15 for testing - Part II.zip
15 Test-Games Part II
(749.36 KiB) Downloaded 38 times
15 for testing - Part III.zip
15 Test-Games Part III
(527.77 KiB) Downloaded 44 times

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 » 01 Mar 2011, 21:02

Here is a new Beta - Script

- working directory is "disabled" in this script
- working cfg's : 00-default.cfg, 01-ep640k.cfg, 02-zrom.cfg, 03-hun.cfg, 04-brd.cfg, 05-exdos.cfg, 08-img.cfg , 10-dtf.cfg, the 4 Snapshotfiles for the emulators [amstrad][vic20][videoton][zx81]
- to do : 06-isdos.cfg, 07-autostart.cfg, 09-tape.cfg
Spoiler: show

Code: Select all

; ------------------------------------------------------------------------------
; Platform               : Enterprise 64/128
; Script for             : EP128Emu
; Script version         : v1.0.0.2 BETA
; Last changed           : 2011.03.01
;
;
; Author: Sebastiaan Ebeltjes (aka Phoenix), Vicman
;
; 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 = "00-default.cfg" ; Default config

;Change the default config here if one of these strings are set:
If StringInStr($eccMetaInfoString, "[EP640k]")   Then $ep128emuConfig = "01-ep640k.cfg"      ;Runs the Emulator with 640k RAM instead 128k (ca. 7 Games)
If StringInStr($eccMetaInfoString, "[zrom]")    Then $ep128emuConfig = "02-zrom.cfg"      ;Run basic-files wich needs the "zrom" (ca. 35 Games)
If StringInStr($eccMetaInfoString, "[hun]")    Then $ep128emuConfig = "03-hun.cfg"      ;Run Tapefile with hungarian-config 128k (VIC20-Emulator and Game "Mad Mix 2")
If StringInStr($eccMetaInfoString, "[brd]")       Then $ep128emuConfig = "04-brd.cfg"      ;Run Files wich needs the "brd.rom" (ca. 14 Basic-Games)
If StringInStr($eccMetaInfoString, "[exdos]")    Then $ep128emuConfig = "05-exdos.cfg"      ;Run Files wich needs "EXDOS.rom" (Game Sokoban 1 & Sokoban 2 only)
If StringInStr($eccMetaInfoString, "[isdos]")    Then $ep128emuConfig = "06-isdos.cfg"   ;Run Emulator with ISDOS (Seastalker, Sokoban 4k)
If StringInStr($eccMetaInfoString, "[autostart]") Then $ep128emuConfig = "07-autostart.cfg"                  ;Run Disk-Images (autostart / without Program loader)
If StringInStr($eccMetaInfoString, "[img]")      Then $ep128emuConfig = "08-img.cfg"      ;Run Disk-Images (slideshow or with Program loader/menue)
If StringInStr($eccMetaInfoString, "[tape]")      Then $ep128emuConfig = "09-tape.cfg"   ;Run Game in Enterprise wich needs typing j ""
If StringInStr($eccMetaInfoString, "[dtf]")      Then $ep128emuConfig = "10-dtf.cfg"   ;Run Games wich are converted as *.dtf file


If StringInStr($eccMetaInfoString, "[amstrad]")   Then $ep128emuConfig = "00-default.cfg"   ;Run Game in the Enterprise Amstrad-Emulator
If StringInStr($eccMetaInfoString, "[vic20]")   Then $ep128emuConfig = "00-default.cfg"   ;Run Game in Enterprise Vic20-Emulator
If StringInStr($eccMetaInfoString, "[tvc]")   Then $ep128emuConfig = "00-default.cfg"   ;Run Game in Enterprise TVC-Emulator
If StringInStr($eccMetaInfoString, "[zx81]")   Then $ep128emuConfig = "00-default.cfg"   ;Run Game in Enterprise ZX81-Emulator


; Build the proper commandline
$ep128emuCommandline = " -cfg " & $ep128emuConfigFolder & $ep128emuConfig & " " & $ep128emuConfigFloppy & " "
; Start emulator here....
; Start emulator
;msgbox(64,"test", $eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
;exit

   
If StringInStr($eccMetaInfoString, "[exdos]") Then
$ep128emuCommandline = " -cfg " & $ep128emuConfigFolder & $ep128emuConfig & " " & $ep128emuConfigFloppy & " "
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(3000)
   Send("{ENTER}")
   Sleep(7000)
   Send("{F1}")
    Sleep(500)
   AutoItSetOption("SendKeyDownDelay", 2)
   Send($RomFile, 1)
    Send("{ENTER}")
   exit
EndIf

If StringInStr($eccMetaInfoString, "[img]") Then
$ep128emuCommandline = " -cfg " & $ep128emuConfigFolder & $ep128emuConfig
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(4000)
   Send("{ENTER}")
  
   exit
EndIf

If StringInStr($eccMetaInfoString, "[dtf]") Then
$ep128emuCommandline = " -cfg " & $ep128emuConfigFolder & $ep128emuConfig & " " & $ep128emuConfigFloppy & " "
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(4000)
   Send("{ENTER}")
   Sleep(3000)
   Send("+.")
   Send("dl2")
   Send("{SPACE}")
    Send($eccFileEccUnpackedFile)
	Send("{ENTER}")	
 exit
EndIf

;********************************************************************************************
;* 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 *
;********************************************************************************************

If StringInStr($eccMetaInfoString, "[amstrad]") Then
$ep128emuCommandline = " -cfg " & $ep128emuConfigFolder & $ep128emuConfig
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(500)
     Send("!l")
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 10)
	Send("cpc.ep128s")
	Send("{ENTER}")
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 100)
	Send($eccFileEccUnpackedFile)
	Send("{ENTER}")
   Exit
EndIf

If StringInStr($eccMetaInfoString, "[vic20]")   Then
$ep128emuCommandline = " -cfg " & $ep128emuConfigFolder & $ep128emuConfig
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(500)
     Send("!l")
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 10)
	Send("Vic20.ep128s")
	Send("{ENTER}")
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 100)
	Send("{F6}")
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 10)
	Send($eccFileEccUnpackedFile)
	AutoItSetOption("SendKeyDownDelay", 100)
	Send("{ENTER}")
	Sleep(1000)
	Send("run")
	Send("{ENTER}")
	  Exit
EndIf

If StringInStr($eccMetaInfoString, "[tvc]") Then
  $ep128emuCommandline = " -cfg " & $ep128emuConfigFolder & $ep128emuConfig
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(500)
     Send("!l")
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 10)
	Send("tvc.ep128s")
	Send("{ENTER}")
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 100)
	Send($eccFileEccUnpackedFile)
	Send("{ENTER}")
   Exit
EndIf

If StringInStr($eccMetaInfoString, "[zx81]") Then
   $ep128emuCommandline = " -cfg " & $ep128emuConfigFolder & $ep128emuConfig
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(500)
     Send("!l")
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 10)
	Send("zx81.ep128s")
	AutoItSetOption("SendKeyDownDelay", 200)
	Send("{ENTER}")
	Sleep(1000)
	Send("{ENTER}")
	Sleep(500)
	AutoItSetOption("SendKeyDownDelay", 10)
	Send($eccFileEccUnpackedFile)
	AutoItSetOption("SendKeyDownDelay", 100)
	Send("{ENTER}")
	Sleep(1000)
	Send("r")
	Send("{ENTER}")
   Exit
EndIf

;*********************************************************************************************************************************


;Run all other files here...
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(4000)
   Send("{ENTER}")
   Sleep(1500)
   Send("{F1}")
    Sleep(500)
   AutoItSetOption("SendKeyDownDelay", 2)
   Send($RomFile, 1)
    Send("{ENTER}")

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

; What todo with -snapshot %gamepathfile% ??

; ------------------------------------------------------------------------------
; END OF SCRIPT
; ------------------------------------------------------------------------------


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 » 02 Mar 2011, 21:35

new Beta - Script :

- working directory is "disabled" in this script
- working cfg's : 00-default.cfg, 01-ep640k.cfg, 02-zrom.cfg, 03-hun.cfg, 04-brd.cfg, 05-exdos.cfg, 06-isdos.cfg, 08-img.cfg, 09-tape.cfg, 10-dtf.cfg, the 4 Snapshotfiles for the emulators [amstrad][vic20][videoton][zx81]
- to do : , 07-autostart.cfg (i think, we can forget this cfg, 'cause diff. Games are on one Disk.Image-File. We have only one CRC-Code for ca.5 Games....and that's not possible to list/start in eCC)

Note :
1. I've added a variable for floppy active & inactive.
2. for the snapshotfiles : I don't know, how to "write" the correct variable/commandline, for :
snapshot $eccFileEccUnpackedPath/emu.ep128s (snapshot = path & file) ?

so, i found another solution, to load the snapshots for vic20, amstrad, videoton & zx81.
It will take a little more time for loading, but it works so far.....

maybe you can help me out here....

nevertheless, here's the new Beta-Script :
Spoiler: show

Code: Select all

; ------------------------------------------------------------------------------
; Platform               : Enterprise 64/128
; Script for             : EP128Emu
; Script version         : v1.0.0.2 BETA
; Last changed           : 2011.03.01
;
;
; Author: Sebastiaan Ebeltjes (aka Phoenix), Vicman
;
; 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\"
$ep128emuConfigFloppyInactive = "floppy.a.imageFile=" & Chr(34) & Chr(34)
$ep128emuConfigFloppyActive = "floppy.a.imageFile=" & Chr(34) & $eccFileEccUnpackedPath & $eccFileEccUnpackedFile & Chr(34)
$ep128emuConfigDirectory = "fileio.workingDirectory=" & Chr(34) & $eccFileEccUnpackedPath & Chr(34)

;$ep128snapshotfile = "snapshot=" & Chr(34) & $eccFileEccUnpackedPath & emu.ep128s & Chr(34)  ; not working yet....what's the right commandline to add a snapshotfile ???

; 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 = "00-default.cfg" ; Default config

;Change the default config here if one of these strings are set:
If StringInStr($eccMetaInfoString, "[EP640k]")   Then $ep128emuConfig = "01-ep640k.cfg"      ;Runs the Emulator with 640k RAM instead 128k (ca. 7 Games)
If StringInStr($eccMetaInfoString, "[zrom]")    Then $ep128emuConfig = "02-zrom.cfg"      ;Run basic-files wich needs the "zrom" (ca. 35 Games)
If StringInStr($eccMetaInfoString, "[hun]")    Then $ep128emuConfig = "03-hun.cfg"      ;Run Tapefile with hungarian-config 128k (VIC20-Emulator and Game "Mad Mix 2")
If StringInStr($eccMetaInfoString, "[brd]")       Then $ep128emuConfig = "04-brd.cfg"      ;Run Files wich needs the "brd.rom" (ca. 14 Basic-Games)
If StringInStr($eccMetaInfoString, "[exdos]")    Then $ep128emuConfig = "05-exdos.cfg"      ;Run Files wich needs "EXDOS.rom" (Game Sokoban 1 & Sokoban 2 only)
If StringInStr($eccMetaInfoString, "[isdos]")    Then $ep128emuConfig = "06-isdos.cfg"   ;Run Emulator with ISDOS (Seastalker, Sokoban 4k)
If StringInStr($eccMetaInfoString, "[autostart]") Then $ep128emuConfig = "07-autostart.cfg"                  ;Run Disk-Images (autostart / without Program loader)
If StringInStr($eccMetaInfoString, "[img]")      Then $ep128emuConfig = "08-img.cfg"      ;Run Disk-Images (slideshow or with Program loader/menue)
If StringInStr($eccMetaInfoString, "[tape]")      Then $ep128emuConfig = "09-tape.cfg"   ;Run Game in Enterprise wich needs typing j ""
If StringInStr($eccMetaInfoString, "[dtf]")      Then $ep128emuConfig = "10-dtf.cfg"   ;Run Games wich are converted as *.dtf file


If StringInStr($eccMetaInfoString, "[amstrad]")   Then $ep128emuConfig = "00-default.cfg"   ;Run Game in the Enterprise Amstrad-Emulator
If StringInStr($eccMetaInfoString, "[vic20]")   Then $ep128emuConfig = "00-default.cfg"   ;Run Game in Enterprise Vic20-Emulator
If StringInStr($eccMetaInfoString, "[tvc]")   Then $ep128emuConfig = "00-default.cfg"   ;Run Game in Enterprise TVC-Emulator
If StringInStr($eccMetaInfoString, "[zx81]")   Then $ep128emuConfig = "00-default.cfg"   ;Run Game in Enterprise ZX81-Emulator


; Build the proper commandline
$ep128emuCommandline = " -cfg " & $ep128emuConfigFolder & $ep128emuConfig & " " & $ep128emuConfigFloppyInactive & " "
; Start emulator here....
; Start emulator
;msgbox(64,"test", $eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
;exit

   
If StringInStr($eccMetaInfoString, "[exdos]") Then
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(3000)
   Send("{ENTER}")
   Sleep(7000)
   Send("{F1}")
    Sleep(500)
   AutoItSetOption("SendKeyDownDelay", 2)
   Send($RomFile, 1)
    Send("{ENTER}")
   exit
EndIf

If StringInStr($eccMetaInfoString, "[isdos]") Then
$ep128emuCommandline = " -cfg " & $ep128emuConfigFolder & $ep128emuConfig & " " & $ep128emuConfigFloppyActive & " "
; Start emulator
;msgbox(64,"test", $eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
;exit
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(4000)
    Send("{ENTER}")
    Sleep(5000)
    Send("{LSHIFT}")
    Send("isdos")
    Send("{ENTER}")
    Sleep(4000)
    Send(StringLower($eccMetaInfoId))
    Send("{ENTER}")

exit
EndIf

If StringInStr($eccMetaInfoString, "[img]") Then
$ep128emuCommandline = " -cfg " & $ep128emuConfigFolder & $ep128emuConfig & " " & $ep128emuConfigFloppyActive & " "
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(4000)
   Send("{ENTER}")
  
   exit
EndIf

If StringInStr($eccMetaInfoString, "[tape]") Then
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(2000)
   Send("{ENTER}")
   Sleep(1500)
   Send("{F1}")
    Sleep(500)
   AutoItSetOption("SendKeyDownDelay", 2)
   Send($RomFile, 1)
    Send("{ENTER}")
	AutoItSetOption("SendKeyDownDelay", 100)
	Sleep(3000)
	Send("j")
	Sleep(500)
	Send("+{p}")
	Send("+{p}")
	Send("{ENTER}")
exit
EndIf

If StringInStr($eccMetaInfoString, "[dtf]") Then
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(4000)
   Send("{ENTER}")
   Sleep(3000)
   Send("+.")
   Send("dl2")
   Send("{SPACE}")
    Send($eccFileEccUnpackedFile)
	Send("{ENTER}")	
 exit
EndIf

;********************************************************************************************
;* 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 *
;********************************************************************************************

If StringInStr($eccMetaInfoString, "[amstrad]") Then
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(500)
     Send("!l")                                ; Alt+L loads the snapshotfile.....how to add this as commandline/variable ???
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 10)
	Send("cpc.ep128s")
	Send("{ENTER}")
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 100)
	Send($eccFileEccUnpackedFile)
	Send("{ENTER}")
   Exit
EndIf

If StringInStr($eccMetaInfoString, "[vic20]")   Then
;$ep128emuCommandline = " -cfg " & $ep128emuConfigFolder & $ep128emuConfig & " " & $ep128emuConfigFloppyInactive & " " & $ep128snapshotfile " "   ; just a test, yet
; Start emulator
;msgbox(64,"test", $eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
;exit
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(500)
     Send("!l")                                 ; Alt+L loads the snapshotfile.....how to add this as commandline/variable ???
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 10)
	Send("Vic20.ep128s")
	Send("{ENTER}")
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 100)
	Send("{F6}")
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 10)
	Send($eccFileEccUnpackedFile)
	AutoItSetOption("SendKeyDownDelay", 100)
	Send("{ENTER}")
	Sleep(1000)
	Send("run")
	Send("{ENTER}")
	  Exit
EndIf

If StringInStr($eccMetaInfoString, "[tvc]") Then
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(500)
     Send("!l")                                           ; Alt+L loads the snapshotfile.....how to add this as commandline/variable ???
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 10)
	Send("tvc.ep128s")
	Send("{ENTER}")
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 100)
	Send($eccFileEccUnpackedFile)
	Send("{ENTER}")
   Exit
EndIf

If StringInStr($eccMetaInfoString, "[zx81]") Then
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(500)
     Send("!l")                                                        ; Alt+L loads the snapshotfile.....how to add this as commandline/variable ???
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 10)
	Send("zx81.ep128s")
	AutoItSetOption("SendKeyDownDelay", 200)
	Send("{ENTER}")
	Sleep(1000)
	Send("{ENTER}")
	Sleep(500)
	AutoItSetOption("SendKeyDownDelay", 10)
	Send($eccFileEccUnpackedFile)
	AutoItSetOption("SendKeyDownDelay", 100)
	Send("{ENTER}")
	Sleep(1000)
	Send("r")
	Send("{ENTER}")
   Exit
EndIf

;*********************************************************************************************************************************


;Run all other files here...
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(4000)
   Send("{ENTER}")
   Sleep(1500)
   Send("{F1}")
    Sleep(500)
   AutoItSetOption("SendKeyDownDelay", 2)
   Send($RomFile, 1)
    Send("{ENTER}")

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

; What todo with -snapshot %gamepathfile% ?? - answer : i need the right variable for this !!! look at line 32

; ------------------------------------------------------------------------------
; END OF SCRIPT
; ----------------
--------------------------------------------------------------

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 » 13 Mar 2011, 22:13

Hi,

small update to the Script :
The "fileio.workingDirectory=" works now
Iv'e changed the line :
$ep128emuConfigDirectory = "fileio.workingDirectory=" & Chr(34) & $eccFileEccUnpackedPath & Chr(34)

into:
$ep128emuConfigDirectory = "fileio.workingDirectory=" & $eccFileEccUnpackedPath :smartass:

still having problems to add the "-snapshot" thing to the commandline....will try on
here's a new beta :
Spoiler: show

Code: Select all

; ------------------------------------------------------------------------------
; Platform               : Enterprise 64/128
; Script for             : EP128Emu
; Script version         : v1.0.0.3 BETA
; Last changed           : 2011.03.13
;
;
; Author: Sebastiaan Ebeltjes (aka Phoenix), Vicman
;
; 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\"
$ep128emuConfigFloppyInactive = "floppy.a.imageFile=" & Chr(34) & Chr(34)
$ep128emuConfigFloppyActive = "floppy.a.imageFile=" & Chr(34) & $eccFileEccUnpackedPath & $eccFileEccUnpackedFile & Chr(34)
;$ep128emuConfigDirectory = "fileio.workingDirectory=" & Chr(34) & $eccFileEccUnpackedPath & Chr(34)
$ep128emuConfigDirectory = "fileio.workingDirectory=" & $eccFileEccUnpackedPath

$ep128snapshotfile = "-snapshot=" & $eccFileEccUnpackedPath & $eccMetaInfoString  ; not working yet....what's the right commandline to add a snapshotfile ???

; 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 = "00-default.cfg" ; Default config

;Change the default config here if one of these strings are set:
If StringInStr($eccMetaInfoString, "[EP640k]")   Then $ep128emuConfig = "01-ep640k.cfg"      ;Runs the Emulator with 640k RAM instead 128k (ca. 7 Games)
If StringInStr($eccMetaInfoString, "[zrom]")    Then $ep128emuConfig = "02-zrom.cfg"      ;Run basic-files wich needs the "zrom" (ca. 35 Games)
If StringInStr($eccMetaInfoString, "[hun]")    Then $ep128emuConfig = "03-hun.cfg"      ;Run Tapefile with hungarian-config 128k (VIC20-Emulator and Game "Mad Mix 2")
If StringInStr($eccMetaInfoString, "[brd]")       Then $ep128emuConfig = "04-brd.cfg"      ;Run Files wich needs the "brd.rom" (ca. 14 Basic-Games)
If StringInStr($eccMetaInfoString, "[exdos]")    Then $ep128emuConfig = "05-exdos.cfg"      ;Run Files wich needs "EXDOS.rom" (Game Sokoban 1 & Sokoban 2 only)
If StringInStr($eccMetaInfoString, "[isdos]")    Then $ep128emuConfig = "06-isdos.cfg"   ;Run Emulator with ISDOS (Seastalker, Sokoban 4k)
If StringInStr($eccMetaInfoString, "[autostart]") Then $ep128emuConfig = "07-autostart.cfg"                  ;Run Disk-Images (autostart / without Program loader)
If StringInStr($eccMetaInfoString, "[img]")      Then $ep128emuConfig = "08-img.cfg"      ;Run Disk-Images (slideshow or with Program loader/menue)
If StringInStr($eccMetaInfoString, "[tape]")      Then $ep128emuConfig = "09-tape.cfg"   ;Run Game in Enterprise wich needs typing j ""
If StringInStr($eccMetaInfoString, "[dtf]")      Then $ep128emuConfig = "10-dtf.cfg"   ;Run Games wich are converted as *.dtf file
If StringInStr($eccMetaInfoString, "[demo]")   Then $ep128emuConfig = "00-default.cfg" ; Run Demo/Walkthr

If StringInStr($eccMetaInfoString, "[amstrad]")   Then $ep128emuConfig = "00-default.cfg"   ;Run Game in the Enterprise Amstrad-Emulator
If StringInStr($eccMetaInfoString, "[vic20]")   Then $ep128emuConfig = "00-default.cfg"   ;Run Game in Enterprise Vic20-Emulator
If StringInStr($eccMetaInfoString, "[tvc]")   Then $ep128emuConfig = "00-default.cfg"   ;Run Game in Enterprise TVC-Emulator
If StringInStr($eccMetaInfoString, "[zx81]")   Then $ep128emuConfig = "00-default.cfg"   ;Run Game in Enterprise ZX81-Emulator
If StringInStr($eccMetaInfoString, "emu.ep128s")   Then $ep128emuConfig = "00-default.cfg" ;run snapshotfile

; Build the proper commandline
$ep128emuCommandline = " -cfg " & $ep128emuConfigFolder & $ep128emuConfig & " " & $ep128emuConfigFloppyInactive & " " & $ep128emuConfigDirectory   ;just a test....well it works ;-)
; Start emulator here....
;msgbox(64,"test", $eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
;exit

   
If StringInStr($eccMetaInfoString, "[exdos]") Then
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(3000)
   Send("{ENTER}")
   Sleep(7000)
   Send("{F1}")
    Sleep(500)
   AutoItSetOption("SendKeyDownDelay", 2)
   Send($RomFile, 1)
    Send("{ENTER}")
   exit
EndIf

If StringInStr($eccMetaInfoString, "[isdos]") Then
$ep128emuCommandline = " -cfg " & $ep128emuConfigFolder & $ep128emuConfig & " " & $ep128emuConfigFloppyActive & " " & $ep128emuConfigDirectory
; Start emulator
;msgbox(64,"test", $eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
;exit
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(4000)
    Send("{ENTER}")
    Sleep(5000)
    Send("{LSHIFT}")
    Send("isdos")
    Send("{ENTER}")
    Sleep(4000)
    Send(StringLower($eccMetaInfoId))
    Send("{ENTER}")

exit
EndIf

If StringInStr($eccMetaInfoString, "[img]") Then
$ep128emuCommandline = " -cfg " & $ep128emuConfigFolder & $ep128emuConfig & " " & $ep128emuConfigFloppyActive & " " & $ep128emuConfigDirectory
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(4000)
   Send("{ENTER}")
  
   exit
EndIf

If StringInStr($eccMetaInfoString, "[tape]") Then
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(2000)
   Send("{ENTER}")
   Sleep(1500)
   Send("{F1}")
    Sleep(500)
   AutoItSetOption("SendKeyDownDelay", 2)
   Send($RomFile, 1)
    Send("{ENTER}")
	AutoItSetOption("SendKeyDownDelay", 100)
	Sleep(3000)
	Send("j")
	Sleep(500)
	Send("+{p}")
	Send("+{p}")
	Send("{ENTER}")
exit
EndIf

If StringInStr($eccMetaInfoString, "[dtf]") Then
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(4000)
   Send("{ENTER}")
   Sleep(3000)
   Send("+.")
   Send("dl2")
   Send("{SPACE}")
    Send($eccFileEccUnpackedFile)
	Send("{ENTER}")	
 exit
EndIf

If StringInStr($eccMetaInfoString, "[demo]")   Then
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(500)
     Send("!l")                                 ; Alt+L loads the snapshotfile/demo.....how to add this as commandline/variable ???
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 10)
	Send($eccFileEccUnpackedFile)
	Send("{ENTER}")
	  Exit
EndIf


;********************************************************************************************
;* 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 *
;********************************************************************************************

If StringInStr($eccMetaInfoString, "[amstrad]") Then
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(500)
     Send("!l")                                ; Alt+L loads the snapshotfile.....how to add this as commandline/variable ???
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 10)
	Send("cpc.ep128s")
	Send("{ENTER}")
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 100)
	Send($eccFileEccUnpackedFile)
	Send("{ENTER}")
   Exit
EndIf

If StringInStr($eccMetaInfoString, "[vic20]")   Then
;$ep128emuCommandline = " -cfg " & $ep128emuConfigFolder & $ep128emuConfig & " " & $ep128emuConfigFloppyInactive & " " & $ep128snapshotfile " "   ; just a test, yet
; Start emulator
;msgbox(64,"test", $eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
;exit
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(500)
     Send("!l")                                 ; Alt+L loads the snapshotfile.....how to add this as commandline/variable ???
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 10)
	Send("Vic20.ep128s")
	Send("{ENTER}")
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 100)
	Send("{F6}")
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 10)
	Send($eccFileEccUnpackedFile)
	AutoItSetOption("SendKeyDownDelay", 100)
	Send("{ENTER}")
	Sleep(1000)
	Send("run")
	Send("{ENTER}")
	  Exit
EndIf
;-----------------------------------------------------------------------------------------------------
;This is a test for autostarting the snapshot-files......don't work yet......
;------------------------------------------------------------------------------------------------------
If StringInStr($eccMetaInfoString, "emu.ep128s")   Then
$ep128emuCommandline =  " -cfg " & $ep128emuConfigFolder & $ep128emuConfig & " " & $ep128emuConfigFloppyInactive & " " & $ep128emuConfigDirectory & $ep128snapshotfile
;$ep128emuCommandline = " -cfg " & $ep128emuConfigFolder & $ep128emuConfig & " " & $ep128emuConfigFloppyInactive & " " & $ep128snapshotfile " "   ; just a test, yet
; Start emulator
;msgbox(64,"test", $eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
;msgbox(64,"test", $eccEmuEmulatorFile & $ep128emuCommandline)
;exit
;Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline) 
Run($ep128emuCommandline & $eccEmuEmulatorFile)
;EmuWindowControl("ep128emu", 0)
  ; AutoItSetOption("SendKeyDownDelay", 100)
  ;  Sleep(500)
   ;  Send("!l")                                 ; Alt+L loads the snapshotfile.....how to add this as commandline/variable ???
	;Sleep(1000)
	;AutoItSetOption("SendKeyDownDelay", 10)
	;Send("Vic20.ep128s")
	;Send("{ENTER}")
	;Sleep(1000)
	;AutoItSetOption("SendKeyDownDelay", 100)
	;Send("{F6}")
	;Sleep(1000)
	;AutoItSetOption("SendKeyDownDelay", 10)
	;Send($eccFileEccUnpackedFile)
	;AutoItSetOption("SendKeyDownDelay", 100)
	;Send("{ENTER}")
	;Sleep(1000)
	;Send("run")
	;Send("{ENTER}")
	  Exit
EndIf





If StringInStr($eccMetaInfoString, "[tvc]") Then
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(500)
     Send("!l")                                           ; Alt+L loads the snapshotfile.....how to add this as commandline/variable ???
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 10)
	Send("tvc.ep128s")
	Send("{ENTER}")
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 100)
	Send($eccFileEccUnpackedFile)
	Send("{ENTER}")
   Exit
EndIf

If StringInStr($eccMetaInfoString, "[zx81]") Then
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(500)
     Send("!l")                                                        ; Alt+L loads the snapshotfile.....how to add this as commandline/variable ???
	Sleep(1000)
	AutoItSetOption("SendKeyDownDelay", 10)
	Send("zx81.ep128s")
	AutoItSetOption("SendKeyDownDelay", 200)
	Send("{ENTER}")
	Sleep(1000)
	Send("{ENTER}")
	Sleep(500)
	AutoItSetOption("SendKeyDownDelay", 10)
	Send($eccFileEccUnpackedFile)
	AutoItSetOption("SendKeyDownDelay", 100)
	Send("{ENTER}")
	Sleep(1000)
	Send("r")
	Send("{ENTER}")
   Exit
EndIf

;*********************************************************************************************************************************


;Run all other files here...
Run($eccEmuEmulatorPath & $eccEmuEmulatorFile & $ep128emuCommandline)
EmuWindowControl("ep128emu", 0)
   AutoItSetOption("SendKeyDownDelay", 100)
    Sleep(4000)
   Send("{ENTER}")
   Sleep(1500)
   Send("{F1}")
    Sleep(500)
   AutoItSetOption("SendKeyDownDelay", 2)
   Send($RomFile, 1)
    Send("{ENTER}")

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

; What todo with -snapshot %gamepathfile% - answer : i need the right variable for this ! look at line 32

; ------------------------------------------------------------------------------
; END OF SCRIPT
; ------------------------------------------------------------------------------
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 Apr 2011, 14:27

Closed!, 1.0.0.4 BETA script has been put here by Vicman: http://ecc.phoenixinteractive.nl/viewto ... =31&t=4450
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