VIC-20 Multicart roms

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
Phoenix
ECC Developer 2006-2016
Posts: 9057
Joined: 27 Aug 2006, 01:17
Location: Deventer, The Netherlands
Contact:

Re: VIC-20 Multicart roms

Unread post by Phoenix » 06 Nov 2012, 20:08

Hmmm that's wierd i thought ASCII codes where stable and not affected by keyboard settings...oh well...i'll put in a note in the script for German users.

But...i will give you another test script soon, to try some other things out that might work :P
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: VIC-20 Multicart roms

Unread post by Phoenix » 07 Nov 2012, 19:15

Hi Vicman,

Could you try this script please?, i want to know the output on your machine (post it here...or a screen is also welcome ;-))

Extract to your ECC ROOT folder and start 'KBlayout.bat'
Thanks!
Attachments
KBlayout.zip
(644 Bytes) Downloaded 27 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: VIC-20 Multicart roms

Unread post by Vicman » 07 Nov 2012, 19:25

Hi Phoenix,
here you are :
Attachments
keyboard layout.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: VIC-20 Multicart roms

Unread post by Phoenix » 07 Nov 2012, 19:29

Thanks Vicman,

I will use this variable to let every German layout use the SZS (instad of SYS), so the script works for most users! :thumbsup:
Thank you for testing!
KBlayout.png
KBlayout.png (28.03 KiB) Viewed 981 times
source:
http://www.science.co.il/language/locale-codes.asp
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: VIC-20 Multicart roms

Unread post by Phoenix » 07 Nov 2012, 19:41

Hi Vicman,

This should be it :clown: ....extract contents to your ECC-SCRIPT folder and test it out please, if all works i'll take this with the next update!
Attachments
xvic_script_2001.zip
(6.82 KiB) Downloaded 29 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: VIC-20 Multicart roms

Unread post by Vicman » 07 Nov 2012, 20:09

Perfect !
All roms are working nice. :swing:

I still have a feature request for using eCC (VIC-20) with XPadder....(autostart XPadder with the right settings for the selected game)
but this is another story.......

For now : Thank You, Phoenix ! Great work :thumbsup:
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: VIC-20 Multicart roms

Unread post by Vicman » 07 Nov 2012, 21:35

Hi Phoenix,
i've added a new line to the vic20-ecc script. :surrender:
'cause one game (Amidar) needs a special memory setting.....
If StringInStr($eccMetaInfoId, "[Block1,5]") Then $VicCommandline = $VicCommandline & "-memory 1,5 "
Meta ID for Amidar is : [prg][Block1,5][pal]
Spoiler: show

Code: Select all

; Platform               : Commodore VIC-20
; Script for             : VICE emulator (xvic.exe) (tested with v2.3.x)
; Script version         : v2.2.0.1
; Last changed           : 2012.11.06
;
; 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
; ------------------------------------------------------------------------------
; SET additional variables for script
Global $VicIni = $eccEmuEmulatorPath & "vice.ini"
Global $VicCommandline = " "

