vitaQuake II Libretro core WIP available right now on Windows/Mac/Linux! Plus high refresh rate support in libretro core games



We’ve always felt at libretro that RetroArch is a platform that is agnostic to emulators. That is, the libretro API is not in any way tied to emulators and allows for far more applications to be ported beyond just emulators. So it’s always a delight to us when game engines get ported as libretro cores to add to the growing pool of non-emulator libretro cores. So it was music to our ears when the talented PS Vita homebrew coder Rinnegatamante graced us with a new libretro core – vitaQuake II! This is a port of a Quake II engine source port that he made originally for the PS Vita.

With this core, you will be able to play Quake II on RetroArch (or any libretro-compatible program for that matter).

YouTube videos coming later today showcasing the game running at both 60Hz and 120Hz!

Where to get it and for what platforms

The core is available right now on our buildbot. It will be only available for Windows PCs, Mac and Linux for now given the OpenGL fixed function requirements right now. We will see where we can go from here.

To install this core, in RetroArch’s Main Menu, go to Online Updater. First make sure your core info files are updated. Select ‘Update Core Info Files’.

After this is done, select ‘Core Updater’. From here, you can select ‘Quake 2 (vitaQuake 2)’ from the list and download it.

How to start Quake 2

You need to load Quake 2’s PAK0.PAK. This is usually found inside the Quake 2 directory’s ‘baseq2’ directory. Both the shareware version and the full version should work fine.

Information

It’s a very early version, and some bugs will still exist. Some examples:

  • If you want this to run with the regular gl driver, “Shared Hardware Context” needs to be enabled in Settings -> Core (you might need to enable Show Advanced Settings first in Settings -> User Appearance). The glcore driver on the other hand does not require you to enable this in order for the game to work as normal.
  • A savefile bug where after having selected New Game for the first time, starting it again after closing vitaQuake 2 for the first time will start you off at the beginning with all enemies already killed and the elevator button missing. In case this happens, you then need to go to the directory where your Quake 2 datafiles are, and manually delete the baseq2/save directory contents. Obviously this is very inconvenient and not at all intentional, so hopefully we can fix this soon.
  • After about 5/7 minutes, there might be a big freeze that can last for 5 seconds, after which the game will resume again. Obviously very nonideal and something we want to fix ASAP.

Technical details

Let us discuss some of the intricacies of this port:

  • Quake II dates back to an era where 3D graphics APIs and 3D video cards in general were truly in their infancy. Quake II makes use of a very limited subset of OpenGL 1.x. To complicate matters, right now the renderer is using some OpenGL 2.x functions as well such as glGetTexImage. We’ll have to see where we go from here – mobile would need a renderer that is at least compatible with GLES2, which means making use of non-fixed function vertex and pixel shaders, while on the other hand we can see an exclusively OpenGL 1.x renderer being very useful for low end hardware such as the 3DS, PS Vita and PSP – all these platforms have an OpenGL 1.x wrapper to some degree that translates back to their native graphics APIs. Frangarcj and Rinnegatamante are discussing possibly adding an OpenGL 1.x hardware context to the libretro API that would make it possible to target these platforms. So perhaps the future of this port is multiple renderers so that we can cast a wide net in terms of compatibility.

    Long story short – for now, this renderer is making use of fixed function GL, so you’ll need to be on a desktop computer to run this for now.

  • The glcore video driver will run this core right now without having to enable ‘Shared Hardware Context’. To get it to run with the regular gl driver, you will need to enable ‘Shared Hardware Context’ inside Settings -> Core. You might need to enable ‘Advanced Settings’ first in Settings -> User Interface before this shows up.
  • The libretro core has been changed slightly from the original so that the Quake II frame logic operates in fixed timesteps. In normal Quake 2 ports, this is usually done with a timer which acts as the framerate limiter. In libretro instead, we can guarantee that each retro_run iteration is exactly one frame, so all we have to do is pass the exact timestep delta for the framerate we are to target to Qcommon_frame. This gives us a silky smooth framerate with minimal frametime deviations. This might complicate matters in terms of existing Quake 2 server compatibility, but we kinda figure that it’s not worth it having suboptimal performance and that the existing Quake 2 server pool is very limited anyway and that it has its own drawbacks in terms of performance as it stands (with hard caps on framerate – most servers cap at 60-70 fps).
  • Quake II in general seems to have a default framerate cap of 90fps. We want to make as many libretro game engine cores suitable for high refresh rate gaming as possible, so we’ve gotten rid of this cap. We’ve tested the game to be running flawlessly at 100Hz and 120Hz.
  • The UI in Quake II normally doesn’t scale, so at higher resolutions it would appear very small. Because it’s 2019 and not a lot of people play their games at 640×480 anymore, there is now UI scaling implemented so that the UI text popups will be readable at 1080p and beyond.
  • Rumble has been implemented and is available as a core option, just like it was in the PS Vita standalone version.

High refresh rate gaming with libretro/RetroArch


