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 258.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.
    • G
      George @TedMaul
      last edited by George

      @tedmaul cool. Ok, I have yet to document this, but there's now two ways to add "roms" to the Wine emulator section in Emulation Station. The first way is supposed to be a little easier as it is just a conf file.

      Create a file /home/pi/RetroPie/roms/wine/CommanderClaw.conf containing the following:

      DIRECTORY=/home/pi/RetroPie/roms/wine/Files/claw/
      PROGRAM=/home/pi/RetroPie/roms/wine/Files/claw/CLAW.EXE
      OPTIONS=
      

      The other way would be to use the shell script method. Create a file called: /home/pi/RetroPie/roms/wine/CommanderClawShell.sh containing the following:

      #!/bin/bash
      xset -dpms s off s noblank
      cd "/home/pi/RetroPie/roms/wine/Files/claw/"
      matchbox-window-manager &
      WINEDEBUG=-all LD_LIBRARY_PATH="/opt/retropie/supplementary/mesa/lib/" setarch linux32 -L /opt/retropie/emulators/wine/bin/wine '/home/pi/RetroPie/roms/wine/Files/claw/CLAW.EXE'
      

      After you've created either of these files, you'll have to restart Emulation Station in order for them to be picked up.

      Hopefully one of those should work. I have a long list of games that I'm supposed to test out and haven't gotten to it yet, but Commander Claw is on the list.

      - George

      shavecatS T 2 Replies Last reply Reply Quote 0
      • shavecatS
        shavecat @George
        last edited by

        @george
        hey ,
        i did try claw but also get a black screen.
        did u get it working with what u write ?
        will check it too if so :)

        1 Reply Last reply Reply Quote 0
        • T
          TedMaul @George
          last edited by

          @george Thanks, the conf file opened Wine Desktop but then kicked me out; the shell script was more promising (opened before freezing on the first level), but every subsequent attempt just opens Wine Desktop before kicking me out again (without loading the game). But it feels like progress!

          G 1 Reply Last reply Reply Quote 0
          • G
            George @TedMaul
            last edited by

            @tedmaul interesting. When you say "Wine Desktop", do you see the Wine start menu/task bar at the bottom of the screen?

            It does feel like progress though, especially if you were able to at least see some of the game.

            - George

            1 Reply Last reply Reply Quote 0
            • G
              George
              last edited by George

              Just found out there's some kind of open source version of Commander Claw called Open Claw. @shavecat - saw your comment on Discord about it. Cool.

              WODAKW 1 Reply Last reply Reply Quote 1
              • WODAKW
                WODAK @George
                last edited by WODAK

                I've made some videos with wine and box86 on Twister OS. Yes yes...I know it's not Retropie😁

                Bad image and bad sound in videos....but really glad that these games are running :)

                check the link

                Raspberry Pi 4 - Twister OS - Wine BOX86 Multiplayer games

                Titles:
                Castle Crashers
                Samurai Gunn
                Ticky Towers
                Nidhogg
                Stikbold (loooooong time to load.....a bit laggy)
                Crawl
                Porcunipine(a bit laggy)
                Towerfall Ascension (bad sound)

                G 1 Reply Last reply Reply Quote 1
                • retropieuser555R
                  retropieuser555
                  last edited by

                  Hey so I ran a fresh install recently and found that Fallout and Fallout2 both crash at the video/fmv screens. Is this something anyone else is finding? The games both worked around Jan/Feb for me when I first tried this out, just wondering if it's due to something changed in the newer versions of mesa,wine and box86?

                  Pi 5 4GB

                  Retroflag GPI with raspberry pi zero 2 w/ wifi

                  Retroachievements:- lovelessrapture

                  G 1 Reply Last reply Reply Quote 0
                  • G
                    George @retropieuser555
                    last edited by

                    @retropieuser555 my guess would be Mesa, as I've seen reports that different versions of Mesa are better for different games. I know that just complicates things. Do you remember which versions you were running prior vs. which versions you are running now (for Mesa, Wine, and Box86)?

                    - George

                    retropieuser555R 1 Reply Last reply Reply Quote 0
                    • retropieuser555R
                      retropieuser555 @George
                      last edited by retropieuser555

                      @george Honestly I've no idea, I didn't keep track of it all unfortunately. I guess it's possible to install earlier branches of mesa? Or once you've updated there's no going back without breaking other things? I know when I first did it I used your box86.sh, mesa.sh and wine.sh files you wrote in Jan/Feb time if you have copies of those about still?

                      edit: So I had a try at installing Mesa 20.3.4 but my glxinfo is still giving me Mesa 21.2. Anyone know how to totally uninstall a later version of Mesa?

                      pi@retropie:~ $ DISPLAY=:0 /usr/bin/glxinfo -v -B
                      name of display: :0
                      display: :0  screen: 0
                      direct rendering: Yes
                      Extended renderer info (GLX_MESA_query_renderer):
                          Vendor: Broadcom (0x14e4)
                          Device: V3D 4.2 (0xffffffff)
                          Version: 21.2.0
                          Accelerated: yes
                          Video memory: 1546MB
                          Unified memory: yes
                          Preferred profile: compat (0x2)
                          Max core profile version: 0.0
                          Max compat profile version: 2.1
                          Max GLES1 profile version: 1.1
                          Max GLES[23] profile version: 3.1
                      OpenGL vendor string: Broadcom
                      OpenGL renderer string: V3D 4.2
                      OpenGL version string: 2.1 Mesa 21.2.0-devel (git-956d961339)
                      OpenGL shading language version string: 1.20
                      
                      OpenGL ES profile version string: OpenGL ES 3.1 Mesa 21.2.0-devel (git-956d961339)
                      OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
                      

                      Pi 5 4GB

                      Retroflag GPI with raspberry pi zero 2 w/ wifi

                      Retroachievements:- lovelessrapture

                      G 1 Reply Last reply Reply Quote 0
                      • G
                        George @retropieuser555
                        last edited by

                        @retropieuser555 I've seen reports that Mesa 21.x generally has issues, and most folks use a branch in the mesa-20.x range (including myself).

                        It you've installed Mesa with my scripts, they should be installing in: /opt/retropie/supplementary/mesa/. This is not the standard location for Mesa, which is intentional so it doesn't create conflicts and crash things that already work.

                        It's interesting that you're running glxinfo without providing the path to Mesa. This would either tell me that Mesa got installed in the standard location, X-Windows was launched with the path to Mesa set to somewhere else, or the RPI Foundation updated Mesa to the most recent version (least likely scenario but possible).

                        Could you try the following:

                        LD_LIBRARY_PATH="/opt/retropie/supplementary/mesa/lib/" DISPLAY=:0 /usr/bin/glxinfo -v -B
                        

                        If you're still seeing v21, then the older version of Mesa did not get installed correctly. You could try to wipe out what is in the /opt/retropie/supplementary/mesa/ folder and try again.

                        Hope that helps.

                        - George

                        retropieuser555R 1 Reply Last reply Reply Quote 0
                        • retropieuser555R
                          retropieuser555 @George
                          last edited by

                          @george It's the strangest thing, when I tried as you suggested it shows that mesa is 20.3.4. So I guess I have two versions installed somehow. What's the standard mesa location? Maybe I can delete it from there.

                          Although my .sh file is pointing to the 20.3.4 version

                          #!/bin/bash
                          xset -dpms s off s noblank
                          cd "/home/pi/.wine/drive_c/GOG Games/Fallout/"
                          matchbox-window-manager &
                          WINEDEBUG=-all LD_LIBRARY_PATH="/opt/retropie/supplementary/mesa/lib/" setarch linux32 -L /opt/retropie/ports/wine/bin/wine '/home/pi/.wine/drive_c/GOG Games/Fallout/falloutw.exe' -fullscreen
                          
                          

                          So does this mean the game or something is overriding that and using mesa 21.x instead of the one I'm directing it towards?

                          Pi 5 4GB

                          Retroflag GPI with raspberry pi zero 2 w/ wifi

                          Retroachievements:- lovelessrapture

                          G 1 Reply Last reply Reply Quote 0
                          • G
                            George @retropieuser555
                            last edited by

                            @retropieuser555 that is interesting. Perhaps the latest version of Mesa got updated in the regular location. I'm unable to check right now, but I guess it's possible.

                            Could you share the output of:

                            dpkg -l | grep libgl1-mesa
                            

                            That will tell us what version is installed via apt.

                            Typically, Mesa gets installed in /usr/lib/arm-linux-gnueabihf/, but I wouldn't suggest removing it from there, because it's what is running OpenGL on the entire system.

                            - George

                            retropieuser555R 1 Reply Last reply Reply Quote 0
                            • retropieuser555R
                              retropieuser555 @George
                              last edited by

                              @george So it seems in the proper location it's this:-

                              pi@retropie:~ $ dpkg -l | grep libgl1-mesa
                              ii  libgl1-mesa-dev:armhf                19.3.2-1~bpo10+1~rpt3               armhf        transitional dummy package
                              ii  libgl1-mesa-dri:armhf                19.3.2-1~bpo10+1~rpt3               armhf        free implementation of the OpenGL API -- DRI modules
                              
                              

                              So that's 19.3.2 right?

                              Pi 5 4GB

                              Retroflag GPI with raspberry pi zero 2 w/ wifi

                              Retroachievements:- lovelessrapture

                              G 1 Reply Last reply Reply Quote 0
                              • G
                                George @WODAK
                                last edited by

                                @wodak those are cool videos! Thanks for making them!

                                - George

                                1 Reply Last reply Reply Quote 0
                                • G
                                  George @retropieuser555
                                  last edited by

                                  @retropieuser555 Yes, that seems to be the default install. I'll need to check things out again.

                                  1 Reply Last reply Reply Quote 0
                                  • T
                                    Troopaking @George
                                    last edited by Troopaking

                                    @george hello . So I have been playing with Box86 as well. Killing my head trying to launch MUGEN from retropie. Have you seen lutris? A frontend for box86 games, steam and Linux games . It handles alot 9f script for you as launch games with lutris=lutris game id =1.
                                    I tried to install your packages on twister os with no success.

                                    I was able to get your packages in retropie packages menu. But when install its says install box86 first go to install box86 script says install wine and so on.
                                    Could the fact that twister os has box86 already be causing issues ?
                                    Gonna try from fresh raspi os and retropie .
                                    But no success with twister as of now.
                                    Trying to build a mugen image this is my last step launching from retropie .
                                    Have been testing mugens and other games. I am very impressed with current box86 and wine .

                                    G 1 Reply Last reply Reply Quote 0
                                    • G
                                      George @Troopaking
                                      last edited by

                                      Thanks @troopaking I've played a bit with Lutris and Twister OS, but not as much as I would probably like to. They are both great. My main interest with Raspberry PI's is emulation, so usually for me RetroPie is the way to go.

                                      With regards to the problems you are seeing, it might be a conflict of sorts with Twister OS, as it will have a more recent version of Mesa and Box86 already installed. Perhaps there is a way that I can detect whether someone has already installed those separately, as they typically get installed in a system location, vs. the typical RetroPie location of /opt/retropie/. I've put them in /opt/retropie because that's where everything else with RetroPie goes. I might have to double check that though.

                                      Hopefully the Raspberry Pi Foundation will update Mesa in their standard builds. If that happens, doing the special install of Mesa in the future won't be necessary. That's one of the deal breakers from getting this into the official RetroPie distribution. It's too much too support and too many moving pieces.

                                      There's a very slim chance there might be another issue with RetroPie on TwisterOS if your RetroPie Setup script isn't updated to the most recent versions, or if you are updated to the most recent versions, but the scripts are old. It's a pretty slim chance though. You can check by running RetroPie setup and making sure that the version says at least 4.7.7.

                                      I've never played with MUGEN, but it looks pretty cool. Closed source and possibly abandonware though? Might be difficult to get running. Have you tried it on an X86 Linux PC with Wine? If that works, next step would be to try with TwisterOS via Box86 and Wine (no RetroPie).

                                      - George

                                      T 3 Replies Last reply Reply Quote 0
                                      • T
                                        Troopaking @George
                                        last edited by Troopaking

                                        Fixed issues see below.

                                        1 Reply Last reply Reply Quote 0
                                        • T
                                          Troopaking @George
                                          last edited by Troopaking

                                          UPDATE launched skifree just fine with following "how to" for easy reference.
                                          All taken from above thread and Georges Github. ALL CREDIT TO HIM AND OTHERS IN THREAD.
                                          UPDATE. INSTALL PIXEL DESKTOP FIRST THEN WILL WORK FINE WITH DESKTOP INSTALLED
                                          1.Download retropie os burn to sd card put in pi
                                          2.update with
                                          sudo apt-get update
                                          3.Install Georges retropi setup extras
                                          git clone --branch emulator https://github.com/GeorgeMcMullen/rp-box86wine /home/pi/RetroPie-Setup/ext/rp-box86wineemu/
                                          4.Run and Update RetroPie-Setup
                                          Run retropie setup update. After update you should see a new subsection in "dependencies" and "experimental" with the scripts in them. They must be run in order and will produce an error if you try to install them out of order. Launch RetroPie Setup, go to "Manage Packages" (P) and then run the scripts as follows:
                                          dependencies/mesa
                                          experimental/box86
                                          experimental/wine
                                          5.Move game fies to /home/RetroPie/roms/wine/Files
                                          This can be done many ways . SSH, midnight commanderto name a few.
                                          6.Two options for making game script (I used .conf)
                                          Option 1.
                                          Create a file /home/pi/RetroPie/roms/wine/yourgame.conf containing the following:

                                          DIRECTORY=/home/pi/RetroPie/roms/wine/Files/yourgame/
                                          PROGRAM=/home/pi/RetroPie/roms/wine/Files/yourgame/gamelaunch.EXE
                                          OPTIONS=
                                          Option 2.
                                          Use the shell script method. Create a file called: /home/pi/RetroPie/roms/wine/yourgame.sh containing the following
                                          :
                                          #!/bin/bash
                                          xset -dpms s off s noblank
                                          cd "/home/pi/RetroPie/roms/wine/Files/yourgame/"
                                          matchbox-window-manager &
                                          WINEDEBUG=-all LD_LIBRARY_PATH="/opt/retropie/supplementary/mesa/lib/" setarch linux32 -L /opt/retropie/emulators/wine/bin/wine '/home/pi/RetroPie/roms/wine/Files/yourgame/gamelaunch.EXE'

                                          After you've created either of these files, you'll have to restart Emulation Station in order for them to be picked up.
                                          7.Launch game as normal retropie game.

                                          8.Enjoy

                                          1 Reply Last reply Reply Quote 2
                                          • T
                                            Troopaking @George
                                            last edited by Troopaking

                                            @george hello again.
                                            Have you been able to install directx in wine ?
                                            I am trying to install it today.
                                            So far most MUGENS 1.1 run good, only a few I've tested have issues.
                                            I am trying to install directx to use winmugen which using directx for video drivers .
                                            Could see directx majorly affecting the compatibility game list .

                                            -Any load time difference in running .sh vs .conf?
                                            Seems .sh has "winedebug=....." which is great but .conf file does not.
                                            I've read using winedebug stops wine debug reports and can increase speed.
                                            I just tested with Mugen Super fighter and DC vs marvelous noticeable difference

                                            Any luck launching two programs this way ?
                                            So mugen uses esc key alot Lol. Its the back key and exit. I need to map escape key to controller of course can use joy2key. But can i start this before or in junction with mugen ?

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