Beetle PSX Dynarec – Public Beta Out Now! Fast and accurate wins the race!

Beetle PSX Dynarec – Public Beta Out Now! Fast and accurate wins the race!



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.


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.

* You cannot use runahead yet with the dynarec, it is currently not stable. Also, if you are thinking of using runahead, please use the software renderer instead of the hardware renderer. The bugs with the hardware renderer when runahead is enabled are too severe yet to be worth bothering with.

* 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 until you set CPU type to Beetle Interpreter

Brave Fencer Musashi (USA)
Hangs at ‘New Game’ – first world screen

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

Post a Comment

0 Comments