There has been an increased focus on making sure libretro game cores are all they can be when it comes to supporting higher refresh rates. So far we have already had the following libretro game cores that can run at higher framerates (>60fps):

  • Prboom (Doom 1/2 game engine core)
  • Cannonball (Outrun game engine core)
  • OpenLara (Tomb Raider game engine core)
  • Tyrquake (Quake 1 game engine core) (NEW)
  • vitaQuake2 (Quake 2 game engine core) (NEW)

Tyrquake and vita Quake2 are two recent additions to this list. In order to get them to run without audio crackling at higher refresh rates, we had to change the audio samplerate from 44Khz to 48Khz, which seemed to do the trick.

To further increase the convenience factor, we’ve also implemented a nifty feature in these libretro cores: support for libretro’s ‘preferred refresh rate’ option. Basically, if you leave the ‘Framerate’ option at ‘Auto’, the libretro core will look at RetroArch’s configured ‘refresh rate’, and it will use this for the framerate. This means that inside RetroArch, you can switch to a 1440p 120Hz mode with the Resolution setting, then start the core, and without having to configure the framerate, it will then run the game at 120fps. Likewise, if you then switch to a 4K resolution at 60Hz, and close and reload the Quake core, the game will automatically run at 60fps instead. So, with cores that support the ‘RETRO_ENVIRONMENT_GET_TARGET_REFRESH_RATE’ environment callback, you don’t have to keep switching back and forth between separate framerates inside the core – you can simply leave it at ‘Auto’ and RetroArch will do the rest.

This feature has not been added yet for OpenLara and Prboom, but we’ll do so soon.

RetroArch 1.7.9 (v2) released!


RetroArch 1.7.9 (v2) has just been released. Among many other things, it includes big QoL (Quality of Life) improvements for mobile users.

The menu system should now support touchscreen gestures and controls in general should be much improved inside the menu. But that’s far from all!

Grab it here.

If you’d like to show your support, consider donating to us. Check here in order to learn more. You can also help us out by buying some of our merch on our Teespring store!

More frequent stable releases

We will be doing stable releases more frequently from now on instead of them happening only once every 3 months. This way, we can gather live feedback from users based on things we change and it’s easier for us to adapt to user feedback.

Big features

Much-improved menu navigation and touch gestures

Version 1.7.9 will debut touchscreen gestures for the menu for the first time! You will now be able to operate the XMB and MaterialUI menu without needing a gamepad or overlay!

XMB gestures

The following gesture functionality is available with XMB:

  • Swipe up/down in the left margin: scroll through current menu list by ascending/descending the alphabet
    Swipe up/down in the middle region of the screen: scroll up/down through current menu list by one ‘page’ (i.e. one screen’s worth of entries)
  • Swipe left/right: navigate left right, or change the setting value of the currently active item
  • Tap left margin below top margin: Back/cancel action
  • Tap left margin above top margin (top left corner): Open search interface
  • Tap right margin: select currently active item
  • Tap menu list in middle region of screen: activate item, or select it if already active
  • Long press active menu item in middle region of screen: reset item to default setting value
  • Press and drag up/down in the right margin: scroll up/down through menu list (the further you drag, the faster it goes – up to a limit corresponding to keeping a cursor key held down)
  • Press and drag left/right in the top margin: navigate left/right, or change the setting value of the currently active item (again – the further you drag, the faster it goes)

MaterialUI gestures

The following gesture functionality is available with MaterialUI:

On the ‘home’ screen(s):

  • Swipe left/right to switch between the three top-level menus (i.e. has same effect as tapping the icons on the tab bar)

On playlists, file lists and drop down lists:

  • Swipe left/right on the top half of the screen to ascend/descend the alphabet.
  • Swipe left/right on the bottom half of the screen to scroll up/down by 10% of the list size (or one screen height, if this is larger)

On other types of menu:

  • Swipe left/right on a highlighted item to simulate normal cursor key left/right input (i.e. can be used to change settings)

On all menus:

  • A quick tap highlights and selects an item
  • A ‘short press’ (held for > 200 ms) just highlights the item. This is useful for highlighting a settings item prior to swiping left/right to change the value

Auto rotation of overlay when orientation changes (from landscape to portrait and vice versa)

This must have been bugging Android and iOS users for a long time, and finally it is fixed!

We added a new Auto-Rotate Overlay option under Settings > Onscreen Display > Onscreen Overlay (enabled by defaultt on mobile). When enabled, any overlay with both landscape and portrait support will automatically be rotated according to the current display aspect ratio (which corresponds to device orientation for mobile platforms).

Note: Since the overlay specification has no concept of orientation, this auto-rotate feature depends upon proper naming conventions in overlay config files:

  • The active overlay name should contain a fixed string corresponding to it’s layout (i.e. landscape or portrait). Prefixes/suffixes are fine.
  • The overlay rotate button should be wired up, with a target overlay whose name contains a fixed string corresponding to the opposite layout. (Again, prefixes/suffixes are fine)

AI Service – Faster image mode

The image mode should now be substantially faster. It now saves the image in-memory in PNG format then passes it along to the translation service.

