Core Updates Since Last Release (v1.6.7)

In anticipation of RetroArch 1.6.8, let’s detail all the work that has been performed on the libretro cores since the last frontend release (1.6.7).

higan

Themaister came out of retirement to collaborate with byuu on an upstream-friendly libretro-ization of higan. Currently, only the SNES emulator is available, but we hope to extend this to include all of his suite of emulators. Only the mainline ‘accuracy’ profile is available from the Online Updater currently, but we hope to add hex_usr’s ‘balanced’ profile soon. In the meantime, you can get it pre-compiled for Windows from his nSide github repo.
Notably, the higan core includes Super Game Boy support, including all special features, such as borders and music. Instructions for setting it up are here.

Yabause

raelgc has backported many commits from upstream, including a ton of accuracy and performance improvements.

Citra

j-selby has been keeping the libretro core up-to-date with upstream’s amazing progress. The version available in the online updater is lagging behind these updates a bit, since the buildbot is having trouble building it lately, but we hope to have this resolved soon. We also hope to get the recently announced network support hooked up to the libretro core, but no promises there.

PicoDrive

notaz provided a massive update to bring the libretro core up to date with upstream. This update included many accuracy improvements, along with some nice features like 68k overclocking.

mGBA

sergiobenrocha2 did the legwork to merge/update mgba-libretro to match the upstream 0.6.1 release, including a big pile of accuracy fixes from endrift.

Snes9x-git

hunterk backported qwertymodo’s MSU1 fixes, which should alleviate the crackling that some users reported, especially on Android devices, and he also added RTC support for the recently completed Tengai Makyo Zero (Far East of Eden: Zero) translation.

In addition to this, a hack got backported from Snes9x2010 which should prevent an annoying resolution flicker which occurs when switching from field mode to battle mode in the game Chrono Trigger.

Snes9x2010

Upstream Snes9x dev OV2 provided a patch to check for invalid VRAM access, which makes Hook work without massive artifacting.

ParaLLEl-N64

Massive amount of work from mudlord, AIO, bparker and Twinaphex to get the threaded angrylion RDP integrated. It started as a port of the angrylion-plus-rdp plugin, but the libretro version is now quite different, including being a true software renderer (that is, compatible with all video driver backends, including d3d). This plugin is very fast in Windows, reaching full speed on relatively modest CPUs, while Linux is only slightly faster than non-threaded angrylion. We hope to identify what’s holding back performance on non-MSVC compilers in the near future.

Beetle-Saturn

hiddenasbestos brought the libretro port up to parity with upstream v0.9.47 v0.9.48, which gives a few ton of nice accuracy improvements and the much-awaited savestate support (savestates made with the v0.9.47 version are not compatible with the v0.9.48 update, so beware if you made a bunch of states in the short time between updates). Tatsuya79 and retro-wertz provided a number of improvements to the overscan and cropping behavior.

Beetle-PSX

bkoropoff and simias did a lot of work on the CD reading code, including reduced stuttering during reading and a core option for increased CD loading speed. This *greatly* reduces the loading times on games, from the standard 15-30 seconds down to as low as 2-3 seconds. Do note that this is very much an experimental feature though, and it won’t work correctly for all games. r5 also added the ability to use unsupported BIOS files, which should make the core a little less picky about BIOSes. simias also backported new and improved triangle code from upstream, which unfortunately causes some issues with the PGXP features in some games. Zapeth also added support for CHD files.

Beetle-SuperGrafx

retro-wertz aded support for cheevos/RetroAchievements.

MAME

r-type continued his fantastic stewardship of the up-to-date MAME core, keeping it in lockstep with upstream releases.

MAME2016

Oggom backported support for the awesome sidescrolling Cave shmup Akai Katana, support for which was just added to upstream mainline MAME.

MAME2003

gamez-fan has been backporting dozens of patches and drivers from later versions of MAME to make more games work (or work better) with this core. markwkidd also fixed up a lot of the core’s reporting to correctly distinguish between working and nonworking games.

MAME2003_Midway

gamez-fan added in some speedhacks and fixed Rampage World Tour for this low-power spinoff of mame2003.

