Maldita Castilla joypad support
-
Hey, I'm also trying to get Maldita Castilla to work, but with no luck, I'm afraid :(
I'm using Adafruit's GPIO-to-USB utility but it the game doesn't recognize the inputs...If you figure it out, let's us know. And viceversa ;)
-
If loadmap works anything like the keymapping in xboxdrv, you might need to make a udev rule that will authenticate the input as coming from an actual keyboard for some of the more stubborn software that would otherwise ignore it. If you want to use the xboxdrv example for a reference, It's brought up in the third section here.
-
@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
-
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.
-
@mediamogul Yeah, so the udev rule is there, as expected and Maldita Castilla still ignores the inputs :(
-
That's a disappointment. You might try using alternative mapping software.
-
@mediamogul Can you suggest any? ;)
-
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.
-
@mediamogul Hey thanks! I'll take a look at xboxdrv then :)
I thought it was only for xbox controllers... -
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'.
-
@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. -
@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_
andBTN_
event codes mentioned in the guide. -
@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_
andBTN_
but I don't see any of that :PHow 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... :)
-
This is purely hypothetical, but you might be able to map the virtual XBox 360 event by changing all the
ABS_
andBTN_
references toKEY_
, 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.
-
can you use an 8bitdo snes30 controller and start it in keyboard mode?
-
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.
-
@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.
-
@pjft Not on my part, I haven't been successful :(
-
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 ```
-
@ExarKunIv
Does your joystick/gamepad use this IR input?If not try plugging in your joystick/gamepad into USB port 1 on your RPi
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.