Welcome to the Gamebase 64 forums.                 An attempt to document ALL Commodore 64 gameware before it's too late!

Annoying WinVICE/SDLVICE script issue

Discuss GameBase, the Universal Emulator Frontend!

Moderator: Jimbo

repetto74
Keen Member
Keen Member
Posts: 112
Joined: Sat Feb 08, 2014 2:58 pm

Fri Sep 09, 2016 5:47 pm

I may use YAPE emulator which looks good but need to figure out how I can set a low resolution :?:
User avatar
.mad.
Honoured Member
Honoured Member
Location: Lancashire
Posts: 2270
Joined: Sun Jun 19, 2005 3:30 pm

Sat Sep 10, 2016 9:12 am

This works for my Plus/4 GB.

Code: Select all

;******************************
;* SDLVICE 2.4.0 GEMUS Script *
;*  -SDL-    PLUS/4    -SDL-  *
;*            .mad.           *
;*    10th September 2016     *
;******************************

;--------------------------------------------------------------------
; Start of script.
;--------------------------------------------------------------------
; Set emulator default values.
;0=VirtualFS, 1=Inject to RAM, 2=Disk Image
Set_INI_Value(1||PLUS4||AutostartPrgMode||0)

Set_INI_Value(1||PLUS4||AutostartBasicLoad||0)
Set_INI_Value(1||PLUS4||AutostartRunWithColon||0)
Set_INI_Value(1||PLUS4||AutostartHandleTrueDriveEmulation||0)
Set_INI_Value(1||PLUS4||AutostartWarp||0)
Set_INI_Value(1||PLUS4||AutostartDelay||0)
Set_INI_Value(1||PLUS4||AutostartDelayRandom||1)

If key_model CONTAINS (c16||c16pal||c16ntsc||plus4||plus4pal||plus4ntsc||v364||cv364||c232)
Add_CLP ( -model %model_value%)
else
Add_CLP ( -model plus4)
End If

;---------------
; RAM Expansion
;---------------
if key_ram CONTAINS(16||32||64)
Set_INI_Value(1||PLUS4||RamSize||%ram_value%)
else
Set_INI_Value(1||PLUS4||RamSize||64)
End If

;----------------------------------------------------------------------
; PAL or NTSC setup? (not required if NTSC machine model is used above)
;----------------------------------------------------------------------
   If PalNTSC = NTSC
      Add_CLP( -ntsc)
   Else
      Add_CLP( -pal)
   End If

;------------------------------------------------------------------------------
;Joystick settings (sdl-joymap-PLUS4.vjm)
;------------------------------------------------------------------------------
; USB Joystick must be mapped and configured, and settings saved before use.
; Extra Joypad buttons can be also mapped to any VICE menu options...
; PAUSE, WARP, STOP TAPE, INSERT DISK.
; select your own custom file for a particular game or controller.
; example joyfile=madjoy.vjm

If key_joyfile CONTAINS(*)
Set_INI_Value(1||PLUS4||JoyMapFile||"%emupath%\%joyfile_value%")
Else
Set_INI_Value(1||PLUS4||JoyMapFile||"%emupath%\sdl-joymap-PLUS4.vjm")
End If

; Insert joystick in port#1 or Port#2 (Depending on setting in GameBase)
; *The default GameBase setting is port#2.
; 0=None ,1=Numpad ,2=Keyset 1 ,3=Keyset 2 ,4=USB Joystick

If Control = JoyPort1
;insert joystick in port#1 (keyset 1) and remove joystick port#2.
Set_INI_Value(1||PLUS4||JoyDevice1||2)
Set_INI_Value(1||PLUS4||JoyDevice2||0)

ElseIf Control = JoyPort2
;Remove joystick port 1 and insert joystick in port2 (keyset 1).
Set_INI_Value(1||PLUS4||JoyDevice1||0)
Set_INI_Value(1||PLUS4||JoyDevice2||2)
End If

;------------------------------------------------------------------------------
If GameType CONTAINS(t64||tap)
;------------------------------------------------------------------------------
Set_INI_Value(1||PLUS4||AutostartPrgMode||2)
Set_INI_Value(1||PLUS4||DatasetteResetWithCPU||1)

