RetroArch 1.9.6 released!


RetroArch 1.9.6 has just been released.

Grab it here.

If you’d like to learn more about upcoming releases, please consult our roadmap here. The next version of Lakka (with an updated RetroArch 1.9.6 version) is scheduled to be released a week from today.

Remember that this project exists for the benefit of our users, and that we wouldn’t keep doing this were it not for spreading the love with our users. This project exists because of your support and belief in us to keep going doing great things. If you’d like to show your support, consider donating to us. Check here in order to learn more. In addition to being able to support us on Patreon, there is now also the option to sponsor us on Github Sponsors! You can also help us out by buying some of our merch on our Teespring store!

Release notes

Be sure to also read our Libretro Cores Progress Report (a link will appear here later).

Windows users (with XAudio2 audio driver): RetroArch would previously hang/lock up if you happened to disconnect your current audio device. For instance, this could happen if you were playing with headphones on and you decided to suddenly disconnect your headphones. This has now been fixed. Instead of it locking up the program, instead the sound is just lost instead.

Security concerns over the AI Service on Windows have been addressed.

Improvements to the Windows installer have been made. This should hopefully prevent potentially disasterous situations from happening again. This could happen for instance when the user pointed the installer to install to a directory he should not be pointing to (like C:\Program Files for instance or the desktop), and did not heed the warning.

Linux users should hopefully no longer experience crashes when toggling between normal and threaded video mode with OpenGL thanks to a patch by grant2258.

The Direct3D 11 driver has been improved for Windows users thanks to Stenzek (DuckStation author). Several fixes: tear control support is queried. If not supported, flip mode presentation will not be used and Direct3D will resort back to the legacy blit model instead (less optimal and worse windowed mode). DXGI Alt+Enter handling has been disabled since it would conflict with RetroArch’s fullscreen mode switch. Non-vsynced output without the flip model should also be properly fixed now, when tear support is enabled and flip model is used, it should be possible to fastforward.

Highlights

Optimize scanning of large data sets

When scanning content, the amount of time required to push each new entry to the resultant playlist increases exponentially with playlist size. For small romsets this is typically unnoticeable, but when dealing with very large data sets (e.g. arcade romsets) scanning quickly becomes impractical. A full arcade romset can take several hours to scan – or days on Linux (where certain file operations that are a NOOP on Windows, etc. are very slow).

This happens because the ‘push entry to playlist’ routine is highly inefficient. It has to check whether the entry being added already exists in the playlist, which requires a content path comparison – which in turn involves several expensive operations to resolve ‘real’ file paths and deal with any inconsistencies in archive path notation. The problem is that these expensive operations happen every time: push an entry to the playlist, and it will process and compare every existing content path until it finds (or does not find) a match; push another entry and it will process every path again. Once a playlist hits a couple of thousand entries, this constant reprocessing grinds the scanning process to an effective halt.

1.9.6 solves the issue by caching all parameters derived from content paths on first use, so when pushing multiple entries to playlists the expensive path operations are only carried out once per existing entry. In addition, hash keys are used to minimise lengthy string comparisons. This greatly improves the efficiency of content scanning – and also of playlist management features (since these require nested playlist searches, which now also use the cached content path values/hashes).

For example, before with 1.9.5 and earlier, it was effectively impossible to scan 100k files. Now with 1.9.6, on a low spec development machine running Linux:

* A manual scan of 100k files takes 20 minutes
* Performing a Clean Playlist operation on the resultant playlist takes 5 minutes

Add support for mapping multiple controllers to a single input device

1.9.6 adds support for the remapping of individual controllers to arbitrary core input devices. This allows multiple controllers to be assigned to one input. To configure this, a new Mapped Port option has been added to the Quick Menu > Controls > Port N Controls menu:

Here, the Port 2 Controls refers to the physical controller; Mapped Port refers to the core port that will receive input from this controller.

For example, to map physical controllers 1 and 2 to the player 1 input of a core, set the following:

* Port 1 Controls > Mapped Port > 1
* Port 2 Controls > Mapped Port > 1

There are various use cases for this remapping:

