We are delighted to announce that the Beetle PSX dynarec bounty is finally entering its public beta stage and is available to the public right now!

The dynarec project for Beetle PSX would not be where it is today without the combined efforts of simias, pcercuei and Zach Cook!

If you are on Android, Windows, Linux and/or macOS, all you have to do to get the latest core is to open RetroArch, go to Online Updater, and either select ‘Update Installed Cores’ (if you already installed the Beetle PSX core before), or install the Beetle PSX and/or Beetle PSX HW cores separately.

What’s this all about?

In 2017, we started a bounty for Beetle PSX, our own heavily modified fork of Mednafen PSX that has pretty much become its own thing at this point. Mednafen PSX is a highly accurate PlayStation1 emulator. However, unlike emulators like ePSXe, it only has a CPU interpreter, which means that the emulator is fairly slow and is therefore not really usable on anything but desktop PCs and high end mobile phones. The bounty was created on BountySource in hopes of attracting someone who could add a dynamic recompiler to Beetle PSX so that it could run much faster and therefore be a viable emulator on lower end hardware, such as mid range mobile phones, game consoles, older PCs, etc.

What pcercuei and Zach Cook have come up with is a Lightrec-based dynamic recompiler implementation. Zach Cook has done most of the integration of Lightrec in Beetle PSX, while pcercuei did Lightrec itself. Lightrec is pcercuei’s dynamic recompiler for MIPS that uses GNU Lightning as the backend. There should be working implementations for nearly all system architectures, from x86 (64bit/32bit) to MIPS and ARM (64bit/32bit). It bears mentioning that pcercuei also already has Lightrec hooked up to PCSX Reloaded, and used this as a testbed.

Platforms

The dynarec is available for the following platforms:

Linux

Windows

Android *

MacOS *

We are able to confirm that the performance gains for x86 and x86_64 are significant, as you can see down below (see Performance tests). We don’t know what the results are for ARM Linux, let us know how it performs!

* Performance right now is pretty bad for the Android and macOS platforms. We hope that after the public beta test, performance will improve a lot for these platforms. So while there is a framerate gain, it isn’t anywhere near what it should be.

How to use it – what the options do

First, update your Beetle PSX cores. We already explained before but we’ll repeat it here for the sake of it –

If you are on Android, Windows, Linux and/or macOS, all you have to do to get the latest core is to open RetroArch, go to Online Updater, and either select ‘Update Installed Cores’ (if you already installed the Beetle PSX core before), or install the Beetle PSX and/or Beetle PSX HW cores separately.

Once you’re on the latest core, you’ll notice that a lot more options show up now when you go to Quick Menu -> Options. We’ll go over these options and we’ll explain what they do.

NOTE: The dynarec is disabled by default – the default setting is still ‘Beetle Interpreter’. So if you’re wondering why things aren’t automatically faster, set it from Disabled to ‘Max Performance’ in Quick Menu -> Options.

CPU Dynarec – [Max Performance|Cycle Timing Check|Lightrec Interpreter|Disabled (Beetle Interpreter)]

Dynamically recompile CPU instructions to native instructions. Much faster than interpreter, but CPU timing is less accurate, and may have bugs.

Disabled (Beetle Interpreter) – This is the default setting, dynarec is disabled. This uses the default Beetle interpreter that has been used in Beetle PSX all up to this point. It’s faster than Lightrec Interpreter (for now) but much slower than any of the dynarec modes. We don’t recommend you use this unless ‘Max Performance’ or ‘Cycle Timing Check’ won’t work well for you on the game you’re trying to play.

Max Performance – Dynarec enabled with all features enabled. Should be the fastest option, but some games might require the ‘Cycle Timing Check’ mode instead.

Cycle Timing Check – Dynarec enabled, but with cycle timing check which makes it a fair bit slower. Some games might need this setting in order to work properly, so if you find that Max Performance has bugs with a game, try this mode instead.

Lightrec Interpreter – This is the slowest mode right now. It’s basically in the same ballpark as Beetle Interpreter but the Beetle one is actually faster. It’s basically Lightrec running in CPU interpreter mode instead of dynarec mode. We don’t recommend you use this.