;------------------------------
;Fine-tune Datasette settings.
;------------------------------
If key_delay CONTAINS(1000||2000||5000||10000||20000||50000)
Set_INI_Value(1||PLUS4||DatasetteZeroGapDelay||%delay_value%)
else
Set_INI_Value(1||PLUS4||DatasetteZeroGapDelay||20000)
End if

If Key_cycles CONTAINS(0||1||2||3||4||5||6||7)
Set_INI_Value(1||PLUS4||DatasetteSpeedTuning||%cycles_value%)
else
Set_INI_Value(1||PLUS4||DatasetteSpeedTuning||1)
End if

;Default Attach TAPE and load
Add_CLP( -autostart %gamepathfile%)
Run_emulator()
End if

;------------------------------------------------------------------------------
If GameType CONTAINS(prg)
;------------------------------------------------------------------------------
; PRG mode Inject to RAM.
Set_INI_Value(1||PLUS4||AutostartPrgMode||1)

; for PRG filenames ending with a monitor jump... xxxx_G2700.prg.
; the games can be started using the SYS function in GEMUS sys=9984
; Examples
; G5c00 = sys 23552 - Mercenary_G5C00.prg
; G7a72 = sys 31346 - Mercenary_2_The Second City_G7A72.prg

If Key_sys CONTAINS(*)
; PRG inject to RAM takes a few seconds in Plus4, increase wait time if monitor opens.
Add_CLP( -autoload "%gamepathfile%")
Run_Emulator_Send_Keys([5]sys%sys_value%{ENTER}||50)
Else
Add_CLP( -autostart "%gamepathfile%")
Run_Emulator()
End If
End If

;------------------------------------------------------------------------------
If GameType CONTAINS(crt)
;------------------------------------------------------------------------------
Set_INI_Value(1||PLUS4||CartridgeReset||-1)

;Use default slot cart#1 low.
ADD_CLP( -c1lo "%gamepathfile%")
Run_Emulator()
End if

;------------------------------------------------------------------------------
If GameType CONTAINS(d64||g64||g41)
;------------------------------------------------------------------------------
Set_INI_Value(1||PLUS4||DriveTrueEmulation||1)
Set_INI_Value(1||PLUS4||VirtualDevices||1)

If key_drivetype CONTAINS(1541||1542||1551||1570||1571||1581)
Set_INI_Value(1||PLUS4||Drive8Type||%drivetype_value%)
else
Set_INI_Value(1||PLUS4||Drive8Type||1551)
end if
      
	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

Run_emulator()
End If
repetto74
Keen Member
Keen Member
Posts: 112
Joined: Sat Feb 08, 2014 2:58 pm

Sat Sep 10, 2016 6:58 pm

Hi Mad,

As usual I have really to thank you for your help on this. Unfortunately my knowledge of script coding is really poor and I know I am bothering you with that :roll:

So thanks again for your patience :)
By the way could you repost your script out of a quotation window as I am getting some weird characters which will corrupt the whole script :( when I copy and paste it on a Text Page.
Last edited by repetto74 on Sat Sep 10, 2016 7:26 pm, edited 1 time in total.
Retroplay
Cool Member
Cool Member
Location: Denmark
Posts: 320
Joined: Sun Apr 18, 2004 10:18 pm

Sat Sep 10, 2016 7:11 pm

Use Notepad++ instead of notepad/wordpad.
repetto74
Keen Member
Keen Member
Posts: 112
Joined: Sat Feb 08, 2014 2:58 pm

Sat Sep 10, 2016 7:28 pm

Hi Retroplay,

I am on a Mac so copy/pasting with TextEdit before moving to the Cab Machine under XP.
Retroplay
Cool Member
Cool Member
Location: Denmark
Posts: 320
Joined: Sun Apr 18, 2004 10:18 pm

Sat Sep 10, 2016 8:47 pm

I see, I suspect it's an "end of line" issue.

As a last resort you could try and install Notepad++ on your XP cab (sucks I know) and convert the text or perhaps there is a txt editor for Mac that allows Windows format conversion ?

If you decide to try it in Notepad++ then open the txt file and click Edit in dropdown menu then EOL Conversion\Windows Format.

This has saved me a lot of trouble when I have to transfer txt/source files between Windows and Linux.
repetto74
Keen Member
Keen Member
Posts: 112
Joined: Sat Feb 08, 2014 2:58 pm

Sat Sep 10, 2016 9:40 pm

Hi Retroplay

Thanks I will try to install Notepad ++ on XP and do the conversion then
:wink:

Thanks !
repetto74
Keen Member
Keen Member
Posts: 112
Joined: Sat Feb 08, 2014 2:58 pm

Sun Sep 11, 2016 9:32 am

Hi Retroplay and Mad,

OK with Notepad ++ the script is good and working. 8)

