PCSX2 Libretro/RetroArch Core Progress Report – August 2021

We’re very excited to share with you all the work we’ve been putting into the PCSX2 core as of late.

Reducing file requirements

As a general baseline, Libretro strives to make sure that the cores we self-maintain are fairly portable. We’d like not to have the user to require to install several data files inside the System folder in order for an emulator core to work. The problem with the PCSX2 core up to this point was that it was too much of a straight port – PCSX2 by itself writes to dozens of files during startup and logging. However, it also has many config files scattered about the place.

We have cut all this config file reading/writing. Now, the only configuration file that gets written to is the ever-trusty ‘core options config file’ from Libretro/RetroArch.

Furthermore, the only files you need to have in your /pcsx2 folder are your BIOS files inside /pcsx2/bios. Anything else is not necessary. You can still have a ‘cheats’ and _cheats_ws’ folder where you store custom .pnach files for games, but it’s optional and not necessary. Memory cards will continue getting written to /pcsx2/memcards if you used this folder in previous versions of the core, otherwise they will be written in /retroarch/saves/pcsx2.

Other under the hood changes: all the internal GS shaders are now embedded as strings into the GS renderer instead of being loaded in as resource files. We have also spent a lot of time reducing WxWidgets UI dependencies, although we are not quite there yet all the way. The core should also be way smaller as a result. It used to be as big as 10MB but now clocks in as low as 7MB or less.

The core now also uses an internal game database (see here). This is converted at compilation time into a header file and baked into the core. This way, we once again do not require the user to have this game database file inside his/her system folder. Instead, the core comes with nearly everything that the user would need to get started.

Reduced dependencies on Linux

The core used to have many runtime library dependencies before and therefore be quite nonportable across Linux distributions. We have since severely lessened our dependencies on external system libs. Glib, X11 and Libpng have all been eliminated as are other things.

Built-in widescreen patches


The core now has an embedded widescreen patch database. We are going to try and keep this database updated as time goes along. Many thanks to the members of the PCSX2 Forums for posting all these wonderful patches.

Built-in no-interlacing patches


Many PS2 games render in interlaced resolutions. While this might have looked fine on a CRT TV, this can lead to bad image quality when running these games on a modern LCD or OLED display.

Many no-interlacing patches have been written for PS2 games running in PCSX2. These usually come in the form of .pnach patches. However, what we’re attempting to do here is apply these automagically. We want to give the user a seamless experience where they can just insert the game and we try to apply the right no-interlacing patch behind the scenes to make it look as users would expect without having to fiddle with deinterlacing settings.

With a no-interlacing patch, Tekken Tag Tournament on PS2 looks visually indistinguishable from the PS3 version that was released years later
With a no-interlacing patch, Tekken Tag Tournament on PS2 looks visually indistinguishable from the PS3 version that was released years later

So, what we have done is implement a ‘No-interlacing patch’ option to the ‘Deinterlacing’ setting. You don’t need to manually source together a bunch of .pnach patches – simply make sure you set ‘Deinterlacing’ to ‘No-interlacing patch’, and start up the game. If the internal database has an entry for the game, a popup message will show up saying that a no-interlacing patch has been applied. NOTE: The no-interlacing patch is only applied once at startup. If you change it mid-game, you will have to restart PCSX2 in order for these changes to take effect.

In some cases, a game might have a built-in option to remove interlacing. This is what was commonly known as the Progressive Scan option, and it was enabled in many games in the US by press and holding Square and Triangle at startup. For games like Soulcalibur 2/3 and Tekken 4/5, it will then ask you to boot to this progressive mode.

We hope that we can find patches to automate this procedure as well, so that the user doesn’t have to do this manually. In some cases like Tekken 4, people are returning empty handed, for the Gran Turismo games it’s been reported that with the proper patch, it can be changed into always loading in progressive mode.

NOTE: If it can’t find a non-interlacing patch inside the database for the game, it will have the same effect as if the setting were 0 – no deinterlacing will be applied.

Here is a list of all the games we currently have no-interlacing patches for.

IMPORTANT PERFORMANCE HINT: No-interlacing patches (when applied) can be significantly lighter on your GPU’s resources vs. deinterlacing. We can skip several rendering pipelines when we render a non-interlaced image vs. an interlaced one, because the odd and even lines need blending, which is done with separate shader passes.

