Box86 and Wine on RPi4
-
I've submitted a pull request. See here:
https://github.com/RetroPie/RetroPie-Setup/pull/3285
Specifically, you'll want to look at the files committed in:
The best way to know something is going to work in Wine is to try it out on an x86 Linux box with Wine. Wine also has an App DB for users interested in learning how to play a particular game with Wine.
For Box86, there's a compatibility list that might help as well.
https://github.com/ptitSeb/box86-compatibility-list/issues
Enjoy!
- George
-
@george Great work mate. I wil start testing tonight. In the meantime I made some wine prefixes on a Raspbian OS installation (Comandos 1, Age of Empires 2, Settlers 3 etc).
Question, why wouldn't you chose to install Box86/Wine as a separate system, much like for example DosBox/PC.
Second question, does your script support wine_prefixes (bottles so to speak?). When I look in the scripts I believe it does?
I do hope you keep developing! Thx
-
Quite amazing.
You nailed it, Nice job !I tested your scripts and pinball is working.
I had a few problems installing it all, but I think it's not because of your scripts.
I had these problems :- the source of mesa wasn't downloaded at first. (perhaps a bad internet connection, I don't know) ( I updated and upgraded my system manually, then the second time it worked but it took quite some time)
- Box86 installed very fast !
- Wine installed, but got stuck in configuring for an hour. So I terminated it, and then installed pinball. ( perhaps I had too little space on my sd card) (For others, make sure you have at least 3GB of free space available)
- Pinball installed very fast. It works very good, but the sound is not optimal yet.
-
Awesome @Folly and @mth75, hope you enjoy it!
I forgot to mention that you need to make sure your system is using RetroPie 4.7.1 and is up to date before you attempt to run installation. Either from RetroPie Setup or the command line:
sudo apt update sudo apt upgrade
This is probably why it didn't run successfully the first time.
@Folly some responses:
- Mesa will take a decent amount of to compile, but should be done in under an hour. Maybe even 20 minutes.
- Box86 should compile pretty quickly. Amazing since it is so powerful and yet quite small.
- The configuration of Wine basically runs winecfg from the command line. I haven't seen it getting stuck for an hour, so if it does, I would just terminate it and run Wine Config from EmulationStation.
- I've noticed the audio issue with Pinball as well. I'm not sure how to fix it yet though. The music will not play due to a bug that has been filed with Wine (but may actually be a bug with Space Cadet). The fact that the sound effects are strange is either to do with Alsa or WaveMix in Windows. Not sure yet. Space Cadet is kind of notorious for having a sloppy code base though.
- Make sure you use Alt-F4 to quit Space Cadet. Hitting Escape will hang the app for some reason with a blank screen.
@mth75 to answer your questions:
- I chose to place Box86 and Wine as a Port instead of its own system mostly because Box86 can be used for Linux x86 games and I think it's up for discussion on how to deal with their installation. For Wine, it's not an emulator by definition, as DosBox is. Further, both Linux and Windows executables are not as neatly packaged as ROMs are for most other emulators.
- I should also note that I've just used the default Wine Prefix location (~/.wine/) and not a special location in the ROMs directory like other emulators.
- You should be able to use other Wine Prefixes with a command line option in your own scripts without a problem, though I haven't tested it out myself.
Let me know if you have any other questions! Thanks again!
- George
-
Looks like I was able to improve the sound output for Space Cadet 3D Pinball with some configuration changes. This was a good resource for information https://www.compuphase.com/wavemix.htm. I'll see how to add this to my script, but in the mean time, you can check out the configuration file:
wavemix.inf
which is in the Space Paranoids directory.You may need to change the permissions on the file as for some reason it's being set as non-writable. You can do this with the following commands:
cd "/home/pi/.wine/drive_c/Program Files/SpaceCadet3DPinball" chmod u+w wavemix.inf
Here's the configuration file I'm using. Let me know if you have any suggestions.
[general] ; if ShowDevices exists and is non-zero then will display wave out devices and other stuff ; ; ShowDevices=0 : default ; ShowDevices=1 : show output from waveOutGetDevCaps ShowDevices=0 ; if WaveOutDevice exists it should be between zero and one less num devices ; the default is WAVE_MAPPER ; ; WaveOutDevice=0 : use the first device (default) ; WaveOutDevice=1 : use the second device ; WaveOutDevice=-1: use WAVE_MAPPER (will use [Unknow Device] setttings) ; ; WaveOutDevice=0 ; Wavemix will detect if it is running on a 286 and not use any 386 instructions ; you can force it to use the 286 only code on a 386 by setting cmixit=1 ; cmixit=0 (default) ; cmixit=1 uses only 286 code (even on a 386 or >) [default] ; Remix=1 = ResetRemix() ; Remix=2 = NoResetRemix() ; default=1 Remix=2 ; GoodWavePos=0 = uses timeGetTime() (default) ; GoodWavePos=1 = uses waveOutGetPosition() GoodWavePos=1 ; WaveBlocks=# (2<=#<=6) the number of ping pong buffers to use ; default=3 WaveBlocks=6 ; WaveBlockLen=# min = 512 max = 4096 ; if a number is not specified Wavemix.dll will try to determine a size ; WaveBlockLen=688 ; SamplesPerSec=11 (11.025 Khz) (default) ; =22 (22.04 KHz) ; =44 (44.1 KHz) SamplesPerSec=44
The biggest change was changing [WinNT:default] to just [default]. For some strange reasons, it wasn't detecting the WinNT part.
Enjoy!
- George
-
@george Installing the scripts was without any problems. I installed on a freshly installed RetroPie image and updated it all ... to 4.7.2 (I didn't read your reply above).
The only problem I encountered was that none of the Wine related apps or Space Cadet worked ... due to wrong ownership (in and on the .wine folder (root instead of pi)). Having fixed that manually ... it works!
-
Ok, I updated the Space Cadet script module with the improved audio configuration. It's automatically added to the pull request, but you can see it directly here:
- George
-
@mth75 said in Box86 and Wine on RPi4:
The only problem I encountered was that none of the Wine related apps or Space Cadet worked ... due to wrong ownership (in and on the .wine folder (root instead of pi)).
Hmm. That should have been fixed from within the scripts. There are lines in there that change ownership to pi:pi for all the files under .wine and Space Paranoids, respectively. Did you run the scripts through the RetroPie Setup interface or did you do it from the command line?
The RetroPie Setup program keeps log files in
/home/pi/RetroPie-Setup/logs
. They are gzipped. Would you be able to post the results from the Wine and Space Paranoids installation? Perhaps that will give us some clues.Thanks!
- George
-
-
This post is deleted! -
@mth75 Thanks for the log information. There seems to have been an issue with running Wine for the first time. I believe I've seen this issue before and it was because binfmt did not accept the box86 configuration. I thought I had that issue squashed, but perhaps there needs to be a little pause after installation of binfmt.
Would you also be able to send me your log for the box86 installation?
Thanks!
- George
-
@george said in Box86 and Wine on RPi4:
@mth75 Thanks for the log information. There seems to have been an issue with running Wine for the first time. I believe I've seen this issue before and it was because binfmt did not accept the box86 configuration. I thought I had that issue squashed, but perhaps there needs to be a little pause after installation of binfmt.
Would you also be able to send me your log for the box86 installation?
Thanks!
- George
You're welcome. See attached (above in my original reply) the Box86 log.
-
-
Sound improved a bit with Space Cadet, thanks.
Running some other stuff from the terminal in Pixel Desktop enviroment.
This is quite easy to do and works really good.Sound with this demo game is great !
-
Hello all! Some updates:
Got a response on my pull request, there are two issues.
- Including a separate version of the Mesa library is a bit much to manage. This is understandable. Eventually Raspberry Pi OS will have the updated version of Mesa, my version will become redundant (and eventually out of date/sync), and then we have a bunch of EmulationStation scripts which reference my redundant version. But my goal of people being able to play around with it is fulfilled by including it for now. My action item is to keep an eye on RPI's version of Mesa to see when it finally become part of the package. Hopefully soon because it has so much to offer, including Vulkan support (which is compiled into my version of Mesa).
- Space Cadet 3D Pinball is a copyrighted game, so it can't be included in RetroPie. I am going to remove it from my pull request, though I will still have it in my repository for the time being. Any updates I make will be available in https://github.com/GeorgeMcMullen/RetroPie-Setup/tree/spacecadet. I am not hosting the actual binary file. Seems Microsoft would love to bring back the game too, but can't for several reasons. Here's a good blog post on the matter from Microsoft. https://devblogs.microsoft.com/oldnewthing/20181221-00/?p=100535
@mth75 regarding the issues you're seeing:
- Thanks for the log files. It seems that in fact there was an issue after installing binfmt that Box86 could not get configured for it. Not sure how I'll be able to resolve this one yet. I thought I did already by restarting the service, but evidently it's not good enough of a solution. Originally, I would just reboot my Pi before moving on, but that might not be an option here. More research and testing is needed.
- I'll also check out the issue with LXDE/Pixel desktop. I have a sneaky suspicion that it has to do with
xserver-xorg-video-fbturbo
being installed when LXDE is installed. A good test would be to trysudo apt remove xserver-xorg-video-fbturbo
and see if that improves the situation. I've found thatxserver-xorg-video-fbturbo
isn't good anyway as it replaces the native Broadcom access with a software based (LLVM) driver (i.e. POOR performance). I'm hoping that it will be removed from future releases once Mesa is updated in Raspbian/Raspberry Pi OS.
@Folly glad the sound is improved on Space Cadet. If you see any other
wavemix.inf
settings that might improve the sound further, let me know. I've been looking at how to possibly make it so that the background music plays, but that so far means binary editing the game itself. Fun. That's a cool looking game you're playing. What is it? I'm looking for something that is freeware/open source that would be includable as a reference game for Box86 and Wine.Thanks all!
- George
-
@Folly glad the sound is improved on Space Cadet. If you see any other
wavemix.inf
settings that might improve the sound further, let me know. I've been looking at how to possibly make it so that the background music plays, but that so far means binary editing the game itself. Fun. That's a cool looking game you're playing. What is it? I'm looking for something that is freeware/open source that would be includable as a reference game for Box86 and Wine.Look for "AckysXPBreakoutDemo" in the A... perhaps you can include this, licence wise.
Edit :
I manually made a port to see if the game could work from emulationstation. I can confirm this will work.
Only trouble is, first you have to install the game. If it's installed and you run this exe for the first time, chances are that the sound and some graphics will not work oob. I had to turn everything on, in the settings, running this for the first time. But when it works it really works awesome. -
@george said in Box86 and Wine on RPi4:
Including a separate version of the Mesa library is a bit much to manage. This is understandable. Eventually Raspberry Pi OS will have the updated version of Mesa, my version will become redundant (and eventually out of date/sync), and then we have a bunch of EmulationStation scripts which reference my redundant version. But my goal of people being able to play around with it is fulfilled by including it for now. My action item is to keep an eye on RPI's version of Mesa to see when it finally become part of the package. Hopefully soon because it has so much to offer, including Vulkan support (which is compiled into my version of Mesa).
It' only a matter of time. In the meantime we can package our bottles. Regarding the Wine version, this one has audio problems I noticed ... I'm building with 5.22 stable.
-
I am struggeling a bit with how to add more software.
For this to happen, we have to make ports for every game we want to add.For lr-mess I made a script that can generate install scripts.
Perhaps we can come up with a same sort of solution for this.But we know, not all software can be run directly.
Most of them have to be installed first.
So not all the install scripts will/can be the "same" this way.So I wonder, isn't it possible to make an easier way for this, just running a link to the .exe ?
Then it would be somenting like adding roms to a directory, instead of making scripts for every game. -
I got the scripts working on my main RetroPie C= Pi4 :-) .
Next step, Commandos1 and AoE2 bottles.
-
I had to delete all version checks in the installscripts (which worked on a clean RetroPie install). Wine didn't see an Box86 install, Box86 did not see the Mesa install, and Space Cadet did not see the Wine install. My image is build from an early RetroPie beta a year ago (but maintained and updated).
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.