* It allows multiple controllers to be used when playing hotseat multiplayer games that normally support only a single controller
* It allows hybrid-type controllers (e.g. two joysticks mounted in a cabinet) to be used as a single device
* It allows easy swapping of player 1/player 2 (etc.) inputs – for example, when the PSX version of Metal Gear Solid asks the player to plug their controller into port 2

Note that these configuration settings are independent from the main RetroArch config file. To make any changes persistent, a Core, Content Directory or Game remap file must be saved.

1.9.6 also cleans up a long standing issue when configuring remaps: before, changes to Device Type and Analog to Digital Type via the Quick Menu while a core is running will ‘bleed through’ to the main config file. This is harmful and unintuitive behaviour. With 1.9.6, the global settings for these values are cached when initialising a core, and restored when the core is unloaded. (This essentially became a necessity for using the port remapping functionality, since it is rather easy to create complex configs that should in no way touch the main config file…)

‘Analog to Digital Type’ usability improvements

RetroArch is able to map the left or right analog stick of a gamepad to D-Pad input via the per-port Analog to Digital Type menu setting. Unfortunately, this is a ‘trap’ for new users: mapping a stick in this fashion disables its analog input, which creates confusion when using cores that have native analog support. Many users enable Analog to Digital Type by default, then complain on reddit/discord that analog controls do not work for PSX/N64/etc. games.

1.9.6 modifies the Analog to Digital Type functionality such that it can be disabled automatically for cores that have native analog support. The setting now has the following values:

* None: No mapping
* Left Analog: Map left stick to D-Pad, but disable mapping if core attempts to read analog input
* Right Analog: Map right stick to D-Pad, but disable mapping if core attempts to read analog input
* Left Analog (Forced): Always map left stick to D-Pad, disabling left stick analog input
* Right Analog (Forced): Always map right stick to D-Pad, disabling right stick analog input

In addition, a sublabel has been added to the Analog to Digital Type menu entries, which should help to explain what they actually do.

Finally, this PR required some modification of input overlay-related code, during which the following bugs were fixed:

* There is no longer contention between analog stick inputs when an input overlay and physical controller are attached to the same port
* Input overlays no longer generate analog stick input in addition to D-Pad input when Analog to Digital Type is set to the left or right stick

AI Service (Windows) Security Improvements

Several security-related improvements have been made to the AI Service functionality for Windows in an attempt to address concerns that this could be abused. Speech input is no longer sent as a commandline argument to PowerShell, and both the language and speed parameters are properly sanitized and only allow for a few hardcoded safe values to be passed now. This should mitigate most of the attacks that could be thought of with regards to injection.

Windows Installer improvements

Several safeguards have been put in place to prevent people from making a severe mistake during the installation process on Windows. With the installer program, it is no longer possible to install RetroArch to a directory that has existing files or subdirectories. Instead, it has to be written in a new directory. We have to insist on this because the uninstallation process involves wiping RetroArch’s entire directory and everything in it. In the past, people could have made the mistake of pointing it to “C:\Program Files” without putting it in a separate subdir, with disastrous results on deinstallation. While the installer program did warn about this and asked you with a dialog prompt if you were sure, nevertheless we cannot take this risk to begin with. This has been resolved by simply deallowing this to happen by forcing you to install RetroArch to a new empty dir.

Changelog

