• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login

Box86 and Wine on RPi4

Scheduled Pinned Locked Moved Ideas and Development
box86wineqemux86windows
475 Posts 40 Posters 236.4k 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.
  • T
    Troopaking @George
    last edited by 16 Jul 2021, 17:26

    @george
    Sudo apt-get install qjoypad worked for me as well on a few builds .
    Me and RusselB (mainly Russels knowledge) have been working on qjoyoad instead of joy2key in wine . Qjoyoad performs a lot better and can scripted like Russel has done for each game to launch different settings.

    All of us have done a good combined effort to make something really cool . Hopefully they will use in retropie offical soon .
    Thanks to russel, you and others for the work.

    I greatly appreciate the teamwork and community effort .

    1 Reply Last reply Reply Quote 1
    • R
      RussellB @RussellB
      last edited by 18 Jul 2021, 21:50

      @russellb said in Box86 and Wine on RPi4:

      @george sudo apt-get install qjoypad did the trick. Installed version 4.1.

      Replace the test for .conf file in "Wine Desktop.sh" with this code. If ~/.qjoypad3 folder does not exist, it ignores the call to qjoypad all together.

      elif [[ "${params[0]}" == *.conf ]]; then
      configFile=$(cat "${params[@]}")
      WINEPREFIX=$(configValueForKey WINEPREFIX "$configFile")
      DIRECTORY=$(configValueForKey DIRECTORY "$configFile")
      PROGRAM=$(configValueForKey PROGRAM "$configFile")
      OPTIONS=$(configValueForKey OPTIONS "$configFile")
      QJOYPADLAYOUT=$(echo $(basename "$(dirname "${PROGRAM}")"))
      echo "Launching with config file"
      echo "WINEPREFIX: $WINEPREFIX"
      echo "DIRECTORY: $DIRECTORY"
      echo "PROGRAM: $PROGRAM"
      echo "OPTIONS: $OPTIONS"
      echo "QJOYPADLAYOUT: $QJOYPADLAYOUT"
      if [[ "$DIRECTORY" ]]; then
      cd "$DIRECTORY"
      fi
      midi_synth start
      xset -dpms s off s noblank
      matchbox-window-manager &
      if [ -d "/home/pi/.qjoypad3" ]; then
      if [ -f "/home/pi/.qjoypad3/${QJOYPADLAYOUT}.lyt" ]; then
      qjoypad "$QJOYPADLAYOUT" &
      echo "Starting qjoypad with $QJOYPADLAYOUT"
      elif [ -f "/home/pi/.qjoypad3/WINE.lyt" ]; then
      qjoypad WINE &
      echo "Starting qjoypad with WINE"
      else
      qjoypad &
      echo "Starting qjoypad with default layout"
      fi
      fi
      setarch linux32 -L /opt/retropie/emulators/wine/bin/wine "${PROGRAM}" "${OPTIONS}"
      midi_synth stop
      fi

      Found a bug in the assignment of QJOYPADLAYOUT. Missing quotes around the parameter to basename.

      R 1 Reply Last reply 19 Jul 2021, 12:24 Reply Quote 0
      • R
        RussellB @RussellB
        last edited by RussellB 19 Jul 2021, 12:24

        @russellb So to make like easy on the game add-on developer I have created a default WINE.lyt that has the default joypad values for MUGEN. Then, in mugen.cfg I have the following changes:

        GameWidth=640
        GameHeight=480
        .
        .
        .
        FullScreen=1
        .
        .
        .
        P1.Joystick.type = 0
        P2.Joystick.type = 0
        
        ;-------------------------------------------------------
        ; P1 Key config (configurable from M.U.G.E.N)
        [P1 Keys]
        Jump   = 273
        Crouch = 274
        Left   = 276
        Right  = 275
        A      = 44
        B      = 46
        C      = 47
        X      = 108
        Y      = 59
        Z      = 39
        Start  = 13
        
        ; P2 Key config (configurable from M.U.G.E.N)
        [P2 Keys]
        Jump   = 119
        Crouch = 115
        Left   = 97
        Right  = 100
        A      = 102
        B      = 103
        C      = 104
        X      = 114
        Y      = 116
        Z      = 121
        Start  = 117
        

        That way all the games can have the same configuration. If you want to have game-specific settings leave the keys alone in mugen.cfg for that game and create a custom layout in qjoypad that maps to that game. Easy peasy.

        It occurs to me that M.U.G.E.N. deserves its own system in themes, but I can't find any themes that have a M.U.G.E.N. system. Also need a "Loading..." screen.

        R 1 Reply Last reply 20 Jul 2021, 15:34 Reply Quote 0
        • R
          RussellB @RussellB
          last edited by 20 Jul 2021, 15:34

          @russellb Because not a lot of themes have a specific theme for MUGEN I made a subdirectory under roms/wine/M.U.G.E.N.. (need to periods so it shows up as M.U.G.E.N. in the ES menu) and put the MUGEN conf files in that folder. I'm using the "windows" theme for wine so this makes sense to me as they run under windows. I'm ok with that. :)

          1 Reply Last reply Reply Quote 0
          • T
            Troopaking @George
            last edited by Troopaking 21 Jul 2021, 22:31

            @george
            Hello again George so Russell's qjoypad code works great. Just awesome stuff .

            I'm having a issue with Baldurs Gate(bg). If I opened wine config then start bg works fine . But open through desktop or .conf fails. Has horrible black screen issue unless ran with wineconfig .

            Update Baldurs Gate worked perfect when ran through .sh with startx instead of matchbox .

            R 1 Reply Last reply 26 Jul 2021, 17:01 Reply Quote 0
            • R
              RussellB @Troopaking
              last edited by 26 Jul 2021, 17:01

              @troopaking said in Box86 and Wine on RPi4:

              @george
              Hello again George so Russell's qjoypad code works great. Just awesome stuff .

              I'm having a issue with Baldurs Gate(bg). If I opened wine config then start bg works fine . But open through desktop or .conf fails. Has horrible black screen issue unless ran with wineconfig .

              Update Baldurs Gate worked perfect when ran through .sh with startx instead of matchbox .

              I can't find a version of Baldur's Gate that runs properly even in Windows 10 to try it in WINE. :(

              R 1 Reply Last reply 29 Jul 2021, 02:50 Reply Quote 0
              • R
                RussellB @RussellB
                last edited by RussellB 29 Jul 2021, 02:50

                Can someone try this for me?

                Testing WINE with 3D Space Cadet Pinball originally for Windows 95. It runs fullscreen fine, however hitting "ESCAPE" key it switches back to a window and then hangs. Can't figure out why.

                If I hit ALT+F4 however, it exists back to ES.

                Looks like WINE is having a problem closing whatever application is running and it hangs.

                NEVERMIND! I see this was noted in a previous post.

                EDIT: Using xbindkeys and qjoypad I now have the ability to do a one-button exit back to ES:

                xbindkeys is configured to map the "END" key to the command "pkill -f /opt/retropie/emulators/wine/bin/wine".

                qjoypad is configured so the "BACK" button send the "END" key

                So "BACK Button"->qjoypad->xbindkeys->terminate wine process

                I'll test it with other programs but now at least you don't need a keyboard for Pinball anymore!! If this works with mugen (Need to map a different button because I use "BREAK" as "ESCAPE" to traverse back through the menus. Let me do some more testing.

                This even fixes the issue I had where on one RetroPie install it failed to exit when selecting the "EXIT" menu item or "ESCAPE". Now I programmed the "Logitech" button on the F710 to send the "END" key and it works great!

                R 1 Reply Last reply 29 Jul 2021, 18:44 Reply Quote 1
                • R
                  RussellB @RussellB
                  last edited by RussellB 29 Jul 2021, 18:44

                  Had to change the kill command to "kill $( pgrep -f "wine/bin/wine\ /")". This command kills the executable that was started so Wine can shutdown cleanly.

                  So I had to install xbindkeys and xbindkeys-config from apt-get. A custom configuration file to handle the END mapping to the script, and voila.

                  EDIT: Even easier way to shutdown cleanly:

                  /opt/retropie/emulators/wine/bin/wineserver -k

                  G 1 Reply Last reply 30 Jul 2021, 02:19 Reply Quote 1
                  • G
                    George @RussellB
                    last edited by 30 Jul 2021, 02:19

                    @russellb That's awesome. The escape key problem on Space Cadet pinball always bothered me. I'm going to have to try this!

                    - George

                    R T 2 Replies Last reply 30 Jul 2021, 12:10 Reply Quote 0
                    • R
                      RussellB @George
                      last edited by 30 Jul 2021, 12:10

                      @george said in Box86 and Wine on RPi4:

                      @russellb That's awesome. The escape key problem on Space Cadet pinball always bothered me. I'm going to have to try this!

                      - George

                      Let me know if you want the files to try this out.

                      R 1 Reply Last reply 30 Jul 2021, 14:47 Reply Quote 0
                      • T
                        Troopaking @George
                        last edited by 30 Jul 2021, 14:38

                        @George

                        So I tryed to use your scripts in combo with lutris installed on pi 4 .
                        Could work take some time to make lutris act right. It's acts funky sometimes .
                        The .sh would be simpler to code rough example
                        Bin bash
                        Cd "/home/pi/...."
                        Startx &
                        Qjoypad "blah"
                        Lutris lutris game id 3

                        I feel a few things to note/consider
                        -lutris complied mesa and vulkan itself and your scripts still worked fine.
                        -lutris can "install" games with a working directory so might be able to remove cd line all together that way .
                        -lutris has joystick configuration already . Haven't tested it yet . But might be able to remove qjoypad altogether with it .
                        -metadata for most games is fetched from lutris.net and could be transferred to es in theory .
                        -lutris takes space on sd with Metadata etc .
                        -lutris update could cause problems or solutions

                        1 Reply Last reply Reply Quote 1
                        • R
                          RussellB @RussellB
                          last edited by 30 Jul 2021, 14:47

                          @george, @Troopaking

                          To get xbindkeys working:

                          1. sudo apt-get install xbindkeys
                          2. sudo apt-get install xbindkeys-config
                          3. Modify 'Wine Desktop.sh':
                          .
                          .
                          .
                          xbindkeys -f ~/.xbindkeysrc &
                          setarch linux32 -L /opt/retropie/emulators/wine/bin/wine "${PROGRAM}" "${OPTIONS}"
                          .
                          .
                          .
                          1. Create ~/.xbindkeysrc:
                          "/opt/retropie/emulators/wine/bin/wineserver -k"
                              m:0x0 + c:115
                              End
                          
                          1. Modify the qjoypad layout file you want and assign 115 to the button you want to exit Wine:
                          Button X: Key 115
                          

                          Where "X" is the number of the button assigned.

                          1. Run any Wine game and hit the button you assigned in step 5.
                          2. Profit!
                          R 1 Reply Last reply 1 Aug 2021, 22:52 Reply Quote 1
                          • R
                            roslof
                            last edited by roslof 31 Jul 2021, 17:54

                            I noticed the mesa folder generated from the script is almost 2GB in size. The lion's share in:
                            /opt/retropie/suppementary/mesa/lib/dri/

                            There are 23 .so files about 85MB a piece. For the RPi4. Wondering if any of these files are being used. I'd like to reduce the storage footprint by nuking any unnecessary files.

                            Best!

                            T G 2 Replies Last reply 1 Aug 2021, 03:36 Reply Quote 0
                            • T
                              Troopaking @roslof
                              last edited by 1 Aug 2021, 03:36

                              @roslof
                              I can't say if they are need that is rather large though .
                              Will try and look into it next time I test stuff out .
                              I assume the pi needs em that's why they are thier but can't conform or denie.

                              1 Reply Last reply Reply Quote 0
                              • R
                                RussellB @RussellB
                                last edited by RussellB 8 Feb 2021, 13:50 1 Aug 2021, 22:52

                                @russellb said in Box86 and Wine on RPi4:

                                @george, @Troopaking

                                To get xbindkeys working:

                                1. sudo apt-get install xbindkeys
                                2. sudo apt-get install xbindkeys-config
                                3. Modify 'Wine Desktop.sh':
                                .
                                .
                                .
                                xbindkeys -f ~/.xbindkeysrc &
                                setarch linux32 -L /opt/retropie/emulators/wine/bin/wine "${PROGRAM}" "${OPTIONS}"
                                .
                                .
                                .
                                1. Create ~/.xbindkeysrc:
                                "/opt/retropie/emulators/wine/bin/wineserver -k"
                                    m:0x0 + c:115
                                    End
                                
                                1. Modify the qjoypad layout file you want and assign 115 to the button you want to exit Wine:
                                Button X: Key 115
                                

                                Where "X" is the number of the button assigned.

                                1. Run any Wine game and hit the button you assigned in step 5.
                                2. Profit!

                                So I ran into a problem with this approach. Shutting down the Wine Server prevented Pinball from saving its high scores. It apparently updates them upon normal close of the main window. So I changes to command in .xbindkeysrc to this:

                                "xdotool key --window $(xdotool search --name '3D Pinball for Windows - Space Cadet') 'ALT+F4' &"
                                m:0x0 + c:115
                                End

                                This shuts Pinball down gracefully and allows it to save high scores.

                                xdotool needs to be installed (sudo apt-get install xdotool) but once it is it now completes the ability to send key combinations from a controller to a Wine-based game:

                                qjoypad->xbindkeys->xdotool

                                1. Gamepad Button converts to single keyboard character using qjoypad
                                2. xbindkeys converts single keyboard character into a script that can be executed using xdotool
                                3. xdotool sends the key combination to the actively selected window

                                This approach does require a different .xbindkeysrc file per game if you want to use the same keyboard character.

                                I'll probably modify "Wine Desktop" to pick different .xbindkeysrc files as I mentioned above with qjoypad.

                                This was gonna keep me up at night.. it did last night. Whoo hoo!

                                Just fixed the 'Exiting' issue from SkiFree as well.

                                1 Reply Last reply Reply Quote 1
                                • R
                                  retropieuser555
                                  last edited by 3 Aug 2021, 21:17

                                  So I haven't been on my pi4 in quite sometime but apparently this emulator that's a modification of visualboyadvance supports local multiplayer and is a 32bit Linux version. It'd be quite cool to see if it works with box86

                                  https://linux.softpedia.com/get/System/Emulators/VisualBoyAdvance-Link-103308.shtml

                                  Pi 5 4GB

                                  Retroflag GPI with raspberry pi zero 2 w/ wifi

                                  Retroachievements:- lovelessrapture

                                  T 1 Reply Last reply 4 Aug 2021, 03:43 Reply Quote 1
                                  • T
                                    Troopaking @retropieuser555
                                    last edited by 4 Aug 2021, 03:43

                                    @retropieuser555
                                    Why do you need box86 for a Linux app. Wine and box86 are for exe and windows files .
                                    You can launch that linux game with a script from emulation station

                                    R 1 Reply Last reply 4 Aug 2021, 07:38 Reply Quote 0
                                    • F
                                      Folly
                                      last edited by 4 Aug 2021, 05:57

                                      @retropieuser555

                                      Softpedia redirects to https://github.com/Jacques-Olivier/VisualBoyAdvance_Link, but that link is down.

                                      So if you want this you have to search for the source code somewhere else.

                                      1 Reply Last reply Reply Quote 0
                                      • R
                                        retropieuser555 @Troopaking
                                        last edited by 4 Aug 2021, 07:38

                                        @troopaking well I haven't tested it yet but the app isn't for arm, it's a 32bit program. Which is what box86 is solving, allowing you to run 32bit programs on an arm build.

                                        @folly ah bummer, I hadn't tried to download it yet but yeah I'll have a hunt around as I imagine it might be floating around the web somewhere, I'll take a look later on or at the weekend

                                        Pi 5 4GB

                                        Retroflag GPI with raspberry pi zero 2 w/ wifi

                                        Retroachievements:- lovelessrapture

                                        1 Reply Last reply Reply Quote 1
                                        • E
                                          ecto
                                          last edited by 9 Aug 2021, 09:02

                                          Hi,
                                          so now it happend. I couldn't resist: I opened Pandora's Box and installed Bow86/Wine.

                                          There are some Windows games that complement my Dosbox installation perfectly, which are:

                                          • Fallout 1 & 2
                                          • Diablo 2
                                          • Privateer 2
                                            *Dungeon Keeper 2 and
                                          • Probably some Civ (3?) or HoMM (3?).

                                          So far I tried the first five, to some success. I've read through the whole thread to get up to date, but I might have overlooked something. What I'm struggeling with are segementation faults. I'm using the .sh approach.

                                          For debugging purposes I'm starting the scripts for the games from the ports romdir through the shell. Usually this ends in a segmentation fault. But if I try again, it usually works after the second or third attempt. Has anyone noticed some similar behaviour? I haven't played the games for long - just enough so that I know sound and input works - so I can't comment on the overall stability.

                                          Now I'd like to ask on some game specific things:

                                          • Fallout 1 & 2: I have installed the Fallout Fixt mod for Fallout 1 and the Restoration Project for Fallout 2 to be able to play in fullscreen. That seems to work, but there are some color errors in some still images and the FMVs. They go away if I select DirectX 7 in the Fallout configs, but then gameplay is sluggish. Do I need to Install any Direct X runtimes, or is that all included in Wine?
                                          • Diablo 2: I have Patch 1.12 with the resolution mod installed. That seems to work pretty well out ouf the box.
                                          • Dungeon Keeper 2 is very picky. My GOG verion has some patched exe for better (?) DirectX support, but so far, I had not much luck starting it. The one time I did, the graphis where somewhat corrupted. Maybe I have to play around the different Windows versions?
                                          • Privateer 2 with an enhancement fan patch . The game starts, but I have no joystick support. I haven't looked into that so far. Do I need any drivers maybe?

                                          That's it so far from my side. Thanks for hearing me!

                                          T 1 Reply Last reply 9 Aug 2021, 15:06 Reply Quote 0
                                          350 out of 475
                                          • First post
                                            350/475
                                            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