Final Burn Alpha

barbudreadmon continued his stewardship of Final Burn Alpha, bringing in many fixes from upstream and fine-tuning controls for specific problematic games.

FBAlpha2012

sergiobenrocha2 backported many fixes from the mainline FBA core for this low-power spinoff.

VICE

tschak909 added support for loading VIC-20 games. r-type improved screen resizing and handling for PAL/NTSC regions.

MrBoom

frranck greatly improved the AI in MrBoom, making it possibly the most advanced Bomberman AI in existence.

blueMSX

meepingsnesroms added disk swapping and, along with Tatsuya79, provided some nice quality of life improvements for this core, including machine auto-selection.

NP2Kai

AZO234 added a number of improvements to this core, including support for more disk formats (floppy and SCSI HDD), sound fixes and new soundcards and better savestate support.

Genesis Plus GX

nukeykt added a fantastic, cycle-accurate sound core. The older, MAME-derived core is still available for low-power devices. bkoropoff also added support for overclocking and the ability to remove per-line sprite limits (i.e., the cause of sprite-flickering).

gw-libretro

leiradel fixed some issues with high scores not updating properly and controller popups appearing behind game sprites.

FCEUmm

retro-wertz continued his work on this core, providing many fixes and updates for the mapper code, as well as greatly improving the Zapper functionality.

SameBoy

radius worked with LIJI32 to get the libretro-ization upstreamed in this extremely accurate Game Boy emulator. radius also hooked up savestates and SRAM/in-game saves, along with a variety of options that weren’t previously exposed to the libretro port, such as audio and video tweaks and rumble, while leiradel added cheevos/RetroAchievements support.

melonDS

radius worked to keep this core in lockstep with upstream. hunterk fixed an issue that was causing the red and blue color channels to be swapped and also closed a significant memory leak.

DeSmuME

moose65468 fixed loading Dragon Quest 5.

Nestopia

meepingsnesroms added support for 2x overclocking, while rdanbrook added preliminary Famicom Mic support (get ready to yell at those Pols Voices) and Tatsuya79 provided some edge-case fixes for Zapper functionality.

Atari800

nanoant fixed building on Android and made the core look for BIOS ROMs in the libretro ‘system’ directory, which puts this core more in-line with good libretro behavior. Meanwhile, r-type added support for more keys.

PPSSPP

Twinaphex collaborated with hrydgard to get an updated PPSSPP core ported over and to upstream a few things that should make it easier for the libretro port to stay up-to-date.

PCSX-ReARMed

meepingsnesroms fixed some polygon issues and radius fixed building this core for Windows. However, it’s still not something people should use on non-ARM hardware for general purposes.

DOSBox

Tatsuya79 fixed an annoying key-repeat bug.

Across many cores, bparker added support for Travis continuous integration, so we can better determine whether commits will break building on the many platforms we support, yoshisuga added support for arm64 builds on iOS targets and radius added support for mapping cores’ keyboard keys to the retropad, which is very useful for classic computing cores. Also, retro-wertz fixed a bug that prevented the beetle-* cores from cleaning up after themselves when loading zipped ROMs.

NES Homebrew Carts from Mega Cat Studios

Disclaimer: This is not a paid endorsement. RetroArch/libretro are not affiliated with Mega Cat Studios in any way and received no compensation for this post.
After hearing about Sheep It Up!’s physical cart release, Mega Cat Studios contacted us about their own physical NES releases:

New, artisinal gaming experiences for the original Nintendo.
We just listed some awesome new NES games for sale this AM. Including an awesome, one of a kind collectors edition.
Creepin It Reel is an NES chiptune album with NES rendered, officially licensed Dancing Pumpkin Man dance moves and a fully playable pachinko game full of treats.
Creepy Brawlers marries monster movies & boxing to the NES.  An achievement system, counter attacks and enemy evolutions to keep the scares high and health bars low.
 
