• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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

Can anyone make even a TINY bit of sense of Xroar?

Scheduled Pinned Locked Moved Help and Support
xroardragonjoysticksconfigs
8 Posts 6 Posters 2.1k 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.
  • J
    JimmyFromTheBay
    last edited by JimmyFromTheBay 26 Jul 2021, 22:07

    tl;dr - I don't suppose anyone has Xroar working with joysticks and could post their commandline or XROAR.CONF?

    Sadly not every Dragon 32 game works in lr-mess, so I've been intermittently wrestling with Xroar for about three years, held back by the fact that the manual might as well be written in fricking Albanian.

    The main problem is joystick control. For some bizarre reason, by default up and down are mapped onto left and right. What I mean is, if you're playing (say) Donkey King and you're on a ladder, Mario will only go up the ladder if you press left once you're on it, and down if you press right.

    (Left and right also work normally as left and right, so they're effectively diagonals. Play Cashman if you want to see how that pans out.)

    The Xroar manual has this to say on the subject:

    4.5 Joysticks

    XRoar supports attached joysticks, or can emulate them using the keyboard or mouse (“virtual joysticks”). There are a few built-in configurations, or new ones can be defined. Here are the built-ins:

    Name Description

    ‘joy0’ First two axes and first two buttons of first physical joystick

    ‘joy1’ First two axes and first two buttons of second physical joystick

    ‘kjoy0’ Keyboard based virtual joystick using cursor keys and Left Alt.

    ‘mjoy0’ Mouse based virtual joystick mapped to screen position

    By default, ‘joy0’ (the first physical joystick) is mapped to the Dragon’s right joystick port, and ‘joy1’ (the second physical joystick) to the left port. Map different named joysticks with -joy-right name and -joy-left name. Right and left joystick mapping can be easily swapped by pressing Ctrl+Shift+J.

    A configured “virtual joystick” can be used by pressing Ctrl+J. The first press substitutes it for the right joystick, the second press with the left joystick and a third press disables it again. The virtual joystick defaults to the keyboard-based ‘kjoy0’ described above, but can be reconfigured with -joy-virtual name.

    A joystick configuration can be created or configured by selecting it by name with -joy name, and then configuring its axes with -joy-axis index=spec and buttons with -joy-button index=spec. In each case, spec has the syntax module:args, with args being a comma-separated list, the format of which is specific to module:

    Module Axis args Button args

    ‘physical’ joystick-index,[-]axis-index joystick-index,button-index

    ‘keyboard’ key-name0,key-name1 key-name

    ‘mouse’ screen-offset0,screen-offset1 button-number

    For physical joysticks a ‘-’ before the axis index inverts the axis. Key names for the keyboard module depend on the underlying toolkit. The default screen offsets for the mouse module are ‘X=2,254’ and ‘Y=1.5,190.5’ which gives reasonable behaviour for some games and utilities.

    which may as well read

    ARGLE GLORGLE PREEP SNOOCH PRIBBLE PRIBBLE NOONG-NONG

    for all the sense it makes to me.

    I have Xroar installed on my PC, where the commandline

    xroar -machine dragon32 -joy-left 0,3:2:0 -joy-right 0,0:1:1
    

    makes the joystick behave properly. But if I paste those lines into EMULATORS.CFG:

    xroar-dragon32 = "/opt/retropie/emulators/xroar/bin/xroar -vo sdl -ccr simple -machine dragon32 -joy-left 0,3:2:0 -joy-right 0,0:1:1 -run %ROM%"
    

    the joysticks stop working altogether.

    If I paste them into XROAR.CONF instead:

    default-machine dragon32
    machine dragon32
    machine-desc Dragon 32
    machine-arch dragon32
    ram 32
    bas bas10
    noextbas
    cart ddos41
    cart-type dragondos
    cart-rom DDOS41.ROM
    tv-type pal
    joy-left 0,3:2:0 
    joy-right 0,0:1:1
    

    the sticks work again, but with the same axis problem. I've tried jiggling the numbers around in every combination I can think of but nothing helps.

    Raspberry Pi 3b and 8GB Raspberry Pi 4, both running Retropie 4.7.1 installed from scratch using Raspberry Pi Imager, with wired keyboard, wireless mouse and double arcade joystick attached.

    C I K 3 Replies Last reply 27 Jul 2021, 17:39 Reply Quote 0
    • C
      chipsnblip @JimmyFromTheBay
      last edited by 27 Jul 2021, 17:39

      @jimmyfromthebay i haven't updated my retropie setup for years and have never used that emulator so i'm not sure this will be of much help, but at a glance it looks like maybe the commas/colons in the argument could be tripping some kind of error.

      do you notice anything in the log files after you launch the emulator?

      maybe adding single quotes around a portion of the arguments might work for eg.

      xroar-dragon32 = "/opt/retropie/emulators/xroar/bin/xroar -vo sdl -ccr simple -machine 'dragon32 -joy-left 0,3:2:0 -joy-right 0,0:1:1' -run %ROM%"
      

      regarding the config, have you tried inverted values such as: joy-left -1,1:2:0

      T 1 Reply Last reply 27 Jul 2021, 19:27 Reply Quote 0
      • T
        Thorr69 @chipsnblip
        last edited by 27 Jul 2021, 19:27

        @chipsnblip Your single quote is splitting an argument from its value. (-machine is the argument, dragon32 is value) so don't do that. The whole command is also in double quotes already, so it's unlikely that any single quotes would be needed.

        RPi 3b
        Official PSU
        Official RetroPie image
        Pandora's Box 5 controller

        1 Reply Last reply Reply Quote 0
        • I
          IanDaemon @JimmyFromTheBay
          last edited by 27 Jul 2021, 19:56

          @jimmyfromthebay said in Can anyone make even a TINY bit of sense of Xroar?:

          I have Xroar installed on my PC, where the commandline

          xroar -machine dragon32 -joy-left 0,3:2:0 -joy-right 0,0:1:1
          

          makes the joystick behave properly. But if I paste those lines into EMULATORS.CFG:

          xroar-dragon32 = "/opt/retropie/emulators/xroar/bin/xroar -vo sdl -ccr simple -machine dragon32 -joy-left 0,3:2:0 -joy-right 0,0:1:1 -run %ROM%"
          

          the joysticks stop working altogether.

          Yes, you're confusing the software it seems. "-machine" is a parameter that you're passing to XROAR with a value of "dragon32 -joy-left 0,3:2:0 -joy-right 0,0:1:1". XROAR expects that syntax and it knows what to do with it.

          In the EMULATORS.CFG file... it looks like you're trying to create a system or a variable named "xroar-dragon32". And either (1) making that variable equal to a command that XROAR doesn't recognize OR (2) making a system which launches XROAR with parameters it doesn't know what to do with.

          My question would be if the "short version" works, why are you making a "long version"? What pointed you in that direction? Why are you putting joystick info in the emulators file? (shrug) Just curious.

          • 5 Favorite Arcade Games in MAME
          • Cocktail Cabinet Games
          • Check out the MAME RoW
          J 1 Reply Last reply 27 Jul 2021, 23:25 Reply Quote 0
          • J
            JimmyFromTheBay @IanDaemon
            last edited by JimmyFromTheBay 27 Jul 2021, 23:25

            @iandaemon It works on the PC version. It doesn't work on the Retropie version. I have no idea why. Clearly if it worked on Retropie I wouldn't be fiddling with it in the first place.

            Raspberry Pi 3b and 8GB Raspberry Pi 4, both running Retropie 4.7.1 installed from scratch using Raspberry Pi Imager, with wired keyboard, wireless mouse and double arcade joystick attached.

            I J 2 Replies Last reply 28 Jul 2021, 13:04 Reply Quote 0
            • I
              IanDaemon @JimmyFromTheBay
              last edited by IanDaemon 28 Jul 2021, 13:04

              @jimmyfromthebay So putting xroar-dragon32 = "/opt/retropie/emulators/xroar/bin/xroar -vo sdl -ccr simple -machine dragon32 -joy-left 0,3:2:0 -joy-right 0,0:1:1 -run %ROM%"in the EMULATORS.CFG file works on the PC version of RetroPie/EmulationStation?

              • 5 Favorite Arcade Games in MAME
              • Cocktail Cabinet Games
              • Check out the MAME RoW
              1 Reply Last reply Reply Quote 0
              • K
                KrinaSam @JimmyFromTheBay
                last edited by KrinaSam 11 Jun 2021, 18:48 6 Nov 2021, 18:46

                @jimmyfromthebay

                -joy joy0
                -joy-axis 0=physical:0,1
                -joy-axis 1=physical:1,0

                -joy joy1
                -joy-axis 0=physical:0,1
                -joy-axis 1=physical:1,1

                😉

                1 Reply Last reply Reply Quote 0
                • J
                  jamrom2 @JimmyFromTheBay
                  last edited by 8 Nov 2021, 00:38

                  @jimmyfromthebay

                  Slide over to the thread titled :

                  https://retropie.org.uk/forum/topic/29682/development-of-module-script-generator-for-lr-mess-and-mame-standalone/857?_=1636331293305

                  Folly has been working the hell out of the Libretro MESS/MAME core addition to Retropie and just recently dteam and I have been helping him test and tweak the Tandy Coco 1/2/3 setup to be a one-click game play. Setting up the controls hasn't been covered just yet, but we're getting there.

                  Read the last few posts and see if it interests you. Our goal has been to get MESS involved more as a goto for all the other computer and hand-held games. So they can be used in Retropie...again... one click to it goes right to the program and auto-loads without any user input (or as little as possible)

                  This is the Tandy Coco3 running in lr-mess with a backgorund I reworked from another artist adding in the proper Tandy screen and other stuff. You can see it's working good. Just haven't gotten the retropad control to work just yet as I haven't been focused on that aspect.

                  1635944338360-coco3.jpg

                  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.

                    This community forum collects and processes your personal information.
                    consent.not_received