Many thanks to the members of the PCSX2 Forums for posting all these wonderful patches. If you have new no-interlacing patches you’d love to add to the PCSX2 libretro core, please do not hesitate to contact us. We’d love your contributions.

Built-in 60fps patches


We have implemented an integrated 60fps patch database for a select number of games.

We do have some standards as to which patches we will include. If framerate unlocking results in the game running at double speed, we don’t include the patch. The game has to be able to run at least normally at proper speeds. There can be small inaccuracies like certain physics or animations not updating at a proper 60fps rate, but these we consider to be nonessential.

Please keep in mind that these 60fps patches will increase the system requirements severely in some cases. In some rare instances (like Silent Hill 2), the game might internally slow down at certain spots when experiencing heavy EE/GS load. In such cases, a generous Emotion Engine overclock could help alleviate this. Unfortunately, we have not yet hooked up Emotion Engine/CPU overclocking as a core option, but we intend to do so soon.

God Hand, Space Channel 5 Part 2, Silent Hill 2/3, Rule of Rose, Ico and GTA3 are some of the bigger games that now have embedded 60fps patches
God Hand, Space Channel 5 Part 2, Silent Hill 2/3, Rule of Rose, Ico and GTA3 are some of the bigger games that now have embedded 60fps patches

Here is a list of all the games we currently have 60fps patches for. For some games, you might need specific versions of the game (from specific regions). We are trying to test the codes per-game first to ensure they meet our minimum standards (see above).

We can tell you that playing some of the games in the list above at 60fps is a transformative experience. If you have the system specs for it, definitely consider replaying your PS2 games again at much smoother framerates.

Many thanks to the members of the PCSX2 Forums for posting all these wonderful patches. If you have new 60fps patches you’d love to add to the PCSX2 libretro core, please do not hesitate to contact us. We’d love your contributions.

A lot more settings have been hooked up

We have expanded the amount of core options considerably. Later on we also want to add support for the newly added core option categories that you can see in RetroArch v1.9.8 right now. This will significantly reduce the clutter onscreen when browsing the core options.

Plenty of backports/updates

Finally, there have been plenty of backports and updates.

Do note that our current core is:
1) more recent than the last PCSX2 stable (1.6.0)
2) is basically following standalone upstream master in terms of development but with severe tweaks for better libretro integration
3) is using the x64 JIT code. This is a new codepath that is less well tested than the 32bit codepath, but it’s the future regardless.

Tips and tricks

Here are some tips you might be able to appreciate:

If you experience heavy latency – You could experiment with the option ‘Emulation: Vsyncs in MTGS Queue’. Try lowering this to 1 or even 0. Depending on the amount of lag frames a game has, this could cut down on the latency severely, at the expense of some slight performance. 2 is the default but you might want to turn this down lower.

If a game has vertical lines across the screen – Try turning on a setting like ‘Merge Sprite’ or ‘Align Sprite’. Usually this takes care of the issue. This can be game specific. We intend to automate this for the problematic games in the near future, so you don’t have to.

If OpenGL performs too slowly and you’re on Windows – You could always try the Direct3D 11 renderer. While this renderer has less blending options than GL, it can sometimes be significantly faster than the GL renderer. So it’s definitely worth a try.

Regarding Xbox latest Dashboard issues

We have been notified that the latest dashboard updates on the Xbox systems have decreased compatibility of the PCSX2 libretro by a fairly significant amount. This comes as a bit of unfortunate timing with this blog post. We haven’t had the proper time yet to look into this issue, and we don’t know if it will even be fixable in the short term. Nevertheless, we will take a look regardless and move from there.

RetroArch 1.9.8 released!


RetroArch 1.9.8 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.8 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 to 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!

Highlights

New RetroFW port

We added support for OpenDingux before for JZ4770-based handhelds. After this, we added support for RetroMini RS-90 devices.

And now thanks to Poligraf, we have a working build for all the JZ4760-based handheld devices running RetroFW. RetroFW is a Dingoo based firmware runnin on the MIPS 4760 which is around 50% the speed compared to other devices running Opendingux.

Which devices does this cover?

  • RS-97
  • LDK
  • RG-300
  • Powkiddy Q80

