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 240.6k 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.
    • F
      Folly @George
      last edited by Folly

      @george said in Box86 and Wine on RPi4:

      Wow @mth75 and @Folly, you guys have been busy! Awesome stuff! It's so cool to see how you've gotten so many things running in such a short time.

      Cool, isn't it. I see the amazing possibilities here !
      This is quite impressive, what we all, including you, have done !

      I chose to fix Space Cadet itself by editing the binary so that it would open the MIDI file as ELEMENT instead of TYPE and use the proper Element Name pointer. There's a lot more technical detail in decompilation, how I found the pointer, and then how I made the change that would probably be better posted in an article than a forum post. Now my task is to figure out the best way to propogate this fix. I'd rather not be responsible for putting another copy of the software out into the wild, as it is copyrighted.

      Do you know about IPS patches ?
      You can create one without having to worry about copyrights.
      You then just share the differences you made.

      I already have some in this repository :
      https://github.com/FollyMaddy/RetroPie-Share

      You can patch or create from files up to about 7Mb.
      I am using this :
      https://github.com/kylon/Lipx
      Just run this to see the help :
      ./lipx.py

      Regarding making it easier to add software. I admit, I don't have a perfect answer. A script that creates ports could work. Alternatively, if Wine were registered as an emulator instead of a Port, then some other kind of scripts could be added in its "ROMS" directory, though you'd still need to create them. Finally, I thought perhaps one could link directly to the Start Menu items in the Wine Prefix directory. Then any software that gets installed using the standard Windows mechanisms would be automatically accessible from within EmulationStation. But this might not cover different Wine Prefix directories. This requires some investigation though and feedback from the RetroPie maintainers.

      Perhaps we get a good idea along the way.
      Indeed, your idea to link to the start menu, could be a nice solution.

      Have a look here, perhaps you get some inspiration from this too :
      https://github.com/FollyMaddy/RetroPie-Share/tree/main/00-scripts-00
      Like you said, creating scripts is one of the possibilities here.

      Or exporting *.exe as a string to a standard bash starter, could also be an idea.

      @Folly, thanks for the suggestion for Road Fighter. That might do the trick, though it crashes for me when going into Player Keys. Do you see the same issue?

      No crash here, I tested this menu for you.

      Did you see the top of the webpage ?
      There are more games you can choose from.
      Perhaps one of them wil do.

      See here for updated nightlies (seems only source):
      https://braingames.jorito.net/nightlies/

      Thanks again for all the feedback and challenges you've gone through.

      - George

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

        @georgeRe: Box86 and Wine on RPi4

        Where to begin :-). @George Indeed, I didn't missed the music, I couldn't even remember the music, at least not in the Win95 version. I'm interested in the patch though! Why not publish the patch on GitHub?

        Regarding install scripts, I don't think any script in order to install Windows applications is feasible (at all). I suspect everyone who want to use the Box86/Wine combo just has to create his own bottles on a another machine and has to do some manual labour.

        Regarding the C= Plus/Pi4, here some techporn: https://retropie.org.uk/forum/topic/25090/commodore-plus-4-rpi4-build-ready?_=1610376894522

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

          @folly said in Box86 and Wine on RPi4:

          Perhaps we get a good idea along the way.
          Indeed, your idea to link to the start menu, could be a nice solution.

          Wouldn't this imply 1 bottle for all games? I don't think that would work. I believe most games would need their own bottles (which also creates a 1GB overhead if i'm not mistaking).

          F 1 Reply Last reply Reply Quote 0
          • F
            Folly @mth75
            last edited by Folly

            @mth75 said in Box86 and Wine on RPi4:

            @folly said in Box86 and Wine on RPi4:

            Perhaps we get a good idea along the way.
            Indeed, your idea to link to the start menu, could be a nice solution.

            Wouldn't this imply 1 bottle for all games? I don't think that would work. I believe most games would need their own bottles (which also creates a 1GB overhead if i'm not mistaking).

            I don't think so.
            But then again I don't have that much knowledge about wine.
            So if you know, then, indeed, it seems not the right path to take.

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

              @Folly , thanks for the info on patches, seems to be close to what I'm looking for, if not exactly. Cross-platform is definitely a plus.

              @mth75 The C= Plus/Pi4 is beautiful on the inside as well as the outside. Gorgeous job!

              EmulationStation can handle sub-directories, so it is feasible to have multiple wine prefixes in a single ROM directory. Of course, a Windows Start menu also has its own sub-directories, so that would then require people to hunt through multiple directories in order to find the game they are looking for. Even though some people have thousands of ROMs to sift through, it's a little easier when they are in a single, alphabetized list!

              - George

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

                @george said in Box86 and Wine on RPi4:

                EmulationStation can handle sub-directories, so it is feasible to have multiple wine prefixes in a single ROM directory. Of course, a Windows Start menu also has its own sub-directories, so that would then require people to hunt through multiple directories in order to find the game they are looking for. Even though some people have thousands of ROMs to sift through, it's a little easier when they are in a single, alphabetized list!

                I made Wine prefixes and placed them in a Box86 Romfolder (so I adjusted the locations in your example script). I think this indeed is more in the "spirit" of retropie.

                @Folly see screenshot

                I 4d2eea5b-d17d-4d93-8fe4-b20fbc96ff1f.jpg

                F 1 Reply Last reply Reply Quote 0
                • F
                  Folly @mth75
                  last edited by Folly

                  @mth75 said in Box86 and Wine on RPi4:

                  @george said in Box86 and Wine on RPi4:

                  EmulationStation can handle sub-directories, so it is feasible to have multiple wine prefixes in a single ROM directory. Of course, a Windows Start menu also has its own sub-directories, so that would then require people to hunt through multiple directories in order to find the game they are looking for. Even though some people have thousands of ROMs to sift through, it's a little easier when they are in a single, alphabetized list!

                  I made Wine prefixes and placed them in a Box86 Romfolder (so I adjusted the locations in your example script). I think this indeed is more in the "spirit" of retropie.

                  Nice !

                  Can you give an example of a prefix ?

                  Does this prefix run the game directly or does it run a bash file from somewhere else ?

                  What is your rom folder now ?
                  /home/pi/RetroPie/roms/Box86
                  or
                  /home/pi/RetroPie/roms/ports/Box86

                  M 2 Replies Last reply Reply Quote 0
                  • M
                    mth75 @Folly
                    last edited by mth75

                    @folly said in Box86 and Wine on RPi4:

                    What is your rom folder now ?
                    /home/pi/RetroPie/roms/Box86

                    Indeed, /home/pi/RetroPie/roms/Box86/<Game folder> is my rom folder.

                    The <Game folder> is my wineprefix for example:

                    <Game folder>
                    -- dosdevices
                    -- drive_c
                    --- system.reg
                    --- user.reg

                    etc.

                    F 1 Reply Last reply Reply Quote 0
                    • M
                      mth75 @Folly
                      last edited by

                      @folly said in Box86 and Wine on RPi4:

                      Does this prefix run the game directly or does it run a bash file from somewhere else ?

                      I use the scripts from George, with only the game locations adjusted to the /home/pi/RetroPie/roms/box86/ folder.

                      I'm planning to look into making it somewhat easier in the near future.

                      shavecatS 1 Reply Last reply Reply Quote 0
                      • shavecatS
                        shavecat @mth75
                        last edited by shavecat

                        Hey all
                        I have Shovel Knight/unepic /Worldofgoo/Postal1/crimsonland runing on the box86 too.

                        And can i have more Info plz ,
                        How to run
                        Commands or AOE2 ?
                        plz
                        Got lost here abit :)

                        M F 2 Replies Last reply Reply Quote 0
                        • M
                          mth75 @shavecat
                          last edited by

                          @shavecat said in Box86 and Wine on RPi4:

                          ey all
                          I have Shovel Knight/unepic /Worldofgoo/Postal1/crimsonland runing on the box86 too.
                          And can i have more Info plz ,
                          How to run
                          Commands or AOE2 ?
                          plz
                          Got lost here abit :)

                          The way I did it. I'm running a separate Raspian OS (LXDE desktop) and installed both Box86 and Wine in order to make the wine_prefixes.

                          I compiled Box86: https://github.com/ptitSeb/box86/blob/master/COMPILE.md

                          or you could install Box86 with Pi Apps.

                          Then I installed Wine:

                          Download Wine

                          cd ~/Downloads
                          wget https://dl.winehq.org/wine-builds/debian/dists/buster/main/binary-i386/wine-devel-i386_5.22~buster_i386.deb
                          wget https://dl.winehq.org/wine-builds/debian/dists/buster/main/binary-i386/wine-devel_5.22~buster_i386.deb
                          dpkg-deb -xv wine-devel-i386_5.22~buster_i386.deb wine-installer
                          dpkg-deb -xv wine-devel_5.22~buster_i386.deb wine-installer

                          Install Wine

                          sudo mv wine-installer/opt/wine-devel ~/wine
                          sudo ln -sf ~/wine/bin/wine /usr/local/bin/wine
                          sudo ln -sf ~/wine/bin/winecfg /usr/local/bin/winecfg
                          sudo ln -sf ~/wine/bin/wineserver /usr/local/bin/wineserver

                          Boot wine

                          wine wineboot

                          Download Winetricks

                          cd ~/Downloads
                          wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks

                          Install winetricks

                          sudo chmod +x winetricks
                          sudo cp winetricks /usr/local/bin

                          winetricks needs this installed

                          sudo apt-get install cabextract -y

                          #Run Winetricks
                          BOX86_NOBANNER=1 winetricks dotnet20sp2

                          Furthermore I installed Q4Wine with the Add/Remove package manager from Raspbian OS (to easily create wine_prefixes (Bottles)).
                          or

                          you could use winetricks with the following command:

                          BOX86_NOBANNER=1 winetricks --gui.

                          Then, I copied the wine prefixes to my RetroPie machine (see the rest of this topic for how to use the wine_prefixes).

                          shavecatS 1 Reply Last reply Reply Quote 1
                          • shavecatS
                            shavecat @mth75
                            last edited by shavecat

                            @mth75
                            Thanks a LOT !!!
                            doing it now .
                            After the boot wine i got this -

                            pi@retropie:~/Downloads $ wine wineboot
                            Box86 with Dynarec v0.1.5 1e20a9ef built on Nov 14 2020 01:22:25
                            Box86 with Dynarec v0.1.5 1e20a9ef built on Nov 14 2020 01:22:25
                            Box86 with Dynarec v0.1.5 1e20a9ef built on Nov 14 2020 01:22:25
                            0024:err:environ:run_wineboot failed to start wineboot c000007b
                            wine: could not load kernel32.dll, status c000007b
                            

                            Thats OKAY ???

                            After that how can i run the games ?
                            like with exe file form sh file ???
                            now think im lost a bit ;

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

                              @shavecat said in Box86 and Wine on RPi4:

                              OKAY ???
                              After that how can i run the games ?
                              like with exe file form sh file ???
                              now think im lost a bit ;

                              No, that's not okay. Check your file permissions/ownership?

                              you can start simply (if your install is ok) with: wine <gamename>.exe

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

                                @mth75 Btw, that's an old Box86 version, my Dynarec version on the Pi400 Desktop is v0.1.9.

                                shavecatS 1 Reply Last reply Reply Quote 0
                                • shavecatS
                                  shavecat @mth75
                                  last edited by shavecat

                                  @mth75
                                  How do i do that ? (Check your file permissions/ownership?) where and how ?
                                  im using putty on retropie 4.6 and i have pi4 2gb.
                                  So thats mean i can do an .sh file from ports in retrpoie with
                                  wine<gamename>.exe
                                  and it will work ??? :):):):)):):)<3<3<3<3(SOUNDS AMIAZING ! )

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

                                    @shavecat

                                    Sorry mate, can't advise your there except:

                                    1. make sure to install box86 and wine maybe on a clean system.
                                    2. try to install an easy game for test purposes, maybe Space Cadet 3D pinball
                                    3. and build further ... with all of the above ...
                                    1 Reply Last reply Reply Quote 0
                                    • F
                                      Folly @mth75
                                      last edited by Folly

                                      @mth75 said in Box86 and Wine on RPi4:

                                      @folly said in Box86 and Wine on RPi4:

                                      What is your rom folder now ?
                                      /home/pi/RetroPie/roms/Box86

                                      Indeed, /home/pi/RetroPie/roms/Box86/<Game folder> is my rom folder.

                                      The <Game folder> is my wineprefix for example:

                                      <Game folder>
                                      -- dosdevices
                                      -- drive_c
                                      --- system.reg
                                      --- user.reg

                                      etc.

                                      OK, I understand how you do it, I think.
                                      But now I wonder, does this also work if you run emulationstation from your "cli" instead of the "Desktop" ?
                                      Because it needs to run xinit to display it all in te terminal/cli enviroment.
                                      The ultimate goal is that it's working in standard "RetroPie".

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

                                        @folly said in Box86 and Wine on RPi4:

                                        OK, I understand how you do it, I think.
                                        But now I wonder, does this also work if you run emulationstation from your "cli" instead of the "Desktop" ?
                                        Because it needs to run xinit to display it all in te terminal/cli enviroment.
                                        The ultimate goal is that it's working in standard "RetroPie".

                                        I'm running EmulationStation as part of a "standard" RetroPie image (so no LXDE Desktop installed) on my Pi4 build. I just build the packages (wine_prefixes) on my Pi400 (Raspbian OS/LXDE with no RetroPie/ES installed).IMG_1321.jpg

                                        F 1 Reply Last reply Reply Quote 1
                                        • F
                                          Folly @shavecat
                                          last edited by Folly

                                          @shavecat said in Box86 and Wine on RPi4:

                                          Hey all
                                          I have Shovel Knight/unepic /Worldofgoo/Postal1/crimsonland runing on the box86 too.

                                          And can i have more Info plz ,
                                          How to run
                                          Commands or AOE2 ?
                                          plz
                                          Got lost here abit :)

                                          I am doing it different than @mth75.
                                          I just used the scripts from @George to install it all.

                                          To make it simple just use the repository of George instead or the original.
                                          I rename your old setup directory !

                                          Then install it with these commands :

                                          cd
                                          git clone --depth=1 https://github.com/GeorgeMcMullen/RetroPie-Setup.git

                                          edit: goto https://retropie.org.uk/forum/topic/28528/box86-and-wine-on-rpi4/77

                                          And then just install it from the Retropie-setup in this order :
                                          (information from the pull request from George)
                                          The scripts must be run in order, and they will check to make sure the preceding dependencies have been met.

                                          mesa.sh - This is an updated Mesa driver, which is required by Box86. The version that is installed with the RetroPie distribution is not yet compatible.
                                          box86.sh - This is set as an emulator because it is.
                                          wine.sh - This is the x86 version of Wine and requires box86 in order to run. It is installed as a Port, because as the name says, Wine Is Not an Emulator.
                                          spacecadet3dpinball.sh - This is the original Windows XP game, hosted on the Internet Archive. It is also installed as a Port as it is more like a rom and not an emulator. It is included mostly as a reference to installing other games. One note - you must not hit the Escape key to quit or you will be in a hung state in the game. Use Alt-F4 instead.

                                          If it works, then you can try different stuff.

                                          shavecatS 1 Reply Last reply Reply Quote 1
                                          • F
                                            Folly @mth75
                                            last edited by

                                            @mth75 said in Box86 and Wine on RPi4:

                                            @folly said in Box86 and Wine on RPi4:

                                            OK, I understand how you do it, I think.
                                            But now I wonder, does this also work if you run emulationstation from your "cli" instead of the "Desktop" ?
                                            Because it needs to run xinit to display it all in te terminal/cli enviroment.
                                            The ultimate goal is that it's working in standard "RetroPie".

                                            I'm running EmulationStation as part of a "standard" RetroPie image (so no LXDE Desktop installed) on my Pi4 build. I just build the packages (wine_prefixes) on my Pi400 (Raspbian OS/LXDE with no RetroPie/ES installed).

                                            Thanks for explaining.
                                            Now I know that this could be a good standard solution.

                                            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.