RetroArch 1.7.7 – New OpenGL Core driver supports Slang universal shader spec!


When RetroArch added support for the Vulkan graphics API back in 2016, we made a new shader spec that was intended to replace the older shader specifications like Cg and GLSL moving forward.

The problem at the time was that only the Vulkan video driver could make use of these shaders. Therefore, if you were using the OpenGL video driver, you could not use the slang shaders but had to resort back to GLSL (or even Cg). This made it cumbersome to switch between video drivers, say starting one game/core that uses OpenGL, then switching back to Vulkan to start another core that uses Vulkan. You couldn’t just load a shader preset for one of the two and expect that to work as well for the other core with a new video driver.

A new OpenGL driver has been made that targets OpenGL 3.2 and up. And unlike the older GL driver, this one supports only slang shaders. This means that this OpenGL driver can now finally use the same shaders as Vulkan, Direct3D 10/11/12, and Metal. This marks an important milestone for us since we are well on our way to having a true universal shader spec now that can cross around graphics API barriers.

List of video drivers supporting slang

Here is a listing of video drivers that support slang in RetroArch:

    1. OpenGL (Core – requires 3.2 or higher)
    2. Vulkan
    3. Metal
    4. Direct3D 10/11/12
    5. WiiU

How to use it

In order to use this video driver, you need to have a GPU with modernday OpenGL drivers. By default, RetroArch starts out on most platforms with the regular GL driver, which requires OpenGL2. We will therefore have to switch over manually to GL Core in order to use it.

Once inside RetroArch, go to Settings – Drivers. Go to Video Driver. Select ‘glcore’. After this, go back to the main menu inside RetroArch, and select ‘Quit RetroArch’.

What platforms are supported as of v1.7.7?

So far, the Windows and Linux builds come with the GL Core driver. macOS might follow later for OSX 10.7 and up.

The GL Core driver is OpenGL ES 3.x compatible, so a port to mobile devices is not inconceivable. We would certainly like to see this driver appearing on Android and iOS.

If for whatever reason your GPU or driver does not supper OpenGL 3.2, RetroArch will quit and set your video driver to “gl”. You will then just have to restart the program in order to boot with the regular OpenGL 2 driver.

Important

Future plans/current limitations

    1. The glcore driver does not support GLSL or Cg shaders, only slang. If you still need to use such shaders, you have to go back to the older OpenGL video driver.
    2. We’d like slang to appear on even more platforms, such as the Microsoft Visual Studio builds below 2012. What prevents this from happening is the usage of C++11. Slang as a shader spec leverages several technologies such as the excellent SPIRV-Cross and glslang, both of which are also C++11 projects. Now, SPIRV-Cross has a C API, so this could be a potential solution towards making a wholly C based solution so that slang could appear in more builds. However, the C API for glslang has been abandoned and deprecated for one or two years. So after 1.7.7, we will have to research alternatives such as Google’s shaderc (which is supposed to still have a C API), and hope they will allow us what we want to do – have wholly C code for the slang shader code for the sake of backwards compatibility and being able to port it to more platforms.

Links

Developing Slang Shaders

Flycast WinCE Libretro – Experimental core released!

Courtesy of flyinghead, today we’re releasing a special version of Flycast with Windows CE support enabled! Our reason for releasing this is that we want users to report back as many issues as possible so the kinks can be ironed out.

What’s this about?
Windows CE was an option available to Dreamcast developers that made it much easier to port their game from PC to Dreamcast. Windows CE is/was a subset of Win32, stripped down so that it could be used on low-powered embedded devices instead of expensive desktop computers. PC developers that were used to dealing with DirectX on Windows PC could easily convert their game over to Dreamcast using Windows CE. Hence why you saw a lot of ports at the time from PC-centric western developers that would normally not touch game consoles.

Windows CE emulation (or rather, full MMU support) has been one of the biggest things missing from open source Dreamcast emulation up until now. It is often not enabled in main builds because emulating it requires emulating the MMU (Memory Management Unit) of the Dreamcast, which makes emulation much slower. So far, only Demul (a closed-source Dreamcast emulator) has something resembling full MMU support.

