Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

Vice C64 Emulator now supports SDL2



  • the latest development snapshot 2.4.30 of Vice emulator now can be built with SDL2.
    https://sourceforge.net/projects/vice-emu/files/development-releases/vice-2.4.30.tar.gz/download

    As vice functions well through retropie using dispmanx theres probably not going to be any improvement performance wise on the PI, but figured it was worth mentioning for future builds and other platform compatibility.

    only a few changes should be needed to the retropie scripts for the build.
    use --enable-sdlui2 instead of --enable-sdlui
    no longer a requirement to specify sdlbitdepth 8 on first launch
    Dispmanx SDL1 is not needed
    VICIIDoubleSize and VICIIDoubleScan can be set to 0 as the scalings done in SDL2
    if you dont like the widescreen look the aspect ratio can be fixed with adding AspectRatio="1.000000"

    With these settings vice reports its rendering 384x272 using gles2 for upscaling.

    Tested with raspbian jessie for now as i couldnt wget directly from sourceforge links to get a retropie script working.


  • administrators

    Thanks. I have a stashed commit from sdl2 testing from recently - currently checking it all works and will commit it.



  • Sounds good .
    I should have mentioned in previous post my exact configure script is :

    ./configure --enable-sdlui2 --without-pulse --disable-realdevice --disable-ipv6 --disable-lame --disable-rs232 --disable-midi

    I think that defaults me to alsa sound ? as im not defining --with-sdlsound explicitly.

    not sure if theres any benefit ive always had good performance with the above using FastSID.


  • administrators

    I have some different configure parameters (differs depending on platform), but thanks. I don't disable as much as you, eg I leave ipv6 enabled etc.



  • Yep thats why i posted mine when i noticed my testing was on ALSA. I'm recompiling with SDL sound now to make sure it plays nice with SDL2


  • administrators

    Looks like there is a minor issue with aspect ratio - if setting to "fullscreen" the "Fixed Aspect Ratio -> True" doesn't take affect unless its unset / set in the gui - saving doesn't help. Seeing if I can work around it with a default config.



  • @BuZz try setting in the home folder hidden config file /home/pi/.vice/sdl-vicerc or wherever yours writes to

    VICIIFullscreen=1
    AspectRatio="1.000000"

    Im trying raspbian build with sdl sound, im currently getting sound buffer overflows :(


  • administrators

    That doesn't help. It's the SDLGLAspectMode setting which isn't working unless switched from the gui.



  • Thats strange.

    Changing the Fixed aspect ratio through the menu is writing the following to the config file for me.

    Off = SDLGLAspectMode=0
    Custom = SDLGLAspectMode=1
    True = Removes the SDLGL entry from the config file (default?)

    Perhaps forcing the aspect mode to
    SDLGLAspectMode=1
    will then take notice of the custom
    AspectRatio="1.000000"

    worth a try.


  • administrators

    I think it's fine actually (is on a fresh build on another machine). I suspect I had built it before removing an old change that we no longer want. Cheers.


  • administrators

    Correction, it's to do with whether fullscreen is set or not - seems though if the res is set in the config, and set to window mode, you get the correct aspect on both my widescreen and 4:3 monitor, so that should do. Looking at the sdl code, it does some checks against the fullscreen setting in the video init code as to whether to set an aspect. I may try patching the code also.


  • administrators

    vice is now updated.


  • Global Moderator

    You could also test our new SDL2 dispmanx upscaling and aspect ratio settings. Dispmanx upscaling should be a little bit faster than gles upscaling.



  • Some days ago I installed the new version of Vice.

    I now have trouble with my joystick map. The joystick map does not load on startup when launchin Vice. I have to load it manually (through the emulator menu) in order go get back my joystick bindings.
    I did not changed my config files of Vice.

    What did i do wrong?



  • More detail about the joystick binding bug:
    Loading of the joymapfile does work, but it doesn't work fully anymore.

    This is my sdl-joymap-C64.vjm:

    # VICE joystick mapping file
    #
    # A joystick map is read in as patch to the current map.
    #
    # File format:
    # - comment lines start with '#'
    # - keyword lines start with '!keyword'
    # - normal line has 'joynum inputtype inputindex action'
    #
    # Keywords and their lines are:
    # '!CLEAR'    clear all mappings
    #
    # inputtype:
    # 0      axis
    # 1      button
    # 2      hat
    # 3      ball
    #
    # Note that each axis has 2 inputindex entries and each hat has 4.
    #
    # action [action_parameters]:
    # 0               none
    # 1 port pin      joystick (pin: 1/2/4/8/16 = u/d/l/r/fire)
    # 2 row col       keyboard
    # 3               map
    # 4               UI activate
    # 5 path&to&item  UI function
    #
    
    !CLEAR
    
    # Nintendo Wii Remote Pro Controller
    0 0 0 1 1 8
    0 0 1 1 1 4
    0 0 2 1 1 2
    0 0 3 1 1 1
    0 0 4 1 0 8
    0 0 5 1 0 4
    0 0 6 1 0 2
    0 0 7 1 0 1
    
    0 1 0 1 1 16
    0 1 1 1 1 16
    0 1 2 1 1 16
    0 1 3 1 1 16
    0 1 4 5 Virtual keyboard
    0 1 5 5 Statusbar
    0 1 6 0
    0 1 7 5 Speed settings&Warp mode
    0 1 8 4
    0 1 9 5 Machine settings&Joystick settings&Swap joystick ports
    0 1 10 5 Quit emulator
    0 1 11 0
    0 1 12 0
    0 1 13 1 0 1
    0 1 14 1 0 2
    0 1 15 1 0 4
    0 1 16 1 0 8
    

    Every buttonbinding does work except all those with action_parameter 5 (e.g. 0 1 10 5 Quit emulator).
    After launching vice all buttons does work except the buttons with action_parameter = 5. If I load the joystickmap manually through the Vice menu the button bindings work again as intended.

    I made a test. Launching Vice and saving the joystickmap by menu results in this sdl-joymap-C64.vjm:

    # VICE joystick mapping file
    #
    # A joystick map is read in as patch to the current map.
    #
    # File format:
    # - comment lines start with '#'
    # - keyword lines start with '!keyword'
    # - normal line has 'joynum inputtype inputindex action'
    #
    # Keywords and their lines are:
    # '!CLEAR'    clear all mappings
    #
    # inputtype:
    # 0      axis
    # 1      button
    # 2      hat
    # 3      ball
    #
    # Note that each axis has 2 inputindex entries and each hat has 4.
    #
    # action [action_parameters]:
    # 0               none
    # 1 port pin      joystick (pin: 1/2/4/8/16 = u/d/l/r/fire)
    # 2 row col       keyboard
    # 3               map
    # 4               UI activate
    # 5 path&to&item  UI function
    #
    
    !CLEAR
    
    # Nintendo Wii Remote Pro Controller
    0 0 0 1 1 8
    0 0 1 1 1 4
    0 0 2 1 1 2
    0 0 3 1 1 1
    0 0 4 1 0 8
    0 0 5 1 0 4
    0 0 6 1 0 2
    0 0 7 1 0 1
    
    0 1 0 1 1 16
    0 1 1 1 1 16
    0 1 2 1 1 16
    0 1 3 1 1 16
    0 1 4 5 (null)
    0 1 5 5 (null)
    0 1 6 0
    0 1 7 5 (null)
    0 1 8 4
    0 1 9 5 (null)
    0 1 10 5 (null)
    0 1 11 0
    0 1 12 0
    0 1 13 1 0 1
    0 1 14 1 0 2
    0 1 15 1 0 4
    0 1 16 1 0 8
    

    The keybindings which results in an UI function do get lost at the moment.
    But I think this is not RetroPie related. This seems to be a upstream bug. I will report this to http://vice-emu.sourceforge.net/



  • This seems to be a known bug on upstream side:
    https://sourceforge.net/p/vice-emu/bugs/651/

    This bug appears since version 2.4.7.28292 and seems not to be resolved yet.



  • Upstream bug is now fixed in version r31978. See: https://sourceforge.net/p/vice-emu/bugs/796/

    Source head tree:
    https://sourceforge.net/p/vice-emu/code/HEAD/tree/

    Unfortunately I am not capable of doing a new version for Raspberry.
    Any volunteers out there? ;)



  • Hi Jimbo,

    sorry for late response, i try to keep an eye on the vice threads since suggesting the updates- had long weekend away due to Play Expo (beer+real c64s!)
    Looks like this fix came just after the 2.4.31 source release https://sourceforge.net/projects/vice-emu/files/development-releases/vice-2.4.31.tar.gz/download at r31973 unfortunately. (would have made updating/testing the script really simple).
    Ill build the code from the svn when i get chance and see how it works/ report any new findings here



  • Or we can just wait until 2.4.32 arrives. Perhaps in one month?


Log in to reply
 

Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.