Justice Duel is a four player couch co-op action game with a full featured single player campaign, mech-eagles in top hats and an array of weapons
All games are available for sale at megacatstudios.com.
Any homebrew authors who would like to distribute their freeware games through RetroArch’s free content distribution service can contact us via email, IRC (#retroarch at Freenode IRC) or Discord.

Sheep It Up! Homebrew Gets a Physical Cart Release

Our good friend Dr. Ludos writes with some exciting news:

I kept working on Sheep It Up, and I’m proud to announce you that it’s now available on actual Game boy cartridges:

https://catskullgames.com/sheep-it-up

As a game collector myself, I wanted this game to be produced without sacrificing any vintage Gameboy titles. So everything is manufactured specifically for this game: the pcb, the rom, the shell, the protective case and even the sticker! We also tried to keep the price reasonable, so everyone can enjoy the game: $15 (+shipping). It will run on any Gameboy model, from the first one to the GBA SP, including the Super Game Boy.

And here is a short gameplay video (GIF format) and a selection of screenshots:

Feel free to share the news to the Game boy owners you may know :)!

Sheep It Up! is also available for download through RetroArch’s online updater feature. It’s a lot of fun and has become my go-to test ROM for Game Boy cores.

RetroArch Snap Packages Now Available

Adding to our existing FlatPak packages for distro-independent installation, RetroArch is now available as a snap package, as well. We’re using Canonical’s SnapCraft.io build service, which produces i386, x86_64 and armhf builds. Canonical’s official instructions for installing snap packages on a variety of distros are available here:

https://snapcraft.io/docs/core/install

If you already have the snap package manager installed, you can download the snap package directly from uApp Explorer:

https://uappexplorer.com/snap/ubuntu/retroarch

and Ubuntu users can search for and install RetroArch directly from the Ubuntu Software store:

If you run into any issues with the snap package, please report them at the retroarch-snap meta-repo, located here:

https://github.com/libretro/retroarch-snap

This package includes assets, database, cheats, joypad autoconfig, info cores, overlay and shaders. After installation, you’ll also need to connect 2 interfaces to get joysticks working:

sudo snap connect retroarch:raw-usb

sudo snap connect retroarch:joystick

If you’re going to use any cores that require BIOS files, you’ll probably want to stop by settings > directory and select a system/BIOS directory, as well. Other than that, you should be good to go!

Atari800 Core Improvements

Thomas Cherryhomes has been hacking on the atari800 libretro core. Atari800 is an emulator that supports the Atari 8-bit computers and game systems. Much needed core options have been added to improve the overall user experience, including:

* System type (400/800, 800XL, 130XE, and Atari 5200)
* Video Standard (NTSC or PAL)
* SIO Accelleration (while this improves boot time, many copy protected games will fail to load if this is enabled)
* Internal BASIC (so that games that need BASIC can be played)
* Hi-Res artifacting (for NTSC games that utilize the high-resolution faux color artifacting, such as Choplifter!, and Drol)
* Boot from Cassette (needed for bootable cassette titles)

State saving is coming soon, not quite debugged yet, as well as trying to find the best way to add the keypads for the Atari 5200 controllers, with an eye to extending such support for other game systems of the same vintage that also sported keypads on their joysticks. Also, some build targets are not compiling (e.g. Wii, PS3, etc.), and this needs to be fixed.

The changes thus far, with the exception of the preceding paragraph have been merged upstream and accepted.

Core updates (since version 1.6.3)