1.9.6

  • ARCHIVE: Fix archive delimiter detection when file path contains no slashes
  • ANDROID: Do not duplicate port 0 mouse and gun inputs to other ports
  • AUDIO/XAUDIO2: Fail instead of crashing when disconnecting an audio device
  • CHEEVOS: Reset cached progress each time menu is opened
  • CRT/SWITCHRES: Add support for switchres.ini core and directory overrides
  • D3D11: Don’t use allow tearing flag with blit swap chains. Also disables the flip model if the allow tearing flag is not supported.
  • D3D11: Disable DXGI’s ALT+ENTER handling
  • D3D11: Don’t pass ALLOW_TEARING when unsupported
  • D3D11: Fix non-vsynced output without flip, black screens in fullscreen
  • D3D12: Relocated ‘d3d12_gfx_sync’
  • D3D12: Fixed swap interval option
  • GFX: Fix uninitialized variables in gfx_display_draw_cursor
  • HISTORY: Hide ‘Add to Favorites’ when viewing an entry of the favorites playlist
  • INPUT: ‘Analog to Digital Type’ usability improvements
  • INPUT: Add support for mapping multiple controllers to a single input device
  • INPUT/REMAPPING: Add support for mapping multiple controllers to a single input device
  • INPUT/LIGHTGUN: Bind lightgun trigger to first mouse button by default
  • INPUT/WINDOWS/RAWINPUT: Mouse access violation fix
  • INPUT/UDEV: Only add mouse if it has buttons and add vebose device friendly names
  • INPUT/UDEV: Skip mouse with no button errors and keep the rest
  • INPUT/UDEV: Fix Game Focus mode
  • INPUT/UDEV/X11: Change udev driver for dual lightgun support in X11
  • LIBNX/SWITCH: Update to libnx 4.0.0
  • LOCALIZATION: Fetch translations from Crowdin
  • LOCALIZATION: Fix Switchres menu texts
  • MENU/OZONE: Ensure sidebar display status is updated correctly when performing rapid menu navigation
  • MENU/XMB: Dynamic wallpaper fix
  • MENU/XMB: Icon opacity fix
  • MENU/QT/WIMP: Fix default core detection when playlist file name does not match ‘db_name’
  • PLAYLISTS: Optimise scanning of large data sets
  • SECURITY: Plug so-called high-risk vulnerability related to Powershell – avoid injection – don’t send speech input as commandline argument
  • UWP/XBOX: Add expanded resources Rescap to increase performance of UWP version in app mode on Xbox
  • WINDOWS/INSTALLER: Add smarter isEmptyDir reference implementation that looks for subdirectories from NSIS documentation
  • WINDOWS/INSTALLER: Register new function DirectorySet that is called when pressing the “Next” button on the MUI_PAGE_DIRECTORY, aka the install folder selection GUI. DirectorySet contains the criteria for an acceptable folder, which are:
    IfFileExists “$INSTDIR\retroarch.exe” returns 1
    IfFileExists “$INSTDIR\*.* returns 0, there is no existing folder
    IfFileExists “$INSTDIR\*.*” returns 1, there is a folder, and isEmptyDir returns 1, therefore the folder is empty, including of subdirectories
  • X11: Fix threaded video segfault

RetroArch 1.9.4 released!

EDIT/UPDATE 31/5/2021: We have pushed a new 1.9.4 version. Specifically this fixes a bunch of regressions in the Vita port which unfortunately snuck into the initial 1.9.4 version. If you are using RetroArch on a PS Vita, we highly recommend you redownload the stable again. There are no real changes for other platforms.


RetroArch 1.9.4 has just been released.

Grab it here.

If you’d like to learn more about upcoming releases, please consult our roadmap here. The next version of Lakka (with an updated RetroArch 1.9.4 version) is scheduled to be released a week from today.

Remember that this project exists for the benefit of our users, and that we wouldn’t keep doing this were it not for spreading the love with our users. This project exists because of your support and belief in us to keep going doing great things. If you’d like to show your support, consider donating to us. Check here in order to learn more. In addition to being able to support us on Patreon, there is now also the option to sponsor us on Github Sponsors! You can also help us out by buying some of our merch on our Teespring store!

Release notes

Be sure to also read our Libretro Cores Progress Report – lots of work has gone into all of the various cores that are maintained (either by us or elsewhere), and it’d be a shame if the work goes unnoticed. Read it here.

There were some issues with RetroArch on PlayStation TV devices which should now be resolved. Additionally, it’s possible to run RetroArch at 720p now on a PSTV if you use the Sharpscale plugin.

Just like in version 1.9.3, we have been going back and improving code in RetroArch to improve file I/O performance, something that is very important for systems suffering from slow disk storage. Most game consoles would fall in this boat because all file I/O tends to be typically unbuffered on homebrew SDKs. In the process, we have discovered some parts where RetroArch was being inefficient when loading files from compressed files (such as .zip or .7z files). In the past, it would extract this file first to a temporary directory on the disk, and then it would read from this file and load it into the RAM buffer. Now we load it into the RAM buffer directly from the compressed file without first extracting it to disk. As if that wasn’t bad enough, on any platform that supports runahead, we would have to create another copy – even when runahead is disabled. And if cheevos are enabled, that’s another copy. All things combined, it would take 128MB of RAM to load one 32MB GBA ROM. As of 1.9.4, this RAM usage is severely cut down for cores that set ‘need_fullpath’ to false.

