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

Sat Aug 27, 2016 8:55 am

I have tested using the original Winvice 2.4 script and still same error as reported by the user who started this thread.

I have then added the lines to your SDL Vice script as you suggested but getting a prompt gamebase returns of "too many parameters expected 4 Line 558" :?

Here is the area of the script modified
;--------------------------------------------------------------------

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||Drive10Type||0)
Set_INI_Value(1||VIC20||Drive11Type||0)
Set_INI_Value(1||vic20||VirtualDevices||1)
Set_INI_Value(1||VIC20||DriveTrueEmulation||1)
Set_INI_Value(1||VIC20||AutostartHandleTrueDriveEmulation||1)


; -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%")
User avatar
.mad.
Honoured Member
Honoured Member
Location: Lancashire
Posts: 2270
Joined: Sun Jun 19, 2005 3:30 pm

Sat Aug 27, 2016 10:43 am

ok i have SDLVICE v2.4.0 on my PC now.

the command-line does not work the same as normal x86 version.
2 options.

1) all cart files require renaming to pass.

2) the script needs changing which will require more GEMUS entries for those cart games.

So i have chosen option 1 and renamed all the cart files and re-linked them.
all working for me.

i will send you a PM with details later on...
repetto74
Keen Member
Keen Member
Posts: 112
Joined: Sat Feb 08, 2014 2:58 pm

Sat Aug 27, 2016 1:49 pm

Hi Mad,

OK many thanks for your help :D
repetto74
Keen Member
Keen Member
Posts: 112
Joined: Sat Feb 08, 2014 2:58 pm

Mon Aug 29, 2016 5:24 pm

Hi Mad,


I confirm all is working perfectly :D ! SDL Vice will load roms with no issue now. :wink:

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

Wed Aug 31, 2016 6:14 pm

Hi Mad,

Actually I have noted that the joystick setting will not keep even if settings are saved in SDLVice. Each time I have to select le joystick from the menu which is quiet annoying with a cab machine. :?:
All the rest is fine.
Hidron
Cool Member
Cool Member
Location: USA
Posts: 444
Joined: Sun Feb 13, 2011 5:05 pm

Wed Aug 31, 2016 7:21 pm

You may want to setup Joystick control in the GEMUS settings. (F2 in the Gamebase frontend).

Any current settings should show up in the left hand window. By default most games will have no settings here. If they begin with a semicolon, they are remarked out.

Code: Select all

RealJoystick1=yes
RealJoystick2=yes
I believe RealJoystick1=yes is sufficient for any single player game regardless of which port is needed by the game.

Try it out in one game first. By default you are only editing the currently selected game. You can select "Edit All Games in Current View" later if you choose.
I have a lot of respect for Gamebase creators, maintainers & supporters.
User avatar
.mad.
Honoured Member
Honoured Member
Location: Lancashire
Posts: 2270
Joined: Sun Jun 19, 2005 3:30 pm

Thu Sep 01, 2016 9:15 am

repetto74 wrote:Hi Mad,

Actually I have noted that the joystick setting will not keep even if settings are saved in SDLVice. Each time I have to select le joystick from the menu which is quiet annoying with a cab machine. :?:
All the rest is fine.
That will be the wrong device number being used for your cab keyboard/joystick in the script.
i used my USB pad (device 4) for testing.
I guess yours will be different as it is keyboard based (maybe 5).

once you have it mapped and working, save the joystick settings.
"sdl-joymap-VIC20.vjm"

save the emulator settings.
"sdl-vice.ini"


now check the "sdl-vice.ini" for the JoyDevice1 number.

Edit this line the script, to the new working number.
Set_INI_Value(1||VIC20||JoyDevice1||4)
repetto74
Keen Member
Keen Member
Posts: 112
Joined: Sat Feb 08, 2014 2:58 pm

Fri Sep 02, 2016 4:38 pm

Hi Mad,

Always super helpfull !! :D Setting number 2 in the script folder did the trick.

Is it possible to remap some VIC-20 keys to any of my PC key? Where can I edit this?

I would like mostly to remap the VIC function keys to some dedicated keys on the PC keyboard.
User avatar
.mad.
Honoured Member
Honoured Member
Location: Lancashire
Posts: 2270
Joined: Sun Jun 19, 2005 3:30 pm

Sat Sep 03, 2016 11:18 am