Despite the short release cycle, there has been a fair bit of core work since the 1.6.3 release, including some significant contributions driven by the recently implemented bounty system. In no particular order:

  • r-type fixed Beetle NGP‘s longstanding bugs with big-endian architecture, which should allow that core to control properly on those architectures. He also fixed compilation of the atari800 and Hatari cores on Wii U and fixed some issues with the cap32 core on that platform.
  • Twinaphex and r5 continued overhauling Beetle PSX HW‘s OpenGL renderer, doing much behind-the-scenes work that isn’t particularly visible to end-users but should improve stability and lay the groundwork for future improvements.
  • Twinaphex also added MSVC2005 solutions for many cores, making them compatible with our Win98 port of RetroArch.
  • bparker fixed some memory and GL issues with the Craft Minecraft clone core, which should correct an issue where the core was crashing at launch for some people.
  • markwkidd backported C-based MIPS3 support to MAME2003, which gets Killer Instinct and Killer Instinct 2 working with this core. Without a MIPS dynarec, they’re too demanding for most ARM devices, unfortunately (Killer Instinct 1 is not quite full speed on my Shield ATV, while Killer Instinct 2 is pretty far from full speed; Raspberry Pi is, of course, not even close), but they should work fine on x86 and x86_64 devices.
  • Bounty hunter rtissera added CHD support to Beetle Saturn and Beetle PC Engine Fast – with plans to add support for this format to several other disc-based cores in the near future–and hooked up support for the Saturn’s 3D pad. He also fixed an issue with MAME 2003 with Midway DCS games that would lead to audio issues at set intervals. This should fix the sound in Mortal Kombat 1/2/3/Ultimate, NBA Jam, Total Carnage, etc. other games.
  • casdevel, another active bounty hunter, fixed mouse input in Desmume libretro.
  • albertofustinoni submitted changes for a variety of cores to make them compatible with his RetriX UWP libretro frontend, which is compatible with Windows 10, Windows Phone and Xbox One developer mode.
  • orbea committed some buildfixes for the early work-in-progress Basilisk2 core.
  • yoshisuga continued adding build targets for iOS ARM64 in various cores.
  • hunterk did the mind-numbing work of bisecting and correcting a regression in Snes9x Libretro that apparently broke the game Phalanx back in May.
  • psyke83 fixed a crash with Tyrquake that could happpen on Raspberry Pi-based devices (e..g. Retropie).
  • Citra / OpenLara / Dolphin will now work without having to explicitly enable ‘Shared Hardware Context’ in RetroArch.

Recent Core Updates

