• 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

Help getting Brutal Doom campaign hellonearthstarterpack + Duke3d expansions to work

Scheduled Pinned Locked Moved Help and Support
doom portduke3ddoombrutal doom
57 Posts 4 Posters 16.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.
  • M
    mediamogul Global Moderator @edmaul69
    last edited by mediamogul 21 Apr 2017, 18:56

    @edmaul69

    I don't think there's a default way to map the menu controls to the joystick. I do it through xboxdrv, using the right trigger as a modifier key. When pressed, the DPad becomes the up,down,left and right keyboard keys and buttons 'A' and 'B' become the enter and escape keys, allowing me to move forwards and backwards in the menu, as well as select options. I also have it set to bring up the menu with 'selct+x' and exit with 'select+start' to mirror RetroArch.

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

    1 Reply Last reply Reply Quote 0
    • M
      megafacehead
      last edited by megafacehead 23 Apr 2017, 05:03

      Warning long post, but i'm trying to 'pay it forward' by providing working examples of .sh files.

      @backstander said

      Also just to help clarify: The .sh "launch script" and the emulators.cfg file are 2 different ways to accomplish the same thing so you don't need to do both. >

      Ah THANKYOU for this lil nugget of info. It really all started to make sense after this.

      I've been a whizz(not like it's hard tho) at setting up gamelist.xml files for all other systems and adding video/marquee/image tags and so forth and everything makes sense but the ports setup is completely different.

      I've gone with the .sh way of launching the port games, it just seemed more straight forward and just worked.

      So we can tie this up with a neat little bow and others who might have the same problem can check in the future i'll provide my setup below.

      doom.wad doom2.wad Plutonia.wad Tnt.wad in roms\ports\doom folder

      brutalv20b.pk3 Extra Textures.wad hellonearthstarterpack.wad in roms\ports\brutal folder

      separate zdoom.ini for brutal doom located in configs\ports\brutaldoom folder

      hexen.wad hexdd.wad heretic.wad each in their own seperate folder named the same as wad in roms\ports\ (eg hexdd.wad in roms\ports\hexdd)

      games that launch with lr-prboom
      doom 1 (doom.sh)

      #!/bin/bash
      /opt/retropie/supplementary/runcommand/runcommand.sh 0 "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-prboom/prboom_libretro.so --config /opt/retropie/configs/ports/doom/retroarch.cfg /home/pi/RetroPie/roms/ports/doom/doom.wad" "lr-prboom"
      

      doom 2 (doom2.sh)

      #!/bin/bash
      /opt/retropie/supplementary/runcommand/runcommand.sh 0 "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-prboom/prboom_libretro.so --config /opt/retropie/configs/ports/doom/retroarch.cfg /home/pi/RetroPie/roms/ports/doom/doom2.wad" "lr-prboom"
      

      doom tnt (Tnt.sh)

      #!/bin/bash
      /opt/retropie/supplementary/runcommand/runcommand.sh 0 "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-prboom/prboom_libretro.so --config /opt/retropie/configs/ports/doom/retroarch.cfg /home/pi/RetroPie/roms/ports/doom/tnt.wad" "lr-prboom"
      

      doom plutonia (Plutonia.sh)

      #!/bin/bash
      /opt/retropie/supplementary/runcommand/runcommand.sh 0 "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-prboom/prboom_libretro.so --config /opt/retropie/configs/ports/doom/retroarch.cfg /home/pi/RetroPie/roms/ports/doom/Plutonia.wad" "lr-prboom"
      

      games that launch with zdoom
      brutal doom (doombrutal.sh)

      #!/bin/bash
      /opt/retropie/ports/zdoom/zdoom +set fullscreen 1 +set freelook 1 -config /opt/retropie/configs/ports/brutaldoom/zdoom.ini -iwad /home/pi/RetroPie/roms/ports/doom/doom.wad -file /home/pi/RetroPie/roms/ports/brutal/brutalv20b.pk3
      
      

      brutal doom 2 (doom2brutal.sh)

      #!/bin/bash
      /opt/retropie/ports/zdoom/zdoom +set fullscreen 1 +set freelook 1 -config /opt/retropie/configs/ports/brutaldoom/zdoom.ini -iwad /home/pi/RetroPie/roms/ports/doom/doom2.wad -file /home/pi/RetroPie/roms/ports/brutal/brutalv20b.pk3
      
      

      brutal doom tnt (Tntbrutal.sh)

      #!/bin/bash
      /opt/retropie/ports/zdoom/zdoom +set fullscreen 1 +set freelook 1 -config /opt/retropie/configs/ports/brutaldoom/zdoom.ini -iwad /home/pi/RetroPie/roms/ports/doom/Tnt.wad -file /home/pi/RetroPie/roms/ports/brutal/brutalv20b.pk3
      

      brutal doom plutonia (Plutoniabrutal.sh)

      #!/bin/bash
      /opt/retropie/ports/zdoom/zdoom +set fullscreen 1 +set freelook 1 -config /opt/retropie/configs/ports/brutaldoom/zdoom.ini -iwad /home/pi/RetroPie/roms/ports/doom/Plutonia.wad -file /home/pi/RetroPie/roms/ports/brutal/brutalv20b.pk3
      

      brutal doom hell on earth (hellonearthbrutal.sh)

      #!/bin/bash
      /opt/retropie/ports/zdoom/zdoom +set fullscreen 1 +set freelook 1 -config /opt/retropie/configs/ports/brutaldoom/zdoom.ini -iwad /home/pi/RetroPie/roms/ports/doom/doom2.wad -file /home/pi/RetroPie/roms/ports/brutal/brutalv20b.pk3 /home/pi/RetroPie/roms/ports/brutal/hellonearthstarterpack.wad /home/pi/RetroPie/roms/ports/brutal/ExtraTextures.wad
      

      hexen (zdoom) (hexenzdoom.sh)

      #!/bin/bash
      /opt/retropie/ports/zdoom/zdoom +set fullscreen 1 +set freelook 1 -iwad /home/pi/RetroPie/roms/ports/hexen/hexen.wad
      

      hexen deathkings (hexddzdoom.sh)

      #!/bin/bash
      /opt/retropie/ports/zdoom/zdoom +set fullscreen 1 +set freelook 1 -iwad /home/pi/RetroPie/roms/ports/hexen/hexen.wad -file /home/pi/RetroPie/roms/ports/hexdd/hexdd.wad
      

      heretic (hereticzdoom.sh)

      #!/bin/bash
      /opt/retropie/ports/zdoom/zdoom +set fullscreen 1 +set freelook 1 -iwad /home/pi/RetroPie/roms/ports/heretic/heretic.wad
      

      Thankyou very much for your help, particularly backstander, mediamogul and edmaul69. Just a few remaining questions-

      1.getting back to my first post, has anyone had any luck playing any of the duke3d expansions?eg duke caribbean life's a beach, duke nuclear winter and duke it out in dc??Again i have all the required files, .grp files for all the expanions for example, but don't know how to make them launch?

      2.Can anyone provide a sample launch script on how to launch the 'h' doom games (heretic, hexen and hexen deathkings) using lr-prboom?As above i can launch them via gzdoom piece a piss but damned if i can create a working lr-prboom .sh file for any of them.
      3.@mediamogul said

      I don't think there's a default way to map the menu controls to the joystick. I do it through xboxdrv, using the right trigger as a modifier key. When pressed, the DPad becomes the up,down,left and right keyboard keys and buttons 'A' and 'B' become the enter and escape keys, allowing me to move forwards and backwards in the menu, as well as select options. I also have it set to bring up the menu with 'selct+x' and exit with 'select+start' to mirror RetroArch.

      How on earth did u do do that?That would be awesome as it's the only downfall of zdoom on the retropie, needed to have a keyboard at the ready simply to launch/exit the game, save or otherwise access and navigate the menu in anyway.Could you perhaps provide a 'for dummies' way of how you managed to create your workaround.

      Thanks again guys.

      E M 2 Replies Last reply 23 Apr 2017, 05:53 Reply Quote 2
      • E
        edmaul69 @megafacehead
        last edited by 23 Apr 2017, 05:53

        @megafacehead even though i post the info showing the wads in different folders per game i actually have them all in one folder myself. (All 45 games) I also do not keep them in ports myself because updating the pi would change the original doom game back to the shareware version. (Not sure if it still does) having them all in one folder makes making the config files easier. I use a .sh file and an emulators config file for every game. This allows to make more than one config for a game. So when i start a game, i can go into the runcommand and change between zdoom config and a brutal zdoom config of each game. Or pr-boom if i wanted.

        1 Reply Last reply Reply Quote 2
        • M
          mediamogul Global Moderator @megafacehead
          last edited by mediamogul 23 Apr 2017, 06:11

          @megafacehead

          Could you perhaps provide a 'for dummies' way of how you managed to create your workaround.

          I've written a step-by-step guide on how to use xboxdrv as a key-mapping solution. Other than going over the necessary steps in detail, there's really no way to simplify it. Don't let it scare you off though. Try it out, ask questions and just like anything else, before long you'll find that you've got a handle on it.

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

          1 Reply Last reply Reply Quote 1
          • M
            megafacehead @mediamogul
            last edited by megafacehead 27 Apr 2017, 11:34

            @mediamogul said
            I've written a step-by-step guide on how to use xboxdrv as a key-mapping solution.

            Oh neato!This should be a cakewalk, a nice guide and everything, i'll just click that link and...

            alt text

            Oh my god lol.

            The more i read on this forum the more i'm convinced it's either populated by mensa members OR i'm that stupid i must be missing a chromosome.

            I'm sorry mediamogul it looks like you've put a lot of work into that but it's super intimidating.Your setup sounds awesome though, this one specifically-

            @mediamogul said in I do it through xboxdrv, using the right trigger as a modifier key. When pressed, the DPad becomes the up,down,left and right keyboard keys and buttons 'A' and 'B' become the enter and escape keys, allowing me to move forwards and backwards in the menu, as well as select options. I also have it set to bring up the menu with 'selct+x' and exit with 'select+start' to mirror RetroArch.

            That one specifically.From what i can tell, brutaldoom/gzdoom really only needs two extra buttons to become fully manageable with a controller.You need to bind a button to ESC to access the menu, and go back a step after going further into a sub menu, and another button to act as ENTER, to confirm menu options.After initial setup you really shouldn't need any dpad buttons to affect any slider controls.You also need a single keystroke letter assigned to a button to name any manually saved games, but again, i can live without that, the autosaves beofre the start of each map should suffice.

            To this end, i have tried my best to follow your guide and have come up with this.I downloaded xboxbdrv through the setup menu, and enabled it.

            I did read step 1 of your guide but i am actually using a real 360 controller for this whole thing, so i assumed it didnt apply??It seemed it was only a necessary step in case you were using a ps3/logitech or some other controller that wasnt specifically a 360 controller.

            And, rather then work through the console, i prefer to create and modify files using notepad++ on my computer thats connected to the retropie on a network.All im trying to do is assign the guide button as esc and the start button as enter when zdoom launches, and then revert back to normal when i quit a zdoom game.

            So anyways i created the file runcommand-onstart.sh in configs/all folder which consists of

            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/* \
            	--silent \
            	--detach-kernel-driver \
            	--deadzone 4000 \
            	--mimic-xpad \
            	--ui-buttonmap guide=KEY_ESC,start=KEY_ENTER \
            &
            fi
            

            then through the console on the retropie ran the command
            chmod +x /opt/retropie/configs/all/runcommand-onstart.sh

            after that,

            i also created the file runcommand-onend.sh in the same folder (configs/all) which consist of

            sudo killall > /dev/null 2>&1 xboxdrv
            /opt/retropie/supplementary/xboxdrv/bin/xboxdrv > /dev/null 2>&1 \
            	--evdev /dev/input/by-id/* \
            	--silent \
            	--detach-kernel-driver \
            	--deadzone 4000 \
            	--mimic-xpad \
            	--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 \
            	&
            

            then through the console on the retropie ran the command
            chmod +x /opt/retropie/configs/all/runcommand-onend.sh

            As you can tell i mainly just copied and pasted the examples you had in your guide, deleted some stuff i didn't need changing and modified the buttons i wanted to replace.

            Needless to say it doesn't work, obviously some stupid fault of mine.

            So yeah, im trying to not completely be a helpless baby bird here, i did try but yeah, 'do or do not, there is no try'- and it appears i did not.

            M 1 Reply Last reply 27 Apr 2017, 14:39 Reply Quote 1
            • M
              mediamogul Global Moderator @megafacehead
              last edited by mediamogul 27 Apr 2017, 14:39

              @megafacehead

              To be fair, Major Toht wasn't the most handsome guy before he opened the Ark. Plus if you watch the movie in reverse, he ends up OK and always has a clever way to hang his coat.

              I'm sorry mediamogul it looks like you've put a lot of work into that but it's super intimidating.

              No need to apologize. It took me a while to wrap my head around it before I could even write the guide. I just kept looking at it and experimenting until it all worked.

              i created the file runcommand-onstart.sh in configs/all folder which consists of:

              I can see a couple of issues here. First of all:

              if [ "$1" = "ZDoom" ]
              

              should be:

              if [ "$1" = "zdoom" ]
              

              Also, the examples given in the guide that refer to * should be replaced the controller information obtained from evtest in the first step. so, looking at your command:

              	--evdev /dev/input/by-id/* \
              

              Should contain your own specific id. Other than that, everything looks to be OK.

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

              1 Reply Last reply Reply Quote 0
              • M
                megafacehead
                last edited by megafacehead 13 May 2017, 07:48

                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!

                M 1 Reply Last reply 13 May 2017, 15:06 Reply Quote 0
                • M
                  mediamogul Global Moderator @megafacehead
                  last edited by mediamogul 13 May 2017, 15:06

                  @megafacehead

                  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
                  

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

                  1 Reply Last reply Reply Quote 0
                  • M
                    megafacehead
                    last edited by megafacehead 14 May 2017, 00:11

                    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?

                    M 1 Reply Last reply 14 May 2017, 04:05 Reply Quote 0
                    • M
                      mediamogul Global Moderator @megafacehead
                      last edited by mediamogul 14 May 2017, 04:05

                      @megafacehead

                      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 the runcommand-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.

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

                      M 1 Reply Last reply 14 May 2017, 06:06 Reply Quote 0
                      • M
                        megafacehead @mediamogul
                        last edited by megafacehead 14 May 2017, 06:06

                        @mediamogul

                        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.

                        E M 2 Replies Last reply 14 May 2017, 06:41 Reply Quote 0
                        • E
                          edmaul69 @megafacehead
                          last edited by 14 May 2017, 06:41

                          @megafacehead you might want to seperate the words "adapter." and "It" in your last post. You accidently created a link to some odd website.

                          1 Reply Last reply Reply Quote 0
                          • M
                            mediamogul Global Moderator @megafacehead
                            last edited by 14 May 2017, 13:53

                            @megafacehead

                            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?

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

                            1 Reply Last reply Reply Quote 0
                            • M
                              megafacehead
                              last edited by megafacehead 15 May 2017, 09:35

                              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.

                              M 1 Reply Last reply 15 May 2017, 14:07 Reply Quote 0
                              • M
                                mediamogul Global Moderator @megafacehead
                                last edited by 15 May 2017, 14:07

                                @megafacehead

                                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?

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

                                1 Reply Last reply Reply Quote 0
                                • M
                                  megafacehead
                                  last edited by megafacehead 16 May 2017, 08:15

                                  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
                                  
                                  M 1 Reply Last reply 16 May 2017, 14:57 Reply Quote 0
                                  • M
                                    mediamogul Global Moderator @megafacehead
                                    last edited by mediamogul 16 May 2017, 14:57

                                    @megafacehead

                                    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.

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

                                    M 1 Reply Last reply 17 May 2017, 07:37 Reply Quote 0
                                    • M
                                      megafacehead @mediamogul
                                      last edited by megafacehead 17 May 2017, 07:37

                                      @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 ran

                                      sudo 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.info

                                      Now 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

                                      M 1 Reply Last reply 17 May 2017, 09:48 Reply Quote 0
                                      • M
                                        megafacehead @megafacehead
                                        last edited by 17 May 2017, 09:48

                                        @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.

                                        M 1 Reply Last reply 17 May 2017, 13:26 Reply Quote 0
                                        • M
                                          mediamogul Global Moderator @megafacehead
                                          last edited by mediamogul 17 May 2017, 13:26

                                          @megafacehead

                                          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 have BTN_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 running evtest 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.

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

                                          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