RetroPie-Setup icon indicating copy to clipboard operation
RetroPie-Setup copied to clipboard

backends: add SDL1.2 Compat backend

Open cmitu opened this issue 1 year ago • 2 comments

Added the SDL12-Compat backend, using a shim library which implements the sdl1.2 API over SDL2.

The new sdl12-compat backend should be used for SDL1 applications when:

  • the platform doesn't have dispmanx anymore (e.g. rpi platforms with RaspiOS Bullseye and later)
  • sdl2 has a working accelerated video & rendering drivers
  • not running under x11 (i.e. KMS)

Notes:

  • for SDL1+Videocore specific applications, which use directly the dispmanx/legacy GL stack (e.g. pcsx-rearmed, advmame-1.4, etc.), the backend will not help
  • this can help run more emulators/applications on platforms where there was no accelerated framebuffer SDL1 driver (i.e. Mali ?).
  • the PR marks sdl1 scriptmodule as dispmanx only, to avoid installing it on Bullseye/Bookworm + RPI, since there's no dispmanx available there.

cmitu avatar Jan 25 '24 03:01 cmitu

NOTE: set to draft for now, so I can re-test some of the SDL1 apps (dosbox/fuse) and add them to the PR in a separate commit.

cmitu avatar Jan 25 '24 03:01 cmitu

OK, I think it's enough for a start. Modified the following scriptmodules to take advantage of the new backend:

  • Atari800
  • Fuse
  • Osmose
  • Linapple2 (Linapple-Pie). Upstream seems to be still using SDL1.
  • OpenBOR
  • FBZX
  • XRick
  • CapriceRPI

Considered, but not included:

  • Basilisk II. It has a SDL2 version, but it needs a SDL2 version > 2.0.10, which we don't have on Buster. Perhaps we should add a SDL2 version ?
  • XM7 - has issues building the agar library under aarch64. Still investigating.
  • UAE4ARM/UAE4ALL - not tested

Not included:

  • Dosbox - we already have Dosbox-SDL2 and Dosbox-Staging. Emulating SDL1 with SDL2 will probably be less performant than straight up using SDL2 with the 2 other emulators.
  • Daphne - we have Hypseus with SDL2 (and x86) support, not tested.

Not tested:

  • any videocore emulators, that use the dispmanx API directly:
    • mame4all
    • gpsp (has a libretro core)
    • pisnes. For a 'fast' snes, we have the older cores and could also include or supplant them with the 'supafaust' core (basee on MDFN's SNES supafaust).
    • giana
    • quake3
    • pcsx-rearmed - can be coerced into a binary that doesn't depend on the old GPU drivers (as a generic GLES platform), but not sure if it's worth it since we have the libretro core available.

Binned: * np2pi - we have the libretro core, based on a (very old) ancestor from NP2Kai. NP2Kai can also be run standalone with SDL2, if we want. * dgen

Could be upgraded to SDL2: * openttd - package has SDL2 support since Bullseye, so nothing to do here (?) * dxx-rebirth - we're using an older branch, newer versions have SDL2 support. * alephone - untested

Wrong classification: * cdogs-sdl is actually a SDL2 program !

cmitu avatar Jan 31 '24 06:01 cmitu

Thank you.

joolswills avatar Feb 26 '24 20:02 joolswills