As always, there have been many updates to various libretro cores from a number of contributors, some of whom are regular contributors and some of whom have never contributed to libretro projects before. Here are some of the highlights, in no particular order:

  • r5 and Twinaphex did a deep-dive on the Beetle PSX HW OpenGL renderer to resolve a host of issues that would lead to crashes whenever users messed with internal resolution and/or toggled fullscreen. Those context changes should now be handled gracefully and without any major issues.
  • RobLoach updated MelonDS to match StapleButter’s upstream v0.4 release and added to the ScummVM libretro core the ability to launch *.scummvm files located inside game directories. He also merged a variety of updates from upstream EasyRPG to the libretro core and added FFMMidi for MIDI support.
  • bparker snatched up the $50 bounty to fix a longstanding issue with 3DO emulator 4DO Libretro, which caused saving to be broken. Prior to this fix, saves were just garbage data and the core would try to load *other* garbage data. Everything should work fine now.
  • Twinaphex backported a slew of per-game hacks/fixes from upstream Mupen64Plus to ParaLLEl-N64 to fix audio sync in Resident Evil 2 FMVs, fix Indiana Jones, fix missing sound in Episode 1 Pod Racer and to fix Perfect Dark when using the Angrylion or ParaLLEl renderers, among other fixes and cleanups. He also added a toggle for dithering with the Angrylion renderer, which can provide a cleaner image and also squeeze out a few more frames per second for users who were hovering around full speed with that highly accurate plugin. He also added a fix for Mario Kart 64 when using the Rice video plugin. Twinaphex also added very high internal resolution multipliers for cores that support it, including Dolphin Libretro, Beetle PSX HW, OpenLara Libretro, Craft libretro and Mupen64plus Libretro, and he updated OpenLara Libretro to have an inventory screen and a working healthbar.
  • oxavelar added 4-player controller support to the still-nascent Dolphin Libretro core.
  • Meepingsnesroms improved rotation functionality in Beetle WonderSwan Libretro and fixed the Amiga emulator core, (P-)UAE Libretro core on Android x86.
  • frranck tweaked the AI in MrBoom Libretro to make playing against computer opponents a better experience.
  • danieljg backported to our FBA2012 core a turbo speedhack for Metal Slug 2.
  • r-type updated MAME Libretro to stay in lockstep with upstream MAME, as well as adding a bunch of new resolutions to the “alt renderer” core option, which should allow for clean, anti-aliased vector graphics, as well as clean use of MAME’s artwork feature. r-type fixed an issue with the MAME Libretro core where some games could launch with incorrect framerates. He also added more target systems to his libretro port of Vice, along with a core option to choose different models of C64 and/or VIC20.
  • yoshisuga has added iOS-ARM64 build targets for many cores to make them compatible with newer Apple iDevices. He also helped track down and squash a longstanding bug that was causing a handful of cores to display only a black screen on iOS devices.
  • Tatsuya79 added support for Colecovision/Spectravideo/Sega SG1000 and an option to crop overscan to the blueMSX libretro core, along with fixing a variety of mapper issues in that core. He also added a core option to Beetle PCE Fast to allow users to choose which CD-ROM BIOS to use, as well as adding a bunch of new functionality for Prboom Libretro, including keyboard and mouse support and savegame slots.
  • Gingerbeardman made significant updates to the fMSX core.
  • hunterk backported some minor fixes from upstream Higan to our bsnes and bsnes-mercury cores to fix an elusive hanging issue in Magical Drop and audio issues with several games using the performance core. He also added a fix for Nestopia-UE‘s libretro interface that was preventing autoselection of the Japanese 4-player adapter when using the NstDatabase. hunterk also added core options to increase the internal resolution of the Vectrex emulator core, Vecx Libretro, which greatly reduces the ugly jaggies caused by 1x rendering.
  • barbudreadmon updated FBAlpha Libretro to the upstream v0.2.97.42 and fixed a segfault that could occur with some pgm games.
  • radius fixed savestates in FBAlpha Libretro and re-applied a fix to Mupen64plus Libretro for stuttering that some users experienced with games that run at 30 fps. He and webgeek also added AArch64 build support for various cores to coincide with the compatibility of RetroArch Android on that architexture.
  • sergiobenrocha2 and shakalakka provided more intuitive button layouts for the MAME2014-libretro and MAME2016-libretro cores. sergiobenrocha2 also merged in endrift’s upstream changes from mGBA v0.6.0.
  • kivutar made a lot of improvements to the lutro-platformer core, while RobLoach added Love support to it.
  • markwkidd did a variety of quality-of-life improvements for MAME2003-libretro, including adding a catver.ini file that helps with categories and fixing the Makefile to compile in the MIPS engine for x86, which should fix Killer Instinct on x86 (that is, KI is still broken on x86_64 and ARM) with this core. He also added DAT and catver.ini for MAME2000-libretro and submitted a fix from RetroPie user poi to MAME2010-libretro to fix Xevious and Bosconian.
  • TylerLoch (with some cleanup help from radius) added a SuperFX chip 20 MHz overclock option (i.e., instead of starting at 40 Mhz) for snes9x-libretro.
  • andwn fixed a silly issue with NXEngine libretro whereby during the last-boss fight with Misery, her sprite would change to that of a large block.
  • SpiralBrad backported from upstream the ability to automatically set the BIOS time in Beetle Saturn based on the host system’s clock, which is particularly useful for the real-time holiday functionality in Christmas NiGHTS.
  • j-selby continued improving the already impressively complete Citra Libretro port to include touchscreen emulation using the mouse and optional right analog stick among other improvements.
  • Retro-wertz added additional mappers to FCEUmm.

New Core: PX68k (Android/iOS/Windows/Linux/Mac)

Disclaimer: This article was written by Tatsuya79, who has also contributed many improvements to the X-68K core. Developer r-type is the one who made the port

The Sharp X68000 was a home computer released exclusively in Japan in 1987. It was a powerful machine for its time and saw a great number of arcade ports, exclusive titles and doujin (indie) games developed for it, even years after the last model was launched in 1993.

Until now the only way to run Sharp X68000 games in RetroArch was with MAME. Its driver isn’t really the most advanced one and it is quite demanding, excluding many platforms such as smartphones.

Outside Retroarch, PX68k was aimed to be fast enough for that usage. Based on Winx68k, targeting the PSP and ported to iOS and Android by its Japanese developer Hissorii, it was possibly the only X68000 emulator on those platforms. As its development stopped some years ago, compatibility issues due to OS upgrades made its usage rather complicated.