The C16/plus4 gamebase is now set and working but strangely I had sound at the first try and then now I am lacking sound on all games. I have played with the SID settings of SDL Vice and tried to restore settings but no sound at all now. :?:
User avatar
.mad.
Honoured Member
Honoured Member
Location: Lancashire
Posts: 2270
Joined: Sun Jun 19, 2005 3:30 pm

Sun Sep 11, 2016 11:25 am

repetto74 wrote: I have played with the SID settings of SDL Vice and tried to restore settings but no sound at all now. :?:
check Sound settings and Machine -SID cart settings.
or add this to top of script to restore defaults.

Code: Select all

;Sound settings
Set_INI_Value(1||PLUS4||Sound||1)
Set_INI_Value(1||PLUS4||SoundVolume||100)
Set_INI_Value(1||PLUS4||SoundDeviceName||"sdl")
Set_INI_Value(1||PLUS4||SoundOutput||2)
Set_INI_Value(1||PLUS4||SoundBufferSize||100)
Set_INI_Value(1||PLUS4||SoundFragmentSize||2)
Set_INI_Value(1||PLUS4||SoundSampleRate||44100)
Set_INI_Value(1||PLUS4||SoundSpeedAdjustment||2)

;Machine / SID cart settings
Set_INI_Value(1||PLUS4||SidCart||1)
Set_INI_Value(1||PLUS4||SidEngine||0)
Set_INI_Value(1||PLUS4||SidFilters||1)
Set_INI_Value(1||PLUS4||SidResidSampling||0)
Set_INI_Value(1||PLUS4||SidResidPassband||90)
Set_INI_Value(1||PLUS4||SidResidFilterBias||0)

Set_INI_Value(1||PLUS4||SidResidGain||97)
Set_INI_Value(1||PLUS4||SidModel||0)
Set_INI_Value(1||PLUS4||SidHardSIDMain||0)
Set_INI_Value(1||PLUS4||SidHardSIDRight||1)
Set_INI_Value(1||PLUS4||SidAddress||0)
Set_INI_Value(1||PLUS4||SidClock||1)
repetto74
Keen Member
Keen Member
Posts: 112
Joined: Sat Feb 08, 2014 2:58 pm

Sun Sep 11, 2016 6:03 pm

Hi MAd,

Thank you again those added script lines solved the problem now sound is recovered :)
Anyway music and sound fx are really crap compared to the C64, they sound very scratchy with lags sometimes but I think this is the behavior of the TED Chip.
repetto74
Keen Member
Keen Member
Posts: 112
Joined: Sat Feb 08, 2014 2:58 pm

SDL VICE Commodore 64 SCRIPT

Fri Nov 11, 2016 7:23 pm

Dear MAd,

I would like to complete the serie and have the C64 emulation done with the SDL Vice as I have now for VIC-20 and C16/Plus4. I have created a script by copying the one used for the C16 and replacing any PLUS4 with C64. Unfortunately games are not loaded. I am using the V13 C64 gamebase pack. I assume that the C16 command line parameters are somehow different from the one that should be used for the C64.

Here below a copy of the modified script I have tried. It is based from your own script for the PLUS4/C16.

Any chance to guide me for a working SDL scrip for the C64? :?:

******************************************************

;******************************
;* SDLVICE 2.4.0 GEMUS Script *
;* -SDL- C64 -SDL- *
;* .mad. *
;* 10th September 2016 *
;******************************

;--------------------------------------------------------------------
; Start of script.
;--------------------------------------------------------------------

