yes it can be done via send keys.
i did a script update for my version of Mayhems excellent Gamebase, to solve the very same problem.
This works for CARTs and PRG (inserted into RAM).
you will need to add LOAD"",1 {enter} if it's needed for TAP files.
same goes for pokes, just change "sys" for "poke"
Code: Select all
If Key_sys CONTAINS(*)
Add_CLP( -autoload "%gamepathfile%")
Run_Emulator_Send_Keys([1]sys%sys_value%{ENTER}||50)
Else
Add_CLP( -autostart "%gamepathfile%")
run_emulator()
end If
gemus
sys=4096
this is the full version of the script.
just a small warning.
some things might be broken for use in your version.
i changed all the cart files to .CRT (deleted the duplicate PRG) and put them all in the extras.
Code: Select all
;******************************
;* WinVICE 2.4.5 GEMUS Script *
;* (c) The GB Team *
;* 4th January 2014 *
;******************************
;--------------------------------------------------------------------
; Start of script.
;--------------------------------------------------------------------
Set_INI_Value(1||VIC20||InitialTapeDir||"%gbgamepath%\0\")
Set_INI_Value(1||VIC20||InitialDiskDir||"%gbgamepath%\0\")
Set_INI_Value(1||VIC20||InitialCartDir||"%gbgamepath%\0\")
;Do we want a PAL or NTSC setup?
If PalNTSC = NTSC
Add_CLP( -ntsc)
;Set_INI_Value(1||VIC20||MachineVideoStandard||-2)
Else
Add_CLP( -pal)
;Set_INI_Value(1||VIC20||MachineVideoStandard||-1)
End If
; Set emulator default values.
Set_INI_Value(1||VIC20||DriveTrueEmulation||0)
Set_INI_Value(1||VIC20||AutostartPrgMode||0)
Set_INI_Value(1||VIC20||AutostartWarp||0)
Set_INI_Value(1||VIC20||VICFilter||0)
; Joystick / Keyboard Control
; Start with Keyboard Only - Disable all Control Port devices.
Set_INI_Value(1||VIC20||JoyDevice1||0)
Set_INI_Value(1||VIC20||Lightpen||0)
Set_INI_Value(1||VIC20||LightpenType||0)
Set_INI_Value(1||VIC20||Mouse||0)
Set_INI_Value(1||VIC20||KeymapIndex||1)
Set_INI_Value(1||VIC20||KeySetEnable||1)
If Control = Mouse
Set_INI_Value(1||VIC20||Mouse||1)
ElseIf Control = LightPen
Set_INI_Value(1||VIC20||Lightpen||1)
;0=Pen Button Up, 1=Pen Button Left ,2=Datel Pen ,3=Magnum Light Phaser, 4=Stack Light Rifel
Set_INI_Value(1||VIC20||LightpenType||0)
ElseIf Control = LightGun
Set_INI_Value(1||VIC20||Lightpen||1)
Set_INI_Value(1||VIC20||LightpenType||3)
;Use USB Joystick PC#0
; Joystick MUST be attached to enable this option.
ElseIf Control = JoyPort1
If Key_realjoystick CONTAINS(yes)
Set_INI_Value(1||VIC20||JoyDevice1||4)
Else
; Use Keyset NUMPAD + Right Control as default.
; No Joystick=0 , NUMPAD=1, Keyset A=2, Keyset B=3, PC#0 (USB)=4
Set_INI_Value(1||VIC20||JoyDevice1||1)
End If
ElseIf Control = JoyPort2
; Same function as Control = Port 1.
If Key_realjoystick CONTAINS(yes)
Set_INI_Value(1||VIC20||JoyDevice1||4)
Else
; Use Keyset NUMPAD + Right Control as default.
; No Joystick=0 , NUMPAD=1, Keyset A=2, Keyset B=3, PC#0 (USB)=4
Set_INI_Value(1||VIC20||JoyDevice1||1)
End If
;Paddles are switched on using Mouse command.
ElseIf Control = PaddlePort2
Set_INI_Value(1||VIC20||Mouse||1)
ElseIf Control = PaddlePort1
Set_INI_Value(1||VIC20||Mouse||1)
Else
End If
;Set_INI_Value(1||VIC20||JoyOpposite||0)
; Keyset A - Customise your own keys.
;Set_INI_Value(1||VIC20||KeySet1NorthWest||0)
;Set_INI_Value(1||VIC20||KeySet1North||0)
;Set_INI_Value(1||VIC20||KeySet1NorthEast||0)
;Set_INI_Value(1||VIC20||KeySet1East||0)
;Set_INI_Value(1||VIC20||KeySet1SouthEast||0)
;Set_INI_Value(1||VIC20||KeySet1South||0)
;Set_INI_Value(1||VIC20||KeySet1SouthWest||0)
;Set_INI_Value(1||VIC20||KeySet1West||0)
;Set_INI_Value(1||VIC20||KeySet1Fire||0)
; Keyset B - Customise your own keys.
;Set_INI_Value(1||VIC20||KeySet2NorthWest||0)
;Set_INI_Value(1||VIC20||KeySet2North||0)
;Set_INI_Value(1||VIC20||KeySet2NorthEast||0)
;Set_INI_Value(1||VIC20||KeySet2East||0)
;Set_INI_Value(1||VIC20||KeySet2SouthEast||0)
;Set_INI_Value(1||VIC20||KeySet2South||0)
;Set_INI_Value(1||VIC20||KeySet2SouthWest||0)
;Set_INI_Value(1||VIC20||KeySet2West||0)
;Set_INI_Value(1||VIC20||KeySet2Fire||0)
;***************************************************************
;VIC20 only has 1 Control port as standard.
;Extra joysticks can only be used by attaching special adapters.
; TankAtak needs OEM joy adapater for 2 players.
;***************************************************************
;Set_INI_Value(1||VIC20||ExtraJoy||0)
;Set_INI_Value(1||VIC20||ExtraJoyType||0)
;Set_INI_Value(1||VIC20||JoyDevice2||0)
;Set_INI_Value(1||VIC20||JoyDevice3||0)
;Set_INI_Value(1||VIC20||JoyDevice4||0)
;Set_INI_Value(1||VIC20||JoyFire1Button||0)
;Set_INI_Value(1||VIC20||JoyFire2Button||0)
;Set_INI_Value(1||VIC20||JoyFire3Button||0)
;Set_INI_Value(1||VIC20||JoyFire4Button||0)
;Set_INI_Value(1||VIC20||JoyAutofire1Speed||16)
;Set_INI_Value(1||VIC20||JoyAutofire1Axis||0)
;Set_INI_Value(1||VIC20||JoyAutofire1Button||0)
;Set_INI_Value(1||VIC20||JoyAutofire2Speed||16)
;Set_INI_Value(1||VIC20||JoyAutofire2Axis||0)
;Set_INI_Value(1||VIC20||JoyAutofire2Button||0)
;Set_INI_Value(1||VIC20||JoyAutofire3Speed||16)
;Set_INI_Value(1||VIC20||JoyAutofire3Axis||0)
;Set_INI_Value(1||VIC20||JoyAutofire3Button||0)
;Set_INI_Value(1||VIC20||JoyAutofire4Speed||16)
;Set_INI_Value(1||VIC20||JoyAutofire4Axis||0)
;Set_INI_Value(1||VIC20||JoyAutofire4Button||0)
;--------------------------------------------------------------------
; Memory configuration.
;Set_INI_Value(1||VIC20||RAMBlock0||0)
;Set_INI_Value(1||VIC20||RAMBlock1||0)
;Set_INI_Value(1||VIC20||RAMBlock2||0)
;Set_INI_Value(1||VIC20||RAMBlock3||0)
;Set_INI_Value(1||VIC20||RAMBlock5||0)
;set through the key=value pair:
; memory=x
; where x is: none,all,3k,8k,16k,24k,"0,1,2,3,5" or "04,20,40,60,A0"
If Key_memory CONTAINS(*)
Add_CLP( -memory %memory_value%)
Else
Add_CLP( -memory none)
End If
;--------------------------------------------------------------------
If GameType CONTAINS(prg)
;use prg run mode.
Set_INI_Value(1||VIC20||AutostartPrgMode||1)
If Key_sys CONTAINS(*)
Add_CLP( -autoload "%gamepathfile%")
Run_Emulator_Send_Keys([1]sys%sys_value%{ENTER}||50)
Else
Add_CLP( -autostart "%gamepathfile%")
run_emulator()
end If
End If
;--------------------------------------------------------------------
If GameType CONTAINS(crt||rom)
; AE Cart boots with corrupt screen with RAM 00 at 0000.
; must use these VICE RAM settings, or enter monitor and type - G A027.
; Default is 64, possible settings (0||1||2||4||8||16||32||64||128||256||512||1024)
Set_INI_Value(1||VIC20||RAMInitValueInvert||64)
; Default is 0, possible settings (0||1||2||4||8||16||32||64||128||256||512||1024)
Set_INI_Value(1||VIC20||RAMInitPatternInvert||0)
If key_RAM CONTAINS (255)
Set_INI_Value(1||VIC20||RAMInitStartValue||255)
Else
Set_INI_Value(1||VIC20||RAMInitStartValue||0)
End If
;1=Generic 2=Mega-Cart 3=Final Expansion 4=Vic Flash Plugin
Set_INI_Value(1||VIC20||CartridgeType||1)
;Reset on Cartridge Change
If Key_cartreset CONTAINS (off)
Set_INI_Value(1||VIC20||CartridgeReset||0)
else
Set_INI_Value(1||VIC20||CartridgeReset||-1)
end if
;Set_INI_Value(1||VIC20||CartridgeFile||)
;Set_INI_Value(1||VIC20||GenericCartridgeFile2000||)
;Set_INI_Value(1||VIC20||GenericCartridgeFile4000||)
;Set_INI_Value(1||VIC20||GenericCartridgeFile6000||"C:\GBGame\0\AE-6000.crt")
;Set_INI_Value(1||VIC20||GenericCartridgeFileA000||"C:\GBGame\0\AE-a000.crt")
;Set_INI_Value(1||VIC20||GenericCartridgeFileB000||)
;Set_INI_Value(1||VIC20||FinalExpansionWriteBack||0)
;Set_INI_Value(1||VIC20||VicFlashPluginWriteBack||0)
;Set_INI_Value(1||VIC20||MegaCartNvRAMfilename||"")
;Set_INI_Value(1||VIC20||MegaCartNvRAMWriteBack||0)
If Key_cart CONTAINS(*20*)
Add_CLP( -cart2 %gamepath%\*%cart_value%*.*)
ElseIf Key_cart CONTAINS(*40*)
Add_CLP( -cart4 %gamepath%\*%cart_value%*.*)
ElseIf Key_cart CONTAINS(*60*)
Add_CLP( -cart6 %gamepath%\*%cart_value%*.*)
ElseIf Key_cart CONTAINS(*a0*)
Add_CLP( -cartA %gamepath%\*%cart_value%*.*)
ElseIf Key_cart CONTAINS(*b0*)
Add_CLP( -cartB %gamepath%\*%cart_value%*.*)
End If
If Key_cart2 CONTAINS(*20*)
Add_CLP( -cart2 %gamepath%\*%cart2_value%*.*)
ElseIf Key_cart2 CONTAINS(*40*)
Add_CLP( -cart4 %gamepath%\*%cart2_value%*.*)
ElseIf Key_cart2 CONTAINS(*60*)
Add_CLP( -cart6 %gamepath%\*%cart2_value%*.*)
ElseIf Key_cart2 CONTAINS(*a0*)
Add_CLP( -cartA %gamepath%\*%cart2_value%*.*)
ElseIf Key_cart2 CONTAINS(*b0*)
Add_CLP( -cartB %gamepath%\*%cart2_value%*.*)
End If
If Key_sys CONTAINS(*)
Run_Emulator_Send_Keys([1]sys%sys_value%{ENTER}||50)
Else If key_megacart CONTAINS (yes)
Add_CLP ( -cartmega %gamepath%\mega-cart.rom -mcnvramwriteback -mcnvramfile %gamepath%\mega-cart.nv)
Run_Emulator()
Else
Run_Emulator()
End if
End if
;--------------------------------------------------------------------
If GameType CONTAINS(t64||tap)
Set_INI_Value(1||VIC20||DatasetteResetWithCPU||1)
;------------------------------
;Fine-tune Datasette settings.
;------------------------------
If key_delay CONTAINS(1000||2000||5000||10000||20000||50000)
Set_INI_Value(1||VIC20||DatasetteZeroGapDelay||%delay_value%)
else
Set_INI_Value(1||VIC20||DatasetteZeroGapDelay||20000)
End if
;Caves of Annod=1, Shark Attack=2
If Key_cycles CONTAINS(0||1||2||3||4||5||6||7)
Set_INI_Value(1||VIC20||DatasetteSpeedTuning||%cycles_value%)
else
Set_INI_Value(1||VIC20||DatasetteSpeedTuning||1)
end if
;------------------------------
;No commandline options for loading tapes with ,1,1. Only BASIC load available.
If ImageName CONTAINS (*)
; Load the TAPE Image (T64) with Filename stored in GameBase.
Add_CLP2( -autostart "%gamepathfile%:%c64imagename%")
End If
If key_load CONTAINS(manual)
Show_Message(You must load the TAPE manually. Example Load"",1,1)
; Attach Tape Image in default Cassette Deck (1) and run emulator. Disable auto loading.
Clear_CLP()
Add_CLP2( -1 "%gamepathfile%")
Else
; Load the first file on the Tape image.
;Default Attach TAPE and load
Add_CLP2( -autostart "%gamepathfile%")
End If
if key_tape CONTAINS(detach)
;Jogger controls do not work without a tape at the STOP position.
;If using a T64 file the image needs to be removed.
;Open WinVICE menu and detach T64/Tape file.
Run_Emulator_Send_Keys([4]%{f}h||50)
else
Run_emulator()
end if
End if
;--------------------------------------------------------------------
If GameType CONTAINS(d64||g64||g41)
Set_INI_Value(1||VIC20||DriveTrueEmulation||1)
;Set_INI_Value(1||VIC20||DriveSoundEmulation||0)
;Set_INI_Value(1||VIC20||Drive8Type||1541)
;Set_INI_Value(1||VIC20||AttachDevice8Readonly||0)
;Set_INI_Value(1||VIC20||FileSystemDevice8||1)
;Set_INI_Value(1||VIC20||Drive8ExtendImagePolicy||0)
;Set_INI_Value(1||VIC20||Drive8IdleMethod||0)
;Set_INI_Value(1||VIC20||Drive8RAM2000||0)
;Set_INI_Value(1||VIC20||Drive8RAM4000||0)
;Set_INI_Value(1||VIC20||Drive8RAM6000||0)
;Set_INI_Value(1||VIC20||Drive8RAM8000||0)
;Set_INI_Value(1||VIC20||Drive8RAMA000||0)
Set_INI_Value(1||VIC20||Drive9Type||0)
;Set_INI_Value(1||VIC20||AttachDevice9Readonly||0)
;Set_INI_Value(1||VIC20||FileSystemDevice9||0)
;Set_INI_Value(1||VIC20||Drive9ExtendImagePolicy||0)
;Set_INI_Value(1||VIC20||Drive9IdleMethod||0)
;Set_INI_Value(1||VIC20||Drive9RAM2000||0)
;Set_INI_Value(1||VIC20||Drive9RAM4000||0)
;Set_INI_Value(1||VIC20||Drive9RAM6000||0)
;Set_INI_Value(1||VIC20||Drive9RAM8000||0)
;Set_INI_Value(1||VIC20||Drive9RAMA000||0)
Set_INI_Value(1||VIC20||Drive10Type||0)
;Set_INI_Value(1||VIC20||AttachDevice10Readonly||0)
;Set_INI_Value(1||VIC20||FileSystemDevice10||0)
;Set_INI_Value(1||VIC20||Drive10ExtendImagePolicy||0)
;Set_INI_Value(1||VIC20||Drive10IdleMethod||0)
;Set_INI_Value(1||VIC20||Drive10RAM2000||0)
;Set_INI_Value(1||VIC20||Drive10RAM4000||0)
;Set_INI_Value(1||VIC20||Drive10RAM6000||0)
;Set_INI_Value(1||VIC20||Drive10RAM8000||0)
;Set_INI_Value(1||VIC20||Drive10RAMA000||0)
Set_INI_Value(1||VIC20||Drive11Type||0)
;Set_INI_Value(1||VIC20||AttachDevice11Readonly||0)
;Set_INI_Value(1||VIC20||FileSystemDevice11||0)
;Set_INI_Value(1||VIC20||Drive11ExtendImagePolicy||0)
;Set_INI_Value(1||VIC20||Drive11IdleMethod||0)
;Set_INI_Value(1||VIC20||Drive11RAM2000||0)
;Set_INI_Value(1||VIC20||Drive11RAM4000||0)
;Set_INI_Value(1||VIC20||Drive11RAM6000||0)
;Set_INI_Value(1||VIC20||Drive11RAM8000||0)
;Set_INI_Value(1||VIC20||Drive11RAMA000||0)
; -autorun autoloads prg file, but you will need to type RUN [return] manually.
; -autostart autoloads and runs the file.
If ImageName CONTAINS (*)
;Default setting. Boot disk with ImageName
Add_CLP2( -autostart "%gamepathfile%:%c64imagename%")
; ***** Boot all other disks with a wildcard, if no internal file can be set on the image (G64) *****
Else
Add_CLP2( -autostart "%gamepathfile%")
End If
; ***************************************************************************************************
If Key_load CONTAINS(wildcard)
; Auto boot disk with LOAD"*",8,1
Clear_CLP()
Add_CLP2( -autostart "%gamepathfile%")
ElseIf Key_load CONTAINS(basic)
; Auto boot Disk with LOAD"*",8
Clear_CLP()
Add_CLP2( -autostart "%gamepathfile%" -basicload)
ElseIf key_load CONTAINS(manual)
Show_Message(You must load the game on the disk manually. LOAD"$",8 and type LIST for directory)
; Just attach disk in default drive 8 and run emulator. Disable auto loading.
Clear_CLP()
Add_CLP2( -8 "%gamepathfile%")
End If
Run_emulator()
End If