A full listing can be found here.

  • 29 cores available at launch: Atari800, BlueMSX, Cap32, FCEUmm, fMSX, FreeCHAF, FreeIntv, FUSE, Gambatte, Genesis Plus GX, gpSP, GW, Handy, LRMAME2003, LRMAME2003 Plus, Mednafen PCE Fast, NXEngine, O2EM, Picodrive, Pokemini, Potator, Prboom, Prosystem, QuickNES, RACE, Retro8, SMS Plus, Stella 2014, Vecx

We have been told these cores all run well on the hardware.

All of these low powered handheld devices help us tremendously in optimizing our cores for the low end spectrum of hardware devices. gpSP, PCSX ReARMed and Picodrive are already starting to reap the benefits of it.

Core option categories

We are going to be making a persistent effort now to enhance RetroArch’s UX and lower the acessibility curve. To that end, we now have also implemented core option categories support.

Up to this point, every core option in a core (Quick Menu -> Options) has all been shown in a a flat alphabetical list. Users can quickly get confused if they have to scroll down a massive list of options.

So, 1.9.8 finally adds core option categories. Options assigned to a category will be displayed in a submenu of the main core options menu on supported frontends. For example – here we assign Gambatte’s mulitplayer options to a Game Boy Link category:

If you do not like this new behavior, there are always options to turn it off. Go to Settings > Core > Core Option Categories setting (enabled by default). When disabled, core option categories are ignored, and core options will effectively be displayed using the old v1 format.

Cores that already support core option categories