Dynarec Code Invalidation – [Full/DMA Only [Slightly faster]]

Some games require a Full invalidation, some require DMA Only.

Dynarec DMA/GPU Event Cycles – 128 (Default) – can go up to 512

How many cycles can pass in the CPU before a GPU or DMA update is checked. A higher number will be faster, but also more likely to cause bugs or crashes. This option has much less impact on performance with Beetle Interpreter than any of the dynarec modes.

Performance tests

Test hardware: Desktop PC – Core i7 7700k, Windows 10

Game Beetle Interpreter Dynarec – Max Performance Dynarec – Max Performance (w/ DMA/GPU Event Cycles High) Dynarec – Cycle Timing Check Dynarec – Lightrec Interpreter Tekken 3 151fps 223fps 252fps 209fps 117fps Ridge Racer Type 4 132fps 323fps 325fps 289fps 132fps Final Doom 216fps 401fps 456fps 359fps 142fps Final Fantasy VIII 185fps 384fps 426fps 269fps 149fps Rockman X3 211fps 414fps 450fps 319fps 152fps

Test hardware: Laptop PC – Core i5 3210M, Ubuntu Linux 19.04

Game Beetle Interpreter Dynarec – Max Performance Dynarec – Max Performance (w/ DMA/GPU Event Cycles High) Dynarec – Cycle Timing Check Dynarec – Lightrec Interpreter Tekken 3 83fps 117fps 126fps 110fps 78fps Ridge Racer Type 4 105fps 159fps 173fps 143fps 87fps Final Doom 128fps 204fps 235fps 181fps 99fps Final Fantasy VIII 128fps 232fps 277fps 152fps 97fps Rockman X3 141fps 235fps 266fps 182fps 107fps

Currently known issues

* PGXP right now is disabled if you use any of the Dynarec modes. So don’t bother enabling PGXP modes for now when you use the Dynarec modes, you’ll just lose performance while gaining absolutely nothing. We hope that we are able to come up with a solution for this later.

* Make sure ‘Renderer’ is set to ‘Software’ if you want to use runahead. We recommend for runahead purposes you stick to 1x Internal GPU Resolution as even with the dynarec enabled, it can still be stressful on the CPU to go any higher than 1x with software rendering.

* If you are using the Android version and want to report bugs right now, please DO NOT use the Vulkan renderer right now. It currently has a couple of bugs on Android that the software renderer doesn’t have. So we advice you to use the software renderer for now on Android. On top of that, the software renderer right now is faster than Vulkan on Android, so you’re advised for now to use this during the public beta period.

Currently known compatibility issues

These are the current compatibility issues I have been able to notice on Windows.

Parasite Eve 2 (USA) (Disc 1)

Won’t continue from start with dynarec. It will freeze at the ‘Published by Square Electronic Arts’ screen.

There is a workaround for this – set CPU Overclock to 300%. The game will run too fast but it will at least be playable.

Brave Fencer Musashi (USA)

Hangs at ‘New Game’ – first world screen

There is a workaround for this – set CPU Overclock to 300%. The game will run too fast but it will at least be playable.

Gex – Enter The Gecko (USA)

Crashes after PSX copyright screen

Time Commando (USA)

Corrupted background graphics. Background graphics in this game are streaming FMV with polygon models on top.

Street Fighter Ex Plus Alpha (USA)

If you lose a fight and then select Continue, it will hang

Vanishing Point (USA)

It crashes once inside a race – with both full max or dma only

Battle Arena Toshinden 1 (USA)

It runs too fast.

WORKAROUND: By setting CPU to 90%, you can workaround this issue.

Alone In The Dark – One Eyed Jack’s Revenge (USA)

Crashes after the PSX copyright screen

Viewpoint (USA)

Crashes after the PSX copyright screen

Another big announcement at the end of the weekend

We have even bigger things for you in store by the end of this week. So stay tuned, because we have lots more to talk about very soon! It’s time to get the 5th gen out of the way and have it preserved for posterity!