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 237.9k 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
      MumboJumbo @MumboJumbo
      last edited by

      Too happy too early^^ copying the file is not enough i had to change the script
      I added the copy command in the box86.sh right after the cloning

      
      function sources_box86() {
          gitPullOrClone "$md_build" https://github.com/ptitSeb/box86.git "$(_latest_ver_box86)"
          cp /home/pi/RetroPie-Setup/tmp/build/box86/LICENSE /home/pi/RetroPie-Setup/tmp/build/box86/docs/LICENSE
      }
      
      

      this worked

      M 1 Reply Last reply Reply Quote 0
      • M
        MumboJumbo @MumboJumbo
        last edited by

        After try and error and repeated careful reading here i found my faults. I used the master Branch of the script and not the emulator branch. The master branch has a bug with the license file and doesn't add box86 and wine to systems in Retropie it also add wine as Port which makes it trickier to add roms. I noticed after copying the spacecadet.sh from the space cadet branch in retropie setup. After all that i deleted wine and box86 and reinstalled it from the emulator branch then i could finally start space cadet an it works :) at the beginning in a small screen and without sound but it worked.
        Don't know when the sound dissappeared but i had to do

        sudo apt -y purge "pulseaudio"
        

        then it worked again after reboot the little window problem was even easier just added

        -fullscreen
        

        to the end of the sh file in roms/wine folder

        M 1 Reply Last reply Reply Quote 0
        • M
          MumboJumbo @MumboJumbo
          last edited by

          Managed to get Starcraft(1.16.1) running by just copying the installed folder in wine/Files then adding starcraft.sh in wines folder. Now the Game start fails on first try but then it starts repeatable. So part success

          R ectoE 2 Replies Last reply Reply Quote 0
          • R
            retropi19 @MumboJumbo
            last edited by retropi19

            @mumbojumbo said in Box86 and Wine on RPi4:

            Managed to get Starcraft(1.16.1) running by just copying the installed folder in wine/Files then adding starcraft.sh in wines folder. Now the Game start fails on first try but then it starts repeatable. So part success

            I installed wine box and mesa from george script after when i run a game eg "age of empires2"
            Sometimes it has sound and some other times not
            I checked if pulseaudio is installed to remove it and its not installed,any suggestions what i do to have always sound?

            Rpi3B+ USB 2.0 Boot HDD Hitachi 40GB 5400rpm

            Rpi4 4GB rev1.4 USB 3.0 Boot HDD Hitachi 160GB 7200rpm

            1 Reply Last reply Reply Quote 0
            • ectoE
              ecto @MumboJumbo
              last edited by ecto

              @mumbojumbo That's very interesting! I tried it, too, but it isn't working for me.
              I downloaded Starcraft from battle.net (it's free and has a 32bit binary) transferred the folder to my pi and started it with starcraft/x86/starcraft.exe -launch.
              I tried that on my windows pc and starcraft can be started that way without battle.net login.

              So far I had no luck with wine 7.0, wine-staging 7.0 or wine-staging 5.15.

              So I assume it must be the version (mine might be 1.18). Could you please post the contents of your starcraft.sh file?

              Oh and also it's normal that you have to try to start wine games more than once. Idk why, but it's a common thing...

              M 1 Reply Last reply Reply Quote 0
              • M
                MumboJumbo @ecto
                last edited by

                @ecto the content of the starcraft.sh is:

                #!/bin/bash
                xset -dpms s off s noblank
                cd "/home/pi/RetroPie/roms/wine/Files/SC/"
                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/SC/StarCraft.exe' -fullscreen
                

                And for the failed start I set my Windows Version in winecfg to XP now it starts on first try

                ectoE 1 Reply Last reply Reply Quote 0
                • ectoE
                  ecto @MumboJumbo
                  last edited by

                  @mumbojumbo Thanks for the script! I doesn't look much different from my script... maybe I could try the -fullscreen switch, but I think it might be my newer version that doesn't start.
                  I'll try to look for a way to downgrade...

                  M 1 Reply Last reply Reply Quote 0
                  • M
                    MumboJumbo @ecto
                    last edited by

                    @ecto I now also tried the newer starcraft but i can't open too. It just crashes back to emulationstation.

                    i used this sh

                    #!/bin/bash
                    xset -dpms s off s noblank
                    cd "/home/pi/RetroPie/roms/wine/Files/StarCraft/"
                    matchbox-window-manager &
                    WINEDEBUG=+loaddll BOX86_LOG=1 LD_LIBRARY_PATH="/opt/retropie/supplementary/mesa/lib/" setarch linux32 -L /opt/retropie/emulators/wine/bin/wine '/home/pi/RetroPie/roms/wine/Files/StarCraft/x86/StarCraft.exe ' -launch -fullscreen
                    
                    ectoE 1 Reply Last reply Reply Quote 1
                    • ectoE
                      ecto @MumboJumbo
                      last edited by ecto

                      @mumbojumbo Thanks for trying! I downgraded to v1.16 and it works out of the box.

                      M 1 Reply Last reply Reply Quote 0
                      • M
                        MumboJumbo @ecto
                        last edited by

                        hmm is there a possibility to pass winEviroment (xp,2000) to wine from sh?

                        M 1 Reply Last reply Reply Quote 0
                        • M
                          MumboJumbo @MumboJumbo
                          last edited by

                          I tried wine"7.0.0.0" and mesa-21.3.6. The scripts were able to build by just replacing the version and Space Cadet and Starcraft(v1.16) are still working seems good so far

                          1 Reply Last reply Reply Quote 0
                          • D
                            dktpi
                            last edited by

                            https://github.com/Botspot/pi-apps
                            On there, there is a script for wine and box86.

                            1 Reply Last reply Reply Quote 0
                            • M
                              MumboJumbo
                              last edited by

                              Hey while playing around with Box and Wine i got some questions i am a noob but I hope someone can help. I use the retropie 4.71 image on a pi4.
                              How can I get information about the driver used from wine/box/xinit or are they all using the same ?

                              In Diablo 2 I can switch between glide, direct3d and ddraw. direct3d doesn't work, ddraw works fine but the aspect ratio doesnt fit in fullscreen tough i set xrandr to 800x600 i get the impression that xrandre ignores ddraw out because it works on glide but on glide there are graphical bugs and its all multicolored lines.....

                              In Starcraft there is also the problem with the aspect ratio seems to be also ddraw

                              Is there a possibility to force wine to emulate a screen with a matching ratio like 1600x900 or would this also be ignored by ddraw ?

                              And for D2 is there a possibility to get the glitvhes out of glide or is this sth the pi4 cant do?

                              ectoE 1 Reply Last reply Reply Quote 0
                              • ectoE
                                ecto @MumboJumbo
                                last edited by

                                @mumbojumbo If you search this thread, there is at least one post by me with a link to a quality of life mod for Diablo 2. You can use this to set up Diablo to use all kinds of resolutions (even widescreen).

                                The ddraw renderer is the fastest (cnc-ddraw, iirc). I'm using 960x540 and scale that to 1920x1080. This way it still looks like the old Diablo but in widescreen.

                                To use this renderer you have to copy the ddraw.dll of the cnc-ddraw to the base diablo 2 folder and set WINEDLLOVERRIDES=ddraw=n,b in front of your wine command line.

                                There might be further steps, but you can find them in the diablo 2 qol git.

                                M 1 Reply Last reply Reply Quote 0
                                • SuperFromNDS SuperFromND referenced this topic on
                                • M
                                  MumboJumbo @ecto
                                  last edited by

                                  @ecto puh still trying to get it running... don't know but opening with Plugy leads to crash. When I try in desktop i sometimes get a need CD window... but even with cd mounted it wont do... arg . Its also kind of strange the exe started in windows automatically with pluggy but when i start it on pi it wont use plugy and i get the normal stretched screen.

                                  ectoE 1 Reply Last reply Reply Quote 0
                                  • ectoE
                                    ecto @MumboJumbo
                                    last edited by

                                    @mumbojumbo You have to use a specific Diablo 2 version (1.13d). After you installed the QoL patch, you have to change the renderer to ddraw.

                                    You have to set your custom resolution in one of the .ini files, iirc. Probably in PlugY.ini, but I'd need to look that up, as I'm away from my Retropie.

                                    The game can then be started with the following command:

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

                                    I hope this helps a little.

                                    Ah, and one more important thing: When you have PlugY or any other mods enabled in Diablo 2 you should not play on Battle.net, as you might get banned! There is still the option to play on a private server, though. As I'm more of a single-player-guy, that never bothered me..

                                    M 1 Reply Last reply Reply Quote 0
                                    • M
                                      MumboJumbo @ecto
                                      last edited by

                                      @ecto hmm I was on 1.13c but I also found out that some plugins need dx10 or win7 my wineprefix is running on XP which is yours?

                                      ectoE 1 Reply Last reply Reply Quote 0
                                      • ectoE
                                        ecto @MumboJumbo
                                        last edited by

                                        @mumbojumbo I'm also using a XP prefix without any winetricks.
                                        I think only the preinstalled glide wrapper of the QoL patch is using dx10. That's why you have to change the renderer to ddraw (or use dxvk, which will not work on our pi4).

                                        At first try to get it running with ddraw. If that works you can still change the resolution and everything else.

                                        I remember that it took some time to get everything running, but eventually it will work! Have faith! ;)

                                        M 1 Reply Last reply Reply Quote 0
                                        • M
                                          MumboJumbo @ecto
                                          last edited by

                                          @ecto is there a glide wrapper using dx9?
                                          For now I got it running with D2SE and test each plugin. I have got the renderer on ddraw. I had a bug with plugy that when opening my character menu the game crashed in the logs there was sth with unimplemented opcode so i disabled the flag "ActiveDisplayBaseStatsValue" in Plugy.ini and now I can open it.

                                          • Plugy works with setting

                                          • cnc ddraw works too

                                          • D2Multi Res works too

                                          • with D2DX it directly crashed

                                          • with BaseMod it also directly crashed

                                          in D2SE i could check my open gl renderer I dont realy know what to do with this info but it said V3D 4.2

                                          ectoE 1 Reply Last reply Reply Quote 0
                                          • ectoE
                                            ecto @MumboJumbo
                                            last edited by ecto

                                            @mumbojumbo I have D2 also running with Svens Glide Wrapper (Glide -> Open GL). It arguably looks a bit better (pseudo 3d and better lighting/effects) but then again the framerate is only around 20 for me with 960x540.

                                            I have not gotten nGlide (Glide -> DX / Vulkan) wrapper to work. I have one other game that works with the obscure (?) OpenGlide wrapper but other than that, I had no luck with Glide at all so far.

                                            D2DX is for DirectX 11 and will not work without DXVK (and Vulkan for that).

                                            EDIT I think BaseMod is running for me... I really just dropped the whole QoL patch into my D2 folder and edited the settings.

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