Developer R-Type decided to port it to RetroArch, replacing its old 32 bits based CPU emulation by a 64 bits one from Yabause core. There is also a back end for the cyclone cpu on arm/android but surprisingly it didn’t give any speed enhancement and had more problems than the previously mentioned c68k.

After a common effort to fix various issues resulting from this change (thanks Retro-Wertz), it should now be at the same level of compatibility as the original emulator.

Running some tests on an old Samsung Galaxy S3, where we could barely emulate a 16MHz CPU before with PX68k stand-alone, we now achieve smooth results with a 66MHz setting. This makes it 4 to 5 times faster than before, and the libretro port is probably now the best performing Sharp X68000 emulator you can get for various cheap or old devices.

Testing on an [email protected] with “Akazukin Cha Cha Cha” achieved upwards of 1000fps on the default 10MHz emulated CPU. The same test gives 136fps in RetroArch using the Mame core.

The PX68k-libretro core still keeps the same main limitation of the original: no MIDI emulation. We also need to bring a virtual keyboard back, you can only use real ones at the moment. However, we did make some improvements:

1.) You don’t need to load a particular utility to define the amount of RAM the machine uses any more, there’s now a core option for that.

2.) You can change the CPU speed in real time.

If, like some old DOS games behaved, you encounter one that runs too fast (ex. Arkanoid), you can directly slow down your CPU from a fast 25MHz to the 10MHz clock speed it was programmed for.

We also added some overclock steps as high as 200MHz. High frequencies have the side effect of speeding up the floppy loading time, which is a much welcomed accident on this machine. (100MHz is already a lot faster for that.)

-We made some 8 buttons gamepad profiles which weren’t used that much on the system, but are great for the various Street Fighters II iterations.

You’ll need the bios files, which have been made publicly available by Sharp. Place them in your system/BIOS directory, in a subdirectory named “keropi”. The iplrom.dat and cgrom.dat are necessary, but you do not need the sram.dat. See the core information for a complete list.

L2 button or F12 key brings up the original px68k menu where you can change the inserted disks. They have to be unzipped to be accessible from this menu but can be zipped/archived when launching directly from RetroArch.

After the first boot a “config” file will be generated in the “keropi” folder. You can enter your rom folder into the “StartDir” line to make it accessible from the PX68k-libretro core’s in-game menu.

Shader Changes

Abstract

GLSL shaders now preferred over Cg when possible
Update to latest RetroArch for compatibility with updated GLSL shaders

Cg shaders demoted, GLSL promoted to first-class

Portability and compatibility are major goals for RetroArch and libretro, so we invested heavily in Nvidia’s Cg shader language, which worked natively anywhere their Cg Toolkit framework was available (that is, Windows, Linux and Mac OS X), as well as on PS3 and Vita, and could be machine-compiled to messy-but-usable GLSL (lacking a few features, such as runtime parameters) for platforms that lacked the framework (primarily ARM / mobile platforms). Cg was also so close to Microsoft’s HLSL shader language that many Cg shaders will compile successfully with HLSL compilers, such as those available with Windows’ D3D driver and on Xbox 360.

This was great for us because we could write shaders once and have them work pretty much everywhere.
Sadly, Nvidia deprecated the Cg language in 2012, which left us in a bad spot. Since then, we’ve been limping along with the same strategy as before, but with the uneasy understanding that Nvidia could stop supplying their Cg Toolkit framework at any time. Rather than sit idly by, waiting for that other shoe to drop, we took it upon ourselves to hand-convert the vast majority of our Cg shaders to native GLSL with all of the bells and whistles. TroggleMonkey’s monstrous masterpiece, CRT-Royale, still has a couple of bugs but is mostly working, along with its popular BVM-styled variant from user Kurozumi. Additionally, before this conversion, many of our Cg shaders were flaky or completely unusable on libretro-gl cores, such as Beetle-PSX-HW’s OpenGL renderer, but these native GLSL conversions should work reliably and consistently with any core/context except for those that require Vulkan (namely, ParaLLEl-N64’s and Beetle-PSX-HW’s Vulkan renderers).

