Help getting Brutal Doom campaign hellonearthstarterpack + Duke3d expansions to work
-
Hey i'm back from outer space.
I just can't get this to work mediamogul, this whole time, on and off obviously, since my last post in this thread, i have tried to make this damned thing work.I'd have a crack for a few hours, throw my hands up in frustration and just go 'f**k it' but then a day or two later i come back with a clear head and rinse and repeat.
I have followed your guide to a T, the only thing that's different from my earlier posts is i'm trying to get this to work with a wii u pro controller, connected to the pi via a bluetooth dongle (wii u pro mayflash adaptor).Essentially, all i'm trying to do is make the select(back), home(guide) and start(start) button on the wii u pro controller register as key b, key enter and key esc respectively, when brutaldoom launches (will eventually wan't this to work with duke3d as well via eduke32 but let's focus on this for now).
I have installed xboxdrv, then disabled it.
i have the following in my /opt/retropie/configs/all/runcommand-onstart.sh
if [ "$1" = "zdoom" ] then sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --evdev /dev/input/by-id/usb-HJZ_Controller_1189A89-event-joystick \ --silent \ --detach-kernel-driver \ --deadzone 4000 \ --trigger-as-button \ --four-way-restrictor \ --mimic-xpad \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2,ABS_TL2=lt,ABS_TR2=rt,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --evdev-keymap BTN_EAST=a,BTN_SOUTH=b,BTN_WEST=x,BTN_NORTH=y,BTN_TL=lb,BTN_TR=rb,BTN_THUMBL=tl,BTN_THUMBR=tr,BTN_SELECT=back,BTN_MODE=guide,BTN_START=start \ --ui-buttonmap guide=KEY_B,start=KEY_ENTER,back=KEY_ESC \ -- \ & fi
It simply won't work.
(this is my /opt/retropie/configs/all/runcommand-onend.sh
sudo killall xboxdrv
I don't get any error messages or anything, i just load any version of brutal doom(or any game for that matter) and the buttons i have assigned to keyboard strokes
(specifically guide=KEY_B,start=KEY_ENTER,back=KEY_ESC)
simply don't register.
I've tried using the--evdev /dev/input/event*
setting, where event* is event2, but no difference.
Why is this so diffcult, so god damned obtuse??
Like seriously all jokes aside i'm willing to drop some money into someones paypal account if we can get this sorted.Any mercs for hire?
If i take into account how many hours i've spent on this and charge it out even at minimum wage i've theoretically wasted hundreds of dollars!
-
As I stated early on, the best way to learn something like this is to first experiment and then to come back and ask questions as you run into obstacles. I could have given you several ways to troubleshoot your setup and will do so here if you're still interested. What's going to help the most though, is to take a step back and calm down, as you're obviously worked up over the issue. Troubleshooting any technical problem becomes exponentially more difficult when frustrated. I see it's been seven hours since your post, so hopefully you've already cooled down.
Moving forward, there are two things I'd like you to do. First, Launch 'Brutal Doom' and then once it loads, exit it completely. Afterwards, open
/dev/shm/runcommand.info
and post the contents here. Secondly, let's find out if there's anything wrong with the xboxdrv command itself. It appears to be formatted correctly, but any errors it may contain will surface by entering the isolated command into the command line and executing it. If any errors do present themselves, post them here afterwards. Using the example you gave above, the isolated command will be:sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --evdev /dev/input/by-id/usb-HJZ_Controller_1189A89-event-joystick \ --silent \ --detach-kernel-driver \ --deadzone 4000 \ --trigger-as-button \ --four-way-restrictor \ --mimic-xpad \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2,ABS_TL2=lt,ABS_TR2=rt,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --evdev-keymap BTN_EAST=a,BTN_SOUTH=b,BTN_WEST=x,BTN_NORTH=y,BTN_TL=lb,BTN_TR=rb,BTN_THUMBL=tl,BTN_THUMBR=tr,BTN_SELECT=back,BTN_MODE=guide,BTN_START=start \ --ui-buttonmap guide=KEY_B,start=KEY_ENTER,back=KEY_ESC
-
I don't know if i've mentioned it before but i pretty much do all (possible) editing/modifying on the pi via a networked connection to my pc, and edit any files with notepad++.
I see alot of people throw around terms like 'just fttp into it' or 'use samba share' and then they've lost me.Surely most people would work on their pi's this way and not through command lines right?
It seems as though most guides are geared towards the latter, maybe that's how these linux heads have always done it, but with the pi becoming more mainstream, and the mainstream using their windows pcs to 'get er done', like they've always done, whether it be installing mods for pc games or getting some unwieldy sound blaster driver to work, this is something that should be considered more by people writing these guides perhaps.
Anyways, with that in mind, i'm already lost at the first hurdle, where is this runcommand.info file? I have no 'dev' folder, using the pi via a networked connection i have 4 folders, bios-configs-roms-splashscreens as i'm sure your aware.
So yeah.Point 1 is stalled.
Onto the next point, i did follow your advice and using the command line ran the following
sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \
and it spat out an error
(as a side note this is another reason i don't like using command lines how the hell do i post the results here, besides typing it out??meh)
--error-- Error couldn't claim the usb interface: LIBUSB_ERROR_BUSY Try to run 'rmmod xpad' and then xboxdrv again or start xboxdrv with the option --detach -kernel-driver.
I ran the command
sudo rmmod xpad
and that appears to have done nothing.I have the detach kernel driver setting already in the runcommand-onstart.sh
Any ideas?
p.s. did i also mention all the work i've been doing getting this to work and even posting these replies has been done with a 1.5 yr old climbing all over me saying 'trucks' over and over begging me to watch youtube truck videos for the umpteenth time? -
You can access
/dev/shm/runcommand.info
over SSH/SFTP by first enabling SSH and then using something like Putty (Windows) or CyberDuck (Mac). From there you can view the file with notepad++.The error you got from the command itself would seem to indicate that there's already a driver (xwiimote) in play, preventing xboxdrv from grabbing the controller. there are two ways to solve this. You can either disable xwiimote entirely and use xboxdrv as you're main driver, or you can unload xwiimote on launch in the
runcommand-onstart
script and then reload it on exit with theruncommand-onexit
script. I believe the latter should be possible, although I've never tried it and the prior should just be a matter of uninstalling xwiimote and following the xboxdrv guide like any other controller. -
I don't have xwiimote installed...?
At least i don't think i do.I have never manually installed that from anywhere.
The wii u pro controller connects to the pi via 2 ways.
Onboard bluetooth-which detects the wii u pro controller as itself, but is buggy and has random ghost inputs.
That's why i instead connect it to the pi via a wireless dongle called a mayflash wii u pro adaptor. It connects to the pi via a usb cable, which then connects to the wii u pro controller via a wireless sync.
The adaptor then 'lies' to the pi and tell it that the wii u pro controller is actually a xbox 360 wireless controller.
At no point has this 'xwiimote' ever come into play.That i know of.
-
@megafacehead you might want to seperate the words "adapter." and "It" in your last post. You accidently created a link to some odd website.
-
I don't have xwiimote installed...?
Ah, OK. It was just a guess based on the error. Still, something had already grabbed the controller at the time you ran the command. Try restarting the Pi completely right before you try again. Also, is this the only controller connected to your setup?
-
Alright so some progress has been made-sorta kinda.But not really.
I found one problem with my runcommand-onstart.sh, and in /etc/rc.local that may have caused some problems.
I had
--evdev /dev/input/by-id/usb-HJZ_Controller_1189A89-event-joystick
but the 1189A89 should have been 1187A89.
So that's been fixed.So now, when i type the following in the command console(fixing the name to 1187A89)
sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --evdev /dev/input/by-id/usb-HJZ_Controller_1187A89-event-joystick \ --silent \ --detach-kernel-driver \ --deadzone 4000 \ --trigger-as-button \ --four-way-restrictor \ --mimic-xpad \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2,ABS_TL2=lt,ABS_TR2=rt,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --evdev-keymap BTN_EAST=a,BTN_SOUTH=b,BTN_WEST=x,BTN_NORTH=y,BTN_TL=lb,BTN_TR=rb,BTN_THUMBL=tl,BTN_THUMBR=tr,BTN_SELECT=back,BTN_MODE=guide,BTN_START=start \ --ui-buttonmap guide=KEY_B,start=KEY_ENTER,back=KEY_ESC
(i also see in the command that i ran above that you told me to run it misses the
\ -- \ & fi
(which is present in the original runcommand-onstart.sh right after back=KEY_ESC, is that intentional??)
Anyways, it no longer gives the libusb_error_busy error, it gives a new error.
It says
Your xbox/xbox360 controller should now be available as: /dev/input/js1 /dev/input/event3 Press ctrl-c to quit, use '--silent' to suppress the event output x1: 0 y1: 0 x2: 0 y2: 0 du:0 dd:0 dl:0 dr:0 back:0 guide:0 start:0 tl:0 tr:0 a:0 b:0 x:0 y:0 lb:0 rb:0 lt: 0 rt: 0 [ERROR] spawn_exe(): --silent: exec failed: no such file or directory x1: 0 y1: 0 x2: 0 y2: 0 du:0 dd:0 dl:0 dr:0 back:0 guide:0 start:0 tl:0 tr:0 a:0 b:0 x:0 y:0 lb:0 rb:0 lt: 0 rt: 0 shutdown complete
So yeah, some progress, but i still feel like im miles away :(
p.s. only the dongle for the wii u pro controller and the keyboard are connected to the pi, no other controllers.
-
i also see in the command that i ran above that you told me to run it misses the... is that intentional?
It is. What was left out is only necessary in the runcommand script
i still feel like im miles away
It looks like you're pretty close actually. The virtual xboxdrv controller is being created, which means everything is formatted correctly, but the error it's giving implies that
--silent
is not present. I notice that you said:So now, when i type the following:
Was this statement just a stand-in for copy/paste? If you were typing it out, could
--silent
have been an omission? -
I don't know who is more persistent, me in tyring to get thsi to work or you in trying to help me to get it to work.
If i have already said so thankyou for the hand holding mediamogul, i really hope i don't have to waste much more of your time.
So this is now where we are.
1.Yep, you read that right, it wasn't shorthand.I manually typed all that shit in.Not once, but twice, the first time being the very similiar entry i had to put in /etc/rc.local as per your guide.
Please try to hold back your laughter until this whole process is done, only when my raspberry pi is ashes, then you have my permission to laugh.
(i did this as i figured it would just be easier and less time consuming then to learn how to cut and paste into a raspberry pi terminal from a windows pc without having to learn how to setup sambshare or putty or wateva.I got enough on my plate with this thing.)
So i discovered the reason it spat out the
[ERROR] spawn_exe(): --silent: exec failed: no such file or directory
when i manually typed it that whole command out i put a space between each new after the backslash line eg
--silent \ --detach-kernel-driver \ --deadzone 4000 \
etc
I went back and fixed it, so it read
--silent \--detach-kernel-driver \--deadzone 4000 \
etc
and then i got a new error message.[ERROR] invalid argument: --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2,ABS_TL2=lt,ABS_TR2=rt,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ couldn't convert 'ABS_TL2 to enum, not a member of EV_ABS
I then had a lightbulb moment.
The wii u pro's triggers are digital buttons, not analogue triggers.When you press them in using the 'evtest /dev/input/event*' cmd, they return as BTN_TL2 and BTN_TR2 respectively.I figured the abs prefix must refer to controllers with anologue triggers and for the wii u pro i should use the btn prefix instead and move them to the evdev-keymap line instead.
So i changed the command from
--evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2,ABS_TL2=lt,ABS_TR2=rt,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --evdev-keymap BTN_EAST=a,BTN_SOUTH=b,BTN_WEST=x,BTN_NORTH=y,BTN_TL=lb,BTN_TR=rb,BTN_THUMBL=tl,BTN_THUMBR=tr,BTN_SELECT=back,BTN_MODE=guide,BTN_START=start \
to
--evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --evdev-keymap BTN_EAST=a,BTN_SOUTH=b,BTN_WEST=x,BTN_NORTH=y,BTN_TL=lb,BTN_TR=rb,BTN_THUMBL=tl,BTN_THUMBR=tr,BTN_SELECT=back,BTN_MODE=guide,BTN_START=start BTN_TL2=lt,BTN_TR2=rt\
(i also did the same change in etc/rc.local and also in the runcommand-onstart.sh script)
So now i run the fixed command
sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --evdev /dev/input/by-id/usb-HJZ_Controller_1187A89-event-joystick \ --silent \ --detach-kernel-driver \ --deadzone 4000 \ --trigger-as-button \ --four-way-restrictor \ --mimic-xpad \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --evdev-keymap BTN_EAST=a,BTN_SOUTH=b,BTN_WEST=x,BTN_NORTH=y,BTN_TL=lb,BTN_TR=rb,BTN_THUMBL=tl,BTN_THUMBR=tr,BTN_SELECT=back,BTN_MODE=guide,BTN_START=start,BTN_TL2=lt,BTN_TR2=rt \ --ui-buttonmap guide=KEY_B,start=KEY_ENTER,back=KEY_ESC
in the cmd prompt i get this message.No error.
Your xbxo 360 controller should now be available as: /dev/input/js1 /dev/input/event3 Press ctrl-c to quit
After i hit ctrl c quit, i sudo reboot from the cmd line, and boot back into emulation station.
Now my controls are all messed up.Select is now acting as lt, start is acting as rt, thumbl is acting as start, mode is acting as select....you get the idea.
I'm still able to navigate es so i launch brutaldoom and nope, still no esc button set to start.
The only way to return controls to normal at this point is to f4 into cmd prompt, run sudo killall xboxdrv, then relaunch es.
More worrying is the fact that now when i restart the pi and it boots to es, it now defaults to the weirdo controls.Like above, the only way to (temporarily) fix it is to run that sudo killall xboxdrv.
So, that's the latest.
The way es now defaults to those crap controls is a really unexpected annoyance.I may have to flash the card to a backup image.
edit-
looks like i can get the controls back to normal even afetr a reboot by running sudo killall xbxodrv then running the following command
sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --evdev /dev/input/by-id/usb-HJZ_Controller_1187A89-event-joystick \ --silent \ --detach-kernel-driver \ --deadzone 4000 \ --trigger-as-button \ --four-way-restrictor \ --mimic-xpad \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --evdev-keymap BTN_EAST=a,BTN_SOUTH=b,BTN_WEST=x,BTN_NORTH=y,BTN_TL=lb,BTN_TR=rb,BTN_THUMBL=tl,BTN_THUMBR=tr,BTN_SELECT=back,BTN_MODE=guide,BTN_START=start,BTN_TL2=lt,BTN_TR2=rt \
which is basically the same command as before just without the --ui-buttonmap guide stuff.
So that seems to be where the drama is, something is up with the command line
--ui-buttonmap guide=KEY_B,start=KEY_ENTER,back=KEY_ESC
-
I don't know who is more persistent
It's no problem. I have six extremely different emulation rigs and key-mapping is a big part of each one. Unfortunately, while xboxdrv is far more capable than anything else I'm using on Win, Mac or Android, I do recognize that it's not exactly intuitive. It took a while for me to wrap my head around all this as well.
I manually typed all that
Well, on one hand I'm actually impressed. On the other, I have to warn that this can lead to a lot of unintentional syntax errors. It's worth taking the time to learn to SSH for a number of reasons that will ultimately make things easier on you going forward.
when i restart the pi and it boots to es, it now defaults to the weirdo controls.
Since your command is now working, xboxdrv is doing it's job by mapping your physical controller to a new virtual XBox360 controller. For all uses and purposes, the entire system thinks that you have an XBox360 controller attached. As such, the button arrangement is a little different from your original, which could be why certain buttons are switched. There's actually a way to put this in-line with your physical controller, but the easiest thing to do is just to map the new virtual controller in Emulation Station the same way you originally mapped your physical controller.
So that seems to be where the drama is, something is up with the command line
There doesn't appear to be anything wrong there. However, since you are typing these things out rather than copy/pasting them, there could be a variance anywhere that is not immediately obvious. I think it's going to be necessary for you read through the SSH link above. Without knowing that you're using a verified working command each time, troubleshooting this will be next to impossible.
-
@mediamogul I think it's going to be necessary for you read through the SSH link above. Without knowing that you're using a verified working command each time, troubleshooting this will be next to impossible.
I'm starting to see that.
Ok, your the man, man.So i've setup this ssh business, alot more painless then i thought it would be. So now i can give you accurate summaries of what all the various directories contain.
First off, this is what my rc.local ...thing...(directory?) contains.Copy and paste from top to bottom(note ive changed the ip address stuf, i dont know if thats a secuirty risk if i post that stuff??Ive replaced it all with 'XXXXX'
!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. # Print the IP address XXXXX if [ "$_IP" ]; then printf "My IP address is XXXXX fi "/opt/retropie/supplementary/retropie-manager/rpmanager.sh" --start --user pi 2>&1 > /dev/shm/rpmanager.log & sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --evdev /dev/input/by-id/usb-HJZ_Controller_1187A89-event-joystick \ --silent \ --detach-kernel-driver \ --deadzone 4000 \ --trigger-as-button \ --four-way-restrictor \ --mimic-xpad \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --evdev-keymap BTN_EAST=a,BTN_SOUTH=b,BTN_WEST=x,BTN_NORTH=y,BTN_TL=lb,BTN_TR=rb,BTN_THUMBL=tl,BTN_THUMBR=tr,BTN_SELECT=back,BTN_MODE=guide,BTN_START=start,BTN_START=start,BTN_TL2=lt,BTN_TR2=rt \ & exit 0
Now, what is exactly in my /opt/retropie/configs/all/runcommand-onstart.sh
#!/bin/sh if [ "$1" = "zdoom" ] then sudo killall > /dev/null 2>&1 xboxdrv sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv > /dev/null 2>&1 \ --evdev /dev/input/by-id/usb-HJZ_Controller_1187A89-event-joystick \ --silent \ --detach-kernel-driver \ --deadzone 4000 \ --trigger-as-button \ --four-way-restrictor \ --mimic-xpad \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --evdev-keymap BTN_EAST=a,BTN_SOUTH=b,BTN_WEST=x,BTN_NORTH=y,BTN_TL=lb,BTN_TR=rb,BTN_THUMBL=tl,BTN_THUMBR=tr,BTN_SELECT=back,BTN_MODE=guide,BTN_START=start,BTN_TL2=lt,BTN_TR2=rt \ --ui-buttonmap guide=KEY_B,start=KEY_ENTER,back=KEY_ESC \ & fi
Now, in my /opt/retropie/configs/all/runcommand-onend.sh
sudo killall > /dev/null 2>&1 xboxdrv /opt/retropie/supplementary/xboxdrv/bin/xboxdrv > /dev/null 2>&1 \ --evdev /dev/input/by-id/usb-HJZ_Controller_1187A89-event-joystick \ --silent \ --detach-kernel-driver \ --deadzone 4000 \ --trigger-as-button \ --four-way-restrictor \ --mimic-xpad \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --evdev-keymap BTN_EAST=a,BTN_SOUTH=b,BTN_WEST=x,BTN_NORTH=y,BTN_TL=lb,BTN_TR=rb,BTN_THUMBL=tl,BTN_THUMBR=tr,BTN_SELECT=back,BTN_MODE=guide,BTN_START=start,BTN_TL2=lt,BTN_TR2=rt \ &
You mentioned earlier you wanted me to launch then close brutaldoom and post the contents of /dev/shm/runcommand.info
I did this and typed
/dev/shm/runcommand.info
and got no such file found.
I then ransudo nano /dev/shm/runcommand.info
which took me to to a completely empty file. It says in the title that it is
File: /dev/shm/runcommand.infoNow something i should have asked a long time ago, am i supposed to have xpad disabled/uninstalled?I was udner the assumption that with this setup, xpad is always working, the dominat driver so to speak, but when i launch brutaldoom, the onstart script disables xpad, launches xboxdrv and then xboxdrv dictates what button does what, and then on closing of brutaldoom, xboxdrv shutdown and re-enables xpad?Is this incorrect?
Anyways, now, i reset the controller config through es and on the next boot it detected two controllers(one xpad and the new xboxdrv config i assume), and i pushed a button on the wii u pro and it said 360 controller detected.What was strange though was when i went to assign controls to buttons, the face buttons were showing up as button 6, button 4 etc (dinput?), and on top of that i couldn't assign the trigger buttons, it wouldn't register them.
So that's where we are. I'm sorry i was stubborn before about not setting up ssh, tbh i just cbf, i didn't thing assigning 3 keyboard buttons to a controller would require all this, wew
-
@megafacehead said on top of that i couldn't assign the trigger buttons, it wouldn't register them.
edit-
I just ran /dev/input/event3 and now the triggers show up as ABS_Z and ABS_RZ for lt and rt.Previously they showed as BTN_TL2 and BTN_TR2...weird shit. -
i didn't thing assigning 3 keyboard buttons to a controller would require all this, wew
We're starting from a bit of unsteady ground, but once the foundation is there, these things move a lot more smoothly. All of this will carry over to make your whole experience with the Pi easier in the future as well.
am i supposed to have xpad disabled/uninstalled?
Xpad should only be installed if you're actually using a real XBox360 controller. If you are not, it should be uninstalled. It's possible that it's somehow the cause of your button shifting.
You mentioned earlier you wanted me to launch then close brutaldoom and post the contents of /dev/shm/runcommand.info ... which took me to to a completely empty file.
/dev/shm/runcommand.info
contains a record of the runcommand launch parameters. That information is ultimately be used to launch your xboxdrv command for 'Brutal Doom'. Make sure you followed the instructions on the wiki for adding PWADs to ZDoom as a port and that/dev/shm/runcommand.info
is being populated, otherwise there will be no way for the game-specific mapping to be launched.I just ran /dev/input/event3 and now the triggers show up as ABS_Z and ABS_RZ for lt and rt.Previously they showed as BTN_TL2 and BTN_TR2
This one is difficult to troubleshoot from afar. It could be that Xpad is interfering, but you'll need to know the correct listing for your triggers to map them.
this is what my rc.local ...thing...(directory?) contains.
The
rc.local
is really just a script that runs early at startup. You haveBTN_START=start
mapped twice, but other than that, it looks ok, as do the two runcommand scripts.At face value, it seems as though you really only have two issues. First, you need to discover what the correct button code is for your triggers. I would recommend uninstalling Xpad and temporarily removing the launch command you've added to
rc.local
and runningevtest
again to be completely sure what you're working with. Second, you need to make sure that 'Brutal Doom' is being launched as a port as per the wiki instructions and that as a result,/dev/shm/runcommand.info
is being populated with the required information that will allow xboxdrv to run alongside. -
Ok, i'm going to pull back, start again, and run this K.I.S.S. style.
The triggers are the heart of the problem.I can prove it.
Ok, so im going to do away with runcommand-onstart.sh and runcommand-onend.sh.
I'm going to keep it all in rc.local.How?By using your bright idea about key button combination bindings.
Select as the modifier key, and not over lapping already taken retroarch buttons, leaves me with select+y,select+a to with as i please.I undeerstand this is not an elegant solution, and really only works in a situation like mine where i only need a few keyboard buttons assigned.If i was trying to setup scummvm, this workaround would not be suitable.
At least this way we can rule out alot of variables, aka doom and the runcommand-onstart script.
So, i've uninstalled xpad, cleared out rc.local,reset emulation key bindings, and ran all the event tests again.Checked all the bindings and ran this in rc.local
sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --evdev /dev/input/event2 \ --detach-kernel-driver \ --silent \ --force-feedback \ --deadzone-trigger 15% \ --deadzone 4000 \ --mimic-xpad \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2,ABS_Z=lt,ABS_RZ=rt,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --evdev-keymap BTN_SOUTH=a,BTN_EAST=b,BTN_NORTH=x,BTN_WEST=y,BTN_TL=lb,BTN_TR=rb,BTN_THUMBL=tl,BTN_THUMBR=tr,BTN_MODE=guide,BTN_SELECT=back,BTN_START=start \ --ui-buttonmap back+y=KEY_ESC,back+a=KEY_ENTER \ &
Rebooted, controller detected as 360 controller so far so good....but....doesn't detect the triggers.I have to skip that input.
When i first ran these tests way back when xpad was installed it detected them as BTN_TL2=lt,BTN_TR2=rt. But now with xpad turned off/uninstalled, they detect as ABS_Z=lt,ABS_RZ=rt.
So thats what i put in the rc.local.SO when i launched brutaldoom the good news is that the
--ui-buttonmap back+y=KEY_ESC,back+a=KEY_ENTER \ shortcuts work.The bad news-
im constantly spinning,
the up down on the left analog is SO sensitive and back to front,
start functions as rt(shoots gun),
select functions as lt(zoom),
pressing lt stops me from spinning and the spinning resumes when i let go,
pressing rt appears to do nothing,
moving left right on the right analog stick looks up and down (instead of looking left and right),
up down on the right stick does nothing,
and pressing the guide button appears to act as though im pressing the back/select button.Did we get all that?
What a f**king shemozzle.
-
im constantly spinning,
Sounds like you may need to increase the numerical value of
--deadzone
.the up down on the left analog is SO sensitive and back to front,
The guide has a section on sensitivity calibration.
start functions as rt(shoots gun),
Have you remapped your controls yet in 'Brutal Doom' to accommodate the new virtual controller?
select functions as lt(zoom),
pressing lt stops me from spinning and the spinning resumes when i let go,
pressing rt appears to do nothing,
moving left right on the right analog stick looks up and down (instead of looking left and right),
up down on the right stick does nothing,
and pressing the guide button appears to act as though im pressing the back/select button.These are likely all related to what you've already mentioned.
-
Have you remapped your controls yet in 'Brutal Doom' to accommodate the new virtual controller?
But start/select and a few others buttons dont work now in retroarch (lr) emulated games.
The standard start-select exit game combo does not work.Its not a case of brutaldoom simply neding resetting its the whole shebang.
How on earth does start get lost in weeds like this.I reset es, and when i set the controls i push the start button when prompted, it registers, i move on to other buttons(STILL cant get the trigger buttons to register).
So for me to set start in es, then start works while using es (brings up main menu) but doesnt function as start in emulators?
-
Nup i'm done'
I really appreciate your help medmiamogul, but i've struck a wall.
I'll leave my rc.local file here, maybe someone can get it to tick.
sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --evdev /dev/input/event0 \ --detach-kernel-driver \ --silent \ --force-feedback \ --trigger-as-button \ --deadzone 6000 \ --calibration x1=-32767:1612:32767,y1=-32767:4353:32767,x2=-32767:741:32767,y2=-32767:3500:32767 \ --mimic-xpad \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2,ABS_Z=lt,ABS_RZ=rt,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --evdev-keymap BTN_SOUTH=a,BTN_EAST=b,BTN_NORTH=x,BTN_WEST=y,BTN_TL=lb,BTN_TR=rb,BTN_THUMBL=tl,BTN_THUMBR=tr,BTN_MODE=guide,BTN_SELECT=back,BTN_START=start \ --ui-buttonmap back+y=KEY_ESC,back+a=KEY_ENTER \ & exit 0
I read your guide on setting up analogue sensitivity and ive added it and it seems to have fixed the problem there but the core, unfixable, bastard of an issue is the following.
Without any xbxodrv processes running, the two triggers appear as ABS_Z=lt,ABS_RZ=rt when running evtest event 0
Ok, cool no problem. Thats expected.So then i add that to rc.local along with the other button commands, save it, boot into es and reset config finally reboot.
Check devices and now two show up, event 0 and event 1, yep, thats what it should have.
Event 0, and then event 1, which shows that the rc.local command has worked.I run evtest on the new event 1, and test the controls.Now here is where it gets strange.All buttons register, including both trigger buttons, both register again as (ABS_Z) for lt and (ABS_RZ) for rt .Cool
So now i boot into es, new gamepad found(says it detects 2 gamepads, strange) and i set all the buttons.And even though i just ran event1 and checked that both trigger buttons register they do NOT register in es.Great.....
Boot into brutaldoom and hey, nice, the shortcut buttons work.But thats where the good news stops.
Start and select dont register in emulators.I booted smw, and couldnt exit it.I couldnt hit start+select to quick exit, nor select+ X to get in the retroarch menu.
I really tried, lord how i did try.Again, thankyou for guidance mediamogul, if your a sadomasochist pick yourself up a wii u pro, a mayflash adaptor, and have a crack at it yourself. Ive hit the wall.
-
Nup i'm done'.
Hey, I get it. When I was learning all this myself, there wasn't even a guide to go from and it seemed like failure was outweighing success for quite some time. First and foremost, all this should be fun. Whatever cuts into that should be put aside, even if just temporarily. If you decide to pick it back up in the future just give me a shout and we'll try again.
-
Yeah who da man?
Me.Me da man.
(Theres a TLDR below if you wanna skip the boring)
I got it to work, and i didnt even try really.
So i gave up on getting it to work, i reset rc.local back to standard, completely stock.
Then i booted lr doom(not brutal), and when i moved the control stick on the wii u pro controller forward, he moved forward, but when i let go, he started moving backwards by himself.
Hmmmmmm.I need to set a deadzone.
I remebered that stock xboxdrv has a deadzone setting, so instead of rooting around in rc.local, i simply enabled stock xboxdrv.Rebooted, and a new controller was detected 'userspace driver'.I set all button configs, and booted doom up, and great, deadzone has been applied.
Then checking some more games, i noticed that the rumble fucntion in all my 64 games no loner worked....hmm...then i remembered that xboxdrv doesn't have the --force-feedback modifier set in it, so i went to rc.local, and added the --force-feedback line.
Rebooted, and checked my 64 games, yay rumble function has been restored.
Then i wondered what if i just slipped in the line
--ui-buttonmap guide+y=KEY_ESC,guide+a=KEY_ENTER,guide+b=KEY_B
surely that wouldnt work.I'm pushing my luck here.
It worked.
Perfectly.
I launch brutaldoom, the main menu appears with the skull hovering over New Game and i press the guide/home button + the a button (set as key enter)on my controller and it confirms , then asks me what class, hit the same key combo again, asks what episode, and again, ask diffculty, and again and the game starts.
In game i hit the guide/home button + y (set as esc key) and it brings up the main menu-just like hitting esc on the keyboard would do.
Then i go save game using the dpad(no key modifiers needed for it) hit guide+a to save, then guide + a to choose slot, then guide+b(set as keystroke B) to name the save game 'B' {i realize after highlighting save game you can then press the dpad to bring up a virtual keyboard to name it anything you want but watevs).Un effing believable. No 'cat /proc/bus/input/devices', no 'evtest /dev/input/event*' no assigning all the buttons to be recognized as other buttons, no runcommand-onstart scripts, hell, you dont even need to ssh into with putty or what have you.
TL:DR;
For people using a wii u pro controller, connected to the pi via a mayflash wii u pro controller wireless dongle(cause onboard bluetooth sucks) and if you want to assign escape, enter and keystroke b to the controller(which duke nukem3d, brutaldoom, all zdoom style games like heretic, hexen etc) and have a deadzone set for the analogue sticks, and have rumble enabled for games that need it (eg N64), follow the below steps.
-set the dongle to xinput.
go to retropie setup, manage packages, driver packages and download xboxdrv. Then enable xboxdrv (make sure xpad is enabled also, its enabled by default).Reset the pi.
After it boots into emulation station, hit f4.
type
sudo nano /etc/rc.local
press enter.
You will see the line
"/opt/retropie/supplementary/xboxdrv/bin/xboxdrv" --daemon --detach --dbus disabled --detach-kernel-driver --id 0 --led 2 --deadzone 4000 --silent --trigger-as-button --next-controller --id 1 --led 3 --deadzone 4000 --silent --trigger-as-button
Using the keyboard arrow keys, navigate down to this line and modify it to look like below
"/opt/retropie/supplementary/xboxdrv/bin/xboxdrv" --daemon --detach --dbus disabled --force-feedback --detach-kernel-driver --ui-buttonmap guide+y=KEY_ESC,guide+a=KEY_ENTER,guide+b=KEY_B --id 0 --led 2 --deadzone 4000 --silent --trigger-as-button --next-controller --id 1 --led 3 --deadzone 4000 --silent --trigger-as-button
We've added the lines
--force-feedback
and--ui-buttonmap guide+y=KEY_ESC,guide+a=KEY_ENTER,guide+b=KEY_B
Take note where they have been added.Take note there is a space before the two
--
dashes in front of both commands and a space after.After you have modified the line, either by keyboard or by ssh using something like putty, press 'ctrl+o' to save the file, 'Enter' to confirm and 'ctrl+x' to exit.
That's it.Now in a ports game that requires an escape, enter, and a keystroke button, simply press the guide/home button plus
Y to escape
A to enter
B to press keystroke Bp.s. yes, you can change the hotkey buttons if you wish, it's pretty straight forward just substitute your own preferred buttons in place of mine.I'm unsure if this method will work with other controllers, ps3 controllers, logitech etc etc but i can't see why not, give it a crack.
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.