Box86 and Wine on RPi4
-
@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.
-
@russellb Because not a lot of themes have a specific theme for MUGEN I made a subdirectory under roms/wine/M.U.G.E.N.. (need to periods so it shows up as M.U.G.E.N. in the ES menu) and put the MUGEN conf files in that folder. I'm using the "windows" theme for wine so this makes sense to me as they run under windows. I'm ok with that. :)
-
@george
Hello again George so Russell's qjoypad code works great. Just awesome stuff .I'm having a issue with Baldurs Gate(bg). If I opened wine config then start bg works fine . But open through desktop or .conf fails. Has horrible black screen issue unless ran with wineconfig .
Update Baldurs Gate worked perfect when ran through .sh with startx instead of matchbox .
-
@troopaking said in Box86 and Wine on RPi4:
@george
Hello again George so Russell's qjoypad code works great. Just awesome stuff .I'm having a issue with Baldurs Gate(bg). If I opened wine config then start bg works fine . But open through desktop or .conf fails. Has horrible black screen issue unless ran with wineconfig .
Update Baldurs Gate worked perfect when ran through .sh with startx instead of matchbox .
I can't find a version of Baldur's Gate that runs properly even in Windows 10 to try it in WINE. :(
-
Can someone try this for me?
Testing WINE with 3D Space Cadet Pinball originally for Windows 95. It runs fullscreen fine, however hitting "ESCAPE" key it switches back to a window and then hangs. Can't figure out why.
If I hit ALT+F4 however, it exists back to ES.
Looks like WINE is having a problem closing whatever application is running and it hangs.
NEVERMIND! I see this was noted in a previous post.
EDIT: Using xbindkeys and qjoypad I now have the ability to do a one-button exit back to ES:
xbindkeys is configured to map the "END" key to the command "pkill -f /opt/retropie/emulators/wine/bin/wine".
qjoypad is configured so the "BACK" button send the "END" key
So "BACK Button"->qjoypad->xbindkeys->terminate wine process
I'll test it with other programs but now at least you don't need a keyboard for Pinball anymore!! If this works with mugen (Need to map a different button because I use "BREAK" as "ESCAPE" to traverse back through the menus. Let me do some more testing.
This even fixes the issue I had where on one RetroPie install it failed to exit when selecting the "EXIT" menu item or "ESCAPE". Now I programmed the "Logitech" button on the F710 to send the "END" key and it works great!
-
Had to change the kill command to "kill $( pgrep -f "wine/bin/wine\ /")". This command kills the executable that was started so Wine can shutdown cleanly.
So I had to install xbindkeys and xbindkeys-config from apt-get. A custom configuration file to handle the END mapping to the script, and voila.
EDIT: Even easier way to shutdown cleanly:
/opt/retropie/emulators/wine/bin/wineserver -k
-
@russellb That's awesome. The escape key problem on Space Cadet pinball always bothered me. I'm going to have to try this!
- George
-
@george said in Box86 and Wine on RPi4:
@russellb That's awesome. The escape key problem on Space Cadet pinball always bothered me. I'm going to have to try this!
- George
Let me know if you want the files to try this out.
-
So I tryed to use your scripts in combo with lutris installed on pi 4 .
Could work take some time to make lutris act right. It's acts funky sometimes .
The .sh would be simpler to code rough example
Bin bash
Cd "/home/pi/...."
Startx &
Qjoypad "blah"
Lutris lutris game id 3I feel a few things to note/consider
-lutris complied mesa and vulkan itself and your scripts still worked fine.
-lutris can "install" games with a working directory so might be able to remove cd line all together that way .
-lutris has joystick configuration already . Haven't tested it yet . But might be able to remove qjoypad altogether with it .
-metadata for most games is fetched from lutris.net and could be transferred to es in theory .
-lutris takes space on sd with Metadata etc .
-lutris update could cause problems or solutions
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.