Core option categories have to be specifically added per core. Some of the cores that already support core option categories are as follows:

  • Final Burn Neo
  • Mupen64Plus Next
  • Beetle Saturn
  • Beetle PSX
  • Beetle PCE
  • Beetle PCE Fast
  • Genesis Plus GX
  • Snes9x 2010/2005/2002
  • DOSbox Pure
  • DOSbox Core
  • UAE (Amiga)
  • VICE (Commodore 64)
  • Have you ever noticed RetroArch starting a game in windowed mode and then blowing up the window to ridiculous sizes that exceeds the boundaries of your desktop? Well, we now have a solution for that!

    At present, when RetroArch is in windowed mode with Remember Window Position and size disabled, the window size will be equal to the core provided base_width/base_height multiplied by the Windowed Scale. This is potentially ‘catastrophic’: if a core has a very large base_width/base_height (e.g. PPSSPP with a x7 internal scale factor) and Windowed Scale is set to the default x3, then the window size can be enormous – potentially exceeding the capacity of the host GPU and causing RetroArch to crash.

    1.9.8 adds two new options:

    • Settings > Video > Windowed Mode > Maximum Window Width (default: 1920)
    • Settings > Video > Windowed Mode > Maximum Window Height (default: 1080)
      …which can be used to cap the maximum window size to a ‘sane’ value.

    The PR also cleans up the Settings > Video > Windowed Mode menu, auto-hiding options where required, and re-initing drivers when toggling Remember Window Position and size. Also, since the ‘remember’ part of Remember Window Position and size is only enabled for Windows, an alternate Use Custom Window Size is provided on other platforms.

    Auto-updating core option menu visibility updates without toggling Quick Menu

    Cores are able to show or hide their options via the RETRO_ENVIRONMENT_SET_CORE_OPTIONS_DISPLAY callback on supported fontends. A significant shortcoming here is that if a change to one core option (via the frontend) affects the visibility of another option, the frontend cannot update the menu state until the core has run for at least one frame. So with the core options menu open, visibility updates cannot happen in real-time – instead, the user must toggle the quick menu off then on before the menu will change. This is ugly and confusing.

    1.9.8 adds a new RETRO_ENVIRONMENT_SET_CORE_OPTIONS_UPDATE_DISPLAY_CALLBACK environment callback which allows the core to register a function that enables the frontend to (a) force a core-side option visibility update and (b) allows the frontend to check whether option visibility has changed. This means all show/hide operations can now generate real-time menu updates.

    Windows

    Plenty of important fixes for Windows users.

    If you experienced lockups in the past when disconnecting an audio device while using the WASAPI audio driver, well, rejoice, this will no longer happen.

    Simultaneous shift sticky fixes were made to the DirectInput input driver. Dinput would not send WM_KEYUP for both Shifts if they were pressed together and released, resulting in sticky Shifts
    = Pinball games ruined in DOSBox.

    The following fix was made to the Windows RawInput driver – the Left Alt key could get stuck when Alt-Tabbing. No more. The keyboard can now also be mapped to analog input axes, meaning you can bind the left and right analog stick on the RetroPad to your keyboard keys.

    PlayStation2 version

    1.9.8 solves the flickering issues that appear in the cores that use the FRAME_SKIP as Snes9x2002 does.

    Also, 1.9.8 basically mounts HDD partition if RetroArch actually started from the HDD unit.
    In this way, we skip the mount partition if the user just wants to use USB.

    macOS/OSX version

    Plenty of important fixes for macOS users this time!

    There were several serious memory leaks with the Metal video driver. These have now been fixed.

    Serious bugs related to the input autodetection subsystem have finally been fixed. Now when you connect a gamepad, it will no longer try to attach the same pad to two controller ports simultaneously. This has been a longstanding bug that we’re glad has finally been consigned to the dustbin of history thanks to the help of a generous contributor who did quite some work to delve deep into this issue. We also made sure everything still works across a wide variety of macOS machines (from a PowerPC Mac running OSX 10.5 to an Intel and ARM Mac running more recent macOS versions).

    WiiU version

    Lots of improvements have been made once again to the WiiU port.

    All the libretro RPX cores are now compressed. Not only do they load faster (leading to faster startup times), but it means you have a lot more space left on your SD card.

    L3 and R3 buttons have been fixed on several gamepads, they were previously completely nonfunctional.

    Furthermore, promising work is underway for a PlayStation1 emulator core running on RetroArch WiiU. More on that later once more news is forthcoming.

    UWP/Xbox versions

    We have been fixing several bugs with the UWP port, many of these affecting in particular RetroArch users on Xbox One/Series.

    Microsoft recently released a new Dashboard update that caused some breakage for existing RetroArch installs.

    We have managed to fix the startup problem that occurred on the latest dashboard. We also fixed the onscreen keyboard display which was previously completely glitched out.

    Note that on the latest Dashboard, some compatibility problems still persist. For instance, it has been reported that several games on PCSX2 no longer work as of the recent update. This will require investigation and it is our guess if anything can be done about this, we will have to determine this after more investigation has occurred. For now, you might experience scaling issues with some of the ANGLE/GL powered cores like Mupen64Plus Next and Flycast because of the Dashboard update. We hope that we will be able to transition from ANGLE to something like GLon12 soon. What this would buy us is full desktop OpenGL support instead of just OpenGLES. This would mean a more complete superset of OpenGL (up to 3.3 from what we can hear), more cores that would work out of the box instead of custom cores made to work with ANGLE, etc. We will see if we succeed in this, but that’s something for a later version.

    In the meantime, we have also enabled Translation features. Note that we haven’t been able to implement the Text-to-Speech accessibility feature yet, but all other features should be there now for experimentation.

    We have also re-enabled the “Explore” tab on the Main Menu. We haven’t found any issues with this anymore after the recent bugfixes/improvements we made to the underlying database code, but let us know if there are any more issues on that front.

    Several cores that used the libretro VFS subsystem and/or CHD loading previously no longer worked. Examples include the Beetle cores. This has been fixed.

    Screen resolution settings improvements

    Currently the “Screen Resolution” list wrongly alters also video_refresh_rate to the rounded value, as in 59.940 Hz becomes 59.000.

    This change makes sure all the 59.94 multiples (59/119 etc) result in the proper float value instead of integer.

    Also, previously notifications when setting the refresh rate would repeat itself twice. This has been fixed.

    Changelog

    1.9.8

    • AUDIO/WINDOWS/WASAPI: Stop deactivating audio on fast forward
    • CHEEVOS: Hide challenge indicators when resetting
    • CHEEVOS: Support for more than 64 memory regions
    • CHEEVOS: Automatically retry ‘http error code -1’
    • CONTENT INFORMATION: Show content info label+path rows always
    • CORE OPTIONS: Core option categories implemented
    • CORE OPTIONS: Add option to disable core option categories
    • D3D10/11/12: Fix gfx_display_draw_texture – fixes OSK (On-Screen Keyboard) issues
    • DATABASE: Fix heap-buffer-overflow when fetching CRC values
    • DATABASE/EXPLORE: Fix CRC32 reading in explore menu
    • DATABASE/LIBRETRODB: Fix writing of numerical values
    • DATABASE/LIBRETRODB: Fix libretro-db loading on big endian platforms
    • DUMMY CORE: Skip state_manager_event_{deinit/init} when core type is dummy, should skip warning spam ‘Implementation uses threaded audio. Cannot use rewind..’ when using rewind
    • INPUT/UDEV: Limit udev device scan to subsystem ‘input’
    • INPUT/SDL2/WINDOWS: Fix keyboard event keycodes
    • INPUT/WAYLAND: Fixes a bug where the first player’s mouse, pointer, and lightgun are echoed to the other ports. Now, those other ports correctly report zero. In the future support for multiple mouselike devices will need to be added, which is a bigger project
    • INPUT/WAYLAND: The driver now respects keyboard_mapping_blocked
    • INPUT/WAYLAND: When possible, deprecated lightgun defines are replaced with the new ones. The coordinates are still using the old relative callbacks
    • INPUT/WINRAW: Trigger joypad driver reinit on DEVICECHANGE – avoids fullscreen toggle
    • INPUT/WINRAW: Alt sticky fix
    • INPUT/WINRAW: Prevent Alt getting stuck when Alt-Tabbing
    • INPUT/WINRAW: Add pointer status
    • INPUT/WINRAW: Add missing analog keybinds
    • LIBNX/SWITCH: Fix poll missing for controller 2-8
    • LIBNX/SWITCH: Fix layout not applied correctly and hangs when splitting joycons
    • LIBRETRO: Core options category API implemented
    • LIBRETRO: Fix RETRO_ENVIRONMENT_SET_FASTFORWARDING_OVERRIDE callback when runahead is enabled
    • LIBRETRO: Add environment callback for enabling core option menu visibility updates without toggling Quick Menu
    • LOGGING: Starting logging and verbose mode before first config load
    • LINUX: In some Linux Desktop Environments, like Budgie, task bar feature is unable to pin applications. With StartupWMClass= present in .desktop file, it is possible to pin the application
    • LOCALIZATION: Fetch translations from Crowdin
    • MENU: Relocate ‘Manage Playlists’ to top
    • MENU: Fullscreen resolution width/height settings no longer require ‘advanced settings’
    • MENU/REFRESH RATE: Fix double notifications with refresh rate settings
    • MENU/OZONE: Ensure the existence of values used in selection calculation
    • MENU/OZONE/VULKAN: Casting to unsigned caused an integer overflow and after float promotion would lead to ‘x’ being a garbage value, leading to problems when this value was passed to vkCmdSetViewport. This stops Vulkan validation layers from complaining about it
    • METAL: Fixed font driver memory leaks
    • MOUSE: Change default mouse index to port index
    • MOUSE: Friendly names for mice where available
    • OSX: Fix some memory leaks
    • OSX: Fix controller duplication bug
    • PS2: Implement alpha for the video driver
    • PS2: Aspect ratio handling
    • RETROFW: Initial port
    • UWP/XBOX: Enable Explore tab by default – seems to work fine
    • UWP/XBOX: Fix startup issues with latest Xbox Dashboard updates – ANGLE cores still show up wrong
    • UWP/XBOX: fix issue where files where opened as OPENALWAYS instead of OPENEXISTING this fixes beetle cores
    • UWP/XBOX: fix issue where filesizes where not returned properly, this fixes loading arcade dat files
    • UWP/TRANSLATION: Enabled translation services for both UWP MSVC2017 and 2019. No TTS speech yet.
    • VIDEO: Fix refresh rate 59Hz rounding
    • WINDOWS: Remember original refresh rate
    • WINDOWS/VULKAN: Refresh rate fixes + cleanups
    • WIIU: Fix L3/R3 buttons
    • WIIU: Compress RPX libretro cores
    • WIIU: Add ICInvalidateRange (necessary for JITs)
    • WIIU: Slight filesystem optimisation
    • WIIU: Add option for running without core info (emscripten-style)

    What’s next

    It has been often requested during our project’s history, but yes, we finally want to do something on the UI/UX front. We have been considering introducing an ‘Easy Mode’ that should aim at making things much less of a maze to navigate for non savvy users.

    Stay tuned for more info!