With the GLSL shaders brought up to speed, we can finally join Nvidia in deprecating Cg, though it will still remain as an option–that is, we’re not *removing* support for Cg shaders or contexts at this point–and we will continue to use it where there is no other choice; namely, Windows’ D3D driver and the Xbox 360, PS3 and Vita ports. Moving forward, our focus for shaders will be on native GLSL and our slang/Vulkan formats, though we will likely still port some to Cg from time to time.

RetroArch now correctly handles #version directives in GLSL shaders; GLSL shader repo updated to match

There have been a number of updates to the GLSL shader language/spec over its long life, and shader authors can use #version directives (that is, a line at the top of the shader that says #version 130 or whatever) to tell compilers which flavor/version of GLSL is required for that shader. However, RetroArch has long had a strange behavior whereby it injected a couple of lines at the beginning of all GLSL shader files at compile time, and this broke any shader that attempted to use a #version directive, since those directives must be on the first line of the shader. This meant that our shaders couldn’t use #version directives at all, and all of our shaders lacked #version directives until very recently for this reason. These #version-less GLSL shaders are still perfectly compliant GLSL because GLSL v1.10 didn’t support directives, either, but the necessity of leaving off the #version started to cause some problems as we whipped our GLSL shader library into shape.

The error caused by adding a #version directive under the old behavior.

On AMD and Nvidia GPUs, the compilers would just toss up a warning about the missing directive and still expose whatever GLSL features were available to the GPU, which worked out great. On Intel IGPs, however, the compiler tosses the error and then reverts to only exposing the features available in ancient GLSL v1.10 (released way back in 2004). As a stopgap, we gave many shaders fallback codepaths that would still work in these circumstances, but a number of other shaders were either impossible to make compatible or even the compatible result was imperfect.

So, as of this commit (courtesy of aliaspider), RetroArch will no longer reject shaders with explicit #version directives, and we have added those directives to any shaders that require them at the lowest version that still compiles/functions properly. That is, if the shader doesn’t use any features that require greater than #version 110, they will still have no #version specified, and any shader that requires #version 120 but not #version 130 will not have its requirements increased to the higher version for no reason. This should keep our GLSL shaders as compatible as possible with older hardware, and including the #versions explicitly when needed will also make it easier for other programs/developers to utilize our shaders without any unnecessary guesswork due to behind-the-scenes magic.

This change does require a clean break, insofar as older versions of RetroArch will choke on the new #version directives (that is, they’ll fail to compile with the “#version must occur before any other program statement” error pictured above), so users with Nvidia or AMD GPUs must update their RetroArch installation if they want to use the updated shaders. Users with Intel IGPs will be no worse off if they don’t update, since those shaders were already broken for them, but they’ll probably *want* to update to gain access to the many fancy shaders that now work properly on their machines.

Mobile GPUs using GLES had many of the same issues that Intel IGPs had, with many shaders refusing to work without #version directives, but GLES compatibility added in a further complication: GLES requires its own separate #version directives, either #version 100 es or #version 300 es, which are different from and incompatible with desktop GL’s #versions. To get around this, we added a trick in RetroArch to change any #version of 120 or below to #version 100, which is roughly comparable in features to 120, and any #version 130 or above to #version 300 es whenever a GLES context is used. This should get everything working as effectively and consistently as possible on mobile GPUs, but if anything slipped through the cracks, be sure to file an issue report at the GLSL shader repo.

Bounty Updates

We have the bounty system up and rolling with Bountysource and have begun adding awards to a series of issues. The libretro organization has seeded $80 to issues so far, and another $100 has been offered by users. Current issues include adding low-latency input and audio drivers for Windows; extending the mouse axis for games like tyrquake that can be controlled by mouse; support for multiple mice simultaneously, which could enable 2-player light-gun games in several cores; and adding a host virtual filesystem layer, which could enable softpatching on all cores among other benefits. The VFS layer has had the most activity so far and currently sits at $70.