;Sound settings
Set_INI_Value(1||C64||Sound||1)
Set_INI_Value(1||C64||SoundVolume||100)
Set_INI_Value(1||C64||SoundDeviceName||"sdl")
Set_INI_Value(1||C64||SoundOutput||2)
Set_INI_Value(1||C64||SoundBufferSize||100)
Set_INI_Value(1||C64||SoundFragmentSize||2)
Set_INI_Value(1||C64||SoundSampleRate||44100)
Set_INI_Value(1||C64||SoundSpeedAdjustment||2)

;Machine / SID cart settings
Set_INI_Value(1||C64||SidCart||1)
Set_INI_Value(1||C64||SidEngine||0)
Set_INI_Value(1||C64||SidFilters||1)
Set_INI_Value(1||C64||SidResidSampling||0)
Set_INI_Value(1||C64||SidResidPassband||90)
Set_INI_Value(1||C64||SidResidFilterBias||0)

Set_INI_Value(1||C64||SidResidGain||97)
Set_INI_Value(1||C64||SidModel||0)
Set_INI_Value(1||C64||SidHardSIDMain||0)
Set_INI_Value(1||C64||SidHardSIDRight||1)
Set_INI_Value(1||C64||SidAddress||0)
Set_INI_Value(1||C64||SidClock||1)

; Set emulator default values.
;0=VirtualFS, 1=Inject to RAM, 2=Disk Image
Set_INI_Value(1||C64||AutostartPrgMode||0)

Set_INI_Value(1||C64||AutostartBasicLoad||0)
Set_INI_Value(1||C64||AutostartRunWithColon||0)
Set_INI_Value(1||C64||AutostartHandleTrueDriveEmulation||0)
Set_INI_Value(1||C64||AutostartWarp||0)
Set_INI_Value(1||C64||AutostartDelay||0)
Set_INI_Value(1||C64||AutostartDelayRandom||1)

If key_model CONTAINS (c16||c16pal||c16ntsc||plus4||plus4pal||plus4ntsc||v364||cv364||c232)
Add_CLP ( -model %model_value%)
else
Add_CLP ( -model plus4)
End If

;---------------
; RAM Expansion
;---------------
if key_ram CONTAINS(16||32||64)
Set_INI_Value(1||C64||RamSize||%ram_value%)
else
Set_INI_Value(1||C64||RamSize||64)
End If

;----------------------------------------------------------------------
; PAL or NTSC setup? (not required if NTSC machine model is used above)
;----------------------------------------------------------------------
If PalNTSC = NTSC
Add_CLP( -ntsc)
Else
Add_CLP( -pal)
End If

;------------------------------------------------------------------------------
;Joystick settings (sdl-joymap-C64.vjm)
;------------------------------------------------------------------------------
; USB Joystick must be mapped and configured, and settings saved before use.
; Extra Joypad buttons can be also mapped to any VICE menu options...
; PAUSE, WARP, STOP TAPE, INSERT DISK.
; select your own custom file for a particular game or controller.
; example joyfile=madjoy.vjm

If key_joyfile CONTAINS(*)
Set_INI_Value(1||C64||JoyMapFile||"%emupath%\%joyfile_value%")
Else
Set_INI_Value(1||C64||JoyMapFile||"%emupath%\sdl-joymap-C64.vjm")
End If

; Insert joystick in port#1 or Port#2 (Depending on setting in GameBase)
; *The default GameBase setting is port#2.
; 0=None ,1=Numpad ,2=Keyset 1 ,3=Keyset 2 ,4=USB Joystick

If Control = JoyPort1
;insert joystick in port#1 (keyset 1) and remove joystick port#2.
Set_INI_Value(1||C64||JoyDevice1||2)
Set_INI_Value(1||C64||JoyDevice2||0)

ElseIf Control = JoyPort2
;Remove joystick port 1 and insert joystick in port2 (keyset 1).
Set_INI_Value(1||C64||JoyDevice1||0)
Set_INI_Value(1||C64||JoyDevice2||2)
End If

;------------------------------------------------------------------------------
If GameType CONTAINS(t64||tap)
;------------------------------------------------------------------------------
Set_INI_Value(1||C64||AutostartPrgMode||2)
Set_INI_Value(1||C64||DatasetteResetWithCPU||1)