RetroArch 1.9.7 released!


RetroArch 1.9.7 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.7 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!

NOTE: We will update this notice as soon as we have uploaded the 1.9.7 version for UWP/Xbox as well to our server. For now, these still point to the previous version (1.9.6). We thank you for your understanding.

Release notes

A brand new platform port has been added for RetroMini RS-90 (and similar devices). These are low-powered mass-produced MIPS handheld devices that are sold for very cheap. To us, it is yet another opportunity to optimize our cores for low-end devices.

PlayStation2 users are in for a treat. gpSP (Game Boy Advance emulator core) has been optimized and tuned for PS2 to the point where it should run most games at fullspeed. RetroArch should also have a bitmap font driver implemented now instead of relying on gsKit like before.

WiiU users benefit from many improvements to file I/O optimizations (faster loading/startup times), network speed, and menu/font rendering.

Switch users should benefit from the 7zip compatibility added to this release.

Many improvements to the CRT SwitchRes feature have been made. For more details, see ‘Changelog’ below.

Highlights

New RetroMini RS-90 port

Following on from the success of our OpenDingux port for JZ4770-based handhelds, we are pleased to announce official support for RetroMini RS-90 devices running OpenDingux Beta. This tiny console has one of the weakest CPUs we have ever targeted; it has just 32 MB of RAM, an ultra-low resolution 240×160 display and is available for as little as $20 – but still it provides an enjoyable RetroArch experience.

  • All regular frontend features are working (excluding rewind and runahead support)
  • RGUI offers surprisingly comfortable performance at 240×160 (even thumbnails are supported – with a fullscreen toggle mapped to the start button)
  • Content can be displayed with integer scaling, or nearest neighbour and semi-linear software filters are provided for fullscreen viewing