; Check if the 'Meta-Info ID' field is filled in.
If $eccMetaInfoId = "" Then ; META INFO ID is not present
	; Check if 'PrgInfo.exe' exists in the script folder
	If FileExists($eccSystemEccFolder & "\ecc-script\vic20\PrgInfo.exe") <> 1 Then
	        MsgBox(0, $eccSystemName, "PRG Info '" & $eccSystemEccFolder & "\ecc-script\vic20\PrgInfo.exe' not found!")
	        Exit
	EndIf

	;First we need to 'catch' the right setting from 'PRGInfo'
	Run(@ScriptDir & "\PrgInfo.exe " & $RomFile) ; start 'PRGInfo' (using chr34 to put rom in quotes)
	WinWait("PRGInfo ", "", 10) ; wait until 'PRGInfo' is loaded
	$prg_info = WinGetText("PRGInfo ", "") ; Get the text from the PRG info windows and put it in a variable
	WinClose("PRGInfo ", "") ; close 'PRGinfo'

	; Get the 'cpu settings' string from 'PRGinfo'
	For $search_cpu = 1 to StringLen($prg_info)
		If StringMid($prg_info, $search_cpu, 14) = "--------------" Then ; Check if string is found
			$search_cpu_found = $search_cpu + 16 ; go 2 bytes further to get the good 'cpu string'
		EndIf
	Next

	; ROM files
	If StringMid($prg_info, $search_cpu_found, 8) = "Vic20 4K" Then $VicCommandline = $VicCommandline & "-memory 3k "
	If StringMid($prg_info, $search_cpu_found, 8) = "Vic20 8K" Then $VicCommandline = $VicCommandline & "-memory 8k "
	; BASIC files
	If StringMid($prg_info, $search_cpu_found, 16) = "Unexpanded Vic20" Then $VicCommandline = $VicCommandline & "-memory none "
	If StringMid($prg_info, $search_cpu_found, 13) = "Vic20 with 3K" Then $VicCommandline = $VicCommandline & "-memory 3k "
	If StringMid($prg_info, $search_cpu_found, 13) = "Vic20 with 8K" Then $VicCommandline = $VicCommandline & "-memory 8k "
	If StringMid($prg_info, $search_cpu_found, 14) = "Vic20 with 16K" Then $VicCommandline = $VicCommandline & "-memory 16k "
	If StringMid($prg_info, $search_cpu_found, 14) = "Vic20 with 24K" Then $VicCommandline = $VicCommandline & "-memory 24k "
	; Other
	If StringMid($prg_info, $search_cpu_found, 26) = "Vic20 With Super Expander" Then $VicCommandline = $VicCommandline & "-memory 8k "
	If StringMid($prg_info, $search_cpu_found, 46) = "Vic20 graphics memory (standard 5K) or C64/128" Then $VicCommandline = $VicCommandline & "-memory 8k "
	If StringMid($prg_info, $search_cpu_found, 42) = "Commodore64/128 or Vic20 with 3K expansion" Then $VicCommandline = $VicCommandline & "-memory 3k "
	; Not supported
	If StringMid($prg_info, $search_cpu_found, 13) = "Commodore 128" Then
	        MsgBox(0, $eccSystemName, "No setting found for 'Commodore 128 (Or expanded Vic20 with altered basic memory address)'")
	        Exit
	EndIf
	If StringMid($prg_info, $search_cpu_found, 64) = "Expanded Vic20, saved from manually altered basic memory address" Then
	        MsgBox(0, $eccSystemName, "No setting found for 'Expanded Vic20, saved from manually altered basic memory address'")
	        Exit
	EndIf
	If StringMid($prg_info, $search_cpu_found, 12) = "Commodore 64" Then
	        MsgBox(0, $eccSystemName, "No setting found for 'Commodore 64 (Or Expanded Vic20, saved from manually altered basic memory address)'")
	        Exit
	Endif
	If StringMid($prg_info, $search_cpu_found, 30) = "Cassette buffer or sprite data" Then
	        MsgBox(0, $eccSystemName, "No setting found for 'Cassette buffer or sprite data'")
	        Exit
	EndIf
	If StringMid($prg_info, $search_cpu_found, 16) = "Commodore 64/128" Then
	        MsgBox(0, $eccSystemName, "No setting found for 'Commodore 64/128'")
	        Exit
	EndIf
