On RaspiOS, the install user is part of the `input` group by default, but on Ubuntu is not. Add it during install so that `joy2key` can work as regular user (i.e. as part of `runcommand`).
Upstream has re-organized the repository with the new versions for DB9/Gamecondriver and removed the version suffix from the source folders. Modified the module to fix the symlink to `/usr/src` needed by `dkms` and also fix the license URL.
Recent Linux kernels (6.2+) have the ability to disable the 'TIOCSTI' ioctl, thus rendering unusable the method of sending keyboard events to the controlling terminal via `fcntl.ioctl` [1]. Not all distributions have left it enabled currently, but Ubuntu 24.04 has it enabled, affecting the `runcommand` ability to generate keyboard events for a joystick.
Use the `python-uinput` module to create a virtual keyboard and send the proper events through it, without relying on the 'curses' or 'fcntl' modules. Now, since the new module doesn't know about Termios codes, which were used previously, I've added a translation table to accomodate scripts using those capability codes. The `python-uinput` uses the Linux event codes [2].
The new method needs the `uinput` Linux kernel module to be loaded beforehand - so add the module to be automatically loaded. The user also needs to be part of the 'input' group, otherwise they won't be able to use the `uinput` interface - RetroPie doesn't automate that, but assumes the installation user belongs to that group.
We also don't need the `termios`/`fnctl` calls, so the terminal handling part has been removed, simpplifying a bit the code.
OTHER changes:
- the device path (/dev/jsX) is now ignored. It hasn't been working since the switch to SDL2 for input processing, but was still parsed for compatibility with the old version.
- when invoking with the debug (--debug|-d) parameter, the script now runs in the foreground, instead of forking and running in the background. It's easier when running it to diagnose issues; running with debugging enabled should not be used for regular usage.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=83efeeeb3d04b22aaed1df99bc70a48fe9d22c4d
[2] https://github.com/tuomasjjrasanen/python-uinput/blob/master/src/ev.py
Don't install the 05-splash.sh script to kill vlc on Raspberry Pi Buster and below. VLC on Buster on RPI4 will output to MMAL which can overlay on top of EmulatioStation.
Remove 05-splash.sh if already present on Buster.
Due to a recent merge of upstream code, the module no longer builds on Linux kernel 5.10, included in Raspberry Pi OS 'buster'.
The change needed to compile is minimal, it's caused by a missing event code from 'input-event-codes.h', part of the kernel's UAPI headers.
The 'capsimg.so' wasn't properly copied after build to the plugins folder, making Amiberry unable to load IPF files.
Also fixes - apparently - a double free crash on the Pi4 build.
DKMS in Bookworm has a bug[1] where the autoinstall function on kernel updates fails due to a miscalculated version comparison, thinking always that the kernel version is newer than the custom version and skipping the installation. The message shown during upgrades is:
xpad.ko.xz:
Running module version sanity check.
Module version for xpad.ko.xz exactly matches what is already found in kernel
DKMS will not replace this module.
You may override by specifying --force.
Added a module version (copied from the `dkms.conf`'s package version) to have 'dkms' always install the out-of-tree version.
[1] https://github.com/dell/dkms/issues/296, fixed by https://github.com/dell/dkms/pull/297
Due to the old EGL version implemented by the old BRCM GLES drivers, the core cannot obtain a (HW) GL context to be used for accelerated video output. Disable this feature on systems using the old/legacy GLES(2) driver.
omxiv / omxplayer only works on the Raspberry Pi legacy and fkms drivers.
This change switches to vlc for both utilities, as it supports mmal output on the Raspberry Pi legacy drivers, and drm output on KMS on Raspberry Pi OS (bullseye).
Remove dependencies for omxplayer / omxiv / insserv
Switch code to use vlc.
Run asplashscreen as $user (not root).
Remove wait for dbus (no longer needed)
Save vlc pid and Exit vlc before launching emulationstation on KMS
Pin vlc version on Buster to version from archive.raspberrypi.org to stop it being overwritten with the vanilla Debian security release.
Enable on 64bit Raspberry Pi OS
Using LZMA (xz) for compression instead LZ77 (gzip) reduces the image size by approx 30% more. Image writing utilities with compressed image support (RPI Imager, Balena Etcher) already support it and the RaspiOS or Armbian images are already distributed as `.xz` files.
Changed our image compression format from `.gz` to `.xz` and thus reduce the download size for all images.
C++20 changes were added in 7a85faef which broke compatibility with GCC 8.
GCC 10 compatibility was removed a few commits later in a8a23f61
Fix to commit 2d57f9e0 (last building on GCC 8) on GCC < 11