Please do not post a support request without first reading and following the advice in

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

  • 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):
    sudo /home/pi/RetroPie/joymap/loadmap /home/pi/RetroPie/joymap/ &
    /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/ 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.

  • No help?

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

  • 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

  • @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.

  • @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.

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


    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!

  • @wmoecke

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

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

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.