MydknyteStyrm Posted June 25, 2014 Posted June 25, 2014 I want to use WinVice SDL (with virtual keyboard option) for my cab setup. Using the WinVice.ahk module provided, and both SDL and regular emulators are 2.4, I have run into a snag. With the regular WinVice emulator, the games load up no problem via HLHQ. With the SDL emulator, I get this error "There was an error waiting for the window "ahk_class VICE". Please check you have the correct version emulator installed for this module, followed any notes in the module, and have this emulator working outside your Frontend first. Also turn off Fade to see if you are hiding your problem." Any ideas? My DaemonTools is set to False, and my SCSI is set to true. But those options I never really used anyway for other virtual drive emulators. Thanks! 17:36:24:760 | HL | INFO | +N/A | Main - HyperLaunch v3.0.1.1c 17:36:24:812 | HL | INFO | +47 | Main - System Specs: HyperLaunch Dir: C:\Hyperspin\HyperLaunch OS: Microsoft Windows 7 Ultimate SKU: Ultimate Total Memory: 16321.60 MB Free Memory: 13803.45 MB Used Memory: 2518.148 MB SystemType: x64-based PC Physical Processors: 1 Logical Processors: 4 GPU 1 Name: NVIDIA GeForce GTX 650 Ti GPU 1 RAM: -2048.00 MB GPU 1 Driver Version: 9.18.13.1090 Sound 1 Device: NVIDIA High Definition Audio Sound 1 Status: Enabled Sound 2 Device: Bluetooth Audio Device Sound 2 Status: Enabled Sound 3 Device: Realtek High Definition Audio Sound 3 Status: Enabled OS Language: English_United_States OS Admin Status: Yes Monitor #1 (\\.\DISPLAY1): 1360x768 (1360x728 work) AutoHotkey Path: C:\Program Files\AutoHotkey\AutoHotkey.exe AHK Version: 1.1.09.04 Unicode: No 17:36:24:812 | HL | INFO | +0 | Main - HyperSpin.exe coordinates are x y w h 17:36:24:812 | HL | INFO | +0 | CheckFile - Checking if C:\Hyperspin\HyperLaunch\HyperLaunch.exe exists 17:36:24:813 | HL | INFO | +0 | Main - HyperLaunch received "Commodore 64" and "Karateka" 17:36:24:816 | HL | INFO | +15 | Main - Karateka is using the default emulator: WinVICE 17:36:24:816 | HL | INFO | +0 | Main - Checking for a [WinVICE] section in C:\Hyperspin\HyperLaunch\Settings\Commodore 64\Emulators.ini 17:36:24:816 | HL | INFO | +0 | Main - Checking for a [WinVICE] section in C:\Hyperspin\HyperLaunch\Settings\Global Emulators.ini 17:36:24:817 | HL | INFO | +0 | Main - Found [WinVICE] in C:\Hyperspin\HyperLaunch\Settings\Global Emulators.ini 17:36:24:817 | HL | INFO | +0 | CheckFile - Checking if C:\Hyperspin\HyperLaunch\Modules\WinVICE\WinVICE.ahk exists 17:36:24:820 | HL | INFO | +0 | Main - CRC Check - CRC matches, this is an official unedited module. 17:36:24:820 | HL | INFO | +0 | Main - Karateka will use module: C:\Hyperspin\HyperLaunch\Modules\WinVICE\WinVICE.ahk 17:36:24:827 | HL | INFO | +0 | Main - Using standard method with "Rom Extension" SkipChecks or without any SkipChecks. 17:36:24:828 | HL | INFO | +0 | Main - INI Keys read 17:36:24:828 | HL | INFO | +0 | CheckFile - Checking if C:\Hyperspin\HyperLaunch\Module Extensions\7z.exe exists 17:36:24:829 | HL | INFO | +0 | CheckFile - Checking if C:\Hyperspin\HyperLaunch\Module Extensions\7z.dll exists 17:36:24:829 | HL | INFO | +0 | CheckPaths - Started 17:36:24:829 | HL | INFO | +0 | CheckPaths - Found rom: C:\Users\MCP\Desktop\Console Systems\Commodore 64\WinVice SDL x64\SDLVICE-2.4-win64-x64\roms\Karateka.d64 17:36:24:829 | HL | INFO | +0 | CheckFile - Checking if C:\Users\MCP\Desktop\Console Systems\Commodore 64\WinVice SDL x64\SDLVICE-2.4-win64-x64\x64.exe exists 17:36:24:830 | HL | INFO | +0 | CheckPaths - Ended 17:36:24:830 | HL | INFO | +0 | BuildScript - User Variables: ;---------------------------------------------------------------------------- ; INJECTED VARIABLES ;---------------------------------------------------------------------------- #NoTrayIcon #InstallKeybdHook DetectHiddenWindows, ON SetTitleMatchMode, 2 SendMode, Event 0 = 2 hlMode = frontendPID = 0 frontendPath = C:\Hyperspin frontendExe = HyperSpin.exe frontendExt = exe frontendName = HyperSpin frontendDrive = C: exitEmulatorKey = ~Esc exitEmulatorKeyWait = 0 forceHoldKey = ~Esc restoreFE = false exitScriptKey = ~q & ~s toggleCursorKey = ~e & ~t emuFullPath = C:\Users\MCP\Desktop\Console Systems\Commodore 64\WinVice SDL x64\SDLVICE-2.4-win64-x64\x64.exe emuPath = C:\Users\MCP\Desktop\Console Systems\Commodore 64\WinVice SDL x64\SDLVICE-2.4-win64-x64 emuName = WinVICE emuExt = exe romPath = C:\Users\MCP\Desktop\Console Systems\Commodore 64\WinVice SDL x64\SDLVICE-2.4-win64-x64\roms romPathFromIni = C:\Users\MCP\Desktop\Console Systems\Commodore 64\WinVice SDL x64\SDLVICE-2.4-win64-x64\roms romExtension = .d64 romExtensionOrig = .d64 romExtensions = 7z|zip|crt|d64|tap|prg|t64|nib executable = x64.exe systemName = Commodore 64 dbName = Karateka romName = Karateka romMapPath = romMappingEnabled = false romMappingLaunchMenuEnabled = false romMappingFirstMatchingExt = false romMappingShowAllRomsInArchive = true romMappingNumberOfWheelsByScreen = 7 romMappingMenuWidth = 300 romMappingMenuMargin = 50 romMappingTextFont = Bebas Neue romMappingTextOptions = cFFFFFFFF r4 s40 Bold romMappingDisabledTextColor = ff888888 romMappingTextSizeDifference = 5 romMappingTextMargin = 10 romMappingTitleTextFont = Bebas Neue romMappingTitleTextOptions = cFFFFFFFF r4 s60 Bold romMappingTitle2TextFont = Bebas Neue romMappingTitle2TextOptions = cFFFFFFFF r4 s15 Bold romMappingGameInfoTextFont = Bebas Neue romMappingGameInfoTextOptions = cFFFFFFFF r4 s15 Regular romMappingBackgroundBrush = aa000000 romMappingColumnBrush = 33000000 romMappingButtonBrush1 = 6f000000 romMappingButtonBrush2 = 33000000 romMappingBackgroundAlign = Stretch and Lose Aspect romMappingMenuFlagWidth = 40 romMappingMenuFlagSeparation = 5 romMappingDefaultMenuList = FullList romMappingSingleFilteredRomAutomaticLaunch = false skipchecks = false romMatchExt = true blockInputTime = 0 blockInputFile = errorLevelReporting = false logFile = C:\Hyperspin\HyperLaunch\HyperLaunch.log logLabel := [" INFO"," WARNING"," ERROR"," DEBUG1"," DEBUG2"] logLevel = 3 logIncludeModule = true logIncludeFileProperties = true logShowCommandWindow = false logCommandWindow = false sysLang = English_United_States navUpKey = Up navDownKey = Down navLeftKey = Left navRightKey = Right navSelectKey = Enter navP2UpKey = Numpad8 navP2DownKey = Numpad2 navP2LeftKey = Numpad4 navP2RightKey = Numpad6 navP2SelectKey = NumpadEnter originalWidth = 1360 originalHeight = 768 dtEnabled = false dtPath = C:\Program Files (x86)\DAEMON Tools Lite\DTLite.exe dtUseSCSI = true dtAddDrive = true emuIdleShutdown = 0 hideCursor = false hideEmu = false hideFE = false fadeIn = false fadeInDuration = 500 fadeInTransitionAnimation = DefaultAnimateFadeIn fadeInDelay = 0 fadeInExitDelay = 0 fadeOutExitDelay = 0 fadeOut = false fadeOutExtraScreen = false fadeOutDuration = 500 fadeOutTransitionAnimation = DefaultAnimateFadeOut fadeOutDelay = 0 fadeLyrInterpolation = 7 fadeLyr1Color = FF000000 fadeLyr1AlignImage = Align to Top Left fadeLyr2Pos = Bottom Right Corner fadeLyr2X = 300 fadeLyr2Y = 300 fadeLyr2Adjust = 1 fadeLyr2PicPad = 0 fadeLyr3Pos = Center fadeLyr3X = 300 fadeLyr3Y = 300 fadeLyr3Adjust = 0.75 fadeLyr3Speed = 750 fadeLyr3Animation = DefaultFadeAnimation fadeLyr37zAnimation = DefaultFadeAnimation fadeLyr3Type = imageandbar fadeLyr3ImgFollow7zProgress = true fadeLyr3Repeat = 1 fadeLyr3PicPad = 0 fadeLyr4Adjust = 0.75 fadeLyr4X = 100 fadeLyr4Y = 100 fadeLyr4Pos = Above Layer 3 - Left fadeLyr4FPS = 10 fadeLyr4PicPad = 0 fadeTranspGifColor = FFFFFF fadeBarWindow = false fadeBarWindowX = fadeBarWindowY = fadeBarWindowW = 600 fadeBarWindowH = 120 fadeBarWindowR = 20 fadeBarWindowM = 20 fadeBarWindowHatchStyle = 8 fadeBarBack = true fadeBarBackColor = FF555555 fadeBarH = 20 fadeBarR = 5 fadeBarColor = DD00BFFF fadeBarHatchStyle = 3 fadeBarPercentageText = true fadeBarInfoText = true fadeBarXOffset = 0 fadeBarYOffset = 100 fadeRomInfoDescription = text fadeRomInfoSystemName = text fadeRomInfoYear = text fadeRomInfoManufacturer = text fadeRomInfoGenre = text fadeRomInfoRating = text fadeRomInfoOrder = Description|SystemName|Year|Manufacturer|Genre|Rating fadeRomInfoTextPlacement = topRight fadeRomInfoTextMargin = 5 fadeRomInfoText1Options = cFF555555 r4 s20 Bold fadeRomInfoText2Options = cFF555555 r4 s20 Bold fadeRomInfoText3Options = cFF555555 r4 s20 Bold fadeRomInfoText4Options = cFF555555 r4 s20 Bold fadeRomInfoText5Options = cFF555555 r4 s20 Bold fadeRomInfoText6Options = cFF555555 r4 s20 Bold fadeStats_Number_of_Times_Played = text with label fadeStats_Last_Time_Played = text with label fadeStats_Average_Time_Played = text with label fadeStats_Total_Time_Played = text with label fadeStats_System_Total_Played_Time = text with label fadeStats_Total_Global_Played_Time = text with label fadeStatsInfoOrder = Number_of_Times_Played|Last_Time_Played|Average_Time_Played|Total_Time_Played|System_Total_Played_Time|Total_Global_Played_Time fadeStatsInfoTextPlacement = topLeft fadeStatsInfoTextMargin = 5 fadeStatsInfoText1Options = cFF555555 r4 s20 Bold fadeStatsInfoText2Options = cFF555555 r4 s20 Bold fadeStatsInfoText3Options = cFF555555 r4 s20 Bold fadeStatsInfoText4Options = cFF555555 r4 s20 Bold fadeStatsInfoText5Options = cFF555555 r4 s20 Bold fadeStatsInfoText6Options = cFF555555 r4 s20 Bold fadeText1X = 0 fadeText1Y = 0 fadeText1Options = cFFFFFFFF r4 s20 Right Bold fadeText1 = Loading Game fadeText2X = 0 fadeText2Y = 0 fadeText2Options = cFFFFFFFF r4 s20 Right Bold fadeText2 = Extraction Complete fadeFont = Arial fadeSystemAndRomLayersOnly = false fadeInterruptKey = detectFadeErrorEnabled = true fadeImgPath = C:\Hyperspin\Media\Fade HLDataPath = C:\Hyperspin\HyperLaunch\Data HLMediaPath = C:\Hyperspin\Media HLErrSoundPath = C:\Hyperspin\Media\Sounds\Error modulesPath = C:\Hyperspin\HyperLaunch\Modules moduleFullName = C:\Hyperspin\HyperLaunch\Modules\WinVICE\WinVICE.ahk moduleName = WinVICE modulePath = C:\Hyperspin\HyperLaunch\Modules\WinVICE moduleExtension = ahk moduleExtensionsPath = C:\Hyperspin\HyperLaunch\Module Extensions libPath = C:\Hyperspin\HyperLaunch\Lib 7zEnabled = false 7zPath = C:\Hyperspin\HyperLaunch\Module Extensions\7z.exe 7zDllPath = C:\Hyperspin\HyperLaunch\Module Extensions\7z.dll 7zExtractPath = C:\Users\MCP\AppData\Local\Temp\HS 7zExtractPathOrig = 7zAttachSystemName = false 7zDelTemp = true 7zSounds = true 7zFormats = .zip,.rar,.7z,.lzh,.gzip,.tar 7zFormatsNoP = zip,rar,7z,lzh,gzip,tar mgEnabled = false mgKey = ~NumpadSub mgBackgroundColor = FF000000 mgSidePadding = 0.2 mgYOffset = 500 mgImageAdjust = 0 mgFont = Arial mgText1Options = x10p y30p w80p Center cBBFFFFFF r4 s100 BoldItalic mgText1Text = Please select a game mgText2Options = w96p cFFFFFFFF r4 s50 Center BoldItalic mgText2Offset = 70 mgUseSound = true mgSoundfreq = 300 mgExitEffect = none mgSelectedEffect = rotate mgUseGameArt = false mgArtworkDir = Artwork1 hpEnabled = true hpKey = ~NumpadAdd hpBackToMenuBarKey = X hpZoomInKey = C hpZoomOutKey = V hpScreenshotKey = ~PrintScreen hpHiToTextPath = C:\Hyperspin\HyperLaunch\Module Extensions\HiToText.exe hpSaveStateKeyCodes = hpLoadStateKeyCodes = keymapperEnabled = false keymapperAHKMethod = false keymapper = xpadderFullPath = C:\Hyperspin\Utilities\Xpadder\xpadder.exe joyToKeyFullPath = C:\Hyperspin\Utilities\JoyToKey\JoyToKey.exe keymapperProfilePath = C:\Hyperspin\HyperLaunch\Profiles\ keymapperFrontEndProfileName = HyperSpin keymapperFrontEndProfile = false keymapperHyperLaunchProfileEnabled = false JoyIDsEnabled = false JoyIDsPreferredControllersSystem = use_global JoyIDsPreferredControllersGlobal = use_global CustomJoyNamesEnabled = false CustomJoyNames = FEProfile = C:\Hyperspin\HyperLaunch\Profiles\\HyperSpin defaultProfile = C:\Hyperspin\HyperLaunch\Profiles\\_Default systemProfile = C:\Hyperspin\HyperLaunch\Profiles\\Commodore 64 xPadderSystemProfile = C:\Hyperspin\HyperLaunch\Profiles\\Commodore 64\_Default emuProfile = C:\Hyperspin\HyperLaunch\Profiles\\Commodore 64\WinVICE romProfile = C:\Hyperspin\HyperLaunch\Profiles\\Commodore 64\Karateka HyperLaunchProfile = C:\Hyperspin\HyperLaunch\Profiles\\HyperLaunch blankProfile = C:\Hyperspin\HyperLaunch\Profiles\\blank ahkFEProfile = C:\Hyperspin\HyperLaunch\Profiles\AHK\HyperSpin ahkDefaultProfile = C:\Hyperspin\HyperLaunch\Profiles\AHK\_Default ahkSystemProfile = C:\Hyperspin\HyperLaunch\Profiles\AHK\Commodore 64 ahkEmuProfile = C:\Hyperspin\HyperLaunch\Profiles\AHK\Commodore 64\WinVICE ahkRomProfile = C:\Hyperspin\HyperLaunch\Profiles\AHK\Commodore 64\Karateka ahkHyperLaunchProfile = C:\Hyperspin\HyperLaunch\Profiles\AHK\HyperLaunch bezelEnabled = false statisticsEnabled = true 17:36:24:830 | HL | INFO | +0 | BuildScript - Loaded XHotkey Init.ahk scripts 17:36:24:830 | HL | INFO | +0 | CheckFile - Checking if C:\Hyperspin\HyperLaunch\Module Extensions\VA.ahk exists 17:36:24:832 | HL | INFO | +16 | BuildScript - Loaded HyperPause Init.ahk scripts 17:36:24:832 | HL | INFO | +0 | BuildScript - Loaded Statistics Init.ahk scripts 17:36:24:832 | HL | INFO | +0 | BuildScript - Loaded User Functions Init.ahk script 17:36:24:834 | HL | INFO | +0 | BuildScript - Module: MEmu = WinVICE MEmuV = v2.4 MURL = http://vice-emu.sourceforge.net/ MAuthor = djvj,wahoobrian,brolly MVersion = 2.0.2 MCRC = BA37ED39 iCRC = DAA4D1EA MID = 635038268966170754 MSystem = "Commodore 64","Commodore 16 & Plus4","Commodore VIC-20" ;---------------------------------------------------------------------------- ; Notes: ; Roms must be unzipped. ; You can turn off the exit confirmation box by unchecking Settings->Confirm on exit ; Turn on saving settings by checking Settings->Save settings on exit, this will create the vice.ini file this module needs. ; ; If you want to use the StartTape and StopTape hotkeys make sure you edit the files C64\win_shortcuts.vsc or VIC20\win_shortcuts.vsc ; (paths relative to the emulator install folder) and assign Alt+F7 as the StartTape shortcut and Alt+F8 as the StopTape shortcut, like this: ; ALT 0x76 IDM_DATASETTE_CONTROL_START F7 ; ALT 0x77 IDM_DATASETTE_CONTROL_STOP F8 ; ; WinVICE uses different executables for each machine so make sure you setup your emulators properly: ; x64.exe - Commodore 64 ; xplus4.exe - Commodore 16 & Plus/4 ; xvic.exe - Commodore VIC-20 ;---------------------------------------------------------------------------- StartModule() FadeInStart() mType := Object("Commodore 64","C64","Commodore 16 & Plus4","PLUS4","Commodore VIC-20","VIC20") ;ident should be the section names used in VICE.ini ident := mType[systemName] ; search object for the systemName identifier IfExist, % modulePath . "\" . systemName . ".ini" ; use a custom systemName ini if it exists settingsFile := modulePath . "\" . systemName . ".ini" Else settingsFile := modulePath . "\" . moduleName . ".ini" Fullscreen := IniReadCheck(settingsFile, "Settings", "Fullscreen","true",,1) ; If true, the module governs if the emulator launches fullscreen or not. Set to false when troubleshooting a module for launching problems. WarpKey := IniReadCheck(settingsFile, "Settings", "WarpKey","F9",,1) ; toggle warp speed JoySwapKey := IniReadCheck(settingsFile, "Settings", "JoySwapKey","F10",,1) ; swap joystick port StartTapeKey := IniReadCheck(settingsFile, "Settings", "StartTapeKey","F7",,1) ; starts tape StopTapeKey := IniReadCheck(settingsFile, "Settings", "StopTapeKey","F8",,1) ; stops tape SelectGameMode := IniReadCheck(settingsFile, "Settings", "SelectGameMode","1",,1) ; 1 = Uses a loop to detect the Edit Box has the romname and path in it. This doesn't work on all PCs, so if you get stuck at the open rom window, use mode 2. 2 = Uses a simple Ctrl+v to paste the romname and path, then press Enter to load the game. ; DiskSwapKey = F11 ; swaps disk or tape - Do not need this key anymore with multigame support UsePaddles := IniReadCheck(settingsFile, romName, "UsePaddles", "false",,1) AutostartPrgMode := IniReadCheck(settingsFile, romName, "AutostartPrgMode", "2",,1) RequiresReset := IniReadCheck(settingsFile, romName, "RequiresReset", "false",,1) 7z(romPath, romName, romExtension, 7zExtractPath) viceINI := CheckFile(emuPath . "\vice.ini") IniRead, currentFullScreen, %viceINI%, %ident%, FullscreenEnabled IniRead, currentAutostartPrgMode, %viceINI%, %ident%, AutostartPrgMode ; Setting Fullscreen setting in ini if it doesn't match what user wants above If ( Fullscreen != "true" And currentFullScreen = 1 ) IniWrite, 0, %viceINI%, %ident%, FullscreenEnabled Else If ( Fullscreen = "true" And currentFullScreen = 0 ) IniWrite, 1, %viceINI%, %ident%, FullscreenEnabled If ( currentAutostartPrgMode != AutostartPrgMode ) IniWrite, %AutostartPrgMode%, %viceINI%, %ident%, AutostartPrgMode WarpKey := xHotKeyVarEdit(WarpKey,"WarpKey","~","Add") JoySwapKey := xHotKeyVarEdit(JoySwapKey,"JoySwapKey","~","Add") StartTapeKey := xHotKeyVarEdit(StartTapeKey,"StartTapeKey","~","Add") StopTapeKey := xHotKeyVarEdit(StopTapeKey,"StopTapeKey","~","Add") xHotKeywrapper(WarpKey,"Warp") xHotKeywrapper(JoySwapKey,"JoySwap") xHotKeywrapper(StartTapeKey,"StartTape") xHotKeywrapper(StopTapeKey,"StopTape") If romName contains (USA),(Canada) DefaultVideoMode = NTSC Else DefaultVideoMode = PAL VideoMode := IniReadCheck(settingsFile, romName, "VideoMode", DefaultVideoMode,,1) params := "+confirmexit" ; Setting video mode depending on rom, default NTSC if (VideoMode = "NTSC") { params := params . " -ntsc" ;IniWrite, -2, %viceINI%, %ident%, MachineVideoStandard ;NTSC } else { params := params . " -pal" ;IniWrite, -1, %viceINI%, %ident%, MachineVideoStandard ;PAL } ;Enable/Disable paddles as needed, leave these checks in-place because mouse CLI and Ini options aren't supported in VICE 1.22 and this way it will also work with it. IniRead, currentUsePaddles, %viceINI%, %ident%, Mouse If ( UsePaddles = "true" And currentUsePaddles != 1) params := params . " -mouse -mousetype 3" If ( UsePaddles = "false" And currentUsePaddles = 1) params := params . " +mouse" If (ident = "C64") { If romExtension not in .d64,.d71,.d80,.d81,.d82,.g64,.g41,.x64,.t64,.tap,.crt ScriptError("Your rom has an extension of " . romExtension . ", only these extensions are supported:`nd64,d71,d80,d81,d82,g64,g41,x64,t64,tap,crt") If ( romExtension = ".crt" ) { IniWrite, %romPath%\%romName%%romExtension%, %viceINI%, C64, CartridgeFile IniWrite, 0, %viceINI%, C64, CartridgeType } Else { IniWrite, -1, %viceINI%, C64, CartridgeType } ; Hotkey, ~%DiskSwapKey%, MultiGame If romExtension in .d64,.d71,.d80,.d81,.d82,.g64,.g41,.x64,.prg Run(executable . " " . params . " """ . romPath . "\" . romName . romExtension . """", emuPath) Else If romExtension in .t64,.tap Run(executable . " " . params . " """ . romPath . "\" . romName . romExtension . """", emuPath) Else If romExtension = .crt Run(executable . " " . params . " -cartcrt """ . romPath . "\" . romName . romExtension . """", emuPath) if (RequiresReset = "true") { WinWaitActive("ahk_class VICE") Sleep, 1000 ; increase if command is not appearing in the emu window or some just some letters Send !r } } Else If (ident = "PLUS4") { If romExtension not in .prg,.d64,.t64,.tap,.crt,.g64 ScriptError("Your rom has an extension of " . romExtension . ", only these extensions are supported:`nprg,d64,t64,tap,crt,g64") SendCommandDelay := IniReadCheck(settingsFile, "Settings", "SendCommandDelay", "1500",,1) Model := IniReadCheck(settingsFile, romName, "Model", "Commodore Plus/4",,1) ; Setting model If (Model = "Commodore Plus/4") { ;Commodore Plus/4 IniWrite, "3plus1lo", %viceINI%, %ident%, FunctionLowName IniWrite, "3plus1hi", %viceINI%, %ident%, FunctionHighName IniWrite, 64, %viceINI%, %ident%, RamSize IniWrite, 1, %viceINI%, %ident%, Acia1Enable } Else { ;Commodore 16 IniWrite, "", %viceINI%, %ident%, FunctionLowName IniWrite, "", %viceINI%, %ident%, FunctionHighName IniWrite, 16, %viceINI%, %ident%, RamSize IniWrite, 0, %viceINI%, %ident%, Acia1Enable } Command := IniReadCheck(settingsFile, romName, "Command", "",,1) StringLower, Command, Command ;Command MUST be in lower case so let's force it If romExtension in .d64,.g64,.prg Run(executable . " " . params . " """ . romPath . "\" . romName . romExtension . """", emuPath) Else If romExtension in .t64,.tap Run(executable . " " . params . " """ . romPath . "\" . romName . romExtension . """", emuPath) Else If romExtension = .crt Run(executable . " " . params . " -cartcrt """ . romPath . "\" . romName . romExtension . """", emuPath) if (RequiresReset = "true") { WinWaitActive("ahk_class VICE") Sleep, 1000 ; increase if command is not appearing in the emu window or some just some letters Send !r } if %Command% { WinWaitActive("ahk_class VICE") Sleep, %SendCommandDelay% ; increase if command is not appearing in the emu window or some just some letters If romExtension in .t64,.tap { ;Tape loading time will vary greatly so we can't type this automatically, user must do it using a hotkey RunTapeKey := IniReadCheck(settingsFile, romname, "RunTapeKey","Ctrl&F12",,1) ; run tape key RunTapeKey := xHotKeyVarEdit(RunTapeKey,"RunTapeKey","~","Add") xHotKeywrapper(RunTapeKey,"RunTape") } Else { SetKeyDelay, 50 Loop, parse, Command Send, {%A_LoopField% down}{%A_LoopField% up} Send, {ENTER down}{ENTER up} } } } Else If (ident = "VIC20") { If romExtension not in .prg,.d64,.t64,.tap,.crt ScriptError("Your rom has an extension of " . romExtension . ", only these extensions are supported:`nprg,d64,t64,tap,crt") SendCommandDelay := IniReadCheck(settingsFile, "Settings", "SendCommandDelay", "1500",,1) CartAddress := IniReadCheck(settingsFile, romName, "CartLoadingAddress", "X000",,1) MemoryExpansion := IniReadCheck(settingsFile, romName, "MemoryExpansion", "none",,1) Command := IniReadCheck(settingsFile, romName, "Command", "",,1) RequiresReset := IniReadCheck(settingsFile, romName, "RequiresReset", "false",,1) StringLower, Command, Command ;Command MUST be in lower case so let's force it If ( romExtension = ".crt" ) { ;Sleep, 100 ;Without this romtable comes empty (thread related?) RomTableCheck() ; make sure romTable is created already so the next line can calculate correctly ;MultiPart carts can only be run if the MultiGame feature is enabled If romName contains (Part { If (mgEnabled = "false") ScriptError("You cannot run multipart games with MultiGame disabled") } romCount = % romtable.MaxIndex() If (romCount > 1) { ;multipart carts - need to build custom CLI parameters to invoke multipart cartridges. Multipart cartridges are loaded in more than one ; memory address, so we interrogate each part, and determine its loading address, and build the CLI parameters. ; Once all the cartridge parts have been processed, the emulator with the custom CLI parameters are invoked. ; ; Using Lunaar Leeper as an example, it has two parts, one loaded in $2000, and one in $A000 ; "xvic.exe -cart2 "D:\Games\Commodore VIC-20\Lunar Leeper (USA) (Part 1).crt" -cartA "D:\Games\Commodore VIC-20\Lunar Leeper (USA) (Part 2).crt" multipartCLI = %executable% %params% for index, element in romtable { currentCart := romtable[A_Index,1] SplitPath, currentCart,,,, OutFileName currentCartAddress := IniReadCheck(settingsFile, OutFileName, "CartLoadingAddress", "X000",,1) If (currentCartAddress = "A000") cartSlot := "-cartA" Else If (currentCartAddress = "B000") cartSlot := "-cartB" Else If (currentCartAddress = "2000") cartSlot := "-cart2" Else If (currentCartAddress = "4000") cartSlot := "-cart4" Else If (currentCartAddress = "6000") cartSlot := "-cart6" Else ScriptError("Invalid Cart Address Specified: " . CartAddress) multipartCLI = %multipartCLI% %cartSlot% "%currentCart%" } Run(multipartCLI, emuPath) } Else { ;singlepart carts - unlike multipart carts, we can directly run the emulator with a single CLI parameter If (CartAddress = "A000") cartSlot := "-cartA" Else If (CartAddress = "B000") cartSlot := "-cartB" Else If (CartAddress = "2000") cartSlot := "-cart2" Else If (CartAddress = "4000") cartSlot := "-cart4" Else If (CartAddress = "6000") cartSlot := "-cart6" Else ScriptError("Invalid Cart Address Specified: " . CartAddress) Run(executable . " " . params . " " . cartSlot . " """ . romPath . "\" . romName . romExtension . """", emuPath) } } Else { ;for non cartridges, update the vice.ini with the proper memory expansion values (if needed) prior to calling the emulator. varBlock0 = 0 varBlock1 = 0 varBlock2 = 0 varBlock3 = 0 varBlock5 = 0 If (MemoryExpansion = "3k") { varBlock0 = 1 } Else If (MemoryExpansion = "8k") { varBlock1 = 1 } Else If (MemoryExpansion = "16k") { varBlock1 = 1 varBlock2 = 1 } Else If (MemoryExpansion = "24k") { varBlock1 = 1 varBlock2 = 1 varBlock3 = 1 } Else If (MemoryExpansion = "all") { varBlock0 = 1 varBlock1 = 1 varBlock2 = 1 varBlock3 = 1 varBlock5 = 1 } Else If (MemoryExpansion = "3,5") { varBlock3 = 1 varBlock5 = 1 } Else If (MemoryExpansion = "5") { varBlock5 = 1 } Else If (MemoryExpansion = "1,5") { varBlock1 = 1 varBlock5 = 1 } Else If (MemoryExpansion = "1,2,5") { varBlock1 = 1 varBlock2 = 1 varBlock5 = 1 } IniWrite, %varBlock0%, %viceINI%, VIC20, RAMBlock0 IniWrite, %varBlock1%, %viceINI%, VIC20, RAMBlock1 IniWrite, %varBlock2%, %viceINI%, VIC20, RAMBlock2 IniWrite, %varBlock3%, %viceINI%, VIC20, RAMBlock3 IniWrite, %varBlock5%, %viceINI%, VIC20, RAMBlock5 Run(executable . " " . params . " """ . romPath . "\" . romName . romExtension . """" , emuPath ) } if (RequiresReset = "true") { WinWaitActive("ahk_class VICE") Sleep, 1000 ; increase if command is not appearing in the emu window or some just some letters Send !r } if %Command% { WinWaitActive("ahk_class VICE") Sleep, %SendCommandDelay% ; increase if command is not appearing in the emu window or some just some letters SetKeyDelay, 50 Loop, parse, Command Send, {%A_LoopField% down}{%A_LoopField% up} Send, {ENTER down}{ENTER up} } } WinWait("ahk_class VICE") WinWaitActive("ahk_class VICE") FadeInExit() Process("WaitClose", executable) 7zCleanUp() FadeOutExit() ExitModule() JoySwap: Send !j Return Warp: Send !w Return StartTape: Send !{F7} Return StopTape: Send !{F8} Return RunTape: SetKeyDelay, 50 Loop, parse, Command Send, {%A_LoopField% down}{%A_LoopField% up} Send, {ENTER down}{ENTER up} Return HaltEmu: If (Fullscreen = "true") Send !{Enter} Return MultiGame: Log("MultiGame Label was run!") If romExtension in .d64,.d71,.d80,.d81,.d82,.g64,.g41,.x64,.prg { Send !8 ; swaps a Disk wvTitle:="Attach disk image ahk_class #32770" } Else If romExtension in .t64,.tap { Send !t ; swaps a Tape wvTitle:="Attach tape image ahk_class #32770" } Else { ScriptError(romExtension . " is an invalid multi-game extension") } WinWait(wvTitle) WinWaitActive(wvTitle) If ( SelectGameMode = 1 ) { Loop { ControlGetText, edit1Text, Edit1, %wvTitle% If ( edit1Text = selectedRom ) Break Sleep, 100 ControlSetText, Edit1, %selectedRom%, %wvTitle% } ControlSend, Button1, {Enter}, ahk_class #32770 ; Select Open } Else If ( SelectGameMode = 2 ) { Clipboard := selectedRom Send, ^v{Enter} } Else ScriptError("You did not choose a valid SelectGameMode.`nOpen the module and set the mode at the top.") Log("Module - WinWaitActive`, ahk_class VICE`, `, 5") WinWaitActive("ahk_class VICE",,5) WinActivate, ahk_class VICE Return RestoreEmu: If (Fullscreen = "true") Send !{Enter} Return CloseProcess: FadeOutStart() WinClose("ahk_class VICE") Return 17:36:24:834 | HL | INFO | +0 | BuildScript - Loaded HyperPause scripts 17:36:24:834 | HL | INFO | +0 | BuildScript - Loaded Statistics.ahk script 17:36:24:835 | HL | INFO | +0 | BuildScript - Loaded User Functions.ahk script 17:36:24:835 | HL | INFO | +0 | BuildScript - Finished injecting functions into module 17:36:24:835 | HL | INFO | +0 | Main - Module is built 17:36:24:835 | HL | INFO | +0 | CheckFile - Checking if C:\Hyperspin\HyperLaunch\AutoHotkey.dll exists 17:36:24:836 | HL | INFO | +0 | Main - Running module 17:36:24:936 | MD | INFO | +N/A | Module initialized 17:36:24:937 | MD | INFO | +0 | StartModule - Started 17:36:24:937 | MD | INFO | +0 | StartModule - MEmu: WinVICE MEmuV: v2.4 MURL: http://vice-emu.sourceforge.net/ MAuthor: djvj,wahoobrian,brolly MVersion: 2.0.2 MCRC: BA37ED39 iCRC: DAA4D1EA MID: MSystem: "Commodore 64","Commodore 16 & Plus4","Commodore VIC-20" 17:36:24:937 | MD | INFO | +0 | StartModule - You have a supported System Name for this module: "Commodore 64" 17:36:24:937 | MD | INFO | +0 | StartModule - Ended 17:36:24:937 | MD | INFO | +0 | StartGlobalUserFeatures - Starting 17:36:24:937 | MD | INFO | +0 | StartGlobalUserFeatures - Ending 17:36:24:938 | MD | INFO | +0 | Module Setting - [settings] - Fullscreen: true 17:36:24:938 | MD | INFO | +0 | Module Setting - [settings] - WarpKey: F9 17:36:24:938 | MD | INFO | +0 | Module Setting - [settings] - JoySwapKey: F10 17:36:24:938 | MD | INFO | +0 | Module Setting - [settings] - StartTapeKey: F7 17:36:24:938 | MD | INFO | +0 | Module Setting - [settings] - StopTapeKey: F8 17:36:24:938 | MD | INFO | +0 | Module Setting - [settings] - SelectGameMode: 1 17:36:24:938 | MD | INFO | +0 | Module Setting - [Karateka] - UsePaddles: false 17:36:24:938 | MD | INFO | +0 | Module Setting - [Karateka] - AutostartPrgMode: 2 17:36:24:938 | MD | INFO | +0 | Module Setting - [Karateka] - RequiresReset: false 17:36:24:938 | MD | INFO | +0 | CheckFile - Checking if C:\Users\MCP\Desktop\Console Systems\Commodore 64\WinVice SDL x64\SDLVICE-2.4-win64-x64\vice.ini exists 17:36:24:939 | MD | INFO | +0 | Module Setting - [Karateka] - VideoMode: PAL 17:36:24:939 | MD | INFO | +0 | Run - Running: C:\Users\MCP\Desktop\Console Systems\Commodore 64\WinVice SDL x64\SDLVICE-2.4-win64-x64\x64.exe +confirmexit -pal "C:\Users\MCP\Desktop\Console Systems\Commodore 64\WinVice SDL x64\SDLVICE-2.4-win64-x64\roms\Karateka.d64" 17:36:24:956 | MD | INFO | +32 | CreateMGRomTable - Started 17:36:24:956 | MD | INFO | +0 | CreateRomTable - Started 17:36:24:956 | MD | INFO | +0 | CreateRomTable - Ended, 7 Loops to create table. 17:36:24:956 | MD | INFO | +0 | CreateMGRomTable - Ended 17:36:24:964 | MD | INFO | +0 | WinWait - Waiting for "ahk_class VICE" 17:36:58:896 | MD | ERROR | +33930 | There was an error waiting for the window "ahk_class VICE". Please check you have the correct version emulator installed for this module, followed any notes in the module, and have this emulator working outside your Frontend first. Also turn off Fade to see if you are hiding your problem. 17:36:58:896 | MD | INFO | +0 | ExitModule - Started 17:36:58:896 | MD | INFO | +0 | Starting Updating Statistics: 17:36:58:911 | MD | INFO | +15 | Game section statistics updated. 17:36:58:911 | MD | INFO | +0 | ExitModule - Ended 17:36:58:911 | MD | INFO | +0 | End of Module Logs 17:36:59:005 | HL | INFO | +34164 | Main - Module ended, exiting HyperLaunch normally 17:36:59:005 | HL | INFO | +0 | ExitScript - Started 17:36:59:021 | HL | INFO | +16 | SystemCursor - Restoring mouse cursor 17:36:59:036 | HL | INFO | +15 | ExitScript - Ended
gigapig Posted June 25, 2014 Posted June 25, 2014 It's probably because your using the wrong version of the emulator. The module is waiting for the Winvice window which is called "ahk_class VICE" when that window does not appear after a predefined time, then you get the error. So you would need to modify the module to look for the WinVICE SDL window, which probably has a different name. To find out the name you can use a program called Autoit or there is one built into HLHQ in the PCLauncher module, it's the window grabber. I think the line in the module you would have to modify is 129 WinWaitActive("ahk_class VICE") but I'm no expert so there may be more to change. If I can I will try and find the window name.
gigapig Posted June 25, 2014 Posted June 25, 2014 If you are running the x64.exe the window title is... VICE: C64 emulator ahk_class SDL_app or just.... VICE: C64 emulator
MydknyteStyrm Posted June 26, 2014 Author Posted June 26, 2014 Thanks for the info. I replaced 11 occurrences of the ahk_class VICE to various options, including "VICE: C64 emulator", "SDL_app VICE: C64 emulator", "ahk_class SDL_app VICE: C64 emulator" and more using Notepad ++. Each time I get the error with the form of the Window name, nothing seems to take. I used Autoit, and the window says the emulator Title is VICE: C64 emulator, and the Class is SDL_app. One thing I noticed when I used AutoIt with the original WinVice (not SDL version), there was a listing under the Basic Control Info for VICE. With the SDL version the Basic Control Info is blank. This might have something to do with the lack of control?
gigapig Posted June 26, 2014 Posted June 26, 2014 I tried to get this emu running but it doesn't even start and will obviously will give the error your receiving. Have you managed to get the emu to start through Hyperlaunch? If not someone with more module experience may need to take a look.
rfancella Posted June 26, 2014 Posted June 26, 2014 I tried to get this emu running but it doesn't even start and will obviously will give the error your receiving. Have you managed to get the emu to start through Hyperlaunch? If not someone with more module experience may need to take a look. Gig, Do you have a link to the emu?? Thanks, Ron Code Monkey and all around Command Line geek!If you like what someone has said or done for you, be sure and 'Thank' them. And if they changed your life, send them a Beer!
gigapig Posted June 26, 2014 Posted June 26, 2014 Gig,Do you have a link to the emu?? Thanks, Ron It's on the WinVICE site, I think this one x64.
rfancella Posted June 26, 2014 Posted June 26, 2014 I tried to get this emu running but it doesn't even start and will obviously will give the error your receiving. Have you managed to get the emu to start through Hyperlaunch? If not someone with more module experience may need to take a look. Ok, so far... I had to rename the sdl-vice.ini file to vice.ini and the emulator would almost launch. I get this in stderr.txt in the emulator directory.. Unknown option '+confirmexit'. Error parsing command-line options, bailing out. For help use '-help' So I removed that line from the parms of the module and the emulator launches and loads the game. I still get the same HL error above. That's as far as I got. Thanks, Ron Code Monkey and all around Command Line geek!If you like what someone has said or done for you, be sure and 'Thank' them. And if they changed your life, send them a Beer!
MydknyteStyrm Posted June 27, 2014 Author Posted June 27, 2014 I can run winVice SDL no problem on its own. I have had no luck with HL opening it. Sent from my iPhone using Tapatalk
brolly Posted June 27, 2014 Posted June 27, 2014 What's the point on using the SDL version anyway? Anything relevant over the normal builds?
MydknyteStyrm Posted June 27, 2014 Author Posted June 27, 2014 The SDL version has an on screen GUI that can be activated by F12. The plus is that it includes a virtual C64 keyboard. Since I want this in my cab I figured it was the most accessible. Sent from my iPhone using Tapatalk
brolly Posted June 27, 2014 Posted June 27, 2014 Umm ok, I'll try to have a look at it if it's as simple as changing the window title/class I can add support for it to the official module. If CLI, menus, etc. are all different then this won't be possible and most likely would require a new module as the current one is already pretty complex since it supports a few systems and settings.
rfancella Posted June 27, 2014 Posted June 27, 2014 The SDL version has an on screen GUI that can be activated by F12. The plus is that it includes a virtual C64 keyboard. Since I want this in my cab I figured it was the most accessible. Sent from my iPhone using Tapatalk Umm ok, I'll try to have a look at it if it's as simple as changing the window title/class I can add support for it to the official module. If CLI, menus, etc. are all different then this won't be possible and most likely would require a new module as the current one is already pretty complex since it supports a few systems and settings. Got started on a module for it. There are a couple significant differences between them. The sdl-vice.ini uses a different variable name for FullScreen. The ini file is also named sdl-vice.ini instead of vice.ini. The module also tries to pass a CLI that SDL doesn't like. Here is what I have so far: http://pastebin.com/eUgfEhJ9 I made a new directory and called it .../HyperLaunch/Modules/WinVICE-SDL with the above ahk called WinVICE-SDL.ahk. Also copied the WinVICE.isd and renamed it to WinVICE-SDL.isd. Created a new Emulator called WinVICE-SDL with this module. It seems to work, only I think the window title/class is not right. And I don't know how to get it. Still working on the details of the ini re-write. Thanks, Ron [EDIT] The above module, does use the fullscreen setting in HLHQ. Got it to rewrite the sdl-vice.ini file just fine. [/EDIT] Code Monkey and all around Command Line geek!If you like what someone has said or done for you, be sure and 'Thank' them. And if they changed your life, send them a Beer!
brolly Posted June 27, 2014 Posted June 27, 2014 I already have the current module working for the SDL version, but not sure if all features will work since this emu has no menu bar for instance and it seems that several CLI arguments aren't supported. You'll also need to manually map all hotkeys through the emulator built-in menu in order to be able to make use of Warp, Start/Stop Tape, etc. and apparently you need to do this separately for each emu (C64,VIC-20,etc.) too much of a hassle if you ask me. But anyway the basics are working and I don't intend to spend anymore time with this since I see very little use for this emulator and the current module is pretty complex to make sure every single option is working with the SDL version. HyperPause also doesn't working properly with the emu in fullscreen. No point on posting it since it will only work with the beta HL, if you want to test it Ron lmk and I'll send it to you. You are in the HL beta testing right?
MydknyteStyrm Posted June 28, 2014 Author Posted June 28, 2014 I already have the current module working for the SDL version, but not sure if all features will work since this emu has no menu bar for instance and it seems that several CLI arguments aren't supported.You'll also need to manually map all hotkeys through the emulator built-in menu in order to be able to make use of Warp, Start/Stop Tape, etc. and apparently you need to do this separately for each emu (C64,VIC-20,etc.) too much of a hassle if you ask me. But anyway the basics are working and I don't intend to spend anymore time with this since I see very little use for this emulator and the current module is pretty complex to make sure every single option is working with the SDL version. HyperPause also doesn't working properly with the emu in fullscreen. No point on posting it since it will only work with the beta HL, if you want to test it Ron lmk and I'll send it to you. You are in the HL beta testing right? Brolly, you got it to work using the original WinVice module? I updated my modules using ModuleUpdater, and I still cant seem to get it even running. What version, may I ask, is your WinVice module?
brolly Posted June 28, 2014 Posted June 28, 2014 No, what I meant was that I changed the WinVICE module so that it would work with the SDL version as well. But like I said no point on posting it yet since it requires some functions that only exist on the beta HL version.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.