In Development – RetroArch ANGLE support – OpenGL support for UWP and more

ANGLE is middleware developed by Google that serves as an OpenGL compatibility layer on systems where OpenGL support is either spotty or missing entirely. It converts OpenGL calls to Direct3D 9/11.

In this video, you will see ANGLE being used on RetroArch UWP. In specific, it allows us to run OpenGL cores now on the Xbox One, where only Direct3D 11/12 are available as graphics APIs. Mupen64plus Next is shown running in this video on an Xbox One S with fairly acceptable results.

Will this be ready for the next version?

We don’t know yet if this will make it for version 1.8.2.

Let us tell you though what this will entail in the future –

  • There will likely be two binaries from now on for the desktop Win32 Windows version – one with ANGLE, one without. The non-ANGLE version will use your system-provided OpenGL driver, while the ANGLE version will use the ANGLE version of the OpenGL dynamic libraries.
  • ANGLE works over OpenGL ES. This means that ANGLE requires separately compiled cores targeting OpenGL ES 2/3 instead of desktop OpenGL. What this means is that 1) we need separate cores since the current OpenGL cores available for Windows assume that desktop OpenGL will be targeted, and 2) a libretro core has to have a working OpenGL ES 2 or 3 implementation in order for it to work. This will mean that currently, cores like Quake 2/3/Doom 3 won’t work since there are no working OpenGL ES 2 codepaths in those cores. However, Mupen64plus Next and Flycast do have OpenGLES 2 codepaths.

What usecases are there for using ANGLE instead of regular OpenGL?

There are several scenarios imaginable where you would want to use ANGLE. Here are some of them –

  • UWP (shorthand for Universal Windows Platform) allows you to make one binary that will work on Windows Mobile 10, Windows 10 and Xbox One. The only graphics API available for UWP programs is Direct3D 11 or 12. So for OpenGL cores to work, a middleware layer like ANGLE which converts OpenGL to Direct3D is our only option. Therefore, ANGLE allows us to run OpenGL ES 2 cores on the Xbox One.
  • Certain graphics cards might have nonexistent OpenGL support on Windows 10 and therefore fall back to Microsoft’s reference OpenGL 1.1 drivers. This is pretty much the worst case imaginable and really limits what you can do with OpenGL on such graphics cards. Intel HD 2000/3000 series integrated GPUs are pretty much in this position. For such GPUs, ANGLE might be your only option to get any kind of acceptable level of hardware accelerated graphics support with openGL-based cores.
  • OpenGL driver support might be stagnating for certain graphics cards, and therefore several bugs go unresolved in their OpenGL driver implementations. ANGLE is a good way to work around that assuming you are OK with an OpenGL ES 2/3 feature set.

We will fill you in as things develop how ANGLE will fit into RetroArch’s future releases. For now, the path seems clear – separate core versions for the emulators that have viable OpenGL ES 2/3 codepaths, and separate binaries at least on Windows desktop for an ANGLE-enabled and non-ANGLE enabled version. The redist (redistributable) will also need to be updated to include the extra dynamic library dependencies.

Flycast WinCE has merged into regular Flycast – only one core now! Plus – Switch port teaser!

So, flyinghead finally feels confident enough that we are at a stage where the WinCE branch can be merged into master.

This is a pretty big deal. This marks the first time that an open source Dreamcast emulator has Windows CE support in a mainline release, along with arcade Naomi support. Right now, the only other emulator that manages to emulate both these is a closed source emulator called demul. So this is a pretty big milestone for us.

So, what do you have to do from this point on?

– Go to the Online Updater, select ‘Update Cores’, and download ‘Flycast’.
– Remove the old Flycast WinCE core. It no longer serves any purpose, you can just download the Flycast core instead which was Windows CE support now built-in. If you have any games in your old playlists that still use the Flycast WinCE core, reset the core association and make it use the main Flycast core now.

This has been a tremendous undertaking and in the process, so many improvements have been made as a result:

* (Windows CE) The reason why the Windows CE build was separate before was that the addition of the MMU codepath would greatly hurt the performance of every non-Windows CE-based game. This is no longer the case thankfully. Instead, performance has actually improved over the non-Windows CE build from before (see the next point).
* (Optimizations / Performance) Thanks to SSA optimizations, performance is better across the board now for every game, whether it is a Windows CE-based game or not. We figure it’s about 30% faster on average give or take.
* (Libretro core-specific) Certain core options now get hidden depending on other settings that are turned on/off which they are dependent on. For instance – ‘Show VMU Display Settings’ – if you enable this and then leave the Quick Menu options screen and re-enter it again, it will show all the VMU display options. Turn this off and repeat the same process in order to hide all the VMU display-related options again. This will greatly unclutter the options list.
* (Libretro core-specific) A new setting that appears when Threaded Rendering is enabled – ‘Delay Frame Swapping’. This waits until the frame is rendered by the digital video encoder which means it’s being displayed on the screen. This helps avoid displaying bogus/empty frames that would not be shown on a real console. Without this option enabled, you can get heavy screen flickering with some games (such as South Park Chef’s Luv Shack and NFL Quarterback Club 2000).
* (Libretro core-specific) Auto-configuration of early input polling when threaded rendering is enabled. Threaded rendering needs early input polling configured or else input will be buggy. In the past, the user needed to do this manually on RetroArch, which greatly complicated things. Now instead, we do this behind the scenes through a private libretro API extension, so you no longer have to tediously configure this yourself. It was annoying and could mess with your configuration since for other cores you would really want to set it to late input polling for the best input latency.
* AICA sound emulation has greatly improved and can now be considered mostly feature complete. We have included a before and after comparison of Skies of Arcadia so you can get an idea of how much of an improvement it is – this is Skies of Arcadia before and after implementing the LPF (Low-Pass Filter) –

Before –

After –

So, in short, the low-pass filter has been implemented. This filter has an envelope, similar to the already implemented one for amplitude. It varies the cut-off frequency for attack/decay/sustain/release. The other thing added is the pitch LFO, which is used to create a vibrato effect. So far, the only sound inaccuracy I have noticed in a game is that certain music that is triggered upon events (such as in Resident Evil Code: Veronica) does not get properly faded out. Apart from that, sound accuracy has seen a tremendous improvement, really night and day in a lot of respects in games like Resident Evil 2 and Skies of Arcadia.

* (AMD) Per-pixel alpha sorting has been fixed on AMD GPUs. Previously ,it would look like this on Windows (at the main BIOS menu) –

Switch port teaser

Flycast Libretro is coming to RetroArch Switch courtesy of Datamats! For now it uses the interpreter core only, but m4xw is going to work on getting the dynarec working. No ETA and don’t bug the devs about it until it’s done!