Friday, June 4, 2021

Making XWindow, Wine and Box86 work under RetroArch [Raspberry Pi OS 32 bits lite + RetroArch as an app]

🕐🕐🕐 Duration: Up to one day (kernel compiling)
🔧🔧 Difficulty: Medium
🌟🌟🌟 Interest: Interesting

Very similar to my other article ("Making Wine and Box86 work under RetroPie [RetroPie as an OS]"), it will nevertheless show much simpler than with RetroPie.

Read this first

Don't attempt to make this work in Lakka. Lakka doesn't have apt-get and you will get stuck after 5 minutes. If you want to try to install apt-get or build-essential on Lakka, good for you. I still genuinely think it would be a masochistic approach. Please stay on Raspberry Pi OS 32 bits + RetroArch if you want to have success with this guide.

Prerequisite

You should start with either a regular Raspberry Pi OS 32 bits or a Raspberry Pi OS 32 bits lite with fake-kms enabled and RetroArch as an app installed. If you have no clue, start with this guide: Make a multiple purpose system from PINN and Raspberry Pi OS 32 bits lite

Steps to follow

RetroArch bash core will help you run your shell scripts even if they have startx inside which is actually a blessing.

To install bash core simply:

git clone https://github.com/SwedishGojira/libretro-bash-launcher 

cd libretro-bash-launcher

make


Then follow the screenshot guide to install your bash core in RetroArch:

Go to load core then "Install or Restore a Core"

Install bash core retroarch 1
Install a new core

 

Install bash core retroarch 2
Install freshly compiled bash_launcher_libretro.so

 

Installing the modules

You will need to install xserver (for Xwindow), a portable x86 Wine and Box86, and Vercingetorix kernel if you are on a 3B+.

If you are starting from my previous article you should be allright since you already installed Raspberry Pi Desktop. Otherwise you might have to install xserver-xorg-video-all.

Go to console then,

Xwindow

sudo apt-get install xserver-xorg xinit xterm

Wine:

wget https://www.playonlinux.com/wine/binaries/linux-x86/PlayOnLinux-wine-3.20-linux-x86.pol

sudo apt-get install bzip2

tar -jxf PlayOnLinux-wine-3.20-linux-x86.pol --strip-components=1

💡 Think about moving your extracted Wine to /home/pi/wine-3.20/

Box86:

cd ~

git clone https://github.com/ptitSeb/box86

cd box86;mkdir build;cd build; cmake .. -DRPI3=1;make;sudo make install

sudo systemctl restart systemd-binfmt

Kernel 3G/1G:

Recompile or kernel_install.sh (Vercingetorix - rpi3)

Executable

Make a script

nano /home/pi/scripttogame.sh

>>

#mount your game drive: replace sda1 by info from fdisk -l

#replace /media/external_hd by any mount point directory you created

sudo mount -t auto /dev/sda1 /media/external_hd 

#replace your game path by the game directory you want to play

cd /media/external_hd/heroes4/ 

#be sure to use startx. add WINEPREFIX=... if you don't want to use the default WINEPREFIX

#replace /home/pi/wine-3.20/bin/wine by the absolute path to your x86 wine executable

startx /home/pi/wine-3.20/bin/wine heroes4.exe

You should be done. It's actually alot easier with RetroArch than with RetroPie.

The only remaining thing is to start the game like you would start any game in RetroArch: load your bash core and start your script with it. Here are the steps screenshot by screenshot:

 

Load bash core retroarch 1
Load bash core - 1st menu

 

Load bash core retroarch 2
Load bash core - select core

Load heroes 4 retroarch 1
Load content - Main menu

Load heroes 4 retroarch 2
Load content - select h4.sh

Load heroes 4 retroarch 3
... Should give a full screen success

Conclusion

When switching to Raspberry Pi OS and RetroArch you will actually open a new field of possibilities.
Devilishly easy to get your graphical accelerator drivers (for example GL4ES) running with your emulator cores, you can also write any game script in bash and execute it. It can allow you for example to overclock your Pi before starting the game, or even running unknown emulators (for example: Play-, DOSBox-X). A really interesting solution to have a full-compatible gamebrary running with a very good speed.

This is about to be the last post I'm doing on choosing your GUI in Raspbian Buster. I will be studying other systems (probably DietPi and Windows on Arm) a little bit and then I also plan to make a game coverage map on Pages.

Until then, Have fun on your Raspbian puppies!

The pi gamer



No comments:

Post a Comment

Play ET: Legacy on Raspberry Pi [FPS]

🕐🕐 Duration: A few hours 🔧 Difficulty: Easy 🌟🌟🌟🌟 Interest: Hours of fun