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. -
@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
-
So I discovered the issue .
DO NOT EDIT .SH IN WINDOWS . This is was caused my issue .
I changed .sh in Linux to this to autostart qjoypad works perfect .
#!/bin/bash
xset -dpms s off s noblank
cd "/home/pi/RetroPie/roms/wine/Files/claw/"
startx &
qjoypad &
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/claw/CLAW.EXE'Opens and maps the keyboard to controller perfect.
Go into pixel desktop first and setup per game or games .
If you need different profile for game add "profile name " after qjoypad example.
qjoypad "mugen" & -
@troopaking Awesome! Glad you figured it out. Nice work!
-
-
@troopaking I took it one step further. I modified "Wine Desktop.sh" so that it will try to load a qjoypad layout named the same as the folder the mugen executable is in.
This only works for .conf files. I did this because I hated to have to have a different .sh for each game that basically does the same thing.
So for example...
/home/pi/RetroPie/roms/wine/Files/M.U.G.E.N/mugen.exe
It now tries to load M.U.G.E.N.lyt after checking to see if it exists in /home/pi/.qjoypad3 folder.
If it does not exist, it checks to see if WINE.lyt exists, and if it exists it will load that.
If that doesn't exist, it loads the default layout that was setup in the XWindows desktop.
This is generic now for any game, not just MUGEN.
-
@dteam I actually changed the theme to "windows" because most themes have a "Windows" theme already setup.
-
@dteam That looks awesome! Thanks!
-
@russellb This sounds pretty cool. I've never used QJoyPad before. Can either you or @Troopaking share how you installed it? The original project on SourceForge seems fairly old (http://qjoypad.sourceforge.net/), but there is a more recent fork on GitHub (https://github.com/panzi/qjoypad). I see there is a package for qjoypad, but that seems to be for v4.1 (the SourceForge version), while on GitHub it's up to 4.3.1.
@RussellB would you mind sharing your modifications?
There doesn't seem to be a script for QJoyPad in RetroPie (please correct me if I'm wrong). There seem to be additional alternatives as well (https://askubuntu.com/questions/239176/alternative-to-qjoypad). Perhaps it's worth starting a new topic with regards to creating some scripts that install these.
Thanks!
- George
-
@george sudo apt-get install qjoypad did the trick. Installed version 4.1.
Replace the test for .conf file in "Wine Desktop.sh" with this code. If ~/.qjoypad3 folder does not exist, it ignores the call to qjoypad all together.
elif [[ "${params[0]}" == *.conf ]]; then configFile=$(cat "${params[@]}") WINEPREFIX=$(configValueForKey WINEPREFIX "$configFile") DIRECTORY=$(configValueForKey DIRECTORY "$configFile") PROGRAM=$(configValueForKey PROGRAM "$configFile") OPTIONS=$(configValueForKey OPTIONS "$configFile") QJOYPADLAYOUT=$(echo $(basename $(dirname "${PROGRAM}"))) echo "Launching with config file" echo "WINEPREFIX: $WINEPREFIX" echo "DIRECTORY: $DIRECTORY" echo "PROGRAM: $PROGRAM" echo "OPTIONS: $OPTIONS" echo "QJOYPADLAYOUT: $QJOYPADLAYOUT" if [[ "$DIRECTORY" ]]; then cd "$DIRECTORY" fi midi_synth start xset -dpms s off s noblank matchbox-window-manager & if [ -d "/home/pi/.qjoypad3" ]; then if [ -f "/home/pi/.qjoypad3/${QJOYPADLAYOUT}.lyt" ]; then qjoypad "$QJOYPADLAYOUT" & echo "Starting qjoypad with $QJOYPADLAYOUT" elif [ -f "/home/pi/.qjoypad3/WINE.lyt" ]; then qjoypad WINE & echo "Starting qjoypad with WINE" else qjoypad & echo "Starting qjoypad with default layout" fi fi setarch linux32 -L /opt/retropie/emulators/wine/bin/wine "${PROGRAM}" "${OPTIONS}" midi_synth stop fi
-
@george
Sudo apt-get install qjoypad worked for me as well on a few builds .
Me and RusselB (mainly Russels knowledge) have been working on qjoyoad instead of joy2key in wine . Qjoyoad performs a lot better and can scripted like Russel has done for each game to launch different settings.All of us have done a good combined effort to make something really cool . Hopefully they will use in retropie offical soon .
Thanks to russel, you and others for the work.I greatly appreciate the teamwork and community effort .
-
@russellb said in Box86 and Wine on RPi4:
@george sudo apt-get install qjoypad did the trick. Installed version 4.1.
Replace the test for .conf file in "Wine Desktop.sh" with this code. If ~/.qjoypad3 folder does not exist, it ignores the call to qjoypad all together.
elif [[ "${params[0]}" == *.conf ]]; then configFile=$(cat "${params[@]}") WINEPREFIX=$(configValueForKey WINEPREFIX "$configFile") DIRECTORY=$(configValueForKey DIRECTORY "$configFile") PROGRAM=$(configValueForKey PROGRAM "$configFile") OPTIONS=$(configValueForKey OPTIONS "$configFile") QJOYPADLAYOUT=$(echo $(basename "$(dirname "${PROGRAM}")")) echo "Launching with config file" echo "WINEPREFIX: $WINEPREFIX" echo "DIRECTORY: $DIRECTORY" echo "PROGRAM: $PROGRAM" echo "OPTIONS: $OPTIONS" echo "QJOYPADLAYOUT: $QJOYPADLAYOUT" if [[ "$DIRECTORY" ]]; then cd "$DIRECTORY" fi midi_synth start xset -dpms s off s noblank matchbox-window-manager & if [ -d "/home/pi/.qjoypad3" ]; then if [ -f "/home/pi/.qjoypad3/${QJOYPADLAYOUT}.lyt" ]; then qjoypad "$QJOYPADLAYOUT" & echo "Starting qjoypad with $QJOYPADLAYOUT" elif [ -f "/home/pi/.qjoypad3/WINE.lyt" ]; then qjoypad WINE & echo "Starting qjoypad with WINE" else qjoypad & echo "Starting qjoypad with default layout" fi fi setarch linux32 -L /opt/retropie/emulators/wine/bin/wine "${PROGRAM}" "${OPTIONS}" midi_synth stop fi
Found a bug in the assignment of QJOYPADLAYOUT. Missing quotes around the parameter to basename.
-
@russellb So to make like easy on the game add-on developer I have created a default WINE.lyt that has the default joypad values for MUGEN. Then, in mugen.cfg I have the following changes:
GameWidth=640 GameHeight=480 . . . FullScreen=1 . . . P1.Joystick.type = 0 P2.Joystick.type = 0 ;------------------------------------------------------- ; P1 Key config (configurable from M.U.G.E.N) [P1 Keys] Jump = 273 Crouch = 274 Left = 276 Right = 275 A = 44 B = 46 C = 47 X = 108 Y = 59 Z = 39 Start = 13 ; P2 Key config (configurable from M.U.G.E.N) [P2 Keys] Jump = 119 Crouch = 115 Left = 97 Right = 100 A = 102 B = 103 C = 104 X = 114 Y = 116 Z = 121 Start = 117
That way all the games can have the same configuration. If you want to have game-specific settings leave the keys alone in mugen.cfg for that game and create a custom layout in qjoypad that maps to that game. Easy peasy.
It occurs to me that M.U.G.E.N. deserves its own system in themes, but I can't find any themes that have a M.U.G.E.N. system. Also need a "Loading..." screen.
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.