Box86 and Wine on RPi4
-
@ecto It might be possible to run Model 2 Emulator, but since it's a relatively recent WIndows program, it might not run fast enough to be playable.
With regards to MAME, I found that the more recent versions of SDL show a major performance increase making some games that were not previously playable in the latest versions of MAME play quite nicely. Here's a post I did about that.
https://retropie.org.uk/forum/topic/28362/enhanced-performance-of-mamedev-mame-in-x11
Hope that helps.
- George
-
@george Thanks for your input. That's a very interesting topic! I have Dosbox (and Dosbox-Staging) run with
XINIT
and have definitely performance gain from that, but I don't know the cause.
I will definitely look into Mame-dev at some point.What equivalent of an Intel or AMD processor would you think the RPi4 can run using Wine or Box86?
-
@george
Ahoy again .
So I am testing with a desktop environment pixel installed now.
SUCCESS
What I did in this order
-install fresh retropie
-install lightdm and pixel
-followed my above "how to"Gonna try and install pixel on other card I have full of mugens and your scripts loaded up.
Will be doing speeds before installing with same mugens and settings.
That way we have no desktop vs desktop installed test as well .
UpDATE
I installed pixel on sd with mugens and script . It stops some from launching and slowed all way down .
Same file on new sd card doesn't have that issue at all. I have pixel on new sd as well. Just installed before your scripts . -
@ecto I can't really say what processor such as Intel or AMD would be equivalent of an RPI4. I think there are several variables. Whereby the ARM processor in the RPI4 might be as powerful as a processor from about 2005 (I get pretty good performance of some games from that time period), the GPU is probably more advanced than those of the era. I think that's part of the success of Box86 - emulate as little as possible, dynamically recompile what it can, push library calls to the native system, and use the power of the current GPU vs. trying to pipe things through software.
@Troopaking , speaking of piping things through software, on the platform that is slow, am I correct in understanding that Pixel was installed AFTER everything else. In a command line can you do:
dpkg -l | grep -i fbturbo
My suspicion is that the LLVM Pipe software renderer got installed again and it slows everything down.
- George
-
@george correct very slow when pixel installed after everything else . Thanks for possible solution .
I am testing on a few builds with desktops on em now . We will see what happens.
UPDATE
Worked on a full build with pixel installed.
Issues happened
skifree exited but didn't return to retropie menu . Just black screen o death
Didnt workon some displays .Anyway to change the wine resolution to match the TV? In a arcade cabinet for example .
-
@troopaking I believe you may want to try changing the resolution of the desktop session before launching Wine, so that it matches the resolution that the game expects to be in. I don't think Wine / Box86 handles resolution changes very well just yet. In your script that launches the game, you could add a line for
xrandr
to set the resolution before launching wine, and then use it again to reset it back to the proper resolution.- George
-
@george
Ahoy .
So I have had great success on many builds with mugen.
Only issue ive come across
-box86 error retropie has to be 4.7.1(or 4.7.something don't remeber exactly)
-if gpu memory is too low will not work.
-i can't get .sh to work at all . Testing now by copying winedesktop.sh and changing directories .I am now working on launching joy2key on wine boot/same time as mugen/before mugen.
I have successfully installed it on wine installer and desktop mapped xbox controller great . Just need to start with wine now :) -
@troopaking that GPU memory tip is good. I will have to try that if I ever have an issue with a game not running.
I wonder if perhaps you might need to do a
chmod a+rx SCRIPTNAME.SH
in order to make it work. You may have already done it, but worth checking.- George
-
@george .
Hello so I can start the .sh fine but it won't open mugen.
Error "cant open mugen.cfg ". Seems .conf works better for me .
Also another person using scripts cant open .conf . Hes is sure he ran chmod+x on em.
Also for everyone reading this doesn't work on a 64 bit environment box86 is useless like that . -
I got the conf file method working by removing the "OPTIONS=**" from the file. It was causing a malformed command line to be passed to wine.
-
@russellb uh the .conf works fine for me with options in it.
Problem is .sh I can launch it bit it wont open mugen says error unable to open mugen.cfg.
Seems the .conf works better than .sh simpler I guess dont know for sure why -
@troopaking said in Box86 and Wine on RPi4:
Also for everyone reading this doesn't work on a 64 bit environment box86 is useless like that .
True. ptitSeb did just release Box64, but vice versa that won't work on a 32 bit system. Plus you would need to use a 64 bit Wine, and that won't work with 32 bit applications, etc.
I'm puzzled by the error you are seeing (
can't open mugen.cfg
). If you have the same directory listed in the conf file and sh file then it should work the same. I also presume that mugen.cfg is in the same directory where the exe is. You might be able to do some additional debugging by inserting a couple of lines like this and see the log output matches your expectations:pwd ls -al
@RussellB if you had a line that said
OPTIONS=**
then that would likely throw some kind of error because * is the file wildcard. -
@george
Yeah I'm puzzled as well. .conf works fine but not .sh same files same directories etc
.sh loads wine fine starts to open then says cant open mugen.cfg. with simpler games yo opens fine . Example skifree.sh plays fine.
.conf takes a min to load but works great. I have started in wine desktop same load time .
Maybe .conf is better than .sh ? I am unsure .So I modified a few things for better playing experience .
Changes/modifications
-changed wine default to windows 8
-set pi gpu memory to 128. Tested vs 256, 128 gave me more frames per second.
-installed joy2key to map keyboard to controller. Controller preferred by some. Installed through wine config. Seems hard to launch same time with .conf as you said . But cant get .sh to work . So been looking into wine programs at boot. Hard to transfer to pi wine
-told wine that my pi has max video memory 1028 (I think), in winetricks . -
@troopaking I guess other things you might be able to try are removing the
cd
command from the.sh
file or setting it to the location of the Wine prefix (like/home/pi/.wine/drive_c/
or something).Really appreciate the times on the GPU and max video memory. Those are going to be interesting to test out.
For joy2key, what you could try to do is edit the
Wine Desktop.sh
file and add the command you need. Maybe around line 80? I've never been able to get Wine to launch a Windows program when it starts up using any of the usual Windows methods, like Startup folder, etc. From my own investigation, it seems Wine doesn't utilize those standards.- George
-
@george said in Box86 and Wine on RPi4:
@troopaking said in Box86 and Wine on RPi4:
Also for everyone reading this doesn't work on a 64 bit environment box86 is useless like that .
True. ptitSeb did just release Box64, but vice versa that won't work on a 32 bit system. Plus you would need to use a 64 bit Wine, and that won't work with 32 bit applications, etc.
I'm puzzled by the error you are seeing (
can't open mugen.cfg
). If you have the same directory listed in the conf file and sh file then it should work the same. I also presume that mugen.cfg is in the same directory where the exe is. You might be able to do some additional debugging by inserting a couple of lines like this and see the log output matches your expectations:pwd ls -al
@RussellB if you had a line that said
OPTIONS=**
then that would likely throw some kind of error because * is the file wildcard.Yeah what it was doing was including all the directories in the specified mugen folder into the command line to wine. So you ended up with something like mugen.exe char data ... in the wine command that was breaking it.
Now I just need to code the escape key to a button in wine and I'll be a happy camper.
-
@russellb escape key is why we are trying to autostart joy2key that escape is left bumper for example .
George from my testing 128 gpu memory is best performance .
I'm working with a guy to write a modified version of yourscriot that installs all mugens, changes gpu, install your script and makes mugen launch files . -
@troopaking Yeah as we have discussed I tried to get a joy2key windows-based program running and I succeeded but I can't find out a way to "autostart" WITHIN the wine environment. Looks like it will have to be setup before starting wine.
-
@russellb
If you install thru wine .
Open wine desktop then joy2key then mugen works great.
But thats not what we want lolUpdate
Success kinda If you addWINEDEBUG=-all LD_LIBRARY_PATH="/opt/retropie/supplementary/mesa/lib/" setarch linux32 -L /opt/retropie/emulators/wine/bin/wine '/path/to/joykey' &
To .sh above skifrees launch script. It opens both fine .
Unfortunately thier were issues
-exiting problem. Solved below
-and I still get same mugen error
-I have two windows one wine tray the other skifree . Works if ya click on joy2key make sure controller is registered then click skifree.Exiting problem solved joy2key has a option "minimize instead of close when x is pressed" disable this option returns to retropie fine .
-
Success with a different method.
How to
1.Install qjoypad
Sudo apt-get install qjoypad
2.Configure qjoypad in Linux desktop . Pretty self explanatory.
3. Edit .sh script.
Add this line before game script line
qjoypad &Should work off rip that like did for me .
But I still have same mugen error .
I need to figure out why mugen doesn't work with .sh for me .
When I run the commands in terminal on desktop I get root access error it seems . -
@troopaking root access error? Could it possibly be an ownership or permissions error? Check to see what user owns the application, directories, and config files. They should be owned by
pi
.But I'm not sure this would explain why the
.conf
method is working and the.sh
method is not.- George
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.