repetto74 wrote: Is it possible to remap some VIC-20 keys to any of my PC key? Where can I edit this?

I would like mostly to remap the VIC function keys to some dedicated keys on the PC keyboard.
The more i use this SDL version the more i like it!.
It has some amazing functions not available in the normal Win version.

--
Press F12 to open menu.
Select Virtual Keyboard.
Select the Virtual key you want.
Press 'M' to map the key.
press a joystick button or move in any direction, to configure that joystick event to the mapped key.
save the settings.

with this function it is possible to map almost every game that doesn't have joystick control to your cab joystick.
without the need for external programs like xpadder or joy2key.
repetto74
Keen Member
Keen Member
Posts: 112
Joined: Sat Feb 08, 2014 2:58 pm

Sat Sep 03, 2016 12:01 pm

Hi Mad,

ThAt's great!! :-) yes SDL Vice is just the commodore emulator you want to have especially if using a cab machine with a low res crt monitor :wink:

I will set keys through the virtual keyboard then

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

Mon Sep 05, 2016 4:19 pm

Hi MAd,

All is set now! This SDL Vice really rocks solid :D I can even map a button to pop up the main UI menu directly from the cab controls.

I would like to add also the C64 and Plus4 emulation with SDL Vice. I have edited the script and replaced VIC20 with C64 and PLUS4. My question is to know if this is going to work with the x64.exe and xplus4.exe of SDL vice or shall is a modification needed as you did for the VIC?
:?:
User avatar
.mad.
Honoured Member
Honoured Member
Location: Lancashire
Posts: 2270
Joined: Sun Jun 19, 2005 3:30 pm

Mon Sep 05, 2016 9:39 pm

cartridge, memory and joystick settings are different in VIC20.

you will need to delete those parts for the C64 and Plus4 scripts.

Then test it to see which command-lines work in the SDL version.
repetto74
Keen Member
Keen Member
Posts: 112
Joined: Sat Feb 08, 2014 2:58 pm

Tue Sep 06, 2016 12:36 pm

Hi Mad

Ok thanks I will compare with a winvice script and change accordingly 😉
Retroplay
Cool Member
Cool Member
Location: Denmark
Posts: 320
Joined: Sun Apr 18, 2004 10:18 pm

Tue Sep 06, 2016 5:09 pm

Slightly off-topic:
.mad. wrote:without the need for external programs like xpadder or joy2key.
Don't forget AntiMicro, it's freeware and available for Linux and Windows.
It works just like Xpadder, I use it on Linux for a few games that don't have joystick support and it works great. :)
repetto74
Keen Member
Keen Member
Posts: 112
Joined: Sat Feb 08, 2014 2:58 pm

Thu Sep 08, 2016 6:53 pm

Hi Mad,

Have tried to edit a Winvice script for the PLUS4 gamebase but I do have exactly the same error "device not found" at the PLUS4 prompt screen. I have tried to set the true drive emulation in SDL Vice but no luck.

This is the script I am using. It is your SDL Vice script reworked.
*******************************************************
;******************************
;* SDLVICE 2.4.0 GEMUS Script *
;* -SDL- PLUS/4 -SDL- *
;* .mad. *
;* 28th August 2016 *
;******************************

; Set emulator default values.
Set_INI_Value(1||PLUS4||AutostartPrgMode||0)
Set_INI_Value(1||PLUS4||AutostartWarp||0)
Set_INI_Value(1||PLUS4||VICFilter||0)
Set_INI_Value(1||PLUS4||VirtualDevices||1)

;Do we want a PAL or NTSC setup?
If PalNTSC = NTSC
Add_CLP( -ntsc)
;Set_INI_Value(1||C64||MachineVideoStandard||-2)
Else
Add_CLP( -pal)
;Set_INI_Value(1||C64||MachineVideoStandard||-1)
End If

;--------------------------------------------------------------------
; JOYSTICK
;--------------------------------------------------------------------
; Turn on joystick port#1 (select your control)
; 0=None ,1=Numpad ,2=Keyset 1 ,3=Keyset 2 ,4=USB Joystick

Set_INI_Value(1||PLUS4||JoyDevice1||4)

; Joystick map settings are saved to a separate file.
; 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-VIC20.vjm")
End If
;--------------------------------------------------------------------

