Gamebase 64 Forum

RegisterRegister Log inLog in

Annoying WinVICE/SDLVICE script issue
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    -= GB64 Forum =- Forum Index -> The GameBase Frontend
View previous topic :: View next topic  
Author Message
repetto74
Keen Member
Keen Member


Joined: 08 Feb 2014
Posts: 112
GB64-Points: 112


PostPosted: Fri Sep 09, 2016 5:47 pm    Post subject: Reply with quote

I may use YAPE emulator which looks good but need to figure out how I can set a low resolution icon_question.gif
Back to top
View user's profile Send private message
.mad.
Elite Member
Elite Member


Joined: 19 Jun 2005
Posts: 1563
GB64-Points: 4014
Location: Lancashire

PostPosted: Sat Sep 10, 2016 9:12 am    Post subject: Reply with quote

This works for my Plus/4 GB.

Code:

;******************************
;* 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
Back to top
View user's profile Send private message
repetto74
Keen Member
Keen Member


Joined: 08 Feb 2014
Posts: 112
GB64-Points: 112


PostPosted: Sat Sep 10, 2016 6:58 pm    Post subject: Reply with quote

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 icon_rolleyes.gif

So thanks again for your patience icon_smile.gif
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 icon_sad.gif 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
Back to top
View user's profile Send private message
Retroplay
Commended Member
Commended Member


Joined: 18 Apr 2004
Posts: 282
GB64-Points: 1122
Location: Denmark

PostPosted: Sat Sep 10, 2016 7:11 pm    Post subject: Reply with quote

Use Notepad++ instead of notepad/wordpad.
Back to top
View user's profile Send private message
repetto74
Keen Member
Keen Member


Joined: 08 Feb 2014
Posts: 112
GB64-Points: 112


PostPosted: Sat Sep 10, 2016 7:28 pm    Post subject: Reply with quote

Hi Retroplay,

I am on a Mac so copy/pasting with TextEdit before moving to the Cab Machine under XP.
Back to top
View user's profile Send private message
Retroplay
Commended Member
Commended Member


Joined: 18 Apr 2004
Posts: 282
GB64-Points: 1122
Location: Denmark

PostPosted: Sat Sep 10, 2016 8:47 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
repetto74
Keen Member
Keen Member


Joined: 08 Feb 2014
Posts: 112
GB64-Points: 112


PostPosted: Sat Sep 10, 2016 9:40 pm    Post subject: Reply with quote

Hi Retroplay

Thanks I will try to install Notepad ++ on XP and do the conversion then
icon_wink.gif

Thanks !
Back to top
View user's profile Send private message
repetto74
Keen Member
Keen Member


Joined: 08 Feb 2014
Posts: 112
GB64-Points: 112


PostPosted: Sun Sep 11, 2016 9:32 am    Post subject: Reply with quote

Hi Retroplay and Mad,

OK with Notepad ++ the script is good and working. icon_cool.gif

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. icon_question.gif
Back to top
View user's profile Send private message
.mad.
Elite Member
Elite Member


Joined: 19 Jun 2005
Posts: 1563
GB64-Points: 4014
Location: Lancashire

PostPosted: Sun Sep 11, 2016 11:25 am    Post subject: Reply with quote

repetto74 wrote:

I have played with the SID settings of SDL Vice and tried to restore settings but no sound at all now. icon_question.gif


check Sound settings and Machine -SID cart settings.
or add this to top of script to restore defaults.


Code:

;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)
Back to top
View user's profile Send private message
repetto74
Keen Member
Keen Member


Joined: 08 Feb 2014
Posts: 112
GB64-Points: 112


PostPosted: Sun Sep 11, 2016 6:03 pm    Post subject: Reply with quote

Hi MAd,

Thank you again those added script lines solved the problem now sound is recovered icon_smile.gif
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.
Back to top
View user's profile Send private message
repetto74
Keen Member
Keen Member


Joined: 08 Feb 2014
Posts: 112
GB64-Points: 112


PostPosted: Fri Nov 11, 2016 7:23 pm    Post subject: SDL VICE Commodore 64 SCRIPT Reply with quote

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? icon_question.gif

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

;******************************
;* 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
Back to top
View user's profile Send private message
.mad.
Elite Member
Elite Member


Joined: 19 Jun 2005
Posts: 1563
GB64-Points: 4014
Location: Lancashire

PostPosted: Sat Nov 12, 2016 4:58 pm    Post subject: Reply with quote

Try starting with the normal C64 WinVICE script.

Altering Plus4 and Vic20 command scripts will never work.
check your PM.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    -= GB64 Forum =- Forum Index -> The GameBase Frontend All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
Cannot post new topics
Cannot reply to topics
Cannot edit your posts
Cannot delete your posts
Cannot vote in polls in this forum


Powered by phpBB © phpBB Group

The C64 Banner Exchange
The C64 Banner Exchange

gb64.com ©1997-2015 The GB64 Team