Site icon Libretro

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

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

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.

Exit mobile version