If Control = Mouse
Set_INI_Value(1||PLUS4||Mouse||1)
Set_INI_Value(1||PLUS4||MouseSensitivity||40)

ElseIf Control = LightPen
Set_INI_Value(1||PLUS4||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||PLUS4||LightpenType||0)

ElseIf Control = LightGun
Set_INI_Value(1||PLUS4||Lightpen||1)
Set_INI_Value(1||PLUS4||LightpenType||3)

;Paddles are switched on using Mouse command.
ElseIf Control = PaddlePort2
Set_INI_Value(1||PLUS4||Mouse||1)
ElseIf Control = PaddlePort1
Set_INI_Value(1||PLUS4||Mouse||1)

Else
Set_INI_Value(1||PLUS4||Lightpen||0)
Set_INI_Value(1||PLUS4||LightpenType||0)
Set_INI_Value(1||PLUS4||Mouse||0)
End If

;--------------------------------------------------------------------
; Memory configuration. 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(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

;Caves of Annod=1, Shark Attack=2
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)
;use prg run mode.
Set_INI_Value(1||PLUS4||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

;---------------------------------------------------------------------
; wildcards do not work on the command-line for carts in the SDL version of VICE.
; All the cartridge files MUST been correctly renamed to one of the following...
; "2000.crt" "4000.crt" "6000.crt" "a000.crt" "b000.crt"
;EXAMPLE of new file structure
;DONKEY KONG.ZIP
; 2000.crt
; a000.crt
;
; Add GEMUS cart=2000 and cart2=a000
;--------------------------------------------------------------------

If GameType CONTAINS(crt||rom)

;1=Generic 2=Mega-Cart 3=Final Expansion 4=Vic Flash Plugin
Set_INI_Value(1||PLUS4||CartridgeType||1)

;Reset on Cartridge Change
If Key_cartreset CONTAINS (off)
Set_INI_Value(1||PLUS4||CartridgeReset||0)
else
Set_INI_Value(1||PLUS4||CartridgeReset||-1)
end if


If Key_cart CONTAINS(*20*)
Add_CLP( -cart2 %gamepath%\2000.crt)
ElseIf Key_cart CONTAINS(*40*)
Add_CLP( -cart4 %gamepath%\4000.crt)
ElseIf Key_cart CONTAINS(*60*)
Add_CLP( -cart6 %gamepath%\6000.crt)
ElseIf Key_cart CONTAINS(*a0*)
Add_CLP( -cartA %gamepath%\a000.crt)
ElseIf Key_cart CONTAINS(*b0*)
Add_CLP( -cartB %gamepath%\b000.crt)
End If

If Key_cart2 CONTAINS(*20*)
Add_CLP( -cart2 %gamepath%\2000.crt)
ElseIf Key_cart2 CONTAINS(*40*)
Add_CLP( -cart4 %gamepath%\4000.crt)
ElseIf Key_cart2 CONTAINS(*60*)
Add_CLP( -cart6 %gamepath%\6000.crt)
ElseIf Key_cart2 CONTAINS(*a0*)
Add_CLP( -cartA %gamepath%\a000.crt)
ElseIf Key_cart2 CONTAINS(*b0*)
Add_CLP( -cartB %gamepath%\b000.crt)
End If


; AE Cart boots with corrupt screen with RAM 00 at 0000.
; must use these VICE RAM settings, or enter monitor and type - G A027.

If key_RAM CONTAINS (255)
Set_INI_Value(1||PLUS4||RAMInitStartValue||255)
Else
Set_INI_Value(1||PLUS4||RAMInitStartValue||0)
End If

; Default is 64, possible settings (0||1||2||4||8||16||32||64||128||256||512||1024)
Set_INI_Value(1||PLUS4||RAMInitValueInvert||64)

; Default is 0, possible settings (0||1||2||4||8||16||32||64||128||256||512||1024)
Set_INI_Value(1||PLUS4||RAMInitPatternInvert||0)

;Start Cart with SYS command (Mission Impossible).
;GEMUS sys=32592
If Key_sys CONTAINS(*)
Run_Emulator_Send_Keys([2]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(d64||g64||g41)

Set_INI_Value(1||PLUS4||DriveTrueEmulation||1)

; -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



I may think the issue is the same as the VIC20 gamebase where a database renaming is necessary? :roll: :?:

Return to “The GameBase Frontend”

Who is online

Users browsing this forum: No registered users and 1 guest