To learn more about our AI Service, check out our Youtube guide above.

Changes

v2

  • 3DS: Fix 3DS screen flickering when OSD is enabled
  • IOS: Fix crash that could happen at startup
  • MENU/MATERIALUI: Change DPI scaling back to original – too many issues with current implementation, requires a redesign
  • AI SERVICE: Image mode is now much faster, it now saves the image in-memory in PNG format then passes it along to the translation service
  • BUGFIX: Touch input – When using an overlay to toggle the quick menu on touchscreen devices, we no longer get ‘phantom’ menu input – i.e. the old bug of hitting the toggle and instantly resuming content (or performing a save state) is fixed
  • BUGFIX: Networking – RetroArch crashed when pressing left while Relay Server Location entry was selected
  • BUGFIX: Networking – fix memory leak that could happen at exit after a network operation had run
  • CHEEVOS: Improve handling of line endings when calculating CD hashes for retroachievements
  • CHEEVOS: Add support for Sega CD/Saturn; reduce hash calls to server
  • FPGA: Add initial FPGA port for Z-Turn boards – not really release-ready yet, will need community support to continue. Currently employs naive framebuffer approach, not fullspeed
  • GL1: GLDirect (D3D9 to OGL1.1 wrapper) support
  • GONG: Stability fixes
  • LINUX/UDEV: Fix touchscreen/lightgun issues
  • MENU/MATERIALUI: MaterialUI no longer ‘forgets’ its place when navigating backwards in menus, and navigation in general is ‘cleaner’
  • MENU/MATERIALUI: Add initial gesture support
  • MENU/MATERIALUI: Improved touch support
  • MENU/MATERIALUI: Bugfix – Random’ items are no longer automatically highlighted when performing standard up/down ‘flick’ scrolling through lists (items are only highlighted when you keep the pointer still for > 200 ms)
  • MENU/MATERIALUI: Bugfix – The display no longer ‘jerks’ for one frame when navigating backwards through lists
  • MENU/MATERIALUI: Bugfix – The Material UI scaling factor is now based upon the device-reported screen DPI value (previously it relied upon a hard-coded magic number, which was never correct)
  • MENU/RGUI: Functional mouse/touchscreen support
  • MENU/ONSCREEN KEYBOARD: On-screen keyboard entry via mouse/touchscreen has been tidied up – no more double inputs (or unwanted menu interaction in the background)
  • MENU/MOUSE: Mouse wheel up/down is now a proper ‘up/down’, same as using cursor keys or a dpad
  • MENU/MOUSE: Mouse wheel tilt left/right has been wired up to normal ‘left/right’ commands. Also further improved mouse wheel tilt
  • MENU/OZONE: Add option to toggle between static and scrolling content metadata
  • MENU/XMB: Add full gesture support
  • MENU/OSX: Fixed mouse buttons – mouse down events were not hooked up
  • MENU: When navigating backwards from a core options drop-down list (i.e. pressing select or cancel), the last menu position is remembered (instead of resetting back to the first core option item each time)
  • MENU: Add mouse/touchscreen gesture support
  • MENU: Add option to delete playlists (Settings > Playlists > Playlist Management)
  • MOBILE (ANDROID/IOS): Add option to automatically rotate overlays when changing orientation
  • OSD: Memory details should now be available on every platform (get_mem_total and get_mem_free need to be implemented in the frontend driver for it to work)
  • OSD: Memory details can now be shown individually without FPS and frame count
  • PS2: Fix memory leaks in font/video driver
  • SWITCH: Set default aspect ratio to core provided instead of 4:3
  • THREADED VIDEO: Fix FPS text in threaded video mode
  • VITA: Set default aspect ratio to core provided instead of 4:3
  • VITA: Add system language detection
  • VITA: More memory support
  • WIN32: Log window now has title ‘Logging Console’
  • WII: Add Wiimote lightgun support

Upcoming – RetroArch 1.7.9 – Menu Touchscreen Gestures!


RetroArch 1.7.9 (scheduled for release soon) will debut touchscreen gestures for the menu for the first time! You will now be able to operate the XMB menu without needing a gamepad or overlay!

The following gesture-like functionality is available:

  • Swipe up/down in the left margin: scroll through current menu list by ascending/descending the alphabet
  • Swipe up/down in the middle region of the screen: scroll up/down through current menu list by one ‘page’ (i.e. one screen’s worth of entries)
  • Swipe left/right: navigate left right, or change the setting value of the currently active item
  • Tap left margin below top margin: Back/cancel action
  • Tap left margin above top margin (top left corner): Open search interface
  • Tap right margin: select currently active item
  • Tap menu list in middle region of screen: activate item, or select it if already active
  • Long press active menu item in middle region of screen: reset item to default setting value
  • Press and drag up/down in the right margin: scroll up/down through menu list (the further you drag, the faster it goes – up to a limit corresponding to keeping a cursor key held down)
  • Press and drag left/right in the top margin: navigate left/right, or change the setting value of the currently active item (again – the further you drag, the faster it goes)