Given the limited specifications of the hardware, a modest section of cores are available. The following generally run at full speed:

  • Gambatte: All GB games (GBC games have mixed success)
  • Genesis Plus GX: Master System & Game Gear games
  • Pokemini
  • QuickNES

…while these offer varying degrees of playable content with frameskipping enabled via core options:

  • Mednafen PCE Fast
  • Picodrive: Genesis
  • Potator
  • RACE
  • gpSP

For the best results, we recommend applying a per-application CPU overclock for the RetroArch application: highlight RetroArch on the device’s home screen, press the select button > Edit RetroArch, and set Clock Frequency to 420 MHz (depending on the chip, a lower value may be required, or even higher may work correctly).

PlayStation2 – playable Game Boy Advance emulator added

gpSP should now be available for RetroArch PS2 starting as of version 1.9.7. This is a Game Boy Advance emulator core. Davidgf has been working hard on this core for the past few months and the results speak for themselves – this should be the first time that a PlayStation2 is able to run Game Boy Advance games at fullspeed.

WiiU improvements

In addition to the improvements listed for WiiU previously, there’s also the following to mention:

Fix inputs breaking when connecting/disconnecting remotes
When a KPAD controller (Wiimote, Pro Controller, etc.) gets disconnected or has its accessory changed, the Wii U’s API gives nonsensical results for a little while, even while claiming these results have no errors whatsoever. This was wreaking havoc in the input system and ended up leaving the controllers useless.
1.9.7 attempts to work around the console’s API by filtering out some of the unknown results.

Download progress indicator fixed for large transfers
An important bug was fixed that was causing issues while downloading the Assets from within the program. When downloading a large file on a 32-bit platform, the progress indicator will get pinned to 100% after downloading roughly 40MiB. This causes a lot of stress for assets.zip, where the 40MiB mark is about halfway. This bug has been fixed. Note that this improvement is not only beneficial for WiiU but should benefit other 32-bit platforms in general.

Linux / xdg-screensaver improvements

1.9.7 provides a workaround for the long-standing issue of “protocol error” messages being written to stderr whenever the “Suspend Screensaver” option is enabled and the X11 context driver is used. These messages don’t actually come from RetroArch – they’re xdg-screensaver’s, which is a script for cross-DE screensaver suspending that RetroArch calls to do its job.

It turns out, the script has a problem with title-less windows. See the related bsnes issue for analysis – kudos to Screwtapello for figuring this out. The proposed solution is to check if there’s already a title, and if there isn’t, to set it to a single “space” character, which is surprisingly enough for xdg-screensaver to work. The space character is picked so that there’s no visible difference between the bogus title and no title at all. The alternative is to make sure that RA’s window has a title at all times – too much of a hassle for something this trivial.

Changelog