PlayStation2 users get a new core, prboom (a Doom 1/2 game engine). Thanks to a new and improved toolchain for PS2, this runs at a very impressive framerate, targeting 60 frames per second with stock settings. There might be some minor dips to the 50s in the busier scenes but nothing too serious, and disabling settings like ‘Wiggle Geometry Fix’ might help alleviate that.

Highlights

Prevent unnecessary extraction (to disk) of compressed content files

In previous versions, when loading content from compressed files, RetroArch always extracts the archive to a temporary file – even when cores specify need_fullpath = false. This is incorrect behaviour. If a core does not explicitly need to load a file from disk via some internal mechanism, the frontend should merely provide it with a data buffer. RetroArch was doing this, but in absurd fashion, i.e.:

  • Content is extracted to a temporary file on disk
  • Temporary file is loaded into a memory buffer and passed to the core
  • Temporary file is deleted when core is unloaded
  • This is a huge unnecessary performance overhead, and it causes significant unnecessary wear and tear on flash storage devices…

1.9.4 fixes the issue. Now if compressed content is loaded into a core that sets need_fullpath = false, the file will be loaded directly into memory – no disk writes will occur.

Additional notes:

Previously, it was in fact impossible to load content inside zip files directly into RAM. This has now also been resolved.

The end result? Less read/write on disk storage, which will make a big difference in terms of game content loading time on systems with slow file I/O (typically game consoles).

Option to select between ‘touched’ elements and physical controller inputs when showing inputs on overlays

The ‘Show Inputs on Overlay’ option was previously ‘broken’ when using remaps: the mapped button is highlighted rather than the pressed button, which is confusing for users and at odds with every other application (in existence) that has on-screen touch controls.

1.9.4 remedies the situation by changing the ‘Show Inputs on Overla’y option from a bool to an enum, with the following settings:

  • OFF: No inputs will be highlighted
  • Touched: The overlay element that is touched/clicked will be highlighted, regardless of which RetroPad button it corresponds to (default setting on mobile platforms)
  • Physical (Controller): Actual inputs passed through to the core will be highlighted (including remaps). This is the default setting on non-mobile platforms, and can be used by streamers, speedrunners and suchlike to show the actual controls they are using

When Show Inputs on Overlay is set to Physical (Controller), the index of the ‘physical’ device to be monitored can be set via a new Show Inputs From Port option (this option did in fact exist already, but was hidden/disabled by a long standing bug)

Changelog

1.9.4

  • CHEEVOS: update rcheevos to v10.0.0
  • CONTENT LOADING/FILE IO: Prevent unnecessary extraction (to disk) of compressed content files when need_fullpath is false
  • CORE INFO/FILE IO: Enable core info cache by default now for all platforms
  • CORE INFO/REGRESSION FIX: Fix regression caused by core info file caching – Downloads was no longer showing up in Load Content
  • FILE IO/COMPRESSED: Ability to load content inside ZIP files directly into RAM
  • INPUT/OVERLAYS: Add option to select between ‘touched’ elements and physical controller inputs when showing inputs on overlays
  • INPUT REMAPPING/OVERLAYS: Prevent duplicate inputs when using remaps with input overlays
  • LAKKA: Add brightness restore hook
  • LOCALIZATION: Fetch translations from Crowdin
  • MENU/OZONE: Added simple playlist entry enumeration
  • MENU/XMB: Fix display of ‘Maximum Users’ menu entry dropdown list
  • PS3/PSL1GHT: Joypad driver works again
  • PSTV: Fix Vita input driver for PSTV
  • PSTV: Support for 720p on PSTV when using ‘Unlock framebuffer’ in Sharpscale plugin
  • RPNG: Fix some memory corruption if processing broken input PNG file
  • SECURITY: Fix CVE-2021-28927