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

Mapping USB-gamepad (SNES) to lr-vice (1.8.4.- VICE x64 (3.3 1274f7d))



  • Hi guys,
    I need some help to get my USB-gamepad working with lr-vice. I do not have problems with other cores than C64.
    GB, GBC, GBA, NES, N64 ... all are working fine with USB-pad as well as built-in controls.
    My problem started with "stand alone vice" which I used first, refusing to work with built-in controls but only accepting USB-pads. I got help on that here, suggesting to use lr-vice instead of stand alone vice. That was great advice indeed, because now my built-in buttons work just fine.
    But in turn the USB-pad behaves strange now! "start" and "select" do not seem to work. Most important: I can't get the virtual keybord to show up. Being in a game, pressing "select" does nothing. I can only start a game using built-in buttons. After that I can take over with USB-pad and play to some extend. Up, Down, Left, Right and Fire do work with USB but "start" & "select" simply won't.
    When pressing both (start & select) a tiny message appears in the left bottom corner but its too smal to read :(
    Can someone please advise on how to map USB-pad "start" and "select" correctly in lr-vice version 1.8.4?


  • Global Moderator

    Please add more info about your system, as detailed in https://retropie.org.uk/forum/topic/3/read-this-first.



  • @mitu said in Mapping USB-gamepad (SNES) to lr-vice (1.8.4.- VICE x64 (3.3 1274f7d)):

    Please add more info about your system, as detailed in https://retropie.org.uk/forum/topic/3/read-this-first.

    Sorry for leaving this out:

    Pi Model or other hardware: Pi 3 B
    Power Supply used: 3,7V LiPo plus PowerBoost 1000
    RetroPie Version Used: 4.5.1
    Built From: Pre made SD Image on RetroPie website, (retropie-4.5.1-rpi2_rpi3.img)
    USB Devices connected: SNES controller
    Controller used: Built-In hardware (directly connected to GUIs) and USB-SNES controller
    Error messages received: none
    Emulator: lr-vice 1.8.4


  • Global Moderator

    @bastelhannes said in Mapping USB-gamepad (SNES) to lr-vice (1.8.4.- VICE x64 (3.3 1274f7d)):

    Controller used: Built-In hardware (directly connected to GUIs) and USB-SNES controller

    What does this mean ? The Pi3B doesn't have any built-in hardware for buttons/joypads.

    When pressing both (start & select) a tiny message appears in the left bottom corner but its too smal to read :(

    This means you're not using the default RetroPie configuration for RetroArch, since the exit hotkey (Start + Select) should exit the emulator. My guess is you've reset the RetroArch configuration for the c64 system.

    After that I can take over with USB-pad and play to some extend. Up, Down, Left, Right and Fire do work with USB but "start" & "select" simply won't.

    That may be normal, since only Player 1 can use the hotkeys (including Start + Hotkey to exit a game), if your 'built-in' controls may be assigned to P1

    I advise you to reset the RetroArch configuration for the c64 by removing the \\retropie\configs\c64\retroarch.cfg and re-installing lr-vice. After that, see what issues you have still from the ones you reported. The virtual keyboard should at least work using Select (on P1).



  • Thanks for answering!

    @mitu said in Mapping USB-gamepad (SNES) to lr-vice (1.8.4.- VICE x64 (3.3 1274f7d)):

    What does this mean ? The Pi3B doesn't have any built-in hardware for buttons/joypads.

    My mistake! I should have mentioned the Pi3B working in a handheld-console where all neccessary buttons are built in and are direktly connected to the Pi's GOI-Pins (no USB-adapter in between.
    The External USB-gamepad is only used occasionally. This setup works for all other emulators. Hitting "select & start" always gets me out of a game, so hotkeys seem to work on "normal" games for both, USB and built-in control.

    I advise you to reset the RetroArch configuration for the c64 by removing the \\retropie\configs\c64\retroarch.cfg and re-installing lr-vice. After that, see what issues you have still from the ones you reported. The virtual keyboard should at least work using Select (on P1).

    Following your advice I have deleted retroarch.cfg, de-installed lr-vice, re-booted the system and installed lr-vice once again.
    After all that, nothing has changed. I think I might have to live with that. It's just that I don't understand why lr-vice can't simply handle my controllers the way all other emulators do?

    Thanks again for trying to help.


  • Global Moderator

    @bastelhannes said in Mapping USB-gamepad (SNES) to lr-vice (1.8.4.- VICE x64 (3.3 1274f7d)):

    After all that, nothing has changed. I think I might have to live with that. It's just that I don't understand why lr-vice can't simply handle my controllers the way all other emulators do?

    Maybe the issue is in another place. Can you run with debug/verbose logging enabled and post the /dev/shm/runcommand.log on pastebin.com ? We should see what configuration is lr-vice using.



  • @mitu said in Mapping USB-gamepad (SNES) to lr-vice (1.8.4.- VICE x64 (3.3 1274f7d)):

    Can you run with debug/verbose logging enabled and post the /dev/shm/runcommand.log on pastebin.com ? We should see what configuration is lr-vice using.

    I would like to , but how (or where) do I enable "debug/verbose logging"?


  • Global Moderator

    @bastelhannes It's an option from the Runcommand launch menu.




  • Global Moderator

    Ok, looking at the logs, it looks like you have 2 keyboards connected, 1 mouse and 1 gamepad

    [INFO] [udev]: Keyboard #0 (/dev/input/event0).
    [INFO] [udev]: Keyboard #1 (/dev/input/event3).
    [INFO] [udev]: Mouse #0 (/dev/input/event1).
    [INFO] [udev]: Mouse #1 (/dev/input/mouse0).
    [INFO] [udev]: Plugged pad: usb gamepad            (2064:58625) on port #0.
    [INFO] [udev]: Pad #0 (/dev/input/event2) supports 0 force feedback effects.
    [INFO] [Autoconf]: 2 profiles found.
    [INFO] [Autoconf]: selected configuration: /home/pi/.config/retroarch/autoconfig/usb gamepad           .cfg
    
    

    Are your GPIO buttons configured as a keyboard ? Did you set a Hotkey when configuring your GPIO gamepad ?



  • @mitu
    When I did the first log this morning I indeed had one USB-keybord and one USB-gamepad connected in addition to the GPIO gamepad.

    Now I have removed the keybord and made a new log file, this time showing:

    [INFO] [Video]: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver.
    [INFO] [udev]: Keyboard #0 (/dev/input/event3).
    [INFO] [udev]: Plugged pad: usb gamepad (2064:58625) on port #0.
    [INFO] [udev]: Pad #0 (/dev/input/event2) supports 0 force feedback effects.
    [INFO] [Autoconf]: 2 profiles found.

    I don't know about GPIO-buttons being configured as keybord, but I just mapped them in Emulationstation with no USB-gamepad connected at the time. When I did that, I did NOT assign a button to be hotkey, so the system told me "select" was allocated to be hotkey by default.

    Don't know if this helps:
    when USB-pad is connected I get this message (left botton of screen):
    message1.jpg

    when pressing Start & Select in a game I get:
    message2.jpg
    pressing Start & Select once again it gets me out of the game.
    This is true for ALL games in all emulators, even lr-vice. So doesn't it mean, "Select" IS in fact considered to be hotkey? And if so, why wouldn't it bring up virtual keys in lr-vice?


  • Global Moderator

    OK, I just tested with a keyboard + gamepad, they both should work to bring up the virtual keyboard (as Select) and also exit the game with the Hotkey + Start combo.

    I think you've edited/reset your global retroarch.cfg and/or the one for the c64 system and it disabled the hotkey for the keyboard ?

    The confirmation message should not appear, it's a new setting in 1.8.2 I think, that's disabled if installing/upgrading RetroArch, but it's set to enabled in a default RetroArch configuration, so I'm thinking you've reset your global RetroArch config at some point (maybe from the RetroPie system in EmulationStation).

    You can look in 2 places for the configuration files I mentioned

    • the c64 configuration is kept in \\retropie\configs\c64, but that should be almost empty if you haven't enabled 'Save on Exit'
    • the global RetroArch configuration, kept in \\retropie\configs\all\retroarch.cfg.

    Can you post those 2 files on pastebin.com ?



  • @mitu
    You are right! I have updated retroarch a few days ago. To understand the whole history you would probable have to read this topic first. This is, how the whole story started.

    As for the retroarch.cfg files, the one in \retropie\configs\c64 has only this one line: input_remapping_directory = "/opt/retropie/configs/c64/"

    The \retropie\configs\all\retroarch.cfg should come up here.


  • Global Moderator

    @bastelhannes said in Mapping USB-gamepad (SNES) to lr-vice (1.8.4.- VICE x64 (3.3 1274f7d)):

    As for the retroarch.cfg files, the one in \retropie\configs\c64 has only this one line: input_remapping_directory = "/opt/retropie/configs/c64/"

    It should have a bit more lines. Here's what it should contain (just add the remaining lines to the same file in c64 configuration folder):

    # Settings made here will only override settings in the global retroarch.cfg if placed above the #include line
    
    input_remapping_directory = "/opt/retropie/configs/c64/"
    
    #include "/opt/retropie/configs/all/retroarch.cfg"
    

    The \retropie\configs\all\retroarch.cfg should come up here.

    I see - it doesn't look like you've reset your config (which is good), but you probably have upgraded the RetroArch package without updating the RetroPie setup script first. You're missing the option to exit without confirmation and the new widget menu assets. You can get it if you first update your RetroPie-Setup and then update RetroArch again - which I strongly recommend.

    To get rid of the tiny message display, after you update RetroArch change the font size in the global retroarch.cfg from 12 to 24:

    # Size of the font rendered in points.
    video_font_size = "24"
    

    Do these small modifications and try again to see if your lr-vice problem is solved.



  • @mitu said in Mapping USB-gamepad (SNES) to lr-vice (1.8.4.- VICE x64 (3.3 1274f7d)):

    It should have a bit more lines. Here's what it should contain (just add the remaining lines to the same file in c64 configuration folder):

    # Settings made here will only override settings in the global retroarch.cfg if placed above the #include line
    
    input_remapping_directory = "/opt/retropie/configs/c64/"
    
    #include "/opt/retropie/configs/all/retroarch.cfg"
    

    Well, once again my fault: Those two missing lines were actually there! I just left them out, thinking they were of no concern because of the "#" in front.
    So no need for a change there.

    You're missing the option to exit without confirmation and the new widget menu assets. You can get it if you first update your RetroPie-Setup and then update RetroArch again - which I strongly recommend.

    I have just now updated Retropie-Setup and after that Retroarch too. Now when shutting down a game, the confirmation message has gone. That's great!
    Changing the font size from 12 to 24 was good advice too and made that tiny message readable.

    Do these small modifications and try again to see if your lr-vice problem is solved.

    Unfortunately the virtual keybord problem remains. GPOI-"select" get's it to show. USB-pad-"select" won't.


  • Global Moderator

    @bastelhannes said in Mapping USB-gamepad (SNES) to lr-vice (1.8.4.- VICE x64 (3.3 1274f7d)):

    Unfortunately the virtual keybord problem remains. GPOI-"select" get's it to show. USB-pad-"select" won't.

    The gamepad configuration is shared between all the libretro cores, so I don't understand how it works with all other system, but not with c64.

    The configuration is kept in \\retropie\configs\all\retroarch-joypads (one .cfg per configured controller) and loaded by RetroArch depending on your gamepad. The verbose log you posted shows one of the 2 configuration is picked up (/home/pi/.config/retroarch/autoconfig/usb gamepad .cfg).

    The only thing that remains is that we might have different versions of the core. Did you update it from binary or source ?



  • @mitu said in Mapping USB-gamepad (SNES) to lr-vice (1.8.4.- VICE x64 (3.3 1274f7d)):

    The gamepad configuration is shared between all the libretro cores, so I don't understand how it works with all other system, but not with c64.

    There might be a misunderstanding:
    There is no difference in action of the gamepad between C64 and all other systems. It works just the same way for all systems (even C64). It never gets the v-keyboard to show. But as that's only required for C64, it can not be compared to other cores. But for all cores (even for C64), pressing "start+select" will terminate a game. To me it shows, that hotkey is working, only virtual keyboard does not.
    I have noticed, whatever USB-socket I use to connect it, I always get the message "connected to P0". Maybe virtual keyboard can't be activated from P0?

    I believe I got lr-vice from binary.


  • Global Moderator

    You said:

    There is no difference in action of the gamepad between C64 and all other systems

    but at the beginning of the topic you also said:

    fter that I can take over with USB-pad and play to some extend. Up, Down, Left, Right and Fire do work with USB but "start" & "select" simply won't.

    Hence my misunderstanding. So only the VKBD is the one that doesn't pop-up.

    I have noticed, whatever USB-socket I use to connect it, I always get the message "connected to P0". Maybe virtual keyboard can't be activated from P0?

    No, it should work (P0 meaning the first gamepad detected).

    I believe I got lr-vice from binary.

    Same here, though it's a different platform.



  • @mitu said in Mapping USB-gamepad (SNES) to lr-vice (1.8.4.- VICE x64 (3.3 1274f7d)):

    but at the beginning of the topic you also said:

    fter that I can take over with USB-pad and play to some extend. Up, Down, Left, Right and Fire do work with USB but "start" & "select" simply won't.

    Hence my misunderstanding. So only the VKBD is the one that doesn't pop-up.

    Yes you are right, it started that way. But then, at one point after some re-installations as documented here, I noticed the combo of "start + select" suddenly working for getting out of games. It wasn't that way from the beginning.
    Now it's only the VKBD-issue left.



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.