1.9.7

  • 3DS: Add unique ID’s
  • CRT/SWITCHRES: Fixed some Monitor index bugs ad updated to the latest SR2
  • CRT/SWITCHRES: Fixed monitor index corruption on Windows and added correct fractal scaling. Only used when required
  • CRT/SWITCHRES: Updated log defines to match SR upstream.
  • CRT/SWITCHRES: Added new SR_CONFIG_PATHS for non Windows and Linux systems. Not that SR works on them but to fix RA compile issues
  • CRT/SWITCHRES: Updated SR2 code base to latest. Added supprt for windows monitor indexing. Fixed monitor index bug where index 1 was not being used correctly and “auto” was not being sent.
  • CRT/SWITCHRES: Updated swithres for x86 windows fix
  • CRT/SWITCHRES: fixed SR2 auto issue
  • CRT/SWITCHRES: Fixed auto monitor bug
  • CRT/SWITCHRES: Fixed monitor index corruption on Windows
  • CRT/SWITCHRES: Fixed buffer size bug
  • CRT/SWITCHRES: Added correct fractal scaling. only used when required.
  • CORE INFO: Automatically disable core info cache when core info directory is read-only
  • EMSCRIPTEN: add MAME2003 / MAME2003-plus to web.libretro
  • INPUT/UDEV: udev fixes add pointer pressed to pointer device to allow udev users to access this device
  • LIBNX/SWITCH: Enable 7zip support
  • LINUX/XDG: Prevent xdg-screensaver’s “Protocol error” messages
  • LOCALIZATION: Fetch translations from Crowdin
  • LOCALIZATION: Add missing languages for the first startup
  • MENU/XMB/WIDGETS: Add workaround for FPU bug that breaks scale factor comparisons on certain platforms (fixes XMB thumbnails on 32bit Linux/Windows)
  • MENU/RGUI: Enable fullscreen thumbnail toggle using RetroPad ‘start’ button
  • MENU/RGUI: Fix sublabel length when menu clock is disabled
  • NETWORK/HTTP: Fix HTTP progress indication for large files on 32-bit systems
  • NETWORK/NATT: implement natt fix from void()
  • OPENDINGUX: Fix display when cores ‘drop’ frames
  • OPENDINGUX BETA: Use ALSA audio driver by default
  • OPENDINGUX BETA: Fix IPU scaling when running 256×224 (SNES/Genesis) content
  • PATHS: Fix garbled path string
  • PS2: Implement proper ps2_font driver instead of using the font driver from gskit
  • PS2: Use BDM for increasing up USB stability
  • PS3: First basic RSX driver for PSL1GHT
  • RS90: Initial port
  • RS90: Fix offset of OSD text
  • RS90: Disable menu clock by default
  • RS90: Hide ‘Bilinear Filtering’ video option
  • RS90: Move appdata (retroarch) base directory to external MicroSD card
  • RS90: Add optional approximate ‘semi-linear’ scaling filter
  • SHADERS: Max Shader Parameters increased to 1024
  • VIDEO: Add ‘Integer Scale Overlay’ – Force integer scaling to round up to the next larger integer instead of rounding down
  • VIDEO: New ‘Full’ aspect ratio added. This aspect ratio is useful when used with a shader which has a border in it. The aspect ratio is set to the full window area, so that the viewport spans the whole viewport. When using a border type shader like the Mega Bezel this allows the graphics to span the whole window regardless of the user’s monitor aspect ratio
  • VITA: Wrong flags for not piglet version
  • UNIX: Correct backlight max_brightness path
  • UWP/XBOX: Default to Direct3D11 driver on UWP builds
  • UWP/XBOX: Do not use windowed mode on UWP/Xbox by default, set default resolution to 1920×1080 by default. Should fix display issues with Dolphin/PCSX2 on Xbox
  • WIIU: Fix inputs breaking when connecting/disconnecting remotes
  • WIIU: Input – ignore some bogus KPAD results
  • WIIU: Font rendering fixes – render font lines with correct spacing, and only sample alpha channel when rendering fonts
  • WIIU/NETWORK: Network speed optimisations – WINSCALE, TCP sACK, large buffers
  • WIIU/LIBFAT: Increase cache size on WiiU
  • WIIU/FILE IO: Filesystem optimisations – add fast path for already aligned buffers
  • WIIU/FILE IO: Use 128K vbufs for WiiU – we have loads of RAM and large vbufs are very beneficial
  • WIIU/MENU/OZONE: Fix Ozone rendering error (scissor fix)
  • WIIU/MENU/OZONE: Use Ozone icons instead of XMB Monochrome

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