;------------------------------
;Fine-tune Datasette settings.
;------------------------------
If key_delay CONTAINS(1000||2000||5000||10000||20000||50000)
Set_INI_Value(1||C64||DatasetteZeroGapDelay||%delay_value%)
else
Set_INI_Value(1||C64||DatasetteZeroGapDelay||20000)
End if

If Key_cycles CONTAINS(0||1||2||3||4||5||6||7)
Set_INI_Value(1||C64||DatasetteSpeedTuning||%cycles_value%)
else
Set_INI_Value(1||C64||DatasetteSpeedTuning||1)
End if

;Default Attach TAPE and load
Add_CLP( -autostart %gamepathfile%)
Run_emulator()
End if

;------------------------------------------------------------------------------
If GameType CONTAINS(prg)
;------------------------------------------------------------------------------
; PRG mode Inject to RAM.
Set_INI_Value(1||C64||AutostartPrgMode||1)

; for PRG filenames ending with a monitor jump... xxxx_G2700.prg.
; the games can be started using the SYS function in GEMUS sys=9984
; Examples
; G5c00 = sys 23552 - Mercenary_G5C00.prg
; G7a72 = sys 31346 - Mercenary_2_The Second City_G7A72.prg

If Key_sys CONTAINS(*)
; PRG inject to RAM takes a few seconds in Plus4, increase wait time if monitor opens.
Add_CLP( -autoload "%gamepathfile%")
Run_Emulator_Send_Keys([5]sys%sys_value%{ENTER}||50)
Else
Add_CLP( -autostart "%gamepathfile%")
Run_Emulator()
End If
End If

;------------------------------------------------------------------------------
If GameType CONTAINS(crt)
;------------------------------------------------------------------------------
Set_INI_Value(1||C64||CartridgeReset||-1)

;Use default slot cart#1 low.
ADD_CLP( -c1lo "%gamepathfile%")
Run_Emulator()
End if

;------------------------------------------------------------------------------
If GameType CONTAINS(d64||g64||g41)
;------------------------------------------------------------------------------
Set_INI_Value(1||C64||DriveTrueEmulation||1)
Set_INI_Value(1||C64||VirtualDevices||1)

If key_drivetype CONTAINS(1541||1542||1551||1570||1571||1581)
Set_INI_Value(1||C64||Drive8Type||%drivetype_value%)
else
Set_INI_Value(1||C64||Drive8Type||1551)
end if

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

Run_emulator()
End If
User avatar
.mad.
Honoured Member
Honoured Member
Location: Lancashire
Posts: 2270
Joined: Sun Jun 19, 2005 3:30 pm

Sat Nov 12, 2016 4:58 pm

Try starting with the normal C64 WinVICE script.

Altering Plus4 and Vic20 command scripts will never work.
check your PM.
Retroplay
Cool Member
Cool Member
Location: Denmark
Posts: 320
Joined: Sun Apr 18, 2004 10:18 pm

Re: Annoying WinVICE/SDLVICE script issue

Fri Dec 28, 2018 4:11 am

For anyone interested, here's 64-bit Windows SDL/SDL2/GTK3VICE 3.3 binaries:
Grab them here:
https://tinyurl.com/y78fhx2g
No annoying console output window in GTK3 version :wink:
User avatar
.mad.
Honoured Member
Honoured Member
Location: Lancashire
Posts: 2270
Joined: Sun Jun 19, 2005 3:30 pm

Re: Annoying WinVICE/SDLVICE script issue

Tue Jul 23, 2019 9:51 pm

Hi Retroplay,

Please can you upload SDL2VICE-3.3-win32 with all the correct DLL files. :wink:

Thanks.
Retroplay
Cool Member
Cool Member
Location: Denmark
Posts: 320
Joined: Sun Apr 18, 2004 10:18 pm

Re: Annoying WinVICE/SDLVICE script issue

Wed Jul 24, 2019 2:52 pm

Check my link above.
FFMPEG is disabled, it keeps crapping out with no C compiler present for some strange reason when doing a 32-bit compile. :x

Anyway, FFMPEG is bugged in the 64-bit build, if you choose anything but FFV1 and lossless PCM it'll crash VICE.

Return to “The GameBase Frontend”

Who is online

Users browsing this forum: No registered users and 1 guest