• 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.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.
  • S
    shavecat @George
    last edited by 6 Mar 2021, 00:30

    @george
    Forget to reboot ;) haha sorry

    
    pi@retropie:~ $ uname -a
    Linux retropie 5.10.17-v7l+ #1403 SMP Mon Feb 22 11:33:35 GMT 2021 armv7l GNU/Linux
    
    

    will check tmrw the game again
    THANKS !! :))<3

    G 1 Reply Last reply 6 Mar 2021, 02:18 Reply Quote 0
    • G
      George @shavecat
      last edited by 6 Mar 2021, 02:18

      @shavecat Wow, it worked. First time for everything. Haha!

      S 1 Reply Last reply 6 Mar 2021, 10:59 Reply Quote 2
      • S
        shavecat @George
        last edited by shavecat 3 Jun 2021, 22:50 6 Mar 2021, 10:59

        @george
        Yes it did !
        but still the same output So didnt work :
        Will still love to see it works on my pi 4.
        Saw also Jazz 2 i working with wine , but didnt get that also working on my pi :\

        1 Reply Last reply Reply Quote 0
        • G
          George
          last edited by 10 Mar 2021, 20:04

          Update on my side. I've been converting my installation scripts from ports to an emulator script module. Everything on that end is going well. Programs can be added to EmulationStation either with a shell script (much like Ports), or a config file, if it's very simple.

          There are a couple of caveats:

          • Since Wine (and Box86) are "new" emulators, there is no entry for them in the existing themes, so while Wine will show up in Emulation Station, it's very difficult to select a "rom". Entries in all the themes will have to be created by their respective theme maintainers.
          • External repositories currently do not have the ability to have their own platforms.cfg file, which means that unless you edit the platforms.cfg file, Wine won't show up in EmulationStation, because there are no file associations. I think there's an easy way to accomplish a fix, but I've created a separate post to get feedback on the idea.

          On another note, I found that when I updated my system from Raspbian 5.4.83 to 5.10.17, it somehow broke PCM audio playback for SOME but not all games. Even more interesting is that on the games where PCM audio playback was broken, MIDI playback still worked. I'm still troubleshooting to see what changed that would effect audio. I'll also be testing out a couple of different emulators to see if this effected anything else. Hopefully not, as that would be a very large problem. I've seen another recent post about audio, so I'll be checking that out for some hints.

          - George

          P 1 Reply Last reply 10 Mar 2021, 20:36 Reply Quote 1
          • P
            pyramid_scheme @George
            last edited by 10 Mar 2021, 20:36

            thanks @george
            I'm just installing box86 now, I'd like to attempt running somme Taito Type X games – should that be possible? Can I use my regular USB joystick without any extra config?

            G 1 Reply Last reply 11 Mar 2021, 23:34 Reply Quote 0
            • G
              George @pyramid_scheme
              last edited by 11 Mar 2021, 23:34

              @pyramid_scheme I haven't tried any Taito Type X games, so I can't say for sure. I have read that even on a Windows XP machine there would be some work to do. A safe bet would be to try to install it in Wine on an X86 Linux machine. If you can get it to work there, then just copy the .wine directory over to your Raspberry Pi.

              1 Reply Last reply Reply Quote 0
              • G
                George
                last edited by 11 Mar 2021, 23:40

                Just a heads up. If you've done a sudo apt dist-upgrade recently, you may have been updated to the Linux kernel v5.10. Evidently there are still some issues with it, although it's still marked as stable. One issue that I and some others have seen is with audio not playing or stopping during the game. I do not know if there is a solution to the issue as of yet. I also don't know if it affects other emulators.

                You can tell what kernel version you have by doing:

                uname -a
                

                It may say something like 4.19 or 5.4 or 5.10. I downgraded my kernel back to 5.4.83 using the following command:

                sudo rpi-update 453e49bdd87325369b462b40e809d5f3187df21d
                

                That brought everything back to normal. The rest of my software packages remain the same.

                Hope that helps someone.

                - George

                S 1 Reply Last reply 12 Mar 2021, 00:01 Reply Quote 0
                • S
                  shavecat @George
                  last edited by shavecat 3 Dec 2021, 00:07 12 Mar 2021, 00:01

                  @george
                  Hey ,
                  Try to change the es_setings config

                  <string name="AudioCard" value="sysdefault" />
                  <string name="AudioDevice" value="HDMI" />
                  

                  After i did the update it happen to me too ... after a search here
                  that help's...
                  Using -

                  
                  pi@retropie:~ $ uname -a
                  Linux retropie 5.10.17-v7l+ #1403 SMP Mon Feb 22 11:33:35 GMT 2021 armv7l GNU/Linux
                  
                  
                  1 Reply Last reply Reply Quote 0
                  • V
                    vargasjj510
                    last edited by 26 Mar 2021, 00:58

                    Hello all. This sounds great! Do we have a pull (at least experimental) for us non-linux-script-coding savvy people? :)

                    S 1 Reply Last reply 5 Apr 2021, 21:14 Reply Quote 0
                    • S
                      shavecat @vargasjj510
                      last edited by 5 Apr 2021, 21:14

                      So most of the games
                      with wineexplore just give me black screen and go back to wine :(( ...
                      only got commandos 1&2 and the pinball runing :)

                      G 1 Reply Last reply 6 Apr 2021, 22:22 Reply Quote 0
                      • G
                        George @shavecat
                        last edited by 6 Apr 2021, 22:22

                        @shavecat I've seen some mention about Wine having problems changing screen resolution. Does it work when you use a script? Possibly also with using xrandr to manually set a resolution?

                        What games have you tried where you see this problem?

                        I've been a little busy with other projects, but at the moment I've been stuck on issues with Linux Kernel 5.10. Mostly audio issues, but I'm also finding some slowness happening, and wineserver not exiting after a game closes, making subsequent game launches have a problem. I've tried up to Wine v6.5 Devel, and it hasn't fixed the issue.

                        The latest release of Raspberry Pi OS contains the Linux Kernel v5.10 and also has the ability to do full KMS (kernel mode switching). I'm hoping that might improve the video capabilities to the point where we don't need a different Mesa driver. But the audio issue is causing the biggest headache right now.

                        - George

                        S 2 Replies Last reply 6 Apr 2021, 22:30 Reply Quote 1
                        • S
                          shavecat @George
                          last edited by 6 Apr 2021, 22:30

                          @george
                          Hey glad to hear from u again :))
                          and hope for the headache to go away and make it work !
                          so i try couple of games that u have like CaptinClaw and more also blip & blop (haha really old one and funny)
                          but still like black screnn and goes away
                          tried also with a script and all ... :\ pretty much give up on that

                          G 1 Reply Last reply 8 Apr 2021, 21:16 Reply Quote 0
                          • G
                            George @shavecat
                            last edited by 8 Apr 2021, 21:16

                            @shavecat Thanks for the reminder on Captain Claw. One thing I've found with running WIne through Box86 on Linux Kernel 5.10.x is that the wineserver processes as well as other wine related processes do not always exit after the main application that was running has been shut down. This includes even simple wine included apps like cmd.exe and winecfg. Then, when trying to run another application, it might not always launch completely. Sometimes you will just get a blank black screen. Killing wineserver with wineserver -k gets rid of everything and then I've been able to start up again. I'm continuing to investigate this issue and posted it to the Box86 community as well.

                            I was trying out a game called CityRacing, which people say is a really bad car racing game, but it still has a bit of a cult following. I originally had the game working, but without sound. After I installed additional Windows libraries, the game would no longer run. I'd get a blank screen and then get returned to EmulationStation (or Wine Desktop). Perhaps those are similar issues to what you are having.

                            One bit of good news is that I may have determined the cause of my audio issues and may have also resolved them. I added lots of logging parameters as per https://wiki.winehq.org/Sound and found that an ALSA buffer underrun was occurring on the games that had sound issues. Additionally, it would either occur at the start of running the application, or about 18 seconds after the application launched. No idea why that time frame. In Wine, the buffer underrun triggered an error message "XRun state, recovering"(https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/winealsa.drv/mmdevdrv.c#l2269), but sometimes did not always recover. Interestingly, it sometimes did recover, but I would hear an audible gap in the audio (also at about 18 seconds in). I might investigate that further, but then I saw this post (https://forum.winehq.org/viewtopic.php?t=32304), which indicated that perhaps installing some Windows libraries as native might help. Many games require some form of native Windows libraries as Wine's implementations are not always complete. I rechecked the logs and found that DSound was being used for PCM audio. I used Winetricks to install the Windows DSound DLL and so far the audio issues no longer occur. Well, the buffer underrun still occurs, but the program recovers from it. I'm continuing to test with fresh SD cards and fresh installs, as well as updates to Box86. Fingers are crossed!

                            So, a lot of text for a small update. Hope this is interesting for some.

                            - George

                            roslofR 1 Reply Last reply 28 Apr 2021, 03:58 Reply Quote 2
                            • G
                              George
                              last edited by 8 Apr 2021, 21:24

                              Forgot to mention, I've seen some intermittent high disk usage on Linux kernel 5.x, which seems to slow things down. I've installed iotop to try to determine what causes it, but it's usually just system processes like:

                              [jbd2/mmcblk0p2-]
                              [kworker/u8:1-ext4-rsv-conversion]
                              [kworker/u8:3+events_unbound]
                              [kworker/u8:4+flush-179:0]
                              [kworker/u8:2-brcmf_wq/mmc1:0001:1]
                              rsyslogd -n -iNONE [rs:main Q:Reg]
                              

                              There's no universal method that will work for everyone to tune these down to a minimum, but I've been looking at these posts for some inspiration. It might be helpful in the long run to minimize SD card writes.

                              • https://leszekjaskierny.wordpress.com/2017/01/26/minimize-sd-cad-usage-on-raspberry-pi/
                              • https://www.raspberrypi.org/forums/viewtopic.php?t=267561
                              • https://raspberrypi.stackexchange.com/questions/114153/raspberry-pi-3-high-io

                              - George

                              1 Reply Last reply Reply Quote 0
                              • G
                                George
                                last edited by 10 Apr 2021, 22:41

                                FYI: It seems that the Mesa drivers starting with mesa-21.0.0 have some kind of issue running on Raspberry Pi. I started getting errors like the following:

                                X Error of failed request:  GLXBadFBConfig
                                  Major opcode of failed request:  152 (GLX)
                                

                                Downgrading to mesa-20.3.5 resolved these issues. Again, this was using Linux Kernel 5.10.17, which I'm still continuing to test and troubleshoot, but I'm pretty confident that it will show up on previous kernel versions as well. I checked the Box86 Discord server and saw others have the same problem, with the same solution.

                                Hopefully the Mesa drivers in Raspbian OS will be updated, possibly with Full KMS so we can take better advantage of the Raspberry Pi 4's GPU.

                                - George

                                F 1 Reply Last reply 11 Apr 2021, 09:08 Reply Quote 1
                                • F
                                  Folly @George
                                  last edited by 11 Apr 2021, 09:08

                                  @george

                                  I am not using at the moment, very busy with other things.
                                  I see you do a lot work on it. 👍
                                  I hope you will find the thing to fix it all.

                                  Regards

                                  G 1 Reply Last reply 13 Apr 2021, 09:11 Reply Quote 0
                                  • G
                                    George @Folly
                                    last edited by George 13 Apr 2021, 09:11

                                    Thanks for the encouragement and support @folly!

                                    I narrowed down the issues I was seeing with wineserver not terminating after a program completed. I brought it up on the Box86 Discord channel and got a reply back from ptitSeb saying that the shutdown sequence in Box86 is still problematic. At least he's aware of it and I'm sure if he'll be able to find a solution eventually.

                                    My current workaround for the issue is to use a slightly older version of Box86. On March 25, there was a commit (https://github.com/ptitSeb/box86/commit/bc198c37d7460c95cd0047f0cc1fd1234b898dc7), labelled "Improve shutdown sequence". At this commit, the issues with wineserver not terminating start. Prior commits to this I don't seem to have any issue with wineserver terminating after any app that I'm running ends.

                                    I should note that my solution may not work for everyone seeing the issue and that everyone may not actually see the issue. Some apps seem to work fine, but I saw the issue with Winetricks, Space Cadet 3D Pinball, and even just running the Wine Desktop.

                                    - George

                                    1 Reply Last reply Reply Quote 1
                                    • F
                                      Folly
                                      last edited by Folly 14 Apr 2021, 07:45

                                      @george

                                      Perhaps you are interested.

                                      A while back we talked about external repositories.
                                      I have made a gui module-script that can add some external repositories.
                                      Goal is to make it easier to get module-script that are not yet in the original RP-Setup.
                                      It will download the scripts if not in the original RetroPie-Setup and add them into ext path into appropriate directories.
                                      After that it also refreshes, so you can go back to the normal setup and install.
                                      This will help to use the the module-scripts from forks and other repositories.
                                      Can you take a look at it ?
                                      What do you think, would it be useful ?

                                      So basically if you select your repository it will only get the box86wine things and place them in an ext path. (if the module-scripts are not in the original RP-Setup)

                                      This pushes add-ext-repos.sh directly in the ext directory :

                                      mkdir -p /home/pi/RetroPie-Setup/ext/RetroPie-Share/scriptmodules/supplementary
                                      curl https://raw.githubusercontent.com/FollyMaddy/RetroPie-Share/main/00-scriptmodules-00/supplementary/add-ext-repos.sh > /home/pi/RetroPie-Setup/ext/RetroPie-Share/scriptmodules/supplementary/add-ext-repos.sh
                                      
                                      

                                      Select -> Configuration / tools -> Add-ext-repos (at the bottom)

                                      2021-04-13-222820_1600x900_scrot.png

                                      G 1 Reply Last reply 19 Apr 2021, 06:54 Reply Quote 2
                                      • S
                                        shavecat @George
                                        last edited by shavecat 18 Apr 2021, 22:27

                                        @george
                                        Can u Try
                                        Hunter Hunted ?
                                        use to love this game so much ! :)
                                        Still not really works well on my side :'((

                                        And i Got and Error from Jazz 2
                                        that my Resolution is not 640x480 or 800x600.
                                        In the WineExploere
                                        Can i change the resolution in there ???? the Display ????
                                        maybe that will fix my problem ( of the black screen go in and back to the wine)

                                        THANKS !!! <3

                                        1 Reply Last reply Reply Quote 0
                                        • G
                                          George @Folly
                                          last edited by 19 Apr 2021, 06:54

                                          @folly that's a cool script. Seems like something RetroPie should have if it's considering making external repositories a fully supported feature. They could list out popular repositories and let the user add their own.

                                          It might be useful if you pointed to my repo at:

                                          https://github.com/GeorgeMcMullen/rp-box86wine

                                          That has just the scripts that are required for Box86/Wine. That way, users won't get messages saying that there are duplicate scripts.

                                          Other than that, you should make a post in the "Ideas and Development" forum to suggest a script like yours, or that your script be added to RetroPie.

                                          Nice work!

                                          - George

                                          F 1 Reply Last reply 19 Apr 2021, 17:57 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.

                                            [[user:consent.lead]]
                                            [[user:consent.not_received]]