Now finally, open source is beginning to catch up. About time. Dreamcast is over 20 years old at this point, the people that grew up with it are all getting older as time goes on, and it shouldn’t taken another 10 years for all of this stuff to be properly preserved and documented. Flyinghead has done an absolutely incredible job over the past year or so in singlehandedly turning Flycast from something that was worse than nullDC in compatibility and graphics accuracy into the closest we have to an actual competitor to Demul, and we couldn’t be more happy with that. He spent a lot of time in making sure this release was ready today, and we hope you will put it through its paces.

How to get it

1) First, make sure that you have all core information files installed. Go to RetroArch’s main menu, select ‘Online Updater’, and select ‘Update Core Info Files’.

2) Go to ‘Online Updater’ -> ‘Update Cores’. Scroll down the list until you reach ‘Sega Dreamcast/NAOMI (Flycast WinCE)’. Install it.

System requirements

Flycast WinCE has higher system requirements than the regular version. The most important things you need to know:

  1. You can only expect borderline acceptable performance right now on PC x64 systems. ARM64 and ARM 32bit will likely be too slow at Flycast WinCE to be playable.
  2. The Linux x64 version right now is the fastest of them all. The macOS x64 version should also be comparable in performance.
  3. The Windows x64 version is currently much slower than the Linux/Mac versions.

Consider this core a work-in-progress. Bugs are to be expected, fairly demanding requirementsare likely to be expected for now. Things can only get better from here.

Compatibility

Below is by no means an exhaustive list of all games on Dreamcast that used Windows CE under the hood, along with their current playable status in Beetle WinCE at the time of this writing.

The most complete listing we found so far of Dreamcast WinCE games can be found here.

4×4 EvolutionPlayable
Name Status
Atari Anniversary Edition Playable
Armada Playable
Bang! Gunship Elite Playable
Bust-A-Move 4 Playable
Caesars Palace 2000: Millennium Gold Edition Playable
Championship Surfer Playable
Ducati World Racing Challenge Issues
Half-Life Playable
Happy Lesson Playable
Hidden & Dangerous Playable
KISS: Psycho Circus: The Nightmare Child Playable
Kita e. White Illumination Playable
Maximum Pool Playable
Midway’s Arcade Greatest Hits Volume 1 Playable
Midway’s Arcade Greatest Hits Volume 2 Playable
Nightmare Creatures 2 Playable
Q*bert Issues
Railroad Tycoon II Playable
Railroad Tycoon II (PAL) Playable (set Broadcast to PAL)
Resident Evil 2 Playable
Sega Rally 2 Playable (DIV match must be disabled)
Sno-Cross Championship Racing Playable
South Park: Chef’s Luv Shack Playable
Spirit of Speed 1937 Playable
Starlancer Playable
The Next Tetris Playable
Tomb Raider: The Last Revelation Playable
Tomb Raider Chronicles Playable
Tom Clancy’s Rainbow Six Playable
Virtua Cop 2 Playable
Wild Metal Playable
Who Wants To Beat Up A Millionaire Playable
Worms Armageddon Playable (DIV match must be disabled)
Worms World Party Playable

Notes

  1. Many Windows CE games are region-sensitive. Make sure to set the region and broadcast to the right ones – as most Windows CE games won’t run in a different region (although Default might often times work fine). You can change these settings by going to Quick Menu -> Options.
  2. If performance is lacking, try the Threaded Renderer, this can really help. You can enable or disable this by going to Quick Menu -> Options.
  3. Some Windows CE games will flat out not run if DSP is not enabled. So in case a game doesn’t work, try first turning that on.
  4. Enabling DIV matching can lead to some Windows CE games outright not working. As a general precaution, we advise that you leave DIV matching off. Sega Rally 2, for instance, requires that you leave DIV matching off.
  5. Other enhancement/hackish features, like Fast GD-ROM Loading, are best left off in case you experience compatibility issues.

Screenshot gallery

Videos

Check out these videos by flyinghead –