Else
	; META INFO ID is present
	; Get information to run in NTSC or PAL.
	If StringInStr($eccMetaInfoId, "[ntsc]") Then $VicCommandline = $VicCommandline & "-ntsc "
	If StringInStr($eccMetaInfoId, "[pal]") Then $VicCommandline = $VicCommandline & "-pal "

	; Set memorybanks for VIC-20
	If StringInStr($eccMetaInfoId, "[unexp]") Then $VicCommandline = $VicCommandline & "-memory none "
	If StringInStr($eccMetaInfoId, "[all]") Then $VicCommandline = $VicCommandline & "-memory all "
	If StringInStr($eccMetaInfoId, "[3k]") Then $VicCommandline = $VicCommandline & "-memory 3k "
	If StringInStr($eccMetaInfoId, "[8k]") Then $VicCommandline = $VicCommandline & "-memory 8k "
	If StringInStr($eccMetaInfoId, "[16k]") Then $VicCommandline = $VicCommandline & "-memory 16k "
	If StringInStr($eccMetaInfoId, "[24k]") Then $VicCommandline = $VicCommandline & "-memory 24k "
	If StringInStr($eccMetaInfoId, "[Block1,5]") Then $VicCommandline = $VicCommandline & "-memory 1,5 "

	If StringInStr($eccMetaInfoId, "[multi]") Then
		; Settings for MULTI catridges
		If StringInStr($eccFileEccUnpackedFile, "[A000]") Then $MultiStringAvailable = "[A000]"
		If StringInStr($eccFileEccUnpackedFile, "[B000]") Then $MultiStringAvailable = "[B000]"
		If StringInStr($eccFileEccUnpackedFile, "[2000]") Then $MultiStringAvailable = "[2000]"
		If StringInStr($eccFileEccUnpackedFile, "[4000]") Then $MultiStringAvailable = "[4000]"
		If StringInStr($eccFileEccUnpackedFile, "[6000]") Then $MultiStringAvailable = "[6000]"

		If StringInStr($eccMetaInfoId, "[a0]") Then
			Global $RomFile_a0 = StringReplace($eccFileEccUnpackedFile, $MultiStringAvailable, "[A000]")
			$VicCommandline = $VicCommandline & "-cartA " & Chr(34) & $eccFileEccUnpackedPath & $RomFile_a0 & Chr(34) & " "
		EndIf

		If StringInStr($eccMetaInfoId, "[b0]") Then
			Global $RomFile_b0 = StringReplace($eccFileEccUnpackedFile, $MultiStringAvailable, "[B000]")
			$VicCommandline = $VicCommandline & "-cartB " & Chr(34) & $eccFileEccUnpackedPath & $RomFile_b0 & Chr(34) & " "
		EndIf

		If StringInStr($eccMetaInfoId, "[20]") Then
			Global $RomFile_20 = StringReplace($eccFileEccUnpackedFile, $MultiStringAvailable, "[2000]")
			$VicCommandline = $VicCommandline & "-cart2 " & Chr(34) & $eccFileEccUnpackedPath & $RomFile_20 & Chr(34) & " "
		EndIf

		If StringInStr($eccMetaInfoId, "[40]") Then
			Global $RomFile_40 = StringReplace($eccFileEccUnpackedFile, $MultiStringAvailable, "[4000]")
			$VicCommandline = $VicCommandline & "-cart4 " & Chr(34) & $eccFileEccUnpackedPath & $RomFile_40 & Chr(34) & " "
		EndIf

		If StringInStr($eccMetaInfoId, "[60]") Then
			Global $RomFile_60 = StringReplace($eccFileEccUnpackedFile, $MultiStringAvailable, "[6000]")
			$VicCommandline = $VicCommandline & "-cart6 " & Chr(34) & $eccFileEccUnpackedPath & $RomFile_60 & Chr(34) & " "
		EndIf

	Else
		; Settings for SINGLE catridges
		If StringInStr($eccMetaInfoId, "[a0]") Then $VicCommandline = $VicCommandline & "-cartA "
		If StringInStr($eccMetaInfoId, "[b0]") Then $VicCommandline = $VicCommandline & "-cartB "
		If StringInStr($eccMetaInfoId, "[20]") Then $VicCommandline = $VicCommandline & "-cart2 "
		If StringInStr($eccMetaInfoId, "[40]") Then $VicCommandline = $VicCommandline & "-cart4 "
		If StringInStr($eccMetaInfoId, "[60]") Then $VicCommandline = $VicCommandline & "-cart6 "
		$VicCommandline = $VicCommandline & $RomFile
	EndIf
EndIf

Run($Emulator & " " & $VicCommandline)
ToolTip("Running script, please wait...", @DesktopWidth/2, @DesktopHeight/2, "XVIC Script", 1, 6)

If StringInStr($eccMetaInfoId, "[sys") Then ;Autoload the ROM
	;Get the SYS value
	$SysValueRaw1 = StringSplit($eccMetaInfoId, "[sys", 1)
	$SysValueRaw2 = StringSplit($SysValueRaw1[2], "]", 1)
	Global $SysValue = $SysValueRaw2[1]

	AutoItSetOption("SendKeyDownDelay", 300)
	EmuWindowControl("VICE: VIC20", 0)

	; Load GAME ROM
	If $eccFileRomExtension = "crt" Then
		Sleep(4000) ;CRT load faster.
	Else
		Sleep(8000)	;PRG (and others?) load slower.
	EndIf
	Global $KBLayout = GetActiveKeyboardLayout(WinGetHandle(''))
	If $KBLayout = "0407" Or $KBLayout = "1407" Or $KBLayout = "1007" Or $KBLayout = "807" Then
		Send("szs" & $SysValue) ;Keyboardsetting for Germany (Y=Z)
	Else
		Send("sys" & $SysValue) ;Keyboardsetting for most users.
	EndIf
	Send("{ENTER}")
EndIf

ToolTip("")
; ------------------------------------------------------------------------------
; END OF SCRIPT
; ------------------------------------------------------------------------------
Exit
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: VIC-20 Multicart roms

Unread post by Phoenix » 07 Nov 2012, 22:08

Great work Vicman! :thumb:

ECC is again one step closer for perfect VIC20 handling haha :lmfao:

I'll take your adjustements to the script in the next update!
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.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests