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

    Zdoom and Gampad Fully Working in MENU with NO KEYBOARD

    Scheduled Pinned Locked Moved Help and Support
    gamepadzdoomdoom
    49 Posts 20 Posters 10.3k 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.
    • B
      bassybeats
      last edited by

      Did anyone end up looking back into this for lzdoom? Finally got lzdoom and brutal doom going and realised this won't work with it.

      P O 2 Replies Last reply Reply Quote 1
      • P
        Protocultor @bassybeats
        last edited by Protocultor

        @bassybeats I did. The changes in ZDoom worked with LZDoom with some slight fixes:
        https://github.com/protocultor/gzdoom/commit/8ba7e49184c2be58c0ad03a7602dcd2c4b0ff6fd

        Binaries for Rpi3B+:
        https://github.com/protocultor/gzdoom/releases/latest

        The unfortunate issue is that there's no actual repository for the RPi "version" of LZDoom, since the source to compile comes from a tag; there's not even a branch to work with. So I had to fork the repo and create a branch from that tag to be able to apply the changes.

        If you have to compile it, follow these steps:

        cd ~
        mkdir lzdoom_joy
        cd lzdoom_joy
        # Clone LZDoom from my repo and branch
        git clone https://github.com/protocultor/gzdoom.git --branch joypad_menu --depth 1
        cd gzdoom
        c="$(lscpu -p | grep -v '#' | sort -u -t , -k 2,4 | wc -l)" ; [ "$c" -eq 0 ] && c=1
        # In the following, remove "-DUSE_ARMV8=On" if you're not using a Rpi3 or later model
        cmake -DCMAKE_BUILD_TYPE=Release -DNO_GTK=On -DUSE_ARMV8=On .
        # The following will take A LOT of time
        make -j$c
        # After a long wait... its backup time
        cd /opt/retropie/ports/lzdoom
        sudo mv brightmaps.pk3 brightmaps.pk3.BAK
        sudo mv game_support.pk3 game_support.pk3.BAK
        sudo mv lights.pk3 lights.pk3.BAK
        sudo mv lzdoom.pk3 lzdoom.pk3.BAK
        sudo mv lzdoom lzdoom.BAK
        sudo mv soundfonts/lzdoom.sf2 soundfonts/lzdoom.sf2.BAK
        # ...and finally, replace the installed lzdoom with what you compiled
        sudo cp ~/lzdoom_joy/gzdoom/*.pk3 /opt/retropie/ports/lzdoom/
        sudo cp ~/lzdoom_joy/gzdoom/lzdoom /opt/retropie/ports/lzdoom/
        sudo cp ~/lzdoom_joy/gzdoom/soundfonts/lzdoom.sf2 /opt/retropie/ports/lzdoom/soundfonts/
        

        You still have to do a first-time configuration with the keyboard, at least to increase the deadzone with some gamepads.

        Note that, if you don't have sound, you must create the file .alsoftrc in your home (~) with the following content:

        [alsa]
        mmap = false
        

        (Thanks to @RussellB for the solution to this: https://retropie.org.uk/forum/post/234245)

        EDIT: updated instructions for the recreated branch, which is now based on 3.86a.

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

          @Protocultor do we need to have the other version installed to do this? or should be be uninstalled.

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

          P 1 Reply Last reply Reply Quote 0
          • P
            Protocultor @ExarKunIv
            last edited by

            @ExarKunIv Welp, you end up replacing it, but installing LZDoom from RetroPie-Setup copies scripts to be able to run it through EmulationStation. So, if you're familiar with those you could create one by hand and avoid installing. Otherwise, just do it and replace LZDoom afterwards.

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

              @Protocultor cool i think that i might be able to handle

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

              1 Reply Last reply Reply Quote 1
              • P
                Protocultor
                last edited by

                I kinda got tired of this being an issue for years in every *nix platform, so I sent a pull request to GZDoom itself:
                https://github.com/coelckers/gzdoom/pull/1072
                Let's see if we can see it solved in LZDoom afterwards.

                ExarKunIvE 1 Reply Last reply Reply Quote 2
                • ExarKunIvE
                  ExarKunIv @Protocultor
                  last edited by

                  @Protocultor your instructions worked great. your a life saver
                  now i dont need to make a mapping with xboxdrv just to get the menu up.

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

                  1 Reply Last reply Reply Quote 1
                  • J
                    joesayegh
                    last edited by

                    Just installed lzdoom on Retropie using the new 4.6 beta.
                    I've got Doom up and running.
                    It works great with an Xbox 360 controller - apart from having to use a keyboard to start a new game.
                    Once in game I remapped all the controls based on the PS1 version of the game.
                    i.e. Strafe left/right is left shoulder/right shoulder
                    Weapon previous/next is left trigger/right trigger etc.

                    Here's a snippet from the [Doom.Bindings] section of my lzdoom.ini file

                    Joy1=+strafe
                    Joy2=+use
                    Joy3=+attack
                    Joy4=+use
                    MWheelUp=weapprev
                    MWheelDown=weapnext
                    MWheelRight=invnext
                    MWheelLeft=invprev
                    DPadUp=togglemap
                    DPadDown=invuse
                    DPadLeft=invprev
                    DPadRight=invnext
                    Pad_Start=menu_main
                    Pad_Back=pause
                    LThumb=crouch
                    LShoulder=weapprev
                    RShoulder=weapnext
                    LTrigger=+altattack
                    RTrigger=+attack
                    Pad_A=+use
                    Pad_Y=+jump
                    Joy5=+moveleft
                    Joy6=+moveright
                    Joy7=togglemap
                    Joy8=menu_main
                    Joy12=invprev
                    Joy13=invnext
                    Axis1Plus=+right
                    Axis1Minus=+left
                    Axis2Plus=+back
                    Axis2Minus=+forward
                    Axis3Plus=weapprev
                    Axis6Plus=weapnext
                    Joy11=centerview
                    Axis5Plus=+lookup
                    Axis5Minus=+lookdown
                    

                    The only thing left is to assign "menu_forward" and "menu_backward" to the Xbox 360 controller. Is this something that's already been done and if so, is there a file(s) I need to replace please?

                    Apologies if this has been asked previously.

                    I was just reading the ZDoom Controls section from here and realised it was out of date.

                    1 Reply Last reply Reply Quote 0
                    • Z
                      zerosaber75
                      last edited by zerosaber75

                      @Protocultor Can you please look into updating this fork of LZDoom for RetroPie? It is currently behind on a lot of updates and bug fixes compared to main LZDoom branch (this fork is v3.84 while the main LZDoom version is v3.86a).

                      • https://forum.zdoom.org/viewtopic.php?t=69073#p1156726

                      P 1 Reply Last reply Reply Quote 0
                      • P
                        Protocultor @zerosaber75
                        last edited by

                        @zerosaber75 sorry, but I'm not interested in updates, new features, and the like. My main concern was to make gamepads/joysticks to work with the Rpi and *nix platforms in general, and I've done it. I'm kinda dissappointed that my pull request was completely ignored by the people behind GZDoom, and I've decided not to spend any more time with this.
                        In any case, my fixes are very simple to understand and apply for people interested, if you or anyone else wants to make the latest version of LZDoom work with the RPi. If anyone have any questions about my fixes, I will still gladly answer them.

                        Z RapidEdwin08R 2 Replies Last reply Reply Quote 1
                        • Z
                          zerosaber75 @Protocultor
                          last edited by

                          @Protocultor How can one port the gamepad fixes to the newer versions of LZDoom for themselves?

                          P 1 Reply Last reply Reply Quote 0
                          • P
                            Protocultor @zerosaber75
                            last edited by

                            @zerosaber75 by making these changes :
                            https://github.com/protocultor/gzdoom/commit/8ba7e49184c2be58c0ad03a7602dcd2c4b0ff6fd
                            AFAIK some files may have changed directory, but their names and contents remain the same, so by applying these changes you're good to go.
                            But that's the easy part. The complicated part is what you need to do first, what you were asking me to do: to make the latest (or at least, later) LZDoom compile and run on a RPi, and hoping it will run on a decent speed. Last time I checked, it asked for a sound library that didn't work (for me). That's were I understood why the people in Retropie chose an older tag to publish; it is less messy with the required libraries.

                            1 Reply Last reply Reply Quote 0
                            • O
                              OldSchool @bassybeats
                              last edited by

                              @bassybeats

                              How did you get brutal doom to work with lzdoom, if you don't mind me asking ? Or is there a page you could link with instructions? I swear I've been googling and working on this for hours and I just can't understand what to do. I had brutal doom, sigil, all that working fine on zdoom on the Pi 3, but with lzdoom and the Pi 4 it's just not making sense to me. Thanks in advance for any help you can give.

                              1 Reply Last reply Reply Quote 0
                              • RapidEdwin08R
                                RapidEdwin08 @Protocultor
                                last edited by

                                @protocultor and @RetroS3xual Thanks for all your work on this! It's been a while since I checked back here, and I'm happy too see how much this community has achieved. Maybe we can get this ball rolling again.

                                Raspberry Pi B, Pi B+, Pi2 B, Pi3 B, Pi3 B+, Pi Zero W, Pi4 (4GB/8GB), Pi5 (8GB/16GB), Pi Zero 2 W, GPi V1, minisforum GK50 / RetroPie 4.8.x

                                P 1 Reply Last reply Reply Quote 0
                                • P
                                  Protocultor @RapidEdwin08
                                  last edited by

                                  Hello @RapidEdwin08! I think the ball has rolled all the way, since these changes are now officially part of GZDoom:
                                  https://github.com/coelckers/gzdoom/pull/1163
                                  About the instructions in https://retropie.org.uk/forum/post/216941, I've recreated my branch to mirror the 3.86a tag, and updated some of the instructions to make them work for that tag.
                                  I don't think there is anything else to do now, since it seems even the later LZDoom versions have my changes now, but they appear after the 3.86a tag, which is the last that supports the Pis.
                                  Still, it's good to know that the gamepad will no longer be a problem for *nix users, not even on MacOS. To me, it's a solved issue.
                                  Again, thanks for the initial push of the ball :)

                                  mituM 1 Reply Last reply Reply Quote 0
                                  • mituM
                                    mitu Global Moderator @Protocultor
                                    last edited by

                                    @protocultor said in Zdoom and Gampad Fully Working in MENU with NO KEYBOARD:

                                    I don't think there is anything else to do now, since it seems even the later LZDoom versions have my changes now, but they appear after the 3.86a tag, which is the last that supports the Pis.

                                    It looks like later LZDoom versions have retained the GL2 compatibility needed for the Pi, so we will update it in RetroPie to the latest 3.87c release. The version should include your code for the gamepad improvements.

                                    RapidEdwin08R 1 Reply Last reply Reply Quote 1
                                    • RapidEdwin08R
                                      RapidEdwin08 @mitu
                                      last edited by RapidEdwin08

                                      @mitu What else could be done at this point?
                                      Updating was really the only thing at first...
                                      But then after testing, I thought Out-of-the-Box Joypad mappings could be improved.
                                      I've tested many Joypads ranging from N64, PSX, PS3/PS4, Xbox0G,Xbox360, even the PS3/4 MK Fighting Pad (Sega Style) with D-Pad Only.
                                      I since updated the defbinds file to included a Good amount of Joypad Mappings for 10 Buttons or More.

                                      For now I only made the first 2Axis for Turning(Yaw) and Moving(Forward), to avoid the looking Up issue with certain Joypads like PS3/PS4.
                                      But there are a few 'if else' scenarios that could be updated IMO to to accomodate for all Joypads depending on Axis#.
                                      Here's what I've found in testing the Axis Settings that are ideal for each Joypad, and the File I believe could be updated.

                                      gzdoom-3.87c/src/posix/sdl/i_joystick.cpp

                                      // Single Analog Stick N64 Joypad
                                      if NumAxes == 2 {JOYAXIS_Yaw, JOYAXIS_Forward};

                                      // Some Joypad has x3 Axis?
                                      if NumAxes == 3 {JOYAXIS_Side, JOYAXIS_Forward, JOYAXIS_Yaw};

                                      // Joypad with Dual Analog Sticks Xbox
                                      if NumAxes == 4 {JOYAXIS_Side, JOYAXIS_Forward, JOYAXIS_Yaw, JOYAXIS_Pitch};

                                      // Joypad with Dual Analog Sticks PS3/PS4
                                      if NumAxes >= 5 {JOYAXIS_Side, JOYAXIS_Forward, JOYAXIS_None, JOYAXIS_Yaw, JOYAXIS_Pitch};

                                      As a bonus, the Sensitivity on any Axis after the first 2 could be lowered to .75 give or take.

                                      I've been testing v3.87c on Pi and updated it already based on the changes accumulated since 3.86a.
                                      I also added a few Minor tweaks specific to rPi.
                                      Here is the link for the lzdoom v3.87c RetroPie Setup Script Replacement files:
                                      https://www.mediafire.com/file/8z07vzribuqmgec/RetroPie-Setup_lzdoom-387c-PiJoySDL_20210212.zip/file

                                      https://github.com/RapidEdwin08/sijl

                                      Just replace the files in your Retropie Setup Directory:
                                      ~RetroPie-Setup/scriptmodules/ports/lzdoom.sh
                                      ~RetroPie-Setup/scriptmodules/ports/lzdoom/01_rpi_fixes.diff
                                      Optional Packages -> Update from Source

                                      Raspberry Pi B, Pi B+, Pi2 B, Pi3 B, Pi3 B+, Pi Zero W, Pi4 (4GB/8GB), Pi5 (8GB/16GB), Pi Zero 2 W, GPi V1, minisforum GK50 / RetroPie 4.8.x

                                      mituM 1 Reply Last reply Reply Quote 0
                                      • mituM
                                        mitu Global Moderator @RapidEdwin08
                                        last edited by

                                        @rapidedwin08 said in Zdoom and Gampad Fully Working in MENU with NO KEYBOARD:

                                        @mitu What else could be done at this point?

                                        I'll do a PR with the new version changes and see what defaults we can set for the joypad when installing, via configuration.

                                        1 Reply Last reply Reply Quote 2
                                        • 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.