Help getting Brutal Doom campaign hellonearthstarterpack + Duke3d expansions to work
-
@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.
-
Very nice! I'm glad to see you continued with this. The more frustrating something is, the bigger the thrill when you get it working. Give those demons hell.
-
@mediamogul said in Help getting Brutal Doom campaign hellonearthstarterpack + Duke3d expansions to work:
Give those demons hell on earth.
Fixed that for ya
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.