RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Linux Joystick Mapper not working for the CoCo emulator (XRoar). Any clues?

    Scheduled Pinned Locked Moved General Discussion and Gaming
    xroarexit emulatorjoymapexitcoco
    8 Posts 3 Posters 849 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      wmoecke
      last edited by wmoecke

      Re: Mapping a keyboard key to the gamepad(s)?

      Hi everyone. I am desperately trying to get XRoar to respond to my gamepad when I press Select + Start. It doesn't recoginze anything but Ctrl-Q issued from a real keyboard plugged into my Pi. This is totally awkward! I have a beautiful UI all configured to launch games via the gamepad and XRoar seems to walk in the opposite direction!

      What I've done so far:

      • I've downloaded and compiled the Linux Joystick Mapper v0.4.2 program (loadmap), that supposedly is intended for doing the magic of mapping joystick buttons to keyboard events. I created the required .map file and put it in the same folder where I placed the compiled joymap executable (/home/pi/RetroPie/joymap) - I wrote it like so:
      # Exit XRoar emulator by pressing Select and Start
      button vendor=0x2563 product=0x0575 src=8 target=kbd button="leftctrl"
      button vendor=0x2563 product=0x0575 src=9 target=kbd button="q"
      

      (The vendor=0x2563 product=0x0575 codes are from my currently installed gamepad).

      • Following that, I wrote a small bash script that takes 2 arguments (machine type and rom path):
      #!/bin/bash
      sudo /home/pi/RetroPie/joymap/loadmap /home/pi/RetroPie/joymap/xroar.map &
      /opt/retropie/emulators/xroar/bin/xroar -fs -vo sdl -ao alsa -ccr simple -machine "$1" -rompath /home/pi/RetroPie/BIOS -run "$2"
      sudo killall loadmap
      sleep 1
      
      • This script is launched from the /opt/retropie/configs/coco/emulators.cfg file, which reads:
      xroar-cocous-loadmap = "bash /opt/retropie/configs/coco/launch-xroar-loadmap.sh cocous %ROM%"
      default = "xroar-cocous-loadmap"
      

      What happens: I can launch the emulator from ES normally, but once it is running, neither the keys I've mapped on loadmap, nor the gamepad's axes and buttons work (in-game controls, which used to work before loadmap). I get nothing both ways. I've thoroughly studied the docs for both XRoar and joymap and I cannot see what I could've possibly missed.

      So I am at a loss. I only wanted to be able to exit the emulator without the hassle of having to plug in a keyboard every time I needed to do so; therefore, I would certainly appreciate any valuable input from anyone who's been successful in accomplishing this goal with XRoar.

      W 1 Reply Last reply Reply Quote 0
      • W
        wmoecke @wmoecke
        last edited by

        No help?

        I guess the CoCo isn't as much popular within the RetroPie realm as I expected?

        S 1 Reply Last reply Reply Quote 0
        • HalvhjearneH
          Halvhjearne
          last edited by Halvhjearne

          its not something i use and i actually never heard of linux joystick mapper (i would probably use something like joy2key instead), but did you confirm that it works outside XRoar?

          you can also try joy2key

          W 1 Reply Last reply Reply Quote 0
          • S
            spud11 @wmoecke
            last edited by

            @wmoecke Many of us who map our joysticks to keys in Retropie tend to use xboxdrv. I have an arcade cabinet and map two buttons to the exit keys of various non-libretro emulators.

            RetroPie v4.4.1 • RPi3 Model B • 5.1V 2.5A PSU • 32GB SanDisk Extreme microSD • 2TB Toshiba Canvio Basics Portable USB 3.0 hard drive • 4 x DragonRise USB Arcade joysticks • 2 x TurboTwist spinners • 1 x USB trackball • 1 x PS4 wireless • 1 x 8BitDo Zero

            W 1 Reply Last reply Reply Quote 0
            • W
              wmoecke @Halvhjearne
              last edited by

              @Halvhjearne afaik, joy2key is a GUI application, so it is meant for a GUI environment, not something you can use in a command line, such as it is required in launching games with ES.

              HalvhjearneH 1 Reply Last reply Reply Quote 0
              • W
                wmoecke @spud11
                last edited by wmoecke

                @spud11 said in Linux Joystick Mapper not working for the CoCo emulator (XRoar). Any clues?:

                xboxdrv

                Thanks, I'm reading through the documentation linked in the GIT man page, hopefully this will work with my gamepad (non-XBox 360 2.4GHz wireless controller).

                I'll post my results here after I've done my homework.

                P.S.: @Halvhjearne still regarding testing the loadmap driver running standalone, after running some more tests last week, I found out that this driver cannot run concurrently with other applications, sharing access to the controller device. So it looks like loadmap is unsuitable for RetroPie setups, as ES is constantly accessing the controller for navigation purposes. Bummer!

                1 Reply Last reply Reply Quote 0
                • HalvhjearneH
                  Halvhjearne @wmoecke
                  last edited by

                  @wmoecke

                  it can be send to a console aswell, it does not have to be a window.

                  W 1 Reply Last reply Reply Quote 0
                  • W
                    wmoecke @Halvhjearne
                    last edited by

                    @Halvhjearne it needs a window in order to configure the mappings.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post

                    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.