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

    Maldita Castilla joypad support

    Scheduled Pinned Locked Moved Help and Support
    maldita castill
    49 Posts 8 Posters 15.7k 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.
    • hiulitH
      hiulit @mediamogul
      last edited by

      @mediamogul Adafruit's Retrogame https://github.com/adafruit/Adafruit-Retrogame already does that, I think.

      Is this what you mean? https://github.com/adafruit/Adafruit-Retrogame#retropie-20-compatibility

      My little contributions to the RetroPie project:

      • Shell-Script-Boilerplate
      • Fun-Facts-Splashscreens
      • Limit-Last-Played-Games
      mediamogulM 1 Reply Last reply Reply Quote 0
      • mediamogulM
        mediamogul Global Moderator @hiulit
        last edited by

        @hiulit

        That's it. You say that you believe it was handled by default. If you're still having trouble, you may want to double check to be sure.

        RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

        hiulitH 1 Reply Last reply Reply Quote 0
        • hiulitH
          hiulit @mediamogul
          last edited by

          @mediamogul Yeah, so the udev rule is there, as expected and Maldita Castilla still ignores the inputs :(

          My little contributions to the RetroPie project:

          • Shell-Script-Boilerplate
          • Fun-Facts-Splashscreens
          • Limit-Last-Played-Games
          mediamogulM 1 Reply Last reply Reply Quote 0
          • mediamogulM
            mediamogul Global Moderator @hiulit
            last edited by

            @hiulit

            That's a disappointment. You might try using alternative mapping software.

            RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

            hiulitH 1 Reply Last reply Reply Quote 0
            • hiulitH
              hiulit @mediamogul
              last edited by

              @mediamogul Can you suggest any? ;)

              My little contributions to the RetroPie project:

              • Shell-Script-Boilerplate
              • Fun-Facts-Splashscreens
              • Limit-Last-Played-Games
              mediamogulM 1 Reply Last reply Reply Quote 0
              • mediamogulM
                mediamogul Global Moderator @hiulit
                last edited by mediamogul

                @hiulit

                Sure. The ones I'm aware of are 'Joymap', 'Linux Joystick Mapper' and 'xboxdrv'.

                I've put together a guide for 'xboxdrv' here if you choose to use it.

                RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                hiulitH 1 Reply Last reply Reply Quote 1
                • hiulitH
                  hiulit @mediamogul
                  last edited by

                  @mediamogul Hey thanks! I'll take a look at xboxdrv then :)
                  I thought it was only for xbox controllers...

                  My little contributions to the RetroPie project:

                  • Shell-Script-Boilerplate
                  • Fun-Facts-Splashscreens
                  • Limit-Last-Played-Games
                  mediamogulM 1 Reply Last reply Reply Quote 0
                  • mediamogulM
                    mediamogul Global Moderator @hiulit
                    last edited by

                    @hiulit

                    With a name like 'xboxdrv', who could blame you. At one time it probably only handled XBox 360 controllers. XBMC (XBox Media Center) was faced with the same identity crisis once it started supporting multiple systems. It only took them twelve years to re-brand as 'Kodi'.

                    RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                    hiulitH 1 Reply Last reply Reply Quote 1
                    • hiulitH
                      hiulit @mediamogul
                      last edited by hiulit

                      @mediamogul Hey! So I started following your tutorial and I got stuck just at the beginning xD

                      I run:

                      cat /proc/bus/input/devices
                      

                      and I got this:

                      I: Bus=0003 Vendor=04f3 Product=0103 Version=0111
                      N: Name="HID 04f3:0103"
                      P: Phys=usb-20980000.usb-1.3/input0
                      S: Sysfs=/devices/platform/soc/20980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:04F3:0103.0001/input/input0
                      U: Uniq=
                      H: Handlers=sysrq kbd leds event0 
                      B: PROP=0
                      B: EV=120013
                      B: KEY=10000 7 ff800000 7ff febeffdf f3cfffff ffffffff fffffffe
                      B: MSC=10
                      B: LED=7
                      
                      I: Bus=0003 Vendor=04f3 Product=0103 Version=0111
                      N: Name="HID 04f3:0103"
                      P: Phys=usb-20980000.usb-1.3/input1
                      S: Sysfs=/devices/platform/soc/20980000.usb/usb1/1-1/1-1.3/1-1.3:1.1/0003:04F3:0103.0002/input/input1
                      U: Uniq=
                      H: Handlers=kbd event1 
                      B: PROP=0
                      B: EV=1f
                      B: KEY=3007f 0 0 0 0 483ffff 17aff32d bf544446 0 0 1 130c13 b17c000 267bfa d941dfed 9e1680 4400 0 10000002
                      B: REL=40
                      B: ABS=1 0
                      B: MSC=10
                      
                      I: Bus=0003 Vendor=0001 Product=0001 Version=0001
                      N: Name="retrogame"
                      P: Phys=
                      S: Sysfs=/devices/virtual/input/input2
                      U: Uniq=
                      H: Handlers=kbd event2 
                      B: PROP=0
                      B: EV=3
                      B: KEY=1680 0 12040 50280002
                      

                      and then:

                      ls /dev/input/by-id/
                      

                      Shows me this:

                      usb-04f3_0103-event-if01  usb-04f3_0103-event-kbd
                      

                      I'm using Adafruit's Retrogame right now. That's the only "joystick" I'm seeing here, right?
                      Is that a problem? Or should I delete it?
                      Btw, I'm using arcade controlls via GPIO, if that's of any help.

                      My little contributions to the RetroPie project:

                      • Shell-Script-Boilerplate
                      • Fun-Facts-Splashscreens
                      • Limit-Last-Played-Games
                      mediamogulM 1 Reply Last reply Reply Quote 0
                      • mediamogulM
                        mediamogul Global Moderator @hiulit
                        last edited by mediamogul

                        @hiulit said in Maldita Castilla joypad support:

                        That's the only "joystick" I'm seeing here, right? Is that a problem? Or should I delete it?

                        It's registering as a keyboard event, but it should be capable of being mapped in the same way. While I have never personally attempted to, it should just be a matter of mapping the keyboard event codes to the virtual XBox controller rather than the ABS_ and BTN_ event codes mentioned in the guide.

                        RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                        hiulitH 1 Reply Last reply Reply Quote 0
                        • hiulitH
                          hiulit @mediamogul
                          last edited by

                          @mediamogul Ok, so when I run:

                          evtest /dev/input/event2
                          

                          I get this:

                          Input driver version is 1.0.1
                          Input device ID: bus 0x3 vendor 0x1 product 0x1 version 0x1
                          Input device name: "retrogame"
                          Supported events:
                            Event type 0 (EV_SYN)
                            Event type 1 (EV_KEY)
                              Event code 1 (KEY_ESC)
                              Event code 19 (KEY_R)
                              Event code 21 (KEY_Y)
                              Event code 28 (KEY_ENTER)
                              Event code 30 (KEY_A)
                              Event code 38 (KEY_L)
                              Event code 45 (KEY_X)
                              Event code 48 (KEY_B)
                              Event code 103 (KEY_UP)
                              Event code 105 (KEY_LEFT)
                              Event code 106 (KEY_RIGHT)
                              Event code 108 (KEY_DOWN)
                          Properties:
                          Testing ... (interrupt to exit)
                          

                          And when I hit a button, I get this:

                          Event: time 1475954839.991566, type 1 (EV_KEY), code 19 (KEY_R), value 1
                          Event: time 1475954839.991566, -------------- EV_SYN ------------
                          Event: time 1475954840.139875, type 1 (EV_KEY), code 19 (KEY_R), value 0
                          Event: time 1475954840.139875, -------------- EV_SYN ------------
                          

                          What should I do with this information? Because in your tutorial you mention ABS_ and BTN_ but I don't see any of that :P

                          How can I use these lines with the output I have?

                           --evdev-absmap ABS_*=x1,ABS_*=y1,ABS_*=x2,ABS_*=y2,ABS_*=lt,ABS_*=rt,ABS_*=dpad_x,ABS_*=dpad_y \
                              --evdev-keymap BTN_*=a,BTN_*=b,BTN_*=x,BTN_*=y,BTN_*=lb,BTN_*=rb,BTN_*=tl,BTN_*=tr,BTN_*=guide,BTN_*=back,BTN_*=start \
                          

                          Thanks again! And sorry to bother you... :)

                          My little contributions to the RetroPie project:

                          • Shell-Script-Boilerplate
                          • Fun-Facts-Splashscreens
                          • Limit-Last-Played-Games
                          mediamogulM pjftP 2 Replies Last reply Reply Quote 0
                          • mediamogulM
                            mediamogul Global Moderator @hiulit
                            last edited by

                            @hiulit

                            This is purely hypothetical, but you might be able to map the virtual XBox 360 event by changing all the ABS_ and BTN_ references to KEY_, such as:

                             --evdev-absmap KEY_*=x1,KEY_*=y1 \
                             --evdev-keymap KEY_*=a,KEY_*=b \
                            

                            If that doesn't work then I believe you'll have to try and find mapping software that can specifically map keyboard keys to event types. One of the two other options I listed above may be capable of that, but I can't say for sure.

                            RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                            1 Reply Last reply Reply Quote 0
                            • R
                              retronerd
                              last edited by

                              can you use an 8bitdo snes30 controller and start it in keyboard mode?

                              mediamogulM 1 Reply Last reply Reply Quote 0
                              • mediamogulM
                                mediamogul Global Moderator @retronerd
                                last edited by

                                @retronerd

                                I'm afraid not. Since then I've learned that while this feature is on the drawing board and has even been coded, it currently isn't implemented and there has been no development in over a year.

                                RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                                1 Reply Last reply Reply Quote 0
                                • pjftP
                                  pjft @hiulit
                                  last edited by

                                  @hiulit hi. Did you end up sitting this out? I'm going through the exact same process with xboxdrv on another thread with @mediamogul but seem to have hit a similar roadblock.

                                  Would love to hear your progress and status.

                                  Thanks.

                                  hiulitH 1 Reply Last reply Reply Quote 0
                                  • hiulitH
                                    hiulit @pjft
                                    last edited by

                                    @pjft Not on my part, I haven't been successful :(

                                    My little contributions to the RetroPie project:

                                    • Shell-Script-Boilerplate
                                    • Fun-Facts-Splashscreens
                                    • Limit-Last-Played-Games
                                    1 Reply Last reply Reply Quote 0
                                    • ExarKunIvE
                                      ExarKunIv
                                      last edited by

                                      so here is what i have found out. Maldita Castilla will not play unless it sees the controller input with a input0

                                      i had to remove all my settings and IR input to even get it to work.

                                      I dont know if @mediamogul knows how to get xboxdrv to set the keyboard map to input0

                                      for me my IR input takes that spot. so this game will not work for me.

                                      maybe there is a way to reserve that placement for different input. that is beyond me

                                      as you see my HID it taking the input0 and this is what Maldita Castilla looks for its input. so we need to reserve this input from being taken and set it for a keyboard map.

                                      I know this is not a answer but more info never hurts.

                                      I: Bus=0003 Vendor=1d57 Product=ad02 Version=0110
                                      N: Name="HID 1d57:ad02"
                                      P: Phys=usb-3f980000.usb-1.4/input0
                                      S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/0003:1D57:AD02.0001/input/input0
                                      U: Uniq=
                                      H: Handlers=sysrq kbd leds event0
                                      B: PROP=0
                                      B: EV=12001f
                                      B: KEY=3007f 0 0 0 0 483ffff 17aff32d bf544446 0 0 1 130c13 b17c007 ffa67bfa d941dfff febeffdf f3cfffff ffffffff fffffffe
                                      B: REL=40
                                      B: ABS=1 0
                                      B: MSC=10
                                      B: LED=7
                                      
                                      ```

                                      RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
                                      RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
                                      Maintainer of RetroPie-Extra .

                                      B 1 Reply Last reply Reply Quote 1
                                      • B
                                        backstander @ExarKunIv
                                        last edited by

                                        @ExarKunIv
                                        Does your joystick/gamepad use this IR input?

                                        If not try plugging in your joystick/gamepad into USB port 1 on your RPi
                                        Image

                                        ExarKunIvE 1 Reply Last reply Reply Quote 0
                                        • pjftP
                                          pjft
                                          last edited by

                                          Oh, wow. This is definitely a great find.

                                          I am unsure of how exactly we'll be able to systematically fix this, but knowing about this can already help narrowing down approaches to make it work.

                                          If you start your OS with just a keyboard plugged in, and then plug in your controller, and then unplug the keyboard, will input0 be free? If you run xboxdrv from SSH, will it create a virtual pad on input0?

                                          1 Reply Last reply Reply Quote 0
                                          • ExarKunIvE
                                            ExarKunIv @backstander
                                            last edited by ExarKunIv

                                            @backstander

                                            i have a 8bitdo. so sadly this will not work for me
                                            and i use the IR for KODI and it is connect to USB 3

                                            RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
                                            RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
                                            Maintainer of RetroPie-Extra .

                                            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.